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 YM.Next.EXTRACTION.Tails |
| 2 | |
| 3 | /-! Exact first variation of the physical Wilson energy on a torus, in left Lie components |
| 4 | *as read at the specified oriented link*. E eq. (jhaar) convention, probability-Haar base, |
| 5 | no coupling folded into `force`. This works at all periods including tiny/wrapping ones by |
| 6 | counting occurrences. Color = physical HS normalization. No small-field assumption. |
| 7 | -/ |
| 8 | set_option autoImplicit false |
| 9 | noncomputable section |
| 10 | namespace YM.StressFlux |
| 11 | open Function Set Filter Gauge Lattice Wilson MeasureTheory |
| 12 | open scoped Topology BigOperators Matrix.Norms.Frobenius ContDiff InnerProductSpace |
| 13 | |
| 14 | variable {G : Gauge} {n : Side} |
| 15 | |
| 16 | section Trace |
| 17 | attribute [local instance] Gauge.frobInner |
| 18 | lemma price_direction (g : G.El) (c : G.Color) : - (G.colorMat c * G.mat g).trace.re / G.repDim = ⟪c,G.curvature g⟫_ℝ := by |
| 19 | let P := (1/2 : ℝ) • (G.mat g - G.mat g⁻¹) |
| 20 | let X := G.colorMat c |
| 21 | have he := Submodule.starProjection_inner_eq_zero P (G.colorMat c) (G.colorMat_mem c) |
| 22 | rw [inner_sub_left, ← G.colorMat_project] at he |
| 23 | change (P * star X).trace.re - (G.colorMat (G.curvature g) * star X).trace.re = 0 at he |
| 24 | rw [show star X = -X from G.colorMat_skew c,mul_neg,mul_neg,Matrix.trace_neg, Matrix.trace_neg, Complex.neg_re,Complex.neg_re, |
| 25 | show - (G.colorMat (G.curvature g)*X).trace.re = _ from G.trace_color _ c, real_inner_comm c] at he |
| 26 | have hi : (G.mat g⁻¹ * X).trace.re = -(X * G.mat g).trace.re := by |
| 27 | have ht : (star (X*G.mat g)).trace.re = (X*G.mat g).trace.re := by rw [Matrix.star_eq_conjTranspose, Matrix.trace_conjTranspose]; rfl |
| 28 | rw [← ht,star_mul,show star X = -X from G.colorMat_skew c,G.mat_inv]; simp |
| 29 | have hP : (P*X).trace.re=(X*G.mat g).trace.re := by simp [P,sub_mul,-Gauge.mat_inv,Matrix.trace_mul_comm (G.mat g),hi]; ring |
| 30 | rw [hP] at he; rw [div_eq_iff (by exact_mod_cast G.dimPos.ne')]; unfold X at he; linarith |
| 31 | |
| 32 | private lemma twice_price (c d : G.Color) (g h : G.El) : |
| 33 | HasDerivAt (fun t : ℝ => G.price (G.lieExp (t • c) * g * (G.lieExp (t • d))⁻¹ * h)) |
| 34 | (⟪c,G.curvature (g*h)⟫_ℝ - ⟪d,G.curvature (h*g)⟫_ℝ) 0 := by |
| 35 | let L := Complex.reCLM ∘L (Matrix.traceLinearMap (Fin G.repDim) ℝ ℂ).toContinuousLinearMap |
| 36 | have hd (x : G.Color) : HasDerivAt (fun t : ℝ => G.mat (G.lieExp (t • x))) (G.colorMat x) 0 := by |
| 37 | simp_rw [G.mat_lieExp, map_smul]; simpa using! hasDerivAt_exp_smul_const (G.colorMat x) (0:ℝ) |
| 38 | have he := (((L.hasFDerivAt.comp_hasDerivAt 0 ((((hd c).mul_const (G.mat g)).mul (hd d).star).mul_const (G.mat h))).div_const G.repDim).const_sub 1) |
| 39 | apply he.congr_deriv |
| 40 | symm |
| 41 | simp only [← neg_div] |
| 42 | change _ = - ((G.colorMat c * G.mat g * star (G.mat (G.lieExp ((0:ℝ) • d))) + G.mat (G.lieExp ((0:ℝ) • c)) * G.mat g * star (G.colorMat d)) * G.mat h).trace.re / _ |
| 43 | rw [← price_direction, ← price_direction] |
| 44 | simp only [zero_smul, G.mat_lieExp_zero,G.mat_one,star_one,mul_one,one_mul,G.colorMat_skew, mul_neg, neg_mul,add_mul,G.mat_mul,Matrix.trace_add,Matrix.trace_neg,Complex.add_re,Complex.neg_re] |
| 45 | rw [Matrix.mul_assoc, Matrix.trace_mul_cycle _ _ (G.mat h), Matrix.trace_mul_comm (G.mat h * G.mat g)] |
| 46 | ring |
| 47 | end Trace |
| 48 | |
| 49 | section Cover |
| 50 | variable {R : Type*} [AddCommGroup R] [One R] |
| 51 | |
| 52 | def plate (U : Links R G.El) (x : Four R) (a b : Step) := G.curvature (travel U x (Lattice.oriented a b)) |
| 53 | private abbrev transverse (a : Axis) : Finset Axis := Finset.univ.erase a |
| 54 | |
| 55 | def force (U : Links R G.El) (x : Four R) (d : Step) : G.Color := ∑ i ∈ transverse d.dir, |
| 56 | (plate U x d (posDir i) + plate U x d (negDir i)) |
| 57 | |
| 58 | lemma plate_swap (U : Links R G.El) (x : Four R) (d f : Step) : plate U x d f = -plate U x f d := by |
| 59 | unfold plate; rw [oriented_swap f d,G.curvature_inv] |
| 60 | @[simp] lemma plate_rev (U : Links R G.El) (x : Four R) (a b : Step) : plate U (x+a.vec) a.rev b = - G.adjoint (a.read U x)⁻¹ (plate U x a b) := by |
| 61 | rw [plate_swap U (x+a.vec)]; unfold plate; rw [oriented_next, ← G.curvature_conjugate, inv_inv] |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | lemma plate_pull (s : Signed) (z : Four R) (U : Links R G.El) (x : Four R) (d b : Step) : |
| 67 | plate (pull s z U) x d b = plate U (affine s z x) (d.rotate s) (b.rotate s) := by |
| 68 | unfold plate; rw [travel_pull]; simp [Lattice.oriented, Step.rev_rotate] |
| 69 | |
| 70 | |
| 71 | lemma plate_gauge (t : Four R → G.El) (U : Links R G.El) (x : Four R) (a b : Step) : plate (gauge t U) x a b = G.adjoint (t x) (plate U x a b) := by |
| 72 | simp [plate, travel_gauge,G.curvature_conjugate] |
| 73 | |
| 74 | |
| 75 | /-- Signed site filter. Transforms as a polar vector in the spacetime index. -/ |
| 76 | def siteForce (U : Links R G.El) (x : Four R) (i : Axis) := (2:ℝ)⁻¹ • (force U x (posDir i) - force U x (negDir i)) |
| 77 | |
| 78 | |
| 79 | |
| 80 | @[fun_prop] lemma plate_cont (x : Four R) (d b : Step) : Continuous (fun U : Links R G.El => plate U x d b) := by unfold plate; fun_prop |
| 81 | @[fun_prop] lemma force_cont (x : Four R) (d : Step) : Continuous (fun U : Links R G.El => force U x d) := by unfold force; fun_prop |
| 82 | |
| 83 | |
| 84 | |
| 85 | end Cover |
| 86 | |
| 87 | section Variation |
| 88 | |
| 89 | def modify (x : Site n) (d : Step) (g : G.El) (U : Config G n) : Config G n := fun e => if e=d.used x then |
| 90 | if d.neg then U e * g⁻¹ else g * U e else U e |
| 91 | |
| 92 | def bump (x : Site n) (d : Step) (c : G.Color) (t : ℝ) := modify x d (G.lieExp (t • c)) |
| 93 | |
| 94 | lemma read_modify (x : Site n) (d : Step) (g : G.El) (U : Config G n) (y : Site n) : |
| 95 | d.read (modify x d g U) y = (if y=x then g else 1) * d.read U y := by |
| 96 | unfold Step.read Step.used; split <;> simp [modify,Step.used, *,ite_mul,apply_ite Inv.inv] |
| 97 | |
| 98 | lemma read_modify_other (x : Site n) (d : Step) (g : G.El) (U : Config G n) (y : Site n) {b : Step} (h : b.dir ≠ d.dir) : |
| 99 | b.read (modify x d g U) y=b.read U y := by |
| 100 | have ht : b.used y ≠ d.used x := fun he => h (show b.dir=d.dir by simpa [Step.used,apply_ite Prod.snd] using congr_arg Prod.snd he) |
| 101 | unfold Step.read modify; rw [if_neg ht] |
| 102 | |
| 103 | lemma bump_face (x : Site n) (d : Step) (c : G.Color) (U : Config G n) (y : Site n) (b : Step) (hb : b.dir ≠ d.dir) : |
| 104 | HasDerivAt (fun t : ℝ => G.price (travel (bump x d c t U) y (Lattice.oriented d b))) |
| 105 | ((if y=x then ⟪c,plate U x d b⟫_ℝ else 0) + (if y+b.vec=x then ⟪c,plate U x d b.rev⟫_ℝ else 0)) 0 := by |
| 106 | let g := d.read U y * b.read U (y+d.vec) * (d.read U (y+b.vec))⁻¹ |
| 107 | let h := (b.read U y)⁻¹ |
| 108 | have circ (V : Config G n) (a b : Step) (z : Site n) : travel V z (Lattice.oriented a b) = |
| 109 | a.read V z * b.read V (z+a.vec) * (a.read V (z+b.vec))⁻¹ * (b.read V z)⁻¹ := by |
| 110 | rw [Lattice.oriented]; simp only [travel,mul_one]; rw [Step.vec_rev,show z+a.vec+b.vec+-a.vec=z+b.vec by abel, |
| 111 | Step.read_rev,add_right_comm z a.vec b.vec,Step.read_rev]; group |
| 112 | let A (y : Site n) := if y=x then c else 0 |
| 113 | have he (y) (t:ℝ) : (if y=x then G.lieExp (t • c) else (1:G.El)) = G.lieExp (t • A y) := by unfold A; split <;> simp |
| 114 | have hf (t) : travel (bump x d c t U) y (Lattice.oriented d b) = |
| 115 | G.lieExp (t • A y) * g * (G.lieExp (t • A (y+b.vec)))⁻¹ * h := by simp [g,h,circ, bump, read_modify x d, read_modify_other x d _ U _ hb, he,mul_assoc] |
| 116 | have hgh : plate U y d b=G.curvature (g*h) := by rw [plate,circ] |
| 117 | have hhg : plate U (y+b.vec) d b.rev = -G.curvature (h*g) := by |
| 118 | rw [plate,oriented_swap b.rev d,circ,G.curvature_inv]; congr 2 |
| 119 | rw [Step.read_rev,Step.vec_rev,add_neg_cancel_right,add_right_comm y b.vec d.vec,Step.read_rev,inv_inv]; unfold g h; group |
| 120 | simp_rw [hf] |
| 121 | apply (twice_price ..).congr_deriv |
| 122 | dsimp only [A]; rw [← hgh, ← neg_eq_iff_eq_neg.mpr hhg] |
| 123 | split_ifs <;> simp [*] |
| 124 | rename_i hy hw; rw [← hy,hw,hy] |
| 125 | |
| 126 | private lemma active_faces (d : Axis) (f : PlaqAxes → ℝ) : |
| 127 | ∑ i ∈ transverse d, (if h : i=d then 0 else f (PlaqAxes.ordered i d h)) = |
| 128 | ∑ p : PlaqAxes with (d=p.val.1 ∨ d=p.val.2), f p := by |
| 129 | refine Finset.sum_bij (fun i hi => PlaqAxes.ordered i d (Finset.mem_erase.mp hi).1) ?_ ?_ ?_ ?_ |
| 130 | · intro i hi; simp only [Finset.mem_filter,Finset.mem_univ,true_and]; change d=min i d ∨ d=max i d |
| 131 | rcases le_total i d with h|h <;> simp [h] |
| 132 | · intro i hi j hj he |
| 133 | have h₁ : min i d=min j d := congr_arg (fun p => p.val.1) he |
| 134 | have h₂ : max i d=max j d := congr_arg (fun p => p.val.2) he |
| 135 | grind |
| 136 | · rintro ⟨⟨a,b⟩,hp⟩ hb |
| 137 | obtain h|h := (Finset.mem_filter.mp hb).2 |
| 138 | · change d=a at h; subst d; refine ⟨b,Finset.mem_erase.mpr ⟨Ne.symm hp.ne, Finset.mem_univ _⟩, Subtype.ext ?_⟩; simp [PlaqAxes.ordered,hp.le] |
| 139 | change d=b at h; subst d; refine ⟨a,Finset.mem_erase.mpr ⟨hp.ne, Finset.mem_univ _⟩,Subtype.ext ?_⟩; simp [PlaqAxes.ordered, hp.le] |
| 140 | intro i hi; rw [dif_neg (Finset.ne_of_mem_erase hi)] |
| 141 | |
| 142 | private lemma expand_action (d : Step) (U : Config G n) : energy U = |
| 143 | (∑ y, ∑ i ∈ transverse d.dir, G.price (travel U y (Lattice.oriented d (posDir i)))) + |
| 144 | ∑ y, ∑ p : PlaqAxes with ¬ (d.dir=p.val.1 ∨ d.dir=p.val.2), G.price (faceValue U (y,p)) := by |
| 145 | rw [energy,Fintype.sum_prod_type] |
| 146 | let z : Site n := if d.neg then d.vec else 0 |
| 147 | have he (y : Site n) (i : Axis) (h : i≠d.dir) : G.price (travel U y (Lattice.oriented d (posDir i))) = G.price |
| 148 | (faceValue U (y+z,PlaqAxes.ordered i d.dir h)) := by |
| 149 | rw [price_shift_pos G.price U G.price_inv (fun g u => G.price_conj u g), show atFace y d (posDir i)=y+z from add_zero _] |
| 150 | unfold faceValue PlaqAxes.ordered; dsimp only |
| 151 | rcases lt_or_gt_of_ne h with hh|hh |
| 152 | · rw [min_eq_left hh.le,max_eq_right hh.le]; change G.price (travel U (y+z) (Lattice.oriented (posDir d.dir) (posDir i))) = _ |
| 153 | rw [oriented_swap,G.price_inv]; rfl |
| 154 | rw [min_eq_right hh.le,max_eq_left hh.le]; rfl |
| 155 | have ha (y : Site n) : ∑ i ∈ transverse d.dir, G.price (travel U y (Lattice.oriented d (posDir i))) = |
| 156 | ∑ p : PlaqAxes with (d.dir=p.val.1 ∨ d.dir=p.val.2), G.price (faceValue U (y+z,p)) := by |
| 157 | rw [← active_faces]; refine Finset.sum_congr rfl fun i hi => ?_ |
| 158 | have ht := Finset.ne_of_mem_erase hi; rw [dif_neg ht]; apply he |
| 159 | let f (y : Site n) := ∑ p : PlaqAxes with (d.dir=p.val.1 ∨ d.dir=p.val.2), G.price (faceValue U (y,p)) |
| 160 | simp_rw [ha, show (∑ y, ∑ p : PlaqAxes with (d.dir=p.val.1 ∨ d.dir=p.val.2), G.price (faceValue U (y+z,p))) = |
| 161 | ∑ y, f y from Equiv.sum_comp (Equiv.addRight z) f]; unfold f; rw [← Finset.sum_add_distrib]; simp_rw [Finset.sum_filter_add_sum_filter_not] |
| 162 | |
| 163 | lemma modify_other_face (x : Site n) (d : Step) (g : G.El) (U : Config G n) (y : Site n) (p : PlaqAxes) |
| 164 | (hp : ¬ (d.dir=p.val.1 ∨ d.dir=p.val.2)) : faceValue (modify x d g U) (y,p) = faceValue U (y,p) := by |
| 165 | have h₁ : p.val.1 ≠ d.dir := fun he => hp (Or.inl he.symm) |
| 166 | have h₂ : p.val.2 ≠ d.dir := fun he => hp (Or.inr he.symm) |
| 167 | simp only [faceValue,square,travel,read_modify_other x d g U _ (b:=posDir p.val.1) h₁,read_modify_other x d g U _ (b:=posDir p.val.2) h₂, |
| 168 | read_modify_other x d g U _ (b:=negDir p.val.1) h₁,read_modify_other x d g U _ (b:=negDir p.val.2) h₂] |
| 169 | |
| 170 | lemma energy_bump_zero (x : Site n) (d : Step) (c : G.Color) (U : Config G n) : HasDerivAt (fun t => energy (bump x d c t U)) ⟪c,force U x d⟫_ℝ 0 := by |
| 171 | simp_rw [expand_action d] |
| 172 | have ht := HasDerivAt.fun_sum (u:=Finset.univ) fun y _ => HasDerivAt.fun_sum (u:=transverse d.dir) fun i hi => |
| 173 | bump_face x d c U y (posDir i) (Finset.ne_of_mem_erase hi) |
| 174 | have he (t:ℝ) y := Finset.sum_congr (s₁:={p:PlaqAxes | ¬(d.dir=p.val.1 ∨ d.dir=p.val.2)}) rfl fun p hp => congr_arg G.price (modify_other_face x d (G.lieExp (t • c)) U y p (Finset.mem_filter.mp hp).2) |
| 175 | unfold bump; simp_rw [he] |
| 176 | apply (ht.add_const _).congr_deriv |
| 177 | rw [Finset.sum_comm,force,inner_sum]; apply Finset.sum_congr rfl; intro i _ |
| 178 | simp [Finset.sum_add_distrib,inner_add_right, ← eq_sub_iff_add_eq] |
| 179 | |
| 180 | @[simp] theorem bump_zero (x : Site n) (d : Step) (c : G.Color) (U : Config G n) : bump x d c 0 U = U := by funext; simp [bump,modify] |
| 181 | lemma bump_bump (x : Site n) (d : Step) (c : G.Color) (U : Config G n) (t s : ℝ) : bump x d c t (bump x d c s U) = bump x d c (t+s) U := by |
| 182 | haveI : NormedAlgebra ℚ G.Mat := .restrictScalars ℚ ℝ _ |
| 183 | have he : G.lieExp ((t+s) • c) = G.lieExp (t • c) * G.lieExp (s • c) := by |
| 184 | apply G.mat_injective; rw [G.mat_mul,G.mat_lieExp,G.mat_lieExp,G.mat_lieExp,map_smul,map_smul,map_smul,add_smul] |
| 185 | exact NormedSpace.exp_add_of_commute (((Commute.refl (G.colorMat c)).smul_left t).smul_right s) |
| 186 | funext e; simp +contextual [bump,he, modify,mul_assoc] |
| 187 | |
| 188 | lemma bump_deriv {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] (x : Site n) (d : Step) (c : G.Color) {U : Config G n} |
| 189 | {f : Config G n → F} {t : ℝ} {w : F} (h : HasDerivAt (fun s => f (bump x d c s (bump x d c t U))) w 0) : |
| 190 | HasDerivAt (fun t => f (bump x d c t U)) w t := by |
| 191 | have ht := (show HasDerivAt (fun s => f (bump x d c s (bump x d c t U))) w (-t+t) by simpa using h).comp_const_add (-t) t |
| 192 | simpa only [bump_bump, neg_add_cancel_comm] using! ht |
| 193 | |
| 194 | lemma energy_variation (x : Site n) (d : Step) (c : G.Color) (t : ℝ) (U : Config G n) : |
| 195 | HasDerivAt (fun t => energy (bump x d c t U)) ⟪c,force (bump x d c t U) x d⟫_ℝ t := bump_deriv x d c (energy_bump_zero x d c _) |
| 196 | lemma bare_variation (β : ℝ) (x : Site n) (d : Step) (c : G.Color) (t : ℝ) (U : Config G n) : |
| 197 | HasDerivAt (fun t => bare β (bump x d c t U)) (bare β (bump x d c t U) * (-β * ⟪c,force (bump x d c t U) x d⟫_ℝ)) t := |
| 198 | ((energy_variation x d c t U).const_mul (-β)).exp |
| 199 | end Variation |
| 200 | end YM.StressFlux |