Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Formalized on 26 Nov 2026]

Title:Upper bounds on the matrix multiplication exponent ω\omega

Source:Record races · arxiv.org/abs/2404.16349
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Prove ω(C)≤τ\omega(\mathbb{C}) \le \tau for a rational τ\tau as small as possible, where ω\omega is defined from the tensor rank of n×nn \times n matrix multiplication (ω=inf⁡{τ:rank⟨n,n,n⟩=O(nτ)}\omega = \inf\{\tau : \mathrm{rank}\langle n,n,n\rangle = O(n^\tau)\}). The score is τ⋅106\tau \cdot 10^6. The starting value is Strassen's log⁡27\log_2 7, proved in the challenge's tests. Published bounds go much lower (2.371339, SODA 2025; 9/4 claimed by OpenAI in 2026 in a circuit model, with a Lean proof not yet connected to this rank model) — formalizing them here is the race.

Subjects:Algebraic Geometry (math.AG); cs.CC (cs.CC)
Tags:challenge, matrix multiplication, omega
Cite as:NS.09245 [math.AG] · NS.09245v1 for this version
Declaration:MatMulOmega.Upper.correct
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100; accepted critique: up to 100
Statement hash:fb552e51bef754c1886f3b1a2435070f6250d71c8acf4b38a24efa625b79dd9e
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · nosorry record challenges (formalized with AI agents, refereed)

Formal statement

theorem correct : omegaC ≤ (answerTau : ℝ)
Show the full Challenge.lean (469 lines) — definitions included
import Mathlib

/-!
# The exponent ω of matrix multiplication — antecedents library (nosorry `matmul-omega`)

## PART A (sorry-free; copied verbatim at the top of every other file of the challenge)

* `IsBilinAlg U V W` : a bilinear algorithm `A * B = ∑ t, (⟨U t, A⟩ ⬝ ⟨V t, B⟩) • W t` for the
  product of an `l × m` by an `m × p` matrix; `HasRankLE K l m p r` : one of length `r` exists,
  i.e. the matrix multiplication tensor `⟨l,m,p⟩` has rank `≤ r` over `K`.
* `rank K n` : the rank `R(⟨n,n,n⟩)` over `K`.
* `omega F` : `ω(F) = inf { τ : R(⟨n,n,n⟩) = O(n^τ) }` over a field `F`; `omegaC = omega ℂ`.

Proved here (no `sorry`): coefficient form of a bilinear algorithm, restriction, Kronecker product
(sub-multiplicativity), cyclic rotation, naive `R(⟨n,n,n⟩) ≤ n³`, Strassen `R(⟨2,2,2⟩) ≤ 7`,
`n² ≤ R(⟨n,n,n⟩)`, `2 ≤ ω ≤ 3`, the recursion lemma `R(⟨n,n,n⟩) ≤ r → ω ≤ log_n r`,
`ω ≤ log₂ 7`, and the rectangular lemma `R(⟨a,b,c⟩) ≤ r → ω ≤ 3 log_{abc} r` — over every field.

## PART B (open lemmas, stated with `sorry`; NOT challenge targets; NOT copied elsewhere)

Bini's border-rank theorem, Schönhage's asymptotic sum inequality (rank form), and the bridge
`omega F = formalOmega F 1 1 1` to OpenAI's circuit-based exponent.

## References
* [BCS] P. Bürgisser, M. Clausen, M. A. Shokrollahi, *Algebraic Complexity Theory*, Springer 1997,
  Ch. 14–15.
* [Str69] V. Strassen, *Gaussian elimination is not optimal*, Numer. Math. 13 (1969), 354–356.
* [Str73] V. Strassen, *Vermeidung von Divisionen*, J. Reine Angew. Math. 264 (1973), 184–202.
* [Bin80] D. Bini, *Relations between exact and approximate bilinear algorithms. Applications*,
  Calcolo 17 (1980), 87–97.
* [Sch81] A. Schönhage, *Partial and total matrix multiplication*, SIAM J. Comput. 10 (1981),
  434–455.
* [OAI] OpenAI, *An Upper Bound of 9/4 for the Matrix Multiplication Exponent* (2 Oct 2026) and
  *The matrix multiplication exponent is nine fourths* (24 Nov 2026), https://github.com/openai/math
  (commit 3344da59991ed94f9ba711217b29c1d760badfa6, Apache-2.0).
-/

open Finset

namespace MatMulOmega

/-! ## PART A -/

section Basic

variable {K : Type*} [CommRing K]

/-- `linForm X A = ∑ i j, X i j * A i j`: the linear form on `l × m` matrices with coefficient
matrix `X`. -/
def linForm {l m : Type*} [Fintype l] [Fintype m] (X A : Matrix l m K) : K :=
  ∑ i, ∑ j, X i j * A i j

/-- `IsBilinAlg U V W` : the `ι`-indexed triples `(U t, V t, W t)` form a *bilinear algorithm* for
the product of an `l × m` matrix by an `m × p` matrix over `K`:
`A * B = ∑ t, (linForm (U t) A * linForm (V t) B) • W t` for all `A, B`.
Its length (number of essential multiplications) is `Fintype.card ι` [BCS, §14.1].
Over a finite field this "for all `A, B`" identity is equivalent to the formal identity, because
both sides are bilinear (`isBilinAlg_iff_isTensorDecomp`). -/
def IsBilinAlg {l m p ι : Type*} [Fintype l] [Fintype m] [Fintype p] [Fintype ι]
    (U : ι → Matrix l m K) (V : ι → Matrix m p K) (W : ι → Matrix l p K) : Prop :=
  ∀ (A : Matrix l m K) (B : Matrix m p K), A * B = ∑ t, (linForm (U t) A * linForm (V t) B) • W t

/-- Coefficient form: `∑ t, U t a b * V t c d * W t i k = [a = i ∧ b = c ∧ d = k]`, i.e.
`∑ t, U t ⊗ V t ⊗ W t` is the matrix multiplication tensor `⟨l,m,p⟩ = ∑ e_{ij} ⊗ e_{jk} ⊗ e_{ik}`
(output slot written un-transposed). Equivalent to `IsBilinAlg`. -/
def IsTensorDecomp {l m p ι : Type*} [Fintype l] [Fintype m] [Fintype p] [Fintype ι]
    [DecidableEq l] [DecidableEq m] [DecidableEq p]
    (U : ι → Matrix l m K) (V : ι → Matrix m p K) (W : ι → Matrix l p K) : Prop :=
  ∀ a b c d i k, ∑ t, U t a b * V t c d * W t i k = if a = i ∧ b = c ∧ d = k then 1 else 0

theorem linForm_single {l m : Type*} [Fintype l] [Fintype m] [DecidableEq l] [DecidableEq m]
    (X : Matrix l m K) (a : l) (b : m) : linForm X (Matrix.single a b 1) = X a b := by
  simp [linForm, Matrix.single_apply, ite_and]

theorem isBilinAlg_iff_isTensorDecomp {l m p ι : Type*} [Fintype l] [Fintype m] [Fintype p]
    [Fintype ι] [DecidableEq l] [DecidableEq m] [DecidableEq p]
    (U : ι → Matrix l m K) (V : ι → Matrix m p K) (W : ι → Matrix l p K) :
    IsBilinAlg U V W ↔ IsTensorDecomp U V W := by
  constructor
  · intro h a b c d i k
    have := congrFun (congrFun (h (Matrix.single a b 1) (Matrix.single c d 1)) i) k
    simp only [linForm_single, Matrix.sum_apply, Matrix.smul_apply, smul_eq_mul] at this
    rw [← this]
    simp only [Matrix.mul_apply, Matrix.single_apply]
    by_cases hai : a = i <;> by_cases hbc : b = c <;> by_cases hdk : d = k <;>
      simp [hai, hbc, hdk]
  · intro h A B
    ext i k
    simp only [Matrix.mul_apply, Matrix.sum_apply, Matrix.smul_apply, smul_eq_mul, linForm]
    symm
    calc ∑ t, (∑ a, ∑ b, U t a b * A a b) * (∑ c, ∑ d, V t c d * B c d) * W t i k
        = ∑ t, ∑ x : l × m, ∑ y : m × p,
            (U t x.1 x.2 * A x.1 x.2) * (V t y.1 y.2 * B y.1 y.2) * W t i k := by
          refine Finset.sum_congr rfl fun t _ => ?_
          rw [← Fintype.sum_prod_type' (f := fun a b => U t a b * A a b),
            ← Fintype.sum_prod_type' (f := fun c d => V t c d * B c d), Finset.sum_mul_sum,
            Finset.sum_mul]
          simp only [Finset.sum_mul]
      _ = ∑ x : l × m, ∑ y : m × p, A x.1 x.2 * B y.1 y.2 *
            ∑ t, U t x.1 x.2 * V t y.1 y.2 * W t i k := by
          rw [Finset.sum_comm]
          refine Finset.sum_congr rfl fun x _ => ?_
          rw [Finset.sum_comm]
          refine Finset.sum_congr rfl fun y _ => ?_
          rw [Finset.mul_sum]
          refine Finset.sum_congr rfl fun t _ => by ring
      _ = ∑ x : l × m, ∑ y : m × p, A x.1 x.2 * B y.1 y.2 *
            (if x.1 = i ∧ x.2 = y.1 ∧ y.2 = k then 1 else 0) := by
          exact Finset.sum_congr rfl fun x _ => Finset.sum_congr rfl fun y _ => by rw [h]
      _ = ∑ j, A i j * B j k := by
          simp only [Fintype.sum_prod_type, mul_ite, mul_one, mul_zero, ite_and]
          simp [Finset.sum_ite_eq, Finset.sum_ite_eq']

end Basic

section Rank

variable {K : Type*} [CommRing K]

variable (K) in
/-- `HasRankLE K l m p r` : the product of an `l × m` by an `m × p` matrix over `K` has a
bilinear algorithm of length `r`, i.e. the tensor `⟨l, m, p⟩` has rank `≤ r` over `K`. -/
def HasRankLE (l m p : Type*) [Fintype l] [Fintype m] [Fintype p] (r : ℕ) : Prop :=
  ∃ (U : Fin r → Matrix l m K) (V : Fin r → Matrix m p K) (W : Fin r → Matrix l p K),
    IsBilinAlg U V W

section lemmas
variable {l m p l' m' p' ι : Type*} [Fintype l] [Fintype m] [Fintype p] [Fintype l'] [Fintype m']
  [Fintype p'] [DecidableEq l] [DecidableEq m] [DecidableEq p] [DecidableEq l'] [DecidableEq m']
  [DecidableEq p'] [Fintype ι]

theorem hasRankLE_of_isTensorDecomp (U : ι → Matrix l m K) (V : ι → Matrix m p K)
    (W : ι → Matrix l p K) (h : IsTensorDecomp U V W) :
    HasRankLE K l m p (Fintype.card ι) := by
  let e := Fintype.equivFin ι
  refine ⟨fun t => U (e.symm t), fun t => V (e.symm t), fun t => W (e.symm t), ?_⟩
  rw [isBilinAlg_iff_isTensorDecomp]
  intro a b c d i k
  rw [← h a b c d i k]
  exact Equiv.sum_comp e.symm (fun t => U t a b * V t c d * W t i k)

theorem HasRankLE.restrict {r : ℕ} (h : HasRankLE K l m p r) (fl : l' ↪ l) (fm : m' ↪ m)
    (fp : p' ↪ p) : HasRankLE K l' m' p' r := by
  obtain ⟨U, V, W, hUVW⟩ := h
  rw [isBilinAlg_iff_isTensorDecomp] at hUVW
  have := hasRankLE_of_isTensorDecomp (fun t a b => U t (fl a) (fm b))
    (fun t c d => V t (fm c) (fp d)) (fun t i k => W t (fl i) (fp k)) (by
      intro a b c d i k
      show ∑ t, U t (fl a) (fm b) * V t (fm c) (fp d) * W t (fl i) (fp k) = _
      rw [hUVW]
      simp only [fl.injective.eq_iff, fm.injective.eq_iff, fp.injective.eq_iff])
  simpa using this

theorem HasRankLE.kron {r r' : ℕ} (h : HasRankLE K l m p r) (h' : HasRankLE K l' m' p' r') :
    HasRankLE K (l × l') (m × m') (p × p') (r * r') := by
  obtain ⟨U, V, W, hUVW⟩ := h
  obtain ⟨U', V', W', hUVW'⟩ := h'
  rw [isBilinAlg_iff_isTensorDecomp] at hUVW hUVW'
  have := hasRankLE_of_isTensorDecomp (ι := Fin r × Fin r')
    (fun (t : Fin r × Fin r') (a : l × l') (b : m × m') => U t.1 a.1 b.1 * U' t.2 a.2 b.2)
    (fun (t : Fin r × Fin r') (c : m × m') (d : p × p') => V t.1 c.1 d.1 * V' t.2 c.2 d.2)
    (fun (t : Fin r × Fin r') (i : l × l') (k : p × p') => W t.1 i.1 k.1 * W' t.2 i.2 k.2) (by
      intro a b c d i k
      show ∑ t : Fin r × Fin r', U t.1 a.1 b.1 * U' t.2 a.2 b.2 * (V t.1 c.1 d.1 * V' t.2 c.2 d.2) *
          (W t.1 i.1 k.1 * W' t.2 i.2 k.2) = _
      rw [Fintype.sum_prod_type]
      have e : ∀ x y, U x a.1 b.1 * U' y a.2 b.2 * (V x c.1 d.1 * V' y c.2 d.2) *
          (W x i.1 k.1 * W' y i.2 k.2) =
          (U x a.1 b.1 * V x c.1 d.1 * W x i.1 k.1) * (U' y a.2 b.2 * V' y c.2 d.2 * W' y i.2 k.2) :=
        fun x y => by ring
      simp only [e]
      rw [← Finset.sum_mul_sum, hUVW, hUVW']
      simp only [Prod.ext_iff]
      by_cases h1 : a.1 = i.1 <;> by_cases h2 : a.2 = i.2 <;> by_cases h3 : b.1 = c.1 <;>
        by_cases h4 : b.2 = c.2 <;> by_cases h5 : d.1 = k.1 <;> by_cases h6 : d.2 = k.2 <;>
        simp [h1, h2, h3, h4, h5, h6])
  simpa using this

theorem HasRankLE.rotate {r : ℕ} (h : HasRankLE K l m p r) : HasRankLE K m p l r := by
  obtain ⟨U, V, W, hUVW⟩ := h
  rw [isBilinAlg_iff_isTensorDecomp] at hUVW
  refine ⟨V, fun t => (W t).transpose, fun t => (U t).transpose, ?_⟩
  rw [isBilinAlg_iff_isTensorDecomp]
  intro x y y' z x' z'
  have := hUVW z' x' x y z y'
  simp only [Matrix.transpose_apply]
  rw [show (∑ t, V t x y * W t z y' * U t z' x') = ∑ t, U t z' x' * V t x y * W t z y' from
    Finset.sum_congr rfl fun _ _ => by ring, this]
  by_cases h1 : x = x' <;> by_cases h2 : y = y' <;> by_cases h3 : z = z' <;>
    simp [h1, h2, h3, eq_comm]

end lemmas

variable (K) in
/-- The rank `R(⟨n,n,n⟩)` over `K` of the `n × n` matrix multiplication tensor: the least length
of a bilinear algorithm for `n × n` matrix multiplication (BCS, Def. 14.7 / §15.1). -/
noncomputable def rank (n : ℕ) : ℕ := sInf {r | HasRankLE K (Fin n) (Fin n) (Fin n) r}

/-- The naive algorithm: `n³` products `A i j * B j k`. -/
theorem hasRankLE_naive (n : ℕ) : HasRankLE K (Fin n) (Fin n) (Fin n) (n ^ 3) := by
  have := hasRankLE_of_isTensorDecomp (K := K) (ι := Fin n × Fin n × Fin n)
    (fun t a b => if t.1 = a ∧ t.2.1 = b then 1 else 0)
    (fun t c d => if t.2.1 = c ∧ t.2.2 = d then 1 else 0)
    (fun t i k => if t.1 = i ∧ t.2.2 = k then 1 else 0) (by
      intro a b c d i k
      simp only [Fintype.sum_prod_type, ite_and, mul_ite, mul_one, mul_zero]
      by_cases h1 : a = i <;> by_cases h2 : b = c <;> by_cases h3 : d = k <;>
        simp [h1, h2, h3, Finset.sum_ite_eq'] <;> (try intros) <;> simp_all)
  simpa [pow_succ, mul_assoc] using this

theorem rank_le_of_hasRankLE {n r : ℕ} (h : HasRankLE K (Fin n) (Fin n) (Fin n) r) :
    rank K n ≤ r := Nat.sInf_le h

theorem hasRankLE_rank (n : ℕ) : HasRankLE K (Fin n) (Fin n) (Fin n) (rank K n) :=
  Nat.sInf_mem (s := {r | HasRankLE K (Fin n) (Fin n) (Fin n) r}) ⟨_, hasRankLE_naive n⟩

theorem rank_le_pow_three (n : ℕ) : rank K n ≤ n ^ 3 := rank_le_of_hasRankLE (hasRankLE_naive n)

theorem rank_mul_le (a b : ℕ) : rank K (a * b) ≤ rank K a * rank K b := by
  apply rank_le_of_hasRankLE
  have := (hasRankLE_rank (K := K) a).kron (hasRankLE_rank (K := K) b)
  exact this.restrict finProdFinEquiv.symm.toEmbedding finProdFinEquiv.symm.toEmbedding
    finProdFinEquiv.symm.toEmbedding

theorem rank_mono {m n : ℕ} (h : m ≤ n) : rank K m ≤ rank K n := by
  apply rank_le_of_hasRankLE
  exact (hasRankLE_rank (K := K) n).restrict (Fin.castLEEmb h) (Fin.castLEEmb h) (Fin.castLEEmb h)

theorem one_le_rank [Nontrivial K] {n : ℕ} (hn : 1 ≤ n) : 1 ≤ rank K n := by
  rcases Nat.eq_zero_or_pos (rank K n) with h | h
  · exfalso
    have h0 : HasRankLE K (Fin n) (Fin n) (Fin n) 0 := h ▸ hasRankLE_rank (K := K) n
    obtain ⟨U, V, W, hUVW⟩ := h0
    rw [isBilinAlg_iff_isTensorDecomp] at hUVW
    have := hUVW ⟨0, hn⟩ ⟨0, hn⟩ ⟨0, hn⟩ ⟨0, hn⟩ ⟨0, hn⟩ ⟨0, hn⟩
    simp at this
  · exact h

theorem rank_pow_le (n k : ℕ) : rank K (n ^ k) ≤ rank K n ^ k := by
  induction k with
  | zero => simpa using (rank_le_pow_three (K := K) 1)
  | succ k ih =>
    rw [pow_succ, pow_succ]
    exact (rank_mul_le _ _).trans (Nat.mul_le_mul_right _ ih)


/-- **Strassen (1969)**: seven products suffice for `2 × 2` matrices, over every commutative ring.
`M₁ = (A₁₁+A₂₂)(B₁₁+B₂₂)`, `M₂ = (A₂₁+A₂₂)B₁₁`, `M₃ = A₁₁(B₁₂−B₂₂)`, `M₄ = A₂₂(B₂₁−B₁₁)`,
`M₅ = (A₁₁+A₁₂)B₂₂`, `M₆ = (A₂₁−A₁₁)(B₁₁+B₁₂)`, `M₇ = (A₁₂−A₂₂)(B₂₁+B₂₂)`. -/
def strassenU : Fin 7 → Matrix (Fin 2) (Fin 2) K :=
  ![!![1, 0; 0, 1], !![0, 0; 1, 1], !![1, 0; 0, 0], !![0, 0; 0, 1], !![1, 1; 0, 0],
    !![-1, 0; 1, 0], !![0, 1; 0, -1]]
def strassenV : Fin 7 → Matrix (Fin 2) (Fin 2) K :=
  ![!![1, 0; 0, 1], !![1, 0; 0, 0], !![0, 1; 0, -1], !![-1, 0; 1, 0], !![0, 0; 0, 1],
    !![1, 1; 0, 0], !![0, 0; 1, 1]]
def strassenW : Fin 7 → Matrix (Fin 2) (Fin 2) K :=
  ![!![1, 0; 0, 1], !![0, 0; 1, -1], !![0, 1; 0, 1], !![1, 0; 1, 0], !![-1, 1; 0, 0],
    !![0, 0; 0, 1], !![1, 0; 0, 0]]

theorem strassen_isBilinAlg :
    IsBilinAlg (strassenU (K := K)) (strassenV (K := K)) (strassenW (K := K)) := by
  intro A B
  ext i j
  fin_cases i <;> fin_cases j <;>
    simp [strassenU, strassenV, strassenW, linForm, Matrix.mul_apply, Fin.sum_univ_succ,
      Matrix.sum_apply] <;> ring

theorem hasRankLE_strassen : HasRankLE K (Fin 2) (Fin 2) (Fin 2) 7 :=
  ⟨strassenU, strassenV, strassenW, strassen_isBilinAlg⟩

theorem rank_two_le_seven : rank K 2 ≤ 7 := rank_le_of_hasRankLE hasRankLE_strassen


end Rank

section Field

variable {F : Type*} [Field F]

/-- Lower bound `n² ≤ R(⟨n,n,n⟩)`: the output matrices `W t` of any bilinear algorithm span all
`n × n` matrices. -/
theorem sq_le_of_hasRankLE {n r : ℕ} (h : HasRankLE F (Fin n) (Fin n) (Fin n) r) : n ^ 2 ≤ r := by
  obtain ⟨U, V, W, hUVW⟩ := h
  have hspan : Submodule.span F (Set.range W) = ⊤ := by
    rw [eq_top_iff]
    intro M _
    rw [Matrix.matrix_eq_sum_single M]
    refine Submodule.sum_mem _ fun i _ => Submodule.sum_mem _ fun k _ => ?_
    have hik : Matrix.single i k (M i k) = M i k • (Matrix.single i k (1 : F)) := by
      rw [Matrix.smul_single, smul_eq_mul, mul_one]
    rw [hik]
    refine Submodule.smul_mem _ _ ?_
    have e := hUVW (Matrix.single i i 1) (Matrix.single i k 1)
    rw [Matrix.single_mul_single_same, one_mul] at e
    rw [e]
    exact Submodule.sum_mem _ fun t _ => Submodule.smul_mem _ _ (Submodule.subset_span ⟨t, rfl⟩)
  have h1 := finrank_range_le_card (R := F) W
  rw [Set.finrank, hspan, finrank_top, Module.finrank_matrix] at h1
  simpa [sq] using h1

theorem sq_le_rank (n : ℕ) : n ^ 2 ≤ rank F n := sq_le_of_hasRankLE (hasRankLE_rank n)

variable (F) in
/-- `τ` is an *admissible exponent* over `F` when `R(⟨n,n,n⟩) = O(n^τ)`, i.e.
`R(⟨n,n,n⟩) ≤ C · n^τ` for all `n ≥ 1` and some constant `C > 0`. -/
def IsAdmissible (τ : ℝ) : Prop :=
  ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 1 ≤ n → (rank F n : ℝ) ≤ C * (n : ℝ) ^ τ

variable (F) in
/-- **The exponent of matrix multiplication over `F`**:
`ω(F) = inf { τ : R(⟨n,n,n⟩) = O(n^τ) }`, where `R` is the rank of the matrix multiplication tensor
over `F` (`rank`). This is the standard definition, e.g. Bürgisser–Clausen–Shokrollahi,
*Algebraic Complexity Theory*, Def. 15.1 and Prop. 15.1 (the infimum is equivalently taken over
total arithmetic cost of straight-line programs; see Strassen 1973, *Vermeidung von Divisionen*). -/
noncomputable def omega : ℝ := sInf {τ : ℝ | IsAdmissible F τ}

theorem two_le_of_isAdmissible {τ : ℝ} (h : IsAdmissible F τ) : 2 ≤ τ := by
  obtain ⟨C, hC, hb⟩ := h
  by_contra hlt
  push Not at hlt
  have ht : Filter.Tendsto (fun n : ℕ => (n : ℝ) ^ (2 - τ)) Filter.atTop Filter.atTop :=
    (tendsto_rpow_atTop (by linarith)).comp tendsto_natCast_atTop_atTop
  obtain ⟨n, hnC, hn1⟩ := ((ht.eventually_gt_atTop C).and (Filter.eventually_ge_atTop 1)).exists
  have hnpos : (0 : ℝ) < n := by exact_mod_cast hn1
  have h2 : ((n : ℝ)) ^ (2 : ℝ) ≤ C * (n : ℝ) ^ τ := by
    have := hb n hn1
    have hsq : ((n ^ 2 : ℕ) : ℝ) ≤ rank F n := by exact_mod_cast sq_le_rank n
    rw [Nat.cast_pow] at hsq
    rw [show (2 : ℝ) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]
    linarith
  have h3 : (n : ℝ) ^ (2 : ℝ) = (n : ℝ) ^ (2 - τ) * (n : ℝ) ^ τ := by
    rw [← Real.rpow_add hnpos]; ring_nf
  rw [h3] at h2
  have hτpos : 0 < (n : ℝ) ^ τ := Real.rpow_pos_of_pos hnpos τ
  have := le_of_mul_le_mul_right h2 hτpos
  linarith

theorem bddBelow_admissible : BddBelow {τ : ℝ | IsAdmissible F τ} :=
  ⟨2, fun _ h => two_le_of_isAdmissible h⟩

theorem omega_le_of_isAdmissible {τ : ℝ} (h : IsAdmissible F τ) : omega F ≤ τ :=
  csInf_le bddBelow_admissible h

theorem isAdmissible_three : IsAdmissible F 3 := by
  refine ⟨1, one_pos, fun n _ => ?_⟩
  rw [one_mul, show (3 : ℝ) = ((3 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]
  exact_mod_cast rank_le_pow_three n

/-- The naive algorithm: `ω ≤ 3`. -/
theorem omega_le_three : omega F ≤ 3 := omega_le_of_isAdmissible isAdmissible_three

/-- `ω ≥ 2`: the output alone has `n²` entries. -/
theorem two_le_omega : 2 ≤ omega F :=
  le_csInf ⟨3, isAdmissible_three⟩ fun _ h => two_le_of_isAdmissible h

/-- The `ε`-form of the definition: if `R(⟨n,n,n⟩) = O(n^(τ+ε))` for every `ε > 0`, then `ω ≤ τ`. -/
theorem omega_le_of_forall_pos {τ : ℝ} (h : ∀ ε : ℝ, 0 < ε → IsAdmissible F (τ + ε)) :
    omega F ≤ τ :=
  le_of_forall_pos_le_add fun ε hε => omega_le_of_isAdmissible (h ε hε)

/-- **Recursion lemma** (Strassen 1969; BCS Prop. 15.1): if `R(⟨n,n,n⟩) ≤ r` with `n ≥ 2`,
then `ω ≤ log_n r`. -/
theorem omega_le_logb {n r : ℕ} (hn : 2 ≤ n) (h : HasRankLE F (Fin n) (Fin n) (Fin n) r) :
    omega F ≤ Real.logb n r := by
  have hrk : rank F n ≤ r := rank_le_of_hasRankLE h
  have hr1 : 1 ≤ r := le_trans (le_trans (by nlinarith) (sq_le_rank (F := F) n)) hrk
  have hn1 : (1 : ℝ) < n := by exact_mod_cast hn
  have hr0 : (0 : ℝ) < r := by exact_mod_cast hr1
  set τ := Real.logb n r with hτ
  have hτ0 : 0 ≤ τ := Real.logb_nonneg hn1 (by exact_mod_cast hr1)
  have hnτ : (n : ℝ) ^ τ = r := Real.rpow_logb (by linarith) (by linarith) hr0
  refine omega_le_of_isAdmissible ⟨r, hr0, fun m hm => ?_⟩
  have hm0 : (0 : ℝ) < m := by exact_mod_cast hm
  set k := Nat.clog n m with hk
  have hmk : m ≤ n ^ k := Nat.le_pow_clog (by omega) m
  have hrank : (rank F m : ℝ) ≤ (r : ℝ) ^ k := by
    have := (rank_mono (K := F) hmk).trans ((rank_pow_le n k).trans (Nat.pow_le_pow_left hrk k))
    exact_mod_cast this
  rcases Nat.eq_zero_or_pos k with hk0 | hkpos
  · rw [hk0, pow_zero] at hrank
    have : (1 : ℝ) ≤ (m : ℝ) ^ τ := Real.one_le_rpow (by exact_mod_cast hm) hτ0
    have : (1 : ℝ) ≤ r := by exact_mod_cast hr1
    nlinarith
  · obtain ⟨j, hj⟩ : ∃ j, k = j + 1 := ⟨k - 1, by omega⟩
    rw [hj] at hrank
    have hm1 : 1 < m := by
      by_contra hle
      have : Nat.clog n m = 0 := Nat.clog_of_right_le_one (by omega) n
      omega
    have hlt : n ^ j < m := by
      have := Nat.pow_pred_clog_lt_self (b := n) (by omega) hm1
      rwa [← hk, hj, Nat.pred_succ] at this
    have hlt' : ((n : ℝ) ^ j) ≤ m := by exact_mod_cast hlt.le
    have key : (r : ℝ) ^ j ≤ (m : ℝ) ^ τ := by
      rw [← hnτ, ← Real.rpow_mul_natCast (by linarith), mul_comm,
        Real.rpow_natCast_mul (by linarith)]
      exact Real.rpow_le_rpow (by positivity) hlt' hτ0
    calc (rank F m : ℝ) ≤ (r : ℝ) ^ (j + 1) := hrank
      _ = r * (r : ℝ) ^ j := by ring
      _ ≤ r * (m : ℝ) ^ τ := by gcongr

/-- **Strassen (1969)**: `ω ≤ log₂ 7` over every field. -/
theorem omega_le_logb_two_seven : omega F ≤ Real.logb 2 7 := by
  have := omega_le_logb (F := F) (le_refl 2) hasRankLE_strassen
  simpa using this

/-- **Rectangular formats** (BCS Prop. 15.5, via symmetrization
`⟨a,b,c⟩ ⊗ ⟨b,c,a⟩ ⊗ ⟨c,a,b⟩ = ⟨abc,abc,abc⟩`): if `R(⟨a,b,c⟩) ≤ r` with `abc ≥ 2` then
`ω ≤ 3 log_{abc} r`. -/
theorem omega_le_of_rect {a b c r : ℕ} (habc : 2 ≤ a * b * c)
    (h : HasRankLE F (Fin a) (Fin b) (Fin c) r) :
    omega F ≤ 3 * Real.logb (a * b * c : ℕ) r := by
  have h3 := (h.kron h.rotate).kron h.rotate.rotate
  have e1 : Fintype.card (Fin (a * b * c)) = Fintype.card ((Fin a × Fin b) × Fin c) := by
    simp [mul_assoc]
  have e2 : Fintype.card (Fin (a * b * c)) = Fintype.card ((Fin b × Fin c) × Fin a) := by
    simp; ring
  have e3 : Fintype.card (Fin (a * b * c)) = Fintype.card ((Fin c × Fin a) × Fin b) := by
    simp; ring
  have hN := h3.restrict (Fintype.equivOfCardEq e1).toEmbedding
    (Fintype.equivOfCardEq e2).toEmbedding (Fintype.equivOfCardEq e3).toEmbedding
  have := omega_le_logb habc hN
  have hr : 0 < r := by
    rcases Nat.eq_zero_or_pos r with h0 | h0
    · exfalso
      subst h0
      have h2 := sq_le_of_hasRankLE hN
      have hpos : 0 < (a * b * c) ^ 2 := pow_pos (by omega) 2
      omega
    · exact h0
  calc omega F ≤ Real.logb (a * b * c : ℕ) ((r * r * r : ℕ) : ℝ) := this
    _ = 3 * Real.logb (a * b * c : ℕ) r := by
      rw [show ((r * r * r : ℕ) : ℝ) = (r : ℝ) ^ (3 : ℕ) by push_cast; ring,
        Real.logb_pow]
      norm_num

end Field


end MatMulOmega

namespace MatMulOmega

/-- The exponent of matrix multiplication over `ℂ`, the field of the 2 Oct 2026 OpenAI statement. -/
noncomputable abbrev omegaC : ℝ := omega ℂ

end MatMulOmega

/-! ## CHALLENGE (record, minimise): an upper bound for `ω(ℂ)`

The solver chooses a rational `answerTau`, proves `ω(ℂ) ≤ answerTau` (`correct`), and states its
score in `metric_bound` by replacing the hole with ONE natural-number literal `k`, proving
`answerTau ≤ k / 10⁶`. The score is `k` (lower is better); it certifies `ω(ℂ) ≤ k / 10⁶`.
Baseline (sorry-free, see Tests.lean): `answerTau = 561471/200000`, `k = 2807355`
(Strassen, `log₂ 7 = 2.8073549…`). -/

namespace MatMulOmega.Upper

/-- The solver's rational upper bound `τ` for `ω(ℂ)`. -/
def answerTau : ℚ := sorry

/-- TARGET: `ω(ℂ) ≤ τ`. -/
theorem correct : omegaC ≤ (answerTau : ℝ) := sorry

/-- METRIC (min): replace the hole by a natural-number literal `k`; this proves `τ ≤ k / 10⁶`. -/
theorem metric_bound : answerTau ≤ ((sorry : ℕ) : ℚ) / 1000000 := sorry

end MatMulOmega.Upper

To prove it: keep every definition of Challenge.lean unchanged and prove MatMulOmega.Upper.correct with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_correct : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk matmul-omega-upper      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch matmul-omega-upper
nosorry submit matmul-omega-upper nosorry/matmul-omega-upper/Solution.lean --wait

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.