Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Schonhage.Product.Routing

Native routing preparation from original coordinates #

Main results #

The earlier router memory in the conclusion is an existential witness produced by its actual execution. It is not a catalogue, layout or run certificate supplied by the caller.

Compute parameters and layout, then preserve the complete original input.

Actual coordinate adaptation, routing and protected group copies after a snapshot.

The sum of the actual preparation phases, before matrix adaptation and encoding.

Charge parameter/layout calculation and the complete original snapshot copy.

Charge only coordinate adaptation, routing and protected group copies.

theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.QueriedProduct.exec_prepareSnapshot {w L m N Q : ℕ} (hm : m ≤ L) (x : WordRAM.Data 160) (hL : x.mem 1 = L) (hmemory : x.mem 2 = m) (hN : x.mem 3 = N) (hQ : x.mem 4 = Q) (hfit : WordRAM.Fits w (wordBudget L m N Q)) :
∃ (y : WordRAM.Data 160), WordRAM.ExecWithin w prepareSnapshot x y (snapshotTime L m N Q) ∧ Parameters L m N Q y ∧ (∀ j < inputEnd m N Q, y.mem (snapshotBase L m N Q + j) = x.mem j) ∧ ∀ (a : ℕ), a < snapshotBase L m N Q ∨ snapshotBase L m N Q + inputEnd m N Q ≤ a → y.mem a = x.mem a

Execute the ordinary contiguous-input prefix; the snapshot may initially be dirty.

theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.QueriedProduct.exec_routingFromSnapshot {w L m N : ℕ} (hm : m ≤ L) (qs : List (Fin N × Fin N)) (x : WordRAM.Data 160) (xp : Parameters L m N qs.length x) (original : ℕ → ℕ) (hsnapshot : ∀ j < inputEnd m N qs.length, x.mem (snapshotBase L m N qs.length + j) = original j) (hL : x.mem 1 = L) (hmemory : x.mem 2 = m) (hN : x.mem 3 = N) (hQ : x.mem 4 = qs.length) (hqueries : ∀ i < qs.length, original (queryInputBase m N + 2 * i) = (Wanted.inputPairs qs i).1 ∧ original (queryInputBase m N + 2 * i + 1) = (Wanted.inputPairs qs i).2) (hfit : WordRAM.Fits w (wordBudget L m N qs.length)) :

Continue actual routing from computed parameters and actual original snapshot words.

theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.QueriedProduct.exec_prepareRouting {w L m N : ℕ} (hm : m ≤ L) (qs : List (Fin N × Fin N)) (x : WordRAM.Data 160) (hL : x.mem 1 = L) (hmemory : x.mem 2 = m) (hN : x.mem 3 = N) (hQ : x.mem 4 = qs.length) (hqueries : ∀ i < qs.length, x.mem (queryInputBase m N + 2 * i) = (Wanted.inputPairs qs i).1 ∧ x.mem (queryInputBase m N + 2 * i + 1) = (Wanted.inputPairs qs i).2) (hfit : WordRAM.Fits w (wordBudget L m N qs.length)) :

Real original coordinates suffice to establish all routing invariants and a protected copy of the entire original input. Header zero and outside memory may be arbitrary.