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.Push.STATIONARY_UNIFORM.Slope |
| 2 | |
| 3 | /-! |
| 4 | # Uniform sup-radius implicit function theorem specialized to score tensors |
| 5 | |
| 6 | Includes how to interpret the stationary value branch vs. a function |
| 7 | picked on some germ. Does NOT need a size bound on the value of the score |
| 8 | function; works for genuine analytic costs extensive in volume. Sup on |
| 9 | input array real components, key in the physical application for a common |
| 10 | radius, and for the Hessian inverse does not pay for a sup/L² equivalence |
| 11 | on the torus. |
| 12 | -/ |
| 13 | set_option autoImplicit false |
| 14 | noncomputable section |
| 15 | namespace YM.Push.Uniform |
| 16 | open Filter Function Set Metric Lattice Matrix |
| 17 | open scoped Topology ContDiff BigOperators Classical NNReal |
| 18 | |
| 19 | variable {n : Side} {ι τ : Type} [Fintype ι] [Fintype τ] {C a r m : ℝ} {K N : ℕ} |
| 20 | variable {l : ι ⊕ τ → Site n} {f : Positions (ι ⊕ τ) → ℝ} |
| 21 | |
| 22 | /-- Transfer window, analytic scatter hypothesis (period-independent input |
| 23 | estimate to prove on each actual branch, **not** asserting it is free). -/ |
| 24 | structure Receipt (l : ι ⊕ τ → Site n) (a : ℝ) (N K : ℕ) (C r m : ℝ) (f : Positions (ι ⊕ τ) → ℝ) : Prop where |
| 25 | mult : Multiplicity l K |
| 26 | pos_m : 0<m |
| 27 | pos_r : 0<r |
| 28 | pos_a : 0<a |
| 29 | pos_C : 0<C |
| 30 | order : 3≤N |
| 31 | born x : x∈ball 0 r → ContDiffAt ℝ ω f x ∧ Scatter l a N f x C |
| 32 | gap : Charge (block f 0) m |
| 33 | alone : Slope f 0=0 |
| 34 | |
| 35 | def reserveH (K : ℕ) (C a r m : ℝ) := |
| 36 | min (r/2) (m/(2*(1+C*((K:ℝ)*countCost a)^2))) |
| 37 | |
| 38 | def inversePrice (K : ℕ) (C a m : ℝ) := 1+(m/2/2)⁻¹*((K:ℝ)*countCost (tiltWidth K (m/2) a C)) |
| 39 | |
| 40 | def reserveV (K : ℕ) (C a r m : ℝ) := min (reserveH K C a r m) (1/(4*inversePrice K C a m*(1+C*((K:ℝ)*countCost a)^2))) |
| 41 | |
| 42 | def reserveX (K : ℕ) (C a r m : ℝ) := min (reserveV K C a r m) (reserveV K C a r m / |
| 43 | (4*inversePrice K C a m*(1+C*((K:ℝ)*countCost a)))) |
| 44 | |
| 45 | namespace Receipt |
| 46 | variable (h : Receipt l a N K C r m f) |
| 47 | include h |
| 48 | |
| 49 | lemma reserveH_pos : 0 < reserveH K C a r m := by |
| 50 | unfold reserveH; have hp := h.pos_C; have hr := h.pos_r; have hm := h.pos_m; positivity |
| 51 | lemma reserveH_lt : reserveH K C a r m < r := lt_of_le_of_lt (min_le_left ..) (half_lt_self h.pos_r) |
| 52 | lemma inverse_pos : 0 < inversePrice K C a m := by |
| 53 | have hp := h.pos_C |
| 54 | have hm := h.pos_m |
| 55 | have hz : 0<countCost (tiltWidth K (m/2) a C) := count_pos (tiltWidth_pos K (half_pos h.pos_m) h.pos_a h.pos_C.le) |
| 56 | unfold inversePrice; positivity |
| 57 | lemma reserveV_pos : 0 < reserveV K C a r m := by |
| 58 | unfold reserveV; have := h.reserveH_pos; have hx := h.inverse_pos; have hp := h.pos_C; positivity |
| 59 | lemma reserveX_pos : 0 < reserveX K C a r m := by |
| 60 | unfold reserveX; have := h.reserveV_pos; have hz := count_pos h.pos_a; have hx := h.inverse_pos; have hp := h.pos_C; positivity |
| 61 | |
| 62 | lemma snaps (p : Positions (ι ⊕ τ)) (hp : p∈closedBall 0 (reserveH K C a r m)) : Charge (block f p) (m/2) := by |
| 63 | let D := (K:ℝ)*countCost a |
| 64 | let R := reserveH K C a r m |
| 65 | have hR : 0<R := h.reserveH_pos |
| 66 | have hh : p∈ball (0:Positions (ι⊕τ)) r := closedBall_subset_ball h.reserveH_lt hp |
| 67 | have hd : 0 ≤ D := mul_nonneg (by positivity) (count_pos h.pos_a).le |
| 68 | have hc := h.pos_C |
| 69 | have hm := block_near h.pos_a hc.le h.mult (convex_ball _ _) h.born (mem_ball_self h.pos_r) hh |
| 70 | (show ‖0-p‖ ≤ R by simpa using hp) h.order |
| 71 | have he := h.gap.transfer h.pos_a (show 0 ≤ R*(C*D) by positivity) hm (h.mult.comp Sum.inr_injective) |
| 72 | have hu : R ≤ m/(2*(1+C*D^2)) := min_le_right .. |
| 73 | have hv : m/2 ≤ m - (R*(C*D))*D := by |
| 74 | rw [le_div_iff₀ (show 0 < 2*(1+C*D^2) by positivity)] at hu |
| 75 | linarith |
| 76 | exact fun v => le_trans (mul_le_mul_of_nonneg_right hv (by positivity)) (he v) |
| 77 | |
| 78 | section inv |
| 79 | variable [DecidableEq τ] |
| 80 | lemma priced_inverse (p : Positions (ι ⊕ τ)) (hp : p∈closedBall 0 (reserveH K C a r m)) : |
| 81 | 0 < (block f p).det ∧ |
| 82 | Sealed (l ∘ Sum.inr) (tiltWidth K (m/2) a C) (block f p)⁻¹ ((m/2/2)⁻¹) ∧ |
| 83 | ∀ v, ‖((block f p)⁻¹ *ᵥ v)‖ ≤ inversePrice K C a m*‖v‖ := by |
| 84 | have hA := h.snaps p hp |
| 85 | have hg := h.born p (closedBall_subset_ball h.reserveH_lt hp) |
| 86 | have ht : 0 < (block f p).det := (hA.positive (block_hermitian hg.1) (half_pos h.pos_m)).det_pos |
| 87 | have hb := block_rows hg.2 (le_trans (by norm_num) h.order) |
| 88 | have hm' := half_pos h.pos_m |
| 89 | have hk : Multiplicity (l ∘ (Sum.inr : τ → ι ⊕ τ)) K := h.mult.comp Sum.inr_injective |
| 90 | have hh := inverse_sealed hb hm' h.pos_a hA h.pos_C.le hk (isUnit_iff_ne_zero.mpr ht.ne') |
| 91 | exact ⟨ht,hh,rows_test (fun i => (hh.row (tiltWidth_pos K hm' h.pos_a h.pos_C.le) |
| 92 | (inv_pos.mpr (half_pos hm')).le hk i).trans (le_add_of_nonneg_left zero_le_one)) h.inverse_pos.le⟩ |
| 93 | end inv |
| 94 | |
| 95 | omit h in |
| 96 | lemma holds {x : Positions ι} {v : Positions τ} (hx : x∈ball 0 (reserveX K C a r m)) |
| 97 | (hv : v∈closedBall 0 (reserveV K C a r m)) : meetVar x v∈closedBall 0 (reserveV K C a r m) := by |
| 98 | rw [mem_closedBall,dist_zero_right,norm_meet]; exact max_le (le_trans (show ‖x‖ < reserveX K C a r m by simpa using hx).le |
| 99 | (min_le_left ..)) (by simpa using hv) |
| 100 | |
| 101 | lemma adjusted (x : Positions ι) (hx : x∈ball 0 (reserveX K C a r m)) : |
| 102 | ∃ v : Positions τ, ‖v‖ ≤ reserveV K C a r m/2 ∧ Slope f (meetVar x v)=0 ∧ |
| 103 | ∀ w∈closedBall 0 (reserveV K C a r m), Slope f (meetVar x w)=0 → w=v := by |
| 104 | let R := reserveV K C a r m |
| 105 | let T := reserveX K C a r m |
| 106 | let s := closedBall (0:Positions τ) R |
| 107 | have hR : 0<R := h.reserveV_pos |
| 108 | have ht : T ≤ R := min_le_left .. |
| 109 | have hu : R ≤ reserveH K C a r m := min_le_left .. |
| 110 | have hs : 0∈s := mem_closedBall_self hR.le |
| 111 | have hh i (hi : i∈s) : meetVar x i∈ball (0:Positions (ι ⊕ τ)) r := closedBall_subset_ball (hu.trans_lt h.reserveH_lt) (Receipt.holds hx hi) |
| 112 | let D : ℝ := K*countCost a |
| 113 | have hc := h.pos_C; have hd : 0 ≤ D := mul_nonneg (by positivity) (count_pos h.pos_a).le |
| 114 | have hm i (hi : i∈s) := slope_block (h.born _ (hh _ hi)).1 |
| 115 | let H := block f 0 |
| 116 | let J := inversePrice K C a m |
| 117 | have hp : 0<J := h.inverse_pos |
| 118 | obtain ⟨HZ,_,HG⟩ := h.priced_inverse 0 (mem_closedBall_self h.reserveH_pos.le) |
| 119 | have hI : IsUnit H.det := isUnit_iff_ne_zero.mpr HZ.ne' |
| 120 | let L := (Matrix.toLin' H⁻¹).toContinuousLinearMap |
| 121 | have hL (z) : L z = H⁻¹ *ᵥ z := Matrix.toLin'_apply .. |
| 122 | let Y v := v - L (Slope f (meetVar x v)) |
| 123 | have hY (v) (hv : v∈s) : HasFDerivAt Y (ContinuousLinearMap.id ℝ _ - L.comp (fderiv ℝ (Slope f ∘ meetVar x) v)) v := by |
| 124 | have ha : DifferentiableAt ℝ (Slope f ∘ meetVar x) v := |
| 125 | ((hm v hv).1.differentiableAt (by simp)).comp v (meet_derivative x v).differentiableAt |
| 126 | exact (hasFDerivAt_id _).sub (L.hasFDerivAt.comp v ha.hasFDerivAt) |
| 127 | have hP : J*(R*(C*D)*D) ≤ 1/4 := by |
| 128 | have hz := (le_div_iff₀ (show 0 < 4*J*(1+C*D^2) by positivity)).mp (show R ≤ 1/(4*J*(1+C*D^2)) from min_le_right ..) |
| 129 | linarith [mul_pos hR hp] |
| 130 | have hV (v) (hv : v∈s) (w) : ‖(fderiv ℝ Y v) w‖ ≤ (1/4:ℝ)*‖w‖ := by |
| 131 | let z := meetVar x v |
| 132 | have hz : ‖0-z‖ ≤ R := by simpa using Receipt.holds hx hv |
| 133 | let B := H-block f z |
| 134 | have hB := block_near h.pos_a hc.le h.mult (convex_ball _ _) h.born (mem_ball_self h.pos_r) (hh _ hv) hz h.order |
| 135 | rw [(hY _ hv).fderiv]; change ‖w - L (fderiv ℝ (Slope f ∘ meetVar x) v w)‖ ≤ _ |
| 136 | rw [(hm v hv).2]; rw [show w - L (block f z *ᵥ w) = H⁻¹ *ᵥ (B *ᵥ w) from by |
| 137 | dsimp only [L,z, B]; rw [hL, Matrix.sub_mulVec, Matrix.mulVec_sub, Matrix.mulVec_mulVec w H⁻¹ H,H.nonsing_inv_mul hI,one_mulVec]] |
| 138 | have he : ‖(B *ᵥ w)‖ ≤ R*(C*D)*D*‖w‖ := rows_test (S:=B) (hB.row h.pos_a |
| 139 | (mul_nonneg hR.le (mul_nonneg hc.le hd)) (h.mult.comp Sum.inr_injective)) (by positivity) w |
| 140 | apply (HG _).trans; apply (mul_le_mul_of_nonneg_left he hp.le).trans; rw [← mul_assoc]; exact mul_le_mul_of_nonneg_right hP (norm_nonneg w) |
| 141 | have hy (v) (hv : v∈s) (w) (hw : w∈s) : ‖Y v - Y w‖ ≤ (1/4:ℝ)*‖v-w‖ := (convex_closedBall (0:Positions τ) R).norm_image_sub_le_of_norm_fderiv_le |
| 142 | (fun i hi => (hY _ hi).differentiableAt) (fun i hi => ContinuousLinearMap.opNorm_le_bound _ (by positivity) (hV _ hi)) hw hv |
| 143 | have hZ : ‖Y 0‖ ≤ R/4 := by |
| 144 | let z := meetVar x (0 : Positions τ) |
| 145 | have he := slope_range h.pos_a hc.le h.mult (convex_ball _ _) h.born (hh _ hs) |
| 146 | (mem_ball_self h.pos_r) (le_trans (by norm_num) h.order) |
| 147 | rw [h.alone,sub_zero,sub_zero,norm_meet,norm_zero,max_eq_left (norm_nonneg _)] at he |
| 148 | change ‖0-L (Slope f z)‖ ≤ _; rw [zero_sub,norm_neg,hL] |
| 149 | apply (HG _).trans; apply (mul_le_mul_of_nonneg_left he hp.le).trans |
| 150 | have hv : ‖x‖ < R/(4*J*(1+C*D)) := lt_of_lt_of_le (show ‖x‖<T by simpa using hx) (min_le_right ..) |
| 151 | rw [lt_div_iff₀ (show 0<4*J*(1+C*D) by positivity)] at hv |
| 152 | change J * (‖x‖ * (C*D)) ≤ _; linarith [mul_nonneg (norm_nonneg x) hp.le] |
| 153 | have hG v (hv : v∈s) : ‖Y v‖ ≤ R/2 := by |
| 154 | have hx := norm_sub_le_norm_sub_add_norm_sub (Y v) (Y 0) 0 |
| 155 | rw [sub_zero,sub_zero] at hx |
| 156 | have ht := hy v hv 0 hs; rw [sub_zero] at ht |
| 157 | have he : ‖v‖ ≤ R := by simpa [s] using hv |
| 158 | linarith |
| 159 | have hw v : (Y v=v) ↔ Slope f (meetVar x v)=0 := by |
| 160 | unfold Y; constructor |
| 161 | · intro ht |
| 162 | have he : L (Slope f (meetVar x v))=0 := by simpa using ht |
| 163 | rw [hL] at he |
| 164 | rw [← one_mulVec (Slope f (meetVar x v)), ← H.mul_nonsing_inv hI, ← Matrix.mulVec_mulVec, he, Matrix.mulVec_zero] |
| 165 | rintro he; rw [he,map_zero,sub_zero] |
| 166 | haveI : Nonempty s := ⟨⟨_,hs⟩⟩ |
| 167 | haveI : CompleteSpace s := isClosed_closedBall.completeSpace_coe |
| 168 | let g : s → s := fun x => ⟨Y x,by simpa [s] using (hG _ x.property).trans (half_lt_self hR).le⟩ |
| 169 | have H : ContractingWith (1/4:ℝ≥0) g := by |
| 170 | refine ⟨by norm_num, LipschitzWith.of_dist_le_mul fun i j => ?_⟩ |
| 171 | simpa only [Subtype.dist_eq, g,dist_eq_norm,NNReal.coe_div, NNReal.coe_ofNat, NNReal.coe_one] using hy i.val i.property j j.property |
| 172 | let v := ContractingWith.fixedPoint g H |
| 173 | have HH : Y v.val=v.val := congr_arg Subtype.val H.fixedPoint_isFixedPt |
| 174 | refine ⟨v.val, HH ▸ hG _ v.property,(hw v).1 HH,fun w hW h => ?_⟩ |
| 175 | let i : s := ⟨w,hW⟩ |
| 176 | exact congr_arg Subtype.val (show i=v from H.fixedPoint_unique (Subtype.ext ((hw w).2 h))) |
| 177 | |
| 178 | /-- One analytic graph on the stationarity corridor. No extrapolation outside it. -/ |
| 179 | theorem throughout : |
| 180 | let X := reserveX K C a r m; let V := reserveV K C a r m |
| 181 | ∃ g : Positions ι → Positions τ, g 0=0 ∧ ∀ x∈ball 0 X, ContDiffAt ℝ ω g x ∧ ‖g x‖ ≤ V/2 ∧ |
| 182 | ∀ v∈closedBall 0 V, HasFDerivAt (fun y => f (meetVar x y)) (0 : Positions τ →L[ℝ] ℝ) v ↔ v=g x := by |
| 183 | let X := reserveX K C a r m; let V := reserveV K C a r m |
| 184 | let s := ball (0:Positions ι) X; let t := closedBall (0:Positions τ) V |
| 185 | have hX := h.reserveX_pos; have hV := h.reserveV_pos |
| 186 | let g : Positions ι → Positions τ := fun x => if e : x∈s then (h.adjusted x e).choose else 0 |
| 187 | have hg (x) (hx : x∈s) : ‖g x‖ ≤ V/2 ∧ Slope f (meetVar x (g x))=0 ∧ ∀ w ∈ t, Slope f (meetVar x w)=0 → w=g x := by |
| 188 | unfold g; rw [dif_pos hx]; exact (h.adjusted x hx).choose_spec |
| 189 | have hz : (0:Positions ι)∈s := mem_ball_self hX |
| 190 | have hf x (hx : x∈s) y (hy : y∈t) : ContDiffAt ℝ ω f (meetVar x y) := (h.born _ (closedBall_subset_ball ((show V≤_ from min_le_left ..).trans_lt h.reserveH_lt) (Receipt.holds hx hy))).1 |
| 191 | refine ⟨g, ((hg _ hz).2.2 0 (mem_closedBall_self hV.le) (show Slope f (meetVar 0 0)=0 from ?_)).symm, fun x hx => ⟨?_, (hg x hx).1,fun i hi => ?_⟩⟩ |
| 192 | · exact (show meetVar (0:Positions ι) (0:Positions τ)=0 from (partSpace _ _).symm.map_zero).symm ▸ h.alone |
| 193 | · let y := g x |
| 194 | let F := Slope f ∘ (partSpace ι τ).symm |
| 195 | have hy : y ∈ ball (0:Positions τ) V := by simpa using (hg x hx).1.trans_lt (half_lt_self hV) |
| 196 | have ha := hf x hx _ (ball_subset_closedBall hy) |
| 197 | have hA := slope_block (x:=x) (v:=y) ha |
| 198 | have hh : ContDiffAt ℝ ω F (x,y) := hA.1.comp (x,y) (((partSpace ι τ).symm.contDiff (n:=ω)).contDiffAt) |
| 199 | have he := (hh.differentiableAt (by simp)).hasFDerivAt.comp y (show HasFDerivAt (fun i => (x,i)) (ContinuousLinearMap.inr ℝ (Positions ι) (Positions τ)) y from (hasFDerivAt_const x y).prodMk (hasFDerivAt_id y)) |
| 200 | let L := (fderiv ℝ F (x,y)).comp (ContinuousLinearMap.inr ℝ (Positions ι) (Positions τ)) |
| 201 | have hv (i : Positions τ) : L i=block f (meetVar x y)*ᵥ i := by |
| 202 | rw [show L=_ from (show HasFDerivAt (Slope f ∘ meetVar x) L y from he).fderiv.symm]; exact hA.2 _ |
| 203 | have hi : Injective L := (injective_iff_map_eq_zero _).mpr fun i hi => by |
| 204 | rw [hv] at hi |
| 205 | have hd := (h.priced_inverse _ (closedBall_subset_closedBall (show V ≤ _ from min_le_left ..) (Receipt.holds hx (ball_subset_closedBall hy)))).1 |
| 206 | rw [← Matrix.one_mulVec (α:=ℝ) i, ← (block f (meetVar x y)).nonsing_inv_mul (isUnit_iff_ne_zero.mpr hd.ne'), ← Matrix.mulVec_mulVec,hi,Matrix.mulVec_zero] |
| 207 | have hi' : L.IsInvertible := ⟨(LinearEquiv.ofBijective L.toLinearMap ⟨hi,LinearMap.surjective_of_injective hi⟩).toContinuousLinearEquiv,rfl⟩ |
| 208 | let u := hh.implicitFunction (by simp) hi' |
| 209 | have hx' : u x=y := hh.implicitFunction_apply_self (by simp) hi' |
| 210 | have hH : ContDiffAt ℝ ω u x := hh.contDiffAt_implicitFunction (by simp) hi' |
| 211 | apply hH.congr_of_eventuallyEq |
| 212 | filter_upwards [isOpen_ball.mem_nhds hx, hH.continuousAt.preimage_mem_nhds (show ball (0:Positions τ) V∈𝓝 (u x) from hx'.symm ▸ isOpen_ball.mem_nhds hy), hh.eventually_apply_implicitFunction (by simp) hi'] with i hi hJ hk |
| 213 | exact ((hg i hi).2.2 (u i) (ball_subset_closedBall hJ) (hk.trans (hg x hx).2.1)).symm |
| 214 | rw [← slope_zero_test (hf x hx i hi)] |
| 215 | exact ⟨(hg x hx).2.2 i hi, fun hi => hi.symm ▸ (hg x hx).2.1⟩ |
| 216 | end Receipt |
| 217 | end YM.Push.Uniform |