Documentation

Complexitylib.Models.FiniteAutomaton.Complementation.Internal.Tape

Two-way complementation: tape #

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

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

theorem Complexity.FiniteAutomaton.Complementation.Internal.chainSymbol_getElem {Sigma : Type u_1} {m : ℕ} (w : List Sigma) (last : Sigma) (c : ChainNode m w.length) :
chainSymbol w last c = (w ++ [last])[c.position]

Chain symbols agree with ordinary zero-based lookup of the nonempty symbol list.

Lookup of the explicitly marked list agrees with the automaton's tape lookup.

Convert the recursively joined cells and one terminal exit into tape coordinates.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Complexity.FiniteAutomaton.Complementation.Internal.relStar_equiv_iff {V : Type u_1} {W : Type u_2} (e : V ≃ W) (R : SetRel V V) (S : SetRel W W) (h : ∀ (x y : V), (e x, e y) ∈ S ↔ (x, y) ∈ R) (x y : V) :
    (e x, e y) ∈ relStar S ↔ (x, y) ∈ relStar R

    A graph equivalence transports finite paths in both directions.

    A terminal block with no outgoing edges is reached by an internal path and one exit.

    theorem Complexity.FiniteAutomaton.Complementation.Internal.chainSymbol_position {Sigma : Type u_1} {m : ℕ} (w : List Sigma) (last : Sigma) (c d : ChainNode m w.length) (hp : c.position = d.position) :
    chainSymbol w last c = chainSymbol w last d

    A cell's scanned symbol depends only on its position.

    def Complexity.FiniteAutomaton.Complementation.Internal.chainStep {Sigma : Type u_1} {m : ℕ} (moves : Sigma → Fin 3 → SetRel (Fin m) (Fin m)) (w : List Sigma) (last : Sigma) :
    SetRel (Fin m × Fin (w.length + 2)) (Fin m × Fin (w.length + 2))

    Local moves on the bounded tape, with a final terminal position beyond the last cell.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Complexity.FiniteAutomaton.Complementation.Internal.chainStep_exitEquiv {Sigma : Type u_1} {m : ℕ} (moves : Sigma → Fin 3 → SetRel (Fin m) (Fin m)) (w : List Sigma) (last : Sigma) (x y : ChainNode m w.length ⊕ Fin m) :

      The joined network with terminal exits has exactly the bounded tape's local edges.

      theorem Complexity.FiniteAutomaton.Complementation.Internal.chainStep_recognition {Sigma : Type u_1} {m : ℕ} (moves : Sigma → Fin 3 → SetRel (Fin m) (Fin m)) (w : List Sigma) (last : Sigma) (q r : Fin m) :
      ((q, ⟨0, ⋯⟩), r, ⟨w.length + 1, ⋯⟩) ∈ relStar (chainStep moves w last) ↔ (q, r) ∈ (chainNetwork moves w last).summary.forward

      The designated forward edge of a diagram product is exactly a successful tape run.