l3lab/ntp-mathlib huggingface dataset:
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
j : J
x : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j
⊢ MonCat.FilteredColimits.M.mk (F ⋙ forget₂ SemiRingCatMax MonCat) { fst := j, snd := x * 0 } =
    AddMonCat.FilteredColimits.M.mk ((F ⋙ forget₂ SemiRingCat AddCommMonCat) ⋙ forget₂ AddCommMonCat AddMonCat)
      { fst := j, snd := 0 }

Next tactic:
rw [mul_zero x]
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
j : J
x : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j
⊢ MonCat.FilteredColimits.M.mk (F ⋙ forget₂ SemiRingCatMax MonCat) { fst := j, snd := 0 } =
    AddMonCat.FilteredColimits.M.mk ((F ⋙ forget₂ SemiRingCat AddCommMonCat) ⋙ forget₂ AddCommMonCat AddMonCat)
      { fst := j, snd := 0 }

Next tactic:
rfl
/-- The function `x ^ y` tends to `+∞` at `+∞` for any positive real `y`. -/
theorem tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) : Tendsto (fun x : ℝ => x ^ y) atTop atTop := by
  

Proof state:
y : ℝ
hy : 0 < y
⊢ Tendsto (fun x => x ^ y) atTop atTop

Next tactic:
rw [tendsto_atTop_atTop]
/-- The function `x ^ y` tends to `+∞` at `+∞` for any positive real `y`. -/
theorem tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) : Tendsto (fun x : ℝ => x ^ y) atTop atTop := by
  rw [tendsto_atTop_atTop]
  

Proof state:
y : ℝ
hy : 0 < y
⊢ ∀ (b : ℝ), ∃ i, ∀ (a : ℝ), i ≤ a → b ≤ a ^ y

Next tactic:
intro b
/-- The function `x ^ y` tends to `+∞` at `+∞` for any positive real `y`. -/
theorem tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) : Tendsto (fun x : ℝ => x ^ y) atTop atTop := by
  rw [tendsto_atTop_atTop]
  intro b
  

Proof state:
y : ℝ
hy : 0 < y
b : ℝ
⊢ ∃ i, ∀ (a : ℝ), i ≤ a → b ≤ a ^ y

Next tactic:
use max b 0 ^ (1 / y)
/-- The function `x ^ y` tends to `+∞` at `+∞` for any positive real `y`. -/
theorem tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) : Tendsto (fun x : ℝ => x ^ y) atTop atTop := by
  rw [tendsto_atTop_atTop]
  intro b
  use max b 0 ^ (1 / y)
  

Proof state:
case h
y : ℝ
hy : 0 < y
b : ℝ
⊢ ∀ (a : ℝ), max b 0 ^ (1 / y) ≤ a → b ≤ a ^ y

Next tactic:
intro x hx
/-- The function `x ^ y` tends to `+∞` at `+∞` for any positive real `y`. -/
theorem tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) : Tendsto (fun x : ℝ => x ^ y) atTop atTop := by
  rw [tendsto_atTop_atTop]
  intro b
  use max b 0 ^ (1 / y)
  intro x hx
  

Proof state:
case h
y : ℝ
hy : 0 < y
b x : ℝ
hx : max b 0 ^ (1 / y) ≤ x
⊢ b ≤ x ^ y

Next tactic:
exact
    le_of_max_le_left
      (by
        convert rpow_le_rpow (rpow_nonneg_of_nonneg (le_max_right b 0) (1 / y)) hx (le_of_lt hy)
          using 1
        rw [← rpow_mul (le_max_right b 0), (eq_div_iff (ne_of_gt hy)).mp rfl, Real.rpow_one])
/-- The function `x ^ y` tends to `+∞` at `+∞` for any positive real `y`. -/
theorem tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) : Tendsto (fun x : ℝ => x ^ y) atTop atTop := by
  rw [tendsto_atTop_atTop]
  intro b
  use max b 0 ^ (1 / y)
  intro x hx
  exact
    le_of_max_le_left
      (by
        

Proof state:
y : ℝ
hy : 0 < y
b x : ℝ
hx : max b 0 ^ (1 / y) ≤ x
⊢ max b ?m.763 ≤ x ^ y

Next tactic:
convert rpow_le_rpow (rpow_nonneg_of_nonneg (le_max_right b 0) (1 / y)) hx (le_of_lt hy)
          using 1
/-- The function `x ^ y` tends to `+∞` at `+∞` for any positive real `y`. -/
theorem tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) : Tendsto (fun x : ℝ => x ^ y) atTop atTop := by
  rw [tendsto_atTop_atTop]
  intro b
  use max b 0 ^ (1 / y)
  intro x hx
  exact
    le_of_max_le_left
      (by
        convert rpow_le_rpow (rpow_nonneg_of_nonneg (le_max_right b 0) (1 / y)) hx (le_of_lt hy)
          using 1
        

Proof state:
case h.e'_3
y : ℝ
hy : 0 < y
b x : ℝ
hx : max b 0 ^ (1 / y) ≤ x
⊢ max b ?m.763 = (max b 0 ^ (1 / y)) ^ y

Next tactic:
rw [← rpow_mul (le_max_right b 0), (eq_div_iff (ne_of_gt hy)).mp rfl, Real.rpow_one]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
⊢ Tendsto (Real.rpow b) atTop (𝓝 0)

Next tactic:
show Tendsto (fun z => b^z) atTop (𝓝 0)
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
⊢ Tendsto (fun z => b ^ z) atTop (𝓝 0)

Next tactic:
rcases lt_trichotomy b 0 with hb|rfl|hb
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  

Proof state:
case inl
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun z => b ^ z) atTop (𝓝 0)
case inr.inl
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun z => 0 ^ z) atTop (𝓝 0)
case inr.inr b : ℝ hb₀ : -1 < b hb₁ : b < 1 hb : 0 < b ⊢ Tendsto (fun z => b ^ z) atTop (𝓝 0)

Next tactic:
case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun z => b ^ z) atTop (𝓝 0)

Next tactic:
case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun z => b ^ z) atTop (𝓝 0)

Next tactic:
simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun z => rexp (log b * z) * cos (z * π)) atTop (𝓝 0)

Next tactic:
rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun z => rexp (log b * z) * cos (z * π)) =o[atTop] fun _x => 1 * 1

Next tactic:
refine IsLittleO.mul_isBigO ?exp ?cos
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    

Proof state:
case exp
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun z => rexp (log b * z)) =o[atTop] fun _x => 1
case cos b : ℝ hb₀ : -1 < b hb₁ : b < 1 hb : b < 0 ⊢ (fun z => cos (z * π)) =O[atTop] fun _x => 1

Next tactic:
case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun z => rexp (log b * z)) =o[atTop] fun _x => 1

Next tactic:
case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun z => rexp (log b * z)) =o[atTop] fun _x => 1

Next tactic:
rw [isLittleO_const_iff one_ne_zero]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun z => rexp (log b * z)) atTop (𝓝 0)

Next tactic:
refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ log b < 0

Next tactic:
rw [← log_neg_eq_log, log_neg_iff (by linarith)]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by 

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ 0 < -b

Next tactic:
linarith
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ -b < 1

Next tactic:
linarith
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    

Proof state:
case cos
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun z => cos (z * π)) =O[atTop] fun _x => 1

Next tactic:
case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun z => cos (z * π)) =O[atTop] fun _x => 1

Next tactic:
case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun z => cos (z * π)) =O[atTop] fun _x => 1

Next tactic:
rw [isBigO_iff]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ ∃ c, ∀ᶠ (x : ℝ) in atTop, ‖cos (x * π)‖ ≤ c * ‖1‖

Next tactic:
exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by 

Proof state:
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
x : ℝ
⊢ ‖cos (x * π)‖ ≤ 1 * ‖1‖

Next tactic:
simp [Real.abs_cos_le_one]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
  

Proof state:
case inr.inl
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun z => 0 ^ z) atTop (𝓝 0)
case inr.inr b : ℝ hb₀ : -1 < b hb₁ : b < 1 hb : 0 < b ⊢ Tendsto (fun z => b ^ z) atTop (𝓝 0)

Next tactic:
case inr.inl =>  -- b = 0
    refine Tendsto.mono_right ?_ (Iff.mpr pure_le_nhds_iff rfl)
    rw [tendsto_pure]
    filter_upwards [eventually_ne_atTop 0] with _ hx
    simp [hx]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
  

Proof state:
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun z => 0 ^ z) atTop (𝓝 0)

Next tactic:
case inr.inl =>  -- b = 0
    refine Tendsto.mono_right ?_ (Iff.mpr pure_le_nhds_iff rfl)
    rw [tendsto_pure]
    filter_upwards [eventually_ne_atTop 0] with _ hx
    simp [hx]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
  case inr.inl =>  -- b = 0
    

Proof state:
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun z => 0 ^ z) atTop (𝓝 0)

Next tactic:
refine Tendsto.mono_right ?_ (Iff.mpr pure_le_nhds_iff rfl)
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
  case inr.inl =>  -- b = 0
    refine Tendsto.mono_right ?_ (Iff.mpr pure_le_nhds_iff rfl)
    

Proof state:
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun z => 0 ^ z) atTop (pure 0)

Next tactic:
rw [tendsto_pure]
open Asymptotics in
lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (rpow b) atTop (𝓝 (0:ℝ)) := by
  show Tendsto (fun z => b^z) atTop (𝓝 0)
  rcases lt_trichotomy b 0 with hb|rfl|hb
  case inl =>   -- b < 0
    simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
    rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
    refine IsLittleO.mul_isBigO ?exp ?cos
    case exp =>
      rw [isLittleO_const_iff one_ne_zero]
      refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
      rw [← log_neg_eq_log, log_neg_iff (by linarith)]
      linarith
    case cos =>
      rw [isBigO_iff]
      exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
  case inr.inl =>  -- b = 0
    refine Tendsto.mono_right ?_ (Iff.mpr pure_le_nhds_iff rfl)
    rw [tendsto_pure]
    

Proof state:
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ ∀ᶠ (x : ℝ) in atTop, 0 ^ x = 0

Next tactic:
filter_upwards [eventually_ne_atTop 0] with _ hx