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

tactic: calc (fun (n:ℕ) => (n:ℝ) / log n ^ 2) = fun (n:ℕ) => (n:ℝ) * ((log n) ^ 2)⁻¹ := by
                simp_rw [div_eq_mul_inv]
       _ =o[atTop] fun (n:ℕ) => (n:ℝ) * 1⁻¹    := by
                refine IsBigO.mul_isLittleO (isBigO_refl _ _) ?_
                refine IsLittleO.inv_rev ?main ?zero
                case zero => simp
                case main => calc
                  _ = (fun (_:ℕ) => ((1:ℝ) ^ 2))        := by simp
                  _ =o[atTop] (fun (n:ℕ) => (log n)^2)  :=
                        IsLittleO.pow (IsLittleO.natCast_atTop
                          <| isLittleO_const_log_atTop) (by norm_num)
       _ = (fun (n:ℕ) => (n:ℝ)) := by ext; simp
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => ↑n / log ↑n ^ 2) =o[atTop] fun n => ↑n
state_after: no goals

tactic: simp_rw [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
⊢ (fun n => ↑n / log ↑n ^ 2) = fun n => ↑n * (log ↑n ^ 2)⁻¹
state_after: no goals

tactic: refine IsBigO.mul_isLittleO (isBigO_refl _ _) ?_
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => ↑n * (log ↑n ^ 2)⁻¹) =o[atTop] fun n => ↑n * 1⁻¹
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => (log ↑n ^ 2)⁻¹) =o[atTop] fun n => 1⁻¹

tactic: refine IsLittleO.inv_rev ?main ?zero
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => (log ↑n ^ 2)⁻¹) =o[atTop] fun n => 1⁻¹
state_after: case main
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => 1) =o[atTop] fun n => log ↑n ^ 2

case zero
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ ∀ᶠ (x : ℕ) in atTop, 1 = 0 → log ↑x ^ 2 = 0

tactic: case zero => simp
state_before: case main
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => 1) =o[atTop] fun n => log ↑n ^ 2

case zero
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ ∀ᶠ (x : ℕ) in atTop, 1 = 0 → log ↑x ^ 2 = 0
state_after: case main
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => 1) =o[atTop] fun n => log ↑n ^ 2

tactic: case main => calc
  _ = (fun (_:ℕ) => ((1:ℝ) ^ 2))        := by simp
  _ =o[atTop] (fun (n:ℕ) => (log n)^2)  :=
        IsLittleO.pow (IsLittleO.natCast_atTop
          <| isLittleO_const_log_atTop) (by norm_num)
state_before: case main
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => 1) =o[atTop] fun n => log ↑n ^ 2
state_after: no goals

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

tactic: calc
_ = (fun (_:ℕ) => ((1:ℝ) ^ 2))        := by simp
_ =o[atTop] (fun (n:ℕ) => (log n)^2)  :=
IsLittleO.pow (IsLittleO.natCast_atTop
<| isLittleO_const_log_atTop) (by norm_num)
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => 1) =o[atTop] fun n => log ↑n ^ 2
state_after: no goals

tactic: simp
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun n => 1) = fun x => 1 ^ 2
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
⊢ 0 < 2
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
⊢ (fun n => ↑n * 1⁻¹) = fun n => ↑n
state_after: case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x✝ : ℕ
⊢ ↑x✝ * 1⁻¹ = ↑x✝

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
x✝ : ℕ
⊢ ↑x✝ * 1⁻¹ = ↑x✝
state_after: no goals