Finishing trajectories with a shared checkpoint dictionary #
Several fixed-power computations can share their checkpoint table. One batched lookup answers,
for every state of every orbit prefix, whether it is a checkpoint and which state the table stores
with it (synthesis_lookupOr); the lookup sorts all queries together with the table once, using
batchOrCircuit. Each trajectory then finishes on its own: the last flagged prefix time selects
a payload, which is advanced by the remaining steps (finishHit, synthesis_finishHit), and a
trajectory without a flagged time must repeat early, where the fixed-power circuit without
checkpoints is correct (exists_repeat_power).
All gates of the native De Morgan basis, including constants, are charged; wiring and fanout are free.
Main definitions #
Cslib.Circuits.Boolean.Iteration.lookupOr: the OR of the values stored under a key.Cslib.Circuits.Boolean.Iteration.finishHit: the state reached from the last flagged hit.
Main results #
Cslib.Circuits.Boolean.Iteration.synthesis_lookupOr: one shared lookup for many queries.Cslib.Circuits.Boolean.Iteration.finishHit_correct,Cslib.Circuits.Boolean.Iteration.synthesis_finishHit: finishing one trajectory.Cslib.Circuits.Boolean.Iteration.exists_repeat_power: a fixed power on orbits that repeat early, with no checkpoints.
References #
- Adapted from lean/Proofs/{BatchLookup,BatchFinish}.lean in S. Schlesinger, Square-root circuit bounds for iterated functions.
- The lookup is
batchOrCircuit, after S. Schlesinger, Boolean circuit mass production formalization.
Shared lookup #
The bitwise OR of the values stored under key. With distinct keys this is the value stored
under key, and all-false if key is absent (lookupOr_of_eq, lookupOr_of_forall_ne).
Instances For
Shared lookup. Answering Q available queries against one hardwired table of M keys
costs one batchOrCircuit: at most 48 * (Q + M + 1) * (⌈log₂ (Q + M)⌉ + 1) ^ 2 * (k + v + 1)
gates, constants included.
Finishing one trajectory #
The state K - j steps after the payload at the last flagged prefix time j, or fallback
if no time is flagged.
Instances For
If every flagged prefix time j carries f^[T - K] (f^[j] x), and the fallback is correct
when no time is flagged, the finished state is f^[T] x.
Finishing a trajectory: selecting the last hit, advancing its payload and choosing the fallback.
Fixed powers on early repeats. The fixed-power circuit without checkpoints computes
f^[T] on every state whose orbit repeats among its first L states, for 2 L ≤ T.