One-way-liveness proof: PathNFA #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Combinatorics/Automata/PathNFA.lean
Module and namespace names, imports, and formatting are adapted to complexitylib.
The machine definitions are shared through Models.FiniteAutomaton.Defs.
A nondeterministic automaton on an arbitrary state type.
- initial : Q
The initial control state.
- accepting : Set Q
The accepting control states.
The next control states and head moves for each scanned symbol.
- left_boundary (q q' : Q) : (q', Move.left) ∉ self.transition q Symbol.left
- right_boundary (q q' : Q) : (q', Move.right) ∉ self.transition q Symbol.right
Instances For
One nondeterministic transition on the scanned input symbol.
Equations
- M.Step w c c' = ∃ (d : Complexity.FiniteAutomaton.Move), (c'.2, d) ∈ M.transition c.2 (Complexity.FiniteAutomaton.scanned w c.1) ∧ d.Rel ↑c.1 ↑c'.1
Instances For
Existence of a finite run reaching an accepting control state.
Equations
Instances For
Number the states using an equivalence, preserving transitions and endmarkers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
none is the initial state. Boolean states are accept and reject.
Equations
Instances For
A path state recording the current relation-product endpoint.
Equations
Instances For
The distinguished accepting state of the relation-product automaton.
Equations
Instances For
Choose a start vertex, follow relation edges, and accept at the right endmarker.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.FiniteAutomaton.PathNFA.rules (some (Sum.inl val)) Complexity.FiniteAutomaton.Symbol.right = {(Complexity.FiniteAutomaton.PathNFA.accept, Complexity.FiniteAutomaton.Move.stay)}
- Complexity.FiniteAutomaton.PathNFA.rules x✝¹ x✝ = ∅
Instances For
The one-way endmarker automaton for nonempty relation products.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The accumulated product on every prefix reached by a path state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The explicit path automaton has h+3 states, including the unused rejector. It accepts only after at least two transitions, so both conventions agree.