Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxBatch.Prepare

Shared native construction before a query batch #

The fourth original header is a query count. One extra native addition moves the shared directory beyond the wanted-code array. The existing constructor then computes the real table once. Eleven final instructions initialize both batch cursors and the answer pointer. No computed table, execution, enumeration or resource certificate is supplied to the program.

Compute actual cursors and reserve the same uncleared stack as the reusable kernel.

Adapt original words, construct one real table, and initialize the actual batch.

Complete ordinary-input program: shared preparation followed by all wanted queries.

theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxBatch.exec_prepare {w L m t N A B : ℕ} (hmL : m ≤ L) (x : WordRAM.Data registers) (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) (hN : x.mem 4 = N) (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 N)) (hmag : GenericRAM.Signed.Fits w ↑(BoxQuery.magnitudeBound L A B)) :

The actual batch adapter constructs the retained table and initializes all batch cursors.