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.LOOP_COEFFICIENT.SliceChart |
| 2 | import YM.Push.LOOP_COEFFICIENT.Vector |
| 3 | import YM.Work.F05.Graphs |
| 4 | |
| 5 | |
| 6 | /-! |
| 7 | # The real slice determinant equals the joint combination on shell |
| 8 | |
| 9 | Use all constrained rows including rooted coarse |
| 10 | frames. |
| 11 | |
| 12 | No identity discarding a coordinate-change curvature off-shell. |
| 13 | -/ |
| 14 | set_option autoImplicit false |
| 15 | noncomputable section |
| 16 | namespace YM.Push.Loops |
| 17 | open Lattice RG Wilson Precision Exterior Tree Matrix Set Function Filter |
| 18 | open scoped Topology ContDiff BigOperators Matrix.Norms.Frobenius |
| 19 | |
| 20 | section algebra |
| 21 | variable {m n : Type} [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n] |
| 22 | |
| 23 | def shiftFee (N : Matrix m m ℝ) (B : Matrix n n ℝ) := (1/2:ℝ)*Real.log N.det - Real.log B.det |
| 24 | |
| 25 | /-- An on-shell full Hessian and generator pair, allowing change of completion. -/ |
| 26 | def Stable (Q : Matrix m m ℝ) (R : Matrix m n ℝ) := ∀ L : Matrix n m ℝ, |
| 27 | IsUnit (L * R) → 0 < (Q + L.transpose * L).det ∧ ∀ L' : Matrix n m ℝ, IsUnit (L' * R) → |
| 28 | shiftFee (Q + L.transpose * L) (L * R) = shiftFee (Q + L'.transpose * L') (L' * R) |
| 29 | |
| 30 | private lemma splitLog {N : Matrix m m ℝ} {B : Matrix n n ℝ} {h j : ℝ} (hh : 0 < h) (hj : j ≠ 0) (hB : IsUnit B) |
| 31 | (he : N.det * j^2 = B.det^2 * h) : 0 < N.det ∧ shiftFee N B = (1/2:ℝ)*Real.log h - Real.log j := by |
| 32 | have hb := B.isUnit_iff_isUnit_det.mp hB |>.ne_zero |
| 33 | have hn : 0 < N.det := pos_of_mul_pos_left (he.symm ▸ mul_pos (sq_pos_of_ne_zero hb) hh) (sq_nonneg _) |
| 34 | refine ⟨hn,?_⟩ |
| 35 | have hl := congr_arg Real.log he |
| 36 | rw [Real.log_mul hn.ne' (pow_ne_zero _ hj), Real.log_mul (pow_ne_zero _ hb) hh.ne', Real.log_pow,Real.log_pow] at hl |
| 37 | dsimp [shiftFee]; push_cast at hl; linarith |
| 38 | |
| 39 | lemma stable_split {k : Type} [Fintype k] [DecidableEq k] (Q : Matrix m m ℝ) (R : Matrix m n ℝ) |
| 40 | (T : Matrix m k ℝ) (H : Matrix k k ℝ) (e : (n ⊕ k) ≃ m) (hh : 0 < H.det) (hj : IsUnit ((sides R T).submatrix e id)) |
| 41 | (he : (sides R T).transpose * Q * sides R T = fromBlocks 0 0 0 H) : Stable Q R := by |
| 42 | have ht (L : Matrix n m ℝ) (hl : IsUnit (L * R)) := splitLog hh ((isUnit_iff_isUnit_det _).mp hj).ne_zero hl |
| 43 | (complete_det Q R T H L e he) |
| 44 | intro L hl; exact ⟨(ht L hl).1,fun L' hL => (ht L hl).2.trans (ht L' hL).2.symm⟩ |
| 45 | |
| 46 | lemma shiftFee_transfer (Q Q' : Matrix m m ℝ) (R R' : Matrix m n ℝ) (A : Matrix m m ℝ) (B : Matrix n n ℝ) |
| 47 | (hq : A.transpose * Q' * A = Q) (hr : A * R = R' * B) (ha : |A.det| = 1) (hb : |B.det| = 1) |
| 48 | (hs : Stable Q R) (L L' : Matrix n m ℝ) (hl : IsUnit (L * R)) (hl' : IsUnit (L' * R')) : |
| 49 | shiftFee (Q + L.transpose * L) (L * R) = shiftFee (Q' + L'.transpose * L') (L' * R') := by |
| 50 | have hh : IsUnit B := B.isUnit_iff_isUnit_det.mpr <| isUnit_iff_ne_zero.mpr (fun h => by simp [h] at hb) |
| 51 | have he : (L' * A)*R = L' * R' * B := by rw [Matrix.mul_assoc,hr,Matrix.mul_assoc] |
| 52 | rw [(hs L hl).2 (L' * A) (he.symm ▸ hl'.mul hh)] |
| 53 | unfold shiftFee |
| 54 | congr 1 |
| 55 | · rw [show Q + _ = A.transpose * (Q' + L'.transpose * L') * A by rw [← hq]; simp [Matrix.mul_add, Matrix.add_mul,transpose_mul,Matrix.mul_assoc]] |
| 56 | congr 2 |
| 57 | rw [det_mul, det_mul,det_transpose,mul_comm A.det,mul_assoc,← sq, ← sq_abs, ha]; simp |
| 58 | rw [he,det_mul,← Real.log_abs,abs_mul,hb,mul_one,Real.log_abs] |
| 59 | end algebra |
| 60 | |
| 61 | variable {c f : Side} {G : Gauge} {S : StepData c f} |
| 62 | variable {F : Forest S.ratio} {p : Clip} {W : PathData G} {σ C Λ : ℝ} |
| 63 | variable (t : S.Choices) |
| 64 | variable {P : ChartRatio G} |
| 65 | |
| 66 | lemma rode_fee (h : S.patch.Branches S.kernel G) (hw : W.Bounds p σ C Λ) (u : fieldDir G c 1) (z : Pack F G) : |
| 67 | completed p W t (represent u) (ride F (represent u) z) = tested F t p W u (inField F z) := by |
| 68 | have he := completed_gauge h hw t (vary 1 (inGauge z)) 1 (represent u) (mounted F (represent u) (inField F z)) |
| 69 | rw [gauge_one] at he |
| 70 | exact he.trans (by |
| 71 | rw [completed, Zmap, show auxiliaries (mounted F (represent u) (inField F z))=1 from rfl, gauge_one]; rfl) |
| 72 | |
| 73 | def readField (G : Gauge) (F : Forest S.ratio) : Pack F G →L[ℝ] AxisChart G F := |
| 74 | ((fromColor G F.Free).symm : _ →L[ℝ] _).comp (ContinuousLinearMap.pi fun i => .proj (.inr i)) |
| 75 | |
| 76 | lemma readFrame (j : SiteKey G f ⊕ Key F G) : readField G F (Pi.single j 1) = j.elim (fun _ => (0:AxisChart G F)) (frame F) := by |
| 77 | cases j with |
| 78 | | inl j => |
| 79 | ext x i |
| 80 | change Pi.single (M:=fun _ : SiteKey G f ⊕ Key F G => ℝ) (.inl j) 1 (.inr (x,i)) = 0 |
| 81 | simp |
| 82 | | inr j => |
| 83 | ext x i |
| 84 | change Pi.single (M:=fun _ : SiteKey G f ⊕ Key F G => ℝ) (.inr j) 1 (.inr (x,i)) = frame F j x i |
| 85 | obtain ⟨y,k⟩ := j |
| 86 | by_cases h : x=y <;> simp [Pi.single_apply,frame, *, Prod.ext_iff] |
| 87 | |
| 88 | lemma steered_price (u : fieldDir G c 1) (b : AxisChart G F) (ht : ContDiffAt ℝ ω (tested F t p W u) b) |
| 89 | (hs : fderiv ℝ (tested F t p W u) b = 0) : bilinearAt (tested F t p W u ∘ readField G F) (arrival b) = |
| 90 | fromBlocks (0 : Matrix (SiteKey G f) _ ℝ) 0 0 (hessian F t p W u b) := by |
| 91 | let L := readField G F |
| 92 | have h : L (arrival b) = b := (paint G F.Free).apply_symm_apply _ |
| 93 | have he := Work.F05.bend_comp_stationary (g:=L) (x:=arrival b) (h.symm ▸ ht) L.contDiff.contDiffAt (h.symm ▸ hs) |
| 94 | rw [L.fderiv,h] at he |
| 95 | rw [bilinearAt,he]; ext i j |
| 96 | rw [LinearMap.toMatrix₂'_apply]; change Work.F05.bend _ _ (readField G F _) (readField G F _) = _ |
| 97 | rw [readFrame,readFrame]; cases i <;> cases j |
| 98 | · simp |
| 99 | · simp |
| 100 | · simp |
| 101 | exact Work.F05.bend_apply .. |
| 102 | |
| 103 | structure AtStation (p : Clip) (W : PathData G) (t : S.Choices) (V : Config G c) (U : Loops.Inputs G c f) : Prop where |
| 104 | smooth : ContDiffAt ℝ ω (completed p W t V ∘ vary U) 0 |
| 105 | quiet : fderiv ℝ (completed p W t V ∘ vary U) 0 = 0 |
| 106 | stable : Stable (cost (completed p W t V) U) (R_tot S U) |
| 107 | |
| 108 | private lemma linearAt_surj {n m : Type} [DecidableEq n] [DecidableEq m] [Fintype n] [Fintype m] |
| 109 | {r : (n → ℝ) → m → ℝ} {z} {e : n ≃ m} (h : IsUnit ((linearAt r z).submatrix e id)) : Surjective (fderiv ℝ r z) := by |
| 110 | let M := (linearAt r z).submatrix e id |
| 111 | intro v |
| 112 | refine ⟨M⁻¹ *ᵥ (v ∘ e),?_⟩ |
| 113 | rw [← linearAt_mulVec] |
| 114 | funext i |
| 115 | obtain ⟨i,rfl⟩ := e.surjective i |
| 116 | change (M *ᵥ (M⁻¹ *ᵥ (v ∘ e))) i = _ |
| 117 | rw [Matrix.mulVec_mulVec,M.mul_nonsing_inv (M.isUnit_iff_isUnit_det.mp h),Matrix.one_mulVec]; rfl |
| 118 | |
| 119 | lemma shell_price (h : S.patch.Branches S.kernel G) (hw : W.Bounds p σ C Λ) (u : fieldDir G c 1) (b : AxisChart G F) |
| 120 | (hp : LocalRatio P) (hb : ∀ i, b i ∈ Metric.ball 0 P.radius) (hs : fderiv ℝ (tested F t p W u) b = 0) |
| 121 | (ht : ContDiffAt ℝ ω (tested F t p W u) b) (hd : 0 < (hessian F t p W u b).det) |
| 122 | (hu : MatDiffAt (Zmap t ∘ vary (mounted F (represent u) b)) 0) |
| 123 | (hx : MatDiffAt (Psi t ∘ vary (mounted F (represent u) b)) 0) : |
| 124 | AtStation p W t (represent u) (mounted F (represent u) b) ∧ |
| 125 | scalar p W t (represent u) (mounted F (represent u) b) = |
| 126 | (1/2:ℝ) * Real.log (hessian F t p W u b).det - Real.log (∏ i, P.J (b i)) := by |
| 127 | let V := represent u |
| 128 | let U := mounted F V b |
| 129 | let T := steering F V b |
| 130 | let z := arrival b |
| 131 | have hT : T z = 0 := steering_zero .. |
| 132 | let e := pins F G |
| 133 | have hj : |((steered F V b).submatrix e id).det| = ∏ i, P.J (b i) := steered_det F V b hp hb |
| 134 | have hj' : ((steered F V b).submatrix e id).det ≠ 0 := fun h => |
| 135 | (Finset.prod_pos (fun i _ => hp.pos _ (hb i))).ne' (hj.symm.trans (by rw [h,abs_zero])) |
| 136 | have hI := (isUnit_iff_isUnit_det _).mpr (isUnit_iff_ne_zero.mpr hj') |
| 137 | have he : Tendsto (ride F V) (𝓝 z) (𝓝 U) := by simpa only [z,ride_arrive] using! (ride_diff F V z).continuousAt.tendsto |
| 138 | let A := completed p W t V ∘ vary U |
| 139 | let R := R_tot S U |
| 140 | let L := completion t U |
| 141 | have hA : ContDiffAt ℝ ω A 0 := (Work.F02.mainTerm_contDiffAt hw (A:=positions ∘ vary U) (x:=0) (fun _ => vary_diff _)).add |
| 142 | (penalty_diff S (matDiffAt_const _) hu) |
| 143 | let Y := tested F t p W u ∘ readField G F |
| 144 | have hY := (paint G F.Free).apply_symm_apply b |
| 145 | change readField G F z = b at hY |
| 146 | have hf : A ∘ T =ᶠ[𝓝 z] Y := by |
| 147 | filter_upwards [he.eventually (vary_displacement U)] with w h1 |
| 148 | change completed _ _ _ _ (vary U (displacement U _)) = _ |
| 149 | rw [h1]; exact rode_fee t h hw u w |
| 150 | have hr := fderiv_comp z (show DifferentiableAt ℝ A (T z) from hT.symm ▸ hA.differentiableAt (by simp)) |
| 151 | ((steering_diff F V b).differentiableAt (by simp)) |
| 152 | rw [hf.fderiv_eq, show fderiv ℝ Y z = 0 by |
| 153 | unfold Y; rw [fderiv_comp z (show DifferentiableAt ℝ _ ((readField G F) z) from hY.symm ▸ ht.differentiableAt (by simp)) (readField G F).differentiableAt,hY,hs, ContinuousLinearMap.zero_comp], hT] at hr |
| 154 | have hg : fderiv ℝ A 0 = 0 := ContinuousLinearMap.ext (fun v => by |
| 155 | obtain ⟨w,rfl⟩ := linearAt_surj hI v |
| 156 | exact DFunLike.congr_fun hr.symm w) |
| 157 | have hc : (steered F V b).transpose * cost (completed p W t V) U * steered F V b = |
| 158 | fromBlocks 0 0 0 (hessian F t p W u b) := by |
| 159 | change (linearAt T z).transpose * bilinearAt A 0 * linearAt T z = _ |
| 160 | rw [← hT,← bilinearAt_comp (g:=T) (x:=z) (f:=A) (hT.symm ▸ hA) (steering_diff F V b) (hT.symm ▸ hg), |
| 161 | bilinearAt_congr hf]; exact steered_price t u b ht hs |
| 162 | rw [steered_eq] at hc hj' hI |
| 163 | have heq := complete_det _ R _ _ L e hc |
| 164 | rw [show L * R = _ from completion_brace h t U hx] at heq |
| 165 | refine ⟨⟨hA,hg,stable_split _ R _ _ e hd hI hc⟩,?_⟩ |
| 166 | change shiftFee _ _ = _ |
| 167 | rw [← hj, steered_eq,Real.log_abs]; exact (splitLog hd hj' (ghost_pos _ (mu S) mu_pos).isUnit heq).2 |
| 168 | |
| 169 | lemma mounted_home {ρ : fieldDir G c 1 → AxisChart G F} (hr : Critical F p W ρ) : |
| 170 | Tendsto (fun x => mounted F (represent x) (ρ x)) (𝓝 0) (𝓝 1) := by |
| 171 | have ht := (mounted_diff F hr.2.1 (x:=0) (V:=represent) (fun i => (Work.F03.represent_smooth i).contDiffAt)).continuousAt.tendsto |
| 172 | rw [hr.1,link_one] at ht |
| 173 | have he : mounted F (1:Config G c) (0:AxisChart G F) = 1 := by |
| 174 | funext x; cases x |
| 175 | · change lifting F (1:Config G c) 0 _ = _; rw [lifted, replica_one]; rfl |
| 176 | · rfl |
| 177 | exact he ▸ ht |
| 178 | |
| 179 | lemma smooth_near {m : Type} [Fintype m] {H : Type} [NormedAddCommGroup H] [NormedSpace ℝ H] {f : PatchField G m → H} |
| 180 | (h : ContDiffAt ℝ ω (f ∘ vary 1) 0) : ∀ᶠ U in 𝓝 (1:PatchField G m), ContDiffAt ℝ ω (f ∘ vary U) 0 := by |
| 181 | let w := fun U : PatchField G m => displacement 1 U |
| 182 | have hc : ContinuousAt (fun U : PatchField G m => fun i => delta ((1:PatchField G m) i) (U i)) 1 := by |
| 183 | refine continuousAt_pi.mpr (fun i => ?_) |
| 184 | simp only [delta,Pi.one_apply,inv_one,mul_one] |
| 185 | have ht := G.continuous_mat.comp (continuous_apply (A:=fun _ : m => G.El) i) |
| 186 | exact ContinuousAt.comp (x:=(1:PatchField G m)) (f:=fun U : PatchField G m => G.mat (U i)) (g:=G.plog) |
| 187 | G.plog_diff.continuousAt ht.continuousAt |
| 188 | have he : Tendsto w (𝓝 1) (𝓝 0) := by |
| 189 | rw [← show w 1=0 from displacement_self _] |
| 190 | exact ((fromColor G m).continuousAt.comp hc) |
| 191 | have hz (i : m) : ∀ᶠ U : PatchField G m in 𝓝 1, ContDiffAt ℝ ω G.plog (G.mat (U i)) := |
| 192 | ((G.continuous_mat.comp (continuous_apply i)).tendsto (1:PatchField G m)).eventually (by simpa using! G.plog_diff.eventually (by simp)) |
| 193 | filter_upwards [he.eventually (h.eventually (by simp)),eventually_eventually_nhds.mpr (vary_displacement (1:PatchField G m)),eventually_all.mpr hz] with U hu hv hq |
| 194 | have ht : Tendsto (vary U) (𝓝 0) (𝓝 U) := by simpa only [vary_zero] using (vary_diff (U:=U) (x:=0)).continuousAt.tendsto |
| 195 | have hD : ContDiffAt ℝ ω (w ∘ vary U) 0 := (fromColor G _).contDiff.contDiffAt.comp |
| 196 | (f:=fun a i => delta 1 (vary U a i)) _ (contDiffAt_pi.mpr fun i => by |
| 197 | simp only [delta,inv_one,mul_one]; exact (show ContDiffAt ℝ ω G.plog (G.mat (vary U 0 i)) by rw [vary_zero]; exact hq i).comp (f:=fun a => G.mat (vary U a i)) _ (vary_diff i)) |
| 198 | have hU : ContDiffAt ℝ ω (f ∘ vary 1) ((w ∘ vary U) 0) := by simpa only [Function.comp_apply,vary_zero] using hu |
| 199 | exact (hU.comp 0 hD).congr_of_eventuallyEq ((ht.eventually hv).mono fun _ he => congr_arg f he.symm) |
| 200 | |
| 201 | lemma thermal_eq (h : S.patch.Branches S.kernel G) (hw : W.Bounds p σ C Λ) {a : ℝ} (ha : 0 < a) (hGap : PriceGap F p W a) |
| 202 | (hp : LocalRatio P) {ρ : fieldDir G c 1 → AxisChart G F} (hr : Critical F p W ρ) : ∀ᶠ x in 𝓝 0, |
| 203 | AtStation p W t (represent x) (mounted F (represent x) (ρ x)) ∧ |
| 204 | thermal F t p W ρ P x = loop W (positions (mounted F (represent x) (ρ x))) + scalar p W t (represent x) (mounted F (represent x) (ρ x)) := by |
| 205 | have he (i : F.Free) : ∀ᶠ x in 𝓝 0, ρ x i ∈ Metric.ball 0 P.radius := by |
| 206 | have he := ((continuous_apply i).continuousAt.comp hr.2.1.continuousAt).tendsto |
| 207 | rw [Function.comp_apply,hr.1] at he; exact he.eventually (Metric.ball_mem_nhds _ hp.patch) |
| 208 | have hu : ∀ᶠ x in 𝓝 0, MatDiffAt (Zmap t ∘ vary (mounted F (represent x) (ρ x))) 0 := eventually_all.mpr fun i => |
| 209 | (mounted_home hr).eventually (smooth_near (f:=fun U => G.mat (Zmap t U i)) ((Zmap_diff h t (by simp) vary_diff) i)) |
| 210 | have hx : ∀ᶠ x in 𝓝 0, MatDiffAt (Psi t ∘ vary (mounted F (represent x) (ρ x))) 0 := eventually_all.mpr fun i => |
| 211 | (mounted_home hr).eventually (smooth_near (f:=fun U => G.mat (Psi t U i)) ((Psi_diff h t (by simp) vary_diff) i)) |
| 212 | filter_upwards [eventually_all.mpr he,(hr.2.2 t).2,(Work.F05.crit_home hr).eventually ((hr.2.2 t).1.eventually (by simp)),Work.F05.hessian_pos ha hGap hr t,hu,hx] with x he hh ht hd hv hX |
| 213 | obtain ⟨ha,hb⟩ := shell_price t h hw x (ρ x) hp he hh.fderiv (ht.comp (f:=fun y => (x,y)) _ (contDiffAt_const.prodMk contDiffAt_id)) hd hv hX |
| 214 | exact ⟨ha,by rw [hb]; unfold thermal; rw [add_sub_assoc]; rfl⟩ |
| 215 | end YM.Push.Loops |