Rational hitting lists: input adapter #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/RationalHitting/InputAdapter.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
The fixed four-symbol alphabet of the tape adapter.
Equations
Instances For
The ten control states used by the tape adapter.
Equations
Instances For
Finite auxiliary storage used by the tape adapter.
Equations
Instances For
A configuration of the tape adapter.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A tape-adapter instruction with finite auxiliary storage.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Jump to the specified adapter control state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Move the tape head and jump to the specified state.
Equations
Instances For
Move left and branch according to whether the delimiter was reached.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Write a finite encoded block before continuing with the next instruction.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.RationalHitting.TMTime.InputAdapter.writeBits [] x✝ = x✝
Instances For
The fixed finite control map of the tape adapter.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.RationalHitting.TMTime.InputAdapter.machine code 4 = Complexity.RationalHitting.TMTime.InputAdapter.leftTo 4 5
- Complexity.RationalHitting.TMTime.InputAdapter.machine code 5 = Complexity.RationalHitting.TMTime.InputAdapter.leftTo 5 1
- Complexity.RationalHitting.TMTime.InputAdapter.machine code 8 = Complexity.RationalHitting.TMTime.InputAdapter.leftTo 8 9
Instances For
Assemble a configuration from the control state and the two tape halves.
Equations
- Complexity.RationalHitting.TMTime.InputAdapter.state q f b L R = { l := some q, var := (f, b), Tape := Turing.Tape.mk₂ L R }
Instances For
Encode all literal input bits, using a distinguished first-block marker.
Equations
- Complexity.RationalHitting.TMTime.InputAdapter.emit code x✝ [] = []
- Complexity.RationalHitting.TMTime.InputAdapter.emit code x✝ (x_2 :: xs) = code x✝ x_2 ++ Complexity.RationalHitting.TMTime.InputAdapter.emit code false xs
Instances For
Exact recursive step bound for the adapter's scanning loop.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.RationalHitting.TMTime.InputAdapter.cost code x✝² [] x✝¹ x✝ = 0
Instances For
Literal Fin4 raw input is physically erased; no hidden encoded-input precondition is used. The macrotransition charge is quadratic; TM1 compilation adds a fixed multiplicative constant for this one fixed adapter machine.
Real finite TM0 raw-input adapter, at quadratic bit cost, reaching exactly Mathlib's initial tape for the binary stack simulator, not an assumed encoding.