Documentation

Complexitylib.Models.FiniteAutomaton.Complementation.Internal.Diagram

Two-way complementation: diagram #

Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a. Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Combinatorics/TwoWayAutomata/Diagram.lean

Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.

Four boundary relations; the direction distinguishes the two copies of Fin m.

  • forward : SetRel (Fin m) (Fin m)

    Enter on the left and exit on the right.

  • backward : SetRel (Fin m) (Fin m)

    Enter on the right and exit on the left.

  • left : SetRel (Fin m) (Fin m)

    Enter and exit on the left.

  • right : SetRel (Fin m) (Fin m)

    Enter and exit on the right.

Instances For
    theorem Complexity.FiniteAutomaton.Complementation.Internal.Diagram.ext {m : ℕ} {x y : Diagram m} (forward : x.forward = y.forward) (backward : x.backward = y.backward) (left : x.left = y.left) (right : x.right = y.right) :
    x = y

    Composition of boundary diagrams in path order.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Componentwise edge inclusion, as a relation on diagrams.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Reflection reverses the order of multiplication.

        Equations
        Instances For

          true denotes the positive sign; false denotes the negative sign.

          Equations
          Instances For

            Closure of alternating returns at a boundary.

            Equations
            Instances For

              The recurrent relation obtained by closing through traversals.

              Equations
              Instances For

                Signed recurrent equivalence classes of an idempotent diagram.

                Equations
                Instances For

                  The corner membership equations for an idempotent e.

                  Equations
                  Instances For

                    Nesting of idempotents; distinct from edge inclusion.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      The surviving through relation U relative to e.

                      Equations
                      Instances For

                        Classes whose recurrent loops are absent after replacement by z.

                        Equations
                        Instances For

                          Classes containing none of a fixed set of signed protected labels.

                          Equations
                          Instances For

                            Rectangle associated with a recurrent representative.

                            Equations
                            Instances For

                              Boundary ports: false is left and true is right.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                Returns from an exit port through the surrounding left or right context.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  A middle traversal followed by any finite number of context returns and traversals.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    theorem Complexity.FiniteAutomaton.Complementation.Internal.Diagram.mem_port_through {m : ℕ} (e : Diagram m) (positive : Bool) (p q : Fin m) :
                                    ((!positive, p), positive, q) ∈ e.portRelation ↔ (p, q) ∈ e.through positive

                                    The rectangular port edges belonging to a signed recurrent class.

                                    Equations
                                    Instances For

                                      Initial traversal of the outer context, including recurrence closure.

                                      Equations
                                      Instances For

                                        Final traversal of the outer context, including recurrence closure.

                                        Equations
                                        Instances For

                                          Traversals with one designated occurrence of a recurrent rectangle in the middle factor.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

                                            Target classes whose original traversals can use a rectangle from the fixed set J.

                                            Equations
                                            Instances For

                                              The product of boundary diagrams is associative.

                                              theorem Complexity.FiniteAutomaton.Complementation.Internal.Diagram.context_through_iff {m : ℕ} (u e v : Diagram m) (positive : Bool) {p q : Fin m} :
                                              (p, q) ∈ ((u.comp e).comp v).through positive ↔ ∃ (a : Fin m) (b : Fin m), ((p, a) ∈ if positive = true then u.forward else v.backward) ∧ ((!positive, a), positive, b) ∈ e.feedback u.right v.left ∧ (b, q) ∈ if positive = true then v.forward else u.backward
                                              theorem Complexity.FiniteAutomaton.Complementation.Internal.Diagram.context_surviving {m : ℕ} (d u e v : Diagram m) (positive : Bool) :
                                              d.surviving ((u.comp e).comp v) positive = ((d.contextEntry u v positive).comp (e.feedback u.right v.left)).comp (d.contextExit u v positive)
                                              @[instance_reducible]
                                              Equations
                                              • One or more equations did not get rendered due to their size.