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

tactic: let c (n : ℤ) : ℂ := cexp (2 * π * I * a * n) / 2
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2) (completedCosZeta (↑a) s)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2) (completedCosZeta (↑a) s)

tactic: have hF t (ht : 0 < t) : HasSum (fun n : ℤ ↦ if n = 0 then 0 else c n * rexp (-π * n ^ 2 * t))
    ((cosKernel a t - 1) / 2) := by
  refine ((hasSum_int_cosKernel₀ a ht).div_const 2).congr_fun fun n ↦ ?_
  split_ifs <;> simp only [zero_div, c, div_mul_eq_mul_div]
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2) (completedCosZeta (↑a) s)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2) (completedCosZeta (↑a) s)

tactic: simp only [← Int.cast_eq_zero (α := ℝ)] at hF
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2) (completedCosZeta (↑a) s)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2) (completedCosZeta (↑a) s)

tactic: rw [show completedCosZeta a s = mellin (fun t ↦ (cosKernel a t - 1 : ℂ) / 2) (s / 2) by
  rw [mellin_div_const, completedCosZeta]
  congr 1
  refine ((hurwitzEvenFEPair a).symm.hasMellin (?_ : 1 / 2 < (s / 2).re)).2.symm
  rwa [div_ofNat_re, div_lt_div_right two_pos]]
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2) (completedCosZeta (↑a) s)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2)
    (mellin (fun t => (↑(cosKernel (↑a) t) - 1) / 2) (s / 2))

tactic: refine (hasSum_mellin_pi_mul_sq (zero_lt_one.trans hs) hF ?_).congr_fun fun n ↦ ?_
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ HasSum (fun n => s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2)
    (mellin (fun t => (↑(cosKernel (↑a) t) - 1) / 2) (s / 2))
state_after: case refine_1
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ Summable fun i => ‖c i‖ / |↑i| ^ s.re

case refine_2
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
n : ℤ
⊢ s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2 = s.Gammaℝ * c n / ↑|↑n| ^ s

tactic: refine ((hasSum_int_cosKernel₀ a ht).div_const 2).congr_fun fun n ↦ ?_
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
t : ℝ
ht : 0 < t
⊢ HasSum (fun n => if n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
t : ℝ
ht : 0 < t
n : ℤ
⊢ (if n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) =
    (if n = 0 then 0 else cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t))) / 2

tactic: split_ifs <;> simp only [zero_div, c, div_mul_eq_mul_div]
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
t : ℝ
ht : 0 < t
n : ℤ
⊢ (if n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) =
    (if n = 0 then 0 else cexp (2 * ↑π * I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t))) / 2
state_after: no goals

tactic: rw [mellin_div_const, completedCosZeta]
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ completedCosZeta (↑a) s = mellin (fun t => (↑(cosKernel (↑a) t) - 1) / 2) (s / 2)
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ (hurwitzEvenFEPair ↑a).symm.Λ (s / 2) / 2 = mellin (fun t => ↑(cosKernel (↑a) t) - 1) (s / 2) / 2

tactic: congr 1
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ (hurwitzEvenFEPair ↑a).symm.Λ (s / 2) / 2 = mellin (fun t => ↑(cosKernel (↑a) t) - 1) (s / 2) / 2
state_after: case e_a
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ (hurwitzEvenFEPair ↑a).symm.Λ (s / 2) = mellin (fun t => ↑(cosKernel (↑a) t) - 1) (s / 2)

tactic: refine ((hurwitzEvenFEPair a).symm.hasMellin (?_ : 1 / 2 < (s / 2).re)).2.symm
state_before: case e_a
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ (hurwitzEvenFEPair ↑a).symm.Λ (s / 2) = mellin (fun t => ↑(cosKernel (↑a) t) - 1) (s / 2)
state_after: case e_a
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ 1 / 2 < (s / 2).re

tactic: rwa [div_ofNat_re, div_lt_div_right two_pos]
state_before: case e_a
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ 1 / 2 < (s / 2).re
state_after: no goals

tactic: apply (((summable_one_div_int_add_rpow 0 s.re).mpr hs).div_const 2).of_norm_bounded
state_before: case refine_1
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ Summable fun i => ‖c i‖ / |↑i| ^ s.re
state_after: case refine_1
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ ∀ (i : ℤ), ‖‖c i‖ / |↑i| ^ s.re‖ ≤ 1 / |↑i + 0| ^ s.re / 2

tactic: intro i
state_before: case refine_1
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
⊢ ∀ (i : ℤ), ‖‖c i‖ / |↑i| ^ s.re‖ ≤ 1 / |↑i + 0| ^ s.re / 2
state_after: case refine_1
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
i : ℤ
⊢ ‖‖c i‖ / |↑i| ^ s.re‖ ≤ 1 / |↑i + 0| ^ s.re / 2

tactic: simp only [c, (by { push_cast; ring } : 2 * π * I * a * i = ↑(2 * π * a * i) * I), norm_div,
  RCLike.norm_ofNat, norm_norm, Complex.norm_exp_ofReal_mul_I, add_zero, norm_one,
  norm_of_nonneg (by positivity : 0 ≤ |(i : ℝ)| ^ s.re), div_right_comm, le_rfl]
state_before: case refine_1
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
i : ℤ
⊢ ‖‖c i‖ / |↑i| ^ s.re‖ ≤ 1 / |↑i + 0| ^ s.re / 2
state_after: no goals

tactic: push_cast
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
i : ℤ
⊢ 2 * ↑π * I * ↑a * ↑i = ↑(2 * π * a * ↑i) * I
state_after: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
i : ℤ
⊢ 2 * ↑π * I * ↑a * ↑i = 2 * ↑π * ↑a * ↑i * I

tactic: ring
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
i : ℤ
⊢ 2 * ↑π * I * ↑a * ↑i = 2 * ↑π * ↑a * ↑i * I
state_after: no goals

tactic: positivity
state_before: a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
i : ℤ
⊢ 0 ≤ |↑i| ^ s.re
state_after: no goals

tactic: simp only [c, Int.cast_eq_zero, ← Int.cast_abs, ofReal_intCast, div_right_comm, mul_div_assoc]
state_before: case refine_2
a : ℝ
s : ℂ
hs : 1 < s.re
c : ℤ → ℂ := fun n => cexp (2 * ↑π * I * ↑a * ↑n) / 2
hF :
  ∀ (t : ℝ),
    0 < t → HasSum (fun n => if ↑n = 0 then 0 else c n * ↑(rexp (-π * ↑n ^ 2 * t))) ((↑(cosKernel (↑a) t) - 1) / 2)
n : ℤ
⊢ s.Gammaℝ * cexp (2 * ↑π * I * ↑a * ↑n) / ↑|n| ^ s / 2 = s.Gammaℝ * c n / ↑|↑n| ^ s
state_after: no goals