Documentation

CslibFrontier.Foundations.LinearAlgebra.Tensor.Flattening

The flattening bound for matrix multiplication #

A bilinear algorithm for p × q by q × r matrix multiplication, over a nontrivial commutative ring, needs at least p r multiplications (Cslib.Tensor.mul_le_of_rank_mm), one for each entry of the product. The p r output coordinates of ⟨p, q, r⟩ are bilinear forms, and each is a combination of the s rank-one forms of a decomposition. The matrix of the output coordinates has a right inverse that reads entry (i, k) off the inputs e_{i 0} and e_{0 k}, so its rank is p r, and it factors through s coordinates.

Main results #

theorem Cslib.Tensor.mul_le_of_rank_mm {K : Type u_1} [CommRing K] [Nontrivial K] {p q r s : ℕ} (hq : 0 < q) (h : Rank s (mm p q r)) :
p * r ≤ s

The flattening bound. A rank decomposition of ⟨p, q, r⟩ with q ≥ 1 has at least p r terms.

theorem Cslib.Tensor.mul_self_le_of_rank_mm {K : Type u_1} [CommRing K] [Nontrivial K] {v s : ℕ} (h : Rank s (mm v v v)) :
v * v ≤ s

A rank decomposition of ⟨v, v, v⟩ has at least v ^ 2 terms.