Query readback from a real constructed table #
The reusable query reads the original arrays and computed directory/value words. These pure memory equalities are established by the actual constructor in the initialized endpoint. Native stack stores lie above these protected ranges.
structure Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.Readback {L : ℕ} (m t D V AA BB : ℕ) (a b : MatrixMultiplication.Schonhage.Leaf L → ℤ) (μ : ℕ → ℕ) :
Actual source-array and compact-table words consumed by the reusable native query.
The original left encoding words.
The original right encoding words.
Every actually computed directory word, including zero invalid entries.
- values (s : ℕ) : s < (m - t + 1) * 10 ^ L → BoxTable.Eligible L (m - t) s → μ (V + Nat.count (BoxTable.Eligible L (m - t)) s) = WordRAM.Signed.encode (BoxTable.slotValue a b s)
Every compact signed value written by the actual table routine.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.Readback.transport {L m t D V AA BB F : ℕ} {a b : MatrixMultiplication.Schonhage.Leaf L → ℤ} {μ ν : ℕ → ℕ} (h : Readback m t D V AA BB a b μ) (hA : AA + 10 ^ L ≤ F) (hB : BB + 10 ^ L ≤ F) (hD : D + (m - t + 1) * 10 ^ L ≤ F) (hV : V + (MatrixMultiplication.Schonhage.boxes L m t).card ≤ F) (hf : ∀ q < F, ν q = μ q) :
Readback m t D V AA BB a b ν
Native scratch writes above the protected ranges preserve actual table/source readback.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.Readback.key {L m t D V AA BB : ℕ} {a b : MatrixMultiplication.Schonhage.Leaf L → ℤ} {μ : ℕ → ℕ} (h : Readback m t D V AA BB a b μ) (π : MatrixMultiplication.Schonhage.Cube L) (hπ : MatrixMultiplication.Schonhage.IsBox m t π) :
have s := BoxTable.cubeSlot π;
have r := Nat.count (BoxTable.Eligible L (m - t)) s;
s < (m - t + 1) * 10 ^ L ∧ r < (MatrixMultiplication.Schonhage.boxes L m t).card ∧ μ (D + s) = r + 1 ∧ μ (V + r) = WordRAM.Signed.encode (MatrixMultiplication.Schonhage.boxValue a b π.starLevels.card π)
A valid canonical key has a positive actual directory rank and exact signed stored value.