import YM.RG05Readout.Address.Rail import YM.RG05Readout.Address.Shape /-! # Exact physical one-slot coupons and numerical bills Field-only costs used again with address conversions. Pin same history before evaluation. No basis-dependent choice of output kernel or vacuum. -/ set_option autoImplicit false noncomputable section namespace YM.RG05Readout.Address open Function Filter Set MeasureTheory Lattice Wilson Labels RG Source Bid open Extra.Histories Push Local Planned.GuardedAtom Guard MergeProof Extra.Histories.Relay Native open PhysicalNext.Repeat Lotus Motion Trace.Physical Offsets open scoped Topology ContDiff BigOperators Matrix.Norms.Frobenius Classical variable {G:Gauge}(C:Family G)(N m p d:ℕ) set_option quotPrecheck false local notation "Z"=>C.path.levels.clock.op m p local notation "R"=> C.path.rep N p m local notation "M"=> C.path.rep N p (m+1) local notation "F"=>C.labels.level d local notation "Y"=> C.params local notation "S"=> C.localSection d local notation "κ"=> kappa C.path local notation "L"=> C.path.S.block m local notation "v"=> ((L).val:ℂ)^d variable (o:Site (C.path.S.side (m+1) p)) variable {a c α β g r J :ℝ} {X:Extra.Histories.Heading (C.labels.level d)} (D:GaugeDoor (C.path.rep N p (m+1)) (C.path.rep N p m)) -- Tribute for actual primary slot possibly unmasked exact. Bundle both budgets at t. uniform wrappers. Keep scalar when limiting. local notation "q"=> Pricing S C.path N p m Y variable (h:C.Makes) (hm:m.1,?_⟩ simp only [show Q.x=X.leads L x from rfl, sub_self,map_zero,Frame.coeffSize, Pi.zero_apply,norm_zero,Finset.sum_const_zero]; exact hα obtain ⟨Z',S',hZ,hY,hU⟩:=hw.buys o ho; have hs:=hU.entry i hv dsimp only at hs; rw [Size.core_axis (F),if_neg hv] at hs obtain ⟨Q,hA,hF',hW,hT⟩:=hs; refine ⟨Q,hA.format,hA.bound,⟨Useful.invoice P o (S) (M) (h.wilson.represents _ _ _ hm).good hP hp, Useful.invoice Q 0 (S) (R) (h.wilson.represents N p m hm.le).good hA.bound hA.format, ⟨S',hZ,0,(le_trans (norm_zero.le) (le_trans hu hu')),?_⟩,hA.agrees⟩,hW,hF'⟩ change Tale S' _ _ _ _ (profile (M).activities P.forced) _ _ _ _ _ rw [show profile (M).activities P.forced=0 from by ext; simp [profile,P,Extra.Histories.primary,cram]]; exact hT.climb le_rfl hrβ hu' lemma regular_grant (P:Coefficient (F) (C.side (m+1) p)) (hα:0≤α) (hκ: κ (m+1) ≤ 1) (hp:P.Format o Y M)(hP:P.remBound o M (κ (m+1)) r) (hx:P.x=0): ∃ Q:Coefficient (F) (C.side m p), Q.Format 0 Y R∧ Q.remBound 0 R (κ m) (α*r) ∧ Ride Z o 0 D v (invoice P o S M) (invoice Q 0 S R) ((2+α)*r) ∧ (F).coeffSize Q.x ≤ α*r:=by obtain ⟨s,X,hZ,hY,hT⟩:=hw.buys o ho obtain ⟨Q,hU,hR⟩:= tracking_cost (S) C.path N p m Y o s P X D h.wilson hm hp hP hx hw.soundD hα hT hκ hY have hr:= rem_nonneg hP; have ht : α*r ≤ (2+α)*r:=mul_le_mul_of_nonneg_right (le_add_of_nonneg_left zero_le_two) hr; have hs:0 ≤ α*r:=mul_nonneg hα hr refine ⟨Q,hU.format,hU.bound, ⟨Useful.invoice P o S M (h.wilson.represents _ _ _ hm).good hP hp, Useful.invoice Q 0 S R (h.wilson.represents N p m hm.le).good hU.bound hU.format,?_,hU.agrees⟩,?_⟩ · refine ⟨X,hZ,P.x 0,?_, hR.climb le_rfl (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hα) hr) ht⟩ rw [hx,Pi.zero_apply,norm_zero]; exact hs.trans ht exact (le_mul_of_one_le_left (Work.G08.size_nonneg ..) (orbitCost_one_le _)).trans (by simpa only [sub_zero] using hU.leadP) end YM.RG05Readout.Address