Initialized execution of an entire native query batch #
One actual table constructor and the complete batch loop share the same data witness. Every original query occurrence has its signed result at the corresponding output address, including repeated queries. The source arrays, wanted words and all memory outside the computed allocation are preserved.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxBatch.exec_input {w L m t A B : ℕ} (hmL : m ≤ L) (qs : List (MatrixMultiplication.Schonhage.OutStr L)) (hη : ∀ η ∈ qs, (MatrixMultiplication.Schonhage.innerSetO η).card = m) (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 qs.length)) (hmag : GenericRAM.Signed.Fits w ↑(BoxQuery.magnitudeBound L A B)) :
WordRAM.InputFits (w + 2) (input m t qs a b) ∧ ∃ (y : WordRAM.Data registers),
WordRAM.ExecWithin (w + 2) program (WordRAM.State.init (input m t qs a b)).data y
(preparationTime L m t + queryTime m t qs) ∧ WordRAM.Data.Bounded (w + 2) y ∧ Arguments L t 5 (5 + 10 ^ L) (directoryBase L qs.length) (valueBase L m t qs.length)
(MatrixMultiplication.Schonhage.boxes L m t).card y ∧ y.regs Reg.next = queryBase L + qs.length ∧ y.regs Reg.stop = queryBase L + qs.length ∧ y.regs Reg.output = memoryEnd L m t qs.length ∧ (∀ (i : Fin qs.length),
y.mem (outputBase L m t qs.length + ↑i) = WordRAM.Signed.encode
(BoxQuery.queryValue m t (qs.get i)
(fun (τ : MatrixMultiplication.Schonhage.Leaf L) => a (Encoding.leafIndex τ))
fun (τ : MatrixMultiplication.Schonhage.Leaf L) => b (Encoding.leafIndex τ))) ∧ BoxQuery.Readback m t (directoryBase L qs.length) (valueBase L m t qs.length) 5 (5 + 10 ^ L)
(fun (τ : MatrixMultiplication.Schonhage.Leaf L) => a (Encoding.leafIndex τ))
(fun (τ : MatrixMultiplication.Schonhage.Leaf L) => b (Encoding.leafIndex τ)) y.mem ∧ ∀ (p : ℕ),
¬(directoryBase L qs.length ≤ p ∧ p < memoryEnd L m t qs.length) →
y.mem p = (WordRAM.State.init (input m t qs a b)).data.mem p
Construct one retained table from original input and execute every wanted query, with separately charged shared preparation and complete native batch execution.