Streaming charges fit FixedPrime.timeBound #
Each record visit uses 40 * (n * D m) + 66 instructions and the heap reset uses one more.
Executing construction and consumption in a single loop fits within the conservative
FixedPrime.timeBound envelope, including the final halt. Product and global failure-scan terms
are unchanged.
theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.streamingCharge_le_timeBound {m n g p : ℕ} (hn : 0 < n) (values : List ℤ) (initial a : WordRAM.Data 64) (hp : p ≠ 0) (hout : Instances.Output n (MatrixMultiplication.Schonhage.D m) g p (fun (q : ℕ) => values.getD q 0) initial a) :
have V := fun (q : ℕ) => values.getD q 0;
have wAB := fun (u v : Fin n) => V (Matrix.pairIndex (u, v));
have wBC := fun (u c : Fin n) => V (n * n + Matrix.pairIndex (u, c));
have wAC := fun (u c : Fin n) => V (2 * (n * n) + Matrix.pairIndex (u, c));
Catalogue.cost n (MatrixMultiplication.Schonhage.D m) p + 26 + (∑ idx ∈ ExactTriangle.instanceIndices wAB (MatrixMultiplication.Schonhage.D m) g p,
(FixedPrime.recordBase hn V a.mem idx + (40 * (n * MatrixMultiplication.Schonhage.D m) + 67)) + (42 * ExactTriangle.pieceSize (MatrixMultiplication.Schonhage.D m) g + 28) * (ExactTriangle.falsePositiveCount wAB wBC wAC p + 1) + 7) + 1 ≤ FixedPrime.timeBound hn g p values a.mem
Charge the catalogue/setup prefix, all streaming iterations, controller overhead and final
halt within FixedPrime.timeBound. No extra successful scan is reserved per instance.