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.Pert.Bulk.UseRows |
| 2 | import Mathlib.Algebra.BigOperators.Fin |
| 3 | |
| 4 | /-! |
| 5 | # Ordered coefficient tables, rooted size on the *original* mesh |
| 6 | |
| 7 | We use `Fin n` for leg labels, including both possible orientations/colors in the |
| 8 | point type only if the application dictates. This allows mixed fine (residue, link) |
| 9 | and coarse variables at a single conditioning mesh. Coefficient (tensor) |
| 10 | normalization is *without* applying derivatives here; spectra and curvature adapters |
| 11 | will use the leading scalar coefficients. Symmetry means just invariance under |
| 12 | leg permutations for now. Budget realized via ENNReal, with conversion to the |
| 13 | full `SumBudget` and the accepted `Pert.Bulk.Folded`. |
| 14 | |
| 15 | No budget on rank zero: going to cover discards the scalar unmarked vacuum |
| 16 | explicitly, and insertions at rank zero in *field* use also their insertion slot. |
| 17 | -/ |
| 18 | set_option autoImplicit false |
| 19 | noncomputable section |
| 20 | namespace YM.WilsonBulk.Sheet |
| 21 | open scoped Classical ENNReal BigOperators Topology |
| 22 | open Function Equiv Lattice Pert.Bulk |
| 23 | |
| 24 | variable {X Y Z α β γ : Type} {k n m : ℕ} {σ θ p q b : ℝ} |
| 25 | |
| 26 | abbrev Legs (X : Type) (n : ℕ) := Fin n → X |
| 27 | abbrev Page (X : Type) (n : ℕ) := Legs X n → ℝ |
| 28 | abbrev Text (α : Type) (n : ℕ) := Page (Market α) n |
| 29 | |
| 30 | section tuples |
| 31 | |
| 32 | -- lean off-diagonal arithmetic throughout these interfaces |
| 33 | abbrev hitch (x : X) (v : Legs X n) : Legs X (n+1) := Fin.cons x v |
| 34 | abbrev crop (v : Legs X (n+1)) : Legs X n := fun i => v i.succ |
| 35 | abbrev snip (k m : ℕ) (v : Legs X (k+m)) : Legs X k := v ∘ (Fin.castAdd m) |
| 36 | abbrev keep (k m : ℕ) (v : Legs X (k+m)) : Legs X m := v ∘ (Fin.natAdd k) |
| 37 | abbrev two (x y : X) : Legs X 2 := hitch x (fun _=> y) |
| 38 | abbrev pair (f : X→ X→ℝ) : Page X 2 := fun v=> f (v 0) (v 1) |
| 39 | |
| 40 | @[simp] theorem hitch_zero (x : X) (v : Legs X n) : hitch x v 0=x := Fin.cons_zero .. |
| 41 | @[simp] theorem hitch_succ (x : X) (v : Legs X n) (i : Fin n) : hitch x v i.succ=v i := Fin.cons_succ .. |
| 42 | @[simp] theorem hitch_crop (v : Legs X (n+1)) : hitch (v 0) (crop v)=v := Fin.cons_self_tail v |
| 43 | @[simp] theorem crop_hitch (x : X) (v : Legs X n) : crop (hitch x v)=v := funext fun _=> hitch_succ .. |
| 44 | @[simp] theorem snip_append (a : Legs X k) (b : Legs X m) : snip k m (Fin.append a b)=a := funext fun _=> Fin.append_left .. |
| 45 | @[simp] theorem keep_append (a : Legs X k) (b : Legs X m) : keep k m (Fin.append a b)=b := funext fun _=> Fin.append_right .. |
| 46 | @[simp] theorem append_back (v : Legs X (k+m)) : Fin.append (snip k m v) (keep k m v) = v := by |
| 47 | ext1 i |
| 48 | refine Fin.addCases (fun j=>?_) (fun j=>?_) i |
| 49 | · rw [Fin.append_left]; rfl |
| 50 | rw [Fin.append_right]; rfl |
| 51 | |
| 52 | @[simp] theorem hitch_comp (f : X→Y) (x : X) (v : Legs X n) : f ∘ hitch x v = hitch (f x) (f ∘ v) := by |
| 53 | funext i; cases i using Fin.cases <;> simp |
| 54 | @[simp] theorem crop_comp (f : X→Y) (v : Legs X (n+1)) : crop (f ∘ v) = f ∘ crop v := rfl |
| 55 | @[simp] theorem snip_comp (f : X→Y) (v : Legs X (k+m)) : snip k m (f ∘ v) = f ∘ snip k m v := rfl |
| 56 | @[simp] theorem keep_comp (f : X→Y) (v : Legs X (k+m)) : keep k m (f ∘ v) = f ∘ keep k m v := rfl |
| 57 | @[simp] theorem append_comp (f : X→Y) (a : Legs X k) (b : Legs X m) : f ∘ Fin.append a b = Fin.append (f ∘ a) (f ∘ b) := by |
| 58 | ext1 i; refine Fin.addCases (fun j=>?_) (fun j=>?_) i <;> simp |
| 59 | |
| 60 | theorem leg1 (v : Legs X 1) : v = fun _=> v 0 := funext fun i=> by rw [Fin.fin_one_eq_zero i] |
| 61 | theorem legs_succ (Q : Legs X (n+1) → Prop) (h : ∀ x v, Q (hitch x v)) : ∀ v,Q v := fun v => hitch_crop v ▸ h _ _ |
| 62 | theorem legs_plus (Q : Legs X (k+n) → Prop) (h : ∀ a : Legs X k, ∀ b : Legs X n, Q (Fin.append a b)) : ∀ v,Q v := fun v => append_back v ▸ h _ _ |
| 63 | |
| 64 | def hitchEquiv (X : Type) (n : ℕ) : X × Legs X n ≃ Legs X (n+1) where |
| 65 | toFun v := hitch v.1 v.2 |
| 66 | invFun v := (v 0,crop v) |
| 67 | left_inv _ := by simp |
| 68 | right_inv := hitch_crop |
| 69 | |
| 70 | def halves (X : Type) (k m : ℕ) : (Legs X k × Legs X m) ≃ Legs X (k+m) where |
| 71 | toFun v := Fin.append v.1 v.2 |
| 72 | invFun v := (snip k m v, keep k m v) |
| 73 | left_inv _ := by simp |
| 74 | right_inv := append_back |
| 75 | |
| 76 | lemma ts_hitch (f : Legs X (n+1) → ℝ≥0∞) : ∑' v, f v = ∑' x,∑' v : Legs X n, f (hitch x v) := |
| 77 | ((hitchEquiv X n).tsum_eq f).symm.trans (ENNReal.tsum_prod (f:=fun x v=> f (hitch x v))) |
| 78 | lemma ts_plus (f : Legs X (k+n) → ℝ≥0∞) : ∑' v, f v = ∑' a : Legs X k,∑' b : Legs X n, f (Fin.append a b) := |
| 79 | ((halves X k n).tsum_eq f).symm.trans (ENNReal.tsum_prod (f:=fun (a : Legs X k) (b : Legs X n)=> f (Fin.append a b))) |
| 80 | |
| 81 | def escort (e : Fin m ≃ Fin n) (u : Page X m) : Page X n := fun v => u (v ∘ (e:Fin m→Fin n)) |
| 82 | def casesEquiv (e : Fin m ≃ Fin n) (u : X ≃ Y) : Legs X m ≃ Legs Y n := Equiv.arrowCongr e u |
| 83 | theorem casesEquiv_apply (e : Fin m≃Fin n) (u : X≃Y) (v : Legs X m) : casesEquiv e u v= u ∘ v ∘ e.symm := rfl |
| 84 | |
| 85 | @[simp] lemma escort_zero (e : Fin m≃Fin n) : escort e (0:Page X m)=0 := rfl |
| 86 | @[simp] lemma escort_plus (e : Fin m ≃ Fin n) (a b : Page X m) : escort e (a+b)= escort e a + escort e b := rfl |
| 87 | @[simp] lemma escort_minus (e : Fin m ≃ Fin n) (a b : Page X m) : escort e (a-b)= escort e a - escort e b := rfl |
| 88 | @[simp] lemma escort_neg (e : Fin m ≃ Fin n) (a : Page X m) : escort e (-a)= -escort e a := rfl |
| 89 | @[simp] lemma escort_scale (e : Fin m ≃ Fin n) (r : ℝ) (a : Page X m) : escort e (r • a)= r • escort e a := rfl |
| 90 | lemma escort_escort (e : Fin m ≃ Fin k) (f : Fin k ≃ Fin n) (a : Page X m) : escort f (escort e a) = escort (e.trans f) a := rfl |
| 91 | lemma escort_sum {T : Type} (s : Finset T) (a : T→Page X m) (e : Fin m≃Fin n) : |
| 92 | escort e (∑ x ∈ s,a x)= ∑ x∈s,escort e (a x) := by ext1 v; simp [escort] |
| 93 | |
| 94 | end tuples |
| 95 | |
| 96 | /-- One pseudometric shared by the finite coordinate alphabets. -/ |
| 97 | structure Rule (X : Type) where |
| 98 | cost : X→ X→ℝ |
| 99 | self (x : X) : cost x x=0 |
| 100 | nonneg (x y : X) : 0 ≤ cost x y |
| 101 | swap (x y : X) : cost x y=cost y x |
| 102 | tri (x y z : X) : cost x z ≤ cost x y + cost y z |
| 103 | |
| 104 | def lawn (α : Type) : Rule (Market α) where |
| 105 | cost x y := sep x.1 y.1 |
| 106 | self _ := sep_self _ |
| 107 | nonneg _ _ := sep_nonneg .. |
| 108 | swap _ _ := sep_comm .. |
| 109 | tri _ _ _ := sep_triangle .. |
| 110 | |
| 111 | def run (D : Rule X) (x : X) (v : Legs X n) := ∑ i, D.cost x (v i) |
| 112 | lemma run_nonneg (D : Rule X) (x : X) (v : Legs X n) : 0≤run D x v := Finset.sum_nonneg (fun _ _ => D.nonneg ..) |
| 113 | lemma run_zero (D : Rule X) (x : X) (v : Legs X 0) : run D x v=0 := by simp [run] |
| 114 | lemma run_pair (D : Rule X) (x y z : X) : run D x (two y z)=D.cost x y+D.cost x z := by |
| 115 | simp [run,two,Fin.sum_univ_succ] |
| 116 | lemma run_left (D : Rule X) (x : X) (v : Legs X n) (a : Fin n) : D.cost x (v a) ≤ run D x v := |
| 117 | Finset.single_le_sum (f:=fun i=> D.cost x (v i)) (fun _ _=> D.nonneg ..) (Finset.mem_univ a) |
| 118 | lemma run_escort (D : Rule X) (e : Fin m≃ Fin n) (x : X) (v : Legs X n) : |
| 119 | run D x (v ∘ (e:Fin m→Fin n))= run D x v := Equiv.sum_comp e (fun i=> D.cost x (v i)) |
| 120 | lemma run_joint (D : Rule X) (x : X) (a : Legs X k) (b : Legs X m) : run D x (Fin.append a b)=run D x a+run D x b := by |
| 121 | simp only [run,Fin.sum_univ_add,Fin.append_left,Fin.append_right] |
| 122 | lemma run_some (D : Rule X) (x y : X) (v : Legs X n) : run D x (hitch y v)=D.cost x y+run D x v := by simp only [run,Fin.sum_univ_succ,hitch_zero,hitch_succ] |
| 123 | lemma run_move (D : Rule X) (x y : X) (v : Legs X n) : run D x v ≤ (n:ℝ)*D.cost x y + run D y v := by |
| 124 | unfold run |
| 125 | calc _ ≤ ∑ i, (D.cost x y+D.cost y (v i)) := Finset.sum_le_sum (fun _ _ => D.tri ..) |
| 126 | _ = _ := by simp [Finset.sum_add_distrib,nsmul_eq_mul] |
| 127 | |
| 128 | /-- Raw per-root charge realization. Height includes nonnegative budget |
| 129 | (converting from an ENNReal inequality alone doesn't). Width positivity is |
| 130 | imposed separately only at operations that use it. -/ |
| 131 | def rent (D : Rule X) (σ : ℝ) (u : Page X n) (i : Fin n) (x : X) := |
| 132 | ∑' v, if v i=x then bill (u v) (σ*run D x v) else 0 |
| 133 | -- not collide with Stationary.rent. All users have namespace. |
| 134 | def Within (D : Rule X) (σ : ℝ) (p : ℝ) (u : Page X n) : Prop := |
| 135 | 0 ≤ p ∧ ∀ i x,rent D σ u i x ≤ ENNReal.ofReal p |
| 136 | |
| 137 | variable {D : Rule X} {u v w : Page X n} |
| 138 | |
| 139 | def fee (D : Rule X) (σ : ℝ) (u : Page X n) (i : Fin n) (x : X) : Legs X n → ℝ := fun v => |
| 140 | if v i=x then |u v| * Real.exp (σ*run D x v) else 0 |
| 141 | lemma fee_nonneg (v : Legs X n) (i : Fin n) (x : X) : 0 ≤ fee D σ u i x v := by unfold fee; split <;> positivity |
| 142 | lemma lease_eq (v : Legs X n) (i : Fin n) (x : X) : |
| 143 | ENNReal.ofReal (fee D σ u i x v) = if v i=x then bill (u v) (σ*run D x v) else 0 := by unfold fee; split <;> simp [bill] |
| 144 | theorem within_budget (hp : 0≤p) : Within D σ p u ↔ ∀ i x, RG.SumBudget (fee D σ u i x) p := by |
| 145 | have e i x : (∑' v, ENNReal.ofReal (fee D σ u i x v)) = rent D σ u i x := tsum_congr fun v => lease_eq v i x |
| 146 | constructor |
| 147 | · intro h i x |
| 148 | have hh : (∑' v, ENNReal.ofReal (fee D σ u i x v)) ≤ ENNReal.ofReal p := (e i x).le.trans (h.2 i x) |
| 149 | have ht : Summable (fee D σ u i x) := (ENNReal.summable_toReal (ne_top_of_le_ne_top (by finiteness) hh)).congr (fun v => ENNReal.toReal_ofReal (fee_nonneg v i x)) |
| 150 | exact ⟨(fee_nonneg · i x), ht, ENNReal.ofReal_le_ofReal_iff hp |>.1 ((ENNReal.ofReal_tsum_of_nonneg (fee_nonneg · i x) ht).le.trans hh)⟩ |
| 151 | intro h; refine ⟨hp,fun i x => ?_⟩ |
| 152 | exact (e i x).ge.trans ((ENNReal.ofReal_tsum_of_nonneg (h i x).1 (h i x).2.1).ge.trans (by exact ENNReal.ofReal_le_ofReal (h i x).2.2)) |
| 153 | |
| 154 | theorem within_entry' (h : Within D σ p u) (i : Fin n) (v : Legs X n) : |
| 155 | |u v| * Real.exp (σ*run D (v i) v) ≤ p := by |
| 156 | have he := (within_budget h.1).1 h i (v i) |
| 157 | have hk := ((he.2.1).le_tsum v (fun w _=> fee_nonneg w i (v i))).trans he.2.2 |
| 158 | simpa only [fee,↓reduceIte] using hk |
| 159 | |
| 160 | theorem within_total {n : ℕ} {u : Page X n} (h : Within D σ p u) (he : 0 ≤ σ) (i : Fin n) (x : X) : |
| 161 | Summable (fun v : Legs X n => if v i=x then u v else 0) := by |
| 162 | apply Summable.of_norm_bounded ((within_budget h.1).1 h i x).2.1 |
| 163 | intro v; unfold fee; split_ifs |
| 164 | · exact (Real.norm_eq_abs _).le.trans (le_mul_of_one_le_right (abs_nonneg _) (Real.one_le_exp (mul_nonneg he (run_nonneg ..)))) |
| 165 | simp |
| 166 | |
| 167 | theorem within_entry (h : Within D σ p u) (he : 0 ≤ σ) (hn : n ≠ 0) (v : Legs X n) : |u v| ≤ p := |
| 168 | (le_mul_of_one_le_right (abs_nonneg _) (Real.one_le_exp (mul_nonneg he (run_nonneg ..)))).trans (within_entry' h (⟨0,by omega⟩) v) |
| 169 | |
| 170 | namespace Within |
| 171 | |
| 172 | variable (h : Within D σ p u) |
| 173 | include h |
| 174 | lemma mono (ha : θ ≤ σ) (hb : p ≤ q) : Within D θ q u := by |
| 175 | refine ⟨h.1.trans hb,fun i x=>?_⟩ |
| 176 | refine LE.le.trans (b:=rent D σ u i x) (ENNReal.tsum_le_tsum (fun a=>?_)) ((h.2 i x).trans (by gcongr)) |
| 177 | split |
| 178 | · exact bill_mono le_rfl (mul_le_mul_of_nonneg_right ha (run_nonneg ..)) |
| 179 | exact le_rfl |
| 180 | lemma scale (r : ℝ) : Within D σ (|r| * p) (r • u) := by |
| 181 | refine ⟨mul_nonneg (abs_nonneg _) h.1,fun i x=>?_⟩ |
| 182 | unfold rent |
| 183 | rw [ENNReal.ofReal_mul (abs_nonneg _)] |
| 184 | calc |
| 185 | _ = ∑' v, ENNReal.ofReal |r| * (if v i=x then bill (u v) (σ*run D x v) else 0) := by |
| 186 | apply tsum_congr; intro v; dsimp only [Pi.smul_apply,smul_eq_mul]; split_ifs with H |
| 187 | · rw [bill_eq, bill_eq, abs_mul, ENNReal.ofReal_mul (abs_nonneg _), mul_assoc]; |
| 188 | exact (mul_zero _).symm |
| 189 | _ ≤ _ := by rw [ENNReal.tsum_mul_left]; exact mul_le_mul_right (h.2 i x) _ |
| 190 | lemma neg : Within D σ p (-u) := by simpa using h.scale (-1) |
| 191 | lemma by_abs {v : Page X n} (h' : ∀ x, |v x| ≤ |u x|) : Within D σ p v := by |
| 192 | refine ⟨h.1,fun i x=>?_⟩ |
| 193 | refine LE.le.trans ?_ (h.2 i x) |
| 194 | refine ENNReal.tsum_le_tsum fun a=>?_ |
| 195 | split |
| 196 | · exact bill_mono (h' _) le_rfl |
| 197 | exact le_rfl |
| 198 | lemma sub (h' : Within D σ q v) : Within D σ (p+q) (u-v) := by |
| 199 | refine ⟨add_nonneg h.1 h'.1,fun i x=>?_⟩ |
| 200 | rw [ENNReal.ofReal_add h.1 h'.1] |
| 201 | apply LE.le.trans ?_ (add_le_add (h.2 i x) (h'.2 i x)) |
| 202 | unfold rent |
| 203 | rw [← ENNReal.tsum_add]; refine ENNReal.tsum_le_tsum (fun a=>?_) |
| 204 | split_ifs |
| 205 | · exact bill_sub .. |
| 206 | exact (zero_add _).ge |
| 207 | lemma add (h' : Within D σ q v) : Within D σ (p+q) (u+v) := by simpa using h.sub h'.neg |
| 208 | omit h |
| 209 | lemma zero (hp : 0≤p) : Within D σ p (0:Page X n) := ⟨hp, fun i x=> by simp [rent,bill]⟩ |
| 210 | lemma sum {T : Type} (s : Finset T) {a : T→Page X n} {p : T→ℝ} (h : ∀ i∈s,Within D σ (p i) (a i)) : Within D σ (∑ i∈s,p i) (∑ i∈s,a i) := by |
| 211 | induction s using Finset.induction with |
| 212 | | empty => simp only [Finset.sum_empty]; exact zero le_rfl |
| 213 | | insert a s h' ih => simpa only [Finset.sum_insert h'] using (h a (Finset.mem_insert_self ..)).add (ih (fun i hi=>h i (Finset.mem_insert_of_mem hi))) |
| 214 | include h |
| 215 | lemma reindex (e : Fin n≃ Fin m) : Within D σ p (escort e u) := by |
| 216 | refine ⟨h.1,fun j x=>?_⟩ |
| 217 | refine LE.le.trans (Eq.le ?_) (h.2 (e.symm j) x) |
| 218 | unfold rent; rw [← (casesEquiv e (.refl X)).tsum_eq _]; apply tsum_congr |
| 219 | intro a |
| 220 | have hv : escort e u (casesEquiv e (.refl X) a)=u a := by simp [escort,casesEquiv_apply, Function.comp_assoc] |
| 221 | have ht : run D x (casesEquiv e (.refl X) a) = run D x a := by simpa only [casesEquiv_apply, Equiv.coe_refl,id_comp] using run_escort D e.symm x a |
| 222 | simp only [hv,ht]; rfl |
| 223 | end Within |
| 224 | |
| 225 | lemma rent_head (u : Page X (n+1)) (x : X) : rent D σ u 0 x = ∑' v : Legs X n, bill (u (hitch x v)) (σ*run D x v) := by |
| 226 | unfold rent; rw [ts_hitch]; simp only [hitch_zero,run_some]; rw [tsum_eq_single x]; simp [D.self] |
| 227 | intro y hy; simp [hy] |
| 228 | lemma rent_tail (u : Page X (n+1)) (i : Fin n) (x : X) : rent D σ u i.succ x = ∑' y,∑' v : Legs X n, if v i=x then bill (u (hitch y v)) (σ*run D x (hitch y v)) else 0 := by |
| 229 | unfold rent; rw [ts_hitch]; simp only [hitch_succ] |
| 230 | lemma within_home {v : Text α (n+1)} (h : Within (lawn α) σ p v) : Folded σ (fun x u=>v (hitch x u)) p := by |
| 231 | intro x |
| 232 | have hz := h.2 (0:Fin (n+1)) x |
| 233 | rw [rent_head] at hz |
| 234 | exact hz |
| 235 | |
| 236 | end YM.WilsonBulk.Sheet |