import YM.AnalyticBridge.ANNULUS_RATIO_INSERTIONS.Guard import YM.SectorNext.GAUSSIAN_SECTOR_CHANGE.Stamped /-! # Post-L counter through THESE costs Including for licenses at the same aperture (actual `fog` & `meanLog`). Not on an arbitrary Ringing cost; see Scope and docs. Obtain independent post-L/threshold choices before using on extraction. -/ set_option autoImplicit false noncomputable section namespace YM.AnalyticBridge.AnnulusRatioInsertions open Function Filter Lattice Wilson RG RG.Patch Precision Exterior Tree MeasureTheory Metric Matrix open Next.SectorChange Next.SectorChange.Motion Next.SectorChange.Rows Next.SectorChange.Gaussian open Pressure Pressure.Tube Pressure.Stores Bid Push.SectorMeasure Push.SectorMeasure.Oriented Presented open SectorNext.Remainder SectorNext.Remainder.Affine Harvest open scoped Topology InnerProductSpace BigOperators Classical ContDiff Matrix.Norms.Frobenius Push.SectorMeasure variable {G : Gauge} {c f : Side} {S : StepData c f} /-- At this Teller's post-L quotes, anticipate the actual aperture prices. Don't need Census of supports etc, they can be bought later at each entrance. `Sponsored`: starcash data slightly rearranged (use with these entrances also for full_price, Arthur etc). `Admitted` even if flags incorrectly recorded. -/ def Sponsored (Z : ChartRatio G) (P : Teller G) (L : Side) (w K E x : ℝ) := let d := K*fiery G x L d ≤ 1 ∧ 2*d 4*C*fiery G x L) atTop (𝓝 0) := by have hv := (Scales.tally_g G L 0 1).const_mul (4*C); rw [mul_zero] at hv; refine hv.congr fun x => ?_; simp [Scales.fi]; exact Or.inl (mul_comm ..) have ht := (Work.E01.betaF_tendsto G L).eventually_gt_atTop 0 refine ⟨C,D,zero_lt_one.trans_le hC,hD,?_⟩ filter_upwards [Work.E01.radiusB_tendsto.eventually_ge_atTop 2,ht,hg.eventually (gt_mem_nhds (by have := first_pos G; positivity : 0 < min r (min (firstRadius G) 1)))] with x h1 h2 h3 have he : 0 (hi S T ht hv).elim⟩, ⟨by change d≤1; linarith only [hR.2.2,hd],by change 2*d<_; linarith only [hR.2.1,hd], hR.1.trans hl, fun a hy => (hh _ (hy.trans hR.1.le)).2.2,fun c f S T ht _ hv => (hi S T ht hv).elim⟩⟩ obtain ⟨T0,ht,hy,hp⟩ := hx obtain ⟨A,E,hA,hE,hI⟩ := sponsored_permit P Z hZ T0 hp w hw obtain ⟨B,r,hB,hr,hl,hX⟩ := ratio_price hZ set K := max C A have hc : C ≤ K := le_max_left ..; have ha : A≤K := le_max_right .. refine ⟨K,B,hA.trans_le ha,hB,?_⟩ have hg : Tendsto (fun x => 4*K*fiery G x L) atTop (𝓝 0) := by have hv := (Scales.tally_g G L 0 1).const_mul (4*K); rw [mul_zero] at hv; refine hv.congr fun x => ?_; simp [Scales.fi]; exact Or.inl (mul_comm ..) rw [ht] at hI have h0 := first_pos G filter_upwards [h,hI,Work.E01.radiusB_tendsto.eventually_ge_atTop 2,small_span T0, hg.eventually (gt_mem_nhds (by positivity : 0 < min r (min (firstRadius G) 1)))] with x hz hl' hθ hq hs obtain ⟨he,h',hα,hβ,hw'⟩ := hl' let d := K*fiery G x L have H : 0 < fiery G x L := pos_of_mul_pos_right h' hA.le have hd : 0 ⟨by rw [hu c f S T h hf]; exact hq,?_⟩⟩ intro D F O A U k V h1 h2 p hi obtain ⟨a,h3,h4⟩ := hz c f S T h he hf D F O A U k V h1 h2 exact ⟨C,a,hc,h4 p hi⟩ refine ⟨by change d≤_; linarith only [hd,hR.2.2],hh,hR.1.trans hl, fun a ht => (hX _ (ht.trans hR.1.le)).2.2,fun c f S T h1 h2 h3 S0 F k V C0 q => ?_⟩ obtain ⟨h4,h5,h6⟩ := hw' _ _ S T (hu c f S T h1 h3) h2 h3 obtain ⟨hm,hn⟩ := h6 S0 F k V C0 q constructor · intro u hU hb e hx y z obtain ⟨a,ht,hβ,hχ,hX,-⟩ := hm u hU hb e hx refine ⟨a,ht.trans hv,hβ,hχ,hX,fun q => ?_⟩ have hY : z=G.lieExp a := by change u e * y⁻¹=G.lieExp a change G.lieExp a * y=u e at hX; rw [← hX]; group rw [hY,patched_agrees q hd (show d