October 2026 · Preprint

Local optimality of rank-47 schemes for 4×4 matrix multiplication over F2

Abstract

The tensor ⟨4,4,4⟩ of 4×4 matrix multiplication has rank at most 47 over F2, and as it is not known whether 47 is optimal, we ask how far the known decompositions of rank 47 are from one of rank 46. A decomposition is locally optimal to depth D if no D or fewer of its rank-one terms can be replaced by fewer rank-one terms. We prove that five pairwise inequivalent decompositions of rank 47 over F2 are locally optimal to depth 18, as is every decomposition equivalent to one of them, so a decomposition of rank 46 over F2 shares at most 28 terms with any decomposition in these five classes. The five classes include the scheme of Fawzi et al. and every public decomposition of rank 47 over F2 known to us; one of them, found in our flip-graph searches, is new. The proof rests on a peeling lemma and, for four sets of terms that resist the other bounds, on a refinement of the substitution method, which we call substitution over subspaces with lifting. Local optimality to depth 18 is also proved in Lean 4.

In plain words

Some shortcuts for multiplying two 4×4 tables can be reused on larger tables split into a 4×4 grid of blocks. When the entries are bits, with one plus one counting as zero, the record for such shortcuts is 47 multiplications. Fawzi and colleagues set it using machine learning and reported it in Nature in 2022. Later searches found more such shortcuts with 47 multiplications but none with 46. It remains unknown whether a reusable shortcut with 46 exists. This paper studies five essentially different shortcuts with 47, including the one from 2022 and a new one that the author found. For each of the five, the paper proves that no group of up to 18 multiplications can be swapped for a smaller group of the same kind with the same combined effect.

Forty-seven white cards in rows of six, each card with three 4-by-4 grids of small squares in teal, magenta and yellow showing the matrix entries used by one product of a 47-multiplication scheme for 4-by-4 matrices; eighteen of the cards have heavy black frames.
Of the five rank-47 decompositions in the paper, only C4 is new. This illustration shows C4 as 47 cards, one for each product that C4 uses to multiply 4×4 matrices A and B over F₂. On each card, the teal grid marks the entries of A that are added up, the magenta grid marks those of B, and the yellow grid marks the entries of C = AB to which the product of the two sums is added. Section 6.2 of the paper proves that, for the 18 products on the cards with heavy frames, the combined contribution to C cannot be computed with fewer than 18 such products.

Formal statement and axioms

Each main result as stated in Lean, copied verbatim from the published package, with the axioms that the proof rests on. Lean v4.35.0-rc3, Mathlib c55e6e786f49. The package.

MM4.equivNP18

Local optimality to depth 18 of every decomposition equivalent to one of AT47, KM47, C4 and C5, four of the five rank-47 schemes: with compiled code

theorem equivNP18 : StmtEquiv18
Definitions used in the statement
def StmtEquiv18 : Prop := ∀ S ∈ schemes18, ∀ S' : Scheme, Equivalent S S' → LocalOpt S' 18
def schemes18 : List Scheme := [at47, km47, c4, c5]
def Equivalent (S S' : Scheme) : Prop :=
  S'.length = S.length ∧
  ∃ (π : Equiv.Perm ℕ) (M : Fin 3 → (Fin 16 → ZMod 2) ≃ₗ[ZMod 2] (Fin 16 → ZMod 2)) (τ : Equiv.Perm (Fin 3)),
    (∀ t, t < S.length ↔ π t < S.length) ∧
    ∀ t < S.length, ∀ m : Fin 3, vec3 (S'.getD (π t) (0, 0, 0)) m = M m (vec3 (S.getD t (0, 0, 0)) (τ m))
def vec3 (x : ℕ × ℕ × ℕ) : Fin 3 → Fin 16 → ZMod 2 :=
  ![bitVec x.1, bitVec x.2.1, bitVec x.2.2]
def LocalOpt (S : Scheme) (k : ℕ) : Prop :=
  ∀ X : Finset ℕ, X ⊆ range S.length → X.card ≤ k → trank (subSum S X) = X.card
noncomputable def trank (T : Fin n₀ → Fin n₁ → Fin n₂ → R) : ℕ :=
  sInf {r | RankLE T r}
def RankLE (T : Fin n₀ → Fin n₁ → Fin n₂ → R) (r : ℕ) : Prop :=
  ∃ (a : Fin r → Fin n₀ → R) (b : Fin r → Fin n₁ → R) (c : Fin r → Fin n₂ → R),
    T = ∑ s, outer3 (a s) (b s) (c s)
def outer3 (a : Fin n₀ → R) (b : Fin n₁ → R) (c : Fin n₂ → R) : Fin n₀ → Fin n₁ → Fin n₂ → R :=
  fun i j k => a i * b j * c k
def subSum (S : Scheme) (X : Finset ℕ) : Fin 16 → Fin 16 → Fin 16 → ZMod 2 :=
  ∑ t ∈ X, term S t
def term (S : Scheme) (t : ℕ) : Fin 16 → Fin 16 → Fin 16 → ZMod 2 :=
  outer3 (bitVec (S.getD t (0, 0, 0)).1) (bitVec (S.getD t (0, 0, 0)).2.1) (bitVec (S.getD t (0, 0, 0)).2.2)
def bitVec (m : ℕ) : Fin 16 → ZMod 2 :=
  fun p => if m.testBit p.val then 1 else 0
abbrev Scheme := List (ℕ × ℕ × ℕ)
variable {R : Type*} [CommSemiring R] {n₀ n₁ n₂ : ℕ}

Source: Zenodo record 23652770, mm444-f2-local-optimality-lean-v2.0.zip/lean/d18/MM4/Final18.lean:33-33.

Axioms, as Lean reports them: propext, Classical.choice, Quot.sound and 4,381 more, for example MM4.at47_C0R0A_NP2_17._native.native_decide.ax_1_1, MM4.at47_C0R0A_NP2_18._native.native_decide.ax_1_1 and MM4.at47_C0R10A_NP2_17._native.native_decide.ax_1_1. Each of these 4,381 axioms comes from a check that runs as compiled code (native_decide). The full report is recorded in zenodo:23652770/mm444-f2-local-optimality-lean-v2.0.zip/lean/evidence/d18/ax_final18.out:13818-18201.

GSL.c3_equiv18

Local optimality to depth 18 of every decomposition equivalent to one of the five rank-47 schemes: with compiled code. The proof includes runs of Lean core’s verified LRAT checker for the four C3 subsets in Table 3.

theorem c3_equiv18 : ∀ S' : Scheme, Equivalent c3 S' → LocalOpt S' 18
Definitions used in the statement
def Equivalent (S S' : Scheme) : Prop :=
  S'.length = S.length ∧
  ∃ (π : Equiv.Perm ℕ) (M : Fin 3 → (Fin 16 → ZMod 2) ≃ₗ[ZMod 2] (Fin 16 → ZMod 2)) (τ : Equiv.Perm (Fin 3)),
    (∀ t, t < S.length ↔ π t < S.length) ∧
    ∀ t < S.length, ∀ m : Fin 3, vec3 (S'.getD (π t) (0, 0, 0)) m = M m (vec3 (S.getD t (0, 0, 0)) (τ m))
def vec3 (x : ℕ × ℕ × ℕ) : Fin 3 → Fin 16 → ZMod 2 :=
  ![bitVec x.1, bitVec x.2.1, bitVec x.2.2]
def LocalOpt (S : Scheme) (k : ℕ) : Prop :=
  ∀ X : Finset ℕ, X ⊆ range S.length → X.card ≤ k → trank (subSum S X) = X.card
noncomputable def trank (T : Fin n₀ → Fin n₁ → Fin n₂ → R) : ℕ :=
  sInf {r | RankLE T r}
def RankLE (T : Fin n₀ → Fin n₁ → Fin n₂ → R) (r : ℕ) : Prop :=
  ∃ (a : Fin r → Fin n₀ → R) (b : Fin r → Fin n₁ → R) (c : Fin r → Fin n₂ → R),
    T = ∑ s, outer3 (a s) (b s) (c s)
def outer3 (a : Fin n₀ → R) (b : Fin n₁ → R) (c : Fin n₂ → R) : Fin n₀ → Fin n₁ → Fin n₂ → R :=
  fun i j k => a i * b j * c k
def subSum (S : Scheme) (X : Finset ℕ) : Fin 16 → Fin 16 → Fin 16 → ZMod 2 :=
  ∑ t ∈ X, term S t
def term (S : Scheme) (t : ℕ) : Fin 16 → Fin 16 → Fin 16 → ZMod 2 :=
  outer3 (bitVec (S.getD t (0, 0, 0)).1) (bitVec (S.getD t (0, 0, 0)).2.1) (bitVec (S.getD t (0, 0, 0)).2.2)
def bitVec (m : ℕ) : Fin 16 → ZMod 2 :=
  fun p => if m.testBit p.val then 1 else 0
abbrev Scheme := List (ℕ × ℕ × ℕ)
variable {R : Type*} [CommSemiring R] {n₀ n₁ n₂ : ℕ}

Source: Zenodo record 23652770, mm444-f2-local-optimality-lean-gsublift-v2.0.zip/lean/gsl/c3/src/GSLData/C3/LocalOpt18.lean:20-20.

Axioms, as Lean reports them: propext, Classical.choice, Quot.sound and 8,873 more, for example GSL.y1_chunk00000._native.native_decide.ax_1_1, GSL.y1_chunk00001._native.native_decide.ax_1_1 and GSL.y1_chunk00002._native.native_decide.ax_1_1. Each of these 8,873 axioms comes from a check that runs as compiled code (native_decide). The full report is recorded in zenodo:23652770/mm444-f2-local-optimality-lean-gsublift-v2.0.zip/lean/gsl/c3/records/LocalOpt18.out:17757-26632.

MM4.c4_hard18

Local optimality to depth 18 of every decomposition equivalent to one of the five rank-47 schemes, for the C4 subset in Table 4: kernel-only

theorem c4_hard18 : ∀ r, RankLE (subSum c4 c4HardIdx.toFinset) r → 18 ≤ r
Definitions used in the statement
def c4HardIdx : List Nat := [0, 1, 11, 17, 3, 22, 38, 15, 39, 40, 6, 26, 9, 14, 4, 31, 36, 32]
def LocalOpt (S : Scheme) (k : ℕ) : Prop :=
  ∀ X : Finset ℕ, X ⊆ range S.length → X.card ≤ k → trank (subSum S X) = X.card
noncomputable def trank (T : Fin n₀ → Fin n₁ → Fin n₂ → R) : ℕ :=
  sInf {r | RankLE T r}
def RankLE (T : Fin n₀ → Fin n₁ → Fin n₂ → R) (r : ℕ) : Prop :=
  ∃ (a : Fin r → Fin n₀ → R) (b : Fin r → Fin n₁ → R) (c : Fin r → Fin n₂ → R),
    T = ∑ s, outer3 (a s) (b s) (c s)
def outer3 (a : Fin n₀ → R) (b : Fin n₁ → R) (c : Fin n₂ → R) : Fin n₀ → Fin n₁ → Fin n₂ → R :=
  fun i j k => a i * b j * c k
def subSum (S : Scheme) (X : Finset ℕ) : Fin 16 → Fin 16 → Fin 16 → ZMod 2 :=
  ∑ t ∈ X, term S t
def term (S : Scheme) (t : ℕ) : Fin 16 → Fin 16 → Fin 16 → ZMod 2 :=
  outer3 (bitVec (S.getD t (0, 0, 0)).1) (bitVec (S.getD t (0, 0, 0)).2.1) (bitVec (S.getD t (0, 0, 0)).2.2)
def bitVec (m : ℕ) : Fin 16 → ZMod 2 :=
  fun p => if m.testBit p.val then 1 else 0
abbrev Scheme := List (ℕ × ℕ × ℕ)
variable {R : Type*} [CommSemiring R] {n₀ n₁ n₂ : ℕ}

Source: Zenodo record 23652770, mm444-f2-local-optimality-lean-v2.0.zip/lean/d18/MM4/C4Sub/Main.lean:140-140.

Axioms, as Lean reports them. Recorded in zenodo:23652770/mm444-f2-local-optimality-lean-v2.0.zip/lean/evidence/d18/c4sub_kernel_axioms.out:1-1.

'MM4.c4_hard18' depends on axioms: [propext, Classical.choice, Quot.sound]