Recovering the finite frontier from actual native memory #
The loop's proof measure is obtained from its actual stack words. Recovering each prefix uses the existing bounded radix digits; no guessed frontier or execution certificate is supplied. The measure is a proof tool, not an instruction or input word.
Decode the real depth and little-endian code of one native task.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.decodePrefix_prefixCode (xs : List MatrixMultiplication.Schonhage.Term) :
The actual fixed-length radix code recovers every original prefix term.
def Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.decodeStack (F : ℕ) (μ : ℕ → ℕ) :
Decode occupied stack records in their actual top-first order.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.StackMemory.decode {L F : ℕ} {η : MatrixMultiplication.Schonhage.OutStr L} {tasks : List (List MatrixMultiplication.Schonhage.Term)} {μ : ℕ → ℕ} (h : StackMemory η F tasks μ) :
Actual five-word readback identifies the complete logical frontier uniquely.
def Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.workMeasure {L : ℕ} (η : MatrixMultiplication.Schonhage.OutStr L) (t F : ℕ) (x : WordRAM.Data registers) :
Proof-only work potential computed from the actual pending records.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.workMeasure_eq {L t F : ℕ} {η : MatrixMultiplication.Schonhage.OutStr L} {tasks : List (List MatrixMultiplication.Schonhage.Term)} {x : WordRAM.Data registers} (h : StackMemory η F tasks x.mem) (ht : x.regs Reg.top = tasks.length) :
Every native readback witness gives exactly the same loop measure.