Documentation

CslibFrontier.Algorithms.MatrixMultiplication.Strassen.Defs

Seven-product recursion on cyclic coefficient arrays #

multiply is the finite coefficient specification of the native explicit-stack algorithm. It uses the existing cyclic convolution, seven recursive products, and the ordinary Strassen signs. The arrays are functions on natural indices; only their first 4^k*p entries matter. No execution or resource contract is bundled into this mathematical definition.

The recursion adapts Spec/Sec3/Theorem17/Strassen.lean, lines 81–96, at Anthropic formal-math revision 16a5ce41304fcdaea4e0be7c132e1c361dc26da5. The coefficient bound below also controls the native intermediate operand forms and partial output accumulations.

Read one contiguous quarter of a coefficient array.

Join four equal-length output quarters; only the first 4*q entries are specified.

The actual seven products, with cyclic convolution at scalar matrix leaves.

theorem Cslib.Algorithms.MatrixMultiplication.Strassen.quarter_natAbs_le {q A : ℕ} {a : ℕ → ℤ} (ha : ∀ i < 4 * q, (a i).natAbs ≤ A) {t : ℕ} (ht : t < 4) {i : ℕ} (hi : i < q) :
(quarter q t a i).natAbs ≤ A

A quarter read remains within the original matrix block.

theorem Cslib.Algorithms.MatrixMultiplication.Strassen.multiply_natAbs_le {p A B : ℕ} (k : ℕ) (a b : ℕ → ℤ) (ha : ∀ i < 4 ^ k * p, (a i).natAbs ≤ A) (hb : ∀ i < 4 ^ k * p, (b i).natAbs ≤ B) {i : ℕ} (hi : i < 4 ^ k * p) :
(multiply p k a b i).natAbs ≤ p * (A * B) * 16 ^ k

Every returned coefficient is bounded using only the original two input envelopes. The factor 16^k deliberately also covers all four-term output accumulations.