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.Next.EXTRACTION.Tails |
| 2 | |
| 3 | /-! Eqs. (Jrad), (Wstress). Linear curvature variables in physical colors and elementary |
| 4 | radial potentials including degree-one curl tests (their radial projections, *not* presumed |
| 5 | independent). Used to count real signed-coordinate tensor types. At the base in radial gauge |
| 6 | F and ∇F have these same linear formulas: there is no constant term in the potential. -/ |
| 7 | set_option autoImplicit false |
| 8 | noncomputable section |
| 9 | namespace YM.StressFlux |
| 10 | open Labels Function Filter Gauge Tensor Analysis |
| 11 | open scoped Topology BigOperators Matrix.Norms.Frobenius ContDiff InnerProductSpace |
| 12 | |
| 13 | variable {G : Gauge} {j : ℕ} |
| 14 | |
| 15 | def sign (s : Signed) (a : Axis) : ℝ := if s.flip a then -1 else 1 |
| 16 | @[simp] lemma sign_sq (s : Signed) (a : Axis) : sign s a^2 = 1 := by unfold sign; split <;> norm_num |
| 17 | |
| 18 | section |
| 19 | variable {V : Type*} [AddCommGroup V] [Module ℝ V] |
| 20 | lemma sign_sign (s : Signed) (a : Axis) (x : V) : sign s a • sign s a • x = x := by |
| 21 | unfold sign; split <;> simp |
| 22 | |
| 23 | lemma signed_sum (s : Signed) (a : Axis) (v : Axis → V) : |
| 24 | ∑ i, s.matrix i a • v i = sign s a • v (s.perm a) := by |
| 25 | simp [Signed.matrix_at,sign] |
| 26 | |
| 27 | lemma signed_sum_inv (s : Signed) (a : Axis) (v : Axis → V) : |
| 28 | ∑ i, s.matrix (s.perm a) i • v i = sign s a • v a := by |
| 29 | simp [Signed.matrix_at,sign, ite_smul] |
| 30 | end |
| 31 | |
| 32 | lemma signed_move (s : Signed) (z : E4) (i : Axis) : Ortho.move s.ortho z (s.perm i) = sign s i * z i := by |
| 33 | rw [Signed.ortho_move]; change s.act z.ofLp (s.perm i)=_ |
| 34 | rw [Signed.act_at,sign]; split <;> simp |
| 35 | |
| 36 | lemma signed_move_inv (s : Signed) (z : E4) (i : Axis) : Ortho.move s.ortho⁻¹ z i = sign s i * z (s.perm i) := by |
| 37 | nth_rw 2 [← Ortho.move_inv s.ortho z]; rw [signed_move] |
| 38 | unfold sign; split <;> simp |
| 39 | |
| 40 | lemma signed_basis (s : Signed) (i : Axis) : Ortho.move s.ortho (basis i) = sign s i • basis (s.perm i) := by |
| 41 | ext1 j |
| 42 | obtain ⟨j,rfl⟩ := s.perm.surjective j |
| 43 | rw [signed_move]; simp only [basis_eq,PiLp.smul_apply,s.perm.injective.eq_iff,smul_eq_mul] |
| 44 | split_ifs with h; subst i; rfl; simp |
| 45 | |
| 46 | lemma signed_turn_value (s : Signed) (A : Taylor G j) (a : Axis) (z : E4) : |
| 47 | (Taylor.turn s.ortho A).value (s.perm a) z = sign s a • A.value a (Ortho.move s.ortho⁻¹ z) := by |
| 48 | rw [Taylor.turn_value]; apply signed_sum_inv |
| 49 | |
| 50 | /-- Tensor coefficient evaluated on a repeated vector. In degree zero the choice of vector |
| 51 | is immaterial. For j=1 this is the *unscaled* first derivative contracted with that vector. -/ |
| 52 | def curled (j : ℕ) (x : E4) (a b : Axis) : Taylor G j →ₗ[ℝ] G.Color := |
| 53 | (ContinuousMultilinearMap.apply ℝ _ G.Color (fun _ : Fin j => x)).toLinearMap ∘ₗ |
| 54 | LinearMap.proj b ∘ₗ LinearMap.proj a ∘ₗ (Maxwell.formSpace j G.Color).subtype ∘ₗ Maxwell.potential.toLinearMap |
| 55 | abbrev curl0 := @curled G 0 0 |
| 56 | abbrev curl1 (k : Axis) := @curled G 1 (basis k) |
| 57 | |
| 58 | lemma curled_deriv (A : Taylor G j) (z : E4) (a b : Axis) : curled j z a b A = |
| 59 | Maxwell.grad a (A.value b) z - Maxwell.grad b (A.value a) z := congr_fun (Maxwell.takeCurl_diag A a b) z |
| 60 | lemma curled_swap (A : Taylor G j) (z : E4) (a b : Axis) : curled j z a b A = -curled j z b a A := by simp [curled_deriv] |
| 61 | lemma curl0_value (A : Taylor G 0) (a b : Axis) : curl0 a b A = A.value b (basis a) - A.value a (basis b) := by |
| 62 | rw [curled_deriv] |
| 63 | have he (a b : Axis) : Maxwell.grad a (A.value b) 0 = A.value b (basis a) := by |
| 64 | unfold Maxwell.grad D Taylor.value |
| 65 | rw [differential_diagonal _ (A.property.1 _), ContinuousMultilinearMap.curryLeft_apply] |
| 66 | simp only [show (0+1:ℕ)=1 from rfl, one_smul]; unfold diagonal; congr! 1; ext1 i; fin_cases i; simp |
| 67 | rw [he,he] |
| 68 | |
| 69 | |
| 70 | lemma curled_paint (A : Taylor G j) (z : E4) (a b : Axis) (g : G.El) : |
| 71 | curled j z a b (Taylor.paint g A) = G.adjoint g (curled j z a b A) := by |
| 72 | rw [curled_deriv,curled_deriv, map_sub] |
| 73 | have he (i k) := Maxwell.grad_linear ((G.adjoint g).toContinuousLinearMap) ((Tensor.diag_smooth (A.val k) ∞).contDiffAt (x:=z)) i |
| 74 | exact congr_arg₂ (·-·) (he a b) (he b a) |
| 75 | |
| 76 | lemma curled_turn (A : Taylor G j) (z : E4) (a b : Axis) (s : Signed) : |
| 77 | curled j (Ortho.move s.ortho z) (s.perm a) (s.perm b) (Taylor.turn s.ortho A) = |
| 78 | (sign s a * sign s b) • curled j z a b A := by |
| 79 | let L := (Ortho.motion s.ortho⁻¹).toContinuousLinearMap |
| 80 | have he (a b) : Maxwell.grad (s.perm a) ((Taylor.turn s.ortho A).value (s.perm b)) (Ortho.move s.ortho z) = |
| 81 | (sign s a * sign s b) • Maxwell.grad a (A.value b) z := by |
| 82 | unfold Maxwell.grad D |
| 83 | rw [show (Taylor.turn s.ortho A).value (s.perm b) = sign s b • (A.value b ∘ L) from |
| 84 | funext fun t => signed_turn_value s A b t, fderiv_const_smul, fderiv_comp] |
| 85 | · have ht : L (basis (s.perm a)) = sign s a • basis a := by |
| 86 | rw [← sign_sign s a (basis (s.perm a)), ← signed_basis, L.map_smul] |
| 87 | simp [L] |
| 88 | simp only [L.fderiv, smul_apply, ContinuousLinearMap.comp_apply, ht,map_smul,smul_smul, |
| 89 | show L (Ortho.move s.ortho z)=z from Ortho.inv_move s.ortho z, mul_comm (sign s a)] |
| 90 | · exact (Tensor.diag_smooth _ 1).differentiable (by decide) _ |
| 91 | · exact L.differentiableAt |
| 92 | exact ((Tensor.diag_smooth _ 1).differentiable (by decide)).differentiableAt.comp _ L.differentiableAt |
| 93 | rw [curled_deriv,curled_deriv,he,he b a,mul_comm (sign s b),smul_sub] |
| 94 | |
| 95 | lemma curl0_turn (A : Taylor G 0) (s : Signed) (a b) : |
| 96 | curl0 (s.perm a) (s.perm b) (Taylor.turn s.ortho A) = (sign s a * sign s b) • curl0 a b A := by |
| 97 | simpa only [show Ortho.move s.ortho 0 = 0 from map_zero (Ortho.motion s.ortho)] using curled_turn A 0 a b s |
| 98 | |
| 99 | lemma curl1_turn (A : Taylor G 1) (s : Signed) (k a b) : |
| 100 | curl1 (s.perm k) (s.perm a) (s.perm b) (Taylor.turn s.ortho A) = |
| 101 | (sign s k * (sign s a * sign s b)) • curl1 k a b A := by |
| 102 | have he := curled_turn A (basis k) a b s |
| 103 | rw [signed_basis] at he; rw [mul_smul,← he] |
| 104 | change diagonal (Maxwell.takeCurl _ _ _) _ = sign s k • diagonal (Maxwell.takeCurl (j:=1) _ _ _) _ |
| 105 | rw [Tensor.homogeneous, pow_one,sign_sign] |
| 106 | |
| 107 | /-- Elementary coordinates. We don't assume they satisfy Maxwell. Integrate an arbitrary |
| 108 | (possibly not closed) antisymmetric two-form in a radial direction. Summing will reproduce |
| 109 | an actual radial jet when using its curl. -/ |
| 110 | def leg (a b : Axis) (q : T E4 G.Color j) : Taylor G j := |
| 111 | ⟨fun i => ((j:ℝ)+2)⁻¹ • ((if i=b then added q (Maxwell.compAxis a) else 0) - |
| 112 | (if i=a then added q (Maxwell.compAxis b) else 0)), by |
| 113 | refine ⟨fun i x s => ?_,fun z => ?_⟩ |
| 114 | · dsimp only; split_ifs <;> simp [added_sym _ _ x s] |
| 115 | have he (i) : diagonal ((((j:ℝ)+2)⁻¹ • ((if i=b then added q (Maxwell.compAxis a) else 0) - |
| 116 | (if i=a then added q (Maxwell.compAxis b) else 0))) : T E4 G.Color (j+1)) z = |
| 117 | ((j:ℝ)+2)⁻¹ • ((if i=b then z a • diagonal q z else 0) - (if i=a then z b • diagonal q z else 0)) := by |
| 118 | split_ifs <;> simp [diagonal,show ∀ a, added q (Maxwell.compAxis a) (fun _ => z) = z a • diagonal q z from fun _ => added_diag ..] |
| 119 | simp_rw [he,smul_sub, Finset.sum_sub_distrib, smul_ite, smul_zero,Finset.sum_ite_eq', Finset.mem_univ, if_true, smul_smul] |
| 120 | ring_nf; simp ⟩ |
| 121 | |
| 122 | lemma leg_value (a b : Axis) (q : T E4 G.Color j) (i : Axis) (z : E4) : |
| 123 | (leg a b q).value i z = ((j:ℝ)+2)⁻¹ • ((if i=b then z a • diagonal q z else 0) - (if i=a then z b • diagonal q z else 0)) := by |
| 124 | have he (a) : added q (Maxwell.compAxis a) (fun _ => z) = z a • diagonal q z := added_diag .. |
| 125 | unfold leg Taylor.value diagonal; dsimp only; split_ifs <;> simp [he, diagonal] |
| 126 | |
| 127 | def leg0 (a b : Axis) : G.Color →ₗ[ℝ] Taylor G 0 where |
| 128 | toFun c := leg a b (ContinuousMultilinearMap.constOfIsEmpty ℝ _ c) |
| 129 | map_add' c d := by |
| 130 | apply Taylor.value_ext; funext i z |
| 131 | change (leg ..).value i z = (leg ..).value i z + (leg ..).value i z |
| 132 | simp_rw [leg_value]; split_ifs <;> simp [smul_sub,diagonal, smul_add] <;> abel |
| 133 | map_smul' t c := by |
| 134 | apply Taylor.value_ext; funext i z |
| 135 | change (leg ..).value i z = t • (leg ..).value i z |
| 136 | simp_rw [leg_value]; split_ifs <;> simp [diagonal, smul_sub,smul_comm t] |
| 137 | |
| 138 | def leg1 (k a b : Axis) : G.Color →ₗ[ℝ] Taylor G 1 where |
| 139 | toFun c := leg a b (added (ContinuousMultilinearMap.constOfIsEmpty ℝ _ c) (Maxwell.compAxis k)) |
| 140 | map_add' c d := by |
| 141 | apply Taylor.value_ext; funext i z |
| 142 | change (leg ..).value i z = (leg ..).value i z + (leg ..).value i z |
| 143 | simp_rw [leg_value,added_diag]; split_ifs <;> simp [smul_sub,diagonal, smul_add] <;> abel |
| 144 | map_smul' t c := by |
| 145 | apply Taylor.value_ext; funext i z |
| 146 | change (leg ..).value i z = t • (leg ..).value i z |
| 147 | simp_rw [leg_value,added_diag]; split_ifs <;> simp [diagonal, smul_sub,smul_comm t] |
| 148 | |
| 149 | theorem leg0_value (c : G.Color) (a b i : Axis) (z : E4) : |
| 150 | (leg0 a b c).value i z = (2:ℝ)⁻¹ • ((if i=b then z a • c else 0) - (if i=a then z b • c else 0)) := by |
| 151 | simp only [leg0, LinearMap.coe_mk,AddHom.coe_mk, leg_value]; simp [diagonal] |
| 152 | theorem leg1_value (c : G.Color) (k a b i : Axis) (z : E4) : |
| 153 | (leg1 k a b c).value i z = (3:ℝ)⁻¹ • ((if i=b then z a • z k • c else 0) - (if i=a then z b • z k • c else 0)) := by |
| 154 | norm_num only [leg1,LinearMap.coe_mk,AddHom.coe_mk, leg_value,added_diag,Nat.cast_one]; rfl |
| 155 | |
| 156 | theorem leg0_swap (a b : Axis) (x : G.Color) : leg0 a b x = -leg0 b a x := by |
| 157 | apply Taylor.value_ext; funext i z; change _ = -(leg0 b a x).value i z; simp [leg0_value, ← smul_neg] |
| 158 | theorem leg1_swap (k a b : Axis) (x : G.Color) : leg1 k a b x = -leg1 k b a x := by |
| 159 | apply Taylor.value_ext; funext i z; change _ = -(leg1 k b a x).value i z; simp [leg1_value, ← smul_neg] |
| 160 | @[simp] theorem leg0_diag (a : Axis) (x : G.Color) : leg0 a a x = 0 := by apply Taylor.value_ext; funext i z; rw [leg0_value,sub_self,smul_zero]; rfl |
| 161 | @[simp] theorem leg1_diag (k a : Axis) (x : G.Color) : leg1 k a a x = 0 := by apply Taylor.value_ext; funext i z; rw [leg1_value,sub_self,smul_zero]; rfl |
| 162 | |
| 163 | theorem leg1_cycle (k a b : Axis) (x : G.Color) : leg1 k a b x + leg1 a b k x + leg1 b k a x = 0 := by |
| 164 | apply Taylor.value_ext; funext i z |
| 165 | change (leg1 k a b x).value i z + (leg1 a b k x).value i z + (leg1 b k a x).value i z = 0 |
| 166 | rw [leg1_value,leg1_value,leg1_value, smul_comm (z b) (z k), smul_comm (z a) (z k),smul_comm (z b) (z a)] |
| 167 | simp only [smul_sub]; abel |
| 168 | |
| 169 | theorem turn_leg0 (s : Signed) (a b : Axis) (x : G.Color) : |
| 170 | Taylor.turn s.ortho (leg0 a b x) = (sign s a * sign s b) • leg0 (s.perm a) (s.perm b) x := by |
| 171 | apply Taylor.value_ext; funext i z |
| 172 | obtain ⟨i,rfl⟩ := s.perm.surjective i |
| 173 | rw [signed_turn_value]; change _ = (_:ℝ) • (leg0 _ _ x).value (s.perm i) z |
| 174 | rw [leg0_value,leg0_value,signed_move_inv,signed_move_inv] |
| 175 | simp only [s.perm.injective.eq_iff,mul_smul,smul_sub] |
| 176 | congr 1 |
| 177 | · split_ifs with h |
| 178 | · subst i; simp_rw [smul_comm _ (2:ℝ)⁻¹, smul_comm (sign s a) (sign s b)] |
| 179 | simp |
| 180 | split_ifs with h |
| 181 | · subst i; simp_rw [smul_comm _ (2:ℝ)⁻¹] |
| 182 | simp |
| 183 | |
| 184 | theorem turn_leg1 (s : Signed) (k a b : Axis) (x : G.Color) : Taylor.turn s.ortho (leg1 k a b x) = |
| 185 | (sign s k * (sign s a * sign s b)) • leg1 (s.perm k) (s.perm a) (s.perm b) x := by |
| 186 | apply Taylor.value_ext; funext i z |
| 187 | obtain ⟨i,rfl⟩ := s.perm.surjective i |
| 188 | rw [signed_turn_value]; change _ = (_:ℝ) • (leg1 _ _ _ x).value (s.perm i) z |
| 189 | rw [leg1_value,leg1_value,signed_move_inv,signed_move_inv,signed_move_inv] |
| 190 | simp only [s.perm.injective.eq_iff,smul_sub]; congr 1 |
| 191 | · split_ifs with h |
| 192 | · subst i; simp_rw [smul_smul]; congr 1; ring |
| 193 | simp |
| 194 | split_ifs with h |
| 195 | · subst i; simp_rw [smul_smul]; congr 1; ring |
| 196 | simp |
| 197 | |
| 198 | theorem paint_leg0 (g : G.El) (a b : Axis) (x : G.Color) : Taylor.paint g (leg0 a b x) = leg0 a b (G.adjoint g x) := by |
| 199 | apply Taylor.value_ext; funext i z; rw [Taylor.paint_value, leg0_value, leg0_value]; split_ifs <;> simp |
| 200 | theorem paint_leg1 (g : G.El) (k a b : Axis) (x : G.Color) : Taylor.paint g (leg1 k a b x) = leg1 k a b (G.adjoint g x) := by |
| 201 | apply Taylor.value_ext; funext i z; rw [Taylor.paint_value, leg1_value, leg1_value]; split_ifs <;> simp |
| 202 | |
| 203 | private theorem radial_value (A : Taylor G j) (i : Axis) (z : E4) : |
| 204 | A.value i z = ((j:ℝ)+2)⁻¹ • ∑ a, z a • curled j z a i A := by |
| 205 | conv_lhs => rw [← Maxwell.potential_recover A] |
| 206 | rw [Maxwell.contracted_diag]; norm_cast |
| 207 | |
| 208 | private def valAt (j : ℕ) (i : Axis) (x : E4) : Taylor G j →ₗ[ℝ] G.Color where |
| 209 | toFun A := A.value i x |
| 210 | map_add' _ _ := rfl |
| 211 | map_smul' _ _ := rfl |
| 212 | |
| 213 | theorem sum_legs0 (A : Taylor G 0) : (∑ a, ∑ b, leg0 a b (curl0 a b A)) = (2:ℝ) • A := by |
| 214 | apply Taylor.value_ext; funext i z |
| 215 | change valAt (G:=G) 0 i z (∑ a, ∑ b, leg0 a b (curl0 a b A)) = (2:ℝ) • A.value i z |
| 216 | have he (a b : Axis) : curled 0 z a b A = curl0 a b A := congr_arg (Maxwell.takeCurl A a b) (Subsingleton.elim ..) |
| 217 | rw [two_smul,radial_value]; simp_rw [map_sum,he] |
| 218 | change ∑ a, ∑ b, (leg0 a b _).value i z = _ |
| 219 | simp_rw [leg0_value, smul_sub, Finset.sum_sub_distrib]; simp only [smul_ite, smul_zero, Finset.sum_ite_eq, Finset.mem_univ, if_true,Nat.cast_zero,zero_add] |
| 220 | rw [Finset.sum_comm (f := fun a b : Axis => ite (i=a) ((2:ℝ)⁻¹ • z b • curl0 a b A) 0)]; simp only [Finset.sum_ite_eq, Finset.mem_univ, if_true] |
| 221 | simp_rw [show ∀ b, curl0 i b A = -curl0 b i A from fun _ => curled_swap A _ _ _, smul_neg,Finset.sum_neg_distrib,sub_neg_eq_add,Finset.smul_sum] |
| 222 | |
| 223 | theorem sum_curled (A : Taylor G 1) (a b : Axis) (z : E4) : |
| 224 | ∑ k, z k • curl1 k a b A = curled 1 z a b A := by |
| 225 | let L := ContinuousMultilinearMap.ofSubsingleton ℝ E4 G.Color (0:Fin 1) |
| 226 | obtain ⟨f,hf⟩ := L.surjective (Maxwell.takeCurl A a b) |
| 227 | have he (x : E4) : curled 1 x a b A = f x := congr_arg (diagonal · x) hf.symm |
| 228 | simp only [curl1,he,← map_smul, ← map_sum]; congr! 1; ext1 i; simp |
| 229 | |
| 230 | theorem sum_legs1 (A : Taylor G 1) : (∑ a, ∑ b, ∑ k, leg1 k a b (curl1 k a b A)) = (2:ℝ) • A := by |
| 231 | apply Taylor.value_ext; funext i z |
| 232 | change valAt (G:=G) 1 i z (∑ a, ∑ b, ∑ k, leg1 k a b (curl1 k a b A)) = (2:ℝ) • A.value i z |
| 233 | rw [two_smul,radial_value]; simp_rw [map_sum] |
| 234 | change ∑ a, ∑ b, ∑ k, (leg1 k a b _).value i z = _ |
| 235 | have he (a b : Axis) : (∑ k, (leg1 k a b (curl1 k a b A)).value i z) = (3:ℝ)⁻¹ • |
| 236 | ((if i=b then z a • curled 1 z a b A else 0) - (if i=a then z b • curled 1 z a b A else 0)) := by |
| 237 | simp_rw [leg1_value]; split_ifs <;> simp [← Finset.smul_sum, Finset.sum_sub_distrib, sum_curled] |
| 238 | simp_rw [he, smul_sub, Finset.sum_sub_distrib]; norm_num |
| 239 | -- simp positions |
| 240 | simp_rw [show ∀ b, curled 1 z i b A = -curled 1 z b i A from fun _ => curled_swap A _ _ _, smul_neg,Finset.sum_neg_distrib,sub_neg_eq_add,Finset.smul_sum] |
| 241 | end YM.StressFlux |