Theorem: Asymptotics.superpolynomialDecay_iff_abs_isBoundedUnder
File: Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean

tactic: refine'
  ⟨fun h z => Tendsto.isBoundedUnder_le (Tendsto.abs (h z)), fun h =>
    (superpolynomialDecay_iff_abs_tendsto_zero l k f).2 fun z => _⟩
state_before: α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : LinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
⊢ SuperpolynomialDecay l k f ↔ ∀ (z : ℕ), IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => abs (k a ^ z * f a)

tactic: obtain ⟨m, hm⟩ := h (z + 1)
state_before: α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : LinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
h : ∀ (z : ℕ), IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => abs (k a ^ z * f a)
z : ℕ
⊢ Tendsto (fun a => abs (k a ^ z * f a)) l (𝓝 0)

tactic: have h1 : Tendsto (fun _ : α => (0 : β)) l (𝓝 0) := tendsto_const_nhds
state_before: case intro
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : LinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
h : ∀ (z : ℕ), IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => abs (k a ^ z * f a)
z : ℕ
m : β
hm : ∀ᶠ (x : β) in Filter.map (fun a => abs (k a ^ (z + 1) * f a)) l, (fun x x_1 => x ≤ x_1) x m
⊢ Tendsto (fun a => abs (k a ^ z * f a)) l (𝓝 0)

tactic: have h2 : Tendsto (fun a : α => |(k a)⁻¹| * m) l (𝓝 0) :=
  MulZeroClass.zero_mul m ▸
    Tendsto.mul_const m ((tendsto_zero_iff_abs_tendsto_zero _).1 hk.inv_tendsto_atTop)
state_before: case intro
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : LinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
h : ∀ (z : ℕ), IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => abs (k a ^ z * f a)
z : ℕ
m : β
hm : ∀ᶠ (x : β) in Filter.map (fun a => abs (k a ^ (z + 1) * f a)) l, (fun x x_1 => x ≤ x_1) x m
h1 : Tendsto (fun x => 0) l (𝓝 0)
⊢ Tendsto (fun a => abs (k a ^ z * f a)) l (𝓝 0)

tactic: refine'
  tendsto_of_tendsto_of_tendsto_of_le_of_le' h1 h2 (eventually_of_forall fun x => abs_nonneg _)
    ((eventually_map.1 hm).mp _)
state_before: case intro
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : LinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
h : ∀ (z : ℕ), IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => abs (k a ^ z * f a)
z : ℕ
m : β
hm : ∀ᶠ (x : β) in Filter.map (fun a => abs (k a ^ (z + 1) * f a)) l, (fun x x_1 => x ≤ x_1) x m
h1 : Tendsto (fun x => 0) l (𝓝 0)
h2 : Tendsto (fun a => abs (k a)⁻¹ * m) l (𝓝 0)
⊢ Tendsto (fun a => abs (k a ^ z * f a)) l (𝓝 0)

tactic: refine' (hk.eventually_ne_atTop 0).mono fun x hk0 hx => _
state_before: case intro
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : LinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
h : ∀ (z : ℕ), IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => abs (k a ^ z * f a)
z : ℕ
m : β
hm : ∀ᶠ (x : β) in Filter.map (fun a => abs (k a ^ (z + 1) * f a)) l, (fun x x_1 => x ≤ x_1) x m
h1 : Tendsto (fun x => 0) l (𝓝 0)
h2 : Tendsto (fun a => abs (k a)⁻¹ * m) l (𝓝 0)
⊢ ∀ᶠ (x : α) in l, (fun x x_1 => x ≤ x_1) (abs (k x ^ (z + 1) * f x)) m → abs (k x ^ z * f x) ≤ abs (k x)⁻¹ * m

tactic: refine' Eq.trans_le _ (mul_le_mul_of_nonneg_left hx <| abs_nonneg (k x)⁻¹)
state_before: case intro
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : LinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
h : ∀ (z : ℕ), IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => abs (k a ^ z * f a)
z : ℕ
m : β
hm : ∀ᶠ (x : β) in Filter.map (fun a => abs (k a ^ (z + 1) * f a)) l, (fun x x_1 => x ≤ x_1) x m
h1 : Tendsto (fun x => 0) l (𝓝 0)
h2 : Tendsto (fun a => abs (k a)⁻¹ * m) l (𝓝 0)
x : α
hk0 : k x ≠ 0
hx : (fun x x_1 => x ≤ x_1) (abs (k x ^ (z + 1) * f x)) m
⊢ abs (k x ^ z * f x) ≤ abs (k x)⁻¹ * m

tactic: rw [← abs_mul, ← mul_assoc, pow_succ, ← mul_assoc, inv_mul_cancel hk0, one_mul]
state_before: case intro
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : LinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
h : ∀ (z : ℕ), IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => abs (k a ^ z * f a)
z : ℕ
m : β
hm : ∀ᶠ (x : β) in Filter.map (fun a => abs (k a ^ (z + 1) * f a)) l, (fun x x_1 => x ≤ x_1) x m
h1 : Tendsto (fun x => 0) l (𝓝 0)
h2 : Tendsto (fun a => abs (k a)⁻¹ * m) l (𝓝 0)
x : α
hk0 : k x ≠ 0
hx : (fun x x_1 => x ≤ x_1) (abs (k x ^ (z + 1) * f x)) m
⊢ abs (k x ^ z * f x) = abs (k x)⁻¹ * abs (k x ^ (z + 1) * f x)