Theorem: AkraBazziRecurrence.isEquivalent_deriv_rpow_p_mul_one_add_smoothingFn
File: Mathlib/Computability/AkraBazzi/AkraBazzi.lean

tactic: refine IsEquivalent.add_isLittleO ?one ?two
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => p * z ^ (p - 1) * (1 + ε z) - z ^ (p - 1) / log z ^ 2) ~[atTop] fun z => p * z ^ (p - 1)
state_after: case one
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => p * z ^ (p - 1) * (1 + ε z)) ~[atTop] fun z => p * z ^ (p - 1)

case two
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => -(z ^ (p - 1) / log z ^ 2)) =o[atTop] fun z => p * z ^ (p - 1)

tactic: case one => calc
  (fun z => p * z ^ (p-1) * (1 + ε z)) ~[atTop] fun z => p * z ^ (p-1) * 1 :=
        IsEquivalent.mul IsEquivalent.refl isEquivalent_one_add_smoothingFn_one
  _ = fun z => p * z ^ (p-1) := by ext; ring
state_before: case one
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => p * z ^ (p - 1) * (1 + ε z)) ~[atTop] fun z => p * z ^ (p - 1)

case two
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => -(z ^ (p - 1) / log z ^ 2)) =o[atTop] fun z => p * z ^ (p - 1)
state_after: case two
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => -(z ^ (p - 1) / log z ^ 2)) =o[atTop] fun z => p * z ^ (p - 1)

tactic: case two => calc
  (fun z => -(z ^ (p-1) / (log z ^ 2))) =o[atTop] fun z => z ^ (p-1) / 1 := by
              simp_rw [isLittleO_neg_left, div_eq_mul_inv]
              refine IsBigO.mul_isLittleO (isBigO_refl _ _)
                (IsLittleO.inv_rev ?_ (by aesop (add safe eventually_of_forall)))
              rw [isLittleO_const_left]
              refine Or.inr <| Tendsto.comp tendsto_norm_atTop_atTop ?_
              exact Tendsto.comp (g := fun z => z ^ 2)
                (tendsto_pow_atTop (by norm_num)) tendsto_log_atTop
  _ = fun z => z ^ (p-1) := by ext; simp
  _ =Θ[atTop] fun z => p * z ^ (p-1) := by
              exact IsTheta.const_mul_right hp <| isTheta_refl _ _
state_before: case two
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => -(z ^ (p - 1) / log z ^ 2)) =o[atTop] fun z => p * z ^ (p - 1)
state_after: no goals

tactic: calc
(fun z => p * z ^ (p-1) * (1 + ε z)) ~[atTop] fun z => p * z ^ (p-1) * 1 :=
IsEquivalent.mul IsEquivalent.refl isEquivalent_one_add_smoothingFn_one
_ = fun z => p * z ^ (p-1) := by ext; ring
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => p * z ^ (p - 1) * (1 + ε z)) ~[atTop] fun z => p * z ^ (p - 1)
state_after: no goals

tactic: ext
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => p * z ^ (p - 1) * 1) = fun z => p * z ^ (p - 1)
state_after: case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
x✝ : ℝ
⊢ p * x✝ ^ (p - 1) * 1 = p * x✝ ^ (p - 1)

tactic: ring
state_before: case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
x✝ : ℝ
⊢ p * x✝ ^ (p - 1) * 1 = p * x✝ ^ (p - 1)
state_after: no goals

tactic: calc
(fun z => -(z ^ (p-1) / (log z ^ 2))) =o[atTop] fun z => z ^ (p-1) / 1 := by
  simp_rw [isLittleO_neg_left, div_eq_mul_inv]
  refine IsBigO.mul_isLittleO (isBigO_refl _ _)
    (IsLittleO.inv_rev ?_ (by aesop (add safe eventually_of_forall)))
  rw [isLittleO_const_left]
  refine Or.inr <| Tendsto.comp tendsto_norm_atTop_atTop ?_
  exact Tendsto.comp (g := fun z => z ^ 2)
    (tendsto_pow_atTop (by norm_num)) tendsto_log_atTop
_ = fun z => z ^ (p-1) := by ext; simp
_ =Θ[atTop] fun z => p * z ^ (p-1) := by
  exact IsTheta.const_mul_right hp <| isTheta_refl _ _
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => -(z ^ (p - 1) / log z ^ 2)) =o[atTop] fun z => p * z ^ (p - 1)
state_after: no goals

tactic: simp_rw [isLittleO_neg_left, div_eq_mul_inv]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => -(z ^ (p - 1) / log z ^ 2)) =o[atTop] fun z => z ^ (p - 1) / 1
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun x => x ^ (p - 1) * (log x ^ 2)⁻¹) =o[atTop] fun z => z ^ (p - 1) * 1⁻¹

tactic: refine IsBigO.mul_isLittleO (isBigO_refl _ _)
  (IsLittleO.inv_rev ?_ (by aesop (add safe eventually_of_forall)))
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun x => x ^ (p - 1) * (log x ^ 2)⁻¹) =o[atTop] fun z => z ^ (p - 1) * 1⁻¹
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => 1) =o[atTop] fun x => log x ^ 2

tactic: rw [isLittleO_const_left]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => 1) =o[atTop] fun x => log x ^ 2
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ 1 = 0 ∨ Tendsto (Norm.norm ∘ fun x => log x ^ 2) atTop atTop

tactic: refine Or.inr <| Tendsto.comp tendsto_norm_atTop_atTop ?_
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ 1 = 0 ∨ Tendsto (Norm.norm ∘ fun x => log x ^ 2) atTop atTop
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ Tendsto (fun x => log x ^ 2) atTop atTop

tactic: exact Tendsto.comp (g := fun z => z ^ 2)
  (tendsto_pow_atTop (by norm_num)) tendsto_log_atTop
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ Tendsto (fun x => log x ^ 2) atTop atTop
state_after: no goals

tactic: aesop (add safe eventually_of_forall)
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ ∀ᶠ (x : ℝ) in atTop, 1 = 0 → log x ^ 2 = 0
state_after: no goals

tactic: norm_num
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ 2 ≠ 0
state_after: no goals

tactic: ext
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => z ^ (p - 1) / 1) = fun z => z ^ (p - 1)
state_after: case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
x✝ : ℝ
⊢ x✝ ^ (p - 1) / 1 = x✝ ^ (p - 1)

tactic: simp
state_before: case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
x✝ : ℝ
⊢ x✝ ^ (p - 1) / 1 = x✝ ^ (p - 1)
state_after: no goals

tactic: exact IsTheta.const_mul_right hp <| isTheta_refl _ _
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
p : ℝ
hp : p ≠ 0
⊢ (fun z => z ^ (p - 1)) =Θ[atTop] fun z => p * z ^ (p - 1)
state_after: no goals