Charged one-slot controller setup and reclamation #
The logical limit is read from the producer's total register before any pair is produced. The slot is reclaimed by one native copy after verification; no memory is cleared.
theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.exec_setup {w : ℕ} (x : WordRAM.Data 416) (h1 : WordRAM.Fits w 1) :
∃ (y : WordRAM.Data 416),
WordRAM.ExecWithin w setup x y 5 ∧ y.mem = x.mem ∧ y.regs FixedPrime.Reg.index = 0 ∧ y.regs FixedPrime.Reg.limit = x.regs (producerBank Instances.total) ∧ y.regs FixedPrime.Reg.found = 0 ∧ y.regs FixedPrime.Reg.scans = 0 ∧ y.regs FixedPrime.Reg.one = 1 ∧ ∀ (j : Fin 416), ↑j < 400 → y.regs j = x.regs j
Read the total logical count and charge all five controller initialization instructions.
theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.exec_reset {w : ℕ} (x : WordRAM.Data 416) :
WordRAM.ExecWithin w reset x (x.set (producerBank Instances.heap) (x.regs (producerBank Instances.output))) 1
Reclaim the slot by an actual charged heap copy, retaining every word and other register.