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.Bid.Energy |
| 2 | |
| 3 | /-! |
| 4 | # Pre-L pricing for the shell test against the flat output |
| 5 | |
| 6 | Strengthening in L necessary for the Hessian gap/inverse. Adapted from |
| 7 | `YM.Work.E02` which has the mathematical argument for this stronger L-control |
| 8 | (uses `planting`), but only provides the theorem with an existential *after* |
| 9 | L; its lemmas are file-private. Preserve that file unchanged. Would propose |
| 10 | factoring these common lemmas/exporting pre-L from there after integration. |
| 11 | -/ |
| 12 | set_option autoImplicit false |
| 13 | noncomputable section |
| 14 | namespace YM.Push.Uniform |
| 15 | |
| 16 | open Function Lattice Wilson RG Axial Tree Precision Pressure Pressure.Stores Bid |
| 17 | open scoped BigOperators Matrix.Norms.Frobenius |
| 18 | |
| 19 | variable {G : Gauge} {c f : Side} |
| 20 | |
| 21 | private lemma wider {x : Cover} {t r : ℕ} (h : x ∈ box t) (e : t ≤ r) : x ∈ box r := by |
| 22 | obtain ⟨ha,hb⟩ := box_test.mp h |
| 23 | exact box_test.mpr ⟨fun i => le_trans (neg_le_neg (by exact_mod_cast e)) (ha i), |
| 24 | fun i => le_trans (hb i) (by exact_mod_cast e)⟩ |
| 25 | |
| 26 | private lemma box_next {x : Cover} {r : ℕ} (h : x ∈ box r) (d : Step) : |
| 27 | x + d.vec ∈ box (r+1) := by |
| 28 | obtain ⟨ha,hb⟩ := box_test.mp h |
| 29 | rw [box_test]; constructor <;> intro i |
| 30 | all_goals |
| 31 | have h₁ := ha i |
| 32 | have h₂ := hb i |
| 33 | unfold Step.vec; split <;> |
| 34 | simp only [Pi.add_apply, Pi.neg_apply, step_apply] <;> split <;> omega |
| 35 | |
| 36 | private lemma read_le (U : CoverConfig G) (X : Finset Cover) (x : Cover) (d : Step) |
| 37 | (hx : x ∈ X) (he : x + d.vec ∈ X) : G.chord (d.read U x) ≤ edges X U := by |
| 38 | have h (y : Cover) (i : Axis) (hy : y ∈ X) (hi : y + step i ∈ X) : |
| 39 | G.chord (U (y,i)) ≤ edges X U := calc |
| 40 | _ = perEdge X U y i := by rw [perEdge, if_pos hi] |
| 41 | _ ≤ ∑ j, perEdge X U y j := Finset.single_le_sum (fun j _ => per_nn X U y j) (Finset.mem_univ i) |
| 42 | _ ≤ _ := Finset.single_le_sum (f := fun z => ∑ j, perEdge X U z j) |
| 43 | (fun z _ => Finset.sum_nonneg (fun j _ => per_nn ..)) hy |
| 44 | rcases d with ⟨i,b|b⟩ |
| 45 | · exact h x i hx he |
| 46 | change G.chord (U (x-step i,i))⁻¹ ≤ _ |
| 47 | rw [G.chord_inv] |
| 48 | apply h |
| 49 | · simpa only [Step.vec, ↓reduceIte, sub_eq_add_neg] using he |
| 50 | · rwa [sub_add_cancel] |
| 51 | |
| 52 | /-- Coarse bound by length times the *same* macro bill, including repeated steps. -/ |
| 53 | private lemma walk_bound (U : CoverConfig G) (r t : ℕ) (x : Cover) (w : Walk) |
| 54 | (hx : x ∈ box t) (he : t+w.length ≤ r) : |
| 55 | stop x w ∈ box r ∧ G.chord (travel U x w) ≤ w.length * edges (box r) U := by |
| 56 | induction w generalizing x t with |
| 57 | | nil => |
| 58 | exact ⟨wider hx (by simpa using he), by simp [travel]⟩ |
| 59 | | cons d w ih => |
| 60 | have hb := box_next hx d |
| 61 | simp only [List.length_cons] at he |
| 62 | obtain ⟨hs,h⟩ := ih (t+1) _ hb (by omega) |
| 63 | refine ⟨hs, ?_⟩ |
| 64 | rw [travel] |
| 65 | apply (G.chord_triangle _ _).trans |
| 66 | refine (add_le_add (read_le U (box r) x d (wider hx (by omega)) (wider hb (by omega))) h).trans_eq ?_ |
| 67 | simp [add_mul, add_comm] |
| 68 | |
| 69 | /-- Hike transport is the identity on the actual slice. -/ |
| 70 | private lemma on_hike {S : StepData c f} (F : Forest S.ratio) {U : Config G f} |
| 71 | (h : SliceSet S F U) (x : Site f) : travel U x (F.hike x) = 1 := by |
| 72 | induction x using Forest.hike.induct F with |
| 73 | | case1 i hi ih => |
| 74 | have he := h _ ((F.trunk_mem_iff _).mpr ⟨i,hi,rfl⟩) |
| 75 | rw [Forest.hike, dif_pos hi, travel, ih] |
| 76 | simp [Step.read, he] |
| 77 | | case2 i hi => rw [Forest.hike, dif_neg hi, travel] |
| 78 | |
| 79 | -- Form a single possibly seam-crossing walk. No replacement of the forest. |
| 80 | private lemma root_walk {S : StepData c f} (F : Forest S.ratio) (x : Site f) (a : Axis) |
| 81 | (U : Config G f) (h : SliceSet S F U) : |
| 82 | ∃ w : Walk, w.length ≤ 8*S.patch.L.val+1 ∧ |
| 83 | stop (S.ratio.embed (S.ratio.parent x)) w = S.ratio.embed (S.ratio.parent (x+step a)) ∧ |
| 84 | travel U (S.ratio.embed (S.ratio.parent x)) w = U (x,a) := by |
| 85 | refine ⟨Lattice.reverse (F.hike x) ++ posDir a :: F.hike (x+step a), ?_, ?_, ?_⟩ |
| 86 | · have hlen (y) : (F.hike y).length ≤ 4*S.patch.L.val := (F.hike_lower y).trans (F.bound y) |
| 87 | simp only [Lattice.reverse, List.length_append, List.length_map, List.length_reverse, |
| 88 | List.length_cons] |
| 89 | have hx := hlen x |
| 90 | have hh := hlen (x+step a) |
| 91 | omega |
| 92 | · rw [← F.hike_root x, stop_append, reverse_stop, stop, Step.vec_pos, F.hike_root] |
| 93 | rw [← F.hike_root x, travel_append, travel_reverse, reverse_stop, travel, |
| 94 | Step.pos_read, Step.vec_pos, on_hike F h, on_hike F h, mul_one, inv_one, one_mul] |
| 95 | |
| 96 | private lemma stop_at (w : Walk) (x : Cover) (b : Site f) : |
| 97 | wrap f (stop x w)+b = stop (wrap f x+b) w := by |
| 98 | rw [wrap_stop_cover] |
| 99 | have he (w : Walk) (y : Site f) : stop y w + b = stop (y+b) w := by |
| 100 | induction w generalizing y with |
| 101 | | nil => rfl |
| 102 | | cons i w ih => rw [stop,stop,ih,add_right_comm y] |
| 103 | exact he w _ |
| 104 | |
| 105 | private lemma inj_macro (P : Patch) (f : Side) (he : 100*macroR P ≤ f.val) |
| 106 | (x y : Cover) (hx : x ∈ box (macroR P)) (hy : y ∈ box (macroR P)) |
| 107 | (eq : wrap f x = wrap f y) : x = y := by |
| 108 | have h (x : Cover) (hx : x ∈ box (macroR P)) (i : Axis) : |
| 109 | -(f.val : ℤ) < 2*x i ∧ 2*x i ≤ f.val := by |
| 110 | have hf := f.property |
| 111 | have h₁ := (box_test.mp hx).1 i |
| 112 | have h₂ := (box_test.mp hx).2 i |
| 113 | change 0 < f.val at hf |
| 114 | omega |
| 115 | exact wrap_injOn f (h x hx) (h y hy) eq |
| 116 | |
| 117 | private lemma pad_root (S : StepData c f) (C : ℝ) (H : Cover → G.El) (x : Site c) |
| 118 | (y : Cover) (U : Config G f) (p : G.El) (t : S.Choices) (h : pad S C H x y U p t) : |
| 119 | G.chord (H (centerRoot S.patch y)*p) ≤ C*(S.patch.L.val:ℝ)^2*port S x U := by |
| 120 | have he : S.frames U t.1 (plank x y) S.patch.center=1 := by |
| 121 | unfold StepData.frames Patch.frame |
| 122 | split |
| 123 | · exact (S.patch.min_exists _).choose_spec.1 |
| 124 | simp |
| 125 | let e (i : S.patch.Points) := p⁻¹ * S.frames U t.1 (plank x y) i * |
| 126 | (H (i.val+centerRoot S.patch y))⁻¹ |
| 127 | have hk : G.chord (e S.patch.center) ≤ C*(S.patch.L.val:ℝ)^2*port S x U := |
| 128 | (Finset.single_le_sum (fun i _ => G.chord_nonneg (e i)) (Finset.mem_univ S.patch.center)).trans h |
| 129 | unfold e at hk |
| 130 | rwa [he, mul_one, show S.patch.center.val = 0 from rfl, zero_add, ← mul_inv_rev, G.chord_inv] at hk |
| 131 | |
| 132 | def linkCost (K : KernelChoices) (C D : ℝ) (L : Side) := |
| 133 | let l := (L.val : ℝ) |
| 134 | let α := 2*max 1 K.predictor_cut⁻¹ * (2*C+D) |
| 135 | (8*l+1)*(D*l)+(C*l^2 + α/l^2 + C*l^2) |
| 136 | |
| 137 | lemma linkCost_pos (K : KernelChoices) {C D : ℝ} (hC : 0<C) (hD : 0<D) (L : Side) : |
| 138 | 0 < linkCost K C D L := by unfold linkCost; positivity |
| 139 | |
| 140 | def Harness (G : Gauge) (j : ℕ) (K : KernelChoices) (C D : ℝ) := 0<C ∧ 0<D ∧ |
| 141 | ∀ {c f : Side} (S : StepData c f), S.kernel=K → S.patch.J=j → 100*macroR S.patch ≤ f.val → |
| 142 | ∀ (F : Forest S.ratio) (U : Config G f), SliceSet S F U → ∀ (e : Bond f) (t : S.Choices), |
| 143 | usable S U (S.ratio.parent e.1) t → Cops (S:=S) U 1 (S.prediction U t) e (linkCost K C D S.patch.L) |
| 144 | |
| 145 | theorem link_charge (G : Gauge) (j : ℕ) (K : KernelChoices) : ∃ C D, Harness G j K C D := by |
| 146 | obtain ⟨C,D,hC,hD,plant⟩ := planting G K j |
| 147 | refine ⟨C,D,hC,hD,?_⟩ |
| 148 | intro c f S hk hj he F U hU e t ht |
| 149 | let l : ℝ := S.patch.L.val |
| 150 | have hl : 0 < l := by unfold l; positivity |
| 151 | let α := 2*max 1 K.predictor_cut⁻¹ * (2*C+D) |
| 152 | have ha : 0 < α := by unfold α; positivity |
| 153 | let u := (8*l+1)*(D*l) |
| 154 | let v := C*l^2 + α/l^2 + C*l^2 |
| 155 | have hu : 0 < u := by unfold u; positivity |
| 156 | have hv : 0 < v := by unfold v; positivity |
| 157 | rcases e with ⟨x,a⟩ |
| 158 | let g := S.ratio |
| 159 | let i := g.parent x |
| 160 | obtain ⟨H,p,hH,hp⟩ := plant c f S hk.symm hj.symm U i t ht |
| 161 | let r := macroR S.patch |
| 162 | let s := port S i U |
| 163 | let B := g.embed i |
| 164 | obtain ⟨w,hw,hw',eq⟩ := root_walk F x a U hU |
| 165 | let z := stop (0:Cover) w |
| 166 | have hR : w.length ≤ r := by |
| 167 | unfold r macroR Patch.radius |
| 168 | apply hw.trans |
| 169 | have h := Nat.mul_le_mul_right S.patch.L.val |
| 170 | (show 7 ≤ S.patch.J + 3 by have := S.patch.order_cut; omega) |
| 171 | have h1 := S.patch.coarse |
| 172 | omega |
| 173 | obtain ⟨hz,hh⟩ := walk_bound (gauge H (expandAt B U)) r 0 0 w (center_box 0) (by omega) |
| 174 | have hs : 0 ≤ s := faces_nonneg .. |
| 175 | have hfin : G.chord (H 0 * U (x,a) * (H z)⁻¹) ≤ u*s := by |
| 176 | rw [travel_gauge, travel_at, map_zero, zero_add] at hh |
| 177 | change travel U B w = _ at eq |
| 178 | rw [eq] at hh |
| 179 | refine hh.trans ((mul_le_mul (b := 8*l+1) ?_ (d := D*l*s) ?_ (edges_ge ..) (by positivity)).trans_eq ?_) |
| 180 | · unfold l |
| 181 | exact_mod_cast hw |
| 182 | · unfold l; exact hH |
| 183 | unfold u; ring |
| 184 | have hwrap : wrap f z+B = g.embed (g.parent (x+step a)) := by |
| 185 | rw [show wrap f z+B = _ from stop_at w 0 B, map_zero, zero_add] |
| 186 | exact hw' |
| 187 | let Q := S.prediction U t (i,a) |
| 188 | unfold Cops; simp only [replica_one,Pi.one_apply,mul_one, wire, inv_one,mul_one,one_mul, G.chord_inv] |
| 189 | change G.chord (U (x,a)) ≤ (u+v)*s + if i=g.parent (x+step a) then 0 else G.chord Q |
| 190 | by_cases hi : i=g.parent (x+step a) |
| 191 | · -- Closed lifted loop at the first root. |
| 192 | have hb : z=0 := inj_macro S.patch f he z 0 hz (center_box _) (by |
| 193 | rw [← hi] at hwrap |
| 194 | rw [map_zero] |
| 195 | exact add_right_cancel (hwrap.trans (zero_add B).symm)) |
| 196 | rw [hb, G.chord_conj] at hfin |
| 197 | rw [if_pos hi,add_zero] |
| 198 | exact hfin.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hv.le) hs) |
| 199 | -- Crossing. The second lift must be at the next center even at a seam. |
| 200 | have hstep : g.parent (x+step a)=i+step a := by |
| 201 | have h := g.parents_hop S.patch.odd_side x a |
| 202 | split at h |
| 203 | · exact h |
| 204 | exact False.elim (hi h.symm) |
| 205 | let y := (step a : Cover) |
| 206 | let Z := centerRoot S.patch y |
| 207 | have hy : y ∈ box 2 := by |
| 208 | rw [box_test]; constructor <;> intro j <;> unfold y <;> rw [step_apply] <;> split <;> norm_num |
| 209 | have hb : z=Z := by |
| 210 | apply inj_macro S.patch f he z Z hz |
| 211 | · have hg : 0 + centerRoot S.patch y ∈ box (macroR S.patch) := |
| 212 | shifted S.patch y hy (Finset.mem_image_of_mem _ (center_box S.patch.radius)) |
| 213 | rwa [zero_add] at hg |
| 214 | rw [hstep, show i+step a=plank i y by simp [plank,y,add_comm], offsets] at hwrap |
| 215 | exact add_right_cancel hwrap |
| 216 | have hx : G.chord (H 0 * p 0) ≤ C*l^2*s := by |
| 217 | have h := pad_root S C H i 0 U (p 0) t (hp _ (center_box 2)) |
| 218 | simp only [centerRoot, smul_zero] at h |
| 219 | exact h |
| 220 | have hend : G.chord (H Z * p y) ≤ C*l^2*s := by |
| 221 | have h := pad_root S C H i y U (p y) t (hp _ hy) |
| 222 | change G.chord (H Z * p y) ≤ _ at h |
| 223 | exact h |
| 224 | have hpr : G.chord ((p 0)⁻¹ * Q * p y) ≤ α/l^2*s := by |
| 225 | have hy' : (0:Cover)+step a ∈ box 2 := by rw [zero_add]; exact hy |
| 226 | have h := indicated S C D U i t 0 a (center_box 2) H _ _ (hp _ (center_box 2)) (hp _ hy') hH |
| 227 | simp only [plank, map_zero, zero_add] at h |
| 228 | -- keep prediction itself on this S and t |
| 229 | change (S.patch.L.val:ℝ)^2 * G.chord ((p 0)⁻¹*Q*p y) ≤ _ at h |
| 230 | rw [hk] at h |
| 231 | apply le_of_mul_le_mul_left _ (show 0<l^2 by positivity) |
| 232 | refine le_trans h (le_of_eq ?_) |
| 233 | change α*s = l^2 * (α/l^2*s) |
| 234 | field_simp |
| 235 | have hQ : G.chord (H 0 * Q * (H z)⁻¹) ≤ v*s := by |
| 236 | rw [hb, show H 0 * Q * (H Z)⁻¹ = |
| 237 | (H 0 * p 0) * ((p 0)⁻¹*Q*p y) * (H Z * p y)⁻¹ by group] |
| 238 | apply (G.chord_triangle _ _).trans |
| 239 | rw [G.chord_inv] |
| 240 | apply (add_le_add ((G.chord_triangle _ _).trans (add_le_add hx hpr)) hend).trans_eq |
| 241 | unfold v; ring |
| 242 | have hd : G.chord (U (x,a)*Q⁻¹) ≤ (u+v)*s := by |
| 243 | rw [← G.chord_conj (H 0), show H 0 * (U (x,a)*Q⁻¹) * (H 0)⁻¹ = |
| 244 | (H 0 * U (x,a) * (H z)⁻¹) * (H 0 * Q * (H z)⁻¹)⁻¹ by group] |
| 245 | apply (G.chord_triangle _ _).trans |
| 246 | rw [G.chord_inv, add_mul] |
| 247 | exact add_le_add hfin hQ |
| 248 | rw [if_neg hi] |
| 249 | have hg := G.chord_triangle (U (x,a)*Q⁻¹) Q |
| 250 | rw [mul_assoc, inv_mul_cancel, mul_one] at hg |
| 251 | exact hg.trans (add_le_add_left hd _) |
| 252 | end YM.Push.Uniform |