Development/AutomorphicArithmetic/DedekindLFunctions/LandauTheorems/landauWindowIneq.lean
1import Development.AutomorphicArithmetic.DedekindLFunctions.LandauZeroFreeCriterion2import Development.AutomorphicArithmetic.DedekindLFunctions.LandauTheorems.LandauKernelMax34open Complex MeasureTheory Set Filter Topology56noncomputable section78namespace Deduction910theorem landau_window_ineq_int (k : ℕ) {σ : ℝ} (hσ : 2 < σ) :11IntegrableOn (fun u : ℝ => u ^ k * Real.exp ((2 - σ) * u) / (k.factorial : ℝ)) (Ioi 0) := by12have ha : 0 < (σ - 2) / 2 := by linarith13have h1 : IntegrableOn (fun u : ℝ => (1 / ((σ - 2) / 2) ^ k) * Real.exp (-((σ - 2) / 2) * u)) (Ioi 0) :=14(exp_neg_integrableOn_Ioi 0 ha).const_mul _15refine Integrable.mono' h1 (by fun_prop) ?_16refine (ae_restrict_iff' measurableSet_Ioi).2 (Eventually.of_forall fun u hu => ?_)17have hu0 : 0 ≤ u := le_of_lt hu18rw [Real.norm_of_nonneg (by positivity)]19have h2 := landau_kernel_max k ha hu020have h3 : u ^ k * Real.exp ((2 - σ) * u) / (k.factorial : ℝ)21= (u ^ k * Real.exp (-((σ - 2) / 2) * u) / (k.factorial : ℝ)) * Real.exp (-((σ - 2) / 2) * u) := by22have : (2 - σ) * u = -((σ - 2) / 2) * u + -((σ - 2) / 2) * u := by ring23rw [this, Real.exp_add]; ring24rw [h3]25exact mul_le_mul_of_nonneg_right h2 (Real.exp_pos _).le2627theorem landau_window_ineq {g R : ℝ → ℝ} (hg : Measurable g) {C₀ : ℝ}28(hC : ∀ u : ℝ, 0 ≤ u → |g u| ≤ C₀ * Real.exp (2 * u)) {σ θ U V : ℝ} (hσ : 2 < σ) (hθ : θ < σ) (hU : 0 < U)29(hR : IntegrableOn (fun u => R u * Real.exp (-θ * u)) (Icc U V))30(hR' : ∀ u ∈ Icc U V, 0 ≤ R u ∧ g u ≤ R u) (k : ℕ) (γ : ℝ) :31‖∫ u in Ioi (0 : ℝ), (g u : ℂ) * (u : ℂ) ^ k * cexp (-((σ : ℂ) + γ * I) * u) / (k.factorial : ℂ)‖ ≤322 * (1 / (σ - θ) ^ k) * (∫ u in Icc U V, R u * Real.exp (-θ * u)) -33(∫ u in Ioi (0 : ℝ), (g u : ℂ) * (u : ℂ) ^ k * cexp (-(σ : ℂ) * u) / (k.factorial : ℂ)).re +342 * C₀ * ∫ u in Ioi (0 : ℝ) \ Icc U V, u ^ k * Real.exp ((2 - σ) * u) / (k.factorial : ℝ) := by35set w : ℝ → ℝ := fun u => u ^ k * Real.exp (-σ * u) / (k.factorial : ℝ) with hw36set h : ℝ → ℝ := fun u => u ^ k * Real.exp ((2 - σ) * u) / (k.factorial : ℝ) with hh37have hhi : IntegrableOn h (Ioi 0) := landau_window_ineq_int k hσ38have hw0 : ∀ u, 0 ≤ u → 0 ≤ w u := fun u hu => by simp only [hw]; positivity39have hwm : Measurable w := by simp only [hw]; fun_prop40have hb : ∀ u, 0 ≤ u → |g u| * w u ≤ C₀ * h u := fun u hu => by41have : C₀ * h u = C₀ * Real.exp (2 * u) * w u := by42simp only [hw, hh]43have : (2 - σ) * u = 2 * u + -σ * u := by ring44rw [this, Real.exp_add]; ring45rw [this]46exact mul_le_mul_of_nonneg_right (hC u hu) (hw0 u hu)47have hI1 : IntegrableOn (fun u => |g u| * w u) (Ioi 0) := by48refine Integrable.mono' (hhi.const_mul C₀) (hg.abs.mul hwm).aestronglyMeasurable ?_49refine (ae_restrict_iff' measurableSet_Ioi).2 (Eventually.of_forall fun u hu => ?_)50rw [Real.norm_of_nonneg (mul_nonneg (abs_nonneg _) (hw0 u (le_of_lt hu)))]