Theorem: HurwitzZeta.differentiableAt_hurwitzZetaEven_sub_one_div
File: Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean

tactic: suffices DifferentiableAt ℂ
    (fun s ↦ completedHurwitzZetaEven a s / Gammaℝ s - 1 / (s - 1) / Gammaℝ s) 1 by
  apply this.congr_of_eventuallyEq
  filter_upwards [eventually_ne_nhds one_ne_zero] with x hx
  rw [hurwitzZetaEven, Function.update_noteq hx]
state_before: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => hurwitzZetaEven a s - 1 / (s - 1) / s.Gammaℝ) 1
state_after: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ) 1

tactic: simp_rw [← sub_div, div_eq_mul_inv _ (Gammaℝ _)]
state_before: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ) 1
state_after: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => (completedHurwitzZetaEven a s - 1 / (s - 1)) * s.Gammaℝ⁻¹) 1

tactic: refine DifferentiableAt.mul ?_ differentiable_Gammaℝ_inv.differentiableAt
state_before: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => (completedHurwitzZetaEven a s - 1 / (s - 1)) * s.Gammaℝ⁻¹) 1
state_after: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s - 1 / (s - 1)) 1

tactic: simp_rw [completedHurwitzZetaEven_eq, sub_sub, add_assoc]
state_before: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s - 1 / (s - 1)) 1
state_after: a : UnitAddCircle
⊢ DifferentiableAt ℂ
    (fun s => completedHurwitzZetaEven₀ a s - ((if a = 0 then 1 else 0) / s + (1 / (1 - s) + 1 / (s - 1)))) 1

tactic: conv => enter [2, s, 2]; rw [← neg_sub, div_neg, neg_add_self, add_zero]
state_before: a : UnitAddCircle
⊢ DifferentiableAt ℂ
    (fun s => completedHurwitzZetaEven₀ a s - ((if a = 0 then 1 else 0) / s + (1 / (1 - s) + 1 / (s - 1)))) 1
state_after: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s) 1

tactic: exact (differentiable_completedHurwitzZetaEven₀ a _).sub
  <| (differentiableAt_const _).div differentiableAt_id one_ne_zero
state_before: a : UnitAddCircle
⊢ DifferentiableAt ℂ (fun s => completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s) 1
state_after: no goals

tactic: apply this.congr_of_eventuallyEq
state_before: a : UnitAddCircle
this : DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ) 1
⊢ DifferentiableAt ℂ (fun s => hurwitzZetaEven a s - 1 / (s - 1) / s.Gammaℝ) 1
state_after: a : UnitAddCircle
this : DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ) 1
⊢ (fun s => hurwitzZetaEven a s - 1 / (s - 1) / s.Gammaℝ) =ᶠ[𝓝 1] fun s =>
    completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ

tactic: filter_upwards [eventually_ne_nhds one_ne_zero] with x hx
state_before: a : UnitAddCircle
this : DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ) 1
⊢ (fun s => hurwitzZetaEven a s - 1 / (s - 1) / s.Gammaℝ) =ᶠ[𝓝 1] fun s =>
    completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ
state_after: case h
a : UnitAddCircle
this : DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ) 1
x : ℂ
hx : x ≠ 0
⊢ hurwitzZetaEven a x - 1 / (x - 1) / x.Gammaℝ = completedHurwitzZetaEven a x / x.Gammaℝ - 1 / (x - 1) / x.Gammaℝ

tactic: rw [hurwitzZetaEven, Function.update_noteq hx]
state_before: case h
a : UnitAddCircle
this : DifferentiableAt ℂ (fun s => completedHurwitzZetaEven a s / s.Gammaℝ - 1 / (s - 1) / s.Gammaℝ) 1
x : ℂ
hx : x ≠ 0
⊢ hurwitzZetaEven a x - 1 / (x - 1) / x.Gammaℝ = completedHurwitzZetaEven a x / x.Gammaℝ - 1 / (x - 1) / x.Gammaℝ
state_after: no goals