Unrestricted depth-three lower bound: model #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/DepthThree/Model.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical proofs are retained.
Boolean assignments to a set of input variables.
Equations
Instances For
An input variable paired with the value making its literal true.
Equations
Instances For
A signed input literal or a Boolean constant.
Equations
Instances For
An OR gate represented by a list of signed literals and constants.
Equations
Instances For
Evaluate a literal or constant gate input.
Equations
Instances For
An OR-AND-OR circuit with arbitrary fan-in, constants, and shared lower gates.
- bottomCount : ℕ
The number of bottom OR gates.
- middleCount : ℕ
The number of middle AND gates.
- bottom : Fin self.bottomCount → RawClause V
The literals and constants feeding each bottom OR gate.
- middle : Fin self.middleCount → Finset (Fin self.bottomCount)
The bottom gates feeding each middle AND gate.
- top : Finset (Fin self.middleCount)
The middle gates feeding the top OR gate.
Instances For
Count every bottom and middle gate and the single top OR gate.
Equations
- C.gateCount = C.bottomCount + C.middleCount + 1
Instances For
Evaluate one middle AND gate on its selected bottom gates.
Instances For
Apply a head movement to a Mathlib bilateral tape.
Equations
Instances For
A control state and a tape for each tape index.
- q : Q
The finite control state.
- tapes : K → Turing.Tape Γ
The bilateral tape contents and head positions.
Instances For
Read all heads, then halt or choose a state, writes, and head moves.
Equations
- Complexity.DepthThreeLowerBound.MultiTapeCode K Γ Q = (Q → (K → Γ) → Option (Q × (K → Γ) × (K → Complexity.DepthThreeLowerBound.HeadMove)))
Instances For
Write the scanned cells and then move every tape head.
Equations
- Complexity.DepthThreeLowerBound.multiTapeUpdate c q writes moves = { q := q, tapes := fun (k : K) => (moves k).apply (Turing.Tape.write (writes k) (c.tapes k)) }
Instances For
Execute one transition of a multitape program.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A multitape machine with finite control, alphabet, and tape set. The input occupies one designated read-write tape; the default symbol is blank.
- K : Type
Tape indices.
- tapeDecidableEq : DecidableEq self.K
- inputTape : self.K
The tape initially containing the input word.
- Γ : Type
The tape alphabet; its default value is blank.
- Q : Type
Control states.
- initialState : self.Q
The initial control state.
Encode input bits as tape symbols.
- input_injective : Function.Injective self.inputSymbol
- code : MultiTapeCode self.K self.Γ self.Q
The partial transition function;
nonehalts. The Boolean verdict read from a halting control state.
Instances For
Configurations of the bundled finite multitape machine.
Instances For
The bundled machine's partial transition function.
Equations
Instances For
Initialize the input tape at its first bit and all other tapes blank.
Equations
- M.init input = { q := M.initialState, tapes := fun (k : M.K) => if k = M.inputTape then Turing.Tape.mk₁ (List.map M.inputSymbol input) else Turing.Tape.mk₁ [] }
Instances For
Within the stated time, reach a halting state with the specified Boolean verdict.
Equations
- One or more equations did not get rendered due to their size.