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.Extra.WEAK_SCALING_ACTLAW.Four |
| 2 | |
| 3 | /-! # Two-site pair table from the no-internal-contraction moment, including repeated legs. -/ |
| 4 | set_option autoImplicit false |
| 5 | noncomputable section |
| 6 | namespace YM.Extra.WeakScaling.Color |
| 7 | open Function Set Labels Maxwell Wick Tensor |
| 8 | open scoped Topology Matrix.Norms.Frobenius |
| 9 | variable {G : Gauge} |
| 10 | open Occ (partner) |
| 11 | |
| 12 | private abbrev Grid := Fin 2 × Fin 2 |
| 13 | private abbrev Plan := {s : Equiv.Perm Grid // (∀ x, s (s x)=x) ∧ ∀ x, (s x).1 ≠ x.1} |
| 14 | private lemma split_two (a : Fin 2) : a=0 ∨ a=1 := by omega |
| 15 | private def turn := Equiv.swap (0:Fin 2) 1 |
| 16 | private def direct : Plan := ⟨Equiv.prodCongr turn (.refl _),by decide,by decide⟩ |
| 17 | private def cross : Plan := ⟨Equiv.prodCongr turn turn,by decide,by decide⟩ |
| 18 | set_option maxRecDepth 10000 in |
| 19 | set_option maxHeartbeats 1000000 in |
| 20 | private lemma options : ∀ s : Plan, s=direct ∨ s=cross := by |
| 21 | intro ⟨s,hs,hS⟩ |
| 22 | have he : ∀ s : Grid → Grid, (∀ x, s (s x)=x) → (∀ x, (s x).1 ≠ x.1) → (∀ x, s x=direct.val x) ∨ ∀ x, s x=cross.val x := by decide |
| 23 | rcases he s hs hS with h|h |
| 24 | exacts [Or.inl (Subtype.ext (Equiv.ext h)),Or.inr (Subtype.ext (Equiv.ext h))] |
| 25 | |
| 26 | private def powers (u : Grid → Maxwell.Slot G) : Powers G 2 := fun i => Finsupp.single (u (i,0)) 1 + Finsupp.single (u (i,1)) 1 |
| 27 | private def addr (u : Grid → Maxwell.Slot G) (x : Grid) := if x.2 = 1 ∧ u (x.1,0) = u x then 1 else (0 : ℕ) |
| 28 | |
| 29 | private lemma enumerate (u : Grid → Maxwell.Slot G) : ∃ e : Grid ≃ Occ (powers u), |
| 30 | (∀ x, (e x).label = x.1) ∧ (∀ x, (e x).probe = u x) := by |
| 31 | have h (w : Occ (powers u)) : w.index < (if u (w.label,0) = w.probe then 1 else 0) + |
| 32 | (if u (w.label,1) = w.probe then 1 else 0) := by simpa [powers,Finsupp.single_apply] using w.legit |
| 33 | let f (x : Grid) := Occ.atSlot (W:=powers u) x.1 (u x) (addr u x) (by |
| 34 | obtain ⟨i,j⟩ := x; rcases split_two j with e|e <;> simp [e,powers,addr,Finsupp.single_apply]) |
| 35 | have hs : Surjective f := by |
| 36 | intro y; specialize h y |
| 37 | by_cases he : y.probe = u (y.label,0) |
| 38 | · by_cases hi : y.index = 0 |
| 39 | · exact ⟨(y.label,0), Occ.ext rfl he.symm (by change addr u (y.label,0) = _; simp [addr,hi])⟩ |
| 40 | have hw : y.probe = u (y.label,1) := by split_ifs at h <;> first | omega | exact Eq.symm (by assumption) |
| 41 | exact ⟨(y.label,1), Occ.ext rfl hw.symm (by change addr u (y.label,1) = _; rw [addr,if_pos ⟨rfl,he.symm.trans hw⟩]; split_ifs at h <;> omega)⟩ |
| 42 | rw [if_neg (Ne.symm he)] at h |
| 43 | have hw : y.probe = u (y.label,1) := by split_ifs at h <;> first | omega | exact Eq.symm (by assumption) |
| 44 | exact ⟨(y.label,1), Occ.ext rfl hw.symm (by change addr u (y.label,1) = _; rw [addr,if_neg (fun h => he (hw.trans h.2.symm))]; split_ifs at h <;> omega)⟩ |
| 45 | have hi i (e : f (i,0)=f (i,1)) : False := by |
| 46 | have h := congrArg Occ.probe e |
| 47 | have he := congrArg Occ.index e |
| 48 | change addr u (i,0)=addr u (i,1) at he |
| 49 | simp [addr,show u (i,0)=u (i,1) from h] at he |
| 50 | have ht : Injective f := by |
| 51 | rintro ⟨i,j⟩ ⟨k,l⟩ h |
| 52 | have e : i=k := congrArg Occ.label h |
| 53 | subst k |
| 54 | rcases split_two j with h₁|h₁ <;> rcases split_two l with h₂|h₂ <;> subst j <;> subst l <;> first | rfl | exact (hi i h).elim | exact (hi i h.symm).elim |
| 55 | exact ⟨Equiv.ofBijective f ⟨ht,hs⟩,fun _ => rfl,fun _ => rfl⟩ |
| 56 | |
| 57 | private lemma matching {w : Powers G 2} (e : Grid ≃ Occ w) (he : ∀ x, (e x).label = x.1) : |
| 58 | ∃ t : Plan ≃ Occ.Matching w, ∀ s x, partner (t s) (e x) = e (s.val x) := by |
| 59 | let t := e.permCongr |
| 60 | have ht (s : Equiv.Perm Grid) x : t s (e x)=e (s x) := by simp [t] |
| 61 | refine ⟨t.subtypeEquiv ?_,fun s x => ht _ _⟩ |
| 62 | intro s |
| 63 | constructor |
| 64 | · rintro ⟨h₁,h₂⟩ |
| 65 | refine ⟨Equiv.ext fun i => ?_, fun i => ?_⟩ <;> obtain ⟨x,rfl⟩ := e.surjective i |
| 66 | · simp [Equiv.Perm.mul_apply,ht,h₁ x] |
| 67 | rw [ht,he,he]; exact h₂ x |
| 68 | rintro ⟨h₁,h₂⟩ |
| 69 | refine ⟨fun x => e.injective ?_, fun x => ?_⟩ |
| 70 | · rw [← ht,← ht]; exact congrFun (congrArg DFunLike.coe h₁) (e x) |
| 71 | have h := h₂ (e x); rwa [ht,he,he] at h |
| 72 | |
| 73 | private def vertex (u : Grid → Maxwell.Slot G) (x : Points 2) (j : Grid) := entry (u (0,j.1)) (u (1,j.2)) (x 0) (x 1) |
| 74 | |
| 75 | private lemma wick_diagram (u : Grid → Maxwell.Slot G) (x : Points 2) : |
| 76 | monomial x (powers u) = vertex u x (0,0)*vertex u x (1,1) + vertex u x (0,1)*vertex u x (1,0) := by |
| 77 | let V := vertex u x |
| 78 | obtain ⟨e,he,hv⟩ := enumerate u |
| 79 | obtain ⟨t,ht⟩ := matching e he |
| 80 | have h (s : Plan) i : (s.val (0,i)).1 = 1 := (split_two _).resolve_left (s.property.2 (0,i)) |
| 81 | have H (s : Plan) : Occ.graph x (t s) = ∏ i : Fin 2, V (i, (s.val (0,i)).2) := by |
| 82 | symm |
| 83 | apply Finset.prod_bij' (fun i _ => e (0,i)) (fun v _ => (e.symm v).2) |
| 84 | · simp [Occ.corners,ht,he,h] |
| 85 | · simp |
| 86 | · simp |
| 87 | · intro a ha |
| 88 | obtain ⟨⟨i,j⟩,rfl⟩ := e.surjective a |
| 89 | have hi : i < _ := (show Occ.label (e (i,j)) = i from he _ ) ▸ (Finset.mem_filter.mp ha).2 |
| 90 | rw [e.symm_apply_apply]; exact congrArg (fun k => e (k,j)) (by omega) |
| 91 | intro a _; rw [Occ.edge, hv, ht, he, he, hv]; rw [h] |
| 92 | exact congrArg (fun k => entry _ (u k) _ _) (Prod.ext (h s a).symm rfl) |
| 93 | rw [monomial,← Equiv.sum_comp t] |
| 94 | simp_rw [H,show (Finset.univ : Finset Plan) = {direct,cross} from Finset.ext fun i => by simpa using options i] |
| 95 | rw [Finset.sum_insert (by decide), Finset.sum_singleton]; simp only [Fin.prod_univ_two]; rfl |
| 96 | |
| 97 | lemma entries (x : Points 2) (u v y z : Maxwell.Slot G) : |
| 98 | Wick.moment G x ![MvPolynomial.X u * MvPolynomial.X v, MvPolynomial.X y * MvPolynomial.X z] = |
| 99 | entry u y (x 0) (x 1) * entry v z (x 0) (x 1) + entry u z (x 0) (x 1) * entry v y (x 0) (x 1) := by |
| 100 | let p (i : Grid) := (![![u,v],![y,z]] : Fin 2 → Fin 2 → Maxwell.Slot G) i.1 i.2 |
| 101 | have he : ![MvPolynomial.X u * MvPolynomial.X v, MvPolynomial.X y * MvPolynomial.X z] = fun i => monBasis G (powers p i) := by |
| 102 | have he (u v : Maxwell.Slot G) : MvPolynomial.X u * MvPolynomial.X v = |
| 103 | monBasis G (Finsupp.single u 1 + Finsupp.single v 1) := by |
| 104 | rw [← pow_one (MvPolynomial.X u : WickPol G),← pow_one (MvPolynomial.X v : WickPol G), MvPolynomial.X_pow_eq_monomial,MvPolynomial.X_pow_eq_monomial,MvPolynomial.monomial_mul] |
| 105 | simp [monBasis] |
| 106 | funext i; rcases split_two i with h|h <;> simp [p,powers,h,he] |
| 107 | rw [he,moment_basis, wick_diagram]; rfl |
| 108 | |
| 109 | private def first (x : Points 2) (v : WickPol G) := (Wick.moment G x).toLinearMap ![0,v] 0 |
| 110 | private def last' (x : Points 2) (v : WickPol G) := (Wick.moment G x).toLinearMap ![v,0] 1 |
| 111 | |
| 112 | private lemma at_first (x : Points 2) (v u : WickPol G) : Wick.moment G x ![v,u] = first x u v := by |
| 113 | apply congrArg (Wick.moment ..); funext i; rcases split_two i with h|h <;> simp [h] |
| 114 | private lemma at_last (x : Points 2) (v u : WickPol G) : Wick.moment G x ![v,u] = last' x v u := by |
| 115 | apply congrArg (Wick.moment ..); funext i; rcases split_two i with h|h <;> simp [h] |
| 116 | |
| 117 | private abbrev key (i : Fin (legDim G 0)) : Maxwell.Slot G := ⟨0,i⟩ |
| 118 | private abbrev term (p : Maxwell.Probe G 0) (i : Fin (legDim G 0)) : ℝ := p (frame G 0 i) |
| 119 | |
| 120 | private lemma termwise (p q : Maxwell.Probe G 0) (f : WickPol G →ₗ[ℂ] ℂ) : |
| 121 | f (symbol 0 p * symbol 0 q) = ∑ i, ∑ j, (↑(term p i * term q j):ℂ) * f (MvPolynomial.X (key i)*MvPolynomial.X (key j)) := by |
| 122 | unfold symbol; rw [Finset.sum_mul_sum]; simp_rw [map_sum] |
| 123 | refine Finset.sum_congr rfl fun i _ => Finset.sum_congr rfl fun j _ => ?_ |
| 124 | rw [mul_mul_mul_comm,← map_mul,← MvPolynomial.smul_eq_C_mul,map_smul,Complex.ofReal_mul]; rfl |
| 125 | |
| 126 | private lemma amounts (p : Maxwell.Probe G 0) : p = ∑ i, term p i • (frame G 0).coord i := by |
| 127 | apply LinearMap.ext; intro x |
| 128 | rw [LinearMap.sum_apply]; nth_rw 1 [← (frame G 0).sum_repr x, map_sum]; refine Finset.sum_congr rfl fun i _ => ?_ |
| 129 | rw [map_smul]; exact mul_comm _ _ |
| 130 | |
| 131 | private lemma pairing_frame {x : Points 2} {P Q : Maxwell.Probe G 0} (h : x 0-x 1 ∈ away) : |
| 132 | (↑(pairing h P Q) : ℂ) = ∑ i, ∑ j, (↑(term P i*term Q j):ℂ) * entry (key i) (key j) (x 0) (x 1) := by |
| 133 | conv_lhs => rw [amounts P] |
| 134 | simp only [map_sum,map_smul,LinearMap.sum_apply,LinearMap.smul_apply,smul_eq_mul,Complex.ofReal_sum,Complex.ofReal_mul] |
| 135 | refine Finset.sum_congr rfl fun i _ => ?_ |
| 136 | conv_lhs => rw [amounts Q]; simp only [map_sum,map_smul,smul_eq_mul,Complex.ofReal_mul,Complex.ofReal_sum,Finset.mul_sum, ← mul_assoc] |
| 137 | rfl |
| 138 | |
| 139 | lemma pair_table (x : Points 2) {P Q R S : Maxwell.Probe G 0} (h : x 0-x 1∈away) : |
| 140 | let v := pairing h (G:=G) (j:=0) (l:=0) |
| 141 | Wick.moment G x ![symbol 0 P * symbol 0 Q,symbol 0 R * symbol 0 S] = (↑(v P R * v Q S + v P S * v Q R) : ℂ) := by |
| 142 | intro v |
| 143 | rw [at_first,termwise]; simp_rw [← at_first,at_last,termwise,← at_last,entries, Finset.mul_sum, mul_add, Finset.sum_add_distrib] |
| 144 | dsimp only [v]; rw [Complex.ofReal_add]; simp_rw [Complex.ofReal_mul,pairing_frame h, Finset.sum_mul_sum] |
| 145 | congr 1 |
| 146 | · refine Finset.sum_congr rfl fun i _ => ?_ |
| 147 | refine Finset.sum_congr rfl fun j _ => Finset.sum_congr rfl fun k _ => Finset.sum_congr rfl fun l _ => ?_ |
| 148 | push_cast; ring |
| 149 | refine Finset.sum_congr rfl fun i _ => ?_ |
| 150 | conv_rhs => arg 2; intro j; rw [Finset.sum_comm] |
| 151 | refine Finset.sum_congr rfl fun j _ => Finset.sum_congr rfl fun k _ => Finset.sum_congr rfl fun l _ => ?_ |
| 152 | push_cast; ring |
| 153 | |
| 154 | def two (x : Points 2) (a b i j p q c d : Axis) := |
| 155 | bareCurl a b p q (x 0-x 1) * bareCurl i j c d (x 0-x 1) + bareCurl a b c d (x 0-x 1) * bareCurl i j p q (x 0-x 1) |
| 156 | |
| 157 | lemma paired_eval (L : Register G) (x : Points 2) (hx : x∈conf 2) (a b i j p q c d : Axis) : |
| 158 | let tag := fun s t u v => (⟨4,pinned L s t u v⟩ : (Spin.comparator L).Tag) |
| 159 | Ward.disc ![tag a b i j,tag p q c d] x = (↑(G.lieDim * two x a b i j p q c d : ℝ) : ℂ) := by |
| 160 | intro tag |
| 161 | let Y := Spin.comparator L |
| 162 | let r := fun a b i j => ((Maxwell.standard L.grid).coord 4).coords (pairLabel G a b i j) |
| 163 | let R := (![⟨4,r a b i j⟩,⟨4,r p q c d⟩] : Fin 2 → (Maxwell.standard L.grid).Token) |
| 164 | have he : ![tag a b i j,tag p q c d] = Y.classTokens ∘ R := by funext i; fin_cases i <;> rfl |
| 165 | let f (t : (Maxwell.standard L.grid).Token) := observable G t.1 (((Maxwell.standard L.grid).coord _).coords.symm t.2) |
| 166 | rw [he,Ward.disc,Y.at_project Y (table_sym _) (fun _ => le_rfl) hx] |
| 167 | change Wick.moment G x (f ∘ R) = _ |
| 168 | have ht a b c d : f ⟨4,r a b c d⟩ = reduceEq (pairPol G a b c d) := by |
| 169 | change observable G 4 (((standard L.grid).coord 4).coords.symm (((standard L.grid).coord 4).coords (pairLabel ..))) = _ |
| 170 | rw [LinearEquiv.symm_apply_apply]; rfl |
| 171 | rw [show f ∘ R = ![reduceEq (pairPol G a b i j), reduceEq (pairPol G p q c d)] from funext (fun z => by |
| 172 | rcases split_two z with h|h <;> rw [h] <;> simp [R,ht])] |
| 173 | have haway : x 0 - x 1 ∈ away := sub_ne_zero.mpr ((show Injective x.ofLp from hx).ne (by decide)) |
| 174 | have hh (i j a b : Axis) (u v : G.ColorIndex) : pairing haway (leg i j u) (leg a b v) = |
| 175 | if u=v then bareCurl i j a b (x 0-x 1) else 0 := by simpa [Tensor.coeff] using raw_mixed (fun _ => 0) (fun _ => 0) i j a b u v (G:=G) (j:=0) (l:=0) haway |
| 176 | rw [at_first]; simp_rw [pairPol,map_sum,map_mul,reduced,← at_first,at_last,map_sum,← at_last,pair_table x haway,hh] |
| 177 | calc |
| 178 | _ = ∑ _ : G.ColorIndex, (two x a b i j p q c d : ℂ) := by |
| 179 | refine Finset.sum_congr rfl fun u _ => ?_ |
| 180 | rw [Finset.sum_eq_single_of_mem u (Finset.mem_univ u)] |
| 181 | · simp [two] |
| 182 | intro v _ hv; simp [Ne.symm hv] |
| 183 | _ = _ := by simp |
| 184 | end YM.Extra.WeakScaling.Color |