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.Maxwell.Wick |
| 2 | import Mathlib.LinearAlgebra.Multilinear.Curry |
| 3 | |
| 4 | /-! The definition using slot number counts each unordered pair once. -/ |
| 5 | set_option autoImplicit false |
| 6 | noncomputable section |
| 7 | namespace YM.Maxwell.Wick |
| 8 | open Function Set Filter Equiv |
| 9 | open scoped Topology ContDiff BigOperators |
| 10 | |
| 11 | namespace Occ |
| 12 | variable {n m : ℕ} {G : Gauge} {W : Powers G n} {Y : Powers G m} |
| 13 | |
| 14 | variable (f : Fin n → Fin m) (hf : Injective f) |
| 15 | |
| 16 | /-- Reindex occurrences, allowing deletion/insertion of zero powers. -/ |
| 17 | theorem reindex (hf : Injective f) (h : ∀ i, Y (f i) = W i) (eh : ∀ k : Fin m, k ∉ Set.range f → Y k=0) : |
| 18 | ∃ e : Occ W ≃ Occ Y, (∀ p, (e p).label = f p.label) ∧ |
| 19 | (∀ p, (e p).probe = p.probe) ∧ (∀ p, (e p).index = p.index) := by |
| 20 | let L (p : Occ W) : Occ Y := atSlot (f p.label) p.probe p.index (by rw [h]; exact p.legit) |
| 21 | have hu : Injective L := by |
| 22 | intro p q he |
| 23 | have hs := congr_arg (probe (W := Y)) he; have hk := congr_arg (index (W := Y)) he |
| 24 | refine ext (hf ?_) hs hk; exact congr_arg (label (W := Y)) he |
| 25 | have hs : Surjective L := by |
| 26 | intro v |
| 27 | by_cases ht : v.label ∈ Set.range f |
| 28 | · rcases ht with ⟨l, hl⟩ |
| 29 | refine ⟨atSlot l v.probe v.index ?_,ext ?_ ?_ ?_⟩ |
| 30 | · rw [← h l, hl]; exact v.legit |
| 31 | · exact hl |
| 32 | · simp [L] |
| 33 | simp [L] |
| 34 | have hp := v.legit |
| 35 | rw [eh _ ht] at hp |
| 36 | exact Nat.not_lt_zero _ hp |>.elim |
| 37 | exact ⟨Equiv.ofBijective L ⟨hu,hs⟩, fun _ => rfl, fun _ => rfl, fun _ => rfl⟩ |
| 38 | |
| 39 | lemma induced (hf : Injective f) {e : Occ W ≃ Occ Y} (h : ∀ p, (e p).label=f (label p)) : |
| 40 | ∃ L : Matching W ≃ Matching Y, ∀ P v, e (partner P v) = partner (L P) (e v) := by |
| 41 | -- subtypes on permutations |
| 42 | let X := e.permCongr |
| 43 | have he (s : Equiv.Perm (Occ W)) (v : Occ W) : X s (e v) = e (s v) := by simp [X] |
| 44 | have hh (s : Equiv.Perm (Occ W)) : s * s = 1 ↔ (X s) * (X s) = 1 := by |
| 45 | constructor |
| 46 | · intro hx; ext1 w |
| 47 | obtain ⟨w,rfl⟩ := e.surjective w |
| 48 | simpa [Perm.mul_apply, he] using congr_arg e (show s (s w) = w from DFunLike.congr_fun hx w) |
| 49 | intro hx; ext1 w |
| 50 | apply e.injective |
| 51 | change e (s (s w)) = e w |
| 52 | rw [← he, ← he]; exact DFunLike.congr_fun hx (e w) |
| 53 | let L : Matching W ≃ Matching Y := Equiv.subtypeEquiv X (by |
| 54 | intro s |
| 55 | rw [hh] |
| 56 | apply and_congr_right |
| 57 | intro _ |
| 58 | constructor |
| 59 | · intro H x |
| 60 | obtain ⟨x,rfl⟩ := e.surjective x |
| 61 | rw [he, h,h]; exact hf.ne (H x) |
| 62 | intro H x |
| 63 | have hw := H (e x); rw [he,h,h] at hw |
| 64 | exact fun Hs => hw (congr_arg f Hs)) |
| 65 | exact ⟨L,fun P v => (he _ _).symm⟩ |
| 66 | |
| 67 | def toCorner (P : Matching W) (p : Occ W) : Occ W := if p ∈ corners P then p else partner P p |
| 68 | |
| 69 | theorem fixed (P : Matching W) {p : Occ W} (h : p ∈ corners P) : toCorner P p = p := by simp [toCorner,h] |
| 70 | |
| 71 | theorem inside (P : Matching W) (p : Occ W) : toCorner P p ∈ corners P := by |
| 72 | unfold toCorner; split_ifs with H |
| 73 | · exact H |
| 74 | exact (orientation _ _).mpr H |
| 75 | |
| 76 | @[simp] theorem canonical (P : Matching W) (p : Occ W) : toCorner P (partner P p) = toCorner P p := by |
| 77 | by_cases hp : p ∈ corners P <;> simp [toCorner,orientation,hp] |
| 78 | |
| 79 | lemma cornerEquivProof (e : Occ W ≃ Occ Y) (P Q) (h : ∀ p, partner Q (e p) = e (partner P p)) (p) : |
| 80 | toCorner P (e.symm (toCorner Q (e p))) = toCorner P p := by |
| 81 | by_cases H : e p ∈ corners Q |
| 82 | · rw [fixed Q H,e.symm_apply_apply] |
| 83 | rw [show toCorner Q (e p) = partner Q (e p) from if_neg H, h, e.symm_apply_apply, canonical] |
| 84 | |
| 85 | lemma graph_agree (e : Occ W ≃ Occ Y) (x : Points n) (y : Points m) (hx : x ∈ conf n) |
| 86 | (hE : ∀ a b, edge y (e a) (e b) = edge x a b) (P Q) (h : ∀ p, partner Q (e p) = e (partner P p)) : |
| 87 | graph x P = graph y Q := by |
| 88 | have hw (p) : partner P (e.symm p) = e.symm (partner Q p) := by |
| 89 | apply e.injective; rw [← h, e.apply_symm_apply, e.apply_symm_apply] |
| 90 | apply Finset.prod_bij' (fun p _ => toCorner Q (e p)) (fun q _ => toCorner P (e.symm q)) |
| 91 | (fun p _ => inside ..) (fun q _ => inside ..) |
| 92 | (fun p hp => (cornerEquivProof e P Q h p).trans (fixed P hp)) |
| 93 | (fun q hq => (cornerEquivProof e.symm Q P hw q).trans (fixed Q hq)) |
| 94 | intro p _ |
| 95 | by_cases hc : e p ∈ corners Q |
| 96 | · rw [fixed Q hc, h,hE] |
| 97 | simp only [toCorner, if_neg hc,turn,h,hE] |
| 98 | exact entry_symmetric _ _ ((show Injective x.ofLp from hx).ne (different P p).symm) |
| 99 | end Occ |
| 100 | open Occ |
| 101 | |
| 102 | variable {G : Gauge} {n m : ℕ} |
| 103 | theorem monExtension {Y : Powers G m} {W : Powers G n} (f : Fin n → Fin m) (H : Injective f) {x y} |
| 104 | (hx : x ∈ conf n) (hy : ∀ i, y (f i) = x i) |
| 105 | (hk : ∀ i, Y (f i) = W i) (hl : ∀ k, k ∉ Set.range f → Y k=0) : |
| 106 | monomial x W = monomial (points y) Y := by |
| 107 | obtain ⟨e, he, hs, -⟩ := reindex f H hk hl |
| 108 | obtain ⟨L,hL⟩ := induced f H he |
| 109 | refine Fintype.sum_equiv L _ _ fun p => graph_agree e _ _ hx ?_ p (L p) fun i => (hL p i).symm |
| 110 | intro i k; simp [edge,he,hs,hy] |
| 111 | |
| 112 | theorem exchangeSites (s : Equiv.Perm (Fin n)) {x} (hx : x ∈ conf n) (v : Fin n → WickPol G) : |
| 113 | moment G x v = moment G (points (x.ofLp ∘ s)) (v ∘ s) := by |
| 114 | let e : Fin n → Fin n := s |
| 115 | let y := x.ofLp ∘ s |
| 116 | have he : moment G x = (moment G (points y)).domDomCongr s := by |
| 117 | refine Module.Basis.ext_multilinear (fun _ => monBasis G) ?_ |
| 118 | intro W |
| 119 | rw [moment_basis] |
| 120 | change monomial x W = moment G (points y) (fun i => monBasis G (W (s i))) |
| 121 | rw [show (fun i => monBasis G (W (s i))) = fun i => monBasis G ((W ∘ s) i) from rfl] |
| 122 | rw [moment_basis] |
| 123 | exact monExtension s.symm s.symm.injective hx (by simp [y]) (by simp) (by simp [s.symm.range_eq_univ]) |
| 124 | exact DFunLike.congr_fun he v |
| 125 | |
| 126 | theorem adjoin {x} (hx : x ∈ conf n) (y : E4) (v : Fin n → WickPol G) : |
| 127 | moment G x v = moment G (Points.cons y x) (Fin.cons 1 v) := by |
| 128 | let Y := Points.cons y x |
| 129 | let M : MultilinearMap ℂ (fun _ : Fin n => WickPol G) ℂ := (moment G Y).curryLeft (1 : WickPol G) |
| 130 | suffices h : moment G x = M from DFunLike.congr_fun h v |
| 131 | refine Module.Basis.ext_multilinear (fun _ => monBasis G) ?_ |
| 132 | intro W |
| 133 | rw [moment_basis] |
| 134 | let W' : Powers G (n+1) := Fin.cons 0 W |
| 135 | change monomial x W = moment G Y (Fin.cons 1 _) |
| 136 | rw [show (Fin.cons (1 : WickPol G) (fun i => monBasis G (W i))) = fun i => monBasis G (W' i) by |
| 137 | ext1 i; refine Fin.cases ?_ (fun j ↦ ?_) i <;> simp [W',monBasis], moment_basis] |
| 138 | refine monExtension Fin.succ (Fin.succ_injective n) hx ?_ ?_ ?_ |
| 139 | · simp |
| 140 | · simp [W'] |
| 141 | intro i hi |
| 142 | by_cases he : i=0 |
| 143 | · simp [he,W'] |
| 144 | exact (hi (show i ∈ Set.range Fin.succ from ⟨_, i.succ_pred he⟩)).elim |
| 145 | |
| 146 | theorem constants (x : Points n) : moment G x (fun _ => 1) = 1 := by |
| 147 | classical |
| 148 | let A : Powers G n := fun _ => 0 |
| 149 | rw [show (fun _ : Fin n => (1 : WickPol G)) = (fun i => monBasis G (A i)) by simp [monBasis,A], moment_basis] |
| 150 | haveI : IsEmpty (Occ A) := ⟨fun p => Nat.not_lt_zero _ p.legit⟩ |
| 151 | haveI : Subsingleton (Matching A) := by unfold Matching; infer_instance |
| 152 | haveI : Unique (Matching A) := uniqueOfSubsingleton (⟨1,mul_one _, fun v => isEmptyElim v⟩ : Matching A) |
| 153 | simp [monomial,Occ.graph, Subsingleton.elim (corners (W := A) _) ∅] |
| 154 | end YM.Maxwell.Wick |