Reconstructing the fixed power from a detected pair #
A detected pair of records determines f^[T] x (reconstruct_spec). If the prefix state at time
d is a checkpoint, the checkpoint's payload is f^[T - K] of it, and K - d further steps of
the payload give f^[T] x; the circuit computes all of the payload's first K steps and selects
one (hitValue). If the prefix repeats between times i < j, the state at the time in [i, j)
congruent to T is selected from the prefix (repeatedValue). All branches are total, also on
pairs that a detector never produces.
Main definitions #
Cslib.Circuits.Boolean.Iteration.reconstruct: the state determined by a pair of records.
Main results #
Cslib.Circuits.Boolean.Iteration.reconstruct_spec: a witness pair determinesf^[T] x.Cslib.Circuits.Boolean.Iteration.synthesis_reconstruct: its gate count.
References #
- Adapted from lean/Proofs/{Decoder,DecoderCircuits,Reconstruction}.lean in S. Schlesinger, Square-root circuit bounds for iterated functions.
theorem Cslib.Circuits.Boolean.Iteration.reconstruct_spec {n w M : ℕ} (f : BitString n → BitString n) (T K : ℕ) (checkpoints : Fin M → BitString n) (x : BitString n) (a b : Record n w) (hK : K < 2 ^ w) (hT : K ≤ T) (h : Record.Witness f T K checkpoints x a b) :
A witness pair determines the state at time T.
Gate counts #
def Cslib.Circuits.Boolean.Iteration.prefixWires {n : ℕ} (f : BitString n → BitString n) (K : ℕ) :
Set (BooleanFunction n)
The prefix states up to time K.
Instances For
theorem Cslib.Circuits.Boolean.Iteration.synthesis_repeatedValue {n w : ℕ} (s : Set (BooleanFunction n)) (f : BitString n → BitString n) (T K : ℕ) (lo hi : BitString n → BitVec w) (hlo : ∀ (i : Fin w), (fun (x : BitString n) => (lo x).getLsbD ↑i) ∈ s) (hhi : ∀ (i : Fin w), (fun (x : BitString n) => (hi x).getLsbD ↑i) ∈ s) (hp : prefixWires f K ⊆ s) (hc : ∀ (b : Bool), (fun (x : BitString n) => b) ∈ s) :
theorem Cslib.Circuits.Boolean.Iteration.synthesis_hitValue {n w a : ℕ} (s : Set (BooleanFunction a)) (c : Circuit signature n n) (K : ℕ) (index : BitString a → BitVec w) (payload : BitString a → BitString n) (hi : ∀ (i : Fin w), (fun (x : BitString a) => (index x).getLsbD ↑i) ∈ s) (hp : wires payload ⊆ s) (hc : ∀ (b : Bool), (fun (x : BitString a) => b) ∈ s) :
theorem Cslib.Circuits.Boolean.Iteration.synthesis_reconstruct {n w : ℕ} (s : Set (BooleanFunction n)) (c : Circuit signature n n) (T K : ℕ) (a b : BitString n → Record n w) (ha : Record.wireSet a ⊆ s) (hb : Record.wireSet b ⊆ s) (hp : prefixWires (c.eval interpretation) K ⊆ s) (hc : ∀ (b : Bool), (fun (x : BitString n) => b) ∈ s) :
The reconstruction circuit: two payload orbits, two residue branches and their selection.