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.CONNECTED_ACTIVITY_BOUNDS.Affine |
| 2 | import YM.AnalyticNext.CONNECTED_ACTIVITY_BOUNDS.Birthday |
| 3 | import YM.Progress.STATIONARY_SCENES.Thermal |
| 4 | |
| 5 | |
| 6 | /-! |
| 7 | # The tree tangent hits every orientation of the energetic Ybase rows |
| 8 | |
| 9 | No change of reference fields or doing separate rotations of Q. Derivation |
| 10 | from the exact *actual* Step with Comptroller finances (costs |
| 11 | remain). E Eq rowzero. No asserting cancellation at a nonlinear field. |
| 12 | Noise symmetry uses the SAME estimator tags even in limits. Sworn on these |
| 13 | real metric channels required; get from e.g. Stationary Service, not from |
| 14 | existence of unmarked partition. |
| 15 | -/ |
| 16 | set_option autoImplicit false |
| 17 | noncomputable section |
| 18 | namespace YM.AnalyticNext.ConnectedActivity.Aff |
| 19 | open Lattice RG Precision Wilson Pressure Pressure.Stores Exterior Turn |
| 20 | open Matrix Work.F03 Push.SectorMeasure Push.SectorMeasure.Oriented Push.AbsoluteSums Tree Next.Fluctuations |
| 21 | open Progress.StationaryScenes Filter Bloch |
| 22 | open scoped Topology BigOperators InnerProductSpace Matrix.Norms.Frobenius Classical |
| 23 | variable {G : Gauge} {c f n : Side} {S : StepData c f} |
| 24 | |
| 25 | lemma flip_energy (s : Signed) (Q V : Config G c) (i : Bond c) : |
| 26 | ‖Tube.Z S (pull s 0 Q) (pull s 0 V) i‖ = ‖Tube.Z S Q V (edgeP s i)‖ := by |
| 27 | unfold Tube.Z; rw [step_transport,step_transport]; split |
| 28 | · let u := V (edgeP s i); let v := Q (edgeP s i) |
| 29 | have hv : u⁻¹*(v⁻¹)⁻¹ = (u⁻¹*(u*v⁻¹)*(u⁻¹)⁻¹)⁻¹ := by group |
| 30 | change ‖_ • G.curvature (u⁻¹*(v⁻¹)⁻¹)‖ = _ |
| 31 | rw [hv,G.curvature_inv, G.curvature_conjugate]; simp only [norm_smul, norm_neg,G.norm_adjoint]; rfl |
| 32 | rfl |
| 33 | |
| 34 | def orient (s : Signed) (u : LogField G n) := form (maps s 1 (collect G u)) |
| 35 | |
| 36 | lemma orient_linear (s : Signed) (u : LogField G n) (t : ℝ) : orient s (t • u) = t • orient s u := by |
| 37 | unfold orient; rw [show collect G (t • u) = t • collect G u from rfl,map_smul]; rfl |
| 38 | |
| 39 | lemma orient_represents (s : Signed) (u : LogField G n) : represent (orient s u) = pull s 0 (represent u) := by |
| 40 | unfold represent orient; rw [operations_pulled,collect_form]; congr 1 |
| 41 | funext i; simp [pull, Step.read] |
| 42 | |
| 43 | lemma orient_pulls (s : Signed) (u : LogField G n) : orient s u=Bid.pulled u s := by |
| 44 | unfold orient collect form Bid.pulled |
| 45 | funext i; rw [maps_apply]; simp [edgeP,sendEdge]; -- type second uses axisEquiv |
| 46 | |
| 47 | lemma z_energy (s : Signed) (a : LogField G f) (b : LogField G c) (h : S.patch.Branches S.kernel G) : |
| 48 | ∑ i, ‖zLin S (orient s a) (orient s b) i‖^2 = ∑ i, ‖zLin S a b i‖^2 := by |
| 49 | let t : S.Choices := Classical.ofNonempty |
| 50 | let q := choice s t |
| 51 | have hh i (t : S.Choices) (x : LogField G f) (y : LogField G c) : |
| 52 | Tendsto (fun r : ℝ => ‖r‖⁻¹ * ‖zTest S t i (r • (x,y))‖) (𝓝[≠] 0) (𝓝 ‖zLin S x y i‖) := by |
| 53 | have hv := (zTest_deriv (S:=S) h t i (x,y)).tendsto_slope.norm |
| 54 | simpa only [slope_def_module, sub_zero, zero_smul, zTest_zero h, norm_smul,norm_inv] using hv |
| 55 | have he i : (fun r : ℝ => ‖zTest S q i (r • (orient s a,orient s b))‖) = |
| 56 | fun r => ‖zTest S t (edgeP s i) (r • (a,b))‖ := by |
| 57 | funext r |
| 58 | change ‖Tube.Z _ (S.prediction (represent (r • orient s a)) q) (represent (r • orient s b)) i‖ = _ |
| 59 | rw [← orient_linear, ← orient_linear, orient_represents,orient_represents,(carry s h t _).2] |
| 60 | exact flip_energy .. |
| 61 | calc |
| 62 | _ = ∑ i, ‖zLin S a b (edgeP s i)‖ ^ 2 := Finset.sum_congr rfl fun i _ => by |
| 63 | congr 1 |
| 64 | have hv := hh i q (orient s a) (orient s b) |
| 65 | simp_rw [show ∀ r : ℝ, ‖zTest S q i (r • (orient s a,orient s b))‖ = _ from congr_fun (he i)] at hv |
| 66 | exact tendsto_nhds_unique hv (hh (edgeP s i) t ..) |
| 67 | _ = _ := Equiv.sum_comp (StepData.sendBonds s 0) fun i => ‖zLin S a b i‖^2 |
| 68 | |
| 69 | /-- additional data supplied via StationaryScenes / H.Suffices with |
| 70 | Sworn orientation on both beds. -/ |
| 71 | structure Alongside (A B : Bed) (T : Tube G S) : Prop where |
| 72 | inbound : Attached A T.up |
| 73 | outbound : Attached B T.down |
| 74 | together : Towers.Diagonal S A B T.R |
| 75 | sails : Towers.Roll S A B T.R T.high T.low |
| 76 | budgets : ∃ a b q r, Floor A T.high f a b ∧ Floor B T.low c q r |
| 77 | old : Bid.Sworn A f G |
| 78 | new : Bid.Sworn B c G |
| 79 | |
| 80 | -- extend linear function explicitly also to coordinates off chart |
| 81 | |
| 82 | def station (T : Tube G S) (F : Forest S.ratio) (b : LogField G c) : LogField G f := fun i => |
| 83 | WithLp.toLp 2 fun k => (extracted S F (installed S.ratio T.R.A0) *ᵥ parts G 1 b k) i |
| 84 | |
| 85 | def attempt (T : Tube G S) (F : Forest S.ratio) (b : LogField G c) := |
| 86 | collect G (station T F b) - linearCopy S.ratio (collect G b) |
| 87 | |
| 88 | lemma attempt_root (T : Tube G S) (F : Forest S.ratio) (b : LogField G c) (i : Bond f) (he : i∈F.trunks) : |
| 89 | attempt T F b i=(0:G.Color) := by |
| 90 | have hp : linearCopy S.ratio (collect G b) i=0 := by unfold linearCopy; rw [if_pos (F.trunk_internal (by simpa using he))] |
| 91 | have hs : collect G (station T F b) i=0 := by |
| 92 | ext k; exact Precision.stays (S:=S) F _ (parts G 1 b k) i he |
| 93 | simp only [attempt, Pi.sub_apply, hp,hs,sub_zero] |
| 94 | |
| 95 | |
| 96 | |
| 97 | section receipt |
| 98 | variable (T : Tube G S) {P : Teller G} {A B : Bed} (ha : Alongside A B T) (hT : P.Funds S T) |
| 99 | (b : LogField G c) (F : Forest S.ratio) |
| 100 | |
| 101 | def Limage (b : LogField G c) := xLin T.low T.down b |
| 102 | |
| 103 | def Fout := zip (flatF T) (Limage T b) |
| 104 | def Qout := zip (flatI T) (Limage T b) |
| 105 | |
| 106 | include ha hT |
| 107 | private lemma read_price (s : Co c Layers2) (k) : |
| 108 | Limage T b ((Work.E03.meshEquiv c).symm s) k = ((B.full T.low c*d 1 c) *ᵥ parts G 1 b k) s := by |
| 109 | obtain ⟨W,C,hx,hV⟩ := hT.feeds; rw [← hT.low] at hV |
| 110 | have he := xLin_component T.low T.down B hV ha.outbound b ((Work.E03.meshEquiv c).symm s) k |
| 111 | rw [show mesh ((Work.E03.meshEquiv c).symm s)=s from (Work.E03.meshEquiv c).apply_symm_apply _] at he; exact he |
| 112 | |
| 113 | lemma gain_zero (i) : zip (flatN T) (Limage T b) i = 0 := by |
| 114 | ext k |
| 115 | have he := scalar_zip (T.R.o.acts c) (Equiv.refl _) (Work.E03.meshEquiv c) (Limage T b) i k |
| 116 | simp only [read_price T ha hT b, Equiv.refl_apply] at he |
| 117 | rw [mulVec_mulVec, ← Matrix.mul_assoc,ha.sails.oPart, zero_mulVec] at he; exact he |
| 118 | |
| 119 | lemma row_cost (i) : xLin T.high T.up (station T F b) i = Fout T b i := by |
| 120 | obtain ⟨W,C,hx,hV⟩ := hT.feeds; rw [← hT.high] at hx |
| 121 | have he : d 1 f * extracted S F (installed S.ratio T.R.A0)=d 1 f * installed S.ratio T.R.A0 := by |
| 122 | unfold extracted |
| 123 | rw [Matrix.mul_add, ← Matrix.mul_assoc _ (d 0 f), Exterior.closed 0,Matrix.zero_mul,add_zero] |
| 124 | ext k |
| 125 | rw [xLin_component T.high T.up A hx ha.inbound] |
| 126 | have hp := scalar_zip (installed S.ratio T.R.mf) (Work.E03.meshEquiv f) (Work.E03.meshEquiv c) (Limage T b) i k |
| 127 | simp_rw [read_price T ha hT b] at hp; rw [mulVec_mulVec, ← Matrix.mul_assoc, ha.sails.fPart] at hp |
| 128 | change _ = zip (flatF T) (Limage T b) i k; apply Eq.trans _ hp.symm |
| 129 | rw [show parts G 1 (station T F b) k=extracted S F (installed S.ratio T.R.A0) *ᵥ parts G 1 b k from rfl, |
| 130 | mulVec_mulVec, Matrix.mul_assoc, he, ← Matrix.mul_assoc]; rfl |
| 131 | |
| 132 | lemma Qidentify (k) (i) : Qout T b i k = (Real.sqrt S.kernel.penalty)⁻¹ • |
| 133 | ((K (B.metric.acts c) *ᵥ parts G 1 b k) (pole i)) := by |
| 134 | let h := scalar_zip (T.R.mn.acts c) (Work.E03.poleEquiv c) (Work.E03.meshEquiv c) (Limage T b) i k |
| 135 | simp_rw [read_price T ha hT b] at h; rw [mulVec_mulVec, ← Matrix.mul_assoc,ha.sails.nPart, Matrix.smul_mulVec] at h |
| 136 | exact h |
| 137 | |
| 138 | lemma bond_cost (i) : zLin S (station T F b) b i = Qout T b i := by |
| 139 | have hr := (stationed F _ _ _ ha.together.trial).1 |
| 140 | let κ := S.kernel.penalty |
| 141 | have he : 0 < κ := S.kernel.penalty_pos |
| 142 | have hi : Real.sqrt κ * κ⁻¹ = (Real.sqrt κ)⁻¹ := by field_simp; exact Real.sq_sqrt he.le |
| 143 | ext k |
| 144 | let y := parts G 1 b k; let z := K (B.metric.acts c) |
| 145 | change Real.sqrt κ * (y (pole i) - (probe S *ᵥ (extracted S F _ *ᵥ y)) _) = _ |
| 146 | rw [mulVec_mulVec,hr,Matrix.sub_mulVec, Matrix.one_mulVec, Qidentify T ha hT b, Matrix.smul_mulVec] |
| 147 | change Real.sqrt κ * (y _-(y _- κ⁻¹*(z *ᵥ y) _)) = (Real.sqrt κ)⁻¹ * ((z *ᵥ y) _) |
| 148 | rw [sub_sub_cancel, ← mul_assoc, hi] |
| 149 | end receipt |
| 150 | |
| 151 | section squares |
| 152 | variable {X Y : Type*} [Fintype X] [Fintype Y] |
| 153 | |
| 154 | /-- Not Pi norm. -/ |
| 155 | def counted (A : X→G.Color) := ∑ i, ‖A i‖^2 |
| 156 | |
| 157 | private lemma norm_axis (B : Bed) (V : Clip) (W : PathData G) (x : LogField G n) |
| 158 | {b q s σ C} (hb : W.Bounds V σ C s) (hv : Attached B W) (h : Floor B V n b q) : |
| 159 | Bid.gaugeFiscal B x x = counted (xLin V W x) := by |
| 160 | rw [metric_pair B hb hv x x h,counted]; conv_rhs => rw [Fintype.sum_prod_type] |
| 161 | apply Finset.sum_congr rfl; intro i _ |
| 162 | simp only [Fintype.sum_bool,xLin, Bool.false_eq_true, ↓reduceIte, norm_smul, |
| 163 | Real.norm_of_nonneg (Real.sqrt_nonneg _), mul_pow, Real.sq_sqrt V.quadratic_pos.le, |
| 164 | real_inner_self_eq_norm_sq, add_comm] |
| 165 | |
| 166 | theorem one_square (T : Tube G S) (x : LogField G f) (b : LogField G c) |
| 167 | {P : Teller G} {A B : Bed} (hA : Alongside A B T) (hP : P.Funds S T) : |
| 168 | let Z := zLin S x b; let L := xLin T.high T.up x |
| 169 | counted (L-Fout T b) + counted (Z - Qout T b) = counted L + counted Z - counted (Limage T b) := by |
| 170 | obtain ⟨c₁,e,hc,he⟩ := hP.feeds |
| 171 | rw [← hP.high] at hc; rw [← hP.low] at he |
| 172 | intro Z L |
| 173 | let v := Limage T b |
| 174 | let I := Fout T b; let O := Qout T b |
| 175 | let H p (u w : p → G.Color) [Fintype p] := ∑ i, inner ℝ (u i) (w i) |
| 176 | have hf (u w) : H _ u I + H _ w O = ∑ j,inner ℝ (v j) (unzip (flatF T) u j + unzip (flatI T) w j) := by |
| 177 | have hj : H _ u I = ∑ i, inner ℝ (I i) (u i) := Finset.sum_congr rfl (fun _ _ => real_inner_comm ..) |
| 178 | have hk : H _ w O = ∑ i, inner ℝ (O i) (w i) := Finset.sum_congr rfl (fun _ _ => real_inner_comm ..) |
| 179 | rw [hj,hk,show I = zip (flatF T) v from rfl, show O = zip (flatI T) v from rfl, |
| 180 | arity (flatF T) u v, arity (flatI T) w v]; simp_rw [inner_add_right, Finset.sum_add_distrib] |
| 181 | have hx : H _ L I+ H _ Z O=counted v := by |
| 182 | rw [hf L Z]; unfold counted; refine Finset.sum_congr rfl fun i _ => ?_ |
| 183 | rw [show unzip (flatF T) L i + unzip (flatI T) Z i=v i from |
| 184 | sub_eq_zero.mp (roll_l T hA.sails hc he hA.inbound hA.outbound x b i), real_inner_self_eq_norm_sq] |
| 185 | have hi : H _ I I+H _ O O=counted v := by |
| 186 | rw [hf]; unfold counted; refine Finset.sum_congr rfl fun i _ => ?_ |
| 187 | have hz := sub_eq_zero.mp (roll_d T hA.sails v i) |
| 188 | have he : zip (flatN T) v=0 := funext (gain_zero T hA hP b) |
| 189 | have hl : unzip (flatF T) I i + unzip (flatI T) O i = v i := by |
| 190 | simpa only [he, show unzip (flatN T) (0 : Co c Gain → G.Color) i=0 from by simp [unzip], add_zero] using! hz.symm |
| 191 | rw [hl,real_inner_self_eq_norm_sq] |
| 192 | have hr (p : Type) [Fintype p] (a b : p → G.Color) : |
| 193 | counted (a-b) = counted a + H _ b b - 2*H p a b := by |
| 194 | unfold counted H |
| 195 | simp_rw [Pi.sub_apply, norm_sub_sq_real,real_inner_self_eq_norm_sq] |
| 196 | simp only [Finset.sum_add_distrib, Finset.sum_sub_distrib,Finset.mul_sum]; ring |
| 197 | change counted (L-I)+counted (Z-O) = _ - counted v |
| 198 | rw [hr,hr]; linarith only [hx,hi] |
| 199 | |
| 200 | lemma square_turn (T : Tube G S) (x : LogField G f) (b : LogField G c) |
| 201 | {P : Teller G} {A B : Bed} (hA : Alongside A B T) (hP : P.Funds S T) (s : Signed) : |
| 202 | let g := orient s x; let v := orient s b; let f := xLin T.high T.up |
| 203 | counted (f g-Fout T v) + counted (zLin S g v-Qout T v)= |
| 204 | counted (f x-Fout T b)+counted (zLin S x b-Qout T b) := by |
| 205 | obtain ⟨c,e,hc,hv⟩ := hP.feeds |
| 206 | obtain ⟨a,m,n,w,hx,hy⟩ := hA.budgets |
| 207 | rw [← hP.high] at hc; rw [← hP.low] at hv |
| 208 | intro g v f; unfold f |
| 209 | have hf : counted (zLin S g v)=counted (zLin S x b) := z_energy _ x b (hP.knobs.symm ▸ hP.kernel) |
| 210 | calc |
| 211 | _ = counted (f g)+counted (zLin S g v)-counted (Limage T v) := one_square T g v hA hP |
| 212 | _ = counted (f x)+counted (zLin S x b)-counted (Limage T b) := by |
| 213 | unfold Limage f |
| 214 | rw [hf, ← norm_axis A _ _ g hc hA.inbound hx, ← norm_axis A _ _ x hc hA.inbound hx, |
| 215 | ← norm_axis B _ _ v hv hA.outbound hy, ← norm_axis B _ _ b hv hA.outbound hy, |
| 216 | show g = Bid.pulled x s from orient_pulls .., show v = Bid.pulled b s from orient_pulls .., |
| 217 | hA.old s x x, hA.new s b b] |
| 218 | _ = _ := (one_square T x b hA hP).symm |
| 219 | |
| 220 | /-- All orientation channels on the one field. No taking just one |
| 221 | channel linear term while billing the others. -/ |
| 222 | theorem escape {P : Teller G} (T : Tube G S) {A B : Bed} (hA : Alongside A B T) (hP : P.Funds S T) |
| 223 | (s : Signed) (F : Forest S.ratio) (b : LogField G c) : |
| 224 | let v := orient s (station T F b); let x := orient s b |
| 225 | xLin T.high T.up v = Fout T x ∧ zLin S v x = Qout T x := by |
| 226 | intro v x |
| 227 | let Z := station T F b |
| 228 | let f := xLin T.high T.up v - Fout T x; let g := zLin S v x - Qout T x |
| 229 | have ht : counted f + counted g = 0 := by |
| 230 | have he := square_turn T Z b hA hP s |
| 231 | refine he.trans ?_; rw [show xLin T.high T.up Z=Fout T b from funext (row_cost T hA hP b F), |
| 232 | show zLin S Z b=Qout T b from funext (bond_cost T hA hP b F)]; simp [counted] |
| 233 | have hn (p : Type) [Fintype p] (a : p → G.Color) : 0 ≤ counted a := Finset.sum_nonneg (fun _ _ => sq_nonneg _) |
| 234 | have hf : counted f≤0 := by linarith [hn _ f,hn _ g] |
| 235 | have hg : counted g≤0 := by linarith [hn _ f,hn _ g] |
| 236 | have hx (p : Type) [Fintype p] (a : p → G.Color) (h : counted a ≤ 0) : a=0 := by |
| 237 | funext i |
| 238 | have he : ‖a i‖^2 ≤ 0 := le_trans (Finset.single_le_sum (fun j (_ : j∈Finset.univ) => sq_nonneg ‖a j‖) |
| 239 | (Finset.mem_univ i)) h |
| 240 | exact norm_eq_zero.mp (by nlinarith [norm_nonneg (a i)]) |
| 241 | exact ⟨sub_eq_zero.mp (hx _ f hf),sub_eq_zero.mp (hx _ g hg)⟩ |
| 242 | end squares |
| 243 | end YM.AnalyticNext.ConnectedActivity.Aff |