Initialized halting one-slot ExactTriangle solver #
The real catalogue/setup prefix and streaming loop decide the original signed input. The halt and prefix end in the same actual state. The existing all-record state appears only as a derived mathematical index for the unchanged conservative time envelope.
theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.runs_input {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) :
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 := ⋯;
WordRAM.InputFits W (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values) ∧ ∃ (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) (t : ℕ),
t + 1 ≤ FixedPrime.timeBound hn g p values a.mem ∧ WordRAM.Runs W (program.program FixedPrime.Reg.found)
(WordRAM.State.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values))
{ pc := program.size, data := y } t ∧ WordRAM.Executes W (program.program FixedPrime.Reg.found)
(WordRAM.State.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values))
(y.regs FixedPrime.Reg.found) (t + 1) ∧ WordRAM.Data.Bounded W y ∧ (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 →
∃ (u : Fin n) (v : Fin n) (c : Fin n),
y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessA) = ↑u ∧ y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessB) = ↑v ∧ y.regs (FixedPrime.recordBank RecordWitness.Reg.witnessC) = ↑c ∧ ExactTriangle.weightSum wAB wBC wAC u v c = 0) ∧ ∀ (u : ℕ),
u < 5 + 3 * (n * n) ∨ a.regs Instances.heap + MatrixMultiplication.Schonhage.CallableProduct.windowSize n (n * n) ≤ u →
y.mem u = (WordRAM.Data.init
(PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)).mem
u
Actual initialized streaming execution, original-coordinate witness, exact negative exhaustion and one global failure-scan allowance, including the charged final halt.