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.Slice.Calendar |
| 2 | |
| 3 | /-! Cyclic gap arithmetic. Put moving point first; at least two on circle. -/ |
| 4 | set_option autoImplicit false |
| 5 | noncomputable section |
| 6 | namespace YM.Slice.Time |
| 7 | open Function Set MeasureTheory Lattice Wilson |
| 8 | open scoped Topology BigOperators Matrix.Norms.Frobenius |
| 9 | variable {a : Axis} {G : Gauge} {m : ℕ} {n : Side} |
| 10 | |
| 11 | lemma success {B : Fin (m+1) → Brick a G n} {Y : Fin (m+1) → ℕ} {b : Fin (m+1) → Per n} |
| 12 | (h : ∀ i : Fin m, b i.succ = b i.castSucc + (B i.castSucc).width + Y i.castSucc) |
| 13 | (U : Config G n) : Time.word (drive B Y) (b 0) U = ∏ i, (B i).value (b i) U := by |
| 14 | induction m with |
| 15 | | zero => |
| 16 | rw [welded,distributed] |
| 17 | simp only [Time.read,crossing,mul_one]; simp [drive] |
| 18 | | succ k ih => |
| 19 | rw [welded,Time.distributed,Time.read,crossing,mul_one] |
| 20 | have hp (i : Fin k) : Fin.tail b i.succ = Fin.tail b i.castSucc + (Fin.tail B i.castSucc).width + Fin.tail Y i.castSucc := h i.succ |
| 21 | have ht : b 0 + ((B 0).width : Per n) + (Y 0:Per n) = Fin.tail b 0 := (h 0).symm |
| 22 | rw [starts,duration_temp,Nat.cast_add, ← add_assoc,ht,ih hp] |
| 23 | conv_rhs => rw [Fin.prod_univ_succ] |
| 24 | rfl |
| 25 | |
| 26 | /-- Arithmetic natural distances on sorted circle. -/ |
| 27 | def minutes (x : Fin (m+1)→Per n) (i : Fin (m+1)) := (x i-x 0).val |
| 28 | |
| 29 | def sectionGap (x : Fin (m+1) → Per n) (i : Fin m) := minutes x i.succ - minutes x i.castSucc |
| 30 | def finalGap (x : Fin (m+1)→ Per n) := n.val - minutes x (Fin.last m) |
| 31 | |
| 32 | def cyclicGaps (x : Fin (m+1)→ Per n) := (Fin.snoc (α := fun _ => ℕ) (sectionGap x) (finalGap x)) |
| 33 | |
| 34 | lemma section_rel {x : Fin (m+1) → Per n} (h : StrictMono (minutes x)) (i : Fin m) : |
| 35 | minutes x i.succ = minutes x i.castSucc + sectionGap x i := by |
| 36 | have he : i.castSucc < i.succ := Fin.castSucc_lt_succ |
| 37 | have hh := h he; unfold sectionGap; omega |
| 38 | |
| 39 | lemma section_duration {x : Fin (m+1) → Per n} (h : StrictMono (minutes x)) (i : Fin m) : |
| 40 | sectionGap x i=(x i.succ - x i.castSucc).val := by |
| 41 | have hx : sectionGap x i<n.val := by |
| 42 | have hp : minutes x i.succ<n.val := ZMod.val_lt _ |
| 43 | rw [section_rel h i] at hp; omega |
| 44 | rw [← ZMod.val_natCast_of_lt hx] |
| 45 | apply congr_arg ZMod.val |
| 46 | rw [sectionGap,Nat.cast_sub (h.monotone (Fin.castSucc_lt_succ).le)]; unfold minutes; simp |
| 47 | |
| 48 | lemma sum_time {x : Fin (m+1)→ Per n} (h : StrictMono (minutes x)) : ∑ i, cyclicGaps x i = n.val := by |
| 49 | let f := minutes x |
| 50 | have ht : f 0=0 := by simp [f,minutes] |
| 51 | have he (i : Fin m) : f i.succ=f i.castSucc+cyclicGaps x i.castSucc := by rw [cyclicGaps, Fin.snoc_castSucc]; exact section_rel h i |
| 52 | have hy : (∑ i : Fin m, f i.succ)+f 0=(∑ i : Fin m, f i.castSucc)+f (Fin.last _) := by |
| 53 | rw [← Fin.sum_univ_castSucc, Fin.sum_univ_succ];ring |
| 54 | have hx : ∑ i : Fin m, cyclicGaps x i.castSucc=f (Fin.last m) := by |
| 55 | simp only [he,Finset.sum_add_distrib,ht, add_zero] at hy; omega |
| 56 | rw [Fin.sum_univ_castSucc,hx,cyclicGaps,Fin.snoc_last]; unfold finalGap |
| 57 | exact Nat.add_sub_of_le (show f _≤ n.val from (ZMod.val_lt _).le) |
| 58 | |
| 59 | lemma last_val {x : Fin (m+1) → Per n} (h : StrictMono (minutes x)) (hm : 0 < m) : finalGap x=(x 0 - x (Fin.last m)).val := by |
| 60 | have he : 0<minutes x (Fin.last m) := by |
| 61 | have hs : 0 < Fin.last m := by simpa [Fin.lt_def] |
| 62 | simpa [minutes] using (h hs) |
| 63 | have hx := show minutes x (Fin.last m)<n.val from ZMod.val_lt _ |
| 64 | have hv : finalGap x<n.val := by unfold finalGap; omega |
| 65 | rw [← ZMod.val_natCast_of_lt hv]; apply congr_arg ZMod.val |
| 66 | rw [finalGap,Nat.cast_sub hx.le]; unfold minutes; simp [Per] |
| 67 | |
| 68 | lemma organized {x : Fin (m+1)→ Per n} {B : Fin (m+1)→Brick a G n} (w : ℕ) (hB : ∀ i, (B i).width=w) |
| 69 | (p : ℕ) (hp : 0<p) (hn : n.val=(p+p)*w) (D : StrictMono (minutes x)) |
| 70 | (r : ℝ) (hr : 0<r) (N : 0<m) |
| 71 | (he : ∀ i j, i ≠ j → (w:ℝ)+2*r < (x j-x i).val) |
| 72 | (β) (hβ : 0 ≤ β) {l : ℕ} (hL : (l:ℝ) ≤ r) {K : Fin (m+1)→ℝ} |
| 73 | (hK : ∀ i, ‖moment β (Time.word (column (B i) p) (x i))‖^(Holder.rate p) ≤ K i) : |
| 74 | let X (i : Fin (m+1)) := if i=0 then x i + ↑l else x i |
| 75 | ‖moment β (fun U => ∏ i, (B i).value (X i) U) - moment β (fun U => ∏ i, (B i).value (x i) U)‖ ≤ |
| 76 | (∏ i, K i)/r*(l:ℝ) := by |
| 77 | intro X |
| 78 | let Y := fun i => cyclicGaps x i - w |
| 79 | have hh (i) : (w:ℝ)+2*r < cyclicGaps x i := by |
| 80 | refine Fin.lastCases ?_ (fun i => ?_) i |
| 81 | · rw [cyclicGaps,Fin.snoc_last,last_val D N]; exact he _ _ (ne_of_gt (by simpa [Fin.lt_def])) |
| 82 | rw [cyclicGaps, Fin.snoc_castSucc, section_duration D]; exact he _ _ (Fin.castSucc_lt_succ).ne |
| 83 | have hw (i) : w + Y i = cyclicGaps x i := by |
| 84 | apply Nat.add_sub_of_le; apply Nat.le_of_lt; exact Nat.cast_lt.mp (lt_trans (by linarith) (hh i)) |
| 85 | have hv (i) : 2*r < Y i := by have hh := hh i; rw [← hw,Nat.cast_add] at hh;linarith |
| 86 | let j := Fin.last m |
| 87 | let Z (i : Fin (m+1)) := if i=j then Y j + l else if i=0 then Y 0-l else Y i |
| 88 | have hj : j≠0 := ne_of_gt (by unfold j;simpa [Fin.lt_def]) |
| 89 | have hO : (l:ℝ)<Y 0 := lt_trans (by linarith) (hv 0) |
| 90 | have hx0 : Z 0+l=Y 0 := by rw [show Z 0=Y 0-l by simp [Z,hj.symm]]; exact Nat.sub_add_cancel (Nat.cast_lt.mp hO).le |
| 91 | have hxj : Z j=Y j+l := by simp [Z] |
| 92 | have hx (a : Fin (m+1)) (h : a≠j) (he : a≠0) : Z a=Y a := by simp [Z,h,he] |
| 93 | have hY : (m+1)*w+∑ i, Y i=n.val := by |
| 94 | rw [← sum_time D,show cyclicGaps x = fun i => w+Y i from funext fun i => (hw i).symm] -- rhs Y unfolds? |
| 95 | simp [Finset.sum_add_distrib] |
| 96 | have hZ : (m+1)*w+∑ i, Z i=n.val := by |
| 97 | suffices e : ∑ i, Z i=∑ i, Y i by rw [e,hY] |
| 98 | have he i : Z i + (if i=0 then l else 0)=Y i+(if i=j then l else 0) := by |
| 99 | by_cases h:i=0 |
| 100 | · subst i; rw [if_pos rfl,if_neg hj.symm,hx0];simp |
| 101 | by_cases e:i=j |
| 102 | · subst i; simp [h,hxj] |
| 103 | simp [h,e,hx] |
| 104 | have hv := Finset.sum_congr (rfl : Finset.univ = _) fun i _ => he i |
| 105 | simpa [Finset.sum_add_distrib] using hv |
| 106 | have hf (i : Fin m) : x i.succ=x i.castSucc + ↑(B i.castSucc).width+(Y i.castSucc:Per n) := by |
| 107 | rw [hB,add_assoc,← Nat.cast_add,hw,cyclicGaps, Fin.snoc_castSucc,section_duration D];simp [Per] |
| 108 | have hF (i : Fin m) : X i.succ=X i.castSucc + ↑(B i.castSucc).width+(Z i.castSucc:Per n) := by |
| 109 | rw [show X i.succ=x i.succ by simp [X],hf] |
| 110 | by_cases H:i.castSucc=0 |
| 111 | · rw [H,← hx0,show X 0=x 0+l by simp [X],Nat.cast_add]; ring |
| 112 | rw [hx i.castSucc (show i.castSucc≠j from (Fin.castSucc_lt_last i).ne) H, show X i.castSucc=x i.castSucc by simp [X,H]] |
| 113 | have hg : 0<w := hB 0 ▸ (B 0).width_pos |
| 114 | simp_rw [← success hF, ← success hf] |
| 115 | exact Time.powering β hβ B hn hp hg hB hY hZ j 0 hj hxj.symm hx0 (fun i hi h => (hx i hi h).symm) r hr hv hL (X 0) (x 0) _ K hK |
| 116 | end YM.Slice.Time |