Moving a residue into a repeated interval #
If an orbit repeats with f^[i] x = f^[j] x for i < j, the state at any time T ≥ i is the
state at the unique time in [i, j) congruent to T modulo j - i. A circuit finds that time
without division: it looks up T % (j - i) in a table indexed by the period, which depends on the
fixed exponent T only through its residues, and then adds the period while the value is below
i. At most K additions suffice when i ≤ K (liftResidue_reconstructs).
Main definitions #
Cslib.Circuits.Boolean.Iteration.liftResidue: one bounded correction of a residue.Cslib.Circuits.Boolean.Iteration.repeatWordIndex: the word computation of the time in the repeated interval.
Main results #
Cslib.Circuits.Boolean.Iteration.liftResidue_reconstructs: the corrected residue gives the state at timeT.Cslib.Circuits.Boolean.Iteration.repeatWordIndex_spec: the same for the word computation.Cslib.Circuits.Boolean.Iteration.synthesis_repeatWordIndex: its gate count does not depend onT.
References #
- Adapted from lean/Proofs/Residues.lean in S. Schlesinger, Square-root circuit bounds for iterated functions.
One bounded correction of a residue: add the period once if below the interval.
Instances For
Repeated correction preserves the residue and never passes the interval.
The word form of liftResidue.
Instances For
The word computation lies in the repeated interval and selects the state at time T.
One word correction: an addition, a comparison and a multiplexer.
Iterated word corrections, sharing all intermediate words.
A residue table costs only its word width and entry count, whatever T is.
The repeated-interval index circuit has no dependence on the bit length of T.