Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.Prepare

Actual query preparation from original input words #

The native adaptation reads all four headers and computes both array pointers. The existing complete box-table constructor then builds the shared directory, descriptors and every retained value. The same final state supplies all memory readback consumed by the query; no geometry, execution, time or table certificate is supplied.

Read the four actual scalar input words, leaving memory unchanged.

Complete original-input adaptation computes the actual span and array/directory pointers.

theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.exec_prepare {w L m t A B : ℕ} (hmL : m ≤ L) (x : WordRAM.Data registers) (q : Fin (10 ^ L)) (a b : Fin (10 ^ L) → ℤ) (ha : ∀ (i : Fin (10 ^ L)), (a i).natAbs ≤ A) (hb : ∀ (i : Fin (10 ^ L)), (b i).natAbs ≤ B) (hL : x.mem 1 = L) (hm : x.mem 2 = m) (ht : x.mem 3 = t) (hQ : x.mem 4 = ↑q) (hleft : ∀ (i : Fin (10 ^ L)), x.mem (5 + ↑i) = WordRAM.Signed.encode (a i)) (hright : ∀ (i : Fin (10 ^ L)), x.mem (5 + 10 ^ L + ↑i) = WordRAM.Signed.encode (b i)) (haddr : WordRAM.Fits (w + 2) (originalAddressBound L m t)) (hmag : GenericRAM.Signed.Fits w ↑(magnitudeBound L A B)) :

Prepare the real query table from original caller words and canonical signed leaf arrays.

theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxQuery.exec_prepare_input {w L m t A B : ℕ} (hmL : m ≤ L) (q : Fin (10 ^ L)) (a b : Fin (10 ^ L) → ℤ) (ha : ∀ (i : Fin (10 ^ L)), (a i).natAbs ≤ A) (hb : ∀ (i : Fin (10 ^ L)), (b i).natAbs ≤ B) (haddr : WordRAM.Fits (w + 2) (originalAddressBound L m t)) (hmag : GenericRAM.Signed.Fits w ↑(magnitudeBound L A B)) :

Actual initialized preparation derives input fit and bounded final data while exposing the same native table witness consumed by the subsequent query.