Yang–Mills: the 2026 Lean construction, rerun and read; the mass gap still open
OpenAI's 2026 Lean construction of 4D Yang–Mills as the expert group keeps it: settle what it proves, rerun it, read it; uniqueness and the mass gap are open, and Clay's problem unsolved

| 1 | import Mathlib.Algebra.Order.Star.Real |
| 2 | import Mathlib.Analysis.Matrix.PosDef |
| 3 | import Mathlib.MeasureTheory.Integral.IntegralEqImproper |
| 4 | import YM.Push.FREE_RESOLVENT.Inverse |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | /-! |
| 11 | # Exact positive-sector log kernel, in physical counting coordinates |
| 12 | |
| 13 | Everything here is real. Integrals are |
| 14 | Lebesgue (absolute integrability, including at zero). The subtraction is |
| 15 | **inside** the integral. In applications to different active spaces, take |
| 16 | the matrix on a single counting key type after reindexing BOTH matrices |
| 17 | and padding inactive keys by *ones* (see the sector interface). No requirement |
| 18 | that there are any keys at all. |
| 19 | -/ |
| 20 | set_option autoImplicit false |
| 21 | |
| 22 | noncomputable section |
| 23 | namespace YM.AnalyticBridge.RelativeLogdet |
| 24 | open Filter Function Matrix Unitary MeasureTheory Set FreeResolvent |
| 25 | open scoped Topology BigOperators |
| 26 | |
| 27 | /-- Shift decay. -/ |
| 28 | def attenuation (u : ℝ) := (1+u)⁻¹ |
| 29 | |
| 30 | lemma attenuation_pos {u : ℝ} (hu : 0 ≤ u) : 0 < attenuation u := by unfold attenuation; positivity |
| 31 | lemma attenuation_le {u : ℝ} (hu : 0 ≤ u) : attenuation u ≤ 1 := |
| 32 | inv_le_one_of_one_le₀ (le_add_of_nonneg_right hu) |
| 33 | |
| 34 | private lemma sink (a : ℝ) : Tendsto (fun u : ℝ => (a+u)⁻¹) atTop (𝓝 0) := |
| 35 | tendsto_inv_atTop_zero.comp (tendsto_atTop_add_const_left _ _ tendsto_id) |
| 36 | |
| 37 | lemma attenuation_square : IntegrableOn (fun u => attenuation u ^ 2) (Ioi 0) ∧ |
| 38 | (∫ u in Ioi 0, attenuation u ^ 2) = 1 := by |
| 39 | let F := fun u => -attenuation u |
| 40 | have ht : Tendsto F atTop (𝓝 0) := by simpa only [F,attenuation,neg_zero] using (sink 1).neg |
| 41 | have he (u : ℝ) (h : u ∈ Ici 0) : HasDerivAt F (attenuation u ^ 2) u := by |
| 42 | have hu := mem_Ici.mp h |
| 43 | have hx := ((hasDerivAt_id' u).const_add 1).inv (show 1+u ≠ 0 from ne_of_gt (by linarith)) |
| 44 | simpa only [F,attenuation,one_div, neg_div,neg_neg,inv_pow] using! hx.neg |
| 45 | have hi := integrableOn_Ioi_deriv_of_nonneg' he (fun _ _ => sq_nonneg _) ht |
| 46 | exact ⟨hi, (integral_Ioi_of_hasDerivAt_of_tendsto' he hi ht).trans (by simp [F,attenuation])⟩ |
| 47 | |
| 48 | /-- Scalar real-spectral logarithm formula used **per entry**. -/ |
| 49 | lemma log_scalar {a : ℝ} (ha : 0 < a) : |
| 50 | IntegrableOn (fun u => attenuation u - (a+u)⁻¹) (Ioi 0) ∧ |
| 51 | (∫ u in Ioi 0, attenuation u - (a+u)⁻¹) = Real.log a := by |
| 52 | let F := fun u => Real.log (1+u) - Real.log (a+u) |
| 53 | have ht : Tendsto F atTop (𝓝 0) := by |
| 54 | have he : Tendsto (fun u : ℝ => (1+u)/(a+u)) atTop (𝓝 1) := by |
| 55 | have hi : Tendsto (fun u : ℝ => 1 + (1-a)*(a+u)⁻¹) atTop (𝓝 1) := by |
| 56 | simpa using! (((sink a).const_mul (1-a)).const_add 1) |
| 57 | refine hi.congr' ?_ |
| 58 | filter_upwards [eventually_ge_atTop (0:ℝ)] with x hx |
| 59 | field_simp |
| 60 | ring |
| 61 | have hm := he.log (by norm_num) |
| 62 | rw [Real.log_one] at hm |
| 63 | apply hm.congr' |
| 64 | filter_upwards [eventually_ge_atTop (0:ℝ)] with x hx |
| 65 | exact Real.log_div (ne_of_gt (by linarith)) (ne_of_gt (by linarith)) |
| 66 | have hd (u : ℝ) (hu : u ∈ Ici 0) : HasDerivAt F (attenuation u - (a+u)⁻¹) u := by |
| 67 | have hx := mem_Ici.mp hu |
| 68 | have h (x : ℝ) (hp : 0<x) := ((hasDerivAt_id' u).const_add x).log (show x+u ≠ 0 from ne_of_gt (by linarith)) |
| 69 | simpa only [F,attenuation, one_div] using! (h 1 zero_lt_one).sub (h a ha) |
| 70 | suffices h : IntegrableOn (fun u => attenuation u - (a+u)⁻¹) (Ioi 0) from |
| 71 | ⟨h, by simpa only [F,add_zero,Real.log_one,zero_sub,neg_neg] using integral_Ioi_of_hasDerivAt_of_tendsto' hd h ht⟩ |
| 72 | rcases le_total 1 a with h|h |
| 73 | · exact integrableOn_Ioi_deriv_of_nonneg' hd (fun x hx => sub_nonneg.mpr |
| 74 | (inv_anti₀ (by have := mem_Ioi.mp hx; positivity) (by linarith))) ht |
| 75 | exact integrableOn_Ioi_deriv_of_nonpos' hd (fun x hx => sub_nonpos.mpr |
| 76 | (inv_anti₀ (by have := mem_Ioi.mp hx; positivity) (by linarith))) ht |
| 77 | |
| 78 | abbrev Square (ι : Type*) := Matrix ι ι ℝ |
| 79 | variable {ι : Type*} [Fintype ι] [DecidableEq ι] {A B : Square ι} |
| 80 | |
| 81 | omit [Fintype ι] in |
| 82 | lemma scalar_diagonal (u : ℝ) : u • (1 : Square ι) = diagonal (fun _ => u) := by |
| 83 | ext i j; by_cases i=j <;> simp [*, Matrix.diagonal, one_apply] |
| 84 | omit [Fintype ι] in |
| 85 | lemma shift_posDef (hA : A.PosDef) {u : ℝ} (hu : 0 ≤ u) : (A+u • 1).PosDef := by |
| 86 | rw [scalar_diagonal]; exact hA.add_posSemidef (.diagonal fun _ => hu) |
| 87 | |
| 88 | private lemma spectrum_shift (hA : A.PosDef) (u : ℝ) : |
| 89 | let h := hA.1 |
| 90 | let U := conjStarAlgAut ℝ _ h.eigenvectorUnitary |
| 91 | A + u • 1 = U (diagonal fun i => h.eigenvalues i+u) := by |
| 92 | intro h U |
| 93 | have he : A=U (diagonal h.eigenvalues) := h.spectral_theorem |
| 94 | rw [show diagonal (fun i => h.eigenvalues i+u) = diagonal h.eigenvalues + u • (1:Square ι) by |
| 95 | rw [scalar_diagonal, ← Matrix.diagonal_add], map_add, map_smul, map_one, ← he] |
| 96 | |
| 97 | private lemma spectrum_inverse (hA : A.PosDef) {u : ℝ} (hu : 0 ≤ u) : |
| 98 | let h := hA.1 |
| 99 | resolve A u = conjStarAlgAut ℝ _ h.eigenvectorUnitary (diagonal fun i => (h.eigenvalues i+u)⁻¹) := by |
| 100 | intro h |
| 101 | apply Matrix.inv_eq_right_inv |
| 102 | have hl (i : ι) : h.eigenvalues i + u ≠ 0 := (add_pos_of_pos_of_nonneg (hA.eigenvalues_pos _) hu).ne' |
| 103 | let U := conjStarAlgAut ℝ _ h.eigenvectorUnitary |
| 104 | rw [spectrum_shift hA u, ← map_mul] |
| 105 | change U _ = _ |
| 106 | rw [diagonal_mul_diagonal] |
| 107 | simp [hl] |
| 108 | |
| 109 | /-- Resolvent kernel of the logarithm. -/ |
| 110 | def density (A : Square ι) (u : ℝ) := attenuation u • (1:Square ι) - resolve A u |
| 111 | |
| 112 | /-- The spectral log in E on real PosDef (see `spectralLog`); |
| 113 | use absolute convergence receipts to apply. |
| 114 | No use of the total default of `integral` to claim identities. -/ |
| 115 | def logKernel (A : Square ι) : Square ι := Matrix.of fun i j => ∫ u in Ioi 0, density A u i j |
| 116 | |
| 117 | lemma density_eigen (hA : A.PosDef) {u : ℝ} (hu : 0 ≤ u) : |
| 118 | let h := hA.1 |
| 119 | density A u = conjStarAlgAut ℝ _ h.eigenvectorUnitary |
| 120 | (diagonal fun i => attenuation u - (h.eigenvalues i+u)⁻¹) := by |
| 121 | intro h |
| 122 | unfold density; rw [spectrum_inverse hA hu] |
| 123 | let D : Square ι := diagonal fun i => (h.eigenvalues i + u)⁻¹ |
| 124 | rw [show diagonal (fun i => attenuation u-(h.eigenvalues i+u)⁻¹) = attenuation u • 1 - D by |
| 125 | unfold D; rw [scalar_diagonal, ← diagonal_sub], map_sub,map_smul,map_one] |
| 126 | |
| 127 | lemma conjugate_entry (U : Matrix.unitaryGroup ι ℝ) (d : ι → ℝ) (i j : ι) : |
| 128 | conjStarAlgAut ℝ _ U (diagonal d) i j = ∑ k, (U.val i k * U.valᴴ k j)*d k := by |
| 129 | change (U.val * Matrix.diagonal d * U.valᴴ) i j = _ |
| 130 | rw [Matrix.mul_apply] |
| 131 | simp_rw [Matrix.mul_diagonal]; apply Finset.sum_congr rfl; intros; ring |
| 132 | |
| 133 | lemma logEntry_formula (hA : A.PosDef) (i j) : |
| 134 | let h := hA.1 |
| 135 | IntegrableOn (fun u => density A u i j) (Ioi 0) ∧ |
| 136 | logKernel A i j = conjStarAlgAut ℝ _ h.eigenvectorUnitary (diagonal fun k => Real.log (h.eigenvalues k)) i j := by |
| 137 | intro h |
| 138 | let U := h.eigenvectorUnitary |
| 139 | let g (k : ι) := U.val i k * U.valᴴ k j |
| 140 | let f k u := g k * (attenuation u - (h.eigenvalues k+u)⁻¹) |
| 141 | have he : EqOn (fun u => ∑ k,f k u) (fun u => density A u i j) (Ioi 0) := by |
| 142 | intro u hu; change (∑ k,f k u)=density A u i j; rw [density_eigen hA hu.out.le] |
| 143 | exact (conjugate_entry U _ i j).symm |
| 144 | have ht k : Integrable (f k) (volume.restrict (Ioi 0)) := (log_scalar (hA.eigenvalues_pos k)).1.const_mul (g k) |
| 145 | refine ⟨IntegrableOn.congr_fun (integrable_finsetSum _ (fun k _ => ht k)) he measurableSet_Ioi,?_⟩ |
| 146 | rw [logKernel, of_apply, setIntegral_congr_fun measurableSet_Ioi he.symm,integral_finsetSum _ fun k _ => ht k, |
| 147 | conjugate_entry] |
| 148 | apply Finset.sum_congr rfl |
| 149 | intro k _ |
| 150 | unfold f; rw [integral_const_mul,(log_scalar (hA.eigenvalues_pos k)).2] |
| 151 | |
| 152 | /-- Hence exactly the real-positive-spectrum matrix log. -/ |
| 153 | theorem spectralLog (hA : A.PosDef) : |
| 154 | logKernel A = conjStarAlgAut ℝ _ hA.1.eigenvectorUnitary (diagonal fun i => Real.log (hA.1.eigenvalues i)) := by |
| 155 | ext i j; exact (logEntry_formula hA ..).2 |
| 156 | |
| 157 | lemma log_trace (hA : A.PosDef) : Real.log A.det = ∑ i : ι, logKernel A i i := by |
| 158 | let U := hA.1.eigenvectorUnitary |
| 159 | let D := diagonal fun i => Real.log (hA.1.eigenvalues i) |
| 160 | rw [spectralLog hA, hA.1.det_eq_prod_eigenvalues] |
| 161 | change Real.log (∏ i : ι,hA.1.eigenvalues i) = Matrix.trace (U.val*D*U.valᴴ) |
| 162 | rw [Real.log_prod (fun i _ => (hA.eigenvalues_pos _).ne'), Matrix.trace_mul_comm,← Matrix.mul_assoc, |
| 163 | show U.valᴴ*U.val=1 from U.prop.1, Matrix.one_mul, Matrix.trace_diagonal] |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | end YM.AnalyticBridge.RelativeLogdet |