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

Proof steps:
state_before: ⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
state_after: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
tactic: let f (s : ℂ) : ℂ := π ^ (-s / 2)
state_before: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
state_after: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
tactic: let g (s : ℂ) : ℂ := Gamma (s / 2)
state_before: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
state_after: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
tactic: have aux : (π : ℂ) ^ (1 / 2 : ℂ) = ↑√π := by
    rw [Real.sqrt_eq_rpow, ofReal_cpow Real.pi_pos.le, ofReal_div, ofReal_one, ofReal_ofNat]
state_before: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
state_after: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
tactic: have aux2 : (√π : ℂ) ≠ 0 := by rw [ofReal_ne_zero]; positivity
state_before: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
state_after: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
hf : HasDerivAt f (-log ↑π / 2 / ↑√π) 1
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
tactic: have hf : HasDerivAt f (-log π / 2 / √π) 1 := by
    have := ((hasDerivAt_neg (1 : ℂ)).div_const 2).const_cpow (c := π) (Or.inr (by norm_num))
    refine this.congr_deriv ?_
    rw [mul_assoc, ← mul_div_assoc, mul_neg_one, neg_div, cpow_neg, ← div_eq_inv_mul, aux]
state_before: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
hf : HasDerivAt f (-log ↑π / 2 / ↑√π) 1
hg : HasDerivAt g (-↑√π * (↑γ + 2 * log 2) / 2) 1
⊢ HasDerivAt Gammaℝ (-(↑γ + log (4 * ↑π)) / 2) 1
state_after: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
hf : HasDerivAt f (-log ↑π / 2 / ↑√π) 1
hg : HasDerivAt g (-↑√π * (↑γ + 2 * log 2) / 2) 1
⊢ -log ↑π / 2 / ↑√π * Gamma (1 / 2) + f 1 * (-↑√π * (↑γ + 2 * log 2) / 2) = -(↑γ + log (4 * ↑π)) / 2
tactic: refine HasDerivAt.congr_deriv (hf.mul hg) ?_
state_before: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
hf : HasDerivAt f (-log ↑π / 2 / ↑√π) 1
hg : HasDerivAt g (-↑√π * (↑γ + 2 * log 2) / 2) 1
⊢ -log ↑π / 2 / ↑√π * Gamma (1 / 2) + f 1 * (-↑√π * (↑γ + 2 * log 2) / 2) = -(↑γ + log (4 * ↑π)) / 2
state_after: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
hf : HasDerivAt f (-log ↑π / 2 / ↑√π) 1
hg : HasDerivAt g (-↑√π * (↑γ + 2 * log 2) / 2) 1
⊢ -log ↑π / 2 / ↑√π * Gamma (1 / 2) + ↑π ^ (-1 / 2) * (-↑√π * (↑γ + 2 * log 2) / 2) = -(↑γ + log (4 * ↑π)) / 2
tactic: simp only [f]
state_before: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
hf : HasDerivAt f (-log ↑π / 2 / ↑√π) 1
hg : HasDerivAt g (-↑√π * (↑γ + 2 * log 2) / 2) 1
⊢ -log ↑π / 2 / ↑√π * Gamma (1 / 2) + ↑π ^ (-1 / 2) * (-↑√π * (↑γ + 2 * log 2) / 2) = -(↑γ + log (4 * ↑π)) / 2
state_after: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
hf : HasDerivAt f (-log ↑π / 2 / ↑√π) 1
hg : HasDerivAt g (-↑√π * (↑γ + 2 * log 2) / 2) 1
⊢ -(↑γ + log ↑(2 ^ 2 * π)) / 2 = -(↑γ + log (4 * ↑π)) / 2
tactic: rw [Gamma_one_half_eq, aux, div_mul_cancel₀ _ aux2, neg_div _ (1 : ℂ), cpow_neg, aux,
    mul_div_assoc, ← mul_assoc, mul_neg, inv_mul_cancel aux2, neg_one_mul, ← neg_div,
    ← _root_.add_div, ← neg_add, add_comm, add_assoc, ← ofReal_log Real.pi_pos.le, ← ofReal_ofNat,
    ← ofReal_log zero_le_two,
    ← ofReal_mul, ← Nat.cast_ofNat (R := ℝ), ← Real.log_pow, ← ofReal_add,
    ← Real.log_mul (by positivity) (by positivity),
    Nat.cast_ofNat, ofReal_ofNat, ofReal_log (by positivity)]
state_before: f : ℂ → ℂ := fun s => ↑π ^ (-s / 2)
g : ℂ → ℂ := fun s => Gamma (s / 2)
aux : ↑π ^ (1 / 2) = ↑√π
aux2 : ↑√π ≠ 0
hf : HasDerivAt f (-log ↑π / 2 / ↑√π) 1
hg : HasDerivAt g (-↑√π * (↑γ + 2 * log 2) / 2) 1
⊢ -(↑γ + log ↑(2 ^ 2 * π)) / 2 = -(↑γ + log (4 * ↑π)) / 2
state_after: no goals
tactic: norm_num