import YM.Next.RANK.Orchid import YM.TraceExtension.Prom.Hill.Camps set_option autoImplicit false noncomputable section namespace YM.Next.Rank.Tapes open Function MeasureTheory Filter Asymptotics Lattice Wilson RG Perch Atlas Rise Normal Ribbon Spindle Glyph Exponential MvPolynomial Camp Peak Station Ac Alarm Thirst Corona Value Marker Cells Edition Finset Relation Paint Read open scoped BigOperators Classical Topology Matrix.Norms.Frobenius variable {G : Gauge} (Q : Purse) private lemma tetherSky : ∀ᶠ s in atTop, walls s ≤ 64*walls (s/2):= by filter_upwards [(Real.tendsto_log_atTop.comp half).eventually_ge_atTop (max 1 (Real.log 2)),eventually_gt_atTop 0] with s hs hp have hx : 1 ≤ Real.log (s/2):= le_trans (le_max_left ..) hs; have h₂:Real.log 2 ≤ Real.log (s/2):= le_trans (le_max_right ..) hs have he : Real.log s= Real.log (s/2)+Real.log 2:= by rw [Real.log_div (by positivity) (by norm_num),sub_add_cancel] have ht : M s ≤8 * M (s/2):= by have hz: (M s:ℝ)?_,fun i hv hV=>?_,fun i H h=> le_trans hy (hh i ((Station.widerSky ..).trans H) h).1,he⟩ · let w:= A.S.toDepth (Station.widerSky A u k) p; let lh:=Station.widthSky A u k have hz:w.count.val≤(A.S.side i p).val:= by apply le_trans (b:=(A.S.side l p).val) · rw [w.exact_size];exact Nat.le_mul_of_pos_left _ (A.S.side lh p).property exact Nat.mul_le_mul_left (A.S.period p).val (A.S.den_strict.monotone hv) have H': (A.clock.coverSize k)^10 ≤ w.count.val:= H.surplusage p change 2*(q*f i+1)< _; linarith only [H',hz,he i hv hB,Nat.zero_le (q*f i)] intro r have hs' : L ≤ (A.S.block i).val:= Nat.cast_le.mp ((show (L:ℝ)=_ from hl.symm).trans_le (H.blocks i ((Station.widerSky ..).trans hv) hV)) have ha' : 128*q≤r.count.val:= hL.trans hs' change q*f (i+1)+r.count.val≤ f i*r.count.val have hx := hh i ((Station.widerSky ..).trans hv) hV.le; have ht': f (i+1) ≤ 64 * f i := (hh (i+1) (((Station.widerSky ..).trans hv).trans (Nat.le_succ _)) hV).2.trans (ht.trans (Nat.mul_le_mul_left _ hx.1)) have hq : 8 ≤ f i:= Nat.le_trans (show 8≤walls (s/2) from hy) hx.1; linarith only [Nat.mul_le_mul_right (f i) ha',Nat.mul_le_mul_right r.count.val hq,Nat.mul_le_mul_left q ht',Nat.zero_le r.count.val] end YM.Next.Rank.Tapes