Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxProduct.Tiles

All routed tiles with one shared box geometry #

Every actual group span is evaluated against the shared band encodings. The geometry is never rebuilt by this loop; values, stack and temporary answers are reused. The charged sum counts each original request occurrence only in its own tile.

theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxProduct.exec_evaluateTiles {w L m t N A : ℕ} (hw : 0 < w) (hm : m ≤ L) (ht : t ≤ m) (X : Matrix (Fin N) (Fin (MatrixMultiplication.Schonhage.D m)) ℤ) (Y : Matrix (Fin (MatrixMultiplication.Schonhage.D m)) (Fin N) ℤ) (qs : List (Fin N × Fin N)) (old : ℕ → ℕ) (x : WordRAM.Data 160) (hp : QueriedProduct.Parameters L m N qs.length x) (hb : Parameters L m t N qs.length x) (hi : x.regs QueriedProduct.Reg.index = 0) (hg : QueriedProduct.SavedGroups L m N qs.length old x.mem) (he : QueriedProduct.EncodedBands hm X Y x.mem) (hgeom : Geometry L m t N qs.length x.mem) (hvalues : ∀ (i : Fin qs.length), old (Wanted.codeAddress L m N qs.length + CountingSort.position (Wanted.tileKey L m N ∘ Wanted.inputPairs qs) qs.length ↑i) = ↑(PrunedQuery.queryIndex (MatrixMultiplication.Schonhage.outStrOfPos (MatrixMultiplication.Schonhage.MaskTable.layout hm) ↑(qs.get i).1 ↑(qs.get i).2))) (hoffsets : ∀ s ≤ MatrixMultiplication.Schonhage.numBands L m N ^ 2, old (Wanted.offsetAddress L m N qs.length + s) = Nat.count (fun (k : ℕ) => (Wanted.tileKey L m N ∘ Wanted.inputPairs qs) k < s) qs.length) (hX : ∀ (i : Fin N) (k : Fin (MatrixMultiplication.Schonhage.D m)), |X i k| ≤ ↑A) (hY : ∀ (k : Fin (MatrixMultiplication.Schonhage.D m)) (i : Fin N), |Y k i| ≤ ↑A) (hmag : magnitudeBound L A < 2 ^ (w - 1)) (hfit : WordRAM.Fits (w + 2) (wordBudget L m t N qs.length)) :

The fixed native loop evaluates every original wanted occurrence and preserves both actual routing and shared encoding/geometry readback, with no tile/time oracle.