import OAI.LinearAlgebra.SpectralBooks.ExactExponent import OAI.LinearAlgebra.MatrixFields.Main /-! # My bridge file Small statements that I derive from the theorems of the claimant. The kernel of Lean checks each proof. The file is my own work. -/ set_option format.width 1000 namespace MobiusOtter open OAI.LinearAlgebra open OAI.MatrixMultiplication /-! ## 1. The answer to the question of the registry The question is: "Is the exponent of matrix multiplication equal to 2?" The theorem `square_exponent` gives the answer "no" in the model of the challenge file. The theorem `omega_eq` gives the same answer in the model of the paper, where the circuits have division gates. -/ theorem exponent_is_not_two_division_free (F : Type*) [Field F] : SpectralBooks.formalOmega F 1 1 1 ≠ 2 := by rw [SpectralBooks.square_exponent] norm_num theorem exponent_is_not_two_with_division (F : Type*) [Field F] : MatrixExponent.omega F ≠ 2 := by rw [MatrixExponent.omega_eq] norm_num /-- The same for two fields as examples: the rational numbers and the field with two elements. -/ theorem exponent_rationals : SpectralBooks.formalOmega ℚ 1 1 1 = 9 / 4 := SpectralBooks.square_exponent ℚ theorem exponent_field_two_elements : SpectralBooks.formalOmega (ZMod 2) 1 1 1 = 9 / 4 := SpectralBooks.square_exponent (ZMod 2) /-! ## 2. The two halves of the equality, as separate statements -/ theorem at_most_nine_fourths (F : Type*) [Field F] : SpectralBooks.formalOmega F 1 1 1 ≤ 9 / 4 := le_of_eq (SpectralBooks.square_exponent F) theorem at_least_nine_fourths (F : Type*) [Field F] : 9 / 4 ≤ SpectralBooks.formalOmega F 1 1 1 := ge_of_eq (SpectralBooks.square_exponent F) /-- At weight 1 the rounded wire dimension is the base size itself. Thus the programs of `formalOmega F 1 1 1` multiply two matrices of size `N` by `N`. This is line 34 of `SquareExponent.lean` of the claimant. -/ theorem wireDimension_one (N : ℕ) : SpectralBooks.wireDimension N 1 = N := by simp [SpectralBooks.wireDimension] /-! ## 2b. The two directions, with the definitions of the challenge file The definition `FormalAdmissibleExponent` says: for each positive `ε` there is a positive constant `C` such that each size `N ≥ 1` has a division-free program that is formally correct and has cost at most `C * N^(τ + ε)`. -/ /-- The number 9/4 has the property of the definition. -/ theorem nine_fourths_is_admissible (F : Type*) [Field F] : SpectralBooks.FormalAdmissibleExponent F 1 1 1 (9 / 4) := by rw [← SpectralBooks.square_exponent F] exact SpectralBooks.formalOmega_admissible F (by norm_num) (by norm_num) (by norm_num) /-- The upper bound, in the words of the definition. -/ theorem upper_bound_explicit (F : Type*) [Field F] {ε : ℝ} (hε : 0 < ε) : ∃ C : ℝ, 0 < C ∧ ∀ N : ℕ, 1 ≤ N → ∃ P : Arithmetic.MatrixAlgorithm F (SpectralBooks.wireDimension N 1) (SpectralBooks.wireDimension N 1) (SpectralBooks.wireDimension N 1), SpectralBooks.FormalCorrect P ∧ (P.cost : ℝ) ≤ C * (N : ℝ) ^ ((9 : ℝ) / 4 + ε) := nine_fourths_is_admissible F ε hε /-- No number below 9/4 has the property of the definition. -/ theorem no_exponent_below_nine_fourths (F : Type*) [Field F] {τ : ℝ} (hτ : τ < (9 : ℝ) / 4) : ¬ SpectralBooks.FormalAdmissibleExponent F 1 1 1 τ := by intro hadm set S := {τ : ℝ | SpectralBooks.FormalAdmissibleExponent F 1 1 1 τ} with hS have hnonempty : S.Nonempty := ⟨_, SpectralBooks.formalOmega_admissible F (by norm_num) (by norm_num) (by norm_num)⟩ have h9 : sInf S = (9 : ℝ) / 4 := SpectralBooks.square_exponent F -- The set is bounded below. If it were not, its infimum would be 0. have hbdd : BddBelow S := by by_contra h have h0 := csInf_of_not_bddBelow h rw [h9] at h0 norm_num at h0 have h1 : (9 : ℝ) / 4 ≤ τ := by rw [← h9] exact csInf_le hbdd hadm exact absurd hτ (not_lt.2 h1) /-- The lower bound, in the words of the definition. -/ theorem lower_bound_explicit (F : Type*) [Field F] {τ : ℝ} (hτ : τ < (9 : ℝ) / 4) : ∃ ε : ℝ, 0 < ε ∧ ∀ C : ℝ, 0 < C → ∃ N : ℕ, 1 ≤ N ∧ ∀ P : Arithmetic.MatrixAlgorithm F (SpectralBooks.wireDimension N 1) (SpectralBooks.wireDimension N 1) (SpectralBooks.wireDimension N 1), ¬ (SpectralBooks.FormalCorrect P ∧ (P.cost : ℝ) ≤ C * (N : ℝ) ^ (τ + ε)) := by have h1 : ¬ SpectralBooks.FormalAdmissibleExponent F 1 1 1 τ := no_exponent_below_nine_fourths F hτ unfold SpectralBooks.FormalAdmissibleExponent at h1 by_contra hcon push Not at hcon exact h1 hcon /-! ## 2c. The finite form of the lower bound that Lean has: tensor rank For each side length, Lean has a bound for the tensor rank (a bilinear algorithm over `F`). My file `Check/Finite.lean` derives from it a bound for circuits with division in the model where each gate counts. -/ /-- For each side length `n ≥ 2`, a decomposition of the matrix tensor over `F` into simple tensors has at least `n^(9/4)` terms. -/ theorem tensor_rank_lower_bound (F : Type*) [Field F] {n : ℕ} (hn : 2 ≤ n) : (n : ℝ) ^ ((9 : ℝ) / 4) ≤ (SpectralBooks.tensorRank (SpectralBooks.matrixTensor F n n n) : ℝ) := by rw [← SpectralBooks.square_exponent F] exact SpectralBooks.rpow_formalOmega_le_tensorRank F hn /-- The same bound with the ceiling: at least `⌈n^(9/4)⌉` products. -/ theorem tensor_rank_ceiling_lower_bound (F : Type*) [Field F] {n : ℕ} (hn : 2 ≤ n) : ⌈(n : ℝ) ^ ((9 : ℝ) / 4)⌉₊ ≤ SpectralBooks.tensorRank (SpectralBooks.matrixTensor F n n n) := Nat.ceil_le.2 (tensor_rank_lower_bound F hn) /-- The asymptotic rank of the matrix tensor at side length `n ≥ 2` is `n^(9/4)`. -/ theorem asymptotic_rank_value (F : Type*) [Field F] {n : ℕ} (hn : 2 ≤ n) : SpectralBooks.asymptoticRank (SpectralBooks.matrixTensor F n n n) = (n : ℝ) ^ ((9 : ℝ) / 4) := by rw [SpectralBooks.square_asymptoticRank_eq_rpow_formalOmega F hn, SpectralBooks.square_exponent] /-! ## 3. The bound of the registry link is not 9/4 The registry links the declaration `omega_lt_source_constant`. It states an upper bound below 2371054886006746/10^15. This number is above 9/4. Thus the linked declaration does not state the claim of 24 November 2026. -/ theorem linked_bound_above_nine_fourths : (9 : ℝ) / 4 < 2371054886006746 / 10 ^ 15 := by norm_num theorem linked_bound_minus_nine_fourths : (2371054886006746 : ℝ) / 10 ^ 15 - (9 : ℝ) / 4 = 121054886006746 / 10 ^ 15 := by norm_num /-- The bound of the linked declaration is above 2. Thus this bound alone does not answer the question of the registry. -/ theorem linked_bound_allows_two : (2 : ℝ) < 2371054886006746 / 10 ^ 15 := by norm_num /-- The model of the paper: the new theorem gives a stronger upper bound than the bound of the linked declaration. -/ theorem new_claim_gives_linked_bound (F : Type*) [Field F] : MatrixExponent.omega F < 2371054886006746 / 10 ^ 15 := by rw [MatrixExponent.omega_eq] exact linked_bound_above_nine_fourths end MobiusOtter -- Readable form of the auxiliary statements. #check @OAI.LinearAlgebra.MatrixExponent.Build #check @OAI.LinearAlgebra.MatrixExponent.Computes #check @OAI.LinearAlgebra.MatrixExponent.Admissible #check @OAI.LinearAlgebra.MatrixExponent.omega #check @OAI.LinearAlgebra.MatrixExponent.RankLE #check @OAI.LinearAlgebra.MatrixExponent.omega_eq #check @OAI.LinearAlgebra.MatrixExponent.nine_fourths_le_omega #check @OAI.LinearAlgebra.MatrixExponent.omega_eq_and_rigidity #check @OAI.LinearAlgebra.MatrixExponent.omega_lt_iff_rank #check @OAI.LinearAlgebra.SpectralBooks.formalOmega_square_eq_omega #check @OAI.LinearAlgebra.SpectralBooks.rpow_formalOmega_le_tensorRank #check @OAI.LinearAlgebra.SpectralBooks.square_asymptoticRank_eq_rpow_formalOmega #check @OAI.LinearAlgebra.SpectralBooks.formalOmega_admissible #check @OAI.LinearAlgebra.SpectralBooks.wireDimension #check @OAI.LinearAlgebra.SpectralBooks.FormalAdmissibleExponent #check @OAI.MatrixMultiplication.Arithmetic.naiveAlgorithm_cost_le #check @OAI.MatrixMultiplication.Arithmetic.admissibleExponent_three -- Axioms. #print axioms OAI.LinearAlgebra.MatrixExponent.omega_eq #print axioms OAI.LinearAlgebra.MatrixExponent.nine_fourths_le_omega #print axioms OAI.LinearAlgebra.MatrixExponent.omega_eq_and_rigidity #print axioms OAI.LinearAlgebra.MatrixExponent.omega_lt_iff_rank #print axioms OAI.LinearAlgebra.SpectralBooks.formalOmega_square_eq_omega #print axioms OAI.LinearAlgebra.SpectralBooks.rpow_formalOmega_le_tensorRank #print axioms OAI.LinearAlgebra.SpectralBooks.square_asymptoticRank_eq_rpow_formalOmega #print axioms MobiusOtter.exponent_is_not_two_division_free #print axioms MobiusOtter.exponent_is_not_two_with_division #print axioms MobiusOtter.exponent_rationals #print axioms MobiusOtter.exponent_field_two_elements #print axioms MobiusOtter.at_most_nine_fourths #print axioms MobiusOtter.at_least_nine_fourths #print axioms MobiusOtter.wireDimension_one #print axioms MobiusOtter.nine_fourths_is_admissible #print axioms MobiusOtter.upper_bound_explicit #print axioms MobiusOtter.no_exponent_below_nine_fourths #print axioms MobiusOtter.lower_bound_explicit #print axioms MobiusOtter.tensor_rank_lower_bound #print axioms MobiusOtter.tensor_rank_ceiling_lower_bound #print axioms MobiusOtter.asymptotic_rank_value #print axioms MobiusOtter.linked_bound_above_nine_fourths #print axioms MobiusOtter.linked_bound_minus_nine_fourths #print axioms MobiusOtter.linked_bound_allows_two #print axioms MobiusOtter.new_claim_gives_linked_bound