Development/AutomorphicArithmetic/DedekindLFunctions/LandauTheorems/mellinGchiModOne.lean
101rw [add_sub_cancel_right, cpow_add _ _ hyC, cpow_one]102push_cast103field_simp104ring105have h := integral_Ioi_of_hasDerivAt_of_tendsto' hd106((hi.const_mul _).add (integrableOn_Ioi_cpow_of_lt ha zero_lt_one)) ht107rw [integral_add (hi.const_mul _) (integrableOn_Ioi_cpow_of_lt ha zero_lt_one),108integral_const_mul, integral_Ioi_cpow_of_lt ha zero_lt_one] at h109simp only [ofReal_one, one_cpow, Real.log_one, ofReal_zero, zero_mul, sub_zero] at h110have e2 : (s - 1) ^ 2 = (-s + 1) ^ 2 := by ring111rw [e2]112field_simp at h ⊢113linear_combination h114115theorem mellin_Gchi_modOne (χ : DirichletCharacter ℂ 1) (s : ℂ) (hs : 1 < s.re) :116∫ y in Ioi (1 : ℝ), Gchi χ y * (y : ℂ) ^ (-s - 1) =117-(deriv riemannZeta s / riemannZeta s + 1 / (s - 1) + 1 - (1 + Real.eulerMascheroniConstant) * s) /118(s * (s - 1)) := by119have h1 : χ = 1 := DirichletCharacter.level_one χ120have h2 : ∀ n : ℕ, χ n = 1 := fun n => by121rw [h1]; exact MulChar.one_apply (isUnit_of_subsingleton _)122have ha : (-s).re < -1 := by simp; linarith123have hs0 : s ≠ 0 := by124rintro rfl125simp at hs126linarith127have hs1 : s - 1 ≠ 0 := by128intro h129have := congrArg Complex.re h130simp at this131linarith132let T : ℕ → ℝ → ℂ := fun n y => ((ArithmeticFunction.vonMangoldt n : ℝ) : ℂ) *133(((max (y / n - 1) 0 : ℝ) : ℂ) * (y : ℂ) ^ (-s - 1))134let E : ℝ → ℂ := fun y => (1 + Real.eulerMascheroniConstant) * (y : ℂ) ^ (-s) -135((Real.log y : ℝ) : ℂ) * (y : ℂ) ^ (-s)136have hz : ∀ y : ℝ, ∀ n ∉ Finset.range (⌊y⌋₊ + 1), T n y = 0 := by137intro y n hn138have hn' : ⌊y⌋₊ + 1 ≤ n := by simpa using hn139have hpos : (0 : ℝ) < n := by140have : 0 < n := by omega141exact_mod_cast this142have hlt : y < n := by143have h1 := Nat.lt_floor_add_one y144have h2 : ((⌊y⌋₊ + 1 : ℕ) : ℝ) ≤ n := by exact_mod_cast hn'145push_cast at h2146linarith147have : max (y / n - 1) 0 = 0 := by148apply max_eq_right149have := (div_lt_one hpos).mpr hlt150linarith