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.Further.GAUSSIAN_SCALAR_LEDGER.Gaussian |
| 2 | |
| 3 | set_option warningAsError false |
| 4 | |
| 5 | /-! |
| 6 | # Schur complements if taking Gaussian-sector marginals |
| 7 | |
| 8 | Use IF F0/mean/C data already priced on this sector; don't |
| 9 | make Y-dependent marginals into separate tags. The block being |
| 10 | integrated out contributes `sqrt(det A11)⁻¹` when *not* |
| 11 | normalizing. In the normalized Gaussian this factor goes towards |
| 12 | the correctly normalized retained marginal. Its precision |
| 13 | is generally not the restriction of the original precision. |
| 14 | Even the map-to-fewer-letters is on the one whole Gaussian. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | noncomputable section |
| 19 | namespace YM.Further.GaussianScalar |
| 20 | namespace Marginal |
| 21 | |
| 22 | open Function MeasureTheory Matrix Set |
| 23 | open scoped Topology ENNReal BigOperators |
| 24 | |
| 25 | variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] |
| 26 | variable (W : Wall (ι ⊕ κ)) |
| 27 | |
| 28 | def a11 := W.submatrix Sum.inl Sum.inl |
| 29 | def d22 := W.submatrix Sum.inr Sum.inr |
| 30 | def cross := W.submatrix Sum.inl Sum.inr |
| 31 | |
| 32 | def eliminate := d22 W-(cross W)ᵀ*(a11 W)⁻¹*cross W |
| 33 | |
| 34 | variable {W} (h : W.PosDef) |
| 35 | include h |
| 36 | |
| 37 | omit [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] in |
| 38 | lemma also_pos : (a11 W).PosDef := h.submatrix Sum.inl_injective |
| 39 | |
| 40 | omit [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] in |
| 41 | lemma viewed : W= fromBlocks (a11 W) (cross W) (cross W)ᴴ (d22 W) := by |
| 42 | ext i j |
| 43 | cases i <;> cases j <;> first | rfl | exact (congr_fun (congr_fun h.1.eq _) _).symm |
| 44 | |
| 45 | lemma pen_cost : W.det = (a11 W).det * (eliminate W).det := by |
| 46 | letI : Invertible (a11 W) := (also_pos h).isUnit.invertible |
| 47 | calc |
| 48 | _ = _ := congr_arg Matrix.det (viewed h) |
| 49 | _ = _ := by rw [det_fromBlocks₁₁, Matrix.invOf_eq_nonsing_inv]; rfl |
| 50 | |
| 51 | omit [DecidableEq κ] in |
| 52 | lemma eliminated_pos : (eliminate W).PosDef := by |
| 53 | letI : Invertible (a11 W) := (also_pos h).isUnit.invertible |
| 54 | have hh : (fromBlocks (a11 W) (cross W) (cross W)ᴴ (d22 W)).PosDef := (viewed h) ▸ h |
| 55 | have hv : IsHermitian (eliminate W) := |
| 56 | ((Matrix.PosDef.fromBlocks₁₁ _ _ (also_pos h)).mp hh.posSemidef).1 |
| 57 | apply PosDef.of_dotProduct_mulVec_pos hv |
| 58 | intro x hx |
| 59 | let y : VV ι := -(((a11 W)⁻¹ * cross W) *ᵥ x) |
| 60 | have hz : Sum.elim y x ≠ (0:VV (ι⊕κ)) := fun he => hx (funext fun i => congr_fun he (Sum.inr i)) |
| 61 | have he := (posDef_iff_dotProduct_mulVec.mp hh).2 hz |
| 62 | rw [dotProduct_mulVec,Matrix.schur_complement_eq₁₁ _ _ _ _ (also_pos h).1, |
| 63 | show y+_=0 from neg_add_cancel _,← dotProduct_mulVec, star_zero, zero_dotProduct,zero_add,←dotProduct_mulVec] at he |
| 64 | exact he |
| 65 | |
| 66 | lemma marginal_inverse : d22 W⁻¹ = (eliminate W)⁻¹ := by |
| 67 | let E := a11 W; let D := d22 W; let B := cross W |
| 68 | let L := fromBlocks E B Bᴴ D |
| 69 | have he : W=L := viewed h |
| 70 | have hp : E.PosDef := also_pos h |
| 71 | have hb : L.PosDef := he ▸ h |
| 72 | letI : Invertible E := hp.isUnit.invertible |
| 73 | letI : Invertible L := hb.isUnit.invertible |
| 74 | have ht : D-Bᴴ * ⅟E * B = eliminate W := by rw [Matrix.invOf_eq_nonsing_inv]; rfl |
| 75 | letI : Invertible (D-Bᴴ * ⅟E * B) := (show IsUnit (D-Bᴴ * ⅟E * B) by rw [ht]; exact (eliminated_pos h).isUnit).invertible |
| 76 | have hv := invOf_fromBlocks₁₁_eq E B Bᴴ D |
| 77 | -- inverse inside nested invertible instances |
| 78 | have hs : d22 (⅟L) = ⅟(D-Bᴴ*⅟E*B) := by |
| 79 | change d22 (⅟(fromBlocks E B Bᴴ D))=_; rw [hv]; rfl |
| 80 | rw [invOf_eq_nonsing_inv,invOf_eq_nonsing_inv (D-Bᴴ*⅟E*B),ht] at hs |
| 81 | calc |
| 82 | d22 W⁻¹ = d22 L⁻¹ := by rw [he] |
| 83 | _ = _ := hs |
| 84 | |
| 85 | |
| 86 | |
| 87 | lemma PDF (x : VV ι) (y : VV κ) : |
| 88 | lawPDF W⁻¹ (Sum.elim x y) = lawPDF (a11 W)⁻¹ (x + ((a11 W)⁻¹*cross W) *ᵥ y) * lawPDF (d22 W⁻¹) y := by |
| 89 | let X := Sum.elim x y |
| 90 | let z := x+((a11 W)⁻¹*cross W) *ᵥ y |
| 91 | let E := eliminate W |
| 92 | let L := a11 W |
| 93 | have he : E.PosDef := eliminated_pos h |
| 94 | have hl : L.PosDef := also_pos h |
| 95 | letI : Invertible W := h.isUnit.invertible |
| 96 | letI : Invertible L := hl.isUnit.invertible |
| 97 | letI : Invertible E := he.isUnit.invertible |
| 98 | have hh : X ⬝ᵥ (W*ᵥX)=z ⬝ᵥ (L*ᵥ z) + y ⬝ᵥ (E*ᵥ y) := by |
| 99 | conv_lhs => rw [viewed h] |
| 100 | have hw := Matrix.schur_complement_eq₁₁ (cross W) (d22 W) x y hl.1 |
| 101 | simp only [← dotProduct_mulVec,star_trivial] at hw |
| 102 | exact hw |
| 103 | have hh' : W⁻¹.det = L⁻¹.det * E⁻¹.det := by |
| 104 | rw [det_nonsing_inv,det_nonsing_inv,det_nonsing_inv, pen_cost h, Ring.inverse_eq_inv,Ring.inverse_eq_inv,Ring.inverse_eq_inv, _root_.mul_inv_rev,mul_comm] |
| 105 | have hx : modeCost W⁻¹=modeCost L⁻¹ * modeCost E⁻¹ := by |
| 106 | unfold modeCost; rw [Fintype.card_sum,pow_add,hh',Real.sqrt_mul (x := L⁻¹.det) (by exact hl.inv.det_pos.le)]; ring |
| 107 | change lawPDF W⁻¹ X= lawPDF L⁻¹ z*_ |
| 108 | rw [marginal_inverse h] |
| 109 | change _ = _ * lawPDF E⁻¹ y |
| 110 | unfold lawPDF; rw [Matrix.inv_inv_of_invertible W, Matrix.inv_inv_of_invertible E, |
| 111 | Matrix.inv_inv_of_invertible L,hx, hh, neg_add_rev,add_div,Real.exp_add]; field_simp |
| 112 | |
| 113 | lemma split_kernel (f : VV (ι⊕κ) → ℝ) (hi : Integrable f (fieldLaw W⁻¹)) : |
| 114 | let M : VV κ → VV ι := fun y => ((a11 W)⁻¹*cross W) *ᵥ y |
| 115 | (∀ᵐ y ∂(volume : Measure (VV κ)), Integrable (fun x => f (Sum.elim (x-M y) y)) (fieldLaw (a11 W)⁻¹)) ∧ |
| 116 | Integrable (fun y => ∫ x, f (Sum.elim (x-M y) y) ∂fieldLaw (a11 W)⁻¹) (fieldLaw (d22 W⁻¹)) ∧ |
| 117 | (∫ x, f x ∂fieldLaw W⁻¹) = |
| 118 | ∫ y, ∫ x, f (Sum.elim (x-M y) y) ∂fieldLaw (a11 W)⁻¹ ∂fieldLaw (d22 W⁻¹) := by |
| 119 | intro M |
| 120 | let g := fun x => lawPDF W⁻¹ x * f x |
| 121 | have hg : Integrable g := (integrable_law h.inv f).mp hi |
| 122 | let p : VV ι × VV κ ≃ᵐ VV (ι⊕κ) := (MeasurableEquiv.sumPiEquivProdPi (fun _ : ι⊕κ => ℝ)).symm |
| 123 | have hp : MeasurePreserving p volume volume := volume_measurePreserving_sumPiEquivProdPi_symm _ |
| 124 | have hx : Integrable (g ∘ p) ((volume : Measure (VV ι)).prod volume) := |
| 125 | (hp.integrable_comp_emb p.measurableEmbedding).mpr hg |
| 126 | have hl : (a11 W).PosDef := also_pos h |
| 127 | have hL : (d22 W⁻¹).PosDef := by rw [marginal_inverse h]; exact (eliminated_pos h).inv |
| 128 | let k (x : VV ι) y := f (Sum.elim (x-M y) y) |
| 129 | have he x y : g (p (x + -(M y),y)) = lawPDF (d22 W⁻¹) y * (lawPDF (a11 W)⁻¹ x * k x y) := by |
| 130 | unfold g k |
| 131 | rw [show p (x + - M y,y)=Sum.elim (x-M y) y by rw [← sub_eq_add_neg]; rfl,PDF h,show x-M y+_=x from sub_add_cancel ..]; ring |
| 132 | have hw (y : VV κ) : (∫ x : VV ι, (g ∘ p) (x,y)) = |
| 133 | lawPDF (d22 W⁻¹) y * ∫ x, k x y ∂fieldLaw (a11 W)⁻¹ := by |
| 134 | rw [← integral_add_right_eq_self (μ:=volume) _ (-M y),integral_law hl.inv,← integral_const_mul] |
| 135 | exact integral_congr_ae (Filter.Eventually.of_forall fun x => he x y) |
| 136 | refine ⟨?_,?_,?_⟩ |
| 137 | · filter_upwards [hx.prod_left_ae] with y hy |
| 138 | change Integrable (fun x => k x y) _ |
| 139 | have hz := (measurePreserving_add_right volume (-M y)).integrable_comp_emb |
| 140 | ((Homeomorph.addRight (-M y)).measurableEmbedding) (g:=fun x => (g∘p) (x,y)) |>.mpr hy |
| 141 | change Integrable (fun x => g (p (x+ -(M y),y))) _ at hz |
| 142 | simp_rw [he] at hz |
| 143 | exact (integrable_law hl.inv _).mpr ((integrable_const_mul_iff (isUnit_iff_ne_zero.mpr (lawPDF_pos hL y).ne') _).mp hz) |
| 144 | · apply (integrable_law hL _).mpr; change Integrable (fun y => lawPDF (d22 W⁻¹) y * ∫ x, k x y ∂fieldLaw _) _ |
| 145 | simp_rw [←hw]; exact hx.integral_prod_right |
| 146 | rw [integral_law h.inv]; change (∫ x,g x) = ∫ y, ∫ x,k x y ∂fieldLaw _ ∂fieldLaw _ |
| 147 | rw [← hp.integral_comp p.measurableEmbedding g] |
| 148 | change (∫ x,g (p x) ∂((volume : Measure (VV ι)).prod volume)) = _ |
| 149 | have hy := integral_prod_symm _ hx |
| 150 | change (∫ x,g (p x) ∂((volume : Measure (VV ι)).prod volume)) = _ at hy |
| 151 | rw [hy]; simp_rw [hw]; exact (integral_law hL _).symm |
| 152 | |
| 153 | -- actual law on the retained Z's |
| 154 | lemma push_right : (fieldLaw W⁻¹).map (fun z : VV (ι⊕κ) => z ∘ Sum.inr) = fieldLaw (d22 W⁻¹) := by |
| 155 | let p (z : VV (ι⊕κ)) := z ∘ Sum.inr |
| 156 | have hp : Measurable p := measurable_pi_lambda _ fun _ => measurable_pi_apply _ |
| 157 | ext s hs |
| 158 | change Measure.map p _ s = _ |
| 159 | rw [Measure.map_apply hp hs] |
| 160 | apply (ENNReal.toReal_eq_toReal_iff' (measure_lt_top _ _).ne (measure_lt_top _ _).ne).mp |
| 161 | let f := s.indicator fun _ => (1:ℝ) |
| 162 | let T := p ⁻¹' s |
| 163 | have hT : MeasurableSet T := hp hs |
| 164 | let g := T.indicator fun _ => (1:ℝ) |
| 165 | have hi : Integrable g (fieldLaw W⁻¹) := (integrable_const 1).indicator hT |
| 166 | have he := (split_kernel h g hi).2.2 |
| 167 | have hk x (y : VV κ) : g (Sum.elim x y) = f y := by |
| 168 | have hh : p (Sum.elim x y)=y := rfl |
| 169 | by_cases h : y∈s <;> simp [g,f,T,hh,h] |
| 170 | simp_rw [hk,integral_const,probReal_univ, one_smul] at he |
| 171 | simp only [g,f,integral_indicator_const _ hs, integral_indicator_const _ hT,smul_eq_mul, mul_one] at he |
| 172 | exact he |
| 173 | end Marginal |
| 174 | end YM.Further.GaussianScalar |