Documentation

CslibFrontier.Algorithms.MatrixMultiplication.Strassen.Correctness

Correctness of the seven-product cyclic coefficient recursion #

The finite recursion computes coefficients of ordinary matrix multiplication over the existing cyclic integer quotient. Its inputs need agree with the matrix only inside the occupied native coefficient blocks. There is no assumed multiplication implementation.

The block identity adapts pinned Spec/Sec3/Theorem17/Strassen.lean, lines 105–126, at revision 16a5ce41304fcdaea4e0be7c132e1c361dc26da5. This theorem is mathematical; the independent native controller execution proof must additionally account for its actual forms, stack and calls.

theorem Cslib.Algorithms.MatrixMultiplication.Strassen.multiply_eq_coefficients {p : ℕ} (hp : p ≠ 0) (k : ℕ) (M N : ℕ → ℕ → CyclicIntRing p) (a b : ℕ → ℤ) (hA : ∀ i < 4 ^ k * p, a i = coefficients hp M i) (hB : ∀ i < 4 ^ k * p, b i = coefficients hp N i) {i : ℕ} (hi : i < 4 ^ k * p) :
multiply p k a b i = coefficients hp (fun (r s : ℕ) => ∑ c ∈ Finset.range (2 ^ k), M r c * N c s) i

Every occupied coefficient of the seven-product recursion is the corresponding coefficient of the ordinary ring-matrix product.