Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Scaled integer matrix multiplication in near-ω\omegaω time on the word RAM

Proved
VWZClique.scaled_matrix_multiplication_word_ram

by orz · Nov 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

clique-countingmatrix-multiplicationword-ram

For every η>0\eta>0η>0 and every fixed input-size exponent ddd, one finite word-RAM program takes two row-major n×nn\times nn×n integer matrices A,BA,BA,B with entry magnitudes at most ndn^dnd. For every n≥2n\ge2n≥2 it halts within CnωC+ηC n^{\omega_{\mathbb C}+\eta}CnωC​+η instructions, using words of w(⌊log⁡2n⌋+1)w(\lfloor\log_2 n\rfloor+1)w(⌊log2​n⌋+1) bits. Each signed output word is exactly the corresponding entry of σ1+⌊log⁡bn⌋AB\sigma^{1+\lfloor\log_b n\rfloor}ABσ1+⌊logb​n⌋AB, where b≥2b\ge2b≥2 and σ>0\sigma>0σ>0 are constants of the chosen algorithm. The scale is common to the whole matrix. The two inputs and the output occupy three consecutive row-major arrays, with their addresses and the dimension supplied in four designated cells.

Preamble
import Mathlib
import Definitions.Def_OAI_MatrixMultiplication_Arithmetic_omega
import Definitions.Def_TrulySubcubicAPSP_WordRAM
Formal statement
theorem VWZClique.scaled_matrix_multiplication_word_ram (η : ℝ) (hη : 0<η) (d : ℕ) :
    ∃ (b w : ℕ) (σ : ℤ) (P : List TrulySubcubicAPSP.Instr) (C : ℝ),
      2≤b ∧ 0<w ∧ 0<σ ∧ 0<C ∧
      ∀ (n : ℕ), 2≤n → ∀ (A B : Matrix (Fin n) (Fin n) ℤ) (m : ℤ → ℤ),
        (∀ i j, |A i j|≤(n:ℤ)^d) → (∀ i j, |B i j|≤(n:ℤ)^d) →
        m (-30)=0 → m (-31)=((n*n:ℕ):ℤ) → m (-32)=((2*(n*n):ℕ):ℤ) → m (-34)=(n:ℤ) →
        (∀ i j : Fin n, m ((n*i.val+j.val:ℕ):ℤ)=A i j) →
        (∀ i j : Fin n, m ((n*n+(n*i.val+j.val):ℕ):ℤ)=B i j) →
        ∃ t : ℕ, (t:ℝ)≤C*(n:ℝ)^(OAI.MatrixMultiplication.Arithmetic.omega ℂ+η) ∧
          ∃ out : ℤ → BitVec (w*(n.log2+1)),
            TrulySubcubicAPSP.exec P t 0 (fun z => BitVec.ofInt _ (m z))=some (true,out) ∧
            ∀ i j : Fin n, (out ((2*(n*n)+(n*i.val+j.val):ℕ):ℤ)).toInt=
              σ^(Nat.log b n+1)*(A*B) i j := by sorry
Source
V. Vassilevska Williams and O. Zamir, The k-Clique hypothesis is dead, for good, Appendix A, pp. 21–22, especially p. 22, paragraph “To implement a matrix product”. This theorem isolates the scaled integer multiplication subroutine. https://zamir.prof/kclq.pdf

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me