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 | |
| 3 | /-! Explicit two-leg cross pairings for the *actual* Wick moment. In particular |
| 4 | handles all multiplicities when slots coincide. -/ |
| 5 | set_option autoImplicit false |
| 6 | noncomputable section |
| 7 | namespace YM.UVNext.FreeStress |
| 8 | open Maxwell Wick Wick.Occ Function Set |
| 9 | variable {G : Gauge} |
| 10 | |
| 11 | -- Use a literal two by two grid to model occurrences, whether probes repeat or not. |
| 12 | private abbrev T2 := Fin 2 |
| 13 | private abbrev Deck (G : Gauge) := T2 → T2 → Slot G |
| 14 | private abbrev Grid2 := T2 × T2 |
| 15 | |
| 16 | private def power (A : Deck G) : Powers G 2 := fun i => |
| 17 | Finsupp.single (A i 0) 1 + Finsupp.single (A i 1) 1 |
| 18 | |
| 19 | private lemma two_cases (i : T2) : i=0 ∨ i=1 := by fin_cases i <;> decide |
| 20 | |
| 21 | private def into (A : Deck G) (u : Grid2) : Occ (power A) := by |
| 22 | classical |
| 23 | exact if u.2=0 then atSlot u.1 (A u.1 0) 0 (by simp [power]) else |
| 24 | atSlot u.1 (A u.1 1) (if A u.1 0 = A u.1 1 then 1 else 0) (by |
| 25 | simp only [power, Finsupp.add_apply, Finsupp.single_eq_same]; split_ifs with h |
| 26 | · simp [h] |
| 27 | exact Nat.zero_lt_succ _) |
| 28 | |
| 29 | @[simp] private lemma site_into (A : Deck G) (u : Grid2) : (into A u).label = u.1 := by |
| 30 | unfold into; split <;> rfl |
| 31 | @[simp] private lemma probe_into (A : Deck G) (u : Grid2) : (into A u).probe = A u.1 u.2 := by |
| 32 | obtain ⟨i,j⟩ := u; rcases two_cases j with rfl|rfl <;> simp [into] |
| 33 | |
| 34 | private lemma occurrence_iso (A : Deck G) : Bijective (into A) := by |
| 35 | classical |
| 36 | constructor |
| 37 | · rintro ⟨i,j⟩ ⟨b,d⟩ h |
| 38 | have h1 := congr_arg (fun p : Occ (power A) => p.label) h |
| 39 | have h2 := congr_arg (fun p : Occ (power A) => p.probe) h |
| 40 | simp only [site_into,probe_into] at h1 h2 |
| 41 | change i=b at h1; subst b |
| 42 | have h3 := congr_arg (fun p : Occ (power A) => p.index) h |
| 43 | change A i j = A i d at h2 |
| 44 | rcases two_cases j with rfl|rfl <;> rcases two_cases d with rfl|rfl |
| 45 | all_goals first | rfl | simp [into,h2] at h3 |
| 46 | · intro p |
| 47 | let i := p.label |
| 48 | have hp := p.legit |
| 49 | change p.index < (power A i) p.probe at hp |
| 50 | simp only [power,Finsupp.add_apply,Finsupp.single_apply] at hp |
| 51 | by_cases hr : A i 0 = A i 1 |
| 52 | · rw [← hr] at hp |
| 53 | by_cases he : A i 0 = p.probe |
| 54 | · rw [if_pos he] at hp |
| 55 | have he' := hr ▸ he |
| 56 | rcases (show p.index = 0 ∨ p.index=1 by omega) with hd|hd |
| 57 | · exact ⟨(i,0),Occ.ext (site_into ..) (by rw [probe_into]; exact he) (by simp [into, hd])⟩ |
| 58 | exact ⟨(i,1),Occ.ext (site_into ..) (by rw [probe_into]; exact he') (by simp [into,hr,hd])⟩ |
| 59 | rw [if_neg he] at hp; omega |
| 60 | by_cases he : A i 0 = p.probe |
| 61 | · rw [if_pos he,if_neg (show A i 1 ≠ p.probe by rw [← he]; exact Ne.symm hr)] at hp |
| 62 | exact ⟨(i,0),Occ.ext (site_into ..) (by rw [probe_into]; exact he) (by simp [into]; omega)⟩ |
| 63 | by_cases he' : A i 1 = p.probe |
| 64 | · rw [if_pos he', if_neg he] at hp |
| 65 | exact ⟨(i,1),Occ.ext (site_into ..) (by rw [probe_into]; exact he') (by simp [into,hr]; omega)⟩ |
| 66 | rw [if_neg he',if_neg he] at hp; omega |
| 67 | |
| 68 | -- index the pairings by the two possible matchings from site 0 to 1 |
| 69 | section Matching |
| 70 | variable {W : Powers G 2} (e : Grid2 ≃ Occ W) (he : ∀ u : Grid2, (e u).label=u.1) |
| 71 | |
| 72 | private def cross2 (s : Equiv.Perm T2) (u : Grid2) : Grid2 := |
| 73 | if u.1=0 then (1,s u.2) else (0,s.symm u.2) |
| 74 | @[simp] private lemma cross_left (s : Equiv.Perm T2) (i : T2) : cross2 s (0,i) = (1,s i) := rfl |
| 75 | @[simp] private lemma cross_right (s : Equiv.Perm T2) (i : T2) : cross2 s (1,i) = (0,s.symm i) := rfl |
| 76 | @[simp] private lemma cross_swap (s : Equiv.Perm T2) (u : Grid2) : cross2 s (cross2 s u)=u := by |
| 77 | obtain ⟨i,j⟩ := u; rcases two_cases i with rfl|rfl <;> simp |
| 78 | |
| 79 | private def matchingAt (s : Equiv.Perm T2) : Matching W := |
| 80 | ⟨{ toFun p := e (cross2 s (e.symm p)) |
| 81 | invFun p := e (cross2 s (e.symm p)) |
| 82 | left_inv p := by simp |
| 83 | right_inv p := by simp },by |
| 84 | constructor |
| 85 | · ext1 p; change e (cross2 s (e.symm (e (cross2 s (e.symm p))))) = p; simp |
| 86 | intro p |
| 87 | obtain ⟨⟨i,j⟩,rfl⟩ := e.surjective p |
| 88 | change (e (cross2 s (e.symm _))).label ≠ _ |
| 89 | rcases two_cases i with rfl|rfl <;> simp [he]⟩ |
| 90 | |
| 91 | @[simp] private lemma matching_at (s : Equiv.Perm T2) (u : Grid2) : |
| 92 | partner (matchingAt e he s) (e u) = e (cross2 s u) := by |
| 93 | change e (cross2 s (e.symm _)) = _; simp |
| 94 | |
| 95 | private lemma give_map : Bijective (matchingAt e he) := by |
| 96 | classical |
| 97 | constructor |
| 98 | · intro s t h |
| 99 | ext1 i |
| 100 | have hh := congr_arg (fun v : Matching W => e.symm (partner v (e (0,i)))) h |
| 101 | simpa using congr_arg Prod.snd hh |
| 102 | · intro p |
| 103 | let L (u : Grid2) := e.symm (partner p (e u)) |
| 104 | have hx u : (L u).1 ≠ u.1 := by |
| 105 | simpa [L, ← he] using different p (e u) |
| 106 | have hl (u) : L (L u)=u := by simp [L] |
| 107 | let f (i : T2) := (L (0,i)).2 |
| 108 | let g (i : T2) := (L (1,i)).2 |
| 109 | have hf (i) : L (0,i)=(1,f i) := Prod.ext (by |
| 110 | have hp := hx (0,i); rcases two_cases (L (0,i)).1 with h|h |
| 111 | · exact (hp h).elim |
| 112 | exact h) rfl |
| 113 | have hg (i) : L (1,i)=(0,g i) := Prod.ext (by |
| 114 | have hp := hx (1,i); rcases two_cases (L (1,i)).1 with h|h |
| 115 | · exact h |
| 116 | exact (hp h).elim) rfl |
| 117 | have hq i : g (f i)=i := by |
| 118 | have h := hl (0,i); rw [hf,hg] at h; exact congr_arg Prod.snd h |
| 119 | have hr i : f (g i)=i := by |
| 120 | have h := hl (1,i); rw [hg,hf] at h; exact congr_arg Prod.snd h |
| 121 | let s : Equiv.Perm T2 := ⟨f,g,hq,hr⟩ |
| 122 | refine ⟨s, Subtype.ext ?_⟩ |
| 123 | ext1 v |
| 124 | obtain ⟨⟨i,j⟩,rfl⟩ := e.surjective v |
| 125 | change partner (matchingAt e he s) _ = partner p _ |
| 126 | rw [matching_at]; apply e.symm.injective |
| 127 | change e.symm _=L (i,j); rw [e.symm_apply_apply] |
| 128 | rcases two_cases i with rfl|rfl |
| 129 | exacts [(hf j).symm,(hg j).symm] |
| 130 | |
| 131 | include he in |
| 132 | private lemma corner_product (x : Points 2) (s : Equiv.Perm T2) : |
| 133 | ∏ i : T2, edge x (e (0,i)) (e (1,s i)) = graph x (matchingAt e he s) := by |
| 134 | apply Finset.prod_bij (fun i _ => e (0,i)) |
| 135 | · intro i _; simp [corners, matching_at, he] |
| 136 | · intro a _ b _ h; exact congr_arg Prod.snd (e.injective h) |
| 137 | · rintro v hv |
| 138 | obtain ⟨⟨i,j⟩,rfl⟩ := e.surjective v |
| 139 | rcases two_cases i with rfl|rfl |
| 140 | · exact ⟨j,Finset.mem_univ _,rfl⟩ |
| 141 | exfalso; simp [corners,matching_at,he] at hv |
| 142 | intro a _; simp |
| 143 | end Matching |
| 144 | |
| 145 | private lemma perm_sum {Y : Type*} [AddCommMonoid Y] (f : Equiv.Perm T2 → Y) : |
| 146 | ∑ s, f s = f (Equiv.refl _) + f (Equiv.swap 0 1) := by |
| 147 | classical |
| 148 | let L (i : T2) : Equiv.Perm T2 := if i=0 then Equiv.refl _ else Equiv.swap 0 1 |
| 149 | have ht (p q : Equiv.Perm T2) (h : p 0=q 0) : p=q := by |
| 150 | ext1 i; rcases two_cases i with rfl|rfl |
| 151 | · exact h |
| 152 | have hp := p.injective.ne (show (1:T2)≠0 by decide) |
| 153 | have hq := q.injective.ne (show (1:T2)≠0 by decide) |
| 154 | rw [h] at hp |
| 155 | rcases two_cases (p 1) with h|h <;> rcases two_cases (q 1) with w|w <;> |
| 156 | rcases two_cases (q 0) with z|z <;> simp_all |
| 157 | have he (i : T2) : L i 0=i := by rcases two_cases i with rfl|rfl <;> simp [L] |
| 158 | let e : T2 ≃ Equiv.Perm T2 := ⟨L,fun s => s 0,he,fun s => ht _ _ (he _)⟩ |
| 159 | rw [← Equiv.sum_comp e, Fin.sum_univ_two] |
| 160 | simp [e,L] |
| 161 | |
| 162 | private lemma powder (x : Points 2) (A : Deck G) : |
| 163 | Wick.monomial x (power A) = |
| 164 | entry (A 0 0) (A 1 0) (x 0) (x 1) * entry (A 0 1) (A 1 1) (x 0) (x 1) + |
| 165 | entry (A 0 0) (A 1 1) (x 0) (x 1) * entry (A 0 1) (A 1 0) (x 0) (x 1) := by |
| 166 | let e := Equiv.ofBijective (into A) (occurrence_iso A) |
| 167 | have he u : (e u).label=u.1 := site_into .. |
| 168 | have hq u : (e u).probe=A u.1 u.2 := probe_into .. |
| 169 | rw [Wick.monomial, ← Equiv.sum_comp (Equiv.ofBijective _ (give_map e he))] |
| 170 | change (∑ s : Equiv.Perm T2, graph x (matchingAt e he s)) = _ |
| 171 | simp_rw [← corner_product e he, Fin.prod_univ_two, edge, he,hq] |
| 172 | rw [perm_sum]; simp |
| 173 | |
| 174 | private lemma moment_grid (x : Points 2) (A : Deck G) : |
| 175 | moment G x (fun i => MvPolynomial.X (A i 0) * MvPolynomial.X (A i 1)) = |
| 176 | entry (A 0 0) (A 1 0) (x 0) (x 1) * entry (A 0 1) (A 1 1) (x 0) (x 1) + |
| 177 | entry (A 0 0) (A 1 1) (x 0) (x 1) * entry (A 0 1) (A 1 0) (x 0) (x 1) := by |
| 178 | rw [show (fun i => MvPolynomial.X (A i 0) * MvPolynomial.X (R:=ℂ) (A i 1)) = fun i => |
| 179 | monBasis G (power A i) by funext i; simp [MvPolynomial.X,MvPolynomial.monomial_mul, monBasis,power], moment_basis] |
| 180 | exact powder .. |
| 181 | |
| 182 | |
| 183 | /-- first letter at 0, second at 1. -/ |
| 184 | def readings {α : Type*} (p q : α) : Fin 2 → α := Fin.cons (α:=fun _ : Fin 2 => α) p (fun _ => q) |
| 185 | @[simp] theorem read_zero {α : Type*} (p q : α) : readings p q 0=p := rfl |
| 186 | @[simp] theorem read_one {α : Type*} (p q : α) : readings p q 1=q := by |
| 187 | change readings p q (0:Fin 1).succ = q; simp [readings] |
| 188 | |
| 189 | /-- complex bilinear pair polynomial evaluation with pinned positions. -/ |
| 190 | def wickTwo (G : Gauge) (x : Points 2) : WickPol G →ₗ[ℂ] WickPol G →ₗ[ℂ] ℂ where |
| 191 | toFun p := |
| 192 | { toFun q := moment G x (readings p q) |
| 193 | map_add' q r := by |
| 194 | let f := (moment G x).toLinearMap (readings p 0) 1 |
| 195 | have he q : f q = moment G x (readings p q) := by |
| 196 | change moment G x (update _ _ _) = _ |
| 197 | congr 1; funext i; rcases two_cases i with rfl|rfl <;> simp |
| 198 | rw [← he, ← he, ← he]; exact map_add f .. |
| 199 | map_smul' a q := by |
| 200 | let f := (moment G x).toLinearMap (readings p 0) 1 |
| 201 | have he q : f q = moment G x (readings p q) := by |
| 202 | change moment G x (update _ _ _) = _ |
| 203 | congr 1; funext i; rcases two_cases i with rfl|rfl <;> simp |
| 204 | rw [← he, ← he]; exact map_smul f .. } |
| 205 | map_add' p q := by |
| 206 | apply LinearMap.ext; intro r |
| 207 | change (moment G x).curryLeft (p+q) (fun _ => r) = _ |
| 208 | rw [map_add]; rfl |
| 209 | map_smul' a p := by |
| 210 | apply LinearMap.ext; intro r |
| 211 | change (moment G x).curryLeft (a • p) (fun _ => r) = _ |
| 212 | rw [map_smul]; rfl |
| 213 | |
| 214 | open MvPolynomial in |
| 215 | private lemma letters (x : Points 2) (i j a b : Slot G) : |
| 216 | wickTwo G x (X i * X j) (X a * X b) = entry i a (x 0) (x 1) * entry j b (x 0) (x 1) + |
| 217 | entry i b (x 0) (x 1) * entry j a (x 0) (x 1) := by |
| 218 | let A : Deck G := readings (readings i j) (readings a b) |
| 219 | have he := moment_grid x A |
| 220 | simp only [A, read_zero, read_one] at he |
| 221 | convert he using 1 |
| 222 | change moment G x (readings (X i * X j) (X a * X b)) = _ |
| 223 | congr 1; funext s; rcases two_cases s with rfl|rfl <;> simp |
| 224 | |
| 225 | variable {j l : ℕ} |
| 226 | |
| 227 | private theorem withProbe (f : Probe G j → Prop) |
| 228 | (k : ∀ i : Fin (legDim G j), f (coordinateLeg ⟨j,i⟩)) |
| 229 | (hz : f 0) (ha : ∀ p q, f p → f q → f (p+q)) (hs : ∀ c : ℝ, ∀ p, f p → f (c • p)) : ∀ p, f p := by |
| 230 | let V : Submodule ℝ (Probe G j) := { carrier := {u | f u}, zero_mem' := hz, add_mem' := ha _ _, smul_mem' := fun t => hs t _ } |
| 231 | intro p; change p ∈ V |
| 232 | have he : p = ∑ i : Fin (legDim G j), p (frame G j i) • coordinateLeg ⟨j,i⟩ := by |
| 233 | apply (frame G j).ext |
| 234 | intro i |
| 235 | simp only [coordinateLeg] |
| 236 | classical simp |
| 237 | rw [he] |
| 238 | exact Submodule.sum_mem V fun i _ => V.smul_mem _ (k i) |
| 239 | |
| 240 | private lemma plain_add (p q : Probe G j) : symbol j (p+q) = symbol j p + symbol j q := by |
| 241 | apply equalPol; intro A |
| 242 | simp [symbol_test] |
| 243 | private lemma plain_zero : symbol j (0 : Probe G j) = 0 := by |
| 244 | apply equalPol; intro A; simp [symbol_test] |
| 245 | private lemma plain_smul (t : ℝ) (p : Probe G j) : symbol j (t • p) = (t:ℂ) • symbol j p := by |
| 246 | apply equalPol; intro A |
| 247 | rw [map_smul,symbol_test,symbol_test]; simp |
| 248 | |
| 249 | def actualEntry {x y : E4} (h : x ≠ y) (p : Probe G j) (q : Probe G l) := |
| 250 | ((pairing (G:=G) (z:=x-y) (show x-y∈away from sub_ne_zero.mpr h) p q : ℝ):ℂ) |
| 251 | |
| 252 | /- The low-leg specialization suffices (all positions separated, arbitrary jet |
| 253 | orders, with the exact derivative kernels / color normalization of `Maxwell`). -/ |
| 254 | set_option linter.unusedSimpArgs false in |
| 255 | set_option maxHeartbeats 1800000 in |
| 256 | theorem double_symbol (x : Points 2) (h : x 0 ≠ x 1) (j k m n : ℕ) : |
| 257 | ∀ (p : Probe G j) (q : Probe G k) (b : Probe G m) (c : Probe G n), |
| 258 | wickTwo G x (symbol j p * symbol k q) (symbol m b * symbol n c) = |
| 259 | actualEntry h p b * actualEntry h q c + actualEntry h p c * actualEntry h q b := by |
| 260 | refine withProbe _ (fun i => ?_) ?_ (fun a d ha hd => ?_) (fun t a ha => ?_) |
| 261 | · refine withProbe _ (fun k => ?_) ?_ (fun a d ha hd => ?_) (fun t a ha => ?_) |
| 262 | · refine withProbe _ (fun m => ?_) ?_ (fun a d ha hd => ?_) (fun t a ha => ?_) |
| 263 | · refine withProbe _ (fun n => ?_) ?_ (fun a d ha hd => ?_) (fun t a ha => ?_) |
| 264 | · simp only [show ∀ (j : ℕ) (i : Fin (legDim G j)), symbol j (coordinateLeg ⟨j,i⟩) = MvPolynomial.X ⟨j,i⟩ from fun j i => symbol_coordinate ⟨j,i⟩,letters] |
| 265 | rfl |
| 266 | · simp [plain_zero, actualEntry] |
| 267 | · simp only [plain_add,mul_add,map_add,LinearMap.add_apply]; rw [ha,hd] |
| 268 | simp [actualEntry]; ring |
| 269 | · simp only [plain_smul,mul_smul_comm,map_smul,LinearMap.smul_apply,smul_eq_mul]; rw [ha] |
| 270 | simp only [actualEntry,map_smul,LinearMap.smul_apply,smul_eq_mul,Complex.ofReal_mul]; ring |
| 271 | · intro c; simp [plain_zero, actualEntry] |
| 272 | · intro c; simp only [plain_add,add_mul,map_add,LinearMap.add_apply]; rw [ha,hd] |
| 273 | simp [actualEntry]; ring |
| 274 | · intro c; simp only [plain_smul,smul_mul_assoc,map_smul,LinearMap.smul_apply,smul_eq_mul]; rw [ha] |
| 275 | simp only [actualEntry,map_smul,LinearMap.smul_apply,smul_eq_mul,Complex.ofReal_mul]; ring |
| 276 | · intro b c; simp [plain_zero, actualEntry] |
| 277 | · intro b c; simp only [plain_add,mul_add,map_add,LinearMap.add_apply]; rw [ha,hd] |
| 278 | simp [actualEntry]; ring |
| 279 | · intro b c; simp only [plain_smul,mul_smul_comm,map_smul,LinearMap.smul_apply,smul_eq_mul]; rw [ha] |
| 280 | simp only [actualEntry,map_smul,LinearMap.smul_apply,smul_eq_mul,Complex.ofReal_mul]; ring |
| 281 | · intro q b c; simp [plain_zero, actualEntry] |
| 282 | · intro q b c; simp only [plain_add,add_mul,map_add,LinearMap.add_apply]; rw [ha,hd] |
| 283 | simp [actualEntry]; ring |
| 284 | · intro q b c; simp only [plain_smul,smul_mul_assoc,map_smul,LinearMap.smul_apply,smul_eq_mul]; rw [ha] |
| 285 | simp only [actualEntry,map_smul,LinearMap.smul_apply,smul_eq_mul,Complex.ofReal_mul]; ring |
| 286 | |
| 287 | def wickOne (G : Gauge) (x : Points 1) : WickPol G →ₗ[ℂ] ℂ := |
| 288 | (moment G x).toLinearMap 0 0 |
| 289 | |
| 290 | private theorem letter_one (p : WickPol G) (x : Points 1) : wickOne G x p = moment G x (fun _ => p) := by |
| 291 | change moment G x (update _ (0:Fin 1) p) = _ |
| 292 | congr 1; funext i; rw [Subsingleton.elim i 0,update_self] |
| 293 | |
| 294 | open MvPolynomial in |
| 295 | private theorem zero_here (x : Points 1) (i k : Slot G) : wickOne G x (X i * X k)=0 := by |
| 296 | classical |
| 297 | let W : Powers G 1 := fun _ => Finsupp.single i 1 + Finsupp.single k 1 |
| 298 | have h : (fun _ : Fin 1 => X i * X k (R:=ℂ)) = fun a => monBasis G (W a) := by |
| 299 | simp [W,X,monBasis,monomial_mul] |
| 300 | rw [letter_one,h,moment_basis,Wick.monomial] |
| 301 | apply Finset.sum_eq_zero; intro p _ |
| 302 | let g : Occ W := atSlot 0 i 0 (by dsimp only [W]; simp) |
| 303 | exact False.elim (different p g (Subsingleton.elim ..)) |
| 304 | |
| 305 | theorem mean_symbol (x : Points 1) : ∀ (p : Probe G j) (q : Probe G l), |
| 306 | moment G x (fun _ => symbol j p * symbol l q) = 0 := by |
| 307 | intro p q; rw [← letter_one] |
| 308 | unfold symbol |
| 309 | simp only [Finset.sum_mul, Finset.mul_sum,map_sum,MvPolynomial.C_mul',smul_mul_assoc, mul_smul_comm, |
| 310 | map_smul,zero_here,smul_zero,Finset.sum_const_zero] |
| 311 | |
| 312 | end YM.UVNext.FreeStress |