Two-way complementation: model #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Combinatorics/TwoWayAutomata/Model.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
Reflexive transitive closure, including the empty path.
Equations
Instances For
A read-only 2NFA. The two endmarkers are Sum.inl 0 and Sum.inl 1.
Move codes 0, 1, 2 mean left, stay, right.
- initial : Q
The state in which the machine starts on the left endmarker.
- accepting : Set Q
States whose occurrence on a finite run constitutes acceptance.
Allowed next-state and move pairs, determined by the state and scanned symbol.
Instances For
One legal step: both head positions stay within the marked input.
Equations
- One or more equations did not get rendered due to their size.