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 Mathlib.Analysis.Calculus.BumpFunction.InnerProduct |
| 2 | import Mathlib.MeasureTheory.Integral.DivergenceTheorem |
| 3 | import YM.Next.MAXWELL.Affine |
| 4 | |
| 5 | |
| 6 | |
| 7 | /-! |
| 8 | # Enclosing with boxes |
| 9 | |
| 10 | Adapters for d^3y face measure: here unscaled coordinates orthonormal |
| 11 | with the Axis basis, choose the remaining axes by Fin.succAbove. In |
| 12 | particular bottom face of a positive-time enclosure has outward normal |
| 13 | *negative* time direction. No current needs to extend to the enclosed |
| 14 | insert. |
| 15 | -/ |
| 16 | set_option autoImplicit false |
| 17 | noncomputable section |
| 18 | namespace YM.Maxwell.Free.Box |
| 19 | open Set Function Filter Tensor Analysis MeasureTheory WithLp |
| 20 | open scoped ContDiff Topology BigOperators InnerProductSpace |
| 21 | |
| 22 | variable {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] |
| 23 | variable {G : Gauge} {j l : ℕ} |
| 24 | |
| 25 | abbrev Plain := Axis → ℝ |
| 26 | abbrev Section3 := SpaceAxis → ℝ |
| 27 | |
| 28 | def enclosedBy (p q : Plain) : Set E4 := ofLp ⁻¹' Icc p q |
| 29 | |
| 30 | def strictly (p q : Plain) : Set E4 := ofLp ⁻¹' pi univ (fun i => Ioo (p i) (q i)) |
| 31 | |
| 32 | lemma strict_coord {p q : Plain} {x : E4} (H : x ∈ strictly p q) (a : Axis) : |
| 33 | p a < x a ∧ x a < q a := (show ofLp x ∈ pi univ _ from H) a (mem_univ _) |
| 34 | |
| 35 | lemma admitted (p q : Plain) : strictly p q ⊆ enclosedBy p q := fun _ H => |
| 36 | ⟨fun a => (strict_coord H a).1.le,fun a => (strict_coord H a).2.le⟩ |
| 37 | |
| 38 | lemma open_box (p q : Plain) : IsOpen (strictly p q) := by |
| 39 | have H : Continuous (ofLp : E4 → Plain) := by fun_prop |
| 40 | exact (isOpen_set_pi finite_univ fun i _ => isOpen_Ioo).preimage H |
| 41 | |
| 42 | lemma testBox {p q : Plain} {x : E4} (hx : x ∈ strictly p q) : |
| 43 | ∃ χ : E4 → ℝ, ContDiff ℝ ∞ χ ∧ HasCompactSupport χ ∧ |
| 44 | χ =ᶠ[𝓝 x] (fun _ => 1) ∧ tsupport χ ⊆ strictly p q := by |
| 45 | obtain ⟨r,hr,h⟩ := Metric.nhds_basis_closedBall.mem_iff.mp ((open_box p q).mem_nhds hx) |
| 46 | let B : ContDiffBump x := ⟨r/2,r,by positivity,by linarith⟩ |
| 47 | exact ⟨B,B.contDiff,B.hasCompactSupport,B.eventuallyEq_one,by rw [B.tsupport_eq]; exact h⟩ |
| 48 | |
| 49 | def face (p q : Plain) (a : Axis) : Set Section3 := Icc (p ∘ a.succAbove) (q ∘ a.succAbove) |
| 50 | |
| 51 | def inFace (a : Axis) (t : ℝ) (x : Section3) : E4 := toLp 2 (a.insertNth t x) |
| 52 | |
| 53 | lemma inFace_cont (a : Axis) (t : ℝ) : Continuous (inFace a t) := by |
| 54 | unfold inFace; exact (PiLp.continuousLinearEquiv 2 ℝ (fun _ : Axis => ℝ)).symm.continuous.comp |
| 55 | (show Continuous (fun x : Section3 => a.insertNth (α := fun _ => ℝ) t x) from continuous_const.finInsertNth a continuous_id) |
| 56 | |
| 57 | @[simp] lemma inFace_at (a t x) : inFace a t x a = t := by simp [inFace] |
| 58 | |
| 59 | |
| 60 | |
| 61 | def side (p q : Plain) (J : Axis → E4 → ℝ) (a : Axis) (t : ℝ) := |
| 62 | ∫ x : Section3 in face p q a, J a (inFace a t x) |
| 63 | |
| 64 | def perimeter (p q : Plain) (J : Axis → E4 → ℝ) := ∑ a : Axis, (side p q J a (q a) - side p q J a (p a)) |
| 65 | |
| 66 | lemma box_divergence {p q : Plain} (hp : p ≤ q) (J : Axis → E4 → ℝ) |
| 67 | (h : ∀ a y, y ∈ enclosedBy p q → ContDiffAt ℝ ∞ (J a) y) : |
| 68 | (∫ x : Plain in Icc p q, ∑ a : Axis, grad a (J a) (toLp 2 x)) = perimeter p q J := by |
| 69 | let L := (PiLp.continuousLinearEquiv 2 ℝ (fun _ : Axis => ℝ)).symm.toContinuousLinearMap |
| 70 | let f (a) := J a ∘ L |
| 71 | have ht (a : Axis) (x : Plain) (hx : x ∈ Icc p q) : ContDiffAt ℝ ∞ (f a) x := |
| 72 | (h a (toLp 2 x) hx).comp x L.contDiff.contDiffAt |
| 73 | have hd (x) (hx : x ∈ Icc p q) : (∑ a : Axis, fderiv ℝ (f a) x (Pi.single a 1)) = |
| 74 | ∑ a : Axis, grad a (J a) (toLp 2 x) := by |
| 75 | apply Finset.sum_congr rfl; intro i _ |
| 76 | change fderiv ℝ (J i ∘ L) x _ = _ |
| 77 | rw [fderiv_comp x (show DifferentiableAt ℝ (J i) (L x) from (h i (toLp 2 x) hx).differentiableAt (by simp)) |
| 78 | L.differentiableAt, L.fderiv]; rfl |
| 79 | have hc : ContinuousOn (fun x => ∑ a : Axis, fderiv ℝ (f a) x (Pi.single a 1)) (Icc p q) := by |
| 80 | intro x hx; apply ContinuousAt.continuousWithinAt |
| 81 | refine ContDiffAt.continuousAt (n := ∞) (𝕜:=ℝ) ?_ |
| 82 | exact ContDiffAt.sum fun i _ => dSmooth (ht i x hx) _ (by simp) |
| 83 | have he := integral_divergence_of_hasFDerivAt_off_countable' p q hp f (fun i => fderiv ℝ (f i)) |
| 84 | ∅ countable_empty (fun i x hx => (ht i x hx).continuousAt.continuousWithinAt) |
| 85 | (fun x hx i => ((ht i x (admitted p q (a := toLp 2 x) hx.1)).differentiableAt (by simp)).hasFDerivAt) |
| 86 | (hc.integrableOn_compact isCompact_Icc (μ:=volume)) |
| 87 | exact (setIntegral_congr_fun measurableSet_Icc hd).symm.trans he |
| 88 | |
| 89 | /-- Stokes with same flux despite central insert. J defined everywhere but |
| 90 | only used off x in the calculation; perimeter computes outward flux. -/ |
| 91 | lemma box_flux {p q : Plain} (h : p ≤ q) {x : E4} (χ : E4 → ℝ) (Hχ : ContDiff ℝ ∞ χ) (hc : HasCompactSupport χ) |
| 92 | (hw : χ =ᶠ[𝓝 x] fun _ => 1) (ht : tsupport χ ⊆ strictly p q) (J : Axis → E4 → ℝ) |
| 93 | (hs : ∀ a y, y ∈ enclosedBy p q → y ≠ x → ContDiffAt ℝ ∞ (J a) y) |
| 94 | (hd : ∀ y, y ∈ enclosedBy p q → y ≠ x → ∑ a : Axis, grad a (J a) y = 0) : |
| 95 | exportFlux J χ = perimeter p q J := by |
| 96 | let F (a : Axis) (y : E4) := (1-χ y)*J a y |
| 97 | have hx (a) : F a =ᶠ[𝓝 x] (fun _ => 0) := by |
| 98 | filter_upwards [hw] with y hy; simp only [F, hy,sub_self,zero_mul] |
| 99 | have hf (a y) (hy : y ∈ enclosedBy p q) : ContDiffAt ℝ ∞ (F a) y := by |
| 100 | by_cases he : y=x |
| 101 | · exact he.symm ▸ (contDiffAt_const.congr_of_eventuallyEq (hx a)) |
| 102 | exact (contDiffAt_const.sub Hχ.contDiffAt).mul (hs a y hy he) |
| 103 | have heq : perimeter p q F = perimeter p q J := by |
| 104 | have he (a : Axis) (t : ℝ) (ha : t=p a ∨ t=q a) : side p q F a t = side p q J a t := by |
| 105 | have hv (y : Section3) : inFace a t y ∉ tsupport χ := by |
| 106 | intro hy; have hk := strict_coord (ht hy) a; rw [inFace_at] at hk; rcases ha with h | h <;> simp_all |
| 107 | simp only [side,F,image_eq_zero_of_notMem_tsupport (hv _),sub_zero,one_mul] |
| 108 | exact Finset.sum_congr rfl fun a _ => by rw [he _ _ (Or.inr rfl),he _ _ (Or.inl rfl)] |
| 109 | let W (a : Axis) (y : E4) := -(grad a χ y • J a y) |
| 110 | have hh (z : E4) (hz : z ∈ enclosedBy p q) : ∑ a : Axis, W a z = ∑ a : Axis, grad a (F a) z := by |
| 111 | by_cases he : z=x |
| 112 | · subst z |
| 113 | have hp (a : Axis) : grad a χ x = 0 := image_eq_zero_of_notMem_tsupport fun he => collar hw (gradient_part χ a he) |
| 114 | have hv (a : Axis) : grad a (F a) x = 0 := (GermD (basis a) (hx a)).trans (by simp [D]) |
| 115 | simp [W,hp,hv] |
| 116 | have hl (a : Axis) : grad a (F a) z = W a z + (1-χ z)*grad a (J a) z := by |
| 117 | have hv : DifferentiableAt ℝ (fun x => 1-χ x) z := differentiableAt_const _ |>.sub (Hχ.differentiable (by simp) z) |
| 118 | change fderiv ℝ (fun x => (1-χ x)*J a x) z _ = _ |
| 119 | rw [fderiv_fun_mul hv ((hs a z hz he).differentiableAt (by simp)), |
| 120 | fderiv_fun_sub (differentiableAt_const _) (Hχ.differentiable (by simp) z)] |
| 121 | rw [show fderiv ℝ (fun _ : E4 => (1:ℝ)) z = 0 from (hasFDerivAt_const (1:ℝ) z).fderiv] |
| 122 | simp only [W,smul_eq_mul,D,grad,add_apply,smul_apply,zero_sub, neg_apply]; |
| 123 | ring |
| 124 | simp_rw [hl, Finset.sum_add_distrib, ← Finset.mul_sum,hd _ hz he,mul_zero,add_zero] |
| 125 | have ht' (a : Axis) : Integrable (W a) := (shell_cost Hχ hc (fun y hy => |
| 126 | (hs a y (admitted p q (ht (tsupport_fderiv_subset ℝ hy))) (fun he : y=x => collar hw (he ▸ hy))).continuousAt) a).neg |
| 127 | unfold exportFlux; rw [← Finset.sum_neg_distrib]; simp_rw [← integral_neg] |
| 128 | change (∑ a : Axis, ∫ x, W a x) = perimeter p q J |
| 129 | rw [← integral_finsetSum _ (fun a _ => ht' a), ← heq,← box_divergence h F hf] |
| 130 | let f (x : E4) := ∑ a, W a x |
| 131 | have hp : MeasurePreserving (toLp 2 : Plain → E4) := PiLp.volume_preserving_toLp .. |
| 132 | have hv : (∫ y : E4, f y) = ∫ y : Plain, f (toLp 2 y) := (hp.integral_comp |
| 133 | (PiLp.continuousLinearEquiv 2 ℝ _ |>.symm.toHomeomorph.measurableEmbedding) f).symm |
| 134 | rw [show (fun x => ∑ a : Axis, W a x) = f from rfl,hv] |
| 135 | rw [← setIntegral_eq_integral_of_forall_compl_eq_zero] |
| 136 | · exact setIntegral_congr_fun measurableSet_Icc fun x hx => hh (toLp 2 x) hx |
| 137 | · intro x hx |
| 138 | have he (a : Axis) : grad a χ (toLp 2 x) = 0 := image_eq_zero_of_notMem_tsupport |
| 139 | fun he => hx (admitted p q (ht (tsupport_fderiv_subset ℝ (gradient_part χ a he)))) |
| 140 | simp [f,W,he] |
| 141 | |
| 142 | lemma energy_through {a : Axis} {p q : Plain} (h : p ≤ q) {x y : E4} |
| 143 | (hx : x ∈ strictly p q) (hy : y ∉ enclosedBy p q) (P : Probe G j) (Q : Probe G l) : |
| 144 | perimeter p q (fun i z => cross (pulse P x) (pulse Q y) i a z) = |
| 145 | - K (raiseLeg (basis a) P) Q x y := by |
| 146 | obtain ⟨χ,hχ,Hχ,hw,he⟩ := testBox hx |
| 147 | have hxy : x ≠ y := by rintro rfl; exact hy (admitted p q hx) |
| 148 | have hP := pulse_wave P x |
| 149 | have hQ := pulse_wave Q y |
| 150 | let J := current (drift a) (pulse P x) (pulse Q y) |
| 151 | have hf : perimeter p q J = singleFlux (drift a) χ (pulse P x) (pulse Q y) := by |
| 152 | refine (box_flux h χ hχ Hχ hw he J (fun a z hz h => current_diff (drift_K _) _ |
| 153 | (fun i l => hP.smooth i l z h) fun i l => hQ.smooth i l z (fun ht : z=y => hy (ht ▸ hz))) ?_).symm |
| 154 | intro z hz hne |
| 155 | let U : Set E4 := {x}ᶜ ∩ {y}ᶜ |
| 156 | have H : z ∈ U := ⟨hne,fun hw : z=y => hy (hw ▸ hz)⟩ |
| 157 | unfold J |
| 158 | rw [current_div (wave_closed (wave_mono inter_subset_left hP)) |
| 159 | (wave_closed (wave_mono inter_subset_right hQ)) (isOpen_compl_singleton.inter isOpen_compl_singleton) (drift_K a) H] |
| 160 | simp only [divF,hP.divergence _ _ H.1,hQ.divergence _ _ H.2,inner_zero_right, inner_zero_left] |
| 161 | simp |
| 162 | have hs : tsupport χ ⊆ {y}ᶜ := fun z hz heq => hy ((show z=y from heq) ▸ admitted p q (he hz)) |
| 163 | have he : J = (fun i z => cross (pulse P x) (pulse Q y) i a z) := by funext i z; simp [J,current,drift,kr_eq,ite_mul] |
| 164 | rw [← he] |
| 165 | simpa [K_symmetric _ Q hxy,K_sample _ _ hxy.symm] using |
| 166 | hf.trans (drift_flux isOpen_compl_singleton hQ P a hχ Hχ hs hw) |
| 167 | |
| 168 | end YM.Maxwell.Free.Box |