Unrestricted depth-three lower bound: tape hash #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/DepthThree/TapeHash.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical proofs are retained.
@[reducible, inline]
Control states of the hash routine.
Equations
Instances For
Transition function of the hash routine.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Initial control state of the hash routine.
Equations
Instances For
Terminal control state of the hash routine.
Equations
Instances For
Tape-store contents at the result stage of the hash routine.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Complexity.DepthThreeLowerBound.TapeHash.runs_hash
(σ : TapeStore)
(d r : ℕ)
(hd : σ TapeRegister.dataLength = List.replicate d true)
(hr : σ TapeRegister.ringDegree = List.replicate r true)
(ha : σ TapeRegister.indexA = [])
(hb : σ TapeRegister.indexB = [])
(hc : σ TapeRegister.indexC = [])
(hs : σ TapeRegister.scratchA = [])
(hh : σ TapeRegister.hashBits = [])
(hkey : (σ TapeRegister.keyBits).length = d + r - 1)
(hdata : (σ TapeRegister.dataBits).length = d)
:
RunsIn program.step (TapeMultiProgram.cfg start (storeTapes σ))
(TapeMultiProgram.cfg done (storeTapes (resultStore σ r))) (200 * (d + r + 1) ^ 3)
theorem
Complexity.DepthThreeLowerBound.TapeHash.runs_wordHash
(σ : TapeStore)
{d r : ℕ}
(u : BitWord (d + r - 1))
(x : BitWord d)
(hd : σ TapeRegister.dataLength = List.replicate d true)
(hr : σ TapeRegister.ringDegree = List.replicate r true)
(ha : σ TapeRegister.indexA = [])
(hb : σ TapeRegister.indexB = [])
(hc : σ TapeRegister.indexC = [])
(hs : σ TapeRegister.scratchA = [])
(hh : σ TapeRegister.hashBits = [])
(hkey : σ TapeRegister.keyBits = List.ofFn u)
(hdata : σ TapeRegister.dataBits = List.ofFn x)
:
RunsIn program.step (TapeMultiProgram.cfg start (storeTapes σ))
(TapeMultiProgram.cfg done
(storeTapes
(Function.update (Function.update σ TapeRegister.hashBits (List.ofFn (wordHash u x))) TapeRegister.indexC
(List.replicate r true))))
(200 * (d + r + 1) ^ 3)