Sparse-counter reachability, first hitting times, and visit schedules #
Two cycle labels suffice for every pair query (x, y) on a permutation. Because both phases are
already reduced modulo the cycle length, modular subtraction costs only linearly many gates
(subtractResidues), so full visit-schedule records and first hitting times for sparsely edited
counter permutations have circuits of size O((n + 1) * (r + 1)).
Main definitions #
cycleLabelDistance,cycleLabelVisits: phase distance and visit schedule from two cycle labels.
Main results #
cycleLabelVisits_spec,synthesis_cycleLabelVisits: correctness and linear gate bound for combining two cycle labels into a visit schedule.cycle_label_visit_circuit: visit-schedule circuit from any cycle-label circuit.sparse_counter_visit_circuit,sparse_counter_visit_schedule,sparse_counter_hitting_time:O((n + 1) * (r + 1))circuits for visit-schedule records and first hitting times.sparse_coordinate_visit_schedule: coordinate transfer charging only two forward encodings.
References #
- Adapted from lean/Proofs/SparseNavigation.lean at revision
c4cfa198of [S. Schlesinger, Square-root circuit bounds for iterated functions] [Sch26f].
Phase difference from label x to label y modulo the cycle length of x.
Instances For
A flag, first time, and return period in the visit-schedule format.
Instances For
For an injective word map f, the visit schedule constructed from the cycle labels of x and
y contains time t if and only if f^[t] x = y.
Querying two already computed labels uses only linear arithmetic and wiring.
Any cheap cycle-label circuit for a permutation gives cheap navigation.
Every permutation f of BitVec n has a circuit of size at most 1200 * (n + 3) * (r + 1)
computing the visit schedule between its two n-bit inputs from their cycle labels, where r is
the number of disagreements of f with the unit increment.
The sparse bound covers the complete visit set and its bounded-count interpretation.
The existence flag and first hitting time have the same sparse circuit bound.
Pair queries need the forward coordinate map twice, but no inverse circuit.