Initialized halting caller-safe box fixed-prime computation #
The same final state witnesses the actual initialized prefix, halt, verdict, original coordinates and global failed-scan accounting. Fourteen real header/pointer instructions precede the complete caller program, and the final halt is charged. This remains a fixed-prime component with explicit thin geometry, not parameter/prime selection or the 3SUM endpoint.
theorem Cslib.Algorithms.WordRAM.ExactTriangle.CallableFixedPrime.entry_endpoint {m n g p : ℕ} (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) :
have V := fun (q : ℕ) => values.getD q 0;
have wAB := fun (u v : Fin n) => V (Matrix.pairIndex (u, v));
have wBC := fun (u v : Fin n) => V (n * n + Matrix.pairIndex (u, v));
have wAC := fun (u v : Fin n) => V (2 * (n * n) + Matrix.pairIndex (u, v));
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 ∧ WordRAM.FlatEndpoint entryProgram Reg.found
(fun (x : Unit) => inputWidth n (MatrixMultiplication.Schonhage.D m) g p values)
(fun (x : Unit) => prefixBound n (MatrixMultiplication.Schonhage.D m) g p values)
(fun (x : Unit) => PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)
(fun (x : Unit) => 14 + timeBound hn g p values a.mem) fun (x : Unit) (y : WordRAM.Data 640) =>
(y.regs Reg.found = 0 ∨ y.regs Reg.found = 1) ∧ y.regs Reg.scans ≤ ExactTriangle.falsePositiveCount wAB wBC wAC p + y.regs Reg.found ∧ (y.regs Reg.found = 1 ↔ ExactTriangle.HasZeroTriangle wAB wBC wAC) ∧ (y.regs Reg.found = 1 →
∃ (u : Fin n) (v : Fin n) (c : Fin n),
y.regs Reg.witnessA = ↑u ∧ y.regs Reg.witnessB = ↑v ∧ y.regs Reg.witnessC = ↑c ∧ ExactTriangle.weightSum wAB wBC wAC u v c = 0) ∧ (∀ (q : ℕ),
q < workspaceBase n ∨ workspaceBase n + windowSize n (MatrixMultiplication.Schonhage.D m) g p (rawTotal n values) ≤ q →
y.mem q = (WordRAM.Data.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)).mem
q) ∧ ∀ (j : Fin 640), ↑j < 160 → y.regs j = 0
Minimum-width FlatEndpoint certificate for the initialized callable fixed-prime solver.
theorem Cslib.Algorithms.WordRAM.ExactTriangle.CallableFixedPrime.runs_input {W m n g p : ℕ} (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) (hW : inputWidth n (MatrixMultiplication.Schonhage.D m) g p values ≤ W) :
have V := fun (q : ℕ) => values.getD q 0;
have wAB := fun (u v : Fin n) => V (Matrix.pairIndex (u, v));
have wBC := fun (u v : Fin n) => V (n * n + Matrix.pairIndex (u, v));
have wAC := fun (u v : Fin n) => V (2 * (n * n) + Matrix.pairIndex (u, v));
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 640) (t : ℕ),
t + 1 ≤ timeBound hn g p values a.mem + 15 ∧ WordRAM.Runs W (entryProgram.program Reg.found)
(WordRAM.State.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values))
{ pc := entryProgram.size, data := y } t ∧ WordRAM.Executes W (entryProgram.program Reg.found)
(WordRAM.State.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values))
(y.regs Reg.found) (t + 1) ∧ WordRAM.Data.Bounded W y ∧ (y.regs Reg.found = 0 ∨ y.regs Reg.found = 1) ∧ y.regs Reg.scans ≤ ExactTriangle.falsePositiveCount wAB wBC wAC p + y.regs Reg.found ∧ (y.regs Reg.found = 1 ↔ ExactTriangle.HasZeroTriangle wAB wBC wAC) ∧ (y.regs Reg.found = 1 →
∃ (u : Fin n) (v : Fin n) (c : Fin n),
y.regs Reg.witnessA = ↑u ∧ y.regs Reg.witnessB = ↑v ∧ y.regs Reg.witnessC = ↑c ∧ ExactTriangle.weightSum wAB wBC wAC u v c = 0) ∧ (∀ (q : ℕ),
q < workspaceBase n ∨ workspaceBase n + windowSize n (MatrixMultiplication.Schonhage.D m) g p (rawTotal n values) ≤ q →
y.mem q = (WordRAM.Data.init
(PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)).mem
q) ∧ ∀ (j : Fin 640), ↑j < 160 → y.regs j = 0
Fully initialized same-state prefix and halt. The width guarantee also establishes original input fit; no producer state, prepared catalogue, layout, solver or run law is an input.