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.Next.STATIONARY.Loops.Fourier |
| 2 | |
| 3 | set_option autoImplicit false |
| 4 | /-! |
| 5 | # Matrix analytic counting budgets. Plain-space versions (no `[Norm]` instance |
| 6 | on Matrix taken in use). Change of weights at either end via frames later. |
| 7 | -/ |
| 8 | set_option linter.unusedSectionVars false |
| 9 | noncomputable section |
| 10 | namespace YM.Stationary |
| 11 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset |
| 12 | open scoped Matrix Topology ContDiff BigOperators ComplexConjugate InnerProductSpace |
| 13 | variable {ι α β γ : Type} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] |
| 14 | [Fintype γ] [DecidableEq γ] {σ A C : ℝ} |
| 15 | |
| 16 | def slug (v : Phase α) := ‖(WithLp.toLp 2 v : EuclideanSpace ℂ α)‖ |
| 17 | open scoped Matrix.Norms.L2Operator in |
| 18 | def vflux (A : CompM α β) := ‖A‖ |
| 19 | |
| 20 | lemma slug_nonneg (v : Phase α) : 0≤slug v := norm_nonneg _ |
| 21 | lemma slug_sq (v : Phase α) : slug v^2=∑ i,‖v i‖^2 := EuclideanSpace.norm_sq_eq _ |
| 22 | lemma slug_star (v : Phase α) : slug (star v)=slug v := (sq_eq_sq₀ (slug_nonneg _) (slug_nonneg _)).1 (by rw [slug_sq,slug_sq]; simp) |
| 23 | lemma slug_zero : slug (0:Phase α)=0 := norm_zero |
| 24 | lemma slug_eq {p : Phase α} : slug p=0 ↔ p=0 := by unfold slug; simp |
| 25 | lemma slug_pos {v : Phase α} (h : v≠0) : 0<slug v := lt_of_le_of_ne (slug_nonneg _) (Ne.symm (slug_eq.not.mpr h)) |
| 26 | lemma slug_scale (a : ℂ) (v : Phase α) : slug (a • v)=‖a‖*slug v := by |
| 27 | unfold slug; rw [WithLp.toLp_smul,norm_smul] |
| 28 | lemma slug_plus (v w : Phase α) : slug (v+w) ≤ slug v+slug w := by unfold slug; rw [WithLp.toLp_add]; exact norm_add_le .. |
| 29 | lemma slug_neg (v : Phase α) : slug (-v)=slug v := by simpa using slug_scale (-1) v |
| 30 | lemma slug_inner (v w : Phase α) : @inner ℂ (EuclideanSpace ℂ α) _ (WithLp.toLp 2 v) (WithLp.toLp 2 w)=dotProduct (star v) w := by |
| 31 | change ∑ i,@inner ℂ ℂ _ (v i) (w i)=_; unfold dotProduct; apply sum_congr rfl; intro i _; exact mul_comm .. |
| 32 | lemma slug_dot (x y : Phase α) : ‖dotProduct x y‖ ≤ slug x*slug y := by |
| 33 | have h := norm_inner_le_norm (𝕜:=ℂ) (WithLp.toLp 2 (star x):EuclideanSpace ℂ α) (WithLp.toLp 2 y) |
| 34 | rw [slug_inner,star_star] at h |
| 35 | rw [← slug_star x]; exact h |
| 36 | lemma slug_self (x : Phase α) : dotProduct (star x) x=((slug x:ℝ)^2:ℝ) := by rw [← slug_inner,inner_self_eq_norm_sq_to_K]; push_cast; rfl |
| 37 | lemma slug_unit (a : α) : slug (Pi.single a (1:ℂ))=1 := by apply (sq_eq_sq₀ (slug_nonneg _) zero_le_one).1; rw [slug_sq,Finset.sum_eq_single a]; all_goals simp_all [Pi.single_apply] |
| 38 | lemma slug_atom (x : Phase α) (i) : ‖x i‖≤slug x := by |
| 39 | simpa only [slug_unit,one_mul,single_one_dotProduct] using slug_dot (Pi.single i 1) x |
| 40 | open scoped Matrix.Norms.L2Operator |
| 41 | |
| 42 | lemma flux_nonneg (X : CompM α β) : 0 ≤ vflux X := by unfold vflux; exact norm_nonneg _ |
| 43 | lemma flux_plus (X Y : CompM α β) : vflux (X+Y)≤ vflux X+vflux Y := by unfold vflux; exact norm_add_le .. |
| 44 | lemma flux_neg (X : CompM α β) : vflux (-X)=vflux X := by unfold vflux; exact norm_neg _ |
| 45 | lemma flux_sub (X Y : CompM α β) : vflux (X-Y)≤ vflux X+vflux Y := by rw [sub_eq_add_neg, ← flux_neg Y]; exact flux_plus .. |
| 46 | lemma flux_zero : vflux (0:CompM α β)=0 := by unfold vflux; exact norm_zero |
| 47 | lemma flux_cost (a : ℂ) (X : CompM α β) : vflux (a • X)=‖a‖*vflux X := by |
| 48 | unfold vflux; exact norm_smul .. |
| 49 | lemma flux_power (X : CompM α β) (Y : CompM β γ) : vflux (X*Y) ≤ vflux X*vflux Y := l2_opNorm_mul .. |
| 50 | lemma flux_test (X : CompM α β) (v : Phase β) : slug (X *ᵥ v) ≤ vflux X * slug v := l2_opNorm_mulVec X (WithLp.toLp 2 v) |
| 51 | |
| 52 | lemma flux_take (hp : 0≤A) (X : CompM α β) (h : ∀ i, slug (X *ᵥ i) ≤ A * slug i) : vflux X ≤ A := by |
| 53 | let L := ((Matrix.toEuclideanLin (𝕜:=ℂ) (m:=α) (n:=β)).trans LinearMap.toContinuousLinearMap) X |
| 54 | exact ContinuousLinearMap.opNorm_le_bound L hp (fun i => h i.ofLp) |
| 55 | |
| 56 | lemma flux_price {X : CompM α β} (hp : 0 ≤ A) (h : ∀ u v, ‖dotProduct u (X *ᵥ v)‖ ≤ A*slug u*slug v) : vflux X≤A := by |
| 57 | apply flux_take hp _ |
| 58 | intro v |
| 59 | let u := X *ᵥ v |
| 60 | rcases eq_or_ne u 0 with he|he |
| 61 | · rw [show X *ᵥ v=0 from he,slug_zero]; exact mul_nonneg hp (slug_nonneg _) |
| 62 | have hh := h (star u) v |
| 63 | change ‖dotProduct (star u) u‖ ≤ _ at hh; rw [slug_self,slug_star] at hh |
| 64 | simp only [Complex.norm_real,Real.norm_of_nonneg (sq_nonneg (slug u))] at hh |
| 65 | have hu := slug_pos he; nlinarith |
| 66 | |
| 67 | lemma flux_tester {X : CompM α β} (h : vflux X≤A) (v) : slug (X *ᵥ v) ≤ A*slug v := (flux_test ..).trans (mul_le_mul_of_nonneg_right h (slug_nonneg _)) |
| 68 | lemma flux_pay (X : CompM α β) (u v) : ‖dotProduct u (X *ᵥ v)‖ ≤ vflux X * slug u * slug v := by |
| 69 | rw [mul_comm (vflux X),mul_assoc]; exact (slug_dot ..).trans (mul_le_mul_of_nonneg_left (flux_test ..) (slug_nonneg _)) |
| 70 | lemma flux_one : vflux (1:CompM α α)≤1 := flux_take zero_le_one _ fun i => by simp |
| 71 | lemma flux_diagonal (x : Phase α) : vflux (Matrix.diagonal x)=‖x‖ := Matrix.l2_opNorm_diagonal x |
| 72 | lemma flux_tilt (X : CompM α β) (i j) : ‖X i j‖ ≤ vflux X := by |
| 73 | have he := flux_pay X (Pi.single i 1) (Pi.single j 1) |
| 74 | simpa [slug_unit,single_one_dotProduct,mulVec_single] using he |
| 75 | lemma star_limit (X : CompM α β) : vflux Xᴴ=vflux X := l2_opNorm_conjTranspose X |
| 76 | private lemma flux_back (X : CompM α β) : vflux Xᵀ ≤ vflux X := by |
| 77 | apply flux_price (flux_nonneg _); intro u v |
| 78 | rw [dotProduct_mulVec, Matrix.vecMul_transpose,dotProduct_comm]; exact (flux_pay X v u).trans_eq (mul_right_comm ..) |
| 79 | lemma back_flux (X : CompM α β) : vflux Xᵀ=vflux X := le_antisymm (flux_back _) (by simpa using flux_back Xᵀ) |
| 80 | lemma flux_trace (X : CompM α α) : ‖X.trace‖ ≤ (Fintype.card α) * vflux X := by |
| 81 | calc _ ≤ ∑ i, ‖X i i‖ := norm_sum_le .. |
| 82 | _ ≤ ∑ _ : α,vflux X := sum_le_sum fun _ _ => flux_tilt .. |
| 83 | _ = _ := by simp |
| 84 | end YM.Stationary |
| 85 | end |
| 86 | |
| 87 | /-! |
| 88 | # Normalized directions in dual-periodic films. Pull the reference gauge |
| 89 | frames at ANY complex momentum. Frames encode one-point positive-quadratic |
| 90 | cost per mode, not necessarily holomorphic itself (alias gauge norms vary |
| 91 | with real part of p). -/ |
| 92 | set_option linter.unusedSectionVars false |
| 93 | noncomputable section |
| 94 | namespace YM.Stationary |
| 95 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset |
| 96 | open scoped Matrix Topology ContDiff BigOperators ComplexConjugate InnerProductSpace |
| 97 | variable {ι α β γ : Type} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] |
| 98 | [Fintype γ] [DecidableEq γ] {σ A C : ℝ} |
| 99 | |
| 100 | -- normalization works by v=chart(p)*w, charge w. |
| 101 | structure Slab (α : Type) [Fintype α] [DecidableEq α] where |
| 102 | tile (p : Momentum) : CompM α α |
| 103 | whole (p) : IsUnit (tile p).det |
| 104 | |
| 105 | namespace Slab |
| 106 | def basic (α : Type) [Fintype α] [DecidableEq α] : Slab α where |
| 107 | tile _ := 1 |
| 108 | whole _ := by simp |
| 109 | def dual (T : Slab α) : Slab α where |
| 110 | tile p := ((T.tile (-p))ᵀ)⁻¹ |
| 111 | whole p := by rw [Matrix.det_nonsing_inv,det_transpose,Ring.inverse_eq_inv]; exact (T.whole _).inv |
| 112 | lemma tile_dual (P : Slab α) (p) : P.dual.tile (-p) = ((P.tile p)⁻¹)ᵀ := by rw [transpose_nonsing_inv]; simp [dual] |
| 113 | lemma inverse_dual (P : Slab α) (p) : (P.dual.tile p)⁻¹=(P.tile (-p))ᵀ := by simp [dual,nonsing_inv_nonsing_inv _ (show IsUnit ((tile P (-p))ᵀ).det by rw [det_transpose]; exact P.whole _)] |
| 114 | lemma retro (P : Slab α) : P.dual.dual=P := by |
| 115 | cases P with | mk A B => |
| 116 | unfold dual; congr 1; funext p; dsimp; rw [transpose_nonsing_inv, transpose_transpose, neg_neg]; exact nonsing_inv_nonsing_inv _ (B p) |
| 117 | end Slab |
| 118 | |
| 119 | variable (X : Slab α) (Y : Slab β) (Z : Slab γ) |
| 120 | |
| 121 | def carryM (p q : Momentum) (V : CompM α β) := (X.tile p)⁻¹ *V * Y.tile q |
| 122 | def serial (p q : Momentum) (V : CompM α β) (C : ℝ) := vflux (carryM X Y p q V)≤C |
| 123 | |
| 124 | variable {p q r : Momentum} |
| 125 | lemma carryM_join (U : CompM α β) (V : CompM β γ) : carryM X Z p q (U*V)=carryM X Y p r U * carryM Y Z r q V := by unfold carryM; simp only [Matrix.mul_assoc]; rw [← Matrix.mul_assoc (Y.tile _),mul_nonsing_inv (Y.tile _) (Y.whole _),Matrix.one_mul] |
| 126 | lemma carryM_back (p q : Momentum) (V : CompM α β) : carryM Y.dual X.dual (-q) (-p) Vᵀ=(carryM X Y p q V)ᵀ := by |
| 127 | unfold carryM; rw [transpose_mul,transpose_mul,X.tile_dual,Y.inverse_dual,neg_neg,Matrix.mul_assoc] |
| 128 | lemma carryM_back' (U : CompM α α) (p q) (Y : Slab α) : carryM Y X q p U⁻¹=(carryM X Y p q U)⁻¹ := by |
| 129 | unfold carryM; rw [Matrix.mul_inv_rev _,Matrix.mul_inv_rev _, Matrix.nonsing_inv_nonsing_inv (X.tile _) (X.whole _), ← Matrix.mul_assoc] |
| 130 | lemma carryM_unit {p} : carryM X X p p 1=1 := by unfold carryM; rw [mul_one,nonsing_inv_mul _ (X.whole _)] |
| 131 | lemma carryM_solid {P Q : Slab α} (V : CompM α α) {p q} : IsUnit (carryM P Q p q V).det ↔ IsUnit V.det := by |
| 132 | unfold carryM; rw [det_mul, det_mul] |
| 133 | have h : IsUnit ((P.tile p)⁻¹).det := by rw [Matrix.det_nonsing_inv,Ring.inverse_eq_inv]; exact (P.whole _).inv |
| 134 | simp only [IsUnit.mul_iff,Q.whole q, h, and_true,true_and] |
| 135 | lemma carryM_add (p q : Momentum) (U V : CompM α β) : carryM X Y p q (U+V) = carryM X Y p q U+carryM X Y p q V := by simp [carryM,Matrix.mul_add,Matrix.add_mul] |
| 136 | lemma carryM_sub (p q : Momentum) (U V : CompM α β) : carryM X Y p q (U-V) = carryM X Y p q U-carryM X Y p q V := by simp [carryM,Matrix.mul_sub,Matrix.sub_mul] |
| 137 | lemma carryM_neg (p q : Momentum) (V : CompM α β) : carryM X Y p q (-V) = - carryM X Y p q V := by simp [carryM,Matrix.mul_neg,Matrix.neg_mul] |
| 138 | lemma carryM_trace (p) (V : CompM α α) : V.trace=(carryM X X p p V).trace := by unfold carryM; rw [trace_mul_comm, ← mul_assoc, Matrix.mul_nonsing_inv _ (X.whole _),one_mul] |
| 139 | |
| 140 | namespace serial |
| 141 | variable {X Y Z} {U V : CompM α β} |
| 142 | lemma fence (h : serial X Y p q U C) : 0≤C := (flux_nonneg _).trans h |
| 143 | lemma mono (h : serial X Y p q U A) (hp : A≤C) : serial X Y p q U C := LE.le.trans h hp |
| 144 | lemma bond {W : CompM β γ} (h : serial X Y p q U A) (hp : serial Y Z q r W C) : serial X Z p r (U*W) (A*C) := by |
| 145 | unfold serial; rw [carryM_join _ Y (r:=q)]; exact (flux_power ..).trans (mul_le_mul h hp (flux_nonneg _) h.fence) |
| 146 | lemma plus (h : serial X Y p q U A) (hp : serial X Y p q V C) : serial X Y p q (U+V) (A+C) := by unfold serial; rw [carryM_add]; exact (flux_plus ..).trans (add_le_add h hp) |
| 147 | lemma sub (h : serial X Y p q U A) (hp : serial X Y p q V C) : serial X Y p q (U-V) (A+C) := by unfold serial; rw [carryM_sub]; exact (flux_sub ..).trans (add_le_add h hp) |
| 148 | lemma neg (h : serial X Y p q U C) : serial X Y p q (-U) C := by unfold serial; rw [carryM_neg,flux_neg]; exact h |
| 149 | lemma costs (h : serial X Y p q V C) (a : ℂ) : serial X Y p q (a • V) (‖a‖*C) := by |
| 150 | unfold serial carryM; rw [Matrix.mul_smul,Matrix.smul_mul,flux_cost]; exact mul_le_mul_of_nonneg_left h (norm_nonneg _) |
| 151 | lemma slide (h : serial X Y p q U C) : serial Y.dual X.dual (-q) (-p) Uᵀ C := by unfold serial; rw [carryM_back,back_flux]; exact h |
| 152 | lemma flat : serial X Y p q 0 0 := by simp [serial,carryM, Matrix.mul_zero,Matrix.zero_mul,flux_zero] |
| 153 | lemma free : serial X X p p 1 1 := by rw [serial,carryM_unit]; exact flux_one |
| 154 | lemma paid {U : CompM α α} (h : serial X X p p U C) : ‖U.trace‖ ≤ (Fintype.card α:ℝ)*C := by |
| 155 | rw [carryM_trace X p U]; exact (flux_trace ..).trans (mul_le_mul_of_nonneg_left h (Nat.cast_nonneg _)) |
| 156 | end serial |
| 157 | end YM.Stationary |
| 158 | end |
| 159 | |
| 160 | /-! |
| 161 | # Trace bills are not operator norm. Useful dual payer for `back` by difference & trip. -/ |
| 162 | set_option linter.unusedSectionVars false |
| 163 | noncomputable section |
| 164 | namespace YM.Stationary |
| 165 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset |
| 166 | open scoped Matrix Topology ContDiff BigOperators ComplexConjugate |
| 167 | variable {ι α β γ : Type} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] |
| 168 | [Fintype γ] [DecidableEq γ] {σ A C : ℝ} |
| 169 | |
| 170 | -- counting ideal |
| 171 | structure Doubly (U : CompM α β) (C : ℝ) : Prop where |
| 172 | credit : 0 ≤ C |
| 173 | cash (V : CompM β α) : ‖(U*V).trace‖ ≤ C*vflux V |
| 174 | namespace Doubly |
| 175 | variable {U V : CompM α β} |
| 176 | lemma credit2 (h : Doubly U A) (hk : A≤C) : Doubly U C := ⟨h.credit.trans hk,fun W => (h.cash W).trans (mul_le_mul_of_nonneg_right hk (flux_nonneg _))⟩ |
| 177 | lemma duet (h : Doubly U A) (he : Doubly V C) : Doubly (U+V) (A+C) := by |
| 178 | refine ⟨add_nonneg h.credit he.credit,fun W => ?_⟩ |
| 179 | rw [add_mul,Matrix.add_mul,trace_add]; exact (norm_add_le ..).trans (add_le_add (h.cash W) (he.cash W)) |
| 180 | lemma duet_neg (h : Doubly U C) : Doubly (-U) C := ⟨h.credit, fun V => by rw [Matrix.neg_mul,trace_neg,norm_neg]; exact h.cash V⟩ |
| 181 | lemma solo (x : ℂ) (h : Doubly U C) : Doubly (x • U) (‖x‖*C) := ⟨mul_nonneg (norm_nonneg _) h.credit,fun V => by rw [Matrix.smul_mul,trace_smul,norm_smul, mul_assoc]; exact mul_le_mul_of_nonneg_left (h.cash V) (norm_nonneg _)⟩ |
| 182 | lemma zero (h : 0≤C) : Doubly (0:CompM α β) C := ⟨h,fun V => by simp [Matrix.zero_mul,mul_nonneg h (flux_nonneg V)]⟩ |
| 183 | lemma duo (h : Doubly U A) {V : CompM β γ} (hp : vflux V≤C) : Doubly (U*V) (A*C) := by |
| 184 | refine ⟨mul_nonneg h.credit ((flux_nonneg _).trans hp),fun W => ?_⟩ |
| 185 | rw [Matrix.mul_assoc,mul_assoc]; exact (h.cash _).trans (mul_le_mul_of_nonneg_left ((flux_power ..).trans (mul_le_mul_of_nonneg_right hp (flux_nonneg _))) h.credit) |
| 186 | lemma duet_top (h : Doubly U A) {V : CompM γ α} (hp : vflux V ≤ C) : Doubly (V*U) (C*A) := by |
| 187 | refine ⟨mul_nonneg ((flux_nonneg _).trans hp) h.credit, fun W => ?_⟩ |
| 188 | rw [Matrix.mul_assoc,trace_mul_comm V, Matrix.mul_assoc, mul_comm C, mul_assoc, mul_comm C]; exact (h.cash _).trans (mul_le_mul_of_nonneg_left ((flux_power ..).trans (mul_le_mul_of_nonneg_left hp (flux_nonneg _))) h.credit) |
| 189 | lemma transpose (h : Doubly U C) : Doubly Uᵀ C := by |
| 190 | refine ⟨h.credit,fun V => ?_⟩ |
| 191 | rw [← Matrix.trace_transpose, transpose_mul, transpose_transpose, trace_mul_comm, ← back_flux V]; exact h.cash _ |
| 192 | lemma grouped (h : vflux U≤A) : Doubly U ((Fintype.card α:ℝ)*A) := by |
| 193 | refine ⟨mul_nonneg (Nat.cast_nonneg _) ((flux_nonneg _).trans h),fun V => (flux_trace ..).trans ?_⟩ |
| 194 | rw [mul_assoc]; exact mul_le_mul_of_nonneg_left ((flux_power ..).trans (mul_le_mul_of_nonneg_right h (flux_nonneg _))) (Nat.cast_nonneg _) |
| 195 | lemma diagram (x : Phase α) : Doubly (diagonal x) (∑ i,‖x i‖) := by |
| 196 | refine ⟨Finset.sum_nonneg (fun _ _ => norm_nonneg _),fun V => ?_⟩ |
| 197 | change ‖∑ i,(Matrix.diagonal x * V) i i‖≤_; rw [Finset.sum_mul] |
| 198 | apply (norm_sum_le ..).trans; apply sum_le_sum; intro i _; rw [Matrix.diagonal_mul, norm_mul]; exact mul_le_mul_of_nonneg_left (flux_tilt ..) (norm_nonneg _) |
| 199 | lemma budget {U : CompM α α} (h : Doubly U A) : ‖U.trace‖≤A := by |
| 200 | have hv := (h.cash 1).trans (mul_le_mul_of_nonneg_left flux_one h.credit) |
| 201 | simpa only [Matrix.mul_one, mul_one] using hv |
| 202 | end Doubly |
| 203 | |
| 204 | def bags (X : Slab α) (Y : Slab β) (p q : Momentum) (U : CompM α β) (C : ℝ) := Doubly (carryM X Y p q U) C |
| 205 | namespace bags |
| 206 | variable {p q r : Momentum} {X : Slab α} {Y : Slab β} {Z : Slab γ} {U V : CompM α β} |
| 207 | lemma credit (h : bags X Y p q U C) : 0≤C := Doubly.credit h |
| 208 | lemma mono (h : bags X Y p q U A) (hp : A ≤ C) : bags X Y p q U C := Doubly.credit2 h hp |
| 209 | lemma pay (h : bags X Y p q U A) {V : CompM β γ} (hp : serial Y Z q r V C) : bags X Z p r (U*V) (A*C) := by unfold bags; rw [carryM_join _ Y (r:=q)]; exact Doubly.duo h hp |
| 210 | lemma taken (h : bags X Y p q U A) {V : CompM γ α} (hp : serial Z X r p V C) : bags Z Y r q (V*U) (C*A) := by unfold bags; rw [carryM_join _ X (r:=p)]; exact Doubly.duet_top h hp |
| 211 | lemma plus (h : bags X Y p q U A) (he : bags X Y p q V C) : bags X Y p q (U+V) (A+C) := by unfold bags; rw [carryM_add]; exact Doubly.duet h he |
| 212 | lemma sale (h : bags X Y p q U A) : bags X Y p q (-U) A := by unfold bags; rw [carryM_neg]; exact Doubly.duet_neg h |
| 213 | lemma sub (h : bags X Y p q U A) (he : bags X Y p q V C) : bags X Y p q (U-V) (A+C) := by rw [sub_eq_add_neg]; exact h.plus he.sale |
| 214 | lemma billed (h : bags X Y p q U C) (a : ℂ) : bags X Y p q (a • U) (‖a‖*C) := by unfold bags carryM; rw [Matrix.mul_smul,Matrix.smul_mul]; exact Doubly.solo a h |
| 215 | lemma slide (h : bags X Y p q U C) : bags Y.dual X.dual (-q) (-p) Uᵀ C := by unfold bags; rw [carryM_back]; exact Doubly.transpose h |
| 216 | lemma envelope {U : CompM α α} (h : bags X X p p U C) : ‖U.trace‖≤C := by rw [carryM_trace X p U]; exact Doubly.budget h |
| 217 | lemma zero (h : 0≤C) : bags X Y p q 0 C := by unfold bags carryM; rw [Matrix.mul_zero, Matrix.zero_mul]; exact Doubly.zero h |
| 218 | lemma crew (h : serial X Y p q U C) : bags X Y p q U ((Fintype.card α:ℝ)*C) := Doubly.grouped h |
| 219 | |
| 220 | end bags |
| 221 | end YM.Stationary |
| 222 | end |
| 223 | |
| 224 | /-! |
| 225 | # Press uniform tilt / jet bills and their algebra |
| 226 | -/ |
| 227 | noncomputable section |
| 228 | namespace YM.Stationary |
| 229 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset |
| 230 | open scoped Matrix Topology ContDiff BigOperators |
| 231 | variable {ι α β γ : Type} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] |
| 232 | [Fintype γ] [DecidableEq γ] {σ η A B C D : ℝ} {p q r : Momentum} |
| 233 | |
| 234 | structure Charges (X : Slab α) (Y : Slab β) (F : Film ι α β) (σ C : ℝ) : Prop where |
| 235 | covered : Play F σ |
| 236 | base {p : Momentum} : p∈strip σ → serial X Y p p (F.tab p) C |
| 237 | detail (i) {p q : Momentum} : Avenue σ p q → serial X Y (q+p) q (F.spot i p q) C |
| 238 | stamp (i j) {p q r : Momentum} : Boulevard σ p q r → serial X Y (r+(p+q)) r (F.arch i j p q r) C |
| 239 | -- prove base credits via hσ. Composition accum. |
| 240 | |
| 241 | namespace Charges |
| 242 | variable {X : Slab α} {Y : Slab β} {Z : Slab γ} {F G : Film ι α β} |
| 243 | |
| 244 | lemma funds (h : Charges X Y F σ C) (hp : 0<σ) : 0≤C := (h.base (p:=0) (Work.F07.realStrip σ hp (by simp))).fence |
| 245 | lemma mono (h : Charges X Y F σ A) (hp : η≤σ) (he : A≤C) : Charges X Y F η C := |
| 246 | ⟨h.covered.mono hp, fun w => (h.base (fun j => (w j).trans_le hp)).mono he, |
| 247 | fun i _ _ w => (h.detail i (w.part hp)).mono he, fun i j _ _ _ w => (h.stamp i j (w.costs hp)).mono he⟩ |
| 248 | lemma current {K : Momentum → CompM α β} (hk : Poster σ K) (H : 0≤C) (h : ∀ p ∈ strip σ, serial X Y p p (K p) C) : Charges X Y (Film.cardF (ι:=ι) K) σ C := |
| 249 | ⟨Play.current hk, fun w => h _ w, fun i _ _ w => serial.flat.mono H, fun i j _ _ _ w => serial.flat.mono H⟩ |
| 250 | lemma weight (h : Charges X Y F σ C) (c : ℂ) : Charges X Y (F.weight c) σ (‖c‖*C) := |
| 251 | ⟨h.covered.weight c,fun w => (h.base w).costs c, fun i _ _ w => (h.detail i w).costs c, fun i j _ _ _ w => (h.stamp i j w).costs c⟩ |
| 252 | lemma plus (h : Charges X Y F σ A) (he : Charges X Y G σ C) : Charges X Y (F.plus G) σ (A+C) := |
| 253 | ⟨h.covered.plus he.covered, fun w => (h.base w).plus (he.base w), fun i _ _ w => (h.detail i w).plus (he.detail i w),fun i j _ _ _ w => (h.stamp i j w).plus (he.stamp i j w)⟩ |
| 254 | lemma rear (h : Charges X Y F σ C) : Charges Y.dual X.dual F.rear σ C := by |
| 255 | refine ⟨h.covered.rear, fun w => ?_,fun i p q w => ?_,fun i j p q r w => ?_⟩ |
| 256 | · simpa only [neg_neg,Film.rear] using (h.base (negResident w)).slide |
| 257 | · have he := (h.detail i w.late).slide; rw [neg_neg,show -(-(q+p)+p)=q by abel] at he; exact he |
| 258 | have hp := (h.stamp i j w.ebb).slide; rw [neg_neg,show -(-(r+(p+q))+(p+q))=r by abel] at hp; exact hp |
| 259 | lemma pay (h : Charges X Y F σ A) {G : Film ι β γ} (hp : Charges Y Z G σ C) (hσ : 0<σ) : Charges X Z (F.pay G) σ (4*A*C) := by |
| 260 | have ha := h.funds hσ |
| 261 | have he := hp.funds hσ |
| 262 | refine ⟨h.covered.pay hp.covered,fun w => ((h.base w).bond (hp.base w)).mono (by nlinarith), fun i p q w => ?_,fun i j p q r w => ?_⟩ |
| 263 | · exact (((h.detail i w).bond (hp.base w.basic)).plus ((h.base w.added).bond (hp.detail i w))).mono (by nlinarith) |
| 264 | have h1 := (h.detail j w.roads).bond (hp.detail i w.oneWay) |
| 265 | have h2 := (h.detail i w.proceed).bond (hp.detail j w.second) |
| 266 | rw [add_assoc] at h1; rw [add_right_comm,add_assoc] at h2 |
| 267 | exact (((((h.stamp i j w).bond (hp.base w.oneWay.basic)).plus h1).plus h2).plus ((h.base w.total).bond (hp.stamp i j w))).mono (by linarith) |
| 268 | end Charges |
| 269 | |
| 270 | structure Freezer (X Y : Slab α) (K : Momentum → CompM α α) (σ C : ℝ) : Prop where |
| 271 | period : ∀ p∈ strip σ, IsUnit (K p).det |
| 272 | price : ∀ p∈ strip σ, serial Y X p p (K p)⁻¹ C |
| 273 | |
| 274 | namespace Freezer |
| 275 | variable {X Y : Slab α} {F : Film ι α α} |
| 276 | lemma mono {K : Momentum→CompM α α} (h : Freezer X Y K σ A) (hp : η≤σ) (he : A≤C) : Freezer X Y K η C := |
| 277 | ⟨fun p w => h.period p (fun i => (w i).trans_le hp), fun p w => (h.price p (fun i => (w i).trans_le hp)).mono he⟩ |
| 278 | lemma back (h : Charges X Y F σ A) (hp : Freezer X Y F.tab σ C) (hσ : 0<σ) : |
| 279 | Charges Y X F.back σ (C+C*A*C+(C*A*C*A+C*A*C*A+C*A)*C) := by |
| 280 | have he : ∀ p∈ strip σ, serial Y X p p (F.coupon p) C := hp.price |
| 281 | have hu := h.funds hσ |
| 282 | have hv := serial.fence (he (0:Momentum) (Work.F07.realStrip _ hσ (by simp))) |
| 283 | have hx := mul_nonneg hv hu |
| 284 | have hl := mul_nonneg hx hv; have hi := mul_nonneg hl hu |
| 285 | have hw := mul_nonneg (add_nonneg (add_nonneg hi hi) hx) hv |
| 286 | have hh i {p q} (w : Avenue σ p q) : serial Y X (q+p) q (F.vSpot i p q) (C*A*C) := (((he _ w.added).bond (h.detail i w)).bond (he _ w.basic)).neg |
| 287 | refine ⟨h.covered.back hp.period,fun w => (hp.price _ w).mono (by linarith), fun i p q w => (hh i w).mono (by linarith),fun i j p q r w=> ?_⟩ |
| 288 | have h1 := (hh j w.roads).bond (h.detail i w.oneWay) |
| 289 | have h2 := (hh i w.proceed).bond (h.detail j w.second) |
| 290 | rw [add_assoc] at h1; rw [add_right_comm,add_assoc] at h2 |
| 291 | exact (serial.neg ((((h1.plus h2).plus ((he _ w.total).bond (h.stamp i j w))).bond (he _ w.oneWay.basic)))).mono (by linarith) |
| 292 | |
| 293 | lemma figure (h : Charges X Y F σ A) (hp : Freezer X Y F.tab σ C) (hs : 0<σ) (i j) : |
| 294 | Firm (σ/2) ((Fintype.card α:ℝ)*(C*A+C*A*C*A)) (starTrack (F.figure i j)) := by |
| 295 | have he : ∀ p∈ strip σ, serial Y X p p (F.coupon p) C := hp.price |
| 296 | refine highlights (h.covered.estate hs hp.period i j) (by positivity) fun p hx q hz => ?_ |
| 297 | have H {p q r : Momentum} (w : Boulevard σ p q r) : serial Y Y (r+(p+q)) r (F.framePay i j p q r) (C*A+C*A*C*A) := by |
| 298 | have hu := h.detail i w.proceed; rw [add_right_comm,add_assoc] at hu |
| 299 | exact ((he _ w.total).bond (h.stamp i j w)).sub ((((he _ w.total).bond hu).bond (he _ w.second.added)).bond (h.detail j w.second)) |
| 300 | have he := H (duo _ _ hs hx hz); rw [neg_add_cancel,add_zero] at he; exact he.paid |
| 301 | end Freezer |
| 302 | end YM.Stationary |
| 303 | end |
| 304 | |
| 305 | /-! |
| 306 | # Two trace-log models. SUP right-charge on one inserted l1-column |
| 307 | factor; no trace leading in L^4 because a `bags` input is spent each time. |
| 308 | Endpoint weights arbitrary. Uses a finite number of insertions, tolerance |
| 309 | A,P pre-L usable with different F/G by taking max. -/ |
| 310 | noncomputable section |
| 311 | namespace YM.Stationary |
| 312 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset |
| 313 | open scoped Matrix Topology ContDiff BigOperators |
| 314 | variable {ι α β γ : Type} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] |
| 315 | [Fintype γ] [DecidableEq γ] {σ η A B C D E : ℝ} |
| 316 | |
| 317 | namespace bags |
| 318 | variable {X : Slab α} {Y : Slab β} {Z : Slab γ} {U U' : CompM α β} {V V' : CompM β γ} |
| 319 | lemma gap {p q r} (h : bags X Y p q (U-U') A) (hp : serial X Y p q U' B) (hv : serial Y Z q r V C) (he : bags Y Z q r (V-V') D) : |
| 320 | bags X Z p r (U*V-U'*V') (A*C+B*D) := by |
| 321 | have hz := (h.pay hv).plus (he.taken hp) |
| 322 | simpa only [Matrix.sub_mul,Matrix.mul_sub, sub_add_sub_cancel] using hz |
| 323 | lemma wallet {X Z : Slab α} {U V : CompM α α} (hu : IsUnit U.det) (hv : IsUnit V.det) {p q} |
| 324 | (hp : bags X Z p q (U-V) C) (he : serial Z X q p U⁻¹ B) (hr : serial Z X q p V⁻¹ D) : bags Z X q p (U⁻¹-V⁻¹) (B*C*D) := by |
| 325 | rw [show U⁻¹-V⁻¹= -(U⁻¹*(U-V)*V⁻¹) by rw [Matrix.mul_sub,Matrix.nonsing_inv_mul U hu,Matrix.sub_mul,one_mul,Matrix.mul_assoc,Matrix.mul_nonsing_inv V hv,mul_one,neg_sub]] |
| 326 | exact ((hp.taken he).pay hr).sale |
| 327 | lemma compose {p q} {U V M N : CompM α β} (h : bags X Y p q (U-V) C) (hp : bags X Y p q (M-N) D) : |
| 328 | bags X Y p q ((U-M)-(V-N)) (C+D) := by rw [show U-M-(V-N)=U-V-(M-N) by abel]; exact h.sub hp |
| 329 | end bags |
| 330 | |
| 331 | /-! `Small` ONLY DIFFERENCE. det/precision matrices also have Charges. |
| 332 | Full trace may need second budget ~L^4. -/ |
| 333 | structure Ledger (X : Slab α) (Y : Slab β) (F : Film ι α β) (σ C : ℝ) : Prop where |
| 334 | charge {p} (w : p∈strip σ) : bags X Y p p (F.tab p) C |
| 335 | feat (i) {p q} (w : Avenue σ p q) : bags X Y (q+p) q (F.spot i p q) C |
| 336 | dues (i j) {p q r} (w : Boulevard σ p q r) : bags X Y (r+(p+q)) r (F.arch i j p q r) C |
| 337 | |
| 338 | def outstanding (F G : Film ι α β) := F.plus (G.weight (-1)) |
| 339 | lemma ledger_cmp {X Y : Slab α} {F G : Film ι α α} (h : Charges X Y F σ A) (hp : Charges X Y G σ A) (he : Freezer X Y F.tab σ C) (hr : Freezer X Y G.tab σ C) (hs : 0<σ) |
| 340 | (hv : Ledger X Y (outstanding F G) σ B) (i j) : |
| 341 | let D := C*B*C |
| 342 | let E := D*A+C*B |
| 343 | Firm (σ/2) (E+((E*C+C*A*D)*A + C*A*C*B)) (starTrack fun p q => F.figure i j p q-G.figure i j p q) := by |
| 344 | intro D E |
| 345 | have hx := h.covered.estate hs he.period i j; have hy := hp.covered.estate hs hr.period i j |
| 346 | refine highlights ⟨fun w v => (hx.eligible w v).sub (hy.eligible w v),fun ha hc w v => congr_arg₂ (·-·) (hx.rolls ha hc w v) (hy.rolls ha hc w v)⟩ (by positivity) fun p hw q hK => ?_ |
| 347 | have HM {p : Momentum} (w : p∈ strip σ) : bags Y X p p (F.coupon p-G.coupon p) D := by |
| 348 | refine bags.wallet (he.period _ w) (hr.period _ w) ?_ (he.price _ w) (hr.price _ w) |
| 349 | simpa [outstanding,Film.plus,Film.weight, sub_eq_add_neg] using hv.charge w |
| 350 | have H {p q r : Momentum} (w : Boulevard σ p q r) : bags Y Y (r+(p+q)) r (F.framePay i j p q r - G.framePay i j p q r) (E+((E*C+C*A*D)*A + C*A*C*B)) := by |
| 351 | have hs : serial Y X (r+(p+q)) (r+(p+q)) (G.coupon _) C := hr.price _ w.total |
| 352 | have hx := hp.detail i w.proceed |
| 353 | have hF := h.detail i w.proceed |
| 354 | have hb : bags X Y (r+(p+q)) r (F.arch i j p q r-G.arch i j p q r) B := by simpa [outstanding,Film.plus,Film.weight,sub_eq_add_neg] using hv.dues i j w |
| 355 | refine bags.compose (bags.gap (HM w.total) hs (h.stamp i j w) hb) ?_ |
| 356 | have hL : bags X Y (r+q+p) (r+q) (F.spot i p (r+q)-G.spot i p (r+q)) B := by simpa [outstanding,Film.plus,Film.weight,sub_eq_add_neg] using hv.feat i w.proceed |
| 357 | have hb : bags X Y (r+q) r (F.spot j q r-G.spot j q r) B := by simpa [outstanding,Film.plus,Film.weight,sub_eq_add_neg] using hv.feat j w.second |
| 358 | rw [add_right_comm,add_assoc] at hx hF hL |
| 359 | have hR := hs.bond hx |
| 360 | exact (((bags.gap (HM w.total) hs hF hL).gap hR (he.price _ w.second.added) (HM w.second.added)).gap (hR.bond (hr.price _ w.second.added)) (h.detail j w.second) hb) |
| 361 | have ha := H (duo _ _ hs hw hK); rw [neg_add_cancel,add_zero] at ha |
| 362 | unfold Film.figure; rw [← trace_sub]; exact ha.envelope |
| 363 | end YM.Stationary |
| 364 | end |