import YM.RG08.Calendar.Base /-! # log schedule → kyage -/ set_option autoImplicit false noncomputable section namespace YM.RG08.Admission open Set Function Filter Lattice Wilson Exterior Precision Laurent Next.Free RG RG.Supply Bloch Wings open scoped BigOperators Topology Real Classical variable {I H:Type} {G:Gauge} lemma LambdaX_at {x:ℝ}(h:1 Chain.actual a def NearZ (a:Levels G)(w:I→Windows):Prop:=∀ b, z a (w b).k ≤ (w b).Z -- for auxiliary constant windows use abstract budget definition directly instead lemma payable (p:G.Simple)(hV:NearZ a w): Weighed (Launch.farY X) (fun i:Launch w=> z a i.i):=by have hh:= Gauge.slopeConstant_pos p refine ⟨1+G.slopeConstant,1,by positivity,fun i=>⟨zero_le_one.trans (z_at ..),?_⟩⟩ have hp:= (hV i.b); refine (z_older p a i.i (w i.b).k).trans ?_ rw [pow_one]; unfold Launch.farY; let u:= |a.S.scale i.i-a.S.scale (w i.b).k|; let y:=(w i.b).Z have he:0≤y:= (w i.b).pos; have hz:0≤u:= abs_nonneg _; have hv:z a (w i.b).k≤y:=hp change _ +G.slopeConstant*u ≤ (1+G.slopeConstant)*(2+y+u); nlinarith lemma Affords.cash_w (p:G.Simple)(hV:NearZ a w){N:Need}(hx:∀ k, Affords N a (w k).start) {f:Launch w→ℝ} (hB:∀ i,0≤ f i)(hQ:∀ i, f i ≤ N.cost _ _ ((Chain.actual a).step i.i (.top _)) (a.clock.params i.i)): Weighed (Launch.farY X) f:= (payable p hV).mono hB (fun i=> (hQ i).trans ((hx i.b).hi _ i.geC)) lemma eventual_requests {R:Type} [Encodable R] (a:Levels G) (w:R→Need)(h:∀ x n, Encodable.encode x ≤ a.clock.J n → Affords (w x) a n)(f:R→ℕ)(r:R): ∀ᶠ i in atTop,f r ≤ a.clock.J i∧ Affords (w r) a i := ((a.fits.deep.eventually (eventually_ge_atTop _)).and (a.fits.deep.eventually (eventually_ge_atTop _))).mono fun i hp=> ⟨hp.1,h _ i hp.2⟩ end YM.RG08.Admission