Theorem: exp_neg_mul_rpow_isLittleO_exp_neg
File: Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean

tactic: rw [isLittleO_exp_comp_exp_comp]
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ (fun x => rexp (-b * x ^ p)) =o[atTop] fun x => rexp (-x)
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ Tendsto (fun x => -x - -b * x ^ p) atTop atTop

tactic: suffices Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop by
  refine Tendsto.congr' ?_ this
  refine eventuallyEq_of_mem (Ioi_mem_atTop (0 : ℝ)) (fun x hx => ?_)
  rw [mem_Ioi] at hx
  rw [rpow_sub_one hx.ne']
  field_simp [hx.ne']
  ring
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ Tendsto (fun x => -x - -b * x ^ p) atTop atTop
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop

tactic: apply Tendsto.atTop_mul_atTop tendsto_id
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ Tendsto (fun x => b * x ^ (p - 1) + -1) atTop atTop

tactic: refine tendsto_atTop_add_const_right atTop (-1 : ℝ) ?_
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ Tendsto (fun x => b * x ^ (p - 1) + -1) atTop atTop
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ Tendsto (fun x => b * x ^ (p - 1)) atTop atTop

tactic: exact Tendsto.const_mul_atTop hb (tendsto_rpow_atTop (by linarith))
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ Tendsto (fun x => b * x ^ (p - 1)) atTop atTop
state_after: no goals

tactic: refine Tendsto.congr' ?_ this
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
⊢ Tendsto (fun x => -x - -b * x ^ p) atTop atTop
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
⊢ (fun x => x * (b * x ^ (p - 1) + -1)) =ᶠ[atTop] fun x => -x - -b * x ^ p

tactic: refine eventuallyEq_of_mem (Ioi_mem_atTop (0 : ℝ)) (fun x hx => ?_)
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
⊢ (fun x => x * (b * x ^ (p - 1) + -1)) =ᶠ[atTop] fun x => -x - -b * x ^ p
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
x : ℝ
hx : x ∈ Ioi 0
⊢ x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p

tactic: rw [mem_Ioi] at hx
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
x : ℝ
hx : x ∈ Ioi 0
⊢ x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
x : ℝ
hx : 0 < x
⊢ x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p

tactic: rw [rpow_sub_one hx.ne']
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
x : ℝ
hx : 0 < x
⊢ x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
x : ℝ
hx : 0 < x
⊢ x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p

tactic: field_simp [hx.ne']
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
x : ℝ
hx : 0 < x
⊢ x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p
state_after: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
x : ℝ
hx : 0 < x
⊢ b * x ^ p + -x = -x + b * x ^ p

tactic: ring
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
this : Tendsto (fun x => x * (b * x ^ (p - 1) + -1)) atTop atTop
x : ℝ
hx : 0 < x
⊢ b * x ^ p + -x = -x + b * x ^ p
state_after: no goals

tactic: linarith
state_before: p b : ℝ
hb : 0 < b
hp : 1 < p
⊢ 0 < p - 1
state_after: no goals