Unrestricted depth-three lower bound: tape unary #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/DepthThree/TapeUnary.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical proofs are retained.
Represent a natural number by a unary word of true bits.
Equations
Instances For
theorem
Complexity.DepthThreeLowerBound.TapeUnary.prepend_home
(bits : List Bool)
(b : Bool)
:
Turing.Tape.write (cleanAtom TapeAtom.home)
(Turing.Tape.move Turing.Dir.left (Turing.Tape.write (rawInputSymbol b) (wordTape bits))) = wordTape (b :: bits)
theorem
Complexity.DepthThreeLowerBound.TapeUnary.remove_home
(bits : List Bool)
(b : Bool)
:
Turing.Tape.write (cleanAtom TapeAtom.home)
(Turing.Tape.move Turing.Dir.right (Turing.Tape.write blankSymbol (wordTape (b :: bits)))) = wordTape bits
@[instance_reducible]
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
Transition function for the inc stage of the unary routine.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.DepthThreeLowerBound.TapeUnary.incProgram r Complexity.DepthThreeLowerBound.TapeUnary.IncState.done x✝ = none
Instances For
theorem
Complexity.DepthThreeLowerBound.TapeUnary.increment_word
(r : TapeRegister)
(T : TapeTapes)
(bits : List Bool)
(hT : T r = wordTape bits)
:
RunsIn (incProgram r).step (TapeMultiProgram.cfg IncState.start T)
(TapeMultiProgram.cfg IncState.done (Function.update T r (wordTape (true :: bits)))) 2
theorem
Complexity.DepthThreeLowerBound.TapeUnary.increment
(r : TapeRegister)
(T : TapeTapes)
(n : ℕ)
(hT : T r = counterTape n)
:
RunsIn (incProgram r).step (TapeMultiProgram.cfg IncState.start T)
(TapeMultiProgram.cfg IncState.done (Function.update T r (counterTape (n + 1)))) 2
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Transition function for the dec stage of the unary routine.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.DepthThreeLowerBound.TapeUnary.decProgram r (Complexity.DepthThreeLowerBound.TapeUnary.DecState.done wasPositive) x✝ = none
Instances For
theorem
Complexity.DepthThreeLowerBound.TapeUnary.decrement_empty
(r : TapeRegister)
(T : TapeTapes)
(hT : T r = wordTape [])
:
RunsIn (decProgram r).step (TapeMultiProgram.cfg DecState.start T) (TapeMultiProgram.cfg (DecState.done false) T) 2
theorem
Complexity.DepthThreeLowerBound.TapeUnary.decrement_cons
(r : TapeRegister)
(T : TapeTapes)
(bits : List Bool)
(b : Bool)
(hT : T r = wordTape (b :: bits))
:
RunsIn (decProgram r).step (TapeMultiProgram.cfg DecState.start T)
(TapeMultiProgram.cfg (DecState.done true) (Function.update T r (wordTape bits))) 4
theorem
Complexity.DepthThreeLowerBound.TapeUnary.decrement
(r : TapeRegister)
(T : TapeTapes)
(n : ℕ)
(hT : T r = counterTape n)
:
RunsIn (decProgram r).step (TapeMultiProgram.cfg DecState.start T)
(TapeMultiProgram.cfg (DecState.done (decide (0 < n))) (Function.update T r (counterTape (n - 1)))) 4