Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.RecordWitness.Flat

Actual initialized flat witness-recovery runs #

One fixed standard unsigned program starts from the original input, computes the actual first record's product and verifies its accepted pairs. The same actual state witnesses the prefix run, final charged halt, original-coordinate result, false-positive accounting and caller frame. This is a per-record endpoint; choosing parameters and the outer ET record loop remain separate.

The complete initialized standard-native program uses 400 fixed registers, at most 133120 flat instruction slots including halt, and never inspects physical word width.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.RecordWitness.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 : admissionWidth n (MatrixMultiplication.Schonhage.D m) g p A ≤ W) :
have V := fun (q : ℕ) => values.getD q 0; have wAB := fun (a b : Fin n) => V (Matrix.pairIndex (a, b)); have wBC := fun (b c : Fin n) => V (n * n + Matrix.pairIndex (b, c)); have wAC := fun (a c : Fin n) => V (2 * (n * n) + Matrix.pairIndex (a, c)); WordRAM.InputFits W (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values) ∧ ∃ (a : WordRAM.Data 64) (idx : ExactTriangle.InstanceIndex p), WordRAM.ExecWithin W Instances.program (WordRAM.Data.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)) a (RecordProduct.preparationTime n (MatrixMultiplication.Schonhage.D m) g p values - 1) ∧ Instances.Output n (MatrixMultiplication.Schonhage.D m) g p V (WordRAM.Data.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)) a ∧ idx ∈ ExactTriangle.instanceIndices wAB (MatrixMultiplication.Schonhage.D m) g p ∧ RecordProduct.recordOrdinal n (MatrixMultiplication.Schonhage.D m) g p V idx = 0 ∧ have hn := ⋯; have Q := RecordProduct.recordQueryCount n (MatrixMultiplication.Schonhage.D m) p V idx; have qs := RecordProduct.decodedQueries hn a.mem (RecordProduct.recordQueries n (MatrixMultiplication.Schonhage.D m) p idx) Q; have length := min (ExactTriangle.pieceSize (MatrixMultiplication.Schonhage.D m) g) (n - idx.piece * ExactTriangle.pieceSize (MatrixMultiplication.Schonhage.D m) g); ∃ (y : WordRAM.Data 400) (t : ℕ) (S : ℕ), t + 1 ≤ RecordProduct.preparationTime n (MatrixMultiplication.Schonhage.D m) g p values + RecordProduct.timeBound qs + 5 * (MatrixMultiplication.Schonhage.D m).sqrt + 8 * Q + (42 * length + 28) * S + 53 ∧ 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.scans = S ∧ (y.regs Reg.found = 0 ∨ y.regs Reg.found = 1) ∧ S ≤ ExactTriangle.falsePositiveCount wAB wBC wAC p + y.regs Reg.found ∧ (y.regs Reg.found = 1 ↔ ∃ q ∈ ExactTriangle.chunkOf wAB (MatrixMultiplication.Schonhage.D m) p idx.residue idx.chunk, ∃ c ∈ ExactTriangle.piece n (MatrixMultiplication.Schonhage.D m) g idx.piece, ExactTriangle.weightSum wAB wBC wAC q.1 q.2 c = 0) ∧ (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 ∧ (u, v) ∈ ExactTriangle.chunkOf wAB (MatrixMultiplication.Schonhage.D m) p idx.residue idx.chunk ∧ c ∈ ExactTriangle.piece n (MatrixMultiplication.Schonhage.D m) g idx.piece ∧ ExactTriangle.weightSum wAB wBC wAC u v c = 0) ∧ (∀ (u : ℕ), u < a.regs Instances.heap ∨ a.regs Instances.heap + MatrixMultiplication.Schonhage.CallableProduct.windowSize n Q ≤ u → y.mem u = a.mem u) ∧ ∀ (j : Fin 64), y.regs (productBank (RecordProduct.producerBank j)) = a.regs j

Every sufficiently wide physical word size executes the actual original-input program. Returned success is exactly an original zero in this actual selected chunk/piece, and every returned coordinate belongs to that original witness. The instruction bound includes halt.