Bit-vector records and fixed dictionaries for compressed-forest navigation #
This module encodes the subtree interval labels (low x, high x) and the edge-anchor records
(a, low a, high a, depthWord f a) of a compressed checkpoint forest as fixed-width bit strings,
wraps synthesis_lookupOr into synthesis_fixed_dictionary returning hit flags and value records,
and packages the nonconstructive forest tables (ForestCircuitTables) needed by the reachability
circuit.
Main definitions #
Cslib.Circuits.Boolean.Iteration.forestLabelWord: packs(low x, high x)as two(n + 1)-bit words.Cslib.Circuits.Boolean.Iteration.forestAnchorWord: packs(x, forestLabelWord low high x, depthWord f x).Cslib.Circuits.Boolean.Iteration.dictionaryCost: gate count of a shared fixed-dictionary lookup.Cslib.Circuits.Boolean.Iteration.ForestCircuitTables: combined mark and compressed-edge tables for a functional graph onBitString n.
Main results #
Cslib.Circuits.Boolean.Iteration.forest_label_interval: interval containment on unpacked(n + 1)-bit words matcheslow y ≤ low x ∧ low x ≤ high y.Cslib.Circuits.Boolean.Iteration.synthesis_fixed_dictionary: synthesizes hit flags and value records forQqueries into anM-entry dictionary.Cslib.Circuits.Boolean.Iteration.exists_forest_circuit_tables: existence ofForestCircuitTables f Lfor0 < L.
References #
- Adapted from lean/Proofs/ForestCircuitRecords.lean in S. Schlesinger, Square-root circuit bounds for iterated functions.
Word-level interval containment on unpacked (n + 1)-bit words matches rank containment.
Gate bound for a shared fixed-dictionary lookup with M keys and Q queries of v-bit
records.
Instances For
Shared lookup for a fixed injective dictionary, returning hit flags and v-bit records.
Combined checkpoint-mark and compressed-edge tables for a functional graph on BitString n.
Underlying checkpoint set.
Every
L-step prefix either repeats or hitsHwithin2 * Lsteps.Lower subtree rank label.
Upper subtree rank label.
- interval (x y : BitString n) : self.low y ≤ self.low x ∧ self.low x ≤ self.high y ↔ ∃ t ≤ FunctionalGraph.transientDepth f x, f^[t] x = y
Subtree interval containment characterizes ancestry before cycle entry.
- markCount : ℕ
Number of refined forest marks.
Enumeration of the refined forest marks.
- marks_injective : Function.Injective self.marks
Refined marks are pairwise distinct.
At most
2 * (2 ^ n / L)refined marks exist.- edgeTable : FunctionalGraph.ForestEdgeTable f self.H L
Compressed-edge table for non-root marks.
At most
2 * (2 ^ n / L)compressed edges exist.
Instances For
Existence of ForestCircuitTables f L for any 0 < L.