Theorem: Complex.GammaIntegral_add_one
File: Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

tactic: suffices Tendsto (s + 1).partialGamma atTop (𝓝 <| s * GammaIntegral s) by
  refine tendsto_nhds_unique ?_ this
  apply tendsto_partialGamma; rw [add_re, one_re]; linarith
state_before: s : ℂ
hs : 0 < s.re
⊢ (s + 1).GammaIntegral = s * s.GammaIntegral
state_after: s : ℂ
hs : 0 < s.re
⊢ Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))

tactic: have : (fun X : ℝ => s * partialGamma s X - X ^ s * (-X).exp) =ᶠ[atTop]
    (s + 1).partialGamma := by
  apply eventuallyEq_of_mem (Ici_mem_atTop (0 : ℝ))
  intro X hX
  rw [partialGamma_add_one hs (mem_Ici.mp hX)]
  ring_nf
state_before: s : ℂ
hs : 0 < s.re
⊢ Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
state_after: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))

tactic: refine Tendsto.congr' this ?_
state_before: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
state_after: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ Tendsto (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) atTop (𝓝 (s * s.GammaIntegral))

tactic: suffices Tendsto (fun X => -X ^ s * (-X).exp : ℝ → ℂ) atTop (𝓝 0) by
  simpa using Tendsto.add (Tendsto.const_mul s (tendsto_partialGamma hs)) this
state_before: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ Tendsto (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) atTop (𝓝 (s * s.GammaIntegral))
state_after: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ Tendsto (fun X => -↑X ^ s * ↑(rexp (-X))) atTop (𝓝 0)

tactic: rw [tendsto_zero_iff_norm_tendsto_zero]
state_before: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ Tendsto (fun X => -↑X ^ s * ↑(rexp (-X))) atTop (𝓝 0)
state_after: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ Tendsto (fun x => ‖-↑x ^ s * ↑(rexp (-x))‖) atTop (𝓝 0)

tactic: have :
    (fun e : ℝ => ‖-(e : ℂ) ^ s * (-e).exp‖) =ᶠ[atTop] fun e : ℝ => e ^ s.re * (-1 * e).exp := by
  refine eventuallyEq_of_mem (Ioi_mem_atTop 0) ?_
  intro x hx; dsimp only
  rw [norm_eq_abs, map_mul, abs.map_neg, abs_cpow_eq_rpow_re_of_pos hx,
    abs_of_nonneg (exp_pos (-x)).le, neg_mul, one_mul]
state_before: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ Tendsto (fun x => ‖-↑x ^ s * ↑(rexp (-x))‖) atTop (𝓝 0)
state_after: s : ℂ
hs : 0 < s.re
this✝ : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
this : (fun e => ‖-↑e ^ s * ↑(rexp (-e))‖) =ᶠ[atTop] fun e => e ^ s.re * rexp (-1 * e)
⊢ Tendsto (fun x => ‖-↑x ^ s * ↑(rexp (-x))‖) atTop (𝓝 0)

tactic: exact (tendsto_congr' this).mpr (tendsto_rpow_mul_exp_neg_mul_atTop_nhds_zero _ _ zero_lt_one)
state_before: s : ℂ
hs : 0 < s.re
this✝ : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
this : (fun e => ‖-↑e ^ s * ↑(rexp (-e))‖) =ᶠ[atTop] fun e => e ^ s.re * rexp (-1 * e)
⊢ Tendsto (fun x => ‖-↑x ^ s * ↑(rexp (-x))‖) atTop (𝓝 0)
state_after: no goals

tactic: refine tendsto_nhds_unique ?_ this
state_before: s : ℂ
hs : 0 < s.re
this : Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
⊢ (s + 1).GammaIntegral = s * s.GammaIntegral
state_after: s : ℂ
hs : 0 < s.re
this : Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
⊢ Tendsto (s + 1).partialGamma atTop (𝓝 (s + 1).GammaIntegral)

tactic: apply tendsto_partialGamma
state_before: s : ℂ
hs : 0 < s.re
this : Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
⊢ Tendsto (s + 1).partialGamma atTop (𝓝 (s + 1).GammaIntegral)
state_after: case hs
s : ℂ
hs : 0 < s.re
this : Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
⊢ 0 < (s + 1).re

tactic: rw [add_re, one_re]
state_before: case hs
s : ℂ
hs : 0 < s.re
this : Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
⊢ 0 < (s + 1).re
state_after: case hs
s : ℂ
hs : 0 < s.re
this : Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
⊢ 0 < s.re + 1

tactic: linarith
state_before: case hs
s : ℂ
hs : 0 < s.re
this : Tendsto (s + 1).partialGamma atTop (𝓝 (s * s.GammaIntegral))
⊢ 0 < s.re + 1
state_after: no goals

tactic: apply eventuallyEq_of_mem (Ici_mem_atTop (0 : ℝ))
state_before: s : ℂ
hs : 0 < s.re
⊢ (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
state_after: s : ℂ
hs : 0 < s.re
⊢ EqOn (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) (s + 1).partialGamma (Ici 0)

tactic: intro X hX
state_before: s : ℂ
hs : 0 < s.re
⊢ EqOn (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) (s + 1).partialGamma (Ici 0)
state_after: s : ℂ
hs : 0 < s.re
X : ℝ
hX : X ∈ Ici 0
⊢ (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) X = (s + 1).partialGamma X

tactic: rw [partialGamma_add_one hs (mem_Ici.mp hX)]
state_before: s : ℂ
hs : 0 < s.re
X : ℝ
hX : X ∈ Ici 0
⊢ (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) X = (s + 1).partialGamma X
state_after: s : ℂ
hs : 0 < s.re
X : ℝ
hX : X ∈ Ici 0
⊢ (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) X = s * s.partialGamma X - ↑(rexp (-X)) * ↑X ^ s

tactic: ring_nf
state_before: s : ℂ
hs : 0 < s.re
X : ℝ
hX : X ∈ Ici 0
⊢ (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) X = s * s.partialGamma X - ↑(rexp (-X)) * ↑X ^ s
state_after: no goals

tactic: simpa using Tendsto.add (Tendsto.const_mul s (tendsto_partialGamma hs)) this
state_before: s : ℂ
hs : 0 < s.re
this✝ : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
this : Tendsto (fun X => -↑X ^ s * ↑(rexp (-X))) atTop (𝓝 0)
⊢ Tendsto (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) atTop (𝓝 (s * s.GammaIntegral))
state_after: no goals

tactic: refine eventuallyEq_of_mem (Ioi_mem_atTop 0) ?_
state_before: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ (fun e => ‖-↑e ^ s * ↑(rexp (-e))‖) =ᶠ[atTop] fun e => e ^ s.re * rexp (-1 * e)
state_after: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ EqOn (fun e => ‖-↑e ^ s * ↑(rexp (-e))‖) (fun e => e ^ s.re * rexp (-1 * e)) (Ioi 0)

tactic: intro x hx
state_before: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
⊢ EqOn (fun e => ‖-↑e ^ s * ↑(rexp (-e))‖) (fun e => e ^ s.re * rexp (-1 * e)) (Ioi 0)
state_after: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
x : ℝ
hx : x ∈ Ioi 0
⊢ (fun e => ‖-↑e ^ s * ↑(rexp (-e))‖) x = (fun e => e ^ s.re * rexp (-1 * e)) x

tactic: dsimp only
state_before: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
x : ℝ
hx : x ∈ Ioi 0
⊢ (fun e => ‖-↑e ^ s * ↑(rexp (-e))‖) x = (fun e => e ^ s.re * rexp (-1 * e)) x
state_after: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
x : ℝ
hx : x ∈ Ioi 0
⊢ ‖-↑x ^ s * ↑(rexp (-x))‖ = x ^ s.re * rexp (-1 * x)

tactic: rw [norm_eq_abs, map_mul, abs.map_neg, abs_cpow_eq_rpow_re_of_pos hx,
  abs_of_nonneg (exp_pos (-x)).le, neg_mul, one_mul]
state_before: s : ℂ
hs : 0 < s.re
this : (fun X => s * s.partialGamma X - ↑X ^ s * ↑(rexp (-X))) =ᶠ[atTop] (s + 1).partialGamma
x : ℝ
hx : x ∈ Ioi 0
⊢ ‖-↑x ^ s * ↑(rexp (-x))‖ = x ^ s.re * rexp (-1 * x)
state_after: no goals