Development/AutomorphicArithmetic/DedekindLFunctions/LandauTheorems/mellinGchiModOne.lean
151simp [T, this]152have hc : EqOn (fun y : ℝ => Gchi χ y * (y : ℂ) ^ (-s - 1))153(fun y => E y + ∑' n, T n y) (Ioi 1) := by154intro y hy155have hy1 : (1 : ℝ) < y := hy156have hyC : (y : ℂ) ≠ 0 := by exact_mod_cast (zero_lt_one.trans hy1).ne'157have h3 : (y : ℂ) ^ (-s) = y * (y : ℂ) ^ (-s - 1) := by158rw [cpow_sub _ _ hyC, cpow_one]159field_simp160beta_reduce161rw [tsum_eq_sum (hz y)]162simp only [Gchi, if_pos h1, h2, ramp, T, E, h3, mul_one, ← mul_assoc,163← Finset.sum_mul]164push_cast165ring166have hi := (mellin_Gchi_modOne_log_int s hs).1167have hi2 := integrableOn_Ioi_cpow_of_lt ha zero_lt_one168have hsum : Summable fun n => ∫ y in Ioi (1 : ℝ), ‖T n y‖ := by169have hσ : 1 < ((s.re : ℝ) : ℂ).re := by simpa using hs170rw [← Complex.summable_ofReal]171refine ((ArithmeticFunction.LSeriesSummable_vonMangoldt hσ).div_const172((s.re : ℂ) * (s.re - 1))).congr fun n => ?_173rw [← mellin_Gchi_modOne_term n _ hσ, ← integral_complex_ofReal]174refine setIntegral_congr_fun measurableSet_Ioi fun y hy => ?_175have hy0 : (0 : ℝ) < y := zero_lt_one.trans hy176simp only [T]177rw [norm_mul, norm_mul, Complex.norm_real, Complex.norm_real,178Real.norm_of_nonneg ArithmeticFunction.vonMangoldt_nonneg,179Real.norm_of_nonneg (le_max_right _ _), Complex.norm_cpow_eq_rpow_re_of_pos hy0]180have : (y : ℂ) ^ (-(s.re : ℂ) - 1) = ((y ^ (-s - 1).re : ℝ) : ℂ) := by181rw [ofReal_cpow hy0.le]182simp183rw [this]184simp185rw [setIntegral_congr_fun measurableSet_Ioi hc,186mellin_Gchi_modOne_sum T E (fun n => (mellin_Gchi_modOne_int n s hs).const_mul _)187((hi2.const_mul _).sub hi) hsum (fun y => summable_of_ne_finset_zero (hz y))]188simp only [T, E, mellin_Gchi_modOne_term _ s hs]189rw [tsum_div_const, integral_sub (hi2.const_mul _) hi, integral_const_mul,190integral_Ioi_cpow_of_lt ha zero_lt_one, mellin_Gchi_modOne_log s hs]191have h4 := ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs192rw [LSeries] at h4193rw [h4, neg_div (riemannZeta s)]194have e2 : -s + 1 = -(s - 1) := by ring195rw [e2]196generalize deriv riemannZeta s / riemannZeta s = D197simp only [ofReal_one, one_cpow]198field_simp199ring200