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.Pressure.Route |
| 2 | import YM.Pressure.Single |
| 3 | import YM.RG.History |
| 4 | |
| 5 | |
| 6 | /-! |
| 7 | # Macro accounting helpers |
| 8 | -/ |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | namespace YM.Pressure |
| 12 | open Filter Function Lattice RG RG.Patch Axial Wilson Finset YM.Branch |
| 13 | open scoped Topology InnerProductSpace Matrix.Norms.Frobenius ContDiff BigOperators NNReal |
| 14 | variable {G : Gauge} |
| 15 | |
| 16 | lemma spread (X Y : Finset Cover) (v : Cover) (hv : X.image (·+v) ⊆ Y) (U : CoverConfig G) : |
| 17 | edges X (translate v U) ≤ edges Y U ∧ faces X (translate v U) ≤ faces Y U := by |
| 18 | have h (i) (hi : i ∈ X) : i+v∈Y:=hv (mem_image_of_mem _ hi) |
| 19 | have H (f : Cover → ℝ) (hf : ∀ i, 0≤f i) : (∑ i∈ X,f (i+v)) ≤ ∑ i∈Y, f i := by |
| 20 | rw [← show ∑ i∈(X.image (·+v)), f i = _ from Finset.sum_image (by simp)] |
| 21 | exact Finset.sum_le_sum_of_subset_of_nonneg hv fun i _ _ => hf i |
| 22 | constructor |
| 23 | · apply le_trans _ (H (fun i => ∑ k, perEdge Y U i k) (fun i => sum_nonneg fun k _ => per_nn ..)) |
| 24 | refine Finset.sum_le_sum fun i hi ↦ Finset.sum_le_sum fun k _ ↦ ?_ |
| 25 | unfold perEdge; split_ifs with ha hb hb |
| 26 | · rfl |
| 27 | · exact False.elim (hb (by rw [add_right_comm]; exact h _ ha)) |
| 28 | · exact G.chord_nonneg _ |
| 29 | rfl |
| 30 | apply le_trans _ (H (field Y U) fun i => field_nonneg ..) |
| 31 | apply Finset.sum_le_sum; intro i hi; apply Finset.sum_le_sum; intro k _ |
| 32 | unfold face; split |
| 33 | next ha => |
| 34 | rw [if_pos ?_] |
| 35 | · apply le_of_eq; unfold faceValue; rw [← pull_one v U,travel_pull]; simp [affine] |
| 36 | simp only [square_corners,List.mem_cons,List.not_mem_nil,or_false] at * |
| 37 | intro a e; rcases e with rfl|rfl|rfl|rfl|rfl |
| 38 | · exact h i hi |
| 39 | · rw [add_right_comm]; exact h _ (ha _ (by simp)) |
| 40 | · rw [add_right_comm i,add_right_comm (i+_ : Cover)]; exact h _ (ha _ (by simp)) |
| 41 | · rw [add_right_comm]; exact h _ (ha _ (by simp)) |
| 42 | exact h i hi |
| 43 | exact face_nonneg Y U _ _ |
| 44 | |
| 45 | -- selector size: exchange first & conditional count ignoring collisions. |
| 46 | lemma box_length (i : ℕ) : (box i).card=(layers i).card^4 := by simp [box, Pi.card_Icc, layers, Axis] |
| 47 | |
| 48 | lemma light (P : Patch) (x : P.Points) : P.weight x*(P.L.val:ℝ)^4 ≤ 1 := by |
| 49 | classical |
| 50 | let k := P.J-1 |
| 51 | have he : k+1=P.J := Nat.sub_add_cancel (by have := P.order_cut; omega) |
| 52 | have hh : 2*(P.L.val/2)+1=P.L.val := by have h := P.odd_side; obtain ⟨u,hu⟩ := h; omega |
| 53 | let f : (Fin (k+1) → P.Small) ≃ P.Rolls := Equiv.arrowCongr (finCongr he) (Equiv.refl P.Small) |
| 54 | let l : P.Rolls ≃ P.Small×(Fin k → P.Small) := f.symm.trans (Fin.consEquiv |
| 55 | _).symm |
| 56 | have h (i : P.Small) (z : Fin k → P.Small) : (P.addRoll (l.symm (i,z))).val=i.val+∑ t : Fin k,(z t).val := by |
| 57 | change ∑ t : Fin P.J, _ = _ |
| 58 | rw [← Equiv.sum_comp (finCongr he),Fin.sum_univ_succ] |
| 59 | simp [l, f] |
| 60 | let C : ℝ := Fintype.card P.Rolls |
| 61 | let G (i : P.Small) (z : Fin k → P.Small) := if P.addRoll (l.symm (i,z))=x then C⁻¹ else 0 |
| 62 | have hN : 0<C := by unfold C; exact_mod_cast Fintype.card_pos |
| 63 | have hv (z) : ∑ i, G i z ≤ C⁻¹ := by |
| 64 | by_cases hx : ∃ i, P.addRoll (l.symm (i,z))=x |
| 65 | · obtain ⟨i,hi⟩ := hx |
| 66 | rw [Finset.sum_eq_single_of_mem i (Finset.mem_univ _)] |
| 67 | · unfold G; rw [if_pos hi] |
| 68 | intro j hj he; apply if_neg; intro hw |
| 69 | have hp := congr_arg Subtype.val (hw.trans hi.symm); rw [h,h, add_left_inj] at hp |
| 70 | exact he (Subtype.ext hp) |
| 71 | push Not at hx; simp [G,hx,hN.le] |
| 72 | have ha : Fintype.card P.Small=P.L.val^4 := by rw [Fintype.card_coe, box_length,card_layers,hh] |
| 73 | let M : ℝ := Fintype.card (Fin k → P.Small) |
| 74 | have ht : C=(P.L.val:ℝ)^4*M := by |
| 75 | unfold C; rw [Fintype.card_congr l,Fintype.card_prod,ha]; push_cast; rfl |
| 76 | unfold Patch.weight; rw [← Equiv.sum_comp l.symm, Fintype.sum_prod_type, Finset.sum_comm] |
| 77 | apply le_trans (mul_le_mul_of_nonneg_right (Finset.sum_le_sum fun i _ => hv i) (by positivity)) |
| 78 | simp only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul]; change M*C⁻¹*_ ≤ _ |
| 79 | rw [mul_right_comm,mul_comm M,← ht]; rw [mul_inv_cancel₀ hN.ne'] |
| 80 | |
| 81 | lemma traverse (j : Axis) (P : Patch) (U : CoverConfig G) (d : ℕ) (v : Cover) (X : Finset Cover) (h : ∀ k : ℕ, k ≤ d → |
| 82 | ∀ x ∈ P.sites, x+v+k • step j ∈ X) : |
| 83 | (∑ x : P.Points,G.chord (travel U (x.val+v) (straight j d))) ≤ d*edges X U := by |
| 84 | induction d with |
| 85 | | zero => simp [straight, travel] |
| 86 | | succ d ih => |
| 87 | simp_rw [Nat.cast_add_one,carry_succ,natCast_zsmul] |
| 88 | refine (Finset.sum_le_sum fun i _ => G.chord_triangle _ _).trans ?_ |
| 89 | rw [sum_add_distrib, add_mul, one_mul]; apply add_le_add (ih fun k hk => h k (by omega)) |
| 90 | have he := fun (x : P.Points) => h d (by omega) x.val x.property |
| 91 | let f (x : P.Points) := x.val+v+d • step j |
| 92 | have hr : Injective f := fun i k he => by simp [f] at he; exact he |
| 93 | calc |
| 94 | _ = ∑ x ∈ Finset.univ.image f, perEdge X U x j := by |
| 95 | rw [sum_image hr.injOn]; unfold perEdge |
| 96 | refine Finset.sum_congr rfl fun i _ => ?_ |
| 97 | rw [if_pos ?_]; unfold f |
| 98 | rw [add_assoc (i.val+v), ← succ_nsmul]; exact h (d+1) le_rfl _ i.property |
| 99 | _ ≤ ∑ x ∈ X, perEdge X U x j := Finset.sum_le_sum_of_subset_of_nonneg (by intro i hi; obtain ⟨v,-,rfl⟩ := Finset.mem_image.mp hi; exact he v) (fun i _ _ => per_nn ..) |
| 100 | _ ≤ _ := Finset.sum_le_sum fun i _ => single_le_sum (f:=fun k => perEdge X U i k) (fun k _ => per_nn ..) (mem_univ j) |
| 101 | |
| 102 | lemma price_query (P : Patch) (K : KernelChoices) (Y : P.Connector G) (t : P.Points) (x y : G.El) : |
| 103 | G.chord (x⁻¹ * P.predict K Y t * y) ≤ 2*max 1 K.predictor_cut⁻¹ * ∑ i,P.weight i * G.chord (x⁻¹*Y i*y) := by |
| 104 | classical |
| 105 | let m := ∑ i, P.weight i • G.mat (Y i) |
| 106 | have hi : 0 ≤ ∑ i, P.weight i * G.chord (x⁻¹*Y i*y) := Finset.sum_nonneg fun _ _ ↦ mul_nonneg (P.weight_nonneg _) (G.chord_nonneg _) |
| 107 | have hk (p : G.El) : G.chord (x⁻¹*p*y)=G.chord (p*(x*y⁻¹)⁻¹) := by rw [mul_assoc (x⁻¹),chord_cyc]; simp only [mul_inv_rev,inv_inv, mul_assoc] |
| 108 | unfold predict; split_ifs with h |
| 109 | · have hz := (min_iff P.weight P.weight_sum Y (P.best Y)).2 (P.bond_min Y).choose_spec |
| 110 | apply le_trans ?_ (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (le_max_left ..) (by linarith)) hi) |
| 111 | have ht : ‖m-G.mat (x*y⁻¹)‖ ≤ G.colorScale * ∑ i, P.weight i * G.chord (x⁻¹*Y i*y) := by |
| 112 | let Q i := G.mat (Y i)-G.mat (x*y⁻¹) |
| 113 | rw [show m-G.mat (x*y⁻¹) = ∑ i, P.weight i • Q i by simp only [Q,smul_sub, sum_sub_distrib, ← Finset.sum_smul,P.weight_sum,one_smul,m]] |
| 114 | apply (norm_sum_le _ _).trans_eq |
| 115 | simp_rw [Finset.mul_sum,Q,norm_smul,← chord_gap,Real.norm_of_nonneg (P.weight_nonneg _), hk, mul_left_comm (P.weight _) G.colorScale] |
| 116 | apply le_of_mul_le_mul_left (a:=G.colorScale) ?_ G.colorScale_pos |
| 117 | rw [hk,chord_gap]; apply le_trans (norm_sub_le_norm_sub_add_norm_sub _ m _) |
| 118 | rw [norm_sub_rev (G.mat _)]; have he : ‖m-G.mat (P.best Y)‖ ≤ ‖m-G.mat (x*y⁻¹)‖ := hz _; linarith only [he,ht] |
| 119 | have ht := (le_of_not_gt h).trans ((P.bond_min Y).choose_spec (x*y⁻¹)) |
| 120 | refine (G.chord_le_two _).trans ?_ |
| 121 | have h₁ : K.predictor_cut ≤ ∑ i,P.weight i * G.chord (x⁻¹*Y i*y) := by |
| 122 | apply ht.trans; apply Finset.sum_le_sum |
| 123 | intro i _; rw [hk]; apply mul_le_mul_of_nonneg_left _ (P.weight_nonneg _) |
| 124 | let c := Y i * (x*y⁻¹)⁻¹ |
| 125 | change G.price c ≤ G.chord c |
| 126 | nlinarith [G.chord_price c,G.chord_nonneg c,G.chord_le_two c] |
| 127 | have hh := K.predictor_cut_pos |
| 128 | apply le_trans ?_ (mul_le_mul (mul_le_mul_of_nonneg_left (le_max_right ..) zero_le_two) h₁ hh.le (by positivity)) |
| 129 | rw [mul_assoc, inv_mul_cancel₀ hh.ne',mul_one] |
| 130 | end YM.Pressure |