l3lab/ntp-mathlib huggingface dataset:
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun x => (-x * log x ^ 2)⁻¹) =o[atTop] fun x => (x * 1)⁻¹

Next tactic:
refine IsLittleO.inv_rev ?_ ?_
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · 

Proof state:
case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun x => x * 1) =o[atTop] fun x => -x * log x ^ 2

Next tactic:
refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; aesop (add safe isBigO_refl)) ?_
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by 

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun x => x) =O[atTop] fun x => -x

Next tactic:
rw [isBigO_neg_right]
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; 

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun x => x) =O[atTop] fun x => x

Next tactic:
aesop (add safe isBigO_refl)
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; aesop (add safe isBigO_refl)) ?_
              

Proof state:
case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun x => 1) =o[atTop] fun x => log x ^ 2

Next tactic:
rw [isLittleO_one_left_iff]
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; aesop (add safe isBigO_refl)) ?_
              rw [isLittleO_one_left_iff]
              

Proof state:
case refine_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ Tendsto (fun x => ‖log x ^ 2‖) atTop atTop

Next tactic:
exact Tendsto.comp tendsto_norm_atTop_atTop
                <| Tendsto.comp (tendsto_pow_atTop (by norm_num)) tendsto_log_atTop
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; aesop (add safe isBigO_refl)) ?_
              rw [isLittleO_one_left_iff]
              exact Tendsto.comp tendsto_norm_atTop_atTop
                <| Tendsto.comp (tendsto_pow_atTop (by 

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ 2 ≠ 0

Next tactic:
norm_num
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; aesop (add safe isBigO_refl)) ?_
              rw [isLittleO_one_left_iff]
              exact Tendsto.comp tendsto_norm_atTop_atTop
                <| Tendsto.comp (tendsto_pow_atTop (by norm_num)) tendsto_log_atTop
            · 

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

Next tactic:
exact Filter.eventually_of_forall (fun x hx => by rw [mul_one] at hx; simp [hx])
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; aesop (add safe isBigO_refl)) ?_
              rw [isLittleO_one_left_iff]
              exact Tendsto.comp tendsto_norm_atTop_atTop
                <| Tendsto.comp (tendsto_pow_atTop (by norm_num)) tendsto_log_atTop
            · exact Filter.eventually_of_forall (fun x hx => by 

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : x * 1 = 0
⊢ -x * log x ^ 2 = 0

Next tactic:
rw [mul_one] at hx
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; aesop (add safe isBigO_refl)) ?_
              rw [isLittleO_one_left_iff]
              exact Tendsto.comp tendsto_norm_atTop_atTop
                <| Tendsto.comp (tendsto_pow_atTop (by norm_num)) tendsto_log_atTop
            · exact Filter.eventually_of_forall (fun x hx => by rw [mul_one] at hx; 

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : x = 0
⊢ -x * log x ^ 2 = 0

Next tactic:
simp [hx]
lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ := calc
  deriv ε =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
            filter_upwards [eventually_gt_atTop 1] with x hx
            rw [deriv_smoothingFn hx]
    _ = fun x => (-x * log x ^ 2)⁻¹ := by
            simp_rw [neg_div, div_eq_mul_inv, ← mul_inv, neg_inv, neg_mul]
    _ =o[atTop] fun x => (x * 1)⁻¹ := by
            refine IsLittleO.inv_rev ?_ ?_
            · refine IsBigO.mul_isLittleO
                (by rw [isBigO_neg_right]; aesop (add safe isBigO_refl)) ?_
              rw [isLittleO_one_left_iff]
              exact Tendsto.comp tendsto_norm_atTop_atTop
                <| Tendsto.comp (tendsto_pow_atTop (by norm_num)) tendsto_log_atTop
            · exact Filter.eventually_of_forall (fun x hx => by rw [mul_one] at hx; simp [hx])
    _ = fun x => x⁻¹ := by 

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun x => (x * 1)⁻¹) = fun x => x⁻¹

Next tactic:
simp
lemma eventually_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] -(deriv ε) := by
        

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (deriv fun x => 1 - ε x) =ᶠ[atTop] -deriv ε

Next tactic:
filter_upwards [eventually_gt_atTop 1] with x hx
lemma eventually_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] -(deriv ε) := by
        filter_upwards [eventually_gt_atTop 1] with x hx; 

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv (fun x => 1 - ε x) x = (-deriv ε) x

Next tactic:
rw [deriv_sub]
lemma eventually_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] -(deriv ε) := by
        filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> 

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv (fun x => 1) x - deriv (fun x => ε x) x = (-deriv ε) x

Next tactic:
aesop
lemma eventually_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] -(deriv ε) := by
        filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> 

Proof state:
case h.hf
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ DifferentiableAt ℝ (fun x => 1) x

Next tactic:
aesop
lemma eventually_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] -(deriv ε) := by
        filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> 

Proof state:
case h.hg
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ DifferentiableAt ℝ (fun x => ε x) x

Next tactic:
aesop
lemma eventually_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] -(deriv ε) := by
        filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> aesop
    _ =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := by
        

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ -deriv ε =ᶠ[atTop] fun x => x⁻¹ / log x ^ 2

Next tactic:
filter_upwards [eventually_gt_atTop 1] with x hx
lemma eventually_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] -(deriv ε) := by
        filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> aesop
    _ =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) := by
        filter_upwards [eventually_gt_atTop 1] with x hx
        

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ (-deriv ε) x = x⁻¹ / log x ^ 2

Next tactic:
simp [deriv_smoothingFn hx, neg_div]
lemma eventually_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] deriv ε := by
          

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (deriv fun x => 1 + ε x) =ᶠ[atTop] deriv ε

Next tactic:
filter_upwards [eventually_gt_atTop 1] with x hx
lemma eventually_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] deriv ε := by
          filter_upwards [eventually_gt_atTop 1] with x hx; 

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv (fun x => 1 + ε x) x = deriv ε x

Next tactic:
rw [deriv_add]
lemma eventually_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] deriv ε := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_add] <;> 

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv (fun x => 1) x + deriv (fun x => ε x) x = deriv ε x

Next tactic:
aesop
lemma eventually_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] deriv ε := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_add] <;> 

Proof state:
case h.hf
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ DifferentiableAt ℝ (fun x => 1) x

Next tactic:
aesop
lemma eventually_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] deriv ε := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_add] <;> 

Proof state:
case h.hg
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ DifferentiableAt ℝ (fun x => ε x) x

Next tactic:
aesop
lemma eventually_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] deriv ε := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_add] <;> aesop
    _ =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
          

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ deriv ε =ᶠ[atTop] fun x => -x⁻¹ / log x ^ 2

Next tactic:
filter_upwards [eventually_gt_atTop 1] with x hx
lemma eventually_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] deriv ε := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_add] <;> aesop
    _ =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) := by
          filter_upwards [eventually_gt_atTop 1] with x hx
          

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv ε x = -x⁻¹ / log x ^ 2

Next tactic:
simp [deriv_smoothingFn hx]
lemma isLittleO_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] fun z => -(deriv ε z) := by
          

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (deriv fun x => 1 - ε x) =ᶠ[atTop] fun z => -deriv ε z

Next tactic:
filter_upwards [eventually_gt_atTop 1] with x hx
lemma isLittleO_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] fun z => -(deriv ε z) := by
          filter_upwards [eventually_gt_atTop 1] with x hx; 

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv (fun x => 1 - ε x) x = -deriv ε x

Next tactic:
rw [deriv_sub]
lemma isLittleO_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] fun z => -(deriv ε z) := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> 

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv (fun x => 1) x - deriv (fun x => ε x) x = -deriv ε x

Next tactic:
aesop
lemma isLittleO_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] fun z => -(deriv ε z) := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> 

Proof state:
case h.hf
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ DifferentiableAt ℝ (fun x => 1) x

Next tactic:
aesop
lemma isLittleO_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] fun z => -(deriv ε z) := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> 

Proof state:
case h.hg
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ DifferentiableAt ℝ (fun x => ε x) x

Next tactic:
aesop
lemma isLittleO_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] fun z => -(deriv ε z) := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> aesop
    _ =o[atTop] fun x => x⁻¹ := by 

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun z => -deriv ε z) =o[atTop] fun x => x⁻¹

Next tactic:
rw [isLittleO_neg_left]
lemma isLittleO_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 - ε x) =ᶠ[atTop] fun z => -(deriv ε z) := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_sub] <;> aesop
    _ =o[atTop] fun x => x⁻¹ := by rw [isLittleO_neg_left]; 

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (fun z => deriv ε z) =o[atTop] fun x => x⁻¹

Next tactic:
exact isLittleO_deriv_smoothingFn
lemma isLittleO_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] fun z => deriv ε z := by
          

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ (deriv fun x => 1 + ε x) =ᶠ[atTop] fun z => deriv ε z

Next tactic:
filter_upwards [eventually_gt_atTop 1] with x hx
lemma isLittleO_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] fun z => deriv ε z := by
          filter_upwards [eventually_gt_atTop 1] with x hx; 

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv (fun x => 1 + ε x) x = deriv ε x

Next tactic:
rw [deriv_add]
lemma isLittleO_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] fun z => deriv ε z := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_add] <;> 

Proof state:
case h
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ deriv (fun x => 1) x + deriv (fun x => ε x) x = deriv ε x

Next tactic:
aesop
lemma isLittleO_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] fun z => deriv ε z := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_add] <;> 

Proof state:
case h.hf
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ DifferentiableAt ℝ (fun x => 1) x

Next tactic:
aesop
lemma isLittleO_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =o[atTop] fun (x:ℝ) => x⁻¹ := calc
  deriv (fun x => 1 + ε x) =ᶠ[atTop] fun z => deriv ε z := by
          filter_upwards [eventually_gt_atTop 1] with x hx; rw [deriv_add] <;> 

Proof state:
case h.hg
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
x : ℝ
hx : 1 < x
⊢ DifferentiableAt ℝ (fun x => ε x) x

Next tactic:
aesop
lemma eventually_one_add_smoothingFn_pos : ∀ᶠ (n:ℕ) in atTop, 0 < 1 + ε n := by
  

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ ∀ᶠ (n : ℕ) in atTop, 0 < 1 + ε ↑n

Next tactic:
have h₁ := isLittleO_smoothingFn_one
lemma eventually_one_add_smoothingFn_pos : ∀ᶠ (n:ℕ) in atTop, 0 < 1 + ε n := by
  have h₁ := isLittleO_smoothingFn_one
  

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
h₁ : ε =o[atTop] fun x => 1
⊢ ∀ᶠ (n : ℕ) in atTop, 0 < 1 + ε ↑n

Next tactic:
rw [isLittleO_iff] at h₁
lemma eventually_one_add_smoothingFn_pos : ∀ᶠ (n:ℕ) in atTop, 0 < 1 + ε n := by
  have h₁ := isLittleO_smoothingFn_one
  rw [isLittleO_iff] at h₁
  

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
h₁ : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x : ℝ) in atTop, ‖ε x‖ ≤ c * ‖1‖
⊢ ∀ᶠ (n : ℕ) in atTop, 0 < 1 + ε ↑n

Next tactic:
refine Eventually.nat_cast_atTop (p := fun n => 0 < 1 + ε n) ?_
lemma eventually_one_add_smoothingFn_pos : ∀ᶠ (n:ℕ) in atTop, 0 < 1 + ε n := by
  have h₁ := isLittleO_smoothingFn_one
  rw [isLittleO_iff] at h₁
  refine Eventually.nat_cast_atTop (p := fun n => 0 < 1 + ε n) ?_
  

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
h₁ : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x : ℝ) in atTop, ‖ε x‖ ≤ c * ‖1‖
⊢ ∀ᶠ (x : ℝ) in atTop, (fun n => 0 < 1 + ε n) x

Next tactic:
filter_upwards [h₁ (by norm_num : (0:ℝ) < 1/2), eventually_gt_atTop 1] with x _ hx'