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 Mathlib.Analysis.Analytic.Binomial |
| 2 | import Mathlib.Analysis.Calculus.BumpFunction.Convolution |
| 3 | import Mathlib.Analysis.Calculus.ContDiff.RestrictScalars |
| 4 | import Mathlib.Analysis.Calculus.ImplicitContDiff |
| 5 | import Mathlib.Analysis.Calculus.IteratedDeriv.FaaDiBruno |
| 6 | import Mathlib.Analysis.Calculus.LineDeriv.Measurable |
| 7 | import Mathlib.Analysis.Calculus.VectorField |
| 8 | import Mathlib.Analysis.Complex.RemovableSingularity |
| 9 | import Mathlib.Analysis.Normed.Group.Tannery |
| 10 | import Mathlib.LinearAlgebra.Multilinear.Pi |
| 11 | import Mathlib.LinearAlgebra.PiTensorProduct.Generators |
| 12 | import YM.Ac.Table |
| 13 | import YM.Bid.Craft |
| 14 | import YM.Bid.Fuels |
| 15 | import YM.Bid.Loan |
| 16 | import YM.Work.A05.Read |
| 17 | import YM.Work.A07 |
| 18 | import YM.Work.B06 |
| 19 | import YM.Work.B17 |
| 20 | import YM.Work.G07.Stencil |
| 21 | |
| 22 | /-! |
| 23 | # Same-section/torus readout checks |
| 24 | |
| 25 | Further RAuthors lemmas for use in producers. |
| 26 | |
| 27 | In particular, compare |
| 28 | `Sound.projects` against the **actual tests used by Format**, on finite |
| 29 | tori, including the support and the wrapping convention of the code. |
| 30 | |
| 31 | The readout is on the pre-mask function. |
| 32 | -/ |
| 33 | |
| 34 | set_option autoImplicit false |
| 35 | noncomputable section |
| 36 | namespace YM.Next.Foundations |
| 37 | |
| 38 | open Lattice Wilson RG Source Labels |
| 39 | open scoped Topology Matrix.Norms.Frobenius BigOperators ContDiff |
| 40 | |
| 41 | variable {G : Gauge} |
| 42 | |
| 43 | section Scale |
| 44 | |
| 45 | /-! ### Two different scalings |
| 46 | |
| 47 | Separate **engineering** (= scale in h) and **slot** (= scale jet amplitudes, |
| 48 | threshold in credits). |
| 49 | -/ |
| 50 | |
| 51 | private lemma monomial_scales (J K : Jet G) (w : Key G → ℕ) (t : ℝ) |
| 52 | (h : ∀ i, coord K i = t^(w i) • coord J i) (m : Key G →₀ ℕ) (c : ℂ) : |
| 53 | read K (MvPolynomial.monomial m c) = t^(Finsupp.weight w m) • read J (MvPolynomial.monomial m c) := by |
| 54 | classical |
| 55 | simp only [Labels.read, MvPolynomial.aeval_monomial, Algebra.algebraMap_self, RingHom.id_apply, |
| 56 | Complex.real_smul, Complex.ofReal_pow, Finsupp.prod] |
| 57 | have he (i : Key G) : coord K i ^ (m i) = |
| 58 | (t : ℂ)^(m i * w i) * coord J i ^ (m i) := by |
| 59 | rw [h]; simp only [Complex.real_smul, Complex.ofReal_pow, mul_pow, ← pow_mul] |
| 60 | rw [mul_comm (m i) _] |
| 61 | simp_rw [he, Finset.prod_mul_distrib, Finset.prod_pow_eq_pow_sum] |
| 62 | rw [Finsupp.weight_apply] |
| 63 | simp only [Finsupp.sum, smul_eq_mul] |
| 64 | ring |
| 65 | |
| 66 | lemma coord_scales (J : Jet G) (t : ℝ) (i : Key G) : |
| 67 | coord (scaleJet J t) i = t^(generation i) • coord J i := by |
| 68 | simp [scaleJet, Labels.coord, generation, Complex.real_smul] |
| 69 | |
| 70 | lemma read_smooth (J : Jet G) (p : Pol G) (k : WithTop ℕ∞) : |
| 71 | ContDiff ℝ k (fun h => read (scaleJet J h) p) := by |
| 72 | induction p using MvPolynomial.induction_on with |
| 73 | | C a => simp only [Labels.read, MvPolynomial.aeval_C]; exact contDiff_const |
| 74 | | add p q hp hq => simp only [map_add]; exact hp.add hq |
| 75 | | mul_X p i hp => |
| 76 | simp only [map_mul, Labels.read, MvPolynomial.aeval_X, coord_scales] |
| 77 | exact hp.mul ((contDiff_id.pow _).smul contDiff_const) |
| 78 | |
| 79 | def tier (k : ℕ) : Pol G →ₗ[ℂ] Pol G := MvPolynomial.weightedHomogeneousComponent generation k |
| 80 | |
| 81 | lemma deriv_read (J : Jet G) (p : Pol G) (k : ℕ) : |
| 82 | iteratedDeriv k (fun h => read (scaleJet J h) p) 0 = (k.factorial : ℝ) • read J (tier k p) := by |
| 83 | induction p using MvPolynomial.induction_on' with |
| 84 | | monomial m c => |
| 85 | simp_rw [monomial_scales J _ generation _ (coord_scales J _)] |
| 86 | have hs : ContDiffAt ℝ k (fun t : ℝ => t^(Finsupp.weight generation m)) 0 := contDiffAt_id.pow _ |
| 87 | rw [iteratedDeriv_smul_const hs, iteratedDeriv_fun_pow_zero] |
| 88 | have hh := MvPolynomial.isWeightedHomogeneous_monomial (generation (G:=G)) m c (m:=Finsupp.weight generation m) rfl |
| 89 | by_cases he : k = Finsupp.weight generation m |
| 90 | · rw [tier, if_pos he, he, hh.weightedHomogeneousComponent_same] |
| 91 | rw [tier, if_neg he, hh.weightedHomogeneousComponent_ne k he]; simp |
| 92 | | add p q hp hq => |
| 93 | simp only [map_add] |
| 94 | rw [iteratedDeriv_fun_add (read_smooth J p _).contDiffAt (read_smooth J q _).contDiffAt, hp, hq, |
| 95 | smul_add] |
| 96 | |
| 97 | /-- Truncate engineering weight. -/ |
| 98 | def capRead (d : ℕ) (p : Pol G) := ∑ k ∈ Finset.range (d+1), tier k p |
| 99 | |
| 100 | lemma coeff_capRead (d : ℕ) (p : Pol G) (m) : |
| 101 | (capRead d p).coeff m = if height m ≤ d then p.coeff m else 0 := by |
| 102 | simp [capRead, height, MvPolynomial.coeff_sum, tier, MvPolynomial.coeff_weightedHomogeneousComponent] |
| 103 | |
| 104 | lemma tier_capRead (d : ℕ) (p : Pol G) (k : ℕ) (hk : k ≤ d) : |
| 105 | tier k (capRead d p) = tier k p := by |
| 106 | ext m |
| 107 | simp only [tier, MvPolynomial.coeff_weightedHomogeneousComponent, coeff_capRead, height] |
| 108 | split_ifs <;> first | rfl | omega |
| 109 | |
| 110 | lemma cap_limited (d : ℕ) (p : Pol G) : capRead d p ∈ limited G d := by |
| 111 | classical |
| 112 | apply (MvPolynomial.mem_restrictSupport_iff ℂ).mpr |
| 113 | intro i hi |
| 114 | change height i ≤ d |
| 115 | by_contra hh |
| 116 | exact MvPolynomial.mem_support_iff.mp (Finset.mem_coe.mp hi) (by rw [coeff_capRead, if_neg hh]) |
| 117 | |
| 118 | lemma limited_cap (d : ℕ) (p : Pol G) (h : p ∈ limited G d) : capRead d p = p := by |
| 119 | classical |
| 120 | ext m |
| 121 | rw [coeff_capRead] |
| 122 | split_ifs with he |
| 123 | · rfl |
| 124 | symm |
| 125 | by_contra hh |
| 126 | exact he ((MvPolynomial.mem_restrictSupport_iff ℂ).mp h |
| 127 | (Finset.mem_coe.mpr (MvPolynomial.mem_support_iff.mpr hh))) |
| 128 | |
| 129 | lemma jet_test_ext {d} (p q : Label G d) |
| 130 | (h : ∀ (J : Jet G) k, k ≤ d → iteratedDeriv k (fun x => read (scaleJet J x) p.val) 0 = |
| 131 | iteratedDeriv k (fun x => read (scaleJet J x) q.val) 0) : p = q := by |
| 132 | have ht (k : ℕ) (hk : k ≤ d) : tier k p.val = tier k q.val := by |
| 133 | refine eval_ext _ _ fun J => ?_ |
| 134 | have he := h J k hk |
| 135 | rw [deriv_read, deriv_read] at he |
| 136 | exact smul_right_injective ℂ (show ((k.factorial:ℝ)) ≠ 0 by positivity) he |
| 137 | apply Subtype.ext |
| 138 | show p.val = q.val |
| 139 | rw [← limited_cap d _ p.property.1, ← limited_cap d _ q.property.1] |
| 140 | exact Finset.sum_congr rfl fun k hk => ht k (Nat.le_of_lt_succ (Finset.mem_range.mp hk)) |
| 141 | |
| 142 | lemma read_pure (J : Jet G) {d : ℕ} {p : Label G d} {m : ℕ × ℕ} (h : p ∈ Grade m) |
| 143 | (θ : ℝ) : read (θ • J) p.val = θ^m.2 • read J p.val := by |
| 144 | classical |
| 145 | have hw : MvPolynomial.IsWeightedHomogeneous (fun _ : Key G => (1:ℕ)) p.val m.2 := by |
| 146 | intro q hq |
| 147 | have he := (pure_grade _ p).1 h hq |
| 148 | rw [weight_slot] at he |
| 149 | simpa [Finsupp.weight_apply, smul_eq_mul] using congr_arg Prod.snd he |
| 150 | have ht (i : Key G) : coord (θ • J) i = θ^(1:ℕ) • coord J i := by |
| 151 | simp [Labels.coord, Complex.real_smul] |
| 152 | have hsum := p.val.as_sum |
| 153 | rw [hsum, map_sum, map_sum, Finset.smul_sum] |
| 154 | refine Finset.sum_congr rfl fun i hi => ?_ |
| 155 | rw [monomial_scales J _ (fun _ => 1) θ ht, hw (MvPolynomial.mem_support_iff.mp hi)] |
| 156 | |
| 157 | /-- Diagonal threshold powers in the basis are *slot* scaling. -/ |
| 158 | theorem read_frame_scaled (J : Jet G) {d : ℕ} (F : Labels.Frame G d) (v : F.Coeff) (θ : ℝ) : |
| 159 | read J (F.coords.symm (F.scaled θ v)).val = read (θ • J) (F.coords.symm v).val := by |
| 160 | let p := F.coords.symm v |
| 161 | have h0 : v = F.coords p := (F.coords.apply_symm_apply v).symm |
| 162 | rw [h0, LinearEquiv.symm_apply_apply, ← F.basis.sum_repr p] |
| 163 | simp only [map_sum, map_smul, AddSubmonoidClass.coe_finsetSum, Submodule.coe_smul_of_tower] |
| 164 | apply Finset.sum_congr rfl |
| 165 | intro i _ |
| 166 | rw [F.scaled_pure _ _ (F.pure i), map_smul, LinearEquiv.symm_apply_apply, |
| 167 | read_pure (p:=F.basis i) J (F.pure i)] |
| 168 | simp [Complex.real_smul] |
| 169 | |
| 170 | end Scale |
| 171 | |
| 172 | section Placement |
| 173 | |
| 174 | variable {d : ℕ} {n : Side} |
| 175 | |
| 176 | /-- Torus test corresponding to `Source.Projects` and `Hol.PiVanish`. |
| 177 | Total for convenience at an arbitrary torus size; only to be used for |
| 178 | reading fields under appropriate support assumptions (see `Reads`). -/ |
| 179 | def JetTest (H : Hol G) (o : Site n) (p : Label G d) (f : Config G n → ℂ) := |
| 180 | ∀ J : Jet G, |
| 181 | let w := fun h => f (H.testLinks d o J h) |
| 182 | let g := fun h => read (scaleJet J h) p.val |
| 183 | ContDiffAt ℝ (d : WithTop ℕ∞) w 0 ∧ ContDiffAt ℝ (d : WithTop ℕ∞) g 0 ∧ |
| 184 | ∀ k ≤ d, iteratedDeriv k w 0 = iteratedDeriv k g 0 |
| 185 | |
| 186 | open scoped Classical in |
| 187 | /-- On wrapping supports (i.e., `¬Nonwrapping X o`) retain only the identity |
| 188 | evaluation, matching the lifted-vs-constant test in Format. As in the |
| 189 | original interface, interpret the nonwrapping case as a genuine embedded |
| 190 | cover stencil **for the intended periods**. There is a degenerate size-one |
| 191 | torus issue outside those: `Nonwrapping` alone wouldn't exclude a self-loop, |
| 192 | and `H.testLinks` there is just the specified formula (see below). -/ |
| 193 | def Reads (H : Hol G) (o : Site n) (X : Support n) (p : Label G d) (f : Config G n → ℂ) := |
| 194 | if Nonwrapping X o then JetTest H o p f else p = f 1 • unit G d |
| 195 | |
| 196 | lemma JetTest.unique {H : Hol G} {p q : Label G d} {o : Site n} {f : Config G n → ℂ} |
| 197 | (hp : JetTest H o p f) (hq : JetTest H o q f) : p = q := |
| 198 | jet_test_ext p q fun J k hk => ((hp J).2.2 k hk).symm.trans ((hq J).2.2 k hk) |
| 199 | |
| 200 | lemma Reads.unique {H : Hol G} {p q : Label G d} {o : Site n} {X : Support n} |
| 201 | {f : Config G n → ℂ} (hp : Reads H o X p f) (hq : Reads H o X q f) : p = q := by |
| 202 | unfold Reads at * |
| 203 | split at hp <;> rename_i h |
| 204 | · rw [if_pos h] at hq |
| 205 | exact JetTest.unique hp hq |
| 206 | rw [if_neg h] at hq |
| 207 | exact hp.trans hq.symm |
| 208 | |
| 209 | lemma jetTest_zero_iff (H : Hol G) (o : Site n) (f : Config G n → ℂ) (d : ℕ) : |
| 210 | JetTest H o (0 : Label G d) f ↔ H.PiVanish d o f := by |
| 211 | have he (J : Jet G) (k : ℕ) : |
| 212 | iteratedDeriv k (fun h => read (scaleJet J h) (0 : Label G d).val) 0 = 0 := by |
| 213 | rw [deriv_read]; simp |
| 214 | constructor |
| 215 | · intro h J; exact ⟨(h J).1, fun k hk => ((h J).2.2 k hk).trans (he _ _)⟩ |
| 216 | intro h J |
| 217 | exact ⟨(h J).1, (read_smooth J _ _).contDiffAt, |
| 218 | fun k hk => ((h J).2 k hk).trans (he _ _).symm⟩ |
| 219 | |
| 220 | /-- The endpoints really lift together. -/ |
| 221 | theorem lift_end (hn : 2 ≤ n.val) {X : Support n} {o : Site n} (h : Nonwrapping X o) |
| 222 | (x : Site n) (hx : x ∈ X) (i : Axis) : lift (x+step i-o) = lift (x-o) + step i := by |
| 223 | refine lift_eq_iff.mpr ⟨?_, fun j => ?_⟩ |
| 224 | · rw [map_add, wrap_lift, wrap_step]; abel |
| 225 | have ht := h x hx |
| 226 | have hu : (lift (x-o) j).natAbs ≤ separation x o := component_le _ _ |
| 227 | simp only [Pi.add_apply, step_apply] |
| 228 | split <;> omega |
| 229 | |
| 230 | |
| 231 | |
| 232 | theorem actual_side_ge (S : Schedule) (N p : ℕ) : 4 ≤ (S.side N p).val := |
| 233 | Nat.le_of_dvd (S.side N p).property (S.side_four N p) |
| 234 | |
| 235 | private lemma stencil_lift {Y : Finset Cover} (h : ∀ x ∈ Y, ∀ i : Axis, |
| 236 | 20*((x i).natAbs+1) ≤ n.val) {x : Cover} (hx : x ∈ Y) : lift (wrap n x) = x := by |
| 237 | refine lift_eq_iff.mpr ⟨rfl, fun i => ?_⟩ |
| 238 | have hi := h x hx i; omega |
| 239 | |
| 240 | lemma nonwrapping_placement {F : Labels.Frame G d} (T : SectionData F) (o : Site n) |
| 241 | (h : ∀ x ∈ T.stencil, ∀ i : Axis, 20*((x i).natAbs+1) ≤ n.val) : Nonwrapping (T.footprint o) o := by |
| 242 | rintro y hy |
| 243 | obtain ⟨x,hx,rfl⟩ := Finset.mem_image.mp hy |
| 244 | simp only [separation, add_sub_cancel_right, pdist, stencil_lift h hx] |
| 245 | have hn := n.property |
| 246 | have hu : (Finset.univ.sup fun i : Axis => (x i).natAbs) ≤ (n.val-1)/10 := by |
| 247 | refine Finset.sup_le fun i _ => ?_ |
| 248 | have := h x hx i; omega |
| 249 | apply lt_of_le_of_lt (Nat.mul_le_mul_left 10 hu) |
| 250 | rw [mul_comm] |
| 251 | exact lt_of_le_of_lt (Nat.div_mul_le_self _ _) (Nat.sub_lt hn (by decide)) |
| 252 | |
| 253 | theorem placed_reads {F : Labels.Frame G d} {H : Hol G} (T : SectionData F) |
| 254 | (o : Site n) (h : ∀ x ∈ T.stencil, ∀ i : Axis, 20*((x i).natAbs+1) ≤ n.val) |
| 255 | (hT : T.Sound H) (v : F.Coeff) : Reads H o (T.footprint o) (F.coords.symm v) (T.places v o) := by |
| 256 | rw [Reads, if_pos (nonwrapping_placement T o h)] |
| 257 | have he (J : Jet G) : (fun x => T.places v o (H.testLinks d o J x)) = |
| 258 | (fun x => T.evaluate v (H.links d J x)) := by |
| 259 | funext r |
| 260 | apply T.cylinder_local v |
| 261 | intro e hi _ |
| 262 | change H.links d J r (lift (wrap n e.1 + o - o), e.2) = H.links d J r e |
| 263 | rw [add_sub_cancel_right, stencil_lift h (Finset.mem_coe.mp hi)] |
| 264 | intro J |
| 265 | dsimp only |
| 266 | rw [he] |
| 267 | exact hT.projects v J |
| 268 | |
| 269 | end Placement |
| 270 | end YM.Next.Foundations |