Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.RecordProduct.QuerySpan

Queries precede the reusable instance slot #

An occupied chunk's complete interleaved query occurrence span lies below the first record, independently of how many records have been materialized. Future pieces may reuse the raw matrix slot while retaining these coordinates and the original signed matrices.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.RecordProduct.query_end_le_output {n D g p : ℕ} (values : ℕ → ℤ) (hp : p ≠ 0) (hD : 1 ≤ D) (hDn : D ≤ n) (idx : ExactTriangle.InstanceIndex p) (hidx : idx ∈ ExactTriangle.instanceIndices (fun (a b : Fin n) => values (Matrix.pairIndex (a, b))) D g p) :
have N := n * n; have C := fun (rho : ℕ) => Nat.count (fun (q : ℕ) => (values q % ↑p).toNat = rho) N; recordQueries n D p idx + 2 * recordQueryCount n D p values idx ≤ 5 + 6 * N + p + 2 * N * p + 3 * ChunkCatalogue.before C (ExactTriangle.queryCap n D) p

The shared query array is protected below the output slot, not merely below the end of an all-record allocation. Duplicate occurrences keep their full two-word footprint.