Theorem: tendsto_rpow_atTop_of_base_lt_one
File: Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean

tactic: rcases lt_trichotomy b 0 with hb|rfl|hb
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
⊢ Tendsto (fun x => b ^ x) atTop (𝓝 0)
state_after: case inl
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun x => b ^ x) atTop (𝓝 0)

case inr.inl
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun x => 0 ^ x) atTop (𝓝 0)

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

tactic: case inl => 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]⟩
state_before: case inl
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun x => b ^ x) atTop (𝓝 0)

case inr.inl
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun x => 0 ^ x) atTop (𝓝 0)

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

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

tactic: case inr.inl => refine Tendsto.mono_right ?_ (Iff.mpr pure_le_nhds_iff rfl)
  rw [tendsto_pure]
  filter_upwards [eventually_ne_atTop 0] with _ hx
  simp [hx]
state_before: case inr.inl
hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun x => 0 ^ x) atTop (𝓝 0)

case inr.inr
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : 0 < b
⊢ Tendsto (fun x => b ^ x) atTop (𝓝 0)
state_after: case inr.inr
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : 0 < b
⊢ Tendsto (fun x => b ^ x) atTop (𝓝 0)

tactic: case inr.inr => simp_rw [Real.rpow_def_of_pos hb]
  refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
  exact (log_neg_iff hb).mpr hb₁
state_before: case inr.inr
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : 0 < b
⊢ Tendsto (fun x => b ^ x) atTop (𝓝 0)
state_after: no goals

tactic: simp_rw [Real.rpow_def_of_nonpos hb.le, hb.ne, ite_false]
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun x => b ^ x) atTop (𝓝 0)
state_after: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun x => rexp (log b * x) * cos (x * π)) atTop (𝓝 0)

tactic: rw [← isLittleO_const_iff (c := (1:ℝ)) one_ne_zero, (one_mul (1 : ℝ)).symm]
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun x => rexp (log b * x) * cos (x * π)) atTop (𝓝 0)
state_after: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun x => rexp (log b * x) * cos (x * π)) =o[atTop] fun _x => 1 * 1

tactic: refine IsLittleO.mul_isBigO ?exp ?cos
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun x => rexp (log b * x) * cos (x * π)) =o[atTop] fun _x => 1 * 1
state_after: case exp
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun x => rexp (log b * x)) =o[atTop] fun _x => 1

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

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
state_before: case exp
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun x => rexp (log b * x)) =o[atTop] fun _x => 1

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

tactic: case cos =>
  rw [isBigO_iff]
  exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
state_before: case cos
b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun x => cos (x * π)) =O[atTop] fun _x => 1
state_after: no goals

tactic: rw [isLittleO_const_iff one_ne_zero]
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun x => rexp (log b * x)) =o[atTop] fun _x => 1
state_after: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun x => rexp (log b * x)) atTop (𝓝 0)

tactic: refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ Tendsto (fun x => rexp (log b * x)) atTop (𝓝 0)
state_after: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ log b < 0

tactic: rw [← log_neg_eq_log, log_neg_iff (by linarith)]
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ log b < 0
state_after: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ -b < 1

tactic: linarith
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ -b < 1
state_after: no goals

tactic: linarith
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ 0 < -b
state_after: no goals

tactic: rw [isBigO_iff]
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ (fun x => cos (x * π)) =O[atTop] fun _x => 1
state_after: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ ∃ c, ∀ᶠ (x : ℝ) in atTop, ‖cos (x * π)‖ ≤ c * ‖1‖

tactic: exact ⟨1, eventually_of_forall fun x => by simp [Real.abs_cos_le_one]⟩
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
⊢ ∃ c, ∀ᶠ (x : ℝ) in atTop, ‖cos (x * π)‖ ≤ c * ‖1‖
state_after: no goals

tactic: simp [Real.abs_cos_le_one]
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : b < 0
x : ℝ
⊢ ‖cos (x * π)‖ ≤ 1 * ‖1‖
state_after: no goals

tactic: refine Tendsto.mono_right ?_ (Iff.mpr pure_le_nhds_iff rfl)
state_before: hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun x => 0 ^ x) atTop (𝓝 0)
state_after: hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun x => 0 ^ x) atTop (pure 0)

tactic: rw [tendsto_pure]
state_before: hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ Tendsto (fun x => 0 ^ x) atTop (pure 0)
state_after: hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ ∀ᶠ (x : ℝ) in atTop, 0 ^ x = 0

tactic: filter_upwards [eventually_ne_atTop 0] with _ hx
state_before: hb₀ : -1 < 0
hb₁ : 0 < 1
⊢ ∀ᶠ (x : ℝ) in atTop, 0 ^ x = 0
state_after: case h
hb₀ : -1 < 0
hb₁ : 0 < 1
a✝ : ℝ
hx : a✝ ≠ 0
⊢ 0 ^ a✝ = 0

tactic: simp [hx]
state_before: case h
hb₀ : -1 < 0
hb₁ : 0 < 1
a✝ : ℝ
hx : a✝ ≠ 0
⊢ 0 ^ a✝ = 0
state_after: no goals

tactic: simp_rw [Real.rpow_def_of_pos hb]
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : 0 < b
⊢ Tendsto (fun x => b ^ x) atTop (𝓝 0)
state_after: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : 0 < b
⊢ Tendsto (fun x => rexp (log b * x)) atTop (𝓝 0)

tactic: refine tendsto_exp_atBot.comp <| (tendsto_const_mul_atBot_of_neg ?_).mpr tendsto_id
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : 0 < b
⊢ Tendsto (fun x => rexp (log b * x)) atTop (𝓝 0)
state_after: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : 0 < b
⊢ log b < 0

tactic: exact (log_neg_iff hb).mpr hb₁
state_before: b : ℝ
hb₀ : -1 < b
hb₁ : b < 1
hb : 0 < b
⊢ log b < 0
state_after: no goals