Theorem: Complex.Gamma_mul_Gamma_add_half
File: Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean

tactic: have h1 : AnalyticOn ℂ (fun z : ℂ => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ := by
  refine DifferentiableOn.analyticOn ?_ isOpen_univ
  refine (differentiable_one_div_Gamma.mul ?_).differentiableOn
  exact differentiable_one_div_Gamma.comp (differentiable_id.add (differentiable_const _))
state_before: s : ℂ
⊢ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π
state_after: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π

tactic: refine AnalyticOn.eq_of_frequently_eq h1 h2 (h3.frequently ?_)
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
⊢ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π
state_after: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
⊢ ∃ᶠ (x : ℝ) in 𝓝[≠] 1, (Gamma ↑x)⁻¹ * (Gamma (↑x + 1 / 2))⁻¹ = (Gamma (2 * ↑x))⁻¹ * 2 ^ (2 * ↑x - 1) / ↑√π

tactic: refine ((Eventually.filter_mono nhdsWithin_le_nhds) ?_).frequently
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
⊢ ∃ᶠ (x : ℝ) in 𝓝[≠] 1, (Gamma ↑x)⁻¹ * (Gamma (↑x + 1 / 2))⁻¹ = (Gamma (2 * ↑x))⁻¹ * 2 ^ (2 * ↑x - 1) / ↑√π
state_after: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
⊢ ∀ᶠ (x : ℝ) in 𝓝 1, (Gamma ↑x)⁻¹ * (Gamma (↑x + 1 / 2))⁻¹ = (Gamma (2 * ↑x))⁻¹ * 2 ^ (2 * ↑x - 1) / ↑√π

tactic: refine (eventually_gt_nhds zero_lt_one).mp (eventually_of_forall fun t ht => ?_)
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
⊢ ∀ᶠ (x : ℝ) in 𝓝 1, (Gamma ↑x)⁻¹ * (Gamma (↑x + 1 / 2))⁻¹ = (Gamma (2 * ↑x))⁻¹ * 2 ^ (2 * ↑x - 1) / ↑√π
state_after: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
t : ℝ
ht : 0 < t
⊢ (Gamma ↑t)⁻¹ * (Gamma (↑t + 1 / 2))⁻¹ = (Gamma (2 * ↑t))⁻¹ * 2 ^ (2 * ↑t - 1) / ↑√π

tactic: rw [← mul_inv, Gamma_ofReal, (by norm_num : (t : ℂ) + 1 / 2 = ↑(t + 1 / 2)), Gamma_ofReal, ←
  ofReal_mul, Gamma_mul_Gamma_add_half_of_pos ht, ofReal_mul, ofReal_mul, ← Gamma_ofReal,
  mul_inv, mul_inv, (by norm_num : 2 * (t : ℂ) = ↑(2 * t)), Gamma_ofReal,
  ofReal_cpow zero_le_two, show (2 : ℝ) = (2 : ℂ) by norm_cast, ← cpow_neg, ofReal_sub,
  ofReal_one, neg_sub, ← div_eq_mul_inv]
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
t : ℝ
ht : 0 < t
⊢ (Gamma ↑t)⁻¹ * (Gamma (↑t + 1 / 2))⁻¹ = (Gamma (2 * ↑t))⁻¹ * 2 ^ (2 * ↑t - 1) / ↑√π
state_after: no goals

tactic: convert congr_arg Inv.inv (congr_fun this s) using 1
state_before: s : ℂ
this : (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π
⊢ Gamma s * Gamma (s + 1 / 2) = Gamma (2 * s) * 2 ^ (1 - 2 * s) * ↑√π
state_after: case h.e'_2
s : ℂ
this : (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π
⊢ Gamma s * Gamma (s + 1 / 2) = ((Gamma s)⁻¹ * (Gamma (s + 1 / 2))⁻¹)⁻¹

case h.e'_3
s : ℂ
this : (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π
⊢ Gamma (2 * s) * 2 ^ (1 - 2 * s) * ↑√π = ((Gamma (2 * s))⁻¹ * 2 ^ (2 * s - 1) / ↑√π)⁻¹

tactic: rw [mul_inv, inv_inv, inv_inv]
state_before: case h.e'_2
s : ℂ
this : (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π
⊢ Gamma s * Gamma (s + 1 / 2) = ((Gamma s)⁻¹ * (Gamma (s + 1 / 2))⁻¹)⁻¹
state_after: no goals

tactic: rw [div_eq_mul_inv, mul_inv, mul_inv, inv_inv, inv_inv, ← cpow_neg, neg_sub]
state_before: case h.e'_3
s : ℂ
this : (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π
⊢ Gamma (2 * s) * 2 ^ (1 - 2 * s) * ↑√π = ((Gamma (2 * s))⁻¹ * 2 ^ (2 * s - 1) / ↑√π)⁻¹
state_after: no goals

tactic: refine DifferentiableOn.analyticOn ?_ isOpen_univ
state_before: s : ℂ
⊢ AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
state_after: s : ℂ
⊢ DifferentiableOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ

tactic: refine (differentiable_one_div_Gamma.mul ?_).differentiableOn
state_before: s : ℂ
⊢ DifferentiableOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
state_after: s : ℂ
⊢ Differentiable ℂ fun z => (Gamma (z + 1 / 2))⁻¹

tactic: exact differentiable_one_div_Gamma.comp (differentiable_id.add (differentiable_const _))
state_before: s : ℂ
⊢ Differentiable ℂ fun z => (Gamma (z + 1 / 2))⁻¹
state_after: no goals

tactic: refine DifferentiableOn.analyticOn ?_ isOpen_univ
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
state_after: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ DifferentiableOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ

tactic: refine (Differentiable.mul ?_ (differentiable_const _)).differentiableOn
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ DifferentiableOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
state_after: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ Differentiable ℂ fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1)

tactic: apply Differentiable.mul
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ Differentiable ℂ fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1)
state_after: case ha
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ Differentiable ℂ fun y => (Gamma (2 * y))⁻¹

case hb
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ Differentiable ℂ fun y => 2 ^ (2 * y - 1)

tactic: exact differentiable_one_div_Gamma.comp (differentiable_id'.const_mul _)
state_before: case ha
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ Differentiable ℂ fun y => (Gamma (2 * y))⁻¹
state_after: no goals

tactic: refine fun t => DifferentiableAt.const_cpow ?_ (Or.inl two_ne_zero)
state_before: case hb
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
⊢ Differentiable ℂ fun y => 2 ^ (2 * y - 1)
state_after: case hb
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
t : ℂ
⊢ DifferentiableAt ℂ (fun y => 2 * y - 1) t

tactic: exact DifferentiableAt.sub_const (differentiableAt_id.const_mul _) _
state_before: case hb
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
t : ℂ
⊢ DifferentiableAt ℂ (fun y => 2 * y - 1) t
state_after: no goals

tactic: rw [tendsto_nhdsWithin_iff]
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
⊢ Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
state_after: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
⊢ Tendsto ofReal' (𝓝[≠] 1) (𝓝 1) ∧ ∀ᶠ (n : ℝ) in 𝓝[≠] 1, ↑n ∈ {1}ᶜ

tactic: constructor
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
⊢ Tendsto ofReal' (𝓝[≠] 1) (𝓝 1) ∧ ∀ᶠ (n : ℝ) in 𝓝[≠] 1, ↑n ∈ {1}ᶜ
state_after: case left
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
⊢ Tendsto ofReal' (𝓝[≠] 1) (𝓝 1)

case right
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
⊢ ∀ᶠ (n : ℝ) in 𝓝[≠] 1, ↑n ∈ {1}ᶜ

tactic: exact tendsto_nhdsWithin_of_tendsto_nhds continuous_ofReal.continuousAt
state_before: case left
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
⊢ Tendsto ofReal' (𝓝[≠] 1) (𝓝 1)
state_after: no goals

tactic: exact eventually_nhdsWithin_iff.mpr (eventually_of_forall fun t ht => ofReal_ne_one.mpr ht)
state_before: case right
s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
⊢ ∀ᶠ (n : ℝ) in 𝓝[≠] 1, ↑n ∈ {1}ᶜ
state_after: no goals

tactic: norm_num
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
t : ℝ
ht : 0 < t
⊢ ↑t + 1 / 2 = ↑(t + 1 / 2)
state_after: no goals

tactic: norm_num
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
t : ℝ
ht : 0 < t
⊢ 2 * ↑t = ↑(2 * t)
state_after: no goals

tactic: norm_cast
state_before: s : ℂ
h1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ
h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑√π) univ
h3 : Tendsto ofReal' (𝓝[≠] 1) (𝓝[≠] 1)
t : ℝ
ht : 0 < t
⊢ ↑2 = 2
state_after: no goals