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.SectorNext.RECONNECTED_LOCALITY.Optional |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | set_option warningAsError false |
| 7 | |
| 8 | /-! |
| 9 | # Counting ordered child letters with repeats (analog ) |
| 10 | -/ |
| 11 | set_option autoImplicit false |
| 12 | noncomputable section |
| 13 | namespace YM.SectorNext.Reconnect |
| 14 | namespace Vouchers |
| 15 | |
| 16 | open Function Filter Finset |
| 17 | |
| 18 | variable {T I : Type*} |
| 19 | |
| 20 | def Fee (F : T → ℝ) (r : ℝ) := (∀ i,0 ≤ F i) ∧ HasSum F r |
| 21 | |
| 22 | namespace Fee |
| 23 | variable {F : T → ℝ} {r : ℝ} |
| 24 | |
| 25 | lemma summable (h : Fee F r) : Summable F := h.2.summable |
| 26 | lemma paid (h : Fee F r) : (∑' i,F i)=r := h.2.tsum_eq |
| 27 | lemma pos (h : Fee F r) (i : T) : 0 ≤ F i := h.1 i |
| 28 | lemma scale (h : Fee F r) {c : ℝ} (hc : 0 ≤ c) : Fee (fun i => c*F i) (c*r) := |
| 29 | ⟨fun i => mul_nonneg hc (h.pos i),h.2.mul_left _⟩ |
| 30 | |
| 31 | lemma sigma {J : I → Type*} {F : Sigma J → ℝ} (g : I → ℝ) {r : ℝ} |
| 32 | (h : ∀ i,Fee (fun j => F ⟨i,j⟩) (g i)) (he : HasSum g r) : Fee F r := by |
| 33 | have hf (i : Sigma J) : 0 ≤ F i := (h _).pos i.2 |
| 34 | have hs : Summable F := (summable_sigma_of_nonneg hf).2 ⟨fun i => (h i).summable,by simpa only [fun i => (h i).paid] using he.summable⟩ |
| 35 | exact ⟨hf,hs.hasSum_iff.mpr (hs.tsum_sigma.trans (by simp_rw [fun i => (h i).paid]; exact he.tsum_eq))⟩ |
| 36 | |
| 37 | lemma product {F : I × T → ℝ} (g : I → ℝ) {r : ℝ} |
| 38 | (h : ∀ i,Fee (fun j => F (i,j)) (g i)) (he : HasSum g r) : Fee F r := by |
| 39 | have hf : 0 ≤ F := fun i => (h _).pos i.2 |
| 40 | have hs : Summable F := (summable_prod_of_nonneg hf).2 ⟨fun i => (h _).summable, |
| 41 | by simpa only [fun i => (h i).paid] using he.summable⟩ |
| 42 | exact ⟨hf,hs.hasSum_iff.mpr (hs.tsum_prod.trans (by simp_rw [fun i => (h i).paid]; exact he.tsum_eq))⟩ |
| 43 | |
| 44 | lemma notes (s : Finset I) {f : I → T → ℝ} (r : I → ℝ) (h : ∀ i∈s,Fee (f i) (r i)) : |
| 45 | Fee (fun t => ∑ i∈s,f i t) (∑ i∈s,r i) := by |
| 46 | classical |
| 47 | induction s using Finset.induction_on with |
| 48 | | empty => simp [Fee,hasSum_zero] |
| 49 | | insert i s he IH => |
| 50 | have hi := IH (fun j hj => h _ (mem_insert_of_mem hj)) |
| 51 | have hh := h i (by simp) |
| 52 | simp only [sum_insert he] |
| 53 | exact ⟨fun j => add_nonneg (hh.pos j) (hi.pos j),hh.2.add hi.2⟩ |
| 54 | |
| 55 | end Fee |
| 56 | |
| 57 | abbrev Line (T : Type*) := Σ n : ℕ,Fin n → T |
| 58 | |
| 59 | lemma power {n : ℕ} {f : T → ℝ} (h : Summable f) : HasSum (fun (t : Fin n → T) => ∏ i,f (t i)) ((∑' i,f i)^n) := by |
| 60 | have he := Optional.series_prod (ι:=Fin n) (E:=fun _ => T) (fun _ i => f i) (fun _ => h) |
| 61 | simpa only [prod_const,card_univ,Fintype.card_fin] using he |
| 62 | |
| 63 | def issue (f : T → ℝ) (x : Line T) := (∏ i,f (x.snd i)) / (x.1.factorial:ℝ) |
| 64 | |
| 65 | private lemma e_fee (t : ℝ) : HasSum (fun n : ℕ => t^n/(n.factorial:ℝ)) (Real.exp t) := by |
| 66 | simpa only [Real.exp_eq_exp_ℝ,NormedSpace.exp_eq_tsum_div] using (Real.summable_pow_div_factorial t).hasSum |
| 67 | |
| 68 | lemma issue_fee {f : T → ℝ} (h : Summable f) (he : ∀ i,0 ≤ f i) : Fee (issue f) (Real.exp (∑' i,f i)) := by |
| 69 | apply Fee.sigma _ _ (e_fee _) |
| 70 | intro i |
| 71 | exact ⟨fun _ => div_nonneg (prod_nonneg fun i _ => he _) (by positivity),(power h).div_const _⟩ |
| 72 | |
| 73 | |
| 74 | |
| 75 | open scoped Classical in |
| 76 | /-- Mark a child (booked together with the other children at their order / n!). -/ |
| 77 | def invoice (f g : T → ℝ) (x : Line T) := (∑ i,∏ j, if j=i then g (x.2 j) else f (x.2 j)) / (x.1.factorial:ℝ) |
| 78 | |
| 79 | lemma invoice_fee {f g : T → ℝ} (h : Summable f) (hv : Summable g) (he : ∀ i,0 ≤ f i) (hm : ∀ i,0 ≤ g i) : |
| 80 | Fee (invoice f g) ((∑' i,g i)*Real.exp (∑' i,f i)) := by |
| 81 | classical |
| 82 | let F := ∑' i,f i; let G:=∑' i,g i |
| 83 | have hi := (e_fee F).mul_left G |
| 84 | let t : ℕ → ℝ := fun i => if i=0 then 0 else G*(F^(i-1)/((i-1).factorial:ℝ)) |
| 85 | have ht : HasSum t (G*Real.exp F) := by |
| 86 | rw [← hasSum_nat_add_iff' 1] |
| 87 | simpa [t] using hi |
| 88 | apply Fee.sigma _ _ ht |
| 89 | intro n |
| 90 | cases n with |
| 91 | | zero => |
| 92 | simp [Fee,invoice,t] |
| 93 | | succ n => |
| 94 | let W (i : Fin (n+1)) := fun (p : Fin (n+1) → T) => ∏ j, if j=i then g (p j) else f (p j) |
| 95 | have hw (i : Fin (n+1)) : Fee (W i) (G*F^n) := by |
| 96 | refine ⟨fun a => prod_nonneg fun j _ => ?_,?_⟩ |
| 97 | · split_ifs <;> first | exact he _ | exact hm _ |
| 98 | have hg j : (∑' k,if j=i then g k else f k)=if j=i then G else F := by split_ifs with hx <;> simp [F,G] |
| 99 | have hh := Optional.series_prod (E:=fun _ : Fin (n+1) => T) |
| 100 | (fun j k => if j=i then g k else f k) (fun j => by |
| 101 | by_cases hj : j=i |
| 102 | · simpa only [if_pos hj] using hv |
| 103 | · simpa only [if_neg hj] using h) |
| 104 | suffices H : (∏ j, ∑' k, if j=i then g k else f k)=G*F^n by exact H ▸ hh |
| 105 | simp_rw [hg] |
| 106 | rw [← prod_erase_mul _ (fun j => if j=i then G else F) (mem_univ i)] |
| 107 | rw [prod_congr rfl (g:=fun _ => F) (fun j hj => if_neg (ne_of_mem_erase hj)),prod_const] |
| 108 | simp [mul_comm] |
| 109 | have hs := Fee.notes univ (fun i : Fin (n+1) => G*F^n) (fun i _ => hw i) |
| 110 | change Fee (fun p => invoice f g ⟨n+1,p⟩) (t (n+1)) |
| 111 | have hu := hs.scale (c:=((n+1).factorial:ℝ)⁻¹) (by positivity) |
| 112 | have hx : ((n+1).factorial:ℝ)⁻¹ * (∑ _ : Fin (n+1),G*F^n) = t (n+1) := by |
| 113 | simp only [sum_const,card_univ,Fintype.card_fin,nsmul_eq_mul, t,Nat.add_sub_cancel, Nat.add_eq_zero_iff, |
| 114 | one_ne_zero,and_false,↓reduceIte,Nat.factorial_succ, Nat.cast_mul] |
| 115 | field_simp |
| 116 | rw [← hx]; convert! hu using 1 |
| 117 | funext i; unfold invoice W; simp only [div_eq_mul_inv]; rw [mul_comm] |
| 118 | |
| 119 | end Vouchers |
| 120 | end YM.SectorNext.Reconnect |