Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.Source

Complete box-backed fixed-prime execution with dirty source memory #

The actual catalogue/setup prefix feeds the one-slot loop on arbitrary old registers and dirty remaining memory. A derived all-record reference supplies finite mathematical indices and the conservative time envelope. It describes no reused physical slot and is not an algorithm input. Every constructed slot is read through its smaller physical boundary.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.exec_source {w m n g p A : ℕ} (values : List ℤ) (hlen : values.length = 3 * (n * n)) (hD : 16 ≤ MatrixMultiplication.Schonhage.D m) (hg : 1 ≤ g) (hp : p ∈ (MatrixMultiplication.Schonhage.D m).sqrtPrimeWindow) (hN : MatrixMultiplication.Schonhage.D m ^ 18 ≤ n) (hv : ∀ z ∈ values, z.natAbs ≤ A) (hW : FixedPrime.admissionWidth n (MatrixMultiplication.Schonhage.D m) g p A ≤ w + 2) (initial : WordRAM.Data 416) (hinput : ∀ q < 5 + 3 * (n * n), initial.mem q = (WordRAM.Data.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)).mem q) :
have V := fun (q : ℕ) => values.getD q 0; have wAB := fun (u v : Fin n) => V (Matrix.pairIndex (u, v)); have wBC := fun (b c : Fin n) => V (n * n + Matrix.pairIndex (b, c)); have wAC := fun (u c : Fin n) => V (2 * (n * n) + Matrix.pairIndex (u, c)); have hn := ⋯; ∃ (a : WordRAM.Data 64), Instances.Output n (MatrixMultiplication.Schonhage.D m) g p V (WordRAM.Data.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)) a ∧ ∃ (y : WordRAM.Data 416), WordRAM.ExecWithin (w + 2) program initial y (FixedPrime.timeBound hn g p values a.mem - 1) ∧ (y.regs FixedPrime.Reg.found = 0 ∨ y.regs FixedPrime.Reg.found = 1) ∧ y.regs FixedPrime.Reg.scans ≤ ExactTriangle.falsePositiveCount wAB wBC wAC p + y.regs FixedPrime.Reg.found ∧ (y.regs FixedPrime.Reg.found = 1 ↔ ExactTriangle.HasZeroTriangle wAB wBC wAC) ∧ (y.regs FixedPrime.Reg.found = 1 → y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessA) < n ∧ y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessB) < n ∧ y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessC) < n ∧ V (y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessA) * n + y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessB)) + V (n * n + (y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessB) * n + y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessC))) + V (2 * (n * n) + (y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessA) * n + y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessC))) = 0) ∧ ∀ (q : ℕ), q < 5 + 3 * (n * n) ∨ a.regs Instances.heap + MatrixMultiplication.Schonhage.CallableProduct.windowSize n (n * n) ≤ q → y.mem q = initial.mem q

Execute the actual stream from original input words and arbitrary dirty remaining data. The standalone output is only a derived mathematical reference for existing finite charges; the native execution runs the catalogue/setup prefix and then the single-slot loop. The allowance excludes one instruction reserved for the final halt.