Development/AutomorphicArithmetic/DedekindLFunctions/LandauTheorems/mellinGchiModOne.lean
51LSeries.term (fun n => ((ArithmeticFunction.vonMangoldt n : ℝ) : ℂ)) s n / (s * (s - 1)) := by52rcases Nat.eq_zero_or_pos n with rfl | hn53· simp54rw [integral_const_mul, mellin_ramp n hn s hs, LSeries.term_of_ne_zero hn.ne', cpow_neg]55ring5657theorem mellin_Gchi_modOne_log_int (s : ℂ) (hs : 1 < s.re) :58IntegrableOn (fun y : ℝ => ((Real.log y : ℝ) : ℂ) * (y : ℂ) ^ (-s)) (Ioi 1) ∧59Tendsto (fun y : ℝ => ((Real.log y : ℝ) : ℂ) * (y : ℂ) ^ (-s + 1)) atTop (𝓝 0) := by60have ha : (-s).re < -1 := by simp; linarith61set e : ℝ := (s.re - 1) / 2 with he62have he0 : 0 < e := by linarith63have key : ∀ (c : ℂ) (y : ℝ), 1 < y →64‖((Real.log y : ℝ) : ℂ) * (y : ℂ) ^ c‖ ≤ y ^ (e + c.re) / e := by65intro c y hy66have hy0 : (0 : ℝ) < y := by linarith67rw [norm_mul, Complex.norm_real, Real.norm_of_nonneg (Real.log_nonneg hy.le),68Complex.norm_cpow_eq_rpow_re_of_pos hy0, Real.rpow_add hy0]69calc _ ≤ y ^ e / e * y ^ c.re := by70gcongr71exact Real.log_le_rpow_div hy0.le he072_ = _ := by ring73constructor74· have hc : e + (-s).re < -1 := by simp; linarith75refine Integrable.mono' ((integrableOn_Ioi_rpow_of_lt hc zero_lt_one).div_const e) ?_ ?_76· refine AEStronglyMeasurable.mul ?_ (integrableOn_Ioi_cpow_of_lt ha zero_lt_one).177exact (Complex.measurable_ofReal.comp Real.measurable_log).aestronglyMeasurable78· exact ae_restrict_of_forall_mem measurableSet_Ioi fun y hy => key _ y hy79· have hc : 0 < -(e + (-s + 1).re) := by simp; linarith80have h := (tendsto_rpow_neg_atTop hc).div_const e81rw [neg_neg, zero_div] at h82refine squeeze_zero_norm' ?_ h83filter_upwards [eventually_gt_atTop 1] with y hy using key _ y hy8485theorem mellin_Gchi_modOne_log (s : ℂ) (hs : 1 < s.re) :86∫ y in Ioi (1 : ℝ), ((Real.log y : ℝ) : ℂ) * (y : ℂ) ^ (-s) = 1 / (s - 1) ^ 2 := by87have ha : (-s).re < -1 := by simp; linarith88have hs1 : -s + 1 ≠ 0 := by89intro h90have := congrArg Complex.re h91simp at this92linarith93obtain ⟨hi, ht⟩ := mellin_Gchi_modOne_log_int s hs94have hd : ∀ y ∈ Ici (1 : ℝ), HasDerivAt (fun y : ℝ => ((Real.log y : ℝ) : ℂ) * (y : ℂ) ^ (-s + 1))95((-s + 1) * (((Real.log y : ℝ) : ℂ) * (y : ℂ) ^ (-s)) + (y : ℂ) ^ (-s)) y := by96intro y hy97have hy0 : y ≠ 0 := (zero_lt_one.trans_le hy).ne'98have hyC : (y : ℂ) ≠ 0 := by exact_mod_cast hy099refine ((Real.hasDerivAt_log hy0).ofReal_comp.mul100(hasDerivAt_ofReal_cpow_const hy0 hs1)).congr_deriv ?_