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.AnalyticNext.GRID_STOP_ATTENUATION.Alphabet.Accounts |
| 2 | import YM.AnalyticNext.GRID_STOP_ATTENUATION.Pair |
| 3 | import YM.Next.FOUNDATIONS.Split |
| 4 | import YM.Next.FOUNDATIONS.TestBounds |
| 5 | import YM.Push.RELAY_DIFFERENCE.Attaching |
| 6 | import YM.Push.RELAY_DIFFERENCE.RawTop |
| 7 | import YM.Push.RELAY_DIFFERENCE.TwoSided |
| 8 | |
| 9 | |
| 10 | set_option warningAsError false |
| 11 | |
| 12 | /-! |
| 13 | # One local canonical extraction from a raw singleton bulk term |
| 14 | |
| 15 | Before summing the terms of a complete signed response. in |
| 16 | B70 conventions. Need actually implement also the wrapping rule, the |
| 17 | indicator shift (and the UNIT indicator correction!), use full Pack lane |
| 18 | & exact masks. Pre-charged projection norms (with B70's chosen stage |
| 19 | threshold and order, no inverse-coupling losses even to reconstruct the |
| 20 | section payments from coordinates *on their good domain only*). |
| 21 | -/ |
| 22 | set_option autoImplicit false |
| 23 | noncomputable section |
| 24 | namespace YM.AnalyticNext.GridStop.Primary |
| 25 | open Function Filter MeasureTheory RG Wilson Lattice Marker Overlay Source Bid Labels Multi Finset |
| 26 | open Multi.Couples |
| 27 | open Next.Foundations |
| 28 | open scoped Topology Matrix.Norms.Frobenius BigOperators ContDiff Classical |
| 29 | variable {G : Gauge} (C : Family G) (m p d : ℕ) |
| 30 | |
| 31 | |
| 32 | abbrev SiteSpace (C : Family G) (m p) := Site (C.side m p) |
| 33 | |
| 34 | def patron (C : Family G) (d : ℕ) := (price_of_readout C.params (C.labels.level d)).choose |
| 35 | lemma patron_support (C : Family G) (d : ℕ) : 1 ≤ patron C d := (price_of_readout C.params (C.labels.level d)).choose_spec.1 |
| 36 | lemma patron_uses (C : Family G) (d : ℕ) {n : Side} (o : Site n) (X : Support n) (B : BudgetPoint) |
| 37 | (F : Config G n → ℂ) (c : ℝ) (he : d ≤ B.order) (hr : d ≤ B.power) (hF : B.Regular X F) (hc : B.supBounds o X F c) |
| 38 | (q : Label G d) (hQ : Reads C.params o X q F) : |
| 39 | (C.labels.level d).coeffSize ((C.labels.level d).scaled B.threshold ((C.labels.level d).coords q)) ≤ patron C d*c := |
| 40 | (price_of_readout C.params _).choose_spec.2 n o X B F c he hr hF hc q hQ |
| 41 | |
| 42 | variable {m p d} |
| 43 | |
| 44 | def unionMap (o : SiteSpace C m p) (d : ℕ) (V : Support (C.side m p)) := V ∪ (C.localSection d).footprint o |
| 45 | def exhibit (o : SiteSpace C m p) (v : C.label d) := |
| 46 | (C.localSection d).places ((C.labels.level d).scaled (C.path.levels.budget m).threshold⁻¹ v) o |
| 47 | def marked (o : SiteSpace C m p) (v : C.label d) := exhibit C o ((C.labels.level d).core v) |
| 48 | def artifact (o : SiteSpace C m p) (H : Config G (C.side m p)→ℂ) (v : C.label d) := H-exhibit C o v |
| 49 | |
| 50 | /-- Difference of raw placement and canonical extraction. Not H-G |
| 51 | through *one* mask: use the UNION on v's residual, Q support for its |
| 52 | own field, old support for H, and global unit. -/ |
| 53 | def gap (o : SiteSpace C m p) (V : Support (C.side m p)) (H : Config G (C.side m p)→ℂ) (v : C.label d) := |
| 54 | let t := (C.path.levels.budget m).threshold |
| 55 | masked t V H - (masked t (unionMap C o d V) (artifact C o H v) + |
| 56 | masked t ((C.localSection d).footprint o) (marked C o v) + (fun _ => v 0)) |
| 57 | |
| 58 | -- Credential at this station. |
| 59 | def wage (C : Family G) (d m : ℕ) := 1+(C.path.levels.params m).columns*patron C d |
| 60 | lemma wage_one (C : Family G) (d m : ℕ) : 1 ≤ wage C d m := le_add_of_nonneg_right (mul_nonneg |
| 61 | (le_trans zero_le_one (C.path.levels.params _).columns_ge) (zero_le_one.trans (patron_support ..))) |
| 62 | |
| 63 | lemma unit_placed (h : C.Makes) (o : SiteSpace C m p) (v : C.label d) : |
| 64 | exhibit C o v = fun U => marked C o v U + v 0 := by |
| 65 | let F := C.labels.level d |
| 66 | let T := C.localSection d |
| 67 | have hf : v=v 0 • F.e0+F.core v := by |
| 68 | ext1 i; by_cases e : i=0 <;> simp [Frame.e0,Frame.core,e] |
| 69 | unfold marked exhibit |
| 70 | conv_lhs => rw [hf,map_add,map_smul,F.scaled_unit] |
| 71 | unfold SectionData.places; change (fun _ => (T.evaluate _ _)) = _; simp_rw [T.eval_linear.map_add,T.eval_linear.map_smul,show T.evaluate F.e0=1 from (h.sections d).unit] |
| 72 | funext i; simp [add_comm]; rfl |
| 73 | |
| 74 | private lemma mask_uses {n : Side} (Y : Support n) (P : BudgetPoint) (F : Config G n→ℂ) (hF : P.Regular Y F) : |
| 75 | UsesFinal P.threshold Y (masked P.threshold Y F) := by |
| 76 | intro U V hh hf |
| 77 | have h : Healthy P.threshold Y U ↔ Healthy P.threshold Y V := by unfold Healthy; rw [Finset.disjoint_iff_inter_eq_empty, |
| 78 | Finset.disjoint_iff_inter_eq_empty,hf] |
| 79 | unfold masked |
| 80 | by_cases he : Healthy P.threshold Y U |
| 81 | · rw [Set.indicator_of_mem (by exact he),Set.indicator_of_mem (by exact h.mp he),hF.sites U V hh] |
| 82 | rw [Set.indicator_of_notMem (by exact he),Set.indicator_of_notMem (by exact mt h.mpr he)] |
| 83 | |
| 84 | private lemma mask_gauge {n : Side} (Y : Support n) (P : BudgetPoint) (F : Config G n→ℂ) (hF : P.Regular Y F) : |
| 85 | GaugeInvariant (masked P.threshold Y F) := by |
| 86 | intro t U; have h : Healthy P.threshold Y (gauge t U) ↔ Healthy P.threshold Y U := by unfold Healthy; rw [gauge_flags] |
| 87 | by_cases he : Healthy P.threshold Y U |
| 88 | · rw [masked_eq _ _ _ _ he,masked_eq _ _ _ _ (h.mpr he),hF.symmetry t U] |
| 89 | rw [masked_ne _ _ _ _ he,masked_ne _ _ _ _ (mt h.mp he)] |
| 90 | |
| 91 | lemma price_through {n : Side} (Y : Support n) (P : BudgetPoint) (F : Config G n→ℂ) (o : Site n) (c : ℝ) (h : P.supBounds o Y F c) : |
| 92 | ∀ U,‖masked P.threshold Y F U‖ ≤ c := fun U => by |
| 93 | by_cases he : Healthy P.threshold Y U |
| 94 | · rw [masked_eq _ _ _ _ he]; exact h.2 U he [] (by simp) (by simp) |
| 95 | rw [masked_ne _ _ _ _ he,norm_zero]; exact h.1 |
| 96 | |
| 97 | /-- Extracted currency and *alignment* for one raw term, using E indicator |
| 98 | relations on the actual stencil. Does not ask for a smooth extension of H |
| 99 | on a different domain; even the price at each U uses only the cap *at the |
| 100 | same placement* of the raw H. Pick a fixed frame & calibrated sections from |
| 101 | `C.Makes`. -/ |
| 102 | theorem piece (h : C.Makes) {d : ℕ} (hr : C.ref d ≤ m) (o : SiteSpace C m p) (V : Support (C.side m p)) |
| 103 | {F : Config G (C.side m p)→ℂ} {c : ℝ} (hF : (C.path.levels.budget m).Regular V F) |
| 104 | (hC : (C.path.levels.budget m).supBounds o V F c) : |
| 105 | ∃ v : C.label d, (C.labels.level d).coeffSize v ≤ patron C d*c ∧ |
| 106 | let _S := C.localSection d; let P := C.path.levels.budget m |
| 107 | let B := artifact C o F v; let D := gap C o V F v |
| 108 | Reads C.params o V ((C.labels.level d).coords.symm ((C.labels.level d).scaled P.threshold⁻¹ v)) F ∧ |
| 109 | P.Regular (unionMap C o d V) B ∧ B 1=0 ∧ |
| 110 | (Nonwrapping (unionMap C o d V) o → C.params.PiVanish d o B) ∧ |
| 111 | P.supBounds o (unionMap C o d V) B (wage C d m * c) ∧ |
| 112 | Weight P (unionMap C o d V) D ∧ ∀ U, ‖D U‖ ≤ 4*wage C d m*c := by |
| 113 | let T := C.labels.level d |
| 114 | let S := C.localSection d |
| 115 | let P := C.path.levels.budget m |
| 116 | have hH : d ≤ P.power := (h.stages d).2 m hr |>.2 |
| 117 | have he : d ≤ P.order := le_trans (Nat.le_succ d) ((h.stages d).2 m hr |>.1) |
| 118 | obtain ⟨q,Hf,_⟩ := exists_read C.params d o P he hF |
| 119 | let v0 := T.coords q |
| 120 | let v := T.scaled P.threshold v0 |
| 121 | have hP : T.coeffSize v ≤ patron C d*c := patron_uses C d o V P F c he hH hF hC q Hf |
| 122 | have ht : T.scaled P.threshold⁻¹ v=v0 := by unfold v; convert! T.scaled_inv (inv_ne_zero P.threshold_pos.ne') v0 using 1; rw [inv_inv] |
| 123 | have ht' : T.coords.symm (T.scaled P.threshold⁻¹ v)=q := (congr_arg _ ht).trans (T.coords.symm_apply_apply _) |
| 124 | let B := artifact C o F v; let X := S.footprint o; let D := unionMap C o d V |
| 125 | obtain ⟨hx,hx'⟩ := Push.RelayDifference.section_bounds C d m p h hr o v -- ‹ℕ› may be m |
| 126 | obtain ⟨hy,hy'⟩ := Push.RelayDifference.section_bounds C d _ _ h hr o (T.core v) |
| 127 | let a := exhibit C o v |
| 128 | change P.Regular X a at hx |
| 129 | change P.Regular X (marked C o v) at hy |
| 130 | have hV := regular_larger hF (Finset.subset_union_left (s₂:=X)) |
| 131 | have ha := regular_larger hx (Finset.subset_union_right (s₁:=V)) |
| 132 | let w := (C.path.levels.params m).columns |
| 133 | let e := wage C d m |
| 134 | have hw (j) := (C.path.levels.params j).columns_ge |
| 135 | have hc : w*T.coeffSize v ≤ (w*patron C d)*c := |
| 136 | (mul_le_mul_of_nonneg_left hP (show 0≤w from zero_le_one.trans (hw _))).trans_eq (mul_assoc ..).symm |
| 137 | have hQ : c+w*T.coeffSize v ≤ e*c := by unfold e wage; apply (add_le_add_right hc c).trans_eq; ring |
| 138 | have hp : P.Regular D B := regular_sub hV ha |
| 139 | have hp' : P.supBounds o D B (e*c) := by |
| 140 | obtain ⟨hm,hM⟩ := bound_sub hV ha (bound_larger hC (Finset.subset_union_left)) (bound_larger hx' (Finset.subset_union_right)) |
| 141 | exact ⟨hm.trans hQ,fun j hi a ha hA => (hM j hi a ha hA).trans hQ⟩ |
| 142 | have hh := h.places d m p hr |
| 143 | have hX : Nonwrapping X o := nonwrapping_placement S o hh |
| 144 | have hl := placed_reads S o hh (h.sections _) v0 |
| 145 | rw [show T.coords.symm v0=q from T.coords.symm_apply_apply q] at hl |
| 146 | have hF0 : Reads C.params o D q F := by |
| 147 | unfold Reads at Hf ⊢; split |
| 148 | next hD => rwa [if_pos (show Nonwrapping V o from fun x hx => hD _ (mem_union_left _ hx))] at Hf |
| 149 | next hD => rwa [if_neg (show ¬ Nonwrapping V o from fun ht => hD fun x hx => |
| 150 | (mem_union.mp hx).elim (fun h => ht _ h) (fun h => hX _ h))] at Hf |
| 151 | have hA : Reads C.params o D q a := by |
| 152 | have hm : a=S.places v0 o := congrArg (fun v : C.label d => S.places v o) ht |
| 153 | rw [hm]; unfold Reads at hF0 hl ⊢ -- not hX |
| 154 | split |
| 155 | next hD => rwa [if_pos hX] at hl |
| 156 | next hD => |
| 157 | rw [if_neg hD] at hF0 |
| 158 | unfold SectionData.places v0; rw [hF0,map_smul,T.coords_unit,S.eval_linear.map_smul,(show S.evaluate T.e0=1 from (h.sections _).unit)]; simp -- scaled conjugate identity only |
| 159 | have h0 := (reads_null_iff C.params d o D B).1 (show Reads C.params o D 0 (F - a) from sub_self q ▸ reads_sub hF0 hA) |
| 160 | let draw := masked P.threshold V F; let res := masked P.threshold D B; let hit := masked P.threshold X (marked C o v) |
| 161 | have hu : UsesFinal P.threshold D draw := Alphabet.final_parent _ Finset.subset_union_left _ (mask_uses _ _ _ hF) |
| 162 | have hu' : UsesFinal P.threshold D res := mask_uses D P B hp |
| 163 | have hR : UsesFinal P.threshold D hit := Alphabet.final_parent _ Finset.subset_union_right _ (mask_uses _ _ _ hy) |
| 164 | refine ⟨v,hP,?_,hp,h0.1,h0.2,hp',?_,?_⟩ |
| 165 | · change Reads _ _ _ (T.coords.symm (T.scaled _ v)) _; rw [ht']; exact Hf |
| 166 | · change Weight P D (draw - (res + hit + _)) |
| 167 | refine ⟨(masked_measurable _ _ _ hF.borel).sub (((masked_measurable _ _ _ hp.borel).add (masked_measurable _ _ _ hy.borel)).add measurable_const),fun i t => ?_,fun U V hh hx => ?_,fun U hU => ?_⟩ |
| 168 | · have hu := mask_gauge V P _ hF i t; have hu' := mask_gauge _ _ _ hp i t; have hr := mask_gauge _ _ _ hy i t |
| 169 | simp only [draw,res,hit,Pi.sub_apply,Pi.add_apply, hu,hu',hr] |
| 170 | · simp only [Pi.sub_apply,Pi.add_apply,hu U V hh hx,hu' U V hh hx, hR U V hh hx] |
| 171 | by_cases hV : Healthy P.threshold D U |
| 172 | · exfalso; apply hU; unfold draw res hit |
| 173 | have hg := unit_placed C h o v |
| 174 | rw [Pi.sub_apply,Pi.add_apply,Pi.add_apply,masked_eq _ _ _ _ hV, |
| 175 | masked_eq _ _ _ _ (show Healthy P.threshold V U from hV.mono_left Finset.subset_union_left), |
| 176 | masked_eq _ _ _ _ (show Healthy P.threshold X U from hV.mono_left Finset.subset_union_right)] |
| 177 | unfold B artifact; rw [Pi.sub_apply,hg]; dsimp only; abel |
| 178 | exact Finset.not_disjoint_iff.mp hV |
| 179 | intro U |
| 180 | have H : w*T.coeffSize v ≤ e*c := (le_add_of_nonneg_left hC.1).trans hQ |
| 181 | have hi : c ≤ e*c := le_mul_of_one_le_left hC.1 (wage_one ..) |
| 182 | have hh : ‖v 0‖ ≤ e*c := by |
| 183 | apply (norm_le_pi_norm v _).trans ((Push.RelayDifference.norm_cost T _).trans ?_) |
| 184 | exact (le_mul_of_one_le_left (Work.G08.size_nonneg ..) (hw m)).trans H |
| 185 | have ha' := price_through _ P _ o _ hy' |
| 186 | unfold gap; dsimp only [Pi.sub_apply,Pi.add_apply] |
| 187 | have H' := (norm_add_le (res U+hit U) (v 0)).trans (add_le_add ((norm_add_le ..).trans |
| 188 | (add_le_add (price_through D P B o (e*c) hp' U) (show ‖hit U‖≤e*c from (ha' U).trans ((mul_le_mul_of_nonneg_left |
| 189 | (Push.RelayDifference.core_price T _) (le_trans zero_le_one (hw m))).trans H)))) hh) |
| 190 | apply (norm_sub_le ..).trans ((add_le_add ((price_through V P F o c hC U).trans hi) H').trans_eq ?_) |
| 191 | unfold e; ring |
| 192 | end YM.AnalyticNext.GridStop.Primary |