Theorem: HurwitzZeta.hasSum_int_evenKernel₀
File: Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean

tactic: haveI := Classical.propDecidable
state_before: a t : ℝ
ht : 0 < t
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t)) (evenKernel (↑a) t - if ↑a = 0 then 1 else 0)
state_after: a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t)) (evenKernel (↑a) t - if ↑a = 0 then 1 else 0)

tactic: simp_rw [AddCircle.coe_eq_zero_iff, zsmul_one]
state_before: a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t)) (evenKernel (↑a) t - if ↑a = 0 then 1 else 0)
state_after: a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t))
    (evenKernel (↑a) t - if ∃ n, ↑n = a then 1 else 0)

tactic: split_ifs with h
state_before: a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t))
    (evenKernel (↑a) t - if ∃ n, ↑n = a then 1 else 0)
state_after: case pos
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ∃ n, ↑n = a
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t)) (evenKernel (↑a) t - 1)

case neg
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ¬∃ n, ↑n = a
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t)) (evenKernel (↑a) t - 0)

tactic: obtain ⟨k, rfl⟩ := h
state_before: case pos
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ∃ n, ↑n = a
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t)) (evenKernel (↑a) t - 1)
state_after: case pos.intro
t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
k : ℤ
⊢ HasSum (fun n => if ↑n + ↑k = 0 then 0 else rexp (-π * (↑n + ↑k) ^ 2 * t)) (evenKernel (↑↑k) t - 1)

tactic: simp_rw [← Int.cast_add, Int.cast_eq_zero, add_eq_zero_iff_eq_neg]
state_before: case pos.intro
t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
k : ℤ
⊢ HasSum (fun n => if ↑n + ↑k = 0 then 0 else rexp (-π * (↑n + ↑k) ^ 2 * t)) (evenKernel (↑↑k) t - 1)
state_after: case pos.intro
t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
k : ℤ
⊢ HasSum (fun n => if n = -k then 0 else rexp (-π * ↑(n + k) ^ 2 * t)) (evenKernel (↑↑k) t - 1)

tactic: simpa only [Int.cast_add, neg_mul, Int.cast_neg, add_left_neg, ne_eq, OfNat.ofNat_ne_zero,
  not_false_eq_true, zero_pow, mul_zero, zero_mul, Real.exp_zero]
  using hasSum_ite_sub_hasSum (hasSum_int_evenKernel (k : ℝ) ht) (-k)
state_before: case pos.intro
t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
k : ℤ
⊢ HasSum (fun n => if n = -k then 0 else rexp (-π * ↑(n + k) ^ 2 * t)) (evenKernel (↑↑k) t - 1)
state_after: no goals

tactic: suffices ∀ (n : ℤ), n + a ≠ 0 by simpa [this] using hasSum_int_evenKernel a ht
state_before: case neg
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ¬∃ n, ↑n = a
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t)) (evenKernel (↑a) t - 0)
state_after: case neg
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ¬∃ n, ↑n = a
⊢ ∀ (n : ℤ), ↑n + a ≠ 0

tactic: contrapose! h
state_before: case neg
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ¬∃ n, ↑n = a
⊢ ∀ (n : ℤ), ↑n + a ≠ 0
state_after: case neg
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ∃ n, ↑n + a = 0
⊢ ∃ n, ↑n = a

tactic: let ⟨n, hn⟩ := h
state_before: case neg
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ∃ n, ↑n + a = 0
⊢ ∃ n, ↑n = a
state_after: case neg
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ∃ n, ↑n + a = 0
n : ℤ
hn : ↑n + a = 0
⊢ ∃ n, ↑n = a

tactic: exact ⟨-n, by rwa [Int.cast_neg, neg_eq_iff_add_eq_zero]⟩
state_before: case neg
a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ∃ n, ↑n + a = 0
n : ℤ
hn : ↑n + a = 0
⊢ ∃ n, ↑n = a
state_after: no goals

tactic: simpa [this] using hasSum_int_evenKernel a ht
state_before: a t : ℝ
ht : 0 < t
this✝ : (a : Prop) → Decidable a
h : ¬∃ n, ↑n = a
this : ∀ (n : ℤ), ↑n + a ≠ 0
⊢ HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t)) (evenKernel (↑a) t - 0)
state_after: no goals

tactic: rwa [Int.cast_neg, neg_eq_iff_add_eq_zero]
state_before: a t : ℝ
ht : 0 < t
this : (a : Prop) → Decidable a
h : ∃ n, ↑n + a = 0
n : ℤ
hn : ↑n + a = 0
⊢ ↑(-n) = a
state_after: no goals