Skip to main content
AlexKontorovich/PrimeNumberTheoremAnd
Source indexedlemma · leanprover/lean4:v4.32.0

crude_upper_bound

PrimeNumberTheoremAnd.Wiener · PrimeNumberTheoremAnd/Wiener.lean:3389 to 3531

Mathematical statement

Exact Lean statement

@[blueprint "crude-upper-bound"
  (title := "crude-upper-bound")
  (statement := /--
    If $\psi: \R \to \C$ is $C^2$ and compactly supported with $f$ and $\hat \psi$ non-negative, then there exists a constant $B$ such that
  $$ |\sum_{n=1}^\infty \frac{f(n)}{n} \hat \psi( \frac{1}{2\pi} \log \frac{n}{x} )| \leq B$$
  for all $x > 0$.
  -/)
  (proof := /-- This readily follows from the previous lemma and the triangle inequality. -/)
  (proofUses := ["limiting-fourier-variant"])
  (latexEnv := "corollary")]
lemma crude_upper_bound
    (hpos : 0 ≤ f)
    (hG : ContinuousOn G {s | 1 ≤ s.re})
    (hG' : Set.EqOn G (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re})
    (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ'))
    (ψ : CS 2 ℂ)
    (hψpos : ∀ y, 0 ≤ (𝓕 (ψ : ℝ → ℂ) y).re ∧ (𝓕 (ψ : ℝ → ℂ) y).im = 0) :
    ∃ B : ℝ, ∀ x : ℝ, 0 < x → ‖∑' n, f n / n * 𝓕 (ψ : ℝ → ℂ) (1 / (2 * π) * log (n / x))‖ ≤ B

Complete declaration

Lean source

Canonical source
Full Lean sourceLean 4
@[blueprint "crude-upper-bound"  (title := "crude-upper-bound")  (statement := /--    If $\psi: \R \to \C$ is $C^2$ and compactly supported with $f$ and $\hat \psi$ non-negative, then there exists a constant $B$ such that  $$ |\sum_{n=1}^\infty \frac{f(n)}{n} \hat \psi( \frac{1}{2\pi} \log \frac{n}{x} )| \leq B$$  for all $x > 0$.  -/)  (proof := /-- This readily follows from the previous lemma and the triangle inequality. -/)  (proofUses := ["limiting-fourier-variant"])  (latexEnv := "corollary")]lemma crude_upper_bound    (hpos : 0  f)    (hG : ContinuousOn G {s | 1  s.re})    (hG' : Set.EqOn G (fun s  LSeries f s - A / (s - 1)) {s | 1 < s.re})    (hf :  (σ' : ), 1 < σ'  Summable (nterm f σ'))    (ψ : CS 2 ℂ)    (hψpos :  y, 0  (𝓕 (ψ :   ℂ) y).re  (𝓕 (ψ :   ℂ) y).im = 0) :     B : ,  x : , 0 < x  ‖∑' n, f n / n * 𝓕 (ψ :   ℂ) (1 / (2 * π) * log (n / x))‖  B := by   -- Integrability of ψ  have hψ_int : MeasureTheory.Integrable (ψ :   ℂ) := by    simpa using (ψ.h1.continuous.integrable_of_hasCompactSupport ψ.h2)  have hψ_norm_int : MeasureTheory.Integrable (fun t :  => ‖(ψ :   ℂ) t‖) :=    hψ_int.norm  have hψ_meas : MeasureTheory.AEStronglyMeasurable (ψ :   ℂ) :=    hψ_int.aestronglyMeasurable   -- Uniform bound K for ‖G(1+it)‖ on support ψ  rcases exists_bound_norm_G_on_tsupport (G := G) hG ψ with K, hK_ts  have hK_support :       t : , t  Function.support (ψ :   ℂ)  ‖G (1 + t * Complex.I)‖  K := by    have hbnG (hKts :  t : , t  tsupport ψ  ‖G (1 + t * Complex.I)‖  K) :       t : , t  Function.support ψ  ‖G (1 + t * Complex.I)‖  K := by      intro t ht      exact hKts t ((subset_tsupport ψ) ht)    exact hbnG hK_ts   -- Measurability of the line restriction t ↦ G(1 + t I) from continuity-on  have hGline_meas : Measurable (fun t :  => G (1 + t * Complex.I)) := by    have hline_cont : Continuous (fun t :  => (1 : ℂ) + t * Complex.I) := by      continuity    have hmem :  t : , ((1 : ℂ) + t * Complex.I)  {s : ℂ | 1  s.re} := by      intro t      simp    have hcont : Continuous (G ∘ fun t :  => (1 : ℂ) + t * Complex.I) :=      hG.comp_continuous hline_cont hmem    simpa [Function.comp] using! hcont.measurable   -- L¹ bound for the scaled Fourier transform norm  have hF_norm_int :      MeasureTheory.Integrable (fun u :  => ‖𝓕 (ψ :   ℂ) (u / (2 * Real.pi))‖) :=    integrable_norm_fourier_scaled_of_CS2 ψ  have hF_meas :      MeasureTheory.AEStronglyMeasurable        (fun u :  => 𝓕 (ψ :   ℂ) (u / (2 * Real.pi))) := by    have hcont : Continuous fun u :  => 𝓕 (ψ :   ℂ) u := by      simpa using! continuous_FourierIntegral (ψ : W21)    have hcont_scaled : Continuous fun u :  => 𝓕 (ψ :   ℂ) (u / (2 * Real.pi)) :=      hcont.comp (by continuity)    exact hcont_scaled.aestronglyMeasurable  have hF_int :      MeasureTheory.Integrable (fun u :  => 𝓕 (ψ :   ℂ) (u / (2 * Real.pi))) :=    by      have hfin_norm :          MeasureTheory.HasFiniteIntegral            (fun u :  => ‖𝓕 (ψ :   ℂ) (u / (2 * Real.pi))‖) :=        hF_norm_int.hasFiniteIntegral      have hfin :          MeasureTheory.HasFiniteIntegral            (fun u :  => 𝓕 (ψ :   ℂ) (u / (2 * Real.pi))) := by        simpa [MeasureTheory.hasFiniteIntegral_iff_norm] using hfin_norm      exact hF_meas, hfin  refine K * (∫ t : , ‖(ψ :   ℂ) t‖)            + ‖A‖ * (∫ u : , ‖𝓕 (ψ :   ℂ) (u / (2 * Real.pi))‖), ?_  intro x hx  set I : ℂ := ∫ u in Set.Ici (-Real.log x), 𝓕 (ψ :   ℂ) (u / (2 * Real.pi)) with hI   -- Lemma 12  have hlim :=    limiting_fourier_variant (f := f) (A := A) (G := G)      hpos hG hG' hf ψ hψpos hx  have hlim' :      (∑' n, f n / n * 𝓕 (ψ :   ℂ) (1 / (2 * Real.pi) * Real.log (n / x)))        - A * I      = ∫ (t : ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I) := by    simpa [hI] using hlim   -- express the tsum as RHS + A*I  have htsum :      (∑' n, f n / n * 𝓕 (ψ :   ℂ) (1 / (2 * Real.pi) * Real.log (n / x)))      = (∫ (t : ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)) + A * I := by    have h' :        (∑' n, f n / n * 𝓕 (ψ :   ℂ) (1 / (2 * Real.pi) * Real.log (n / x)))          = (∫ (t : ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)) + A * I :=      eq_add_of_sub_eq hlim'    simpa [add_comm, mul_comm, mul_left_comm, mul_assoc] using h'   -- bound the RHS integral  have hRHS_bound :      ‖∫ (t : ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)‖         K * (∫ t : , ‖(ψ :   ℂ) t‖) :=    norm_error_integral_le (G := G) (ψ := (ψ :   ℂ)) (x := x) (K := K)      hGline_meas hψ_meas hx hK_support hψ_norm_int   -- bound the A * I term  have hA_bound :      ‖A * I‖  ‖A‖ * (∫ u : , ‖𝓕 (ψ :   ℂ) (u / (2 * Real.pi))‖) := by    have hF_on : MeasureTheory.IntegrableOn        (fun u :  => 𝓕 (ψ :   ℂ) (u / (2 * Real.pi)))        (Set.Ici (-Real.log x)) :=      hF_int.integrableOn    simpa [hI] using      norm_mul_integral_Ici_le_integral_norm (A := A)        (F := fun u :  => 𝓕 (ψ :   ℂ) (u / (2 * Real.pi)))        (a := -Real.log x) hF_on hF_norm_int   -- combine bounds  have htsum_std :      (∑' n, f n / n * 𝓕 (ψ :   ℂ) (1 / (2 * Real.pi) * Real.log ((n : ) / x)))        = (∫ (t : ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)) + A * I := by    simpa [one_div, mul_comm, mul_left_comm, mul_assoc] using htsum   -- bound in the normalized form  have hbound :      ‖∑' n, f n / n * 𝓕 (ψ :   ℂ)          (1 / (2 * Real.pi) * Real.log ((n : ) / x))‖         K * (∫ t : , ‖(ψ :   ℂ) t‖)          + ‖A‖ * (∫ u : , ‖𝓕 (ψ :   ℂ) (u / (2 * Real.pi))‖) := by    have hnorm :        ‖∑' n, f n / n * 𝓕 (ψ :   ℂ)            (1 / (2 * Real.pi) * Real.log ((n : ) / x))‖ =          ‖(∫ (t : ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)) + A * I‖ :=      congrArg norm htsum_std    calc      ‖∑' n, f n / n * 𝓕 (ψ :   ℂ)          (1 / (2 * Real.pi) * Real.log ((n : ) / x))‖          = ‖(∫ (t : ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)) + A * I‖ := hnorm      _  ‖∫ (t : ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)‖ + ‖A * I‖ :=            norm_add_le _ _      _  K * (∫ t : , ‖(ψ :   ℂ) t‖)          + ‖A‖ * (∫ u : , ‖𝓕 (ψ :   ℂ) (u / (2 * Real.pi))‖) :=            add_le_add hRHS_bound hA_bound  exact hbound