Unrestricted depth-three lower bound: language bit hash updates #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/DepthThree/LanguageBitHashUpdates.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical proofs are retained.
Accumulate one row of the bit-level hash computation.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.DepthThreeLowerBound.hashUpdateRow u x i [] x✝ = x✝
Instances For
The bit contributed by one hash row at a selected output coordinate.
Equations
- Complexity.DepthThreeLowerBound.hashRowBit u x i = Complexity.DepthThreeLowerBound.xorBits (List.map (fun (j : ℕ) => u.getD (i + j) false && x.getD j false) (List.range x.length))
Instances For
Accumulate the rows of the bit-level hash computation.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.DepthThreeLowerBound.hashUpdateRows u x [] x✝ = x✝
Instances For
@[simp]
theorem
Complexity.DepthThreeLowerBound.hashUpdateRows_step
(u x : List Bool)
(i : ℕ)
(is : List ℕ)
(c : List Bool)
:
hashUpdateRows u x (i :: is) c = hashUpdateRows u x is (hashUpdateRow u x i (List.range x.length) c)
theorem
Complexity.DepthThreeLowerBound.hashUpdateRow_range'_append
(u x : List Bool)
(i s m n : ℕ)
(c : List Bool)
:
hashUpdateRow u x i (List.range' s (m + n)) c = hashUpdateRow u x i (List.range' (s + m) n) (hashUpdateRow u x i (List.range' s m) c)
theorem
Complexity.DepthThreeLowerBound.hashUpdateRow_range'_prefix
(u x : List Bool)
(i s m n : ℕ)
(c : List Bool)
(hm : m ≤ n)
:
hashUpdateRow u x i (List.range' (s + m) (n - m)) (hashUpdateRow u x i (List.range' s m) c) = hashUpdateRow u x i (List.range' s n) c
theorem
Complexity.DepthThreeLowerBound.hashUpdateRow_range'_step
(u x : List Bool)
(i s n : ℕ)
(c : List Bool)
:
hashUpdateRow u x i (List.range' s (n + 1)) c = hashUpdateRow u x i (List.range' (s + 1) n) (xorListAt c i (u.getD (i + s) false && x.getD s false))
theorem
Complexity.DepthThreeLowerBound.hashUpdateRow_range'_snoc
(u x : List Bool)
(i s n : ℕ)
(c : List Bool)
:
hashUpdateRow u x i (List.range' s (n + 1)) c = xorListAt (hashUpdateRow u x i (List.range' s n) c) i (u.getD (i + (s + n)) false && x.getD (s + n) false)
theorem
Complexity.DepthThreeLowerBound.hashUpdateRows_range'_append
(u x : List Bool)
(s m n : ℕ)
(c : List Bool)
:
hashUpdateRows u x (List.range' s (m + n)) c = hashUpdateRows u x (List.range' (s + m) n) (hashUpdateRows u x (List.range' s m) c)
theorem
Complexity.DepthThreeLowerBound.hashUpdateRows_range'_prefix
(u x : List Bool)
(s m n : ℕ)
(c : List Bool)
(hm : m ≤ n)
:
hashUpdateRows u x (List.range' (s + m) (n - m)) (hashUpdateRows u x (List.range' s m) c) = hashUpdateRows u x (List.range' s n) c
theorem
Complexity.DepthThreeLowerBound.hashUpdateRows_range'_step
(u x : List Bool)
(s n : ℕ)
(c : List Bool)
:
hashUpdateRows u x (List.range' s (n + 1)) c = hashUpdateRows u x (List.range' (s + 1) n) (hashUpdateRow u x s (List.range x.length) c)
theorem
Complexity.DepthThreeLowerBound.hashUpdateRows_range'_snoc
(u x : List Bool)
(s n : ℕ)
(c : List Bool)
:
hashUpdateRows u x (List.range' s (n + 1)) c = hashUpdateRow u x (s + n) (List.range x.length) (hashUpdateRows u x (List.range' s n) c)
theorem
Complexity.DepthThreeLowerBound.hashUpdateRow_range_succ
(u x : List Bool)
(i j : ℕ)
(c : List Bool)
:
hashUpdateRow u x i (List.range (j + 1)) c = xorListAt (hashUpdateRow u x i (List.range j) c) i (u.getD (i + j) false && x.getD j false)
theorem
Complexity.DepthThreeLowerBound.hashUpdateRows_range_succ
(u x : List Bool)
(i : ℕ)
(c : List Bool)
:
hashUpdateRows u x (List.range (i + 1)) c = hashUpdateRow u x i (List.range x.length) (hashUpdateRows u x (List.range i) c)
Compute the binary hash by successive bit-list updates.
Equations
Instances For
@[simp]