Strassen one-level 2×2 block multiplication identity #
This file states and proves the classic Strassen fast-matrix-multiply identity
at one level over a CommRing R: the product of two 2×2 matrices can be
computed with seven scalar multiplications (M1 … M7) and a handful of
additions, rather than the naive eight. The result entries are recombinations
of the seven products, and they reproduce the ordinary matrix product A * B
(Mathlib Matrix.mul, i.e. *).
This is the matrix-multiplication-tail companion to the CoqEAL seqmatrix
multiply refinement of SeqMatrixMul.lean: that file establishes the naive
row-col multiply refinement square; here we record the fast (Strassen)
recombination identity for the base 2×2 case.
Scope #
This file proves only the one-level 2×2 block identity. Recursive
Strassen — recursing on 2×2 block matrices down to a base case — is in
StrassenRec.lean. The one-level identity is the algebraic step of the
recursion (at the leaf the blocks are scalars).
API #
Strassen.M1 … M7— the seven Strassen products of the2×2entries.Strassen.result— the2×2matrix recombined fromM1 … M7.Strassen.result_eq_mul—result A B = A * B(the verified identity).
The seven Strassen products, computed from the entries of A and B
(2×2 matrices over a commutative ring). With A = [[a11,a12],[a21,a22]]
and B = [[b11,b12],[b21,b22]] (0/1-indexed via Fin 2):
M1 = (a11 + a22)(b11 + b22)M2 = (a21 + a22) b11M3 = a11 (b12 - b22)M4 = a22 (b21 - b11)M5 = (a11 + a12) b22M6 = (a21 - a11)(b11 + b12)M7 = (a12 - a22)(b21 + b22)
Equations
- Transfer.Examples.CoqEAL.Strassen.M1 A B = (A 0 0 + A 1 1) * (B 0 0 + B 1 1)