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.Taylor |
| 2 | import YM.Next.RANK.Ray |
| 3 | import YM.Next.RANK.SpectrumReal |
| 4 | import YM.PREC.Derivative |
| 5 | |
| 6 | |
| 7 | |
| 8 | /-! # Build and pay origin Taylor polynomials without changing link norm data |
| 9 | |
| 10 | Use only charged cube directions scaled by the *old* threshold t. |
| 11 | On a step of a ray in such directions, the derivatives needed for Taylor |
| 12 | are precisely the single-link-left increment derivatives with that direction, |
| 13 | without lossy BV or smooth-bound replacements. Evaluations of M.pol counted |
| 14 | at this threshold for calibration. -/ |
| 15 | set_option autoImplicit false |
| 16 | noncomputable section |
| 17 | namespace YM.Next.Rank.Spindle |
| 18 | open RG Lattice Wilson Source Labels MvPolynomial Rise Normal Finset Filter Set Asymptotics |
| 19 | open scoped Topology BigOperators Matrix.Norms.Frobenius Classical ContDiff |
| 20 | |
| 21 | variable {E A : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 22 | |
| 23 | private def act (x : E) := (ContinuousLinearMap.id ℝ ℝ).smulRight x |
| 24 | lemma upon (x : E) (f : E → ℂ) (n : ℕ) (hf : ContDiffAt ℝ n f 0) : iteratedDeriv n (fun t : ℝ => f (t • x)) 0 = |
| 25 | (iteratedFDeriv ℝ n f 0) (fun _ => x) := by |
| 26 | let L:= act x |
| 27 | obtain ⟨r,hr,H⟩ := Metric.mem_nhds_iff.mp (hf.eventually (by simp)) |
| 28 | let B:= Metric.ball (0:E) r |
| 29 | have ho : IsOpen (L ⁻¹' B) := Metric.isOpen_ball.preimage L.continuous |
| 30 | have hz : L 0∈B := map_zero L ▸ Metric.mem_ball_self hr |
| 31 | have h : ContDiffOn ℝ n f B := fun y hy => (show ContDiffAt ℝ n f y from H hy).contDiffWithinAt |
| 32 | have he := L.iteratedFDerivWithin_comp_right h Metric.isOpen_ball.uniqueDiffOn ho.uniqueDiffOn hz (i:=n) le_rfl |
| 33 | rw [iteratedFDerivWithin_of_isOpen _ ho (show 0∈L ⁻¹' B from hz),iteratedFDerivWithin_of_isOpen _ Metric.isOpen_ball hz,map_zero] at he |
| 34 | change iteratedDeriv n (f ∘ L) 0=_; rw [iteratedDeriv_eq_iteratedFDeriv,he] |
| 35 | change (iteratedFDeriv ℝ n f 0) (fun _=> (1:ℝ) • x)=_; simp |
| 36 | |
| 37 | /-- D reasonably fixed. -/ |
| 38 | lemma explicit {V : Type*} [Fintype V] (d : ℕ) |
| 39 | (M : V → E) (A : E → ℂ) (W : E → V → ℝ) (h : ∀ x : E,x=∑ i,(W x i) • M i) |
| 40 | (H : ContDiffAt ℝ d A 0) : ∃ P : poly V, totalDegree P≤d ∧ ∀ x : E, ∀ t : ℝ, |
| 41 | text (fun i => t*(W x i)) P=∑ i ∈ range (d+1), ((i.factorial:ℝ)⁻¹*t^i) • iteratedDeriv i (fun t : ℝ => A (t • x)) 0 := by |
| 42 | let f (i : ℕ) (p : Fin i → E) := (iteratedFDeriv ℝ i A 0) p |
| 43 | let F (i : ℕ) := (iteratedFDeriv ℝ i A 0).toMultilinearMap |
| 44 | let C (i : ℕ) (w : Fin i → V) := (i.factorial:ℝ)⁻¹ • f i (fun j => M (w j)) |
| 45 | let p (i : ℕ) := ∑ w : Fin i → V, MvPolynomial.C (C i w)* ∏ j, MvPolynomial.X (w j) |
| 46 | let P :=∑ i∈range (d+1),p i |
| 47 | refine ⟨P,(totalDegree_finsetSum ..).trans (Finset.sup_le ?_),fun x t => ?_⟩ |
| 48 | · intro i hi; apply (totalDegree_finsetSum ..).trans; apply Finset.sup_le; intro w _ |
| 49 | apply (totalDegree_mul ..).trans; rw [totalDegree_C,zero_add] |
| 50 | apply (totalDegree_finsetProd ..).trans; simp only [totalDegree_X,sum_const, card_univ,Fintype.card_fin,nsmul_eq_mul,mul_one] |
| 51 | exact Nat.le_of_lt_succ (mem_range.mp hi) |
| 52 | unfold text P; rw [map_sum]; apply sum_congr rfl; intro i hi |
| 53 | let b:= (i.factorial:ℝ)⁻¹ |
| 54 | have he : i≤d := Nat.le_of_lt_succ (mem_range.mp hi) |
| 55 | rw [upon ..]; rotate_left; exact H.of_le (by exact_mod_cast he) |
| 56 | have ha : f i (fun _=>x) = ∑ w : Fin i→V,(∏ j, W x (w j)) • f i (fun j => M (w j)) := by |
| 57 | change F i (fun _=>x)=_ |
| 58 | conv_lhs => rw [show (fun _ : Fin i=>x)=(fun _=>∑ j,(W x j) • M j) from funext (fun _ => h x)] |
| 59 | rw [(F i).map_sum]; apply Finset.sum_congr rfl; intro z _ |
| 60 | exact (F i).map_smul_univ _ _ |
| 61 | dsimp only [p]; rw [map_sum,show (iteratedFDeriv ℝ i A 0) (fun _=>x) = _ from ha, Finset.smul_sum]; apply Finset.sum_congr rfl; intro w _ |
| 62 | simp only [map_mul,aeval_C |
| 63 | ,Algebra.algebraMap_self,RingHom.id_apply,map_prod,aeval_X,Complex.ofReal_mul,Complex.real_smul,C,Finset.prod_mul_distrib,Finset.prod_const,Finset.card_univ,Fintype.card_fin, Complex.ofReal_prod, Complex.ofReal_inv,Complex.ofReal_pow]; ring |
| 64 | |
| 65 | variable {G : Gauge} {n : Side} {b d : ℕ} {o : Site n} |
| 66 | |
| 67 | def rollin (p : RG.BudgetPoint) (o : Site n) (b : ℕ) : Space G o b→L[ℝ] Directions G n := |
| 68 | let F : Space G o b→ₗ[ℝ] Directions G n := { |
| 69 | toFun x i := if h : i∈ Room o b then p.threshold • x ⟨i,h⟩ else 0 |
| 70 | map_add' x y := by funext i; dsimp only [Pi.add_apply]; split <;> simp [*] |
| 71 | map_smul' x y := by funext i; dsimp only [Pi.smul_apply]; split <;> simp only [*,RingHom.id_apply,smul_zero]; exact smul_comm _ _ _ } |
| 72 | F.toContinuousLinearMap |
| 73 | |
| 74 | def net (p : RG.BudgetPoint) (o : Site n) (b) (x : Space G o b) := increment 1 (rollin p o b x) |
| 75 | |
| 76 | lemma net_in (p : RG.BudgetPoint) (x : Space G o b) (i : Dim o b) : net p o b x i.val=G.lieExp (p.threshold • x i) := by |
| 77 | change G.lieExp (if h : i.val∈Room o b then p.threshold • x ⟨_,h⟩ else 0)*1= _; rw [dif_pos i.property,mul_one] |
| 78 | lemma net_out (p : RG.BudgetPoint) (x : Space G o b) (i : Edge (Site n)) (hi : i∉ Room o b) : net p o b x i = 1 := by |
| 79 | change G.lieExp (if h : i∈ Room o b then p.threshold • x ⟨_,h⟩ else 0)*1=_; rw [dif_neg hi,mul_one,G.mat_lieExp_zero] |
| 80 | lemma encloses (p : RG.BudgetPoint) (x : Space G o b) (h : ‖x‖ ≤ 1) : p.dirBound o (rollin p o b x) := by |
| 81 | intro i |
| 82 | have he:= p.threshold_pos; change ‖(if h : i∈Room o b then p.threshold • x _ else 0)‖≤ _ |
| 83 | split |
| 84 | · rw [norm_smul,Real.norm_of_nonneg he.le]; apply mul_le_mul_of_nonneg_left _ he.le; exact ((pi_norm_le_iff_of_nonneg zero_le_one).1 h _).trans (one_le_pow₀ (by simp)) |
| 85 | rw [norm_zero]; positivity |
| 86 | lemma occupied (p : RG.BudgetPoint) (x : Space G o b) (t : Rules G) (h : ‖x‖≤min t.c (1/8)) : net p o b x ∈ RG.calm G n p.threshold := by |
| 87 | intro i hi; change G.chord (net p o b x i) ≤ _ |
| 88 | have he := p.threshold_pos |
| 89 | by_cases hv : i∈Room o b |
| 90 | · rw [net_in p x (⟨i,hv⟩: Dim o b)] |
| 91 | let j : Dim o b := ⟨i,hv⟩ |
| 92 | obtain ⟨h₁,h₂⟩ := le_min_iff.mp ((norm_le_pi_norm x j).trans h) |
| 93 | have hx : ‖p.threshold • x j‖ ≤ t.c := by rw [norm_smul,Real.norm_of_nonneg he.le]; exact (mul_le_of_le_one_left (norm_nonneg _) p.threshold_le).trans h₁ |
| 94 | refine (t.light _ hx).trans ?_ |
| 95 | rw [norm_smul,Real.norm_of_nonneg he.le]; linarith only [mul_le_mul_of_nonneg_left h₂ he.le] |
| 96 | rw [net_out _ x i hv,G.chord_one]; positivity |
| 97 | |
| 98 | section derivative |
| 99 | variable {X : Support n} {F : Config G n → ℂ} {p : RG.BudgetPoint} |
| 100 | |
| 101 | lemma together (A : G.Color) (s t : ℝ) : G.lieExp ((s+t) • A)= G.lieExp (t • A) * G.lieExp (s • A) := by |
| 102 | apply G.mat_injective; rw [G.mat_lieExp,G.mat_mul,G.mat_lieExp,G.mat_lieExp, map_smul,map_smul,map_smul,add_comm s t, add_smul]; apply NormedSpace.exp_add_of_commute |
| 103 | exact ((Commute.refl _).smul_right s).smul_left t |
| 104 | |
| 105 | lemma progress (U : Config G n) (A : Directions G n) (s t : ℝ) : increment U ((s+t) • A)=increment (increment U (s • A)) (t • A) := by |
| 106 | ext1 i; simp only [increment,Pi.smul_apply,together,mul_assoc] |
| 107 | lemma repeated (p : BudgetPoint) (o : Site n) (x : Space G o b) (s t : ℝ) : net p o b ((s+t) • x) = increment (net p o b (s • x)) (t • rollin p o b x) := by |
| 108 | rw [net,net,map_smul,map_smul, progress] |
| 109 | lemma net_metric (t : ℝ) (s : Space G o b) (n : ℕ) : iteratedDeriv n (fun t : ℝ => F (net p o b (t • s))) t = leftDerivs F (List.replicate n (rollin p o b s)) (net p o b (t • s)) := by |
| 110 | let f := fun t : ℝ => F (net p o b (t • s)) |
| 111 | induction n generalizing t with |
| 112 | | zero => rw [iteratedDeriv_zero]; rfl |
| 113 | | succ n H => |
| 114 | change iteratedDeriv _ f t= _; rw [iteratedDeriv_succ,List.replicate_succ,leftDerivs]; symm |
| 115 | have hp (x : ℝ) : leftDerivs F (List.replicate n (rollin p o b s)) (increment (net p o b (t • s)) (x • rollin p o b s)) = iteratedDeriv n f (t+x) := by rw [← repeated, ← H] |
| 116 | rw [funext hp, deriv_comp_const_add,add_zero] |
| 117 | lemma net_diff {s : ℝ} {x : Space G o b} (H : p.Regular X F) (h : Healthy p.threshold X (net p o b (s • x))) {m : ℕ} (hp : m ≤ p.order) : |
| 118 | ContDiffAt ℝ m (fun t : ℝ => F (net p o b (t • x))) s := by |
| 119 | let g:= Function.comp F (fun i => increment (net p o b (s • x)) i) |
| 120 | let W := fun y : ℝ => (y-s) • rollin p o b x |
| 121 | have he : g∘W=(fun t : ℝ => F (net p o b (t • x))) := by |
| 122 | funext t; dsimp only [Function.comp_apply,g,W]; rw [← repeated,add_sub_cancel] |
| 123 | have hA : W s=0 := by simp [W] |
| 124 | rw [← he]; apply ContDiffAt.comp _ _ (show ContDiffAt ℝ m W s from ?_) |
| 125 | · exact hA ▸ (H.smooth _ h).of_le (by exact_mod_cast hp) |
| 126 | unfold W; fun_prop |
| 127 | |
| 128 | abbrev links (G : Gauge) {n : Side} (o : Site n) (b : ℕ) := Dim o b × G.ColorIndex |
| 129 | |
| 130 | def scan (x : Space G o b) (y : links G o b) : ℝ := x y.1 y.2 |
| 131 | def report (y : links G o b) : Space G o b := Pi.single y.1 (EuclideanSpace.single y.2 1) |
| 132 | lemma marked_sum (x : Space G o b) : x=∑ i, scan x i • report i := by |
| 133 | rw [Fintype.sum_prod_type]; funext i; apply PiLp.ext; intro j; simp [scan,report,Pi.single_apply] |
| 134 | |
| 135 | private lemma cultivate (d : ℕ) (A : Config G n→ ℂ) (X : Support n) (p : RG.BudgetPoint) (hb : d≤p.order) (h : p.Regular X A) : |
| 136 | ∃ P : poly (links G o b), totalDegree P≤d ∧ ∀ x : Space G o b, ∀ t : ℝ,text (fun i => t* scan x i) P= |
| 137 | ∑ i∈range (d+1), ((i.factorial:ℝ)⁻¹*t^i) • iteratedDeriv i (fun t : ℝ => A (net p o b (t • x))) 0 := by |
| 138 | apply explicit d (A:=fun x => A (net p o b x)) (W:=scan) report marked_sum |
| 139 | have hg : flags p.threshold (1:Config G n)=∅ := voids (show (1:Config G n) ∈ calm G n p.threshold from fun i _ => (by change G.chord 1≤_; rw [G.chord_one]; have ht:= p.threshold_pos; positivity)) le_rfl |
| 140 | have hd : Healthy p.threshold X (1:Config G n) := by simp [Healthy,hg] |
| 141 | apply (show ContDiffAt ℝ d (fun x => A (increment 1 x)) (rollin p o b (0 : Space G o b)) from (rollin _ _ _).map_zero ▸ (h.smooth 1 hd).of_le (by exact_mod_cast hb)).comp |
| 142 | (0 : Space G o b) (rollin p o b).contDiff.contDiffAt |
| 143 | |
| 144 | lemma reads_back (y : links G o b → ℝ) (r : ℝ) (hr : 0≤r) (hx : ∀ i,|y i| ≤ r) : |
| 145 | ∃ x : Space G o b, scan x=y ∧ ‖x‖ ≤ (Fintype.card G.ColorIndex)*r := by |
| 146 | let x : Space G o b := fun i => WithLp.toLp 2 fun j => y (i,j) |
| 147 | refine ⟨x,rfl, (pi_norm_le_iff_of_nonneg (by positivity)).2 fun i => ?_⟩ |
| 148 | let F (j : G.ColorIndex) := EuclideanSpace.single j (y (i,j)); have he : x i= ∑ i,F i := by apply PiLp.ext; intro j; simp [F,x] |
| 149 | rw [he]; apply (norm_sum_le ..).trans |
| 150 | rw [show (Fintype.card G.ColorIndex:ℝ)*r=∑ _ : G.ColorIndex,r by simp]; refine sum_le_sum fun j _ => ?_ |
| 151 | simpa only [F,EuclideanSpace.single,PiLp.norm_single, Real.norm_eq_abs] using hx (i,j) |
| 152 | |
| 153 | @[simp] lemma scan_smul (x : Space G o b) (q : ℝ) : scan (q • x)=fun i => q*scan x i := rfl |
| 154 | |
| 155 | def pane (S : Rules G) := min S.c (1/8) |
| 156 | lemma pane_pos (S : Rules G) : 0 < pane S := lt_min S.radius (by norm_num) |
| 157 | lemma pane_le (S : Rules G) : pane S≤ 1/8 := min_le_right .. |
| 158 | |
| 159 | private lemma ray_bound {o : Site n} {b : ℕ} {X : Support n} {A : Config G n → ℂ} {p : RG.BudgetPoint} (S : Rules G) (x : Space G o b) (hx : ‖x‖≤1) (r : ℝ) (hr : r ∈ Set.Icc 0 (pane S)) {c : ℝ} |
| 160 | (h : p.supBounds o X A c) {k : ℕ} (hk : k ≤ p.order) (P : p.Regular X A) : |
| 161 | ContDiffAt ℝ k (fun t : ℝ => A (net p o b (t • x))) r ∧ |
| 162 | ‖iteratedDeriv k (fun t : ℝ => A (net p o b (t • x))) r‖≤c := by |
| 163 | have hg : ‖r • x‖≤pane S := by rw [norm_smul,Real.norm_of_nonneg hr.1]; exact (mul_le_of_le_one_right hr.1 hx).trans hr.2 |
| 164 | have hv : Healthy p.threshold X (net p o b (r • x)) := by simp only [Healthy,voids (occupied p _ S hg) le_rfl,Finset.disjoint_empty_right] |
| 165 | refine ⟨net_diff P hv hk,?_⟩; rw [net_metric]; apply h.2 _ hv _ (by simpa using hk); intro i hi |
| 166 | rw [(List.eq_of_mem_replicate hi)]; exact encloses p x hx |
| 167 | |
| 168 | lemma minted (S : Rules G) (d : ℕ) : ∃ C : ℝ, 0≤C ∧ ∀ (n : Side) (o : Site n) (b : ℕ) (X : Support n) (A : Config G n → ℂ) |
| 169 | (p : RG.BudgetPoint), d+1≤p.order → p.Regular X A → ∀ c : ℝ, p.supBounds o X A c → ∃ P : poly (links G o b), |
| 170 | totalDegree P≤d ∧ coin P ≤ c * ((Fintype.card (links G o b):ℝ)+1)^d*C ∧ |
| 171 | (∀ x : Space G o b, ∀ t : ℝ, text (scan (t • x)) P=∑ i∈range (d+1), ((i.factorial:ℝ)⁻¹*t^i) • iteratedDeriv i (fun t : ℝ => A (net p o b (t • x))) 0) ∧ |
| 172 | ∀ x : Space G o b, ‖x‖≤pane S→ ‖A (net p o b x)-text (scan x) P‖ ≤ c * ‖x‖^(d+1) := by |
| 173 | let e := Fintype.card G.ColorIndex |
| 174 | obtain ⟨C,hC,H⟩ := ball_count d ((1+e:ℝ)⁻¹) (by positivity) |
| 175 | refine ⟨C*(d+1:ℝ),by positivity,fun n o b X A p hb ha c hc => ?_⟩ |
| 176 | have hd := hc.1; obtain ⟨P,hp,h⟩ := cultivate (o:=o) (b:=b) d A X p (by omega) ha |
| 177 | have hz := pane_pos S |
| 178 | refine ⟨P,hp, ?_,h,fun x hx => ?_⟩ |
| 179 | · refine le_trans (H (links G o b) P hp ((d+1:ℝ)*c) (by positivity) fun t ht => ?_) (le_of_eq (by ring)) |
| 180 | obtain ⟨x,hF,hx⟩ := reads_back t _ (by positivity) ht |
| 181 | have hs : ‖x‖≤1 := hx.trans (show (e:ℝ)*_≤1 by rw [← div_eq_mul_inv]; apply div_le_one_of_le₀ _ (by positivity); linarith only) |
| 182 | rw [← hF,show scan x=(fun i => (1:ℝ)*scan x i) from funext (fun i => (one_mul _).symm),h] |
| 183 | apply (norm_sum_le ..).trans; rw [show (d+1:ℝ)*c=∑ i∈range (d+1), c by simp]; refine sum_le_sum fun i hi => ?_; rw [one_pow, mul_one,norm_smul] |
| 184 | apply (mul_le_of_le_one_left (norm_nonneg _) ?_).trans |
| 185 | · exact (ray_bound S x hs 0 ⟨le_rfl,hz.le⟩ hc ((Nat.le_of_lt (mem_range.mp hi)).trans hb) ha).2 |
| 186 | rw [norm_inv,Real.norm_natCast]; exact inv_le_one_of_one_le₀ (by exact_mod_cast (i.factorial_pos)) |
| 187 | let v:= ‖x‖; let y:= v⁻¹ • x; have hv : v∈ Set.Icc 0 (pane S) := ⟨norm_nonneg _,hx⟩ |
| 188 | have he : x=v • y ∧ ‖y‖ ≤ 1 := by |
| 189 | rcases eq_or_ne x 0 with hh|hh |
| 190 | · subst x; simp [y] |
| 191 | have hx : 0<v := norm_pos_iff.mpr hh; unfold y |
| 192 | rw [smul_smul,mul_inv_cancel₀ hx.ne',one_smul,norm_smul,Real.norm_of_nonneg (inv_pos.mpr hx).le,show ‖x‖=v from rfl,inv_mul_cancel₀ hx.ne'] |
| 193 | exact ⟨rfl,le_rfl⟩ |
| 194 | let f := fun t : ℝ => A (net p o b (t • y));let B:=Set.Icc (0:ℝ) (pane S) |
| 195 | have hf (i j) (hp : i∈B) (he' : j≤p.order) := ray_bound S y he.2 i hp hc he' ha |
| 196 | have h0 : 0∈B := ⟨le_rfl,hz.le⟩ |
| 197 | have hg (z i) (hp : z∈B) (hi : i≤p.order) : iteratedDerivWithin i f B z=iteratedDeriv i f z := iteratedDerivWithin_eq_iteratedDeriv (uniqueDiffOn_Icc hz) (hf z i hp hi).1 hp |
| 198 | have ht := taylor_mean_remainder_bound (n:=d) (f:=f) hz.le (fun i hi => ContDiffWithinAt.of_le (hf i (d+1) hi hb).1.contDiffWithinAt (by simp)) hv (C:=c) |
| 199 | fun q h => (by rw [hg _ _ h hb]; exact (hf q _ h hb).2) |
| 200 | have hy : text (scan x) P=taylorWithinEval f d B 0 v := by |
| 201 | rw [he.1,scan_smul,show text _ P= _ from h y v,taylor_within_apply]; refine sum_congr rfl fun i hi => ?_ |
| 202 | rw [sub_zero,hg _ _ h0 ((Nat.le_of_lt (mem_range.mp hi)).trans hb)] |
| 203 | rw [hy, show A (net p o b x)=f v from congr_arg (fun u => A (net p o b u)) he.1] |
| 204 | rw [sub_zero] at ht |
| 205 | exact ht.trans (div_le_self (by positivity) (by exact_mod_cast d.factorial_pos)) |
| 206 | end derivative |
| 207 | end YM.Next.Rank.Spindle |