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

tactic: refine' (superpolynomialDecay_iff_zpow_tendsto_zero f hk).trans _
state_before: α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
⊢ SuperpolynomialDecay l k f ↔ ∀ (z : ℤ), f =O[l] fun a => k a ^ z

tactic: have hk0 : ∀ᶠ x in l, k x ≠ 0 := hk.eventually_ne_atTop 0
state_before: α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
⊢ (∀ (z : ℤ), Tendsto (fun a => k a ^ z * f a) l (𝓝 0)) ↔ ∀ (z : ℤ), f =O[l] fun a => k a ^ z

tactic: refine' ⟨fun h z => _, fun h z => _⟩
state_before: α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
⊢ (∀ (z : ℤ), Tendsto (fun a => k a ^ z * f a) l (𝓝 0)) ↔ ∀ (z : ℤ), f =O[l] fun a => k a ^ z

tactic: refine' isBigO_of_div_tendsto_nhds (hk0.mono fun x hx hxz => absurd (zpow_eq_zero hxz) hx) 0 _
state_before: case refine'_1
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), Tendsto (fun a => k a ^ z * f a) l (𝓝 0)
z : ℤ
⊢ f =O[l] fun a => k a ^ z

tactic: have : (fun a : α => k a ^ z)⁻¹ = fun a : α => k a ^ (-z) := funext fun x => by simp
state_before: case refine'_1
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), Tendsto (fun a => k a ^ z * f a) l (𝓝 0)
z : ℤ
⊢ Tendsto (f / fun a => k a ^ z) l (𝓝 0)

tactic: rw [div_eq_mul_inv, mul_comm f, this]
state_before: case refine'_1
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), Tendsto (fun a => k a ^ z * f a) l (𝓝 0)
z : ℤ
this : (fun a => k a ^ z)⁻¹ = fun a => k a ^ (-z)
⊢ Tendsto (f / fun a => k a ^ z) l (𝓝 0)

tactic: exact h (-z)
state_before: case refine'_1
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), Tendsto (fun a => k a ^ z * f a) l (𝓝 0)
z : ℤ
this : (fun a => k a ^ z)⁻¹ = fun a => k a ^ (-z)
⊢ Tendsto ((fun a => k a ^ (-z)) * f) l (𝓝 0)

tactic: simp
state_before: α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), Tendsto (fun a => k a ^ z * f a) l (𝓝 0)
z : ℤ
x : α
⊢ (fun a => k a ^ z)⁻¹ x = k x ^ (-z)

tactic: suffices : (fun a : α => k a ^ z * f a) =O[l] fun a : α => (k a)⁻¹
state_before: case refine'_2
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), f =O[l] fun a => k a ^ z
z : ℤ
⊢ Tendsto (fun a => k a ^ z * f a) l (𝓝 0)

tactic: exact IsBigO.trans_tendsto this hk.inv_tendsto_atTop
state_before: case refine'_2
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), f =O[l] fun a => k a ^ z
z : ℤ
this : (fun a => k a ^ z * f a) =O[l] fun a => (k a)⁻¹
⊢ Tendsto (fun a => k a ^ z * f a) l (𝓝 0)

case this
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), f =O[l] fun a => k a ^ z
z : ℤ
⊢ (fun a => k a ^ z * f a) =O[l] fun a => (k a)⁻¹

tactic: refine'
  ((isBigO_refl (fun a => k a ^ z) l).mul (h (-(z + 1)))).trans
    (IsBigO.of_bound 1 <| hk0.mono fun a ha0 => _)
state_before: case this
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), f =O[l] fun a => k a ^ z
z : ℤ
⊢ (fun a => k a ^ z * f a) =O[l] fun a => (k a)⁻¹

tactic: simp only [one_mul, neg_add z 1, zpow_add₀ ha0, ← mul_assoc, zpow_neg,
  mul_inv_cancel (zpow_ne_zero z ha0), zpow_one]
state_before: case this
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), f =O[l] fun a => k a ^ z
z : ℤ
a : α
ha0 : k a ≠ 0
⊢ ‖k a ^ z * k a ^ (-(z + 1))‖ ≤ 1 * ‖(k a)⁻¹‖

tactic: rfl
state_before: case this
α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : NormedLinearOrderedField β
inst✝ : OrderTopology β
hk : Tendsto k l atTop
hk0 : ∀ᶠ (x : α) in l, k x ≠ 0
h : ∀ (z : ℤ), f =O[l] fun a => k a ^ z
z : ℤ
a : α
ha0 : k a ≠ 0
⊢ ‖(k a)⁻¹‖ ≤ ‖(k a)⁻¹‖