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.Analysis.Calculus.FDeriv.Symmetric |
| 2 | import Mathlib.Analysis.Calculus.IteratedDeriv.FaaDiBruno |
| 3 | import Mathlib.Analysis.Calculus.Taylor |
| 4 | import YM.PREC.Implicit |
| 5 | import YM.Pressure.Seeds |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | /-! |
| 11 | # Getting a Hessian from the quadratic limits on lines |
| 12 | |
| 13 | Real C² germs. We won't need a remainder estimate independent of the period, or even |
| 14 | independent of the direction. This also lets us handle the infinite rows without needing |
| 15 | an identity expressing the Hessian as a sum of Hessians. Includes the pullback we're going |
| 16 | to use for the slice coordinates. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | noncomputable section |
| 21 | |
| 22 | namespace YM.Work.F03 |
| 23 | |
| 24 | open Filter Function |
| 25 | open scoped ContDiff Topology |
| 26 | |
| 27 | variable {E F : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 28 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 29 | |
| 30 | lemma value_slope_of_sq_limit {f : ℝ → ℝ} (hc : ContinuousAt f 0) {b : ℝ} |
| 31 | (h : Tendsto (fun t : ℝ => f t / t ^ 2) (𝓝[≠] 0) (𝓝 b)) : |
| 32 | f 0 = 0 ∧ HasDerivAt f 0 0 := by |
| 33 | have hid : Tendsto (fun t : ℝ => t) (𝓝[≠] 0) (𝓝 0) := |
| 34 | tendsto_id.mono_left nhdsWithin_le_nhds |
| 35 | have ne : ∀ᶠ t : ℝ in 𝓝[≠] 0, t ≠ 0 := self_mem_nhdsWithin |
| 36 | have hv : Tendsto f (𝓝[≠] 0) (𝓝 0) := by |
| 37 | have ha := h.mul (hid.pow 2) |
| 38 | norm_num at ha |
| 39 | refine ha.congr' (ne.mono fun t ht => ?_) |
| 40 | exact div_mul_cancel₀ (f t) (pow_ne_zero 2 ht) |
| 41 | have hz := tendsto_nhds_unique (hc.tendsto.mono_left nhdsWithin_le_nhds) hv |
| 42 | refine ⟨hz, hasDerivAt_iff_tendsto_slope.mpr ?_⟩ |
| 43 | have hd := h.mul hid |
| 44 | rw [mul_zero] at hd |
| 45 | refine hd.congr' (ne.mono fun t ht => ?_) |
| 46 | rw [slope_def_field, hz, sub_zero, sub_zero]; field_simp |
| 47 | |
| 48 | /-- At a critical point, with the value subtracted. -/ |
| 49 | lemma taylor_limit_two {f : ℝ → ℝ} (hd : ContDiffAt ℝ 2 f 0) (hz : f 0 = 0) |
| 50 | (hf : deriv f 0 = 0) : |
| 51 | Tendsto (fun t : ℝ => f t / t ^ 2) (𝓝[≠] 0) (𝓝 (iteratedDeriv 2 f 0 / 2)) := by |
| 52 | obtain ⟨s, hs, hu⟩ := hd.contDiffOn (m := 2) le_rfl (by simp) |
| 53 | obtain ⟨r, hr, hr'⟩ := Metric.mem_nhds_iff.mp hs |
| 54 | let I := Metric.ball (0 : ℝ) r |
| 55 | have h0 : 0 ∈ I := Metric.mem_ball_self hr |
| 56 | have ht := Real.taylor_tendsto (n := 2) (convex_ball (0 : ℝ) r) h0 (hu.mono hr') |
| 57 | rw [nhdsWithin_eq_nhds.mpr (Metric.isOpen_ball.mem_nhds h0)] at ht |
| 58 | have he (j : ℕ) : iteratedDerivWithin j f I 0 = iteratedDeriv j f 0 := |
| 59 | iteratedDerivWithin_of_isOpen Metric.isOpen_ball h0 |
| 60 | have hw (x : ℝ) : taylorWithinEval f 2 I 0 x = x ^ 2 * (iteratedDeriv 2 f 0 / 2) := by |
| 61 | rw [taylor_within_apply, Finset.sum_range_succ, Finset.sum_range_succ, Finset.sum_range_one] |
| 62 | simp_rw [he]; norm_num [Nat.factorial, hf, hz]; ring |
| 63 | have hh : Tendsto (fun t : ℝ => (f t - t ^ 2 * (iteratedDeriv 2 f 0 / 2)) / t ^ 2 + |
| 64 | iteratedDeriv 2 f 0 / 2) (𝓝[≠] 0) (𝓝 (iteratedDeriv 2 f 0 / 2)) := by |
| 65 | simpa only [I, hw, sub_zero, zero_add] using |
| 66 | (ht.mono_left (nhdsWithin_le_nhds (s := {0}ᶜ))).add_const (iteratedDeriv 2 f 0 / 2) |
| 67 | refine hh.congr' ?_ |
| 68 | filter_upwards [show ∀ᶠ t : ℝ in 𝓝[≠] 0, t ≠ 0 from self_mem_nhdsWithin] with t ht |
| 69 | field_simp; ring |
| 70 | |
| 71 | lemma line_second {f : E → ℝ} (hf : ContDiffAt ℝ 2 f 0) (hg : fderiv ℝ f 0 = 0) |
| 72 | (v : E) : iteratedDeriv 2 (fun t : ℝ => f (t • v)) 0 = |
| 73 | iteratedFDeriv ℝ 2 f 0 ![v,v] := by |
| 74 | let l : ℝ → E := fun t => t • v |
| 75 | have hl : HasDerivAt l v 0 := by simpa using! (hasDerivAt_id' (0:ℝ)).smul_const v |
| 76 | have ha : ContDiffAt ℝ 2 l 0 := by unfold l; fun_prop |
| 77 | change iteratedDeriv 2 (f ∘ l) 0 = _ |
| 78 | rw [iteratedDeriv_vcomp_two (show ContDiffAt ℝ 2 f (l 0) by simpa [l] using hf) ha, |
| 79 | hl.deriv, show l 0 = 0 by simp [l], hg] |
| 80 | rw [iteratedFDeriv_two_apply, iteratedFDeriv_two_apply] |
| 81 | simp |
| 82 | |
| 83 | lemma hessian_symmetric {f : E → ℝ} (hf : ContDiffAt ℝ 2 f 0) (v w : E) : |
| 84 | iteratedFDeriv ℝ 2 f 0 ![v,w] = iteratedFDeriv ℝ 2 f 0 ![w,v] := by |
| 85 | rw [iteratedFDeriv_two_apply, iteratedFDeriv_two_apply] |
| 86 | exact hf.isSymmSndFDerivAt (by simp) v w |
| 87 | |
| 88 | /-- Recover the bilinear identity from its diagonal. -/ |
| 89 | lemma hessian_polar {f : E → ℝ} (hf : ContDiffAt ℝ 2 f 0) |
| 90 | {Q : E → E → ℝ} (hadd : ∀ x y z, Q (x+y) z = Q x z + Q y z) |
| 91 | (hsym : ∀ x y, Q x y = Q y x) |
| 92 | (hdiag : ∀ x, iteratedFDeriv ℝ 2 f 0 ![x,x] = Q x x) (x y : E) : |
| 93 | iteratedFDeriv ℝ 2 f 0 ![x,y] = Q x y := by |
| 94 | have ha : iteratedFDeriv ℝ 2 f 0 ![x+y,x+y] = |
| 95 | (iteratedFDeriv ℝ 2 f 0 ![x,x] + iteratedFDeriv ℝ 2 f 0 ![x,y]) + |
| 96 | (iteratedFDeriv ℝ 2 f 0 ![y,x] + iteratedFDeriv ℝ 2 f 0 ![y,y]) := by |
| 97 | simp [iteratedFDeriv_two_apply] |
| 98 | rw [hessian_symmetric hf y x, hdiag, hdiag, hdiag, hadd, hsym x (x+y), hsym y (x+y), |
| 99 | hadd, hadd, hsym y x] at ha |
| 100 | linarith |
| 101 | |
| 102 | lemma hessian_of_limit {f : E → ℝ} (hf : ContDiffAt ℝ 2 f 0) {Q : E → E → ℝ} |
| 103 | (lim : ∀ x : E, Tendsto (fun t : ℝ => f (t • x) / t ^ 2) (𝓝[≠] 0) (𝓝 (Q x x / 2))) |
| 104 | (ha : ∀ x y z, Q (x+y) z = Q x z + Q y z) (hs : ∀ x y, Q x y = Q y x) : |
| 105 | f 0 = 0 ∧ fderiv ℝ f 0 = 0 ∧ ∀ x y, iteratedFDeriv ℝ 2 f 0 ![x,y] = Q x y := by |
| 106 | have hd (x : E) : ContDiffAt ℝ 2 (fun t : ℝ => f (t • x)) 0 := by |
| 107 | have hv : ContDiffAt ℝ 2 (fun t : ℝ => t • x) 0 := by fun_prop |
| 108 | exact (show ContDiffAt ℝ 2 f ((0:ℝ) • x) by simpa using hf).comp 0 hv |
| 109 | have hz (x : E) := value_slope_of_sq_limit (hd x).continuousAt (lim x) |
| 110 | have hv : f 0 = 0 := by simpa using (hz 0).1 |
| 111 | have hg : fderiv ℝ f 0 = 0 := ContinuousLinearMap.ext (fun x => |
| 112 | (Push.side f (hf.differentiableAt (by simp)) x).unique (hz x).2) |
| 113 | refine ⟨hv, hg, hessian_polar hf ha hs ?_⟩ |
| 114 | intro x |
| 115 | have he := tendsto_nhds_unique (taylor_limit_two (hd x) (hz x).1 (hz x).2.deriv) (lim x) |
| 116 | rw [line_second hf hg] at he |
| 117 | linarith |
| 118 | |
| 119 | /-- Pull back a Hessian when the outer gradient is zero. -/ |
| 120 | lemma hessian_comp {f : E → ℝ} {g : F → E} (hz : g 0 = 0) (hf : ContDiffAt ℝ 2 f 0) |
| 121 | (hg : ContDiffAt ℝ 2 g 0) (hv : fderiv ℝ f 0 = 0) : |
| 122 | fderiv ℝ (f ∘ g) 0 = 0 ∧ ∀ x y, |
| 123 | iteratedFDeriv ℝ 2 (f ∘ g) 0 ![x,y] = |
| 124 | iteratedFDeriv ℝ 2 f 0 ![fderiv ℝ g 0 x, fderiv ℝ g 0 y] := by |
| 125 | have hf' : ContDiffAt ℝ 2 f (g 0) := hz.symm ▸ hf |
| 126 | have hcomp := hf'.comp 0 hg |
| 127 | have hd : fderiv ℝ (f ∘ g) 0 = 0 := by |
| 128 | rw [fderiv_comp _ (hf'.differentiableAt (by simp)) (hg.differentiableAt (by simp)), hz, hv] |
| 129 | simp |
| 130 | refine ⟨hd, hessian_polar hcomp (Q := fun x y => |
| 131 | iteratedFDeriv ℝ 2 f 0 ![fderiv ℝ g 0 x, fderiv ℝ g 0 y]) ?_ ?_ ?_⟩ |
| 132 | · intro x y z; simp [iteratedFDeriv_two_apply] |
| 133 | · exact fun _ _ => hessian_symmetric hf _ _ |
| 134 | intro x |
| 135 | rw [← line_second (f := f ∘ g) hcomp hd] |
| 136 | have he : ContDiffAt ℝ 2 (fun t : ℝ => g (t • x)) 0 := by |
| 137 | have hk : ContDiffAt ℝ 2 (fun t : ℝ => t • x) 0 := by fun_prop |
| 138 | exact (show ContDiffAt ℝ 2 g ((0:ℝ) • x) by simpa using hg).comp 0 hk |
| 139 | change iteratedDeriv 2 (f ∘ (fun t : ℝ => g (t • x))) 0 = _ |
| 140 | rw [iteratedDeriv_vcomp_two (by simpa using hf') he, |
| 141 | (Push.side g (hg.differentiableAt (by simp)) x).deriv] |
| 142 | simp [hz, hv, iteratedFDeriv_two_apply] |
| 143 | |
| 144 | end YM.Work.F03 |