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.FrameEst.Center |
| 2 | |
| 3 | set_option autoImplicit false |
| 4 | /-! # Principal floor. Uniform discrete window via Jordan & small band. |
| 5 | Mean and frame offset projection used only IN Nave real slice. -/ |
| 6 | noncomputable section |
| 7 | namespace YM.Stationary |
| 8 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset Complex |
| 9 | open scoped Matrix Topology ContDiff BigOperators ComplexConjugate |
| 10 | variable {P : Patch} {L c f : Side} {p q k : Momentum} |
| 11 | |
| 12 | private theorem minimal_rep (h : Odd L.val) (t : ZMod L.val) : -(↑(L.val/2):ℤ) ≤ t.valMinAbs ∧ t.valMinAbs ≤ (L.val/2:ℕ) := by |
| 13 | obtain ⟨j,hj⟩ := h |
| 14 | have he := ZMod.valMinAbs_mem_Ioc t; simp only [Set.mem_Ioc] at he; omega |
| 15 | lemma min_abs_for (h : Odd L.val) (a : ℤ) (hx : -(↑(L.val/2):ℤ) ≤ a ∧ a≤(L.val/2:ℕ)) : ZMod.valMinAbs (a:ZMod L.val)=a := by |
| 16 | obtain ⟨i,hi⟩ := h; apply (ZMod.valMinAbs_spec _ _).2 |
| 17 | exact ⟨rfl,by simp only [Set.mem_Ioc]; omega⟩ |
| 18 | |
| 19 | -- `pulse1` average over centered L positions. Bound at principal using |
| 20 | -- just the real part; end-to-end connector sum = rephase of same average. |
| 21 | |
| 22 | def pulse1 (L : Side) (k : ℂ) := (inch L:ℂ) * ∑ i : ZMod L.val, exp (I*(k*i.valMinAbs)) |
| 23 | lemma cons_pulse (L : Side) (p : Momentum) : (inch L:ℂ)^4 *∑ z : Site L,mode p (lift z)=∏ j, pulse1 L (p j) := by |
| 24 | simp only [pulse1, prod_mul_distrib, Fintype.prod_sum]; congr 1 |
| 25 | · simp [Axis] |
| 26 | apply sum_congr rfl; intro z _; unfold mode; rw [Finset.mul_sum,Complex.exp_sum]; rfl |
| 27 | lemma pulse_lower (h : Odd L.val) (he : star k=k) (i : Axis) (hp : |(k i).re|≤Real.pi*inch L) : 1/16≤ ‖pulse1 L (k i)‖ := by |
| 28 | let xi := (k i).re |
| 29 | let V z := Real.cos (xi*(z:ZMod L.val).valMinAbs) |
| 30 | have hw z : k i*((z:ZMod L.val).valMinAbs)=↑(xi*(z:ZMod L.val).valMinAbs:ℝ) := by push_cast; rw [show (xi:ℂ)=k i from strip_unit he i] |
| 31 | have hv : (pulse1 L (k i)).re = inch L * ∑ z,V z := by |
| 32 | simp only [pulse1,hw,Complex.mul_re, ofReal_re, re_sum, ofReal_im,zero_mul,sub_zero]; congr 2 |
| 33 | funext j; rw [mul_comm I]; rw [Complex.exp_mul_I,← Complex.ofReal_cos, ← Complex.ofReal_sin]; simp only [add_re,ofReal_re,mul_I_re,ofReal_im,neg_zero,add_zero]; rfl |
| 34 | refine le_trans (b:=(pulse1 L (k i)).re) ?_ (le_trans (le_abs_self _) (abs_re_le_norm _)) |
| 35 | rw [hv] |
| 36 | have hj (z : ℤ) (p : 0≤z ∧ z < (L.val/4:ℕ) +1) : (z:ZMod L.val).valMinAbs=z := min_abs_for h _ (by omega) |
| 37 | have hl (a : ZMod L.val) : 0≤V a := by |
| 38 | have hk := minimal_rep (L:=L) h a |
| 39 | have hc : |xi*a.valMinAbs| ≤ Real.pi/2 := by |
| 40 | rw [abs_mul]; calc |
| 41 | _ ≤ (Real.pi*inch L)*(L.val/2:ℝ) := by |
| 42 | have hh : (|((a.valMinAbs : ℤ):ℝ)|)*2 ≤ L.val := by rw [← Int.cast_abs]; exact_mod_cast (show |a.valMinAbs| *2≤(L.val:ℤ) by rw [← Int.natCast_natAbs]; omega) |
| 43 | exact mul_le_mul hp (by linarith) (abs_nonneg _) (mul_nonneg Real.pi_pos.le (inch_pos _).le) |
| 44 | _ = _ := by rw [mul_assoc Real.pi]; have hh := inch_unit L; rw [← mul_div_assoc, hh]; ring |
| 45 | exact Real.cos_nonneg_of_mem_Icc (abs_le.mp hc) |
| 46 | let j : Fin (L.val / 4 + 1) ↪ ZMod L.val := ⟨fun i => (i.val:ZMod L.val),fun a b he => Fin.ext (by |
| 47 | have hi := hj (a.val:ℤ) (by omega); have hh := hj (b.val:ℤ) (by omega); rw [Int.cast_natCast, show (a.val:ZMod L.val)= b.val from he] at hi; rw [Int.cast_natCast] at hh; exact_mod_cast (hi.symm.trans hh))⟩ |
| 48 | have hm (a) : (1/2:ℝ) ≤ V (j a) := by |
| 49 | have hi := hj (a.val:ℤ) (by omega); rw [Int.cast_natCast] at hi |
| 50 | have hx : (↑a.val:ℝ)*4≤L.val := by exact_mod_cast (show a.val*4 ≤ L.val by omega) |
| 51 | unfold V |
| 52 | rw [show ZMod.valMinAbs (j a)=_ from hi,Int.cast_natCast] |
| 53 | let s := xi*(a.val:ℝ) |
| 54 | have he : |s|≤Real.pi/3 := by |
| 55 | unfold s; rw [abs_mul,abs_of_nonneg (a:=(a.val:ℝ)) (Nat.cast_nonneg _)] |
| 56 | calc |
| 57 | _ ≤ (Real.pi*inch L)*(L.val/4:ℝ) := mul_le_mul hp (by linarith) (Nat.cast_nonneg _) (mul_nonneg Real.pi_pos.le (inch_pos _).le) |
| 58 | _ ≤ _ := by rw [mul_assoc Real.pi, ← mul_div_assoc, inch_unit]; linarith [Real.pi_pos] |
| 59 | rw [← Real.cos_pi_div_three]; change Real.cos (Real.pi/3) ≤ Real.cos s |
| 60 | rw [← Real.cos_abs s]; |
| 61 | exact Real.cos_le_cos_of_nonneg_of_le_pi (abs_nonneg s) (by linarith [Real.pi_pos]) he |
| 62 | apply le_trans _ (mul_le_mul_of_nonneg_left (Finset.sum_le_sum_of_subset_of_nonneg (show univ.map j ⊆ univ from Finset.subset_univ _) (fun a _ _ => hl a)) (inch_pos L).le) |
| 63 | rw [Finset.sum_map] |
| 64 | have HX : ∑ _ : Fin (L.val/4+1),(1/2:ℝ) ≤ ∑ i : Fin (L.val/4+1), V (j i) := Finset.sum_le_sum fun i _ => hm i |
| 65 | apply le_trans _ (mul_le_mul_of_nonneg_left HX (inch_pos L).le) |
| 66 | simp only [Finset.sum_const,card_univ,Fintype.card_fin,nsmul_eq_mul]; |
| 67 | have HY : (L.val:ℝ) ≤ 4 * (↑(L.val/4+1):ℝ) := by exact_mod_cast (show L.val≤4*(L.val/4+1) by omega) |
| 68 | nlinarith only [HY,inch_unit L,inch_pos L] |
| 69 | |
| 70 | def rollMean (P : Patch) (k : Momentum) := ∑ a : P.Points,(P.weight a:ℂ)*mode k a.val |
| 71 | def limitMean (J : ℕ) := (((1/16:ℝ))^4)^J |
| 72 | lemma limitMean_pos (J : ℕ) : 0<limitMean J := by unfold limitMean; positivity |
| 73 | lemma preview_coord (h : Nave p) (L : Side) (a : Axis) : |(aliasAt p (0:Site L) a).re| ≤ Real.pi*inch L := by |
| 74 | rw [alias_re]; simp only [show lift (0:Site L) a=0 by simp [Lattice.lift],Int.cast_zero,mul_zero,add_zero]; rw [abs_mul,abs_of_pos (inch_pos L),mul_comm Real.pi]; exact mul_le_mul_of_nonneg_left (h a) (inch_pos _).le |
| 75 | lemma roll_strict (h : Nave p) (he : star p=p) : limitMean P.J ≤ ‖rollMean P (aliasAt p (0:Site P.L))‖ := by |
| 76 | let k := aliasAt p (0:Site P.L) |
| 77 | unfold rollMean limitMean; rw [lottery_exp,cons_pulse, norm_pow,norm_prod]; apply pow_le_pow_left₀ (by positivity) |
| 78 | calc |
| 79 | _ = ∏ _ : Axis,(1/16:ℝ) := by simp |
| 80 | _ ≤ _ := Finset.prod_le_prod (fun _ _ => by positivity) (fun i _ => pulse_lower P.odd_side (k:=k) (by unfold k; rw [← alias_conj,he]) i (preview_coord h P.L i)) |
| 81 | |
| 82 | lemma connector_strict (h : Nave p) (he : star p=p) (l : Axis) : (1/16:ℝ)*P.L.val ≤ ‖∑ i : Fin P.L.val,mode (aliasAt p (0:Site P.L)) (i.val • step l)‖ := by |
| 83 | let L := P.L |
| 84 | let k := aliasAt p (0:Site L) |
| 85 | have hk : star k=k := by unfold k; rw [← alias_conj,he] |
| 86 | let n := L.val/2 |
| 87 | let z (i : Fin L.val) : ℤ := (i.val:ℤ)-n |
| 88 | let f (i : Fin L.val) : ZMod L.val := z i |
| 89 | have hL : Odd L.val := P.odd_side |
| 90 | have hu (i : Fin L.val) : (f i).valMinAbs=z i := min_abs_for hL _ (by obtain ⟨k,hk⟩ := hL; unfold z n; omega) |
| 91 | let s : Fin L.val ≃ ZMod L.val := Equiv.ofBijective f <| by |
| 92 | rw [Fintype.bijective_iff_injective_and_card]; refine ⟨fun i j h => Fin.ext ?_, by simp⟩ |
| 93 | have hi : z i=z j := (hu i).symm.trans ((congr_arg ZMod.valMinAbs h).trans (hu j)); unfold z at hi; omega |
| 94 | have hb : (inch L:ℂ) * ∑ i : Fin L.val,mode k (i.val • step l) = pulse1 L (k l) * mode k (n • step l) := by |
| 95 | unfold pulse1; rw [← Equiv.sum_comp s, mul_assoc, Finset.sum_mul]; congr 1; apply sum_congr rfl; intro i _ |
| 96 | rw [show s i=f i from rfl, hu] |
| 97 | rw [show (exp (I*(k l*z i)))=mode k (z i • step l) by |
| 98 | unfold mode; simp [Pi.single_apply,mul_ite], ← mode_shift]; congr 1 |
| 99 | simp [z,sub_smul] |
| 100 | have H := congr_arg (fun x : ℂ => ‖x‖) hb |
| 101 | simp only [norm_mul,norm_real,Real.norm_of_nonneg (inch_pos L).le, mode_real k _ hk, mul_one] at H |
| 102 | have hh := pulse_lower hL hk l (preview_coord h _ l) |
| 103 | rw [← H] at hh |
| 104 | calc |
| 105 | (1/16:ℝ)*P.L.val ≤ _ := mul_le_mul_of_nonneg_right hh (show 0 ≤ (P.L.val:ℝ) by positivity) |
| 106 | _ = _ := by rw [mul_right_comm, inch_unit L,one_mul] |
| 107 | end YM.Stationary |
| 108 | end |
| 109 | |
| 110 | /-! |
| 111 | # `coast` price for connector-as-operator. At a fixed shift k in L rows, |
| 112 | use absolute weights once per fixed column and average squared, not an |
| 113 | ℓ² sum over all anchors before projecting. Uniform in P/J pre-L with |
| 114 | joint contour tilt priced only in coarse strip. |
| 115 | -/ |
| 116 | noncomputable section |
| 117 | namespace YM.Stationary |
| 118 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset Complex |
| 119 | open scoped Matrix Topology ContDiff BigOperators ComplexConjugate |
| 120 | variable {G : Gauge} {P : Patch} {α β γ : Type} [Fintype α] [DecidableEq α] {p q k : Momentum} {σ C A : ℝ} |
| 121 | lemma jensen_bill {ι : Type} [Fintype ι] (w : ι → ℝ) (h : ∀ i,0 ≤ w i) (hp : ∑ i,w i=1) (f : ι → ℝ) : |
| 122 | (∑ i,w i*f i)^2 ≤ ∑ i,w i*f i^2 := by |
| 123 | let s := ∑ i,w i*f i |
| 124 | have ht := Finset.sum_nonneg (s:=univ) (f:=fun i=> w i*(f i-s)^2) fun i _ => mul_nonneg (h i) (sq_nonneg _) |
| 125 | have he i : w i*(f i-s)^2=w i*f i^2 - (w i*f i)*(2*s)+w i*s^2 := by ring |
| 126 | simp_rw [he,Finset.sum_add_distrib, Finset.sum_sub_distrib, ← Finset.sum_mul, hp] at ht |
| 127 | unfold s at *; nlinarith only [ht] |
| 128 | lemma odds_bill {ι : Type} [Fintype ι] (w : ι → ℝ) (h : ∀ i,0≤w i) (hp : ∑ i,w i=1) (f : ι→ℂ) : |
| 129 | ‖∑ i,(w i:ℂ)*f i‖^2 ≤ ∑ i,w i*‖f i‖^2 := by |
| 130 | have hx (i) : ‖(w i:ℂ)*f i‖=w i*‖f i‖ := by rw [norm_mul,norm_real,Real.norm_of_nonneg (h i)] |
| 131 | refine (le_trans ?_ (jensen_bill w h hp fun i => ‖f i‖)) |
| 132 | simp_rw [← hx]; exact pow_le_pow_left₀ (norm_nonneg _) (norm_sum_le ..) 2 |
| 133 | |
| 134 | variable (P) |
| 135 | -- rectangular average at a given (α→orientation) shift |
| 136 | |
| 137 | def coast (u : α→Axis) (j : ℕ) (p : Momentum) : CompM α (Co P.L α) := |
| 138 | of fun i a => ∑ x,(P.weight x:ℂ)*scrap p (Pi.single a 1) (x.val+j • step (u i)) i |
| 139 | lemma scrap_basis (v : Phase (Co P.L α)) (p : Momentum) (z : Cover) (i) : |
| 140 | scrap p v z i=∑ j : Co P.L α, scrap p (Pi.single j 1) z i*v j := by simp [scrap,mul_ite,ite_mul,Pi.single_apply] |
| 141 | lemma coast_earn (u : α→Axis) (j : ℕ) (p : Momentum) (v : Phase (Co P.L α)) (i) : |
| 142 | (coast P u j p*ᵥ v) i=∑ x,(P.weight x:ℂ)*scrap p v (x.val+j • step (u i)) i := by |
| 143 | conv_rhs => arg 2; intro x; rw [scrap_basis P, Finset.mul_sum] |
| 144 | unfold coast Matrix.mulVec dotProduct; simp only [Matrix.of_apply, Finset.sum_mul]; rw [sum_comm] |
| 145 | simp only [mul_assoc] |
| 146 | lemma coast_plays (u : α→Axis) (j : ℕ) : Poster σ (coast P u j) := by |
| 147 | refine ⟨fun h a b => ?_,fun h _ => Matrix.ext fun i l => ?_⟩ |
| 148 | · unfold coast; simp only [Matrix.of_apply, scrap, mode] |
| 149 | fun_prop |
| 150 | unfold coast; simp only [Matrix.of_apply,scrap_reset h] |
| 151 | |
| 152 | def coast_tax (j : ℕ) (σ : ℝ) := Real.exp (σ * (4+4*(j+5:ℝ))) |
| 153 | lemma curve_coast (u : α→Axis) (k : ℕ) (hk : k≤P.L.val) (hp : p∈strip σ) : vflux (coast P u k p)≤ coast_tax P.J σ * (inch P.L)^2 := by |
| 154 | let A := (coast_tax P.J σ) |
| 155 | have ha : 0<A := Real.exp_pos _ |
| 156 | apply flux_take (mul_nonneg ha.le (sq_nonneg _)) _ |
| 157 | intro v |
| 158 | apply (pow_le_pow_iff_left₀ (slug_nonneg _) (mul_nonneg (mul_nonneg ha.le (sq_nonneg _)) (slug_nonneg _)) (by decide : 2≠0)).1 |
| 159 | have hm i : ∑ x,(P.weight x)* (A^2*‖v (wrap _ (x.val+k • step (u i)),i)‖^2) = A^2*((inch P.L)^4 * ∑ j : Site P.L,‖v (j,i)‖^2) := by |
| 160 | simp_rw [mul_left_comm (P.weight _) (A^2), ← Finset.mul_sum, map_add] |
| 161 | exact congr_arg _ (lottery_residue P _ fun r => ‖v (r,i)‖^2) |
| 162 | have he (i) : ‖(coast P u k p*ᵥ v) i‖^2≤ (A^2*(inch P.L)^4)*∑ j : Site P.L,‖v (j,i)‖^2 := by |
| 163 | rw [coast_earn, mul_assoc, ← hm i] |
| 164 | exact (odds_bill P.weight P.weight_nonneg P.weight_sum _).trans (sum_le_sum fun x _ => by |
| 165 | rw [← mul_pow]; exact mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (norm_nonneg _) (scrap_oath P v hp x _ _ hk) _) (P.weight_nonneg _)) |
| 166 | rw [slug_sq]; apply (sum_le_sum fun i _ => he i).trans_eq |
| 167 | change ∑ i, _= (A*inch P.L^2*slug v)^2 |
| 168 | rw [← Finset.mul_sum, Finset.sum_comm, mul_pow,slug_sq, Fintype.sum_prod_type]; ring |
| 169 | |
| 170 | section bond |
| 171 | variable (G) |
| 172 | |
| 173 | def meanRay (p : Momentum) := ∑ i : Fin P.L.val,coast P (fun a : Loc G 1 => axisEquiv.symm a.1) i.val p |
| 174 | def jar (p : Momentum) := coast P (fun _ : Loc G 0 => 0) 0 p |
| 175 | lemma jar_plays : Poster σ (jar G P) := coast_plays .. |
| 176 | lemma mean_plays : Poster σ (meanRay G P) := by |
| 177 | let F := fun i => coast P (fun a : Loc G 1 => axisEquiv.symm a.1) i |
| 178 | refine ⟨fun h i j => ?_,fun hp h => ?_⟩ |
| 179 | · unfold meanRay; simp_rw [Matrix.sum_apply] |
| 180 | exact DifferentiableAt.fun_sum fun i _ => (coast_plays ..).shape h _ _ |
| 181 | exact Finset.sum_congr rfl fun i _ => (coast_plays ..).shifts hp h |
| 182 | lemma mean_bills (h : p∈strip σ) : vflux (meanRay G P p)≤ coast_tax P.J σ *inch P.L := by |
| 183 | let f := fun i : Fin P.L.val => coast P (fun a : Loc G 1 => axisEquiv.symm a.1) i.val p |
| 184 | let t := coast_tax P.J σ |
| 185 | have ht (s : Finset (Fin P.L.val)) : vflux (∑ i∈s,f i) ≤ s.card * (t*(inch P.L)^2) := by |
| 186 | induction s using Finset.induction with |
| 187 | | empty => simp [flux_zero] |
| 188 | | insert i s he ih => |
| 189 | rw [Finset.sum_insert he,card_insert_of_notMem he,Nat.cast_add_one,add_mul,one_mul,add_comm _ (t*_)] |
| 190 | exact (flux_plus ..).trans (add_le_add (curve_coast P _ _ i.isLt.le h) ih) |
| 191 | apply (ht Finset.univ).trans_eq; rw [card_univ, Fintype.card_fin] |
| 192 | change _ = t*_; linear_combination t*(inch P.L)*(inch_unit P.L) |
| 193 | variable {P G} |
| 194 | lemma jar_aim (l : Site P.L) (u : Phase (Loc G 0)) : jar G P p *ᵥ tiled p l u = rollMean P (aliasAt p l) • u := by |
| 195 | unfold jar; ext1 i; simp only [coast_earn, scrap_tiled,rollMean,zero_smul,add_zero,Pi.smul_apply,smul_eq_mul,Finset.sum_mul,mul_assoc] |
| 196 | |
| 197 | def capBond (k : Momentum) (P : Patch) (i : Loc G 1) := rollMean P k * ∑ j : Fin P.L.val, mode k (j.val • step (axisEquiv.symm i.1) : Cover) |
| 198 | lemma mean_aim (l : Site P.L) (u : Phase (Loc G 1)) : meanRay G P p *ᵥ tiled p l u = fun i => capBond (aliasAt p l) P i * u i := by |
| 199 | unfold meanRay; rw [sum_mulVec]; ext1 i; rw [Finset.sum_apply] |
| 200 | simp only [capBond,coast_earn, scrap_tiled, mode_shift, rollMean, Finset.mul_sum, Finset.sum_mul] |
| 201 | simp only [mul_assoc] |
| 202 | lemma mean_floor (h : Nave p) (he : star p=p) (v : Phase (Loc G 1)) : (limitMean P.J/16)*P.L.val * slug v ≤ slug (meanRay G P p *ᵥ tiled p 0 v) := by |
| 203 | rw [mean_aim] |
| 204 | let u := (limitMean P.J/16)*P.L.val |
| 205 | have hv : 0≤u := mul_nonneg (div_nonneg (limitMean_pos _).le (by norm_num)) (Nat.cast_nonneg _) |
| 206 | have ht (i : Loc G 1) : u ≤ ‖capBond (aliasAt p (0:Site P.L)) P i‖ := by |
| 207 | unfold capBond; rw [norm_mul] |
| 208 | have heq : u= limitMean P.J*((1/16:ℝ)*P.L.val) := by unfold u; ring |
| 209 | rw [heq] |
| 210 | exact mul_le_mul (roll_strict h he) (connector_strict h he _) (by positivity) (norm_nonneg _) |
| 211 | apply (pow_le_pow_iff_left₀ (mul_nonneg hv (slug_nonneg _)) (slug_nonneg _) (by decide : 2≠0)).1 |
| 212 | rw [mul_pow, slug_sq, slug_sq, mul_sum] |
| 213 | refine sum_le_sum fun i _ => ?_; simp only [norm_mul, mul_pow] |
| 214 | exact mul_le_mul_of_nonneg_right (pow_le_pow_left₀ hv (ht i) _) (sq_nonneg _) |
| 215 | end bond |
| 216 | end YM.Stationary |
| 217 | end |
| 218 | |
| 219 | /-! |
| 220 | # Arc trace under repacking & product layout. Vertical operator M, cell |
| 221 | indices joined. -/ |
| 222 | set_option linter.unusedSectionVars false |
| 223 | noncomputable section |
| 224 | namespace YM.Stationary |
| 225 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset Complex |
| 226 | open scoped Matrix Topology ContDiff BigOperators ComplexConjugate |
| 227 | variable {ι α β γ δ j k : Type} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] |
| 228 | [Fintype γ] [DecidableEq γ] [Fintype δ] [DecidableEq δ] |
| 229 | |
| 230 | -- Beach pairing among two Solids. Used for slab union. |
| 231 | section blocks |
| 232 | |
| 233 | def spades (U : CompM α α) (V : CompM β β) := Matrix.fromBlocks U 0 0 V |
| 234 | lemma spades_one : spades (1:CompM α α) (1:CompM β β)=1 := by ext (i|i) (j|j) <;> simp [spades,one_apply] |
| 235 | lemma spade_prod (U X : CompM α α) (V Y : CompM β β) : spades U V * spades X Y=spades (U*X) (V*Y) := by simp [spades,fromBlocks_multiply] |
| 236 | lemma spade_heft (U : CompM α α) (V : CompM β β) : (spades U V)ᴴ=spades Uᴴ Vᴴ := by ext (i|i) (j|j) <;> simp [spades] |
| 237 | lemma spade_slim (U : CompM α α) (V : CompM β β) : (spades U V)ᵀ=spades Uᵀ Vᵀ := by ext (i|i) (j|j) <;> simp [spades] |
| 238 | lemma spade_inv {U : CompM α α} {V : CompM β β} (h : IsUnit U.det) (he : IsUnit V.det) : (spades U V)⁻¹=spades U⁻¹ V⁻¹ := by |
| 239 | apply inv_eq_right_inv; rw [spade_prod, mul_nonsing_inv _ h,mul_nonsing_inv _ he,spades_one] |
| 240 | lemma spade_spin {U : CompM α α} {V : CompM β β} (h : Skates U) (he : Skates V) : Skates (spades U V) := ⟨by rw [spade_heft,spade_prod,h.slides,he.slides,spades_one]⟩ |
| 241 | |
| 242 | def Slab.spade (X : Slab α) (Y : Slab β) : Slab (α ⊕ β) where |
| 243 | tile p := spades (X.tile p) (Y.tile p) |
| 244 | whole p := by rw [spades, Matrix.det_fromBlocks_zero₁₂]; exact (X.whole _).mul (Y.whole _) |
| 245 | lemma Slab.spadeD (X : Slab α) (Y : Slab β) : (X.spade Y).dual=X.dual.spade Y.dual := by |
| 246 | unfold dual spade; congr 1; funext p; rw [spade_slim, spade_inv (by rw [det_transpose]; exact X.whole _) (by rw [det_transpose]; exact Y.whole _)] |
| 247 | lemma Slab.Bright.spade {X : Slab α} {Y : Slab β} (h : X.Bright) (he : Y.Bright) : (X.spade Y).Bright := by |
| 248 | refine ⟨fun hp => ?_⟩ |
| 249 | obtain ⟨U,hU,hx⟩ := (h.pose hp).flee; obtain ⟨V,hV,hb⟩ := (he.pose hp).flee |
| 250 | exact ⟨_,spade_spin hU hV,by dsimp [Slab.spade]; rw [spade_prod,hx,hb]⟩ |
| 251 | lemma spade_assemble (v : Phase (α⊕β)) : v=Sum.elim (v ∘ Sum.inl) (v ∘ Sum.inr) := by funext i; cases i <;> rfl |
| 252 | lemma spade_apply (U : CompM α α) (V : CompM β β) (x y) : spades U V*ᵥ Sum.elim x y=Sum.elim (U *ᵥ x) (V *ᵥ y) := by rw [spades, fromBlocks_mulVec]; simp |
| 253 | lemma spade_norm (x : Phase α) (y : Phase β) : slug (Sum.elim x y)^2=slug x^2+slug y^2 := by |
| 254 | rw [slug_sq,slug_sq,slug_sq,Fintype.sum_sum_type]; rfl |
| 255 | lemma spade_flux {U : CompM α α} {V : CompM β β} {C : ℝ} (h : vflux U≤C) (he : vflux V≤C) : vflux (spades U V)≤C := by |
| 256 | have hc := (flux_nonneg _).trans h |
| 257 | refine flux_take hc _ fun v => ?_ |
| 258 | rw [spade_assemble v,spade_apply] |
| 259 | apply (pow_le_pow_iff_left₀ (slug_nonneg _) (mul_nonneg hc (slug_nonneg _)) (by decide : 2≠0)).1 |
| 260 | rw [spade_norm,mul_pow,spade_norm,mul_add, ← mul_pow,← mul_pow] |
| 261 | exact add_le_add (pow_le_pow_left₀ (slug_nonneg _) (flux_tester h _) _) (pow_le_pow_left₀ (slug_nonneg _) (flux_tester he _) _) |
| 262 | lemma Slab.serial_spade {X U : Slab α} {Y V : Slab β} {p q} {K H} {C : ℝ} (h : serial X U p q K C) (he : serial Y V p q H C) : serial (X.spade Y) (U.spade V) p q (spades K H) C := by |
| 263 | unfold serial carryM; dsimp only [spade]; rw [spade_inv (X.whole p) (Y.whole p), spade_prod,spade_prod]; exact spade_flux h he |
| 264 | lemma Slab.Height.spade {X : Slab α} {Y : Slab β} {σ C} (h : X.Height σ C) (he : Y.Height σ C) : (X.spade Y).Height σ C := by |
| 265 | refine ⟨fun p hp => ?_⟩ |
| 266 | obtain ⟨A,hA,hr,ht⟩ := h.feel p hp; obtain ⟨B,hB,hq,hH⟩ := he.feel p hp |
| 267 | refine ⟨A.spade B,fun q h (i) (j) => ?_,fun q hp => ?_,fun q hp => ?_⟩ |
| 268 | · cases i <;> cases j <;> first | exact hA q h _ _ | exact hB q h _ _ | exact differentiableAt_const _ |
| 269 | · change spades _ _ = spades _ _; rw [hr _ hp,hq _ hp] |
| 270 | have hZ := Slab.serial_spade (ht q hp).1 (hH q hp).1; have hu := Slab.serial_spade (ht q hp).2 (hH q hp).2; rw [spades_one] at hZ hu; exact ⟨hZ,hu⟩ |
| 271 | lemma Slab.spade_rate (X : Slab α) (Y : Slab β) {p u v} : (X.spade Y).rate p (Sum.elim u v)^2=X.rate p u ^2+Y.rate p v^2 := by |
| 272 | unfold rate spade; rw [show (({tile:=_,whole:=_} : Slab _).tile p)=spades (X.tile p) (Y.tile p) from rfl,spade_inv (X.whole p) (Y.whole p),spade_apply,spade_norm] |
| 273 | end blocks |
| 274 | |
| 275 | section maps |
| 276 | -- matrix packing conventions for two arbitrary Co. X input interleaving. Uses e,g,u **from actual finite labels** |
| 277 | variable [Fintype j] [DecidableEq j] [Fintype k] [DecidableEq k] (e : α ≃ β) (g : γ ≃ δ) (u : j ≃ k) {R : Type} [CommRing R] |
| 278 | def repackM (U : Matrix α γ R) := Matrix.submatrix U e.symm g.symm |
| 279 | lemma repack_multiply (U : Matrix α γ R) (V : Matrix γ j R) : repackM e u (U*V)=repackM e g U*repackM g u V := by |
| 280 | ext i j |
| 281 | simp only [repackM,Matrix.submatrix_apply,Matrix.mul_apply] |
| 282 | exact (Equiv.sum_comp g.symm _).symm |
| 283 | lemma repack_rotate (U : Matrix α γ R) : repackM g e Uᵀ=(repackM e g U)ᵀ := rfl |
| 284 | lemma repack_dot (x y : α→R) : dotProduct x y=dotProduct (x∘e.symm) (y ∘ e.symm) := by unfold dotProduct; rw [← Equiv.sum_comp e.symm]; rfl |
| 285 | lemma repack_act (U : Matrix α γ R) (x : γ→R) : repackM e g U *ᵥ (x ∘ g.symm)=(U *ᵥ x) ∘ e.symm := by |
| 286 | ext1 i; simp only [Matrix.mulVec,dotProduct,repackM, Matrix.submatrix_apply,Function.comp_apply]; exact Equiv.sum_comp g.symm (fun a => U (e.symm i) a * x a) |
| 287 | lemma repack_det (U : Matrix α α R) : (repackM e e U).det=U.det := by unfold repackM; rw [Matrix.det_submatrix_equiv_self] |
| 288 | lemma repack_unit : repackM e e (1:Matrix α α R)=1 := by ext; simp [repackM, Matrix.one_apply] |
| 289 | |
| 290 | end maps |
| 291 | end YM.Stationary |
| 292 | end |
| 293 | |
| 294 | /-! # Assemble static color stencils and cross row. |
| 295 | All act on `chargeM` at exactly given period. -/ |
| 296 | set_option linter.unusedSectionVars false |
| 297 | noncomputable section |
| 298 | namespace YM.Stationary |
| 299 | open Function Filter Lattice RG Wilson Exterior Precision Bloch Laurent Matrix Finset Complex |
| 300 | open scoped Matrix Topology ContDiff BigOperators ComplexConjugate |
| 301 | variable {G : Gauge} {P : Patch} {L c f n m : Side} {p q r : Momentum} |
| 302 | {α β : Type} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] |
| 303 | {ι j k h : ℕ} |
| 304 | |
| 305 | section paint |
| 306 | variable {R : Type} [CommRing R] |
| 307 | |
| 308 | def pick (x : Loc G ι → R) (i : G.ColorIndex) (a : TypeFace ι) := x (a,i) |
| 309 | def tintedLocal (G : Gauge) (V : Matrix (TypeFace j) (TypeFace k) R) : Matrix (Loc G j) (Loc G k) R := Matrix.of fun i l => if i.2=l.2 then V i.1 l.1 else 0 |
| 310 | lemma tinted_at (V : Matrix (TypeFace j) (TypeFace k) R) (v : Loc G k→R) (a : Loc G j) : |
| 311 | (tintedLocal G V*ᵥ v) a = (V*ᵥ pick v a.2) a.1 := by |
| 312 | simp only [Matrix.mulVec,dotProduct,tintedLocal, Matrix.of_apply,Fintype.sum_prod_type] |
| 313 | simp_rw [ite_mul,zero_mul,sum_ite_eq, Finset.mem_univ,if_true]; rfl |
| 314 | lemma tinted_plus (V W : Matrix (TypeFace j) (TypeFace k) R) : tintedLocal G (V+W)=tintedLocal G V+tintedLocal G W := by ext i j; unfold tintedLocal; by_cases h : i.2=j.2 <;> simp [h] |
| 315 | lemma tinted_pay (V : Matrix (TypeFace j) (TypeFace k) R) (W : Matrix (TypeFace k) (TypeFace h) R) : tintedLocal G (V*W)=tintedLocal G V*tintedLocal G W := by |
| 316 | apply Matrix.toLin'.injective; apply LinearMap.ext; intro i; ext1 x; rw [Matrix.toLin'_apply,Matrix.toLin'_apply,tinted_at, ← mulVec_mulVec, ← mulVec_mulVec,tinted_at]; |
| 317 | have he (x : G.ColorIndex) : pick (tintedLocal G W *ᵥ i) x=W *ᵥ pick i x := funext fun y => tinted_at W i (y,x) |
| 318 | rw [he] |
| 319 | lemma tinted_flip (V : Matrix (TypeFace j) (TypeFace k) R) : tintedLocal G Vᵀ=(tintedLocal G V)ᵀ := by ext i j; simp [tintedLocal,eq_comm] |
| 320 | |
| 321 | end paint |
| 322 | |
| 323 | def patron (G : Gauge) (V : Matrix (Body j c) (Body k f) ℝ) := billsM (pocket _) (pocket _) (uniformM (G:=G) V) |
| 324 | lemma patron_fee (V : Matrix (Body j c) (Body k f) ℝ) (i : Corn (Lines G f k)) : patron G V *ᵥ i=uniformM V i := bill_pay .. |
| 325 | lemma patron_mul (V : Matrix (Body j c) (Body k f) ℝ) (W : Matrix (Body k f) (Body h m) ℝ) : patron G (V*W)=patron G V*patron G W := by |
| 326 | apply testers; intro i y |
| 327 | rw [patron_fee, ← mulVec_mulVec,patron_fee,patron_fee] |
| 328 | apply congr_arg _; ext1 z; change ((V*W) *ᵥ _) _= (V *ᵥ _) _; rw [← mulVec_mulVec]; rfl |
| 329 | lemma patron_star (V : Matrix (Body j c) (Body k f) ℝ) : patron G Vᵀ=(patron G V)ᵀ := by |
| 330 | apply testers; intro i l |
| 331 | conv_rhs => rw [dotProduct_mulVec, Matrix.vecMul_transpose] |
| 332 | rw [patron_fee,patron_fee,dotColor,dotColor] |
| 333 | simp_rw [uniformC,dotProduct_mulVec,Matrix.vecMul_transpose] |
| 334 | |
| 335 | lemma inflow (V : CompM α β) (u v) : dotProduct u (V *ᵥ (v:Phase β))=dotProduct (Vᵀ *ᵥ (u:Phase α)) v := by rw [dotProduct_mulVec, mulVec_transpose] |
| 336 | lemma Leads.byVec (V : Matrix α β ℝ) : Leads (fun z => approached V *ᵥ z) := by intro i j; dsimp only; rw [mulVec_add,mulVec_smul] |
| 337 | lemma prom_vec (V : Matrix α β ℝ) (p) : approached V*ᵥ axes p=axes (V*ᵥ p) := by ext1 i; simp [Matrix.mulVec,dotProduct,approached,axes] |
| 338 | |
| 339 | def shades_of (i : G.ColorIndex) {k : ℕ} : Phase (Lines G m k) →ₗ[ℂ] (Co m (TypeFace k) → ℂ) := LinearMap.pi fun p => LinearMap.proj (p.1,p.2,i) |
| 340 | |
| 341 | lemma patron_contract (V : Matrix (Body j c) (Body k f) ℝ) (y : Phase (Lines G f k)) (i : G.ColorIndex) : |
| 342 | shades_of i (approached (patron G V)*ᵥ y)=approached V *ᵥ (shades_of i y) := by |
| 343 | refine Leads.buys (p:=fun y => shades_of i (approached (patron G V)*ᵥ y)) (q:=fun y => approached V *ᵥ (shades_of i y)) (fun u v => ?_) (fun u v => ?_) ?_ y |
| 344 | · simp only [Matrix.mulVec_add,Matrix.mulVec_smul,map_add,map_smul] |
| 345 | · simp only [Matrix.mulVec_add,Matrix.mulVec_smul,map_add,map_smul] |
| 346 | intro a |
| 347 | rw [prom_vec,patron_fee,show shades_of i (axes a)=axes (parts G k (arm _ _ _ a) i) from rfl, prom_vec]; rfl |
| 348 | lemma tune_palette (p : Site m) (V : Phase (Loc G k)) (i) : shades_of (G:=G) i (tune p V)=tune p (pick V i) := rfl |
| 349 | |
| 350 | lemma palette_ship (V : Row (TypeFace j) (TypeFace k)) (he : V.safe) : |
| 351 | Jaunt (approached (patron G (V.acts c))) (fun p => tintedLocal G (V.read p)) 0 := by |
| 352 | intro p q h w; rw [add_zero] |
| 353 | ext1 i |
| 354 | have hm := patron_contract (V.acts c) (tune p w) i.2.2 |
| 355 | rw [tune_palette,Jaunt.row V he _ _ h,add_zero] at hm |
| 356 | exact (congr_fun hm (i.1,i.2.1)).trans (by change cell p i.1 * _=cell p i.1 * _; rw [tinted_at]) |
| 357 | |
| 358 | lemma exterior_calm (V : Row (TypeFace j) (TypeFace k)) {σ C : ℝ} (h : V.strip σ C) (hs : 0<σ) : Poster σ fun p => tintedLocal G (V.read p) := by |
| 359 | refine ⟨fun he a b => ?_, fun hp _ => ?_⟩ |
| 360 | · simp only [tintedLocal,Matrix.of_apply]; split |
| 361 | exact (Firm.of_series (V.constant_strip h _ _) hs).1.hol _ he |
| 362 | exact differentiableAt_const _ |
| 363 | obtain ⟨x,rfl⟩ := hp; rw [V.periods] |
| 364 | end YM.Stationary |
| 365 | end |