The exponent of matrix multiplication #
A circuit C : Circuit (arithSignature K) (n * n + n * n) (n * n) computes n × n matrix
multiplication (ComputesMatMul) when, fed with the variables, the entries of A followed by
those of B in the row-major numbering finProdFinEquiv, its outputs are the entries of A * B
as polynomials over K. This is the formal model of Bürgisser, Clausen and
Shokrollahi, Chapter 15. Such a circuit computes the product
over every commutative K-algebra (ComputesMatMul.eval_algebra), in particular on all matrices
over K (ComputesMatMul.eval). Over a finite field the converse fails: a circuit can output the
right values without the right polynomials. Over an infinite integral domain the two notions agree
(computesMatMul_iff_eval). Its size C.size counts the gates: additions, multiplications and
constants, each of cost one.
A real τ is an admissible exponent (AdmissibleExponent K τ) when for every ε > 0 there is
a constant c such that, for every n ≥ 1, some circuit of size at most c n ^ (τ + ε)
computes n × n matrix multiplication. The exponent of matrix multiplication omega K is the
infimum of the admissible exponents. This is the definition of Pass, §1, with
arithmetic circuits over K in place of integer arithmetic, and the formal arithmetic model of
Bürgisser, Clausen and Shokrollahi, Chapter 15.
Block recursion (admissibleExponent_of_rank, Strassen; Pass,
proof of Theorem 1.1): a bilinear algorithm with r multiplications for v × v matrices, that is
Tensor.Rank r (Tensor.mm v v v), gives circuits of size O(n ^ τ) whenever r ≤ v ^ τ and
τ > 2: apply the algorithm to v × v arrays of blocks, recursively, with linear encoding and
decoding of the blocks costing O(r n ^ 2) per level.
Main definitions #
Cslib.Circuits.Arithmetic.MatrixMultiplication.leftMatrix,Cslib.Circuits.Arithmetic.MatrixMultiplication.rightMatrix: the two matrices encoded by an input vector.Cslib.Circuits.Arithmetic.MatrixMultiplication.ComputesMatMulCslib.Circuits.Arithmetic.MatrixMultiplication.AdmissibleExponentCslib.Circuits.Arithmetic.MatrixMultiplication.omega
Main results #
Cslib.Circuits.Arithmetic.MatrixMultiplication.ComputesMatMul.eval_algebra,Cslib.Circuits.Arithmetic.MatrixMultiplication.ComputesMatMul.eval,Cslib.Circuits.Arithmetic.MatrixMultiplication.computesMatMul_iff_eval: formal and semantic correctness.Cslib.Circuits.Arithmetic.MatrixMultiplication.admissibleExponent_of_rank: block recursion.Cslib.Circuits.Arithmetic.MatrixMultiplication.two_le_of_admissibleExponent: every admissible exponent is at least2, soomegais a true infimum.Cslib.Circuits.Arithmetic.MatrixMultiplication.omega_le_of_admissibleExponent.
References #
C computes n × n matrix multiplication formally: fed with the variables, the entries of
A followed by those of B, it outputs the entries of A * B as polynomials over K
(Bürgisser, Clausen and Shokrollahi, Chapter 15). Over a
finite field this is stronger than outputting the right values (computesMatMul_iff_eval).
τ is an admissible exponent: for every ε > 0, circuits of size O(n ^ (τ + ε)) compute
n × n matrix multiplication for every n ≥ 1.
The exponent of matrix multiplication: the infimum of the admissible exponents.
Admissibility is monotone.
Formal and semantic correctness #
The left matrix encoded by matrixInputs R A B is A.
The right matrix encoded by matrixInputs R A B is B.
A circuit computing matrix multiplication formally computes it over every commutative
K-algebra R, with its constants mapped into R.
A circuit computing matrix multiplication formally outputs the product of any two matrices
over K.
Over an infinite integral domain, a circuit computes matrix multiplication formally exactly when it outputs the product of any two matrices.
Circuits from synthesis bounds #
The trivial algorithm: 3 is admissible.
Every admissible exponent is at least 2: a circuit computing n × n matrix multiplication
has at least n ^ 2 gates, one for each output, since the entries of A * B are pairwise
distinct functions of the inputs and none is an input.
Block recursion #
Block recursion (Strassen; Pass, §4.3): a bilinear algorithm
with r multiplications for v × v matrices gives circuits of size O(n ^ τ) for every n,
when r ≤ v ^ τ and 2 < τ. For every ε > 0, with R = v ^ (τ + ε) > r, the sizes S j of
the circuits for v ^ j × v ^ j matrices satisfy S (j + 1) ≤ r S j + 9 r (v ^ (j + 1)) ^ 2 + 1,
hence S j ≤ C R ^ j; a general n is padded to the next power of v, which is at most
v n.