Sparse orbit coordinates from interval labels #
Each interval stores its cycle representative, cycle length, and the phase of its first state. One modular addition encodes its other states. Decoding tests the phase distance from each interval start. This proves a chart without an enumeration of payload states or an assumed constant-time table primitive.
Main definitions #
chartWidth: widened bit-vector widthn + 2for cycle lengths and phases.wordCycleLabel: canonical word-cycle coordinates.CounterIntervalChart.first,CounterIntervalChart.period,CounterIntervalChart.initialPhase,CounterIntervalChart.length,CounterIntervalChart.contains,CounterIntervalChart.offset,CounterIntervalChart.encodedRow: per-interval parameters, membership test, offset, and predicted coordinates.CounterIntervalChart.encode: select the coordinates of a containing interval.
Main results #
CounterIntervalChart.encode_spec: the selected coordinates are canonical.
References #
- Adapted from lean/Proofs/CounterChart.lean at revision
c4cfa198of [S. Schlesinger, Square-root circuit bounds for iterated functions] [Sch26f].
Numeric order chooses canonical representatives of word cycles. Kept local to charts.
Instances For
Two spare bits hold cycle lengths and sums even for a cycle of length 2^n.
Instances For
Any natural number a ≤ 2 ^ n fits without wraparound in BitVec (chartWidth n).
Canonical coordinates of a cyclic word.
Instances For
The first word of an interval.
Instances For
Cycle length of the interval, in the widened coordinate width.
Instances For
Canonical phase of the interval start.
Instances For
Number of words in an interval.
Instances For
The natural-number value of chart.period j is the cycle length of chart.first j.
The natural-number value of chart.initialPhase j is the phase of chart.first j.
The natural-number value of chart.length j is chart.stop j - chart.start j.
Test membership in the half-open numerical interval.
Instances For
chart.contains j x is true iff x.toNat lies in [chart.start j, chart.stop j).
Numerical distance from the interval start.
Instances For
Canonical coordinates predicted by one interval.
Instances For
Encode by selecting any interval containing the input.
Instances For
Encoding a word x under an injective map f produces its canonical cycle coordinates
wordCycleLabel f x.