import YM.Next.SCHEDULE.Stadium /-! # Beta ticket for restarts on h stretches Starts in old Shoot.band, not assumed on a restarted Bolted trajectory. Checks using the ACTUAL coupling of the step if the error already fits the PRE-L drift cost and iteration uses the approved enlarged prescription band. The Ready assignment really gives those numerical gates. Estimate uniform through any earlier-staged histories. Include also a p^o recurrence check for E.13665 etc. Does not assert the altered-threshold RG or weak matching transitions have been constructed or can be, number estimates lease physical estimates still to find. Negative counterchecks separate. -/ set_option autoImplicit false noncomputable section namespace YM.Next.Scheduling.Weak open Filter Function RG RG.Supply Bid Lattice Source Precision Clock Real open scoped Topology variable {G : Gauge} {s : Survey G} {K : MapPrices} {q : Quote} {e : ℕ → ℕ → Exchange} {v : ℕ → ℕ} variable {D : Rolls (s.paper q v)} {Θ : Protection D} {V : Delays Θ} {Y : Bar V} {I : Wait Y} private lemma ratios (y x : ℝ) (hx : 0 < x) (h : x/2 ≤ y) : |gap y/gap x-1| ≤ 2*|y-x|/x := by have hy : 0 linarith intro m hm induction m with | zero => have hb : |β 0-β 0|≤t 0 := by simp [t] exact ⟨hb, hh _ hm hb⟩ | succ m ih => obtain ⟨h1,h2,-⟩ := ih (by omega) have ha := ht m hm h2; obtain ⟨ha,hb⟩:=abs_le.mp ha; obtain ⟨hx,hy⟩:=abs_le.mp h1 have he := mul_pos hg hL have H : |β (m+1)-β 0| ≤ t (m+1) := by unfold t at *; rw [abs_le]; push_cast; constructor <;> linarith exact ⟨H,hh _ hm H⟩ intro m hm; obtain ⟨ht,hx',he'⟩:=hH m hm have he0 : 0 < β 0 := by linarith refine ⟨hx',le_trans (ratios _ _ he0 he') ?_⟩ have hF := mul_le_mul_of_nonneg_left ((mul_le_mul_of_nonneg_right (show (m:ℝ) ≤ r by exact_mod_cast hm) hL.le).trans hr) hg.le unfold t at ht; apply div_le_div_of_nonneg_right _ he0.le; linarith end YM.Next.Scheduling.Weak