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.MultipleContact.Multi.Script |
| 2 | import YM.Ward.Sum |
| 3 | import Mathlib.Algebra.MonoidAlgebra.Support |
| 4 | import Mathlib.LinearAlgebra.Multilinear.Basis |
| 5 | /-! Placement syntax: evaluate only on separated profiles, carry support through finite signed sums. -/ |
| 6 | set_option autoImplicit false |
| 7 | noncomputable section |
| 8 | namespace YM.MultipleContact.Script |
| 9 | open Set Function Filter Table Extraction Spec Ward MeasureTheory |
| 10 | open scoped Topology BigOperators InnerProductSpace ContDiff Classical |
| 11 | variable {G:Gauge}{L:Register G}(S:Table L) |
| 12 | variable {α ι A:Type*}[Fintype ι] |
| 13 | variable {d:ι→ℕ}{v:∀i,S.Field (d i)} |
| 14 | set_option maxHeartbeats 1600000 |
| 15 | theorem letters_eq (x:ι→A): letters x= Finset.univ.val.map x:=by |
| 16 | exact Eq.symm (by rw [← Finset.sum_multiset_singleton]; change mapAdd x _=_; rw [_root_.map_sum]; exact Finset.sum_congr rfl (fun i _=>rfl)) |
| 17 | lemma clear_iff (x:ι→Alpha S):(letters x|>.map Prod.snd).Nodup ↔ clear S x:=by |
| 18 | rw [letters_eq, Multiset.map_map] |
| 19 | have ht := Multiset.nodup_map_iff_inj_on (f:=Prod.snd∘x) (s:=Finset.univ.val) (d:=Finset.univ.nodup) |
| 20 | simp at ht |
| 21 | exact ht |
| 22 | |
| 23 | def names (x:Multiset (Alpha S)) : Set E4:= {a|a∈x.map Prod.snd} |
| 24 | lemma names_iff (x:Multiset (Alpha S)){p:E4}: p∈names S x ↔ ∃ q:S.Tag,(q,p)∈x:=by |
| 25 | simp [names] |
| 26 | def accessible (K:Set E4)(m:Multiset (Alpha S)):=(m.map Prod.snd).Nodup ∧ names S m ⊆ K |
| 27 | def Secure (K:Set E4) (x:Grammar (Alpha S)):Prop:=∀m∈x.coeff.support, accessible S K m |
| 28 | lemma secure_spell {K:Set E4}{v:ι→Alpha S}(hv:Set.range (fun i=>(v i).2) ⊆ K)(hq:clear S v):Secure S K (spell v):=by |
| 29 | intro m hm; rw [spell_eq] at hm |
| 30 | have ht:AddMonoidAlgebra.single (letters v) (1:ℂ)=(AddMonoidAlgebra.single (letters v) (1:ℂ)):=rfl |
| 31 | simp only [AddMonoidAlgebra.coeff_single,Finsupp.support_single_ne_zero _ one_ne_zero,Finset.mem_singleton] at hm |
| 32 | rw [hm]; refine ⟨(clear_iff ..).mpr hq,fun p hp=>?_⟩ |
| 33 | obtain ⟨q,hq'⟩:= (names_iff ..).mp hp; obtain ⟨i,hi⟩:=(letters_image v).mp hq' |
| 34 | exact hv ⟨i,congr_arg Prod.snd hi⟩ |
| 35 | variable {p q:Grammar (Alpha S)} {K T:Set E4} |
| 36 | lemma Secure.weak (h:K⊆T)(hp:Secure S K p):Secure S T p:=fun i hi=>⟨(hp i hi).1,Subset.trans (hp i hi).2 h⟩ |
| 37 | lemma secure_one : Secure S K 1:=by intro m hm; rw [AddMonoidAlgebra.one_def] at hm; simp only [AddMonoidAlgebra.coeff_single,Finsupp.support_single_ne_zero _ one_ne_zero,Finset.mem_singleton] at hm; rcases hm with rfl; simp [accessible,names] |
| 38 | lemma secure_zero : Secure S K 0:=fun m h=>False.elim (by simpa using h) |
| 39 | lemma Secure.add (h:Secure S K p)(h':Secure S K q):Secure S K (p+q):=by intro m hm; obtain h|h := Finset.mem_union.mp (Finsupp.support_add (show m∈(p.coeff+q.coeff).support from hm)); exacts [‹Secure S K p› _ h,h' _ h] -- shadow |
| 40 | lemma Secure.scalar (h:Secure S K p)(c:ℂ):Secure S K (c • p):=by intro m hm; exact h _ (Finsupp.support_smul (show m∈ (c • (p.coeff)).support from hm)) |
| 41 | lemma Secure.diff (h:Secure S K p)(h':Secure S K q):Secure S K (p-q):=(show p+(-1:ℂ)•q=p-q by rw [neg_one_smul]; simp only [sub_eq_add_neg]) ▸ Secure.add S h (Secure.scalar S h' _) |
| 42 | lemma Secure.join (h:Secure S K p) (h':Secure S T q)(hf:Disjoint K T):Secure S (K∪T) (p*q):=by |
| 43 | intro m hm; obtain ⟨k,hk,l,hl,rfl⟩:=Finset.mem_image₂.mp (AddMonoidAlgebra.support_coeff_mul_subset p q hm) -- implicit pointwise |
| 44 | obtain ⟨he,hh⟩:=h k hk; obtain ⟨he',hh'⟩:=h' l hl |
| 45 | refine ⟨?_ ,?_⟩ |
| 46 | · rw [Multiset.map_add,Multiset.nodup_add]; exact ⟨he,he',Multiset.disjoint_left.mpr (fun {r} hr hr'=> Set.disjoint_left.mp hf (hh hr) (hh' hr'))⟩ |
| 47 | intro r hr; obtain hw|hw:=Multiset.mem_add.mp (show r∈(k.map Prod.snd)+(l.map Prod.snd) by rw [← Multiset.map_add]; exact hr) |
| 48 | · exact Or.inl (hh hw) |
| 49 | exact Or.inr (hh' hw) |
| 50 | lemma secure_product {α:Type*}{Q:Finset α}{P:α→Set E4}{x:α→Grammar _}(hP:∀i∈Q,Secure S (P i) (x i))(hd:(↑Q:Set α).Pairwise (fun i j=>Disjoint (P i) (P j))): |
| 51 | Secure S (⋃ i∈Q,P i) (Q.prod x):=by |
| 52 | classical |
| 53 | induction Q using Finset.induction with |
| 54 | | empty=> rw [Finset.prod_empty]; exact secure_one S |
| 55 | | @insert i q hi ih => |
| 56 | rw [Finset.prod_insert hi]; apply Secure.weak S ?_ (Secure.join S (hP i (Finset.mem_insert_self ..)) (ih (fun _ h=>hP _ (Finset.mem_insert_of_mem h)) (hd.mono (by simp))) ?_) |
| 57 | · intro r hr; obtain he|he:=hr |
| 58 | · exact Set.mem_iUnion₂.mpr ⟨_,Finset.mem_insert_self ..,he⟩ |
| 59 | obtain ⟨j,hj,hh⟩:=Set.mem_iUnion₂.mp he; exact Set.mem_iUnion₂.mpr ⟨j,Finset.mem_insert_of_mem hj,hh⟩ |
| 60 | rw [Set.disjoint_left]; intro r hr hs; obtain ⟨j,hj,he⟩:=Set.mem_iUnion₂.mp hs |
| 61 | exact (Set.disjoint_left.mp (hd (Finset.mem_insert_self i q) (Finset.mem_insert_of_mem hj) (by aesop))) hr he |
| 62 | |
| 63 | lemma secure_frame {n:ℕ}(x:Fin n→Alpha S)(h:accessible S K (letters x)): clear S x∧∀i, (x i).2∈K:=⟨(clear_iff ..).mp h.1,fun i=>h.2 (by rw [names_iff]; exact ⟨_,(letters_image x).mpr ⟨i,Prod.eta ..⟩⟩)⟩ |
| 64 | lemma secure_selected {x:Multiset (Alpha S)}(h:accessible S K x): clear S (pickFrame S x)∧∀i, (pickFrame S x i).2∈K:=secure_frame S (pickFrame S x) ((letters_frame x).choose_spec ▸ h) |
| 65 | |
| 66 | theorem basis_express [DecidableEq ι] {𝕜:Type*} [Field 𝕜] {V:ι→Type*}[∀i,AddCommGroup (V i)][∀i,Module 𝕜 (V i)] {F':Type*}[AddCommGroup F'][Module 𝕜 F'](f:MultilinearMap 𝕜 V F') |
| 67 | {κ:ι→Type*}[∀i,Fintype (κ i)](d:∀i,Module.Basis (κ i) 𝕜 (V i))(w:∀i,V i): f w= ∑ j:(Π i,κ i), (∏ i,(d i).repr (w i) (j i)) • f (fun i=>d i (j i)):=by |
| 68 | have he : w=(fun i=> ∑ q:κ i, (d i).repr (w i) q • (d i q)):=by funext i; exact (d i).sum_repr (w i)|>.symm |
| 69 | conv_lhs => rw [he] |
| 70 | rw [f.map_sum_finset]; simp_rw [f.map_smul_univ]; apply Finset.sum_congr (by ext k; simp [Fintype.mem_piFinset]); simp |
| 71 | |
| 72 | lemma sum_terms (a:Grammar A):a=∑ m∈a.coeff.support, (a.coeff m) • spell ((letters_frame m).choose):=by |
| 73 | trans a.coeff.sum AddMonoidAlgebra.single |
| 74 | · exact a.sum_coeff_single.symm |
| 75 | change _=a.coeff.sum (fun m c=>c • (spell _)) |
| 76 | apply Finsupp.sum_congr (g1:=AddMonoidAlgebra.single) (g2:=fun m c=>c • (spell _)) |
| 77 | intro m c |
| 78 | change AddMonoidAlgebra.single m _ = _ • spell _ |
| 79 | rw [spell_eq,← (letters_frame m).choose_spec, AddMonoidAlgebra.smul_single,smul_eq_mul,mul_one] |
| 80 | lemma spell_sum {n m:ℕ}(x:Fin n→A)(y:Fin m→A):spell (Fin.append x y) = spell x * spell y:=by unfold spell;rw [Fin.prod_univ_add]; simp |
| 81 | lemma eval_cont (hs:S.Hierarchy){α:Type*}[TopologicalSpace α]{n:ℕ}{z:α→ Fin n→ E4}{a:α}(hz:ContinuousAt z a)(hc:Injective (z a)){d:Fin n→ℕ}{v:∀i,α→ S.Field (d i)} |
| 82 | (hv:∀i,ContinuousAt (v i) a):ContinuousAt (fun r=>S.useAt S (points (z r)) (fun i=>(⟨d i,v i r⟩:S.Tag))) a:=by |
| 83 | classical |
| 84 | let z'(r:α):=points (z r) |
| 85 | have hz' :=(PiLp.continuous_toLp 2 _).continuousAt (x:=z a) |>.comp (f:=z) hz |
| 86 | have hq:z' a∈conf n:=hc |
| 87 | let κ(i:Fin n):= Fin (Module.finrank ℂ (S.Field (d i))); let f (i:Fin n) : Module.Basis (κ i) ℂ (S.Field (d i)):=Module.finBasis .. |
| 88 | have heq(b):S.useAt S (z' b) (fun i=>(⟨d i,v i b⟩:S.Tag))=∑ j:(Π i,κ i),(∏ i,(f i).repr (v i b) (j i)) • S.useAt S (z' b) (fun i=>⟨_,f i (j i)⟩):=basis_express (S.classMoment S d (z' b)) f _ |
| 89 | change ContinuousAt (fun b=>S.useAt S (z' b) _) a |
| 90 | simp_rw [heq]; apply tendsto_finsetSum; intro j hj; exact ContinuousAt.smul (tendsto_finsetProd _ fun i _=> by have hC:= ((f i).coord (j i)).continuous_of_finiteDimensional; exact hC.continuousAt.comp (hv i)) ((S.class_smooth S hs.smooth _ _ hq).continuousWithinAt.continuousAt ((conf_open _).mem_nhds hq) |>.comp hz') |
| 91 | theorem placed_continuous (H:S.Hierarchy){α:Type*}[TopologicalSpace α] (x:ι→α→ E4) {a:α}(hx:∀i,ContinuousAt (x i) a){d:ι→ℕ}{v:∀i,α→ S.Field (d i)} (hV:∀i,ContinuousAt (v i) a) (hinj:Injective (x · a)): |
| 92 | ContinuousAt (fun a=>evaluation S (spell (fun i:ι=>((⟨_,v i a⟩:S.Tag),x i a)))) a:=by |
| 93 | classical |
| 94 | let e:= (Fintype.equivFin ι).symm; simp_rw [eval_frame S H.laws.toSymmetric e,read_points] |
| 95 | let q := fun a:α=>points (fun i=>x (e i) a); let z:= fun a=> ((fun i=> ((⟨_,v i a⟩:S.Tag),x i a)) ∘ e) |
| 96 | change ContinuousAt (fun b=>Truncated S (q b) (fun i=>(z b i).1)) a |
| 97 | have hp:= continuousAt_pi.mpr fun i=> hx (e i) |
| 98 | have h'0 := (PiLp.continuous_toLp (2:NNReal) _).continuousAt.comp hp |
| 99 | have hq': q a∈conf _:= hinj.comp e.injective |
| 100 | have hq:= h'0.eventually (show _ from (conf_open _).mem_nhds hq') |
| 101 | suffices he:ContinuousAt (fun b=> S.useAt S (q b) (fun i:Fin (Fintype.card ι)=>(z b i).1)) a from he.congr ((by filter_upwards [hq] with b hb; change _ = Truncated S _ _; unfold Truncated; rw [if_pos (show q b ∈ conf _ from hb)]) : (fun b=>S.useAt S (q b) (fun i=>(z b i).1)) =ᶠ[𝓝 a] (fun b=>Truncated S (q b) (fun i=>(z b i).1))) |
| 102 | exact eval_cont S H (z:=fun a i=>x (e i) a) hp hq' fun i=>hV (e i) |
| 103 | end YM.MultipleContact.Script |