Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.Readback

Immutable catalogue readback for streaming #

A genuine standalone output may index the existing mathematical accounting. Only its immutable prefix is related to current memory here; no record or matrix block is transferred. The slot writer itself requires just the current residue words and selected descriptor.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.catalogue_readback {n D g p : ℕ} (values : ℕ → ℤ) (initial a x : WordRAM.Data 64) (hout : Instances.Output n D g p values initial a) (hp : p ≠ 0) (cursor : Cursor n D g p values x) (hmem : Set.EqOn x.mem a.mem (Set.Iio (a.regs Instances.output))) (idx : ExactTriangle.InstanceIndex p) (hidx : idx ∈ ExactTriangle.instanceIndices (fun (u v : Fin n) => values (Matrix.pairIndex (u, v))) D g p) :
(∀ k < 3 * (n * n), x.mem (5 + 3 * (n * n) + k) = (values k % ↑p).toNat) ∧ have C := fun (rho : ℕ) => Nat.count (fun (k : ℕ) => (values k % ↑p).toNat = rho) (n * n); have chunk := ChunkCatalogue.before C (ExactTriangle.queryCap n D) ↑idx.residue + idx.chunk; x.mem (chunk * 3 + x.regs Instances.descriptors) = ↑idx.residue ∧ x.mem (chunk * 3 + x.regs Instances.descriptors + 1) = RecordProduct.recordQueries n D p idx ∧ x.mem (chunk * 3 + x.regs Instances.descriptors + 2) = RecordProduct.recordQueryCount n D p values idx

Retain just the actual residue arrays and selected catalogue descriptor below the slot.