One-slot record construction, call, heap reset and return #
exec_step composes one streaming loop body: constructing the next logical chunk/piece record in
the single physical slot (construct), selecting constant physical ordinal zero (select),
running the box-product and original-weight verifier (FixedPrime.record), resetting the heap
pointer to Instances.output (reset), and updating the scan counter, witness flag and early-stop
limit (FixedPrime.receive).
theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.exec_step {w m n g p A i : ℕ} (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) (a : WordRAM.Data 64) (x : WordRAM.Data 416) (hout :
Instances.Output n (MatrixMultiplication.Schonhage.D m) g p (fun (q : ℕ) => values.getD q 0)
(WordRAM.Data.init (PreparationInput.input n (MatrixMultiplication.Schonhage.D m) g p values)) a) (cursor :
Cursor n (MatrixMultiplication.Schonhage.D m) g p (fun (q : ℕ) => values.getD q 0)
(WordRAM.Data.comap producerBank x)) (hproduced : x.regs (producerBank Instances.produced) = i) (hslotHeap : x.regs (producerBank Instances.heap) = x.regs (producerBank Instances.output)) (hmem : Set.EqOn x.mem a.mem (Set.Iio (a.regs Instances.output))) (hheap : a.regs Instances.heap ≤ PreparationInput.wordBound n (MatrixMultiplication.Schonhage.D m) g p A) (hi : x.regs FixedPrime.Reg.index = i) (hiM : i < a.regs Instances.produced) (hl : x.regs FixedPrime.Reg.limit = a.regs Instances.produced) (h1 : x.regs FixedPrime.Reg.one = 1) (hscans : x.regs FixedPrime.Reg.scans ≤ i * (n * n + 1)) (idx : ExactTriangle.InstanceIndex p) (hidx :
idx ∈ ExactTriangle.instanceIndices (fun (u v : Fin n) => values.getD (Matrix.pairIndex (u, v)) 0)
(MatrixMultiplication.Schonhage.D m) g p) (hord : RecordProduct.recordOrdinal n (MatrixMultiplication.Schonhage.D m) g p (fun (q : ℕ) => values.getD q 0) idx = i) :
have V := fun (q : ℕ) => values.getD q 0;
have hn := ⋯;
have Q := RecordProduct.recordQueryCount n (MatrixMultiplication.Schonhage.D m) p V idx;
∃ (y : WordRAM.Data 416) (S : ℕ) (T : ℕ),
WordRAM.ExecWithin (w + 2) step x y T ∧ T + 2 ≤ FixedPrime.recordBase hn V a.mem idx + (40 * (n * MatrixMultiplication.Schonhage.D m) + 67) + (42 * ExactTriangle.pieceSize (MatrixMultiplication.Schonhage.D m) g + 28) * S ∧ y.regs FixedPrime.Reg.index = i + 1 ∧ (y.regs FixedPrime.Reg.limit = if y.regs FixedPrime.Reg.found = 1 then i + 1 else a.regs Instances.produced) ∧ y.regs FixedPrime.Reg.one = 1 ∧ y.regs FixedPrime.Reg.scans = x.regs FixedPrime.Reg.scans + S ∧ (y.regs FixedPrime.Reg.found = 0 ∨ y.regs FixedPrime.Reg.found = 1) ∧ S ≤ FixedPrime.recordFailures hn V a.mem idx + y.regs FixedPrime.Reg.found ∧ S ≤ n * n + 1 ∧ (y.regs FixedPrime.Reg.found = 1 ↔ FixedPrime.recordHit V idx) ∧ (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) ∧ (∀ (u : ℕ),
u < a.regs Instances.output ∨ a.regs Instances.output + (6 + 2 * (n * MatrixMultiplication.Schonhage.D m)) + MatrixMultiplication.Schonhage.CallableProduct.windowSize n Q ≤ u →
y.mem u = x.mem u) ∧ Cursor n (MatrixMultiplication.Schonhage.D m) g p V (WordRAM.Data.comap producerBank y) ∧ y.regs (producerBank Instances.produced) = i + 1 ∧ y.regs (producerBank Instances.heap) = y.regs (producerBank Instances.output)
One actual construction, physical-slot call, reclamation and native return. The charge includes every bridge instruction; the loop's two instructions appear on the left.