Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.FixedPrime.Indexing

The actual occupied ordinals name the existing finite instances #

The producer's real counter supplies the range, and its existing dependent-sum readback supplies the unique residue/chunk/piece for each ordinal. These are consequences of output, not a second enumeration or a list supplied to the native controller.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.FixedPrime.occupied_index_unique {n D g p i : ℕ} (values : ℕ → ℤ) {initial a : WordRAM.Data 64} (h : Instances.Output n D g p values initial a) (hD : 16 ≤ D) (hDn : D ≤ n) (hg : 1 ≤ g) (hp : p ≠ 0) (hi : i < a.regs Instances.produced) :

Every occupied runtime ordinal has exactly one existing finite meaning.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.FixedPrime.exists_occupied_order {n D g p : ℕ} (values : ℕ → ℤ) {initial a : WordRAM.Data 64} (h : Instances.Output n D g p values initial a) (hD : 16 ≤ D) (hDn : D ≤ n) (hg : 1 ≤ g) (hp : p ≠ 0) :
∃ (f : Fin (a.regs Instances.produced) → ExactTriangle.InstanceIndex p), Function.Injective f ∧ (∀ (i : Fin (a.regs Instances.produced)), f i ∈ ExactTriangle.instanceIndices (fun (u v : Fin n) => values (Matrix.pairIndex (u, v))) D g p ∧ RecordProduct.recordOrdinal n D g p values (f i) = ↑i) ∧ ∀ idx ∈ ExactTriangle.instanceIndices (fun (u v : Fin n) => values (Matrix.pairIndex (u, v))) D g p, ∃ (i : Fin (a.regs Instances.produced)), f i = idx

The actual occupied range enumerates every existing instance exactly once. This is a proof-side interpretation of the native ordinal, not a table consumed by the program.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.FixedPrime.decodedQueries_eq_of_eqOn {n q Q heap : ℕ} (hn : 0 < n) (x y : ℕ → ℕ) (h : Set.EqOn x y (Set.Iio heap)) (hspan : q + 2 * Q ≤ heap) :

Original interleaved query readback survives changes outside its protected span.