Documentation

CslibFrontier.Foundations.LinearAlgebra.Tensor.Round

The round, the finite identity and ω ≤ 9/4 at the level of rank #

The product Q d a b = T ⊗ T^{12} ⊗ T^{13} of the canonical tensor T = canonical d a b = tpow d (full a b) ⊗ tpow d (mid a b) with its two role exchanges (Pass, Lemma 4.1) contains every leg permutation of full a b equally often, so exchanging a and b only permutes its factors (isRestriction_Q_swap); at a = b = 1 it is matrix multiplication (isRestriction_mm_tprod_Q_one), and its rank is at most (a + b - 1) ^ (6 d) (rank_Q).

A column packing ColumnPacking d a b b' w u H is a degeneration of 2 w independent copies of canonical d a b' ⊗ mm 1 1 u to w copies of canonical d a b ⊗ mm 1 1 w: the output of amplification and separation of the primal packing (columnPacking_of_count), with u = c ^ (2 d) and w the square of the number of words with a prescribed number of middle letters. A round (Pass, Lemma 4.2) tensors a column packing with its two role exchanges, reducing all three matrix dimensions, and applies this twice through the symmetry Q d L L' ≅ Q d L' L, increasing both polynomial lengths from L to L' (isDegen_round).

Iterating k rounds from L₀ = 1 (Pass, Theorem 4.3) gives a degeneration of 64 ^ k w ^ 3 copies of Q d L_k L_k ⊗ mm (w ^ 2) (w ^ 2) (w ^ 2) to mm v v v with v = w ^ 2 Λ ^ k, hence a border rank bound 64 ^ k w ^ 9 (2 L_k - 1) ^ (6 d), and Bini's conversion gives exact rank bounds on tensor powers. Choosing c, d, k and the power (exists_rank_mm_lt_rpow, Pass, Corollary 4.4) yields, for every τ > 9/4, a side v ≥ 2 and an exact bilinear algorithm for v × v matrix multiplication with fewer than v ^ τ multiplications.

Main definitions #

Main results #

References #

The product Q #

def Cslib.Tensor.Q {K : Type u_1} [CommRing K] (d a b : ℕ) :
Tensor K (((Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1))) × ((Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1))) × (Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1))) (((Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1))) × ((Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1))) × (Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1))) (((Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1))) × ((Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1))) × (Fin d → Fin (a + b - 1)) × (Fin d → Fin (a + b - 1)))

The product Q_{a,b} = T ⊗ T^{12} ⊗ T^{13} of the canonical tensor with its two role exchanges (Pass, Lemma 4.1). All three legs have the same index type.

theorem Cslib.Tensor.isRestriction_Q_swap {K : Type u_1} [CommRing K] (d a b : ℕ) :
(Q d a b).IsRestriction (Q d b a)

Symmetry of Q (Pass, Lemma 4.1): exchanging the lengths permutes the factors, so Q d a b is a restriction of Q d b a. The six factors of Q d a b are, in order, Full_{a,b}, Mid_{a,b}, Full_{b,a}, Full_{b,a}^{13}, Full_{a,b}^{13} and Mid_{b,a} (with Full_{b,a} = Full_{a,b}^{12}); exchanging a and b permutes them by the involution (0 2) (1 5) (3 4).

theorem Cslib.Tensor.isRestriction_mm_tprod_Q_one {K : Type u_1} [CommRing K] (d p q r : ℕ) :
(mm p q r).IsRestriction ((Q d 1 1).tprod (mm p q r))

At a = b = 1, Q with matrix dimensions [p, q, r] computes matrix multiplication (Pass, Lemma 4.1): every entry of Q d 1 1 is 1.

Column packings and the round #

def Cslib.Tensor.ColumnPacking {K : Type u_1} [CommRing K] (d a b b' w u H : ℕ) :

A column packing with parameters w, u, H: w copies of canonical d a b ⊗ mm 1 1 w are a degeneration of order H of 2 w copies of canonical d a b' ⊗ mm 1 1 u.

theorem Cslib.Tensor.ColumnPacking.cube_mm {K : Type u_1} [CommRing K] {d a b b' w u H : ℕ} (h : ColumnPacking d a b b' w u H) (p : ℕ) :
IsDegen (3 * H) (dsum fun (x : Fin (w ^ 3)) => (Q d a b).tprod (mm (w * p) (w * p) (w * p))) (dsum fun (x : Fin ((2 * w) ^ 3)) => (Q d a b').tprod (mm (u * p) (u * p) (u * p)))

Cubing a column packing (Pass, proof of Lemma 4.2): a column packing tensored with its two role exchanges and with mm p p p is a degeneration of (2 w) ^ 3 copies of Q d a b' ⊗ mm (u p) (u p) (u p) to w ^ 3 copies of Q d a b ⊗ mm (w p) (w p) (w p).

theorem Cslib.Tensor.isDegen_round {K : Type u_1} [CommRing K] {d L L' w u H Λ : ℕ} (h₁ : ColumnPacking d L L L' w u H) (h₂ : ColumnPacking d L' L L' w u H) (hΛ : u ^ 2 * Λ ≤ w ^ 2) (x : ℕ) :
∃ (H' : ℕ), IsDegen H' (dsum fun (x_1 : Fin (w ^ 3)) => (Q d L L).tprod (mm (w ^ 2 * Λ * x) (w ^ 2 * Λ * x) (w ^ 2 * Λ * x))) (dsum fun (x_1 : Fin (64 * w ^ 3)) => (Q d L' L').tprod (mm (w ^ 2 * x) (w ^ 2 * x) (w ^ 2 * x)))

A round (Pass, Lemma 4.2): column packings for (L, L, L') and (L', L, L') and Λ with u ^ 2 Λ ≤ w ^ 2 give, for every x, a degeneration of 64 w ^ 3 copies of Q d L' L' ⊗ mm (w ^ 2 x) … to w ^ 3 copies of Q d L L ⊗ mm (w ^ 2 Λ x) …: cube the first packing at side w Λ x, rename its sources by Q d L L' ≅ Q d L' L, and feed them to eight copies of the cube of the second packing at side u Λ x.

theorem Cslib.Tensor.rank_Q {K : Type u_1} [Field K] [CharZero K] (d a b : ℕ) :
Rank ((a + b - 1) ^ (6 * d)) (Q d a b)

Rank of Q (Pass, Lemma 4.1 and Lemma 2.3): each of the 6 d factors has rank at most a + b - 1.

theorem Cslib.Tensor.columnPacking_of_count {K : Type u_1} [Field K] [CharZero K] {a b c t d h : ℕ} (ha : 1 ≤ a) (hb : 1 ≤ b) (ht : 1 ≤ t) (hc : a + 2 * b - 1 ≤ c * t) :
ColumnPacking d a b (b + t) ({w : Fin d → Fin (c + 2) | {i : Fin d | w i = Fin.last (c + 1)}.card = h}.card ^ 2) (c ^ (2 * d)) ({w : Fin d → Fin (c + 2) | {i : Fin d | w i = Fin.last (c + 1)}.card = h}.card ^ 2 * (2 * d) + {w : Fin d → Fin (c + 2) | {i : Fin d | w i = Fin.last (c + 1)}.card = h}.card ^ 2 - 1)

From the primal packing to a column packing (Pass, Theorem 3.1, Lemma 3.2 and Lemma 3.4): for a, b, t ≥ 1, c t ≥ a + 2 b - 1 and any h (only h ≤ d gives a nonempty packing), with w₀ the number of words Fin d → Fin (c + 2) whose number of letters equal to the middle letter c + 1 is h, there is a column packing from length b + t to length b with w = w₀ ^ 2 and u = c ^ (2 d).

Iterating rounds and the finite identity #

The length after one round, for c ≥ 2: L + ⌈(3 L - 1) / (c - 1)⌉, so that c ⌈(3 L - 1) / (c - 1)⌉ ≥ 3 L - 1 + ⌈(3 L - 1) / (c - 1)⌉ (Pass, proof of Theorem 4.3).

The lengths of the rounds: L₀ = 1 and L_{j+1} = nextLength c L_j.

theorem Cslib.Tensor.nextLength_spec {c L : ℕ} (hc : 2 ≤ c) (hL : 1 ≤ L) :
1 ≤ nextLength c L - L ∧ L + 2 * L - 1 ≤ c * (nextLength c L - L) ∧ nextLength c L + 2 * L - 1 ≤ c * (nextLength c L - L)

The shift of a round satisfies the primal packing's condition at both lengths.

theorem Cslib.Tensor.isDegen_mm_unit_of_rounds {K : Type u_1} [Field K] [CharZero K] {c d w u H Λ : ℕ} (hw : 1 ≤ w) (hpack : ∀ (L : ℕ), 1 ≤ L → ColumnPacking d L L (nextLength c L) w u H ∧ ColumnPacking d (nextLength c L) L (nextLength c L) w u H) (hΛ : u ^ 2 * Λ ≤ w ^ 2) (k : ℕ) :
∃ (H' : ℕ), IsDegen H' (mm (w ^ 2 * Λ ^ k) (w ^ 2 * Λ ^ k) (w ^ 2 * Λ ^ k)) (unit (64 ^ k * w ^ 9 * (2 * roundLength c k - 1) ^ (6 * d)))

Iterated rounds (Pass, proof of Theorem 4.3): k rounds from L₀ = 1 give a degeneration of 64 ^ k w ^ 3 copies of Q d L_k L_k ⊗ mm (w ^ 2) … to w ^ 3 copies of Q d 1 1 ⊗ mm (w ^ 2 Λ ^ k) …, hence a degeneration of unit (64 ^ k w ^ 9 (2 L_k - 1) ^ (6 d)) to mm v v v with v = w ^ 2 Λ ^ k.

The parameters #

theorem Cslib.Tensor.exists_rank_mm_lt_rpow {K : Type u_1} [Field K] [CharZero K] {τ : ℝ} (hτ : 9 / 4 < τ) :
∃ (v : ℕ) (r : ℕ), 2 ≤ v ∧ ↑r < ↑v ^ τ ∧ Rank r (mm v v v)

The finite identity (Pass, Theorem 4.3 and Corollary 4.4): for every τ > 9/4 there is a side v ≥ 2 and an exact bilinear algorithm for v × v matrix multiplication with fewer than v ^ τ multiplications.

The parameters: c from exists_c, d from exists_d, the number h of middle letters from exists_card_filter_count_ge, w = w₀ ^ 2, u = c ^ (2 d), Λ = ⌊w₀ / c ^ d⌋ ^ 4, so that 64 ρ ^ (6 d) < Λ ^ τ; then k rounds give a degeneration of unit r' to mm V V V with r' < V ^ τ, and Bini's conversion gives the exact algorithm for a tensor power.