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

tactic: calc (fun (n : ℕ) => ε (b i * n) - ε n) =Θ[atTop] fun n => (-log (b i)) / (log n)^2 := by
                exact (R.isEquivalent_smoothingFn_sub_self i).isTheta
  _ = fun (n:ℕ) => (-log (b i)) * 1 / (log n)^2 := by simp only [mul_one]
  _ = fun (n:ℕ) => -log (b i) * (1 / (log n)^2) := by simp_rw [← mul_div_assoc]
  _ =Θ[atTop] fun (n:ℕ) => 1 / (log n)^2 := by
                have : -log (b i) ≠ 0 := by
                  rw [neg_ne_zero]
                  exact Real.log_ne_zero_of_pos_of_ne_one
                          (R.b_pos i) (ne_of_lt <| R.b_lt_one i)
                rw [← isTheta_const_mul_right this]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
⊢ (fun n => ε (b i * ↑n) - ε ↑n) =Θ[atTop] fun n => 1 / log ↑n ^ 2
state_after: no goals

tactic: exact (R.isEquivalent_smoothingFn_sub_self i).isTheta
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
⊢ (fun n => ε (b i * ↑n) - ε ↑n) =Θ[atTop] fun n => -log (b i) / log ↑n ^ 2
state_after: no goals

tactic: simp only [mul_one]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
⊢ (fun n => -log (b i) / log ↑n ^ 2) = fun n => -log (b i) * 1 / log ↑n ^ 2
state_after: no goals

tactic: simp_rw [← mul_div_assoc]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
⊢ (fun n => -log (b i) * 1 / log ↑n ^ 2) = fun n => -log (b i) * (1 / log ↑n ^ 2)
state_after: no goals

tactic: have : -log (b i) ≠ 0 := by
  rw [neg_ne_zero]
  exact Real.log_ne_zero_of_pos_of_ne_one
          (R.b_pos i) (ne_of_lt <| R.b_lt_one i)
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
⊢ (fun n => -log (b i) * (1 / log ↑n ^ 2)) =Θ[atTop] fun n => 1 / log ↑n ^ 2
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
this : -log (b i) ≠ 0
⊢ (fun n => -log (b i) * (1 / log ↑n ^ 2)) =Θ[atTop] fun n => 1 / log ↑n ^ 2

tactic: rw [← isTheta_const_mul_right this]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
this : -log (b i) ≠ 0
⊢ (fun n => -log (b i) * (1 / log ↑n ^ 2)) =Θ[atTop] fun n => 1 / log ↑n ^ 2
state_after: no goals

tactic: rw [neg_ne_zero]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
⊢ -log (b i) ≠ 0
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
⊢ log (b i) ≠ 0

tactic: exact Real.log_ne_zero_of_pos_of_ne_one
        (R.b_pos i) (ne_of_lt <| R.b_lt_one i)
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
⊢ log (b i) ≠ 0
state_after: no goals