Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.Loop

Complete charged native sparse-query loop #

The loop repeatedly executes the actual proved pop/expand/consume block. A finite measure decoded from occupied native stack words decreases at every iteration. The initialized frontier accounts for the complete original allowed-leaf sum, and all original arrays and retained table words remain protected throughout execution.

theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.exec_loop {w L m t AA BB D V K F A B : ℕ} (x : WordRAM.Data registers) (η : MatrixMultiplication.Schonhage.OutStr L) (hη : (MatrixMultiplication.Schonhage.innerSetO η).card = m) (a b : MatrixMultiplication.Schonhage.Leaf L → ℤ) (ha : ∀ (τ : MatrixMultiplication.Schonhage.Leaf L), (a τ).natAbs ≤ A) (hb : ∀ (τ : MatrixMultiplication.Schonhage.Leaf L), (b τ).natAbs ≤ B) (hx : Ready η m t AA BB D V K F a b [] [[]] x) (hK : K = (MatrixMultiplication.Schonhage.boxes L m t).card) (hF : F = V + K) (hAA : AA + 10 ^ L ≤ F) (hBB : BB + 10 ^ L ≤ F) (hD : D + (m - t + 1) * 10 ^ L ≤ F) (hfit : WordRAM.Fits (w + 2) (queryAddressBound L t AA BB D V K)) (hmag : GenericRAM.Signed.Fits w ↑(magnitudeBound L A B)) :
∃ (y : WordRAM.Data BoxTable.registers), WordRAM.ExecWithin (w + 2) (WordRAM.Code.loop (WordRAM.Cond.lt BoxTable.Reg.nil Reg.top) body) x y (258 * (L + 1) * (queryLeaves m t η).card + 2) ∧ Parameters L t (↑(PrunedQuery.queryIndex η)) AA BB D V K F y ∧ y.regs Reg.top = 0 ∧ y.regs Reg.answer = WordRAM.Signed.encode (queryValue m t η a b) ∧ Readback m t D V AA BB a b y.mem ∧ ∀ (q : ℕ), ¬(F ≤ q ∧ q < F + 5 * stackCapacity L) → y.mem q = x.mem q

Complete actual query traversal, charging every real controller iteration and loop exit.