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.Bid.Kitchen |
| 2 | import YM.Next.STATIONARY.Block.Static |
| 3 | import YM.Next.STATIONARY.Shape.SoftTransfers |
| 4 | import YM.Work.A05 |
| 5 | import YM.Work.B18 |
| 6 | |
| 7 | |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | /-! |
| 11 | # Unit and linear phase profiles paid for. `Extension` facts local to |
| 12 | this L and Φ. Budgets at kicks use normed (whole view) not localized |
| 13 | matrix on torus. |
| 14 | -/ |
| 15 | noncomputable section |
| 16 | namespace YM.Stationary |
| 17 | open Function Filter Lattice RG Audience Exterior Precision Bloch Wilson Laurent Matrix Finset |
| 18 | open scoped Topology ContDiff BigOperators |
| 19 | variable {α β : Type} [Fintype α] [Fintype β] {c f L : Side} {A : Audience α} {G : Gauge} {P : Patch} {C D σ : ℝ} {m n : ℕ} {p : Momentum} {S : StepData c f} |
| 20 | section g |
| 21 | -- scalar Cast line |
| 22 | |
| 23 | def arranging (P : Patch) (v z : Phase (Loc G 1)) (x y : Phase (ParcelG G P.L)) : Phase (Acts G P) := Sum.elim v (Sum.elim x (Sum.elim y z)) |
| 24 | lemma arc_high (v z : Phase (Loc G 1)) (x y : Phase (ParcelG G P.L)) (b : Bool) : arranging P v z x y∘highVoice G P b= if b then z else v := by cases b <;> rfl |
| 25 | lemma arc_low (v z : Phase (Loc G 1)) (x y : Phase (ParcelG G P.L)) (b : Bool) : arranging P v z x y∘footVoice G P b= if b then y else x := by cases b <;> rfl |
| 26 | -- fine background template Φ test at q; Kinematics use μ epilogue. |
| 27 | abbrev Bridge (G : Gauge) (P : Patch) := Momentum→CompM (Co P.L (Loc G 1)) (Loc G 1) |
| 28 | def arriving (Φ : Bridge G P) (p : Momentum) : Phase (Loc G 1) →ₗ[ℂ] Phase (Acts G P) where |
| 29 | toFun v := arranging P v 0 (Sum.elim (Φ p *ᵥ v) 0) 0 |
| 30 | map_add' u v := by funext x; simp only [Matrix.mulVec_add]; rcases x with x|((x|x)|(x|x)) <;> simp [arranging] |
| 31 | map_smul' a b := by funext x; simp only [Matrix.mulVec_smul, RingHom.id_apply]; rcases x with x|((x|x)|(x|x)) <;> simp [arranging] |
| 32 | |
| 33 | def arrives (Φ : Bridge G P) (u : Loc G 1) (p) := arriving Φ p (Pi.single u 1) |
| 34 | def visibly (P : Patch) (b : Bool) : Phase (ParcelG G P.L) →ₗ[ℂ] Phase (Acts G P) where |
| 35 | toFun v := if b then arranging _ 0 0 0 v else arranging _ 0 0 v 0 |
| 36 | map_add' u v := by funext x; cases b <;> rcases x with x | (x|(x|x)) <;> simp [arranging] |
| 37 | map_smul' u v := by funext x; cases b <;> rcases x with x | (x|(x|x)) <;> simp [arranging] |
| 38 | |
| 39 | def velvetX (P : Patch) : Phase (Loc G 1)→ₗ[ℂ] Phase (Acts G P) where |
| 40 | toFun v := arranging P 0 v 0 0 |
| 41 | map_add' u v := by funext x; rcases x with x | (x|(x|x)) <;> simp [arranging] |
| 42 | map_smul' u v := by funext x; rcases x with x | (x|(x|x)) <;> simp [arranging] |
| 43 | end g |
| 44 | variable {Φ : Bridge G P} |
| 45 | |
| 46 | lemma store_mono {x : Phase (Acts G P)} (h : Veil C x n) (p : C≤D) : Veil D x n := ⟨h.grade,fun v => (h.fine v).more (mul_le_mul_of_nonneg_left p (inch_pos _).le),fun v => (h.skins v).trans p,fun v => (h.bonds v).trans p⟩ |
| 47 | lemma zeroPocket {f : Phase (Co L α)} (hv : f=0) (C : ℝ) (hc : 0≤C) : Hearing (balcony (Site L)) n (roster f) C := by |
| 48 | apply Hearing.sup hc; intro i; rw [hv]; simpa only [show roster (0:Phase (Co L α)) i=0 from rfl, norm_zero] using hc |
| 49 | lemma ratePocket [DecidableEq α] {p : Momentum} {f : Phase (Co L α)} (h : p∈strip (1:ℝ)) (hv : (altarTile L α).rate p f≤1) : Hearing (balcony (Site L)) 1 (roster f) (inch L * Real.exp 4) := by |
| 50 | let X := altarTile L α |
| 51 | have he : slug f ≤ Real.exp 4*(inch L)⁻¹ := by |
| 52 | have hp := Slab.serial_at (cruise p h) f; rw [Slab.basic_rate,one_mulVec,one_mul] at hp |
| 53 | exact hp.trans ((mul_le_mul_of_nonneg_left hv (by positivity [inch_pos L])).trans_eq (mul_one _)) |
| 54 | refine ⟨by positivity [inch_pos L],by omega,fun _ => ?_, by omega⟩ |
| 55 | have hB := pow_le_pow_left₀ (slug_nonneg _) he 2 |
| 56 | have hx : (balcony (Site L)).weightedSum (fun i => ‖roster f i‖^2)= (L.val:ℝ)^((-4):ℤ)*slug f^2 := by |
| 57 | rw [slug_slots]; unfold Audience.weightedSum; rw [Finset.mul_sum]; apply sum_congr rfl; intro i _ |
| 58 | change (Fintype.card (Site L):ℝ)⁻¹ * _= _; rw [site_card]; push_cast; norm_num; rfl |
| 59 | rw [hx]; apply (mul_le_mul_of_nonneg_left hB (by positivity)).trans |
| 60 | unfold inch; simp; field_simp; exact le_rfl |
| 61 | lemma seen_affect {x : Phase (ParcelG G P.L)} (b : Bool) (h : p∈strip (1:ℝ)) (he : (slabW G P.L).rate p x≤1) : Veil (Real.exp 4) (visibly P b x) 1 := by |
| 62 | classical |
| 63 | let y := x ∘ Sum.inl; let z := x ∘ Sum.inr |
| 64 | have hx : (altarTile P.L (Loc G 1)).rate p y≤1 := by |
| 65 | have hi := Slab.serial_at (q:=p) (serial_butt (altarTile P.L (Loc G 1)) (Slab.basic (Loc G 0))) x |
| 66 | rw [sliceX,one_mul] at hi; exact hi.trans he |
| 67 | have hz : slug z ≤ Real.exp 4 := by |
| 68 | have hi := Slab.serial_at (q:=p) (serial_brim (altarTile P.L (Loc G 1)) (Slab.basic (Loc G 0))) x |
| 69 | rw [sliceY, Slab.basic_rate,one_mul] at hi; exact hi.trans (he.trans (Real.one_le_exp (by norm_num))) |
| 70 | have hp : 0 ≤ inch P.L * Real.exp 4 := by positivity [inch_pos P.L] |
| 71 | refine ⟨le_rfl,fun i => ?_,fun i => ?_,fun i => ?_⟩ |
| 72 | · cases i <;> cases b <;> first | exact zeroPocket rfl _ hp | exact ratePocket h hx |
| 73 | · cases i <;> cases b <;> first | exact hz | exact (Eq.trans_le (slug_zero (α:=Loc G 0)) (Real.exp_pos 4).le) |
| 74 | cases i <;> cases b <;> exact (Eq.trans_le (slug_zero (α:=Loc G 1)) (Real.exp_pos 4).le) |
| 75 | lemma seen_oath {u : Phase (Loc G 1)} (he : slug u ≤ 1) (hk : n ≤ 1) : Veil 1 (velvetX P u) n := by |
| 76 | refine ⟨hk,fun i => ?_,fun i => ?_,fun i => ?_⟩ |
| 77 | · cases i <;> exact zeroPocket rfl _ (mul_nonneg (inch_pos P.L).le zero_le_one) |
| 78 | · cases i <;> exact Eq.trans_le (slug_zero (α:=Loc G 0)) zero_le_one |
| 79 | cases i |
| 80 | · exact Eq.trans_le (slug_zero (α:=Loc G 1)) zero_le_one |
| 81 | exact he |
| 82 | -- cast data bends. Narrow API on Φ unit-amplitude. |
| 83 | def Ties (Φ : Bridge G P) (σ C : ℝ) := ∀ p∈ strip σ, ∀ v : Loc G 1, ∀ i, ‖roster (Φ p *ᵥ Pi.single v 1) i‖ ≤ inch P.L*C |
| 84 | lemma bends_affect (hz : 1 ≤ C) (h : Ties Φ σ C) (hp : p∈strip σ) (i : Loc G 1) : Veil C (arrives Φ i p) 0 := by |
| 85 | have he := h p hp i |
| 86 | have ht : 0≤ C := zero_le_one.trans hz |
| 87 | have hv := mul_nonneg (inch_pos P.L).le ht |
| 88 | refine ⟨by decide,fun a => ?_,fun a => ?_,fun a => ?_⟩ |
| 89 | · cases a |
| 90 | · exact Hearing.sup hv he |
| 91 | exact zeroPocket rfl _ hv |
| 92 | · cases a <;> exact Eq.trans_le (slug_zero (α:=Loc G 0)) ht |
| 93 | cases a |
| 94 | · exact Eq.trans_le (slug_unit i) hz |
| 95 | exact Eq.trans_le (slug_zero (α:=Loc G 1)) ht |
| 96 | end YM.Stationary |
| 97 | end |
| 98 | |
| 99 | /-! |
| 100 | # Shim lenses for scalar vertices. No ℓ¹ over rough aliases. Location |
| 101 | uses cell flux and orientation picked by lift; imaginary kicks allowed up to |
| 102 | σ/L at S terms. `flot` charges ACTUAL kernel locations. -/ |
| 103 | noncomputable section |
| 104 | namespace YM.Stationary |
| 105 | open Function Filter Lattice RG Exterior Precision Wilson Bloch Laurent Matrix Finset Tree Asymptotics Audience |
| 106 | open scoped Topology ContDiff BigOperators |
| 107 | variable {α ι G' : Type} [Fintype α] [DecidableEq α] {G : Gauge} {t n : ℕ} {c f m L : Side} {p : Momentum} {σ C : ℝ} |
| 108 | |
| 109 | section flot |
| 110 | variable (l : Stitch t) (k : Tailor t→ℂ) (b : Breed t α) (p : Breed t Momentum) |
| 111 | |
| 112 | def flotilla (x : Tailor t) (v : Breed t (Phase (Co L α))) := |
| 113 | ∑ z : Site L,(∏ i, scrap (p i) (flight (p i) (l i) (v i)) (lift z+legLane x i) (b i))*k x |
| 114 | |
| 115 | def flot (v : Breed t (Phase (Co L α))) := ∑' x, flotilla l k b p x v |
| 116 | |
| 117 | lemma flot_signal (he : Width σ C k) (hw : 0≤σ) (g : Ratio c f) {q : Breed t (Site c)} (h : ∀ i, rolls (mon (q i)) (p i)) (v : Breed t (Phase (Co g.count α))) : |
| 118 | pinRing l k b f (fun i => poured g (q i) (v i))= if ∑ i,q i=0 then (Fintype.card (Site c):ℂ)*flot l k b p v else 0 := by |
| 119 | rw [pinRing_on _ _ _ he hw] |
| 120 | let M (z : Tailor t) := ∑ x : Site f,pinion l k b z x (fun i => poured g (q i) (v i)) |
| 121 | have ht z : M z=(∑ x, cell (∑ i,q i) x)*flotilla l k b p z v := by |
| 122 | unfold M flotilla |
| 123 | rw [← Equiv.sum_comp (Equiv.ofBijective g.assemble g.assemble_bijective), sum_mul,Fintype.sum_prod_type]; apply sum_congr rfl; intro x _; rw [mul_sum]; apply sum_congr rfl; intro y _ |
| 124 | rw [pinion_eval]; change (∏ i,swingD (l i) _ (g.assemble (x,y)+wrap f (legLane z i),b i))*_=_ |
| 125 | have he (i) : g.assemble (x,y)+wrap f (legLane z i)=wrap f (lift y+legLane z i)+g.embed x := by rw [map_add]; unfold Ratio.assemble; abel |
| 126 | simp_rw [he,flight_price g _ (h _),Finset.prod_mul_distrib]; rw [cell_prod_hymn,mul_assoc] |
| 127 | change ∑' z,M z=_ |
| 128 | simp_rw [ht,tsum_mul_left]; split |
| 129 | next hz => rw [hz]; simp [cell]; rfl |
| 130 | next hz => rw [sum_cell hz,zero_mul] |
| 131 | |
| 132 | lemma flot_tides {r : Breed t Momentum} (h : ∀ i, rolls (p i) (r i)) (v : Breed t (Phase (Co L α))) : flot l k b p v=flot l k b r v := by |
| 133 | unfold flot flotilla; simp_rw [scrap_reset (h _), flight_reset (h _)] |
| 134 | end flot |
| 135 | section costs |
| 136 | variable {p : Momentum} {R : ℝ} |
| 137 | |
| 138 | lemma rot_seat {f : Site L → ℂ} (a : Site L) (he : Hearing (balcony _) n f C) : Hearing (balcony _) n (fun i => f (i+a)) C := |
| 139 | ⟨he.cap,fun p i=> he.all p _,fun p => ((Equiv.sum_comp (Equiv.addRight a) _).trans_le (he.ample p)), fun p => ((Equiv.sum_comp (Equiv.addRight a) _).trans_le (he.enough p))⟩ |
| 140 | lemma invoice (u : Phase (Co L α)) (x : Cover) (i : α) (he : Hearing (balcony _) n (fun j : Site L => u (j,i)) R) |
| 141 | (hs : 0<σ) (h : p∈strip σ) : Hearing (balcony _) n (fun a : Site L => scrap p u (lift a+x) i) (Real.exp (σ*(8+inch L*Laurent.size x))* R) := by |
| 142 | have hv := rot_seat (wrap L x) he |
| 143 | apply hv.grows _ (by positivity); intro a; rw [scrap,norm_mul,map_add,wrap_lift] |
| 144 | refine mul_le_mul_of_nonneg_right ((reward _ _ σ (fun i => (h i).le)).trans ?_) (norm_nonneg _) |
| 145 | apply Real.exp_monotone; apply mul_le_mul_of_nonneg_left _ hs.le |
| 146 | apply (rent_cost ..).trans |
| 147 | have ht : (Laurent.size (lift a+x):ℝ) ≤ Laurent.size (lift a)+(Laurent.size x:ℝ) := by exact_mod_cast Laurent.size_add (lift a) x |
| 148 | have hi := inch_pos L; nlinarith only [plank_charge L a, ht,hi] |
| 149 | -- ℓ^k weights used for mixed internal derivatives. t external, T shell. |
| 150 | lemma Hearing.stockpile [Fintype ι] {A : Audience ι} (s : Finset G') (f : G'→ι→ℂ) {C : G'→ℝ} {x : G'→ℕ} |
| 151 | (h : ∀ i∈s,Hearing A (x i) (f i) (C i)) : Hearing A (∑ i∈s,x i) (fun v => ∏ i∈s,f i v) (∏ i∈s,C i) := by |
| 152 | classical induction s using Finset.induction with |
| 153 | | empty => simpa using Hearing.sup (A:=A) (f:=fun _=>(1:ℂ)) (n:=0) (C:=1) zero_le_one (by simp) |
| 154 | | insert i s he ih => simp_rw [sum_insert he,prod_insert he]; exact Hearing.multiplied (f:=f i) (fun j => (norm_mul ..).le) (h i (by simp)) (ih fun j hj => h _ (by simp [hj])) |
| 155 | |
| 156 | lemma yarn (x : Tailor t) : ∑ i, Laurent.size (legLane x i)=Laurent.size x := by |
| 157 | unfold Laurent.size legLane |
| 158 | rw [Fin.sum_univ_succ,Fintype.sum_prod_type]; simp only [Fin.cons_zero,Fin.cons_succ,Pi.zero_apply, Int.natAbs_zero,sum_const_zero,zero_add] |
| 159 | |
| 160 | variable (l : Stitch t) (k : Tailor t→ℂ) (b : Breed t α) (p : Breed t Momentum) |
| 161 | |
| 162 | def robinTax (σ : ℝ) (t : ℕ) := Real.exp (σ*((t+1)*8)) |
| 163 | lemma flot_cash (hs : 0<σ) (hw : ∀ i,p i∈strip σ) (v : Breed t (Phase (Co L α))) (R : Breed t ℝ) {n : Breed t ℕ} |
| 164 | (hp : ∀ i,Hearing (balcony _) (n i) (fun j : Site L => flight (p i) (l i) (v i) (j,b i)) (R i)) (hv : ∑ i,n i ≤2) |
| 165 | (z : Tailor t) : ‖flotilla l k b p z v‖≤((L.val:ℝ)^4*((∏ i,R i)*robinTax σ t))*(Real.exp (inch L*σ*Laurent.size z)*‖k z‖) := by |
| 166 | let U (i : Fin (t+1)) (j : Site L) := scrap (p i) (flight (p i) (l i) (v i)) (lift j + legLane z i) (b i) |
| 167 | have hy i : Hearing (balcony (Site L)) (n i) (U i) _ := invoice (flight (p i) (l i) (v i)) (legLane z i) (b i) (hp i) hs (hw i) |
| 168 | have ht := (Hearing.stockpile univ U (fun i _ => hy i)).rasp hv |
| 169 | have hx : ∑ j : Site L, ‖∏ i,U i j‖ ≤ (L.val:ℝ)^4*((∏ i,R i)*robinTax σ t)*Real.exp (inch L*σ*Laurent.size z) := by |
| 170 | unfold Audience.weightedSum balcony at ht |
| 171 | simp_rw [site_card, Nat.cast_pow,inv_mul_eq_div] at ht |
| 172 | rw [← sum_div] at ht |
| 173 | replace ht := (div_le_iff₀ (by positivity)).1 ht |
| 174 | refine ht.trans_eq ?_ |
| 175 | symm; unfold robinTax |
| 176 | rw [prod_mul_distrib, ← Real.exp_sum,_root_.mul_assoc ((L.val:ℝ)^4), _root_.mul_assoc, ← Real.exp_add, ← mul_sum] |
| 177 | have he : (∑ i,(8+inch L* Laurent.size (legLane z i):ℝ))=((t+1:ℝ)*8+inch L*Laurent.size z) := by |
| 178 | rw [sum_add_distrib,← mul_sum, ← Nat.cast_sum, yarn]; simp |
| 179 | rw [he]; ring_nf |
| 180 | unfold flotilla; rw [← Finset.sum_mul,norm_mul]; exact (mul_le_mul_of_nonneg_right ((norm_sum_le ..).trans hx) (norm_nonneg _)).trans_eq (by ring) |
| 181 | end costs |
| 182 | end YM.Stationary |
| 183 | end |
| 184 | |
| 185 | /-! # Flight circulation. -/ |
| 186 | noncomputable section |
| 187 | namespace YM.Stationary |
| 188 | open Function Filter Metric Lattice RG Exterior Precision Wilson Bloch Laurent Matrix Finset Tree Asymptotics Audience |
| 189 | open scoped Topology ContDiff BigOperators |
| 190 | variable {α ι G' : Type} [Fintype α] [DecidableEq α] {G : Gauge} {t n : ℕ} {c f m L : Side} {p : Momentum} {σ C : ℝ} |
| 191 | |
| 192 | section rec |
| 193 | variable (l : Stitch t) (k : Tailor t→ℂ) (b : Breed t α) |
| 194 | variable (p : Breed t Momentum) |
| 195 | |
| 196 | def soaring (z : Tailor t) : RecordM ℂ (Fin (t+1)) (Co L α) := ∑ i : Site L, (MultilinearMap.mkPiRing ℂ (Fin (t+1)) (k z)).compLinearMap (fun j => LinearMap.proj (i,b j) ∘ₗ twitches (p j) (legLane z j) ∘ₗ flight (p j) (l j)) |
| 197 | def steerRec : RecordM ℂ (Fin (t+1)) (Co L α) := flyRec (soaring l k b p) |
| 198 | lemma soaring_eval (v : Breed t (Phase (Co L α))) (z) : soaring l k b p z v=flotilla l k b p z v := by |
| 199 | rw [soaring,_root_.sum_apply]; rfl |
| 200 | lemma flot_worth (hc : Width (inch L*σ) C k) (hs : 0<σ) (hw : ∀ i,p i∈strip σ) |
| 201 | (u : Breed t (Phase (Co L α))) (R : Breed t ℝ) {n : Breed t ℕ} |
| 202 | (hp : ∀ i,Hearing (balcony _) (n i) (fun j : Site L => flight (p i) (l i) (u i) (j,b i)) (R i)) (hv : ∑ i,n i ≤2) : |
| 203 | ‖flot l k b p u‖ ≤ ((L.val:ℝ)^4*((∏ i,R i)*robinTax σ t))*C := by |
| 204 | let V : ℝ := (L.val:ℝ)^4*((∏ i,R i)*robinTax σ t) |
| 205 | have he : 0 ≤ V := by unfold V robinTax; apply mul_nonneg (by positivity); exact mul_nonneg (prod_nonneg fun i _ => (hp i).cap) (by positivity) |
| 206 | have hh x := flot_cash l k b p hs hw u R hp hv x |
| 207 | have H := Summable.of_nonneg_of_le (fun i => norm_nonneg _) hh (hc.2.1.mul_left V) |
| 208 | refine (norm_tsum_le_tsum_norm H).trans ((H.tsum_le_tsum hh (hc.2.1.mul_left V)).trans ?_) |
| 209 | rw [tsum_mul_left]; exact mul_le_mul_of_nonneg_left hc.2.2 he |
| 210 | lemma steerRec_rec (h : Width (inch L*σ) C k) (hs : 0<σ) (hw : ∀ i,p i∈strip σ) (u : Breed t (Phase (Co L α))) : steerRec (L:=L) l k b p u=flot l k b p u := by |
| 211 | have hV (v : Breed t (Phase (Co L α))) : Summable (fun i=>soaring l k b p i v) := by |
| 212 | let R (j : Fin (t+1)) := ‖flight (p j) (l j) (v j)‖ |
| 213 | have hh j : Hearing (balcony _) 0 (fun i : Site L => flight (p j) (l j) (v j) (i,b j)) (R j) := Hearing.sup (norm_nonneg _) (fun i => norm_le_pi_norm _ _) |
| 214 | simp_rw [soaring_eval]; exact Summable.of_norm_bounded (h.2.1.mul_left _) (flot_cash _ _ _ _ hs hw _ R hh (by simp)) |
| 215 | rw [steerRec,flyRec_recites _ hV]; simp_rw [soaring_eval]; rfl |
| 216 | end rec |
| 217 | section bill |
| 218 | variable (l : Stitch t) (k : Tailor t→ℂ) (b : Breed t α) |
| 219 | private lemma flairs (s : List Axis) : Differentiable ℂ (fun x : Momentum × Phase (Co L α) => flight x.1 s x.2) := by |
| 220 | apply differentiable_pi.mpr; intro i |
| 221 | induction s generalizing i with |
| 222 | | nil => change Differentiable ℂ (fun x : Momentum × Phase (Co L α) => x.2 i); fun_prop |
| 223 | | cons j s ih => |
| 224 | let F := fun x : Momentum × Phase (Co L α) => flight x.1 s x.2 |
| 225 | change Differentiable ℂ (fun x => scrap _ (F x) (lift i.1+step j) i.2 - F x i) |
| 226 | unfold scrap; apply (Differentiable.mul ?_ (ih _)).sub (ih i); unfold mode; fun_prop |
| 227 | private lemma flairs_pin (v : Fin (t+1)) : Differentiable ℂ (fun x : (Breed t Momentum) × (Breed t (Phase (Co L α))) => flight (x.1 v) (l v) (x.2 v)) := (flairs (α:=α) (L:=L) (l v)).comp (show Differentiable ℂ (fun x : Breed t Momentum × Breed t (Phase (Co L α)) => (x.1 v,x.2 v)) by fun_prop) |
| 228 | |
| 229 | private lemma localDifP {X : Type} [NormedAddCommGroup X] [NormedSpace ℂ X] {G : Type} {s : Finset G} {f : G → X→ℂ} |
| 230 | (h : ∀ i∈s,Differentiable ℂ (f i)) : Differentiable ℂ (fun x=>∏ i∈s,f i x) := by |
| 231 | classical induction s using Finset.induction with |
| 232 | | empty => simp [differentiable_const] |
| 233 | | insert i s he ih => simp_rw [prod_insert he]; exact Differentiable.mul (h i (by simp)) (ih fun j hj => h j (by simp [hj])) |
| 234 | |
| 235 | private lemma billboard (z) : Differentiable ℂ (fun x : (Breed t Momentum) × (Breed t (Phase (Co L α))) => flotilla l k b x.1 z x.2) := by |
| 236 | unfold flotilla; apply Differentiable.fun_sum; intro i _; apply Differentiable.mul_const; apply localDifP; intro j _ |
| 237 | unfold scrap; apply (show Differentiable ℂ (fun x : (Breed t Momentum) × Breed t (Phase (Co L α)) => mode (x.1 j) (rent L (lift i+legLane z j))) by unfold mode; fun_prop).mul; exact differentiable_pi.mp (flairs_pin l j) _ |
| 238 | set_option maxHeartbeats 430000 in |
| 239 | lemma flot_bill (hs : 0<σ) (hw : Width (inch L*σ) C k) (x : (Breed t Momentum) × (Breed t (Phase (Co L α)))) (hv : ∀ i,x.1 i ∈ strip σ) : |
| 240 | DifferentiableAt ℂ (fun p : (Breed t Momentum) × (Breed t (Phase (Co L α))) => flot l k b p.1 p.2) x := by |
| 241 | let V (y : (Breed t Momentum) × (Breed t (Phase (Co L α)))) i := ‖flight (y.1 i) (l i) (y.2 i)‖ |
| 242 | let R (i) := V x i +1 |
| 243 | have hh : ∀ᶠ y in 𝓝 x,∀ i, V y i<R i ∧ y.1 i∈strip σ := by |
| 244 | apply eventually_all.mpr; intro i |
| 245 | have hg : ContinuousAt (fun y => V y i) x := (flairs_pin (α:=α) (L:=L) l i).continuous.norm.continuousAt |
| 246 | exact (hg.tendsto.eventually (gt_mem_nhds (show V x i<R i by unfold R; linarith))).and |
| 247 | ((show Continuous (fun y : (Breed t Momentum) × (Breed t (Phase (Co L α)))=> y.1 i) by fun_prop).continuousAt.tendsto.eventually ((Work.F07.stripOpen σ).mem_nhds (hv i))) |
| 248 | obtain ⟨r,hr,H⟩ := Metric.mem_nhds_iff.mp (show {y | ∀ i,V y i<R i ∧ y.1 i∈strip σ}∈𝓝 x from hh) |
| 249 | refine (Work.F02.analytic_series (x:=x) (fun i (p : Breed t Momentum × Breed t (Phase (Co L α))) => flotilla l k b p.1 i p.2) hr (fun i=> billboard l k b i) (hw.2.1.mul_left ((L.val:ℝ)^4*((∏ j,R j)*robinTax σ t))) ?_).differentiableAt |
| 250 | intro i y hy |
| 251 | have he : ∀ j,V y j<R j ∧ y.1 j∈strip σ := H hy |
| 252 | have hb j : Hearing (balcony _) 0 (fun i : Site L => flight (y.1 j) (l j) (y.2 j) (i,b j)) (R j) := Hearing.sup ((show 0≤ V y j from norm_nonneg _).trans (he j).1.le) fun i => (norm_le_pi_norm _ _).trans (he j).1.le |
| 253 | exact flot_cash l k b y.1 hs (fun j => (he j).2) y.2 R hb (by simp) i |
| 254 | end bill |
| 255 | end YM.Stationary |
| 256 | end |
| 257 | |
| 258 | /-! # Stitch receipts to the mesh. Derivative rank on scalar after evaluating f. -/ |
| 259 | noncomputable section |
| 260 | namespace YM.Stationary |
| 261 | open Function Filter Lattice RG Exterior Precision Wilson Bloch Laurent Matrix Finset Tree Asymptotics Audience |
| 262 | open scoped Topology ContDiff BigOperators |
| 263 | variable {α ι G' : Type} [Fintype α] [DecidableEq α] [Fintype ι] {G : Gauge} {t n : ℕ} {c f m L : Side} {p : Momentum} {σ C A : ℝ} |
| 264 | |
| 265 | section feature |
| 266 | abbrev Needle (ι α : Type) (t : ℕ) := Breed t α → ι → Tailor t → ℂ |
| 267 | variable (l : ι → Stitch t) (F : Needle ι α t) |
| 268 | |
| 269 | def tunnels (p : Breed t Momentum) : RecordM ℂ (Fin (t+1)) (Co L α) := ∑ j : Breed t α, ∑ i:ι, steerRec (l i) (F j i) j p |
| 270 | |
| 271 | def Dai (σ C : ℝ) := ∀ i j,Width σ C (F i j) |
| 272 | |
| 273 | lemma tunnels_green (h : Dai F (inch L*σ) C) (hw : 0<σ) {p : Breed t Momentum} (hv : ∀ i,p i∈strip σ) (v : Breed t (Phase (Co L α))) : |
| 274 | tunnels l F p v=∑ j : Breed t α, ∑ i : ι, flot (l i) (F j i) j p v := by |
| 275 | unfold tunnels; simp_rw [_root_.sum_apply, steerRec_rec _ _ _ _ (h _ _) hw hv] |
| 276 | lemma tunnels_bill (h : Dai F (inch L*σ) C) (hs : 0<σ) (x : (Breed t Momentum) × (Breed t (Phase (Co L α)))) (hx : ∀ i, x.1 i∈strip σ) : |
| 277 | DifferentiableAt ℂ (fun x : (Breed t Momentum) × (Breed t (Phase (Co L α))) => tunnels l F x.1 x.2) x := by |
| 278 | have he : ∀ᶠ y in 𝓝 x,∀ i,y.1 i∈strip σ := eventually_all.mpr fun i => |
| 279 | (show Continuous (fun y : (Breed t Momentum) × (Breed t (Phase (Co L α))) => y.1 i) by fun_prop).continuousAt.tendsto.eventually ((Work.F07.stripOpen σ).mem_nhds (hx i)) |
| 280 | refine DifferentiableAt.congr_of_eventuallyEq (DifferentiableAt.fun_sum (u:=univ) (fun i _ => DifferentiableAt.fun_sum (u:=univ) (fun j _=> flot_bill (l j) _ i hs (h i j) x hx))) ?_ |
| 281 | filter_upwards [he] with y hy; exact tunnels_green _ _ h hs hy _ |
| 282 | lemma tunnels_twist {p r : Breed t Momentum} (h : ∀ i,rolls (p i) (r i)) : tunnels l F p=(tunnels l F r : RecordM ℂ (Fin (t+1)) (Co L α)) := by |
| 283 | unfold tunnels steerRec |
| 284 | refine sum_congr rfl fun b _ => sum_congr rfl fun j _ => ?_ |
| 285 | apply congr_arg (flyRec (α:=Co L α)); funext z |
| 286 | apply MultilinearMap.ext; intro v |
| 287 | rw [soaring_eval,soaring_eval]; unfold flotilla; simp_rw [scrap_reset (h _),flight_reset (h _)] |
| 288 | lemma tunnels_book (h : Dai F (inch L*σ) C) (hs : 0<σ) {p : Breed t Momentum} (hw : ∀ i,p i∈strip σ) (u : Breed t (Phase (Co L α))) (R : ι→Breed t ℝ) {n : Breed t ℕ} |
| 289 | (hp : ∀ a i j,Hearing (balcony _) (n i) (fun z : Site L => flight (p i) (l a i) (u i) (z,j)) (R a i)) |
| 290 | (hv : ∑ i,n i ≤2) (hg : 0≤ C) (hr : ∀ a, (L.val:ℝ)^4*(∏ i,R a i) ≤ A) : |
| 291 | ‖tunnels l F p u‖ ≤ ((Fintype.card (Breed t α):ℝ)*Fintype.card ι*robinTax σ t)*A*C := by |
| 292 | rw [tunnels_green l F h hs hw]; refine (norm_sum_le ..).trans ?_ |
| 293 | rw [show ((Fintype.card (Breed t α):ℝ)*Fintype.card ι*robinTax σ t)*A*C= ∑ _ : Breed t α, ∑ _ : ι,A*robinTax σ t*C by simp; ring] |
| 294 | refine sum_le_sum fun j _ => (norm_sum_le ..).trans (sum_le_sum fun i _ => ?_) |
| 295 | refine (flot_worth (l i) (F j i) j _ (h j i) hs hw _ _ (fun k=>hp i k (j k)) hv).trans ?_; rw [← mul_assoc]; exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right (hr i) (Real.exp_pos _).le) hg |
| 296 | end feature |
| 297 | section fine |
| 298 | variable {F : Needle ι (Loc G 1) t} {l : ι → Stitch t} |
| 299 | |
| 300 | def Cargo (l : ι → Stitch t) (F : Needle ι (Loc G 1) t) (f : Link G m →ℝ) := noteAt f (t+1)=∑ j,∑ i,pinRing (l i) (F j i) j m |
| 301 | |
| 302 | def Spool (Q : Picture G t) (l : ι → Stitch t) (F : Needle ι (Loc G 1) t) := ∀ a b p,star p=p → Q a b p=∑ i,factorRay (l i) (F (fun i => (b i,a i)) i) p |
| 303 | |
| 304 | lemma spooling {Q : Picture G t} {f : Link G m→ℝ} (hs : 0<σ) (hp : Spool Q l F) (h : Dai F σ C) (he : Recorded Q f 0) : Cargo l F f := by |
| 305 | apply relay_ext; intro p; let i := fun j=> (p j).2.2; let b := fun j=> (p j).2.1; let x := Prod.fst ∘ p |
| 306 | rw [show (fun j => relay (p j).1 (p j).2)=glyph x i b from rfl, (record_exact ..).1 he x i b]; unfold glyph collected |
| 307 | let a (k : Fin (t+1)) := (b k,i k) |
| 308 | simp_rw [_root_.sum_apply,pinRing_rec _ _ _ (h _ _) hs.le]; split |
| 309 | next hz => rw [hp _ _ _ (out_real x), mul_sum, Finset.sum_eq_single a] |
| 310 | · simp [a,hz] |
| 311 | · intro v hv hy; simp_rw [if_neg (show ¬ (v = (fun i' => (b i',i i')) ∧ ∑ j,x j=0) from fun hc => hy hc.1)]; simp |
| 312 | simp |
| 313 | next hz => simp [hz] |
| 314 | |
| 315 | -- per-cell, full (all internal aliases) |
| 316 | lemma cargo_tick (g : Ratio c f) {U : Link G f→ℝ} (h : Dai F (inch g.count *σ) C) (he : Cargo l F U) {q : Breed t (Site c)} {p : Breed t Momentum} (hr : ∀ i, rolls (mon (q i)) (p i)) (hs : 0<σ) (v : Breed t (Phase (Co g.count (Loc G 1)))) : |
| 317 | noteAt U (t+1) (fun i => poured g (q i) (v i)) = if ∑ i,q i=0 then (Fintype.card (Site c):ℂ)*tunnels l F p v else 0 := by |
| 318 | have hx i : star (p i)=p i := by obtain ⟨a,ha⟩ := hr i; rw [ha,star_add,real_frequency]; congr 1; ext1 j; simp [reciprocal] |
| 319 | have hp : ∀ i,p i∈strip σ := fun i => Work.F07.realStrip _ hs (hx _) |
| 320 | have hz : 0 < inch g.count *σ := mul_pos (inch_pos _) hs |
| 321 | unfold Cargo at he; rw [he,tunnels_green _ _ h hs hp]; simp_rw [_root_.sum_apply, flot_signal _ _ _ _ (h _ _) hz.le g hr]; split <;> next hh=> simp [hh, Finset.mul_sum] |
| 322 | end fine |
| 323 | end YM.Stationary |
| 324 | end |
| 325 | |
| 326 | /-! |
| 327 | # Choice over sting placements preserving number of difference payments |
| 328 | on independent slots. B for tags may be empty too. -/ |
| 329 | noncomputable section |
| 330 | namespace YM.Stationary |
| 331 | open Function Filter Lattice RG Exterior Precision Wilson Bloch Laurent Matrix Finset Tree Asymptotics Audience |
| 332 | open scoped Topology ContDiff BigOperators |
| 333 | variable {α ι : Type} [Fintype α] [DecidableEq α] {G : Gauge} {t n : ℕ} {c f m L : Side} {p : Momentum} {σ C A : ℝ} |
| 334 | |
| 335 | abbrev Ports (t n : ℕ) := Fin n→Keys t |
| 336 | |
| 337 | def tabsZ {α : Type} [DecidableEq α] (a : List (α × Axis)) (i : α) := (a.filter (fun j => j.1=i)).map (Prod.snd) |
| 338 | |
| 339 | def roller (r : Fin n→Fin (t+1)) (x : Ports t n) : Stitch t := tabsZ ((List.finRange n).map (fun i => (r i,(x i).2))) |
| 340 | def winglet (t n : ℕ) (x : Ports t n) := roller (fun i => (x i).1.succ) x |
| 341 | |
| 342 | theorem tabsZ_pay (P : α→Momentum) (a : List (α × Axis)) : ∏ i : α,sparksZ (P i) (tabsZ a i)=(a.map fun j=> Exterior.q (P j.1) j.2).prod := by |
| 343 | induction a with |
| 344 | | nil => simp [tabsZ,sparksZ] |
| 345 | | cons j a ih => |
| 346 | conv_rhs => rw [List.map_cons,List.prod_cons,← ih] |
| 347 | rw [show Exterior.q (P j.1) j.2=(∏ v : α,(if j.1=v then Exterior.q (P j.1) j.2 else 1)) by simp,← prod_mul_distrib]; apply prod_congr rfl; intro i _ |
| 348 | by_cases he : j.1=i <;> simp [tabsZ,he] |
| 349 | |
| 350 | theorem wing_factor (r : Fin n→Fin (t+1)) (x : Ports t n) (P : Breed t Momentum) : ∏ j,sparksZ (P j) (roller r x j)=∏ j,Exterior.q (P (r j)) (x j).2 := by |
| 351 | rw [roller,tabsZ_pay,Fin.prod_univ_def]; rw [List.map_map]; rfl |
| 352 | private lemma tabsZ_size (a : List (α × Axis)) : ∑ i : α, (tabsZ a i).length=a.length := by |
| 353 | induction a with |
| 354 | | nil => simp [tabsZ] |
| 355 | | cons j s ih => |
| 356 | calc |
| 357 | _ = ∑ i : α, ((tabsZ s i).length+ if j.1=i then 1 else 0) := sum_congr rfl fun i _ => by by_cases h : j.1=i <;> simp [tabsZ,h] |
| 358 | _ = _ := by simp [sum_add_distrib,ih] |
| 359 | lemma roller_extent (r : Fin n→Fin (t+1)) (x : Ports t n) : ∑ j,(roller r x j).length=n := by rw [roller,tabsZ_size]; simp |
| 360 | lemma winglet_port (x : Ports t n) : winglet t n x 0=[] := by |
| 361 | unfold winglet roller tabsZ; simp |
| 362 | lemma roller_ge {t n : ℕ} (r : Fin n → Fin (t+1)) (x : Ports t n) (i) : (roller r x i).length ≤ n := |
| 363 | (single_le_sum (s:=univ) (f:=fun i => _) (fun i _ => Nat.zero_le (roller r x i).length) (mem_univ i)).trans_eq (roller_extent r x) |
| 364 | |
| 365 | lemma winding (t n : ℕ) (hs : 0<σ) : ∃ η C,0<η ∧ 0≤C ∧ ∀ (A : ℝ),0≤A → ∀ (F : Picture G t), |
| 366 | (∀ i j, Firm σ A (F i j) ∧ Rays n (F i j ∘ axes)) → ∃ k : Needle (Ports t n) (Loc G 1) t, Dai k η (A*C) ∧ Spool F (winglet t n) k := by |
| 367 | obtain ⟨η,K,hτ,_,hK,h⟩ := transfers n t hs |
| 368 | refine ⟨η,K,hτ,hK,fun A hA F hF => ?_⟩ |
| 369 | choose k he ht using fun i j => h A hA _ (hF i j).1 (hF i j).2 |
| 370 | refine ⟨fun i => k (Prod.snd ∘ i) (Prod.fst ∘ i),fun i j => he _ _ _,fun i j p hP => ?_⟩ |
| 371 | rw [ht i j p (Work.F07.realStrip _ hτ hP)] |
| 372 | apply sum_congr rfl; intro b _; unfold factorRay; rw [winglet,wing_factor]; rfl |
| 373 | |
| 374 | lemma windTwin (n : ℕ) (r : Fin n→Fin 2) (hs : 0<σ) : ∃ η K,0<η ∧ 0≤K ∧ ∀ (A : ℝ), 0 ≤ A → ∀ F : Picture G 1, |
| 375 | (∀ i j, Firm σ A (F i j) ∧ Rays n (F i j ∘ axes)) → ∃ k : Needle (Ports 1 n) (Loc G 1) 1, Dai k η (A*K) ∧ Spool F (roller r) k := by |
| 376 | obtain ⟨η,K,hτ,_,hK,h⟩ := twin_layers n r hs |
| 377 | refine ⟨η,K,hτ,hK,fun A hA F hF => ?_⟩ |
| 378 | choose k he ht using fun i j => h A hA _ (hF i j).1 (hF i j).2 |
| 379 | refine ⟨fun i => k (Prod.snd ∘ i) (Prod.fst ∘ i),fun i j => he _ _ _,fun i j p hP => ?_⟩ |
| 380 | rw [ht i j p (Work.F07.realStrip _ hτ hP)] |
| 381 | apply sum_congr rfl; intro b _; unfold factorRay; rw [wing_factor]; rfl |
| 382 | end YM.Stationary |
| 383 | end |