import YM.FullVolume.Relay.Summary /-! # budgets in terms of denominators, stage-local currency conditions Define currencies exactly. All Radius params affordable in a histogram to be paid separately. No hidden poly estimates. -/ set_option autoImplicit false noncomputable section namespace YM.PhysicalNext.Repeat.Legato.Campaign.Face open Function Filter Set MeasureTheory Lattice RG RG.Supply Wilson Precision Supply Input Org Extra.Histories Source open JointLoad JointLoad.Heir JointLoad.Heir.Suite JointLoad.Psalm Clockwork open AnalyticBridge VerifiedReset Collection Quotes Next.Scheduling Extra.Iteration Song Geo open ThroughLaunch Roof Push.PriceCompiler Further.StrongStartup SectorNext open WilsonStartup Progress.DirectedRecipe Time Next.Foundations UVNext.CouplingReset open Cub Circlet Graces Roost Planned.GuardedAtom Mallow Lotus open scoped Topology BigOperators Classical Matrix.Norms.Frobenius ContDiff Interval InnerProductSpace variable {G:Gauge} open YM.MergeProof MergeProof.Matric FullVolume FullVolume.Paint Tower open RG.Shoot Lark Motion open FullVolume FullVolume.Retreat FullVolume.Shroud Amp Amp.Beam open Pillars Bandage Pass Muse Contest Ovens Veil Ship variable {R:Run G} (T:Campaign R) set_option quotPrecheck false local notation "L!"=> R.alloy.B.a local notation "K!"=> R.alloy.B open Spirit Branch Boutique Guard open Extraction Extraction.Lease open MergeProof.Accent FullVolume.Nectar variable {I:Type}[Fintype I] [DecidableEq I] (d:I→ℕ)(x:(i:I)→((Labels.frames G).level (d i)).Coeff) variable (Θ:Luna.Tableau T.width 300)(v:ℕ→ℕ→ℝ) abbrev civic (n:ℕ):ℝ:= 128*((n:ℝ)+1) lemma civic_pos (n:ℕ) : 00&ge1 lemma one_minute (m):1 ≤ minutes R m:=by exact_mod_cast (R.alloy.B.a.S.block m).property lemma one_fund(b m): 1 ≤ fundsY R b m:= one_le_pow₀ (one_clock m) lemma one_change(b m):1 ≤ changeA R b m:= one_le_pow₀ (one_minute m) lemma changeling(b i): fundsY R b (i+1)=fundsY R b i*changeA R b i:=by unfold fundsY changeA intervalClock minutes; rw [Schedule.denominator,PNat.mul_coe,Nat.cast_mul,mul_pow] lemma lighter (b:ℕ) : Monotone (fundsY R b):=by apply monotone_nat_of_le_succ; intro i;rw [changeling]; exact le_mul_of_one_le_right (zero_le_one.trans (one_fund ..)) (one_change ..) abbrev energyW (R:Run G)(b:ℕ)(m:ℕ)(_ : I):ℝ:= (fundsY R b m)⁻¹ ^ 4 abbrev kernelW (R:Run G)(b:ℕ)(j:ℕ)(_ : I):ℝ:= (fundsY R b (j+1))⁻¹ ^ 6 abbrev kernelU (R:Run G)(b:ℕ)(j m:ℕ)(_ : I):ℝ:= fundsY R b (j+1) * (fundsY R b (j+1) / fundsY R b (m+1)) abbrev timeEntry (R:Run G)(m:ℕ):ℝ:= R.alloy.B.a.clock.hatBeta m abbrev mintOut (R:Run G)(m:ℕ):ℝ:= Accent.mintK (R.alloy.B.a.budget m).B abbrev heightP (R:Run G)(m:ℕ): ℝ:= (timeEntry R m)⁻¹ ^ 3 abbrev creditP (x:ℝ):ℝ:= (x⁻¹)^2 variable (b m:ℕ) -- Statement needs Calendar β wr.Runs. ask all m eventually. include full bounds for ⌕ reboot at top.Cap.Dep.Vw. structure Economics (Θ:Luna.Tableau T.width 300)(v:ℕ→ℕ→ℝ)(d:I→ℕ)(x:(i:I)→((Labels.frames G).level (d i)).Coeff)(b m:ℕ): Prop where support : 8 ≤ (R.alloy.B.a.budget m).B expQ : 1 ≤ (R.alloy.B.a.budget m).supportExponent monotoneB : timeEntry R m ≤ timeEntry R (m+1) big : 512 ≤ timeEntry R m upBound : timeEntry R m ≤ fundsY R b m more : (changeA R b m)^4 ≤ mintOut R m ability : ∀ N p:ℕ, ∀ hm:mFintype.card I lemma eighth : ((Fintype.card I:ℝ))/(civic (Fintype.card I)) ≤ 1/128:=by rw [div_le_iff₀ (civic_pos _)]; unfold civic; ring_nf; simp lemma fareGroup {w u f:I→ℝ} (hw:∀ i,0 (le_div_iff₀ (civic_pos _)).2 (by linarith only [mul_le_mul_of_nonneg_left (h i) (hw i|>.le),he i]) _=_:=by simp; ring lemma fareMerge {w u f:I→ℝ}(hw:∀ i,0 ?_) ?_ · rw [div_le_iff₀ (hu i), ← div_eq_inv_mul, le_div_iff₀ hC, mul_comm]; exact h i simp [div_eq_mul_inv] have hi:= eighth (I:=I) have hg := fareGroup hw h he; rw [add_div] have hh: 4 * z⁻¹^3/creditP z ≤ 4/512:=by rw [show 4 * z⁻¹^3/creditP z=4/z from (by unfold creditP; field_simp)]; gcongr apply le_trans (add_le_add (add_le_add (le_trans (div_le_div_of_nonneg_right hg ht.le) (by rw [mul_div_cancel_right₀ _ ht.ne'])) hh) (hv.trans hi)); linarith end Budget end YM.PhysicalNext.Repeat.Legato.Campaign.Face