Theorem: Complex.hasDerivAt_Gammaℂ_one
File: Mathlib/NumberTheory/Harmonic/GammaDeriv.lean

tactic: let f (s : ℂ) : ℂ := 2 * (2 * π) ^ (-s)
state_before: ⊢ HasDerivAt Gammaℂ (-(↑γ + log (2 * ↑π)) / ↑π) 1
state_after: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
⊢ HasDerivAt Gammaℂ (-(↑γ + log (2 * ↑π)) / ↑π) 1

tactic: have : HasDerivAt (fun s : ℂ ↦ 2 * (2 * π : ℂ) ^ (-s)) (-log (2 * π) / π) 1 := by
  have := (hasDerivAt_neg' (1 : ℂ)).const_cpow (c := 2 * π)
    (Or.inl (by exact_mod_cast Real.two_pi_pos.ne'))
  refine (this.const_mul 2).congr_deriv ?_
  rw [mul_neg_one, mul_neg, cpow_neg_one, ← div_eq_inv_mul, ← mul_div_assoc,
    mul_div_mul_left _ _ two_ne_zero, neg_div]
state_before: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
⊢ HasDerivAt Gammaℂ (-(↑γ + log (2 * ↑π)) / ↑π) 1
state_after: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
this : HasDerivAt (fun s => 2 * (2 * ↑π) ^ (-s)) (-log (2 * ↑π) / ↑π) 1
⊢ HasDerivAt Gammaℂ (-(↑γ + log (2 * ↑π)) / ↑π) 1

tactic: have := this.mul hasDerivAt_Gamma_one
state_before: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
this : HasDerivAt (fun s => 2 * (2 * ↑π) ^ (-s)) (-log (2 * ↑π) / ↑π) 1
⊢ HasDerivAt Gammaℂ (-(↑γ + log (2 * ↑π)) / ↑π) 1
state_after: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
this✝ : HasDerivAt (fun s => 2 * (2 * ↑π) ^ (-s)) (-log (2 * ↑π) / ↑π) 1
this : HasDerivAt (fun y => 2 * (2 * ↑π) ^ (-y) * Gamma y) (-log (2 * ↑π) / ↑π * Gamma 1 + 2 * (2 * ↑π) ^ (-1) * -↑γ) 1
⊢ HasDerivAt Gammaℂ (-(↑γ + log (2 * ↑π)) / ↑π) 1

tactic: rwa [Gamma_one, mul_one, cpow_neg_one, ← div_eq_mul_inv, ← div_div, div_self two_ne_zero,
  mul_comm (1 / _), mul_one_div, ← _root_.add_div, ← neg_add, add_comm] at this
state_before: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
this✝ : HasDerivAt (fun s => 2 * (2 * ↑π) ^ (-s)) (-log (2 * ↑π) / ↑π) 1
this : HasDerivAt (fun y => 2 * (2 * ↑π) ^ (-y) * Gamma y) (-log (2 * ↑π) / ↑π * Gamma 1 + 2 * (2 * ↑π) ^ (-1) * -↑γ) 1
⊢ HasDerivAt Gammaℂ (-(↑γ + log (2 * ↑π)) / ↑π) 1
state_after: no goals

tactic: have := (hasDerivAt_neg' (1 : ℂ)).const_cpow (c := 2 * π)
  (Or.inl (by exact_mod_cast Real.two_pi_pos.ne'))
state_before: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
⊢ HasDerivAt (fun s => 2 * (2 * ↑π) ^ (-s)) (-log (2 * ↑π) / ↑π) 1
state_after: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
this : HasDerivAt (fun x => (2 * ↑π) ^ (-x)) ((2 * ↑π) ^ (-1) * log (2 * ↑π) * -1) 1
⊢ HasDerivAt (fun s => 2 * (2 * ↑π) ^ (-s)) (-log (2 * ↑π) / ↑π) 1

tactic: refine (this.const_mul 2).congr_deriv ?_
state_before: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
this : HasDerivAt (fun x => (2 * ↑π) ^ (-x)) ((2 * ↑π) ^ (-1) * log (2 * ↑π) * -1) 1
⊢ HasDerivAt (fun s => 2 * (2 * ↑π) ^ (-s)) (-log (2 * ↑π) / ↑π) 1
state_after: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
this : HasDerivAt (fun x => (2 * ↑π) ^ (-x)) ((2 * ↑π) ^ (-1) * log (2 * ↑π) * -1) 1
⊢ 2 * ((2 * ↑π) ^ (-1) * log (2 * ↑π) * -1) = -log (2 * ↑π) / ↑π

tactic: rw [mul_neg_one, mul_neg, cpow_neg_one, ← div_eq_inv_mul, ← mul_div_assoc,
  mul_div_mul_left _ _ two_ne_zero, neg_div]
state_before: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
this : HasDerivAt (fun x => (2 * ↑π) ^ (-x)) ((2 * ↑π) ^ (-1) * log (2 * ↑π) * -1) 1
⊢ 2 * ((2 * ↑π) ^ (-1) * log (2 * ↑π) * -1) = -log (2 * ↑π) / ↑π
state_after: no goals

tactic: exact_mod_cast Real.two_pi_pos.ne'
state_before: f : ℂ → ℂ := fun s => 2 * (2 * ↑π) ^ (-s)
⊢ 2 * ↑π ≠ 0
state_after: no goals