import YM.TraceExtension.Shepherd.Folly import YM.SectorNext.VACUUM_NORMALIZATION.Covered set_option autoImplicit false set_option linter.unusedSectionVars false noncomputable section namespace YM.Trace.Shepherd open RG Wilson Lattice Source AnalyticBridge VerifiedReset Finset Ac MergeProof Cask Function Pressure Next.Fluctuations PathData Extra.Iteration Push.AbsoluteSums Extra.Multi StressFlux MeasureTheory Cells Accent Menu open Push.GridApprox open scoped Topology BigOperators InnerProductSpace Matrix.Norms.Frobenius Classical ContDiff variable {G:Gauge}{n:Side}(R:Rep G n) (U:Config G n)(t:ℝ) local notation "Y"=>R.path local notation "Z"=>R.p local notation "p"=>R.p.threshold local notation "K"=>R.clip local notation "a"=>R.beta -- per flag τ and clipping lemma valour (ht:0R.clip.linear/5*t^2) fun i hi=> Next.Rank.Alarm.scene_pay K ht hv U i hi); exact le_of_eq (by simp; ring) rw [show F=flags t U from rfl,he] at hm; refine hm.trans (sum_le_sum (fun i _=> ?_)); unfold PathData.baseTerm Next.Rank.Alarm.Delta; split_ifs with h · apply (sub_le_self _ ?_).trans (le_add_of_nonneg_right (by positivity)); unfold PathData.clipped; have he:=G.chord_nonneg (faceValue U i); have hu:=R.clip.quadratic_pos; have h':= R.clip.tail_pos; split_ifs<;>positivity rw [add_zero]; unfold PathData.clipped; have he:=G.chord_nonneg (faceValue U i); have hu:=R.clip.quadratic_pos; have h':= R.clip.tail_pos; apply sub_le_self; split_ifs<;>positivity lemma ardor (ht:0.injective)).symm have hi:= valour R V t ht hv; rw [hp] at hi; let q:=Y; have hx:= (abs_le.mp (q.volume_price K Z a hs V h.paths)).1 unfold b; linarith only [hx,mul_le_mul_of_nonneg_left hi hs] have hh : b≤ R.path.inChannels K Z a U:= by have hm:= sum_le_sum (f:=fun _ : Signed=> b) (fun i (_:i∈univ)=> he i); exact (le_trans (le_of_eq (b:=factor * ∑ i:Signed,b) (by simp only[sum_const, card_univ,nsmul_eq_mul,← mul_assoc,factor_card,one_mul])) (mul_le_mul_of_nonneg_left hm factor_pos.le)) have hy := (abs_le.mp (volumeE _ h.labels U)).1 unfold Rep.exponent Rep.scalar Rep.exCost; unfold b at hh; linarith only [hh,hy] lemma flourishX {σ A Λ δ w:ℝ}(h:R.Lawful σ A Λ δ w) (hw: w ≤ 1) (hv:0 ≤ R.beta)(k:ℕ) (hs:k ≤ (flags t U).card)(ht:0