Theorem: Complex.Gammaℝ_residue_zero
File: Mathlib/Analysis/SpecialFunctions/Gamma/Deligne.lean

tactic: have h : Tendsto (fun z : ℂ ↦ z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1) := by
  refine tendsto_self_mul_Gamma_nhds_zero.comp ?_
  rw [tendsto_nhdsWithin_iff, (by simp : 𝓝 (0 : ℂ) = 𝓝 (0 / 2))]
  exact ⟨(tendsto_id.div_const _).mono_left nhdsWithin_le_nhds,
    eventually_of_mem self_mem_nhdsWithin fun x hx ↦ div_ne_zero hx two_ne_zero⟩
state_before: ⊢ Tendsto (fun s => s * s.Gammaℝ) (𝓝[≠] 0) (𝓝 2)
state_after: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
⊢ Tendsto (fun s => s * s.Gammaℝ) (𝓝[≠] 0) (𝓝 2)

tactic: have h' : Tendsto (fun s : ℂ ↦ 2 * (π : ℂ) ^ (-s / 2)) (𝓝[≠] 0) (𝓝 2) := by
  rw [(by simp : 𝓝 2 = 𝓝 (2 * (π : ℂ) ^ (-(0 : ℂ) / 2)))]
  refine Tendsto.mono_left (ContinuousAt.tendsto ?_) nhdsWithin_le_nhds
  exact continuousAt_const.mul ((continuousAt_const_cpow (ofReal_ne_zero.mpr pi_ne_zero)).comp
    (continuousAt_id.neg.div_const _))
state_before: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
⊢ Tendsto (fun s => s * s.Gammaℝ) (𝓝[≠] 0) (𝓝 2)
state_after: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
h' : Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 2)
⊢ Tendsto (fun s => s * s.Gammaℝ) (𝓝[≠] 0) (𝓝 2)

tactic: convert mul_one (2 : ℂ) ▸ (h'.mul h) using 2 with z
state_before: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
h' : Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 2)
⊢ Tendsto (fun s => s * s.Gammaℝ) (𝓝[≠] 0) (𝓝 2)
state_after: case h.e'_3.h
h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
h' : Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 2)
z : ℂ
⊢ z * z.Gammaℝ = 2 * ↑π ^ (-z / 2) * (z / 2 * Gamma (z / 2))

tactic: rw [Gammaℝ]
state_before: case h.e'_3.h
h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
h' : Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 2)
z : ℂ
⊢ z * z.Gammaℝ = 2 * ↑π ^ (-z / 2) * (z / 2 * Gamma (z / 2))
state_after: case h.e'_3.h
h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
h' : Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 2)
z : ℂ
⊢ z * (↑π ^ (-z / 2) * Gamma (z / 2)) = 2 * ↑π ^ (-z / 2) * (z / 2 * Gamma (z / 2))

tactic: ring_nf
state_before: case h.e'_3.h
h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
h' : Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 2)
z : ℂ
⊢ z * (↑π ^ (-z / 2) * Gamma (z / 2)) = 2 * ↑π ^ (-z / 2) * (z / 2 * Gamma (z / 2))
state_after: no goals

tactic: refine tendsto_self_mul_Gamma_nhds_zero.comp ?_
state_before: ⊢ Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
state_after: ⊢ Tendsto (fun z => z / 2) (𝓝[≠] 0) (𝓝[≠] 0)

tactic: rw [tendsto_nhdsWithin_iff, (by simp : 𝓝 (0 : ℂ) = 𝓝 (0 / 2))]
state_before: ⊢ Tendsto (fun z => z / 2) (𝓝[≠] 0) (𝓝[≠] 0)
state_after: ⊢ Tendsto (fun z => z / 2) (𝓝[≠] 0) (𝓝 (0 / 2)) ∧ ∀ᶠ (n : ℂ) in 𝓝[≠] 0, n / 2 ∈ {0}ᶜ

tactic: exact ⟨(tendsto_id.div_const _).mono_left nhdsWithin_le_nhds,
  eventually_of_mem self_mem_nhdsWithin fun x hx ↦ div_ne_zero hx two_ne_zero⟩
state_before: ⊢ Tendsto (fun z => z / 2) (𝓝[≠] 0) (𝓝 (0 / 2)) ∧ ∀ᶠ (n : ℂ) in 𝓝[≠] 0, n / 2 ∈ {0}ᶜ
state_after: no goals

tactic: simp
state_before: ⊢ 𝓝 0 = 𝓝 (0 / 2)
state_after: no goals

tactic: rw [(by simp : 𝓝 2 = 𝓝 (2 * (π : ℂ) ^ (-(0 : ℂ) / 2)))]
state_before: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
⊢ Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 2)
state_after: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
⊢ Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 (2 * ↑π ^ (-0 / 2)))

tactic: refine Tendsto.mono_left (ContinuousAt.tendsto ?_) nhdsWithin_le_nhds
state_before: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
⊢ Tendsto (fun s => 2 * ↑π ^ (-s / 2)) (𝓝[≠] 0) (𝓝 (2 * ↑π ^ (-0 / 2)))
state_after: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
⊢ ContinuousAt (fun s => 2 * ↑π ^ (-s / 2)) 0

tactic: exact continuousAt_const.mul ((continuousAt_const_cpow (ofReal_ne_zero.mpr pi_ne_zero)).comp
  (continuousAt_id.neg.div_const _))
state_before: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
⊢ ContinuousAt (fun s => 2 * ↑π ^ (-s / 2)) 0
state_after: no goals

tactic: simp
state_before: h : Tendsto (fun z => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1)
⊢ 𝓝 2 = 𝓝 (2 * ↑π ^ (-0 / 2))
state_after: no goals