Theorem: HurwitzZeta.hasSum_int_sinKernel
File: Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean

tactic: have h : -2 * (π : ℂ) ≠ (0 : ℂ) := by
  simp only [neg_mul, ne_eq, neg_eq_zero, mul_eq_zero,
    OfNat.ofNat_ne_zero, ofReal_eq_zero, pi_ne_zero, or_self, not_false_eq_true]
state_before: a t : ℝ
ht : 0 < t
⊢ HasSum (fun n => -I * ↑n * cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t))) ↑(sinKernel (↑a) t)
state_after: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
⊢ HasSum (fun n => -I * ↑n * cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t))) ↑(sinKernel (↑a) t)

tactic: rw [sinKernel_def]
state_before: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
⊢ HasSum (fun n => -I * ↑n * cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t))) ↑(sinKernel (↑a) t)
state_after: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
⊢ HasSum (fun n => -I * ↑n * cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t)))
    (jacobiTheta₂' (↑a) (I * ↑t) / (-2 * ↑π))

tactic: refine ((hasSum_jacobiTheta₂'_term a
  (by rwa [I_mul_im, ofReal_re])).div_const _).congr_fun fun n ↦ ?_
state_before: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
⊢ HasSum (fun n => -I * ↑n * cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t)))
    (jacobiTheta₂' (↑a) (I * ↑t) / (-2 * ↑π))
state_after: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ -I * ↑n * cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t)) = jacobiTheta₂'_term n (↑a) (I * ↑t) / (-2 * ↑π)

tactic: rw [jacobiTheta₂'_term, jacobiTheta₂_term, ofReal_exp, mul_assoc (-I * n), ← Complex.exp_add,
  eq_div_iff h, ofReal_mul, ofReal_mul, ofReal_pow, ofReal_neg, ofReal_intCast,
  mul_comm _ (-2 * π : ℂ), ← mul_assoc]
state_before: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ -I * ↑n * cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t)) = jacobiTheta₂'_term n (↑a) (I * ↑t) / (-2 * ↑π)
state_after: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ -2 * ↑π * (-I * ↑n) * cexp (2 * ↑π * I * ↑a * ↑n + -↑π * ↑n ^ 2 * ↑t) =
    2 * ↑π * I * ↑n * cexp (2 * ↑π * I * ↑n * ↑a + ↑π * I * ↑n ^ 2 * (I * ↑t))

tactic: congrm ?_ * cexp (?_ + ?_)
state_before: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ -2 * ↑π * (-I * ↑n) * cexp (2 * ↑π * I * ↑a * ↑n + -↑π * ↑n ^ 2 * ↑t) =
    2 * ↑π * I * ↑n * cexp (2 * ↑π * I * ↑n * ↑a + ↑π * I * ↑n ^ 2 * (I * ↑t))
state_after: case refine_1
a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ -2 * ↑π * (-I * ↑n) = 2 * ↑π * I * ↑n

case refine_2
a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ 2 * ↑π * I * ↑a * ↑n = 2 * ↑π * I * ↑n * ↑a

case refine_3
a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ -↑π * ↑n ^ 2 * ↑t = ↑π * I * ↑n ^ 2 * (I * ↑t)

tactic: simp only [neg_mul, ne_eq, neg_eq_zero, mul_eq_zero,
  OfNat.ofNat_ne_zero, ofReal_eq_zero, pi_ne_zero, or_self, not_false_eq_true]
state_before: a t : ℝ
ht : 0 < t
⊢ -2 * ↑π ≠ 0
state_after: no goals

tactic: rwa [I_mul_im, ofReal_re]
state_before: a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
⊢ 0 < (I * ↑t).im
state_after: no goals

tactic: simp only [neg_mul, mul_neg, neg_neg, mul_assoc]
state_before: case refine_1
a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ -2 * ↑π * (-I * ↑n) = 2 * ↑π * I * ↑n
state_after: no goals

tactic: exact mul_right_comm (2 * π * I) a n
state_before: case refine_2
a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ 2 * ↑π * I * ↑a * ↑n = 2 * ↑π * I * ↑n * ↑a
state_after: no goals

tactic: simp only [← mul_assoc, mul_comm _ I, I_mul_I, neg_one_mul]
state_before: case refine_3
a t : ℝ
ht : 0 < t
h : -2 * ↑π ≠ 0
n : ℤ
⊢ -↑π * ↑n ^ 2 * ↑t = ↑π * I * ↑n ^ 2 * (I * ↑t)
state_after: no goals