Documentation

Complexity.Algorithms.WordRAM.MatrixMultiplication.Schonhage.Product.SavedGroups

Memory invariants for the saved routing arrays #

Main definitions #

Main results #

The earlier memory is a proof reference to an executed state, not program input. The native copy theorem establishes these equalities before any low-memory reuse occurs.

Values copied from the actual router state into protected caller-owned arrays.

Instances For
    theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.QueriedProduct.SavedGroups.reframe {L m N Q : ℕ} {old μ ν : ℕ → ℕ} (h : SavedGroups L m N Q old μ) (hf : ∀ (a : ℕ), offsetBase L m N Q ≤ a → a < groupedBase L m N Q → ν a = μ a) :
    SavedGroups L m N Q old ν

    Preserving the protected readonly interval preserves the saved routing arrays.

    Stable scatter covers every grouped cell, so every stored code is a valid query index. The proof uses the existing permutation theorem rather than a supplied inverse table.

    theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.QueriedProduct.SavedGroups.span_bounds {L m N Q : ℕ} {old μ : ℕ → ℕ} (h : SavedGroups L m N Q old μ) (key : ℕ → ℕ) (hoffsets : ∀ t ≤ MatrixMultiplication.Schonhage.numBands L m N ^ 2, old (Wanted.offsetAddress L m N Q + t) = Nat.count (fun (k : ℕ) => key k < t) Q) {t : ℕ} (ht : t < MatrixMultiplication.Schonhage.numBands L m N ^ 2) :
    μ (offsetBase L m N Q + t) ≤ μ (offsetBase L m N Q + t + 1) ∧ μ (offsetBase L m N Q + t + 1) ≤ Q

    The actual protected offset words satisfy the kernel's monotone span and count bounds. These inequalities follow from the executed prefix-count meanings, not input certificates.

    A typed view of the actual saved code span requests exactly the original finite tile set. This uses the existing router's span theorem; the native caller constructs the view by decoding its real words, rather than receiving a query-set or routing certificate.