diff --git a/zeta23/Solution.lean b/zeta23/Solution.lean index bd5dd641b1..697438d39c 100644 --- a/zeta23/Solution.lean +++ b/zeta23/Solution.lean @@ -31,12 +31,7 @@ exactly the statement of its Challenge namesake and uses only the permitted axio -/ import ChallengeDeps import Zeta23.Unconditional -import Zeta23.FinalMult -import Zeta23.ThmD.Final -import Zeta23.ThmD.Mult -import Zeta23.ThmE.Final import Zeta23.ThmE.Mult -import Zeta23.ThmDE.Final import Zeta23.ThmDE.Mult noncomputable section diff --git a/zeta23/Solution/XiPrime.lean b/zeta23/Solution/XiPrime.lean index b5763ff3d7..2a0ed58a89 100644 --- a/zeta23/Solution/XiPrime.lean +++ b/zeta23/Solution/XiPrime.lean @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ import ChallengeDeps.XiPrime -import Zeta23.XiPrime.ExplicitFormula.ZeroFree import Zeta23.XiPrime.Final noncomputable section diff --git a/zeta23/Zeta23.lean b/zeta23/Zeta23.lean index 0c6f17a3a7..3b5da880d2 100644 --- a/zeta23/Zeta23.lean +++ b/zeta23/Zeta23.lean @@ -5,14 +5,7 @@ SPDX-License-Identifier: Apache-2.0 -/ -- Zeta23.lean — root of library Zeta23: the headline modules (see README.md). import Zeta23.Unconditional -import Zeta23.ThmD.Final -import Zeta23.ThmE.Final -import Zeta23.ThmDE.Final -import Zeta23.FinalMult -import Zeta23.ThmD.Mult import Zeta23.ThmE.Mult import Zeta23.ThmDE.Mult -import Zeta23.ZeroSide.TightMult import Zeta23.XiPrime.Final -import Zeta23.PairCeiling.CeilingLaw256 import Zeta23.PairCeiling.Signed diff --git a/zeta23/Zeta23/Analytic/BacklundInduction.lean b/zeta23/Zeta23/Analytic/BacklundInduction.lean new file mode 100644 index 0000000000..0eaf2233f2 --- /dev/null +++ b/zeta23/Zeta23/Analytic/BacklundInduction.lean @@ -0,0 +1,103 @@ +/- +Copyright (c) 2026 Anthropic, PBC. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +SPDX-License-Identifier: Apache-2.0 +-/ +/- +Shared Backlund induction: bound |Im ∫ logDeriv f| by splitting at Re-zeros. +Used by Zeta23/RvM/Backlund.lean (f = riemannZeta) and Zeta23/ThmE/BacklundChi.lean +(f = χ.LFunction). +-/ +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.NumberTheory.LSeries.RiemannZeta + +open Complex Set MeasureTheory Real intervalIntegral + +noncomputable section + +namespace Zeta23 +namespace Analytic + +/-- Induction on the number of Re-zeros of `f(· + iT)` in `(u,v) ⊆ [1/2,2]`. -/ +lemma im_integral_logDeriv_le_aux_of {f : ℂ → ℂ} {T : ℝ} + (hbase : ∀ u v : ℝ, 1 / 2 ≤ u → u < v → v ≤ 2 → + (∀ σ ∈ Set.Ioo u v, (f (σ + T * I)).re ≠ 0) → + |(∫ σ in u..v, logDeriv f (σ + T * I)).im| ≤ 2 * Real.pi) + (hint : ∀ {u v : ℝ}, u ∈ Set.Icc (1 / 2 : ℝ) 2 → v ∈ Set.Icc (1 / 2 : ℝ) 2 → + IntervalIntegrable (fun σ : ℝ => logDeriv f (σ + T * I)) volume u v) + (P : Finset ℝ) (hP : ∀ σ ∈ Set.Icc (1 / 2 : ℝ) 2, (f (σ + T * I)).re = 0 → σ ∈ P) : + ∀ n : ℕ, ∀ u v : ℝ, 1 / 2 ≤ u → u < v → v ≤ 2 → + (P.filter (fun x => u < x ∧ x < v)).card ≤ n → + |(∫ σ in u..v, logDeriv f (σ + T * I)).im| + ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := by + have base : ∀ u v : ℝ, 1 / 2 ≤ u → u < v → v ≤ 2 → + (P.filter (fun x => u < x ∧ x < v)).card = 0 → + |(∫ σ in u..v, logDeriv f (σ + T * I)).im| + ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := by + intro u v hu huv hv hc + have hno : ∀ σ ∈ Set.Ioo u v, (f (σ + T * I)).re ≠ 0 := by + intro σ hσ hre + have hσP : σ ∈ P.filter (fun x => u < x ∧ x < v) := + Finset.mem_filter.mpr ⟨hP σ ⟨by linarith [hσ.1], by linarith [hσ.2]⟩ hre, hσ.1, hσ.2⟩ + rw [Finset.card_eq_zero] at hc + simp [hc] at hσP + rw [hc] + simpa using hbase u v hu huv hv hno + intro n + induction n with + | zero => + intro u v hu huv hv hc + exact base u v hu huv hv (Nat.le_zero.mp hc) + | succ n ih => + intro u v hu huv hv hc + by_cases hc0 : (P.filter (fun x => u < x ∧ x < v)).card = 0 + · exact base u v hu huv hv hc0 + obtain ⟨m, hm⟩ := Finset.card_pos.mp (Nat.pos_of_ne_zero hc0) + obtain ⟨-, hum, hmv⟩ := Finset.mem_filter.mp hm + set S := P.filter (fun x => u < x ∧ x < v) with hSdef + set S₁ := P.filter (fun x => u < x ∧ x < m) with hS₁def + set S₂ := P.filter (fun x => m < x ∧ x < v) with hS₂def + have hdisj : Disjoint S₁ S₂ := by + rw [Finset.disjoint_left] + intro x hx1 hx2 + have := (Finset.mem_filter.mp hx1).2.2 + have := (Finset.mem_filter.mp hx2).2.1 + linarith + have hsubS : S₁ ∪ S₂ ⊆ S.erase m := by + intro x hx + rw [Finset.mem_erase] + rcases Finset.mem_union.mp hx with hx | hx + · obtain ⟨hxP, hux, hxm⟩ := Finset.mem_filter.mp hx + exact ⟨hxm.ne, Finset.mem_filter.mpr ⟨hxP, hux, by linarith⟩⟩ + · obtain ⟨hxP, hmx, hxv⟩ := Finset.mem_filter.mp hx + exact ⟨hmx.ne', Finset.mem_filter.mpr ⟨hxP, by linarith, hxv⟩⟩ + have hcard : S₁.card + S₂.card + 1 ≤ S.card := by + have h1 : S₁.card + S₂.card = (S₁ ∪ S₂).card := (Finset.card_union_of_disjoint hdisj).symm + have h2 : (S₁ ∪ S₂).card ≤ (S.erase m).card := Finset.card_le_card hsubS + have h3 : (S.erase m).card = S.card - 1 := Finset.card_erase_of_mem hm + have h4 : 1 ≤ S.card := Finset.card_pos.mpr ⟨m, hm⟩ + omega + have hc1 : S₁.card ≤ n := by omega + have hc2 : S₂.card ≤ n := by omega + have e1 := ih u m hu hum (by linarith) hc1 + have e2 := ih m v (by linarith) hmv hv hc2 + have hmI : m ∈ Set.Icc (1 / 2 : ℝ) 2 := ⟨by linarith, by linarith⟩ + have huI : u ∈ Set.Icc (1 / 2 : ℝ) 2 := ⟨hu, by linarith⟩ + have hvI : v ∈ Set.Icc (1 / 2 : ℝ) 2 := ⟨by linarith, hv⟩ + rw [← intervalIntegral.integral_add_adjacent_intervals (hint huI hmI) (hint hmI hvI), + Complex.add_im] + have hcast : ((S₁.card : ℝ) + 1) + ((S₂.card : ℝ) + 1) ≤ (S.card : ℝ) + 1 := by + have : ((S₁.card + S₂.card + 1 : ℕ) : ℝ) ≤ (S.card : ℝ) := by exact_mod_cast hcard + push_cast at this; linarith + calc |(∫ σ in u..m, logDeriv f (σ + T * I)).im + + (∫ σ in m..v, logDeriv f (σ + T * I)).im| + ≤ |(∫ σ in u..m, logDeriv f (σ + T * I)).im| + + |(∫ σ in m..v, logDeriv f (σ + T * I)).im| := abs_add_le _ _ + _ ≤ 2 * Real.pi * ((S₁.card : ℝ) + 1) + 2 * Real.pi * ((S₂.card : ℝ) + 1) := + add_le_add e1 e2 + _ ≤ 2 * Real.pi * ((S.card : ℝ) + 1) := by nlinarith [Real.pi_pos] + +end Analytic +end Zeta23 + +end diff --git a/zeta23/Zeta23/Analytic/RectangleLogDeriv.lean b/zeta23/Zeta23/Analytic/RectangleLogDeriv.lean index db30df619c..163aa25a7e 100644 --- a/zeta23/Zeta23/Analytic/RectangleLogDeriv.lean +++ b/zeta23/Zeta23/Analytic/RectangleLogDeriv.lean @@ -181,20 +181,9 @@ theorem rectangleIntegral'_mul_logDeriv_of_poles {f g : ℂ → ℂ} {z w : ℂ} have hZmem : ∀ ρ ∈ Z, ρ ∈ Rectangle z w \ (P : Set ℂ) := fun ρ hρ => ⟨hZsub hρ, by simpa using hZnotP ρ hρ⟩ -- zeros are interior points - have hZint : ∀ ρ ∈ Z, Rectangle z w ∈ 𝓝 ρ := by - intro ρ hρ - have hρR : ρ ∈ Rectangle z w := hZsub hρ - have hρB : ρ ∉ RectangleBorder z w := fun h => hborder ρ h ((hZ ρ (hZmem ρ hρ)).mpr hρ) - obtain ⟨h1, h2⟩ := hρR - have h1' : z.re ≤ ρ.re ∧ ρ.re ≤ w.re := by simpa [uIcc_of_le hre] using h1 - have h2' : z.im ≤ ρ.im ∧ ρ.im ≤ w.im := by simpa [uIcc_of_le him] using h2 - simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, not_or] at hρB - obtain ⟨⟨⟨hb1, hb2⟩, hb3⟩, hb4⟩ := hρB - rw [rectangle_mem_nhds_iff, mem_reProdIm, uIoo_of_le hre, uIoo_of_le him] - refine ⟨⟨lt_of_le_of_ne h1'.1 (fun h => hb2 ⟨h.symm, h2⟩), - lt_of_le_of_ne h1'.2 (fun h => hb4 ⟨h, h2⟩)⟩, - ⟨lt_of_le_of_ne h2'.1 (fun h => hb1 ⟨h1, h.symm⟩), - lt_of_le_of_ne h2'.2 (fun h => hb3 ⟨h1, h⟩)⟩⟩ + have hZint : ∀ ρ ∈ Z, Rectangle z w ∈ 𝓝 ρ := fun ρ hρ => + rectangle_mem_nhds_of_mem_of_not_mem_border hre him (hZsub hρ) + (fun h => hborder ρ h ((hZ ρ (hZmem ρ hρ)).mpr hρ)) -- residues: +ord·g at zeros, −m·g at poles let A : ℂ → ℂ := fun q => if q ∈ P then -((m q : ℂ) * g q) else (analyticOrderNatAt f q : ℂ) * g q have hint : ∀ q ∈ Z ∪ P, Rectangle z w ∈ 𝓝 q := by @@ -360,27 +349,65 @@ theorem rectangleIntegral'_mul_logDeriv {f g : ℂ → ℂ} {z w : ℂ} (hre : z (by simp) (by simpa using hf) hg hborder (by simpa using hZ) hZsub (fun _ => 0) (by simp) simpa using h -/-- **Weighted argument principle, self-contained form**: as `rectangleIntegral'_mul_logDeriv`, with -the finite zero set produced rather than supplied. -/ -theorem rectangleIntegral'_mul_logDeriv' {f g : ℂ → ℂ} {z w : ℂ} (hre : z.re ≤ w.re) - (him : z.im ≤ w.im) - (hf : AnalyticOnNhd ℂ f (Rectangle z w)) (hg : AnalyticOnNhd ℂ g (Rectangle z w)) - (hborder : ∀ s ∈ RectangleBorder z w, f s ≠ 0) : - RectangleIntegral' (fun s => g s * logDeriv f s) z w - = ∑ ρ ∈ (finite_zeros_rectangle hf (rectangleBorder_subset_rectangle z w - (show z ∈ RectangleBorder z w from Or.inl (Or.inl (Or.inl ⟨left_mem_uIcc, rfl⟩)))) - (hborder z (Or.inl (Or.inl (Or.inl ⟨left_mem_uIcc, rfl⟩))))).toFinset, - (analyticOrderNatAt f ρ : ℂ) * g ρ := by +/-- **Strip zero count as a contour integral**: for any function `f` analytic on `[-1, 2] × [T₁, T₂]` +whose zeros `P` all lie in `0 < Re s < 1`, have finite intersection with `(T₁, T₂]`, and avoid the +horizontal edges `Im s = T₁, T₂`, `(1/2πi) ∮_{∂([-1,2]×[T₁,T₂])} f'/f = ∑_{ρ ∈ P, T₁ < Im ρ ≤ T₂} mult ρ`. -/ +theorem rectangleIntegral'_logDeriv_strip_eq_finsum {f : ℂ → ℂ} {P : ℂ → Prop} {mult : ℂ → ℕ} + {T₁ T₂ : ℝ} (hT : T₁ ≤ T₂) + (hf : AnalyticOnNhd ℂ f (Rectangle (-1 + T₁ * I) (2 + T₂ * I))) + (hfin : ({ρ | P ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}).Finite) + (hzero : ∀ s, f s = 0 ↔ P s) + (hstrip : ∀ ρ, P ρ → 0 < ρ.re ∧ ρ.re < 1) + (hgood₁ : ∀ ρ, P ρ → ρ.im ≠ T₁) + (hgood₂ : ∀ ρ, P ρ → ρ.im ≠ T₂) + (hmult : ∀ ρ, P ρ → analyticOrderNatAt f ρ = mult ρ) : + RectangleIntegral' (logDeriv f) (-1 + T₁ * I) (2 + T₂ * I) + = ((∑ᶠ ρ ∈ {ρ | P ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}, mult ρ : ℕ) : ℂ) := by classical - set hfin := finite_zeros_rectangle hf (rectangleBorder_subset_rectangle z w - (show z ∈ RectangleBorder z w from Or.inl (Or.inl (Or.inl ⟨left_mem_uIcc, rfl⟩)))) - (hborder z (Or.inl (Or.inl (Or.inl ⟨left_mem_uIcc, rfl⟩)))) - refine rectangleIntegral'_mul_logDeriv hre him hf hg hborder hfin.toFinset ?_ ?_ - · intro s hs - simp [Set.Finite.mem_toFinset, hs] - · intro s hs - exact ((Set.Finite.mem_toFinset _).mp hs).1 - + set z : ℂ := -1 + T₁ * I with hzdef + set w : ℂ := 2 + T₂ * I with hwdef + have hzre : z.re = -1 := by simp [z] + have hzim : z.im = T₁ := by simp [z] + have hwre : w.re = 2 := by simp [w] + have hwim : w.im = T₂ := by simp [w] + have hre : z.re ≤ w.re := by rw [hzre, hwre]; norm_num + have him : z.im ≤ w.im := by rw [hzim, hwim]; exact hT + have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ + (-1 ≤ s.re ∧ s.re ≤ 2) ∧ (T₁ ≤ s.im ∧ s.im ≤ T₂) := by + intro s + simp only [Rectangle, mem_reProdIm, hzre, hzim, hwre, hwim, + uIcc_of_le (show (-1 : ℝ) ≤ 2 by norm_num), uIcc_of_le hT, mem_Icc] + have hg : AnalyticOnNhd ℂ (fun _ : ℂ => (1 : ℂ)) (Rectangle z w) := fun _ _ => analyticAt_const + have hZ : ∀ s ∈ Rectangle z w, f s = 0 ↔ s ∈ hfin.toFinset := by + intro s hs + rw [Set.Finite.mem_toFinset] + obtain ⟨_, hi1, hi2⟩ := (hmem s).mp hs + rw [hzero] + exact ⟨fun hp => ⟨hp, lt_of_le_of_ne hi1 (fun h' => hgood₁ s hp h'.symm), hi2⟩, fun h => h.1⟩ + have hZsub : ((hfin.toFinset : Finset ℂ) : Set ℂ) ⊆ Rectangle z w := by + intro s hs + rw [Finset.mem_coe, Set.Finite.mem_toFinset] at hs + obtain ⟨hp, hi1, hi2⟩ := hs + obtain ⟨h1, h2⟩ := hstrip s hp + exact (hmem s).mpr ⟨⟨by linarith, by linarith⟩, hi1.le, hi2⟩ + have hborder : ∀ s ∈ RectangleBorder z w, f s ≠ 0 := by + intro s hs h0 + have hp := (hzero s).mp h0 + obtain ⟨h1, h2⟩ := hstrip s hp + simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, hzre, hzim, hwre, + hwim] at hs + rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ + · exact hgood₁ s hp h' + · linarith + · exact hgood₂ s hp h' + · linarith + have key := rectangleIntegral'_mul_logDeriv hre him hf hg hborder hfin.toFinset hZ hZsub + simp only [one_mul, mul_one] at key + rw [show (fun s => logDeriv f s) = logDeriv f from rfl] at key + rw [key, finsum_mem_eq_finite_toFinset_sum _ hfin, Nat.cast_sum] + refine Finset.sum_congr rfl fun ρ hρ => ?_ + rw [Set.Finite.mem_toFinset] at hρ + rw [hmult ρ hρ.1] end Analytic end Zeta23 diff --git a/zeta23/Zeta23/Assembly.lean b/zeta23/Zeta23/Assembly.lean index 3e08238ba1..5cf62acd7b 100644 --- a/zeta23/Zeta23/Assembly.lean +++ b/zeta23/Zeta23/Assembly.lean @@ -7,1627 +7,19 @@ SPDX-License-Identifier: Apache-2.0 Part of the Zeta23 formalization of "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". -/ -import Zeta23.LinAlg -import Zeta23.Defs -import Zeta23.Defs.Counting -import Zeta23.Assembly.Inputs -import Zeta23.Hypotheses -import Zeta23.PrimeSideTemp -import Zeta23.TracesBoundsE -import Mathlib.Analysis.Matrix.Normed -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics -import Mathlib.Analysis.Complex.ExponentialBounds -import Mathlib.Analysis.Real.Pi.Bounds +import Zeta23.Assembly.Endgame /-! -# §4 "The counting inequalities" and §6 "Proofs of Theorems A, B, C" — assembly +# §4 "The counting inequalities" and §6 "Proofs of Theorems A, B, C" — assembly barrel Reference: the paper, labels `prop:zeroside-rank`, `eq:zeroside-rank`, `prop:zeroside`, `eq:zeroside`, `eq:zeroside2`, and `sec:proofs` (proofs of `thm:A`, `thm:B`, `thm:C`). -Design: -* Parts A–E of this file are **ζ-free and Defs-free**: theorems about Hermitian matrices - (Part A, consuming the `RHLinalg` §3 lemmas) and about real numbers / explicit real - functions (Parts B–E). Every analytic or combinatorial input produced elsewhere - (prop:block — `ZeroSide.lean`; prop:tail — `Tail.lean`; thm:traces — `PrimeSideTemp.lean`'s - `TracesBounds`; Riemann–von Mangoldt and the local count — `Hypotheses.lean`; taper facts — - `Taper.lean`) enters as an explicit, named hypothesis whose docstring quotes the paper label. -* Part F instantiates A–E with the concrete objects of `Defs.lean`: `thmA_abstract`, `thmB_abstract`, - `thmC_abstract` (Theorems A–C at fixed `λ < 1` for an abstract `ZeroConfig`, taking prop:block / prop:tail / - the H-EF bridge / [eq:abdef] / thm:traces as named inputs). -* Error terms are explicit inequalities with named constants throughout Parts A–D; filters / - `Tendsto` appear only in the final `ε`-wrappers (Part E). - -## Units (paper §4, [eq:AE], [eq:hatunits]) - -Three normalisations of the same real-symmetric `d × d` matrix occur: -* `G` [eq:Gdef]; -* `G̃ = G / L`, `à = A / L`, `Ẽ = E / L` ("tilde units") — lem:weyl and lem:CS are applied to - `G̃ = à + Ẽ` with threshold `θ = θ₀ ≥ ‖Ẽ‖` (prop:zeroside); -* `Ĝ = G / (a L²)`, `Â`, `Ê` ("hat units", [eq:hatunits]) — lem:ranktrace is applied to ` = P + Q` - **only** in these units (paper, after prop:zeroside-rank: "Lemma lem:ranktrace is not - scale-invariant: it must be applied in the units (eq:hatunits), in which tr P ≤ N_on(I′)"). -The two systems meet only through the explicit conversion of Part D, -`tr Ĝ = tr G̃ /(aL)`, `‖Ĝ‖_F² = tr G̃² /(aL)²` (paper §6, first line of the proof of Thm A), and the -taper constant `a` must cancel in `tr Ĝ = N + O(√X / a)`. - -Scalar field: `ZeroSide.lean` works over `ℂ` (the inertia argument lives on `ℂ^d`); Part A is kept -`RCLike`-generic like `RHLinalg` and is instantiated at `ℂ` in Part F. +This barrel module re-exports the four submodules of `Zeta23.Assembly`: +* `Zeta23.Assembly.Matrix` — Parts A–D (matrix counting inequalities, Frobenius perturbation, + `H`/`F` vs `λ₁`, fixed-`T` explicit inequalities, hat/tilde unit conversions, trace inputs). +* `Zeta23.Assembly.Growth` — Parts E, F2, F5 (`EpsLowerBound`/`DyadicLowerBound`, asymptotic + wrappers, growth lemmas, and `calE_tendsto_zero`). +* `Zeta23.Assembly.Windows` — Parts F0–F1 (window additivity and concrete fixed-`T` seams). +* `Zeta23.Assembly.Endgame` — Parts F3–F4 (`thmA_abstract`, `thmB_abstract`, `thmC_abstract`). -/ - -noncomputable section - -open Matrix Finset RHLinalg -open scoped ComplexOrder - -namespace Zeta23 -namespace Assembly - -/-! ## Part A. Matrix-level counting inequalities (paper §4, "The counting inequalities") -/ - -section MatrixLevel - -variable {𝕜 : Type*} [RCLike 𝕜] -variable {n : Type*} [Fintype n] [DecidableEq n] - -/-- For any Hermitian matrix, `n₊(A) ≤ rank A` (positive eigenvalues are nonzero eigenvalues). -Used in prop:zeroside: "`n₊^θ(G̃) ≤ n₊(Ã) ≤ rank à ≤ #𝒵(I′)`". -/ -lemma posIndex_le_rank {A : Matrix n n 𝕜} (hA : A.IsHermitian) : posIndex hA ≤ A.rank := by - rw [hA.rank_eq_card_non_zero_eigs, Fintype.card_subtype] - unfold posIndex - apply card_le_card - intro i - simp only [mem_filter, mem_univ, true_and] - exact ne_of_gt - -/-- **prop:zeroside-rank, first assertion** (the paper, `prop:zeroside-rank`): -"`s₁ + s₂ ≥ 4 tr  − 2 N(I′) − ‖Â‖_F²`". - -Stated over the abstract output of prop:block(ii) — ` = P + Q`, `P ⪰ 0`, `rank P ≤ r` -(paper: `r = s₁+s₂`), `tr P ≤ N_on(I′)`, `Q` Hermitian with `n₊(Q) ≤ b` (paper: `b = p`) — together -with the counting fact `N_on(I′) + 2p ≤ N(I′)` ([eq:Ncount] and the line after it). Proof exactly as -in the paper: lem:ranktrace at `c = 2` (`RHLinalg.rank_trace_ineq_two`) gives -`r ≥ 2 tr P + 4 tr Q − 4b − ‖P+Q‖_F² = 4 tr  − 2(tr P + 2b) − ‖Â‖_F²`, and `tr P + 2b ≤ N(I′)`. - -UNITS: hat units ` = A/(aL²)` only [eq:hatunits]. -/ -theorem zeroside_rank_core {Ahat P Q : Matrix n n 𝕜} - (hPQ : Ahat = P + Q) (hP : P.PosSemidef) (hQ : Q.IsHermitian) - {r b : ℕ} (hrank : P.rank ≤ r) (hpos : posIndex hQ ≤ b) - {Non NI' : ℝ} (htrP : rtrace P ≤ Non) (hNcount : Non + 2 * b ≤ NI') : - 4 * rtrace Ahat - 2 * NI' - frobSq Ahat ≤ r := by - have h := rank_trace_ineq_two hP hQ hrank hpos - subst hPQ - rw [rtrace_add] - linarith - -end MatrixLevel - -/-! ### Frobenius-norm bookkeeping - -`RHLinalg.frobSq A = Re tr(Aᴴ A)`. We identify it with the square of Mathlib's (scoped) Frobenius -norm, to get the triangle inequality `‖Ĝ − Ê‖_F ≤ ‖Ĝ‖_F + ‖Ê‖_F` used in prop:zeroside-rank. -/ - -section Frob -open scoped Matrix.Norms.Frobenius - -variable {𝕜 : Type*} [RCLike 𝕜] -variable {n : Type*} [Fintype n] - -lemma frobSq_eq_sum_norm_sq (A : Matrix n n 𝕜) : frobSq A = ∑ i, ∑ j, ‖A i j‖ ^ 2 := by - unfold frobSq - simp only [trace, diag_apply, mul_apply, conjTranspose_apply, map_sum, RCLike.star_def] - rw [Finset.sum_comm] - refine sum_congr rfl fun i _ => sum_congr rfl fun j _ => ?_ - rw [RCLike.conj_mul, ← RCLike.ofReal_pow, RCLike.ofReal_re] - -/-- `RHLinalg.frobSq A = ‖A‖_F ²` (Mathlib's Frobenius norm, scoped instance). -/ -lemma frobSq_eq_norm_sq (A : Matrix n n 𝕜) : frobSq A = ‖A‖ ^ 2 := by - rw [frobSq_eq_sum_norm_sq, frobenius_norm_def] - simp_rw [Real.rpow_two] - rw [← Real.sqrt_eq_rpow, Real.sq_sqrt (by positivity)] - -lemma frobSq_nonneg (A : Matrix n n 𝕜) : 0 ≤ frobSq A := by - rw [frobSq_eq_sum_norm_sq]; positivity - -/-- `‖A‖_F = √(frobSq A)`. -/ -lemma norm_eq_sqrt_frobSq (A : Matrix n n 𝕜) : ‖A‖ = Real.sqrt (frobSq A) := by - rw [frobSq_eq_norm_sq, Real.sqrt_sq (norm_nonneg _)] - -/-- Triangle inequality in the form used by prop:zeroside-rank: -`‖G − E‖_F² ≤ (‖G‖_F + ‖E‖_F)²`, written with `frobSq` and `√`. -/ -lemma frobSq_sub_le (G E : Matrix n n 𝕜) : - frobSq (G - E) ≤ (Real.sqrt (frobSq G) + Real.sqrt (frobSq E)) ^ 2 := by - rw [frobSq_eq_norm_sq, ← norm_eq_sqrt_frobSq, ← norm_eq_sqrt_frobSq] - exact pow_le_pow_left₀ (norm_nonneg _) (norm_sub_le G E) 2 - -/-- **prop:zeroside-rank, perturbation step** (proof of `prop:zeroside-rank` in the paper): -"` = Ĝ − Ê` with `|tr Ê| ≤ ‖Ê‖₁` and `‖Â‖_F ≤ ‖Ĝ‖_F + ‖Ê‖_F ≤ ‖Ĝ‖_F + ‖Ê‖₁`, so … -`4 tr  − ‖Â‖_F² ≥ 4 tr Ĝ − ‖Ĝ‖_F² − O(θ₀ L⁻¹ (1 + ‖Ĝ‖_F))`". - -Here the `O(·)` is made explicit: with `B ≥ 0` any common bound for `|tr Ê|` and `‖Ê‖_F` -(prop:tail supplies `B = ‖Ê‖₁ ≤ 2θ₀/L`), the loss is exactly `B (4 + 2‖Ĝ‖_F + B)`. -UNITS: hat units. -/ -theorem four_tr_sub_frobSq_perturb {Ghat Ahat Ehat : Matrix n n 𝕜} - (hGAE : Ghat = Ahat + Ehat) {B : ℝ} (hB : 0 ≤ B) - (htrE : |rtrace Ehat| ≤ B) (hfrE : frobSq Ehat ≤ B ^ 2) : - 4 * rtrace Ghat - frobSq Ghat - B * (4 + 2 * Real.sqrt (frobSq Ghat) + B) - ≤ 4 * rtrace Ahat - frobSq Ahat := by - have hA : Ahat = Ghat - Ehat := by rw [hGAE]; abel - have htr : rtrace Ahat = rtrace Ghat - rtrace Ehat := by rw [hA, rtrace_sub] - have hsqE : Real.sqrt (frobSq Ehat) ≤ B := Real.sqrt_le_iff.mpr ⟨hB, hfrE⟩ - have hsqG : 0 ≤ Real.sqrt (frobSq Ghat) := Real.sqrt_nonneg _ - have hfrA : frobSq Ahat ≤ (Real.sqrt (frobSq Ghat) + B) ^ 2 := by - rw [hA] - refine (frobSq_sub_le Ghat Ehat).trans ?_ - gcongr - have hGG : Real.sqrt (frobSq Ghat) ^ 2 = frobSq Ghat := Real.sq_sqrt (frobSq_nonneg _) - have htrE' : rtrace Ehat ≤ B := (le_abs_self _).trans htrE - nlinarith [hfrA, hGG, htrE', htr] - -end Frob - -section MatrixLevel2 - -variable {𝕜 : Type*} [RCLike 𝕜] -variable {n : Type*} [Fintype n] [DecidableEq n] - -/-- **prop:zeroside, [eq:zeroside]** (the paper's `prop:zeroside`): "For every `θ ≥ θ₀`, -`s₁ ≥ 2 n₊^θ(G̃) − N(I′)` and `#𝒵(I′) ≥ n₊^θ(G̃)`." - -Inputs, as in the paper's proof: lem:weyl (`RHLinalg.weyl_posIndexAbove_le`, needs -`|λᵢ(Ẽ)| ≤ θ` for all `i`, which is `‖Ẽ‖ ≤ θ₀ ≤ θ`), prop:block(i) (`n₊(Ã) ≤ s₁+s₂+p`, -`rank à ≤ #𝒵(I′)`), and [eq:Ncount] (`N(I′) ≥ s₁ + 2s₂ + 2p`). -UNITS: tilde units `G̃ = à + Ẽ`. -/ -theorem zeroside_core {At Et : Matrix n n 𝕜} - (hAt : At.IsHermitian) (hEt : Et.IsHermitian) - {θ : ℝ} (hθ : ∀ i, |hEt.eigenvalues i| ≤ θ) - {s₁ s₂ p cardZ : ℕ} (hblock_pos : posIndex hAt ≤ s₁ + s₂ + p) (hblock_rank : At.rank ≤ cardZ) - {NI' : ℝ} (hNcount : (s₁ : ℝ) + 2 * s₂ + 2 * p ≤ NI') : - 2 * (posIndexAbove (hAt.add hEt) θ : ℝ) - NI' ≤ s₁ ∧ - posIndexAbove (hAt.add hEt) θ ≤ cardZ := by - have hweyl : posIndexAbove (hAt.add hEt) θ ≤ posIndex hAt := weyl_posIndexAbove_le hAt hEt hθ - refine ⟨?_, ?_⟩ - · have h1 : (posIndexAbove (hAt.add hEt) θ : ℝ) ≤ s₁ + s₂ + p := by - exact_mod_cast hweyl.trans hblock_pos - linarith - · exact hweyl.trans ((posIndex_le_rank hAt).trans hblock_rank) - -/-- `posIndexAbove` depends only on the matrix, not on the particular Hermitian-ness proof -(convenience for rewriting `G̃ = à + Ẽ`). -/ -lemma posIndexAbove_congr {A B : Matrix n n 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) - (h : A = B) (θ : ℝ) : posIndexAbove hA θ = posIndexAbove hB θ := by - subst h; rfl - -/-- **[eq:nplus-lower]** (proof of `thm:B` in the paper): lem:CS (`RHLinalg.cauchySchwarz_count`) -applied to `R = G̃`, `θ = θ₀`: if `tr G̃ > θ₀ d` then -`n₊^{θ₀}(G̃) ≥ (tr G̃ − θ₀ d)² / tr G̃²`. (`d = Fintype.card n`; `tr G̃² = ‖G̃‖_F² = frobSq G̃` for -Hermitian `G̃`. This is `cauchySchwarz_count` verbatim, re-exported under the paper's equation -name.) UNITS: tilde units. -/ -theorem nplus_lower {Gt : Matrix n n 𝕜} (hGt : Gt.IsHermitian) {θ : ℝ} (hθ : 0 ≤ θ) - (htr : θ * Fintype.card n < rtrace Gt) : - (rtrace Gt - θ * Fintype.card n) ^ 2 / frobSq Gt ≤ (posIndexAbove hGt θ : ℝ) := - cauchySchwarz_count hGt hθ htr - -end MatrixLevel2 - -/-! ## Part B. The functions `H`, `F` and the `λ₁` versus `λ` step (paper [eq:Fdef], §6) - -Vocabulary from `Zeta23/Defs.lean`: `l T = log(T/2π)`, `ell1 T = l T + 2 log 2 − 1`, `Hfun`, `Ffun`, -`P.L T = P.lam * l T`, `P.lam1 T = P.L T / ell1 T`. -/ - -section HF -open Real - -/-- The constant `c₀ := 2 log 2 − 1 = ℓ₁ − l` (paper §1 Notation / [eq:RvM]); `0 < c₀ < 1`. -/ -def c₀ : ℝ := 2 * Real.log 2 - 1 - -lemma c₀_pos : 0 < c₀ := by - have := Real.log_two_gt_d9; unfold c₀; linarith - -lemma c₀_lt_one : c₀ < 1 := by - have := Real.log_two_lt_d9; unfold c₀; linarith - -lemma ell1_eq (T : ℝ) : ell1 T = l T + c₀ := by simp only [ell1, c₀]; ring - -lemma ell1_pos {T : ℝ} (hl : 0 < l T) : 0 < ell1 T := by - rw [ell1_eq]; have := c₀_pos; linarith - -/-- `λ₁ = λ l / (l + c₀)` — unfolded form of `Params.lam1` [eq:ratio]. -/ -lemma lam1_eq (P : Params) (T : ℝ) : P.lam1 T = P.lam * l T / (l T + c₀) := by - simp only [Params.lam1, Params.L, ell1_eq] - -/-- `0 ≤ λ − λ₁`, i.e. `λ₁ ≤ λ` (paper §6: "`0 ≤ λ − λ₁ ≤ λ/l`"), for `l > 0`, `λ ≥ 0`. -/ -lemma lam1_le (P : Params) (T : ℝ) (hlam : 0 ≤ P.lam) (hl : 0 < l T) : P.lam1 T ≤ P.lam := by - rw [lam1_eq] - have hc := c₀_pos - rw [div_le_iff₀ (by linarith)] - nlinarith - -/-- `λ − λ₁ ≤ λ / l` (paper §6); indeed `λ − λ₁ = λ c₀/(l + c₀)` with `c₀ < 1`. -/ -lemma sub_lam1_le (P : Params) (T : ℝ) (hlam : 0 ≤ P.lam) (hl : 0 < l T) : - P.lam - P.lam1 T ≤ P.lam / l T := by - rw [lam1_eq] - have hc := c₀_pos; have hc1 := c₀_lt_one - have h1 : P.lam - P.lam * l T / (l T + c₀) = P.lam * c₀ / (l T + c₀) := by - field_simp; ring - rw [h1, div_le_div_iff₀ (by linarith) hl] - have h2 : c₀ * l T ≤ l T + c₀ := by nlinarith - calc P.lam * c₀ * l T = P.lam * (c₀ * l T) := by ring - _ ≤ P.lam * (l T + c₀) := mul_le_mul_of_nonneg_left h2 hlam - -lemma lam1_pos (P : Params) (T : ℝ) (hlam : 0 < P.lam) (hl : 0 < l T) : 0 < P.lam1 T := by - rw [lam1_eq]; have hc := c₀_pos; positivity - -/-- **`H(λ₁) ≥ H(λ) − 1/(λ l)`** (the paper §6, proof of Thm A: "Since `H′(x) = x⁻² − 1/3 ∈ (0,∞)` -is decreasing on `(0,1]` and `0 ≤ λ − λ₁ ≤ λ/l`, we have `H(λ₁) ≥ H(λ) − 1/(λl)`"). -We prove it via the exact identity `H(λ) − H(λ₁) = c₀/(λ l) − (λ − λ₁)/3` and `c₀ = 2 log 2 − 1 < 1`. -(Note `λ₁ = L/ℓ₁ ≠ λ`.) -/ -theorem Hfun_lam1_ge (P : Params) (T : ℝ) (hlam : 0 < P.lam) (hl : 0 < l T) : - Hfun P.lam - 1 / (P.lam * l T) ≤ Hfun (P.lam1 T) := by - have hc := c₀_pos; have hc1 := c₀_lt_one - have hl1 : 0 < l T + c₀ := by linarith - have hle := lam1_le P T hlam.le hl - have key : Hfun P.lam - Hfun (P.lam1 T) = c₀ / (P.lam * l T) - (P.lam - P.lam1 T) / 3 := by - rw [lam1_eq] - simp only [Hfun] - field_simp - ring - have : c₀ / (P.lam * l T) ≤ 1 / (P.lam * l T) := - div_le_div_of_nonneg_right hc1.le (by positivity) - linarith - -/-- Lipschitz bound for `F` on `[0,1]`: `F(y) − F(x) ≤ y − x` for `0 ≤ x ≤ y ≤ 1` -(paper: "`F′(x) = (1−x²/3)/(1+x²/3)² ∈ (0,1]` on `[0,1]`"), proved by algebra. -/ -lemma Ffun_sub_le (x y : ℝ) (hx : 0 ≤ x) (hxy : x ≤ y) (_hy : y ≤ 1) : Ffun y - Ffun x ≤ y - x := by - simp only [Ffun] - rw [div_sub_div _ _ (by positivity) (by positivity), div_le_iff₀ (by positivity)] - nlinarith [mul_nonneg hx (sub_nonneg.2 hxy), mul_nonneg (mul_nonneg hx hx) (sub_nonneg.2 hxy), - sq_nonneg x, sq_nonneg y, mul_nonneg hx (hx.trans hxy), mul_le_mul hxy hxy hx (hx.trans hxy)] - -/-- **`F(λ₁) ≥ F(λ) − 1/l`** (the paper §6, proof of Thm B: "`F′(x) = (1−x²/3)/(1+x²/3)² ∈ (0,1]` -on `[0,1]` and `0 ≤ λ − λ₁ ≤ 1/l`, so `F(λ₁) ≥ F(λ) − 1/l`"). -/ -theorem Ffun_lam1_ge (P : Params) (T : ℝ) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) (hl : 0 < l T) : - Ffun P.lam - 1 / l T ≤ Ffun (P.lam1 T) := by - have hle := lam1_le P T hlam.le hl - have hpos := lam1_pos P T hlam hl - have hsub := sub_lam1_le P T hlam.le hl - have h1 := Ffun_sub_le (P.lam1 T) P.lam hpos.le hle hlam1 - have h2 : P.lam / l T ≤ 1 / l T := div_le_div_of_nonneg_right hlam1 hl.le - linarith - -/-- `sup_{λ<1} H(λ) = 2/3`, in the quantitative form used for the `λ → 1⁻` step: -for `λ ∈ [1/2, 1]`, `H(λ) ≥ 2/3 − (5/3)(1 − λ)`. -/ -lemma Hfun_ge_near_one (lam : ℝ) (h1 : 1 / 2 ≤ lam) (h2 : lam ≤ 1) : - 2 / 3 - 5 / 3 * (1 - lam) ≤ Hfun lam := by - simp only [Hfun] - have hlam : 0 < lam := by linarith - have : 1 / lam ≤ 1 + 2 * (1 - lam) := by - rw [div_le_iff₀ hlam]; nlinarith - linarith - -/-- For `λ ∈ [0, 1]`, `F(λ) ≥ 3/4 − (1 − λ)` (for the `λ → 1⁻` step of Thm B/C). -/ -lemma Ffun_ge_near_one (lam : ℝ) (h1 : 0 ≤ lam) (h2 : lam ≤ 1) : - 3 / 4 - (1 - lam) ≤ Ffun lam := by - have := Ffun_sub_le lam 1 h1 h2 le_rfl - rw [Ffun_one] at this; linarith - -end HF - -/-! ## Part C. §6 at fixed `T`: the explicit inequality for Theorem A - -All quantities are real numbers attached to one fixed `T` (and fixed `λ`, `ϱ`); every error term is -explicit. Dictionary (paper ↔ arguments): `N = N(T,2T)`, `NII = N(I′∖I) := N(T−D₀,T) + N(2T,2T+D₀)`, -`N0star = N₀*(T,2T)`, `s12 = s₁ + s₂`, `trGh = tr Ĝ`, `frGh = ‖Ĝ‖_F²`, `trAh = tr Â`, -`frAh = ‖Â‖_F²`, `B` = the prop:tail bound for `|tr Ê|` and `‖Ê‖_F` (`≤ 2θ₀/L`). -/ - -section FixedT - -/-- **[eq:zeroside-rank] made explicit** (the paper `prop:zeroside-rank`, second assertion): -"`N₀*(T,2T) ≥ 4 tr Ĝ − ‖Ĝ‖_F² − 2N(T,2T) − O(θ₀L⁻¹(1+‖Ĝ‖_F) + D₀ l)`", here with the `O(·)` -replaced by the explicit `3 N(I′∖I) + B(4 + 2‖Ĝ‖_F + B)`. -Inputs: `hcount` = "`s₁+s₂ ≤ N₀*(T,2T) + N(I′∖I)`"; `hcore` = `zeroside_rank_core` with -`N(I′) = N(T,2T) + N(I′∖I)`; `hpert` = `four_tr_sub_frobSq_perturb`. -/ -theorem N0star_lower_explicit - {N0star s12 : ℕ} {N NII trGh frGh trAh frAh B : ℝ} - (hcount : (s12 : ℝ) ≤ N0star + NII) - (hcore : 4 * trAh - 2 * (N + NII) - frAh ≤ s12) - (hpert : 4 * trGh - frGh - B * (4 + 2 * Real.sqrt frGh + B) ≤ 4 * trAh - frAh) : - 4 * trGh - frGh - 2 * N - 3 * NII - B * (4 + 2 * Real.sqrt frGh + B) ≤ N0star := by - linarith - -/-- **§6 proof of Thm A, the "`(H(λ₁) − O(𝓔′_T)) N`" line made explicit.** -With `cλ := 1/λ₁ + λ₁/3` (so `4 − cλ − 2 = H(λ₁)`), if `|tr Ĝ − N| ≤ R₁` -("`tr Ĝ = N + O(√X/a)`") and `‖Ĝ‖_F² ≤ cλ N + R₂` ("`‖Ĝ‖_F² ≤ (1/λ₁+λ₁/3)N(1+O(𝓔′_T))`"), then -`N₀*(T,2T) ≥ H(λ₁) N − [4R₁ + R₂ + 3N(I′∖I) + B(4 + 2√(cλ N + R₂) + B)]`. -/ -theorem N0star_lower_H - {N0star N NII trGh frGh B lam₁ R₁ R₂ : ℝ} (hB : 0 ≤ B) - (h0 : 4 * trGh - frGh - 2 * N - 3 * NII - B * (4 + 2 * Real.sqrt frGh + B) ≤ N0star) - (htr : |trGh - N| ≤ R₁) (hfr : frGh ≤ (1 / lam₁ + lam₁ / 3) * N + R₂) : - Hfun lam₁ * N - (4 * R₁ + R₂ + 3 * NII - + B * (4 + 2 * Real.sqrt ((1 / lam₁ + lam₁ / 3) * N + R₂) + B)) ≤ N0star := by - have h1 : N - R₁ ≤ trGh := by have := (abs_le.mp htr).1; linarith - have h2 : Real.sqrt frGh ≤ Real.sqrt ((1 / lam₁ + lam₁ / 3) * N + R₂) := Real.sqrt_le_sqrt hfr - have h3 : Hfun lam₁ * N = 4 * N - (1 / lam₁ + lam₁ / 3) * N - 2 * N := by simp only [Hfun]; ring - nlinarith [h0, h1, h2, h3, hB, mul_le_mul_of_nonneg_left h2 hB] - -end FixedT - -/-! ## Part D. Unit conversion `Ĝ ↔ G̃` and the trace inputs -(paper §6, proof of Thm A, first lines: "In the units (eq:hatunits), `tr Ĝ = tr G̃/(aL)` and -`‖Ĝ‖_F² = tr G̃²/(aL)²`. By Proposition prop:trace, `tr Ĝ = N + O(√X/a)` … (note that the taper -constant `a` cancels). By (eq:tr2) … `‖Ĝ‖_F² ≤ … = (1/λ₁ + λ₁/3) N (1 + O(𝓔′_T))`") -/ - -section Units -open Complex - -variable {m : Type*} [Fintype m] - -lemma rtrace_smul_ofReal (c : ℝ) (M : Matrix m m ℂ) : rtrace ((c : ℂ) • M) = c * rtrace M := by - unfold rtrace - rw [Matrix.trace_smul, smul_eq_mul] - simp - -lemma frobSq_smul_ofReal (c : ℝ) (M : Matrix m m ℂ) : - frobSq ((c : ℂ) • M) = c ^ 2 * frobSq M := by - rw [frobSq_eq_sum_norm_sq, frobSq_eq_sum_norm_sq, mul_sum] - refine sum_congr rfl fun i _ => ?_ - rw [mul_sum] - refine sum_congr rfl fun j _ => ?_ - simp [Matrix.smul_apply, mul_pow, sq_abs] - -variable (P : Params) (T : ℝ) - -omit [Fintype m] in -/-- `G̃ = L⁻¹ • G` with the scalar written as a real cast. -/ -lemma tilde_eq (M : Matrix m m ℂ) : P.tilde T M = (((P.L T)⁻¹ : ℝ) : ℂ) • M := by - simp [Params.tilde] - -omit [Fintype m] in -/-- `Ĝ = (aL²)⁻¹ • G` with the scalar written as a real cast [eq:hatunits]. -/ -lemma hat_eq (M : Matrix m m ℂ) : P.hat T M = (((P.a T * P.L T ^ 2)⁻¹ : ℝ) : ℂ) • M := by - simp [Params.hat] - -omit [Fintype m] in -/-- `Ĝ = (aL)⁻¹ • G̃`: hat units are tilde units divided by `aL` ([eq:hatunits] vs [eq:Gdef]). -/ -lemma hat_eq_smul_tilde (M : Matrix m m ℂ) : - P.hat T M = (((P.a T * P.L T)⁻¹ : ℝ) : ℂ) • P.tilde T M := by - rw [hat_eq, tilde_eq, smul_smul, ← ofReal_mul] - congr 1 - push_cast - ring - -/-- "`tr Ĝ = tr G̃ /(aL)`" (paper §6). -/ -lemma rtrace_hat (M : Matrix m m ℂ) : - rtrace (P.hat T M) = (P.a T * P.L T)⁻¹ * rtrace (P.tilde T M) := by - rw [hat_eq_smul_tilde, rtrace_smul_ofReal] - -/-- "`‖Ĝ‖_F² = tr G̃² /(aL)²`" (paper §6), with `tr G̃² = ‖G̃‖_F²`. -/ -lemma frobSq_hat (M : Matrix m m ℂ) : - frobSq (P.hat T M) = ((P.a T * P.L T)⁻¹) ^ 2 * frobSq (P.tilde T M) := by - rw [hat_eq_smul_tilde, frobSq_smul_ofReal] - -/-- The prime-side trace computed entrywise: `rtrace (G̃ᵖʳⁱᵐᵉ) = P.trGtilde T` -(Defs: `trGtilde := L⁻¹ Σ_k G_{kk}`). -/ -lemma rtrace_tilde_Gp : rtrace (P.tilde T (P.Gp T)) = P.trGtilde T := by - rw [tilde_eq, rtrace_smul_ofReal] - simp [Params.trGtilde, rtrace, Matrix.trace, Params.Gp] - -/-- The prime-side Frobenius norm computed entrywise: `frobSq (G̃ᵖʳⁱᵐᵉ) = P.trGtildeSq T` -(Defs: `trGtildeSq := (L⁻¹)² Σ_{k,l} G_{kl}²`). -/ -lemma frobSq_tilde_Gp : frobSq (P.tilde T (P.Gp T)) = P.trGtildeSq T := by - rw [tilde_eq, frobSq_smul_ofReal, frobSq_eq_sum_norm_sq] - simp [Params.trGtildeSq, Params.Gp, sq_abs] - -end Units - -section TraceInputs - -/-- **"`tr Ĝ = N + O(√X/a)` (note that the taper constant `a` cancels)"** (paper §6 / prop:trace). -From [eq:tr1] first form `|tr G̃ − a L N| ≤ C·L·√X`: -`|tr G̃/(aL) − N| ≤ C √X / a` — the main term is exactly `N`, independent of `a`. -/ -theorem trGhat_sub_N_le {a L N trGt C sqX : ℝ} (ha : 0 < a) (hL : 0 < L) - (h : |trGt - a * L * N| ≤ C * (L * sqX)) : - |(a * L)⁻¹ * trGt - N| ≤ C * sqX / a := by - have haL : 0 < a * L := mul_pos ha hL - have e : (a * L)⁻¹ * trGt - N = (a * L)⁻¹ * (trGt - a * L * N) := by field_simp - rw [e, abs_mul, abs_of_pos (inv_pos.2 haL), ← div_eq_inv_mul, div_le_iff₀ haL] - calc |trGt - a * L * N| ≤ C * (L * sqX) := h - _ = C * sqX / a * (a * L) := by field_simp - -/-- The algebra behind "`‖Ĝ‖_F² ≤ (T/(2πLa²))(ℓ₁² + L²/3)(1+O(𝓔′)) = … = (1/λ₁ + λ₁/3) N (1+O(𝓔′))`": -`(aL)⁻² · (TL/2π)(ℓ₁² + L²/3) = a⁻² · (1/λ₁ + λ₁/3) · (Tℓ₁/2π)` exactly, where `λ₁ = L/ℓ₁`. -/ -lemma mainTr2_hat_identity {a L T ℓ₁ : ℝ} (ha : a ≠ 0) (hL : L ≠ 0) (hℓ₁ : ℓ₁ ≠ 0) : - ((a * L)⁻¹) ^ 2 * (T * L / (2 * Real.pi) * (ℓ₁ ^ 2 + L ^ 2 / 3)) - = (a ^ 2)⁻¹ * (1 / (L / ℓ₁) + (L / ℓ₁) / 3) * (T * ℓ₁ / (2 * Real.pi)) := by - field_simp - -/-- **"`‖Ĝ‖_F² ≤ (1/λ₁ + λ₁/3) N (1 + O(𝓔′_T))`" made explicit.** From [eq:tr2] (second form, -upper half) `tr G̃² ≤ (1 + C𝓔)(TL/2π)(ℓ₁² + L²/3)` and Riemann–von Mangoldt in the form -`Tℓ₁/2π ≤ N + R_N` [eq:RvM], with `K := (1 + C𝓔)/a²` and `cλ := 1/λ₁ + λ₁/3`: -`‖Ĝ‖_F² = tr G̃²/(aL)² ≤ cλ N + cλ((K − 1) N + K R_N)`. (The second summand is the explicit `R₂`.) -/ -theorem frobGhat_le {a L T ℓ₁ trG2 C calE N RN : ℝ} (ha : 0 < a) (hL : 0 < L) (hℓ₁ : 0 < ℓ₁) - (hK : 0 ≤ 1 + C * calE) - (htr2 : trG2 - T * L / (2 * Real.pi) * (ℓ₁ ^ 2 + L ^ 2 / 3) - ≤ C * calE * (T * L / (2 * Real.pi) * (ℓ₁ ^ 2 + L ^ 2 / 3))) - (hRvM : T * ℓ₁ / (2 * Real.pi) ≤ N + RN) : - ((a * L)⁻¹) ^ 2 * trG2 - ≤ (1 / (L / ℓ₁) + (L / ℓ₁) / 3) * N - + (1 / (L / ℓ₁) + (L / ℓ₁) / 3) * (((1 + C * calE) / a ^ 2 - 1) * N - + (1 + C * calE) / a ^ 2 * RN) := by - set M := T * L / (2 * Real.pi) * (ℓ₁ ^ 2 + L ^ 2 / 3) with hM - set cl := 1 / (L / ℓ₁) + (L / ℓ₁) / 3 with hcl - have hcl0 : 0 ≤ cl := by rw [hcl]; positivity - have h1 : trG2 ≤ (1 + C * calE) * M := by linarith - have h2 : ((a * L)⁻¹) ^ 2 * trG2 ≤ ((a * L)⁻¹) ^ 2 * ((1 + C * calE) * M) := - mul_le_mul_of_nonneg_left h1 (sq_nonneg _) - have h3 : ((a * L)⁻¹) ^ 2 * ((1 + C * calE) * M) - = (1 + C * calE) / a ^ 2 * cl * (T * ℓ₁ / (2 * Real.pi)) := by - have := mainTr2_hat_identity (T := T) ha.ne' hL.ne' hℓ₁.ne' - rw [← hM, ← hcl] at this - calc ((a * L)⁻¹) ^ 2 * ((1 + C * calE) * M) = (1 + C * calE) * (((a * L)⁻¹) ^ 2 * M) := by ring - _ = (1 + C * calE) * ((a ^ 2)⁻¹ * cl * (T * ℓ₁ / (2 * Real.pi))) := by rw [this] - _ = _ := by ring - have hKa : 0 ≤ (1 + C * calE) / a ^ 2 := by positivity - have h4 : (1 + C * calE) / a ^ 2 * cl * (T * ℓ₁ / (2 * Real.pi)) - ≤ (1 + C * calE) / a ^ 2 * cl * (N + RN) := - mul_le_mul_of_nonneg_left hRvM (mul_nonneg hKa hcl0) - calc ((a * L)⁻¹) ^ 2 * trG2 ≤ (1 + C * calE) / a ^ 2 * cl * (N + RN) := by linarith - _ = cl * N + cl * (((1 + C * calE) / a ^ 2 - 1) * N + (1 + C * calE) / a ^ 2 * RN) := by ring - -end TraceInputs - -/-! ## Part E. The asymptotic wrappers (the only place filters appear) - -E1: the explicit error of Parts C–D is `o(N)` given the growth facts; E2: `o(N)` error ⇒ `ε`-form; -E3: `λ → 1⁻`; E4: dyadic summation `N₀*(T,2T) ⇒ N₀*(T)` (paper §6, end of proof of Thm A). -/ - -section Asymptotic -open Filter Asymptotics Topology - -/-- E2. An `o(N)` error term yields the `ε`-form. -/ -theorem eps_form_of_isLittleO {H₀ : ℝ} {N lower err : ℝ → ℝ} - (hmain : ∀ᶠ T in atTop, H₀ * N T - err T ≤ lower T) - (hN : ∀ᶠ T in atTop, 0 ≤ N T) (herr : err =o[atTop] N) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (H₀ - ε) * N T ≤ lower T := by - intro ε hε - have h := (herr.def hε).and (hmain.and hN) - obtain ⟨T₀, hT₀⟩ := Filter.eventually_atTop.mp h - refine ⟨T₀, fun T hT => ?_⟩ - obtain ⟨h1, h2, h3⟩ := hT₀ T hT - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg h3] at h1 - have : err T ≤ ε * N T := (le_abs_self _).trans h1 - linarith - -/-- E1. The explicit error term of `N0star_lower_H` is `o(N)`, given: -`N → ∞`; `R₁, R₂, N(I′∖I) = o(N)`; `B → 0`; `cλ = 1/λ₁ + λ₁/3` eventually in `[0, K]`. -/ -theorem err_isLittleO {N R₁ R₂ NII B cl : ℝ → ℝ} {K : ℝ} - (hN : Tendsto N atTop atTop) - (hR₁ : R₁ =o[atTop] N) (hR₂ : R₂ =o[atTop] N) (hNII : NII =o[atTop] N) - (hB : Tendsto B atTop (𝓝 0)) - (hcl : ∀ᶠ T in atTop, 0 ≤ cl T ∧ cl T ≤ K) : - (fun T => 4 * R₁ T + R₂ T + 3 * NII T - + B T * (4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T)) =o[atTop] N := by - have hB1 : B =o[atTop] (fun _ => (1:ℝ)) := (isLittleO_one_iff ℝ).2 hB - -- the bracket is O(N) - have hbr : (fun T => 4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T) =O[atTop] N := by - have hK : 0 ≤ K := by - obtain ⟨T, hT⟩ := hcl.exists; exact hT.1.trans hT.2 - refine IsBigO.of_bound (7 + 2 * K) ?_ - have hN1 : ∀ᶠ T in atTop, 1 ≤ N T := hN.eventually_ge_atTop 1 - have hR₂1 : ∀ᶠ T in atTop, ‖R₂ T‖ ≤ 1 * ‖N T‖ := hR₂.def one_pos - have hBb : ∀ᶠ T in atTop, ‖B T‖ ≤ 1 * ‖(1:ℝ)‖ := hB1.def one_pos - filter_upwards [hN1, hR₂1, hBb, hcl] with T h1 h2 h3 h4 - have hN0 : 0 ≤ N T := by linarith - simp only [Real.norm_eq_abs, abs_of_nonneg hN0, one_mul] at h2 - simp only [norm_one, mul_one, Real.norm_eq_abs] at h3 - have hin : cl T * N T + R₂ T ≤ ((K + 1) * N T) ^ 2 := by - have : R₂ T ≤ N T := (le_abs_self _).trans h2 - have hclN : cl T * N T ≤ K * N T := mul_le_mul_of_nonneg_right h4.2 hN0 - have hKN : 1 ≤ (K + 1) * N T := by nlinarith - calc cl T * N T + R₂ T ≤ (K + 1) * N T := by linarith - _ ≤ (K + 1) * N T * ((K + 1) * N T) := - le_mul_of_one_le_right (mul_nonneg (by linarith) hN0) hKN - _ = ((K + 1) * N T) ^ 2 := by ring - have hs : Real.sqrt (cl T * N T + R₂ T) ≤ (K + 1) * N T := - Real.sqrt_le_iff.mpr ⟨by positivity, hin⟩ - simp only [Real.norm_eq_abs, abs_of_nonneg hN0] - refine (abs_le.mpr ⟨?_, ?_⟩) - · nlinarith [Real.sqrt_nonneg (cl T * N T + R₂ T), abs_le.mp h3] - · nlinarith [abs_le.mp h3] - have hlast : (fun T => B T * (4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T)) =o[atTop] N := by - simpa using hB1.mul_isBigO hbr - exact (((hR₁.const_mul_left 4).add hR₂).add (hNII.const_mul_left 3)).add hlast - -/-- **sup over λ ∈ [1/2, 1)** (the common `λ → 1⁻` step): if the `ε`-form holds with constant `c(λ)` -for every `λ ∈ [1/2, 1)` and `C − η ≤ c(λ)` for some such `λ`, for every `η > 0`, then it holds with constant `C`. -/ -theorem eps_form_sup_half {c : ℝ → ℝ} {C : ℝ} - (hc : ∀ η > (0:ℝ), ∃ lam : ℝ, 1 / 2 ≤ lam ∧ lam < 1 ∧ C - η ≤ c lam) - {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) - (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (c lam - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (C - ε) * N T ≤ lower T := by - intro ε hε - obtain ⟨lam, h0, h1, h2⟩ := hc (ε / 2) (by linarith) - obtain ⟨T₀, hT₀⟩ := h lam h0 h1 (ε / 2) (by linarith) - exact ⟨T₀, fun T hT => le_trans (mul_le_mul_of_nonneg_right (by linarith) (hN T)) (hT₀ T hT)⟩ - -/-- a point of `[1/2, 1)` within `δ` of `1`. -/ -lemma exists_lam_near_one {δ : ℝ} (hδ : 0 < δ) : ∃ lam : ℝ, 1 / 2 ≤ lam ∧ lam < 1 ∧ 1 - lam ≤ δ := - ⟨max (1 / 2) (1 - δ), le_max_left _ _, max_lt (by norm_num) (by linarith), - by have := le_max_right (1 / 2) (1 - δ); linarith⟩ - -/-- E3. The `λ → 1⁻` step: if for every `λ ∈ [1/2, 1)` the `ε`-form holds with -constant `H(λ)`, then it holds with constant `2/3 = sup_{λ<1} H(λ)`. -/ -theorem eps_form_twoThirds {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) - (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (Hfun lam - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (2 / 3 - ε) * N T ≤ lower T := - eps_form_sup_half (fun η hη => by - obtain ⟨lam, h1, h2, h3⟩ := exists_lam_near_one (show 0 < 3 * η / 5 by linarith) - exact ⟨lam, h1, h2, by linarith [Hfun_ge_near_one lam h1 h2.le]⟩) hN h - -/-- Same for `F`: constant `3/4 = sup_{λ<1} F(λ)` (Thm C), given the `ε`-forms with `F(λ)`. -/ -theorem eps_form_threeQuarters {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) - (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (Ffun lam - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (3 / 4 - ε) * N T ≤ lower T := - eps_form_sup_half (fun η hη => by - obtain ⟨lam, h1, h2, h3⟩ := exists_lam_near_one hη - exact ⟨lam, h1, h2, by linarith [Ffun_ge_near_one lam (by linarith) h2.le]⟩) hN h - -/-- Same for `2F − 1`: constant `1/2 = sup_{λ<1} (2F(λ) − 1)` (Thm B). -/ -theorem eps_form_half {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) - (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (2 * Ffun lam - 1 - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (1 / 2 - ε) * N T ≤ lower T := - eps_form_sup_half (c := fun lam => 2 * Ffun lam - 1) (fun η hη => by - obtain ⟨lam, h1, h2, h3⟩ := exists_lam_near_one (half_pos hη) - exact ⟨lam, h1, h2, by linarith [Ffun_ge_near_one lam (by linarith) h2.le]⟩) hN h - -/-- E4. **Dyadic summation** (the paper §6, end of the proof of Thm A: "the statement for -`N₀*(T)/N(T)` by summing over dyadic intervals: given `ε>0` choose `T₁` with -`N₀*(t,2t) ≥ (2/3−ε)N(t,2t)` for `t ≥ T₁`; for `T ≥ 2T₁` and `J` maximal with `T2^{−J} ≥ T₁`, -`N₀*(T) ≥ Σ_{j=1}^{J} N₀*(T2^{−j},T2^{−j+1}) ≥ (2/3−ε)(N(T)−N(T2^{−J})) ≥ (2/3−ε)N(T) − O_ε(1)`.") -Abstract form: `f, g` interval-additive and nonnegative, `g(0,T) → ∞`. -/ -theorem dyadic {f g : ℝ → ℝ → ℝ} {c : ℝ} - (hf_add : ∀ a b c : ℝ, a ≤ b → b ≤ c → f a c = f a b + f b c) - (hg_add : ∀ a b c : ℝ, a ≤ b → b ≤ c → g a c = g a b + g b c) - (hf_nn : ∀ a b, 0 ≤ f a b) (hg_nn : ∀ a b, 0 ≤ g a b) - (hg_top : Tendsto (fun T => g 0 T) atTop atTop) - (h : ∀ ε > 0, ∃ T₁, ∀ t ≥ T₁, (c - ε) * g t (2 * t) ≤ f t (2 * t)) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (c - ε) * g 0 T ≤ f 0 T := by - intro ε hε - by_cases hc : c - ε / 2 < 0 - · refine ⟨0, fun T _ => ?_⟩ - have := hg_nn 0 T; have := hf_nn 0 T - nlinarith - have hc : 0 ≤ c - ε / 2 := not_lt.mp hc - obtain ⟨T₁', hT₁'⟩ := h (ε / 2) (by linarith) - -- WLOG T₁ ≥ 1 - set T₁ := max T₁' 1 with hT₁def - have hT₁ : ∀ t ≥ T₁, (c - ε / 2) * g t (2 * t) ≤ f t (2 * t) := - fun t ht => hT₁' t ((le_max_left _ _).trans ht) - have hT₁pos : 0 < T₁ := lt_of_lt_of_le one_pos (le_max_right _ _) - -- g is monotone in the second argument - have hg_mono : ∀ a b b', a ≤ b → b ≤ b' → g a b ≤ g a b' := by - intro a b b' hab hbb'; rw [hg_add a b b' hab hbb']; linarith [hg_nn b b'] - -- induction: f(t, 2^n t) ≥ (c − ε/2) g(t, 2^n t) for t ≥ T₁ - have key : ∀ n : ℕ, ∀ t ≥ T₁, (c - ε / 2) * g t (2 ^ n * t) ≤ f t (2 ^ n * t) := by - intro n - induction n with - | zero => - intro t ht - have hf0 : f t t = 0 := by have := hf_add t t t le_rfl le_rfl; linarith - have hg0 : g t t = 0 := by have := hg_add t t t le_rfl le_rfl; linarith - simp [hf0, hg0] - | succ n ih => - intro t ht - have ht0 : 0 ≤ t := hT₁pos.le.trans ht - have h2n : (1:ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num) - have hmid : t ≤ 2 ^ n * t := by nlinarith - have hmid' : 2 ^ n * t ≤ 2 ^ (n + 1) * t := by rw [pow_succ]; nlinarith - rw [hf_add t (2 ^ n * t) (2 ^ (n + 1) * t) hmid hmid', - hg_add t (2 ^ n * t) (2 ^ (n + 1) * t) hmid hmid'] - have hstep := hT₁ (2 ^ n * t) (ht.trans hmid) - have e : 2 * (2 ^ n * t) = 2 ^ (n + 1) * t := by rw [pow_succ]; ring - rw [e] at hstep - have := ih t ht - linarith - -- choose T₀ so that (ε/2) g(0,T) ≥ (c − ε/2) g(0, 2T₁) for T ≥ T₀, and T₀ ≥ T₁ - obtain ⟨T₂, hT₂⟩ := Filter.eventually_atTop.mp - (hg_top.eventually_ge_atTop ((c - ε / 2) * g 0 (2 * T₁) * (2 / ε))) - refine ⟨max T₁ T₂, fun T hT => ?_⟩ - have hTT₁ : T₁ ≤ T := (le_max_left _ _).trans hT - have hT0 : 0 ≤ T := hT₁pos.le.trans hTT₁ - -- find n with 2^n T₁ ≤ T < 2^(n+1) T₁ - obtain ⟨n, hn1, hn2⟩ := exists_nat_pow_near (x := T / T₁) - ((one_le_div hT₁pos).2 hTT₁) one_lt_two - set t := T / 2 ^ n with htdef - have h2n : (0:ℝ) < 2 ^ n := by positivity - have htT₁ : T₁ ≤ t := by - rw [htdef, le_div_iff₀ h2n]; rw [le_div_iff₀ hT₁pos] at hn1; linarith - have ht2T₁ : t ≤ 2 * T₁ := by - rw [htdef, div_le_iff₀ h2n]; rw [div_lt_iff₀ hT₁pos, pow_succ] at hn2; linarith - have hTt : 2 ^ n * t = T := by rw [htdef]; field_simp - have ht0 : 0 ≤ t := hT₁pos.le.trans htT₁ - have htT : t ≤ T := by rw [← hTt]; nlinarith [one_le_pow₀ (M₀ := ℝ) (a := 2) (n := n) (by norm_num)] - have hk := key n t htT₁ - rw [hTt] at hk - -- f(0,T) ≥ f(t,T) ≥ (c−ε/2) g(t,T) = (c−ε/2)(g(0,T) − g(0,t)) ≥ (c−ε/2) g(0,T) − (c−ε/2) g(0,2T₁) - have hf0T : f t T ≤ f 0 T := by rw [hf_add 0 t T ht0 htT]; linarith [hf_nn 0 t] - have hgsplit : g t T = g 0 T - g 0 t := by rw [hg_add 0 t T ht0 htT]; ring - have hg0t : g 0 t ≤ g 0 (2 * T₁) := hg_mono 0 t (2 * T₁) ht0 ht2T₁ - have hbig : (c - ε / 2) * g 0 (2 * T₁) * (2 / ε) ≤ g 0 T := hT₂ T ((le_max_right _ _).trans hT) - have hbig' : (c - ε / 2) * g 0 (2 * T₁) ≤ ε / 2 * g 0 T := by - have := mul_le_mul_of_nonneg_left hbig (by linarith : 0 ≤ ε / 2) - calc (c - ε / 2) * g 0 (2 * T₁) = ε / 2 * ((c - ε / 2) * g 0 (2 * T₁) * (2 / ε)) := by - field_simp - _ ≤ ε / 2 * g 0 T := this - calc (c - ε) * g 0 T = (c - ε / 2) * g 0 T - ε / 2 * g 0 T := by ring - _ ≤ (c - ε / 2) * g 0 T - (c - ε / 2) * g 0 (2 * T₁) := by linarith - _ ≤ (c - ε / 2) * (g 0 T - g 0 t) := by nlinarith - _ = (c - ε / 2) * g t T := by rw [hgsplit] - _ ≤ f t T := hk - _ ≤ f 0 T := hf0T - -end Asymptotic - -/-! ## Part F. Instantiation with the concrete objects of `Defs.lean` - -F2: growth lemmas for the explicit functions `l, L, X` and for `N(T,2T)` under H-RvM; -F3: `thmA_abstract` — Theorem A at fixed `λ < 1` for an abstract `ZeroConfig`, from the named inputs. -/ - -section Growth -open Filter Asymptotics Topology Real - -/-- `l(T) = log(T/2π) → ∞`. -/ -lemma tendsto_l_atTop : Tendsto l atTop atTop := - Real.tendsto_log_atTop.comp (tendsto_id.atTop_div_const (by positivity)) - -lemma eventually_l_pos : ∀ᶠ T in atTop, 0 < l T := tendsto_l_atTop.eventually_gt_atTop 0 - -lemma eventually_one_le_l : ∀ᶠ T in atTop, 1 ≤ l T := tendsto_l_atTop.eventually_ge_atTop 1 - -/-- `L = λ l → ∞` for `λ > 0`. -/ -lemma tendsto_L_atTop (P : Params) (hlam : 0 < P.lam) : Tendsto P.L atTop atTop := - tendsto_l_atTop.const_mul_atTop hlam - -/-- `log T = l T + log 2π` for `T > 0`. -/ -lemma log_eq_l_add {T : ℝ} (hT : 0 < T) : Real.log T = l T + Real.log (2 * π) := by - rw [l, Real.log_div hT.ne' (by positivity)]; ring - -/-- `log T ≤ 2 l T` eventually. -/ -lemma eventually_log_le_two_l : ∀ᶠ T in atTop, Real.log T ≤ 2 * l T := by - filter_upwards [tendsto_l_atTop.eventually_ge_atTop (Real.log (2 * π)), eventually_gt_atTop 0] - with T h1 h2 - rw [log_eq_l_add h2]; linarith - -lemma eventually_log_nonneg : ∀ᶠ T in atTop, 0 ≤ Real.log T := - Real.tendsto_log_atTop.eventually_ge_atTop 0 - -/-- `T l(T) → ∞`. -/ -lemma tendsto_Tl_atTop : Tendsto (fun T => T * l T) atTop atTop := - tendsto_id.atTop_mul_atTop₀ tendsto_l_atTop - -/-- H-RvM ⇒ `N(T,2T) ≥ T l /(4π)` eventually. ([eq:RvM]: `N = Tℓ₁/2π + O(log T)`, `ℓ₁ ≥ l`.) -/ -lemma eventually_N_ge (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) : - ∀ᶠ T in atTop, T * l T / (4 * π) ≤ (Z.N T (2 * T) : ℝ) := by - obtain ⟨C, T₀, h⟩ := hR.main - filter_upwards [eventually_ge_atTop T₀, eventually_log_le_two_l, eventually_log_nonneg, - eventually_l_pos, eventually_ge_atTop (16 * π * |C|), eventually_ge_atTop 0] with T hT hlog hlog0 hl hTC hT0 - have h1 := (abs_le.mp (h T hT)).1 - have hc := c₀_pos - have hℓ : l T ≤ ell1 T := by rw [ell1_eq]; linarith - have h2 : -(C * Real.log T) ≥ -(|C| * (2 * l T)) := by - have : C * Real.log T ≤ |C| * Real.log T := mul_le_mul_of_nonneg_right (le_abs_self C) hlog0 - nlinarith [abs_nonneg C] - have h3 : T / (2 * π) * l T ≤ T / (2 * π) * ell1 T := - mul_le_mul_of_nonneg_left hℓ (by positivity) - -- N ≥ T l/2π − 2|C| l ≥ T l/4π once T ≥ 16π|C|... (T l/(4π) ≥ 2|C| l ⟸ T ≥ 8π|C|) - have h4 : 2 * |C| * l T ≤ T * l T / (4 * π) := by - rw [le_div_iff₀ (by positivity)] - nlinarith [abs_nonneg C, Real.pi_pos] - have : T / (2 * π) * l T = 2 * (T * l T / (4 * π)) := by ring - linarith - -/-- H-RvM ⇒ `N(T,2T) ≤ T l` eventually. -/ -lemma eventually_N_le (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) : - ∀ᶠ T in atTop, (Z.N T (2 * T) : ℝ) ≤ T * l T := by - obtain ⟨C, T₀, h⟩ := hR.main - filter_upwards [eventually_ge_atTop T₀, eventually_log_le_two_l, eventually_log_nonneg, - eventually_one_le_l, eventually_ge_atTop (16 * |C| + 4), eventually_ge_atTop 0] - with T hT hlog hlog0 hl hTC hT0 - have h1 := (abs_le.mp (h T hT)).2 - have hc := c₀_lt_one - have hℓ : ell1 T ≤ 2 * l T := by rw [ell1_eq]; linarith - have h2 : C * Real.log T ≤ |C| * (2 * l T) := - (mul_le_mul_of_nonneg_right (le_abs_self C) hlog0).trans - (mul_le_mul_of_nonneg_left hlog (abs_nonneg C)) - have h3 : T / (2 * π) * ell1 T ≤ T / (2 * π) * (2 * l T) := - mul_le_mul_of_nonneg_left hℓ (by positivity) - have hπ : T / (2 * π) * (2 * l T) = T * l T / π := by field_simp - have h4 : T * l T / π ≤ T * l T / 2 := by - apply div_le_div_of_nonneg_left (by positivity) (by norm_num) - linarith [Real.pi_gt_three] - nlinarith [abs_nonneg C] - -/-- H-RvM ⇒ `N(T,2T) → ∞`. -/ -lemma tendsto_N_atTop (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) : - Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop := - tendsto_atTop_mono' _ (eventually_N_ge Z hR) (tendsto_Tl_atTop.atTop_div_const (by positivity)) - -/-- `T l = O(N)` under H-RvM, so `o(T l) ⊆ o(N)`. -/ -lemma isLittleO_N_of_isLittleO_Tl (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) {f : ℝ → ℝ} - (hf : f =o[atTop] fun T => T * l T) : f =o[atTop] fun T => (Z.N T (2 * T) : ℝ) := by - refine hf.trans_isBigO (IsBigO.of_bound (4 * π) ?_) - filter_upwards [eventually_N_ge Z hR, eventually_ge_atTop 0, eventually_l_pos] with T h hT hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (by positivity), - abs_of_nonneg (by positivity)] - have := mul_le_mul_of_nonneg_left h (by positivity : (0:ℝ) ≤ 4 * π) - calc T * l T = 4 * π * (T * l T / (4 * π)) := by field_simp - _ ≤ 4 * π * (Z.N T (2 * T) : ℝ) := this - -/-- `l = o(T l)`. -/ -lemma isLittleO_l_Tl : l =o[atTop] fun T => T * l T := by - refine (isLittleO_iff).2 fun c hc => ?_ - filter_upwards [eventually_ge_atTop c⁻¹, eventually_l_pos, eventually_gt_atTop 0] with T hT hl hT0 - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_pos hl, abs_of_pos (by positivity)] - have : 1 ≤ c * T := by - have := mul_le_mul_of_nonneg_left hT hc.le; rwa [mul_inv_cancel₀ hc.ne'] at this - nlinarith - -/-- `log T = o(T l)`. -/ -lemma isLittleO_log_Tl : Real.log =o[atTop] fun T => T * l T := by - refine IsBigO.trans_isLittleO (IsBigO.of_bound 2 ?_) isLittleO_l_Tl - filter_upwards [eventually_log_le_two_l, eventually_log_nonneg, eventually_l_pos] with T h h0 hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg h0, abs_of_pos hl]; exact h - -/-- `√T · l = o(T l)`. -/ -lemma isLittleO_sqrt_mul_l_Tl : (fun T => Real.sqrt T * l T) =o[atTop] fun T => T * l T := by - refine (isLittleO_iff).2 fun c hc => ?_ - filter_upwards [eventually_ge_atTop ((c⁻¹) ^ 2), eventually_l_pos, eventually_gt_atTop 0] - with T hT hl hT0 - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (by positivity), abs_of_pos (by positivity)] - have hs : c⁻¹ ≤ Real.sqrt T := by - rw [show c⁻¹ = Real.sqrt ((c⁻¹) ^ 2) by rw [Real.sqrt_sq (by positivity)]] - exact Real.sqrt_le_sqrt hT - have h1 : 1 ≤ c * Real.sqrt T := by - have := mul_le_mul_of_nonneg_left hs hc.le; rwa [mul_inv_cancel₀ hc.ne'] at this - have h2 : Real.sqrt T * Real.sqrt T = T := Real.mul_self_sqrt hT0.le - have h3 : Real.sqrt T ≤ c * T := by - nlinarith [mul_nonneg (sub_nonneg.2 h1) (Real.sqrt_nonneg T)] - calc Real.sqrt T * l T ≤ c * T * l T := mul_le_mul_of_nonneg_right h3 hl.le - _ = c * (T * l T) := by ring - -/-- `√X = (T/2π)^{λ/2}` ("`X = e^L = (T/2π)^λ`", §1 Notation). -/ -lemma sqrtX_eq (P : Params) {T : ℝ} (hT : 0 < T) : - Real.sqrt (P.X T) = (T / (2 * π)) ^ (P.lam / 2) := by - rw [Params.X, ← Real.exp_half, Params.L, l, Real.rpow_def_of_pos (by positivity)] - congr 1; ring - -lemma tendsto_rpow_halflam_sub_one (P : Params) (hlam1 : P.lam ≤ 1) : - Tendsto (fun T : ℝ => T ^ (P.lam / 2 - 1)) atTop (𝓝 0) := by - have : Tendsto (fun T : ℝ => T ^ (-(1 - P.lam / 2))) atTop (𝓝 0) := - tendsto_rpow_neg_atTop (by linarith) - simpa [neg_sub] using this - -/-- `√X = (T/2π)^{λ/2} = o(T l)` for `λ ≤ 1` (indeed for `λ < 2`). -/ -lemma isLittleO_sqrtX_Tl (P : Params) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) : - (fun T => Real.sqrt (P.X T)) =o[atTop] fun T => T * l T := by - refine (isLittleO_iff).2 fun c hc => ?_ - filter_upwards [(tendsto_rpow_halflam_sub_one P hlam1).eventually (eventually_le_nhds hc), - eventually_gt_atTop 0, eventually_one_le_l] with T hTc hT hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _), - abs_of_nonneg (by positivity), sqrtX_eq P hT] - have h2π : T / (2 * π) ≤ T := div_le_self hT.le (by linarith [Real.pi_gt_three]) - calc (T / (2 * π)) ^ (P.lam / 2) ≤ T ^ (P.lam / 2) := - Real.rpow_le_rpow (by positivity) h2π (by linarith) - _ = T * T ^ (P.lam / 2 - 1) := by - conv_lhs => rw [show P.lam / 2 = 1 + (P.lam / 2 - 1) by ring] - rw [Real.rpow_add hT, Real.rpow_one] - _ ≤ T * c := mul_le_mul_of_nonneg_left hTc hT.le - _ = c * T * 1 := by ring - _ ≤ c * T * l T := mul_le_mul_of_nonneg_left hl (by positivity) - _ = c * (T * l T) := by ring - -/-- `l · T^{λ/2−1} / L = T^{λ/2−1}/λ → 0` (the size of `θ₀/L`, prop:tail). -/ -lemma tendsto_theta_over_L (P : Params) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) : - Tendsto (fun T => l T * T ^ (P.lam / 2 - 1) / P.L T) atTop (𝓝 0) := by - have h1 := tendsto_rpow_halflam_sub_one P hlam1 - have h2 : (fun T => l T * T ^ (P.lam / 2 - 1) / P.L T) =ᶠ[atTop] - fun T => P.lam⁻¹ * T ^ (P.lam / 2 - 1) := by - filter_upwards [eventually_l_pos] with T hl - simp only [Params.L]; field_simp - rw [tendsto_congr' h2] - simpa using h1.const_mul P.lam⁻¹ - -/-- `cλ = 1/λ₁ + λ₁/3` is eventually in `[0, 2/λ + 1/3]` (since `λ/2 ≤ λ₁ ≤ λ ≤ 1` once `l ≥ c₀`). -/ -lemma eventually_clam_bounds (P : Params) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) : - ∀ᶠ T in atTop, 0 ≤ 1 / P.lam1 T + P.lam1 T / 3 ∧ 1 / P.lam1 T + P.lam1 T / 3 ≤ 2 / P.lam + 1 / 3 := by - filter_upwards [tendsto_l_atTop.eventually_ge_atTop 1] with T hl - have hlpos : 0 < l T := by linarith - have hc := c₀_pos; have hc1 := c₀_lt_one - have hl1pos := lam1_pos P T hlam hlpos - have hl1le := lam1_le P T hlam.le hlpos - have hhalf : P.lam / 2 ≤ P.lam1 T := by - rw [lam1_eq, le_div_iff₀ (by linarith)]; nlinarith - refine ⟨by positivity, ?_⟩ - have : 1 / P.lam1 T ≤ 2 / P.lam := by - rw [div_le_div_iff₀ hl1pos hlam]; linarith - linarith - -/-- `a → 1` from [eq:abdef] `1 − 2w/L ≤ a ≤ 1` and `L → ∞`. -/ -lemma tendsto_a_one (P : Params) (hlam : 0 < P.lam) - (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) : - Tendsto P.a atTop (𝓝 1) := by - have hlow : Tendsto (fun T => 1 - 2 * P.w / P.L T) atTop (𝓝 1) := by - have : Tendsto (fun T => 2 * P.w / P.L T) atTop (𝓝 0) := - tendsto_const_nhds.div_atTop (tendsto_L_atTop P hlam) - simpa using (tendsto_const_nhds (x := (1:ℝ))).sub this - exact tendsto_of_tendsto_of_tendsto_of_le_of_le' hlow tendsto_const_nhds - (ha.mono fun T h => h.1) (ha.mono fun T h => h.2) - -end Growth - -/-! ### F0. Window bookkeeping for an abstract `ZeroConfig` (interval additivity; the four -"set-level" facts of prop:zeroside-rank / prop:zeroside: -`s₁+s₂ ≤ N₀*(T,2T) + N(I′∖I)`, `s₁ ≤ N₀ˢ(T,2T) + N(I′∖I)`, `#𝒵(I′) ≤ N_d(T,2T) + N(I′∖I)`, -`N(I′) = N(T,2T) + N(I′∖I)`, where `N(I′∖I) := N(T−D₀,T) + N(2T,2T+D₀)`). -/ - -section Windows -open Set - -variable (Z : ZeroConfig) - -lemma window_union {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : - Z.window a c = Z.window a b ∪ Z.window b c := by - ext ρ - simp only [ZeroConfig.window, mem_inter_iff, mem_setOf_eq, mem_union] - constructor - · rintro ⟨h, h1, h2⟩ - by_cases hb : ρ.im ≤ b - · exact Or.inl ⟨h, h1, hb⟩ - · exact Or.inr ⟨h, lt_of_not_ge hb, h2⟩ - · rintro (⟨h, h1, h2⟩ | ⟨h, h1, h2⟩) - · exact ⟨h, h1, h2.trans hbc⟩ - · exact ⟨h, lt_of_le_of_lt hab h1, h2⟩ - -lemma window_disjoint (a b c : ℝ) : Disjoint (Z.window a b) (Z.window b c) := by - rw [Set.disjoint_left] - rintro ρ ⟨_, _, h2⟩ ⟨_, h1, _⟩ - exact absurd h1 (not_lt.2 h2) - -/-- Interval additivity of `N` (with multiplicity). -/ -theorem N_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : Z.N a c = Z.N a b + Z.N b c := by - unfold ZeroConfig.N - rw [window_union Z hab hbc, finsum_mem_union (window_disjoint Z a b c) - (Z.window_finite a b) (Z.window_finite b c)] - -/-- Interval additivity of `N_d`. -/ -theorem Nd_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : Z.Nd a c = Z.Nd a b + Z.Nd b c := by - unfold ZeroConfig.Nd - rw [window_union Z hab hbc, Set.ncard_union_eq (window_disjoint Z a b c) - (Z.window_finite a b) (Z.window_finite b c)] - -/-- Interval additivity of `N₀*`. -/ -theorem N0star_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : - Z.N0star a c = Z.N0star a b + Z.N0star b c := by - unfold ZeroConfig.N0star - rw [window_union Z hab hbc, Set.union_inter_distrib_right, - Set.ncard_union_eq ((window_disjoint Z a b c).mono inter_subset_left inter_subset_left) - ((Z.window_finite a b).subset inter_subset_left) ((Z.window_finite b c).subset inter_subset_left)] - -/-- Interval additivity of `N₀ˢ`. -/ -theorem N0s_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : - Z.N0s a c = Z.N0s a b + Z.N0s b c := by - unfold ZeroConfig.N0s - rw [window_union Z hab hbc, Set.union_inter_distrib_right, Set.union_inter_distrib_right, - Set.ncard_union_eq (((window_disjoint Z a b c).mono inter_subset_left inter_subset_left).mono - inter_subset_left inter_subset_left) - (((Z.window_finite a b).subset inter_subset_left).subset inter_subset_left) - (((Z.window_finite b c).subset inter_subset_left).subset inter_subset_left)] - -lemma N_self (a : ℝ) : Z.N a a = 0 := by - have := N_add Z (le_refl a) (le_refl a); omega - -lemma N0star_self (a : ℝ) : Z.N0star a a = 0 := by - have := N0star_add Z (le_refl a) (le_refl a); omega - -variable (T : ℝ) - -lemma D0_nonneg : 0 ≤ D0 T := Real.sqrt_nonneg _ - -variable {T} - -/-- "`N(I′) = N(T,2T) + N(I′∖I)`" (proof of prop:zeroside-rank). -/ -theorem NIprime_eq (hT : 0 ≤ T) : Z.NIprime T = Z.N T (2 * T) + NII Z T := by - unfold ZeroConfig.NIprime NII - have h0 := D0_nonneg T - rw [N_add Z (b := T) (by linarith) (by linarith), N_add Z (a := T) (b := 2 * T) (by linarith) (by linarith)] - ring - -/-- `𝒮₁ ∪ 𝒮₂ = 𝒵(I′) ∩ {β = 1/2}` (every zero has `m_ρ ≥ 1`), hence -"`s₁ + s₂` = number of distinct on-line zeros with ordinate in `I′`" `= N₀*(T−D₀, 2T+D₀)`. -/ -theorem s1_add_s2_eq : Z.s1 T + Z.s2 T = Z.N0star (T - D0 T) (2 * T + D0 T) := by - unfold ZeroConfig.s1 ZeroConfig.s2 ZeroConfig.N0star - have hfin : (Z.ZIprime T ∩ ZeroConfig.onLine).Finite := - (Z.window_finite _ _).subset inter_subset_left - have hdisj : Disjoint (Z.S1 T) (Z.S2 T) := by - rw [Set.disjoint_left] - rintro ρ ⟨_, h1⟩ ⟨_, h2⟩ - simp only [ZeroConfig.simple, mem_setOf_eq] at h1 h2 - omega - have hunion : Z.S1 T ∪ Z.S2 T = Z.ZIprime T ∩ ZeroConfig.onLine := by - ext ρ - simp only [ZeroConfig.S1, ZeroConfig.S2, ZeroConfig.simple, mem_union, mem_inter_iff, mem_setOf_eq] - constructor - · rintro (⟨h, _⟩ | ⟨h, _⟩) <;> exact h - · rintro ⟨h1, h2⟩ - have : 1 ≤ Z.mult ρ := Z.one_le_mult ρ (Z.window_subset_carrier _ _ h1) - rcases this.eq_or_lt with h | h - · exact Or.inl ⟨⟨h1, h2⟩, h.symm⟩ - · exact Or.inr ⟨⟨h1, h2⟩, h⟩ - rw [← Set.ncard_union_eq hdisj (hfin.subset (hunion ▸ subset_union_left)) - (hfin.subset (hunion ▸ subset_union_right)), hunion] - rfl - -/-- "`s₁ + s₂ ≤ N₀*(T,2T) + N(I′∖I)`" (proof of prop:zeroside-rank). -/ -theorem s1_add_s2_le (hT : 0 ≤ T) : Z.s1 T + Z.s2 T ≤ Z.N0star T (2 * T) + NII Z T := by - rw [s1_add_s2_eq] - have h0 := D0_nonneg T - rw [N0star_add Z (b := T) (by linarith) (by linarith), - N0star_add Z (a := T) (b := 2 * T) (by linarith) (by linarith)] - unfold NII - have h1 := (Z.N0star_le_Nd (T - D0 T) T).trans (Z.Nd_le_N _ _) - have h2 := (Z.N0star_le_Nd (2 * T) (2 * T + D0 T)).trans (Z.Nd_le_N _ _) - omega - -/-- "`s₁ ≤ N₀ˢ(T,2T) + N(I′∖I)`" (proof of prop:zeroside); `s₁ = N₀ˢ` over `I′` by definition. -/ -theorem s1_le (hT : 0 ≤ T) : Z.s1 T ≤ Z.N0s T (2 * T) + NII Z T := by - have hs1 : Z.s1 T = Z.N0s (T - D0 T) (2 * T + D0 T) := rfl - have h0 := D0_nonneg T - rw [hs1, N0s_add Z (b := T) (by linarith) (by linarith), - N0s_add Z (a := T) (b := 2 * T) (by linarith) (by linarith)] - unfold NII - have c1 := Z.trivial_chain (T - D0 T) T - have c2 := Z.trivial_chain (2 * T) (2 * T + D0 T) - have h1 : Z.N0s (T - D0 T) T ≤ Z.N (T - D0 T) T := c1.1.trans (c1.2.1.trans c1.2.2.1) - have h2 : Z.N0s (2 * T) (2 * T + D0 T) ≤ Z.N (2 * T) (2 * T + D0 T) := - c2.1.trans (c2.2.1.trans c2.2.2.1) - omega - -/-- "`#𝒵(I′) ≤ N_d(T,2T) + N(I′∖I)`" (proof of prop:zeroside). -/ -theorem card_ZIprime_le (hT : 0 ≤ T) : (Z.ZIprime T).ncard ≤ Z.Nd T (2 * T) + NII Z T := by - have h : (Z.ZIprime T).ncard = Z.Nd (T - D0 T) (2 * T + D0 T) := rfl - have h0 := D0_nonneg T - rw [h, Nd_add Z (b := T) (by linarith) (by linarith), - Nd_add Z (a := T) (b := 2 * T) (by linarith) (by linarith)] - unfold NII - have h1 := Z.Nd_le_N (T - D0 T) T - have h2 := Z.Nd_le_N (2 * T) (2 * T + D0 T) - omega - -end Windows - -/-! ### F1. Fixed-`T` assembly with the concrete matrices `Ĝ = P.hat T (Z.Gz P T)` etc. - -The inputs from prop:block (ZeroSide.lean) and prop:tail (Tail.lean) are packaged as the two -Prop-structures below, whose fields are exactly the statements those files announce; they are -discharged in those files' instantiation sections. -/ - -section FixedTConcrete - -variable (Z : ZeroConfig) (P : Params) (T : ℝ) - --- `BlockInputs`, `TailInputs`, `NII` live in `Zeta23/Assembly/Inputs.lean` (shared with ZeroSide/Tail). - -variable {Z P T} - -lemma hat_add {m : Type*} (M N : Matrix m m ℂ) : P.hat T (M + N) = P.hat T M + P.hat T N := by - simp [Params.hat, smul_add] - -/-- **Seam A — [eq:zeroside-rank], explicit, for the concrete matrices.** For `T ≥ 0`, with -`Ĝ := P.hat T (Z.Gz P T)`, `B₀ := θ₀/(aL)`, `N(I′∖I) = NII Z T`: -`4 tr Ĝ − ‖Ĝ‖_F² − 2N(T,2T) − 3N(I′∖I) − B₀(4 + 2‖Ĝ‖_F + B₀) ≤ N₀*(T,2T)`. -/ -theorem seamA (hT : 0 ≤ T) (hB : BlockInputs Z P T) {θ₀ : ℝ} (hTl : TailInputs Z P T θ₀) - (ha : 0 < P.a T) (hL : 0 < P.L T) : - 4 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - 2 * (Z.N T (2 * T) : ℝ) - - 3 * (NII Z T : ℝ) - - θ₀ / (P.a T * P.L T) * (4 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ / (P.a T * P.L T)) - ≤ Z.N0star T (2 * T) := by - obtain ⟨Pm, Qm, p, hPm, hQm, hdec, hrank, htrP, hpos, hcount⟩ := hB.hat - obtain ⟨B, hB0, htrE, hfrE, hBle⟩ := hTl.hat - -- Ĝ =  + Ê - have hGAE : P.hat T (Z.Gz P T) = P.hat T (Z.Az P T) + P.hat T (Z.Ez P T) := by - rw [← hat_add]; congr 1; simp [ZeroConfig.Ez] - have hB₀ : 0 ≤ θ₀ / (P.a T * P.L T) := div_nonneg hTl.theta_nonneg (mul_pos ha hL).le - have hcore := zeroside_rank_core hdec hPm hQm hrank hpos htrP hcount - have hpert := four_tr_sub_frobSq_perturb hGAE hB₀ (htrE.trans hBle) - (hfrE.trans (pow_le_pow_left₀ hB0 hBle 2)) - have hcount' : ((Z.s1 T + Z.s2 T : ℕ) : ℝ) ≤ (Z.N0star T (2 * T) : ℝ) + (NII Z T : ℝ) := by - exact_mod_cast s1_add_s2_le Z hT - have hNI : (Z.NIprime T : ℝ) = (Z.N T (2 * T) : ℝ) + (NII Z T : ℝ) := by - exact_mod_cast NIprime_eq Z hT - rw [hNI] at hcore - exact N0star_lower_explicit hcount' hcore hpert - -/-- **Seam A for Theorems B, C — [eq:zeroside2], for the concrete matrices.** For `T ≥ 0` and -`θ ≥ θ₀`: `2 n₊^θ(G̃) − N(T,2T) − 2N(I′∖I) ≤ N₀ˢ(T,2T)` and `n₊^θ(G̃) − N(I′∖I) ≤ N_d(T,2T)`. -/ -theorem seamA_BC (hT : 0 ≤ T) (hB : BlockInputs Z P T) {θ₀ θ : ℝ} (hTl : TailInputs Z P T θ₀) - (hθ : θ₀ ≤ θ) (hGt : (P.tilde T (Z.Gz P T)).IsHermitian) : - 2 * (posIndexAbove hGt θ : ℝ) - (Z.N T (2 * T) : ℝ) - 2 * (NII Z T : ℝ) ≤ Z.N0s T (2 * T) ∧ - (posIndexAbove hGt θ : ℝ) - (NII Z T : ℝ) ≤ Z.Nd T (2 * T) := by - obtain ⟨p, hAt, hpos, hrank, hcount⟩ := hB.tilde - obtain ⟨hEt, heig⟩ := hTl.tilde - have hGAE : P.tilde T (Z.Gz P T) = P.tilde T (Z.Az P T) + P.tilde T (Z.Ez P T) := by - simp [Params.tilde, ← smul_add, ZeroConfig.Ez] - have heig' : ∀ i, |hEt.eigenvalues i| ≤ θ := fun i => (heig i).trans hθ - have h := zeroside_core hAt hEt heig' hpos hrank hcount - rw [← posIndexAbove_congr hGt (hAt.add hEt) hGAE θ] at h - have hNI : (Z.NIprime T : ℝ) = (Z.N T (2 * T) : ℝ) + (NII Z T : ℝ) := by - exact_mod_cast NIprime_eq Z hT - have hs1 : (Z.s1 T : ℝ) ≤ (Z.N0s T (2 * T) : ℝ) + (NII Z T : ℝ) := by exact_mod_cast s1_le Z hT - have hcard : ((Z.ZIprime T).ncard : ℝ) ≤ (Z.Nd T (2 * T) : ℝ) + (NII Z T : ℝ) := by - exact_mod_cast card_ZIprime_le Z hT - have h2 : (posIndexAbove hGt θ : ℝ) ≤ ((Z.ZIprime T).ncard : ℝ) := by exact_mod_cast h.2 - constructor <;> linarith [h.1] - -/-- **Seam B — the trace inputs in hat units, for the concrete matrices**, given the H-EF bridge -`Z.Gz P T = P.Gp T` (zero side = prime side, [eq:Gdef] "the two expressions agreeing by -Proposition prop:EF"), [eq:tr1]/[eq:tr2] at height `T` with constants `C₁, C₂`, and [eq:RvM] at `T` -in the form `Tℓ₁/2π ≤ N + R_N`: -`|tr Ĝ − N| ≤ C₁√X/a` (the taper constant cancels in the main term) and -`‖Ĝ‖_F² ≤ cλ N + cλ((K−1)N + K R_N)`, `K = (1 + C₂𝓔_T)/a²`, `cλ = 1/λ₁ + λ₁/3`. -/ -theorem seamB (hGzGp : Z.Gz P T = P.Gp T) (ha : 0 < P.a T) (hL : 0 < P.L T) (hℓ₁ : 0 < ell1 T) - {C₁ C₂ ET RN : ℝ} - (htr1 : |P.trGtilde T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| ≤ C₁ * (P.L T * Real.sqrt (P.X T))) - (hK : 0 ≤ 1 + C₂ * ET) - (htr2 : P.trGtildeSq T - P.mainTr2 T ≤ C₂ * ET * P.mainTr2 T) - (hRvM : T * ell1 T / (2 * Real.pi) ≤ (Z.N T (2 * T) : ℝ) + RN) : - |rtrace (P.hat T (Z.Gz P T)) - (Z.N T (2 * T) : ℝ)| ≤ C₁ * Real.sqrt (P.X T) / P.a T ∧ - frobSq (P.hat T (Z.Gz P T)) ≤ (1 / P.lam1 T + P.lam1 T / 3) * (Z.N T (2 * T) : ℝ) - + (1 / P.lam1 T + P.lam1 T / 3) * (((1 + C₂ * ET) / P.a T ^ 2 - 1) * (Z.N T (2 * T) : ℝ) - + (1 + C₂ * ET) / P.a T ^ 2 * RN) := by - rw [hGzGp, rtrace_hat, frobSq_hat, rtrace_tilde_Gp, frobSq_tilde_Gp] - refine ⟨trGhat_sub_N_le ha hL htr1, ?_⟩ - have := frobGhat_le (T := T) (trG2 := P.trGtildeSq T) (N := (Z.N T (2 * T) : ℝ)) ha hL hℓ₁ hK - (by simpa [Params.mainTr2] using htr2) hRvM - simpa [Params.lam1] using this - -end FixedTConcrete - -/-! ### F3. Theorem A at fixed `λ < 1` for an abstract zero configuration - -The theorems are proved over an abstract error function `Err` (only: eventually nonnegative and -`→ 0`) in place of the concrete `Params.calE` — the `_err` versions below — so that alternative -prime-side chains (e.g. an MV-free one with an enlarged error) plug in directly; the -`calE` statements are kept as specializations. -/ - -section Main -open Filter Asymptotics Topology - --- `TracesBoundsE` (abstract error rate) and `TracesBounds.toE` live in Zeta23/TracesBoundsE.lean - - -/-- little-o from a factor tending to zero. -/ -lemma isLittleO_of_tendsto_zero_mul {f g : ℝ → ℝ} (hf : Tendsto f atTop (𝓝 0)) : - (fun T => f T * g T) =o[atTop] g := by - simpa using ((isLittleO_one_iff ℝ).2 hf).mul_isBigO (isBigO_refl g atTop) - -/-- `O(1)` from an eventual absolute bound. -/ -lemma isBigO_one_of_abs_le {f : ℝ → ℝ} {C : ℝ} (h : ∀ᶠ T in atTop, |f T| ≤ C) : - f =O[atTop] (fun _ => (1:ℝ)) := - IsBigO.of_bound C (by simpa using h) - -/-- `O(1) · o(N) = o(N)`. -/ -lemma isLittleO_of_bdd_mul {f g N : ℝ → ℝ} (hf : f =O[atTop] (fun _ => (1:ℝ))) - (hg : g =o[atTop] N) : (fun T => f T * g T) =o[atTop] N := by - simpa using hf.mul_isLittleO hg - -/-- **Theorem A at fixed `λ ∈ (0,1)`, for an abstract zero configuration** ([thm:A] with -§6's proof, in `ε`-form): -for every `ε > 0`, `N₀*(T,2T) ≥ (H(λ) − ε) N(T,2T)` for all `T ≥ T₀`. - -Genuine hypotheses: the published inputs `H : PaperInputs Z` (only H-RvM is used directly here; -the others enter through the inputs below) and the thm:traces package -`hTr : ThmTracesHyp P Z`. -Named inputs: -`hBlock` (prop:block, ZeroSide), `hTail`/`hθ₀` (prop:tail, Tail), `hNII` (boundary count -`N(I′∖I) ≪ D₀ l`, Tail), `hGzGp` (the H-EF bridge `G^{zero} = G^{prime}`, [eq:Gdef]), `ha` ([eq:abdef], -Taper), `hcalE` (`𝓔_T → 0`, PrimeSideB). -/ -theorem thmA_abstract_err (Z : ZeroConfig) (hRvM : RiemannVonMangoldt Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) (Err : ℝ → ℝ) - (hTr : TracesBoundsE P Err P.a P.trGtilde P.trGtildeSq (fun T => (Z.N T (2 * T) : ℝ))) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) - (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) - (hcalE : Tendsto Err atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Hfun P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0star T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, htr2⟩ := hTr.tr2 - obtain ⟨CN, T₃, hRvMmain⟩ := hRvM.main - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - -- the functions of T (abbreviations) - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cl : ℝ → ℝ := fun T => 1 / P.lam1 T + P.lam1 T / 3 with hcl - set K : ℝ → ℝ := fun T => (1 + C₂ * Err T) / P.a T ^ 2 with hK - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / P.a T with hR₁ - set R₂ : ℝ → ℝ := fun T => cl T * ((K T - 1) * N T + K T * (|CN| * Real.log T)) with hR₂ - set B : ℝ → ℝ := fun T => θ₀ T / (P.a T * P.L T) with hBdef - set err : ℝ → ℝ := fun T => (4 * R₁ T + R₂ T + 3 * (NII Z T : ℝ) - + B T * (4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T)) + 1 / (P.lam * l T) * N T with herr - -- basic limits - have hLtop := tendsto_L_atTop P hlam0 - have ha1 := tendsto_a_one P hlam0 ha - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hcE0 : Tendsto (fun T => C₂ * Err T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have hKto : Tendsto K atTop (𝓝 1) := by - have h1 : Tendsto (fun T => 1 + C₂ * Err T) atTop (𝓝 1) := by - simpa using tendsto_const_nhds.add hcE0 - have h2 : Tendsto (fun T => P.a T ^ 2) atTop (𝓝 1) := by simpa using ha1.pow 2 - simpa [hK, Pi.div_def] using h1.div h2 one_ne_zero - -- (1) the main inequality, eventually in T - have hmain : ∀ᶠ T in atTop, Hfun P.lam * N T - err T ≤ (Z.N0star T (2 * T) : ℝ) := by - filter_upwards [hBlock, hTail, hGzGp, hapos, eventually_ge_atTop T₁, - eventually_ge_atTop T₂, eventually_ge_atTop T₃, eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_log_nonneg, hcE0.eventually (eventually_gt_nhds (show (-1:ℝ) < 0 by norm_num))] - with T hB hTl hGG ha2 hT₁ hT₂ hT₃ hT0 hl hlog hcE - have hapos' : 0 < P.a T := by linarith - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hℓ₁ := ell1_pos hl - have hKnn : 0 ≤ 1 + C₂ * Err T := by linarith - have hA := seamA hT0 hB hTl hapos' hLpos - have htr2' : P.trGtildeSq T - P.mainTr2 T ≤ C₂ * Err T * P.mainTr2 T := by - have := htr2 T hT₂ - simp only at this - rw [← mul_assoc] at this - exact (le_abs_self _).trans this - have htr1' : |P.trGtilde T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| - ≤ C₁ * (P.L T * Real.sqrt (P.X T)) := by - have := htr1 T hT₁; simpa only using this - have hRvM' : T * ell1 T / (2 * Real.pi) ≤ N T + |CN| * Real.log T := by - have h1 := (abs_le.mp (hRvMmain T hT₃)).1 - have h2 : CN * Real.log T ≤ |CN| * Real.log T := - mul_le_mul_of_nonneg_right (le_abs_self _) hlog - have h3 : T / (2 * Real.pi) * ell1 T = T * ell1 T / (2 * Real.pi) := by ring - simp only [hNdef]; linarith - have hSB := seamB hGG hapos' hLpos hℓ₁ htr1' hKnn htr2' hRvM' - -- combine with N0star_lower_H and H(λ₁) ≥ H(λ) − 1/(λ l) - have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le - have h := N0star_lower_H hB₀ hA hSB.1 hSB.2 - have hH := Hfun_lam1_ge P T hlam0 hl - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hHN : (Hfun P.lam - 1 / (P.lam * l T)) * N T ≤ Hfun (P.lam1 T) * N T := - mul_le_mul_of_nonneg_right hH hN0 - simp only [herr, hR₁, hR₂, hBdef, hcl, hK, hNdef] at h hHN ⊢ - linarith - -- (2) err = o(N) - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop Z hRvM - -- R₁ = o(N) - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / P.a T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [hapos] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith))] - rw [div_le_iff₀ (by linarith)]; nlinarith - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl Z hRvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - -- R₂ = o(N) - have o2 : R₂ =o[atTop] N := by - have hclO : cl =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 / P.lam + 1 / 3) ?_ - filter_upwards [eventually_clam_bounds P hlam0 hlam1] with T h - rw [abs_of_nonneg h.1]; exact h.2 - have hK1 : Tendsto (fun T => K T - 1) atTop (𝓝 0) := by simpa using hKto.sub_const 1 - have hKO : K =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2) ?_ - filter_upwards [hKto.eventually (eventually_ge_nhds (show (0:ℝ) < 1 by norm_num)), - hKto.eventually (eventually_le_nhds (show (1:ℝ) < 2 by norm_num))] with T h1 h2 - rw [abs_of_nonneg h1]; exact h2 - have i1 : (fun T => (K T - 1) * N T) =o[atTop] N := isLittleO_of_tendsto_zero_mul hK1 - have i2 : (fun T => K T * (|CN| * Real.log T)) =o[atTop] N := - isLittleO_of_bdd_mul hKO ((isLittleO_N_of_isLittleO_Tl Z hRvM isLittleO_log_Tl).const_mul_left _) - exact isLittleO_of_bdd_mul hclO (i1.add i2) - -- N(I′∖I) = o(N) - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z hRvM isLittleO_sqrt_mul_l_Tl) - -- B → 0 - have o4 : Tendsto B atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ - · filter_upwards [hTail, hapos, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by positivity) - · filter_upwards [hTail, hapos, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < P.a T := by linarith - have hq : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - simp only [hBdef] - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (P.a T * P.L T) := by - have : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [this]; gcongr - -- the bracket and the 1/(λ l) term - have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) (cl := cl) - hNtop o1 o2 o3 o4 (eventually_clam_bounds P hlam0 hlam1) - have o6 : (fun T => 1 / (P.lam * l T) * N T) =o[atTop] N := - isLittleO_of_tendsto_zero_mul (tendsto_const_nhds.div_atTop (tendsto_l_atTop.const_mul_atTop hlam0)) - have herr_o : err =o[atTop] N := o5.add o6 - -- (3) conclude - exact eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o - -/-- **Theorem A at fixed `λ ∈ (0,1)`, abstract zero configuration** — the `Err := P.calE` -specialization of `thmA_abstract_err`. -/ -theorem thmA_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) - (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) - (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Hfun P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0star T (2 * T) := - thmA_abstract_err Z H.RvM P hP hlam P.calE hTr.toE hBlock θ₀ hTail hθ₀ hNII hGzGp ha hcalE - -end Main - -/-! ### F4. Theorems B and C at fixed `λ < 1` for an abstract zero configuration -(the paper §6, proofs of thm:B and thm:C: [eq:nplus-lower] + [eq:zeroside2]) -/ - -section MainBC -open Filter Asymptotics Topology - -variable {m : Type*} [Fintype m] - -omit [Fintype m] in -/-- A real-scalar multiple of a Hermitian matrix is Hermitian. -/ -lemma isHermitian_ofReal_smul {M : Matrix m m ℂ} (hM : M.IsHermitian) (c : ℝ) : - ((c : ℂ) • M).IsHermitian := by - unfold Matrix.IsHermitian at * - rw [Matrix.conjTranspose_smul, hM] - simp - -/-- The prime-side matrix `G^{prime}_{kl} = ∫ φ̂(τ−τ_k)φ̂(τ−τ_l)ν_X(τ)dτ` is real symmetric, hence Hermitian -(paper [eq:Gdef]: "The second expression shows that `G` is real symmetric"). -/ -lemma Gp_isHermitian (P : Params) (T : ℝ) : (P.Gp T).IsHermitian := by - apply Matrix.IsHermitian.ext - intro k l - simp only [Params.Gp, Complex.star_def, Complex.conj_ofReal, Complex.ofReal_inj, Params.Gentry] - congr 1; ext τ; ring - -omit [Fintype m] in -lemma isHermitian_tilde (P : Params) (T : ℝ) {M : Matrix m m ℂ} (hM : M.IsHermitian) : - (P.tilde T M).IsHermitian := by - rw [tilde_eq]; exact isHermitian_ofReal_smul hM _ - -lemma card_fin_d (P : Params) (T : ℝ) : (Fintype.card (Fin (P.d T)) : ℝ) = P.d T := by simp - -lemma d_le (P : Params) {T : ℝ} (h : 0 ≤ P.L T * T / (2 * Real.pi)) : - (P.d T : ℝ) ≤ P.L T * T / (2 * Real.pi) := Nat.floor_le h - -/-- `𝓔_T ≥ 0` eventually (all three summands are nonnegative once `L > 0`, `l ≥ 1`, `T > 0`). -/ -lemma eventually_calE_nonneg (P : Params) (hlam : 0 < P.lam) (hw : 0 ≤ P.w) : - ∀ᶠ T in atTop, 0 ≤ P.calE T := by - filter_upwards [eventually_one_le_l, eventually_gt_atTop (0:ℝ)] with T hl hT - have hL : 0 < P.L T := by simp only [Params.L]; nlinarith - have hlog : 0 ≤ Real.log (l T) := Real.log_nonneg hl - have hX : 0 < P.X T := Real.exp_pos _ - simp only [Params.calE] - positivity - -/-- `0 ≤ F(x) ≤ 1` for `0 ≤ x ≤ 1` (indeed `F(x) ≤ x`). -/ -lemma Ffun_bounds {x : ℝ} (h0 : 0 ≤ x) (h1 : x ≤ 1) : 0 ≤ Ffun x ∧ Ffun x ≤ 1 := by - simp only [Ffun] - refine ⟨by positivity, ?_⟩ - rw [div_le_one (by positivity)]; nlinarith - -/-- The algebra of [eq:nplus-lower]: with `Q := (tr G̃)²/tr G̃²` and `x := θ₀ d / tr G̃`, -"`n₊^{θ₀}(G̃) ≥ (tr G̃ − θ₀ d)²/tr G̃² = Q (1 − x)²`" `≥ Q − 2xQ`; combined with [eq:ratio] -`|Q − F(λ₁)N| ≤ C𝓔F(λ₁)N` this gives `n₊^{θ₀}(G̃) ≥ F(λ₁)N − [C𝓔F(λ₁)N + 2x(1+C𝓔)F(λ₁)N]`. -/ -theorem nplus_ge_explicit {nplus trG trG2 θd FN CE : ℝ} - (hCS : (trG - θd) ^ 2 / trG2 ≤ nplus) (htr : 0 < trG) (hθd : 0 ≤ θd) (htrG2 : 0 ≤ trG2) - (hratio : |trG ^ 2 / trG2 - FN| ≤ CE * FN) : - FN - (CE * FN + 2 * (θd / trG) * ((1 + CE) * FN)) ≤ nplus := by - set Q := trG ^ 2 / trG2 with hQ - set x := θd / trG with hx - have hx0 : 0 ≤ x := div_nonneg hθd htr.le - have h1 : Q - 2 * x * Q ≤ (trG - θd) ^ 2 / trG2 := by - have e : Q - 2 * x * Q = (trG ^ 2 - 2 * θd * trG) / trG2 := by - simp only [hQ, hx]; field_simp - rw [e] - apply div_le_div_of_nonneg_right _ htrG2 - nlinarith [sq_nonneg θd] - have hQlo : FN - CE * FN ≤ Q := by have := (abs_le.mp hratio).1; linarith - have hQhi : Q ≤ (1 + CE) * FN := by have := (abs_le.mp hratio).2; linarith - have : 2 * x * Q ≤ 2 * x * ((1 + CE) * FN) := mul_le_mul_of_nonneg_left hQhi (by positivity) - linarith - -/-- **Theorems B and C at fixed `λ ∈ (0,1)`, for an abstract zero configuration — common core.** -There is `R = o(N)` with, eventually in `T`: `(2F(λ) − 1)N − 2R ≤ N₀ˢ(T,2T)` and -`F(λ)N − R ≤ N_d(T,2T)` (paper §6, proofs of thm:B, thm:C: prop:tail `θ₀ ≪ lT^{λ/2−1}`, prop:trace -`tr G̃ ≫ dl` hence `tr G̃ > θ₀d`, lem:CS + [eq:ratio] ⇒ [eq:nplus-lower], then [eq:zeroside2] and -`F(λ₁) ≥ F(λ) − 1/l`). Same displayed inputs as `thmA_abstract` (without `ha`). -/ -theorem thmBC_core_err (Z : ZeroConfig) (hRvM : RiemannVonMangoldt Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) (Err : ℝ → ℝ) - (hTr : TracesBoundsE P Err P.a P.trGtilde P.trGtildeSq (fun T => (Z.N T (2 * T) : ℝ))) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) - (hErr0 : ∀ᶠ T in atTop, 0 ≤ Err T) - (hcalE : Tendsto Err atTop (𝓝 0)) : - ∃ R : ℝ → ℝ, R =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) ∧ - ∀ᶠ T in atTop, - (2 * Ffun P.lam - 1) * (Z.N T (2 * T) : ℝ) - 2 * R T ≤ Z.N0s T (2 * T) ∧ - Ffun P.lam * (Z.N T (2 * T) : ℝ) - R T ≤ Z.Nd T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₃, hC₃, T₃, hratio⟩ := hTr.ratio - obtain ⟨C₄, hC₄, T₄, htr1'⟩ := hTr.tr1' - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set x : ℝ → ℝ := fun T => θ₀ T * (P.d T : ℝ) / P.trGtilde T with hxdef - set R : ℝ → ℝ := fun T => (C₃ * Err T * (Ffun (P.lam1 T) * N T) - + 2 * x T * ((1 + C₃ * Err T) * (Ffun (P.lam1 T) * N T))) - + (NII Z T : ℝ) + 1 / l T * N T with hRdef - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop Z hRvM - have hcE0 : Tendsto (fun T => C₃ * Err T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₃ - have hcE4 : Tendsto (fun T => C₄ * Err T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₄ - -- Step 0: eventually tr G̃ ≥ L N / 2 > 0 and x ≤ 8(|Cθ|+1) T^{λ/2−1} (so θ₀ d < tr G̃ and x → 0). - have hx : ∀ᶠ T in atTop, 0 < P.trGtilde T ∧ 0 ≤ x T ∧ - x T ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) ∧ θ₀ T * (P.d T : ℝ) < P.trGtilde T := by - filter_upwards [hTail, hθ, eventually_ge_atTop T₄, eventually_N_ge Z hRvM, eventually_l_pos, - eventually_gt_atTop (0:ℝ), hcE4.eventually (eventually_lt_nhds (show (0:ℝ) < 1/2 by norm_num)), - (tendsto_rpow_halflam_sub_one P hlam1).eventually - (eventually_lt_nhds (show (0:ℝ) < 1 / (8 * (|Cθ| + 1)) by positivity))] - with T hTl hθT hT₄ hNge hl hT0 hcE hTs - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have h1 := (abs_le.mp (by simpa only using htr1' T hT₄)).1 - have hLN : 0 < P.L T * N T := by - have : 0 < T * l T / (4 * Real.pi) := by positivity - exact mul_pos hLpos (this.trans_le hNge) - have htrG : P.L T * N T / 2 ≤ P.trGtilde T := by - have : C₄ * Err T * (P.L T * N T) ≤ 1 / 2 * (P.L T * N T) := - mul_le_mul_of_nonneg_right hcE.le hLN.le - simp only [hNdef] at this h1 ⊢; linarith - have htrGpos : 0 < P.trGtilde T := lt_of_lt_of_le (by positivity) htrG - have hd : (P.d T : ℝ) ≤ P.L T * T / (2 * Real.pi) := d_le P (by positivity) - have hθ' : θ₀ T ≤ (|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1) := by - refine hθT.trans ?_ - have : Cθ ≤ |Cθ| + 1 := by linarith [le_abs_self Cθ] - gcongr - have hθ0 := hTl.theta_nonneg - -- θ₀ d ≤ (|Cθ|+1) l T^s · L T/(2π) and tr G̃ ≥ L N/2 ≥ L T l/(8π) - have hnum : θ₀ T * (P.d T : ℝ) ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := - mul_le_mul hθ' hd (Nat.cast_nonneg _) (hθ0.trans hθ') - have hden : P.L T * (T * l T / (4 * Real.pi)) / 2 ≤ P.trGtilde T := - le_trans (by gcongr) htrG - have hxle : x T ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) := by - simp only [hxdef] - rw [div_le_iff₀ htrGpos] - calc θ₀ T * (P.d T : ℝ) ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := hnum - _ = 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * (P.L T * (T * l T / (4 * Real.pi)) / 2) := by ring - _ ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * P.trGtilde T := by gcongr - refine ⟨htrGpos, div_nonneg (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrGpos.le, hxle, ?_⟩ - have hx1 : x T < 1 := by - refine hxle.trans_lt ?_ - have := (lt_div_iff₀ (show (0:ℝ) < 8 * (|Cθ| + 1) by positivity)).mp hTs - nlinarith [abs_nonneg Cθ, Real.rpow_nonneg hT0.le (P.lam / 2 - 1)] - simp only [hxdef] at hx1 - rwa [div_lt_one htrGpos] at hx1 - refine ⟨R, ?_, ?_⟩ - -- R = o(N) - · have hFN : (fun T => Ffun (P.lam1 T) * N T) =O[atTop] N := by - refine IsBigO.of_bound 1 ?_ - filter_upwards [eventually_l_pos] with T hl - have hb := Ffun_bounds (lam1_pos P T hlam0 hl).le ((lam1_le P T hlam0.le hl).trans hlam1) - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_mul, abs_of_nonneg hb.1, one_mul] - exact mul_le_of_le_one_left (abs_nonneg _) hb.2 - have o1 : (fun T => C₃ * Err T * (Ffun (P.lam1 T) * N T)) =o[atTop] N := by - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO hFN - simpa using this - have hxto : Tendsto x atTop (𝓝 0) := by - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds - (by simpa using (tendsto_rpow_halflam_sub_one P hlam1).const_mul (4 * (|Cθ| + 1))) - (hx.mono fun T h => h.2.1) (hx.mono fun T h => h.2.2.1) - have o2 : (fun T => 2 * x T * ((1 + C₃ * Err T) * (Ffun (P.lam1 T) * N T))) =o[atTop] N := by - have h2x : Tendsto (fun T => 2 * x T) atTop (𝓝 0) := by simpa using hxto.const_mul 2 - have hK : (fun T => 1 + C₃ * Err T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2) ?_ - filter_upwards [hcE0.eventually (eventually_ge_nhds (show (-1:ℝ) < 0 by norm_num)), - hcE0.eventually (eventually_le_nhds (show (0:ℝ) < 1 by norm_num))] with T h1 h2 - rw [abs_of_nonneg (by linarith)]; linarith - have := ((isLittleO_one_iff ℝ).2 h2x).mul_isBigO (hK.mul hFN) - simpa using this - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z hRvM isLittleO_sqrt_mul_l_Tl) - have o4 : (fun T => 1 / l T * N T) =o[atTop] N := - isLittleO_of_tendsto_zero_mul (tendsto_const_nhds.div_atTop tendsto_l_atTop) - exact ((o1.add o2).add o3).add o4 - -- the inequalities, eventually - · filter_upwards [hBlock, hTail, hGzGp, hx, eventually_ge_atTop T₃, eventually_ge_atTop (0:ℝ), - eventually_l_pos, hErr0] - with T hB hTl hGG hxT hT₃ hT0 hl hE0 - have hGt : (P.tilde T (Z.Gz P T)).IsHermitian := by - rw [hGG]; exact isHermitian_tilde P T (Gp_isHermitian P T) - -- [eq:zeroside2] - have hZ := seamA_BC hT0 hB hTl le_rfl hGt - -- lem:CS, [eq:nplus-lower] - have hθ0 := hTl.theta_nonneg - have hrt : rtrace (P.tilde T (Z.Gz P T)) = P.trGtilde T := by rw [hGG, rtrace_tilde_Gp] - have hfr : frobSq (P.tilde T (Z.Gz P T)) = P.trGtildeSq T := by rw [hGG, frobSq_tilde_Gp] - have htr' : θ₀ T * (Fintype.card (Fin (P.d T)) : ℝ) < rtrace (P.tilde T (Z.Gz P T)) := by - rw [card_fin_d, hrt]; exact hxT.2.2.2 - have hCS := nplus_lower hGt hθ0 htr' - rw [card_fin_d, hrt, hfr] at hCS - have hratio' : |P.trGtilde T ^ 2 / P.trGtildeSq T - Ffun (P.lam1 T) * N T| - ≤ C₃ * Err T * (Ffun (P.lam1 T) * N T) := by - have := hratio T hT₃; simp only at this; rw [← mul_assoc] at this; exact this - have htrG2 : 0 ≤ P.trGtildeSq T := by rw [← hfr]; exact frobSq_nonneg _ - have hnp := nplus_ge_explicit hCS hxT.1 (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrG2 hratio' - -- F(λ₁) ≥ F(λ) − 1/l - have hF := Ffun_lam1_ge P T hlam0 hlam1 hl - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hFN : (Ffun P.lam - 1 / l T) * N T ≤ Ffun (P.lam1 T) * N T := - mul_le_mul_of_nonneg_right hF hN0 - simp only [hRdef, hxdef, hNdef] at hnp hFN hZ ⊢ - constructor <;> nlinarith [hZ.1, hZ.2, hnp, hFN] - -/-- `thmBC_core`, the concrete-rate wrapper: `Err := P.calE` -(the `Err`-parametric generalization is `thmBC_core_err` above). -/ -theorem thmBC_core (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) - (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∃ R : ℝ → ℝ, R =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) ∧ - ∀ᶠ T in atTop, - (2 * Ffun P.lam - 1) * (Z.N T (2 * T) : ℝ) - 2 * R T ≤ Z.N0s T (2 * T) ∧ - Ffun P.lam * (Z.N T (2 * T) : ℝ) - R T ≤ Z.Nd T (2 * T) := - thmBC_core_err Z H.RvM P hP hlam P.calE hTr.toE hBlock θ₀ hTail hθ₀ hNII hGzGp - (eventually_calE_nonneg P hP.lam_pos (zero_le_one.trans hP.one_le_w)) hcalE - -/-- **Theorem B at fixed `λ ∈ (0,1)`, abstract zero configuration** (the paper [thm:B], `ε`-form): -`N₀ˢ(T,2T) ≥ (2F(λ) − 1 − ε) N(T,2T)` for `T ≥ T₀`. -/ -theorem thmB_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) - (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun P.lam - 1 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by - obtain ⟨R, hR, hev⟩ := thmBC_core Z H P hP hlam hTr hBlock θ₀ hTail hθ₀ hNII hGzGp hcalE - refine eps_form_of_isLittleO (err := fun T => 2 * R T) (hev.mono fun T h => ?_) - (Eventually.of_forall fun T => Nat.cast_nonneg _) (hR.const_mul_left 2) - linarith [h.1] - -/-- **Theorem C at fixed `λ ∈ (0,1)`, abstract zero configuration** (the paper [thm:C], `ε`-form): -`N_d(T,2T) ≥ (F(λ) − ε) N(T,2T)` for `T ≥ T₀`. -/ -theorem thmC_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) - (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Ffun P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by - obtain ⟨R, hR, hev⟩ := thmBC_core Z H P hP hlam hTr hBlock θ₀ hTail hθ₀ hNII hGzGp hcalE - exact eps_form_of_isLittleO (err := R) (hev.mono fun T h => h.2) - (Eventually.of_forall fun T => Nat.cast_nonneg _) hR - -end MainBC - -/-! ### F5. `𝓔_T → 0` (paper [thm:traces]: "`𝓔_T ≪_λ w/L + T^{λ−1} log l` (λ<1), `≪ w/L + log l/l` (λ=1)") -/ - -section CalE -open Filter Topology Real - -/-- `X = (T/2π)^λ ≤ T` once `T ≥ 2π` (for `λ ≤ 1`). -/ -lemma X_le_T (P : Params) (hlam1 : P.lam ≤ 1) {T : ℝ} (hT : 2 * π ≤ T) : P.X T ≤ T := by - have hπ : 0 < 2 * π := by positivity - have hb : 1 ≤ T / (2 * π) := by rwa [le_div_iff₀ hπ, one_mul] - have hX : P.X T = (T / (2 * π)) ^ P.lam := by - rw [Params.X, Params.L, l, Real.rpow_def_of_pos (by positivity)]; ring_nf - rw [hX] - calc (T / (2 * π)) ^ P.lam ≤ (T / (2 * π)) ^ (1:ℝ) := Real.rpow_le_rpow_of_exponent_le hb hlam1 - _ = T / (2 * π) := Real.rpow_one _ - _ ≤ T := div_le_self (by linarith) (by linarith [Real.pi_gt_three]) - -/-- **`𝓔_T → 0`** as `T → ∞`, for fixed `0 < λ ≤ 1` and fixed `w ≥ 0` -(`𝓔_T := w/L + (l²+X) log l/(Tl) + T^{λ/2−1}`, [thm:traces]). Bound used: -`𝓔_T ≤ w/L + (log T)²/T + log l/l + T^{λ/2−1}` for `T ≥ 2π`, `l ≥ 1`. -/ -theorem calE_tendsto_zero (P : Params) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) (hw : 0 ≤ P.w) : - Tendsto P.calE atTop (𝓝 0) := by - have h1 : Tendsto (fun T => P.w / P.L T) atTop (𝓝 0) := - tendsto_const_nhds.div_atTop (tendsto_L_atTop P hlam) - have h2 : Tendsto (fun T : ℝ => Real.log T ^ 2 / T) atTop (𝓝 0) := by - have := Real.tendsto_pow_log_div_mul_add_atTop 1 0 2 one_ne_zero - simpa using this - have h3 : Tendsto (fun T => Real.log (l T) / l T) atTop (𝓝 0) := by - have : Tendsto (fun x : ℝ => Real.log x / x) atTop (𝓝 0) := by - simpa using Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 one_ne_zero - exact this.comp tendsto_l_atTop - have h4 := tendsto_rpow_halflam_sub_one P hlam1 - have hsum : Tendsto (fun T => P.w / P.L T + (Real.log T ^ 2 / T + Real.log (l T) / l T) - + T ^ (P.lam / 2 - 1)) atTop (𝓝 0) := by - simpa using (h1.add (h2.add h3)).add h4 - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hsum - (eventually_calE_nonneg P hlam hw) ?_ - filter_upwards [eventually_one_le_l, eventually_ge_atTop (2 * π)] with T hl hT2π - have hT : 0 < T := lt_of_lt_of_le (by positivity) hT2π - have hlpos : 0 < l T := by linarith - have hlogl : 0 ≤ Real.log (l T) := Real.log_nonneg hl - have hlogl' : Real.log (l T) ≤ l T := by linarith [Real.log_le_sub_one_of_pos hlpos] - have hllog : l T ≤ Real.log T := by - rw [log_eq_l_add hT] - have : 0 ≤ Real.log (2 * π) := Real.log_nonneg (by linarith [Real.pi_gt_three]) - linarith - have hX := X_le_T P hlam1 hT2π - have hXpos : 0 ≤ P.X T := (Real.exp_pos _).le - -- the middle term - have hmid : (l T ^ 2 + P.X T) * Real.log (l T) / (T * l T) - ≤ Real.log T ^ 2 / T + Real.log (l T) / l T := by - have e : (l T ^ 2 + P.X T) * Real.log (l T) / (T * l T) - = l T * Real.log (l T) / T + P.X T * Real.log (l T) / (T * l T) := by - field_simp - rw [e] - gcongr ?_ + ?_ - · -- l log l / T ≤ (log T)²/T - apply div_le_div_of_nonneg_right _ hT.le - calc l T * Real.log (l T) ≤ l T * l T := mul_le_mul_of_nonneg_left hlogl' hlpos.le - _ ≤ Real.log T * Real.log T := mul_le_mul hllog hllog hlpos.le (hlpos.le.trans hllog) - _ = Real.log T ^ 2 := by ring - · -- X log l /(T l) ≤ log l / l - rw [div_le_div_iff₀ (by positivity) hlpos] - calc P.X T * Real.log (l T) * l T ≤ T * Real.log (l T) * l T := by gcongr - _ = Real.log (l T) * (T * l T) := by ring - simp only [Params.calE] - linarith - -end CalE - -end Assembly -end Zeta23 - -end diff --git a/zeta23/Zeta23/Assembly/Certificate.lean b/zeta23/Zeta23/Assembly/Certificate.lean index 9264619347..22457fae9b 100644 --- a/zeta23/Zeta23/Assembly/Certificate.lean +++ b/zeta23/Zeta23/Assembly/Certificate.lean @@ -20,83 +20,123 @@ noncomputable section namespace Zeta23 namespace Assembly -/-- κ-version of `N0star_lower_H`: moments ⟹ fixed-T lower bound. -/ -theorem N0star_lower_moment - {N0star N NII trGh frGh B κ R₁ R₂ : ℝ} (hB : 0 ≤ B) - (h0 : 4 * trGh - frGh - 2 * N - 3 * NII - B * (4 + 2 * Real.sqrt frGh + B) ≤ N0star) - (htr : N - R₁ ≤ trGh) (hfr : frGh ≤ κ * N + R₂) : - (2 - κ) * N - (4 * R₁ + R₂ + 3 * NII - + B * (4 + 2 * Real.sqrt (κ * N + R₂) + B)) ≤ N0star := by - have h2 : Real.sqrt frGh ≤ Real.sqrt (κ * N + R₂) := Real.sqrt_le_sqrt hfr - nlinarith [h0, htr, h2, hB, mul_le_mul_of_nonneg_left h2 hB] - /-! ## Seam-agnostic count certificates (for the multiplicity-aware rank–trace variants: the zero-side inequality arrives as the hypothesis h0, so the same algebra serves N₀* (seamA), -the c = 2 multiplicity-aware N₀ˢ seam, and — in halved form below — the c = 3 N_d seam). -/ +the c = 2 multiplicity-aware N₀ˢ seam, and the c = 3 N_d seam). -/ -/-- The moment certificate with the fixed-T seam inequality abstracted: any count `lower` -satisfying the seam shape eventually obeys the (2 − κ − ε) certificate. -/ -theorem count_certificate (Z : ZeroConfig) (P : Params) (κ : ℝ) (lower : ℝ → ℝ) - (θ₀ : ℝ → ℝ) - (h0 : ∀ᶠ T in atTop, 4 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - - 2 * (Z.N T (2 * T) : ℝ) - 3 * (NII Z T : ℝ) - - θ₀ T / (P.a T * P.L T) - * (4 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) - ≤ lower T) - (hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T)) - (hBto : Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0)) - (hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) - (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) - (htrace : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, - (1 - δ) * (Z.N T (2 * T) : ℝ) ≤ rtrace (P.hat T (Z.Gz P T))) - (hfrob : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, - frobSq (P.hat T (Z.Gz P T)) ≤ (κ + δ) * (Z.N T (2 * T) : ℝ)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 - κ - ε) * (Z.N T (2 * T) : ℝ) ≤ lower T := by +/-- Generic count certificate, function-abstract form (serves both c = 2 and c = 3). -/ +theorem count_certificate_fn_gen (a_tr a_N a_NII a_B scale κ : ℝ) + (ha_tr : 0 ≤ a_tr) (hscale : 0 < scale) {N NII tr fr B lower : ℝ → ℝ} + (hfr0 : ∀ᶠ T in atTop, 0 ≤ fr T) + (h0 : ∀ᶠ T in atTop, + a_tr * tr T - fr T - a_N * N T - a_NII * NII T + - B T * (a_B + 2 * Real.sqrt (fr T) + B T) ≤ scale * lower T) + (hB0 : ∀ᶠ T in atTop, 0 ≤ B T) + (hBto : Tendsto B atTop (𝓝 0)) + (hNII_o : NII =o[atTop] N) + (hNtop : Tendsto N atTop atTop) + (htrace : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, (1 - δ) * N T ≤ tr T) + (hfrob : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, fr T ≤ (κ + δ) * N T) : + EpsLowerBound ((a_tr - a_N - κ) / scale) lower N := by intro ε hε - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set B : ℝ → ℝ := fun T => θ₀ T / (P.a T * P.L T) with hBdef - set δ : ℝ := ε / 6 with hδdef - have hδ : 0 < δ := by simp only [hδdef]; linarith + set δ : ℝ := ε * scale / (a_tr + 4) with hδdef + have hδ : 0 < δ := div_pos (mul_pos hε hscale) (by linarith) have hκδ0 : 0 ≤ κ + δ := by by_contra h rw [not_le] at h - obtain ⟨T, hT1, hT2⟩ := ((hfrob δ hδ).and (hNtop.eventually_ge_atTop 1)).exists - have : frobSq (P.hat T (Z.Gz P T)) < 0 := - lt_of_le_of_lt hT1 (mul_neg_of_neg_of_pos h (by simp only [hNdef] at hT2 ⊢; linarith)) - exact absurd (frobSq_nonneg _) (not_le.mpr this) + obtain ⟨T, hT1, hT2, hT3⟩ := + ((hfrob δ hδ).and ((hNtop.eventually_ge_atTop 1).and hfr0)).exists + have : fr T < 0 := lt_of_le_of_lt hT1 (mul_neg_of_neg_of_pos h (by linarith)) + linarith have hot := err_isLittleO (N := N) (R₁ := fun _ => 0) (R₂ := fun _ => 0) - (NII := fun T => (NII Z T : ℝ)) (B := B) (cl := fun _ => κ + δ) (K := κ + δ) + (NII := NII) (B := B) (cl := fun _ => κ + δ) (K := κ + δ) hNtop (isLittleO_zero _ _) (isLittleO_zero _ _) hNII_o hBto (Eventually.of_forall fun _ => ⟨hκδ0, le_rfl⟩) - have hsmall : ∀ᶠ T in atTop, - 3 * (NII Z T : ℝ) + B T * (4 + 2 * Real.sqrt ((κ + δ) * N T) + B T) ≤ δ * N T := by - filter_upwards [hot.def hδ, hNtop.eventually_ge_atTop 0] with T h1 hN0 - simp only [Real.norm_eq_abs, mul_zero, zero_add, add_zero, abs_of_nonneg hN0] at h1 - exact (le_abs_self _).trans h1 - have hmain : ∀ᶠ T in atTop, (2 - κ - ε) * N T ≤ lower T := by - filter_upwards [h0, hB0, htrace δ hδ, hfrob δ hδ, hsmall, - hNtop.eventually_ge_atTop 0] with T hA hB₀ htr hfr hsm hN0 - have hlow := N0star_lower_moment (κ := κ) (R₁ := δ * N T) (R₂ := δ * N T) hB₀ hA - (by simp only [hNdef] at htr ⊢; linarith) (by simp only [hNdef] at hfr ⊢; linarith) - rw [show κ * N T + δ * N T = (κ + δ) * N T by ring] at hlow - have hfin : (2 - κ - ε) * N T - = (2 - κ) * N T - (4 * (δ * N T) + δ * N T + δ * N T) := by - simp only [hδdef]; ring - rw [hfin] - linarith [hsm, hlow] + have hNII_ex : ∀ᶠ T in atTop, (a_NII - 3) * NII T ≤ δ * N T := by + have hpos : 0 < |a_NII - 3| + 1 := by positivity + filter_upwards [hNII_o.def (div_pos hδ hpos), hNtop.eventually_ge_atTop 0] with T h hN0 + simp only [Real.norm_eq_abs, abs_of_nonneg hN0] at h + have h1 : (a_NII - 3) * NII T ≤ |a_NII - 3| * |NII T| := by + rw [← abs_mul]; exact le_abs_self _ + have h2 : |a_NII - 3| * |NII T| ≤ (|a_NII - 3| + 1) * |NII T| := + mul_le_mul_of_nonneg_right (by linarith) (abs_nonneg _) + have h3 : (|a_NII - 3| + 1) * |NII T| ≤ δ * N T := by + have := mul_le_mul_of_nonneg_left h hpos.le + rwa [← mul_assoc, mul_div_cancel₀ _ hpos.ne'] at this + linarith + have hB_ex : ∀ᶠ T in atTop, (a_B - 4) * B T ≤ δ * N T := by + have hB1 : ∀ᶠ T in atTop, B T ≤ 1 := + hBto.eventually (eventually_le_nhds (show (0:ℝ) < 1 by norm_num)) + filter_upwards [hB1, hB0, hNtop.eventually_ge_atTop ((|a_B - 4| + 1) / δ)] with T h1 h0 hN + have h2 : |a_B - 4| + 1 ≤ δ * N T := by rwa [div_le_iff₀ hδ, mul_comm] at hN + have h3 : (a_B - 4) * B T ≤ |a_B - 4| * 1 := by + calc (a_B - 4) * B T ≤ |a_B - 4| * B T := mul_le_mul_of_nonneg_right (le_abs_self _) h0 + _ ≤ |a_B - 4| * 1 := mul_le_mul_of_nonneg_left h1 (abs_nonneg _) + linarith + have hmain : ∀ᶠ T in atTop, ((a_tr - a_N - κ) / scale - ε) * N T ≤ lower T := by + filter_upwards [h0, hB0, htrace δ hδ, hfrob δ hδ, hot.def hδ, hNII_ex, hB_ex, + hNtop.eventually_ge_atTop 0] with T hA hB₀ htr hfr hhot hnii hb hN0 + simp only [Real.norm_eq_abs, mul_zero, zero_add, add_zero, abs_of_nonneg hN0] at hhot + have hhot' : 3 * NII T + B T * (4 + 2 * Real.sqrt ((κ + δ) * N T) + B T) ≤ δ * N T := + (le_abs_self _).trans hhot + have hsq : Real.sqrt (fr T) ≤ Real.sqrt ((κ + δ) * N T) := Real.sqrt_le_sqrt hfr + have hBsq : B T * Real.sqrt (fr T) ≤ B T * Real.sqrt ((κ + δ) * N T) := + mul_le_mul_of_nonneg_left hsq hB₀ + have htr' : a_tr * ((1 - δ) * N T) ≤ a_tr * tr T := mul_le_mul_of_nonneg_left htr ha_tr + have hδeq : (a_tr + 4) * δ = ε * scale := by + simp only [hδdef]; exact mul_div_cancel₀ _ (by linarith) + have hscale_le : ((a_tr - a_N - κ) - ε * scale) * N T ≤ scale * lower T := by + nlinarith [hA, htr', hfr, hhot', hnii, hb, hBsq, hδeq] + have hdiv : ((a_tr - a_N - κ) / scale - ε) * scale = (a_tr - a_N - κ) - ε * scale := by + field_simp + nlinarith [hscale_le, hdiv, hscale] obtain ⟨T₀, hT₀⟩ := eventually_atTop.mp hmain exact ⟨T₀, fun T hT => hT₀ T hT⟩ -/-- the c = 3 fixed-T algebra: from `6·tr − frob − 3N − 3NII − B·(…) ≤ 2·lower` and the moment -bounds, `(3/2 − κ/2)·N − errors ≤ lower`. -/ -theorem count_lower_moment_c3 - {lower N NII trGh frGh B κ R₁ R₂ : ℝ} (hB : 0 ≤ B) - (h0 : 6 * trGh - frGh - 3 * N - 5 * NII - B * (6 + 2 * Real.sqrt frGh + B) ≤ 2 * lower) - (htr : N - R₁ ≤ trGh) (hfr : frGh ≤ κ * N + R₂) : - (3/2 - κ/2) * N - (3 * R₁ + R₂ / 2 + (5/2) * NII - + (B/2) * (6 + 2 * Real.sqrt (κ * N + R₂) + B)) ≤ lower := by - have h2 : Real.sqrt frGh ≤ Real.sqrt (κ * N + R₂) := Real.sqrt_le_sqrt hfr - nlinarith [h0, htr, h2, hB, mul_le_mul_of_nonneg_left h2 hB] +/-- Parameterized count certificate for any `ZeroConfig` and `Params` (serves both `c = 2` +with `(4, 2, 3, 4, 1)` and `c = 3` with `(6, 3, 5, 6, 2)`). -/ +theorem count_certificate_gen (a_tr a_N a_NII a_B scale : ℝ) (ha_tr : 0 ≤ a_tr) (hscale : 0 < scale) + (Z : ZeroConfig) (P : Params) (κ : ℝ) (lower : ℝ → ℝ) (θ₀ : ℝ → ℝ) + (h0 : ∀ᶠ T in atTop, a_tr * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) + - a_N * (Z.N T (2 * T) : ℝ) - a_NII * (NII Z T : ℝ) + - θ₀ T / (P.a T * P.L T) + * (a_B + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) + ≤ scale * lower T) + (hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T)) + (hBto : Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0)) + (hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (htrace : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, + (1 - δ) * (Z.N T (2 * T) : ℝ) ≤ rtrace (P.hat T (Z.Gz P T))) + (hfrob : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, + frobSq (P.hat T (Z.Gz P T)) ≤ (κ + δ) * (Z.N T (2 * T) : ℝ)) : + EpsLowerBound ((a_tr - a_N - κ) / scale) lower (fun T => (Z.N T (2 * T) : ℝ)) := + count_certificate_fn_gen a_tr a_N a_NII a_B scale κ ha_tr hscale + (Eventually.of_forall fun _ => frobSq_nonneg _) + h0 hB0 hBto hNII_o hNtop htrace hfrob + +/-- H-RvM for any `ZeroConfig` ⇒ `Z.N 0 T → ∞` (via `N(0,T) ≥ N(T/2,T)`). -/ +lemma tendsto_N_zero_atTop (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) : + Tendsto (fun T => (Z.N 0 T : ℝ)) atTop atTop := by + have h1 : Tendsto (fun T : ℝ => (Z.N (T / 2) (2 * (T / 2)) : ℝ)) atTop atTop := + (tendsto_N_atTop Z hR).comp (tendsto_id.atTop_div_const two_pos) + refine tendsto_atTop_mono' _ ?_ h1 + filter_upwards [eventually_ge_atTop (0:ℝ)] with T hT + have hsplit := N_add Z (a := 0) (b := T / 2) (c := T) (by linarith) (by linarith) + rw [show 2 * (T / 2) = T by ring] + exact_mod_cast hsplit ▸ Nat.le_add_left _ _ + +/-- Generic dyadic-to-cumulative summation for an interval-additive count `f` against `Z.N`. -/ +theorem cumulative_of_dyadic_zeroConfig (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) + {c : ℝ} {f : ℝ → ℝ → ℕ} + (hf_add : ∀ a b d : ℝ, a ≤ b → b ≤ d → f a d = f a b + f b d) + (h : DyadicLowerBound (c) (fun T => f T (2 * T)) (fun T => Z.N T (2 * T))) : + DyadicLowerBound (c) (fun T => f 0 T) (fun T => Z.N 0 T) := + dyadic (f := fun a b => (f a b : ℝ)) (g := fun a b => (Z.N a b : ℝ)) (c := c) + (fun a b d hab hbd => by exact_mod_cast hf_add a b d hab hbd) + (fun a b d hab hbd => by exact_mod_cast N_add Z hab hbd) + (fun _ _ => Nat.cast_nonneg _) (fun _ _ => Nat.cast_nonneg _) + (tendsto_N_zero_atTop Z hR) h end Assembly end Zeta23 diff --git a/zeta23/Zeta23/Assembly/CertificateC3.lean b/zeta23/Zeta23/Assembly/CertificateC3.lean deleted file mode 100644 index ae9d1d3ae4..0000000000 --- a/zeta23/Zeta23/Assembly/CertificateC3.lean +++ /dev/null @@ -1,101 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/Assembly/CertificateC3.lean — the count certificate for the rank–trace inequality with parameter -c = 3 (distinct zeros), following Assembly/Certificate.count_certificate with the c = 3 fixed-T algebra: -from the seam shape 6·tr Ĝ − ‖Ĝ‖² − 3N − 5NII − B(6 + 2√‖Ĝ‖² + B) ≤ 2·lower (the c = 3 seam -carries 5·NII: 3 from −3N(I′) and 2 from 2·#𝒵(I′) ≤ 2N_d + 2NII) and the moment -hypotheses tr Ĝ ≥ (1−δ)N, ‖Ĝ‖² ≤ (κ+δ)N (every δ > 0), eventually (3/2 − κ/2 − ε)·N ≤ lower. --/ -import Zeta23.Assembly.Certificate - -open Filter Asymptotics Topology Real RHLinalg - -noncomputable section - -namespace Zeta23 -namespace Assembly - -/-- the c = 3 fixed-T algebra with the 5·NII window term. -/ -theorem count_lower_moment_c3_five - {lower N NII trGh frGh B κ R₁ R₂ : ℝ} (hB : 0 ≤ B) - (h0 : 6 * trGh - frGh - 3 * N - 5 * NII - B * (6 + 2 * Real.sqrt frGh + B) ≤ 2 * lower) - (htr : N - R₁ ≤ trGh) (hfr : frGh ≤ κ * N + R₂) : - (3/2 - κ/2) * N - (3 * R₁ + R₂ / 2 + (5/2) * NII - + (B/2) * (6 + 2 * Real.sqrt (κ * N + R₂) + B)) ≤ lower := by - have h2 : Real.sqrt frGh ≤ Real.sqrt (κ * N + R₂) := Real.sqrt_le_sqrt hfr - nlinarith [h0, htr, h2, hB, mul_le_mul_of_nonneg_left h2 hB] - -/-- **the c = 3 count certificate.** -/ -theorem count_certificate_c3 (Z : ZeroConfig) (P : Params) (κ : ℝ) (lower : ℝ → ℝ) - (θ₀ : ℝ → ℝ) - (h0 : ∀ᶠ T in atTop, 6 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - - 3 * (Z.N T (2 * T) : ℝ) - 5 * (NII Z T : ℝ) - - θ₀ T / (P.a T * P.L T) - * (6 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) - ≤ 2 * lower T) - (hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T)) - (hBto : Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0)) - (hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) - (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) - (htrace : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, - (1 - δ) * (Z.N T (2 * T) : ℝ) ≤ rtrace (P.hat T (Z.Gz P T))) - (hfrob : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, - frobSq (P.hat T (Z.Gz P T)) ≤ (κ + δ) * (Z.N T (2 * T) : ℝ)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3/2 - κ/2 - ε) * (Z.N T (2 * T) : ℝ) ≤ lower T := by - intro ε hε - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set B : ℝ → ℝ := fun T => θ₀ T / (P.a T * P.L T) with hBdef - set δ : ℝ := ε / 6 with hδdef - have hδ : 0 < δ := by simp only [hδdef]; linarith - have hκδ0 : 0 ≤ κ + δ := by - by_contra h - rw [not_le] at h - obtain ⟨T, hT1, hT2⟩ := ((hfrob δ hδ).and (hNtop.eventually_ge_atTop 1)).exists - have : frobSq (P.hat T (Z.Gz P T)) < 0 := - lt_of_le_of_lt hT1 (mul_neg_of_neg_of_pos h (by simp only [hNdef] at hT2 ⊢; linarith)) - exact absurd (frobSq_nonneg _) (not_le.mpr this) - have hot := err_isLittleO (N := N) (R₁ := fun _ => 0) (R₂ := fun _ => 0) - (NII := fun T => (NII Z T : ℝ)) (B := B) (cl := fun _ => κ + δ) (K := κ + δ) - hNtop (isLittleO_zero _ _) (isLittleO_zero _ _) hNII_o hBto - (Eventually.of_forall fun _ => ⟨hκδ0, le_rfl⟩) - -- B ≤ δ/2 · N eventually (B → 0, N → ∞) - have hBsmall : ∀ᶠ T in atTop, B T ≤ δ / 2 * N T := by - have hB1 : ∀ᶠ T in atTop, B T ≤ 1 := by - have := hBto.eventually (eventually_le_nhds (show (0:ℝ) < 1 by norm_num)) - exact this - filter_upwards [hB1, hNtop.eventually_ge_atTop (2 / δ)] with T h1 h2 - have : 1 ≤ δ / 2 * N T := by - rw [div_le_iff₀ hδ] at h2 - nlinarith - linarith - have hsmall : ∀ᶠ T in atTop, - (5/2) * (NII Z T : ℝ) + (B T / 2) * (6 + 2 * Real.sqrt ((κ + δ) * N T) + B T) - ≤ 2 * δ * N T := by - filter_upwards [hot.def hδ, hNII_o.def hδ, hNtop.eventually_ge_atTop 0, hBsmall, hB0] - with T h1 hnii hN0 hBs hB₀ - simp only [Real.norm_eq_abs, mul_zero, zero_add, add_zero, abs_of_nonneg hN0] at h1 hnii - have h1' : 3 * (NII Z T : ℝ) + B T * (4 + 2 * Real.sqrt ((κ + δ) * N T) + B T) ≤ δ * N T := - (le_abs_self _).trans h1 - have hnii' : (NII Z T : ℝ) ≤ δ * N T := (le_abs_self _).trans hnii - have hB₀' : 0 ≤ B T := hB₀ - -- (5/2)NII + (B/2)(6 + 2√ + B) = ½[3NII + B(4 + 2√ + B)] + NII + B - nlinarith - have hmain : ∀ᶠ T in atTop, (3/2 - κ/2 - ε) * N T ≤ lower T := by - filter_upwards [h0, hB0, htrace δ hδ, hfrob δ hδ, hsmall, - hNtop.eventually_ge_atTop 0] with T hA hB₀ htr hfr hsm hN0 - have hlow := count_lower_moment_c3_five (κ := κ) (R₁ := δ * N T) (R₂ := δ * N T) hB₀ hA - (by simp only [hNdef] at htr ⊢; linarith) (by simp only [hNdef] at hfr ⊢; linarith) - rw [show κ * N T + δ * N T = (κ + δ) * N T by ring] at hlow - have hεδ : (3/2 - κ/2 - ε) * N T - ≤ (3/2 - κ/2) * N T - (3 * (δ * N T) + δ * N T / 2 + 2 * δ * N T) := by - simp only [hδdef]; nlinarith - linarith [hsm, hlow, hεδ] - obtain ⟨T₀, hT₀⟩ := eventually_atTop.mp hmain - exact ⟨T₀, fun T hT => hT₀ T hT⟩ - -end Assembly -end Zeta23 diff --git a/zeta23/Zeta23/Assembly/Endgame.lean b/zeta23/Zeta23/Assembly/Endgame.lean new file mode 100644 index 0000000000..ff56b87671 --- /dev/null +++ b/zeta23/Zeta23/Assembly/Endgame.lean @@ -0,0 +1,596 @@ +/- +Copyright (c) 2026 Anthropic, PBC. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +SPDX-License-Identifier: Apache-2.0 +-/ +/- +Part of the Zeta23 formalization of + "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". +-/ +import Zeta23.Assembly.Growth +import Zeta23.Assembly.Windows +import Zeta23.PrimeSideTemp + +/-! +# §6 Endgame: Theorems A, B, C at fixed `λ < 1` for an abstract `ZeroConfig` (Parts F3–F4) + +* Part F3 (`Main`): `thmA_abstract_err` and `thmA_abstract`. +* Part F4 (`MainBC`): `thmBC_core_err`, `thmBC_core`, `thmB_abstract`, and `thmC_abstract`. +-/ + +noncomputable section + +open Matrix RHLinalg + +namespace Zeta23 +namespace Assembly + +/-! ### F3. Theorem A at fixed `λ < 1` for an abstract zero configuration + +The theorems are proved over an abstract error function `Err` (only: eventually nonnegative and +`→ 0`) in place of the concrete `Params.calE` — the `_err` versions below — so that alternative +prime-side chains (e.g. an MV-free one with an enlarged error) plug in directly; the +`calE` statements are kept as specializations. -/ + +section Main +open Filter Asymptotics Topology + +-- `TracesBoundsE` (abstract error rate) and `TracesBounds.toE` live in Zeta23/TracesBoundsE.lean + +/-- little-o from a factor tending to zero. -/ +lemma isLittleO_of_tendsto_zero_mul {f g : ℝ → ℝ} (hf : Tendsto f atTop (𝓝 0)) : + (fun T => f T * g T) =o[atTop] g := by + simpa using ((isLittleO_one_iff ℝ).2 hf).mul_isBigO (isBigO_refl g atTop) + +/-- `O(1)` from an eventual absolute bound. -/ +lemma isBigO_one_of_abs_le {f : ℝ → ℝ} {C : ℝ} (h : ∀ᶠ T in atTop, |f T| ≤ C) : + f =O[atTop] (fun _ => (1:ℝ)) := + IsBigO.of_bound C (by simpa using h) + +/-- `O(1) · o(N) = o(N)`. -/ +lemma isLittleO_of_bdd_mul {f g N : ℝ → ℝ} (hf : f =O[atTop] (fun _ => (1:ℝ))) + (hg : g =o[atTop] N) : (fun T => f T * g T) =o[atTop] N := by + simpa using hf.mul_isLittleO hg + +/-- From `1 - 2w/L ≤ a ≤ 1` eventually, deduce `1/2 ≤ a` eventually. -/ +lemma eventually_a_ge_half (P : Params) (hP : P.Valid) + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) : + ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by + filter_upwards [ha, (tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop (4 * P.w)] with T h hL4 + have hw := hP.one_le_w + have hLpos : 0 < P.L T := by linarith + have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith + linarith [h.1] + +/-- Shared `R₁ = C₁ * √X / aT = o(N)` helper (reused by `thmA_gen`, `FinalMult`, and `ThmD/Endgame`). -/ +lemma isLittleO_sqrtX_div_a (P : Params) (hP : P.Valid) (hlam1 : P.lam ≤ 1) + {aT N : ℝ → ℝ} {C₁ : ℝ} (hC₁ : 0 < C₁) + (hapos : ∀ᶠ T in atTop, 1 / 2 ≤ aT T) + (hoN : ∀ {f : ℝ → ℝ}, f =o[atTop] (fun T => T * l T) → f =o[atTop] N) : + (fun T => C₁ * Real.sqrt (P.X T) / aT T) =o[atTop] N := by + have hbd : (fun T => C₁ / aT T) =O[atTop] (fun _ => (1 : ℝ)) := by + refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ + filter_upwards [hapos] with T ha2 + rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith)), div_le_iff₀ (by linarith)]; nlinarith + exact (isLittleO_of_bdd_mul hbd (hoN (isLittleO_sqrtX_Tl P hP.lam_pos hlam1))).congr_left + fun T => by ring + +/-- Shared `B = θ₀ / (aT * L) → 0` helper (reused by `thmA_gen` and `ThmD/Endgame`). -/ +lemma tendsto_theta_div_aL (P : Params) (hP : P.Valid) (hlam1 : P.lam ≤ 1) + {aT θ₀ : ℝ → ℝ} (hapos : ∀ᶠ T in atTop, 1 / 2 ≤ aT T) + (hθnn : ∀ᶠ T in atTop, 0 ≤ θ₀ T) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) : + Tendsto (fun T => θ₀ T / (aT T * P.L T)) atTop (𝓝 0) := by + obtain ⟨Cθ, hθ⟩ := hθ₀ + have hlam0 := hP.lam_pos + have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by + simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) + refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ + · filter_upwards [hθnn, hapos, eventually_l_pos] with T h0 ha2 hl + have hLpos : 0 < P.L T := by simp only [Params.L]; positivity + exact div_nonneg h0 (by nlinarith) + · filter_upwards [hθnn, hapos, eventually_l_pos, hθ, eventually_gt_atTop (0 : ℝ)] + with T h0 ha2 hl hθT hT0 + have hLpos : 0 < P.L T := by simp only [Params.L]; positivity + have hapos' : 0 < aT T := by linarith + have hq : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity + rw [div_le_iff₀ (mul_pos hapos' hLpos)] + calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT + _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ + _ = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by field_simp + _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (aT T * P.L T) := by gcongr + +/-- Shared `R₂ = cl * ((K - 1) * N + K * (|CN| * log T)) = o(N)` helper (reused by `thmA_gen` and +`FinalMult.moments_of_pt`). -/ +lemma isLittleO_R2_of_K (P : Params) (hP : P.Valid) {Err cl N : ℝ → ℝ} {C₂ CN : ℝ} + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) + (hcalE : Tendsto Err atTop (𝓝 0)) + (hclO : cl =O[atTop] (fun _ => (1 : ℝ))) + (hoN : ∀ {f : ℝ → ℝ}, f =o[atTop] (fun T => T * l T) → f =o[atTop] N) : + (fun T => cl T * (((1 + C₂ * Err T) / P.a T ^ 2 - 1) * N T + + (1 + C₂ * Err T) / P.a T ^ 2 * (|CN| * Real.log T))) =o[atTop] N := by + set K : ℝ → ℝ := fun T => (1 + C₂ * Err T) / P.a T ^ 2 + have hKto : Tendsto K atTop (𝓝 1) := by + have h1 : Tendsto (fun T => 1 + C₂ * Err T) atTop (𝓝 1) := by + simpa using tendsto_const_nhds.add (hcalE.const_mul C₂) + have h2 : Tendsto (fun T => P.a T ^ 2) atTop (𝓝 1) := by + simpa using (tendsto_a_one P hP.lam_pos ha).pow 2 + simpa [K, Pi.div_def] using h1.div h2 one_ne_zero + have hK1 : Tendsto (fun T => K T - 1) atTop (𝓝 0) := by simpa using hKto.sub_const 1 + have hKO : K =O[atTop] (fun _ => (1 : ℝ)) := by + refine isBigO_one_of_abs_le (C := 2) ?_ + filter_upwards [hKto.eventually (eventually_ge_nhds (show (0 : ℝ) < 1 by norm_num)), + hKto.eventually (eventually_le_nhds (show (1 : ℝ) < 2 by norm_num))] with T h1 h2 + rw [abs_of_nonneg h1]; exact h2 + exact isLittleO_of_bdd_mul hclO ((isLittleO_of_tendsto_zero_mul hK1).add + (isLittleO_of_bdd_mul hKO ((hoN isLittleO_log_Tl).const_mul_left _))) + +variable {m : Type*} [Fintype m] + +omit [Fintype m] in +/-- A real-scalar multiple of a Hermitian matrix is Hermitian. -/ +lemma isHermitian_ofReal_smul {M : Matrix m m ℂ} (hM : M.IsHermitian) (c : ℝ) : + ((c : ℂ) • M).IsHermitian := by + unfold Matrix.IsHermitian at * + rw [Matrix.conjTranspose_smul, hM] + simp + +/-- The prime-side matrix `G^{prime}_{kl} = ∫ φ̂(τ−τ_k)φ̂(τ−τ_l)ν_X(τ)dτ` is real symmetric, hence Hermitian +(paper [eq:Gdef]: "The second expression shows that `G` is real symmetric"). -/ +lemma Gp_isHermitian (P : Params) (T : ℝ) : (P.Gp T).IsHermitian := by + apply Matrix.IsHermitian.ext + intro k l + simp only [Params.Gp, Complex.star_def, Complex.conj_ofReal, Complex.ofReal_inj, Params.Gentry] + congr 1; ext τ; ring + +omit [Fintype m] in +lemma isHermitian_tilde (P : Params) (T : ℝ) {M : Matrix m m ℂ} (hM : M.IsHermitian) : + (P.tilde T M).IsHermitian := by + rw [tilde_eq]; exact isHermitian_ofReal_smul hM _ + +/-! ## A common generalization of the ζ- and χ-assemblies + +The §6 endgame (`thmA_abstract_err` / `thmBC_core_err`) is identical for the ζ data of +`Zeta23.Assembly` and the χ data of `Zeta23.ThmE.AssemblyQ`; only the prime-side trace data +(`trG`, `trG2`, `mainTr2`), the density log `ℓ₁` and the additive constant `c_q` differ. The +lemmas below isolate that difference in `TracesBoundsG` and the generic `seamBGen` / +`thmA_gen` / `thmBC_core_gen`, of which the four endgame theorems are one-line instances. -/ + +/-- **Seam B, prime-side abstractly**: the analogue of `seamB`/`seamBChi` with the trace +identifications supplied as hypotheses. -/ +theorem seamBGen {Z : ZeroConfig} {P : Params} {T : ℝ} + {trG trG2 mainTr2 ell1f : ℝ → ℝ} + (hmainTr2 : mainTr2 T = T * P.L T / (2 * Real.pi) * (ell1f T ^ 2 + P.L T ^ 2 / 3)) + (hRT : rtrace (P.tilde T (Z.Gz P T)) = trG T) + (hFR : frobSq (P.tilde T (Z.Gz P T)) = trG2 T) + (ha : 0 < P.a T) (hL : 0 < P.L T) (hℓ₁ : 0 < ell1f T) + {C₁ C₂ ET RN : ℝ} + (htr1 : |trG T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| + ≤ C₁ * (P.L T * Real.sqrt (P.X T))) + (hK : 0 ≤ 1 + C₂ * ET) + (htr2 : trG2 T - mainTr2 T ≤ C₂ * ET * mainTr2 T) + (hRvM : T * ell1f T / (2 * Real.pi) ≤ (Z.N T (2 * T) : ℝ) + RN) : + |rtrace (P.hat T (Z.Gz P T)) - (Z.N T (2 * T) : ℝ)| + ≤ C₁ * Real.sqrt (P.X T) / P.a T ∧ + frobSq (P.hat T (Z.Gz P T)) + ≤ (1 / (P.L T / ell1f T) + (P.L T / ell1f T) / 3) * (Z.N T (2 * T) : ℝ) + + (1 / (P.L T / ell1f T) + (P.L T / ell1f T) / 3) * (((1 + C₂ * ET) / P.a T ^ 2 - 1) + * (Z.N T (2 * T) : ℝ) + (1 + C₂ * ET) / P.a T ^ 2 * RN) := by + rw [rtrace_hat, frobSq_hat, hRT, hFR] + have htr2' : trG2 T - T * P.L T / (2 * Real.pi) * (ell1f T ^ 2 + P.L T ^ 2 / 3) + ≤ C₂ * ET * (T * P.L T / (2 * Real.pi) * (ell1f T ^ 2 + P.L T ^ 2 / 3)) := by + rw [← hmainTr2]; exact htr2 + refine ⟨trGhat_sub_N_le ha hL htr1, ?_⟩ + have h := frobGhat_le (T := T) (trG2 := trG2 T) (N := (Z.N T (2 * T) : ℝ)) + (ℓ₁ := ell1f T) (C := C₂) (calE := ET) (RN := RN) ha hL hℓ₁ hK htr2' hRvM + simpa using h + +/-- **Theorem A, generalized** (the common core of `thmA_abstract_err` and +`thmE_A_abstract`). -/ +theorem thmA_gen (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + {Err trG trG2 mainTr2 ell1f : ℝ → ℝ} {ccoef : ℝ} + (hTr : TracesBoundsG P Err P.a trG trG2 mainTr2 ell1f (fun T => (Z.N T (2 * T) : ℝ))) + (hmainTr2 : ∀ T, mainTr2 T = T * P.L T / (2 * Real.pi) * (ell1f T ^ 2 + P.L T ^ 2 / 3)) + (hRvMmain : ∃ CN T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → + |(Z.N T (2 * T) : ℝ) - T / (2 * Real.pi) * ell1f T| ≤ CN * Real.log T) + (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) + (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hHerm : ∀ᶠ T in atTop, (P.tilde T (Z.Gz P T)).IsHermitian) + (hRT : ∀ᶠ T in atTop, rtrace (P.tilde T (Z.Gz P T)) = trG T) + (hFR : ∀ᶠ T in atTop, frobSq (P.tilde T (Z.Gz P T)) = trG2 T) + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) + (hEllpos : ∀ᶠ T in atTop, 0 < ell1f T) + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (hoN : ∀ {f : ℝ → ℝ}, f =o[atTop] (fun T => T * l T) → + f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) + (hclam : ∀ᶠ T in atTop, 0 ≤ 1 / (P.L T / ell1f T) + (P.L T / ell1f T) / 3 + ∧ 1 / (P.L T / ell1f T) + (P.L T / ell1f T) / 3 ≤ 2 / P.lam + 1 / 3) + (hFge : ∀ᶠ T in atTop, Hfun P.lam - ccoef / (P.lam * l T) ≤ Hfun (P.L T / ell1f T)) + (hcalE : Tendsto Err atTop (𝓝 0)) : + DyadicLowerBound (Hfun P.lam) (fun T => Z.N0star T (2 * T)) (fun T => Z.N T (2 * T)) := by + have hlam0 := hP.lam_pos + have hlam1 : P.lam ≤ 1 := hlam.le + obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 + obtain ⟨C₂, hC₂, T₂, htr2⟩ := hTr.tr2 + obtain ⟨CN, T₃, hRvMmain'⟩ := hRvMmain + obtain ⟨Cθ, hθ⟩ := hθ₀ + obtain ⟨CII, hII⟩ := hNII + -- the functions of T (abbreviations) + set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef + set cl : ℝ → ℝ := fun T => 1 / (P.L T / ell1f T) + (P.L T / ell1f T) / 3 with hcl + set K : ℝ → ℝ := fun T => (1 + C₂ * Err T) / P.a T ^ 2 with hK + set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / P.a T with hR₁ + set R₂ : ℝ → ℝ := fun T => cl T * ((K T - 1) * N T + K T * (|CN| * Real.log T)) with hR₂ + set B : ℝ → ℝ := fun T => θ₀ T / (P.a T * P.L T) with hBdef + set err : ℝ → ℝ := fun T => (4 * R₁ T + R₂ T + 3 * (NII Z T : ℝ) + + B T * (4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T)) + ccoef / (P.lam * l T) * N T with herr + have hapos := eventually_a_ge_half P hP ha + have hcE0 : Tendsto (fun T => C₂ * Err T) atTop (𝓝 0) := by + simpa using hcalE.const_mul C₂ + -- (1) the main inequality, eventually in T + have hmain : ∀ᶠ T in atTop, Hfun P.lam * N T - err T ≤ (Z.N0star T (2 * T) : ℝ) := by + filter_upwards [hBlock, hTail, hHerm, hRT, hFR, hapos, eventually_ge_atTop T₁, + eventually_ge_atTop T₂, eventually_ge_atTop T₃, eventually_ge_atTop (0:ℝ), eventually_l_pos, + eventually_log_nonneg, hEllpos, hFge, + hcE0.eventually (eventually_gt_nhds (show (-1:ℝ) < 0 by norm_num))] + with T hB hTl hHermT hRTT hFRT ha2 hT₁ hT₂ hT₃ hT0 hl hlog hℓ₁ hFgeT hcE + have hapos' : 0 < P.a T := by linarith + have hLpos : 0 < P.L T := by simp only [Params.L]; positivity + have hKnn : 0 ≤ 1 + C₂ * Err T := by linarith + have hA := seamA hT0 hB hTl hapos' hLpos + have htr2' : trG2 T - mainTr2 T ≤ C₂ * Err T * mainTr2 T := by + have := htr2 T hT₂ + simp only at this + rw [← mul_assoc] at this + exact (le_abs_self _).trans this + have htr1' : |trG T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| + ≤ C₁ * (P.L T * Real.sqrt (P.X T)) := by + have := htr1 T hT₁; simpa only using this + have hRvM' : T * ell1f T / (2 * Real.pi) ≤ N T + |CN| * Real.log T := by + have h1 := (abs_le.mp (hRvMmain' T hT₃)).1 + have h2 : CN * Real.log T ≤ |CN| * Real.log T := + mul_le_mul_of_nonneg_right (le_abs_self _) hlog + have h3 : T / (2 * Real.pi) * ell1f T = T * ell1f T / (2 * Real.pi) := by ring + simp only [hNdef]; linarith + have hSB := seamBGen (hmainTr2 T) hRTT hFRT hapos' hLpos hℓ₁ htr1' hKnn htr2' hRvM' + -- combine with N0star_lower_H and H(λ₁) ≥ H(λ) − c/(λ l) + have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le + have h := N0star_lower_H hB₀ hA hSB.1 hSB.2 + have hN0 : 0 ≤ N T := Nat.cast_nonneg _ + have hHN : (Hfun P.lam - ccoef / (P.lam * l T)) * N T ≤ Hfun (P.L T / ell1f T) * N T := + mul_le_mul_of_nonneg_right hFgeT hN0 + simp only [herr, hR₁, hR₂, hBdef, hcl, hK, hNdef] at h hHN ⊢ + linarith + -- (2) err = o(N) + have o1 : R₁ =o[atTop] N := isLittleO_sqrtX_div_a P hP hlam1 hC₁ hapos hoN + have o2 : R₂ =o[atTop] N := isLittleO_R2_of_K P hP ha hcalE + (isBigO_one_of_abs_le (C := 2 / P.lam + 1 / 3) (hclam.mono fun _ h => by + rw [abs_of_nonneg h.1]; exact h.2)) hoN + have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := + isLittleO_NII_of Z ⟨CII, hII⟩ (fun _ hf => hoN hf) + have o4 : Tendsto B atTop (𝓝 0) := + tendsto_theta_div_aL P hP hlam1 hapos (hTail.mono fun _ h => h.theta_nonneg) ⟨Cθ, hθ⟩ + -- the bracket and the c/(λ l) term + have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) (cl := cl) + hNtop o1 o2 o3 o4 hclam + have o6 : (fun T => ccoef / (P.lam * l T) * N T) =o[atTop] N := by + refine isLittleO_of_tendsto_zero_mul ?_ + simpa using tendsto_const_nhds.div_atTop (tendsto_l_atTop.const_mul_atTop hlam0) + have herr_o : err =o[atTop] N := o5.add o6 + -- (3) conclude + exact eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o + +/-- **Theorem A at fixed `λ ∈ (0,1)`, for an abstract zero configuration** ([thm:A] with +§6's proof, in `ε`-form): +for every `ε > 0`, `N₀*(T,2T) ≥ (H(λ) − ε) N(T,2T)` for all `T ≥ T₀`. + +Genuine hypotheses: the published inputs `H : PaperInputs Z` (only H-RvM is used directly here; +the others enter through the inputs below) and the thm:traces package +`hTr : ThmTracesHyp P Z`. +Named inputs: +`hBlock` (prop:block, ZeroSide), `hTail`/`hθ₀` (prop:tail, Tail), `hNII` (boundary count +`N(I′∖I) ≪ D₀ l`, Tail), `hGzGp` (the H-EF bridge `G^{zero} = G^{prime}`, [eq:Gdef]), `ha` ([eq:abdef], +Taper), `hcalE` (`𝓔_T → 0`, PrimeSideB). -/ +theorem thmA_abstract_err (Z : ZeroConfig) (hRvM : RiemannVonMangoldt Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) (Err : ℝ → ℝ) + (hTr : TracesBoundsE P Err P.a P.trGtilde P.trGtildeSq (fun T => (Z.N T (2 * T) : ℝ))) + (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) + (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) + (hcalE : Tendsto Err atTop (𝓝 0)) : + DyadicLowerBound (Hfun P.lam) (fun T => Z.N0star T (2 * T)) (fun T => Z.N T (2 * T)) := by + have hlam0 := hP.lam_pos + have hlam1 : P.lam ≤ 1 := hlam.le + exact thmA_gen Z P hP hlam hTr (fun _ => rfl) + hRvM.main hBlock θ₀ hTail hθ₀ hNII + (hGzGp.mono fun T h => by rw [h]; exact isHermitian_tilde P T (Gp_isHermitian P T)) + (hGzGp.mono fun T h => by rw [h]; exact rtrace_tilde_Gp P T) + (hGzGp.mono fun T h => by rw [h]; exact frobSq_tilde_Gp P T) + ha (eventually_l_pos.mono fun T hl => ell1_pos hl) + (tendsto_N_atTop Z hRvM) + (fun hf => isLittleO_N_of_isLittleO_Tl Z hRvM hf) + (eventually_clam_bounds P hlam0 hlam1) + (eventually_l_pos.mono fun T hl => Hfun_lam1_ge P T hlam0 hl) + hcalE + +/-- **Theorem A at fixed `λ ∈ (0,1)`, abstract zero configuration** — the `Err := P.calE` +specialization of `thmA_abstract_err`. -/ +theorem thmA_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) + (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) + (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) + (hcalE : Tendsto P.calE atTop (𝓝 0)) : + DyadicLowerBound (Hfun P.lam) (fun T => Z.N0star T (2 * T)) (fun T => Z.N T (2 * T)) := + thmA_abstract_err Z H.RvM P hP hlam P.calE hTr hBlock θ₀ hTail hθ₀ hNII hGzGp ha hcalE + +end Main + +/-! ### F4. Theorems B and C at fixed `λ < 1` for an abstract zero configuration +(the paper §6, proofs of thm:B and thm:C: [eq:nplus-lower] + [eq:zeroside2]) -/ + +section MainBC +open Filter Asymptotics Topology + + +lemma card_fin_d (P : Params) (T : ℝ) : (Fintype.card (Fin (P.d T)) : ℝ) = P.d T := by simp + +lemma d_le (P : Params) {T : ℝ} (h : 0 ≤ P.L T * T / (2 * Real.pi)) : + (P.d T : ℝ) ≤ P.L T * T / (2 * Real.pi) := Nat.floor_le h + +/-- `0 ≤ F(x) ≤ 1` for `0 ≤ x ≤ 1` (indeed `F(x) ≤ x`). -/ +lemma Ffun_bounds {x : ℝ} (h0 : 0 ≤ x) (h1 : x ≤ 1) : 0 ≤ Ffun x ∧ Ffun x ≤ 1 := by + simp only [Ffun] + refine ⟨by positivity, ?_⟩ + rw [div_le_one (by positivity)]; nlinarith + +/-- The algebra of [eq:nplus-lower]: with `Q := (tr G̃)²/tr G̃²` and `x := θ₀ d / tr G̃`, +"`n₊^{θ₀}(G̃) ≥ (tr G̃ − θ₀ d)²/tr G̃² = Q (1 − x)²`" `≥ Q − 2xQ`; combined with [eq:ratio] +`|Q − F(λ₁)N| ≤ C𝓔F(λ₁)N` this gives `n₊^{θ₀}(G̃) ≥ F(λ₁)N − [C𝓔F(λ₁)N + 2x(1+C𝓔)F(λ₁)N]`. -/ +theorem nplus_ge_explicit {nplus trG trG2 θd FN CE : ℝ} + (hCS : (trG - θd) ^ 2 / trG2 ≤ nplus) (htr : 0 < trG) (hθd : 0 ≤ θd) (htrG2 : 0 ≤ trG2) + (hratio : |trG ^ 2 / trG2 - FN| ≤ CE * FN) : + FN - (CE * FN + 2 * (θd / trG) * ((1 + CE) * FN)) ≤ nplus := by + set Q := trG ^ 2 / trG2 with hQ + set x := θd / trG with hx + have hx0 : 0 ≤ x := div_nonneg hθd htr.le + have h1 : Q - 2 * x * Q ≤ (trG - θd) ^ 2 / trG2 := by + have e : Q - 2 * x * Q = (trG ^ 2 - 2 * θd * trG) / trG2 := by + simp only [hQ, hx]; field_simp + rw [e] + apply div_le_div_of_nonneg_right _ htrG2 + nlinarith [sq_nonneg θd] + have hQlo : FN - CE * FN ≤ Q := by have := (abs_le.mp hratio).1; linarith + have hQhi : Q ≤ (1 + CE) * FN := by have := (abs_le.mp hratio).2; linarith + have : 2 * x * Q ≤ 2 * x * ((1 + CE) * FN) := mul_le_mul_of_nonneg_left hQhi (by positivity) + linarith + +/-- **Theorems B and C, generalized** (the common core of `thmBC_core_err` and +`thmE_BC_core`). -/ +theorem thmBC_core_gen (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + {Err trG trG2 mainTr2 ell1f : ℝ → ℝ} {ccoef : ℝ} + (hTr : TracesBoundsG P Err P.a trG trG2 mainTr2 ell1f (fun T => (Z.N T (2 * T) : ℝ))) + (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) + (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hHerm : ∀ᶠ T in atTop, (P.tilde T (Z.Gz P T)).IsHermitian) + (hRT : ∀ᶠ T in atTop, rtrace (P.tilde T (Z.Gz P T)) = trG T) + (hFR : ∀ᶠ T in atTop, frobSq (P.tilde T (Z.Gz P T)) = trG2 T) + (hNge : ∀ᶠ T in atTop, T * l T / (4 * Real.pi) ≤ (Z.N T (2 * T) : ℝ)) + (hoN : ∀ {f : ℝ → ℝ}, f =o[atTop] (fun T => T * l T) → + f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) + (hlam1pos : ∀ᶠ T in atTop, 0 < P.L T / ell1f T) + (hlam1le : ∀ᶠ T in atTop, P.L T / ell1f T ≤ P.lam) + (hFge : ∀ᶠ T in atTop, Ffun P.lam - ccoef / l T ≤ Ffun (P.L T / ell1f T)) + (hErr0 : ∀ᶠ T in atTop, 0 ≤ Err T) + (hcalE : Tendsto Err atTop (𝓝 0)) : + ∃ R : ℝ → ℝ, R =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) ∧ + ∀ᶠ T in atTop, + (2 * Ffun P.lam - 1) * (Z.N T (2 * T) : ℝ) - 2 * R T ≤ Z.N0s T (2 * T) ∧ + Ffun P.lam * (Z.N T (2 * T) : ℝ) - R T ≤ Z.Nd T (2 * T) := by + have hlam0 := hP.lam_pos + have hlam1 : P.lam ≤ 1 := hlam.le + obtain ⟨C₃, hC₃, T₃, hratio⟩ := hTr.ratio + obtain ⟨C₄, hC₄, T₄, htr1'⟩ := hTr.tr1' + obtain ⟨Cθ, hθ⟩ := hθ₀ + obtain ⟨CII, hII⟩ := hNII + set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef + set x : ℝ → ℝ := fun T => θ₀ T * (P.d T : ℝ) / trG T with hxdef + set R : ℝ → ℝ := fun T => (C₃ * Err T * (Ffun (P.L T / ell1f T) * N T) + + 2 * x T * ((1 + C₃ * Err T) * (Ffun (P.L T / ell1f T) * N T))) + + (NII Z T : ℝ) + ccoef / l T * N T with hRdef + have hcE0 : Tendsto (fun T => C₃ * Err T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₃ + have hcE4 : Tendsto (fun T => C₄ * Err T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₄ + -- Step 0: eventually tr G̃ ≥ L N / 2 > 0 and x ≤ 8(|Cθ|+1) T^{λ/2−1} (so θ₀ d < tr G̃ and x → 0). + have hx : ∀ᶠ T in atTop, 0 < trG T ∧ 0 ≤ x T ∧ + x T ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) ∧ θ₀ T * (P.d T : ℝ) < trG T := by + filter_upwards [hTail, hθ, eventually_ge_atTop T₄, hNge, eventually_l_pos, + eventually_gt_atTop (0:ℝ), hcE4.eventually (eventually_lt_nhds (show (0:ℝ) < 1/2 by norm_num)), + (tendsto_rpow_halflam_sub_one P hlam1).eventually + (eventually_lt_nhds (show (0:ℝ) < 1 / (8 * (|Cθ| + 1)) by positivity))] + with T hTl hθT hT₄ hNge hl hT0 hcE hTs + have hLpos : 0 < P.L T := by simp only [Params.L]; positivity + have h1 := (abs_le.mp (by simpa only using htr1' T hT₄)).1 + have hLN : 0 < P.L T * N T := by + have : 0 < T * l T / (4 * Real.pi) := by positivity + exact mul_pos hLpos (this.trans_le hNge) + have htrG : P.L T * N T / 2 ≤ trG T := by + have : C₄ * Err T * (P.L T * N T) ≤ 1 / 2 * (P.L T * N T) := + mul_le_mul_of_nonneg_right hcE.le hLN.le + simp only [hNdef] at this h1 ⊢; linarith + have htrGpos : 0 < trG T := lt_of_lt_of_le (by positivity) htrG + have hd : (P.d T : ℝ) ≤ P.L T * T / (2 * Real.pi) := d_le P (by positivity) + have hθ' : θ₀ T ≤ (|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1) := by + refine hθT.trans ?_ + have : Cθ ≤ |Cθ| + 1 := by linarith [le_abs_self Cθ] + gcongr + have hθ0 := hTl.theta_nonneg + -- θ₀ d ≤ (|Cθ|+1) l T^s · L T/(2π) and tr G̃ ≥ L N/2 ≥ L T l/(8π) + have hnum : θ₀ T * (P.d T : ℝ) ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := + mul_le_mul hθ' hd (Nat.cast_nonneg _) (hθ0.trans hθ') + have hden : P.L T * (T * l T / (4 * Real.pi)) / 2 ≤ trG T := + le_trans (by gcongr) htrG + have hxle : x T ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) := by + simp only [hxdef] + rw [div_le_iff₀ htrGpos] + calc θ₀ T * (P.d T : ℝ) ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := hnum + _ = 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * (P.L T * (T * l T / (4 * Real.pi)) / 2) := by ring + _ ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * trG T := by gcongr + refine ⟨htrGpos, div_nonneg (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrGpos.le, hxle, ?_⟩ + have hx1 : x T < 1 := by + refine hxle.trans_lt ?_ + have := (lt_div_iff₀ (show (0:ℝ) < 8 * (|Cθ| + 1) by positivity)).mp hTs + nlinarith [abs_nonneg Cθ, Real.rpow_nonneg hT0.le (P.lam / 2 - 1)] + simp only [hxdef] at hx1 + rwa [div_lt_one htrGpos] at hx1 + refine ⟨R, ?_, ?_⟩ + -- R = o(N) + · have hFN : (fun T => Ffun (P.L T / ell1f T) * N T) =O[atTop] N := by + refine IsBigO.of_bound 1 ?_ + filter_upwards [hlam1pos, hlam1le] with T hl1 hl1le + have hb := Ffun_bounds hl1.le (hl1le.trans hlam1) + rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_mul, abs_of_nonneg hb.1, one_mul] + exact mul_le_of_le_one_left (abs_nonneg _) hb.2 + have o1 : (fun T => C₃ * Err T * (Ffun (P.L T / ell1f T) * N T)) =o[atTop] N := by + have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO hFN + simpa using this + have hxto : Tendsto x atTop (𝓝 0) := by + refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds + (by simpa using (tendsto_rpow_halflam_sub_one P hlam1).const_mul (4 * (|Cθ| + 1))) + (hx.mono fun T h => h.2.1) (hx.mono fun T h => h.2.2.1) + have o2 : (fun T => 2 * x T * ((1 + C₃ * Err T) * (Ffun (P.L T / ell1f T) * N T))) =o[atTop] N := by + have h2x : Tendsto (fun T => 2 * x T) atTop (𝓝 0) := by simpa using hxto.const_mul 2 + have hK : (fun T => 1 + C₃ * Err T) =O[atTop] (fun _ => (1:ℝ)) := by + refine isBigO_one_of_abs_le (C := 2) ?_ + filter_upwards [hcE0.eventually (eventually_ge_nhds (show (-1:ℝ) < 0 by norm_num)), + hcE0.eventually (eventually_le_nhds (show (0:ℝ) < 1 by norm_num))] with T h1 h2 + rw [abs_of_nonneg (by linarith)]; linarith + have := ((isLittleO_one_iff ℝ).2 h2x).mul_isBigO (hK.mul hFN) + simpa using this + have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := + isLittleO_NII_of Z ⟨CII, hII⟩ (fun _ hf => hoN hf) + have o4 : (fun T => ccoef / l T * N T) =o[atTop] N := + isLittleO_of_tendsto_zero_mul (tendsto_const_nhds.div_atTop tendsto_l_atTop) + exact ((o1.add o2).add o3).add o4 + -- the inequalities, eventually + · filter_upwards [hBlock, hTail, hHerm, hRT, hFR, hx, eventually_ge_atTop T₃, eventually_ge_atTop (0:ℝ), + eventually_l_pos, hErr0, hFge] + with T hB hTl hHermT hRTT hFRT hxT hT₃ hT0 hl hE0 hFgeT + have hGt : (P.tilde T (Z.Gz P T)).IsHermitian := hHermT + -- [eq:zeroside2] + have hZ := seamA_BC hT0 hB hTl le_rfl hGt + -- lem:CS, [eq:nplus-lower] + have hθ0 := hTl.theta_nonneg + have hrt : rtrace (P.tilde T (Z.Gz P T)) = trG T := hRTT + have hfr : frobSq (P.tilde T (Z.Gz P T)) = trG2 T := hFRT + have htr' : θ₀ T * (Fintype.card (Fin (P.d T)) : ℝ) < rtrace (P.tilde T (Z.Gz P T)) := by + rw [card_fin_d, hrt]; exact hxT.2.2.2 + have hCS := nplus_lower hGt hθ0 htr' + rw [card_fin_d, hrt, hfr] at hCS + have hratio' : |trG T ^ 2 / trG2 T - Ffun (P.L T / ell1f T) * N T| + ≤ C₃ * Err T * (Ffun (P.L T / ell1f T) * N T) := by + have := hratio T hT₃; simp only at this; rw [← mul_assoc] at this; exact this + have htrG2 : 0 ≤ trG2 T := by rw [← hfr]; exact frobSq_nonneg _ + have hnp := nplus_ge_explicit hCS hxT.1 (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrG2 hratio' + -- F(λ₁) ≥ F(λ) − c/l + have hN0 : 0 ≤ N T := Nat.cast_nonneg _ + have hFN : (Ffun P.lam - ccoef / l T) * N T ≤ Ffun (P.L T / ell1f T) * N T := + mul_le_mul_of_nonneg_right hFgeT hN0 + simp only [hRdef, hxdef, hNdef] at hnp hFN hZ ⊢ + constructor <;> nlinarith [hZ.1, hZ.2, hnp, hFN] + +/-- **Theorems B and C at fixed `λ ∈ (0,1)`, for an abstract zero configuration — common core.** +There is `R = o(N)` with, eventually in `T`: `(2F(λ) − 1)N − 2R ≤ N₀ˢ(T,2T)` and +`F(λ)N − R ≤ N_d(T,2T)` (paper §6, proofs of thm:B, thm:C: prop:tail `θ₀ ≪ lT^{λ/2−1}`, prop:trace +`tr G̃ ≫ dl` hence `tr G̃ > θ₀d`, lem:CS + [eq:ratio] ⇒ [eq:nplus-lower], then [eq:zeroside2] and +`F(λ₁) ≥ F(λ) − 1/l`). Same displayed inputs as `thmA_abstract` (without `ha`). -/ +theorem thmBC_core_err (Z : ZeroConfig) (hRvM : RiemannVonMangoldt Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) (Err : ℝ → ℝ) + (hTr : TracesBoundsE P Err P.a P.trGtilde P.trGtildeSq (fun T => (Z.N T (2 * T) : ℝ))) + (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) + (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) + (hErr0 : ∀ᶠ T in atTop, 0 ≤ Err T) + (hcalE : Tendsto Err atTop (𝓝 0)) : + ∃ R : ℝ → ℝ, R =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) ∧ + ∀ᶠ T in atTop, + (2 * Ffun P.lam - 1) * (Z.N T (2 * T) : ℝ) - 2 * R T ≤ Z.N0s T (2 * T) ∧ + Ffun P.lam * (Z.N T (2 * T) : ℝ) - R T ≤ Z.Nd T (2 * T) := by + have hlam0 := hP.lam_pos + have hlam1 : P.lam ≤ 1 := hlam.le + exact thmBC_core_gen Z P hP hlam hTr hBlock θ₀ hTail hθ₀ hNII + (hGzGp.mono fun T h => by rw [h]; exact isHermitian_tilde P T (Gp_isHermitian P T)) + (hGzGp.mono fun T h => by rw [h]; exact rtrace_tilde_Gp P T) + (hGzGp.mono fun T h => by rw [h]; exact frobSq_tilde_Gp P T) + (eventually_N_ge Z hRvM) + (fun hf => isLittleO_N_of_isLittleO_Tl Z hRvM hf) + (eventually_l_pos.mono fun T hl => lam1_pos P T hlam0 hl) + (eventually_l_pos.mono fun T hl => lam1_le P T hlam0.le hl) + (eventually_l_pos.mono fun T hl => Ffun_lam1_ge P T hlam0 hlam1 hl) + hErr0 hcalE + +/-- `thmBC_core`, the concrete-rate wrapper: `Err := P.calE` +(the `Err`-parametric generalization is `thmBC_core_err` above). -/ +theorem thmBC_core (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) + (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) + (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) + (hcalE : Tendsto P.calE atTop (𝓝 0)) : + ∃ R : ℝ → ℝ, R =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) ∧ + ∀ᶠ T in atTop, + (2 * Ffun P.lam - 1) * (Z.N T (2 * T) : ℝ) - 2 * R T ≤ Z.N0s T (2 * T) ∧ + Ffun P.lam * (Z.N T (2 * T) : ℝ) - R T ≤ Z.Nd T (2 * T) := + thmBC_core_err Z H.RvM P hP hlam P.calE hTr hBlock θ₀ hTail hθ₀ hNII hGzGp + (eventually_calE_nonneg P hP.lam_pos (zero_le_one.trans hP.one_le_w)) hcalE + +/-- **Theorem B at fixed `λ ∈ (0,1)`, abstract zero configuration** (the paper [thm:B], `ε`-form): +`N₀ˢ(T,2T) ≥ (2F(λ) − 1 − ε) N(T,2T)` for `T ≥ T₀`. -/ +theorem thmB_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) + (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) + (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) + (hcalE : Tendsto P.calE atTop (𝓝 0)) : + DyadicLowerBound (2 * Ffun P.lam - 1) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) := by + obtain ⟨R, hR, hev⟩ := thmBC_core Z H P hP hlam hTr hBlock θ₀ hTail hθ₀ hNII hGzGp hcalE + refine eps_form_of_isLittleO (err := fun T => 2 * R T) (hev.mono fun T h => ?_) + (Eventually.of_forall fun T => Nat.cast_nonneg _) (hR.const_mul_left 2) + linarith [h.1] + +/-- **Theorem C at fixed `λ ∈ (0,1)`, abstract zero configuration** (the paper [thm:C], `ε`-form): +`N_d(T,2T) ≥ (F(λ) − ε) N(T,2T)` for `T ≥ T₀`. -/ +theorem thmC_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) + (hBlock : ∀ᶠ T in atTop, BlockInputs Z P T) + (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) + (hcalE : Tendsto P.calE atTop (𝓝 0)) : + DyadicLowerBound (Ffun P.lam) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := by + obtain ⟨R, hR, hev⟩ := thmBC_core Z H P hP hlam hTr hBlock θ₀ hTail hθ₀ hNII hGzGp hcalE + exact eps_form_of_isLittleO (err := R) (hev.mono fun T h => h.2) + (Eventually.of_forall fun T => Nat.cast_nonneg _) hR + +end MainBC + +end Assembly +end Zeta23 + +end diff --git a/zeta23/Zeta23/Assembly/Growth.lean b/zeta23/Zeta23/Assembly/Growth.lean new file mode 100644 index 0000000000..2fae749211 --- /dev/null +++ b/zeta23/Zeta23/Assembly/Growth.lean @@ -0,0 +1,503 @@ +/- +Copyright (c) 2026 Anthropic, PBC. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +SPDX-License-Identifier: Apache-2.0 +-/ +/- +Part of the Zeta23 formalization of + "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". +-/ +import Zeta23.Assembly.Matrix +import Zeta23.Assembly.Inputs +import Zeta23.Hypotheses +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.Analysis.Real.Pi.Bounds + +/-! +# §6 Asymptotic wrappers, growth lemmas, and `𝓔_T → 0` (Parts E, F2, F5) + +* `EpsLowerBound`, `DyadicLowerBound`, `EpsLowerBoundPair`, `DyadicLowerBoundPair` + (in `namespace Zeta23`). +* Part E (`Asymptotic`): `o(N)` error ⇒ `ε`-form, `λ → 1⁻` sup wrappers, and dyadic summation. +* Part F2 (`Growth`): growth estimates for `l`, `L`, `X`, `N(T,2T)` under H-RvM, and `N(I′∖I)`. +* Part F5 (`CalE`): `eventually_calE_nonneg`, `X_le_T`, and `calE_tendsto_zero`. +-/ + +noncomputable section + +namespace Zeta23 + +/-- Reusable asymptotic `ε`-form lower bound for real-valued functions. -/ +abbrev EpsLowerBound (c : ℝ) (num denom : ℝ → ℝ) : Prop := + ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (c - ε) * denom T ≤ num T + +/-- Reusable dyadic/cumulative liminf `ε`-form template for `ℕ`-valued counting functions. -/ +abbrev DyadicLowerBound (c : ℝ) (num denom : ℝ → ℕ) : Prop := + EpsLowerBound c (fun T => (num T : ℝ)) (fun T => (denom T : ℝ)) + +/-- Reusable paired asymptotic `ε`-form lower bound (simple + distinct). -/ +abbrev EpsLowerBoundPair (c₁ c₂ : ℝ) (num₁ num₂ denom : ℝ → ℝ) : Prop := + ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, + (c₁ - ε) * denom T ≤ num₁ T ∧ (c₂ - ε) * denom T ≤ num₂ T + +/-- Reusable paired dyadic/cumulative liminf `ε`-form template. -/ +abbrev DyadicLowerBoundPair (c₁ c₂ : ℝ) (num₁ num₂ denom : ℝ → ℕ) : Prop := + EpsLowerBoundPair c₁ c₂ (fun T => (num₁ T : ℝ)) (fun T => (num₂ T : ℝ)) (fun T => (denom T : ℝ)) + +namespace Assembly + +/-! ## Part E. The asymptotic wrappers (the only place filters appear) + +E1: the explicit error of Parts C–D is `o(N)` given the growth facts; E2: `o(N)` error ⇒ `ε`-form; +E3: `λ → 1⁻`; E4: dyadic summation `N₀*(T,2T) ⇒ N₀*(T)` (paper §6, end of proof of Thm A). -/ + +section Asymptotic +open Filter Asymptotics Topology + +/-- E2. An `o(N)` error term yields the `ε`-form. -/ +theorem eps_form_of_isLittleO {H₀ : ℝ} {N lower err : ℝ → ℝ} + (hmain : ∀ᶠ T in atTop, H₀ * N T - err T ≤ lower T) + (hN : ∀ᶠ T in atTop, 0 ≤ N T) (herr : err =o[atTop] N) : + EpsLowerBound (H₀) lower N := by + intro ε hε + have h := (herr.def hε).and (hmain.and hN) + obtain ⟨T₀, hT₀⟩ := Filter.eventually_atTop.mp h + refine ⟨T₀, fun T hT => ?_⟩ + obtain ⟨h1, h2, h3⟩ := hT₀ T hT + rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg h3] at h1 + have : err T ≤ ε * N T := (le_abs_self _).trans h1 + linarith + +/-- E1. The explicit error term of `N0star_lower_H` is `o(N)`, given: +`N → ∞`; `R₁, R₂, N(I′∖I) = o(N)`; `B → 0`; `cλ = 1/λ₁ + λ₁/3` eventually in `[0, K]`. -/ +theorem err_isLittleO {N R₁ R₂ NII B cl : ℝ → ℝ} {K : ℝ} + (hN : Tendsto N atTop atTop) + (hR₁ : R₁ =o[atTop] N) (hR₂ : R₂ =o[atTop] N) (hNII : NII =o[atTop] N) + (hB : Tendsto B atTop (𝓝 0)) + (hcl : ∀ᶠ T in atTop, 0 ≤ cl T ∧ cl T ≤ K) : + (fun T => 4 * R₁ T + R₂ T + 3 * NII T + + B T * (4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T)) =o[atTop] N := by + have hB1 : B =o[atTop] (fun _ => (1:ℝ)) := (isLittleO_one_iff ℝ).2 hB + -- the bracket is O(N) + have hbr : (fun T => 4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T) =O[atTop] N := by + have hK : 0 ≤ K := by + obtain ⟨T, hT⟩ := hcl.exists; exact hT.1.trans hT.2 + refine IsBigO.of_bound (7 + 2 * K) ?_ + have hN1 : ∀ᶠ T in atTop, 1 ≤ N T := hN.eventually_ge_atTop 1 + have hR₂1 : ∀ᶠ T in atTop, ‖R₂ T‖ ≤ 1 * ‖N T‖ := hR₂.def one_pos + have hBb : ∀ᶠ T in atTop, ‖B T‖ ≤ 1 * ‖(1:ℝ)‖ := hB1.def one_pos + filter_upwards [hN1, hR₂1, hBb, hcl] with T h1 h2 h3 h4 + have hN0 : 0 ≤ N T := by linarith + simp only [Real.norm_eq_abs, abs_of_nonneg hN0, one_mul] at h2 + simp only [norm_one, mul_one, Real.norm_eq_abs] at h3 + have hin : cl T * N T + R₂ T ≤ ((K + 1) * N T) ^ 2 := by + have : R₂ T ≤ N T := (le_abs_self _).trans h2 + have hclN : cl T * N T ≤ K * N T := mul_le_mul_of_nonneg_right h4.2 hN0 + have hKN : 1 ≤ (K + 1) * N T := by nlinarith + calc cl T * N T + R₂ T ≤ (K + 1) * N T := by linarith + _ ≤ (K + 1) * N T * ((K + 1) * N T) := + le_mul_of_one_le_right (mul_nonneg (by linarith) hN0) hKN + _ = ((K + 1) * N T) ^ 2 := by ring + have hs : Real.sqrt (cl T * N T + R₂ T) ≤ (K + 1) * N T := + Real.sqrt_le_iff.mpr ⟨by positivity, hin⟩ + simp only [Real.norm_eq_abs, abs_of_nonneg hN0] + refine (abs_le.mpr ⟨?_, ?_⟩) + · nlinarith [Real.sqrt_nonneg (cl T * N T + R₂ T), abs_le.mp h3] + · nlinarith [abs_le.mp h3] + have hlast : (fun T => B T * (4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T)) =o[atTop] N := by + simpa using hB1.mul_isBigO hbr + exact (((hR₁.const_mul_left 4).add hR₂).add (hNII.const_mul_left 3)).add hlast + +/-- **sup over λ ∈ [1/2, 1)** (the common `λ → 1⁻` step): if the `ε`-form holds with constant `c(λ)` +for every `λ ∈ [1/2, 1)` and `C − η ≤ c(λ)` for some such `λ`, for every `η > 0`, then it holds with constant `C`. -/ +theorem eps_form_sup_half {c : ℝ → ℝ} {C : ℝ} + (hc : ∀ η > (0:ℝ), ∃ lam : ℝ, 1 / 2 ≤ lam ∧ lam < 1 ∧ C - η ≤ c lam) + {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) + (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → + EpsLowerBound (c lam) lower N) : + EpsLowerBound (C) lower N := by + intro ε hε + obtain ⟨lam, h0, h1, h2⟩ := hc (ε / 2) (by linarith) + obtain ⟨T₀, hT₀⟩ := h lam h0 h1 (ε / 2) (by linarith) + exact ⟨T₀, fun T hT => le_trans (mul_le_mul_of_nonneg_right (by linarith) (hN T)) (hT₀ T hT)⟩ + +/-- a point of `[1/2, 1)` within `δ` of `1`. -/ +lemma exists_lam_near_one {δ : ℝ} (hδ : 0 < δ) : ∃ lam : ℝ, 1 / 2 ≤ lam ∧ lam < 1 ∧ 1 - lam ≤ δ := + ⟨max (1 / 2) (1 - δ), le_max_left _ _, max_lt (by norm_num) (by linarith), + by have := le_max_right (1 / 2) (1 - δ); linarith⟩ + +/-- E3. The `λ → 1⁻` step: if for every `λ ∈ [1/2, 1)` the `ε`-form holds with +constant `H(λ)`, then it holds with constant `2/3 = sup_{λ<1} H(λ)`. -/ +theorem eps_form_twoThirds {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) + (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → + EpsLowerBound (Hfun lam) lower N) : + EpsLowerBound (2 / 3) lower N := + eps_form_sup_half (fun η hη => by + obtain ⟨lam, h1, h2, h3⟩ := exists_lam_near_one (show 0 < 3 * η / 5 by linarith) + exact ⟨lam, h1, h2, by linarith [Hfun_ge_near_one lam h1 h2.le]⟩) hN h + +/-- E4. **Dyadic summation** (the paper §6, end of the proof of Thm A: "the statement for +`N₀*(T)/N(T)` by summing over dyadic intervals: given `ε>0` choose `T₁` with +`N₀*(t,2t) ≥ (2/3−ε)N(t,2t)` for `t ≥ T₁`; for `T ≥ 2T₁` and `J` maximal with `T2^{−J} ≥ T₁`, +`N₀*(T) ≥ Σ_{j=1}^{J} N₀*(T2^{−j},T2^{−j+1}) ≥ (2/3−ε)(N(T)−N(T2^{−J})) ≥ (2/3−ε)N(T) − O_ε(1)`.") +Abstract form: `f, g` interval-additive and nonnegative, `g(0,T) → ∞`. -/ +theorem dyadic {f g : ℝ → ℝ → ℝ} {c : ℝ} + (hf_add : ∀ a b c : ℝ, a ≤ b → b ≤ c → f a c = f a b + f b c) + (hg_add : ∀ a b c : ℝ, a ≤ b → b ≤ c → g a c = g a b + g b c) + (hf_nn : ∀ a b, 0 ≤ f a b) (hg_nn : ∀ a b, 0 ≤ g a b) + (hg_top : Tendsto (fun T => g 0 T) atTop atTop) + (h : EpsLowerBound c (fun t => f t (2 * t)) (fun t => g t (2 * t))) : + EpsLowerBound c (fun T => f 0 T) (fun T => g 0 T) := by + intro ε hε + by_cases hc : c - ε / 2 < 0 + · refine ⟨0, fun T _ => ?_⟩ + have := hg_nn 0 T; have := hf_nn 0 T + nlinarith + have hc : 0 ≤ c - ε / 2 := not_lt.mp hc + obtain ⟨T₁', hT₁'⟩ := h (ε / 2) (by linarith) + -- WLOG T₁ ≥ 1 + set T₁ := max T₁' 1 with hT₁def + have hT₁ : ∀ t ≥ T₁, (c - ε / 2) * g t (2 * t) ≤ f t (2 * t) := + fun t ht => hT₁' t ((le_max_left _ _).trans ht) + have hT₁pos : 0 < T₁ := lt_of_lt_of_le one_pos (le_max_right _ _) + -- g is monotone in the second argument + have hg_mono : ∀ a b b', a ≤ b → b ≤ b' → g a b ≤ g a b' := by + intro a b b' hab hbb'; rw [hg_add a b b' hab hbb']; linarith [hg_nn b b'] + -- induction: f(t, 2^n t) ≥ (c − ε/2) g(t, 2^n t) for t ≥ T₁ + have key : ∀ n : ℕ, ∀ t ≥ T₁, (c - ε / 2) * g t (2 ^ n * t) ≤ f t (2 ^ n * t) := by + intro n + induction n with + | zero => + intro t ht + have hf0 : f t t = 0 := by have := hf_add t t t le_rfl le_rfl; linarith + have hg0 : g t t = 0 := by have := hg_add t t t le_rfl le_rfl; linarith + simp [hf0, hg0] + | succ n ih => + intro t ht + have ht0 : 0 ≤ t := hT₁pos.le.trans ht + have h2n : (1:ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num) + have hmid : t ≤ 2 ^ n * t := by nlinarith + have hmid' : 2 ^ n * t ≤ 2 ^ (n + 1) * t := by rw [pow_succ]; nlinarith + rw [hf_add t (2 ^ n * t) (2 ^ (n + 1) * t) hmid hmid', + hg_add t (2 ^ n * t) (2 ^ (n + 1) * t) hmid hmid'] + have hstep := hT₁ (2 ^ n * t) (ht.trans hmid) + have e : 2 * (2 ^ n * t) = 2 ^ (n + 1) * t := by rw [pow_succ]; ring + rw [e] at hstep + have := ih t ht + linarith + -- choose T₀ so that (ε/2) g(0,T) ≥ (c − ε/2) g(0, 2T₁) for T ≥ T₀, and T₀ ≥ T₁ + obtain ⟨T₂, hT₂⟩ := Filter.eventually_atTop.mp + (hg_top.eventually_ge_atTop ((c - ε / 2) * g 0 (2 * T₁) * (2 / ε))) + refine ⟨max T₁ T₂, fun T hT => ?_⟩ + have hTT₁ : T₁ ≤ T := (le_max_left _ _).trans hT + have hT0 : 0 ≤ T := hT₁pos.le.trans hTT₁ + -- find n with 2^n T₁ ≤ T < 2^(n+1) T₁ + obtain ⟨n, hn1, hn2⟩ := exists_nat_pow_near (x := T / T₁) + ((one_le_div hT₁pos).2 hTT₁) one_lt_two + set t := T / 2 ^ n with htdef + have h2n : (0:ℝ) < 2 ^ n := by positivity + have htT₁ : T₁ ≤ t := by + rw [htdef, le_div_iff₀ h2n]; rw [le_div_iff₀ hT₁pos] at hn1; linarith + have ht2T₁ : t ≤ 2 * T₁ := by + rw [htdef, div_le_iff₀ h2n]; rw [div_lt_iff₀ hT₁pos, pow_succ] at hn2; linarith + have hTt : 2 ^ n * t = T := by rw [htdef]; field_simp + have ht0 : 0 ≤ t := hT₁pos.le.trans htT₁ + have htT : t ≤ T := by rw [← hTt]; nlinarith [one_le_pow₀ (M₀ := ℝ) (a := 2) (n := n) (by norm_num)] + have hk := key n t htT₁ + rw [hTt] at hk + -- f(0,T) ≥ f(t,T) ≥ (c−ε/2) g(t,T) = (c−ε/2)(g(0,T) − g(0,t)) ≥ (c−ε/2) g(0,T) − (c−ε/2) g(0,2T₁) + have hf0T : f t T ≤ f 0 T := by rw [hf_add 0 t T ht0 htT]; linarith [hf_nn 0 t] + have hgsplit : g t T = g 0 T - g 0 t := by rw [hg_add 0 t T ht0 htT]; ring + have hg0t : g 0 t ≤ g 0 (2 * T₁) := hg_mono 0 t (2 * T₁) ht0 ht2T₁ + have hbig : (c - ε / 2) * g 0 (2 * T₁) * (2 / ε) ≤ g 0 T := hT₂ T ((le_max_right _ _).trans hT) + have hbig' : (c - ε / 2) * g 0 (2 * T₁) ≤ ε / 2 * g 0 T := by + have := mul_le_mul_of_nonneg_left hbig (by linarith : 0 ≤ ε / 2) + calc (c - ε / 2) * g 0 (2 * T₁) = ε / 2 * ((c - ε / 2) * g 0 (2 * T₁) * (2 / ε)) := by + field_simp + _ ≤ ε / 2 * g 0 T := this + calc (c - ε) * g 0 T = (c - ε / 2) * g 0 T - ε / 2 * g 0 T := by ring + _ ≤ (c - ε / 2) * g 0 T - (c - ε / 2) * g 0 (2 * T₁) := by linarith + _ ≤ (c - ε / 2) * (g 0 T - g 0 t) := by nlinarith + _ = (c - ε / 2) * g t T := by rw [hgsplit] + _ ≤ f t T := hk + _ ≤ f 0 T := hf0T + +end Asymptotic + +/-! ## Part F2. Growth lemmas for the explicit functions `l, L, X` and `N(T,2T)` under H-RvM -/ + +section Growth +open Filter Asymptotics Topology Real + +/-- `l(T) = log(T/2π) → ∞`. -/ +lemma tendsto_l_atTop : Tendsto l atTop atTop := + Real.tendsto_log_atTop.comp (tendsto_id.atTop_div_const (by positivity)) + +lemma eventually_l_pos : ∀ᶠ T in atTop, 0 < l T := tendsto_l_atTop.eventually_gt_atTop 0 + +lemma eventually_one_le_l : ∀ᶠ T in atTop, 1 ≤ l T := tendsto_l_atTop.eventually_ge_atTop 1 + +/-- `L = λ l → ∞` for `λ > 0`. -/ +lemma tendsto_L_atTop (P : Params) (hlam : 0 < P.lam) : Tendsto P.L atTop atTop := + tendsto_l_atTop.const_mul_atTop hlam + +/-- `log T = l T + log 2π` for `T > 0`. -/ +lemma log_eq_l_add {T : ℝ} (hT : 0 < T) : Real.log T = l T + Real.log (2 * π) := by + rw [l, Real.log_div hT.ne' (by positivity)]; ring + +/-- `log T ≤ 2 l T` eventually. -/ +lemma eventually_log_le_two_l : ∀ᶠ T in atTop, Real.log T ≤ 2 * l T := by + filter_upwards [tendsto_l_atTop.eventually_ge_atTop (Real.log (2 * π)), eventually_gt_atTop 0] + with T h1 h2 + rw [log_eq_l_add h2]; linarith + +lemma eventually_log_nonneg : ∀ᶠ T in atTop, 0 ≤ Real.log T := + Real.tendsto_log_atTop.eventually_ge_atTop 0 + +/-- `T l(T) → ∞`. -/ +lemma tendsto_Tl_atTop : Tendsto (fun T => T * l T) atTop atTop := + tendsto_id.atTop_mul_atTop₀ tendsto_l_atTop + +/-- H-RvM ⇒ `N(T,2T) ≥ T l /(4π)` eventually. ([eq:RvM]: `N = Tℓ₁/2π + O(log T)`, `ℓ₁ ≥ l`.) -/ +lemma eventually_N_ge (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) : + ∀ᶠ T in atTop, T * l T / (4 * π) ≤ (Z.N T (2 * T) : ℝ) := by + obtain ⟨C, T₀, h⟩ := hR.main + filter_upwards [eventually_ge_atTop T₀, eventually_log_le_two_l, eventually_log_nonneg, + eventually_l_pos, eventually_ge_atTop (16 * π * |C|), eventually_ge_atTop 0] with T hT hlog hlog0 hl hTC hT0 + have h1 := (abs_le.mp (h T hT)).1 + have hc := c₀_pos + have hℓ : l T ≤ ell1 T := by rw [ell1_eq]; linarith + have h2 : -(C * Real.log T) ≥ -(|C| * (2 * l T)) := by + have : C * Real.log T ≤ |C| * Real.log T := mul_le_mul_of_nonneg_right (le_abs_self C) hlog0 + nlinarith [abs_nonneg C] + have h3 : T / (2 * π) * l T ≤ T / (2 * π) * ell1 T := + mul_le_mul_of_nonneg_left hℓ (by positivity) + -- N ≥ T l/2π − 2|C| l ≥ T l/4π once T ≥ 16π|C|... (T l/(4π) ≥ 2|C| l ⟸ T ≥ 8π|C|) + have h4 : 2 * |C| * l T ≤ T * l T / (4 * π) := by + rw [le_div_iff₀ (by positivity)] + nlinarith [abs_nonneg C, Real.pi_pos] + have : T / (2 * π) * l T = 2 * (T * l T / (4 * π)) := by ring + linarith + +/-- H-RvM ⇒ `N(T,2T) → ∞`. -/ +lemma tendsto_N_atTop (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) : + Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop := + tendsto_atTop_mono' _ (eventually_N_ge Z hR) (tendsto_Tl_atTop.atTop_div_const (by positivity)) + +/-- `T l = O(N)` under H-RvM, so `o(T l) ⊆ o(N)`. -/ +lemma isLittleO_N_of_isLittleO_Tl (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) {f : ℝ → ℝ} + (hf : f =o[atTop] fun T => T * l T) : f =o[atTop] fun T => (Z.N T (2 * T) : ℝ) := by + refine hf.trans_isBigO (IsBigO.of_bound (4 * π) ?_) + filter_upwards [eventually_N_ge Z hR, eventually_ge_atTop 0, eventually_l_pos] with T h hT hl + rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (by positivity), + abs_of_nonneg (by positivity)] + have := mul_le_mul_of_nonneg_left h (by positivity : (0:ℝ) ≤ 4 * π) + calc T * l T = 4 * π * (T * l T / (4 * π)) := by field_simp + _ ≤ 4 * π * (Z.N T (2 * T) : ℝ) := this + +/-- `l = o(T l)`. -/ +lemma isLittleO_l_Tl : l =o[atTop] fun T => T * l T := by + refine (isLittleO_iff).2 fun c hc => ?_ + filter_upwards [eventually_ge_atTop c⁻¹, eventually_l_pos, eventually_gt_atTop 0] with T hT hl hT0 + rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_pos hl, abs_of_pos (by positivity)] + have : 1 ≤ c * T := by + have := mul_le_mul_of_nonneg_left hT hc.le; rwa [mul_inv_cancel₀ hc.ne'] at this + nlinarith + +/-- `log T = o(T l)`. -/ +lemma isLittleO_log_Tl : Real.log =o[atTop] fun T => T * l T := by + refine IsBigO.trans_isLittleO (IsBigO.of_bound 2 ?_) isLittleO_l_Tl + filter_upwards [eventually_log_le_two_l, eventually_log_nonneg, eventually_l_pos] with T h h0 hl + rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg h0, abs_of_pos hl]; exact h + +/-- `√T · l = o(T l)`. -/ +lemma isLittleO_sqrt_mul_l_Tl : (fun T => Real.sqrt T * l T) =o[atTop] fun T => T * l T := by + refine (isLittleO_iff).2 fun c hc => ?_ + filter_upwards [eventually_ge_atTop ((c⁻¹) ^ 2), eventually_l_pos, eventually_gt_atTop 0] + with T hT hl hT0 + rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (by positivity), abs_of_pos (by positivity)] + have hs : c⁻¹ ≤ Real.sqrt T := by + rw [show c⁻¹ = Real.sqrt ((c⁻¹) ^ 2) by rw [Real.sqrt_sq (by positivity)]] + exact Real.sqrt_le_sqrt hT + have h1 : 1 ≤ c * Real.sqrt T := by + have := mul_le_mul_of_nonneg_left hs hc.le; rwa [mul_inv_cancel₀ hc.ne'] at this + have h2 : Real.sqrt T * Real.sqrt T = T := Real.mul_self_sqrt hT0.le + have h3 : Real.sqrt T ≤ c * T := by + nlinarith [mul_nonneg (sub_nonneg.2 h1) (Real.sqrt_nonneg T)] + calc Real.sqrt T * l T ≤ c * T * l T := mul_le_mul_of_nonneg_right h3 hl.le + _ = c * (T * l T) := by ring + +/-- From `N(I′∖I) ≪ √T · l` and any `o(T l) ⊆ o(N)` bridge: `N(I′∖I) = o(N)`. -/ +lemma isLittleO_NII_of (Z : ZeroConfig) {N : ℝ → ℝ} + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → f =o[atTop] N) : + (fun T => (NII Z T : ℝ)) =o[atTop] N := by + obtain ⟨C, hII⟩ := hNII + have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by + refine IsBigO.of_bound C ?_ + filter_upwards [hII, eventually_l_pos] with T h hl + rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), + abs_of_nonneg (by positivity)] + simpa [mul_assoc] using h + exact hO.trans_isLittleO (hoTl _ isLittleO_sqrt_mul_l_Tl) + +/-- From `N(I′∖I) ≪ √T · l` and H-RvM: `N(I′∖I) = o(N)`. -/ +lemma isLittleO_NII_N (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) + (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) : + (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := + isLittleO_NII_of Z (N := fun T => (Z.N T (2 * T) : ℝ)) hNII + (fun _ hf => isLittleO_N_of_isLittleO_Tl Z hR hf) + +/-- `√X = (T/2π)^{λ/2}` ("`X = e^L = (T/2π)^λ`", §1 Notation). -/ +lemma sqrtX_eq (P : Params) {T : ℝ} (hT : 0 < T) : + Real.sqrt (P.X T) = (T / (2 * π)) ^ (P.lam / 2) := by + rw [Params.X, ← Real.exp_half, Params.L, l, Real.rpow_def_of_pos (by positivity)] + congr 1; ring + +lemma tendsto_rpow_halflam_sub_one (P : Params) (hlam1 : P.lam ≤ 1) : + Tendsto (fun T : ℝ => T ^ (P.lam / 2 - 1)) atTop (𝓝 0) := by + have : Tendsto (fun T : ℝ => T ^ (-(1 - P.lam / 2))) atTop (𝓝 0) := + tendsto_rpow_neg_atTop (by linarith) + simpa [neg_sub] using this + +/-- `√X = (T/2π)^{λ/2} = o(T l)` for `λ ≤ 1` (indeed for `λ < 2`). -/ +lemma isLittleO_sqrtX_Tl (P : Params) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) : + (fun T => Real.sqrt (P.X T)) =o[atTop] fun T => T * l T := by + refine (isLittleO_iff).2 fun c hc => ?_ + filter_upwards [(tendsto_rpow_halflam_sub_one P hlam1).eventually (eventually_le_nhds hc), + eventually_gt_atTop 0, eventually_one_le_l] with T hTc hT hl + rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _), + abs_of_nonneg (by positivity), sqrtX_eq P hT] + have h2π : T / (2 * π) ≤ T := div_le_self hT.le (by linarith [Real.pi_gt_three]) + calc (T / (2 * π)) ^ (P.lam / 2) ≤ T ^ (P.lam / 2) := + Real.rpow_le_rpow (by positivity) h2π (by linarith) + _ = T * T ^ (P.lam / 2 - 1) := by + conv_lhs => rw [show P.lam / 2 = 1 + (P.lam / 2 - 1) by ring] + rw [Real.rpow_add hT, Real.rpow_one] + _ ≤ T * c := mul_le_mul_of_nonneg_left hTc hT.le + _ = c * T * 1 := by ring + _ ≤ c * T * l T := mul_le_mul_of_nonneg_left hl (by positivity) + _ = c * (T * l T) := by ring + +/-- `l · T^{λ/2−1} / L = T^{λ/2−1}/λ → 0` (the size of `θ₀/L`, prop:tail). -/ +lemma tendsto_theta_over_L (P : Params) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) : + Tendsto (fun T => l T * T ^ (P.lam / 2 - 1) / P.L T) atTop (𝓝 0) := by + have h1 := tendsto_rpow_halflam_sub_one P hlam1 + have h2 : (fun T => l T * T ^ (P.lam / 2 - 1) / P.L T) =ᶠ[atTop] + fun T => P.lam⁻¹ * T ^ (P.lam / 2 - 1) := by + filter_upwards [eventually_l_pos] with T hl + simp only [Params.L]; field_simp + rw [tendsto_congr' h2] + simpa using h1.const_mul P.lam⁻¹ + +/-- `cλ = 1/λ₁ + λ₁/3` is eventually in `[0, 2/λ + 1/3]` (since `λ/2 ≤ λ₁ ≤ λ ≤ 1` once `l ≥ c₀`). -/ +lemma eventually_clam_bounds (P : Params) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) : + ∀ᶠ T in atTop, 0 ≤ 1 / P.lam1 T + P.lam1 T / 3 ∧ 1 / P.lam1 T + P.lam1 T / 3 ≤ 2 / P.lam + 1 / 3 := by + filter_upwards [tendsto_l_atTop.eventually_ge_atTop 1] with T hl + have hlpos : 0 < l T := by linarith + have hc := c₀_pos; have hc1 := c₀_lt_one + have hl1pos := lam1_pos P T hlam hlpos + have hl1le := lam1_le P T hlam.le hlpos + have hhalf : P.lam / 2 ≤ P.lam1 T := by + rw [lam1_eq, le_div_iff₀ (by linarith)]; nlinarith + refine ⟨by positivity, ?_⟩ + have : 1 / P.lam1 T ≤ 2 / P.lam := by + rw [div_le_div_iff₀ hl1pos hlam]; linarith + linarith + +/-- `a → 1` from [eq:abdef] `1 − 2w/L ≤ a ≤ 1` and `L → ∞`. -/ +lemma tendsto_a_one (P : Params) (hlam : 0 < P.lam) + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) : + Tendsto P.a atTop (𝓝 1) := by + have hlow : Tendsto (fun T => 1 - 2 * P.w / P.L T) atTop (𝓝 1) := by + have : Tendsto (fun T => 2 * P.w / P.L T) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_L_atTop P hlam) + simpa using (tendsto_const_nhds (x := (1:ℝ))).sub this + exact tendsto_of_tendsto_of_tendsto_of_le_of_le' hlow tendsto_const_nhds + (ha.mono fun T h => h.1) (ha.mono fun T h => h.2) + +end Growth + +/-! ### F5. `𝓔_T → 0` (paper [thm:traces]: "`𝓔_T ≪_λ w/L + T^{λ−1} log l` (λ<1), `≪ w/L + log l/l` (λ=1)") -/ + +section CalE +open Filter Topology Real + +/-- `𝓔_T ≥ 0` eventually (all three summands are nonnegative once `L > 0`, `l ≥ 1`, `T > 0`). -/ +lemma eventually_calE_nonneg (P : Params) (hlam : 0 < P.lam) (hw : 0 ≤ P.w) : + ∀ᶠ T in atTop, 0 ≤ P.calE T := by + filter_upwards [eventually_one_le_l, eventually_gt_atTop (0:ℝ)] with T hl hT + have hL : 0 < P.L T := by simp only [Params.L]; nlinarith + have hlog : 0 ≤ Real.log (l T) := Real.log_nonneg hl + have hX : 0 < P.X T := Real.exp_pos _ + simp only [Params.calE] + positivity + +/-- `X = (T/2π)^λ ≤ T` once `T ≥ 2π` (for `λ ≤ 1`). -/ +lemma X_le_T (P : Params) (hlam1 : P.lam ≤ 1) {T : ℝ} (hT : 2 * π ≤ T) : P.X T ≤ T := by + have hπ : 0 < 2 * π := by positivity + have hb : 1 ≤ T / (2 * π) := by rwa [le_div_iff₀ hπ, one_mul] + have hX : P.X T = (T / (2 * π)) ^ P.lam := by + rw [Params.X, Params.L, l, Real.rpow_def_of_pos (by positivity)]; ring_nf + rw [hX] + calc (T / (2 * π)) ^ P.lam ≤ (T / (2 * π)) ^ (1:ℝ) := Real.rpow_le_rpow_of_exponent_le hb hlam1 + _ = T / (2 * π) := Real.rpow_one _ + _ ≤ T := div_le_self (by linarith) (by linarith [Real.pi_gt_three]) + +/-- **`𝓔_T → 0`** as `T → ∞`, for fixed `0 < λ ≤ 1` and fixed `w ≥ 0` +(`𝓔_T := w/L + (l²+X) log l/(Tl) + T^{λ/2−1}`, [thm:traces]). Bound used: +`𝓔_T ≤ w/L + (log T)²/T + log l/l + T^{λ/2−1}` for `T ≥ 2π`, `l ≥ 1`. -/ +theorem calE_tendsto_zero (P : Params) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) (hw : 0 ≤ P.w) : + Tendsto P.calE atTop (𝓝 0) := by + have h1 : Tendsto (fun T => P.w / P.L T) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_L_atTop P hlam) + have h2 : Tendsto (fun T : ℝ => Real.log T ^ 2 / T) atTop (𝓝 0) := by + have := Real.tendsto_pow_log_div_mul_add_atTop 1 0 2 one_ne_zero + simpa using this + have h3 : Tendsto (fun T => Real.log (l T) / l T) atTop (𝓝 0) := by + have : Tendsto (fun x : ℝ => Real.log x / x) atTop (𝓝 0) := by + simpa using Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 one_ne_zero + exact this.comp tendsto_l_atTop + have h4 := tendsto_rpow_halflam_sub_one P hlam1 + have hsum : Tendsto (fun T => P.w / P.L T + (Real.log T ^ 2 / T + Real.log (l T) / l T) + + T ^ (P.lam / 2 - 1)) atTop (𝓝 0) := by + simpa using (h1.add (h2.add h3)).add h4 + refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hsum + (eventually_calE_nonneg P hlam hw) ?_ + filter_upwards [eventually_one_le_l, eventually_ge_atTop (2 * π)] with T hl hT2π + have hT : 0 < T := lt_of_lt_of_le (by positivity) hT2π + have hlpos : 0 < l T := by linarith + have hlogl : 0 ≤ Real.log (l T) := Real.log_nonneg hl + have hlogl' : Real.log (l T) ≤ l T := by linarith [Real.log_le_sub_one_of_pos hlpos] + have hllog : l T ≤ Real.log T := by + rw [log_eq_l_add hT] + have : 0 ≤ Real.log (2 * π) := Real.log_nonneg (by linarith [Real.pi_gt_three]) + linarith + have hX := X_le_T P hlam1 hT2π + have hXpos : 0 ≤ P.X T := (Real.exp_pos _).le + -- the middle term + have hmid : (l T ^ 2 + P.X T) * Real.log (l T) / (T * l T) + ≤ Real.log T ^ 2 / T + Real.log (l T) / l T := by + have e : (l T ^ 2 + P.X T) * Real.log (l T) / (T * l T) + = l T * Real.log (l T) / T + P.X T * Real.log (l T) / (T * l T) := by + field_simp + rw [e] + gcongr ?_ + ?_ + · -- l log l / T ≤ (log T)²/T + apply div_le_div_of_nonneg_right _ hT.le + calc l T * Real.log (l T) ≤ l T * l T := mul_le_mul_of_nonneg_left hlogl' hlpos.le + _ ≤ Real.log T * Real.log T := mul_le_mul hllog hllog hlpos.le (hlpos.le.trans hllog) + _ = Real.log T ^ 2 := by ring + · -- X log l /(T l) ≤ log l / l + rw [div_le_div_iff₀ (by positivity) hlpos] + calc P.X T * Real.log (l T) * l T ≤ T * Real.log (l T) * l T := by gcongr + _ = Real.log (l T) * (T * l T) := by ring + simp only [Params.calE] + linarith + +end CalE + +end Assembly +end Zeta23 + +end diff --git a/zeta23/Zeta23/Assembly/Matrix.lean b/zeta23/Zeta23/Assembly/Matrix.lean new file mode 100644 index 0000000000..e6128d2969 --- /dev/null +++ b/zeta23/Zeta23/Assembly/Matrix.lean @@ -0,0 +1,463 @@ +/- +Copyright (c) 2026 Anthropic, PBC. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +SPDX-License-Identifier: Apache-2.0 +-/ +/- +Part of the Zeta23 formalization of + "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". +-/ +import Zeta23.LinAlg +import Zeta23.Defs +import Mathlib.Analysis.Matrix.Normed +import Mathlib.Analysis.Complex.ExponentialBounds + +/-! +# §4 "The counting inequalities" and §6 (Parts A–D): matrix, `H`/`F`, fixed-`T`, and unit-conversion lemmas + +Reference: the paper, labels `prop:zeroside-rank`, `eq:zeroside-rank`, +`prop:zeroside`, `eq:zeroside`, `eq:zeroside2`, `eq:Fdef`, `eq:hatunits`, and `sec:proofs`. + +* Part A (`MatrixLevel`, `Frob`, `MatrixLevel2`): Hermitian matrix counting inequalities and + Frobenius-norm perturbation bounds (`RCLike`-generic). +* Part B (`HF`): the functions `H`, `F` and the `λ₁` vs `λ` estimates. +* Part C (`FixedT`): fixed-`T` explicit inequalities for Theorem A. +* Part D (`Units`, `TraceInputs`): unit conversion `Ĝ ↔ G̃` and explicit trace/Frobenius bounds. +-/ + +noncomputable section + +open Matrix Finset RHLinalg +open scoped ComplexOrder + +namespace Zeta23 +namespace Assembly + +/-! ## Part A. Matrix-level counting inequalities (paper §4, "The counting inequalities") -/ + +section MatrixLevel + +variable {𝕜 : Type*} [RCLike 𝕜] +variable {n : Type*} [Fintype n] [DecidableEq n] + +/-- For any Hermitian matrix, `n₊(A) ≤ rank A` (positive eigenvalues are nonzero eigenvalues). +Used in prop:zeroside: "`n₊^θ(G̃) ≤ n₊(Ã) ≤ rank à ≤ #𝒵(I′)`". -/ +lemma posIndex_le_rank {A : Matrix n n 𝕜} (hA : A.IsHermitian) : posIndex hA ≤ A.rank := by + rw [hA.rank_eq_card_non_zero_eigs, Fintype.card_subtype] + unfold posIndex + apply card_le_card + intro i + simp only [mem_filter, mem_univ, true_and] + exact ne_of_gt + +/-- **prop:zeroside-rank, first assertion** (the paper, `prop:zeroside-rank`): +"`s₁ + s₂ ≥ 4 tr  − 2 N(I′) − ‖Â‖_F²`". + +Stated over the abstract output of prop:block(ii) — ` = P + Q`, `P ⪰ 0`, `rank P ≤ r` +(paper: `r = s₁+s₂`), `tr P ≤ N_on(I′)`, `Q` Hermitian with `n₊(Q) ≤ b` (paper: `b = p`) — together +with the counting fact `N_on(I′) + 2p ≤ N(I′)` ([eq:Ncount] and the line after it). Proof exactly as +in the paper: lem:ranktrace at `c = 2` (`RHLinalg.rank_trace_ineq_two`) gives +`r ≥ 2 tr P + 4 tr Q − 4b − ‖P+Q‖_F² = 4 tr  − 2(tr P + 2b) − ‖Â‖_F²`, and `tr P + 2b ≤ N(I′)`. + +UNITS: hat units ` = A/(aL²)` only [eq:hatunits]. -/ +theorem zeroside_rank_core {Ahat P Q : Matrix n n 𝕜} + (hPQ : Ahat = P + Q) (hP : P.PosSemidef) (hQ : Q.IsHermitian) + {r b : ℕ} (hrank : P.rank ≤ r) (hpos : posIndex hQ ≤ b) + {Non NI' : ℝ} (htrP : rtrace P ≤ Non) (hNcount : Non + 2 * b ≤ NI') : + 4 * rtrace Ahat - 2 * NI' - frobSq Ahat ≤ r := by + have h := rank_trace_ineq_two hP hQ hrank hpos + subst hPQ + rw [rtrace_add] + linarith + +end MatrixLevel + +/-! ### Frobenius-norm bookkeeping + +`RHLinalg.frobSq A = Re tr(Aᴴ A)`. We identify it with the square of Mathlib's (scoped) Frobenius +norm, to get the triangle inequality `‖Ĝ − Ê‖_F ≤ ‖Ĝ‖_F + ‖Ê‖_F` used in prop:zeroside-rank. -/ + +section Frob +open scoped Matrix.Norms.Frobenius + +variable {𝕜 : Type*} [RCLike 𝕜] +variable {n : Type*} [Fintype n] + +lemma frobSq_eq_sum_norm_sq (A : Matrix n n 𝕜) : frobSq A = ∑ i, ∑ j, ‖A i j‖ ^ 2 := by + unfold frobSq + simp only [trace, diag_apply, mul_apply, conjTranspose_apply, map_sum, RCLike.star_def] + rw [Finset.sum_comm] + refine sum_congr rfl fun i _ => sum_congr rfl fun j _ => ?_ + rw [RCLike.conj_mul, ← RCLike.ofReal_pow, RCLike.ofReal_re] + +/-- `RHLinalg.frobSq A = ‖A‖_F ²` (Mathlib's Frobenius norm, scoped instance). -/ +lemma frobSq_eq_norm_sq (A : Matrix n n 𝕜) : frobSq A = ‖A‖ ^ 2 := by + rw [frobSq_eq_sum_norm_sq, frobenius_norm_def] + simp_rw [Real.rpow_two] + rw [← Real.sqrt_eq_rpow, Real.sq_sqrt (by positivity)] + +lemma frobSq_nonneg (A : Matrix n n 𝕜) : 0 ≤ frobSq A := by + rw [frobSq_eq_sum_norm_sq]; positivity + +/-- `‖A‖_F = √(frobSq A)`. -/ +lemma norm_eq_sqrt_frobSq (A : Matrix n n 𝕜) : ‖A‖ = Real.sqrt (frobSq A) := by + rw [frobSq_eq_norm_sq, Real.sqrt_sq (norm_nonneg _)] + +/-- Triangle inequality in the form used by prop:zeroside-rank: +`‖G − E‖_F² ≤ (‖G‖_F + ‖E‖_F)²`, written with `frobSq` and `√`. -/ +lemma frobSq_sub_le (G E : Matrix n n 𝕜) : + frobSq (G - E) ≤ (Real.sqrt (frobSq G) + Real.sqrt (frobSq E)) ^ 2 := by + rw [frobSq_eq_norm_sq, ← norm_eq_sqrt_frobSq, ← norm_eq_sqrt_frobSq] + exact pow_le_pow_left₀ (norm_nonneg _) (norm_sub_le G E) 2 + +/-- **prop:zeroside-rank, perturbation step** (proof of `prop:zeroside-rank` in the paper), +parameterized by `c ≥ 0` (`c = 4` for `N₀*`/`N₀ˢ`, `c = 6` for `2·N_d`): +with ` = Ĝ − Ê` and `B ≥ 0` bounding `|tr Ê|` and `‖Ê‖_F`, +`c tr  − ‖Â‖_F² ≥ c tr Ĝ − ‖Ĝ‖_F² − B (c + 2‖Ĝ‖_F + B)`. +UNITS: hat units. -/ +theorem ctr_sub_frobSq_perturb {Ghat Ahat Ehat : Matrix n n 𝕜} (c : ℝ) (hc : 0 ≤ c) + (hGAE : Ghat = Ahat + Ehat) {B : ℝ} (hB : 0 ≤ B) + (htrE : |rtrace Ehat| ≤ B) (hfrE : frobSq Ehat ≤ B ^ 2) : + c * rtrace Ghat - frobSq Ghat - B * (c + 2 * Real.sqrt (frobSq Ghat) + B) + ≤ c * rtrace Ahat - frobSq Ahat := by + have hA : Ahat = Ghat - Ehat := by rw [hGAE]; abel + have htr : rtrace Ahat = rtrace Ghat - rtrace Ehat := by rw [hA, rtrace_sub] + have hsqE : Real.sqrt (frobSq Ehat) ≤ B := Real.sqrt_le_iff.mpr ⟨hB, hfrE⟩ + have hsqG : 0 ≤ Real.sqrt (frobSq Ghat) := Real.sqrt_nonneg _ + have hfrA : frobSq Ahat ≤ (Real.sqrt (frobSq Ghat) + B) ^ 2 := by + rw [hA] + refine (frobSq_sub_le Ghat Ehat).trans ?_ + gcongr + have hGG : Real.sqrt (frobSq Ghat) ^ 2 = frobSq Ghat := Real.sq_sqrt (frobSq_nonneg _) + have htrE' : rtrace Ehat ≤ B := (le_abs_self _).trans htrE + nlinarith [hfrA, hGG, mul_le_mul_of_nonneg_left htrE' hc, htr] + +end Frob + +section MatrixLevel2 + +variable {𝕜 : Type*} [RCLike 𝕜] +variable {n : Type*} [Fintype n] [DecidableEq n] + +/-- **prop:zeroside, [eq:zeroside]** (the paper's `prop:zeroside`): "For every `θ ≥ θ₀`, +`s₁ ≥ 2 n₊^θ(G̃) − N(I′)` and `#𝒵(I′) ≥ n₊^θ(G̃)`." + +Inputs, as in the paper's proof: lem:weyl (`RHLinalg.weyl_posIndexAbove_le`, needs +`|λᵢ(Ẽ)| ≤ θ` for all `i`, which is `‖Ẽ‖ ≤ θ₀ ≤ θ`), prop:block(i) (`n₊(Ã) ≤ s₁+s₂+p`, +`rank à ≤ #𝒵(I′)`), and [eq:Ncount] (`N(I′) ≥ s₁ + 2s₂ + 2p`). +UNITS: tilde units `G̃ = à + Ẽ`. -/ +theorem zeroside_core {At Et : Matrix n n 𝕜} + (hAt : At.IsHermitian) (hEt : Et.IsHermitian) + {θ : ℝ} (hθ : ∀ i, |hEt.eigenvalues i| ≤ θ) + {s₁ s₂ p cardZ : ℕ} (hblock_pos : posIndex hAt ≤ s₁ + s₂ + p) (hblock_rank : At.rank ≤ cardZ) + {NI' : ℝ} (hNcount : (s₁ : ℝ) + 2 * s₂ + 2 * p ≤ NI') : + 2 * (posIndexAbove (hAt.add hEt) θ : ℝ) - NI' ≤ s₁ ∧ + posIndexAbove (hAt.add hEt) θ ≤ cardZ := by + have hweyl : posIndexAbove (hAt.add hEt) θ ≤ posIndex hAt := weyl_posIndexAbove_le hAt hEt hθ + refine ⟨?_, ?_⟩ + · have h1 : (posIndexAbove (hAt.add hEt) θ : ℝ) ≤ s₁ + s₂ + p := by + exact_mod_cast hweyl.trans hblock_pos + linarith + · exact hweyl.trans ((posIndex_le_rank hAt).trans hblock_rank) + +/-- `posIndexAbove` depends only on the matrix, not on the particular Hermitian-ness proof +(convenience for rewriting `G̃ = à + Ẽ`). -/ +lemma posIndexAbove_congr {A B : Matrix n n 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) + (h : A = B) (θ : ℝ) : posIndexAbove hA θ = posIndexAbove hB θ := by + subst h; rfl + +/-- **[eq:nplus-lower]** (proof of `thm:B` in the paper): lem:CS (`RHLinalg.cauchySchwarz_count`) +applied to `R = G̃`, `θ = θ₀`: if `tr G̃ > θ₀ d` then +`n₊^{θ₀}(G̃) ≥ (tr G̃ − θ₀ d)² / tr G̃²`. (`d = Fintype.card n`; `tr G̃² = ‖G̃‖_F² = frobSq G̃` for +Hermitian `G̃`. This is `cauchySchwarz_count` verbatim, re-exported under the paper's equation +name.) UNITS: tilde units. -/ +theorem nplus_lower {Gt : Matrix n n 𝕜} (hGt : Gt.IsHermitian) {θ : ℝ} (hθ : 0 ≤ θ) + (htr : θ * Fintype.card n < rtrace Gt) : + (rtrace Gt - θ * Fintype.card n) ^ 2 / frobSq Gt ≤ (posIndexAbove hGt θ : ℝ) := + cauchySchwarz_count hGt hθ htr + +end MatrixLevel2 + +/-! ## Part B. The functions `H`, `F` and the `λ₁` versus `λ` step (paper [eq:Fdef], §6) + +Vocabulary from `Zeta23/Defs.lean`: `l T = log(T/2π)`, `ell1 T = l T + 2 log 2 − 1`, `Hfun`, `Ffun`, +`P.L T = P.lam * l T`, `P.lam1 T = P.L T / ell1 T`. -/ + +section HF +open Real + +/-- The constant `c₀ := 2 log 2 − 1 = ℓ₁ − l` (paper §1 Notation / [eq:RvM]); `0 < c₀ < 1`. -/ +def c₀ : ℝ := 2 * Real.log 2 - 1 + +lemma c₀_pos : 0 < c₀ := by + have := Real.log_two_gt_d9; unfold c₀; linarith + +lemma c₀_lt_one : c₀ < 1 := by + have := Real.log_two_lt_d9; unfold c₀; linarith + +lemma ell1_eq (T : ℝ) : ell1 T = l T + c₀ := by simp only [ell1, c₀]; ring + +lemma ell1_pos {T : ℝ} (hl : 0 < l T) : 0 < ell1 T := by + rw [ell1_eq]; have := c₀_pos; linarith + +/-- `λ₁ = λ l / (l + c₀)` — unfolded form of `Params.lam1` [eq:ratio]. -/ +lemma lam1_eq (P : Params) (T : ℝ) : P.lam1 T = P.lam * l T / (l T + c₀) := by + simp only [Params.lam1, Params.L, ell1_eq] + +/-- `0 ≤ λ − λ₁`, i.e. `λ₁ ≤ λ` (paper §6: "`0 ≤ λ − λ₁ ≤ λ/l`"), for `l > 0`, `λ ≥ 0`. -/ +lemma lam1_le (P : Params) (T : ℝ) (hlam : 0 ≤ P.lam) (hl : 0 < l T) : P.lam1 T ≤ P.lam := by + rw [lam1_eq] + have hc := c₀_pos + rw [div_le_iff₀ (by linarith)] + nlinarith + +/-- `λ − λ₁ ≤ λ / l` (paper §6); indeed `λ − λ₁ = λ c₀/(l + c₀)` with `c₀ < 1`. -/ +lemma sub_lam1_le (P : Params) (T : ℝ) (hlam : 0 ≤ P.lam) (hl : 0 < l T) : + P.lam - P.lam1 T ≤ P.lam / l T := by + rw [lam1_eq] + have hc := c₀_pos; have hc1 := c₀_lt_one + have h1 : P.lam - P.lam * l T / (l T + c₀) = P.lam * c₀ / (l T + c₀) := by + field_simp; ring + rw [h1, div_le_div_iff₀ (by linarith) hl] + have h2 : c₀ * l T ≤ l T + c₀ := by nlinarith + calc P.lam * c₀ * l T = P.lam * (c₀ * l T) := by ring + _ ≤ P.lam * (l T + c₀) := mul_le_mul_of_nonneg_left h2 hlam + +lemma lam1_pos (P : Params) (T : ℝ) (hlam : 0 < P.lam) (hl : 0 < l T) : 0 < P.lam1 T := by + rw [lam1_eq]; have hc := c₀_pos; positivity + +/-- **`H(λ₁) ≥ H(λ) − 1/(λ l)`** (the paper §6, proof of Thm A: "Since `H′(x) = x⁻² − 1/3 ∈ (0,∞)` +is decreasing on `(0,1]` and `0 ≤ λ − λ₁ ≤ λ/l`, we have `H(λ₁) ≥ H(λ) − 1/(λl)`"). +We prove it via the exact identity `H(λ) − H(λ₁) = c₀/(λ l) − (λ − λ₁)/3` and `c₀ = 2 log 2 − 1 < 1`. +(Note `λ₁ = L/ℓ₁ ≠ λ`.) -/ +theorem Hfun_lam1_ge (P : Params) (T : ℝ) (hlam : 0 < P.lam) (hl : 0 < l T) : + Hfun P.lam - 1 / (P.lam * l T) ≤ Hfun (P.lam1 T) := by + have hc := c₀_pos; have hc1 := c₀_lt_one + have hl1 : 0 < l T + c₀ := by linarith + have hle := lam1_le P T hlam.le hl + have key : Hfun P.lam - Hfun (P.lam1 T) = c₀ / (P.lam * l T) - (P.lam - P.lam1 T) / 3 := by + rw [lam1_eq] + simp only [Hfun] + field_simp + ring + have : c₀ / (P.lam * l T) ≤ 1 / (P.lam * l T) := + div_le_div_of_nonneg_right hc1.le (by positivity) + linarith + +/-- Lipschitz bound for `F` on `[0,1]`: `F(y) − F(x) ≤ y − x` for `0 ≤ x ≤ y ≤ 1` +(paper: "`F′(x) = (1−x²/3)/(1+x²/3)² ∈ (0,1]` on `[0,1]`"), proved by algebra. -/ +lemma Ffun_sub_le (x y : ℝ) (hx : 0 ≤ x) (hxy : x ≤ y) (_hy : y ≤ 1) : Ffun y - Ffun x ≤ y - x := by + simp only [Ffun] + rw [div_sub_div _ _ (by positivity) (by positivity), div_le_iff₀ (by positivity)] + nlinarith [mul_nonneg hx (sub_nonneg.2 hxy), mul_nonneg (mul_nonneg hx hx) (sub_nonneg.2 hxy), + sq_nonneg x, sq_nonneg y, mul_nonneg hx (hx.trans hxy), mul_le_mul hxy hxy hx (hx.trans hxy)] + +/-- **`F(λ₁) ≥ F(λ) − 1/l`** (the paper §6, proof of Thm B: "`F′(x) = (1−x²/3)/(1+x²/3)² ∈ (0,1]` +on `[0,1]` and `0 ≤ λ − λ₁ ≤ 1/l`, so `F(λ₁) ≥ F(λ) − 1/l`"). -/ +theorem Ffun_lam1_ge (P : Params) (T : ℝ) (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) (hl : 0 < l T) : + Ffun P.lam - 1 / l T ≤ Ffun (P.lam1 T) := by + have hle := lam1_le P T hlam.le hl + have hpos := lam1_pos P T hlam hl + have hsub := sub_lam1_le P T hlam.le hl + have h1 := Ffun_sub_le (P.lam1 T) P.lam hpos.le hle hlam1 + have h2 : P.lam / l T ≤ 1 / l T := div_le_div_of_nonneg_right hlam1 hl.le + linarith + +/-- `sup_{λ<1} H(λ) = 2/3`, in the quantitative form used for the `λ → 1⁻` step: +for `λ ∈ [1/2, 1]`, `H(λ) ≥ 2/3 − (5/3)(1 − λ)`. -/ +lemma Hfun_ge_near_one (lam : ℝ) (h1 : 1 / 2 ≤ lam) (h2 : lam ≤ 1) : + 2 / 3 - 5 / 3 * (1 - lam) ≤ Hfun lam := by + simp only [Hfun] + have hlam : 0 < lam := by linarith + have : 1 / lam ≤ 1 + 2 * (1 - lam) := by + rw [div_le_iff₀ hlam]; nlinarith + linarith + +/-- For `λ ∈ [0, 1]`, `F(λ) ≥ 3/4 − (1 − λ)` (for the `λ → 1⁻` step of Thm B/C). -/ +lemma Ffun_ge_near_one (lam : ℝ) (h1 : 0 ≤ lam) (h2 : lam ≤ 1) : + 3 / 4 - (1 - lam) ≤ Ffun lam := by + have := Ffun_sub_le lam 1 h1 h2 le_rfl + rw [Ffun_one] at this; linarith + +end HF + +/-! ## Part C. §6 at fixed `T`: the explicit inequality for Theorem A + +All quantities are real numbers attached to one fixed `T` (and fixed `λ`, `ϱ`); every error term is +explicit. Dictionary (paper ↔ arguments): `N = N(T,2T)`, `NII = N(I′∖I) := N(T−D₀,T) + N(2T,2T+D₀)`, +`N0star = N₀*(T,2T)`, `s12 = s₁ + s₂`, `trGh = tr Ĝ`, `frGh = ‖Ĝ‖_F²`, `trAh = tr Â`, +`frAh = ‖Â‖_F²`, `B` = the prop:tail bound for `|tr Ê|` and `‖Ê‖_F` (`≤ 2θ₀/L`). -/ + +section FixedT + +/-- **[eq:zeroside-rank] made explicit** (the paper `prop:zeroside-rank`, second assertion): +"`N₀*(T,2T) ≥ 4 tr Ĝ − ‖Ĝ‖_F² − 2N(T,2T) − O(θ₀L⁻¹(1+‖Ĝ‖_F) + D₀ l)`", here with the `O(·)` +replaced by the explicit `3 N(I′∖I) + B(4 + 2‖Ĝ‖_F + B)`. +Inputs: `hcount` = "`s₁+s₂ ≤ N₀*(T,2T) + N(I′∖I)`"; `hcore` = `zeroside_rank_core` with +`N(I′) = N(T,2T) + N(I′∖I)`; `hpert` = `four_tr_sub_frobSq_perturb`. -/ +theorem N0star_lower_explicit + {N0star s12 : ℕ} {N NII trGh frGh trAh frAh B : ℝ} + (hcount : (s12 : ℝ) ≤ N0star + NII) + (hcore : 4 * trAh - 2 * (N + NII) - frAh ≤ s12) + (hpert : 4 * trGh - frGh - B * (4 + 2 * Real.sqrt frGh + B) ≤ 4 * trAh - frAh) : + 4 * trGh - frGh - 2 * N - 3 * NII - B * (4 + 2 * Real.sqrt frGh + B) ≤ N0star := by + linarith + +/-- Generic fixed-`T` moment lower bound (covers `c = 2` (`4, 2, 3, 4, 1`), `c = 3` (`6, 3, 5, 6, 2`), +and window-general `κ` such as `1/λ₁ + λ₁/3` or `cRatio⁻¹`). -/ +theorem count_lower_moment_gen + {a_tr a_N a_NII a_B scale lower N NII trGh frGh B κ R₁ R₂ : ℝ} + (ha_tr : 0 ≤ a_tr) (hB : 0 ≤ B) + (h0 : a_tr * trGh - frGh - a_N * N - a_NII * NII - B * (a_B + 2 * Real.sqrt frGh + B) ≤ scale * lower) + (htr : N - R₁ ≤ trGh) (hfr : frGh ≤ κ * N + R₂) : + (a_tr - a_N - κ) * N - (a_tr * R₁ + R₂ + a_NII * NII + + B * (a_B + 2 * Real.sqrt (κ * N + R₂) + B)) ≤ scale * lower := by + have htr' : a_tr * (N - R₁) ≤ a_tr * trGh := mul_le_mul_of_nonneg_left htr ha_tr + have h2 : Real.sqrt frGh ≤ Real.sqrt (κ * N + R₂) := Real.sqrt_le_sqrt hfr + nlinarith [h0, htr', h2, hB, mul_le_mul_of_nonneg_left h2 hB] + +/-- **§6 proof of Thm A, the "`(H(λ₁) − O(𝓔′_T)) N`" line made explicit.** +With `cλ := 1/λ₁ + λ₁/3` (so `4 − cλ − 2 = H(λ₁)`), if `|tr Ĝ − N| ≤ R₁` +("`tr Ĝ = N + O(√X/a)`") and `‖Ĝ‖_F² ≤ cλ N + R₂` ("`‖Ĝ‖_F² ≤ (1/λ₁+λ₁/3)N(1+O(𝓔′_T))`"), then +`N₀*(T,2T) ≥ H(λ₁) N − [4R₁ + R₂ + 3N(I′∖I) + B(4 + 2√(cλ N + R₂) + B)]`. -/ +theorem N0star_lower_H + {N0star N NII trGh frGh B lam₁ R₁ R₂ : ℝ} (hB : 0 ≤ B) + (h0 : 4 * trGh - frGh - 2 * N - 3 * NII - B * (4 + 2 * Real.sqrt frGh + B) ≤ N0star) + (htr : |trGh - N| ≤ R₁) (hfr : frGh ≤ (1 / lam₁ + lam₁ / 3) * N + R₂) : + Hfun lam₁ * N - (4 * R₁ + R₂ + 3 * NII + + B * (4 + 2 * Real.sqrt ((1 / lam₁ + lam₁ / 3) * N + R₂) + B)) ≤ N0star := by + have h := count_lower_moment_gen (a_tr := 4) (a_N := 2) (a_NII := 3) (a_B := 4) (scale := 1) + (R₁ := R₁) (by norm_num) hB (by simpa only [one_mul] using h0) (by linarith [(abs_le.mp htr).1]) hfr + have hH : Hfun lam₁ = 4 - 2 - (1 / lam₁ + lam₁ / 3) := by simp only [Hfun]; ring + rw [hH]; linarith + +end FixedT + +/-! ## Part D. Unit conversion `Ĝ ↔ G̃` and the trace inputs +(paper §6, proof of Thm A, first lines: "In the units (eq:hatunits), `tr Ĝ = tr G̃/(aL)` and +`‖Ĝ‖_F² = tr G̃²/(aL)²`. By Proposition prop:trace, `tr Ĝ = N + O(√X/a)` … (note that the taper +constant `a` cancels). By (eq:tr2) … `‖Ĝ‖_F² ≤ … = (1/λ₁ + λ₁/3) N (1 + O(𝓔′_T))`") -/ + +section Units +open Complex + +variable {m : Type*} [Fintype m] + +lemma rtrace_smul_ofReal (c : ℝ) (M : Matrix m m ℂ) : rtrace ((c : ℂ) • M) = c * rtrace M := by + unfold rtrace + rw [Matrix.trace_smul, smul_eq_mul] + simp + +lemma frobSq_smul_ofReal (c : ℝ) (M : Matrix m m ℂ) : + frobSq ((c : ℂ) • M) = c ^ 2 * frobSq M := by + rw [frobSq_eq_sum_norm_sq, frobSq_eq_sum_norm_sq, mul_sum] + refine sum_congr rfl fun i _ => ?_ + rw [mul_sum] + refine sum_congr rfl fun j _ => ?_ + simp [Matrix.smul_apply, mul_pow, sq_abs] + +variable (P : Params) (T : ℝ) + +omit [Fintype m] in +/-- `G̃ = L⁻¹ • G` with the scalar written as a real cast. -/ +lemma tilde_eq (M : Matrix m m ℂ) : P.tilde T M = (((P.L T)⁻¹ : ℝ) : ℂ) • M := by + simp [Params.tilde] + +omit [Fintype m] in +/-- `Ĝ = (aL²)⁻¹ • G` with the scalar written as a real cast [eq:hatunits]. -/ +lemma hat_eq (M : Matrix m m ℂ) : P.hat T M = (((P.a T * P.L T ^ 2)⁻¹ : ℝ) : ℂ) • M := by + simp [Params.hat] + +omit [Fintype m] in +/-- `Ĝ = (aL)⁻¹ • G̃`: hat units are tilde units divided by `aL` ([eq:hatunits] vs [eq:Gdef]). -/ +lemma hat_eq_smul_tilde (M : Matrix m m ℂ) : + P.hat T M = (((P.a T * P.L T)⁻¹ : ℝ) : ℂ) • P.tilde T M := by + rw [hat_eq, tilde_eq, smul_smul, ← ofReal_mul] + congr 1 + push_cast + ring + +/-- "`tr Ĝ = tr G̃ /(aL)`" (paper §6). -/ +lemma rtrace_hat (M : Matrix m m ℂ) : + rtrace (P.hat T M) = (P.a T * P.L T)⁻¹ * rtrace (P.tilde T M) := by + rw [hat_eq_smul_tilde, rtrace_smul_ofReal] + +/-- "`‖Ĝ‖_F² = tr G̃² /(aL)²`" (paper §6), with `tr G̃² = ‖G̃‖_F²`. -/ +lemma frobSq_hat (M : Matrix m m ℂ) : + frobSq (P.hat T M) = ((P.a T * P.L T)⁻¹) ^ 2 * frobSq (P.tilde T M) := by + rw [hat_eq_smul_tilde, frobSq_smul_ofReal] + +/-- The prime-side trace computed entrywise: `rtrace (G̃ᵖʳⁱᵐᵉ) = P.trGtilde T` +(Defs: `trGtilde := L⁻¹ Σ_k G_{kk}`). -/ +lemma rtrace_tilde_Gp : rtrace (P.tilde T (P.Gp T)) = P.trGtilde T := by + rw [tilde_eq, rtrace_smul_ofReal] + simp [Params.trGtilde, rtrace, Matrix.trace, Params.Gp] + +/-- The prime-side Frobenius norm computed entrywise: `frobSq (G̃ᵖʳⁱᵐᵉ) = P.trGtildeSq T` +(Defs: `trGtildeSq := (L⁻¹)² Σ_{k,l} G_{kl}²`). -/ +lemma frobSq_tilde_Gp : frobSq (P.tilde T (P.Gp T)) = P.trGtildeSq T := by + rw [tilde_eq, frobSq_smul_ofReal, frobSq_eq_sum_norm_sq] + simp [Params.trGtildeSq, Params.Gp, sq_abs] + +end Units + +section TraceInputs + +/-- **"`tr Ĝ = N + O(√X/a)` (note that the taper constant `a` cancels)"** (paper §6 / prop:trace). +From [eq:tr1] first form `|tr G̃ − a L N| ≤ C·L·√X`: +`|tr G̃/(aL) − N| ≤ C √X / a` — the main term is exactly `N`, independent of `a`. -/ +theorem trGhat_sub_N_le {a L N trGt C sqX : ℝ} (ha : 0 < a) (hL : 0 < L) + (h : |trGt - a * L * N| ≤ C * (L * sqX)) : + |(a * L)⁻¹ * trGt - N| ≤ C * sqX / a := by + have haL : 0 < a * L := mul_pos ha hL + have e : (a * L)⁻¹ * trGt - N = (a * L)⁻¹ * (trGt - a * L * N) := by field_simp + rw [e, abs_mul, abs_of_pos (inv_pos.2 haL), ← div_eq_inv_mul, div_le_iff₀ haL] + calc |trGt - a * L * N| ≤ C * (L * sqX) := h + _ = C * sqX / a * (a * L) := by field_simp + +/-- The algebra behind "`‖Ĝ‖_F² ≤ (T/(2πLa²))(ℓ₁² + L²/3)(1+O(𝓔′)) = … = (1/λ₁ + λ₁/3) N (1+O(𝓔′))`": +`(aL)⁻² · (TL/2π)(ℓ₁² + L²/3) = a⁻² · (1/λ₁ + λ₁/3) · (Tℓ₁/2π)` exactly, where `λ₁ = L/ℓ₁`. -/ +lemma mainTr2_hat_identity {a L T ℓ₁ : ℝ} (ha : a ≠ 0) (hL : L ≠ 0) (hℓ₁ : ℓ₁ ≠ 0) : + ((a * L)⁻¹) ^ 2 * (T * L / (2 * Real.pi) * (ℓ₁ ^ 2 + L ^ 2 / 3)) + = (a ^ 2)⁻¹ * (1 / (L / ℓ₁) + (L / ℓ₁) / 3) * (T * ℓ₁ / (2 * Real.pi)) := by + field_simp + +/-- **"`‖Ĝ‖_F² ≤ (1/λ₁ + λ₁/3) N (1 + O(𝓔′_T))`" made explicit.** From [eq:tr2] (second form, +upper half) `tr G̃² ≤ (1 + C𝓔)(TL/2π)(ℓ₁² + L²/3)` and Riemann–von Mangoldt in the form +`Tℓ₁/2π ≤ N + R_N` [eq:RvM], with `K := (1 + C𝓔)/a²` and `cλ := 1/λ₁ + λ₁/3`: +`‖Ĝ‖_F² = tr G̃²/(aL)² ≤ cλ N + cλ((K − 1) N + K R_N)`. (The second summand is the explicit `R₂`.) -/ +theorem frobGhat_le {a L T ℓ₁ trG2 C calE N RN : ℝ} (ha : 0 < a) (hL : 0 < L) (hℓ₁ : 0 < ℓ₁) + (hK : 0 ≤ 1 + C * calE) + (htr2 : trG2 - T * L / (2 * Real.pi) * (ℓ₁ ^ 2 + L ^ 2 / 3) + ≤ C * calE * (T * L / (2 * Real.pi) * (ℓ₁ ^ 2 + L ^ 2 / 3))) + (hRvM : T * ℓ₁ / (2 * Real.pi) ≤ N + RN) : + ((a * L)⁻¹) ^ 2 * trG2 + ≤ (1 / (L / ℓ₁) + (L / ℓ₁) / 3) * N + + (1 / (L / ℓ₁) + (L / ℓ₁) / 3) * (((1 + C * calE) / a ^ 2 - 1) * N + + (1 + C * calE) / a ^ 2 * RN) := by + set M := T * L / (2 * Real.pi) * (ℓ₁ ^ 2 + L ^ 2 / 3) with hM + set cl := 1 / (L / ℓ₁) + (L / ℓ₁) / 3 with hcl + have hcl0 : 0 ≤ cl := by rw [hcl]; positivity + have h1 : trG2 ≤ (1 + C * calE) * M := by linarith + have h2 : ((a * L)⁻¹) ^ 2 * trG2 ≤ ((a * L)⁻¹) ^ 2 * ((1 + C * calE) * M) := + mul_le_mul_of_nonneg_left h1 (sq_nonneg _) + have h3 : ((a * L)⁻¹) ^ 2 * ((1 + C * calE) * M) + = (1 + C * calE) / a ^ 2 * cl * (T * ℓ₁ / (2 * Real.pi)) := by + have := mainTr2_hat_identity (T := T) ha.ne' hL.ne' hℓ₁.ne' + rw [← hM, ← hcl] at this + calc ((a * L)⁻¹) ^ 2 * ((1 + C * calE) * M) = (1 + C * calE) * (((a * L)⁻¹) ^ 2 * M) := by ring + _ = (1 + C * calE) * ((a ^ 2)⁻¹ * cl * (T * ℓ₁ / (2 * Real.pi))) := by rw [this] + _ = _ := by ring + have hKa : 0 ≤ (1 + C * calE) / a ^ 2 := by positivity + have h4 : (1 + C * calE) / a ^ 2 * cl * (T * ℓ₁ / (2 * Real.pi)) + ≤ (1 + C * calE) / a ^ 2 * cl * (N + RN) := + mul_le_mul_of_nonneg_left hRvM (mul_nonneg hKa hcl0) + calc ((a * L)⁻¹) ^ 2 * trG2 ≤ (1 + C * calE) / a ^ 2 * cl * (N + RN) := by linarith + _ = cl * N + cl * (((1 + C * calE) / a ^ 2 - 1) * N + (1 + C * calE) / a ^ 2 * RN) := by ring + +end TraceInputs + +end Assembly +end Zeta23 + +end diff --git a/zeta23/Zeta23/Assembly/SeamMult.lean b/zeta23/Zeta23/Assembly/SeamMult.lean index 78c291cd46..19380d9dad 100644 --- a/zeta23/Zeta23/Assembly/SeamMult.lean +++ b/zeta23/Zeta23/Assembly/SeamMult.lean @@ -20,27 +20,31 @@ noncomputable section namespace Zeta23 namespace Assembly -variable {n : Type*} [Fintype n] [DecidableEq n] {𝕜 : Type*} [RCLike 𝕜] +variable {Z : ZeroConfig} {P : Params} {T : ℝ} -/-- c-generic version of `four_tr_sub_frobSq_perturb`. -/ -theorem ctr_sub_frobSq_perturb {Ghat Ahat Ehat : Matrix n n 𝕜} (c : ℝ) (hc : 0 ≤ c) - (hGAE : Ghat = Ahat + Ehat) {B : ℝ} (hB : 0 ≤ B) - (htrE : |rtrace Ehat| ≤ B) (hfrE : frobSq Ehat ≤ B ^ 2) : - c * rtrace Ghat - frobSq Ghat - B * (c + 2 * Real.sqrt (frobSq Ghat) + B) - ≤ c * rtrace Ahat - frobSq Ahat := by - have hA : Ahat = Ghat - Ehat := by rw [hGAE]; abel - have htr : rtrace Ahat = rtrace Ghat - rtrace Ehat := by rw [hA, rtrace_sub] - have hsqE : Real.sqrt (frobSq Ehat) ≤ B := Real.sqrt_le_iff.mpr ⟨hB, hfrE⟩ - have hsqG : 0 ≤ Real.sqrt (frobSq Ghat) := Real.sqrt_nonneg _ - have hfrA : frobSq Ahat ≤ (Real.sqrt (frobSq Ghat) + B) ^ 2 := by - rw [hA] - refine (frobSq_sub_le Ghat Ehat).trans ?_ - gcongr - have habs := abs_le.mp htrE - have hGsq : Real.sqrt (frobSq Ghat) ^ 2 = frobSq Ghat := Real.sq_sqrt (frobSq_nonneg _) - nlinarith [mul_le_mul_of_nonneg_left habs.1 hc, sq_nonneg (Real.sqrt (frobSq Ghat) + B)] +private lemma seamA_mult_core (c : ℝ) (hc : 0 ≤ c) {θ₀ : ℝ} + (hTl : TailInputs Z P T θ₀) (ha : 0 < P.a T) (hL : 0 < P.L T) : + c * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) + - θ₀ / (P.a T * P.L T) + * (c + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ / (P.a T * P.L T)) + ≤ c * rtrace (P.hat T (Z.Az P T)) - frobSq (P.hat T (Z.Az P T)) := by + obtain ⟨Bc, hB0, htrE, hfrE, hBle⟩ := hTl.hat + have hGAE : P.hat T (Z.Gz P T) = P.hat T (Z.Az P T) + P.hat T (Z.Ez P T) := by + rw [← hat_add]; congr 1; simp [ZeroConfig.Ez] + have hB₀ : 0 ≤ θ₀ / (P.a T * P.L T) := div_nonneg hTl.theta_nonneg (mul_pos ha hL).le + exact ctr_sub_frobSq_perturb c hc hGAE hB₀ (htrE.trans hBle) + (hfrE.trans (pow_le_pow_left₀ hB0 hBle 2)) -variable {Z : ZeroConfig} {P : Params} {T : ℝ} +private lemma seamA_mult_of (c kN kNII rhs : ℝ) (hc : 0 ≤ c) {θ₀ : ℝ} + (hTl : TailInputs Z P T θ₀) (ha : 0 < P.a T) (hL : 0 < P.L T) + (hbound : c * rtrace (P.hat T (Z.Az P T)) - frobSq (P.hat T (Z.Az P T)) + - kN * (Z.N T (2 * T) : ℝ) - kNII * (NII Z T : ℝ) ≤ rhs) : + c * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - kN * (Z.N T (2 * T) : ℝ) + - kNII * (NII Z T : ℝ) + - θ₀ / (P.a T * P.L T) + * (c + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ / (P.a T * P.L T)) + ≤ rhs := by + linarith [seamA_mult_core c hc hTl ha hL] /-- **Seam A, multiplicity-aware, c = 2**: the seamA shape with conclusion N₀ˢ. -/ theorem seamA_mult2 (hT : 0 ≤ T) (hconj : ZeroSide.PhiHatConj T P) @@ -51,19 +55,12 @@ theorem seamA_mult2 (hT : 0 ≤ T) (hconj : ZeroSide.PhiHatConj T P) - θ₀ / (P.a T * P.L T) * (4 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ / (P.a T * P.L T)) ≤ Z.N0s T (2 * T) := by - obtain ⟨Bc, hB0, htrE, hfrE, hBle⟩ := hTl.hat - have hGAE : P.hat T (Z.Gz P T) = P.hat T (Z.Az P T) + P.hat T (Z.Ez P T) := by - rw [← hat_add]; congr 1; simp [ZeroConfig.Ez] - have hB₀ : 0 ≤ θ₀ / (P.a T * P.L T) := div_nonneg hTl.theta_nonneg (mul_pos ha hL).le + refine seamA_mult_of 4 2 3 _ (by norm_num) hTl ha hL ?_ have hcore := ZeroSide.hatAz_mult2 Z T P hconj hreal hPois (by positivity) - have hpert := ctr_sub_frobSq_perturb 4 (by norm_num) hGAE hB₀ (htrE.trans hBle) - (hfrE.trans (pow_le_pow_left₀ hB0 hBle 2)) - have hs1 : (Z.s1 T : ℝ) ≤ (Z.N0s T (2 * T) : ℝ) + (NII Z T : ℝ) := by - exact_mod_cast s1_le Z hT + have hs1 : (Z.s1 T : ℝ) ≤ (Z.N0s T (2 * T) : ℝ) + (NII Z T : ℝ) := by exact_mod_cast s1_le Z hT have hNI : (Z.NIprime T : ℝ) = (Z.N T (2 * T) : ℝ) + (NII Z T : ℝ) := by exact_mod_cast NIprime_eq Z hT - rw [hNI] at hcore - linarith [hcore, hpert, hs1] + linarith /-- **Seam A, multiplicity-aware, c = 3**: 6trĜ − ‖Ĝ‖² − 3N − 5NII − B(6+2√+B) ≤ 2·N_d. -/ theorem seamA_mult3 (hT : 0 ≤ T) (hconj : ZeroSide.PhiHatConj T P) @@ -74,19 +71,13 @@ theorem seamA_mult3 (hT : 0 ≤ T) (hconj : ZeroSide.PhiHatConj T P) - θ₀ / (P.a T * P.L T) * (6 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ / (P.a T * P.L T)) ≤ 2 * (Z.Nd T (2 * T) : ℝ) := by - obtain ⟨Bc, hB0, htrE, hfrE, hBle⟩ := hTl.hat - have hGAE : P.hat T (Z.Gz P T) = P.hat T (Z.Az P T) + P.hat T (Z.Ez P T) := by - rw [← hat_add]; congr 1; simp [ZeroConfig.Ez] - have hB₀ : 0 ≤ θ₀ / (P.a T * P.L T) := div_nonneg hTl.theta_nonneg (mul_pos ha hL).le + refine seamA_mult_of 6 3 5 _ (by norm_num) hTl ha hL ?_ have hcore := ZeroSide.hatAz_mult3 Z T P hconj hreal hPois (by positivity) - have hpert := ctr_sub_frobSq_perturb 6 (by norm_num) hGAE hB₀ (htrE.trans hBle) - (hfrE.trans (pow_le_pow_left₀ hB0 hBle 2)) have hZd : ((Z.ZIprime T).ncard : ℝ) ≤ (Z.Nd T (2 * T) : ℝ) + (NII Z T : ℝ) := by exact_mod_cast card_ZIprime_le Z hT have hNI : (Z.NIprime T : ℝ) = (Z.N T (2 * T) : ℝ) + (NII Z T : ℝ) := by exact_mod_cast NIprime_eq Z hT - rw [hNI] at hcore - linarith [hcore, hpert, hZd] + linarith end Assembly end Zeta23 diff --git a/zeta23/Zeta23/Assembly/Windows.lean b/zeta23/Zeta23/Assembly/Windows.lean new file mode 100644 index 0000000000..16c4e3a93c --- /dev/null +++ b/zeta23/Zeta23/Assembly/Windows.lean @@ -0,0 +1,242 @@ +/- +Copyright (c) 2026 Anthropic, PBC. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +SPDX-License-Identifier: Apache-2.0 +-/ +/- +Part of the Zeta23 formalization of + "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". +-/ +import Zeta23.Assembly.Matrix +import Zeta23.Assembly.Inputs +import Zeta23.Defs.Counting +import Zeta23.PrimeSideTemp + +/-! +# §6 Window bookkeeping and fixed-`T` concrete seams (Parts F0–F1) + +* Part F0 (`Windows`): interval additivity of `N`, `N_d`, `N₀*`, `N₀ˢ` and the set-level + boundary inequalities for `I′ = (T − D₀, 2T + D₀]`. +* Part F1 (`FixedTConcrete`): `seamA`, `seamA_BC`, and `seamB` for the concrete matrices + `Ĝ = P.hat T (Z.Gz P T)` and `G̃ = P.tilde T (Z.Gz P T)`. +-/ + +noncomputable section + +open Matrix RHLinalg + +namespace Zeta23 +namespace Assembly + +/-! ### F0. Window bookkeeping for an abstract `ZeroConfig` (interval additivity; the four +"set-level" facts of prop:zeroside-rank / prop:zeroside: +`s₁+s₂ ≤ N₀*(T,2T) + N(I′∖I)`, `s₁ ≤ N₀ˢ(T,2T) + N(I′∖I)`, `#𝒵(I′) ≤ N_d(T,2T) + N(I′∖I)`, +`N(I′) = N(T,2T) + N(I′∖I)`, where `N(I′∖I) := N(T−D₀,T) + N(2T,2T+D₀)`). -/ + +section Windows +open Set + +variable (Z : ZeroConfig) + +lemma window_union {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : + Z.window a c = Z.window a b ∪ Z.window b c := + Z.window_union hab hbc + +lemma window_disjoint (a b c : ℝ) : Disjoint (Z.window a b) (Z.window b c) := + Z.window_disjoint a b c + +/-- Interval additivity of `N` (with multiplicity). -/ +theorem N_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : Z.N a c = Z.N a b + Z.N b c := + Z.N_add hab hbc + +/-- Interval additivity of `N_d`. -/ +theorem Nd_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : Z.Nd a c = Z.Nd a b + Z.Nd b c := by + unfold ZeroConfig.Nd + rw [window_union Z hab hbc, Set.ncard_union_eq (window_disjoint Z a b c) + (Z.window_finite a b) (Z.window_finite b c)] + +/-- Interval additivity of `N₀*`. -/ +theorem N0star_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : + Z.N0star a c = Z.N0star a b + Z.N0star b c := by + unfold ZeroConfig.N0star + rw [window_union Z hab hbc, Set.union_inter_distrib_right, + Set.ncard_union_eq ((window_disjoint Z a b c).mono inter_subset_left inter_subset_left) + ((Z.window_finite a b).subset inter_subset_left) ((Z.window_finite b c).subset inter_subset_left)] + +/-- Interval additivity of `N₀ˢ`. -/ +theorem N0s_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : + Z.N0s a c = Z.N0s a b + Z.N0s b c := by + unfold ZeroConfig.N0s + rw [window_union Z hab hbc, Set.union_inter_distrib_right, Set.union_inter_distrib_right, + Set.ncard_union_eq (((window_disjoint Z a b c).mono inter_subset_left inter_subset_left).mono + inter_subset_left inter_subset_left) + (((Z.window_finite a b).subset inter_subset_left).subset inter_subset_left) + (((Z.window_finite b c).subset inter_subset_left).subset inter_subset_left)] + +variable (T : ℝ) + +lemma D0_nonneg : 0 ≤ D0 T := Real.sqrt_nonneg _ + +variable {T} + +/-- "`N(I′) = N(T,2T) + N(I′∖I)`" (proof of prop:zeroside-rank). -/ +theorem NIprime_eq (hT : 0 ≤ T) : Z.NIprime T = Z.N T (2 * T) + NII Z T := by + unfold ZeroConfig.NIprime NII + have h0 := D0_nonneg T + rw [N_add Z (b := T) (by linarith) (by linarith), N_add Z (a := T) (b := 2 * T) (by linarith) (by linarith)] + ring + +/-- `𝒮₁ ∪ 𝒮₂ = 𝒵(I′) ∩ {β = 1/2}` (every zero has `m_ρ ≥ 1`), hence +"`s₁ + s₂` = number of distinct on-line zeros with ordinate in `I′`" `= N₀*(T−D₀, 2T+D₀)`. -/ +theorem s1_add_s2_eq : Z.s1 T + Z.s2 T = Z.N0star (T - D0 T) (2 * T + D0 T) := by + unfold ZeroConfig.s1 ZeroConfig.s2 ZeroConfig.N0star + have hfin : (Z.ZIprime T ∩ ZeroConfig.onLine).Finite := + (Z.window_finite _ _).subset inter_subset_left + have hdisj : Disjoint (Z.S1 T) (Z.S2 T) := by + rw [Set.disjoint_left] + rintro ρ ⟨_, h1⟩ ⟨_, h2⟩ + simp only [ZeroConfig.simple, mem_ofPred_eq] at h1 h2 + omega + have hunion : Z.S1 T ∪ Z.S2 T = Z.ZIprime T ∩ ZeroConfig.onLine := by + ext ρ + simp only [ZeroConfig.S1, ZeroConfig.S2, ZeroConfig.simple, mem_union, mem_inter_iff, mem_ofPred_eq] + constructor + · rintro (⟨h, _⟩ | ⟨h, _⟩) <;> exact h + · rintro ⟨h1, h2⟩ + have : 1 ≤ Z.mult ρ := Z.one_le_mult ρ (Z.window_subset_carrier _ _ h1) + rcases this.eq_or_lt with h | h + · exact Or.inl ⟨⟨h1, h2⟩, h.symm⟩ + · exact Or.inr ⟨⟨h1, h2⟩, h⟩ + rw [← Set.ncard_union_eq hdisj (hfin.subset (hunion ▸ subset_union_left)) + (hfin.subset (hunion ▸ subset_union_right)), hunion] + rfl + +/-- "`s₁ + s₂ ≤ N₀*(T,2T) + N(I′∖I)`" (proof of prop:zeroside-rank). -/ +theorem s1_add_s2_le (hT : 0 ≤ T) : Z.s1 T + Z.s2 T ≤ Z.N0star T (2 * T) + NII Z T := by + rw [s1_add_s2_eq] + have h0 := D0_nonneg T + rw [N0star_add Z (b := T) (by linarith) (by linarith), + N0star_add Z (a := T) (b := 2 * T) (by linarith) (by linarith)] + unfold NII + have h1 := (Z.N0star_le_Nd (T - D0 T) T).trans (Z.Nd_le_N _ _) + have h2 := (Z.N0star_le_Nd (2 * T) (2 * T + D0 T)).trans (Z.Nd_le_N _ _) + omega + +/-- "`s₁ ≤ N₀ˢ(T,2T) + N(I′∖I)`" (proof of prop:zeroside); `s₁ = N₀ˢ` over `I′` by definition. -/ +theorem s1_le (hT : 0 ≤ T) : Z.s1 T ≤ Z.N0s T (2 * T) + NII Z T := by + have hs1 : Z.s1 T = Z.N0s (T - D0 T) (2 * T + D0 T) := rfl + have h0 := D0_nonneg T + rw [hs1, N0s_add Z (b := T) (by linarith) (by linarith), + N0s_add Z (a := T) (b := 2 * T) (by linarith) (by linarith)] + unfold NII + have c1 := Z.trivial_chain (T - D0 T) T + have c2 := Z.trivial_chain (2 * T) (2 * T + D0 T) + have h1 : Z.N0s (T - D0 T) T ≤ Z.N (T - D0 T) T := c1.1.trans (c1.2.1.trans c1.2.2.1) + have h2 : Z.N0s (2 * T) (2 * T + D0 T) ≤ Z.N (2 * T) (2 * T + D0 T) := + c2.1.trans (c2.2.1.trans c2.2.2.1) + omega + +/-- "`#𝒵(I′) ≤ N_d(T,2T) + N(I′∖I)`" (proof of prop:zeroside). -/ +theorem card_ZIprime_le (hT : 0 ≤ T) : (Z.ZIprime T).ncard ≤ Z.Nd T (2 * T) + NII Z T := by + have h : (Z.ZIprime T).ncard = Z.Nd (T - D0 T) (2 * T + D0 T) := rfl + have h0 := D0_nonneg T + rw [h, Nd_add Z (b := T) (by linarith) (by linarith), + Nd_add Z (a := T) (b := 2 * T) (by linarith) (by linarith)] + unfold NII + have h1 := Z.Nd_le_N (T - D0 T) T + have h2 := Z.Nd_le_N (2 * T) (2 * T + D0 T) + omega + +end Windows + +/-! ### F1. Fixed-`T` assembly with the concrete matrices `Ĝ = P.hat T (Z.Gz P T)` etc. + +The inputs from prop:block (ZeroSide.lean) and prop:tail (Tail.lean) are packaged as the two +Prop-structures in `Zeta23/Assembly/Inputs.lean`, whose fields are exactly the statements those +files announce; they are discharged in those files' instantiation sections. -/ + +section FixedTConcrete + +variable (Z : ZeroConfig) (P : Params) (T : ℝ) + +-- `BlockInputs`, `TailInputs`, `NII` live in `Zeta23/Assembly/Inputs.lean` (shared with ZeroSide/Tail). + +variable {Z P T} + +lemma hat_add {m : Type*} (M N : Matrix m m ℂ) : P.hat T (M + N) = P.hat T M + P.hat T N := by + simp [Params.hat, smul_add] + +/-- **Seam A — [eq:zeroside-rank], explicit, for the concrete matrices.** For `T ≥ 0`, with +`Ĝ := P.hat T (Z.Gz P T)`, `B₀ := θ₀/(aL)`, `N(I′∖I) = NII Z T`: +`4 tr Ĝ − ‖Ĝ‖_F² − 2N(T,2T) − 3N(I′∖I) − B₀(4 + 2‖Ĝ‖_F + B₀) ≤ N₀*(T,2T)`. -/ +theorem seamA (hT : 0 ≤ T) (hB : BlockInputs Z P T) {θ₀ : ℝ} (hTl : TailInputs Z P T θ₀) + (ha : 0 < P.a T) (hL : 0 < P.L T) : + 4 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - 2 * (Z.N T (2 * T) : ℝ) + - 3 * (NII Z T : ℝ) + - θ₀ / (P.a T * P.L T) * (4 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ / (P.a T * P.L T)) + ≤ Z.N0star T (2 * T) := by + obtain ⟨Pm, Qm, p, hPm, hQm, hdec, hrank, htrP, hpos, hcount⟩ := hB.hat + obtain ⟨B, hB0, htrE, hfrE, hBle⟩ := hTl.hat + -- Ĝ =  + Ê + have hGAE : P.hat T (Z.Gz P T) = P.hat T (Z.Az P T) + P.hat T (Z.Ez P T) := by + rw [← hat_add]; congr 1; simp [ZeroConfig.Ez] + have hB₀ : 0 ≤ θ₀ / (P.a T * P.L T) := div_nonneg hTl.theta_nonneg (mul_pos ha hL).le + have hcore := zeroside_rank_core hdec hPm hQm hrank hpos htrP hcount + have hpert := ctr_sub_frobSq_perturb 4 (by norm_num) hGAE hB₀ (htrE.trans hBle) + (hfrE.trans (pow_le_pow_left₀ hB0 hBle 2)) + have hcount' : ((Z.s1 T + Z.s2 T : ℕ) : ℝ) ≤ (Z.N0star T (2 * T) : ℝ) + (NII Z T : ℝ) := by + exact_mod_cast s1_add_s2_le Z hT + have hNI : (Z.NIprime T : ℝ) = (Z.N T (2 * T) : ℝ) + (NII Z T : ℝ) := by + exact_mod_cast NIprime_eq Z hT + rw [hNI] at hcore + exact N0star_lower_explicit hcount' hcore hpert + +/-- **Seam A for Theorems B, C — [eq:zeroside2], for the concrete matrices.** For `T ≥ 0` and +`θ ≥ θ₀`: `2 n₊^θ(G̃) − N(T,2T) − 2N(I′∖I) ≤ N₀ˢ(T,2T)` and `n₊^θ(G̃) − N(I′∖I) ≤ N_d(T,2T)`. -/ +theorem seamA_BC (hT : 0 ≤ T) (hB : BlockInputs Z P T) {θ₀ θ : ℝ} (hTl : TailInputs Z P T θ₀) + (hθ : θ₀ ≤ θ) (hGt : (P.tilde T (Z.Gz P T)).IsHermitian) : + 2 * (posIndexAbove hGt θ : ℝ) - (Z.N T (2 * T) : ℝ) - 2 * (NII Z T : ℝ) ≤ Z.N0s T (2 * T) ∧ + (posIndexAbove hGt θ : ℝ) - (NII Z T : ℝ) ≤ Z.Nd T (2 * T) := by + obtain ⟨p, hAt, hpos, hrank, hcount⟩ := hB.tilde + obtain ⟨hEt, heig⟩ := hTl.tilde + have hGAE : P.tilde T (Z.Gz P T) = P.tilde T (Z.Az P T) + P.tilde T (Z.Ez P T) := by + simp [Params.tilde, ← smul_add, ZeroConfig.Ez] + have heig' : ∀ i, |hEt.eigenvalues i| ≤ θ := fun i => (heig i).trans hθ + have h := zeroside_core hAt hEt heig' hpos hrank hcount + rw [← posIndexAbove_congr hGt (hAt.add hEt) hGAE θ] at h + have hNI : (Z.NIprime T : ℝ) = (Z.N T (2 * T) : ℝ) + (NII Z T : ℝ) := by + exact_mod_cast NIprime_eq Z hT + have hs1 : (Z.s1 T : ℝ) ≤ (Z.N0s T (2 * T) : ℝ) + (NII Z T : ℝ) := by exact_mod_cast s1_le Z hT + have hcard : ((Z.ZIprime T).ncard : ℝ) ≤ (Z.Nd T (2 * T) : ℝ) + (NII Z T : ℝ) := by + exact_mod_cast card_ZIprime_le Z hT + have h2 : (posIndexAbove hGt θ : ℝ) ≤ ((Z.ZIprime T).ncard : ℝ) := by exact_mod_cast h.2 + constructor <;> linarith [h.1] + +/-- **Seam B — the trace inputs in hat units, for the concrete matrices**, given the H-EF bridge +`Z.Gz P T = P.Gp T` (zero side = prime side, [eq:Gdef] "the two expressions agreeing by +Proposition prop:EF"), [eq:tr1]/[eq:tr2] at height `T` with constants `C₁, C₂`, and [eq:RvM] at `T` +in the form `Tℓ₁/2π ≤ N + R_N`: +`|tr Ĝ − N| ≤ C₁√X/a` (the taper constant cancels in the main term) and +`‖Ĝ‖_F² ≤ cλ N + cλ((K−1)N + K R_N)`, `K = (1 + C₂𝓔_T)/a²`, `cλ = 1/λ₁ + λ₁/3`. -/ +theorem seamB (hGzGp : Z.Gz P T = P.Gp T) (ha : 0 < P.a T) (hL : 0 < P.L T) (hℓ₁ : 0 < ell1 T) + {C₁ C₂ ET RN : ℝ} + (htr1 : |P.trGtilde T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| ≤ C₁ * (P.L T * Real.sqrt (P.X T))) + (hK : 0 ≤ 1 + C₂ * ET) + (htr2 : P.trGtildeSq T - P.mainTr2 T ≤ C₂ * ET * P.mainTr2 T) + (hRvM : T * ell1 T / (2 * Real.pi) ≤ (Z.N T (2 * T) : ℝ) + RN) : + |rtrace (P.hat T (Z.Gz P T)) - (Z.N T (2 * T) : ℝ)| ≤ C₁ * Real.sqrt (P.X T) / P.a T ∧ + frobSq (P.hat T (Z.Gz P T)) ≤ (1 / P.lam1 T + P.lam1 T / 3) * (Z.N T (2 * T) : ℝ) + + (1 / P.lam1 T + P.lam1 T / 3) * (((1 + C₂ * ET) / P.a T ^ 2 - 1) * (Z.N T (2 * T) : ℝ) + + (1 + C₂ * ET) / P.a T ^ 2 * RN) := by + rw [hGzGp, rtrace_hat, frobSq_hat, rtrace_tilde_Gp, frobSq_tilde_Gp] + refine ⟨trGhat_sub_N_le ha hL htr1, ?_⟩ + have := frobGhat_le (T := T) (trG2 := P.trGtildeSq T) (N := (Z.N T (2 * T) : ℝ)) ha hL hℓ₁ hK + (by simpa [Params.mainTr2] using htr2) hRvM + simpa [Params.lam1] using this + +end FixedTConcrete + +end Assembly +end Zeta23 + +end diff --git a/zeta23/Zeta23/Chebyshev.lean b/zeta23/Zeta23/Chebyshev.lean index 5f527e07a4..9cba1c6c2b 100644 --- a/zeta23/Zeta23/Chebyshev.lean +++ b/zeta23/Zeta23/Chebyshev.lean @@ -53,7 +53,6 @@ theorem sum_vonMangoldt_le {x : ℝ} (hx : 0 ≤ x) : /-! ## [eq:cheb1], second bound: Σ_{n≤x} Λ(n)/√n ≪ √x -/ - section Cheb1b open MeasureTheory intervalIntegral @@ -62,10 +61,6 @@ private lemma sum_Icc_eq_sum_Ioc {c : ℕ → ℝ} (hc : c 0 = 0) (n : ℕ) : ∑ k ∈ Icc 0 n, c k = ∑ k ∈ Ioc 0 n, c k := by rw [Finset.Icc_eq_cons_Ioc (Nat.zero_le n), Finset.sum_cons, hc, zero_add] -private lemma psi_eq_sum_Icc' (t : ℝ) : - ∑ k ∈ Icc 0 ⌊t⌋₊, Λ k = Chebyshev.psi t := by - rw [sum_Icc_eq_sum_Ioc (by simp) ⌊t⌋₊]; rfl - /-- Abel summation specialised to Σ_{n≤x} Λ(n)/√n, in terms of ψ. -/ private lemma abel_sqrt {x : ℝ} (_hx : 1 ≤ x) : ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / Real.sqrt n @@ -91,140 +86,90 @@ private lemma abel_sqrt {x : ℝ} (_hx : 1 ≤ x) : rw [Real.sqrt_eq_rpow, ← Real.rpow_neg (Nat.cast_nonneg k)] norm_num rw [hrw, div_eq_mul_inv, mul_comm] - rw [hL, psi_eq_sum_Icc'] at habel + rw [hL, ← Chebyshev.psi_eq_sum_Icc] at habel have hI : (∫ t in Set.Ioc 1 x, deriv (fun t : ℝ => t ^ (-(2⁻¹ : ℝ))) t * ∑ k ∈ Icc 0 ⌊t⌋₊, (fun n => Λ n) k) = -(2⁻¹ : ℝ) * ∫ t in Set.Ioc 1 x, t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t := by rw [← MeasureTheory.integral_const_mul] refine setIntegral_congr_fun measurableSet_Ioc fun t _ => ?_ simp only [hderiv] - rw [← psi_eq_sum_Icc' t] + rw [Chebyshev.psi_eq_sum_Icc t] ring rw [habel, hI] ring +private lemma continuousOn_inv_Icc {x : ℝ} : ContinuousOn (fun t : ℝ => t⁻¹) (Set.Icc 1 x) := + continuousOn_inv₀.mono fun _ ht => by simp only [Set.mem_compl_iff, Set.mem_singleton_iff]; linarith [ht.1] + +private lemma continuousOn_log_Icc {x : ℝ} : ContinuousOn Real.log (Set.Icc 1 x) := fun _ ht => + (Real.continuousAt_log (by linarith [ht.1])).continuousWithinAt + +private lemma integrableOn_inv_mul_log_pow (n : ℕ) {x : ℝ} : + IntegrableOn (fun t : ℝ => t⁻¹ * Real.log t ^ n) (Set.Ioc 1 x) := + (continuousOn_inv_Icc.mul (continuousOn_log_Icc.pow n)).integrableOn_Icc.mono_set + Set.Ioc_subset_Icc_self + +private lemma integral_inv_mul_log_pow (n : ℕ) {x : ℝ} (hx : 1 ≤ x) : + ∫ t in Set.Ioc 1 x, t⁻¹ * Real.log t ^ n = Real.log x ^ (n + 1) / (n + 1 : ℝ) := by + rw [← intervalIntegral.integral_of_le hx] + have hftc : ∀ t ∈ Set.uIcc (1 : ℝ) x, + HasDerivAt (fun t : ℝ => Real.log t ^ (n + 1) / (n + 1 : ℝ)) (t⁻¹ * Real.log t ^ n) t := by + intro t ht + rw [Set.uIcc_of_le hx] at ht + have h := ((Real.hasDerivAt_log (by linarith [ht.1] : t ≠ 0)).pow (n + 1)).div_const (n + 1 : ℝ) + rw [show t⁻¹ * Real.log t ^ n = ((n + 1 : ℕ) : ℝ) * Real.log t ^ (n + 1 - 1) * t⁻¹ / (n + 1 : ℝ) by + rw [Nat.add_sub_cancel]; push_cast; field_simp] + exact h + have hint : IntervalIntegrable (fun t : ℝ => t⁻¹ * Real.log t ^ n) volume 1 x := + (continuousOn_inv_Icc.mul (continuousOn_log_Icc.pow n)).intervalIntegrable_of_Icc hx + rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hftc hint] + simp [Real.log_one] + /-- The tail integral bound: ∫₁ˣ t^{-3/2} ψ(t) dt ≤ log 4·(2√x − 2) + (log x)². -/ private lemma integral_tail_bound {x : ℝ} (hx : 1 ≤ x) : ∫ t in Set.Ioc 1 x, t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t ≤ Real.log 4 * (2 * Real.sqrt x - 2) + Real.log x ^ 2 := by have hx0 : (0 : ℝ) < x := lt_of_lt_of_le one_pos hx - -- the explicit dominating integrand - set g : ℝ → ℝ := fun t => Real.log 4 * t ^ (-(2⁻¹ : ℝ)) + 2 * (Real.log t * t⁻¹) with hg - have hcont_g : ContinuousOn g (Set.Icc 1 x) := by - apply ContinuousOn.add - · exact continuousOn_const.mul fun t ht => - (Real.continuousAt_rpow_const t _ - (Or.inl (by nlinarith [ht.1] : t ≠ 0))).continuousWithinAt - · refine continuousOn_const.mul (ContinuousOn.mul ?_ ?_) - · exact fun t ht => (Real.continuousAt_log (by nlinarith [ht.1])).continuousWithinAt - · exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - -- step 1: pointwise comparison with g on Ioc 1 x + have hcont_rpow : ContinuousOn (fun t : ℝ => t ^ (-(2⁻¹ : ℝ))) (Set.Icc 1 x) := fun t ht => + (Real.continuousAt_rpow_const t _ (Or.inl (by linarith [ht.1]))).continuousWithinAt + have hint1 : IntegrableOn (fun t : ℝ => Real.log 4 * t ^ (-(2⁻¹ : ℝ))) (Set.Ioc 1 x) := + (continuousOn_const.mul hcont_rpow).integrableOn_Icc.mono_set Set.Ioc_subset_Icc_self + have hint2 : IntegrableOn (fun t : ℝ => 2 * (t⁻¹ * Real.log t)) (Set.Ioc 1 x) := by + simpa only [IntegrableOn, pow_one] using (integrableOn_inv_mul_log_pow 1 (x := x)).const_mul 2 + have hint_g : IntegrableOn (fun t : ℝ => Real.log 4 * t ^ (-(2⁻¹ : ℝ)) + 2 * (t⁻¹ * Real.log t)) (Set.Ioc 1 x) := + hint1.add hint2 + have hint_f : IntegrableOn (fun t : ℝ => t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t) (Set.Ioc 1 x) := by + refine Integrable.mono' (g := fun _ => (Real.log 4 + 4) * x) (integrableOn_const (by simp)) + ((ContinuousOn.aestronglyMeasurable (fun t ht => + (Real.continuousAt_rpow_const t _ (Or.inl (by linarith [ht.1]))).continuousWithinAt) + measurableSet_Ioc).mul Chebyshev.psi_mono.measurable.aestronglyMeasurable.restrict) ?_ + filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht + have h1 : t ^ (-(2⁻¹ : ℝ) - 1) ≤ 1 := Real.rpow_le_one_of_one_le_of_nonpos ht.1.le (by norm_num) + have h2 : 0 ≤ Chebyshev.psi t := Chebyshev.psi_nonneg t + have h3 : Chebyshev.psi t ≤ (Real.log 4 + 4) * x := + (Chebyshev.psi_mono ht.2).trans (Chebyshev.psi_le_const_mul_self hx0.le) + rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (Real.rpow_nonneg (by linarith [ht.1]) _) h2)] + nlinarith have hpoint : ∀ t ∈ Set.Ioc (1 : ℝ) x, - t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t ≤ g t := by + t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t ≤ Real.log 4 * t ^ (-(2⁻¹ : ℝ)) + 2 * (t⁻¹ * Real.log t) := by intro t ht - have ht1 : (1 : ℝ) ≤ t := ht.1.le - have ht0 : (0 : ℝ) < t := lt_of_lt_of_le one_pos ht1 - have hψ : Chebyshev.psi t ≤ Real.log 4 * t + 2 * Real.sqrt t * Real.log t := - Chebyshev.psi_le ht1 - have hrnn : (0 : ℝ) ≤ t ^ (-(2⁻¹ : ℝ) - 1) := Real.rpow_nonneg ht0.le _ + have ht0 : (0 : ℝ) < t := by linarith [ht.1] + have e1 : t ^ (-(2⁻¹ : ℝ) - 1) * t = t ^ (-(2⁻¹ : ℝ)) := by + rw [← Real.rpow_add_one ht0.ne']; ring_nf + have e2 : t ^ (-(2⁻¹ : ℝ) - 1) * Real.sqrt t = t⁻¹ := by + rw [Real.sqrt_eq_rpow, ← Real.rpow_add ht0, ← Real.rpow_neg_one t]; norm_num calc t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t ≤ t ^ (-(2⁻¹ : ℝ) - 1) * (Real.log 4 * t + 2 * Real.sqrt t * Real.log t) := - mul_le_mul_of_nonneg_left hψ hrnn - _ = g t := by - rw [hg] - have e1 : t ^ (-(2⁻¹ : ℝ) - 1) * t = t ^ (-(2⁻¹ : ℝ)) := by - rw [← Real.rpow_add_one ht0.ne'] - ring_nf - have e2 : t ^ (-(2⁻¹ : ℝ) - 1) * Real.sqrt t = t⁻¹ := by - rw [Real.sqrt_eq_rpow, ← Real.rpow_add ht0, ← Real.rpow_neg_one t] - norm_num - calc t ^ (-(2⁻¹ : ℝ) - 1) * (Real.log 4 * t + 2 * Real.sqrt t * Real.log t) - = Real.log 4 * (t ^ (-(2⁻¹ : ℝ) - 1) * t) - + 2 * ((t ^ (-(2⁻¹ : ℝ) - 1) * Real.sqrt t) * Real.log t) := by ring - _ = Real.log 4 * t ^ (-(2⁻¹ : ℝ)) + 2 * (Real.log t * t⁻¹) := by - rw [e1, e2]; ring - -- step 2: integrability of both sides on Ioc 1 x - have hint_g : IntegrableOn g (Set.Ioc 1 x) := - (hcont_g.integrableOn_Icc).mono_set Set.Ioc_subset_Icc_self - have hmeas_f : AEStronglyMeasurable (fun t : ℝ => t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t) - (volume.restrict (Set.Ioc 1 x)) := by - refine AEStronglyMeasurable.mul ?_ ?_ - · exact (ContinuousOn.aestronglyMeasurable (fun t ht => - (Real.continuousAt_rpow_const t _ - (Or.inl (by nlinarith [(Set.mem_Ioc.mp ht).1] : t ≠ 0))).continuousWithinAt) - measurableSet_Ioc) - · exact (Chebyshev.psi_mono.measurable.aestronglyMeasurable).restrict - have hint_f : IntegrableOn (fun t : ℝ => t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t) - (Set.Ioc 1 x) := by - refine Integrable.mono' (g := fun _ => (Real.log 4 + 4) * x) - (integrableOn_const (by simp)) hmeas_f ?_ - filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht - have ht1 : (1 : ℝ) ≤ t := ht.1.le - have ht0 : (0 : ℝ) < t := lt_of_lt_of_le one_pos ht1 - have h1 : t ^ (-(2⁻¹ : ℝ) - 1) ≤ 1 := - Real.rpow_le_one_of_one_le_of_nonpos ht1 (by norm_num) - have h2 : (0 : ℝ) ≤ Chebyshev.psi t := Chebyshev.psi_nonneg t - have h3 : Chebyshev.psi t ≤ (Real.log 4 + 4) * x := - le_trans (Chebyshev.psi_mono ht.2) (Chebyshev.psi_le_const_mul_self hx0.le) - have hrnn : (0 : ℝ) ≤ t ^ (-(2⁻¹ : ℝ) - 1) := Real.rpow_nonneg ht0.le _ - rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg hrnn h2)] - calc t ^ (-(2⁻¹ : ℝ) - 1) * Chebyshev.psi t ≤ 1 * Chebyshev.psi t := - mul_le_mul_of_nonneg_right h1 h2 - _ = Chebyshev.psi t := one_mul _ - _ ≤ (Real.log 4 + 4) * x := h3 - -- step 3: compare, then evaluate ∫ g - refine le_trans (setIntegral_mono_on hint_f hint_g measurableSet_Ioc hpoint) ?_ - rw [← intervalIntegral.integral_of_le hx] - have hi1 : IntervalIntegrable (fun t : ℝ => Real.log 4 * t ^ (-(2⁻¹ : ℝ))) volume 1 x := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le hx] - exact continuousOn_const.mul fun t ht => - (Real.continuousAt_rpow_const t _ - (Or.inl (by nlinarith [ht.1] : t ≠ 0))).continuousWithinAt - have hi2 : IntervalIntegrable (fun t : ℝ => 2 * (Real.log t * t⁻¹)) volume 1 x := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le hx] - refine continuousOn_const.mul (ContinuousOn.mul ?_ ?_) - · exact fun t ht => (Real.continuousAt_log (by nlinarith [ht.1])).continuousWithinAt - · exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - rw [hg] - rw [intervalIntegral.integral_add hi1 hi2, intervalIntegral.integral_const_mul, - intervalIntegral.integral_const_mul] - have hv1 : ∫ t in (1:ℝ)..x, t ^ (-(2⁻¹ : ℝ)) = 2 * Real.sqrt x - 2 := by - rw [integral_rpow (Or.inl (by norm_num : (-1 : ℝ) < -(2⁻¹)))] - rw [Real.one_rpow] - rw [Real.sqrt_eq_rpow] - norm_num - ring - have hv2 : ∫ t in (1:ℝ)..x, Real.log t * t⁻¹ = Real.log x ^ 2 / 2 := by - have hftc : ∀ t ∈ Set.uIcc (1:ℝ) x, - HasDerivAt (fun t : ℝ => Real.log t ^ 2 / 2) (Real.log t * t⁻¹) t := by - intro t ht - rw [Set.uIcc_of_le hx] at ht - have ht0 : t ≠ 0 := by nlinarith [ht.1] - have h := ((Real.hasDerivAt_log ht0).pow 2).div_const 2 - have heq : Real.log t * t⁻¹ = ((2 : ℕ) : ℝ) * Real.log t ^ (2 - 1) * t⁻¹ / 2 := by - push_cast - ring - rw [heq] - exact h - have hint : IntervalIntegrable (fun t : ℝ => Real.log t * t⁻¹) volume 1 x := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le hx] - refine ContinuousOn.mul ?_ ?_ - · exact fun t ht => (Real.continuousAt_log (by nlinarith [ht.1])).continuousWithinAt - · exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hftc hint] - simp [Real.log_one] - rw [hv1, hv2] - ring_nf - nlinarith [Real.sqrt_nonneg x, Real.log_nonneg hx] + mul_le_mul_of_nonneg_left (Chebyshev.psi_le ht.1.le) (Real.rpow_nonneg ht0.le _) + _ = Real.log 4 * (t ^ (-(2⁻¹ : ℝ) - 1) * t) + 2 * ((t ^ (-(2⁻¹ : ℝ) - 1) * Real.sqrt t) * Real.log t) := by ring + _ = Real.log 4 * t ^ (-(2⁻¹ : ℝ)) + 2 * (t⁻¹ * Real.log t) := by rw [e1, e2] + refine (setIntegral_mono_on hint_f hint_g measurableSet_Ioc hpoint).trans_eq ?_ + rw [MeasureTheory.integral_add hint1 hint2, MeasureTheory.integral_const_mul, + MeasureTheory.integral_const_mul, ← intervalIntegral.integral_of_le hx, + integral_rpow (Or.inl (by norm_num : (-1 : ℝ) < -(2⁻¹))), Real.one_rpow, Real.sqrt_eq_rpow] + have hv2 : ∫ t in Set.Ioc 1 x, t⁻¹ * Real.log t = Real.log x ^ 2 / 2 := by + simpa [pow_one] using (integral_inv_mul_log_pow 1 hx).trans (by norm_num) + rw [hv2]; ring end Cheb1b @@ -356,117 +301,57 @@ theorem sum_vonMangoldt_div_sqrt_mul_log_le {x : ℝ} (hx : 2 ≤ x) : have hx1 : (1 : ℝ) ≤ x := by linarith have hx0 : (0 : ℝ) < x := by linarith have hlx : (0 : ℝ) < Real.log x := Real.log_pos (by linarith) - set R : ℕ := ⌊Real.sqrt x⌋₊ with hR - have hsqx : Real.sqrt x ≤ x := (Real.sqrt_le_left hx0.le).mpr (by nlinarith) - have hRle : R ≤ ⌊x⌋₊ := Nat.floor_le_floor hsqx - have hsplit : (∑ n ∈ Ioc 0 R, Λ n / (Real.sqrt n * Real.log n)) - + ∑ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n) - = ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n) := - Finset.sum_Ioc_consecutive _ (Nat.zero_le R) hRle - rw [← hsplit] - -- part 1: n ≤ R = ⌊√x⌋ - have hpart1 : ∑ n ∈ Ioc 0 R, Λ n / (Real.sqrt n * Real.log n) - ≤ 2 * Real.sqrt R := by - refine le_trans (Finset.sum_le_sum fun n hn => ?_) (sum_one_div_sqrt_le R) + set R : ℕ := ⌊Real.sqrt x⌋₊ + have hRle : R ≤ ⌊x⌋₊ := Nat.floor_le_floor ((Real.sqrt_le_left hx0.le).mpr (by nlinarith)) + rw [← Finset.sum_Ioc_consecutive _ (Nat.zero_le R) hRle] + have hpart1 : ∑ n ∈ Ioc 0 R, Λ n / (Real.sqrt n * Real.log n) ≤ 2 * Real.sqrt R := by + refine (Finset.sum_le_sum fun n hn => ?_).trans (sum_one_div_sqrt_le R) obtain ⟨hn0, _⟩ := Finset.mem_Ioc.mp hn rcases Nat.lt_or_ge n 2 with h2 | h2 - · have hn1 : n = 1 := by omega - subst hn1 + · obtain rfl : n = 1 := by omega simp [vonMangoldt_apply_one] - · have hncast : (1 : ℝ) < (n : ℝ) := by exact_mod_cast h2.trans_lt' one_lt_two - have hlogn : (0 : ℝ) < Real.log n := Real.log_pos hncast - have hsn : (0 : ℝ) < Real.sqrt n := Real.sqrt_pos.mpr (by positivity) + · have hlogn : 0 < Real.log n := Real.log_pos (by exact_mod_cast h2.trans_lt' one_lt_two) + have hsn : 0 < Real.sqrt n := Real.sqrt_pos.mpr (by positivity) calc Λ n / (Real.sqrt n * Real.log n) - ≤ Real.log n / (Real.sqrt n * Real.log n) := by - gcongr - exact vonMangoldt_le_log + ≤ Real.log n / (Real.sqrt n * Real.log n) := by gcongr; exact vonMangoldt_le_log _ = 1 / Real.sqrt n := by field_simp have hq : x ^ ((4 : ℝ)⁻¹) * x ^ ((4 : ℝ)⁻¹) = Real.sqrt x := by rw [← Real.rpow_add hx0, Real.sqrt_eq_rpow]; norm_num - have h14nn : (0 : ℝ) ≤ x ^ ((4 : ℝ)⁻¹) := Real.rpow_nonneg hx0.le _ have hsqR : Real.sqrt R ≤ x ^ ((4 : ℝ)⁻¹) := by - have h1 : Real.sqrt (R : ℝ) ≤ Real.sqrt (Real.sqrt x) := - Real.sqrt_le_sqrt (Nat.floor_le (Real.sqrt_nonneg x)) - have h2 : Real.sqrt (Real.sqrt x) = x ^ ((4 : ℝ)⁻¹) := by - rw [Real.sqrt_eq_rpow (Real.sqrt x), Real.sqrt_eq_rpow x, ← Real.rpow_mul hx0.le] - norm_num - rwa [h2] at h1 + refine (Real.sqrt_le_sqrt (Nat.floor_le (Real.sqrt_nonneg x))).trans_eq ?_ + rw [Real.sqrt_eq_rpow, Real.sqrt_eq_rpow, ← Real.rpow_mul hx0.le]; norm_num have hlog : Real.log x ≤ 4 * x ^ ((4 : ℝ)⁻¹) := by have h4 := Real.log_le_rpow_div hx0.le (by norm_num : (0 : ℝ) < 4⁻¹) - rw [div_eq_mul_inv, inv_inv] at h4 - linarith - -- part 2: √x < n ≤ x - have hS := sum_vonMangoldt_div_sqrt_le hx1 - have hsub : ∑ n ∈ Ioc R ⌊x⌋₊, Λ n / Real.sqrt n - ≤ ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / Real.sqrt n := by - refine Finset.sum_le_sum_of_subset_of_nonneg ?_ fun n _ _ => ?_ - · exact Finset.Ioc_subset_Ioc (Nat.zero_le R) le_rfl - · exact div_nonneg vonMangoldt_nonneg (Real.sqrt_nonneg _) + rw [div_eq_mul_inv, inv_inv] at h4; linarith have hpart2 : ∑ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n) ≤ 2 / Real.log x * ((2 * Real.log 4 + 16) * Real.sqrt x) := by - have step : ∀ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n) - ≤ 2 / Real.log x * (Λ n / Real.sqrt n) := by - intro n hn - obtain ⟨hnR, _⟩ := Finset.mem_Ioc.mp hn - have hsx : Real.sqrt x < (n : ℝ) := by - have := Nat.lt_floor_add_one (Real.sqrt x) - have hn1 : (R : ℝ) + 1 ≤ (n : ℝ) := by exact_mod_cast hnR - rw [hR] at hn1 - linarith - have hsx0 : (0 : ℝ) < Real.sqrt x := Real.sqrt_pos.mpr hx0 - have hn0 : (0 : ℝ) < (n : ℝ) := lt_trans hsx0 hsx - have hlogn : Real.log x / 2 ≤ Real.log n := by - have := Real.log_le_log hsx0 hsx.le - rwa [Real.log_sqrt hx0.le] at this - have hlogn0 : (0 : ℝ) < Real.log n := lt_of_lt_of_le (by positivity) hlogn - have hsn : (0 : ℝ) < Real.sqrt n := Real.sqrt_pos.mpr hn0 - have hΛ : (0 : ℝ) ≤ Λ n := vonMangoldt_nonneg - have ha : (0 : ℝ) ≤ Λ n / Real.sqrt n := div_nonneg hΛ hsn.le - have hL2 : (0 : ℝ) < Real.log x / 2 := by positivity - calc Λ n / (Real.sqrt n * Real.log n) - = (Λ n / Real.sqrt n) / Real.log n := by rw [div_div] - _ ≤ (Λ n / Real.sqrt n) / (Real.log x / 2) := by - rw [div_le_div_iff₀ hlogn0 hL2] - exact mul_le_mul_of_nonneg_left hlogn ha - _ = 2 / Real.log x * (Λ n / Real.sqrt n) := by - rw [div_div_eq_mul_div] - ring calc ∑ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n) - ≤ ∑ n ∈ Ioc R ⌊x⌋₊, 2 / Real.log x * (Λ n / Real.sqrt n) := - Finset.sum_le_sum step - _ = 2 / Real.log x * ∑ n ∈ Ioc R ⌊x⌋₊, Λ n / Real.sqrt n := by - rw [Finset.mul_sum] + ≤ ∑ n ∈ Ioc R ⌊x⌋₊, 2 / Real.log x * (Λ n / Real.sqrt n) := by + refine Finset.sum_le_sum fun n hn => ?_ + have hsx : Real.sqrt x < (n : ℝ) := by + have hn1 : (R : ℝ) + 1 ≤ (n : ℝ) := by exact_mod_cast (Finset.mem_Ioc.mp hn).1 + linarith [Nat.lt_floor_add_one (Real.sqrt x)] + have hlogn : Real.log x / 2 ≤ Real.log n := by + simpa [Real.log_sqrt hx0.le] using Real.log_le_log (Real.sqrt_pos.mpr hx0) hsx.le + rw [← div_div, show 2 / Real.log x * (Λ n / Real.sqrt n) = (Λ n / Real.sqrt n) / (Real.log x / 2) by ring] + exact div_le_div_of_nonneg_left (div_nonneg vonMangoldt_nonneg (Real.sqrt_nonneg _)) + (by positivity) hlogn + _ = 2 / Real.log x * ∑ n ∈ Ioc R ⌊x⌋₊, Λ n / Real.sqrt n := (Finset.mul_sum ..).symm _ ≤ 2 / Real.log x * ((2 * Real.log 4 + 16) * Real.sqrt x) := by - have h2l : (0 : ℝ) ≤ 2 / Real.log x := by positivity - exact mul_le_mul_of_nonneg_left (le_trans hsub hS) h2l - -- assemble: multiply through by log x - rw [le_div_iff₀ hlx] - have e2 : 2 / Real.log x * ((2 * Real.log 4 + 16) * Real.sqrt x) * Real.log x - = 2 * ((2 * Real.log 4 + 16) * Real.sqrt x) := by - field_simp - have hp1log : (∑ n ∈ Ioc 0 R, Λ n / (Real.sqrt n * Real.log n)) * Real.log x - ≤ 8 * Real.sqrt x := by - have step1 : (∑ n ∈ Ioc 0 R, Λ n / (Real.sqrt n * Real.log n)) * Real.log x - ≤ (2 * Real.sqrt R) * Real.log x := - mul_le_mul_of_nonneg_right hpart1 hlx.le - have step2 : (2 * Real.sqrt R) * Real.log x ≤ (2 * x ^ ((4 : ℝ)⁻¹)) * (4 * x ^ ((4 : ℝ)⁻¹)) := by - have hsR0 : (0 : ℝ) ≤ Real.sqrt R := Real.sqrt_nonneg _ - nlinarith [hsqR, hlog, hlx, h14nn] - have step3 : (2 * x ^ ((4 : ℝ)⁻¹)) * (4 * x ^ ((4 : ℝ)⁻¹)) = 8 * Real.sqrt x := by - rw [← hq]; ring - linarith - have hp2log : (∑ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n)) * Real.log x + gcongr + exact (Finset.sum_le_sum_of_subset_of_nonneg (Finset.Ioc_subset_Ioc (Nat.zero_le R) le_rfl) + fun _ _ _ => div_nonneg vonMangoldt_nonneg (Real.sqrt_nonneg _)).trans + (sum_vonMangoldt_div_sqrt_le hx1) + rw [le_div_iff₀ hlx, add_mul] + have hp1 : (∑ n ∈ Ioc 0 R, Λ n / (Real.sqrt n * Real.log n)) * Real.log x ≤ 8 * Real.sqrt x := by + have := mul_le_mul_of_nonneg_right hpart1 hlx.le + nlinarith [hsqR, hlog, hq, Real.sqrt_nonneg R, Real.rpow_nonneg hx0.le (4 : ℝ)⁻¹] + have hp2 : (∑ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n)) * Real.log x ≤ 2 * ((2 * Real.log 4 + 16) * Real.sqrt x) := by - calc (∑ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n)) * Real.log x - ≤ 2 / Real.log x * ((2 * Real.log 4 + 16) * Real.sqrt x) * Real.log x := - mul_le_mul_of_nonneg_right hpart2 hlx.le - _ = 2 * ((2 * Real.log 4 + 16) * Real.sqrt x) := e2 - have hfin : (∑ n ∈ Ioc 0 R, Λ n / (Real.sqrt n * Real.log n) - + ∑ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n)) * Real.log x - = (∑ n ∈ Ioc 0 R, Λ n / (Real.sqrt n * Real.log n)) * Real.log x - + (∑ n ∈ Ioc R ⌊x⌋₊, Λ n / (Real.sqrt n * Real.log n)) * Real.log x := by ring - rw [hfin] - nlinarith [hp1log, hp2log] + calc _ ≤ 2 / Real.log x * ((2 * Real.log 4 + 16) * Real.sqrt x) * Real.log x := + mul_le_mul_of_nonneg_right hpart2 hlx.le + _ = 2 * ((2 * Real.log 4 + 16) * Real.sqrt x) := by field_simp + linarith /-! ## [eq:cheb1], fourth bound: Σ_{n≤x} Λ(n)² ≪ x log x -/ @@ -493,7 +378,6 @@ theorem sum_vonMangoldt_sq_le {x : ℝ} (hx : 1 ≤ x) : ≤ ((Real.log 4 + 4) * x) * Real.log x := mul_le_mul_of_nonneg_right h2 h3 _ = (Real.log 4 + 4) * x * Real.log x := by ring - /-! ## [eq:cheb2]: the two Mertens-type asymptotics Mertens' first theorem Σ_{n≤x} Λ(n)/n = log x + O(1) is supplied by @@ -538,11 +422,11 @@ private lemma Msum_nonneg (t : ℝ) : 0 ≤ Msum t := private lemma M2sum_nonneg (t : ℝ) : 0 ≤ M2sum t := Finset.sum_nonneg fun n _ => div_nonneg (sq_nonneg _) (Nat.cast_nonneg n) -/-- Abel summation with f = log, c n = Λ n / n. -/ -private lemma abel_log_Msum {x : ℝ} (_hx : 1 ≤ x) : - ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * (Λ n / n) - = Real.log x * ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n - - ∫ t in Set.Ioc 1 x, t⁻¹ * Msum t := by +/-- Shared Abel summation with `f = log` for any sequence `c` vanishing at `0`. -/ +private lemma abel_log (c : ℕ → ℝ) (hc0 : c 0 = 0) {x : ℝ} (_hx : 1 ≤ x) : + ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * c n + = Real.log x * ∑ n ∈ Ioc 0 ⌊x⌋₊, c n + - ∫ t in Set.Ioc 1 x, t⁻¹ * ∑ k ∈ Icc 0 ⌊t⌋₊, c k := by have hf_diff : ∀ t ∈ Set.Icc (1 : ℝ) x, DifferentiableAt ℝ Real.log t := fun t ht => Real.differentiableAt_log (by nlinarith [ht.1]) have hf_int : IntegrableOn (deriv Real.log) (Set.Icc 1 x) := by @@ -551,189 +435,103 @@ private lemma abel_log_Msum {x : ℝ} (_hx : 1 ≤ x) : exact continuousOn_inv₀.mono fun t ht => by simp only [Set.mem_compl_iff, Set.mem_singleton_iff] nlinarith [ht.1] - have habel := sum_mul_eq_sub_integral_mul₀ (fun n => Λ n / n) (by simp) x hf_diff hf_int - have hL : ∑ k ∈ Icc 0 ⌊x⌋₊, Real.log k * ((fun n : ℕ => Λ n / n) k) - = ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * (Λ n / n) := by - rw [sum_Icc_eq_sum_Ioc (by simp) ⌊x⌋₊] - have hR : ∑ k ∈ Icc 0 ⌊x⌋₊, (fun n : ℕ => Λ n / n) k - = ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n := by - rw [sum_Icc_eq_sum_Ioc (by simp) ⌊x⌋₊] + have habel := sum_mul_eq_sub_integral_mul₀ c hc0 x hf_diff hf_int + have hL : ∑ k ∈ Icc 0 ⌊x⌋₊, Real.log k * c k + = ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * c n := by + rw [sum_Icc_eq_sum_Ioc (by simp [hc0]) ⌊x⌋₊] + have hR : ∑ k ∈ Icc 0 ⌊x⌋₊, c k = ∑ n ∈ Ioc 0 ⌊x⌋₊, c n := by + rw [sum_Icc_eq_sum_Ioc hc0 ⌊x⌋₊] rw [hL, hR] at habel rw [habel] congr 1 refine setIntegral_congr_fun measurableSet_Ioc fun t _ => ?_ rw [Real.deriv_log] - rfl + +/-- Abel summation with f = log, c n = Λ n / n. -/ +private lemma abel_log_Msum {x : ℝ} (hx : 1 ≤ x) : + ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * (Λ n / n) + = Real.log x * ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n + - ∫ t in Set.Ioc 1 x, t⁻¹ * Msum t := + abel_log (fun n => Λ n / n) (by simp) hx /-- Abel summation with f = log, c n = Λ n ^ 2 / n. -/ -private lemma abel_log_M2sum {x : ℝ} (_hx : 1 ≤ x) : +private lemma abel_log_M2sum {x : ℝ} (hx : 1 ≤ x) : ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * (Λ n ^ 2 / n) = Real.log x * ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n ^ 2 / n - - ∫ t in Set.Ioc 1 x, t⁻¹ * M2sum t := by - have hf_diff : ∀ t ∈ Set.Icc (1 : ℝ) x, DifferentiableAt ℝ Real.log t := fun t ht => - Real.differentiableAt_log (by nlinarith [ht.1]) - have hf_int : IntegrableOn (deriv Real.log) (Set.Icc 1 x) := by - rw [Real.deriv_log'] - refine ContinuousOn.integrableOn_Icc ?_ - exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - have habel := sum_mul_eq_sub_integral_mul₀ (fun n => Λ n ^ 2 / n) (by simp) x hf_diff hf_int - have hL : ∑ k ∈ Icc 0 ⌊x⌋₊, Real.log k * ((fun n : ℕ => Λ n ^ 2 / n) k) - = ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * (Λ n ^ 2 / n) := by - rw [sum_Icc_eq_sum_Ioc (by simp) ⌊x⌋₊] - have hR : ∑ k ∈ Icc 0 ⌊x⌋₊, (fun n : ℕ => Λ n ^ 2 / n) k - = ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n ^ 2 / n := by - rw [sum_Icc_eq_sum_Ioc (by simp) ⌊x⌋₊] - rw [hL, hR] at habel - rw [habel] - congr 1 - refine setIntegral_congr_fun measurableSet_Ioc fun t _ => ?_ - rw [Real.deriv_log] - rfl - -private lemma integral_inv_Ioc {x : ℝ} (hx : 1 ≤ x) : - ∫ t in Set.Ioc 1 x, t⁻¹ = Real.log x := by - rw [← intervalIntegral.integral_of_le hx, integral_inv ?h] - · rw [div_one] - case h => - rw [Set.uIcc_of_le hx] - intro h - rw [Set.mem_Icc] at h - linarith [h.1] - -private lemma integral_inv_mul_log {x : ℝ} (hx : 1 ≤ x) : - ∫ t in Set.Ioc 1 x, t⁻¹ * Real.log t = Real.log x ^ 2 / 2 := by - rw [← intervalIntegral.integral_of_le hx] - have hftc : ∀ t ∈ Set.uIcc (1 : ℝ) x, - HasDerivAt (fun t : ℝ => Real.log t ^ 2 / 2) (t⁻¹ * Real.log t) t := by - intro t ht - rw [Set.uIcc_of_le hx] at ht - have ht0 : t ≠ 0 := by nlinarith [ht.1] - have h := ((Real.hasDerivAt_log ht0).pow 2).div_const 2 - have heq : t⁻¹ * Real.log t = ((2 : ℕ) : ℝ) * Real.log t ^ (2 - 1) * t⁻¹ / 2 := by - push_cast - ring - rw [heq] - exact h - have hint : IntervalIntegrable (fun t : ℝ => t⁻¹ * Real.log t) volume 1 x := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le hx] - refine ContinuousOn.mul ?_ ?_ - · exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - · exact fun t ht => (Real.continuousAt_log (by nlinarith [ht.1])).continuousWithinAt - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hftc hint] - simp [Real.log_one] - -private lemma integral_inv_mul_log_sq {x : ℝ} (hx : 1 ≤ x) : - ∫ t in Set.Ioc 1 x, t⁻¹ * Real.log t ^ 2 = Real.log x ^ 3 / 3 := by - rw [← intervalIntegral.integral_of_le hx] - have hlogcont : ContinuousOn Real.log (Set.Icc 1 x) := fun t ht => - (Real.continuousAt_log (by nlinarith [ht.1])).continuousWithinAt - have hftc : ∀ t ∈ Set.uIcc (1 : ℝ) x, - HasDerivAt (fun t : ℝ => Real.log t ^ 3 / 3) (t⁻¹ * Real.log t ^ 2) t := by - intro t ht - rw [Set.uIcc_of_le hx] at ht - have ht0 : t ≠ 0 := by nlinarith [ht.1] - have h := ((Real.hasDerivAt_log ht0).pow 3).div_const 3 - have heq : t⁻¹ * Real.log t ^ 2 = ((3 : ℕ) : ℝ) * Real.log t ^ (3 - 1) * t⁻¹ / 3 := by - push_cast - ring - rw [heq] - exact h - have hint : IntervalIntegrable (fun t : ℝ => t⁻¹ * Real.log t ^ 2) volume 1 x := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le hx] - refine ContinuousOn.mul ?_ (hlogcont.pow 2) - exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hftc hint] - simp [Real.log_one] + - ∫ t in Set.Ioc 1 x, t⁻¹ * M2sum t := + abel_log (fun n => Λ n ^ 2 / n) (by simp) hx /-- Integrability of t⁻¹·M on (1, x] for a monotone nonnegative M. -/ private lemma integrableOn_inv_mul_mono {M : ℝ → ℝ} (hmono : Monotone M) - (hnn : ∀ t, 0 ≤ M t) {x : ℝ} (_hx : 1 ≤ x) : + (hnn : ∀ t, 0 ≤ M t) {x : ℝ} : IntegrableOn (fun t : ℝ => t⁻¹ * M t) (Set.Ioc 1 x) := by - refine Integrable.mono' (g := fun _ => M x) - (integrableOn_const (by simp)) ?_ ?_ - · exact (measurable_inv.mul hmono.measurable).aestronglyMeasurable.restrict - · filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht - have ht1 : (1 : ℝ) < t := ht.1 - have hti : t⁻¹ ≤ 1 := by - rw [inv_le_one_iff₀] - right; linarith - have h0 : (0 : ℝ) ≤ t⁻¹ := by positivity - rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg h0 (hnn t))] - calc t⁻¹ * M t ≤ 1 * M t := mul_le_mul_of_nonneg_right hti (hnn t) - _ = M t := one_mul _ - _ ≤ M x := hmono ht.2 + refine Integrable.mono' (g := fun _ => M x) (integrableOn_const (by simp)) + (measurable_inv.mul hmono.measurable).aestronglyMeasurable.restrict ?_ + filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht + have ht0 : (0 : ℝ) < t := by linarith [ht.1] + have hti : t⁻¹ ≤ 1 := inv_le_one_of_one_le₀ ht.1.le + rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (by positivity) (hnn t))] + exact (mul_le_of_le_one_left (hnn t) hti).trans (hmono ht.2) + +/-- Generic Abel-log integral asymptotic: if `M` is monotone nonnegative and +`|M t - a · (log t)^d| ≤ A · (log t)^e + B` on `(1, x]`, then +`∫₁ˣ M(t)/t dt = a · (log x)^(d+1)/(d+1) + O(A · (log x)^(e+1)/(e+1) + B · log x)`. -/ +private lemma abel_log_asymptotic {M : ℝ → ℝ} (hmono : Monotone M) (hnn : ∀ t, 0 ≤ M t) + {x : ℝ} (hx : 1 ≤ x) (d : ℕ) (a : ℝ) (e : ℕ) (A B : ℝ) + (hM : ∀ t ∈ Set.Ioc (1 : ℝ) x, |M t - a * Real.log t ^ d| ≤ A * Real.log t ^ e + B) : + |(∫ t in Set.Ioc 1 x, t⁻¹ * M t) - a * (Real.log x ^ (d + 1) / (d + 1 : ℝ))| + ≤ A * (Real.log x ^ (e + 1) / (e + 1 : ℝ)) + B * Real.log x := by + have hint_M : IntegrableOn (fun t : ℝ => t⁻¹ * M t) (Set.Ioc 1 x) := + integrableOn_inv_mul_mono hmono hnn + have hint_main : IntegrableOn (fun t : ℝ => a * (t⁻¹ * Real.log t ^ d)) (Set.Ioc 1 x) := + (integrableOn_inv_mul_log_pow d).const_mul a + have hint_err : IntegrableOn (fun t : ℝ => A * (t⁻¹ * Real.log t ^ e) + B * (t⁻¹ * Real.log t ^ 0)) + (Set.Ioc 1 x) := + ((integrableOn_inv_mul_log_pow e).const_mul A).add ((integrableOn_inv_mul_log_pow 0).const_mul B) + have hsub : (∫ t in Set.Ioc 1 x, t⁻¹ * M t) - a * (Real.log x ^ (d + 1) / (d + 1 : ℝ)) + = ∫ t in Set.Ioc 1 x, t⁻¹ * (M t - a * Real.log t ^ d) := by + rw [← integral_inv_mul_log_pow d hx, ← MeasureTheory.integral_const_mul, + ← MeasureTheory.integral_sub hint_M hint_main] + exact setIntegral_congr_fun measurableSet_Ioc fun t _ => by ring + rw [hsub] + have hb : ∀ᵐ t ∂(volume.restrict (Set.Ioc 1 x)), + ‖t⁻¹ * (M t - a * Real.log t ^ d)‖ ≤ A * (t⁻¹ * Real.log t ^ e) + B * (t⁻¹ * Real.log t ^ 0) := by + filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht + have ht0 : (0 : ℝ) < t := by linarith [ht.1] + have hti : (0 : ℝ) ≤ t⁻¹ := by positivity + rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg hti, pow_zero, mul_one] + calc t⁻¹ * |M t - a * Real.log t ^ d| ≤ t⁻¹ * (A * Real.log t ^ e + B) := + mul_le_mul_of_nonneg_left (hM t ht) hti + _ = A * (t⁻¹ * Real.log t ^ e) + B * t⁻¹ := by ring + calc |∫ t in Set.Ioc 1 x, t⁻¹ * (M t - a * Real.log t ^ d)| + ≤ ∫ t in Set.Ioc 1 x, (A * (t⁻¹ * Real.log t ^ e) + B * (t⁻¹ * Real.log t ^ 0)) := by + rw [← Real.norm_eq_abs]; exact norm_integral_le_of_norm_le hint_err hb + _ = A * (Real.log x ^ (e + 1) / (e + 1 : ℝ)) + B * Real.log x := by + rw [MeasureTheory.integral_add ((integrableOn_inv_mul_log_pow e).const_mul A) + ((integrableOn_inv_mul_log_pow 0).const_mul B), + MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul, + integral_inv_mul_log_pow e hx, integral_inv_mul_log_pow 0 hx] + norm_num /-- Partial summation step: Σ_{n≤x} log n · Λ(n)/n = (log x)²/2 + O(log x). -/ private lemma sum_log_mul_vonMangoldt_div_bound {x : ℝ} (hx : 1 ≤ x) : |(∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * (Λ n / n)) - Real.log x ^ 2 / 2| ≤ 2 * (Real.log 4 + 4) * Real.log x := by - set K : ℝ := Real.log 4 + 4 with hK - have hKpos : (0 : ℝ) < K := by rw [hK]; positivity - have hlx : (0 : ℝ) ≤ Real.log x := Real.log_nonneg hx - have hMert : ∀ t : ℝ, 1 ≤ t → |Msum t - Real.log t| ≤ K := fun t ht => by - rw [Msum_eq_Ioc] - exact mertensFirst ht - have habel := abel_log_Msum hx - have hint_log : IntegrableOn (fun t : ℝ => t⁻¹ * Real.log t) (Set.Ioc 1 x) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Set.Ioc_subset_Icc_self - refine ContinuousOn.mul ?_ ?_ - · exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - · exact fun t ht => (Real.continuousAt_log (by nlinarith [ht.1])).continuousWithinAt - have hint_M : IntegrableOn (fun t : ℝ => t⁻¹ * Msum t) (Set.Ioc 1 x) := - integrableOn_inv_mul_mono Msum_mono Msum_nonneg hx - have hint_inv : IntegrableOn (fun t : ℝ => t⁻¹) (Set.Ioc 1 x) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Set.Ioc_subset_Icc_self - exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - have hint_diff : IntegrableOn (fun t : ℝ => t⁻¹ * (Msum t - Real.log t)) (Set.Ioc 1 x) := - ((hint_M.sub hint_log).congr_fun - (fun t _ => by simp only [Pi.sub_apply]; ring) measurableSet_Ioc) - have hsplit : ∫ t in Set.Ioc 1 x, t⁻¹ * Msum t - = (∫ t in Set.Ioc 1 x, t⁻¹ * Real.log t) - + ∫ t in Set.Ioc 1 x, t⁻¹ * (Msum t - Real.log t) := by - rw [← MeasureTheory.integral_add hint_log hint_diff] - exact setIntegral_congr_fun measurableSet_Ioc fun t _ => by ring - have hE : |∫ t in Set.Ioc 1 x, t⁻¹ * (Msum t - Real.log t)| ≤ K * Real.log x := by - have hb : ∀ᵐ t ∂(volume.restrict (Set.Ioc 1 x)), - ‖t⁻¹ * (Msum t - Real.log t)‖ ≤ K * t⁻¹ := by - filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht - have ht1 : (1 : ℝ) ≤ t := ht.1.le - have ht0 : (0 : ℝ) < t := lt_of_lt_of_le one_pos ht1 - rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ t⁻¹), - mul_comm K t⁻¹] - exact mul_le_mul_of_nonneg_left (hMert t ht1) (by positivity) - calc |∫ t in Set.Ioc 1 x, t⁻¹ * (Msum t - Real.log t)| - ≤ ∫ t in Set.Ioc 1 x, K * t⁻¹ := by - rw [← Real.norm_eq_abs] - exact norm_integral_le_of_norm_le (hint_inv.const_mul K) hb - _ = K * ∫ t in Set.Ioc 1 x, t⁻¹ := MeasureTheory.integral_const_mul K _ - _ = K * Real.log x := by rw [integral_inv_Ioc hx] - have hMx : |(∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - Real.log x| ≤ K := mertensFirst hx - rw [habel, hsplit, integral_inv_mul_log hx] - have harr : Real.log x * (∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - - (Real.log x ^ 2 / 2 + ∫ t in Set.Ioc 1 x, t⁻¹ * (Msum t - Real.log t)) - - Real.log x ^ 2 / 2 - = Real.log x * ((∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - Real.log x) - - ∫ t in Set.Ioc 1 x, t⁻¹ * (Msum t - Real.log t) := by ring - rw [harr] + set K : ℝ := Real.log 4 + 4 + have hlx : 0 ≤ Real.log x := Real.log_nonneg hx + have hE : |(∫ t in Set.Ioc 1 x, t⁻¹ * Msum t) - Real.log x ^ 2 / 2| ≤ K * Real.log x := by + have h := abel_log_asymptotic Msum_mono Msum_nonneg hx 1 1 0 0 K fun t ht => by + simpa [Msum_eq_Ioc] using mertensFirst ht.1.le + convert h using 2 <;> norm_num have h1 : |Real.log x * ((∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - Real.log x)| ≤ Real.log x * K := by rw [abs_mul, abs_of_nonneg hlx] - exact mul_le_mul_of_nonneg_left hMx hlx - calc |Real.log x * ((∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - Real.log x) - - ∫ t in Set.Ioc 1 x, t⁻¹ * (Msum t - Real.log t)| - ≤ |Real.log x * ((∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - Real.log x)| - + |∫ t in Set.Ioc 1 x, t⁻¹ * (Msum t - Real.log t)| := abs_sub _ _ + exact mul_le_mul_of_nonneg_left (mertensFirst hx) hlx + rw [abel_log_Msum hx, + show Real.log x * (∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - (∫ t in Set.Ioc 1 x, t⁻¹ * Msum t) - Real.log x ^ 2 / 2 + = Real.log x * ((∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - Real.log x) + - ((∫ t in Set.Ioc 1 x, t⁻¹ * Msum t) - Real.log x ^ 2 / 2) by ring] + calc _ ≤ |Real.log x * ((∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n / n) - Real.log x)| + + |(∫ t in Set.Ioc 1 x, t⁻¹ * Msum t) - Real.log x ^ 2 / 2| := abs_sub _ _ _ ≤ Real.log x * K + K * Real.log x := add_le_add h1 hE _ = 2 * K * Real.log x := by ring @@ -988,12 +786,6 @@ lemma defect_bounded_explicit : ∀ x : ℝ, have h2 := sum_k_mul_half_pow_le ⌊Real.log x / Real.log 2⌋₊ nlinarith [h2, hBnn, hB3] -/-- The defect sum is bounded by an absolute constant (from the explicit bound). -/ -private lemma defect_bounded : - ∃ C : ℝ, 0 < C ∧ ∀ x : ℝ, - ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n * (Real.log n - Λ n) / n ≤ C := - ⟨1537, by norm_num, defect_bounded_explicit⟩ - /-- [eq:cheb2].1 with the constant explicit: C2a = 2(log 4 + 4) + 1537/log 2 (≤ 2230). -/ theorem sum_vonMangoldt_sq_div_eq_explicit : ∀ x : ℝ, 2 ≤ x → |(∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n ^ 2 / n) - Real.log x ^ 2 / 2| @@ -1048,136 +840,40 @@ theorem sum_vonMangoldt_sq_div_mul_log_sub_eq_explicit : ∀ x : ℝ, 2 ≤ x |(∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n ^ 2 / n * (Real.log x - Real.log n)) - Real.log x ^ 3 / 6| ≤ ((2 * (Real.log 4 + 4) + 1537 / Real.log 2) / 2 + 1 / Real.log 2) * Real.log x ^ 2 := by - set C2 : ℝ := 2 * (Real.log 4 + 4) + 1537 / Real.log 2 with hC2def + set C2 : ℝ := 2 * (Real.log 4 + 4) + 1537 / Real.log 2 have hlog2pos : (0 : ℝ) < Real.log 2 := Real.log_pos one_lt_two - have hC2 : ∀ y : ℝ, 2 ≤ y → |(∑ n ∈ Ioc 0 ⌊y⌋₊, Λ n ^ 2 / n) - Real.log y ^ 2 / 2| - ≤ C2 * Real.log y := by - intro y hy - rw [hC2def] - exact sum_vonMangoldt_sq_div_eq_explicit y hy - have hC20 : (0:ℝ) < C2 := by - rw [hC2def] - have h4 : (0:ℝ) ≤ Real.log 4 := Real.log_nonneg (by norm_num) - positivity + have hC20 : (0 : ℝ) < C2 := by have : 0 ≤ Real.log 4 := Real.log_nonneg (by norm_num); positivity intro x hx - show _ ≤ (C2 / 2 + 1 / Real.log 2) * Real.log x ^ 2 have hx1 : (1 : ℝ) ≤ x := by linarith have hlx : (0 : ℝ) < Real.log x := Real.log_pos (by linarith) - -- the target sum equals ∫ t⁻¹ M2sum t - have habel := abel_log_M2sum hx1 have hident : ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n ^ 2 / n * (Real.log x - Real.log n) = ∫ t in Set.Ioc 1 x, t⁻¹ * M2sum t := by have e1 : ∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n ^ 2 / n * (Real.log x - Real.log n) - = Real.log x * (∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n ^ 2 / n) - - ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * (Λ n ^ 2 / n) := by + = Real.log x * (∑ n ∈ Ioc 0 ⌊x⌋₊, Λ n ^ 2 / n) - ∑ n ∈ Ioc 0 ⌊x⌋₊, Real.log n * (Λ n ^ 2 / n) := by rw [Finset.mul_sum, ← Finset.sum_sub_distrib] - exact Finset.sum_congr rfl fun n _ => by ring - rw [e1, habel] - ring + exact Finset.sum_congr rfl fun _ _ => by ring + linarith [abel_log_M2sum hx1, e1] rw [hident] - -- pointwise bound for the error density on (1, x] - have hM2b : ∀ t ∈ Set.Ioc (1 : ℝ) x, - |M2sum t - Real.log t ^ 2 / 2| ≤ C2 * Real.log t + 1 := by - intro t ht - have hlt0 : (0 : ℝ) ≤ Real.log t := Real.log_nonneg ht.1.le + have hE := abel_log_asymptotic M2sum_mono M2sum_nonneg hx1 2 (1 / 2) 1 C2 1 fun t ht => by + have hlt0 : 0 ≤ Real.log t := Real.log_nonneg ht.1.le rcases le_or_gt 2 t with h2 | h2 - · have h := hC2 t h2 - rw [M2sum_eq_Ioc] - have hC2log : (0 : ℝ) ≤ C2 * Real.log t := mul_nonneg hC20.le hlt0 - calc |(∑ n ∈ Ioc 0 ⌊t⌋₊, Λ n ^ 2 / n) - Real.log t ^ 2 / 2| ≤ C2 * Real.log t := h - _ ≤ C2 * Real.log t + 1 := by linarith - · have ht1 : (1 : ℝ) < t := ht.1 - have hfl : ⌊t⌋₊ = 1 := by - rw [Nat.floor_eq_iff (by linarith : (0 : ℝ) ≤ t)] - constructor - · exact_mod_cast ht1.le - · exact_mod_cast (by linarith : t < 1 + 1) + · rw [M2sum_eq_Ioc, show (1 / 2 : ℝ) * Real.log t ^ 2 = Real.log t ^ 2 / 2 by ring, pow_one] + linarith [sum_vonMangoldt_sq_div_eq_explicit t h2] + · have hfl : ⌊t⌋₊ = 1 := (Nat.floor_eq_iff (by linarith [ht.1])).mpr ⟨by exact_mod_cast ht.1.le, by exact_mod_cast (by linarith : t < 1 + 1)⟩ have hM20 : M2sum t = 0 := by - rw [M2sum_eq_Ioc, hfl] - rw [show Finset.Ioc 0 1 = {1} from rfl] - simp [vonMangoldt_apply_one] - rw [hM20, zero_sub, abs_neg, abs_of_nonneg (by positivity)] - have hlt2 : Real.log t ≤ Real.log 2 := Real.log_le_log (by linarith) h2.le - have hl21 : Real.log 2 < 1 := by nlinarith [Real.log_two_lt_d9] - nlinarith [mul_nonneg hC20.le hlt0] - -- integrabilities - have hcont_logsq : IntegrableOn (fun t : ℝ => t⁻¹ * (Real.log t ^ 2 / 2)) (Set.Ioc 1 x) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Set.Ioc_subset_Icc_self - have hlogcont : ContinuousOn Real.log (Set.Icc 1 x) := fun t ht => - (Real.continuousAt_log (by nlinarith [ht.1])).continuousWithinAt - refine ContinuousOn.mul ?_ ((hlogcont.pow 2).div_const 2) - exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - have hint_M2 : IntegrableOn (fun t : ℝ => t⁻¹ * M2sum t) (Set.Ioc 1 x) := - integrableOn_inv_mul_mono M2sum_mono M2sum_nonneg hx1 - have hint_diff : IntegrableOn - (fun t : ℝ => t⁻¹ * (M2sum t - Real.log t ^ 2 / 2)) (Set.Ioc 1 x) := - ((hint_M2.sub hcont_logsq).congr_fun - (fun t _ => by simp only [Pi.sub_apply]; ring) measurableSet_Ioc) - have hsplit : ∫ t in Set.Ioc 1 x, t⁻¹ * M2sum t - = (∫ t in Set.Ioc 1 x, t⁻¹ * (Real.log t ^ 2 / 2)) - + ∫ t in Set.Ioc 1 x, t⁻¹ * (M2sum t - Real.log t ^ 2 / 2) := by - rw [← MeasureTheory.integral_add hcont_logsq hint_diff] - exact setIntegral_congr_fun measurableSet_Ioc fun t _ => by ring - have hval : ∫ t in Set.Ioc 1 x, t⁻¹ * (Real.log t ^ 2 / 2) = Real.log x ^ 3 / 6 := by - have e : ∫ t in Set.Ioc 1 x, t⁻¹ * (Real.log t ^ 2 / 2) - = ∫ t in Set.Ioc 1 x, (t⁻¹ * Real.log t ^ 2) * (1 / 2) := - setIntegral_congr_fun measurableSet_Ioc fun t _ => by ring - rw [e, MeasureTheory.integral_mul_const, integral_inv_mul_log_sq hx1] - ring - -- error bound - have hint_invlog : IntegrableOn (fun t : ℝ => t⁻¹ * Real.log t) (Set.Ioc 1 x) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Set.Ioc_subset_Icc_self - refine ContinuousOn.mul ?_ ?_ - · exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - · exact fun t ht => (Real.continuousAt_log (by nlinarith [ht.1])).continuousWithinAt - have hint_inv : IntegrableOn (fun t : ℝ => t⁻¹) (Set.Ioc 1 x) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Set.Ioc_subset_Icc_self - exact continuousOn_inv₀.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - nlinarith [ht.1] - have hE : |∫ t in Set.Ioc 1 x, t⁻¹ * (M2sum t - Real.log t ^ 2 / 2)| + rw [M2sum_eq_Ioc, hfl, show Finset.Ioc 0 1 = {1} from rfl]; simp [vonMangoldt_apply_one] + rw [hM20, zero_sub, abs_neg, abs_of_nonneg (by positivity), pow_one] + have hlt2 : Real.log t ≤ Real.log 2 := Real.log_le_log (by linarith [ht.1]) h2.le + nlinarith [Real.log_two_lt_d9, mul_nonneg hC20.le hlt0] + have hlogx2 : Real.log x ≤ Real.log x ^ 2 / Real.log 2 := + (le_div_iff₀ hlog2pos).mpr (by nlinarith [Real.log_le_log two_pos hx, hlx]) + have hE' : |(∫ t in Set.Ioc 1 x, t⁻¹ * M2sum t) - Real.log x ^ 3 / 6| ≤ C2 * (Real.log x ^ 2 / 2) + Real.log x := by - have hg_int : IntegrableOn (fun t : ℝ => C2 * (t⁻¹ * Real.log t) + t⁻¹) (Set.Ioc 1 x) := - (hint_invlog.const_mul C2).add hint_inv - have hb : ∀ᵐ t ∂(volume.restrict (Set.Ioc 1 x)), - ‖t⁻¹ * (M2sum t - Real.log t ^ 2 / 2)‖ ≤ C2 * (t⁻¹ * Real.log t) + t⁻¹ := by - filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht - have ht1 : (1 : ℝ) ≤ t := ht.1.le - have ht0 : (0 : ℝ) < t := lt_of_lt_of_le one_pos ht1 - have hti : (0 : ℝ) ≤ t⁻¹ := by positivity - rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg hti] - calc t⁻¹ * |M2sum t - Real.log t ^ 2 / 2| ≤ t⁻¹ * (C2 * Real.log t + 1) := - mul_le_mul_of_nonneg_left (hM2b t ht) hti - _ = C2 * (t⁻¹ * Real.log t) + t⁻¹ := by ring - calc |∫ t in Set.Ioc 1 x, t⁻¹ * (M2sum t - Real.log t ^ 2 / 2)| - ≤ ∫ t in Set.Ioc 1 x, (C2 * (t⁻¹ * Real.log t) + t⁻¹) := by - rw [← Real.norm_eq_abs] - exact norm_integral_le_of_norm_le hg_int hb - _ = C2 * (∫ t in Set.Ioc 1 x, t⁻¹ * Real.log t) + ∫ t in Set.Ioc 1 x, t⁻¹ := by - rw [MeasureTheory.integral_add (hint_invlog.const_mul C2) hint_inv, - MeasureTheory.integral_const_mul] - _ = C2 * (Real.log x ^ 2 / 2) + Real.log x := by - rw [integral_inv_mul_log hx1, integral_inv_Ioc hx1] - -- assemble - rw [hsplit, hval] - have harr : Real.log x ^ 3 / 6 - + (∫ t in Set.Ioc 1 x, t⁻¹ * (M2sum t - Real.log t ^ 2 / 2)) - - Real.log x ^ 3 / 6 - = ∫ t in Set.Ioc 1 x, t⁻¹ * (M2sum t - Real.log t ^ 2 / 2) := by ring - rw [harr] - have hlogx2 : Real.log x ≤ Real.log x ^ 2 / Real.log 2 := by - rw [le_div_iff₀ hlog2pos] - have : Real.log 2 ≤ Real.log x := Real.log_le_log two_pos hx - nlinarith [hlx] - calc |∫ t in Set.Ioc 1 x, t⁻¹ * (M2sum t - Real.log t ^ 2 / 2)| - ≤ C2 * (Real.log x ^ 2 / 2) + Real.log x := hE + convert hE using 2 <;> ring + calc |(∫ t in Set.Ioc 1 x, t⁻¹ * M2sum t) - Real.log x ^ 3 / 6| + ≤ C2 * (Real.log x ^ 2 / 2) + Real.log x := hE' _ ≤ C2 * (Real.log x ^ 2 / 2) + Real.log x ^ 2 / Real.log 2 := by linarith - _ = (C2 / 2 + 1 / Real.log 2) * Real.log x ^ 2 := by - field_simp + _ = (C2 / 2 + 1 / Real.log 2) * Real.log x ^ 2 := by field_simp /-- [eq:cheb2].2: Σ_{n≤x} (Λ(n)²/n)(log x − log n) = (log x)³/6 + O((log x)²). Paper [lem:cheb]: "The second formula is ∫₁ˣ (Σ_{n≤t} Λ(n)²/n) dt/t." (From the explicit-constant version.) -/ diff --git a/zeta23/Zeta23/Defs.lean b/zeta23/Zeta23/Defs.lean index 8024700cbf..d1e78ef80b 100644 --- a/zeta23/Zeta23/Defs.lean +++ b/zeta23/Zeta23/Defs.lean @@ -63,10 +63,6 @@ def D0 (T : ℝ) : ℝ := Real.sqrt T /-- I := [T, 2T] [Notation]. -/ def Iwin (T : ℝ) : Set ℝ := Icc T (2 * T) -/-- I' := (T − D₀, 2T + D₀] [eq:D0]. -/ -def Iprime (T : ℝ) : Set ℝ := Ioc (T - D0 T) (2 * T + D0 T) - -lemma Hfun_one : Hfun 1 = 2 / 3 := by norm_num [Hfun] lemma Ffun_one : Ffun 1 = 3 / 4 := by norm_num [Ffun] /-! ## 2. The densities μ, Π_X, P_X, ν_X [eq:mudef]–[eq:nudef] diff --git a/zeta23/Zeta23/Defs/Counting.lean b/zeta23/Zeta23/Defs/Counting.lean index fdd946ca26..d384ecdc96 100644 --- a/zeta23/Zeta23/Defs/Counting.lean +++ b/zeta23/Zeta23/Defs/Counting.lean @@ -63,4 +63,59 @@ lemma Nd_le_N : Z.Nd T₁ T₂ ≤ Z.N T₁ T₂ := (Z.trivial_chain T₁ T₂). lemma N0star_le_Nd : Z.N0star T₁ T₂ ≤ Z.Nd T₁ T₂ := Z.ncard_mono T₁ T₂ inter_subset_left subset_rfl +/-- Window splitting: `(a, c] = (a, b] ∪ (b, c]` for `a ≤ b ≤ c`. -/ +lemma window_union {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : + Z.window a c = Z.window a b ∪ Z.window b c := by + ext ρ + simp only [ZeroConfig.window, mem_inter_iff, mem_ofPred_eq, mem_union] + constructor + · rintro ⟨h, h1, h2⟩ + rcases le_or_gt ρ.im b with hb | hb + · exact Or.inl ⟨h, h1, hb⟩ + · exact Or.inr ⟨h, hb, h2⟩ + · rintro (⟨h, h1, h2⟩ | ⟨h, h1, h2⟩) + · exact ⟨h, h1, h2.trans hbc⟩ + · exact ⟨h, lt_of_le_of_lt hab h1, h2⟩ + +/-- Adjacent windows `(a, b]` and `(b, c]` are disjoint. -/ +lemma window_disjoint (a b c : ℝ) : Disjoint (Z.window a b) (Z.window b c) := by + rw [Set.disjoint_left] + rintro ρ ⟨_, _, h2⟩ ⟨_, h1, _⟩ + exact absurd h1 (not_lt.2 h2) + +/-- Interval additivity of `N` (with multiplicity): `N(a, c] = N(a, b] + N(b, c]`. -/ +lemma N_add {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : Z.N a c = Z.N a b + Z.N b c := by + unfold ZeroConfig.N + rw [Z.window_union hab hbc, finsum_mem_union (Z.window_disjoint a b c) + (Z.window_finite a b) (Z.window_finite b c)] + +/-- Window monotonicity: `(a, b] ⊆ (c, d]` implies `N(a, b] ≤ N(c, d]`. -/ +lemma N_mono {a b c d : ℝ} (hca : c ≤ a) (hbd : b ≤ d) : Z.N a b ≤ Z.N c d := by + refine Z.finsum_mult_mono c d ?_ subset_rfl + rintro ρ ⟨hρ, ha, hb⟩ + exact ⟨hρ, lt_of_le_of_lt hca ha, le_trans hb hbd⟩ + end Zeta23.ZeroConfig + +namespace Zeta23 + +/-- Classical seam facts needed to package a zero set `P` with multiplicity `mult` as a +`ZeroConfig` (shared by `ZetaSeam`, `ThmE.LSeam`, and `XiPrime.XiDerivSeam`). -/ +structure ZeroSeam (P : ℂ → Prop) (mult : ℂ → ℕ) : Prop where + one_le_mult : ∀ ρ, P ρ → 1 ≤ mult ρ + reflect_zero : ∀ ρ, P ρ → P (reflect ρ) + mult_reflect : ∀ ρ, P ρ → mult (reflect ρ) = mult ρ + finite_window : ∀ T₁ T₂ : ℝ, ({ρ | P ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}).Finite + +/-- Build a `ZeroConfig` from a `ZeroSeam` and the strip bound `0 ≤ Re ρ ≤ 1`. -/ +def ZeroSeam.toZeroConfig {P : ℂ → Prop} {mult : ℂ → ℕ} (hs : ZeroSeam P mult) + (hstrip : ∀ ρ, P ρ → 0 ≤ ρ.re ∧ ρ.re ≤ 1) : ZeroConfig where + carrier := {ρ | P ρ} + mult := mult + one_le_mult := hs.one_le_mult + strip := hstrip + reflect_mem := hs.reflect_zero + mult_reflect := hs.mult_reflect + finite_window := hs.finite_window + +end Zeta23 diff --git a/zeta23/Zeta23/Defs/LeafIntegrals.lean b/zeta23/Zeta23/Defs/LeafIntegrals.lean index a5efa2fe3e..f175cb91d7 100644 --- a/zeta23/Zeta23/Defs/LeafIntegrals.lean +++ b/zeta23/Zeta23/Defs/LeafIntegrals.lean @@ -46,31 +46,16 @@ lemma integral_left (T : ℝ) (hT : 0 < T) : have : 0 < (1 + T)⁻¹ := by positivity linarith -/-- ∫_T^{2T} ((1+(2T−τ))²)⁻¹ dτ = 1 − 1/(1+T) ≤ 1 -/ +/-- ∫_T^{2T} ((1+(2T−τ))²)⁻¹ dτ = 1 − 1/(1+T) ≤ 1 +(via the substitution τ ↦ 3T − τ reducing to `integral_left`). -/ lemma integral_right (T : ℝ) (hT : 0 < T) : ∫ τ in T..(2 * T), ((1 + (2 * T - τ)) ^ 2)⁻¹ ≤ 1 := by - have hderiv : ∀ x ∈ uIcc T (2 * T), - HasDerivAt (fun τ : ℝ => (1 + (2 * T - τ))⁻¹) (((1 + (2 * T - x)) ^ 2)⁻¹) x := by - intro x hx - rw [uIcc_of_le (by linarith)] at hx - have hpos : (1 + (2 * T - x)) ≠ 0 := by linarith [hx.2] - have h1 : HasDerivAt (fun τ : ℝ => 1 + (2 * T - τ)) (-1) x := by - simpa using ((hasDerivAt_id x).const_sub (2 * T)).const_add 1 - have h2 := h1.inv hpos - have heq : -(-1) / (1 + (2 * T - x)) ^ 2 = ((1 + (2 * T - x)) ^ 2)⁻¹ := by - rw [neg_neg, one_div] - exact heq ▸ h2 - have hcont : ContinuousOn (fun x : ℝ => ((1 + (2 * T - x)) ^ 2)⁻¹) (uIcc T (2 * T)) := by - rw [uIcc_of_le (by linarith)] - apply ContinuousOn.inv₀ (by fun_prop) - intro x hx; have : 0 < 1 + (2 * T - x) := by linarith [hx.2] - positivity - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hderiv (hcont.intervalIntegrable)] - have h1T : 0 < 1 + T := by linarith - rw [show 2 * T - 2 * T = (0:ℝ) by ring, show 2 * T - T = T by ring] - simp only [add_zero, inv_one] - have : 0 < (1 + T)⁻¹ := by positivity - linarith + convert integral_left T hT using 1 + have h := intervalIntegral.integral_comp_sub_left + (fun u : ℝ => ((1 + (u - T)) ^ 2)⁻¹) (3 * T) (a := T) (b := 2 * T) + -- ∫_T^{2T} f(3T − τ) = ∫_T^{2T} f, and f(3T − τ) = ((1+(2T−τ))²)⁻¹ + simpa [show (3:ℝ) * T = T + 2 * T by ring, sub_add_eq_sub_sub_swap, + sub_sub, two_mul] using h /-- the (Ig) core: ∫_{[T,2T]} (1 + min(τ−T, 2T−τ))⁻² dτ ≤ 2. -/ theorem Ig_core (T : ℝ) (hT : 0 < T) : diff --git a/zeta23/Zeta23/Defs/Profile.lean b/zeta23/Zeta23/Defs/Profile.lean index 5a1345a9f2..8e8e67db95 100644 --- a/zeta23/Zeta23/Defs/Profile.lean +++ b/zeta23/Zeta23/Defs/Profile.lean @@ -28,7 +28,4 @@ def stdProfile : ℝ → ℝ := Real.smoothTransition theorem taperProfile_stdProfile : TaperProfile stdProfile := taperProfile_smoothTransition -/-- "such a ϱ exists". -/ -theorem exists_taperProfile : ∃ ϱ : ℝ → ℝ, TaperProfile ϱ := ⟨_, taperProfile_smoothTransition⟩ - end Zeta23 diff --git a/zeta23/Zeta23/ExplicitFormula.lean b/zeta23/Zeta23/ExplicitFormula.lean index 1111948955..23c77fab54 100644 --- a/zeta23/Zeta23/ExplicitFormula.lean +++ b/zeta23/Zeta23/ExplicitFormula.lean @@ -53,7 +53,6 @@ def weilTest (f g : ℝ → ℂ) : ℝ → ℂ := f ⋆[ContinuousLinearMap.mul end EF - namespace EF /-! ## The literature form [eq:EFstd] -/ @@ -63,32 +62,34 @@ namespace EF Γ'/Γ is spelled `Complex.digamma` (= logDeriv Gamma), identically to `Zeta23.mu` in Defs.lean. -/ def gammaBracket (r : ℝ) : ℝ := (Complex.digamma (1 / 4 + I * r / 2)).re - Real.log π +/-- Parameterised right-hand side of the literature explicit formula [IK04, Thm 5.12]: +covers both ζ (`κ = 0, q = 1, c = 1, hasPoles = true`) and primitive χ mod q > 1 +(`hasPoles = false`). -/ +def literatureRHS_of (κ q : ℕ) (c : ℕ → ℂ) (hasPoles : Bool) (k : ℝ → ℂ) : ℂ := + (if hasPoles then paperFT k (I / 2) + paperFT k (-I / 2) else 0) + - ∑' n : ℕ, ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ) + * (c n * k (Real.log n) + conj (c n) * k (-Real.log n)) + + (1 / (2 * π) : ℂ) * ∫ r : ℝ, paperFT k r + * (((Complex.digamma (1 / 4 + (κ : ℂ) / 2 + I * r / 2)).re + Real.log ((q : ℝ) / π) : ℝ) : ℂ) + /-- Right-hand side of [eq:EFstd] (App. A, first display), VERBATIM: `h(i/2) + h(−i/2) − Σ_{n≥1} Λ(n) n^{-1/2} (k(log n) + k(−log n)) + (1/2π) ∫_ℝ h(r) [Re Γ'/Γ(1/4 + ir/2) − log π] dr` -with `h := paperFT k`. The n-sum is written over all `n : ℕ` (Λ(0) = Λ(1) = 0); for compactly supported k it -has finite support. -/ +with `h := paperFT k`. -/ def literatureRHS (k : ℝ → ℂ) : ℂ := paperFT k (I / 2) + paperFT k (-I / 2) - ∑' n : ℕ, ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ) * (k (Real.log n) + k (-Real.log n)) + (1 / (2 * π) : ℂ) * ∫ r : ℝ, paperFT k r * (gammaBracket r : ℂ) -/-- **H-EF, literature form** ([eq:EFstd]; [IK04, Thm 5.12] specialised to ζ / [Wei52] / [Bom00]): -for every `k ∈ C_c²(ℝ)` with `h(z) := ∫ k(u)e^{izu}du`, -`Σ_ρ m_ρ h(γ_ρ) = literatureRHS k`, the zero sum converging absolutely (paper: "here absolutely -convergent since h(r) ≪_k (1+|r|)^{-2} on |Im r| ≤ 1/2"). It is a hypothesis -(structure field in Hypotheses.lean), never a Lean axiom. -/ -def EF_lit (Z : ZeroConfig) : Prop := +/-- Generic literature-form explicit formula predicate for a zero configuration `Z` and +right-hand side functional `rhs`. -/ +def EF_lit_of (rhs : (ℝ → ℂ) → ℂ) (Z : ZeroConfig) : Prop := ∀ k : ℝ → ℂ, ContDiff ℝ 2 k → HasCompactSupport k → Summable (fun ρ : Z.carrier => (Z.mult ρ : ℂ) * paperFT k (gammaOf ρ)) ∧ - ∑' ρ : Z.carrier, (Z.mult ρ : ℂ) * paperFT k (gammaOf ρ) = literatureRHS k + ∑' ρ : Z.carrier, (Z.mult ρ : ℂ) * paperFT k (gammaOf ρ) = rhs k -/-- **H-EF, paper form** ([prop:EF], [eq:EF]): for `f, g ∈ C_c²(ℝ)` with supports in `[−L/2, L/2]`, -`W(f,g) = ∫_ℝ h_f(τ) conj(h_g(τ)) ν_X(τ) dτ`, `X = e^L`. -/ -def EF_paper (Z : ZeroConfig) : Prop := - ∀ (L : ℝ) (f g : ℝ → ℂ), 0 < L → ContDiff ℝ 2 f → ContDiff ℝ 2 g → - tsupport f ⊆ Icc (-(L / 2)) (L / 2) → tsupport g ⊆ Icc (-(L / 2)) (L / 2) → - Z.W f g = ∫ τ : ℝ, paperFT f τ * conj (paperFT g τ) * (nuX (Real.exp L) τ : ℂ) +/-- **H-EF, literature form** ([eq:EFstd]; [IK04, Thm 5.12] specialised to ζ / [Wei52] / [Bom00]). -/ +def EF_lit (Z : ZeroConfig) : Prop := EF_lit_of literatureRHS Z /-! ## ℂ-specialised integral helpers @@ -185,14 +186,12 @@ theorem paperFT_tilde (g : ℝ → ℂ) (z : ℂ) : Complex.ofReal_neg, neg_neg] ring_nf -/-- App. A: `h_{f⋆g̃}(z) = h_f(z) · conj(h_g(conj z))` for all complex z. -/ -theorem paperFT_weilTest {f g : ℝ → ℂ} (hf : Continuous f) (hg : Continuous g) +private lemma integrable_weilTest_kernel {f g : ℝ → ℂ} (hf : Continuous f) (hg : Continuous g) (hfs : HasCompactSupport f) (hgs : HasCompactSupport g) (z : ℂ) : - paperFT (weilTest f g) z = paperFT f z * conj (paperFT g (conj z)) := by - rw [← paperFT_tilde] + Integrable (Function.uncurry fun (x t : ℝ) => f t * tilde g (x - t) * cexp (I * z * x)) + (volume.prod volume) := by have hgt : Continuous (tilde g) := continuous_tilde hg have hgts : HasCompactSupport (tilde g) := hasCompactSupport_tilde hgs - -- the integrand on ℝ × ℝ : (x,t) ↦ f(t) g̃(x−t) e^{izx}, continuous with compact support have hFc : Continuous (Function.uncurry fun (x t : ℝ) => f t * tilde g (x - t) * cexp (I * z * x)) := by change Continuous fun p : ℝ × ℝ => f p.2 * tilde g (p.1 - p.2) * cexp (I * z * p.1) fun_prop @@ -208,18 +207,24 @@ theorem paperFT_weilTest {f g : ℝ → ℂ} (hf : Continuous f) (hg : Continuou rw [image_eq_zero_of_notMem_tsupport hx']; simp · rw [image_eq_zero_of_notMem_tsupport ht]; simp · rw [image_eq_zero_of_notMem_tsupport ht]; simp - have hFi : Integrable (Function.uncurry fun (x t : ℝ) => f t * tilde g (x - t) * cexp (I * z * x)) - (volume.prod volume) := hFc.integrable_of_hasCompactSupport hFs - -- translation v = x − t in the inner integral - have hshift : ∀ t : ℝ, ∫ x : ℝ, tilde g (x - t) * cexp (I * z * x) + exact hFc.integrable_of_hasCompactSupport hFs + +private lemma integral_tilde_shift (g : ℝ → ℂ) (z : ℂ) (t : ℝ) : + ∫ x : ℝ, tilde g (x - t) * cexp (I * z * x) = cexp (I * z * t) * ∫ v : ℝ, tilde g v * cexp (I * z * v) := by - intro t - rw [← cintegral_const_mul, - ← integral_sub_right_eq_self (fun v : ℝ => cexp (I * z * t) * (tilde g v * cexp (I * z * v))) t] - congr 1; ext x - simp only [Complex.ofReal_sub] - rw [mul_left_comm, ← Complex.exp_add] - congr 2; ring + rw [← cintegral_const_mul, + ← integral_sub_right_eq_self (fun v : ℝ => cexp (I * z * t) * (tilde g v * cexp (I * z * v))) t] + congr 1; ext x + simp only [Complex.ofReal_sub] + rw [mul_left_comm, ← Complex.exp_add] + congr 2; ring + +/-- App. A: `h_{f⋆g̃}(z) = h_f(z) · conj(h_g(conj z))` for all complex z. -/ +theorem paperFT_weilTest {f g : ℝ → ℂ} (hf : Continuous f) (hg : Continuous g) + (hfs : HasCompactSupport f) (hgs : HasCompactSupport g) (z : ℂ) : + paperFT (weilTest f g) z = paperFT f z * conj (paperFT g (conj z)) := by + rw [← paperFT_tilde] + have hFi := integrable_weilTest_kernel hf hg hfs hgs z calc paperFT (weilTest f g) z = ∫ x : ℝ, (∫ t : ℝ, f t * tilde g (x - t)) * cexp (I * z * x) := by simp only [paperFT, weilTest, convolution_def, ContinuousLinearMap.mul_apply'] @@ -230,7 +235,7 @@ theorem paperFT_weilTest {f g : ℝ → ℂ} (hf : Continuous f) (hg : Continuou congr 1; ext t rw [show (fun x : ℝ => f t * tilde g (x - t) * cexp (I * z * x)) = fun x => f t * (tilde g (x - t) * cexp (I * z * x)) from funext fun _ => mul_assoc _ _ _, - cintegral_const_mul, hshift t] + cintegral_const_mul, integral_tilde_shift g z t] ring _ = paperFT f z * paperFT (tilde g) z := by simp only [paperFT]; rw [← cintegral_mul_const] @@ -292,45 +297,65 @@ theorem integrable_paperFT_mul_cos {k : ℝ → ℂ} (hFk : Integrable (𝓕 k)) rw [Complex.norm_real, Real.norm_eq_abs] exact Real.abs_cos_le_one _ -/-- App. A, *prime term*, first step: `k(y) + k(−y) = (1/2π)∫ h(τ)(e^{−iτy}+e^{iτy})dτ = (1/π) ∫ h(τ) cos(τy) dτ`. -/ +/-- `h(r) sin(r y)` is integrable in r when h is. -/ +theorem integrable_paperFT_mul_sin {k : ℝ → ℂ} (hFk : Integrable (𝓕 k)) (y : ℝ) : + Integrable (fun r : ℝ => paperFT k r * (Real.sin (r * y) : ℂ)) := by + refine (integrable_paperFT_ofReal hFk).mul_bdd (c := 1) (by fun_prop) ?_ + filter_upwards with r + rw [Complex.norm_real, Real.norm_eq_abs] + exact Real.abs_sin_le_one _ + +/-- Twisted inversion pairing: `cc * k(y) + conj(cc) * k(-y) = (1/π) ∫ h(τ)(Re cc cos(τy) + Im cc sin(τy))`. -/ +theorem ck_add_conj_k_neg {k : ℝ → ℂ} (hk : Continuous k) (hki : Integrable k) + (hFk : Integrable (𝓕 k)) (cc : ℂ) (y : ℝ) : + cc * k y + conj cc * k (-y) + = (1 / π : ℂ) * ∫ τ : ℝ, paperFT k τ + * ((cc.re * Real.cos (τ * y) + cc.im * Real.sin (τ * y) : ℝ) : ℂ) := by + rw [paper_inversion hk hki hFk y, paper_inversion hk hki hFk (-y), + mul_left_comm cc, mul_left_comm (conj cc), ← mul_add, + ← cintegral_const_mul cc, ← cintegral_const_mul (conj cc), + ← integral_add ((integrable_paperFT_mul_cexp hFk y).const_mul cc) + ((integrable_paperFT_mul_cexp hFk (-y)).const_mul _)] + have hconj : conj cc = (cc.re : ℂ) - (cc.im : ℂ) * I := by apply Complex.ext <;> simp + have hcc : cc = (cc.re : ℂ) + (cc.im : ℂ) * I := (Complex.re_add_im cc).symm + have h2 : ∀ τ : ℝ, cc * (paperFT k τ * cexp (-I * τ * y)) + + conj cc * (paperFT k τ * cexp (-I * τ * ↑(-y))) + = 2 * (paperFT k τ * ((cc.re * Real.cos (τ * y) + cc.im * Real.sin (τ * y) : ℝ) : ℂ)) := fun τ => by + have he1 : cexp (-I * τ * y) = Real.cos (τ * y) - Real.sin (τ * y) * I := by + rw [show (-I * τ * y : ℂ) = ((-(τ * y) : ℝ) : ℂ) * I by push_cast; ring, Complex.exp_mul_I] + push_cast; simp; ring + have he2 : cexp (-I * τ * ((-y : ℝ) : ℂ)) = Real.cos (τ * y) + Real.sin (τ * y) * I := by + rw [show (-I * τ * ((-y : ℝ) : ℂ) : ℂ) = (((τ * y) : ℝ) : ℂ) * I by push_cast; ring, Complex.exp_mul_I] + push_cast; ring + rw [he1, he2]; nth_rewrite 1 [hcc]; rw [hconj]; push_cast; ring_nf; rw [Complex.I_sq]; ring + simp_rw [h2] + rw [cintegral_const_mul, ← mul_assoc] + congr 1; field_simp + +/-- App. A, *prime term*, first step: `k(y) + k(−y) = (1/π) ∫ h(τ) cos(τy) dτ`. -/ theorem k_add_k_neg {k : ℝ → ℂ} (hk : Continuous k) (hki : Integrable k) (hFk : Integrable (𝓕 k)) (y : ℝ) : k y + k (-y) = (1 / π : ℂ) * ∫ τ : ℝ, paperFT k τ * (Real.cos (τ * y) : ℂ) := by - rw [paper_inversion hk hki hFk y, paper_inversion hk hki hFk (-y), ← mul_add, - ← integral_add (integrable_paperFT_mul_cexp hFk y) (integrable_paperFT_mul_cexp hFk (-y))] - have h2 : ∀ τ : ℝ, paperFT k τ * cexp (-I * τ * y) + paperFT k τ * cexp (-I * τ * ↑(-y)) - = 2 * (paperFT k τ * (Real.cos (τ * y) : ℂ)) := by - intro τ - rw [← mul_add, Complex.ofReal_cos, mul_left_comm, Complex.two_cos, add_comm] - congr 2 - · congr 1; push_cast; ring - · congr 1; push_cast; ring - simp_rw [h2] - rw [cintegral_const_mul, ← mul_assoc] - congr 1 - field_simp + simpa using ck_add_conj_k_neg hk hki hFk 1 y -/-- App. A, *prime term*, support step: `k(±log n) = 0` for `n > X = e^L`; and the n = 0 term -vanishes since Λ(0) = 0. Hence the n-sum in [eq:EFstd] is the finite sum over `0 < n ≤ ⌊X⌋`. -/ -theorem prime_summand_eq_zero {k : ℝ → ℂ} {L : ℝ} (hks : tsupport k ⊆ Icc (-L) L) - {n : ℕ} (hn : n ∉ Finset.Ioc 0 ⌊Real.exp L⌋₊) : - ((Λ n / Real.sqrt n : ℝ) : ℂ) * (k (Real.log n) + k (-Real.log n)) = 0 := by +/-- Twisted support step: the summand vanishes for `n` outside `(0, ⌊e^L⌋]`. -/ +theorem prime_summand_twisted_eq_zero {c : ℕ → ℂ} {k : ℝ → ℂ} {L : ℝ} + (hks : tsupport k ⊆ Icc (-L) L) {n : ℕ} (hn : n ∉ Finset.Ioc 0 ⌊Real.exp L⌋₊) : + ((Λ n / Real.sqrt n : ℝ) : ℂ) * (c n * k (Real.log n) + conj (c n) * k (-Real.log n)) = 0 := by rcases Nat.eq_zero_or_pos n with rfl | hpos · simp - · have hn' : ⌊Real.exp L⌋₊ < n := by - simp only [Finset.mem_Ioc, not_and, not_le] at hn - exact hn hpos + · have hn' : ⌊Real.exp L⌋₊ < n := by simp only [Finset.mem_Ioc, not_and, not_le] at hn; exact hn hpos have hX : Real.exp L < n := (Nat.floor_lt (Real.exp_pos L).le).mp hn' - have hlog : L < Real.log n := by - rw [← Real.log_exp L] - exact Real.log_lt_log (Real.exp_pos L) hX - have h1 : k (Real.log n) = 0 := by - apply image_eq_zero_of_notMem_tsupport - intro hmem; have := (hks hmem).2; linarith - have h2 : k (-Real.log n) = 0 := by - apply image_eq_zero_of_notMem_tsupport - intro hmem; have := (hks hmem).1; linarith - rw [h1, h2, add_zero, mul_zero] + have hlog : L < Real.log n := by rw [← Real.log_exp L]; exact Real.log_lt_log (Real.exp_pos L) hX + have h1 : k (Real.log n) = 0 := image_eq_zero_of_notMem_tsupport fun hmem => by linarith [(hks hmem).2] + have h2 : k (-Real.log n) = 0 := image_eq_zero_of_notMem_tsupport fun hmem => by linarith [(hks hmem).1] + rw [h1, h2, mul_zero, mul_zero, add_zero, mul_zero] + +/-- App. A, *prime term*, support step: `k(±log n) = 0` for `n > X = e^L`. -/ +theorem prime_summand_eq_zero {k : ℝ → ℂ} {L : ℝ} (hks : tsupport k ⊆ Icc (-L) L) + {n : ℕ} (hn : n ∉ Finset.Ioc 0 ⌊Real.exp L⌋₊) : + ((Λ n / Real.sqrt n : ℝ) : ℂ) * (k (Real.log n) + k (-Real.log n)) = 0 := by + simpa using prime_summand_twisted_eq_zero (c := fun _ => 1) hks hn /-- *Prime term*: for k continuous with `supp k ⊆ [−L, L]` and h integrable on ℝ, `−Σ_{n≥1} Λ(n)n^{-1/2}(k(log n)+k(−log n)) = ∫ h P_X`, `X = e^L` @@ -696,10 +721,37 @@ theorem literatureRHS_eq_integral_nu {k : ℝ → ℂ} {L : ℝ} (hL : 0 < L) (h /-! ## [prop:EF] from the literature form -/ -/-- **Main theorem.** [eq:EFstd] (hypothesis `EF_lit`) ⟹ [eq:EF] for the pair (f,g): -`W(f,g) = ∫ h_f(τ) conj(h_g(τ)) ν_X(τ) dτ`, `X = e^L`. -Side hypotheses `hFk`, `hμ` are the two integrability facts App. A uses silently -("all integrals absolutely convergent") for k = f ⋆ g̃; both follow from [eq:hfbound] and [eq:mufacts]. -/ +/-- **Generic `[prop:EF]` from a literature-form EF**: converts a single-function literature EF +`Σ_ρ m_ρ h_k(γ_ρ) = rhs k` into the bilinear pair form `Z.W f g = ∫ h_f(τ) conj(h_g(τ)) nu(τ) dτ` +for `k = weilTest f g`, given `rhs k = ∫ h_k nu` and `Integrable (h_k · nu)`. -/ +theorem prop_EF_of_lit_gen (Z : ZeroConfig) (rhs : (ℝ → ℂ) → ℂ) (nu : ℝ → ℝ) + (hEF : ∀ k : ℝ → ℂ, ContDiff ℝ 2 k → HasCompactSupport k → + Summable (fun ρ : Z.carrier => (Z.mult ρ : ℂ) * paperFT k (gammaOf ρ)) ∧ + ∑' ρ : Z.carrier, (Z.mult ρ : ℂ) * paperFT k (gammaOf ρ) = rhs k) + {L : ℝ} {f g : ℝ → ℂ} (hf : ContDiff ℝ 2 f) (hg : ContDiff ℝ 2 g) + (hfs : tsupport f ⊆ Icc (-(L / 2)) (L / 2)) (hgs : tsupport g ⊆ Icc (-(L / 2)) (L / 2)) + (hnuint : Integrable (fun τ : ℝ => paperFT (weilTest f g) τ * (nu τ : ℂ))) + (hrhs : rhs (weilTest f g) = ∫ τ : ℝ, paperFT (weilTest f g) τ * (nu τ : ℂ)) : + Summable (fun ρ : Z.carrier => Z.Wsummand f g ρ) ∧ + Integrable (fun τ : ℝ => paperFT f τ * conj (paperFT g τ) * (nu τ : ℂ)) ∧ + Z.W f g = ∫ τ : ℝ, paperFT f τ * conj (paperFT g τ) * (nu τ : ℂ) := by + have hfc : HasCompactSupport f := hasCompactSupport_of_tsupport_subset hfs + have hgc : HasCompactSupport g := hasCompactSupport_of_tsupport_subset hgs + obtain ⟨hsum, heq⟩ := hEF (weilTest f g) (weilTest_contDiff hf hg.continuous hfc) + (weilTest_hasCompactSupport hfc hgc) + have hfac : ∀ z : ℂ, paperFT (weilTest f g) z = paperFT f z * conj (paperFT g (conj z)) := + paperFT_weilTest hf.continuous hg.continuous hfc hgc + have hterm : (fun ρ : Z.carrier => (Z.mult ρ : ℂ) * paperFT (weilTest f g) (gammaOf ρ)) + = fun ρ : Z.carrier => Z.Wsummand f g ρ := + funext fun ρ => by simp only [ZeroConfig.Wsummand, hfac, mul_assoc] + have hreal : (fun τ : ℝ => paperFT (weilTest f g) τ * (nu τ : ℂ)) + = fun τ : ℝ => paperFT f τ * conj (paperFT g τ) * (nu τ : ℂ) := + funext fun τ => by rw [hfac, Complex.conj_ofReal] + refine ⟨hterm ▸ hsum, hreal ▸ hnuint, ?_⟩ + rw [hrhs, hreal] at heq + rw [← heq, ZeroConfig.W, ← hterm] + +/-- **Main theorem.** [eq:EFstd] (hypothesis `EF_lit`) ⟹ [eq:EF] for the pair `(f, g)`. -/ theorem prop_EF_of_lit (Z : ZeroConfig) (hEF : EF_lit Z) {L : ℝ} (hL : 0 < L) {f g : ℝ → ℂ} (hf : ContDiff ℝ 2 f) (hg : ContDiff ℝ 2 g) (hfs : tsupport f ⊆ Icc (-(L / 2)) (L / 2)) (hgs : tsupport g ⊆ Icc (-(L / 2)) (L / 2)) @@ -707,28 +759,12 @@ theorem prop_EF_of_lit (Z : ZeroConfig) (hEF : EF_lit Z) {L : ℝ} (hL : 0 < L) (hμ : Integrable (fun τ : ℝ => paperFT (weilTest f g) τ * (mu τ : ℂ))) : Summable (fun ρ : Z.carrier => Z.Wsummand f g ρ) ∧ Integrable (fun τ : ℝ => paperFT f τ * conj (paperFT g τ) * (nuX (Real.exp L) τ : ℂ)) ∧ - Z.W f g = ∫ τ : ℝ, paperFT f τ * conj (paperFT g τ) * (nuX (Real.exp L) τ : ℂ) := by - have hfc : HasCompactSupport f := - IsCompact.of_isClosed_subset isCompact_Icc (isClosed_tsupport f) hfs - have hgc : HasCompactSupport g := - IsCompact.of_isClosed_subset isCompact_Icc (isClosed_tsupport g) hgs - have hkd : ContDiff ℝ 2 (weilTest f g) := weilTest_contDiff hf hg.continuous hfc - have hk : Continuous (weilTest f g) := hkd.continuous - have hks : tsupport (weilTest f g) ⊆ Icc (-L) L := tsupport_weilTest_subset hfs hgs - obtain ⟨hsum, heq⟩ := hEF (weilTest f g) hkd (weilTest_hasCompactSupport hfc hgc) - have hfac : ∀ z : ℂ, paperFT (weilTest f g) z = paperFT f z * conj (paperFT g (conj z)) := - paperFT_weilTest hf.continuous hg.continuous hfc hgc - -- termwise: m_ρ h_k(γ_ρ) = m_ρ h_f(γ_ρ) conj(h_g(conj γ_ρ)) - have hterm : (fun ρ : Z.carrier => (Z.mult ρ : ℂ) * paperFT (weilTest f g) (gammaOf ρ)) - = fun ρ : Z.carrier => Z.Wsummand f g ρ := by - ext ρ; simp only [ZeroConfig.Wsummand, hfac, mul_assoc] - -- on the real line: h_k(τ) = h_f(τ) conj(h_g(τ)) - have hreal : (fun τ : ℝ => paperFT (weilTest f g) τ * (nuX (Real.exp L) τ : ℂ)) - = fun τ : ℝ => paperFT f τ * conj (paperFT g τ) * (nuX (Real.exp L) τ : ℂ) := by - ext τ; rw [hfac, Complex.conj_ofReal] - refine ⟨hterm ▸ hsum, hreal ▸ integrable_paperFT_mul_nuX hL hFk hμ, ?_⟩ - rw [literatureRHS_eq_integral_nu hL hk hks hFk hμ, hreal] at heq - rw [← heq, ZeroConfig.W, ← hterm] + Z.W f g = ∫ τ : ℝ, paperFT f τ * conj (paperFT g τ) * (nuX (Real.exp L) τ : ℂ) := + prop_EF_of_lit_gen Z literatureRHS (nuX (Real.exp L)) hEF hf hg hfs hgs + (integrable_paperFT_mul_nuX hL hFk hμ) + (literatureRHS_eq_integral_nu hL + (weilTest_contDiff hf hg.continuous (hasCompactSupport_of_tsupport_subset hfs)).continuous + (tsupport_weilTest_subset hfs hgs) hFk hμ) end EF end Zeta23 diff --git a/zeta23/Zeta23/ExplicitFormula/Bridge.lean b/zeta23/Zeta23/ExplicitFormula/Bridge.lean index faa550820f..62e3dd250a 100644 --- a/zeta23/Zeta23/ExplicitFormula/Bridge.lean +++ b/zeta23/Zeta23/ExplicitFormula/Bridge.lean @@ -89,102 +89,109 @@ theorem norm_paperFT_mul_one_add_sq_le {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) calc ‖paperFT k τ‖ * (1 + τ ^ 2) = ‖paperFT k τ‖ + ‖paperFT k τ‖ * τ ^ 2 := by ring _ ≤ _ := add_le_add h1 h2 -/-- From H-Γ: `|μ(τ)| ≤ K₂ (1+|τ|)^{1/2}` for all τ (continuity on [−1,1]; Stirling [eq:mufacts] -`μ(τ) = (1/2π)log(|τ|/2π) + O(τ^{-2})` and `log x ≤ 2x^{1/2}` for |τ| ≥ 1). -/ -theorem abs_mu_le_of_gammaFacts (hΓ : GammaFacts) : - ∃ K₂ : ℝ, 0 ≤ K₂ ∧ ∀ τ : ℝ, |mu τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := by - obtain ⟨C, hC⟩ := hΓ.stirling +/-- Generic Stirling-to-sqrt-growth bound: any continuous `μ : ℝ → ℝ` with +`|μ τ - (1/2π) log(q|τ|/2π)| ≤ C / τ²` for `|τ| ≥ 1` (`0 < q`) satisfies +`|μ τ| ≤ K₂ (1 + |τ|)^{1/2}` for all `τ`. -/ +theorem abs_le_of_stirling {μ : ℝ → ℝ} {q : ℝ} (hq : 0 < q) (hcont : Continuous μ) + (hstir : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → + |μ τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))| ≤ C / τ ^ 2) : + ∃ K₂ : ℝ, 0 ≤ K₂ ∧ ∀ τ : ℝ, |μ τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := by + obtain ⟨C, hC⟩ := hstir obtain ⟨M, hM⟩ := isCompact_Icc.exists_bound_of_continuousOn - (hΓ.smooth.continuous.continuousOn (s := Icc (-1 : ℝ) 1)) + (hcont.continuousOn (s := Icc (-1 : ℝ) 1)) have hπ : 0 < 1 / (2 * π) := by positivity - have hL0 : 0 ≤ (1 / (2 * π)) * |Real.log (2 * π)| := mul_nonneg hπ.le (abs_nonneg _) - set K₂ : ℝ := max M 0 + |C| + (1 / (2 * π)) * |Real.log (2 * π)| + 1 / π with hK₂ + set Lq : ℝ := |Real.log (2 * π / q)| + have hLq0 : 0 ≤ Lq := abs_nonneg _ + set K₂ : ℝ := max M 0 + |C| + (1 / (2 * π)) * Lq + 1 / π have hK₂nn : 0 ≤ K₂ := by have : 0 ≤ max M 0 := le_max_right _ _ - have : 0 ≤ 1 / π := by positivity + have : (0 : ℝ) ≤ 1 / π := by positivity positivity refine ⟨K₂, hK₂nn, fun τ => ?_⟩ have hb1 : 1 ≤ (1 + |τ|) ^ (1 / 2 : ℝ) := Real.one_le_rpow (by linarith [abs_nonneg τ]) (by norm_num) rcases le_or_gt |τ| 1 with hτ | hτ - · -- |τ| ≤ 1: continuity bound - have := hM τ (abs_le.mp hτ) + · have := hM τ (abs_le.mp hτ) rw [Real.norm_eq_abs] at this - calc |mu τ| ≤ max M 0 := this.trans (le_max_left _ _) + calc |μ τ| ≤ max M 0 := this.trans (le_max_left _ _) _ ≤ K₂ * 1 := by - rw [mul_one, hK₂] - have : 0 ≤ 1 / π := by positivity + rw [mul_one]; dsimp [K₂] + have : (0 : ℝ) ≤ 1 / π := by positivity + have : (0 : ℝ) ≤ (1 / (2 * π)) * Lq := by positivity linarith [abs_nonneg C] _ ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := by gcongr - · -- |τ| ≥ 1: Stirling - have hτ1 : 1 ≤ |τ| := hτ.le + · have hτ1 : 1 ≤ |τ| := hτ.le have hst := hC τ hτ1 have hsq : 1 ≤ τ ^ 2 := by rw [← sq_abs]; nlinarith - have hCτ : C / τ ^ 2 ≤ |C| := by - calc C / τ ^ 2 ≤ |C| / τ ^ 2 := by gcongr; exact le_abs_self C - _ ≤ |C| := div_le_self (abs_nonneg C) hsq - have hlog : |Real.log (|τ| / (2 * π))| ≤ Real.log |τ| + |Real.log (2 * π)| := by - rw [Real.log_div (by positivity) (by positivity)] - calc abs (Real.log |τ| - Real.log (2 * π)) - ≤ abs (Real.log |τ|) + |Real.log (2 * π)| := abs_sub _ _ - _ = Real.log |τ| + |Real.log (2 * π)| := by rw [abs_of_nonneg (Real.log_nonneg hτ1)] + have hCτ : C / τ ^ 2 ≤ |C| := + (div_le_div_of_nonneg_right (le_abs_self C) (by positivity)).trans (div_le_self (abs_nonneg C) hsq) + have hlog : |Real.log (q * |τ| / (2 * π))| ≤ Real.log |τ| + Lq := by + rw [show q * |τ| / (2 * π) = |τ| / (2 * π / q) by field_simp, + Real.log_div (by positivity) (by positivity)] + calc abs (Real.log |τ| - Real.log (2 * π / q)) ≤ abs (Real.log |τ|) + Lq := abs_sub _ _ + _ = Real.log |τ| + Lq := by rw [abs_of_nonneg (Real.log_nonneg hτ1)] have hlog2 : Real.log |τ| ≤ 2 * (1 + |τ|) ^ (1 / 2 : ℝ) := by have := Real.log_le_rpow_div (abs_nonneg τ) (by norm_num : (0 : ℝ) < 1 / 2) have hmono : |τ| ^ (1 / 2 : ℝ) ≤ (1 + |τ|) ^ (1 / 2 : ℝ) := Real.rpow_le_rpow (abs_nonneg τ) (by linarith) (by norm_num) - calc Real.log |τ| ≤ |τ| ^ (1 / 2 : ℝ) / (1 / 2) := this - _ = 2 * |τ| ^ (1 / 2 : ℝ) := by ring - _ ≤ 2 * (1 + |τ|) ^ (1 / 2 : ℝ) := by gcongr - have hmu : |mu τ| ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + |Real.log (2 * π)|) := by - have htri : |mu τ| ≤ |mu τ - 1 / (2 * π) * Real.log (|τ| / (2 * π))| - + |1 / (2 * π) * Real.log (|τ| / (2 * π))| := by - have := abs_add_le (mu τ - 1 / (2 * π) * Real.log (|τ| / (2 * π))) - (1 / (2 * π) * Real.log (|τ| / (2 * π))) - rwa [sub_add_cancel] at this - calc |mu τ| ≤ C / τ ^ 2 + |1 / (2 * π) * Real.log (|τ| / (2 * π))| := by linarith - _ ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + |Real.log (2 * π)|) := by - rw [abs_mul, abs_of_pos hπ] - gcongr - set b := (1 + |τ|) ^ (1 / 2 : ℝ) with hb - calc |mu τ| ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + |Real.log (2 * π)|) := hmu - _ ≤ |C| + (1 / (2 * π)) * (2 * b + |Real.log (2 * π)|) := by gcongr - _ = (|C| + (1 / (2 * π)) * |Real.log (2 * π)|) * 1 + (1 / π) * b := by ring - _ ≤ (|C| + (1 / (2 * π)) * |Real.log (2 * π)|) * b + (1 / π) * b := by gcongr - _ = (|C| + (1 / (2 * π)) * |Real.log (2 * π)| + 1 / π) * b := by ring - _ ≤ K₂ * b := by - gcongr; rw [hK₂]; linarith [le_max_right M 0] - -/-- `k ∈ C_c²(ℝ)` and H-Γ ⇒ `h_k · μ` integrable on ℝ (dominated by `K (1+|τ|)^{−3/2}`). -/ -theorem integrable_paperFT_mul_mu {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - (hΓ : GammaFacts) : Integrable (fun τ : ℝ => paperFT k τ * (mu τ : ℂ)) := by + linarith + have hmu : |μ τ| ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + Lq) := by + have htri : |μ τ| ≤ |μ τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))| + + |1 / (2 * π) * Real.log (q * |τ| / (2 * π))| := by + simpa [sub_add_cancel] using abs_add_le (μ τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))) + (1 / (2 * π) * Real.log (q * |τ| / (2 * π))) + calc |μ τ| ≤ C / τ ^ 2 + |1 / (2 * π) * Real.log (q * |τ| / (2 * π))| := by linarith + _ ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + Lq) := by rw [abs_mul, abs_of_pos hπ]; gcongr + set b := (1 + |τ|) ^ (1 / 2 : ℝ) + calc |μ τ| ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + Lq) := hmu + _ ≤ |C| + (1 / (2 * π)) * (2 * b + Lq) := by gcongr + _ = (|C| + (1 / (2 * π)) * Lq) * 1 + (1 / π) * b := by ring + _ ≤ (|C| + (1 / (2 * π)) * Lq) * b + (1 / π) * b := by gcongr + _ = (|C| + (1 / (2 * π)) * Lq + 1 / π) * b := by ring + _ ≤ K₂ * b := by gcongr; dsimp [K₂]; linarith [le_max_right M 0] + +/-- Generic integrability: `k ∈ C_c²(ℝ)` and continuous `μ` with `|μ τ| ≤ K₂ (1+|τ|)^{1/2}` +imply `h_k · μ` is integrable on `ℝ`. -/ +theorem integrable_paperFT_mul_of_sqrt_growth {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) + (hkc : HasCompactSupport k) {μ : ℝ → ℝ} (hcont : Continuous μ) + (hμ : ∃ K₂ : ℝ, 0 ≤ K₂ ∧ ∀ τ : ℝ, |μ τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ)) : + Integrable (fun τ : ℝ => paperFT k τ * (μ τ : ℂ)) := by obtain ⟨Λ, hΛ⟩ := exists_abs_le_of_hasCompactSupport hkc - obtain ⟨K₂, hK₂, hmu⟩ := abs_mu_le_of_gammaFacts hΓ - set K₁ : ℝ := (∫ u, ‖k u‖) + ∫ u, ‖deriv (deriv k) u‖ with hK₁ + obtain ⟨K₂, hK₂, hmu⟩ := hμ + set K₁ : ℝ := (∫ u, ‖k u‖) + ∫ u, ‖deriv (deriv k) u‖ have hK₁nn : 0 ≤ K₁ := by positivity - have hmeas : AEStronglyMeasurable (fun τ : ℝ => paperFT k τ * (mu τ : ℂ)) := + have hmeas : AEStronglyMeasurable (fun τ : ℝ => paperFT k τ * (μ τ : ℂ)) := (integrable_paperFT_ofReal (integrable_fourier_of_contDiff_two hk hkc)).aestronglyMeasurable.mul - (Complex.continuous_ofReal.comp hΓ.smooth.continuous).aestronglyMeasurable + (Complex.continuous_ofReal.comp hcont).aestronglyMeasurable have hdom : Integrable (fun τ : ℝ => 2 * K₁ * K₂ * (1 + ‖τ‖) ^ (-(3 / 2) : ℝ)) := (integrable_one_add_norm (by rw [Module.finrank_self]; norm_num)).const_mul _ refine hdom.mono' hmeas (Eventually.of_forall fun τ => ?_) rw [norm_mul, Complex.norm_real, Real.norm_eq_abs, Real.norm_eq_abs] have hb : 0 < 1 + |τ| := by linarith [abs_nonneg τ] have h1 : ‖paperFT k τ‖ * (1 + τ ^ 2) ≤ K₁ := norm_paperFT_mul_one_add_sq_le hk hΛ τ - have h2 : |mu τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := hmu τ + have h2 : |μ τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := hmu τ have hsq : (1 + |τ|) ^ (2 : ℝ) ≤ 2 * (1 + τ ^ 2) := by rw [Real.rpow_two]; nlinarith [sq_abs τ, sq_nonneg (1 - |τ|)] - -- (1+|τ|)^{1/2} ≤ 2(1+τ²)(1+|τ|)^{-3/2} have key : (1 + |τ|) ^ (1 / 2 : ℝ) ≤ 2 * (1 + τ ^ 2) * (1 + |τ|) ^ (-(3 / 2) : ℝ) := by rw [show (1 / 2 : ℝ) = 2 + (-(3 / 2)) by norm_num, Real.rpow_add hb] exact mul_le_mul_of_nonneg_right hsq (Real.rpow_nonneg hb.le _) - calc ‖paperFT k τ‖ * |mu τ| + calc ‖paperFT k τ‖ * |μ τ| ≤ ‖paperFT k τ‖ * (K₂ * (1 + |τ|) ^ (1 / 2 : ℝ)) := by gcongr _ ≤ ‖paperFT k τ‖ * (K₂ * (2 * (1 + τ ^ 2) * (1 + |τ|) ^ (-(3 / 2) : ℝ))) := by gcongr _ = (‖paperFT k τ‖ * (1 + τ ^ 2)) * (2 * K₂ * (1 + |τ|) ^ (-(3 / 2) : ℝ)) := by ring - _ ≤ K₁ * (2 * K₂ * (1 + |τ|) ^ (-(3 / 2) : ℝ)) := by - gcongr + _ ≤ K₁ * (2 * K₂ * (1 + |τ|) ^ (-(3 / 2) : ℝ)) := by gcongr _ = 2 * K₁ * K₂ * (1 + |τ|) ^ (-(3 / 2) : ℝ) := by ring +/-- From H-Γ: `|μ(τ)| ≤ K₂ (1+|τ|)^{1/2}` for all τ. -/ +theorem abs_mu_le_of_gammaFacts (hΓ : GammaFacts) : + ∃ K₂ : ℝ, 0 ≤ K₂ ∧ ∀ τ : ℝ, |mu τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := + abs_le_of_stirling one_pos hΓ.smooth.continuous (by simpa using hΓ.stirling) + +/-- `k ∈ C_c²(ℝ)` and H-Γ ⇒ `h_k · μ` integrable on ℝ. -/ +theorem integrable_paperFT_mul_mu {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) + (hΓ : GammaFacts) : Integrable (fun τ : ℝ => paperFT k τ * (mu τ : ℂ)) := + integrable_paperFT_mul_of_sqrt_growth hk hkc hΓ.smooth.continuous (abs_mu_le_of_gammaFacts hΓ) + /-- **The bridge.** The literature-form explicit formula [eq:EFstd] (`EF_lit`) together with the Stirling-type facts H-Γ for μ (already a field of `PaperInputs`) implies the paper's [prop:EF]/[eq:EF] exactly as `Zeta23.ExplicitFormulaPaper` (Hypotheses.lean) states it (App. A). -/ diff --git a/zeta23/Zeta23/Final.lean b/zeta23/Zeta23/Final.lean index 7d1309e6d3..b85a7bf07d 100644 --- a/zeta23/Zeta23/Final.lean +++ b/zeta23/Zeta23/Final.lean @@ -4,35 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/Final.lean — the headline theorems. - - "More than two thirds of the zeros of the Riemann zeta function lie on the critical line", - Theorems A, B, C — ε-forms. - -Each theorem's TYPE in the first section displays the inputs as separate named hypotheses: - hEF : EF.EF_lit zetaZeroConfig — Weil's explicit formula, literature form [eq:EFstd] - ([IK04, Thm 5.12] for ζ), over ζ's nontrivial zeros; - hRvM : RiemannVonMangoldt zetaZeroConfig — [eq:RvM] + local count N(t+1)−N(t) ≤ A₀ log(|t|+3); - hMV : ∃ C > 0, MVDiag C — Montgomery–Vaughan weighted Hilbert inequality, literature - (y = x) form [MV74, Thm 2]; the paper's bilinear [lem:MV] is - derived (Zeta23.MVHilbert_of_diag); - hΓ : GammaFacts — Stirling-type facts for μ [eq:mufacts], [eq:muints]. -Nothing else: the Chebyshev–Mertens bounds [lem:cheb] are proved (Zeta23.Cheb.chebyshevMertens), the -paper's spectral form of the explicit formula [eq:EF] is derived from hEF (Zeta23.EF), the taper profile -is Mathlib's Real.smoothTransition (Zeta23.stdProfile), the ζ-facts (analytic order, functional-equation -symmetry, local finiteness) are proved (Zeta23.zetaSeam), and thm:traces [thm:traces] is -Zeta23.PrimeSide.thm_traces (the versions with thm:traces as an explicit hypothesis are -Zeta23.thmA_of_traces etc. in Zeta23/Main.lean). Later sections discharge the hypotheses -hMV, hΓ, hRvM and hEF one by one, ending with the unconditional forms. - -Counting functions (Zeta23/Statement.lean): Ncount T₁ T₂ = N(T₁,T₂) with multiplicity (analytic order of -riemannZeta), N0star = N₀* (on the line, distinct), N0simple = N₀ˢ (on the line, simple), Ndist = N_d -(distinct), all over nontrivial zeros ρ (ζ ρ = 0, 0 < Re ρ < 1) with T₁ < Im ρ ≤ T₂. +Zeta23/Final.lean — the headline Theorem A for ζ (unconditional, dyadic and cumulative) and the +unconditional `paperInputs_zeta` package (discharging MV, Γ-facts, RvM, and Weil's explicit formula). +Multiplicity-aware Theorems B (2/3) and C (5/6) live in `Zeta23/FinalMult.lean`. -/ import Zeta23.Main -import Zeta23.Defs.Profile import Zeta23.PrimeSideB.Final -import Zeta23.MV import Zeta23.MV.Final import Zeta23.GammaFacts.Complete import Zeta23.RvM.Statement @@ -44,193 +21,16 @@ noncomputable section namespace Zeta23 -section Final - -/-- PaperInputs from the literature trust base: literature EF, RvM, MV74 in diagonal form, Γ-facts. -/ -theorem PaperInputs.of_literature {Z : ZeroConfig} (hEF : EF.EF_lit Z) (hRvM : RiemannVonMangoldt Z) - (hMV : ∃ C : ℝ, 0 < C ∧ MVDiag C) (hΓ : GammaFacts) : PaperInputs Z := - PaperInputs.of_lit hEF hRvM (exists_MVHilbert_of_diag hMV) hΓ - -variable (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) - (hMV : ∃ C : ℝ, 0 < C ∧ MVDiag C) (hΓ : GammaFacts) -include hEF hRvM hMV hΓ - -omit hEF hRvM hMV hΓ in -private lemma tracesStd (H : PaperInputs zetaZeroConfig) : - ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → ThmTracesHyp (paramsOf stdProfile lam) zetaZeroConfig := - fun _ h1 h2 => PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H - -/-- **Theorem A** [thm:A]: "liminf_{T→∞} N₀*(T,2T)/N(T,2T) ≥ 2/3" — for every ε > 0 and all large T, -at least (2/3 − ε) of the nontrivial zeros of ζ with T < Im ρ ≤ 2T, counted with multiplicity, are -accounted for by DISTINCT zeros on the critical line: (2/3 − ε)·N(T,2T) ≤ N₀*(T,2T). -/ -theorem thmA : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmA_of_traces H taperProfile_stdProfile (tracesStd H) - -/-- **Theorem A** [thm:A], cumulative: "liminf_{T→∞} N₀*(T)/N(T) ≥ 2/3", N(T) := N(0,T). -/ -theorem thmA_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmA_cumulative_of_traces H taperProfile_stdProfile (tracesStd H) - -/-- **Theorem A at fixed λ ∈ (0,1)** [thm:A]: N₀*(T,2T) ≥ (H(λ) − ε) N(T,2T), H(λ) = 2 − 1/λ − λ/3 -(the paper's c(λ)·loglogT/logT absorbed into ε). -/ -theorem thmA_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Hfun lam - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmA_lam_of_traces H taperProfile_stdProfile h0 h1 - (PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile h0 h1.le) H) - -/-- **Theorem B** [thm:B]: "at least half of the zeros are simple and on the critical line": -(1/2 − ε)·N(T,2T) ≤ N₀ˢ(T,2T) for T ≥ T₀(ε). -/ -theorem thmB : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmB_of_traces H taperProfile_stdProfile (tracesStd H) - -/-- **Theorem B** [thm:B], cumulative: "liminf_{T→∞} N₀ˢ(T)/N(T) ≥ 1/2". -/ -theorem thmB_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmB_cumulative_of_traces H taperProfile_stdProfile (tracesStd H) - -/-- **Theorem B at fixed λ** [thm:B]: N₀ˢ(T,2T) ≥ (2F(λ) − 1 − ε) N(T,2T), F(λ) = λ/(1+λ²/3). -/ -theorem thmB_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun lam - 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmB_lam_of_traces H taperProfile_stdProfile h0 h1 - (PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile h0 h1.le) H) - -/-- **Theorem C** [thm:C]: "liminf N_d(T)/N(T) ≥ 3/4" — distinct zeros: (3/4 − ε)·N(T,2T) ≤ N_d(T,2T). -/ -theorem thmC : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmC_of_traces H taperProfile_stdProfile (tracesStd H) - -/-- **Theorem C** [thm:C], cumulative: "liminf_{T→∞} N_d(T)/N(T) ≥ 3/4". -/ -theorem thmC_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmC_cumulative_of_traces H taperProfile_stdProfile (tracesStd H) - -/-- **Theorem C at fixed λ** [thm:C]: N_d(T,2T) ≥ (F(λ) − ε) N(T,2T). -/ -theorem thmC_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Ffun lam - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - let H := PaperInputs.of_literature hEF hRvM hMV hΓ - thmC_lam_of_traces H taperProfile_stdProfile h0 h1 - (PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile h0 h1.le) H) - -end Final - -/-! ## Three-hypothesis forms: H-MV is a theorem (Zeta23.MV.mv_hilbert — the weighted Hilbert -inequality of Montgomery–Vaughan 1974, proved outright). -/ - -section ThreeHyp - /-- PaperInputs from (literature EF, RvM, Γ-facts) only: cheb and MV are theorems. -/ theorem PaperInputs.of_three {Z : ZeroConfig} (hEF : EF.EF_lit Z) (hRvM : RiemannVonMangoldt Z) (hΓ : GammaFacts) : PaperInputs Z := PaperInputs.of_lit hEF hRvM MV.mv_hilbert hΓ -variable (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) (hΓ : GammaFacts) -include hEF hRvM hΓ - -/-- **Theorem A**, three hypotheses (EF_lit, RvM, Γ): (2/3 − ε)·N(T,2T) ≤ N₀*(T,2T). -/ -theorem thmA₃ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - let H := PaperInputs.of_three hEF hRvM hΓ - thmA_of_traces H taperProfile_stdProfile fun _ h1 h2 => - PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H - -/-- **Theorem A** cumulative, three hypotheses. -/ -theorem thmA₃_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := - let H := PaperInputs.of_three hEF hRvM hΓ - thmA_cumulative_of_traces H taperProfile_stdProfile fun _ h1 h2 => - PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H - -/-- **Theorem B**, three hypotheses: (1/2 − ε)·N(T,2T) ≤ N₀ˢ(T,2T). -/ -theorem thmB₃ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - let H := PaperInputs.of_three hEF hRvM hΓ - thmB_of_traces H taperProfile_stdProfile fun _ h1 h2 => - PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H - -/-- **Theorem B** cumulative, three hypotheses. -/ -theorem thmB₃_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := - let H := PaperInputs.of_three hEF hRvM hΓ - thmB_cumulative_of_traces H taperProfile_stdProfile fun _ h1 h2 => - PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H - -/-- **Theorem C**, three hypotheses: (3/4 − ε)·N(T,2T) ≤ N_d(T,2T). -/ -theorem thmC₃ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - let H := PaperInputs.of_three hEF hRvM hΓ - thmC_of_traces H taperProfile_stdProfile fun _ h1 h2 => - PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H - -/-- **Theorem C** cumulative, three hypotheses. -/ -theorem thmC₃_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := - let H := PaperInputs.of_three hEF hRvM hΓ - thmC_cumulative_of_traces H taperProfile_stdProfile fun _ h1 h2 => - PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H - -end ThreeHyp - -/-! ## Two-hypothesis forms: H-Γ is a theorem (Zeta23.gammaFacts; proved via -digamma partial fractions + vertical Stirling + FTC). -/ - -section TwoHyp - /-- PaperInputs from (literature EF, RvM) only: cheb, MV and Γ are theorems. -/ theorem PaperInputs.of_two {Z : ZeroConfig} (hEF : EF.EF_lit Z) (hRvM : RiemannVonMangoldt Z) : PaperInputs Z := PaperInputs.of_three hEF hRvM gammaFacts -variable (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) -include hEF hRvM - -/-- **Theorem A**, two hypotheses (EF_lit, RvM): (2/3 − ε)·N(T,2T) ≤ N₀*(T,2T). -/ -theorem thmA₂ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - thmA₃ hEF hRvM gammaFacts - -/-- **Theorem A** cumulative, two hypotheses. -/ -theorem thmA₂_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := - thmA₃_cumulative hEF hRvM gammaFacts - -/-- **Theorem B**, two hypotheses: (1/2 − ε)·N(T,2T) ≤ N₀ˢ(T,2T). -/ -theorem thmB₂ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - thmB₃ hEF hRvM gammaFacts - -/-- **Theorem C**, two hypotheses: (3/4 − ε)·N(T,2T) ≤ N_d(T,2T). -/ -theorem thmC₂ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - thmC₃ hEF hRvM gammaFacts - -/-- **Theorem B** cumulative, two hypotheses. -/ -theorem thmB₂_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := - thmB₃_cumulative hEF hRvM gammaFacts - -/-- **Theorem C** cumulative, two hypotheses. -/ -theorem thmC₂_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := - thmC₃_cumulative hEF hRvM gammaFacts - -end TwoHyp - -/-! ## One-hypothesis forms: H-RvM is a theorem given the proved Γ-facts -(local count + folded argument principle + Backlund; Zeta23/RvM/*). -/ - -section OneHyp - /-- **H-RvM for ζ, unconditionally** (from the RvM development and the proved Γ-facts). -/ theorem riemannVonMangoldt_zeta : RiemannVonMangoldt zetaZeroConfig := RvM.riemannVonMangoldt gammaFacts @@ -239,136 +39,28 @@ theorem riemannVonMangoldt_zeta : RiemannVonMangoldt zetaZeroConfig := theorem PaperInputs.of_EF (hEF : EF.EF_lit zetaZeroConfig) : PaperInputs zetaZeroConfig := PaperInputs.of_two hEF riemannVonMangoldt_zeta -variable (hEF : EF.EF_lit zetaZeroConfig) -include hEF - -/-- **Theorem A** [thm:A], single hypothesis — Weil's explicit formula for ζ in literature form -[eq:EFstd] is the ONLY assumption: for every ε > 0 and all large T, at least (2/3 − ε) of the -nontrivial zeros of ζ in (T, 2T], counted with multiplicity, are matched by distinct zeros ON the -critical line: (2/3 − ε)·N(T,2T) ≤ N₀*(T,2T). -/ -theorem thmA₁ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - thmA₂ hEF riemannVonMangoldt_zeta - -/-- **Theorem A** cumulative, single hypothesis: liminf N₀*(T)/N(T) ≥ 2/3. -/ -theorem thmA₁_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := - thmA₂_cumulative hEF riemannVonMangoldt_zeta - -/-- **Theorem B** [thm:B], single hypothesis: (1/2 − ε)·N(T,2T) ≤ N₀ˢ(T,2T) (simple AND on-line). -/ -theorem thmB₁ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - thmB₂ hEF riemannVonMangoldt_zeta - -/-- **Theorem B** cumulative, single hypothesis. -/ -theorem thmB₁_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := - thmB₂_cumulative hEF riemannVonMangoldt_zeta - -/-- **Theorem C** [thm:C], single hypothesis: (3/4 − ε)·N(T,2T) ≤ N_d(T,2T) (distinct zeros). -/ -theorem thmC₁ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - thmC₂ hEF riemannVonMangoldt_zeta - -/-- **Theorem C** cumulative, single hypothesis. -/ -theorem thmC₁_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := - thmC₂_cumulative hEF riemannVonMangoldt_zeta - -end OneHyp - -/-! ## Unconditional forms: the explicit formula is a theorem -(Zeta23.WeilEF.EF_lit_zetaZeroConfig — Weil/Riemann–von Mangoldt explicit formula for ζ, -literature form [eq:EFstd], proved from Mathlib's functional equation by contour integration). -These are the headline statements of the formalization: no hypotheses at all. -/ - -section Unconditional - /-- **Weil's explicit formula for ζ**, re-exported. -/ theorem zetaEF : EF.EF_lit zetaZeroConfig := WeilEF.EF_lit_zetaZeroConfig /-- The paper's full input package, unconditionally. -/ theorem paperInputs_zeta : PaperInputs zetaZeroConfig := PaperInputs.of_EF zetaEF +private lemma tracesStd (H : PaperInputs zetaZeroConfig) : + ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → ThmTracesHyp (paramsOf stdProfile lam) zetaZeroConfig := + fun _ h1 h2 => PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H + /-- **Theorem A** [thm:A], UNCONDITIONAL: for every ε > 0, for all large T, at least (2/3 − ε) of the nontrivial zeros of Mathlib's riemannZeta with T < Im ρ ≤ 2T, counted with multiplicity, are matched by distinct zeros on the critical line: (2/3 − ε)·N(T,2T) ≤ N₀*(T,2T). -/ theorem thmA₀ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - thmA₁ zetaEF + DyadicLowerBound (2 / 3) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T)) := + thmA_of_traces paperInputs_zeta taperProfile_stdProfile (tracesStd paperInputs_zeta) /-- **Theorem A**, cumulative, UNCONDITIONAL: liminf_{T→∞} N₀*(T)/N(T) ≥ 2/3. -/ theorem thmA₀_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := - thmA₁_cumulative zetaEF - -/-- **Theorem B** [thm:B], UNCONDITIONAL: at least (1/2 − ε) of the zeros are simple AND on the line. -/ -theorem thmB₀ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - thmB₁ zetaEF - -/-- **Theorem B**, cumulative, UNCONDITIONAL. -/ -theorem thmB₀_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := - thmB₁_cumulative zetaEF - -/-- **Theorem C** [thm:C], UNCONDITIONAL: at least (3/4 − ε) of the zeros are distinct. -/ -theorem thmC₀ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - thmC₁ zetaEF - -/-- **Theorem C**, cumulative, UNCONDITIONAL. -/ -theorem thmC₀_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := - thmC₁_cumulative zetaEF - -end Unconditional - -section AFortiori - -/-- a fortiori (paper [thm:A]: "and a fortiori N₀(T) ≥ (2/3 − o(1))N(T)"): the WITH-multiplicity -on-line count also carries the 2/3 proportion. From thmA₃ and N₀* ≤ N₀ ([eq:trivialchain]). -/ -theorem thmA₃_N0 (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) - (hΓ : GammaFacts) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0 T (2 * T) := by - intro ε hε - obtain ⟨T₀, hT₀⟩ := thmA₃ hEF hRvM hΓ ε hε - refine ⟨T₀, fun T hT => (hT₀ T hT).trans ?_⟩ - exact_mod_cast (trivial_chain₀ T (2 * T)).2.1 - -/-- a fortiori (paper [thm:B]: "consequently also Nˢ(T) ≥ (1/2 − o(1))N(T)"): simple zeros -anywhere in the strip. From thmB₃ and N₀ˢ ≤ Nˢ ([eq:trivialchain]). -/ -theorem thmB₃_Nsimple (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) - (hΓ : GammaFacts) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ Nsimple T (2 * T) := by - intro ε hε - obtain ⟨T₀, hT₀⟩ := thmB₃ hEF hRvM hΓ ε hε - refine ⟨T₀, fun T hT => (hT₀ T hT).trans ?_⟩ - have h := trivial_chain₀ T (2 * T) - have : N0simple T (2 * T) ≤ Nsimple T (2 * T) := h.2.2.2.1 - exact_mod_cast this - -end AFortiori - -section UnconditionalAFortiori - -/-- a fortiori: the on-line count WITH multiplicity. -/ -theorem thmA₀_N0 : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0 T (2 * T) := - thmA₃_N0 zetaEF riemannVonMangoldt_zeta gammaFacts - -/-- a fortiori: simple zeros anywhere in the strip. -/ -theorem thmB₀_Nsimple : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ Nsimple T (2 * T) := - thmB₃_Nsimple zetaEF riemannVonMangoldt_zeta gammaFacts - -end UnconditionalAFortiori - -/-- Same as thmA but from the bundled paper-form inputs (PaperInputs) rather than the literature -trust base. -/ -theorem thmA_ofInputs (H : PaperInputs zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - thmA_of_traces H taperProfile_stdProfile fun _ h1 h2 => - PrimeSide.thm_traces (paramsOf_valid taperProfile_stdProfile (by linarith) h2.le) H + DyadicLowerBound (2 / 3) (fun T => N0star 0 T) (fun T => Ncount 0 T) := + thmA_cumulative_of_traces paperInputs_zeta taperProfile_stdProfile (tracesStd paperInputs_zeta) end Zeta23 + +end diff --git a/zeta23/Zeta23/FinalMult.lean b/zeta23/Zeta23/FinalMult.lean index c2034d2311..8ba0906d0a 100644 --- a/zeta23/Zeta23/FinalMult.lean +++ b/zeta23/Zeta23/FinalMult.lean @@ -17,8 +17,6 @@ plus the fixed-λ forms (constants H(λ) = 2 − κ(λ) and G(λ) := 3/2 − κ( -/ import Zeta23.Final import Zeta23.Assembly.SeamMult -import Zeta23.Assembly.Certificate -import Zeta23.Assembly.CertificateC3 import Zeta23.ZeroSide.Final import Zeta23.ThmD.Limit @@ -55,8 +53,8 @@ lemma Gfun_ge_near_one (lam : ℝ) (h1 : 1 / 2 ≤ lam) (h2 : lam ≤ 1) : /-- ε-form sup for G: constant 5/6 = sup_{λ<1} G(λ). -/ theorem eps_form_fiveSixths {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (Gfun lam - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (5 / 6 - ε) * N T ≤ lower T := + EpsLowerBound (Gfun lam) lower N) : + EpsLowerBound (5 / 6) lower N := Assembly.eps_form_sup_half (fun η hη => by obtain ⟨lam, h1, h2, h3⟩ := Assembly.exists_lam_near_one hη exact ⟨lam, h1, h2, by linarith [Gfun_ge_near_one lam h1 h2.le]⟩) hN h @@ -70,111 +68,39 @@ variable (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) (hlam (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = P.Gp T) (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) -include H hP hlam hTr hGzGp ha in -/-- [thm:traces] + H-RvM ⟹ the two moment hypotheses of the certificate with κ = κ(λ): -tr Ĝ ≥ (1 − δ)N and ‖Ĝ‖_F² ≤ (κ(λ) + δ)N eventually, for every δ > 0. -/ -theorem moments_of_traces : +/-- Abstract moment extraction from the pointwise `seamB` inequalities. -/ +theorem moments_of_pt (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) + (cl : ℝ → ℝ) (hclO : cl =O[atTop] (fun _ => (1:ℝ))) (hclto : Tendsto cl atTop (𝓝 (kfun P.lam))) + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → + f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) + {C₁ C₂ CN : ℝ} (hC₁ : 0 < C₁) + (hpt : ∀ᶠ T in atTop, + |rtrace (P.hat T (Z.Gz P T)) - (Z.N T (2 * T) : ℝ)| ≤ C₁ * Real.sqrt (P.X T) / P.a T ∧ + frobSq (P.hat T (Z.Gz P T)) ≤ cl T * (Z.N T (2 * T) : ℝ) + + cl T * (((1 + C₂ * P.calE T) / P.a T ^ 2 - 1) * (Z.N T (2 * T) : ℝ) + + (1 + C₂ * P.calE T) / P.a T ^ 2 * (|CN| * Real.log T))) : (∀ δ > (0:ℝ), ∀ᶠ T in atTop, (1 - δ) * (Z.N T (2 * T) : ℝ) ≤ rtrace (P.hat T (Z.Gz P T))) ∧ (∀ δ > (0:ℝ), ∀ᶠ T in atTop, frobSq (P.hat T (Z.Gz P T)) ≤ (kfun P.lam + δ) * (Z.N T (2 * T) : ℝ)) := by have hlam0 := hP.lam_pos have hlam1 : P.lam ≤ 1 := hlam.le - have hw0 : 0 ≤ P.w := zero_le_one.trans hP.one_le_w - have hcalE := calE_tendsto_zero P hlam0 hlam1 hw0 - have hTrE := hTr.toE - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTrE.tr1 - obtain ⟨C₂, hC₂, T₂, htr2⟩ := hTrE.tr2 - obtain ⟨CN, T₃, hRvM⟩ := H.RvM.main + have hcalE := calE_tendsto_zero P hlam0 hlam1 (zero_le_one.trans hP.one_le_w) set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cl : ℝ → ℝ := fun T => 1 / P.lam1 T + P.lam1 T / 3 with hcl set K : ℝ → ℝ := fun T => (1 + C₂ * P.calE T) / P.a T ^ 2 with hK set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / P.a T with hR₁ set R₂ : ℝ → ℝ := fun T => cl T * ((K T - 1) * N T + K T * (|CN| * Real.log T)) with hR₂ - have hLtop := tendsto_L_atTop P hlam0 - have ha1 := tendsto_a_one P hlam0 ha - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have hKto : Tendsto K atTop (𝓝 1) := by - have h1 : Tendsto (fun T => 1 + C₂ * P.calE T) atTop (𝓝 1) := by - simpa using tendsto_const_nhds.add hcE0 - have h2 : Tendsto (fun T => P.a T ^ 2) atTop (𝓝 1) := by simpa using ha1.pow 2 - simpa [hK, Pi.div_def] using h1.div h2 one_ne_zero - -- pointwise: seam B at every large T - have hpt : ∀ᶠ T in atTop, |rtrace (P.hat T (Z.Gz P T)) - N T| ≤ R₁ T ∧ - frobSq (P.hat T (Z.Gz P T)) ≤ cl T * N T + R₂ T := by - filter_upwards [hGzGp, hapos, eventually_ge_atTop T₁, eventually_ge_atTop T₂, - eventually_ge_atTop T₃, eventually_gt_atTop (0:ℝ), eventually_l_pos, eventually_log_nonneg, - hcE0.eventually (eventually_gt_nhds (show (-1:ℝ) < 0 by norm_num))] - with T hGG ha2 hT₁ hT₂ hT₃ hT0 hl hlog hcE - have hapos' : 0 < P.a T := by linarith - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hℓ₁ := ell1_pos hl - have hKnn : 0 ≤ 1 + C₂ * P.calE T := by linarith - have htr2' : P.trGtildeSq T - P.mainTr2 T ≤ C₂ * P.calE T * P.mainTr2 T := by - have := htr2 T hT₂ - simp only at this - rw [← mul_assoc] at this - exact (le_abs_self _).trans this - have htr1' : |P.trGtilde T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| - ≤ C₁ * (P.L T * Real.sqrt (P.X T)) := by - have := htr1 T hT₁; simpa only using this - have hRvM' : T * ell1 T / (2 * Real.pi) ≤ N T + |CN| * Real.log T := by - have h1 := (abs_le.mp (hRvM T hT₃)).1 - have h2 : CN * Real.log T ≤ |CN| * Real.log T := - mul_le_mul_of_nonneg_right (le_abs_self _) hlog - have h3 : T / (2 * Real.pi) * ell1 T = T * ell1 T / (2 * Real.pi) := by ring - simp only [hNdef]; linarith - have hSB := seamB hGG hapos' hLpos hℓ₁ htr1' hKnn htr2' hRvM' - refine ⟨?_, ?_⟩ - · simpa only [hR₁, hNdef] using hSB.1 - · have := hSB.2 - simp only [hR₂, hcl, hK, hNdef] at this ⊢ - linarith - -- R₁, R₂ = o(N) (as in Assembly.thmA_abstract_err) - have hR := H.RvM - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / P.a T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [hapos] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith))] - rw [div_le_iff₀ (by linarith)]; nlinarith - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl Z hR (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - have o2 : R₂ =o[atTop] N := by - have hclO : cl =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 / P.lam + 1 / 3) ?_ - filter_upwards [eventually_clam_bounds P hlam0 hlam1] with T h - rw [abs_of_nonneg h.1]; exact h.2 - have hK1 : Tendsto (fun T => K T - 1) atTop (𝓝 0) := by simpa using hKto.sub_const 1 - have hKO : K =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2) ?_ - filter_upwards [hKto.eventually (eventually_ge_nhds (show (0:ℝ) < 1 by norm_num)), - hKto.eventually (eventually_le_nhds (show (1:ℝ) < 2 by norm_num))] with T h1 h2 - rw [abs_of_nonneg h1]; exact h2 - have i1 : (fun T => (K T - 1) * N T) =o[atTop] N := isLittleO_of_tendsto_zero_mul hK1 - have i2 : (fun T => K T * (|CN| * Real.log T)) =o[atTop] N := - isLittleO_of_bdd_mul hKO ((isLittleO_N_of_isLittleO_Tl Z hR isLittleO_log_Tl).const_mul_left _) - exact isLittleO_of_bdd_mul hclO (i1.add i2) - -- cl → κ(λ) - have hclto : Tendsto cl atTop (𝓝 (kfun P.lam)) := by - have hl1 := ThmD.tendsto_lam1 (P := P) hlam0 - simp only [hcl, kfun] - exact ((tendsto_const_nhds.div hl1 hlam0.ne')).add (hl1.div_const 3) - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop Z hR + have o1 : R₁ =o[atTop] N := + isLittleO_sqrtX_div_a P hP hlam1 hC₁ (eventually_a_ge_half P hP ha) (fun hf => hoTl _ hf) + have o2 : R₂ =o[atTop] N := + isLittleO_R2_of_K P hP ha hcalE hclO (fun hf => hoTl _ hf) refine ⟨fun δ hδ => ?_, fun δ hδ => ?_⟩ · filter_upwards [hpt, o1.def hδ, hNtop.eventually_ge_atTop 0] with T h h1 hN0 rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg hN0] at h1 have := (abs_le.mp h.1).1 have : R₁ T ≤ δ * N T := (le_abs_self _).trans h1 - simp only [hNdef] at * - linarith + simp only [hNdef, hR₁] at *; linarith · have hδ2 : 0 < δ / 2 := by linarith filter_upwards [hpt, o2.def hδ2, hNtop.eventually_ge_atTop 0, hclto.eventually (eventually_le_nhds (show kfun P.lam < kfun P.lam + δ / 2 by linarith))] @@ -182,8 +108,81 @@ theorem moments_of_traces : rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg hN0] at h2 have hR₂ : R₂ T ≤ δ / 2 * N T := (le_abs_self _).trans h2 have hclN : cl T * N T ≤ (kfun P.lam + δ / 2) * N T := mul_le_mul_of_nonneg_right hcl2 hN0 - simp only [hNdef] at * - linarith [h.2] + simp only [hNdef, hK] at *; linarith [h.2] + +/-- Generic trace-bounds + RvM → moment hypotheses, shared by ζ and Dirichlet L-functions. -/ +theorem moments_of_traces_core (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) + (lam1_fn ell1_fn trG trG2 mainTr2 : ℝ → ℝ) + (hTr1 : EvBound (fun T => trG T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)) + (fun T => P.L T * Real.sqrt (P.X T))) + (hTr2 : EvBound (fun T => trG2 T - mainTr2 T) (fun T => P.calE T * mainTr2 T)) + (hRvM : ∃ CN : ℝ, ∃ T₃ : ℝ, ∀ T ≥ T₃, + |(Z.N T (2 * T) : ℝ) - T / (2 * Real.pi) * ell1_fn T| ≤ CN * Real.log T) + (hell1 : ∀ᶠ T in atTop, 0 < ell1_fn T) + (hSB : ∀ᶠ T in atTop, ∀ {C₁ C₂ CN : ℝ}, 0 < P.a T → 0 < P.L T → 0 < ell1_fn T → + |trG T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| ≤ C₁ * (P.L T * Real.sqrt (P.X T)) → + 0 ≤ 1 + C₂ * P.calE T → trG2 T - mainTr2 T ≤ C₂ * P.calE T * mainTr2 T → + T * ell1_fn T / (2 * Real.pi) ≤ (Z.N T (2 * T) : ℝ) + |CN| * Real.log T → + |rtrace (P.hat T (Z.Gz P T)) - (Z.N T (2 * T) : ℝ)| ≤ C₁ * Real.sqrt (P.X T) / P.a T ∧ + frobSq (P.hat T (Z.Gz P T)) ≤ (1 / lam1_fn T + lam1_fn T / 3) * (Z.N T (2 * T) : ℝ) + + (1 / lam1_fn T + lam1_fn T / 3) * (((1 + C₂ * P.calE T) / P.a T ^ 2 - 1) * (Z.N T (2 * T) : ℝ) + + (1 + C₂ * P.calE T) / P.a T ^ 2 * (|CN| * Real.log T))) + (hclO : (fun T => 1 / lam1_fn T + lam1_fn T / 3) =O[atTop] (fun _ => (1:ℝ))) + (hclto : Tendsto (fun T => 1 / lam1_fn T + lam1_fn T / 3) atTop (𝓝 (kfun P.lam))) + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → + f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) : + (∀ δ > (0:ℝ), ∀ᶠ T in atTop, (1 - δ) * (Z.N T (2 * T) : ℝ) ≤ rtrace (P.hat T (Z.Gz P T))) ∧ + (∀ δ > (0:ℝ), ∀ᶠ T in atTop, + frobSq (P.hat T (Z.Gz P T)) ≤ (kfun P.lam + δ) * (Z.N T (2 * T) : ℝ)) := by + have hlam0 := hP.lam_pos + have hcalE := calE_tendsto_zero P hlam0 hlam.le (zero_le_one.trans hP.one_le_w) + obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr1 + obtain ⟨C₂, _, T₂, htr2⟩ := hTr2 + obtain ⟨CN, T₃, hRvM'⟩ := hRvM + have hapos := eventually_a_ge_half P hP ha + have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₂ + have hpt : ∀ᶠ T in atTop, + |rtrace (P.hat T (Z.Gz P T)) - (Z.N T (2 * T) : ℝ)| ≤ C₁ * Real.sqrt (P.X T) / P.a T ∧ + frobSq (P.hat T (Z.Gz P T)) ≤ (1 / lam1_fn T + lam1_fn T / 3) * (Z.N T (2 * T) : ℝ) + + (1 / lam1_fn T + lam1_fn T / 3) * (((1 + C₂ * P.calE T) / P.a T ^ 2 - 1) * (Z.N T (2 * T) : ℝ) + + (1 + C₂ * P.calE T) / P.a T ^ 2 * (|CN| * Real.log T)) := by + filter_upwards [hSB, hapos, hell1, eventually_ge_atTop T₁, eventually_ge_atTop T₂, + eventually_ge_atTop T₃, eventually_l_pos, eventually_log_nonneg, + hcE0.eventually (eventually_gt_nhds (show (-1:ℝ) < 0 by norm_num))] + with T hSBT ha2 hellT hT₁ hT₂ hT₃ hl hlog hcE + have hLpos : 0 < P.L T := by simp only [Params.L]; positivity + have htr2' : trG2 T - mainTr2 T ≤ C₂ * P.calE T * mainTr2 T := by + have := htr2 T hT₂; simp only at this; rw [← mul_assoc] at this + exact (le_abs_self _).trans this + have hRvM'' : T * ell1_fn T / (2 * Real.pi) ≤ (Z.N T (2 * T) : ℝ) + |CN| * Real.log T := by + have h1 := (abs_le.mp (hRvM' T hT₃)).1 + have h2 : CN * Real.log T ≤ |CN| * Real.log T := mul_le_mul_of_nonneg_right (le_abs_self _) hlog + have h3 : T / (2 * Real.pi) * ell1_fn T = T * ell1_fn T / (2 * Real.pi) := by ring + linarith + exact hSBT (by linarith) hLpos hellT (htr1 T hT₁) (by linarith) htr2' hRvM'' + exact moments_of_pt Z P hP hlam ha _ hclO hclto hNtop hoTl hC₁ hpt + +include H hP hlam hTr hGzGp ha in +/-- [thm:traces] + H-RvM ⟹ the two moment hypotheses of the certificate with κ = κ(λ): +tr Ĝ ≥ (1 − δ)N and ‖Ĝ‖_F² ≤ (κ(λ) + δ)N eventually, for every δ > 0. -/ +theorem moments_of_traces : + (∀ δ > (0:ℝ), ∀ᶠ T in atTop, (1 - δ) * (Z.N T (2 * T) : ℝ) ≤ rtrace (P.hat T (Z.Gz P T))) ∧ + (∀ δ > (0:ℝ), ∀ᶠ T in atTop, + frobSq (P.hat T (Z.Gz P T)) ≤ (kfun P.lam + δ) * (Z.N T (2 * T) : ℝ)) := by + have hlam0 := hP.lam_pos + refine moments_of_traces_core Z P hP hlam ha P.lam1 ell1 P.trGtilde P.trGtildeSq P.mainTr2 + hTr.tr1 hTr.tr2 H.RvM.main (eventually_l_pos.mono fun _ => ell1_pos) + (hGzGp.mono fun T hGG _ _ _ ha0 hL0 hl0 h1 hcE h2 h3 => by + have hSB := seamB hGG ha0 hL0 hl0 h1 hcE h2 h3; exact ⟨hSB.1, by linarith [hSB.2]⟩) + ?_ ?_ (tendsto_N_atTop Z H.RvM) (fun _ => isLittleO_N_of_isLittleO_Tl Z H.RvM) + · refine isBigO_one_of_abs_le (C := 2 / P.lam + 1 / 3) ?_ + filter_upwards [eventually_clam_bounds P hlam0 hlam.le] with T h + rw [abs_of_nonneg h.1]; exact h.2 + · have hl1 := ThmD.tendsto_lam1 (P := P) hlam0 + simp only [kfun] + exact (tendsto_const_nhds (x := (1:ℝ)).div hl1 hlam0.ne').add (hl1.div_const 3) end Moments @@ -191,37 +190,27 @@ end Moments section Abstract -variable (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) - (hTr : ThmTracesHyp P Z) - -include H hP hlam hTr in -/-- **multiplicity-aware Theorem B at fixed λ ∈ (0,1)**: N₀ˢ(T,2T) ≥ (H(λ) − ε)·N(T,2T). -/ -theorem thmBmult_abstract : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Hfun P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by +private lemma mult_tail_setup (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) + {θ₀ : ℝ → ℝ} (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ : ∃ Cθ : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ CII : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ CII * Real.sqrt T * l T) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → + f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) : + (∀ᶠ T in atTop, 1 / 2 ≤ P.a T) ∧ + (∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T)) ∧ + Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0) ∧ + (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by have hlam0 := hP.lam_pos have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨hGzGp, ha, hNII, -⟩ := eventually_side_conditions Z H P hP - obtain ⟨θ₀, hTail, Cθ, hθ⟩ := Tail.eventually_tailPackage Z H P hP - obtain ⟨htrace, hfrob⟩ := moments_of_traces Z H P hP hlam hTr hGzGp ha + obtain ⟨Cθ, hθ⟩ := hθ + obtain ⟨CII, hII⟩ := hNII have hLtop := tendsto_L_atTop P hlam0 have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith + have hw := hP.one_le_w; have hLpos : 0 < P.L T := by linarith have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith linarith [h.1] - have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := hLtop.eventually_ge_atTop _ - -- the c = 2 seam, eventually - have h0 : ∀ᶠ T in atTop, 4 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - - 2 * (Z.N T (2 * T) : ℝ) - 3 * (NII Z T : ℝ) - - θ₀ T / (P.a T * P.L T) - * (4 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) - ≤ (Z.N0s T (2 * T) : ℝ) := by - filter_upwards [hTail, hwL, hapos, eventually_ge_atTop (0:ℝ), eventually_l_pos] - with T hTl h8 ha2 hT0 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact seamA_mult2 hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal (ZeroSide.poissonSq hP h8) hTl - (by linarith) hLpos have hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T) := by filter_upwards [hTail, hapos, eventually_l_pos] with T hTl ha2 hl have hLpos : 0 < P.L T := by simp only [Params.L]; positivity @@ -243,82 +232,60 @@ theorem thmBmult_abstract : have e : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring rw [e]; gcongr - have hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by - obtain ⟨CII, hII⟩ := hNII - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z H.RvM isLittleO_sqrt_mul_l_Tl) - have hNtop := tendsto_N_atTop Z H.RvM - have h := count_certificate Z P (kfun P.lam) (fun T => (Z.N0s T (2 * T) : ℝ)) θ₀ h0 hB0 hBto - hNII_o hNtop htrace hfrob - simpa only [Hfun_eq_two_sub_kfun] using h - -include H hP hlam hTr in -/-- **multiplicity-aware Theorem C at fixed λ ∈ (0,1)**: N_d(T,2T) ≥ (G(λ) − ε)·N(T,2T), -G(λ) = 3/2 − κ(λ)/2. -/ -theorem thmCmult_abstract : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Gfun P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by + exact ⟨hapos, hB0, hBto, isLittleO_NII_of Z ⟨CII, hII⟩ hoTl⟩ + +private lemma eventually_seamA_mult_of (Z : ZeroConfig) (P : Params) (hP : P.Valid) + {θ₀ : ℝ → ℝ} (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T) {Q : ℝ → Prop} + (hstep : ∀ T ≥ (0:ℝ), ZeroSide.PhiHatConj T P → ZeroSide.PhiHatReal T P → + ZeroSide.PoissonSq T P → TailInputs Z P T (θ₀ T) → 0 < P.a T → 0 < P.L T → Q T) : + ∀ᶠ T in atTop, Q T := by + filter_upwards [hTail, (tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop (8 * P.w), + hapos, eventually_ge_atTop (0:ℝ), eventually_l_pos] with T hTl h8 ha2 hT0 hl have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le + exact hstep T hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal (ZeroSide.poissonSq hP h8) hTl + (by linarith) (by simp only [Params.L]; positivity) + +/-- Shared `c = 2` and `c = 3` multiplicity-aware bounds from abstract moment hypotheses. -/ +theorem multBC_of_moments (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + (κ : ℝ) (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) + {θ₀ : ℝ → ℝ} (hTail : ∀ᶠ T in atTop, TailInputs Z P T (θ₀ T)) + (hθ : ∃ Cθ : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1)) + (hNII : ∃ CII : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ CII * Real.sqrt T * l T) + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → + f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) + (htrace : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, (1 - δ) * (Z.N T (2 * T) : ℝ) ≤ rtrace (P.hat T (Z.Gz P T))) + (hfrob : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, frobSq (P.hat T (Z.Gz P T)) ≤ (κ + δ) * (Z.N T (2 * T) : ℝ)) : + DyadicLowerBound (2 - κ) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) ∧ + DyadicLowerBound (3 / 2 - κ / 2) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := by + obtain ⟨hapos, hB0, hBto, hNII_o⟩ := mult_tail_setup Z P hP hlam ha hTail hθ hNII hoTl + refine ⟨?_, ?_⟩ + · simpa only [show (4 - 2 - κ) / 1 = 2 - κ by ring] using + count_certificate_gen 4 2 3 4 1 (by norm_num) (by norm_num) Z P κ + (fun T => (Z.N0s T (2 * T) : ℝ)) θ₀ + (eventually_seamA_mult_of Z P hP hTail hapos fun _ h0 hc hr hp htl ha' hL' => by + simpa only [one_mul] using seamA_mult2 h0 hc hr hp htl ha' hL') + hB0 hBto hNII_o hNtop htrace hfrob + · simpa only [show (6 - 3 - κ) / 2 = 3 / 2 - κ / 2 by ring] using + count_certificate_gen 6 3 5 6 2 (by norm_num) (by norm_num) Z P κ + (fun T => (Z.Nd T (2 * T) : ℝ)) θ₀ + (eventually_seamA_mult_of Z P hP hTail hapos fun _ h0 hc hr hp htl ha' hL' => + seamA_mult3 h0 hc hr hp htl ha' hL') + hB0 hBto hNII_o hNtop htrace hfrob + +/-- **multiplicity-aware Theorems B and C at fixed λ ∈ (0,1)**: +`N₀ˢ(T,2T) ≥ (H(λ) − ε)·N(T,2T)` and `N_d(T,2T) ≥ (G(λ) − ε)·N(T,2T)`. -/ +theorem thmBCmult_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) (hTr : ThmTracesHyp P Z) : + DyadicLowerBound (Hfun P.lam) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) ∧ + DyadicLowerBound (Gfun P.lam) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := by obtain ⟨hGzGp, ha, hNII, -⟩ := eventually_side_conditions Z H P hP obtain ⟨θ₀, hTail, Cθ, hθ⟩ := Tail.eventually_tailPackage Z H P hP obtain ⟨htrace, hfrob⟩ := moments_of_traces Z H P hP hlam hTr hGzGp ha - have hLtop := tendsto_L_atTop P hlam0 - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := hLtop.eventually_ge_atTop _ - have h0 : ∀ᶠ T in atTop, 6 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - - 3 * (Z.N T (2 * T) : ℝ) - 5 * (NII Z T : ℝ) - - θ₀ T / (P.a T * P.L T) - * (6 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) - ≤ 2 * (Z.Nd T (2 * T) : ℝ) := by - filter_upwards [hTail, hwL, hapos, eventually_ge_atTop (0:ℝ), eventually_l_pos] - with T hTl h8 ha2 hT0 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact seamA_mult3 hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal (ZeroSide.poissonSq hP h8) hTl - (by linarith) hLpos - have hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T) := by - filter_upwards [hTail, hapos, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by positivity) - have hBto : Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup hB0 ?_ - filter_upwards [hTail, hapos, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < P.a T := by linarith - have hq' : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (P.a T * P.L T) := by - have e : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [e]; gcongr - have hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by - obtain ⟨CII, hII⟩ := hNII - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z H.RvM isLittleO_sqrt_mul_l_Tl) - have hNtop := tendsto_N_atTop Z H.RvM - have h := count_certificate_c3 Z P (kfun P.lam) (fun T => (Z.Nd T (2 * T) : ℝ)) θ₀ h0 hB0 hBto - hNII_o hNtop htrace hfrob - simpa only [Gfun] using h + simpa only [Hfun_eq_two_sub_kfun, Gfun] using multBC_of_moments Z P hP hlam (kfun P.lam) ha + hTail ⟨Cθ, hθ⟩ hNII (tendsto_N_atTop Z H.RvM) (fun _ => isLittleO_N_of_isLittleO_Tl Z H.RvM) + htrace hfrob end Abstract @@ -326,49 +293,38 @@ end Abstract section Zeta -/-- **multiplicity-aware Theorem B for ζ at fixed λ ∈ (0,1), UNCONDITIONAL**: -(H(λ) − ε)·N(T,2T) ≤ N₀ˢ(T,2T). -/ -theorem thmB_mult_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Hfun lam - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - exact thmBmult_abstract zetaZeroConfig paperInputs_zeta (paramsOf stdProfile lam) hP h1 - (PrimeSide.thm_traces hP paperInputs_zeta) - -/-- **multiplicity-aware Theorem C for ζ at fixed λ ∈ (0,1), UNCONDITIONAL**: -(G(λ) − ε)·N(T,2T) ≤ N_d(T,2T), G(λ) = 3/2 − 1/(2λ) − λ/6. -/ -theorem thmC_mult_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Gfun lam - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := by +private theorem thmBC_mult_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : + DyadicLowerBound (Hfun lam) (fun T => N0simple T (2 * T)) (fun T => Ncount T (2 * T)) ∧ + DyadicLowerBound (Gfun lam) (fun T => Ndist T (2 * T)) (fun T => Ncount T (2 * T)) := by have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - exact thmCmult_abstract zetaZeroConfig paperInputs_zeta (paramsOf stdProfile lam) hP h1 + exact thmBCmult_abstract zetaZeroConfig paperInputs_zeta (paramsOf stdProfile lam) hP h1 (PrimeSide.thm_traces hP paperInputs_zeta) /-- **At least 2/3 of the zeros of ζ are SIMPLE AND ON THE CRITICAL LINE, UNCONDITIONAL** -(this is the paper's [thm:B]; Zeta23/Final.lean has the Cauchy–Schwarz form with 1/2): for every ε > 0 and all large T, +(this is the paper's [thm:B]): for every ε > 0 and all large T, (2/3 − ε)·N(T,2T) ≤ N₀ˢ(T,2T), for Mathlib's riemannZeta. -/ theorem thmB₀_mult : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := + DyadicLowerBound (2 / 3) (fun T => N0simple T (2 * T)) (fun T => Ncount T (2 * T)) := eps_form_twoThirds (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (N0simple T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) - fun lam hl1 hl2 => thmB_mult_lam (by linarith) hl2 + fun _ hl1 hl2 => (thmBC_mult_lam (by linarith) hl2).1 -/-- **At least 5/6 of the zeros of ζ are DISTINCT, UNCONDITIONAL** (the paper's [thm:C]; -Zeta23/Final.lean has the Cauchy–Schwarz form with 3/4): (5/6 − ε)·N(T,2T) ≤ N_d(T,2T). -/ +/-- **At least 5/6 of the zeros of ζ are DISTINCT, UNCONDITIONAL** (the paper's [thm:C]): +(5/6 − ε)·N(T,2T) ≤ N_d(T,2T). -/ theorem thmC₀_mult : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (5 / 6 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := + DyadicLowerBound (5 / 6) (fun T => Ndist T (2 * T)) (fun T => Ncount T (2 * T)) := eps_form_fiveSixths (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (Ndist T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) - fun lam hl1 hl2 => thmC_mult_lam (by linarith) hl2 + fun _ hl1 hl2 => (thmBC_mult_lam (by linarith) hl2).2 /-- cumulative form: liminf N₀ˢ(T)/N(T) ≥ 2/3. -/ theorem thmB₀_mult_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := + DyadicLowerBound (2 / 3) (fun T => N0simple 0 T) (fun T => Ncount 0 T) := cumulative_of_dyadic zetaSeam paperInputs_zeta.RvM (fun _ _ _ => N0simple_add' zetaSeam) thmB₀_mult /-- cumulative form: liminf N_d(T)/N(T) ≥ 5/6. -/ theorem thmC₀_mult_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (5 / 6 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := + DyadicLowerBound (5 / 6) (fun T => Ndist 0 T) (fun T => Ncount 0 T) := cumulative_of_dyadic zetaSeam paperInputs_zeta.RvM (fun _ _ _ => Ndist_add' zetaSeam) thmC₀_mult end Zeta diff --git a/zeta23/Zeta23/FromPNTPlus/Auxiliary.lean b/zeta23/Zeta23/FromPNTPlus/Auxiliary.lean index eb99dba6c6..6b8e18b3e8 100644 --- a/zeta23/Zeta23/FromPNTPlus/Auxiliary.lean +++ b/zeta23/Zeta23/FromPNTPlus/Auxiliary.lean @@ -26,15 +26,6 @@ import Mathlib.Analysis.InnerProductSpace.Basic namespace Complex -- see https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Differentiability.20of.20the.20natural.20map.20.E2.84.9D.20.E2.86.92.20.E2.84.82/near/418095234 -lemma hasDerivAt_ofReal (x : ℝ) : HasDerivAt ofReal 1 x := - HasDerivAt.ofReal_comp <| hasDerivAt_id x - -lemma deriv_ofReal (x : ℝ) : deriv ofReal x = 1 := - (hasDerivAt_ofReal x).deriv - -lemma differentiableAt_ofReal (x : ℝ) : DifferentiableAt ℝ ofReal x := - (hasDerivAt_ofReal x).differentiableAt - end Complex lemma DifferentiableAt.comp_ofReal {e : ℂ → ℂ} {z : ℝ} (hf : DifferentiableAt ℂ e z) : diff --git a/zeta23/Zeta23/FromPNTPlus/Fourier.lean b/zeta23/Zeta23/FromPNTPlus/Fourier.lean deleted file mode 100644 index 4e3f24af43..0000000000 --- a/zeta23/Zeta23/FromPNTPlus/Fourier.lean +++ /dev/null @@ -1,199 +0,0 @@ -/- -Ported from https://github.com/AlexKontorovich/PrimeNumberTheoremAnd -at commit 6a380f0c4658c04a420a9eb00b1ed62a1e3fde01 (tag v4.32.2), file -PrimeNumberTheoremAnd/Fourier.lean. -Copyright the PrimeNumberTheoremAnd contributors; Apache License 2.0 -(http://www.apache.org/licenses/LICENSE-2.0). -Local modifications: redirected the intra-project import to Zeta23.FromPNTPlus.Sobolev. -Re-ported from the -v4.29.0 port (commit 10e1218932db7e2432aa5881d750acb819e91f19) when the project -moved to Lean v4.32.2 / Mathlib 905b95818eb32af7874a58b427f50c1711a5e96c. -Adjusted for Lean v4.33.0-rc2 / Mathlib 51e6992efd06: `Circle.norm_coe` supplied explicitly to two `simp` calls. -Modified 2026 by Anthropic PBC. --/ -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.MeasureTheory.Integral.IntegralEqImproper -import Mathlib.Topology.ContinuousMap.Bounded.Basic -import Mathlib.Order.Filter.ZeroAndBoundedAtFilter -import Mathlib.Analysis.Fourier.FourierTransformDeriv -import Zeta23.FromPNTPlus.Sobolev - -open FourierTransform Real Complex MeasureTheory Filter Topology BoundedContinuousFunction - SchwartzMap VectorFourier BigOperators - -local instance {E : Type*} : Coe (E → ℝ) (E → ℂ) := ⟨fun f n => f n⟩ - -section lemmas - -@[simp] -theorem nnnorm_eq_of_mem_circle (z : Circle) : ‖z.val‖₊ = 1 := NNReal.coe_eq_one.mp (by simp [Circle.norm_coe]) - -@[simp] -theorem nnnorm_circle_smul (z : Circle) (s : ℂ) : ‖z • s‖₊ = ‖s‖₊ := by - simp [show z • s = z.val * s from rfl] - -noncomputable def e (u : ℝ) : ℝ →ᵇ ℂ where - toFun v := 𝐞 (-v * u) - map_bounded' := - ⟨2, fun x y => (dist_le_norm_add_norm _ _).trans (by simp [Circle.norm_coe, one_add_one_eq_two])⟩ - -@[simp] lemma e_apply (u : ℝ) (v : ℝ) : e u v = 𝐞 (-v * u) := rfl - -theorem hasDerivAt_e {u x : ℝ} : HasDerivAt (e u) (-2 * π * u * I * e u x) x := by - have l2 : HasDerivAt (fun v => -v * u) (-u) x := by - simpa only [neg_mul_comm] using hasDerivAt_mul_const (-u) - convert! (hasDerivAt_fourierChar (-x * u)).scomp x l2 using 1 - change _ = ((-u : ℝ) : ℂ) * _ -- `scomp` introduces ℝ-smul on ℂ, which we undo - simp ; ring - -lemma fourierIntegral_deriv_aux2 (e : ℝ →ᵇ ℂ) {f : ℝ → ℂ} (hf : Integrable f) : - Integrable (⇑e * f) := - hf.bdd_mul e.continuous.aestronglyMeasurable (ae_of_all _ e.norm_coe_le_norm) - -@[simp] lemma F_neg {f : ℝ → ℂ} {u : ℝ} : 𝓕 (fun x => -f x) u = - 𝓕 f u := by - simp [fourier_eq, integral_neg] - -@[simp] lemma F_add {f g : ℝ → ℂ} (hf : Integrable f) (hg : Integrable g) (x : ℝ) : - 𝓕 (fun x => f x + g x) x = 𝓕 f x + 𝓕 g x := by - have : Continuous fun p : ℝ × ℝ ↦ ((innerₗ ℝ) p.1) p.2 := continuous_inner - have := fourierIntegral_add continuous_fourierChar this hf hg - exact congr_fun this x - -@[simp] lemma F_sub {f g : ℝ → ℂ} (hf : Integrable f) (hg : Integrable g) (x : ℝ) : - 𝓕 (fun x => f x - g x) x = 𝓕 f x - 𝓕 g x := by - simpa [sub_eq_add_neg, Pi.neg_def] using F_add hf hg.neg x - -@[simp] lemma F_mul {f : ℝ → ℂ} {c : ℂ} {u : ℝ} : - 𝓕 (fun x => c * f x) u = c * 𝓕 f u := by - exact congr_fun (VectorFourier.fourierIntegral_const_smul 𝐞 _ _ f c) u - -end lemmas - -theorem fourierIntegral_self_add_deriv_deriv (f : W21) (u : ℝ) : - (1 + u ^ 2) * 𝓕 (f : ℝ → ℂ) u = - 𝓕 (fun u : ℝ => (f u - (1 / (4 * π ^ 2)) * deriv^[2] f u : ℂ)) u := by - have l1 : Integrable (fun x => (((π : ℂ) ^ 2)⁻¹ * 4⁻¹) * deriv (deriv f) x) := by - apply Integrable.const_mul ; simpa [iteratedDeriv_succ] using f.integrable le_rfl - have l4 : Differentiable ℝ f := f.differentiable - have l5 : Differentiable ℝ (deriv f) := f.deriv.differentiable - simp [f.hf, l1, add_mul, Real.fourier_deriv f.hf' l5 f.hf'', Real.fourier_deriv f.hf l4 f.hf'] - field_simp [pi_ne_zero] ; ring_nf ; simp - -@[simp] lemma deriv_ofReal : deriv ofReal = fun _ => 1 := by - ext x ; exact ((hasDerivAt_id x).ofReal_comp).deriv - -/-- If, eventually in `T`, the integrand `f T` is bounded on `uIoc lo hi` by `B T` -and `B T * |hi - lo| → 0`, then the interval integral `∫ x in lo..hi, f T x → 0`. -/ -lemma tendsto_intervalIntegral_zero_of_uniform_norm_bound - {f : ℝ → ℝ → ℂ} {lo hi : ℝ} {B : ℝ → ℝ} - (hB : Filter.Tendsto (fun T : ℝ => B T * |hi - lo|) Filter.atTop (nhds 0)) - (hf : ∀ᶠ T in Filter.atTop, ∀ x ∈ Set.uIoc lo hi, ‖f T x‖ ≤ B T) : - Filter.Tendsto (fun T : ℝ => ∫ x in lo..hi, f T x) Filter.atTop (nhds 0) := by - rw [tendsto_zero_iff_norm_tendsto_zero] - refine squeeze_zero' (Eventually.of_forall fun T => norm_nonneg _) ?_ hB - filter_upwards [hf] with T hT - exact intervalIntegral.norm_integral_le_of_norm_le_const (fun x hx => hT x hx) - -/-- The decay `K * (log (T + 2) / (T + 2)) → 0` as `T → ∞`, for any constant `K`. -/ -lemma tendsto_const_mul_log_add_two_div_add_two_atTop (K : ℝ) : - Filter.Tendsto (fun T : ℝ => K * (Real.log (T + 2) / (T + 2))) - Filter.atTop (nhds 0) := by - have h0 : Filter.Tendsto (fun x : ℝ => Real.log x / x) Filter.atTop (nhds 0) := by - simpa using (Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 (by norm_num : (1 : ℝ) ≠ 0)) - have hshift : Filter.Tendsto (fun T : ℝ => Real.log (T + 2) / (T + 2)) - Filter.atTop (nhds 0) := by - have := h0.comp (tendsto_atTop_add_const_right Filter.atTop 2 tendsto_id) - simpa [Function.comp_def] using this - simpa using hshift.const_mul K - -/-- Fourier-transform decay from an integrable derivative: for integrable, -differentiable `g` with integrable derivative, `‖𝓕 g w‖ ≤ (∫ ‖deriv g x‖) / (2π·|w|)`. -/ -lemma norm_fourier_le_integral_deriv_div - (g : ℝ → ℂ) (hg : Integrable g) (hdiff : Differentiable ℝ g) - (hg' : Integrable (deriv g)) {w : ℝ} (hw : w ≠ 0) : - ‖𝓕 g w‖ ≤ (∫ x, ‖deriv g x‖ ∂volume) / ((2 * Real.pi) * |w|) := by - have hmul : - 𝓕 (deriv g) w = (2 * Real.pi * Complex.I * (w : ℂ)) * 𝓕 g w := by - have h := congrFun (Real.fourier_deriv hg hdiff hg') w - simpa [smul_eq_mul, mul_assoc] using h - have h_fourier : - ‖𝓕 (deriv g) w‖ ≤ ∫ x, ‖deriv g x‖ ∂volume := by - exact VectorFourier.norm_fourierIntegral_le_integral_norm 𝐞 volume (innerₗ ℝ) - (deriv g) w - have hleft : - ((2 * Real.pi) * |w|) * ‖𝓕 g w‖ = - ‖(2 * Real.pi * Complex.I * (w : ℂ)) * 𝓕 g w‖ := by - have htwopi : ‖(2 * ↑Real.pi : ℂ)‖ = 2 * Real.pi := by - rw [norm_mul, Complex.norm_two, Complex.norm_of_nonneg Real.pi_pos.le] - have hwc : ‖(w : ℂ)‖ = |w| := by rw [norm_real, Real.norm_eq_abs] - rw [norm_mul, norm_mul, norm_mul, htwopi, norm_I, hwc] - ring - have hmain : ((2 * Real.pi) * |w|) * ‖𝓕 g w‖ ≤ ∫ x, ‖deriv g x‖ ∂volume := by - rw [hleft, ← hmul] - exact h_fourier - have hpos : 0 < (2 * Real.pi) * |w| := by - positivity - exact (le_div_iff₀ hpos).mpr (by simpa [mul_comm, mul_left_comm, mul_assoc] using hmain) - -/-- The oscillatory-integral form of the decay bound: for `0 < T`, -`‖∫ g y · exp(T·i·y)‖ ≤ (∫ ‖deriv g x‖) / T`. -/ -lemma norm_oscillatory_integral_le_integral_deriv_div - (g : ℝ → ℂ) (hg : Integrable g) (hdiff : Differentiable ℝ g) - (hg' : Integrable (deriv g)) {T : ℝ} (hT : 0 < T) : - ‖∫ y, g y * exp ((T : ℂ) * Complex.I * (y : ℂ)) ∂volume‖ ≤ - (∫ x, ‖deriv g x‖ ∂volume) / T := by - have hw : -T / (2 * Real.pi) ≠ 0 := by - exact div_ne_zero (neg_ne_zero.mpr hT.ne') (mul_ne_zero two_ne_zero Real.pi_ne_zero) - have hfourier := norm_fourier_le_integral_deriv_div g hg hdiff hg' hw - have heq : - (∫ y, g y * exp ((T : ℂ) * Complex.I * (y : ℂ)) ∂volume) = - 𝓕 g (-T / (2 * Real.pi)) := by - rw [Real.fourier_real_eq_integral_exp_smul] - apply integral_congr_ae - filter_upwards with y - rw [smul_eq_mul] - rw [mul_comm (g y)] - congr 1 - congr 1 - push_cast - field_simp [Real.pi_ne_zero] - rw [heq] - refine hfourier.trans_eq ?_ - congr 1 - have hden : (2 * Real.pi) * |-T / (2 * Real.pi)| = T := by - have htwopi_pos : 0 < 2 * Real.pi := by positivity - have hneg : -T / (2 * Real.pi) < 0 := div_neg_of_neg_of_pos (neg_neg_of_pos hT) htwopi_pos - rw [abs_of_neg hneg] - field_simp [Real.pi_ne_zero] - rw [hden] - -/-- The `|T|` variant of the oscillatory-integral decay bound: for `T ≠ 0`, -`‖∫ g y · exp(T·i·y)‖ ≤ (∫ ‖deriv g x‖) / |T|`. -/ -lemma norm_oscillatory_integral_le_integral_deriv_div_abs - (g : ℝ → ℂ) (hg : Integrable g) (hdiff : Differentiable ℝ g) - (hg' : Integrable (deriv g)) {T : ℝ} (hT : T ≠ 0) : - ‖∫ y, g y * exp ((T : ℂ) * Complex.I * (y : ℂ)) ∂volume‖ ≤ - (∫ x, ‖deriv g x‖ ∂volume) / |T| := by - have hw : -T / (2 * Real.pi) ≠ 0 := by - exact div_ne_zero (neg_ne_zero.mpr hT) (mul_ne_zero two_ne_zero Real.pi_ne_zero) - have hfourier := norm_fourier_le_integral_deriv_div g hg hdiff hg' hw - have heq : - (∫ y, g y * exp ((T : ℂ) * Complex.I * (y : ℂ)) ∂volume) = - 𝓕 g (-T / (2 * Real.pi)) := by - rw [Real.fourier_real_eq_integral_exp_smul] - apply integral_congr_ae - filter_upwards with y - rw [smul_eq_mul] - rw [mul_comm (g y)] - congr 1 - congr 1 - push_cast - field_simp [Real.pi_ne_zero] - rw [heq] - refine hfourier.trans_eq ?_ - congr 1 - have hden : (2 * Real.pi) * |-T / (2 * Real.pi)| = |T| := by - have htwopi_pos : 0 < 2 * Real.pi := by positivity - rw [abs_div, abs_neg, abs_of_pos htwopi_pos] - field_simp [Real.pi_ne_zero] - rw [hden] diff --git a/zeta23/Zeta23/FromPNTPlus/Mathlib/Algebra/Notation/Support.lean b/zeta23/Zeta23/FromPNTPlus/Mathlib/Algebra/Notation/Support.lean deleted file mode 100644 index d589682c68..0000000000 --- a/zeta23/Zeta23/FromPNTPlus/Mathlib/Algebra/Notation/Support.lean +++ /dev/null @@ -1,24 +0,0 @@ -/- -Ported from https://github.com/AlexKontorovich/PrimeNumberTheoremAnd -at commit 10e1218932db7e2432aa5881d750acb819e91f19, file -PrimeNumberTheoremAnd/Mathlib/Algebra/Notation/Support.lean. -Copyright the PrimeNumberTheoremAnd contributors; Apache License 2.0 -(http://www.apache.org/licenses/LICENSE-2.0). -Local modifications: removed the Architect blueprint -tooling (import Architect, blueprint_comment blocks, @[blueprint ...] attributes), -redirected intra-project imports to Zeta23.FromPNTPlus.*. Mathematical content unchanged. -Modified 2026 by Anthropic PBC. --/ -import Mathlib.Algebra.Notation.Support - -namespace Function - -variable {α : Type*} [Zero α] - -theorem support_id : support (id : α → α) = {0}ᶜ := by - ext; simp - -theorem support_id' {α : Type*} [Zero α] : support (fun x : α ↦ x) = {0}ᶜ := - support_id - -end Function diff --git a/zeta23/Zeta23/FromPNTPlus/Mathlib/Analysis/SpecialFunctions/Log/Basic.lean b/zeta23/Zeta23/FromPNTPlus/Mathlib/Analysis/SpecialFunctions/Log/Basic.lean deleted file mode 100644 index 1ad929811e..0000000000 --- a/zeta23/Zeta23/FromPNTPlus/Mathlib/Analysis/SpecialFunctions/Log/Basic.lean +++ /dev/null @@ -1,28 +0,0 @@ -/- -Ported from https://github.com/AlexKontorovich/PrimeNumberTheoremAnd -at commit 10e1218932db7e2432aa5881d750acb819e91f19, file -PrimeNumberTheoremAnd/Mathlib/Analysis/SpecialFunctions/Log/Basic.lean. -Copyright the PrimeNumberTheoremAnd contributors; Apache License 2.0 -(http://www.apache.org/licenses/LICENSE-2.0). -Local modifications: removed the Architect blueprint -tooling (import Architect, blueprint_comment blocks, @[blueprint ...] attributes), -redirected intra-project imports to Zeta23.FromPNTPlus.*. Mathematical content unchanged. -Modified 2026 by Anthropic PBC. --/ -import Mathlib.Algebra.Order.Floor.Defs -import Mathlib.Algebra.Order.Floor.Ring -import Mathlib.Algebra.Order.Floor.Semiring -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Analysis.SpecialFunctions.Pow.Continuity - -open Filter Real - -/-- log^b x / x^a goes to zero at infinity if a is positive. -/ -theorem Real.tendsto_pow_log_div_pow_atTop (a : ℝ) (b : ℝ) (ha : 0 < a) : - Filter.Tendsto (fun x ↦ log x ^ b / x^a) Filter.atTop (nhds 0) := by - apply Asymptotics.isLittleO_iff_tendsto' _|>.mp <| isLittleO_log_rpow_rpow_atTop _ ha - filter_upwards [eventually_gt_atTop 0] with x hx - intro h - rw [rpow_eq_zero hx.le ha.ne.symm] at h - exfalso - linarith diff --git a/zeta23/Zeta23/FromPNTPlus/MediumPNT.lean b/zeta23/Zeta23/FromPNTPlus/MediumPNT.lean deleted file mode 100644 index dd0090e4a1..0000000000 --- a/zeta23/Zeta23/FromPNTPlus/MediumPNT.lean +++ /dev/null @@ -1,3731 +0,0 @@ -/- -Ported from https://github.com/AlexKontorovich/PrimeNumberTheoremAnd -at commit 6a380f0c4658c04a420a9eb00b1ed62a1e3fde01 (tag v4.32.2), file -PrimeNumberTheoremAnd/MediumPNT.lean. -Copyright the PrimeNumberTheoremAnd contributors; Apache License 2.0 -(http://www.apache.org/licenses/LICENSE-2.0). -Local modifications: removed the Architect blueprint tooling (import Architect, -blueprint_comment blocks, @[blueprint ...] attributes), redirected intra-project -imports to Zeta23.FromPNTPlus.*, and added (name := ...) tags to the three local notations. -Re-ported from the -v4.29.0 port (commit 10e1218932db7e2432aa5881d750acb819e91f19) when the project -moved to Lean v4.32.2 / Mathlib 905b95818eb32af7874a58b427f50c1711a5e96c. -Adjusted for Lean v4.33.0-rc2 / Mathlib 51e6992efd06: one redundant `rfl` after `simp` removed. -Modified 2026 by Anthropic PBC. --/ -import Zeta23.FromPNTPlus.MellinCalculus -import Zeta23.FromPNTPlus.ZetaBounds -import Zeta23.FromPNTPlus.ZetaConj -import Zeta23.FromPNTPlus.SmoothExistence -import Mathlib.Algebra.Group.Support -import Mathlib.Analysis.MellinInversion -import Mathlib.Analysis.Real.Pi.Bounds -import Mathlib.NumberTheory.Chebyshev - -set_option lang.lemmaCmd true - -open Set Function Filter Complex Real - -open ArithmeticFunction (vonMangoldt) -open scoped Chebyshev - -local notation (name := mellintransform2) "𝓜" => mellin - -local notation (name := mpnt_Lambda) "Λ" => vonMangoldt - -local notation (name := mpnt_zeta) "ζ" => riemannZeta - -local notation (name := mpnt_zetaderiv) "ζ'" => deriv ζ - -namespace Chebyshev - -theorem psi_eq_sum_range (x : ℝ) : - ψ x = ∑ n ∈ Finset.range (⌊x⌋₊ + 1), Λ n := by - rw [psi_eq_sum_Icc, Nat.range_succ_eq_Icc_zero] - -end Chebyshev - -noncomputable abbrev ChebyshevPsi (x : ℝ) : ℝ := - Chebyshev.psi x - -theorem LogDerivativeDirichlet (s : ℂ) (hs : 1 < s.re) : - - deriv riemannZeta s / riemannZeta s = ∑' n, Λ n / (n : ℂ) ^ s := by - rw [← ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs] - dsimp [LSeries, LSeries.term] - nth_rewrite 2 [Summable.tsum_eq_add_tsum_ite (b := 0) ?_] - · simp - · have := ArithmeticFunction.LSeriesSummable_vonMangoldt hs - dsimp [LSeriesSummable] at this - convert! this; rename ℕ => n - by_cases h : n = 0 <;> simp [LSeries.term, h] - -noncomputable abbrev SmoothedChebyshevIntegrand - (SmoothingF : ℝ → ℝ) (ε : ℝ) (X : ℝ) : ℂ → ℂ := - fun s ↦ (- deriv riemannZeta s) / riemannZeta s * - 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) s * (X : ℂ) ^ s - -noncomputable def SmoothedChebyshev (SmoothingF : ℝ → ℝ) (ε : ℝ) (X : ℝ) : ℂ := - VerticalIntegral' (SmoothedChebyshevIntegrand SmoothingF ε X) ((1 : ℝ) + (Real.log X)⁻¹) - -open ComplexConjugate - -set_option backward.isDefEq.respectTransparency false in -lemma smoothedChebyshevIntegrand_conj - {SmoothingF : ℝ → ℝ} {ε X : ℝ} (Xpos : 0 < X) (s : ℂ) : - SmoothedChebyshevIntegrand SmoothingF ε X (conj s) = - conj (SmoothedChebyshevIntegrand SmoothingF ε X s) := by - unfold SmoothedChebyshevIntegrand - simp only [map_mul, map_div₀, map_neg] - congr - · exact deriv_riemannZeta_conj s - · exact riemannZeta_conj s - · unfold mellin - rw[← integral_conj] - apply MeasureTheory.setIntegral_congr_fun measurableSet_Ioi - intro x xpos - simp only [smul_eq_mul, map_mul, Complex.conj_ofReal] - congr - nth_rw 1 [← map_one conj] - rw[← map_sub, Complex.cpow_conj, Complex.conj_ofReal] - rw[Complex.arg_ofReal_of_nonneg xpos.le] - exact Real.pi_ne_zero.symm - · rw[Complex.cpow_conj, Complex.conj_ofReal] - rw[Complex.arg_ofReal_of_nonneg Xpos.le] - exact Real.pi_ne_zero.symm - -open MeasureTheory - -lemma SmoothedChebyshevDirichlet_aux_integrable {SmoothingF : ℝ → ℝ} - (diffSmoothingF : ContDiff ℝ 1 SmoothingF) - (SmoothingFpos : ∀ x > 0, 0 ≤ SmoothingF x) - (suppSmoothingF : support SmoothingF ⊆ Icc (1 / 2) 2) - (mass_one : ∫ (x : ℝ) in Ioi 0, SmoothingF x / x = 1) - {ε : ℝ} (εpos : 0 < ε) (ε_lt_one : ε < 1) {σ : ℝ} (σ_gt : 1 < σ) (σ_le : σ ≤ 2) : - MeasureTheory.Integrable - (fun (y : ℝ) ↦ 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (σ + y * I)) := by - obtain ⟨c, cpos, hc⟩ := MellinOfSmooth1b diffSmoothingF suppSmoothingF - apply Integrable.mono' (g := (fun t ↦ c / ε * 1 / (1 + t ^ 2))) - · apply Integrable.const_mul integrable_inv_one_add_sq - · apply Continuous.aestronglyMeasurable - apply continuous_iff_continuousAt.mpr - intro x - have := Smooth1MellinDifferentiable diffSmoothingF suppSmoothingF ⟨εpos, ε_lt_one⟩ - SmoothingFpos mass_one (s := σ + x * I) (by simp only [add_re, ofReal_re, mul_re, I_re, - mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero]; linarith) |>.continuousAt - fun_prop - · filter_upwards [] with t - calc - _≤ c / ε * 1 / (σ^2 + t^2) := by - convert hc (σ / 2) (by linarith) (σ + t * I) (by simp only [add_re, ofReal_re, mul_re, - I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero, half_le_self_iff]; linarith) - (by simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, add_zero]; linarith) ε εpos ε_lt_one using 1 - simp only [mul_one, Complex.sq_norm, normSq_apply, add_re, ofReal_re, mul_re, I_re, - mul_zero, ofReal_im, I_im, sub_self, add_zero, add_im, mul_im, zero_add, mul_inv_rev] - ring_nf - _ ≤ _ := by - gcongr; nlinarith - --- TODO: add to mathlib -attribute [fun_prop] Continuous.const_cpow - -set_option backward.isDefEq.respectTransparency false in -lemma SmoothedChebyshevDirichlet_aux_tsum_integral {SmoothingF : ℝ → ℝ} - (diffSmoothingF : ContDiff ℝ 1 SmoothingF) - (SmoothingFpos : ∀ x > 0, 0 ≤ SmoothingF x) - (suppSmoothingF : support SmoothingF ⊆ Icc (1 / 2) 2) - (mass_one : ∫ (x : ℝ) in Ioi 0, SmoothingF x / x = 1) {X : ℝ} - (X_pos : 0 < X) {ε : ℝ} (εpos : 0 < ε) - (ε_lt_one : ε < 1) {σ : ℝ} (σ_gt : 1 < σ) (σ_le : σ ≤ 2) : - ∫ (t : ℝ), - ∑' (n : ℕ), (ArithmeticFunction.vonMangoldt n) / (n : ℂ) ^ (σ + t * I) * - 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + t * I) * (X : ℂ) ^ (σ + t * I) = - ∑' (n : ℕ), - ∫ (t : ℝ), (ArithmeticFunction.vonMangoldt n) / (n : ℂ) ^ (σ + ↑t * I) * - 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * (X : ℂ) ^ (σ + t * I) := by - - have cont_mellin_smooth : Continuous fun (a : ℝ) ↦ - 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (σ + ↑a * I) := by - rw [← continuousOn_univ] - refine ContinuousOn.comp' ?_ ?_ ?_ (t := {z : ℂ | 0 < z.re }) - · refine continuousOn_of_forall_continuousAt ?_ - intro z hz - exact (Smooth1MellinDifferentiable diffSmoothingF suppSmoothingF ⟨εpos, ε_lt_one⟩ - SmoothingFpos mass_one hz).continuousAt - · fun_prop - · simp only [mapsTo_univ_iff, mem_setOf_eq, add_re, ofReal_re, mul_re, I_re, mul_zero, - ofReal_im, I_im, mul_one, sub_self, add_zero, forall_const]; linarith - - have abs_two : ∀ a : ℝ, ∀ i : ℕ, ‖(i : ℂ) ^ ((σ : ℂ) + ↑a * I)‖₊ = i ^ σ := by - intro a i - simp_rw [← norm_toNNReal] - rw [norm_natCast_cpow_of_re_ne_zero _ (by simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, - ofReal_im, I_im, mul_one, sub_self, add_zero, ne_eq]; linarith)] - simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - add_zero, Real.toNNReal_of_nonneg <| rpow_nonneg (y := σ) (x := i) (by linarith)] - norm_cast - - rw [MeasureTheory.integral_tsum] - · have x_neq_zero : X ≠ 0 := by linarith - intro i - by_cases i_eq_zero : i = 0 - · simpa [i_eq_zero] using aestronglyMeasurable_const - · apply Continuous.aestronglyMeasurable - fun_prop (disch := simp[i_eq_zero, x_neq_zero]) - · rw [← lt_top_iff_ne_top] - simp_rw [enorm_mul, enorm_eq_nnnorm, nnnorm_div, ← norm_toNNReal, - Complex.norm_cpow_eq_rpow_re_of_pos X_pos, norm_toNNReal, abs_two] - simp only [nnnorm_real, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, add_zero] - simp_rw [MeasureTheory.lintegral_mul_const' (r := ↑(X ^ σ).toNNReal) (hr := by simp), - ENNReal.tsum_mul_right] - apply WithTop.mul_lt_top ?_ ENNReal.coe_lt_top - - conv => - arg 1 - arg 1 - intro i - rw [MeasureTheory.lintegral_const_mul' (hr := by simp)] - - rw [ENNReal.tsum_mul_right] - apply WithTop.mul_lt_top - · rw [WithTop.lt_top_iff_ne_top, ENNReal.tsum_coe_ne_top_iff_summable_coe] - push_cast - convert (ArithmeticFunction.LSeriesSummable_vonMangoldt (s := σ) - (by simp only [ofReal_re]; linarith)).norm - rw [LSeries.term_def] - split_ifs with h <;> simp[h] - · simp_rw [← enorm_eq_nnnorm] - rw [← MeasureTheory.hasFiniteIntegral_iff_enorm] - exact SmoothedChebyshevDirichlet_aux_integrable diffSmoothingF SmoothingFpos suppSmoothingF - mass_one εpos ε_lt_one σ_gt σ_le |>.hasFiniteIntegral - -set_option backward.isDefEq.respectTransparency false in -theorem SmoothedChebyshevDirichlet {SmoothingF : ℝ → ℝ} - (diffSmoothingF : ContDiff ℝ 1 SmoothingF) - (SmoothingFpos : ∀ x > 0, 0 ≤ SmoothingF x) - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (mass_one : ∫ x in Ioi (0 : ℝ), SmoothingF x / x = 1) - {X : ℝ} (X_gt : 3 < X) {ε : ℝ} (εpos : 0 < ε) (ε_lt_one : ε < 1) : - SmoothedChebyshev SmoothingF ε X = - ∑' n, ArithmeticFunction.vonMangoldt n * Smooth1 SmoothingF ε (n / X) := by - dsimp [SmoothedChebyshev, SmoothedChebyshevIntegrand, VerticalIntegral', VerticalIntegral] - set σ : ℝ := 1 + (Real.log X)⁻¹ - have log_gt : 1 < Real.log X := logt_gt_one X_gt.le - have σ_gt : 1 < σ := by - simp only [σ] - have : 0 < (Real.log X)⁻¹ := by - simp only [inv_pos] - linarith - linarith - have σ_le : σ ≤ 2 := by - simp only [σ] - have : (Real.log X)⁻¹ < 1 := inv_lt_one_of_one_lt₀ log_gt - linarith - calc - _ = 1 / (2 * π * I) * (I * ∫ (t : ℝ), ∑' n, Λ n / (n : ℂ) ^ (σ + ↑t * I) * - mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * X ^ (σ + ↑t * I)) := ?_ - _ = 1 / (2 * π * I) * (I * ∑' n, ∫ (t : ℝ), Λ n / (n : ℂ) ^ (σ + ↑t * I) * - mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * X ^ (σ + ↑t * I)) := ?_ - _ = 1 / (2 * π * I) * (I * ∑' n, Λ n * ∫ (t : ℝ), - mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * - (X / (n : ℂ)) ^ (σ + ↑t * I)) := ?_ - _ = 1 / (2 * π) * (∑' n, Λ n * ∫ (t : ℝ), - mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * - (X / (n : ℂ)) ^ (σ + ↑t * I)) := ?_ - _ = ∑' n, Λ n * (1 / (2 * π) * ∫ (t : ℝ), - mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * - (X / (n : ℂ)) ^ (σ + ↑t * I)) := ?_ - _ = ∑' n, Λ n * (1 / (2 * π) * ∫ (t : ℝ), - mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * - ((n : ℂ) / X) ^ (-(σ + ↑t * I))) := ?_ - _ = _ := ?_ - · congr; ext t - rw [LogDerivativeDirichlet] - · rw [← tsum_mul_right, ← tsum_mul_right] - · simp [σ_gt] - · congr - exact SmoothedChebyshevDirichlet_aux_tsum_integral diffSmoothingF SmoothingFpos - suppSmoothingF mass_one (by linarith) εpos ε_lt_one σ_gt σ_le - · field_simp; congr; ext n; rw [← MeasureTheory.integral_const_mul]; congr; ext t - by_cases n_ne_zero : n = 0 - · simp [n_ne_zero] - rw [mul_div_assoc, mul_assoc] - congr - rw [(div_eq_iff ?_).mpr] - · have := @mul_cpow_ofReal_nonneg (a := X / (n : ℝ)) (b := (n : ℝ)) (r := σ + I * t) ?_ ?_ - · push_cast at this ⊢ - rw [← this, div_mul_cancel₀] - · simp only [ne_eq, Nat.cast_eq_zero, n_ne_zero, not_false_eq_true] - · apply div_nonneg (by linarith : 0 ≤ X); simp - · simp - · simp only [ne_eq, cpow_eq_zero_iff, Nat.cast_eq_zero, n_ne_zero, false_and, - not_false_eq_true] - · conv => rw [← mul_assoc, div_mul]; lhs; lhs; rhs; simp - · simp_rw [← tsum_mul_left, ← mul_assoc, mul_comm] - · have ht (t : ℝ) : -(σ + t * I) = (-1) * (σ + t * I) := by simp - have hn (n : ℂ) : (n / X) ^ (-1 : ℂ) = X / n := by simp [cpow_neg_one] - have (n : ℕ) : (log ((n : ℂ) / (X : ℂ)) * -1).im = 0 := by - simp [Complex.log_im, arg_eq_zero_iff, div_nonneg (Nat.cast_nonneg _) (by linarith : 0 ≤ X)] - have h (n : ℕ) (t : ℝ) : ((n : ℂ) / X) ^ ((-1 : ℂ) * (σ + t * I)) = - ((n / X) ^ (-1 : ℂ)) ^ (σ + ↑t * I) := by - rw [cpow_mul] <;> {rw [this n]; simp [Real.pi_pos, Real.pi_nonneg]} - conv => rhs; lhs; intro n; rhs; rhs; rhs; intro t; rhs; rw [ht t, h n t]; lhs; rw [hn] - · push_cast - congr - ext n - by_cases n_zero : n = 0 - · simp [n_zero] - have n_pos : 0 < n := by - simpa only [n_zero, gt_iff_lt, false_or] using (Nat.eq_zero_or_pos n) - congr - have := mellinInv_mellin_eq σ (f := fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (x := n / X) - ?_ ?_ ?_ ?_ - · beta_reduce at this - dsimp [mellinInv, VerticalIntegral] at this - convert! this using 4 - · norm_cast - · rw [mul_comm] - norm_cast - · exact div_pos (by exact_mod_cast n_pos) (by linarith : 0 < X) - · apply Smooth1MellinConvergent diffSmoothingF suppSmoothingF ⟨εpos, ε_lt_one⟩ - SmoothingFpos mass_one - simp only [ofReal_re] - linarith - · dsimp [VerticalIntegrable] - apply SmoothedChebyshevDirichlet_aux_integrable diffSmoothingF SmoothingFpos - suppSmoothingF mass_one εpos ε_lt_one σ_gt σ_le - · refine ContinuousAt.comp (g := ofReal) RCLike.continuous_ofReal.continuousAt ?_ - exact Smooth1ContinuousAt diffSmoothingF SmoothingFpos suppSmoothingF - εpos (by positivity) - ---open scoped ArithmeticFunction in -theorem SmoothedChebyshevClose_aux {Smooth1 : (ℝ → ℝ) → ℝ → ℝ → ℝ} (SmoothingF : ℝ → ℝ) - (c₁ : ℝ) (c₁_pos : 0 < c₁) (c₁_lt : c₁ < 1) - (c₂ : ℝ) (c₂_pos : 0 < c₂) (c₂_lt : c₂ < 2) - (hc₂ : ∀ (ε x : ℝ), ε ∈ Ioo 0 1 → 1 + c₂ * ε ≤ x → Smooth1 SmoothingF ε x = 0) - (C : ℝ) (C_eq : C = 6 * (3 * c₁ + c₂)) - (ε : ℝ) (ε_pos : 0 < ε) (ε_lt_one : ε < 1) - (X : ℝ) (X_pos : 0 < X) (X_gt_three : 3 < X) - (X_bound_1 : 1 ≤ X * ε * c₁) (X_bound_2 : 1 ≤ X * ε * c₂) - (smooth1BddAbove : ∀ (n : ℕ), 0 < n → Smooth1 SmoothingF ε (↑n / X) ≤ 1) - (smooth1BddBelow : ∀ (n : ℕ), 0 < n → Smooth1 SmoothingF ε (↑n / X) ≥ 0) - (smoothIs1 : ∀ (n : ℕ), 0 < n → ↑n ≤ X * (1 - c₁ * ε) → - Smooth1 SmoothingF ε (↑n / X) = 1) - (smoothIs0 : ∀ (n : ℕ), 1 + c₂ * ε ≤ ↑n / X → Smooth1 SmoothingF ε (↑n / X) = 0) : - ‖(↑((∑' (n : ℕ), ArithmeticFunction.vonMangoldt n * Smooth1 SmoothingF ε (↑n / X))) : ℂ) - - ψ X‖ ≤ - C * ε * X * Real.log X := by - norm_cast - - let F := Smooth1 SmoothingF ε - - let n₀ := ⌈X * (1 - c₁ * ε)⌉₊ - - have n₀_pos : 0 < n₀ := by - simp only [Nat.ceil_pos, n₀] - subst C_eq - simp_all only [mem_Ioo, and_imp, ge_iff_le, implies_true, mul_pos_iff_of_pos_left, sub_pos] - exact mul_lt_one_of_nonneg_of_lt_one_left c₁_pos.le c₁_lt ε_lt_one.le - - have n₀_inside_le_X : X * (1 - c₁ * ε) ≤ X := by - nth_rewrite 2 [← mul_one X] - apply mul_le_mul_of_nonneg_left _ X_pos.le - apply sub_le_self - positivity - - have n₀_le : n₀ ≤ X * ((1 - c₁ * ε)) + 1 := by - simp only [n₀] - exact le_of_lt (Nat.ceil_lt_add_one (by bound)) - - have n₀_gt : X * ((1 - c₁ * ε)) ≤ n₀ := by - simp only [n₀] - exact Nat.le_ceil (X * (1 - c₁ * ε)) - - have sumΛ : Summable (fun (n : ℕ) ↦ Λ n * F (n / X)) := by - exact (summable_of_ne_finset_zero fun a s=>mul_eq_zero_of_right _ - (hc₂ _ _ (⟨ε_pos, ε_lt_one⟩) ((le_div_iff₀ X_pos).2 (Nat.ceil_le.1 (not_lt.1 - (s ∘ Finset.mem_range.2)))))) - - have sumΛn₀ (n₀ : ℕ) : Summable (fun n ↦ Λ (n + n₀) * F ((n + n₀) / X)) := by - exact_mod_cast sumΛ.comp_injective fun Q => by omega - - rw[← Summable.sum_add_tsum_nat_add' (k := n₀) (mod_cast sumΛn₀ n₀)] - - let n₁ := ⌊X * (1 + c₂ * ε)⌋₊ - - have n₁_pos : 0 < n₁ := by - dsimp only [n₁] - apply Nat.le_floor - rw[Nat.succ_eq_add_one, zero_add] - norm_cast - apply one_le_mul_of_one_le_of_one_le (by linarith) - apply le_add_of_nonneg_right - positivity - - have n₁_ge : X * (1 + c₂ * ε) - 1 ≤ n₁ := by - simp only [tsub_le_iff_right, n₁] - exact le_of_lt (Nat.lt_floor_add_one (X * (1 + c₂ * ε))) - - have n₁_le : (n₁ : ℝ) ≤ X * (1 + c₂ * ε) := by - simp only [n₁] - exact Nat.floor_le (by bound) - - have n₁_ge_n₀ : n₀ ≤ n₁ := by - exact_mod_cast le_imp_le_of_le_of_le n₀_le n₁_ge (by linarith) - - have n₁_sub_n₀ : (n₁ : ℝ) - n₀ ≤ X * ε * (c₂ + c₁) := by - calc - (n₁ : ℝ) - n₀ ≤ X * (1 + c₂ * ε) - n₀ := by - exact sub_le_sub_right n₁_le ↑n₀ - _ ≤ X * (1 + c₂ * ε) - (X * (1 - c₁ * ε)) := by - exact tsub_le_tsub_left n₀_gt (X * (1 + c₂ * ε)) - _ = X * ε * (c₂ + c₁) := by ring - - rw[show (∑' (n : ℕ), Λ (n + n₀ : ) * F ((n + n₀ : ) / X)) = - (∑ n ∈ Finset.range (n₁ - n₀), Λ (n + n₀) * F ((n + n₀) / X)) + - (∑' (n : ℕ), Λ (n + n₁ : ) * F ((n + n₁ : ) / X)) by - rw[← Summable.sum_add_tsum_nat_add' (k := n₁ - n₀)] - · congr! 5 - · simp only [Nat.cast_add] - · omega - · congr! 1 - norm_cast - omega - · convert sumΛn₀ ((n₁ - n₀) + n₀) using 4 - · omega - · congr! 1 - norm_cast - omega] - - rw [show(∑' (n : ℕ), Λ (n + n₁) * F (↑(n + n₁) / X)) = Λ (n₁) * F (↑n₁ / X) by - have : (∑' (n : ℕ), Λ (n + n₁) * F (↑(n + n₁) / X)) = - Λ (n₁) * F (↑n₁ / X) + (∑' (n : ℕ), Λ (n + 1 + n₁) * F (↑(n + 1 + n₁) / X)) := by - let fTemp := fun n ↦ Λ (n + n₁) * F ((↑n + ↑n₁) / X) - have hTemp (n : ℕ): fTemp n = Λ (n + n₁) * F (↑(n + n₁) / X) := by rw[Nat.cast_add] - rw[← tsum_congr hTemp, ← tsum_congr fun n ↦ (hTemp (n + 1))] - have : Λ n₁ * F (↑n₁ / X) = fTemp 0 := by - dsimp only [fTemp] - rw[← Nat.cast_add, zero_add] - rw[this] - exact Summable.tsum_eq_zero_add (sumΛn₀ n₁) - rw[this] - apply add_eq_left.mpr - convert tsum_zero with n - convert mul_zero _ - apply smoothIs0 - rw[← mul_le_mul_iff_left₀ X_pos] - rw [(by field_simp : ↑(n + 1 + n₁) / X * X = ↑(n + 1 + n₁)), - (by ring : (1 + c₂ * ε) * X = 1 + (X * (1 + c₂ * ε) - 1)), Nat.cast_add, Nat.cast_add] - bound] - - have X_le_floor_add_one : X ≤ ↑⌊X + 1⌋₊ := by - rw[Nat.floor_add_one (by linarith), Nat.cast_add, Nat.cast_one] - apply le_trans <| Nat.le_ceil X - exact_mod_cast Nat.ceil_le_floor_add_one X - - have floor_X_add_one_le_self : ↑⌊X + 1⌋₊ ≤ X + 1 := Nat.floor_le (by positivity) - - rw [show ψ X = - (∑ x ∈ Finset.range n₀, Λ x) + - ∑ x ∈ Finset.range (⌊X + 1⌋₊ - n₀), Λ (x + ↑n₀) by - field_simp - simp only [add_comm _ n₀] - rw [← Finset.sum_range_add, Nat.add_sub_of_le, Chebyshev.psi_eq_sum_range, - Nat.floor_add_one X_pos.le] - dsimp only [n₀] - exact Nat.ceil_le.mpr (by linarith)] - - rw [show ∑ n ∈ Finset.range n₀, Λ n * F (↑n / X) = - ∑ n ∈ Finset.range n₀, Λ n by - apply Finset.sum_congr rfl - intro n hn - obtain rfl|n_zero := eq_or_ne n 0 - · simp only [ArithmeticFunction.map_zero, CharP.cast_eq_zero, zero_div, zero_mul] - · convert mul_one _ - apply smoothIs1 n (Nat.zero_lt_of_ne_zero n_zero) ?_ - simp only [Finset.mem_range, n₀] at hn - exact Nat.lt_ceil.mp hn |>.le] - have vonBnd1 : - ∀ n ∈ Finset.range (n₁ - n₀), ‖Λ (n + n₀)‖ ≤ Real.log (X * (1 + c₂ * ε)) := by - intro n hn - have n_add_n0_le_n1: (n : ℝ) + n₀ ≤ n₁ := by - apply le_of_lt - rw[Finset.mem_range] at hn - rw[← add_lt_add_iff_right (-↑n₀), add_neg_cancel_right, add_comm, ← sub_eq_neg_add] - exact_mod_cast hn - have inter1: ‖ Λ (n + n₀)‖ ≤ Real.log (↑n + ↑n₀) := by - rw[Real.norm_of_nonneg ArithmeticFunction.vonMangoldt_nonneg, ← Nat.cast_add] - apply ArithmeticFunction.vonMangoldt_le_log - have inter2: Real.log (↑n + ↑n₀) ≤ Real.log (↑n₁) := by - exact_mod_cast Real.log_le_log (by positivity) n_add_n0_le_n1 - have inter3: Real.log (↑n₁) ≤ Real.log (X * (1 + c₂ * ε)) := by - exact Real.log_le_log (by bound) (by linarith) - exact le_imp_le_of_le_of_le inter1 inter3 inter2 - - have bnd1 : - ∑ n ∈ Finset.range (n₁ - n₀), ‖Λ (n + n₀)‖ * ‖F ((↑n + ↑n₀) / X)‖ - ≤ (n₁ - n₀) * Real.log (X * (1 + c₂ * ε)) := by - have : (n₁ - n₀) * Real.log (X * (1 + c₂ * ε)) = - (∑ n ∈ Finset.range (n₁ - n₀), Real.log (X * (1 + c₂ * ε))) := by - rw[← Nat.cast_sub] - · nth_rewrite 1 [← Finset.card_range (n₁ - n₀)] - rw[Finset.cast_card, Finset.sum_const, smul_one_mul] - exact Eq.symm (Finset.sum_const (Real.log (X * (1 + c₂ * ε)))) - exact n₁_ge_n₀ - rw [this] - apply Finset.sum_le_sum - intro n hn - rw [← mul_one (Real.log (X * (1 + c₂ * ε)))] - apply mul_le_mul (vonBnd1 _ hn) _ (norm_nonneg _) (log_nonneg (by bound)) - rw[Real.norm_of_nonneg, ← Nat.cast_add] - · dsimp only [F] - apply smooth1BddAbove - bound - rw[← Nat.cast_add] - dsimp only [F] - apply smooth1BddBelow - bound - - have bnd2 : - ∑ x ∈ Finset.range (⌊X + 1⌋₊ - n₀), ‖Λ (x + n₀)‖ ≤ (⌊X + 1⌋₊ - n₀) * Real.log (X + 1) := by - have : (⌊X + 1⌋₊ - n₀) * Real.log (X + 1) = - (∑ n ∈ Finset.range (⌊X + 1⌋₊ - n₀), Real.log (X + 1)) := by - rw[← Nat.cast_sub] - · nth_rewrite 1 [← Finset.card_range (⌊X + 1⌋₊ - n₀)] - rw[Finset.cast_card, Finset.sum_const, smul_one_mul] - exact Eq.symm (Finset.sum_const (Real.log (X + 1))) - simp only [Nat.ceil_le, n₀] - exact Preorder.le_trans (X * (1 - c₁ * ε)) X (↑⌊X + 1⌋₊) n₀_inside_le_X - X_le_floor_add_one - rw[this] - apply Finset.sum_le_sum - intro n hn - have n_add_n0_le_X_add_one: (n : ℝ) + n₀ ≤ X + 1 := by - rw[Finset.mem_range] at hn - rw [← add_le_add_iff_right (-↑n₀), add_assoc, ← sub_eq_add_neg, sub_self, add_zero, - ← sub_eq_add_neg] - have temp: (n : ℝ) < ⌊X + 1⌋₊ - n₀ := by - rw [← Nat.cast_sub, Nat.cast_lt] - · exact hn - simp only [Nat.ceil_le, n₀] - exact le_trans n₀_inside_le_X X_le_floor_add_one - have : ↑⌊X + 1⌋₊ - ↑n₀ ≤ X + 1 - ↑n₀ := by - apply sub_le_sub_right floor_X_add_one_le_self - exact le_of_lt (lt_of_le_of_lt' this temp) - have inter1: ‖ Λ (n + n₀)‖ ≤ Real.log (↑n + ↑n₀) := by - rw[Real.norm_of_nonneg ArithmeticFunction.vonMangoldt_nonneg, ← Nat.cast_add] - apply ArithmeticFunction.vonMangoldt_le_log - apply le_trans inter1 - exact_mod_cast Real.log_le_log (by positivity) (n_add_n0_le_X_add_one) - - clear vonBnd1 - - have inter1 : Real.log (X * (1 + c₂ * ε)) ≤ Real.log (3 * X) := by - apply Real.log_le_log (by positivity) - have const_le_2: 1 + c₂ * ε ≤ 3 := by - have : (3 : ℝ) = 1 + 2 := by ring - rw[this] - apply add_le_add_right - rw[← mul_one 2] - exact mul_le_mul (by linarith) (by linarith) (by positivity) (by positivity) - rw[mul_comm] - exact mul_le_mul const_le_2 (by rfl) (by positivity) (by positivity) - - calc - _ = ‖∑ n ∈ Finset.range (n₁ - n₀), Λ (n + n₀) * F ((↑n + ↑n₀) / X) - - ∑ x ∈ Finset.range (⌊X + 1⌋₊ - n₀), Λ (x + n₀) + Λ n₁ * F (↑n₁ / X)‖ := by - congr 1 - ring - _ ≤ (∑ n ∈ Finset.range (n₁ - n₀), ‖Λ (n + n₀)‖ * ‖F ((↑n + ↑n₀) / X)‖) + - ∑ x ∈ Finset.range (⌊X + 1⌋₊ - n₀), ‖Λ (x + n₀)‖ + - ‖Λ n₁‖ * ‖F (↑n₁ / X)‖ := by - apply norm_add_le_of_le - · apply norm_sub_le_of_le - · apply norm_sum_le_of_le - intro b hb - exact norm_mul_le_of_le (by rfl) (by rfl) - apply norm_sum_le_of_le - intro b hb - rfl - exact_mod_cast norm_mul_le_of_le (by rfl) (by rfl) - _ ≤ 2 * (X * ε * (3 * c₁ + c₂)) * Real.log X + Real.log (3 * X) := by - apply add_le_add - · apply le_trans <| add_le_add bnd1 bnd2 - rw [(by ring : 2 * (X * ε * (3 * c₁ + c₂)) = 2 * (X * ε * (c₁ + c₂)) + 4 * (X * ε * c₁)), add_mul] - apply add_le_add - · calc - _ ≤ (X * ε * (c₂ + c₁)) * (Real.log (X) + Real.log (3)) := by - apply mul_le_mul n₁_sub_n₀ _ (log_nonneg (by linarith)) (by positivity) - rw[← Real.log_mul (by positivity) (by positivity)] - nth_rewrite 3 [mul_comm] - exact inter1 - _ ≤ 2 * ((X * ε * (c₂ + c₁)) * Real.log X) := by - rw[two_mul, mul_add] - bound - _ = _ := by ring - calc - _ ≤ 2 * (X * ε * c₁) * (Real.log (X) + Real.log (3)) := by - apply mul_le_mul _ _ (log_nonneg (by linarith)) (by positivity) - · rw [(by ring : 2 * (X * ε * c₁) = (X * (1 + ε * c₁)) - (X * (1 - ε * c₁)))] - apply sub_le_sub - · apply le_trans floor_X_add_one_le_self - ring_nf - rw[add_comm, add_le_add_iff_left] - exact X_bound_1 - nth_rewrite 2 [mul_comm] - exact n₀_gt - rw[← Real.log_mul (by positivity) (by norm_num), mul_comm] - exact Real.log_le_log (by positivity) (by linarith) - _ = 2 * (X * ε * c₁ * Real.log X) + 2 * (X * ε * c₁ * Real.log 3) := by ring - _ ≤ 2 * (X * ε * c₁ * Real.log X) + 2 * (X * ε * c₁ * Real.log X) := by gcongr - _ = _ := by ring - · apply le_trans _ inter1 - rw[← mul_one (Real.log (X * (1 + c₂ * ε)))] - apply mul_le_mul _ _ (norm_nonneg _) (log_nonneg (by bound)) - · rw[Real.norm_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] - exact le_trans ArithmeticFunction.vonMangoldt_le_log <| - Real.log_le_log (mod_cast n₁_pos) n₁_le - rw[Real.norm_of_nonneg <| smooth1BddBelow _ n₁_pos] - apply smooth1BddAbove _ n₁_pos - _ ≤ 2 * (X * ε * (3 * c₁ + c₂)) * (Real.log X + (Real.log X + Real.log 3)) := by - rw [← Real.log_mul (by positivity) (by positivity), mul_comm X 3] - nth_rewrite 2 [mul_add] - apply add_le_add_right - nth_rewrite 1 [← one_mul (Real.log (3 * X))] - apply mul_le_mul_of_nonneg_right _ (log_nonneg (by linarith)) - linarith - _ = 4 * (X * ε * (3 * c₁ + c₂)) * Real.log X + - 2 * (X * ε * (3 * c₁ + c₂)) * Real.log 3 := by ring - _ ≤ 4 * (X * ε * (3 * c₁ + c₂)) * Real.log X + - 2 * (X * ε * (3 * c₁ + c₂)) * Real.log X := by gcongr - _ = _ := by - rw [C_eq] - ring - -theorem SmoothedChebyshevClose {SmoothingF : ℝ → ℝ} - (diffSmoothingF : ContDiff ℝ 1 SmoothingF) - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x) - (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1) : - ∃ C > 0, ∀ (X : ℝ) (_ : 3 < X) (ε : ℝ) (_ : 0 < ε) (_ : ε < 1) (_ : 2 < X * ε), - ‖SmoothedChebyshev SmoothingF ε X - ψ X‖ ≤ C * ε * X * Real.log X := by - obtain ⟨c₁, c₁_pos, c₁_eq, hc₁⟩ := Smooth1Properties_below suppSmoothingF mass_one - - obtain ⟨c₂, c₂_pos, c₂_eq, hc₂⟩ := Smooth1Properties_above suppSmoothingF - - have c₁_lt : c₁ < 1 := by - rw[c₁_eq] - exact lt_trans (Real.log_two_lt_d9) (by norm_num) - - have c₂_lt : c₂ < 2 := by - rw[c₂_eq] - nth_rewrite 3 [← mul_one 2] - apply mul_lt_mul' - · rfl - · exact lt_trans (Real.log_two_lt_d9) (by norm_num) - · exact Real.log_nonneg (by norm_num) - · positivity - - let C : ℝ := 6 * (3 * c₁ + c₂) - have C_eq : C = 6 * (3 * c₁ + c₂) := rfl - - clear_value C - - have Cpos : 0 < C := by - rw [C_eq] - positivity - - refine ⟨C, Cpos, fun X X_ge_C ε εpos ε_lt_one ↦ ?_⟩ - - have X_gt_zero : (0 : ℝ) < X := by linarith - - have n_on_X_pos {n : ℕ} (npos : 0 < n) : - 0 < n / X := by - have : (0 : ℝ) < n := by exact_mod_cast npos - positivity - - have smooth1BddAbove (n : ℕ) (npos : 0 < n) : - Smooth1 SmoothingF ε (n / X) ≤ 1 := - Smooth1LeOne SmoothingFnonneg mass_one εpos (n_on_X_pos npos) - - have smooth1BddBelow (n : ℕ) (npos : 0 < n) : - Smooth1 SmoothingF ε (n / X) ≥ 0 := - Smooth1Nonneg SmoothingFnonneg (n_on_X_pos npos) εpos - - have smoothIs1 (n : ℕ) (npos : 0 < n) (n_le : n ≤ X * (1 - c₁ * ε)) : - Smooth1 SmoothingF ε (↑n / X) = 1 := by - apply hc₁ (ε := ε) (n / X) εpos (n_on_X_pos npos) - exact (div_le_iff₀' X_gt_zero).mpr n_le - - have smoothIs0 (n : ℕ) (n_le : (1 + c₂ * ε) ≤ n / X) := - hc₂ (ε := ε) (n / X) ⟨εpos, ε_lt_one⟩ n_le - - have ε_pos: ε > 0 := by linarith - have X_pos: X > 0 := by linarith - have X_gt_three : 3 < X := by linarith - - intro X_bound - - have X_bound_1 : 1 ≤ X * ε * c₁ := by - rw[c₁_eq, ← div_le_iff₀] - · have : 1 / Real.log 2 < 2 := by - nth_rewrite 2 [← one_div_one_div 2] - rw[one_div_lt_one_div] - · exact lt_of_le_of_lt (by norm_num) (Real.log_two_gt_d9) - · exact Real.log_pos (by norm_num) - norm_num - exact le_of_lt (gt_trans X_bound this) - exact Real.log_pos (by norm_num) - - have X_bound_2 : 1 ≤ X * ε * c₂ := by - rw[c₂_eq, ← div_le_iff₀] - · have : 1 / (2 * Real.log 2) < 2 := by - nth_rewrite 3 [← one_div_one_div 2] - · rw[one_div_lt_one_div, ← one_mul (1 / 2)] - · apply mul_lt_mul - · norm_num - · apply le_of_lt - exact lt_trans (by norm_num) (Real.log_two_gt_d9) - repeat norm_num - · norm_num - exact Real.log_pos (by norm_num) - · norm_num - exact le_of_lt (gt_trans X_bound this) - norm_num - exact Real.log_pos (by norm_num) - - rw [SmoothedChebyshevDirichlet diffSmoothingF SmoothingFnonneg suppSmoothingF - mass_one (by linarith) εpos ε_lt_one] - - convert SmoothedChebyshevClose_aux SmoothingF c₁ c₁_pos c₁_lt c₂ c₂_pos c₂_lt hc₂ C C_eq ε - ε_pos ε_lt_one X X_pos X_gt_three X_bound_1 X_bound_2 smooth1BddAbove smooth1BddBelow - smoothIs1 smoothIs0 - -noncomputable def I₁ (SmoothingF : ℝ → ℝ) (ε X T : ℝ) : ℂ := - (1 / (2 * π * I)) * (I * (∫ t : ℝ in Iic (-T), - SmoothedChebyshevIntegrand SmoothingF ε X ((1 + (Real.log X)⁻¹) + t * I))) - -noncomputable def I₂ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ := - (1 / (2 * π * I)) * ((∫ σ in σ₁..(1 + (Real.log X)⁻¹), - SmoothedChebyshevIntegrand SmoothingF ε X (σ - T * I))) - -noncomputable def I₃₇ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ := - (1 / (2 * π * I)) * (I * (∫ t in (-T)..T, - SmoothedChebyshevIntegrand SmoothingF ε X (σ₁ + t * I))) - -noncomputable def I₈ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ := - (1 / (2 * π * I)) * ((∫ σ in σ₁..(1 + (Real.log X)⁻¹), - SmoothedChebyshevIntegrand SmoothingF ε X (σ + T * I))) - -noncomputable def I₉ (SmoothingF : ℝ → ℝ) (ε X T : ℝ) : ℂ := - (1 / (2 * π * I)) * (I * (∫ t : ℝ in Ici T, - SmoothedChebyshevIntegrand SmoothingF ε X ((1 + (Real.log X)⁻¹) + t * I))) - -noncomputable def I₃ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ := - (1 / (2 * π * I)) * (I * (∫ t in (-T)..(-3), - SmoothedChebyshevIntegrand SmoothingF ε X (σ₁ + t * I))) - -noncomputable def I₇ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ := - (1 / (2 * π * I)) * (I * (∫ t in (3 : ℝ)..T, - SmoothedChebyshevIntegrand SmoothingF ε X (σ₁ + t * I))) - -noncomputable def I₄ (SmoothingF : ℝ → ℝ) (ε X σ₁ σ₂ : ℝ) : ℂ := - (1 / (2 * π * I)) * ((∫ σ in σ₂..σ₁, - SmoothedChebyshevIntegrand SmoothingF ε X (σ - 3 * I))) - -noncomputable def I₆ (SmoothingF : ℝ → ℝ) (ε X σ₁ σ₂ : ℝ) : ℂ := - (1 / (2 * π * I)) * ((∫ σ in σ₂..σ₁, - SmoothedChebyshevIntegrand SmoothingF ε X (σ + 3 * I))) - -noncomputable def I₅ (SmoothingF : ℝ → ℝ) (ε X σ₂ : ℝ) : ℂ := - (1 / (2 * π * I)) * - (I * (∫ t in (-3)..3, SmoothedChebyshevIntegrand SmoothingF ε X (σ₂ + t * I))) - -theorem realDiff_of_complexDiff {f : ℂ → ℂ} (s : ℂ) (hf : DifferentiableAt ℂ f s) : - ContinuousAt (fun (x : ℝ) ↦ f (s.re + x * I)) s.im := by - apply ContinuousAt.comp _ (by fun_prop) - convert hf.continuousAt - simp - -def LogDerivZetaHasBound (A C : ℝ) : Prop := ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|) - (_ : σ ∈ Ici (1 - A / Real.log |t| ^ 9)), ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤ - C * Real.log |t| ^ 9 - -def LogDerivZetaIsHoloSmall (σ₂ : ℝ) : Prop := - HolomorphicOn (fun (s : ℂ) ↦ ζ' s / (ζ s)) - (((uIcc σ₂ 2) ×ℂ (uIcc (-3) 3)) \ {1}) - -theorem dlog_riemannZeta_bdd_on_vertical_lines_explicit {σ₀ : ℝ} (σ₀_gt : 1 < σ₀) : - ∀(t : ℝ), ‖(-ζ' (σ₀ + t * I) / ζ (σ₀ + t * I))‖ ≤ ‖(ζ' σ₀ / ζ σ₀)‖ := - fun _ ↦ dlog_riemannZeta_bdd_on_vertical_lines_generalized _ _ _ σ₀_gt <| le_refl _ - --- TODO : Move elsewhere (should be in Mathlib!) NOT NEEDED -theorem dlog_riemannZeta_bdd_on_vertical_lines {σ₀ : ℝ} (σ₀_gt : 1 < σ₀) : - ∃ c > 0, ∀(t : ℝ), ‖ζ' (σ₀ + t * I) / ζ (σ₀ + t * I)‖ ≤ c := by - refine ⟨1 + ‖(ζ' σ₀ / ζ σ₀)‖, (by positivity), fun t ↦ ?_⟩ - have := dlog_riemannZeta_bdd_on_vertical_lines_explicit σ₀_gt t - rw [neg_div, norm_neg] at this - exact le_trans this (lt_one_add _).le - -theorem SmoothedChebyshevPull1_aux_integrable {SmoothingF : ℝ → ℝ} {ε : ℝ} (ε_pos : 0 < ε) - (ε_lt_one : ε < 1) - {X : ℝ} (X_gt : 3 < X) - {σ₀ : ℝ} (σ₀_gt : 1 < σ₀) (σ₀_le_2 : σ₀ ≤ 2) - (suppSmoothingF : support SmoothingF ⊆ Icc (1 / 2) 2) - (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x) - (mass_one : ∫ (x : ℝ) in Ioi 0, SmoothingF x / x = 1) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - : - Integrable (fun (t : ℝ) ↦ - SmoothedChebyshevIntegrand SmoothingF ε X (σ₀ + (t : ℂ) * I)) volume := by - obtain ⟨C, C_pos, hC⟩ := dlog_riemannZeta_bdd_on_vertical_lines σ₀_gt - let c : ℝ := C * X ^ σ₀ - have : ∀ t, ‖(fun (t : ℝ) ↦ (- deriv riemannZeta (σ₀ + (t : ℂ) * I)) / - riemannZeta (σ₀ + (t : ℂ) * I) * - (X : ℂ) ^ (σ₀ + (t : ℂ) * I)) t‖ ≤ c := by - intro t - simp only [Complex.norm_mul, c] - gcongr - · convert! hC t using 1 - simp - · rw [Complex.norm_cpow_eq_rpow_re_of_nonneg] - · simp - · linarith - · simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - add_zero, ne_eq] - linarith - convert (SmoothedChebyshevDirichlet_aux_integrable ContDiffSmoothingF SmoothingFnonneg - suppSmoothingF mass_one ε_pos ε_lt_one σ₀_gt σ₀_le_2).bdd_mul - (c := c) ?_ (ae_of_all _ this) using 2 - · unfold SmoothedChebyshevIntegrand - ring - · apply Continuous.aestronglyMeasurable - rw [← continuousOn_univ] - intro t _ - let s := σ₀ + (t : ℂ) * I - have s_ne_one : s ≠ 1 := by - intro h - -- If σ₀ + t * I = 1, then taking real parts gives σ₀ = 1 - have : σ₀ = 1 := by - have := congr_arg Complex.re h - simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, add_zero, one_re, s] at this - exact this - -- But this contradicts 1 < σ₀ - linarith [σ₀_gt] - apply ContinuousAt.continuousWithinAt - apply ContinuousAt.mul - · have diffζ := differentiableAt_riemannZeta s_ne_one - apply ContinuousAt.div - · apply ContinuousAt.neg - have : DifferentiableAt ℂ (fun s ↦ deriv riemannZeta s) s := - differentiableAt_deriv_riemannZeta s_ne_one - convert realDiff_of_complexDiff (s := σ₀ + (t : ℂ) * I) this <;> simp - · convert realDiff_of_complexDiff (s := σ₀ + (t : ℂ) * I) diffζ <;> simp - · apply riemannZeta_ne_zero_of_one_lt_re - simp [σ₀_gt] - · apply ContinuousAt.comp _ (by fun_prop) - apply continuousAt_const_cpow - norm_cast - linarith - -lemma BddAboveOnRect {g : ℂ → ℂ} {z w : ℂ} (holoOn : HolomorphicOn g (z.Rectangle w)) : - BddAbove (norm ∘ g '' (z.Rectangle w)) := by - have compact_rect : IsCompact (z.Rectangle w) := by - apply IsCompact.reProdIm <;> apply isCompact_uIcc - refine IsCompact.bddAbove_image compact_rect ?_ - apply holoOn.continuousOn.norm - -theorem SmoothedChebyshevPull1 {SmoothingF : ℝ → ℝ} {ε : ℝ} (ε_pos : 0 < ε) - (ε_lt_one : ε < 1) - (X : ℝ) (X_gt : 3 < X) - {T : ℝ} (T_pos : 0 < T) {σ₁ : ℝ} - (σ₁_pos : 0 < σ₁) (σ₁_lt_one : σ₁ < 1) - (holoOn : HolomorphicOn (ζ' / ζ) ((Icc σ₁ 2) ×ℂ (Icc (-T) T) \ {1})) - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x) - (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) : - SmoothedChebyshev SmoothingF ε X = - I₁ SmoothingF ε X T - - I₂ SmoothingF ε T X σ₁ + - I₃₇ SmoothingF ε T X σ₁ + - I₈ SmoothingF ε T X σ₁ + - I₉ SmoothingF ε X T - + 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) 1 * X := by - unfold SmoothedChebyshev - unfold VerticalIntegral' - have X_eq_gt_one : 1 < 1 + (Real.log X)⁻¹ := by - nth_rewrite 1 [← add_zero 1] - bound - have X_eq_lt_two : (1 + (Real.log X)⁻¹) < 2 := by - rw[← one_add_one_eq_two] - gcongr - exact inv_lt_one_of_one_lt₀ <| logt_gt_one X_gt.le - have X_eq_le_two : 1 + (Real.log X)⁻¹ ≤ 2 := X_eq_lt_two.le - rw [verticalIntegral_split_three (a := -T) (b := T)] - swap - · exact SmoothedChebyshevPull1_aux_integrable ε_pos ε_lt_one X_gt X_eq_gt_one - X_eq_le_two suppSmoothingF SmoothingFnonneg mass_one ContDiffSmoothingF - · have temp : ↑(1 + (Real.log X)⁻¹) = (1 : ℂ) + ↑(Real.log X)⁻¹ := by simp - unfold I₁ - simp only [smul_eq_mul, mul_add, temp, sub_eq_add_neg, add_assoc, add_left_cancel_iff] - unfold I₉ - nth_rewrite 6 [add_comm] - simp only [← add_assoc] - rw [add_right_cancel_iff, - ← add_right_inj (1 / (2 * ↑π * I) * - -VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) (1 + (Real.log X)⁻¹) (-T) T), - ← mul_add, ← sub_eq_neg_add, sub_self, mul_zero] - unfold VIntegral I₂ I₃₇ I₈ - simp only [smul_eq_mul, temp, ← add_assoc, ← mul_neg, ← mul_add] - let fTempRR : ℝ → ℝ → ℂ := fun x ↦ fun y ↦ - SmoothedChebyshevIntegrand SmoothingF ε X ((x : ℝ) + (y : ℝ) * I) - let fTempC : ℂ → ℂ := fun z ↦ fTempRR z.re z.im - have : ∫ (y : ℝ) in -T..T, - SmoothedChebyshevIntegrand SmoothingF ε X (1 + ↑(Real.log X)⁻¹ + ↑y * I) = - ∫ (y : ℝ) in -T..T, fTempRR (1 + (Real.log X)⁻¹) y := by - unfold fTempRR - simp only [temp] - rw[this] - have : ∫ (σ₀ : ℝ) in σ₁..1 + (Real.log X)⁻¹, - SmoothedChebyshevIntegrand SmoothingF ε X (↑σ₀ - ↑T * I) = - ∫ (x : ℝ) in σ₁..1 + (Real.log X)⁻¹, fTempRR x (-T) := by - unfold fTempRR - simp only [ofReal_neg, neg_mul, sub_eq_add_neg] - rw[this] - have : ∫ (t : ℝ) in -T..T, - SmoothedChebyshevIntegrand SmoothingF ε X (↑σ₁ + ↑t * I) = - ∫ (y : ℝ) in -T..T, fTempRR σ₁ y := rfl - rw[this] - have : ∫ (σ₀ : ℝ) in σ₁..1 + (Real.log X)⁻¹, - SmoothedChebyshevIntegrand SmoothingF ε X (↑σ₀ + ↑T * I) = - ∫ (x : ℝ) in σ₁..1 + (Real.log X)⁻¹, fTempRR x T := rfl - rw[this] - have : (((I * -∫ (y : ℝ) in -T..T, fTempRR (1 + (Real.log X)⁻¹) y) + - -∫ (x : ℝ) in σ₁..1 + (Real.log X)⁻¹, fTempRR x (-T)) + - I * ∫ (y : ℝ) in -T..T, fTempRR σ₁ y) + - ∫ (x : ℝ) in σ₁..1 + (Real.log X)⁻¹, fTempRR x T = - -(2 * ↑π * I) * RectangleIntegral' fTempC (σ₁ - T * I) (1 + ↑(Real.log X)⁻¹ + T * I) := by - unfold RectangleIntegral' RectangleIntegral HIntegral VIntegral fTempC - simp only [mul_neg, one_div, mul_inv_rev, inv_I, neg_mul, sub_im, ofReal_im, mul_im, - ofReal_re, I_im, mul_one, I_re, mul_zero, add_zero, zero_sub, ofReal_neg, add_re, - neg_re, mul_re, sub_self, neg_zero, add_im, neg_im, zero_add, sub_re, sub_zero, - ofReal_inv, one_re, inv_re, normSq_ofReal, div_self_mul_self', one_im, inv_im, - zero_div, ofReal_add, ofReal_one, smul_eq_mul, neg_neg] - ring_nf - simp only [I_sq, neg_mul, one_mul, ne_eq, ofReal_eq_zero, pi_ne_zero, not_false_eq_true, - mul_inv_cancel_right₀, sub_neg_eq_add, I_pow_three] - ring_nf - rw[this] - field_simp - rw[mul_comm, eq_comm, neg_add_eq_zero] - - have pInRectangleInterior : - (Rectangle (σ₁ - ↑T * I) (1 + (Real.log X)⁻¹ + T * I) ∈ nhds 1) := by - refine rectangle_mem_nhds_iff.mpr ?_ - refine mem_reProdIm.mpr ?_ - simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - sub_zero, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal, div_self_mul_self', add_zero, - sub_im, mul_im, zero_sub, add_im, one_im, inv_im, neg_zero, zero_div, zero_add] - constructor - · unfold uIoo - rw [min_eq_left (by linarith), max_eq_right (by linarith)] - exact mem_Ioo.mpr ⟨σ₁_lt_one, (by linarith)⟩ - · unfold uIoo - rw [min_eq_left (by linarith), max_eq_right (by linarith)] - exact mem_Ioo.mpr ⟨(by linarith), (by linarith)⟩ - - apply ResidueTheoremOnRectangleWithSimplePole' - · simp; linarith - · simp; linarith - · simp only [one_div] - exact pInRectangleInterior - · apply DifferentiableOn.mul - · apply DifferentiableOn.mul - · simp only [re_add_im] - have : (fun z ↦ -ζ' z / ζ z) = -(ζ' / ζ) := by ext; simp; ring - rw [this] - apply DifferentiableOn.neg - apply holoOn.mono - apply Set.sdiff_subset_sdiff_left - apply reProdIm_subset_iff'.mpr - left - simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - sub_zero, one_div, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal, - div_self_mul_self', add_zero, sub_im, mul_im, zero_sub, add_im, one_im, inv_im, - neg_zero, zero_div, zero_add] - constructor <;> apply uIcc_subset_Icc <;> constructor <;> linarith - · intro s hs - apply DifferentiableAt.differentiableWithinAt - simp only [re_add_im] - apply Smooth1MellinDifferentiable ContDiffSmoothingF suppSmoothingF ⟨ε_pos, ε_lt_one⟩ - SmoothingFnonneg mass_one - have := mem_reProdIm.mp hs.1 |>.1 - simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - sub_zero, one_div, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal, - div_self_mul_self', add_zero] at this - rw [uIcc_of_le (by linarith)] at this - linarith [this.1] - · intro s hs - apply DifferentiableAt.differentiableWithinAt - simp only [re_add_im] - apply DifferentiableAt.const_cpow (by fun_prop) - left - norm_cast - linarith - · let U : Set ℂ := Rectangle (σ₁ - ↑T * I) (1 + (Real.log X)⁻¹ + T * I) - let f : ℂ → ℂ := fun z ↦ -ζ' z / ζ z - let g : ℂ → ℂ := fun z ↦ 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) z * ↑X ^ z - unfold fTempC fTempRR SmoothedChebyshevIntegrand - simp only [re_add_im] - have g_holc : HolomorphicOn g U := by - intro u uInU - apply DifferentiableAt.differentiableWithinAt - simp only [g] - apply DifferentiableAt.mul - · apply Smooth1MellinDifferentiable ContDiffSmoothingF suppSmoothingF ⟨ε_pos, ε_lt_one⟩ - SmoothingFnonneg mass_one - simp only [ofReal_inv, U] at uInU - unfold Rectangle at uInU - rw[Complex.mem_reProdIm] at uInU - have := uInU.1 - simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - sub_zero, add_re, one_re, inv_re, normSq_ofReal, div_self_mul_self', add_zero] at this - rw [uIcc_of_le (by linarith)] at this - linarith [this.1] - · unfold HPow.hPow instHPow - apply DifferentiableAt.const_cpow differentiableAt_fun_id - left - norm_cast - linarith - have f_near_p : (f - fun (z : ℂ) => 1 * (z - 1)⁻¹) =O[nhdsWithin 1 {1}ᶜ] (1 : ℂ → ℂ) := by - simp only [one_mul, f] - exact riemannZetaLogDerivResidueBigO - convert ResidueMult g_holc pInRectangleInterior f_near_p using 1 - ext - simp [f, g] - ring - -lemma interval_membership (r : ℝ) (a b : ℝ) (h1 : r ∈ Set.Icc (min a b) (max a b)) (h2 : a < b) : - a ≤ r ∧ r ≤ b := by - -- Since a < b, we have min(a,b) = a and max(a,b) = b - have min_eq : min a b = a := min_eq_left (le_of_lt h2) - have max_eq : max a b = b := max_eq_right (le_of_lt h2) - rw [min_eq, max_eq] at h1 - rw [← @mem_Icc] - exact h1 - -lemma verticalIntegral_split_three_finite {s a b e σ : ℝ} {f : ℂ → ℂ} - (hf : IntegrableOn (fun t : ℝ ↦ f (σ + t * I)) (Icc s e)) - (hab: s < a ∧ a < b ∧ b < e): - VIntegral f σ s e = - VIntegral f σ s a + - VIntegral f σ a b + - VIntegral f σ b e := by - dsimp [VIntegral] - rw [← intervalIntegrable_iff_integrableOn_Icc_of_le (by linarith)] at hf - rw [← intervalIntegral.integral_add_adjacent_intervals (b := a), - ← intervalIntegral.integral_add_adjacent_intervals (a := a) (b := b)] - · ring - all_goals - apply IntervalIntegrable.mono_set hf - apply uIcc_subset_uIcc <;> apply mem_uIcc_of_le <;> linarith - -lemma verticalIntegral_split_three_finite' {s a b e σ : ℝ} {f : ℂ → ℂ} - (hf : IntegrableOn (fun t : ℝ ↦ f (σ + t * I)) (Icc s e)) - (hab: s < a ∧ a < b ∧ b < e): - (1 : ℂ) / (2 * π * I) * (VIntegral f σ s e) = - (1 : ℂ) / (2 * π * I) * (VIntegral f σ s a) + - (1 : ℂ) / (2 * π * I) * (VIntegral f σ a b) + - (1 : ℂ) / (2 * π * I) * (VIntegral f σ b e) := by - have : (1 : ℂ) / (2 * π * I) * (VIntegral f σ s a) + - (1 : ℂ) / (2 * π * I) * (VIntegral f σ a b) + - (1 : ℂ) / (2 * π * I) * (VIntegral f σ b e) = - (1 : ℂ) / (2 * π * I) * ((VIntegral f σ s a) + - (VIntegral f σ a b) + - (VIntegral f σ b e)) := by ring - rw [this] - clear this - rw [← verticalIntegral_split_three_finite hf hab] - -theorem SmoothedChebyshevPull2_aux1 {T σ₁ : ℝ} (σ₁lt : σ₁ < 1) - (holoOn : HolomorphicOn (ζ' / ζ) (Icc σ₁ 2 ×ℂ Icc (-T) T \ {1})) : - ContinuousOn (fun (t : ℝ) ↦ -ζ' (σ₁ + t * I) / ζ (σ₁ + t * I)) (Icc (-T) T) := by - rw [show (fun (t : ℝ) ↦ -ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)) = - -(ζ' / ζ) ∘ (fun (t : ℝ) ↦ ↑σ₁ + ↑t * I) by ext; simp; ring_nf] - apply ContinuousOn.neg - apply holoOn.continuousOn.comp (by fun_prop) - intro t ht - simp only [Set.mem_sdiff, mem_singleton_iff] - constructor - · apply mem_reProdIm.mpr - simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - add_zero, add_im, mul_im, zero_add, left_mem_Icc, ht, and_true] - linarith - · intro h - replace h := congr_arg re h - simp at h - linarith - -theorem SmoothedChebyshevPull2 {SmoothingF : ℝ → ℝ} {ε : ℝ} (ε_pos : 0 < ε) (ε_lt_one : ε < 1) - (X : ℝ) (_ : 3 < X) - {T : ℝ} (T_pos : 3 < T) {σ₁ σ₂ : ℝ} - (σ₂_pos : 0 < σ₂) (σ₁_lt_one : σ₁ < 1) - (σ₂_lt_σ₁ : σ₂ < σ₁) - (holoOn : HolomorphicOn (ζ' / ζ) ((Icc σ₁ 2) ×ℂ (Icc (-T) T) \ {1})) - (holoOn2 : HolomorphicOn (SmoothedChebyshevIntegrand SmoothingF ε X) - (Icc σ₂ 2 ×ℂ Icc (-3) 3 \ {1})) - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x) - (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1) - (diff_SmoothingF : ContDiff ℝ 1 SmoothingF) : - I₃₇ SmoothingF ε T X σ₁ = - I₃ SmoothingF ε T X σ₁ - - I₄ SmoothingF ε X σ₁ σ₂ + - I₅ SmoothingF ε X σ₂ + - I₆ SmoothingF ε X σ₁ σ₂ + - I₇ SmoothingF ε T X σ₁ := by - let z : ℂ := σ₂ - 3 * I - let w : ℂ := σ₁ + 3 * I - have σ₁_pos : 0 < σ₁ := by linarith - -- Step (1) - -- Show that the Rectangle is in a given subset of holomorphicity - have sub : z.Rectangle w ⊆ Icc σ₂ 2 ×ℂ Icc (-3) 3 \ {1} := by - -- for every point x in the Rectangle - intro x hx - constructor - · -- x is in the locus of holomorphicity - simp only [Rectangle, uIcc] at hx - rw [Complex.mem_reProdIm] at hx ⊢ - obtain ⟨hx_re, hx_im⟩ := hx - -- the real part of x is in the correct interval - have hzw_re : z.re < w.re := by - simpa [z, w] using σ₂_lt_σ₁ - have x_re_bounds : z.re ≤ x.re ∧ x.re ≤ w.re := by - exact interval_membership x.re z.re w.re hx_re hzw_re - have x_re_in_Icc : x.re ∈ Icc σ₂ 2 := by - have ⟨h_left, h_right⟩ := x_re_bounds - have h_left' : σ₂ ≤ x.re := by - simpa [z] using h_left - have h_right' : x.re ≤ 2 := by - apply le_trans h_right - have : w.re ≤ 2 := by - simp [w] - linarith - exact this - exact ⟨h_left', h_right'⟩ - -- the imaginary part of x is in the correct interval - have hzw_im : z.im < w.im := by - norm_num [z, w] - have x_im_bounds : z.im ≤ x.im ∧ x.im ≤ w.im := by - exact interval_membership x.im z.im w.im hx_im hzw_im - have x_im_in_Icc : x.im ∈ Icc (-3) 3 := by - have ⟨h_left, h_right⟩ := x_im_bounds - have h_left' : -3 ≤ x.im := by - simpa [z] using h_left - have h_right' : x.im ≤ 3 := by - simpa [w] using h_right - exact ⟨h_left', h_right'⟩ - exact ⟨x_re_in_Icc, x_im_in_Icc⟩ - -- x is not in {1} by contradiction - · simp only [mem_singleton_iff] - -- x has real part less than 1 - have x_re_upper: x.re ≤ σ₁ := by - simp only [Rectangle, uIcc] at hx - rw [Complex.mem_reProdIm] at hx - obtain ⟨hx_re, _⟩ := hx - -- the real part of x is in the interval - have hzw_re : z.re < w.re := by - simpa [z, w] using σ₂_lt_σ₁ - have x_re_bounds : z.re ≤ x.re ∧ x.re ≤ w.re := by - exact interval_membership x.re z.re w.re hx_re hzw_re - have x_re_upper' : x.re ≤ w.re := x_re_bounds.2 - have hw_re : w.re = σ₁ := by simp [w] - linarith - -- by contracdiction - have h_x_ne_one : x ≠ 1 := by - intro h_eq - have h_re : x.re = 1 := by rw [h_eq, Complex.one_re] - have h1 : 1 ≤ σ₁ := by - rw [← h_re] - exact x_re_upper - linarith - exact h_x_ne_one - have zero_over_box := HolomorphicOn.vanishesOnRectangle holoOn2 sub - have splitting : I₃₇ SmoothingF ε T X σ₁ = - I₃ SmoothingF ε T X σ₁ + I₅ SmoothingF ε X σ₁ + I₇ SmoothingF ε T X σ₁ := by - unfold I₃₇ I₃ I₅ I₇ - apply verticalIntegral_split_three_finite' - · apply ContinuousOn.integrableOn_Icc - unfold SmoothedChebyshevIntegrand - apply ContinuousOn.mul - · apply ContinuousOn.mul - · apply SmoothedChebyshevPull2_aux1 σ₁_lt_one holoOn - · apply continuousOn_of_forall_continuousAt - intro t t_mem - have := Smooth1MellinDifferentiable diff_SmoothingF suppSmoothingF ⟨ε_pos, ε_lt_one⟩ - SmoothingFnonneg mass_one (s := ↑σ₁ + ↑t * I) (by simpa) - simpa using realDiff_of_complexDiff _ this - · apply continuousOn_of_forall_continuousAt - intro t t_mem - apply ContinuousAt.comp - · refine continuousAt_const_cpow' ?_ - intro h - have : σ₁ = 0 := by - have h_real : (↑σ₁ + ↑t * I).re = (0 : ℂ).re := by - rw [h] - simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, add_zero, zero_re] at h_real - exact h_real - linarith - · -- continuity -- failed - apply ContinuousAt.add - · exact continuousAt_const - · apply ContinuousAt.mul - · apply continuous_ofReal.continuousAt - · exact continuousAt_const - · refine ⟨by linarith, by linarith, by linarith⟩ - calc I₃₇ SmoothingF ε T X σ₁ = - I₃₇ SmoothingF ε T X σ₁ - (1 / (2 * π * I)) * (0 : ℂ) := by simp - _ = I₃₇ SmoothingF ε T X σ₁ - (1 / (2 * π * I)) * - (RectangleIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z w) := by rw [← zero_over_box] - _ = I₃₇ SmoothingF ε T X σ₁ - (1 / (2 * π * I)) * - (HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re z.im - - HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re w.im - + VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) w.re z.im w.im - - VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by - simp [RectangleIntegral] - _ = I₃₇ SmoothingF ε T X σ₁ - - ((1 / (2 * π * I)) * HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re z.im - - (1 / (2 * π * I)) * HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re w.im - + (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) w.re z.im w.im - - (1 / (2 * π * I)) * - VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by ring - _ = I₃₇ SmoothingF ε T X σ₁ - (I₄ SmoothingF ε X σ₁ σ₂ - - (1 / (2 * π * I)) * HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re w.im - + (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) w.re z.im w.im - - (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by - simp only [one_div, mul_inv_rev, inv_I, neg_mul, HIntegral, sub_im, ofReal_im, mul_im, - re_ofNat, I_im, mul_one, im_ofNat, I_re, mul_zero, add_zero, zero_sub, ofReal_neg, - ofReal_ofNat, sub_re, ofReal_re, mul_re, sub_self, sub_zero, add_re, add_im, zero_add, - sub_neg_eq_add, I₄, sub_right_inj, add_left_inj, neg_inj, mul_eq_mul_left_iff, mul_eq_zero, - I_ne_zero, inv_eq_zero, ofReal_eq_zero, OfNat.ofNat_ne_zero, or_false, false_or, z, w] - left - rfl - _ = I₃₇ SmoothingF ε T X σ₁ - (I₄ SmoothingF ε X σ₁ σ₂ - - I₆ SmoothingF ε X σ₁ σ₂ - + (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) w.re z.im w.im - - (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by - simp only [one_div, mul_inv_rev, inv_I, neg_mul, HIntegral, add_im, ofReal_im, mul_im, - re_ofNat, I_im, mul_one, im_ofNat, I_re, mul_zero, add_zero, zero_add, ofReal_ofNat, sub_re, - ofReal_re, mul_re, sub_self, sub_zero, add_re, sub_neg_eq_add, sub_im, zero_sub, I₆, w, z] - _ = I₃₇ SmoothingF ε T X σ₁ - (I₄ SmoothingF ε X σ₁ σ₂ - - I₆ SmoothingF ε X σ₁ σ₂ - + I₅ SmoothingF ε X σ₁ - - (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by - simp only [one_div, mul_inv_rev, inv_I, neg_mul, VIntegral, add_re, ofReal_re, mul_re, - re_ofNat, I_re, mul_zero, im_ofNat, I_im, mul_one, sub_self, add_zero, sub_im, ofReal_im, - mul_im, zero_sub, add_im, zero_add, smul_eq_mul, sub_re, sub_zero, sub_neg_eq_add, I₅, - w, z] - _ = I₃₇ SmoothingF ε T X σ₁ - (I₄ SmoothingF ε X σ₁ σ₂ - - I₆ SmoothingF ε X σ₁ σ₂ - + I₅ SmoothingF ε X σ₁ - - I₅ SmoothingF ε X σ₂) := by - simp only [I₅, one_div, mul_inv_rev, inv_I, neg_mul, VIntegral, sub_re, ofReal_re, mul_re, - re_ofNat, I_re, mul_zero, im_ofNat, I_im, mul_one, sub_self, sub_zero, sub_im, ofReal_im, - mul_im, add_zero, zero_sub, add_im, zero_add, smul_eq_mul, sub_neg_eq_add, z, w] - --- starting from now, we split the integral `I₃₇` into `I₃ σ₂ + I₅ σ₁ + I₇ σ₁` using `verticalIntegral_split_three_finite` - _ = I₃ SmoothingF ε T X σ₁ - + I₅ SmoothingF ε X σ₁ - + I₇ SmoothingF ε T X σ₁ - - (I₄ SmoothingF ε X σ₁ σ₂ - - I₆ SmoothingF ε X σ₁ σ₂ - + I₅ SmoothingF ε X σ₁ - - I₅ SmoothingF ε X σ₂) := by - rw [splitting] - _ = I₃ SmoothingF ε T X σ₁ - - I₄ SmoothingF ε X σ₁ σ₂ - + I₅ SmoothingF ε X σ₂ - + I₆ SmoothingF ε X σ₁ σ₂ - + I₇ SmoothingF ε T X σ₁ := by - ring - -theorem ZetaBoxEval {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) : - ∃ C, ∀ᶠ ε in (nhdsWithin 0 (Ioi 0)), ∀ X : ℝ, 0 ≤ X → - ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) 1 * X - X‖ ≤ C * ε * X := by - have := MellinOfSmooth1c ContDiffSmoothingF suppSmoothingF mass_one - clear suppSmoothingF mass_one ContDiffSmoothingF - rw[Asymptotics.isBigO_iff] at this - obtain ⟨C, hC⟩ := this - use C - have εpos : ∀ᶠ (ε : ℝ) in nhdsWithin 0 (Ioi 0), ε > 0 := - eventually_mem_of_tendsto_nhdsWithin fun ⦃U⦄ hU ↦ hU - filter_upwards [hC, εpos] with ε hC εpos - rw[id_eq, norm_of_nonneg (le_of_lt εpos)] at hC - intro X Xnne - nth_rw 2 [← one_mul (X : ℂ)] - rw[← sub_mul, norm_mul, norm_real, norm_of_nonneg Xnne] - exact mul_le_mul_of_nonneg_right hC Xnne - -theorem poisson_kernel_integrable (x : ℝ) (hx : x ≠ 0) : - MeasureTheory.Integrable (fun (t : ℝ) ↦ (‖x + t * I‖^2)⁻¹) := by - -- First, simplify the complex norm - have h1 : ∀ t : ℝ, ‖x + t * I‖^2 = x^2 + t^2 := by - intro t - rw [← normSq_eq_norm_sq, normSq_add_mul_I] - -- Rewrite the integrand using this simplification - simp_rw [h1] - apply integrable_comp_mul_left_iff _ hx |>.mp - have : (fun t ↦ (x ^ 2 + (x * t) ^ 2) ⁻¹) = (fun t ↦ (1 / x ^ 2) * (1 + t ^ 2) ⁻¹) := by - ext - field_simp - rw [this] - apply integrable_inv_one_add_sq.const_mul - -theorem ae_volume_of_contains_compl_singleton_zero - (s : Set ℝ) - (h : (univ : Set ℝ) \ {0} ⊆ s) : - s ∈ (MeasureTheory.ae volume) := by - -- The key insight is that {0} has measure zero in ℝ - have h_zero_null : volume ({0} : Set ℝ) = 0 := by - exact volume_singleton - - -- Since s contains univ \ {0} = ℝ \ {0}, its complement is contained in {0} - have h_compl_subset : sᶜ ⊆ {0} := by - intro x hx - -- If x is not in s, then x is not in ℝ \ {0} (since ℝ \ {0} is a subset of s) - -- This means x = 0 - by_contra h_not_zero - have : x ∈ univ \ {0} := ⟨trivial, h_not_zero⟩ - exact hx (h this) - - -- Therefore, volume(sᶜ) ≤ volume({0}) = 0 - have h_compl_measure : volume sᶜ ≤ volume ({0} : Set ℝ) := - measure_mono h_compl_subset - - -- So volume(sᶜ) = 0 - have h_compl_zero : volume sᶜ = 0 := by - rw [h_zero_null] at h_compl_measure - exact le_antisymm h_compl_measure (by positivity) - - -- A set is in ae.sets iff its complement has measure zero - rwa [mem_ae_iff] - -theorem integral_evaluation (x : ℝ) (T : ℝ) (T_large : 3 < T) : - ∫ (t : ℝ) in Iic (-T), (‖x + t * I‖ ^ 2)⁻¹ ≤ T⁻¹ := by - have T00 : ∀ (x t : ℝ), t^2 ≤ ‖x + t * I‖^2 := by - intro x t - rw [Complex.norm_add_mul_I x t] - ring_nf - rw [Real.sq_sqrt _] - · simp only [le_add_iff_nonneg_right]; positivity - · positivity - - have T0 : ∀ (x t : ℝ), t ≠ 0 → (‖x + t * I‖^2)⁻¹ ≤ (t^2)⁻¹ := by - intro x t hyp - have U0 : 0 < t^2 := by positivity - have U1 : 0 < ‖x + t * I‖^2 := by - rw [Complex.norm_add_mul_I x t, - Real.sq_sqrt _] - - · positivity - · positivity - rw [inv_le_inv₀ U1 U0] - exact (T00 x t) - - have T1 : (fun (t : ℝ) ↦ (‖x + t * I‖^2)⁻¹) ≤ᶠ[ae (volume.restrict (Iic (-T)))] (fun (t : ℝ) ↦ (t^2)⁻¹) := by - unfold Filter.EventuallyLE - unfold Filter.Eventually - simp_all only [ne_eq, measurableSet_Iic, ae_restrict_eq] - refine mem_inf_of_left ?_ - · refine Filter.mem_sets.mp ?_ - · have U : {x_1 : ℝ | x_1 ≠ 0} ⊆ {x_1 : ℝ | (‖x + x_1 * I‖ ^ 2)⁻¹ ≤ (x_1 ^ 2)⁻¹} := by - rw [Set.setOf_subset_setOf] - intro t hyp_t - exact T0 x t hyp_t - have U1 : {x_1 : ℝ | x_1 ≠ 0} = (univ \ {0}) := by - apply Set.ext - intro x - simp_all only [ne_eq, setOf_subset_setOf, not_false_eq_true, implies_true, - mem_setOf_eq, Set.mem_sdiff, mem_univ, mem_singleton_iff, true_and] - - rw [U1] at U - exact ae_volume_of_contains_compl_singleton_zero _ U - - have T3 : Integrable (fun (t : ℝ) ↦ (t^2)⁻¹) (volume.restrict (Iic (-T))) := by - have D3 := integrableOn_Ioi_rpow_of_lt (by norm_num : (-2 : ℝ) < -1) - (by linarith : 0 < T) |>.comp_neg - simp only [rpow_neg_ofNat, Int.reduceNeg, zpow_neg, neg_Ioi] at D3 - have D4 := - (integrableOn_Iic_iff_integrableOn_Iio' - (by - refine EReal.coe_ennreal_ne_coe_ennreal_iff.mp ?_ - simp_all only [ne_eq, measurableSet_Iic, ae_restrict_eq, measure_singleton, - EReal.coe_ennreal_zero, EReal.coe_ennreal_top, EReal.zero_ne_top, not_false_eq_true])).mpr D3 - simp_all only [ne_eq, measurableSet_Iic, ae_restrict_eq] - unfold IntegrableOn at D4 - have eq_fun : (fun (x : ℝ) ↦ ((-x)^2)⁻¹) = fun x ↦ (x^2)⁻¹ := by - funext x - simp_all only [even_two, Even.neg_pow] - simp_all only [even_two, Even.neg_pow] - norm_cast at D4 - simp_all only [even_two, Even.neg_pow] - - calc - _ ≤ ∫ (t : ℝ) in Iic (-T), (t^2)⁻¹ := by - apply MeasureTheory.integral_mono_of_nonneg _ T3 T1 - filter_upwards [] with x - simp - _ = _ := by - rw [← integral_comp_neg_Ioi] - conv => lhs; arg 2; ext x; rw [show ((-x) ^ 2)⁻¹ = x ^ (-2 : ℝ) by simp [zpow_ofNat]] - rw[integral_Ioi_rpow_of_lt (by norm_num) (by linarith)] - ring_nf - rw [rpow_neg_one] - -lemma IBound_aux1 (X₀ : ℝ) (X₀pos : X₀ > 0) (k : ℕ) : ∃ C ≥ 1, ∀ X ≥ X₀, Real.log X ^ k ≤ C * X := by - -- When X is large, the ratio goes to 0. - have ⟨M, hM⟩ := Filter.eventually_atTop.mp (isLittleO_log_rpow_rpow_atTop k zero_lt_one).eventuallyLE - -- When X is small, use the extreme value theorem. - let f := fun X ↦ Real.log X ^ k / X - let I := Icc X₀ M - have : 0 ∉ I := notMem_Icc_of_lt X₀pos - have f_cont : ContinuousOn f (Icc X₀ M) := - ((continuousOn_log.pow k).mono (subset_compl_singleton_iff.mpr this)).div - continuous_id.continuousOn (fun x hx ↦ ne_of_mem_of_not_mem hx this) - have ⟨C₁, hC₁⟩ := isCompact_Icc.exists_bound_of_continuousOn f_cont - use max C₁ 1, le_max_right C₁ 1 - intro X hX - have Xpos : X > 0 := lt_of_lt_of_le X₀pos hX - by_cases hXM : X ≤ M - · rw[← div_le_iff₀ Xpos] - calc - f X ≤ ‖f X‖ := le_norm_self _ - _ ≤ C₁ := hC₁ X ⟨hX, hXM⟩ - _ ≤ max C₁ 1 := le_max_left C₁ 1 - · calc - Real.log X ^ k ≤ ‖Real.log X ^ k‖ := le_norm_self _ - _ ≤ ‖X ^ 1‖ := by exact_mod_cast hM X (by linarith[hXM]) - _ = 1 * X := by - rw[pow_one, one_mul] - apply norm_of_nonneg - exact Xpos.le - _ ≤ max C₁ 1 * X := by - rw[mul_le_mul_iff_left₀ Xpos] - exact le_max_right C₁ 1 - -theorem I1Bound - {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x) - (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1) : - ∃ C > 0, ∀(ε : ℝ) (_ : 0 < ε) - (_ : ε < 1) - (X : ℝ) (_ : 3 < X) - {T : ℝ} (_ : 3 < T), - ‖I₁ SmoothingF ε X T‖ ≤ C * X * Real.log X / (ε * T) := by - - obtain ⟨M, ⟨M_is_pos, M_bounds_mellin_hard⟩⟩ := - MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF - - have G0 : ∃K > 0, ∀(t σ : ℝ), 1 < σ → σ < 2 → ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤ K * (σ - 1)⁻¹ := by - let ⟨K', ⟨K'_pos, K'_bounds_zeta⟩⟩ := triv_bound_zeta - use (2 * (K' + 1)) - use (by positivity) - intro t σ cond cond2 - - have T0 : 0 < K' + 1 := by positivity - have T1 : 1 ≤ (σ - 1)⁻¹ := by - have U : σ - 1 ≤ 1 := by linarith - have U1 := (inv_le_inv₀ (by positivity) (by exact sub_pos.mpr cond)).mpr U - simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, ge_iff_le, Complex.norm_div, - norm_neg, tsub_le_iff_right, inv_one] - - have T : (K' + 1) * 1 ≤ (K' + 1) * (σ - 1)⁻¹ := - by - exact (mul_le_mul_iff_right₀ T0).mpr T1 - have U := calc - ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ = ‖-ζ' (σ + t * I) / ζ (σ + t * I)‖ := by - rw [← norm_neg _, mul_comm, neg_div' _ _] - _ ≤ (σ - 1)⁻¹ + K' := K'_bounds_zeta σ t cond - _ ≤ (σ - 1)⁻¹ + (K' + 1) := by aesop - _ ≤ (K' + 1) * (σ - 1)⁻¹ + (K' + 1) := by aesop - _ ≤ (K' + 1) * (σ - 1)⁻¹ + (K' + 1) * (σ - 1)⁻¹ := by linarith - _ = 2 * (K' + 1) * (σ - 1)⁻¹ := by - ring_nf - - exact U - - obtain ⟨K, ⟨K_is_pos, K_bounds_zeta_at_any_t'⟩⟩ := G0 - - have C_final_pos : |π|⁻¹ * 2⁻¹ * (Real.exp 1 * K * M) > 0 := by - positivity - - use (|π|⁻¹ * 2⁻¹ * (Real.exp 1 * K * M)) - use C_final_pos - - intro eps eps_pos eps_less_one X X_large T T_large - - let pts_re := 1 + (Real.log X)⁻¹ - let pts := fun (t : ℝ) ↦ (pts_re + t * I) - - have pts_re_triv : ∀(t : ℝ), (pts t).re = pts_re := by - intro t - unfold pts - simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - add_zero] - - have pts_re_ge_one : 1 < pts_re := by - unfold pts_re - simp only [lt_add_iff_pos_right, inv_pos] - have U : 1 < X := by linarith - exact Real.log_pos U - - have pts_re_le_one : pts_re < 2 := by - unfold pts_re - have Z : Real.log 3 < Real.log X := - by - refine log_lt_log ?_ X_large - simp only [Nat.ofNat_pos] - - have Z01 : 1 < Real.log 3 := logt_gt_one le_rfl - have Zpos0 : 0 < Real.log 3 := by positivity - have Zpos1 : 0 < Real.log X := by calc - 0 < Real.log 3 := Zpos0 - _ < Real.log X := Z - - have Z1 : (Real.log X)⁻¹ < (Real.log 3)⁻¹ := (inv_lt_inv₀ Zpos1 Zpos0).mpr Z - - have Z02 : (Real.log 3)⁻¹ < 1 := by - have T01 := (inv_lt_inv₀ ?_ ?_).mpr Z01 - · simp only [inv_one] at T01 - exact T01 - · exact Zpos0 - simp only [zero_lt_one] - - have Z2 : 1 + (Real.log X)⁻¹ < 1 + (Real.log 3)⁻¹ := by - exact (add_lt_add_iff_left 1).mpr Z1 - - have Z3 : 1 + (Real.log 3)⁻¹ < 2 := by - calc - 1 + (Real.log 3)⁻¹ < 1 + 1 := by linarith - _ = 2 := by ring_nf - - calc - 1 + (Real.log X)⁻¹ < 1 + (Real.log 3)⁻¹ := Z2 - _ < 2 := Z3 - - have inve : (pts_re - 1)⁻¹ = Real.log X := by - unfold pts_re - simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, gt_iff_lt, - Complex.norm_div, add_sub_cancel_left, inv_inv] - - have K_bounds_zeta_at_any_t : - ∀(t : ℝ), ‖ζ' (pts t) / ζ (pts t)‖ ≤ K * Real.log X := by - intro t - rw [←inve] - exact K_bounds_zeta_at_any_t' t pts_re pts_re_ge_one pts_re_le_one - - have pts_re_pos : pts_re > 0 := by - unfold pts_re - positivity - - have triv_pts_lo_bound : ∀(t : ℝ), pts_re ≤ (pts t).re := by - intro t - unfold pts_re - exact Eq.ge (pts_re_triv t) - - have triv_pts_up_bound : ∀(t : ℝ), (pts t).re ≤ 2 := by - intro t - unfold pts - refine EReal.coe_le_coe_iff.mp ?_ - · simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, gt_iff_lt, - Complex.norm_div, le_refl, implies_true, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, - I_im, mul_one, sub_self, add_zero, EReal.coe_le_coe_iff] - exact le_of_lt pts_re_le_one - - have pts_re_ge_1 : pts_re > 1 := by - unfold pts_re - exact pts_re_ge_one - - have X_pos_triv : 0 < X := by positivity - - let f := fun (t : ℝ) ↦ SmoothedChebyshevIntegrand SmoothingF eps X (pts t) - - /- Main pointwise bound -/ - - have G : ∀(t : ℝ), ‖f t‖ ≤ (K * M) * Real.log X * (eps * ‖pts t‖^2)⁻¹ * X^pts_re := by - - intro t - - let M_bounds_mellin_easy := fun (t : ℝ) ↦ - M_bounds_mellin_hard pts_re pts_re_pos (pts t) (triv_pts_lo_bound t) (triv_pts_up_bound t) - eps eps_pos eps_less_one - - let zeta_part := (fun (t : ℝ) ↦ -ζ' (pts t) / ζ (pts t)) - let mellin_part := (fun (t : ℝ) ↦ 𝓜 (fun x ↦ (Smooth1 SmoothingF eps x : ℂ)) (pts t)) - let X_part := (fun (t : ℝ) ↦ (↑X : ℂ) ^ (pts t)) - - let g := fun (t : ℝ) ↦ (zeta_part t) * (mellin_part t) * (X_part t) - - have X_part_eq : ∀(t : ℝ), ‖X_part t‖ = X^pts_re := by - intro t - have U := Complex.norm_cpow_eq_rpow_re_of_pos (X_pos_triv) (pts t) - rw [pts_re_triv t] at U - exact U - - have X_part_bound : ∀(t : ℝ), ‖X_part t‖ ≤ X^pts_re := by - intro t - rw [←X_part_eq] - - have mellin_bound : ∀(t : ℝ), ‖mellin_part t‖ ≤ M * (eps * ‖pts t‖ ^ 2)⁻¹ := by - intro t - exact M_bounds_mellin_easy t - - have X_part_and_mellin_bound : - ∀(t : ℝ), ‖mellin_part t * X_part t‖ ≤ M * (eps * ‖pts t‖^2)⁻¹ * X^pts_re := by - intro t - exact norm_mul_le_of_le (mellin_bound t) (X_part_bound t) - - have T2 : ∀(t : ℝ), ‖zeta_part t‖ = ‖ζ' (pts t) / ζ (pts t)‖ := by - intro t - unfold zeta_part - simp only [Complex.norm_div, norm_neg] - - have zeta_bound : ∀(t : ℝ), ‖zeta_part t‖ ≤ K * Real.log X := by - intro t - unfold zeta_part - rw [T2] - exact K_bounds_zeta_at_any_t t - - have g_bound : ∀(t : ℝ), ‖zeta_part t * (mellin_part t * X_part t)‖ ≤ - (K * Real.log X) * (M * (eps * ‖pts t‖^2)⁻¹ * X^pts_re) := by - intro t - exact norm_mul_le_of_le (zeta_bound t) (X_part_and_mellin_bound t) - - have T1 : f = g := rfl - - have final_bound_pointwise : - ‖f t‖ ≤ K * Real.log X * (M * (eps * ‖pts t‖^2)⁻¹ * X^pts_re) := by - rw [T1] - unfold g - rw [mul_assoc] - exact g_bound t - - have trivialize : - K * Real.log X * (M * (eps * ‖pts t‖^2)⁻¹ * X^pts_re) = - (K * M) * Real.log X * (eps * ‖pts t‖^2)⁻¹ * X^pts_re := by ring_nf - - rw [trivialize] at final_bound_pointwise - exact final_bound_pointwise - - have σ₀_gt : 1 < pts_re := pts_re_ge_1 - have σ₀_le_2 : pts_re ≤ 2 := by - unfold pts_re - -- LOL! - exact - Preorder.le_trans (1 + (Real.log X)⁻¹) (pts (SmoothingF (SmoothingF M))).re 2 - (triv_pts_lo_bound (SmoothingF (SmoothingF M))) - (triv_pts_up_bound (SmoothingF (SmoothingF M))) - - have f_integrable := SmoothedChebyshevPull1_aux_integrable eps_pos eps_less_one X_large σ₀_gt - σ₀_le_2 suppSmoothingF SmoothingFnonneg mass_one ContDiffSmoothingF - - have S : X^pts_re = rexp 1 * X := by - unfold pts_re - - calc - X ^ (1 + (Real.log X)⁻¹) = X * X ^ ((Real.log X)⁻¹) := by - refine rpow_one_add' ?_ ?_ - · positivity - · exact Ne.symm (ne_of_lt pts_re_pos) - _ = X * rexp 1 := by - refine (mul_right_inj' ?_).mpr ?_ - · exact Ne.symm (ne_of_lt X_pos_triv) - · refine rpow_inv_log X_pos_triv ?_ - · by_contra h - simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, gt_iff_lt, - Complex.norm_div, Nat.not_ofNat_lt_one] - _ = rexp 1 * X := by ring_nf - - have pts_re_neq_zero : pts_re ≠ 0 := by - by_contra h - rw [h] at pts_re_ge_1 - simp only [gt_iff_lt] at pts_re_ge_1 - norm_cast at pts_re_ge_1 - - have Z := - by - calc - ‖∫ (t : ℝ) in Iic (-T), f t‖ ≤ ∫ (t : ℝ) in Iic (-T), ‖f t‖ := MeasureTheory.norm_integral_le_integral_norm f - _ ≤ ∫ (t : ℝ) in Iic (-T), (K * M) * Real.log X * (eps * ‖pts t‖ ^ 2)⁻¹ * X ^ pts_re := by - refine integral_mono ?_ ?_ (fun t ↦ G t) - · refine Integrable.norm ?_ - · unfold f - exact MeasureTheory.Integrable.restrict f_integrable - · have equ : ∀(t : ℝ), (K * M) * Real.log X * (eps * ‖pts t‖ ^ 2)⁻¹ * X ^ pts_re = (K * M) * Real.log X * eps⁻¹ * X ^ pts_re * (‖pts t‖^2)⁻¹ := by - intro t; ring_nf - have fun_equ : (fun (t : ℝ) ↦ ((K * M) * Real.log X * (eps * ‖pts t‖ ^ 2)⁻¹ * X ^ pts_re)) = (fun (t : ℝ) ↦ ((K * M) * Real.log X * eps⁻¹ * X ^ pts_re * (‖pts t‖^2)⁻¹)) := by - funext t - exact equ t - - rw [fun_equ] - have simple_int : MeasureTheory.Integrable (fun (t : ℝ) ↦ (‖pts t‖^2)⁻¹) - := by - unfold pts - exact poisson_kernel_integrable pts_re (pts_re_neq_zero) - - have U := MeasureTheory.Integrable.const_mul simple_int - ((K * M) * Real.log X * eps⁻¹ * X ^ pts_re) - refine MeasureTheory.Integrable.restrict ?_ - exact U - _ = (K * M) * Real.log X * X ^ pts_re * eps⁻¹ * - ∫ (t : ℝ) in Iic (-T), (‖pts t‖ ^ 2)⁻¹ := by - have simpli_fun : - (fun (t : ℝ) ↦ (K * M) * Real.log X * (eps * ‖pts t‖ ^ 2)⁻¹ * X ^ pts_re) = - (fun (t : ℝ) ↦ ((K * M) * Real.log X * X ^ pts_re * eps⁻¹ * (‖pts t‖^2)⁻¹)) := - by funext t; ring_nf - rw [simpli_fun] - exact MeasureTheory.integral_const_mul ((K * M) * Real.log X * X ^ pts_re * eps⁻¹) - (fun (t : ℝ) ↦ (‖pts t‖^2)⁻¹) - _ ≤ (K * M) * Real.log X * X ^ pts_re * eps⁻¹ * T⁻¹ := by - have U := integral_evaluation (pts_re) T (T_large) - unfold pts - simp only [ge_iff_le] - have U2 : 0 ≤ (K * M) * Real.log X * X ^ pts_re * eps⁻¹ := by - simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, gt_iff_lt, - Complex.norm_div, le_refl, implies_true, inv_pos, mul_nonneg_iff_of_pos_right] - refine Left.mul_nonneg ?_ ?_ - · refine Left.mul_nonneg ?_ ?_ - · exact Left.mul_nonneg (by positivity) (by positivity) - · refine log_nonneg ?_ - · linarith - · refine Left.mul_nonneg ?_ ?_ - · exact exp_nonneg 1 - · exact le_of_lt X_pos_triv - exact mul_le_mul_of_nonneg_left U U2 - _ = (Real.exp 1 * K * M) * Real.log X * X * eps⁻¹ * T⁻¹ := by - rw [S] - ring_nf - _ = (Real.exp 1 * K * M) * X * Real.log X / (eps * T) := by ring_nf - - unfold I₁ - unfold f at Z - unfold pts at Z - have Z3 : (↑pts_re : ℂ) = 1 + (Real.log X)⁻¹ := by unfold pts_re; norm_cast - rw [Z3] at Z - rw [Complex.norm_mul (1 / (2 * ↑π * I)) _] - simp only [one_div, mul_inv_rev, inv_I, neg_mul, norm_neg, Complex.norm_mul, norm_I, norm_inv, - norm_real, norm_eq_abs, Complex.norm_ofNat, one_mul, ofReal_inv, ge_iff_le] - have Z2 : 0 ≤ |π|⁻¹ * 2⁻¹ := by positivity - simp only [ofReal_inv] at Z - simp only [ge_iff_le] - have Z4 := mul_le_mul_of_nonneg_left Z Z2 - ring_nf - ring_nf at Z4 - exact Z4 - -set_option backward.isDefEq.respectTransparency false in -lemma I9I1 {SmoothingF : ℝ → ℝ} {ε X T : ℝ} (Xpos : 0 < X) : - I₉ SmoothingF ε X T = conj (I₁ SmoothingF ε X T) := by - unfold I₉ I₁ - simp only [map_mul, map_div₀, conj_I, conj_ofReal, conj_ofNat, map_one] - rw [neg_mul, mul_neg, ← neg_mul] - congr - · ring - · rw [← integral_conj, ← integral_comp_neg_Ioi, integral_Ici_eq_integral_Ioi] - apply setIntegral_congr_fun <| measurableSet_Ioi - intro t ht - simp only - rw[← smoothedChebyshevIntegrand_conj Xpos] - simp - -theorem I9Bound - {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x) - (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1) : - ∃ C > 0, ∀{ε : ℝ} (_ : 0 < ε) - (_ : ε < 1) - (X : ℝ) (_ : 3 < X) - {T : ℝ} (_ : 3 < T), - ‖I₉ SmoothingF ε X T‖ ≤ C * X * Real.log X / (ε * T) := by - obtain ⟨C, Cpos, bound⟩ := I1Bound suppSmoothingF ContDiffSmoothingF SmoothingFnonneg mass_one - refine ⟨C, Cpos, ?_⟩ - intro ε εpos ε_lt_one X X_gt T T_gt - specialize bound ε εpos ε_lt_one X X_gt T_gt - rwa [I9I1 (by linarith), norm_conj] - -lemma one_add_inv_log {X : ℝ} (X_ge : 3 ≤ X) : (1 + (Real.log X)⁻¹) < 2 := by - rw[← one_add_one_eq_two] - refine (add_lt_add_iff_left 1).mpr ?_ - refine inv_lt_one_of_one_lt₀ (logt_gt_one X_ge) - -lemma I2Bound {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - {A C₂ : ℝ} (has_bound : LogDerivZetaHasBound A C₂) (C₂pos : 0 < C₂) (A_in : A ∈ Ioc 0 (1 / 2)) : - ∃ (C : ℝ) (_ : 0 < C), - ∀(X : ℝ) (_ : 3 < X) {ε : ℝ} (_ : 0 < ε) - (_ : ε < 1) {T : ℝ} (_ : 3 < T), - let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9 - ‖I₂ SmoothingF ε T X σ₁‖ ≤ C * X / (ε * T) := by - have ⟨C₁, C₁pos, Mbd⟩ := MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF - have := (IBound_aux1 3 (by norm_num) 9) - obtain ⟨C₃, ⟨C₃_gt, hC₃⟩⟩ := this - - let C' : ℝ := C₁ * C₂ * C₃ * rexp 1 - have : C' > 0 := by positivity - use ‖1/(2*π*I)‖ * (2 * C'), by - refine Right.mul_pos ?_ ?_ - · rw[norm_pos_iff] - simp[pi_ne_zero] - · simp[this] - intro X X_gt ε ε_pos ε_lt_one T T_gt σ₁ - have Xpos : 0 < X := lt_trans (by simp only [Nat.ofNat_pos]) X_gt - have Tpos : 0 < T := lt_trans (by norm_num) T_gt - unfold I₂ - rw[norm_mul, mul_assoc (c := X), ← mul_div] - refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg _) - have interval_length_nonneg : σ₁ ≤ 1 + (Real.log X)⁻¹ := by - dsimp[σ₁] - rw[sub_le_iff_le_add] - nth_rw 1 [← add_zero 1] - rw[add_assoc] - apply add_le_add_right - refine Left.add_nonneg ?_ ?_ - · rw[inv_nonneg, log_nonneg_iff Xpos] - exact le_trans (by norm_num) (le_of_lt X_gt) - · refine div_nonneg ?_ ?_ - · exact A_in.1.le - apply pow_nonneg - rw[log_nonneg_iff Tpos] - exact le_trans (by norm_num) (le_of_lt T_gt) - have σ₁pos : 0 < σ₁ := by - rw[sub_pos] - calc - A / Real.log T ^ 9 ≤ 1 / 2 / Real.log T ^ 9 := by - refine div_le_div_of_nonneg_right (A_in.2) ?_ - apply pow_nonneg - rw[log_nonneg_iff Tpos] - exact le_trans (by norm_num) (le_of_lt T_gt) - _ ≤ 1 / 2 / 1 := by - refine div_le_div_of_nonneg_left (by norm_num) (by norm_num) ?_ - exact one_le_pow₀ (logt_gt_one T_gt.le).le - _ < 1 := by norm_num - suffices ∀ σ ∈ Ioc σ₁ (1 + (Real.log X)⁻¹), - ‖SmoothedChebyshevIntegrand SmoothingF ε X (↑σ - ↑T * I)‖ ≤ C' * X / (ε * T) by - calc - ‖∫ (σ : ℝ) in σ₁..1 + (Real.log X)⁻¹, - SmoothedChebyshevIntegrand SmoothingF ε X (↑σ - ↑T * I)‖ ≤ - C' * X / (ε * T) * |1 + (Real.log X)⁻¹ - σ₁| := by - refine intervalIntegral.norm_integral_le_of_norm_le_const ?_ - convert this using 3 - apply uIoc_of_le - exact interval_length_nonneg - _ ≤ C' * X / (ε * T) * 2 := by - apply mul_le_mul_of_nonneg_left - · rw[abs_of_nonneg (sub_nonneg.mpr interval_length_nonneg)] - calc - 1 + (Real.log X)⁻¹ - σ₁ ≤ 1 + (Real.log X)⁻¹ := by linarith - _ ≤ 2 := (one_add_inv_log X_gt.le).le - positivity - _ = 2 * C' * X / (ε * T) := by ring - -- Now bound the integrand - intro σ hσ - unfold SmoothedChebyshevIntegrand - have log_deriv_zeta_bound : ‖ζ' (σ - T * I) / ζ (σ - T * I)‖ ≤ C₂ * (C₃ * T) := by - calc - ‖ζ' (σ - (T : ℝ) * I) / ζ (σ - (T : ℝ) * I)‖ = ‖ζ' (σ + (-T : ℝ) * I) / ζ (σ + (-T : ℝ) * I)‖ := by - have Z : σ - (T : ℝ) * I = σ + (- T : ℝ) * I := by simp; ring_nf - simp [Z] - _ ≤ C₂ * Real.log |-T| ^ 9 := has_bound σ (-T) - (by simp only [abs_neg]; rw [abs_of_pos Tpos]; exact T_gt) - (by unfold σ₁ at hσ; simp only [mem_Ioc, abs_neg, log_abs, mem_Ici, - tsub_le_iff_right] at hσ ⊢; replace hσ := hσ.1; linarith) - _ ≤ C₂ * Real.log T ^ 9 := by simp - _ ≤ C₂ * (C₃ * T) := by gcongr; exact hC₃ T (by linarith) - - -- Then estimate the remaining factors. - calc - ‖-ζ' (σ - T * I) / ζ (σ - T * I) * 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) - (σ - T * I) * X ^ (σ - T * I)‖ = - ‖-ζ' (σ - T * I) / ζ (σ - T * I)‖ * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) - (σ - T * I)‖ * ‖(X : ℂ) ^ (σ - T * I)‖ := by - repeat rw[norm_mul] - _ ≤ C₂ * (C₃ * T) * (C₁ * (ε * ‖σ - T * I‖ ^ 2)⁻¹) * (rexp 1 * X) := by - apply mul_le_mul₃ - · rw[neg_div, norm_neg] - exact log_deriv_zeta_bound - · refine Mbd σ₁ σ₁pos _ ?_ ?_ ε ε_pos ε_lt_one - · simp only [mem_Ioc, sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, sub_zero, σ₁] at hσ ⊢ - linarith - · simp only [mem_Ioc, sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, sub_zero, σ₁] at hσ ⊢ - linarith[one_add_inv_log X_gt.le] - · rw[cpow_def_of_ne_zero] - · rw[norm_exp,← ofReal_log, re_ofReal_mul] - · simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - sub_zero] - rw [← le_log_iff_exp_le, Real.log_mul (exp_ne_zero 1), Real.log_exp, ← le_div_iff₀', add_comm, add_div, div_self, one_div] - · exact hσ.2 - · refine (Real.log_pos ?_).ne.symm - linarith - · apply Real.log_pos - linarith - · linarith - · positivity - · positivity - · exact_mod_cast Xpos.ne.symm - · positivity - · positivity - · positivity - _ = (C' * X * T) / (ε * ‖σ - T * I‖ ^ 2) := by ring - _ ≤ C' * X / (ε * T) := by - have : ‖σ - T * I‖ ^ 2 ≥ T ^ 2 := by - calc - ‖σ - T * I‖ ^ 2 = ‖σ + (-T : ℝ) * I‖ ^ 2 := by - congr 2 - push_cast - ring - _ = normSq (σ + (-T : ℝ) * I) := (normSq_eq_norm_sq _).symm - _ = σ^2 + (-T)^2 := by - rw[Complex.normSq_add_mul_I] - _ ≥ T^2 := by - rw[neg_sq] - exact le_add_of_nonneg_left (sq_nonneg _) - calc - C' * X * T / (ε * ‖↑σ - ↑T * I‖ ^ 2) ≤ C' * X * T / (ε * T ^ 2) := by - rw[div_le_div_iff_of_pos_left, mul_le_mul_iff_right₀] - · exact this - · exact ε_pos - · positivity - · apply mul_pos ε_pos - exact lt_of_lt_of_le (pow_pos Tpos 2) this - · positivity - _ = C' * X / (ε * T) := by - field_simp - -lemma I8I2 {SmoothingF : ℝ → ℝ} - {X ε T σ₁ : ℝ} (T_gt : 3 < T) : - I₈ SmoothingF ε X T σ₁ = -conj (I₂ SmoothingF ε X T σ₁) := by - unfold I₂ I₈ - rw[map_mul, ← neg_mul] - congr - · simp[conj_ofNat] - · rw[← intervalIntegral_conj] - apply intervalIntegral.integral_congr - intro σ hσ - simp only [] - rw[← smoothedChebyshevIntegrand_conj] - · simp only [map_sub, conj_ofReal, map_mul, conj_I, mul_neg, sub_neg_eq_add] - · exact lt_trans (by norm_num) T_gt - -lemma I8Bound {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - {A C₂ : ℝ} (has_bound : LogDerivZetaHasBound A C₂) (C₂_pos : 0 < C₂) (A_in : A ∈ Ioc 0 (1 / 2)) : - ∃ (C : ℝ) (_ : 0 < C), - ∀(X : ℝ) (_ : 3 < X) {ε : ℝ} (_: 0 < ε) - (_ : ε < 1) - {T : ℝ} (_ : 3 < T), - let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9 - ‖I₈ SmoothingF ε T X σ₁‖ ≤ C * X / (ε * T) := by - - obtain ⟨C, hC, i2Bound⟩ := I2Bound suppSmoothingF ContDiffSmoothingF has_bound C₂_pos A_in - use C, hC - intro X hX ε hε0 hε1 T hT σ₁ - let i2Bound := i2Bound X hX hε0 hε1 hT - rw[I8I2 hX, norm_neg, norm_conj] - exact i2Bound - -lemma log_pow_over_xsq_integral_bounded : - ∀ n : ℕ, ∃ C : ℝ, 0 < C ∧ ∀ T >3, ∫ x in Ioo 3 T, (Real.log x)^n / x^2 < C := by - have log3gt1: 1 < Real.log 3 := logt_gt_one le_rfl - intro n - induction n with - | zero => - use 1 - constructor - · norm_num - · intro T hT - simp only [pow_zero] - have h1 :(0 ≤ (-2) ∨ (-2) ≠ (-1) ∧ 0 ∉ Set.uIcc 3 T) := by - right - constructor - · linarith - · refine notMem_uIcc_of_lt ?_ ?_ - · exact three_pos - · linarith - have integral := integral_zpow h1 - ring_nf at integral - - have swap_int_kind : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), 1 / x ^ 2 = ∫ (x : ℝ) in Ioo 3 T, 1 / x ^ 2 := by - rw [intervalIntegral.integral_of_le (by linarith)] - exact MeasureTheory.integral_Ioc_eq_integral_Ioo - rw [← swap_int_kind] - have change_int_power : ∫ (x : ℝ) in (3 : ℝ)..T, (1 : ℝ) / x ^ (↑ 2) - = ∫ (x : ℝ) in (3 : ℝ).. T, x ^ (-2 : ℤ) := by - apply intervalIntegral.integral_congr - intro x hx - simp - rw [change_int_power, integral] - have : T ^ (-1 : ℤ) > 0 := by - refine zpow_pos ?_ (-1) - linarith - linarith - | succ d ih => - obtain ⟨Cd, Cdpos, IH⟩ := ih - use ((Real.log 3)^(d+1) / 3) + (d+1) * Cd - constructor - · have logpowpos : (Real.log 3) ^ (d + 1) > 0 := by - refine pow_pos ?_ (d + 1) - linarith - have : Real.log 3 ^ (d + 1) / 3 + (↑d + 1) * Cd > 0 / 3 + 0 := by - have term2_pos : 0 < (↑d + 1) * Cd := by - refine (mul_pos_iff_of_pos_right Cdpos).mpr ?_ - exact Nat.cast_add_one_pos d - refine add_lt_add ?_ term2_pos - refine div_lt_div₀ logpowpos ?_ ?_ ?_ - · linarith - · linarith - · linarith - ring_nf at this - ring_nf - exact this - · intro T Tgt3 - let u := fun x : ℝ ↦ (Real.log x) ^ (d + 1) - let v := fun x : ℝ ↦ -1 / x - let u' := fun x : ℝ ↦ (d + 1 : ℝ) * (Real.log x)^d / x - let v' := fun x : ℝ ↦ 1 / x^2 - - have swap_int_type : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ (d + 1) / x ^ 2 - = ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ (d + 1) / x ^ 2 := by - rw [intervalIntegral.integral_of_le (by linarith)] - exact MeasureTheory.integral_Ioc_eq_integral_Ioo - - rw [← swap_int_type] - - have uIcc_is_Icc : Set.uIcc 3 T = Set.Icc 3 T := by - exact uIcc_of_lt Tgt3 - - have cont_u : ContinuousOn u (Set.uIcc 3 T) := by - unfold u - rw[uIcc_is_Icc] - refine ContinuousOn.pow ?_ (d + 1) - refine continuousOn_of_forall_continuousAt ?_ - intro x hx - refine continuousAt_log ?_ - linarith [hx.1] - - have cont_v : ContinuousOn v (Set.uIcc 3 T) := by - unfold v - rw[uIcc_is_Icc] - refine continuousOn_of_forall_continuousAt ?_ - intro x hx - have cont2 : ContinuousAt (fun (x : ℝ) ↦ 1 / x) (-x) := by - refine ContinuousAt.div₀ ?_ (fun ⦃U⦄ a ↦ a) ?_ - · exact continuousAt_const - · linarith [hx.1] - have fun1 : (fun (x : ℝ) ↦ -1 / x) = (fun (x : ℝ) ↦ 1 / (-x)) := by - ext x - ring_nf - rw [fun1] - exact ContinuousAt.comp cont2 (HasDerivAt.neg (hasDerivAt_id x)).continuousAt - - have deriv_u : - (∀ x ∈ Set.Ioo (3 ⊓ T) (3 ⊔ T), HasDerivAt u (u' x) x) := by - intro x hx - have min3t : min 3 T = 3 := by - exact min_eq_left_of_lt Tgt3 - have max3t : max 3 T = T := by - exact max_eq_right_of_lt Tgt3 - rw[min3t, max3t] at hx - unfold u u' - have xne0 : x ≠ 0 := by linarith [hx.1] - have deriv2 := (Real.hasDerivAt_log xne0).pow (d + 1) - have fun2 : (↑d + 1) * Real.log x ^ d / x = (↑d + 1) * Real.log x ^ d * x⁻¹:= by - exact rfl - rw [fun2] - convert! deriv2 using 1 - rw [Nat.add_sub_cancel, - Nat.cast_add, Nat.cast_one] - - have deriv_v : (∀ x ∈ Set.Ioo (3 ⊓ T) (3 ⊔ T), HasDerivAt v (v' x) x) := by - intro x hx - have min3t : min 3 T = 3 := by - exact min_eq_left_of_lt Tgt3 - have max3t : max 3 T = T := by - exact max_eq_right_of_lt Tgt3 - rw[min3t, max3t] at hx - have xne0 : x ≠ 0 := by linarith [hx.1] - unfold v v' - have deriv1 := hasDerivAt_inv xne0 - have fun1 : (fun (x : ℝ) ↦ x⁻¹) = (fun (x : ℝ) ↦ 1 / x) := by - ext x - exact inv_eq_one_div x - rw [fun1] at deriv1 - have fun2 : -(x ^ 2)⁻¹ = - 1 / x ^ 2 := by - field_simp - rw [fun2] at deriv1 - convert! HasDerivAt.neg deriv1 using 1 - · ext x - rw [neg_eq_neg_one_mul] - field_simp - simp - · field_simp - - have cont_u' : ContinuousOn u' (Set.uIcc 3 T) := by - rw[uIcc_is_Icc] - unfold u' - refine ContinuousOn.div₀ ?_ ?_ ?_ - · refine ContinuousOn.mul ?_ ?_ - · exact continuousOn_const - · refine ContinuousOn.pow ?_ d - refine continuousOn_of_forall_continuousAt ?_ - intro x hx - refine continuousAt_log ?_ - linarith [hx.1] - · exact continuousOn_id' (Icc 3 T) - · intro x hx - linarith [hx.1] - - have cont_v' : ContinuousOn v' (Set.uIcc 3 T) := by - rw[uIcc_is_Icc] - unfold v' - refine ContinuousOn.div₀ ?_ ?_ ?_ - · exact continuousOn_const - · exact continuousOn_pow 2 - · intro x hx - refine pow_ne_zero 2 ?_ - linarith [hx.1] - - have int_u': IntervalIntegrable u' MeasureTheory.volume 3 T := by - exact ContinuousOn.intervalIntegrable cont_u' - - have int_v': IntervalIntegrable v' MeasureTheory.volume 3 T := by - exact ContinuousOn.intervalIntegrable cont_v' - - have IBP := intervalIntegral.integral_mul_deriv_eq_deriv_mul_of_hasDerivAt cont_u cont_v deriv_u deriv_v int_u' int_v' - - unfold u u' v v' at IBP - - have int1 : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ (d + 1) * (1 / x ^ 2) - = ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ (d + 1) / x ^ 2 := by - refine intervalIntegral.integral_congr ?_ - intro x hx - field_simp - - rw[int1] at IBP - rw[IBP] - - have int2 : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), (↑d + 1) * Real.log x ^ d / x * (-1 / x) - = -(↑d + 1) * ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ d / x ^ 2 := by - have : ∀ x, (↑d + 1) * Real.log x ^ d / x * (-1 / x) - = -((↑d + 1) * Real.log x ^ d / x ^ 2) := by - intro x - field_simp - have : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), (↑d + 1) * Real.log x ^ d / x * (-1 / x) - = ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), -((↑d + 1) * Real.log x ^ d / x ^ 2) := by - exact intervalIntegral.integral_congr fun ⦃x⦄ a ↦ this x - rw [this, - ←intervalIntegral.integral_const_mul] - - ring_nf - - rw[int2] - - have int3 : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ d / x ^ 2 - = ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d / x ^ 2 := by - rw [intervalIntegral.integral_of_le (by linarith)] - exact MeasureTheory.integral_Ioc_eq_integral_Ioo - - rw[int3] - - have IHbound : ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d / x ^ 2 < Cd := by - exact IH T Tgt3 - - ring_nf - have bound2 : (Real.log T * Real.log T ^ d * T⁻¹) ≥ 0 := by - have logTpos : Real.log T ≥ 0 := by - refine log_nonneg ?_ - linarith - apply mul_nonneg - · apply mul_nonneg - · exact logTpos - · exact pow_nonneg logTpos d - · field_simp - simp - let S := Real.log T * Real.log T ^ d * T⁻¹ - have : (-(Real.log T * Real.log T ^ d * T⁻¹) + Real.log 3 * Real.log 3 ^ d * (1 / 3) + - ↑d * ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2) + - ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2 = (-S + Real.log 3 * Real.log 3 ^ d * (1 / 3) + - ↑d * ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2) + - ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2 := by - unfold S - rfl - rw [this] - - have GetRidOfS : (-S + Real.log 3 * Real.log 3 ^ d * (1 / 3) - + ↑d * ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2) - + ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2 - ≤ ( Real.log 3 * Real.log 3 ^ d * (1 / 3) - + ↑d * ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2) - + ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2 := by - linarith - apply lt_of_le_of_lt GetRidOfS - rw [add_assoc] - - have bound4 : ∫ x in Ioo 3 T, Real.log x ^ d / x ^ 2 < Cd := IHbound - - have bound5 : ↑d * ∫ x in Ioo 3 T, Real.log x ^ d / x ^ 2 ≤ ↑d * Cd := by - apply (mul_le_mul_of_nonneg_left bound4.le) - exact Nat.cast_nonneg d - - rw[add_assoc] - apply add_lt_add_right - field_simp - linarith - -set_option maxHeartbeats 400000 in --- Slow -theorem I3Bound {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - {A Cζ : ℝ} (hCζ : LogDerivZetaHasBound A Cζ) (Cζpos : 0 < Cζ) (hA : A ∈ Ioc 0 (1 / 2)) : - ∃ (C : ℝ) (_ : 0 < C), - ∀ (X : ℝ) (_ : 3 < X) - {ε : ℝ} (_ : 0 < ε) (_ : ε < 1) - {T : ℝ} (_ : 3 < T), - let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9 - ‖I₃ SmoothingF ε T X σ₁‖ ≤ C * X * X ^ (- A / (Real.log T ^ 9)) / ε := by - obtain ⟨CM, CMpos, CMhyp⟩ := MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF - obtain ⟨Cint, Cintpos, Cinthyp⟩ := log_pow_over_xsq_integral_bounded 9 - use Cint * CM * Cζ - have : Cint * CM > 0 := mul_pos Cintpos CMpos - have : Cint * CM * Cζ > 0 := mul_pos this Cζpos - use this - intro X Xgt3 ε εgt0 εlt1 T Tgt3 σ₁ - unfold I₃ - unfold SmoothedChebyshevIntegrand - - have Xpos := zero_lt_three.trans Xgt3 - have Tgt3' : -T < -3 := neg_lt_neg_iff.mpr Tgt3 - - have t_bounds : ∀ t ∈ Ioo (-T) (-3), 3 < |t| ∧ |t| < T := by - intro t ht - have : |t| = -t := by - refine abs_of_neg ?_ - exact ht.2.trans (by norm_num) - rw [← Set.neg_mem_Ioo_iff, mem_Ioo] at ht - rwa [this] - - have logt9gt1_bounds : - ∀ t, t ∈ Set.Icc (-T) (-3) → Real.log |t| ^ 9 > 1 := by - intro t ht - refine one_lt_pow₀ (logt_gt_one ?_) ?_ - · have : |t| = -t := by - refine abs_of_neg ?_ - exact ht.2.trans_lt (by norm_num) - rw [this, le_neg] - exact ht.2 - · norm_num - - have Aoverlogt9gtAoverlogT9_bounds : ∀ t, 3 < |t| ∧ |t| < T → - A / Real.log |t| ^ 9 > A / Real.log T ^ 9 := by - intro t ht - have h9 : 9 ≠ 0 := by norm_num - refine div_lt_div_of_pos_left hA.1 ?_ ?_ - · exact zero_lt_one.trans <| one_lt_pow₀ (logt_gt_one ht.1.le) h9 - · have h1 := log_lt_log (zero_lt_three.trans ht.1) ht.2 - have h2 := logt_gt_one ht.1.le - have h3 : 0 ≤ Real.log |t| := zero_le_one.trans h2.le - exact pow_lt_pow_left₀ h1 h3 h9 - - have AoverlogT9in0half: A / Real.log T ^ 9 ∈ Ioo 0 (1/2) := by - have logT9gt1 : 1 < Real.log T ^ 9 := by - have logt_gt_one : 1 < Real.log T := logt_gt_one Tgt3.le - refine (one_lt_pow_iff_of_nonneg ?_ ?_).mpr logt_gt_one - · exact zero_le_one.trans logt_gt_one.le - · norm_num - have logT9pos := zero_lt_one.trans logT9gt1 - constructor - · exact div_pos hA.1 logT9pos - · rw [div_lt_comm₀ logT9pos one_half_pos, div_lt_iff₀' one_half_pos] - apply hA.2.trans_lt - rwa [lt_mul_iff_one_lt_right one_half_pos] - - have σ₁lt1 : σ₁ < 1 := by - unfold σ₁ - linarith[AoverlogT9in0half.1] - - have σ₁pos : 0 < σ₁ := by - unfold σ₁ - linarith[AoverlogT9in0half.2] - - have quotient_bound : - ∀ t ∈ Ioo (-T) (-3), Real.log |t| ^ 9 / (σ₁ ^ 2 + t ^ 2) ≤ Real.log |t| ^ 9 / t ^ 2 := by - intro t ht - have loght := logt9gt1_bounds t (Ioo_subset_Icc_self ht) - have logpos : Real.log |t| ^ 9 > 0 := zero_lt_one.trans loght - have denom_le : t ^ 2 ≤ σ₁ ^ 2 + t ^ 2 := (le_add_iff_nonneg_left _).mpr <| sq_nonneg σ₁ - have denom_pos : 0 < t ^ 2 := by - apply sq_pos_of_ne_zero - rintro rfl - norm_num [mem_Ioo] at ht - have denom2_pos : 0 < σ₁ ^ 2 + t ^ 2 := add_pos_of_nonneg_of_pos (sq_nonneg _) denom_pos - exact (div_le_div_iff_of_pos_left logpos denom2_pos denom_pos).mpr denom_le - - have MellinBound : ∀ (t : ℝ), - ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (σ₁ + t * I)‖ ≤ - CM * (ε * ‖(σ₁ + t * I)‖ ^ 2)⁻¹ := by - intro t - refine CMhyp σ₁ σ₁pos _ ?_ ?_ _ εgt0 εlt1 <;> simp [σ₁lt1.le.trans one_le_two] - - have logzetabnd : ∀ t : ℝ, 3 < |t| ∧ |t| < T → ‖ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)‖ ≤ Cζ * Real.log (|t| : ℝ) ^ 9 := by - intro t tbounds - apply hCζ - · exact tbounds.1 - · unfold σ₁ - rw [mem_Ici, sub_le_sub_iff_left] - exact (Aoverlogt9gtAoverlogT9_bounds t tbounds).le - - let f t := (-ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)) * - 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ₁ + ↑t * I) * - ↑X ^ (↑σ₁ + ↑t * I) - - let g t := Cζ * CM * Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) * X ^ σ₁ - - have bound_integral : ∀ t ∈ Ioo (-T) (-3), ‖f t‖ ≤ g t := by - intro t ht - unfold f - - have : ‖(-ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)) * - 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₁ + ↑t * I) * - ↑X ^ (↑σ₁ + ↑t * I)‖ ≤ ‖ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)‖ * - ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₁ + ↑t * I)‖ * - ‖(↑(X : ℝ) : ℂ) ^ (↑σ₁ + ↑t * I)‖ := by - simp [norm_neg] - - have : ‖ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)‖ * - ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₁ + ↑t * I)‖ * - ‖(↑X : ℂ) ^ (↑σ₁ + ↑t * I)‖ ≤ (Cζ * Real.log |t| ^ 9) * - (CM * (ε * ‖↑σ₁ + ↑t * I‖ ^ 2)⁻¹) * X ^ σ₁:= by - have Xσ_bound : ‖↑(X : ℂ) ^ (↑σ₁ + ↑t * I)‖ = X ^ σ₁ := by - simp [norm_cpow_eq_rpow_re_of_pos Xpos] - obtain ⟨ht_gt3, ht_ltT⟩ := t_bounds _ ht - have logtgt1 : 1 < Real.log |t| := logt_gt_one ht_gt3.le - have hζ := logzetabnd t ⟨ht_gt3, ht_ltT⟩ - have h𝓜 := MellinBound t - rw[Xσ_bound] - gcongr - - have : (Cζ * Real.log |t| ^ 9) * (CM * (ε * ‖↑σ₁ + ↑t * I‖ ^ 2)⁻¹) * X ^ σ₁ = g t := by - unfold g - ring_nf - linarith - - have int_with_f : - ∫ (t : ℝ) in (-T)..(-3), - -ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I) * - 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ₁ + ↑t * I) * - ↑X ^ (↑σ₁ + ↑t * I) = - ∫ (t : ℝ) in (-T)..(-3), f t := by - simp only [f] - rw[int_with_f] - - apply (norm_mul_le _ _).trans - rw [Complex.norm_mul, Complex.norm_I, one_mul] - - have : ‖1 / (2 * ↑π * I)‖ * ‖∫ (t : ℝ) in (-T)..(-3), f ↑t‖ ≤ ‖∫ (t : ℝ) in (-T)..(-3), f ↑t‖ := by - apply mul_le_of_le_one_left - · apply norm_nonneg - · simp only [one_div, norm_inv] - apply inv_le_one_of_one_le₀ - simp only [Complex.norm_mul, Complex.norm_ofNat, norm_real, norm_eq_abs, pi_nonneg, - abs_of_nonneg, norm_I, mul_one] - apply one_le_mul_of_one_le_of_one_le one_le_two - exact le_trans (by norm_num) pi_gt_three.le - apply le_trans this - - apply le_trans (intervalIntegral.norm_integral_le_integral_norm Tgt3'.le) - - have ne_zero_of_mem_uIcc (x) (hx : x ∈ uIcc (-T) (-3)) : x ≠ 0 := by - rintro rfl - norm_num [mem_uIcc] at hx - linarith - - have cont1 : ContinuousOn (fun t ↦ Real.log |t| ^ 9) (uIcc (-T) (-3)) := - _root_.continuous_abs.continuousOn.log - (fun x hx => abs_ne_zero.mpr <| ne_zero_of_mem_uIcc x hx) |>.pow 9 - - have g_cont : ContinuousOn g (uIcc (-T) (-3)) := by - unfold g - refine .mul ?_ continuousOn_const - refine ContinuousOn.div ?_ ?_ ?_ - · exact continuousOn_const.mul cont1 - · fun_prop - · intro x hx - apply mul_ne_zero εgt0.ne' - have : 0 < σ₁ ^ 2 + x ^ 2 := add_pos_of_pos_of_nonneg (sq_pos_of_pos σ₁pos) (sq_nonneg x) - simp only [Complex.sq_norm, normSq_add_mul_I, ne_eq, this.ne', not_false_eq_true] - - have int_normf_le_int_g: ∫ (t : ℝ) in (-T)..(-3), ‖f ↑t‖ - ≤ ∫ (t : ℝ) in (-T)..(-3), g ↑t := by - by_cases h_int : IntervalIntegrable (fun t : ℝ ↦ ‖f t‖) volume (-T) (-3) - · exact intervalIntegral.integral_mono_on_of_le_Ioo - Tgt3'.le h_int g_cont.intervalIntegrable bound_integral - · rw [intervalIntegral.integral_undef h_int] - apply intervalIntegral.integral_nonneg Tgt3'.le - intro t ht - unfold g - have := logt9gt1_bounds t ht - positivity - - apply le_trans int_normf_le_int_g - unfold g - - simp only [σ₁] - - have : X ^ (1 - A / Real.log T ^ 9) = X * X ^ (- A / Real.log T ^ 9) := by - rw [sub_eq_add_neg, Real.rpow_add Xpos, Real.rpow_one, neg_div] - - rw[this] - - have Bound_of_log_int: ∫ (t : ℝ) in (-T)..(-3), Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) ≤ Cint / ε := by - have : ∫ (t : ℝ) in (-T)..(-3), Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) - = (1 / ε) * ∫ t in (-T)..(-3), Real.log |t| ^ 9 / ‖↑σ₁ + ↑t * I‖ ^ 2 := by - rw [← intervalIntegral.integral_const_mul] - congr with t - field_simp [εgt0] - rw[this] - - have bound : ∫ t in (-T)..(-3), Real.log |t| ^ 9 / ‖↑σ₁ + ↑t * I‖ ^ 2 ≤ Cint := by - simp_rw [Complex.sq_norm, normSq_add_mul_I] - - have : ∫ t in (-T)..(-3), Real.log |t| ^ 9 / (σ₁ ^ 2 + t ^ 2) - ≤ ∫ t in (-T)..(-3), Real.log |t| ^ 9 / t ^ 2 := by - refine intervalIntegral.integral_mono_on_of_le_Ioo Tgt3'.le ?_ ?_ ?_ - · have cont : ContinuousOn (fun t ↦ Real.log |t| ^ 9 / (σ₁ ^ 2 + t ^ 2)) (Set.uIcc (-T) (-3)) := by - refine ContinuousOn.div cont1 ?_ ?_ - · refine ContinuousOn.add ?_ ?_ - · exact continuousOn_const - · refine ContinuousOn.pow ?_ 2 - exact continuousOn_id' _ - · intro t ht - have h1 : 0 < t ^ 2 := pow_two_pos_of_ne_zero (ne_zero_of_mem_uIcc t ht) - have h2 : 0 < σ₁ ^ 2 := sq_pos_of_pos σ₁pos - exact (add_pos_of_pos_of_nonneg h2 h1.le).ne' - apply cont.intervalIntegrable - · have cont : ContinuousOn (fun t ↦ Real.log |t| ^ 9 / t ^ 2) (Set.uIcc (-T) (-3)) := by - refine ContinuousOn.div cont1 ?_ ?_ - · refine ContinuousOn.pow ?_ 2 - exact continuousOn_id' _ - · intro t ht - exact pow_ne_zero 2 (ne_zero_of_mem_uIcc t ht) - apply cont.intervalIntegrable - · intro x hx - exact quotient_bound x hx - apply le_trans this - rw [← intervalIntegral.integral_comp_neg] - simp only [abs_neg, log_abs, even_two, Even.neg_pow] - rw [intervalIntegral.integral_of_le Tgt3.le, MeasureTheory.integral_Ioc_eq_integral_Ioo] - exact (Cinthyp T Tgt3).le - rw [mul_comm, - ← mul_div_assoc, mul_one] - - exact (div_le_div_iff_of_pos_right εgt0).mpr bound - - have factor_out_constants : - ∫ (t : ℝ) in (-T)..(-3), Cζ * CM * Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) * (X * X ^ (-A / Real.log T ^ 9)) - = Cζ * CM * (X * X ^ (-A / Real.log T ^ 9)) * ∫ (t : ℝ) in (-T)..(-3), Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) := by - rw [mul_assoc, ← mul_assoc (Cζ * CM), ← mul_assoc] - field_simp - simp only [log_abs] - rw [← intervalIntegral.integral_const_mul] - apply intervalIntegral.integral_congr - intro t ht - ring_nf - - rw [factor_out_constants] - - have : Cζ * CM * (X * X ^ (-A / Real.log T ^ 9)) * ∫ (t : ℝ) in (-T)..(-3), Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) - ≤ Cζ * CM * ((X : ℝ) * X ^ (-A / Real.log T ^ 9)) * (Cint / ε) := by - apply mul_le_mul_of_nonneg_left - · exact Bound_of_log_int - · positivity - - apply le_trans this - ring_nf - field_simp - simp - -lemma I7I3 {SmoothingF : ℝ → ℝ} {ε X T σ₁ : ℝ} (Xpos : 0 < X) : - I₇ SmoothingF ε T X σ₁ = conj (I₃ SmoothingF ε T X σ₁) := by - unfold I₃ I₇ - simp only [map_mul, map_div₀, conj_I, conj_ofReal, conj_ofNat, map_one] - rw [neg_mul, mul_neg, ← neg_mul] - congr - · ring - · rw [← intervalIntegral_conj, ← intervalIntegral.integral_comp_neg] - apply intervalIntegral.integral_congr - intro t ht - simp only - rw [← smoothedChebyshevIntegrand_conj Xpos] - simp - -lemma I7Bound {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - {A Cζ : ℝ} (hCζ : LogDerivZetaHasBound A Cζ) (Cζpos : 0 < Cζ) (hA : A ∈ Ioc 0 (1 / 2)) - : ∃ (C : ℝ) (_ : 0 < C), - ∀ (X : ℝ) (_ : 3 < X) {ε : ℝ} (_ : 0 < ε) - (_ : ε < 1) {T : ℝ} (_ : 3 < T), - let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9 - ‖I₇ SmoothingF ε T X σ₁‖ ≤ C * X * X ^ (- A / (Real.log T ^ 9)) / ε := by - obtain ⟨C, Cpos, bound⟩ := I3Bound suppSmoothingF ContDiffSmoothingF hCζ Cζpos hA - refine ⟨C, Cpos, fun X X_gt ε εpos ε_lt_one T T_gt ↦ ?_⟩ - specialize bound X X_gt εpos ε_lt_one T_gt - intro σ₁ - rwa [I7I3 (by linarith), norm_conj] - -lemma I4Bound {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - {σ₂ : ℝ} (h_logDeriv_holo : LogDerivZetaIsHoloSmall σ₂) (hσ₂ : σ₂ ∈ Ioo 0 1) - {A : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) : - ∃ (C : ℝ) (_ : 0 ≤ C) (Tlb : ℝ) (_ : 3 < Tlb), - ∀ (X : ℝ) (_ : 3 < X) - {ε : ℝ} (_ : 0 < ε) (_ : ε < 1) - {T : ℝ} (_ : Tlb < T), - let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9 - ‖I₄ SmoothingF ε X σ₁ σ₂‖ ≤ C * X * X ^ (- A / (Real.log T ^ 9)) / ε := by - - have reOne : re 1 = 1 := rfl - have imOne : im 1 = 0 := rfl - have reThree : re 3 = 3 := rfl - have imThree : im 3 = 0 := rfl - - unfold I₄ SmoothedChebyshevIntegrand - - let S : Set ℝ := (fun (t : ℝ) ↦ ↑‖-ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I)‖₊) '' Icc 0 1 - let C' : ℝ := sSup S - have bddAboveS : BddAbove S := by - refine IsCompact.bddAbove ?_ - unfold S - refine IsCompact.image_of_continuousOn ?_ ?_ - · exact isCompact_Icc - · refine ContinuousOn.norm ?_ - have : (fun (t : ℝ) ↦ -ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I)) = - (fun (t : ℝ) ↦ -(ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I))) := by - apply funext - intro x - apply neg_div - rw[this] - refine ContinuousOn.neg ?_ - have : (fun (t : ℝ) ↦ ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I)) = - ((ζ' / ζ) ∘ (fun (t : ℝ) ↦ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I))) := rfl - rw[this] - apply h_logDeriv_holo.continuousOn.comp' (by fun_prop) - unfold MapsTo - intro x xInIcc - simp only [neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le, Set.mem_sdiff, mem_singleton_iff] - have : ¬↑σ₂ + ↑x * (1 - ↑σ₂) - 3 * I = 1 := by - by_contra h - rw[Complex.ext_iff, sub_re, add_re, sub_im, add_im] at h - repeat rw[mul_im] at h - repeat rw[mul_re] at h - rw[sub_im, sub_re, reOne, imOne, reThree, imThree, I_im, I_re] at h - repeat rw[ofReal_re] at h - repeat rw[ofReal_im] at h - ring_nf at h - obtain ⟨_, ripGoal⟩ := h - linarith - refine ⟨?_, this⟩ - rw [mem_reProdIm] - simp only [sub_re, add_re, ofReal_re, mul_re, one_re, ofReal_im, sub_im, one_im, sub_self, - mul_zero, sub_zero, re_ofNat, I_re, im_ofNat, I_im, mul_one, add_im, mul_im, zero_mul, - add_zero, zero_sub, mem_Icc, le_refl, neg_le_self_iff, Nat.ofNat_nonneg, and_self, and_true] - rw [Set.uIcc_of_le] - · rw [mem_Icc] - constructor - · simp only [le_add_iff_nonneg_right] - apply mul_nonneg - · exact xInIcc.1 - · linarith [hσ₂.2] - · have : σ₂ + x * (1 - σ₂) = σ₂ * (1 - x) + x := by ring - rw [this] - clear this - have : (2 : ℝ) = 1 * 1 + 1 := by norm_num - rw [this] - clear this - gcongr - · linarith [xInIcc.2] - · exact hσ₂.2.le - · linarith [xInIcc.1] - · exact xInIcc.2 - · linarith [hσ₂.2] - - have CPrimeNonneg : 0 ≤ C' := by - apply Real.sSup_nonneg - intro x x_in_S - obtain ⟨t, ht, rfl⟩ := x_in_S - exact NNReal.coe_nonneg _ - - obtain ⟨D, Dpos, MellinSmooth1bBound⟩ := MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF - let C : ℝ := C' * D / sInf ((fun t => ‖ σ₂ + (t : ℝ) * (1 - σ₂) - 3 * I ‖₊ ^ 2) '' Set.Icc 0 1) - use C - have sInfPos : 0 < sInf ((fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ ^ 2) '' Icc 0 1) := by - refine (IsCompact.lt_sInf_iff_of_continuous ?_ ?_ ?_ 0).mpr ?_ - · exact isCompact_Icc - · exact Nonempty.of_subtype - · have : (fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ ^ 2) = - (fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ * ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊) := by - apply funext - intro x - rw[pow_two] - rw[this] - have : ContinuousOn (fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊) (Icc 0 1) := by - refine ContinuousOn.nnnorm ?_ - refine ContinuousOn.sub ?_ (by exact continuousOn_const) - refine ContinuousOn.add (by exact continuousOn_const) ?_ - exact ContinuousOn.mul (by exact Complex.continuous_ofReal.continuousOn) (by exact continuousOn_const) - exact ContinuousOn.mul (by exact this) (by exact this) - · intro x xLoc - apply pow_pos - have temp : |(↑σ₂ + ↑x * (1 - ↑σ₂) - 3 * I).im| ≤ - ‖↑σ₂ + ↑x * (1 - ↑σ₂) - 3 * I‖₊ := by apply Complex.abs_im_le_norm - rw[sub_im, add_im, mul_im, mul_im, I_re, I_im, sub_im, sub_re] at temp - repeat rw[ofReal_re] at temp - repeat rw[ofReal_im] at temp - rw[reThree, imOne] at temp - ring_nf at temp ⊢ - rw[(by ring : σ₂ - σ₂ * x + x - I * 3 = σ₂ - σ₂ * x + (x - I * 3))] at temp ⊢ - rw[abs_of_neg, neg_neg] at temp - · have : (3 : NNReal) ≤ ‖↑σ₂ - ↑σ₂ * ↑x + (↑x - I * 3)‖₊ := temp - positivity - · rw[neg_lt_zero] - norm_num - have CNonneg : 0 ≤ C := by - unfold C - apply mul_nonneg - · exact mul_nonneg (by exact CPrimeNonneg) (by exact Dpos.le) - · rw[inv_nonneg] - norm_cast - convert sInfPos.le using 5 - norm_cast - use CNonneg - - let Tlb : ℝ := max 4 (max (rexp (A ^ (9 : ℝ)⁻¹)) (rexp ((A / (1 - σ₂)) ^ (9 : ℝ)⁻¹))) - use Tlb - - have : 3 < Tlb := by - unfold Tlb - rw[lt_max_iff] - refine Or.inl ?_ - norm_num - use this - - intro X X_gt_three ε ε_pos ε_lt_one T T_gt_Tlb σ₁ - have σ₂_le_σ₁ : σ₂ ≤ σ₁ := by - have logTlb_pos : 0 < Real.log Tlb := by - rw[← Real.log_one] - exact log_lt_log (by norm_num) (by linarith) - have logTlb_nonneg : 0 ≤ Real.log Tlb := le_of_lt (by exact logTlb_pos) - have expr_nonneg : 0 ≤ A / (1 - σ₂) := by - apply div_nonneg - · linarith [hA.1] - · rw[sub_nonneg] - exact le_of_lt hσ₂.2 - have temp : σ₂ ≤ 1 - A / Real.log Tlb ^ 9 := by - have : rexp ((A / (1 - σ₂)) ^ (9 : ℝ)⁻¹) ≤ Tlb := by - unfold Tlb - nth_rewrite 2 [max_comm] - rw[max_left_comm] - apply le_max_of_le_left (by rfl) - rw[← Real.le_log_iff_exp_le] at this - · have h1 : 0 ≤ (A / (1 - σ₂)) ^ (9 : ℝ)⁻¹ := by apply Real.rpow_nonneg (by exact expr_nonneg) - have h2 : 0 < (9 : ℝ) := Nat.ofNat_pos' - rw[← Real.rpow_le_rpow_iff h1 logTlb_nonneg h2] at this - have h: ((A / (1 - σ₂)) ^ (9 : ℝ)⁻¹) ^ (9 : ℝ) = A / (1 - σ₂) := rpow_inv_rpow (by exact expr_nonneg) (by exact Ne.symm (OfNat.zero_ne_ofNat 9)) - rw[h, div_le_iff₀, mul_comm, ← div_le_iff₀] at this - · have temp : Real.log Tlb ^ (9 : ℕ) = Real.log Tlb ^ (9 : ℝ) := Eq.symm (rpow_ofNat (Real.log Tlb) 9) - rw[temp] - linarith - · exact rpow_pos_of_pos (by exact logTlb_pos) 9 - · rw[sub_pos] - exact hσ₂.2 - · positivity - have : 1 - A / Real.log Tlb ^ 9 ≤ 1 - A / Real.log T ^ 9 := by - apply sub_le_sub (by rfl) - apply div_le_div₀ - · exact le_of_lt (by exact hA.1) - · rfl - · apply pow_pos (by exact logTlb_pos) - · apply pow_le_pow_left₀ (by exact logTlb_nonneg) - apply log_le_log (by positivity) - exact le_of_lt (by exact T_gt_Tlb) - exact le_trans temp this - have minσ₂σ₁ : min σ₂ σ₁ = σ₂ := min_eq_left (by exact σ₂_le_σ₁) - have maxσ₂σ₁ : max σ₂ σ₁ = σ₁ := max_eq_right (by exact σ₂_le_σ₁) - have σ₁_lt_one : σ₁ < 1 := by - rw[← sub_zero 1] - unfold σ₁ - apply sub_lt_sub_left - apply div_pos (by exact hA.1) - apply pow_pos - rw[← Real.log_one] - exact log_lt_log (by norm_num) (by linarith) - - rw[norm_mul, ← one_mul C] - have : 1 * C * X * X ^ (-A / Real.log T ^ 9) / ε = 1 * (C * X * X ^ (-A / Real.log T ^ 9) / ε) := by ring - rw[this] - apply mul_le_mul - · rw[norm_div, norm_one] - repeat rw[norm_mul] - rw[Complex.norm_two, Complex.norm_real, Real.norm_of_nonneg pi_nonneg, Complex.norm_I, mul_one] - have : 1 / (2 * π) < 1 / 6 := by - rw[one_div_lt_one_div] - · refine (div_lt_iff₀' ?_).mp ?_ - · norm_num - ring_nf - refine gt_iff_lt.mpr ?_ - exact Real.pi_gt_three - · positivity - · norm_num - exact le_of_lt (lt_trans this (by norm_num)) - · let f : ℝ → ℂ := fun σ ↦ (-ζ' (↑σ - 3 * I) / ζ (↑σ - 3 * I) * 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ - 3 * I) * ↑X ^ (↑σ - 3 * I)) - have temp : ‖∫ (σ : ℝ) in σ₂..σ₁, -ζ' (↑σ - 3 * I) / ζ (↑σ - 3 * I) * 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ - 3 * I) * ↑X ^ (↑σ - 3 * I)‖ ≤ - C * X * X ^ (-A / Real.log T ^ 9) / ε * |σ₁ - σ₂| := by - have : ∀ x ∈ Set.uIoc σ₂ σ₁, ‖f x‖ ≤ C * X * X ^ (-A / Real.log T ^ 9) / ε := by - intro x xInIoc - let t : ℝ := (x - σ₂) / (1 - σ₂) - have tInIcc : t ∈ Icc 0 1 := by - unfold t - constructor - · apply div_nonneg - · rw[sub_nonneg] - unfold uIoc at xInIoc - rw[minσ₂σ₁] at xInIoc - exact le_of_lt (by exact xInIoc.1) - · rw[sub_nonneg] - apply le_of_lt (by exact hσ₂.2) - · rw[div_le_one] - · refine sub_le_sub ?_ (by rfl) - unfold uIoc at xInIoc - rw[maxσ₂σ₁] at xInIoc - apply le_trans xInIoc.2 - exact le_of_lt (by exact σ₁_lt_one) - · rw[sub_pos] - exact hσ₂.2 - have tExpr : (↑σ₂ + t * (1 - ↑σ₂) - 3 * I) = (↑x - 3 * I) := by - unfold t - simp only [ofReal_div, ofReal_sub, ofReal_one, sub_left_inj] - rw[div_mul_comm, div_self] - · simp only [one_mul, add_sub_cancel] - · refine sub_ne_zero_of_ne ?_ - apply Ne.symm - rw[Complex.ofReal_ne_one] - exact ne_of_lt (by exact hσ₂.2) - unfold f - simp only [Complex.norm_mul] - have : C * X * X ^ (-A / Real.log T ^ 9) / ε = - (C / ε) * (X * X ^ (-A / Real.log T ^ 9)) := by ring - rw[this] - have temp : ‖-ζ' (↑x - 3 * I) / ζ (↑x - 3 * I)‖ * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑x - 3 * I)‖ ≤ - C / ε := by - unfold C - rw[div_div] - nth_rewrite 2 [div_eq_mul_inv] - have temp : ‖-ζ' (↑x - 3 * I) / ζ (↑x - 3 * I)‖ ≤ C' := by - unfold C' - have : ‖-ζ' (↑x - 3 * I) / ζ (↑x - 3 * I)‖ ∈ - (fun (t : ℝ) ↦ ↑‖-ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I)‖₊) '' Icc 0 1 := by - rw[Set.mem_image] - use t - constructor - · exact tInIcc - · rw[tExpr] - rfl - exact le_csSup (by exact bddAboveS) (by exact this) - have : ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑x - 3 * I)‖ ≤ - D * ((sInf ((fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ ^ 2) '' Icc 0 1)) * ε)⁻¹ := by - nth_rewrite 3 [mul_comm] - let s : ℂ := x - 3 * I - have : 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑x - 3 * I) = - 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) s := rfl - rw[this] - have temp : σ₂ ≤ s.re := by - unfold s - rw[sub_re, mul_re, I_re, I_im, reThree, imThree, ofReal_re] - ring_nf - apply le_of_lt - unfold uIoc at xInIoc - rw[minσ₂σ₁] at xInIoc - exact xInIoc.1 - have : s.re ≤ 2 := by - unfold s - rw[sub_re, mul_re, I_re, I_im, reThree, imThree, ofReal_re] - ring_nf - have : x < 1 := by - unfold uIoc at xInIoc - rw[maxσ₂σ₁] at xInIoc - exact lt_of_le_of_lt xInIoc.2 σ₁_lt_one - linarith - have temp : ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) s‖ ≤ D * (ε * ‖s‖ ^ 2)⁻¹ := by - exact MellinSmooth1bBound σ₂ hσ₂.1 s temp this ε ε_pos ε_lt_one - have : D * (ε * ‖s‖ ^ 2)⁻¹ ≤ D * (ε * ↑(sInf ((fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ ^ 2) '' Icc 0 1)))⁻¹ := by - refine mul_le_mul (by rfl) ?_ ?_ (by exact le_of_lt (by exact Dpos)) - · rw[inv_le_inv₀] - · apply mul_le_mul (by rfl) - · rw[NNReal.coe_sInf] - apply csInf_le - · apply NNReal.bddBelow_coe - · unfold s - rw[Set.mem_image] - let xNorm : NNReal := ‖x - 3 * I‖₊ ^ 2 - use xNorm - constructor - · rw[Set.mem_image] - use t - exact ⟨tInIcc, by rw[tExpr]⟩ - · rfl - · exact le_of_lt (by exact sInfPos) - · exact le_of_lt (by exact ε_pos) - · apply mul_pos (ε_pos) - refine sq_pos_of_pos ?_ - refine norm_pos_iff.mpr ?_ - refine ne_zero_of_re_pos ?_ - unfold s - rw[sub_re, mul_re, I_re, I_im, reThree, imThree, ofReal_re] - ring_nf - unfold uIoc at xInIoc - rw[minσ₂σ₁] at xInIoc - exact lt_trans hσ₂.1 xInIoc.1 - · exact mul_pos (ε_pos) (sInfPos) - · rw[inv_nonneg] - apply mul_nonneg (by exact le_of_lt (by exact ε_pos)) - exact sq_nonneg ‖s‖ - exact le_trans temp this - rw[mul_assoc] - apply mul_le_mul (by exact temp) (by exact this) - · have this : 0 ≤ |(𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑x - 3 * I)).re| := by - apply abs_nonneg - exact le_trans this (by refine Complex.abs_re_le_norm ?_) - · exact CPrimeNonneg - have : ‖(X : ℂ) ^ (↑x - 3 * I)‖ ≤ - X * X ^ (-A / Real.log T ^ 9) := by - nth_rewrite 2 [← Real.rpow_one X] - rw[← Real.rpow_add] - · rw[Complex.norm_cpow_of_ne_zero] - · rw[sub_re, sub_im, mul_re, mul_im, ofReal_re, ofReal_im, I_re, I_im, reThree, imThree] - ring_nf - rw[Complex.norm_of_nonneg] - · rw[Complex.arg_ofReal_of_nonneg] - · rw[zero_mul, neg_zero, Real.exp_zero] - simp only [inv_one, mul_one, inv_pow] - refine rpow_le_rpow_of_exponent_le ?_ ?_ - · linarith - · unfold uIoc at xInIoc - rw[maxσ₂σ₁] at xInIoc - unfold σ₁ at xInIoc - ring_nf at xInIoc ⊢ - exact xInIoc.2 - · positivity - · positivity - · refine ne_zero_of_re_pos ?_ - rw[ofReal_re] - positivity - · positivity - apply mul_le_mul - · exact temp - · exact this - · rw[Complex.norm_cpow_eq_rpow_re_of_pos] - · rw[sub_re, mul_re, ofReal_re, I_re, I_im, reThree, imThree] - ring_nf - apply Real.rpow_nonneg - positivity - · positivity - · exact div_nonneg CNonneg (le_of_lt ε_pos) - exact intervalIntegral.norm_integral_le_of_norm_le_const this - have : C * X * X ^ (-A / Real.log T ^ 9) / ε * |σ₁ - σ₂| ≤ - C * X * X ^ (-A / Real.log T ^ 9) / ε := by - have : |σ₁ - σ₂| ≤ 1 := by - rw[abs_of_nonneg] - · rw[← sub_zero 1] - exact sub_le_sub σ₁_lt_one.le hσ₂.1.le - · rw[sub_nonneg] - exact σ₂_le_σ₁ - bound - exact le_trans temp this - · simp only [norm_nonneg] - norm_num - -lemma I6I4 {SmoothingF : ℝ → ℝ} {ε X σ₁ σ₂ : ℝ} (Xpos : 0 < X) : - I₆ SmoothingF ε X σ₁ σ₂ = -conj (I₄ SmoothingF ε X σ₁ σ₂) := by - unfold I₆ I₄ - simp only [map_mul, map_div₀, conj_ofReal, conj_I, map_one, conj_ofNat] - rw [← neg_mul] - congr - · ring - · rw [← intervalIntegral_conj] - apply intervalIntegral.integral_congr - intro σ hσ - simp only - rw[← smoothedChebyshevIntegrand_conj Xpos] - simp [conj_ofNat] - -lemma I6Bound {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - {σ₂ : ℝ} (h_logDeriv_holo : LogDerivZetaIsHoloSmall σ₂) (hσ₂ : σ₂ ∈ Ioo 0 1) - {A : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) : - ∃ (C : ℝ) (_ : 0 ≤ C) (Tlb : ℝ) (_ : 3 < Tlb), - ∀ (X : ℝ) (_ : 3 < X) - {ε : ℝ} (_ : 0 < ε) (_ : ε < 1) - {T : ℝ} (_ : Tlb < T), - let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9 - ‖I₆ SmoothingF ε X σ₁ σ₂‖ ≤ C * X * X ^ (- A / (Real.log T ^ 9)) / ε := by - obtain ⟨C, Cpos, Tlb, Tlb_gt, bound⟩ := I4Bound suppSmoothingF ContDiffSmoothingF h_logDeriv_holo hσ₂ hA - refine ⟨C, Cpos, Tlb, Tlb_gt, fun X X_gt ε εpos ε_lt_one T T_gt ↦ ?_⟩ - specialize bound X X_gt εpos ε_lt_one T_gt - intro σ₁ - rwa [I6I4 (by linarith), norm_neg, norm_conj] - -lemma I5Bound {SmoothingF : ℝ → ℝ} - (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) - (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) - {σ₂ : ℝ} (h_logDeriv_holo : LogDerivZetaIsHoloSmall σ₂) (hσ₂ : σ₂ ∈ Ioo 0 1) - : ∃ (C : ℝ) (_ : 0 < C), - ∀ (X : ℝ) (_ : 3 < X) {ε : ℝ} (_ : 0 < ε) - (_ : ε < 1), - ‖I₅ SmoothingF ε X σ₂‖ ≤ C * X ^ σ₂ / ε := by - unfold LogDerivZetaIsHoloSmall HolomorphicOn at h_logDeriv_holo - let zeta'_zeta_on_line := fun (t : ℝ) ↦ ζ' (σ₂ + t * I) / ζ (σ₂ + t * I) - - have subst : {σ₂} ×ℂ uIcc (-3) 3 ⊆ (uIcc σ₂ 2 ×ℂ uIcc (-3) 3) \ {1} := by - simp! only [neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le] - simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, neg_le_self_iff, - Nat.ofNat_nonneg, uIcc_of_le] - intro z hyp_z - simp only [mem_reProdIm, mem_singleton_iff, mem_Icc] at hyp_z - simp only [Set.mem_sdiff, mem_reProdIm, mem_Icc, mem_singleton_iff] - constructor - · constructor - · rw [hyp_z.1] - apply left_mem_uIcc - · exact hyp_z.2 - · push Not - by_contra h - rw [h] at hyp_z - simp only [one_re, one_im, Left.neg_nonpos_iff, Nat.ofNat_nonneg, and_self, and_true] at hyp_z - linarith [hσ₂.2] - - have zeta'_zeta_cont := (h_logDeriv_holo.mono subst).continuousOn - - have is_compact' : IsCompact ({σ₂} ×ℂ uIcc (-3) 3) := by - refine IsCompact.reProdIm ?_ ?_ - · exact isCompact_singleton - · exact isCompact_uIcc - - let ⟨zeta_bound, zeta_prop⟩ := - IsCompact.exists_bound_of_continuousOn (is_compact') zeta'_zeta_cont - - let ⟨M, ⟨M_is_pos, M_bounds_mellin_hard⟩⟩ := - MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF - - clear is_compact' zeta'_zeta_cont subst zeta'_zeta_on_line h_logDeriv_holo - - unfold I₅ - unfold SmoothedChebyshevIntegrand - - let mellin_prop : ∀ (t ε : ℝ), - 0 < ε → ε < 1 → ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ ≤ M * (ε * ‖↑σ₂ + ↑t * I‖ ^ 2)⁻¹ := - fun (t : ℝ) ↦ (M_bounds_mellin_hard σ₂ (by linarith[hσ₂.1]) (σ₂ + t * I) (by simp only [add_re, - ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero, le_refl]) (by simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero]; linarith[hσ₂.2])) - - simp only [mul_inv_rev] at mellin_prop - - let Const := 1 + (σ₂^2)⁻¹ * (abs zeta_bound) * M - - let C := |π|⁻¹ * 2⁻¹ * 6 * Const - use C - have C_pos : 0 < C := by positivity - use C_pos - - clear C_pos - - intros X X_gt ε ε_pos ε_lt_one - - have mellin_bound := fun (t : ℝ) ↦ mellin_prop t ε ε_pos ε_lt_one - - have U: 0 < σ₂^2 := by - exact sq_pos_of_pos (by linarith[hσ₂.1]) - - have easy_bound : ∀(t : ℝ), (‖↑σ₂ + ↑t * I‖^2)⁻¹ ≤ (σ₂^2)⁻¹ := - by - intro t - rw [inv_le_inv₀] - · rw [Complex.sq_norm, Complex.normSq_apply] - simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - add_zero, add_im, mul_im, zero_add] - ring_nf - simp only [le_add_iff_nonneg_right] - exact zpow_two_nonneg t - · rw [Complex.sq_norm, Complex.normSq_apply] - simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - add_zero, add_im, mul_im, zero_add] - ring_nf - positivity - positivity - - have T1 : ∀(t : ℝ), t ∈ uIoc (-3) (3 : ℝ) → ‖-ζ' (↑σ₂ + ↑t * I) / ζ (↑σ₂ + ↑t * I) * 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ₂ + ↑t * I) * - (↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ ≤ Const * ε⁻¹ * X ^ σ₂ := by - intro t hyp_t - have Z := by - calc - ‖(-ζ' (↑σ₂ + ↑t * I) / ζ (↑σ₂ + ↑t * I)) * (𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)) * - (↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ = ‖-ζ' (↑σ₂ + ↑t * I) / ζ (↑σ₂ + ↑t * I)‖ * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by simp only [Complex.norm_mul, - Complex.norm_div, norm_neg] - _ ≤ ‖ζ' (↑σ₂ + ↑t * I) / ζ (↑σ₂ + ↑t * I)‖ * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by simp only [Complex.norm_div, - norm_neg, le_refl] - _ ≤ zeta_bound * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := - by - have U := zeta_prop (↑σ₂ + t * I) (by - simp only [neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le] - simp only [mem_reProdIm, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, - mul_one, sub_self, add_zero, mem_singleton_iff, add_im, mul_im, zero_add, mem_Icc] - constructor - · trivial - · refine mem_Icc.mp ?_ - · refine mem_Icc_of_Ioc ?_ - · have T : (-3 : ℝ) ≤ 3 := by simp only [neg_le_self_iff, Nat.ofNat_nonneg] - rw [←Set.uIoc_of_le T] - exact hyp_t) - simp only [Complex.norm_div] at U - simp only [Complex.norm_div, ge_iff_le] - linear_combination U * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ - _ ≤ abs zeta_bound * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by - have U : zeta_bound ≤ abs zeta_bound := by simp only [le_abs_self] - linear_combination (U * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ ) - _ ≤ abs zeta_bound * M * ((‖↑σ₂ + ↑t * I‖ ^ 2)⁻¹ * ε⁻¹) * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by - have U := mellin_bound t - linear_combination (abs zeta_bound) * U * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ - _ ≤ abs zeta_bound * M * (σ₂^2)⁻¹ * ε⁻¹ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by - linear_combination (abs zeta_bound * M * easy_bound t * ε⁻¹ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖) - _ = abs zeta_bound * M * (σ₂^2)⁻¹ * ε⁻¹ * X ^ (σ₂) := by - rw [Complex.norm_cpow_eq_rpow_re_of_pos] - · simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, add_zero] - positivity - _ ≤ Const * ε⁻¹ * X ^ σ₂ := by - unfold Const - ring_nf - simp only [inv_pow, le_add_iff_nonneg_right, inv_pos, mul_nonneg_iff_of_pos_left, ε_pos] - positivity - - exact Z - - -- Now want to apply the triangle inequality - -- and bound everything trivially - simp only [one_div, mul_inv_rev, inv_I, neg_mul, norm_neg, Complex.norm_mul, norm_I, norm_inv, - norm_real, norm_eq_abs, Complex.norm_ofNat, one_mul, ge_iff_le] - have Z := - intervalIntegral.norm_integral_le_of_norm_le_const T1 - simp only [ge_iff_le] - - have S : |π|⁻¹ * 2⁻¹ * (Const * ε⁻¹ * X ^ σ₂ * |3 + 3|) = C * X ^ σ₂ / ε := by - unfold C - ring_nf - - simp only [sub_neg_eq_add] at Z - simp only [← S, ge_iff_le] - linear_combination (|π|⁻¹ * 2⁻¹ * Z) - -lemma LogDerivZetaBoundedAndHolo : ∃ A C : ℝ, 0 < C ∧ A ∈ Ioc 0 (1 / 2) ∧ LogDerivZetaHasBound A C - ∧ ∀ (T : ℝ) (_ : 3 ≤ T), - HolomorphicOn (fun (s : ℂ) ↦ ζ' s / (ζ s)) - (( (Icc ((1 : ℝ) - A / Real.log T ^ 9) 2) ×ℂ (Icc (-T) T) ) \ {1}) := by - obtain ⟨A₁, A₁_in, C, C_pos, zeta_bnd⟩ := LogDerivZetaBndUnif - obtain ⟨A₂, A₂_in, holo⟩ := LogDerivZetaHolcLargeT - refine ⟨min A₁ A₂, C, C_pos, ?_, ?_, ?_⟩ - · exact ⟨lt_min A₁_in.1 A₂_in.1, le_trans (min_le_left _ _) A₁_in.2⟩ - · intro σ T hT hσ - apply zeta_bnd _ _ hT - apply mem_Ici.mpr (le_trans _ hσ) - gcongr - · bound - · apply min_le_left - · intro T hT - apply (holo _ hT).mono - intro s hs - simp only [Set.mem_sdiff, mem_singleton_iff, mem_reProdIm] at hs ⊢ - refine ⟨?_, hs.2⟩ - refine ⟨?_, hs.1.2⟩ - refine ⟨?_, hs.1.1.2⟩ - apply le_trans _ hs.1.1.1 - gcongr - · bound - · apply min_le_right - -lemma MellinOfSmooth1cExplicit {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν) - (suppν : ν.support ⊆ Icc (1 / 2) 2) - (mass_one : ∫ x in Ioi 0, ν x / x = 1) : - ∃ ε₀ c : ℝ, 0 < ε₀ ∧ 0 < c ∧ - ∀ ε ∈ Ioo 0 ε₀, ‖𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 - 1‖ ≤ c * ε := by - have := MellinOfSmooth1c diffν suppν mass_one - rw [Asymptotics.isBigO_iff'] at this - rcases this with ⟨c, cpos, hc⟩ - unfold Filter.Eventually at hc - rw [mem_nhdsGT_iff_exists_Ioo_subset] at hc - rcases hc with ⟨ε₀, ε₀pos, h⟩ - refine ⟨ε₀, c, ε₀pos, cpos, fun ε hε ↦ ?_⟩ - specialize h hε - rw [mem_setOf_eq, id_eq, norm_of_nonneg hε.1.le] at h - exact h - -open Filter Topology - --- `x * rexp (-c * (log x) ^ B)) = Real.exp (Real.log x - c * (Real.log x) ^ B))` --- so if `B < 1`, the exponent goes to infinity -lemma x_ε_to_inf (c : ℝ) {B : ℝ} (B_le : B < 1) : Tendsto - (fun x ↦ x * Real.exp (-c * (Real.log x) ^ B)) atTop atTop := by - have coeff_to_zero {B : ℝ} (B_le : B < 1) : - Tendsto (fun x ↦ Real.log x ^ (B - 1)) atTop (𝓝 0) := by - have B_minus_1_neg : B - 1 < 0 := by linarith - rw [← Real.zero_rpow (ne_of_lt B_minus_1_neg), - zero_rpow (ne_of_lt B_minus_1_neg)] - - have one_minus_B_pos : 0 < 1 - B := by linarith - rw [show B - 1 = -(1 - B) by ring] - have : ∀ᶠ (x : ℝ) in atTop, Real.log x ^ (-(1 - B)) = (Real.log x ^ ((1 - B)))⁻¹ := by - filter_upwards [eventually_ge_atTop (1 : ℝ)] with x hx - apply Real.rpow_neg - exact Real.log_nonneg hx - rw [tendsto_congr' this] - apply tendsto_inv_atTop_zero.comp - apply (tendsto_rpow_atTop one_minus_B_pos).comp - exact tendsto_log_atTop - - have log_sub_log_pow_inf (c : ℝ) {B : ℝ} (B_le : B < 1) : - Tendsto (fun (x : ℝ) ↦ Real.log x - c * Real.log x ^ B) atTop atTop := by - have factor_form : ∀ x > 1, Real.log x - c * Real.log x ^ B = - Real.log x * (1 - c * Real.log x ^ (B - 1)) := by - intro x hx - ring_nf - congr! 1 - rw [mul_assoc, mul_comm (Real.log x), mul_assoc] - congr! 1 - have log_pos : 0 < Real.log x := Real.log_pos hx - rw [(by simp : Real.log x ^ (-1 + B) * Real.log x = - Real.log x ^ (-1 + B) * (Real.log x) ^ (1 : ℝ))] - rw [← Real.rpow_add log_pos] - ring_nf - have coeff_to_one : Tendsto (fun x ↦ 1 - c * Real.log x ^ (B - 1)) atTop (𝓝 1) := by - specialize coeff_to_zero B_le - apply Tendsto.const_mul c at coeff_to_zero - convert (tendsto_const_nhds (x := (1 : ℝ)) (f := (atTop : Filter ℝ))).sub coeff_to_zero - ring - - have eventually_factored : ∀ᶠ x in atTop, Real.log x - c * Real.log x ^ B = - Real.log x * (1 - c * Real.log x ^ (B - 1)) := by - filter_upwards [eventually_gt_atTop (1 : ℝ)] with x hx - exact factor_form x hx - - rw [tendsto_congr' eventually_factored] - apply Tendsto.atTop_mul_pos (by norm_num : (0 : ℝ) < 1) tendsto_log_atTop coeff_to_one - - have x_εx_eq (c B : ℝ) : ∀ᶠ (x : ℝ) in atTop, x * rexp (-c * Real.log x ^ B) = - rexp (Real.log x - c * Real.log x ^ B) := by - filter_upwards [eventually_gt_atTop 0] with x hx_pos - conv => - enter [1, 1] - rw [(Real.exp_log hx_pos).symm] - rw [← Real.exp_add] - ring_nf - - rw [tendsto_congr' (x_εx_eq c B)] - exact tendsto_exp_atTop.comp (log_sub_log_pow_inf c B_le) - -set_option maxHeartbeats 400000 in --- Slow -/-- *** Prime Number Theorem (Medium Strength) *** The `ChebyshevPsi` function is asymptotic to `x`. -/ -theorem MediumPNT : ∃ c > 0, - (ψ - id) =O[atTop] - fun (x : ℝ) ↦ x * Real.exp (-c * (Real.log x) ^ ((1 : ℝ) / 10)) := by - have ⟨ν, ContDiffν, ν_nonneg', ν_supp, ν_massOne'⟩ := SmoothExistence - have ContDiff1ν : ContDiff ℝ 1 ν := by - exact ContDiffν.of_le (by simp) - have ν_nonneg : ∀ x > 0, 0 ≤ ν x := fun x _ ↦ ν_nonneg' x - have ν_massOne : ∫ x in Ioi 0, ν x / x = 1 := by - rwa [← integral_Ici_eq_integral_Ioi] - clear ContDiffν ν_nonneg' ν_massOne' - obtain ⟨c_close, c_close_pos, h_close⟩ := - SmoothedChebyshevClose ContDiff1ν ν_supp ν_nonneg ν_massOne - obtain ⟨ε_main, C_main, ε_main_pos, C_main_pos, h_main⟩ := MellinOfSmooth1cExplicit ContDiff1ν ν_supp ν_massOne - obtain ⟨A, C_bnd, C_bnd_pos, A_in_Ioc, zeta_bnd, holo1⟩ := LogDerivZetaBoundedAndHolo - obtain ⟨σ₂', σ₂'_lt_one, holo2'⟩ := LogDerivZetaHolcSmallT - let σ₂ : ℝ := max σ₂' (1 / 2) - have σ₂_pos : 0 < σ₂ := by bound - have σ₂_lt_one : σ₂ < 1 := by bound - have holo2 : HolomorphicOn (fun s ↦ ζ' s / ζ s) (uIcc σ₂ 2 ×ℂ uIcc (-3) 3 \ {1}) := by - apply holo2'.mono - intro s hs - simp only [neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le, Set.mem_sdiff, mem_reProdIm, mem_Icc, - mem_singleton_iff] at hs ⊢ - refine ⟨?_, hs.2⟩ - refine ⟨?_, hs.1.2⟩ - rcases hs.1.1 with ⟨left, right⟩ - constructor - · apply le_trans _ left - apply min_le_min_right - apply le_max_left - · rw [max_eq_right (by linarith)] at right ⊢ - exact right - - clear holo2' σ₂'_lt_one - - obtain ⟨c₁, c₁pos, hc₁⟩ := I1Bound ν_supp ContDiff1ν ν_nonneg ν_massOne - obtain ⟨c₂, c₂pos, hc₂⟩ := I2Bound ν_supp ContDiff1ν zeta_bnd C_bnd_pos A_in_Ioc - obtain ⟨c₃, c₃pos, hc₃⟩ := I3Bound ν_supp ContDiff1ν zeta_bnd C_bnd_pos A_in_Ioc - obtain ⟨c₅, c₅pos, hc₅⟩ := I5Bound ν_supp ContDiff1ν holo2 ⟨σ₂_pos, σ₂_lt_one⟩ - obtain ⟨c₇, c₇pos, hc₇⟩ := I7Bound ν_supp ContDiff1ν zeta_bnd C_bnd_pos A_in_Ioc - obtain ⟨c₈, c₈pos, hc₈⟩ := I8Bound ν_supp ContDiff1ν zeta_bnd C_bnd_pos A_in_Ioc - obtain ⟨c₉, c₉pos, hc₉⟩ := I9Bound ν_supp ContDiff1ν ν_nonneg ν_massOne - - obtain ⟨c₄, c₄pos, Tlb₄, Tlb₄bnd, hc₄⟩ := I4Bound ν_supp ContDiff1ν - holo2 ⟨σ₂_pos, σ₂_lt_one⟩ A_in_Ioc - - obtain ⟨c₆, c₆pos, Tlb₆, Tlb₆bnd, hc₆⟩ := I6Bound ν_supp ContDiff1ν - holo2 ⟨σ₂_pos, σ₂_lt_one⟩ A_in_Ioc - - let C' := c_close + C_main - let C'' := c₁ + c₂ + c₈ + c₉ - let C''' := c₃ + c₄ + c₆ + c₇ - - let c : ℝ := A ^ ((1 : ℝ) / 10) / 4 - have cpos : 0 < c := by - simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, gt_iff_lt, mem_Ioo, and_imp, - mem_Ioc, lt_sup_iff, - inv_pos, Nat.ofNat_pos, or_true, sup_lt_iff, neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le, - div_pos_iff_of_pos_right, σ₂, c] - obtain ⟨left, right⟩ := A_in_Ioc - positivity - refine ⟨c, cpos, ?_⟩ - rw [Asymptotics.isBigO_iff] - let C : ℝ := C' + C'' + C''' + c₅ - refine ⟨C, ?_⟩ - - let c_εx : ℝ := A ^ ((1 : ℝ) / 10) / 2 - have c_εx_pos : 0 < c_εx := by - simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, gt_iff_lt, mem_Ioo, and_imp, - mem_Ioc, lt_sup_iff, - inv_pos, Nat.ofNat_pos, or_true, sup_lt_iff, neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le, - div_pos_iff_of_pos_right, σ₂, c, c_εx] - let c_Tx : ℝ := A ^ ((1 : ℝ) / 10) - have c_Tx_pos : 0 < c_Tx := by - simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, gt_iff_lt, mem_Ioo, and_imp, - mem_Ioc, lt_sup_iff, - inv_pos, Nat.ofNat_pos, or_true, sup_lt_iff, neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le, - div_pos_iff_of_pos_right, σ₂, c, c_εx, c_Tx] - - let εx := (fun x ↦ Real.exp (-c_εx * (Real.log x) ^ ((1 : ℝ) / 10))) - let Tx := (fun x ↦ Real.exp (c_Tx * (Real.log x) ^ ((1 : ℝ) / 10))) - - have Tx_to_inf : Tendsto Tx atTop atTop := by - unfold Tx - apply tendsto_exp_atTop.comp - apply Tendsto.pos_mul_atTop c_Tx_pos tendsto_const_nhds - exact (tendsto_rpow_atTop (by norm_num : 0 < (1 : ℝ) / 10)).comp Real.tendsto_log_atTop - - have ex_to_zero : Tendsto εx atTop (𝓝 0) := by - unfold εx - apply Real.tendsto_exp_atBot.comp - have this (x) : -c_εx * Real.log x ^ ((1 : ℝ) / 10) = -(c_εx * Real.log x ^ ((1 : ℝ) / 10)) := by - ring - simp_rw [this] - rw [tendsto_neg_atBot_iff] - apply Tendsto.const_mul_atTop c_εx_pos - apply (tendsto_rpow_atTop (by norm_num)).comp - exact tendsto_log_atTop - - have eventually_εx_lt_one : ∀ᶠ (x : ℝ) in atTop, εx x < 1 := by - apply (tendsto_order.mp ex_to_zero).2 - norm_num - - have eventually_2_lt : ∀ᶠ (x : ℝ) in atTop, 2 < x * εx x := by - have := x_ε_to_inf c_εx (by norm_num : (1 : ℝ) / 10 < 1) - exact this.eventually_gt_atTop 2 - - have eventually_T_gt_3 : ∀ᶠ (x : ℝ) in atTop, 3 < Tx x := by - exact Tx_to_inf.eventually_gt_atTop 3 - - have eventually_T_gt_Tlb₄ : ∀ᶠ (x : ℝ) in atTop, Tlb₄ < Tx x := by - exact Tx_to_inf.eventually_gt_atTop _ - have eventually_T_gt_Tlb₆ : ∀ᶠ (x : ℝ) in atTop, Tlb₆ < Tx x := by - exact Tx_to_inf.eventually_gt_atTop _ - - have eventually_σ₂_lt_σ₁ : ∀ᶠ (x : ℝ) in atTop, σ₂ < 1 - A / (Real.log (Tx x)) ^ 9 := by - apply (tendsto_order.mp ?_).1 - · exact σ₂_lt_one - have := tendsto_inv_atTop_zero.comp ((tendsto_rpow_atTop (by norm_num : (0 : ℝ) < 9)).comp - (tendsto_log_atTop.comp Tx_to_inf)) - have := Tendsto.const_mul (b := A) this - convert (tendsto_const_nhds (x := (1 : ℝ))).sub this using 2 - · simp only [rpow_ofNat, comp_apply, div_eq_mul_inv] - · simp - - have eventually_ε_lt_ε_main : ∀ᶠ (x : ℝ) in atTop, εx x < ε_main := by - apply (tendsto_order.mp ex_to_zero).2 - assumption - - have event_logX_ge : ∀ᶠ (x : ℝ) in atTop, 1 ≤ Real.log x := by - apply Real.tendsto_log_atTop.eventually_ge_atTop - - have event_1_aux_1 {const1 const2 : ℝ} (const1pos : 0 < const1) (const2pos : 0 < const2) : - ∀ᶠ (x : ℝ) in atTop, - rexp (-const1 * Real.log x ^ const2) * Real.log x ≤ - rexp 0 := by - have := ((isLittleO_log_rpow_atTop const2pos).bound const1pos) - have : ∀ᶠ (x : ℝ) in atTop, Real.log (Real.log x) ≤ - const1 * (Real.log x) ^ const2 := by - have := tendsto_log_atTop.eventually this - filter_upwards [this, eventually_gt_atTop 10] with x hx x_gt - convert hx using 1 - · rw [Real.norm_of_nonneg] - exact Real.log_nonneg (logt_gt_one (by linarith)).le - · congr! 1 - rw [Real.norm_of_nonneg] - apply Real.rpow_nonneg - apply Real.log_nonneg - linarith - have loglogx : ∀ᶠ (x : ℝ) in atTop, - Real.log x = rexp (Real.log (Real.log x)) := by - filter_upwards [eventually_gt_atTop 3] with x hx - rw [Real.exp_log] - apply Real.log_pos - linarith - filter_upwards [loglogx, this] with x loglogx hx - conv => - enter [1, 2] - rw [loglogx] - rw [← Real.exp_add] - apply Real.exp_monotone - grw [hx] - simp - - have event_1_aux {const1 const1' const2 : ℝ} (const1bnds : const1' < const1) - (const2pos : 0 < const2) : - ∀ᶠ (x : ℝ) in atTop, - rexp (-const1 * Real.log x ^ const2) * Real.log x ≤ - rexp (-const1' * Real.log x ^ const2) := by - have : 0 < const1 - const1' := by linarith - filter_upwards [event_1_aux_1 this const2pos] with x hx - have : rexp (-const1 * Real.log x ^ const2) * Real.log x - = rexp (-(const1') * Real.log x ^ const2) - * rexp (-(const1 - const1') * Real.log x ^ const2) * Real.log x := by - congr! 1 - rw [← Real.exp_add] - congr! 1 - ring - rw [this, - mul_assoc] - - grw [hx] - simp - - have event_1 : ∀ᶠ (x : ℝ) in atTop, C' * (εx x) * x * Real.log x ≤ - C' * x * rexp (-c * Real.log x ^ ((1 : ℝ) / 10)) := by - unfold c εx c_εx - have const1bnd : (A ^ ((1 : ℝ) / 10) / 4) < (A ^ ((1 : ℝ) / 10) / 2) := by - linarith - have const2bnd : (0 : ℝ) < 1 / 10 := by norm_num - have this (x) : - C' * rexp (-(A ^ ((1 : ℝ) / 10) / 2) * Real.log x ^ ((1 : ℝ) / 10)) * x * Real.log x = - C' * x * (rexp (-(A ^ ((1 : ℝ) / 10) / 2) * Real.log x ^ ((1 : ℝ) / 10)) * Real.log x) := by ring - simp_rw [this] - filter_upwards [event_1_aux const1bnd const2bnd, eventually_gt_atTop 3] with x x_bnd x_gt - grw [x_bnd] - - have event_2 : ∀ᶠ (x : ℝ) in atTop, C'' * x * Real.log x / (εx x * Tx x) ≤ - C'' * x * rexp (-c * Real.log x ^ ((1 : ℝ) / 10)) := by - unfold c εx c_εx Tx c_Tx - set const2 : ℝ := 1 / 10 - have const2bnd : 0 < const2 := by norm_num - set const1 := (A ^ const2 / 2) - set const1' := (A ^ const2 / 4) - have this (x) : -(-const1 * Real.log x ^ const2 + A ^ const2 * Real.log x ^ const2) = - -(A ^ const2 - const1) * Real.log x ^ const2 := by ring - simp_rw [← Real.exp_add, div_eq_mul_inv, ← Real.exp_neg, this] - have const1bnd : const1' < (A ^ const2 - const1) := by - unfold const1' const1 - linarith - filter_upwards [event_1_aux const1bnd const2bnd, eventually_gt_atTop 3] with x x_bnd x_gt - rw [mul_assoc] - conv => - enter [1, 2] - rw [mul_comm] - grw [x_bnd] - - have event_3_aux {const1 const1' const2 : ℝ} (const2_eq : const2 = 1 / 10) - (const1_eq : const1 = (A ^ const2 / 2)) (const1'_eq : const1' = (A ^ const2 / 4)) : - ∀ᶠ (x : ℝ) in atTop, - x ^ (-A / Real.log (rexp (A ^ const2 * Real.log x ^ const2)) ^ (9 : ℝ)) * - rexp (-(-const1 * Real.log x ^ const2)) ≤ - rexp (-const1' * Real.log x ^ const2) := by - have : ∀ᶠ (x : ℝ) in atTop, x = rexp (Real.log x) := by - filter_upwards [eventually_gt_atTop 0] with x hx - rw [Real.exp_log hx] - filter_upwards [this, eventually_gt_atTop 3] with x hx x_gt_3 - have logxpos : 0 < Real.log x := by apply Real.log_pos; linarith - conv => - enter [1, 1, 1] - rw [hx] - rw [← Real.exp_mul, - Real.log_exp] - - rw [Real.mul_rpow] - · have {y : ℝ} (ypos : 0 < y) : y / (y ^ const2) ^ (9 : ℝ) = y ^ const2 := by - rw [← Real.rpow_mul ypos.le, - div_eq_mul_inv] - - rw [← Real.rpow_neg ypos.le] - conv => - enter [1, 1] - rw [← Real.rpow_one y] - rw [← Real.rpow_add ypos, - (by linarith : 1 + -(const2 * 9) = const2)] - - rw [div_mul_eq_div_div, - neg_div] - - rw [this (A_in_Ioc.1)] - - rw [mul_div] - conv => - enter [1, 1, 1, 1] - rw [mul_comm] - rw [← mul_div] - - rw [this (y := Real.log x) logxpos] - - rw [← Real.exp_add] - apply Real.exp_monotone - - have : -A ^ const2 * Real.log x ^ const2 + -(-const1 * Real.log x ^ const2) - = (-(A ^ const2 - const1) * Real.log x ^ const2) := by ring - rw [this] - - gcongr - - rw [const1'_eq, const1_eq] - have : 0 ≤ A ^ const2 := by - apply Real.rpow_nonneg A_in_Ioc.1.le - linarith - · rw [const2_eq] - positivity - · apply Real.rpow_nonneg - apply Real.log_nonneg - linarith - - have event_3 : ∀ᶠ (x : ℝ) in atTop, C''' * x * x ^ (-A / Real.log (Tx x) ^ 9) / (εx x) ≤ - C''' * x * rexp (-c * Real.log x ^ ((1 : ℝ) / 10)) := by - unfold c Tx c_Tx εx c_εx - set const2 : ℝ := 1 / 10 - have const2eq : const2 = 1 / 10 := rfl - set const1 := (A ^ const2 / 2) - have const1eq : const1 = (A ^ const2 / 2) := rfl - set const1' := (A ^ const2 / 4) - have const1'eq : const1' = (A ^ const2 / 4) := rfl - - conv => - enter [1, x, 1] - rw [div_eq_mul_inv, ← Real.exp_neg] - - filter_upwards [event_3_aux const2eq const1eq const1'eq, - eventually_gt_atTop 3] with x x_bnd x_gt - - have this (x) : C''' * x * x ^ (-A / Real.log (rexp (A ^ const2 * Real.log x ^ const2)) ^ 9) - * rexp (-(-const1 * Real.log x ^ const2)) - = C''' * x * (x ^ (-A / Real.log (rexp (A ^ const2 * Real.log x ^ const2)) ^ (9 : ℝ)) - * rexp (-(-const1 * Real.log x ^ const2))) := by - norm_cast - ring - rw [this] - grw [x_bnd] - - have event_4_aux4 {pow2 : ℝ} (pow2_neg : pow2 < 0) {c : ℝ} (cpos : 0 < c) (c' : ℝ) : - Tendsto (fun x ↦ c' * Real.log x ^ pow2) atTop (𝓝 0) := by - rw [← mul_zero c'] - apply Tendsto.const_mul - have := tendsto_rpow_neg_atTop (y := -pow2) (by linarith) - rw [neg_neg] at this - apply this.comp - exact Real.tendsto_log_atTop - - have event_4_aux3 {pow2 : ℝ} (pow2_neg : pow2 < 0) {c : ℝ} (cpos : 0 < c) (c' : ℝ) : - ∀ᶠ (x : ℝ) in atTop, c' * (Real.log x) ^ pow2 < c := by - apply (event_4_aux4 pow2_neg cpos c').eventually_lt_const - exact cpos - - have event_4_aux2 {c1 : ℝ} (c1pos : 0 < c1) (c2 : ℝ) {pow1 : ℝ} (pow1_lt : pow1 < 1) : - ∀ᶠ (x : ℝ) in atTop, 0 ≤ Real.log x * (c1 - c2 * (Real.log x) ^ (pow1 - 1)) := by - filter_upwards [eventually_gt_atTop 3 , event_4_aux3 (by linarith : pow1 - 1 < 0) - (by linarith : 0 < c1 / 2) c2] with x x_gt hx - have : 0 ≤ Real.log x := by - apply Real.log_nonneg - linarith - apply mul_nonneg this - linarith - - have event_4_aux1 {const1 : ℝ} (const1_lt : const1 < 1) (const2 const3 : ℝ) - {pow1 : ℝ} (pow1_lt : pow1 < 1) : ∀ᶠ (x : ℝ) in atTop, - const1 * Real.log x + const2 * Real.log x ^ pow1 - ≤ Real.log x - const3 * Real.log x ^ pow1 := by - filter_upwards [event_4_aux2 (by linarith : 0 < 1 - const1) (const2 + const3) pow1_lt, - eventually_gt_atTop 3] with x hx x_gt - rw [← sub_nonneg] - have : - Real.log x - const3 * Real.log x ^ pow1 - (const1 * Real.log x + const2 * Real.log x ^ pow1) - = (1 - const1) * Real.log x - (const2 + const3) * Real.log x ^ pow1 := by ring - rw [this] - convert hx using 1 - ring_nf - congr! 1 - · have : Real.log x * const2 * Real.log x ^ (-1 + pow1) - = const2 * Real.log x ^ pow1 := by - rw [mul_assoc, mul_comm, mul_assoc] - congr! 1 - conv => - enter [1, 2] - rw [← Real.rpow_one (Real.log x)] - rw [← Real.rpow_add (Real.log_pos (by linarith))] - ring_nf - rw [this] - have : Real.log x * const3 * Real.log x ^ (-1 + pow1) - = const3 * Real.log x ^ pow1 := by - rw [mul_assoc, mul_comm, mul_assoc] - congr! 1 - conv => - enter [1, 2] - rw [← Real.rpow_one (Real.log x)] - rw [← Real.rpow_add (Real.log_pos (by linarith))] - ring_nf - rw [this] - - have event_4_aux : ∀ᶠ (x : ℝ) in atTop, - c₅ * rexp (σ₂ * Real.log x + (A ^ ((1 : ℝ) / 10) / 2) * Real.log x ^ ((1 : ℝ) / 10)) ≤ - c₅ * rexp (Real.log x - (A ^ ((1 : ℝ) / 10) / 4) * Real.log x ^ ((1 : ℝ) / 10)) := by - filter_upwards [eventually_gt_atTop 3, event_4_aux1 σ₂_lt_one (A ^ ((1 : ℝ) / 10) / 2) - (A ^ ((1 : ℝ) / 10) / 4) (by norm_num : (1 : ℝ) / 10 < 1)] with x x_gt hx - rw [mul_le_mul_iff_right₀ c₅pos] - apply Real.exp_monotone - convert hx - - have event_4 : ∀ᶠ (x : ℝ) in atTop, c₅ * x ^ σ₂ / (εx x) ≤ - c₅ * x * rexp (-c * Real.log x ^ ((1 : ℝ) / 10)) := by - unfold εx c_εx c - filter_upwards [event_4_aux, eventually_gt_atTop 0] with x hx xpos - convert hx using 1 - · rw [← mul_div] - congr! 1 - rw [div_eq_mul_inv, ← Real.exp_neg] - conv => - enter [1, 1, 1] - rw [← Real.exp_log xpos] - rw [← exp_mul, ← Real.exp_add] - ring_nf - - · rw [mul_assoc] - congr! 1 - conv => - enter [1, 1] - rw [← Real.exp_log xpos] - rw [← Real.exp_add] - ring_nf - - filter_upwards [eventually_gt_atTop 3, eventually_εx_lt_one, eventually_2_lt, - eventually_T_gt_3, eventually_T_gt_Tlb₄, eventually_T_gt_Tlb₆, - eventually_σ₂_lt_σ₁, eventually_ε_lt_ε_main, event_logX_ge, event_1, event_2, - event_3, event_4] with X X_gt_3 ε_lt_one ε_X T_gt_3 T_gt_Tlb₄ T_gt_Tlb₆ - σ₂_lt_σ₁ ε_lt_ε_main logX_ge event_1 event_2 event_3 event_4 - - clear eventually_εx_lt_one eventually_2_lt eventually_T_gt_3 eventually_T_gt_Tlb₄ - eventually_T_gt_Tlb₆ eventually_σ₂_lt_σ₁ eventually_ε_lt_ε_main event_logX_ge zeta_bnd - - let ε : ℝ := εx X - have ε_pos : 0 < ε := by positivity - specialize h_close X X_gt_3 ε ε_pos ε_lt_one ε_X - let ψ_ε_of_X := SmoothedChebyshev ν ε X - - let T : ℝ := Tx X - specialize holo1 T T_gt_3.le - let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9 - have σ₁pos : 0 < σ₁ := by calc - 1 - A / (Real.log T)^9 >= 1 - (1/2) / 1 ^ 9:= by - gcongr - · exact A_in_Ioc.2 - · exact (logt_gt_one T_gt_3.le).le - _ > 0 := by norm_num - have σ₁_lt_one : σ₁ < 1 := by - apply sub_lt_self - apply div_pos A_in_Ioc.1 - bound - - rw [uIcc_of_le (by linarith), uIcc_of_le (by linarith)] at holo2 - - have holo2a : HolomorphicOn (SmoothedChebyshevIntegrand ν ε X) - (Icc σ₂ 2 ×ℂ Icc (-3) 3 \ {1}) := by - apply DifferentiableOn.mul - · apply DifferentiableOn.mul - · rw [(by ext; ring : (fun s ↦ -ζ' s / ζ s) = (fun s ↦ -(ζ' s / ζ s)))] - apply DifferentiableOn.neg holo2 - · intro s hs - apply DifferentiableAt.differentiableWithinAt - apply Smooth1MellinDifferentiable ContDiff1ν ν_supp ⟨ε_pos, ε_lt_one⟩ ν_nonneg ν_massOne - linarith[mem_reProdIm.mp hs.1 |>.1.1] - · intro s hs - apply DifferentiableAt.differentiableWithinAt - apply DifferentiableAt.const_cpow (by fun_prop) - left - norm_cast - linarith - have ψ_ε_diff : ‖ψ_ε_of_X - 𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X‖ ≤ ‖I₁ ν ε X T‖ + ‖I₂ ν ε T X σ₁‖ - + ‖I₃ ν ε T X σ₁‖ + ‖I₄ ν ε X σ₁ σ₂‖ + ‖I₅ ν ε X σ₂‖ + ‖I₆ ν ε X σ₁ σ₂‖ + ‖I₇ ν ε T X σ₁‖ - + ‖I₈ ν ε T X σ₁‖ + ‖I₉ ν ε X T‖ := by - unfold ψ_ε_of_X - rw [SmoothedChebyshevPull1 ε_pos ε_lt_one X X_gt_3 (T := T) (by linarith) - σ₁pos σ₁_lt_one holo1 ν_supp ν_nonneg ν_massOne ContDiff1ν] - rw [SmoothedChebyshevPull2 ε_pos ε_lt_one X X_gt_3 (T := T) (by linarith) - σ₂_pos σ₁_lt_one σ₂_lt_σ₁ holo1 holo2a ν_supp ν_nonneg ν_massOne ContDiff1ν] - ring_nf - iterate 5 - apply le_trans (by apply norm_add_le) - gcongr - rw [(by ring : I₁ ν ε X T - I₂ ν ε T X σ₁ + I₃ ν ε T X σ₁ - I₄ ν ε X σ₁ σ₂ = (I₁ ν ε X T - I₂ ν ε T X σ₁) + (I₃ ν ε T X σ₁ - I₄ ν ε X σ₁ σ₂))] - apply le_trans (by apply norm_add_le) - rw [(by ring : ‖I₁ ν ε X T‖ + ‖I₂ ν ε T X σ₁‖ + ‖I₃ ν ε T X σ₁‖ + ‖I₄ ν ε X σ₁ σ₂‖ = - (‖I₁ ν ε X T‖ + ‖I₂ ν ε T X σ₁‖) + (‖I₃ ν ε T X σ₁‖ + ‖I₄ ν ε X σ₁ σ₂‖))] - gcongr <;> apply le_trans (by apply norm_sub_le) <;> rfl - specialize h_main ε ⟨ε_pos, ε_lt_ε_main⟩ - have main : ‖𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X - X‖ ≤ C_main * ε * X := by - nth_rewrite 2 [← one_mul X] - push_cast - rw [← sub_mul, norm_mul] - gcongr - rw [norm_real, norm_of_nonneg (by linarith)] - specialize hc₁ ε ε_pos ε_lt_one X X_gt_3 T_gt_3 - specialize hc₂ X X_gt_3 ε_pos ε_lt_one T_gt_3 - specialize hc₃ X X_gt_3 ε_pos ε_lt_one T_gt_3 - specialize hc₅ X X_gt_3 ε_pos ε_lt_one - specialize hc₇ X X_gt_3 ε_pos ε_lt_one T_gt_3 - specialize hc₈ X X_gt_3 ε_pos ε_lt_one T_gt_3 - specialize hc₉ ε_pos ε_lt_one X X_gt_3 T_gt_3 - specialize hc₄ X X_gt_3 ε_pos ε_lt_one T_gt_Tlb₄ - specialize hc₆ X X_gt_3 ε_pos ε_lt_one T_gt_Tlb₆ - - clear ν_nonneg ν_massOne ContDiff1ν ν_supp holo2 - - have C'bnd : c_close * ε * X * Real.log X + C_main * ε * X ≤ C' * ε * X * Real.log X := by - have : C_main * ε * X * 1 ≤ C_main * ε * X * Real.log X := by - gcongr - linarith - - have C''bnd : c₁ * X * Real.log X / (ε * T) + c₂ * X / (ε * T) + c₈ * X / (ε * T) - + c₉ * X * Real.log X / (ε * T) ≤ C'' * X * Real.log X / (ε * T) := by - unfold C'' - rw [(by ring : (c₁ + c₂ + c₈ + c₉) * X * Real.log X / (ε * T) - = c₁ * X * Real.log X / (ε * T) + c₂ * X * Real.log X / (ε * T) - + c₈ * X * Real.log X / (ε * T) + c₉ * X * Real.log X / (ε * T))] - have : c₂ * X / (ε * T) * 1 ≤ c₂ * X / (ε * T) * Real.log X := by - gcongr - have : c₂ * X / (ε * T) ≤ c₂ * X * Real.log X / (ε * T) := by - ring_nf at this ⊢ - linarith - grw [this] - have : c₈ * X / (ε * T) * 1 ≤ c₈ * X / (ε * T) * Real.log X := by - gcongr - have : c₈ * X / (ε * T) ≤ c₈ * X * Real.log X / (ε * T) := by - ring_nf at this ⊢ - linarith - grw [this] - - have C'''bnd : c₃ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₄ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₆ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₇ * X * X ^ (-A / Real.log T ^ 9) / ε - ≤ C''' * X * X ^ (-A / Real.log T ^ 9) / ε := by - apply le_of_eq - ring - - calc - _ = ‖(ψ X - ψ_ε_of_X) + (ψ_ε_of_X - X)‖ := by ring_nf; norm_cast - _ ≤ ‖ψ X - ψ_ε_of_X‖ + ‖ψ_ε_of_X - X‖ := norm_add_le _ _ - _ = ‖ψ X - ψ_ε_of_X‖ + ‖(ψ_ε_of_X - 𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X) - + (𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X - X)‖ := by ring_nf - _ ≤ ‖ψ X - ψ_ε_of_X‖ + ‖ψ_ε_of_X - 𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X‖ - + ‖𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X - X‖ := by - rw [add_assoc] - gcongr - apply norm_add_le - _ = ‖ψ X - ψ_ε_of_X‖ + ‖𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X - X‖ - + ‖ψ_ε_of_X - 𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X‖ := by ring - _ ≤ ‖ψ X - ψ_ε_of_X‖ + ‖𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 * X - X‖ - + (‖I₁ ν ε X T‖ + ‖I₂ ν ε T X σ₁‖ + ‖I₃ ν ε T X σ₁‖ + ‖I₄ ν ε X σ₁ σ₂‖ - + ‖I₅ ν ε X σ₂‖ + ‖I₆ ν ε X σ₁ σ₂‖ + ‖I₇ ν ε T X σ₁‖ + ‖I₈ ν ε T X σ₁‖ - + ‖I₉ ν ε X T‖) := by gcongr - _ ≤ c_close * ε * X * Real.log X + C_main * ε * X - + (c₁ * X * Real.log X / (ε * T) + c₂ * X / (ε * T) - + c₃ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₄ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₅ * X ^ σ₂ / ε - + c₆ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₇ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₈ * X / (ε * T) - + c₉ * X * Real.log X / (ε * T)) := by - gcongr - convert! h_close using 1 - rw [← norm_neg] - congr - ring - _ = (c_close * ε * X * Real.log X + C_main * ε * X) - + ((c₁ * X * Real.log X / (ε * T) + c₂ * X / (ε * T) - + c₈ * X / (ε * T) - + c₉ * X * Real.log X / (ε * T)) - + (c₃ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₄ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₆ * X * X ^ (-A / Real.log T ^ 9) / ε - + c₇ * X * X ^ (-A / Real.log T ^ 9) / ε) - + c₅ * X ^ σ₂ / ε - ) := by ring - _ ≤ C' * ε * X * Real.log X - + (C'' * X * Real.log X / (ε * T) - + C''' * X * X ^ (-A / Real.log T ^ 9) / ε - + c₅ * X ^ σ₂ / ε - ) := by - gcongr - _ = C' * ε * X * Real.log X - + C'' * X * Real.log X / (ε * T) - + C''' * X * X ^ (-A / Real.log T ^ 9) / ε - + c₅ * X ^ σ₂ / ε - := by ring - _ ≤ C' * X * rexp (-c * Real.log X ^ ((1 : ℝ) / 10)) - + C'' * X * rexp (-c * Real.log X ^ ((1 : ℝ) / 10)) - + C''' * X * rexp (-c * Real.log X ^ ((1 : ℝ) / 10)) - + c₅ * X * rexp (-c * Real.log X ^ ((1 : ℝ) / 10)) - := by - gcongr - _ = C * X * rexp (-c * Real.log X ^ ((1 : ℝ) / 10)) - := by ring - _ = _ := by - rw [Real.norm_of_nonneg] - · rw [← mul_assoc] - · positivity - -#print axioms MediumPNT diff --git a/zeta23/Zeta23/FromPNTPlus/MellinCalculus.lean b/zeta23/Zeta23/FromPNTPlus/MellinCalculus.lean deleted file mode 100644 index 777619836d..0000000000 --- a/zeta23/Zeta23/FromPNTPlus/MellinCalculus.lean +++ /dev/null @@ -1,1048 +0,0 @@ -/- -Ported from https://github.com/AlexKontorovich/PrimeNumberTheoremAnd -at commit 6a380f0c4658c04a420a9eb00b1ed62a1e3fde01 (tag v4.32.2), file -PrimeNumberTheoremAnd/MellinCalculus.lean. -Copyright the PrimeNumberTheoremAnd contributors; Apache License 2.0 -(http://www.apache.org/licenses/LICENSE-2.0). -Local modifications: removed the Architect blueprint tooling (import Architect, -blueprint_comment blocks, @[blueprint ...] attributes) and redirected the intra-project -import to Zeta23.FromPNTPlus.Auxiliary. -Re-ported from the -v4.29.0 port (commit 10e1218932db7e2432aa5881d750acb819e91f19) when the project -moved to Lean v4.32.2 / Mathlib 905b95818eb32af7874a58b427f50c1711a5e96c. -Modified 2026 by Anthropic PBC. --/ -import Batteries.Tactic.Lemma -import Mathlib.Algebra.GroupWithZero.Units.Basic -import Mathlib.Analysis.MellinTransform -import Mathlib.MeasureTheory.Integral.IntegrableOn -import Mathlib.Tactic.Bound -import Mathlib.Tactic.GCongr -import Zeta23.FromPNTPlus.Auxiliary - -open scoped ContDiff - -set_option lang.lemmaCmd true - --- TODO: move near `MeasureTheory.setIntegral_prod` -theorem MeasureTheory.setIntegral_integral_swap {α : Type*} {β : Type*} {E : Type*} - [MeasurableSpace α] [MeasurableSpace β] {μ : MeasureTheory.Measure α} - {ν : MeasureTheory.Measure β} [NormedAddCommGroup E] - [MeasureTheory.SigmaFinite ν] [NormedSpace ℝ E] [MeasureTheory.SigmaFinite μ] - (f : α → β → E) {s : Set α} {t : Set β} - (hf : IntegrableOn (f.uncurry) (s ×ˢ t) (μ.prod ν)) : - (∫ (x : α) in s, ∫ (y : β) in t, f x y ∂ν ∂μ) - = ∫ (y : β) in t, ∫ (x : α) in s, f x y ∂μ ∂ν := by - apply integral_integral_swap - convert hf.integrable - exact Measure.prod_restrict s t - --- How to deal with this coercion?... Ans: (f ·) ---- noncomputable def funCoe (f : ℝ → ℝ) : ℝ → ℂ := fun x ↦ f x - -open Complex Topology Filter Real MeasureTheory Set - -variable {𝕂 : Type*} [RCLike 𝕂] - -lemma MeasureTheory.integral_comp_mul_right_I0i_haar - (f : ℝ → 𝕂) {a : ℝ} (ha : 0 < a) : - ∫ (y : ℝ) in Ioi 0, f (y * a) / y = ∫ (y : ℝ) in Ioi 0, f y / y := by - have := integral_comp_mul_right_Ioi (fun y ↦ f y / y) 0 ha - simp only [RCLike.ofReal_mul, zero_mul, eq_inv_smul_iff₀ (ne_of_gt ha)] at this - rw [← integral_smul] at this - rw [← this, setIntegral_congr_fun (by simp)] - intro _ _ - simp only [RCLike.real_smul_eq_coe_mul] - rw [mul_comm (a : 𝕂), div_mul, mul_div_assoc, div_self ?_, mul_one] - exact (RCLike.ofReal_ne_zero).mpr <| ne_of_gt ha - -lemma MeasureTheory.integral_comp_mul_right_I0i_haar_real - (f : ℝ → ℝ) {a : ℝ} (ha : 0 < a) : - ∫ (y : ℝ) in Ioi 0, f (y * a) / y = ∫ (y : ℝ) in Ioi 0, f y / y := - MeasureTheory.integral_comp_mul_right_I0i_haar f ha - -lemma MeasureTheory.integral_comp_mul_left_I0i_haar - (f : ℝ → 𝕂) {a : ℝ} (ha : 0 < a) : - ∫ (y : ℝ) in Ioi 0, f (a * y) / y = ∫ (y : ℝ) in Ioi 0, f y / y := by - convert integral_comp_mul_right_I0i_haar f ha using 5; ring - --- TODO: generalize to `RCLike` -lemma MeasureTheory.integral_comp_rpow_I0i_haar_real (f : ℝ → ℝ) {p : ℝ} (hp : p ≠ 0) : - ∫ (y : ℝ) in Ioi 0, |p| * f (y ^ p) / y = ∫ (y : ℝ) in Ioi 0, f y / y := by - rw [← integral_comp_rpow_Ioi (fun y ↦ f y / y) hp, setIntegral_congr_fun (by simp)] - intro y hy - have ypos : 0 < y := mem_Ioi.mp hy - simp only [rpow_sub_one ypos.ne', smul_eq_mul] - field_simp - -lemma MeasureTheory.integral_comp_inv_I0i_haar (f : ℝ → 𝕂) : - ∫ (y : ℝ) in Ioi 0, f (1 / y) / y = ∫ (y : ℝ) in Ioi 0, f y / y := by - have := integral_comp_rpow_Ioi (fun y ↦ f y / y) (p := -1) (by simp) - rw [← this, setIntegral_congr_fun (by simp)] - intro y hy - have : (y : 𝕂) ≠ 0 := (RCLike.ofReal_ne_zero).mpr <| LT.lt.ne' hy - simp only [abs_neg, abs_one, rpow_neg_one, map_inv₀, div_inv_eq_mul, - RCLike.real_smul_eq_coe_mul, RCLike.algebraMap_eq_ofReal] - ring_nf - simp [field] - -lemma MeasureTheory.integral_comp_div_I0i_haar - (f : ℝ → 𝕂) {a : ℝ} (ha : 0 < a) : - ∫ (y : ℝ) in Ioi 0, f (a / y) / y = ∫ (y : ℝ) in Ioi 0, f y / y := by - calc - _ = ∫ (y : ℝ) in Ioi 0, f (a * y) / y := ?_ - _ = _ := integral_comp_mul_left_I0i_haar f ha - convert (integral_comp_inv_I0i_haar fun y ↦ f (a * (1 / y))).symm using 4 - · rw [mul_one_div] - · rw [one_div_one_div] - -theorem Complex.ofReal_rpow {x : ℝ} (h : x > 0) (y : ℝ) : - (((x : ℝ) ^ (y : ℝ)) : ℝ) = (x : ℂ) ^ (y : ℂ) := by - rw [rpow_def_of_pos h, ofReal_exp, ofReal_mul, Complex.ofReal_log h.le, - Complex.cpow_def_of_ne_zero] - simp only [ne_eq, ofReal_eq_zero, ne_of_gt h, not_false_eq_true] - -@[simp] -lemma Function.support_abs {α : Type*} (f : α → 𝕂) : - (fun x ↦ ‖f x‖).support = f.support := by - simp only [support, ne_eq]; simp_rw [norm_ne_zero_iff] - -@[simp] -lemma Function.support_ofReal {f : ℝ → ℝ} : - (fun x ↦ ((f x) : ℂ)).support = f.support := by - apply Function.support_comp_eq (g := ofReal); simp - -lemma Function.support_mul_subset_of_subset {s : Set ℝ} {f g : ℝ → 𝕂} - (fSupp : f.support ⊆ s) : (f * g).support ⊆ s := by - simp_rw [support_mul', inter_subset, subset_union_of_subset_right fSupp] - -lemma Function.support_of_along_fiber_subset_subset {α β M : Type*} [Zero M] - {f : α × β → M} {s : Set α} {t : Set β} - (hx : ∀ (y : β), (fun x ↦ f (x, y)).support ⊆ s) - (hy : ∀ (x : α), (fun y ↦ f (x, y)).support ⊆ t) : - f.support ⊆ s ×ˢ t := by - intro ⟨x, y⟩ hxy - constructor - · exact hx y (by simp only [Function.mem_support, ne_eq] at hxy ⊢; exact hxy) - · exact hy x (by simp only [Function.mem_support, ne_eq] at hxy ⊢; exact hxy) - -lemma Function.support_deriv_subset_Icc {a b : ℝ} {f : ℝ → 𝕂} - (fSupp : f.support ⊆ Set.Icc a b) : - (deriv f).support ⊆ Set.Icc a b := by - have := support_deriv_subset (f := fun x ↦ f x) - dsimp [tsupport] at this - have := subset_trans this <| closure_mono fSupp - rwa [closure_Icc] at this - -lemma IntervalIntegral.integral_eq_integral_of_support_subset_Icc {a b : ℝ} {μ : Measure ℝ} - [NullSingletonClass μ] {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] - {f : ℝ → E} (h : f.support ⊆ Icc a b) : - ∫ x in a..b, f x ∂μ = ∫ x, f x ∂μ := by - rcases le_total a b with hab | hab - · rw [intervalIntegral.integral_of_le hab, ← integral_Icc_eq_integral_Ioc, - ← integral_indicator measurableSet_Icc, indicator_eq_self.2 h] - · by_cases hab2 : b = a - · rw [hab2] at h ⊢ - simp only [intervalIntegral.integral_same] - simp only [Icc_self] at h - have : ∫ (x : ℝ), f x ∂μ = ∫ (x : ℝ) in {a}, f x ∂μ := by - rw [ ← integral_indicator (by simp), indicator_eq_self.2 h] - rw [this, integral_singleton]; simp [Measure.real] - · rw [Icc_eq_empty_iff.mpr <| by exact fun x ↦ hab2 <| le_antisymm hab x, subset_empty_iff, - Function.support_eq_empty_iff] at h; simp [h] - -lemma SetIntegral.integral_eq_integral_inter_of_support_subset {μ : Measure ℝ} - {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] - {s t : Set ℝ} {f : ℝ → E} (h : f.support ⊆ t) (ht : MeasurableSet t) : - ∫ x in s, f x ∂μ = ∫ x in s ∩ t, f x ∂μ := by - rw [← setIntegral_indicator ht, indicator_eq_self.2 h] - -lemma SetIntegral.integral_eq_integral_inter_of_support_subset_Icc {a b} {μ : Measure ℝ} - {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] - {s : Set ℝ} {f : ℝ → E} (h : f.support ⊆ Icc a b) (hs : Icc a b ⊆ s) : - ∫ x in s, f x ∂μ = ∫ x in Icc a b, f x ∂μ := by - rw [SetIntegral.integral_eq_integral_inter_of_support_subset h measurableSet_Icc, - inter_eq_self_of_subset_right hs] - -lemma intervalIntegral.norm_integral_le_of_norm_le_const' {a b C : ℝ} - {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] - {f : ℝ → E} (hab : a ≤ b) (h : ∀ x ∈ (Icc a b), ‖f x‖ ≤ C) : - ‖∫ x in a..b, f x‖ ≤ C * |b - a| := by - apply intervalIntegral.norm_integral_le_of_norm_le_const - exact fun x hx ↦ h x <| mem_Icc_of_Ioc <| uIoc_of_le hab ▸ hx - -lemma Filter.TendstoAtZero_of_support_in_Icc {a b : ℝ} (f : ℝ → 𝕂) (ha : 0 < a) - (fSupp : f.support ⊆ Set.Icc a b) : - Tendsto f (𝓝[>]0) (𝓝 0) := by - apply Tendsto.comp (tendsto_nhds_of_eventually_eq ?_) tendsto_id - filter_upwards [Ioo_mem_nhdsGT ha] with c hc; replace hc := (mem_Ioo.mp hc).2 - have h : c ∉ Icc a b := fun h ↦ by linarith [mem_Icc.mp h] - convert mt (Function.support_subset_iff.mp fSupp c) h; simp - -lemma Filter.TendstoAtTop_of_support_in_Icc {a b : ℝ} (f : ℝ → 𝕂) - (fSupp : f.support ⊆ Set.Icc a b) : - Tendsto f atTop (𝓝 0) := by - apply Tendsto.comp (tendsto_nhds_of_eventually_eq ?_) tendsto_id - filter_upwards [Ioi_mem_atTop b] with c hc; rw [mem_Ioi] at hc - have h : c ∉ Icc a b := fun h ↦ by linarith [mem_Icc.mp h] - convert mt (Function.support_subset_iff.mp fSupp c) h; simp - -lemma Filter.BigO_zero_atZero_of_support_in_Icc {a b : ℝ} (f : ℝ → 𝕂) (ha : 0 < a) - (fSupp : f.support ⊆ Set.Icc a b) : - f =O[𝓝[>] 0] fun _ ↦ (0 : ℝ) := by - refine Eventually.isBigO ?_ - filter_upwards [Ioo_mem_nhdsGT (by linarith : (0 : ℝ) < a)] with c hc - refine norm_le_zero_iff.mpr <| Function.support_subset_iff'.mp fSupp c ?_ - exact fun h ↦ by linarith [mem_Icc.mp h, (mem_Ioo.mp hc).2] - -lemma Filter.BigO_zero_atTop_of_support_in_Icc {a b : ℝ} (f : ℝ → 𝕂) - (fSupp : f.support ⊆ Set.Icc a b) : - f =O[atTop] fun _ ↦ (0 : ℝ) := by - refine Eventually.isBigO ?_ - filter_upwards [Ioi_mem_atTop b] with c hc; replace hc := mem_Ioi.mp hc - refine norm_le_zero_iff.mpr <| Function.support_subset_iff'.mp fSupp c ?_ - exact fun h ↦ by linarith [mem_Icc.mp h] - -lemma deriv.ofReal_comp' {f : ℝ → ℝ} : - deriv (fun x : ℝ ↦ (f x : ℂ)) = (fun x ↦ ((deriv f) x : ℂ)) := - funext fun _ ↦ deriv.ofReal_comp - -lemma deriv.comp_ofReal' {e : ℂ → ℂ} (hf : Differentiable ℂ e) : - deriv (fun x : ℝ ↦ e x) = fun (x : ℝ) ↦ deriv e x := - funext fun _ ↦ deriv.comp_ofReal (hf.differentiableAt) - -/-- *Need differentiability, and decay at `0` and `∞`* -/ -lemma PartialIntegration (f g : ℝ → ℂ) - (fDiff : DifferentiableOn ℝ f (Ioi 0)) - (gDiff : DifferentiableOn ℝ g (Ioi 0)) - (fDerivgInt : IntegrableOn (f * deriv g) (Ioi 0)) - (gDerivfInt : IntegrableOn (deriv f * g) (Ioi 0)) - (lim_at_zero : Tendsto (f * g) (𝓝[>] 0) (𝓝 0)) - (lim_at_inf : Tendsto (f * g) atTop (𝓝 0)) : - ∫ x in Ioi 0, f x * deriv g x = -∫ x in Ioi 0, deriv f x * g x := by - simpa using integral_Ioi_mul_deriv_eq_deriv_mul - (fun x hx ↦ fDiff.hasDerivAt (Ioi_mem_nhds hx)) - (fun x hx ↦ gDiff.hasDerivAt (Ioi_mem_nhds hx)) - fDerivgInt gDerivfInt lim_at_zero lim_at_inf - -lemma PartialIntegration_of_support_in_Icc {a b : ℝ} (f g : ℝ → ℂ) (ha : 0 < a) - (h : a ≤ b) - (fSupp : f.support ⊆ Set.Icc a b) - (fDiff : DifferentiableOn ℝ f (Ioi 0)) - (gDiff : DifferentiableOn ℝ g (Ioi 0)) - (fderivCont : ContinuousOn (deriv f) (Ioi 0)) - (gderivCont : ContinuousOn (deriv g) (Ioi 0)) : - ∫ x in Ioi 0, f x * deriv g x = -∫ x in Ioi 0, deriv f x * g x := by - have Icc_sub : Icc a b ⊆ Ioi 0 := (Icc_subset_Ioi_iff h).mpr ha - have fderivSupp := Function.support_deriv_subset_Icc fSupp - have fgSupp : (f * g).support ⊆ Icc a b := Function.support_mul_subset_of_subset fSupp - have fDerivgInt : IntegrableOn (f * deriv g) (Ioi 0) := by - apply (integrableOn_iff_integrable_of_support_subset <| - Function.support_mul_subset_of_subset fSupp).mp - exact fDiff.continuousOn.mono Icc_sub |>.mul (gderivCont.mono Icc_sub) |>.integrableOn_Icc - have gDerivfInt : IntegrableOn (deriv f * g) (Ioi 0) := by - apply (integrableOn_iff_integrable_of_support_subset <| - Function.support_mul_subset_of_subset fderivSupp).mp - exact fderivCont.mono Icc_sub |>.mul (gDiff.continuousOn.mono Icc_sub) |>.integrableOn_Icc - have lim_at_zero : Tendsto (f * g) (𝓝[>]0) (𝓝 0) := - TendstoAtZero_of_support_in_Icc (f * g) ha fgSupp - have lim_at_inf : Tendsto (f * g) atTop (𝓝 0) := TendstoAtTop_of_support_in_Icc (f * g) fgSupp - apply PartialIntegration f g fDiff gDiff fDerivgInt gDerivfInt lim_at_zero lim_at_inf - -local notation (name := mellintransform) "𝓜" => mellin - -noncomputable def MellinConvolution (f g : ℝ → 𝕂) (x : ℝ) : 𝕂 := - ∫ y in Ioi 0, f y * g (x / y) / y - -lemma MellinConvolutionSymmetric (f g : ℝ → 𝕂) {x : ℝ} (xpos : 0 < x) : - MellinConvolution f g x = MellinConvolution g f x := by - unfold MellinConvolution - calc - _ = ∫ y in Ioi 0, f (y * x) * g (1 / y) / y := ?_ - _ = _ := ?_ - · rw [← integral_comp_mul_right_I0i_haar (fun y ↦ f y * g (x / y)) xpos] - simp [div_mul_cancel_right₀ <| ne_of_gt xpos] - · convert (integral_comp_inv_I0i_haar fun y ↦ f (y * x) * g (1 / y)).symm using 3 - rw [one_div_one_div, mul_comm, mul_comm_div, one_mul] - -open Pointwise in -lemma support_MellinConvolution_subsets {f g : ℝ → 𝕂} {A B : Set ℝ} (hf : f.support ⊆ A) - (hg : g.support ⊆ B) : (MellinConvolution f g).support ⊆ A * B := by - rw [Function.support_subset_iff'] at hf hg ⊢ - intro x hx - unfold MellinConvolution - simp only [Set.mem_mul, not_exists, not_and] at hx - apply MeasureTheory.integral_eq_zero_of_ae - filter_upwards [ae_restrict_mem (by measurability)] - intro y hy - simp only [mem_Ioi] at hy - simp only [Pi.zero_apply, div_eq_zero_iff, mul_eq_zero, map_eq_zero] - left - by_cases hyA : y ∈ A - · right - apply hg - intro hxyB - apply hx _ hyA _ hxyB - field_simp - · left - apply hf _ hyA - -open Pointwise in -lemma support_MellinConvolution (f g : ℝ → 𝕂) : - (MellinConvolution f g).support ⊆ f.support * g.support := - support_MellinConvolution_subsets subset_rfl subset_rfl - -set_option backward.isDefEq.respectTransparency false in -lemma MellinConvolutionTransform (f g : ℝ → ℂ) (s : ℂ) - (hf : IntegrableOn (fun x y ↦ f y * g (x / y) / (y : ℂ) * (x : ℂ) ^ (s - 1)).uncurry - (Ioi 0 ×ˢ Ioi 0)) : - 𝓜 (MellinConvolution f g) s = 𝓜 f s * 𝓜 g s := by - dsimp [mellin, MellinConvolution] - set f₁ : ℝ × ℝ → ℂ := - fun ⟨x, y⟩ ↦ f y * g (x / y) / (y : ℂ) * (x : ℂ) ^ (s - 1) - calc - _ = ∫ (x : ℝ) in Ioi 0, ∫ (y : ℝ) in Ioi 0, f₁ (x, y) := ?_ - _ = ∫ (y : ℝ) in Ioi 0, ∫ (x : ℝ) in Ioi 0, f₁ (x, y) := - setIntegral_integral_swap _ hf - _ = ∫ (y : ℝ) in Ioi 0, ∫ (x : ℝ) in Ioi 0, - f y * g (x / y) / ↑y * ↑x ^ (s - 1) := rfl - _ = ∫ (y : ℝ) in Ioi 0, ∫ (x : ℝ) in Ioi 0, - f y * g (x * y / y) / ↑y * ↑(x * y) ^ (s - 1) * y := ?_ - _ = ∫ (y : ℝ) in Ioi 0, ∫ (x : ℝ) in Ioi 0, - f y * ↑y ^ (s - 1) * (g x * ↑x ^ (s - 1)) := ?_ - _ = ∫ (y : ℝ) in Ioi 0, - f y * ↑y ^ (s - 1) * ∫ (x : ℝ) in Ioi 0, g x * ↑x ^ (s - 1) := ?_ - _ = _ := integral_mul_const _ _ - <;> try (rw [setIntegral_congr_fun (by simp)]; intro y hy; simp only [ofReal_mul]) - · simp only [integral_mul_const, f₁, mul_comm] - · simp only [integral_mul_const] - have := integral_comp_mul_right_Ioi - (fun x ↦ f y * g (x / y) / (y : ℂ) * (x : ℂ) ^ (s - 1)) 0 hy - have y_ne_zeroℂ : (y : ℂ) ≠ 0 := slitPlane_ne_zero (Or.inl hy) - field_simp at this ⊢ - simp only [ofReal_mul, one_div, mul_zero, real_smul, ofReal_inv, field] at this ⊢ - rw [← this] - field_simp - congr with x - ring_nf - · rw [setIntegral_congr_fun (by simp)] - intro x hx - have y_ne_zeroℝ : y ≠ 0 := ne_of_gt (mem_Ioi.mp hy) - have y_ne_zeroℂ : (y : ℂ) ≠ 0 := by exact_mod_cast y_ne_zeroℝ - field_simp - rw [mul_cpow_ofReal_nonneg hy.le hx.le] - ring - · apply integral_const_mul - · congr <;> ext <;> ring - -lemma mem_within_strip (σ₁ σ₂ : ℝ) : - {s : ℂ | σ₁ ≤ s.re ∧ s.re ≤ σ₂} ∈ - 𝓟 {s | σ₁ ≤ s.re ∧ s.re ≤ σ₂} := - mem_principal_self _ - -set_option backward.isDefEq.respectTransparency false in -lemma MellinOfPsi_aux {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν) - (suppν : ν.support ⊆ Set.Icc (1 / 2) 2) - {s : ℂ} (hs : s ≠ 0) : - ∫ (x : ℝ) in Ioi 0, (ν x) * (x : ℂ) ^ (s - 1) = - - (1 / s) * ∫ (x : ℝ) in Ioi 0, (deriv ν x) * (x : ℂ) ^ s := by - let g (s : ℂ) := fun (x : ℝ) ↦ x ^ s / s - have gderiv {s : ℂ} (hs : s ≠ 0) {x: ℝ} (hx : x ∈ Ioi 0) : - deriv (g s) x = x ^ (s - 1) := by - have := HasDerivAt.cpow_const (c := s) (hasDerivAt_id (x : ℂ)) (Or.inl hx) - simp_rw [mul_one, id_eq] at this - rw [deriv_div_const, deriv.comp_ofReal (e := fun x ↦ x ^ s)] - · rw [this.deriv, mul_div_right_comm, div_self hs, one_mul] - · apply hasDerivAt_deriv_iff.mp - simp only [this.deriv, this] - calc - _ = ∫ (x : ℝ) in Ioi 0, ↑(ν x) * deriv (@g s) x := ?_ - _ = -∫ (x : ℝ) in Ioi 0, deriv (fun x ↦ ↑(ν x)) x * @g s x := ?_ - _ = -∫ (x : ℝ) in Ioi 0, deriv ν x * @g s x := ?_ - _ = -∫ (x : ℝ) in Ioi 0, deriv ν x * x ^ s / s := by simp only [mul_div, g] - _ = _ := ?_ - · rw [setIntegral_congr_fun (by simp)] - intro _ hx - simp only [gderiv hs hx] - · apply PartialIntegration_of_support_in_Icc (ν ·) (g s) - (a := 1 / 2) (b := 2) (by norm_num) (by norm_num) - · simpa only [Function.support_subset_iff, ne_eq, ofReal_eq_zero] - · exact (Differentiable.ofReal_comp_iff.mpr - (diffν.differentiable (by norm_num))).differentiableOn - · refine DifferentiableOn.div_const ?_ s - intro a ha - refine DifferentiableAt.comp_ofReal (e := fun x ↦ x ^ s) ?_ |>.differentiableWithinAt - apply differentiableAt_fun_id.cpow (differentiableAt_const s) <| by exact Or.inl ha - · simp only [deriv.ofReal_comp'] - exact continuous_ofReal.comp (diffν.continuous_deriv (by norm_num)) |>.continuousOn - · apply ContinuousOn.congr (f := fun (x : ℝ) ↦ (x : ℂ) ^ (s - 1)) ?_ - fun x hx ↦ gderiv hs hx - exact Continuous.continuousOn (by continuity) |>.cpow continuousOn_const (by simp) - · congr; funext; congr - apply (hasDerivAt_deriv_iff.mpr ?_).ofReal_comp.deriv - exact diffν.contDiffAt.differentiableAt (by norm_num) - · simp only [neg_mul, neg_inj] - conv => lhs; rhs; intro; rw [← mul_one_div, mul_comm] - rw [integral_const_mul] - --- filter-free version: -lemma MellinOfPsi {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν) - (suppν : ν.support ⊆ Set.Icc (1 / 2) 2) : - ∃ C > 0, ∀ (σ₁ : ℝ) (_ : 0 < σ₁) (s : ℂ) (_ : σ₁ ≤ s.re) (_ : s.re ≤ 2), - ‖𝓜 (fun x ↦ (ν x : ℂ)) s‖ ≤ C * ‖s‖⁻¹ := by - let f := fun (x : ℝ) ↦ ‖deriv ν x‖ - have cont : ContinuousOn f (Icc (1 / 2) 2) := - (Continuous.comp (by continuity) <| diffν.continuous_deriv (by norm_num)).continuousOn - obtain ⟨a, _, max⟩ := isCompact_Icc.exists_isMaxOn (f := f) (by norm_num) cont - let σ₂ : ℝ := 2 - let C : ℝ := f a * 2 ^ σ₂ * (3 / 2) - have mainBnd : ∀ (σ₁ : ℝ), 0 < σ₁ → ∀ (s : ℂ), σ₁ ≤ s.re → s.re ≤ 2 → - ‖𝓜 (fun x ↦ (ν x : ℂ)) s‖ ≤ C * ‖s‖⁻¹ := by - intro σ₁ σ₁pos s hs₁ hs₂ - have s_ne_zero: s ≠ 0 := fun h ↦ by linarith [zero_re ▸ h ▸ hs₁] - simp only [mellin, f, MellinOfPsi_aux diffν suppν s_ne_zero, norm_mul, smul_eq_mul, mul_comm] - gcongr - · simp - calc - _ ≤ ∫ (x : ℝ) in Ioi 0, ‖(deriv ν x * (x : ℂ) ^ s)‖ := ?_ - _ = ∫ (x : ℝ) in Icc (1 / 2) 2, ‖(deriv ν x * (x : ℂ) ^ s)‖ := ?_ - _ ≤ ‖∫ (x : ℝ) in Icc (1 / 2) 2, ‖(deriv ν x * (x : ℂ) ^ s)‖‖ := - le_abs_self _ - _ ≤ _ := ?_ - · simp_rw [norm_integral_le_integral_norm] - · apply SetIntegral.integral_eq_integral_inter_of_support_subset_Icc - · simp only [Function.support_abs, Function.support_mul, Function.support_ofReal] - apply subset_trans (by apply inter_subset_left) <| Function.support_deriv_subset_Icc suppν - · exact (Icc_subset_Ioi_iff (by norm_num)).mpr (by norm_num) - · have := intervalIntegral.norm_integral_le_of_norm_le_const' (C := f a * 2 ^ σ₂) - (f := fun x ↦ f x * ‖(x : ℂ) ^ s‖) (a := (1 / 2 : ℝ)) ( b := 2) (by norm_num) ?_ - · simp only [Real.norm_eq_abs, norm_real, norm_mul] at this ⊢ - rwa [(by norm_num: |(2 : ℝ) - 1 / 2| = 3 / 2), - intervalIntegral.integral_of_le (by norm_num), ← integral_Icc_eq_integral_Ioc] at this - · intro x hx; - have f_bound := isMaxOn_iff.mp max x hx - have pow_bound : ‖(x : ℂ) ^ s‖ ≤ 2 ^ σ₂ := by - rw [norm_cpow_eq_rpow_re_of_pos (by linarith [mem_Icc.mp hx])] - have xpos : 0 ≤ x := by linarith [(mem_Icc.mp hx).1] - have h := rpow_le_rpow xpos (mem_Icc.mp hx).2 (by linarith : 0 ≤ s.re) - exact le_trans h <| rpow_le_rpow_of_exponent_le (by norm_num) hs₂ - convert! mul_le_mul f_bound pow_bound (norm_nonneg _) ?_ using 1 <;> simp [f] - have Cnonneg : 0 ≤ C := by - have hh := mainBnd 1 (by norm_num) ((3 : ℂ) / 2) (by norm_num) (by norm_num) - have hhh : 0 ≤ ‖𝓜 (fun x ↦ (ν x : ℂ)) ((3 : ℂ) / 2)‖ := by positivity - have hhhh : 0 < ‖(3 : ℂ) / 2‖⁻¹ := by norm_num - have := hhh.trans hh - exact (mul_nonneg_iff_of_pos_right hhhh).mp this - by_cases CeqZero : C = 0 - · refine ⟨1, by linarith, ?_⟩ - intro ε εpos s hs₁ hs₂ - have := mainBnd ε εpos s hs₁ hs₂ - rw [CeqZero, zero_mul] at this - have : 0 ≤ 1 * ‖s‖⁻¹ := by positivity - linarith - · exact ⟨C, lt_of_le_of_ne Cnonneg fun a ↦ CeqZero (id (Eq.symm a)), mainBnd⟩ - -noncomputable def DeltaSpike (ν : ℝ → ℝ) (ε : ℝ) : ℝ → ℝ := - fun x ↦ ν (x ^ (1 / ε)) / ε - -lemma DeltaSpikeMass {ν : ℝ → ℝ} (mass_one : ∫ x in Ioi 0, ν x / x = 1) {ε : ℝ} - (εpos : 0 < ε) : ∫ x in Ioi 0, ((DeltaSpike ν ε) x) / x = 1 := - calc - _ = ∫ (x : ℝ) in Ioi 0, (|1/ε| * x ^ (1 / ε - 1)) • - ((fun z ↦ (ν z) / z) (x ^ (1 / ε))) := by - apply setIntegral_congr_ae measurableSet_Ioi - filter_upwards with x hx - simp only [smul_eq_mul, abs_of_pos (one_div_pos.mpr εpos)] - symm; calc - _ = (ν (x ^ (1 / ε)) / x ^ (1 / ε)) * x ^ (1 / ε - 1) * (1 / ε) := by ring - _ = _ := by rw [rpow_sub hx, rpow_one] - _ = (ν (x ^ (1 / ε)) / x ^ (1 / ε) * x ^ (1 / ε) / x) * (1/ ε) := by ring - _ = _ := by rw [div_mul_cancel₀ _ (ne_of_gt (rpow_pos_of_pos hx (1/ε)))] - _ = (ν (x ^ (1 / ε)) / ε / x) := by ring - _ = 1 := by - rw [integral_comp_rpow_Ioi (fun z ↦ (ν z) / z), ← mass_one] - simp only [ne_eq, div_eq_zero_iff, one_ne_zero, εpos.ne', or_self, not_false_eq_true] - -lemma DeltaSpikeSupport_aux {ν : ℝ → ℝ} {ε : ℝ} (εpos : 0 < ε) - (suppν : ν.support ⊆ Icc (1 / 2) 2) : - (fun x ↦ if x < 0 then 0 else DeltaSpike ν ε x).support ⊆ Icc (2 ^ (-ε)) (2 ^ ε) := by - unfold DeltaSpike - simp only [one_div, Function.support_subset_iff, ne_eq, ite_eq_left_iff, not_lt, div_eq_zero_iff, - not_forall, exists_prop, mem_Icc, and_imp] - intro x hx h; push Not at h - have := suppν <| Function.mem_support.mpr h.1 - simp only [one_div, mem_Icc] at this - have hl := (le_rpow_inv_iff_of_pos (by norm_num) hx εpos).mp this.1 - rw [inv_rpow (by norm_num) ε, ← rpow_neg (by norm_num)] at hl - refine ⟨hl, (rpow_inv_le_iff_of_pos ?_ (by norm_num) εpos).mp this.2⟩ - linarith [(by apply rpow_nonneg (by norm_num) : 0 ≤ (2 : ℝ) ^ (-ε))] - -lemma DeltaSpikeSupport' {ν : ℝ → ℝ} {ε x : ℝ} (εpos : 0 < ε) (xnonneg : 0 ≤ x) - (suppν : ν.support ⊆ Icc (1 / 2) 2) : - DeltaSpike ν ε x ≠ 0 → x ∈ Icc (2 ^ (-ε)) (2 ^ ε) := by - intro h - have : (fun x ↦ if x < 0 then 0 else DeltaSpike ν ε x) x = DeltaSpike ν ε x := by - simp [xnonneg] - rw [← this] at h - exact (Function.support_subset_iff.mp <| DeltaSpikeSupport_aux εpos suppν) _ h - -lemma DeltaSpikeSupport {ν : ℝ → ℝ} {ε x : ℝ} (εpos : 0 < ε) (xnonneg : 0 ≤ x) - (suppν : ν.support ⊆ Icc (1 / 2) 2) : - x ∉ Icc (2 ^ (-ε)) (2 ^ ε) → DeltaSpike ν ε x = 0 := by - contrapose!; exact DeltaSpikeSupport' εpos xnonneg suppν - -@[fun_prop] -lemma DeltaSpikeContinuous {ν : ℝ → ℝ} {ε : ℝ} (εpos : 0 < ε) - (diffν : ContDiff ℝ 1 ν) : Continuous (fun x ↦ DeltaSpike ν ε x) := by - apply diffν.continuous.comp (g := ν) _ |>.div_const - exact continuous_id.rpow_const fun _ ↦ Or.inr <| div_nonneg (by norm_num) εpos.le - -lemma DeltaSpikeOfRealContinuous {ν : ℝ → ℝ} {ε : ℝ} (εpos : 0 < ε) - (diffν : ContDiff ℝ 1 ν) : Continuous (fun x ↦ (DeltaSpike ν ε x : ℂ)) := - continuous_ofReal.comp <| DeltaSpikeContinuous εpos diffν - -set_option backward.isDefEq.respectTransparency false in -theorem MellinOfDeltaSpike (ν : ℝ → ℝ) {ε : ℝ} (εpos : ε > 0) (s : ℂ) : - 𝓜 (fun x ↦ (DeltaSpike ν ε x : ℂ)) s = 𝓜 (fun x ↦ (ν x : ℂ)) (ε * s) := by - unfold DeltaSpike - push_cast - rw [mellin_div_const, mellin_comp_rpow (fun x ↦ (ν x : ℂ)), abs_of_nonneg (by positivity)] - simp only [one_div, inv_inv, ofReal_inv, div_inv_eq_mul, real_smul] - rw [mul_div_cancel_left₀ _ (ne_zero_of_re_pos εpos)] - ring_nf - -lemma MellinOfDeltaSpikeAt1 (ν : ℝ → ℝ) {ε : ℝ} (εpos : ε > 0) : - 𝓜 (fun x ↦ (DeltaSpike ν ε x : ℂ)) 1 = 𝓜 (fun x ↦ (ν x : ℂ)) ε := by - convert MellinOfDeltaSpike ν εpos 1; simp [mul_one] - -lemma MellinOfDeltaSpikeAt1_asymp {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν) - (suppν : ν.support ⊆ Set.Icc (1 / 2) 2) - (mass_one : ∫ x in Set.Ioi 0, ν x / x = 1) : - (fun (ε : ℝ) ↦ (𝓜 (fun x ↦ (ν x : ℂ)) ε) - 1) =O[𝓝[>]0] id := by - have diff : DifferentiableWithinAt ℝ - (fun (ε : ℝ) ↦ 𝓜 (fun x ↦ (ν x : ℂ)) ε - 1) (Ioi 0) 0 := by - apply DifferentiableAt.differentiableWithinAt - simp only [(differentiableAt_const _).fun_sub_iff_left] - refine DifferentiableAt.comp_ofReal ?_ - refine mellin_differentiableAt_of_isBigO_rpow (a := 1) (b := -1) ?_ ?_ (by simp) ?_ (by simp) - · apply (Continuous.continuousOn ?_).locallyIntegrableOn (by simp) - have := diffν.continuous; continuity - · apply Asymptotics.IsBigO.trans_le (g' := fun _ ↦ (0 : ℝ)) ?_ (by simp) - apply BigO_zero_atTop_of_support_in_Icc (a := 1 / 2) (b := 2) - rwa [ν.support_ofReal] - · apply Asymptotics.IsBigO.trans_le (g' := fun _ ↦ (0 : ℝ)) ?_ (by simp) - apply BigO_zero_atZero_of_support_in_Icc (a := 1 / 2) (b := 2) (ha := (by norm_num)) - rwa [ν.support_ofReal] - have := ofReal_zero ▸ diff.isBigO_sub - simp only [sub_sub_sub_cancel_right, sub_zero] at this - convert! this using 1 - simp only [mellin, zero_sub, cpow_neg_one, smul_eq_mul] - funext ε - congr 1 - symm - calc (∫ (t : ℝ) in Ioi 0, (↑t)⁻¹ * ↑(ν t) : ℂ) - = ∫ (t : ℝ) in Ioi 0, ((ν t / t : ℝ) : ℂ) := - integral_congr_ae (Filter.Eventually.of_forall fun t => by push_cast; ring) - _ = ((∫ t in Ioi 0, ν t / t : ℝ) : ℂ) := integral_ofReal - _ = 1 := by rw [mass_one, ofReal_one] - -lemma MellinOf1 (s : ℂ) (h : s.re > 0) : - 𝓜 ((fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0)) s = 1 / s := by - convert (hasMellin_one_Ioc h).right - congr - -noncomputable def Smooth1 (ν : ℝ → ℝ) (ε : ℝ) : ℝ → ℝ := - MellinConvolution (fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0) (DeltaSpike ν ε) - --- This lemma might not be necessary, but the RHS is supported on [0, infinity), which makes --- results like `support_MellinConvolution_subsets` easier to apply. -lemma Smooth1_def_ite {ν : ℝ → ℝ} {ε x : ℝ} (xpos : 0 < x) : - Smooth1 ν ε x = MellinConvolution (fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0) - (fun x ↦ if x < 0 then 0 else DeltaSpike ν ε x) x := by - unfold Smooth1 - rw [MellinConvolutionSymmetric _ _ xpos] - conv => lhs; rw [MellinConvolutionSymmetric _ _ xpos] - unfold MellinConvolution - apply MeasureTheory.integral_congr_ae - filter_upwards [MeasureTheory.ae_restrict_mem measurableSet_Ioi] - simp +contextual only [mem_Ioi, true_and, ite_mul, one_mul, zero_mul, RCLike.ofReal_real_eq_id, - id_eq, mul_ite, mul_zero] - intro y ypos - rw [eq_comm, if_neg (by push Not; positivity)] - -/-% ** Wrong delimiters on purpose, no need to include this in blueprint -\begin{lemma}[Smooth1Properties_estimate]\label{Smooth1Properties_estimate} -\lean{Smooth1Properties_estimate}\leanok -For $\epsilon>0$, -$$ - \log2>\frac{1-2^{-\epsilon}}\epsilon -$$ -\end{lemma} -%-/ - -lemma Smooth1Properties_estimate {ε : ℝ} (εpos : 0 < ε) : - (1 - 2 ^ (-ε)) / ε < Real.log 2 := by - apply (div_lt_iff₀' εpos).mpr - have : 1 - 1 / (2 : ℝ) ^ ε = ((2 : ℝ) ^ ε - 1) / (2 : ℝ) ^ ε := by - rw [sub_div, div_self (by positivity)] - rw [← Real.log_rpow (by norm_num), rpow_neg (by norm_num), inv_eq_one_div (2 ^ ε), this] - set c := (2 : ℝ) ^ ε - have hc : 1 < c := by - rw [← rpow_zero (2 : ℝ)] - apply Real.rpow_lt_rpow_of_exponent_lt (by norm_num) εpos - apply (div_lt_iff₀' (by positivity)).mpr <| lt_sub_iff_add_lt'.mp ?_ - let f := (fun x ↦ x * Real.log x - x) - rw [(by simp [f] : -1 = f 1), (by simp [f] : c * Real.log c - c = f c)] - have mono: StrictMonoOn f <| Ici 1 := by - refine strictMonoOn_of_deriv_pos (convex_Ici _) ?_ ?_ - · apply continuousOn_id.mul (continuousOn_id.log ?_) |>.sub continuousOn_id - intro x hx; simp only [mem_Ici] at hx; simp only [id_eq, ne_eq]; linarith - · intro x hx; simp only [nonempty_Iio, interior_Ici', mem_Ioi] at hx - dsimp only [f] - rw [deriv_fun_sub, deriv_fun_mul, Real.deriv_log, deriv_id'', one_mul, mul_inv_cancel₀] - · simp [log_pos hx] - · linarith - · simp only [differentiableAt_fun_id] - · simp only [differentiableAt_log_iff, ne_eq]; linarith - · exact differentiableAt_fun_id.mul <| differentiableAt_fun_id.log (by linarith) - · simp only [differentiableAt_fun_id] - exact mono (by rw [mem_Ici]) (mem_Ici.mpr <| le_of_lt hc) hc - -lemma Smooth1Properties_below_aux {x ε : ℝ} (hx : x ≤ 1 - Real.log 2 * ε) (εpos : 0 < ε) : - x < 2 ^ (-ε) := by - calc - x ≤ 1 - Real.log 2 * ε := hx - _ < 2 ^ (-ε) := ?_ - rw [sub_lt_iff_lt_add, add_comm, ← sub_lt_iff_lt_add] - exact (div_lt_iff₀ εpos).mp <| Smooth1Properties_estimate εpos - -lemma Smooth1Properties_below {ν : ℝ → ℝ} (suppν : ν.support ⊆ Icc (1 / 2) 2) - (mass_one : ∫ x in Ioi 0, ν x / x = 1) : - ∃ (c : ℝ), 0 < c ∧ c = Real.log 2 ∧ - ∀ (ε x) (_ : 0 < ε), 0 < x → x ≤ 1 - c * ε → Smooth1 ν ε x = 1 := by - set c := Real.log 2; use c - refine ⟨log_pos (by norm_num), rfl, ?_⟩ - intro ε x εpos xpos hx - have hx2 := Smooth1Properties_below_aux hx εpos - rewrite [← DeltaSpikeMass mass_one εpos] - unfold Smooth1 MellinConvolution - calc - _ = ∫ (y : ℝ) in Ioi 0, - indicator (Ioc 0 1) (fun y ↦ DeltaSpike ν ε (x / y) / ↑y) y := ?_ - _ = ∫ (y : ℝ) in Ioi 0, DeltaSpike ν ε (x / y) / y := ?_ - _ = _ := integral_comp_div_I0i_haar (fun y ↦ DeltaSpike ν ε y) xpos - · rw [setIntegral_congr_fun (by simp)] - intro y hy - by_cases h : y ≤ 1 <;> simp [indicator, mem_Ioi.mp hy, h] - · rw [setIntegral_congr_fun (by simp)] - intro y hy - have : y ≠ 0 := by - rintro rfl - simp at hy - simp only [indicator_apply_eq_self, mem_Ioc, not_and, not_le, div_eq_zero_iff, this, or_false] - intro hy2; replace hy2 := hy2 <| mem_Ioi.mp hy - apply DeltaSpikeSupport εpos ?_ suppν - · simp only [mem_Icc, not_and, not_le]; intro - linarith [(by apply (div_lt_iff₀ (by linarith)).mpr; nlinarith : x / y < 2 ^ (-ε))] - · rw [le_div_iff₀ (by linarith), zero_mul]; exact xpos.le - -lemma Smooth1Properties_above_aux {x ε : ℝ} (hx : 1 + (2 * Real.log 2) * ε ≤ x) - (hε : ε ∈ Ioo 0 1) : - 2 ^ ε < x := by - calc - x ≥ 1 + (2 * Real.log 2) * ε := hx - _ > 2 ^ ε := ?_ - refine lt_add_of_sub_left_lt <| (div_lt_iff₀ hε.1).mp ?_ - calc - 2 * Real.log 2 > 2 * (1 - 2 ^ (-ε)) / ε := ?_ - _ > 2 ^ ε * (1 - 2 ^ (-ε)) / ε := ?_ - _ = (2 ^ ε - 1) / ε := ?_ - · field_simp - exact Smooth1Properties_estimate hε.1 - · have : (2 : ℝ) ^ ε < 2 := by - have h := rpow_lt_rpow_of_exponent_lt (x := 2) (by norm_num) hε.2 - rwa [Real.rpow_one] at h - have pos: 0 < (1 - 2 ^ (-ε)) / ε := by - refine div_pos ?_ hε.1 - rw [sub_pos] - have h := rpow_lt_rpow_of_exponent_lt (x := 2) (by norm_num) (neg_lt_zero.mpr hε.1) - rwa [Real.rpow_zero] at h - have := (mul_lt_mul_iff_left₀ pos).mpr this - ring_nf at this ⊢ - exact this - · have : (2 : ℝ) ^ ε * (2 : ℝ) ^ (-ε) = (2 : ℝ) ^ (ε - ε) := by - rw [← rpow_add (by norm_num), add_neg_cancel, sub_self] - conv => lhs; lhs; ring_nf; rhs; simp [this] - -lemma Smooth1Properties_above_aux2 {x y ε : ℝ} (hε : ε ∈ Ioo 0 1) (hy : y ∈ Ioc 0 1) - (hx2 : 2 ^ ε < x) : - 2 < (x / y) ^ (1 / ε) := by - obtain ⟨εpos, ε1⟩ := hε - obtain ⟨ypos, y1⟩ := hy - calc - _ > (2 ^ ε / y) ^ (1 / ε) := ?_ - _ = 2 / y ^ (1 / ε) := ?_ - _ ≥ 2 / y := ?_ - _ ≥ 2 := ?_ - · rw [gt_iff_lt, div_rpow, div_rpow, lt_div_iff₀, mul_comm_div, div_self, mul_one] - <;> try positivity - · exact rpow_lt_rpow (by positivity) hx2 (by positivity) - · exact LT.lt.le <| lt_trans (by positivity) hx2 - · rw [div_rpow, ← rpow_mul, mul_div_cancel₀ 1 <| ne_of_gt εpos, rpow_one] <;> positivity - · have : y ^ (1 / ε) ≤ y := by - nth_rewrite 2 [← rpow_one y] - exact rpow_le_rpow_of_exponent_ge ypos y1 (by linarith [one_lt_one_div εpos ε1]) - have pos : 0 < y ^ (1 / ε) := rpow_pos_of_pos ypos _ - rw [ge_iff_le, div_le_iff₀, div_mul_eq_mul_div, le_div_iff₀', mul_comm] <;> try linarith - · rw [ge_iff_le, le_div_iff₀ <| ypos]; exact (mul_le_iff_le_one_right zero_lt_two).mpr y1 - -lemma Smooth1Properties_above {ν : ℝ → ℝ} (suppν : ν.support ⊆ Icc (1 / 2) 2) : - ∃ (c : ℝ), 0 < c ∧ c = 2 * Real.log 2 ∧ - ∀ (ε x) (_ : ε ∈ Ioo 0 1), 1 + c * ε ≤ x → Smooth1 ν ε x = 0 := by - set c := 2 * Real.log 2; use c - constructor - · simp only [c, zero_lt_two, mul_pos_iff_of_pos_left]; exact log_pos (by norm_num) - constructor - · rfl - intro ε x hε hx - have hx2 := Smooth1Properties_above_aux hx hε - unfold Smooth1 MellinConvolution - simp only [ite_mul, one_mul, zero_mul, RCLike.ofReal_real_eq_id, id_eq] - apply setIntegral_eq_zero_of_forall_eq_zero - intro y hy - have ypos := mem_Ioi.mp hy - by_cases y1 : y ≤ 1 - swap - · simp [ypos, y1] - simp only [mem_Ioi.mp hy, y1, and_self, ↓reduceIte, div_eq_zero_iff]; left - apply DeltaSpikeSupport hε.1 ?_ suppν - on_goal 1 => - simp only [mem_Icc, not_and, not_le] - on_goal 2 => - suffices h : 2 ^ ε < x / y by - linarith [(by apply rpow_pos_of_pos (by norm_num) : 0 < (2 : ℝ) ^ ε)] - all_goals - try intro - have : x / y = ((x / y) ^ (1 / ε)) ^ ε := by - rw [← rpow_mul] - simp only [one_div, inv_mul_cancel₀ (ne_of_gt hε.1), rpow_one] - apply div_nonneg_iff.mpr; left; - exact ⟨(le_trans (rpow_pos_of_pos (by norm_num) ε).le) hx2.le, ypos.le⟩ - rw [this] - refine rpow_lt_rpow (by norm_num) ?_ hε.1 - exact Smooth1Properties_above_aux2 hε ⟨ypos, y1⟩ hx2 - -lemma DeltaSpikeNonNeg_of_NonNeg {ν : ℝ → ℝ} (νnonneg : ∀ x > 0, 0 ≤ ν x) - {x ε : ℝ} (xpos : 0 < x) (εpos : 0 < ε) : - 0 ≤ DeltaSpike ν ε x := by - dsimp [DeltaSpike] - have : 0 < x ^ (1 / ε) := by positivity - have : 0 ≤ ν (x ^ (1 / ε)) := νnonneg _ this - positivity - -lemma MellinConvNonNeg_of_NonNeg {f g : ℝ → ℝ} (f_nonneg : ∀ x > 0, 0 ≤ f x) - (g_nonneg : ∀ x > 0, 0 ≤ g x) {x : ℝ} (xpos : 0 < x) : - 0 ≤ MellinConvolution f g x := by - dsimp [MellinConvolution] - apply MeasureTheory.setIntegral_nonneg - · exact measurableSet_Ioi - · intro y ypos; simp only [mem_Ioi] at ypos - have : 0 ≤ f y := f_nonneg _ ypos - have : 0 < x / y := by positivity - have : 0 ≤ g (x / y) := g_nonneg _ this - positivity - -lemma Smooth1Nonneg {ν : ℝ → ℝ} (νnonneg : ∀ x > 0, 0 ≤ ν x) {ε x : ℝ} - (xpos : 0 < x) (εpos : 0 < ε) : 0 ≤ Smooth1 ν ε x := by - dsimp [Smooth1] - apply MellinConvNonNeg_of_NonNeg ?_ ?_ xpos - · intro y hy; by_cases h : y ≤ 1 <;> simp [h, hy] - · intro y ypos; exact DeltaSpikeNonNeg_of_NonNeg νnonneg ypos εpos - -lemma Smooth1LeOne_aux {x ε : ℝ} {ν : ℝ → ℝ} (xpos : 0 < x) (εpos : 0 < ε) - (mass_one : ∫ x in Ioi 0, ν x / x = 1) : - ∫ (y : ℝ) in Ioi 0, ν ((x / y) ^ (1 / ε)) / ε / y = 1 := by - calc - _ = ∫ (y : ℝ) in Ioi 0, (ν (y ^ (1 / ε)) / ε) / y := ?_ - _ = ∫ (y : ℝ) in Ioi 0, ν y / y := ?_ - _ = 1 := mass_one - · have := integral_comp_div_I0i_haar (fun y ↦ ν ((x / y) ^ (1 / ε)) / ε) xpos - convert! this.symm using 1 - congr; funext y; congr; field_simp [mul_comm] - · have := integral_comp_rpow_I0i_haar_real (fun y ↦ ν y) (one_div_ne_zero εpos.ne') - rw [← this, abs_of_pos <| one_div_pos.mpr εpos] - field_simp - -lemma Smooth1LeOne {ν : ℝ → ℝ} (νnonneg : ∀ x > 0, 0 ≤ ν x) - (mass_one : ∫ x in Ioi 0, ν x / x = 1) {ε : ℝ} (εpos : 0 < ε) {x : ℝ} (xpos : 0 < x) : - Smooth1 ν ε x ≤ 1 := by - unfold Smooth1 MellinConvolution DeltaSpike - have := Smooth1LeOne_aux xpos εpos mass_one - calc - _ = ∫ (y : ℝ) in Ioi 0, - (fun y ↦ if y ∈ Ioc 0 1 then 1 else 0) y * (ν ((x / y) ^ (1 / ε)) / ε / y) := ?_ - _ ≤ ∫ (y : ℝ) in Ioi 0, (ν ((x / y) ^ (1 / ε)) / ε) / y := ?_ - _ = 1 := this - · rw [setIntegral_congr_fun (by simp)] - simp only [ite_mul, one_mul, zero_mul, RCLike.ofReal_real_eq_id, id_eq, mem_Ioc] - intro y hy; aesop - · refine setIntegral_mono_on ?_ (integrable_of_integral_eq_one this) (by simp) ?_ - · refine integrable_of_integral_eq_one this |>.bdd_mul ?_ - (ae_of_all _ <| by aesop) - have : (fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0) = - indicator (Ioc 0 1) (1 : ℝ → ℝ) := by - aesop - simp only [mem_Ioc, this, measurableSet_Ioc, aestronglyMeasurable_indicator_iff] - exact aestronglyMeasurable_one - · simp only [ite_mul, one_mul, zero_mul] - intro y hy - by_cases h : y ≤ 1 - · aesop - field_simp - simp only [mem_Ioc, h, and_false, ↓reduceIte, one_div, mul_zero] - simp only [mem_Ioi] at hy - apply div_nonneg - · apply νnonneg; exact rpow_pos_of_pos (div_pos xpos <| mem_Ioi.mp hy) _ - · positivity - -lemma MellinOfSmooth1a {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν) - (suppν : ν.support ⊆ Icc (1 / 2) 2) - {ε : ℝ} (εpos : 0 < ε) {s : ℂ} (hs : 0 < s.re) : - 𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) s = - s⁻¹ * 𝓜 (fun x ↦ (ν x : ℂ)) (ε * s) := by - let f' : ℝ → ℂ := fun x ↦ DeltaSpike ν ε x - let f : ℝ → ℂ := fun x ↦ DeltaSpike ν ε x / x - let g : ℝ → ℂ := fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0 - let F : ℝ × ℝ → ℂ := Function.uncurry fun x y ↦ f y * g (x / y) * (x : ℂ) ^ (s - 1) - let S := {⟨x, y⟩ : ℝ × ℝ | 0 < x ∧ x ≤ y ∧ 2 ^ (-ε) ≤ y ∧ y ≤ 2 ^ ε} - let F' : ℝ × ℝ → ℂ := piecewise S (fun ⟨x, y⟩ ↦ f y * (x : ℂ) ^ (s - 1)) - (fun _ ↦ 0) - let Tx := Ioc 0 ((2 : ℝ) ^ ε) - let Ty := Icc ((2 : ℝ) ^ (-ε)) ((2 : ℝ) ^ ε) - - have Seq : S = (Tx ×ˢ Ty) ∩ {(x, y) : ℝ × ℝ | x ≤ y} := by - ext ⟨x, y⟩; constructor - · exact fun h ↦ ⟨⟨⟨h.1, le_trans h.2.1 h.2.2.2⟩, ⟨h.2.2.1, h.2.2.2⟩⟩, h.2.1⟩ - · exact fun h ↦ ⟨h.1.1.1, ⟨h.2, h.1.2.1, h.1.2.2⟩⟩ - have SsubI : S ⊆ Ioi 0 ×ˢ Ioi 0 := - fun z hz ↦ ⟨hz.1, lt_of_lt_of_le (by apply rpow_pos_of_pos; norm_num) hz.2.2.1⟩ - have SsubT: S ⊆ Tx ×ˢ Ty := by simp_rw [Seq, inter_subset_left] - have Smeas : MeasurableSet S := by - rw [Seq]; apply MeasurableSet.inter ?_ <| measurableSet_le measurable_fst measurable_snd - simp [measurableSet_prod, Tx, Ty] - - have int_F: IntegrableOn F (Ioi 0 ×ˢ Ioi 0) := by - apply IntegrableOn.congr_fun (f := F') ?_ ?_ (by simp [measurableSet_prod]); swap - · simp only [F, F', f, g, mul_ite, mul_one, mul_zero] - intro ⟨x, y⟩ hz - by_cases hS : ⟨x, y⟩ ∈ S <;> simp only [hS, piecewise] - <;> simp only [mem_prod, mem_Ioi, mem_setOf_eq, not_and, not_le, S] at hz hS - · simp [div_pos hz.1 hz.2, (div_le_one hz.2).mpr hS.2.1] - · by_cases hxy : x / y ≤ 1 - swap - · simp [hxy] - have hy : y ∉ Icc (2 ^ (-ε)) (2 ^ ε) := by - simp only [mem_Icc, not_and, not_le]; exact hS hz.1 <| (div_le_one hz.2).mp hxy - simp [DeltaSpikeSupport εpos hz.2.le suppν hy] - · apply Integrable.piecewise Smeas ?_ integrableOn_zero - simp only [IntegrableOn, Measure.restrict_restrict_of_subset SsubI] - apply MeasureTheory.Integrable.mono_measure ?_ - · apply MeasureTheory.Measure.restrict_mono' SsubT.eventuallyLE le_rfl - have : volume.restrict (Tx ×ˢ Ty) = (volume.restrict Tx).prod (volume.restrict Ty) := by - rw [Measure.prod_restrict, MeasureTheory.Measure.volume_eq_prod] - conv => rw [this]; lhs; intro; rw [mul_comm] - apply MeasureTheory.Integrable.mul_prod (f := fun x ↦ (x : ℂ) ^ (s - 1)) - (μ := Measure.restrict volume Tx) - · simp only [Tx] - rw [← IntegrableOn, integrableOn_Ioc_iff_integrableOn_Ioo, - intervalIntegral.integrableOn_Ioo_cpow_iff] - · simp [hs] - · apply rpow_pos_of_pos (by norm_num) - · apply (ContinuousOn.div ?_ ?_ ?_).integrableOn_compact isCompact_Icc - · exact (DeltaSpikeOfRealContinuous εpos diffν).continuousOn - · exact continuous_ofReal.continuousOn - · intro x hx; simp only [mem_Icc] at hx; simp only [ofReal_ne_zero] - linarith [(by apply rpow_pos_of_pos (by norm_num) : (0 : ℝ) < 2 ^ (-ε))] - - have : 𝓜 (MellinConvolution g f') s = 𝓜 g s * 𝓜 f' s := by - rw [mul_comm, ← MellinConvolutionTransform f' g s - (by convert int_F using 1; simp only [f', F, f]; field_simp)] - dsimp [mellin]; rw [setIntegral_congr_fun (by simp)] - intro x hx; simp_rw [MellinConvolutionSymmetric _ _ <| mem_Ioi.mp hx] - - convert! this using 1 - · congr; funext x; convert! integral_ofReal.symm - simp only [MellinConvolution, RCLike.ofReal_div, ite_mul, one_mul, zero_mul, @apply_ite ℝ ℂ, - algebraMap.coe_zero, g]; rfl - · rw [MellinOf1 s hs, MellinOfDeltaSpike ν εpos s] - simp - -lemma MellinOfSmooth1b {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν) - (suppν : ν.support ⊆ Set.Icc (1 / 2) 2) : - ∃ (C : ℝ) (_ : 0 < C), ∀ (σ₁ : ℝ) (_ : 0 < σ₁) - (s) (_ : σ₁ ≤ s.re) (_ : s.re ≤ 2) (ε : ℝ) (_ : 0 < ε) (_ : ε < 1), - ‖𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) s‖ ≤ C * (ε * ‖s‖ ^ 2)⁻¹ := by - obtain ⟨C, Cpos, hC⟩ := MellinOfPsi diffν suppν - refine ⟨C, Cpos, ?_⟩ - intro σ₁ σ₁pos s hs1 hs2 ε εpos ε_lt_one - rw [MellinOfSmooth1a diffν suppν εpos <| lt_of_le_of_lt' hs1 σ₁pos] - have hh1 : ε * σ₁ ≤ (ε * s).re := by - simp only [mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero] - nlinarith - have hh2 : (ε * s).re ≤ 2 := by - simp only [mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero] - nlinarith - calc - ‖s⁻¹ * 𝓜 (fun x ↦ (ν x : ℂ)) (ε * s)‖ = - ‖s⁻¹‖ * ‖𝓜 (fun x ↦ (ν x : ℂ)) (ε * s)‖ := by simp - _ ≤ ‖s⁻¹‖ * (C * (ε * ‖s‖)⁻¹) := by - gcongr - convert! hC (ε * σ₁) (by positivity) (ε * s) hh1 hh2 - simp [abs_eq_self.mpr εpos.le] - _ = C * (ε * ‖s‖ ^ 2)⁻¹ := by - simp only [norm_inv, mul_inv_rev] - ring - -lemma MellinOfSmooth1c {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν) - (suppν : ν.support ⊆ Icc (1 / 2) 2) - (mass_one : ∫ x in Ioi 0, ν x / x = 1) : - (fun ε ↦ 𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 - 1) =O[𝓝[>]0] id := by - have h := MellinOfDeltaSpikeAt1_asymp diffν suppν mass_one - rw [Asymptotics.isBigO_iff] at h ⊢ - obtain ⟨c, hc⟩ := h - use c - filter_upwards [hc, Ioo_mem_nhdsGT (by linarith : (0 : ℝ) < 1)] with ε hε hε' - rw [MellinOfSmooth1a diffν suppν hε'.1 (s := 1) (by norm_num)] - simp only [inv_one, mul_one, one_mul, id_eq, Real.norm_eq_abs] - exact hε - -lemma Smooth1ContinuousAt {SmoothingF : ℝ → ℝ} - (diffSmoothingF : ContDiff ℝ 1 SmoothingF) - (SmoothingFpos : ∀ x > 0, 0 ≤ SmoothingF x) - (suppSmoothingF : SmoothingF.support ⊆ Icc (1 / 2) 2) - {ε : ℝ} (εpos : 0 < ε) {y : ℝ} (ypos : 0 < y) : - ContinuousAt (fun x ↦ Smooth1 SmoothingF ε x) y := by - apply ContinuousAt.congr - (f := (fun x ↦ MellinConvolution (DeltaSpike SmoothingF ε) - (fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0) x)) _ - · filter_upwards [lt_mem_nhds ypos] with x hx - apply MellinConvolutionSymmetric _ _ hx - apply continuousAt_of_dominated (bound := (fun x ↦ 2 ^ ε * DeltaSpike SmoothingF ε x)) - · filter_upwards [lt_mem_nhds ypos] with x hx - apply Measurable.aestronglyMeasurable - apply Measurable.mul - · apply Measurable.mul - · exact Continuous.measurable <| DeltaSpikeContinuous εpos diffSmoothingF - · apply Measurable.ite _ (by fun_prop) (by fun_prop) - apply MeasurableSet.congr (s := Ici x) (by measurability) - ext a - constructor - · intro ha - have apos : 0 < a := lt_of_lt_of_le hx ha - constructor - · exact div_pos hx apos - · exact (div_le_one apos).mpr ha - · intro ha - have : 0 < a := (div_pos_iff_of_pos_left hx).mp ha.1 - exact (div_le_one this).mp ha.2 - · fun_prop - · filter_upwards [lt_mem_nhds ypos] with x hx - filter_upwards [ae_restrict_mem (by measurability)] with t ht - simp only [mul_ite, mul_one, mul_zero, RCLike.ofReal_real_eq_id, id_eq, norm_div, norm_eq_abs] - by_cases! h : DeltaSpike SmoothingF ε t = 0 - · simp [h] - have := DeltaSpikeSupport' εpos ht.le suppSmoothingF h - have dsnonneg : 0 ≤ DeltaSpike SmoothingF ε t := by - apply DeltaSpikeNonNeg_of_NonNeg <;> assumption - calc - _ ≤ |DeltaSpike SmoothingF ε t| / |t| := by - gcongr - · split_ifs with h - · apply le_refl - · exact dsnonneg - _ ≤ _ := by - rw [_root_.abs_of_nonneg dsnonneg, mul_comm, div_eq_mul_one_div, _root_.abs_of_pos ht] - gcongr - apply (one_div_le ht (by bound)).mpr - · convert this.1 using 1 - rw [div_eq_iff (by positivity), ← rpow_add (by norm_num), neg_add_cancel, rpow_zero] - · apply Integrable.const_mul - apply (integrable_indicator_iff (by measurability)).mp - apply (integrableOn_iff_integrable_of_support_subset (s := Icc (2 ^ (-ε)) (2 ^ ε)) _).mp - · apply ContinuousOn.integrableOn_compact isCompact_Icc - apply ContinuousOn.congr (f := DeltaSpike SmoothingF ε) - · apply Continuous.continuousOn - apply DeltaSpikeContinuous<;> assumption - · intro x hx - have : x ∈ Ioi 0 := by - apply mem_Ioi.mpr - apply lt_of_lt_of_le (by bound) hx.1 - rw [indicator, if_pos this] - · unfold indicator - simp_rw [mem_Ioi] - apply Function.support_subset_iff.mpr - simp only [ne_eq, ite_eq_right_iff, Classical.not_imp, mem_Icc, and_imp] - intro x hx - apply DeltaSpikeSupport' εpos hx.le suppSmoothingF - · have : ∀ᵐ (a : ℝ) ∂volume.restrict (Ioi 0), a ≠ y := by - apply ae_iff.mpr - simp - filter_upwards [ae_restrict_mem (by measurability), this] with x hx hx2 - simp only [mem_Ioi] at hx - apply ContinuousAt.div_const - apply ContinuousAt.mul (by fun_prop) - have : (fun x_1 ↦ if 0 < x_1 / x ∧ x_1 / x ≤ 1 then 1 else 0) = - (Ioc 0 x).indicator (fun _ ↦ (1 : ℝ)) := by - ext t - unfold indicator - simp [div_pos_iff_of_pos_right, div_le_one₀, hx] - rw [this] - apply ContinuousOn.continuousAt_indicator (by fun_prop) - simp [frontier_Ioc hx, ypos.ne', hx2.symm] - -lemma Smooth1MellinConvergent {Ψ : ℝ → ℝ} {ε : ℝ} (diffΨ : ContDiff ℝ 1 Ψ) - (suppΨ : Ψ.support ⊆ Icc (1 / 2) 2) (hε : ε ∈ Ioo 0 1) - (Ψnonneg : ∀ x > 0, 0 ≤ Ψ x) (mass_one : ∫ x in Ioi 0, Ψ x / x = 1) - {s : ℂ} (hs : 0 < s.re) : MellinConvergent (fun x ↦ (Smooth1 Ψ ε x : ℂ)) s := by - apply mellinConvergent_of_isBigO_rpow_exp zero_lt_one _ _ _ hs - · apply ContinuousOn.locallyIntegrableOn _ (by measurability) - apply continuousOn_of_forall_continuousAt - exact fun x hx ↦ Smooth1ContinuousAt diffΨ Ψnonneg suppΨ hε.1 hx |>.ofReal - · rw [Asymptotics.isBigO_iff] - use 1 - obtain ⟨c, cpos, ceq, hc⟩ := Smooth1Properties_above suppΨ - filter_upwards [eventually_ge_atTop (1 + c * ε)] with x hx - rw [hc _ _ hε hx] - simp only [ofReal_zero, norm_zero, neg_mul, one_mul, norm_eq_abs, abs_exp] - bound - · rw [Asymptotics.isBigO_iff] - use 1 - filter_upwards [eventually_mem_nhdsWithin] with x hx - simp only [norm_real, norm_eq_abs, neg_zero, rpow_zero, one_mem, CStarRing.norm_of_mem_unitary, - mul_one] - rw [_root_.abs_of_nonneg <| Smooth1Nonneg Ψnonneg hx hε.1] - exact Smooth1LeOne Ψnonneg mass_one hε.1 hx - -lemma Smooth1MellinDifferentiable {Ψ : ℝ → ℝ} {ε : ℝ} (diffΨ : ContDiff ℝ 1 Ψ) - (suppΨ : Ψ.support ⊆ Icc (1 / 2) 2) (hε : ε ∈ Ioo 0 1) - (Ψnonneg : ∀ x > 0, 0 ≤ Ψ x) (mass_one : ∫ x in Ioi 0, Ψ x / x = 1) - {s : ℂ} (hs : 0 < s.re) : - DifferentiableAt ℂ (𝓜 (fun x ↦ (Smooth1 Ψ ε x : ℂ))) s := by - apply mellin_differentiableAt_of_isBigO_rpow_exp zero_lt_one _ _ _ hs - · apply ContinuousOn.locallyIntegrableOn _ (by measurability) - apply continuousOn_of_forall_continuousAt - exact fun x hx ↦ Smooth1ContinuousAt diffΨ Ψnonneg suppΨ hε.1 hx |>.ofReal - · rw [Asymptotics.isBigO_iff] - use 1 - obtain ⟨c, cpos, ceq, hc⟩ := Smooth1Properties_above suppΨ - filter_upwards [eventually_ge_atTop (1 + c * ε)] with x hx - rw [hc _ _ hε hx] - simp only [ofReal_zero, norm_zero, neg_mul, one_mul, norm_eq_abs, abs_exp] - bound - · rw [Asymptotics.isBigO_iff] - use 1 - filter_upwards [eventually_mem_nhdsWithin] with x hx - simp only [norm_real, norm_eq_abs, neg_zero, rpow_zero, one_mem, CStarRing.norm_of_mem_unitary, - mul_one] - rw [_root_.abs_of_nonneg <| Smooth1Nonneg Ψnonneg hx hε.1] - exact Smooth1LeOne Ψnonneg mass_one hε.1 hx diff --git a/zeta23/Zeta23/FromPNTPlus/Mertens.lean b/zeta23/Zeta23/FromPNTPlus/Mertens.lean index fa1774ae9e..a99344dd37 100644 --- a/zeta23/Zeta23/FromPNTPlus/Mertens.lean +++ b/zeta23/Zeta23/FromPNTPlus/Mertens.lean @@ -44,37 +44,11 @@ import Mathlib.Analysis.Asymptotics.Lemmas import Mathlib.Algebra.Group.Submonoid.BigOperators import Zeta23.FromPNTPlus.EulerMaclaurin - - namespace Mertens - open Real Finset Filter Asymptotics open ArithmeticFunction hiding log -lemma sum_Ioc_one_eq_sum_Ioc_zero {f : ℕ → ℝ} {x : ℕ} (hx : 1 ≤ x) (hf : f 1 = 0) : - ∑ n ∈ Ioc 1 x, f n = ∑ n ∈ Ioc 0 x, f n := by - rw [(by rfl : Ioc 0 x = Icc 1 x), ← add_sum_Ioc_eq_sum_Icc hx] - simpa - -/-- For any `x ≥ 1`, `∑ n ≤ x, log n = x log x - ({x} - 1/2) log x - x + 1 + ∫ t in 1..x, ({t} - 1/2)/t`. -/ -theorem sum_log_eq {x : ℝ} (hx : 1 ≤ x) : - ∑ n ∈ Ioc 0 ⌊ x ⌋₊, log n = - x * log x - (x - ⌊x⌋₊ - 1 / 2) * log x - x + 1 + ∫ t in 1..x, (t - ⌊t⌋₊ - 1 / 2) / t := by - rw [← sum_Ioc_one_eq_sum_Ioc_zero (Nat.le_floor (by grind)) (by simp)] - have : 1 = ⌊(1 : ℝ)⌋₊ := by simp - nth_rw 1 [this] - rw [sum_eq_integral_add_integral_deriv (by norm_num) hx (fun _ _ ↦ (by fun_prop (disch := grind)))] - · simp only [log_one, B1, Nat.floor_one, Nat.cast_one, sub_self, zero_sub, - RCLike.ofReal_real_eq_id, id_eq, mul_neg, zero_mul, neg_zero, integral_log, mul_zero, sub_zero, - deriv_log'] - ring_nf - congr - ext - ring - · simp only [deriv_log', Set.uIcc_of_le hx] - fun_prop (disch := grind) - /-- For any `x ≥ 1`, `∑ n ≤ x, log n ≤ x log x`. -/ theorem sum_log_le {x : ℝ} (hx : 1 ≤ x) : ∑ n ∈ Ioc 0 ⌊ x ⌋₊, log n ≤ x * log x := by @@ -89,7 +63,6 @@ theorem sum_log_le {x : ℝ} (hx : 1 ≤ x) : · exact log_nonneg hx · exact Nat.floor_le (by linarith) - lemma integral_log_le {a b : ℝ} (ha : 1 ≤ a) (hab : a ≤ b) : ∫ t in a..b, log t ≤ log b * (b - a) := by apply le_of_abs_le @@ -130,15 +103,6 @@ theorem sum_log_ge {x : ℝ} (hx : 1 ≤ x) : _ ≥ x * log x - x - log x := by simp _ ≥ _ := by linarith [log_le_self (by linarith : 0 ≤ x)] -/-- For any `x`, `∑ n ≤ x, log n = log ⌊x⌋!`. -/ -theorem sum_log_eq_log_factorial (x : ℝ) : - ∑ n ∈ Ioc 0 ⌊ x ⌋₊, log n = log (Nat.floor x).factorial := by - rw [←prod_Ico_id_eq_factorial, ←log_prod, prod_natCast] - · congr - intro x hx - simp at hx ⊢; grind - - /-- For any `x`, `∑ n ≤ x, log n = ∑ d ≤ x, Λ(d) ⌊x/d⌋`. -/ theorem sum_log_eq_sum_mangoldt {x : ℝ} : ∑ n ∈ Ioc 0 ⌊x⌋₊, log n = ∑ d ∈ Ioc 0 ⌊x⌋₊, Λ d * ⌊x / d⌋₊ := by @@ -148,9 +112,6 @@ theorem sum_log_eq_sum_mangoldt {x : ℝ} : /-- The remainder term in Mertens' first theorem (von Mangoldt form): `E₁Λ x = ∑ d ≤ x, Λ(d)/d - log x`. -/ noncomputable abbrev E₁Λ (x : ℝ) : ℝ := ∑ d ∈ Ioc 0 ⌊ x ⌋₊, (Λ d) / d - log x -theorem sum_mangoldt_div_eq (x : ℝ) : ∑ d ∈ Ioc 0 ⌊ x ⌋₊, (Λ d) / d = log x + E₁Λ x := by - grind - /-- For any `x ≥ 1`, `E₁Λ x ≥ -2`. -/ theorem E₁Λ.ge {x : ℝ} (hx : 1 ≤ x) : E₁Λ x ≥ -2 := by @@ -168,7 +129,6 @@ theorem E₁Λ.ge {x : ℝ} (hx : 1 ≤ x) : sum_log_eq_sum_mangoldt ▸ sum_log_ge hx _ = _ := by ring - /-- For any `x ≥ 1`, `E₁Λ x ≤ log 4 + 4`. -/ theorem E₁Λ.le {x : ℝ} (hx : 1 ≤ x) : E₁Λ x ≤ log 4 + 4 := by diff --git a/zeta23/Zeta23/FromPNTPlus/Rectangle.lean b/zeta23/Zeta23/FromPNTPlus/Rectangle.lean index fbb1fb510c..d216a7c29f 100644 --- a/zeta23/Zeta23/FromPNTPlus/Rectangle.lean +++ b/zeta23/Zeta23/FromPNTPlus/Rectangle.lean @@ -19,19 +19,12 @@ import Mathlib.Order.Interval.Set.Monotone open Complex Set Topology open scoped Interval - variable {z w : ℂ} {c : ℝ} - namespace Rectangle - lemma symm : Rectangle z w = Rectangle w z := by simp [Rectangle, uIcc_comm] -lemma symm_re : Rectangle (w.re + z.im * I) (z.re + w.im * I) = Rectangle z w := by - simp [Rectangle, uIcc_comm] - end Rectangle - /-- A `RectangleBorder` has corners `z` and `w`. -/ def RectangleBorder (z w : ℂ) : Set ℂ := [[z.re, w.re]] ×ℂ {z.im} ∪ {z.re} ×ℂ [[z.im, w.im]] ∪ @@ -39,11 +32,6 @@ def RectangleBorder (z w : ℂ) : Set ℂ := def Square (p : ℂ) (c : ℝ) : Set ℂ := Rectangle (-c - c * I + p) (c + c * I + p) -lemma Square_apply (p : ℂ) (cpos : c > 0) : - Square p c = Icc (-c + p.re) (c + p.re) ×ℂ Icc (-c + p.im) (c + p.im) := by - rw [Square, Rectangle, uIcc_of_le (by simp; linarith), uIcc_of_le (by simp; linarith)] - simp - @[simp] theorem preimage_equivRealProdCLM_reProdIm (s t : Set ℝ) : equivRealProdCLM.symm ⁻¹' (s ×ℂ t) = s ×ˢ t := @@ -58,79 +46,13 @@ theorem ContinuousLinearEquiv.coe_toLinearEquiv_symm {R : Type*} {S : Type*} [Se ⇑e.toLinearEquiv.symm = e.symm := rfl -/-- The axis-parallel complex rectangle with opposite corners `z` and `w` is complex product of - two intervals, which is also the convex hull of the four corners. Golfed from mathlib4\#9598. -/ -lemma segment_reProdIm_segment_eq_convexHull (z w : ℂ) : - [[z.re, w.re]] ×ℂ [[z.im, w.im]] = - convexHull ℝ {z, z.re + w.im * I, w.re + z.im * I, w} := by - simp_rw [← segment_eq_uIcc, ← convexHull_pair, ← convexHull_reProdIm, reProdIm] - exact congrArg _ <| Set.ext <| by simpa [Complex.ext_iff] using by tauto - -/-- If the four corners of a rectangle are contained in a convex set `U`, then the whole - rectangle is. Golfed from mathlib4\#9598. -/ -lemma rectangle_in_convex {U : Set ℂ} (U_convex : Convex ℝ U) {z w : ℂ} (hz : z ∈ U) - (hw : w ∈ U) (hzw : (z.re + w.im * I) ∈ U) (hwz : (w.re + z.im * I) ∈ U) : - Rectangle z w ⊆ U := by - rw [Rectangle, segment_reProdIm_segment_eq_convexHull] - exact convexHull_min (by simp_all [insert_subset_iff]) U_convex - -lemma mem_Rect {z w : ℂ} (zRe_lt_wRe : z.re ≤ w.re) (zIm_lt_wIm : z.im ≤ w.im) (p : ℂ) : - p ∈ Rectangle z w ↔ - z.re ≤ p.re ∧ p.re ≤ w.re ∧ z.im ≤ p.im ∧ p.im ≤ w.im := by - rw [Rectangle, uIcc_of_le zRe_lt_wRe, uIcc_of_le zIm_lt_wIm] - exact and_assoc - -lemma square_neg (p : ℂ) (c : ℝ) : Square p (-c) = Square p c := by - simpa [Square] using! Rectangle.symm - -theorem Set.left_not_mem_uIoo {a b : ℝ} : a ∉ Set.uIoo a b := - fun ⟨h1, h2⟩ ↦ (left_lt_sup.mp h2) (le_of_not_ge (inf_lt_left.mp h1)) - -theorem Set.right_not_mem_uIoo {a b : ℝ} : b ∉ Set.uIoo a b := - fun ⟨h1, h2⟩ ↦ (right_lt_sup.mp h2) (le_of_not_ge (inf_lt_right.mp h1)) - theorem Set.ne_left_of_mem_uIoo {a b c : ℝ} (hc : c ∈ Set.uIoo a b) : c ≠ a := - fun h ↦ Set.left_not_mem_uIoo (h ▸ hc) + fun h ↦ Set.left_notMem_uIoo (h ▸ hc) theorem Set.ne_right_of_mem_uIoo {a b c : ℝ} (hc : c ∈ Set.uIoo a b) : c ≠ b := - fun h ↦ Set.right_not_mem_uIoo (h ▸ hc) - -lemma left_mem_rect (z w : ℂ) : z ∈ Rectangle z w := ⟨left_mem_uIcc, left_mem_uIcc⟩ - -lemma right_mem_rect (z w : ℂ) : w ∈ Rectangle z w := ⟨right_mem_uIcc, right_mem_uIcc⟩ - -lemma rect_subset_iff {z w z' w' : ℂ} : - Rectangle z' w' ⊆ Rectangle z w ↔ z' ∈ Rectangle z w ∧ w' ∈ Rectangle z w := by - use fun h ↦ ⟨h (left_mem_rect z' w'), h (right_mem_rect z' w')⟩ - intro ⟨⟨⟨hz're_ge, hz're_le⟩, ⟨hz'im_ge, hz'im_le⟩⟩, - ⟨⟨hw're_ge, hw're_le⟩, ⟨hw'im_ge, hw'im_le⟩⟩⟩ x - ⟨⟨hxre_ge, hxre_le⟩, ⟨hxim_ge, hxim_le⟩⟩ - refine ⟨⟨?_, ?_⟩, ⟨?_, ?_⟩⟩ - · exact (le_inf hz're_ge hw're_ge).trans hxre_ge - · exact (le_sup_iff.mp hxre_le).casesOn (fun h ↦ h.trans hz're_le) - (fun h ↦ h.trans hw're_le) - · exact (le_inf hz'im_ge hw'im_ge).trans hxim_ge - · exact (le_sup_iff.mp hxim_le).casesOn (fun h ↦ h.trans hz'im_le) - (fun h ↦ h.trans hw'im_le) + fun h ↦ Set.right_notMem_uIoo (h ▸ hc) set_option linter.style.multiGoal false in -lemma RectSubRect {x₀ x₁ x₂ x₃ y₀ y₁ y₂ y₃ : ℝ} (x₀_le_x₁ : x₀ ≤ x₁) - (x₁_le_x₂ : x₁ ≤ x₂) (x₂_le_x₃ : x₂ ≤ x₃) (y₀_le_y₁ : y₀ ≤ y₁) - (y₁_le_y₂ : y₁ ≤ y₂) (y₂_le_y₃ : y₂ ≤ y₃) : - Rectangle (x₁ + y₁ * I) (x₂ + y₂ * I) ⊆ - Rectangle (x₀ + y₀ * I) (x₃ + y₃ * I) := by - rw [rect_subset_iff, mem_Rect, mem_Rect] - refine ⟨⟨?_, ?_, ?_, ?_⟩, ?_, ?_, ?_, ?_⟩ - all_goals simpa using by linarith - -lemma RectSubRect' {z₀ z₁ z₂ z₃ : ℂ} (x₀_le_x₁ : z₀.re ≤ z₁.re) - (x₁_le_x₂ : z₁.re ≤ z₂.re) (x₂_le_x₃ : z₂.re ≤ z₃.re) - (y₀_le_y₁ : z₀.im ≤ z₁.im) (y₁_le_y₂ : z₁.im ≤ z₂.im) - (y₂_le_y₃ : z₂.im ≤ z₃.im) : - Rectangle z₁ z₂ ⊆ Rectangle z₀ z₃ := by - rw [← re_add_im z₀, ← re_add_im z₁, ← re_add_im z₂, ← re_add_im z₃] - exact RectSubRect x₀_le_x₁ x₁_le_x₂ x₂_le_x₃ y₀_le_y₁ y₁_le_y₂ y₂_le_y₃ - lemma rectangleBorder_subset_rectangle (z w : ℂ) : RectangleBorder z w ⊆ Rectangle z w := by intro x hx obtain ⟨⟨h | h⟩ | h⟩ | h := hx @@ -139,18 +61,6 @@ lemma rectangleBorder_subset_rectangle (z w : ℂ) : RectangleBorder z w ⊆ Rec · exact ⟨h.1, h.2 ▸ right_mem_uIcc⟩ · exact ⟨h.1 ▸ right_mem_uIcc, h.2⟩ -/-- Note: try using `by simp` for `h`. -/ -lemma rectangle_disjoint_singleton {z w p : ℂ} - (h : (p.re < z.re ∧ p.re < w.re) ∨ (p.im < z.im ∧ p.im < w.im) ∨ - (z.re < p.re ∧ w.re < p.re) ∨ (z.im < p.im ∧ w.im < p.im)) : - Disjoint (Rectangle z w) {p} := by - refine disjoint_singleton_right.mpr (not_and_or.mpr ?_) - obtain h | h | h | h := h - · exact Or.inl (notMem_uIcc_of_lt h.1 h.2) - · exact Or.inr (notMem_uIcc_of_lt h.1 h.2) - · exact Or.inl (notMem_uIcc_of_gt h.1 h.2) - · exact Or.inr (notMem_uIcc_of_gt h.1 h.2) - lemma rectangleBorder_disjoint_singleton {z w p : ℂ} (h : p.re ≠ z.re ∧ p.re ≠ w.re ∧ p.im ≠ z.im ∧ p.im ≠ w.im) : Disjoint (RectangleBorder z w) {p} := by @@ -159,43 +69,58 @@ lemma rectangleBorder_disjoint_singleton {z w p : ℂ} exact ⟨⟨⟨fun hc ↦ h.2.2.1 hc.2, fun hc ↦ h.1 hc.1⟩, fun hc ↦ h.2.2.2 hc.2⟩, fun hc ↦ h.2.1 hc.1⟩ -lemma rectangle_subset_punctured_rect {z₀ z₁ z₂ z₃ p : ℂ} - (hz : z₀.re ≤ z₁.re ∧ z₁.re ≤ z₂.re ∧ z₂.re ≤ z₃.re ∧ - z₀.im ≤ z₁.im ∧ z₁.im ≤ z₂.im ∧ z₂.im ≤ z₃.im) - (hp : (p.re < z₁.re ∧ p.re < z₂.re) ∨ (p.im < z₁.im ∧ p.im < z₂.im) ∨ - (z₁.re < p.re ∧ z₂.re < p.re) ∨ (z₁.im < p.im ∧ z₂.im < p.im)) : - Rectangle z₁ z₂ ⊆ Rectangle z₀ z₃ \ {p} := - Set.subset_sdiff.mpr ⟨by apply RectSubRect' <;> tauto, rectangle_disjoint_singleton hp⟩ - -lemma rectangleBorder_subset_punctured_rect {z₀ z₁ z₂ z₃ p : ℂ} - (hz : z₀.re ≤ z₁.re ∧ z₁.re ≤ z₂.re ∧ z₂.re ≤ z₃.re ∧ - z₀.im ≤ z₁.im ∧ z₁.im ≤ z₂.im ∧ z₂.im ≤ z₃.im) - (hp : p.re ≠ z₁.re ∧ p.re ≠ z₂.re ∧ p.im ≠ z₁.im ∧ p.im ≠ z₂.im) : - RectangleBorder z₁ z₂ ⊆ Rectangle z₀ z₃ \ {p} := - Set.subset_sdiff.mpr ⟨ - (rectangleBorder_subset_rectangle _ _).trans (by apply RectSubRect' <;> tauto), - rectangleBorder_disjoint_singleton hp⟩ - lemma rectangle_mem_nhds_iff {z w p : ℂ} : Rectangle z w ∈ 𝓝 p ↔ p ∈ (Set.uIoo z.re w.re) ×ℂ (Set.uIoo z.im w.im) := by simp_rw [← mem_interior_iff_mem_nhds, Rectangle, Complex.interior_reProdIm, uIoo, uIcc, interior_Icc] -lemma mapsTo_rectangle_left_re (z w : ℂ) : - MapsTo (fun (y : ℝ) => ↑z.re + ↑y * I) [[z.im, w.im]] (Rectangle z w) := - fun _ hx ↦ ⟨by simp, by simp [hx]⟩ - -lemma mapsTo_rectangle_right_re (z w : ℂ) : - MapsTo (fun (y : ℝ) => ↑w.re + ↑y * I) [[z.im, w.im]] (Rectangle z w) := - fun _ hx ↦ ⟨by simp, by simp [hx]⟩ - -lemma mapsTo_rectangle_left_im (z w : ℂ) : - MapsTo (fun (x : ℝ) => ↑x + z.im * I) [[z.re, w.re]] (Rectangle z w) := - fun _ hx ↦ ⟨by simp [hx], by simp⟩ - -lemma mapsTo_rectangle_right_im (z w : ℂ) : - MapsTo (fun (x : ℝ) => ↑x + w.im * I) [[z.re, w.re]] (Rectangle z w) := - fun _ hx ↦ ⟨by simp [hx], by simp⟩ +/-- The contour rectangle `[(1-c) - R i, c + R i]` and its basic facts. -/ +structure RectSetup (c R : ℝ) where + z : ℂ + w : ℂ + hz : z = (1 - c : ℝ) - R * I + hw : w = (c : ℝ) + R * I + hzre : z.re = 1 - c + hzim : z.im = -R + hwre : w.re = c + hwim : w.im = R + hre : z.re ≤ w.re + him : z.im ≤ w.im + hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ + (1 - c ≤ s.re ∧ s.re ≤ c) ∧ (-R ≤ s.im ∧ s.im ≤ R) + +/-- Build the contour rectangle. -/ +def rectSetup (c R : ℝ) (hc : 1 - c ≤ c) (hR : -R ≤ R) : RectSetup c R := by + let z : ℂ := (1 - c : ℝ) - R * I + let w : ℂ := (c : ℝ) + R * I + have hzre : z.re = 1 - c := by simp [z] + have hzim : z.im = -R := by simp [z] + have hwre : w.re = c := by simp [w] + have hwim : w.im = R := by simp [w] + have hre : z.re ≤ w.re := by rw [hzre, hwre]; linarith + have him : z.im ≤ w.im := by rw [hzim, hwim]; linarith + have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ + (1 - c ≤ s.re ∧ s.re ≤ c) ∧ (-R ≤ s.im ∧ s.im ≤ R) := by + intro s + simp only [Rectangle, Complex.mem_reProdIm, hzre, hzim, hwre, hwim, + Set.uIcc_of_le hc, Set.uIcc_of_le hR, Set.mem_Icc] + exact ⟨z, w, rfl, rfl, hzre, hzim, hwre, hwim, hre, him, hmem⟩ + +/-- A point of the rectangle that is not on the border is an interior point. -/ +lemma rectangle_mem_nhds_of_mem_of_not_mem_border {z w p : ℂ} + (hre : z.re ≤ w.re) (him : z.im ≤ w.im) + (hp : p ∈ Rectangle z w) (hb : p ∉ RectangleBorder z w) : + Rectangle z w ∈ 𝓝 p := by + obtain ⟨h1, h2⟩ := hp + have h1' : z.re ≤ p.re ∧ p.re ≤ w.re := by simpa [uIcc_of_le hre] using h1 + have h2' : z.im ≤ p.im ∧ p.im ≤ w.im := by simpa [uIcc_of_le him] using h2 + simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, not_or] at hb + obtain ⟨⟨⟨hb1, hb2⟩, hb3⟩, hb4⟩ := hb + rw [rectangle_mem_nhds_iff, mem_reProdIm, uIoo_of_le hre, uIoo_of_le him] + refine ⟨⟨lt_of_le_of_ne h1'.1 (fun h => hb2 ⟨h.symm, h2⟩), + lt_of_le_of_ne h1'.2 (fun h => hb4 ⟨h, h2⟩)⟩, + ⟨lt_of_le_of_ne h2'.1 (fun h => hb1 ⟨h1, h.symm⟩), + lt_of_le_of_ne h2'.2 (fun h => hb3 ⟨h1, h⟩)⟩⟩ lemma mapsTo_rectangleBorder_left_re (z w : ℂ) : MapsTo (fun (y : ℝ) => ↑z.re + ↑y * I) [[z.im, w.im]] (RectangleBorder z w) := @@ -217,30 +142,6 @@ lemma mapsTo_rectangleBorder_right_im (z w : ℂ) : (Set.mapsTo_image _ _).mono subset_rfl fun _ ↦ by simp_all [horizontalSegment_eq, RectangleBorder] -lemma mapsTo_rectangle_left_re_NoP (z w : ℂ) {p : ℂ} - (pNotOnBorder : p ∉ RectangleBorder z w) : - MapsTo (fun (y : ℝ) => ↑z.re + ↑y * I) [[z.im, w.im]] (Rectangle z w \ {p}) := by - refine (mapsTo_rectangleBorder_left_re z w).mono_right (Set.subset_sdiff.mpr ?_) - exact ⟨rectangleBorder_subset_rectangle z w, disjoint_singleton_right.mpr pNotOnBorder⟩ - -lemma mapsTo_rectangle_right_re_NoP (z w : ℂ) {p : ℂ} - (pNotOnBorder : p ∉ RectangleBorder z w) : - MapsTo (fun (y : ℝ) => ↑w.re + ↑y * I) [[z.im, w.im]] (Rectangle z w \ {p}) := by - refine (mapsTo_rectangleBorder_right_re z w).mono_right (Set.subset_sdiff.mpr ?_) - exact ⟨rectangleBorder_subset_rectangle z w, disjoint_singleton_right.mpr pNotOnBorder⟩ - -lemma mapsTo_rectangle_left_im_NoP (z w : ℂ) {p : ℂ} - (pNotOnBorder : p ∉ RectangleBorder z w) : - MapsTo (fun (x : ℝ) => ↑x + z.im * I) [[z.re, w.re]] (Rectangle z w \ {p}) := by - refine (mapsTo_rectangleBorder_left_im z w).mono_right (Set.subset_sdiff.mpr ?_) - exact ⟨rectangleBorder_subset_rectangle z w, disjoint_singleton_right.mpr pNotOnBorder⟩ - -lemma mapsTo_rectangle_right_im_NoP (z w : ℂ) {p : ℂ} - (pNotOnBorder : p ∉ RectangleBorder z w) : - MapsTo (fun (x : ℝ) => ↑x + w.im * I) [[z.re, w.re]] (Rectangle z w \ {p}) := by - refine (mapsTo_rectangleBorder_right_im z w).mono_right (Set.subset_sdiff.mpr ?_) - exact ⟨rectangleBorder_subset_rectangle z w, disjoint_singleton_right.mpr pNotOnBorder⟩ - theorem not_mem_rectangleBorder_of_rectangle_mem_nhds {z w p : ℂ} (hp : Rectangle z w ∈ 𝓝 p) : p ∉ RectangleBorder z w := by @@ -249,32 +150,3 @@ theorem not_mem_rectangleBorder_of_rectangle_mem_nhds {z w p : ℂ} exact ⟨Set.ne_left_of_mem_uIoo h1.1, Set.ne_right_of_mem_uIoo h1.1, Set.ne_left_of_mem_uIoo h1.2, Set.ne_right_of_mem_uIoo h1.2⟩ -theorem Complex.nhds_hasBasis_square (p : ℂ) : (𝓝 p).HasBasis (0 < ·) (Square p ·) := by - suffices - (𝓝 p.re ×ˢ 𝓝 p.im).HasBasis (0 < ·) - (equivRealProdCLM.symm.toHomeomorph ⁻¹' Square p ·) - by simpa only [← nhds_prod_eq, Homeomorph.map_nhds_eq, Homeomorph.image_preimage] - using! this.map equivRealProdCLM.symm.toHomeomorph - apply ((nhds_basis_Icc_pos p.re).prod_same_index_mono (nhds_basis_Icc_pos p.im) ?_ ?_).congr - · intro; rfl - · intros - rw [← uIcc_of_lt (by linarith), ← uIcc_of_lt (by linarith)] - simpa [Square, Rectangle] using by ring_nf - all_goals exact (antitone_const_tsub.Icc (monotone_id.const_add _)).monotoneOn _ - -lemma square_mem_nhds (p : ℂ) {c : ℝ} (hc : c ≠ 0) : - Square p c ∈ 𝓝 p := by - wlog hc_pos : 0 < c generalizing c with h - · rw [← square_neg] - exact h (neg_ne_zero.mpr hc) <| neg_pos.mpr <| hc.lt_of_le <| not_lt.mp hc_pos - exact (nhds_hasBasis_square p).mem_of_mem hc_pos - -lemma square_subset_square {p : ℂ} {c₁ c₂ : ℝ} (hc₁ : 0 < c₁) (hc : c₁ ≤ c₂) : - Square p c₁ ⊆ Square p c₂ := by - apply RectSubRect' <;> simpa using by linarith - -lemma SmallSquareInRectangle {z w p : ℂ} (pInRectInterior : Rectangle z w ∈ nhds p) : - ∀ᶠ (c : ℝ) in 𝓝[>]0, Square p c ⊆ Rectangle z w := by - obtain ⟨ε, hε0, hε⟩ := ((Complex.nhds_hasBasis_square p).1 _).mp pInRectInterior - filter_upwards [Ioo_mem_nhdsGT (hε0)] with _ ⟨hε'0, hε'⟩ - exact subset_trans (square_subset_square hε'0 hε'.le) hε diff --git a/zeta23/Zeta23/FromPNTPlus/ResidueCalcOnRectangles.lean b/zeta23/Zeta23/FromPNTPlus/ResidueCalcOnRectangles.lean index 1f0119d42d..453a8d97f0 100644 --- a/zeta23/Zeta23/FromPNTPlus/ResidueCalcOnRectangles.lean +++ b/zeta23/Zeta23/FromPNTPlus/ResidueCalcOnRectangles.lean @@ -18,35 +18,17 @@ import Mathlib.Analysis.Complex.RemovableSingularity import Mathlib.Analysis.SpecialFunctions.Integrals.Basic import Mathlib.Analysis.Meromorphic.NormalForm import Zeta23.FromPNTPlus.Rectangle -import Zeta23.FromPNTPlus.Tactic.AdditiveCombination - open Complex BigOperators Nat Classical Real Topology Filter open Set MeasureTheory intervalIntegral Asymptotics - open scoped Interval - variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] {f g : ℂ → E} {z w p c A : ℂ} {x x₁ x₂ y y₁ y₂ σ : ℝ} - noncomputable def HIntegral (f : ℂ → E) (x₁ x₂ y : ℝ) : E := ∫ x in x₁..x₂, f (x + y * I) noncomputable def VIntegral (f : ℂ → E) (x y₁ y₂ : ℝ) : E := I • ∫ y in y₁..y₂, f (x + y * I) -noncomputable def HIntegral' (f : ℂ → E) (x₁ x₂ y : ℝ) : E := - (1 / (2 * π * I)) • HIntegral f x₁ x₂ y - -noncomputable def VIntegral' (f : ℂ → E) (x y₁ y₂ : ℝ) : E := - (1 / (2 * π * I)) • VIntegral f x y₁ y₂ - -lemma HIntegral_symm : - HIntegral f x₁ x₂ y = -HIntegral f x₂ x₁ y := integral_symm _ _ - -lemma VIntegral_symm : - VIntegral f x y₁ y₂ = -VIntegral f x y₂ y₁ := by - simp_rw [VIntegral, integral_symm y₁ y₂, smul_neg, neg_neg] - /-- A `RectangleIntegral` of a function `f` is one over a rectangle determined by `z` and `w` in `ℂ`. -/ noncomputable def RectangleIntegral (f : ℂ → E) (z w : ℂ) : E := @@ -70,50 +52,11 @@ noncomputable def LowerUIntegral (f : ℂ → E) (σ σ' T : ℝ) : E := I • (∫ y : ℝ in Iic (-T), f (σ' + y * I)) + I • (∫ y : ℝ in Iic (-T), f (σ + y * I)) -noncomputable def VerticalIntegral (f : ℂ → E) (σ : ℝ) : E := - I • ∫ t : ℝ, f (σ + t * I) - -noncomputable abbrev VerticalIntegral' (f : ℂ → E) (σ : ℝ) : E := - (1 / (2 * π * I)) • VerticalIntegral f σ - -lemma verticalIntegral_split_three (a b : ℝ) - (hf : Integrable (fun t : ℝ ↦ f (σ + t * I))) : - VerticalIntegral f σ = - I • (∫ t in Iic a, f (σ + t * I)) + VIntegral f σ a b + - I • ∫ t in Ici b, f (σ + t * I) := by - simp_rw [VerticalIntegral, VIntegral, ← smul_add] - congr - rw [← integral_Iic_sub_Iic hf.restrict hf.restrict, add_sub_cancel, - integral_Iic_eq_integral_Iio, integral_Iio_add_Ici hf.restrict hf.restrict] - -lemma DiffVertRect_eq_UpperLowerUs {σ σ' T : ℝ} - (f_int_σ : Integrable (fun (t : ℝ) ↦ f (σ + t * I))) - (f_int_σ' : Integrable (fun (t : ℝ) ↦ f (σ' + t * I))) : - VerticalIntegral f σ' - VerticalIntegral f σ - - RectangleIntegral f (σ - I * T) (σ' + I * T) = - UpperUIntegral f σ σ' T - LowerUIntegral f σ σ' T := by - rw [verticalIntegral_split_three (-T) T f_int_σ, verticalIntegral_split_three (-T) T f_int_σ'] - simp only [RectangleIntegral, UpperUIntegral, LowerUIntegral] - simp only [sub_re, mul_re, I_re, add_re, ofReal_re, I_im, ofReal_im, sub_im, mul_im, add_im] - ring_nf - abel - /-- A function is `HolomorphicOn` a set if it is complex differentiable on that set. -/ abbrev HolomorphicOn (f : ℂ → E) (s : Set ℂ) : Prop := DifferentiableOn ℂ f s -theorem existsDifferentiableOn_of_bddAbove [CompleteSpace E] - {s : Set ℂ} {c : ℂ} (hc : s ∈ nhds c) - (hd : HolomorphicOn f (s \ {c})) - (hb : BddAbove (norm ∘ f '' (s \ {c}))) : - ∃ (g : ℂ → E), - HolomorphicOn g s ∧ Set.EqOn f g (s \ {c}) := - ⟨Function.update f c (limUnder (𝓝[{c}ᶜ] c) f), - differentiableOn_update_limUnder_of_bddAbove hc hd hb, - fun z hz ↦ if h : z = c then (hz.2 h).elim - else by simp [h]⟩ - theorem HolomorphicOn.vanishesOnRectangle [CompleteSpace E] {U : Set ℂ} (f_holo : HolomorphicOn f U) (hU : Rectangle z w ⊆ U) : @@ -135,19 +78,6 @@ theorem RectangleIntegral'_congr (h : Set.EqOn f g (RectangleBorder z w)) : RectangleIntegral' f z w = RectangleIntegral' g z w := by rw [RectangleIntegral', RectangleIntegral_congr h] -theorem rectangleIntegral_symm (f : ℂ → E) (z w : ℂ) : - RectangleIntegral f z w = RectangleIntegral f w z := by - simp_rw [RectangleIntegral, HIntegral, VIntegral, intervalIntegral.integral_symm w.re, - intervalIntegral.integral_symm w.im, sub_neg_eq_add, smul_neg, sub_neg_eq_add, - ← sub_eq_add_neg, neg_add_eq_sub, sub_add_eq_add_sub] - -theorem rectangleIntegral_symm_re (f : ℂ → E) (z w : ℂ) : - RectangleIntegral f (w.re + z.im * I) (z.re + w.im * I) = -RectangleIntegral f z w := by - simp only [RectangleIntegral, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, - mul_one, sub_self, add_zero, add_im, mul_im, zero_add, neg_sub, ← sub_eq_zero, sub_zero] - rw [HIntegral_symm (y := z.im), HIntegral_symm (y := w.im)] - abel - def RectangleBorderIntegrable (f : ℂ → E) (z w : ℂ) : Prop := IntervalIntegrable (fun x => f (x + z.im * I)) volume z.re w.re ∧ IntervalIntegrable (fun x => f (x + w.im * I)) volume z.re w.re ∧ @@ -173,231 +103,11 @@ theorem ContinuousOn.rectangleBorder_integrable (hf : ContinuousOn f (RectangleB (hf.comp (by fun_prop) (mapsTo_rectangleBorder_right_re z w)).intervalIntegrable, (hf.comp (by fun_prop) (mapsTo_rectangleBorder_left_re z w)).intervalIntegrable⟩ -omit [NormedSpace ℂ E] in -theorem ContinuousOn.rectangleBorderIntegrable (hf : ContinuousOn f (Rectangle z w)) : - RectangleBorderIntegrable f z w := - ContinuousOn.rectangleBorder_integrable (hf.mono (rectangleBorder_subset_rectangle z w)) - -omit [NormedSpace ℂ E] in -theorem ContinuousOn.rectangleBorderNoPIntegrable - (hf : ContinuousOn f (Rectangle z w \ {p})) (pNotOnBorder : p ∉ RectangleBorder z w) : - RectangleBorderIntegrable f z w := by - refine ContinuousOn.rectangleBorder_integrable (hf.mono (Set.subset_sdiff.mpr ?_)) - exact ⟨rectangleBorder_subset_rectangle z w, disjoint_singleton_right.mpr pNotOnBorder⟩ - -theorem HolomorphicOn.rectangleBorderIntegrable' - (hf : HolomorphicOn f (Rectangle z w \ {p})) (hp : Rectangle z w ∈ nhds p) : - RectangleBorderIntegrable f z w := - hf.continuousOn.rectangleBorderNoPIntegrable (not_mem_rectangleBorder_of_rectangle_mem_nhds hp) - -theorem HolomorphicOn.rectangleBorderIntegrable (hf : HolomorphicOn f (Rectangle z w)) : - RectangleBorderIntegrable f z w := hf.continuousOn.rectangleBorderIntegrable - -/-- Given `x₀ a x₁ : ℝ`, and `y₀ y₁ : ℝ` and a function -`f : ℂ → ℂ` so that both `(t : ℝ) ↦ f(t + y₀ * I)` and -`(t : ℝ) ↦ f(t + y₁ * I)` are integrable over both -`t ∈ Icc x₀ a` and `t ∈ Icc a x₁`, we have that -`RectangleIntegral f (x₀ + y₀ * I) (x₁ + y₁ * I)` is the sum of -`RectangleIntegral f (x₀ + y₀ * I) (a + y₁ * I)` and -`RectangleIntegral f (a + y₀ * I) (x₁ + y₁ * I)`. -/ -lemma RectangleIntegralHSplit {a x₀ x₁ y₀ y₁ : ℝ} - (f_int_x₀_a_bot : IntervalIntegrable (fun x => f (↑x + ↑y₀ * I)) volume x₀ a) - (f_int_a_x₁_bot : IntervalIntegrable (fun x => f (↑x + ↑y₀ * I)) volume a x₁) - (f_int_x₀_a_top : IntervalIntegrable (fun x => f (↑x + ↑y₁ * I)) volume x₀ a) - (f_int_a_x₁_top : IntervalIntegrable (fun x => f (↑x + ↑y₁ * I)) volume a x₁) : - RectangleIntegral f (x₀ + y₀ * I) (x₁ + y₁ * I) = - RectangleIntegral f (x₀ + y₀ * I) (a + y₁ * I) + - RectangleIntegral f (a + y₀ * I) (x₁ + y₁ * I) := by - dsimp [RectangleIntegral, HIntegral, VIntegral] - simp only [Complex.mul_re, Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im, Complex.I_re, - Complex.I_im, mul_one, mul_zero, add_zero, zero_add, sub_self] - have h₁ := integral_add_adjacent_intervals f_int_x₀_a_bot f_int_a_x₁_bot - have h₂ := integral_add_adjacent_intervals f_int_x₀_a_top f_int_a_x₁_top - have h₁' : - (∫ (x : ℝ) in x₀..a, f (↑x + ↑y₀ * I)) + - ∫ (x : ℝ) in a..x₁, f (↑y₀ * I + ↑x) = - ∫ (x : ℝ) in x₀..x₁, f (↑x + ↑y₀ * I) := by - simpa [add_comm] using h₁ - have h₂' : - (∫ (x : ℝ) in x₀..a, f (↑x + ↑y₁ * I)) + - ∫ (x : ℝ) in a..x₁, f (↑y₁ * I + ↑x) = - ∫ (x : ℝ) in x₀..x₁, f (↑x + ↑y₁ * I) := by - simpa [add_comm] using h₂ - rw [← h₁', ← h₂'] - have hcomm₁ : - ∫ (x : ℝ) in a..x₁, f (↑y₀ * I + ↑x) = - ∫ (x : ℝ) in a..x₁, f (↑x + ↑y₀ * I) := by - apply intervalIntegral.integral_congr - intro x _ - exact congrArg f (by ring) - have hcomm₂ : - ∫ (x : ℝ) in a..x₁, f (↑y₁ * I + ↑x) = - ∫ (x : ℝ) in a..x₁, f (↑x + ↑y₁ * I) := by - apply intervalIntegral.integral_congr - intro x _ - exact congrArg f (by ring) - rw [hcomm₁, hcomm₂] - abel - -lemma RectangleIntegralHSplit' {a x₀ x₁ y₀ y₁ : ℝ} - (ha : a ∈ [[x₀, x₁]]) - (hf : RectangleBorderIntegrable f (↑x₀ + ↑y₀ * I) (↑x₁ + ↑y₁ * I)) : - RectangleIntegral f (x₀ + y₀ * I) (x₁ + y₁ * I) = - RectangleIntegral f (x₀ + y₀ * I) (a + y₁ * I) + - RectangleIntegral f (a + y₀ * I) (x₁ + y₁ * I) := - RectangleIntegralHSplit - (IntervalIntegrable.mono (by simpa using hf.1) (uIcc_subset_uIcc left_mem_uIcc ha) le_rfl) - (IntervalIntegrable.mono (by simpa using hf.1) (uIcc_subset_uIcc ha right_mem_uIcc) le_rfl) - (IntervalIntegrable.mono (by simpa using hf.2.1) (uIcc_subset_uIcc left_mem_uIcc ha) le_rfl) - (IntervalIntegrable.mono (by simpa using hf.2.1) (uIcc_subset_uIcc ha right_mem_uIcc) le_rfl) - -lemma RectangleIntegralVSplit {b x₀ x₁ y₀ y₁ : ℝ} - (f_int_y₀_b_left : IntervalIntegrable (fun y => f (x₀ + y * I)) volume y₀ b) - (f_int_b_y₁_left : IntervalIntegrable (fun y => f (x₀ + y * I)) volume b y₁) - (f_int_y₀_b_right : IntervalIntegrable (fun y => f (x₁ + y * I)) volume y₀ b) - (f_int_b_y₁_right : IntervalIntegrable (fun y => f (x₁ + y * I)) volume b y₁) : - RectangleIntegral f (x₀ + y₀ * I) (x₁ + y₁ * I) = - RectangleIntegral f (x₀ + y₀ * I) (x₁ + b * I) + - RectangleIntegral f (x₀ + b * I) (x₁ + y₁ * I) := by - dsimp [RectangleIntegral, HIntegral, VIntegral] - simp only [Complex.mul_re, Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im, Complex.I_re, - Complex.I_im, mul_one, mul_zero, add_zero, zero_add, sub_self] - have h₁ := integral_add_adjacent_intervals f_int_y₀_b_left f_int_b_y₁_left - have h₂ := integral_add_adjacent_intervals f_int_y₀_b_right f_int_b_y₁_right - rw [← h₁, ← h₂] - module - -lemma RectangleIntegralVSplit' {b x₀ x₁ y₀ y₁ : ℝ} - (hb : b ∈ [[y₀, y₁]]) - (hf : RectangleBorderIntegrable f (↑x₀ + ↑y₀ * I) (↑x₁ + ↑y₁ * I)) : - RectangleIntegral f (x₀ + y₀ * I) (x₁ + y₁ * I) = - RectangleIntegral f (x₀ + y₀ * I) (x₁ + b * I) + - RectangleIntegral f (x₀ + b * I) (x₁ + y₁ * I) := - RectangleIntegralVSplit - (IntervalIntegrable.mono (by simpa using hf.2.2.2) (uIcc_subset_uIcc left_mem_uIcc hb) le_rfl) - (IntervalIntegrable.mono (by simpa using hf.2.2.2) (uIcc_subset_uIcc hb right_mem_uIcc) le_rfl) - (IntervalIntegrable.mono (by simpa using hf.2.2.1) (uIcc_subset_uIcc left_mem_uIcc hb) le_rfl) - (IntervalIntegrable.mono (by simpa using hf.2.2.1) (uIcc_subset_uIcc hb right_mem_uIcc) le_rfl) - set_option linter.style.multiGoal false in -lemma RectanglePullToNhdOfPole' [CompleteSpace E] {z₀ z₁ z₂ z₃ p : ℂ} - (h_orientation : z₀.re ≤ z₃.re ∧ z₀.im ≤ z₃.im ∧ - z₁.re ≤ z₂.re ∧ z₁.im ≤ z₂.im) - (hp : Rectangle z₁ z₂ ∈ 𝓝 p) (hz : Rectangle z₁ z₂ ⊆ Rectangle z₀ z₃) - (fHolo : HolomorphicOn f (Rectangle z₀ z₃ \ {p})) : - RectangleIntegral f z₀ z₃ = RectangleIntegral f z₁ z₂ := by - obtain ⟨hz₀_re, hz₀_im, hz₁_re, hz₁_im⟩ := h_orientation - have := rect_subset_iff.mp hz - rw [Rectangle, uIcc_of_le hz₀_re, uIcc_of_le hz₀_im] at this - obtain ⟨⟨⟨_, _⟩, ⟨_, _⟩⟩, ⟨_, _⟩, ⟨_, _⟩⟩ := this - obtain ⟨⟨_, _⟩, ⟨_, _⟩⟩ := - (uIoo_of_le hz₁_re) ▸ (uIoo_of_le hz₁_im) ▸ rectangle_mem_nhds_iff.mp hp - obtain ⟨_, _, _, _⟩ := show - p.re < z₂.re ∧ p.re < z₃.re ∧ p.im < z₂.im ∧ p.im < z₃.im from - ⟨by linarith, by linarith, by linarith, by linarith⟩ - obtain ⟨_, _, _, _⟩ := show - z₀.re < p.re ∧ z₁.re < p.re ∧ z₀.im < p.im ∧ z₁.im < p.im from - ⟨by linarith, by linarith, by linarith, by linarith⟩ - have fCont := fHolo.continuousOn - have hbot : RectangleBorderIntegrable f (↑z₀.re + ↑z₀.im * I) - (↑z₃.re + ↑z₃.im * I) := ?_ - have htop : RectangleBorderIntegrable f (↑z₀.re + ↑z₁.im * I) - (↑z₃.re + ↑z₃.im * I) := ?_ - have hleft : RectangleBorderIntegrable f (↑z₀.re + ↑z₁.im * I) - (↑z₃.re + ↑z₂.im * I) := ?_ - have hright : RectangleBorderIntegrable f (↑z₁.re + ↑z₁.im * I) - (↑z₃.re + ↑z₂.im * I) := ?_ - all_goals try { - refine ContinuousOn.rectangleBorder_integrable - (fCont.mono (rectangleBorder_subset_punctured_rect ?_ ?_)) - · simp_all - · simpa using ⟨by linarith, by linarith, by linarith, by linarith⟩ - } - have hbot' : z₁.im ∈ [[z₀.im, z₃.im]] := ?_ - have htop' : z₂.im ∈ [[z₁.im, z₃.im]] := ?_ - have hleft' : z₁.re ∈ [[z₀.re, z₃.re]] := ?_ - have hright' : z₂.re ∈ [[z₁.re, z₃.re]] := ?_ - all_goals try { - rw [Set.uIcc_of_le] - constructor - all_goals assumption - } - have hbot'' : Rectangle (↑z₀.re + ↑z₀.im * I) (↑z₃.re + ↑z₁.im * I) ⊆ - Rectangle z₀ z₃ \ {p} := ?_ - have htop'' : Rectangle (↑z₀.re + ↑z₂.im * I) (↑z₃.re + ↑z₃.im * I) ⊆ - Rectangle z₀ z₃ \ {p} := ?_ - have hleft'' : Rectangle (↑z₀.re + ↑z₁.im * I) (↑z₁.re + ↑z₂.im * I) ⊆ - Rectangle z₀ z₃ \ {p} := ?_ - have hright'' : Rectangle (↑z₂.re + ↑z₁.im * I) (↑z₃.re + ↑z₂.im * I) ⊆ - Rectangle z₀ z₃ \ {p} := ?_ - all_goals try { apply rectangle_subset_punctured_rect <;> simp_all } - have h₁ := RectangleIntegralVSplit' hbot' hbot - have h₂ := fHolo.vanishesOnRectangle hbot'' - have h₃ := RectangleIntegralVSplit' htop' htop - have h₄ := fHolo.vanishesOnRectangle htop'' - have h₅ := RectangleIntegralHSplit' hleft' hleft - have h₆ := fHolo.vanishesOnRectangle hleft'' - have h₇ := RectangleIntegralHSplit' hright' hright - have h₈ := fHolo.vanishesOnRectangle hright'' - simp only [re_add_im] at * - additive_combination h₁ + h₂ + h₃ + h₄ + h₅ + h₆ + h₇ + h₈ - -/-- Given `f` holomorphic on a rectangle `z` and `w` except at -a point `p`, the integral of `f` over the rectangle with -corners `z` and `w` is the same as the integral of `f` over a -small square centered at `p`. -/ -lemma RectanglePullToNhdOfPole [CompleteSpace E] {z w p : ℂ} - (zRe_lt_wRe : z.re ≤ w.re) (zIm_lt_wIm : z.im ≤ w.im) - (hp : Rectangle z w ∈ 𝓝 p) (fHolo : HolomorphicOn f (Rectangle z w \ {p})) : - ∀ᶠ (c : ℝ) in 𝓝[>]0, - RectangleIntegral f z w = RectangleIntegral f (-c - I * c + p) (c + I * c + p) := by - filter_upwards [Ioo_mem_nhdsGT zero_lt_one, SmallSquareInRectangle hp] - intro c ⟨cpos, _⟩ hc - simp_rw [mul_comm I] - exact RectanglePullToNhdOfPole' (by simp_all [cpos.le]) - (square_mem_nhds p (ne_of_gt cpos)) hc fHolo - -lemma RectanglePullToNhdOfPole'' [CompleteSpace E] {z w p : ℂ} - (zRe_le_wRe : z.re ≤ w.re) (zIm_le_wIm : z.im ≤ w.im) - (pInRectInterior : Rectangle z w ∈ 𝓝 p) (fHolo : HolomorphicOn f (Rectangle z w \ {p})) : - ∀ᶠ (c : ℝ) in 𝓝[>]0, - RectangleIntegral' f z w = RectangleIntegral' f (-c - I * c + p) (c + I * c + p) := by - filter_upwards [RectanglePullToNhdOfPole zRe_le_wRe zIm_le_wIm pInRectInterior fHolo] with c h - simp_rw [RectangleIntegral', h] - -theorem ResidueTheoremAtOrigin_aux1c (a b : ℝ) : - let f : ℝ → ℂ := fun y => (y + I)⁻¹ - IntervalIntegrable f volume a b := - (ContinuousOn.inv₀ (by fun_prop) - (by simp [Complex.ext_iff])).intervalIntegrable - -theorem ResidueTheoremAtOrigin_aux1c' (a b : ℝ) : - let f : ℝ → ℂ := fun y => (y - I)⁻¹ - IntervalIntegrable f volume a b := - (ContinuousOn.inv₀ (by fun_prop) - (by simp [Complex.ext_iff])).intervalIntegrable - -theorem ResidueTheoremAtOrigin_aux2c (a b : ℝ) : - let f : ℝ → ℂ := fun y => (1 + y * I)⁻¹ - IntervalIntegrable f volume a b := - (ContinuousOn.inv₀ (by fun_prop) - (by simp [Complex.ext_iff])).intervalIntegrable - -theorem ResidueTheoremAtOrigin_aux2c' (a b : ℝ) : - let f : ℝ → ℂ := fun y => (-1 + y * I)⁻¹ - IntervalIntegrable f volume a b := - (ContinuousOn.inv₀ (by fun_prop) - (by simp [Complex.ext_iff])).intervalIntegrable - theorem RectangleIntegral.const_smul (f : ℂ → E) (z w c : ℂ) : RectangleIntegral (fun s => c • f s) z w = c • RectangleIntegral f z w := by simp [RectangleIntegral, HIntegral, VIntegral, smul_add, smul_sub, smul_smul, mul_comm] -theorem RectangleIntegral.const_mul' (f : ℂ → E) (z w c : ℂ) : - RectangleIntegral' (fun s => c • f s) z w = c • RectangleIntegral' f z w := by - simp [RectangleIntegral', RectangleIntegral.const_smul, smul_smul] - ring_nf - theorem RectangleIntegral.translate (f : ℂ → E) (z w p : ℂ) : RectangleIntegral (fun s => f (s - p)) z w = RectangleIntegral f (z - p) (w - p) := by simp_rw [RectangleIntegral, HIntegral, VIntegral, sub_re, sub_im, @@ -517,42 +227,6 @@ theorem ResidueTheoremInRectangle rwa [ResidueTheoremAtOrigin'] all_goals simp [*] -lemma ResidueTheoremAtOrigin : - RectangleIntegral' (fun s ↦ 1 / s) (-1 - I) (1 + I) = 1 := by - rw [RectangleIntegral', ResidueTheoremAtOrigin'] - all_goals simp [field] - -lemma ResidueTheoremOnRectangleWithSimplePole {f g : ℂ → ℂ} {z w p A : ℂ} - (zRe_le_wRe : z.re ≤ w.re) (zIm_le_wIm : z.im ≤ w.im) - (pInRectInterior : Rectangle z w ∈ 𝓝 p) (gHolo : HolomorphicOn g (Rectangle z w)) - (principalPart : Set.EqOn (f - fun s ↦ A / (s - p)) g (Rectangle z w \ {p})) : - RectangleIntegral' f z w = A := by - have principalPart' : Set.EqOn f (g + (fun s ↦ A / (s - p))) (Rectangle z w \ {p}) := - fun s hs => by rw [Pi.add_apply, ← principalPart hs, Pi.sub_apply, sub_add_cancel] - have : Set.EqOn f (g + (fun s ↦ A / (s - p))) (RectangleBorder z w) := - principalPart'.mono <| Set.subset_sdiff.mpr - ⟨rectangleBorder_subset_rectangle z w, - disjoint_singleton_right.mpr - (not_mem_rectangleBorder_of_rectangle_mem_nhds pInRectInterior)⟩ - rw [RectangleIntegral'_congr this] - have t1 : RectangleBorderIntegrable g z w := - gHolo.rectangleBorderIntegrable - have t2 : HolomorphicOn (fun s ↦ A / (s - p)) (Rectangle z w \ {p}) := by - apply DifferentiableOn.mono (t := {p}ᶜ) - · apply DifferentiableOn.div - · exact differentiableOn_const _ - · exact DifferentiableOn.sub differentiableOn_id (differentiableOn_const _) - · exact fun x hx => by - rw [sub_ne_zero] - exact hx - · rintro s ⟨_, hs⟩ - exact hs - have t3 : RectangleBorderIntegrable (fun s ↦ A / (s - p)) z w := - HolomorphicOn.rectangleBorderIntegrable' t2 pInRectInterior - rw [RectangleIntegral', RectangleBorderIntegrable.add t1 t3, smul_add] - rw [gHolo.vanishesOnRectangle (by rfl), smul_zero, zero_add] - exact ResidueTheoremInRectangle zRe_le_wRe zIm_le_wIm pInRectInterior - lemma IsBigO_to_BddAbove {f : ℂ → ℂ} {p : ℂ} (f_near_p : f =O[𝓝[≠] p] (1 : ℂ → ℂ)) : ∃ U ∈ 𝓝 p, BddAbove (norm ∘ f '' (U \ {p})) := by @@ -572,59 +246,6 @@ lemma IsBigO_to_BddAbove {f : ℂ → ℂ} {p : ℂ} rw [← fxy] simpa [x_not_p] using hU x_in_U -theorem BddAbove_on_rectangle_of_bdd_near {z w p : ℂ} {f : ℂ → ℂ} - (f_cont : ContinuousOn f (Rectangle z w \ {p})) - (f_near_p : f =O[𝓝[≠] p] (1 : ℂ → ℂ)) : - BddAbove (norm ∘ f '' (Rectangle z w \ {p})) := by - obtain ⟨V, V_in_nhds, V_prop⟩ := IsBigO_to_BddAbove f_near_p - rw [mem_nhds_iff] at V_in_nhds - obtain ⟨W, W_subset, W_open, p_in_W⟩ := V_in_nhds - set U := Rectangle z w - have : U \ {p} = (U \ W) ∪ ((U ∩ W) \ {p}) := by - ext x - simp only [Set.mem_sdiff, mem_singleton_iff, mem_union, mem_inter_iff] - constructor - · intro ⟨xu, x_not_p⟩ - tauto - · intro h - rcases h with ⟨h1, h2⟩ | ⟨⟨h1, h2⟩, h3⟩ - · refine ⟨h1, ?_⟩ - intro h - rw [← h] at p_in_W - exact h2 p_in_W - · tauto - rw [this, image_union] - apply BddAbove.union - · apply IsCompact.bddAbove_image - · apply IsCompact.diff _ W_open - exact IsCompact.reProdIm isCompact_uIcc isCompact_uIcc - · apply f_cont.norm.mono - apply Set.sdiff_subset_sdiff_right - simpa - · exact V_prop.mono - (image_mono <| Set.sdiff_subset_sdiff_left <| subset_trans inter_subset_right W_subset) - -theorem ResidueTheoremOnRectangleWithSimplePole' {f : ℂ → ℂ} {z w p A : ℂ} - (zRe_le_wRe : z.re ≤ w.re) (zIm_le_wIm : z.im ≤ w.im) - (pInRectInterior : Rectangle z w ∈ 𝓝 p) (fHolo : HolomorphicOn f (Rectangle z w \ {p})) - (near_p : (f - (fun s ↦ A / (s - p))) =O[𝓝[≠] p] (1 : ℂ → ℂ)) : - RectangleIntegral' f z w = A := by - set g := f - (fun s ↦ A / (s - p)) - have gHolo : HolomorphicOn g (Rectangle z w \ {p}) := by - apply DifferentiableOn.sub fHolo - intro s hs - have : s - p ≠ 0 := sub_ne_zero.mpr hs.2 - exact DifferentiableWithinAt.div (by fun_prop) (by fun_prop) this - have := BddAbove_on_rectangle_of_bdd_near gHolo.continuousOn near_p - obtain ⟨h, ⟨hHolo, hEq⟩⟩ := existsDifferentiableOn_of_bddAbove pInRectInterior gHolo this - exact ResidueTheoremOnRectangleWithSimplePole zRe_le_wRe zIm_le_wIm pInRectInterior hHolo hEq - -/-! ## Residue calculus: residues, simple poles, and the rectangle residue theorem - -The simple-pole `residue`, `sumResiduesIn`, the `HasSimplePolesOn` scaffold, and the rectangle -residue theorem `RectangleIntegral'_eq_sumResiduesIn`. Extracted from `CH2.lean` as general, -reusable contour-integration lemmas (see issue #1537). -/ - /-- Every pole of `f` in `s` is at most simple: the meromorphic order is `≥ -1` everywhere on `s` (no poles of order `≤ -2`). @@ -654,500 +275,3 @@ Mathlib residue-theorem API lands. -/ noncomputable def residue (f : ℂ → ℂ) (z₀ : ℂ) : ℂ := Filter.limUnder (nhdsWithin z₀ {z₀}ᶜ) (fun z ↦ (z - z₀) * f z) -/-- The sum of residues of `f` over a region `S`, as a `tsum` over `S`. Points of analyticity -contribute `0`, so this is effectively the sum over the poles of `f` in `S`; when finitely many -poles lie in `S` the `tsum` equals the finite sum of their residues, regardless of `|S|`. (With -infinitely many poles, summability must be assumed for the value to be meaningful.) -/ -noncomputable def sumResiduesIn (f : ℂ → ℂ) (S : Set ℂ) : ℂ := - ∑' z : S, residue f z - -lemma residue_eq_of_tendsto {f : ℂ → ℂ} {p c : ℂ} - (h : Filter.Tendsto (fun z ↦ (z - p) * f z) (nhdsWithin p {p}ᶜ) (nhds c)) : - residue f p = c := by - unfold residue - exact h.limUnder_eq - -lemma residue_analyticAt_eq_zero {f : ℂ → ℂ} {p : ℂ} (hf : AnalyticAt ℂ f p) : - residue f p = 0 := by - apply residue_eq_of_tendsto - have hsub : Filter.Tendsto (fun z : ℂ ↦ z - p) (nhdsWithin p {p}ᶜ) (nhds 0) := - tendsto_sub_nhds_zero_iff.mpr (tendsto_id.mono_left nhdsWithin_le_nhds) - have hf' : Filter.Tendsto f (nhdsWithin p {p}ᶜ) (nhds (f p)) := - hf.continuousAt.continuousWithinAt.tendsto - simpa using hsub.mul hf' - -lemma simplePole_sub_residue_isBigO_one {f : ℂ → ℂ} {p : ℂ} - (hf : MeromorphicAt f p) (hord : meromorphicOrderAt f p = (-1 : ℤ)) : - (f - (fun z ↦ residue f p / (z - p))) =O[nhdsWithin p {p}ᶜ] (1 : ℂ → ℂ) := by - obtain ⟨g, hg_analytic, hg_ne, hg_eq⟩ := (meromorphicOrderAt_eq_int_iff hf).1 hord - have hres : residue f p = g p := - residue_eq_of_tendsto (hg_analytic.continuousAt.continuousWithinAt.tendsto.congr' - (show (fun z ↦ (z - p) * f z) =ᶠ[nhdsWithin p {p}ᶜ] g from by - filter_upwards [hg_eq, self_mem_nhdsWithin] with z hz hz_ne - simp [hz, sub_ne_zero.mpr hz_ne]).symm) - have hdslope : (fun z ↦ (z - p)⁻¹ * (g z - g p)) =O[nhdsWithin p {p}ᶜ] (1 : ℂ → ℂ) := by - have hcont : ContinuousAt (dslope g p) p := - continuousAt_dslope_same.2 hg_analytic.differentiableAt - have hbig : dslope g p =O[nhds p] (1 : ℂ → ℂ) := - hcont.norm.isBoundedUnder_le.isBigO_one ℂ - have hbig_ne : dslope g p =O[nhdsWithin p {p}ᶜ] (1 : ℂ → ℂ) := - IsBigO.mono hbig inf_le_left - simpa [slope] using! hbig_ne.congr' (dslope_eventuallyEq_slope_nhdsNE (f := g) (a := p)) .rfl - refine hdslope.congr' ?_ .rfl - filter_upwards [hg_eq, self_mem_nhdsWithin] with z hz hz_ne - simp [hz, hres, div_eq_mul_inv, sub_eq_add_neg]; ring - --- If two functions `f g : ℂ → ℂ` agree on a `codiscreteWithin R` full set, and `φ : ℝ → ℂ` is --- an analytic non-constant path mapping `[a,b]` into `R`, then `∫ f(φ x) dx = ∫ g(φ x) dx`. --- (a.e. agreement along the preimage suffices for interval integrals) -private lemma intervalIntegral_congr_ae_of_codiscreteWithin_along_path - {f g : ℂ → ℂ} {R : Set ℂ} - (heq : {s : ℂ | f s = g s} ∈ Filter.codiscreteWithin R) - {a b : ℝ} {p : ℝ → ℂ} - (hp_an : AnalyticOnNhd ℝ p (Set.uIcc a b)) - (hp_nonconst : ∀ x ∈ Set.uIcc a b, ¬Filter.EventuallyConst p (nhds x)) - (hp_maps : Set.MapsTo p (Set.uIcc a b) R) : - ∫ x in a..b, f (p x) = ∫ x in a..b, g (p x) := by - refine intervalIntegral.integral_congr_ae_restrict (μ := volume) ?_ - apply ae_restrict_le_codiscreteWithin measurableSet_uIoc - change {x : ℝ | f (p x) = g (p x)} ∈ Filter.codiscreteWithin (Set.uIoc a b) - simpa [Set.preimage] using Filter.codiscreteWithin_mono Set.uIoc_subset_uIcc - (hp_an.preimage_mem_codiscreteWithin hp_nonconst - (Filter.codiscreteWithin_mono - (by intro s hs; rcases hs with ⟨x, hx, rfl⟩; exact hp_maps hx) heq)) - --- Under `HasSimplePolesOn f U`, every point with strictly negative meromorphic order has order --- exactly -1: the simple-pole hypothesis gives `(-1 : ℤ) ≤ order`, negativity gives `order < 0`, --- so the only integer fitting both is -1. -private lemma meromorphicOrderAt_eq_neg_one_of_simplePole - {f : ℂ → ℂ} {U : Set ℂ} {p : ℂ} - (hpU : p ∈ U) - (hf_simple : HasSimplePolesOn f U) - (hpneg : meromorphicOrderAt f p < 0) : - meromorphicOrderAt f p = (-1 : ℤ) := by - lift meromorphicOrderAt f p to ℤ using hpneg.ne_top with n hn - have hsimple : (-1 : ℤ) ≤ n := WithTop.coe_le_coe.mp (hn ▸ hf_simple p hpU) - have hneg : n < 0 := by exact_mod_cast hpneg - have hn1 : n = -1 := by omega - simp [hn1] - --- At a simple pole `p` of `f` inside `U`, the residue of the meromorphic normal form --- `toMeromorphicNFOn f U` equals the residue of `f`. The two functions agree on a punctured --- neighborhood of `p` (by definition of the normal form), so their `(z - p) * ·` limits coincide. -private lemma residue_toMeromorphicNFOn_eq_residue - {f : ℂ → ℂ} {U : Set ℂ} {p : ℂ} - (hpU : p ∈ U) - (hf_mero : MeromorphicOn f U) - (hf_simple : HasSimplePolesOn f U) - (hpneg : meromorphicOrderAt f p < 0) : - residue (toMeromorphicNFOn f U) p = residue f p := by - have hmero : MeromorphicAt f p := hf_mero p hpU - have h_exists : ∃ c, Filter.Tendsto (fun z : ℂ ↦ (z - p) * f z) (nhdsWithin p ({p}ᶜ)) (nhds c) := by - have hmul_mero : MeromorphicAt (fun z : ℂ ↦ (z - p) * f z) p := - (by fun_prop : MeromorphicAt (fun z : ℂ ↦ z - p) p).mul hmero - have hmul_nonneg : 0 ≤ meromorphicOrderAt (fun z : ℂ ↦ (z - p) * f z) p := by - change 0 ≤ meromorphicOrderAt ((fun z ↦ z - p) * f) p - rw [meromorphicOrderAt_mul (by fun_prop : MeromorphicAt (fun z : ℂ ↦ z - p) p) hmero, - meromorphicOrderAt_id_sub_const, - meromorphicOrderAt_eq_neg_one_of_simplePole hpU hf_simple hpneg] - norm_num - exact tendsto_nhds_of_meromorphicOrderAt_nonneg hmul_mero hmul_nonneg - have h_tendsto : Filter.Tendsto (fun z : ℂ ↦ (z - p) * f z) (nhdsWithin p ({p}ᶜ)) (nhds (residue f p)) := by - simpa [residue] using tendsto_nhds_limUnder h_exists - have h_eq : - (fun z ↦ (z - p) * toMeromorphicNFOn f U z) =ᶠ[nhdsWithin p ({p}ᶜ)] - (fun z ↦ (z - p) * f z) := by - filter_upwards [hf_mero.toMeromorphicNFOn_eq_self_on_nhdsNE hpU] with z hz - simp [hz] - exact residue_eq_of_tendsto - (h_tendsto.congr' h_eq.symm) - --- Non-constancy of horizontal paths `x ↦ x + h * I`. -private lemma horizontalPath_not_eventuallyConst (h : ℝ) (x : ℝ) : - ¬Filter.EventuallyConst (fun r : ℝ ↦ (r : ℂ) + (h : ℂ) * Complex.I) (nhds x) := by - intro hc - obtain ⟨c, hc⟩ := Filter.eventuallyConst_iff_exists_eventuallyEq.1 hc - have hpath : HasDerivAt (fun r : ℝ ↦ (r : ℂ) + (h : ℂ) * Complex.I) 1 x := by - simpa using (Complex.ofRealCLM.hasDerivAt (x := x)).add_const ((h : ℂ) * Complex.I) - have hconst : HasDerivAt (fun r : ℝ ↦ (r : ℂ) + (h : ℂ) * Complex.I) 0 x := - (hasDerivAt_const x c).congr_of_eventuallyEq hc - exact one_ne_zero (hpath.unique hconst) - --- Non-constancy of vertical paths `y ↦ r + y * I`. -lemma verticalPath_not_eventuallyConst (r : ℝ) (x : ℝ) : - ¬Filter.EventuallyConst (fun y : ℝ ↦ (r : ℂ) + (y : ℂ) * Complex.I) (nhds x) := by - intro hc - obtain ⟨c, hc⟩ := Filter.eventuallyConst_iff_exists_eventuallyEq.1 hc - have hpath : HasDerivAt (fun y : ℝ ↦ (r : ℂ) + (y : ℂ) * Complex.I) Complex.I x := by - simpa using ((Complex.ofRealCLM.hasDerivAt (x := x)).mul_const Complex.I).const_add (r : ℂ) - have hconst : HasDerivAt (fun y : ℝ ↦ (r : ℂ) + (y : ℂ) * Complex.I) 0 x := - (hasDerivAt_const x c).congr_of_eventuallyEq hc - exact Complex.I_ne_zero (hpath.unique hconst) - --- Helper for horizontal integral congruence on codiscrete set -private lemma HIntegral_congr_codiscreteWithin {f g : ℂ → ℂ} {R : Set ℂ} {a b c : ℝ} - (h_eq : {s : ℂ | f s = g s} ∈ Filter.codiscreteWithin R) - (hmaps : ∀ x ∈ Set.uIcc a b, (↑x + ↑c * Complex.I) ∈ R) : - HIntegral f a b c = HIntegral g a b c := by - unfold HIntegral - exact intervalIntegral_congr_ae_of_codiscreteWithin_along_path h_eq - (by intro x _; exact (Complex.ofRealCLM.analyticAt x).add analyticAt_const) - (fun x _ ↦ horizontalPath_not_eventuallyConst c x) hmaps - --- Helper for vertical integral congruence on codiscrete set -private lemma VIntegral_congr_codiscreteWithin {f g : ℂ → ℂ} {R : Set ℂ} {c a b : ℝ} - (h_eq : {s : ℂ | f s = g s} ∈ Filter.codiscreteWithin R) - (hmaps : ∀ y ∈ Set.uIcc a b, (↑c + ↑y * Complex.I) ∈ R) : - VIntegral f c a b = VIntegral g c a b := by - unfold VIntegral; simp only [smul_eq_mul]; congr 1 - exact intervalIntegral_congr_ae_of_codiscreteWithin_along_path h_eq - (by intro y _; exact analyticAt_const.add ((Complex.ofRealCLM.analyticAt y).mul analyticAt_const)) - (fun x _ ↦ verticalPath_not_eventuallyConst c x) hmaps - --- At the boundary, `f` and its normal-form representative differ only at a discrete set --- of poles, so their boundary integrals coincide. -private lemma rectangleIntegral'_toMeromorphicNFOn_eq {f : ℂ → ℂ} {z w : ℂ} - (f_mero : MeromorphicOn f (Rectangle z w)) : - RectangleIntegral' f z w = RectangleIntegral' (toMeromorphicNFOn f (Rectangle z w)) z w := by - classical - let R : Set ℂ := Rectangle z w - let fNF : ℂ → ℂ := toMeromorphicNFOn f R - have h_eq : {s : ℂ | f s = fNF s} ∈ Filter.codiscreteWithin R := by - simpa [Filter.EventuallyEq, Filter.Eventually, fNF] using - (toMeromorphicNFOn_eqOn_codiscrete (f := f) (U := R) f_mero) - have hbot := HIntegral_congr_codiscreteWithin h_eq (by simpa [R] using! mapsTo_rectangle_left_im z w) - have htop := HIntegral_congr_codiscreteWithin h_eq (by simpa [R] using! mapsTo_rectangle_right_im z w) - have hright := VIntegral_congr_codiscreteWithin h_eq (by simpa [R] using! mapsTo_rectangle_right_re z w) - have hleft := VIntegral_congr_codiscreteWithin h_eq (by simpa [R] using! mapsTo_rectangle_left_re z w) - unfold RectangleIntegral'; congr 1; unfold RectangleIntegral - rw [hbot, htop, hright, hleft] - -private lemma principalPart_meromorphicOn {R : Set ℂ} {polesFin : Finset ℂ} {c : ℂ → ℂ} : - MeromorphicOn (fun s ↦ ∑ p ∈ polesFin, c p / (s - p)) R := by - intro x _ - refine MeromorphicAt.fun_sum (G := fun p s ↦ c p / (s - p)) ?_ - intro p _ - exact (analyticAt_const.meromorphicAt.div - ((analyticAt_id.sub analyticAt_const).meromorphicAt)) - -private lemma sub_principalPart_analyticAt_of_not_mem_poles - {f : ℂ → ℂ} {polesFin : Finset ℂ} {x : ℂ} - (h_nf : MeromorphicNFAt f x) - (hxnp : x ∉ polesFin) - (hxneg : 0 ≤ meromorphicOrderAt f x) : - AnalyticAt ℂ (f - fun s ↦ ∑ p ∈ polesFin, residue f p / (s - p)) x := by - have h_f_analytic : AnalyticAt ℂ f x := - h_nf.meromorphicOrderAt_nonneg_iff_analyticAt.1 hxneg - have h_principal_analytic : AnalyticAt ℂ (fun s ↦ ∑ p ∈ polesFin, residue f p / (s - p)) x := by - refine Finset.analyticAt_fun_sum polesFin ?_ - intro p hp - have hxp : x ≠ p := by - intro heq - subst heq - exact hxnp hp - have : AnalyticAt ℂ (fun z : ℂ ↦ residue f p / (z - p)) x := by - fun_prop (disch := exact sub_ne_zero.mpr hxp) - simpa using this - exact h_f_analytic.sub h_principal_analytic - -private lemma meromorphicOrderAt_sub_principalPart_nonneg - {f : ℂ → ℂ} {polesFin : Finset ℂ} {p : ℂ} - (hpFin : p ∈ polesFin) - (h_mero : MeromorphicAt f p) - (h_ord : meromorphicOrderAt f p = -1) : - 0 ≤ meromorphicOrderAt (f - fun s ↦ ∑ q ∈ polesFin, residue f q / (s - q)) p := by - have hcore : (f - fun z ↦ residue f p / (z - p)) =O[nhdsWithin p ({p}ᶜ)] (1 : ℂ → ℂ) := by - exact simplePole_sub_residue_isBigO_one h_mero h_ord - let rest : ℂ → ℂ := fun z ↦ ∑ q ∈ polesFin.erase p, residue f q / (z - q) - have hrest_cont : ContinuousAt rest p := by - dsimp [rest] - refine tendsto_finsetSum _ (fun q hq ↦ ?_) - have hpq : p - q ≠ 0 := sub_ne_zero.mpr (Finset.mem_erase.mp hq).1.symm - have h_cont : ContinuousAt (fun z : ℂ ↦ residue f q / (z - q)) p := by - fun_prop (disch := exact hpq) - exact h_cont - have hrest : rest =O[nhdsWithin p ({p}ᶜ)] (1 : ℂ → ℂ) := by - have hbig : rest =O[nhds p] (1 : ℂ → ℂ) := - hrest_cont.norm.isBoundedUnder_le.isBigO_one ℂ - exact IsBigO.mono hbig inf_le_left - have hraw_big : (f - fun s ↦ ∑ q ∈ polesFin, residue f q / (s - q)) =O[nhdsWithin p ({p}ᶜ)] (1 : ℂ → ℂ) := by - have htmp : (fun z : ℂ ↦ (f z - residue f p / (z - p)) - rest z) =O[nhdsWithin p ({p}ᶜ)] (1 : ℂ → ℂ) := - hcore.sub hrest - have hdecomp : (f - fun s ↦ ∑ q ∈ polesFin, residue f q / (s - q)) = - (fun z : ℂ ↦ (f z - residue f p / (z - p)) - rest z) := by - funext z - dsimp [rest] - rw [← Finset.add_sum_erase (s := polesFin) (f := fun q ↦ residue f q / (z - q)) hpFin] - simp [sub_eq_add_neg, add_assoc, add_comm] - simpa [hdecomp, rest] using htmp - by_contra hneg - have hnorm : Filter.Tendsto (fun z : ℂ ↦ ‖(f - fun s ↦ ∑ q ∈ polesFin, residue f q / (s - q)) z‖) (nhdsWithin p ({p}ᶜ)) Filter.atTop := by - rw [tendsto_norm_atTop_iff_cobounded] - exact tendsto_cobounded_of_meromorphicOrderAt_neg (not_le.mp hneg) - exact (Filter.not_isBoundedUnder_of_tendsto_atTop hnorm) hraw_big.isBoundedUnder_le - -private lemma holoPart_holomorphicOn {f : ℂ → ℂ} {z w : ℂ} - (f_mero : MeromorphicOn f (Rectangle z w)) - (f_simple_poles : HasSimplePolesOn f (Rectangle z w)) - (f_poles_finite : (Rectangle z w ∩ {z | meromorphicOrderAt f z < 0}).Finite) : - HolomorphicOn (toMeromorphicNFOn (toMeromorphicNFOn f (Rectangle z w) - - fun s ↦ ∑ p ∈ f_poles_finite.toFinset, residue (toMeromorphicNFOn f (Rectangle z w)) p / (s - p)) (Rectangle z w)) (Rectangle z w) := by - classical - let R := Rectangle z w - let poles := R ∩ {u | meromorphicOrderAt f u < 0} - let polesFin := f_poles_finite.toFinset - let fNF := toMeromorphicNFOn f R - let principalPart := fun s ↦ ∑ p ∈ polesFin, residue fNF p / (s - p) - let holoPart := toMeromorphicNFOn (fNF - principalPart) R - have h_fNF_mero : MeromorphicOn fNF R := by - simpa [fNF] using - (meromorphicNFOn_toMeromorphicNFOn (f := f) (U := R)).meromorphicOn - have h_principalPart_mero : MeromorphicOn principalPart R := principalPart_meromorphicOn - have h_raw_mero : MeromorphicOn (fNF - principalPart) R := h_fNF_mero.sub h_principalPart_mero - intro x hx - have h_raw_nonneg : 0 ≤ meromorphicOrderAt (fNF - principalPart) x := by - by_cases hxp : x ∈ poles - · have hpFin : x ∈ polesFin := by simpa [polesFin, poles] using hxp - have hord : meromorphicOrderAt f x = (-1 : ℤ) := - meromorphicOrderAt_eq_neg_one_of_simplePole hxp.1 f_simple_poles hxp.2 - have hordNF : meromorphicOrderAt fNF x = (-1 : ℤ) := by - rw [show meromorphicOrderAt fNF x = meromorphicOrderAt f x by - simpa [fNF] using - (meromorphicOrderAt_toMeromorphicNFOn (f := f) (U := R) f_mero hxp.1)] - exact hord - exact meromorphicOrderAt_sub_principalPart_nonneg hpFin (h_fNF_mero x hxp.1) hordNF - · have hxnp : x ∉ polesFin := by - intro h - exact hxp (by simpa [polesFin, poles] using h) - have h_fNF_nonneg : 0 ≤ meromorphicOrderAt fNF x := by - rw [show meromorphicOrderAt fNF x = meromorphicOrderAt f x by - simpa [fNF] using - (meromorphicOrderAt_toMeromorphicNFOn (f := f) (U := R) f_mero hx)] - exact le_of_not_gt fun hxneg => hxp ⟨hx, hxneg⟩ - have h_fNF_nf : MeromorphicNFAt fNF x := by - simpa [fNF] using - (meromorphicNFOn_toMeromorphicNFOn (f := f) (U := R) hx) - exact (sub_principalPart_analyticAt_of_not_mem_poles h_fNF_nf hxnp h_fNF_nonneg).meromorphicOrderAt_nonneg - have h_nf : MeromorphicNFAt holoPart x := by - simpa [holoPart] using - (meromorphicNFOn_toMeromorphicNFOn (f := fNF - principalPart) (U := R) hx) - have h_ord : - meromorphicOrderAt holoPart x = meromorphicOrderAt (fNF - principalPart) x := by - simpa [holoPart] using - (meromorphicOrderAt_toMeromorphicNFOn (f := fNF - principalPart) (U := R) h_raw_mero hx) - exact (h_nf.meromorphicOrderAt_nonneg_iff_analyticAt.1 (h_ord.symm ▸ h_raw_nonneg)).differentiableAt.differentiableWithinAt - --- Since no poles lie on the boundary of the rectangle, the principal part is continuous --- on the boundary and therefore integrable. -private lemma principalPart_borderIntegrable {f : ℂ → ℂ} {z w : ℂ} - (f_no_poles_boundary : Disjoint (RectangleBorder z w) {z | meromorphicOrderAt f z < 0}) - (f_poles_finite : (Rectangle z w ∩ {z | meromorphicOrderAt f z < 0}).Finite) : - RectangleBorderIntegrable (fun s ↦ ∑ p ∈ f_poles_finite.toFinset, residue (toMeromorphicNFOn f (Rectangle z w)) p / (s - p)) z w := by - classical - let R := Rectangle z w - let poles := R ∩ {u | meromorphicOrderAt f u < 0} - let polesFin := f_poles_finite.toFinset - let fNF := toMeromorphicNFOn f R - let principalPart := fun s ↦ ∑ p ∈ polesFin, residue fNF p / (s - p) - refine ContinuousOn.rectangleBorder_integrable ?_ - refine continuousOn_finsetSum _ ?_ - intro p hp s hs - have hsp : s ≠ p := fun hsp => Set.disjoint_right.mp f_no_poles_boundary - ((by simpa [polesFin, poles] using hp : p ∈ poles).2) (hsp ▸ hs) - have : ContinuousAt (fun z : ℂ ↦ residue fNF p / (z - p)) s := by - fun_prop (disch := exact sub_ne_zero.mpr hsp) - exact this.continuousWithinAt - -private lemma rectangle_mem_nhds_of_interior {z w p : ℂ} - (zRe_le_wRe : z.re ≤ w.re) (zIm_le_wIm : z.im ≤ w.im) - (hpR : p ∈ Rectangle z w) (hpnot : p ∉ RectangleBorder z w) : - Rectangle z w ∈ nhds p := by - rw [mem_Rect zRe_le_wRe zIm_le_wIm] at hpR - have hp_re_left : z.re < p.re := - lt_of_le_of_ne hpR.1 fun hEq => hpnot - (by simp [RectangleBorder, hEq, hpR.2.2.1, hpR.2.2.2, zIm_le_wIm, mem_reProdIm]) - have hp_re_right : p.re < w.re := - lt_of_le_of_ne hpR.2.1 fun hEq => hpnot - (by simp [RectangleBorder, hEq, hpR.2.2.1, hpR.2.2.2, zIm_le_wIm, mem_reProdIm]) - have hp_im_left : z.im < p.im := - lt_of_le_of_ne hpR.2.2.1 fun hEq => hpnot - (by simp [RectangleBorder, hEq, hpR.1, hpR.2.1, zRe_le_wRe, mem_reProdIm]) - have hp_im_right : p.im < w.im := - lt_of_le_of_ne hpR.2.2.2 fun hEq => hpnot - (by simp [RectangleBorder, hEq, hpR.1, hpR.2.1, zRe_le_wRe, mem_reProdIm]) - rw [rectangle_mem_nhds_iff, mem_reProdIm, Set.uIoo_of_le zRe_le_wRe, Set.uIoo_of_le zIm_le_wIm] - exact ⟨⟨hp_re_left, hp_re_right⟩, ⟨hp_im_left, hp_im_right⟩⟩ - -private lemma sum_div_rectangleBorderIntegrable {z w : ℂ} {S : Finset ℂ} - (hS_disjoint : Disjoint (RectangleBorder z w) S) (c : ℂ → ℂ) : - RectangleBorderIntegrable (fun s ↦ ∑ p ∈ S, c p / (s - p)) z w := by - refine ContinuousOn.rectangleBorder_integrable ?_ - refine continuousOn_finsetSum _ ?_ - intro p hp s hs - have hsp : s ≠ p := fun hsp => Set.disjoint_right.mp hS_disjoint hp (hsp ▸ hs) - have : ContinuousAt (fun z : ℂ ↦ c p / (z - p)) s := by - fun_prop (disch := exact sub_ne_zero.mpr hsp) - exact this.continuousWithinAt - --- The integral of a sum of simple pole terms `c p / (s - p)` along the boundary of the rectangle --- equals the sum of the coefficients `c p` for all points `p` in the interior. -private lemma rectangleIntegral'_sum_div_sub {z w : ℂ} (zRe_le_wRe : z.re ≤ w.re) (zIm_le_wIm : z.im ≤ w.im) - {S : Finset ℂ} (hS_subset : (S : Set ℂ) ⊆ Rectangle z w) - (hS_disjoint : Disjoint (RectangleBorder z w) S) - (c : ℂ → ℂ) : - RectangleIntegral' (fun s ↦ ∑ p ∈ S, c p / (s - p)) z w = ∑ p ∈ S, c p := by - classical - have h_partial_border : ∀ (S' : Finset ℂ), S' ⊆ S → RectangleBorderIntegrable (fun s ↦ ∑ p ∈ S', c p / (s - p)) z w := by - intro S' hS' - exact sum_div_rectangleBorderIntegrable (Disjoint.mono_right hS' hS_disjoint) c - have h_term_integral : ∀ {p : ℂ}, p ∈ S → RectangleIntegral' (fun s ↦ c p / (s - p)) z w = c p := - fun {p} hp => ResidueTheoremInRectangle zRe_le_wRe zIm_le_wIm - (rectangle_mem_nhds_of_interior zRe_le_wRe zIm_le_wIm - (hS_subset hp) (Set.disjoint_right.mp hS_disjoint hp)) - have h_partial_integral : - ∀ (S' : Finset ℂ), S' ⊆ S → - RectangleIntegral' (fun s ↦ ∑ p ∈ S', c p / (s - p)) z w = - ∑ p ∈ S', c p := by - intro S' hS' - revert hS' - refine Finset.induction_on S' ?_ ?_ - · intro _ - simp [RectangleIntegral', RectangleIntegral, HIntegral, VIntegral] - · intro a S' ha ih hS' - obtain ⟨haFin, hSsub⟩ := Finset.insert_subset_iff.mp hS' - have hterm_border : - RectangleBorderIntegrable (fun s ↦ c a / (s - a)) z w := - by simpa using h_partial_border ({a} : Finset ℂ) (Finset.singleton_subset_iff.mpr haFin) - have hfun : - (fun s ↦ ∑ p ∈ insert a S', c p / (s - p)) = - (fun s ↦ c a / (s - a)) + - (fun s ↦ ∑ p ∈ S', c p / (s - p)) := by - funext s; simp [Finset.sum_insert, ha] - have h_add_primed : - RectangleIntegral' ((fun s ↦ c a / (s - a)) + (fun s ↦ ∑ p ∈ S', c p / (s - p))) z w = - RectangleIntegral' (fun s ↦ c a / (s - a)) z w + - RectangleIntegral' (fun s ↦ ∑ p ∈ S', c p / (s - p)) z w := by - unfold RectangleIntegral' - rw [RectangleBorderIntegrable.add hterm_border (h_partial_border S' hSsub), smul_add] - rw [hfun, h_add_primed, h_term_integral haFin, ih hSsub, Finset.sum_insert ha] - exact h_partial_integral S (by intro p hp; exact hp) - --- Splits the integral of `fNF` into the integral of its holomorphic part and its principal part. -private lemma toMeromorphicNFOn_add_integral {f : ℂ → ℂ} {z w : ℂ} - (f_mero : MeromorphicOn f (Rectangle z w)) - (f_no_poles_boundary : Disjoint (RectangleBorder z w) {z | meromorphicOrderAt f z < 0}) - (f_poles_finite : (Rectangle z w ∩ {z | meromorphicOrderAt f z < 0}).Finite) - (f_simple_poles : HasSimplePolesOn f (Rectangle z w)) : - RectangleIntegral' (toMeromorphicNFOn f (Rectangle z w)) z w = - RectangleIntegral' (toMeromorphicNFOn (toMeromorphicNFOn f (Rectangle z w) - - fun s ↦ ∑ p ∈ f_poles_finite.toFinset, residue (toMeromorphicNFOn f (Rectangle z w)) p / (s - p)) (Rectangle z w)) z w + - RectangleIntegral' (fun s ↦ ∑ p ∈ f_poles_finite.toFinset, residue (toMeromorphicNFOn f (Rectangle z w)) p / (s - p)) z w := by - let R : Set ℂ := Rectangle z w - let poles : Set ℂ := R ∩ {u | meromorphicOrderAt f u < 0} - let polesFin : Finset ℂ := f_poles_finite.toFinset - let fNF : ℂ → ℂ := toMeromorphicNFOn f R - let principalPart : ℂ → ℂ := fun s ↦ ∑ p ∈ polesFin, residue fNF p / (s - p) - let holoPart : ℂ → ℂ := toMeromorphicNFOn (fNF - principalPart) R - have h_holoPart_border : RectangleBorderIntegrable holoPart z w := - (holoPart_holomorphicOn f_mero f_simple_poles f_poles_finite).rectangleBorderIntegrable - have h_fNF_eq : - Set.EqOn fNF (holoPart + principalPart) (RectangleBorder z w) := by - intro s hs - have hsR : s ∈ R := rectangleBorder_subset_rectangle z w hs - have hsnp : s ∉ poles := fun hsp => Set.disjoint_right.mp f_no_poles_boundary hsp.2 hs - have hraw_analytic : AnalyticAt ℂ (fNF - principalPart) s := by - have h_fNF_nonneg : 0 ≤ meromorphicOrderAt fNF s := by - rw [show meromorphicOrderAt fNF s = meromorphicOrderAt f s by - simpa [fNF] using - (meromorphicOrderAt_toMeromorphicNFOn (f := f) (U := R) f_mero hsR)] - exact le_of_not_gt fun hsneg => hsnp ⟨hsR, hsneg⟩ - exact sub_principalPart_analyticAt_of_not_mem_poles - (by simpa [fNF] using meromorphicNFOn_toMeromorphicNFOn (f := f) (U := R) hsR) - (fun h => hsnp (by simpa [polesFin, poles] using h)) - h_fNF_nonneg - have hs_eq : holoPart s = (fNF - principalPart) s := by - rw [show holoPart = toMeromorphicNFOn (fNF - principalPart) R by rfl] - have h_fNF_mero : MeromorphicOn fNF R := by - simpa [fNF] using (meromorphicNFOn_toMeromorphicNFOn (f := f) (U := R)).meromorphicOn - have hf_sub_mero : MeromorphicOn (fNF - principalPart) R := - h_fNF_mero.sub principalPart_meromorphicOn - rw [toMeromorphicNFOn_eq_toMeromorphicNFAt (f := fNF - principalPart) (U := R) hf_sub_mero hsR] - exact congr_fun (toMeromorphicNFAt_eq_self.2 hraw_analytic.meromorphicNFAt) s - calc - fNF s = (fNF - principalPart) s + principalPart s := by simp - _ = holoPart s + principalPart s := by rw [← hs_eq] - rw [RectangleIntegral'_congr h_fNF_eq, RectangleIntegral', - RectangleBorderIntegrable.add h_holoPart_border - (principalPart_borderIntegrable f_no_poles_boundary f_poles_finite), smul_add] - -/-- The Residue Theorem on a rectangle for functions with simple poles. -/ -lemma RectangleIntegral'_eq_sumResiduesIn {f : ℂ → ℂ} {z w : ℂ} - (zRe_le_wRe : z.re ≤ w.re) (zIm_le_wIm : z.im ≤ w.im) - (f_mero : MeromorphicOn f (Rectangle z w)) - (f_no_poles_boundary : Disjoint (RectangleBorder z w) {z | meromorphicOrderAt f z < 0}) - (f_poles_finite : (Rectangle z w ∩ {z | meromorphicOrderAt f z < 0}).Finite) - (f_simple_poles : HasSimplePolesOn f (Rectangle z w)) : - RectangleIntegral' f z w = sumResiduesIn f (Rectangle z w ∩ {z | meromorphicOrderAt f z < 0}) := by - let R : Set ℂ := Rectangle z w - let poles : Set ℂ := R ∩ {u | meromorphicOrderAt f u < 0} - let polesFin : Finset ℂ := f_poles_finite.toFinset - let fNF : ℂ → ℂ := toMeromorphicNFOn f R - let principalPart : ℂ → ℂ := fun s ↦ ∑ p ∈ polesFin, residue fNF p / (s - p) - let holoPart : ℂ → ℂ := toMeromorphicNFOn (fNF - principalPart) R - have h_residue_congr : sumResiduesIn f poles = sumResiduesIn fNF poles := by - rw [sumResiduesIn, sumResiduesIn] - apply tsum_congr - intro p - exact (residue_toMeromorphicNFOn_eq_residue p.2.1 f_mero f_simple_poles p.2.2).symm - have h_principalPart_integral : RectangleIntegral' principalPart z w = sumResiduesIn fNF poles := by - have h_sum : RectangleIntegral' principalPart z w = ∑ p ∈ polesFin, residue fNF p := by - apply rectangleIntegral'_sum_div_sub zRe_le_wRe zIm_le_wIm - · intro p hp - dsimp [polesFin, poles, R] at hp - simp only [Finset.mem_coe, Set.Finite.mem_toFinset] at hp - exact hp.1 - · exact Disjoint.mono_right (by rw [f_poles_finite.coe_toFinset]; exact Set.inter_subset_right) f_no_poles_boundary - rw [h_sum] - have h_eq_poles : poles = ↑polesFin := by - dsimp [poles, polesFin, R] - exact f_poles_finite.coe_toFinset.symm - rw [sumResiduesIn, h_eq_poles, - tsum_fintype (f := fun p : (polesFin : Set ℂ) => residue fNF p), - ← Finset.sum_coe_sort polesFin]; rfl - calc - RectangleIntegral' f z w = RectangleIntegral' fNF z w := rectangleIntegral'_toMeromorphicNFOn_eq f_mero - _ = RectangleIntegral' holoPart z w + RectangleIntegral' principalPart z w := - toMeromorphicNFOn_add_integral f_mero f_no_poles_boundary f_poles_finite f_simple_poles - _ = 0 + sumResiduesIn fNF poles := by - rw [h_principalPart_integral] - rw [RectangleIntegral', - (holoPart_holomorphicOn f_mero f_simple_poles f_poles_finite).vanishesOnRectangle subset_rfl] - simp - _ = sumResiduesIn fNF poles := by simp - _ = sumResiduesIn f poles := h_residue_congr.symm - -lemma residue_eq_zero_of_not_pole_of_meromorphicAt {F : ℂ → ℂ} {s : ℂ} - (hs_mero : MeromorphicAt F s) (hs_not_pole : 0 ≤ meromorphicOrderAt F s) : - residue F s = 0 := by - apply residue_eq_of_tendsto - obtain ⟨c, hc⟩ := tendsto_nhds_of_meromorphicOrderAt_nonneg hs_mero hs_not_pole - have hsub : Filter.Tendsto (fun z : ℂ ↦ z - s) (nhdsWithin s {s}ᶜ) (nhds 0) := - tendsto_sub_nhds_zero_iff.mpr (tendsto_id.mono_left nhdsWithin_le_nhds) - simpa using hsub.mul hc - -lemma sumResiduesIn_inter_eq_of_set_eq {F : ℂ → ℂ} {Rn S2 P : Set ℂ} - (h_set_eq : Rn ∩ P = S2 ∩ P) - (h_residue_zero : ∀ s ∈ S2, s ∉ P → residue F s = 0) : - sumResiduesIn F (Rn ∩ P) = sumResiduesIn F S2 := by - rw [sumResiduesIn, sumResiduesIn, tsum_subtype, tsum_subtype] - apply tsum_congr - intro s - by_cases hs_S2 : s ∈ S2 - · by_cases hs_pole : s ∈ P - · have hs_rect_pole : s ∈ Rn ∩ P := h_set_eq.symm ▸ ⟨hs_S2, hs_pole⟩ - simp [hs_S2, hs_rect_pole] - · have hs_not_rect_pole : s ∉ Rn ∩ P := fun hs => hs_pole hs.2 - have hres0 : residue F s = 0 := h_residue_zero s hs_S2 hs_pole - simp [hs_S2, hs_not_rect_pole, hres0] - · have hs_not_rect_pole : s ∉ Rn ∩ P := fun hs => hs_S2 (h_set_eq ▸ hs).1 - simp [hs_S2, hs_not_rect_pole] diff --git a/zeta23/Zeta23/FromPNTPlus/SmoothExistence.lean b/zeta23/Zeta23/FromPNTPlus/SmoothExistence.lean deleted file mode 100644 index 571ddc9478..0000000000 --- a/zeta23/Zeta23/FromPNTPlus/SmoothExistence.lean +++ /dev/null @@ -1,103 +0,0 @@ -/- -Ported from https://github.com/AlexKontorovich/PrimeNumberTheoremAnd -at commit 10e1218932db7e2432aa5881d750acb819e91f19, file -PrimeNumberTheoremAnd/SmoothExistence.lean. -Copyright the PrimeNumberTheoremAnd contributors; Apache License 2.0 -(http://www.apache.org/licenses/LICENSE-2.0). -Local modifications: removed the Architect blueprint -tooling (import Architect, blueprint_comment blocks, @[blueprint ...] attributes), -redirected intra-project imports to Zeta23.FromPNTPlus.*. Mathematical content unchanged. -Modified 2026 by Anthropic PBC. --/ -import Batteries.Tactic.Lemma -import Mathlib.Geometry.Manifold.PartitionOfUnity -import Mathlib.Tactic.Bound -import Zeta23.FromPNTPlus.Mathlib.Algebra.Notation.Support - -set_option lang.lemmaCmd true - -open MeasureTheory Set Real -open scoped ContDiff - -lemma smooth_urysohn_support_Ioo {a b c d : ℝ} (h1 : a < b) (h3 : c < d) : - ∃ Ψ : ℝ → ℝ, (ContDiff ℝ ∞ Ψ) ∧ (HasCompactSupport Ψ) ∧ - Set.indicator (Set.Icc b c) 1 ≤ Ψ ∧ Ψ ≤ Set.indicator (Set.Ioo a d) 1 ∧ - (Function.support Ψ = Set.Ioo a d) := by - have := exists_contMDiff_zero_iff_one_iff_of_isClosed (n := ⊤) - (modelWithCornersSelf ℝ ℝ) (s := Set.Iic a ∪ Set.Ici d) (t := Set.Icc b c) - (IsClosed.union isClosed_Iic isClosed_Ici) isClosed_Icc - (by - simp_rw [Set.disjoint_union_left, Set.disjoint_iff, Set.subset_def, - Set.mem_inter_iff, Set.mem_Iic, Set.mem_Icc, Set.mem_empty_iff_false, - and_imp, imp_false, not_le, Set.mem_Ici] - constructor <;> intros <;> linarith) - obtain ⟨Ψ, hΨSmooth, hΨrange, hΨ0, hΨ1⟩ := this - simp only [Set.mem_union, Set.mem_Iic, Set.mem_Ici, Set.mem_Icc] at * - use Ψ - simp only [range_subset_iff, mem_Icc] at hΨrange - refine ⟨ContMDiff.contDiff hΨSmooth, ?_, ?_, ?_, ?_⟩ - · apply HasCompactSupport.of_support_subset_isCompact (K := Set.Icc a d) isCompact_Icc - simp only [Function.support_subset_iff, ne_eq, mem_Icc, ← hΨ0, not_or] - bound - · apply Set.indicator_le' - · intro x hx - rw [hΨ1 x |>.mp, Pi.one_apply] - simpa using hx - · exact fun x _ ↦ (hΨrange x).1 - · intro x - apply Set.le_indicator_apply - · exact fun _ ↦ (hΨrange x).2 - · intro hx - rw [← hΨ0 x |>.mp] - simpa [-not_and, mem_Ioo, not_and_or, not_lt] using hx - · ext x - simp only [Function.mem_support, ne_eq, mem_Ioo, ← hΨ0, not_or, not_le] - - -lemma SmoothExistence : - ∃ (ν : ℝ → ℝ), (ContDiff ℝ ∞ ν) ∧ (∀ x, 0 ≤ ν x) ∧ - ν.support ⊆ Icc (1 / 2) 2 ∧ ∫ x in Ici 0, ν x / x = 1 := by - suffices h : ∃ (ν : ℝ → ℝ), (ContDiff ℝ ∞ ν) ∧ (∀ x, 0 ≤ ν x) ∧ - ν.support ⊆ Set.Icc (1 / 2) 2 ∧ 0 < ∫ x in Set.Ici 0, ν x / x by - obtain ⟨ν, hν, hνnonneg, hνsupp, hνpos⟩ := h - let c := (∫ x in Ici 0, ν x / x) - use fun y ↦ ν y / c - refine ⟨hν.div_const c, fun y ↦ div_nonneg (hνnonneg y) (le_of_lt hνpos), ?_, ?_⟩ - · rw [Function.support_div, Function.support_const (ne_of_lt hνpos).symm, inter_univ] - convert hνsupp - · simp only [div_right_comm _ c _, integral_div c, div_self <| ne_of_gt hνpos, c] - have := smooth_urysohn_support_Ioo (a := 1 / 2) (b := 1) (c := 3 / 2) (d := 2) - (by linarith) (by linarith) - obtain ⟨ν, hνContDiff, _, hν0, hν1, hνSupport⟩ := this - use ν, hνContDiff - unfold indicator at hν0 hν1 - simp only [mem_Icc, Pi.one_apply, Pi.le_def, mem_Ioo] at hν0 hν1 - simp only [hνSupport, subset_def, mem_Ioo, mem_Icc, and_imp] - split_ands - · exact fun x ↦ le_trans (by simp [apply_ite]) (hν0 x) - · exact fun y hy hy' ↦ ⟨by linarith, by linarith⟩ - · rw [integral_pos_iff_support_of_nonneg] - · simp only [Function.support_div, measurableSet_Ici, Measure.restrict_apply', - hνSupport, Function.support_id'] - have : (Ioo (1 / 2 : ℝ) 2 ∩ {0}ᶜ ∩ Ici 0) = Ioo (1 / 2) 2 := by - ext x - simp only [one_div, mem_inter_iff, mem_Ioo, mem_compl_iff, mem_singleton_iff, mem_Ici] - bound - simp only [this, volume_Ioo, ENNReal.ofReal_pos, sub_pos, gt_iff_lt] - linarith - · simp_rw [Pi.le_def, Pi.zero_apply] - intro y - by_cases h : y ∈ Function.support ν - · apply div_nonneg <| le_trans (by simp [apply_ite]) (hν0 y) - rw [hνSupport, mem_Ioo] at h - linarith [h.left] - · simp only [Function.mem_support, ne_eq, not_not] at h - simp [h] - · have : (fun x ↦ ν x / x).support ⊆ Icc (1 / 2) 2 := by - rw [Function.support_div, hνSupport] - exact (inter_subset_left).trans Ioo_subset_Icc_self - apply (integrableOn_iff_integrable_of_support_subset this).mp - apply ContinuousOn.integrableOn_compact isCompact_Icc - apply hνContDiff.continuous.continuousOn.div continuousOn_id ?_ - simp only [mem_Icc, ne_eq, and_imp, id_eq] - intros; linarith diff --git a/zeta23/Zeta23/FromPNTPlus/Sobolev.lean b/zeta23/Zeta23/FromPNTPlus/Sobolev.lean deleted file mode 100644 index 4cc5a5a46d..0000000000 --- a/zeta23/Zeta23/FromPNTPlus/Sobolev.lean +++ /dev/null @@ -1,371 +0,0 @@ -/- -Ported from https://github.com/AlexKontorovich/PrimeNumberTheoremAnd -at commit 6a380f0c4658c04a420a9eb00b1ed62a1e3fde01 (tag v4.32.2), file -PrimeNumberTheoremAnd/Sobolev.lean. -Copyright the PrimeNumberTheoremAnd contributors; Apache License 2.0 -(http://www.apache.org/licenses/LICENSE-2.0). -Local modifications: none besides this header. -Re-ported from the -v4.29.0 port (commit 10e1218932db7e2432aa5881d750acb819e91f19) when the project -moved to Lean v4.32.2 / Mathlib 905b95818eb32af7874a58b427f50c1711a5e96c. -Modified 2026 by Anthropic PBC. --/ -import Mathlib.Analysis.Calculus.Deriv.Support -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Order.Filter.ZeroAndBoundedAtFilter - -open Real Complex MeasureTheory Filter Topology BoundedContinuousFunction SchwartzMap BigOperators -open scoped ContDiff - -variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {n : ℕ} - -@[ext] structure CS (n : ℕ) (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] where - toFun : ℝ → E - h1 : ContDiff ℝ n toFun - h2 : HasCompactSupport toFun - -structure trunc extends (CS 2 ℝ) where - h3 : (Set.Icc (-1) (1)).indicator 1 ≤ toFun - h4 : toFun ≤ Set.indicator (Set.Ioo (-2) (2)) 1 - -structure W1 (n : ℕ) (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] where - toFun : ℝ → E - smooth : ContDiff ℝ n toFun - integrable : ∀ ⦃k⦄, k ≤ n → Integrable (iteratedDeriv k toFun) - -abbrev W21 := W1 2 ℂ - -section lemmas - -noncomputable def funscale {E : Type*} (g : ℝ → E) (R x : ℝ) : E := g (R⁻¹ • x) - -lemma contDiff_ofReal : ContDiff ℝ ∞ ofReal := by - have key x : HasDerivAt ofReal 1 x := hasDerivAt_id x |>.ofReal_comp - have key' : deriv ofReal = fun _ => 1 := by ext x ; exact (key x).deriv - refine contDiff_infty_iff_deriv.mpr ⟨fun x => (key x).differentiableAt, ?_⟩ - simpa [key'] using contDiff_const - -omit [NormedSpace ℝ E] in -lemma tendsto_funscale {f : ℝ → E} (hf : ContinuousAt f 0) (x : ℝ) : - Tendsto (fun R => funscale f R x) atTop (𝓝 (f 0)) := - hf.tendsto.comp (by simpa using tendsto_inv_atTop_zero.mul_const x) - -end lemmas - -namespace CS - -variable {f : CS n E} {R x v : ℝ} - -instance : CoeFun (CS n E) (fun _ => ℝ → E) where coe := CS.toFun - -instance : Coe (CS n ℝ) (CS n ℂ) where coe f := ⟨fun x => f x, - contDiff_ofReal.of_le (mod_cast le_top) |>.comp f.h1, f.h2.comp_left (g := ofReal) rfl⟩ - -def neg (f : CS n E) : CS n E where - toFun := -f - h1 := f.h1.neg - h2 := by simpa [HasCompactSupport, tsupport] using f.h2 - -instance : Neg (CS n E) where neg := neg - -@[simp] lemma neg_apply {x : ℝ} : (-f) x = - (f x) := rfl - -def smul (R : ℝ) (f : CS n E) : CS n E := ⟨R • f, f.h1.const_smul R, f.h2.smul_left⟩ - -instance : HSMul ℝ (CS n E) (CS n E) where hSMul := smul - -@[simp] lemma smul_apply : (R • f) x = R • f x := rfl - -lemma continuous (f : CS n E) : Continuous f := f.h1.continuous - -noncomputable def deriv (f : CS (n + 1) E) : CS n E where - toFun := _root_.deriv f - h1 := (contDiff_succ_iff_deriv.mp f.h1).2.2 - h2 := f.h2.deriv - -lemma hasDerivAt (f : CS (n + 1) E) (x : ℝ) : HasDerivAt f (f.deriv x) x := - (f.h1.differentiable (by simp)).differentiableAt.hasDerivAt - -lemma deriv_apply {f : CS (n + 1) E} {x : ℝ} : f.deriv x = _root_.deriv f x := rfl - -lemma deriv_smul {f : CS (n + 1) E} : (R • f).deriv = R • f.deriv := by - ext x ; exact (f.hasDerivAt x |>.const_smul R).deriv - -noncomputable def scale (g : CS n E) (R : ℝ) : CS n E := by - by_cases h : R = 0 - · exact ⟨0, contDiff_const, by simp [HasCompactSupport, tsupport]⟩ - · refine ⟨fun x => funscale g R x, ?_, ?_⟩ - · exact g.h1.comp (contDiff_const_smul R⁻¹) - · exact g.h2.comp_smul (inv_ne_zero h) - -lemma deriv_scale {f : CS (n + 1) E} : (f.scale R).deriv = R⁻¹ • f.deriv.scale R := by - ext v ; by_cases hR : R = 0 - · simp [hR, scale, deriv] - · simp only [scale, hR, ↓reduceDIte, smul_apply] - exact ((f.hasDerivAt (R⁻¹ • v)).scomp v - (by simpa using! (hasDerivAt_id v).const_smul R⁻¹)).deriv - -lemma deriv_scale' {f : CS (n + 1) E} : - (f.scale R).deriv v = R⁻¹ • f.deriv (R⁻¹ • v) := by - rw [deriv_scale, smul_apply] - by_cases hR : R = 0 <;> simp [hR, scale, funscale] - -lemma hasDerivAt_scale (f : CS (n + 1) E) (R x : ℝ) : - HasDerivAt (f.scale R) (R⁻¹ • _root_.deriv f (R⁻¹ • x)) x := by - convert hasDerivAt (f.scale R) x ; rw [deriv_scale'] ; rfl - -lemma tendsto_scale (f : CS n E) (x : ℝ) : Tendsto (fun R => f.scale R x) atTop (𝓝 (f 0)) := by - apply (tendsto_funscale f.continuous.continuousAt x).congr' - filter_upwards [eventually_ne_atTop 0] with R hR ; simp [scale, hR] - -lemma bounded : ∃ C, ∀ v, ‖f v‖ ≤ C := by - obtain ⟨x, hx⟩ := - (continuous_norm.comp f.continuous).exists_forall_ge_of_hasCompactSupport f.h2.norm - exact ⟨_, hx⟩ - -end CS - -namespace trunc - -instance : CoeFun trunc (fun _ => ℝ → ℝ) where coe f := f.toFun - -instance : Coe trunc (CS 2 ℝ) where coe := trunc.toCS - -lemma nonneg (g : trunc) (x : ℝ) : 0 ≤ g x := (Set.indicator_nonneg (by simp) x).trans (g.h3 x) - -lemma le_one (g : trunc) (x : ℝ) : g x ≤ 1 := - (g.h4 x).trans <| Set.indicator_le_self' (by simp) x - -lemma zero (g : trunc) : g =ᶠ[𝓝 0] 1 := by - have : Set.Icc (-1) 1 ∈ 𝓝 (0 : ℝ) := by apply Icc_mem_nhds <;> linarith - exact eventually_of_mem this (fun x hx => le_antisymm (g.le_one x) (by simpa [hx] using g.h3 x)) - -@[simp] lemma zero_at {g : trunc} : g 0 = 1 := g.zero.eq_of_nhds - -end trunc - -namespace W1 - -instance : CoeFun (W1 n E) (fun _ => ℝ → E) where coe := W1.toFun - -lemma continuous (f : W1 n E) : Continuous f := f.smooth.continuous - -lemma differentiable (f : W1 (n + 1) E) : Differentiable ℝ f := - f.smooth.differentiable (by simp) - -lemma iteratedDeriv_sub {f g : ℝ → E} (hf : ContDiff ℝ n f) (hg : ContDiff ℝ n g) : - iteratedDeriv n (f - g) = iteratedDeriv n f - iteratedDeriv n g := by - induction n generalizing f g with - | zero => rfl - | succ n ih => - have hf' : ContDiff ℝ n (deriv f) := hf.iterate_deriv' n 1 - have hg' : ContDiff ℝ n (deriv g) := hg.iterate_deriv' n 1 - have hfg : deriv (f - g) = deriv f - deriv g := by - ext x ; apply deriv_sub - · exact (hf.differentiable (by simp)).differentiableAt - · exact (hg.differentiable (by simp)).differentiableAt - simp_rw [iteratedDeriv_succ', ← ih hf' hg', hfg] - -noncomputable def deriv (f : W1 (n + 1) E) : W1 n E where - toFun := _root_.deriv f - smooth := contDiff_succ_iff_deriv.mp f.smooth |>.2.2 - integrable k hk := by - simpa [iteratedDeriv_succ'] using f.integrable (Nat.succ_le_succ hk) - -lemma hasDerivAt (f : W1 (n + 1) E) (x : ℝ) : HasDerivAt f (f.deriv x) x := - f.differentiable.differentiableAt.hasDerivAt - -def sub (f g : W1 n E) : W1 n E where - toFun := f - g - smooth := f.smooth.sub g.smooth - integrable k hk := by - have hf : ContDiff ℝ k f := f.smooth.of_le (by simp [hk]) - have hg : ContDiff ℝ k g := g.smooth.of_le (by simp [hk]) - simpa [iteratedDeriv_sub hf hg] using (f.integrable hk).sub (g.integrable hk) - -instance : Sub (W1 n E) where sub := sub - -lemma integrable_iteratedDeriv_Schwarz {f : 𝓢(ℝ, ℂ)} : Integrable (iteratedDeriv n f) := by - induction n generalizing f with - | zero => exact f.integrable - | succ n ih => simpa [iteratedDeriv_succ'] using! ih (f := SchwartzMap.derivCLM ℝ ℂ f) - -noncomputable def of_Schwartz (f : 𝓢(ℝ, ℂ)) : W1 n ℂ where - toFun := f - smooth := f.smooth n - integrable _ _ := integrable_iteratedDeriv_Schwarz - -end W1 - -namespace W21 - -variable {f : W21} - -noncomputable def norm (f : ℝ → ℂ) : ℝ := - (∫ v, ‖f v‖) + (4 * π ^ 2)⁻¹ * (∫ v, ‖deriv (deriv f) v‖) - -lemma norm_nonneg {f : ℝ → ℂ} : 0 ≤ norm f := - add_nonneg (integral_nonneg (fun t => by simp)) - (mul_nonneg (by positivity) (integral_nonneg (fun t => by simp))) - -noncomputable instance : Norm W21 where norm := norm ∘ W1.toFun - -noncomputable instance : Coe 𝓢(ℝ, ℂ) W21 where coe := W1.of_Schwartz - -def ofCS2 (f : CS 2 ℂ) : W21 := by - refine ⟨f, f.h1, fun k hk => ?_⟩ ; match k with - | 0 => exact f.h1.continuous.integrable_of_hasCompactSupport f.h2 - | 1 => simpa using (f.h1.continuous_deriv one_le_two).integrable_of_hasCompactSupport f.h2.deriv - | 2 => simpa [iteratedDeriv_succ] using - (f.h1.iterate_deriv' 0 2).continuous.integrable_of_hasCompactSupport f.h2.deriv.deriv - -instance : Coe (CS 2 ℂ) W21 where coe := ofCS2 - -instance : HMul (CS 2 ℂ) W21 (CS 2 ℂ) where - hMul g f := ⟨g * f, g.h1.mul f.smooth, g.h2.mul_right⟩ - -instance : HMul (CS 2 ℝ) W21 (CS 2 ℂ) where hMul g f := (g : CS 2 ℂ) * f - -lemma hf (f : W21) : Integrable f := f.integrable zero_le_two - -lemma hf' (f : W21) : Integrable (deriv f) := by - simpa [iteratedDeriv_succ] using f.integrable one_le_two - -lemma hf'' (f : W21) : Integrable (deriv (deriv f)) := by - simpa [iteratedDeriv_succ] using f.integrable le_rfl - -end W21 - -theorem W21_approximation (f : W21) (g : trunc) : - Tendsto (fun R => ‖f - (g.scale R * f : W21)‖) atTop (𝓝 0) := by - - -- Definitions - let f' := f.deriv - let f'' := f'.deriv - let g' := (g : CS 2 ℝ).deriv - let g'' := g'.deriv - let h R v := 1 - g.scale R v - let h' R := - (g.scale R).deriv - let h'' R := - (g.scale R).deriv.deriv - - -- Properties of h - have ch {R} : Continuous (fun v => (h R v : ℂ)) := - continuous_ofReal.comp <| continuous_const.sub (CS.continuous _) - have ch' {R} : Continuous (fun v => (h' R v : ℂ)) := continuous_ofReal.comp (CS.continuous _) - have ch'' {R} : Continuous (fun v => (h'' R v : ℂ)) := continuous_ofReal.comp (CS.continuous _) - have dh R v : HasDerivAt (h R) (h' R v) v := by - convert! CS.hasDerivAt_scale (g : CS 2 ℝ) R v |>.const_sub 1 using 1 - simp [h', CS.deriv_scale', show g.deriv.toFun = deriv g.toFun from rfl] - have dh' R v : HasDerivAt (h' R) (h'' R v) v := ((g.scale R).deriv.hasDerivAt v).neg - have hh1 R v : |h R v| ≤ 1 := by - by_cases hR : R = 0 <;> - simp only [CS.scale, funscale, smul_eq_mul, hR, ↓reduceDIte, Pi.zero_apply, sub_zero, - abs_one, le_refl, h] - rw [abs_le] ; constructor <;> - linarith [g.le_one (R⁻¹ * v), g.nonneg (R⁻¹ * v)] - have vR v : Tendsto (fun R : ℝ => v * R⁻¹) atTop (𝓝 0) := by - simpa using tendsto_inv_atTop_zero.const_mul v - - -- Proof - convert_to Tendsto (fun R => W21.norm (fun v => h R v * f v)) atTop (𝓝 0) - · ext R ; change W21.norm _ = _ ; congr ; ext v ; simp [h, sub_mul] ; rfl - rw [show (0 : ℝ) = 0 + ((4 * π ^ 2)⁻¹ : ℝ) * 0 by simp] - refine Tendsto.add ?_ (Tendsto.const_mul _ ?_) - - · let F R v := ‖h R v * f v‖ - have eh v : ∀ᶠ R in atTop, h R v = 0 := by - filter_upwards [(vR v).eventually g.zero, eventually_ne_atTop 0] with R hR hR' - simp [h, hR, CS.scale, hR', funscale, mul_comm R⁻¹] - have e1 : ∀ᶠ (n : ℝ) in atTop, AEStronglyMeasurable (F n) volume := by - apply Eventually.of_forall ; intro R - exact (ch.mul f.continuous).norm.aestronglyMeasurable - have e2 : ∀ᶠ (n : ℝ) in atTop, ∀ᵐ (a : ℝ), ‖F n a‖ ≤ ‖f a‖ := by - apply Eventually.of_forall ; intro R - apply Eventually.of_forall ; intro v - simpa [F] using mul_le_mul (hh1 R v) le_rfl (by simp) zero_le_one - have e4 : ∀ᵐ (a : ℝ), Tendsto (fun n ↦ F n a) atTop (𝓝 0) := by - apply Eventually.of_forall ; intro v - apply tendsto_nhds_of_eventually_eq ; filter_upwards [eh v] with R hR ; simp [F, hR] - simpa [F] using tendsto_integral_filter_of_dominated_convergence _ e1 e2 f.hf.norm e4 - - · let F R v := ‖h'' R v * f v + 2 * h' R v * f' v + h R v * f'' v‖ - convert_to Tendsto (fun R ↦ ∫ (v : ℝ), F R v) atTop (𝓝 0) - · have this R v : - deriv (deriv (fun v => h R v * f v)) v = - h'' R v * f v + 2 * h' R v * f' v + h R v * f'' v := by - have df v : HasDerivAt f (f' v) v := f.hasDerivAt v - have df' v : HasDerivAt f' (f'' v) v := f'.hasDerivAt v - have l3 v : HasDerivAt (fun v => h R v * f v) (h' R v * f v + h R v * f' v) v := - (dh R v).ofReal_comp.mul (df v) - have l5 : HasDerivAt (fun v => h' R v * f v) (h'' R v * f v + h' R v * f' v) v := - (dh' R v).ofReal_comp.mul (df v) - have l7 : HasDerivAt (fun v => h R v * f' v) (h' R v * f' v + h R v * f'' v) v := - (dh R v).ofReal_comp.mul (df' v) - have d1 : deriv (fun v => h R v * f v) = fun v => h' R v * f v + h R v * f' v := - funext (fun v => (l3 v).deriv) - rw [d1] ; convert! (l5.add l7).deriv using 1 ; ring - simp_rw [this, F] - - obtain ⟨c1, mg'⟩ := g'.bounded - obtain ⟨c2, mg''⟩ := g''.bounded - let bound v := c2 * ‖f v‖ + 2 * c1 * ‖f' v‖ + ‖f'' v‖ - have e1 : ∀ᶠ (n : ℝ) in atTop, AEStronglyMeasurable (F n) volume := by - apply Eventually.of_forall ; intro R ; apply (Continuous.norm ?_).aestronglyMeasurable - exact ((ch''.mul f.continuous).add ((continuous_const.mul ch').mul f.deriv.continuous)).add - (ch.mul f.deriv.deriv.continuous) - have e2 : ∀ᶠ R in atTop, ∀ᵐ (a : ℝ), ‖F R a‖ ≤ bound a := by - have hc1 : ∀ᶠ R in atTop, ∀ v, |h' R v| ≤ c1 := by - filter_upwards [eventually_ge_atTop 1] with R hR v - have hR' : R ≠ 0 := by linarith - have : 0 ≤ R := by linarith - simp only [CS.deriv_scale, CS.neg_apply, CS.smul_apply, smul_eq_mul, abs_neg, abs_mul, - abs_inv, abs_eq_self.mpr this, ge_iff_le, h'] - simp only [CS.scale, hR', ↓reduceDIte, funscale, smul_eq_mul] - convert_to _ ≤ c1 * 1 - · simp - · rw [mul_comm] - apply mul_le_mul (mg' _) - (inv_le_of_inv_le₀ (by linarith) (by simpa using hR)) (by positivity) - exact (abs_nonneg _).trans (mg' 0) - have hc2 : ∀ᶠ R in atTop, ∀ v, |h'' R v| ≤ c2 := by - filter_upwards [eventually_ge_atTop 1] with R hR v - have e1 : 0 ≤ R := by linarith - have e2 : R⁻¹ ≤ 1 := inv_le_of_inv_le₀ (by linarith) (by simpa using hR) - have e3 : R ≠ 0 := by linarith - simp only [CS.deriv_scale, CS.deriv_smul, CS.neg_apply, CS.smul_apply, smul_eq_mul, abs_neg, - abs_mul, abs_inv, abs_eq_self.mpr e1, ge_iff_le, h''] - convert_to _ ≤ 1 * (1 * c2) - · simp - apply mul_le_mul e2 ?_ (by positivity) zero_le_one - apply mul_le_mul e2 ?_ (by positivity) zero_le_one - simp only [CS.scale, e3, ↓reduceDIte, funscale, smul_eq_mul] ; apply mg'' - filter_upwards [hc1, hc2] with R hc1 hc2 - apply Eventually.of_forall ; intro v ; specialize hc1 v ; specialize hc2 v - simp only [F, bound, norm_norm] - refine (norm_add_le _ _).trans ?_ ; apply add_le_add - · refine (norm_add_le _ _).trans ?_ ; apply add_le_add <;> simp only [Complex.norm_mul, - Complex.norm_ofNat, norm_real, norm_eq_abs] <;> gcongr - · simpa using mul_le_mul (hh1 R v) le_rfl (by simp) zero_le_one - have e3 : Integrable bound volume := - (((f.hf.norm).const_mul _).add ((f.hf'.norm).const_mul _)).add f.hf''.norm - have e4 : ∀ᵐ (a : ℝ), Tendsto (fun n ↦ F n a) atTop (𝓝 0) := by - apply Eventually.of_forall ; intro v - have evg' : g' =ᶠ[𝓝 0] 0 := by convert! ← g.zero.deriv ; exact deriv_const' _ - have evg'' : g'' =ᶠ[𝓝 0] 0 := by convert! ← evg'.deriv ; exact deriv_const' _ - refine tendsto_norm_zero.comp <| (ZeroAtFilter.add ?_ ?_).add ?_ - · have eh'' v : ∀ᶠ R in atTop, h'' R v = 0 := by - filter_upwards [(vR v).eventually evg'', eventually_ne_atTop 0] with R hR hR' - simp only [CS.deriv_scale, CS.deriv_smul, CS.neg_apply, CS.smul_apply, smul_eq_mul, - neg_eq_zero, mul_eq_zero, inv_eq_zero, hR', false_or, h''] - simp only [CS.scale, hR', ↓reduceDIte, funscale, smul_eq_mul, mul_comm R⁻¹] - exact hR - apply tendsto_nhds_of_eventually_eq - filter_upwards [eh'' v] with R hR ; simp [hR] - · have eh' v : ∀ᶠ R in atTop, h' R v = 0 := by - filter_upwards [(vR v).eventually evg'] with R hR - simp [g'] at hR - simp [h', CS.deriv_scale', mul_comm R⁻¹, hR] - apply tendsto_nhds_of_eventually_eq - filter_upwards [eh' v] with R hR ; simp [hR] - · simpa [h] using! ((g.tendsto_scale v).const_sub 1).ofReal.mul tendsto_const_nhds - simpa [F] using tendsto_integral_filter_of_dominated_convergence bound e1 e2 e3 e4 diff --git a/zeta23/Zeta23/FromPNTPlus/StrongPNTPrefix.lean b/zeta23/Zeta23/FromPNTPlus/StrongPNTPrefix.lean index 3edad168ab..3d5739e62c 100644 --- a/zeta23/Zeta23/FromPNTPlus/StrongPNTPrefix.lean +++ b/zeta23/Zeta23/FromPNTPlus/StrongPNTPrefix.lean @@ -25,6 +25,7 @@ import Mathlib.Data.Rat.Cast.OfScientific import Mathlib.Algebra.Order.Star.Real import Mathlib.RingTheory.SimpleRing.Principal import Mathlib.Analysis.Complex.BorelCaratheodory +import Mathlib.Analysis.Complex.JensenFormula import Mathlib.Analysis.Analytic.Order import Mathlib.Analysis.Normed.Module.Connected @@ -55,19 +56,13 @@ theorem borelCaratheodory' {M r R : ℝ} {f : ℂ → ℂ} {z : ℂ} (realPartBounded : ∀ z ∈ Metric.ball 0 R, (f z).re ≤ M) (hyp_z : z ∈ Metric.closedBall 0 r) : ‖f z‖ ≤ (2 * M * r) / (R - r) := by - have h_borelCaratheodory : ∀ ε > 0, ‖f z‖ ≤ (2 * (M + ε) * ‖z‖) / (R - ‖z‖) := by - intro ε εpos; - apply Complex.borelCaratheodory_zero; - exacts [by linarith, analytic.differentiableOn, fun z hz => by rw [Set.mem_setOf_eq]; linarith [realPartBounded z hz], Rpos, by exact Metric.mem_ball.mpr ( lt_of_le_of_lt ( Metric.mem_closedBall.mp hyp_z ) hyp_r ), zeroAtZero] - have h_limit : ‖f z‖ ≤ (2 * M * ‖z‖) / (R - ‖z‖) := by - have h_limit : Filter.Tendsto (fun ε => (2 * (M + ε) * ‖z‖) / (R - ‖z‖)) (nhdsWithin 0 (Set.Ioi 0)) (nhds ((2 * M * ‖z‖) / (R - ‖z‖))) := by - refine tendsto_nhdsWithin_of_tendsto_nhds (Continuous.tendsto' ?_ _ _ (by ring_nf)) - exact ((continuous_const.mul (continuous_const.add continuous_id)).mul continuous_const).div_const _ - exact le_of_tendsto_of_tendsto tendsto_const_nhds h_limit ( Filter.eventually_of_mem self_mem_nhdsWithin fun ε hε => h_borelCaratheodory ε hε ); + have hbc : ‖f z‖ ≤ 2 * M * ‖z‖ / (R - ‖z‖) := + Complex.borelCaratheodory_zero Mpos analytic.differentiableOn realPartBounded Rpos + (Metric.mem_ball.mpr ((Metric.mem_closedBall.mp hyp_z).trans_lt hyp_r)) zeroAtZero rw [mem_closedBall_iff_norm, sub_zero] at hyp_z - refine le_trans h_limit ?_; + refine hbc.trans ?_ gcongr - · exact mul_nonneg (mul_nonneg (zero_le_two) (le_of_lt Mpos)) (le_trans (norm_nonneg z) hyp_z) + exact mul_nonneg (mul_nonneg zero_le_two Mpos.le) ((norm_nonneg z).trans hyp_z) lemma cauchy_formula_deriv {r r' R : ℝ} {f : ℂ → ℂ} {z : ℂ} (r_lt_r' : r < r') (r'_lt_R : r' < R) @@ -180,17 +175,6 @@ theorem LogOfAnalyticFunction {r R : ℝ} {B : ℂ → ℂ} · intro z hz exact (hJB.1 z (Metric.closedBall_subset_ball r_lt_R hz)).deriv -theorem LogOfAnalyticFunction' {r' r R : ℝ} {B : ℂ → ℂ} - (r'_pos : 0 < r') (r'_lt_r : r' < r) (r_lt_R : r < R) - (BanalyticOnNhdOfDR : AnalyticOnNhd ℂ B (Metric.closedBall (0 : ℂ) R)) - (Bnonzero : ∀ z ∈ Metric.closedBall (0 : ℂ) r, B z ≠ 0) : - ∃ (J_B : ℂ → ℂ), (AnalyticOnNhd ℂ J_B (Metric.ball 0 r)) ∧ - (J_B 0 = 0) ∧ - (∀ z ∈ Metric.closedBall 0 r', (deriv J_B) z = (deriv B) z / (B z)) ∧ - (∀ z ∈ Metric.ball 0 r, Real.log ‖B z‖ - Real.log ‖B 0‖ = (J_B z).re) := by - have BanalyticOnNhdOfDr : AnalyticOnNhd ℂ B (Metric.closedBall (0 : ℂ) r) := BanalyticOnNhdOfDR.mono (Metric.closedBall_subset_closedBall r_lt_R.le) - exact LogOfAnalyticFunction r'_pos r'_lt_r BanalyticOnNhdOfDr Bnonzero - def SetOfZeros (R : ℝ) (f : ℂ → ℂ) : Set ℂ := {ρ : ℂ | ‖ρ‖ ≤ R ∧ f ρ = 0} lemma finiteSetOfZeros_mono {r : ℝ} {f : ℂ → ℂ} @@ -199,7 +183,7 @@ lemma finiteSetOfZeros_mono {r : ℝ} {f : ℂ → ℂ} (SetOfZeros r f).Finite := by apply Set.Finite.subset finiteZeros unfold SetOfZeros - refine setOf_subset_setOf.mpr ?_ + refine Set.ofPred_subset_ofPred.mpr ?_ intro z hz exact ⟨by linarith, hz.2⟩ @@ -309,147 +293,6 @@ lemma CfAnalytic {r R : ℝ} {f : ℂ → ℂ} · simp only [finite_zeros_mono, ↓reduceDIte] exact analyticAt_const -noncomputable def BlaschkeB (r R : ℝ) (f : ℂ → ℂ) (z : ℂ) : ℂ := - if finite_zeros_mono : (SetOfZeros r f).Finite then - (Cf r f) z * (∏ ρ ∈ finite_zeros_mono.toFinset, (R - z * (conj ρ) / R) ^ (analyticOrderNatAt f ρ)) - else 1 - -lemma BlaschkeAnalytic {r R : ℝ} {f : ℂ → ℂ} - (r_pos : 0 < r) (r_lt_R : r < R) (R_lt_one : R < 1) - (finiteZeros : (SetOfZeros 1 f).Finite) - (hfAnalytic : AnalyticOnNhd ℂ f (Metric.closedBall (0 : ℂ) 1)) - (hf_neq_zero_at_zero : f 0 ≠ 0) : - AnalyticOnNhd ℂ (BlaschkeB r R f) (Metric.closedBall (0 : ℂ) R) := by - have R_pos : 0 < R := lt_trans r_pos r_lt_R - have r_lt_one : r < 1 := lt_trans r_lt_R R_lt_one - unfold BlaschkeB - by_cases finite_zeros_mono : (SetOfZeros r f).Finite - · simp only [finite_zeros_mono, ↓reduceDIte] - refine AnalyticOnNhd.mul (CfAnalytic r_lt_R R_lt_one hfAnalytic hf_neq_zero_at_zero) (Finset.analyticOnNhd_fun_prod (finiteSetOfZeros_mono r_lt_one finiteZeros).toFinset ?_) - intro w hw - refine AnalyticOnNhd.fun_pow (AnalyticOnNhd.sub (analyticOnNhd_const) (AnalyticOnNhd.div (AnalyticOnNhd.mul (analyticOnNhd_id) (analyticOnNhd_const)) (analyticOnNhd_const) ?_)) (analyticOrderAt f w).toNat - intro w' hw' - exact_mod_cast ne_of_gt R_pos - · simp only [finite_zeros_mono, ↓reduceDIte] - exact analyticOnNhd_const - -lemma BlaschkeOfZero {r R : ℝ} {f : ℂ → ℂ} - (r_pos : 0 < r) (r_lt_one : r < 1) (r_lt_R : r < R) - (finiteZeros : (SetOfZeros 1 f).Finite) - (hf_neq_zero_at_zero : f 0 ≠ 0) : - ‖BlaschkeB r R f 0‖ = - ‖f 0‖ * (∏ ρ ∈ (finiteSetOfZeros_mono r_lt_one finiteZeros).toFinset, (R / ‖ρ‖) ^ (analyticOrderNatAt f ρ)) := by - have zero_not_zero : ¬(0 ∈ SetOfZeros r f) := by - apply notMem_setOf_iff.mpr - simp only [norm_zero, not_and] - intro r - exact mem_support.mp hf_neq_zero_at_zero - unfold BlaschkeB Cf - simp only [finiteSetOfZeros_mono r_lt_one finiteZeros, zero_not_zero, ↓reduceDIte, zero_sub, zero_mul, zero_div, sub_zero, - Complex.norm_mul, Complex.norm_div, norm_prod, norm_pow, norm_neg, norm_real, norm_eq_abs] - rw[div_eq_mul_inv, mul_assoc, abs_of_pos (by linarith)] - refine (mul_right_inj' (norm_ne_zero_iff.mpr hf_neq_zero_at_zero)).mpr ?_ - rw[← Finset.prod_inv_distrib, ← Finset.prod_mul_distrib] - simp only [div_eq_inv_mul, mul_pow, inv_pow] - -lemma norm_fOfZero_le_norm_BlaschkeOfZero {r R : ℝ} {f : ℂ → ℂ} - (r_pos : 0 < r) (r_lt_R : r < R) (R_lt_one : R < 1) - (finiteZeros : (SetOfZeros 1 f).Finite) - (hf_neq_zero_at_zero : f 0 ≠ 0) : - ‖f 0‖ ≤ ‖BlaschkeB r R f 0‖ := by - have r_lt_one : r < 1 := lt_trans r_lt_R R_lt_one - rw [BlaschkeOfZero r_pos r_lt_one r_lt_R finiteZeros hf_neq_zero_at_zero, ← mul_one ‖f 0‖] - refine mul_le_mul (by rw[mul_one]) ?_ (zero_le_one) (mul_nonneg (norm_nonneg (f 0)) zero_le_one) - rw [← Finset.prod_const_one (s := (finiteSetOfZeros_mono r_lt_one finiteZeros).toFinset)] - apply Finset.prod_le_prod - · intro ρ hρ - exact zero_le_one - · intro ρ hρ - simp only [SetOfZeros, Finite.mem_toFinset, mem_setOf_eq] at hρ - apply one_le_pow₀ - rw[one_le_div] - · linarith - · rw [norm_pos_iff] - by_contra h - rw [h] at hρ - exact hf_neq_zero_at_zero hρ.2 - -lemma DiskBound {B r R : ℝ} {f : ℂ → ℂ} {z : ℂ} - (r_pos : 0 < r) (r_lt_R : r < R) (R_lt_one : R < 1) - (finiteZeros : (SetOfZeros 1 f).Finite) - (hfAnalytic : AnalyticOnNhd ℂ f (Metric.closedBall (0 : ℂ) 1)) - (hf_neq_zero_at_zero : f 0 ≠ 0) (fz_bound : ∀ (z : ℂ), ‖z‖ ≤ R → ‖f z‖ ≤ B) - (hz : z ∈ Metric.closedBall (0 : ℂ) R) : - ‖BlaschkeB r R f z‖ ≤ B := by - have r_lt_one : r < 1 := lt_trans r_lt_R R_lt_one - have R_pos : 0 < R := lt_trans r_pos r_lt_R - refine AnalyticOn.norm_le_of_norm_le_on_sphere (Std.IsPreorder.le_refl R) (AnalyticOnNhd.analyticOn (BlaschkeAnalytic r_pos r_lt_R R_lt_one finiteZeros hfAnalytic hf_neq_zero_at_zero)) ?_ hz - intro w hw - rw[mem_sphere_iff_norm, sub_zero] at hw - have hw_not_in : ¬(w ∈ SetOfZeros r f) := by - apply notMem_setOf_iff.mpr - intro le_r - linarith - have Bf_eq_f_at_w : ‖BlaschkeB r R f w‖ = ‖f w‖ := by - unfold BlaschkeB Cf - simp only [finiteSetOfZeros_mono r_lt_one finiteZeros, hw_not_in, ↓reduceDIte, Complex.norm_mul, Complex.norm_div, norm_prod, norm_pow] - rw[div_eq_mul_inv, mul_assoc, mul_right_eq_self₀] - by_cases fw_normZero : ‖f w‖ = 0 - · exact Or.inr fw_normZero - · apply Or.inl - rw[← Finset.prod_inv_distrib, ← Finset.prod_mul_distrib] - apply Finset.prod_eq_one - intro w' hw'_in - have hfact : (R : ℂ) - w * starRingEnd ℂ w' / R = (conj w - conj w') * w / R := by - rw[sub_mul, ← Complex.normSq_eq_conj_mul_self, Complex.normSq_eq_norm_sq, hw, ofReal_pow] - field_simp - rw [hfact, norm_div, norm_mul, ← map_sub, norm_conj, Complex.norm_real, hw, Real.norm_of_nonneg (le_of_lt R_pos)] - field_simp - rw[← div_pow, div_self, one_pow] - rw[Set.Finite.mem_toFinset] at hw'_in - exact norm_ne_zero_iff.mpr (sub_ne_zero.mpr (fun h => hw_not_in (h ▸ hw'_in))) - rw[Bf_eq_f_at_w] - exact fz_bound w (le_of_eq hw) - -lemma BlaschkeNonzero {r R : ℝ} {f : ℂ → ℂ} - (r_pos : 0 < r) (r_lt_R : r < R) (R_lt_one : R < 1) - (finiteZeros : (SetOfZeros 1 f).Finite) - (hfAnalytic : AnalyticOnNhd ℂ f (Metric.closedBall (0 : ℂ) 1)) - (hf_neq_zero_at_zero : f 0 ≠ 0) : - ∀ z ∈ Metric.closedBall (0 : ℂ) r, BlaschkeB r R f z ≠ 0 := by - have r_lt_one : r < 1 := lt_trans r_lt_R R_lt_one - have R_pos : 0 < R := lt_trans r_pos r_lt_R - intro z hz - have hz_norm_le_r : ‖z‖ ≤ r := by rwa [mem_closedBall_iff_norm, sub_zero] at hz - have hz_norm_lt_R : ‖z‖ < R := by linarith - let hFin := finiteSetOfZeros_mono r_lt_one finiteZeros - have hBProd : ∏ ρ ∈ hFin.toFinset, - (↑R - z * (starRingEnd ℂ) ρ / ↑R) ^ analyticOrderNatAt f ρ ≠ 0 := by - apply Finset.prod_ne_zero_iff.mpr - intro ρ hρ - apply pow_ne_zero - norm_num [ sub_eq_zero, Complex.ext_iff ]; - simp only [SetOfZeros, Finite.mem_toFinset, mem_setOf_eq] at hρ - rw [ eq_div_iff ] <;> norm_num [ Complex.normSq, Complex.norm_def ] at *; - · rw [Real.sqrt_lt' (by linarith)] at hz_norm_lt_R - rw [ Real.sqrt_le_iff ] at hρ - exact fun h => absurd h ( by nlinarith [ sq_nonneg ( z.re - ρ.re ), sq_nonneg ( z.im - ρ.im ), mul_lt_mul_of_pos_left r_lt_R R_pos ] ) - · linarith - unfold BlaschkeB Cf - by_cases z_in_zeros : z ∈ SetOfZeros r f - · simp only [hFin, z_in_zeros, ↓reduceDIte] - obtain ⟨_, _, hne, heq⟩ := - ZeroFactorization (by linarith) (hfAnalytic.mono (Metric.closedBall_subset_closedBall (by linarith))) - hf_neq_zero_at_zero z_in_zeros - rw [heq.1] - refine mul_ne_zero (div_ne_zero hne (Finset.prod_ne_zero_iff.mpr fun ρ hρ => - pow_ne_zero _ (sub_ne_zero.mpr fun h => - (Finset.mem_sdiff.mp hρ).2 (Finset.mem_singleton.mpr h.symm)))) hBProd - · simp only [hFin, z_in_zeros, ↓reduceDIte] - refine mul_ne_zero (div_ne_zero (fun hfz => z_in_zeros ⟨hz_norm_le_r, hfz⟩) - (Finset.prod_ne_zero_iff.mpr fun ρ hρ => - pow_ne_zero _ (sub_ne_zero.mpr fun h => z_in_zeros (h ▸ hFin.mem_toFinset.mp hρ)))) hBProd - theorem ZerosBound {B r R : ℝ} {f : ℂ → ℂ} (r_pos : 0 < r) (r_lt_one : r < 1) (r_lt_R : r < R) (R_lt_one : R < 1) (hfAnalytic : AnalyticOnNhd ℂ f (Metric.closedBall (0 : ℂ) 1)) (hf0_eq_one : f 0 = 1) @@ -457,26 +300,52 @@ theorem ZerosBound {B r R : ℝ} {f : ℂ → ℂ} ∑ ρ ∈ (finiteSetOfZeros_mono r_lt_one finiteZeros).toFinset, analyticOrderNatAt f ρ ≤ 1 / Real.log (R / r) * Real.log B := by have R_pos : 0 < R := lt_trans r_pos r_lt_R - have hf0_ne_zero : f 0 ≠ 0 := by rw [hf0_eq_one]; exact one_ne_zero - have blaschke_eq := BlaschkeOfZero r_pos r_lt_one r_lt_R finiteZeros hf0_ne_zero - rw[hf0_eq_one, norm_one, one_mul] at blaschke_eq - rw [one_div, inv_mul_eq_div, le_div_iff₀ (Real.log_pos (by simp only [lt_div_iff₀ r_pos, one_mul, r_lt_R])), ← Real.log_pow] - refine Real.log_le_log (pow_pos (div_pos R_pos r_pos) _) ?_ - calc (R / r) ^ ∑ ρ ∈ (finiteSetOfZeros_mono r_lt_one finiteZeros).toFinset, analyticOrderNatAt f ρ - = ∏ ρ ∈ (finiteSetOfZeros_mono r_lt_one finiteZeros).toFinset, (R / r) ^ analyticOrderNatAt f ρ := by - rw [Finset.prod_pow_eq_pow_sum] - _ ≤ ∏ ρ ∈ (finiteSetOfZeros_mono r_lt_one finiteZeros).toFinset, (R / ‖ρ‖) ^ analyticOrderNatAt f ρ := by - apply Finset.prod_le_prod - · intro ρ _ - exact pow_nonneg (div_nonneg (le_of_lt R_pos) (le_of_lt r_pos)) _ - · intro ρ hρ - have hρ_mem := (finiteSetOfZeros_mono r_lt_one finiteZeros).mem_toFinset.mp hρ - refine pow_le_pow_left₀ (div_nonneg (le_of_lt R_pos) (le_of_lt r_pos)) ?_ _ - refine div_le_div_of_nonneg_left (le_of_lt R_pos) (norm_pos_iff.mpr ?_) (hρ_mem.1) - rintro rfl - exact hf0_ne_zero hρ_mem.2 - _ ≤ B := by - rw[← blaschke_eq] - exact DiskBound r_pos r_lt_R R_lt_one finiteZeros hfAnalytic - hf0_ne_zero fz_bound (Metric.mem_closedBall_self (le_of_lt R_pos)) + have hB1 : 1 ≤ B := by + have := fz_bound 0 (by simp [R_pos.le]) + rwa [hf0_eq_one, norm_one] at this + have hR_an : AnalyticOnNhd ℂ f (Metric.closedBall (0 : ℂ) |R|) := by + rw [abs_of_pos R_pos] + exact hfAnalytic.mono (Metric.closedBall_subset_closedBall R_lt_one.le) + have hjensen := hR_an.sum_divisor_le (c := 0) (r := r) (R := R) (M := B) + (by rwa [abs_of_pos r_pos]) (by rwa [abs_of_pos r_pos, abs_of_pos R_pos]) hB1 + (by simp [hf0_eq_one]) (fun z hz => fz_bound z (by + rw [mem_sphere_zero_iff_norm, abs_of_pos R_pos] at hz; exact hz.le)) + rw [hf0_eq_one, norm_one, div_one, abs_of_pos r_pos, div_eq_inv_mul, ← one_div] at hjensen + have hsum : ((∑ ρ ∈ (finiteSetOfZeros_mono r_lt_one finiteZeros).toFinset, + analyticOrderNatAt f ρ : ℕ) : ℝ) = + ((∑ᶠ u, MeromorphicOn.divisor f (Metric.closedBall (0 : ℂ) r) u : ℤ) : ℝ) := by + have hfin := (finiteSetOfZeros_mono r_lt_one finiteZeros) + have hr_an : AnalyticOnNhd ℂ f (Metric.closedBall (0 : ℂ) r) := + hfAnalytic.mono (Metric.closedBall_subset_closedBall r_lt_one.le) + have hsupp : Function.support (MeromorphicOn.divisor f (Metric.closedBall (0 : ℂ) r)) + ⊆ hfin.toFinset := by + intro u hu + have hu_mem : u ∈ Metric.closedBall (0 : ℂ) r := + (MeromorphicOn.divisor f (Metric.closedBall (0 : ℂ) r)).supportWithinDomain hu + rw [Finset.mem_coe, Set.Finite.mem_toFinset] + refine ⟨by simpa [mem_closedBall_zero_iff] using hu_mem, ?_⟩ + by_contra hne + have han : AnalyticAt ℂ f u := hr_an u hu_mem + have hord : analyticOrderAt f u = 0 := han.analyticOrderAt_eq_zero.mpr hne + have hdiv : MeromorphicOn.divisor f (Metric.closedBall (0 : ℂ) r) u = 0 := by + rw [hr_an.meromorphicOn.divisor_apply hu_mem, (hr_an u hu_mem).meromorphicOrderAt_eq, hord] + simp + exact hu hdiv + rw [finsum_eq_sum_of_support_subset _ hsupp] + push_cast + refine Finset.sum_congr rfl fun u hu => ?_ + have hu' := hfin.mem_toFinset.mp hu + have hu_mem : u ∈ Metric.closedBall (0 : ℂ) r := by simpa [mem_closedBall_zero_iff] using hu'.1 + rw [hr_an.meromorphicOn.divisor_apply hu_mem, (hr_an u hu_mem).meromorphicOrderAt_eq] + have hne_top : analyticOrderAt f u ≠ ⊤ := by + intro htop + have h0 := hfAnalytic.eqOn_zero_of_preconnected_of_eventuallyEq_zero + (convex_closedBall (0 : ℂ) 1).isPreconnected + (Metric.closedBall_subset_closedBall r_lt_one.le hu_mem) + (analyticOrderAt_eq_top.mp htop) + (Metric.mem_closedBall_self zero_le_one) + simp [hf0_eq_one] at h0 + lift analyticOrderAt f u to ℕ using hne_top with k hk + simp [analyticOrderNatAt, ← hk] + exact hsum ▸ hjensen diff --git a/zeta23/Zeta23/FromPNTPlus/Tactic/AdditiveCombination.lean b/zeta23/Zeta23/FromPNTPlus/Tactic/AdditiveCombination.lean deleted file mode 100644 index 2832808d7b..0000000000 --- a/zeta23/Zeta23/FromPNTPlus/Tactic/AdditiveCombination.lean +++ /dev/null @@ -1,196 +0,0 @@ -/- -Ported from https://github.com/AlexKontorovich/PrimeNumberTheoremAnd -at commit 6a380f0c4658c04a420a9eb00b1ed62a1e3fde01 (tag v4.32.2), file -PrimeNumberTheoremAnd/Tactic/AdditiveCombination.lean. -Copyright the PrimeNumberTheoremAnd contributors; Apache License 2.0 -(http://www.apache.org/licenses/LICENSE-2.0). -Local modifications: none besides this header. -Re-ported from the -v4.29.0 port (commit 10e1218932db7e2432aa5881d750acb819e91f19) when the project -moved to Lean v4.32.2 / Mathlib 905b95818eb32af7874a58b427f50c1711a5e96c. -Modified 2026 by Anthropic PBC. --/ -/- -Copyright (c) 2022 Abby J. Goldberg. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Abby J. Goldberg, Mario Carneiro, Heather Macbeth --/ -import Mathlib.Tactic.Abel -import Mathlib.Tactic.LinearCombinationPrime - -/-! -# additive_combination Tactic - -In this file, the `additive_combination` tactic is created. This tactic, which -works over `AddGroup`s, attempts to simplify the target by creating a additive combination -of a list of equalities and subtracting it from the target. This file also includes a -definition for `additive_combination_config`. A `additive_combination_config` -object can be passed into the tactic, allowing the user to specify a -normalization tactic. - -## Implementation Notes - -This tactic works by creating a weighted sum of the given equations with the -given coefficients. Then, it subtracts the right side of the weighted sum -from the left side so that the right side equals 0, and it does the same with -the target. Afterwards, it sets the goal to be the equality between the -lefthand side of the new goal and the lefthand side of the new weighted sum. -Lastly, calls a normalization tactic on this target. - -## References - -* - --/ - -namespace Mathlib.Tactic.LinearCombinationPrime -open Lean -open Elab Meta Term - -variable {α β : Type*} - -theorem pf_smul_c [SMul α β] {a b : α} (p : a = b) (c : β) : a • c = b • c := p ▸ rfl -theorem c_smul_pf [SMul α β] {b c : β} (p : b = c) (a : α) : a • b = a • c := p ▸ rfl -theorem smul_pf [SMul α β] {a₁ b₁ : α} (p₁ : (a₁ : α) = b₁) {a₂ b₂ : β} (p₂ : a₂ = b₂) : - a₁ • a₂ = b₁ • b₂ := p₁ ▸ p₂ ▸ rfl - -/-- -Performs macro expansion of a additive combination expression, -using `+`/`-`/`*`/`/` on equations and values. -* `.proof p` means that `p` is a syntax corresponding to a proof of an equation. - For example, if `h : a = b` then `expandAdditiveCombo (2 • h)` returns `.proof (c_add_pf 2 h)` - which is a proof of `2 • a = 2 • b`. -* `.const c` means that the input expression is not an equation but a value. --/ -partial def expandAdditiveCombo (ty : Expr) (stx : Syntax.Term) : TermElabM Expanded := withRef stx do - match stx with - | `(($e)) => expandLinearCombo ty e - | `($e₁ + $e₂) => do - match ← expandAdditiveCombo ty e₁, ← expandAdditiveCombo ty e₂ with - | .const c₁, .const c₂ => .const <$> ``($c₁ + $c₂) - | .proof p₁, .const c₂ => .proof <$> ``(pf_add_c $p₁ $c₂) - | .const c₁, .proof p₂ => .proof <$> ``(c_add_pf $p₂ $c₁) - | .proof p₁, .proof p₂ => .proof <$> ``(add_pf $p₁ $p₂) - | `($e₁ - $e₂) => do - match ← expandAdditiveCombo ty e₁, ← expandAdditiveCombo ty e₂ with - | .const c₁, .const c₂ => .const <$> ``($c₁ - $c₂) - | .proof p₁, .const c₂ => .proof <$> ``(pf_sub_c $p₁ $c₂) - | .const c₁, .proof p₂ => .proof <$> ``(c_sub_pf $p₂ $c₁) - | .proof p₁, .proof p₂ => .proof <$> ``(sub_pf $p₁ $p₂) - | `(-$e) => do - match ← expandAdditiveCombo ty e with - | .const c => .const <$> `(-$c) - | .proof p => .proof <$> ``(neg_pf $p) - | `(← $e:term) => do - match ← expandAdditiveCombo ty e with - | .const c => return .const c - | .proof p => .proof <$> ``(Eq.symm $p) - | `($e₁ • $e₂) => do - match ← expandAdditiveCombo ty e₁, ← expandAdditiveCombo ty e₂ with - | .const c₁, .const c₂ => .const <$> ``($c₁ • $c₂) - | .proof p₁, .const c₂ => .proof <$> ``(pf_smul_c $p₁ $c₂) - | .const c₁, .proof p₂ => .proof <$> ``(c_smul_pf $p₂ $c₁) - | .proof p₁, .proof p₂ => .proof <$> ``(smul_pf $p₁ $p₂) - | e => - -- We have the expected type from the goal, so we can fully synthesize this leaf node. - withSynthesize do - -- It is OK to use `ty` as the expected type even if `e` is a proof. - -- The expected type is just a hint. - let c ← withSynthesizeLight <| Term.elabTerm e ty - if (← whnfR (← inferType c)).isEq then - .proof <$> c.toSyntax - else - .const <$> c.toSyntax - -/-- Implementation of `additive_combination` and `additive_combination2`. -/ -def elabAdditiveCombination (tk : Syntax) - (norm? : Option Syntax.Tactic) (exp? : Option Syntax.NumLit) (input : Option Syntax.Term) - (twoGoals := false) : Tactic.TacticM Unit := Tactic.withMainContext do - let some (ty, _) := (← (← Tactic.getMainGoal).getType').eq? | - throwError "'additive_combination' only proves equalities" - let p ← match input with - | none => `(Eq.refl 0) - | some e => - match ← expandAdditiveCombo ty e with - | .const c => `(Eq.refl $c) - | .proof p => pure p - let norm := norm?.getD (Unhygienic.run <| withRef tk `(tactic| ((try simp only [smul_add, smul_sub]); abel))) - Term.withoutErrToSorry <| Tactic.evalTactic <| ← withFreshMacroScope <| - if twoGoals then - `(tactic| ( - refine eq_trans₃ $p ?a ?b - case' a => $norm:tactic - case' b => $norm:tactic)) - else - match exp? with - | some n => - if n.getNat = 1 then `(tactic| (refine eq_of_add $p ?a; case' a => $norm:tactic)) - else `(tactic| (refine eq_of_add_pow $n $p ?a; case' a => $norm:tactic)) - | _ => `(tactic| (refine eq_of_add $p ?a; case' a => $norm:tactic)) - -/-- -`additive_combination` attempts to simplify the target by creating a additive combination - of a list of equalities and subtracting it from the target. - The tactic will create a additive - combination by adding the equalities together from left to right, so the order - of the input hypotheses does matter. If the `normalize` field of the - configuration is set to false, then the tactic will simply set the user up to - prove their target using the additive combination instead of normalizing the subtraction. - -Note: The left and right sides of all the equalities should have the same - type, and the coefficients should also have this type. There must be - instances of `Mul` and `AddGroup` for this type. - -* The input `e` in `additive_combination e` is a additive combination of proofs of equalities, - given as a sum/difference of coefficients multiplied by expressions. - The coefficients may be arbitrary expressions. - The expressions can be arbitrary proof terms proving equalities. - Most commonly they are hypothesis names `h1, h2, ...`. -* `additive_combination (norm := tac) e` runs the "normalization tactic" `tac` - on the subgoal(s) after constructing the additive combination. - * The default normalization tactic is `abel`, which closes the goal or fails. - * To avoid normalization entirely, use `skip` as the normalization tactic. -* `additive_combination (exp := n) e` will take the goal to the `n`th power before subtracting the - combination `e`. In other words, if the goal is `t1 = t2`, `additive_combination (exp := n) e` - will change the goal to `(t1 - t2)^n = 0` before proceeding as above. - This feature is not supported for `additive_combination2`. - -Example Usage: -``` -example (x y : ℤ) (h1 : x*y + 2*x = 1) (h2 : x = y) : x*y = -2*y + 1 := by - additive_combination 1*h1 - 2*h2 - -example (x y : ℤ) (h1 : x*y + 2*x = 1) (h2 : x = y) : x*y = -2*y + 1 := by - additive_combination h1 - 2*h2 - -example (x y : ℤ) (h1 : x*y + 2*x = 1) (h2 : x = y) : x*y = -2*y + 1 := by - additive_combination (norm := ring_nf) -2*h2 - /- Goal: x * y + x * 2 - 1 = 0 -/ - -example (x y z : ℝ) (ha : x + 2*y - z = 4) (hb : 2*x + y + z = -2) - (hc : x + 2*y + z = 2) : - -3*x - 3*y - 4*z = 2 := by - additive_combination ha - hb - 2*hc - -example (x y : ℚ) (h1 : x + y = 3) (h2 : 3*x = 7) : - x*x*y + y*x*y + 6*x = 3*x*y + 14 := by - additive_combination x*y*h1 + 2*h2 - -example (x y : ℤ) (h1 : x = -3) (h2 : y = 10) : 2*x = -6 := by - additive_combination (norm := skip) 2*h1 - simp - -axiom qc : ℚ -axiom hqc : qc = 2*qc - -example (a b : ℚ) (h : ∀ p q : ℚ, p = q) : 3*a + qc = 3*b + 2*qc := by - additive_combination 3 * h a b + hqc -``` --/ -syntax (name := AdditiveCombination) "additive_combination" - (normStx)? (expStx)? (ppSpace colGt term)? : tactic -elab_rules : tactic - | `(tactic| additive_combination%$tk $[(norm := $tac)]? $[(exp := $n)]? $(e)?) => - elabAdditiveCombination tk tac n e - -end Mathlib.Tactic.LinearCombinationPrime diff --git a/zeta23/Zeta23/FromPNTPlus/ZetaBounds.lean b/zeta23/Zeta23/FromPNTPlus/ZetaBounds.lean index 978d953c04..89875b1e35 100644 --- a/zeta23/Zeta23/FromPNTPlus/ZetaBounds.lean +++ b/zeta23/Zeta23/FromPNTPlus/ZetaBounds.lean @@ -18,514 +18,25 @@ import Mathlib.MeasureTheory.Order.Group.Lattice import Mathlib.NumberTheory.Harmonic.Bounds import Mathlib.NumberTheory.LSeries.Nonvanishing import Zeta23.FromPNTPlus.Auxiliary -import Zeta23.FromPNTPlus.Fourier -import Zeta23.FromPNTPlus.Mathlib.Analysis.SpecialFunctions.Log.Basic import Zeta23.FromPNTPlus.ResidueCalcOnRectangles import Zeta23.FromPNTPlus.EulerMaclaurin - set_option lang.lemmaCmd true - open Complex Topology Filter Interval Set Asymptotics - lemma div_cpow_eq_cpow_neg (a x s : ℂ) : a / x ^ s = a * x ^ (-s) := by rw [div_eq_mul_inv, cpow_neg] -lemma one_div_cpow_eq_cpow_neg (x s : ℂ) : 1 / x ^ s = x ^ (-s) := by - convert div_cpow_eq_cpow_neg 1 x s using 1; simp - lemma div_rpow_eq_rpow_neg (a x s : ℝ) (hx : 0 ≤ x) : a / x ^ s = a * x ^ (-s) := by rw [div_eq_mul_inv, Real.rpow_neg hx] -lemma div_rpow_neg_eq_rpow_div {x y s : ℝ} (hx : 0 ≤ x) (hy : 0 ≤ y) : - x ^ (-s) / y ^ (-s) = (y / x) ^ s := by - rw [div_eq_mul_inv, Real.rpow_neg hx, Real.rpow_neg hy, Real.div_rpow hy hx]; field_simp - -lemma div_rpow_eq_rpow_div_neg {x y s : ℝ} (hx : 0 ≤ x) (hy : 0 ≤ y) : - x ^ s / y ^ s = (y / x) ^ (-s) := by - convert div_rpow_neg_eq_rpow_div (s := -s) hx hy using 1; simp only [neg_neg] - local notation (name := riemannzeta) "ζ" => riemannZeta local notation (name := derivriemannzeta) "ζ'" => deriv riemannZeta -theorem ResidueOfTendsTo {f : ℂ → ℂ} {p : ℂ} {U : Set ℂ} - (hU : U ∈ 𝓝 p) - (hf : HolomorphicOn f (U \ {p})) - {A : ℂ} - (h_limit : Tendsto (fun s ↦ (s - p) * f s) (𝓝[≠] p) (𝓝 A)) : - ∃ V ∈ 𝓝 p, - BddAbove (norm ∘ (f - fun s ↦ A * (s - p)⁻¹) '' (V \ {p})) := by - -- Step 1. `(s-p) f s` is bounded on some punctured nbhd `V`. - have h_event : ∀ᶠ s in 𝓝[≠] p, ‖(s - p) * f s - A‖ < 1 := by - simp_rw [← dist_eq_norm_sub] - exact h_limit.eventually (Metric.ball_mem_nhds _ (by norm_num)) - have h_event_nhds : - ∀ᶠ s in 𝓝 p, s ≠ p → ‖(s - p) * f s - A‖ < 1 := by - exact (eventually_nhdsWithin_iff).1 h_event - rcases (eventually_nhds_iff.1 h_event_nhds) with ⟨V₀, hV₀_mem, hV₀_prop⟩ - have h_bound : - ∀ s, s ∈ V₀ \ {p} → ‖(s - p) * f s‖ ≤ ‖A‖ + 1 := by - intro s hs - rcases hs with ⟨hV₀, hsne⟩ - calc ‖(s - p) * f s‖ = ‖((s - p) * f s - A) + A‖ := by - ring_nf - _ ≤ ‖(s - p) * f s - A‖ + ‖A‖ := norm_add_le ((s - p) * f s - A) A - _ ≤ 1 + ‖A‖ := add_le_add_left (le_of_lt (hV₀_mem s hV₀ hsne)) ‖A‖ - _ = ‖A‖ + 1 := add_comm 1 ‖A‖ - have h_bdd : - BddAbove (norm ∘ (fun s ↦ (s - p) * f s) '' (V₀ \ {p})) := by - refine ⟨‖A‖ + 1, ?_⟩ - rintro _ ⟨s, hs, rfl⟩ - exact h_bound s hs - -- From now on work inside `W = V₀ ∩ U`, still a nbhd of `p`. - set W : Set ℂ := V₀ ∩ U with hW_def - have hW_mem : (W : Set ℂ) ∈ 𝓝 p := inter_mem (IsOpen.mem_nhds hV₀_prop.1 hV₀_prop.2) hU - have h_subset_V₀ : (W \ {p}) ⊆ (V₀ \ {p}) := by - intro z hz; exact ⟨hz.1.1, hz.2⟩ - have h_prod_holo : HolomorphicOn (fun z ↦ (z - p) * f z) (W \ {p}) := by - have h_id : HolomorphicOn (fun z : ℂ ↦ z - p) (W \ {p}) := - Differentiable.differentiableOn (Differentiable.sub_const differentiable_fun_id p) - have hfW : HolomorphicOn f (W \ {p}) := by - apply hf.mono - exact Set.sdiff_subset_sdiff_left inter_subset_right - simpa using! h_id.mul hfW - have h_bdd_W : BddAbove (norm ∘ (fun s ↦ (s - p) * f s) '' (W \ {p})) := - h_bdd.mono (image_mono h_subset_V₀) - -- Step 2. Extend the product across `p`; obtain holomorphic `g`. - obtain ⟨g, hg_holo, hg_eq⟩ := - existsDifferentiableOn_of_bddAbove hW_mem h_prod_holo h_bdd_W - have h_event_eq : - (fun z ↦ g z) =ᶠ[𝓝[≠] p] fun z ↦ (z - p) * f z := by - have hW_diff_mem : (W \ {p} : Set ℂ) ∈ 𝓝[≠] p := - sdiff_mem_nhdsWithin_compl hW_mem {p} - exact (hg_eq.eventuallyEq_of_mem hW_diff_mem).symm - have h_tendsto_gA : Tendsto g (𝓝[≠] p) (𝓝 A) := - h_limit.congr' (id (EventuallyEq.symm h_event_eq)) - have hpW : p ∈ W := by - exact mem_of_mem_nhds hW_mem - have h_cont_g : ContinuousAt g p := by - apply (hg_holo.continuousOn.continuousWithinAt hpW).continuousAt hW_mem - have h_tendsto_gp : Tendsto g (𝓝[≠] p) (𝓝 (g p)) := - h_cont_g.tendsto.mono_left inf_le_left - have g_p_eq : g p = A := - tendsto_nhds_unique' (NormedField.nhdsNE_neBot p) h_tendsto_gp h_tendsto_gA - let q : ℂ → ℂ := fun z ↦ (g z - A) / (z - p) - have h_deriv : HasDerivAt g (deriv g p) p := by - exact DifferentiableOn.hasDerivAt hg_holo hW_mem - have h_q_limit : Tendsto q (𝓝[≠] p) (𝓝 (deriv g p)) := by - rw [hasDerivAt_iff_tendsto_slope] at h_deriv - unfold slope at h_deriv - simp only [vsub_eq_sub, smul_eq_mul, inv_mul_eq_div, g_p_eq] at h_deriv - exact h_deriv - have h_event_q : ∀ᶠ z in 𝓝[≠] p, ‖q z - deriv g p‖ < 1 := by - simp_rw [← dist_eq_norm_sub] - exact h_q_limit.eventually (Metric.ball_mem_nhds _ (by norm_num)) - have h_event_q_nhds : ∀ᶠ z in 𝓝 p, z ≠ p → ‖q z - deriv g p‖ < 1 := by - simpa using (eventually_nhdsWithin_iff).1 h_event_q - rcases (eventually_nhds_iff.1 h_event_q_nhds) with - ⟨V₁, hV₁_mem, hV₁_prop⟩ - have h_q_bound : - ∀ z, z ∈ V₁ \ {p} → ‖q z‖ ≤ ‖deriv g p‖ + 1 := by - intro z hz - rcases hz with ⟨hV₁, hz_ne⟩ - calc ‖q z‖ = ‖(q z - deriv g p) + (deriv g p)‖ := by - ring_nf - _ ≤ ‖q z - deriv g p‖ + ‖deriv g p‖ := norm_add_le (q z - deriv g p) (deriv g p) - _ ≤ 1 + ‖deriv g p‖ := add_le_add_left (le_of_lt (hV₁_mem z hV₁ hz_ne)) ‖deriv g p‖ - _ = ‖deriv g p‖ + 1 := add_comm 1 ‖deriv g p‖ - -- Step 4. Relate `f` to `q` and pass the bound. - have h_eq_diff : - EqOn (fun z ↦ f z - A * (z - p)⁻¹) q (W \ {p}) := by - intro z hz - simp only - have hz_ne : (z - p) ≠ 0 := sub_ne_zero.mpr hz.2 - have hgz : g z = (z - p) * f z := by - exact id (EqOn.symm hg_eq) hz - simp only [hgz, q] - field_simp - apply IsBigO_to_BddAbove - rw [isBigO_iff] - use ‖deriv g p‖ + 1 - apply eventually_nhdsWithin_iff.mpr - filter_upwards [IsOpen.mem_nhds hV₁_prop.1 hV₁_prop.2, hW_mem] with z hV₁ hW z_ne_p - specialize h_eq_diff ⟨ hW, z_ne_p⟩ - simp only [Pi.sub_apply, Pi.one_apply, one_mem, CStarRing.norm_of_mem_unitary, - mul_one] at h_eq_diff ⊢ - rw [h_eq_diff] - exact h_q_bound _ ⟨hV₁, z_ne_p⟩ - -theorem analyticAt_riemannZeta {s : ℂ} (s_ne_one : s ≠ 1) : - AnalyticAt ℂ riemannZeta s := by - apply Complex.analyticAt_iff_eventually_differentiableAt.mpr - filter_upwards [eventually_ne_nhds s_ne_one] with z hz using differentiableAt_riemannZeta hz - -theorem differentiableAt_deriv_riemannZeta {s : ℂ} (s_ne_one : s ≠ 1) : - DifferentiableAt ℂ ζ' s := by - exact (analyticAt_riemannZeta s_ne_one).deriv.differentiableAt - -theorem riemannZetaResidue : - ∃ U ∈ 𝓝 1, BddAbove (norm ∘ (ζ - (fun s ↦ (s - 1)⁻¹)) '' (U \ {1})) := by - have zeta_holc : HolomorphicOn ζ (univ \ {1}) := by - intro y hy - exact DifferentiableAt.differentiableWithinAt <| differentiableAt_riemannZeta hy.2 - convert ResidueOfTendsTo univ_mem zeta_holc riemannZeta_residue_one using 6 - simp - --- Main theorem: if functions agree on a punctured set, their derivatives agree there too -theorem deriv_eqOn_of_eqOn_punctured (f g : ℂ → ℂ) (U : Set ℂ) (p : ℂ) - (hU_open : IsOpen U) - (h_eq : EqOn f g (U \ {p})) : - EqOn (deriv f) (deriv g) (U \ {p}) := by - intro x hx - apply EventuallyEq.deriv_eq - filter_upwards [IsOpen.mem_nhds (hU_open.sdiff isClosed_singleton) hx] with t ht using h_eq ht - -/- New two theorems to be proven -/ - -theorem analytic_deriv_bounded_near_point - (f : ℂ → ℂ) {U : Set ℂ} {p : ℂ} (hU : IsOpen U) (hp : p ∈ U) (hf : HolomorphicOn f U) : - (deriv f) =O[𝓝[≠] p] (1 : ℂ → ℂ) := by - have U_in_filter : U ∈ 𝓝 p := by - exact IsOpen.mem_nhds hU hp - have T := (analyticOn_iff_differentiableOn hU).mpr hf - have T2 : ContDiffOn ℂ 1 f U := - DifferentiableOn.contDiffOn hf hU - have T3 : ContinuousOn (fun x ↦ ((deriv f) x)) U := by - apply T2.continuousOn_deriv_of_isOpen hU (by simp) - have T4 := T3.continuousAt U_in_filter - have T5 : (deriv f) =O[𝓝 p] (1 : ℂ → ℂ) := - T4.norm.isBoundedUnder_le.isBigO_one ℂ - exact Asymptotics.IsBigO.mono T5 inf_le_left - -theorem derivative_const_plus_product {g : ℂ → ℂ} (A p x : ℂ) (hg : DifferentiableAt ℂ g x) : - deriv ((fun _ ↦ A) + g * fun s ↦ s - p) x = deriv g x * (x - p) + g x := by - rw [deriv_add (by fun_prop) (by fun_prop), deriv_const, deriv_mul hg (by fun_prop)] - simp - -lemma deriv_inv_sub {x p : ℂ} (hp : x ≠ p) : - deriv (fun z => (z - p)⁻¹) x = -((x - p) ^ 2)⁻¹ := by - rw [deriv_fun_inv'' (by fun_prop) (by grind)] - simp - field - --- Alternative cleaner proof using more direct approach -theorem deriv_f_minus_A_inv_sub_clean (f : ℂ → ℂ) (A x p : ℂ) - (hf : DifferentiableAt ℂ f x) (hp : x ≠ p) : - deriv (f - (fun z ↦ A * (z - p)⁻¹)) x = deriv f x + A * ((x - p) ^ 2)⁻¹ := by - have h1 : DifferentiableAt ℂ (fun z => (z - p)⁻¹) x := by - fun_prop (disch := grind) - rw [deriv_sub hf (h1.const_mul A), deriv_const_mul A h1, deriv_inv_sub hp] - ring - -theorem nonZeroOfBddAbove {f : ℂ → ℂ} {p : ℂ} {U : Set ℂ} - (U_in_nhds : U ∈ 𝓝 p) {A : ℂ} (A_ne_zero : A ≠ 0) - (f_near_p : BddAbove (norm ∘ (f - fun s ↦ A * (s - p)⁻¹) '' (U \ {p}))) : - ∃ V ∈ 𝓝 p, IsOpen V ∧ ∀ s ∈ V \ {p}, f s ≠ 0 := by - - -- Step 1: Rewrite f as the sum of two parts - have h_decomp : ∀ s, f s = (f s - A * (s - p)⁻¹) + A * (s - p)⁻¹ := by - intro s - ring - -- Get a bound for the first summand - obtain ⟨M, hM⟩ := f_near_p - -- Step 2: The second summand A * (s - p)⁻¹ goes to ∞ as s → p - -- We need to find a neighborhood where |A * (s - p)⁻¹| > M + 1 - have A_norm_pos : 0 < ‖A‖ := norm_pos_iff.mpr A_ne_zero - -- Choose δ such that for |s - p| < δ, we have |A * (s - p)⁻¹| > M + 1 - let δ := ‖A‖ / (‖M‖ + 1) - have δ_pos : 0 < δ := by - refine div_pos A_norm_pos (add_pos_of_nonneg_of_pos (norm_nonneg M) one_pos) - -- Find an open neighborhood V contained in both U and the δ-ball around p - obtain ⟨V, hV_open, hV_mem, hV_sub⟩ : ∃ V, IsOpen V ∧ p ∈ V ∧ V ⊆ U ∩ Metric.ball p δ := by - -- rw [mem_nhds_iff] at U_in_nhds - obtain ⟨W, hW_sub, hW_open, hW_mem⟩ := mem_nhds_iff.mp U_in_nhds - let V := W ∩ Metric.ball p δ - have VNp : V ∈ 𝓝 p := (𝓝 p).inter_mem (IsOpen.mem_nhds hW_open hW_mem) - (Metric.ball_mem_nhds p δ_pos) - exact ⟨V, IsOpen.inter hW_open Metric.isOpen_ball, mem_of_mem_nhds VNp, - inter_subset_inter_left _ hW_sub⟩ - use V, mem_nhds_iff.mpr ⟨V, subset_refl V, hV_open, hV_mem⟩, hV_open - -- Show f ≠ 0 on V - intro s hs - have hs_in_U : s ∈ U := hV_sub hs.1 |>.1 - have hs_near_p : dist s p < δ := hV_sub hs.1 |>.2 - have hs_ne_p : s ≠ p := hs.2 - -- Step 3: Therefore the sum of the two terms has large norm - rw [h_decomp s] - -- The first summand is bounded - have bound_first : ‖f s - A * (s - p)⁻¹‖ ≤ M := by - apply hM - exact ⟨s, ⟨hs_in_U, hs_ne_p⟩, rfl⟩ - -- The second summand has large norm - have large_second : ‖M‖ + 1 < ‖A * (s - p)⁻¹‖ := by - rw [norm_mul, norm_inv, ← div_eq_mul_inv] - rw [lt_div_iff₀ (norm_pos_iff.mpr (sub_ne_zero.mpr hs_ne_p))] - rw [mul_comm, ← lt_div_iff₀ (add_pos_of_nonneg_of_pos (norm_nonneg M) one_pos)] - rw [dist_eq_norm_sub] at hs_near_p - exact hs_near_p - -- Step 4: Therefore the sum is nonzero near p - by_contra h_zero - -- If f s = 0, then the two summands are negatives of each other - rw [add_eq_zero_iff_eq_neg] at h_zero - rw [h_zero, norm_neg] at bound_first - -- But this contradicts our bounds - have : ‖M‖ + 1 < ‖M‖ := (lt_of_lt_of_le (lt_of_lt_of_le large_second bound_first) - (Real.le_norm_self M)) - norm_num at this - -/- The set should be open so that f'(p) = O(1) for all p ∈ U -/ - -theorem logDerivResidue' {f : ℂ → ℂ} {p : ℂ} {U : Set ℂ} - (U_is_open : IsOpen U) - (non_zero : ∀ x ∈ U \ {p}, f x ≠ 0) - (holc : HolomorphicOn f (U \ {p})) - (U_in_nhds : U ∈ 𝓝 p) {A : ℂ} (A_ne_zero : A ≠ 0) - (f_near_p : BddAbove (norm ∘ (f - fun s ↦ A * (s - p)⁻¹) '' (U \ {p}))) : - (deriv f * f⁻¹ + (fun s ↦ (s - p)⁻¹)) =O[𝓝[≠] p] (1 : ℂ → ℂ) := by - - have simpleHolo : HolomorphicOn (fun s ↦ A / (s - p)) (U \ {p}) := by - apply DifferentiableOn.mono (t := {p}ᶜ) - · apply DifferentiableOn.div - · exact differentiableOn_const _ - · exact DifferentiableOn.sub differentiableOn_id (differentiableOn_const _) - · exact fun x hx => by rw [sub_ne_zero]; exact hx - · rintro s ⟨_, hs⟩ ; exact hs - - have f_minus_pole_is_holomorphic : HolomorphicOn (f - (fun s ↦ A * (s - p)⁻¹)) (U \ {p}) := by - exact (DifferentiableOn.sub_iff_right holc).mpr simpleHolo - - let ⟨g, ⟨g_is_holomorphic, g_is_f_minus_pole⟩⟩ := existsDifferentiableOn_of_bddAbove - U_in_nhds f_minus_pole_is_holomorphic f_near_p - - /- TODO: Assert that the derivatives match too -/ - - let h := (fun _ ↦ A) + g * (fun (s : ℂ) ↦ (s - p)) - - have linear_is_holomorphic : HolomorphicOn (fun (s : ℂ ) ↦ (s - p)) U := by - exact DifferentiableOn.sub_const differentiableOn_id p - - have h_is_holomorphic : HolomorphicOn h U := by - have T := DifferentiableOn.mul g_is_holomorphic linear_is_holomorphic - exact DifferentiableOn.const_add A T - - have h_continuous : ContinuousOn h U := - by exact DifferentiableOn.continuousOn h_is_holomorphic - - have deriv_h_identity : ∀x ∈ (U \ {p}), (deriv h) x = f x + (deriv f x) * (x - p) := by - intro x x_in_u_not_p - have x_in_u : x ∈ U := by exact Set.mem_of_mem_sdiff x_in_u_not_p - have x_not_p : x ≠ p := by - exact ((Set.mem_sdiff x).mp x_in_u_not_p).2 - - have weird : U ∈ 𝓝 x := by - exact IsOpen.mem_nhds (U_is_open) (x_in_u) - - rw [derivative_const_plus_product, ← g_is_f_minus_pole x_in_u_not_p, - ← deriv_eqOn_of_eqOn_punctured _ _ U p U_is_open g_is_f_minus_pole x_in_u_not_p, - deriv_f_minus_A_inv_sub_clean] - · simp only [Pi.sub_apply] - have := sub_ne_zero_of_ne x_not_p - field_simp - ring - · apply holc.differentiableAt - exact Filter.inter_mem weird <| compl_singleton_mem_nhds x_not_p - · exact x_not_p - · exact g_is_holomorphic.differentiableAt weird - have h_identity : ∀x ∈ (U \ {p}), h x = (f x) * (x - p) := by - intro x x_in_u_not_p - have hyp_x_not_p : x ≠ p := by - exact ((Set.mem_sdiff x).mp x_in_u_not_p).2 - simp only [h, Pi.add_apply, Pi.mul_apply] - rw [← g_is_f_minus_pole x_in_u_not_p] - simp only [Pi.sub_apply] - field [sub_ne_zero.mpr hyp_x_not_p] - have log_deriv_f_plus_pole_equal_log_deriv_h : - EqOn (deriv f * f⁻¹ + fun s ↦ (s - p)⁻¹) ((deriv h) * h⁻¹) (U \ {p}) := by - simp only [Set.mem_sdiff, mem_singleton_iff, ne_eq, and_imp, Function.comp_apply, Pi.sub_apply, - DifferentiableOn.sub_iff_right, differentiableOn_const, DifferentiableOn.fun_sub_iff_left, - holc] at * - intro x hyp_x - have x_not_p : x ≠ p := by - exact ((Set.mem_sdiff x).mp hyp_x).2 - have x_in_u : x ∈ U := by exact Set.mem_of_mem_sdiff hyp_x - simp only [Pi.add_apply, Pi.mul_apply, Pi.inv_apply] - rw [deriv_h_identity _ x_in_u x_not_p, h_identity _ x_in_u x_not_p] - - /- This is just an identity at this point -/ - field [sub_ne_zero.mpr x_not_p, non_zero x (x_in_u) x_not_p] - have h_inv_bounded : - h⁻¹ =O[𝓝[≠] p] (1 : ℂ → ℂ) := by - have : ContinuousAt h⁻¹ p := by - apply ContinuousOn.continuousAt h_continuous U_in_nhds |>.inv₀ - simp [h, A_ne_zero] - exact Asymptotics.IsBigO.mono (this.norm.isBoundedUnder_le.isBigO_one ℂ) inf_le_left - - have h_deriv_bounded : - (deriv h) =O[𝓝[≠] p] (1 : ℂ → ℂ) := - analytic_deriv_bounded_near_point h U_is_open - (by exact mem_of_mem_nhds U_in_nhds) h_is_holomorphic - - have h_log_deriv_bounded : - ((deriv h) * h⁻¹) =O[𝓝[≠] p] (1 : ℂ → ℂ) := by - have T := Asymptotics.IsBigO.mul h_deriv_bounded h_inv_bounded - exact IsBigO.of_const_mul_right T - - have u_not_p_in_filter : U \ {p} ∈ 𝓝[≠] p := by - exact sdiff_mem_nhdsWithin_compl U_in_nhds {p} - have T := Set.EqOn.eventuallyEq_of_mem log_deriv_f_plus_pole_equal_log_deriv_h u_not_p_in_filter - exact EventuallyEq.trans_isBigO T h_log_deriv_bounded - -theorem logDerivResidue {f : ℂ → ℂ} {p : ℂ} {U : Set ℂ} - (non_zero : ∀ x ∈ U \ {p}, f x ≠ 0) - (holc : HolomorphicOn f (U \ {p})) - (U_in_nhds : U ∈ 𝓝 p) {A : ℂ} (A_ne_zero : A ≠ 0) - (f_near_p : BddAbove (norm ∘ (f - fun s ↦ A * (s - p)⁻¹) '' (U \ {p}))) : - (deriv f * f⁻¹ + (fun s ↦ (s - p)⁻¹)) =O[𝓝[≠] p] (1 : ℂ → ℂ) := - by - let ⟨U', ⟨a,b,c⟩⟩ := mem_nhds_iff.mp U_in_nhds - have W : (U' \ {p}) ⊆ U' := by - exact Set.sdiff_subset - - have T : (U' \ {p}) ⊆ (U \ {p}) := by - exact Set.sdiff_subset_sdiff a (subset_refl _) - - refine logDerivResidue' b ?_ ?_ (IsOpen.mem_nhds b c) A_ne_zero ?_ - · intro x hyp_x - exact non_zero x <| T hyp_x - · exact DifferentiableOn.mono holc T - · exact (f_near_p.mono (image_mono (Set.sdiff_subset_sdiff a (subset_refl _)))) - -lemma BddAbove_to_IsBigO {f : ℂ → ℂ} {p : ℂ} - {U : Set ℂ} (hU : U ∈ 𝓝 p) (bdd : BddAbove (norm ∘ f '' (U \ {p}))) : - f =O[𝓝[≠] p] (1 : ℂ → ℂ) := by - dsimp [BddAbove, upperBounds] at bdd - rcases bdd with ⟨C, hC⟩ - - have h : ∀ x ∈ U \ {p}, ‖f x‖ ≤ C := by - intro x hx - have fx_is_norm : ‖f x‖ ∈ norm ∘ f ''(U \ {p}) := by - exact ⟨x, hx, rfl⟩ - exact hC fx_is_norm - - rw [Asymptotics.isBigO_iff] - use C - rw [eventually_nhdsWithin_iff] - simp only [Set.mem_sdiff, mem_singleton_iff, and_imp, mem_compl_iff, Pi.one_apply, one_mem, - CStarRing.norm_of_mem_unitary, mul_one] at h ⊢ - filter_upwards [hU] using h - -theorem logDerivResidue'' {f : ℂ → ℂ} {p : ℂ} {U : Set ℂ} - (non_zero : ∀ x ∈ U \ {p}, f x ≠ 0) - (holc : HolomorphicOn f (U \ {p})) - (U_in_nhds : U ∈ 𝓝 p) {A : ℂ} (A_ne_zero : A ≠ 0) - (f_near_p : BddAbove (norm ∘ (f - fun s ↦ A * (s - p)⁻¹) '' (U \ {p}))) : - ∃ V ∈ 𝓝 p, BddAbove (norm ∘ (deriv f * f⁻¹ + (fun s ↦ (s - p)⁻¹)) '' (V \ {p})) := by - apply IsBigO_to_BddAbove - exact logDerivResidue non_zero holc U_in_nhds A_ne_zero f_near_p - -theorem ResidueMult {f g : ℂ → ℂ} {p : ℂ} {U : Set ℂ} - (g_holc : HolomorphicOn g U) (U_in_nhds : U ∈ 𝓝 p) {A : ℂ} - (f_near_p : (f - (fun s ↦ A * (s - p)⁻¹)) =O[𝓝[≠] p] (1 : ℂ → ℂ)) : - (f * g - (fun s ↦ A * g p * (s - p)⁻¹)) =O[𝓝[≠] p] (1 : ℂ → ℂ) := by - -- Add and subtract a term - have : (f * g - fun s ↦ A * g p * (s - p)⁻¹) - = (f - A • fun s ↦ (s - p)⁻¹) * g + fun s ↦ (A * (g s - g p) / (s - p)) := by - ext; simp; ring - -- Apply to goal - rw[this] - have p_in_U : p ∈ U := mem_of_mem_nhds U_in_nhds - refine Asymptotics.IsBigO.add ?_ ?_ - · rw[← mul_one (1 : ℂ → ℂ)] - refine Asymptotics.IsBigO.mul f_near_p ?_ - -- Show g is bounded near p - have g_cont : ContinuousAt g p := by - -- g is holomorphic on U, p ∈ U, so g is continuous at p - exact (g_holc.continuousOn.continuousWithinAt p_in_U).continuousAt U_in_nhds - -- Use continuity to get boundedness - have := g_cont.norm.isBoundedUnder_le.isBigO_one ℂ - exact IsBigO.mono this inf_le_left - · -- Show that (fun s ↦ A * (g s - g p) / (s - p)) =O[𝓝[≠] p] 1 - - suffices (fun s ↦ A * ((s - p)⁻¹ * (g s - g p))) =O[𝓝[≠] p] 1 by - convert! this using 2 - rw[div_eq_mul_inv] - ring - apply Asymptotics.IsBigO.const_mul_left - - -- g is differentiable at p since it's holomorphic on U - have g_diff : HasDerivAt g (deriv g p) p := - (DifferentiableOn.differentiableAt g_holc U_in_nhds).hasDerivAt - - rw [hasDerivAt_iff_isLittleO] at g_diff - apply Asymptotics.IsLittleO.isBigO at g_diff - have : (fun x' ↦ deriv g p * (x' - p)) =O[𝓝 p] fun x' ↦ x' - p := by - apply Asymptotics.IsBigO.const_mul_left - exact Asymptotics.isBigO_refl (fun x ↦ x - p) (𝓝 p) - have h1 := g_diff.add this - have h2 : (fun x ↦ g x - g p) =O[𝓝 p] fun x' ↦ x' - p := by - convert! h1 using 2 - simp - ring - refine (Asymptotics.isBigO_mul_iff_isBigO_div ?_).mpr ?_ - · filter_upwards [self_mem_nhdsWithin] with x hx - simp only [mem_compl_iff, mem_singleton_iff] at hx - exact inv_ne_zero (sub_ne_zero.mpr hx) - · simp only [div_inv_eq_mul] - refine Asymptotics.IsBigO.mono ?_ inf_le_left - simpa - -theorem riemannZetaLogDerivResidue : - ∃ U ∈ 𝓝 1, BddAbove (norm ∘ (-(ζ' / ζ) - (fun s ↦ (s - 1)⁻¹)) '' (U \ {1})) := by - obtain ⟨U,U_in_nhds, hU⟩ := riemannZetaResidue - have hU' : BddAbove (norm ∘ (ζ - fun s ↦ 1 * (s - 1)⁻¹) '' (U \ {1})) := by - simp only [Function.comp_apply, Pi.sub_apply, one_mul] at hU ⊢ - exact hU - obtain ⟨V,V_in_nhds, V_is_open, hV⟩ := nonZeroOfBddAbove U_in_nhds one_ne_zero hU' - let W := V ∩ interior U - have hW : ∀ s ∈ W \ {1}, ζ s ≠ 0 := by - intro s hs - have s_in_V_diff : s ∈ V \ {1} := ⟨hs.1.1, hs.2⟩ - exact hV s s_in_V_diff - have ζ_holc: HolomorphicOn ζ (W \ {1}) := by - intro y hy - simp only [Set.mem_sdiff, mem_singleton_iff] at hy - refine DifferentiableAt.differentiableWithinAt ?_ - apply differentiableAt_riemannZeta hy.2 - have W_in_nhds : W ∈ 𝓝 1 := by - refine inter_mem V_in_nhds ?_ - exact interior_mem_nhds.mpr U_in_nhds - have := logDerivResidue'' hW ζ_holc W_in_nhds one_ne_zero - have HW : BddAbove (norm ∘ (ζ - fun s ↦ (s - 1)⁻¹) '' (W \ {1})) := by - obtain ⟨c, hc⟩ := bddAbove_def.mp hU - apply bddAbove_def.mpr - use c - rintro y ⟨x, x_in_W, fxy⟩ - apply hc - exact ⟨x, ⟨interior_subset x_in_W.1.2, x_in_W.2⟩, fxy⟩ - simp only [one_mul] at this - have aux: ∀ a, ‖-(deriv ζ a / ζ a) - (a - 1)⁻¹‖ = ‖(deriv ζ a / ζ a) + (a - 1)⁻¹‖ := by - intro a - calc ‖-(deriv ζ a / ζ a) - (a - 1)⁻¹‖ - = ‖-((deriv ζ a / ζ a) + (a - 1)⁻¹)‖ := by ring_nf - _ = ‖(deriv ζ a / ζ a) + (a - 1)⁻¹‖ := by rw [norm_neg] - simp only [Function.comp_apply, Pi.sub_apply] at hU - simp only [Function.comp_apply, Pi.sub_apply, Pi.neg_apply, Pi.div_apply, aux] - apply this HW - -theorem riemannZetaLogDerivResidueBigO : - (-ζ' / ζ - fun z ↦ (z - 1)⁻¹) =O[nhdsWithin 1 {1}ᶜ] (1 : ℂ → ℂ) := by - obtain ⟨U, hU, bdd⟩ := riemannZetaLogDerivResidue - convert BddAbove_to_IsBigO hU bdd using 2 - rw [neg_div] - noncomputable def riemannZeta0 (N : ℕ) (s : ℂ) : ℂ := (∑ n ∈ Finset.range (N + 1), 1 / (n : ℂ) ^ s) + (- N ^ (1 - s)) / (1 - s) + (- N ^ (-s)) / 2 + s * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1) -/-- We use `ζ` to denote the Rieman zeta function and `ζ₀` to denote the alternative Rieman zeta -function. -/ local notation (name := riemannzeta0) "ζ₀" => riemannZeta0 - lemma riemannZeta0_apply (N : ℕ) (s : ℂ) : ζ₀ N s = (∑ n ∈ Finset.range (N + 1), 1 / (n : ℂ) ^ s) + ((- N ^ (1 - s)) / (1 - s) + (- N ^ (-s)) / 2 @@ -723,12 +234,6 @@ lemma ZetaBnd_aux1a {a b : ℝ} (apos : 0 < a) (a_lt_b : a < b) {s : ℂ} (σpos lemma Finset.Ioc_eq_Ico (M N : ℕ) : Finset.Ioc N M = Finset.Ico (N + 1) (M + 1) := by ext a; simp only [Finset.mem_Ioc, Finset.mem_Ico]; constructor <;> intro ⟨h₁, h₂⟩ <;> omega -lemma Finset.Ioc_eq_Icc (M N : ℕ) : Finset.Ioc N M = Finset.Icc (N + 1) M := by - ext a; simp only [Finset.mem_Ioc, Finset.mem_Icc]; constructor <;> intro ⟨h₁, h₂⟩ <;> omega - -lemma Finset.Icc_eq_Ico (M N : ℕ) : Finset.Icc N M = Finset.Ico N (M + 1) := by - ext a; simp only [Finset.mem_Icc, Finset.mem_Ico]; constructor <;> intro ⟨h₁, h₂⟩ <;> omega - lemma finsetSum_tendsto_tsum {N : ℕ} {f : ℕ → ℂ} (hf : Summable f) : Tendsto (fun (k : ℕ) ↦ ∑ n ∈ Finset.Ico N k, f n) atTop (𝓝 (∑' (n : ℕ), f (n + N))) := by have := Summable.hasSum_iff_tendsto_nat hf (m := ∑' (n : ℕ), f n) |>.mp hf.hasSum @@ -837,43 +342,6 @@ lemma ZetaBnd_aux1b (N : ℕ) (Npos : 1 ≤ N) {σ t : ℝ} (σpos : 0 < σ) : apply le_trans ?_ this convert! ZetaBnd_aux1a (a := N) (b := t) (by positivity) (by linarith) ?_ <;> simp [σpos] -lemma ZetaBnd_aux1 (N : ℕ) (Npos : 1 ≤ N) {σ t : ℝ} (hσ : σ ∈ Ioc 0 2) (ht : 2 ≤ |t|) : - ‖(σ + t * I) * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ ((σ + t * I) + 1)‖ - ≤ 2 * |t| * N ^ (-σ) / σ := by - rw [norm_mul, mul_div_assoc] - rw [Set.mem_Ioc] at hσ - apply mul_le_mul ?_ (ZetaBnd_aux1b N Npos hσ.1) (norm_nonneg _) (by positivity) - refine le_trans (by apply norm_add_le) ?_ - simp only [Complex.norm_of_nonneg hσ.1.le, Complex.norm_mul, norm_real, Real.norm_eq_abs, norm_I, - mul_one] - linarith [hσ.2] - -lemma ZetaBnd_aux1p (N : ℕ) (Npos : 1 ≤ N) {σ : ℝ} (hσ : σ ∈ Ioc 0 2) : - (fun (t : ℝ) ↦ - ‖(σ + t * I) * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ ((σ + t * I) + 1)‖) - =O[Filter.principal {t | 2 ≤ |t|}] fun t ↦ |t| * N ^ (-σ) / σ := by - rw [Asymptotics.IsBigO_def] - use 2 - rw [Asymptotics.isBigOWith_principal] - intro t ht - simp only [mem_setOf_eq] at ht - rw [norm_norm, norm_mul, mul_div_assoc, norm_mul] - have : 2 * (‖|t|‖ * ‖↑N ^ (-σ) / σ‖) = (2 * |t|) * ((N : ℝ) ^ (-σ) / σ) := by - simp only [Real.norm_eq_abs, _root_.abs_abs, norm_div] - have : σ ≠ 0 := by linarith [hσ.1] - field_simp - rw [abs_of_pos hσ.1] - have : 0 < (N : ℝ) ^ (-σ) := by - refine Real.rpow_pos_of_pos ?_ _ - positivity - rw [abs_of_pos this] - ring - rw [this] - apply mul_le_mul ?_ (ZetaBnd_aux1b N Npos hσ.1) (norm_nonneg _) (by positivity) - refine le_trans (by apply norm_add_le) ?_ - simp only [norm_real, norm_mul, norm_I, mul_one, Complex.norm_of_nonneg hσ.1.le, Real.norm_eq_abs] - linarith [hσ.2] - lemma isOpen_aux : IsOpen {z : ℂ | z ≠ 1 ∧ 0 < z.re} := by refine IsOpen.inter isOpen_ne ?_ exact isOpen_lt (g := fun (z : ℂ) ↦ z.re) (by continuity) (by continuity) @@ -949,89 +417,58 @@ open MeasureTheory in lemma hasDerivAt_Zeta0Integral {N : ℕ} (Npos : 0 < N) {s : ℂ} (hs : s ∈ {s | 0 < s.re}) : HasDerivAt (fun z ↦ ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-z - 1)) (∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (- s - 1) * (- Real.log x)) s := by - simp only [mem_setOf_eq] at hs + simp only [Set.mem_ofPred_eq] at hs set f : ℝ → ℂ := fun x ↦ (⌊x⌋ : ℂ) + 1 / 2 - x - set F : ℂ → ℝ → ℂ := fun s x ↦ (x : ℂ) ^ (- s - 1) * f x - set F' : ℂ → ℝ → ℂ := fun s x ↦ (x : ℂ) ^ (- s - 1) * (- Real.log x) * f x + set F : ℂ → ℝ → ℂ := fun z x ↦ (x : ℂ) ^ (-z - 1) * f x + set F' : ℂ → ℝ → ℂ := fun z x ↦ (x : ℂ) ^ (-z - 1) * (-Real.log x) * f x set ε := s.re / 2 - have ε_pos : 0 < ε := by aesop - set bound : ℝ → ℝ := fun x ↦ |x ^ (- s.re / 2 - 1)| * |Real.log x| + set bound : ℝ → ℝ := fun x ↦ |x ^ (-s.re / 2 - 1)| * |Real.log x| let μ : Measure ℝ := volume.restrict (Ioi (N : ℝ)) have hF_meas : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) μ := by - have : {z : ℂ | 0 < z.re} ∈ 𝓝 s := by - rw [mem_nhds_iff] - refine ⟨{z | 0 < z.re}, fun ⦃a⦄ a ↦ a, isOpen_lt continuous_const Complex.continuous_re, hs⟩ - filter_upwards [this] with z hz - convert! integrableOn_of_Zeta0_fun Npos hz |>.aestronglyMeasurable using 1 + have hmem : {z : ℂ | 0 < z.re} ∈ 𝓝 s := + (isOpen_lt continuous_const Complex.continuous_re).mem_nhds hs + filter_upwards [hmem] with z hz + convert! (integrableOn_of_Zeta0_fun Npos hz).aestronglyMeasurable using 1 simp only [F, f]; ext x; ring_nf have hF_int : Integrable (F s) μ := by - convert! integrableOn_of_Zeta0_fun Npos hs |>.integrable using 1 + convert! (integrableOn_of_Zeta0_fun Npos hs).integrable using 1 simp only [F, f]; ext x; ring_nf have hF'_meas : AEStronglyMeasurable (F' s) μ := by - convert! integrableOn_of_Zeta0_fun_log Npos hs |>.aestronglyMeasurable using 1 + convert! (integrableOn_of_Zeta0_fun_log Npos hs).aestronglyMeasurable using 1 simp only [F', f]; ext x; ring_nf - have IoiSubIoi1 : (Ioi (N : ℝ)) ⊆ {x | 1 < x} := - fun x hx ↦ lt_of_le_of_lt (by simp only [Nat.one_le_cast]; omega) <| mem_Ioi.mp hx - have measSetIoi1 : MeasurableSet {x : ℝ | 1 < x} := (isOpen_lt' 1).measurableSet - have h_bound1 : - ∀ᵐ (x : ℝ) ∂volume.restrict {x | 1 < x}, ∀ z ∈ Metric.ball s ε, ‖F' z x‖ ≤ bound x := by - filter_upwards [self_mem_ae_restrict measSetIoi1] with x hx - intro z hz - simp only [F', f, bound] - calc _ = ‖(x : ℂ) ^ (-z - 1)‖ * ‖-(Real.log x)‖ * ‖(⌊x⌋ + 1 / 2 - x)‖ := by - simp only [mul_neg, one_div, neg_mul, norm_neg, norm_mul, norm_real, Real.norm_eq_abs, - ← (by simp : (((⌊x⌋ + 2⁻¹ - x) : ℝ) : ℂ) = (⌊x⌋ : ℂ) + 2⁻¹ - ↑x), - Complex.norm_real] - _ = ‖x ^ (-z.re - 1)‖ * ‖-(Real.log x)‖ * ‖(⌊x⌋ + 1 / 2 - x)‖ := ?_ - _ = |x ^ (-z.re - 1)| * |(Real.log x)| * |(⌊x⌋ + 1 / 2 - x)| := by simp - _ ≤ _ := ?_ - · congr! 2 - simp only [Real.norm_eq_abs, norm_cpow_eq_rpow_re_of_pos (by linarith), - sub_re, neg_re, one_re] - apply abs_eq_self.mpr ?_ |>.symm - positivity - · rw [mul_comm, ← mul_assoc] - apply mul_le_mul_of_nonneg_right ?_ <| abs_nonneg _ - simp only [Metric.mem_ball, ε, Complex.dist_eq] at hz - apply le_trans (b := 1 * |x ^ (-z.re - 1)|) - · apply mul_le_mul_of_nonneg_right (le_trans (ZetaSum_aux1_3 _) (by norm_num)) <| abs_nonneg _ - · simp_rw [one_mul, Real.abs_rpow_of_nonneg (by linarith : 0 ≤ x)] - apply Real.rpow_le_rpow_of_exponent_le <| le_abs.mpr (by left; exact hx.le) - have := abs_le.mp <| le_trans (abs_re_le_norm (z-s)) hz.le - simp only [sub_re, neg_le_sub_iff_le_add, tsub_le_iff_right] at this - linarith [this.1] + have IoiSubIoi1 : Ioi (N : ℝ) ⊆ {x | 1 < x} := + fun _ hx ↦ lt_of_le_of_lt (by exact_mod_cast Npos) (mem_Ioi.mp hx) have h_bound : ∀ᵐ x ∂μ, ∀ z ∈ Metric.ball s ε, ‖F' z x‖ ≤ bound x := by - apply ae_restrict_of_ae_restrict_of_subset IoiSubIoi1 - exact h_bound1 + filter_upwards [ae_restrict_of_ae_restrict_of_subset IoiSubIoi1 + (self_mem_ae_restrict (isOpen_lt' 1).measurableSet)] with x hx z hz + have hx0 : 0 < x := by linarith + have hfnorm : ‖f x‖ ≤ 1 := by + have : f x = (((⌊x⌋ + 1 / 2 - x : ℝ) : ℂ)) := by simp [f] + rw [this, Complex.norm_real]; exact (ZetaSum_aux1_3 x).trans (by norm_num) + have hre : -z.re - 1 ≤ -s.re / 2 - 1 := by + have h1 := (abs_le.mp ((abs_re_le_norm (z - s)).trans (dist_eq_norm z s ▸ Metric.mem_ball.mp hz).le)).1 + simp only [sub_re, ε] at h1; linarith + have hrpow : ‖(x : ℂ) ^ (-z - 1)‖ ≤ |x ^ (-s.re / 2 - 1)| := by + rw [norm_cpow_eq_rpow_re_of_pos hx0, sub_re, neg_re, one_re, + abs_of_nonneg (Real.rpow_nonneg hx0.le _)] + exact Real.rpow_le_rpow_of_exponent_le hx.le hre + calc ‖F' z x‖ = ‖(x : ℂ) ^ (-z - 1)‖ * |Real.log x| * ‖f x‖ := by + simp only [F', norm_mul, norm_neg, Complex.norm_real, Real.norm_eq_abs] + _ ≤ |x ^ (-s.re / 2 - 1)| * |Real.log x| * 1 := by gcongr + _ = bound x := mul_one _ have bound_integrable : Integrable bound μ := by - simp only [bound] convert! integrable_log_over_pow (r := -s.re / 2) (by linarith) Npos using 0 have h_diff : ∀ᵐ x ∂μ, ∀ z ∈ Metric.ball s ε, HasDerivAt (fun w ↦ F w x) (F' z x) z := by - simp only [F, F', f] - apply ae_restrict_of_ae_restrict_of_subset IoiSubIoi1 - filter_upwards [h_bound1, self_mem_ae_restrict measSetIoi1] with x _ one_lt_x - intro z hz - convert! HasDerivAt.mul_const (c := fun (w : ℂ) ↦ (x : ℂ) ^ (-w-1)) - (c' := (x : ℂ) ^ (-z-1) * -Real.log x) (d := (⌊x⌋ : ℝ) + 1 / 2 - x) ?_ using 1 - convert! HasDerivAt.comp (h := fun w ↦ -w-1) (h' := -1) (h₂ := fun w ↦ x ^ w) - (h₂' := x ^ (-z-1) * Real.log x) (x := z) ?_ ?_ using 0 - · simp only [mul_neg, mul_one]; congr! 2 - · convert! HasDerivAt.const_cpow (c := (x : ℂ)) (f := fun w ↦ w) (f' := 1) (x := -z-1) - (hasDerivAt_id _) ?_ using 1 - · simp only [mul_one, mul_eq_mul_left_iff, cpow_eq_zero_iff, ofReal_eq_zero, ne_eq] - left - rw [Complex.ofReal_log] - linarith - · right - intro h - simp only [Metric.mem_ball, ε, Complex.dist_eq, - neg_eq_iff_eq_neg.mp <| sub_eq_zero.mp h] at hz - have := (abs_le.mp <| le_trans (abs_re_le_norm (-1-s)) hz.le).1 - simp only [sub_re, neg_re, one_re, neg_le_sub_iff_le_add, le_neg_add_iff_add_le] at this - linarith - · apply hasDerivAt_id _ |>.neg |>.sub_const + filter_upwards [ae_restrict_of_ae_restrict_of_subset IoiSubIoi1 + (self_mem_ae_restrict (isOpen_lt' 1).measurableSet)] with x hx z _ + have h1 : HasDerivAt (fun w : ℂ ↦ (x : ℂ) ^ (-w - 1)) ((x : ℂ) ^ (-z - 1) * (-Real.log x)) z := by + have hc := ((hasDerivAt_id z).neg.sub_const 1).const_cpow (c := (x : ℂ)) + (Or.inl (by exact_mod_cast (by linarith : (0 : ℝ) < x).ne')) + refine hc.congr_deriv ?_ + simp only [Pi.neg_apply, id_eq, ← Complex.ofReal_log (by linarith)]; ring + exact h1.mul_const (f x) convert! (hasDerivAt_integral_of_dominated_loc_of_deriv_le (F := F) (F' := F') (x₀ := s) - (s := Metric.ball s ε) (bound := bound) (μ := μ) (Metric.ball_mem_nhds s ε_pos) + (s := Metric.ball s ε) (bound := bound) (μ := μ) (Metric.ball_mem_nhds s (by positivity)) hF_meas hF_int hF'_meas h_bound bound_integrable h_diff).2 using 3 · ext a; simp only [one_div, F, f]; ring_nf · simp only [one_div, mul_neg, neg_mul, neg_inj, F', f]; ring_nf @@ -1085,77 +522,38 @@ lemma HolomorphicOn_riemannZeta0 {N : ℕ} (N_pos : 0 < N) : HolomorphicOn (ζ₀ N) {s : ℂ | s ≠ 1 ∧ 0 < s.re} := fun _ ⟨hs₁, hs₂⟩ ↦ (HasDerivAtZeta0 N_pos hs₂ hs₁).differentiableAt.differentiableWithinAt --- MOVE TO MATHLIB near `differentiableAt_riemannZeta` -lemma HolomorphicOn_riemannZeta : - HolomorphicOn ζ {s : ℂ | s ≠ 1} := by - intro z hz - simp only [mem_setOf_eq] at hz - exact (differentiableAt_riemannZeta hz).differentiableWithinAt +private lemma joinedIn_seg_aux {a b : ℂ} (ha : 0 < a.re) (hb : 0 < b.re) + (hne : ∀ t : ℝ, t ∈ Set.Icc (0 : ℝ) 1 → b * t + a * (1 - t) ≠ 1) : + JoinedIn {z : ℂ | z ≠ 1 ∧ 0 < z.re} a b := by + apply JoinedIn.ofLine (f := fun t : ℝ ↦ b * t + a * (1 - t)) (by fun_prop) (by simp) (by simp) + rintro _ ⟨t, ht, rfl⟩ + refine ⟨hne t ht, ?_⟩ + simp only [add_re, mul_re, ofReal_re, ofReal_im, sub_re, sub_im, one_re, one_im, sub_zero, + mul_zero] + rcases eq_or_lt_of_le ht.1 with rfl | ht0 + · linarith + · nlinarith [ht.2] lemma isPathConnected_aux : IsPathConnected {z : ℂ | z ≠ 1 ∧ 0 < z.re} := by - use (2 : ℂ) - constructor - · simp - intro w hw; simp only [ne_eq, mem_setOf_eq] at hw + refine ⟨2, by simp, fun w hw ↦ ?_⟩ by_cases w_im : w.im = 0 - · apply JoinedIn.trans (y := 1 + I) - · let f : ℝ → ℂ := fun t ↦ (1 + I) * t + 2 * (1 - t) - have cont : Continuous f := by continuity - apply JoinedIn.ofLine cont.continuousOn (by simp [f]) (by simp [f]) - simp only [unitInterval, ne_eq, image_subset_iff, preimage_setOf_eq, add_re, mul_re, one_re, - I_re, add_zero, ofReal_re, one_mul, add_im, one_im, I_im, zero_add, ofReal_im, mul_zero, - sub_zero, re_ofNat, sub_re, im_ofNat, sub_im, sub_self, f] - intro x hx; simp only [mem_Icc] at hx - refine ⟨?_, by linarith⟩ - intro h - rw [Complex.ext_iff] at h; simp [(by apply And.right; simpa [w_im] using h : x = 0)] at h - · let f : ℝ → ℂ := fun t ↦ w * t + (1 + I) * (1 - t) - have cont : Continuous f := by continuity - apply JoinedIn.ofLine cont.continuousOn (by simp [f]) (by simp [f]) - simp only [unitInterval, ne_eq, image_subset_iff, preimage_setOf_eq, add_re, mul_re, - ofReal_re, ofReal_im, mul_zero, sub_zero, one_re, I_re, add_zero, sub_re, one_mul, add_im, - one_im, I_im, zero_add, sub_im, sub_self, f] - intro x hx; simp only [mem_Icc] at hx - simp only [mem_setOf_eq] - constructor - · intro h - refine hw.1 ?_ - rw [Complex.ext_iff] at h - have : x = 1 := by linarith [(by apply And.right; simpa [w_im] using h : 1 - x = 0)] - rw [Complex.ext_iff, one_re, one_im]; exact ⟨by simpa [this, w_im] using h, w_im⟩ - · by_cases hxx : x = 0 - · simp only [hxx]; linarith - · have : 0 < x := lt_of_le_of_ne hx.1 (Ne.symm hxx) - have : 0 ≤ 1 - x := by linarith - have := hw.2 - positivity - · let f : ℝ → ℂ := fun t ↦ w * t + 2 * (1 - t) - have cont : Continuous f := by continuity - apply JoinedIn.ofLine cont.continuousOn (by simp [f]) (by simp [f]) - simp only [unitInterval, ne_eq, image_subset_iff, preimage_setOf_eq, add_re, mul_re, ofReal_re, - ofReal_im, mul_zero, sub_zero, re_ofNat, sub_re, one_re, im_ofNat, sub_im, one_im, sub_self, - f] - intro x hx; simp only [mem_Icc] at hx - constructor - · intro h - rw [Complex.ext_iff] at h; - simp [(by apply And.right; simpa [w_im] using h : x = 0)] at h - · by_cases hxx : x = 0 - · simp only [hxx]; linarith - · have : 0 < x := lt_of_le_of_ne hx.1 (Ne.symm hxx) - have : 0 ≤ 1 - x := by linarith - have := hw.2 - positivity + · refine (joinedIn_seg_aux (a := 2) (b := 1 + I) (by norm_num) (by norm_num) fun t _ h ↦ ?_).trans + (joinedIn_seg_aux (a := 1 + I) (b := w) (by norm_num) hw.2 fun t _ h ↦ ?_) + · have him := congrArg Complex.im h; simp at him + have hre := congrArg Complex.re h; simp [him] at hre + · have him := congrArg Complex.im h; simp [w_im] at him + have hre := congrArg Complex.re h; simp [← sub_eq_zero.mp him] at hre + exact hw.1 (Complex.ext (by simpa using hre) (by simpa using w_im)) + · exact joinedIn_seg_aux (a := 2) (b := w) (by norm_num) hw.2 fun t _ h ↦ by + have him := congrArg Complex.im h; simp [w_im] at him + have hre := congrArg Complex.re h; simp [him] at hre lemma Zeta0EqZeta {N : ℕ} (N_pos : 0 < N) {s : ℂ} (reS_pos : 0 < s.re) (s_ne_one : s ≠ 1) : ζ₀ N s = riemannZeta s := by let f := riemannZeta let g := ζ₀ N let U := {z : ℂ | z ≠ 1 ∧ 0 < z.re} - have f_an : AnalyticOnNhd ℂ f U := by - apply (HolomorphicOn_riemannZeta.analyticOnNhd isOpen_ne).mono - simp only [ne_eq, setOf_subset_setOf, and_imp, U] - exact fun a ha _ ↦ ha + have f_an : AnalyticOnNhd ℂ f U := analyticOn_riemannZeta.mono fun _ ha ↦ ha.1 have g_an : AnalyticOnNhd ℂ g U := (HolomorphicOn_riemannZeta0 N_pos).analyticOnNhd isOpen_aux have preconU : IsPreconnected U := by apply IsConnected.isPreconnected @@ -1166,7 +564,7 @@ lemma Zeta0EqZeta {N : ℕ} (N_pos : 0 < N) {s : ℂ} (reS_pos : 0 < s.re) (s_ne have u_mem : {z : ℂ | 1 < z.re} ∈ 𝓝 (2 : ℂ) := by apply mem_nhds_iff.mpr use {z : ℂ | 1 < z.re} - simp only [setOf_subset_setOf, imp_self, forall_const, mem_setOf_eq, re_ofNat, + simp only [Set.ofPred_subset_ofPred, imp_self, forall_const, Set.mem_ofPred_eq, re_ofNat, Nat.one_lt_ofNat, and_true, true_and] exact isOpen_lt (by continuity) (by continuity) filter_upwards [u_mem] @@ -1177,1884 +575,28 @@ lemma Zeta0EqZeta {N : ℕ} (N_pos : 0 < N) {s : ℂ} (reS_pos : 0 < s.re) (s_ne ← (summable_one_div_nat_cpow.mpr hz).sum_add_tsum_nat_add (N + 1)] norm_cast -lemma DerivZeta0EqDerivZeta {N : ℕ} (N_pos : 0 < N) {s : ℂ} (reS_pos : 0 < s.re) - (s_ne_one : s ≠ 1) : - deriv (ζ₀ N) s = ζ' s := by - let U := {z : ℂ | z ≠ 1 ∧ 0 < z.re} - have {x : ℂ} (hx : x ∈ U) : ζ₀ N x = ζ x := by - simp only [mem_setOf_eq, U] at hx; exact Zeta0EqZeta (N := N) N_pos hx.2 hx.1 - refine deriv_eqOn isOpen_aux ?_ (by simp [s_ne_one, reS_pos]) - intro x hx - have hζ := HolomorphicOn_riemannZeta.mono (by aesop)|>.hasDerivAt (s := U) <| - isOpen_aux.mem_nhds hx - exact hζ.hasDerivWithinAt.congr (fun y hy ↦ this hy) (this hx) - -lemma le_trans₄ {α : Type*} [Preorder α] {a b c d : α} : a ≤ b → b ≤ c → c ≤ d → a ≤ d := - fun hab hbc hcd ↦ le_trans (le_trans hab hbc) hcd - -lemma lt_trans₄ {α : Type*} [Preorder α] {a b c d : α} : a < b → b < c → c < d → a < d := - fun hab hbc hcd ↦ lt_trans (lt_trans hab hbc) hcd - -lemma norm_add₅_le {E : Type*} [SeminormedAddGroup E] (a : E) (b : E) (c : E) (d : E) (e : E) : - ‖a + b + c + d + e‖ ≤ ‖a‖ + ‖b‖ + ‖c‖ + ‖d‖ + ‖e‖ := by - apply le_trans <| norm_add_le (a + b + c + d) e - simp only [add_le_add_iff_right]; apply norm_add₄_le - -lemma norm_add₆_le {E : Type*} [SeminormedAddGroup E] (a : E) (b : E) (c : E) (d : E) (e : E) - (f : E) : - ‖a + b + c + d + e + f‖ ≤ ‖a‖ + ‖b‖ + ‖c‖ + ‖d‖ + ‖e‖ + ‖f‖ := by - apply le_trans <| norm_add_le (a + b + c + d + e) f - simp only [add_le_add_iff_right]; apply norm_add₅_le - -lemma mul_le_mul₃ {α : Type*} {a b c d e f : α} [MulZeroClass α] [Preorder α] [PosMulMono α] - [MulPosMono α] (h₁ : a ≤ b) (h₂ : c ≤ d) (h₃ : e ≤ f) (c0 : 0 ≤ c) (b0 : 0 ≤ b) - (e0 : 0 ≤ e) : a * c * e ≤ b * d * f := by - apply mul_le_mul (mul_le_mul h₁ h₂ c0 b0) h₃ e0 <| mul_nonneg b0 <| le_trans c0 h₂ - -lemma ZetaBnd_aux2 {n : ℕ} {t A σ : ℝ} (Apos : 0 < A) (σpos : 0 < σ) (n_le_t : n ≤ |t|) - (σ_ge : (1 : ℝ) - A / Real.log |t| ≤ σ) : - ‖(n : ℂ) ^ (-(σ + t * I))‖ ≤ (n : ℝ)⁻¹ * Real.exp A := by - set s := σ + t * I - by_cases n0 : n = 0 - · simp_rw [n0, CharP.cast_eq_zero, inv_zero, zero_mul] - rw [Complex.zero_cpow ?_] - · simp - · exact fun h ↦ σpos.ne' <| zero_eq_neg.mp <| zero_re ▸ h ▸ (by simp [s]) - have n_gt_0 : 0 < n := Nat.pos_of_ne_zero n0 - have n_gt_0' : (0 : ℝ) < (n : ℝ) := Nat.cast_pos.mpr n_gt_0 - have n_ge_1 : 1 ≤ (n : ℝ) := Nat.one_le_cast.mpr <| Nat.succ_le_of_lt n_gt_0 - calc - _ = |((n : ℝ) ^ (-σ))| := ?_ - _ ≤ Real.exp (Real.log n * -σ) := Real.abs_rpow_le_exp_log_mul (n : ℝ) (-σ) - _ ≤ Real.exp (Real.log n * -(1 - A / Real.log t)) := ?_ - _ ≤ Real.exp (- Real.log n + A) := Real.exp_le_exp_of_le ?_ - _ ≤ _ := by rw [Real.exp_add, Real.exp_neg, Real.exp_log n_gt_0'] - · have : ‖(n : ℂ) ^ (-s)‖ = n ^ (-s.re) := norm_cpow_eq_rpow_re_of_pos n_gt_0' (-s) - rw [this, abs_eq_self.mpr <| Real.rpow_nonneg n_gt_0'.le _]; simp [s] - · apply Real.exp_le_exp_of_le <| mul_le_mul_of_nonneg_left _ <| Real.log_nonneg n_ge_1 - rw [neg_sub, neg_le_sub_iff_le_add, add_comm, ← Real.log_abs]; linarith - · simp only [neg_sub, le_neg_add_iff_add_le] - ring_nf - conv => rw [mul_comm, ← mul_assoc, ← Real.log_abs]; rhs; rw [← one_mul A] - gcongr - by_cases ht1 : |t| = 1 - · simp [ht1] - apply (inv_mul_le_iff₀ ?_).mpr - · convert! Real.log_le_log n_gt_0' n_le_t using 1; rw [mul_one] - · exact Real.log_pos <| lt_of_le_of_ne (le_trans n_ge_1 n_le_t) <| fun t ↦ ht1 (t.symm) - -lemma logt_gt_one {t : ℝ} (t_ge : 3 ≤ t) : 1 < Real.log t := - (Real.lt_log_iff_exp_lt (by linarith)).mpr (by linarith [Real.exp_one_lt_d9]) - -lemma UpperBnd_aux {A σ t : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) (t_gt : 3 < |t|) - (σ_ge : 1 - A / Real.log |t| ≤ σ) : - let N := ⌊|t|⌋₊; - 0 < N ∧ N ≤ |t| ∧ 1 < Real.log |t| ∧ 1 - A < σ ∧ 0 < σ ∧ σ + t * I ≠ 1 := by - intro N - have Npos : 0 < N := Nat.floor_pos.mpr (by linarith) - have N_le_t : N ≤ |t| := Nat.floor_le <| abs_nonneg _ - have logt_gt := logt_gt_one t_gt.le - have σ_gt : 1 - A < σ := by - apply lt_of_lt_of_le ((sub_lt_sub_iff_left (a := 1)).mpr ?_) σ_ge - exact (div_lt_iff₀ (by linarith)).mpr <| lt_mul_right hA.1 logt_gt - refine ⟨Npos, N_le_t, logt_gt, σ_gt, by linarith [hA.2], ?_⟩ - contrapose! t_gt - simp only [Complex.ext_iff, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, add_zero, one_re, add_im, mul_im, zero_add, one_im] at t_gt - norm_num [t_gt.2] - -lemma UpperBnd_aux2 {A σ t : ℝ} (t_ge : 3 < |t|) (σ_ge : 1 - A / Real.log |t| ≤ σ) : - |t| ^ (1 - σ) ≤ Real.exp A := by - have : |t| ^ (1 - σ) ≤ |t| ^ (A / Real.log |t|) := - Real.rpow_le_rpow_of_exponent_le (by linarith) (by linarith) - apply le_trans this ?_ - conv => lhs; lhs; rw [← Real.exp_log (by linarith : 0 < |t|)] - rw [div_eq_mul_inv, Real.rpow_mul (by positivity), ← Real.exp_mul, ← Real.exp_mul, mul_comm, - ← mul_assoc, inv_mul_cancel₀, one_mul] - apply Real.log_ne_zero.mpr; split_ands <;> linarith - -lemma riemannZeta0_zero_aux (N : ℕ) (Npos : 0 < N) : - ∑ x ∈ Finset.Ico 0 N, ((x : ℝ))⁻¹ = ∑ x ∈ Finset.Ico 1 N, ((x : ℝ))⁻¹ := by - have : Finset.Ico 1 N ⊆ Finset.Ico 0 N := by - intro x hx - simp only [Finset.mem_Ico, Nat.Ico_zero_eq_range, Finset.mem_range] at hx ⊢ - exact hx.2 - rw [← Finset.sum_sdiff (s₁ := Finset.Ico 1 N) (s₂ := Finset.Ico 0 N) this] - have : Finset.Ico 0 N \ Finset.Ico 1 N = Finset.range 1 := by - ext a - simp only [Nat.Ico_zero_eq_range, Finset.mem_sdiff, Finset.mem_range, Finset.mem_Ico, not_and, - not_lt, Finset.range_one, Finset.mem_singleton] - exact ⟨fun _ ↦ by omega, fun ha ↦ ⟨by simp [ha, Npos], by omega⟩⟩ - rw [this]; simp - -lemma UpperBnd_aux3 {A C σ t : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) - (σ_ge : 1 - A / Real.log |t| ≤ σ) (t_gt : 3 < |t|) (hC : 2 ≤ C) : let N := ⌊|t|⌋₊; - ‖∑ n ∈ Finset.range (N + 1), (n : ℂ) ^ (-(σ + t * I))‖ ≤ - Real.exp A * C * Real.log |t| := by - intro N - obtain ⟨Npos, N_le_t, _, _, σPos, _⟩ := UpperBnd_aux hA t_gt σ_ge - have logt_gt := logt_gt_one t_gt.le - have (n : ℕ) (hn : n ∈ Finset.range (N + 1)) := ZetaBnd_aux2 (n := n) hA.1 σPos ?_ σ_ge - · replace := norm_sum_le_of_le (Finset.range (N + 1)) this - rw [← Finset.sum_mul, mul_comm _ (Real.exp A)] at this - rw [mul_assoc] - apply le_trans this <| (mul_le_mul_iff_right₀ A.exp_pos).mpr ?_ - have : 1 + Real.log (N : ℝ) ≤ C * Real.log |t| := by - by_cases hN : N = 1 - · simp only [hN, Nat.cast_one, Real.log_one, add_zero] - have : 2 * 1 ≤ C * Real.log |t| := mul_le_mul hC logt_gt.le (by linarith) (by linarith) - linarith - · rw [(by ring : C * Real.log |t| = Real.log |t| + (C - 1) * Real.log |t|), - ← one_mul <| Real.log (N: ℝ)] - apply add_le_add logt_gt.le - refine mul_le_mul (by linarith) ?_ (by positivity) (by linarith) - exact Real.log_le_log (by positivity) N_le_t - refine le_trans ?_ this - convert! harmonic_eq_sum_Icc ▸ harmonic_le_one_add_log N - · simp only [Rat.cast_sum, Rat.cast_inv, Rat.cast_natCast, Finset.range_eq_Ico] - rw [riemannZeta0_zero_aux (N + 1) (by linarith)]; congr! 1 - · simp only [Finset.mem_range] at hn - linarith [(by exact_mod_cast (by omega : n ≤ N) : (n : ℝ) ≤ N)] - -lemma Nat.self_div_floor_bound {t : ℝ} (t_ge : 1 ≤ |t|) : let N := ⌊|t|⌋₊; - (|t| / N) ∈ Icc 1 2 := by - intro N - have Npos : 0 < N := Nat.floor_pos.mpr (by linarith) - have N_le_t : N ≤ |t| := Nat.floor_le <| abs_nonneg _ - constructor - · apply le_div_iff₀ (by simp [Npos]) |>.mpr; simp [N_le_t] - · apply div_le_iff₀ (by positivity) |>.mpr - suffices |t| < N + 1 by linarith [(by exact_mod_cast (by omega) : 1 ≤ (N : ℝ))] - apply Nat.lt_floor_add_one - -lemma UpperBnd_aux5 {σ t : ℝ} (t_ge : 3 < |t|) (σ_le : σ ≤ 2) : (|t| / ⌊|t|⌋₊) ^ σ ≤ 4 := by - obtain ⟨h₁, h₂⟩ := Nat.self_div_floor_bound (by linarith) - calc _ ≤ ((|t| / ↑⌊|t|⌋₊) ^ (2 : ℝ)) := by gcongr - _ ≤ (2 : ℝ) ^ (2 : ℝ) := by gcongr - _ = 4 := by norm_num - -lemma UpperBnd_aux6 {σ t : ℝ} (t_ge : 3 < |t|) (hσ : σ ∈ Ioc (1 / 2) 2) - (neOne : σ + t * I ≠ 1) (Npos : 0 < ⌊|t|⌋₊) (N_le_t : ⌊|t|⌋₊ ≤ |t|) : - ⌊|t|⌋₊ ^ (1 - σ) / ‖1 - (σ + t * I)‖ ≤ |t| ^ (1 - σ) * 2 ∧ - ⌊|t|⌋₊ ^ (-σ) / 2 ≤ |t| ^ (1 - σ) ∧ ⌊|t|⌋₊ ^ (-σ) / σ ≤ 8 * |t| ^ (-σ) := by - have bnd := UpperBnd_aux5 t_ge hσ.2 - have bnd' : (|t| / ⌊|t|⌋₊) ^ σ ≤ 2 * |t| := by linarith - split_ands - · apply (div_le_iff₀ <| norm_pos_iff.mpr <| sub_ne_zero_of_ne neOne.symm).mpr - conv => rw [mul_assoc]; rhs; rw [mul_comm] - apply (div_le_iff₀ <| Real.rpow_pos_of_pos (by linarith) _).mp - rw [div_rpow_eq_rpow_div_neg (by positivity) (by positivity), neg_sub] - refine le_trans₄ ?_ bnd' ?_ - · exact Real.rpow_le_rpow_of_exponent_le (one_le_div (by positivity) |>.mpr N_le_t) (by simp) - · apply (mul_le_mul_iff_right₀ (by norm_num)).mpr; simpa using abs_im_le_norm (1 - (σ + t * I)) - · apply div_le_iff₀ (by norm_num) |>.mpr - rw [Real.rpow_sub (by linarith), Real.rpow_one, div_mul_eq_mul_div, mul_comm] - apply div_le_iff₀ (by positivity) |>.mp - convert! bnd' using 1 - rw [← Real.rpow_neg (by linarith), div_rpow_neg_eq_rpow_div (by positivity) (by positivity)] - · apply div_le_iff₀ (by linarith [hσ.1]) |>.mpr - rw [mul_assoc, mul_comm, mul_assoc] - apply div_le_iff₀' (by positivity) |>.mp - apply le_trans ?_ (by linarith [hσ.1] : 4 ≤ σ * 8) - convert! bnd using 1; exact div_rpow_neg_eq_rpow_div (by positivity) (by positivity) - -lemma ZetaUpperBnd' {A σ t : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) (t_gt : 3 < |t|) - (hσ : σ ∈ Icc (1 - A / Real.log |t|) 2) : - let C := Real.exp A * (5 + 8 * 2); -- the 2 comes from ZetaBnd_aux1 - let N := ⌊|t|⌋₊; - let s := σ + t * I; - ‖∑ n ∈ Finset.range (N + 1), 1 / (n : ℂ) ^ s‖ + ‖(N : ℂ) ^ (1 - s) / (1 - s)‖ - + ‖(N : ℂ) ^ (-s) / 2‖ - + ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1)‖ - ≤ C * Real.log |t| := by - intros C N s - obtain ⟨Npos, N_le_t, logt_gt, σ_gt, σPos, neOne⟩ := UpperBnd_aux hA t_gt hσ.1 - replace σ_gt : 1 / 2 < σ := by linarith [hA.2] - calc - _ ≤ Real.exp A * 2 * Real.log |t| + ‖N ^ (1 - s) / (1 - s)‖ + ‖(N : ℂ) ^ (-s) / 2‖ + - ‖s * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1)‖ := ?_ - _ ≤ Real.exp A * 2 * Real.log |t| + ‖N ^ (1 - s) / (1 - s)‖ + ‖(N : ℂ) ^ (-s) / 2‖ + - 2 * |t| * N ^ (-σ) / σ := ?_ - _ = Real.exp A * 2 * Real.log |t| + N ^ (1 - σ) / ‖(1 - s)‖ + N ^ (-σ) / 2 + - 2 * |t| * N ^ (-σ) / σ := ?_ - _ ≤ Real.exp A * 2 * Real.log |t| + |t| ^ (1 - σ) * 2 + - |t| ^ (1 - σ) + 2 * |t| * (8 * |t| ^ (-σ)) := ?_ - _ = Real.exp A * 2 * Real.log |t| + (3 + 8 * 2) * |t| ^ (1 - σ) := ?_ - _ ≤ Real.exp A * 2 * Real.log |t| + (3 + 8 * 2) * Real.exp A * 1 := ?_ - _ ≤ Real.exp A * 2 * Real.log |t| + (3 + 8 * 2) * Real.exp A * Real.log |t| := ?_ - _ = _ := by ring - · simp only [add_le_add_iff_right, one_div_cpow_eq_cpow_neg] - convert UpperBnd_aux3 (C := 2) hA hσ.1 t_gt le_rfl using 1 - · simp only [add_le_add_iff_left]; exact ZetaBnd_aux1 N (by linarith) ⟨σPos, hσ.2⟩ (by linarith) - · simp only [norm_div, RCLike.norm_ofNat, s] - congr <;> (convert norm_natCast_cpow_of_pos Npos _; simp) - · have ⟨h₁, h₂, h₃⟩ := UpperBnd_aux6 t_gt ⟨σ_gt, hσ.2⟩ neOne Npos N_le_t - gcongr - rw [mul_div_assoc] - gcongr - · ring_nf; conv => lhs; rhs; lhs; rw [mul_comm |t|] - rw [← Real.rpow_add_one (by positivity)]; ring_nf - · simp only [Real.log_abs, add_le_add_iff_left, mul_one] - exact mul_le_mul_iff_right₀ (by positivity) |>.mpr <| UpperBnd_aux2 t_gt hσ.1 - · simp only [add_le_add_iff_left] - apply mul_le_mul_iff_right₀ (by norm_num [Real.exp_pos]) |>.mpr <| logt_gt.le - -lemma ZetaUpperBnd : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|) - (_ : σ ∈ Icc (1 - A / Real.log |t|) 2), ‖ζ (σ + t * I)‖ ≤ C * Real.log |t| := by - let A := (1 / 2 : ℝ) - let C := Real.exp A * (5 + 8 * 2) -- the 2 comes from ZetaBnd_aux1 - refine ⟨A, ⟨by norm_num, by norm_num⟩, C, (by positivity), ?_⟩ - intro σ t t_gt ⟨σ_ge, σ_le⟩ - obtain ⟨Npos, _, _, _, σPos, neOne⟩ := UpperBnd_aux ⟨by norm_num, by norm_num⟩ t_gt σ_ge - rw [← Zeta0EqZeta Npos (by simp [σPos]) neOne] - apply le_trans (by apply norm_add₄_le) ?_ - convert! ZetaUpperBnd' ⟨by norm_num, le_rfl⟩ t_gt ⟨σ_ge, σ_le⟩ using 1; simp - -lemma norm_complex_log_ofNat (n : ℕ) : ‖(n : ℂ).log‖ = (n : ℝ).log := by - have := Complex.ofReal_log (x := (n : ℝ)) (Nat.cast_nonneg n) - rw [(by simp : ((n : ℝ) : ℂ) = (n : ℂ))] at this - rw [← this, Complex.norm_of_nonneg] - exact Real.log_natCast_nonneg n - -lemma Real.log_natCast_monotone : Monotone (fun (n : ℕ) ↦ Real.log n) := by - intro n m hnm - cases n - · simp only [CharP.cast_eq_zero, Real.log_zero, Real.log_natCast_nonneg] - · apply Real.log_le_log <;> simp only [Nat.cast_add, Nat.cast_one] - · exact Nat.cast_add_one_pos _ - · exact_mod_cast hnm - -lemma Finset.Icc0_eq (N : ℕ) : Finset.Icc 0 N = {0} ∪ Finset.Icc 1 N := by - refine Finset.ext_iff.mpr ?_ - intro a - cases a - · simp only [Finset.mem_Icc, le_refl, zero_le, and_self, Finset.mem_union, Finset.mem_singleton, - nonpos_iff_eq_zero, one_ne_zero, and_true, or_false] - · simp only [Finset.mem_Icc, le_add_iff_nonneg_left, zero_le, true_and, Finset.mem_union, - Finset.mem_singleton, add_eq_zero, one_ne_zero, and_false, false_or] - -lemma harmonic_eq_sum_Icc0_aux (N : ℕ) : - ∑ i ∈ Finset.Icc 0 N, (i : ℝ)⁻¹ = ∑ i ∈ Finset.Icc 1 N, (i : ℝ)⁻¹ := by - rw [Finset.Icc0_eq, Finset.sum_union] - · simp only [Finset.sum_singleton, CharP.cast_eq_zero, inv_zero, zero_add] - · simp only [Finset.disjoint_singleton_left, Finset.mem_Icc, nonpos_iff_eq_zero, one_ne_zero, - zero_le, and_true, not_false_eq_true] - -lemma harmonic_eq_sum_Icc0 (N : ℕ) : ∑ i ∈ Finset.Icc 0 N, (i : ℝ)⁻¹ = (harmonic N : ℝ) := by - rw [harmonic_eq_sum_Icc0_aux, harmonic_eq_sum_Icc] - simp only [Rat.cast_sum, Rat.cast_inv, Rat.cast_natCast] - -lemma DerivUpperBnd_aux1 {A C σ t : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) - (σ_ge : 1 - A / Real.log |t| ≤ σ) (t_gt : 3 < |t|) (hC : 2 ≤ C) : let N := ⌊|t|⌋₊; - ‖∑ n ∈ Finset.range (N + 1), -1 / (n : ℂ) ^ (σ + t * I) * (Real.log n)‖ - ≤ Real.exp A * C * (Real.log |t|) ^ 2 := by - intro N - obtain ⟨Npos, N_le_t, _, _, σPos, _⟩ := UpperBnd_aux hA t_gt σ_ge - have logt_gt := logt_gt_one t_gt.le - have logN_pos : 0 ≤ Real.log N := Real.log_nonneg (by norm_cast) - have fact0 {n : ℕ} (hn : n ≤ N) : n ≤ |t| := by linarith [(by exact_mod_cast hn : (n : ℝ) ≤ N)] - have fact1 {n : ℕ} (hn : n ≤ N) : - ‖(n : ℂ) ^ (-(σ + t * I))‖ ≤ (n : ℝ)⁻¹ * A.exp := ZetaBnd_aux2 hA.1 σPos (fact0 hn) σ_ge - have fact2 {n : ℕ} (hn : n ≤ N) : Real.log n ≤ Real.log |t| := by - cases n - · simp only [CharP.cast_eq_zero, Real.log_zero]; linarith - · exact Real.log_le_log (by exact_mod_cast Nat.add_one_pos _) (fact0 hn) - have fact3 (n : ℕ) (hn : n ≤ N) : - ‖-1 / (n : ℂ) ^ (σ + t * I) * (Real.log n)‖ ≤ (n : ℝ)⁻¹ * Real.exp A * (Real.log |t|) := by - convert! mul_le_mul (fact1 hn) (fact2 hn) (Real.log_natCast_nonneg n) (by positivity) - simp only [norm_mul, norm_div, norm_neg, norm_one, one_div, natCast_log, ← norm_inv, cpow_neg] - congr; exact norm_complex_log_ofNat n - have := norm_sum_le_of_le (Finset.range (N + 1)) - (by simp only [Finset.mem_range, Nat.lt_succ_iff]; exact fact3) - rw [← Finset.sum_mul, ← Finset.sum_mul, mul_comm _ A.exp, mul_assoc] at this - rw [mul_assoc] - apply le_trans this <| (mul_le_mul_iff_right₀ A.exp_pos).mpr ?_ - rw [pow_two, ← mul_assoc, Finset.range_eq_Ico, ← Finset.Icc_eq_Ico, harmonic_eq_sum_Icc0] - apply le_trans (mul_le_mul (h₁ := harmonic_le_one_add_log (n := N)) (le_refl (Real.log |t|)) - (by linarith) (by linarith)) - apply (mul_le_mul_iff_left₀ (by linarith)).mpr - rw [(by ring : C * Real.log |t| = Real.log |t| + (C - 1) * Real.log |t|), - ← one_mul <| Real.log (N: ℝ)] - refine add_le_add logt_gt.le <| mul_le_mul (by linarith) ?_ (by positivity) (by linarith) - exact Real.log_le_log (by positivity) N_le_t - -lemma DerivUpperBnd_aux2 {A σ t : ℝ} (t_gt : 3 < |t|) (hσ : σ ∈ Icc (1 - A / |t|.log) 2) : - let N := ⌊|t|⌋₊; - let s := ↑σ + ↑t * I; - 0 < N → ↑N ≤ |t| → s ≠ 1 → - 1 / 2 < σ → ‖-↑N ^ (1 - s) / (1 - s) ^ 2‖ ≤ A.exp * 2 * (1 / 3) := by - intro N s Npos N_le_t neOne σ_gt - dsimp only [s] - simp_rw [norm_div, norm_neg, norm_pow, norm_natCast_cpow_of_pos Npos _, - sub_re, one_re, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, - mul_one, sub_self, add_zero] - have h := UpperBnd_aux6 t_gt ⟨σ_gt, hσ.2⟩ neOne Npos N_le_t |>.1 - rw [(by ring_nf : N ^ (1 - σ) / ‖1 - (↑σ + ↑t * I)‖ ^ 2 = - N ^ (1 - σ) / ‖1 - (↑σ + ↑t * I)‖ * 1 / ‖1 - (↑σ + ↑t * I)‖)] - apply mul_le_mul ?_ ?_ (inv_nonneg.mpr <| norm_nonneg _) ?_ - · rw [mul_one]; exact le_trans h (by gcongr; exact UpperBnd_aux2 t_gt hσ.1) - · rw [inv_eq_one_div, div_le_iff₀ <| norm_pos_iff.mpr <| sub_ne_zero_of_ne neOne.symm, - mul_comm, ← mul_div_assoc, mul_one, le_div_iff₀ (by norm_num), one_mul] - apply le_trans t_gt.le ?_ - rw [← abs_neg]; convert! abs_im_le_norm (1 - (σ + t * I)); simp - · exact mul_nonneg (Real.exp_nonneg _) (by norm_num) - -theorem DerivUpperBnd_aux3 {A σ t : ℝ} (t_gt : 3 < |t|) (hσ : σ ∈ Icc (1 - A / |t|.log) 2) : - let N := ⌊|t|⌋₊; - let s := ↑σ + ↑t * I; - 0 < N → ↑N ≤ |t| → s ≠ 1 → 1 / 2 < σ → - ‖↑(N : ℝ).log * ↑N ^ (1 - s) / (1 - s)‖ ≤ A.exp * 2 * |t|.log := by - intro N s Npos N_le_t neOne σ_gt - rw [norm_div, norm_mul, mul_div_assoc, mul_comm] - apply mul_le_mul ?_ ?_ (by positivity) (by positivity) - · have h := UpperBnd_aux6 t_gt ⟨σ_gt, hσ.2⟩ neOne Npos N_le_t |>.1 - convert le_trans h ?_ using 1 - · simp [s, norm_natCast_cpow_of_pos Npos _, N] - · gcongr; exact UpperBnd_aux2 t_gt hσ.1 - · rw [natCast_log, norm_complex_log_ofNat] - exact Real.log_le_log (by positivity) N_le_t - -theorem DerivUpperBnd_aux4 {A σ t : ℝ} (t_gt : 3 < |t|) (hσ : σ ∈ Icc (1 - A / |t|.log) 2) : - let N := ⌊|t|⌋₊; - let s := ↑σ + ↑t * I; - 0 < N → ↑N ≤ |t| → s ≠ 1 → 1 / 2 < σ → - ‖↑(N : ℝ).log * (N : ℂ) ^ (-s) / 2‖ ≤ A.exp * |t|.log := by - intro N s Npos N_le_t neOne σ_gt - rw [norm_div, norm_mul, mul_div_assoc, mul_comm, RCLike.norm_ofNat] - apply mul_le_mul ?_ ?_ (by positivity) (by positivity) - · have h := UpperBnd_aux6 t_gt ⟨σ_gt, hσ.2⟩ neOne Npos N_le_t |>.2.1 - convert le_trans h (UpperBnd_aux2 t_gt hσ.1) using 1 - simp [s, norm_natCast_cpow_of_pos Npos _, N] - · rw [natCast_log, norm_complex_log_ofNat] - exact Real.log_le_log (by positivity) N_le_t - -theorem DerivUpperBnd_aux5 {A σ t : ℝ} (t_gt : 3 < |t|) (hσ : σ ∈ Icc (1 - A / |t|.log) 2) : - let N := ⌊|t|⌋₊; - let s := ↑σ + ↑t * I; - 0 < N → 1 / 2 < σ → - ‖1 * ∫ (x : ℝ) in Ioi (N : ℝ), (↑⌊x⌋ + 1 / 2 - ↑x) * (x : ℂ) ^ (-s - 1)‖ ≤ - 1 / 3 * (2 * |t| * ↑N ^ (-σ) / σ) := by - intro N s Npos σ_gt - have neZero : s ≠ 0 := by - contrapose! σ_gt - simp only [Complex.ext_iff, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, - sub_self, add_zero, zero_re, add_im, mul_im, zero_add, zero_im, s] at σ_gt - linarith - have : 1 = 1 / s * s := by field_simp - nth_rewrite 1 [this] - rw [mul_assoc, norm_mul] - apply mul_le_mul ?_ ?_ (by positivity) (by positivity) - · simp only [s, norm_div, norm_one] - apply one_div_le_one_div (norm_pos_iff.mpr neZero) (by norm_num) |>.mpr - apply le_trans t_gt.le ?_ - convert! abs_im_le_norm (σ + t * I); simp - · have hσ : σ ∈ Ioc 0 2 := ⟨(by linarith), hσ.2⟩ - simp only [s] - have := ZetaBnd_aux1 N (by omega) hσ (by linarith) - simp only [div_cpow_eq_cpow_neg] at this - convert! this using 1; congr; funext x; ring_nf - -theorem DerivUpperBnd_aux6 {A σ t : ℝ} (t_gt : 3 < |t|) (hσ : σ ∈ Icc (1 - A / |t|.log) 2) : - let N := ⌊|t|⌋₊; - 0 < N → ↑N ≤ |t| → ↑σ + ↑t * I ≠ 1 → 1 / 2 < σ → - 2 * |t| * ↑N ^ (-σ) / σ ≤ 2 * (8 * A.exp) := by - intro N Npos N_le_t neOne σ_gt - rw [mul_div_assoc, mul_assoc] - apply mul_le_mul_iff_right₀ (by norm_num) |>.mpr - have h := UpperBnd_aux6 t_gt ⟨σ_gt, hσ.2⟩ neOne Npos N_le_t |>.2.2 - apply le_trans (mul_le_mul_iff_right₀ (a := |t|) (by positivity) |>.mpr h) ?_ - rw [← mul_assoc, mul_comm _ 8, mul_assoc] - gcongr - convert! UpperBnd_aux2 t_gt hσ.1 using 1 - rw [mul_comm, ← Real.rpow_add_one (by positivity)]; ring_nf - -lemma DerivUpperBnd_aux7_1 {x σ t : ℝ} (hx : 1 ≤ x) : - let s := ↑σ + ↑t * I; - ‖(↑⌊x⌋ + 1 / 2 - ↑x) * (x : ℂ) ^ (-s - 1) * -↑x.log‖ = |(↑⌊x⌋ + 1 / 2 - x)| * x ^ (-σ - 1) * x.log := by - have xpos : 0 < x := lt_of_lt_of_le (by norm_num) hx - have : ‖(x.log : ℂ)‖ = x.log := Complex.norm_of_nonneg <| Real.log_nonneg hx - simp [← norm_real, this, Complex.norm_cpow_eq_rpow_re_of_pos xpos, ← Real.norm_eq_abs, ← ofReal_ofNat, - ← ofReal_inv, ← ofReal_add, ← ofReal_sub, ← ofReal_intCast, one_div] - -lemma DerivUpperBnd_aux7_2 {x σ : ℝ} (hx : 1 ≤ x) : - |(↑⌊x⌋ + 1 / 2 - x)| * x ^ (-σ - 1) * x.log ≤ x ^ (-σ - 1) * x.log := by - rw [← one_mul (x ^ (-σ - 1) * Real.log x), mul_assoc] - apply mul_le_mul_of_nonneg_right _ (by bound) - exact le_trans (ZetaSum_aux1_3 x) (by norm_num) - -lemma DerivUpperBnd_aux7_3 {x σ : ℝ} (xpos : 0 < x) (σnz : σ ≠ 0) : - HasDerivAt (fun t ↦ -(1 / σ ^ 2 * t ^ (-σ) + 1 / σ * t ^ (-σ) * Real.log t)) - (x ^ (-σ - 1) * Real.log x) x := by - have h1 := Real.hasDerivAt_rpow_const (p := -σ) (Or.inl xpos.ne.symm) - have h2 := h1.const_mul (1 / σ^2) - have cancel : 1 / σ^2 * σ = 1 / σ := by field_simp - rw [neg_mul, mul_neg, ← mul_assoc, cancel] at h2 - have h3 := Real.hasDerivAt_log xpos.ne.symm - have h4 := HasDerivAt.mul (h1.const_mul (1 / σ)) h3 - have cancel := Real.rpow_add xpos (-σ) (-1) - have : -σ + -1 = -σ - 1 := by rfl - rw [← Real.rpow_neg_one x, mul_assoc (1 / σ) (x ^ (-σ)), ← cancel, this] at h4 - convert! h2.add h4 |>.neg using 1 - field_simp; ring - -lemma DerivUpperBnd_aux7_3' {a σ : ℝ} (apos : 0 < a) (σnz : σ ≠ 0) : - ∀ x ∈ Ici a, HasDerivAt (fun t ↦ -(1 / σ ^ 2 * t ^ (-σ) + 1 / σ * t ^ (-σ) * Real.log t)) - (x ^ (-σ - 1) * Real.log x) x := by - intro x hx - simp at hx - exact DerivUpperBnd_aux7_3 (by linarith) σnz - -lemma DerivUpperBnd_aux7_nonneg {a σ : ℝ} (ha : 1 ≤ a) : - ∀ x ∈ Ioi a, 0 ≤ x ^ (-σ - 1) * Real.log x := by - intro x hx - simp at hx - bound - -lemma DerivUpperBnd_aux7_tendsto {σ : ℝ} (σpos : 0 < σ) : - Tendsto (fun t ↦ -(1 / σ ^ 2 * t ^ (-σ) + 1 / σ * t ^ (-σ) * Real.log t)) atTop (nhds 0) := by - have h1 := tendsto_rpow_neg_atTop σpos - have h2 := h1.const_mul (1 / σ^2) - have h3 : Tendsto (fun t : ℝ ↦ t ^ (-σ) * Real.log t) atTop (nhds 0) := by - have := Real.tendsto_pow_log_div_pow_atTop σ 1 σpos - simp only [Real.rpow_one] at this - apply Tendsto.congr' _ this - filter_upwards [eventually_ge_atTop 0] with x hx - rw [mul_comm] - apply div_rpow_eq_rpow_neg _ _ _ hx - have h4 := h3.const_mul (1 / σ) - have h5 := (h2.add h4).neg - convert h5 using 1 - · ext; ring - simp - -open MeasureTheory in -lemma DerivUpperBnd_aux7_4 {a σ : ℝ} (σpos : 0 < σ) (ha : 1 ≤ a) : - IntegrableOn (fun x ↦ x ^ (-σ - 1) * Real.log x) (Ioi a) volume := by - apply integrableOn_Ioi_deriv_of_nonneg' (l := 0) - · exact DerivUpperBnd_aux7_3' (by linarith) (by linarith) - · exact DerivUpperBnd_aux7_nonneg ha - · exact DerivUpperBnd_aux7_tendsto σpos - -open MeasureTheory in -lemma DerivUpperBnd_aux7_5 {a σ : ℝ} (σpos : 0 < σ) (ha : 1 ≤ a) : - IntegrableOn (fun x ↦ |(↑⌊x⌋ + (1 : ℝ) / 2 - x)| * x ^ (-σ - 1) * Real.log x) - (Ioi a) volume := by - simp_rw [mul_assoc] - apply Integrable.bdd_mul (c := 1 / 2) <| DerivUpperBnd_aux7_4 σpos ha - · exact Measurable.aestronglyMeasurable <| Measurable.abs measurable_floor_add_half_sub - apply ae_of_all - intro x - simp only [Real.norm_eq_abs, _root_.abs_abs] - exact ZetaSum_aux1_3 x - -open MeasureTheory in -lemma DerivUpperBnd_aux7_integral_eq {a σ : ℝ} (ha : 1 ≤ a) (σpos : 0 < σ) : - ∫ (x : ℝ) in Ioi a, x ^ (-σ - 1) * Real.log x = - 1 / σ^2 * a ^ (-σ) + 1 / σ * a ^ (-σ) * Real.log a := by - convert integral_Ioi_of_hasDerivAt_of_nonneg' - (DerivUpperBnd_aux7_3' (by linarith) (by linarith)) - (DerivUpperBnd_aux7_nonneg ha) (DerivUpperBnd_aux7_tendsto σpos) using 1 - ring - -open MeasureTheory in -theorem DerivUpperBnd_aux7 {A σ t : ℝ} (t_gt : 3 < |t|) (hσ : σ ∈ Icc (1 - A / |t|.log) 2) : - let N := ⌊|t|⌋₊; - let s := ↑σ + ↑t * I; - 0 < N → ↑N ≤ |t| → s ≠ 1 → 1 / 2 < σ → - ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), (↑⌊x⌋ + 1 / 2 - ↑x) * (x : ℂ) ^ (-s - 1) * -↑x.log‖ ≤ - 6 * |t| * ↑N ^ (-σ) / σ * |t|.log := by - intro N s Npos N_le_t neOne σ_gt - have σpos : 0 < σ := lt_trans (by norm_num) σ_gt - rw [norm_mul, (by ring : 6 * |t| * ↑N ^ (-σ) / σ * Real.log |t| = (2 * |t|) * (3 * ↑N ^ (-σ) / σ * Real.log |t|))] - apply mul_le_mul _ _ (by positivity) (by positivity) - · apply le_trans (by apply norm_add_le) - simp [abs_of_pos σpos] - linarith [hσ.2] - apply le_trans (by apply norm_integral_le_integral_norm) - calc ∫ (x : ℝ) in Ioi (N : ℝ), ‖(↑⌊x⌋ + 1 / 2 - ↑x) * (x : ℂ) ^ (-s - 1) * -↑x.log‖ - _ = ∫ (x : ℝ) in Ioi (N : ℝ), |(↑⌊x⌋ + 1 / 2 - x)| * x ^ (-σ - 1) * x.log := by - apply setIntegral_congr_fun (by measurability) - intro x hx - simp only [mem_Ioi] at hx - exact DerivUpperBnd_aux7_1 (lt_of_le_of_lt (mod_cast Npos) hx).le - _ ≤ ∫ (x : ℝ) in Ioi (N : ℝ), x ^ (-σ - 1) * x.log := by - apply setIntegral_mono_on _ _ (by measurability) - · intro x hx - exact DerivUpperBnd_aux7_2 (lt_of_le_of_lt (mod_cast Npos) hx).le - · apply DerivUpperBnd_aux7_5 σpos (mod_cast Npos) - apply DerivUpperBnd_aux7_4 σpos (mod_cast Npos) - _ = 1 / σ^2 * N ^ (-σ) + 1 / σ * N ^ (-σ) * Real.log N := - DerivUpperBnd_aux7_integral_eq (mod_cast Npos) σpos - _ ≤ 3 * ↑N ^ (-σ) / σ * |t|.log := by - have h2 : 1 / σ * ↑N ^ (-σ) * Real.log ↑N ≤ ↑N ^ (-σ) / σ * Real.log |t| := calc - _ = ↑N ^ (-σ) / σ * Real.log N := by ring - _ ≤ _ := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - exact Real.log_le_log (mod_cast Npos) N_le_t - have : 2 ≤ 2 * Real.log |t| := by - nth_rewrite 1 [← mul_one 2] - apply mul_le_mul_of_nonneg_left _ (by norm_num) - exact logt_gt_one t_gt.le |>.le - have h1 : 1 / σ^2 * ↑N ^ (-σ) ≤ 2 * ↑N ^ (-σ) / σ * Real.log |t| := calc - 1 / σ^2 * ↑N ^ (-σ) = (↑N ^ (-σ) / σ) * (1 / σ) := by ring - _ ≤ ↑N ^ (-σ) / σ * (2 * Real.log |t|):= by - apply mul_le_mul_of_nonneg_left _ (by positivity) - apply le_trans _ this - exact (one_div_le σpos (by norm_num)).mpr σ_gt.le - _ = _ := by ring - convert! add_le_add h1 h2 using 1 - ring - -lemma ZetaDerivUpperBnd' {A σ t : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) (t_gt : 3 < |t|) - (hσ : σ ∈ Icc (1 - A / Real.log |t|) 2) : - let C := Real.exp A * 59; - let N := ⌊|t|⌋₊; - let s := σ + t * I; - ‖∑ n ∈ Finset.range (N + 1), -1 / (n : ℂ) ^ s * (Real.log n)‖ + - ‖-(N : ℂ) ^ (1 - s) / (1 - s) ^ 2‖ + - ‖(Real.log N) * (N : ℂ) ^ (1 - s) / (1 - s)‖ + - ‖(Real.log N) * (N : ℂ) ^ (-s) / 2‖ + - ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ + - ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), - (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ - ≤ C * Real.log |t| ^ 2 := by - intros C N s - obtain ⟨Npos, N_le_t, logt_gt, σ_gt, _, neOne⟩ := UpperBnd_aux hA t_gt hσ.1 - replace σ_gt : 1 / 2 < σ := by linarith [hA.2] - calc _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 + - ‖-(N : ℂ) ^ (1 - s) / (1 - s) ^ 2‖ + - ‖(Real.log N) * (N : ℂ) ^ (1 - s) / (1 - s)‖ + - ‖(Real.log N) * (N : ℂ) ^ (-s) / 2‖ + - ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ + - ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), - (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by - gcongr; exact DerivUpperBnd_aux1 hA hσ.1 t_gt (by simp : (2 : ℝ) ≤ 2) - _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 + - Real.exp A * 2 * (1 / 3) + - ‖(Real.log N) * (N : ℂ) ^ (1 - s) / (1 - s)‖ + - ‖(Real.log N) * (N : ℂ) ^ (-s) / 2‖ + - ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ + - ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), - (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by - gcongr; exact DerivUpperBnd_aux2 t_gt hσ Npos N_le_t neOne σ_gt - _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 + - Real.exp A * 2 * (1 / 3) + - Real.exp A * 2 * (Real.log |t|) + - ‖(Real.log N) * (N : ℂ) ^ (-s) / 2‖ + - ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ + - ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), - (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by - gcongr; exact DerivUpperBnd_aux3 t_gt hσ Npos N_le_t neOne σ_gt - _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 + - Real.exp A * 2 * (1 / 3) + - Real.exp A * 2 * (Real.log |t|) + - Real.exp A * (Real.log |t|) + - ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ + - ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), - (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by - gcongr; exact DerivUpperBnd_aux4 t_gt hσ Npos N_le_t neOne σ_gt - _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 + - Real.exp A * 2 * (1 / 3) + - Real.exp A * 2 * (Real.log |t|) + - Real.exp A * (Real.log |t|) + - 1 / 3 * (2 * |t| * N ^ (-σ) / σ) + - ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), - (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by - gcongr; exact DerivUpperBnd_aux5 t_gt hσ Npos σ_gt - _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 + - Real.exp A * 2 * (1 / 3) + - Real.exp A * 2 * (Real.log |t|) + - Real.exp A * (Real.log |t|) + - 1 / 3 * (2 * (8 * Real.exp A)) + - ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), - (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by - gcongr; exact DerivUpperBnd_aux6 t_gt hσ Npos N_le_t neOne σ_gt - _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 + - Real.exp A * 2 * (1 / 3) + - Real.exp A * 2 * (Real.log |t|) + - Real.exp A * (Real.log |t|) + - 1 / 3 * (2 * (8 * Real.exp A)) + - (6 * |t| * N ^ (-σ) / σ) * (Real.log |t|) := by - gcongr; exact DerivUpperBnd_aux7 t_gt hσ Npos N_le_t neOne σ_gt - _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 + - Real.exp A * 2 * (1 / 3) + - Real.exp A * 2 * (Real.log |t|) + - Real.exp A * (Real.log |t|) + - 1 / 3 * (2 * (8 * Real.exp A)) + - (6 * (8 * Real.exp A)) * (Real.log |t|) := by - gcongr; convert mul_le_mul_of_nonneg_left (DerivUpperBnd_aux6 t_gt hσ Npos N_le_t neOne σ_gt) (by norm_num : (0 : ℝ) ≤ 3) using 1 <;> ring - _ ≤ _ := by - simp only [C] - ring_nf - rw [(by ring : A.exp * |t|.log ^ 2 * 59 = A.exp * |t|.log ^ 2 * 6 + A.exp * |t|.log ^ 2 * 51 + - A.exp * |t|.log ^ 2 * 2)] - nth_rewrite 1 [← mul_one A.exp] - gcongr - swap - · nth_rewrite 1 [← mul_one |t|.log, (by ring : |t|.log ^ 2 = |t|.log * |t|.log)] - gcongr - nlinarith - -lemma ZetaDerivUpperBnd : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|) - (_ : σ ∈ Icc (1 - A / Real.log |t|) 2), - ‖ζ' (σ + t * I)‖ ≤ C * Real.log |t| ^ 2 := by - obtain ⟨A, hA, _, _, _⟩ := ZetaUpperBnd - let C := Real.exp A * 59 - refine ⟨A, hA, C, by positivity, ?_⟩ - intro σ t t_gt ⟨σ_ge, σ_le⟩ - obtain ⟨Npos, N_le_t, _, _, σPos, neOne⟩ := UpperBnd_aux hA t_gt σ_ge - rw [← DerivZeta0EqDerivZeta Npos (by simp [σPos]) neOne] - set N : ℕ := ⌊|t|⌋₊ - rw [(HasDerivAtZeta0 Npos (s := σ + t * I) (by simp [σPos]) neOne).deriv] - dsimp only [ζ₀'] - rw [← add_assoc] - set aa := ∑ n ∈ Finset.range (N + 1), -1 / (n : ℂ) ^ (σ + t * I) * (Real.log n) - set bb := -(N : ℂ) ^ (1 - (σ + t * I)) / (1 - (σ + t * I)) ^ 2 - set cc := (Real.log N) * (N : ℂ) ^ (1 - (σ + t * I)) / (1 - (σ + t * I)) - set dd := (Real.log N) * (N : ℂ) ^ (-(σ + t * I)) / 2 - set ee := 1 * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-(σ + t * I) - 1) - set ff := (σ + t * I) * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-(σ + t * I) - 1) * -(Real.log x) - rw [(by ring : aa + (bb + cc) + dd + ee + ff = aa + bb + cc + dd + ee + ff)] - apply le_trans (by apply norm_add₆_le) ?_ - convert ZetaDerivUpperBnd' hA t_gt ⟨σ_ge, σ_le⟩ - -lemma Tendsto_nhdsWithin_punctured_map_add {f : ℝ → ℝ} (a x : ℝ) - (f_mono : StrictMono f) (f_iso : Isometry f) : - Tendsto (fun y ↦ f y + a) (𝓝[>] x) (𝓝[>] (f x + a)) := by - refine tendsto_iff_forall_eventually_mem.mpr ?_ - intro v hv - simp only [mem_nhdsWithin] at hv - obtain ⟨u, hu, hu2, hu3⟩ := hv - let t := {x | f x + a ∈ u} - have : t ∩ Ioi x ∈ 𝓝[>] x := by - simp only [mem_nhdsWithin] - use t - simp only [subset_inter_iff, inter_subset_left, inter_subset_right, and_self, - and_true, t, mem_setOf_eq] - refine ⟨?_, by simp [hu2]⟩ - simp only [Metric.isOpen_iff, gt_iff_lt, mem_setOf_eq] at hu ⊢ - intro x hx - obtain ⟨ε, εpos, hε⟩ := hu (f x + a) hx - simp only [Metric.ball, setOf_subset_setOf] at hε ⊢ - exact ⟨ε, εpos, fun _ hy ↦ hε (by simp [isometry_iff_dist_eq.mp f_iso, hy])⟩ - filter_upwards [this] - intro b hb - simp only [mem_inter_iff, mem_setOf_eq, mem_Ioi, t] at hb - refine hu3 ?_ - simp only [mem_inter_iff, mem_Ioi, add_lt_add_iff_right] - exact ⟨hb.1, f_mono hb.2⟩ - -lemma Tendsto_nhdsWithin_punctured_add (a x : ℝ) : - Tendsto (fun y ↦ y + a) (𝓝[>] x) (𝓝[>] (x + a)) := - Tendsto_nhdsWithin_punctured_map_add a x strictMono_id isometry_id - -lemma riemannZeta_isBigO_near_one_horizontal : - (fun x : ℝ ↦ ζ (1 + x)) =O[𝓝[>] 0] (fun x ↦ (1 : ℂ) / x) := by - have : (fun w : ℂ ↦ ζ (1 + w)) =O[𝓝[≠] 0] (1 / ·) := by - have H : Tendsto (fun w ↦ w * ζ (1 + w)) (𝓝[≠] 0) (𝓝 1) := by - convert Tendsto.comp (f := fun w ↦ 1 + w) riemannZeta_residue_one ?_ using 1 - · ext w - simp only [Function.comp_apply, add_sub_cancel_left] - · refine tendsto_iff_comap.mpr <| map_le_iff_le_comap.mp <| Eq.le ?_ - convert Homeomorph.map_punctured_nhds_eq (Homeomorph.addLeft (1 : ℂ)) 0 using 2 <;> simp - exact ((Asymptotics.isBigO_mul_iff_isBigO_div eventually_mem_nhdsWithin).mp <| - Tendsto.isBigO_one ℂ H).trans <| Asymptotics.isBigO_refl .. - exact (isBigO_comp_ofReal_nhds_ne this).mono <| nhdsGT_le_nhdsNE 0 - -lemma ZetaNear1BndFilter : - (fun σ : ℝ ↦ ζ σ) =O[𝓝[>](1 : ℝ)] (fun σ ↦ (1 : ℂ) / (σ - 1)) := by - have := Tendsto_nhdsWithin_punctured_add (a := -1) (x := 1) - simp only [add_neg_cancel, ← sub_eq_add_neg] at this - have := riemannZeta_isBigO_near_one_horizontal.comp_tendsto this - convert this using 1 <;> {ext; simp} - -lemma ZetaNear1BndExact : - ∃ (c : ℝ) (_ : 0 < c), ∀ (σ : ℝ) (_ : σ ∈ Ioc 1 2), ‖ζ σ‖ ≤ c / (σ - 1) := by - have := ZetaNear1BndFilter - rw [Asymptotics.isBigO_iff] at this - obtain ⟨c, U, hU, V, hV, h⟩ := this - obtain ⟨T, hT, T_open, h1T⟩ := mem_nhds_iff.mp hU - obtain ⟨ε, εpos, hε⟩ := Metric.isOpen_iff.mp T_open 1 h1T - simp only [Metric.ball] at hε - replace hε : Ico 1 (1 + ε) ⊆ U := by - refine subset_trans (subset_trans ?_ hε) hT - intro x hx - simp only [mem_Ico] at hx - simp only [dist, abs_lt] - exact ⟨by linarith, by linarith⟩ - let W := Icc (1 + ε) 2 - have W_compact : IsCompact {ofReal z | z ∈ W} := - IsCompact.image isCompact_Icc continuous_ofReal - have cont : ContinuousOn ζ {ofReal z | z ∈ W} := by - apply HasDerivAt.continuousOn (f' := ζ') - intro σ hσ - exact (differentiableAt_riemannZeta (by contrapose! hσ; simp [W, hσ, εpos])).hasDerivAt - obtain ⟨C, hC⟩ := IsCompact.exists_bound_of_continuousOn W_compact cont - let C' := max (C + 1) 1 - replace hC : ∀ (σ : ℝ), σ ∈ W → ‖ζ σ‖ < C' := by - intro σ hσ - simp only [lt_max_iff, C'] - have := hC σ - simp only [mem_setOf_eq, ofReal_inj, exists_eq_right] at this - exact Or.inl <| lt_of_le_of_lt (this hσ) (by norm_num) - have Cpos : 0 < C' := by simp [C'] - use max (2 * C') c, (by simp [Cpos]) - intro σ ⟨σ_ge, σ_le⟩ - by_cases hσ : σ ∈ U ∩ V - · simp only [← h, mem_setOf_eq] at hσ - apply le_trans hσ ?_ - norm_cast - have : 0 ≤ 1 / (σ - 1) := by apply one_div_nonneg.mpr; linarith - simp only [Real.norm_eq_abs, abs_eq_self.mpr this, mul_div, mul_one] - exact div_le_div₀ (by simp [Cpos.le]) (by simp) (by linarith) (by rfl) - · replace hσ : σ ∈ W := by - simp only [mem_inter_iff, hV σ_ge, and_true] at hσ - simp only [mem_Icc, σ_le, and_true, W] - contrapose! hσ; exact hε ⟨σ_ge.le, hσ⟩ - apply le_trans (hC σ hσ).le ((le_div_iff₀ (by linarith)).mpr ?_) - rw [le_max_iff, mul_comm 2]; exact Or.inl <| mul_le_mul_of_nonneg_left (by linarith) Cpos.le - -/-- For positive `x` and nonzero `y` we have that -$|\zeta(x)^3 \cdot \zeta(x+iy)^4 \cdot \zeta(x+2iy)| \ge 1$. -/ -lemma norm_zeta_product_ge_one {x : ℝ} (hx : 0 < x) (y : ℝ) : - ‖ζ (1 + x) ^ 3 * ζ (1 + x + I * y) ^ 4 * ζ (1 + x + 2 * I * y)‖ ≥ 1 := by - have h₀ : 1 < ( 1 + x : ℂ).re := by simp[hx] - have h₁ : 1 < (1 + x + I * y).re := by simp [hx] - have h₂ : 1 < (1 + x + 2 * I * y).re := by simp [hx] - simpa only [one_pow, norm_mul, norm_pow, DirichletCharacter.LSeries_modOne_eq, - LSeries_one_eq_riemannZeta, h₀, h₁, h₂] using - DirichletCharacter.norm_LSeries_product_ge_one (1 : DirichletCharacter ℂ 1) hx y - -theorem ZetaLowerBound1_aux1 {σ t : ℝ} (this : 1 ≤ ‖ζ σ‖ ^ (3 : ℝ) * ‖ζ (σ + I * t)‖ ^ (4 : ℝ) * ‖ζ (σ + 2 * I * t)‖) : - ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) * ‖ζ (σ + t * I)‖ ≥ 1 := by - use (one_le_pow_iff_of_nonneg (by bound) four_ne_zero).1 (by_contra (this.not_gt ∘ ?_)) - simp_rw [mul_pow, ← Real.rpow_natCast, ← Real.rpow_mul (norm_nonneg _)] - norm_num [mul_right_comm, mul_comm (t : ℂ), mul_pow] - -lemma ZetaLowerBound1 {σ t : ℝ} (σ_gt : 1 < σ) : - ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) * ‖ζ (σ + t * I)‖ ≥ 1 := by - -- Start with the fundamental identity - have := norm_zeta_product_ge_one (x := σ - 1) (by linarith) t - simp_rw [ge_iff_le, norm_mul, norm_pow, ofReal_sub, ofReal_one, add_sub_cancel, ← Real.rpow_natCast] - at this - apply ZetaLowerBound1_aux1 this - -lemma ZetaLowerBound2 {σ t : ℝ} (σ_gt : 1 < σ) : - 1 / (‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4)) ≤ ‖ζ (σ + t * I)‖ := by - have := ZetaLowerBound1 (t := t) σ_gt - exact (div_le_iff₀' (pos_of_mul_pos_left (one_pos.trans_le this) (norm_nonneg _) ) ).mpr this - -theorem ZetaLowerBound3_aux1 (A : ℝ) (ha : A ∈ Ioc 0 (1 / 2)) (t : ℝ) - (ht_2 : 3 < |2 * t|) : 0 < A / Real.log |2 * t| := by - exact div_pos ha.1 <| Real.log_pos (by linarith) - -theorem ZetaLowerBound3_aux2 {C : ℝ} - {σ t : ℝ} - (ζ_2t_bound : ‖ζ (σ + (2 * t) * I)‖ ≤ C * Real.log |2 * t|) : - ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) ≤ (C * Real.log |2 * t|) ^ ((1 : ℝ) / 4) := by - bound - -theorem ZetaLowerBound3_aux3 (C : ℝ) (c_near : ℝ) {σ : ℝ} (t : ℝ) (σ_gt : 1 < σ) : - c_near ^ ((3 : ℝ) / 4) * ((-1 + σ) ^ ((3 : ℝ) / 4))⁻¹ * C ^ ((1 : ℝ) / 4) * Real.log |t * 2| ^ ((1 : ℝ) / 4) = - c_near ^ ((3 : ℝ) / 4) * C ^ ((1 : ℝ) / 4) * Real.log |t * 2| ^ ((1 : ℝ) / 4) * (-1 + σ) ^ (-(3 : ℝ) / 4) := by - exact (symm) (.trans (by rw [neg_div, Real.rpow_neg (by linarith)]) (by ring)) - -theorem ZetaLowerBound3_aux4 (C : ℝ) (hC : 0 < C) - (c_near : ℝ) (hc_near : 0 < c_near) {σ : ℝ} (t : ℝ) (ht : 3 < |t|) - (σ_gt : 1 < σ) - : - 0 < c_near ^ ((3 : ℝ) / 4) * (σ - 1) ^ (-(3 : ℝ) / 4) * C ^ ((1 : ℝ) / 4) * Real.log |2 * t| ^ ((1 : ℝ) / 4) := by - match sub_pos.mpr σ_gt with | S => match Real.log_pos (by simp; linarith : abs (2 *t) > 1) with | S => positivity - -theorem ZetaLowerBound3_aux5 - {σ : ℝ} (t : ℝ) - (this : ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) * ‖ζ (σ + t * I)‖ ≥ 1) : - 0 < ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) := - pos_of_mul_pos_left (this.trans_lt' zero_lt_one) (norm_nonneg _) - -lemma ZetaLowerBound3 : - ∃ c > 0, ∀ {σ : ℝ} (_ : σ ∈ Ioc 1 2) (t : ℝ) (_ : 3 < |t|), - c * (σ - 1) ^ ((3 : ℝ) / 4) / (Real.log |t|) ^ ((1 : ℝ) / 4) ≤ ‖ζ (σ + t * I)‖ := by - obtain ⟨A, ha, C, hC, h_upper⟩ := ZetaUpperBnd - obtain ⟨c_near, hc_near, h_near⟩ := ZetaNear1BndExact - - use 1 / (c_near ^ ((3 : ℝ) / 4) * (2 * C) ^ ((1 : ℝ) / 4)), by positivity - intro σ hσ t ht - obtain ⟨σ_gt, σ_le⟩ := hσ - - -- Use ZetaLowerBound2 - have lower := ZetaLowerBound2 (t := t) σ_gt - apply le_trans _ lower - - -- Now we need to bound the denominator from above - -- This will give us a lower bound on the whole expression - - -- Upper bound on ‖ζ σ‖ from ZetaNear1BndExact - have ζ_σ_bound : ‖ζ σ‖ ≤ c_near / (σ - 1) := by - exact h_near σ ⟨σ_gt, σ_le⟩ - - have ht_2 : 3 < |2 * t| := by simp only [abs_mul, Nat.abs_ofNat]; linarith - - -- Upper bound on ‖ζ (σ + 2*t * I)‖ from ZetaUpperBnd - - have σ_in_range : σ ∈ Icc (1 - A / Real.log |2 * t|) 2 := by - constructor - · -- σ ≥ 1 - A / Real.log |2*t| - have : 0 < A / Real.log |2 * t| := by - exact ZetaLowerBound3_aux1 A ha t ht_2 - nlinarith - · exact σ_le - - have ζ_2t_bound := h_upper σ (2 * t) ht_2 σ_in_range - - -- Combine the bounds - have denom_bound : ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) ≤ - (c_near / (σ - 1)) ^ ((3 : ℝ) / 4) * (C * Real.log |2 * t|) ^ ((1 : ℝ) / 4) := by - apply mul_le_mul - · apply Real.rpow_le_rpow (norm_nonneg _) ζ_σ_bound (by norm_num) - · apply ZetaLowerBound3_aux2 - convert ζ_2t_bound - norm_cast - · apply Real.rpow_nonneg (norm_nonneg _) - · apply Real.rpow_nonneg (div_nonneg (by linarith) (by linarith)) - - -- Simplify the bound - have : (c_near / (σ - 1)) ^ ((3 : ℝ) / 4) * (C * Real.log |2 * t|) ^ ((1 : ℝ) / 4) = - c_near ^ ((3 : ℝ) / 4) * (σ - 1) ^ (-(3 : ℝ) / 4) * C ^ ((1 : ℝ) / 4) * (Real.log |2 * t|) ^ ((1 : ℝ) / 4) := by - rw [Real.div_rpow (by linarith) (by linarith), Real.mul_rpow (by linarith) (Real.log_nonneg (by linarith))] - ring_nf - exact ZetaLowerBound3_aux3 _ _ _ σ_gt - rw [this] at denom_bound - - -- Take reciprocal (flipping inequality) - have pos_left : 0 < c_near ^ ((3 : ℝ) / 4) * (σ - 1) ^ (-(3 : ℝ) / 4) * C ^ ((1 : ℝ) / 4) * (Real.log |2 * t|) ^ ((1 : ℝ) / 4) := by - apply ZetaLowerBound3_aux4 C hC c_near hc_near t ht σ_gt - - have pos_right : 0 < ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) := by - -- This follows from ZetaLowerBound1 - if either factor were zero, we'd get 0 ≥ 1 - apply ZetaLowerBound3_aux5 _ <| ZetaLowerBound1 (t := t) σ_gt - - use (div_le_div_of_nonneg_left zero_le_one pos_right denom_bound).trans' ?_ - simp_rw [abs_mul, abs_two, neg_div, Real.rpow_neg (sub_pos.2 σ_gt).le] at * - have hlog : 0 < Real.log |t| := Real.log_pos <| ht.trans' <| by norm_num - have : 0 < Real.log |t| ^ (1 / 4 : ℝ) := Real.rpow_pos_of_pos hlog _ - have hlog2 : 0 < Real.log (2 * |t|) := Real.log_pos <| ht_2.trans' <| by norm_num - have : 0 < Real.log (2 * |t|) ^ (1 / 4 : ℝ) := Real.rpow_pos_of_pos hlog2 (1 / 4) - field_simp - rw [Real.mul_rpow two_pos.le hC.le] - move_mul [C ^ (1 / 4)] - rw [mul_le_mul_iff_left₀] - swap - · positivity - rw [← Real.mul_rpow two_pos.le hlog.le] - apply Real.rpow_le_rpow hlog2.le ?_ (by norm_num) - rw [← Real.log_rpow (ht.trans' (by norm_num))] - apply Real.log_le_log (ht_2.trans' (by norm_num)) - rw [Real.rpow_two, sq] - gcongr - exact ht.trans' (by norm_num) |>.le - -lemma ZetaInvBound1 {σ t : ℝ} (σ_gt : 1 < σ) : - 1 / ‖ζ (σ + t * I)‖ ≤ ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) := by - apply (div_le_iff₀ ?_).mpr - · apply (Real.rpow_le_rpow_iff (z := 4) (by norm_num) ?_ (by norm_num)).mp - · simp only [Real.one_rpow] - rw [Real.mul_rpow, Real.mul_rpow, ← Real.rpow_mul, ← Real.rpow_mul] - · simp only [isUnit_iff_ne_zero, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, - IsUnit.div_mul_cancel, Real.rpow_one] - conv => rw [mul_assoc]; rhs; rhs; rw [mul_comm] - rw [← mul_assoc] - have := norm_zeta_product_ge_one (x := σ - 1) (by linarith) t - simp_rw [ge_iff_le, norm_mul, norm_pow, ofReal_sub, ofReal_one, add_sub_cancel, ← Real.rpow_natCast] at this - convert this using 3 <;> ring_nf - any_goals ring_nf - any_goals apply norm_nonneg - any_goals apply Real.rpow_nonneg <| norm_nonneg _ - apply mul_nonneg <;> apply Real.rpow_nonneg <| norm_nonneg _ - · refine mul_nonneg (mul_nonneg ?_ ?_) ?_ <;> simp [Real.rpow_nonneg] - · have s_ne_one : σ + t * I ≠ 1 := by - contrapose! σ_gt; apply le_of_eq; apply And.left; simpa [Complex.ext_iff] using σ_gt - simpa using riemannZeta_ne_zero_of_one_le_re (by simp [σ_gt.le]) - -lemma Ioi_union_Iio_mem_cocompact {a : ℝ} (ha : 0 ≤ a) : Ioi (a : ℝ) ∪ Iio (-a : ℝ) ∈ cocompact ℝ := by - simp only [Filter.mem_cocompact] - use Icc (-a) a - constructor - · exact isCompact_Icc - · rw [@compl_subset_iff_union, ← union_assoc, Icc_union_Ioi_eq_Ici, union_comm, Iio_union_Ici] - linarith - -lemma lt_abs_mem_cocompact {a : ℝ} (ha : 0 ≤ a) : {t | a < |t|} ∈ cocompact ℝ := by - convert Ioi_union_Iio_mem_cocompact ha using 1; ext t - simp only [mem_setOf_eq, mem_union, mem_Ioi, mem_Iio, lt_abs, lt_neg] - -lemma ZetaInvBound2 : - ∃ C > 0, ∀ {σ : ℝ} (_ : σ ∈ Ioc 1 2) (t : ℝ) (_ : 3 < |t|), - 1 / ‖ζ (σ + t * I)‖ ≤ C * (σ - 1) ^ (-(3 : ℝ) / 4) * (Real.log |t|) ^ ((1 : ℝ) / 4) := by - obtain ⟨A, ha, C, hC, h⟩ := ZetaUpperBnd - obtain ⟨c, hc, h_inv⟩ := ZetaNear1BndExact - refine ⟨(2 * C) ^ ((1 : ℝ)/ 4) * c ^ ((3 : ℝ)/ 4), by positivity, ?_⟩ - intro σ hσ t t_gt - obtain ⟨σ_gt, σ_le⟩ := hσ - have ht' : 3 < |2 * t| := by simp only [abs_mul, Nat.abs_ofNat]; linarith - have hnezero: ((σ - 1) / c) ^ (-3 / 4 : ℝ) ≠ 0 := by - have : (σ - 1) / c ≠ 0 := ne_of_gt <| div_pos (by linarith) hc - contrapose! this - rwa [Real.rpow_eq_zero (div_nonneg (by linarith) hc.le) (by norm_num)] at this - calc - _ ≤ ‖‖ζ σ‖ ^ (3 / 4 : ℝ) * ‖ζ (↑σ + 2 * ↑t * I)‖ ^ (1 / 4 : ℝ)‖ := ?_ - _ ≤ ‖((σ - 1) / c) ^ (-3 / 4 : ℝ) * ‖ζ (↑σ + 2 * ↑t * I)‖ ^ (1 / 4 : ℝ)‖ := ?_ - _ ≤ ‖((σ - 1) / c) ^ (-3 / 4 : ℝ) * C ^ (1 / 4 : ℝ) * (Real.log |2 * t|) ^ (1 / 4 : ℝ)‖ := ?_ - _ ≤ ‖((σ - 1) / c) ^ (-3 / 4 : ℝ) * C ^ (1 / 4 : ℝ) * (Real.log (|t| ^ 2)) ^ (1 / 4 : ℝ)‖ := ?_ - _ = ‖((σ - 1)) ^ (-3 / 4 : ℝ) * c ^ (3 / 4 : ℝ) * (C ^ (1 / 4 : ℝ) * (Real.log (|t| ^ 2)) ^ (1 / 4 : ℝ))‖ := ?_ - _ = ‖((σ - 1)) ^ (-3 / 4 : ℝ) * c ^ (3 / 4 : ℝ) * ((2 * C) ^ (1 / 4 : ℝ) * Real.log |t| ^ (1 / 4 : ℝ))‖ := ?_ - _ = _ := ?_ - · simp only [norm_mul] - convert ZetaInvBound1 σ_gt using 2 - <;> exact abs_eq_self.mpr <| Real.rpow_nonneg (norm_nonneg _) _ - · have bnd1: ‖ζ σ‖ ^ (3 / 4 : ℝ) ≤ ((σ - 1) / c) ^ (-(3 : ℝ) / 4) := by - have : ((σ - 1) / c) ^ (-(3 : ℝ) / 4) = (((σ - 1) / c) ^ (-1 : ℝ)) ^ (3 / 4 : ℝ) := by - rw [← Real.rpow_mul ?_] - · ring_nf - · exact div_nonneg (by linarith) hc.le - rw [this] - apply Real.rpow_le_rpow (by simp [norm_nonneg]) ?_ (by norm_num) - convert! h_inv σ ⟨σ_gt, σ_le⟩ using 1; simp [Real.rpow_neg_one, inv_div] - simp only [norm_mul] - apply (mul_le_mul_iff_left₀ ?_).mpr - · convert! bnd1 using 1 - · exact abs_eq_self.mpr <| Real.rpow_nonneg (norm_nonneg _) _ - · exact abs_eq_self.mpr <| Real.rpow_nonneg (div_nonneg (by linarith) hc.le) _ - · apply lt_iff_le_and_ne.mpr ⟨(by simp), ?_⟩ - have : ζ (↑σ + 2 * ↑t * I) ≠ 0 := by - apply riemannZeta_ne_zero_of_one_le_re (by simp [σ_gt.le]) - symm; exact fun h2 ↦ this (by simpa using h2) - · replace h := h σ (2 * t) (by simpa using ht') ⟨?_, σ_le⟩ - · have : 0 ≤ Real.log |2 * t| := Real.log_nonneg (by linarith) - conv => rhs; rw [mul_assoc, ← Real.mul_rpow hC.le this] - rw [norm_mul, norm_mul] - conv => rhs; rhs; rw [Real.norm_rpow_of_nonneg <| mul_nonneg hC.le this] - conv => lhs; rhs; rw [Real.norm_rpow_of_nonneg <| norm_nonneg _] - apply (mul_le_mul_iff_right₀ ?_).mpr - · apply Real.rpow_le_rpow (norm_nonneg _) ?_ (by norm_num) - convert h using 1 - · simp - · rw [Real.norm_eq_abs, abs_eq_self.mpr <| mul_nonneg hC.le this] - · simpa only [Real.norm_eq_abs, abs_pos] - · linarith [(div_nonneg ha.1.le (Real.log_nonneg (by linarith)) : 0 ≤ A / Real.log |2 * t|)] - · simp only [Real.log_abs, norm_mul] - apply (mul_le_mul_iff_right₀ ?_).mpr - · rw [← Real.log_abs, Real.norm_rpow_of_nonneg <| Real.log_nonneg (by linarith)] - have : 1 ≤ |(|t| ^ 2)| := by - simp only [_root_.sq_abs, _root_.abs_pow, one_le_sq_iff_one_le_abs] - linarith - conv => rhs; rw [← Real.log_abs, Real.norm_rpow_of_nonneg <| Real.log_nonneg this] - apply Real.rpow_le_rpow (abs_nonneg _) ?_ (by norm_num) - · rw [Real.norm_eq_abs, abs_eq_self.mpr <| Real.log_nonneg (by linarith)] - rw [abs_eq_self.mpr <| Real.log_nonneg this, abs_mul, Real.log_abs, Nat.abs_ofNat] - apply Real.log_le_log (mul_pos (by norm_num) (by linarith)) (by nlinarith) - · apply mul_pos (abs_pos.mpr hnezero) (abs_pos.mpr ?_) - have : C ≠ 0 := ne_of_gt hC - contrapose! this; rwa [Real.rpow_eq_zero (by linarith) (by norm_num)] at this - · have : (-3 : ℝ) / 4 = -((3 : ℝ)/ 4) := by norm_num - simp only [norm_mul, mul_eq_mul_right_iff, this, ← mul_assoc]; left; left - conv => lhs; rw [Real.div_rpow (by linarith) hc.le, Real.rpow_neg hc.le, div_inv_eq_mul, norm_mul] - · simp only [Real.log_pow, Nat.cast_ofNat, norm_mul, Real.norm_eq_abs] - congr! 1 - rw [Real.mul_rpow (by norm_num) hC.le, Real.mul_rpow (by norm_num) <| - Real.log_nonneg (by linarith), abs_mul, abs_mul, ← mul_assoc, mul_comm _ |2 ^ (1 / 4)|] - · simp only [norm_mul, Real.norm_eq_abs] - have : (2 * C) ^ ((1 : ℝ)/ 4) * c ^ ((3 : ℝ)/ 4) = - |(2 * C) ^ ((1 : ℝ)/ 4) * c ^ ((3 : ℝ)/ 4)| := by - rw [abs_eq_self.mpr (by apply mul_nonneg <;> (apply Real.rpow_nonneg; linarith))] - rw [this, abs_mul, abs_eq_self.mpr (by apply Real.rpow_nonneg; linarith), abs_eq_self.mpr (by positivity), - abs_eq_self.mpr (by positivity), abs_eq_self.mpr (by apply Real.rpow_nonneg (Real.log_nonneg (by linarith)))] - ring_nf - -set_option backward.isDefEq.respectTransparency false in -lemma deriv_fun_re {t : ℝ} {f : ℂ → ℂ} (diff : ∀ (σ : ℝ), DifferentiableAt ℂ f (↑σ + ↑t * I)) : - (deriv fun {σ₂ : ℝ} ↦ f (σ₂ + t * I)) = fun (σ : ℝ) ↦ deriv f (σ + t * I) := by - ext σ - have := deriv_comp (h := fun (σ : ℝ) ↦ σ + t * I) (h₂ := f) σ (diff σ) ?_ - · simp only [deriv_add_const', _root_.deriv_ofReal, mul_one] at this - exact this - · apply DifferentiableAt.add_const _ <| differentiableAt_ofReal σ - -set_option backward.isDefEq.respectTransparency false in -lemma Zeta_eq_int_derivZeta {σ₁ σ₂ t : ℝ} (t_ne_zero : t ≠ 0) : - (∫ σ in σ₁..σ₂, ζ' (σ + t * I)) = ζ (σ₂ + t * I) - ζ (σ₁ + t * I) := by - have diff : ∀ (σ : ℝ), DifferentiableAt ℂ ζ (σ + t * I) := by - intro σ - refine differentiableAt_riemannZeta ?_ - contrapose! t_ne_zero; apply And.right; simpa [Complex.ext_iff] using t_ne_zero - apply intervalIntegral.integral_deriv_eq_sub' - · exact deriv_fun_re diff - · intro s _ - apply DifferentiableAt.comp - · exact (diff s).restrictScalars ℝ - · exact DifferentiableAt.add_const (c := t * I) <| differentiableAt_ofReal _ - · apply ContinuousOn.comp (g := ζ') ?_ ?_ (mapsTo_image _ _) - · apply HasDerivAt.continuousOn (f' := deriv <| ζ') - intro x hx - apply hasDerivAt_deriv_iff.mpr - replace hx : x ≠ 1 := by - contrapose! hx - simp only [hx, mem_image, Complex.ext_iff, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, - I_im, mul_one, sub_self, add_zero, one_re, add_im, mul_im, zero_add, one_im, not_exists, - not_and] - exact fun _ _ _ ↦ t_ne_zero - exact differentiableAt_deriv_riemannZeta hx - · exact continuous_ofReal.continuousOn.add continuousOn_const - -lemma Zeta_diff_Bnd : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ₁ σ₂ : ℝ) (t : ℝ) (_ : 3 < |t|) - (_ : 1 - A / Real.log |t| ≤ σ₁) (_ : σ₂ ≤ 2) (_ : σ₁ < σ₂), - ‖ζ (σ₂ + t * I) - ζ (σ₁ + t * I)‖ ≤ C * Real.log |t| ^ 2 * (σ₂ - σ₁) := by - obtain ⟨A, hA, C, Cpos, hC⟩ := ZetaDerivUpperBnd - refine ⟨A, hA, C, Cpos, ?_⟩ - intro σ₁ σ₂ t t_gt σ₁_ge σ₂_le σ₁_lt_σ₂ - have t_ne_zero : t ≠ 0 := by contrapose! t_gt; simp only [t_gt, abs_zero, Nat.ofNat_nonneg] - rw [← Zeta_eq_int_derivZeta t_ne_zero] - convert intervalIntegral.norm_integral_le_of_norm_le_const ?_ using 1 - · congr; rw [_root_.abs_of_nonneg (by linarith)] - · intro σ hσ; rw [uIoc_of_le σ₁_lt_σ₂.le, mem_Ioc] at hσ - exact hC σ t t_gt ⟨le_trans σ₁_ge hσ.1.le, le_trans hσ.2 σ₂_le⟩ - -lemma ZetaInvBnd_aux' {t : ℝ} (logt_gt_one : 1 < Real.log |t|) : Real.log |t| < Real.log |t| ^ 9 := by - nth_rewrite 1 [← Real.rpow_one <| Real.log |t|] - exact mod_cast Real.rpow_lt_rpow_left_iff (y := 1) (z := 9) logt_gt_one |>.mpr (by norm_num) - -lemma ZetaInvBnd_aux {t : ℝ} (logt_gt_one : 1 < Real.log |t|) : Real.log |t| ≤ Real.log |t| ^ 9 := - ZetaInvBnd_aux' logt_gt_one |>.le - -lemma ZetaInvBnd_aux2 {A C₁ C₂ : ℝ} (Apos : 0 < A) (C₁pos : 0 < C₁) (C₂pos : 0 < C₂) - (hA : A ≤ 1 / 2 * (C₁ / (C₂ * 2)) ^ (4 : ℝ)) : - 0 < (C₁ * A ^ (3 / 4 : ℝ) - C₂ * 2 * A)⁻¹ := by - simp only [inv_pos, sub_pos] - apply div_lt_iff₀ (by positivity) |>.mp - rw [div_eq_mul_inv, ← Real.rpow_neg (by positivity), mul_assoc] - apply lt_div_iff₀' (by positivity) |>.mp - nth_rewrite 1 [← Real.rpow_one A] - rw [← Real.rpow_add (by positivity)] - norm_num - apply Real.rpow_lt_rpow_iff (z := 4) (by positivity) (by positivity) (by positivity) |>.mp - rw [← Real.rpow_mul (by positivity)] - norm_num - apply lt_of_le_of_lt hA - rw [div_mul_comm, mul_one, Real.rpow_ofNat] - apply half_lt_self - positivity - -lemma ZetaInvBnd : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|) - (_ : σ ∈ Ico (1 - A / (Real.log |t|) ^ 9) (1 + A / (Real.log |t|) ^ 9)), - 1 / ‖ζ (σ + t * I)‖ ≤ C * (Real.log |t|) ^ (7 : ℝ) := by - obtain ⟨C', C'pos, hC₁⟩ := ZetaInvBound2 - obtain ⟨A', hA', C₂, C₂pos, hC₂⟩ := Zeta_diff_Bnd - set C₁ := 1 / C' - let A := min A' <| (1 / 2 : ℝ) * (C₁ / (C₂ * 2)) ^ (4 : ℝ) - have Apos : 0 < A := by have := hA'.1; positivity - have Ale : A ≤ 1 / 2 := by dsimp only [A]; apply min_le_iff.mpr; left; exact hA'.2 - set C := (C₁ * A ^ (3 / 4 : ℝ) - C₂ * 2 * A)⁻¹ - have Cpos : 0 < C := by - refine ZetaInvBnd_aux2 (by positivity) (by positivity) (by positivity) ?_ - apply min_le_right - refine ⟨A, ⟨Apos, by linarith [hA'.2]⟩ , C, Cpos, ?_⟩ - intro σ t t_gt hσ - have logt_gt_one := logt_gt_one t_gt.le - have σ_ge : 1 - A / Real.log |t| ≤ σ := by - apply le_trans ?_ hσ.1 - suffices A / Real.log |t| ^ 9 ≤ A / Real.log |t| by linarith - exact div_le_div₀ Apos.le (by rfl) (by positivity) <| ZetaInvBnd_aux logt_gt_one - obtain ⟨_, _, neOne⟩ := UpperBnd_aux ⟨Apos, Ale⟩ t_gt σ_ge - set σ' := 1 + A / Real.log |t| ^ 9 - have σ'_gt : 1 < σ' := by simp only [σ', lt_add_iff_pos_right]; positivity - have σ'_le : σ' ≤ 2 := by - simp only [σ'] - suffices A / Real.log |t| ^ 9 < 1 by linarith - apply div_lt_one (by positivity) |>.mpr - exact lt_trans₄ (by linarith) logt_gt_one <| ZetaInvBnd_aux' logt_gt_one - set s := σ + t * I - set s' := σ' + t * I - by_cases h0 : ‖ζ s‖ ≠ 0 - swap - · simp only [ne_eq, not_not] at h0; simp only [h0, div_zero]; positivity - apply div_le_iff₀ (by positivity) |>.mpr <| div_le_iff₀' (by positivity) |>.mp ?_ - have pos_aux : 0 < (σ' - 1) := by linarith - calc - _ ≥ ‖ζ s'‖ - ‖ζ s - ζ s'‖ := ?_ - _ ≥ C₁ * (σ' - 1) ^ ((3 : ℝ)/ 4) * Real.log |t| ^ ((-1 : ℝ)/ 4) - C₂ * Real.log |t| ^ 2 * (σ' - σ) := ?_ - _ ≥ C₁ * (A / Real.log |t| ^ (9 : ℝ)) ^ ((3 : ℝ)/ 4) * Real.log |t| ^ ((-1 : ℝ)/ 4) - C₂ * Real.log |t| ^ (2 : ℝ) * 2 * A / Real.log |t| ^ (9 : ℝ) := ?_ - _ ≥ C₁ * A ^ ((3 : ℝ)/ 4) * Real.log |t| ^ (-7 : ℝ) - C₂ * 2 * A * Real.log |t| ^ (-7 : ℝ) := ?_ - _ = (C₁ * A ^ ((3 : ℝ)/ 4) - C₂ * 2 * A) * Real.log |t| ^ (-7 : ℝ) := by ring - _ ≥ _ := ?_ - · apply ge_iff_le.mpr - convert norm_sub_norm_le (a := ζ s') (b := ζ s' - ζ s) using 1 - · rw [(by simp : ζ s' - ζ s = -(ζ s - ζ s'))]; simp only [norm_neg] - · simp - · apply sub_le_sub - · have := one_div_le ?_ (by positivity) |>.mp <| hC₁ ⟨σ'_gt, σ'_le⟩ t t_gt - · convert this using 1 - rw [one_div, mul_inv_rev, mul_comm, mul_inv_rev, mul_comm _ C'⁻¹] - simp only [one_div C', C₁] - congr <;> (rw [← Real.rpow_neg (by linarith), neg_div]); rw [neg_neg] - · apply norm_pos_iff.mpr <| riemannZeta_ne_zero_of_one_lt_re (by simp [σ'_gt]) - · rw [(by simp : ζ s - ζ s' = -(ζ s' - ζ s)), norm_neg] - refine hC₂ σ σ' t t_gt ?_ σ'_le <| by rw [Set.mem_Ico] at hσ; exact hσ.2 - apply le_trans ?_ hσ.1 - rw [tsub_le_iff_right, ← add_sub_right_comm, le_sub_iff_add_le, add_le_add_iff_left] - exact div_le_div₀ hA'.1.le (by simp [A]) (by positivity) <| ZetaInvBnd_aux logt_gt_one - · apply sub_le_sub (by simp only [add_sub_cancel_left, σ']; exact_mod_cast le_rfl) ?_ - rw [mul_div_assoc, mul_assoc _ 2 _] - apply mul_le_mul (by exact_mod_cast le_rfl) ?_ (by linarith [hσ.2]) (by positivity) - suffices h : σ' + (1 - A / Real.log |t| ^ 9) ≤ (1 + A / Real.log |t| ^ 9) + σ by - simp only [tsub_le_iff_right] - convert! le_sub_right_of_add_le h using 1; ring_nf; norm_cast; simp - exact add_le_add (by linarith) (by linarith [hσ.1]) - · simp_rw [tsub_le_iff_right, div_eq_mul_inv _ (Real.log |t| ^ (9 : ℝ))] - rw [← Real.rpow_neg (by positivity), Real.mul_rpow (by positivity) (by positivity)] - rw [← Real.rpow_mul (by positivity)] - ring_nf - conv => rhs; lhs; rw [mul_assoc, ← Real.rpow_add (by positivity)] - rw [(by ring : C₂ * Real.log |t| ^ (2 : ℝ) * A * Real.log |t| ^ (-9 : ℝ) * 2 = C₂ * (Real.log |t| ^ (2 : ℝ) * Real.log |t| ^ (-9 : ℝ) ) * A * 2)] - rw [← Real.rpow_add (by positivity)]; norm_num; group; exact le_rfl - · apply div_le_iff₀ (by positivity) |>.mpr - conv => rw [mul_assoc]; rhs; rhs; rw [mul_comm C, ← mul_assoc, ← Real.rpow_add (by positivity)] - have := inv_inv C ▸ mul_inv_cancel₀ (a := C⁻¹) (by positivity) |>.symm.le - simpa [C] using this - --- **Another AlphaProof collaboration (thanks to Thomas Hubert!)** - -lemma ZetaLowerBnd : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (c : ℝ) (_ : 0 < c), - ∀ (σ : ℝ) - (t : ℝ) (_ : 3 < |t|) - (_ : σ ∈ Ico (1 - A / (Real.log |t|) ^ 9) 1), - c / (Real.log |t|) ^ (7 : ℝ) ≤ ‖ζ (σ + t * I)‖ := by - obtain ⟨C₁, C₁pos, hC₁⟩ := ZetaLowerBound3 - obtain ⟨A', hA', C₂, C₂pos, hC₂⟩ := Zeta_diff_Bnd - - -- Pick the right constants. - -- Don't really like this because I can only do that after first finishing the proof. - -- Is there a way to delay picking those - let A := min A' ((C₁ / (4 * C₂)) ^ 4) - have hA : A ∈ Ioc 0 (1 / 2) := - ⟨lt_min hA'.1 (by positivity), (min_le_left A' _).trans hA'.2⟩ - - let C := C₁ * A ^ ((3:ℝ) /4) - 2 * C₂ * A - have hc_pos : 0 < C := by - have:= A.rpow_le_rpow hA.1.le (min_le_right _ _) (inv_pos.mpr four_pos).le - erw [Real.pow_rpow_inv_natCast (div_pos C₁pos (mul_pos four_pos C₂pos)).le four_ne_zero, - le_div_iff₀ (mul_pos four_pos C₂pos)] at this - norm_num [mul_assoc, C, mul_left_comm, C₂pos, hA.1, - (mul_le_mul_of_nonneg_right this (A.rpow_nonneg hA.1.le _)).trans_lt', ←A.rpow_add] - - refine ⟨A, hA, C, hc_pos, fun σ t L ⟨σ_low_bound, σ_le_one⟩=>?_⟩ - - -- From here I followed the proof found in the blueprint - let σ' := 1 + A / Real.log |t| ^ (9 : ℝ) - - have triangular : ‖ζ (σ + t * I)‖ ≥ ‖ζ (σ' + t * I)‖ - ‖ζ (σ + t * I) - ζ (σ' + t * I)‖ := by - apply sub_le_iff_le_add.mpr.comp (sub_sub_self @_ (@_ : ℂ)▸norm_sub_le _ _).trans - (by rw [add_comm]) - - have one_leLogT : 1 ≤ Real.log |t| := (logt_gt_one L.le).le - have one_half_le_log_pow : 1 / 2 ≤ Real.log |t| ^ 9 := - one_half_lt_one.le.trans <| one_le_pow₀ one_leLogT - - have σ'_ge : 1 ≤ σ' := by - simp_all only [gt_iff_lt, mem_Ioc, Real.log_abs, one_div, and_imp, tsub_le_iff_right, - lt_inf_iff, div_pos_iff_of_pos_left, Nat.ofNat_pos, mul_pos_iff_of_pos_left, pow_pos, - and_self, inf_le_iff, true_or, sub_pos, mem_Ico, and_true, ofReal_add, ofReal_one, - ofReal_div, ge_iff_le, le_add_iff_nonneg_right, A, C, σ'] - apply div_nonneg - · apply le_min - · linarith - · have : (C₁ / (4 * C₂)) ^ 4 = ((C₁ / (4 * C₂)) ^ 2) ^ 2 := by ring - rw [this] - apply sq_nonneg - · positivity - - have right_sub : -‖ζ (σ + t * I) - ζ (σ' + t * I)‖ ≥ - C₂ * Real.log |t| ^ 2 * (σ' - σ) := by - change - C₂ * Real.log |t| ^ 2 * (σ' - σ) ≤ -‖ζ (σ + t * I) - ζ (σ' + t * I)‖ - have := hC₂ σ σ' t L ?_ ?_ ?_ - · convert! neg_le_neg this using 1 - · ring - · congr! 1 - have : ζ (↑σ + ↑t * I) - ζ (↑σ' + ↑t * I) = - - (ζ (↑σ' + ↑t * I) - ζ (↑σ + ↑t * I)) := by ring - rw [this, norm_neg] - · have : 1 - A' / Real.log |t| ≤ 1 - A / (Real.log |t|) ^ 9 := by - gcongr - · exact hA'.1.le - · bound - · bound - linarith - · have : σ' ≤ 1 + A := by - simp_all only [gt_iff_lt, mem_Ioc, Real.log_abs, one_div, and_imp, tsub_le_iff_right, - lt_inf_iff, div_pos_iff_of_pos_left, Nat.ofNat_pos, mul_pos_iff_of_pos_left, pow_pos, - and_self, inf_le_iff, true_or, sub_pos, mem_Ico, and_true, ofReal_add, ofReal_one, - ofReal_div, ge_iff_le, le_add_iff_nonneg_right, add_le_add_iff_left, le_inf_iff, - σ', A, C] - have : 1 ≤ Real.log t ^ (9 : ℕ) := by - bound - have : 1 ≤ Real.log t ^ (9 : ℝ) := by - exact_mod_cast this - refine ⟨?_, ?_⟩ - · rw [← min_div_div_right] - · rw [min_le_iff] - left - bound - · exact le_trans (zero_le_one) this - · rw [← min_div_div_right] - · rw [min_le_iff] - right - bound - · exact le_trans (zero_le_one) this - · bound [hA.2] - · linarith - - have right' : -‖ζ (σ + t * I) - ζ (σ' + t * I)‖ ≥ - C₂ * 2 * A / Real.log |t| ^ 7 := by - have := (abs t).log_pos (by bound) - refine right_sub.trans' ((div_le_iff₀ (pow_pos this 7)).2 @?_|>.trans - (mul_le_mul_of_nonpos_left (sub_le_sub_left σ_low_bound (1+_) ) - (by ·linear_combination C₂*this*(.log |t|)))) - exact (mod_cast (by linear_combination (2 *_* A) *div_self ↑(pow_pos this 09).ne')) - - have left_sub : ‖ζ (σ' + t * I)‖ ≥ C₁ * (σ' - 1) ^ ((3:ℝ) /4) / Real.log |t| ^ 4 := by - use (hC₁ ⟨lt_add_of_pos_right (1) (by bound[hA.1]), - add_le_of_le_sub_left ((div_le_iff₀ (by bound)).2 (hA.2.trans (?_)))⟩ t L).trans' ?_ - · norm_num only [one_mul, Real.rpow_ofNat, one_half_le_log_pow] - · simp_all only [gt_iff_lt, mem_Ioc, lt_inf_iff, div_pos_iff_of_pos_left, Nat.ofNat_pos, - mul_pos_iff_of_pos_left, pow_pos, and_self, inf_le_iff, true_or, sub_pos, mem_Ico, - ofReal_add, ofReal_one, ofReal_div, ge_iff_le, le_add_iff_nonneg_right, neg_mul, - neg_le_neg_iff, add_sub_cancel_left, σ', A, C] - gcongr - have : Real.log |t| ^ ((1 : ℝ) / 4) ≤ Real.log |t| ^ (4 : ℝ) := - Real.rpow_le_rpow_of_exponent_le one_leLogT (by norm_num) - exact_mod_cast this - - have left' : ‖ζ (σ' + t * I)‖ ≥ C₁ * A ^ ((3:ℝ) /4) / Real.log |t| ^ 7 := by - contrapose! hC₁ - use σ', ⟨lt_add_of_pos_right 1<|by bound[hA'.1], - add_le_of_le_sub_left ((div_le_iff₀ (by bound)).2 (hA.2.trans ?_))⟩, t, L, hC₁.trans_le ?_ - · norm_num only [one_mul, Real.rpow_ofNat, one_half_le_log_pow] - · norm_num only [σ', add_sub_cancel_left, A.div_rpow hA.1.le, mul_div, pow_pos, L.trans', - ←Real.rpow_natCast, ←Real.rpow_mul, le_of_lt, Real.log_pos, refl, div_div, ←Real.rpow_sub] - rw [Real.div_rpow hA.1.le, ← Real.rpow_mul (by linarith), ← mul_div_assoc, div_div, ← Real.rpow_add (by linarith)] - · norm_num - · apply Real.rpow_nonneg (by linarith) - have ineq : ‖ζ (σ + t * I)‖ ≥ (C₁ * A ^ ((3:ℝ) /4) - C₂ * 2 * A) / Real.log |t| ^ 7 := by - linear_combination left'+triangular+right' - - rw [mul_comm C₂] at ineq - exact_mod_cast ineq - --- **End collaboration 6/20/25** - -lemma ZetaZeroFree : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)), - ∀ (σ : ℝ) - (t : ℝ) (_ : 3 < |t|) - (_ : σ ∈ Ico (1 - A / (Real.log |t|) ^ 9) 1), - ζ (σ + t * I) ≠ 0 := by - obtain ⟨A, hA, c, hc, h_lower⟩ := ZetaLowerBnd - - -- Use the same A for our result - refine ⟨A, hA, ?_⟩ - - -- Now prove that ζ has no zeros in this region - intro σ t ht hσ h_zero - - have := h_lower σ t ht hσ - - rw [h_zero, norm_zero] at this - - have pos_bound : 0 < c / (Real.log |t|) ^ (7 : ℝ) := by - apply div_pos hc - apply Real.rpow_pos_of_pos - apply Real.log_pos - linarith - - linarith - -lemma LogDerivZetaBnd : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|) - (_ : σ ∈ Ico (1 - A / Real.log |t| ^ 9) (1 + A / Real.log |t| ^ 9)), ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤ - C * Real.log |t| ^ 9 := by - obtain ⟨A, hA, C, hC, h⟩ := ZetaInvBnd - obtain ⟨A', hA', C', hC', h'⟩ := ZetaDerivUpperBnd - use min A A', ⟨lt_min hA.1 hA'.1, min_le_of_right_le hA'.2⟩, C * C', mul_pos hC hC' - intro σ t t_gt ⟨σ_ge, σ_lt⟩ - have logt_gt : (1 : ℝ) < Real.log |t| := logt_gt_one t_gt.le - have σ_ge' : 1 - A / Real.log |t| ^ 9 ≤ σ := by - apply le_trans (tsub_le_tsub_left ?_ 1) σ_ge - apply div_le_div_of_nonneg_right (min_le_left A A') - exact pow_nonneg (zero_le_one.trans logt_gt.le) _ - have σ_ge'' : 1 - A' / Real.log |t| ≤ σ := by - apply le_trans (tsub_le_tsub_left ?_ 1) σ_ge - apply div_le_div₀ hA'.1.le (min_le_right A A') (lt_trans (by norm_num) logt_gt) ?_ - exact le_self_pow₀ logt_gt.le (by norm_num) - replace h := h σ t t_gt ⟨σ_ge', by calc - σ < 1 + min A A' / Real.log |t| ^ 9 := σ_lt - _ ≤ 1 + A / Real.log |t| ^ 9 := by gcongr; simp⟩ - replace h' := h' σ t t_gt ⟨σ_ge'', by - calc - σ ≤ 1 + min A A' / Real.log |t| ^ 9 := by linarith [σ_lt] - - _ ≤ 1 + (1/2) / Real.log |t| ^ 9 := by gcongr; simp [Set.mem_Ioc] at hA' hA ⊢ ; simp [hA.2] - - _ ≤ 1 + (1/2) / 1 := by - gcongr - calc - 1 ≤ Real.log |t| := by linarith - _ ≤ (Real.log |t|)^9 := Real.self_le_rpow_of_one_le (by linarith) (by linarith) - norm_cast - - _ ≤ 2 := by linarith - ⟩ - simp only [norm_div] - convert! mul_le_mul h h' (by simp) ?_ using 1 <;> (norm_cast; ring_nf); positivity - -/-% ** Bad delimiters on purpose ** -Annoying: we have reciprocals of $log |t|$ in the bounds, and we've assumed that $|t|>3$; but we -want to make things uniform in $t$. Let's change to things like $log (|t|+3)$ instead of $log |t|$. -\begin{lemma}[LogLeLog]\label{LogLeLog}\lean{LogLeLog}\leanok -There is a constant $C>0$ so that for all $t>3$, -$$ -1/\log t \le C / \log (t + 3). -$$ -\end{lemma} -%-/ -/-% -\begin{proof} -Write -$$ -\log (t + 3) = \log t + \log (1 + 3/t) = \log t + O(1/t). -$$ -Then we can bound $1/\log t$ by $C / \log (t + 3)$ for some constant $C>0$. -\end{proof} -%-/ - -lemma ZetaNoZerosOn1Line (t : ℝ) : ζ (1 + t * I) ≠ 0 := by - refine riemannZeta_ne_zero_of_one_le_re ?_ - simp - --- **Begin collaboration with the Alpha Proof team! 5/29/25** - -lemma ZetaCont : ContinuousOn ζ (univ \ {1}) := by - apply continuousOn_of_forall_continuousAt (fun x hx ↦ ?_) - apply DifferentiableAt.continuousAt (𝕜 := ℂ) - convert differentiableAt_riemannZeta ?_ - simp only [Set.mem_sdiff, mem_univ, mem_singleton_iff, true_and] at hx - exact hx - -lemma ZetaNoZerosInBox (T : ℝ) : - ∃ (σ : ℝ) (_ : σ < 1), ∀ (t : ℝ) (_ : |t| ≤ T) - (σ' : ℝ) (_ : σ' ≥ σ), ζ (σ' + t * I) ≠ 0 := by - by_contra! h - have hn (n : ℕ) := h (1 - 1 / (n + 1)) (sub_lt_self _ (by positivity)) - - have : ∃ (tn : ℕ → ℝ) (σn : ℕ → ℝ), (∀ n, σn n ≤ 1) ∧ - (∀ n, (1 : ℝ) - 1 / (n + 1) ≤ σn n) ∧ (∀ n, |tn n| ≤ T) ∧ - (∀ n, ζ (σn n + tn n * I) = 0) := by - choose t ht σ' hσ' hζ using hn - refine ⟨t, σ', ?_, hσ', ht, hζ⟩ - intro n - by_contra! hσn - have := riemannZeta_ne_zero_of_one_lt_re (s := σ' n + t n * I) - simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - add_zero, ne_eq] at this - exact this hσn (hζ n) - - choose t σ' hσ'_le hσ'_ge ht hζ using this - - have σTo1 : Filter.Tendsto σ' Filter.atTop (𝓝 1) := by - use sub_zero (1: ℝ)▸tendsto_order.2 ⟨fun A B=>? _,fun A B=>?_⟩ - · apply (((tendsto_inv_atTop_nhds_zero_nat.comp - (Filter.tendsto_add_atTop_nat (1))).congr (by norm_num)).const_sub 1).eventually_const_lt - B|>.mono (hσ'_ge ·|>.trans_lt') - · norm_num[(hσ'_le _).trans_lt, B.trans_le'] - - have : ∃ (t₀ : ℝ) (subseq : ℕ → ℕ), - Filter.Tendsto (t ∘ subseq) Filter.atTop (𝓝 t₀) ∧ - Filter.Tendsto subseq Filter.atTop Filter.atTop := by - refine (isCompact_Icc.isSeqCompact fun and => abs_le.1 (ht and)).imp fun and ⟨x, A, B, _⟩ => ?_ - use A, by omega, B.tendsto_atTop - - obtain ⟨t₀, subseq, tTendsto, subseqTendsto⟩ := this - - have σTo1 : Filter.Tendsto (σ' ∘ subseq) Filter.atTop (𝓝 1) := - σTo1.comp subseqTendsto - - have (n : ℕ) : ζ (σ' (subseq n) + I * (t (subseq n))) = 0 := by - convert hζ (subseq n) using 3 - ring - - have ToOneT0 : Filter.Tendsto (fun n ↦ (σ' (subseq n) : ℂ) + Complex.I * (t (subseq n))) Filter.atTop - (𝓝[≠]((1 : ℂ) + I * t₀)) := by - simp_rw [tendsto_nhdsWithin_iff, Function.comp_def] at tTendsto ⊢ - constructor - · exact (σTo1.ofReal.add (tTendsto.ofReal.const_mul _)).trans (by simp) - · filter_upwards with n - apply ne_of_apply_ne ζ - rw [this] - apply Ne.symm - apply riemannZeta_ne_zero_of_one_le_re - simp only [add_re, one_re, mul_re, I_re, ofReal_re, zero_mul, I_im, ofReal_im, mul_zero, - sub_self, add_zero, le_refl] - - by_cases ht₀ : t₀ = 0 - · have ZetaBlowsUp : ∀ᶠ s in 𝓝[≠](1 : ℂ), ‖ζ s‖ ≥ 1 := by - simp_all only [ge_iff_le, one_div, tsub_le_iff_right, Function.comp_def, ofReal_zero, - mul_zero, add_zero, norm_eq_sqrt_real_inner, Complex.inner, mul_re, conj_re, conj_im, - mul_neg, sub_neg_eq_add, Real.one_le_sqrt, eventually_nhdsWithin_iff, mem_compl_iff, - mem_singleton_iff] - contrapose! h - simp_all only [ne_eq] - delta abs at* - exfalso - simp_rw [Metric.nhds_basis_ball.frequently_iff]at* - choose! I A B using h - choose a s using exists_seq_strictAnti_tendsto (0: ℝ) - apply ((isCompact_closedBall _ _).isSeqCompact - fun and=>(A _ (s.2.1 and)).le.trans (s.2.2.bddAbove_range.some_mem ⟨and, rfl⟩)).elim - simp only [Metric.mem_ball, dist_eq_norm_sub] at A - refine fun and ⟨a, H, S, M⟩=> ?_ - refine absurd (tendsto_nhds_unique M (tendsto_sub_nhds_zero_iff.1 - (( squeeze_zero_norm fun and=>le_of_lt (A _ (s.2.1 _) ) ) - (s.2.2.comp S.tendsto_atTop)))) fun and=>?_ - norm_num[*,Function.comp_def] at M - have:=@riemannZeta_residue_one - use one_ne_zero (tendsto_nhds_unique (this.comp (tendsto_nhdsWithin_iff.2 - ⟨ M,.of_forall (by norm_num[*])⟩)) ( squeeze_zero_norm ?_ - ((M.sub_const 1).norm.trans (by rw [sub_self,norm_zero])))) - use fun and =>.trans (norm_mul_le_of_le ↑(le_rfl) (Complex.norm_def _▸Real.sqrt_le_one.mpr - (B ↑_ (s.2.1 ↑_)).right.le)) (by rw [mul_one]) - - have ZetaNonZ : ∀ᶠ s in 𝓝[≠](1 : ℂ), ζ s ≠ 0 := by - filter_upwards [ZetaBlowsUp] - intro s hs hfalse - rw [hfalse] at hs - simp only [norm_zero, ge_iff_le] at hs - linarith - - rw [ht₀] at ToOneT0 - simp only [ofReal_zero, mul_zero, add_zero] at ToOneT0 - rcases (ToOneT0.eventually ZetaNonZ).exists with ⟨n, hn⟩ - exact hn (this n) - - · have zetaIsZero : ζ (1 + Complex.I * t₀) = 0 := by - have cont := @ZetaCont - use isClosed_singleton.isSeqClosed - this - (.comp - (cont.continuousAt.comp (eventually_ne_nhds (by field_simp; simp [ht₀])).mono - fun and=>.intro ⟨⟩) - (ToOneT0.trans (inf_le_left))) - - exact riemannZeta_ne_zero_of_one_le_re (s := 1 + I * t₀) (by simp) zetaIsZero - --- **End collaboration** - -lemma LogDerivZetaHoloOn {S : Set ℂ} (s_ne_one : 1 ∉ S) - (nonzero : ∀ s ∈ S, ζ s ≠ 0) : - HolomorphicOn (fun s ↦ ζ' s / ζ s) S := by - apply DifferentiableOn.div _ _ nonzero <;> intro s hs <;> apply DifferentiableAt.differentiableWithinAt - · apply differentiableAt_deriv_riemannZeta - exact ne_of_mem_of_not_mem hs s_ne_one - · apply differentiableAt_riemannZeta - exact ne_of_mem_of_not_mem hs s_ne_one - -theorem LogDerivZetaHolcSmallT : - ∃ (σ₂ : ℝ) (_ : σ₂ < 1), HolomorphicOn (fun (s : ℂ) ↦ ζ' s / (ζ s)) - (( [[ σ₂, 2 ]] ×ℂ [[ -3, 3 ]]) \ {1}) := by - obtain ⟨σ₂, hσ₂_lt_one, hζ_ne_zero⟩ := ZetaNoZerosInBox 3 - refine ⟨σ₂, hσ₂_lt_one, ?_⟩ - let U := ([[σ₂, 2]] ×ℂ [[-3, 3]]) \ {1} - have s_in_U_im_le3 : ∀ s ∈ U, |s.im| ≤ 3 := by - intro s hs - rw [Set.mem_sdiff_singleton] at hs - rcases hs with ⟨hbox, _hne⟩ - rcases hbox with ⟨hre, him⟩ - simp only [Set.mem_preimage] at him - obtain ⟨him_lower, him_upper⟩ := him - apply abs_le.2 - simp only [neg_le_self_iff, Nat.ofNat_nonneg, inf_of_le_left] at him_lower - simp only [neg_le_self_iff, Nat.ofNat_nonneg, sup_of_le_right] at him_upper - exact ⟨him_lower, him_upper⟩ - - have s_in_U_re_ges2 : ∀ s ∈ U, σ₂ ≤ s.re := by - intro s hs - rw [Set.mem_sdiff_singleton] at hs - rcases hs with ⟨hbox, _hne⟩ - rcases hbox with ⟨hre, _him⟩ - simp only [Set.mem_preimage] at hre - obtain ⟨hre_lower, hre_upper⟩ := hre - have : min σ₂ 2 = σ₂ := by - apply min_eq_left - linarith [hσ₂_lt_one] - rwa [← this] - - apply LogDerivZetaHoloOn - · exact Set.notMem_sdiff_of_mem rfl - · intro s hs - rw[← re_add_im s] - apply hζ_ne_zero - · apply s_in_U_im_le3 _ hs - · apply s_in_U_re_ges2 _ hs - -theorem LogDerivZetaHolcLargeT : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)), ∀ (T : ℝ) (_ : 3 ≤ T), - HolomorphicOn (fun (s : ℂ) ↦ ζ' s / (ζ s)) - (( (Icc ((1 : ℝ) - A / Real.log T ^ 9) 2) ×ℂ (Icc (-T) T) ) \ {1}) := by - obtain ⟨A, A_inter, restOfZetaZeroFree⟩ := ZetaZeroFree - obtain ⟨σ₁, σ₁_lt_one, noZerosInBox⟩ := ZetaNoZerosInBox 3 - let A₀ := min A ((1 - σ₁) * Real.log 3 ^ 9) - refine ⟨A₀, ?_, ?_⟩ - · constructor - · apply lt_min A_inter.1 - bound - · exact le_trans (min_le_left _ _) A_inter.2 - intro T hT - apply LogDerivZetaHoloOn - · exact Set.notMem_sdiff_of_mem rfl - intro s hs - rcases le_or_gt 1 s.re with one_le|lt_one - · exact riemannZeta_ne_zero_of_one_le_re one_le - rw [← re_add_im s] - have := Complex.mem_reProdIm.mp hs.1 - rcases lt_or_ge 3 |s.im| with gt3|le3 - · apply restOfZetaZeroFree _ _ gt3 - refine ⟨?_, lt_one⟩ - calc - _ ≤ 1 - A₀ / Real.log T ^ 9 := by - gcongr - · exact A_inter.1.le - · bound - · bound - · bound - · exact abs_le.mpr ⟨this.2.1, this.2.2⟩ - _ ≤ _:= by exact this.1.1 - - · apply noZerosInBox _ le3 - calc - _ ≥ 1 - A₀ / Real.log T ^ 9 := by exact this.1.1 - _ ≥ 1 - A₀ / Real.log 3 ^ 9 := by - gcongr - apply le_min A_inter.1.le - bound - _ ≥ 1 - (((1 - σ₁) * Real.log 3 ^ 9)) / Real.log 3 ^ 9:= by - gcongr - apply min_le_right - _ = _ := by field_simp; simp - -theorem summable_complex_then_summable_real_part (f : ℕ → ℂ) - (h : Summable f) : Summable (fun n ↦ (f n).re) := by - rcases h with ⟨s, hs⟩ - exact ⟨s.re, hasSum_re hs⟩ - open ArithmeticFunction (vonMangoldt) local notation (name := zb_Lambda) "Λ" => vonMangoldt ---TODO generalize to any LSeries with nonnegative coefficients open scoped ComplexOrder in theorem dlog_riemannZeta_bdd_on_vertical_lines_generalized (σ₀ σ₁ t : ℝ) (σ₀_gt_one : 1 < σ₀) (σ₀_lt_σ₁ : σ₀ ≤ σ₁) : ‖(- ζ' (σ₁ + t * I) / ζ (σ₁ + t * I))‖ ≤ ‖ζ' σ₀ / ζ σ₀‖ := by - let s₁ := σ₁ + t * I - have s₁_re_eq_sigma : s₁.re = σ₁ := by - rw [add_re, ofReal_re, mul_I_re, ofReal_im] - ring - - have s₀_re_eq_sigma : (↑σ₀ : ℂ).re = σ₀ := by - rw [ofReal_re] - - let s₀ := σ₀ - - have σ₁_gt_one : 1 < σ₁ := by exact lt_of_le_of_lt' σ₀_lt_σ₁ σ₀_gt_one - have s₀_gt_one : 1 < (↑σ₀ : ℂ).re := by exact σ₀_gt_one - - have s₁_re_geq_one : 1 < s₁.re := by exact lt_of_lt_of_eq σ₁_gt_one (id (Eq.symm s₁_re_eq_sigma)) - rw [← (ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div s₁_re_geq_one)] - unfold LSeries - - have summable_von_mangoldt_at_σ₀ : Summable (fun i ↦ LSeries.term (fun n ↦ ↑(Λ n)) σ₀ i) := by - exact ArithmeticFunction.LSeriesSummable_vonMangoldt σ₀_gt_one - - have summable_re_von_mangoldt_at_σ₀ : - Summable (fun i ↦ (LSeries.term (fun n ↦ ↑(Λ n)) σ₀ i).re) := by - exact summable_complex_then_summable_real_part (LSeries.term (fun n ↦ ↑(Λ n)) σ₀) - summable_von_mangoldt_at_σ₀ - - have summable_abs_value : Summable (fun i ↦ ‖LSeries.term (fun n ↦ ↑(Λ n)) s₁ i‖) := by - rw [summable_norm_iff] - exact ArithmeticFunction.LSeriesSummable_vonMangoldt s₁_re_geq_one - apply le_trans <| norm_tsum_le_tsum_norm summable_abs_value - rw [← norm_neg, ← neg_div, ← ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div s₀_gt_one] + let s₁ : ℂ := σ₁ + t * I + have hs₁ : s₁.re = σ₁ := by simp [s₁] + have hs₁1 : 1 < s₁.re := by linarith + have hs₀1 : 1 < (σ₀ : ℂ).re := σ₀_gt_one + rw [← ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs₁1, + ← norm_neg (ζ' σ₀ / ζ σ₀), ← neg_div, + ← ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs₀1] unfold LSeries - rw [← re_eq_norm.mpr, re_tsum summable_von_mangoldt_at_σ₀] - · apply Summable.tsum_mono summable_abs_value summable_re_von_mangoldt_at_σ₀ - intro n - beta_reduce - apply le_trans <| LSeries.norm_term_le_of_re_le_re (s := σ₀) _ _ _ - · rw [re_eq_norm.mpr] - apply LSeries.term_nonneg - exact_mod_cast ArithmeticFunction.vonMangoldt_nonneg - · rwa [s₁_re_eq_sigma, s₀_re_eq_sigma] - · apply tsum_nonneg - intro n - apply LSeries.term_nonneg - exact_mod_cast ArithmeticFunction.vonMangoldt_nonneg - -theorem triv_bound_zeta : ∃C ≥ 0, ∀(σ₀ t : ℝ), 1 < σ₀ → - ‖- ζ' (σ₀ + t * I) / ζ (σ₀ + t * I)‖ ≤ (σ₀ - 1)⁻¹ + C := by - let ⟨U, ⟨U_in_nhds, zeta_residue_on_U⟩⟩ := riemannZetaLogDerivResidue - let ⟨open_in_U, ⟨open_in_U_subs_U, open_in_U_is_open, one_in_open_U⟩⟩ := - mem_nhds_iff.mp U_in_nhds - let ⟨ε₀, ⟨ε_pos, metric_ball_around_1_is_in_U'⟩⟩ := - EMetric.isOpen_iff.mp open_in_U_is_open (1 : ℂ) one_in_open_U - - let ε := if ε₀ = ⊤ then ENNReal.ofReal 1 else ε₀ - have O1 : ε ≠ ⊤ := by - unfold ε - by_cases h : ε₀ = ⊤ <;> simp [*] - - have metric_ball_around_1_is_in_U : - Metric.eball (1 : ℂ) ε ⊆ U := by - unfold ε - by_cases h : ε₀ = ⊤ - · simp only [↓reduceIte, ENNReal.ofReal_one, h] - have T : Metric.eball (1 : ℂ) 1 ⊆ Metric.eball 1 ε₀ := by - simp [*] - exact subset_trans (subset_trans T metric_ball_around_1_is_in_U') open_in_U_subs_U - - · simp only [h, ↓reduceIte] - exact subset_trans metric_ball_around_1_is_in_U' open_in_U_subs_U - - have O2 : ε ≠ 0 := by - unfold ε - by_cases h : ε₀ = ⊤ - · simp [*] - · simp only [↓reduceIte, ne_eq, h] - exact pos_iff_ne_zero.mp ε_pos - - let metric_ball_around_1 := Metric.eball (1 : ℂ) ε - let ε_div_two := ε / 2 - let boundary := ENNReal.toReal (1 + ε_div_two) - - let ⟨bound, ⟨bound_pos, bound_prop⟩⟩ := - BddAbove.exists_ge zeta_residue_on_U 0 - - have boundary_geq_one : 1 < boundary := by - unfold boundary - have Z : (1 : ENNReal).toReal = 1 := by rfl - rw [←Z] - have U : ε_div_two ≠ ⊤ := by - refine ENNReal.div_ne_top O1 ?_ - simp - simp only [ENNReal.toReal_one, ne_eq, ENNReal.one_ne_top, not_false_eq_true, - ENNReal.toReal_add _ U, lt_add_iff_pos_right, gt_iff_lt] - refine ENNReal.toReal_pos ?_ ?_ - · unfold ε_div_two - simp [*] - · exact U - - let const : ℝ := bound - let final_const : ℝ := (boundary - 1)⁻¹ + const - have final_const_pos : final_const ≥ 0 := by bound - have const_le_final_const : const ≤ final_const := by bound - - /- final const is actually the constant that we will use -/ - - refine ⟨final_const, final_const_pos, fun σ₀ t σ₀_gt ↦ ?_⟩ - have U4 : ENNReal.ofReal 1 ≠ ⊤ := by exact ENNReal.ofReal_ne_top - have Z0 : ε_div_two.toReal < ε.toReal := by - exact ENNReal.toReal_strict_mono O1 <| ENNReal.half_lt_self O2 O1 - - -- Pick a neighborhood, if in neighborhood then we are good - -- If outside of the neighborhood then use that ζ' / ζ is monotonic - -- and take the bound to be the edge but this will require some more work - - by_cases! h : σ₀ ≤ boundary - · have σ₀_in_ball : (↑σ₀ : ℂ) ∈ metric_ball_around_1 := by - unfold metric_ball_around_1 - unfold Metric.eball - simp only [mem_setOf_eq] - rw [edist_dist, dist_eq_norm] - norm_cast - have U : 0 ≤ σ₀ - 1 := by linarith - simp only [Real.norm_of_nonneg U, gt_iff_lt] - simp only [ENNReal.ofReal_lt_iff_lt_toReal U O1] - calc - _ ≤ boundary - 1 := by linarith - _ = ENNReal.toReal (1 + ε_div_two) - 1 := rfl - _ = ENNReal.toReal (1 + ε_div_two) - ENNReal.toReal (ENNReal.ofReal 1) := by simp - _ ≤ ENNReal.toReal (1 + ε_div_two - ENNReal.ofReal 1) := ENNReal.le_toReal_sub U4 - _ = ENNReal.toReal (ε_div_two) := by - simp only [ENNReal.ofReal_one, ENNReal.addLECancellable_iff_ne, ne_eq, - ENNReal.one_ne_top, not_false_eq_true, AddLECancellable.add_tsub_cancel_left] - _ < ε.toReal := Z0 - - have σ₀_in_U : (↑σ₀ : ℂ) ∈ (U \ {1}) := by - refine Set.mem_sdiff_singleton.mpr ?_ - constructor - · exact metric_ball_around_1_is_in_U σ₀_in_ball - · by_contra a - have U : σ₀ = 1 := by exact ofReal_eq_one.mp a - rw [U] at σ₀_gt - linarith - - have bdd := Set.forall_mem_image.mp bound_prop (σ₀_in_U) - simp only [Function.comp_apply, Pi.sub_apply, Pi.neg_apply, Pi.div_apply] at bdd - - calc - _ ≤ ‖ζ' σ₀ / ζ σ₀‖ := by - exact dlog_riemannZeta_bdd_on_vertical_lines_generalized σ₀ σ₀ t (σ₀_gt) (by simp) - _ = ‖- ζ' σ₀ / ζ σ₀‖ := by simp only [Complex.norm_div, norm_neg] - _ = ‖(- ζ' σ₀ / ζ σ₀ - (σ₀ - 1)⁻¹) + (σ₀ - 1)⁻¹‖ := by - simp only [Complex.norm_div, norm_neg, ofReal_inv, ofReal_sub, ofReal_one, sub_add_cancel] - _ ≤ ‖(- ζ' σ₀ / ζ σ₀ - (σ₀ - 1)⁻¹)‖ + ‖(σ₀ - 1)⁻¹‖ := by - have Z := norm_add_le (- ζ' σ₀ / ζ σ₀ - (σ₀ - 1)⁻¹) ((σ₀ - 1)⁻¹) - norm_cast at Z - _ ≤ const + ‖(σ₀ - 1)⁻¹‖ := by - have U := add_le_add_left bdd ‖(σ₀ - 1)⁻¹‖ - ring_nf at U - ring_nf - norm_cast at U - norm_cast - _ ≤ const + (σ₀ - 1)⁻¹ := by - simp [norm_inv] - have pos : 0 ≤ σ₀ - 1 := by - linarith - simp [abs_of_nonneg pos] - _ = (σ₀ - 1)⁻¹ + const := by - rw [add_comm] - _ ≤ (σ₀ - 1)⁻¹ + final_const := by - simp [const_le_final_const] - - · have boundary_in_ball : (↑boundary : ℂ) ∈ metric_ball_around_1 := by - unfold metric_ball_around_1 - unfold Metric.eball - simp only [mem_setOf_eq] - rw [edist_dist, dist_eq_norm] - norm_cast - have U : 0 ≤ boundary - 1 := by linarith - simp only [Real.norm_of_nonneg U, gt_iff_lt] - simp only [ENNReal.ofReal_lt_iff_lt_toReal U O1] - calc - _ = ENNReal.toReal (1 + ε_div_two) - 1 := rfl - _ = ENNReal.toReal (1 + ε_div_two) - ENNReal.toReal (ENNReal.ofReal 1) := by simp - _ ≤ ENNReal.toReal (1 + ε_div_two - ENNReal.ofReal 1) := ENNReal.le_toReal_sub U4 - _ = ENNReal.toReal (ε_div_two) := by - simp only [ENNReal.ofReal_one, ENNReal.addLECancellable_iff_ne, ne_eq, - ENNReal.one_ne_top, not_false_eq_true, AddLECancellable.add_tsub_cancel_left] - _ < ε.toReal := Z0 - - have boundary_in_U : (↑boundary : ℂ) ∈ U \ {1} := by - refine Set.mem_sdiff_singleton.mpr ?_ - constructor - · exact metric_ball_around_1_is_in_U boundary_in_ball - · by_contra a - norm_cast at a - norm_cast at boundary_geq_one - simp [←a] at boundary_geq_one - - have bdd := Set.forall_mem_image.mp bound_prop (boundary_in_U) - - calc - _ ≤ ‖ζ' boundary / ζ boundary‖ := by - exact dlog_riemannZeta_bdd_on_vertical_lines_generalized boundary σ₀ t - (boundary_geq_one) (by linarith) - _ = ‖- ζ' boundary / ζ boundary‖ := by simp only [Complex.norm_div, norm_neg] - _ = ‖(- ζ' boundary / ζ boundary - (boundary - 1)⁻¹) + (boundary - 1)⁻¹‖ := by - simp only [Complex.norm_div, norm_neg, ofReal_inv, ofReal_sub, ofReal_one, sub_add_cancel] - _ ≤ ‖(- ζ' boundary / ζ boundary - (boundary - 1)⁻¹)‖ + ‖(boundary - 1)⁻¹‖ := by - have Z := norm_add_le (- ζ' boundary / ζ boundary - (boundary - 1)⁻¹) ((boundary - 1)⁻¹) - norm_cast at Z - _ ≤ const + ‖(boundary - 1)⁻¹‖ := by - have U9 := add_le_add_left bdd ‖(boundary - 1)⁻¹‖ - ring_nf at U9 - ring_nf - norm_cast at U9 - norm_cast - simpa [*] using! U9 - _ ≤ const + (boundary - 1)⁻¹ := by - simp [norm_inv] - have pos : 0 ≤ boundary - 1 := by - linarith - simp [abs_of_nonneg pos] - _ = (boundary - 1)⁻¹ + const := by - rw [add_comm] - _ = final_const := by rfl - _ ≤ _ := by bound - -lemma LogDerivZetaBndUnif : - ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|) - (_ : σ ∈ Ici (1 - A / Real.log |t| ^ 9)), ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤ - C * Real.log |t| ^ 9 := by - let ⟨A, pf_A, C, C_pos, ζbd_in⟩ := LogDerivZetaBnd - let ⟨C_triv, ⟨pf_C_triv, ζbd_out⟩⟩ := triv_bound_zeta - have T0 : A > 0 := pf_A.1 - - have ha : 1 ≤ A⁻¹ := by - simp only [one_div, mem_Ioc, true_and, T0] at pf_A - have U := (inv_le_inv₀ (by positivity) (by positivity)).mpr pf_A - simp only [inv_inv] at U - linarith - - refine ⟨A, pf_A, ((1 + C + C_triv) * A⁻¹), (by positivity), fun σ t hyp_t hyp_σ ↦ ?_⟩ - have logt_gt' : (1 : ℝ) < Real.log |t| ^ 9 := by - calc - 1 < Real.log |t| := logt_gt_one hyp_t.le - _ ≤ (Real.log |t|) ^ 9 := ZetaInvBnd_aux (logt_gt_one hyp_t.le) - - have logt_gt'' : (1 : ℝ) < 1 + A / Real.log |t| ^ 9 := by - simp only [lt_add_iff_pos_right, div_pos_iff_of_pos_left, T0] - positivity - - have T1 : ∀⦃σ : ℝ⦄, 1 + A / Real.log |t| ^ 9 ≤ σ → 1 < σ := by - intros - linarith - - have T2 : ∀⦃σ : ℝ⦄, 1 + A / Real.log |t| ^ 9 ≤ σ → A / Real.log |t| ^ 9 ≤ σ - 1 := by - intro σ' hyp_σ' - calc - A / Real.log |t| ^ 9 = (1 + A / Real.log |t| ^ 9) - 1 := by ring_nf - _ ≤ σ' - 1 := by gcongr - - by_cases h : σ ∈ Ico (1 - A / Real.log |t| ^ 9) (1 + A / Real.log |t| ^ 9) - · calc - ‖ζ' (↑σ + ↑t * I) / ζ (↑σ + ↑t * I)‖ ≤ C * Real.log |t| ^ 9 := ζbd_in σ t hyp_t h - _ ≤ ((1 + C + C_triv) * A⁻¹) * Real.log |t| ^ 9 := by - gcongr - · calc - C ≤ 1 + C := by simp only [le_add_iff_nonneg_left, zero_le_one] - _ ≤ (1 + C + C_triv) * 1 := by simp only [mul_one, le_add_iff_nonneg_right]; positivity - _ ≤ (1 + C + C_triv) * A⁻¹ := by gcongr - - · simp only [mem_Ico, tsub_le_iff_right, not_and, not_lt, mem_Ici] at h hyp_σ - replace h := h hyp_σ - calc - ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ = ‖-ζ' (σ + t * I) / ζ (σ + t * I)‖ := by simp only [Complex.norm_div, - norm_neg] - - _ ≤ (σ - 1)⁻¹ + C_triv := ζbd_out σ t (by exact T1 h) - - _ ≤ (A / Real.log |t| ^ 9)⁻¹ + C_triv := by - gcongr - · exact T2 h - - _ ≤ (A / Real.log |t| ^ 9)⁻¹ + C_triv * A⁻¹ := by - gcongr - exact le_mul_of_one_le_right pf_C_triv ha - - _ ≤ (1 + C_triv) * A⁻¹ * Real.log |t| ^ 9 := by - simp only [inv_div] - ring_nf - gcongr - · simp only [inv_pos, le_mul_iff_one_le_left, T0] - linarith + have hsum₀ := ArithmeticFunction.LSeriesSummable_vonMangoldt hs₀1 + have hsum₁ : Summable (fun i ↦ ‖LSeries.term (fun n ↦ ↑(Λ n)) s₁ i‖) := + summable_norm_iff.mpr (ArithmeticFunction.LSeriesSummable_vonMangoldt hs₁1) + have hnn : ∀ n, 0 ≤ LSeries.term (fun n ↦ ↑(Λ n)) σ₀ n := fun n ↦ + LSeries.term_nonneg (Complex.zero_le_real.mpr ArithmeticFunction.vonMangoldt_nonneg) σ₀ + refine (norm_tsum_le_tsum_norm hsum₁).trans ?_ + rw [← re_eq_norm.mpr (tsum_nonneg hnn), re_tsum hsum₀] + exact hsum₁.tsum_mono (Complex.reCLM.summable hsum₀) fun n ↦ + (LSeries.norm_term_le_of_re_le_re (s := σ₀) _ (by simpa [hs₁] using σ₀_lt_σ₁) n).trans_eq + (re_eq_norm.mpr (hnn n)).symm - _ ≤ (1 + C + C_triv) * A⁻¹ * Real.log |t| ^ 9 := by gcongr; simp only [le_add_iff_nonneg_right]; positivity diff --git a/zeta23/Zeta23/FromPNTPlus/ZetaConj.lean b/zeta23/Zeta23/FromPNTPlus/ZetaConj.lean index 668254545f..1552f16fa6 100644 --- a/zeta23/Zeta23/FromPNTPlus/ZetaConj.lean +++ b/zeta23/Zeta23/FromPNTPlus/ZetaConj.lean @@ -11,8 +11,6 @@ v4.29.0 port (commit 10e1218932db7e2432aa5881d750acb819e91f19) when the project moved to Lean v4.32.2 / Mathlib 905b95818eb32af7874a58b427f50c1711a5e96c. Modified 2026 by Anthropic PBC. -/ -import Mathlib.Analysis.Calculus.Deriv.Star -import Mathlib.Analysis.Normed.Module.Connected import Mathlib.NumberTheory.Harmonic.ZetaAsymp open scoped Complex ComplexConjugate diff --git a/zeta23/Zeta23/GammaFacts.lean b/zeta23/Zeta23/GammaFacts.lean index 893f83b41d..7040482432 100644 --- a/zeta23/Zeta23/GammaFacts.lean +++ b/zeta23/Zeta23/GammaFacts.lean @@ -56,15 +56,30 @@ theorem digamma_conj (z : ℂ) : simp only [Complex.digamma_def, logDeriv_apply] rw [hd, Complex.Gamma_conj, ← map_div₀] +/-- Vertical-line digamma density `μ_{a,c₀}(τ) := (1/2π) Re ψ(a + i·τ/2) + c₀`. +Covers both `Zeta23.mu` (`a = 1/4, c₀ = -log π / (2π)`) and `ThmE.muq κ q` +(`a = 1/4 + κ/2, c₀ = (1/2π) log(q/π)`). -/ +noncomputable def muLine (a c₀ : ℝ) (τ : ℝ) : ℝ := + (1 / (2 * Real.pi)) * (Complex.digamma ((a : ℂ) + Complex.I * ((τ / 2 : ℝ) : ℂ))).re + c₀ + +/-- `Zeta23.mu` as a `muLine`. -/ +lemma mu_eq_muLine : mu = muLine (1 / 4) (-(Real.log Real.pi / (2 * Real.pi))) := by + funext τ; unfold mu muLine + have harg : (1 / 4 + Complex.I * (τ : ℂ) / 2 : ℂ) + = ((1 / 4 : ℝ) : ℂ) + Complex.I * ((τ / 2 : ℝ) : ℂ) := by push_cast; ring + rw [harg]; ring + +/-- `muLine a c₀` is even for any real `a, c₀`. -/ +theorem muLine_even (a c₀ τ : ℝ) : muLine a c₀ (-τ) = muLine a c₀ τ := by + unfold muLine + have harg : ((a : ℂ) + Complex.I * (((-τ) / 2 : ℝ) : ℂ)) + = (starRingEnd ℂ) ((a : ℂ) + Complex.I * ((τ / 2 : ℝ) : ℂ)) := by + apply Complex.ext <;> simp [map_ofNat, neg_div] + rw [harg, digamma_conj]; simp + /-- [eq:mufacts], "μ is even": μ(−τ) = μ(τ). -/ theorem mu_even (τ : ℝ) : mu (-τ) = mu τ := by - unfold mu - have harg : (1 / 4 + Complex.I * ((-τ : ℝ) : ℂ) / 2 : ℂ) - = (starRingEnd ℂ) (1 / 4 + Complex.I * (τ : ℂ) / 2) := by - apply Complex.ext <;> simp [map_ofNat] - rw [show ((-τ : ℝ) : ℂ) = -(τ : ℂ) by push_cast; ring] at harg ⊢ - rw [harg, digamma_conj] - simp + rw [mu_eq_muLine]; exact muLine_even _ _ τ /-- The open right half-plane where Γ is holomorphic and nonvanishing. -/ private lemma gamma_ne_neg_nat {z : ℂ} (hz : 0 < z.re) : ∀ m : ℕ, z ≠ -m := by @@ -73,7 +88,8 @@ private lemma gamma_ne_neg_nat {z : ℂ} (hz : 0 < z.re) : ∀ m : ℕ, z ≠ -m simp only [Complex.neg_re, Complex.natCast_re] at hz exact (not_lt.mpr (neg_nonpos.mpr (Nat.cast_nonneg m))) hz -private lemma analyticAt_digamma {z : ℂ} (hz : 0 < z.re) : +/-- ψ is analytic on the right half-plane. -/ +theorem analyticAt_digamma {z : ℂ} (hz : 0 < z.re) : AnalyticAt ℂ Complex.digamma z := by have hU : IsOpen {w : ℂ | 0 < w.re} := isOpen_lt continuous_const Complex.continuous_re have hGamD : DifferentiableOn ℂ Complex.Gamma {w : ℂ | 0 < w.re} := fun w hw => @@ -92,30 +108,33 @@ private lemma analyticAt_digamma {z : ℂ} (hz : 0 < z.re) : -- IsScalarTower ℝ ℂ ℂ (cf. Analysis/CStarAlgebra/ContinuousFunctionalCalculus/ -- RealImaginaryPart.lean, "fails to find IsScalarTower ℝ ℂ A"). set_option backward.isDefEq.respectTransparency false in -/-- [eq:mufacts], "μ is smooth": μ ∈ C^∞(ℝ). -/ -theorem mu_smooth : ContDiff ℝ ∞ mu := by - have hc : ContDiff ℝ ∞ (fun τ : ℝ => (1 / 4 + Complex.I * (τ : ℂ) / 2 : ℂ)) := by - have h1 : ContDiff ℝ ∞ (fun τ : ℝ => (τ : ℂ)) := Complex.ofRealCLM.contDiff - have h2 : ContDiff ℝ ∞ (fun τ : ℝ => Complex.I * (τ : ℂ)) := contDiff_const.mul h1 - have h3 : ContDiff ℝ ∞ (fun τ : ℝ => Complex.I * (τ : ℂ) / 2) := by +/-- `muLine a c₀` is smooth (in fact real-analytic, `ContDiff ℝ ⊤`) on `ℝ` for any `a > 0`. -/ +theorem muLine_smooth {a : ℝ} (ha : 0 < a) (c₀ : ℝ) : ContDiff ℝ ⊤ (muLine a c₀) := by + have hfun : muLine a c₀ = fun τ : ℝ => (1 / (2 * Real.pi)) + * (Complex.digamma ((a : ℂ) + Complex.I * (τ : ℂ) / 2)).re + c₀ := by + funext τ; unfold muLine + have harg : ((a : ℂ) + Complex.I * ((τ / 2 : ℝ) : ℂ)) = (a : ℂ) + Complex.I * (τ : ℂ) / 2 := by + push_cast; ring + rw [harg] + rw [hfun] + have hc : ContDiff ℝ ⊤ (fun τ : ℝ => ((a : ℂ) + Complex.I * (τ : ℂ) / 2 : ℂ)) := by + have h1 : ContDiff ℝ ⊤ (fun τ : ℝ => (τ : ℂ)) := Complex.ofRealCLM.contDiff + have h2 : ContDiff ℝ ⊤ (fun τ : ℝ => Complex.I * (τ : ℂ)) := contDiff_const.mul h1 + have h3 : ContDiff ℝ ⊤ (fun τ : ℝ => Complex.I * (τ : ℂ) / 2) := by simpa [div_eq_mul_inv] using h2.mul contDiff_const exact contDiff_const.add h3 refine contDiff_iff_contDiffAt.mpr fun τ => ?_ - have hz : (0 : ℝ) < (1 / 4 + Complex.I * (τ : ℂ) / 2 : ℂ).re := by - simp - have h4' : AnalyticAt ℝ Complex.digamma (1 / 4 + Complex.I * (τ : ℂ) / 2) := - AnalyticAt.restrictScalars (analyticAt_digamma hz) - have h4 : ContDiffAt ℝ ∞ Complex.digamma (1 / 4 + Complex.I * (τ : ℂ) / 2) := - h4'.contDiffAt - have h5 : ContDiffAt ℝ ∞ - (fun τ : ℝ => Complex.digamma (1 / 4 + Complex.I * (τ : ℂ) / 2)) τ := + have hz : (0 : ℝ) < ((a : ℂ) + Complex.I * (τ : ℂ) / 2 : ℂ).re := by simp [ha] + have h4 : ContDiffAt ℝ ⊤ Complex.digamma ((a : ℂ) + Complex.I * (τ : ℂ) / 2) := + (AnalyticAt.restrictScalars (analyticAt_digamma hz)).contDiffAt + have h5 : ContDiffAt ℝ ⊤ (fun τ : ℝ => Complex.digamma ((a : ℂ) + Complex.I * (τ : ℂ) / 2)) τ := h4.comp τ hc.contDiffAt - have h6 : ContDiffAt ℝ ∞ - (fun τ : ℝ => (Complex.digamma (1 / 4 + Complex.I * (τ : ℂ) / 2)).re) τ := + have h6 : ContDiffAt ℝ ⊤ (fun τ : ℝ => (Complex.digamma ((a : ℂ) + Complex.I * (τ : ℂ) / 2)).re) τ := (Complex.reCLM.contDiff.contDiffAt).comp τ h5 - have h7 : ContDiffAt ℝ ∞ mu τ := by - have := (contDiffAt_const (c := (1 / (2 * Real.pi) : ℝ))).mul h6 - exact (this.sub contDiffAt_const) - exact h7 + exact ((contDiffAt_const (c := (1 / (2 * Real.pi) : ℝ))).mul h6).add contDiffAt_const + +/-- [eq:mufacts], "μ is smooth": μ ∈ C^∞(ℝ). -/ +theorem mu_smooth : ContDiff ℝ ∞ mu := by + rw [mu_eq_muLine]; exact (muLine_smooth (by norm_num) _).of_le le_top end Zeta23 diff --git a/zeta23/Zeta23/GammaFacts/Complete.lean b/zeta23/Zeta23/GammaFacts/Complete.lean index d4916d3b64..3b6b577b1c 100644 --- a/zeta23/Zeta23/GammaFacts/Complete.lean +++ b/zeta23/Zeta23/GammaFacts/Complete.lean @@ -12,8 +12,6 @@ partial-fraction series), stirling (Zeta23/GammaFacts/StirlingVert.lean, C = 20/ int_mu/int_mu_sq (Zeta23/GammaFacts/IntMu.lean, from stirling + FTC). -/ import Zeta23.Hypotheses -import Zeta23.GammaFacts -import Zeta23.GammaFacts.Mu import Zeta23.GammaFacts.IntMu import Zeta23.GammaFacts.StirlingVert diff --git a/zeta23/Zeta23/GammaFacts/IntMu.lean b/zeta23/Zeta23/GammaFacts/IntMu.lean index 4e74f60e72..6b3df9af2c 100644 --- a/zeta23/Zeta23/GammaFacts/IntMu.lean +++ b/zeta23/Zeta23/GammaFacts/IntMu.lean @@ -24,501 +24,309 @@ GammaFacts.stirling). -/ def StirlingHyp : Prop := ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |Zeta23.mu τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2 -/-- FTC anchor: ∫_T^{2T} (1/2π)·log(τ/2π) dτ = T·ℓ₁/(2π) for T > 0. -/ -lemma integral_main_eq {T : ℝ} (hT : 0 < T) : - ∫ τ in T..(2 * T), (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi)) - = T * ell1 T / (2 * Real.pi) := by +/-- Shared FTC helper for `∫_T^{2T} f(log(τ/(2π))) dτ` via antiderivative `x * F(log(x/(2π)))` +when `F + F' = f`. -/ +private lemma integral_comp_log_div_two_pi {T : ℝ} (hT : 0 < T) + (F F' f : ℝ → ℝ) (hF : ∀ u, HasDerivAt F (F' u) u) (hFf : ∀ u, F u + F' u = f u) + (hf : Continuous f) : + ∫ τ in T..(2 * T), f (Real.log (τ / (2 * Real.pi))) + = 2 * T * F (Real.log 2 + Real.log (T / (2 * Real.pi))) + - T * F (Real.log (T / (2 * Real.pi))) := by have hπ : (0 : ℝ) < Real.pi := Real.pi_pos have hftc : ∀ τ ∈ Set.uIcc T (2 * T), - HasDerivAt (fun x : ℝ => (1 / (2 * Real.pi)) * (x * Real.log (x / (2 * Real.pi)) - x)) - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) τ := by + HasDerivAt (fun x : ℝ => x * F (Real.log (x / (2 * Real.pi)))) + (f (Real.log (τ / (2 * Real.pi)))) τ := by intro τ hτ rw [Set.uIcc_of_le (by linarith)] at hτ have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT hτ.1 - have h1 : HasDerivAt (fun x : ℝ => x / (2 * Real.pi)) (1 / (2 * Real.pi)) τ := - (hasDerivAt_id τ).div_const _ - have h2 : HasDerivAt (fun x : ℝ => Real.log (x / (2 * Real.pi))) - (1 / (2 * Real.pi) / (τ / (2 * Real.pi))) τ := by + have hlog : HasDerivAt (fun x : ℝ => Real.log (x / (2 * Real.pi))) (1 / τ) τ := by + have h1 : HasDerivAt (fun x : ℝ => x / (2 * Real.pi)) (1 / (2 * Real.pi)) τ := + (hasDerivAt_id τ).div_const _ have h3 := (Real.hasDerivAt_log (by positivity : τ / (2 * Real.pi) ≠ 0)).comp τ h1 - have heq : 1 / (2 * Real.pi) / (τ / (2 * Real.pi)) - = (τ / (2 * Real.pi))⁻¹ * (1 / (2 * Real.pi)) := by ring + have heq : 1 / τ = (τ / (2 * Real.pi))⁻¹ * (1 / (2 * Real.pi)) := by + rw [inv_div] + field_simp rw [heq] exact h3 - have h4 : HasDerivAt (fun x : ℝ => x * Real.log (x / (2 * Real.pi))) - (Real.log (τ / (2 * Real.pi)) + τ * (1 / (2 * Real.pi) / (τ / (2 * Real.pi)))) τ := by - have h4a := (hasDerivAt_id τ).mul h2 - have heq : Real.log (τ / (2 * Real.pi)) + τ * (1 / (2 * Real.pi) / (τ / (2 * Real.pi))) - = 1 * Real.log (τ / (2 * Real.pi)) - + τ * (1 / (2 * Real.pi) / (τ / (2 * Real.pi))) := by ring - rw [heq] - exact h4a - have h5 := (h4.sub (hasDerivAt_id τ)).const_mul (1 / (2 * Real.pi)) + have hcomp := (hF (Real.log (τ / (2 * Real.pi)))).comp τ hlog + have hmul := (hasDerivAt_id τ).mul hcomp have hτne : τ ≠ 0 := hτ0.ne' - have heq : (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi)) - = 1 / (2 * Real.pi) * (Real.log (τ / (2 * Real.pi)) - + τ * (1 / (2 * Real.pi) / (τ / (2 * Real.pi))) - 1) := by - have hmul : τ * (1 / (2 * Real.pi) / (τ / (2 * Real.pi))) = 1 := by - field_simp - rw [hmul] - ring + have heq : f (Real.log (τ / (2 * Real.pi))) + = 1 * F (Real.log (τ / (2 * Real.pi))) + + τ * (F' (Real.log (τ / (2 * Real.pi))) * (1 / τ)) := by + rw [← hFf (Real.log (τ / (2 * Real.pi)))] + field_simp rw [heq] - exact h5 + exact hmul have hcont : IntervalIntegrable - (fun τ : ℝ => (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) volume T (2 * T) := by + (fun τ : ℝ => f (Real.log (τ / (2 * Real.pi)))) volume T (2 * T) := by apply ContinuousOn.intervalIntegrable rw [Set.uIcc_of_le (by linarith)] - refine ContinuousOn.mul continuousOn_const ?_ intro τ hτ have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT hτ.1 - exact ((Real.continuousAt_log (by positivity)).comp - (continuousAt_id.div_const _)).continuousWithinAt + exact (hf.continuousAt.comp + ((Real.continuousAt_log (by positivity)).comp + (continuousAt_id.div_const _))).continuousWithinAt rw [integral_eq_sub_of_hasDerivAt hftc hcont] have h2T : Real.log (2 * T / (2 * Real.pi)) = Real.log 2 + Real.log (T / (2 * Real.pi)) := by rw [show 2 * T / (2 * Real.pi) = 2 * (T / (2 * Real.pi)) by ring, Real.log_mul (by norm_num) (by positivity)] rw [h2T] + +/-- FTC anchor: ∫_T^{2T} (1/2π)·log(τ/2π) dτ = T·ℓ₁/(2π) for T > 0. -/ +lemma integral_main_eq {T : ℝ} (hT : 0 < T) : + ∫ τ in T..(2 * T), (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi)) + = T * ell1 T / (2 * Real.pi) := by + rw [intervalIntegral.integral_const_mul, + integral_comp_log_div_two_pi hT (fun u => u - 1) (fun _ => 1) (fun u => u) + (fun u => (hasDerivAt_id u).sub_const 1) (fun u => by ring) continuous_id] unfold ell1 l field_simp ring -/-- **[eq:muints].1 given Stirling**: ∫_T^{2T} μ = Tℓ₁/(2π) + O(1/T). -/ -theorem int_mu_of_stirling (hst : StirlingHyp) : - ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - |(∫ τ in T..(2 * T), Zeta23.mu τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T := by - obtain ⟨C, hC⟩ := hst - have hC0 : 0 ≤ C := by - have h := hC 1 (by norm_num) - have := abs_nonneg (Zeta23.mu 1 - 1 / (2 * Real.pi) * Real.log (|1| / (2 * Real.pi))) - nlinarith - have hμcont : Continuous Zeta23.mu := Zeta23.mu_smooth.continuous - refine ⟨C, 1, fun T hT => ?_⟩ +/-! ## Shared dyadic integral helpers -/ + +private lemma stirling_const_nonneg {g : ℝ → ℝ} {C : ℝ} + (hC : ∀ τ : ℝ, 1 ≤ |τ| → + |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) : + 0 ≤ C := by + have h := hC 1 (by norm_num) + linarith [abs_nonneg (g 1 - 1 / (2 * Real.pi) * Real.log (|1| / (2 * Real.pi)))] + +private lemma intervalIntegrable_log_div_two_pi_pow {T : ℝ} (hT : 0 < T) (k : ℕ) : + IntervalIntegrable + (fun τ : ℝ => ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ k) + volume T (2 * T) := by + apply ContinuousOn.intervalIntegrable + rw [Set.uIcc_of_le (by linarith)] + intro τ hτ + have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT hτ.1 + exact ((continuousAt_const.mul ((Real.continuousAt_log (by positivity)).comp + (continuousAt_id.div_const _))).pow k).continuousWithinAt + +private lemma intervalIntegrable_div_sq {T : ℝ} (hT : 0 < T) (K : ℝ) : + IntervalIntegrable (fun τ : ℝ => K / τ ^ 2) volume T (2 * T) := by + apply ContinuousOn.intervalIntegrable + rw [Set.uIcc_of_le (by linarith)] + intro τ hτ + have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT hτ.1 + exact (continuousAt_const.div (continuousAt_pow _ _) (by positivity)).continuousWithinAt + +private lemma integral_inv_sq_dyadic {T : ℝ} (hT : 0 < T) (K : ℝ) : + ∫ τ in T..(2 * T), K / τ ^ 2 = K / (2 * T) := by + have hftc : ∀ τ ∈ Set.uIcc T (2 * T), HasDerivAt (fun x : ℝ => -K / x) (K / τ ^ 2) τ := by + intro τ hτ + rw [Set.uIcc_of_le (by linarith)] at hτ + have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT hτ.1 + have h1 := ((hasDerivAt_id τ).inv hτ0.ne').const_mul (-K) + simpa [div_eq_mul_inv, mul_neg, neg_neg] using h1 + rw [integral_eq_sub_of_hasDerivAt hftc (intervalIntegrable_div_sq hT K)] + field_simp; ring + +private lemma dyadic_err_integral_le {T : ℝ} (hT : 0 < T) {f : ℝ → ℝ} + (hf : IntervalIntegrable f volume T (2 * T)) {K : ℝ} + (hbound : ∀ τ ∈ Set.Icc T (2 * T), |f τ| ≤ K / τ ^ 2) : + |∫ τ in T..(2 * T), f τ| ≤ K / (2 * T) := + calc |∫ τ in T..(2 * T), f τ| + ≤ ∫ τ in T..(2 * T), |f τ| := intervalIntegral.abs_integral_le_integral_abs (by linarith) + _ ≤ ∫ τ in T..(2 * T), K / τ ^ 2 := + intervalIntegral.integral_mono_on (by linarith) hf.abs (intervalIntegrable_div_sq hT K) hbound + _ = K / (2 * T) := integral_inv_sq_dyadic hT K + +/-! ## Generic continuous g with Stirling error -/ + +section Generic + +variable {g : ℝ → ℝ} + +/-- Explicit-constant form of `int_g_of_stirling` (constants depend only on the Stirling constant C). -/ +theorem int_g_explicit (hcont : Continuous g) {C : ℝ} + (hC : ∀ τ : ℝ, 1 ≤ |τ| → + |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) + {T : ℝ} (hT : 1 ≤ T) : + |(∫ τ in T..(2 * T), g τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T := by + have hC0 : 0 ≤ C := stirling_const_nonneg hC have hT0 : (0 : ℝ) < T := by linarith - -- split μ = main + error on [T, 2T] - have hint_mu : IntervalIntegrable Zeta23.mu volume T (2 * T) := - hμcont.intervalIntegrable _ _ + have hint_mu : IntervalIntegrable g volume T (2 * T) := hcont.intervalIntegrable _ _ have hint_main : IntervalIntegrable (fun τ : ℝ => (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - refine ContinuousOn.mul continuousOn_const ?_ - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact ((Real.continuousAt_log (by positivity)).comp - (continuousAt_id.div_const _)).continuousWithinAt - have hsplit : (∫ τ in T..(2 * T), Zeta23.mu τ) - = (∫ τ in T..(2 * T), (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) - + ∫ τ in T..(2 * T), - (Zeta23.mu τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) := by - rw [← intervalIntegral.integral_add hint_main (hint_mu.sub hint_main)] - congr 1 - funext τ - ring - rw [hsplit, integral_main_eq hT0] - rw [add_sub_cancel_left] - -- bound the error integral - have herr_int : IntervalIntegrable - (fun τ : ℝ => Zeta23.mu τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) - volume T (2 * T) := hint_mu.sub hint_main - have hbound : ∀ τ ∈ Set.Icc T (2 * T), - |Zeta23.mu τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| ≤ C / τ ^ 2 := by - intro τ hτ - have hτ1 : (1 : ℝ) ≤ τ := le_trans hT hτ.1 - have habs : |τ| = τ := abs_of_pos (by linarith) - have h := hC τ (by rwa [habs]) - rwa [habs] at h - have hCtau : IntervalIntegrable (fun τ : ℝ => C / τ ^ 2) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact (continuousAt_const.div (continuousAt_pow _ _) (by positivity)).continuousWithinAt - have hCint : ∫ τ in T..(2 * T), C / τ ^ 2 = C / (2 * T) := by - have hftc2 : ∀ τ ∈ Set.uIcc T (2 * T), - HasDerivAt (fun x : ℝ => -C / x) (C / τ ^ 2) τ := by - intro τ hτ - rw [Set.uIcc_of_le (by linarith)] at hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - have hinv : HasDerivAt (fun x : ℝ => x⁻¹) (-1 / τ ^ 2) τ := (hasDerivAt_id τ).inv hτ0.ne' - have h1 := hinv.const_mul (-C) - have h3 : (fun x : ℝ => -C * x⁻¹) = fun x : ℝ => -C / x := by - funext x - ring - rw [h3] at h1 - have heq : C / τ ^ 2 = -C * (-1 / τ ^ 2) := by ring - rw [heq] - exact h1 - rw [integral_eq_sub_of_hasDerivAt hftc2 hCtau] - field_simp - ring - calc |∫ τ in T..(2 * T), - (Zeta23.mu τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi)))| - ≤ ∫ τ in T..(2 * T), - |Zeta23.mu τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| := - intervalIntegral.abs_integral_le_integral_abs (by linarith) - _ ≤ ∫ τ in T..(2 * T), C / τ ^ 2 := by - refine intervalIntegral.integral_mono_on (by linarith) herr_int.abs hCtau ?_ - intro τ hτ - exact hbound τ hτ - _ = C / (2 * T) := hCint - _ ≤ C / T := by - have h2 : (0 : ℝ) < 2 * T := by linarith - rw [div_le_div_iff₀ h2 hT0] - nlinarith + simpa only [pow_one] using intervalIntegrable_log_div_two_pi_pow hT0 1 + have hsplit : (∫ τ in T..(2 * T), g τ) - T * ell1 T / (2 * Real.pi) + = ∫ τ in T..(2 * T), (g τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) := by + rw [← integral_main_eq hT0, ← intervalIntegral.integral_sub hint_mu hint_main] + rw [hsplit] + refine (dyadic_err_integral_le hT0 (hint_mu.sub hint_main) (K := C) fun τ hτ => ?_).trans ?_ + · have habs : |τ| = τ := abs_of_pos (by linarith [hτ.1]) + simpa [habs] using hC τ (by rw [habs]; linarith [hτ.1]) + · exact div_le_div_of_nonneg_left hC0 hT0 (by linarith) + + +/-- **[eq:muints].1 given Stirling**: ∫_T^{2T} g = Tℓ₁/(2π) + O(1/T) (∃-form, from `int_g_explicit`). -/ +theorem int_g_of_stirling (hcont : Continuous g) + (hst : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → + |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) : + ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → + |(∫ τ in T..(2 * T), g τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T := by + obtain ⟨C, hC⟩ := hst + exact ⟨C, 1, fun T hT => int_g_explicit hcont hC hT⟩ + +end Generic + +/-- **[eq:muints].1 given Stirling**: ∫_T^{2T} μ = Tℓ₁/(2π) + O(1/T). -/ +theorem int_mu_of_stirling (hst : StirlingHyp) : + ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → + |(∫ τ in T..(2 * T), Zeta23.mu τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T := + int_g_of_stirling Zeta23.mu_smooth.continuous hst /-- FTC anchor: ∫_T^{2T} log²(τ/2π) dτ = T(ℓ₁² + 1 − 2log²2) for T > 0. -/ lemma integral_main_sq_eq {T : ℝ} (hT : 0 < T) : ∫ τ in T..(2 * T), Real.log (τ / (2 * Real.pi)) ^ 2 = T * (ell1 T ^ 2 + 1 - 2 * Real.log 2 ^ 2) := by - have hπ : (0 : ℝ) < Real.pi := Real.pi_pos - have hftc : ∀ τ ∈ Set.uIcc T (2 * T), - HasDerivAt (fun x : ℝ => - x * (Real.log (x / (2 * Real.pi)) ^ 2 - 2 * Real.log (x / (2 * Real.pi)) + 2)) - (Real.log (τ / (2 * Real.pi)) ^ 2) τ := by - intro τ hτ - rw [Set.uIcc_of_le (by linarith)] at hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT hτ.1 - have h1 : HasDerivAt (fun x : ℝ => x / (2 * Real.pi)) (1 / (2 * Real.pi)) τ := - (hasDerivAt_id τ).div_const _ - have h2 : HasDerivAt (fun x : ℝ => Real.log (x / (2 * Real.pi))) (1 / τ) τ := by - have h3 := (Real.hasDerivAt_log (by positivity : τ / (2 * Real.pi) ≠ 0)).comp τ h1 - have heq : 1 / τ = (τ / (2 * Real.pi))⁻¹ * (1 / (2 * Real.pi)) := by - rw [inv_div] - field_simp - rw [heq] - exact h3 - have h4 : HasDerivAt (fun x : ℝ => Real.log (x / (2 * Real.pi)) ^ 2) - (2 * Real.log (τ / (2 * Real.pi)) * (1 / τ)) τ := by - have h5 : HasDerivAt (fun x : ℝ => Real.log (x / (2 * Real.pi)) ^ 2) - ((2 : ℕ) * Real.log (τ / (2 * Real.pi)) ^ (2 - 1) * (1 / τ)) τ := h2.pow 2 - convert h5 using 1 - norm_num - have h6 : HasDerivAt (fun x : ℝ => - Real.log (x / (2 * Real.pi)) ^ 2 - 2 * Real.log (x / (2 * Real.pi)) + 2) - (2 * Real.log (τ / (2 * Real.pi)) * (1 / τ) - 2 * (1 / τ)) τ := by - have h7 := (h4.sub (h2.const_mul 2)).add_const 2 - exact h7 - have h8 := (hasDerivAt_id τ).mul h6 - have hτne : τ ≠ 0 := hτ0.ne' - have heq : Real.log (τ / (2 * Real.pi)) ^ 2 - = 1 * (Real.log (τ / (2 * Real.pi)) ^ 2 - 2 * Real.log (τ / (2 * Real.pi)) + 2) - + τ * (2 * Real.log (τ / (2 * Real.pi)) * (1 / τ) - 2 * (1 / τ)) := by - field_simp - ring - rw [heq] - exact h8 - have hcont : IntervalIntegrable - (fun τ : ℝ => Real.log (τ / (2 * Real.pi)) ^ 2) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT hτ.1 - exact (((Real.continuousAt_log (by positivity)).comp - (continuousAt_id.div_const _)).pow 2).continuousWithinAt - rw [integral_eq_sub_of_hasDerivAt hftc hcont] - have h2T : Real.log (2 * T / (2 * Real.pi)) = Real.log 2 + Real.log (T / (2 * Real.pi)) := by - rw [show 2 * T / (2 * Real.pi) = 2 * (T / (2 * Real.pi)) by ring, - Real.log_mul (by norm_num) (by positivity)] - rw [h2T] + rw [integral_comp_log_div_two_pi hT + (fun u => u ^ 2 - 2 * u + 2) (fun u => 2 * u - 2) (fun u => u ^ 2) + (fun u => by + have h := ((hasDerivAt_pow 2 u).sub ((hasDerivAt_id u).const_mul 2)).add_const 2 + simpa [Nat.cast_ofNat] using h) + (fun u => by ring) (continuous_pow 2)] unfold ell1 l ring -set_option maxHeartbeats 1600000 in -/-- **[eq:muints].2 given Stirling**: ∫_T^{2T} μ² = (Tℓ₁²/4π²)(1 + O(l⁻²)). -/ -theorem int_mu_sq_of_stirling (hst : StirlingHyp) : - ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - |(∫ τ in T..(2 * T), Zeta23.mu τ ^ 2) - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ C * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 := by - obtain ⟨C, hC⟩ := hst - have hC0 : 0 ≤ C := by - have h := hC 1 (by norm_num) - have := abs_nonneg (Zeta23.mu 1 - 1 / (2 * Real.pi) * Real.log (|1| / (2 * Real.pi))) - nlinarith +section Generic + +variable {g : ℝ → ℝ} + +/-- Explicit-constant form of `int_g_sq_of_stirling` (constants depend only on the Stirling constant C). -/ +theorem int_g_sq_explicit (hcont : Continuous g) {C : ℝ} + (hC : ∀ τ : ℝ, 1 ≤ |τ| → + |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) + {T : ℝ} (hT : max (2 * Real.pi * Real.exp 4) (32 * Real.pi ^ 2 * (C * (1 + C) + 1)) ≤ T) : + |(∫ τ in T..(2 * T), g τ ^ 2) - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| + ≤ (8 * (1 + 2 * Real.log 2 ^ 2) + 1) * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 := by + have hC0 : 0 ≤ C := stirling_const_nonneg hC have hπ : (0 : ℝ) < Real.pi := Real.pi_pos - have hμcont : Continuous Zeta23.mu := Zeta23.mu_smooth.continuous - set C₂ : ℝ := C * (1 + C) + 1 with hC₂ - have hC₂0 : (0 : ℝ) < C₂ := by nlinarith - refine ⟨8 * (1 + 2 * Real.log 2 ^ 2) + 1, - max (2 * Real.pi * Real.exp 4) (32 * Real.pi ^ 2 * C₂), fun T hT => ?_⟩ - set m : ℝ := Real.log 2 with hm + set C₂ : ℝ := C * (1 + C) + 1 + set m : ℝ := Real.log 2 + set L : ℝ := l T have hm0 : (0 : ℝ) < m := Real.log_pos (by norm_num) - have hm1 : m < 1 := by - rw [hm] - have := Real.log_two_lt_d9 - linarith + have hm1 : m < 1 := by have := Real.log_two_lt_d9; linarith have hT1 : 2 * Real.pi * Real.exp 4 ≤ T := le_trans (le_max_left _ _) hT have hT2 : 32 * Real.pi ^ 2 * C₂ ≤ T := le_trans (le_max_right _ _) hT - have hexp1 : (1 : ℝ) ≤ Real.exp 4 := by - have := Real.add_one_le_exp (4 : ℝ) - linarith + have hexp1 : (1 : ℝ) ≤ Real.exp 4 := by linarith [Real.add_one_le_exp (4 : ℝ)] have hT0 : (0 : ℝ) < T := by nlinarith [Real.exp_pos (4 : ℝ)] - have hL4 : (4 : ℝ) ≤ l T := by - unfold l + have hL4 : (4 : ℝ) ≤ L := by rw [show (4 : ℝ) = Real.log (Real.exp 4) from (Real.log_exp 4).symm] - apply Real.log_le_log (Real.exp_pos 4) - rw [le_div_iff₀ (by positivity)] - linarith - set L : ℝ := l T with hLdef - have hL0 : (0 : ℝ) < L := by linarith + exact Real.log_le_log (Real.exp_pos 4) ((le_div_iff₀ (by positivity)).mpr (by linarith)) have hL_le_T : L ≤ T := by - rw [hLdef] - unfold l have h1 := Real.log_le_sub_one_of_pos (by positivity : (0 : ℝ) < T / (2 * Real.pi)) - have h2 : T / (2 * Real.pi) ≤ T := by - rw [div_le_iff₀ (by positivity)] - have hπ3 : (3 : ℝ) < Real.pi := Real.pi_gt_three - nlinarith - linarith - have hell : ell1 T = L + 2 * m - 1 := by - unfold ell1 - rw [← hLdef, ← hm] - have hell_pos : (0 : ℝ) < ell1 T := by - rw [hell] - nlinarith - have hell_ge : L / 2 ≤ ell1 T := by - rw [hell] - nlinarith + have h2 : T / (2 * Real.pi) ≤ T := (div_le_iff₀ (by positivity)).mpr (by nlinarith [Real.pi_gt_three]) + exact (h1.trans (by linarith)).trans le_rfl have hell2 : L ^ 2 / 4 ≤ ell1 T ^ 2 := by - nlinarith [hell_ge, hL0, hell_pos] - have hmain_bound : ∀ τ ∈ Set.Icc T (2 * T), - |(1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| ≤ (L + m) / (2 * Real.pi) := by - intro τ hτ - have hτT : T ≤ τ := hτ.1 - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτT - have hlog_nonneg : (0 : ℝ) ≤ Real.log (τ / (2 * Real.pi)) := by - apply Real.log_nonneg - rw [le_div_iff₀ (by positivity)] - nlinarith - have hlog_le : Real.log (τ / (2 * Real.pi)) ≤ L + m := by - have h1 : Real.log (τ / (2 * Real.pi)) ≤ Real.log (2 * T / (2 * Real.pi)) := by - apply Real.log_le_log (by positivity) - gcongr - exact hτ.2 - have h2 : Real.log (2 * T / (2 * Real.pi)) = m + L := by - rw [show 2 * T / (2 * Real.pi) = 2 * (T / (2 * Real.pi)) by ring, - Real.log_mul (by norm_num) (by positivity), hm, hLdef] - rfl - linarith - rw [abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ 1 / (2 * Real.pi)), - abs_of_nonneg hlog_nonneg] - rw [one_div, div_eq_mul_inv (L + m), mul_comm (L + m)] - exact mul_le_mul_of_nonneg_left hlog_le (by positivity) - have herr_bound : ∀ τ ∈ Set.Icc T (2 * T), - |Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2| - ≤ C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C) := by - intro τ hτ - have hτT : T ≤ τ := hτ.1 - have hτ1 : (1 : ℝ) ≤ τ := by nlinarith - have habs : |τ| = τ := abs_of_pos (by linarith) - have herr := hC τ (by rwa [habs]) - rw [habs] at herr - have hmb := hmain_bound τ hτ - have hsq : Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2 - = (Zeta23.mu τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) - * (Zeta23.mu τ + (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) := by - ring - rw [hsq, abs_mul] - have hτ2 : (0 : ℝ) < τ ^ 2 := by positivity - have hCτ : C / τ ^ 2 ≤ C := by - rw [div_le_iff₀ hτ2] - have hτsq1 : (1 : ℝ) ≤ τ ^ 2 := by nlinarith - nlinarith - have hsum_bound : |Zeta23.mu τ + (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| - ≤ 2 * ((L + m) / (2 * Real.pi)) + C := by - have h4 := abs_sub_abs_le_abs_sub (Zeta23.mu τ) - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) - have h5 : |Zeta23.mu τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| ≤ C := - le_trans herr hCτ - have h3 : |Zeta23.mu τ| ≤ (L + m) / (2 * Real.pi) + C := by linarith - calc |Zeta23.mu τ + (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| - ≤ |Zeta23.mu τ| + |(1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| := - abs_add_le _ _ - _ ≤ 2 * ((L + m) / (2 * Real.pi)) + C := by linarith - exact mul_le_mul herr hsum_bound (abs_nonneg _) (by positivity) - have hint_mu2 : IntervalIntegrable (fun τ : ℝ => Zeta23.mu τ ^ 2) volume T (2 * T) := - (hμcont.pow 2).intervalIntegrable _ _ - have hint_main2 : IntervalIntegrable - (fun τ : ℝ => ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2) - volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact ((continuousAt_const.mul ((Real.continuousAt_log (by positivity)).comp - (continuousAt_id.div_const _))).pow 2).continuousWithinAt - have hCtau2 : IntervalIntegrable - (fun τ : ℝ => C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C)) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ + have : L / 2 ≤ ell1 T := by unfold ell1; linarith + nlinarith + set main : ℝ → ℝ := fun τ => (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi)) + set K : ℝ := C * (2 * ((L + m) / (2 * Real.pi)) + C) + have herrI : |∫ τ in T..(2 * T), (g τ ^ 2 - main τ ^ 2)| ≤ K / (2 * T) := by + refine dyadic_err_integral_le hT0 + (((hcont.pow 2).intervalIntegrable _ _).sub (intervalIntegrable_log_div_two_pi_pow hT0 2)) + fun τ hτ => ?_ have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact ((continuousAt_const.div (continuousAt_pow _ _) (by positivity)).mul - continuousAt_const).continuousWithinAt - have hmain2 : ∫ τ in T..(2 * T), ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2 + have hτ1 : (1 : ℝ) ≤ τ := by nlinarith [hτ.1, Real.pi_gt_three] + have habs : |τ| = τ := abs_of_pos hτ0 + have herr : |g τ - main τ| ≤ C / τ ^ 2 := by simpa [main, habs] using hC τ (by rwa [habs]) + have hmb : |main τ| ≤ (L + m) / (2 * Real.pi) := by + have hlog0 : 0 ≤ Real.log (τ / (2 * Real.pi)) := + Real.log_nonneg ((le_div_iff₀ (by positivity)).mpr (by nlinarith [hτ.1])) + have hlog_le : Real.log (τ / (2 * Real.pi)) ≤ L + m := by + have h1 := Real.log_le_log (by positivity : 0 < τ / (2 * Real.pi)) + (div_le_div_of_nonneg_right hτ.2 (by positivity : (0 : ℝ) ≤ 2 * Real.pi)) + have h2 : Real.log (2 * T / (2 * Real.pi)) = m + L := by + rw [show 2 * T / (2 * Real.pi) = 2 * (T / (2 * Real.pi)) by ring, + Real.log_mul (by norm_num) (by positivity)]; rfl + linarith + rw [abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ 1 / (2 * Real.pi)), + abs_of_nonneg hlog0, one_div_mul_eq_div] + exact div_le_div_of_nonneg_right hlog_le (by positivity) + have hτ2 : (1 : ℝ) ≤ τ ^ 2 := by nlinarith + have hCτ : C / τ ^ 2 ≤ C := (div_le_iff₀ (by positivity)).mpr (by nlinarith) + have hsum : |g τ + main τ| ≤ 2 * ((L + m) / (2 * Real.pi)) + C := by + have h4 := abs_sub_abs_le_abs_sub (g τ) (main τ) + linarith [abs_add_le (g τ) (main τ)] + change |g τ ^ 2 - main τ ^ 2| ≤ K / τ ^ 2 + rw [show g τ ^ 2 - main τ ^ 2 = (g τ - main τ) * (g τ + main τ) by ring, abs_mul, + show K / τ ^ 2 = C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C) by dsimp only [K]; ring] + exact mul_le_mul herr hsum (abs_nonneg _) (by positivity) + have hmain2 : ∫ τ in T..(2 * T), main τ ^ 2 = (1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) := by - rw [show (fun τ : ℝ => ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2) - = fun τ : ℝ => (1 / (4 * Real.pi ^ 2)) * Real.log (τ / (2 * Real.pi)) ^ 2 - from funext fun τ => by field_simp; ring] - rw [intervalIntegral.integral_const_mul, integral_main_sq_eq hT0, hm] - have hsplit : (∫ τ in T..(2 * T), Zeta23.mu τ ^ 2) - = (∫ τ in T..(2 * T), ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2) - + ∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2) := by - rw [← intervalIntegral.integral_add hint_main2 (hint_mu2.sub hint_main2)] - congr 1 - funext τ - ring - have hCint : ∫ τ in T..(2 * T), C / τ ^ 2 = C / (2 * T) := by - have hftc2 : ∀ τ ∈ Set.uIcc T (2 * T), - HasDerivAt (fun x : ℝ => -C / x) (C / τ ^ 2) τ := by - intro τ hτ - rw [Set.uIcc_of_le (by linarith)] at hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - have hinv : HasDerivAt (fun x : ℝ => x⁻¹) (-1 / τ ^ 2) τ := - (hasDerivAt_id τ).inv hτ0.ne' - have h1 := hinv.const_mul (-C) - have h3 : (fun x : ℝ => -C * x⁻¹) = fun x : ℝ => -C / x := by - funext x - ring - rw [h3] at h1 - have heq : C / τ ^ 2 = -C * (-1 / τ ^ 2) := by ring - rw [heq] - exact h1 - have hCtau : IntervalIntegrable (fun τ : ℝ => C / τ ^ 2) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact (continuousAt_const.div (continuousAt_pow _ _) - (by positivity)).continuousWithinAt - rw [integral_eq_sub_of_hasDerivAt hftc2 hCtau] - field_simp - ring - have herrI : |∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| - ≤ (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) := by - have hCint2 : ∫ τ in T..(2 * T), C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C) - = (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) := by - rw [show (fun τ : ℝ => C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C)) - = fun τ : ℝ => (2 * ((L + m) / (2 * Real.pi)) + C) * (C / τ ^ 2) - from funext fun τ => by ring] - rw [intervalIntegral.integral_const_mul, hCint] - ring - calc |∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| - ≤ ∫ τ in T..(2 * T), - |Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2| := - intervalIntegral.abs_integral_le_integral_abs (by linarith) - _ ≤ ∫ τ in T..(2 * T), C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C) := by - refine intervalIntegral.integral_mono_on (by linarith) - (hint_mu2.sub hint_main2).abs hCtau2 ?_ - intro τ hτ - exact herr_bound τ hτ - _ = (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) := hCint2 - rw [hsplit, hmain2] - set X : ℝ := T * ell1 T ^ 2 / (4 * Real.pi ^ 2) / L ^ 2 with hX + rw [show (fun τ : ℝ => main τ ^ 2) = fun τ => (1 / (4 * Real.pi ^ 2)) * Real.log (τ / (2 * Real.pi)) ^ 2 + from funext fun τ => by simp only [main]; ring, + intervalIntegral.integral_const_mul, integral_main_sq_eq hT0] + have hsplit : (∫ τ in T..(2 * T), g τ ^ 2) - T * ell1 T ^ 2 / (4 * Real.pi ^ 2) + = T * (1 - 2 * m ^ 2) / (4 * Real.pi ^ 2) + ∫ τ in T..(2 * T), (g τ ^ 2 - main τ ^ 2) := by + have hsub : ∫ τ in T..(2 * T), (g τ ^ 2 - main τ ^ 2) + = (∫ τ in T..(2 * T), g τ ^ 2) - ∫ τ in T..(2 * T), main τ ^ 2 := + intervalIntegral.integral_sub + ((hcont.pow 2).intervalIntegrable _ _) (intervalIntegrable_log_div_two_pi_pow hT0 2) + have hmain2' : (1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) + = T * ell1 T ^ 2 / (4 * Real.pi ^ 2) + T * (1 - 2 * m ^ 2) / (4 * Real.pi ^ 2) := by ring + linarith [hmain2, hmain2', hsub] + set X : ℝ := T * ell1 T ^ 2 / (4 * Real.pi ^ 2) / L ^ 2 have hX1 : T / (16 * Real.pi ^ 2) ≤ X := by - rw [hX, div_div, div_le_div_iff₀ (by positivity) (by positivity)] - nlinarith [hell2, hT0.le, sq_nonneg L, mul_pos hT0 (mul_pos hπ hπ)] - have hX0 : (0 : ℝ) < X := by - rw [hX] - positivity - have htri : |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - + (∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - + |∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| := by - have h1 := abs_add_le - ((1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) - (∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)) - calc |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - + (∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - = |((1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) - + ∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| := by - congr 1 - ring - _ ≤ _ := h1 - have hmain_dev : |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ 8 * (1 + 2 * m ^ 2) * X := by - have h1 : (1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2) = T * (1 - 2 * m ^ 2) / (4 * Real.pi ^ 2) := by - ring - rw [h1, abs_div, abs_mul, abs_of_pos hT0, - abs_of_pos (by positivity : (0 : ℝ) < 4 * Real.pi ^ 2)] - have habs1 : |1 - 2 * m ^ 2| ≤ 1 + 2 * m ^ 2 := by - rw [abs_le] - constructor <;> nlinarith [sq_nonneg m] + dsimp only [X] + rw [div_div, div_le_div_iff₀ (by positivity) (by positivity)] + nlinarith [hell2, mul_pos hT0 (mul_pos hπ hπ)] + have hX0 : (0 : ℝ) < X := lt_of_lt_of_le (by positivity) hX1 + have hmain_dev : |T * (1 - 2 * m ^ 2) / (4 * Real.pi ^ 2)| ≤ 8 * (1 + 2 * m ^ 2) * X := by + rw [abs_div, abs_mul, abs_of_pos hT0, abs_of_pos (by positivity : (0 : ℝ) < 4 * Real.pi ^ 2)] + have habs1 : |1 - 2 * m ^ 2| ≤ 1 + 2 * m ^ 2 := abs_le.mpr ⟨by nlinarith, by nlinarith⟩ calc T * |1 - 2 * m ^ 2| / (4 * Real.pi ^ 2) ≤ T * (1 + 2 * m ^ 2) / (4 * Real.pi ^ 2) := by gcongr _ = 4 * (1 + 2 * m ^ 2) * (T / (16 * Real.pi ^ 2)) := by ring - _ ≤ 4 * (1 + 2 * m ^ 2) * X := by - gcongr - _ ≤ 8 * (1 + 2 * m ^ 2) * X := by nlinarith [hX0, sq_nonneg m] - have herr_final : (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) ≤ 1 * X := by - have hπ3 : (3 : ℝ) < Real.pi := Real.pi_gt_three + _ ≤ 4 * (1 + 2 * m ^ 2) * X := by gcongr + _ ≤ 8 * (1 + 2 * m ^ 2) * X := by nlinarith + have herr_final : K / (2 * T) ≤ X := by have hb1 : 2 * ((L + m) / (2 * Real.pi)) ≤ L := by - have h2a : (L + m) / (2 * Real.pi) ≤ (L + 1) / (2 * Real.pi) := by - gcongr - have h2b : (L + 1) / (2 * Real.pi) ≤ (L + 1) / 6 := - div_le_div_of_nonneg_left (by linarith) (by norm_num) (by nlinarith) - have h3 : (L + 1) / 6 ≤ L / 2 := by - rw [div_le_div_iff₀ (by norm_num) (by norm_num)] - nlinarith + have : (L + m) / (2 * Real.pi) ≤ (L + 1) / 6 := + (div_le_div_of_nonneg_right (by linarith) (by positivity)).trans + (div_le_div_of_nonneg_left (by linarith) (by norm_num) (by linarith [Real.pi_gt_three])) linarith - have hb2 : 2 * ((L + m) / (2 * Real.pi)) + C ≤ (1 + C) * L := by - have h4 : C ≤ C * L := by nlinarith - nlinarith - have hb3 : (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) ≤ C₂ * L / T := by - have h5 : (0 : ℝ) ≤ 2 * ((L + m) / (2 * Real.pi)) + C := by positivity - have h6 : (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) - ≤ (C / (2 * T)) * ((1 + C) * L) := by - apply mul_le_mul_of_nonneg_left hb2 (by positivity) - calc (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) - ≤ (C / (2 * T)) * ((1 + C) * L) := h6 - _ = (C * (1 + C)) * L / (2 * T) := by ring - _ ≤ C₂ * L / T := by - rw [div_le_div_iff₀ (by linarith) (by linarith)] - have h7 : (0 : ℝ) ≤ C * (1 + C) := by nlinarith - nlinarith [mul_nonneg (mul_nonneg h7 hL0.le) hT0.le, hL0.le, hT0.le] - have hb4 : C₂ * L / T ≤ C₂ := by - rw [div_le_iff₀ hT0] - nlinarith - have hb5 : C₂ ≤ T / (32 * Real.pi ^ 2) := by - rw [le_div_iff₀ (by positivity)] - nlinarith - have hb6 : T / (32 * Real.pi ^ 2) ≤ T / (16 * Real.pi ^ 2) := by - apply div_le_div_of_nonneg_left hT0.le (by positivity) - nlinarith - rw [one_mul] - calc (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) - ≤ C₂ * L / T := hb3 - _ ≤ C₂ := hb4 - _ ≤ T / (32 * Real.pi ^ 2) := hb5 - _ ≤ T / (16 * Real.pi ^ 2) := hb6 - _ ≤ X := hX1 - calc |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - + (∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - + |∫ τ in T..(2 * T), - (Zeta23.mu τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| := htri - _ ≤ 8 * (1 + 2 * m ^ 2) * X + 1 * X := by - have := le_trans herrI herr_final - linarith [hmain_dev] - _ = (8 * (1 + 2 * m ^ 2) + 1) * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / L ^ 2 := by - rw [hX] - ring + have hb2 : 2 * ((L + m) / (2 * Real.pi)) + C ≤ (1 + C) * L := by nlinarith + have hC₂0 : 0 ≤ C₂ := by dsimp only [C₂]; positivity + have hK_le : K ≤ C₂ * L := by + dsimp only [K, C₂] + nlinarith [mul_le_mul_of_nonneg_left hb2 hC0] + have hb3 : K / (2 * T) ≤ C₂ * L / T := + (div_le_div_of_nonneg_right hK_le (by positivity)).trans + (div_le_div_of_nonneg_left (mul_nonneg hC₂0 (by linarith)) hT0 (by linarith)) + have hb4 : C₂ * L / T ≤ C₂ := (div_le_iff₀ hT0).mpr (mul_le_mul_of_nonneg_left hL_le_T hC₂0) + have hb5 : C₂ ≤ T / (16 * Real.pi ^ 2) := + (le_div_iff₀ (by positivity)).mpr (by linarith [hT2, mul_nonneg (by positivity : (0 : ℝ) ≤ 16 * Real.pi ^ 2) hC₂0]) + exact hb3.trans (hb4.trans (hb5.trans hX1)) + rw [hsplit] + calc |T * (1 - 2 * m ^ 2) / (4 * Real.pi ^ 2) + ∫ τ in T..(2 * T), (g τ ^ 2 - main τ ^ 2)| + ≤ |T * (1 - 2 * m ^ 2) / (4 * Real.pi ^ 2)| + |∫ τ in T..(2 * T), (g τ ^ 2 - main τ ^ 2)| := + abs_add_le _ _ + _ ≤ 8 * (1 + 2 * m ^ 2) * X + X := add_le_add hmain_dev (herrI.trans herr_final) + _ = (8 * (1 + 2 * m ^ 2) + 1) * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / L ^ 2 := by ring + + +/-- **[eq:muints].2 given Stirling**: ∫_T^{2T} g² = (Tℓ₁²/4π²)(1 + O(ℓ⁻²)) (∃-form, from `int_g_sq_explicit`). -/ +theorem int_g_sq_of_stirling (hcont : Continuous g) + (hst : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → + |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) : + ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → + |(∫ τ in T..(2 * T), g τ ^ 2) - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| + ≤ C * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 := by + obtain ⟨C, hC⟩ := hst + exact ⟨_, _, fun T hT => int_g_sq_explicit hcont hC hT⟩ + +end Generic + +/-- **[eq:muints].2 given Stirling**: ∫_T^{2T} μ² = (Tℓ₁²/4π²)(1 + O(l⁻²)). -/ +theorem int_mu_sq_of_stirling (hst : StirlingHyp) : + ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → + |(∫ τ in T..(2 * T), Zeta23.mu τ ^ 2) - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| + ≤ C * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 := + int_g_sq_of_stirling Zeta23.mu_smooth.continuous hst end MuInts end Zeta23 diff --git a/zeta23/Zeta23/GammaFacts/Mu.lean b/zeta23/Zeta23/GammaFacts/Mu.lean index 744e30031e..47eafa271d 100644 --- a/zeta23/Zeta23/GammaFacts/Mu.lean +++ b/zeta23/Zeta23/GammaFacts/Mu.lean @@ -134,50 +134,50 @@ lemma mu_eq (τ : ℝ) : unfold Zeta23.mu congr 3 push_cast - ring + ring_nf -/-- [eq:mufacts] "increasing in |τ|": μ is monotone on τ ≥ 0. -/ -theorem mu_monotoneOn : MonotoneOn Zeta23.mu (Set.Ici (0 : ℝ)) := by +/-- `muLine a c₀` is monotone on `[0,∞)` for `a ∈ (0,1)`. -/ +theorem muLine_monotoneOn (ha0 : 0 < a) (ha1 : a < 1) (c₀ : ℝ) : + MonotoneOn (Zeta23.muLine a c₀) (Set.Ici (0 : ℝ)) := by intro t₁ h₁ t₂ h₂ h12 - rw [mu_eq, mu_eq] - have hmono := re_digamma_mono (a := 1 / 4) (by norm_num) (by norm_num) + unfold Zeta23.muLine + have hmono := re_digamma_mono ha0 ha1 (Set.mem_Ici.mpr (by linarith [Set.mem_Ici.mp h₁] : (0 : ℝ) ≤ t₁ / 2)) (Set.mem_Ici.mpr (by linarith [Set.mem_Ici.mp h₂] : (0 : ℝ) ≤ t₂ / 2)) (by linarith) - have hπ : (0 : ℝ) < Real.pi := Real.pi_pos have h2π : (0 : ℝ) ≤ 1 / (2 * Real.pi) := by positivity - have := mul_le_mul_of_nonneg_left hmono h2π - linarith + linarith [mul_le_mul_of_nonneg_left hmono h2π] -/-- [eq:mufacts] "μ ≥ μ(0)". -/ -theorem mu_zero_le (τ : ℝ) : Zeta23.mu 0 ≤ Zeta23.mu τ := by - have heven := Zeta23.mu_even +/-- `muLine a c₀` attains its minimum at `0` for `a ∈ (0,1)`. -/ +theorem muLine_zero_le (ha0 : 0 < a) (ha1 : a < 1) (c₀ τ : ℝ) : + Zeta23.muLine a c₀ 0 ≤ Zeta23.muLine a c₀ τ := by rcases le_total 0 τ with h | h - · exact mu_monotoneOn (Set.mem_Ici.mpr le_rfl) (Set.mem_Ici.mpr h) h - · have h1 : Zeta23.mu τ = Zeta23.mu (-τ) := (heven τ).symm - rw [h1] - exact mu_monotoneOn (Set.mem_Ici.mpr le_rfl) (Set.mem_Ici.mpr (by linarith)) (by linarith) + · exact muLine_monotoneOn ha0 ha1 c₀ (Set.mem_Ici.mpr le_rfl) (Set.mem_Ici.mpr h) h + · rw [← Zeta23.muLine_even a c₀ τ] + exact muLine_monotoneOn ha0 ha1 c₀ (Set.mem_Ici.mpr le_rfl) + (Set.mem_Ici.mpr (by linarith)) (by linarith) -/-- [eq:mufacts] "μ(0) > −1". -/ -theorem neg_one_lt_mu_zero : (-1 : ℝ) < Zeta23.mu 0 := by - rw [mu_eq] - rw [show ((0 : ℝ) / 2 : ℝ) = (0 : ℝ) by norm_num] - have hre := re_digamma_vertical (a := 1 / 4) (by norm_num) (by norm_num) 0 - rw [hre] +/-- `muLine a c₀ 0 > -1` for `a ∈ [1/4, 1)` and `c₀ ≥ -log π / (2π)`. -/ +theorem neg_one_lt_muLine_zero (ha4 : 1 / 4 ≤ a) (ha1 : a < 1) {c₀ : ℝ} + (hc₀ : -(Real.log Real.pi / (2 * Real.pi)) ≤ c₀) : + (-1 : ℝ) < Zeta23.muLine a c₀ 0 := by + have ha0 : 0 < a := by linarith + unfold Zeta23.muLine + rw [show ((0 : ℝ) / 2 : ℝ) = (0 : ℝ) by norm_num, re_digamma_vertical ha0 ha1 0] have hS : (0 : ℝ) ≤ ∑' n : ℕ, - (1 / ((n : ℝ) + 1) - ((n : ℝ) + 1 + 1 / 4) / (((n : ℝ) + 1 + 1 / 4) ^ 2 + (0 : ℝ) ^ 2)) := by + (1 / ((n : ℝ) + 1) - ((n : ℝ) + 1 + a) / (((n : ℝ) + 1 + a) ^ 2 + (0 : ℝ) ^ 2)) := by refine tsum_nonneg fun n => ?_ - have hna : (0 : ℝ) < (n : ℝ) + 1 + 1 / 4 := by positivity - have h1 : ((n : ℝ) + 1 + 1 / 4) / (((n : ℝ) + 1 + 1 / 4) ^ 2 + (0 : ℝ) ^ 2) - = 1 / ((n : ℝ) + 1 + 1 / 4) := by - rw [show (((n : ℝ) + 1 + 1 / 4) ^ 2 + (0 : ℝ) ^ 2) = ((n : ℝ) + 1 + 1 / 4) ^ 2 by ring] - rw [sq] - rw [div_mul_eq_div_div] - rw [div_self hna.ne'] + have hna : (0 : ℝ) < (n : ℝ) + 1 + a := by positivity + have h1 : ((n : ℝ) + 1 + a) / (((n : ℝ) + 1 + a) ^ 2 + (0 : ℝ) ^ 2) + = 1 / ((n : ℝ) + 1 + a) := by + rw [show ((n : ℝ) + 1 + a) ^ 2 + (0 : ℝ) ^ 2 = ((n : ℝ) + 1 + a) * ((n : ℝ) + 1 + a) by ring, + div_mul_eq_div_div, div_self hna.ne'] rw [h1] have h2 : (0 : ℝ) < (n : ℝ) + 1 := by positivity - have h3 : 1 / ((n : ℝ) + 1 + 1 / 4) ≤ 1 / ((n : ℝ) + 1) := - one_div_le_one_div_of_le h2 (by linarith) + linarith [one_div_le_one_div_of_le h2 (by linarith : (n : ℝ) + 1 ≤ (n : ℝ) + 1 + a)] + have hinv : a / (a ^ 2 + (0 : ℝ) ^ 2) ≤ 4 := by + rw [show a ^ 2 + (0 : ℝ) ^ 2 = a * a by ring, div_mul_eq_div_div, div_self ha0.ne', + div_le_iff₀ ha0] linarith have hγ : Real.eulerMascheroniConstant < 2 / 3 := Real.eulerMascheroniConstant_lt_two_thirds have hπ3 : (3.14 : ℝ) < Real.pi := Real.pi_gt_d2 @@ -185,280 +185,183 @@ theorem neg_one_lt_mu_zero : (-1 : ℝ) < Zeta23.mu 0 := by have hlogπ : Real.log Real.pi < 1.4 := by have h1 : Real.log Real.pi < Real.log 4 := Real.log_lt_log Real.pi_pos hπ4 have h2 : Real.log 4 = 2 * Real.log 2 := by - rw [show (4 : ℝ) = 2 ^ 2 by norm_num, Real.log_pow] - push_cast - ring + rw [show (4 : ℝ) = 2 ^ 2 by norm_num, Real.log_pow]; push_cast; ring have h3 := Real.log_two_lt_d9 nlinarith - have hquarter : (1 / 4 : ℝ) / ((1 / 4 : ℝ) ^ 2 + (0 : ℝ) ^ 2) = 4 := by norm_num - rw [hquarter] - set S : ℝ := ∑' n : ℕ, - (1 / ((n : ℝ) + 1) - ((n : ℝ) + 1 + 1 / 4) / (((n : ℝ) + 1 + 1 / 4) ^ 2 + (0 : ℝ) ^ 2)) - with hSdef - have hform : 1 / (2 * Real.pi) * (-Real.eulerMascheroniConstant - 4 + S) - - Real.log Real.pi / (2 * Real.pi) - = (-Real.eulerMascheroniConstant - 4 + S - Real.log Real.pi) * (1 / (2 * Real.pi)) := by - ring - rw [hform] - have hX : -(2 * Real.pi) - < -Real.eulerMascheroniConstant - 4 + S - Real.log Real.pi := by - have hnorm : (1.4 : ℝ) = 14 / 10 := by norm_num + have h2π : 0 < 2 * Real.pi := by positivity + set S := ∑' n : ℕ, + (1 / ((n : ℝ) + 1) - ((n : ℝ) + 1 + a) / (((n : ℝ) + 1 + a) ^ 2 + (0 : ℝ) ^ 2)) + have hsum : -6.07 ≤ -Real.eulerMascheroniConstant - a / (a ^ 2 + (0 : ℝ) ^ 2) + S + - Real.log Real.pi := by linarith + have h607 : -1 < (1 / (2 * Real.pi)) * (-6.07) := by + have : (1 / (2 * Real.pi)) * 6.07 < 1 := by + rw [div_mul_eq_mul_div, one_mul, div_lt_one h2π]; nlinarith linarith - calc (-1 : ℝ) = -(2 * Real.pi) * (1 / (2 * Real.pi)) := by - field_simp - _ < (-Real.eulerMascheroniConstant - 4 + S - Real.log Real.pi) * (1 / (2 * Real.pi)) := - mul_lt_mul_of_pos_right hX (by positivity) + calc (-1 : ℝ) < (1 / (2 * Real.pi)) * (-6.07) := h607 + _ ≤ (1 / (2 * Real.pi)) * (-Real.eulerMascheroniConstant - a / (a ^ 2 + (0 : ℝ) ^ 2) + S + - Real.log Real.pi) := mul_le_mul_of_nonneg_left hsum (by positivity) + _ = (1 / (2 * Real.pi)) * (-Real.eulerMascheroniConstant - a / (a ^ 2 + (0 : ℝ) ^ 2) + S) + + -(Real.log Real.pi / (2 * Real.pi)) := by ring + _ ≤ _ := by linarith + +/-- [eq:mufacts] "increasing in |τ|": μ is monotone on τ ≥ 0. -/ +theorem mu_monotoneOn : MonotoneOn Zeta23.mu (Set.Ici (0 : ℝ)) := by + rw [Zeta23.mu_eq_muLine]; exact muLine_monotoneOn (by norm_num) (by norm_num) _ + +/-- [eq:mufacts] "μ ≥ μ(0)". -/ +theorem mu_zero_le (τ : ℝ) : Zeta23.mu 0 ≤ Zeta23.mu τ := by + rw [Zeta23.mu_eq_muLine]; exact muLine_zero_le (by norm_num) (by norm_num) _ τ + +/-- [eq:mufacts] "μ(0) > −1". -/ +theorem neg_one_lt_mu_zero : (-1 : ℝ) < Zeta23.mu 0 := by + rw [Zeta23.mu_eq_muLine]; exact neg_one_lt_muLine_zero le_rfl (by norm_num) le_rfl /-! ### The derivative bound μ′ ≪ 1/|τ| (via the trigamma series) -/ +/-- Summability of the quarter-line trigamma comparison series. -/ +lemma summable_quarter_line (t : ℝ) : + Summable (fun n : ℕ => (((1 / 4 : ℝ) + n) ^ 2 + t ^ 2)⁻¹) := by + refine Summable.of_norm_bounded_eventually (g := fun n : ℕ => (((n : ℝ)) ^ 2)⁻¹) ?_ ?_ + · simpa only [Real.rpow_two] using Real.summable_nat_rpow_inv.mpr (one_lt_two : (1 : ℝ) < 2) + · rw [Nat.cofinite_eq_atTop] + filter_upwards [Filter.eventually_ge_atTop 1] with n hn + have hn1 : (1 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn + rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] + gcongr; nlinarith + /-- Trigamma tail bound on the quarter line: Σ'ₙ ((1/4+n)² + t²)⁻¹ ≤ 12/|t| for |t| ≥ 1/2. -/ lemma trigamma_tail_le {t : ℝ} (ht : 1 / 2 ≤ |t|) : ∑' n : ℕ, (((1 / 4 : ℝ) + n) ^ 2 + t ^ 2)⁻¹ ≤ 12 / |t| := by have ht0 : (0 : ℝ) < |t| := by linarith - have htsq : (0 : ℝ) < t ^ 2 := by - have := sq_abs t - nlinarith + have htsq : (0 : ℝ) < t ^ 2 := by nlinarith [sq_abs t] set N : ℕ := ⌈|t|⌉₊ + 2 with hN - have hNt : |t| ≤ (N : ℝ) := by - calc |t| ≤ (⌈|t|⌉₊ : ℝ) := Nat.le_ceil _ - _ ≤ (N : ℝ) := by - rw [hN] - push_cast - linarith + have hN2 : (2 : ℕ) ≤ N := by omega have hNle : (N : ℝ) ≤ |t| + 3 := by - rw [hN] - push_cast - have := Nat.ceil_lt_add_one (abs_nonneg t) - linarith - have hsummable : Summable (fun n : ℕ => (((1 / 4 : ℝ) + n) ^ 2 + t ^ 2)⁻¹) := by - refine Summable.of_norm_bounded_eventually - (g := fun n : ℕ => (((n : ℝ)) ^ 2)⁻¹) ?_ ?_ - · have h3 := Real.summable_nat_rpow_inv.mpr (by norm_num : (1 : ℝ) < 2) - have heq : (fun n : ℕ => ((n : ℝ) ^ (2 : ℝ))⁻¹) = fun n : ℕ => (((n : ℝ)) ^ 2)⁻¹ := by - funext n - rw [show ((2 : ℝ)) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast] - rwa [heq] at h3 - · rw [Nat.cofinite_eq_atTop] - filter_upwards [Filter.eventually_ge_atTop 1] with n hn - have hn1 : (1 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn - rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] - gcongr - nlinarith - rw [← hsummable.sum_add_tsum_nat_add N] - have hhead : ∑ i ∈ Finset.range N, (((1 / 4 : ℝ) + i) ^ 2 + t ^ 2)⁻¹ - ≤ (N : ℝ) * (t ^ 2)⁻¹ := by - have h1 : ∀ i ∈ Finset.range N, (((1 / 4 : ℝ) + i) ^ 2 + t ^ 2)⁻¹ ≤ (t ^ 2)⁻¹ := by - intro i _ - gcongr - nlinarith [sq_nonneg ((1 / 4 : ℝ) + i)] + rw [hN]; push_cast; linarith [Nat.ceil_lt_add_one (abs_nonneg t)] + rw [← (summable_quarter_line t).sum_add_tsum_nat_add N] + have hhead : ∑ i ∈ Finset.range N, (((1 / 4 : ℝ) + i) ^ 2 + t ^ 2)⁻¹ ≤ 10 / |t| := by + have h1 : ∑ i ∈ Finset.range N, (((1 / 4 : ℝ) + i) ^ 2 + t ^ 2)⁻¹ ≤ (N : ℝ) * (t ^ 2)⁻¹ := by + calc ∑ i ∈ Finset.range N, (((1 / 4 : ℝ) + i) ^ 2 + t ^ 2)⁻¹ + ≤ ∑ _i ∈ Finset.range N, (t ^ 2)⁻¹ := + Finset.sum_le_sum fun i _ => inv_anti₀ htsq (by nlinarith) + _ = (N : ℝ) * (t ^ 2)⁻¹ := by simp calc ∑ i ∈ Finset.range N, (((1 / 4 : ℝ) + i) ^ 2 + t ^ 2)⁻¹ - ≤ ∑ _i ∈ Finset.range N, (t ^ 2)⁻¹ := Finset.sum_le_sum h1 - _ = (N : ℝ) * (t ^ 2)⁻¹ := by - rw [Finset.sum_const, Finset.card_range] - simp [nsmul_eq_mul] - have htail : ∑' i : ℕ, (((1 / 4 : ℝ) + ((i + N : ℕ) : ℝ)) ^ 2 + t ^ 2)⁻¹ - ≤ ((N : ℝ) - 1)⁻¹ := by - have hN2 : (2 : ℕ) ≤ N := by - rw [hN] - omega - push_cast - refine Real.tsum_le_of_sum_range_le (fun n => by positivity) fun K => ?_ - have hterm : ∀ i : ℕ, (((1 / 4 : ℝ) + (i + N)) ^ 2 + t ^ 2)⁻¹ - ≤ ((i : ℝ) + N - 1)⁻¹ - ((i : ℝ) + N)⁻¹ := by - intro i - have hiN1 : (1 : ℝ) ≤ (i : ℝ) + N - 1 := by - have : (2 : ℝ) ≤ (N : ℝ) := by exact_mod_cast hN2 - have := Nat.cast_nonneg (α := ℝ) i - linarith - have hpos1 : (0 : ℝ) < (i : ℝ) + N - 1 := by linarith - have hpos2 : (0 : ℝ) < (i : ℝ) + N := by linarith - have hsub : ((i : ℝ) + N - 1)⁻¹ - ((i : ℝ) + N)⁻¹ - = (((i : ℝ) + N - 1) * ((i : ℝ) + N))⁻¹ := by - rw [inv_sub_inv hpos1.ne' hpos2.ne'] - ring_nf - rw [hsub] - have hd1 : (0 : ℝ) < ((i : ℝ) + N - 1) * ((i : ℝ) + N) := mul_pos hpos1 hpos2 - have hd2 : ((i : ℝ) + N - 1) * ((i : ℝ) + N) - ≤ ((1 / 4 : ℝ) + ((i : ℝ) + (N : ℝ))) ^ 2 + t ^ 2 := by - nlinarith [Nat.cast_nonneg (α := ℝ) i, sq_nonneg t] - have h3 := one_div_le_one_div_of_le hd1 hd2 - simpa [one_div] using h3 - calc ∑ i ∈ Finset.range K, (((1 / 4 : ℝ) + (i + N)) ^ 2 + t ^ 2)⁻¹ - ≤ ∑ i ∈ Finset.range K, (((i : ℝ) + N - 1)⁻¹ - ((i : ℝ) + N)⁻¹) := - Finset.sum_le_sum fun i _ => hterm i - _ = ((N : ℝ) - 1)⁻¹ - ((K : ℝ) + N - 1)⁻¹ := by - have htel := Finset.sum_range_sub' (f := fun i : ℕ => ((i : ℝ) + N - 1)⁻¹) K - simp only [Nat.cast_zero, zero_add] at htel - rw [← htel] - refine Finset.sum_congr rfl fun i _ => ?_ - have hx : (((i + 1 : ℕ) : ℝ) + N - 1)⁻¹ = ((i : ℝ) + N)⁻¹ := by - push_cast - ring_nf - rw [hx] - _ ≤ ((N : ℝ) - 1)⁻¹ := by - have h2 : (2 : ℝ) ≤ (N : ℝ) := by exact_mod_cast hN2 - have : (0 : ℝ) < (K : ℝ) + N - 1 := by - have := Nat.cast_nonneg (α := ℝ) K + ≤ (N : ℝ) * (|t| ^ 2)⁻¹ := by rwa [sq_abs] + _ ≤ (7 * |t|) * (|t| ^ 2)⁻¹ := by gcongr; linarith + _ ≤ 10 / |t| := by rw [show 7 * |t| * (|t| ^ 2)⁻¹ = 7 / |t| by field_simp]; gcongr; norm_num + have htail : ∑' i : ℕ, (((1 / 4 : ℝ) + ((i + N : ℕ) : ℝ)) ^ 2 + t ^ 2)⁻¹ ≤ 1 / |t| := by + rw [show (1 : ℝ) / |t| = |t|⁻¹ from one_div _] + refine (Real.tsum_le_of_sum_range_le (c := ((N : ℝ) - 1)⁻¹) (fun _ => by positivity) fun K => ?_).trans ?_ + · have htel := Finset.sum_range_sub' (f := fun i : ℕ => ((i : ℝ) + N - 1)⁻¹) K + simp only [Nat.cast_zero, zero_add] at htel + calc ∑ i ∈ Finset.range K, (((1 / 4 : ℝ) + ((i + N : ℕ) : ℝ)) ^ 2 + t ^ 2)⁻¹ + ≤ ∑ i ∈ Finset.range K, (((i : ℝ) + N - 1)⁻¹ - (((i + 1 : ℕ) : ℝ) + N - 1)⁻¹) := by + refine Finset.sum_le_sum fun i _ => ?_ + have hp1 : (0 : ℝ) < (i : ℝ) + N - 1 := by + have : (2 : ℝ) ≤ N := by exact_mod_cast hN2 + linarith [Nat.cast_nonneg (α := ℝ) i] + have hp2 : (0 : ℝ) < (i : ℝ) + N := by linarith + rw [show (((i + 1 : ℕ) : ℝ) + N - 1) = (i : ℝ) + N by push_cast; ring, + inv_sub_inv hp1.ne' hp2.ne', show (i : ℝ) + N - ((i : ℝ) + N - 1) = 1 by ring, + show (1 : ℝ) / (((i : ℝ) + N - 1) * ((i : ℝ) + N)) = (((i : ℝ) + N - 1) * ((i : ℝ) + N))⁻¹ from one_div _] + exact inv_anti₀ (mul_pos hp1 hp2) (by push_cast; nlinarith [hp2, sq_nonneg t]) + _ = ((N : ℝ) - 1)⁻¹ - ((K : ℝ) + N - 1)⁻¹ := htel + _ ≤ ((N : ℝ) - 1)⁻¹ := by + have h2N : (2 : ℝ) ≤ N := by exact_mod_cast hN2 + have : (0 : ℝ) ≤ ((K : ℝ) + N - 1)⁻¹ := inv_nonneg.mpr (by linarith [Nat.cast_nonneg (α := ℝ) K, h2N]) linarith - have : (0 : ℝ) ≤ ((K : ℝ) + N - 1)⁻¹ := by positivity - linarith - have hN1 : (1 : ℝ) ≤ (N : ℝ) - 1 := by - have h2 : (2 : ℕ) ≤ N := by - rw [hN] - omega - have : (2 : ℝ) ≤ (N : ℝ) := by exact_mod_cast h2 - linarith - have hNm1 : |t| ≤ (N : ℝ) - 1 := by - rw [hN] - push_cast - have := Nat.le_ceil |t| - linarith - have htail2 : ((N : ℝ) - 1)⁻¹ ≤ |t|⁻¹ := by - rw [← one_div, ← one_div] - exact one_div_le_one_div_of_le ht0 hNm1 - have hhead2 : (N : ℝ) * (t ^ 2)⁻¹ ≤ 10 / |t| := by - have hts : t ^ 2 = |t| ^ 2 := (sq_abs t).symm - rw [hts] - rw [div_eq_mul_inv] - have h1 : (N : ℝ) ≤ 7 * |t| := by linarith - calc (N : ℝ) * ((|t| ^ 2)⁻¹) ≤ 7 * |t| * ((|t| ^ 2)⁻¹) := by - gcongr - _ = 7 * |t|⁻¹ := by - field_simp - _ ≤ 10 * |t|⁻¹ := by - have : (0 : ℝ) ≤ |t|⁻¹ := by positivity - linarith + · exact inv_anti₀ ht0 (by rw [hN]; push_cast; linarith [Nat.le_ceil |t|]) calc (∑ i ∈ Finset.range N, (((1 / 4 : ℝ) + i) ^ 2 + t ^ 2)⁻¹) + ∑' i : ℕ, (((1 / 4 : ℝ) + ((i + N : ℕ) : ℝ)) ^ 2 + t ^ 2)⁻¹ - ≤ (N : ℝ) * (t ^ 2)⁻¹ + ((N : ℝ) - 1)⁻¹ := add_le_add hhead htail - _ ≤ 10 / |t| + |t|⁻¹ := add_le_add hhead2 htail2 - _ ≤ 12 / |t| := by - rw [div_eq_mul_inv, div_eq_mul_inv] - have : (0 : ℝ) ≤ |t|⁻¹ := by positivity - linarith - -/-- Summability of the quarter-line trigamma comparison series. -/ -lemma summable_quarter_line (t : ℝ) : - Summable (fun n : ℕ => (((1 / 4 : ℝ) + n) ^ 2 + t ^ 2)⁻¹) := by - refine Summable.of_norm_bounded_eventually - (g := fun n : ℕ => (((n : ℝ)) ^ 2)⁻¹) ?_ ?_ - · have h3 := Real.summable_nat_rpow_inv.mpr (by norm_num : (1 : ℝ) < 2) - have heq : (fun n : ℕ => ((n : ℝ) ^ (2 : ℝ))⁻¹) = fun n : ℕ => (((n : ℝ)) ^ 2)⁻¹ := by - funext n - rw [show ((2 : ℝ)) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast] - rwa [heq] at h3 - · rw [Nat.cofinite_eq_atTop] - filter_upwards [Filter.eventually_ge_atTop 1] with n hn - have hn1 : (1 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn - rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] - gcongr - nlinarith + ≤ 10 / |t| + 1 / |t| := add_le_add hhead htail + _ = 11 / |t| := by ring + _ ≤ 12 / |t| := by gcongr; norm_num set_option backward.isDefEq.respectTransparency false in -/-- [eq:mufacts] "μ′(τ) ≪ |τ|⁻¹" (the GammaFacts.deriv_bound field shape). -/ -theorem mu_deriv_bound : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |deriv Zeta23.mu τ| ≤ C / |τ| := by - refine ⟨24 / Real.pi, fun τ hτ => ?_⟩ +/-- Derivative bound `|deriv (muLine a c₀) τ| ≤ (24 / π) / |τ|` for `a ∈ [1/4, 1)` and `|τ| ≥ 1`. -/ +theorem muLine_deriv_bound_const (ha4 : 1 / 4 ≤ a) (ha1 : a < 1) (c₀ τ : ℝ) (hτ : 1 ≤ |τ|) : + |deriv (Zeta23.muLine a c₀) τ| ≤ (24 / Real.pi) / |τ| := by + have ha0 : 0 < a := by linarith have hτ0 : (0 : ℝ) < |τ| := by linarith - set zA : ℂ := (1 / 4 : ℂ) + (Complex.I / 2) * (τ : ℂ) with hzA - have hzA_eq : zA = ((1 / 4 : ℝ) : ℂ) + Complex.I * ((τ / 2 : ℝ) : ℂ) := by - rw [hzA] - push_cast - ring + set zA : ℂ := (a : ℂ) + (Complex.I / 2) * (τ : ℂ) with hzA + have hzA_eq : zA = (a : ℂ) + Complex.I * ((τ / 2 : ℝ) : ℂ) := by + rw [hzA]; push_cast; ring have hmem : zA ∈ Complex.integerComplement := by - rw [hzA_eq] - exact abscissa_mem (by norm_num) (by norm_num) (τ / 2) + rw [hzA_eq]; exact abscissa_mem ha0 ha1 (τ / 2) have hψd : DifferentiableAt ℂ Complex.digamma zA := Zeta23.Stirling.differentiableAt_digamma hmem - -- chain rule: μ has derivative (1/2π)·Re(ψ′(zA)·(I/2)) at τ - have hginner : HasDerivAt (fun x : ℝ => (1 / 4 : ℂ) + (Complex.I / 2) * (x : ℂ)) + have hginner : HasDerivAt (fun x : ℝ => (a : ℂ) + (Complex.I / 2) * (x : ℂ)) (Complex.I / 2) τ := by have h1 : HasDerivAt (fun x : ℝ => ((x : ℝ) : ℂ)) 1 τ := Complex.ofRealCLM.hasDerivAt - have h2 := (h1.const_mul (Complex.I / 2)).const_add ((1 / 4 : ℂ)) - simpa using h2 + simpa using (h1.const_mul (Complex.I / 2)).const_add (a : ℂ) have hcompd : HasDerivAt - (fun x : ℝ => Complex.digamma ((1 / 4 : ℂ) + (Complex.I / 2) * (x : ℂ))) - ((Complex.I / 2) • deriv Complex.digamma zA) τ := by - have h3 := HasDerivAt.scomp τ hψd.hasDerivAt hginner - exact h3 + (fun x : ℝ => Complex.digamma ((a : ℂ) + (Complex.I / 2) * (x : ℂ))) + ((Complex.I / 2) • deriv Complex.digamma zA) τ := + HasDerivAt.scomp τ hψd.hasDerivAt hginner have hre : HasDerivAt - (fun x : ℝ => (Complex.digamma ((1 / 4 : ℂ) + (Complex.I / 2) * (x : ℂ))).re) + (fun x : ℝ => (Complex.digamma ((a : ℂ) + (Complex.I / 2) * (x : ℂ))).re) (((Complex.I / 2) • deriv Complex.digamma zA).re) τ := - (Complex.reCLM.hasFDerivAt.comp_hasDerivAt τ hcompd) - have hmuD : HasDerivAt Zeta23.mu + Complex.reCLM.hasFDerivAt.comp_hasDerivAt τ hcompd + have hmuD : HasDerivAt (Zeta23.muLine a c₀) (1 / (2 * Real.pi) * (((Complex.I / 2) • deriv Complex.digamma zA).re)) τ := by - have h4 := (hre.const_mul (1 / (2 * Real.pi))).sub_const (Real.log Real.pi / (2 * Real.pi)) - have h5 : Zeta23.mu = fun x : ℝ => - 1 / (2 * Real.pi) * (Complex.digamma ((1 / 4 : ℂ) + (Complex.I / 2) * (x : ℂ))).re - - Real.log Real.pi / (2 * Real.pi) := by - funext x - unfold Zeta23.mu - rw [show ((1 / 4 : ℂ) + Complex.I * (x : ℂ) / 2) - = (1 / 4 : ℂ) + (Complex.I / 2) * (x : ℂ) from by ring] - rw [h5] - exact h4 + have h4 := (hre.const_mul (1 / (2 * Real.pi))).add_const c₀ + have h5 : Zeta23.muLine a c₀ = fun x : ℝ => + 1 / (2 * Real.pi) * (Complex.digamma ((a : ℂ) + (Complex.I / 2) * (x : ℂ))).re + c₀ := by + funext x; unfold Zeta23.muLine; congr 3; push_cast; ring + rwa [h5] rw [hmuD.deriv] - -- bound the derivative value by the trigamma tail have htri := Zeta23.Stirling.hasSum_trigamma hmem - have hnorm_term : ∀ n : ℕ, ‖(1 : ℂ) / (zA + n) ^ 2‖ - = (((1 / 4 : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := by + have hnorm_term : ∀ n : ℕ, ‖(1 : ℂ) / (zA + n) ^ 2‖ = ((a + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := by intro n - have hre2 : (zA + n).re = (1 / 4 : ℝ) + n := by - rw [hzA_eq] - simp - have him2 : (zA + n).im = τ / 2 := by - rw [hzA_eq] - simp + have hre2 : (zA + n).re = a + n := by rw [hzA_eq]; simp + have him2 : (zA + n).im = τ / 2 := by rw [hzA_eq]; simp rw [norm_div, norm_one, norm_pow, one_div] congr 1 rw [show ‖zA + (n : ℂ)‖ ^ 2 = Complex.normSq (zA + n) from Complex.sq_norm _, Complex.normSq_apply, hre2, him2] ring - have hsummable_norm : Summable (fun n : ℕ => ‖(1 : ℂ) / (zA + n) ^ 2‖) := by - refine (summable_quarter_line (τ / 2)).congr fun n => ?_ - exact (hnorm_term n).symm + have hcmp : ∀ n : ℕ, ((a + n) ^ 2 + (τ / 2) ^ 2)⁻¹ ≤ (((1 / 4 : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := by + intro n + rw [← one_div, ← one_div] + apply one_div_le_one_div_of_le (by positivity) + nlinarith [Nat.cast_nonneg (α := ℝ) n] + have hsummable_a : Summable (fun n : ℕ => ((a + n) ^ 2 + (τ / 2) ^ 2)⁻¹) := + Summable.of_nonneg_of_le (fun _ => by positivity) hcmp (summable_quarter_line (τ / 2)) + have hsummable_norm : Summable (fun n : ℕ => ‖(1 : ℂ) / (zA + n) ^ 2‖) := + hsummable_a.congr fun n => (hnorm_term n).symm have hψ'bound : ‖deriv Complex.digamma zA‖ ≤ 24 / |τ| := by - have h6 : deriv Complex.digamma zA = ∑' n : ℕ, (1 : ℂ) / (zA + n) ^ 2 := htri.tsum_eq.symm - rw [h6] + rw [htri.tsum_eq.symm] calc ‖∑' n : ℕ, (1 : ℂ) / (zA + n) ^ 2‖ ≤ ∑' n : ℕ, ‖(1 : ℂ) / (zA + n) ^ 2‖ := norm_tsum_le_tsum_norm hsummable_norm - _ = ∑' n : ℕ, (((1 / 4 : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := by - congr 1 - funext n - exact hnorm_term n - _ ≤ 12 / |τ / 2| := trigamma_tail_le (by - rw [abs_div] - rw [show |(2 : ℝ)| = 2 by norm_num] - linarith) - _ = 24 / |τ| := by - rw [abs_div, show |(2 : ℝ)| = 2 by norm_num] - field_simp - norm_num - -- |Re((I/2)•ψ′)| ≤ ‖ψ′‖/2 + _ = ∑' n : ℕ, ((a + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := by congr 1; funext n; exact hnorm_term n + _ ≤ ∑' n : ℕ, (((1 / 4 : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := + Summable.tsum_le_tsum hcmp hsummable_a (summable_quarter_line (τ / 2)) + _ ≤ 12 / |τ / 2| := trigamma_tail_le (by rw [abs_div, abs_two]; linarith) + _ = 24 / |τ| := by rw [abs_div, abs_two]; field_simp; norm_num have hval : |(((Complex.I / 2) • deriv Complex.digamma zA).re)| ≤ ‖deriv Complex.digamma zA‖ / 2 := by calc |(((Complex.I / 2) • deriv Complex.digamma zA).re)| ≤ ‖(Complex.I / 2) • deriv Complex.digamma zA‖ := Complex.abs_re_le_norm _ _ = ‖Complex.I / 2‖ * ‖deriv Complex.digamma zA‖ := norm_smul _ _ _ = ‖deriv Complex.digamma zA‖ / 2 := by - rw [norm_div, Complex.norm_I] - rw [show ‖(2 : ℂ)‖ = 2 from by - rw [show (2 : ℂ) = ((2 : ℝ) : ℂ) by norm_num, Complex.norm_real, - Real.norm_eq_abs, abs_of_pos (by norm_num)]] - ring + rw [norm_div, Complex.norm_I, show ‖(2 : ℂ)‖ = 2 from by norm_num]; ring have hπ : (0 : ℝ) < Real.pi := Real.pi_pos rw [abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ 1 / (2 * Real.pi))] calc 1 / (2 * Real.pi) * |(((Complex.I / 2) • deriv Complex.digamma zA).re)| - ≤ 1 / (2 * Real.pi) * (‖deriv Complex.digamma zA‖ / 2) := by - gcongr - _ ≤ 1 / (2 * Real.pi) * ((24 / |τ|) / 2) := by - gcongr + ≤ 1 / (2 * Real.pi) * (‖deriv Complex.digamma zA‖ / 2) := by gcongr + _ ≤ 1 / (2 * Real.pi) * ((24 / |τ|) / 2) := by gcongr _ ≤ (24 / Real.pi) / |τ| := by - rw [div_div, div_mul_eq_mul_div, one_mul] - rw [div_le_div_iff₀ (by positivity) (by positivity)] + rw [div_div, div_mul_eq_mul_div, one_mul, div_le_div_iff₀ (by positivity) (by positivity)] ring_nf have e1 : Real.pi * Real.pi⁻¹ = 1 := mul_inv_cancel₀ hπ.ne' have e2 : |τ| * |τ|⁻¹ = 1 := mul_inv_cancel₀ hτ0.ne' nlinarith [e1, e2] +/-- [eq:mufacts] "μ′(τ) ≪ |τ|⁻¹" (the GammaFacts.deriv_bound field shape). -/ +theorem mu_deriv_bound : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |deriv Zeta23.mu τ| ≤ C / |τ| := by + refine ⟨24 / Real.pi, fun τ hτ => ?_⟩ + rw [Zeta23.mu_eq_muLine] + exact muLine_deriv_bound_const le_rfl (by norm_num) _ τ hτ + end MuFields end Zeta23 diff --git a/zeta23/Zeta23/GammaFacts/StirlingVert.lean b/zeta23/Zeta23/GammaFacts/StirlingVert.lean index 21a325dbb2..b1b65377da 100644 --- a/zeta23/Zeta23/GammaFacts/StirlingVert.lean +++ b/zeta23/Zeta23/GammaFacts/StirlingVert.lean @@ -33,10 +33,6 @@ theorem intervalIntegral_mul_const_C (c : ℂ) (f : ℝ → ℂ) (a b : ℝ) : ∫ x in a..b, f x * c = (∫ x in a..b, f x) * c := intervalIntegral.integral_mul_const c f -theorem intervalIntegral_const_mul_C (c : ℂ) (f : ℝ → ℂ) (a b : ℝ) : - ∫ x in a..b, c * f x = c * ∫ x in a..b, f x := - intervalIntegral.integral_const_mul c f - /-! ### Elementary bounds for points in the right half-plane -/ /-- for `x ≥ 0` real and `0 < re w`: `‖x + w‖ ≥ |im w|`. -/ @@ -175,17 +171,10 @@ theorem natp1_re_pos (hw : 0 < w.re) (n : ℕ) : 0 < ((n : ℂ) + 1 + w).re := b theorem natp1_ne_zero (hw : 0 < w.re) (n : ℕ) : (n : ℂ) + 1 + w ≠ 0 := fun h => by have := natp1_re_pos hw n; rw [h] at this; simp at this -theorem abs_im_le_norm_natp1 (n : ℕ) : |w.im| ≤ ‖(n : ℂ) + 1 + w‖ := by - have := Complex.abs_im_le_norm ((n : ℂ) + 1 + w); simpa using this - theorem natp1_le_norm (hw : 0 < w.re) (n : ℕ) : (n : ℝ) + 1 ≤ ‖(n : ℂ) + 1 + w‖ := by have h := Complex.re_le_norm ((n : ℂ) + 1 + w) simp at h; linarith -/-- cast alignment with the real-parametrized lemmas. -/ -theorem natp1_cast (n : ℕ) : (n : ℂ) + 1 + w = ((((n : ℝ) + 1 : ℝ)) : ℂ) + w := by - push_cast; ring - /-- (I1) `1/z_n = [log z_{n+1} − log z_n] + (1/2)/z_n² − ε_{n+1}`. -/ theorem inv_natp1_eq (hw : 0 < w.re) (n : ℕ) : ((n : ℂ) + 1 + w)⁻¹ @@ -449,7 +438,7 @@ theorem digamma_eq (hw : 0 < w.re) (ht : 1 / 2 ≤ |w.im|) : intro N rw [partial_sum_eq hw N] push_cast - ring + ring_nf simp_rw [e] refine (((tendsto_harmonic_sub_clog hw).add tendsto_const_nhds).sub (((tendsto_const_nhds.sub (tendsto_inv_natp1 hw)).add diff --git a/zeta23/Zeta23/Hypotheses.lean b/zeta23/Zeta23/Hypotheses.lean index 9f5b868e26..25e5ca3603 100644 --- a/zeta23/Zeta23/Hypotheses.lean +++ b/zeta23/Zeta23/Hypotheses.lean @@ -122,20 +122,22 @@ Source: Stirling for Γ'/Γ (e.g. [MV07, App. C]). This structure only STATES th proved in Zeta23/GammaFacts/Complete.lean (`gammaFacts : GammaFacts`, via the digamma series and a vertical-line Stirling estimate in Zeta23/GammaFacts/*). "increasing" is rendered as MonotoneOn on [0,∞) (nondecreasing), which is all prop:trace's Riemann-sum comparison uses. -/ -structure GammaFacts : Prop where - even : ∀ τ : ℝ, mu (-τ) = mu τ - smooth : ContDiff ℝ ∞ mu - monotoneOn : MonotoneOn mu (Ici 0) - mu_zero_le : ∀ τ : ℝ, mu 0 ≤ mu τ - neg_one_lt_mu_zero : -1 < mu 0 +structure GammaFactsFor (f : ℝ → ℝ) (logArg : ℝ → ℝ) (e1 : ℝ → ℝ) : Prop where + even : ∀ τ : ℝ, f (-τ) = f τ + smooth : ContDiff ℝ ∞ f + monotoneOn : MonotoneOn f (Ici 0) + mu_zero_le : ∀ τ : ℝ, f 0 ≤ f τ + neg_one_lt_mu_zero : -1 < f 0 stirling : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → - |mu τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2 - deriv_bound : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |deriv mu τ| ≤ C / |τ| + |f τ - (1 / (2 * Real.pi)) * Real.log (logArg τ)| ≤ C / τ ^ 2 + deriv_bound : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |deriv f τ| ≤ C / |τ| int_mu : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - |(∫ τ in T..(2 * T), mu τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T + |(∫ τ in T..(2 * T), f τ) - T * e1 T / (2 * Real.pi)| ≤ C / T int_mu_sq : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - |(∫ τ in T..(2 * T), mu τ ^ 2) - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ C * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 + |(∫ τ in T..(2 * T), f τ ^ 2) - T * e1 T ^ 2 / (4 * Real.pi ^ 2)| + ≤ C * (T * e1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 + +abbrev GammaFacts : Prop := GammaFactsFor mu (fun τ => |τ| / (2 * Real.pi)) ell1 /-! ## The bundle -/ diff --git a/zeta23/Zeta23/LinAlg.lean b/zeta23/Zeta23/LinAlg.lean index bbf60ec4d0..be80f518cf 100644 --- a/zeta23/Zeta23/LinAlg.lean +++ b/zeta23/Zeta23/LinAlg.lean @@ -3,10 +3,6 @@ Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ -import Zeta23.LinAlg.HermitianPosPart import Zeta23.LinAlg.Inertia -import Zeta23.LinAlg.PosIndex import Zeta23.LinAlg.RankTrace -import Zeta23.LinAlg.Sylvester -import Zeta23.LinAlg.VonNeumann import Zeta23.LinAlg.Weyl diff --git a/zeta23/Zeta23/LinAlg/HermitianPosPart.lean b/zeta23/Zeta23/LinAlg/HermitianPosPart.lean index c900970be1..3d9fbd3258 100644 --- a/zeta23/Zeta23/LinAlg/HermitianPosPart.lean +++ b/zeta23/Zeta23/LinAlg/HermitianPosPart.lean @@ -11,19 +11,14 @@ like all Lean code in this repository, written by Claude, under the direction of incorporated here unchanged; they have no upstream outside this project (see README § Provenance and attribution). -/ import Zeta23.LinAlg.PosIndex +import Mathlib.Analysis.Matrix.HermitianFunctionalCalculus +import Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.PosPart.Basic /-! # Positive and negative parts of a Hermitian matrix -For a Hermitian matrix `Q` with spectral decomposition `Q = U diag(λ) Uᴴ`, -define `Q₊ := U diag(λ⁺) Uᴴ` and `Q₋ := U diag(λ⁻) Uᴴ` where -`λ⁺ = max(λ,0)`, `λ⁻ = max(−λ,0)`. - -Then `Q = Q₊ − Q₋`, both are PSD, `Q₊ Q₋ = 0`, and `rank Q₊ = n₊(Q)`. - -This is equivalent to the CFC `Q⁺`/`Q⁻` via `Matrix.IsHermitian.cfc_eq`, but -the direct spectral construction keeps the eigenvalue bookkeeping explicit, -which is what the rank–trace proof needs. +Thin eigenvalue-bookkeeping layer over Mathlib's `Matrix.IsHermitian.cfc` +(`specMap hA f := hA.cfc f`, `hermPosPart hA := specMap hA (·⁺)`, `hermNegPart hA := specMap hA (·⁻)`). -/ noncomputable section @@ -36,41 +31,31 @@ namespace RHLinalg variable {𝕜 : Type*} [RCLike 𝕜] variable {n : Type*} [Fintype n] [DecidableEq n] -/-- Apply a real function to a Hermitian matrix via its spectral decomposition: -`specMap hA f := U diag(f ∘ λ) Uᴴ`. (This is `Matrix.IsHermitian.cfc`, reproduced -here to keep imports light and bookkeeping explicit.) -/ -def specMap {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f : ℝ → ℝ) : Matrix n n 𝕜 := - conjStarAlgAut 𝕜 _ hA.eigenvectorUnitary - (diagonal (fun i => (f (hA.eigenvalues i) : 𝕜))) +/-- Spectral functional calculus `U diag(f ∘ λ) Uᴴ`, backed by `Matrix.IsHermitian.cfc`. -/ +abbrev specMap {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f : ℝ → ℝ) : Matrix n n 𝕜 := + hA.cfc f lemma specMap_isHermitian {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f : ℝ → ℝ) : (specMap hA f).IsHermitian := by - unfold specMap - rw [conjStarAlgAut_apply] - refine isHermitian_mul_mul_conjTranspose _ ?_ - exact isHermitian_diagonal_of_self_adjoint _ (funext fun i => by simp [RCLike.star_def]) + rw [specMap, ← hA.cfc_eq]; exact cfc_predicate f A lemma specMap_id {A : Matrix n n 𝕜} (hA : A.IsHermitian) : specMap hA id = A := by - conv_rhs => rw [hA.spectral_theorem] - rfl + rw [specMap, ← hA.cfc_eq, cfc_id ℝ A] + +private lemma continuousOn_spectrum {A : Matrix n n 𝕜} (f : ℝ → ℝ) : + ContinuousOn f (spectrum ℝ A) := + continuousOn_iff_continuous_domRestrict.mpr (by fun_prop) lemma specMap_sub {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f g : ℝ → ℝ) : specMap hA (f - g) = specMap hA f - specMap hA g := by - unfold specMap - rw [← map_sub] - congr 1 - simp only [← diagonal_sub, Pi.sub_apply, RCLike.ofReal_sub] + simp only [specMap, ← hA.cfc_eq] + exact cfc_sub (f := f) (g := g) A (continuousOn_spectrum f) (continuousOn_spectrum g) lemma specMap_mul {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f g : ℝ → ℝ) : specMap hA (f * g) = specMap hA f * specMap hA g := by - unfold specMap - rw [← map_mul, diagonal_mul_diagonal] - simp only [Pi.mul_apply, RCLike.ofReal_mul] - -lemma specMap_zero {A : Matrix n n 𝕜} (hA : A.IsHermitian) : - specMap hA 0 = 0 := by - unfold specMap; simp + simp only [specMap, ← hA.cfc_eq] + exact cfc_mul (f := f) (g := g) A (continuousOn_spectrum f) (continuousOn_spectrum g) /-- The Hermitian form `xᴴ(specMap hA f)x` in eigenbasis coordinates: setting `c := Uᴴx`, we have `Re(xᴴ(specMap hA f)x) = ∑ᵢ f(λᵢ)·‖cᵢ‖²`. -/ @@ -81,15 +66,14 @@ lemma hermForm_specMap {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f : ℝ → ‖(star (hA.eigenvectorUnitary : Matrix n n 𝕜) *ᵥ x) i‖ ^ 2 := by set U : Matrix n n 𝕜 := ↑hA.eigenvectorUnitary set c := star U *ᵥ x with hc_def - -- `xᴴ U D Uᴴ x = cᴴ D c` where `c = Uᴴ x`, since `star x ᵥ* U = star c`. have hsc : star x ᵥ* U = star c := by rw [hc_def, star_mulVec, show (star U)ᴴ = U from conjTranspose_conjTranspose U] - unfold specMap + unfold specMap Matrix.IsHermitian.cfc rw [conjStarAlgAut_apply, ← Matrix.mulVec_mulVec, ← Matrix.mulVec_mulVec, dotProduct_mulVec (star x) U, hsc, ← hc_def, - show star c ⬝ᵥ (diagonal (fun i => (f (hA.eigenvalues i) : 𝕜)) *ᵥ c) + show star c ⬝ᵥ (diagonal (RCLike.ofReal ∘ f ∘ hA.eigenvalues) *ᵥ c) = ∑ i, (f (hA.eigenvalues i) : 𝕜) * (starRingEnd 𝕜 (c i) * c i) by - simp only [dotProduct, mulVec_diagonal, Pi.star_apply, RCLike.star_def] + simp only [dotProduct, mulVec_diagonal, Function.comp_apply, Pi.star_apply, RCLike.star_def] exact sum_congr rfl fun i _ => by ring] simp only [RCLike.conj_mul, map_sum] refine sum_congr rfl fun i _ => ?_ @@ -100,9 +84,8 @@ lemma hermForm_specMap {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f : ℝ → /-- The real-valued trace of `specMap hA f` is `∑ᵢ f(λᵢ)`. -/ lemma rtrace_specMap {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f : ℝ → ℝ) : rtrace (specMap hA f) = ∑ i, f (hA.eigenvalues i) := by - unfold specMap rtrace - rw [conjStarAlgAut_apply, trace_mul_cycle, coe_star_mul_self, one_mul, - trace_diagonal] + unfold specMap Matrix.IsHermitian.cfc rtrace + rw [conjStarAlgAut_apply, trace_mul_cycle, coe_star_mul_self, one_mul, trace_diagonal] simp /-- The squared Frobenius norm of `specMap hA f` is `∑ᵢ f(λᵢ)²`. -/ @@ -110,8 +93,7 @@ lemma frobSq_specMap {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f : ℝ → ℝ frobSq (specMap hA f) = ∑ i, (f (hA.eigenvalues i)) ^ 2 := by unfold frobSq rw [(specMap_isHermitian hA f).eq, ← specMap_mul, - show (f * f : ℝ → ℝ) = fun x => (f x) ^ 2 from funext fun x => by - simp only [Pi.mul_apply, sq]] + show (f * f : ℝ → ℝ) = fun x => (f x) ^ 2 from funext fun x => by simp [sq]] exact rtrace_specMap hA _ /-- The rank of `specMap hA f` is the number of `i` with `f(λᵢ) ≠ 0`. -/ @@ -123,37 +105,31 @@ lemma rank_specMap {A : Matrix n n 𝕜} (hA : A.IsHermitian) (f : ℝ → ℝ) rw [show star (hA.eigenvectorUnitary : Matrix n n 𝕜) = (hA.eigenvectorUnitary : Matrix n n 𝕜)ᴴ from rfl, det_conjTranspose] exact hdet.star - unfold specMap - rw [conjStarAlgAut_apply, - rank_mul_eq_left_of_isUnit_det _ _ hdet', - rank_mul_eq_right_of_isUnit_det _ _ hdet, - rank_diagonal] - simp only [ne_eq, RCLike.ofReal_eq_zero, Fintype.card_subtype] + unfold specMap Matrix.IsHermitian.cfc + rw [conjStarAlgAut_apply, rank_mul_eq_left_of_isUnit_det _ _ hdet', + rank_mul_eq_right_of_isUnit_det _ _ hdet, rank_diagonal] + simp only [Function.comp_apply, ne_eq, RCLike.ofReal_eq_zero, Fintype.card_subtype] /-- `specMap hA f` is PSD whenever `f(λᵢ) ≥ 0` for all `i`. -/ lemma specMap_posSemidef {A : Matrix n n 𝕜} (hA : A.IsHermitian) {f : ℝ → ℝ} (hf : ∀ i, 0 ≤ f (hA.eigenvalues i)) : (specMap hA f).PosSemidef := by - unfold specMap + unfold specMap Matrix.IsHermitian.cfc rw [conjStarAlgAut_apply] - refine (PosSemidef.diagonal ?_).mul_mul_conjTranspose_same _ - intro i - exact RCLike.ofReal_nonneg (K := 𝕜) |>.mpr (hf i) + exact (PosSemidef.diagonal fun i => RCLike.ofReal_nonneg.mpr (hf i)).mul_mul_conjTranspose_same _ section PosNegPart variable {A : Matrix n n 𝕜} (hA : A.IsHermitian) /-- Positive part `A₊ := U diag(λ⁺) Uᴴ`. -/ -def hermPosPart : Matrix n n 𝕜 := specMap hA (·⁺) +abbrev hermPosPart : Matrix n n 𝕜 := specMap hA (·⁺) /-- Negative part `A₋ := U diag(λ⁻) Uᴴ`. -/ -def hermNegPart : Matrix n n 𝕜 := specMap hA (·⁻) +abbrev hermNegPart : Matrix n n 𝕜 := specMap hA (·⁻) lemma hermPosPart_sub_hermNegPart : hermPosPart hA - hermNegPart hA = A := by - unfold hermPosPart hermNegPart - rw [← specMap_sub, show ((·⁺) - (·⁻) : ℝ → ℝ) = id from - funext fun x => posPart_sub_negPart x, specMap_id] + rw [← specMap_sub, show ((·⁺) - (·⁻) : ℝ → ℝ) = id from funext posPart_sub_negPart, specMap_id] lemma hermPosPart_posSemidef : (hermPosPart hA).PosSemidef := specMap_posSemidef hA fun _ => posPart_nonneg _ @@ -161,44 +137,24 @@ lemma hermPosPart_posSemidef : (hermPosPart hA).PosSemidef := lemma hermNegPart_posSemidef : (hermNegPart hA).PosSemidef := specMap_posSemidef hA fun _ => negPart_nonneg _ -private lemma real_posPart_mul_negPart (x : ℝ) : x⁺ * x⁻ = 0 := by - rcases le_total 0 x with h | h - · simp [negPart_eq_zero.mpr h] - · simp [posPart_eq_zero.mpr h] - lemma hermPosPart_mul_hermNegPart : hermPosPart hA * hermNegPart hA = 0 := by - unfold hermPosPart hermNegPart - rw [← specMap_mul, show ((·⁺) * (·⁻) : ℝ → ℝ) = 0 from - funext fun x => real_posPart_mul_negPart x, specMap_zero] + rw [← specMap_mul, specMap, ← hA.cfc_eq, + cfc_congr (g := 0) fun x _ => by rcases le_total 0 x with h | h <;> simp [h], cfc_zero] lemma hermNegPart_mul_hermPosPart : hermNegPart hA * hermPosPart hA = 0 := by - unfold hermPosPart hermNegPart - rw [← specMap_mul, show ((·⁻) * (·⁺) : ℝ → ℝ) = 0 from - funext fun x => by rw [Pi.mul_apply, mul_comm]; exact real_posPart_mul_negPart x, - specMap_zero] + rw [← specMap_mul, specMap, ← hA.cfc_eq, + cfc_congr (g := 0) fun x _ => by rcases le_total 0 x with h | h <;> simp [h], cfc_zero] lemma rank_hermPosPart : (hermPosPart hA).rank = posIndex hA := by - unfold hermPosPart posIndex - rw [rank_specMap] - congr 1; ext i + rw [rank_specMap]; unfold posIndex; congr 1; ext i simp only [mem_filter, mem_univ, true_and, ne_eq, posPart_eq_zero, not_le] lemma rtrace_hermPosPart : rtrace (hermPosPart hA) = ∑ i, (hA.eigenvalues i)⁺ := rtrace_specMap hA _ -lemma rtrace_hermNegPart : rtrace (hermNegPart hA) = ∑ i, (hA.eigenvalues i)⁻ := - rtrace_specMap hA _ - -lemma rtrace_sub_decomp : rtrace A = rtrace (hermPosPart hA) - rtrace (hermNegPart hA) := by - conv_lhs => rw [← hermPosPart_sub_hermNegPart hA] - simp [rtrace, trace_sub, map_sub] - lemma frobSq_hermPosPart : frobSq (hermPosPart hA) = ∑ i, ((hA.eigenvalues i)⁺) ^ 2 := frobSq_specMap hA _ -lemma frobSq_hermNegPart : frobSq (hermNegPart hA) = ∑ i, ((hA.eigenvalues i)⁻) ^ 2 := - frobSq_specMap hA _ - end PosNegPart end RHLinalg diff --git a/zeta23/Zeta23/LinAlg/Inertia.lean b/zeta23/Zeta23/LinAlg/Inertia.lean index 0d1de40376..d1ed463e28 100644 --- a/zeta23/Zeta23/LinAlg/Inertia.lean +++ b/zeta23/Zeta23/LinAlg/Inertia.lean @@ -45,46 +45,6 @@ namespace RHLinalg variable {𝕜 : Type*} [RCLike 𝕜] variable {m d : Type*} [Fintype m] [DecidableEq m] [Fintype d] [DecidableEq d] -/-- **Inertia under pull-back** (paper `lem:inertia`, matrix form). -For Hermitian `Q` and any matrix `B`, the pulled-back form `BᴴQB` has -positive index at most that of `Q`. -/ -theorem posIndex_conj_le {Q : Matrix m m 𝕜} (hQ : Q.IsHermitian) (B : Matrix m d 𝕜) : - posIndex (isHermitian_conjTranspose_mul_mul B hQ) ≤ posIndex hQ := by - set M := Bᴴ * Q * B - set hM : M.IsHermitian := isHermitian_conjTranspose_mul_mul B hQ - -- `Vp := range M₊`, dim = posIndex hM, M pos-def on it. - set Vp := LinearMap.range (hermPosPart hM).mulVecLin - have hdimV : Module.finrank 𝕜 Vp = posIndex hM := finrank_range_hermPosPart hM - have hposV : PosDefOn M Vp := posDefOn_range_hermPosPart hM - -- `B|_{Vp}` is injective (kernel vector `x ≠ 0` has `(Bx)ᴴQ(Bx) = xᴴMx > 0`, - -- so `Bx ≠ 0`). - set LB : (d → 𝕜) →ₗ[𝕜] (m → 𝕜) := B.mulVecLin - have hinj : Function.Injective (LB.domRestrict Vp) := by - rw [← LinearMap.ker_eq_bot, eq_bot_iff] - rintro ⟨x, hxV⟩ hxL - simp only [LinearMap.mem_ker, LinearMap.domRestrict_apply] at hxL - have hxL' : B *ᵥ x = 0 := hxL - simp only [mem_bot] - by_contra hne - have hne' : x ≠ 0 := fun h => hne (Subtype.ext h) - have hpos : 0 < hermForm M x := hposV x hxV hne' - rw [hermForm_conj Q B x, hxL'] at hpos - simp [hermForm] at hpos - -- `B(Vp) ⊆ 𝕜ᵐ` has `Q` pos-def on it. - have hposBV : PosDefOn Q (LinearMap.range (LB.domRestrict Vp)) := by - rintro _ ⟨⟨x, hxV⟩, rfl⟩ hne - simp only [LinearMap.domRestrict_apply, LB, mulVecLin_apply] at * - have hne' : x ≠ 0 := by - rintro rfl; apply hne; simp - rw [← hermForm_conj Q B x] - exact hposV x hxV hne' - -- Chain: posIndex hM = dim Vp = dim B(Vp) ≤ posIndex hQ. - calc posIndex hM - = Module.finrank 𝕜 Vp := hdimV.symm - _ = Module.finrank 𝕜 (LinearMap.range (LB.domRestrict Vp)) := - (LinearMap.finrank_range_of_inj hinj).symm - _ ≤ posIndex hQ := finrank_le_posIndex_of_posDefOn hQ hposBV - /-- **Subadditivity of the positive index** (paper §3, after `lem:inertia`). `n₊(Q₁ + Q₂) ≤ n₊(Q₁) + n₊(Q₂)`. -/ theorem posIndex_add_le {Q₁ Q₂ : Matrix m m 𝕜} diff --git a/zeta23/Zeta23/LinAlg/PosIndex.lean b/zeta23/Zeta23/LinAlg/PosIndex.lean index 7c04c5ff37..c37014eab0 100644 --- a/zeta23/Zeta23/LinAlg/PosIndex.lean +++ b/zeta23/Zeta23/LinAlg/PosIndex.lean @@ -41,19 +41,11 @@ dimension of a subspace on which the form `x ↦ xᴴAx` is positive definite. - def posIndex {A : Matrix n n 𝕜} (hA : A.IsHermitian) : ℕ := #{i | 0 < hA.eigenvalues i} -/-- The negative index `n₋(A)`: the number of strictly negative eigenvalues. -/ -def negIndex {A : Matrix n n 𝕜} (hA : A.IsHermitian) : ℕ := - #{i | hA.eigenvalues i < 0} - /-- The thresholded positive index `n₊^θ(A)`: the number of eigenvalues strictly above `θ`. `posIndexAbove hA 0 = posIndex hA`. -/ def posIndexAbove {A : Matrix n n 𝕜} (hA : A.IsHermitian) (θ : ℝ) : ℕ := #{i | θ < hA.eigenvalues i} -lemma posIndex_le_card {A : Matrix n n 𝕜} (hA : A.IsHermitian) : - posIndex hA ≤ Fintype.card n := - (card_filter_le _ _).trans_eq card_univ - /-- For a PSD Hermitian matrix the positive index is the rank (every nonzero eigenvalue is positive). -/ lemma posIndex_eq_rank_of_posSemidef {A : Matrix n n 𝕜} (hA : A.PosSemidef) : diff --git a/zeta23/Zeta23/LinAlg/RankTrace.lean b/zeta23/Zeta23/LinAlg/RankTrace.lean index abc3f005da..661dddc96a 100644 --- a/zeta23/Zeta23/LinAlg/RankTrace.lean +++ b/zeta23/Zeta23/LinAlg/RankTrace.lean @@ -10,7 +10,6 @@ were produced first, as a self-contained development (namespace `RHLinalg`) acco like all Lean code in this repository, written by Claude, under the direction of the paper's authors — and are incorporated here unchanged; they have no upstream outside this project (see README § Provenance and attribution). -/ -import Zeta23.LinAlg.PosIndex import Zeta23.LinAlg.VonNeumann import Zeta23.LinAlg.HermitianPosPart diff --git a/zeta23/Zeta23/LinAlg/Sylvester.lean b/zeta23/Zeta23/LinAlg/Sylvester.lean index f7ecf0e44a..35567f962f 100644 --- a/zeta23/Zeta23/LinAlg/Sylvester.lean +++ b/zeta23/Zeta23/LinAlg/Sylvester.lean @@ -47,15 +47,6 @@ def hermForm (A : Matrix n n 𝕜) (x : n → 𝕜) : ℝ := def PosDefOn (A : Matrix n n 𝕜) (W : Submodule 𝕜 (n → 𝕜)) : Prop := ∀ x ∈ W, x ≠ 0 → 0 < hermForm A x -omit [DecidableEq n] in -lemma hermForm_conj {m : Type*} [Fintype m] [DecidableEq m] - (Q : Matrix n n 𝕜) (B : Matrix n m 𝕜) (x : m → 𝕜) : - hermForm (Bᴴ * Q * B) x = hermForm Q (B *ᵥ x) := by - unfold hermForm - congr 2 - rw [← mulVec_mulVec, ← mulVec_mulVec, dotProduct_mulVec (star x) Bᴴ, - ← star_mulVec] - omit [DecidableEq n] in lemma hermForm_add (A B : Matrix n n 𝕜) (x : n → 𝕜) : hermForm (A + B) x = hermForm A x + hermForm B x := by @@ -131,12 +122,12 @@ theorem posDefOn_range_hermPosPart {A : Matrix n n 𝕜} (hA : A.IsHermitian) : -- `c := Uᴴ · z = Uᴴ·U·diag(λ⁺)·Uᴴ·y = diag(λ⁺)·d`, so `cᵢ = λᵢ⁺·dᵢ`. have hc_eq : star U *ᵥ z = fun i => (((hA.eigenvalues i)⁺ : ℝ) : 𝕜) * d i := by have hz' : z = hermPosPart hA *ᵥ y := rfl - rw [hz']; unfold hermPosPart specMap + rw [hz']; unfold hermPosPart specMap Matrix.IsHermitian.cfc rw [conjStarAlgAut_apply, Matrix.mulVec_mulVec, ← mul_assoc, ← mul_assoc, Unitary.star_mul_self_of_mem hA.eigenvectorUnitary.2, one_mul, ← Matrix.mulVec_mulVec, ← hd_def] funext i - simp only [mulVec, diagonal_dotProduct] + simp only [mulVec, diagonal_dotProduct, Function.comp_apply] -- `hermForm A z = ∑ᵢ λᵢ · ‖(Uᴴz)ᵢ‖² = ∑ᵢ λᵢ · (λᵢ⁺)² · ‖dᵢ‖²`. have hformA : hermForm A z = ∑ i, hA.eigenvalues i * ((hA.eigenvalues i)⁺) ^ 2 * ‖d i‖ ^ 2 := by @@ -193,7 +184,7 @@ lemma sum_normSq_unitary_mulVec {A : Matrix n n 𝕜} (hA : A.IsHermitian) simp only [Pi.one_apply, one_mul] at h rw [← h, ← hermForm_one x] unfold hermForm - rw [show specMap hA 1 = (1 : Matrix n n 𝕜) by unfold specMap; simp] + rw [show specMap hA 1 = (1 : Matrix n n 𝕜) by rw [specMap, ← hA.cfc_eq, cfc_one ℝ A]] /-- `hermForm A x ≤ θ · ‖x‖²` whenever every eigenvalue of `A` is `≤ θ`. Equivalently, `A ⪯ θ·I`. -/ @@ -225,12 +216,12 @@ theorem hermForm_gt_on_range_truncPos {A : Matrix n n 𝕜} (hA : A.IsHermitian) -- `c := Uᴴz = diag(g∘λ)·d`, so `cᵢ = g(λᵢ)·dᵢ`, vanishing where `λᵢ ≤ θ`. have hc_eq : star U *ᵥ z = fun i => ((g (hA.eigenvalues i) : ℝ) : 𝕜) * d i := by have hz' : z = specMap hA g *ᵥ y := rfl - rw [hz']; unfold specMap + rw [hz']; unfold specMap Matrix.IsHermitian.cfc rw [conjStarAlgAut_apply, Matrix.mulVec_mulVec, ← mul_assoc, ← mul_assoc, Unitary.star_mul_self_of_mem hA.eigenvectorUnitary.2, one_mul, ← Matrix.mulVec_mulVec, ← hd_def] funext i - simp only [mulVec, diagonal_dotProduct] + simp only [mulVec, diagonal_dotProduct, Function.comp_apply] -- `hermForm A z = ∑ᵢ λᵢ·(g(λᵢ))²·‖dᵢ‖²` and `‖z‖² = ∑ᵢ (g(λᵢ))²·‖dᵢ‖²`. have hformA : hermForm A z = ∑ i, hA.eigenvalues i * (g (hA.eigenvalues i)) ^ 2 * ‖d i‖ ^ 2 := by diff --git a/zeta23/Zeta23/LinAlg/VonNeumann.lean b/zeta23/Zeta23/LinAlg/VonNeumann.lean index 193d1bb8af..a07ee811ca 100644 --- a/zeta23/Zeta23/LinAlg/VonNeumann.lean +++ b/zeta23/Zeta23/LinAlg/VonNeumann.lean @@ -129,11 +129,6 @@ end Bilinear section Rearrangement -/-- Two antitone functions on a linear order monovary. -/ -lemma _root_.Antitone.monovary_antitone {ι α : Type*} [LinearOrder ι] [Preorder α] - {f g : ι → α} (hf : Antitone f) (hg : Antitone g) : Monovary f g := - fun _ _ hgij => hf (not_lt.mp fun hij => hgij.not_ge (hg hij.le)) - /-- The core combinatorial step: for `a, b : n → ℝ` that monovary and `S` doubly stochastic, `∑ₖₗ aₖ Sₖₗ bₗ ≤ ∑ₖ aₖ bₖ`. @@ -197,7 +192,7 @@ theorem vonNeumann_trace_ineq {A B : Matrix n n 𝕜} rw [hre] -- Step 3: apply the doubly-stochastic bilinear bound. refine bilinear_doublyStochastic_le_of_monovary ?_ ?_ - · exact hA.eigenvalues₀_antitone.monovary_antitone hB.eigenvalues₀_antitone + · exact hA.eigenvalues₀_antitone.monovary hB.eigenvalues₀_antitone · -- Reindexed `normSqMatrix W` is still doubly stochastic. exact reindex_mem_doublyStochastic (e₁ := e.symm) (e₂ := e.symm) hDS diff --git a/zeta23/Zeta23/LinAlg/Weyl.lean b/zeta23/Zeta23/LinAlg/Weyl.lean index 4ba23d82fb..894e591628 100644 --- a/zeta23/Zeta23/LinAlg/Weyl.lean +++ b/zeta23/Zeta23/LinAlg/Weyl.lean @@ -10,7 +10,6 @@ were produced first, as a self-contained development (namespace `RHLinalg`) acco like all Lean code in this repository, written by Claude, under the direction of the paper's authors — and are incorporated here unchanged; they have no upstream outside this project (see README § Provenance and attribution). -/ -import Zeta23.LinAlg.PosIndex import Zeta23.LinAlg.Sylvester import Mathlib.Algebra.Order.Chebyshev diff --git a/zeta23/Zeta23/MV/Duality.lean b/zeta23/Zeta23/MV/Duality.lean index c6f84251a3..f496645808 100644 --- a/zeta23/Zeta23/MV/Duality.lean +++ b/zeta23/Zeta23/MV/Duality.lean @@ -80,10 +80,10 @@ lemma star_dotProduct_mulVec_eq {A : Matrix ι ι ℂ} (hA : A.IsHermitian) (x : have hsc : star x ᵥ* U = star c := by rw [hc_def, star_mulVec, show (star U)ᴴ = U from conjTranspose_conjTranspose U] conv_lhs => rw [← RHLinalg.specMap_id hA] - unfold RHLinalg.specMap + unfold RHLinalg.specMap Matrix.IsHermitian.cfc rw [conjStarAlgAut_apply, ← Matrix.mulVec_mulVec, ← Matrix.mulVec_mulVec, dotProduct_mulVec (star x) U, hsc, ← hc_def] - simp only [id, dotProduct, mulVec_diagonal, Pi.star_apply, Complex.star_def] + simp only [id, dotProduct, mulVec_diagonal, Function.comp_apply, Pi.star_apply, Complex.star_def] push_cast refine Finset.sum_congr rfl fun i _ => ?_ rw [← Complex.conj_mul', mul_left_comm] diff --git a/zeta23/Zeta23/MV/Eigen.lean b/zeta23/Zeta23/MV/Eigen.lean index a9c00efa5b..4d0f956e80 100644 --- a/zeta23/Zeta23/MV/Eigen.lean +++ b/zeta23/Zeta23/MV/Eigen.lean @@ -27,20 +27,6 @@ namespace MV variable {ι : Type*} [Fintype ι] [DecidableEq ι] {freq δ : ι → ℝ} -/-- **Step 2, Preissmann–Lévêque identity.** Only injectivity of `freq` and -positivity of `c` are needed. `heig` is the eigen-relation `(H u)_m = iμ u_m` for the -skew-Hermitian `H_{mn} = c_m c_n/(freq m − freq n)`. -/ -theorem eigen_identity (hinj : Function.Injective freq) (c : ι → ℝ) (hc : ∀ r, 0 < c r) - (u : ι → ℂ) (μ : ℝ) - (heig : ∀ m, ∑ n ∈ Finset.univ.erase m, - ((c m * c n / (freq m - freq n) : ℝ) : ℂ) * u n = (μ : ℂ) * Complex.I * u m) - (m : ι) : - μ ^ 2 * ‖u m‖ ^ 2 = - (∑ n ∈ Finset.univ.erase m, (c m * c n) ^ 2 * ‖u n‖ ^ 2 / (freq m - freq n) ^ 2) - + 2 * ∑ n ∈ Finset.univ.erase m, - c m ^ 3 * c n * (u m * conj (u n)).re / (freq m - freq n) ^ 2 := - eigen_identity' hinj c hc u μ heig m - /-- **Step 3, eigenvalue bound**: every eigenvalue of the normalized matrix (`c = √δ`) with a unit eigenvector has `|μ| ≤ 13`. -/ theorem eigen_bound (h : Adm freq δ) (u : ι → ℂ) (hu : ∑ n, ‖u n‖ ^ 2 = 1) (μ : ℝ) diff --git a/zeta23/Zeta23/MV/Spacing.lean b/zeta23/Zeta23/MV/Spacing.lean index d1dc640c83..c697ddf4cf 100644 --- a/zeta23/Zeta23/MV/Spacing.lean +++ b/zeta23/Zeta23/MV/Spacing.lean @@ -54,6 +54,7 @@ lemma centers_far (h : Adm freq δ) {t t' : ι} (htt : t ≠ t') : rw [abs_sub_comm] at h2 rcases le_total (δ t) (δ t') with hd | hd <;> linarith +omit [Fintype ι] [DecidableEq ι] in /-- The intervals are pairwise disjoint. -/ lemma itv_disjoint (h : Adm freq δ) : Set.univ.PairwiseDisjoint (fun t : ι => Adm.itv (freq := freq) (δ := δ) t) := by @@ -86,63 +87,26 @@ lemma abs_le_of_mem_itv (h : Adm freq δ) {s t : ι} (hts : t ≠ s) {u : ℝ} rw [abs_sub_comm u (freq s)] linarith -/-- Closed-form tail integrals: `∫_{Icc a b} (u−c)⁻² du = (a−c)⁻¹ − (b−c)⁻¹` for `c ∉ [a,b]`. -/ -lemma integral_inv_sq_Icc {a b c : ℝ} (hab : a ≤ b) (hc : c < a ∨ b < c) : - ∫ u in Set.Icc a b, ((u - c) ^ 2)⁻¹ = (a - c)⁻¹ - (b - c)⁻¹ := by - have h0 : (0:ℝ) ∉ Set.uIcc (a - c) (b - c) := by - rw [Set.mem_uIcc] - rcases hc with hc | hc - · push Not; constructor <;> intro <;> nlinarith - · push Not; constructor <;> intro <;> nlinarith +/-- Closed-form tail integral: `∫_{Icc a b} (u−c)^{-2m} du = ((a−c)^{-(2m-1)} − (b−c)^{-(2m-1)})/(2m-1)` +for `m ≥ 1` and `c ∉ [a,b]`. -/ +lemma integral_inv_even_pow_Icc {a b c : ℝ} (hab : a ≤ b) (hc : c < a ∨ b < c) {m : ℕ} (hm : 0 < m) : + ∫ u in Set.Icc a b, ((u - c) ^ (2 * m))⁻¹ + = ((a - c) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) - ((b - c) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) := by + have h0 : (0 : ℝ) ∉ Set.uIcc (a - c) (b - c) := by + rw [Set.mem_uIcc]; rcases hc with hc | hc <;> (push Not; constructor <;> intro <;> linarith) rw [MeasureTheory.integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hab] - have e1 : ∀ u : ℝ, ((u - c) ^ 2)⁻¹ = (u - c) ^ (-2 : ℤ) := by - intro u; rw [zpow_neg]; norm_cast + have e1 : ∀ u : ℝ, ((u - c) ^ (2 * m))⁻¹ = (u - c) ^ (-(2 * m : ℤ)) := fun u => by + rw [zpow_neg]; norm_cast simp_rw [e1] - rw [intervalIntegral.integral_comp_sub_right (fun x => x ^ (-2:ℤ)) c, - integral_zpow (Or.inr ⟨by norm_num, h0⟩)] - norm_num [zpow_neg] + have hne : (-(2 * m : ℤ)) ≠ -1 := by omega + rw [intervalIntegral.integral_comp_sub_right (fun x => x ^ (-(2 * m : ℤ))) c, + integral_zpow (Or.inr ⟨hne, h0⟩)] + have hexp : (-(2 * m : ℤ) + 1) = -((2 * m - 1 : ℕ) : ℤ) := by omega + rw [hexp, zpow_neg, zpow_neg, zpow_natCast, zpow_natCast, + show (((-(2 * (m : ℤ)) : ℤ) : ℝ) + 1) = -(2 * (m : ℝ) - 1) by push_cast; ring, + div_neg] ring -/-- `∫_{Icc a b} (u−c)⁻⁴ du = ((a−c)⁻³ − (b−c)⁻³)/3` for `c ∉ [a,b]`. -/ -lemma integral_inv_four_Icc {a b c : ℝ} (hab : a ≤ b) (hc : c < a ∨ b < c) : - ∫ u in Set.Icc a b, ((u - c) ^ 4)⁻¹ = ((a - c) ^ (3:ℕ))⁻¹ / 3 - ((b - c) ^ (3:ℕ))⁻¹ / 3 := by - have h0 : (0:ℝ) ∉ Set.uIcc (a - c) (b - c) := by - rw [Set.mem_uIcc] - rcases hc with hc | hc - · push Not; constructor <;> intro <;> nlinarith - · push Not; constructor <;> intro <;> nlinarith - rw [MeasureTheory.integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hab] - have e1 : ∀ u : ℝ, ((u - c) ^ 4)⁻¹ = (u - c) ^ (-4 : ℤ) := by - intro u; rw [zpow_neg]; norm_cast - simp_rw [e1] - rw [intervalIntegral.integral_comp_sub_right (fun x => x ^ (-4:ℤ)) c, - integral_zpow (Or.inr ⟨by norm_num, h0⟩)] - norm_num [zpow_neg] - norm_cast - push_cast - set A := ((b - c) ^ (3:ℕ))⁻¹ - set B := ((a - c) ^ (3:ℕ))⁻¹ - linarith - -omit [Fintype ι] [DecidableEq ι] in -/-- Closed-interval version of the membership bounds (for use on closures `J t`). -/ -lemma abs_bounds_closed (h : Adm freq δ) {s t : ι} (hts : t ≠ s) {u : ℝ} - (hut : |u - freq t| ≤ δ t / 2) : - |freq s - u| ≤ 3 / 2 * |freq s - freq t| ∧ δ s / 2 ≤ |u - freq s| := by - have hst : δ t ≤ |freq s - freq t| := by rw [abs_sub_comm]; exact h.le t s hts - have hss : δ s ≤ |freq s - freq t| := h.le s t (Ne.symm hts) - constructor - · calc |freq s - u| = |(freq s - freq t) + (freq t - u)| := by ring_nf - _ ≤ |freq s - freq t| + |freq t - u| := abs_add_le _ _ - _ = |freq s - freq t| + |u - freq t| := by rw [abs_sub_comm (freq t) u] - _ ≤ |freq s - freq t| + δ t / 2 := by linarith - _ ≤ 3 / 2 * |freq s - freq t| := by linarith - · have key : |freq s - freq t| ≤ |freq s - u| + |u - freq t| := by - calc |freq s - freq t| = |(freq s - u) + (u - freq t)| := by ring_nf - _ ≤ |freq s - u| + |u - freq t| := abs_add_le _ _ - rw [abs_sub_comm u (freq s)] - linarith - section MainSpacing variable (h : Adm freq δ) (s : ι) @@ -150,300 +114,132 @@ variable (h : Adm freq δ) (s : ι) private def window (freq δ : ι → ℝ) (s : ι) (R : ℝ) : Set ℝ := Set.Icc (freq s - R) (freq s - δ s / 2) ∪ Set.Icc (freq s + δ s / 2) (freq s + R) +omit [Fintype ι] [DecidableEq ι] in private lemma mem_window (h : Adm freq δ) {s t : ι} (hts : t ≠ s) {R : ℝ} (hR : 3 / 2 * |freq s - freq t| ≤ R) {u : ℝ} (hu : u ∈ Adm.itv (freq := freq) (δ := δ) t) : u ∈ window freq δ s R := by have hb := h.abs_le_of_mem_itv hts hu - have h1 : |u - freq s| ≤ R := by - rw [abs_sub_comm]; exact hb.1.trans hR + have h1 : |u - freq s| ≤ R := by rw [abs_sub_comm]; exact hb.1.trans hR rcases le_total u (freq s) with hle | hle · left - rw [abs_of_nonpos (by linarith : u - freq s ≤ 0)] at h1 - rw [abs_of_nonpos (by linarith : u - freq s ≤ 0)] at hb + rw [abs_of_nonpos (by linarith : u - freq s ≤ 0)] at h1 hb exact ⟨by linarith, by linarith [hb.2]⟩ · right - rw [abs_of_nonneg (by linarith : 0 ≤ u - freq s)] at h1 - rw [abs_of_nonneg (by linarith : 0 ≤ u - freq s)] at hb + rw [abs_of_nonneg (by linarith : 0 ≤ u - freq s)] at h1 hb exact ⟨by linarith [hb.2], by linarith⟩ omit [Fintype ι] [DecidableEq ι] in -private lemma window_integrable {s : ι} {R : ℝ} (hδs : 0 < δ s) {k : ℕ} (_hk : k ≠ 0) : +private lemma window_integrable {s : ι} {R : ℝ} (hδs : 0 < δ s) {k : ℕ} : MeasureTheory.IntegrableOn (fun u => ((u - freq s) ^ k)⁻¹) (window freq δ s R) := by - have hcompact : IsCompact (window freq δ s R) := (isCompact_Icc).union isCompact_Icc - refine ContinuousOn.integrableOn_compact hcompact ?_ - have hne : ∀ u ∈ window freq δ s R, (u - freq s) ^ k ≠ 0 := by - intro u hu - apply pow_ne_zero - rcases hu with hu | hu - · simp only [Set.mem_Icc] at hu; intro hh; nlinarith [hu.2] - · simp only [Set.mem_Icc] at hu; intro hh; nlinarith [hu.1] - exact ((continuous_sub_right (freq s)).pow k).continuousOn.inv₀ hne + refine ContinuousOn.integrableOn_compact (isCompact_Icc.union isCompact_Icc) + (((continuous_sub_right (freq s)).pow k).continuousOn.inv₀ fun u hu => pow_ne_zero k ?_) + rcases hu with hu | hu <;> (simp only [Set.mem_Icc] at hu; intro hh; linarith) -/-- **Spacing lemma, σ = 2**: `Σ_{t≠s} δ t/(freq s − freq t)² ≤ 9/δ s`. -/ -theorem spacing_sq (h : Adm freq δ) (s : ι) : - ∑ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ 2 ≤ 9 / δ s := by +/-- **Unified even-power spacing lemma** (`σ = 2m`, `m ≥ 1`): +`Σ_{t≠s} δ t / (freq s − freq t)^{2m} ≤ 3^{2m} / ((2m − 1) · (δ s)^{2m − 1})`. -/ +theorem spacing_even_pow (h : Adm freq δ) (s : ι) (m : ℕ) (hm : 0 < m) : + ∑ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ (2 * m) + ≤ 3 ^ (2 * m) / ((2 * m - 1 : ℝ) * δ s ^ (2 * m - 1)) := by classical have hδs := h.pos s - rcases Finset.eq_empty_or_nonempty (Finset.univ.erase s) with he | hne + have hm1 : (0 : ℝ) < 2 * m - 1 := by + have : (1 : ℝ) ≤ m := by exact_mod_cast hm + linarith + rcases Finset.eq_empty_or_nonempty (Finset.univ.erase s) with he | ⟨t₀, ht₀⟩ · rw [he, Finset.sum_empty]; positivity - obtain ⟨t₀, ht₀⟩ := hne - set g : ℝ → ℝ := fun u => ((u - freq s) ^ 2)⁻¹ with hg - set M : ℝ := Finset.univ.sup' ⟨s, Finset.mem_univ s⟩ (fun t => |freq s - freq t|) with hM + set g : ℝ → ℝ := fun u => ((u - freq s) ^ (2 * m))⁻¹ + set M : ℝ := Finset.univ.sup' ⟨s, Finset.mem_univ s⟩ (fun t => |freq s - freq t|) set R : ℝ := 3 / 2 * M + 1 with hR have hMle : ∀ t : ι, |freq s - freq t| ≤ M := fun t => Finset.le_sup' (fun r => |freq s - freq r|) (Finset.mem_univ t) - have hM0 : 0 ≤ M := le_trans (abs_nonneg _) (hMle s) have hδM : δ s ≤ M := (h.le s t₀ (Finset.ne_of_mem_erase ht₀).symm).trans (hMle t₀) have hRδ : δ s / 2 ≤ R := by linarith - -- integrability on the window have hintW : MeasureTheory.IntegrableOn g (window freq δ s R) := - window_integrable (freq := freq) (δ := δ) hδs two_ne_zero - -- each interval sits in the window - have hsub : ∀ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t ⊆ window freq δ s R := by - intro t ht u hu - exact mem_window h (Finset.ne_of_mem_erase ht) (by linarith [hMle t]) hu - -- per-term comparison - have hper : ∀ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ 2 - ≤ 9 / 4 * ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by + window_integrable (freq := freq) (δ := δ) hδs + have hsub : ∀ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t ⊆ window freq δ s R := + fun t ht _ hu => mem_window h (Finset.ne_of_mem_erase ht) (by linarith [hMle t]) hu + have heven : ∀ x : ℝ, x ^ (2 * m) = |x| ^ (2 * m) := fun x => by + rw [pow_mul, pow_mul, sq_abs] + have hper : ∀ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ (2 * m) + ≤ (3 / 2 : ℝ) ^ (2 * m) * ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by intro t ht have hts : t ≠ s := Finset.ne_of_mem_erase ht - have hfst : (freq s - freq t) ≠ 0 := sub_ne_zero.2 fun hh => hts (h.inj hh.symm) - have hpos2 : 0 < (freq s - freq t) ^ 2 := pow_two_pos_of_ne_zero hfst + have hfst : 0 < |freq s - freq t| := abs_pos.2 (sub_ne_zero.2 fun hh => hts (h.inj hh.symm)) have hδt := h.pos t have hlow : ∀ u ∈ Adm.itv (freq := freq) (δ := δ) t, - (9 / 4 * (freq s - freq t) ^ 2)⁻¹ ≤ g u := by + ((3 / 2 : ℝ) ^ (2 * m) * (freq s - freq t) ^ (2 * m))⁻¹ ≤ g u := by intro u hu have hb := h.abs_le_of_mem_itv hts hu have hu0 : 0 < |u - freq s| := lt_of_lt_of_le (by linarith) hb.2 - have hsq : (u - freq s) ^ 2 ≤ 9 / 4 * (freq s - freq t) ^ 2 := by - have h1 : |u - freq s| ≤ 3 / 2 * |freq s - freq t| := by - rw [abs_sub_comm]; exact hb.1 - calc (u - freq s) ^ 2 = |u - freq s| ^ 2 := (sq_abs _).symm - _ ≤ (3 / 2 * |freq s - freq t|) ^ 2 := by gcongr - _ = 9 / 4 * |freq s - freq t| ^ 2 := by ring - _ = 9 / 4 * (freq s - freq t) ^ 2 := by rw [sq_abs] - have hupos : 0 < (u - freq s) ^ 2 := pow_two_pos_of_ne_zero (abs_pos.1 hu0) - show _ ≤ ((u - freq s) ^ 2)⁻¹ - exact (inv_le_inv₀ (by positivity) hupos).2 hsq - have hintT : MeasureTheory.IntegrableOn g (Adm.itv (freq := freq) (δ := δ) t) := - hintW.mono_set (hsub t ht) - have h1 : ∫ _u in Adm.itv (freq := freq) (δ := δ) t, (9 / 4 * (freq s - freq t) ^ 2)⁻¹ - ≤ ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by - apply MeasureTheory.setIntegral_mono_on - · exact MeasureTheory.integrableOn_const (by simp [Adm.itv]) - · exact hintT - · exact measurableSet_Ioo - · exact hlow - rw [MeasureTheory.setIntegral_const, smul_eq_mul] at h1 + have hpow : (u - freq s) ^ (2 * m) ≤ (3 / 2 : ℝ) ^ (2 * m) * (freq s - freq t) ^ (2 * m) := by + rw [heven (u - freq s), heven (freq s - freq t), ← mul_pow, abs_sub_comm u] + exact pow_le_pow_left₀ (abs_nonneg _) hb.1 (2 * m) + exact (inv_le_inv₀ (mul_pos (by positivity) (by rw [heven]; positivity)) + (by rw [heven]; positivity)).2 hpow + have h1 := MeasureTheory.setIntegral_mono_on + (MeasureTheory.integrableOn_const (by simp [Adm.itv])) + (hintW.mono_set (hsub t ht)) measurableSet_Ioo hlow have hvol : (volume (Adm.itv (freq := freq) (δ := δ) t)).toReal = δ t := by - rw [Adm.itv, Real.volume_Ioo, ENNReal.toReal_ofReal (by linarith)] - ring - rw [MeasureTheory.measureReal_def, hvol] at h1 - calc δ t / (freq s - freq t) ^ 2 - = 9 / 4 * (δ t * (9 / 4 * (freq s - freq t) ^ 2)⁻¹) := by + rw [Adm.itv, Real.volume_Ioo, ENNReal.toReal_ofReal (by linarith)]; ring + rw [MeasureTheory.setIntegral_const, smul_eq_mul, MeasureTheory.measureReal_def, hvol] at h1 + calc δ t / (freq s - freq t) ^ (2 * m) + = (3 / 2 : ℝ) ^ (2 * m) * (δ t * ((3 / 2 : ℝ) ^ (2 * m) * (freq s - freq t) ^ (2 * m))⁻¹) := by field_simp - _ ≤ 9 / 4 * ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by - gcongr - -- sum the comparisons, merge the disjoint intervals, pass to the window - have hdisj : (↑(Finset.univ.erase s) : Set ι).PairwiseDisjoint - (fun t => Adm.itv (freq := freq) (δ := δ) t) := - (h.itv_disjoint).subset (Set.subset_univ _) + _ ≤ (3 / 2 : ℝ) ^ (2 * m) * ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by gcongr have hsum : ∑ t ∈ Finset.univ.erase s, ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u - = ∫ u in ⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t, g u := by - rw [MeasureTheory.integral_biUnion_finset] - · exact fun t _ => measurableSet_Ioo - · exact hdisj - · exact fun t ht => hintW.mono_set (hsub t ht) - have hUsub : (⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t) - ⊆ window freq δ s R := by - simp only [Set.iUnion_subset_iff] - exact fun t ht => hsub t ht + = ∫ u in ⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t, g u := + (MeasureTheory.integral_biUnion_finset (Finset.univ.erase s) (fun _ _ => measurableSet_Ioo) + (h.itv_disjoint.subset (Set.subset_univ _)) (fun t ht => hintW.mono_set (hsub t ht))).symm have hUmono : ∫ u in ⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t, g u - ≤ ∫ u in window freq δ s R, g u := by - apply MeasureTheory.setIntegral_mono_set hintW - · exact Filter.Eventually.of_forall fun u => by positivity - · exact Filter.Eventually.of_forall hUsub - -- evaluate the window integral - have hwindow : ∫ u in window freq δ s R, g u ≤ 4 / δ s := by + ≤ ∫ u in window freq δ s R, g u := + MeasureTheory.setIntegral_mono_set hintW + (Filter.Eventually.of_forall fun u => by simp only [g]; rw [heven]; positivity) + (Filter.Eventually.of_forall (Set.iUnion₂_subset hsub)) + have hwindow : ∫ u in window freq δ s R, g u + ≤ 2 * ((δ s / 2) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) := by have hd : Disjoint (Set.Icc (freq s - R) (freq s - δ s / 2)) (Set.Icc (freq s + δ s / 2) (freq s + R)) := by - rw [Set.disjoint_left] - intro u hu hu' - simp only [Set.mem_Icc] at hu hu' - linarith [hu.2, hu'.1] - have hil : MeasureTheory.IntegrableOn g (Set.Icc (freq s - R) (freq s - δ s / 2)) := - hintW.mono_set Set.subset_union_left - have hir : MeasureTheory.IntegrableOn g (Set.Icc (freq s + δ s / 2) (freq s + R)) := - hintW.mono_set Set.subset_union_right - rw [window, MeasureTheory.setIntegral_union hd measurableSet_Icc hil hir] + rw [Set.disjoint_left]; intro u hu hu'; simp only [Set.mem_Icc] at hu hu'; linarith + rw [window, MeasureTheory.setIntegral_union hd measurableSet_Icc + (hintW.mono_set Set.subset_union_left) (hintW.mono_set Set.subset_union_right)] + have hodd : Odd (2 * m - 1) := ⟨m - 1, by omega⟩ have hleft : ∫ u in Set.Icc (freq s - R) (freq s - δ s / 2), g u - = (- R)⁻¹ + (δ s / 2)⁻¹ := by - rw [hg] - rw [integral_inv_sq_Icc (by linarith) (Or.inr (by linarith))] - have e1 : freq s - R - freq s = -R := by ring - have e2 : freq s - δ s / 2 - freq s = -(δ s / 2) := by ring - rw [e1, e2] - rw [inv_neg] + = ((δ s / 2) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) - (R ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) := by + rw [integral_inv_even_pow_Icc (by linarith) (Or.inr (by linarith)) hm, + show freq s - R - freq s = -R by ring, show freq s - δ s / 2 - freq s = -(δ s / 2) by ring, + hodd.neg_pow, hodd.neg_pow, inv_neg, inv_neg] ring have hright : ∫ u in Set.Icc (freq s + δ s / 2) (freq s + R), g u - = (δ s / 2)⁻¹ - R⁻¹ := by - rw [hg] - rw [integral_inv_sq_Icc (by linarith) (Or.inl (by linarith))] - have e1 : freq s + δ s / 2 - freq s = δ s / 2 := by ring - have e2 : freq s + R - freq s = R := by ring - rw [e1, e2] + = ((δ s / 2) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) - (R ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) := by + rw [integral_inv_even_pow_Icc (by linarith) (Or.inl (by linarith)) hm, + show freq s + δ s / 2 - freq s = δ s / 2 by ring, show freq s + R - freq s = R by ring] rw [hleft, hright] have hR0 : 0 < R := by linarith - have : (δ s / 2)⁻¹ = 2 / δ s := by field_simp - rw [this, inv_neg] - have hRi : 0 < R⁻¹ := by positivity - have h4 : 4 / δ s = 2 / δ s + 2 / δ s := by ring - linarith - -- assemble - calc ∑ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ 2 - ≤ ∑ t ∈ Finset.univ.erase s, 9 / 4 * ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := - Finset.sum_le_sum hper - _ = 9 / 4 * ∑ t ∈ Finset.univ.erase s, ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by - rw [Finset.mul_sum] - _ = 9 / 4 * ∫ u in ⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t, g u := by - rw [hsum] - _ ≤ 9 / 4 * (4 / δ s) := by - have := hUmono.trans hwindow - gcongr - _ = 9 / δ s := by field_simp - -end MainSpacing + have : 0 < (R ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) := by positivity + linarith [show 2 * ((δ s / 2) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) + = ((δ s / 2) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) + ((δ s / 2) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ) by ring] + calc ∑ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ (2 * m) + ≤ (3 / 2 : ℝ) ^ (2 * m) * ∑ t ∈ Finset.univ.erase s, ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by + rw [Finset.mul_sum]; exact Finset.sum_le_sum hper + _ ≤ (3 / 2 : ℝ) ^ (2 * m) * (2 * ((δ s / 2) ^ (2 * m - 1))⁻¹ / (2 * m - 1 : ℝ)) := by + rw [hsum]; exact mul_le_mul_of_nonneg_left (hUmono.trans hwindow) (by positivity) + _ = 3 ^ (2 * m) / ((2 * m - 1 : ℝ) * δ s ^ (2 * m - 1)) := by + have h2p : (2 : ℝ) ^ (2 * m) = 2 * 2 ^ (2 * m - 1) := by + rw [← pow_succ', Nat.sub_add_cancel (by omega)] + rw [div_pow, div_pow, inv_div, h2p] + field_simp +/-- **Spacing lemma, σ = 2**: `Σ_{t≠s} δ t/(freq s − freq t)² ≤ 9/δ s`. -/ +theorem spacing_sq (h : Adm freq δ) (s : ι) : + ∑ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ 2 ≤ 9 / δ s := + (h.spacing_even_pow s 1 one_pos).trans_eq (by norm_num) /-- **Spacing lemma, σ = 4**: `Σ_{t≠s} δ t/(freq s − freq t)⁴ ≤ 27/(δ s)³`. -/ theorem spacing_four (h : Adm freq δ) (s : ι) : - ∑ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ 4 ≤ 27 / δ s ^ 3 := by - classical - have hδs := h.pos s - rcases Finset.eq_empty_or_nonempty (Finset.univ.erase s) with he | hne - · rw [he, Finset.sum_empty]; positivity - obtain ⟨t₀, ht₀⟩ := hne - set g : ℝ → ℝ := fun u => ((u - freq s) ^ 4)⁻¹ with hg - set M : ℝ := Finset.univ.sup' ⟨s, Finset.mem_univ s⟩ (fun t => |freq s - freq t|) with hM - set R : ℝ := 3 / 2 * M + 1 with hR - have hMle : ∀ t : ι, |freq s - freq t| ≤ M := fun t => - Finset.le_sup' (fun r => |freq s - freq r|) (Finset.mem_univ t) - have hM0 : 0 ≤ M := le_trans (abs_nonneg _) (hMle s) - have hδM : δ s ≤ M := (h.le s t₀ (Finset.ne_of_mem_erase ht₀).symm).trans (hMle t₀) - have hRδ : δ s / 2 ≤ R := by linarith - have hintW : MeasureTheory.IntegrableOn g (window freq δ s R) := - window_integrable (freq := freq) (δ := δ) hδs four_ne_zero - have hsub : ∀ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t ⊆ window freq δ s R := by - intro t ht u hu - exact mem_window h (Finset.ne_of_mem_erase ht) (by linarith [hMle t]) hu - have hper : ∀ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ 4 - ≤ 81 / 16 * ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by - intro t ht - have hts : t ≠ s := Finset.ne_of_mem_erase ht - have hfst : (freq s - freq t) ≠ 0 := sub_ne_zero.2 fun hh => hts (h.inj hh.symm) - have hpos4 : 0 < (freq s - freq t) ^ 4 := by positivity - have hδt := h.pos t - have hlow : ∀ u ∈ Adm.itv (freq := freq) (δ := δ) t, - (81 / 16 * (freq s - freq t) ^ 4)⁻¹ ≤ g u := by - intro u hu - have hb := h.abs_le_of_mem_itv hts hu - have hu0 : 0 < |u - freq s| := lt_of_lt_of_le (by linarith) hb.2 - have hsq : (u - freq s) ^ 4 ≤ 81 / 16 * (freq s - freq t) ^ 4 := by - have h1 : |u - freq s| ≤ 3 / 2 * |freq s - freq t| := by - rw [abs_sub_comm]; exact hb.1 - calc (u - freq s) ^ 4 = |u - freq s| ^ 4 := by rw [← abs_pow, abs_of_nonneg (by positivity)] - _ ≤ (3 / 2 * |freq s - freq t|) ^ 4 := by gcongr - _ = 81 / 16 * |freq s - freq t| ^ 4 := by ring - _ = 81 / 16 * (freq s - freq t) ^ 4 := by rw [← abs_pow, abs_of_nonneg (by positivity)] - have hupos : 0 < (u - freq s) ^ 4 := by - have := abs_pos.1 hu0; positivity - show _ ≤ ((u - freq s) ^ 4)⁻¹ - exact (inv_le_inv₀ (by positivity) hupos).2 hsq - have hintT : MeasureTheory.IntegrableOn g (Adm.itv (freq := freq) (δ := δ) t) := - hintW.mono_set (hsub t ht) - have h1 : ∫ _u in Adm.itv (freq := freq) (δ := δ) t, (81 / 16 * (freq s - freq t) ^ 4)⁻¹ - ≤ ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by - apply MeasureTheory.setIntegral_mono_on - · exact MeasureTheory.integrableOn_const (by simp [Adm.itv]) - · exact hintT - · exact measurableSet_Ioo - · exact hlow - rw [MeasureTheory.setIntegral_const, smul_eq_mul] at h1 - have hvol : (volume (Adm.itv (freq := freq) (δ := δ) t)).toReal = δ t := by - rw [Adm.itv, Real.volume_Ioo, ENNReal.toReal_ofReal (by linarith)] - ring - rw [MeasureTheory.measureReal_def, hvol] at h1 - calc δ t / (freq s - freq t) ^ 4 - = 81 / 16 * (δ t * (81 / 16 * (freq s - freq t) ^ 4)⁻¹) := by - field_simp - _ ≤ 81 / 16 * ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by - gcongr - have hdisj : (↑(Finset.univ.erase s) : Set ι).PairwiseDisjoint - (fun t => Adm.itv (freq := freq) (δ := δ) t) := - (h.itv_disjoint).subset (Set.subset_univ _) - have hsum : ∑ t ∈ Finset.univ.erase s, ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u - = ∫ u in ⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t, g u := by - rw [MeasureTheory.integral_biUnion_finset] - · exact fun t _ => measurableSet_Ioo - · exact hdisj - · exact fun t ht => hintW.mono_set (hsub t ht) - have hUsub : (⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t) - ⊆ window freq δ s R := by - simp only [Set.iUnion_subset_iff] - exact fun t ht => hsub t ht - have hUmono : ∫ u in ⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t, g u - ≤ ∫ u in window freq δ s R, g u := by - apply MeasureTheory.setIntegral_mono_set hintW - · exact Filter.Eventually.of_forall fun u => by positivity - · exact Filter.Eventually.of_forall hUsub - have hwindow : ∫ u in window freq δ s R, g u ≤ 16 / (3 * δ s ^ 3) := by - have hd : Disjoint (Set.Icc (freq s - R) (freq s - δ s / 2)) - (Set.Icc (freq s + δ s / 2) (freq s + R)) := by - rw [Set.disjoint_left] - intro u hu hu' - simp only [Set.mem_Icc] at hu hu' - linarith [hu.2, hu'.1] - have hil : MeasureTheory.IntegrableOn g (Set.Icc (freq s - R) (freq s - δ s / 2)) := - hintW.mono_set Set.subset_union_left - have hir : MeasureTheory.IntegrableOn g (Set.Icc (freq s + δ s / 2) (freq s + R)) := - hintW.mono_set Set.subset_union_right - rw [window, MeasureTheory.setIntegral_union hd measurableSet_Icc hil hir] - have hleft : ∫ u in Set.Icc (freq s - R) (freq s - δ s / 2), g u - = -((R ^ (3:ℕ))⁻¹ / 3) + ((δ s / 2) ^ (3:ℕ))⁻¹ / 3 := by - rw [hg, integral_inv_four_Icc (by linarith) (Or.inr (by linarith))] - have e1 : freq s - R - freq s = -R := by ring - have e2 : freq s - δ s / 2 - freq s = -(δ s / 2) := by ring - rw [e1, e2] - have e3 : (-R) ^ (3:ℕ) = -(R ^ (3:ℕ)) := by ring - have e4 : (-(δ s / 2)) ^ (3:ℕ) = -((δ s / 2) ^ (3:ℕ)) := by ring - rw [e3, e4, inv_neg, inv_neg] - ring - have hright : ∫ u in Set.Icc (freq s + δ s / 2) (freq s + R), g u - = ((δ s / 2) ^ (3:ℕ))⁻¹ / 3 - (R ^ (3:ℕ))⁻¹ / 3 := by - rw [hg, integral_inv_four_Icc (by linarith) (Or.inl (by linarith))] - have e1 : freq s + δ s / 2 - freq s = δ s / 2 := by ring - have e2 : freq s + R - freq s = R := by ring - rw [e1, e2] - rw [hleft, hright] - have hR0 : 0 < R := by linarith - have hRi : 0 < (R ^ (3:ℕ))⁻¹ := by positivity - have hhalf : ((δ s / 2) ^ (3:ℕ))⁻¹ = 8 / δ s ^ 3 := by - rw [div_pow] - norm_num - have h16 : 16 / (3 * δ s ^ 3) = 8 / δ s ^ 3 / 3 + 8 / δ s ^ 3 / 3 := by ring - rw [hhalf] - linarith - calc ∑ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ 4 - ≤ ∑ t ∈ Finset.univ.erase s, 81 / 16 * ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := - Finset.sum_le_sum hper - _ = 81 / 16 * ∑ t ∈ Finset.univ.erase s, ∫ u in Adm.itv (freq := freq) (δ := δ) t, g u := by - rw [Finset.mul_sum] - _ = 81 / 16 * ∫ u in ⋃ t ∈ Finset.univ.erase s, Adm.itv (freq := freq) (δ := δ) t, g u := by - rw [hsum] - _ ≤ 81 / 16 * (16 / (3 * δ s ^ 3)) := by - have := hUmono.trans hwindow - gcongr - _ = 27 / δ s ^ 3 := by field_simp; ring + ∑ t ∈ Finset.univ.erase s, δ t / (freq s - freq t) ^ 4 ≤ 27 / δ s ^ 3 := + (h.spacing_even_pow s 2 (by norm_num)).trans_eq (by norm_num; ring) + +end MainSpacing /-- **Two-point lemma** (replaces Preissmann Lemme 6 at constant 36). -/ theorem two_point (h : Adm freq δ) {l m : ι} (hlm : l ≠ m) : @@ -538,7 +334,6 @@ theorem two_point (h : Adm freq δ) {l m : ι} (hlm : l ≠ m) : field_simp ring - end Adm end MV end Zeta23 diff --git a/zeta23/Zeta23/Main.lean b/zeta23/Zeta23/Main.lean index 2166ec31b9..280da09d0b 100644 --- a/zeta23/Zeta23/Main.lean +++ b/zeta23/Zeta23/Main.lean @@ -9,17 +9,12 @@ Instantiates the abstract §6 assembly (Zeta23.Assembly, over an arbitrary ZeroC nontrivial zeros of Mathlib's riemannZeta (Zeta23.zetaZeros), and performs the λ → 1⁻ and dyadic-summation wrappers. See Zeta23/Statement.lean for the definitions being talked about. -/ -import Zeta23.Statement.Seam -import Zeta23.Assembly -import Zeta23.Hypotheses.GzGp +import Zeta23.Assembly.Certificate import Zeta23.Statement.SeamClosed import Zeta23.Defs.Profile -import Zeta23.Taper.Params -import Zeta23.Tail import Zeta23.Tail.Package import Zeta23.ZeroSide import Zeta23.Poisson -import Zeta23.PrimeSideTemp import Zeta23.ExplicitFormula.Bridge import Zeta23.Chebyshev @@ -35,32 +30,16 @@ variable (hs : ZetaSeam) /-- N(0,T) → ∞ for ζ's zeros, from H-RvM (via N(0,T) ≥ N(T/2,T)). -/ lemma tendsto_Ncount_zero_atTop (hR : RiemannVonMangoldt (zetaZeros hs)) : Tendsto (fun T => (Ncount 0 T : ℝ)) atTop atTop := by - have h1 : Tendsto (fun T : ℝ => ((zetaZeros hs).N (T / 2) (2 * (T / 2)) : ℝ)) atTop atTop := - (Assembly.tendsto_N_atTop (zetaZeros hs) hR).comp (tendsto_id.atTop_div_const two_pos) - refine tendsto_atTop_mono' _ ?_ h1 - filter_upwards [eventually_ge_atTop 0] with T hT - have hsplit := Assembly.N_add (zetaZeros hs) (a := 0) (b := T / 2) (c := T) (by linarith) - (by linarith) - have : 2 * (T / 2) = T := by ring - rw [this] - simp only [zetaZeros_N] at hsplit ⊢ - exact_mod_cast hsplit ▸ Nat.le_add_left _ _ + simpa only [zetaZeros_N] using Assembly.tendsto_N_zero_atTop (zetaZeros hs) hR /-- Generic dyadic wrapper at the ζ level: a dyadic ε-form for an interval-additive count f against N gives the cumulative ε-form. -/ lemma cumulative_of_dyadic (hR : RiemannVonMangoldt (zetaZeros hs)) {c : ℝ} {f : ℝ → ℝ → ℕ} (hf_add : ∀ a b d : ℝ, a ≤ b → b ≤ d → f a d = f a b + f b d) - (h : ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (c - ε) * (Ncount T (2 * T) : ℝ) ≤ f T (2 * T)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (c - ε) * (Ncount 0 T : ℝ) ≤ f 0 T := by - refine Assembly.dyadic (f := fun a b => (f a b : ℝ)) (g := fun a b => (Ncount a b : ℝ)) - (c := c) ?_ ?_ (fun _ _ => Nat.cast_nonneg _) (fun _ _ => Nat.cast_nonneg _) - (tendsto_Ncount_zero_atTop hs hR) h - · intro a b d hab hbd - exact_mod_cast hf_add a b d hab hbd - · intro a b d hab hbd - have := Assembly.N_add (zetaZeros hs) hab hbd - simp only [zetaZeros_N] at this - exact_mod_cast this + (h : DyadicLowerBound (c) (fun T => f T (2 * T)) (fun T => Ncount T (2 * T))) : + DyadicLowerBound (c) (fun T => f 0 T) (fun T => Ncount 0 T) := by + simpa only [zetaZeros_N] using + Assembly.cumulative_of_dyadic_zeroConfig (zetaZeros hs) hR hf_add (by simpa only [zetaZeros_N] using h) lemma N0star_add' (hs : ZetaSeam) {a b d : ℝ} (hab : a ≤ b) (hbd : b ≤ d) : N0star a d = N0star a b + N0star b d := by @@ -77,46 +56,17 @@ lemma Ndist_add' (hs : ZetaSeam) {a b d : ℝ} (hab : a ≤ b) (hbd : b ≤ d) : /-- λ → 1⁻ wrapper for Theorem A at the ζ level. -/ theorem thmA_of_lam (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Hfun lam - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := + DyadicLowerBound (Hfun lam) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T))) : + DyadicLowerBound (2 / 3) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T)) := Assembly.eps_form_twoThirds (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (N0star T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) h -/-- λ → 1⁻ wrapper for Theorem B at the ζ level. -/ -theorem thmB_of_lam - (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun lam - 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - Assembly.eps_form_half (N := fun T => (Ncount T (2 * T) : ℝ)) - (lower := fun T => (N0simple T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) h - -/-- λ → 1⁻ wrapper for Theorem C at the ζ level. -/ -theorem thmC_of_lam - (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Ffun lam - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - Assembly.eps_form_threeQuarters (N := fun T => (Ncount T (2 * T) : ℝ)) - (lower := fun T => (Ndist T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) h - /-- dyadic wrapper, Theorem A. -/ theorem thmA_cumulative_of_dyadic (hR : RiemannVonMangoldt (zetaZeros hs)) - (h : ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := + (h : DyadicLowerBound (2 / 3) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T))) : + DyadicLowerBound (2 / 3) (fun T => N0star 0 T) (fun T => Ncount 0 T) := cumulative_of_dyadic hs hR (fun _ _ _ => N0star_add' hs) h -/-- dyadic wrapper, Theorem B. -/ -theorem thmB_cumulative_of_dyadic (hR : RiemannVonMangoldt (zetaZeros hs)) - (h : ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := - cumulative_of_dyadic hs hR (fun _ _ _ => N0simple_add' hs) h - -/-- dyadic wrapper, Theorem C. -/ -theorem thmC_cumulative_of_dyadic (hR : RiemannVonMangoldt (zetaZeros hs)) - (h : ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := - cumulative_of_dyadic hs hR (fun _ _ _ => Ndist_add' hs) h - end wrappers /-! ## Theorem A from PaperInputs + the thm:traces hypothesis @@ -174,7 +124,7 @@ lemma eventually_blockInputs (Z : ZeroConfig) (P : Params) (hP : P.Valid) : theorem thmA_lam_of_traces (H : PaperInputs zetaZeroConfig) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) (hTr : ThmTracesHyp (paramsOf ϱ lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Hfun lam - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := by + DyadicLowerBound (Hfun lam) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T)) := by have hP := paramsOf_valid hϱ h0 h1.le obtain ⟨hGzGp, ha, hNII, hcalE⟩ := eventually_side_conditions zetaZeroConfig H _ hP obtain ⟨θ₀, hTail, hθ₀⟩ := Tail.eventually_tailPackage zetaZeroConfig H _ hP @@ -185,7 +135,7 @@ theorem thmA_lam_of_traces (H : PaperInputs zetaZeroConfig) {ϱ : ℝ → ℝ} ( /-- **Theorem A (2/3, dyadic ε-form) modulo the thm:traces hypothesis.** -/ theorem thmA_of_traces (H : PaperInputs zetaZeroConfig) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) (hTr : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → ThmTracesHyp (paramsOf ϱ lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := by + DyadicLowerBound (2 / 3) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T)) := by refine thmA_of_lam fun lam hl1 hl2 => ?_ exact thmA_lam_of_traces H hϱ (by linarith) hl2 (hTr lam hl1 hl2) @@ -193,68 +143,11 @@ theorem thmA_of_traces (H : PaperInputs zetaZeroConfig) {ϱ : ℝ → ℝ} (hϱ theorem thmA_cumulative_of_traces (H : PaperInputs zetaZeroConfig) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) (hTr : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → ThmTracesHyp (paramsOf ϱ lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := + DyadicLowerBound (2 / 3) (fun T => N0star 0 T) (fun T => Ncount 0 T) := thmA_cumulative_of_dyadic zetaSeam H.RvM (thmA_of_traces H hϱ hTr) end M1 -section M1BC - -open Assembly - -/-- Theorem B at fixed λ, modulo the thm:traces hypothesis. -/ -theorem thmB_lam_of_traces (H : PaperInputs zetaZeroConfig) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) - {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hTr : ThmTracesHyp (paramsOf ϱ lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun lam - 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := by - have hP := paramsOf_valid hϱ h0 h1.le - obtain ⟨hGzGp, -, hNII, hcalE⟩ := eventually_side_conditions zetaZeroConfig H _ hP - obtain ⟨θ₀, hTail, hθ₀⟩ := Tail.eventually_tailPackage zetaZeroConfig H _ hP - have hBlock := eventually_blockInputs zetaZeroConfig _ hP - simpa [paramsOf] using Assembly.thmB_abstract zetaZeroConfig H (paramsOf ϱ lam) hP h1 hTr hBlock - θ₀ hTail hθ₀ hNII hGzGp hcalE - -/-- Theorem C at fixed λ, modulo the thm:traces hypothesis. -/ -theorem thmC_lam_of_traces (H : PaperInputs zetaZeroConfig) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) - {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hTr : ThmTracesHyp (paramsOf ϱ lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Ffun lam - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := by - have hP := paramsOf_valid hϱ h0 h1.le - obtain ⟨hGzGp, -, hNII, hcalE⟩ := eventually_side_conditions zetaZeroConfig H _ hP - obtain ⟨θ₀, hTail, hθ₀⟩ := Tail.eventually_tailPackage zetaZeroConfig H _ hP - have hBlock := eventually_blockInputs zetaZeroConfig _ hP - simpa [paramsOf] using Assembly.thmC_abstract zetaZeroConfig H (paramsOf ϱ lam) hP h1 hTr hBlock - θ₀ hTail hθ₀ hNII hGzGp hcalE - -variable (H : PaperInputs zetaZeroConfig) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) - (hTr : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → ThmTracesHyp (paramsOf ϱ lam) zetaZeroConfig) -include H hϱ hTr - -/-- Theorem B modulo thm:traces: (1/2 − ε), dyadic. -/ -theorem thmB_of_traces : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := by - refine thmB_of_lam fun lam hl1 hl2 => ?_ - exact thmB_lam_of_traces H hϱ (by linarith) hl2 (hTr lam hl1 hl2) - -/-- Theorem B modulo thm:traces, cumulative. -/ -theorem thmB_cumulative_of_traces : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := - thmB_cumulative_of_dyadic zetaSeam H.RvM (thmB_of_traces H hϱ hTr) - -/-- Theorem C modulo thm:traces: (3/4 − ε), dyadic. -/ -theorem thmC_of_traces : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := by - refine thmC_of_lam fun lam hl1 hl2 => ?_ - exact thmC_lam_of_traces H hϱ (by linarith) hl2 (hTr lam hl1 hl2) - -/-- Theorem C modulo thm:traces, cumulative. -/ -theorem thmC_cumulative_of_traces : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := - thmC_cumulative_of_dyadic zetaSeam H.RvM (thmC_of_traces H hϱ hTr) - -end M1BC - /-! ## Minimal trust base, displayed in the type The literature-form explicit formula EF_lit ([eq:EFstd]) implies the paper form given @@ -269,49 +162,6 @@ theorem PaperInputs.of_lit {Z : ZeroConfig} (hEF : EF.EF_lit Z) (hRvM : RiemannV (hMV : ∃ C : ℝ, 0 < C ∧ MVHilbert C) (hΓ : GammaFacts) : PaperInputs Z := ⟨EF.explicitFormulaPaper_of_lit Z hEF hΓ, hRvM, Cheb.chebyshevMertens, hMV, hΓ⟩ -open Assembly in -/-- **Theorem A, minimal-trust-base form, modulo the thm:traces hypothesis.** -/ -theorem thmA_final_of_traces - (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) - (hMV : ∃ C : ℝ, 0 < C ∧ MVHilbert C) (hΓ : GammaFacts) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) - (hTr : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → ThmTracesHyp (paramsOf ϱ lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - thmA_of_traces (PaperInputs.of_lit hEF hRvM hMV hΓ) hϱ hTr - end TrustBase -section M1Std - -/-- **Theorem A, hypothesis-minimal form**: with the concrete profile -ϱ := Real.smoothTransition (Zeta23.stdProfile), so the type carries only the literature trust base -(hEF, hRvM, hMV, hΓ) and the thm:traces hypothesis hTr. -/ -theorem thmA_std_of_traces - (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) - (hMV : ∃ C : ℝ, 0 < C ∧ MVHilbert C) (hΓ : GammaFacts) - (hTr : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ThmTracesHyp (paramsOf stdProfile lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := - thmA_of_traces (PaperInputs.of_lit hEF hRvM hMV hΓ) taperProfile_stdProfile hTr - -/-- same, Theorem B. -/ -theorem thmB_std_of_traces - (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) - (hMV : ∃ C : ℝ, 0 < C ∧ MVHilbert C) (hΓ : GammaFacts) - (hTr : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ThmTracesHyp (paramsOf stdProfile lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - thmB_of_traces (PaperInputs.of_lit hEF hRvM hMV hΓ) taperProfile_stdProfile hTr - -/-- same, Theorem C. -/ -theorem thmC_std_of_traces - (hEF : EF.EF_lit zetaZeroConfig) (hRvM : RiemannVonMangoldt zetaZeroConfig) - (hMV : ∃ C : ℝ, 0 < C ∧ MVHilbert C) (hΓ : GammaFacts) - (hTr : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → - ThmTracesHyp (paramsOf stdProfile lam) zetaZeroConfig) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - thmC_of_traces (PaperInputs.of_lit hEF hRvM hMV hΓ) taperProfile_stdProfile hTr - -end M1Std - end Zeta23 diff --git a/zeta23/Zeta23/PairCeiling/Bridge.lean b/zeta23/Zeta23/PairCeiling/Bridge.lean index e7d0d26e94..5f6211b07e 100644 --- a/zeta23/Zeta23/PairCeiling/Bridge.lean +++ b/zeta23/Zeta23/PairCeiling/Bridge.lean @@ -35,71 +35,8 @@ lemma Csum_massOf (m : ℕ) : Csum (massOf S N) m = T S m / N := by | zero => simp [T_zero] | succ m ih => rw [Csum_succ, ih, T_succ]; simp [massOf, add_div] -/-- D at a grid point is the right value. -/ -lemma Dfun_grid_eq_Dright (hN : 0 < N) {m : ℕ} (hm : m ≤ N) : Dfun (massOf S N) N ((m : ℝ) / N) = Dright S N m := by - have hNr : (0 : ℝ) < N := by exact_mod_cast hN - rw [Dfun_grid hN hm, Csum_massOf] - unfold Dright - field_simp - -/-- on the open cell (m/N, (m+1)/N), D lies between Dleft (m+1) and Dright m. -/ -lemma Dfun_cell_bounds (hN : 0 < N) {m : ℕ} (hm : m < N) {t : ℝ} (ht : t ∈ Ioo ((m : ℝ) / N) ((m + 1 : ℝ) / N)) : - Dleft S N (m + 1) ≤ Dfun (massOf S N) N t ∧ Dfun (massOf S N) N t ≤ Dright S N m := by - have hNr : (0 : ℝ) < N := by exact_mod_cast hN - rw [Dfun_eqOn_cell hN hm ht, Csum_massOf] - unfold Dleft Dright - simp only [Nat.add_sub_cancel] - have h1 : (m : ℝ) / N < t := ht.1 - have h2 : t < ((m : ℝ) + 1) / N := ht.2 - have ht0 : 0 ≤ t := le_trans (by positivity) h1.le - constructor - · have : t ^ 2 ≤ (((m : ℝ) + 1) / N) ^ 2 := by gcongr - have e : (((m + 1 : ℕ) : ℝ)) ^ 2 / (2 * (N : ℝ) ^ 2) = ((((m : ℝ) + 1) / N) ^ 2) / 2 := by push_cast; field_simp - rw [e]; linarith - · have : ((m : ℝ) / N) ^ 2 ≤ t ^ 2 := by gcongr - have e : ((m : ℝ)) ^ 2 / (2 * (N : ℝ) ^ 2) = (((m : ℝ) / N) ^ 2) / 2 := by field_simp - rw [e]; linarith - /-! ## §2. The sup bridges -/ -/-- **sup|D| from the grid**: one-sided grid bounds give |D| ≤ B₁ on all of [0,1]. -/ -theorem abs_Dfun_le_of_grid (hN : 0 < N) {B₁ : ℝ} - (hD : ∀ j, 1 ≤ j → j ≤ N → |Dleft S N j| ≤ B₁ ∧ |Dright S N j| ≤ B₁) : - ∀ t ∈ Icc (0 : ℝ) 1, |Dfun (massOf S N) N t| ≤ B₁ := by - have hNr : (0 : ℝ) < N := by exact_mod_cast hN - have hB : 0 ≤ B₁ := le_trans (abs_nonneg _) (hD 1 le_rfl hN).1 - intro t ht - by_cases hg : ∃ m : ℕ, m ≤ N ∧ t = (m : ℝ) / N - · obtain ⟨m, hm, rfl⟩ := hg - rw [Dfun_grid_eq_Dright hN hm] - rcases Nat.eq_zero_or_pos m with h0 | hpos - · subst h0; simp [Dright, T_zero]; exact hB - · exact (hD m hpos hm).2 - · have ht' : t ∈ Ioo (0 : ℝ) 1 \ grid N := by - refine ⟨⟨lt_of_le_of_ne ht.1 ?_, lt_of_le_of_ne ht.2 ?_⟩, ?_⟩ - · intro h; exact hg ⟨0, Nat.zero_le _, by rw [← h]; simp⟩ - · intro h; exact hg ⟨N, le_rfl, by rw [h, div_self hNr.ne']⟩ - · rintro ⟨m, hmt⟩ - have hmt' : (m : ℝ) / N = t := hmt - apply hg - refine ⟨m, ?_, hmt'.symm⟩ - have : (m : ℝ) / N ≤ 1 := hmt' ▸ ht.2 - rw [div_le_one hNr] at this - exact_mod_cast this - obtain ⟨m, hm, htm⟩ := exists_cell hN ht' - obtain ⟨hlo, hhi⟩ := Dfun_cell_bounds hN hm htm - have h1 := (hD (m + 1) (Nat.succ_pos m) (Nat.succ_le_of_lt hm)).1 - rw [abs_le] at h1 ⊢ - constructor - · linarith [h1.1] - · rcases Nat.eq_zero_or_pos m with h0 | hpos - · subst h0 - have : Dright S N 0 = 0 := by simp [Dright, T_zero] - linarith - · have h2 := (hD m hpos hm.le).2 - rw [abs_le] at h2 - linarith [h2.2] - /-- E at a grid point is Egrid. -/ lemma Efun_grid_eq_Egrid (hN : 0 < N) {m : ℕ} (hm : m ≤ N) : Efun (massOf S N) N ((m : ℝ) / N) = Egrid S N m := by have hNr : (0 : ℝ) < N := by exact_mod_cast hN @@ -115,108 +52,8 @@ lemma Efun_grid_eq_Egrid (hN : 0 < N) {m : ℕ} (hm : m ≤ N) : Efun (massOf S field_simp ring -/-- **sup|E| from the grid**: the combined grid bounds give |E| ≤ B₂ on all of [0,1]. -/ -theorem abs_Efun_le_of_grid (hN : 0 < N) {B₂ : ℝ} - (hE : ∀ i j, 1 ≤ i → i ≤ N → 1 ≤ j → j ≤ N → - |Egrid S N j| + |Dleft S N i| / N ≤ B₂ ∧ |Egrid S N j| + |Dright S N i| / N ≤ B₂) : - ∀ x ∈ Icc (0 : ℝ) 1, |Efun (massOf S N) N x| ≤ B₂ := by - have hNr : (0 : ℝ) < N := by exact_mod_cast hN - have hN1 : 1 ≤ N := hN - -- B₂ dominates every |D^±_i|/N and every |Egrid j| (the other summand is ≥ 0) - have hB0 : 0 ≤ B₂ := le_trans (by positivity) (hE 1 1 le_rfl hN1 le_rfl hN1).1 - intro x hx - rcases eq_or_lt_of_le hx.2 with hx1 | hx1 - · -- x = 1 = N/N - subst hx1 - rw [show (1 : ℝ) = (N : ℝ) / N from (div_self hNr.ne').symm, Efun_grid_eq_Egrid hN le_rfl] - have h := (hE N N hN1 le_rfl hN1 le_rfl).1 - linarith [div_nonneg (abs_nonneg (Dleft S N N)) hNr.le] - · -- x ∈ [m/N, (m+1)/N) with m < N - set m : ℕ := ⌊(N : ℝ) * x⌋₊ with hm - have hmx : (m : ℝ) ≤ N * x := Nat.floor_le (by have := hx.1; positivity) - have hxm : (N : ℝ) * x < m + 1 := Nat.lt_floor_add_one _ - have hmN : m < N := by - have : (m : ℝ) < N := lt_of_le_of_lt hmx (by nlinarith [hx.1]) - exact_mod_cast this - have hlo : (m : ℝ) / N ≤ x := by rw [div_le_iff₀ hNr]; linarith - have hhi : x < ((m : ℝ) + 1) / N := by rw [lt_div_iff₀ hNr]; linarith - -- split the integral at m/N - have hI1 : IntervalIntegrable (Dfun (massOf S N) N) volume 0 ((m : ℝ) / N) := - (intervalIntegrable_Dfun hN).mono_set (by - rw [Set.uIcc_of_le zero_le_one, Set.uIcc_of_le (by positivity)] - exact Icc_subset_Icc le_rfl (by rw [div_le_one hNr]; exact_mod_cast hmN.le)) - have hI2 : IntervalIntegrable (Dfun (massOf S N) N) volume ((m : ℝ) / N) x := - (intervalIntegrable_Dfun hN).mono_set (by - rw [Set.uIcc_of_le zero_le_one, Set.uIcc_of_le hlo] - exact Icc_subset_Icc (by positivity) hx.2) - have hsplit : Efun (massOf S N) N x = Efun (massOf S N) N ((m : ℝ) / N) + ∫ t in ((m : ℝ) / N)..x, Dfun (massOf S N) N t := by - unfold Efun; rw [intervalIntegral.integral_add_adjacent_intervals hI1 hI2] - -- on (m/N, x] ⊆ the open cell, |D| ≤ C := max |Dleft (m+1)| |Dright m| - set C : ℝ := max |Dleft S N (m + 1)| |Dright S N m| with hC - have hbound : ∀ t ∈ Set.uIoc ((m : ℝ) / N) x, ‖Dfun (massOf S N) N t‖ ≤ C := by - intro t ht - rw [Set.uIoc_of_le hlo] at ht - have ht' : t ∈ Ioo ((m : ℝ) / N) ((m + 1 : ℝ) / N) := ⟨ht.1, lt_of_le_of_lt ht.2 hhi⟩ - obtain ⟨h1, h2⟩ := Dfun_cell_bounds hN hmN ht' - rw [Real.norm_eq_abs] - exact abs_le_max_abs h1 h2 - have hint : |∫ t in ((m : ℝ) / N)..x, Dfun (massOf S N) N t| ≤ C / N := by - have h := intervalIntegral.norm_integral_le_of_norm_le_const hbound - rw [Real.norm_eq_abs] at h - refine h.trans ?_ - have hC0 : 0 ≤ C := le_trans (abs_nonneg _) (le_max_left _ _) - have : |x - (m : ℝ) / N| ≤ 1 / N := by - rw [abs_of_nonneg (by linarith)] - have : ((m : ℝ) + 1) / N = (m : ℝ) / N + 1 / N := by ring - linarith - calc C * |x - (m : ℝ) / N| ≤ C * (1 / N) := mul_le_mul_of_nonneg_left this hC0 - _ = C / N := by ring - rw [hsplit, Efun_grid_eq_Egrid hN hmN.le] - have htri : |Egrid S N m + ∫ t in ((m : ℝ) / N)..x, Dfun (massOf S N) N t| ≤ |Egrid S N m| + C / N := - (abs_add_le _ _).trans (by linarith) - refine htri.trans ?_ - -- |Egrid m| + C/N ≤ B₂ from the grid hypotheses (m = 0: Egrid 0 = 0 and use j = 1) - have key : ∀ {Dv : ℝ}, (∀ j, 1 ≤ j → j ≤ N → |Egrid S N j| + |Dv| / N ≤ B₂) → |Egrid S N m| + |Dv| / N ≤ B₂ := by - intro Dv h - rcases Nat.eq_zero_or_pos m with h0 | hpos - · rw [h0]; simp only [Egrid, U_zero, Nat.cast_zero, zero_div] - have := h 1 le_rfl hN1 - norm_num - linarith [abs_nonneg (Egrid S N 1)] - · exact h m hpos hmN.le - rcases le_total |Dleft S N (m + 1)| |Dright S N m| with hle | hle - · have hCe : C = |Dright S N m| := max_eq_right hle - rw [hCe] - refine key fun j hj1 hj2 => ?_ - rcases Nat.eq_zero_or_pos m with h0 | hpos - · -- Dright 0 = 0 - have : Dright S N m = 0 := by rw [h0]; simp [Dright, T_zero] - rw [this, abs_zero, zero_div, add_zero] - have := (hE 1 j le_rfl hN1 hj1 hj2).1 - linarith [div_nonneg (abs_nonneg (Dleft S N 1)) hNr.le] - · exact (hE m j hpos hmN.le hj1 hj2).2 - · have hCe : C = |Dleft S N (m + 1)| := max_eq_left hle - rw [hCe] - exact key fun j hj1 hj2 => (hE (m + 1) j (Nat.succ_pos m) (Nat.succ_le_of_lt hmN) hj1 hj2).1 - /-! ## §3. The package consumed by the ceiling-stability theorem -/ -/-- **from a checked certificate to the interval hypotheses**: for every form factor S inside the enclosures, the atom masses -s := S/N satisfy |D(1)| ≤ bD1, |E(1)| ≤ bE1, |D| ≤ b1 on [0,1], |E| ≤ b2 on [0,1]. -/ -theorem package_of_check (d : CertData) (hc : check d = true) (S : ℕ → ℝ) (hS : EnclOK d.K S 0 d.encl) : - |Dfun (massOf S d.N) d.N 1| ≤ (d.bD1n : ℝ) / d.bD1d ∧ |Efun (massOf S d.N) d.N 1| ≤ (d.bE1n : ℝ) / d.bE1d ∧ - (∀ t ∈ Icc (0 : ℝ) 1, |Dfun (massOf S d.N) d.N t| ≤ (d.b1n : ℝ) / d.b1d) ∧ - (∀ x ∈ Icc (0 : ℝ) 1, |Efun (massOf S d.N) d.N x| ≤ (d.b2n : ℝ) / d.b2d) := by - obtain ⟨hD1, hE1, hD, hE⟩ := cert_of_check d hc S hS - have hN : 0 < d.N := by - simp only [check, Bool.and_eq_true, decide_eq_true_eq] at hc - exact hc.1.1.1.1.1.1.1.1.1.2 - have hNr : (0 : ℝ) < d.N := by exact_mod_cast hN - have h1 : (1 : ℝ) = (d.N : ℝ) / d.N := (div_self hNr.ne').symm - refine ⟨?_, ?_, abs_Dfun_le_of_grid hN hD, abs_Efun_le_of_grid hN hE⟩ - · rw [h1, Dfun_grid_eq_Dright hN le_rfl]; exact hD1 - · rw [h1, Efun_grid_eq_Egrid hN le_rfl]; exact hE1 - end PairCeiling end Zeta23 diff --git a/zeta23/Zeta23/PairCeiling/Defs.lean b/zeta23/Zeta23/PairCeiling/Defs.lean index 3fdcd8d9a2..501b5ae697 100644 --- a/zeta23/Zeta23/PairCeiling/Defs.lean +++ b/zeta23/Zeta23/PairCeiling/Defs.lean @@ -75,16 +75,6 @@ lemma Cstep_eq_Csum_of_one_le (hN : 0 < N) {x : ℝ} (hx : 1 ≤ x) : Cstep s N lemma Cstep_one (hN : 0 < N) : Cstep s N 1 = Csum s N := Cstep_eq_Csum_of_one_le hN le_rfl -/-- before the first atom: C = 0 for x < 1/N (in particular for x < 0). -/ -lemma Cstep_eq_zero_of_lt (hN : 0 < N) {x : ℝ} (hx : x < 1 / N) : Cstep s N x = 0 := by - unfold Cstep - have hNr : (0 : ℝ) < N := by exact_mod_cast hN - refine Finset.sum_eq_zero fun j hj => ?_ - simp only [Finset.mem_filter, Finset.mem_Icc] at hj - exfalso - have : (1 : ℝ) / N ≤ (j : ℝ) / N := by gcongr; exact_mod_cast hj.1.1 - linarith [hj.2] - lemma Dfun_one (hN : 0 < N) : Dfun s N 1 = Csum s N - 1 / 2 := by simp [Dfun, Cstep_one hN] diff --git a/zeta23/Zeta23/PairCeiling/Grid.lean b/zeta23/Zeta23/PairCeiling/Grid.lean index 56a8816581..746a38462b 100644 --- a/zeta23/Zeta23/PairCeiling/Grid.lean +++ b/zeta23/Zeta23/PairCeiling/Grid.lean @@ -61,18 +61,6 @@ theorem Efun_grid (hN : 0 < N) {m : ℕ} (hm : m ≤ N) : have hi' : i < N := lt_of_lt_of_le (Finset.mem_range.mp hi) hm simpa [Nat.cast_succ] using integral_Dfun_cell (s := s) hN hi' -/-- D at the grid points (right value): D(m/N) = C_m − (m/N)²/2, m ≤ N. -/ -theorem Dfun_grid (hN : 0 < N) {m : ℕ} (hm : m ≤ N) : - Dfun s N ((m:ℝ)/N) = Csum s m - ((m:ℝ)/N) ^ 2 / 2 := by - rcases Nat.lt_or_ge m N with h | h - · simp [Dfun, Cstep_eq_Csum_of_mem hN (Nat.succ_le_of_lt h) ⟨le_rfl, by - have hNr : (0 : ℝ) < N := by exact_mod_cast hN - gcongr; linarith⟩] - · have : m = N := le_antisymm hm h - subst this - have hNr : (0 : ℝ) < (m:ℕ) := by exact_mod_cast hN - simp [Dfun, div_self hNr.ne', Cstep_one hN] - end PairCeiling end Zeta23 diff --git a/zeta23/Zeta23/PairCeiling/NumericCert.lean b/zeta23/Zeta23/PairCeiling/NumericCert.lean index 2c34ebf406..1420e53520 100644 --- a/zeta23/Zeta23/PairCeiling/NumericCert.lean +++ b/zeta23/Zeta23/PairCeiling/NumericCert.lean @@ -138,12 +138,6 @@ section Sound variable {S : ℕ → ℝ} {N K : ℕ} -/-- a ≤ x ≤ b ⇒ |x| ≤ max |a| |b|. -/ -lemma abs_le_max_abs {a b x : ℝ} (ha : a ≤ x) (hb : x ≤ b) : |x| ≤ max |a| |b| := by - rcases le_or_gt 0 x with hx | hx - · rw [abs_of_nonneg hx]; exact le_max_of_le_right (hb.trans (le_abs_self b)) - · rw [abs_of_neg hx]; exact le_max_of_le_left ((neg_le_neg ha).trans (neg_le_abs a)) - /-- the loop invariant. -/ structure LoopInv (S : ℕ → ℝ) (N K : ℕ) (s : St) : Prop where tlo : (s.Tlo : ℝ) ≤ K * T S s.j @@ -154,170 +148,6 @@ structure LoopInv (S : ℕ → ℝ) (N K : ℕ) (s : St) : Prop where dr : ∀ i, 1 ≤ i → i ≤ s.j → |(2 * (N : ℝ) ^ 2 * K) * Dright S N i| ≤ (s.M1 : ℝ) eg : ∀ i, 1 ≤ i → i ≤ s.j → |(6 * (N : ℝ) ^ 3 * K) * Egrid S N i| ≤ (s.M2 : ℝ) -lemma loopInv_init : LoopInv S N K St.init := - ⟨by simp [St.init, T_zero], by simp [St.init, T_zero], by simp [St.init, U_zero], by simp [St.init, U_zero], - fun i h1 h2 => by change i ≤ 0 at h2; omega, fun i h1 h2 => by change i ≤ 0 at h2; omega, - fun i h1 h2 => by change i ≤ 0 at h2; omega⟩ - -/-- the scaled grid quantities are integer combinations of K·T, K·U (N ≠ 0). -/ -lemma scaled_Dright (hN : 0 < N) (j : ℕ) : - (2 * (N : ℝ) ^ 2 * K) * Dright S N j = 2 * N * (K * T S j) - (j : ℝ) ^ 2 * K := by - have hN' : (N : ℝ) ≠ 0 := by exact_mod_cast hN.ne' - unfold Dright; field_simp; try ring -lemma scaled_Dleft (hN : 0 < N) (j : ℕ) : - (2 * (N : ℝ) ^ 2 * K) * Dleft S N j = 2 * N * (K * T S (j - 1)) - (j : ℝ) ^ 2 * K := by - have hN' : (N : ℝ) ≠ 0 := by exact_mod_cast hN.ne' - unfold Dleft; field_simp; try ring -lemma scaled_Egrid (hN : 0 < N) (j : ℕ) : - (6 * (N : ℝ) ^ 3 * K) * Egrid S N j = 6 * N * (K * U S j) - (j : ℝ) ^ 3 * K := by - have hN' : (N : ℝ) ≠ 0 := by exact_mod_cast hN.ne' - unfold Egrid; field_simp; try ring - -/-- one step preserves the invariant. -/ -lemma loopInv_step (hN : 0 < N) {s : St} (h : LoopInv S N K s) {e : ℤ × ℤ} - (he : (e.1 : ℝ) ≤ K * S (s.j + 1) ∧ (K : ℝ) * S (s.j + 1) ≤ e.2) : LoopInv S N K (step N K s e) := by - have hT : T S (s.j + 1) = T S s.j + S (s.j + 1) := T_succ S s.j - have hU : U S (s.j + 1) = U S s.j + T S s.j := U_succ S s.j - have tlo' : ((s.Tlo + e.1 : ℤ) : ℝ) ≤ K * T S (s.j + 1) := by rw [hT]; push_cast; linarith [h.tlo, he.1] - have thi' : (K : ℝ) * T S (s.j + 1) ≤ ((s.Thi + e.2 : ℤ) : ℝ) := by rw [hT]; push_cast; linarith [h.thi, he.2] - have ulo' : ((s.Ulo + s.Tlo : ℤ) : ℝ) ≤ K * U S (s.j + 1) := by rw [hU]; push_cast; linarith [h.ulo, h.tlo] - have uhi' : (K : ℝ) * U S (s.j + 1) ≤ ((s.Uhi + s.Thi : ℤ) : ℝ) := by rw [hU]; push_cast; linarith [h.uhi, h.thi] - refine ⟨tlo', thi', ulo', uhi', ?_, ?_, ?_⟩ - · intro i h1 h2 - simp only [step] at h2 ⊢ - rcases Nat.lt_or_ge i (s.j + 1) with hlt | hge - · exact (h.dl i h1 (by omega)).trans (by exact_mod_cast le_max_left _ _) - · have hi : i = s.j + 1 := le_antisymm h2 hge - subst hi - rw [scaled_Dleft hN] - simp only [Nat.add_sub_cancel] - have hb := abs_le_max_abs (a := 2 * N * (s.Tlo : ℝ) - ((s.j : ℝ) + 1) ^ 2 * K) (b := 2 * N * (s.Thi : ℝ) - ((s.j : ℝ) + 1) ^ 2 * K) - (x := 2 * N * (K * T S s.j) - ((s.j + 1 : ℕ) : ℝ) ^ 2 * K) - (by push_cast; nlinarith [h.tlo, (Nat.cast_nonneg N : (0:ℝ) ≤ N)]) (by push_cast; nlinarith [h.thi, (Nat.cast_nonneg N : (0:ℝ) ≤ N)]) - refine hb.trans ?_ - push_cast [Int.cast_max, Int.cast_abs] - exact le_trans (le_max_left _ _) (le_max_right _ _) - · intro i h1 h2 - simp only [step] at h2 ⊢ - rcases Nat.lt_or_ge i (s.j + 1) with hlt | hge - · exact (h.dr i h1 (by omega)).trans (by exact_mod_cast le_max_left _ _) - · have hi : i = s.j + 1 := le_antisymm h2 hge - subst hi - rw [scaled_Dright hN] - have hb := abs_le_max_abs (a := 2 * N * ((s.Tlo + e.1 : ℤ) : ℝ) - ((s.j : ℝ) + 1) ^ 2 * K) (b := 2 * N * ((s.Thi + e.2 : ℤ) : ℝ) - ((s.j : ℝ) + 1) ^ 2 * K) - (x := 2 * N * (K * T S (s.j + 1)) - ((s.j + 1 : ℕ) : ℝ) ^ 2 * K) - (by push_cast at tlo' ⊢; nlinarith [tlo', (Nat.cast_nonneg N : (0:ℝ) ≤ N)]) (by push_cast at thi' ⊢; nlinarith [thi', (Nat.cast_nonneg N : (0:ℝ) ≤ N)]) - refine hb.trans ?_ - push_cast [Int.cast_max, Int.cast_abs] - exact le_trans (le_max_right _ _) (le_max_right _ _) - · intro i h1 h2 - simp only [step] at h2 ⊢ - rcases Nat.lt_or_ge i (s.j + 1) with hlt | hge - · exact (h.eg i h1 (by omega)).trans (by exact_mod_cast le_max_left _ _) - · have hi : i = s.j + 1 := le_antisymm h2 hge - subst hi - rw [scaled_Egrid hN] - have hb := abs_le_max_abs (a := 6 * N * ((s.Ulo + s.Tlo : ℤ) : ℝ) - ((s.j : ℝ) + 1) ^ 3 * K) (b := 6 * N * ((s.Uhi + s.Thi : ℤ) : ℝ) - ((s.j : ℝ) + 1) ^ 3 * K) - (x := 6 * N * (K * U S (s.j + 1)) - ((s.j + 1 : ℕ) : ℝ) ^ 3 * K) - (by push_cast at ulo' ⊢; nlinarith [ulo', (Nat.cast_nonneg N : (0:ℝ) ≤ N)]) (by push_cast at uhi' ⊢; nlinarith [uhi', (Nat.cast_nonneg N : (0:ℝ) ≤ N)]) - refine hb.trans ?_ - push_cast [Int.cast_max, Int.cast_abs] - exact le_max_right _ _ - -/-- the ok flag only decreases. -/ -lemma step_ok_imp {s : St} {e : ℤ × ℤ} (h : (step N K s e).ok = true) : s.ok = true := by - simp [step, Bool.and_eq_true] at h; exact h.1 - -lemma run_ok_imp {l : List (ℤ × ℤ)} : ∀ {s : St}, (run N K l s).ok = true → s.ok = true := by - induction l with - | nil => intro s h; exact h - | cons e l ih => intro s h; exact step_ok_imp (ih h) - -lemma run_j {l : List (ℤ × ℤ)} : ∀ {s : St}, (run N K l s).j = s.j + l.length := by - induction l with - | nil => intro s; rfl - | cons e l ih => intro s; show (run N K l (step N K s e)).j = _; rw [ih]; simp [step]; omega - -/-- the loop preserves the invariant along an enclosed list. -/ -lemma loopInv_run (hN : 0 < N) {l : List (ℤ × ℤ)} : ∀ {s : St}, LoopInv S N K s → EnclOK K S s.j l → (run N K l s).ok = true → - LoopInv S N K (run N K l s) := by - induction l with - | nil => intro s h _ _; exact h - | cons e l ih => - intro s h hencl hok - have hstep : LoopInv S N K (step N K s e) := loopInv_step hN h hencl.1 - have hj : (step N K s e).j = s.j + 1 := rfl - exact ih hstep (hj ▸ hencl.2) hok - -/-- **soundness of the checker.** -/ -theorem cert_of_check (d : CertData) (hc : check d = true) (S : ℕ → ℝ) (hS : EnclOK d.K S 0 d.encl) : - |D1 S d.N| ≤ (d.bD1n : ℝ) / d.bD1d ∧ |E1 S d.N| ≤ (d.bE1n : ℝ) / d.bE1d ∧ - (∀ j, 1 ≤ j → j ≤ d.N → |Dleft S d.N j| ≤ (d.b1n : ℝ) / d.b1d ∧ |Dright S d.N j| ≤ (d.b1n : ℝ) / d.b1d) ∧ - (∀ i j, 1 ≤ i → i ≤ d.N → 1 ≤ j → j ≤ d.N → - |Egrid S d.N j| + |Dleft S d.N i| / d.N ≤ (d.b2n : ℝ) / d.b2d ∧ |Egrid S d.N j| + |Dright S d.N i| / d.N ≤ (d.b2n : ℝ) / d.b2d) := by - -- unpack the Bool - simp only [check, Bool.and_eq_true, decide_eq_true_eq] at hc - obtain ⟨⟨⟨⟨⟨⟨⟨⟨⟨⟨⟨hok, hj⟩, hN⟩, hK⟩, hbD1d⟩, hbE1d⟩, hb1d⟩, hb2d⟩, hD1⟩, hE1⟩, hM1⟩, hM2⟩ := hc - set s := run d.N d.K d.encl St.init with hs - have hinv : LoopInv S d.N d.K s := loopInv_run hN loopInv_init (by simpa [St.init] using hS) hok - have hN0 : (0 : ℝ) < d.N := by exact_mod_cast hN - have hK0 : (0 : ℝ) < d.K := by exact_mod_cast hK - have hsc2 : (0 : ℝ) < 2 * (d.N : ℝ) ^ 2 * d.K := by positivity - have hsc6 : (0 : ℝ) < 6 * (d.N : ℝ) ^ 3 * d.K := by positivity - have hjN : s.j = d.N := hj - -- D(1) - have hD1r : |(2 * (d.N : ℝ) ^ 2 * d.K) * D1 S d.N| ≤ - ((max |2 * (d.N : ℤ) * s.Tlo - (d.N : ℤ) ^ 2 * d.K| |2 * (d.N : ℤ) * s.Thi - (d.N : ℤ) ^ 2 * d.K| : ℤ) : ℝ) := by - unfold D1; rw [scaled_Dright hN] - have h1 := hinv.tlo; have h2 := hinv.thi - rw [hjN] at h1 h2 - refine (abs_le_max_abs (a := 2 * d.N * (s.Tlo : ℝ) - (d.N : ℝ) ^ 2 * d.K) (b := 2 * d.N * (s.Thi : ℝ) - (d.N : ℝ) ^ 2 * d.K) - (by nlinarith [hN0.le]) (by nlinarith [hN0.le])).trans (le_of_eq ?_) - push_cast [Int.cast_max, Int.cast_abs]; rfl - have hE1r : |(6 * (d.N : ℝ) ^ 3 * d.K) * E1 S d.N| ≤ - ((max |6 * (d.N : ℤ) * s.Ulo - (d.N : ℤ) ^ 3 * d.K| |6 * (d.N : ℤ) * s.Uhi - (d.N : ℤ) ^ 3 * d.K| : ℤ) : ℝ) := by - unfold E1; rw [scaled_Egrid hN] - have h1 := hinv.ulo; have h2 := hinv.uhi - rw [hjN] at h1 h2 - refine (abs_le_max_abs (a := 6 * d.N * (s.Ulo : ℝ) - (d.N : ℝ) ^ 3 * d.K) (b := 6 * d.N * (s.Uhi : ℝ) - (d.N : ℝ) ^ 3 * d.K) - (by nlinarith [hN0.le]) (by nlinarith [hN0.le])).trans (le_of_eq ?_) - push_cast [Int.cast_max, Int.cast_abs]; rfl - -- helper: from |c·x| ≤ A and A·den ≤ num·c conclude |x| ≤ num/den - have key : ∀ {c x A : ℝ} {num den : ℕ}, 0 < c → 0 < den → |c * x| ≤ A → A * den ≤ num * c → |x| ≤ (num : ℝ) / den := by - intro c x A num den hc hden h1 h2 - rw [le_div_iff₀ (by exact_mod_cast hden : (0:ℝ) < den)] - rw [abs_mul, abs_of_pos hc] at h1 - have hden0 : (0:ℝ) ≤ den := by positivity - nlinarith [mul_le_mul_of_nonneg_right h1 hden0, abs_nonneg x] - refine ⟨?_, ?_, ?_, ?_⟩ - · exact key hsc2 hbD1d hD1r (by push_cast [Int.cast_max, Int.cast_abs]; exact_mod_cast hD1) - · exact key hsc6 hbE1d hE1r (by push_cast [Int.cast_max, Int.cast_abs]; exact_mod_cast hE1) - · intro j h1 h2 - rw [← hjN] at h2 - have hM1r : (s.M1 : ℝ) * d.b1d ≤ d.b1n * (2 * (d.N : ℝ) ^ 2 * d.K) := by exact_mod_cast hM1 - exact ⟨key hsc2 hb1d (hinv.dl j h1 h2) hM1r, key hsc2 hb1d (hinv.dr j h1 h2) hM1r⟩ - · intro i j hi1 hi2 hj1 hj2 - rw [← hjN] at hi2 hj2 - have hEg := hinv.eg j hj1 hj2 - have hDl := hinv.dl i hi1 hi2 - have hDr := hinv.dr i hi1 hi2 - have hM2r : ((s.M2 + 3 * s.M1 : ℤ) : ℝ) * d.b2d ≤ d.b2n * (6 * (d.N : ℝ) ^ 3 * d.K) := by exact_mod_cast hM2 - -- 6N³K·(|E| + |D|/N) ≤ M2 + 3·M1 (since 6N³K/N · |D| = 3 · (2N²K|D|)) - have comb : ∀ {Dv : ℝ}, |(2 * (d.N : ℝ) ^ 2 * d.K) * Dv| ≤ (s.M1 : ℝ) → - |Egrid S d.N j| + |Dv| / d.N ≤ (d.b2n : ℝ) / d.b2d := by - intro Dv hDv - rw [le_div_iff₀ (by exact_mod_cast hb2d : (0:ℝ) < d.b2d)] - rw [abs_mul, abs_of_pos hsc6] at hEg - rw [abs_mul, abs_of_pos hsc2] at hDv - have e6 : (6 * (d.N : ℝ) ^ 3 * d.K) * (|Egrid S d.N j| + |Dv| / d.N) - = (6 * (d.N : ℝ) ^ 3 * d.K) * |Egrid S d.N j| + 3 * ((2 * (d.N : ℝ) ^ 2 * d.K) * |Dv|) := by - field_simp; ring - have hb2d0 : (0:ℝ) ≤ d.b2d := by positivity - have : (6 * (d.N : ℝ) ^ 3 * d.K) * (|Egrid S d.N j| + |Dv| / d.N) ≤ ((s.M2 + 3 * s.M1 : ℤ) : ℝ) := by - rw [e6]; push_cast; linarith - nlinarith [mul_le_mul_of_nonneg_right this hb2d0, abs_nonneg (Egrid S d.N j), abs_nonneg Dv, hN0] - exact ⟨comb hDl, comb hDr⟩ - end Sound end PairCeiling diff --git a/zeta23/Zeta23/PairCeiling/RowCert.lean b/zeta23/Zeta23/PairCeiling/RowCert.lean index 14e0cdf58a..86fa20abf2 100644 --- a/zeta23/Zeta23/PairCeiling/RowCert.lean +++ b/zeta23/Zeta23/PairCeiling/RowCert.lean @@ -10,7 +10,6 @@ rational τ = tn/td, d₁ = dn/dd, by pure integer arithmetic; the soundness the hypothesis EnclOK (that the true S lies in the enclosures) into the hypotheses of ceiling_nearCUE. -/ import Zeta23.PairCeiling.NearCUE -import Zeta23.PairCeiling.NumericCert open scoped BigOperators open MeasureTheory Set Finset diff --git a/zeta23/Zeta23/PairCeiling/Stability.lean b/zeta23/Zeta23/PairCeiling/Stability.lean index 6d3ece8d57..69713eaf08 100644 --- a/zeta23/Zeta23/PairCeiling/Stability.lean +++ b/zeta23/Zeta23/PairCeiling/Stability.lean @@ -46,7 +46,7 @@ lemma cell_subset (hN : 0 < N) {m : ℕ} (hm : m < N) : uIcc ((m:ℝ)/N) ((m+1: lemma Cstep_ae_cell (hN : 0 < N) {m : ℕ} (hm : m < N) : ∀ᵐ x ∂volume, x ∈ Ι ((m:ℝ)/N) ((m+1:ℝ)/N) → Cstep s N x = Csum s m := by have : ∀ᵐ x ∂volume, x ≠ ((m+1:ℝ)/N) := by - simpa [ae_iff] using (measure_singleton ((m+1:ℝ)/N) : volume {((m+1:ℝ)/N)} = 0) + simp [ae_iff] filter_upwards [this] with x hxb hx rw [uIoc_of_le (cell_le hN m)] at hx exact Cstep_eq_Csum_of_mem hN (Nat.succ_le_of_lt hm) ⟨hx.1.le, lt_of_le_of_ne hx.2 hxb⟩ @@ -161,37 +161,8 @@ theorem abel_ibp_first (hN : 0 < N) {r g : ℝ → ℝ} rw [hsplit, hA, hB, Dfun_one hN] ring - - /-! ### 3. first-order bound -/ -/-- |Σ s_j r(j/N) − ∫₀¹ r x·x| ≤ |r 1|·|D 1| + M₁·∫₀¹|g| whenever |D| ≤ M₁ on [0,1]. -/ -theorem first_order_bound (hN : 0 < N) {r g : ℝ → ℝ} {M₁ : ℝ} - (hr : ∀ x ∈ Icc (0:ℝ) 1, HasDerivAt r (g x) x) (hg : ContinuousOn g (Icc (0:ℝ) 1)) - (hM : ∀ x ∈ Icc (0:ℝ) 1, |Dfun s N x| ≤ M₁) : - |∑ j ∈ Finset.Icc 1 N, s j * r ((j:ℝ)/N) - ∫ x in (0:ℝ)..1, r x * x| - ≤ |r 1| * |Dfun s N 1| + M₁ * ∫ x in (0:ℝ)..1, |g x| := by - rw [abel_ibp_first hN hr hg] - have hgi : IntervalIntegrable g volume 0 1 := by - rw [← uIcc_of_le zero_le_one] at hg; exact hg.intervalIntegrable - have hM0 : 0 ≤ M₁ := le_trans (abs_nonneg _) (hM 0 ⟨le_rfl, zero_le_one⟩) - refine (abs_sub _ _).trans ?_ - rw [abs_mul] - gcongr - -- |∫ g D| ≤ ∫ |g|·M₁ - calc |∫ x in (0:ℝ)..1, g x * Dfun s N x| - ≤ ∫ x in (0:ℝ)..1, |g x| * M₁ := by - refine intervalIntegral.abs_integral_le_integral_abs (by norm_num) |>.trans ?_ - refine intervalIntegral.integral_mono_on (by norm_num) ?_ (hgi.abs.mul_const _) ?_ - · exact ((intervalIntegrable_gC (s := s) hN hg).sub - (hgi.mul_continuousOn ((by fun_prop : Continuous fun x : ℝ => x ^ 2 / 2).continuousOn))).abs.congr_ae - (by filter_upwards with x; simp [Dfun, mul_sub]) - · intro x hx - rw [abs_mul] - exact mul_le_mul_of_nonneg_left (hM x hx) (abs_nonneg _) - _ = M₁ * ∫ x in (0:ℝ)..1, |g x| := by - rw [intervalIntegral.integral_mul_const]; ring - /-! ### 4. E is continuous, and E′ = D off the grid -/ /-- the grid {m/N : m ∈ ℕ}. -/ @@ -242,7 +213,6 @@ lemma exists_cell (hN : 0 < N) {x : ℝ} (hx : x ∈ Ioo (0:ℝ) 1 \ grid N) : rw [h]; field_simp · rw [lt_div_iff₀ hNr] have := Nat.lt_floor_add_one ((N:ℝ) * x) - push_cast at this ⊢ linarith [mul_comm (N:ℝ) x] /-- on an open cell D agrees with the continuous function C_m − t²/2. -/ diff --git a/zeta23/Zeta23/PiFacts.lean b/zeta23/Zeta23/PiFacts.lean index cfc6ff9dc2..e57c6776b4 100644 --- a/zeta23/Zeta23/PiFacts.lean +++ b/zeta23/Zeta23/PiFacts.lean @@ -17,8 +17,6 @@ threshold suffices; no threshold is needed), together with continuity of Key inequalities: (1+|τ|)² ≤ 5(1/4+τ²) (so 1/|s| ≤ √5/(1+|τ|) for s = ½+iτ), |X^s − 1| ≤ √X + 1 ≤ 2√X, and 5/(2π) + 2√5/π < 3. -/ -import Zeta23.Defs -import Zeta23.Hypotheses import Zeta23.Chebyshev import Mathlib.Analysis.Real.Pi.Bounds @@ -30,100 +28,51 @@ theorem PiX_abs_le {X : ℝ} (hX : 1 ≤ X) (τ : ℝ) : |PiX X τ| ≤ 3 * Real.sqrt X / (1 + |τ|) := by have hX0 : (0 : ℝ) < X := lt_of_lt_of_le one_pos hX have hπ : (3 : ℝ) < Real.pi := Real.pi_gt_three - have hπ0 : (0 : ℝ) < Real.pi := by linarith have hu : (0 : ℝ) < 1 + |τ| := by positivity - have hu1 : (1 : ℝ) ≤ 1 + |τ| := by - have := abs_nonneg τ - linarith - have hv : (0 : ℝ) < 1 / 4 + τ ^ 2 := by positivity have hq : (1 + |τ|) ^ 2 ≤ 5 * (1 / 4 + τ ^ 2) := by nlinarith [sq_nonneg (2 * |τ| - 1 / 2), sq_abs τ, abs_nonneg τ] - have hsX : (1 : ℝ) ≤ Real.sqrt X := by - rw [show (1 : ℝ) = Real.sqrt 1 from Real.sqrt_one.symm] - exact Real.sqrt_le_sqrt hX - have hsX0 : (0 : ℝ) < Real.sqrt X := by linarith - have hsqrt5 : Real.sqrt 5 ≤ 9 / 4 := by - rw [Real.sqrt_le_left (by norm_num : (0 : ℝ) ≤ 9 / 4)] - norm_num - have hsqrt5nn : (0 : ℝ) ≤ Real.sqrt 5 := Real.sqrt_nonneg 5 - set s : ℂ := 1 / 2 + Complex.I * (τ : ℂ) with hs - have hsre : s.re = 1 / 2 := by simp [hs] - have hsim : s.im = τ := by simp [hs] + have hsX : (1 : ℝ) ≤ Real.sqrt X := by simpa using Real.sqrt_le_sqrt hX + have hsqrt5 : Real.sqrt 5 ≤ 9 / 4 := (Real.sqrt_le_left (by norm_num)).mpr (by norm_num) + set s : ℂ := 1 / 2 + Complex.I * (τ : ℂ) have hnormsq : ‖s‖ ^ 2 = 1 / 4 + τ ^ 2 := by - rw [Complex.sq_norm, Complex.normSq_apply, hsre, hsim] - ring - have hspos : (0 : ℝ) < ‖s‖ := by - nlinarith [norm_nonneg s, hnormsq, hv] - -- the archimedean piece + rw [Complex.sq_norm, Complex.normSq_apply]; simp [s]; ring + have hspos : (0 : ℝ) < ‖s‖ := by nlinarith [norm_nonneg s, hnormsq] have hW : ‖(X : ℂ) ^ s - 1‖ ≤ 2 * Real.sqrt X := by have hcpow : ‖(X : ℂ) ^ s‖ = Real.sqrt X := by - rw [Complex.norm_cpow_eq_rpow_re_of_pos hX0, hsre, Real.sqrt_eq_rpow] + rw [Complex.norm_cpow_eq_rpow_re_of_pos hX0, show s.re = 1 / 2 by simp [s], Real.sqrt_eq_rpow] calc ‖(X : ℂ) ^ s - 1‖ ≤ ‖(X : ℂ) ^ s‖ + ‖(1 : ℂ)‖ := norm_sub_le _ _ - _ = Real.sqrt X + 1 := by rw [hcpow, norm_one] - _ ≤ 2 * Real.sqrt X := by linarith + _ ≤ 2 * Real.sqrt X := by rw [hcpow, norm_one]; linarith have husqrt : 1 + |τ| ≤ Real.sqrt 5 * ‖s‖ := by have hsq : (1 + |τ|) ^ 2 ≤ (Real.sqrt 5 * ‖s‖) ^ 2 := by - rw [mul_pow, Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 5), hnormsq] - exact hq - nlinarith [hsq, hu.le, mul_nonneg hsqrt5nn hspos.le] - -- unfold PiX into the two pieces - have hPiX : PiX X τ = 1 / (2 * Real.pi * (1 / 4 + τ ^ 2)) - + (1 / Real.pi) * (((X : ℂ) ^ s - 1) / s).re := by - simp only [PiX, hs] - -- bound each piece times (1 + |τ|) + rw [mul_pow, Real.sq_sqrt (by norm_num), hnormsq]; exact hq + nlinarith [mul_nonneg (Real.sqrt_nonneg 5) hspos.le] have hAu : |1 / (2 * Real.pi * (1 / 4 + τ ^ 2))| * (1 + |τ|) ≤ 5 / (2 * Real.pi) := by - rw [abs_of_nonneg (by positivity), div_mul_eq_mul_div, one_mul, - div_le_div_iff₀ (by positivity) (by positivity)] - have hu5v : 1 + |τ| ≤ 5 * (1 / 4 + τ ^ 2) := by nlinarith [hq, hu1] - nlinarith [mul_nonneg hπ0.le (sub_nonneg.mpr hu5v)] + rw [abs_of_nonneg (by positivity), one_div_mul_eq_div, div_le_div_iff₀ (by positivity) (by positivity)] + have h1 : 1 + |τ| ≤ 5 * (1 / 4 + τ ^ 2) := by nlinarith [hq, abs_nonneg τ] + nlinarith [Real.pi_pos] have hBu : |(1 / Real.pi) * (((X : ℂ) ^ s - 1) / s).re| * (1 + |τ|) ≤ 2 * Real.sqrt 5 * Real.sqrt X / Real.pi := by - have hrew : |(((X : ℂ) ^ s - 1) / s).re| ≤ ‖(X : ℂ) ^ s - 1‖ / ‖s‖ := by - calc |(((X : ℂ) ^ s - 1) / s).re| ≤ ‖((X : ℂ) ^ s - 1) / s‖ := - Complex.abs_re_le_norm _ - _ = ‖(X : ℂ) ^ s - 1‖ / ‖s‖ := norm_div _ _ - have hcore : |(((X : ℂ) ^ s - 1) / s).re| * (1 + |τ|) - ≤ 2 * Real.sqrt X * Real.sqrt 5 := by - calc |(((X : ℂ) ^ s - 1) / s).re| * (1 + |τ|) - ≤ (‖(X : ℂ) ^ s - 1‖ / ‖s‖) * (1 + |τ|) := - mul_le_mul_of_nonneg_right hrew hu.le - _ ≤ (‖(X : ℂ) ^ s - 1‖ / ‖s‖) * (Real.sqrt 5 * ‖s‖) := by - have hfrac : (0 : ℝ) ≤ ‖(X : ℂ) ^ s - 1‖ / ‖s‖ := by positivity - exact mul_le_mul_of_nonneg_left husqrt hfrac - _ = ‖(X : ℂ) ^ s - 1‖ * Real.sqrt 5 := by - field_simp - _ ≤ (2 * Real.sqrt X) * Real.sqrt 5 := - mul_le_mul_of_nonneg_right hW hsqrt5nn - _ = 2 * Real.sqrt X * Real.sqrt 5 := by ring + have hrew : |(((X : ℂ) ^ s - 1) / s).re| ≤ ‖(X : ℂ) ^ s - 1‖ / ‖s‖ := + (Complex.abs_re_le_norm _).trans_eq (norm_div _ _) + have hcore : |(((X : ℂ) ^ s - 1) / s).re| * (1 + |τ|) ≤ 2 * Real.sqrt X * Real.sqrt 5 := + calc _ ≤ (‖(X : ℂ) ^ s - 1‖ / ‖s‖) * (Real.sqrt 5 * ‖s‖) := + mul_le_mul hrew husqrt hu.le (by positivity) + _ = ‖(X : ℂ) ^ s - 1‖ * Real.sqrt 5 := by field_simp + _ ≤ 2 * Real.sqrt X * Real.sqrt 5 := by gcongr rw [abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ 1 / Real.pi), mul_assoc] - calc 1 / Real.pi * (|(((X : ℂ) ^ s - 1) / s).re| * (1 + |τ|)) - ≤ 1 / Real.pi * (2 * Real.sqrt X * Real.sqrt 5) := - mul_le_mul_of_nonneg_left hcore (by positivity) + calc _ ≤ 1 / Real.pi * (2 * Real.sqrt X * Real.sqrt 5) := by gcongr _ = 2 * Real.sqrt 5 * Real.sqrt X / Real.pi := by ring - -- numeric endgame: 5/(2π) + 2√5√X/π ≤ 3√X - have hconst : 5 / (2 * Real.pi) + 2 * Real.sqrt 5 * Real.sqrt X / Real.pi - ≤ 3 * Real.sqrt X := by - have hinv : Real.pi * Real.pi⁻¹ = 1 := mul_inv_cancel₀ hπ0.ne' - have hinvpos : (0 : ℝ) < Real.pi⁻¹ := by positivity - have hinv3 : Real.pi⁻¹ ≤ 1 / 3 := by - rw [le_div_iff₀ (by norm_num : (0 : ℝ) < 3)] - nlinarith [hinv, hπ] - rw [div_eq_mul_inv, div_eq_mul_inv] - have e2 : (2 * Real.pi)⁻¹ = 2⁻¹ * Real.pi⁻¹ := by - rw [mul_inv] - rw [e2] - nlinarith [hsqrt5, hsX, hinv3, hinvpos, hsX0, - mul_nonneg hinvpos.le hsX0.le, mul_le_mul_of_nonneg_right hinv3 hsX0.le] - -- assemble - rw [le_div_iff₀ hu, hPiX] - calc |1 / (2 * Real.pi * (1 / 4 + τ ^ 2)) - + 1 / Real.pi * (((X : ℂ) ^ s - 1) / s).re| * (1 + |τ|) - ≤ (|1 / (2 * Real.pi * (1 / 4 + τ ^ 2))| + have hconst : 5 / (2 * Real.pi) + 2 * Real.sqrt 5 * Real.sqrt X / Real.pi ≤ 3 * Real.sqrt X := by + rw [show 5 / (2 * Real.pi) + 2 * Real.sqrt 5 * Real.sqrt X / Real.pi + = (5 + 4 * Real.sqrt 5 * Real.sqrt X) / (2 * Real.pi) by field_simp; ring, + div_le_iff₀ (by positivity)] + nlinarith + rw [le_div_iff₀ hu, show PiX X τ = 1 / (2 * Real.pi * (1 / 4 + τ ^ 2)) + + (1 / Real.pi) * (((X : ℂ) ^ s - 1) / s).re from rfl] + calc _ ≤ (|1 / (2 * Real.pi * (1 / 4 + τ ^ 2))| + |1 / Real.pi * (((X : ℂ) ^ s - 1) / s).re|) * (1 + |τ|) := mul_le_mul_of_nonneg_right (abs_add_le _ _) hu.le - _ = |1 / (2 * Real.pi * (1 / 4 + τ ^ 2))| * (1 + |τ|) - + |1 / Real.pi * (((X : ℂ) ^ s - 1) / s).re| * (1 + |τ|) := by ring - _ ≤ 5 / (2 * Real.pi) + 2 * Real.sqrt 5 * Real.sqrt X / Real.pi := add_le_add hAu hBu + _ ≤ 5 / (2 * Real.pi) + 2 * Real.sqrt 5 * Real.sqrt X / Real.pi := by linarith [add_le_add hAu hBu] _ ≤ 3 * Real.sqrt X := hconst /-- The paper's [eq:PiPfacts] Π_X-bound in the ∃X₀ packaging used by the @@ -186,14 +135,6 @@ theorem PX_abs_le (X τ : ℝ) : div_nonneg vonMangoldt_nonneg (Real.sqrt_nonneg _) nlinarith -/-- [eq:Bdef], last clause "B² ≪ l² + X" in explicit form (unconditional). -/ -theorem B_sq_le (lam T : ℝ) : - (l T + 4 * Real.sqrt (Real.exp (lam * l T))) ^ 2 - ≤ 2 * l T ^ 2 + 32 * Real.exp (lam * l T) := by - have hs : Real.sqrt (Real.exp (lam * l T)) ^ 2 = Real.exp (lam * l T) := - Real.sq_sqrt (Real.exp_nonneg _) - nlinarith [sq_nonneg (l T - 4 * Real.sqrt (Real.exp (lam * l T)))] - /-- 0 ≤ B for T ≥ 2π. -/ theorem B_nonneg {T : ℝ} (hT : 2 * Real.pi ≤ T) (lam : ℝ) : 0 ≤ l T + 4 * Real.sqrt (Real.exp (lam * l T)) := by @@ -204,7 +145,52 @@ theorem B_nonneg {T : ℝ} (hT : 2 * Real.pi ≤ T) (lam : ℝ) : linarith positivity -set_option maxHeartbeats 1000000 in +private lemma mu_abs_le_of_stirling (hΓ : GammaFacts) {C₁ : ℝ} + (hC₁ : ∀ τ : ℝ, 1 ≤ |τ| → |mu τ - 1 / (2 * Real.pi) * Real.log (|τ| / (2 * Real.pi))| ≤ C₁ / τ ^ 2) + {T : ℝ} (hT : 2 * Real.pi ≤ T) (τ : ℝ) : + |mu τ| ≤ 1 / (2 * Real.pi) * l T + (C₁ + 2) + max (Real.log (|τ| / (4 * T))) 0 := by + have hπ := Real.pi_gt_three + have hC₁0 : 0 ≤ C₁ := by + have := hC₁ 1 (by norm_num); linarith [abs_nonneg (mu 1 - 1 / (2 * Real.pi) * Real.log (|1| / (2 * Real.pi)))] + have hT0 : 0 < T := by linarith + have hl0 : 0 ≤ l T := Real.log_nonneg ((le_div_iff₀ (by positivity)).mpr (by linarith)) + have hμle : mu τ ≤ 1 / (2 * Real.pi) * l T + (C₁ + 1) + max (Real.log (|τ| / (4 * T))) 0 := by + rcases le_or_gt |τ| 1 with hτ1 | hτ1 + · have hμeven : mu τ = mu |τ| := by rcases abs_cases τ with ⟨h, _⟩ | ⟨h, _⟩ <;> simp [h, hΓ.even] + have hμ1 : mu 1 ≤ C₁ := by + have habs := (abs_le.mp (hC₁ 1 (by norm_num))).2 + have hlogneg : Real.log (|(1 : ℝ)| / (2 * Real.pi)) ≤ 0 := + Real.log_nonpos (by positivity) (by rw [abs_one, div_le_one (by positivity)]; linarith) + nlinarith [show (0 : ℝ) < 1 / (2 * Real.pi) by positivity] + rw [hμeven] + have hmono := (hΓ.monotoneOn (by simp [abs_nonneg]) (by norm_num) hτ1).trans hμ1 + linarith [le_max_right (Real.log (|τ| / (4 * T))) 0, show (0 : ℝ) ≤ 1 / (2 * Real.pi) * l T by positivity] + · have hτ0 : 0 < |τ| := by linarith + have hstep : mu τ ≤ 1 / (2 * Real.pi) * Real.log (|τ| / (2 * Real.pi)) + C₁ := by + have hτsq1 : (1 : ℝ) ≤ τ ^ 2 := by nlinarith [sq_abs τ] + have hτsq : C₁ / τ ^ 2 ≤ C₁ := (div_le_iff₀ (by linarith)).mpr (by nlinarith) + linarith [(abs_le.mp (hC₁ τ hτ1.le)).2] + have hlogsplit : Real.log (|τ| / (2 * Real.pi)) = Real.log (|τ| / (4 * T)) + Real.log (4 * T / (2 * Real.pi)) := by + rw [← Real.log_mul (by positivity) (by positivity)]; congr 1; field_simp + have hlog4T : Real.log (4 * T / (2 * Real.pi)) = l T + Real.log 4 := by + unfold l; rw [show 4 * T / (2 * Real.pi) = 4 * (T / (2 * Real.pi)) by ring, + Real.log_mul (by norm_num) (by positivity)]; ring + have h2π1 : 1 / (2 * Real.pi) ≤ 1 := (div_le_one (by positivity)).mpr (by linarith) + have hb1 : 1 / (2 * Real.pi) * Real.log (|τ| / (4 * T)) ≤ max (Real.log (|τ| / (4 * T))) 0 := by + rcases le_or_gt (Real.log (|τ| / (4 * T))) 0 with hneg | hpos + · exact (mul_nonpos_of_nonneg_of_nonpos (by positivity) hneg).trans (le_max_right _ _) + · exact (mul_le_of_le_one_left hpos.le h2π1).trans (le_max_left _ _) + have hlog4 : Real.log 4 ≤ 2 := by + have : Real.log 4 = 2 * Real.log 2 := by rw [show (4 : ℝ) = 2 ^ 2 by norm_num, Real.log_pow]; push_cast; ring + linarith [Real.log_two_lt_d9] + have hconst : 1 / (2 * Real.pi) * Real.log 4 ≤ 1 := by + have h6 : 1 / (2 * Real.pi) ≤ 1 / 6 := one_div_le_one_div_of_le (by norm_num) (by linarith) + nlinarith [Real.log_nonneg (by norm_num : (1 : ℝ) ≤ 4)] + rw [hlogsplit, hlog4T] at hstep; linarith + refine abs_le.mpr ⟨?_, by linarith⟩ + linarith [hΓ.mu_zero_le τ, hΓ.neg_one_lt_mu_zero, + le_max_right (Real.log (|τ| / (4 * T))) 0, show (0 : ℝ) ≤ 1 / (2 * Real.pi) * l T by positivity] + /-- **[eq:Bdef]**: ∃T₀ ∀ T ≥ T₀ ∀ τ, |ν_X(τ)| ≤ B + log⁺(|τ|/(4T)), with B := l + 4√X, X := e^{λl}. Conditional on H-Γ (hΓ); the Chebyshev input is the proved Zeta23.Cheb.chebyshevMertens. -/ @@ -215,212 +201,34 @@ theorem nuX_abs_le (hΓ : GammaFacts) {lam : ℝ} (hlam0 : 0 < lam) : + max (Real.log (|τ| / (4 * T))) 0 := by obtain ⟨C₁, hC₁⟩ := hΓ.stirling obtain ⟨x₀, hx₀⟩ := Zeta23.Cheb.chebyshevMertens.cheb1b - have hπ : (3 : ℝ) < Real.pi := Real.pi_gt_three - -- C₁ ≥ 0 (evaluate the Stirling bound at τ = 1) - have hC₁0 : 0 ≤ C₁ := by - have h := hC₁ 1 (by norm_num) - have := abs_nonneg (mu 1 - 1 / (2 * Real.pi) * Real.log (|1| / (2 * Real.pi))) - nlinarith - -- choose T₀ - set c₁ : ℝ := (C₁ + 2) / (1 - 1 / (2 * Real.pi)) with hc₁ - set c₂ : ℝ := Real.log (max x₀ 1) / lam with hc₂ + have hπ := Real.pi_gt_three + set c₁ : ℝ := (C₁ + 2) / (1 - 1 / (2 * Real.pi)) + set c₂ : ℝ := Real.log (max x₀ 1) / lam refine ⟨max (max (2 * Real.pi * Real.exp c₁) (2 * Real.pi * Real.exp c₂)) (max 1 (2 * Real.pi)), le_max_of_le_right (le_max_left _ _), fun T hT τ => ?_⟩ - -- unpack the conditions on T - have hT1 : (1 : ℝ) ≤ T := le_trans (le_trans (le_max_left _ _) (le_max_right _ _)) hT have hT2π : 2 * Real.pi ≤ T := le_trans (le_trans (le_max_right _ _) (le_max_right _ _)) hT - have hT0 : (0 : ℝ) < T := by linarith - have hlog_mono : ∀ c : ℝ, 2 * Real.pi * Real.exp c ≤ T → c ≤ l T := by - intro c hc - unfold l - rw [show c = Real.log (Real.exp c) from (Real.log_exp c).symm] - apply Real.log_le_log (Real.exp_pos c) - rw [le_div_iff₀ (by positivity)] - linarith - have hlc₁ : c₁ ≤ l T := - hlog_mono c₁ (le_trans (le_trans (le_max_left _ _) (le_max_left _ _)) hT) - have hlc₂ : c₂ ≤ l T := - hlog_mono c₂ (le_trans (le_trans (le_max_right _ _) (le_max_left _ _)) hT) - have hl0 : 0 ≤ l T := by - unfold l - apply Real.log_nonneg - rw [le_div_iff₀ (by positivity)] - linarith - set X : ℝ := Real.exp (lam * l T) with hX - have hX1 : (1 : ℝ) ≤ X := by - rw [hX, ← Real.exp_zero] - exact Real.exp_le_exp.mpr (by positivity) - have hXx₀ : x₀ ≤ X := by - calc x₀ ≤ max x₀ 1 := le_max_left _ _ - _ = Real.exp (Real.log (max x₀ 1)) := - (Real.exp_log (by positivity : (0 : ℝ) < max x₀ 1)).symm - _ ≤ X := by - rw [hX] - apply Real.exp_le_exp.mpr - calc Real.log (max x₀ 1) = lam * c₂ := by - rw [hc₂, mul_div_cancel₀ _ (ne_of_gt hlam0)] - _ ≤ lam * l T := mul_le_mul_of_nonneg_left hlc₂ hlam0.le - have hsX1 : (1 : ℝ) ≤ Real.sqrt X := by - rw [show (1 : ℝ) = Real.sqrt 1 from Real.sqrt_one.symm] - exact Real.sqrt_le_sqrt hX1 - have hsX0 : (0 : ℝ) ≤ Real.sqrt X := Real.sqrt_nonneg X - clear_value X - -- the three pieces - -- (Π) |Π_X τ| ≤ 3√X - have hPiB : |PiX X τ| ≤ 3 * Real.sqrt X := by - calc |PiX X τ| ≤ 3 * Real.sqrt X / (1 + |τ|) := PiX_abs_le hX1 τ - _ ≤ 3 * Real.sqrt X / 1 := by - apply div_le_div_of_nonneg_left (by positivity) (by norm_num) - simp [abs_nonneg] - _ = 3 * Real.sqrt X := by ring - -- (P) |P_X τ| ≤ (3/π)√X ≤ √X + have hlog_mono : ∀ c : ℝ, 2 * Real.pi * Real.exp c ≤ T → c ≤ l T := fun c hc => by + rw [← Real.log_exp c]; exact Real.log_le_log (Real.exp_pos c) ((le_div_iff₀ (by positivity)).mpr (by linarith)) + have hlc₁ : c₁ ≤ l T := hlog_mono c₁ (le_trans (le_trans (le_max_left _ _) (le_max_left _ _)) hT) + have hlc₂ : c₂ ≤ l T := hlog_mono c₂ (le_trans (le_trans (le_max_right _ _) (le_max_left _ _)) hT) + have hl0 : 0 ≤ l T := Real.log_nonneg ((le_div_iff₀ (by positivity)).mpr (by linarith)) + set X : ℝ := Real.exp (lam * l T) + have hX1 : (1 : ℝ) ≤ X := Real.one_le_exp (by positivity) + have hXx₀ : x₀ ≤ X := + (le_max_left x₀ 1).trans ((Real.exp_log (by positivity)).symm.trans_le + (Real.exp_le_exp.mpr ((mul_div_cancel₀ _ hlam0.ne').symm.trans_le (mul_le_mul_of_nonneg_left hlc₂ hlam0.le)))) + have hPiB : |PiX X τ| ≤ 3 * Real.sqrt X := + (PiX_abs_le hX1 τ).trans (div_le_self (by positivity) (by linarith [abs_nonneg τ])) have hP : |PX X τ| ≤ Real.sqrt X := by - calc |PX X τ| ≤ (1 / Real.pi) * ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, - ArithmeticFunction.vonMangoldt n / Real.sqrt n := PX_abs_le X τ - _ ≤ (1 / Real.pi) * (3 * Real.sqrt X) := by - apply mul_le_mul_of_nonneg_left (hx₀ X hXx₀) (by positivity) - _ ≤ Real.sqrt X := by - rw [div_mul_eq_mul_div, one_mul, div_le_iff₀ (by linarith)] - nlinarith - -- (μ) upper bound - have hμle : mu τ ≤ 1 / (2 * Real.pi) * l T + (C₁ + 1) - + max (Real.log (|τ| / (4 * T))) 0 := by - have hmax0 : (0 : ℝ) ≤ max (Real.log (|τ| / (4 * T))) 0 := le_max_right _ _ - rcases le_or_gt (|τ|) 1 with hτ1 | hτ1 - · -- |τ| ≤ 1 : μ(τ) = μ(|τ|) ≤ μ(1) ≤ C₁ + (1/2π)log(1/2π) ≤ C₁ - have hμeven : mu τ = mu (|τ|) := by - rcases abs_cases τ with ⟨h, _⟩ | ⟨h, _⟩ - · rw [h] - · rw [h, hΓ.even] - have hmono := hΓ.monotoneOn (a := |τ|) (b := 1) - (by simp [abs_nonneg]) (by norm_num) hτ1 - have hμ1 : mu 1 ≤ C₁ := by - have h := hC₁ 1 (by norm_num) - have habs := abs_le.mp h - have hlogneg : Real.log (|(1 : ℝ)| / (2 * Real.pi)) ≤ 0 := by - apply Real.log_nonpos (by positivity) - rw [abs_one, div_le_one (by positivity)] - linarith - have h2π : (0 : ℝ) < 1 / (2 * Real.pi) := by positivity - nlinarith [habs.2] - rw [hμeven] - have hthis : mu (|τ|) ≤ C₁ := le_trans hmono hμ1 - have h2πl : (0 : ℝ) ≤ 1 / (2 * Real.pi) * l T := by positivity - linarith - · -- |τ| ≥ 1 : Stirling - have hτ0 : (0 : ℝ) < |τ| := by linarith - have h := (abs_le.mp (hC₁ τ hτ1.le)).2 - have hτsq : C₁ / τ ^ 2 ≤ C₁ := by - have hτsq1 : (1 : ℝ) ≤ τ ^ 2 := by - have := sq_abs τ - nlinarith - rw [div_le_iff₀ (by nlinarith)] - nlinarith - have hstep : mu τ ≤ 1 / (2 * Real.pi) * Real.log (|τ| / (2 * Real.pi)) + C₁ := by - nlinarith - have hlogsplit : Real.log (|τ| / (2 * Real.pi)) - = Real.log (|τ| / (4 * T)) + Real.log (4 * T / (2 * Real.pi)) := by - rw [← Real.log_mul (by positivity) (by positivity)] - congr 1 - field_simp - have hlog4T : Real.log (4 * T / (2 * Real.pi)) ≤ l T + Real.log 4 := by - unfold l - rw [show 4 * T / (2 * Real.pi) = 4 * (T / (2 * Real.pi)) by ring, - Real.log_mul (by norm_num) (by positivity)] - linarith - have hlogτ4T : Real.log (|τ| / (4 * T)) ≤ max (Real.log (|τ| / (4 * T))) 0 := - le_max_left _ _ - have h2π : (0 : ℝ) < 1 / (2 * Real.pi) := by positivity - have h2π1 : 1 / (2 * Real.pi) ≤ 1 := by - rw [div_le_one (by positivity)] - linarith - have hlog4 : Real.log 4 ≤ 2 := by - have h4 : (4 : ℝ) ≤ Real.exp 2 := by - have h1 := Real.exp_one_gt_d9 - have h2 : Real.exp 2 = Real.exp 1 * Real.exp 1 := by - rw [← Real.exp_add] - norm_num - nlinarith - calc Real.log 4 ≤ Real.log (Real.exp 2) := - Real.log_le_log (by norm_num) h4 - _ = 2 := Real.log_exp 2 - calc mu τ ≤ 1 / (2 * Real.pi) * Real.log (|τ| / (2 * Real.pi)) + C₁ := hstep - _ = 1 / (2 * Real.pi) * Real.log (|τ| / (4 * T)) - + 1 / (2 * Real.pi) * Real.log (4 * T / (2 * Real.pi)) + C₁ := by - rw [hlogsplit] - ring - _ ≤ max (Real.log (|τ| / (4 * T))) 0 - + 1 / (2 * Real.pi) * (l T + Real.log 4) + C₁ := by - have hb1 : 1 / (2 * Real.pi) * Real.log (|τ| / (4 * T)) - ≤ max (Real.log (|τ| / (4 * T))) 0 := by - rcases le_or_gt (Real.log (|τ| / (4 * T))) 0 with hneg | hpos - · calc 1 / (2 * Real.pi) * Real.log (|τ| / (4 * T)) ≤ 0 := by nlinarith - _ ≤ max _ 0 := le_max_right _ _ - · calc 1 / (2 * Real.pi) * Real.log (|τ| / (4 * T)) - ≤ Real.log (|τ| / (4 * T)) := by nlinarith - _ ≤ max _ 0 := le_max_left _ _ - have hb2 : 1 / (2 * Real.pi) * Real.log (4 * T / (2 * Real.pi)) - ≤ 1 / (2 * Real.pi) * (l T + Real.log 4) := - mul_le_mul_of_nonneg_left hlog4T h2π.le - linarith - _ ≤ 1 / (2 * Real.pi) * l T + (C₁ + 1) + max (Real.log (|τ| / (4 * T))) 0 := by - have h6 : 1 / (2 * Real.pi) ≤ 1 / 6 := - one_div_le_one_div_of_le (by norm_num) (by linarith) - have hlog40 : (0 : ℝ) ≤ Real.log 4 := Real.log_nonneg (by norm_num) - have hconst : 1 / (2 * Real.pi) * Real.log 4 ≤ 1 / 6 * 2 := - mul_le_mul h6 hlog4 hlog40 (by norm_num) - linarith - -- (μ) lower bound: μ ≥ μ(0) > −1 - have hμge : -1 ≤ mu τ := by - have h1 := hΓ.mu_zero_le τ - have h2 := hΓ.neg_one_lt_mu_zero - linarith - have hμabs : |mu τ| ≤ 1 / (2 * Real.pi) * l T + (C₁ + 2) - + max (Real.log (|τ| / (4 * T))) 0 := by - rw [abs_le] - constructor - · have hmax0 : (0 : ℝ) ≤ max (Real.log (|τ| / (4 * T))) 0 := le_max_right _ _ - have h2π : (0 : ℝ) ≤ 1 / (2 * Real.pi) * l T := by positivity - linarith - · linarith - -- assemble + calc |PX X τ| ≤ (1 / Real.pi) * (3 * Real.sqrt X) := + (PX_abs_le X τ).trans (mul_le_mul_of_nonneg_left (hx₀ X hXx₀) (by positivity)) + _ ≤ Real.sqrt X := by rw [one_div_mul_eq_div, div_le_iff₀ (by linarith)]; nlinarith [Real.sqrt_nonneg X] have hslack : C₁ + 2 ≤ (1 - 1 / (2 * Real.pi)) * l T := by - have hden : (0 : ℝ) < 1 - 1 / (2 * Real.pi) := by - have : 1 / (2 * Real.pi) < 1 := by - rw [div_lt_one (by positivity)] - linarith - linarith - calc C₁ + 2 = (1 - 1 / (2 * Real.pi)) * c₁ := by - rw [hc₁, mul_div_cancel₀ _ (ne_of_gt hden)] - _ ≤ (1 - 1 / (2 * Real.pi)) * l T := mul_le_mul_of_nonneg_left hlc₁ hden.le + have hden : 0 < 1 - 1 / (2 * Real.pi) := by have : 1 / (2 * Real.pi) < 1 := (div_lt_one (by positivity)).mpr (by linarith); linarith + exact (mul_div_cancel₀ _ hden.ne').symm.trans_le (mul_le_mul_of_nonneg_left hlc₁ hden.le) have htri : |nuX X τ| ≤ |mu τ| + |PiX X τ| + |PX X τ| := by - unfold nuX - calc |mu τ + PiX X τ + PX X τ| ≤ |mu τ + PiX X τ| + |PX X τ| := abs_add_le _ _ - _ ≤ |mu τ| + |PiX X τ| + |PX X τ| := by - have := abs_add_le (mu τ) (PiX X τ) - linarith - calc |nuX X τ| ≤ |mu τ| + |PiX X τ| + |PX X τ| := htri - _ ≤ (1 / (2 * Real.pi) * l T + (C₁ + 2) + max (Real.log (|τ| / (4 * T))) 0) - + 3 * Real.sqrt X + Real.sqrt X := by linarith [hμabs, hPiB, hP] - _ ≤ (l T + 4 * Real.sqrt X) + max (Real.log (|τ| / (4 * T))) 0 := by - linarith [hslack] - -/-- [eq:Bdef], window form: |ν_X(τ)| ≤ B for |τ| ≤ 4T. -/ -theorem nuX_abs_le_window (hΓ : GammaFacts) {lam : ℝ} (hlam0 : 0 < lam) : - ∃ T₀ : ℝ, 1 ≤ T₀ ∧ ∀ T, T₀ ≤ T → ∀ τ : ℝ, |τ| ≤ 4 * T → - |nuX (Real.exp (lam * l T)) τ| - ≤ l T + 4 * Real.sqrt (Real.exp (lam * l T)) := by - obtain ⟨T₀, hT₀1, hmain⟩ := nuX_abs_le hΓ hlam0 - refine ⟨T₀, hT₀1, fun T hT τ hτ => ?_⟩ - have hT0 : (0 : ℝ) < T := by linarith - have hmax : max (Real.log (|τ| / (4 * T))) 0 = 0 := by - rw [max_eq_right] - apply Real.log_nonpos (by positivity) - rw [div_le_one (by positivity)] - linarith - have h := hmain T hT τ - rw [hmax] at h - linarith + unfold nuX; linarith [abs_add_le (mu τ + PiX X τ) (PX X τ), abs_add_le (mu τ) (PiX X τ)] + linarith [htri, mu_abs_le_of_stirling hΓ hC₁ hT2π τ, hPiB, hP, hslack] end NuBound diff --git a/zeta23/Zeta23/Poisson.lean b/zeta23/Zeta23/Poisson.lean index 78a61f9d42..f4663509ba 100644 --- a/zeta23/Zeta23/Poisson.lean +++ b/zeta23/Zeta23/Poisson.lean @@ -26,9 +26,6 @@ the decay |φ̂(r)| ≪ (1+r²)⁻¹, i.e. [eq:hfbound]/[eq:psidef]. import Mathlib.Analysis.Fourier.PoissonSummation import Mathlib.MeasureTheory.Measure.Haar.NormedSpace import Mathlib.MeasureTheory.Integral.Prod -import Zeta23.Defs -import Zeta23.Poisson.PaperFT -import Zeta23.Taper.Strip import Zeta23.Taper.Fourier open Complex MeasureTheory Real Set Filter Topology Asymptotics @@ -129,11 +126,6 @@ theorem gInt_hasCompactSupport (hL : 0 < L) (hsupp : ∀ u, L / 2 ≤ |u| → φ exact ⟨⟨by linarith [neg_abs_le ξ], by linarith [le_abs_self ξ]⟩, ⟨by linarith [neg_abs_le u], by linarith [le_abs_self u]⟩⟩ -theorem gInt_integrable_prod (hL : 0 < L) (hφc : Continuous φ) - (hsupp : ∀ u, L / 2 ≤ |u| → φ u = 0) : - Integrable (Function.uncurry (gInt φ L T τ τ')) (volume.prod volume) := - (gInt_continuous hφc).integrable_of_hasCompactSupport (gInt_hasCompactSupport hL hsupp) - /-- `G` is continuous. -/ theorem Gaux_continuous (hL : 0 < L) (hφc : Continuous φ) (hsupp : ∀ u, L / 2 ≤ |u| → φ u = 0) : Continuous (Gaux φ L T τ τ') := by @@ -395,10 +387,6 @@ theorem hasSum_phiHatR_sq (γ : ℝ) : HasSum (fun k : ℤ => P.phiHatR T (γ - P.tau T k) ^ 2) (P.a T * P.L T ^ 2) := Taper.hasSum_phiHatR_sq hP.taper (w_pos' hP) (by linarith [hP.one_le_w]) T γ -theorem tsum_phiHatR_sq (γ : ℝ) : - ∑' k : ℤ, P.phiHatR T (γ - P.tau T k) ^ 2 = P.a T * P.L T ^ 2 := - (hasSum_phiHatR_sq hP hwL γ).tsum_eq - end Params end Zeta23 diff --git a/zeta23/Zeta23/PrimeSideA.lean b/zeta23/Zeta23/PrimeSideA.lean index 86845fc27b..92da984f68 100644 --- a/zeta23/Zeta23/PrimeSideA.lean +++ b/zeta23/Zeta23/PrimeSideA.lean @@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0 Part of the Zeta23 formalization of "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". -/ -import Zeta23.PrimeSideA.Basic import Zeta23.PrimeSideA.MuMu import Zeta23.PrimeSideA.CrossMuP import Zeta23.PrimeSideA.Ends @@ -49,321 +48,403 @@ namespace PrimeSide section Results variable (cϱ lam : ℝ) -/-! ## [prop:trace] (§5.2) -/ +/-! ## [prop:trace] (§5.2) — unified generic engine for `ν = u + cΠ·Π_X + P_c` -/ -set_option maxHeartbeats 1000000 in -/-- **[prop:trace], μ-form** (the paper's proof, §5.2, before [eq:muints] is invoked): -`L·tr G̃ = aL² ∫_T^{2T} μ + O(L²√X + L l)`, divided by `L` and with `l ≤ L√X/λ`: -`|tr G̃ − aL ∫_T^{2T} μ| ≤ C · L√X`. -/ -theorem prop_trace_mu (hΓ : Zeta23.GammaFacts) (hcheb : Zeta23.ChebyshevMertens) - (hlam : 0 < lam ∧ lam ≤ 1) : - ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => - |trGtA p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| ≤ C * (p.L * Real.sqrt p.X)) := by - obtain ⟨K, hK0, hK⟩ := mu_increment_bound hΓ - obtain ⟨x₀, hx₀⟩ := hcheb.cheb1b - obtain ⟨T₁, hT₁⟩ := mu_abs_le_l hΓ - obtain ⟨τ₀, hτ₀0, hτ₀⟩ := mu_nonneg_eventually hΓ - refine ⟨8 * K + 2 * |cϱ| * K + 44 * cϱ ^ 2 + 4 * π / lam + 245, - max (max T₁ 4) (max (2 * π * Real.exp (|x₀| / lam)) (τ₀ + 1)), fun p F hplam hT hF => ?_⟩ - -- thresholds - have hTa : max T₁ 4 ≤ p.T := (le_max_left _ _).trans hT - have hTb : max (2 * π * Real.exp (|x₀| / lam)) (τ₀ + 1) ≤ p.T := (le_max_right _ _).trans hT - have hT₁' : T₁ ≤ p.T := (le_max_left _ _).trans hTa - have hT4 : 4 ≤ p.T := (le_max_right _ _).trans hTa - have hTx : 2 * π * Real.exp (|x₀| / lam) ≤ p.T := (le_max_left _ _).trans hTb - have hTτ : τ₀ + 1 ≤ p.T := (le_max_right _ _).trans hTb +private lemma trace_u_grid_bound {cϱ : ℝ} {p : Setting} {F : LocalFun} {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) + (hF : LocalHypsCore cϱ p F) (hT4 : 4 ≤ p.T) + {K Cμ : ℝ} (hK0 : 0 ≤ K) (hCμ : 0 < Cμ) + (hK : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |u (t + r) - u t| ≤ (K * |r| + 10 * r ^ 2) / t) + (hu2T : |u (2 * p.T)| ≤ Cμ * p.l) (hu_nn : ∀ x, p.T - p.h ≤ x → 0 ≤ u x) : + |(∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * u (p.tau k + r)) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ| + ≤ p.L * (K * (∫ r, F.phiHat r ^ 2 * |r|) + 10 * (∫ r, F.phiHat r ^ 2 * r ^ 2)) + + 4 * π * Cμ * p.L * p.l := by have hT0 : 0 < p.T := by linarith have hL := hF.L_pos have hL8 := hF.eight_le_L - have hc4 := hF.four_le_cϱ - have hc0 : 0 ≤ cϱ := by linarith - have hlam0 : 0 < p.lam := hplam ▸ hlam.1 - have hX : x₀ ≤ p.X := Setting.le_X_of_T hlam0 (by rw [hplam]; exact hTx) - have hX1 : 1 ≤ Real.sqrt p.X := by - rw [Real.le_sqrt' one_pos, one_pow]; exact Real.one_le_exp hL.le |>.trans_eq rfl - have hsX : 0 ≤ Real.sqrt p.X := Real.sqrt_nonneg _ have hh0 : 0 < p.h := by simp only [Setting.h]; positivity - have hh1 : p.h ≤ 1 := by - simp only [Setting.h]; rw [div_le_one hL]; linarith [Real.pi_lt_four] - have hl1 := hF.one_le_l - have ha1 := hF.a_le_one + have hh1 : p.h ≤ 1 := by simp only [Setting.h]; rw [div_le_one hL]; linarith [Real.pi_lt_four] have ha0 := hF.a_pos.le - -- the two taper integrals - set I₁ := ∫ r, F.phiHat r ^ 2 * |r| with hI₁def - set I₂ := ∫ r, F.phiHat r ^ 2 * r ^ 2 with hI₂def + have ha1 := hF.a_le_one + set I₁ := ∫ r, F.phiHat r ^ 2 * |r| + set I₂ := ∫ r, F.phiHat r ^ 2 * r ^ 2 have hI₁0 : 0 ≤ I₁ := integral_nonneg fun r => by positivity have hI₂0 : 0 ≤ I₂ := integral_nonneg fun r => by positivity + have hτ : ∀ k ∈ Finset.range p.d, p.T ≤ p.tau k ∧ p.tau k ≤ 2 * p.T := fun k hk => + p.tau_mem hL hT0.le hk + have h1 : |(∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * u (p.tau k + r)) + - 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, u (p.tau k)| + ≤ p.d * ((K * I₁ + 10 * I₂) / p.T) := by + rw [Finset.mul_sum, ← Finset.sum_sub_distrib] + have hb : ∀ k ∈ Finset.range p.d, + |(∫ r, F.phiHat r ^ 2 * u (p.tau k + r)) - 2 * π * F.a * p.L * u (p.tau k)| + ≤ (K * I₁ + 10 * I₂) / p.T := fun k hk => + (gamma_part_bound hΓ hq hF.toCoreW hK (by linarith [(hτ k hk).1])).trans + (div_le_div_of_nonneg_left (by positivity) hT0 (hτ k hk).1) + refine (Finset.abs_sum_le_sum_abs _ _).trans ((Finset.sum_le_sum hb).trans ?_) + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + have hd : (p.d : ℝ) ≤ p.L * p.T := + (p.d_le (by positivity)).trans (div_le_self (by positivity) (by linarith [Real.pi_gt_three])) + have e1 : p.d * ((K * I₁ + 10 * I₂) / p.T) ≤ p.L * (K * I₁ + 10 * I₂) := by + rw [mul_div_assoc', div_le_iff₀ hT0] + exact (mul_le_mul_of_nonneg_right hd (by positivity)).trans_eq (by ring) + have h2 : |2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, u (p.tau k) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ| ≤ 4 * π * Cμ * p.L * p.l := by + have hR := riemann_sum_monotone (μ := u) (T := p.T) hh0 (by linarith) + (hΓ.monotoneOn.mono fun x hx => by simp only [Set.mem_Ici] at hx ⊢; linarith) + (fun x hx => hu_nn x hx) + rw [← p.d_eq_floor hL] at hR + have hsum : ∑ k ∈ Finset.range p.d, u (p.tau k) = ∑ k ∈ Finset.range p.d, u (p.T + k * p.h) := + Finset.sum_congr rfl fun k _ => by rw [Setting.tau_natCast] + rw [hsum] + have hid : 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, u (p.T + k * p.h) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ + = F.a * p.L ^ 2 * (p.h * ∑ k ∈ Finset.range p.d, u (p.T + k * p.h) + - ∫ τ in p.T..(2 * p.T), u τ) := by simp only [Setting.h]; field_simp + rw [hid, abs_mul, abs_of_nonneg (by positivity)] + have hu2T' : u (2 * p.T) ≤ Cμ * p.l := (le_abs_self _).trans hu2T + have hu2T0 : 0 ≤ u (2 * p.T) := hu_nn _ (by linarith) + calc F.a * p.L ^ 2 * |p.h * ∑ k ∈ Finset.range p.d, u (p.T + k * p.h) - ∫ τ in p.T..(2 * p.T), u τ| + ≤ F.a * p.L ^ 2 * (2 * p.h * u (2 * p.T)) := by gcongr + _ ≤ 1 * p.L ^ 2 * (2 * p.h * (Cμ * p.l)) := by gcongr + _ = 4 * π * Cμ * p.L * p.l := by simp only [Setting.h]; field_simp; ring + have hsplit : (∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * u (p.tau k + r)) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ + = ((∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * u (p.tau k + r)) + - 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, u (p.tau k)) + + (2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, u (p.tau k) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ) := by ring + rw [hsplit] + exact (abs_add_le _ _).trans (add_le_add (h1.trans e1) h2) + +private lemma trace_Pi_grid_bound {cϱ : ℝ} {p : Setting} {F : LocalFun} + (hF : LocalHypsCore cϱ p F) (hT4 : 4 ≤ p.T) : + |∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)| + ≤ p.L * ((6 * Real.sqrt p.X) * (2 * π * p.L) + + (12 * Real.sqrt p.X) * (∫ r, F.phiHat r ^ 2 * r ^ 2)) := by + have hT0 : 0 < p.T := by linarith + have hL := hF.L_pos + have ha0 := hF.a_pos.le + have ha1 := hF.a_le_one + set I₂ := ∫ r, F.phiHat r ^ 2 * r ^ 2 + have hI₂0 : 0 ≤ I₂ := integral_nonneg fun r => by positivity + have hτ : ∀ k ∈ Finset.range p.d, p.T ≤ p.tau k ∧ p.tau k ≤ 2 * p.T := fun k hk => + p.tau_mem hL hT0.le hk + have hb : ∀ k ∈ Finset.range p.d, + |∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)| + ≤ (6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂ := fun k hk => by + have ht := (hτ k hk).1 + refine (Pi_part_bound hF (by linarith)).trans ?_ + have e1 : 6 * Real.sqrt p.X / p.tau k ≤ 6 * Real.sqrt p.X / p.T := + div_le_div_of_nonneg_left (by positivity) hT0 ht + have e2 : 12 * Real.sqrt p.X / p.tau k ^ 2 ≤ 12 * Real.sqrt p.X / p.T := + div_le_div_of_nonneg_left (by positivity) hT0 (by nlinarith) + have e3 : 2 * π * F.a * p.L ≤ 2 * π * p.L := by + nlinarith [mul_le_of_le_one_right (by positivity : (0 : ℝ) ≤ 2 * π) ha1] + linarith [mul_le_mul e1 e3 (by positivity) (by positivity), mul_le_mul_of_nonneg_right e2 hI₂0] + have h3 : |∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)| + ≤ p.d * ((6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂) := by + refine ((Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum hb)).trans ?_ + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + have hd : (p.d : ℝ) ≤ p.L * p.T := + (p.d_le (by positivity)).trans (div_le_self (by positivity) (by linarith [Real.pi_gt_three])) + have hdT : (p.d : ℝ) / p.T ≤ p.L := by rwa [div_le_iff₀ hT0] + refine h3.trans ?_ + rw [show p.d * ((6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂) + = (p.d / p.T) * ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂) by field_simp] + gcongr + +/-- **Generic `[prop:trace]`, `u`-integral form** for any density +`ν(τ) = u(τ) + cΠ · Π_X(τ) + PcDir X c τ` where `u` satisfies `GammaFactsFor` with conductor `q ≥ 1` +and `c 1 = 0`: +`|L⁻¹ Σ_{k q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) + (hlam : 0 < lam ∧ lam ≤ 1) (cPi : ℝ) : + ∃ C T₀ : ℝ, ∀ (p : Setting) (F : LocalFun) (c : ℕ → ℂ), p.lam = lam → T₀ ≤ p.T → + LocalHypsCore cϱ p F → c 1 = 0 → + |(p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) + - F.a * p.L * ∫ τ in p.T..(2 * p.T), u τ| + ≤ C * (p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) := by + obtain ⟨K, hK0, hK⟩ := gamma_increment_bound hΓ hq + obtain ⟨Cμ, T₁, hCμ, hT₁⟩ := gamma_abs_le hΓ hq + obtain ⟨τ₀, hτ₀0, hτ₀⟩ := gamma_nonneg_eventually hΓ hq + set C := max (8 * K + 2 * |cϱ| * K + 20 * cϱ ^ 2 + 80 + + 4 * π * Cμ / lam + |cPi| * (160 + 24 * cϱ ^ 2)) (1 / Real.log 2) + refine ⟨C, max (max T₁ 4) (τ₀ + 1), fun p F c hplam hT hF hc1 => ?_⟩ + have hT₁' : T₁ ≤ p.T := (le_max_left _ _).trans ((le_max_left _ _).trans hT) + have hT4 : 4 ≤ p.T := (le_max_right _ _).trans ((le_max_left _ _).trans hT) + have hTτ : τ₀ + 1 ≤ p.T := (le_max_right _ _).trans hT + have hT0 : 0 < p.T := by linarith + have hL := hF.L_pos + have hL8 := hF.eight_le_L + have hc4 := hF.four_le_cϱ + have hc0 : 0 ≤ cϱ := by linarith + have hX1 : 1 ≤ Real.sqrt p.X := by + rw [Real.le_sqrt' one_pos, one_pow]; exact Real.one_le_exp hL.le + have hh1 : p.h ≤ 1 := by simp only [Setting.h]; rw [div_le_one hL]; linarith [Real.pi_lt_four] + set I₁ := ∫ r, F.phiHat r ^ 2 * |r| + set I₂ := ∫ r, F.phiHat r ^ 2 * r ^ 2 have hI₁ : I₁ ≤ 8 + 2 * cϱ * p.L := by refine hF.integral_phiHat_sq_mul_abs_le.trans ?_ have h1 : Real.log (cϱ * p.L / (4 * p.w)) ≤ cϱ * p.L / (4 * p.w) := Real.log_le_self (by have := hF.one_le_w; positivity) - have h2 : cϱ * p.L / (4 * p.w) ≤ cϱ * p.L / 4 := by - apply div_le_div_of_nonneg_left (by positivity) (by norm_num); linarith [hF.one_le_w] + have h2 : cϱ * p.L / (4 * p.w) ≤ cϱ * p.L / 4 := + div_le_div_of_nonneg_left (by positivity) (by norm_num) (by linarith [hF.one_le_w]) linarith have hI₂ : I₂ ≤ 8 + 2 * cϱ ^ 2 := by refine hF.integral_phiHat_sq_mul_sq_le.trans ?_ have : (cϱ / p.w) ^ 2 ≤ cϱ ^ 2 := by rw [div_pow]; exact div_le_self (sq_nonneg _) (by nlinarith [hF.one_le_w]) linarith - -- rewrite tr G̃ as a sum over range d - have hsumFin : ∑ k : Fin p.d, GentryA p F k k = ∑ k ∈ Finset.range p.d, GentryA p F k k := - Fin.sum_univ_eq_sum_range (fun k => GentryA p F k k) p.d - -- grid facts have hτ : ∀ k ∈ Finset.range p.d, p.T ≤ p.tau k ∧ p.tau k ≤ 2 * p.T := fun k hk => p.tau_mem hL hT0.le hk - -- decomposition of each diagonal entry - set Gμ : ℕ → ℝ := fun k => ∫ r, F.phiHat r ^ 2 * Zeta23.mu (p.tau k + r) with hGμ - set GPi : ℕ → ℝ := fun k => ∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r) with hGPi - set GP : ℕ → ℝ := fun k => ∫ r, F.phiHat r ^ 2 * Zeta23.PX p.X (p.tau k + r) with hGP - have hdecomp : ∑ k ∈ Finset.range p.d, GentryA p F k k - = ∑ k ∈ Finset.range p.d, Gμ k + ∑ k ∈ Finset.range p.d, GPi k - + ∑ k ∈ Finset.range p.d, GP k := by - rw [← Finset.sum_add_distrib, ← Finset.sum_add_distrib] + have hdecomp : ∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ) + = (∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * u (p.tau k + r)) + + cPi * (∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)) + + ∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * PcDir p.X c (p.tau k + r) := by + rw [Fin.sum_univ_eq_sum_range (fun k : ℕ => ∫ τ, F.phiHat (τ - p.tau k) + * F.phiHat (τ - p.tau k) * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) p.d, + Finset.mul_sum, ← Finset.sum_add_distrib, ← Finset.sum_add_distrib] refine Finset.sum_congr rfl fun k hk => ?_ - exact GentryA_diag_eq hΓ hF k (by linarith [(hτ k hk).1]) - -- (1) μ-part vs 2πaL μ(τ_k) - have h1 : |∑ k ∈ Finset.range p.d, Gμ k - 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, - Zeta23.mu (p.tau k)| ≤ p.d * ((K * I₁ + 10 * I₂) / p.T) := by - rw [Finset.mul_sum, ← Finset.sum_sub_distrib] - refine (Finset.abs_sum_le_sum_abs _ _).trans ?_ - have : ∀ k ∈ Finset.range p.d, |Gμ k - 2 * π * F.a * p.L * Zeta23.mu (p.tau k)| - ≤ (K * I₁ + 10 * I₂) / p.T := by - intro k hk - have ht2 : 2 ≤ p.tau k := by linarith [(hτ k hk).1] - refine (mu_part_bound hΓ hF hK ht2).trans ?_ - exact div_le_div_of_nonneg_left (by positivity) hT0 (hτ k hk).1 - refine (Finset.sum_le_sum this).trans ?_ - rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] - -- (2) Riemann sum: 2πaL Σ μ(τ_k) vs aL² ∫ μ - have h2 : |2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, Zeta23.mu (p.tau k) - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| ≤ 4 * π * p.L * p.l := by - have hR := riemann_sum_monotone (μ := Zeta23.mu) (T := p.T) hh0 (by linarith) - (hΓ.monotoneOn.mono (fun x hx => by - simp only [Set.mem_Ici] at hx ⊢; linarith)) - (fun x hx => hτ₀ x (by linarith)) - rw [← p.d_eq_floor hL] at hR - have hsum : ∑ k ∈ Finset.range p.d, Zeta23.mu (p.tau k) - = ∑ k ∈ Finset.range p.d, Zeta23.mu (p.T + k * p.h) := by - refine Finset.sum_congr rfl fun k _ => by rw [Setting.tau_natCast] - rw [hsum] - have hid : 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, Zeta23.mu (p.T + k * p.h) - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ - = F.a * p.L ^ 2 * (p.h * ∑ k ∈ Finset.range p.d, Zeta23.mu (p.T + k * p.h) - - ∫ τ in p.T..(2 * p.T), Zeta23.mu τ) := by - simp only [Setting.h]; field_simp - rw [hid, abs_mul, abs_of_nonneg (by positivity)] - have hμ2T : Zeta23.mu (2 * p.T) ≤ p.l := by - have := hT₁ p hT₁' (2 * p.T) ⟨by linarith, le_rfl⟩ - exact (le_abs_self _).trans this - have hμ2T0 : 0 ≤ Zeta23.mu (2 * p.T) := hτ₀ _ (by linarith) - calc F.a * p.L ^ 2 * |p.h * ∑ k ∈ Finset.range p.d, Zeta23.mu (p.T + k * p.h) - - ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| - ≤ F.a * p.L ^ 2 * (2 * p.h * Zeta23.mu (2 * p.T)) := by gcongr - _ ≤ 1 * p.L ^ 2 * (2 * p.h * p.l) := by gcongr - _ = 4 * π * p.L * p.l := by simp only [Setting.h]; field_simp; ring - -- (3) Π-part - have h3 : |∑ k ∈ Finset.range p.d, GPi k| - ≤ p.d * ((6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂) := by - have hbound : ∀ k ∈ Finset.range p.d, |GPi k| - ≤ (6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂ := by - intro k hk - have ht := (hτ k hk).1 - have ht2 : 2 ≤ p.tau k := by linarith - have ht0 : 0 < p.tau k := by linarith - refine (Pi_part_bound hF ht2).trans ?_ - have e1 : 6 * Real.sqrt p.X / p.tau k ≤ 6 * Real.sqrt p.X / p.T := - div_le_div_of_nonneg_left (by positivity) hT0 ht - have e2 : 12 * Real.sqrt p.X / p.tau k ^ 2 ≤ 12 * Real.sqrt p.X / p.T := - div_le_div_of_nonneg_left (by positivity) hT0 (by nlinarith) - have e3 : 2 * π * F.a * p.L ≤ 2 * π * p.L := by - have h1 : 2 * π * F.a ≤ 2 * π := mul_le_of_le_one_right (by positivity) ha1 - have h2 : (2 * π * F.a) * p.L ≤ (2 * π) * p.L := mul_le_mul_of_nonneg_right h1 hL.le - linarith - have b1 : 6 * Real.sqrt p.X / p.tau k * (2 * π * F.a * p.L) - ≤ 6 * Real.sqrt p.X / p.T * (2 * π * p.L) := - mul_le_mul e1 e3 (by positivity) (by positivity) - have b2 : 12 * Real.sqrt p.X / p.tau k ^ 2 * I₂ - ≤ 12 * Real.sqrt p.X / p.T * I₂ := mul_le_mul_of_nonneg_right e2 hI₂0 - linarith - refine ((Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum hbound)).trans ?_ - rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] - -- (4) P-part - have h4 : |∑ k ∈ Finset.range p.d, GP k| ≤ p.L ^ 2 / Real.log 2 * (3 * Real.sqrt p.X) := by - refine (sum_P_part_bound hF).trans ?_ - exact mul_le_mul_of_nonneg_left (hx₀ _ hX) - (div_nonneg (sq_nonneg _) (Real.log_nonneg one_le_two)) - -- d ≤ L T - have hd : (p.d : ℝ) ≤ p.L * p.T := by - refine (p.d_le (by positivity)).trans (div_le_self (by positivity) ?_) - linarith [Real.pi_gt_three] - have hdT : (p.d : ℝ) / p.T ≤ p.L := by rwa [div_le_iff₀ hT0] - -- combine: |Σ G_kk − aL² ∫μ| ≤ … - have hmain : |∑ k ∈ Finset.range p.d, GentryA p F k k - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| - ≤ p.L * (K * I₁ + 10 * I₂) + 4 * π * p.L * p.l - + p.L * ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂) - + p.L ^ 2 / Real.log 2 * (3 * Real.sqrt p.X) := by - rw [hdecomp] - have e1 : p.d * ((K * I₁ + 10 * I₂) / p.T) ≤ p.L * (K * I₁ + 10 * I₂) := by - rw [mul_div_assoc', div_le_iff₀ hT0] - calc (p.d : ℝ) * (K * I₁ + 10 * I₂) ≤ (p.L * p.T) * (K * I₁ + 10 * I₂) := by - gcongr - _ = p.L * (K * I₁ + 10 * I₂) * p.T := by ring - have e3 : p.d * ((6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂) - ≤ p.L * ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂) := by - have : p.d * ((6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂) - = (p.d / p.T) * ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂) := by - field_simp - rw [this]; gcongr - calc |∑ k ∈ Finset.range p.d, Gμ k + ∑ k ∈ Finset.range p.d, GPi k - + ∑ k ∈ Finset.range p.d, GP k - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| - = |(∑ k ∈ Finset.range p.d, Gμ k - 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, - Zeta23.mu (p.tau k)) - + (2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, Zeta23.mu (p.tau k) - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ) - + ∑ k ∈ Finset.range p.d, GPi k + ∑ k ∈ Finset.range p.d, GP k| := by ring_nf - _ ≤ |∑ k ∈ Finset.range p.d, Gμ k - 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, - Zeta23.mu (p.tau k)| - + |2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, Zeta23.mu (p.tau k) - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| - + |∑ k ∈ Finset.range p.d, GPi k| + |∑ k ∈ Finset.range p.d, GP k| := by - refine (abs_add_le _ _).trans (add_le_add ((abs_add_le _ _).trans - (add_le_add (abs_add_le _ _) le_rfl)) le_rfl) - _ ≤ _ := by linarith [h1.trans e1, h2, h3.trans e3, h4] - -- divide by L and pass to tr G̃ - have htr : trGtA p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ - = p.L⁻¹ * (∑ k ∈ Finset.range p.d, GentryA p F k k - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ) := by - simp only [trGtA, hsumFin]; field_simp - -- final arithmetic: everything ≤ C · L√X - set S := p.L * Real.sqrt p.X with hS - have hS8 : 8 ≤ S := by nlinarith - have hS1 : 1 ≤ S := by linarith + have hkt : 0 < p.tau k := by linarith [(hτ k hk).1] + have htrans : (∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) + = ∫ r, F.phiHat r ^ 2 * (u (p.tau k + r) + cPi * Zeta23.PiX p.X (p.tau k + r) + + PcDir p.X c (p.tau k + r)) := by + rw [← integral_add_right_eq_self _ (p.tau k)] + congr 1; funext r; simp only [add_sub_cancel_right]; ring_nf + rw [htrans] + have hsplit : ∀ r, F.phiHat r ^ 2 * (u (p.tau k + r) + cPi * Zeta23.PiX p.X (p.tau k + r) + + PcDir p.X c (p.tau k + r)) + = (F.phiHat r ^ 2 * u (p.tau k + r) + cPi * (F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r))) + + F.phiHat r ^ 2 * PcDir p.X c (p.tau k + r) := fun r => by ring + simp_rw [hsplit] + have hi1 := gamma_part_integrable hΓ hq hF.toCoreW hkt + have hi2 := (Pi_part_integrable hF (p.tau k)).const_mul cPi + have hi3 := PcDir_part_integrable hF.toCoreW c (p.tau k) + have hi12 : Integrable (fun r => F.phiHat r ^ 2 * u (p.tau k + r) + + cPi * (F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r))) := hi1.add hi2 + rw [integral_add hi12 hi3, integral_add hi1 hi2, integral_const_mul] + have hu_bd := trace_u_grid_bound hΓ hq hF hT4 hK0 hCμ hK + (hT₁ p hT₁' (2 * p.T) ⟨by linarith, le_rfl⟩) (fun x hx => hτ₀ x (by linarith)) + have hPi_bd := trace_Pi_grid_bound hF hT4 + have hPc_bd := sum_PcDir_part_bound hF.toCoreW hc1 + set S := p.L * Real.sqrt p.X + set S₁ := ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n + have hS1 : 1 ≤ S := by nlinarith have hLS : p.L ≤ S := by nlinarith - have hlS : p.l ≤ S / lam := by - rw [le_div_iff₀ hlam.1] - have : p.l * lam = p.L := by rw [← hplam]; simp only [Setting.L]; ring - rw [this]; exact hLS - have hlog2 : (0.6931471803 : ℝ) < Real.log 2 := Real.log_two_gt_d9 - have hlog2' : 0 < Real.log 2 := by linarith - have t1 : K * I₁ + 10 * I₂ ≤ (8 * K + 2 * |cϱ| * K + 80 + 20 * cϱ ^ 2) * S := by + have hS₁0 : 0 ≤ S₁ := Finset.sum_nonneg fun n _ => div_nonneg (norm_nonneg _) (Real.sqrt_nonneg _) + have hmain : |(∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ| + ≤ p.L * (K * I₁ + 10 * I₂) + 4 * π * Cμ * p.L * p.l + + |cPi| * (p.L * ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂)) + + p.L ^ 2 / Real.log 2 * S₁ := by + rw [hdecomp] + have hsplit : (∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * u (p.tau k + r)) + + cPi * (∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)) + + (∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * PcDir p.X c (p.tau k + r)) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ + = ((∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * u (p.tau k + r)) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ) + + cPi * (∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)) + + (∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * PcDir p.X c (p.tau k + r)) := by ring + rw [hsplit] + have h3' := mul_le_mul_of_nonneg_left hPi_bd (abs_nonneg cPi) + rw [← abs_mul] at h3' + exact (abs_add_three _ _ _).trans (by linarith only [hu_bd, h3', hPc_bd]) + have htr : (p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) + - F.a * p.L * ∫ τ in p.T..(2 * p.T), u τ + = (p.L)⁻¹ * ((∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) + - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), u τ) := by field_simp + have t1 : K * I₁ + 10 * I₂ ≤ (8 * K + 2 * |cϱ| * K + 20 * cϱ ^ 2 + 80) * S := by rw [abs_of_nonneg hc0] have v1 : K * I₁ ≤ K * (8 + 2 * cϱ * p.L) := by gcongr have v2 : 10 * I₂ ≤ 10 * (8 + 2 * cϱ ^ 2) := by linarith have u1 : 8 * K ≤ 8 * K * S := le_mul_of_one_le_right (by positivity) hS1 - have u2 : 2 * cϱ * K * p.L ≤ 2 * cϱ * K * S := - mul_le_mul_of_nonneg_left hLS (by positivity) - have u3 : (80:ℝ) ≤ 80 * S := by linarith + have u2 : 2 * cϱ * K * p.L ≤ 2 * cϱ * K * S := mul_le_mul_of_nonneg_left hLS (by positivity) + have u3 : (80 : ℝ) ≤ 80 * S := by linarith have u4 : 20 * cϱ ^ 2 ≤ 20 * cϱ ^ 2 * S := le_mul_of_one_le_right (by positivity) hS1 - nlinarith [mul_nonneg hc0 hK0] - have t2 : 4 * π * p.l ≤ (4 * π / lam) * S := by + have hmul : K * (8 + 2 * cϱ * p.L) = 8 * K + 2 * cϱ * K * p.L := by ring + linarith only [v1, v2, u1, u2, u3, u4, hmul] + have t2 : 4 * π * Cμ * p.l ≤ (4 * π * Cμ / lam) * S := by rw [div_mul_eq_mul_div, le_div_iff₀ hlam.1] - have hls : p.l * lam ≤ S := by rw [← le_div_iff₀ hlam.1]; exact hlS - calc 4 * π * p.l * lam = 4 * π * (p.l * lam) := by ring - _ ≤ 4 * π * S := by gcongr - _ = 4 * π * S := rfl + have : p.l * lam = p.L := by rw [← hplam]; simp only [Setting.L]; ring + calc 4 * π * Cμ * p.l * lam = 4 * π * Cμ * p.L := by rw [← this]; ring + _ ≤ 4 * π * Cμ * S := by gcongr have t3 : (6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂ ≤ (160 + 24 * cϱ ^ 2) * S := by - have e : (6 * Real.sqrt p.X) * (2 * π * p.L) = 12 * π * S := by rw [hS]; ring have f : (12 * Real.sqrt p.X) * I₂ ≤ 12 * (8 + 2 * cϱ ^ 2) * S := by calc (12 * Real.sqrt p.X) * I₂ ≤ (12 * Real.sqrt p.X) * (8 + 2 * cϱ ^ 2) := by gcongr _ = 12 * (8 + 2 * cϱ ^ 2) * (1 * Real.sqrt p.X) := by ring _ ≤ 12 * (8 + 2 * cϱ ^ 2) * (p.L * Real.sqrt p.X) := by gcongr; linarith - _ = 12 * (8 + 2 * cϱ ^ 2) * S := by rw [hS] - have hS0 : 0 ≤ S := by linarith - have g : 12 * π * S ≤ 48 * S := - mul_le_mul_of_nonneg_right (by linarith [Real.pi_lt_four]) hS0 - rw [e]; linarith - have t4 : p.L / Real.log 2 * (3 * Real.sqrt p.X) ≤ 5 * S := by - rw [hS, div_mul_eq_mul_div, div_le_iff₀ hlog2'] - have h5 : 3 * (p.L * Real.sqrt p.X) ≤ 5 * Real.log 2 * (p.L * Real.sqrt p.X) := - mul_le_mul_of_nonneg_right (by linarith) (mul_nonneg hL.le hsX) - linarith - calc |trGtA p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| - = p.L⁻¹ * |∑ k ∈ Finset.range p.d, GentryA p F k k - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| := by - rw [htr, abs_mul, abs_of_pos (inv_pos.2 hL)] - _ ≤ p.L⁻¹ * (p.L * (K * I₁ + 10 * I₂) + 4 * π * p.L * p.l - + p.L * ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂) - + p.L ^ 2 / Real.log 2 * (3 * Real.sqrt p.X)) := by gcongr - _ = (K * I₁ + 10 * I₂) + 4 * π * p.l - + ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂) - + p.L / Real.log 2 * (3 * Real.sqrt p.X) := by field_simp - _ ≤ (8 * K + 2 * |cϱ| * K + 80 + 20 * cϱ ^ 2) * S + (4 * π / lam) * S - + (160 + 24 * cϱ ^ 2) * S + 5 * S := by linarith - _ = (8 * K + 2 * |cϱ| * K + 44 * cϱ ^ 2 + 4 * π / lam + 245) * S := by ring + _ = 12 * (8 + 2 * cϱ ^ 2) * S := rfl + have g : (6 * Real.sqrt p.X) * (2 * π * p.L) ≤ 48 * S := by + have : (6 * Real.sqrt p.X) * (2 * π * p.L) = 12 * π * S := by ring + rw [this]; exact mul_le_mul_of_nonneg_right (by linarith [Real.pi_lt_four]) (by positivity) + have hS0 : 0 ≤ S := by positivity + linarith only [f, g, hS0] + have hC1 : 8 * K + 2 * |cϱ| * K + 20 * cϱ ^ 2 + 80 + 4 * π * Cμ / lam + + |cPi| * (160 + 24 * cϱ ^ 2) ≤ C := le_max_left _ _ + have hC2 : 1 / Real.log 2 ≤ C := le_max_right _ _ + have hinv_eq : p.L⁻¹ * (p.L * (K * I₁ + 10 * I₂) + 4 * π * Cμ * p.L * p.l + + |cPi| * (p.L * ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂)) + + p.L ^ 2 / Real.log 2 * S₁) + = (K * I₁ + 10 * I₂) + 4 * π * Cμ * p.l + + |cPi| * ((6 * Real.sqrt p.X) * (2 * π * p.L) + (12 * Real.sqrt p.X) * I₂) + + (1 / Real.log 2) * (p.L * S₁) := by + have hLne : p.L ≠ 0 := hL.ne' + have hlogne : Real.log 2 ≠ 0 := (Real.log_pos one_lt_two).ne' + field_simp + rw [htr, abs_mul, abs_of_pos (inv_pos.2 hL)] + have hstep1 := mul_le_mul_of_nonneg_left hmain (inv_nonneg.2 hL.le) + rw [hinv_eq] at hstep1 + have ht3 := mul_le_mul_of_nonneg_left t3 (abs_nonneg cPi) + have hb1 := mul_le_mul_of_nonneg_right hC1 (by positivity : 0 ≤ S) + have hb2 := mul_le_mul_of_nonneg_right hC2 (by positivity : 0 ≤ p.L * S₁) + exact hstep1.trans (by linarith only [t1, t2, ht3, hb1, hb2]) -/-- **[prop:trace]** (§5.2, verbatim): `tr G̃ = aL·N(T,2T) + O(L√X)`. -Here `N` is an abstract real standing for `N(T,2T)` and the two hypotheses are exactly what the -paper's proof uses to pass from `∫_T^{2T}μ` to `N(T,2T)`: [eq:muints] (field `int_mu` of -`Zeta23.GammaFacts`) and [eq:RvM] `N(T,2T) = Tℓ₁/2π + O(l)` with constant `A` (hypothesis `hRvM`). -/ -theorem prop_trace (hΓ : Zeta23.GammaFacts) (hcheb : Zeta23.ChebyshevMertens) - (hlam : 0 < lam ∧ lam ≤ 1) (A : ℝ) : - ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => ∀ N : ℝ, - |N - p.T * p.ell1 / (2 * π)| ≤ A * p.l → - |trGtA p F - F.a * p.L * N| ≤ C * (p.L * Real.sqrt p.X)) := by - obtain ⟨C₀, T₀, hC₀⟩ := prop_trace_mu cϱ lam hΓ hcheb hlam +/-- **Generic `[prop:trace]`, `N`-form** combining `prop_trace_mu_generic` with `hΓ.int_mu` and +`|N - T · e1 T / (2π)| ≤ A · l`. -/ +theorem prop_trace_generic {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) + (hlam : 0 < lam ∧ lam ≤ 1) (cPi A : ℝ) : + ∃ C T₀ : ℝ, ∀ (p : Setting) (F : LocalFun) (c : ℕ → ℂ), p.lam = lam → T₀ ≤ p.T → + LocalHypsCore cϱ p F → c 1 = 0 → ∀ N : ℝ, |N - p.T * e1 p.T / (2 * π)| ≤ A * p.l → + |(p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) + - F.a * p.L * N| + ≤ C * (p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) := by + obtain ⟨C₀, T₀, hC₀⟩ := prop_trace_mu_generic cϱ lam hΓ hq hlam cPi obtain ⟨Cμ, T₂, hCμ⟩ := hΓ.int_mu - refine ⟨C₀ + |Cμ| + 2 * |A| / lam, max T₀ (max T₂ 1), fun p F hplam hT hF => ?_⟩ - intro N hN - subst hplam - have h0 := hC₀ p F rfl ((le_max_left _ _).trans hT) hF + refine ⟨max C₀ 0 + |Cμ| + 2 * |A| / lam, max T₀ (max T₂ 1), + fun p F c hplam hT hF hc1 N hN => ?_⟩ + have h0 := hC₀ p F c hplam ((le_max_left _ _).trans hT) hF hc1 have hT2 : T₂ ≤ p.T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT - have hT1 : (1:ℝ) ≤ p.T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT - have hμint := hCμ p.T hT2 + have hT1 : (1 : ℝ) ≤ p.T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT have hL := hF.L_pos - have hlam0 : 0 < p.lam := hlam.1 have ha0 := hF.a_pos.le have ha1 := hF.a_le_one - have hsX : 0 ≤ Real.sqrt p.X := Real.sqrt_nonneg _ - have hX1 : 1 ≤ Real.sqrt p.X := by - rw [Real.le_sqrt' one_pos, one_pow]; exact Real.one_le_exp hL.le - -- l ≤ (2/λ)√X (since √X = e^{L/2} = e^{λl/2} ≥ λl/2) + have hX1 : 1 ≤ Real.sqrt p.X := by rw [Real.le_sqrt' one_pos, one_pow]; exact Real.one_le_exp hL.le have hl0 : 0 ≤ p.l := zero_le_one.trans hF.one_le_l - have hlX : p.l ≤ 2 / p.lam * Real.sqrt p.X := by - have he : Real.sqrt p.X = Real.exp (p.lam * p.l / 2) := by - rw [show p.X = Real.exp (p.lam * p.l) from rfl, ← Real.exp_half] - rw [he, div_mul_eq_mul_div, le_div_iff₀ hlam0] - have h1 := Real.add_one_le_exp (p.lam * p.l / 2) - nlinarith - -- assemble - have e1 : |trGtA p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| - ≤ C₀ * (p.L * Real.sqrt p.X) := h0 - have e2 : |F.a * p.L * ((∫ τ in p.T..(2 * p.T), Zeta23.mu τ) - p.T * p.ell1 / (2 * π))| + have hlX : p.l ≤ 2 / lam * Real.sqrt p.X := by + have he : Real.sqrt p.X = Real.exp (lam * p.l / 2) := by + rw [show p.X = Real.exp (p.lam * p.l) from rfl, hplam, ← Real.exp_half] + rw [he, div_mul_eq_mul_div, le_div_iff₀ hlam.1] + nlinarith [Real.add_one_le_exp (lam * p.l / 2)] + set S₁ := ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n + have hS₁0 : 0 ≤ S₁ := Finset.sum_nonneg fun n _ => div_nonneg (norm_nonneg _) (Real.sqrt_nonneg _) + have e2 : |F.a * p.L * ((∫ τ in p.T..(2 * p.T), u τ) - p.T * e1 p.T / (2 * π))| ≤ |Cμ| * (p.L * Real.sqrt p.X) := by rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ F.a * p.L)] - have h1 : |(∫ τ in p.T..(2 * p.T), Zeta23.mu τ) - p.T * p.ell1 / (2 * π)| ≤ |Cμ| := by - refine hμint.trans ?_ - calc Cμ / p.T ≤ |Cμ| / p.T := by gcongr; exact le_abs_self _ - _ ≤ |Cμ| / 1 := by apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos; exact hT1 - _ = |Cμ| := div_one _ - calc F.a * p.L * |(∫ τ in p.T..(2 * p.T), Zeta23.mu τ) - p.T * p.ell1 / (2 * π)| + have h1 : |(∫ τ in p.T..(2 * p.T), u τ) - p.T * e1 p.T / (2 * π)| ≤ |Cμ| := + (hCμ p.T hT2).trans ((div_le_div_of_nonneg_right (le_abs_self _) (by linarith)).trans + ((div_le_div_of_nonneg_left (abs_nonneg _) one_pos hT1).trans_eq (div_one _))) + calc F.a * p.L * |(∫ τ in p.T..(2 * p.T), u τ) - p.T * e1 p.T / (2 * π)| ≤ 1 * p.L * |Cμ| := by gcongr - _ = p.L * |Cμ| := by ring _ ≤ (p.L * Real.sqrt p.X) * |Cμ| := by - have := mul_le_mul_of_nonneg_left hX1 hL.le - have h0' : 0 ≤ |Cμ| := abs_nonneg _ - nlinarith + nlinarith [mul_le_mul_of_nonneg_left hX1 hL.le, abs_nonneg Cμ] _ = |Cμ| * (p.L * Real.sqrt p.X) := by ring - have e3 : |F.a * p.L * (p.T * p.ell1 / (2 * π) - N)| - ≤ (2 * |A| / p.lam) * (p.L * Real.sqrt p.X) := by + have e3 : |F.a * p.L * (p.T * e1 p.T / (2 * π) - N)| + ≤ (2 * |A| / lam) * (p.L * Real.sqrt p.X) := by rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ F.a * p.L), abs_sub_comm] - have hAl : A * p.l ≤ |A| * (2 / p.lam * Real.sqrt p.X) := by - calc A * p.l ≤ |A| * p.l := mul_le_mul_of_nonneg_right (le_abs_self A) hl0 - _ ≤ |A| * (2 / p.lam * Real.sqrt p.X) := - mul_le_mul_of_nonneg_left hlX (abs_nonneg A) - calc F.a * p.L * |N - p.T * p.ell1 / (2 * π)| ≤ 1 * p.L * (A * p.l) := by gcongr - _ = p.L * (A * p.l) := by ring - _ ≤ p.L * (|A| * (2 / p.lam * Real.sqrt p.X)) := mul_le_mul_of_nonneg_left hAl hL.le - _ = (2 * |A| / p.lam) * (p.L * Real.sqrt p.X) := by field_simp - calc |trGtA p F - F.a * p.L * N| - = |(trGtA p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ) - + F.a * p.L * ((∫ τ in p.T..(2 * p.T), Zeta23.mu τ) - p.T * p.ell1 / (2 * π)) - + F.a * p.L * (p.T * p.ell1 / (2 * π) - N)| := by ring_nf - _ ≤ |trGtA p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| - + |F.a * p.L * ((∫ τ in p.T..(2 * p.T), Zeta23.mu τ) - p.T * p.ell1 / (2 * π))| - + |F.a * p.L * (p.T * p.ell1 / (2 * π) - N)| := abs_add_three _ _ _ - _ ≤ (C₀ + |Cμ| + 2 * |A| / p.lam) * (p.L * Real.sqrt p.X) := by linarith + have hAl : A * p.l ≤ |A| * (2 / lam * Real.sqrt p.X) := + (mul_le_mul_of_nonneg_right (le_abs_self A) hl0).trans + (mul_le_mul_of_nonneg_left hlX (abs_nonneg A)) + calc F.a * p.L * |N - p.T * e1 p.T / (2 * π)| ≤ 1 * p.L * (A * p.l) := by gcongr + _ ≤ p.L * (|A| * (2 / lam * Real.sqrt p.X)) := by rw [one_mul]; exact mul_le_mul_of_nonneg_left hAl hL.le + _ = (2 * |A| / lam) * (p.L * Real.sqrt p.X) := by field_simp + have h0' : |(p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) - F.a * p.L * ∫ τ in p.T..(2 * p.T), u τ| + ≤ max C₀ 0 * (p.L * Real.sqrt p.X + p.L * S₁) := + h0.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) (by positivity)) + have htri : |(p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) - F.a * p.L * N| + ≤ |(p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) - F.a * p.L * ∫ τ in p.T..(2 * p.T), u τ| + + |F.a * p.L * ((∫ τ in p.T..(2 * p.T), u τ) - p.T * e1 p.T / (2 * π))| + + |F.a * p.L * (p.T * e1 p.T / (2 * π) - N)| := by + have hring : (p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) - F.a * p.L * N + = ((p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (u τ + cPi * Zeta23.PiX p.X τ + PcDir p.X c τ)) - F.a * p.L * ∫ τ in p.T..(2 * p.T), u τ) + + F.a * p.L * ((∫ τ in p.T..(2 * p.T), u τ) - p.T * e1 p.T / (2 * π)) + + F.a * p.L * (p.T * e1 p.T / (2 * π) - N) := by ring + rw [hring]; exact abs_add_three _ _ _ + have hLS₁ : 0 ≤ p.L * S₁ := by positivity + nlinarith [abs_nonneg Cμ, div_nonneg (mul_nonneg zero_le_two (abs_nonneg A)) hlam.1.le] + +/-- **[prop:trace], μ-form** (§5.2): `|tr G̃ − aL ∫_T^{2T} μ| ≤ C · L√X`. -/ +theorem prop_trace_mu (hΓ : Zeta23.GammaFacts) (hcheb : Zeta23.ChebyshevMertens) + (hlam : 0 < lam ∧ lam ≤ 1) : + ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => + |trGtA p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ| ≤ C * (p.L * Real.sqrt p.X)) := by + obtain ⟨C₀, T₀, hC₀⟩ := prop_trace_mu_generic cϱ lam (gammaFacts_toFor hΓ) le_rfl hlam 1 + obtain ⟨x₀, hx₀⟩ := hcheb.cheb1b + refine ⟨4 * max C₀ 0, max T₀ (2 * π * Real.exp (|x₀| / lam)), fun p F hplam hT hF => ?_⟩ + let c : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) + have hPX : Zeta23.PX p.X = PcDir p.X c := by + funext τ; simp [PX_eq, PcDir, c, primeRange, acoef, ycoef, div_eq_mul_inv, Finset.mul_sum] + exact Finset.sum_congr rfl fun n _ => by ring + have hnu : ∀ τ, Zeta23.nuX p.X τ = Zeta23.mu τ + 1 * Zeta23.PiX p.X τ + PcDir p.X c τ := fun τ => by + simp [Zeta23.nuX, ← hPX] + have hS₁ : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n ≤ 3 * Real.sqrt p.X := by + have hX : x₀ ≤ p.X := Setting.le_X_of_T (hplam ▸ hlam.1) (by rw [hplam]; exact (le_max_right _ _).trans hT) + simpa [c, abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] using hx₀ p.X hX + have hL := hF.L_pos + have h := hC₀ p F c hplam ((le_max_left _ _).trans hT) hF (by simp [c]) + have heq : trGtA p F = (p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (Zeta23.mu τ + 1 * Zeta23.PiX p.X τ + PcDir p.X c τ)) := by + simp only [trGtA, GentryA, hnu] + dsimp only; rw [heq] + refine h.trans ?_ + have hC0 : C₀ ≤ max C₀ 0 := le_max_left _ _ + have h1 : p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n + ≤ 4 * (p.L * Real.sqrt p.X) := by nlinarith [mul_le_mul_of_nonneg_left hS₁ hL.le] + calc C₀ * (p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) + ≤ max C₀ 0 * (p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) := + mul_le_mul_of_nonneg_right hC0 (by positivity) + _ ≤ max C₀ 0 * (4 * (p.L * Real.sqrt p.X)) := mul_le_mul_of_nonneg_left h1 (le_max_right _ _) + _ = 4 * max C₀ 0 * (p.L * Real.sqrt p.X) := by ring + +/-- **[prop:trace]** (§5.2, verbatim): `tr G̃ = aL·N(T,2T) + O(L√X)`. -/ +theorem prop_trace (hΓ : Zeta23.GammaFacts) (hcheb : Zeta23.ChebyshevMertens) + (hlam : 0 < lam ∧ lam ≤ 1) (A : ℝ) : + ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => ∀ N : ℝ, + |N - p.T * p.ell1 / (2 * π)| ≤ A * p.l → + |trGtA p F - F.a * p.L * N| ≤ C * (p.L * Real.sqrt p.X)) := by + obtain ⟨C₀, T₀, hC₀⟩ := prop_trace_generic cϱ lam (gammaFacts_toFor hΓ) le_rfl hlam 1 A + obtain ⟨x₀, hx₀⟩ := hcheb.cheb1b + refine ⟨4 * max C₀ 0, max T₀ (2 * π * Real.exp (|x₀| / lam)), fun p F hplam hT hF N hN => ?_⟩ + let c : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) + have hPX : Zeta23.PX p.X = PcDir p.X c := by + funext τ; simp [PX_eq, PcDir, c, primeRange, acoef, ycoef, div_eq_mul_inv, Finset.mul_sum] + exact Finset.sum_congr rfl fun n _ => by ring + have hnu : ∀ τ, Zeta23.nuX p.X τ = Zeta23.mu τ + 1 * Zeta23.PiX p.X τ + PcDir p.X c τ := fun τ => by + simp [Zeta23.nuX, ← hPX] + have hS₁ : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n ≤ 3 * Real.sqrt p.X := by + have hX : x₀ ≤ p.X := Setting.le_X_of_T (hplam ▸ hlam.1) (by rw [hplam]; exact (le_max_right _ _).trans hT) + simpa [c, abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] using hx₀ p.X hX + have hL := hF.L_pos + have h := hC₀ p F c hplam ((le_max_left _ _).trans hT) hF (by simp [c]) N hN + have heq : trGtA p F = (p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) + * (Zeta23.mu τ + 1 * Zeta23.PiX p.X τ + PcDir p.X c τ)) := by + simp only [trGtA, GentryA, hnu] + rw [heq] + refine h.trans ?_ + have h1 : p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n + ≤ 4 * (p.L * Real.sqrt p.X) := by nlinarith [mul_le_mul_of_nonneg_left hS₁ hL.le] + calc C₀ * (p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) + ≤ max C₀ 0 * (p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) := + mul_le_mul_of_nonneg_right (le_max_left _ _) (by positivity) + _ ≤ max C₀ 0 * (4 * (p.L * Real.sqrt p.X)) := mul_le_mul_of_nonneg_left h1 (le_max_right _ _) + _ = 4 * max C₀ 0 * (p.L * Real.sqrt p.X) := by ring /-! ## [lem:ends] (§5.3), with [eq:Kdef], [eq:trG2int], [eq:Kbounds] -/ diff --git a/zeta23/Zeta23/PrimeSideA/Basic.lean b/zeta23/Zeta23/PrimeSideA/Basic.lean index 7555aaf5de..272449361d 100644 --- a/zeta23/Zeta23/PrimeSideA/Basic.lean +++ b/zeta23/Zeta23/PrimeSideA/Basic.lean @@ -57,18 +57,13 @@ concrete `Zeta23.mu` and Λ-sums), taken verbatim. The taper/test-family facts def psiA (cϱ : ℝ) (p : Setting) (r : ℝ) : ℝ := if r = 0 then p.L else min p.L (min (2 / |r|) (cϱ / (p.w * r ^ 2))) -/-- The facts about the test family at parameters `p` used in §5, each tagged with -its paper label; `cϱ` is the profile constant `c_ϱ = 4‖ϱ'‖_∞ + 4‖ϱ''‖₁ ≥ 4` of [eq:phinorms] -(= `Zeta23.Params.crho`). These facts are supplied by Taper.lean / Poisson.lean and -PiFacts.lean: this structure is instantiated elsewhere in the repository (a theorem -`LocalHyps P.crho ⟨T, P.lam, P.w⟩ ⟨P.phiHatR T, P.PhiR T, P.Aphi T, P.g T, P.a T, P.b T⟩` for -valid `P` and large `T`), not assumed. -/ -structure LocalHyps (cϱ : ℝ) (p : Setting) (F : LocalFun) : Prop where +/-- Window-generic taper facts without the bandwidth cap `λ ≤ 1` (shared base of +`LocalHypsCore` and `LocalHyps`). -/ +structure LocalHypsCoreW (cϱ : ℝ) (p : Setting) (F : LocalFun) : Prop where /-- [eq:phinorms] `c_ϱ ≥ 4`. -/ four_le_cϱ : 4 ≤ cϱ - /-- `0 < λ ≤ 1` [Notation]. -/ + /-- `0 < λ` [Notation] (no upper cap here). -/ lam_pos : 0 < p.lam - lam_le_one : p.lam ≤ 1 /-- [eq:wrange] `1 ≤ w ≤ L/8` (forces `L ≥ 8`). -/ one_le_w : 1 ≤ p.w w_le : p.w ≤ p.L / 8 @@ -82,76 +77,99 @@ structure LocalHyps (cϱ : ℝ) (p : Setting) (F : LocalFun) : Prop where phiHat_le_inv : ∀ r, |F.phiHat r| * |r| ≤ 2 phiHat_le_sq : ∀ r, |F.phiHat r| * r ^ 2 ≤ cϱ / p.w /-- Integrability consequences of [eq:psidef] (`φ̂² ≤ ψ² ≤ min(L², c_ϱ²/(w²r⁴))`), and - [eq:psiints] in the packaged form `∫ φ̂(r)²|r| dr ≤ ∫ ψ²|r| = 8 + 8 log(c_ϱL/4w)` (§2.2, used at - §5.2 "∫ φ̂(r)²|r| dr ≪ log L"). -/ + [eq:psiints] in the packaged form `∫ φ̂(r)²|r| dr ≤ ∫ ψ²|r| = 8 + 8 log(c_ϱL/4w)`. -/ phiHat_sq_integrable : Integrable (fun r => F.phiHat r ^ 2) phiHat_sq_mul_abs_integrable : Integrable (fun r => F.phiHat r ^ 2 * |r|) integral_phiHat_sq_mul_abs_le : ∫ r, F.phiHat r ^ 2 * |r| ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) - /-- also from [eq:psidef]: `φ̂(r)²r² ≤ min(4, (c_ϱ/w)²/r²)`, so `∫ φ̂(r)² r² dr ≤ 8 + 2(c_ϱ/w)²` - (used for the `|r| > τ_k/2` tails at §5.2 in place of the paper's sharper r⁻⁴ bound). -/ + /-- second moment of `φ̂²`. -/ phiHat_sq_mul_sq_integrable : Integrable (fun r => F.phiHat r ^ 2 * r ^ 2) integral_phiHat_sq_mul_sq_le : ∫ r, F.phiHat r ^ 2 * r ^ 2 ≤ 8 + 2 * (cϱ / p.w) ^ 2 - /-- `∫ φ̂(r)² dr = 2π ∫ φ² = 2π a L` [prop:trace proof, §5.2; Plancherel in the paper's - convention `∫ f ḡ = (2π)⁻¹ ∫ f̂ conj ĝ` + eq:abdef]. -/ + /-- `∫ φ̂(r)² dr = 2π ∫ φ² = 2π a L`. -/ phiHat_sq_integral : ∫ r, F.phiHat r ^ 2 = 2 * π * F.a * p.L - /-- `φ̂² = Â_φ` on ℝ [§2.2] + Fourier inversion, in the real form used at §5.2: - `∫ φ̂(r)² cos(ry) dr = 2π A_φ(y)` (`φ̂²` even, `A_φ` even, continuous, supported in `[−L,L]`). -/ + /-- `∫ φ̂(r)² cos(ry) dr = 2π A_φ(y)`. -/ phiHat_sq_fourier : ∀ y, ∫ r, F.phiHat r ^ 2 * Real.cos (r * y) = 2 * π * F.Aphi y - /-- [eq:gbounds] `(L−2w−|y|)₊ ≤ g(y) ≤ A_φ(y) ≤ (L−|y|)₊`. -/ - g_lower : ∀ y, max (p.L - 2 * p.w - |y|) 0 ≤ F.g y + /-- window-generic remnant of [eq:gbounds]: `g ≥ 0` and `g ≤ A_φ ≤ (L−|y|)₊`. -/ + g_nonneg : ∀ y, 0 ≤ F.g y g_le_Aphi : ∀ y, F.g y ≤ F.Aphi y Aphi_le : ∀ y, F.Aphi y ≤ max (p.L - |y|) 0 - /-- Φ facts: `Φ` is C¹ (indeed entire), even [§2.2]. -/ + /-- Φ facts: `Φ` is C¹, even [§2.2]. -/ Phi_contDiff : ContDiff ℝ 1 F.Phi Phi_even : ∀ r, F.Phi (-r) = F.Phi r /-- [eq:psidef] `|Φ(r)| ≤ ψ(r)`, three division-free bounds. -/ Phi_le_L : ∀ r, |F.Phi r| ≤ p.L Phi_le_inv : ∀ r, |F.Phi r| * |r| ≤ 2 Phi_le_sq : ∀ r, |F.Phi r| * r ^ 2 ≤ cϱ / p.w - /-- Integrability consequences of [eq:psidef] for Φ, and [eq:psiints] packaged as - `∫ Φ(x)²|x| dx ≤ 8 + 8 log(c_ϱL/4w)` (§5.4 "∫Φ(x)²|x|dx ≪ log L (by (eq:psidef), (eq:psiints))"). -/ + /-- Integrability consequences of [eq:psidef] for Φ. -/ Phi_sq_integrable : Integrable (fun x => F.Phi x ^ 2) Phi_sq_mul_abs_integrable : Integrable (fun x => F.Phi x ^ 2 * |x|) integral_Phi_sq_mul_abs_le : ∫ x, F.Phi x ^ 2 * |x| ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) - /-- second moment of `Φ²` (same [eq:psidef] path as the `φ̂` version; needed against the - `10r²/t` term of `mu_increment_bound` in [prop:mumu]). -/ + /-- second moment of `Φ²`. -/ Phi_sq_mul_sq_integrable : Integrable (fun x => F.Phi x ^ 2 * x ^ 2) integral_Phi_sq_mul_sq_le : ∫ x, F.Phi x ^ 2 * x ^ 2 ≤ 8 + 2 * (cϱ / p.w) ^ 2 /-- `Φ(0) = aL` [§2.2]. -/ Phi_zero : F.Phi 0 = F.a * p.L /-- `∫_ℝ Φ² = 2π g(0) = 2π b L` [§2.2]. -/ Phi_sq_integral : ∫ x, F.Phi x ^ 2 = 2 * π * F.b * p.L - /-- [eq:Phi2FT] `∫_ℝ Φ(x)² e^{ixy} dx = 2π g(y)` (§5.4), real form (`Φ²`, `g` even). -/ + /-- [eq:Phi2FT] `∫_ℝ Φ(x)² cos(xy) dx = 2π g(y)`. -/ Phi_sq_fourier : ∀ y, ∫ x, F.Phi x ^ 2 * Real.cos (x * y) = 2 * π * F.g y - /-- [lem:poisson] (★) `Σ_{k∈ℤ} φ̂(τ−τ_k) φ̂(τ'−τ_k) = L Φ(τ−τ')` (§2.2). -/ + /-- [lem:poisson] (★) `Σ_{k∈ℤ} φ̂(τ−τ_k) φ̂(τ'−τ_k) = L Φ(τ−τ')`. -/ poisson : ∀ τ τ', HasSum (fun k : ℤ => F.phiHat (τ - p.tau k) * F.phiHat (τ' - p.tau k)) (p.L * F.Phi (τ - τ')) - /-- [eq:abdef] `1 − 2w/L ≤ b ≤ a ≤ 1`. -/ - b_lower : 1 - 2 * p.w / p.L ≤ F.b + /-- window-generic remnant of [eq:abdef]: `1/2 ≤ b ≤ a ≤ 1`. -/ + b_ge_half : 1 / 2 ≤ F.b b_le_a : F.b ≤ F.a a_le_one : F.a ≤ 1 - /-- [eq:psidef] in majorant form, with the [eq:psiints] integrals (`Ψ₀ = 4 + 2log(c_ϱL/4w)`, - `∫ψ² ≤ 8L`) — fields match `Zeta23.Params.psi'_integrable / psi'_sq_integrable / - integral_psi'_Ioi_le / integral_psi'_sq_le` in Zeta23/Taper.lean (consumed by [lem:ends]). -/ + /-- [eq:psidef] in majorant form, with the [eq:psiints] integrals. -/ psi_integrable : Integrable (psiA cϱ p) psi_sq_integrable : Integrable (fun r => psiA cϱ p r ^ 2) integral_psi_Ioi_le : ∫ r in Set.Ioi 0, psiA cϱ p r ≤ 4 + 2 * Real.log (cϱ * p.L / (4 * p.w)) integral_psi_sq_le : ∫ r, psiA cϱ p r ^ 2 ≤ 8 * p.L - /-- `|φ̂| ≤ ψ` and `|Φ| ≤ ψ` [eq:psidef] in the majorant form used by [lem:ends]. -/ + /-- `|φ̂| ≤ ψ` and `|Φ| ≤ ψ` [eq:psidef]. -/ phiHat_le_psi : ∀ r, |F.phiHat r| ≤ psiA cϱ p r Phi_le_psi : ∀ r, |F.Phi r| ≤ psiA cϱ p r - /-- Π_X is continuous and [eq:PiPfacts] `|Π_X(τ)| ≤ 3√X/(1+|τ|)` (§2.1), for the concrete - `Zeta23.PiX X` [eq:Pidef] — via `PiX_bound` (holds for all `X ≥ 1`) and `PiX_continuous`. -/ + /-- Π_X is continuous and [eq:PiPfacts] `|Π_X(τ)| ≤ 3√X/(1+|τ|)`. -/ PiX_cont : Continuous (Zeta23.PiX p.X) PiX_bound : ∀ τ, |Zeta23.PiX p.X τ| ≤ 3 * Real.sqrt p.X / (1 + |τ|) +/-- Window-generic core of the taper hypotheses (adds `λ ≤ 1` to `LocalHypsCoreW`). -/ +structure LocalHypsCore (cϱ : ℝ) (p : Setting) (F : LocalFun) + extends LocalHypsCoreW cϱ p F : Prop where + /-- `λ ≤ 1` [Notation]. -/ + lam_le_one : p.lam ≤ 1 + +/-- Flat-top taper hypotheses (adds `[eq:gbounds]` plateau lower bound and `[eq:abdef]` +`1 - 2w/L ≤ b` to `LocalHypsCore`). -/ +structure LocalHyps (cϱ : ℝ) (p : Setting) (F : LocalFun) + extends LocalHypsCore cϱ p F : Prop where + /-- [eq:gbounds] `(L−2w−|y|)₊ ≤ g(y)`. -/ + g_lower : ∀ y, max (p.L - 2 * p.w - |y|) 0 ≤ F.g y + /-- [eq:abdef] `1 − 2w/L ≤ b`. -/ + b_lower : 1 - 2 * p.w / p.L ≤ F.b + +/-- Projection `LocalHypsCore → LocalHypsCoreW`. -/ +lemma LocalHypsCore.toCoreW {cϱ : ℝ} {p : Setting} {F : LocalFun} (hF : LocalHypsCore cϱ p F) : + LocalHypsCoreW cϱ p F := hF.toLocalHypsCoreW + +/-- Projection `LocalHyps → LocalHypsCore`. -/ +theorem LocalHyps.toCore {cϱ : ℝ} {p : Setting} {F : LocalFun} (hF : LocalHyps cϱ p F) : + LocalHypsCore cϱ p F := hF.toLocalHypsCore + /-- "For `T ≥ T₀`, uniformly": `P p F` holds for every parameter set `p` at bandwidth ratio `lam` with `T₀ ≤ p.T` and every functional datum `F` satisfying the local hypotheses. -/ def EventuallyAt (cϱ lam : ℝ) (P : Setting → LocalFun → Prop) : Prop := ∃ T₀ : ℝ, ∀ (p : Setting) (F : LocalFun), p.lam = lam → T₀ ≤ p.T → LocalHyps cϱ p F → P p F +/-- "uniformly for T ≥ T₀", Core-quantified: stronger than `EventuallyAt`. -/ +def EventuallyAtCore (cϱ lam : ℝ) (P : Setting → LocalFun → Prop) : Prop := + ∃ T₀ : ℝ, ∀ (p : Setting) (F : LocalFun), p.lam = lam → T₀ ≤ p.T → LocalHypsCore cϱ p F → P p F + +theorem EventuallyAtCore.to_eventuallyAt {cϱ lam : ℝ} {P : Setting → LocalFun → Prop} + (h : EventuallyAtCore cϱ lam P) : EventuallyAt cϱ lam P := by + obtain ⟨T₀, hT₀⟩ := h + exact ⟨T₀, fun p F hl hT hF => hT₀ p F hl hT hF.toCore⟩ + /-! ### Bilinearity and symmetry of 𝓜[·,·] (§5.4: "a symmetric bilinear form (Φ² is even)") -/ section MformLemmas @@ -319,336 +337,6 @@ lemma Setting.le_X_of_T {p : Setting} (hlam : 0 < p.lam) {x₀ : ℝ} _ ≤ Real.exp (p.lam * p.l) := by linarith [Real.add_one_le_exp (p.lam * p.l)] _ = p.X := rfl -lemma LocalHyps.eight_le_L (hF : LocalHyps cϱ p F) : 8 ≤ p.L := by - linarith [hF.one_le_w, hF.w_le] - -lemma LocalHyps.L_pos (hF : LocalHyps cϱ p F) : 0 < p.L := by linarith [hF.eight_le_L] - -lemma LocalHyps.b_pos (hF : LocalHyps cϱ p F) : 0 < F.b := by - have h1 : 2 * p.w / p.L ≤ 1 / 4 := by - rw [div_le_iff₀ hF.L_pos]; linarith [hF.w_le] - linarith [hF.b_lower] - -lemma LocalHyps.a_pos (hF : LocalHyps cϱ p F) : 0 < F.a := hF.b_pos.trans_le hF.b_le_a - -/-- `∫Φ² = 2πbL ≤ 2πL`. -/ -lemma LocalHyps.integral_Phi_sq_le (hF : LocalHyps cϱ p F) : ∫ x, F.Phi x ^ 2 ≤ 2 * π * p.L := by - rw [hF.Phi_sq_integral] - have hb1 : F.b ≤ 1 := hF.b_le_a.trans hF.a_le_one - have hL := hF.L_pos - calc 2 * π * F.b * p.L = (2 * π * p.L) * F.b := by ring - _ ≤ (2 * π * p.L) * 1 := by gcongr - _ = 2 * π * p.L := mul_one _ - -/-- [eq:PiPfacts] on `I`: `|Π_X| ≤ 3√X/T` (§5.2, §5.4). -/ -lemma LocalHyps.PiX_le_on_I (hF : LocalHyps cϱ p F) (hT : 0 < p.T) : - ∀ τ ∈ Set.Icc p.T (2 * p.T), |Zeta23.PiX p.X τ| ≤ 3 * Real.sqrt p.X / p.T := by - intro τ hτ - refine (hF.PiX_bound τ).trans ?_ - apply div_le_div_of_nonneg_left (by positivity) hT - rw [abs_of_nonneg (by linarith [hτ.1])]; linarith [hτ.1] - -/-! ### Window-generic core of the taper hypotheses (paper §7.1 [subsec:MT]) - -"Nothing in Sections 4–5 used that φ is flat-topped" — except the [eq:gbounds] plateau lower -bound and the [eq:abdef] lower bound on b. LocalHypsCore is LocalHyps minus exactly those two -facts, with the window-generic replacements g_nonneg and b_ge_half (both hold for the -Montgomery–Taylor window of [thm:D], which does not satisfy LocalHyps). Surviving field names -are identical to LocalHyps'. The window-generic §5 results can be re-typed over this -structure; the structure itself is purely additive. -/ - -structure LocalHypsCore (cϱ : ℝ) (p : Setting) (F : LocalFun) : Prop where - /-- [eq:phinorms] `c_ϱ ≥ 4`. -/ - four_le_cϱ : 4 ≤ cϱ - /-- `0 < λ ≤ 1` [Notation]. -/ - lam_pos : 0 < p.lam - lam_le_one : p.lam ≤ 1 - /-- [eq:wrange] `1 ≤ w ≤ L/8` (forces `L ≥ 8`). -/ - one_le_w : 1 ≤ p.w - w_le : p.w ≤ p.L / 8 - /-- "T is large": `l ≥ 1`, i.e. `T ≥ 2πe`. -/ - one_le_l : 1 ≤ p.l - /-- φ̂ real-analytic facts: continuity; evenness (φ even) [§2.2 "φ̂ and Φ are real, even, entire"]. -/ - phiHat_cont : Continuous F.phiHat - phiHat_even : ∀ r, F.phiHat (-r) = F.phiHat r - /-- [eq:psidef] `|φ̂(r)| ≤ ψ(r) := min(L, 2/|r|, c_ϱ/(w r²))`, split into three division-free bounds. -/ - phiHat_le_L : ∀ r, |F.phiHat r| ≤ p.L - phiHat_le_inv : ∀ r, |F.phiHat r| * |r| ≤ 2 - phiHat_le_sq : ∀ r, |F.phiHat r| * r ^ 2 ≤ cϱ / p.w - /-- Integrability consequences of [eq:psidef] (`φ̂² ≤ ψ² ≤ min(L², c_ϱ²/(w²r⁴))`), and - [eq:psiints] in the packaged form `∫ φ̂(r)²|r| dr ≤ ∫ ψ²|r| = 8 + 8 log(c_ϱL/4w)` (§2.2, used at - §5.2 "∫ φ̂(r)²|r| dr ≪ log L"). -/ - phiHat_sq_integrable : Integrable (fun r => F.phiHat r ^ 2) - phiHat_sq_mul_abs_integrable : Integrable (fun r => F.phiHat r ^ 2 * |r|) - integral_phiHat_sq_mul_abs_le : - ∫ r, F.phiHat r ^ 2 * |r| ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) - /-- also from [eq:psidef]: `φ̂(r)²r² ≤ min(4, (c_ϱ/w)²/r²)`, so `∫ φ̂(r)² r² dr ≤ 8 + 2(c_ϱ/w)²` - (used for the `|r| > τ_k/2` tails at §5.2 in place of the paper's sharper r⁻⁴ bound). -/ - phiHat_sq_mul_sq_integrable : Integrable (fun r => F.phiHat r ^ 2 * r ^ 2) - integral_phiHat_sq_mul_sq_le : ∫ r, F.phiHat r ^ 2 * r ^ 2 ≤ 8 + 2 * (cϱ / p.w) ^ 2 - /-- `∫ φ̂(r)² dr = 2π ∫ φ² = 2π a L` [prop:trace proof, §5.2; Plancherel in the paper's - convention `∫ f ḡ = (2π)⁻¹ ∫ f̂ conj ĝ` + eq:abdef]. -/ - phiHat_sq_integral : ∫ r, F.phiHat r ^ 2 = 2 * π * F.a * p.L - /-- `φ̂² = Â_φ` on ℝ [§2.2] + Fourier inversion, in the real form used at §5.2: - `∫ φ̂(r)² cos(ry) dr = 2π A_φ(y)` (`φ̂²` even, `A_φ` even, continuous, supported in `[−L,L]`). -/ - phiHat_sq_fourier : ∀ y, ∫ r, F.phiHat r ^ 2 * Real.cos (r * y) = 2 * π * F.Aphi y - /-- window-generic remnant of [eq:gbounds]: `g ≥ 0` and `g ≤ A_φ ≤ (L−|y|)₊` - (the flat-top plateau lower bound `(L−2w−|y|)₊ ≤ g` is NOT here — see §7.1). -/ - g_nonneg : ∀ y, 0 ≤ F.g y - g_le_Aphi : ∀ y, F.g y ≤ F.Aphi y - Aphi_le : ∀ y, F.Aphi y ≤ max (p.L - |y|) 0 - /-- Φ facts: `Φ` is C¹ (indeed entire), even [§2.2]. -/ - Phi_contDiff : ContDiff ℝ 1 F.Phi - Phi_even : ∀ r, F.Phi (-r) = F.Phi r - /-- [eq:psidef] `|Φ(r)| ≤ ψ(r)`, three division-free bounds. -/ - Phi_le_L : ∀ r, |F.Phi r| ≤ p.L - Phi_le_inv : ∀ r, |F.Phi r| * |r| ≤ 2 - Phi_le_sq : ∀ r, |F.Phi r| * r ^ 2 ≤ cϱ / p.w - /-- Integrability consequences of [eq:psidef] for Φ, and [eq:psiints] packaged as - `∫ Φ(x)²|x| dx ≤ 8 + 8 log(c_ϱL/4w)` (§5.4 "∫Φ(x)²|x|dx ≪ log L (by (eq:psidef), (eq:psiints))"). -/ - Phi_sq_integrable : Integrable (fun x => F.Phi x ^ 2) - Phi_sq_mul_abs_integrable : Integrable (fun x => F.Phi x ^ 2 * |x|) - integral_Phi_sq_mul_abs_le : - ∫ x, F.Phi x ^ 2 * |x| ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) - /-- second moment of `Φ²` (same [eq:psidef] path as the `φ̂` version; needed against the - `10r²/t` term of `mu_increment_bound` in [prop:mumu]). -/ - Phi_sq_mul_sq_integrable : Integrable (fun x => F.Phi x ^ 2 * x ^ 2) - integral_Phi_sq_mul_sq_le : ∫ x, F.Phi x ^ 2 * x ^ 2 ≤ 8 + 2 * (cϱ / p.w) ^ 2 - /-- `Φ(0) = aL` [§2.2]. -/ - Phi_zero : F.Phi 0 = F.a * p.L - /-- `∫_ℝ Φ² = 2π g(0) = 2π b L` [§2.2]. -/ - Phi_sq_integral : ∫ x, F.Phi x ^ 2 = 2 * π * F.b * p.L - /-- [eq:Phi2FT] `∫_ℝ Φ(x)² e^{ixy} dx = 2π g(y)` (§5.4), real form (`Φ²`, `g` even). -/ - Phi_sq_fourier : ∀ y, ∫ x, F.Phi x ^ 2 * Real.cos (x * y) = 2 * π * F.g y - /-- [lem:poisson] (★) `Σ_{k∈ℤ} φ̂(τ−τ_k) φ̂(τ'−τ_k) = L Φ(τ−τ')` (§2.2). -/ - poisson : ∀ τ τ', HasSum (fun k : ℤ => F.phiHat (τ - p.tau k) * F.phiHat (τ' - p.tau k)) - (p.L * F.Phi (τ - τ')) - /-- window-generic remnant of [eq:abdef]: `1/2 ≤ b ≤ a ≤ 1` (the flat-top `1 − 2w/L ≤ b` - is NOT here; 1/2 suffices for every positivity/division use and holds for the - Montgomery–Taylor window). -/ - b_ge_half : 1 / 2 ≤ F.b - b_le_a : F.b ≤ F.a - a_le_one : F.a ≤ 1 - /-- [eq:psidef] in majorant form, with the [eq:psiints] integrals (`Ψ₀ = 4 + 2log(c_ϱL/4w)`, - `∫ψ² ≤ 8L`) — fields match `Zeta23.Params.psi'_integrable / psi'_sq_integrable / - integral_psi'_Ioi_le / integral_psi'_sq_le` in Zeta23/Taper.lean (consumed by [lem:ends]). -/ - psi_integrable : Integrable (psiA cϱ p) - psi_sq_integrable : Integrable (fun r => psiA cϱ p r ^ 2) - integral_psi_Ioi_le : ∫ r in Set.Ioi 0, psiA cϱ p r ≤ 4 + 2 * Real.log (cϱ * p.L / (4 * p.w)) - integral_psi_sq_le : ∫ r, psiA cϱ p r ^ 2 ≤ 8 * p.L - /-- `|φ̂| ≤ ψ` and `|Φ| ≤ ψ` [eq:psidef] in the majorant form used by [lem:ends]. -/ - phiHat_le_psi : ∀ r, |F.phiHat r| ≤ psiA cϱ p r - Phi_le_psi : ∀ r, |F.Phi r| ≤ psiA cϱ p r - /-- Π_X is continuous and [eq:PiPfacts] `|Π_X(τ)| ≤ 3√X/(1+|τ|)` (§2.1), for the concrete - `Zeta23.PiX X` [eq:Pidef] — see `PiX_bound` (holds for all `X ≥ 1`) and `PiX_continuous`. -/ - PiX_cont : Continuous (Zeta23.PiX p.X) - PiX_bound : ∀ τ, |Zeta23.PiX p.X τ| ≤ 3 * Real.sqrt p.X / (1 + |τ|) - - -/-- every flat-top taper datum satisfies the window-generic core: -b ≥ 1 − 2w/L ≥ 3/4 ≥ 1/2 ([eq:abdef] + [eq:wrange]), g ≥ 0 (plateau bound). -/ -theorem LocalHyps.toCore {cϱ : ℝ} {p : Setting} {F : LocalFun} (hF : LocalHyps cϱ p F) : - LocalHypsCore cϱ p F where - four_le_cϱ := hF.four_le_cϱ - lam_pos := hF.lam_pos - lam_le_one := hF.lam_le_one - one_le_w := hF.one_le_w - w_le := hF.w_le - one_le_l := hF.one_le_l - phiHat_cont := hF.phiHat_cont - phiHat_even := hF.phiHat_even - phiHat_le_L := hF.phiHat_le_L - phiHat_le_inv := hF.phiHat_le_inv - phiHat_le_sq := hF.phiHat_le_sq - phiHat_sq_integrable := hF.phiHat_sq_integrable - phiHat_sq_mul_abs_integrable := hF.phiHat_sq_mul_abs_integrable - integral_phiHat_sq_mul_abs_le := hF.integral_phiHat_sq_mul_abs_le - phiHat_sq_mul_sq_integrable := hF.phiHat_sq_mul_sq_integrable - integral_phiHat_sq_mul_sq_le := hF.integral_phiHat_sq_mul_sq_le - phiHat_sq_integral := hF.phiHat_sq_integral - phiHat_sq_fourier := hF.phiHat_sq_fourier - g_nonneg := fun y => le_trans (le_max_right _ _) (hF.g_lower y) - g_le_Aphi := hF.g_le_Aphi - Aphi_le := hF.Aphi_le - Phi_contDiff := hF.Phi_contDiff - Phi_even := hF.Phi_even - Phi_le_L := hF.Phi_le_L - Phi_le_inv := hF.Phi_le_inv - Phi_le_sq := hF.Phi_le_sq - Phi_sq_integrable := hF.Phi_sq_integrable - Phi_sq_mul_abs_integrable := hF.Phi_sq_mul_abs_integrable - integral_Phi_sq_mul_abs_le := hF.integral_Phi_sq_mul_abs_le - Phi_sq_mul_sq_integrable := hF.Phi_sq_mul_sq_integrable - integral_Phi_sq_mul_sq_le := hF.integral_Phi_sq_mul_sq_le - Phi_zero := hF.Phi_zero - Phi_sq_integral := hF.Phi_sq_integral - Phi_sq_fourier := hF.Phi_sq_fourier - poisson := hF.poisson - b_ge_half := by - have h1 : 2 * p.w / p.L ≤ 1 / 4 := by - rw [div_le_iff₀ hF.L_pos] - linarith [hF.w_le] - linarith [hF.b_lower] - b_le_a := hF.b_le_a - a_le_one := hF.a_le_one - psi_integrable := hF.psi_integrable - psi_sq_integrable := hF.psi_sq_integrable - integral_psi_Ioi_le := hF.integral_psi_Ioi_le - integral_psi_sq_le := hF.integral_psi_sq_le - phiHat_le_psi := hF.phiHat_le_psi - Phi_le_psi := hF.Phi_le_psi - PiX_cont := hF.PiX_cont - PiX_bound := hF.PiX_bound - -/-- "uniformly for T ≥ T₀", Core-quantified: stronger than EventuallyAt -(fewer hypotheses on F). -/ -def EventuallyAtCore (cϱ lam : ℝ) (P : Setting → LocalFun → Prop) : Prop := - ∃ T₀ : ℝ, ∀ (p : Setting) (F : LocalFun), p.lam = lam → T₀ ≤ p.T → LocalHypsCore cϱ p F → P p F - -theorem EventuallyAtCore.to_eventuallyAt {cϱ lam : ℝ} {P : Setting → LocalFun → Prop} - (h : EventuallyAtCore cϱ lam P) : EventuallyAt cϱ lam P := by - obtain ⟨T₀, hT₀⟩ := h - exact ⟨T₀, fun p F hl hT hF => hT₀ p F hl hT hF.toCore⟩ - -/-! Core copies of the LocalHyps helper lemmas (same names under the Core namespace). -/ - -lemma LocalHypsCore.eight_le_L (hF : LocalHypsCore cϱ p F) : 8 ≤ p.L := by - linarith [hF.one_le_w, hF.w_le] - -lemma LocalHypsCore.L_pos (hF : LocalHypsCore cϱ p F) : 0 < p.L := by - linarith [hF.eight_le_L] - -lemma LocalHypsCore.b_pos (hF : LocalHypsCore cϱ p F) : 0 < F.b := by - linarith [hF.b_ge_half] - -lemma LocalHypsCore.a_pos (hF : LocalHypsCore cϱ p F) : 0 < F.a := hF.b_pos.trans_le hF.b_le_a - -lemma LocalHypsCore.integral_Phi_sq_le (hF : LocalHypsCore cϱ p F) : - ∫ x, F.Phi x ^ 2 ≤ 2 * π * p.L := by - rw [hF.Phi_sq_integral] - have hb1 : F.b ≤ 1 := hF.b_le_a.trans hF.a_le_one - have hL := hF.L_pos - calc 2 * π * F.b * p.L = (2 * π * p.L) * F.b := by ring - _ ≤ (2 * π * p.L) * 1 := by gcongr - _ = 2 * π * p.L := mul_one _ - -lemma LocalHypsCore.PiX_le_on_I (hF : LocalHypsCore cϱ p F) (hT : 0 < p.T) : - ∀ τ ∈ Set.Icc p.T (2 * p.T), |Zeta23.PiX p.X τ| ≤ 3 * Real.sqrt p.X / p.T := by - intro τ hτ - refine (hF.PiX_bound τ).trans ?_ - apply div_le_div_of_nonneg_left (by positivity) hT - rw [abs_of_nonneg (by linarith [hτ.1])] - linarith [hτ.1] - -lemma LocalHypsCore.Aphi_nonneg (hF : LocalHypsCore cϱ p F) (y : ℝ) : 0 ≤ F.Aphi y := - (hF.g_nonneg y).trans (hF.g_le_Aphi y) - -lemma LocalHypsCore.phiHat_sq_mul_integrable_of_bdd (hF : LocalHypsCore cϱ p F) {g : ℝ → ℝ} - (hg : Continuous g) {c : ℝ} (hc : ∀ x, |g x| ≤ c) : - Integrable (fun r => F.phiHat r ^ 2 * g r) := by - have := hF.phiHat_sq_integrable.bdd_mul hg.aestronglyMeasurable - (Filter.Eventually.of_forall (fun x => by rw [Real.norm_eq_abs]; exact hc x)) - simpa only [mul_comm] using this - - -/-- Window-generic taper facts without the bandwidth cap λ ≤ 1 — the family regime is -λ = L/l ∈ (1, 2) (family window L = log(qT/2π), so L > l). -This regime goes beyond the paper: §5's statements all assume λ ≤ 1; nothing Core-typed is -re-typed here — this is a purely additive split: fields = LocalHypsCore's minus lam_le_one, and -LocalHypsCore.toCoreW below. Consumed only by the family-average statements. -/ -structure LocalHypsCoreW (cϱ : ℝ) (p : Setting) (F : LocalFun) : Prop where - /-- [eq:phinorms] `c_ϱ ≥ 4`. -/ - four_le_cϱ : 4 ≤ cϱ - /-- `0 < λ` [Notation] (no upper cap here). -/ - lam_pos : 0 < p.lam - /-- [eq:wrange] `1 ≤ w ≤ L/8` (forces `L ≥ 8`). -/ - one_le_w : 1 ≤ p.w - w_le : p.w ≤ p.L / 8 - /-- "T is large": `l ≥ 1`, i.e. `T ≥ 2πe`. -/ - one_le_l : 1 ≤ p.l - /-- φ̂ real-analytic facts: continuity; evenness (φ even) [§2.2 "φ̂ and Φ are real, even, entire"]. -/ - phiHat_cont : Continuous F.phiHat - phiHat_even : ∀ r, F.phiHat (-r) = F.phiHat r - /-- [eq:psidef] `|φ̂(r)| ≤ ψ(r) := min(L, 2/|r|, c_ϱ/(w r²))`, split into three division-free bounds. -/ - phiHat_le_L : ∀ r, |F.phiHat r| ≤ p.L - phiHat_le_inv : ∀ r, |F.phiHat r| * |r| ≤ 2 - phiHat_le_sq : ∀ r, |F.phiHat r| * r ^ 2 ≤ cϱ / p.w - /-- Integrability consequences of [eq:psidef] (`φ̂² ≤ ψ² ≤ min(L², c_ϱ²/(w²r⁴))`), and - [eq:psiints] in the packaged form `∫ φ̂(r)²|r| dr ≤ ∫ ψ²|r| = 8 + 8 log(c_ϱL/4w)` (§2.2, used at - §5.2 "∫ φ̂(r)²|r| dr ≪ log L"). -/ - phiHat_sq_integrable : Integrable (fun r => F.phiHat r ^ 2) - phiHat_sq_mul_abs_integrable : Integrable (fun r => F.phiHat r ^ 2 * |r|) - integral_phiHat_sq_mul_abs_le : - ∫ r, F.phiHat r ^ 2 * |r| ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) - /-- also from [eq:psidef]: `φ̂(r)²r² ≤ min(4, (c_ϱ/w)²/r²)`, so `∫ φ̂(r)² r² dr ≤ 8 + 2(c_ϱ/w)²` - (used for the `|r| > τ_k/2` tails at §5.2 in place of the paper's sharper r⁻⁴ bound). -/ - phiHat_sq_mul_sq_integrable : Integrable (fun r => F.phiHat r ^ 2 * r ^ 2) - integral_phiHat_sq_mul_sq_le : ∫ r, F.phiHat r ^ 2 * r ^ 2 ≤ 8 + 2 * (cϱ / p.w) ^ 2 - /-- `∫ φ̂(r)² dr = 2π ∫ φ² = 2π a L` [prop:trace proof, §5.2; Plancherel in the paper's - convention `∫ f ḡ = (2π)⁻¹ ∫ f̂ conj ĝ` + eq:abdef]. -/ - phiHat_sq_integral : ∫ r, F.phiHat r ^ 2 = 2 * π * F.a * p.L - /-- `φ̂² = Â_φ` on ℝ [§2.2] + Fourier inversion, in the real form used at §5.2: - `∫ φ̂(r)² cos(ry) dr = 2π A_φ(y)` (`φ̂²` even, `A_φ` even, continuous, supported in `[−L,L]`). -/ - phiHat_sq_fourier : ∀ y, ∫ r, F.phiHat r ^ 2 * Real.cos (r * y) = 2 * π * F.Aphi y - /-- window-generic remnant of [eq:gbounds]: `g ≥ 0` and `g ≤ A_φ ≤ (L−|y|)₊` - (the flat-top plateau lower bound `(L−2w−|y|)₊ ≤ g` is NOT here — see §7.1). -/ - g_nonneg : ∀ y, 0 ≤ F.g y - g_le_Aphi : ∀ y, F.g y ≤ F.Aphi y - Aphi_le : ∀ y, F.Aphi y ≤ max (p.L - |y|) 0 - /-- Φ facts: `Φ` is C¹ (indeed entire), even [§2.2]. -/ - Phi_contDiff : ContDiff ℝ 1 F.Phi - Phi_even : ∀ r, F.Phi (-r) = F.Phi r - /-- [eq:psidef] `|Φ(r)| ≤ ψ(r)`, three division-free bounds. -/ - Phi_le_L : ∀ r, |F.Phi r| ≤ p.L - Phi_le_inv : ∀ r, |F.Phi r| * |r| ≤ 2 - Phi_le_sq : ∀ r, |F.Phi r| * r ^ 2 ≤ cϱ / p.w - /-- Integrability consequences of [eq:psidef] for Φ, and [eq:psiints] packaged as - `∫ Φ(x)²|x| dx ≤ 8 + 8 log(c_ϱL/4w)` (§5.4 "∫Φ(x)²|x|dx ≪ log L (by (eq:psidef), (eq:psiints))"). -/ - Phi_sq_integrable : Integrable (fun x => F.Phi x ^ 2) - Phi_sq_mul_abs_integrable : Integrable (fun x => F.Phi x ^ 2 * |x|) - integral_Phi_sq_mul_abs_le : - ∫ x, F.Phi x ^ 2 * |x| ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) - /-- second moment of `Φ²` (same [eq:psidef] path as the `φ̂` version; needed against the - `10r²/t` term of `mu_increment_bound` in [prop:mumu]). -/ - Phi_sq_mul_sq_integrable : Integrable (fun x => F.Phi x ^ 2 * x ^ 2) - integral_Phi_sq_mul_sq_le : ∫ x, F.Phi x ^ 2 * x ^ 2 ≤ 8 + 2 * (cϱ / p.w) ^ 2 - /-- `Φ(0) = aL` [§2.2]. -/ - Phi_zero : F.Phi 0 = F.a * p.L - /-- `∫_ℝ Φ² = 2π g(0) = 2π b L` [§2.2]. -/ - Phi_sq_integral : ∫ x, F.Phi x ^ 2 = 2 * π * F.b * p.L - /-- [eq:Phi2FT] `∫_ℝ Φ(x)² e^{ixy} dx = 2π g(y)` (§5.4), real form (`Φ²`, `g` even). -/ - Phi_sq_fourier : ∀ y, ∫ x, F.Phi x ^ 2 * Real.cos (x * y) = 2 * π * F.g y - /-- [lem:poisson] (★) `Σ_{k∈ℤ} φ̂(τ−τ_k) φ̂(τ'−τ_k) = L Φ(τ−τ')` (§2.2). -/ - poisson : ∀ τ τ', HasSum (fun k : ℤ => F.phiHat (τ - p.tau k) * F.phiHat (τ' - p.tau k)) - (p.L * F.Phi (τ - τ')) - /-- window-generic remnant of [eq:abdef]: `1/2 ≤ b ≤ a ≤ 1` (the flat-top `1 − 2w/L ≤ b` - is NOT here; 1/2 suffices for every positivity/division use and holds for the - Montgomery–Taylor window). -/ - b_ge_half : 1 / 2 ≤ F.b - b_le_a : F.b ≤ F.a - a_le_one : F.a ≤ 1 - /-- [eq:psidef] in majorant form, with the [eq:psiints] integrals (`Ψ₀ = 4 + 2log(c_ϱL/4w)`, - `∫ψ² ≤ 8L`) — fields match `Zeta23.Params.psi'_integrable / psi'_sq_integrable / - integral_psi'_Ioi_le / integral_psi'_sq_le` in Zeta23/Taper.lean (consumed by [lem:ends]). -/ - psi_integrable : Integrable (psiA cϱ p) - psi_sq_integrable : Integrable (fun r => psiA cϱ p r ^ 2) - integral_psi_Ioi_le : ∫ r in Set.Ioi 0, psiA cϱ p r ≤ 4 + 2 * Real.log (cϱ * p.L / (4 * p.w)) - integral_psi_sq_le : ∫ r, psiA cϱ p r ^ 2 ≤ 8 * p.L - /-- `|φ̂| ≤ ψ` and `|Φ| ≤ ψ` [eq:psidef] in the majorant form used by [lem:ends]. -/ - phiHat_le_psi : ∀ r, |F.phiHat r| ≤ psiA cϱ p r - Phi_le_psi : ∀ r, |F.Phi r| ≤ psiA cϱ p r - /-- Π_X is continuous and [eq:PiPfacts] `|Π_X(τ)| ≤ 3√X/(1+|τ|)` (§2.1), for the concrete - `Zeta23.PiX X` [eq:Pidef] — see `PiX_bound` (holds for all `X ≥ 1`) / `PiX_continuous`. -/ - PiX_cont : Continuous (Zeta23.PiX p.X) - PiX_bound : ∀ τ, |Zeta23.PiX p.X τ| ≤ 3 * Real.sqrt p.X / (1 + |τ|) - - -/-- every flat-top taper datum satisfies the window-generic core: -b ≥ 1 − 2w/L ≥ 3/4 ≥ 1/2 ([eq:abdef] + [eq:wrange]), g ≥ 0 (plateau bound). -/ -lemma LocalHypsCore.toCoreW {cϱ : ℝ} {p : Setting} {F : LocalFun} (hF : LocalHypsCore cϱ p F) : - LocalHypsCoreW cϱ p F := - ⟨hF.four_le_cϱ, hF.lam_pos, hF.one_le_w, hF.w_le, hF.one_le_l, hF.phiHat_cont, hF.phiHat_even, hF.phiHat_le_L, hF.phiHat_le_inv, hF.phiHat_le_sq, hF.phiHat_sq_integrable, hF.phiHat_sq_mul_abs_integrable, hF.integral_phiHat_sq_mul_abs_le, hF.phiHat_sq_mul_sq_integrable, hF.integral_phiHat_sq_mul_sq_le, hF.phiHat_sq_integral, hF.phiHat_sq_fourier, hF.g_nonneg, hF.g_le_Aphi, hF.Aphi_le, hF.Phi_contDiff, hF.Phi_even, hF.Phi_le_L, hF.Phi_le_inv, hF.Phi_le_sq, hF.Phi_sq_integrable, hF.Phi_sq_mul_abs_integrable, hF.integral_Phi_sq_mul_abs_le, hF.Phi_sq_mul_sq_integrable, hF.integral_Phi_sq_mul_sq_le, hF.Phi_zero, hF.Phi_sq_integral, hF.Phi_sq_fourier, hF.poisson, hF.b_ge_half, hF.b_le_a, hF.a_le_one, hF.psi_integrable, hF.psi_sq_integrable, hF.integral_psi_Ioi_le, hF.integral_psi_sq_le, hF.phiHat_le_psi, hF.Phi_le_psi, hF.PiX_cont, hF.PiX_bound⟩ - lemma LocalHypsCoreW.eight_le_L {cϱ : ℝ} {p : Setting} {F : LocalFun} (hF : LocalHypsCoreW cϱ p F) : 8 ≤ p.L := by linarith [hF.one_le_w, hF.w_le] @@ -673,6 +361,15 @@ lemma LocalHypsCoreW.integral_Phi_sq_le {cϱ : ℝ} {p : Setting} {F : LocalFun} _ ≤ (2 * π * p.L) * 1 := by gcongr _ = 2 * π * p.L := mul_one _ +lemma LocalHypsCoreW.PiX_le_on_I {cϱ : ℝ} {p : Setting} {F : LocalFun} + (hF : LocalHypsCoreW cϱ p F) (hT : 0 < p.T) : + ∀ τ ∈ Set.Icc p.T (2 * p.T), |Zeta23.PiX p.X τ| ≤ 3 * Real.sqrt p.X / p.T := by + intro τ hτ + refine (hF.PiX_bound τ).trans ?_ + apply div_le_div_of_nonneg_left (by positivity) hT + rw [abs_of_nonneg (by linarith [hτ.1])] + linarith [hτ.1] + lemma LocalHypsCoreW.Aphi_nonneg {cϱ : ℝ} {p : Setting} {F : LocalFun} (hF : LocalHypsCoreW cϱ p F) (y : ℝ) : 0 ≤ F.Aphi y := (hF.g_nonneg y).trans (hF.g_le_Aphi y) @@ -685,6 +382,32 @@ lemma LocalHypsCoreW.phiHat_sq_mul_integrable_of_bdd {cϱ : ℝ} {p : Setting} { (Filter.Eventually.of_forall (fun x => by rw [Real.norm_eq_abs]; exact hc x)) simpa only [mul_comm] using this +lemma LocalHypsCore.eight_le_L (hF : LocalHypsCore cϱ p F) : 8 ≤ p.L := hF.toCoreW.eight_le_L +lemma LocalHypsCore.L_pos (hF : LocalHypsCore cϱ p F) : 0 < p.L := hF.toCoreW.L_pos +lemma LocalHypsCore.b_pos (hF : LocalHypsCore cϱ p F) : 0 < F.b := hF.toCoreW.b_pos +lemma LocalHypsCore.a_pos (hF : LocalHypsCore cϱ p F) : 0 < F.a := hF.toCoreW.a_pos +lemma LocalHypsCore.integral_Phi_sq_le (hF : LocalHypsCore cϱ p F) : + ∫ x, F.Phi x ^ 2 ≤ 2 * π * p.L := hF.toCoreW.integral_Phi_sq_le +lemma LocalHypsCore.PiX_le_on_I (hF : LocalHypsCore cϱ p F) (hT : 0 < p.T) : + ∀ τ ∈ Set.Icc p.T (2 * p.T), |Zeta23.PiX p.X τ| ≤ 3 * Real.sqrt p.X / p.T := + hF.toCoreW.PiX_le_on_I hT +lemma LocalHypsCore.Aphi_nonneg (hF : LocalHypsCore cϱ p F) (y : ℝ) : 0 ≤ F.Aphi y := + hF.toCoreW.Aphi_nonneg y +lemma LocalHypsCore.phiHat_sq_mul_integrable_of_bdd (hF : LocalHypsCore cϱ p F) {g : ℝ → ℝ} + (hg : Continuous g) {c : ℝ} (hc : ∀ x, |g x| ≤ c) : + Integrable (fun r => F.phiHat r ^ 2 * g r) := + hF.toCoreW.phiHat_sq_mul_integrable_of_bdd hg hc + +lemma LocalHyps.eight_le_L (hF : LocalHyps cϱ p F) : 8 ≤ p.L := hF.toCore.eight_le_L +lemma LocalHyps.L_pos (hF : LocalHyps cϱ p F) : 0 < p.L := hF.toCore.L_pos +lemma LocalHyps.b_pos (hF : LocalHyps cϱ p F) : 0 < F.b := hF.toCore.b_pos +lemma LocalHyps.a_pos (hF : LocalHyps cϱ p F) : 0 < F.a := hF.toCore.a_pos +lemma LocalHyps.integral_Phi_sq_le (hF : LocalHyps cϱ p F) : + ∫ x, F.Phi x ^ 2 ≤ 2 * π * p.L := hF.toCore.integral_Phi_sq_le +lemma LocalHyps.PiX_le_on_I (hF : LocalHyps cϱ p F) (hT : 0 < p.T) : + ∀ τ ∈ Set.Icc p.T (2 * p.T), |Zeta23.PiX p.X τ| ≤ 3 * Real.sqrt p.X / p.T := + hF.toCore.PiX_le_on_I hT + /-- H-cheb [eq:cheb1] ⇒ `|P_X(τ)| ≤ (1/π) Σ_{n≤X} Λ(n)/√n ≤ (3/π)√X ≤ √X` for `X ≥ x₀` ([eq:PiPfacts] second half, §2.1; used as `|P_X| ≤ √X` at §5.4). -/ lemma PX_abs_le (hcheb : Zeta23.ChebyshevMertens) : @@ -711,6 +434,54 @@ lemma PX_abs_le (hcheb : Zeta23.ChebyshevMertens) : rw [div_le_one Real.pi_pos]; exact h3 _ = Real.sqrt X := one_mul _ +/-- Convert `Zeta23.GammaFacts` to `GammaFactsFor` with `q = 1`. -/ +lemma gammaFacts_toFor (hΓ : Zeta23.GammaFacts) : + GammaFactsFor Zeta23.mu (fun τ => (1 : ℝ) * |τ| / (2 * π)) Zeta23.ell1 := by + simpa only [one_mul] using hΓ + +/-- From `GammaFactsFor` with `q ≥ 1`: `|u τ| ≤ C · l` on `[T, 2T]` for `T ≥ T₀`. -/ +lemma gamma_abs_le {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) : + ∃ C T₀ : ℝ, 0 < C ∧ ∀ p : Setting, T₀ ≤ p.T → + ∀ τ ∈ Set.Icc p.T (2 * p.T), |u τ| ≤ C * p.l := by + obtain ⟨Cs, hCs⟩ := hΓ.stirling + have hq0 : 0 < q := by linarith + have hlq : 0 ≤ Real.log q := Real.log_nonneg hq + refine ⟨Real.log q + Real.log 2 + 1 + |Cs|, 2 * π * Real.exp 1, by positivity, fun p hT τ hτ => ?_⟩ + have hT0 : 2 * π ≤ p.T := Setting.twopi_le_T zero_le_one hT + have hl1 : 1 ≤ p.l := Setting.le_l_of_T hT + have hτpos : 0 < τ := by linarith [hτ.1, Real.pi_gt_three] + have hτ1 : 1 ≤ |τ| := by rw [abs_of_pos hτpos]; linarith [hτ.1, Real.pi_gt_three] + have hst := hCs τ hτ1 + have hx1 : 1 ≤ q * |τ| / (2 * π) := by + rw [le_div_iff₀ (by positivity), abs_of_pos hτpos]; nlinarith [hτ.1] + have hlog0 : 0 ≤ Real.log (q * |τ| / (2 * π)) := Real.log_nonneg hx1 + have hlogup : Real.log (q * |τ| / (2 * π)) ≤ Real.log q + Real.log 2 + p.l := by + have hτT : |τ| ≤ 2 * p.T := by rw [abs_of_pos hτpos]; exact hτ.2 + calc Real.log (q * |τ| / (2 * π)) ≤ Real.log (q * (2 * p.T) / (2 * π)) := + Real.log_le_log (by positivity) (by gcongr) + _ = Real.log q + Real.log 2 + p.l := by + have hTpos : 0 < p.T := by linarith [Real.pi_gt_three] + rw [show q * (2 * p.T) / (2 * π) = q * (2 * (p.T / (2 * π))) by ring, + Real.log_mul hq0.ne' (by positivity), + Real.log_mul (by norm_num) (by positivity)] + simp [Setting.l, Zeta23.l]; ring + have hCsb : Cs / τ ^ 2 ≤ |Cs| := + (div_le_div_of_nonneg_right (le_abs_self _) (sq_nonneg _)).trans + ((div_le_div_of_nonneg_left (abs_nonneg _) one_pos (by nlinarith [sq_abs τ])).trans_eq (div_one _)) + have h2π : (1 : ℝ) ≤ 2 * π := by linarith [Real.pi_gt_three] + have hterm : |1 / (2 * π) * Real.log (q * |τ| / (2 * π))| ≤ Real.log q + Real.log 2 + p.l := by + rw [abs_mul, abs_of_pos (by positivity : (0 : ℝ) < 1 / (2 * π)), abs_of_nonneg hlog0] + exact (mul_le_mul_of_nonneg_right ((div_le_one (by positivity)).2 h2π) hlog0).trans + (by linarith) + calc |u τ| = |(u τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))) + + 1 / (2 * π) * Real.log (q * |τ| / (2 * π))| := by ring_nf + _ ≤ |u τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))| + + |1 / (2 * π) * Real.log (q * |τ| / (2 * π))| := abs_add_le _ _ + _ ≤ |Cs| + (Real.log q + Real.log 2 + p.l) := add_le_add (hst.trans hCsb) hterm + _ ≤ (Real.log q + Real.log 2 + 1 + |Cs|) * p.l := by + nlinarith [abs_nonneg Cs, Real.log_pos one_lt_two] + /-- H-Γ [eq:mufacts] ⇒ for `T ≥ T₀`: `|μ(τ)| ≤ l` on `I = [T,2T]` (the paper's `0 < μ ≤ l on I`, §5.4; only the two-sided bound is needed). -/ lemma mu_abs_le_l (hΓ : Zeta23.GammaFacts) : ∃ T₀ : ℝ, ∀ p : Setting, T₀ ≤ p.T → @@ -987,18 +758,20 @@ end TraceLemmas section TraceAnalytic variable {cϱ : ℝ} {p : Setting} {F : LocalFun} -/-- From H-Γ [eq:mufacts]: a crude global bound `|μ(τ)| ≤ M + |τ|` (used only to control the -`|r| > τ_k/2` tails, §5.2 "|μ(τ_k+r) − μ(τ_k)| ≪ l + log(2+|r|)"). -/ -lemma mu_linear_bound (hΓ : Zeta23.GammaFacts) : ∃ M : ℝ, 0 ≤ M ∧ ∀ τ, |Zeta23.mu τ| ≤ M + |τ| := by +/-- From `GammaFactsFor` with `q ≥ 1`: crude global bound `|u τ| ≤ M + |τ|`. -/ +lemma gamma_linear_bound {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) : + ∃ M : ℝ, 0 ≤ M ∧ ∀ τ, |u τ| ≤ M + |τ| := by obtain ⟨C, hC⟩ := hΓ.stirling obtain ⟨M₁, hM₁⟩ := isCompact_Icc.exists_bound_of_continuousOn (hΓ.smooth.continuous.continuousOn (s := Set.Icc (-1 : ℝ) 1)) - refine ⟨max M₁ (1 + |C|), le_max_of_le_right (by positivity), fun τ => ?_⟩ + have hq0 : 0 < q := by linarith + have hlq : 0 ≤ Real.log q := Real.log_nonneg hq + refine ⟨max M₁ (1 + Real.log q + |C|), le_max_of_le_right (by positivity), fun τ => ?_⟩ rcases le_or_gt 1 |τ| with h1 | h1 - · -- |τ| ≥ 1: Stirling - have hst := hC τ h1 + · have hst := hC τ h1 have hx : 0 < |τ| / (2 * π) := by positivity - have hlog : |Real.log (|τ| / (2 * π))| ≤ |τ| / (2 * π) + 2 * π := by + have hlog1 : |Real.log (|τ| / (2 * π))| ≤ |τ| / (2 * π) + 2 * π := by rw [abs_le]; constructor · have := Real.log_le_sub_one_of_pos (inv_pos.2 hx) rw [Real.log_inv] at this @@ -1006,76 +779,91 @@ lemma mu_linear_bound (hΓ : Zeta23.GammaFacts) : ∃ M : ℝ, 0 ≤ M ∧ ∀ rw [inv_div, div_le_iff₀ (by linarith : (0:ℝ) < |τ|)]; nlinarith [Real.pi_pos] linarith · linarith [Real.log_le_sub_one_of_pos hx, Real.pi_pos] - have hCτ : C / τ ^ 2 ≤ |C| := by - calc C / τ ^ 2 ≤ |C| / τ ^ 2 := by gcongr; exact le_abs_self _ - _ ≤ |C| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos; nlinarith [sq_abs τ] - _ = |C| := div_one _ - have h2 : |1 / (2 * π) * Real.log (|τ| / (2 * π))| ≤ 1 + |τ| := by + have hlog : |Real.log (q * |τ| / (2 * π))| ≤ Real.log q + |τ| / (2 * π) + 2 * π := by + rw [show q * |τ| / (2 * π) = q * (|τ| / (2 * π)) by ring, + Real.log_mul hq0.ne' hx.ne'] + calc |Real.log q + Real.log (|τ| / (2 * π))| + ≤ |Real.log q| + |Real.log (|τ| / (2 * π))| := abs_add_le _ _ + _ = Real.log q + |Real.log (|τ| / (2 * π))| := by rw [abs_of_nonneg hlq] + _ ≤ Real.log q + (|τ| / (2 * π) + 2 * π) := by linarith + _ = _ := by ring + have hCτ : C / τ ^ 2 ≤ |C| := + (div_le_div_of_nonneg_right (le_abs_self _) (sq_nonneg _)).trans + ((div_le_div_of_nonneg_left (abs_nonneg _) one_pos (by nlinarith [sq_abs τ])).trans_eq (div_one _)) + have h2 : |1 / (2 * π) * Real.log (q * |τ| / (2 * π))| ≤ 1 + Real.log q + |τ| := by rw [abs_mul, abs_of_pos (by positivity : (0:ℝ) < 1 / (2 * π))] - calc 1 / (2 * π) * |Real.log (|τ| / (2 * π))| ≤ 1 / (2 * π) * (|τ| / (2 * π) + 2 * π) := by - gcongr - _ = |τ| / (2 * π) ^ 2 + 1 := by field_simp - _ ≤ |τ| / 1 + 1 := by - gcongr; nlinarith [Real.pi_gt_three] - _ = 1 + |τ| := by ring - calc |Zeta23.mu τ| = |(Zeta23.mu τ - 1 / (2 * π) * Real.log (|τ| / (2 * π))) - + 1 / (2 * π) * Real.log (|τ| / (2 * π))| := by ring_nf - _ ≤ |Zeta23.mu τ - 1 / (2 * π) * Real.log (|τ| / (2 * π))| - + |1 / (2 * π) * Real.log (|τ| / (2 * π))| := abs_add_le _ _ - _ ≤ |C| + (1 + |τ|) := add_le_add (hst.trans hCτ) h2 - _ ≤ max M₁ (1 + |C|) + |τ| := by linarith [le_max_right M₁ (1 + |C|)] + calc 1 / (2 * π) * |Real.log (q * |τ| / (2 * π))| + ≤ 1 / (2 * π) * (Real.log q + |τ| / (2 * π) + 2 * π) := by gcongr + _ = Real.log q / (2 * π) + |τ| / (2 * π) ^ 2 + 1 := by field_simp + _ ≤ Real.log q / 1 + |τ| / 1 + 1 := by + gcongr <;> nlinarith [Real.pi_gt_three] + _ = 1 + Real.log q + |τ| := by ring + calc |u τ| = |(u τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))) + + 1 / (2 * π) * Real.log (q * |τ| / (2 * π))| := by ring_nf + _ ≤ |u τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))| + + |1 / (2 * π) * Real.log (q * |τ| / (2 * π))| := abs_add_le _ _ + _ ≤ |C| + (1 + Real.log q + |τ|) := add_le_add (hst.trans hCτ) h2 + _ ≤ max M₁ (1 + Real.log q + |C|) + |τ| := by linarith [le_max_right M₁ (1 + Real.log q + |C|)] · have := hM₁ τ ⟨by linarith [neg_abs_le τ], by linarith [le_abs_self τ]⟩ simp only [Real.norm_eq_abs] at this - linarith [le_max_left M₁ (1 + |C|), abs_nonneg τ] + linarith [le_max_left M₁ (1 + Real.log q + |C|), abs_nonneg τ] -/-- From H-Γ [eq:mufacts] `μ' ≪ |τ|⁻¹` + the crude bound: for `t ≥ 2` and all `r`, -`|μ(t+r) − μ(t)| ≤ (K|r| + 10r²)/t`. (§5.2: `≪ |r|/T` for `|r| ≤ τ_k/2` by the mean value -theorem; for `|r| > τ_k/2` we use `2|r|/t > 1` to absorb the crude bound into the `r²/t` term.) -/ -lemma mu_increment_bound (hΓ : Zeta23.GammaFacts) : +/-- From H-Γ [eq:mufacts]: a crude global bound `|μ(τ)| ≤ M + |τ|`. -/ +lemma mu_linear_bound (hΓ : Zeta23.GammaFacts) : ∃ M : ℝ, 0 ≤ M ∧ ∀ τ, |Zeta23.mu τ| ≤ M + |τ| := + gamma_linear_bound (gammaFacts_toFor hΓ) le_rfl + +/-- From `GammaFactsFor` with `q ≥ 1`: increment bound `|u(t+r) - u(t)| ≤ (K|r| + 10 r²)/t` +for `t ≥ 2` and all `r`. -/ +lemma gamma_increment_bound {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) : ∃ K : ℝ, 0 ≤ K ∧ ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, - |Zeta23.mu (t + r) - Zeta23.mu t| ≤ (K * |r| + 10 * r ^ 2) / t := by + |u (t + r) - u t| ≤ (K * |r| + 10 * r ^ 2) / t := by obtain ⟨C₁, hC₁⟩ := hΓ.deriv_bound - obtain ⟨M, hM0, hM⟩ := mu_linear_bound hΓ + obtain ⟨M, hM0, hM⟩ := gamma_linear_bound hΓ hq refine ⟨max (2 * |C₁|) (4 * M), le_max_of_le_right (by positivity), fun t ht r => ?_⟩ have ht0 : 0 < t := by linarith rw [le_div_iff₀ ht0] rcases le_or_gt |r| (t / 2) with hr | hr - · -- mean value theorem on [t/2, 3t/2] - have hmvt : ‖Zeta23.mu (t + r) - Zeta23.mu t‖ ≤ (2 * |C₁| / t) * ‖(t + r) - t‖ := by + · have hmvt : ‖u (t + r) - u t‖ ≤ (2 * |C₁| / t) * ‖(t + r) - t‖ := by apply Convex.norm_image_sub_le_of_norm_deriv_le (s := Set.Icc (t / 2) (3 * t / 2)) · intro x _; exact hΓ.smooth.contDiffAt.differentiableAt (by simp) · intro x hx have hx1 : 1 ≤ |x| := by rw [abs_of_pos (by linarith [hx.1])]; linarith [hx.1] - calc ‖deriv Zeta23.mu x‖ = |deriv Zeta23.mu x| := Real.norm_eq_abs _ + calc ‖deriv u x‖ = |deriv u x| := Real.norm_eq_abs _ _ ≤ C₁ / |x| := hC₁ x hx1 _ ≤ |C₁| / |x| := by gcongr; exact le_abs_self _ - _ ≤ |C₁| / (t / 2) := by - apply div_le_div_of_nonneg_left (abs_nonneg _) (by linarith) - rw [abs_of_pos (by linarith [hx.1])]; exact hx.1 + _ ≤ |C₁| / (t / 2) := + div_le_div_of_nonneg_left (abs_nonneg _) (by linarith) + (by rw [abs_of_pos (by linarith [hx.1])]; exact hx.1) _ = 2 * |C₁| / t := by field_simp · exact convex_Icc _ _ · constructor <;> linarith · constructor <;> linarith [le_abs_self r, neg_abs_le r] simp only [add_sub_cancel_left, Real.norm_eq_abs] at hmvt - calc |Zeta23.mu (t + r) - Zeta23.mu t| * t ≤ (2 * |C₁| / t * |r|) * t := by gcongr + calc |u (t + r) - u t| * t ≤ (2 * |C₁| / t * |r|) * t := by gcongr _ = 2 * |C₁| * |r| := by field_simp _ ≤ max (2 * |C₁|) (4 * M) * |r| + 10 * r ^ 2 := by nlinarith [le_max_left (2 * |C₁|) (4 * M), abs_nonneg r, sq_nonneg r] - · -- |r| > t/2: crude bound, absorbed using t < 2|r| - have h1 : |Zeta23.mu (t + r) - Zeta23.mu t| ≤ 2 * M + 5 * |r| := by - calc |Zeta23.mu (t + r) - Zeta23.mu t| ≤ |Zeta23.mu (t + r)| + |Zeta23.mu t| := abs_sub _ _ + · have h1 : |u (t + r) - u t| ≤ 2 * M + 5 * |r| := by + calc |u (t + r) - u t| ≤ |u (t + r)| + |u t| := abs_sub _ _ _ ≤ (M + |t + r|) + (M + |t|) := add_le_add (hM _) (hM _) _ ≤ (M + (|t| + |r|)) + (M + |t|) := by linarith [abs_add_le t r] _ = 2 * M + 2 * |t| + |r| := by ring _ ≤ 2 * M + 5 * |r| := by rw [abs_of_pos ht0]; linarith - calc |Zeta23.mu (t + r) - Zeta23.mu t| * t ≤ (2 * M + 5 * |r|) * t := by gcongr + calc |u (t + r) - u t| * t ≤ (2 * M + 5 * |r|) * t := by gcongr _ ≤ (2 * M + 5 * |r|) * (2 * |r|) := by gcongr; linarith _ = 4 * M * |r| + 10 * |r| ^ 2 := by ring _ = 4 * M * |r| + 10 * r ^ 2 := by rw [sq_abs] _ ≤ max (2 * |C₁|) (4 * M) * |r| + 10 * r ^ 2 := by nlinarith [le_max_right (2 * |C₁|) (4 * M), abs_nonneg r] +/-- From H-Γ [eq:mufacts] `μ' ≪ |τ|⁻¹` + the crude bound: for `t ≥ 2` and all `r`, +`|μ(t+r) − μ(t)| ≤ (K|r| + 10r²)/t`. -/ +lemma mu_increment_bound (hΓ : Zeta23.GammaFacts) : + ∃ K : ℝ, 0 ≤ K ∧ ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, + |Zeta23.mu (t + r) - Zeta23.mu t| ≤ (K * |r| + 10 * r ^ 2) / t := + gamma_increment_bound (gammaFacts_toFor hΓ) le_rfl + /-- [eq:PiPfacts] shifted (§5.2: `|Π_X(τ)| ≤ 6√X/T for |τ−τ_k| ≤ T/2`, and the tail absorbed via `(2|r|/t)² > 1`): for `t ≥ 2` and all `r`, `|Π_X(t+r)| ≤ 6√X/t + 12√X r²/t²`. -/ lemma PiX_shift_bound (hF : LocalHypsCore cϱ p F) {t : ℝ} (ht : 2 ≤ t) (r : ℝ) : @@ -1114,26 +902,252 @@ lemma LocalHyps.phiHat_sq_mul_integrable_of_bdd (hF : LocalHyps cϱ p F) {g : simpa only [mul_comm] using this /-- `∫ φ̂(r)² sin(ry) dr = 0` (odd integrand; `φ̂` even). -/ -lemma integral_phiHat_sq_mul_sin (hF : LocalHypsCore cϱ p F) (y : ℝ) : +lemma integral_phiHat_sq_mul_sin_core (hF : LocalHypsCoreW cϱ p F) (y : ℝ) : ∫ r, F.phiHat r ^ 2 * Real.sin (r * y) = 0 := by have h := integral_neg_eq_self (fun r => F.phiHat r ^ 2 * Real.sin (r * y)) volume simp only [hF.phiHat_even, neg_mul, Real.sin_neg, mul_neg, integral_neg] at h linarith -/-- §5.2: `∫ φ̂(τ−τ_k)² cos(τy) dτ = 2π A_φ(y) cos(τ_k y)`, after the substitution `τ = t + r`: -`∫ φ̂(r)² cos((t+r)y) dr = 2π A_φ(y) cos(ty)` (from `φ̂² = Â_φ` + inversion, field `phiHat_sq_fourier`). -/ -lemma integral_phiHat_sq_mul_cos_shift (hF : LocalHypsCore cϱ p F) (t y : ℝ) : - ∫ r, F.phiHat r ^ 2 * Real.cos ((t + r) * y) = 2 * π * F.Aphi y * Real.cos (t * y) := by - have h1 : ∀ r, F.phiHat r ^ 2 * Real.cos ((t + r) * y) - = Real.cos (t * y) * (F.phiHat r ^ 2 * Real.cos (r * y)) - - Real.sin (t * y) * (F.phiHat r ^ 2 * Real.sin (r * y)) := by - intro r; rw [add_mul, Real.cos_add]; ring +lemma integral_phiHat_sq_mul_sin (hF : LocalHypsCore cϱ p F) (y : ℝ) : + ∫ r, F.phiHat r ^ 2 * Real.sin (r * y) = 0 := + integral_phiHat_sq_mul_sin_core hF.toCoreW y + +private lemma integral_phiHat_sq_mul_trig_lin_core (hF : LocalHypsCoreW cϱ p F) (a b y : ℝ) : + ∫ r, F.phiHat r ^ 2 * (a * Real.cos (r * y) + b * Real.sin (r * y)) = 2 * π * F.Aphi y * a := by + have h1 : ∀ r, F.phiHat r ^ 2 * (a * Real.cos (r * y) + b * Real.sin (r * y)) + = a * (F.phiHat r ^ 2 * Real.cos (r * y)) + b * (F.phiHat r ^ 2 * Real.sin (r * y)) := + fun r => by ring simp_rw [h1] - rw [integral_sub, integral_const_mul, integral_const_mul, hF.phiHat_sq_fourier, - integral_phiHat_sq_mul_sin hF] + rw [integral_add, integral_const_mul, integral_const_mul, hF.phiHat_sq_fourier, + integral_phiHat_sq_mul_sin_core hF] · ring - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_cos_le_one _)).const_mul _ - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_sin_le_one _)).const_mul _ + · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun _ => Real.abs_cos_le_one _)).const_mul _ + · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun _ => Real.abs_sin_le_one _)).const_mul _ + +lemma integral_phiHat_sq_mul_cos_shift_core (hF : LocalHypsCoreW cϱ p F) (t y : ℝ) : + ∫ r, F.phiHat r ^ 2 * Real.cos ((t + r) * y) = 2 * π * F.Aphi y * Real.cos (t * y) := by + simpa only [add_mul, Real.cos_add, neg_mul, ← sub_eq_add_neg] using + integral_phiHat_sq_mul_trig_lin_core hF (Real.cos (t * y)) (-Real.sin (t * y)) y + +/-- §5.2: `∫ φ̂(τ−τ_k)² cos(τy) dτ = 2π A_φ(y) cos(τ_k y)`, after `τ = t + r`. -/ +lemma integral_phiHat_sq_mul_cos_shift (hF : LocalHypsCore cϱ p F) (t y : ℝ) : + ∫ r, F.phiHat r ^ 2 * Real.cos ((t + r) * y) = 2 * π * F.Aphi y * Real.cos (t * y) := + integral_phiHat_sq_mul_cos_shift_core hF.toCoreW t y + +lemma integral_phiHat_sq_mul_sin_shift_core (hF : LocalHypsCoreW cϱ p F) (t y : ℝ) : + ∫ r, F.phiHat r ^ 2 * Real.sin ((t + r) * y) = 2 * π * F.Aphi y * Real.sin (t * y) := by + have h := integral_phiHat_sq_mul_trig_lin_core hF (Real.sin (t * y)) (Real.cos (t * y)) y + exact (integral_congr_ae (Filter.Eventually.of_forall fun r => by + rw [add_mul, Real.sin_add])).trans h + +/-- `|sin(θ/2)|·‖Σ_{k ?_ + rw [hw, ← Complex.exp_nat_mul]; congr 1; push_cast; ring + have hw1 : w ≠ 1 := by + intro hww + rw [hw, Complex.exp_eq_one_iff] at hww + obtain ⟨n, hn⟩ := hww + have hθ : θ = n * (2 * π) := by + have h2 := congrArg Complex.im hn + simpa [Complex.mul_im, Complex.I_re, Complex.I_im] using h2 + apply hs; rw [hθ, show (n : ℝ) * (2 * π) / 2 = n * π by ring]; exact Real.sin_int_mul_pi n + have hnormw : ‖w - 1‖ = 2 * |Real.sin (θ / 2)| := by + rw [hw, Complex.exp_mul_I] + have hre : (Complex.cos ↑θ + Complex.sin ↑θ * Complex.I - 1).re = Real.cos θ - 1 := by + simp [Complex.sub_re, Complex.add_re, Complex.mul_re, Complex.I_re, Complex.I_im, + Complex.one_re, Complex.cos_ofReal_re, Complex.sin_ofReal_im, Complex.sin_ofReal_re] + have him : (Complex.cos ↑θ + Complex.sin ↑θ * Complex.I - 1).im = Real.sin θ := by + simp [Complex.sub_im, Complex.add_im, Complex.mul_im, Complex.I_re, Complex.I_im, + Complex.one_im, Complex.cos_ofReal_im, Complex.sin_ofReal_re, Complex.sin_ofReal_im] + rw [show ‖Complex.cos ↑θ + Complex.sin ↑θ * Complex.I - 1‖ + = Real.sqrt ((Real.cos θ - 1) ^ 2 + Real.sin θ ^ 2) by + rw [← hre, ← him, Complex.norm_eq_sqrt_sq_add_sq]] + have e : (Real.cos θ - 1) ^ 2 + Real.sin θ ^ 2 = (2 * Real.sin (θ / 2)) ^ 2 := by + have h1 := Real.cos_two_mul (θ / 2) + rw [show 2 * (θ / 2) = θ by ring] at h1 + nlinarith [Real.sin_sq_add_cos_sq (θ / 2), Real.sin_sq_add_cos_sq θ] + rw [e, Real.sqrt_sq_eq_abs, abs_mul, abs_two] + have hnormw0 : (0 : ℝ) < ‖w - 1‖ := by rw [hnormw]; have := abs_pos.2 hs; positivity + rw [hsum, geom_sum_eq hw1, norm_div] + have hwd : ‖w ^ d - 1‖ ≤ 2 := by + calc ‖w ^ d - 1‖ ≤ ‖w ^ d‖ + ‖(1 : ℂ)‖ := norm_sub_le _ _ + _ = ‖w‖ ^ d + 1 := by rw [norm_pow, norm_one] + _ = 2 := by rw [hw, Complex.norm_exp_ofReal_mul_I, one_pow]; norm_num + rw [hnormw, mul_div_assoc', div_le_one (by rw [← hnormw]; exact hnormw0)] + nlinarith [mul_le_mul_of_nonneg_left hwd (abs_nonneg (Real.sin (θ / 2)))] + +/-- Complex Dirichlet kernel bound for any cutoff `K : ℕ`: +`A_φ(y) · ‖Σ_{k ?_ + rw [← Complex.exp_add]; congr 1; simp only [Setting.tau]; push_cast; ring + have hnorm : ‖∑ k ∈ Finset.range K, Complex.exp ((-(p.tau k * y) : ℝ) * Complex.I)‖ + = ‖∑ k ∈ Finset.range K, Complex.exp (((k : ℝ) * (-(p.h * y)) : ℝ) * Complex.I)‖ := by + rw [hfac, norm_mul, Complex.norm_exp_ofReal_mul_I, one_mul] + have hdir := abs_sin_mul_norm_geom_le (-(p.h * y)) K + have hsin_eq : |Real.sin (-(p.h * y) / 2)| = Real.sin (π * y / p.L) := by + have hθ : p.h * y / 2 = π * y / p.L := by simp only [Setting.h]; field_simp + rw [show -(p.h * y) / 2 = -(p.h * y / 2) by ring, Real.sin_neg, abs_neg, hθ, abs_of_nonneg] + exact Real.sin_nonneg_of_nonneg_of_le_pi (by positivity) + (by rw [div_le_iff₀ hL]; nlinarith [Real.pi_pos]) + have hsin : 2 * m / p.L ≤ Real.sin (π * y / p.L) := two_min_div_le_sin hL hy0.le hyL.le + rw [hnorm] + set S := ‖∑ k ∈ Finset.range K, Complex.exp (((k : ℝ) * (-(p.h * y)) : ℝ) * Complex.I)‖ + rw [hsin_eq] at hdir + have hS1 : 2 * m / p.L * S ≤ 1 := (mul_le_mul_of_nonneg_right hsin (norm_nonneg _)).trans hdir + have hS2 : 2 * m * S ≤ p.L := by + have h4 := mul_le_mul_of_nonneg_left hS1 hL.le + rw [mul_one, ← mul_assoc, mul_div_cancel₀ _ hL.ne'] at h4; linarith + have hA1 : F.Aphi y ≤ p.L - y := (hF.Aphi_le y).trans (by simp [hyabs, hyL.le]) + have key : (p.L - y) * Real.log 2 ≤ p.L * m := by + rcases le_total y (p.L - y) with h | h + · rw [hm, min_eq_left h]; nlinarith + · rw [hm, min_eq_right h]; nlinarith + rw [le_div_iff₀ (by positivity)] + calc F.Aphi y * S * (2 * Real.log 2) ≤ (p.L - y) * S * (2 * Real.log 2) := by gcongr + _ = ((p.L - y) * Real.log 2) * (2 * S) := by ring + _ ≤ (p.L * m) * (2 * S) := by gcongr + _ = p.L * (2 * m * S) := by ring + _ ≤ p.L * p.L := by gcongr + _ = p.L ^ 2 := (sq _).symm + +/-- Complex Dirichlet kernel bound: `A_φ(y) · ‖Σ_{k ?_)) + (by positivity) + rw [abs_div, abs_of_nonneg (Real.sqrt_nonneg _)] + refine div_le_div_of_nonneg_right ?_ (Real.sqrt_nonneg _) + rw [re_mul_exp_neg_I] + exact (Complex.abs_re_le_norm _).trans (by rw [norm_mul, Complex.norm_exp_ofReal_mul_I, mul_one]) + +lemma PcDir_part_integrable (hF : LocalHypsCoreW cϱ p F) (c : ℕ → ℂ) (t : ℝ) : + Integrable (fun r => F.phiHat r ^ 2 * PcDir p.X c (t + r)) := + hF.phiHat_sq_mul_integrable_of_bdd ((PcDir_continuous p.X c).comp (continuous_const_add t)) + (fun x => PcDir_abs_le p.X c (t + x)) + +/-- Complex-weight `P_c`-part of `[prop:trace]` at one grid point. -/ +lemma PcDir_part_eq (hF : LocalHypsCoreW cϱ p F) (c : ℕ → ℂ) (t : ℝ) : + ∫ r, F.phiHat r ^ 2 * PcDir p.X c (t + r) + = 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Real.sqrt n)⁻¹ * F.Aphi (Real.log n) + * ((c n).re * Real.cos (t * Real.log n) + (c n).im * Real.sin (t * Real.log n)) := by + have h1 : (fun r => F.phiHat r ^ 2 * PcDir p.X c (t + r)) + = fun r => ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ((1 / Real.pi) * (Real.sqrt n)⁻¹) + * ((c n).re * (F.phiHat r ^ 2 * Real.cos ((t + r) * Real.log n)) + + (c n).im * (F.phiHat r ^ 2 * Real.sin ((t + r) * Real.log n))) := by + funext r; unfold PcDir; rw [Finset.mul_sum, Finset.mul_sum] + exact Finset.sum_congr rfl fun n _ => by rw [div_eq_mul_inv]; ring + rw [h1, MeasureTheory.integral_finsetSum] + · rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [MeasureTheory.integral_const_mul, MeasureTheory.integral_add, + MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul, + integral_phiHat_sq_mul_cos_shift_core hF, integral_phiHat_sq_mul_sin_shift_core hF] + · have hπ : Real.pi ≠ 0 := Real.pi_ne_zero; field_simp + · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_cos_le_one _)).const_mul _ + · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_sin_le_one _)).const_mul _ + · intro n _ + exact (((hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_cos_le_one _)).const_mul _).add + ((hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_sin_le_one _)).const_mul _)).const_mul _ + +/-- Sum of the `PcDir`-parts over the grid: +`|Σ_{k by rw [re_mul_exp_neg_I (c n) (p.tau k * Real.log n)]; ring + rw [hsum_eq, abs_mul, abs_of_nonneg hs0, div_eq_mul_inv, mul_comm (‖c n‖), mul_assoc] + refine mul_le_mul_of_nonneg_left ?_ hs0 + have hy : Real.log 2 ≤ Real.log n := Real.log_le_log two_pos (by exact_mod_cast hn2) + have hA0 := hF.Aphi_nonneg (Real.log n) + calc |F.Aphi (Real.log n) * (c n * ∑ k ∈ Finset.range p.d, + Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)).re| + = F.Aphi (Real.log n) * |(c n * ∑ k ∈ Finset.range p.d, + Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)).re| := by + rw [abs_mul, abs_of_nonneg hA0] + _ ≤ F.Aphi (Real.log n) * (‖c n‖ * ‖∑ k ∈ Finset.range p.d, + Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)‖) := by + gcongr; exact (Complex.abs_re_le_norm _).trans (norm_mul_le _ _) + _ = ‖c n‖ * (F.Aphi (Real.log n) * ‖∑ k ∈ Finset.range p.d, + Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)‖) := by ring + _ ≤ ‖c n‖ * (p.L ^ 2 / (2 * Real.log 2)) := + mul_le_mul_of_nonneg_left (Aphi_mul_norm_tauKernel_le hF hy) (norm_nonneg _) + calc 2 * |∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ∑ k ∈ Finset.range p.d, + (Real.sqrt n)⁻¹ * F.Aphi (Real.log n) + * ((c n).re * Real.cos (p.tau k * Real.log n) + + (c n).im * Real.sin (p.tau k * Real.log n))| + ≤ 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, |∑ k ∈ Finset.range p.d, + (Real.sqrt n)⁻¹ * F.Aphi (Real.log n) + * ((c n).re * Real.cos (p.tau k * Real.log n) + + (c n).im * Real.sin (p.tau k * Real.log n))| := by + gcongr; exact Finset.abs_sum_le_sum_abs _ _ + _ ≤ 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n * (p.L ^ 2 / (2 * Real.log 2)) := by + gcongr with n hn; exact hterm n hn + _ = p.L ^ 2 / Real.log 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n := by + rw [← Finset.sum_mul]; field_simp /-- **P-part of [prop:trace] at one grid point** (§5.2): `G^P_kk = ∫ φ̂(r)² P_X(τ_k+r) dr = −2 Σ_{n≤X} a_n A_φ(y_n) cos(τ_k y_n)`. -/ @@ -1143,63 +1157,68 @@ lemma P_part_eq (hF : LocalHypsCore cϱ p F) (t : ℝ) : have h1 : (fun r => F.phiHat r ^ 2 * Zeta23.PX p.X (t + r)) = fun r => ∑ n ∈ primeRange p.X, (-(1 / Real.pi) * acoef n) * (F.phiHat r ^ 2 * Real.cos ((t + r) * ycoef n)) := by - funext r - rw [PX_eq, Finset.mul_sum, Finset.mul_sum] + funext r; rw [PX_eq, Finset.mul_sum, Finset.mul_sum] exact Finset.sum_congr rfl fun n _ => by ring rw [h1, integral_finsetSum _ (fun n _ => ((hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_cos_le_one _)).const_mul _))] simp_rw [integral_const_mul, integral_phiHat_sq_mul_cos_shift hF] rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - field_simp + exact Finset.sum_congr rfl fun n _ => by field_simp + +/-- Integrability of `φ̂(r)² u(t+r)` for `t > 0` under `GammaFactsFor`. -/ +lemma gamma_part_integrable {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) + (hF : LocalHypsCoreW cϱ p F) {t : ℝ} (ht0 : 0 < t) : + Integrable (fun r => F.phiHat r ^ 2 * u (t + r)) := by + obtain ⟨M, _, hM⟩ := gamma_linear_bound hΓ hq + have hmeas : AEStronglyMeasurable (fun r => F.phiHat r ^ 2 * u (t + r)) volume := + ((hF.phiHat_cont.pow 2).mul (hΓ.smooth.continuous.comp (continuous_const_add t))).aestronglyMeasurable + refine Integrable.mono' + ((hF.phiHat_sq_integrable.const_mul (M + t)).add hF.phiHat_sq_mul_abs_integrable) hmeas ?_ + refine Filter.Eventually.of_forall fun r => ?_ + simp only [Real.norm_eq_abs, Pi.add_apply] + rw [abs_mul, abs_of_nonneg (sq_nonneg _)] + have htr : |t + r| ≤ t + |r| := (abs_add_le t r).trans (by rw [abs_of_pos ht0]) + calc F.phiHat r ^ 2 * |u (t + r)| ≤ F.phiHat r ^ 2 * (M + |t + r|) := by gcongr; exact hM _ + _ ≤ F.phiHat r ^ 2 * (M + (t + |r|)) := by gcongr + _ = (M + t) * F.phiHat r ^ 2 + F.phiHat r ^ 2 * |r| := by ring -/-- **μ-part of [prop:trace] at one grid point** (§5.2: `G^μ_kk = 2πaL μ(τ_k) + O(log L/T)`): -for `t ≥ 2`, `|∫ φ̂(r)² μ(t+r) dr − 2πaL·μ(t)| ≤ (K ∫φ̂²|r| + 10 ∫φ̂²r²)/t`, with `K` from -`mu_increment_bound`. -/ -lemma mu_part_bound (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) {K : ℝ} - (hK : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |Zeta23.mu (t + r) - Zeta23.mu t| ≤ (K * |r| + 10 * r ^ 2) / t) +/-- Generic `u`-part of `[prop:trace]` at one grid point `t ≥ 2`. -/ +lemma gamma_part_bound {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) + (hF : LocalHypsCoreW cϱ p F) {K : ℝ} + (hK : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |u (t + r) - u t| ≤ (K * |r| + 10 * r ^ 2) / t) {t : ℝ} (ht : 2 ≤ t) : - |(∫ r, F.phiHat r ^ 2 * Zeta23.mu (t + r)) - 2 * π * F.a * p.L * Zeta23.mu t| + |(∫ r, F.phiHat r ^ 2 * u (t + r)) - 2 * π * F.a * p.L * u t| ≤ (K * (∫ r, F.phiHat r ^ 2 * |r|) + 10 * (∫ r, F.phiHat r ^ 2 * r ^ 2)) / t := by - have ht0 : 0 < t := by linarith - obtain ⟨M, hM0, hM⟩ := mu_linear_bound hΓ - have hmeas : AEStronglyMeasurable (fun r => F.phiHat r ^ 2 * Zeta23.mu (t + r)) volume := by - have hc : Continuous fun r => F.phiHat r ^ 2 * Zeta23.mu (t + r) := by - have := hΓ.smooth.continuous; have := hF.phiHat_cont; fun_prop - exact hc.aestronglyMeasurable - have hint : Integrable (fun r => F.phiHat r ^ 2 * Zeta23.mu (t + r)) := by - refine Integrable.mono' - ((hF.phiHat_sq_integrable.const_mul (M + t)).add hF.phiHat_sq_mul_abs_integrable) hmeas ?_ - refine Filter.Eventually.of_forall fun r => ?_ - simp only [Real.norm_eq_abs, Pi.add_apply] - rw [abs_mul, abs_of_nonneg (sq_nonneg _)] - have htr : |t + r| ≤ t + |r| := by - calc |t + r| ≤ |t| + |r| := abs_add_le _ _ - _ = t + |r| := by rw [abs_of_pos ht0] - calc F.phiHat r ^ 2 * |Zeta23.mu (t + r)| ≤ F.phiHat r ^ 2 * (M + |t + r|) := by - gcongr; exact hM _ - _ ≤ F.phiHat r ^ 2 * (M + (t + |r|)) := by gcongr - _ = (M + t) * F.phiHat r ^ 2 + F.phiHat r ^ 2 * |r| := by ring - have hconst : 2 * π * F.a * p.L * Zeta23.mu t = ∫ r, F.phiHat r ^ 2 * Zeta23.mu t := by + have hint := gamma_part_integrable hΓ hq hF (by linarith : 0 < t) + have hconst : 2 * π * F.a * p.L * u t = ∫ r, F.phiHat r ^ 2 * u t := by rw [integral_mul_const, hF.phiHat_sq_integral] rw [hconst, ← integral_sub hint (hF.phiHat_sq_integrable.mul_const _)] have hgi : Integrable (fun r => (K * (F.phiHat r ^ 2 * |r|) + 10 * (F.phiHat r ^ 2 * r ^ 2)) / t) := ((hF.phiHat_sq_mul_abs_integrable.const_mul K).add (hF.phiHat_sq_mul_sq_integrable.const_mul 10)).div_const t rw [← Real.norm_eq_abs] - calc ‖∫ r, F.phiHat r ^ 2 * Zeta23.mu (t + r) - F.phiHat r ^ 2 * Zeta23.mu t‖ + calc ‖∫ r, F.phiHat r ^ 2 * u (t + r) - F.phiHat r ^ 2 * u t‖ ≤ ∫ r, (K * (F.phiHat r ^ 2 * |r|) + 10 * (F.phiHat r ^ 2 * r ^ 2)) / t := by refine norm_integral_le_of_norm_le hgi (Filter.Eventually.of_forall fun r => ?_) rw [Real.norm_eq_abs, ← mul_sub, abs_mul, abs_of_nonneg (sq_nonneg _)] - calc F.phiHat r ^ 2 * |Zeta23.mu (t + r) - Zeta23.mu t| + calc F.phiHat r ^ 2 * |u (t + r) - u t| ≤ F.phiHat r ^ 2 * ((K * |r| + 10 * r ^ 2) / t) := by gcongr; exact hK t ht r _ = _ := by ring _ = (K * (∫ r, F.phiHat r ^ 2 * |r|) + 10 * (∫ r, F.phiHat r ^ 2 * r ^ 2)) / t := by rw [integral_div, integral_add (hF.phiHat_sq_mul_abs_integrable.const_mul K) (hF.phiHat_sq_mul_sq_integrable.const_mul 10), integral_const_mul, integral_const_mul] -/-- **Π-part of [prop:trace] at one grid point** (§5.2: `|G^Π_kk| ≤ 6√X·2πaL/T + O(√X T⁻³)`): -for `t ≥ 2`, `|∫ φ̂(r)² Π_X(t+r) dr| ≤ (6√X/t)·2πaL + (12√X/t²)·∫φ̂²r²`. -/ +/-- **μ-part of [prop:trace] at one grid point** (§5.2). -/ +lemma mu_part_bound (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) {K : ℝ} + (hK : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |Zeta23.mu (t + r) - Zeta23.mu t| ≤ (K * |r| + 10 * r ^ 2) / t) + {t : ℝ} (ht : 2 ≤ t) : + |(∫ r, F.phiHat r ^ 2 * Zeta23.mu (t + r)) - 2 * π * F.a * p.L * Zeta23.mu t| + ≤ (K * (∫ r, F.phiHat r ^ 2 * |r|) + 10 * (∫ r, F.phiHat r ^ 2 * r ^ 2)) / t := + gamma_part_bound (gammaFacts_toFor hΓ) le_rfl hF.toCoreW hK ht + +/-- **Π-part of [prop:trace] at one grid point** (§5.2). -/ lemma Pi_part_bound (hF : LocalHypsCore cϱ p F) {t : ℝ} (ht : 2 ≤ t) : |∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (t + r)| ≤ (6 * Real.sqrt p.X / t) * (2 * π * F.a * p.L) @@ -1232,41 +1251,18 @@ lemma Pi_part_integrable (hF : LocalHypsCore cϱ p F) (t : ℝ) : /-- Integrability of `φ̂(r)² P_X(t+r)` (bounded × integrable). -/ lemma P_part_integrable (hF : LocalHypsCore cϱ p F) (t : ℝ) : Integrable (fun r => F.phiHat r ^ 2 * Zeta23.PX p.X (t + r)) := by - refine hF.phiHat_sq_mul_integrable_of_bdd ((PX_continuous p.X).comp (continuous_const_add t)) - (c := 1 / Real.pi * ∑ n ∈ primeRange p.X, acoef n) (fun x => ?_) - simp only [PX_eq] - rw [abs_mul, abs_neg, abs_of_pos (by positivity : (0:ℝ) < 1 / Real.pi)] - gcongr - refine (Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum fun n _ => ?_) - have ha : 0 ≤ acoef n := div_nonneg ArithmeticFunction.vonMangoldt_nonneg (Real.sqrt_nonneg _) - rw [abs_mul, abs_of_nonneg ha] - calc acoef n * |Real.cos ((t + x) * ycoef n)| ≤ acoef n * 1 := by - gcongr; exact Real.abs_cos_le_one _ - _ = acoef n := mul_one _ - -/-- Integrability of `φ̂(r)² μ(t+r)` for `t > 0` (`|μ| ≤ M + |τ|` and `∫φ̂²|r| < ∞`). -/ + let c : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) + have hPX : Zeta23.PX p.X = PcDir p.X c := by + funext τ; simp [PX_eq, PcDir, c, primeRange, acoef, ycoef, div_eq_mul_inv, Finset.mul_sum] + exact Finset.sum_congr rfl fun n _ => by ring + rw [hPX]; exact PcDir_part_integrable hF.toCoreW c t + +/-- Integrability of `φ̂(r)² μ(t+r)` for `t > 0`. -/ lemma mu_part_integrable (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) {t : ℝ} (ht0 : 0 < t) : - Integrable (fun r => F.phiHat r ^ 2 * Zeta23.mu (t + r)) := by - obtain ⟨M, hM0, hM⟩ := mu_linear_bound hΓ - have hmeas : AEStronglyMeasurable (fun r => F.phiHat r ^ 2 * Zeta23.mu (t + r)) volume := by - have hc : Continuous fun r => F.phiHat r ^ 2 * Zeta23.mu (t + r) := by - have := hΓ.smooth.continuous; have := hF.phiHat_cont; fun_prop - exact hc.aestronglyMeasurable - refine Integrable.mono' - ((hF.phiHat_sq_integrable.const_mul (M + t)).add hF.phiHat_sq_mul_abs_integrable) hmeas ?_ - refine Filter.Eventually.of_forall fun r => ?_ - simp only [Real.norm_eq_abs, Pi.add_apply] - rw [abs_mul, abs_of_nonneg (sq_nonneg _)] - have htr : |t + r| ≤ t + |r| := by - calc |t + r| ≤ |t| + |r| := abs_add_le _ _ - _ = t + |r| := by rw [abs_of_pos ht0] - calc F.phiHat r ^ 2 * |Zeta23.mu (t + r)| ≤ F.phiHat r ^ 2 * (M + |t + r|) := by - gcongr; exact hM _ - _ ≤ F.phiHat r ^ 2 * (M + (t + |r|)) := by gcongr - _ = (M + t) * F.phiHat r ^ 2 + F.phiHat r ^ 2 * |r| := by ring + Integrable (fun r => F.phiHat r ^ 2 * Zeta23.mu (t + r)) := + gamma_part_integrable (gammaFacts_toFor hΓ) le_rfl hF.toCoreW ht0 -/-- **Decomposition of a diagonal entry** (§5.2: `G_kk = ∫ φ̂(τ−τ_k)² ν_X(τ)dτ =: G^μ_kk + -G^Π_kk + G^P_kk according to (eq:nudef)`), after translating `τ = τ_k + r`. -/ +/-- **Decomposition of a diagonal entry** (§5.2). -/ lemma GentryA_diag_eq (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) (k : ℤ) (hk : 0 < p.tau k) : GentryA p F k k = (∫ r, F.phiHat r ^ 2 * Zeta23.mu (p.tau k + r)) @@ -1280,8 +1276,7 @@ lemma GentryA_diag_eq (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) (k rw [htrans] have hν : ∀ r, F.phiHat r ^ 2 * Zeta23.nuX p.X (p.tau k + r) = (F.phiHat r ^ 2 * Zeta23.mu (p.tau k + r) + F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)) - + F.phiHat r ^ 2 * Zeta23.PX p.X (p.tau k + r) := by - intro r; simp only [Zeta23.nuX]; ring + + F.phiHat r ^ 2 * Zeta23.PX p.X (p.tau k + r) := fun r => by simp only [Zeta23.nuX]; ring simp_rw [hν] have h12 : Integrable (fun r => F.phiHat r ^ 2 * Zeta23.mu (p.tau k + r) + F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)) := @@ -1289,67 +1284,114 @@ lemma GentryA_diag_eq (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) (k rw [integral_add h12 (P_part_integrable hF _), integral_add (mu_part_integrable hΓ hF hk) (Pi_part_integrable hF _)] - -/-- H-Γ ⇒ `μ ≥ 0` far out (Stirling): `∃ τ₀ ≥ 0, μ ≥ 0 on [τ₀, ∞)` (the paper's "μ is positive … -on [T−h, 2T]", §5.2). -/ -lemma mu_nonneg_eventually (hΓ : Zeta23.GammaFacts) : - ∃ τ₀ : ℝ, 0 ≤ τ₀ ∧ ∀ x, τ₀ ≤ x → 0 ≤ Zeta23.mu x := by +/-- `GammaFactsFor` ⇒ `u ≥ 0` far out (Stirling). -/ +lemma gamma_nonneg_eventually {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) : + ∃ τ₀ : ℝ, 0 ≤ τ₀ ∧ ∀ x, τ₀ ≤ x → 0 ≤ u x := by obtain ⟨C, hC⟩ := hΓ.stirling refine ⟨2 * π * Real.exp (2 * π * |C|), by positivity, fun x hx => ?_⟩ - have h1 : (1:ℝ) ≤ Real.exp (2 * π * |C|) := Real.one_le_exp (by positivity) + have h1 : (1 : ℝ) ≤ Real.exp (2 * π * |C|) := Real.one_le_exp (by positivity) have hx1 : 1 ≤ x := by nlinarith [Real.pi_gt_three] have hx0 : 0 < x := by linarith have hst := hC x (by rwa [abs_of_pos hx0]) rw [abs_of_pos hx0] at hst - have hlog : 2 * π * |C| ≤ Real.log (x / (2 * π)) := by + have hlog : 2 * π * |C| ≤ Real.log (q * x / (2 * π)) := by rw [← Real.log_exp (2 * π * |C|)] apply Real.log_le_log (Real.exp_pos _) - rw [le_div_iff₀ (by positivity)]; linarith - have hCx : C / x ^ 2 ≤ |C| := by - calc C / x ^ 2 ≤ |C| / x ^ 2 := by gcongr; exact le_abs_self _ - _ ≤ |C| / 1 := by apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos; nlinarith - _ = |C| := div_one _ - have h2 : |C| ≤ 1 / (2 * π) * Real.log (x / (2 * π)) := by + rw [le_div_iff₀ (by positivity)] + have : 2 * π * Real.exp (2 * π * |C|) ≤ x := hx + nlinarith + have hCx : C / x ^ 2 ≤ |C| := + (div_le_div_of_nonneg_right (le_abs_self _) (sq_nonneg _)).trans + ((div_le_div_of_nonneg_left (abs_nonneg _) one_pos (by nlinarith)).trans_eq (div_one _)) + have h2 : |C| ≤ 1 / (2 * π) * Real.log (q * x / (2 * π)) := by rw [div_mul_eq_mul_div, one_mul, le_div_iff₀ (by positivity)]; linarith linarith [(abs_le.1 hst).1] +/-- H-Γ ⇒ `μ ≥ 0` far out (Stirling). -/ +lemma mu_nonneg_eventually (hΓ : Zeta23.GammaFacts) : + ∃ τ₀ : ℝ, 0 ≤ τ₀ ∧ ∀ x, τ₀ ≤ x → 0 ≤ Zeta23.mu x := + gamma_nonneg_eventually (gammaFacts_toFor hΓ) le_rfl + +/-- `GammaFactsFor` ⇒ `NuBound`-style bound `|u τ| ≤ C₀ · l + log⁺(|τ|/(4T))`. -/ +lemma gamma_nuBound {u : ℝ → ℝ} {q : ℝ} {e1 : ℝ → ℝ} + (hΓ : GammaFactsFor u (fun τ => q * |τ| / (2 * π)) e1) (hq : 1 ≤ q) : + ∃ C₀ T₀ : ℝ, 1 ≤ C₀ ∧ ∀ p : Setting, T₀ ≤ p.T → ∀ τ : ℝ, + |u τ| ≤ C₀ * p.l + max (Real.log (|τ| / (4 * p.T))) 0 := by + obtain ⟨M, hM0, hM⟩ := gamma_linear_bound hΓ hq + obtain ⟨Cs, hCs⟩ := hΓ.stirling + have hq0 : 0 < q := by linarith + have hlq : 0 ≤ Real.log q := Real.log_nonneg hq + set C₀ := max 1 (M + Real.log q + |Cs| + 11) + refine ⟨C₀, 2 * π * Real.exp 1, le_max_left _ _, fun p hT τ => ?_⟩ + have hl1 : 1 ≤ p.l := Setting.le_l_of_T hT + have hT2π : 2 * π ≤ p.T := Setting.twopi_le_T zero_le_one hT + have hT0 : 0 < p.T := by linarith [Real.pi_gt_three] + have hC₀1 : 1 ≤ C₀ := le_max_left _ _ + have hC₀M : M + Real.log q + |Cs| + 11 ≤ C₀ := le_max_right _ _ + have hmax0 : 0 ≤ max (Real.log (|τ| / (4 * p.T))) 0 := le_max_right _ _ + rcases le_or_gt |τ| 1 with hτ1 | hτ1 + · have : |u τ| ≤ M + 1 := (hM τ).trans (by linarith) + nlinarith [abs_nonneg Cs] + · have hτ0 : 0 < |τ| := by linarith + have hst := hCs τ hτ1.le + have hCsb : Cs / τ ^ 2 ≤ |Cs| := + (div_le_div_of_nonneg_right (le_abs_self _) (sq_nonneg _)).trans + ((div_le_div_of_nonneg_left (abs_nonneg _) one_pos (by nlinarith [sq_abs τ])).trans_eq (div_one _)) + have h2π1 : (1 : ℝ) ≤ 2 * π := by linarith [Real.pi_gt_three] + have hlog2 : Real.log 2 ≤ 1 := by linarith [Real.log_le_sub_one_of_pos (zero_lt_two' ℝ)] + have hlog4 : Real.log 4 ≤ 2 := by + rw [show (4 : ℝ) = 2 ^ 2 by norm_num, Real.log_pow]; push_cast; linarith + have hlog_eq : Real.log (q * |τ| / (2 * π)) + = Real.log q + Real.log 4 + p.l + Real.log (|τ| / (4 * p.T)) := by + have he : q * |τ| / (2 * π) = (q * (4 * (p.T / (2 * π)))) * (|τ| / (4 * p.T)) := by + field_simp + rw [he, Real.log_mul (by positivity) (by positivity), + Real.log_mul hq0.ne' (by positivity), + Real.log_mul (by norm_num) (by positivity)] + simp [Setting.l, Zeta23.l]; ring + have hlog_abs : |Real.log (q * |τ| / (2 * π))| + ≤ Real.log q + 2 * π + 2 + p.l + max (Real.log (|τ| / (4 * p.T))) 0 := by + rw [abs_le]; constructor + · have hlo : -(2 * π) ≤ Real.log (q * |τ| / (2 * π)) := by + have hx : 0 < q * |τ| / (2 * π) := by positivity + have := Real.log_le_sub_one_of_pos (inv_pos.2 hx) + rw [Real.log_inv] at this + have hinv : (q * |τ| / (2 * π))⁻¹ ≤ 2 * π := by + rw [inv_div, div_le_iff₀ (by positivity)] + have hqτ : 1 ≤ q * |τ| := by nlinarith + nlinarith [Real.pi_pos] + linarith + linarith [Real.pi_pos] + · linarith [hlog_eq, hlog4, le_max_left (Real.log (|τ| / (4 * p.T))) 0, Real.pi_pos] + have hdiv : |1 / (2 * π) * Real.log (q * |τ| / (2 * π))| + ≤ Real.log q + 2 * π + 2 + p.l + max (Real.log (|τ| / (4 * p.T))) 0 := by + rw [abs_mul, abs_of_pos (by positivity : (0 : ℝ) < 1 / (2 * π))] + exact (mul_le_mul_of_nonneg_right ((div_le_one (by positivity)).2 h2π1) (abs_nonneg _)).trans + (by linarith) + have h1 : |u τ| ≤ |Cs| + (Real.log q + 2 * π + 2 + p.l + max (Real.log (|τ| / (4 * p.T))) 0) := by + calc |u τ| = |(u τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))) + + 1 / (2 * π) * Real.log (q * |τ| / (2 * π))| := by ring_nf + _ ≤ |u τ - 1 / (2 * π) * Real.log (q * |τ| / (2 * π))| + + |1 / (2 * π) * Real.log (q * |τ| / (2 * π))| := abs_add_le _ _ + _ ≤ _ := add_le_add (hst.trans hCsb) hdiv + have hpi4 := Real.pi_lt_four + nlinarith [abs_nonneg Cs] + /-- **Sum of the P-parts** (§5.2): `|Σ_{k by ring - rw [hfac, abs_mul, abs_of_nonneg ha] - rcases Nat.lt_or_ge n 2 with hn2 | hn2 - · -- n = 1: a_1 = 0 - have hn1 : n = 1 := by - have := (Finset.mem_Ioc.1 hn).1; omega - subst hn1 - simp [acoef, ArithmeticFunction.vonMangoldt_apply_one] - · gcongr - apply Aphi_mul_sum_cos_le hF - exact Real.log_le_log two_pos (by exact_mod_cast hn2) - calc 2 * |∑ n ∈ primeRange p.X, ∑ k ∈ Finset.range p.d, - acoef n * F.Aphi (ycoef n) * Real.cos (p.tau k * ycoef n)| - ≤ 2 * ∑ n ∈ primeRange p.X, - |∑ k ∈ Finset.range p.d, acoef n * F.Aphi (ycoef n) * Real.cos (p.tau k * ycoef n)| := by - gcongr; exact Finset.abs_sum_le_sum_abs _ _ - _ ≤ 2 * ∑ n ∈ primeRange p.X, acoef n * (p.L ^ 2 / (2 * Real.log 2)) := by - gcongr with n hn - exact hterm n hn - _ = p.L ^ 2 / Real.log 2 * ∑ n ∈ primeRange p.X, acoef n := by - rw [← Finset.sum_mul]; field_simp + let c : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) + have hPX : Zeta23.PX p.X = PcDir p.X c := by + funext τ; simp [PX_eq, PcDir, c, primeRange, acoef, ycoef, div_eq_mul_inv, Finset.mul_sum] + exact Finset.sum_congr rfl fun n _ => by ring + have hsum : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n = ∑ n ∈ primeRange p.X, acoef n := by + unfold primeRange acoef + exact Finset.sum_congr rfl fun n _ => by + simp [c, abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] + rw [hPX, ← hsum] + exact sum_PcDir_part_bound hF.toCoreW (by simp [c]) /-- The grid: `τ_k ∈ [T, 2T]` for `0 ≤ k < d` (§2.2 "τ_0,…,τ_{d−1} ∈ [T,2T)"), and `d ≤ LT/2π`. -/ lemma Setting.d_le (p : Setting) (h : 0 ≤ p.L * p.T) : (p.d : ℝ) ≤ p.L * p.T / (2 * π) := diff --git a/zeta23/Zeta23/PrimeSideA/Bridge.lean b/zeta23/Zeta23/PrimeSideA/Bridge.lean index 71066668de..66c5c3a86f 100644 --- a/zeta23/Zeta23/PrimeSideA/Bridge.lean +++ b/zeta23/Zeta23/PrimeSideA/Bridge.lean @@ -9,7 +9,6 @@ SPDX-License-Identifier: Apache-2.0 -/ import Zeta23.PrimeSideB.Concrete import Zeta23.Taper -import Zeta23.Taper.Norms import Zeta23.Poisson import Zeta23.PiFacts @@ -65,6 +64,7 @@ theorem localHyps_concrete {P : Params} (hP : P.Valid) {T : ℝ} (hwL : 8 * P.w integral_phiHat_sq_mul_sq_le := Params.integral_phiHatR_sq_mul_sq_le hP hwL phiHat_sq_integral := Params.integral_phiHatR_sq hP hwL phiHat_sq_fourier := Params.integral_phiHatR_sq_mul_cos hP hwL + g_nonneg := fun y => le_trans (le_max_right _ _) (Params.g_ge hP hwL y) g_lower := Params.g_ge hP hwL g_le_Aphi := Params.g_le_Aphi hP hwL Aphi_le := Params.Aphi_le hP hwL @@ -82,6 +82,11 @@ theorem localHyps_concrete {P : Params} (hP : P.Valid) {T : ℝ} (hwL : 8 * P.w Phi_sq_integral := Params.integral_PhiR_sq hP hwL Phi_sq_fourier := Params.integral_PhiR_sq_mul_cos hP hwL poisson := Params.hasSum_phiHatR_mul hP hwL + b_ge_half := by + show 1 / 2 ≤ P.b T + have hL : 0 < P.L T := by linarith [hP.one_le_w] + have h1 : 2 * P.w / P.L T ≤ 1 / 4 := by rw [div_le_iff₀ hL]; linarith + linarith [Params.one_sub_le_b hP hwL] b_lower := Params.one_sub_le_b hP hwL b_le_a := Params.b_le_a hP hwL a_le_one := Params.a_le_one hP hwL diff --git a/zeta23/Zeta23/PrimeSideA/CrossMuP.lean b/zeta23/Zeta23/PrimeSideA/CrossMuP.lean index b91d8da0f4..ddf01415cf 100644 --- a/zeta23/Zeta23/PrimeSideA/CrossMuP.lean +++ b/zeta23/Zeta23/PrimeSideA/CrossMuP.lean @@ -12,22 +12,7 @@ import Zeta23.PrimeSideA.Basic import Zeta23.PrimeSideA.CrossMuPCore /-! -# [prop:cross] (i): `𝓜[μ, P_X] ≪ l √X` (the paper §5.4) - -Paper proof (§5.4): with `m(τ′) := ∫_I Φ(τ−τ′)² μ(τ) dτ`, "`m` is `C¹`, and differentiating -under the integral and integrating by parts in `τ`, -`m′(τ′) = μ(T)Φ(T−τ′)² − μ(2T)Φ(2T−τ′)² + ∫_I μ′(τ)Φ(τ−τ′)² dτ`, so that `∫_I|m′| ≪ lL`. -For `y ≥ log 2`, integrating by parts, `|∫_I m(τ′)cos(τ′y)dτ′| ≤ (2 sup|m| + ∫_I|m′|)/y ≪ lL/y`. -Therefore `|𝓜[μ,P_X]| = |π⁻¹ Σ_n a_n ∫_I m(τ′)cos(τ′y_n)dτ′| ≪ lL Σ_{n≤X} a_n/log n ≪ lL √X/L = l√X` -by (eq:cheb1)." - -Formal route (same two integrations by parts, but ordered so that NO differentiation under the -integral sign is needed): Fubini with `τ` outer; IBP in `τ′` on `Φ(τ−τ′)²·cos(τ′y)` (the derivative -lands on `Φ²`, `Φ ∈ C¹`); Fubini swap; IBP in `τ` on `μ(τ)·(Φ²)′(τ−τ′)` (the derivative lands on -`μ`); then the sup bounds `|μ| ≤ l`, `|μ′| ≤ C/T` on `I` and `∫_S Φ(·−c)² ≤ ∫_ℝ Φ² = 2πbL` give -`|𝓜[μ, cos(·y)]| ≤ (4l + C)·2πbL/|y|`, and [eq:cheb1] (`cheb1c`: `Σ Λ(n)/(√n log n) ≪ √X/log X`, `log X = L`) -finishes. Inputs: `LocalHyps` (Φ ∈ C¹, Φ even, ∫Φ² = 2πbL, b ≤ a ≤ 1, l ≥ 1), H-Γ (`smooth`, -`deriv_bound`, via `mu_abs_le_l`), H-cheb (`cheb1c`). +# [prop:cross] (i): `𝓜[μ, P_X] ≪ l √X` (the paper §5.4), instantiated from `abs_Mform_u_PcDir_eventually`. -/ noncomputable section @@ -38,118 +23,24 @@ open scoped BigOperators ArithmeticFunction namespace Zeta23 namespace PrimeSide - -/-! ## [prop:cross] (i) -/ - section CrossMuP variable (cϱ lam : ℝ) -/-- `𝓜[μ, P_X]` as the finite sum `−π⁻¹ Σ_n a_n 𝓜[μ, cos(· y_n)]` (§5.4, Fubini/linearity). -/ -lemma Mform_mu_PX_eq {p : Setting} {F : LocalFun} (hΦ : Continuous F.Phi) (hμ : Continuous Zeta23.mu) : - Mform F.Phi p.T Zeta23.mu (Zeta23.PX p.X) - = ∑ n ∈ primeRange p.X, (-(1 / Real.pi) * acoef n) - * Mform F.Phi p.T Zeta23.mu (fun t => Real.cos (t * ycoef n)) := by - unfold Mform - have h1 : (fun q : ℝ × ℝ => F.Phi (q.1 - q.2) ^ 2 * Zeta23.mu q.1 * Zeta23.PX p.X q.2) - = fun q => ∑ n ∈ primeRange p.X, (-(1 / Real.pi) * acoef n) - * (F.Phi (q.1 - q.2) ^ 2 * Zeta23.mu q.1 * Real.cos (q.2 * ycoef n)) := by - funext q - rw [PX_eq, Finset.mul_sum, Finset.mul_sum] - exact Finset.sum_congr rfl fun n _ => by ring - rw [h1, integral_finsetSum] - · refine Finset.sum_congr rfl fun n _ => ?_ - rw [integral_const_mul] - · intro n _ - have hv : Continuous fun t : ℝ => Real.cos (t * ycoef n) := by fun_prop - have := (Mform_integrableOn (T := p.T) hΦ hμ hv).const_mul (-(1 / Real.pi) * acoef n) - simpa only using this - -/-- **[prop:cross] (i)** (§5.4): `𝓜[μ,P_X] ≪ l√X`, stated in the `∃ C, EventuallyAtCore cϱ lam …` -form used by the results of `PrimeSideA.lean` (which imports this file). -/ +/-- **[prop:cross] (i)** (§5.4): `𝓜[μ, P_X] ≪ l √X`. -/ theorem prop_cross_muP (hΓ : Zeta23.GammaFacts) (hcheb : Zeta23.ChebyshevMertens) (hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => |Mform F.Phi p.T Zeta23.mu (Zeta23.PX p.X)| ≤ C * (p.l * Real.sqrt p.X)) := by obtain ⟨T₁, hT₁⟩ := mu_abs_le_l hΓ obtain ⟨Cd, hCd⟩ := hΓ.deriv_bound - obtain ⟨Cc, hCc⟩ := hcheb.cheb1c - have hμ : ContDiff ℝ 1 Zeta23.mu := hΓ.smooth.of_le (by exact_mod_cast le_top) - refine ⟨2 * (4 + |Cd|) * |Cc|, max T₁ (2 * π * Real.exp (|(2:ℝ)| / lam)), ?_⟩ - intro p F hplam hT hF - have hT₁' : T₁ ≤ p.T := (le_max_left _ _).trans hT - have hT2 : 2 * π * Real.exp (|(2:ℝ)| / p.lam) ≤ p.T := by rw [hplam]; exact (le_max_right _ _).trans hT - have hlam0 : 0 < p.lam := hplam ▸ hlam.1 - have hT1 : 1 ≤ p.T := Setting.one_le_T (div_nonneg (abs_nonneg _) hlam0.le) hT2 - have hT0 : 0 ≤ p.T := by linarith - have hl1 : 1 ≤ p.l := hF.one_le_l - have hL := hF.L_pos - have hX2 : 2 ≤ p.X := Setting.le_X_of_T hlam0 hT2 - have hlogX : Real.log p.X = p.L := by simp [Setting.X] - -- sup bounds for μ, μ' on I - have hB : ∀ τ ∈ Icc p.T (2 * p.T), |Zeta23.mu τ| ≤ p.l := hT₁ p hT₁' - have hD : ∀ τ ∈ Icc p.T (2 * p.T), |deriv Zeta23.mu τ| ≤ |Cd| / p.T := by - intro τ hτ - have hτ1 : 1 ≤ |τ| := by rw [abs_of_nonneg (by linarith [hτ.1])]; linarith [hτ.1] - refine (hCd τ hτ1).trans ?_ - rw [abs_of_nonneg (by linarith [hτ.1])] - calc Cd / τ ≤ |Cd| / τ := div_le_div_of_nonneg_right (le_abs_self _) (by linarith [hτ.1]) - _ ≤ |Cd| / p.T := div_le_div_of_nonneg_left (abs_nonneg _) (by linarith) hτ.1 - -- the oscillatory bound at each frequency y_n, n ≥ 2 - set S : ℝ := ∫ x, F.Phi x ^ 2 with hSdef - have hS : S ≤ 2 * π * p.L := hF.integral_Phi_sq_le - have hS0 : 0 ≤ S := integral_nonneg fun x => sq_nonneg _ - set K : ℝ := (4 * p.l + |Cd| / p.T * p.T) * S with hKdef - have hKeq : K = (4 * p.l + |Cd|) * S := by - have hTne : p.T ≠ 0 := by linarith - rw [hKdef, div_mul_cancel₀ _ hTne] - have hK0 : 0 ≤ K := by rw [hKeq]; positivity - have hosc : ∀ n ∈ primeRange p.X, - |(-(1 / Real.pi) * acoef n) * Mform F.Phi p.T Zeta23.mu (fun t => Real.cos (t * ycoef n))| - ≤ (1 / Real.pi) * K * (acoef n / ycoef n) := by - intro n hn - have ha0 : 0 ≤ acoef n := div_nonneg ArithmeticFunction.vonMangoldt_nonneg (Real.sqrt_nonneg _) - rcases Nat.lt_or_ge n 2 with h2 | h2 - · -- n = 1: a_1 = 0 - have hn1 : n = 1 := by - have : 0 < n := (Finset.mem_Ioc.mp hn).1 - omega - subst hn1 - simp [acoef] - · have hy : 0 < ycoef n := Real.log_pos (by exact_mod_cast h2) - have hM := abs_Mform_cos_le hT0 hF.Phi_contDiff hF.Phi_sq_integrable hμ hB hD hy.ne' - rw [abs_of_pos hy] at hM - rw [abs_mul, abs_mul, abs_neg, abs_of_pos (by positivity : (0:ℝ) < 1 / Real.pi), - abs_of_nonneg ha0] - calc 1 / Real.pi * acoef n * |Mform F.Phi p.T Zeta23.mu fun t => Real.cos (t * ycoef n)| - ≤ 1 / Real.pi * acoef n * (K / ycoef n) := by gcongr - _ = 1 / Real.pi * K * (acoef n / ycoef n) := by ring - -- sum over n - rw [Mform_mu_PX_eq hF.Phi_contDiff.continuous hμ.continuous] - refine (Finset.abs_sum_le_sum_abs _ _).trans ((Finset.sum_le_sum hosc).trans ?_) - rw [← Finset.mul_sum] - -- Σ a_n / y_n ≤ Cc √X / log X = Cc √X / L - have hsum : ∑ n ∈ primeRange p.X, acoef n / ycoef n ≤ |Cc| * Real.sqrt p.X / p.L := by - have h := hCc p.X hX2 - rw [hlogX] at h - have e : ∑ n ∈ primeRange p.X, acoef n / ycoef n - = ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) / (Real.sqrt n * Real.log n) := by - refine Finset.sum_congr rfl fun n _ => ?_ - simp only [acoef, ycoef, div_div] - rw [e] - refine h.trans ?_ - gcongr; exact le_abs_self _ - have hsum0 : 0 ≤ ∑ n ∈ primeRange p.X, acoef n / ycoef n := - Finset.sum_nonneg fun n _ => div_nonneg - (div_nonneg ArithmeticFunction.vonMangoldt_nonneg (Real.sqrt_nonneg _)) - (Real.log_natCast_nonneg _) - calc 1 / Real.pi * K * ∑ n ∈ primeRange p.X, acoef n / ycoef n - ≤ 1 / Real.pi * ((4 * p.l + |Cd|) * (2 * π * p.L)) * (|Cc| * Real.sqrt p.X / p.L) := by - rw [hKeq]; gcongr - _ = 2 * (4 * p.l + |Cd|) * |Cc| * Real.sqrt p.X := by field_simp - _ ≤ 2 * ((4 + |Cd|) * p.l) * |Cc| * Real.sqrt p.X := by - gcongr - nlinarith [abs_nonneg Cd] - _ = 2 * (4 + |Cd|) * |Cc| * (p.l * Real.sqrt p.X) := by ring + let c : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) + have hPX : ∀ X, Zeta23.PX X = PcDir X c := fun X => by + funext τ; simp [PX_eq, PcDir, c, primeRange, acoef, ycoef, div_eq_mul_inv, Finset.mul_sum] + exact Finset.sum_congr rfl fun n _ => by ring + simpa only [hPX] using abs_Mform_u_PcDir_eventually (cϱ := cϱ) hcheb hlam + (hΓ.smooth.of_le (by exact_mod_cast le_top)) (Cμ := 1) (T₁ := T₁) (Cd := Cd) zero_le_one + (fun p hp τ hτ => by simpa using hT₁ p hp τ hτ) hCd (c := c) + (fun n => by simp [c, abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg]) end CrossMuP diff --git a/zeta23/Zeta23/PrimeSideA/CrossMuPCore.lean b/zeta23/Zeta23/PrimeSideA/CrossMuPCore.lean index e010fcb4ea..9966c8102a 100644 --- a/zeta23/Zeta23/PrimeSideA/CrossMuPCore.lean +++ b/zeta23/Zeta23/PrimeSideA/CrossMuPCore.lean @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ -import Zeta23.PrimeSideA.Defs +import Zeta23.PrimeSideA.Basic /-! # Analytic core of [prop:cross] (i): the double integration by parts for `𝓜[u, cos(·y)]` @@ -15,7 +15,7 @@ See `Zeta23/PrimeSideA/CrossMuP.lean` for the statement of [prop:cross](i) and t noncomputable section open MeasureTheory Real Set Finset -open scoped BigOperators +open scoped BigOperators ArithmeticFunction namespace Zeta23 namespace PrimeSide @@ -23,21 +23,42 @@ namespace PrimeSide section CrossMuPCore variable {Φ : ℝ → ℝ} {T : ℝ} -lemma Mform_integrableOn' (hΦ : Continuous Φ) {u v : ℝ → ℝ} (hu : Continuous u) - (hv : Continuous v) : - IntegrableOn (fun q : ℝ × ℝ => (Φ (q.1 - q.2)) ^ 2 * u q.1 * v q.2) - ((Set.Icc T (2 * T)) ×ˢ (Set.Icc T (2 * T))) := by - apply ContinuousOn.integrableOn_compact (isCompact_Icc.prod isCompact_Icc) - apply Continuous.continuousOn - fun_prop - -/-- `∫_S Φ(x−y)² dy ≤ ∫_ℝ Φ²`. -/ -lemma setIntegral_sq_shift_le_left (hΦint : Integrable (fun x => Φ x ^ 2)) (S : Set ℝ) (x : ℝ) : - ∫ y in S, Φ (x - y) ^ 2 ≤ ∫ y, Φ y ^ 2 := by - calc ∫ y in S, Φ (x - y) ^ 2 ≤ ∫ y, Φ (x - y) ^ 2 := - setIntegral_le_integral (hΦint.comp_sub_left x) - (Filter.Eventually.of_forall fun y => sq_nonneg _) - _ = ∫ y, Φ y ^ 2 := integral_sub_left_eq_self (fun y => Φ y ^ 2) volume x +/-- Expand `𝓜[Φ, u, D]` when the density `D` is a finite cosine/sine sum with +coefficients `coef n` and character values `c n`. The ζ (`Pc`) and χ (`PXc`) versions +differ only in `D`, `coef`, and the density expansion. -/ +lemma Mform_eq_sum_of_density (hΦ : Continuous Φ) {u : ℝ → ℝ} (hu : Continuous u) + (D : ℝ → ℝ) (c : ℕ → ℂ) (coef : ℕ → ℝ) (X T : ℝ) + (hD : ∀ q : ℝ × ℝ, Φ (q.1 - q.2) ^ 2 * u q.1 * D q.2 + = ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, coef n * + ((c n).re * (Φ (q.1 - q.2) ^ 2 * u q.1 * Real.cos (q.2 * Real.log n)) + + (c n).im * (Φ (q.1 - q.2) ^ 2 * u q.1 * Real.sin (q.2 * Real.log n)))) : + Mform Φ T u D + = ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, coef n * + ((c n).re * Mform Φ T u (fun t => Real.cos (t * Real.log n)) + + (c n).im * Mform Φ T u (fun t => Real.sin (t * Real.log n))) := by + unfold Mform + have h1 : (fun q : ℝ × ℝ => Φ (q.1 - q.2) ^ 2 * u q.1 * D q.2) + = fun q => ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, coef n * + ((c n).re * (Φ (q.1 - q.2) ^ 2 * u q.1 * Real.cos (q.2 * Real.log n)) + + (c n).im * (Φ (q.1 - q.2) ^ 2 * u q.1 * Real.sin (q.2 * Real.log n))) := + funext hD + rw [h1, integral_finsetSum] + · refine Finset.sum_congr rfl fun n _ => ?_ + rw [integral_const_mul] + congr 1 + have i1 := (Mform_integrableOn (T := T) hΦ hu + (show Continuous fun t : ℝ => Real.cos (t * Real.log n) by fun_prop)).const_mul ((c n).re) + have i2 := (Mform_integrableOn (T := T) hΦ hu + (show Continuous fun t : ℝ => Real.sin (t * Real.log n) by fun_prop)).const_mul ((c n).im) + beta_reduce at i1 i2 + rw [integral_add i1 i2, integral_const_mul, integral_const_mul] + · intro n _ + have i1 := (Mform_integrableOn (T := T) hΦ hu + (show Continuous fun t : ℝ => Real.cos (t * Real.log n) by fun_prop)).const_mul ((c n).re) + have i2 := (Mform_integrableOn (T := T) hΦ hu + (show Continuous fun t : ℝ => Real.sin (t * Real.log n) by fun_prop)).const_mul ((c n).im) + beta_reduce at i1 i2 + exact (i1.add i2).const_mul _ /-- Icc-set-integral = interval integral (`T ≤ 2T`). -/ lemma setIntegral_Icc_eq_intervalIntegral (hT : 0 ≤ T) (f : ℝ → ℝ) : @@ -50,7 +71,7 @@ lemma Mform_eq_iter (hΦ : Continuous Φ) {u v : ℝ → ℝ} (hu : Continuous u Mform Φ T u v = ∫ τ in Icc T (2 * T), u τ * ∫ τ' in Icc T (2 * T), Φ (τ - τ') ^ 2 * v τ' := by unfold Mform - rw [Measure.volume_eq_prod, setIntegral_prod _ (Mform_integrableOn' hΦ hu hv)] + rw [Measure.volume_eq_prod, setIntegral_prod _ (Mform_integrableOn hΦ hu hv)] refine setIntegral_congr_fun measurableSet_Icc fun τ _ => ?_ rw [← integral_const_mul] exact integral_congr_ae (ae_of_all _ fun τ' => by ring) @@ -253,8 +274,8 @@ theorem abs_Mform_cos_phase_le (hT : 0 ≤ T) (hΦ : ContDiff ℝ 1 Φ) _ = _ := one_mul _ · rw [integral_add, integral_add, integral_const_mul, integral_const_mul, setIntegral_const, hvol, smul_eq_mul] - · have h1 := setIntegral_sq_shift_le_left hΦint (Icc T (2 * T)) (2 * T) - have h2 := setIntegral_sq_shift_le_left hΦint (Icc T (2 * T)) T + · have h1 := setIntegral_sq_shift_le hΦint (Icc T (2 * T)) (2 * T) + have h2 := setIntegral_sq_shift_le hΦint (Icc T (2 * T)) T simp only [hΨdef] at h1 h2 ⊢ nlinarith all_goals { apply Continuous.integrableOn_Icc; fun_prop } @@ -275,6 +296,151 @@ theorem abs_Mform_cos_le (hT : 0 ≤ T) (hΦ : ContDiff ℝ 1 Φ) |Mform Φ T u (fun t => Real.cos (t * y))| ≤ (4 * B + D * T) * (∫ x, Φ x ^ 2) / |y| := by simpa only [add_zero] using abs_Mform_cos_phase_le hT hΦ hΦint hu hB hD hy 0 +/-- `𝓜[u, PcDir X c]` as the finite cos/sin-split sum. -/ +lemma Mform_u_PcDir_eq {Φ u : ℝ → ℝ} (hΦ : Continuous Φ) (hu : Continuous u) + (c : ℕ → ℂ) (X T : ℝ) : + Mform Φ T u (PcDir X c) + = ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, ((1 / Real.pi) * (Real.sqrt n)⁻¹) + * ((c n).re * Mform Φ T u (fun t => Real.cos (t * Real.log n)) + + (c n).im * Mform Φ T u (fun t => Real.sin (t * Real.log n))) := + Mform_eq_sum_of_density hΦ hu (PcDir X c) c + (fun n => (1 / Real.pi) * (Real.sqrt n)⁻¹) X T + (by + intro q; unfold PcDir; rw [Finset.mul_sum, Finset.mul_sum] + exact Finset.sum_congr rfl fun n _ => by rw [div_eq_mul_inv]; ring) + +/-- **Unified `[prop:cross](i)` bound for `𝓜[u, PcDir X c]`**: given `Φ, u ∈ C¹` with +`|u| ≤ B`, `|u'| ≤ D` on `[T, 2T]`, `∫ Φ² ≤ S`, and `c 1 = 0`, +`|𝓜[u, PcDir X c]| ≤ (2/π) · (4B + DT) · S · Σ_{n≤X} ‖c n‖ / (√n log n)`. -/ +theorem abs_Mform_u_PcDir_le {Φ u : ℝ → ℝ} {T X B D S : ℝ} {c : ℕ → ℂ} + (hT : 0 ≤ T) (hΦ : ContDiff ℝ 1 Φ) (hΦint : Integrable (fun x => Φ x ^ 2)) + (hu : ContDiff ℝ 1 u) + (hB : ∀ τ ∈ Icc T (2 * T), |u τ| ≤ B) (hD : ∀ τ ∈ Icc T (2 * T), |deriv u τ| ≤ D) + (hS : ∫ x, Φ x ^ 2 ≤ S) (hB0 : 0 ≤ B) (hD0 : 0 ≤ D) (hc1 : c 1 = 0) : + |Mform Φ T u (PcDir X c)| + ≤ (2 / Real.pi) * (4 * B + D * T) * S + * ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, ‖c n‖ / (Real.sqrt n * Real.log n) := by + set IΦ := ∫ x, Φ x ^ 2 with hIΦdef + have hIΦ0 : 0 ≤ IΦ := integral_nonneg fun x => sq_nonneg _ + have hS0 : 0 ≤ S := hIΦ0.trans hS + set K : ℝ := (4 * B + D * T) * S + have hK0 : 0 ≤ K := by positivity + have hosc : ∀ n ∈ Finset.Ioc 0 ⌊X⌋₊, + |((1 / Real.pi) * (Real.sqrt n)⁻¹) + * ((c n).re * Mform Φ T u (fun t => Real.cos (t * Real.log n)) + + (c n).im * Mform Φ T u (fun t => Real.sin (t * Real.log n)))| + ≤ (2 / Real.pi) * K * (‖c n‖ / (Real.sqrt n * Real.log n)) := by + intro n hn + rcases Nat.lt_or_ge n 2 with h2 | h2 + · have hn1 : n = 1 := by have := (Finset.mem_Ioc.mp hn).1; omega + subst hn1; simp [hc1] + · have hy : 0 < Real.log n := Real.log_pos (by exact_mod_cast h2) + have hMc := abs_Mform_cos_le hT hΦ hΦint hu hB hD hy.ne' + rw [abs_of_pos hy] at hMc + have hsin_eq : Mform Φ T u (fun t => Real.sin (t * Real.log n)) + = Mform Φ T u (fun t => Real.cos (t * Real.log n + -(π / 2))) := by + unfold Mform + refine integral_congr_ae (Filter.Eventually.of_forall fun z => ?_) + simp only [] + rw [show z.2 * Real.log n + -(π / 2) = z.2 * Real.log n - π / 2 by ring, + Real.cos_sub_pi_div_two] + have hMs := abs_Mform_cos_phase_le hT hΦ hΦint hu hB hD hy.ne' (-(π / 2)) + rw [abs_of_pos hy, ← hsin_eq] at hMs + have hKI : (4 * B + D * T) * IΦ / Real.log n ≤ K / Real.log n := by + dsimp only [K]; gcongr + have h1 : |(c n).re * Mform Φ T u (fun t => Real.cos (t * Real.log n)) + + (c n).im * Mform Φ T u (fun t => Real.sin (t * Real.log n))| + ≤ 2 * ‖c n‖ * (K / Real.log n) := by + calc _ ≤ |(c n).re| * |Mform Φ T u (fun t => Real.cos (t * Real.log n))| + + |(c n).im| * |Mform Φ T u (fun t => Real.sin (t * Real.log n))| := + (abs_add_le _ _).trans (by rw [abs_mul, abs_mul]) + _ ≤ ‖c n‖ * (K / Real.log n) + ‖c n‖ * (K / Real.log n) := + add_le_add + (mul_le_mul (Complex.abs_re_le_norm _) (hMc.trans hKI) (abs_nonneg _) (norm_nonneg _)) + (mul_le_mul (Complex.abs_im_le_norm _) (hMs.trans hKI) (abs_nonneg _) (norm_nonneg _)) + _ = 2 * ‖c n‖ * (K / Real.log n) := by ring + rw [abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ (1 / Real.pi) * (Real.sqrt n)⁻¹)] + calc (1 / Real.pi) * (Real.sqrt n)⁻¹ * |_| + ≤ (1 / Real.pi) * (Real.sqrt n)⁻¹ * (2 * ‖c n‖ * (K / Real.log n)) := + mul_le_mul_of_nonneg_left h1 (by positivity) + _ = (2 / Real.pi) * K * (‖c n‖ / (Real.sqrt n * Real.log n)) := by field_simp + rw [Mform_u_PcDir_eq hΦ.continuous hu.continuous] + refine (Finset.abs_sum_le_sum_abs _ _).trans ((Finset.sum_le_sum hosc).trans ?_) + rw [← Finset.mul_sum] + exact le_of_eq (by dsimp only [K]; ring) + +/-- **Unified cross-term `𝓜[u, P_c]` bound** for `LocalHypsCore`: +given `u ∈ C¹` with `|u| ≤ Cμ · l` on `[T, 2T]` and `|u'| ≤ Cd / |τ|` on `|τ| ≥ 1`, and any +`c : ℕ → ℂ` with `c 1 = 0`, +`|𝓜[u, PcDir p.X c]| ≤ 4 * (4 * Cμ + |Cd|) * p.l * p.L * Σ_{n ≤ X} ‖c n‖ / (√n · log n)`. -/ +theorem abs_Mform_u_PcDir_of_localHyps {cϱ : ℝ} {p : Setting} {F : LocalFun} + (hF : LocalHypsCore cϱ p F) (hT1 : 1 ≤ p.T) + {u : ℝ → ℝ} (hu : ContDiff ℝ 1 u) {Cμ Cd : ℝ} (hCμ : 0 ≤ Cμ) + (hB : ∀ τ ∈ Set.Icc p.T (2 * p.T), |u τ| ≤ Cμ * p.l) + (hCd : ∀ τ : ℝ, 1 ≤ |τ| → |deriv u τ| ≤ Cd / |τ|) + {c : ℕ → ℂ} (hc1 : c 1 = 0) : + |Mform F.Phi p.T u (PcDir p.X c)| + ≤ 4 * (4 * Cμ + |Cd|) * p.l * p.L + * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / (Real.sqrt n * Real.log n) := by + have hl1 : 1 ≤ p.l := hF.one_le_l + have hL : 0 < p.L := hF.L_pos + have hTne : p.T ≠ 0 := by linarith + have hD : ∀ τ ∈ Set.Icc p.T (2 * p.T), |deriv u τ| ≤ |Cd| / p.T := fun τ hτ => by + have hτ1 : 1 ≤ |τ| := by rw [abs_of_nonneg (by linarith [hτ.1])]; linarith [hτ.1] + refine (hCd τ hτ1).trans ?_ + rw [abs_of_nonneg (by linarith [hτ.1])] + exact (div_le_div_of_nonneg_right (le_abs_self _) (by linarith [hτ.1])).trans + (div_le_div_of_nonneg_left (abs_nonneg _) (by linarith) hτ.1) + have hsum0 : 0 ≤ ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / (Real.sqrt n * Real.log n) := + Finset.sum_nonneg fun n _ => div_nonneg (norm_nonneg _) + (mul_nonneg (Real.sqrt_nonneg _) (Real.log_natCast_nonneg _)) + refine (abs_Mform_u_PcDir_le (by linarith) hF.Phi_contDiff hF.Phi_sq_integrable hu + hB hD hF.integral_Phi_sq_le (by positivity) (by positivity) hc1).trans ?_ + rw [div_mul_cancel₀ _ hTne] + have h1 : (2 / Real.pi) * (4 * (Cμ * p.l) + |Cd|) * (2 * Real.pi * p.L) + = 4 * (4 * Cμ * p.l + |Cd|) * p.L := by field_simp; ring + rw [h1] + have h2 : 4 * Cμ * p.l + |Cd| ≤ (4 * Cμ + |Cd|) * p.l := by nlinarith [abs_nonneg Cd] + calc 4 * (4 * Cμ * p.l + |Cd|) * p.L * _ + ≤ 4 * ((4 * Cμ + |Cd|) * p.l) * p.L * _ := by gcongr + _ = _ := by ring + +/-- Chebyshev specialization of `abs_Mform_u_PcDir_of_localHyps` when `∀ n, ‖c n‖ ≤ Λ n`: +`|𝓜[u, PcDir p.X c]| ≤ C · l · √X` eventually (shared by `CrossMuP` and `CrossMuPChi`). -/ +theorem abs_Mform_u_PcDir_eventually {cϱ lam : ℝ} (hcheb : Zeta23.ChebyshevMertens) + (hlam : 0 < lam ∧ lam ≤ 1) + {u : ℝ → ℝ} (hu : ContDiff ℝ 1 u) {Cμ T₁ Cd : ℝ} (hCμ : 0 ≤ Cμ) + (hB : ∀ p : Setting, T₁ ≤ p.T → ∀ τ ∈ Set.Icc p.T (2 * p.T), |u τ| ≤ Cμ * p.l) + (hCd : ∀ τ : ℝ, 1 ≤ |τ| → |deriv u τ| ≤ Cd / |τ|) + {c : ℕ → ℂ} (hc : ∀ n, ‖c n‖ ≤ Λ n) : + ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => + |Mform F.Phi p.T u (PcDir p.X c)| ≤ C * (p.l * Real.sqrt p.X)) := by + obtain ⟨Cc, hCc⟩ := hcheb.cheb1c + have hc1 : c 1 = 0 := norm_le_zero_iff.mp (by simpa using hc 1) + refine ⟨4 * (4 * Cμ + |Cd|) * |Cc|, max T₁ (2 * Real.pi * Real.exp (|(2 : ℝ)| / lam)), + fun p F hplam hT hF => ?_⟩ + have hT2 : 2 * Real.pi * Real.exp (|(2 : ℝ)| / p.lam) ≤ p.T := by + rw [hplam]; exact (le_max_right _ _).trans hT + have hlam0 : 0 < p.lam := hplam ▸ hlam.1 + have hT1 : 1 ≤ p.T := Setting.one_le_T (div_nonneg (abs_nonneg _) hlam0.le) hT2 + have hX2 : 2 ≤ p.X := Setting.le_X_of_T hlam0 hT2 + have hL : 0 < p.L := hF.L_pos + have hsum : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / (Real.sqrt n * Real.log n) + ≤ |Cc| * Real.sqrt p.X / p.L := by + have hle : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / (Real.sqrt n * Real.log n) + ≤ ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) / (Real.sqrt n * Real.log n) := + Finset.sum_le_sum fun n _ => div_le_div_of_nonneg_right (hc n) + (mul_nonneg (Real.sqrt_nonneg _) (Real.log_natCast_nonneg _)) + have h := hCc p.X hX2 + rw [show Real.log p.X = p.L by simp [Setting.X]] at h + exact hle.trans (h.trans (by gcongr; exact le_abs_self _)) + refine (abs_Mform_u_PcDir_of_localHyps hF hT1 hu hCμ + (hB p ((le_max_left _ _).trans hT)) hCd hc1).trans ?_ + have hl0 : 0 ≤ p.l := by linarith [hF.one_le_l] + calc 4 * (4 * Cμ + |Cd|) * p.l * p.L * _ + ≤ 4 * (4 * Cμ + |Cd|) * p.l * p.L * (|Cc| * Real.sqrt p.X / p.L) := by gcongr + _ = 4 * (4 * Cμ + |Cd|) * |Cc| * (p.l * Real.sqrt p.X) := by field_simp + end CrossMuPCore end PrimeSide diff --git a/zeta23/Zeta23/PrimeSideA/Defs.lean b/zeta23/Zeta23/PrimeSideA/Defs.lean index 33ddda1630..3be2112aa4 100644 --- a/zeta23/Zeta23/PrimeSideA/Defs.lean +++ b/zeta23/Zeta23/PrimeSideA/Defs.lean @@ -47,7 +47,6 @@ functions ℝ → ℝ (= `phiHatR`, `PhiR` of Defs.lean). import Mathlib import Zeta23.Hypotheses - noncomputable section open MeasureTheory Real Set Finset @@ -103,6 +102,13 @@ def primeRange (X : ℝ) : Finset ℕ := Finset.Ioc 0 ⌊X⌋₊ lemma PX_eq (X τ : ℝ) : Zeta23.PX X τ = -(1 / Real.pi) * ∑ n ∈ primeRange X, acoef n * Real.cos (τ * ycoef n) := rfl +/-- General complex-coefficient Dirichlet polynomial: +`P_c(X; τ) = (1/π) Σ_{N ≤ X} (Re c_N cos(τ log N) + Im c_N sin(τ log N)) / √N`. +Definitionally equal to `Zeta23.XiPrime.Pc X c τ`. -/ +def PcDir (X : ℝ) (c : ℕ → ℂ) (τ : ℝ) : ℝ := + (1 / Real.pi) * ∑ N ∈ Finset.Ioc 0 ⌊X⌋₊, + ((c N).re * Real.cos (τ * Real.log N) + (c N).im * Real.sin (τ * Real.log N)) / Real.sqrt N + /-! ## Abstract functional data In the concrete instantiation `phiHat, Phi, Aphi, g, a, b` are Zeta23/Defs.lean's `P.phiHatR T`, @@ -131,10 +137,6 @@ variable (p : Setting) (F : LocalFun) def GentryA (k l : ℤ) : ℝ := ∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau l) * Zeta23.nuX p.X τ -/-- `G̃ := G/L` as a `d × d` real matrix, indices `0 ≤ k,l < d` [eq:Gdef]. -/ -def GtildeA : Matrix (Fin p.d) (Fin p.d) ℝ := - fun k l => GentryA p F (k : ℤ) (l : ℤ) / p.L - /-- `tr G̃ = L⁻¹ Σ_{k sq_nonneg _)) hF.integral_psi_sq_le -/-- `|φ̂(r)| ≤ ψ(r)` [eq:psidef] (LocalHyps field). -/ -theorem abs_phiHat_le_psiA (hF : LocalHypsCoreW cϱ p F) (r : ℝ) : |F.phiHat r| ≤ psiA cϱ p r := - hF.phiHat_le_psi r - /-- `2Ψ₀ := ∫_ℝ ψ ≤ 2(4 + 2 log(c_ϱ L/4w))` [eq:psiints]. -/ theorem integral_psiA_le (hF : LocalHypsCoreW cϱ p F) : ∫ r, psiA cϱ p r ≤ 2 * (4 + 2 * Real.log (cϱ * p.L / (4 * p.w))) := by @@ -530,7 +514,6 @@ section Kbounds /-! ## [eq:Kbounds] pointwise (§5.3) -/ variable {cϱ : ℝ} {p : Setting} {F : LocalFun} - lemma sum_Ico_int_eq (p : Setting) (F : LocalFun) (τ : ℝ) : ∑ k ∈ Finset.Ico (0:ℤ) (p.d : ℤ), F.phiHat (τ - p.tau k) ^ 2 = ∑ k : Fin p.d, F.phiHat (τ - p.tau (k : ℕ)) ^ 2 := by @@ -693,6 +676,5 @@ theorem abs_Kinf_sub_Kfun_le (hF : LocalHypsCoreW cϱ p F) (τ τ' : ℝ) {s : end Kbounds - end PrimeSide end Zeta23 diff --git a/zeta23/Zeta23/PrimeSideA/EndsE1.lean b/zeta23/Zeta23/PrimeSideA/EndsE1.lean index 2ffe779b70..34842b3b03 100644 --- a/zeta23/Zeta23/PrimeSideA/EndsE1.lean +++ b/zeta23/Zeta23/PrimeSideA/EndsE1.lean @@ -54,7 +54,6 @@ theorem setIntegral_gwt_le (hT : 0 < p.T) : ∫ τ in Icc p.T (2 * p.T), gwt p unfold gwt distB exact this - theorem W1a (hF : LocalHypsCoreW cϱ p F) : ∫ u in (0:ℝ)..1, psiA cϱ p u ^ 2 * (1 + u) ^ 2 ≤ 4 * p.L ^ 2 := by have hψ0 := psiA_nonneg_of hF @@ -108,7 +107,6 @@ theorem W1b (hF : LocalHypsCoreW cϱ p F) (hT : 1 ≤ p.T) : _ ≤ 4 * (cϱ / p.w) ^ 2 * 1 := by gcongr _ = 4 * (cϱ / p.w) ^ 2 := mul_one _ - /-- J(u) := ∫_{(u,∞)} ψ² is antitone in u (ψ² ≥ 0). -/ theorem antitone_setIntegral_psiA_sq_Ioi (hF : LocalHypsCoreW cϱ p F) : Antitone (fun u : ℝ => ∫ r in Set.Ioi u, psiA cϱ p r ^ 2) := fun _ _ huv => @@ -249,14 +247,6 @@ theorem majK1_le (hF : LocalHypsCoreW cϱ p F) (hν : NuBound p B ν) (hT : 0 < apply mul_le_mul_of_nonneg_left (mul_le_mul hn1 hn2 (abs_nonneg _) hB) (by positivity) _ = _ := by ring -/-- pointwise bound for the 𝓔₁-integrand on `I×I`. -/ -theorem abs_E1integrand_le (hF : LocalHypsCoreW cϱ p F) (hν : NuBound p B ν) (hT : 0 < p.T) - {q : ℝ × ℝ} (hq : q ∈ sqI p) : - |trG2integrand p F ν q - KinfIntegrand p F ν q| - ≤ p.L ^ 2 * B ^ 2 * - (rho p F q.1 / gwt p q.1 * gwt p q.2 + gwt p q.1 * (rho p F q.2 / gwt p q.2)) := - (abs_E1integrand_le_majK1 hF hq).trans (majK1_le hF hν hT hq) - /-! ### The majorant for ρ on I -/ /-- `τ_d = T + d h > 2T − h` (since `d = ⌊T/h⌋`). -/ @@ -323,7 +313,7 @@ theorem rho_le_majorant (hF : LocalHypsCoreW cϱ p F) (hT : 0 < p.T) {τ : ℝ} set G : ℕ → ℝ := fun m => psiA cϱ p ((τ - p.T) + m * p.h) ^ 2 with hG have hinj : Set.InjOn ι Sm := by intro a ha b hb hab - simp only [hSm, Finset.coe_filter, Set.mem_setOf_eq] at ha hb + simp only [hSm, Finset.coe_filter, Set.mem_ofPred_eq] at ha hb simp only [hι] at hab apply Subtype.ext have := congrArg (fun n : ℕ => (n : ℤ)) hab @@ -427,6 +417,47 @@ theorem rho_le_majorant (hF : LocalHypsCoreW cϱ p F) (hT : 0 < p.T) {τ : ℝ} /-! ### The weight integrals -/ +private lemma integrableOn_Wfun_comp (hF : LocalHypsCoreW cϱ p F) {s : Set ℝ} (hs : volume s ≠ ⊤) + {e : ℝ → ℝ} (he : Measurable e) (hpsi : IntegrableOn (fun u => psiA cϱ p (e u) ^ 2) s) : + IntegrableOn (fun u => Wfun cϱ p (e u)) s := by + have hJ_meas : Measurable (fun u : ℝ => ∫ r in Set.Ioi u, psiA cϱ p r ^ 2) := + (antitone_setIntegral_psiA_sq_Ioi hF).measurable + have hJon : IntegrableOn (fun u => ∫ r in Set.Ioi (e u), psiA cϱ p r ^ 2) s := + Integrable.mono' (g := fun _ => 8 * p.L) (integrableOn_const hs) + (hJ_meas.comp he).aestronglyMeasurable + (ae_of_all _ fun u => by + rw [Real.norm_of_nonneg (setIntegral_nonneg measurableSet_Ioi fun _ _ => sq_nonneg _)] + exact setIntegral_psiA_sq_Ioi_le hF _) + exact hpsi.add (hJon.const_mul _) + +private lemma integral_Wfun_mul_sq_le (hF : LocalHypsCoreW cϱ p F) (hT : 1 ≤ p.T) : + ∫ u in (0:ℝ)..p.T, Wfun cϱ p u * (1 + u) ^ 2 + ≤ 4 * p.L ^ 2 + 4 * (cϱ / p.w) ^ 2 + + (p.h)⁻¹ * (32 * p.L + 4 / 3 * (cϱ / p.w) ^ 2 * Real.log p.T) := by + have hh := h_pos hF + have hvol : ∀ a b : ℝ, volume (Icc a b) ≠ ⊤ := fun a b => by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top + have hΦii : ∀ {a b : ℝ}, a ≤ b → IntervalIntegrable (fun u => Wfun cϱ p u * (1 + u) ^ 2) volume a b := + fun hab => (intervalIntegrable_iff_integrableOn_Icc_of_le hab).mpr <| + (integrableOn_Wfun_comp hF (hvol _ _) measurable_id hF.psi_sq_integrable.integrableOn).mul_continuousOn + (by fun_prop : Continuous fun u : ℝ => (1 + u) ^ 2).continuousOn isCompact_Icc + have hexpand : ∀ {a b : ℝ}, a ≤ b → + ∫ u in a..b, Wfun cϱ p u * (1 + u) ^ 2 + = (∫ u in a..b, psiA cϱ p u ^ 2 * (1 + u) ^ 2) + + (p.h)⁻¹ * ∫ u in a..b, (∫ r in Set.Ioi u, psiA cϱ p r ^ 2) * (1 + u) ^ 2 := by + intro a b hab + have e : (fun u => Wfun cϱ p u * (1 + u) ^ 2) + = fun u => psiA cϱ p u ^ 2 * (1 + u) ^ 2 + + (p.h)⁻¹ * ((∫ r in Set.Ioi u, psiA cϱ p r ^ 2) * (1 + u) ^ 2) := + funext fun u => by simp only [Wfun]; ring + have hP1 : IntervalIntegrable (fun u => psiA cϱ p u ^ 2 * (1 + u) ^ 2) volume a b := + hF.psi_sq_integrable.intervalIntegrable.mul_continuousOn (by fun_prop) + have hP2 : IntervalIntegrable (fun u => (∫ r in Set.Ioi u, psiA cϱ p r ^ 2) * (1 + u) ^ 2) volume a b := + (antitone_setIntegral_psiA_sq_Ioi hF).intervalIntegrable.mul_continuousOn (by fun_prop) + rw [e, intervalIntegral.integral_add hP1 (hP2.const_mul _), intervalIntegral.integral_const_mul] + rw [← intervalIntegral.integral_add_adjacent_intervals (hΦii zero_le_one) (hΦii hT), + hexpand zero_le_one, hexpand hT] + have hhi : 0 ≤ (p.h)⁻¹ := inv_nonneg.mpr hh.le + nlinarith [W1a hF, W1b hF hT, mul_le_mul_of_nonneg_left (W1c hF) hhi, mul_le_mul_of_nonneg_left (W1d hF hT) hhi] /-- `∫_I ρ/g ≤ 2[W1a+W1b+h⁻¹(W1c+W1d)] + W3`-type bound: `∫_I ρ(τ)(1+min(τ−T,2T−τ))² dτ ≤ RHS`. -/ theorem setIntegral_rho_div_gwt_le (hF : LocalHypsCoreW cϱ p F) (_hν : NuBound p B ν) (hT : 1 ≤ p.T) : @@ -435,177 +466,76 @@ theorem setIntegral_rho_div_gwt_le (hF : LocalHypsCoreW cϱ p F) (_hν : NuBound + (p.h)⁻¹ * (32 * p.L + 4 / 3 * (cϱ / p.w) ^ 2 * Real.log p.T)) + (18 * p.L ^ 2 + 18 * (cϱ / p.w) ^ 2) := by have hT0 : 0 < p.T := by linarith - have hL := hF.L_pos have hh := h_pos hF have hh1 := h_le_one hF - have htd := tau_d_gt hL hT0 - have hψ0 := psiA_nonneg_of hF - -- the tail integral J(u) := ∫_{(u,∞)} ψ² - have hJ_nonneg : ∀ u : ℝ, 0 ≤ ∫ r in Set.Ioi u, psiA cϱ p r ^ 2 := fun u => - setIntegral_nonneg measurableSet_Ioi (fun r _ => sq_nonneg _) - have hJ_le : ∀ u : ℝ, ∫ r in Set.Ioi u, psiA cϱ p r ^ 2 ≤ 8 * p.L := fun u => - setIntegral_psiA_sq_Ioi_le hF u - have hJ_anti : Antitone (fun u : ℝ => ∫ r in Set.Ioi u, psiA cϱ p r ^ 2) := by - intro u v huv - exact setIntegral_mono_set hF.psi_sq_integrable.integrableOn - (ae_of_all _ fun r => sq_nonneg _) (Set.Ioi_subset_Ioi huv).eventuallyLE - have hJ_meas : Measurable (fun u : ℝ => ∫ r in Set.Ioi u, psiA cϱ p r ^ 2) := - hJ_anti.measurable + have htd := tau_d_gt hF.L_pos hT0 have hW_nonneg : ∀ u, 0 ≤ Wfun cϱ p u := fun u => - add_nonneg (sq_nonneg _) (mul_nonneg (inv_nonneg.mpr hh.le) (hJ_nonneg u)) - -- local integrability of J, of the W-majorant Φ(u) := W(u)(1+u)², and of its two pieces - have hJon : ∀ s : Set ℝ, volume s ≠ ⊤ → ∀ (e : ℝ → ℝ), Measurable e → - IntegrableOn (fun u => ∫ r in Set.Ioi (e u), psiA cϱ p r ^ 2) s := by - intro s hs e he - refine Integrable.mono' (g := fun _ => 8 * p.L) (integrableOn_const hs) - ((hJ_meas.comp he).aestronglyMeasurable) (ae_of_all _ fun u => ?_) - rw [Real.norm_of_nonneg (hJ_nonneg _)] - exact hJ_le _ - have hvol : ∀ a b : ℝ, volume (Icc a b) ≠ ⊤ := fun a b => by - rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top - have hΦon : ∀ a b : ℝ, IntegrableOn (fun u => Wfun cϱ p u * (1 + u) ^ 2) (Icc a b) := by - intro a b - have h1 : IntegrableOn (fun u => Wfun cϱ p u) (Icc a b) := by - simp only [Wfun] - exact hF.psi_sq_integrable.integrableOn.add - ((hJon _ (hvol a b) id measurable_id).const_mul _) - exact h1.mul_continuousOn (by fun_prop : Continuous fun u : ℝ => (1 + u) ^ 2).continuousOn - isCompact_Icc - have hP1on : ∀ a b : ℝ, IntegrableOn (fun u => psiA cϱ p u ^ 2 * (1 + u) ^ 2) (Icc a b) := - fun a b => hF.psi_sq_integrable.integrableOn.mul_continuousOn - (by fun_prop : Continuous fun u : ℝ => (1 + u) ^ 2).continuousOn isCompact_Icc - have hP2on : ∀ a b : ℝ, IntegrableOn - (fun u => (∫ r in Set.Ioi u, psiA cϱ p r ^ 2) * (1 + u) ^ 2) (Icc a b) := - fun a b => (hJon _ (hvol a b) id measurable_id).mul_continuousOn - (by fun_prop : Continuous fun u : ℝ => (1 + u) ^ 2).continuousOn isCompact_Icc - have hii : ∀ {f : ℝ → ℝ} {a b : ℝ}, a ≤ b → IntegrableOn f (Icc a b) → - IntervalIntegrable f volume a b := by - intro f a b hab h - exact (h.mono_set (by rw [Set.uIcc_of_le hab])).intervalIntegrable - -- STEP 1: pointwise majorant on I - have hpt : ∀ τ ∈ Icc p.T (2 * p.T), rho p F τ / gwt p τ + add_nonneg (sq_nonneg _) (mul_nonneg (inv_nonneg.mpr hh.le) + (setIntegral_nonneg measurableSet_Ioi fun _ _ => sq_nonneg _)) + set I : Set ℝ := Icc p.T (2 * p.T) with hIdef + have hIvol : volume I ≠ ⊤ := by rw [hIdef, Real.volume_Icc]; exact ENNReal.ofReal_ne_top + have hpt : ∀ τ ∈ I, rho p F τ / gwt p τ ≤ Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 + Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2 + psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2 := by intro τ hτ have hm0 := distB_nonneg hτ - have hmaj := rho_le_majorant hF hT0 hτ - have e : rho p F τ / gwt p τ = rho p F τ * (1 + distB p τ) ^ 2 := by - unfold gwt; rw [div_inv_eq_mul] - rw [e] - have hmL : distB p τ ≤ τ - p.T := min_le_left _ _ - have hmR : distB p τ ≤ 2 * p.T - τ := min_le_right _ _ - have hmS : 1 + distB p τ ≤ 2 + |p.tau p.d - τ| := by - have := le_abs_self (p.tau p.d - τ); linarith - have hW1 := hW_nonneg (τ - p.T) - have hW2 := hW_nonneg (2 * p.T - τ) + rw [show rho p F τ / gwt p τ = rho p F τ * (1 + distB p τ) ^ 2 by unfold gwt; rw [div_inv_eq_mul]] + have hL : distB p τ ≤ τ - p.T := min_le_left _ _ + have hR : distB p τ ≤ 2 * p.T - τ := min_le_right _ _ have hsqL : (1 + distB p τ) ^ 2 ≤ (1 + (τ - p.T)) ^ 2 := pow_le_pow_left₀ (by linarith) (by linarith) 2 have hsqR : (1 + distB p τ) ^ 2 ≤ (1 + (2 * p.T - τ)) ^ 2 := pow_le_pow_left₀ (by linarith) (by linarith) 2 have hsqS : (1 + distB p τ) ^ 2 ≤ (2 + |p.tau p.d - τ|) ^ 2 := - pow_le_pow_left₀ (by linarith) hmS 2 + pow_le_pow_left₀ (by linarith) (by linarith [le_abs_self (p.tau p.d - τ)]) 2 calc rho p F τ * (1 + distB p τ) ^ 2 ≤ (Wfun cϱ p (τ - p.T) + Wfun cϱ p (2 * p.T - τ) + psiA cϱ p (p.tau p.d - τ) ^ 2) - * (1 + distB p τ) ^ 2 := mul_le_mul_of_nonneg_right hmaj (sq_nonneg _) - _ = Wfun cϱ p (τ - p.T) * (1 + distB p τ) ^ 2 - + Wfun cϱ p (2 * p.T - τ) * (1 + distB p τ) ^ 2 + * (1 + distB p τ) ^ 2 := mul_le_mul_of_nonneg_right (rho_le_majorant hF hT0 hτ) (sq_nonneg _) + _ = Wfun cϱ p (τ - p.T) * (1 + distB p τ) ^ 2 + Wfun cϱ p (2 * p.T - τ) * (1 + distB p τ) ^ 2 + psiA cϱ p (p.tau p.d - τ) ^ 2 * (1 + distB p τ) ^ 2 := by ring - _ ≤ _ := add_le_add (add_le_add (mul_le_mul_of_nonneg_left hsqL hW1) - (mul_le_mul_of_nonneg_left hsqR hW2)) + _ ≤ _ := add_le_add (add_le_add (mul_le_mul_of_nonneg_left hsqL (hW_nonneg _)) + (mul_le_mul_of_nonneg_left hsqR (hW_nonneg _))) (mul_le_mul_of_nonneg_left hsqS (sq_nonneg _)) - -- STEP 2: integrability of the three majorant pieces on I - set I : Set ℝ := Icc p.T (2 * p.T) with hIdef - have hIvol : volume I ≠ ⊤ := hvol _ _ - have hA : IntegrableOn (fun τ => Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2) I := by - have h1 : IntegrableOn (fun τ => Wfun cϱ p (τ - p.T)) I := by - simp only [Wfun] - exact (hF.psi_sq_integrable.comp_sub_right p.T).integrableOn.add - ((hJon _ hIvol (fun τ => τ - p.T) (measurable_id.sub_const _)).const_mul _) - exact h1.mul_continuousOn + have hA : IntegrableOn (fun τ => Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2) I := + (integrableOn_Wfun_comp hF hIvol (measurable_id.sub_const _) + (hF.psi_sq_integrable.comp_sub_right p.T).integrableOn).mul_continuousOn (by fun_prop : Continuous fun τ : ℝ => (1 + (τ - p.T)) ^ 2).continuousOn isCompact_Icc - have hB : IntegrableOn (fun τ => Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2) I := by - have h1 : IntegrableOn (fun τ => Wfun cϱ p (2 * p.T - τ)) I := by - simp only [Wfun] - exact (hF.psi_sq_integrable.comp_sub_left (2 * p.T)).integrableOn.add - ((hJon _ hIvol (fun τ => 2 * p.T - τ) (measurable_const.sub measurable_id)).const_mul _) - exact h1.mul_continuousOn - (by fun_prop : Continuous fun τ : ℝ => (1 + (2 * p.T - τ)) ^ 2).continuousOn - isCompact_Icc - have hC : IntegrableOn - (fun τ => psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2) I := + have hB : IntegrableOn (fun τ => Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2) I := + (integrableOn_Wfun_comp hF hIvol (measurable_const.sub measurable_id) + (hF.psi_sq_integrable.comp_sub_left (2 * p.T)).integrableOn).mul_continuousOn + (by fun_prop : Continuous fun τ : ℝ => (1 + (2 * p.T - τ)) ^ 2).continuousOn isCompact_Icc + have hC : IntegrableOn (fun τ => psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2) I := ((W3 hF).1.comp_sub_left (p.tau p.d)).integrableOn - -- STEP 3: integrate the pointwise bound - have hmono : ∫ τ in I, rho p F τ / gwt p τ - ≤ ∫ τ in I, (Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 - + Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2 - + psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2) := by - refine integral_mono_of_nonneg ?_ ((hA.add hB).add hC) ?_ - · exact ae_restrict_of_forall_mem measurableSet_Icc fun τ hτ => - div_nonneg (rho_nonneg hF τ) (gwt_pos hτ).le - · exact ae_restrict_of_forall_mem measurableSet_Icc hpt - -- STEP 4: the three integrals - -- (C) the stray term + have hAB : IntegrableOn (fun τ => Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 + + Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2) I := hA.add hB + have hABC : IntegrableOn (fun τ => Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 + + Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2 + + psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2) I := hAB.add hC + have hmono := integral_mono_of_nonneg + (ae_restrict_of_forall_mem measurableSet_Icc fun τ hτ => div_nonneg (rho_nonneg hF τ) (gwt_pos hτ).le) + hABC (ae_restrict_of_forall_mem measurableSet_Icc hpt) have hCval : ∫ τ in I, psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2 - ≤ 18 * p.L ^ 2 + 18 * (cϱ / p.w) ^ 2 := by - calc ∫ τ in I, psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2 - ≤ ∫ τ, psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2 := - setIntegral_le_integral ((W3 hF).1.comp_sub_left (p.tau p.d)) - (ae_of_all _ fun τ => by positivity) - _ = ∫ r, psiA cϱ p r ^ 2 * (2 + |r|) ^ 2 := - integral_sub_left_eq_self (fun r => psiA cϱ p r ^ 2 * (2 + |r|) ^ 2) volume (p.tau p.d) - _ ≤ _ := (W3 hF).2 - -- (A),(B): change of variables to ∫_0^T W(u)(1+u)² + ≤ 18 * p.L ^ 2 + 18 * (cϱ / p.w) ^ 2 := + (setIntegral_le_integral ((W3 hF).1.comp_sub_left (p.tau p.d)) (ae_of_all _ fun _ => by positivity)).trans + ((integral_sub_left_eq_self (fun r => psiA cϱ p r ^ 2 * (2 + |r|) ^ 2) volume (p.tau p.d)).trans_le (W3 hF).2) have hT2 : p.T ≤ 2 * p.T := by linarith - have hAval : ∫ τ in I, Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 - = ∫ u in (0:ℝ)..p.T, Wfun cϱ p u * (1 + u) ^ 2 := by + have hAval : ∫ τ in I, Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 = ∫ u in (0:ℝ)..p.T, Wfun cϱ p u * (1 + u) ^ 2 := by rw [hIdef, integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hT2, intervalIntegral.integral_comp_sub_right (fun u => Wfun cϱ p u * (1 + u) ^ 2) p.T, sub_self, show 2 * p.T - p.T = p.T by ring] - have hBval : ∫ τ in I, Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2 - = ∫ u in (0:ℝ)..p.T, Wfun cϱ p u * (1 + u) ^ 2 := by + have hBval : ∫ τ in I, Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2 = ∫ u in (0:ℝ)..p.T, Wfun cϱ p u * (1 + u) ^ 2 := by rw [hIdef, integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hT2, intervalIntegral.integral_comp_sub_left (fun u => Wfun cϱ p u * (1 + u) ^ 2) (2 * p.T), sub_self, show 2 * p.T - p.T = p.T by ring] - -- the main 1-D integral: split at 1 and expand W = ψ² + h⁻¹ J - have hΦ01 := hii zero_le_one (hΦon 0 1) - have hΦ1T := hii hT (hΦon 1 p.T) - have hexpand : ∀ {a b : ℝ}, a ≤ b → - ∫ u in a..b, Wfun cϱ p u * (1 + u) ^ 2 - = (∫ u in a..b, psiA cϱ p u ^ 2 * (1 + u) ^ 2) - + (p.h)⁻¹ * ∫ u in a..b, (∫ r in Set.Ioi u, psiA cϱ p r ^ 2) * (1 + u) ^ 2 := by - intro a b hab - have e : (fun u => Wfun cϱ p u * (1 + u) ^ 2) - = fun u => psiA cϱ p u ^ 2 * (1 + u) ^ 2 - + (p.h)⁻¹ * ((∫ r in Set.Ioi u, psiA cϱ p r ^ 2) * (1 + u) ^ 2) := by - funext u; simp only [Wfun]; ring - rw [e, intervalIntegral.integral_add (hii hab (hP1on a b)) - ((hii hab (hP2on a b)).const_mul _), intervalIntegral.integral_const_mul] - have hmain : ∫ u in (0:ℝ)..p.T, Wfun cϱ p u * (1 + u) ^ 2 - ≤ 4 * p.L ^ 2 + 4 * (cϱ / p.w) ^ 2 - + (p.h)⁻¹ * (32 * p.L + 4 / 3 * (cϱ / p.w) ^ 2 * Real.log p.T) := by - rw [← intervalIntegral.integral_add_adjacent_intervals hΦ01 hΦ1T, - hexpand zero_le_one, hexpand hT] - have h1 := W1a hF - have h2 := W1b hF hT - have h3 := W1c hF - have h4 := W1d hF hT - have hhi : 0 ≤ (p.h)⁻¹ := inv_nonneg.mpr hh.le - nlinarith [mul_le_mul_of_nonneg_left h3 hhi, mul_le_mul_of_nonneg_left h4 hhi] - -- assemble - calc ∫ τ in I, rho p F τ / gwt p τ - ≤ ∫ τ in I, (Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 - + Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2 - + psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2) := hmono - _ = (∫ τ in I, (Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 - + Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2)) - + ∫ τ in I, psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2 := - integral_add (hA.add hB) hC - _ = (∫ τ in I, Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2) + have hadd : ∫ τ in I, (Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2 + + Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2 + + psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2) + = (∫ τ in I, Wfun cϱ p (τ - p.T) * (1 + (τ - p.T)) ^ 2) + (∫ τ in I, Wfun cϱ p (2 * p.T - τ) * (1 + (2 * p.T - τ)) ^ 2) + ∫ τ in I, psiA cϱ p (p.tau p.d - τ) ^ 2 * (2 + |p.tau p.d - τ|) ^ 2 := by - rw [integral_add hA hB] - _ ≤ _ := by rw [hAval, hBval]; linarith [hmain, hCval] + rw [integral_add hAB hC, integral_add hA hB] + linarith [hmono, hadd, hAval, hBval, integral_Wfun_mul_sq_le hF hT, hCval] /-! ### Assembly -/ @@ -721,120 +651,6 @@ theorem calE1_maj_bound : gcongr _ = 4 * (180 + 40 * cϱ ^ 2) * (p.L ^ 3 * B ^ 2 * p.l) := by ring - -/-- **Majorant bound behind 𝓔₁, L-intrinsic form** (no bandwidth cap): -∬_{I×I} majK1(ν) ≤ C·L³B²·(L + l) for T ≥ T₀ (l = log(T/2π) carries the genuine log T). -/ -theorem calE1_maj_bound_L : - ∃ C T₀ : ℝ, ∀ (p : Setting) (F : LocalFun) (B : ℝ) (ν : ℝ → ℝ), T₀ ≤ p.T → - LocalHypsCoreW cϱ p F → Continuous ν → NuBound p B ν → - ∫ q in sqI p, majK1 p F ν q ≤ C * (p.L ^ 3 * B ^ 2 * (p.L + p.l)) := by - refine ⟨4 * (90 + 32 * cϱ ^ 2), (2 * π) ^ 2, fun p F B ν hT hF hνc hν => ?_⟩ - -- regime - have hπ := Real.pi_gt_three - have hT1 : (1:ℝ) ≤ p.T := by nlinarith - have hT0 : (0:ℝ) < p.T := by linarith - have hL8 := hF.eight_le_L - have hL0 := hF.L_pos - have hc4 := hF.four_le_cϱ - have hw1 := hF.one_le_w - have hl1 : (1:ℝ) ≤ p.l := hF.one_le_l - have hlogT : Real.log p.T ≤ 2 * p.l := by - -- log T = l + log(2π) and log(2π) ≤ l since T ≥ (2π)² - have e : Real.log p.T = p.l + Real.log (2 * π) := by - show Real.log p.T = Real.log (p.T / (2 * π)) + Real.log (2 * π) - rw [Real.log_div (by linarith) (by positivity)]; ring - have h2 : Real.log (2 * π) ≤ p.l := by - show Real.log (2 * π) ≤ Real.log (p.T / (2 * π)) - apply Real.log_le_log (by positivity) - rw [le_div_iff₀ (by positivity)]; nlinarith - linarith - have hB0 : 0 ≤ B := by - have := abs_nuX_le_B_onI hν hT0 (τ := p.T) ⟨le_rfl, by linarith⟩ - exact le_trans (abs_nonneg _) this - -- the two 1-D integrals - have hIg := setIntegral_gwt_le (p := p) hT0 - have hR := setIntegral_rho_div_gwt_le hF hν hT1 - set R := ∫ τ in Icc p.T (2 * p.T), rho p F τ / gwt p τ with hRdef - set G := ∫ τ in Icc p.T (2 * p.T), gwt p τ with hGdef - have hG0 : 0 ≤ G := setIntegral_nonneg measurableSet_Icc fun τ hτ => (gwt_pos hτ).le - have hR0 : 0 ≤ R := setIntegral_nonneg measurableSet_Icc fun τ hτ => - div_nonneg (rho_nonneg hF τ) (gwt_pos hτ).le - -- continuity / integrability on the compact square - have hρc : Continuous (rho p F) := by - have := hF.phiHat_cont; unfold rho; fun_prop - have hdistc : Continuous (distB p) := by unfold distB; fun_prop - have hgc : ContinuousOn (gwt p) (Icc p.T (2 * p.T)) := by - unfold gwt - refine ContinuousOn.inv₀ (by fun_prop) fun τ hτ => ?_ - have := distB_nonneg (p := p) hτ; positivity - have hρg : ContinuousOn (fun τ => rho p F τ / gwt p τ) (Icc p.T (2 * p.T)) := - hρc.continuousOn.div hgc fun τ hτ => (gwt_pos hτ).ne' - have hfst : ∀ {f : ℝ → ℝ}, ContinuousOn f (Icc p.T (2 * p.T)) → - ContinuousOn (fun q : ℝ × ℝ => f q.1) (sqI p) := fun hf => - hf.comp continuous_fst.continuousOn fun q hq => hq.1 - have hsnd : ∀ {f : ℝ → ℝ}, ContinuousOn f (Icc p.T (2 * p.T)) → - ContinuousOn (fun q : ℝ × ℝ => f q.2) (sqI p) := fun hf => - hf.comp continuous_snd.continuousOn fun q hq => hq.2 - have hM1c : ContinuousOn (fun q : ℝ × ℝ => rho p F q.1 / gwt p q.1 * gwt p q.2) (sqI p) := - (hfst hρg).mul (hsnd hgc) - have hM2c : ContinuousOn (fun q : ℝ × ℝ => gwt p q.1 * (rho p F q.2 / gwt p q.2)) (sqI p) := - (hfst hgc).mul (hsnd hρg) - have hcpt : IsCompact (sqI p) := isCompact_sqI - have hM1i : IntegrableOn (fun q : ℝ × ℝ => rho p F q.1 / gwt p q.1 * gwt p q.2) (sqI p) := - hM1c.integrableOn_compact hcpt - have hM2i : IntegrableOn (fun q : ℝ × ℝ => gwt p q.1 * (rho p F q.2 / gwt p q.2)) (sqI p) := - hM2c.integrableOn_compact hcpt - have hfi : IntegrableOn (majK1 p F ν) (sqI p) := by - have hνa : ContinuousOn (fun τ => |ν τ|) (Icc p.T (2 * p.T)) := hνc.abs.continuousOn - have hc : ContinuousOn (majK1 p F ν) (sqI p) := by - have := ((hM1c.add hM2c).const_smul (p.L ^ 2)).mul ((hfst hνa).mul (hsnd hνa)) - refine this.congr fun q hq => ?_ - simp only [majK1, Pi.smul_apply, Pi.add_apply, Pi.mul_apply, smul_eq_mul] - exact hc.integrableOn_compact hcpt - -- ∫_{sqI} majK1 ≤ L²B²(RG + GR) - have hmain : ∫ q in sqI p, majK1 p F ν q ≤ p.L ^ 2 * B ^ 2 * (R * G + G * R) := by - have step2 : ∫ q in sqI p, majK1 p F ν q - ≤ ∫ q in sqI p, p.L ^ 2 * B ^ 2 * - (rho p F q.1 / gwt p q.1 * gwt p q.2 + gwt p q.1 * (rho p F q.2 / gwt p q.2)) := by - refine setIntegral_mono_on hfi ((hM1i.add hM2i).const_mul _) measurableSet_sqI - fun q hq => majK1_le hF hν hT0 hq - have step3 : ∫ q in sqI p, p.L ^ 2 * B ^ 2 * - (rho p F q.1 / gwt p q.1 * gwt p q.2 + gwt p q.1 * (rho p F q.2 / gwt p q.2)) - = p.L ^ 2 * B ^ 2 * (R * G + G * R) := by - rw [integral_const_mul, integral_add hM1i hM2i] - congr 1 - unfold sqI - rw [Measure.volume_eq_prod, setIntegral_prod_mul (fun τ => rho p F τ / gwt p τ) (gwt p), - setIntegral_prod_mul (gwt p) (fun τ => rho p F τ / gwt p τ)] - rfl - linarith - -- numerics - have hcw : (cϱ / p.w) ^ 2 ≤ cϱ ^ 2 := by - have : cϱ / p.w ≤ cϱ := div_le_self (by linarith) hw1 - have : 0 ≤ cϱ / p.w := by positivity - nlinarith - have hh : (p.h)⁻¹ = p.L / (2 * π) := by unfold Setting.h; rw [inv_div] - have hhL : (p.h)⁻¹ ≤ p.L := by - rw [hh, div_le_iff₀ (by positivity)]; nlinarith - have hRle : R ≤ (90 + 32 * cϱ ^ 2) * (p.L * (p.L + p.l)) := by - have hlog0 : 0 ≤ Real.log p.T := Real.log_nonneg hT1 - have h1 : (p.h)⁻¹ * (32 * p.L + 4 / 3 * (cϱ / p.w) ^ 2 * Real.log p.T) - ≤ p.L * (32 * p.L + 4 / 3 * cϱ ^ 2 * (2 * p.l)) := by - apply mul_le_mul hhL _ (by positivity) hL0.le - gcongr - set M := p.L * (p.L + p.l) with hM - have hLL : p.L ^ 2 ≤ M := by rw [hM]; nlinarith - have hLl' : p.L * p.l ≤ M := by rw [hM]; nlinarith - have hM1 : 1 ≤ M := by rw [hM]; nlinarith - have hc2 : cϱ ^ 2 ≤ cϱ ^ 2 * M := by nlinarith [sq_nonneg cϱ] - have hc3 : cϱ ^ 2 * (p.L * p.l) ≤ cϱ ^ 2 * M := mul_le_mul_of_nonneg_left hLl' (sq_nonneg _) - nlinarith - calc ∫ q in sqI p, majK1 p F ν q ≤ p.L ^ 2 * B ^ 2 * (R * G + G * R) := hmain - _ = 2 * (p.L ^ 2 * B ^ 2) * (R * G) := by ring - _ ≤ 2 * (p.L ^ 2 * B ^ 2) * ((90 + 32 * cϱ ^ 2) * (p.L * (p.L + p.l)) * 2) := by - gcongr - _ = 4 * (90 + 32 * cϱ ^ 2) * (p.L ^ 3 * B ^ 2 * (p.L + p.l)) := by ring - end Bounds section BoundsCor diff --git a/zeta23/Zeta23/PrimeSideA/EndsE2.lean b/zeta23/Zeta23/PrimeSideA/EndsE2.lean index 2d6fd06e00..f5e9090b0e 100644 --- a/zeta23/Zeta23/PrimeSideA/EndsE2.lean +++ b/zeta23/Zeta23/PrimeSideA/EndsE2.lean @@ -259,7 +259,6 @@ end Assembly section Bounds variable (cϱ lam : ℝ) - /-- **Majorant bound behind 𝓔₂** (§5.3): ∬_{(I×I)ᶜ} L²(Σ_k ψψ')·|ν||ν'| ≤ C·L³B²·l·log l for T ≥ T₀ — the ν-dependence sits in a nonnegative bilinear kernel (Cauchy–Schwarz in χ is pushed inside this). -/ @@ -348,90 +347,6 @@ theorem calE2_maj_bound : * (p.L ^ 3 * B ^ 2 * p.l * Real.log p.l) := by ring -/-- **Majorant bound behind 𝓔₂, L-intrinsic form** (no bandwidth cap; absorbing hypothesis -`L ≤ B`): ∬_{(I×I)ᶜ} majK2(ν) ≤ C·L³B²·(1 + log L)·(L + l) for T ≥ T₀. -/ -theorem calE2_maj_bound_L : - ∃ C T₀ : ℝ, ∀ (p : Setting) (F : LocalFun) (B : ℝ) (ν : ℝ → ℝ), T₀ ≤ p.T → - LocalHypsCoreW cϱ p F → Continuous ν → NuBound p B ν → p.L ≤ B → - ∫ q in (sqI p)ᶜ, majK2 cϱ p ν q - ≤ C * (p.L ^ 3 * B ^ 2 * (1 + Real.log p.L) * (p.L + p.l)) := by - refine ⟨2 * (8 + 4 * max 0 (Real.log cϱ) + 7 * cϱ) * CN2 cϱ, - 2 * π * Real.exp 8, fun p F B ν hT hF hνc hν hBL => ?_⟩ - -- regime - have hπ3 := Real.pi_gt_three - have he8 : (1 : ℝ) ≤ Real.exp 8 := Real.one_le_exp (by norm_num) - have hT8 : 2 * π * Real.exp 8 ≤ p.T := hT - have hT1 : (1 : ℝ) ≤ p.T := by nlinarith - have hT0 : (0 : ℝ) < p.T := by linarith - have hT2π : 2 * π ≤ p.T := by nlinarith - have hl8 : (8 : ℝ) ≤ p.l := Setting.le_l_of_T hT8 - have hl1 : (1 : ℝ) ≤ p.l := by linarith - have hlogl2 : (2 : ℝ) ≤ Real.log p.l := by - rw [Real.le_log_iff_exp_le (by linarith)] - have h1 := Real.exp_one_lt_d9 - calc Real.exp 2 = Real.exp 1 * Real.exp 1 := by rw [← Real.exp_add]; norm_num - _ ≤ 2.7182818286 * 2.7182818286 := by nlinarith [Real.exp_pos 1] - _ ≤ 8 := by norm_num - _ ≤ p.l := hl8 - have hL8 : (8 : ℝ) ≤ p.L := hF.eight_le_L - have hL0 : (0 : ℝ) < p.L := by linarith - have hlogL0 : (0 : ℝ) ≤ Real.log p.L := Real.log_nonneg (by linarith) - have hB1 : (1 : ℝ) ≤ B := by linarith - have hB0 : (0 : ℝ) ≤ B := by linarith - have hw1 : (1 : ℝ) ≤ p.w := hF.one_le_w - have hc4 : (4 : ℝ) ≤ cϱ := hF.four_le_cϱ - have hm0 : (0 : ℝ) ≤ max 0 (Real.log cϱ) := le_max_left _ _ - have hlogl0 : (0 : ℝ) < Real.log p.l := by linarith - -- fold the N1 constant into log L - have hlogbound : Real.log (cϱ * p.L / (4 * p.w)) ≤ max 0 (Real.log cϱ) + Real.log p.L := by - calc Real.log (cϱ * p.L / (4 * p.w)) ≤ Real.log (cϱ * p.L) := by - apply Real.log_le_log (by positivity) - apply div_le_self (by positivity) - linarith - _ = Real.log cϱ + Real.log p.L := Real.log_mul (by positivity) (by positivity) - _ ≤ max 0 (Real.log cϱ) + Real.log p.L := by - have := le_max_right (0 : ℝ) (Real.log cϱ) - linarith - set M1 : ℝ := (2 * (4 + 2 * Real.log (cϱ * p.L / (4 * p.w))) + 7 * cϱ) * B with hM1 - have hM1nn : 0 ≤ M1 := by - rw [hM1] - have hwle := hF.w_le - have hlog4w : (0:ℝ) ≤ Real.log (cϱ * p.L / (4 * p.w)) := by - apply Real.log_nonneg - rw [le_div_iff₀ (by positivity)] - nlinarith - positivity - have hM1fold : M1 ≤ ((8 + 4 * max 0 (Real.log cϱ) + 7 * cϱ) * (1 + Real.log p.L)) * B := by - rw [hM1] - have key : 2 * (4 + 2 * Real.log (cϱ * p.L / (4 * p.w))) + 7 * cϱ - ≤ (8 + 4 * max 0 (Real.log cϱ) + 7 * cϱ) * (1 + Real.log p.L) := by - have h1 : Real.log (cϱ * p.L / (4 * p.w)) ≤ max 0 (Real.log cϱ) + Real.log p.L := hlogbound - nlinarith [mul_nonneg hm0 hlogL0, mul_nonneg (by linarith : (0:ℝ) ≤ cϱ) hlogL0] - exact mul_le_mul_of_nonneg_right key hB0 - -- the 1-D estimates - have hN1 : ∀ a ∈ Icc p.T (2 * p.T), - ∫ τ : ℝ, psiA cϱ p (τ - a) * |ν τ| ≤ M1 := - fun a ha => nu_weight_bound_L hνc hF hν hBL hT1 ha - have hN2 := nu_grid_bound_L hνc hF hν hBL hT8 - have htotal := setIntegral_compl_sqI_majK2_le hνc hF hν hB1 hT1 hM1nn hN1 hN2 - refine htotal.trans ?_ - have hc60 : (0:ℝ) ≤ CN2 cϱ := CN2_nonneg cϱ - have hLl0 : 0 ≤ p.L + p.l := by linarith - have hstep : M1 * (CN2 cϱ * (B * (p.L * (p.L + p.l)))) - ≤ (((8 + 4 * max 0 (Real.log cϱ) + 7 * cϱ) * (1 + Real.log p.L)) * B) - * (CN2 cϱ * (B * (p.L * (p.L + p.l)))) := by - exact mul_le_mul_of_nonneg_right hM1fold (mul_nonneg hc60 (by positivity)) - calc 2 * (p.L ^ 2 * M1 * (CN2 cϱ * (B * (p.L * (p.L + p.l))))) - = 2 * p.L ^ 2 * (M1 * (CN2 cϱ * (B * (p.L * (p.L + p.l))))) := by - ring - _ ≤ 2 * p.L ^ 2 * ((((8 + 4 * max 0 (Real.log cϱ) + 7 * cϱ) * (1 + Real.log p.L)) * B) - * (CN2 cϱ * (B * (p.L * (p.L + p.l))))) := by - refine mul_le_mul_of_nonneg_left hstep (by positivity) - _ = 2 * (8 + 4 * max 0 (Real.log cϱ) + 7 * cϱ) * CN2 cϱ - * (p.L ^ 3 * B ^ 2 * (1 + Real.log p.L) * (p.L + p.l)) := by - ring - - /-- **Bound for E2** (§5.3): |𝓔₂| ≤ C·L³B²·l·log l for T ≥ T₀ (corollary of the majorant bound via |K²νν'| ≤ majK2). -/ theorem calE2_bound : diff --git a/zeta23/Zeta23/PrimeSideA/EndsNu.lean b/zeta23/Zeta23/PrimeSideA/EndsNu.lean index 592d4fb465..3cffc187b5 100644 --- a/zeta23/Zeta23/PrimeSideA/EndsNu.lean +++ b/zeta23/Zeta23/PrimeSideA/EndsNu.lean @@ -201,7 +201,6 @@ theorem nu_weight_bound_L (hνc : Continuous ν) (hF : LocalHypsCoreW cϱ p F) ( ≤ (2 * (4 + 2 * Real.log (cϱ * p.L / (4 * p.w))) + 7 * cϱ) * B := by exact nu_weight_bound_of_L_le_two_B hνc hF hν (by linarith [hF.L_pos]) (by linarith [hF.eight_le_L]) hT ha - /-! ### N2: reduction to the half-line and the majorant -/ /-- change of variables Δ = T − τ on (−∞, T). -/ @@ -299,25 +298,6 @@ def Mfar (cϱ : ℝ) (p : Setting) (B : ℝ) (Δ : ℝ) : ℝ := def Mtot (cϱ : ℝ) (p : Setting) (B : ℝ) (Δ : ℝ) : ℝ := (Ioc 0 (2 * p.T)).indicator (Mnear cϱ p B) Δ + (Ioi (2 * p.T)).indicator (Mfar cϱ p B) Δ -lemma Mnear_nonneg (hF : LocalHypsCoreW cϱ p F) (hB : 0 ≤ B) {Δ : ℝ} (hΔ : 0 < Δ) : 0 ≤ Mnear cϱ p B Δ := by - - have hc : (0:ℝ) ≤ cϱ := by linarith [hF.four_le_cϱ] - have hw : 0 < p.w := by linarith [hF.one_le_w] - have hL := hF.L_pos - have h1 : 0 ≤ ∫ r in Ioi 0, psiA cϱ p r := setIntegral_nonneg measurableSet_Ioi - fun r _ => psiA_nonneg_of hF r - unfold Mnear - have : 0 ≤ min (∫ r in Ioi 0, psiA cϱ p r) (cϱ / (p.w * Δ)) := le_min h1 (by positivity) - have := psiA_nonneg_of hF Δ - positivity - -lemma Mfar_nonneg (hF : LocalHypsCoreW cϱ p F) (hB : 0 ≤ B) (hT : 0 < p.T) {Δ : ℝ} (hΔ : 0 < Δ) : - 0 ≤ Mfar cϱ p B Δ := by - - have hc : (0:ℝ) ≤ cϱ := by linarith [hF.four_le_cϱ] - have hw : 0 < p.w := by linarith [hF.one_le_w] - unfold Mfar; positivity - /-- the product S(Δ)·(ν-bound) against the majorant, near range. -/ lemma Sgrid_mul_le_Mnear (hF : LocalHypsCoreW cϱ p F) {Δ : ℝ} (hΔ : 0 < Δ) {v : ℝ} (hv0 : 0 ≤ v) (hv : v ≤ B) : Sgrid cϱ p Δ * v ≤ Mnear cϱ p B Δ := by @@ -391,7 +371,6 @@ lemma dom_right (hF : LocalHypsCoreW cϱ p F) (hν : NuBound p B ν) (hT : 0 < p have : |τ| ≤ 2 * Δ := by rw [abs_le]; constructor <;> linarith nlinarith [abs_nonneg τ] - /-! ### N2: integrating the majorant -/ lemma Mnear_integrableOn (hF : LocalHypsCoreW cϱ p F) (_hT : 0 < p.T) : diff --git a/zeta23/Zeta23/PrimeSideA/MuMu.lean b/zeta23/Zeta23/PrimeSideA/MuMu.lean index 6f5f8e530f..2e4053427a 100644 --- a/zeta23/Zeta23/PrimeSideA/MuMu.lean +++ b/zeta23/Zeta23/PrimeSideA/MuMu.lean @@ -17,7 +17,6 @@ Paper proof, as implemented here: |∫_{I∖Ix} μ²| ≤ l²·|x| (vol(I∖Ix) = min(|x|,T)); * ∫Φ²|x| ≤ 8 + 8log(cϱL/4w) ≪ log L [eq:psiints] and ∫Φ²x² ≤ 8 + 2(cϱ/w)² = O(1). -/ -import Zeta23.PrimeSideA.Basic import Zeta23.PrimeSideB.PPKernel noncomputable section @@ -36,206 +35,154 @@ section Core variable {p : Setting} {F : LocalFun} -/-- Core scalar estimate: for every x, the inner shear integral differs from `∫_I μ²` by at most -`(1+K) l² |x| + 10 l x²`. -/ -theorem abs_inner_sub_le (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) (hT2 : 2 ≤ p.T) - (hμl : ∀ τ ∈ Icc p.T (2 * p.T), |Zeta23.mu τ| ≤ p.l) - {K : ℝ} (hK0 : 0 ≤ K) - (hKinc : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, - |Zeta23.mu (t + r) - Zeta23.mu t| ≤ (K * |r| + 10 * r ^ 2) / t) +/-- Generic core scalar estimate for any continuous density `u`: for every `x`, the inner shear +integral differs from `∫_I u²` by at most `(A² + A·K₁) |x| + A·K₂ x²`. -/ +theorem abs_inner_sub_le_gen {u : ℝ → ℝ} (hu : Continuous u) (hT2 : 2 ≤ p.T) + {A : ℝ} (hA0 : 0 ≤ A) (hul : ∀ τ ∈ Icc p.T (2 * p.T), |u τ| ≤ A) + {K₁ K₂ : ℝ} (hK₁ : 0 ≤ K₁) (hK₂ : 0 ≤ K₂) + (hKinc : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |u (t + r) - u t| ≤ (K₁ * |r| + K₂ * r ^ 2) / t) (x : ℝ) : - |(∫ τ' in Ix p.T x, Zeta23.mu (x + τ') * Zeta23.mu τ') - - ∫ τ' in Icc p.T (2 * p.T), Zeta23.mu τ' ^ 2| - ≤ (1 + K) * p.l ^ 2 * |x| + 10 * p.l * x ^ 2 := by - have hμc : Continuous Zeta23.mu := hΓ.smooth.continuous + |(∫ τ' in Ix p.T x, u (x + τ') * u τ') - ∫ τ' in Icc p.T (2 * p.T), u τ' ^ 2| + ≤ (A ^ 2 + A * K₁) * |x| + A * K₂ * x ^ 2 := by have hT0 : (0 : ℝ) < p.T := by linarith - have hl1 : 1 ≤ p.l := hF.one_le_l - have hl0 : (0 : ℝ) ≤ p.l := by linarith - have hcnn : 0 ≤ ∫ τ' in Icc p.T (2 * p.T), Zeta23.mu τ' ^ 2 := + have hcnn : 0 ≤ ∫ τ' in Icc p.T (2 * p.T), u τ' ^ 2 := setIntegral_nonneg measurableSet_Icc fun τ' _ => sq_nonneg _ - have hsq_bound : ∀ τ' ∈ Icc p.T (2 * p.T), ‖Zeta23.mu τ' ^ 2‖ ≤ p.l ^ 2 := by + have hsq_bound : ∀ τ' ∈ Icc p.T (2 * p.T), ‖u τ' ^ 2‖ ≤ A ^ 2 := by intro τ' hτ' - have h := hμl τ' hτ' + have h := hul τ' hτ' rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] - nlinarith [abs_nonneg (Zeta23.mu τ'), sq_abs (Zeta23.mu τ')] - have hcle : ∫ τ' in Icc p.T (2 * p.T), Zeta23.mu τ' ^ 2 ≤ p.l ^ 2 * p.T := by + nlinarith [abs_nonneg (u τ'), sq_abs (u τ')] + have hcle : ∫ τ' in Icc p.T (2 * p.T), u τ' ^ 2 ≤ A ^ 2 * p.T := by have h := norm_setIntegral_le_of_norm_le_const (μ := volume) (s := Icc p.T (2 * p.T)) - (f := fun τ' => Zeta23.mu τ' ^ 2) - (by rw [Real.volume_Icc]; exact ENNReal.ofReal_lt_top) hsq_bound + (f := fun τ' => u τ' ^ 2) (by rw [Real.volume_Icc]; exact ENNReal.ofReal_lt_top) hsq_bound rw [Real.norm_eq_abs, abs_of_nonneg hcnn, measureReal_def, Real.volume_Icc, ENNReal.toReal_ofReal (by linarith), show 2 * p.T - p.T = p.T by ring] at h exact h rcases le_or_gt |x| p.T with hx | hx - · -- |x| ≤ T - have hIle : max (p.T - x) p.T ≤ min (2 * p.T - x) (2 * p.T) := Ix_le hT0.le hx - have hlen : min (2 * p.T - x) (2 * p.T) - max (p.T - x) p.T = p.T - |x| := - Ix_length + · have hIle : max (p.T - x) p.T ≤ min (2 * p.T - x) (2 * p.T) := Ix_le hT0.le hx + have hlen : min (2 * p.T - x) (2 * p.T) - max (p.T - x) p.T = p.T - |x| := Ix_length have hIxI : Ix p.T x ⊆ Icc p.T (2 * p.T) := fun τ' hτ' => (mem_Ix.mp hτ').2 have hIxcompact : IsCompact (Ix p.T x) := by unfold Ix; exact isCompact_Icc have hIxmeas : MeasurableSet (Ix p.T x) := measurableSet_Ix p.T x have hIxfin : volume (Ix p.T x) ≠ ⊤ := by unfold Ix; rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top have hIxvol : (volume : Measure ℝ).real (Ix p.T x) = p.T - |x| := by - unfold Ix - rw [measureReal_def, Real.volume_Icc, ENNReal.toReal_ofReal (by linarith)] - linarith - have hIxInt1 : IntegrableOn (fun τ' => Zeta23.mu (x + τ') * Zeta23.mu τ') (Ix p.T x) := + unfold Ix; rw [measureReal_def, Real.volume_Icc, ENNReal.toReal_ofReal (by linarith)]; linarith + have hIxInt1 : IntegrableOn (fun τ' => u (x + τ') * u τ') (Ix p.T x) := ContinuousOn.integrableOn_compact hIxcompact (by fun_prop) - have hIxInt2 : IntegrableOn (fun τ' => Zeta23.mu τ' ^ 2) (Ix p.T x) := + have hIxInt2 : IntegrableOn (fun τ' => u τ' ^ 2) (Ix p.T x) := ContinuousOn.integrableOn_compact hIxcompact (by fun_prop) - have hIInt2 : IntegrableOn (fun τ' => Zeta23.mu τ' ^ 2) (Icc p.T (2 * p.T)) := + have hIInt2 : IntegrableOn (fun τ' => u τ' ^ 2) (Icc p.T (2 * p.T)) := ContinuousOn.integrableOn_compact isCompact_Icc (by fun_prop) - -- Lipschitz piece - have hlip : |(∫ τ' in Ix p.T x, Zeta23.mu (x + τ') * Zeta23.mu τ') - - ∫ τ' in Ix p.T x, Zeta23.mu τ' ^ 2| ≤ p.l * (K * |x| + 10 * x ^ 2) := by + have hlip : |(∫ τ' in Ix p.T x, u (x + τ') * u τ') - ∫ τ' in Ix p.T x, u τ' ^ 2| + ≤ A * (K₁ * |x| + K₂ * x ^ 2) := by rw [← integral_sub hIxInt1 hIxInt2] have hb : ∀ τ' ∈ Ix p.T x, - ‖Zeta23.mu (x + τ') * Zeta23.mu τ' - Zeta23.mu τ' ^ 2‖ - ≤ (K * |x| + 10 * x ^ 2) / p.T * p.l := by + ‖u (x + τ') * u τ' - u τ' ^ 2‖ ≤ (K₁ * |x| + K₂ * x ^ 2) / p.T * A := by intro τ' hτ' obtain ⟨_, hmem2⟩ := mem_Ix.mp hτ' - have hτT : p.T ≤ τ' := hmem2.1 - have h2τ : 2 ≤ τ' := by linarith - have hinc := hKinc τ' h2τ x + have hinc := hKinc τ' (by linarith [hmem2.1]) x rw [show τ' + x = x + τ' by ring] at hinc - have hμτ : |Zeta23.mu τ'| ≤ p.l := hμl τ' hmem2 - have hq : (K * |x| + 10 * x ^ 2) / τ' ≤ (K * |x| + 10 * x ^ 2) / p.T := by - gcongr - calc ‖Zeta23.mu (x + τ') * Zeta23.mu τ' - Zeta23.mu τ' ^ 2‖ - = |Zeta23.mu (x + τ') - Zeta23.mu τ'| * |Zeta23.mu τ'| := by + have hq : (K₁ * |x| + K₂ * x ^ 2) / τ' ≤ (K₁ * |x| + K₂ * x ^ 2) / p.T := by + gcongr; exact hmem2.1 + calc ‖u (x + τ') * u τ' - u τ' ^ 2‖ = |u (x + τ') - u τ'| * |u τ'| := by rw [Real.norm_eq_abs, ← abs_mul]; congr 1; ring - _ ≤ (K * |x| + 10 * x ^ 2) / p.T * p.l := - mul_le_mul (hinc.trans hq) hμτ (abs_nonneg _) (by positivity) + _ ≤ (K₁ * |x| + K₂ * x ^ 2) / p.T * A := + mul_le_mul (hinc.trans hq) (hul τ' hmem2) (abs_nonneg _) (by positivity) have h := norm_setIntegral_le_of_norm_le_const (μ := volume) (s := Ix p.T x) - (f := fun τ' => Zeta23.mu (x + τ') * Zeta23.mu τ' - Zeta23.mu τ' ^ 2) - (lt_of_le_of_ne (le_top) hIxfin) hb + (f := fun τ' => u (x + τ') * u τ' - u τ' ^ 2) (lt_of_le_of_ne le_top hIxfin) hb rw [Real.norm_eq_abs, hIxvol] at h refine h.trans ?_ - have hfrac : (p.T - |x|) / p.T ≤ 1 := by - rw [div_le_one hT0]; linarith [abs_nonneg x] - have hnum : (0 : ℝ) ≤ K * |x| + 10 * x ^ 2 := by positivity - calc (K * |x| + 10 * x ^ 2) / p.T * p.l * (p.T - |x|) - = p.l * (K * |x| + 10 * x ^ 2) * ((p.T - |x|) / p.T) := by ring - _ ≤ p.l * (K * |x| + 10 * x ^ 2) * 1 := by - have : (0 : ℝ) ≤ p.l * (K * |x| + 10 * x ^ 2) := by positivity - exact mul_le_mul_of_nonneg_left hfrac this - _ = p.l * (K * |x| + 10 * x ^ 2) := mul_one _ - -- completion piece - have hcomp : |(∫ τ' in Ix p.T x, Zeta23.mu τ' ^ 2) - - ∫ τ' in Icc p.T (2 * p.T), Zeta23.mu τ' ^ 2| ≤ p.l ^ 2 * |x| := by + have hfrac : (p.T - |x|) / p.T ≤ 1 := by rw [div_le_one hT0]; linarith [abs_nonneg x] + calc (K₁ * |x| + K₂ * x ^ 2) / p.T * A * (p.T - |x|) + = A * (K₁ * |x| + K₂ * x ^ 2) * ((p.T - |x|) / p.T) := by ring + _ ≤ A * (K₁ * |x| + K₂ * x ^ 2) * 1 := mul_le_mul_of_nonneg_left hfrac (by positivity) + _ = A * (K₁ * |x| + K₂ * x ^ 2) := mul_one _ + have hcomp : |(∫ τ' in Ix p.T x, u τ' ^ 2) - ∫ τ' in Icc p.T (2 * p.T), u τ' ^ 2| + ≤ A ^ 2 * |x| := by rw [abs_sub_comm, ← setIntegral_sdiff hIxmeas hIInt2 hIxI] have hdvol : (volume : Measure ℝ).real (Icc p.T (2 * p.T) \ Ix p.T x) = |x| := by have hsub : volume (Icc p.T (2 * p.T) \ Ix p.T x) = volume (Icc p.T (2 * p.T)) - volume (Ix p.T x) := measure_sdiff hIxI hIxmeas.nullMeasurableSet hIxfin - rw [measureReal_def, hsub] - unfold Ix + rw [measureReal_def, hsub]; unfold Ix rw [Real.volume_Icc, Real.volume_Icc, ← ENNReal.ofReal_sub _ (by linarith : (0 : ℝ) ≤ min (2 * p.T - x) (2 * p.T) - max (p.T - x) p.T), ENNReal.toReal_ofReal (by linarith [abs_nonneg x])] linarith - have hb : ∀ τ' ∈ Icc p.T (2 * p.T) \ Ix p.T x, ‖Zeta23.mu τ' ^ 2‖ ≤ p.l ^ 2 := - fun τ' hτ' => hsq_bound τ' hτ'.1 have h := norm_setIntegral_le_of_norm_le_const (μ := volume) - (s := Icc p.T (2 * p.T) \ Ix p.T x) (f := fun τ' => Zeta23.mu τ' ^ 2) + (s := Icc p.T (2 * p.T) \ Ix p.T x) (f := fun τ' => u τ' ^ 2) (lt_of_le_of_lt (measure_mono Set.sdiff_subset) - (by rw [Real.volume_Icc]; exact ENNReal.ofReal_lt_top)) hb - rw [Real.norm_eq_abs, hdvol] at h - exact h - refine (abs_sub_le _ (∫ τ' in Ix p.T x, Zeta23.mu τ' ^ 2) _).trans ?_ - refine (add_le_add hlip hcomp).trans ?_ - nlinarith [abs_nonneg x, sq_nonneg x, - mul_nonneg (mul_nonneg hK0 hl0) (abs_nonneg x), - mul_nonneg (mul_nonneg hK0 (mul_nonneg hl0 hl0)) (abs_nonneg x)] - · -- |x| > T: the window is empty, the main term itself is ≤ l²T ≤ l²|x| - rw [Ix_eq_empty hT0.le hx, Measure.restrict_empty, integral_zero_measure, zero_sub, + (by rw [Real.volume_Icc]; exact ENNReal.ofReal_lt_top)) + (fun τ' hτ' => hsq_bound τ' hτ'.1) + rwa [Real.norm_eq_abs, hdvol] at h + refine (abs_sub_le _ (∫ τ' in Ix p.T x, u τ' ^ 2) _).trans ?_ + nlinarith [hlip, hcomp] + · rw [Ix_eq_empty hT0.le hx, Measure.restrict_empty, integral_zero_measure, zero_sub, abs_neg, abs_of_nonneg hcnn] refine hcle.trans ?_ - nlinarith [mul_nonneg (sq_nonneg p.l) (by linarith : (0 : ℝ) ≤ |x| - p.T), - mul_nonneg (mul_nonneg hK0 (sq_nonneg p.l)) (abs_nonneg x), - mul_nonneg (mul_nonneg (by norm_num : (0 : ℝ) ≤ 10) hl0) (sq_nonneg x)] - -/-- **Core estimate of [prop:mumu]** at fixed (p, F), error in terms of the two Φ-integrals. -/ -theorem mumu_core (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) (hT2 : 2 ≤ p.T) - (hμl : ∀ τ ∈ Icc p.T (2 * p.T), |Zeta23.mu τ| ≤ p.l) - {K : ℝ} (hK0 : 0 ≤ K) - (hKinc : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, - |Zeta23.mu (t + r) - Zeta23.mu t| ≤ (K * |r| + 10 * r ^ 2) / t) : - |Mform F.Phi p.T Zeta23.mu Zeta23.mu - - 2 * π * F.b * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ ^ 2| - ≤ (1 + K) * p.l ^ 2 * (∫ x, F.Phi x ^ 2 * |x|) - + 10 * p.l * ∫ x, F.Phi x ^ 2 * x ^ 2 := by - have hμc : Continuous Zeta23.mu := hΓ.smooth.continuous + nlinarith [mul_nonneg (sq_nonneg A) (by linarith : (0 : ℝ) ≤ |x| - p.T), + mul_nonneg (mul_nonneg hA0 hK₁) (abs_nonneg x), + mul_nonneg (mul_nonneg hA0 hK₂) (sq_nonneg x)] + +/-- Generic core estimate of `[prop:mumu]` at fixed `(p, F)` for any continuous density `u`. -/ +theorem mumu_core_gen {u : ℝ → ℝ} (hu : Continuous u) (hF : LocalHypsCore cϱ p F) (hT2 : 2 ≤ p.T) + {A : ℝ} (hA0 : 0 ≤ A) (hul : ∀ τ ∈ Icc p.T (2 * p.T), |u τ| ≤ A) + {K₁ K₂ : ℝ} (hK₁ : 0 ≤ K₁) (hK₂ : 0 ≤ K₂) + (hKinc : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |u (t + r) - u t| ≤ (K₁ * |r| + K₂ * r ^ 2) / t) : + |Mform F.Phi p.T u u - 2 * π * F.b * p.L * ∫ τ in p.T..(2 * p.T), u τ ^ 2| + ≤ (A ^ 2 + A * K₁) * (∫ x, F.Phi x ^ 2 * |x|) + A * K₂ * ∫ x, F.Phi x ^ 2 * x ^ 2 := by have hΦc : Continuous F.Phi := hF.Phi_contDiff.continuous - have hGc : Continuous fun q : ℝ × ℝ => Zeta23.mu q.1 * Zeta23.mu q.2 := by fun_prop - set c : ℝ := ∫ τ' in Icc p.T (2 * p.T), Zeta23.mu τ' ^ 2 with hc - have hc' : ∫ τ in p.T..(2 * p.T), Zeta23.mu τ ^ 2 = c := by + have hGc : Continuous fun q : ℝ × ℝ => u q.1 * u q.2 := by fun_prop + set c : ℝ := ∫ τ' in Icc p.T (2 * p.T), u τ' ^ 2 with hc + have hc' : ∫ τ in p.T..(2 * p.T), u τ ^ 2 = c := by rw [intervalIntegral.integral_of_le (by linarith), hc, integral_Icc_eq_integral_Ioc] - have hshear : Mform F.Phi p.T Zeta23.mu Zeta23.mu - = ∫ x, F.Phi x ^ 2 * ∫ τ' in Ix p.T x, Zeta23.mu (x + τ') * Zeta23.mu τ' := by - unfold Mform - simp only [mul_assoc] - exact sqIntegral_shear hΦc hGc - have hfInt : Integrable (fun x => F.Phi x ^ 2 * ∫ τ' in Ix p.T x, - Zeta23.mu (x + τ') * Zeta23.mu τ') := integrable_sq_mul_inner hΦc hGc + have hshear : Mform F.Phi p.T u u = ∫ x, F.Phi x ^ 2 * ∫ τ' in Ix p.T x, u (x + τ') * u τ' := by + unfold Mform; simp only [mul_assoc]; exact sqIntegral_shear hΦc hGc + have hfInt : Integrable (fun x => F.Phi x ^ 2 * ∫ τ' in Ix p.T x, u (x + τ') * u τ') := + integrable_sq_mul_inner hΦc hGc have hgInt : Integrable (fun x => F.Phi x ^ 2 * c) := hF.Phi_sq_integrable.mul_const c have hmain : 2 * π * F.b * p.L * c = ∫ x, F.Phi x ^ 2 * c := by rw [integral_mul_const c (fun x => F.Phi x ^ 2), hF.Phi_sq_integral] rw [hc', hshear, hmain, ← integral_sub hfInt hgInt] - have hpt : ∀ x : ℝ, |F.Phi x ^ 2 * (∫ τ' in Ix p.T x, Zeta23.mu (x + τ') * Zeta23.mu τ') - - F.Phi x ^ 2 * c| - ≤ (1 + K) * p.l ^ 2 * (F.Phi x ^ 2 * |x|) + 10 * p.l * (F.Phi x ^ 2 * x ^ 2) := by + have hpt : ∀ x : ℝ, |F.Phi x ^ 2 * (∫ τ' in Ix p.T x, u (x + τ') * u τ') - F.Phi x ^ 2 * c| + ≤ (A ^ 2 + A * K₁) * (F.Phi x ^ 2 * |x|) + A * K₂ * (F.Phi x ^ 2 * x ^ 2) := by intro x rw [← mul_sub, abs_mul, abs_of_nonneg (sq_nonneg (F.Phi x))] - have hinner := abs_inner_sub_le hΓ hF hT2 hμl hK0 hKinc x + have hinner := abs_inner_sub_le_gen hu hT2 hA0 hul hK₁ hK₂ hKinc x rw [← hc] at hinner - calc F.Phi x ^ 2 * |(∫ τ' in Ix p.T x, Zeta23.mu (x + τ') * Zeta23.mu τ') - c| - ≤ F.Phi x ^ 2 * ((1 + K) * p.l ^ 2 * |x| + 10 * p.l * x ^ 2) := by - gcongr - _ = (1 + K) * p.l ^ 2 * (F.Phi x ^ 2 * |x|) + 10 * p.l * (F.Phi x ^ 2 * x ^ 2) := by ring - calc |∫ x, (F.Phi x ^ 2 * (∫ τ' in Ix p.T x, Zeta23.mu (x + τ') * Zeta23.mu τ') - - F.Phi x ^ 2 * c)| - ≤ ∫ x, |F.Phi x ^ 2 * (∫ τ' in Ix p.T x, Zeta23.mu (x + τ') * Zeta23.mu τ') - - F.Phi x ^ 2 * c| := by + calc F.Phi x ^ 2 * |(∫ τ' in Ix p.T x, u (x + τ') * u τ') - c| + ≤ F.Phi x ^ 2 * ((A ^ 2 + A * K₁) * |x| + A * K₂ * x ^ 2) := by gcongr + _ = (A ^ 2 + A * K₁) * (F.Phi x ^ 2 * |x|) + A * K₂ * (F.Phi x ^ 2 * x ^ 2) := by ring + calc |∫ x, (F.Phi x ^ 2 * (∫ τ' in Ix p.T x, u (x + τ') * u τ') - F.Phi x ^ 2 * c)| + ≤ ∫ x, |F.Phi x ^ 2 * (∫ τ' in Ix p.T x, u (x + τ') * u τ') - F.Phi x ^ 2 * c| := by rw [← Real.norm_eq_abs] - refine (norm_integral_le_integral_norm _).trans (le_of_eq ?_) - simp_rw [Real.norm_eq_abs] - _ ≤ ∫ x, ((1 + K) * p.l ^ 2 * (F.Phi x ^ 2 * |x|) + 10 * p.l * (F.Phi x ^ 2 * x ^ 2)) := + exact (norm_integral_le_integral_norm _).trans (le_of_eq (by simp_rw [Real.norm_eq_abs])) + _ ≤ ∫ x, ((A ^ 2 + A * K₁) * (F.Phi x ^ 2 * |x|) + A * K₂ * (F.Phi x ^ 2 * x ^ 2)) := integral_mono (hfInt.sub hgInt).abs ((hF.Phi_sq_mul_abs_integrable.const_mul _).add (hF.Phi_sq_mul_sq_integrable.const_mul _)) hpt - _ = (1 + K) * p.l ^ 2 * (∫ x, F.Phi x ^ 2 * |x|) - + 10 * p.l * ∫ x, F.Phi x ^ 2 * x ^ 2 := by + _ = (A ^ 2 + A * K₁) * (∫ x, F.Phi x ^ 2 * |x|) + A * K₂ * ∫ x, F.Phi x ^ 2 * x ^ 2 := by rw [integral_add (hF.Phi_sq_mul_abs_integrable.const_mul _) - (hF.Phi_sq_mul_sq_integrable.const_mul _), - integral_const_mul, integral_const_mul] - -end Core - -/-! ## [prop:mumu] -/ - -variable (cϱ lam : ℝ) - -set_option linter.unusedVariables false in -/-- **[prop:mumu]** (§5.4): `𝓜[μ,μ] = 2πbL ∫_T^{2T} μ² + O(l² log L)`. -(`hcheb`/`hlam` are unused here but kept so that the statement matches the fixed interface -shared with the other prime-side propositions.) -/ -theorem prop_mumu (hΓ : Zeta23.GammaFacts) (hcheb : Zeta23.ChebyshevMertens) - (hlam : 0 < lam ∧ lam ≤ 1) : + (hF.Phi_sq_mul_sq_integrable.const_mul _), integral_const_mul, integral_const_mul] + +/-- Generic `[prop:mumu]` for any continuous density `u` with window bound `|u| ≤ Ca · l` and +increment bound `|u(t+r) - u(t)| ≤ (K₁|r| + K₂ r²)/t`. -/ +theorem prop_mumu_gen (cϱ lam : ℝ) {u : ℝ → ℝ} (hu : Continuous u) + {Ca T₀a : ℝ} (hCa0 : 0 ≤ Ca) + (hT₀a : ∀ p : Setting, T₀a ≤ p.T → ∀ τ ∈ Icc p.T (2 * p.T), |u τ| ≤ Ca * p.l) + {K₁ K₂ : ℝ} (hK₁ : 0 ≤ K₁) (hK₂ : 0 ≤ K₂) + (hKinc : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |u (t + r) - u t| ≤ (K₁ * |r| + K₂ * r ^ 2) / t) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => - |Mform F.Phi p.T Zeta23.mu Zeta23.mu - - 2 * π * F.b * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ ^ 2| + |Mform F.Phi p.T u u - 2 * π * F.b * p.L * ∫ τ in p.T..(2 * p.T), u τ ^ 2| ≤ C * (p.l ^ 2 * Real.log p.L)) := by - obtain ⟨K, hK0, hKinc⟩ := mu_increment_bound hΓ - obtain ⟨T₀μ, hT₀μ⟩ := mu_abs_le_l hΓ - refine ⟨(1 + K) * (12 + 4 * max 0 (Real.log cϱ)) + 5 * (8 + 2 * cϱ ^ 2), - max T₀μ 2, fun p F hplam hT hF => ?_⟩ + refine ⟨(Ca ^ 2 + Ca * K₁) * (12 + 4 * max 0 (Real.log cϱ)) + (Ca * K₂ / 2) * (8 + 2 * cϱ ^ 2), + max T₀a 2, fun p F _ hT hF => ?_⟩ have hT2 : 2 ≤ p.T := le_trans (le_max_right _ _) hT - have hμl := hT₀μ p (le_trans (le_max_left _ _) hT) - have hcore := mumu_core hΓ hF hT2 hμl hK0 hKinc - have hI1 := hF.integral_Phi_sq_mul_abs_le - have hI2 := hF.integral_Phi_sq_mul_sq_le + have hl1 : 1 ≤ p.l := hF.one_le_l + have hA0 : 0 ≤ Ca * p.l := by positivity + have hcore := mumu_core_gen hu hF hT2 hA0 (hT₀a p (le_trans (le_max_left _ _) hT)) hK₁ hK₂ hKinc have hL8 : 8 ≤ p.L := hF.eight_le_L have hlog2 : 2 ≤ Real.log p.L := by rw [Real.le_log_iff_exp_le (by linarith)] @@ -244,47 +191,60 @@ theorem prop_mumu (hΓ : Zeta23.GammaFacts) (hcheb : Zeta23.ChebyshevMertens) _ ≤ 2.7182818286 * 2.7182818286 := by nlinarith [Real.exp_pos 1] _ ≤ 8 := by norm_num _ ≤ p.L := hL8 - have hlogpos : 0 < Real.log p.L := by linarith have hcϱ4 : 4 ≤ cϱ := hF.four_le_cϱ have hw1 : 1 ≤ p.w := hF.one_le_w - have hl1 : 1 ≤ p.l := hF.one_le_l have hm0 : 0 ≤ max 0 (Real.log cϱ) := le_max_left _ _ have hlogbound : Real.log (cϱ * p.L / (4 * p.w)) ≤ max 0 (Real.log cϱ) + Real.log p.L := by - calc Real.log (cϱ * p.L / (4 * p.w)) ≤ Real.log (cϱ * p.L) := by - apply Real.log_le_log (by positivity) - apply div_le_self (by positivity) - linarith + calc Real.log (cϱ * p.L / (4 * p.w)) ≤ Real.log (cϱ * p.L) := + Real.log_le_log (by positivity) (div_le_self (by positivity) (by linarith)) _ = Real.log cϱ + Real.log p.L := Real.log_mul (by positivity) (by positivity) - _ ≤ max 0 (Real.log cϱ) + Real.log p.L := by - have := le_max_right (0 : ℝ) (Real.log cϱ) - linarith + _ ≤ max 0 (Real.log cϱ) + Real.log p.L := by linarith [le_max_right (0 : ℝ) (Real.log cϱ)] have hA : ∫ x, F.Phi x ^ 2 * |x| ≤ (12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L := by - refine hI1.trans ?_ - have h8 : 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) - ≤ 8 + 8 * (max 0 (Real.log cϱ) + Real.log p.L) := by linarith - refine h8.trans ?_ + refine hF.integral_Phi_sq_mul_abs_le.trans ?_ nlinarith [mul_nonneg hm0 (by linarith : (0 : ℝ) ≤ Real.log p.L - 2)] have hB : ∫ x, F.Phi x ^ 2 * x ^ 2 ≤ 8 + 2 * cϱ ^ 2 := by - refine hI2.trans ?_ + refine hF.integral_Phi_sq_mul_sq_le.trans ?_ have hdiv : cϱ / p.w ≤ cϱ := div_le_self (by linarith) hw1 have hdivnn : 0 ≤ cϱ / p.w := by positivity nlinarith have hI1nn : 0 ≤ ∫ x, F.Phi x ^ 2 * |x| := integral_nonneg fun x => by positivity have hI2nn : 0 ≤ ∫ x, F.Phi x ^ 2 * x ^ 2 := integral_nonneg fun x => by positivity - refine hcore.trans ?_ - have hstep : (1 + K) * p.l ^ 2 * (∫ x, F.Phi x ^ 2 * |x|) - + 10 * p.l * ∫ x, F.Phi x ^ 2 * x ^ 2 - ≤ (1 + K) * p.l ^ 2 * ((12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L) - + 10 * p.l * (8 + 2 * cϱ ^ 2) := by - gcongr - refine hstep.trans ?_ + have h1 : (Ca * p.l) ^ 2 + Ca * p.l * K₁ ≤ (Ca ^ 2 + Ca * K₁) * p.l ^ 2 := by + nlinarith [mul_nonneg (mul_nonneg hCa0 hK₁) (show (0 : ℝ) ≤ p.l ^ 2 - p.l by nlinarith)] have hlt : (0 : ℝ) ≤ p.l * Real.log p.L - 2 := by nlinarith [mul_nonneg (by linarith : (0 : ℝ) ≤ p.l - 1) (by linarith : (0 : ℝ) ≤ Real.log p.L)] - have h82 : (0 : ℝ) ≤ 8 + 2 * cϱ ^ 2 := by positivity - have hfin : 10 * p.l * (8 + 2 * cϱ ^ 2) - ≤ 5 * (8 + 2 * cϱ ^ 2) * (p.l ^ 2 * Real.log p.L) := by - nlinarith [mul_nonneg (mul_nonneg (by linarith : (0 : ℝ) ≤ p.l) h82) hlt] - nlinarith [hfin] + have h2 : Ca * p.l * K₂ * (8 + 2 * cϱ ^ 2) + ≤ (Ca * K₂ / 2) * (8 + 2 * cϱ ^ 2) * (p.l ^ 2 * Real.log p.L) := by + have h82 : (0 : ℝ) ≤ 8 + 2 * cϱ ^ 2 := by positivity + have hck : (0 : ℝ) ≤ Ca * K₂ / 2 := by positivity + nlinarith [mul_nonneg (mul_nonneg (mul_nonneg hck (by linarith : (0 : ℝ) ≤ p.l)) h82) hlt] + refine hcore.trans ?_ + calc ((Ca * p.l) ^ 2 + Ca * p.l * K₁) * (∫ x, F.Phi x ^ 2 * |x|) + + Ca * p.l * K₂ * ∫ x, F.Phi x ^ 2 * x ^ 2 + ≤ ((Ca ^ 2 + Ca * K₁) * p.l ^ 2) * ((12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L) + + Ca * p.l * K₂ * (8 + 2 * cϱ ^ 2) := by + refine add_le_add (mul_le_mul h1 hA hI1nn (by positivity)) + (mul_le_mul_of_nonneg_left hB (by positivity)) + _ ≤ _ := by linarith + +end Core + +/-! ## [prop:mumu] -/ + +variable (cϱ lam : ℝ) + +set_option linter.unusedVariables false in +/-- **[prop:mumu]** (§5.4): `𝓜[μ,μ] = 2πbL ∫_T^{2T} μ² + O(l² log L)`. -/ +theorem prop_mumu (hΓ : Zeta23.GammaFacts) (hcheb : Zeta23.ChebyshevMertens) + (hlam : 0 < lam ∧ lam ≤ 1) : + ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => + |Mform F.Phi p.T Zeta23.mu Zeta23.mu + - 2 * π * F.b * p.L * ∫ τ in p.T..(2 * p.T), Zeta23.mu τ ^ 2| + ≤ C * (p.l ^ 2 * Real.log p.L)) := by + obtain ⟨K, hK0, hKinc⟩ := mu_increment_bound hΓ + obtain ⟨T₀μ, hT₀μ⟩ := mu_abs_le_l hΓ + exact prop_mumu_gen cϱ lam hΓ.smooth.continuous zero_le_one + (fun p hT τ hτ => by simpa using hT₀μ p hT τ hτ) hK0 (by norm_num) hKinc end PrimeSide end Zeta23 diff --git a/zeta23/Zeta23/PrimeSideB.lean b/zeta23/Zeta23/PrimeSideB.lean index 562865ec22..db705e513f 100644 --- a/zeta23/Zeta23/PrimeSideB.lean +++ b/zeta23/Zeta23/PrimeSideB.lean @@ -49,26 +49,6 @@ lemma isBigO {f g : ℝ → ℝ} (h : EvBound f g) : f =O[atTop] g := by rw [Real.norm_eq_abs, Real.norm_eq_abs] exact (hT T hT').trans (mul_le_mul_of_nonneg_left (le_abs_self _) hC.le) -/-- From `IsBigO` back to the explicit form, when the majorant is eventually nonnegative. -/ -lemma of_isBigO {f g : ℝ → ℝ} (h : f =O[atTop] g) (hg : ∀ᶠ T in atTop, 0 ≤ g T) : - EvBound f g := by - obtain ⟨C, hC, h⟩ := h.exists_pos - rw [IsBigOWith] at h - obtain ⟨T₀, hT₀⟩ := eventually_atTop.mp (h.and hg) - refine ⟨C, hC, T₀, fun T hT => ?_⟩ - obtain ⟨h1, h2⟩ := hT₀ T hT - simpa [Real.norm_eq_abs, abs_of_nonneg h2] using h1 - -lemma iff_isBigO {f g : ℝ → ℝ} (hg : ∀ᶠ T in atTop, 0 ≤ g T) : - EvBound f g ↔ f =O[atTop] g := ⟨isBigO, fun h => of_isBigO h hg⟩ - -lemma mono_right {f g g' : ℝ → ℝ} (h : EvBound f g) (hgg' : ∀ᶠ T in atTop, g T ≤ g' T) : - EvBound f g' := by - obtain ⟨C, hC, T₀, hT⟩ := h - obtain ⟨T₁, hT₁⟩ := eventually_atTop.mp hgg' - refine ⟨C, hC, max T₀ T₁, fun T hT' => (hT T (le_of_max_le_left hT')).trans ?_⟩ - exact mul_le_mul_of_nonneg_left (hT₁ T (le_of_max_le_right hT')) hC.le - /-- Weaken the majorant up to a constant: if `g ≤ c·g'` eventually then `EvBound f g → EvBound f g'`. -/ lemma mono_right' {f g g' : ℝ → ℝ} (h : EvBound f g) {c : ℝ} (hc : 0 < c) (hgg' : ∀ᶠ T in atTop, g T ≤ c * g' T) : EvBound f g' := by @@ -128,11 +108,8 @@ lemma of_abs_le {f f' g : ℝ → ℝ} (h : EvBound f g) (h' : ∀ᶠ T in atTop lemma congr_left {f f' g : ℝ → ℝ} (h : EvBound f g) (h' : ∀ᶠ T in atTop, f' T = f T) : EvBound f' g := h.of_abs_le (h'.mono fun T hT => by rw [hT]) -/-- The majorant of an `EvBound` is eventually nonnegative. -/ -lemma majorant_nonneg {f g : ℝ → ℝ} (h : EvBound f g) : ∀ᶠ T in atTop, 0 ≤ g T := by - obtain ⟨C, hC, h⟩ := h.eventually_le - filter_upwards [h] with T hT - exact (mul_nonneg_iff_of_pos_left hC).mp ((abs_nonneg _).trans hT) +lemma zero {g : ℝ → ℝ} (hg : ∀ᶠ T in atTop, 0 ≤ g T) : EvBound (fun _ => 0) g := + of_eventually_le one_pos (hg.mono fun _ h => by simpa using h) end EvBound @@ -154,9 +131,6 @@ lemma two_log_two_sub_one_pos : 0 < 2 * Real.log 2 - 1 := by lemma l_lt_ell1 (T : ℝ) : l T < ell1 T := by rw [ell1_eq]; linarith [two_log_two_sub_one_pos] -lemma ell1_tendsto_atTop : Tendsto ell1 atTop atTop := - tendsto_atTop_mono (fun T => (l_lt_ell1 T).le) l_tendsto_atTop - variable (P : Params) lemma X_pos (T : ℝ) : 0 < P.X T := Real.exp_pos _ @@ -352,86 +326,210 @@ structure Data (P : Params) where variable {P : Params} (D : Data P) -/-- Hypotheses of the [thm:traces] assembly = conclusions of the §5 sub-results and of the -classical inputs, on the abstract data `D`. Paper labels in each field's docstring. -/ -structure Facts : Prop where +/-- Generic base hypotheses of the `[thm:traces]` assembly over an arbitrary density log `ell1f ≥ l` +and remainder scales `(errTrace, errEnds, errPP, errMuP, errPPi)` (extended by flat-top `FactsG`, +window-general `ThmD.FactsDG`, and `XiPrime.FactsXi`). -/ +structure TraceFactsSpec (ell1f errTrace errEnds errPP errMuP errPPi : ℝ → ℝ) (D : Data P) : Prop where lam_pos : 0 < P.lam lam_le_one : P.lam ≤ 1 one_le_w : 1 ≤ P.w - /-- [eq:abdef]: `1 − 2w/L ≤ b ≤ a ≤ 1` (for `T` large, so that `w ≤ L/8`). -/ - abdef : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ D.bT T ∧ D.bT T ≤ D.aT T ∧ D.aT T ≤ 1 - /-- [eq:RvM] (H-RvM): `N(T,2T) = T ℓ₁/2π + O(l)`. -/ - rvm : EvBound (fun T => D.Ncnt T - T * ell1 T / (2 * π)) l - /-- [eq:muints], second formula (from H-Γ): `∫_T^{2T} μ² = (T ℓ₁²/4π²)(1 + O(l⁻²))`. -/ - muints2 : EvBound (fun T => D.intMu2 T - T * ell1 T ^ 2 / (4 * π ^ 2)) - (fun T => T * ell1 T ^ 2 / (4 * π ^ 2) / l T ^ 2) - /-- [prop:trace]: `tr G̃ = a L N(T,2T) + O(L √X)`. -/ - prop_trace : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.L T * Real.sqrt (P.X T)) - /-- [lem:ends]: `tr G̃² = 𝓜 + O(L l log l (l² + X))`. -/ - lem_ends : EvBound (fun T => D.trG2 T - D.Mtot T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) - /-- [eq:Msplit]: bilinear expansion of `𝓜 = 𝓜[ν_X, ν_X]`, `ν_X = μ + Π_X + P_X`. -/ + /-- `l T ≤ ell1f T` eventually (`ell1` for `ζ`, `ell1q q` for `L(s, χ)`). -/ + ell1_ge : ∀ᶠ T in atTop, l T ≤ ell1f T + /-- [eq:RvM] (H-RvM): `N(T,2T) = T ell1f/2π + O(l)`. -/ + rvm : EvBound (fun T => D.Ncnt T - T * ell1f T / (2 * π)) l + /-- [eq:muints], second formula (from H-Γ): `∫_T^{2T} μ² = (T ell1f²/4π²)(1 + O(l⁻²))`. -/ + muints2 : EvBound (fun T => D.intMu2 T - T * ell1f T ^ 2 / (4 * π ^ 2)) + (fun T => T * ell1f T ^ 2 / (4 * π ^ 2) / l T ^ 2) + /-- [prop:trace]: `tr G̃ = a L N(T,2T) + O(errTrace)`. -/ + prop_trace : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) errTrace + /-- [lem:ends]: `tr G̃² = 𝓜 + O(errEnds)`. -/ + lem_ends : EvBound (fun T => D.trG2 T - D.Mtot T) errEnds + /-- [eq:Msplit]: bilinear expansion of `𝓜 = 𝓜[ν_X, ν_X]`. -/ Msplit : ∀ᶠ T in atTop, D.Mtot T = D.Mmumu T + D.MPP T + 2 * D.MmuP T + 2 * D.MmuPi T + 2 * D.MPPi T + D.MPiPi T /-- [prop:mumu], first form: `𝓜[μ,μ] = 2π b L ∫_T^{2T} μ² + O(l² log L)`. -/ prop_mumu : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) (fun T => l T ^ 2 * Real.log (P.L T)) - /-- [prop:PP] (this file, §3), first form: - `𝓜[P_X,P_X] = (T/π) Σ_{n≤X} Λ(n)²/n g(log n) + O(L² X)`. -/ - prop_PP : EvBound (fun T => D.MPP T - T / π * D.sumL2g T) (fun T => P.L T ^ 2 * P.X T) - /-- [prop:PP] (this file, §3), sandwich lower half: `Σ a_n² g(y_n) ≥ (L−2w)³/6 − O(L²)`. -/ - sum_lower : EvBound (fun T => min (D.sumL2g T - (P.L T - 2 * P.w) ^ 3 / 6) 0) - (fun T => P.L T ^ 2) - /-- sandwich upper half: `Σ a_n² g(y_n) ≤ L³/6 + O(L²)`. -/ - sum_upper : EvBound (fun T => max (D.sumL2g T - P.L T ^ 3 / 6) 0) (fun T => P.L T ^ 2) - /-- [prop:cross]: `𝓜[μ,P_X] ≪ l √X`. -/ - cross_muP : EvBound D.MmuP (fun T => l T * Real.sqrt (P.X T)) + /-- [prop:PP], first form: `𝓜[P_X,P_X] = (T/π) Σ a_n² g(log n) + O(errPP)`. -/ + prop_PP : EvBound (fun T => D.MPP T - T / π * D.sumL2g T) errPP + /-- [prop:cross]: `𝓜[μ,P_X] ≪ errMuP`. -/ + cross_muP : EvBound D.MmuP errMuP /-- [prop:cross]: `𝓜[μ,Π_X] ≪ l L √X`. -/ cross_muPi : EvBound D.MmuPi (fun T => l T * P.L T * Real.sqrt (P.X T)) - /-- [prop:cross]: `𝓜[P_X,Π_X] ≪ L X`. -/ - cross_PPi : EvBound D.MPPi (fun T => P.L T * P.X T) + /-- [prop:cross]: `𝓜[P_X,Π_X] ≪ errPPi`. -/ + cross_PPi : EvBound D.MPPi errPPi /-- [prop:cross]: `𝓜[Π_X,Π_X] ≪ L X / T`. -/ cross_PiPi : EvBound D.MPiPi (fun T => P.L T * P.X T / T) -/-! ### The assembly -/ - -section assembly -variable {D} (h : Facts D) -include h - -/-- [eq:tr1], first equality — this is [prop:trace] verbatim. -/ -theorem tr1 : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.L T * Real.sqrt (P.X T)) := h.prop_trace +/-- Standard-error base hypotheses of `[thm:traces]` for `ζ` and `L(s, χ)`. -/ +abbrev TraceFactsBase (ell1f : ℝ → ℝ) (D : Data P) : Prop := + TraceFactsSpec ell1f + (fun T => P.L T * Real.sqrt (P.X T)) + (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) + (fun T => P.L T ^ 2 * P.X T) + (fun T => l T * Real.sqrt (P.X T)) + (fun T => P.L T * P.X T) D + +/-- Flat-top `[thm:traces]` hypotheses over an arbitrary density log `ell1f ≥ l` +(instantiated at `ell1` for `ζ` and `ell1q q` for `L(s, χ)`). -/ +structure FactsG (ell1f : ℝ → ℝ) (D : Data P) : Prop extends toTraceFactsBase : TraceFactsBase ell1f D where + /-- [eq:abdef]: `1 − 2w/L ≤ b ≤ a ≤ 1`. -/ + abdef : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ D.bT T ∧ D.bT T ≤ D.aT T ∧ D.aT T ≤ 1 + /-- [prop:PP] sandwich lower half: `Σ a_n² g(y_n) ≥ (L−2w)³/6 − O(L²)`. -/ + sum_lower : EvBound (fun T => min (D.sumL2g T - (P.L T - 2 * P.w) ^ 3 / 6) 0) + (fun T => P.L T ^ 2) + /-- sandwich upper half: `Σ a_n² g(y_n) ≤ L³/6 + O(L²)`. -/ + sum_upper : EvBound (fun T => max (D.sumL2g T - P.L T ^ 3 / 6) 0) (fun T => P.L T ^ 2) -/-- From [eq:RvM]: eventually `T l /(4π) ≤ N(T,2T)` (and hence `N > 0`). -/ -lemma Ncnt_lower : ∀ᶠ T in atTop, T * l T / (4 * π) ≤ D.Ncnt T := by - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le - filter_upwards [hN, eventually_ge_atTop (4 * π * A), eventually_l_ge 0] with T hN hTA hl +/-- The `ζ`-instance of `FactsG` (`ell1f = ell1`). -/ +abbrev Facts (D : Data P) : Prop := FactsG ell1 D + +/-- From `N − Tℓ/(2π) = O(l)` and `l ≤ ℓ` eventually: `T l/(4π) ≤ N`. -/ +lemma Ncnt_lower_of {Ncnt ℓ : ℝ → ℝ} + (hrvm : EvBound (fun T => Ncnt T - T * ℓ T / (2 * π)) l) + (hℓ : ∀ᶠ T in atTop, l T ≤ ℓ T) : + ∀ᶠ T in atTop, T * l T / (4 * π) ≤ Ncnt T := by + obtain ⟨A, hA, hN⟩ := hrvm.eventually_le + filter_upwards [hN, eventually_ge_atTop (4 * π * A), eventually_l_ge 0, hℓ] + with T hN hTA hl hle have hπ := Real.pi_pos - have h1 : -(A * l T) ≤ D.Ncnt T - T * ell1 T / (2 * π) := (abs_le.mp hN).1 - have h2 : T * l T ≤ T * ell1 T := mul_le_mul_of_nonneg_left (l_le_ell1 T) (by nlinarith) - have h3 : T * l T / (2 * π) ≤ T * ell1 T / (2 * π) := div_le_div_of_nonneg_right h2 (by positivity) + have h1 : -(A * l T) ≤ Ncnt T - T * ℓ T / (2 * π) := (abs_le.mp hN).1 + have h2 : T * l T ≤ T * ℓ T := mul_le_mul_of_nonneg_left hle (by nlinarith) + have h3 : T * l T / (2 * π) ≤ T * ℓ T / (2 * π) := + div_le_div_of_nonneg_right h2 (by positivity) have h4 : T * l T / (4 * π) = T * l T / (2 * π) - T * l T / (4 * π) := by ring have h5 : A * l T ≤ T * l T / (4 * π) := by rw [le_div_iff₀ (by positivity)]; nlinarith linarith -/-- eventually `T ≤ 4π N(T,2T)`. -/ -lemma T_le_Ncnt : ∀ᶠ T in atTop, T ≤ 4 * π * D.Ncnt T := by - filter_upwards [Ncnt_lower h, eventually_l_ge 1, eventually_ge_atTop 0] with T hN hl hT +/-- From `T l/(4π) ≤ N` eventually: `T ≤ 4π N`. -/ +lemma T_le_Ncnt_of {Ncnt : ℝ → ℝ} + (hN : ∀ᶠ T in atTop, T * l T / (4 * π) ≤ Ncnt T) : + ∀ᶠ T in atTop, T ≤ 4 * π * Ncnt T := by + filter_upwards [hN, eventually_l_ge 1, eventually_ge_atTop 0] with T hN hl hT have hπ := Real.pi_pos - have : T * l T ≤ 4 * π * D.Ncnt T := by rw [div_le_iff₀ (by positivity)] at hN; linarith + have : T * l T ≤ 4 * π * Ncnt T := by rw [div_le_iff₀ (by positivity)] at hN; linarith nlinarith -lemma Ncnt_pos : ∀ᶠ T in atTop, 0 < D.Ncnt T := by - filter_upwards [Ncnt_lower h, eventually_l_ge 1, eventually_ge_atTop 1] with T hN hl hT +/-- From `T l/(4π) ≤ N` eventually: `0 < N`. -/ +lemma Ncnt_pos_of {Ncnt : ℝ → ℝ} + (hN : ∀ᶠ T in atTop, T * l T / (4 * π) ≤ Ncnt T) : + ∀ᶠ T in atTop, 0 < Ncnt T := by + filter_upwards [hN, eventually_l_ge 1, eventually_ge_atTop 1] with T hN hl hT have hπ := Real.pi_pos - exact lt_of_lt_of_le (by positivity) (le_trans (by gcongr : T * 1 / (4 * π) ≤ _) hN) - |> fun h => by simpa using h + have h0 : (0:ℝ) < T * l T / (4 * π) := by positivity + linarith + +/-- Common height regime: `T,l,log l,L,X ≥ 1`, `L ≤ l`, `X ≤ T`. -/ +lemma regime_of (P : Params) (hlam : 0 < P.lam) (hle : P.lam ≤ 1) : + ∀ᶠ T in atTop, 1 ≤ T ∧ 1 ≤ l T ∧ 1 ≤ Real.log (l T) ∧ 1 ≤ P.L T ∧ 1 ≤ P.X T ∧ + P.L T ≤ l T ∧ P.X T ≤ T := by + filter_upwards [eventually_ge_atTop 1, eventually_l_ge 1, eventually_log_l_ge 1, + eventually_L_ge P hlam 1, eventually_one_le_X P hlam, eventually_X_le_T P hlam hle] + with T h1 h2 h3 h4 h5 h6 + exact ⟨h1, h2, h3, h4, h5, L_le_l P hle (by linarith), h6⟩ + +/-! ### The assembly -/ + +section assemblyBase +variable {ell1f errTrace errEnds errPP errMuP errPPi : ℝ → ℝ} {D : Data P} +variable (h : TraceFactsSpec ell1f errTrace errEnds errPP errMuP errPPi D) +include h + +/-- From [eq:RvM]: eventually `T l /(4π) ≤ N(T,2T)` (and hence `N > 0`). -/ +lemma TraceFactsSpec.Ncnt_lower : ∀ᶠ T in atTop, T * l T / (4 * π) ≤ D.Ncnt T := + Ncnt_lower_of h.rvm h.ell1_ge + +/-- eventually `T ≤ 4π N(T,2T)`. -/ +lemma TraceFactsSpec.T_le_Ncnt : ∀ᶠ T in atTop, T ≤ 4 * π * D.Ncnt T := + T_le_Ncnt_of h.Ncnt_lower + +lemma TraceFactsSpec.Ncnt_pos : ∀ᶠ T in atTop, 0 < D.Ncnt T := + Ncnt_pos_of h.Ncnt_lower + +/-- The common regime `T ≥ 1, l ≥ 1, log l ≥ 1, L ≥ 1, X ≥ 1, L ≤ l, X ≤ T` (eventually). -/ +lemma TraceFactsSpec.regime : ∀ᶠ T in atTop, 1 ≤ T ∧ 1 ≤ l T ∧ 1 ≤ Real.log (l T) ∧ 1 ≤ P.L T ∧ + 1 ≤ P.X T ∧ P.L T ≤ l T ∧ P.X T ≤ T := + regime_of P h.lam_pos h.lam_le_one + +/-- Generic combination of the bilinear `Msplit` remainders into `O(errEnds)`. -/ +theorem TraceFactsSpec.tr2_first_of + (dom : ∀ᶠ T in atTop, + l T ^ 2 * Real.log (P.L T) ≤ 1 * errEnds T ∧ + errPP T ≤ 1 * errEnds T ∧ + errMuP T ≤ 1 * errEnds T ∧ + l T * P.L T * Real.sqrt (P.X T) ≤ 1 * errEnds T ∧ + errPPi T ≤ 1 * errEnds T ∧ + P.L T * P.X T / T ≤ 1 * errEnds T) : + EvBound (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumL2g T)) + errEnds := by + have e3 := h.prop_mumu.mono_right' one_pos (dom.mono fun _ h => h.1) + have e4 := h.prop_PP.mono_right' one_pos (dom.mono fun _ h => h.2.1) + have e5 := h.cross_muP.mono_right' one_pos (dom.mono fun _ h => h.2.2.1) + have e6 := h.cross_muPi.mono_right' one_pos (dom.mono fun _ h => h.2.2.2.1) + have e7 := h.cross_PPi.mono_right' one_pos (dom.mono fun _ h => h.2.2.2.2.1) + have e8 := h.cross_PiPi.mono_right' one_pos (dom.mono fun _ h => h.2.2.2.2.2) + have S := h.lem_ends.add (e3.add (e4.add (((e5.const_mul 2).add (e6.const_mul 2)).add + ((e7.const_mul 2).add e8)))) + refine S.congr_left ?_ + filter_upwards [h.Msplit] with T hM + rw [hM]; ring + +end assemblyBase + +/-- Shared 6-way dominance helper for `tr2_first` (used in `PrimeSideB` and `XiPrime/PrimeSide/Traces`). -/ +lemma tr2_dom_of {T lT L X errPP errMuP errPPi R : ℝ} + (hT : 1 ≤ T) (hl : 1 ≤ lT) (hL : 1 ≤ L) (hX : 1 ≤ X) (hLl : L ≤ lT) + (h1 : lT ^ 2 * Real.log lT ≤ R) (h2 : L * lT * X ≤ R) + (hPP : errPP ≤ R) (hMuP : errMuP ≤ R) (hPPi : errPPi ≤ R) : + lT ^ 2 * Real.log L ≤ 1 * R ∧ errPP ≤ 1 * R ∧ errMuP ≤ 1 * R ∧ + lT * L * Real.sqrt X ≤ 1 * R ∧ errPPi ≤ 1 * R ∧ L * X / T ≤ 1 * R := by + have hlogL : Real.log L ≤ Real.log lT := Real.log_le_log (by linarith) hLl + have hsX : Real.sqrt X ≤ X := by rw [Real.sqrt_le_left (by linarith)]; nlinarith + have hLX : L * X ≤ L * lT * X := by calc L * X = L * 1 * X := by ring + _ ≤ L * lT * X := by gcongr + rw [one_mul] + exact ⟨(mul_le_mul_of_nonneg_left hlogL (sq_nonneg _)).trans h1, hPP, hMuP, + le_trans (show lT * L * Real.sqrt X ≤ L * lT * X by + calc lT * L * Real.sqrt X ≤ lT * L * X := by gcongr + _ = L * lT * X := by ring) h2, + hPPi, ((div_le_self (by positivity) hT).trans hLX).trans h2⟩ + +/-- [eq:tr2], first form (shared by flat-top `FactsG` and window-general `ThmD.FactsDG`): + `tr G̃² = 2π b L ∫_T^{2T} μ² + (T/π) Σ a_n² g(log n) + O(L l log l (l²+X))`. -/ +theorem TraceFactsSpec.tr2_first {ell1f : ℝ → ℝ} {D : Data P} (h : TraceFactsBase ell1f D) : + EvBound + (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumL2g T)) + (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by + refine h.tr2_first_of ?_ + filter_upwards [h.regime] with T ⟨hT, hl, hlog, hL, hX, hLl, _⟩ + have hsX : Real.sqrt (P.X T) ≤ P.X T := by rw [Real.sqrt_le_left (by linarith)]; nlinarith + have h2 : P.L T * l T * P.X T ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by + calc P.L T * l T * P.X T = P.L T * l T * 1 * (0 + P.X T) := by ring + _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith + exact tr2_dom_of hT hl hL hX hLl + (by calc l T ^ 2 * Real.log (l T) = 1 * l T * Real.log (l T) * l T := by ring + _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith) + h2 + (le_trans (show P.L T ^ 2 * P.X T ≤ P.L T * l T * P.X T by + calc P.L T ^ 2 * P.X T = P.L T * P.L T * P.X T := by ring + _ ≤ P.L T * l T * P.X T := by gcongr) h2) + (le_trans (show l T * Real.sqrt (P.X T) ≤ P.L T * l T * P.X T by + calc l T * Real.sqrt (P.X T) = 1 * l T * Real.sqrt (P.X T) := by ring + _ ≤ P.L T * l T * P.X T := by gcongr) h2) + (le_trans (show P.L T * P.X T ≤ P.L T * l T * P.X T by + calc P.L T * P.X T = P.L T * 1 * P.X T := by ring + _ ≤ P.L T * l T * P.X T := by gcongr) h2) + +section assembly +variable {ell1f : ℝ → ℝ} {D} (h : FactsG ell1f D) +include h + +/-- [eq:tr1], first equality — this is [prop:trace] verbatim. -/ +theorem tr1 : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) + (fun T => P.L T * Real.sqrt (P.X T)) := h.prop_trace -/-- [eq:tr1], second equality: `tr G̃ = L N(T,2T)(1 + O(𝓔_T))`. - Paper: from `1 − 2w/L ≤ a ≤ 1`, `L N ≫ L T l` and `√X ≤ T^{λ/2}`. -/ +/-- [eq:tr1], second equality: `tr G̃ = L N(T,2T)(1 + O(𝓔_T))`. -/ theorem tr1' : EvBound (fun T => D.trG T - P.L T * D.Ncnt T) (fun T => P.calE T * (P.L T * D.Ncnt T)) := by obtain ⟨C₁, hC₁, h1⟩ := h.prop_trace.eventually_le @@ -439,7 +537,7 @@ theorem tr1' : EvBound (fun T => D.trG T - P.L T * D.Ncnt T) have hw : 0 ≤ P.w := by linarith [h.one_le_w] refine EvBound.of_eventually_le (c := 4 * π * C₁ + 2) (by positivity) ?_ filter_upwards [h1, h.abdef, calE_ge_w_div_L hlam hw, calE_ge_rpow hlam hw, - calE_nonneg_eventually hlam hw, T_le_Ncnt h, Ncnt_pos h, eventually_ge_atTop 1, + calE_nonneg_eventually hlam hw, h.T_le_Ncnt, h.Ncnt_pos, eventually_ge_atTop 1, eventually_L_ge P hlam 1] with T h1 hab hEw hEr hE0 hTN hN0 hT1 hL1 obtain ⟨hb1, hba, ha1⟩ := hab have hT0 : 0 < T := by linarith @@ -448,7 +546,6 @@ theorem tr1' : EvBound (fun T => D.trG T - P.L T * D.Ncnt T) set L := P.L T set E := P.calE T have hLN : 0 ≤ L * N := mul_nonneg hL0 hN0.le - -- the taper discrepancy (1 - a) L N ≤ (2w/L) L N ≤ 2 E L N have hA : |D.aT T * L * N - L * N| ≤ 2 * E * (L * N) := by have : D.aT T * L * N - L * N = -((1 - D.aT T) * (L * N)) := by ring rw [this, abs_neg, abs_of_nonneg (mul_nonneg (by linarith) hLN)] @@ -456,7 +553,6 @@ theorem tr1' : EvBound (fun T => D.trG T - P.L T * D.Ncnt T) have : 2 * P.w / L = 2 * (P.w / L) := by ring linarith exact mul_le_mul_of_nonneg_right h2 hLN - -- the √X term: C₁ L √X ≤ C₁ L T^{λ/2} = C₁ L T^{λ/2-1} T ≤ C₁ L E (4π N) have hB : C₁ * (L * Real.sqrt (P.X T)) ≤ 4 * π * C₁ * (E * (L * N)) := by have hs : Real.sqrt (P.X T) ≤ T ^ (P.lam / 2 - 1) * T := by rw [rpow_half_sub_one_mul hT0]; exact sqrt_X_le_rpow P hlam hT0 @@ -471,87 +567,20 @@ theorem tr1' : EvBound (fun T => D.trG T - P.L T * D.Ncnt T) _ ≤ 4 * π * C₁ * (E * (L * N)) + 2 * E * (L * N) := by linarith _ = (4 * π * C₁ + 2) * (E * (L * N)) := by ring -/-- The common regime `T ≥ 1, l ≥ 1, log l ≥ 1, L ≥ 1, X ≥ 1, L ≤ l, X ≤ T` (eventually). -/ -lemma regime : ∀ᶠ T in atTop, 1 ≤ T ∧ 1 ≤ l T ∧ 1 ≤ Real.log (l T) ∧ 1 ≤ P.L T ∧ 1 ≤ P.X T ∧ - P.L T ≤ l T ∧ P.X T ≤ T := by - have hlam := h.lam_pos - filter_upwards [eventually_ge_atTop 1, eventually_l_ge 1, eventually_log_l_ge 1, - eventually_L_ge P hlam 1, eventually_one_le_X P hlam, eventually_X_le_T P hlam h.lam_le_one] - with T h1 h2 h3 h4 h5 h6 - exact ⟨h1, h2, h3, h4, h5, L_le_l P h.lam_le_one (by linarith), h6⟩ - -/-- [eq:tr2], first form: - `tr G̃² = 2π b L ∫_T^{2T} μ² + (T/π) Σ Λ(n)²/n g(log n) + O(L l log l (l²+X))`. -/ -theorem tr2_first : EvBound - (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumL2g T)) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - -- every secondary error term is ≤ R := L l log l (l² + X) in the regime - have e3 : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.prop_mumu.mono_right' one_pos ?_ - filter_upwards [regime h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - have hlogL : Real.log (P.L T) ≤ Real.log (l T) := Real.log_le_log (by linarith) hLl - have hlogL0 : 0 ≤ Real.log (P.L T) := Real.log_nonneg hL - calc l T ^ 2 * Real.log (P.L T) ≤ l T ^ 2 * Real.log (l T) := by gcongr - _ = 1 * l T * Real.log (l T) * l T := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = _ := (one_mul _).symm - have e4 : EvBound (fun T => D.MPP T - T / π * D.sumL2g T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.prop_PP.mono_right' one_pos ?_ - filter_upwards [regime h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - calc P.L T ^ 2 * P.X T = P.L T * P.L T * 1 * P.X T := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have hsqrtX : ∀ᶠ T in atTop, Real.sqrt (P.X T) ≤ P.X T := by - filter_upwards [regime h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - rw [Real.sqrt_le_left (by linarith)]; nlinarith - have e5 : EvBound D.MmuP (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_muP.mono_right' one_pos ?_ - filter_upwards [regime h, hsqrtX] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ hs - calc l T * Real.sqrt (P.X T) ≤ l T * P.X T := by gcongr - _ = 1 * l T * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = _ := (one_mul _).symm - have e6 : EvBound D.MmuPi (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_muPi.mono_right' one_pos ?_ - filter_upwards [regime h, hsqrtX] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ hs - calc l T * P.L T * Real.sqrt (P.X T) ≤ l T * P.L T * P.X T := by gcongr - _ = P.L T * l T * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = _ := (one_mul _).symm - have e7 : EvBound D.MPPi (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_PPi.mono_right' one_pos ?_ - filter_upwards [regime h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - calc P.L T * P.X T = P.L T * 1 * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = _ := (one_mul _).symm - have e8 : EvBound D.MPiPi (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_PiPi.mono_right' one_pos ?_ - filter_upwards [regime h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - calc P.L T * P.X T / T ≤ P.L T * P.X T := div_le_self (by nlinarith) hT - _ = P.L T * 1 * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = _ := (one_mul _).symm - have S := h.lem_ends.add (e3.add (e4.add (((e5.const_mul 2).add (e6.const_mul 2)).add - ((e7.const_mul 2).add e8)))) - refine S.congr_left ?_ - filter_upwards [h.Msplit] with T hM - rw [hM]; ring - omit h in -/-- The pointwise inequality behind [eq:tr2] (second form), with every quantity a real variable: -all analytic content is in the hypotheses, and the constants `ℓ₁² + L²/3` are checked here. -/ -lemma tr2_pointwise (T L ℓ lT X E S I2 b G2 w CR Cμ Cu Cl : ℝ) +/-- Generic pointwise core behind `[eq:tr2]` and `[eq:ratio-general]`: given `κ > 0` with +`T L ℓ²/(2πκ) ≤ M₂`, bounds `|G2 − (b·TLℓ²/(2π) + T/π·S0)|` by `(2πκ CR + κ Cμ + 2κ CS)·E·M₂`. -/ +lemma tr2_pointwise_of (T L ℓ lT X E S S0 I2 b M₂ G2 w κ CR Cμ CS : ℝ) (hT : 1 ≤ T) (hL : 1 ≤ L) (hl : 1 ≤ lT) (hlog : 1 ≤ Real.log lT) (hX : 1 ≤ X) - (hℓl : lT ≤ ℓ) (hLl : L ≤ lT) (hw : 1 ≤ w) (hL2w : 2 * w ≤ L) (hb1 : 1 - 2 * w / L ≤ b) (hble1 : b ≤ 1) + (hℓl : lT ≤ ℓ) (hLl : L ≤ lT) (hw : 1 ≤ w) (hκ : 0 < κ) (hb0 : 0 ≤ b) (hble1 : b ≤ 1) + (hMa : T * L * ℓ ^ 2 / (2 * π * κ) ≤ M₂) (hE0 : 0 ≤ E) (hEw : w / L ≤ E) (hEmid : (lT ^ 2 + X) * Real.log lT / (T * lT) ≤ E) - (hCR : 0 ≤ CR) (hCμ : 0 ≤ Cμ) (hCu : 0 ≤ Cu) (hCl : 0 ≤ Cl) + (hCR : 0 ≤ CR) (hCμ : 0 ≤ Cμ) (hCS : 0 ≤ CS) (hR : |G2 - (2 * π * b * L * I2 + T / π * S)| ≤ CR * (L * lT * Real.log lT * (lT ^ 2 + X))) (hμ : |I2 - T * ℓ ^ 2 / (4 * π ^ 2)| ≤ Cμ * (T * ℓ ^ 2 / (4 * π ^ 2) / lT ^ 2)) - (hSup : S - L ^ 3 / 6 ≤ Cu * L ^ 2) (hSlo : -(Cl * L ^ 2) ≤ S - (L - 2 * w) ^ 3 / 6) : - |G2 - T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3)| - ≤ (2 * π * CR + Cμ + 2 + 6 * (Cu + Cl + 2 * w)) * (E * (T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3))) := by + (hS : |S - S0| ≤ CS * L ^ 2) : + |G2 - (b * (T * L * ℓ ^ 2 / (2 * π)) + T / π * S0)| + ≤ (2 * π * κ * CR + κ * Cμ + 2 * κ * CS) * (E * M₂) := by have hπ : 0 < π := Real.pi_pos have hT0 : 0 < T := by linarith have hL0 : 0 < L := by linarith @@ -559,20 +588,7 @@ lemma tr2_pointwise (T L ℓ lT X E S I2 b G2 w CR Cμ Cu Cl : ℝ) have hℓ0 : 0 < ℓ := by linarith have hlog0 : 0 ≤ Real.log lT := by linarith have hX0 : 0 ≤ X := by linarith - have hw0 : 0 ≤ w := by linarith - have hb0 : 0 ≤ b := by - have : 2 * w / L ≤ 1 := by rw [div_le_one hL0]; linarith only [hL2w] - linarith only [this, hb1] - -- the main term and its two lower bounds - set M₂ := T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3) with hM₂def - have hM : M₂ = T * L * ℓ ^ 2 / (2 * π) + T * L ^ 3 / (6 * π) := by rw [hM₂def]; ring - have hMa : T * L * ℓ ^ 2 / (2 * π) ≤ M₂ := by - rw [hM]; linarith only [show 0 ≤ T * L ^ 3 / (6 * π) by positivity] - have hMb : T * L ^ 3 / (6 * π) ≤ M₂ := by - rw [hM]; linarith only [show 0 ≤ T * L * ℓ ^ 2 / (2 * π) by positivity] - have hM0 : 0 ≤ M₂ := le_trans (by positivity) hMb - have hEM0 : 0 ≤ E * M₂ := mul_nonneg hE0 hM0 - -- 1/L ≤ E and 1/l² ≤ E + have hM0 : 0 ≤ M₂ := le_trans (by positivity) hMa have hE_L : 1 / L ≤ E := le_trans (by gcongr) hEw have hE_l2 : 1 / lT ^ 2 ≤ E := by refine le_trans ?_ hE_L @@ -581,11 +597,11 @@ lemma tr2_pointwise (T L ℓ lT X E S I2 b G2 w CR Cμ Cu Cl : ℝ) _ = lT * 1 := (mul_one _).symm _ ≤ lT * lT := by gcongr _ = lT ^ 2 := (sq lT).symm - -- Piece A: R ≤ 2π E M₂ - have hA : L * lT * Real.log lT * (lT ^ 2 + X) ≤ 2 * π * (E * M₂) := by - have h1 : (lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (2 * π)) ≤ E * M₂ := + -- Piece A: R ≤ 2πκ E M₂ + have hA : L * lT * Real.log lT * (lT ^ 2 + X) ≤ 2 * π * κ * (E * M₂) := by + have h1 : (lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (2 * π * κ)) ≤ E * M₂ := mul_le_mul hEmid hMa (by positivity) hE0 - have h2 : 2 * π * ((lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (2 * π))) + have h2 : 2 * π * κ * ((lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (2 * π * κ))) = L * Real.log lT * (lT ^ 2 + X) * ℓ ^ 2 / lT := by field_simp have h3 : L * lT * Real.log lT * (lT ^ 2 + X) ≤ L * Real.log lT * (lT ^ 2 + X) * ℓ ^ 2 / lT := by @@ -597,23 +613,68 @@ lemma tr2_pointwise (T L ℓ lT X E S I2 b G2 w CR Cμ Cu Cl : ℝ) _ ≤ L * Real.log lT * (lT ^ 2 + X) * ℓ ^ 2 := by gcongr calc L * lT * Real.log lT * (lT ^ 2 + X) ≤ L * Real.log lT * (lT ^ 2 + X) * ℓ ^ 2 / lT := h3 - _ = 2 * π * ((lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (2 * π))) := h2.symm - _ ≤ 2 * π * (E * M₂) := by gcongr - -- Piece B1: |2π b L (I2 − Tℓ²/(4π²))| ≤ Cμ E M₂ - have hB1 : |2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2))| ≤ Cμ * (E * M₂) := by + _ = 2 * π * κ * ((lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (2 * π * κ))) := + h2.symm + _ ≤ 2 * π * κ * (E * M₂) := by gcongr + -- Piece B1: |2π b L (I2 − Tℓ²/(4π²))| ≤ κ Cμ E M₂ + have hB1 : |2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2))| ≤ κ * Cμ * (E * M₂) := by rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ 2 * π * b * L)] calc 2 * π * b * L * |I2 - T * ℓ ^ 2 / (4 * π ^ 2)| ≤ 2 * π * 1 * L * (Cμ * (T * ℓ ^ 2 / (4 * π ^ 2) / lT ^ 2)) := by gcongr - _ = Cμ * ((1 / lT ^ 2) * (T * L * ℓ ^ 2 / (2 * π))) := by field_simp; ring - _ ≤ Cμ * (E * M₂) := by gcongr - -- Piece B2: |(b − 1) T L ℓ²/(2π)| ≤ 2 E M₂ - have hB2 : |(b - 1) * (T * L * ℓ ^ 2 / (2 * π))| ≤ 2 * (E * M₂) := by - rw [abs_mul, abs_of_nonpos (by linarith only [hble1]), abs_of_nonneg (by positivity)] - calc -(b - 1) * (T * L * ℓ ^ 2 / (2 * π)) ≤ (2 * w / L) * M₂ := by - apply mul_le_mul (by linarith only [hb1]) hMa (by positivity) (by positivity) - _ = 2 * ((w / L) * M₂) := by ring - _ ≤ 2 * (E * M₂) := by gcongr - -- Piece B3: |T/π (S − L³/6)| ≤ 6 (Cu + Cl + 2w) E M₂ + _ = κ * Cμ * ((1 / lT ^ 2) * (T * L * ℓ ^ 2 / (2 * π * κ))) := by field_simp; ring + _ ≤ κ * Cμ * (E * M₂) := by gcongr + -- Piece B3: |T/π (S − S0)| ≤ 2κ CS E M₂ + have hB3 : |T / π * (S - S0)| ≤ 2 * κ * CS * (E * M₂) := by + rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ T / π)] + have hLℓ2 : L / ℓ ^ 2 ≤ 1 / L := by + rw [div_le_div_iff₀ (by positivity) hL0] + have hLℓ : L ≤ ℓ := le_trans hLl hℓl + nlinarith + calc T / π * |S - S0| ≤ T / π * (CS * L ^ 2) := by gcongr + _ = 2 * κ * CS * ((L / ℓ ^ 2) * (T * L * ℓ ^ 2 / (2 * π * κ))) := by field_simp + _ ≤ 2 * κ * CS * ((1 / L) * M₂) := by + apply mul_le_mul_of_nonneg_left _ (by positivity) + exact mul_le_mul hLℓ2 hMa (by positivity) (by positivity) + _ ≤ 2 * κ * CS * (E * M₂) := by gcongr + have hsplit : (2 * π * b * L * I2 + T / π * S) - (b * (T * L * ℓ ^ 2 / (2 * π)) + T / π * S0) + = 2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2)) + T / π * (S - S0) := by + field_simp; ring + calc |G2 - (b * (T * L * ℓ ^ 2 / (2 * π)) + T / π * S0)| + ≤ |G2 - (2 * π * b * L * I2 + T / π * S)| + + |(2 * π * b * L * I2 + T / π * S) - (b * (T * L * ℓ ^ 2 / (2 * π)) + T / π * S0)| := + abs_sub_le _ _ _ + _ ≤ CR * (L * lT * Real.log lT * (lT ^ 2 + X)) + + (|2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2))| + |T / π * (S - S0)|) := by + gcongr; rw [hsplit]; exact abs_add_le _ _ + _ ≤ CR * (2 * π * κ * (E * M₂)) + (κ * Cμ * (E * M₂) + 2 * κ * CS * (E * M₂)) := by gcongr + _ = (2 * π * κ * CR + κ * Cμ + 2 * κ * CS) * (E * M₂) := by ring + +omit h in +/-- The pointwise inequality behind [eq:tr2] (second form), with every quantity a real variable: +all analytic content is in the hypotheses, and the constants `ℓ₁² + L²/3` are checked here. -/ +lemma tr2_pointwise (T L ℓ lT X E S I2 b G2 w CR Cμ Cu Cl : ℝ) + (hT : 1 ≤ T) (hL : 1 ≤ L) (hl : 1 ≤ lT) (hlog : 1 ≤ Real.log lT) (hX : 1 ≤ X) + (hℓl : lT ≤ ℓ) (hLl : L ≤ lT) (hw : 1 ≤ w) (hL2w : 2 * w ≤ L) (hb1 : 1 - 2 * w / L ≤ b) (hble1 : b ≤ 1) + (hE0 : 0 ≤ E) (hEw : w / L ≤ E) (hEmid : (lT ^ 2 + X) * Real.log lT / (T * lT) ≤ E) + (hCR : 0 ≤ CR) (hCμ : 0 ≤ Cμ) (hCu : 0 ≤ Cu) (hCl : 0 ≤ Cl) + (hR : |G2 - (2 * π * b * L * I2 + T / π * S)| ≤ CR * (L * lT * Real.log lT * (lT ^ 2 + X))) + (hμ : |I2 - T * ℓ ^ 2 / (4 * π ^ 2)| ≤ Cμ * (T * ℓ ^ 2 / (4 * π ^ 2) / lT ^ 2)) + (hSup : S - L ^ 3 / 6 ≤ Cu * L ^ 2) (hSlo : -(Cl * L ^ 2) ≤ S - (L - 2 * w) ^ 3 / 6) : + |G2 - T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3)| + ≤ (2 * π * CR + Cμ + 2 + 6 * (Cu + Cl + 2 * w)) * (E * (T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3))) := by + have hπ : 0 < π := Real.pi_pos + have hT0 : 0 < T := by linarith + have hL0 : 0 < L := by linarith + have hw0 : 0 ≤ w := by linarith + have hb0 : 0 ≤ b := by + have : 2 * w / L ≤ 1 := by rw [div_le_one hL0]; linarith only [hL2w] + linarith only [this, hb1] + set M₂ := T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3) with hM₂def + have hMa : T * L * ℓ ^ 2 / (2 * π * 1) ≤ M₂ := by + rw [hM₂def, mul_one] + have : T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3) = T * L * ℓ ^ 2 / (2 * π) + T * L ^ 3 / (6 * π) := by ring + linarith only [this, show 0 ≤ T * L ^ 3 / (6 * π) by positivity] + have hM0 : 0 ≤ M₂ := le_trans (by positivity) hMa have hSlo' : -((Cl + 2 * w) * L ^ 2) ≤ S - L ^ 3 / 6 := by have h2 : -(2 * w * L ^ 2) ≤ (L - 2 * w) ^ 3 / 6 - L ^ 3 / 6 := by have e : (L - 2 * w) ^ 3 / 6 - L ^ 3 / 6 - (-(2 * w * L ^ 2)) @@ -623,131 +684,141 @@ lemma tr2_pointwise (T L ℓ lT X E S I2 b G2 w CR Cμ Cu Cl : ℝ) mul_nonneg hw0 (by linarith only [hsq, mul_nonneg hw0 hL0.le, sq_nonneg w]) linarith only [e, this] linarith only [h2, hSlo] - have hB3 : |T / π * (S - L ^ 3 / 6)| ≤ 6 * (Cu + Cl + 2 * w) * (E * M₂) := by - rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ T / π)] - have hS : |S - L ^ 3 / 6| ≤ (Cu + Cl + 2 * w) * L ^ 2 := by - rw [abs_le] - constructor <;> linarith only [hSlo', hSup, mul_nonneg hCu (sq_nonneg L), - mul_nonneg hCl (sq_nonneg L), mul_nonneg hw0 (sq_nonneg L)] - calc T / π * |S - L ^ 3 / 6| ≤ T / π * ((Cu + Cl + 2 * w) * L ^ 2) := by gcongr - _ = 6 * (Cu + Cl + 2 * w) * ((1 / L) * (T * L ^ 3 / (6 * π))) := by - field_simp - _ ≤ 6 * (Cu + Cl + 2 * w) * (E * M₂) := by gcongr - -- assemble - have hsplit : (2 * π * b * L * I2 + T / π * S) - M₂ - = 2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2)) + (b - 1) * (T * L * ℓ ^ 2 / (2 * π)) - + T / π * (S - L ^ 3 / 6) := by - rw [hM]; field_simp; ring + have hS : |S - L ^ 3 / 6| ≤ (Cu + Cl + 2 * w) * L ^ 2 := by + rw [abs_le] + constructor <;> linarith only [hSlo', hSup, mul_nonneg hCu (sq_nonneg L), + mul_nonneg hCl (sq_nonneg L), mul_nonneg hw0 (sq_nonneg L)] + have hcore := tr2_pointwise_of T L ℓ lT X E S (L ^ 3 / 6) I2 b M₂ G2 w 1 CR Cμ (Cu + Cl + 2 * w) + hT hL hl hlog hX hℓl hLl hw one_pos hb0 hble1 hMa hE0 hEw hEmid hCR hCμ (by positivity) + hR hμ hS + have hB2 : |(b - 1) * (T * L * ℓ ^ 2 / (2 * π))| ≤ 2 * (E * M₂) := by + rw [abs_mul, abs_of_nonpos (by linarith only [hble1]), abs_of_nonneg (by positivity)] + have hMa' : T * L * ℓ ^ 2 / (2 * π) ≤ M₂ := by simpa using hMa + calc -(b - 1) * (T * L * ℓ ^ 2 / (2 * π)) ≤ (2 * w / L) * M₂ := + mul_le_mul (by linarith only [hb1]) hMa' (by positivity) (by positivity) + _ = 2 * ((w / L) * M₂) := by ring + _ ≤ 2 * (E * M₂) := by gcongr + have hdiff : (b * (T * L * ℓ ^ 2 / (2 * π)) + T / π * (L ^ 3 / 6)) - M₂ + = (b - 1) * (T * L * ℓ ^ 2 / (2 * π)) := by rw [hM₂def]; ring calc |G2 - M₂| - ≤ |G2 - (2 * π * b * L * I2 + T / π * S)| + |(2 * π * b * L * I2 + T / π * S) - M₂| := - abs_sub_le _ _ _ - _ ≤ CR * (L * lT * Real.log lT * (lT ^ 2 + X)) - + (|2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2))| + |(b - 1) * (T * L * ℓ ^ 2 / (2 * π))| - + |T / π * (S - L ^ 3 / 6)|) := by - gcongr - rw [hsplit]; exact abs_add_three _ _ _ - _ ≤ CR * (2 * π * (E * M₂)) + (Cμ * (E * M₂) + 2 * (E * M₂) - + 6 * (Cu + Cl + 2 * w) * (E * M₂)) := by gcongr - _ = (2 * π * CR + Cμ + 2 + 6 * (Cu + Cl + 2 * w)) * (E * M₂) := by ring - -/-- [eq:tr2], second form: `tr G̃² = (T L/2π)(ℓ₁² + L²/3)(1 + O(𝓔_T))`. -/ -theorem tr2 : EvBound (fun T => D.trG2 T - P.mainTr2 T) (fun T => P.calE T * P.mainTr2 T) := by - have hlam := h.lam_pos - have hw1 := h.one_le_w + ≤ |G2 - (b * (T * L * ℓ ^ 2 / (2 * π)) + T / π * (L ^ 3 / 6))| + + |(b * (T * L * ℓ ^ 2 / (2 * π)) + T / π * (L ^ 3 / 6)) - M₂| := abs_sub_le _ _ _ + _ ≤ (2 * π * 1 * CR + 1 * Cμ + 2 * 1 * (Cu + Cl + 2 * w)) * (E * M₂) + 2 * (E * M₂) := by + rw [hdiff]; exact add_le_add hcore hB2 + _ ≤ (2 * π * CR + Cμ + 2 + 6 * (Cu + Cl + 2 * w)) * (E * M₂) := by + have hEM0 : 0 ≤ E * M₂ := mul_nonneg hE0 hM0 + nlinarith + +omit h in +/-- Generic `[eq:tr2]` second-form assembly over an arbitrary density-log `ℓ ≥ l`. -/ +theorem tr2_of (P : Params) {ℓ bT trG2 intMu2 sumL2g : ℝ → ℝ} + (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) (hw1 : 1 ≤ P.w) + (hℓ : ∀ᶠ T in atTop, l T ≤ ℓ T) + (hab : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ bT T ∧ bT T ≤ 1) + (hR : EvBound (fun T => trG2 T - (2 * π * bT T * P.L T * intMu2 T + T / π * sumL2g T)) + (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T))) + (hμ : EvBound (fun T => intMu2 T - T * ℓ T ^ 2 / (4 * π ^ 2)) + (fun T => T * ℓ T ^ 2 / (4 * π ^ 2) / l T ^ 2)) + (hSup : EvBound (fun T => max (sumL2g T - P.L T ^ 3 / 6) 0) (fun T => P.L T ^ 2)) + (hSlo : EvBound (fun T => min (sumL2g T - (P.L T - 2 * P.w) ^ 3 / 6) 0) (fun T => P.L T ^ 2)) : + EvBound (fun T => trG2 T - T * P.L T / (2 * π) * (ℓ T ^ 2 + P.L T ^ 2 / 3)) + (fun T => P.calE T * (T * P.L T / (2 * π) * (ℓ T ^ 2 + P.L T ^ 2 / 3))) := by have hw : 0 ≤ P.w := by linarith - obtain ⟨CR, hCR, hR⟩ := (tr2_first h).eventually_le - obtain ⟨Cμ, hCμ, hμ⟩ := h.muints2.eventually_le - obtain ⟨Cu, hCu, hu⟩ := h.sum_upper.eventually_le - obtain ⟨Cl, hCl, hlo⟩ := h.sum_lower.eventually_le + obtain ⟨CR, hCR, hR⟩ := hR.eventually_le + obtain ⟨Cμ, hCμ, hμ⟩ := hμ.eventually_le + obtain ⟨Cu, hCu, hu⟩ := hSup.eventually_le + obtain ⟨Cl, hCl, hlo⟩ := hSlo.eventually_le refine EvBound.of_eventually_le (c := 2 * π * CR + Cμ + 2 + 6 * (Cu + Cl + 2 * P.w)) (by positivity) ?_ - filter_upwards [hR, hμ, hu, hlo, h.abdef, regime h, calE_ge_w_div_L hlam hw, + filter_upwards [hR, hμ, hu, hlo, hab, hℓ, regime_of P hlam hlam1, calE_ge_w_div_L hlam hw, calE_ge_mid hlam hw, calE_nonneg_eventually hlam hw, eventually_L_ge P hlam (2 * P.w)] - with T hR hμ hu hlo hab hreg hEw hEmid hE0 hL2w + with T hR hμ hu hlo hab hle hreg hEw hEmid hE0 hL2w obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg - obtain ⟨hb1, hba, ha1⟩ := hab - have hSup : D.sumL2g T - P.L T ^ 3 / 6 ≤ Cu * P.L T ^ 2 := by + obtain ⟨hb1, hble1⟩ := hab + have hSup' : sumL2g T - P.L T ^ 3 / 6 ≤ Cu * P.L T ^ 2 := by rw [abs_of_nonneg (le_max_right _ _)] at hu exact (le_max_left _ _).trans hu - have hSlo : -(Cl * P.L T ^ 2) ≤ D.sumL2g T - (P.L T - 2 * P.w) ^ 3 / 6 := + have hSlo' : -(Cl * P.L T ^ 2) ≤ sumL2g T - (P.L T - 2 * P.w) ^ 3 / 6 := (abs_le.mp hlo).1.trans (min_le_left _ _) - exact tr2_pointwise T (P.L T) (ell1 T) (l T) (P.X T) (P.calE T) (D.sumL2g T) (D.intMu2 T) - (D.bT T) (D.trG2 T) P.w CR Cμ Cu Cl hT hL hl hlog hX (l_le_ell1 T) hLl hw1 hL2w hb1 (hba.trans ha1) - hE0 hEw hEmid hCR.le hCμ.le hCu.le hCl.le hR hμ hSup hSlo + exact tr2_pointwise T (P.L T) (ℓ T) (l T) (P.X T) (P.calE T) (sumL2g T) (intMu2 T) + (bT T) (trG2 T) P.w CR Cμ Cu Cl hT hL hl hlog hX hle hLl hw1 hL2w hb1 hble1 + hE0 hEw hEmid hCR.le hCμ.le hCu.le hCl.le hR hμ hSup' hSlo' + +/-- [eq:tr2], second form over an arbitrary density log `ell1f ≥ l`. -/ +theorem tr2 : EvBound (fun T => D.trG2 T - T * P.L T / (2 * π) * (ell1f T ^ 2 + P.L T ^ 2 / 3)) + (fun T => P.calE T * (T * P.L T / (2 * π) * (ell1f T ^ 2 + P.L T ^ 2 / 3))) := + tr2_of P h.lam_pos h.lam_le_one h.one_le_w h.ell1_ge + (h.abdef.mono fun _ ⟨hb1, hba, ha1⟩ => ⟨hb1, hba.trans ha1⟩) + h.toTraceFactsBase.tr2_first h.muints2 h.sum_upper h.sum_lower omit h in -/-- The pointwise inequality behind [eq:ratio], every quantity a real variable. Here -`Φ₀ := F(L/ℓ)·N` and the identity `F(λ₁) N · (TL/2π)(ℓ² + L²/3) = L² N · Tℓ/2π` is where the -paper's `F(λ₁)`, `λ₁ = L/ℓ₁`, is checked. -/ -lemma ratio_pointwise (T L ℓ lT E N G G2 A C₁ C₂ : ℝ) +/-- Generic pointwise inequality behind `[eq:ratio]` and `[eq:ratio-general]`: given any positive +`cR`, `M₂`, `aa` satisfying the key identity `cR * M₂ = (aa * L)² * (Tℓ/(2π))`, controls +`|G²/G2 − cR·N| ≤ 2(2πA + 5C₁ + C₂)·E·(cR·N)`. -/ +lemma ratio_pointwise_of (T L ℓ lT E N G G2 M₂ aa cR A C₁ C₂ : ℝ) (hT : 1 ≤ T) (hL : 0 < L) (hℓ1 : 1 ≤ ℓ) (hℓl : lT ≤ ℓ) (hN0 : 0 < N) (hE0 : 0 ≤ E) (hET : 1 / T ≤ E) (hA : 0 ≤ A) (hC₁ : 0 ≤ C₁) (hC₂ : 0 ≤ C₂) + (ha0 : 0 < aa) (hM0 : 0 < M₂) (hcR0 : 0 < cR) (hs1 : C₁ * E ≤ 1 / 2) (hs2 : C₂ * E ≤ 1 / 2) (hTA : 2 * π * A ≤ T) - (h1 : |G - L * N| ≤ C₁ * (E * (L * N))) - (h2 : |G2 - T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3)| ≤ C₂ * (E * (T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3)))) + (hkey : cR * M₂ = (aa * L) ^ 2 * (T * ℓ / (2 * π))) + (h1 : |G - aa * L * N| ≤ C₁ * (E * (aa * L * N))) + (h2 : |G2 - M₂| ≤ C₂ * (E * M₂)) (hN : |N - T * ℓ / (2 * π)| ≤ A * lT) : - |G ^ 2 / G2 - Ffun (L / ℓ) * N| ≤ 2 * (2 * π * A + 5 * C₁ + C₂) * (E * (Ffun (L / ℓ) * N)) := by + |G ^ 2 / G2 - cR * N| ≤ 2 * (2 * π * A + 5 * C₁ + C₂) * (E * (cR * N)) := by have hπ : 0 < π := Real.pi_pos have hT0 : 0 < T := by linarith only [hT] have hℓ0 : 0 < ℓ := by linarith only [hℓ1] - set M₂ := T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3) with hM₂def - have hM0 : 0 < M₂ := by positivity - set Φ₀ := Ffun (L / ℓ) * N with hΦ₀def - have hF0 : 0 < Ffun (L / ℓ) := by unfold Ffun; positivity - have hΦ0 : 0 < Φ₀ := mul_pos hF0 hN0 - have key : Φ₀ * M₂ = L ^ 2 * N * (T * ℓ / (2 * π)) := by - simp only [hΦ₀def, hM₂def, Ffun] - field_simp - set a := G - L * N with hadef + set Φ₀ := cR * N with hΦ₀def + have hΦ0 : 0 < Φ₀ := mul_pos hcR0 hN0 + have key : Φ₀ * M₂ = (aa * L) ^ 2 * N * (T * ℓ / (2 * π)) := by + rw [hΦ₀def]; linear_combination N * hkey + set α := G - aa * L * N with hαdef set bb := G2 - M₂ with hbbdef set δ := N - T * ℓ / (2 * π) with hδdef have hbb : |bb| ≤ C₂ * (E * M₂) := h2 have hG2low : M₂ / 2 ≤ G2 := by - have : -(C₂ * (E * M₂)) ≤ bb := (abs_le.mp hbb).1 - have : C₂ * (E * M₂) ≤ 1 / 2 * M₂ := by + have hx1 : -(C₂ * (E * M₂)) ≤ bb := (abs_le.mp hbb).1 + have hx2 : C₂ * (E * M₂) ≤ 1 / 2 * M₂ := by rw [← mul_assoc]; exact mul_le_mul_of_nonneg_right hs2 hM0.le - linarith only [‹-(C₂ * (E * M₂)) ≤ bb›, this, hbbdef] + linarith only [hx1, hx2, hbbdef] have hG2pos : 0 < G2 := lt_of_lt_of_le (by positivity) hG2low - -- the algebraic identity - have hid : G ^ 2 - Φ₀ * G2 = L ^ 2 * N * δ + 2 * (L * N) * a + a ^ 2 - Φ₀ * bb := by - have hG : G = L * N + a := by rw [hadef]; ring + have hid : G ^ 2 - Φ₀ * G2 = (aa * L) ^ 2 * N * δ + 2 * (aa * L * N) * α + α ^ 2 - Φ₀ * bb := by + have hG : G = aa * L * N + α := by rw [hαdef]; ring have hG2 : G2 = M₂ + bb := by rw [hbbdef]; ring rw [hG, hG2, hδdef] linear_combination (-1 : ℝ) * key - -- (L N)² ≤ 2 Φ₀ M₂ - have hLN0 : 0 ≤ L * N := by positivity + have hLN0 : 0 ≤ aa * L * N := by positivity have hNup : N ≤ T * ℓ / (2 * π) + A * ℓ := by have := (abs_le.mp hN).2 nlinarith only [this, hℓl, hA] - have hLN2 : (L * N) ^ 2 ≤ 2 * (Φ₀ * M₂) := by + have hLN2 : (aa * L * N) ^ 2 ≤ 2 * (Φ₀ * M₂) := by rw [key] - have h' : (L * N) ^ 2 = L ^ 2 * N * N := by ring + have h' : (aa * L * N) ^ 2 = (aa * L) ^ 2 * N * N := by ring rw [h'] - have hc : L ^ 2 * N * N ≤ L ^ 2 * N * (T * ℓ / (2 * π) + A * ℓ) := + have hc : (aa * L) ^ 2 * N * N ≤ (aa * L) ^ 2 * N * (T * ℓ / (2 * π) + A * ℓ) := mul_le_mul_of_nonneg_left hNup (by positivity) - have hd : L ^ 2 * N * (A * ℓ) ≤ L ^ 2 * N * (T * ℓ / (2 * π)) := by + have hd : (aa * L) ^ 2 * N * (A * ℓ) ≤ (aa * L) ^ 2 * N * (T * ℓ / (2 * π)) := by apply mul_le_mul_of_nonneg_left _ (by positivity) rw [le_div_iff₀ (by positivity)] nlinarith only [hTA, hℓ0, hA] nlinarith only [hc, hd] - -- the four bounds - have t1 : |L ^ 2 * N * δ| ≤ 2 * π * A * (E * (Φ₀ * M₂)) := by - rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ L ^ 2 * N)] - calc L ^ 2 * N * |δ| ≤ L ^ 2 * N * (A * ℓ) := by + have t1 : |(aa * L) ^ 2 * N * δ| ≤ 2 * π * A * (E * (Φ₀ * M₂)) := by + rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ (aa * L) ^ 2 * N)] + calc (aa * L) ^ 2 * N * |δ| ≤ (aa * L) ^ 2 * N * (A * ℓ) := by apply mul_le_mul_of_nonneg_left _ (by positivity) exact hN.trans (mul_le_mul_of_nonneg_left hℓl hA) _ = 2 * π * A * ((1 / T) * (Φ₀ * M₂)) := by rw [key]; field_simp _ ≤ 2 * π * A * (E * (Φ₀ * M₂)) := by gcongr - have t2 : |2 * (L * N) * a| ≤ 4 * C₁ * (E * (Φ₀ * M₂)) := by - rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ 2 * (L * N))] - calc 2 * (L * N) * |a| ≤ 2 * (L * N) * (C₁ * (E * (L * N))) := by gcongr - _ = 2 * C₁ * E * (L * N) ^ 2 := by ring + have t2 : |2 * (aa * L * N) * α| ≤ 4 * C₁ * (E * (Φ₀ * M₂)) := by + rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ 2 * (aa * L * N))] + calc 2 * (aa * L * N) * |α| ≤ 2 * (aa * L * N) * (C₁ * (E * (aa * L * N))) := by gcongr + _ = 2 * C₁ * E * (aa * L * N) ^ 2 := by ring _ ≤ 2 * C₁ * E * (2 * (Φ₀ * M₂)) := by gcongr _ = 4 * C₁ * (E * (Φ₀ * M₂)) := by ring - have t3 : |a ^ 2| ≤ C₁ * (E * (Φ₀ * M₂)) := by + have t3 : |α ^ 2| ≤ C₁ * (E * (Φ₀ * M₂)) := by rw [abs_pow] - calc |a| ^ 2 ≤ (C₁ * (E * (L * N))) ^ 2 := by gcongr - _ = (C₁ * E) * (C₁ * E) * (L * N) ^ 2 := by ring + calc |α| ^ 2 ≤ (C₁ * (E * (aa * L * N))) ^ 2 := by gcongr + _ = (C₁ * E) * (C₁ * E) * (aa * L * N) ^ 2 := by ring _ ≤ (C₁ * E) * (1 / 2) * (2 * (Φ₀ * M₂)) := by gcongr _ = C₁ * (E * (Φ₀ * M₂)) := by ring have t4 : |Φ₀ * bb| ≤ C₂ * (E * (Φ₀ * M₂)) := by @@ -756,57 +827,120 @@ lemma ratio_pointwise (T L ℓ lT E N G G2 A C₁ C₂ : ℝ) _ = C₂ * (E * (Φ₀ * M₂)) := by ring have hnum : |G ^ 2 - Φ₀ * G2| ≤ (2 * π * A + 5 * C₁ + C₂) * (E * (Φ₀ * M₂)) := by rw [hid] - calc |L ^ 2 * N * δ + 2 * (L * N) * a + a ^ 2 - Φ₀ * bb| - ≤ |L ^ 2 * N * δ| + |2 * (L * N) * a| + |a ^ 2| + |Φ₀ * bb| := by + calc |(aa * L) ^ 2 * N * δ + 2 * (aa * L * N) * α + α ^ 2 - Φ₀ * bb| + ≤ |(aa * L) ^ 2 * N * δ| + |2 * (aa * L * N) * α| + |α ^ 2| + |Φ₀ * bb| := by refine (abs_sub _ _).trans ?_ - linarith only [abs_add_three (L ^ 2 * N * δ) (2 * (L * N) * a) (a ^ 2)] + linarith only [abs_add_three ((aa * L) ^ 2 * N * δ) (2 * (aa * L * N) * α) (α ^ 2)] _ ≤ 2 * π * A * (E * (Φ₀ * M₂)) + 4 * C₁ * (E * (Φ₀ * M₂)) + C₁ * (E * (Φ₀ * M₂)) + C₂ * (E * (Φ₀ * M₂)) := by gcongr _ = (2 * π * A + 5 * C₁ + C₂) * (E * (Φ₀ * M₂)) := by ring - -- divide by G2 ≥ M₂/2 - have hq : G ^ 2 / G2 - Φ₀ = (G ^ 2 - Φ₀ * G2) / G2 := by - field_simp + have hq : G ^ 2 / G2 - Φ₀ = (G ^ 2 - Φ₀ * G2) / G2 := by field_simp rw [hq, abs_div, abs_of_pos hG2pos, div_le_iff₀ hG2pos] calc |G ^ 2 - Φ₀ * G2| ≤ (2 * π * A + 5 * C₁ + C₂) * (E * (Φ₀ * M₂)) := hnum _ = 2 * (2 * π * A + 5 * C₁ + C₂) * (E * Φ₀) * (M₂ / 2) := by ring _ ≤ 2 * (2 * π * A + 5 * C₁ + C₂) * (E * Φ₀) * G2 := by gcongr -/-- [eq:ratio]: `(tr G̃)²/tr G̃² = F(λ₁) N(T,2T)(1 + O(𝓔_T))`, `λ₁ = L/ℓ₁`. -/ -theorem ratio : EvBound (fun T => D.trG T ^ 2 / D.trG2 T - Ffun (P.lam1 T) * D.Ncnt T) - (fun T => P.calE T * (Ffun (P.lam1 T) * D.Ncnt T)) := by - have hlam := h.lam_pos - have hlam1 := h.lam_le_one - have hw : 0 ≤ P.w := by linarith [h.one_le_w] - obtain ⟨C₁, hC₁, h1⟩ := (tr1' h).eventually_le - obtain ⟨C₂, hC₂, h2⟩ := (tr2 h).eventually_le - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le +omit h in +/-- The pointwise inequality behind [eq:ratio], every quantity a real variable. Here +`Φ₀ := F(L/ℓ)·N` and the identity `F(λ₁) N · (TL/2π)(ℓ² + L²/3) = L² N · Tℓ/2π` is where the +paper's `F(λ₁)`, `λ₁ = L/ℓ₁`, is checked. -/ +lemma ratio_pointwise (T L ℓ lT E N G G2 A C₁ C₂ : ℝ) + (hT : 1 ≤ T) (hL : 0 < L) (hℓ1 : 1 ≤ ℓ) (hℓl : lT ≤ ℓ) (hN0 : 0 < N) (hE0 : 0 ≤ E) + (hET : 1 / T ≤ E) (hA : 0 ≤ A) (hC₁ : 0 ≤ C₁) (hC₂ : 0 ≤ C₂) + (hs1 : C₁ * E ≤ 1 / 2) (hs2 : C₂ * E ≤ 1 / 2) (hTA : 2 * π * A ≤ T) + (h1 : |G - L * N| ≤ C₁ * (E * (L * N))) + (h2 : |G2 - T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3)| ≤ C₂ * (E * (T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3)))) + (hN : |N - T * ℓ / (2 * π)| ≤ A * lT) : + |G ^ 2 / G2 - Ffun (L / ℓ) * N| ≤ 2 * (2 * π * A + 5 * C₁ + C₂) * (E * (Ffun (L / ℓ) * N)) := by + have hπ : 0 < π := Real.pi_pos + have hT0 : 0 < T := by linarith only [hT] + have hℓ0 : 0 < ℓ := by linarith only [hℓ1] + have hM0 : 0 < T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3) := by positivity + have hF0 : 0 < Ffun (L / ℓ) := by unfold Ffun; positivity + have hkey : Ffun (L / ℓ) * (T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3)) + = (1 * L) ^ 2 * (T * ℓ / (2 * π)) := by unfold Ffun; field_simp + exact ratio_pointwise_of T L ℓ lT E N G G2 (T * L / (2 * π) * (ℓ ^ 2 + L ^ 2 / 3)) 1 + (Ffun (L / ℓ)) A C₁ C₂ hT hL hℓ1 hℓl hN0 hE0 hET hA hC₁ hC₂ one_pos hM0 hF0 hs1 hs2 hTA + hkey (by simpa using h1) h2 hN + +omit h in +/-- Generic `[eq:ratio]` assembly over an arbitrary density-log `ℓ ≥ l`, window coefficient `aT`, +main term `M₂`, and ratio constant `cR` satisfying `cR * M₂ = (aT * L)² * (Tℓ/(2π))`. -/ +theorem ratio_of (P : Params) {ℓ aT trG trG2 Ncnt M₂ cR : ℝ → ℝ} + (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) (hw : 0 ≤ P.w) + (hℓ : ∀ᶠ T in atTop, l T ≤ ℓ T) + (hN0 : ∀ᶠ T in atTop, 0 < Ncnt T) + (ha0 : ∀ᶠ T in atTop, 0 < aT T) + (hM0 : ∀ᶠ T in atTop, 0 < M₂ T) + (hcR0 : ∀ᶠ T in atTop, 0 < cR T) + (hkey : ∀ᶠ T in atTop, cR T * M₂ T = (aT T * P.L T) ^ 2 * (T * ℓ T / (2 * π))) + (h1 : EvBound (fun T => trG T - aT T * P.L T * Ncnt T) + (fun T => P.calE T * (aT T * P.L T * Ncnt T))) + (h2 : EvBound (fun T => trG2 T - M₂ T) (fun T => P.calE T * M₂ T)) + (hrvm : EvBound (fun T => Ncnt T - T * ℓ T / (2 * π)) l) : + EvBound (fun T => trG T ^ 2 / trG2 T - cR T * Ncnt T) + (fun T => P.calE T * (cR T * Ncnt T)) := by + obtain ⟨C₁, hC₁, h1⟩ := h1.eventually_le + obtain ⟨C₂, hC₂, h2⟩ := h2.eventually_le + obtain ⟨A, hA, hN⟩ := hrvm.eventually_le have hcal := calE_tendsto_zero hlam hlam1 hw have hs1 : ∀ᶠ T in atTop, C₁ * P.calE T ≤ 1 / 2 := by filter_upwards [hcal.eventually (Iio_mem_nhds (show (0:ℝ) < 1 / (2 * C₁) by positivity))] with T hT - rw [lt_div_iff₀ (by positivity)] at hT - linarith + rw [lt_div_iff₀ (by positivity)] at hT; linarith have hs2 : ∀ᶠ T in atTop, C₂ * P.calE T ≤ 1 / 2 := by filter_upwards [hcal.eventually (Iio_mem_nhds (show (0:ℝ) < 1 / (2 * C₂) by positivity))] with T hT - rw [lt_div_iff₀ (by positivity)] at hT - linarith + rw [lt_div_iff₀ (by positivity)] at hT; linarith refine EvBound.of_eventually_le (c := 2 * (2 * π * A + 5 * C₁ + C₂)) (by positivity) ?_ - filter_upwards [h1, h2, hN, hs1, hs2, regime h, calE_ge_rpow hlam hw, - calE_nonneg_eventually hlam hw, Ncnt_pos h, eventually_ge_atTop (2 * π * A)] - with T h1 h2 hN hs1 hs2 hreg hEr hE0 hN0 hTA + filter_upwards [h1, h2, hN, hs1, hs2, regime_of P hlam hlam1, hℓ, ha0, hM0, hcR0, hkey, + calE_ge_rpow hlam hw, calE_nonneg_eventually hlam hw, hN0, eventually_ge_atTop (2 * π * A)] + with T h1 h2 hN hs1 hs2 hreg hle ha0 hM0 hcR0 hkey hEr hE0 hN0 hTA obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg have hET : 1 / T ≤ P.calE T := by refine le_trans ?_ hEr rw [one_div, ← Real.rpow_neg_one] exact Real.rpow_le_rpow_of_exponent_le hT (by linarith) - exact ratio_pointwise T (P.L T) (ell1 T) (l T) (P.calE T) (D.Ncnt T) (D.trG T) (D.trG2 T) - A C₁ C₂ hT (by linarith) (hl.trans (l_le_ell1 T)) (l_le_ell1 T) hN0 hE0 hET hA.le hC₁.le - hC₂.le hs1 hs2 hTA h1 h2 hN + exact ratio_pointwise_of T (P.L T) (ℓ T) (l T) (P.calE T) (Ncnt T) (trG T) (trG2 T) + (M₂ T) (aT T) (cR T) A C₁ C₂ hT (by linarith) (hl.trans hle) hle hN0 hE0 hET hA.le hC₁.le + hC₂.le ha0 hM0 hcR0 hs1 hs2 hTA hkey h1 h2 hN -/-- **Theorem [thm:traces]** (§5 of the paper, "Summary"), assembled: the content -`TracesBounds` holds for the data `D` under `Facts D`. -/ -theorem tracesBounds_of_facts : TracesBounds P D.aT D.trG D.trG2 D.Ncnt where +omit h in +/-- Specialisation of `ratio_of` to `aT = 1`, `cR = Ffun (L / ℓ)`, `M₂ = (TL/2π)(ℓ² + L²/3)`. -/ +theorem ratio_Ffun_of (P : Params) {ℓ trG trG2 Ncnt : ℝ → ℝ} + (hlam : 0 < P.lam) (hlam1 : P.lam ≤ 1) (hw : 0 ≤ P.w) + (hℓ : ∀ᶠ T in atTop, l T ≤ ℓ T) + (hN0 : ∀ᶠ T in atTop, 0 < Ncnt T) + (h1 : EvBound (fun T => trG T - P.L T * Ncnt T) (fun T => P.calE T * (P.L T * Ncnt T))) + (h2 : EvBound (fun T => trG2 T - T * P.L T / (2 * π) * (ℓ T ^ 2 + P.L T ^ 2 / 3)) + (fun T => P.calE T * (T * P.L T / (2 * π) * (ℓ T ^ 2 + P.L T ^ 2 / 3)))) + (hrvm : EvBound (fun T => Ncnt T - T * ℓ T / (2 * π)) l) : + EvBound (fun T => trG T ^ 2 / trG2 T - Ffun (P.L T / ℓ T) * Ncnt T) + (fun T => P.calE T * (Ffun (P.L T / ℓ T) * Ncnt T)) := by + have hreg := regime_of P hlam hlam1 + refine ratio_of P (aT := fun _ => 1) hlam hlam1 hw hℓ hN0 (Eventually.of_forall fun _ => one_pos) + ?_ ?_ ?_ (by simpa using h1) h2 hrvm + · filter_upwards [hreg, hℓ] with T ⟨hT, hl, _, hL, _, _, _⟩ hle + have : 0 < π := Real.pi_pos; have : 0 < ℓ T := by linarith + positivity + · filter_upwards [hreg, hℓ] with T ⟨_, hl, _, hL, _, _, _⟩ hle + have : 0 < ℓ T := by linarith + unfold Ffun; positivity + · filter_upwards [hreg, hℓ] with T ⟨hT, hl, _, hL, _, _, _⟩ hle + have : 0 < π := Real.pi_pos; have : 0 < ℓ T := by linarith + unfold Ffun; field_simp + +/-- [eq:ratio] over an arbitrary density log `ell1f ≥ l`. -/ +theorem ratio : EvBound (fun T => D.trG T ^ 2 / D.trG2 T - Ffun (P.L T / ell1f T) * D.Ncnt T) + (fun T => P.calE T * (Ffun (P.L T / ell1f T) * D.Ncnt T)) := + ratio_Ffun_of P h.lam_pos h.lam_le_one (by linarith [h.one_le_w]) + h.ell1_ge h.Ncnt_pos (tr1' h) (tr2 h) h.rvm + +/-- **Theorem [thm:traces]** assembled over an arbitrary density log `ell1f ≥ l` +(shared by `ζ` and `L(s, χ)`). -/ +theorem tracesBoundsG_of_factsG : + TracesBoundsG P P.calE D.aT D.trG D.trG2 + (fun T => T * P.L T / (2 * π) * (ell1f T ^ 2 + P.L T ^ 2 / 3)) ell1f D.Ncnt where tr1 := tr1 h tr1' := tr1' h tr2 := tr2 h @@ -814,6 +948,11 @@ theorem tracesBounds_of_facts : TracesBounds P D.aT D.trG D.trG2 D.Ncnt where end assembly +/-- **Theorem [thm:traces]** for `ζ` (`ell1f = ell1`). -/ +theorem tracesBounds_of_facts {D : Data P} (h : Facts D) : + TracesBounds P D.aT D.trG D.trG2 D.Ncnt := + tracesBoundsG_of_factsG h + end PrimeSide /-! ## §3. [prop:PP] diff --git a/zeta23/Zeta23/PrimeSideB/Concrete.lean b/zeta23/Zeta23/PrimeSideB/Concrete.lean index 3a3642f991..df22597285 100644 --- a/zeta23/Zeta23/PrimeSideB/Concrete.lean +++ b/zeta23/Zeta23/PrimeSideB/Concrete.lean @@ -60,9 +60,6 @@ namespace PrimeSide variable (P : Params) (T : ℝ) -/-- `GentryA` on the concrete data is `Params.Gentry` ([eq:Gdef], 2nd expression). -/ -lemma GentryA_concrete (k l : ℤ) : GentryA (P.toSetting T) (P.localFun T) k l = P.Gentry T k l := rfl - /-- `tr G̃` of the abstract layer on the concrete data is `Params.trGtilde`. -/ lemma trGtA_concrete : trGtA (P.toSetting T) (P.localFun T) = P.trGtilde T := rfl @@ -76,15 +73,16 @@ def LocalHypsEventually (cϱ : ℝ) (P : Params) : Prop := variable {P} -/-- Generic bridge: an `EventuallyAt`-form result of the abstract layer, specialised to the -concrete data, is an `EvBound` in `T` (given the local hypotheses eventually and an eventually -nonnegative majorant). -/ -lemma evBound_of_eventuallyAt {cϱ : ℝ} (hLoc : LocalHypsEventually cϱ P) +/-- Generic bridge: a pointwise bound holding for all `(p, F)` with `p.lam = P.lam`, `T₁ ≤ p.T`, +and `H p F`, specialised along a concrete family `loc : ℝ → LocalFun` that eventually satisfies `H`, +gives an `EvBound` in `T`. -/ +lemma evBound_of_eventually {H : Setting → LocalFun → Prop} {loc : ℝ → LocalFun} + (hLoc : ∃ T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → H (P.toSetting T) (loc T)) {f g : Setting → LocalFun → ℝ} - (h : ∃ C : ℝ, EventuallyAt cϱ P.lam (fun p F => |f p F| ≤ C * g p F)) - (hg : ∀ᶠ T in atTop, 0 ≤ g (P.toSetting T) (P.localFun T)) : - EvBound (fun T => f (P.toSetting T) (P.localFun T)) - (fun T => g (P.toSetting T) (P.localFun T)) := by + (h : ∃ C T₁ : ℝ, ∀ (p : Setting) (F : LocalFun), + p.lam = P.lam → T₁ ≤ p.T → H p F → |f p F| ≤ C * g p F) + (hg : ∀ᶠ T in atTop, 0 ≤ g (P.toSetting T) (loc T)) : + EvBound (fun T => f (P.toSetting T) (loc T)) (fun T => g (P.toSetting T) (loc T)) := by obtain ⟨T₀, hT₀⟩ := hLoc obtain ⟨C, T₁, hT₁⟩ := h obtain ⟨T₂, hT₂⟩ := eventually_atTop.mp hg @@ -92,12 +90,21 @@ lemma evBound_of_eventuallyAt {cϱ : ℝ} (hLoc : LocalHypsEventually cϱ P) have h0 : T₀ ≤ T := (le_max_left _ _).trans hT have h1 : T₁ ≤ T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT have h2 : T₂ ≤ T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT - calc |f (P.toSetting T) (P.localFun T)| ≤ C * g (P.toSetting T) (P.localFun T) := + calc |f (P.toSetting T) (loc T)| ≤ C * g (P.toSetting T) (loc T) := hT₁ _ _ rfl h1 (hT₀ T h0) - _ ≤ max C 1 * g (P.toSetting T) (P.localFun T) := + _ ≤ max C 1 * g (P.toSetting T) (loc T) := mul_le_mul_of_nonneg_right (le_max_left _ _) (hT₂ T h2) - +/-- Generic bridge: an `EventuallyAt`-form result of the abstract layer, specialised to the +concrete data, is an `EvBound` in `T` (given the local hypotheses eventually and an eventually +nonnegative majorant). -/ +lemma evBound_of_eventuallyAt {cϱ : ℝ} (hLoc : LocalHypsEventually cϱ P) + {f g : Setting → LocalFun → ℝ} + (h : ∃ C : ℝ, EventuallyAt cϱ P.lam (fun p F => |f p F| ≤ C * g p F)) + (hg : ∀ᶠ T in atTop, 0 ≤ g (P.toSetting T) (P.localFun T)) : + EvBound (fun T => f (P.toSetting T) (P.localFun T)) + (fun T => g (P.toSetting T) (P.localFun T)) := + evBound_of_eventually hLoc h hg end PrimeSide diff --git a/zeta23/Zeta23/PrimeSideB/PP.lean b/zeta23/Zeta23/PrimeSideB/PP.lean index ee8ffe11d7..7f99aee2ae 100644 --- a/zeta23/Zeta23/PrimeSideB/PP.lean +++ b/zeta23/Zeta23/PrimeSideB/PP.lean @@ -4,44 +4,19 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ -import Zeta23.PrimeSideA.Basic import Zeta23.PrimeSideB.PPKernel -import Zeta23.PrimeSideB.PPOffDiag +import Mathlib.NumberTheory.AbelSummation /-! # Prime side, part B/PP — paper §5 [prop:PP] (§5.4): the term 𝓜[P_X,P_X] -Consumed by `Zeta23/PrimeSideB.lean` ([thm:traces]) through the three results at the bottom of -this file: +Consumed by `Zeta23/PrimeSideB.lean` ([thm:traces]) and `Zeta23/ThmE/PPChi.lean`: +* `prop_PP_vonMangoldt_bound`: Chebyshev specialization of `prop_PP_c` for any `‖c n‖ ≤ Λ n`. * `prop_PP` [prop:PP] first form (§5.4): 𝓜[P_X,P_X] = (T/π) Σ_{n≤X} Λ(n)²/n · g(log n) + O(L²X); * `sum_a2g_lower`, `sum_a2g_upper` (§5.4, the "Finally" step, from [eq:gbounds]+[eq:cheb2]): - (L−2w)³/6 − C·L² ≤ Σ_{n≤X} Λ(n)²/n · g(log n) ≤ L³/6 + C·L², - which give the paper's second form 𝓜[P_X,P_X] = (TL³/6π)(1+O(w/L)) + O(L²X). - -Everything is stated in the abstract prime-side layer (Zeta23/PrimeSideA/Defs.lean + -`LocalHyps`/`EventuallyAt` of Zeta23/PrimeSideA.lean): `p : Setting` = (T, λ, w), `F : LocalFun` = -the taper data (φ̂, Φ, A_φ, g, a, b) subject to `LocalHyps cϱ p F` (the facts [eq:psidef], -[eq:abdef], [eq:gbounds], [eq:Phi2FT], …, each a proof obligation of Zeta23/Taper.lean, not an -axiom). `P_X` is `Zeta23.PX` [eq:Pdef] of Zeta23/Defs.lean and 𝓜[·,·] is -`Zeta23.PrimeSide.Mform` (§5.4). Analytic inputs: H-cheb = `Zeta23.ChebyshevMertens` [lem:cheb] -and H-MV = `Zeta23.MVHilbert` [lem:MV] from Zeta23/Hypotheses.lean (fields of `PaperInputs`). - -## Proof route (paper §5.4, reorganised for Lean; labels as in the paper) -1. Bilinearity: 𝓜[P_X,P_X] = π⁻² Σ_{n,m≤X} a_n a_m 𝓜[cos(·y_n), cos(·y_m)], a_n = Λ(n)/√n, y_n = log n. -2. Shear `(τ,τ') ↦ (x,τ') := (τ−τ',τ')` (measure-preserving on ℝ²) + Fubini (§5.4 "Substituting - τ = τ'+x … τ' ranges over I∩(I−x) = [T+x⁻, 2T−x⁺]"): - 𝓜[u,v] = ∫_{|x|≤T} Φ(x)² ∫_{max(T,T−x)}^{min(2T,2T−x)} u(τ'+x) v(τ') dτ' dx. -3. cos A cos B = ½cos(A−B) + ½cos(A+B): inner integral = ½J(xy_n, y_n−y_m) + ½J(xy_n, y_n+y_m), - J(c,θ) := ∫_α^β cos(c+θτ')dτ' = (β−α)cos c (θ=0), = [sin(c+θβ)−sin(c+θα)]/θ (θ≠0), |J| ≤ 2/|θ|. -4. 𝒟 (n=m, "−"): ½∫_{|x|≤T}Φ²(T−|x|)cos(xy_n) = πT g(y_n) + O(∫Φ²|x|) by [eq:Phi2FT]; - 𝒪₂ (all n,m, "+"): ≤ (∫Φ²)(Σa_n)²/(2π² log 2) ≪ XL by [eq:cheb1]; - 𝒪₁ (n≠m, "−"): an explicit combination of 8 sums Σ_{n≠m} x_n conj(z_m)/(y_n−y_m) with - |x_n| = a_n, |z_m| ≤ a_m ∫Φ², each ≤ C_MV·(∫Φ²)·Σ a_n²/δ_n with δ_n = 1/(2n) [eq:deltan] ≪ L²X by H-MV - and [eq:cheb1] (Σ Λ(n)² ≪ X log X). -Constants: the paper's O(L²X) constant (and the λ=1 "18/L" sharpness) is not load-bearing; -we prove ∃ C. + (L−2w)³/6 − C·L² ≤ Σ_{n≤X} Λ(n)²/n · g(log n) ≤ L³/6 + C·L². -/ noncomputable section @@ -54,17 +29,10 @@ namespace PrimeSide variable {cϱ lam : ℝ} -/-! ## The main-term sum Σ_{n≤X} a_n² g(y_n) = Σ_{n≤X} Λ(n)²/n · g(log n) (§5.4) -/ - -/-- `Σ_{n ≤ X} Λ(n)²/n · g(log n)` — the sum in the first form of [prop:PP] (§5.4), indexed like -`Zeta23.PX` over `primeRange X = Finset.Ioc 0 ⌊X⌋₊` (Λ = 0 off prime powers). Note `a_n² = Λ(n)²/n` -(§5.4). -/ +/-- `Σ_{n ≤ X} Λ(n)²/n · g(log n)` — the sum in the first form of [prop:PP] (§5.4). -/ def sumA2g (X : ℝ) (g : ℝ → ℝ) : ℝ := ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 / n * g (Real.log n) - -/-! ## Elementary facts about the index range and `X = e^L` -/ - section Basics variable {p : Setting} {F : LocalFun} @@ -83,44 +51,50 @@ lemma LocalHypsCore.L_le_X (hF : LocalHypsCore cϱ p F) : p.L ≤ p.X := by end Basics -/-! ## The g-sandwich (§5.4) - -"Finally, by [eq:gbounds] and [eq:cheb2] (note a_n² = Λ(n)²/n), - (L−2w)³/6 + O(L²) = Σ_{n≤Xe^{−2w}} a_n²(L−2w−y_n) ≤ Σ_{n≤X} a_n² g(y_n) ≤ Σ_{n≤X} a_n²(L−y_n) = L³/6+O(L²)". -/ - section Sandwich variable {p : Setting} {F : LocalFun} -theorem sum_a2g_upper' (hcheb : Zeta23.ChebyshevMertens) (_hlam : 0 < lam ∧ lam ≤ 1) : +/-- Generic filtered upper g-sandwich over `LocalHypsCore`: given `[eq:cheb2]` on `pred`, +`Σ_{n≤X, pred n} a_n² g(y_n) ≤ L³/6 + C·L²`. -/ +theorem sum_a2g_upper_filter (pred : ℕ → Prop) [DecidablePred pred] + (hcheb : ∃ C : ℝ, ∀ x : ℝ, 2 ≤ x → + |∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n) + - Real.log x ^ 3 / 6| ≤ C * Real.log x ^ 2) + (_hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => - sumA2g p.X F.g ≤ p.L ^ 3 / 6 + C * p.L ^ 2) := by - obtain ⟨C, hC⟩ := hcheb.cheb2b + (∑ n ∈ (Finset.Ioc 0 ⌊p.X⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * F.g (Real.log n)) + ≤ p.L ^ 3 / 6 + C * p.L ^ 2) := by + obtain ⟨C, hC⟩ := hcheb refine ⟨C, 0, fun p F _ _ hF => ?_⟩ - have hX1 : (1:ℝ) ≤ p.X := by linarith [hF.two_le_X] - -- Σ a_n² g(y_n) ≤ Σ a_n² (L − y_n) - have h1 : sumA2g p.X F.g ≤ ∑ n ∈ primeRange p.X, (Λ n : ℝ) ^ 2 / n * (p.L - Real.log n) := by - unfold sumA2g + have hX1 : (1 : ℝ) ≤ p.X := by linarith [hF.two_le_X] + have h1 : (∑ n ∈ (Finset.Ioc 0 ⌊p.X⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * F.g (Real.log n)) + ≤ ∑ n ∈ (Finset.Ioc 0 ⌊p.X⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * (p.L - Real.log n) := by refine Finset.sum_le_sum fun n hn => ?_ + have hn' : n ∈ primeRange p.X := (Finset.mem_filter.mp hn).1 refine mul_le_mul_of_nonneg_left ?_ (a2_nonneg n) calc F.g (Real.log n) ≤ F.Aphi (Real.log n) := hF.g_le_Aphi _ _ ≤ max (p.L - |Real.log n|) 0 := hF.Aphi_le _ _ = p.L - Real.log n := by - rw [abs_of_nonneg (log_nonneg_of_mem_primeRange hn), max_eq_left] - have := log_le_of_mem_primeRange hX1 hn + rw [abs_of_nonneg (log_nonneg_of_mem_primeRange hn'), max_eq_left] + have := log_le_of_mem_primeRange hX1 hn' rw [p.log_X] at this; linarith - -- = Σ a_n² (log X − log n) = L³/6 + O(L²) [eq:cheb2] have h2 := hC p.X hF.two_le_X rw [p.log_X] at h2 have h3 := (abs_le.mp h2).2 - unfold primeRange at h1 linarith -theorem sum_a2g_lower' (hcheb : Zeta23.ChebyshevMertens) (_hlam : 0 < lam ∧ lam ≤ 1) : +/-- Generic filtered lower g-sandwich over `LocalHyps`: given `[eq:cheb2]` on `pred`, +`(L−2w)³/6 − C·L² ≤ Σ_{n≤X, pred n} a_n² g(y_n)`. -/ +theorem sum_a2g_lower_filter (pred : ℕ → Prop) [DecidablePred pred] + (hcheb : ∃ C : ℝ, ∀ x : ℝ, 2 ≤ x → + |∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n) + - Real.log x ^ 3 / 6| ≤ C * Real.log x ^ 2) + (_hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAt cϱ lam (fun p F => - (p.L - 2 * p.w) ^ 3 / 6 - C * p.L ^ 2 ≤ sumA2g p.X F.g) := by - obtain ⟨C, hC⟩ := hcheb.cheb2b + (p.L - 2 * p.w) ^ 3 / 6 - C * p.L ^ 2 + ≤ ∑ n ∈ (Finset.Ioc 0 ⌊p.X⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * F.g (Real.log n)) := by + obtain ⟨C, hC⟩ := hcheb refine ⟨max C 0, 0, fun p F _ _ hF => ?_⟩ - -- x' := X e^{−2w} = e^{L−2w} ≥ e^6 ≥ 2 set L' := p.L - 2 * p.w with hL' set x' := Real.exp L' with hx' have hL'pos : 6 ≤ L' := by have := hF.w_le; have := hF.eight_le_L; rw [hL']; linarith @@ -128,354 +102,290 @@ theorem sum_a2g_lower' (hcheb : Zeta23.ChebyshevMertens) (_hlam : 0 < lam ∧ la have hx'2 : 2 ≤ x' := by linarith [Real.add_one_le_exp L'] have hx'X : x' ≤ p.X := Real.exp_le_exp.mpr hL'le have hlogx' : Real.log x' = L' := Real.log_exp _ - have hsub : primeRange x' ⊆ primeRange p.X := by - unfold primeRange - exact Finset.Ioc_subset_Ioc_right (Nat.floor_le_floor hx'X) - -- Σ_{n≤X} a_n² g(y_n) ≥ Σ_{n≤x'} a_n² g(y_n) ≥ Σ_{n≤x'} a_n² (L−2w−y_n) - have h1 : ∑ n ∈ primeRange x', (Λ n : ℝ) ^ 2 / n * (Real.log x' - Real.log n) - ≤ sumA2g p.X F.g := by - unfold sumA2g - calc ∑ n ∈ primeRange x', (Λ n : ℝ) ^ 2 / n * (Real.log x' - Real.log n) - ≤ ∑ n ∈ primeRange x', (Λ n : ℝ) ^ 2 / n * F.g (Real.log n) := by + have hsub : (Finset.Ioc 0 ⌊x'⌋₊).filter pred ⊆ (Finset.Ioc 0 ⌊p.X⌋₊).filter pred := + Finset.filter_subset_filter _ (Finset.Ioc_subset_Ioc_right (Nat.floor_le_floor hx'X)) + have h1 : ∑ n ∈ (Finset.Ioc 0 ⌊x'⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * (Real.log x' - Real.log n) + ≤ ∑ n ∈ (Finset.Ioc 0 ⌊p.X⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * F.g (Real.log n) := by + calc ∑ n ∈ (Finset.Ioc 0 ⌊x'⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * (Real.log x' - Real.log n) + ≤ ∑ n ∈ (Finset.Ioc 0 ⌊x'⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * F.g (Real.log n) := by refine Finset.sum_le_sum fun n hn => mul_le_mul_of_nonneg_left ?_ (a2_nonneg n) + have hn' : n ∈ primeRange x' := (Finset.mem_filter.mp hn).1 calc Real.log x' - Real.log n ≤ max (p.L - 2 * p.w - |Real.log n|) 0 := by - rw [hlogx', abs_of_nonneg (log_nonneg_of_mem_primeRange hn), hL'] + rw [hlogx', abs_of_nonneg (log_nonneg_of_mem_primeRange hn'), hL'] exact le_max_left _ _ _ ≤ F.g (Real.log n) := hF.g_lower _ - _ ≤ ∑ n ∈ primeRange p.X, (Λ n : ℝ) ^ 2 / n * F.g (Real.log n) := by + _ ≤ ∑ n ∈ (Finset.Ioc 0 ⌊p.X⌋₊).filter pred, (Λ n : ℝ) ^ 2 / n * F.g (Real.log n) := by apply Finset.sum_le_sum_of_subset_of_nonneg hsub intro n _ _ - have : 0 ≤ F.g (Real.log n) := le_trans (le_max_right _ _) (hF.g_lower _) - exact mul_nonneg (a2_nonneg n) this - -- [eq:cheb2] at x': Σ_{n≤x'} a_n² (log x' − log n) ≥ (log x')³/6 − C (log x')² + exact mul_nonneg (a2_nonneg n) (le_trans (le_max_right _ _) (hF.g_lower _)) have h2 := hC x' hx'2 rw [hlogx'] at h2 have h3 := (abs_le.mp h2).1 have hCmax : C * L' ^ 2 ≤ max C 0 * p.L ^ 2 := by calc C * L' ^ 2 ≤ max C 0 * L' ^ 2 := mul_le_mul_of_nonneg_right (le_max_left _ _) (sq_nonneg _) - _ ≤ max C 0 * p.L ^ 2 := by - apply mul_le_mul_of_nonneg_left _ (le_max_right _ _) - exact pow_le_pow_left₀ (by linarith) hL'le 2 + _ ≤ max C 0 * p.L ^ 2 := + mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by linarith) hL'le 2) (le_max_right _ _) rw [hlogx'] at h1 - unfold primeRange at h1 linarith -end Sandwich - -/-! ## Assembly of [prop:PP] (§5.4) -/ - -section Assembly -variable {Φ : ℝ → ℝ} {T : ℝ} - -/-- diagonal / off-diagonal split of a double sum ("𝒟 collects the terms n=m …, 𝒪₁ the terms n≠m", -§5.4). -/ -lemma sum_sum_eq_diag_add_offdiag (S : Finset ℕ) (f : ℕ → ℕ → ℝ) : - ∑ n ∈ S, ∑ m ∈ S, f n m - = ∑ n ∈ S, f n n + ∑ n ∈ S, ∑ m ∈ S, (if n = m then 0 else f n m) := by - rw [← Finset.sum_add_distrib] - refine Finset.sum_congr rfl fun n hn => ?_ - have e : ∀ m, f n m = (if n = m then f n m else 0) + (if n = m then 0 else f n m) := by - intro m; split_ifs <;> simp - rw [Finset.sum_congr rfl (fun m _ => e m), Finset.sum_add_distrib, Finset.sum_ite_eq, if_pos hn] - -/-- **[eq:MPP]** (§5.4): bilinearity in the prime sum, then the per-pair decomposition: - 𝓜[P_X,P_X] = (1/2π²)·( Σ_n a_n² A⁻(y_n,y_n) + Σ_{n≠m} a_n a_m A⁻(y_n,y_m) + Σ_{n,m} a_n a_m A⁺(y_n,y_m) ) - = 𝒟-part + 𝒪₁ + 𝒪₂ . -/ -lemma Mform_PX_PX (hT : 0 ≤ T) (hΦ : Continuous Φ) (X : ℝ) : - Mform Φ T (Zeta23.PX X) (Zeta23.PX X) - = (1 / (2 * π ^ 2)) * - ((∑ n ∈ primeRange X, acoef n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - + (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else acoef n * acoef m * Aminus Φ T (Real.log n) (Real.log m))) - + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - acoef n * acoef m * Aplus Φ T (Real.log n) (Real.log m)) := by - -- Step 1: bilinearity 𝓜[P_X,P_X] = π⁻² Σ_{n,m} a_n a_m 𝓜[cos(·y_n), cos(·y_m)] - have h1 : Mform Φ T (Zeta23.PX X) (Zeta23.PX X) = (1 / π ^ 2) * - ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, acoef n * acoef m * - Mform Φ T (fun τ => Real.cos (τ * Real.log n)) (fun τ => Real.cos (τ * Real.log m)) := by - unfold Mform - have hpt : ∀ q : ℝ × ℝ, Φ (q.1 - q.2) ^ 2 * Zeta23.PX X q.1 * Zeta23.PX X q.2 - = (1 / π ^ 2) * ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, acoef n * acoef m * - (Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * Real.log n) * Real.cos (q.2 * Real.log m)) := by - intro q - rw [PX_eq, PX_eq] - simp only [ycoef] - rw [show ∀ A B : ℝ, Φ (q.1 - q.2) ^ 2 * (-(1 / π) * A) * (-(1 / π) * B) - = (1 / π ^ 2) * (Φ (q.1 - q.2) ^ 2 * (A * B)) from fun A B => by ring, - Finset.sum_mul_sum, Finset.mul_sum] - congr 1 - refine Finset.sum_congr rfl fun n _ => ?_ - rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun m _ => ?_ - ring - simp_rw [hpt] - rw [integral_const_mul] - congr 1 - have hint : ∀ n m : ℕ, Integrable (fun q : ℝ × ℝ => acoef n * acoef m * - (Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * Real.log n) * Real.cos (q.2 * Real.log m))) - (volume.restrict (Icc T (2 * T) ×ˢ Icc T (2 * T))) := fun n m => - (Mform_integrableOn hΦ (u := fun τ => Real.cos (τ * Real.log n)) - (v := fun τ => Real.cos (τ * Real.log m)) (by fun_prop) (by fun_prop)).const_mul _ - rw [integral_finsetSum _ (fun n _ => integrable_finsetSum _ (fun m _ => hint n m))] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [integral_finsetSum _ (fun m _ => hint n m)] - refine Finset.sum_congr rfl fun m _ => ?_ - rw [integral_const_mul] - -- Step 2: per pair, 𝓜[cos,cos] = (A⁻+A⁺)/2, and split the A⁻ double sum into n=m / n≠m - have h2 : ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, acoef n * acoef m * - Mform Φ T (fun τ => Real.cos (τ * Real.log n)) (fun τ => Real.cos (τ * Real.log m)) - = (1 / 2) * ((∑ n ∈ primeRange X, acoef n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - + (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else acoef n * acoef m * Aminus Φ T (Real.log n) (Real.log m))) - + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - acoef n * acoef m * Aplus Φ T (Real.log n) (Real.log m)) := by - simp_rw [Mform_cos_cos hT hΦ] - have e : ∀ n m : ℕ, acoef n * acoef m * - ((Aminus Φ T (Real.log n) (Real.log m) + Aplus Φ T (Real.log n) (Real.log m)) / 2) - = (1 / 2) * (acoef n * acoef m * Aminus Φ T (Real.log n) (Real.log m)) - + (1 / 2) * (acoef n * acoef m * Aplus Φ T (Real.log n) (Real.log m)) := by - intro n m; ring - simp_rw [e, Finset.sum_add_distrib, ← Finset.mul_sum] - rw [sum_sum_eq_diag_add_offdiag (primeRange X) - (fun n m => acoef n * acoef m * Aminus Φ T (Real.log n) (Real.log m))] - simp_rw [← sq] - ring - rw [h1, h2] - ring - -/-- **𝒟** (§5.4): with [eq:Phi2FT] ∫Φ²cos(xy) = 2πg(y), - |(1/2π²)Σ_n a_n² A⁻(y_n,y_n) − (T/π) Σ_n a_n² g(y_n)| ≤ (1/2π²)·(Σ_n a_n²)·∫Φ²|x|. -/ -lemma diag_estimate (hT : 0 ≤ T) (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) - (hΦabs : Integrable fun x => Φ x ^ 2 * |x|) {g : ℝ → ℝ} - (hFT : ∀ y, ∫ x, Φ x ^ 2 * Real.cos (x * y) = 2 * π * g y) (X : ℝ) : - |(1 / (2 * π ^ 2)) * (∑ n ∈ primeRange X, acoef n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - - T / π * sumA2g X g| - ≤ (1 / (2 * π ^ 2)) * (∑ n ∈ primeRange X, acoef n ^ 2) * ∫ x, Φ x ^ 2 * |x| := by - have hπ : (0:ℝ) < π := Real.pi_pos - have e : (1 / (2 * π ^ 2)) * (∑ n ∈ primeRange X, acoef n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - - T / π * sumA2g X g - = (1 / (2 * π ^ 2)) * ∑ n ∈ primeRange X, acoef n ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n)) := by - unfold sumA2g - simp_rw [hFT, ← acoef_sq] - rw [Finset.mul_sum, Finset.mul_sum, Finset.mul_sum, ← Finset.sum_sub_distrib] - refine Finset.sum_congr rfl fun n _ => ?_ - field_simp - rw [e, abs_mul, abs_of_pos (by positivity), mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ (by positivity) - calc |∑ n ∈ primeRange X, acoef n ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n))| - ≤ ∑ n ∈ primeRange X, |acoef n ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n))| := - Finset.abs_sum_le_sum_abs _ _ - _ ≤ ∑ n ∈ primeRange X, acoef n ^ 2 * ∫ x, Φ x ^ 2 * |x| := by - refine Finset.sum_le_sum fun n _ => ?_ - rw [abs_mul, abs_of_nonneg (sq_nonneg _)] - exact mul_le_mul_of_nonneg_left (abs_Aminus_diag_sub_le hT hΦ hΦ2 hΦabs _) (sq_nonneg _) - _ = (∑ n ∈ primeRange X, acoef n ^ 2) * ∫ x, Φ x ^ 2 * |x| := by rw [Finset.sum_mul] - -/-- **𝒪₂** (§5.4): "|∫(nm)^{iτ'}dτ'| ≤ 2/log(nm) ≤ 2/log 4 for all n,m, so -|𝒪₂| ≤ (1/2π²)(Σ a_n)²·2πbL·2/log4 ≪ XL" — pre-Chebyshev form: - |Σ_{n,m} a_n a_m A⁺(y_n,y_m)| ≤ (∫Φ²/log 2)·(Σ_n a_n)². (Terms with n=1 or m=1 vanish as Λ(1)=0; -otherwise y_n + y_m ≥ 2 log 2.) -/ -lemma O2_estimate (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) (X T : ℝ) : - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, acoef n * acoef m * Aplus Φ T (Real.log n) (Real.log m)| - ≤ (∫ x, Φ x ^ 2) / Real.log 2 * (∑ n ∈ primeRange X, acoef n) ^ 2 := by - have hW : 0 ≤ ∫ x, Φ x ^ 2 := integral_nonneg fun x => sq_nonneg _ - have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - have hper : ∀ n ∈ primeRange X, ∀ m ∈ primeRange X, - |acoef n * acoef m * Aplus Φ T (Real.log n) (Real.log m)| - ≤ acoef n * acoef m * ((∫ x, Φ x ^ 2) / Real.log 2) := by - intro n hn m hm - rw [abs_mul, abs_mul, abs_of_nonneg (acoef_nonneg n), abs_of_nonneg (acoef_nonneg m)] - rcases acoef_eq_zero_or_two_le hn with h0 | hn2 - · simp [h0] - rcases acoef_eq_zero_or_two_le hm with h0 | hm2 - · simp [h0] - refine mul_le_mul_of_nonneg_left ?_ (mul_nonneg (acoef_nonneg n) (acoef_nonneg m)) - have hyn : Real.log 2 ≤ Real.log n := Real.log_le_log (by norm_num) (by exact_mod_cast hn2) - have hym : Real.log 2 ≤ Real.log m := Real.log_le_log (by norm_num) (by exact_mod_cast hm2) - have hpos : 0 < Real.log n + Real.log m := by linarith - calc |Aplus Φ T (Real.log n) (Real.log m)| - ≤ 2 / (Real.log n + Real.log m) * ∫ x, Φ x ^ 2 := abs_Aplus_le hΦ hΦ2 hpos - _ ≤ 2 / (2 * Real.log 2) * ∫ x, Φ x ^ 2 := by gcongr; linarith - _ = (∫ x, Φ x ^ 2) / Real.log 2 := by field_simp - calc |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - acoef n * acoef m * Aplus Φ T (Real.log n) (Real.log m)| - ≤ ∑ n ∈ primeRange X, |∑ m ∈ primeRange X, - acoef n * acoef m * Aplus Φ T (Real.log n) (Real.log m)| := Finset.abs_sum_le_sum_abs _ _ - _ ≤ ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - |acoef n * acoef m * Aplus Φ T (Real.log n) (Real.log m)| := - Finset.sum_le_sum fun n _ => Finset.abs_sum_le_sum_abs _ _ - _ ≤ ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - acoef n * acoef m * ((∫ x, Φ x ^ 2) / Real.log 2) := - Finset.sum_le_sum fun n hn => Finset.sum_le_sum fun m hm => hper n hn m hm - _ = (∫ x, Φ x ^ 2) / Real.log 2 * (∑ n ∈ primeRange X, acoef n) ^ 2 := by - rw [sq, Finset.sum_mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun m _ => ?_ - ring +theorem sum_a2g_upper' (hcheb : Zeta23.ChebyshevMertens) (hlam : 0 < lam ∧ lam ≤ 1) : + ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => + sumA2g p.X F.g ≤ p.L ^ 3 / 6 + C * p.L ^ 2) := by + simpa [sumA2g, primeRange] using + sum_a2g_upper_filter (cϱ := cϱ) (fun _ => True) (by simpa using hcheb.cheb2b) hlam -end Assembly +theorem sum_a2g_lower' (hcheb : Zeta23.ChebyshevMertens) (hlam : 0 < lam ∧ lam ≤ 1) : + ∃ C : ℝ, EventuallyAt cϱ lam (fun p F => + (p.L - 2 * p.w) ^ 3 / 6 - C * p.L ^ 2 ≤ sumA2g p.X F.g) := by + simpa [sumA2g, primeRange] using + sum_a2g_lower_filter (cϱ := cϱ) (fun _ => True) (by simpa using hcheb.cheb2b) hlam -/-! ## Results consumed by PrimeSideB.lean -/ +end Sandwich section Results -/-- **[prop:PP], first form** (§5.4, verbatim): -"𝓜[P_X,P_X] = (T/π) Σ_{n≤X} Λ(n)²/n · g(log n) + O(L²X)". -Here 𝓜[P_X,P_X] = `Mform F.Phi p.T (Zeta23.PX p.X) (Zeta23.PX p.X)` (§5.4, [eq:Pdef]). -Inputs: H-cheb [lem:cheb] and H-MV [lem:MV] (any constant), plus the taper facts `LocalHyps`. -Shape: ∃ C, for T ≥ T₀(λ, cϱ, the H-constants). -/ -theorem prop_PP (hcheb : Zeta23.ChebyshevMertens) (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) - (hlam : 0 < lam ∧ lam ≤ 1) : - ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => - |Mform F.Phi p.T (Zeta23.PX p.X) (Zeta23.PX p.X) - p.T / π * sumA2g p.X F.g| - ≤ C * (p.L ^ 2 * p.X)) := by +/-- Chebyshev specialization of `prop_PP_c`: for any `c : ℕ → ℂ` with `∀ n, ‖c n‖ ≤ Λ n`, +`|𝓜[P_c, P_c] − (T/π) Σ ‖c_n‖²/n · g(log n)| ≤ C · L²X`, uniformly in `c`. -/ +theorem prop_PP_vonMangoldt_bound (hcheb : Zeta23.ChebyshevMertens) + (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hlam : 0 < lam ∧ lam ≤ 1) : + ∃ C T₀ : ℝ, ∀ (c : ℕ → ℂ), (∀ n, ‖c n‖ ≤ Λ n) → + ∀ (p : Setting) (F : LocalFun), p.lam = lam → T₀ ≤ p.T → LocalHypsCore cϱ p F → + |Mform F.Phi p.T (PcDir p.X c) (PcDir p.X c) + - p.T / π * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n * F.g (Real.log n)| + ≤ C * (p.L ^ 2 * p.X) := by obtain ⟨CMV, hCMV, hMV⟩ := hMV obtain ⟨x₀, h1b⟩ := hcheb.cheb1b obtain ⟨C1d, h1d⟩ := hcheb.cheb1d obtain ⟨C2a, h2a⟩ := hcheb.cheb2a - -- the constant (depends on cϱ, the H-constants, λ only through T₀) - refine ⟨(1 / (2 * π ^ 2)) * ((1 / 2 + |C2a|) * (8 + 8 * |cϱ|) + 16 * CMV * (2 * π) * |C1d| - + 2 * π / Real.log 2 * 9), - max (2 * π * Real.exp (|x₀| / lam)) 1, fun p F hplam hT hF => ?_⟩ - beta_reduce - -- regime facts - have hT1 : 1 ≤ p.T := le_trans (le_max_right _ _) hT - have hT0 : 0 ≤ p.T := by linarith + refine ⟨(1 / (2 * π ^ 2)) * ((8 + 8 * |cϱ|) * (1 / 2 + |C2a|) + (32 * π) * CMV * |C1d| + + (2 * π / Real.log 2) * 9), + max (2 * π * Real.exp (|x₀| / lam)) 1, fun c hc p F hplam hT hF => ?_⟩ + have hc1 : c 1 = 0 := by + have h0 := hc 1 + rw [ArithmeticFunction.vonMangoldt_apply_one] at h0 + exact norm_le_zero_iff.mp h0 + have hT1 : 1 ≤ p.T := (le_max_right _ _).trans hT have hX0 : x₀ ≤ p.X := Setting.le_X_of_T (hplam ▸ hlam.1) (by rw [hplam]; exact (le_max_left _ _).trans hT) have hX2 : 2 ≤ p.X := hF.two_le_X have hL8 : 8 ≤ p.L := hF.eight_le_L have hL1 : 1 ≤ p.L := by linarith have hLX : p.L ≤ p.X := hF.L_le_X - have hlogX : Real.log p.X = p.L := p.log_X - have hΦc : Continuous F.Phi := hF.Phi_contDiff.continuous have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - set W := ∫ x, F.Phi x ^ 2 with hWdef - have hW0 : 0 ≤ W := integral_nonneg fun x => sq_nonneg _ - have hWle : W ≤ 2 * π * p.L := hF.integral_Phi_sq_le - set ΛΦ := ∫ x, F.Phi x ^ 2 * |x| with hΛΦdef - have hΛΦ0 : 0 ≤ ΛΦ := integral_nonneg fun x => mul_nonneg (sq_nonneg _) (abs_nonneg _) - -- ∫Φ²|x| ≤ 8 + 8 log(cϱL/4w) ≤ (8 + 8|cϱ|) L - have hΛΦle : ΛΦ ≤ (8 + 8 * |cϱ|) * p.L := by - have h1 := hF.integral_Phi_sq_mul_abs_le - have hc : 4 ≤ cϱ := hF.four_le_cϱ - have hw : 1 ≤ p.w := hF.one_le_w - have harg : 0 < cϱ * p.L / (4 * p.w) := by positivity - have hlog : Real.log (cϱ * p.L / (4 * p.w)) ≤ cϱ * p.L / (4 * p.w) := by - linarith [Real.log_le_sub_one_of_pos harg] - have hfrac : cϱ * p.L / (4 * p.w) ≤ |cϱ| * p.L := by - rw [div_le_iff₀ (by positivity), abs_of_nonneg (by linarith)] - have hcL : 0 ≤ cϱ * p.L := mul_nonneg (by linarith) (by linarith) - nlinarith [mul_nonneg hcL (by linarith : (0:ℝ) ≤ 4 * p.w - 1)] - calc ΛΦ ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) := h1 - _ ≤ 8 + 8 * (|cϱ| * p.L) := by linarith - _ ≤ 8 * p.L + 8 * (|cϱ| * p.L) := by linarith - _ = (8 + 8 * |cϱ|) * p.L := by ring - -- Chebyshev inputs at x = X (log X = L) - have hsuma : ∑ n ∈ primeRange p.X, acoef n ≤ 3 * Real.sqrt p.X := h1b p.X hX0 - have hsuma0 : 0 ≤ ∑ n ∈ primeRange p.X, acoef n := Finset.sum_nonneg fun n _ => acoef_nonneg n - have hsumΛ2 : ∑ n ∈ primeRange p.X, (Λ n : ℝ) ^ 2 ≤ |C1d| * p.X * p.L := by - have := h1d p.X hX2 - rw [hlogX] at this - refine this.trans ?_ - have hXL : 0 ≤ p.X * p.L := mul_nonneg (by linarith) (by linarith) - calc C1d * p.X * p.L = C1d * (p.X * p.L) := by ring + have hcϱ : 4 ≤ cϱ := hF.four_le_cϱ + have hsumA : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n ≤ (1 / 2 + |C2a|) * p.L ^ 2 := by + have hle : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n + ≤ ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) ^ 2 / n := + Finset.sum_le_sum fun n _ => div_le_div_of_nonneg_right + (pow_le_pow_left₀ (norm_nonneg _) (hc n) 2) (Nat.cast_nonneg _) + have h2 := h2a p.X hX2 + rw [p.log_X] at h2 + have h3 := (abs_le.mp h2).2 + have h4 : C2a * p.L ≤ |C2a| * p.L ^ 2 := + (mul_le_mul_of_nonneg_right (le_abs_self _) (by linarith)).trans + (mul_le_mul_of_nonneg_left (by nlinarith) (abs_nonneg _)) + linarith + have hsumB : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 ≤ |C1d| * p.X * p.L := by + have hle : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 ≤ ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) ^ 2 := + Finset.sum_le_sum fun n _ => pow_le_pow_left₀ (norm_nonneg _) (hc n) 2 + have h1 := h1d p.X hX2 + rw [p.log_X] at h1 + have hXL : 0 ≤ p.X * p.L := by positivity + calc ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 ≤ C1d * p.X * p.L := hle.trans h1 + _ = C1d * (p.X * p.L) := by ring _ ≤ |C1d| * (p.X * p.L) := mul_le_mul_of_nonneg_right (le_abs_self _) hXL _ = |C1d| * p.X * p.L := by ring - have hsuma2 : ∑ n ∈ primeRange p.X, acoef n ^ 2 ≤ (1 / 2 + |C2a|) * p.L ^ 2 := by - have := h2a p.X hX2 - rw [hlogX] at this - simp_rw [acoef_sq] - have h3 := (abs_le.mp this).2 - unfold primeRange - calc ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) ^ 2 / n ≤ p.L ^ 2 / 2 + C2a * p.L := by linarith - _ ≤ p.L ^ 2 / 2 + |C2a| * p.L ^ 2 := by - have : C2a * p.L ≤ |C2a| * p.L := mul_le_mul_of_nonneg_right (le_abs_self _) (by linarith) - have : |C2a| * p.L ≤ |C2a| * p.L ^ 2 := by - apply mul_le_mul_of_nonneg_left _ (abs_nonneg _); nlinarith - linarith - _ = (1 / 2 + |C2a|) * p.L ^ 2 := by ring - -- the three pieces - have hD := diag_estimate hT0 hΦc hF.Phi_sq_integrable hF.Phi_sq_mul_abs_integrable - hF.Phi_sq_fourier p.X - have hO1 := O1_bound hMV hCMV.le hT0 hΦc hF.Phi_sq_integrable p.X - have hO2 := O2_estimate hΦc hF.Phi_sq_integrable p.X p.T - rw [Mform_PX_PX hT0 hΦc] - set D := ∑ n ∈ primeRange p.X, acoef n ^ 2 * Aminus F.Phi p.T (Real.log n) (Real.log n) - set O1 := ∑ n ∈ primeRange p.X, ∑ m ∈ primeRange p.X, - (if n = m then (0:ℝ) else acoef n * acoef m * Aminus F.Phi p.T (Real.log n) (Real.log m)) - set O2 := ∑ n ∈ primeRange p.X, ∑ m ∈ primeRange p.X, - acoef n * acoef m * Aplus F.Phi p.T (Real.log n) (Real.log m) - have hk : (0:ℝ) < 1 / (2 * π ^ 2) := by positivity - -- piece bounds in the form ≤ const · L²X - have bD : |1 / (2 * π ^ 2) * D - p.T / π * sumA2g p.X F.g| - ≤ 1 / (2 * π ^ 2) * ((1 / 2 + |C2a|) * (8 + 8 * |cϱ|)) * (p.L ^ 2 * p.X) := by - refine hD.trans ?_ - rw [mul_assoc, mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ hk.le - calc (∑ n ∈ primeRange p.X, acoef n ^ 2) * ΛΦ - ≤ ((1 / 2 + |C2a|) * p.L ^ 2) * ((8 + 8 * |cϱ|) * p.L) := by - apply mul_le_mul hsuma2 hΛΦle hΛΦ0 (by positivity) - _ ≤ ((1 / 2 + |C2a|) * p.L ^ 2) * ((8 + 8 * |cϱ|) * p.X) := by gcongr - _ = (1 / 2 + |C2a|) * (8 + 8 * |cϱ|) * (p.L ^ 2 * p.X) := by ring - have bO1 : |1 / (2 * π ^ 2) * O1| ≤ 1 / (2 * π ^ 2) * (16 * CMV * (2 * π) * |C1d|) * (p.L ^ 2 * p.X) := by - rw [abs_mul, abs_of_pos hk, mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ hk.le - calc |O1| ≤ 16 * CMV * W * ∑ n ∈ primeRange p.X, (Λ n : ℝ) ^ 2 := hO1 - _ ≤ 16 * CMV * (2 * π * p.L) * (|C1d| * p.X * p.L) := by - apply mul_le_mul _ hsumΛ2 (Finset.sum_nonneg fun n _ => sq_nonneg _) (by positivity) - exact mul_le_mul_of_nonneg_left hWle (by positivity) - _ = 16 * CMV * (2 * π) * |C1d| * (p.L ^ 2 * p.X) := by ring - have bO2 : |1 / (2 * π ^ 2) * O2| ≤ 1 / (2 * π ^ 2) * (2 * π / Real.log 2 * 9) * (p.L ^ 2 * p.X) := by - rw [abs_mul, abs_of_pos hk, mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ hk.le - calc |O2| ≤ W / Real.log 2 * (∑ n ∈ primeRange p.X, acoef n) ^ 2 := hO2 - _ ≤ (2 * π * p.L) / Real.log 2 * (3 * Real.sqrt p.X) ^ 2 := by - apply mul_le_mul _ _ (sq_nonneg _) (by positivity) - · exact div_le_div_of_nonneg_right hWle hlog2.le - · exact pow_le_pow_left₀ hsuma0 hsuma 2 - _ = 2 * π / Real.log 2 * 9 * (p.L * p.X) := by - rw [mul_pow, Real.sq_sqrt (by linarith)]; ring - _ ≤ 2 * π / Real.log 2 * 9 * (p.L ^ 2 * p.X) := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - have hLL : p.L ≤ p.L ^ 2 := by nlinarith - exact mul_le_mul_of_nonneg_right hLL (by linarith) - -- combine - have split : 1 / (2 * π ^ 2) * (D + O1 + O2) - p.T / π * sumA2g p.X F.g - = (1 / (2 * π ^ 2) * D - p.T / π * sumA2g p.X F.g) + 1 / (2 * π ^ 2) * O1 - + 1 / (2 * π ^ 2) * O2 := by ring - rw [split] - calc |(1 / (2 * π ^ 2) * D - p.T / π * sumA2g p.X F.g) + 1 / (2 * π ^ 2) * O1 + 1 / (2 * π ^ 2) * O2| - ≤ |1 / (2 * π ^ 2) * D - p.T / π * sumA2g p.X F.g| + |1 / (2 * π ^ 2) * O1| - + |1 / (2 * π ^ 2) * O2| := abs_add_three _ _ _ - _ ≤ 1 / (2 * π ^ 2) * ((1 / 2 + |C2a|) * (8 + 8 * |cϱ|)) * (p.L ^ 2 * p.X) - + 1 / (2 * π ^ 2) * (16 * CMV * (2 * π) * |C1d|) * (p.L ^ 2 * p.X) - + 1 / (2 * π ^ 2) * (2 * π / Real.log 2 * 9) * (p.L ^ 2 * p.X) := by gcongr - _ = (1 / (2 * π ^ 2)) * ((1 / 2 + |C2a|) * (8 + 8 * |cϱ|) + 16 * CMV * (2 * π) * |C1d| - + 2 * π / Real.log 2 * 9) * (p.L ^ 2 * p.X) := by ring + have hsumS : (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) ^ 2 ≤ 9 * p.X := by + have hle : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n + ≤ ∑ n ∈ primeRange p.X, acoef n := + Finset.sum_le_sum fun n _ => div_le_div_of_nonneg_right (hc n) (Real.sqrt_nonneg _) + have h1 : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n ≤ 3 * Real.sqrt p.X := + hle.trans (h1b p.X hX0) + have hnn : 0 ≤ ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n := + Finset.sum_nonneg fun n _ => div_nonneg (norm_nonneg _) (Real.sqrt_nonneg _) + calc (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) ^ 2 + ≤ (3 * Real.sqrt p.X) ^ 2 := pow_le_pow_left₀ hnn h1 2 + _ = 9 * p.X := by rw [mul_pow, Real.sq_sqrt (by linarith)]; norm_num + have hmain := prop_PP_c hMV hCMV.le hF hT1 c hc1 + have hk : (0 : ℝ) ≤ 1 / (2 * π ^ 2) := by positivity + have b1 : (1 / (2 * π ^ 2)) * (8 + 8 * cϱ) * p.L * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n) + ≤ (1 / (2 * π ^ 2)) * ((8 + 8 * |cϱ|) * (1 / 2 + |C2a|)) * (p.L ^ 2 * p.X) := by + have hcϱ_abs : 8 + 8 * cϱ = 8 + 8 * |cϱ| := by rw [abs_of_nonneg (by linarith)] + rw [hcϱ_abs] + calc (1 / (2 * π ^ 2)) * (8 + 8 * |cϱ|) * p.L * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n) + ≤ (1 / (2 * π ^ 2)) * (8 + 8 * |cϱ|) * p.L * ((1 / 2 + |C2a|) * p.L ^ 2) := by gcongr + _ = (1 / (2 * π ^ 2)) * ((8 + 8 * |cϱ|) * (1 / 2 + |C2a|)) * (p.L ^ 2 * p.L) := by ring + _ ≤ (1 / (2 * π ^ 2)) * ((8 + 8 * |cϱ|) * (1 / 2 + |C2a|)) * (p.L ^ 2 * p.X) := by gcongr + have b2 : (1 / (2 * π ^ 2)) * (32 * π) * CMV * p.L * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2) + ≤ (1 / (2 * π ^ 2)) * ((32 * π) * CMV * |C1d|) * (p.L ^ 2 * p.X) := by + calc (1 / (2 * π ^ 2)) * (32 * π) * CMV * p.L * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2) + ≤ (1 / (2 * π ^ 2)) * (32 * π) * CMV * p.L * (|C1d| * p.X * p.L) := by gcongr + _ = (1 / (2 * π ^ 2)) * ((32 * π) * CMV * |C1d|) * (p.L ^ 2 * p.X) := by ring + have b3 : (1 / (2 * π ^ 2)) * (2 * π / Real.log 2) * p.L + * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) ^ 2 + ≤ (1 / (2 * π ^ 2)) * ((2 * π / Real.log 2) * 9) * (p.L ^ 2 * p.X) := by + have hLL : p.L ≤ p.L ^ 2 := by nlinarith + calc (1 / (2 * π ^ 2)) * (2 * π / Real.log 2) * p.L + * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) ^ 2 + ≤ (1 / (2 * π ^ 2)) * (2 * π / Real.log 2) * p.L * (9 * p.X) := by gcongr + _ = (1 / (2 * π ^ 2)) * ((2 * π / Real.log 2) * 9) * (p.L * p.X) := by ring + _ ≤ (1 / (2 * π ^ 2)) * ((2 * π / Real.log 2) * 9) * (p.L ^ 2 * p.X) := by gcongr + calc _ ≤ _ := hmain + _ ≤ _ := add_le_add (add_le_add b1 b2) b3 + _ = _ := by ring -/-- **[prop:PP], the g-sandwich, lower half** (§5.4, verbatim): -"(L−2w)³/6 + O(L²) = Σ_{n≤Xe^{−2w}} a_n²(L−2w−y_n) ≤ Σ_{n≤X} a_n² g(y_n)", -"by [eq:gbounds] and [eq:cheb2] (note a_n² = Λ(n)²/n)". One-sided, explicit-slack form. -/ +/-- **[prop:PP], first form** (§5.4, verbatim): +"𝓜[P_X,P_X] = (T/π) Σ_{n≤X} Λ(n)²/n · g(log n) + O(L²X)". -/ +theorem prop_PP (hcheb : Zeta23.ChebyshevMertens) (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) + (hlam : 0 < lam ∧ lam ≤ 1) : + ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => + |Mform F.Phi p.T (Zeta23.PX p.X) (Zeta23.PX p.X) - p.T / π * sumA2g p.X F.g| + ≤ C * (p.L ^ 2 * p.X)) := by + obtain ⟨C, T₀, h⟩ := prop_PP_vonMangoldt_bound (cϱ := cϱ) hcheb hMV hlam + refine ⟨C, T₀, fun p F hplam hT hF => ?_⟩ + let c : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) + have hnorm : ∀ n, ‖c n‖ = Λ n := fun n => by + simp [c, abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] + have hPX : Zeta23.PX p.X = PcDir p.X c := by + funext τ; simp [PX_eq, PcDir, c, primeRange, acoef, ycoef, div_eq_mul_inv, Finset.mul_sum] + refine Finset.sum_congr rfl fun n _ => by ring + have hsum : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n * F.g (Real.log n) = sumA2g p.X F.g := by + unfold sumA2g primeRange; exact Finset.sum_congr rfl fun n _ => by rw [hnorm] + dsimp only + rw [hPX, ← hsum] + exact h c (fun n => (hnorm n).le) p F hplam hT hF + +/-- **[prop:PP], the g-sandwich, lower half** (§5.4, verbatim). -/ theorem sum_a2g_lower (hcheb : Zeta23.ChebyshevMertens) (hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAt cϱ lam (fun p F => (p.L - 2 * p.w) ^ 3 / 6 - C * p.L ^ 2 ≤ sumA2g p.X F.g) := sum_a2g_lower' hcheb hlam -/-- **[prop:PP], the g-sandwich, upper half** (§5.4, verbatim): -"Σ_{n≤X} a_n² g(y_n) ≤ Σ_{n≤X} a_n²(L−y_n) = L³/6 + O(L²)". -/ +/-- **[prop:PP], the g-sandwich, upper half** (§5.4, verbatim). -/ theorem sum_a2g_upper (hcheb : Zeta23.ChebyshevMertens) (hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => sumA2g p.X F.g ≤ p.L ^ 3 / 6 + C * p.L ^ 2) := sum_a2g_upper' hcheb hlam -end Results +/-- **General Abel summation against a continuous density `ρ` and error majorant `E`.** +If `c 0 = 0`, `|Σ_{k ≤ t} c_k − ∫_0^{log t} ρ| ≤ E(log t)` on `(1, e^L]`, and `g ∈ C¹` with +`|g'| ≤ 2` and `g ≡ 0` on `[L, ∞)`, then +`|Σ_{n ≤ e^L} c_n g(log n) − ∫_0^L g(y) ρ(y) dy| ≤ 2 · ∫_0^L E(y) dy`. -/ +theorem abel_sum_density_general {c : ℕ → ℝ} (hc0 : c 0 = 0) + {ρ E : ℝ → ℝ} (hρ : Continuous ρ) (hE : Continuous E) + {L : ℝ} (hL : 0 < L) + (hS : ∀ t ∈ Set.Ioc (1 : ℝ) (Real.exp L), + |(∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k) - ∫ y in (0 : ℝ)..Real.log t, ρ y| ≤ E (Real.log t)) + {g : ℝ → ℝ} (hgd : Differentiable ℝ g) (hg'c : Continuous (deriv g)) + (hg'le : ∀ y : ℝ, |deriv g y| ≤ 2) (hgsupp : ∀ y : ℝ, L ≤ y → g y = 0) : + |(∑ n ∈ Finset.Ioc 0 ⌊Real.exp L⌋₊, c n * g (Real.log n)) + - ∫ y in (0 : ℝ)..L, g y * ρ y| ≤ 2 * ∫ y in (0 : ℝ)..L, E y := by + classical + set X := Real.exp L with hX + have hX1 : 1 < X := by rw [hX]; exact Real.one_lt_exp_iff.2 hL + have hlogX : Real.log X = L := by rw [hX, Real.log_exp] + set f : ℝ → ℝ := fun t => g (Real.log t) with hfdef + have hfderiv : ∀ t : ℝ, 0 < t → HasDerivAt f (deriv g (Real.log t) / t) t := fun t ht => by + simpa [hfdef, Function.comp_def, div_eq_mul_inv] using + ((hgd (Real.log t)).hasDerivAt).comp t (Real.hasDerivAt_log ht.ne') + have hdiff : ∀ t ∈ Set.Icc (1 : ℝ) X, DifferentiableAt ℝ f t := fun t ht => + (hfderiv t (by linarith [ht.1])).differentiableAt + have hderiv_eq : Set.EqOn (deriv f) (fun t => deriv g (Real.log t) / t) (Set.Icc (1 : ℝ) X) := + fun t ht => (hfderiv t (by linarith [ht.1])).deriv + have hlogcont_pos : ContinuousOn Real.log {t : ℝ | 0 < t} := + Real.continuousOn_log.mono fun t ht => ne_of_gt ht + have hlogcont : ContinuousOn Real.log (Set.Icc (1 : ℝ) X) := + hlogcont_pos.mono fun t ht => show (0 : ℝ) < t by linarith [ht.1] + have hinvcont : ContinuousOn (fun t : ℝ => t⁻¹) (Set.Icc (1 : ℝ) X) := + continuousOn_inv₀.mono fun t ht => by have : (1 : ℝ) ≤ t := ht.1; exact ne_of_gt (by linarith) + have hint : IntegrableOn (deriv f) (Set.Icc (1 : ℝ) X) := by + apply IntegrableOn.congr_fun _ (fun t ht => (hderiv_eq ht).symm) measurableSet_Icc + apply ContinuousOn.integrableOn_compact isCompact_Icc + simp_rw [div_eq_mul_inv] + exact (hg'c.comp_continuousOn hlogcont).mul hinvcont + have hsubst : ∀ {h : ℝ → ℝ}, Continuous h → + ∫ t in (1 : ℝ)..X, h (Real.log t) / t = ∫ y in (0 : ℝ)..L, h y := by + intro h hh + have himg : Real.exp '' Set.uIcc (0 : ℝ) L ⊆ {t : ℝ | 0 < t} := by + rintro t ⟨y, _, rfl⟩; exact Real.exp_pos y + have hcont : ContinuousOn (fun t => h (Real.log t) / t) {t : ℝ | 0 < t} := + (hh.comp_continuousOn hlogcont_pos).div continuousOn_id fun t ht => ne_of_gt ht + have hcomp := intervalIntegral.integral_comp_mul_deriv' (f := Real.exp) (f' := Real.exp) + (g := fun t => h (Real.log t) / t) (a := (0 : ℝ)) (b := L) + (fun x _ => Real.hasDerivAt_exp x) Real.continuous_exp.continuousOn (hcont.mono himg) + rw [Real.exp_zero, show Real.exp L = X from rfl] at hcomp + rw [← hcomp] + refine intervalIntegral.integral_congr fun y _ => ?_ + simp only [Function.comp_apply, Real.log_exp] + have he : Real.exp y ≠ 0 := (Real.exp_pos y).ne' + field_simp + have habel := sum_mul_eq_sub_integral_mul₀ c hc0 (f := f) X hdiff hint + have hfX : f X = 0 := by show g (Real.log X) = 0; rw [hlogX]; exact hgsupp L le_rfl + rw [hfX, zero_mul, zero_sub] at habel + have hsum_eq : (∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, c n * g (Real.log n)) = + ∑ k ∈ Finset.Icc 0 ⌊X⌋₊, f k * c k := by + rw [Finset.Icc_eq_cons_Ioc (Nat.zero_le _), Finset.sum_cons, hc0, mul_zero, zero_add] + exact Finset.sum_congr rfl fun n _ => by rw [hfdef, mul_comm] + have hSIoc : ∀ t : ℝ, (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) = ∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k := fun t => by + rw [Finset.Icc_eq_cons_Ioc (Nat.zero_le _), Finset.sum_cons, hc0, zero_add] + set Iρ : ℝ → ℝ := fun u => ∫ y in (0 : ℝ)..u, ρ y with hIρ + have hIρderiv : ∀ u, HasDerivAt Iρ (ρ u) u := fun u => + (hρ.integral_hasStrictDerivAt 0 u).hasDerivAt + have hIρcont : Continuous Iρ := continuous_iff_continuousAt.2 fun u => (hIρderiv u).continuousAt + set M : ℝ → ℝ := fun t => Iρ (Real.log t) + have hi1 : IntegrableOn (fun t => deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) (Set.Ioc (1 : ℝ) X) := + (integrableOn_mul_sum_Icc c (by norm_num : (0 : ℝ) ≤ 1) hint).mono_set Set.Ioc_subset_Icc_self + have hi2 : IntegrableOn (fun t => deriv f t * M t) (Set.Ioc (1 : ℝ) X) := + (hint.mul_continuousOn (hIρcont.comp_continuousOn hlogcont) isCompact_Icc).mono_set + Set.Ioc_subset_Icc_self + have herr : |(∫ t in Set.Ioc (1 : ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) + - ∫ t in Set.Ioc (1 : ℝ) X, deriv f t * M t| ≤ 2 * ∫ y in (0 : ℝ)..L, E y := by + rw [← integral_sub hi1 hi2] + have hmajint : IntegrableOn (fun t : ℝ => 2 * (E (Real.log t) / t)) (Set.Ioc (1 : ℝ) X) := by + refine (ContinuousOn.integrableOn_compact isCompact_Icc ?_).mono_set Set.Ioc_subset_Icc_self + simp_rw [div_eq_mul_inv] + exact continuousOn_const.mul ((hE.comp_continuousOn hlogcont).mul hinvcont) + have hptw : ∀ t ∈ Set.Ioc (1 : ℝ) X, + |deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * M t| ≤ + 2 * (E (Real.log t) / t) := fun t ht => by + have ht0 : 0 < t := by linarith [ht.1] + have hfdabs : |deriv f t| ≤ 2 / t := by + rw [hderiv_eq ⟨ht.1.le, ht.2⟩, abs_div, abs_of_pos ht0] + exact div_le_div_of_nonneg_right (hg'le _) ht0.le + rw [← mul_sub, abs_mul, hSIoc t] + calc |deriv f t| * |(∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k) - M t| + ≤ (2 / t) * E (Real.log t) := + mul_le_mul hfdabs (hS t ht) (abs_nonneg _) (by positivity) + _ = 2 * (E (Real.log t) / t) := by ring + calc |∫ t in Set.Ioc (1 : ℝ) X, (deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * M t)| + ≤ ∫ t in Set.Ioc (1 : ℝ) X, 2 * (E (Real.log t) / t) := + abs_integral_le_integral_abs.trans + (setIntegral_mono_on (hi1.sub hi2).abs hmajint measurableSet_Ioc hptw) + _ = 2 * ∫ t in (1 : ℝ)..X, E (Real.log t) / t := by + rw [← intervalIntegral.integral_of_le hX1.le, intervalIntegral.integral_const_mul] + _ = 2 * ∫ y in (0 : ℝ)..L, E y := by rw [hsubst hE] + have hmain : ∫ t in Set.Ioc (1 : ℝ) X, deriv f t * M t = -∫ y in (0 : ℝ)..L, g y * ρ y := by + rw [← intervalIntegral.integral_of_le hX1.le, + intervalIntegral.integral_congr (g := fun t => (deriv g (Real.log t) * Iρ (Real.log t)) / t) + (fun t ht => by + rw [Set.uIcc_of_le hX1.le] at ht + simp only [M, hderiv_eq ht]; ring), + hsubst (h := fun y => deriv g y * Iρ y) (hg'c.mul hIρcont)] + have hparts := intervalIntegral.integral_mul_deriv_eq_deriv_mul + (u := g) (u' := deriv g) (v := Iρ) (v' := ρ) + (fun y _ => (hgd y).hasDerivAt) (fun y _ => hIρderiv y) + (hg'c.intervalIntegrable 0 L) (hρ.intervalIntegrable 0 L) + rw [hgsupp L le_rfl, show Iρ 0 = 0 by simp [hIρ]] at hparts + linarith + rw [hsum_eq, habel, show -(∫ t in Set.Ioc (1 : ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) + - ∫ y in (0 : ℝ)..L, g y * ρ y + = -((∫ t in Set.Ioc (1 : ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) + - ∫ t in Set.Ioc (1 : ℝ) X, deriv f t * M t) by rw [hmain]; ring, + abs_neg] + exact herr +end Results end PrimeSide end Zeta23 diff --git a/zeta23/Zeta23/PrimeSideB/PPKernel.lean b/zeta23/Zeta23/PrimeSideB/PPKernel.lean index 58f6460399..1d80f77f63 100644 --- a/zeta23/Zeta23/PrimeSideB/PPKernel.lean +++ b/zeta23/Zeta23/PrimeSideB/PPKernel.lean @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 Part of the Zeta23 formalization of the paper "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". -/ -import Zeta23.PrimeSideA.Defs +import Zeta23.PrimeSideA.Basic /-! # Kernel lemmas for [prop:PP] (§5.4) @@ -108,6 +108,31 @@ lemma mem_Ix {T x τ' : ℝ} : τ' ∈ Ix T x ↔ x + τ' ∈ Icc T (2 * T) ∧ · rintro ⟨⟨h1, h2⟩, h3, h4⟩; exact ⟨⟨by linarith, by linarith⟩, h2, h4⟩ · rintro ⟨⟨h1, h2⟩, h3, h4⟩; exact ⟨⟨by linarith, h3⟩, by linarith, h4⟩ +private lemma sheared_integrable (hΦ : Continuous Φ) {G : ℝ × ℝ → ℝ} (hG : Continuous G) : + Integrable (fun z : ℝ × ℝ => + (Icc T (2 * T) ×ˢ Icc T (2 * T)).indicator (fun q => Φ (q.1 - q.2) ^ 2 * G q) + (z.1 + z.2, z.2)) (volume.prod volume) := by + have hSm : MeasurableSet (Icc T (2 * T) ×ˢ Icc T (2 * T)) := + measurableSet_Icc.prod measurableSet_Icc + have hfint : IntegrableOn (fun q : ℝ × ℝ => Φ (q.1 - q.2) ^ 2 * G q) + (Icc T (2 * T) ×ˢ Icc T (2 * T)) := + (by fun_prop : Continuous fun q : ℝ × ℝ => Φ (q.1 - q.2) ^ 2 * G q).continuousOn.integrableOn_compact + (isCompact_Icc.prod isCompact_Icc) + have hind := (integrable_indicator_iff hSm).mpr hfint + have h := (measurePreserving_shear.integrable_comp_emb shearHomeo.measurableEmbedding).mpr hind + rwa [Measure.volume_eq_prod] at h + +private lemma sheared_indicator_eq (Φ : ℝ → ℝ) (T : ℝ) (G : ℝ × ℝ → ℝ) (x τ' : ℝ) : + (Icc T (2 * T) ×ˢ Icc T (2 * T)).indicator (fun q => Φ (q.1 - q.2) ^ 2 * G q) (x + τ', τ') + = (Ix T x).indicator (fun τ' => Φ x ^ 2 * G (x + τ', τ')) τ' := by + by_cases h : τ' ∈ Ix T x + · have h' : (x + τ', τ') ∈ Icc T (2 * T) ×ˢ Icc T (2 * T) := + Set.mk_mem_prod (mem_Ix.mp h).1 (mem_Ix.mp h).2 + rw [Set.indicator_of_mem h', Set.indicator_of_mem h] + simp + · have h' : (x + τ', τ') ∉ Icc T (2 * T) ×ˢ Icc T (2 * T) := fun hh => h (mem_Ix.mpr ⟨hh.1, hh.2⟩) + rw [Set.indicator_of_notMem h', Set.indicator_of_notMem h] + /-- **Shear + Fubini** (§5.4 "Substituting τ = τ'+x and noting that for fixed x the variable τ' ranges over I∩(I−x)"): for continuous `Φ`, `G`, `∬_{I×I} Φ(τ−τ')² G(τ,τ') d(τ,τ') = ∫_ℝ Φ(x)² (∫_{I∩(I−x)} G(x+τ', τ') dτ') dx`. @@ -115,70 +140,30 @@ The map `(x,τ') ↦ (x+τ',τ')` preserves Lebesgue measure on `ℝ²`. -/ lemma sqIntegral_shear (hΦ : Continuous Φ) {G : ℝ × ℝ → ℝ} (hG : Continuous G) : ∫ q in Icc T (2 * T) ×ˢ Icc T (2 * T), Φ (q.1 - q.2) ^ 2 * G q = ∫ x, Φ x ^ 2 * ∫ τ' in Ix T x, G (x + τ', τ') := by - set S := Icc T (2 * T) with hS - have hSm : MeasurableSet (S ×ˢ S) := measurableSet_Icc.prod measurableSet_Icc - set f : ℝ × ℝ → ℝ := fun q => Φ (q.1 - q.2) ^ 2 * G q with hf - have hfint : IntegrableOn f (S ×ˢ S) := by - apply ContinuousOn.integrableOn_compact (isCompact_Icc.prod isCompact_Icc) - apply Continuous.continuousOn; fun_prop - have hind : Integrable ((S ×ˢ S).indicator f) := (integrable_indicator_iff hSm).mpr hfint - have hemb : MeasurableEmbedding (fun z : ℝ × ℝ => (z.1 + z.2, z.2)) := - shearHomeo.measurableEmbedding - have hcomp : Integrable (fun z : ℝ × ℝ => (S ×ˢ S).indicator f (z.1 + z.2, z.2)) - (volume.prod volume) := by - have := (measurePreserving_shear.integrable_comp_emb hemb).mpr hind - rwa [Measure.volume_eq_prod] at this - -- pointwise identification of the sheared integrand - have hpt : ∀ x τ', (S ×ˢ S).indicator f (x + τ', τ') - = (Ix T x).indicator (fun τ' => Φ x ^ 2 * G (x + τ', τ')) τ' := by - intro x τ' - by_cases h : τ' ∈ Ix T x - · have h' : (x + τ', τ') ∈ S ×ˢ S := Set.mk_mem_prod (mem_Ix.mp h).1 (mem_Ix.mp h).2 - rw [Set.indicator_of_mem h', Set.indicator_of_mem h, hf] - simp - · have h' : (x + τ', τ') ∉ S ×ˢ S := fun hh => h (mem_Ix.mpr ⟨hh.1, hh.2⟩) - rw [Set.indicator_of_notMem h', Set.indicator_of_notMem h] - calc ∫ q in S ×ˢ S, f q - = ∫ q, (S ×ˢ S).indicator f q := (integral_indicator hSm).symm - _ = ∫ z : ℝ × ℝ, (S ×ˢ S).indicator f (z.1 + z.2, z.2) := - (measurePreserving_shear.integral_comp hemb _).symm - _ = ∫ x, ∫ τ', (S ×ˢ S).indicator f (x + τ', τ') := by - rw [Measure.volume_eq_prod, integral_prod _ hcomp] + have hSm : MeasurableSet (Icc T (2 * T) ×ˢ Icc T (2 * T)) := + measurableSet_Icc.prod measurableSet_Icc + calc ∫ q in Icc T (2 * T) ×ˢ Icc T (2 * T), Φ (q.1 - q.2) ^ 2 * G q + = ∫ q, (Icc T (2 * T) ×ˢ Icc T (2 * T)).indicator (fun q => Φ (q.1 - q.2) ^ 2 * G q) q := + (integral_indicator hSm).symm + _ = ∫ z : ℝ × ℝ, (Icc T (2 * T) ×ˢ Icc T (2 * T)).indicator + (fun q => Φ (q.1 - q.2) ^ 2 * G q) (z.1 + z.2, z.2) := + (measurePreserving_shear.integral_comp shearHomeo.measurableEmbedding _).symm + _ = ∫ x, ∫ τ', (Icc T (2 * T) ×ˢ Icc T (2 * T)).indicator + (fun q => Φ (q.1 - q.2) ^ 2 * G q) (x + τ', τ') := by + rw [Measure.volume_eq_prod, integral_prod _ (sheared_integrable hΦ hG)] _ = ∫ x, Φ x ^ 2 * ∫ τ' in Ix T x, G (x + τ', τ') := by refine integral_congr_ae (Filter.Eventually.of_forall fun x => ?_) - simp_rw [hpt x] + simp_rw [sheared_indicator_eq] rw [integral_indicator (measurableSet_Ix T x), integral_const_mul] /-- The sheared integrand is integrable in `x` (Fubini), so the outer integral above is a genuine Lebesgue integral. -/ lemma integrable_sq_mul_inner (hΦ : Continuous Φ) {G : ℝ × ℝ → ℝ} (hG : Continuous G) : Integrable (fun x => Φ x ^ 2 * ∫ τ' in Ix T x, G (x + τ', τ')) := by - set S := Icc T (2 * T) with hS - have hSm : MeasurableSet (S ×ˢ S) := measurableSet_Icc.prod measurableSet_Icc - set f : ℝ × ℝ → ℝ := fun q => Φ (q.1 - q.2) ^ 2 * G q with hf - have hfint : IntegrableOn f (S ×ˢ S) := by - apply ContinuousOn.integrableOn_compact (isCompact_Icc.prod isCompact_Icc) - apply Continuous.continuousOn; fun_prop - have hind : Integrable ((S ×ˢ S).indicator f) := (integrable_indicator_iff hSm).mpr hfint - have hemb : MeasurableEmbedding (fun z : ℝ × ℝ => (z.1 + z.2, z.2)) := - shearHomeo.measurableEmbedding - have hcomp : Integrable (fun z : ℝ × ℝ => (S ×ˢ S).indicator f (z.1 + z.2, z.2)) - (volume.prod volume) := by - have := (measurePreserving_shear.integrable_comp_emb hemb).mpr hind - rwa [Measure.volume_eq_prod] at this - have hpt : ∀ x τ', (S ×ˢ S).indicator f (x + τ', τ') - = (Ix T x).indicator (fun τ' => Φ x ^ 2 * G (x + τ', τ')) τ' := by - intro x τ' - by_cases h : τ' ∈ Ix T x - · have h' : (x + τ', τ') ∈ S ×ˢ S := Set.mk_mem_prod (mem_Ix.mp h).1 (mem_Ix.mp h).2 - rw [Set.indicator_of_mem h', Set.indicator_of_mem h, hf] - simp - · have h' : (x + τ', τ') ∉ S ×ˢ S := fun hh => h (mem_Ix.mpr ⟨hh.1, hh.2⟩) - rw [Set.indicator_of_notMem h', Set.indicator_of_notMem h] - have := hcomp.integral_prod_left - refine this.congr (Filter.Eventually.of_forall fun x => ?_) + refine (sheared_integrable (T := T) hΦ hG).integral_prod_left.congr + (Filter.Eventually.of_forall fun x => ?_) simp only - simp_rw [hpt x] + simp_rw [sheared_indicator_eq] rw [integral_indicator (measurableSet_Ix T x), integral_const_mul] /-- For `T ≥ 0` the window `I∩(I−x)` is empty unless `|x| ≤ T`; so the `x`-integral may be @@ -249,22 +234,26 @@ lemma abs_Jker_le {θ : ℝ} (hθ : θ ≠ 0) (c α β : ℝ) : |Jker θ c α β _ ≤ 1 + 1 := add_le_add (Real.abs_sin_le_one _) (Real.abs_sin_le_one _) _ = 2 := by norm_num +/-- Continuity of the phased Jker integrand in `x`. -/ +lemma continuous_Jker_offset_ph (θ y ψ T : ℝ) : + Continuous fun x : ℝ => Jker θ (x * y - ψ) (max (T - x) T) (min (2 * T - x) (2 * T)) := by + by_cases hθ : θ = 0 + · simp only [Jker, hθ, if_true]; fun_prop + · simp only [Jker, hθ, if_false]; fun_prop + /-- `J` as a function of the offset `x` (through `c = xy`, `α = max(T−x,T)`, `β = min(2T−x,2T)`) is continuous. -/ lemma continuous_Jker_offset (θ y T : ℝ) : Continuous fun x : ℝ => Jker θ (x * y) (max (T - x) T) (min (2 * T - x) (2 * T)) := by - by_cases hθ : θ = 0 - · simp only [Jker, hθ, if_true]; fun_prop - · simp only [Jker, hθ, if_false]; fun_prop + simpa using continuous_Jker_offset_ph θ y 0 T variable {T : ℝ} -/-- The inner integral of [eq:MPP] in closed form: for `|x| ≤ T`, -`∫_{I∩(I−x)} cos((x+τ')y) cos(τ'y') dτ' = ½ J(y−y', xy) + ½ J(y+y', xy)`. -/ -lemma inner_cos_cos (hT : 0 ≤ T) {x : ℝ} (hx : |x| ≤ T) (y y' : ℝ) : - ∫ τ' in Ix T x, Real.cos ((x + τ') * y) * Real.cos (τ' * y') - = (Jker (y - y') (x * y) (max (T - x) T) (min (2 * T - x) (2 * T)) - + Jker (y + y') (x * y) (max (T - x) T) (min (2 * T - x) (2 * T))) / 2 := by +/-- Product-to-sum with phases on the sheared window. -/ +lemma inner_cos_cos_ph (hT : 0 ≤ T) {x : ℝ} (hx : |x| ≤ T) (y y' φ φ' : ℝ) : + ∫ τ' in Ix T x, Real.cos ((x + τ') * y - φ) * Real.cos (τ' * y' - φ') + = (Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) + + Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) / 2 := by have hle := Ix_le hT hx unfold Ix rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hle, @@ -278,6 +267,14 @@ lemma inner_cos_cos (hT : 0 ≤ T) {x : ℝ} (hx : |x| ≤ T) (y y' : ℝ) : rw [cos_mul_cos_eq] congr 2 <;> (congr 1; ring) +/-- The inner integral of [eq:MPP] in closed form: for `|x| ≤ T`, +`∫_{I∩(I−x)} cos((x+τ')y) cos(τ'y') dτ' = ½ J(y−y', xy) + ½ J(y+y', xy)`. -/ +lemma inner_cos_cos (hT : 0 ≤ T) {x : ℝ} (hx : |x| ≤ T) (y y' : ℝ) : + ∫ τ' in Ix T x, Real.cos ((x + τ') * y) * Real.cos (τ' * y') + = (Jker (y - y') (x * y) (max (T - x) T) (min (2 * T - x) (2 * T)) + + Jker (y + y') (x * y) (max (T - x) T) (min (2 * T - x) (2 * T))) / 2 := by + simpa using inner_cos_cos_ph hT hx y y' 0 0 + end CosIntegral /-! ## Per-frequency-pair decomposition of `𝓜[cos(·y), cos(·y')]` ([eq:MPP], §5.4) -/ @@ -300,6 +297,25 @@ the two halves of 𝓜[cos(·y),cos(·y')] ([eq:MPP]: first / second inner integ def Aminus (Φ : ℝ → ℝ) (T y y' : ℝ) : ℝ := ∫ x in Icc (-T) T, Φ x ^ 2 * JmK T y y' x def Aplus (Φ : ℝ → ℝ) (T y y' : ℝ) : ℝ := ∫ x in Icc (-T) T, Φ x ^ 2 * JpK T y y' x +/-- A⁻ with phases. -/ +def AminusPh (Φ : ℝ → ℝ) (T y y' φ φ' : ℝ) : ℝ := + ∫ x in Icc (-T) T, + Φ x ^ 2 * Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) + +/-- A⁺ with phases. -/ +def AplusPh (Φ : ℝ → ℝ) (T y y' φ φ' : ℝ) : ℝ := + ∫ x in Icc (-T) T, + Φ x ^ 2 * Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) + +/-- Equal phases: `AminusPh = Aminus` (the diagonal case). -/ +lemma AminusPh_self (y y' φ : ℝ) : AminusPh Φ T y y' φ φ = Aminus Φ T y y' := by + unfold AminusPh Aminus JmK + simp only [sub_self, sub_zero] + +lemma AplusPh_zero (y y' : ℝ) : AplusPh Φ T y y' 0 0 = Aplus Φ T y y' := by + unfold AplusPh Aplus JpK + simp only [add_zero, sub_zero] + lemma not_mem_Icc_neg {x : ℝ} (hx : x ∉ Icc (-T) T) : T < |x| := by simp only [Set.mem_Icc, not_and_or, not_le] at hx rcases hx with h | h @@ -308,15 +324,15 @@ lemma not_mem_Icc_neg {x : ℝ} (hx : x ∉ Icc (-T) T) : T < |x| := by · rw [abs_of_nonneg hx0]; linarith · exact lt_of_lt_of_le h (le_abs_self x) -/-- **[eq:MPP] per pair** (§5.4): for T ≥ 0, -𝓜[cos(·y), cos(·y')] = ½ A⁻(y,y') + ½ A⁺(y,y'). -/ -lemma Mform_cos_cos (hT : 0 ≤ T) (hΦ : Continuous Φ) (y y' : ℝ) : - Mform Φ T (fun τ => Real.cos (τ * y)) (fun τ => Real.cos (τ * y')) - = (Aminus Φ T y y' + Aplus Φ T y y') / 2 := by - unfold Mform Aminus Aplus - have h1 : (fun q : ℝ × ℝ => Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * y) * Real.cos (q.2 * y')) +/-- [eq:MPP] per pair with phases: for `T ≥ 0`, +`M[cos(·y − φ), cos(·y' − φ')] = ½ A⁻_ph + ½ A⁺_ph`. -/ +lemma Mform_cos_cos_ph (hT : 0 ≤ T) (hΦ : Continuous Φ) (y y' φ φ' : ℝ) : + Mform Φ T (fun τ => Real.cos (τ * y - φ)) (fun τ => Real.cos (τ * y' - φ')) + = (AminusPh Φ T y y' φ φ' + AplusPh Φ T y y' φ φ') / 2 := by + unfold Mform AminusPh AplusPh + have h1 : (fun q : ℝ × ℝ => Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * y - φ) * Real.cos (q.2 * y' - φ')) = fun q => Φ (q.1 - q.2) ^ 2 * - (fun q : ℝ × ℝ => Real.cos (q.1 * y) * Real.cos (q.2 * y')) q := by + (fun q : ℝ × ℝ => Real.cos (q.1 * y - φ) * Real.cos (q.2 * y' - φ')) q := by funext q; ring rw [h1, sqIntegral_shear hΦ (by fun_prop)] rw [← setIntegral_eq_integral_of_forall_compl_eq_zero (s := Icc (-T) T) ?zero] @@ -324,14 +340,22 @@ lemma Mform_cos_cos (hT : 0 ≤ T) (hΦ : Continuous Φ) (y y' : ℝ) : intro x hx rw [Ix_eq_empty hT (not_mem_Icc_neg hx)]; simp have h2 : ∀ x ∈ Icc (-T) T, - Φ x ^ 2 * ∫ τ' in Ix T x, Real.cos ((x + τ') * y) * Real.cos (τ' * y') - = (Φ x ^ 2 * JmK T y y' x + Φ x ^ 2 * JpK T y y' x) / 2 := by + Φ x ^ 2 * ∫ τ' in Ix T x, Real.cos ((x + τ') * y - φ) * Real.cos (τ' * y' - φ') + = (Φ x ^ 2 * Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) + + Φ x ^ 2 * Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) / 2 := by intro x hx - rw [inner_cos_cos hT (abs_le.mpr ⟨by linarith [hx.1], hx.2⟩)] - unfold JmK JpK; ring + rw [inner_cos_cos_ph hT (abs_le.mpr ⟨by linarith [hx.1], hx.2⟩)] + ring rw [setIntegral_congr_fun measurableSet_Icc h2, integral_div, integral_add] - · exact ((hΦ.pow 2).mul (continuous_JmK T y y')).integrableOn_Icc - · exact ((hΦ.pow 2).mul (continuous_JpK T y y')).integrableOn_Icc + · exact ((hΦ.pow 2).mul (continuous_Jker_offset_ph _ _ _ _)).integrableOn_Icc + · exact ((hΦ.pow 2).mul (continuous_Jker_offset_ph _ _ _ _)).integrableOn_Icc + +/-- **[eq:MPP] per pair** (§5.4): for T ≥ 0, +𝓜[cos(·y), cos(·y')] = ½ A⁻(y,y') + ½ A⁺(y,y'). -/ +lemma Mform_cos_cos (hT : 0 ≤ T) (hΦ : Continuous Φ) (y y' : ℝ) : + Mform Φ T (fun τ => Real.cos (τ * y)) (fun τ => Real.cos (τ * y')) + = (Aminus Φ T y y' + Aplus Φ T y y') / 2 := by + simpa [AminusPh_self, AplusPh_zero] using Mform_cos_cos_ph hT hΦ y y' 0 0 /-! ### The diagonal 𝒟 (§5.4) -/ @@ -383,30 +407,38 @@ lemma abs_Aminus_diag_sub_le (hT : 0 ≤ T) (hΦ : Continuous Φ) /-! ### The sum-frequency terms 𝒪₂ (§5.4) -/ -/-- **𝒪₂, per pair** (§5.4: "|∫(nm)^{iτ'}dτ'| ≤ 2/log(nm)"): for y + y' > 0, -|A⁺(y,y')| ≤ (2/(y+y')) ∫_ℝ Φ². -/ -lemma abs_Aplus_le (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) {y y' : ℝ} - (hyy : 0 < y + y') : - |Aplus Φ T y y'| ≤ 2 / (y + y') * ∫ x, Φ x ^ 2 := by - unfold Aplus +/-- O₂-type bound, phase-free: for `0 < y + y'`, `|A⁺_ph(y,y',φ,φ')| ≤ (2/(y+y'))·∫Φ²`. -/ +lemma abs_AplusPh_le (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) {y y' : ℝ} + (hyy : 0 < y + y') (φ φ' : ℝ) : + |AplusPh Φ T y y' φ φ'| ≤ 2 / (y + y') * ∫ x, Φ x ^ 2 := by + unfold AplusPh have hne : y + y' ≠ 0 := hyy.ne' - have hint : IntegrableOn (fun x => Φ x ^ 2 * JpK T y y' x) (Icc (-T) T) := - ((hΦ.pow 2).mul (continuous_JpK T y y')).integrableOn_Icc - calc |∫ x in Icc (-T) T, Φ x ^ 2 * JpK T y y' x| - ≤ ∫ x in Icc (-T) T, |Φ x ^ 2 * JpK T y y' x| := abs_integral_le_integral_abs + have hint : IntegrableOn (fun x => Φ x ^ 2 * + Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) (Icc (-T) T) := + ((hΦ.pow 2).mul (continuous_Jker_offset_ph _ _ _ _)).integrableOn_Icc + calc |∫ x in Icc (-T) T, Φ x ^ 2 * + Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))| + ≤ ∫ x in Icc (-T) T, |Φ x ^ 2 * + Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))| := + abs_integral_le_integral_abs _ ≤ ∫ x in Icc (-T) T, Φ x ^ 2 * (2 / (y + y')) := by apply setIntegral_mono_on hint.abs (hΦ2.integrableOn.mul_const _) measurableSet_Icc intro x _ rw [abs_mul, abs_of_nonneg (sq_nonneg _)] refine mul_le_mul_of_nonneg_left ?_ (sq_nonneg _) - have := abs_Jker_le hne (x * y) (max (T - x) T) (min (2 * T - x) (2 * T)) - rw [abs_of_pos hyy] at this - exact this + have h := abs_Jker_le hne (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) + rwa [abs_of_pos hyy] at h _ = 2 / (y + y') * ∫ x in Icc (-T) T, Φ x ^ 2 := by rw [integral_mul_const]; ring _ ≤ 2 / (y + y') * ∫ x, Φ x ^ 2 := by apply mul_le_mul_of_nonneg_left _ (by positivity) exact setIntegral_le_integral hΦ2 (Filter.Eventually.of_forall fun x => sq_nonneg _) +/-- **𝒪₂, per pair** (§5.4): for `y + y' > 0`, `|A⁺(y,y')| ≤ (2/(y+y')) ∫_ℝ Φ²`. -/ +lemma abs_Aplus_le (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) {y y' : ℝ} + (hyy : 0 < y + y') : + |Aplus Φ T y y'| ≤ 2 / (y + y') * ∫ x, Φ x ^ 2 := by + simpa [AplusPh_zero] using abs_AplusPh_le hΦ hΦ2 hyy 0 0 + /-! ### The difference-frequency terms 𝒪₁, exact evaluation (§5.4) -/ /-- The four half-line trigonometric moments of Φ² (the paper's α_n^±, §5.4, split into @@ -435,57 +467,75 @@ lemma integral_sq_mul_sin_sub_sin (hΦ : Continuous Φ) (a b c₁ c₂ y y' : intervalIntegral.integral_const_mul, intervalIntegral.integral_const_mul] all_goals apply Continuous.intervalIntegrable; fun_prop -/-- **𝒪₁, per pair, exact** (§5.4): for θ := y − y' ≠ 0 and T ≥ 0, -θ·A⁻(y,y') = [sin2θT·C⁻(y) + cos2θT·S⁻(y)] − [sinθT·C⁻(y') + cosθT·S⁻(y')] - + [sin2θT·C⁺(y') + cos2θT·S⁺(y')] − [sinθT·C⁺(y) + cosθT·S⁺(y)]. -(Paper: "n^{ix}(n/m)^{−ix⁺} equals m^{ix} for x>0 and n^{ix} for x<0 …"; we split [−T,T] at 0: -on x ≤ 0 the window is [T−x, 2T], on x ≥ 0 it is [T, 2T−x].) -/ -lemma sub_mul_Aminus_eq (hT : 0 ≤ T) (hΦ : Continuous Φ) {y y' : ℝ} (hθ : y - y' ≠ 0) : - (y - y') * Aminus Φ T y y' - = (Real.sin ((y - y') * (2 * T)) * Cm Φ T y + Real.cos ((y - y') * (2 * T)) * Sm Φ T y - - (Real.sin ((y - y') * T) * Cm Φ T y' + Real.cos ((y - y') * T) * Sm Φ T y')) - + (Real.sin ((y - y') * (2 * T)) * Cp Φ T y' + Real.cos ((y - y') * (2 * T)) * Sp Φ T y' - - (Real.sin ((y - y') * T) * Cp Φ T y + Real.cos ((y - y') * T) * Sp Φ T y)) := by - unfold Aminus Cm Sm Cp Sp - have hcont : Continuous fun x => Φ x ^ 2 * ((y - y') * JmK T y y' x) := by - have := continuous_JmK T y y'; fun_prop +/-- O₁-type exact evaluation with phases: for θ := y − y' ≠ 0, T ≥ 0, ψ := φ − φ'. -/ +lemma sub_mul_AminusPh_eq (hT : 0 ≤ T) (hΦ : Continuous Φ) {y y' : ℝ} (hθ : y - y' ≠ 0) + (φ φ' : ℝ) : + (y - y') * AminusPh Φ T y y' φ φ' + = (Real.sin ((y - y') * (2 * T) - (φ - φ')) * Cm Φ T y + + Real.cos ((y - y') * (2 * T) - (φ - φ')) * Sm Φ T y + - (Real.sin ((y - y') * T - (φ - φ')) * Cm Φ T y' + + Real.cos ((y - y') * T - (φ - φ')) * Sm Φ T y')) + + (Real.sin ((y - y') * (2 * T) - (φ - φ')) * Cp Φ T y' + + Real.cos ((y - y') * (2 * T) - (φ - φ')) * Sp Φ T y' + - (Real.sin ((y - y') * T - (φ - φ')) * Cp Φ T y + + Real.cos ((y - y') * T - (φ - φ')) * Sp Φ T y)) := by + unfold AminusPh Cm Sm Cp Sp + have hcont : Continuous fun x => Φ x ^ 2 * ((y - y') * + Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) := by + have := continuous_Jker_offset_ph (y - y') y (φ - φ') T; fun_prop rw [← integral_const_mul] - have e1 : ∀ x, (y - y') * (Φ x ^ 2 * JmK T y y' x) = Φ x ^ 2 * ((y - y') * JmK T y y' x) := by + have e1 : ∀ x, (y - y') * (Φ x ^ 2 * + Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) + = Φ x ^ 2 * ((y - y') * + Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) := by intro x; ring simp_rw [e1] rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by linarith : -T ≤ T), ← intervalIntegral.integral_add_adjacent_intervals (b := 0) (hcont.intervalIntegrable _ _) (hcont.intervalIntegrable _ _)] - -- left half: x ∈ [−T, 0], window [T−x, 2T] - have hL : ∫ x in (-T)..0, Φ x ^ 2 * ((y - y') * JmK T y y' x) - = ∫ x in (-T)..0, Φ x ^ 2 * (Real.sin ((y - y') * (2 * T) + x * y) - - Real.sin ((y - y') * T + x * y')) := by + have hL : ∫ x in (-T)..0, Φ x ^ 2 * ((y - y') * + Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) + = ∫ x in (-T)..0, Φ x ^ 2 * (Real.sin (((y - y') * (2 * T) - (φ - φ')) + x * y) + - Real.sin (((y - y') * T - (φ - φ')) + x * y')) := by apply intervalIntegral.integral_congr intro x hx rw [Set.uIcc_of_le (by linarith : -T ≤ 0)] at hx simp only congr 1 - unfold JmK rw [max_eq_left (by linarith [hx.2]), min_eq_right (by linarith [hx.2]), Jker_of_ne hθ, mul_div_cancel₀ _ hθ] congr 1 - rw [show (y - y') * (T - x) + x * y = (y - y') * T + x * y' by ring] - -- right half: x ∈ [0, T], window [T, 2T−x] - have hR : ∫ x in (0:ℝ)..T, Φ x ^ 2 * ((y - y') * JmK T y y' x) - = ∫ x in (0:ℝ)..T, Φ x ^ 2 * (Real.sin ((y - y') * (2 * T) + x * y') - - Real.sin ((y - y') * T + x * y)) := by + · rw [show (y - y') * (2 * T) + (x * y - (φ - φ')) = + ((y - y') * (2 * T) - (φ - φ')) + x * y by ring] + · rw [show (y - y') * (T - x) + (x * y - (φ - φ')) = + ((y - y') * T - (φ - φ')) + x * y' by ring] + have hR : ∫ x in (0:ℝ)..T, Φ x ^ 2 * ((y - y') * + Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) + = ∫ x in (0:ℝ)..T, Φ x ^ 2 * (Real.sin (((y - y') * (2 * T) - (φ - φ')) + x * y') + - Real.sin (((y - y') * T - (φ - φ')) + x * y)) := by apply intervalIntegral.integral_congr intro x hx rw [Set.uIcc_of_le hT] at hx simp only congr 1 - unfold JmK rw [max_eq_right (by linarith [hx.1]), min_eq_left (by linarith [hx.1]), Jker_of_ne hθ, mul_div_cancel₀ _ hθ] congr 1 - rw [show (y - y') * (2 * T - x) + x * y = (y - y') * (2 * T) + x * y' by ring] + · rw [show (y - y') * (2 * T - x) + (x * y - (φ - φ')) = + ((y - y') * (2 * T) - (φ - φ')) + x * y' by ring] + · rw [show (y - y') * T + (x * y - (φ - φ')) = + ((y - y') * T - (φ - φ')) + x * y by ring] rw [hL, hR, integral_sq_mul_sin_sub_sin hΦ, integral_sq_mul_sin_sub_sin hΦ] +/-- **𝒪₁, per pair, exact** (§5.4): for θ := y − y' ≠ 0 and T ≥ 0. -/ +lemma sub_mul_Aminus_eq (hT : 0 ≤ T) (hΦ : Continuous Φ) {y y' : ℝ} (hθ : y - y' ≠ 0) : + (y - y') * Aminus Φ T y y' + = (Real.sin ((y - y') * (2 * T)) * Cm Φ T y + Real.cos ((y - y') * (2 * T)) * Sm Φ T y + - (Real.sin ((y - y') * T) * Cm Φ T y' + Real.cos ((y - y') * T) * Sm Φ T y')) + + (Real.sin ((y - y') * (2 * T)) * Cp Φ T y' + Real.cos ((y - y') * (2 * T)) * Sp Φ T y' + - (Real.sin ((y - y') * T) * Cp Φ T y + Real.cos ((y - y') * T) * Sp Φ T y)) := by + simpa [AminusPh_self, sub_zero] using sub_mul_AminusPh_eq hT hΦ hθ 0 0 + /-- Each half-line moment is bounded by ∫_ℝ Φ² (the paper's |α_n^±| ≤ πbL, §5.4; we use the cruder ≤ ∫Φ² = 2πbL, constants being immaterial). -/ lemma abs_halfMoment_le (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) {a b : ℝ} @@ -601,23 +651,23 @@ lemma MV_primeRange (hMV : Zeta23.MVHilbert C) (X : ℝ) (x z : ℕ → ℂ) : exact inv_two_mul_le_abs_log_sub (one_le_of_mem_primeRange r.2) (one_le_of_mem_primeRange s.2) (fun h => hrs (Subtype.ext h)) -/-- **Real form used for 𝒪₁** (§5.4: "a combination of four sums of the shape -Σ_{n≠m} x_n z̄_m/(y_n−y_m) … for instance the first is Σ_{n≠m}(a_n n^{2iT}) conj(a_m m^{2iT} ᾱ_m^+)/(y_n−y_m)"): -for real weights u, v and a real phase c, both - Σ_{n≠m} u_n v_m cos(c(y_n−y_m))/(y_n−y_m) and Σ_{n≠m} u_n v_m sin(c(y_n−y_m))/(y_n−y_m) -(= Re, Im of the MV bilinear form with x_n = u_n e^{icy_n}, z_m = v_m e^{icy_m}) are bounded by -C (Σ 2n u_n²)^{1/2} (Σ 2n v_n²)^{1/2}. -/ -lemma MV_real (hMV : Zeta23.MVHilbert C) (X c : ℝ) (u v : ℕ → ℝ) : +/-- H-MV with a per-index phase: for real weights u, v and phases φv, both trig sums +Σ_{n≠m} u_n v_m·trig(cc(y_n−y_m) − (φv_n − φv_m))/(y_n−y_m) obey the H-MV bound. -/ +lemma MV_real_ph (hMV : Zeta23.MVHilbert C) (X cc : ℝ) (u v φv : ℕ → ℝ) : |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - u n * v m * Real.cos (c * (Real.log n - Real.log m)) / (Real.log n - Real.log m))| + u n * v m * Real.cos (cc * (Real.log n - Real.log m) - (φv n - φv m)) + / (Real.log n - Real.log m))| ≤ C * Real.sqrt (∑ n ∈ primeRange X, u n ^ 2 * (2 * n)) * Real.sqrt (∑ n ∈ primeRange X, v n ^ 2 * (2 * n)) ∧ |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - u n * v m * Real.sin (c * (Real.log n - Real.log m)) / (Real.log n - Real.log m))| + u n * v m * Real.sin (cc * (Real.log n - Real.log m) - (φv n - φv m)) + / (Real.log n - Real.log m))| ≤ C * Real.sqrt (∑ n ∈ primeRange X, u n ^ 2 * (2 * n)) * Real.sqrt (∑ n ∈ primeRange X, v n ^ 2 * (2 * n)) := by - set x : ℕ → ℂ := fun n => (u n : ℂ) * Complex.exp ((c * Real.log n : ℝ) * Complex.I) with hx - set z : ℕ → ℂ := fun n => (v n : ℂ) * Complex.exp ((c * Real.log n : ℝ) * Complex.I) with hz + set x : ℕ → ℂ := fun n => (u n : ℂ) + * Complex.exp ((cc * Real.log n - φv n : ℝ) * Complex.I) with hx + set z : ℕ → ℂ := fun n => (v n : ℂ) + * Complex.exp ((cc * Real.log n - φv n : ℝ) * Complex.I) with hz have key := MV_primeRange hMV X x z have hnx : ∀ n, ‖x n‖ ^ 2 = u n ^ 2 := by intro n @@ -629,11 +679,12 @@ lemma MV_real (hMV : Zeta23.MVHilbert C) (X c : ℝ) (u v : ℕ → ℝ) : Real.norm_eq_abs, sq_abs] simp_rw [hnx, hnz] at key have hprod : ∀ n m, x n * conj (z m) - = ((u n * v m : ℝ) : ℂ) * Complex.exp ((c * (Real.log n - Real.log m) : ℝ) * Complex.I) := by + = ((u n * v m : ℝ) : ℂ) + * Complex.exp ((cc * (Real.log n - Real.log m) - (φv n - φv m) : ℝ) * Complex.I) := by intro n m - have harg : ((c * Real.log n : ℝ) : ℂ) * Complex.I - + ((c * Real.log m : ℝ) : ℂ) * (starRingEnd ℂ) Complex.I - = ((c * (Real.log n - Real.log m) : ℝ) : ℂ) * Complex.I := by + have harg : ((cc * Real.log n - φv n : ℝ) : ℂ) * Complex.I + + ((cc * Real.log m - φv m : ℝ) : ℂ) * (starRingEnd ℂ) Complex.I + = ((cc * (Real.log n - Real.log m) - (φv n - φv m) : ℝ) : ℂ) * Complex.I := by rw [Complex.conj_I]; push_cast; ring simp only [hx, hz, map_mul, Complex.conj_ofReal, ← Complex.exp_conj] rw [mul_mul_mul_comm, ← Complex.exp_add, harg] @@ -641,7 +692,8 @@ lemma MV_real (hMV : Zeta23.MVHilbert C) (X c : ℝ) (u v : ℕ → ℝ) : have hre : (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℂ) else x n * conj (z m) / ((Real.log n - Real.log m : ℝ) : ℂ))).re = ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - u n * v m * Real.cos (c * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) := by + u n * v m * Real.cos (cc * (Real.log n - Real.log m) - (φv n - φv m)) + / (Real.log n - Real.log m)) := by rw [Complex.re_sum] refine Finset.sum_congr rfl fun n _ => ?_ rw [Complex.re_sum] @@ -652,7 +704,8 @@ lemma MV_real (hMV : Zeta23.MVHilbert C) (X c : ℝ) (u v : ℕ → ℝ) : have him : (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℂ) else x n * conj (z m) / ((Real.log n - Real.log m : ℝ) : ℂ))).im = ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - u n * v m * Real.sin (c * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) := by + u n * v m * Real.sin (cc * (Real.log n - Real.log m) - (φv n - φv m)) + / (Real.log n - Real.log m)) := by rw [Complex.im_sum] refine Finset.sum_congr rfl fun n _ => ?_ rw [Complex.im_sum] @@ -664,51 +717,568 @@ lemma MV_real (hMV : Zeta23.MVHilbert C) (X c : ℝ) (u v : ℕ → ℝ) : · rw [← hre]; exact (Complex.abs_re_le_norm _).trans key · rw [← him]; exact (Complex.abs_im_le_norm _).trans key -/-- The size of the MV bound for our weights (§5.4 "each of the four is at most -(3π/2)·πL·Σ_n a_n²/δ_n ≪ L²X"): with u = a and v = a·w (or vice versa), |w| ≤ W, -C (Σ 2n u_n²)^{1/2} (Σ 2n v_n²)^{1/2} ≤ 2 C W Σ_{n≤X} Λ(n)². -/ -lemma MV_size_le (hC : 0 ≤ C) (X : ℝ) {w : ℕ → ℝ} {W : ℝ} (hW : 0 ≤ W) - (hw : ∀ n ∈ primeRange X, |w n| ≤ W) : - C * Real.sqrt (∑ n ∈ primeRange X, acoef n ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w n) ^ 2 * (2 * n)) - ≤ 2 * C * W * ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 ∧ - C * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w n) ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, acoef n ^ 2 * (2 * n)) - ≤ 2 * C * W * ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 := by - set Λ2 := ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 with hΛ2 - have hΛ2nn : 0 ≤ Λ2 := Finset.sum_nonneg fun n _ => sq_nonneg _ - have h1 : ∑ n ∈ primeRange X, acoef n ^ 2 * (2 * n) = 2 * Λ2 := by - rw [hΛ2, Finset.mul_sum] - exact Finset.sum_congr rfl fun n hn => acoef_sq_mul_two_mul (one_le_of_mem_primeRange hn) - have h2 : ∑ n ∈ primeRange X, (acoef n * w n) ^ 2 * (2 * n) ≤ W ^ 2 * (2 * Λ2) := by - rw [hΛ2, Finset.mul_sum, Finset.mul_sum] +/-- **Real form used for 𝒪₁** (§5.4): phase-free specialisation of `MV_real_ph`. -/ +lemma MV_real (hMV : Zeta23.MVHilbert C) (X c : ℝ) (u v : ℕ → ℝ) : + |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + u n * v m * Real.cos (c * (Real.log n - Real.log m)) / (Real.log n - Real.log m))| + ≤ C * Real.sqrt (∑ n ∈ primeRange X, u n ^ 2 * (2 * n)) + * Real.sqrt (∑ n ∈ primeRange X, v n ^ 2 * (2 * n)) ∧ + |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + u n * v m * Real.sin (c * (Real.log n - Real.log m)) / (Real.log n - Real.log m))| + ≤ C * Real.sqrt (∑ n ∈ primeRange X, u n ^ 2 * (2 * n)) + * Real.sqrt (∑ n ∈ primeRange X, v n ^ 2 * (2 * n)) := by + simpa using MV_real_ph hMV X c u v (fun _ => 0) + +end MVapply + +/-- Diagonal / off-diagonal split of a double sum. -/ +lemma sum_sum_eq_diag_add_offdiag (S : Finset ℕ) (f : ℕ → ℕ → ℝ) : + ∑ n ∈ S, ∑ m ∈ S, f n m + = ∑ n ∈ S, f n n + ∑ n ∈ S, ∑ m ∈ S, (if n = m then 0 else f n m) := by + rw [← Finset.sum_add_distrib] + refine Finset.sum_congr rfl fun n hn => ?_ + have e : ∀ m, f n m = (if n = m then f n m else 0) + (if n = m then 0 else f n m) := by + intro m; split_ifs <;> simp + rw [Finset.sum_congr rfl (fun m _ => e m), Finset.sum_add_distrib, Finset.sum_ite_eq, if_pos hn] + +/-! ## Weighted / phased O₁ (generic in w, φ) -/ + +section WeightedO1 +variable {Φ : ℝ → ℝ} {T : ℝ} + +/-- H-MV size bookkeeping for a general weight (mirror of MV_size_le₂): if |M_n| ≤ W on the range then + C·√(Σ (w_n M_n)²·2n)·√(Σ w_n²·2n) ≤ 2CW·Σ w_n² n (both slot orders). -/ +lemma MV_size_le_w {C : ℝ} (hC : 0 ≤ C) (X : ℝ) (w : ℕ → ℝ) {M : ℕ → ℝ} {W : ℝ} (hW : 0 ≤ W) + (hM : ∀ n ∈ primeRange X, |M n| ≤ W) : + C * Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) + * Real.sqrt (∑ n ∈ primeRange X, w n ^ 2 * (2 * n)) + ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n ∧ + C * Real.sqrt (∑ n ∈ primeRange X, w n ^ 2 * (2 * n)) + * Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) + ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n := by + set S := ∑ n ∈ primeRange X, w n ^ 2 * n with hS + have hSnn : 0 ≤ S := Finset.sum_nonneg fun n _ => mul_nonneg (sq_nonneg _) (Nat.cast_nonneg _) + have h2S : ∑ n ∈ primeRange X, w n ^ 2 * (2 * n) = 2 * S := by + rw [hS, Finset.mul_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + ring + have hMS : ∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n) ≤ W ^ 2 * (2 * S) := by + rw [← h2S, Finset.mul_sum] refine Finset.sum_le_sum fun n hn => ?_ - rw [mul_pow, mul_comm (acoef n ^ 2), mul_assoc, acoef_sq_mul_two_mul (one_le_of_mem_primeRange hn)] - apply mul_le_mul_of_nonneg_right _ (by positivity) - exact (sq_abs (w n)).symm ▸ pow_le_pow_left₀ (abs_nonneg _) (hw n hn) 2 - have hs1 : Real.sqrt (∑ n ∈ primeRange X, acoef n ^ 2 * (2 * n)) = Real.sqrt (2 * Λ2) := by - rw [h1] - have hs2 : Real.sqrt (∑ n ∈ primeRange X, (acoef n * w n) ^ 2 * (2 * n)) - ≤ W * Real.sqrt (2 * Λ2) := by - calc Real.sqrt (∑ n ∈ primeRange X, (acoef n * w n) ^ 2 * (2 * n)) - ≤ Real.sqrt (W ^ 2 * (2 * Λ2)) := Real.sqrt_le_sqrt h2 - _ = W * Real.sqrt (2 * Λ2) := by rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq hW] - have hsq : Real.sqrt (2 * Λ2) * Real.sqrt (2 * Λ2) = 2 * Λ2 := - Real.mul_self_sqrt (by positivity) - have hsnn : 0 ≤ Real.sqrt (2 * Λ2) := Real.sqrt_nonneg _ + have hM2 : M n ^ 2 ≤ W ^ 2 := by + rw [← sq_abs (M n)] + exact pow_le_pow_left₀ (abs_nonneg _) (hM n hn) 2 + have hnn : 0 ≤ w n ^ 2 * (2 * n) := mul_nonneg (sq_nonneg _) (by positivity) + calc (w n * M n) ^ 2 * (2 * n) = M n ^ 2 * (w n ^ 2 * (2 * n)) := by ring + _ ≤ W ^ 2 * (w n ^ 2 * (2 * n)) := mul_le_mul_of_nonneg_right hM2 hnn + have hs1 : Real.sqrt (∑ n ∈ primeRange X, w n ^ 2 * (2 * n)) = Real.sqrt (2 * S) := by rw [h2S] + have hs2 : Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) ≤ W * Real.sqrt (2 * S) := by + calc Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) + ≤ Real.sqrt (W ^ 2 * (2 * S)) := Real.sqrt_le_sqrt hMS + _ = W * Real.sqrt (2 * S) := by rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq hW] + have hsq : Real.sqrt (2 * S) * Real.sqrt (2 * S) = 2 * S := Real.mul_self_sqrt (by positivity) + have h2Snn : 0 ≤ Real.sqrt (2 * S) := Real.sqrt_nonneg _ constructor · rw [hs1] - calc C * Real.sqrt (2 * Λ2) * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w n) ^ 2 * (2 * n)) - ≤ C * Real.sqrt (2 * Λ2) * (W * Real.sqrt (2 * Λ2)) := by gcongr - _ = C * W * (Real.sqrt (2 * Λ2) * Real.sqrt (2 * Λ2)) := by ring - _ = 2 * C * W * Λ2 := by rw [hsq]; ring + calc C * Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) * Real.sqrt (2 * S) + ≤ C * (W * Real.sqrt (2 * S)) * Real.sqrt (2 * S) := by + apply mul_le_mul_of_nonneg_right _ h2Snn + exact mul_le_mul_of_nonneg_left hs2 hC + _ = C * W * (Real.sqrt (2 * S) * Real.sqrt (2 * S)) := by ring + _ = 2 * C * W * S := by rw [hsq]; ring · rw [hs1] - calc C * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w n) ^ 2 * (2 * n)) * Real.sqrt (2 * Λ2) - ≤ C * (W * Real.sqrt (2 * Λ2)) * Real.sqrt (2 * Λ2) := by gcongr - _ = C * W * (Real.sqrt (2 * Λ2) * Real.sqrt (2 * Λ2)) := by ring - _ = 2 * C * W * Λ2 := by rw [hsq]; ring + calc C * Real.sqrt (2 * S) * Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) + ≤ C * Real.sqrt (2 * S) * (W * Real.sqrt (2 * S)) := + mul_le_mul_of_nonneg_left hs2 (mul_nonneg hC h2Snn) + _ = C * W * (Real.sqrt (2 * S) * Real.sqrt (2 * S)) := by ring + _ = 2 * C * W * S := by rw [hsq]; ring + +/-- One H-MV application with a bounded multiplier M (|M_n| ≤ W := ∫Φ²) in either slot and either +trig function: the four shapes of off-diagonal sums met in 𝒪₁ are each ≤ 2CW·Σ w_n² n. -/ +lemma MV_four {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (X cc : ℝ) (w φ : ℕ → ℝ) + {M : ℕ → ℝ} {W : ℝ} (hW : 0 ≤ W) (hM : ∀ n ∈ primeRange X, |M n| ≤ W) : + |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * M n * w m * Real.sin (cc * (Real.log n - Real.log m) - (φ n - φ m)) + / (Real.log n - Real.log m))| ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n ∧ + |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * M n * w m * Real.cos (cc * (Real.log n - Real.log m) - (φ n - φ m)) + / (Real.log n - Real.log m))| ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n ∧ + |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * (w m * M m) * Real.sin (cc * (Real.log n - Real.log m) - (φ n - φ m)) + / (Real.log n - Real.log m))| ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n ∧ + |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * (w m * M m) * Real.cos (cc * (Real.log n - Real.log m) - (φ n - φ m)) + / (Real.log n - Real.log m))| ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n := by + have hL := MV_real_ph hMV X cc (fun k => w k * M k) (fun k => w k) φ + have hR := MV_real_ph hMV X cc (fun k => w k) (fun k => w k * M k) φ + have hsz := MV_size_le_w hC X w hW hM + exact ⟨hL.2.trans hsz.1, hL.1.trans hsz.1, hR.2.trans hsz.2, hR.1.trans hsz.2⟩ + +/-- **𝒪₁ for Q** (mirror of O1_bound): the exact evaluation sub_mul_AminusPh_eq splits +Σ_{n≠m} w_n w_m A⁻_ph into eight off-diagonal trigonometric sums, each an H-MV sum with one bounded +multiplier (C^∓, S^∓, all ≤ ∫Φ² in modulus): |Σ_{n≠m} w_n w_m A⁻_ph| ≤ 16·C·(∫Φ²)·Σ_n w_n² n. -/ +theorem O1_bound_w {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (hT : 0 ≤ T) + (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) (X : ℝ) (w φ : ℕ → ℝ) : + |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, + (if n = m then (0:ℝ) else w n * w m + * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m))| + ≤ 16 * C * (∫ x, Φ x ^ 2) * ∑ n ∈ primeRange X, w n ^ 2 * n := by + set W : ℝ := ∫ x, Φ x ^ 2 with hW + have hW0 : 0 ≤ W := MeasureTheory.integral_nonneg fun x => sq_nonneg _ + set S : ℝ := ∑ n ∈ primeRange X, w n ^ 2 * n with hSdef + set S1 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * Cm Φ T (Real.log n) * w m + * Real.sin ((2 * T) * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS1 + set S2 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * Sm Φ T (Real.log n) * w m + * Real.cos ((2 * T) * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS2 + set S3 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * (w m * Cm Φ T (Real.log m)) + * Real.sin (T * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS3 + set S4 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * (w m * Sm Φ T (Real.log m)) + * Real.cos (T * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS4 + set S5 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * (w m * Cp Φ T (Real.log m)) + * Real.sin ((2 * T) * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS5 + set S6 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * (w m * Sp Φ T (Real.log m)) + * Real.cos ((2 * T) * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS6 + set S7 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * Cp Φ T (Real.log n) * w m + * Real.sin (T * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS7 + set S8 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else + w n * Sp Φ T (Real.log n) * w m + * Real.cos (T * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS8 + have hsplit : ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, + (if n = m then (0:ℝ) else w n * w m + * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) + = S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8 := by + rw [hS1, hS2, hS3, hS4, hS5, hS6, hS7, hS8] + simp only [← Finset.sum_sub_distrib, ← Finset.sum_add_distrib] + refine Finset.sum_congr rfl fun n hn => Finset.sum_congr rfl fun m hm => ?_ + by_cases hnm : n = m + · simp [hnm] + · simp only [if_neg hnm] + have hθ : Real.log n - Real.log m ≠ 0 := by + have hn1 := one_le_of_mem_primeRange hn + have hm1 := one_le_of_mem_primeRange hm + have hinj : Real.log n ≠ Real.log m := by + rcases lt_or_gt_of_ne hnm with hlt | hgt + · exact ne_of_lt (Real.log_lt_log (by exact_mod_cast hn1) (by exact_mod_cast hlt)) + · exact ne_of_gt (Real.log_lt_log (by exact_mod_cast hm1) (by exact_mod_cast hgt)) + exact sub_ne_zero.mpr hinj + have hA := sub_mul_AminusPh_eq (Φ := Φ) hT hΦ hθ (φ n) (φ m) + have hAm : AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m) + = ((Real.sin ((Real.log n - Real.log m) * (2 * T) - (φ n - φ m)) * Cm Φ T (Real.log n) + + Real.cos ((Real.log n - Real.log m) * (2 * T) - (φ n - φ m)) * Sm Φ T (Real.log n) + - (Real.sin ((Real.log n - Real.log m) * T - (φ n - φ m)) * Cm Φ T (Real.log m) + + Real.cos ((Real.log n - Real.log m) * T - (φ n - φ m)) * Sm Φ T (Real.log m))) + + (Real.sin ((Real.log n - Real.log m) * (2 * T) - (φ n - φ m)) * Cp Φ T (Real.log m) + + Real.cos ((Real.log n - Real.log m) * (2 * T) - (φ n - φ m)) * Sp Φ T (Real.log m) + - (Real.sin ((Real.log n - Real.log m) * T - (φ n - φ m)) * Cp Φ T (Real.log n) + + Real.cos ((Real.log n - Real.log m) * T - (φ n - φ m)) * Sp Φ T (Real.log n)))) + / (Real.log n - Real.log m) := by + rw [eq_div_iff hθ, mul_comm] + exact hA + rw [hAm, mul_comm ((2 : ℝ) * T) (Real.log n - Real.log m), + mul_comm T (Real.log n - Real.log m)] + field_simp + ring + have hw_Cm : ∀ n ∈ primeRange X, |Cm Φ T (Real.log n)| ≤ W := fun n _ => abs_Cm_le hT hΦ hΦ2 _ + have hw_Sm : ∀ n ∈ primeRange X, |Sm Φ T (Real.log n)| ≤ W := fun n _ => abs_Sm_le hT hΦ hΦ2 _ + have hw_Cp : ∀ n ∈ primeRange X, |Cp Φ T (Real.log n)| ≤ W := fun n _ => abs_Cp_le hT hΦ hΦ2 _ + have hw_Sp : ∀ n ∈ primeRange X, |Sp Φ T (Real.log n)| ≤ W := fun n _ => abs_Sp_le hT hΦ hΦ2 _ + have h2Cm := MV_four hMV hC X (2 * T) w φ hW0 hw_Cm + have h2Sm := MV_four hMV hC X (2 * T) w φ hW0 hw_Sm + have h2Cp := MV_four hMV hC X (2 * T) w φ hW0 hw_Cp + have h2Sp := MV_four hMV hC X (2 * T) w φ hW0 hw_Sp + have h1Cm := MV_four hMV hC X T w φ hW0 hw_Cm + have h1Sm := MV_four hMV hC X T w φ hW0 hw_Sm + have h1Cp := MV_four hMV hC X T w φ hW0 hw_Cp + have h1Sp := MV_four hMV hC X T w φ hW0 hw_Sp + have hb1 : |S1| ≤ 2 * C * W * S := h2Cm.1 + have hb2 : |S2| ≤ 2 * C * W * S := h2Sm.2.1 + have hb3 : |S3| ≤ 2 * C * W * S := h1Cm.2.2.1 + have hb4 : |S4| ≤ 2 * C * W * S := h1Sm.2.2.2 + have hb5 : |S5| ≤ 2 * C * W * S := h2Cp.2.2.1 + have hb6 : |S6| ≤ 2 * C * W * S := h2Sp.2.2.2 + have hb7 : |S7| ≤ 2 * C * W * S := h1Cp.1 + have hb8 : |S8| ≤ 2 * C * W * S := h1Sp.2.1 + rw [hsplit] + have habs : |S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8| + ≤ |S1| + |S2| + |S3| + |S4| + |S5| + |S6| + |S7| + |S8| := by + have t1 := abs_add_le S1 S2 + have t2 := abs_sub (S1 + S2) S3 + have t3 := abs_sub (S1 + S2 - S3) S4 + have t4 := abs_add_le (S1 + S2 - S3 - S4) S5 + have t5 := abs_add_le (S1 + S2 - S3 - S4 + S5) S6 + have t6 := abs_sub (S1 + S2 - S3 - S4 + S5 + S6) S7 + have t7 := abs_sub (S1 + S2 - S3 - S4 + S5 + S6 - S7) S8 + linarith + calc |S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8| + ≤ |S1| + |S2| + |S3| + |S4| + |S5| + |S6| + |S7| + |S8| := habs + _ ≤ 8 * (2 * C * W * S) := by linarith + _ = 16 * C * W * S := by ring -end MVapply + +end WeightedO1 + +/-! ## Weighted cosine polynomials (generic in w, φ) -/ + +section CosPoly +variable {Φ : ℝ → ℝ} {T : ℝ} + +def cosPolyPh (X : ℝ) (w φ : ℕ → ℝ) (τ : ℝ) : ℝ := + ∑ n ∈ primeRange X, w n * Real.cos (τ * Real.log n - φ n) + +/-- **[eq:MPP] for Q** (mirror of Mform_PXc_PXc): bilinearity, the per-pair phased +decomposition Mform_cos_cos_ph, and the diagonal/off-diagonal split: + 𝓜[Q,Q] = ½ ( Σ_n w_n² A⁻(y_n,y_n) + Σ_{n≠m} w_n w_m A⁻_ph + Σ_{n,m} w_n w_m A⁺_ph ). -/ +lemma Mform_cosPolyPh (hT : 0 ≤ T) (hΦ : Continuous Φ) (X : ℝ) (w φ : ℕ → ℝ) : + Mform Φ T (cosPolyPh X w φ) (cosPolyPh X w φ) + = (1 / 2) * + ((∑ n ∈ primeRange X, w n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) + + (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, + (if n = m then (0:ℝ) else w n * w m + * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m))) + + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, + w n * w m * AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) := by + have h1 : Mform Φ T (cosPolyPh X w φ) (cosPolyPh X w φ) = + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, w n * w m * + Mform Φ T (fun τ => Real.cos (τ * Real.log n - φ n)) + (fun τ => Real.cos (τ * Real.log m - φ m)) := by + unfold Mform + have hpt : ∀ q : ℝ × ℝ, Φ (q.1 - q.2) ^ 2 * cosPolyPh X w φ q.1 * cosPolyPh X w φ q.2 + = ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, + w n * w m * + (Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * Real.log n - φ n) + * Real.cos (q.2 * Real.log m - φ m)) := by + intro q + unfold cosPolyPh + rw [mul_assoc, Finset.sum_mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun m _ => ?_ + ring + simp_rw [hpt] + have hint : ∀ n m : ℕ, Integrable (fun q : ℝ × ℝ => + w n * w m * + (Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * Real.log n - φ n) + * Real.cos (q.2 * Real.log m - φ m))) + (volume.restrict (Icc T (2 * T) ×ˢ Icc T (2 * T))) := fun n m => + (Mform_integrableOn hΦ (u := fun τ => Real.cos (τ * Real.log n - φ n)) + (v := fun τ => Real.cos (τ * Real.log m - φ m)) (by fun_prop) (by fun_prop)).const_mul _ + rw [integral_finsetSum _ (fun n _ => integrable_finsetSum _ (fun m _ => hint n m))] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [integral_finsetSum _ (fun m _ => hint n m)] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [integral_const_mul] + rw [h1] + simp_rw [Mform_cos_cos_ph hT hΦ] + have e : ∀ n m : ℕ, w n * w m * + ((AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m) + + AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) / 2) + = (1 / 2) * (w n * w m * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) + + (1 / 2) * (w n * w m * AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) := by + intro n m; ring + simp_rw [e, Finset.sum_add_distrib, ← Finset.mul_sum] + have hA := sum_sum_eq_diag_add_offdiag (primeRange X) + (fun n m => w n * w m * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) + have hdiag : ∑ n ∈ primeRange X, w n * w n * AminusPh Φ T (Real.log n) (Real.log n) (φ n) (φ n) + = ∑ n ∈ primeRange X, w n ^ 2 * Aminus Φ T (Real.log n) (Real.log n) := by + refine Finset.sum_congr rfl fun n _ => ?_ + rw [AminusPh_self] + ring + rw [hA, hdiag] + ring + +/-- **𝒟 for Q** (mirror of diag_estimate): with ∫Φ²cos(xy) = 2πg(y) [eq:Phi2FT], + |½ Σ w_n² A⁻(y_n,y_n) − πT Σ w_n² g(y_n)| ≤ ½ (Σ w_n²) ∫Φ²|x|. -/ +lemma diag_estimate_w (hT : 0 ≤ T) (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) + (hΦabs : Integrable fun x => Φ x ^ 2 * |x|) {g : ℝ → ℝ} + (hFT : ∀ y, ∫ x, Φ x ^ 2 * Real.cos (x * y) = 2 * π * g y) (X : ℝ) (w : ℕ → ℝ) : + |(1 / 2) * (∑ n ∈ primeRange X, w n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) + - π * T * ∑ n ∈ primeRange X, w n ^ 2 * g (Real.log n)| + ≤ (1 / 2) * (∑ n ∈ primeRange X, w n ^ 2) * ∫ x, Φ x ^ 2 * |x| := by + have e : (1 / 2) * (∑ n ∈ primeRange X, w n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) + - π * T * ∑ n ∈ primeRange X, w n ^ 2 * g (Real.log n) + = (1 / 2) * ∑ n ∈ primeRange X, w n ^ 2 * + (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n)) := by + simp_rw [hFT] + rw [Finset.mul_sum, Finset.mul_sum, Finset.mul_sum, ← Finset.sum_sub_distrib] + refine Finset.sum_congr rfl fun n _ => ?_ + ring + rw [e, abs_mul, abs_of_pos (by norm_num : (0:ℝ) < 1 / 2), mul_assoc] + refine mul_le_mul_of_nonneg_left ?_ (by norm_num) + calc |∑ n ∈ primeRange X, w n ^ 2 * + (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n))| + ≤ ∑ n ∈ primeRange X, |w n ^ 2 * + (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n))| := + Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ n ∈ primeRange X, w n ^ 2 * ∫ x, Φ x ^ 2 * |x| := by + refine Finset.sum_le_sum fun n _ => ?_ + rw [abs_mul, abs_of_nonneg (sq_nonneg _)] + exact mul_le_mul_of_nonneg_left (abs_Aminus_diag_sub_le hT hΦ hΦ2 hΦabs _) (sq_nonneg _) + _ = (∑ n ∈ primeRange X, w n ^ 2) * ∫ x, Φ x ^ 2 * |x| := by rw [Finset.sum_mul] + +/-- for n ∈ primeRange X: either n = 1 (where the weight vanishes) or 2 ≤ n. -/ +lemma w_eq_zero_or_two_le {w : ℕ → ℝ} (hw1 : w 1 = 0) {X : ℝ} {n : ℕ} (hn : n ∈ primeRange X) : + w n = 0 ∨ 2 ≤ n := by + rcases Nat.lt_or_ge n 2 with h | h + · left + have : n = 1 := by have := one_le_of_mem_primeRange hn; omega + subst this; exact hw1 + · exact Or.inr h + +/-- **𝒪₂ for Q** (mirror of O2_estimate; "since y_n + y_m ≥ 2 log 2 the second inner +integral is O(1)"): |Σ_{n,m} w_n w_m A⁺_ph| ≤ (∫Φ²/log 2)·(Σ w_n)², for w ≥ 0 with w 1 = 0. -/ +lemma O2_estimate_w (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) (X T : ℝ) + {w : ℕ → ℝ} (hw0 : ∀ n, 0 ≤ w n) (hw1 : w 1 = 0) (φ : ℕ → ℝ) : + |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, + w n * w m * AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)| + ≤ (∫ x, Φ x ^ 2) / Real.log 2 * (∑ n ∈ primeRange X, w n) ^ 2 := by + have hW : 0 ≤ ∫ x, Φ x ^ 2 := integral_nonneg fun x => sq_nonneg _ + have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) + have hper : ∀ n ∈ primeRange X, ∀ m ∈ primeRange X, + |w n * w m * AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)| + ≤ w n * w m * ((∫ x, Φ x ^ 2) / Real.log 2) := by + intro n hn m hm + rw [abs_mul, abs_mul, abs_of_nonneg (hw0 n), abs_of_nonneg (hw0 m)] + rcases w_eq_zero_or_two_le hw1 hn with h0 | hn2 + · simp [h0] + rcases w_eq_zero_or_two_le hw1 hm with h0 | hm2 + · simp [h0] + have hyn : Real.log 2 ≤ Real.log n := Real.log_le_log (by norm_num) (by exact_mod_cast hn2) + have hym : Real.log 2 ≤ Real.log m := Real.log_le_log (by norm_num) (by exact_mod_cast hm2) + have hpos : 0 < Real.log n + Real.log m := by linarith + have hA : |AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)| + ≤ (∫ x, Φ x ^ 2) / Real.log 2 := by + calc |AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)| + ≤ 2 / (Real.log n + Real.log m) * ∫ x, Φ x ^ 2 := abs_AplusPh_le hΦ hΦ2 hpos _ _ + _ ≤ 2 / (2 * Real.log 2) * ∫ x, Φ x ^ 2 := by gcongr; linarith + _ = (∫ x, Φ x ^ 2) / Real.log 2 := by field_simp + exact mul_le_mul_of_nonneg_left hA (mul_nonneg (hw0 n) (hw0 m)) + refine le_trans (Finset.abs_sum_le_sum_abs _ _) ?_ + refine le_trans (Finset.sum_le_sum fun n _ => Finset.abs_sum_le_sum_abs _ _) ?_ + refine le_trans (Finset.sum_le_sum fun n hn => Finset.sum_le_sum fun m hm => hper n hn m hm) ?_ + refine le_of_eq ?_ + rw [sq, Finset.sum_mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun m _ => ?_ + ring + + +end CosPoly + +/-! ## General complex-weight `[prop:PP]` (`PcDir`, arbitrary `c : ℕ → ℂ` with `c 1 = 0`) -/ + +section ComplexWeightPP + +/-- `Re c · cos θ + Im c · sin θ = ‖c‖ · cos(θ − arg c)`. -/ +lemma re_mul_cos_add_im_mul_sin (z : ℂ) (θ : ℝ) : + z.re * Real.cos θ + z.im * Real.sin θ = ‖z‖ * Real.cos (θ - z.arg) := by + have h1 : ‖z‖ * Real.cos z.arg = z.re := by + have h := congrArg Complex.re (Complex.norm_mul_exp_arg_mul_I z) + rwa [Complex.re_ofReal_mul, Complex.exp_ofReal_mul_I_re] at h + have h2 : ‖z‖ * Real.sin z.arg = z.im := by + have h := congrArg Complex.im (Complex.norm_mul_exp_arg_mul_I z) + rwa [Complex.im_ofReal_mul, Complex.exp_ofReal_mul_I_im] at h + rw [Real.cos_sub, ← h1, ← h2] + ring + +/-- The general weight `w_N := ‖c_N‖/√N`. -/ +def wcoef (c : ℕ → ℂ) (n : ℕ) : ℝ := ‖c n‖ / Real.sqrt n + +lemma wcoef_nonneg (c : ℕ → ℂ) (n : ℕ) : 0 ≤ wcoef c n := + div_nonneg (norm_nonneg _) (Real.sqrt_nonneg _) + +lemma wcoef_sq (c : ℕ → ℂ) (n : ℕ) : wcoef c n ^ 2 = ‖c n‖ ^ 2 / n := by + unfold wcoef + rw [div_pow, Real.sq_sqrt (Nat.cast_nonneg n)] + +lemma wcoef_sq_mul {c : ℕ → ℂ} {n : ℕ} (hn : 1 ≤ n) : wcoef c n ^ 2 * n = ‖c n‖ ^ 2 := by + rw [wcoef_sq] + have : (0 : ℝ) < n := by exact_mod_cast hn + field_simp + +lemma wcoef_one {c : ℕ → ℂ} (hc1 : c 1 = 0) : wcoef c 1 = 0 := by + simp [wcoef, hc1] + +/-- Magnitude/phase form: `PcDir X c τ = (1/π) Σ_N w_N · cos(τ·log N − arg c_N)`. -/ +lemma PcDir_eq_sum (c : ℕ → ℂ) (X τ : ℝ) : + PcDir X c τ = (1 / π) * ∑ n ∈ primeRange X, wcoef c n * Real.cos (τ * Real.log n - (c n).arg) := by + unfold PcDir primeRange wcoef + congr 1 + refine Finset.sum_congr rfl fun n _ => ?_ + rw [re_mul_cos_add_im_mul_sin] + ring + +/-- `[eq:MPP]` for `PcDir`: `𝓜[P_c, P_c] = (1/2π²)·(𝒟 + 𝒪₁ + 𝒪₂)`. -/ +lemma Mform_PcDir_PcDir {Φ : ℝ → ℝ} {T : ℝ} (hT : 0 ≤ T) (hΦ : Continuous Φ) (c : ℕ → ℂ) (X : ℝ) : + Mform Φ T (PcDir X c) (PcDir X c) + = (1 / (2 * π ^ 2)) * + ((∑ n ∈ primeRange X, wcoef c n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) + + (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, + (if n = m then (0 : ℝ) else wcoef c n * wcoef c m + * AminusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg)) + + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, + wcoef c n * wcoef c m + * AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg) := by + have hP : PcDir X c = fun τ => (1 / π) * cosPolyPh X (wcoef c) (fun n => (c n).arg) τ := by + funext τ; rw [PcDir_eq_sum]; rfl + rw [hP, Mform_const_mul_left, Mform_const_mul_right, Mform_cosPolyPh hT hΦ] + ring + +/-- Single-constant form for `prop_PP_c'`. -/ +def KPP (C cϱ : ℝ) : ℝ := (1 / (2 * π ^ 2)) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) + +/-- **[prop:PP] for an arbitrary complex-weight Dirichlet polynomial `PcDir` — three-term form.** +Non-asymptotic: holds for any single `(p, F)` satisfying `LocalHypsCore`, `T ≥ 1`, `MVHilbert C` +(`C ≥ 0`), and any `c : ℕ → ℂ` with `c 1 = 0`. -/ +theorem prop_PP_c {C cϱ : ℝ} {p : Setting} {F : LocalFun} + (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (hF : LocalHypsCore cϱ p F) + (hT : 1 ≤ p.T) (c : ℕ → ℂ) (hc1 : c 1 = 0) : + |Mform F.Phi p.T (PcDir p.X c) (PcDir p.X c) + - p.T / π * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n * F.g (Real.log n)| + ≤ (1 / (2 * π ^ 2)) * (8 + 8 * cϱ) * p.L * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n) + + (1 / (2 * π ^ 2)) * (32 * π) * C * p.L * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2) + + (1 / (2 * π ^ 2)) * (2 * π / Real.log 2) * p.L + * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) ^ 2 := by + show |Mform F.Phi p.T (PcDir p.X c) (PcDir p.X c) + - p.T / π * ∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 / n * F.g (Real.log n)| + ≤ (1 / (2 * π ^ 2)) * (8 + 8 * cϱ) * p.L * (∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 / n) + + (1 / (2 * π ^ 2)) * (32 * π) * C * p.L * (∑ n ∈ primeRange p.X, ‖c n‖ ^ 2) + + (1 / (2 * π ^ 2)) * (2 * π / Real.log 2) * p.L + * (∑ n ∈ primeRange p.X, ‖c n‖ / Real.sqrt n) ^ 2 + have hπ : (0 : ℝ) < π := Real.pi_pos + have hT0 : 0 ≤ p.T := by linarith + have hL8 : 8 ≤ p.L := hF.eight_le_L + have hL1 : 1 ≤ p.L := by linarith + have hΦc : Continuous F.Phi := hF.Phi_contDiff.continuous + have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) + have hcϱ : 4 ≤ cϱ := hF.four_le_cϱ + set W := ∫ x, F.Phi x ^ 2 + have hWle : W ≤ 2 * π * p.L := hF.integral_Phi_sq_le + set ΛΦ := ∫ x, F.Phi x ^ 2 * |x| + have hΛΦle : ΛΦ ≤ (8 + 8 * cϱ) * p.L := by + have h1 := hF.integral_Phi_sq_mul_abs_le + have hw : 1 ≤ p.w := hF.one_le_w + have hcL : 0 ≤ cϱ * p.L := mul_nonneg (by linarith) (by linarith) + have harg : 0 < cϱ * p.L / (4 * p.w) := by positivity + have hlog : Real.log (cϱ * p.L / (4 * p.w)) ≤ cϱ * p.L / (4 * p.w) := by + linarith [Real.log_le_sub_one_of_pos harg] + have hfrac : cϱ * p.L / (4 * p.w) ≤ cϱ * p.L := by + rw [div_le_iff₀ (by positivity)] + nlinarith [mul_nonneg hcL (by linarith : (0 : ℝ) ≤ 4 * p.w - 1)] + calc ΛΦ ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) := h1 + _ ≤ 8 + 8 * (cϱ * p.L) := by linarith + _ ≤ 8 * p.L + 8 * (cϱ * p.L) := by linarith + _ = (8 + 8 * cϱ) * p.L := by ring + set A := ∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 / n + set B := ∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 + set S₁ := ∑ n ∈ primeRange p.X, ‖c n‖ / Real.sqrt n + have hA0 : 0 ≤ A := Finset.sum_nonneg fun n _ => div_nonneg (sq_nonneg _) (Nat.cast_nonneg _) + have hB0 : 0 ≤ B := Finset.sum_nonneg fun n _ => sq_nonneg _ + have hwA : ∑ n ∈ primeRange p.X, wcoef c n ^ 2 = A := + Finset.sum_congr rfl fun n _ => wcoef_sq c n + have hwB : ∑ n ∈ primeRange p.X, wcoef c n ^ 2 * n = B := + Finset.sum_congr rfl fun n hn => wcoef_sq_mul (one_le_of_mem_primeRange hn) + have hwS : ∑ n ∈ primeRange p.X, wcoef c n = S₁ := rfl + have hwg : ∑ n ∈ primeRange p.X, wcoef c n ^ 2 * F.g (Real.log n) + = ∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 / n * F.g (Real.log n) := + Finset.sum_congr rfl fun n _ => by rw [wcoef_sq] + have hD := diag_estimate_w hT0 hΦc hF.Phi_sq_integrable hF.Phi_sq_mul_abs_integrable + hF.Phi_sq_fourier p.X (wcoef c) + have hO1 := O1_bound_w hMV hC hT0 hΦc hF.Phi_sq_integrable p.X (wcoef c) (fun n => (c n).arg) + have hO2 := O2_estimate_w hΦc hF.Phi_sq_integrable p.X p.T (wcoef_nonneg c) (wcoef_one hc1) + (fun n => (c n).arg) + rw [hwA] at hD; rw [hwB] at hO1; rw [hwS] at hO2 + rw [Mform_PcDir_PcDir hT0 hΦc, ← hwg] + set D := ∑ n ∈ primeRange p.X, wcoef c n ^ 2 * Aminus F.Phi p.T (Real.log n) (Real.log n) + set O1 := ∑ n ∈ primeRange p.X, ∑ m ∈ primeRange p.X, + (if n = m then (0 : ℝ) else wcoef c n * wcoef c m + * AminusPh F.Phi p.T (Real.log n) (Real.log m) (c n).arg (c m).arg) + set O2 := ∑ n ∈ primeRange p.X, ∑ m ∈ primeRange p.X, + wcoef c n * wcoef c m + * AplusPh F.Phi p.T (Real.log n) (Real.log m) (c n).arg (c m).arg + set G := ∑ n ∈ primeRange p.X, wcoef c n ^ 2 * F.g (Real.log n) + have hk : (0 : ℝ) < 1 / (2 * π ^ 2) := by positivity + have bD : |1 / (2 * π ^ 2) * D - p.T / π * G| ≤ 1 / (2 * π ^ 2) * (8 + 8 * cϱ) * p.L * A := by + have e : 1 / (2 * π ^ 2) * D - p.T / π * G = (1 / π ^ 2) * ((1 / 2) * D - π * p.T * G) := by + field_simp + rw [e, abs_mul, abs_of_pos (by positivity)] + calc 1 / π ^ 2 * |1 / 2 * D - π * p.T * G| + ≤ 1 / π ^ 2 * ((1 / 2) * A * ΛΦ) := mul_le_mul_of_nonneg_left hD (by positivity) + _ ≤ 1 / π ^ 2 * ((1 / 2) * A * ((8 + 8 * cϱ) * p.L)) := + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hΛΦle (by positivity)) (by positivity) + _ = 1 / (2 * π ^ 2) * (8 + 8 * cϱ) * p.L * A := by field_simp + have bO1 : |1 / (2 * π ^ 2) * O1| ≤ 1 / (2 * π ^ 2) * (32 * π) * C * p.L * B := by + rw [abs_mul, abs_of_pos hk] + calc 1 / (2 * π ^ 2) * |O1| + ≤ 1 / (2 * π ^ 2) * (16 * C * W * B) := mul_le_mul_of_nonneg_left hO1 hk.le + _ ≤ 1 / (2 * π ^ 2) * (16 * C * (2 * π * p.L) * B) := + mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hWle (by positivity)) hB0) hk.le + _ = 1 / (2 * π ^ 2) * (32 * π) * C * p.L * B := by ring + have bO2 : |1 / (2 * π ^ 2) * O2| ≤ 1 / (2 * π ^ 2) * (2 * π / Real.log 2) * p.L * S₁ ^ 2 := by + rw [abs_mul, abs_of_pos hk] + calc 1 / (2 * π ^ 2) * |O2| + ≤ 1 / (2 * π ^ 2) * (W / Real.log 2 * S₁ ^ 2) := mul_le_mul_of_nonneg_left hO2 hk.le + _ ≤ 1 / (2 * π ^ 2) * ((2 * π * p.L) / Real.log 2 * S₁ ^ 2) := + mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_right (div_le_div_of_nonneg_right hWle hlog2.le) (sq_nonneg _)) + hk.le + _ = 1 / (2 * π ^ 2) * (2 * π / Real.log 2) * p.L * S₁ ^ 2 := by ring + have split : 1 / (2 * π ^ 2) * (D + O1 + O2) - p.T / π * G + = (1 / (2 * π ^ 2) * D - p.T / π * G) + 1 / (2 * π ^ 2) * O1 + 1 / (2 * π ^ 2) * O2 := by ring + rw [split] + exact (abs_add_three _ _ _).trans (add_le_add (add_le_add bD bO1) bO2) + +/-- Single-constant form of `prop_PP_c`. -/ +theorem prop_PP_c' {C cϱ : ℝ} {p : Setting} {F : LocalFun} + (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (hF : LocalHypsCore cϱ p F) + (hT : 1 ≤ p.T) (c : ℕ → ℂ) (hc1 : c 1 = 0) : + |Mform F.Phi p.T (PcDir p.X c) (PcDir p.X c) + - p.T / π * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n * F.g (Real.log n)| + ≤ KPP C cϱ * p.L * + ((∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n) + + (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2) + + (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) ^ 2) := by + refine (prop_PP_c hMV hC hF hT c hc1).trans ?_ + set A := ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n + set B := ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 + set S₁ := ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n + have hA0 : 0 ≤ A := Finset.sum_nonneg fun n _ => div_nonneg (sq_nonneg _) (Nat.cast_nonneg _) + have hB0 : 0 ≤ B := Finset.sum_nonneg fun n _ => sq_nonneg _ + have hS0 : 0 ≤ S₁ ^ 2 := sq_nonneg _ + have hL : 0 ≤ p.L := hF.L_pos.le + have hcϱ : 4 ≤ cϱ := hF.four_le_cϱ + have hπ : (0 : ℝ) < π := Real.pi_pos + have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) + have hk : (0 : ℝ) ≤ 1 / (2 * π ^ 2) := by positivity + have h1 : (0 : ℝ) ≤ 8 + 8 * cϱ := by linarith + have h2 : (0 : ℝ) ≤ 32 * π * C := by positivity + have h3 : (0 : ℝ) ≤ 2 * π / Real.log 2 := by positivity + unfold KPP + have hK1 : 8 + 8 * cϱ ≤ (8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2 := by linarith + have hK2 : 32 * π * C ≤ (8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2 := by linarith + have hK3 : 2 * π / Real.log 2 ≤ (8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2 := by linarith + have eA : 1 / (2 * π ^ 2) * (8 + 8 * cϱ) * p.L * A + ≤ 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * A := by + gcongr + have eB : 1 / (2 * π ^ 2) * (32 * π) * C * p.L * B + ≤ 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * B := by + rw [show 1 / (2 * π ^ 2) * (32 * π) * C = 1 / (2 * π ^ 2) * (32 * π * C) by ring] + gcongr + have eS : 1 / (2 * π ^ 2) * (2 * π / Real.log 2) * p.L * S₁ ^ 2 + ≤ 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * S₁ ^ 2 := by + gcongr + calc _ ≤ _ := add_le_add (add_le_add eA eB) eS + _ = _ := by ring + +end ComplexWeightPP end PrimeSide end Zeta23 diff --git a/zeta23/Zeta23/PrimeSideB/PPOffDiag.lean b/zeta23/Zeta23/PrimeSideB/PPOffDiag.lean deleted file mode 100644 index cea7b4898e..0000000000 --- a/zeta23/Zeta23/PrimeSideB/PPOffDiag.lean +++ /dev/null @@ -1,173 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- - Part of the Zeta23 formalization of the paper - "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". - Bracketed labels ([prop:cross], [eq:Msplit], …) and section numbers (§5.4, …) refer to that paper. --/ -import Zeta23.PrimeSideB.PPKernel - -/-! -# [prop:PP] — the off-diagonal term 𝒪₁ (§5.4) - -Consumed by `Zeta23/PrimeSideB/PP.lean` . Everything needed is in -`Zeta23/PrimeSideB/PPKernel.lean`: -* `sub_mul_Aminus_eq` : for θ = y−y' ≠ 0, θ·A⁻(y,y') = explicit combination of 8 terms - trig(θ·cT)·M(y or y'), trig ∈ {sin,cos}, c ∈ {1,2}, M ∈ {Cp,Sp,Cm,Sm} (half-line moments of Φ²); -* `abs_Cp_le` … `abs_Sm_le` : |M(y)| ≤ ∫Φ²; -* `MV_real` : |Σ_{n≠m} u_n v_m trig(c(y_n−y_m))/(y_n−y_m)| ≤ C·√(Σ2n u_n²)·√(Σ2n v_n²) (H-MV + [eq:deltan]); -* `MV_size_le` : with {u,v} = {a, a·w}, |w| ≤ W: that bound ≤ 2·C·W·Σ_{n≤X}Λ(n)². -So: split the sum below into the 8 MV-shaped sums (after dividing `sub_mul_Aminus_eq` by θ = log n − log m, -nonzero for n ≠ m ≥ 1 by injectivity of log), bound each by 2·C·(∫Φ²)·ΣΛ², total 16·C·(∫Φ²)·ΣΛ². -(Then PP.lean uses [eq:cheb1] ΣΛ(n)² ≪ X log X = XL and ∫Φ² = 2πbL ≤ 2πL to get 𝒪₁ ≪ L²X.) --/ - -noncomputable section - -open MeasureTheory Real Set Finset -open scoped BigOperators ArithmeticFunction - -namespace Zeta23 -namespace PrimeSide - -/-- **[prop:PP], 𝒪₁** (§5.4, "Hence |𝒪₁| ≪ L²X" — here in the pre-Chebyshev form): -for T ≥ 0, continuous Φ with Φ² integrable, and H-MV with constant C ≥ 0, - |Σ_{n≠m≤X} a_n a_m A⁻(log n, log m)| ≤ 16·C·(∫_ℝ Φ²)·Σ_{n≤X} Λ(n)². -(A⁻ = `Aminus`, the difference-frequency half of 𝓜[cos(·y_n),cos(·y_m)], see PPKernel.) -/ -theorem O1_bound {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) {Φ : ℝ → ℝ} {T : ℝ} (hT : 0 ≤ T) - (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) (X : ℝ) : - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else acoef n * acoef m * Aminus Φ T (Real.log n) (Real.log m))| - ≤ 16 * C * (∫ x, Φ x ^ 2) * ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 := by - set W : ℝ := ∫ x, Φ x ^ 2 with hW - have hW0 : 0 ≤ W := MeasureTheory.integral_nonneg fun x => sq_nonneg _ - set Λ2 : ℝ := ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 with hΛ2 - have hΛ2nn : 0 ≤ Λ2 := Finset.sum_nonneg fun n _ => sq_nonneg _ - -- the eight MV-shaped sums (u/v/c/trig as in sub_mul_Aminus_eq, divided by θ) - set S1 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - (fun k => acoef k * Cm Φ T (Real.log k)) n * acoef m - * Real.sin ((2 * T) * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) with hS1 - set S2 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - (fun k => acoef k * Sm Φ T (Real.log k)) n * acoef m - * Real.cos ((2 * T) * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) with hS2 - set S3 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * (fun k => acoef k * Cm Φ T (Real.log k)) m - * Real.sin (T * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) with hS3 - set S4 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * (fun k => acoef k * Sm Φ T (Real.log k)) m - * Real.cos (T * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) with hS4 - set S5 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * (fun k => acoef k * Cp Φ T (Real.log k)) m - * Real.sin ((2 * T) * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) with hS5 - set S6 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * (fun k => acoef k * Sp Φ T (Real.log k)) m - * Real.cos ((2 * T) * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) with hS6 - set S7 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - (fun k => acoef k * Cp Φ T (Real.log k)) n * acoef m - * Real.sin (T * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) with hS7 - set S8 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - (fun k => acoef k * Sp Φ T (Real.log k)) n * acoef m - * Real.cos (T * (Real.log n - Real.log m)) / (Real.log n - Real.log m)) with hS8 - -- split the target into the eight sums - have hsplit : ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else acoef n * acoef m * Aminus Φ T (Real.log n) (Real.log m)) - = S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8 := by - rw [hS1, hS2, hS3, hS4, hS5, hS6, hS7, hS8] - simp only [← Finset.sum_sub_distrib, ← Finset.sum_add_distrib] - refine Finset.sum_congr rfl fun n hn => Finset.sum_congr rfl fun m hm => ?_ - by_cases hnm : n = m - · simp [hnm] - · simp only [if_neg hnm] - have hθ : Real.log n - Real.log m ≠ 0 := by - have hn1 := one_le_of_mem_primeRange hn - have hm1 := one_le_of_mem_primeRange hm - have hinj : Real.log n ≠ Real.log m := by - rcases lt_or_gt_of_ne hnm with hlt | hgt - · exact ne_of_lt (Real.log_lt_log (by exact_mod_cast hn1) (by exact_mod_cast hlt)) - · exact ne_of_gt (Real.log_lt_log (by exact_mod_cast hm1) (by exact_mod_cast hgt)) - exact sub_ne_zero.mpr hinj - have hA := sub_mul_Aminus_eq (Φ := Φ) hT hΦ hθ - have hAm : Aminus Φ T (Real.log n) (Real.log m) - = ((Real.sin ((Real.log n - Real.log m) * (2 * T)) * Cm Φ T (Real.log n) - + Real.cos ((Real.log n - Real.log m) * (2 * T)) * Sm Φ T (Real.log n) - - (Real.sin ((Real.log n - Real.log m) * T) * Cm Φ T (Real.log m) - + Real.cos ((Real.log n - Real.log m) * T) * Sm Φ T (Real.log m))) - + (Real.sin ((Real.log n - Real.log m) * (2 * T)) * Cp Φ T (Real.log m) - + Real.cos ((Real.log n - Real.log m) * (2 * T)) * Sp Φ T (Real.log m) - - (Real.sin ((Real.log n - Real.log m) * T) * Cp Φ T (Real.log n) - + Real.cos ((Real.log n - Real.log m) * T) * Sp Φ T (Real.log n)))) - / (Real.log n - Real.log m) := by - rw [eq_div_iff hθ] - rw [mul_comm] - exact hA - rw [hAm, mul_comm ((2 : ℝ) * T) (Real.log n - Real.log m), - mul_comm T (Real.log n - Real.log m)] - field_simp - ring - -- bound each sum via H-MV + the moment bounds - have hw_Cm : ∀ n ∈ primeRange X, |Cm Φ T (Real.log n)| ≤ W := fun n _ => abs_Cm_le hT hΦ hΦ2 _ - have hw_Sm : ∀ n ∈ primeRange X, |Sm Φ T (Real.log n)| ≤ W := fun n _ => abs_Sm_le hT hΦ hΦ2 _ - have hw_Cp : ∀ n ∈ primeRange X, |Cp Φ T (Real.log n)| ≤ W := fun n _ => abs_Cp_le hT hΦ hΦ2 _ - have hw_Sp : ∀ n ∈ primeRange X, |Sp Φ T (Real.log n)| ≤ W := fun n _ => abs_Sp_le hT hΦ hΦ2 _ - have hb1 : |S1| ≤ 2 * C * W * Λ2 := by - rw [hS1] - refine le_trans ((MV_real hMV X (2 * T) - (fun k => acoef k * Cm Φ T (Real.log k)) acoef).2) ?_ - exact (MV_size_le hC X hW0 hw_Cm).2 - have hb2 : |S2| ≤ 2 * C * W * Λ2 := by - rw [hS2] - refine le_trans ((MV_real hMV X (2 * T) - (fun k => acoef k * Sm Φ T (Real.log k)) acoef).1) ?_ - exact (MV_size_le hC X hW0 hw_Sm).2 - have hb3 : |S3| ≤ 2 * C * W * Λ2 := by - rw [hS3] - refine le_trans ((MV_real hMV X T - acoef (fun k => acoef k * Cm Φ T (Real.log k))).2) ?_ - exact (MV_size_le hC X hW0 hw_Cm).1 - have hb4 : |S4| ≤ 2 * C * W * Λ2 := by - rw [hS4] - refine le_trans ((MV_real hMV X T - acoef (fun k => acoef k * Sm Φ T (Real.log k))).1) ?_ - exact (MV_size_le hC X hW0 hw_Sm).1 - have hb5 : |S5| ≤ 2 * C * W * Λ2 := by - rw [hS5] - refine le_trans ((MV_real hMV X (2 * T) - acoef (fun k => acoef k * Cp Φ T (Real.log k))).2) ?_ - exact (MV_size_le hC X hW0 hw_Cp).1 - have hb6 : |S6| ≤ 2 * C * W * Λ2 := by - rw [hS6] - refine le_trans ((MV_real hMV X (2 * T) - acoef (fun k => acoef k * Sp Φ T (Real.log k))).1) ?_ - exact (MV_size_le hC X hW0 hw_Sp).1 - have hb7 : |S7| ≤ 2 * C * W * Λ2 := by - rw [hS7] - refine le_trans ((MV_real hMV X T - (fun k => acoef k * Cp Φ T (Real.log k)) acoef).2) ?_ - exact (MV_size_le hC X hW0 hw_Cp).2 - have hb8 : |S8| ≤ 2 * C * W * Λ2 := by - rw [hS8] - refine le_trans ((MV_real hMV X T - (fun k => acoef k * Sp Φ T (Real.log k)) acoef).1) ?_ - exact (MV_size_le hC X hW0 hw_Sp).2 - -- assemble - rw [hsplit] - have habs : |S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8| - ≤ |S1| + |S2| + |S3| + |S4| + |S5| + |S6| + |S7| + |S8| := by - have t1 := abs_add_le S1 S2 - have t2 := abs_sub (S1 + S2) S3 - have t3 := abs_sub (S1 + S2 - S3) S4 - have t4 := abs_add_le (S1 + S2 - S3 - S4) S5 - have t5 := abs_add_le (S1 + S2 - S3 - S4 + S5) S6 - have t6 := abs_sub (S1 + S2 - S3 - S4 + S5 + S6) S7 - have t7 := abs_sub (S1 + S2 - S3 - S4 + S5 + S6 - S7) S8 - linarith - calc |S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8| - ≤ |S1| + |S2| + |S3| + |S4| + |S5| + |S6| + |S7| + |S8| := habs - _ ≤ 8 * (2 * C * W * Λ2) := by linarith - _ = 16 * C * W * Λ2 := by ring - -end PrimeSide -end Zeta23 diff --git a/zeta23/Zeta23/PrimeSideB/Traces.lean b/zeta23/Zeta23/PrimeSideB/Traces.lean index 69edbb47e5..2698771029 100644 --- a/zeta23/Zeta23/PrimeSideB/Traces.lean +++ b/zeta23/Zeta23/PrimeSideB/Traces.lean @@ -11,23 +11,16 @@ import Zeta23.PrimeSideB import Zeta23.PrimeSideB.Concrete import Zeta23.PrimeSideA import Zeta23.PrimeSideB.PP -import Zeta23.Hypotheses /-! # [thm:traces] for the concrete data — instantiating the abstract assembly -`Zeta23/PrimeSideB.lean` proves [thm:traces] for abstract real functions of `T` -(`PrimeSide.Facts D → TracesBounds …`). This file plugs in the concrete objects: - -* `Params.toSetting P T = ⟨T, λ, w⟩` and `Params.localFun P T = ⟨φ̂, Φ, A_φ, g, a, b⟩(T)` turn - (`P : Params`, `T`) into the abstract prime-side layer (`Setting`, `LocalFun`), and - `trGtA (P.toSetting T) (P.localFun T) = P.trGtilde T` etc. hold by `rfl`; -* `PrimeSide.concreteData P Z` is the `Data P` record of the actual traces / 𝓜-terms / ∫μ² / Σa_n²g; -* `PrimeSide.concreteFacts` derives `Facts (concreteData P Z)` from `P.Valid`, `PaperInputs Z` - (H-RvM, H-Γ, H-cheb, H-MV), [prop:trace]/[lem:ends]/[eq:Msplit]/[prop:mumu]/[prop:cross], - [prop:PP] + sandwich, and `LocalHypsEventually cϱ P` (the taper facts [eq:psidef], - [eq:abdef], [eq:gbounds], [eq:Phi2FT], [lem:poisson] … for the concrete φ — proved in - `Zeta23/PrimeSideA/Bridge.lean` from Taper.lean / Poisson.lean); -* `thm_traces_of_localHyps : … → ThmTracesHyp P Z`. + +* `PrimeSide.concreteDataOf P loc Z` and `PrimeSide.concreteTraceFactsBase` build the shared + `Data P` and `TraceFactsBase ell1` for any concrete window family `loc : ℝ → LocalFun` + eventually satisfying `LocalHypsCore cϱ` (used both for the flat-top taper `P.localFun` + here and for the Montgomery–Taylor window `P.localFunD` in `Zeta23/ThmD/Concrete.lean`); +* `PrimeSide.concreteData P Z`, `PrimeSide.concreteFacts`, and `thm_traces_of_localHyps` + specialize to `P.localFun`. -/ noncomputable section @@ -43,131 +36,130 @@ open PaperParams variable (P : Params) -/-- The concrete `Data P`: the actual prime-side traces, 𝓜-terms, `∫_T^{2T} μ²` and -`Σ_{n≤X} Λ(n)²/n g(log n)`, and `N(T,2T)` of the zero configuration `Z`. -/ -def concreteData (Z : ZeroConfig) : Data P where - aT := P.a - bT := P.b - trG := P.trGtilde - trG2 := P.trGtildeSq +/-- Concrete `Data P` for an arbitrary `LocalFun` family `loc : ℝ → LocalFun`. -/ +def concreteDataOf (loc : ℝ → LocalFun) (Z : ZeroConfig) : Data P where + aT := fun T => (loc T).a + bT := fun T => (loc T).b + trG := fun T => trGtA (P.toSetting T) (loc T) + trG2 := fun T => trGt2A (P.toSetting T) (loc T) Ncnt := fun T => (Z.N T (2 * T) : ℝ) - Mtot := fun T => MtotalA (P.toSetting T) (P.localFun T) - Mmumu := fun T => Mform (P.PhiR T) T mu mu - MPP := fun T => Mform (P.PhiR T) T (PX (P.X T)) (PX (P.X T)) - MmuP := fun T => Mform (P.PhiR T) T mu (PX (P.X T)) - MmuPi := fun T => Mform (P.PhiR T) T mu (PiX (P.X T)) - MPPi := fun T => Mform (P.PhiR T) T (PX (P.X T)) (PiX (P.X T)) - MPiPi := fun T => Mform (P.PhiR T) T (PiX (P.X T)) (PiX (P.X T)) + Mtot := fun T => MtotalA (P.toSetting T) (loc T) + Mmumu := fun T => Mform (loc T).Phi T mu mu + MPP := fun T => Mform (loc T).Phi T (PX (P.X T)) (PX (P.X T)) + MmuP := fun T => Mform (loc T).Phi T mu (PX (P.X T)) + MmuPi := fun T => Mform (loc T).Phi T mu (PiX (P.X T)) + MPPi := fun T => Mform (loc T).Phi T (PX (P.X T)) (PiX (P.X T)) + MPiPi := fun T => Mform (loc T).Phi T (PiX (P.X T)) (PiX (P.X T)) intMu2 := fun T => ∫ τ in T..(2 * T), mu τ ^ 2 - sumL2g := fun T => sumA2g (P.X T) (P.g T) + sumL2g := fun T => sumA2g (P.X T) (loc T).g + +/-- The concrete `Data P` for the flat-top taper `P.localFun`. -/ +def concreteData (Z : ZeroConfig) : Data P := concreteDataOf P P.localFun Z variable {P} -/-- From H-RvM (`C log T` form) to the `l`-form used by the assembly: `log T ≤ 2 l` eventually. -/ -lemma rvm_evBound {Z : ZeroConfig} (hR : RiemannVonMangoldt Z) : - EvBound (fun T => (Z.N T (2 * T) : ℝ) - T * ell1 T / (2 * π)) l := by - obtain ⟨C, T₀, hC⟩ := hR.main +/-- From H-RvM (`C log T` form) for any density log `ell1f` to the `l`-form used by the assembly: +`log T ≤ 2 l` eventually. -/ +lemma rvm_evBound_gen {Z : ZeroConfig} {ell1f : ℝ → ℝ} + (hmain : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → + |(Z.N T (2 * T) : ℝ) - T / (2 * π) * ell1f T| ≤ C * Real.log T) : + EvBound (fun T => (Z.N T (2 * T) : ℝ) - T * ell1f T / (2 * π)) l := by + obtain ⟨C, T₀, hC⟩ := hmain refine ⟨2 * max C 1, by positivity, max T₀ (4 * π ^ 2), fun T hT => ?_⟩ - have hT₀ : T₀ ≤ T := (le_max_left _ _).trans hT have hT4 : 4 * π ^ 2 ≤ T := (le_max_right _ _).trans hT - have hπ := Real.pi_pos have hT0 : 0 < T := lt_of_lt_of_le (by positivity) hT4 - have h1 := hC T hT₀ - have h2 : T / (2 * π) * ell1 T = T * ell1 T / (2 * π) := by ring - rw [h2] at h1 - -- log T ≤ 2 l T ⟺ log T ≤ 2 log T − 2 log(2π) ⟺ 2 log (2π) ≤ log T ⟺ (2π)² ≤ T + have h1 := hC T ((le_max_left _ _).trans hT) + rw [show T / (2 * π) * ell1f T = T * ell1f T / (2 * π) by ring] at h1 have hl : Real.log T ≤ 2 * l T := by unfold l rw [Real.log_div hT0.ne' (by positivity)] have : Real.log ((2 * π) ^ 2) ≤ Real.log T := Real.log_le_log (by positivity) (by nlinarith only [hT4]) - rw [Real.log_pow] at this - push_cast at this - linarith only [this] - have hlog0 : 0 ≤ Real.log T := Real.log_nonneg (by nlinarith only [hT4, hπ, Real.pi_gt_three]) - calc |(Z.N T (2 * T) : ℝ) - T * ell1 T / (2 * π)| ≤ C * Real.log T := h1 + rw [Real.log_pow] at this; push_cast at this; linarith only [this] + have hlog0 : 0 ≤ Real.log T := + Real.log_nonneg (by nlinarith only [hT4, Real.pi_pos, Real.pi_gt_three]) + calc |(Z.N T (2 * T) : ℝ) - T * ell1f T / (2 * π)| ≤ C * Real.log T := h1 _ ≤ max C 1 * Real.log T := mul_le_mul_of_nonneg_right (le_max_left _ _) hlog0 _ ≤ max C 1 * (2 * l T) := mul_le_mul_of_nonneg_left hl (by positivity) _ = 2 * max C 1 * l T := by ring -/-- **`Facts` for the concrete data.** Inputs: `P.Valid`; `PaperInputs Z` (only H-RvM, H-Γ, -H-cheb, H-MV are used); the taper facts eventually (`LocalHypsEventually`). The §5 sub-results are -proved elsewhere in the repository. -/ -theorem concreteFacts {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (inp : PaperInputs Z) - (hLoc : LocalHypsEventually cϱ P) : Facts (concreteData P Z) := by +/-- From H-RvM (`C log T` form) to the `l`-form used by the assembly. -/ +lemma rvm_evBound {Z : ZeroConfig} (hR : RiemannVonMangoldt Z) : + EvBound (fun T => (Z.N T (2 * T) : ℝ) - T * ell1 T / (2 * π)) l := + rvm_evBound_gen hR.main + +/-- Shared `TraceFactsBase ell1` builder for any concrete window family `loc : ℝ → LocalFun` +eventually satisfying `LocalHypsCore cϱ`. -/ +theorem concreteTraceFactsBase {cϱ : ℝ} {Z : ZeroConfig} {loc : ℝ → LocalFun} + (hP : P.Valid) (inp : PaperInputs Z) + (hLoc : ∃ T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → LocalHypsCore cϱ (P.toSetting T) (loc T)) : + TraceFactsBase ell1 (concreteDataOf P loc Z) := by have hlam : 0 < P.lam ∧ P.lam ≤ 1 := ⟨hP.lam_pos, hP.lam_le_one⟩ have hΓ := inp.Gamma have hcheb := inp.cheb - -- the regime, for majorant nonnegativity have hreg : ∀ᶠ T in atTop, 0 ≤ T ∧ 0 ≤ l T ∧ 0 ≤ Real.log (l T) ∧ 0 ≤ P.L T ∧ 0 ≤ P.X T := by filter_upwards [eventually_ge_atTop 1, eventually_l_ge 1, eventually_log_l_ge 1, eventually_L_ge P hP.lam_pos 1, eventually_one_le_X P hP.lam_pos] with T h1 h2 h3 h4 h5 exact ⟨by linarith, by linarith, by linarith, by linarith, by linarith⟩ - obtain ⟨T₀, hT₀⟩ := id hLoc - -- the §5 sub-results, specialised to the concrete data (EventuallyAt → EvBound) - have e_ends := evBound_of_eventuallyAt hLoc ((PrimeSide.lem_ends cϱ P.lam hΓ hcheb hlam).imp fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (mul_nonneg (mul_nonneg hL hl) hlog) (add_nonneg (sq_nonneg _) hX)) - have e_mumu := evBound_of_eventuallyAt hLoc ((PrimeSide.prop_mumu cϱ P.lam hΓ hcheb hlam).imp fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg, eventually_L_ge P hP.lam_pos 1] with T ⟨hT, hl, hlog, hL, hX⟩ hL1 - exact mul_nonneg (sq_nonneg _) (Real.log_nonneg hL1)) - have e_PP := evBound_of_eventuallyAt hLoc - ((PrimeSide.prop_PP (cϱ := cϱ) (lam := P.lam) hcheb inp.MV hlam).imp fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (sq_nonneg _) hX) - have e_muP := evBound_of_eventuallyAt hLoc ((PrimeSide.prop_cross_muP cϱ P.lam hΓ hcheb hlam).imp fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg hl (Real.sqrt_nonneg _)) - have e_muPi := evBound_of_eventuallyAt hLoc ((PrimeSide.prop_cross_muPi cϱ P.lam hΓ hcheb hlam).imp fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (mul_nonneg hl hL) (Real.sqrt_nonneg _)) - have e_PPi := evBound_of_eventuallyAt hLoc ((PrimeSide.prop_cross_PPi cϱ P.lam hΓ hcheb hlam).imp fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg hL hX) - have e_PiPi := evBound_of_eventuallyAt hLoc ((PrimeSide.prop_cross_PiPi cϱ P.lam hΓ hcheb hlam).imp fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact div_nonneg (mul_nonneg hL hX) hT) - refine ⟨hP.lam_pos, hP.lam_le_one, hP.one_le_w, ?abdef, rvm_evBound inp.RvM, ?muints2, - ?prop_trace, ?lem_ends, ?Msplit, ?prop_mumu, ?prop_PP, ?sum_lower, ?sum_upper, - ?cross_muP, ?cross_muPi, ?cross_PPi, ?cross_PiPi⟩ - case abdef => - filter_upwards [eventually_ge_atTop T₀] with T hT - have hF := hT₀ T hT - exact ⟨hF.b_lower, hF.b_le_a, hF.a_le_one⟩ + obtain ⟨T₀, hT₀⟩ := hLoc + refine ⟨hP.lam_pos, hP.lam_le_one, hP.one_le_w, Eventually.of_forall l_le_ell1, + rvm_evBound inp.RvM, ?muints2, ?prop_trace, + evBound_of_eventually ⟨T₀, hT₀⟩ (PrimeSide.lem_ends cϱ P.lam hΓ hcheb hlam) + (hreg.mono fun _ ⟨_, hl, hlog, hL, hX⟩ => + mul_nonneg (mul_nonneg (mul_nonneg hL hl) hlog) (add_nonneg (sq_nonneg _) hX)), + ?Msplit, + evBound_of_eventually ⟨T₀, hT₀⟩ (PrimeSide.prop_mumu cϱ P.lam hΓ hcheb hlam) (by + filter_upwards [hreg, eventually_L_ge P hP.lam_pos 1] with _ _ hL1 + exact mul_nonneg (sq_nonneg _) (Real.log_nonneg hL1)), + evBound_of_eventually ⟨T₀, hT₀⟩ + (PrimeSide.prop_PP (cϱ := cϱ) (lam := P.lam) hcheb inp.MV hlam) + (hreg.mono fun _ ⟨_, _, _, _, hX⟩ => mul_nonneg (sq_nonneg _) hX), + evBound_of_eventually ⟨T₀, hT₀⟩ (PrimeSide.prop_cross_muP cϱ P.lam hΓ hcheb hlam) + (hreg.mono fun _ ⟨_, hl, _, _, _⟩ => mul_nonneg hl (Real.sqrt_nonneg _)), + evBound_of_eventually ⟨T₀, hT₀⟩ (PrimeSide.prop_cross_muPi cϱ P.lam hΓ hcheb hlam) + (hreg.mono fun _ ⟨_, hl, _, hL, _⟩ => mul_nonneg (mul_nonneg hl hL) (Real.sqrt_nonneg _)), + evBound_of_eventually ⟨T₀, hT₀⟩ (PrimeSide.prop_cross_PPi cϱ P.lam hΓ hcheb hlam) + (hreg.mono fun _ ⟨_, _, _, hL, hX⟩ => mul_nonneg hL hX), + evBound_of_eventually ⟨T₀, hT₀⟩ (PrimeSide.prop_cross_PiPi cϱ P.lam hΓ hcheb hlam) + (hreg.mono fun _ ⟨hT, _, _, hL, hX⟩ => div_nonneg (mul_nonneg hL hX) hT)⟩ case muints2 => obtain ⟨C, T₁, hC⟩ := hΓ.int_mu_sq refine ⟨max C 1, by positivity, max T₁ 0, fun T hT => (hC T ((le_max_left _ _).trans hT)).trans ?_⟩ have hT0 : 0 ≤ T := (le_max_right _ _).trans hT rw [mul_div_assoc] - refine mul_le_mul_of_nonneg_right (le_max_left _ _) ?_ - exact div_nonneg (div_nonneg (mul_nonneg hT0 (sq_nonneg _)) (by positivity)) (sq_nonneg _) + exact mul_le_mul_of_nonneg_right (le_max_left _ _) + (div_nonneg (div_nonneg (mul_nonneg hT0 (sq_nonneg _)) (by positivity)) (sq_nonneg _)) case prop_trace => - obtain ⟨A, hA, T₁, hN⟩ := rvm_evBound inp.RvM + obtain ⟨A, _, T₁, hN⟩ := rvm_evBound inp.RvM obtain ⟨C, T₂, hC⟩ := PrimeSide.prop_trace cϱ P.lam hΓ hcheb hlam A refine ⟨max C 1, by positivity, max T₀ (max T₁ T₂), fun T hT => ?_⟩ - have h0 : T₀ ≤ T := (le_max_left _ _).trans hT - have h1 : T₁ ≤ T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT - have h2 : T₂ ≤ T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT - have hF := hT₀ T h0 - have := hC (P.toSetting T) (P.localFun T) rfl h2 hF.toCore (Z.N T (2 * T) : ℝ) (hN T h1) - rw [trGtA_concrete] at this - refine this.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) ?_) - exact mul_nonneg hF.L_pos.le (Real.sqrt_nonneg _) - case lem_ends => - exact e_ends.congr_left (Eventually.of_forall fun T => by - show P.trGtildeSq T - _ = _; rw [← trGt2A_concrete]; rfl) + have hF := hT₀ T ((le_max_left _ _).trans hT) + have key := hC (P.toSetting T) (loc T) rfl + (((le_max_right _ _).trans (le_max_right _ _)).trans hT) hF (Z.N T (2 * T) : ℝ) + (hN T (((le_max_left _ _).trans (le_max_right _ _)).trans hT)) + exact key.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) + (mul_nonneg hF.L_pos.le (Real.sqrt_nonneg _))) case Msplit => filter_upwards [eventually_ge_atTop T₀] with T hT - exact eq_Msplit cϱ hΓ (P.toSetting T) (P.localFun T) (hT₀ T hT).toCore - case prop_mumu => exact e_mumu - case prop_PP => exact e_PP + exact eq_Msplit cϱ hΓ (P.toSetting T) (loc T) (hT₀ T hT) + +/-- **`Facts` for the concrete data.** -/ +theorem concreteFacts {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (inp : PaperInputs Z) + (hLoc : LocalHypsEventually cϱ P) : Facts (concreteData P Z) := by + have hlam : 0 < P.lam ∧ P.lam ≤ 1 := ⟨hP.lam_pos, hP.lam_le_one⟩ + obtain ⟨T₀, hT₀⟩ := id hLoc + refine ⟨concreteTraceFactsBase hP inp ⟨T₀, fun T hT => (hT₀ T hT).toCore⟩, + ?abdef, ?sum_lower, ?sum_upper⟩ + case abdef => + filter_upwards [eventually_ge_atTop T₀] with T hT + have hF := hT₀ T hT + exact ⟨hF.b_lower, hF.b_le_a, hF.a_le_one⟩ case sum_lower => - obtain ⟨C, T₁, hC⟩ := PrimeSide.sum_a2g_lower (cϱ := cϱ) (lam := P.lam) hcheb hlam + obtain ⟨C, T₁, hC⟩ := PrimeSide.sum_a2g_lower (cϱ := cϱ) (lam := P.lam) inp.cheb hlam refine ⟨max C 1, by positivity, max T₀ T₁, fun T hT => ?_⟩ - have h0 : T₀ ≤ T := (le_max_left _ _).trans hT - have h1 : T₁ ≤ T := (le_max_right _ _).trans hT - have key := hC (P.toSetting T) (P.localFun T) rfl h1 (hT₀ T h0) + have key := hC (P.toSetting T) (P.localFun T) rfl ((le_max_right _ _).trans hT) + (hT₀ T ((le_max_left _ _).trans hT)) simp only [Params.toSetting_L, Params.toSetting_X, Params.toSetting_w, Params.localFun_g] at key show |min (sumA2g (P.X T) (P.g T) - (P.L T - 2 * P.w) ^ 3 / 6) 0| ≤ max C 1 * P.L T ^ 2 rw [abs_of_nonpos (min_le_right _ _)] @@ -178,11 +170,10 @@ theorem concreteFacts {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (inp : PaperIn · rw [h]; linarith · rw [h]; simpa using hpos case sum_upper => - obtain ⟨C, T₁, hC⟩ := PrimeSide.sum_a2g_upper (cϱ := cϱ) (lam := P.lam) hcheb hlam + obtain ⟨C, T₁, hC⟩ := PrimeSide.sum_a2g_upper (cϱ := cϱ) (lam := P.lam) inp.cheb hlam refine ⟨max C 1, by positivity, max T₀ T₁, fun T hT => ?_⟩ - have h0 : T₀ ≤ T := (le_max_left _ _).trans hT - have h1 : T₁ ≤ T := (le_max_right _ _).trans hT - have key := hC (P.toSetting T) (P.localFun T) rfl h1 (hT₀ T h0).toCore + have key := hC (P.toSetting T) (P.localFun T) rfl ((le_max_right _ _).trans hT) + (hT₀ T ((le_max_left _ _).trans hT)).toCore simp only [Params.toSetting_L, Params.toSetting_X, Params.localFun_g] at key show |max (sumA2g (P.X T) (P.g T) - P.L T ^ 3 / 6) 0| ≤ max C 1 * P.L T ^ 2 rw [abs_of_nonneg (le_max_right _ _)] @@ -190,14 +181,8 @@ theorem concreteFacts {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (inp : PaperIn mul_le_mul_of_nonneg_right (le_max_left _ _) (sq_nonneg _) have hpos : 0 ≤ max C 1 * P.L T ^ 2 := by positivity exact max_le (by linarith) hpos - case cross_muP => exact e_muP - case cross_muPi => exact e_muPi - case cross_PPi => exact e_PPi - case cross_PiPi => exact e_PiPi - -/-- **[thm:traces] for the concrete prime-side data**: the hypothesis `ThmTracesHyp P Z` of -`PrimeSideTemp.lean` follows from `P.Valid`, the published inputs `PaperInputs Z`, and the taper -facts for the concrete φ. -/ + +/-- **[thm:traces] for the concrete prime-side data**. -/ theorem thm_traces_of_localHyps {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (inp : PaperInputs Z) (hLoc : LocalHypsEventually cϱ P) : ThmTracesHyp P Z := tracesBounds_of_facts (concreteFacts hP inp hLoc) diff --git a/zeta23/Zeta23/PrimeSideTemp.lean b/zeta23/Zeta23/PrimeSideTemp.lean index f9e2839242..17e3b7c654 100644 --- a/zeta23/Zeta23/PrimeSideTemp.lean +++ b/zeta23/Zeta23/PrimeSideTemp.lean @@ -77,17 +77,27 @@ consume at fixed λ): * each `O(·)` is an `EvBound`: `∃ C > 0, ∃ T₀, ∀ T ≥ T₀, |lhs − main| ≤ C · err`; the paper has `C` depending only on `ϱ` and `T₀` on `λ` — here both may depend on all of `P = (ϱ, λ, w)`; * only the second forms of [eq:tr1] (both equalities given) and of [eq:tr2] are recorded — they are - what §6 uses; the first form of [eq:tr2] is an intermediate result proved in `PrimeSideB`. -/ -structure TracesBounds (P : Params) (aT trG trG2 Ncnt : ℝ → ℝ) : Prop where + what §6 uses; the first form of [eq:tr2] is an intermediate result proved in `PrimeSideB`. + Parametric in error rate `Err`, main term `mainTr2`, and density log `ell1f` (unifies + `TracesBounds`, `TracesBoundsE`, and `ThmE.TracesBoundsChi`). -/ +structure TracesBoundsG (P : Params) (Err aT trG trG2 mainTr2 ell1f Ncnt : ℝ → ℝ) : Prop where /-- [eq:tr1], first equality: `tr G̃ = a L N(T,2T) + O(L √X)`. -/ tr1 : EvBound (fun T => trG T - aT T * P.L T * Ncnt T) (fun T => P.L T * Real.sqrt (P.X T)) - /-- [eq:tr1], second equality: `tr G̃ = L N(T,2T) (1 + O(𝓔_T))`. -/ - tr1' : EvBound (fun T => trG T - P.L T * Ncnt T) (fun T => P.calE T * (P.L T * Ncnt T)) - /-- [eq:tr2], second form: `tr G̃² = (T L/2π)(ℓ₁² + L²/3)(1 + O(𝓔_T))`. -/ - tr2 : EvBound (fun T => trG2 T - P.mainTr2 T) (fun T => P.calE T * P.mainTr2 T) - /-- [eq:ratio]: `(tr G̃)² / tr G̃² = F(λ₁) N(T,2T) (1 + O(𝓔_T))` with `λ₁ = L/ℓ₁` (not `λ`). -/ - ratio : EvBound (fun T => trG T ^ 2 / trG2 T - Ffun (P.lam1 T) * Ncnt T) - (fun T => P.calE T * (Ffun (P.lam1 T) * Ncnt T)) + /-- [eq:tr1], second equality: `tr G̃ = L N(T,2T) (1 + O(Err))`. -/ + tr1' : EvBound (fun T => trG T - P.L T * Ncnt T) (fun T => Err T * (P.L T * Ncnt T)) + /-- [eq:tr2], second form: `tr G̃² = mainTr2 (1 + O(Err))`. -/ + tr2 : EvBound (fun T => trG2 T - mainTr2 T) (fun T => Err T * mainTr2 T) + /-- [eq:ratio]: `(tr G̃)² / tr G̃² = F(L / ell1f) N(T,2T) (1 + O(Err))`. -/ + ratio : EvBound (fun T => trG T ^ 2 / trG2 T - Ffun (P.L T / ell1f T) * Ncnt T) + (fun T => Err T * (Ffun (P.L T / ell1f T) * Ncnt T)) + +/-- The four conclusions of `[thm:traces]` with an abstract error rate `Err`. -/ +abbrev TracesBoundsE (P : Params) (Err aT trG trG2 Ncnt : ℝ → ℝ) : Prop := + TracesBoundsG P Err aT trG trG2 P.mainTr2 ell1 Ncnt + +/-- The four conclusions of `[thm:traces]` with error rate `P.calE`. -/ +abbrev TracesBounds (P : Params) (aT trG trG2 Ncnt : ℝ → ℝ) : Prop := + TracesBoundsG P P.calE aT trG trG2 P.mainTr2 ell1 Ncnt /-- Canonical instantiation of `TracesBounds`: `ThmTracesHyp P Z` := [thm:traces] for the prime-side traces `P.trGtilde`, `P.trGtildeSq` of diff --git a/zeta23/Zeta23/RvM/Backlund.lean b/zeta23/Zeta23/RvM/Backlund.lean index 824f9aa7e3..ec9032bd6f 100644 --- a/zeta23/Zeta23/RvM/Backlund.lean +++ b/zeta23/Zeta23/RvM/Backlund.lean @@ -20,11 +20,8 @@ for non-ordinate heights and assembles RvM.main from GammaFacts.int_mu + the two (‖ζ − 1‖ ≤ π²/6 − 1 < 1 there, Zeta23.RvM.norm_riemannZeta_sub_one_le), and |arg ζ(2+it)| ≤ π/2 since Re ζ(2+it) > 0. -/ -import Zeta23.RvM.ZetaGrowth -import Zeta23.RvM.BacklundDefs import Zeta23.RvM.ReZeroCount -import Zeta23.Statement -import Zeta23.FromPNTPlus.StrongPNTPrefix +import Zeta23.Analytic.BacklundInduction import Mathlib.Analysis.SpecialFunctions.Integrals.Basic open Complex Set MeasureTheory Real intervalIntegral @@ -41,7 +38,6 @@ noncomputable section namespace Zeta23 namespace RvM - /-! ## The horizontal side, calculus half: variation of the argument Fix a height `T ≠ 0` with `ζ ≠ 0` on the segment `[1/2, 2] + iT`. If `Re ζ(σ+iT)` has no zero on an @@ -62,55 +58,39 @@ lemma ofReal_add_mul_I_ne_one (hT : T ≠ 0) (σ : ℝ) : (σ : ℂ) + T * I ≠ simp at this exact hT this -/-- `σ ↦ ζ(σ+iT)` has derivative `ζ'(σ+iT)` in the real variable `σ`. -/ -lemma hasDerivAt_riemannZeta_horizontal (hT : T ≠ 0) (σ : ℝ) : - HasDerivAt (fun σ : ℝ => riemannZeta (σ + T * I)) (deriv riemannZeta (σ + T * I)) σ := by - have hζ : HasDerivAt riemannZeta (deriv riemannZeta (σ + T * I)) (σ + T * I) := - (differentiableAt_riemannZeta (ofReal_add_mul_I_ne_one hT σ)).hasDerivAt +/-- Generic horizontal derivative along `σ ↦ f (σ + T * I)`. -/ +lemma hasDerivAt_horizontal_of {f : ℂ → ℂ} {T σ : ℝ} (hd : DifferentiableAt ℂ f (σ + T * I)) : + HasDerivAt (fun σ : ℝ => f (σ + T * I)) (deriv f (σ + T * I)) σ := by have hγ : HasDerivAt (fun σ : ℝ => (σ : ℂ) + T * I) 1 σ := by have h1 : HasDerivAt (fun t : ℝ => (t : ℂ)) 1 σ := Complex.ofRealCLM.hasDerivAt simpa using h1.add_const ((T : ℂ) * I) - exact (hζ.comp σ hγ).congr_deriv (mul_one _) - -lemma continuous_riemannZeta_horizontal (hT : T ≠ 0) : - Continuous (fun σ : ℝ => riemannZeta (σ + T * I)) := - continuous_iff_continuousAt.mpr fun σ => (hasDerivAt_riemannZeta_horizontal hT σ).continuousAt - -lemma continuous_deriv_riemannZeta_horizontal (hT : T ≠ 0) : - Continuous (fun σ : ℝ => deriv riemannZeta (σ + T * I)) := by - have hγ : Continuous (fun σ : ℝ => (σ : ℂ) + T * I) := by fun_prop - have hA : AnalyticOnNhd ℂ riemannZeta ({1}ᶜ : Set ℂ) := analyticOnNhd_riemannZeta (by simp) - exact hA.deriv.continuousOn.comp_continuous hγ (fun σ => ofReal_add_mul_I_ne_one hT σ) - -/-- `σ ↦ ζ'/ζ(σ+iT)` is continuous on `[1/2,2]` when ζ has no zero on that segment. -/ -lemma continuousOn_logDeriv_horizontal (hT : T ≠ 0) - (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, riemannZeta (σ + T * I) ≠ 0) : - ContinuousOn (fun σ : ℝ => logDeriv riemannZeta (σ + T * I)) (Set.Icc (1/2 : ℝ) 2) := by - have h : ContinuousOn (fun σ : ℝ => deriv riemannZeta (σ + T * I) / riemannZeta (σ + T * I)) - (Set.Icc (1/2 : ℝ) 2) := - (continuous_deriv_riemannZeta_horizontal hT).continuousOn.div - (continuous_riemannZeta_horizontal hT).continuousOn hnz - exact h.congr (fun σ _ => by rw [logDeriv_apply]) - -lemma intervalIntegrable_logDeriv_horizontal (hT : T ≠ 0) - (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, riemannZeta (σ + T * I) ≠ 0) - {u v : ℝ} (hu : u ∈ Set.Icc (1/2 : ℝ) 2) (hv : v ∈ Set.Icc (1/2 : ℝ) 2) : - IntervalIntegrable (fun σ : ℝ => logDeriv riemannZeta (σ + T * I)) volume u v := - ((continuousOn_logDeriv_horizontal hT hnz).mono - (Set.uIcc_subset_Icc hu hv)).intervalIntegrable - -/-- **Base case.** If `Re ζ(σ+iT) ≠ 0` on `(u,v) ⊆ [1/2,2]` then `|Im ∫_u^v ζ'/ζ(σ+iT) dσ| ≤ 2π`. -/ -lemma im_integral_le_two_pi (hT : T ≠ 0) - (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, riemannZeta (σ + T * I) ≠ 0) + exact (hd.hasDerivAt.comp σ hγ).congr_deriv (mul_one _) + +/-- Generic continuity of `σ ↦ logDeriv f (σ + T * I)` on `[1/2, 2]`. -/ +lemma continuousOn_logDeriv_horizontal_of {f : ℂ → ℂ} {T : ℝ} + (hfc : Continuous (fun σ : ℝ => f (σ + T * I))) + (hdfc : Continuous (fun σ : ℝ => deriv f (σ + T * I))) + (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, f (σ + T * I) ≠ 0) : + ContinuousOn (fun σ : ℝ => logDeriv f (σ + T * I)) (Set.Icc (1/2 : ℝ) 2) := by + have h : ContinuousOn (fun σ : ℝ => deriv f (σ + T * I) / f (σ + T * I)) (Set.Icc (1/2 : ℝ) 2) := + hdfc.continuousOn.div hfc.continuousOn hnz + exact h.congr (fun _ _ => by rw [logDeriv_apply]) + +/-- Generic base case: if `Re f(σ + iT) ≠ 0` on `(u, v) ⊆ [1/2, 2]`, then +`|Im ∫_u^v (f'/f)(σ + iT) dσ| ≤ 2π`. -/ +lemma im_integral_le_two_pi_of {f : ℂ → ℂ} {T : ℝ} + (hd : ∀ σ : ℝ, HasDerivAt (fun x : ℝ => f (x + T * I)) (deriv f (σ + T * I)) σ) + (hint : ∀ {u v : ℝ}, u ∈ Set.Icc (1/2 : ℝ) 2 → v ∈ Set.Icc (1/2 : ℝ) 2 → + IntervalIntegrable (fun σ : ℝ => logDeriv f (σ + T * I)) volume u v) + (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, f (σ + T * I) ≠ 0) {u v : ℝ} (hu : 1/2 ≤ u) (huv : u < v) (hv : v ≤ 2) - (hno : ∀ σ ∈ Set.Ioo u v, (riemannZeta (σ + T * I)).re ≠ 0) : - |(∫ σ in u..v, logDeriv riemannZeta (σ + T * I)).im| ≤ 2 * Real.pi := by - set w : ℝ → ℂ := fun σ => riemannZeta (σ + T * I) with hwdef - have hwc : Continuous w := continuous_riemannZeta_horizontal hT + (hno : ∀ σ ∈ Set.Ioo u v, (f (σ + T * I)).re ≠ 0) : + |(∫ σ in u..v, logDeriv f (σ + T * I)).im| ≤ 2 * Real.pi := by + set w : ℝ → ℂ := fun σ => f (σ + T * I) with hwdef + have hwc : Continuous w := continuous_iff_continuousAt.mpr fun σ => (hd σ).continuousAt have huI : u ∈ Set.Icc (1/2 : ℝ) 2 := ⟨hu, by linarith⟩ have hvI : v ∈ Set.Icc (1/2 : ℝ) 2 := ⟨by linarith, hv⟩ have hsub : Set.Icc u v ⊆ Set.Icc (1/2 : ℝ) 2 := Set.Icc_subset_Icc hu hv - -- the sign ε ∈ {±1} of Re w at the midpoint set m : ℝ := (u + v) / 2 with hmdef have hm : m ∈ Set.Ioo u v := ⟨by rw [hmdef]; linarith, by rw [hmdef]; linarith⟩ set ε : ℝ := if 0 < (w m).re then 1 else -1 with hεdef @@ -121,7 +101,6 @@ lemma im_integral_le_two_pi (hT : T ≠ 0) · simp [hεdef, h] · have h' : (w m).re < 0 := lt_of_le_of_ne (not_lt.mp h) (hno m hm) simp only [hεdef, if_neg h]; linarith - -- g := ε · Re w is continuous and, by the IVT, positive on all of (u,v) set g : ℝ → ℝ := fun x => ε * (w x).re with hgdef have hg : Continuous g := continuous_const.mul (Complex.continuous_re.comp hwc) have hpos : ∀ σ ∈ Set.Ioo u v, 0 < g σ := by @@ -134,14 +113,12 @@ lemma im_integral_le_two_pi (hT : T ≠ 0) Set.mem_uIcc.mpr (Or.inl ⟨hσneg.le, hεm.le⟩) obtain ⟨x, hx, hx0⟩ := intermediate_value_uIcc hg.continuousOn h0 exact mul_ne_zero hε0 (hno x (hIcc hx)) hx0 - -- by continuity, g ≥ 0 on the closed interval have hnonneg : ∀ σ ∈ Set.Icc u v, 0 ≤ g σ := by have hcl : IsClosed {x | 0 ≤ g x} := isClosed_le continuous_const hg have : Set.Icc u v ⊆ {x | 0 ≤ g x} := by rw [← closure_Ioo huv.ne] exact hcl.closure_subset_iff.mpr (fun x hx => (hpos x hx).le) exact fun σ hσ => this hσ - -- hence ε·w stays in the slit plane on [u,v] have hslit : ∀ σ ∈ Set.Icc u v, (ε : ℂ) * w σ ∈ Complex.slitPlane := by intro σ hσ rw [Complex.mem_slitPlane_iff, Complex.re_ofReal_mul, Complex.im_ofReal_mul] @@ -158,29 +135,85 @@ lemma im_integral_le_two_pi (hT : T ≠ 0) · exact absurd h1 hε0 · exact h1 exact hnz σ (hsub hσ) (Complex.ext hre him') - -- Φ := log(ε·w) is a primitive of ζ'/ζ(σ+iT) on [u,v] have hderiv : ∀ σ ∈ Set.uIcc u v, HasDerivAt (fun x : ℝ => Complex.log ((ε : ℂ) * w x)) - (logDeriv riemannZeta (σ + T * I)) σ := by + (logDeriv f (σ + T * I)) σ := by intro σ hσ rw [Set.uIcc_of_le huv.le] at hσ have hwσ : w σ ≠ 0 := hnz σ (hsub hσ) have hεc : (ε : ℂ) ≠ 0 := by exact_mod_cast hε0 - have h1 := (hasDerivAt_riemannZeta_horizontal hT σ).const_mul (ε : ℂ) + have h1 := (hd σ).const_mul (ε : ℂ) have h2 := (Complex.hasDerivAt_log (hslit σ hσ)).comp σ h1 - have e : ((ε : ℂ) * w σ)⁻¹ * ((ε : ℂ) * deriv riemannZeta (σ + T * I)) - = logDeriv riemannZeta (σ + T * I) := by - rw [logDeriv_apply, show riemannZeta ((σ : ℂ) + T * I) = w σ from rfl] + have e : ((ε : ℂ) * w σ)⁻¹ * ((ε : ℂ) * deriv f (σ + T * I)) + = logDeriv f (σ + T * I) := by + rw [logDeriv_apply, show f ((σ : ℂ) + T * I) = w σ from rfl] field_simp rw [e] at h2 exact h2 - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hderiv - (intervalIntegrable_logDeriv_horizontal hT hnz huI hvI), + rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hderiv (hint huI hvI), Complex.sub_im, Complex.log_im, Complex.log_im] calc |((ε : ℂ) * w v).arg - ((ε : ℂ) * w u).arg| ≤ |((ε : ℂ) * w v).arg| + |((ε : ℂ) * w u).arg| := abs_sub _ _ _ ≤ Real.pi + Real.pi := add_le_add (Complex.abs_arg_le_pi _) (Complex.abs_arg_le_pi _) _ = 2 * Real.pi := by ring +/-- Generic horizontal variation bound from the induction lemma. -/ +lemma im_integral_logDeriv_le_of {f : ℂ → ℂ} {T : ℝ} {S : Set ℝ} + (hS : S = {σ | σ ∈ Set.Icc (1/2 : ℝ) 2 ∧ (f (σ + T * I)).re = 0}) + (haux : ∀ (P : Finset ℝ), + (∀ σ ∈ Set.Icc (1/2 : ℝ) 2, (f (σ + T * I)).re = 0 → σ ∈ P) → + ∀ n : ℕ, ∀ u v : ℝ, 1/2 ≤ u → u < v → v ≤ 2 → + (P.filter (fun x => u < x ∧ x < v)).card ≤ n → + |(∫ σ in u..v, logDeriv f (σ + T * I)).im| + ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1)) + (hfin : S.Finite) : + |(∫ σ in (1 / 2 : ℝ)..2, logDeriv f (σ + T * I)).im| ≤ 2 * Real.pi * (S.ncard + 1) := by + set P := hfin.toFinset with hPdef + have hP : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, (f (σ + T * I)).re = 0 → σ ∈ P := + fun σ hσ h => hfin.mem_toFinset.mpr (hS ▸ ⟨hσ, h⟩) + have h := haux P hP P.card (1/2) 2 le_rfl (by norm_num) le_rfl (Finset.card_filter_le _ _) + have hc : ((P.filter (fun x => (1/2 : ℝ) < x ∧ x < 2)).card : ℝ) ≤ S.ncard := by + rw [Set.ncard_eq_toFinset_card _ hfin] + exact_mod_cast Finset.card_filter_le _ _ + exact h.trans (by nlinarith [Real.pi_pos]) + +/-- `σ ↦ ζ(σ+iT)` has derivative `ζ'(σ+iT)` in the real variable `σ`. -/ +lemma hasDerivAt_riemannZeta_horizontal (hT : T ≠ 0) (σ : ℝ) : + HasDerivAt (fun σ : ℝ => riemannZeta (σ + T * I)) (deriv riemannZeta (σ + T * I)) σ := + hasDerivAt_horizontal_of (differentiableAt_riemannZeta (ofReal_add_mul_I_ne_one hT σ)) + +lemma continuous_riemannZeta_horizontal (hT : T ≠ 0) : + Continuous (fun σ : ℝ => riemannZeta (σ + T * I)) := + continuous_iff_continuousAt.mpr fun σ => (hasDerivAt_riemannZeta_horizontal hT σ).continuousAt + +lemma continuous_deriv_riemannZeta_horizontal (hT : T ≠ 0) : + Continuous (fun σ : ℝ => deriv riemannZeta (σ + T * I)) := by + have hγ : Continuous (fun σ : ℝ => (σ : ℂ) + T * I) := by fun_prop + have hA : AnalyticOnNhd ℂ riemannZeta ({1}ᶜ : Set ℂ) := analyticOnNhd_riemannZeta (by simp) + exact hA.deriv.continuousOn.comp_continuous hγ (fun σ => ofReal_add_mul_I_ne_one hT σ) + +/-- `σ ↦ ζ'/ζ(σ+iT)` is continuous on `[1/2,2]` when ζ has no zero on that segment. -/ +lemma continuousOn_logDeriv_horizontal (hT : T ≠ 0) + (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, riemannZeta (σ + T * I) ≠ 0) : + ContinuousOn (fun σ : ℝ => logDeriv riemannZeta (σ + T * I)) (Set.Icc (1/2 : ℝ) 2) := + continuousOn_logDeriv_horizontal_of (continuous_riemannZeta_horizontal hT) + (continuous_deriv_riemannZeta_horizontal hT) hnz + +lemma intervalIntegrable_logDeriv_horizontal (hT : T ≠ 0) + (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, riemannZeta (σ + T * I) ≠ 0) + {u v : ℝ} (hu : u ∈ Set.Icc (1/2 : ℝ) 2) (hv : v ∈ Set.Icc (1/2 : ℝ) 2) : + IntervalIntegrable (fun σ : ℝ => logDeriv riemannZeta (σ + T * I)) volume u v := + ((continuousOn_logDeriv_horizontal hT hnz).mono + (Set.uIcc_subset_Icc hu hv)).intervalIntegrable + +/-- **Base case.** If `Re ζ(σ+iT) ≠ 0` on `(u,v) ⊆ [1/2,2]` then `|Im ∫_u^v ζ'/ζ(σ+iT) dσ| ≤ 2π`. -/ +lemma im_integral_le_two_pi (hT : T ≠ 0) + (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, riemannZeta (σ + T * I) ≠ 0) + {u v : ℝ} (hu : 1/2 ≤ u) (huv : u < v) (hv : v ≤ 2) + (hno : ∀ σ ∈ Set.Ioo u v, (riemannZeta (σ + T * I)).re ≠ 0) : + |(∫ σ in u..v, logDeriv riemannZeta (σ + T * I)).im| ≤ 2 * Real.pi := + im_integral_le_two_pi_of (hasDerivAt_riemannZeta_horizontal hT) + (fun hu hv => intervalIntegrable_logDeriv_horizontal hT hnz hu hv) hnz hu huv hv hno + /-- **Induction.** With `P ⊇` the zeros of `Re ζ(σ+iT)` in `[1/2,2]`: `|Im ∫_u^v ζ'/ζ(σ+iT) dσ| ≤ 2π (#(P ∩ (u,v)) + 1)` for `1/2 ≤ u < v ≤ 2`. -/ lemma im_integral_logDeriv_le_aux (hT : T ≠ 0) @@ -189,77 +222,10 @@ lemma im_integral_logDeriv_le_aux (hT : T ≠ 0) ∀ n : ℕ, ∀ u v : ℝ, 1/2 ≤ u → u < v → v ≤ 2 → (P.filter (fun x => u < x ∧ x < v)).card ≤ n → |(∫ σ in u..v, logDeriv riemannZeta (σ + T * I)).im| - ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := by - -- the empty-interior case, used twice - have base : ∀ u v : ℝ, 1/2 ≤ u → u < v → v ≤ 2 → - (P.filter (fun x => u < x ∧ x < v)).card = 0 → - |(∫ σ in u..v, logDeriv riemannZeta (σ + T * I)).im| - ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := by - intro u v hu huv hv hc - have hno : ∀ σ ∈ Set.Ioo u v, (riemannZeta (σ + T * I)).re ≠ 0 := by - intro σ hσ hre - have hσP : σ ∈ P.filter (fun x => u < x ∧ x < v) := - Finset.mem_filter.mpr ⟨hP σ ⟨by linarith [hσ.1], by linarith [hσ.2]⟩ hre, hσ.1, hσ.2⟩ - rw [Finset.card_eq_zero] at hc - simp [hc] at hσP - rw [hc] - have := im_integral_le_two_pi hT hnz hu huv hv hno - simpa using this - intro n - induction n with - | zero => - intro u v hu huv hv hc - exact base u v hu huv hv (Nat.le_zero.mp hc) - | succ n ih => - intro u v hu huv hv hc - by_cases hc0 : (P.filter (fun x => u < x ∧ x < v)).card = 0 - · exact base u v hu huv hv hc0 - obtain ⟨m, hm⟩ := Finset.card_pos.mp (Nat.pos_of_ne_zero hc0) - obtain ⟨-, hum, hmv⟩ := Finset.mem_filter.mp hm - -- the two halves carry fewer points: c₁ + c₂ + 1 ≤ c - set S := P.filter (fun x => u < x ∧ x < v) with hSdef - set S₁ := P.filter (fun x => u < x ∧ x < m) with hS₁def - set S₂ := P.filter (fun x => m < x ∧ x < v) with hS₂def - have hdisj : Disjoint S₁ S₂ := by - rw [Finset.disjoint_left] - intro x hx1 hx2 - have := (Finset.mem_filter.mp hx1).2.2 - have := (Finset.mem_filter.mp hx2).2.1 - linarith - have hsubS : S₁ ∪ S₂ ⊆ S.erase m := by - intro x hx - rw [Finset.mem_erase] - rcases Finset.mem_union.mp hx with hx | hx - · obtain ⟨hxP, hux, hxm⟩ := Finset.mem_filter.mp hx - exact ⟨hxm.ne, Finset.mem_filter.mpr ⟨hxP, hux, by linarith⟩⟩ - · obtain ⟨hxP, hmx, hxv⟩ := Finset.mem_filter.mp hx - exact ⟨hmx.ne', Finset.mem_filter.mpr ⟨hxP, by linarith, hxv⟩⟩ - have hcard : S₁.card + S₂.card + 1 ≤ S.card := by - have h1 : S₁.card + S₂.card = (S₁ ∪ S₂).card := (Finset.card_union_of_disjoint hdisj).symm - have h2 : (S₁ ∪ S₂).card ≤ (S.erase m).card := Finset.card_le_card hsubS - have h3 : (S.erase m).card = S.card - 1 := Finset.card_erase_of_mem hm - have h4 : 1 ≤ S.card := Finset.card_pos.mpr ⟨m, hm⟩ - omega - have hc1 : S₁.card ≤ n := by omega - have hc2 : S₂.card ≤ n := by omega - have e1 := ih u m hu hum (by linarith) hc1 - have e2 := ih m v (by linarith) hmv hv hc2 - -- split the integral at m - have hmI : m ∈ Set.Icc (1/2 : ℝ) 2 := ⟨by linarith, by linarith⟩ - have huI : u ∈ Set.Icc (1/2 : ℝ) 2 := ⟨hu, by linarith⟩ - have hvI : v ∈ Set.Icc (1/2 : ℝ) 2 := ⟨by linarith, hv⟩ - rw [← intervalIntegral.integral_add_adjacent_intervals - (intervalIntegrable_logDeriv_horizontal hT hnz huI hmI) - (intervalIntegrable_logDeriv_horizontal hT hnz hmI hvI), Complex.add_im] - have hcast : ((S₁.card : ℝ) + 1) + ((S₂.card : ℝ) + 1) ≤ (S.card : ℝ) + 1 := by - have : ((S₁.card + S₂.card + 1 : ℕ) : ℝ) ≤ (S.card : ℝ) := by exact_mod_cast hcard - push_cast at this; linarith - calc |(∫ σ in u..m, logDeriv riemannZeta (σ + T * I)).im - + (∫ σ in m..v, logDeriv riemannZeta (σ + T * I)).im| - ≤ |(∫ σ in u..m, logDeriv riemannZeta (σ + T * I)).im| - + |(∫ σ in m..v, logDeriv riemannZeta (σ + T * I)).im| := abs_add_le _ _ - _ ≤ 2 * Real.pi * ((S₁.card : ℝ) + 1) + 2 * Real.pi * ((S₂.card : ℝ) + 1) := add_le_add e1 e2 - _ ≤ 2 * Real.pi * ((S.card : ℝ) + 1) := by nlinarith [Real.pi_pos] + ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := + Analytic.im_integral_logDeriv_le_aux_of + (fun u v hu huv hv hno => by simpa using im_integral_le_two_pi hT hnz hu huv hv hno) + (fun hu hv => intervalIntegrable_logDeriv_horizontal hT hnz hu hv) P hP /-- **(V) Variation of the argument along `[1/2,2] + iT`:** if `ζ ≠ 0` there and `Re ζ(σ+iT)` has finitely many zeros, then `|Im ∫_{1/2}^{2} ζ'/ζ(σ+iT) dσ| ≤ 2π (#reZeroSet T + 1)`. -/ @@ -267,17 +233,8 @@ theorem im_integral_logDeriv_le (hT : T ≠ 0) (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, riemannZeta (σ + T * I) ≠ 0) (hfin : (reZeroSet T).Finite) : |(∫ σ in (1 / 2 : ℝ)..2, logDeriv riemannZeta (σ + T * I)).im| - ≤ 2 * Real.pi * ((reZeroSet T).ncard + 1) := by - set P := hfin.toFinset with hPdef - have hP : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, (riemannZeta (σ + T * I)).re = 0 → σ ∈ P := - fun σ hσ h => hfin.mem_toFinset.mpr ⟨hσ, h⟩ - have h := im_integral_logDeriv_le_aux hT hnz P hP P.card (1/2) 2 le_rfl (by norm_num) le_rfl - (Finset.card_filter_le _ _) - have hc : ((P.filter (fun x => (1/2 : ℝ) < x ∧ x < 2)).card : ℝ) ≤ (reZeroSet T).ncard := by - rw [Set.ncard_eq_toFinset_card _ hfin] - exact_mod_cast Finset.card_filter_le _ _ - refine h.trans ?_ - nlinarith [Real.pi_pos] + ≤ 2 * Real.pi * ((reZeroSet T).ncard + 1) := + im_integral_logDeriv_le_of rfl (im_integral_logDeriv_le_aux hT hnz) hfin end Variation @@ -332,16 +289,6 @@ theorem backlund_horizontal : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → |(∫ σ in (1 / 2 : ℝ)..2, logDeriv riemannZeta (σ + T * I)).im| ≤ C * Real.log T := backlund_horizontal_of_count reZeroSet_card_le -/-- **Backlund's bound, explicit**: for T ≥ 4 a zero-free height, -|Im ∫_{1/2}^{2} ζ'/ζ(σ+iT)dσ| ≤ 2π·(C_J + 1)·log T with C_J = (1/log(0.9/0.8))(|log 40| + 2) ≈ 48.3 -(so the constant is ≈ 310). -/ -theorem backlund_horizontal_at : ∀ T : ℝ, max 4 3 ≤ T → - (∀ ρ, IsNontrivialZero ρ → ρ.im ≠ T) → - |(∫ σ in (1 / 2 : ℝ)..2, logDeriv riemannZeta (σ + T * I)).im| - ≤ 2 * Real.pi * ((1 / Real.log ((0.9 : ℝ) / 0.8) - * (|Real.log (6 * (20 / 3 : ℝ))| + 2 * max (1 : ℝ) 0)) + 1) * Real.log T := - backlund_horizontal_of_count_at reZeroSet_card_le_at - /-! ## The vertical side σ = 2 -/ /-- `Re ζ(2+it) > 0` (indeed `≥ 2 − π²/6`), from `‖ζ(s) − 1‖ ≤ π²/6 − 1 < 1` on `Re s ≥ 2`. -/ @@ -358,59 +305,70 @@ lemma two_add_mul_I_ne_one (t : ℝ) : (2 : ℂ) + t * I ≠ 1 := by have := congrArg Complex.re h simp at this -/-- `t ↦ log ζ(2+it)` is a primitive of `t ↦ ζ'/ζ(2+it)·i`. -/ -lemma hasDerivAt_log_riemannZeta_two (t : ℝ) : - HasDerivAt (fun t : ℝ => Complex.log (riemannZeta (2 + t * I))) - (logDeriv riemannZeta (2 + t * I) * I) t := by - have hs := two_add_mul_I_ne_one t - have hζ : HasDerivAt riemannZeta (deriv riemannZeta (2 + t * I)) (2 + t * I) := - (differentiableAt_riemannZeta hs).hasDerivAt +/-- Generic vertical primitive along `σ = 2`: `t ↦ log f(2+it)` has derivative `(f'/f)(2+it)·i`. -/ +lemma hasDerivAt_log_two_of {f : ℂ → ℂ} {t : ℝ} (hd : DifferentiableAt ℂ f (2 + t * I)) + (hre : 0 < (f (2 + t * I)).re) : + HasDerivAt (fun t : ℝ => Complex.log (f (2 + t * I))) (logDeriv f (2 + t * I) * I) t := by have hγ : HasDerivAt (fun t : ℝ => (2 : ℂ) + t * I) I t := by have h1 : HasDerivAt (fun t : ℝ => (t : ℂ)) 1 t := Complex.ofRealCLM.hasDerivAt simpa using (h1.mul_const I).const_add (2 : ℂ) - have hcomp : HasDerivAt (fun t : ℝ => riemannZeta (2 + t * I)) (deriv riemannZeta (2 + t * I) * I) t := - hζ.comp t hγ - have hlog : HasDerivAt Complex.log (riemannZeta (2 + t * I))⁻¹ (riemannZeta (2 + t * I)) := - Complex.hasDerivAt_log (Or.inl (re_riemannZeta_two_pos t)) - have h := hlog.comp t hcomp - have e : (riemannZeta (2 + t * I))⁻¹ * (deriv riemannZeta (2 + t * I) * I) - = logDeriv riemannZeta (2 + t * I) * I := by + have h := (Complex.hasDerivAt_log (Or.inl hre)).comp t (hd.hasDerivAt.comp t hγ) + have e : (f (2 + t * I))⁻¹ * (deriv f (2 + t * I) * I) = logDeriv f (2 + t * I) * I := by rw [logDeriv_apply]; ring - rw [e] at h - exact h + rwa [e] at h -/-- Continuity of `t ↦ ζ'/ζ(2+it)·i`. -/ -lemma continuous_logDeriv_riemannZeta_two : - Continuous (fun t : ℝ => logDeriv riemannZeta (2 + t * I) * I) := by +/-- Generic continuity of `t ↦ (f'/f)(2+it)·i` when `f` is analytic on `U ⊇ {2 + it}` with `Re f > 0`. -/ +lemma continuous_logDeriv_two_of {f : ℂ → ℂ} {U : Set ℂ} (hA : AnalyticOnNhd ℂ f U) + (hU : ∀ t : ℝ, (2 : ℂ) + t * I ∈ U) (hre : ∀ t : ℝ, 0 < (f (2 + t * I)).re) : + Continuous (fun t : ℝ => logDeriv f (2 + t * I) * I) := by have hγ : Continuous (fun t : ℝ => (2 : ℂ) + t * I) := by fun_prop - have hA : AnalyticOnNhd ℂ riemannZeta ({1}ᶜ : Set ℂ) := analyticOnNhd_riemannZeta (by simp) - have hd : Continuous (fun t : ℝ => deriv riemannZeta (2 + t * I)) := - hA.deriv.continuousOn.comp_continuous hγ (fun t => two_add_mul_I_ne_one t) - have hz : Continuous (fun t : ℝ => riemannZeta (2 + t * I)) := - hA.continuousOn.comp_continuous hγ (fun t => two_add_mul_I_ne_one t) - have hne : ∀ t : ℝ, riemannZeta (2 + t * I) ≠ 0 := fun t h => by - have := re_riemannZeta_two_pos t; rw [h] at this; simp at this + have hd : Continuous (fun t : ℝ => deriv f (2 + t * I)) := + hA.deriv.continuousOn.comp_continuous hγ hU + have hz : Continuous (fun t : ℝ => f (2 + t * I)) := hA.continuousOn.comp_continuous hγ hU + have hne : ∀ t : ℝ, f (2 + t * I) ≠ 0 := fun t h => by + have := hre t; rw [h, Complex.zero_re] at this; exact lt_irrefl 0 this simp only [logDeriv_apply] - exact ((hd.div hz hne).mul continuous_const) + exact (hd.div hz hne).mul continuous_const + +/-- Generic vertical side `σ = 2` bound: `|Im ∫_{T₁}^{T₂} (f'/f)(2+it)·i dt| ≤ π`. -/ +lemma vertical_two_of {f : ℂ → ℂ} (hre : ∀ t : ℝ, 0 < (f (2 + t * I)).re) + (hderiv : ∀ t : ℝ, HasDerivAt (fun t : ℝ => Complex.log (f (2 + t * I))) + (logDeriv f (2 + t * I) * I) t) + (hcont : Continuous (fun t : ℝ => logDeriv f (2 + t * I) * I)) : + ∀ T₁ T₂ : ℝ, |(∫ t in T₁..T₂, logDeriv f (2 + t * I) * I).im| ≤ Real.pi := by + intro T₁ T₂ + rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hderiv t) + (hcont.intervalIntegrable _ _), Complex.sub_im, Complex.log_im, Complex.log_im] + have h1 : |(f (2 + T₂ * I)).arg| ≤ π / 2 := + Complex.abs_arg_le_pi_div_two_iff.mpr (hre T₂).le + have h2 : |(f (2 + T₁ * I)).arg| ≤ π / 2 := + Complex.abs_arg_le_pi_div_two_iff.mpr (hre T₁).le + calc |(f (2 + T₂ * I)).arg - (f (2 + T₁ * I)).arg| + ≤ |(f (2 + T₂ * I)).arg| + |(f (2 + T₁ * I)).arg| := abs_sub _ _ + _ ≤ π / 2 + π / 2 := add_le_add h1 h2 + _ = π := by ring + +/-- `t ↦ log ζ(2+it)` is a primitive of `t ↦ ζ'/ζ(2+it)·i`. -/ +lemma hasDerivAt_log_riemannZeta_two (t : ℝ) : + HasDerivAt (fun t : ℝ => Complex.log (riemannZeta (2 + t * I))) + (logDeriv riemannZeta (2 + t * I) * I) t := + hasDerivAt_log_two_of (differentiableAt_riemannZeta (two_add_mul_I_ne_one t)) + (re_riemannZeta_two_pos t) + +/-- Continuity of `t ↦ ζ'/ζ(2+it)·i`. -/ +lemma continuous_logDeriv_riemannZeta_two : + Continuous (fun t : ℝ => logDeriv riemannZeta (2 + t * I) * I) := + continuous_logDeriv_two_of (U := ({1}ᶜ : Set ℂ)) (analyticOnNhd_riemannZeta (by simp)) + two_add_mul_I_ne_one re_riemannZeta_two_pos /-- **Vertical side σ = 2.** `|Im (∫_{T₁}^{T₂} ζ'/ζ(2+it)·i dt)| ≤ π` for all `T₁, T₂`: `log ζ(2+it)` is a primitive, and `|arg ζ(2+it)| ≤ π/2` since `Re ζ(2+it) > 0`. (The sharper constant `2 log 3` also holds — |arg| ≤ arcsin(π²/6−1) — but an absolute constant suffices for the consumer.) -/ theorem vertical_two : ∀ T₁ T₂ : ℝ, - |(∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I) * I).im| ≤ Real.pi := by - intro T₁ T₂ - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hasDerivAt_log_riemannZeta_two t) - (continuous_logDeriv_riemannZeta_two.intervalIntegrable _ _)] - rw [Complex.sub_im, Complex.log_im, Complex.log_im] - have h1 : |(riemannZeta (2 + T₂ * I)).arg| ≤ π / 2 := - Complex.abs_arg_le_pi_div_two_iff.mpr (re_riemannZeta_two_pos T₂).le - have h2 : |(riemannZeta (2 + T₁ * I)).arg| ≤ π / 2 := - Complex.abs_arg_le_pi_div_two_iff.mpr (re_riemannZeta_two_pos T₁).le - calc |(riemannZeta (2 + T₂ * I)).arg - (riemannZeta (2 + T₁ * I)).arg| - ≤ |(riemannZeta (2 + T₂ * I)).arg| + |(riemannZeta (2 + T₁ * I)).arg| := abs_sub _ _ - _ ≤ π / 2 + π / 2 := add_le_add h1 h2 - _ = π := by ring + |(∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I) * I).im| ≤ Real.pi := + vertical_two_of re_riemannZeta_two_pos hasDerivAt_log_riemannZeta_two + continuous_logDeriv_riemannZeta_two end RvM end Zeta23 diff --git a/zeta23/Zeta23/RvM/BacklundDefs.lean b/zeta23/Zeta23/RvM/BacklundDefs.lean index 745e89a1bd..6036d023ae 100644 --- a/zeta23/Zeta23/RvM/BacklundDefs.lean +++ b/zeta23/Zeta23/RvM/BacklundDefs.lean @@ -24,9 +24,6 @@ namespace RvM def reZeroSet (T : ℝ) : Set ℝ := {σ | σ ∈ Set.Icc (1/2 : ℝ) 2 ∧ (riemannZeta (σ + T * I)).re = 0} -lemma mem_reZeroSet {T σ : ℝ} : - σ ∈ reZeroSet T ↔ σ ∈ Set.Icc (1/2 : ℝ) 2 ∧ (riemannZeta (σ + T * I)).re = 0 := Iff.rfl - end RvM end Zeta23 diff --git a/zeta23/Zeta23/RvM/Defs.lean b/zeta23/Zeta23/RvM/Defs.lean index fb25ee7a60..9c226aa394 100644 --- a/zeta23/Zeta23/RvM/Defs.lean +++ b/zeta23/Zeta23/RvM/Defs.lean @@ -36,17 +36,4 @@ def halfContour (F : ℂ → ℂ) (T₁ T₂ : ℝ) : ℂ := (∫ σ in (1/2:ℝ)..2, F (σ + T₁ * I)) + (∫ t in T₁..T₂, F (2 + t * I)) * I - ∫ σ in (1/2:ℝ)..2, F (σ + T₂ * I) -lemma halfContour_add (F G : ℂ → ℂ) (T₁ T₂ : ℝ) - (hb : IntervalIntegrable (fun σ : ℝ => F (σ + T₁ * I)) MeasureTheory.volume (1/2) 2) - (hb' : IntervalIntegrable (fun σ : ℝ => G (σ + T₁ * I)) MeasureTheory.volume (1/2) 2) - (hr : IntervalIntegrable (fun t : ℝ => F (2 + t * I)) MeasureTheory.volume T₁ T₂) - (hr' : IntervalIntegrable (fun t : ℝ => G (2 + t * I)) MeasureTheory.volume T₁ T₂) - (ht : IntervalIntegrable (fun σ : ℝ => F (σ + T₂ * I)) MeasureTheory.volume (1/2) 2) - (ht' : IntervalIntegrable (fun σ : ℝ => G (σ + T₂ * I)) MeasureTheory.volume (1/2) 2) : - halfContour (fun s => F s + G s) T₁ T₂ = halfContour F T₁ T₂ + halfContour G T₁ T₂ := by - unfold halfContour - rw [intervalIntegral.integral_add hb hb', intervalIntegral.integral_add hr hr', - intervalIntegral.integral_add ht ht'] - ring - end Zeta23.RvM diff --git a/zeta23/Zeta23/RvM/Fold.lean b/zeta23/Zeta23/RvM/Fold.lean index 5ffac60c46..d9d7942c33 100644 --- a/zeta23/Zeta23/RvM/Fold.lean +++ b/zeta23/Zeta23/RvM/Fold.lean @@ -23,11 +23,87 @@ import Zeta23.WeilEF.XiLogDeriv import Zeta23.FromPNTPlus.ZetaConj open Complex MeasureTheory Set intervalIntegral +open scoped ComplexConjugate noncomputable section namespace Zeta23.RvM +/-! ## Generic fold (function-abstract) -/ + +section GenericFold + +variable {F : ℂ → ℂ} {T₁ T₂ : ℝ} + +lemma horizontal_fold_of (T : ℝ) (hcont : Continuous fun σ : ℝ => F (σ + T * I)) + (hfold : ∀ x ∈ uIcc (1 / 2 : ℝ) 2, F (1 - conj ((x : ℂ) + T * I)) = -conj (F ((x : ℂ) + T * I))) : + ∫ σ in (-1 : ℝ)..2, F (σ + T * I) = 2 * I * ((∫ σ in (1 / 2 : ℝ)..2, F (σ + T * I)).im : ℂ) := by + have hsplit := integral_add_adjacent_intervals + (hcont.intervalIntegrable (μ := volume) (-1) (1 / 2)) (hcont.intervalIntegrable (μ := volume) (1 / 2) 2) + rw [← hsplit] + set A := ∫ σ in (1 / 2 : ℝ)..2, F (σ + T * I) with hA + have hleft : ∫ σ in (-1 : ℝ)..(1 / 2), F (σ + T * I) = -starRingEnd ℂ A := by + have hsub := intervalIntegral.integral_comp_sub_left (f := fun x : ℝ => F (x + T * I)) + (a := (1 / 2 : ℝ)) (b := 2) (1 : ℝ) + norm_num at hsub + rw [← hsub, hA, ← intervalIntegral_conj, ← intervalIntegral.integral_neg] + apply intervalIntegral.integral_congr + intro x hx + have key := hfold x hx + have e : (1 : ℂ) - starRingEnd ℂ ((x : ℂ) + T * I) = 1 - (x : ℂ) + T * I := by + simp [Complex.ext_iff] + simp only + rw [← e, key] + rw [hleft, neg_add_eq_sub, Complex.sub_conj] + push_cast + ring + +lemma vertical_fold_of + (hfold : ∀ t ∈ uIcc T₁ T₂, F (1 - conj ((2 : ℂ) + t * I)) = -conj (F ((2 : ℂ) + t * I))) : + ∫ t in T₁..T₂, F (-1 + t * I) = -starRingEnd ℂ (∫ t in T₁..T₂, F (2 + t * I)) := by + rw [← intervalIntegral_conj, ← intervalIntegral.integral_neg] + apply intervalIntegral.integral_congr + intro t ht + have e : (1 : ℂ) - starRingEnd ℂ (2 + t * I) = -1 + t * I := by simp [Complex.ext_iff]; norm_num + show F (-1 + t * I) = -starRingEnd ℂ (F (2 + t * I)) + rw [← e, hfold t ht] + +theorem rectangleIntegral_eq_halfContour_of_fold + (hc₁ : Continuous fun σ : ℝ => F (σ + T₁ * I)) (hc₂ : Continuous fun σ : ℝ => F (σ + T₂ * I)) + (hf₁ : ∀ x ∈ uIcc (1 / 2 : ℝ) 2, F (1 - conj ((x : ℂ) + T₁ * I)) = -conj (F ((x : ℂ) + T₁ * I))) + (hf₂ : ∀ x ∈ uIcc (1 / 2 : ℝ) 2, F (1 - conj ((x : ℂ) + T₂ * I)) = -conj (F ((x : ℂ) + T₂ * I))) + (hfv : ∀ t ∈ uIcc T₁ T₂, F (1 - conj ((2 : ℂ) + t * I)) = -conj (F ((2 : ℂ) + t * I))) : + RectangleIntegral F (-1 + T₁ * I) (2 + T₂ * I) = 2 * I * ((halfContour F T₁ T₂).im : ℂ) := by + have hre1 : (-1 + T₁ * I).re = -1 := by simp + have him1 : (-1 + T₁ * I).im = T₁ := by simp + have hre2 : (2 + T₂ * I : ℂ).re = 2 := by simp + have him2 : (2 + T₂ * I : ℂ).im = T₂ := by simp + simp only [RectangleIntegral, HIntegral, VIntegral, hre1, him1, hre2, him2, smul_eq_mul, + Complex.ofReal_neg, Complex.ofReal_one, Complex.ofReal_ofNat] + rw [horizontal_fold_of T₁ hc₁ hf₁, horizontal_fold_of T₂ hc₂ hf₂, vertical_fold_of hfv] + simp only [halfContour, Complex.add_im, Complex.sub_im, Complex.mul_I_im] + generalize (∫ σ in (1 / 2 : ℝ)..2, F (σ + T₁ * I)) = A₁ + generalize (∫ σ in (1 / 2 : ℝ)..2, F (σ + T₂ * I)) = A₂ + generalize (∫ t in T₁..T₂, F (2 + t * I)) = B + have e1 : 2 * I * (A₁.im : ℂ) - 2 * I * (A₂.im : ℂ) + I * B - I * -starRingEnd ℂ B + = 2 * I * (A₁.im : ℂ) - 2 * I * (A₂.im : ℂ) + I * (B + starRingEnd ℂ B) := by ring + rw [e1, Complex.add_conj] + push_cast + ring + +theorem natCast_eq_im_halfContour {N : ℕ} + (hN : RectangleIntegral' F (-1 + T₁ * I) (2 + T₂ * I) = (N : ℂ)) + (hfold : RectangleIntegral F (-1 + T₁ * I) (2 + T₂ * I) = 2 * I * ((halfContour F T₁ T₂).im : ℂ)) : + (N : ℝ) = (1 / Real.pi) * (halfContour F T₁ T₂).im := by + have h := hN + change (1 / (2 * Real.pi * I)) • RectangleIntegral _ _ _ = _ at h + rw [hfold, smul_eq_mul] at h + have h' : ((N : ℝ) : ℂ) = (((1 / Real.pi) * (halfContour F T₁ T₂).im : ℝ) : ℂ) := by + push_cast; rw [← h]; field_simp + exact_mod_cast h' + +end GenericFold + section ConjSymmetry /-- (x : ℂ)^(conj w) = conj ((x : ℂ)^w) for real x > 0. -/ @@ -105,99 +181,69 @@ lemma continuousAt_logDeriv_completedZeta {s : ℂ} (him : 1 ≤ s.im) (hgood : hgood s (completedRiemannZeta_eq_zero_iff.mp h) rfl exact hΛ.deriv.continuousAt.div hΛ.continuousAt hne +private lemma continuous_logDeriv_completedZeta_horizontal {T : ℝ} (hT : 1 ≤ T) + (hgood : GoodHeight T) : + Continuous fun σ : ℝ => logDeriv completedRiemannZeta (σ + T * I) := + continuous_iff_continuousAt.mpr fun σ => + ContinuousAt.comp (f := fun σ : ℝ => (σ : ℂ) + T * I) + (continuousAt_logDeriv_completedZeta (s := σ + T * I) (by simpa using hT) + (by simpa using hgood)) (by fun_prop) + +private lemma fold_logDeriv_completedZeta_horizontal {T : ℝ} (hT : 1 ≤ T) (hgood : GoodHeight T) : + ∀ x ∈ uIcc (1 / 2 : ℝ) 2, + logDeriv completedRiemannZeta (1 - conj ((x : ℂ) + T * I)) + = -conj (logDeriv completedRiemannZeta ((x : ℂ) + T * I)) := by + intro x hx + rw [uIcc_of_le (by norm_num)] at hx + have hxpos : 0 < x := by linarith [hx.1] + obtain ⟨hs1, hζ⟩ := path_point_facts (s := x + T * I) (by simpa using hxpos) + (by simpa using hT) (by simpa using hgood) + exact logDeriv_completedZeta_one_sub_conj (s := x + T * I) (by simpa using hxpos) hs1 hζ + +private lemma fold_logDeriv_completedZeta_vertical {T₁ T₂ : ℝ} (_h1 : 1 ≤ T₁) (_h12 : T₁ ≤ T₂) : + ∀ t ∈ uIcc T₁ T₂, + logDeriv completedRiemannZeta (1 - conj ((2 : ℂ) + t * I)) + = -conj (logDeriv completedRiemannZeta ((2 : ℂ) + t * I)) := by + intro t _ht + have hs1 : (2 : ℂ) + t * I ≠ 1 := by + intro hh; have := congrArg Complex.re hh; simp at this + exact logDeriv_completedZeta_one_sub_conj (s := 2 + t * I) (by simp) hs1 + (riemannZeta_ne_zero_of_one_le_re (by simp)) + /-- Horizontal fold at a good height T ≥ 1: ∫_{−1}^{2} F(σ+iT)dσ = 2i·Im ∫_{1/2}^{2} F(σ+iT)dσ. -/ lemma horizontal_fold {T : ℝ} (hT : 1 ≤ T) (hgood : GoodHeight T) : ∫ σ in (-1 : ℝ)..2, logDeriv completedRiemannZeta (σ + T * I) - = 2 * I * ((∫ σ in (1 / 2 : ℝ)..2, logDeriv completedRiemannZeta (σ + T * I)).im : ℂ) := by - set F := logDeriv completedRiemannZeta with hF - have hcont : Continuous fun σ : ℝ => F (σ + T * I) := by - refine continuous_iff_continuousAt.mpr fun σ => ?_ - have h := continuousAt_logDeriv_completedZeta (s := σ + T * I) (by simpa using hT) - (by simpa using hgood) - exact ContinuousAt.comp (f := fun σ : ℝ => (σ : ℂ) + T * I) h (by fun_prop) - have hsplit := intervalIntegral.integral_add_adjacent_intervals - (hcont.intervalIntegrable (μ := volume) (-1) (1 / 2)) - (hcont.intervalIntegrable (μ := volume) (1 / 2) 2) - rw [← hsplit] - set A := ∫ σ in (1 / 2 : ℝ)..2, F (σ + T * I) with hA - -- the left piece is −conj A - have hleft : ∫ σ in (-1 : ℝ)..(1 / 2), F (σ + T * I) = -starRingEnd ℂ A := by - have hsub := intervalIntegral.integral_comp_sub_left (f := fun x : ℝ => F (x + T * I)) - (a := (1 / 2 : ℝ)) (b := 2) (1 : ℝ) - norm_num at hsub - -- hsub : ∫ x in 1/2..2, F (↑(1 - x) + T I) = ∫ x in -1..1/2, F (x + T I) (up to cast shape) - rw [← hsub, hA, ← intervalIntegral_conj, ← intervalIntegral.integral_neg] - apply intervalIntegral.integral_congr - intro x hx - rw [uIcc_of_le (by norm_num)] at hx - have hxpos : 0 < x := by linarith [hx.1] - obtain ⟨hs1, hζ⟩ := path_point_facts (s := x + T * I) (by simpa using hxpos) - (by simpa using hT) (by simpa using hgood) - have key := logDeriv_completedZeta_one_sub_conj (s := x + T * I) (by simpa using hxpos) hs1 hζ - have e : (1 : ℂ) - starRingEnd ℂ (x + T * I) = 1 - (x : ℂ) + T * I := by - simp [Complex.ext_iff] - simp only [hF] at key ⊢ - rw [← e, key] - rw [hleft, neg_add_eq_sub, Complex.sub_conj] - push_cast - ring + = 2 * I * ((∫ σ in (1 / 2 : ℝ)..2, logDeriv completedRiemannZeta (σ + T * I)).im : ℂ) := + horizontal_fold_of T (continuous_logDeriv_completedZeta_horizontal hT hgood) + (fold_logDeriv_completedZeta_horizontal hT hgood) /-- Vertical fold: ∫_{T₁}^{T₂} F(−1+it)dt = −conj ∫_{T₁}^{T₂} F(2+it)dt (1 ≤ T₁ ≤ T₂). -/ lemma vertical_fold {T₁ T₂ : ℝ} (h1 : 1 ≤ T₁) (h12 : T₁ ≤ T₂) : ∫ t in T₁..T₂, logDeriv completedRiemannZeta (-1 + t * I) - = -starRingEnd ℂ (∫ t in T₁..T₂, logDeriv completedRiemannZeta (2 + t * I)) := by - rw [← intervalIntegral_conj, ← intervalIntegral.integral_neg] - apply intervalIntegral.integral_congr - intro t ht - rw [uIcc_of_le h12] at ht - have ht1 : 1 ≤ t := le_trans h1 ht.1 - have hs1 : (2 : ℂ) + t * I ≠ 1 := by - intro hh; have := congrArg Complex.re hh; simp at this - have hζ : riemannZeta (2 + t * I) ≠ 0 := riemannZeta_ne_zero_of_one_le_re (by simp) - have key := logDeriv_completedZeta_one_sub_conj (s := 2 + t * I) (by simp) hs1 hζ - have e : (1 : ℂ) - starRingEnd ℂ (2 + t * I) = -1 + t * I := by - simp [Complex.ext_iff]; norm_num - show logDeriv completedRiemannZeta (-1 + t * I) - = -starRingEnd ℂ (logDeriv completedRiemannZeta (2 + t * I)) - rw [← e, key] + = -starRingEnd ℂ (∫ t in T₁..T₂, logDeriv completedRiemannZeta (2 + t * I)) := + vertical_fold_of (fold_logDeriv_completedZeta_vertical h1 h12) /-- **The fold.** For good heights 1 ≤ T₁ < T₂: ∮_{∂([−1,2]×[T₁,T₂])} Λ'/Λ = 2i · Im(halfContour (Λ'/Λ) T₁ T₂). -/ theorem rectangleIntegral_logDeriv_completedZeta_eq_halfContour {T₁ T₂ : ℝ} (h1 : 1 ≤ T₁) (h12 : T₁ < T₂) (hg1 : GoodHeight T₁) (hg2 : GoodHeight T₂) : RectangleIntegral (logDeriv completedRiemannZeta) (-1 + T₁ * I) (2 + T₂ * I) - = 2 * I * ((halfContour (logDeriv completedRiemannZeta) T₁ T₂).im : ℂ) := by - have hre1 : (-1 + T₁ * I).re = -1 := by simp - have him1 : (-1 + T₁ * I).im = T₁ := by simp - have hre2 : (2 + T₂ * I : ℂ).re = 2 := by simp - have him2 : (2 + T₂ * I : ℂ).im = T₂ := by simp - simp only [RectangleIntegral, HIntegral, VIntegral, hre1, him1, hre2, him2, smul_eq_mul, - Complex.ofReal_neg, Complex.ofReal_one, Complex.ofReal_ofNat] - rw [horizontal_fold h1 hg1, horizontal_fold (by linarith) hg2, vertical_fold h1 h12.le] - simp only [halfContour, Complex.add_im, Complex.sub_im, Complex.mul_I_im] - generalize (∫ σ in (1 / 2 : ℝ)..2, logDeriv completedRiemannZeta (σ + T₁ * I)) = A₁ - generalize (∫ σ in (1 / 2 : ℝ)..2, logDeriv completedRiemannZeta (σ + T₂ * I)) = A₂ - generalize (∫ t in T₁..T₂, logDeriv completedRiemannZeta (2 + t * I)) = B - have e1 : 2 * I * (A₁.im : ℂ) - 2 * I * (A₂.im : ℂ) + I * B - I * -starRingEnd ℂ B - = 2 * I * (A₁.im : ℂ) - 2 * I * (A₂.im : ℂ) + I * (B + starRingEnd ℂ B) := by ring - rw [e1, Complex.add_conj] - push_cast - ring + = 2 * I * ((halfContour (logDeriv completedRiemannZeta) T₁ T₂).im : ℂ) := + rectangleIntegral_eq_halfContour_of_fold + (continuous_logDeriv_completedZeta_horizontal h1 hg1) + (continuous_logDeriv_completedZeta_horizontal (by linarith) hg2) + (fold_logDeriv_completedZeta_horizontal h1 hg1) + (fold_logDeriv_completedZeta_horizontal (by linarith) hg2) + (fold_logDeriv_completedZeta_vertical h1 h12.le) /-- **N(T₁,T₂) = (1/π)·Im ∫_L Λ'/Λ** for good heights 1 ≤ T₁ < T₂ (this is MainTerm.lean's N_eq_halfContour_completedZeta). -/ theorem Ncount_eq_im_halfContour {T₁ T₂ : ℝ} (h1 : 1 ≤ T₁) (h12 : T₁ < T₂) (hg1 : GoodHeight T₁) (hg2 : GoodHeight T₂) : (Ncount T₁ T₂ : ℝ) - = (1 / Real.pi) * (halfContour (logDeriv completedRiemannZeta) T₁ T₂).im := by - have h := rectangleIntegral'_logDeriv_completedZeta_eq_Ncount (by linarith) h12.le hg1 hg2 - change (1 / (2 * Real.pi * I)) • RectangleIntegral _ _ _ = _ at h - rw [rectangleIntegral_logDeriv_completedZeta_eq_halfContour h1 h12 hg1 hg2, smul_eq_mul] at h - have h' : ((Ncount T₁ T₂ : ℝ) : ℂ) - = (((1 / Real.pi) * (halfContour (logDeriv completedRiemannZeta) T₁ T₂).im : ℝ) : ℂ) := by - push_cast - rw [← h] - field_simp - exact_mod_cast h' + = (1 / Real.pi) * (halfContour (logDeriv completedRiemannZeta) T₁ T₂).im := + natCast_eq_im_halfContour + (rectangleIntegral'_logDeriv_completedZeta_eq_Ncount (by linarith) h12.le hg1 hg2) + (rectangleIntegral_logDeriv_completedZeta_eq_halfContour h1 h12 hg1 hg2) end Zeta23.RvM diff --git a/zeta23/Zeta23/RvM/GammaSide.lean b/zeta23/Zeta23/RvM/GammaSide.lean index de2771c636..06198b72e2 100644 --- a/zeta23/Zeta23/RvM/GammaSide.lean +++ b/zeta23/Zeta23/RvM/GammaSide.lean @@ -116,20 +116,19 @@ theorem re_logDeriv_Gammaℝ_half (t : ℝ) : simp ring -/-- (M4) the Γ-side identity: for 0 < T₁ and any T₂, -(1/π)·Im(halfContour (logDeriv Γℝ) T₁ T₂) = ∫_{T₁}^{T₂} μ. -/ -theorem gamma_side {T₁ T₂ : ℝ} (_h0 : 0 < T₁) (_h0' : 0 < T₂) : - (1 / Real.pi) * (halfContour (logDeriv Complex.Gammaℝ) T₁ T₂).im = ∫ t in T₁..T₂, mu t := by - set F := logDeriv Complex.Gammaℝ with hF - -- Cauchy–Goursat on the rectangle [1/2, 2] × [T₁, T₂] +/-- Generic Cauchy–Goursat contour move from the right half-contour to the critical line +`Re s = 1/2`: for any `F` holomorphic on `Re s > 0`, +`(1/π) · Im (halfContour F T₁ T₂) = (1/π) · ∫_{T₁}^{T₂} Re (F (1/2 + it)) dt`. -/ +theorem halfContour_im_eq_integral_re_half {F : ℂ → ℂ} + (hF : DifferentiableOn ℂ F rightHalfPlane) (T₁ T₂ : ℝ) : + (1 / Real.pi) * (halfContour F T₁ T₂).im = + (1 / Real.pi) * ∫ y : ℝ in T₁..T₂, (F (1 / 2 + y * I)).re := by have hrect : (Set.uIcc (1/2:ℝ) 2 ×ℂ Set.uIcc T₁ T₂) ⊆ rightHalfPlane := by rintro s ⟨hre, -⟩ rw [Set.uIcc_of_le (by norm_num : (1/2:ℝ) ≤ 2)] at hre - show 0 < s.re - have := hre.1 - linarith [this] + show 0 < s.re; linarith [hre.1] have hCG := Complex.integral_boundary_rect_eq_zero_of_differentiableOn F (1/2 + T₁ * I) (2 + T₂ * I) - (logDeriv_Gammaℝ_differentiableOn.mono (by simpa using hrect)) + (hF.mono (by simpa using hrect)) simp only [add_re, one_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero, add_im, one_im, mul_im, zero_add, div_ofNat_re, div_ofNat_im, zero_div, re_ofNat, im_ofNat] at hCG @@ -139,19 +138,20 @@ theorem gamma_side {T₁ T₂ : ℝ} (_h0 : 0 < T₁) (_h0' : 0 < T₂) : simp only [smul_eq_mul] at hthis have hc : ((1/2 : ℝ) : ℂ) = (1/2 : ℂ) := by norm_num simp only [hc] at hthis - -- bottom - top + I*right - I*left = 0 linear_combination hthis rw [hhc, Complex.mul_im, Complex.I_re, Complex.I_im, zero_mul, one_mul, zero_add] - -- Re ∫ = ∫ Re have hcont : Continuous fun y : ℝ => F (1/2 + y * I) := by - have hd := logDeriv_Gammaℝ_differentiableOn - have : Continuous fun y : ℝ => ((1:ℂ)/2 + y * I) := by fun_prop - refine (hd.continuousOn.comp_continuous this fun y => ?_) - show 0 < ((1:ℂ)/2 + y * I).re - simp + refine hF.continuousOn.comp_continuous (by fun_prop : Continuous fun y : ℝ => ((1:ℂ)/2 + y * I)) + (fun y => by show 0 < ((1:ℂ)/2 + y * I).re; simp) rw [show ((∫ y : ℝ in T₁..T₂, F (1/2 + y * I)).re) = ∫ y : ℝ in T₁..T₂, (F (1/2 + y * I)).re from (Complex.reCLM.intervalIntegral_comp_comm (hcont.intervalIntegrable _ _)).symm] - simp_rw [hF, re_logDeriv_Gammaℝ_half] + +/-- (M4) the Γ-side identity: for 0 < T₁ and any T₂, +(1/π)·Im(halfContour (logDeriv Γℝ) T₁ T₂) = ∫_{T₁}^{T₂} μ. -/ +theorem gamma_side {T₁ T₂ : ℝ} (_h0 : 0 < T₁) (_h0' : 0 < T₂) : + (1 / Real.pi) * (halfContour (logDeriv Complex.Gammaℝ) T₁ T₂).im = ∫ t in T₁..T₂, mu t := by + rw [halfContour_im_eq_integral_re_half logDeriv_Gammaℝ_differentiableOn] + simp_rw [re_logDeriv_Gammaℝ_half] rw [intervalIntegral.integral_const_mul] field_simp @@ -161,42 +161,67 @@ theorem gamma_side {T₁ T₂ : ℝ} (_h0 : 0 < T₁) (_h0' : 0 < T₂) : theorem mu_continuous (hΓ : Zeta23.GammaFacts) : Continuous mu := hΓ.smooth.continuous -/-- |μ(τ)| ≪ log(τ+3) for τ ≥ 1, from H-Γ's Stirling field. -/ -theorem mu_le_log (hΓ : Zeta23.GammaFacts) : ∃ C : ℝ, 0 < C ∧ ∀ τ : ℝ, 1 ≤ τ → - |mu τ| ≤ C * Real.log (τ + 3) := by - obtain ⟨C₀, hC₀⟩ := hΓ.stirling - have hlog2π : 0 ≤ Real.log (2 * Real.pi) := - Real.log_nonneg (by nlinarith [Real.pi_gt_three]) - refine ⟨1 + |C₀| + Real.log (2 * Real.pi), - by linarith [abs_nonneg C₀], fun τ hτ => ?_⟩ - have hτ0 : (0:ℝ) < τ := by linarith - have h1 := hC₀ τ (by rw [abs_of_pos hτ0]; exact hτ) +/-- Generic Stirling-to-log bound: if `|μ(τ) - (1/2π) log(scale·|τ|/2π)| ≤ C / τ²` for `|τ| ≥ 1` +(with `1 ≤ scale`, `0 ≤ C`), then `|μ(τ)| ≤ (C + 2) · log(scale·(τ + 3))` for `τ ≥ 1`. -/ +theorem mu_le_log_of_stirling {μ : ℝ → ℝ} {scale C : ℝ} (hscale : 1 ≤ scale) (hC : 0 ≤ C) + (hst : ∀ τ : ℝ, 1 ≤ |τ| → + |μ τ - (1 / (2 * Real.pi)) * Real.log (scale * |τ| / (2 * Real.pi))| ≤ C / τ ^ 2) : + ∀ τ : ℝ, 1 ≤ τ → |μ τ| ≤ (C + 2) * Real.log (scale * (τ + 3)) := by + intro τ hτ + have hτ0 : (0 : ℝ) < τ := by linarith + have h1 := hst τ (by rw [abs_of_pos hτ0]; exact hτ) rw [abs_of_pos hτ0] at h1 obtain ⟨hl, hr⟩ := abs_le.mp h1 - have hlog3 : 1 ≤ Real.log (τ + 3) := by - rw [← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - have hlogτ0 : 0 ≤ Real.log τ := Real.log_nonneg hτ - have hlogτ : Real.log τ ≤ Real.log (τ + 3) := Real.log_le_log hτ0 (by linarith) - have hdiv : Real.log (τ / (2 * Real.pi)) = Real.log τ - Real.log (2 * Real.pi) := - Real.log_div (by linarith) (by positivity) - rw [hdiv] at hl hr - have hC₀τ : |C₀ / τ ^ 2| ≤ |C₀| := by - rw [abs_div, abs_of_pos (by positivity : (0:ℝ) < τ ^ 2)] - apply div_le_self (abs_nonneg _) (by nlinarith) - obtain ⟨hCl, hCr⟩ := abs_le.mp hC₀τ - have h2π : 1 / (2 * Real.pi) ≤ 1 := by - rw [div_le_one (by positivity)]; nlinarith [Real.pi_gt_three] + set L : ℝ := Real.log (scale * (τ + 3)) with hLdef + have hqt4 : (4 : ℝ) ≤ scale * (τ + 3) := by nlinarith + have hL1 : 1 ≤ L := by + rw [hLdef, ← Real.log_exp 1] + exact Real.log_le_log (Real.exp_pos 1) (by linarith [Real.exp_one_lt_d9]) + have harg : Real.log (scale * τ / (2 * Real.pi)) ≤ L := by + rw [hLdef] + apply Real.log_le_log (by positivity) + rw [div_le_iff₀ (by positivity)]; nlinarith [Real.pi_gt_three] + have hCτ : |C / τ ^ 2| ≤ C := by + rw [abs_div, abs_of_nonneg hC, abs_of_pos (by positivity : (0 : ℝ) < τ ^ 2)] + exact div_le_self hC (by nlinarith) + obtain ⟨hCl, hCr⟩ := abs_le.mp hCτ have h2π0 : 0 < 1 / (2 * Real.pi) := by positivity + have h2π1 : 1 / (2 * Real.pi) ≤ 1 := by + rw [div_le_one (by positivity)]; nlinarith [Real.pi_gt_three] + have hlow : -(2 * L) ≤ 1 / (2 * Real.pi) * Real.log (scale * τ / (2 * Real.pi)) := by + have h7 : Real.log (scale * τ / (2 * Real.pi)) ≥ -Real.log (2 * Real.pi) := by + rw [Real.log_div (by positivity) (by positivity)] + have : 0 ≤ Real.log (scale * τ) := Real.log_nonneg (by nlinarith) + linarith + have h8 : Real.log (2 * Real.pi) ≤ 2 * L := by + have h9 : Real.log (2 * Real.pi) ≤ Real.log 16 := + Real.log_le_log (by positivity) (by nlinarith [Real.pi_lt_d2]) + have h10 : Real.log 16 = 2 * Real.log 4 := by + rw [show (16 : ℝ) = 4 ^ 2 by norm_num, Real.log_pow]; push_cast; ring + have h11 : Real.log 4 ≤ L := by rw [hLdef]; exact Real.log_le_log (by norm_num) hqt4 + linarith + have hln2π0 : 0 ≤ Real.log (2 * Real.pi) := Real.log_nonneg (by nlinarith [Real.pi_gt_three]) + have h12 := mul_le_mul_of_nonneg_left h7 h2π0.le + have h13 : -(2 * L) ≤ 1 / (2 * Real.pi) * -(Real.log (2 * Real.pi)) := by + have h14 := mul_le_mul h2π1 h8 hln2π0 (by norm_num) + nlinarith + linarith rw [abs_le] constructor - · -- lower bound: mu τ ≥ (1/2π)(log τ − log 2π) − C₀/τ² ≥ −(…)·log(τ+3) - have e1 : -(Real.log (2 * Real.pi)) ≤ 1 / (2 * Real.pi) * (Real.log τ - Real.log (2 * Real.pi)) := by - nlinarith - nlinarith - · have e2 : 1 / (2 * Real.pi) * (Real.log τ - Real.log (2 * Real.pi)) ≤ Real.log (τ + 3) := by - nlinarith + · nlinarith + · have hup : 1 / (2 * Real.pi) * Real.log (scale * τ / (2 * Real.pi)) ≤ L := by + rcases le_or_gt 0 (Real.log (scale * τ / (2 * Real.pi))) with h | h + · exact (mul_le_mul_of_nonneg_right h2π1 h).trans (by rw [one_mul]; exact harg) + · nlinarith nlinarith +/-- |μ(τ)| ≪ log(τ+3) for τ ≥ 1, from H-Γ's Stirling field. -/ +theorem mu_le_log (hΓ : Zeta23.GammaFacts) : ∃ C : ℝ, 0 < C ∧ ∀ τ : ℝ, 1 ≤ τ → + |mu τ| ≤ C * Real.log (τ + 3) := by + obtain ⟨C₀, hC₀⟩ := hΓ.stirling + refine ⟨|C₀| + 2, by positivity, fun τ hτ => ?_⟩ + simpa [one_mul] using mu_le_log_of_stirling (μ := mu) (scale := 1) (C := |C₀|) le_rfl (abs_nonneg _) + (fun t ht => by + simpa [one_mul] using (hC₀ t ht).trans (by gcongr; exact le_abs_self _)) τ hτ + end Zeta23.RvM diff --git a/zeta23/Zeta23/RvM/Generic.lean b/zeta23/Zeta23/RvM/Generic.lean new file mode 100644 index 0000000000..5b92e0f34c --- /dev/null +++ b/zeta23/Zeta23/RvM/Generic.lean @@ -0,0 +1,623 @@ +/- +Copyright (c) 2026 Anthropic, PBC. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +SPDX-License-Identifier: Apache-2.0 +-/ +/- +Zeta23/RvM/Generic.lean — unified zero-counting and Riemann–von Mangoldt assembly engine. + +Shared across `ζ` (`RvM/{LocalCount,ReZeroCount,MainTerm}`), Dirichlet `L(s, χ)` +(`ThmE/{LocalCountChi,ReZeroCountChi,MainTermChi}`), and `ξ'` (`XiPrime/ZeroCount/GenericRvM`): + * `DiscCountData` + `DiscCountData.local_count_large` / `local_count_of`: + Jensen `ZerosBound` (r = 0.84, R = 0.95) + reflection halving for `N(t, t+1] ≪ log(scale·(|t|+3))`. + * `symFn` + `reZeroCount_of`: + Jensen `ZerosBound` (r = 0.8, R = 0.9) on `symFn f₁ f₂ T z = (f₁(z+iT) + f₂(z-iT))/2` + for `#{σ ∈ [1/2, 2] : Re f₁(σ+iT) = 0} ≪ log(scale·(|T|+3))`. + * `rvM_main_scaled` / `abs_im_halfContour_le`: + generic Riemann–von Mangoldt main-term assembly for any `ZeroConfig`, `Good`, `Λ`, `μ`, `ell`, + and `scale ≥ 1`. +-/ +import Zeta23.RvM.Defs +import Zeta23.RvM.Halving +import Zeta23.FromPNTPlus.StrongPNTPrefix +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.Real.Pi.Bounds +import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic + +open Complex Set Filter Topology Metric MeasureTheory intervalIntegral + +attribute [-instance] LieAlgebra.ofAssociativeAlgebra + +noncomputable section + +namespace Zeta23.RvM + +/-! ### Shared analyticity, finiteness, and order-transport lemmas -/ + +/-- Zeros of a function analytic on an open ball are finite in any closed sub-ball, given one +nonvanishing point. -/ +lemma finite_zeros_closedBall {f : ℂ → ℂ} {R r : ℝ} (hrR : r < R) + (hA : AnalyticOnNhd ℂ f (Metric.ball 0 R)) {z₀ : ℂ} (hz₀ : z₀ ∈ Metric.ball 0 R) + (hfz₀ : f z₀ ≠ 0) : {z : ℂ | ‖z‖ ≤ r ∧ f z = 0}.Finite := by + have hU : IsPreconnected (Metric.ball (0 : ℂ) R) := (convex_ball 0 R).isPreconnected + rcases hA.eqOn_zero_or_eventually_ne_zero_of_preconnected hU with h0 | hcod + · exact absurd (h0 hz₀) hfz₀ + rw [Filter.Eventually, codiscreteWithin_iff_locallyFiniteComplementWithin] at hcod + have hsub : Metric.closedBall (0 : ℂ) r ⊆ Metric.ball 0 R := Metric.closedBall_subset_ball hrR + have hloc : ∀ z ∈ Metric.closedBall (0 : ℂ) r, ∃ t ∈ nhds z, + (t ∩ {x : ℂ | x ∈ Metric.ball (0 : ℂ) R ∧ f x = 0}).Finite := by + intro z hz + obtain ⟨t, ht, hfin⟩ := hcod z (hsub hz) + refine ⟨t, ht, hfin.subset ?_⟩ + rintro x ⟨hxt, hxU, hx0⟩ + exact ⟨hxt, hxU, by simpa using hx0⟩ + choose t ht hfin using hloc + obtain ⟨I, hcover⟩ := (isCompact_closedBall (0 : ℂ) r).elim_nhds_subcover' t ht + refine ((I.finite_toSet.biUnion fun z _ => hfin z z.2).subset ?_) + rintro x ⟨hxr, hx0⟩ + have hxball : x ∈ Metric.closedBall (0 : ℂ) r := by + rwa [Metric.mem_closedBall, dist_zero_right] + obtain ⟨z, hzI, hxz⟩ := Set.mem_iUnion₂.mp (hcover hxball) + exact Set.mem_iUnion₂.mpr ⟨z, hzI, hxz, hsub hxball, hx0⟩ + +/-- Order transport for an affine-rescaled analytic function `z ↦ f (s₀ + c * z) * u`. -/ +lemma analyticOrderAt_comp_affine_mul {f : ℂ → ℂ} {s₀ c u w : ℂ} + (hf : AnalyticAt ℂ f (s₀ + c * w)) (hc : c ≠ 0) (hu : u ≠ 0) : + analyticOrderAt (fun z : ℂ => f (s₀ + c * z) * u) w = analyticOrderAt f (s₀ + c * w) := by + have haff : AnalyticAt ℂ (fun z : ℂ => s₀ + c * z) w := by fun_prop + have hcomp : AnalyticAt ℂ (fun z => f (s₀ + c * z)) w := hf.comp_of_eq haff rfl + have hmul : (fun z ↦ f (s₀ + c * z) * u) = (fun z => f (s₀ + c * z)) * fun _ => u := rfl + rw [hmul, analyticOrderAt_mul hcomp analyticAt_const, + analyticAt_const.analyticOrderAt_eq_zero.mpr hu, add_zero] + have hderiv : deriv (fun z : ℂ => s₀ + c * z) w ≠ 0 := by + rw [deriv_const_add, deriv_const_mul _ differentiableAt_id, deriv_id'']; simpa using hc + simpa [Function.comp_def] using analyticOrderAt_comp_of_deriv_ne_zero (f := f) haff hderiv + +/-- Elementary log lower bound: `1 ≤ log (scale * (|t| + 3))` for `1 ≤ scale`. -/ +lemma one_le_log_scale_add_three {scale : ℝ} (hscale : 1 ≤ scale) (t : ℝ) : + 1 ≤ Real.log (scale * (|t| + 3)) := by + rw [← Real.log_exp 1] + apply Real.log_le_log (Real.exp_pos 1) + have := Real.exp_one_lt_d9 + nlinarith [abs_nonneg t] + +/-- Elementary log comparison: `log (scale * (|t| + 6)) ≤ 2 * log (scale * (|t| + 3))` +for `1 ≤ scale`. -/ +lemma log_scale_add_six_le {scale : ℝ} (hscale : 1 ≤ scale) (t : ℝ) : + Real.log (scale * (|t| + 6)) ≤ 2 * Real.log (scale * (|t| + 3)) := by + rw [← Real.log_rpow (by nlinarith [abs_nonneg t]), Real.rpow_two] + apply Real.log_le_log (by nlinarith [abs_nonneg t]) + have ht := abs_nonneg t + have hs2 : scale ≤ scale ^ 2 := by nlinarith + have ht2 : |t| + 6 ≤ (|t| + 3) ^ 2 := by nlinarith + calc scale * (|t| + 6) ≤ scale ^ 2 * (|t| + 3) ^ 2 := mul_le_mul hs2 ht2 (by linarith) (by positivity) + _ = (scale * (|t| + 3)) ^ 2 := by ring + +/-! ### Part 1: Disc-based local zero count (`DiscCountData`) -/ + +/-- Bundled disc analyticity, centre lower bound, right-half-plane growth, and zero-config linkage +for Jensen's `ZerosBound` local zero count on `r = 0.84, R = 0.95` around `2 + (t + 1/2)i`. -/ +structure DiscCountData where + f : ℂ → ℂ + Zc : ZeroConfig + scale : ℝ + t₀ : ℝ + c₀ : ℝ + C : ℝ + A : ℝ + hscale : 1 ≤ scale + ht₀ : 0 ≤ t₀ + hc₀ : 0 < c₀ + hC : 0 < C + hA : 0 ≤ A + hfa : ∀ t : ℝ, t₀ ≤ |t| → + AnalyticOnNhd ℂ f (Metric.ball (2 + (t + 1 / 2 : ℝ) * I) (1.9 * 1.05)) + hlow : ∀ t : ℝ, t₀ ≤ |t| → c₀ ≤ ‖f (2 + (t + 1 / 2 : ℝ) * I)‖ + hgrow : ∀ t : ℝ, t₀ ≤ |t| → + ∀ s ∈ Metric.closedBall (2 + (t + 1 / 2 : ℝ) * I) (1.9 * 0.95), + ‖f s‖ ≤ C * (scale * (|t| + 6)) ^ A + hlink : ∀ ρ ∈ Zc.carrier, 1 / 2 ≤ ρ.re → + f ρ = 0 ∧ analyticOrderNatAt f ρ = Zc.mult ρ + +/-- **Local zero count for `|t| ≥ D.t₀`** (constant independent of `D.scale`). -/ +theorem DiscCountData.local_count_large (D : DiscCountData) {t : ℝ} (ht : D.t₀ ≤ |t|) : + (D.Zc.N t (t + 1) : ℝ) ≤ + (2 / Real.log ((0.95 : ℝ) / 0.84) * (Real.log (max (D.C / D.c₀) 1) + 2 * D.A)) * + Real.log (D.scale * (|t| + 3)) := by + set r : ℝ := 0.84 with hr + set R : ℝ := 0.95 with hR + set c₀_pt : ℂ := 2 + (t + 1 / 2 : ℝ) * I with hc₀ + set κ : ℂ := ((19 / 10 : ℝ) : ℂ) with hκ + have hκ0 : κ ≠ 0 := by simp [hκ] + have hnormκ : ‖κ‖ = 1.9 := by simp [hκ]; norm_num + have hfc₀ : D.c₀ ≤ ‖D.f c₀_pt‖ := D.hlow t ht + have hfc₀ne : D.f c₀_pt ≠ 0 := by + intro h; rw [h, norm_zero] at hfc₀; linarith [D.hc₀] + set u : ℂ := (D.f c₀_pt)⁻¹ with hu + have hu0 : u ≠ 0 := inv_ne_zero hfc₀ne + have hnu : ‖u‖ ≤ D.c₀⁻¹ := by + rw [hu, norm_inv]; exact inv_anti₀ D.hc₀ hfc₀ + set G : ℂ → ℂ := fun w => D.f (c₀_pt + κ * w) * u with hG + have hGball : AnalyticOnNhd ℂ G (Metric.ball (0 : ℂ) 1.05) := by + intro w hw + rw [Metric.mem_ball, dist_zero_right] at hw + have hmem : c₀_pt + κ * w ∈ Metric.ball c₀_pt (1.9 * 1.05) := by + rw [Metric.mem_ball, dist_eq_norm, add_sub_cancel_left, norm_mul, hnormκ] + nlinarith + exact ((D.hfa t ht _ hmem).comp_of_eq + (by fun_prop : AnalyticAt ℂ (fun w : ℂ => c₀_pt + κ * w) w) rfl).mul analyticAt_const + have hfAnalytic : AnalyticOnNhd ℂ G (Metric.closedBall (0 : ℂ) 1) := + hGball.mono (Metric.closedBall_subset_ball (by norm_num)) + have hG0 : G 0 = 1 := by simp [hG, hu, hfc₀ne] + have hfin : (SetOfZeros 1 G).Finite := by + have h := finite_zeros_closedBall (f := G) (R := 1.05) (r := 1) (by norm_num) hGball + (z₀ := 0) (by simp; norm_num) (by rw [hG0]; exact one_ne_zero) + exact h.subset fun _ hz => hz + set M : ℝ := max (D.C / D.c₀) 1 with hM + have hM1 : 1 ≤ M := le_max_right _ _ + have hMratio : D.C / D.c₀ ≤ M := le_max_left _ _ + set B : ℝ := M * (D.scale * (|t| + 6)) ^ D.A with hB + have hfz : ∀ z : ℂ, ‖z‖ ≤ R → ‖G z‖ ≤ B := by + intro z hz + have hmem : c₀_pt + κ * z ∈ Metric.closedBall c₀_pt (1.9 * 0.95) := by + rw [Metric.mem_closedBall, dist_eq_norm, add_sub_cancel_left, norm_mul, hnormκ, hR] at * + nlinarith + have h1 := D.hgrow t ht _ hmem + have hpow0 : 0 ≤ (D.scale * (|t| + 6)) ^ D.A := + Real.rpow_nonneg (by nlinarith [D.hscale, abs_nonneg t]) _ + calc ‖G z‖ = ‖D.f (c₀_pt + κ * z)‖ * ‖u‖ := by rw [hG]; exact norm_mul _ _ + _ ≤ (D.C * (D.scale * (|t| + 6)) ^ D.A) * D.c₀⁻¹ := + mul_le_mul h1 hnu (norm_nonneg _) (mul_nonneg D.hC.le hpow0) + _ = (D.C / D.c₀) * (D.scale * (|t| + 6)) ^ D.A := by ring + _ ≤ B := mul_le_mul_of_nonneg_right hMratio hpow0 + have hrlt1 : r < 1 := by norm_num [hr] + have hZ := ZerosBound (B := B) (r := r) (R := R) (by norm_num [hr]) hrlt1 + (by norm_num [hr, hR]) (by norm_num [hR]) hfAnalytic hG0 hfin hfz + set Z : Finset ℂ := (finiteSetOfZeros_mono hrlt1 hfin).toFinset with hZdef + set W : Set ℂ := D.Zc.window t (t + 1) ∩ {ρ : ℂ | 1 / 2 ≤ ρ.re} with hW + have hWfin : W.Finite := (D.Zc.window_finite t (t + 1)).subset inter_subset_left + set φ : ℂ → ℂ := fun ρ => (ρ - c₀_pt) / κ with hφ + have hφinj : Function.Injective φ := by + intro a b h; simp only [hφ] at h + have := congrArg (fun w => c₀_pt + κ * w) h + simpa [mul_div_cancel₀ _ hκ0] using this + have hφinv : ∀ ρ, c₀_pt + κ * φ ρ = ρ := fun ρ => by simp only [hφ]; field_simp; ring + have hφnorm : ∀ ρ ∈ W, ‖φ ρ‖ ≤ r := by + rintro ρ ⟨⟨hρZ, hρt, hρt1⟩, hρre⟩ + have hstrip := D.Zc.strip ρ hρZ + simp only [hφ, norm_div, hnormκ] + rw [div_le_iff₀ (by norm_num), hr] + have hre : (ρ - c₀_pt).re = ρ.re - 2 := by simp [hc₀] + have him : (ρ - c₀_pt).im = ρ.im - (t + 1 / 2) := by simp [hc₀] + have hsq : ‖ρ - c₀_pt‖ ^ 2 ≤ (0.84 * 1.9) ^ 2 := by + rw [Complex.sq_norm, Complex.normSq_apply, hre, him] + have := hstrip.2; have := hρre.out; nlinarith + exact (pow_le_pow_iff_left₀ (norm_nonneg _) (by norm_num) two_ne_zero).mp hsq + have hmemS : ∀ ρ ∈ W, φ ρ ∈ Z := by + intro ρ hρ + rw [hZdef, Set.Finite.mem_toFinset] + refine ⟨hφnorm ρ hρ, ?_⟩ + simp only [hG, hφinv, (D.hlink ρ hρ.1.1 hρ.2).1, zero_mul] + have hmult : ∀ ρ ∈ W, (D.Zc.mult ρ : ℝ) = (analyticOrderNatAt G (φ ρ) : ℝ) := by + intro ρ hρ + have hball_ρ : c₀_pt + κ * φ ρ ∈ Metric.ball c₀_pt (1.9 * 1.05) := by + rw [Metric.mem_ball, dist_eq_norm, add_sub_cancel_left, norm_mul, hnormκ] + have := hφnorm ρ hρ; rw [hr] at this; nlinarith + have hord : analyticOrderNatAt G (φ ρ) = analyticOrderNatAt D.f ρ := by + unfold analyticOrderNatAt + have h1 := congrArg ENat.toNat (analyticOrderAt_comp_affine_mul (D.hfa t ht _ hball_ρ) hκ0 hu0) + rwa [hφinv ρ] at h1 + rw [hord, (D.hlink ρ hρ.1.1 hρ.2).2] + have hsum : (∑ᶠ ρ ∈ W, (D.Zc.mult ρ : ℝ)) ≤ + ((∑ ρ' ∈ Z, analyticOrderNatAt G ρ' : ℕ) : ℝ) := by + rw [finsum_mem_eq_finite_toFinset_sum _ hWfin, + Finset.sum_congr rfl (fun ρ hρ => hmult ρ (hWfin.mem_toFinset.mp hρ)), + ← Finset.sum_image (f := fun w => (analyticOrderNatAt G w : ℝ)) (fun _ _ _ _ h => hφinj h)] + push_cast + apply Finset.sum_le_sum_of_subset_of_nonneg + · intro w hw + obtain ⟨ρ, hρ, rfl⟩ := Finset.mem_image.mp hw + exact hmemS ρ (hWfin.mem_toFinset.mp hρ) + · intros; positivity + have hlog3 := one_le_log_scale_add_three D.hscale t + have hlog6 := log_scale_add_six_le D.hscale t + have hlogB : Real.log B ≤ (Real.log M + 2 * D.A) * Real.log (D.scale * (|t| + 3)) := by + have hpow_pos : 0 < (D.scale * (|t| + 6)) ^ D.A := + Real.rpow_pos_of_pos (by nlinarith [D.hscale, abs_nonneg t]) _ + rw [hB, Real.log_mul (by linarith) hpow_pos.ne', + Real.log_rpow (by nlinarith [D.hscale, abs_nonneg t])] + have h1 : Real.log M ≤ Real.log M * Real.log (D.scale * (|t| + 3)) := + le_mul_of_one_le_right (Real.log_nonneg hM1) hlog3 + have h2 : D.A * Real.log (D.scale * (|t| + 6)) + ≤ D.A * (2 * Real.log (D.scale * (|t| + 3))) := + mul_le_mul_of_nonneg_left hlog6 D.hA + linarith + have hlogRr : 0 < Real.log (R / r) := Real.log_pos (by norm_num [hr, hR]) + calc (D.Zc.N t (t + 1) : ℝ) + ≤ 2 * ∑ᶠ ρ ∈ W, (D.Zc.mult ρ : ℝ) := D.Zc.N_le_two_mul_half t (t + 1) + _ ≤ 2 * ((∑ ρ' ∈ Z, analyticOrderNatAt G ρ' : ℕ) : ℝ) := by linarith [hsum] + _ ≤ 2 * (1 / Real.log (R / r) * Real.log B) := by + have h : ((∑ ρ' ∈ Z, analyticOrderNatAt G ρ' : ℕ) : ℝ) ≤ + 1 / Real.log (R / r) * Real.log B := by exact_mod_cast hZ + linarith + _ ≤ 2 * (1 / Real.log (R / r) * ((Real.log M + 2 * D.A) * Real.log (D.scale * (|t| + 3)))) := by + have := mul_le_mul_of_nonneg_left hlogB (by positivity : (0 : ℝ) ≤ 1 / Real.log (R / r)) + linarith + _ = _ := by rw [hr, hR, hM]; ring + +/-- **Two-sided local zero count for all `t : ℝ`** (combines `local_count_large` for `|t| ≥ D.t₀` +with the finite window `(-D.t₀, D.t₀ + 1]` for `|t| < D.t₀`). -/ +theorem DiscCountData.local_count_of (D : DiscCountData) : + ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ t : ℝ, + (D.Zc.N t (t + 1) : ℝ) ≤ A₀ * Real.log (D.scale * (|t| + 3)) := by + set A₁ : ℝ := 2 / Real.log ((0.95 : ℝ) / 0.84) * (Real.log (max (D.C / D.c₀) 1) + 2 * D.A) + set K : ℝ := (D.Zc.N (-D.t₀) (D.t₀ + 1) : ℝ) + refine ⟨max 1 (max A₁ K), le_max_left _ _, fun t => ?_⟩ + have hlog3 := one_le_log_scale_add_three D.hscale t + rcases le_or_gt D.t₀ |t| with ht | ht + · exact (D.local_count_large ht).trans + (mul_le_mul_of_nonneg_right (le_trans (le_max_left _ _) (le_max_right _ _)) (by linarith)) + · have ht' := abs_lt.mp ht + have hmono : D.Zc.N t (t + 1) ≤ D.Zc.N (-D.t₀) (D.t₀ + 1) := + D.Zc.N_mono ht'.1.le (by linarith) + calc (D.Zc.N t (t + 1) : ℝ) ≤ (D.Zc.N (-D.t₀) (D.t₀ + 1) : ℝ) := by exact_mod_cast hmono + _ ≤ K * Real.log (D.scale * (|t| + 3)) := le_mul_of_one_le_right (Nat.cast_nonneg _) hlog3 + _ ≤ max 1 (max A₁ K) * Real.log (D.scale * (|t| + 3)) := + mul_le_mul_of_nonneg_right (le_trans (le_max_right _ _) (le_max_right _ _)) (by linarith) + +/-! ### Part 2: Symmetrised real-part zero count (`reZeroCount_of`) -/ + +/-- Symmetrised function `g_T(z) := (f₁(z + iT) + f₂(z - iT)) / 2`, equal to `Re f₁(σ + iT)` on `ℝ` +when `f₂(σ - iT) = conj (f₁(σ + iT))`. -/ +def symFn (f₁ f₂ : ℂ → ℂ) (T : ℝ) (z : ℂ) : ℂ := + (f₁ (z + T * I) + f₂ (z - T * I)) / 2 + +/-- **Generic Jensen count for real-part zeros on `[1/2, 2]`** (r = 0.8, R = 0.9 around `2`): +constant is explicit and independent of `scale` and `T`. -/ +theorem reZeroCount_of {f₁ f₂ : ℂ → ℂ} {scale c₀ C A : ℝ} + (hscale : 1 ≤ scale) (hc₀ : 0 < c₀) (hC : 0 < C) (hA : 0 ≤ A) + {T : ℝ} + (hfa : AnalyticOnNhd ℂ (symFn f₁ f₂ T) (Metric.ball (2 : ℂ) (1.9 * 1.05))) + (hreal : ∀ σ ∈ Set.Icc (1 / 2 : ℝ) 2, + symFn f₁ f₂ T (σ : ℂ) = (((f₁ ((σ : ℂ) + T * I)).re : ℝ) : ℂ)) + (hre2 : c₀ ≤ (f₁ (2 + T * I)).re) + (hgrow : ∀ w : ℂ, ‖w‖ ≤ 0.9 → + ‖symFn f₁ f₂ T (2 + ((19 / 10 : ℝ) : ℂ) * w)‖ ≤ C * (scale * (|T| + 5)) ^ A) : + let S := {σ : ℝ | σ ∈ Set.Icc (1 / 2 : ℝ) 2 ∧ (f₁ ((σ : ℂ) + T * I)).re = 0} + S.Finite ∧ (S.ncard : ℝ) ≤ + (1 / Real.log ((0.9 : ℝ) / 0.8) * (Real.log (max (C / c₀) 1) + 2 * A)) * + Real.log (scale * (|T| + 3)) := by + intro S + set r : ℝ := 0.8 with hr + set R : ℝ := 0.9 with hR + set κ : ℂ := ((19 / 10 : ℝ) : ℂ) with hκ + have hκ0 : κ ≠ 0 := by simp [hκ] + have hnormκ : ‖κ‖ = 1.9 := by simp [hκ]; norm_num + have hg2 : symFn f₁ f₂ T 2 = (((f₁ ((2 : ℂ) + T * I)).re : ℝ) : ℂ) := by + simpa using hreal 2 ⟨by norm_num, le_rfl⟩ + have hg2ne : symFn f₁ f₂ T 2 ≠ 0 := by + rw [hg2]; simp only [ne_eq, Complex.ofReal_eq_zero]; linarith + set u : ℂ := (symFn f₁ f₂ T 2)⁻¹ with hu + have hnu : ‖u‖ ≤ c₀⁻¹ := by + rw [hu, norm_inv, hg2, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (by linarith)] + exact inv_anti₀ hc₀ hre2 + set G : ℂ → ℂ := fun w => symFn f₁ f₂ T (2 + κ * w) * u with hG + have hGball : AnalyticOnNhd ℂ G (Metric.ball (0 : ℂ) 1.05) := by + intro w hw + rw [Metric.mem_ball, dist_zero_right] at hw + have hmem : (2 : ℂ) + κ * w ∈ Metric.ball (2 : ℂ) (1.9 * 1.05) := by + rw [Metric.mem_ball, dist_eq_norm, add_sub_cancel_left, norm_mul, hnormκ] + nlinarith + exact ((hfa _ hmem).comp_of_eq + (by fun_prop : AnalyticAt ℂ (fun w : ℂ => (2 : ℂ) + κ * w) w) rfl).mul analyticAt_const + have hG0 : G 0 = 1 := by simp [hG, hu, hg2ne] + have hfin : (SetOfZeros 1 G).Finite := by + have h := finite_zeros_closedBall (f := G) (R := 1.05) (r := 1) (by norm_num) hGball + (z₀ := 0) (by simp; norm_num) (by rw [hG0]; exact one_ne_zero) + exact h.subset fun _ hz => hz + set M : ℝ := max (C / c₀) 1 with hM + have hM1 : 1 ≤ M := le_max_right _ _ + have hMratio : C / c₀ ≤ M := le_max_left _ _ + set B : ℝ := M * (scale * (|T| + 5)) ^ A with hB + have hfz : ∀ w : ℂ, ‖w‖ ≤ R → ‖G w‖ ≤ B := by + intro w hw + have hpow0 : 0 ≤ (scale * (|T| + 5)) ^ A := + Real.rpow_nonneg (by nlinarith [abs_nonneg T]) _ + calc ‖G w‖ = ‖symFn f₁ f₂ T (2 + κ * w)‖ * ‖u‖ := by rw [hG]; exact norm_mul _ _ + _ ≤ (C * (scale * (|T| + 5)) ^ A) * c₀⁻¹ := + mul_le_mul (hgrow w hw) hnu (norm_nonneg _) (mul_nonneg hC.le hpow0) + _ = (C / c₀) * (scale * (|T| + 5)) ^ A := by ring + _ ≤ B := mul_le_mul_of_nonneg_right hMratio hpow0 + have hrlt1 : r < 1 := by norm_num [hr] + have hZ := ZerosBound (B := B) (r := r) (R := R) (by norm_num [hr]) hrlt1 + (by norm_num [hr, hR]) (by norm_num [hR]) + (hGball.mono (Metric.closedBall_subset_ball (by norm_num))) hG0 hfin hfz + set Z : Finset ℂ := (finiteSetOfZeros_mono hrlt1 hfin).toFinset with hZdef + have horder : ∀ ρ ∈ Z, 1 ≤ analyticOrderNatAt G ρ := by + intro ρ hρ + rw [hZdef, Set.Finite.mem_toFinset] at hρ + obtain ⟨hρr, hρ0⟩ := hρ + have hρr' : ‖ρ‖ ≤ r := hρr + have han : AnalyticAt ℂ G ρ := hGball ρ (by rw [Metric.mem_ball, dist_zero_right, hr] at *; linarith) + have hne0 : analyticOrderAt G ρ ≠ 0 := han.analyticOrderAt_ne_zero.mpr hρ0 + have hnetop : analyticOrderAt G ρ ≠ ⊤ := by + refine hGball.analyticOrderAt_ne_top_of_isPreconnected (convex_ball _ _).isPreconnected + (x := 0) (by simp; norm_num) (by rw [Metric.mem_ball, dist_zero_right, hr] at *; linarith) ?_ + rw [(hGball 0 (by simp; norm_num)).analyticOrderAt_eq_zero.mpr (by rw [hG0]; exact one_ne_zero)] + exact ENat.zero_ne_top + unfold analyticOrderNatAt + obtain ⟨n, hn⟩ := ENat.ne_top_iff_exists.mp hnetop + rw [← hn] at hne0 ⊢ + simp only [ENat.toNat_natCast, ne_eq, Nat.cast_eq_zero] at hne0 ⊢ + omega + set φ : ℝ → ℂ := fun σ => ((σ - 2 : ℝ) : ℂ) / κ with hφ + have hφinj : Set.InjOn φ S := by + intro a _ b _ h + simp only [hφ] at h + have h' : ((a - 2 : ℝ) : ℂ) = ((b - 2 : ℝ) : ℂ) := by + have := congrArg (fun z => z * κ) h + simpa [div_mul_cancel₀ _ hκ0] using this + linarith [Complex.ofReal_inj.mp h'] + have himg : φ '' S ⊆ (↑Z : Set ℂ) := by + rintro _ ⟨σ, ⟨hσI, hσ0⟩, rfl⟩ + rw [hZdef, Set.Finite.coe_toFinset] + refine ⟨?_, ?_⟩ + · show ‖((σ - 2 : ℝ) : ℂ) / κ‖ ≤ r + rw [norm_div, hnormκ, Complex.norm_real, Real.norm_eq_abs, hr, + abs_of_nonpos (by linarith [hσI.2]), div_le_iff₀ (by norm_num)] + linarith [hσI.1] + · show G (φ σ) = 0 + have hfix : (2 : ℂ) + κ * φ σ = (σ : ℂ) := by + simp only [hφ]; field_simp; push_cast; ring + simp only [hG, hfix, hreal σ hσI, hσ0, Complex.ofReal_zero, zero_mul] + have hfinS : S.Finite := Set.Finite.of_finite_image (Z.finite_toSet.subset himg) hφinj + refine ⟨hfinS, ?_⟩ + have hcard : (S.ncard : ℝ) ≤ (Z.card : ℝ) := by + have h1 : S.ncard = (φ '' S).ncard := hφinj.ncard_image.symm + have h2 : (φ '' S).ncard ≤ (↑Z : Set ℂ).ncard := Set.ncard_le_ncard himg Z.finite_toSet + rw [Set.ncard_coe_finset] at h2 + exact_mod_cast h1 ▸ h2 + have hsum : (Z.card : ℝ) ≤ ((∑ ρ ∈ Z, analyticOrderNatAt G ρ : ℕ) : ℝ) := by + exact_mod_cast (Finset.card_eq_sum_ones Z).le.trans (Finset.sum_le_sum horder) + have hlog3 := one_le_log_scale_add_three hscale T + have hlog5 : Real.log (scale * (|T| + 5)) ≤ 2 * Real.log (scale * (|T| + 3)) := + (Real.log_le_log (by nlinarith [abs_nonneg T]) (by nlinarith [abs_nonneg T])).trans + (log_scale_add_six_le hscale T) + have hlogB : Real.log B ≤ (Real.log M + 2 * A) * Real.log (scale * (|T| + 3)) := by + rw [hB, Real.log_mul (by linarith) (by positivity), + Real.log_rpow (by nlinarith [abs_nonneg T])] + have h1 : Real.log M ≤ Real.log M * Real.log (scale * (|T| + 3)) := + le_mul_of_one_le_right (Real.log_nonneg hM1) hlog3 + have h2 : A * Real.log (scale * (|T| + 5)) ≤ A * (2 * Real.log (scale * (|T| + 3))) := + mul_le_mul_of_nonneg_left hlog5 hA + linarith + have hlogRr : 0 < Real.log (R / r) := Real.log_pos (by norm_num [hr, hR]) + calc (S.ncard : ℝ) ≤ (Z.card : ℝ) := hcard + _ ≤ _ := hsum + _ ≤ 1 / Real.log (R / r) * Real.log B := by exact_mod_cast hZ + _ ≤ 1 / Real.log (R / r) * ((Real.log M + 2 * A) * Real.log (scale * (|T| + 3))) := + mul_le_mul_of_nonneg_left hlogB (by positivity) + _ = _ := by rw [hr, hR, hM]; ring + +/-- **Strip-growth wrapper for `reZeroCount_of`**: given analyticity of `f₁(z + iT)` and +`f₂(z - iT)` on `B(2, 1.9 * 1.05)`, conjugation symmetry on `[1/2, 2]`, `c₀ ≤ Re f₁(2 + iT)`, and +polynomial strip growth `‖f₁ s‖, ‖f₂ s‖ ≤ C * (scale * (|s.im| + 3)) ^ A` for `0.15 ≤ s.re` and +`|s.im ∓ T| ≤ 1.71`, concludes the explicit Jensen count on `[1/2, 2]`. -/ +theorem reZeroCount_of_strip_growth {f₁ f₂ : ℂ → ℂ} {scale c₀ C A : ℝ} + (hscale : 1 ≤ scale) (hc₀ : 0 < c₀) (hC : 0 < C) (hA : 0 ≤ A) {T : ℝ} + (hf₁a : ∀ z ∈ Metric.ball (2 : ℂ) (1.9 * 1.05), AnalyticAt ℂ f₁ (z + T * I)) + (hf₂a : ∀ z ∈ Metric.ball (2 : ℂ) (1.9 * 1.05), AnalyticAt ℂ f₂ (z - T * I)) + (hconj : ∀ σ ∈ Set.Icc (1 / 2 : ℝ) 2, + f₂ ((σ : ℂ) - T * I) = (starRingEnd ℂ) (f₁ ((σ : ℂ) + T * I))) + (hre2 : c₀ ≤ (f₁ (2 + T * I)).re) + (hf₁g : ∀ s : ℂ, (0.15 : ℝ) ≤ s.re → |s.im - T| ≤ 1.71 → + ‖f₁ s‖ ≤ C * (scale * (|s.im| + 3)) ^ A) + (hf₂g : ∀ s : ℂ, (0.15 : ℝ) ≤ s.re → |s.im + T| ≤ 1.71 → + ‖f₂ s‖ ≤ C * (scale * (|s.im| + 3)) ^ A) : + let S := {σ : ℝ | σ ∈ Set.Icc (1 / 2 : ℝ) 2 ∧ (f₁ ((σ : ℂ) + T * I)).re = 0} + S.Finite ∧ (S.ncard : ℝ) ≤ + (1 / Real.log ((0.9 : ℝ) / 0.8) * (Real.log (max (C / c₀) 1) + 2 * A)) * + Real.log (scale * (|T| + 3)) := by + have hfa : AnalyticOnNhd ℂ (symFn f₁ f₂ T) (Metric.ball (2 : ℂ) (1.9 * 1.05)) := by + intro z hz + have ha : AnalyticAt ℂ (fun w => f₁ (w + T * I)) z := + (hf₁a z hz).comp_of_eq (by fun_prop) rfl + have hb : AnalyticAt ℂ (fun w => f₂ (w - T * I)) z := + (hf₂a z hz).comp_of_eq (by fun_prop) rfl + exact (ha.add hb).div_const + have hreal : ∀ σ ∈ Set.Icc (1 / 2 : ℝ) 2, + symFn f₁ f₂ T (σ : ℂ) = (((f₁ ((σ : ℂ) + T * I)).re : ℝ) : ℂ) := fun σ hσ => by + unfold symFn; rw [hconj σ hσ, Complex.add_conj]; push_cast; ring + have hgrow : ∀ w : ℂ, ‖w‖ ≤ 0.9 → + ‖symFn f₁ f₂ T (2 + ((19 / 10 : ℝ) : ℂ) * w)‖ ≤ C * (scale * (|T| + 5)) ^ A := by + intro w hw + have hwre := abs_le.mp ((Complex.abs_re_le_norm w).trans hw) + have hwim := abs_le.mp ((Complex.abs_im_le_norm w).trans hw) + have h19 : |1.9 * w.im| ≤ 1.71 := by + rw [abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 1.9)]; nlinarith [abs_le.mpr hwim] + have hpt : ∀ (s : ℂ) (ε : ℝ), ε = 1 ∨ ε = -1 → + s.re = 2 + 1.9 * w.re → s.im = 1.9 * w.im + ε * T → + (0.15 : ℝ) ≤ s.re ∧ |s.im - ε * T| ≤ 1.71 ∧ + C * (scale * (|s.im| + 3)) ^ A ≤ C * (scale * (|T| + 5)) ^ A := by + intro s ε hε hsre hsim + refine ⟨by nlinarith, by rw [hsim, add_sub_cancel_right]; exact h19, ?_⟩ + have hbase : |s.im| + 3 ≤ |T| + 5 := by + rw [hsim] + have hεT : |ε * T| = |T| := by rcases hε with rfl | rfl <;> simp + linarith [abs_add_le (1.9 * w.im) (ε * T)] + exact mul_le_mul_of_nonneg_left + (Real.rpow_le_rpow (by nlinarith [abs_nonneg s.im]) (by nlinarith) hA) hC.le + obtain ⟨h1re, h1im, h1b⟩ := hpt (2 + ((19 / 10 : ℝ) : ℂ) * w + T * I) 1 (Or.inl rfl) + (by simp; norm_num) (by simp; norm_num) + obtain ⟨h2re, h2im, h2b⟩ := hpt (2 + ((19 / 10 : ℝ) : ℂ) * w - T * I) (-1) (Or.inr rfl) + (by simp; norm_num) (by simp; norm_num; ring) + have ha := (hf₁g _ h1re (by simpa using h1im)).trans h1b + have hb := (hf₂g _ h2re (by simpa [sub_neg_eq_add] using h2im)).trans h2b + unfold symFn; rw [norm_div, Complex.norm_ofNat] + linarith [norm_add_le (f₁ (2 + ((19 / 10 : ℝ) : ℂ) * w + T * I)) + (f₂ (2 + ((19 / 10 : ℝ) : ℂ) * w - T * I))] + exact reZeroCount_of hscale hc₀ hC hA hfa hreal hre2 hgrow + +/-! ### Part 3: Generic Riemann–von Mangoldt main-term assembly -/ + +/-- Triangle bound on `|(halfContour F T₁ T₂).im|` from horizontal bounds and a vertical `σ = 2` +bound. -/ +lemma abs_im_halfContour_le {F : ℂ → ℂ} {T₁ T₂ b₁ b₂ bV : ℝ} + (h1 : |(∫ σ in (1 / 2 : ℝ)..2, F (σ + T₁ * I)).im| ≤ b₁) + (h2 : |(∫ σ in (1 / 2 : ℝ)..2, F (σ + T₂ * I)).im| ≤ b₂) + (hv : |(∫ t in T₁..T₂, F (2 + t * I) * I).im| ≤ bV) : + |(halfContour F T₁ T₂).im| ≤ b₁ + bV + b₂ := by + unfold halfContour + have eim : ((∫ σ in (1 / 2 : ℝ)..2, F (σ + T₁ * I)) + + (∫ t in T₁..T₂, F (2 + t * I)) * I + - ∫ σ in (1 / 2 : ℝ)..2, F (σ + T₂ * I)).im + = (∫ σ in (1 / 2 : ℝ)..2, F (σ + T₁ * I)).im + + ((∫ t in T₁..T₂, F (2 + t * I)) * I).im + - (∫ σ in (1 / 2 : ℝ)..2, F (σ + T₂ * I)).im := by + simp [Complex.add_im, Complex.sub_im] + rw [eim] + have hmulI : ((∫ t in T₁..T₂, F (2 + t * I)) * I).im + = (∫ t in T₁..T₂, F (2 + t * I) * I).im := + congrArg Complex.im (intervalIntegral.integral_mul_const (μ := MeasureTheory.volume) I + (fun t : ℝ => F (2 + t * I))).symm + calc |(∫ σ in (1 / 2 : ℝ)..2, F (σ + T₁ * I)).im + + ((∫ t in T₁..T₂, F (2 + t * I)) * I).im + - (∫ σ in (1 / 2 : ℝ)..2, F (σ + T₂ * I)).im| + ≤ |(∫ σ in (1 / 2 : ℝ)..2, F (σ + T₁ * I)).im| + + |((∫ t in T₁..T₂, F (2 + t * I)) * I).im| + + |(∫ σ in (1 / 2 : ℝ)..2, F (σ + T₂ * I)).im| := + (abs_sub _ _).trans (add_le_add (abs_add_le _ _) le_rfl) + _ ≤ b₁ + bV + b₂ := by rw [hmulI]; linarith + +/-- **Generic Riemann–von Mangoldt main-term assembly (scaled by `scale ≥ 1`)**: +unifies `RvM/MainTerm.lean` (`scale = 1`), `ThmE/MainTermChi.lean` (`scale = q`, `q`-uniform), +and `XiPrime/ZeroCount/GenericRvM.lean` (`scale = 1`). -/ +theorem rvM_main_scaled (Zc : ZeroConfig) (Good : ℝ → Prop) (Λ : ℂ → ℂ) + (μ ell : ℝ → ℝ) {scale a₀ CY KY TY A₀ CM Cμ Tμ : ℝ} + (hscale : 1 ≤ scale) (ha₀ : 0 ≤ a₀) + (hCY : 0 ≤ CY) (hKY : 0 ≤ KY) (hA₀ : 0 ≤ A₀) (hCM : 0 ≤ CM) + (hgood : ∀ a : ℝ, a₀ ≤ a → ∃ T ∈ Set.Icc a (a + 1), Good T) + (hcount : ∀ T₁ T₂ : ℝ, max a₀ 1 ≤ T₁ → T₁ < T₂ → Good T₁ → Good T₂ → + (Zc.N T₁ T₂ : ℝ) = (1 / Real.pi) * (halfContour (logDeriv Λ) T₁ T₂).im) + (hres : ∀ T₁ T₂ : ℝ, max (max a₀ 1) TY ≤ T₁ → T₁ < T₂ → Good T₁ → Good T₂ → + |(halfContour (logDeriv Λ) T₁ T₂).im - Real.pi * ∫ t in T₁..T₂, μ t| + ≤ CY * Real.log (scale * (|T₁| + 3)) + KY + CY * Real.log (scale * (|T₂| + 3))) + (hloc : ∀ t : ℝ, (Zc.N t (t + 1) : ℝ) ≤ A₀ * Real.log (scale * (|t| + 3))) + (hμc : Continuous μ) + (hμle : ∀ τ : ℝ, 1 ≤ τ → |μ τ| ≤ CM * Real.log (scale * (τ + 3))) + (hint : ∀ T : ℝ, Tμ ≤ T → |(∫ τ in T..(2 * T), μ τ) - T * ell T / (2 * Real.pi)| ≤ Cμ / T) : + ∀ T : ℝ, max (max (max (TY + 1) (Tμ + 1)) 4) (a₀ + 1) ≤ T → + |(Zc.N T (2 * T) : ℝ) - T / (2 * Real.pi) * ell T| + ≤ (4 * CY + KY + 4 * A₀ + 4 * CM + |Cμ|) * Real.log (scale * (T + 2)) := by + intro T hT' + have hT : max (max (TY + 1) (Tμ + 1)) 4 ≤ T := le_trans (le_max_left _ _) hT' + have hTa₀ : a₀ + 1 ≤ T := le_trans (le_max_right _ _) hT' + have hT4 : 4 ≤ T := le_trans (le_max_right _ _) hT + have hTY : TY + 1 ≤ T := le_trans (le_trans (le_max_left _ _) (le_max_left _ _)) hT + have hTμ : Tμ + 1 ≤ T := le_trans (le_trans (le_max_right _ _) (le_max_left _ _)) hT + set L' : ℝ := Real.log (scale * (T + 2)) with hL'def + have hL'1 : 1 ≤ L' := by + rw [hL'def, ← Real.log_exp 1] + exact Real.log_le_log (Real.exp_pos 1) (by have := Real.exp_one_lt_d9; nlinarith) + have hlog2 : ∀ x : ℝ, 0 < x → x ≤ 2 * T + 4 → Real.log (scale * x) ≤ 2 * L' := by + intro x hx hxu + have hs2 : scale ≤ scale ^ 2 := by nlinarith + have hx2 : x ≤ (T + 2) ^ 2 := by nlinarith + have hsq : scale * x ≤ (scale * (T + 2)) ^ 2 := by + calc scale * x ≤ scale ^ 2 * (T + 2) ^ 2 := mul_le_mul hs2 hx2 hx.le (by positivity) + _ = (scale * (T + 2)) ^ 2 := by ring + calc Real.log (scale * x) ≤ Real.log ((scale * (T + 2)) ^ 2) := + Real.log_le_log (by positivity) hsq + _ = 2 * L' := by rw [hL'def, Real.log_pow]; push_cast; ring + obtain ⟨T₁, hT₁mem, hg1⟩ := hgood (T - 1) (by linarith) + obtain ⟨T₂, hT₂mem, hg2⟩ := hgood (2 * T) (by linarith) + have hT₁a : T - 1 ≤ T₁ := hT₁mem.1 + have hT₁b : T₁ ≤ T := by linarith [hT₁mem.2] + have hT₂a : 2 * T ≤ T₂ := hT₂mem.1 + have hT₂b : T₂ ≤ 2 * T + 1 := hT₂mem.2 + have h1T₁ : 1 ≤ T₁ := by linarith + have h12 : T₁ < T₂ := by linarith + have hN := hcount T₁ T₂ (max_le (by linarith) h1T₁) h12 hg1 hg2 + set Rres : ℝ := (halfContour (logDeriv Λ) T₁ T₂).im - Real.pi * ∫ t in T₁..T₂, μ t with hRres + have hRb := hres T₁ T₂ (max_le (max_le (by linarith) h1T₁) (by linarith)) h12 hg1 hg2 + have hRlog : |Rres| ≤ (4 * CY + KY) * L' := by + have e1 : Real.log (scale * (|T₁| + 3)) ≤ 2 * L' := by + rw [abs_of_pos (by linarith : 0 < T₁)]; exact hlog2 _ (by linarith) (by linarith) + have e2 : Real.log (scale * (|T₂| + 3)) ≤ 2 * L' := by + rw [abs_of_pos (by linarith : 0 < T₂)]; exact hlog2 _ (by linarith) (by linarith) + have h1 := mul_le_mul_of_nonneg_left e1 hCY + have h2 := mul_le_mul_of_nonneg_left e2 hCY + have hK := le_mul_of_one_le_right hKY hL'1 + linarith + have hA : |(1 / Real.pi) * Rres| ≤ (4 * CY + KY) * L' := by + rw [abs_mul, abs_of_pos (by positivity : (0 : ℝ) < 1 / Real.pi)] + have hfrac : (1 : ℝ) / Real.pi ≤ 1 := by + rw [div_le_one Real.pi_pos]; linarith [Real.pi_gt_three] + calc (1 / Real.pi) * |Rres| ≤ 1 * |Rres| := mul_le_mul_of_nonneg_right hfrac (abs_nonneg _) + _ = |Rres| := one_mul _ + _ ≤ (4 * CY + KY) * L' := hRlog + have hadd : (Zc.N T₁ T₂ : ℝ) = (Zc.N T₁ T : ℝ) + (Zc.N T (2 * T) : ℝ) + (Zc.N (2 * T) T₂ : ℝ) := by + rw [Zc.N_add hT₁b (by linarith : T ≤ T₂), Zc.N_add (by linarith : T ≤ 2 * T) hT₂a] + push_cast; ring + have hwin : ∀ a b : ℝ, 1 ≤ a → b ≤ a + 1 → a ≤ 2 * T → (Zc.N a b : ℝ) ≤ 2 * A₀ * L' := by + intro a b ha hab ha2T + calc (Zc.N a b : ℝ) ≤ (Zc.N a (a + 1) : ℝ) := by exact_mod_cast Zc.N_mono le_rfl hab + _ ≤ A₀ * Real.log (scale * (|a| + 3)) := hloc a + _ ≤ A₀ * (2 * L') := by + refine mul_le_mul_of_nonneg_left ?_ hA₀ + rw [abs_of_pos (by linarith : 0 < a)]; exact hlog2 _ (by linarith) (by linarith) + _ = 2 * A₀ * L' := by ring + have hw1 := hwin T₁ T h1T₁ (by linarith) (by linarith) + have hw2 := hwin (2 * T) T₂ (by linarith) hT₂b le_rfl + have hμint : ∀ a b : ℝ, IntervalIntegrable μ volume a b := fun a b => hμc.intervalIntegrable a b + have hμsplit : (∫ t in T₁..T₂, μ t) + = (∫ t in T₁..T, μ t) + (∫ t in T..(2 * T), μ t) + ∫ t in (2 * T)..T₂, μ t := by + rw [(integral_add_adjacent_intervals (hμint T₁ (2 * T)) (hμint (2 * T) T₂)).symm, + (integral_add_adjacent_intervals (hμint T₁ T) (hμint T (2 * T))).symm] + have hμwin : ∀ a b : ℝ, 1 ≤ a → a ≤ b → b ≤ 2 * T + 1 → |b - a| ≤ 1 → + |∫ t in a..b, μ t| ≤ 2 * CM * L' := by + intro a b ha hab hb hba + have hbound : ∀ t ∈ Set.uIoc a b, ‖μ t‖ ≤ CM * (2 * L') := by + intro t ht + rw [Set.uIoc_of_le hab] at ht + rw [Real.norm_eq_abs] + refine (hμle t (le_trans ha ht.1.le)).trans ?_ + exact mul_le_mul_of_nonneg_left (hlog2 _ (by linarith [ht.1]) (by linarith [ht.2])) hCM + have := intervalIntegral.norm_integral_le_of_norm_le_const hbound + rw [Real.norm_eq_abs] at this + calc |∫ t in a..b, μ t| ≤ CM * (2 * L') * |b - a| := this + _ ≤ CM * (2 * L') * 1 := mul_le_mul_of_nonneg_left hba (by positivity) + _ = 2 * CM * L' := by ring + have hμ1 := hμwin T₁ T h1T₁ hT₁b (by linarith) (by rw [abs_of_nonneg (by linarith)]; linarith) + have hμ2 := hμwin (2 * T) T₂ (by linarith) hT₂a (by linarith) + (by rw [abs_of_nonneg (by linarith)]; linarith) + have hD : |(∫ t in T..(2 * T), μ t) - T * ell T / (2 * Real.pi)| ≤ |Cμ| * L' := by + calc |(∫ t in T..(2 * T), μ t) - T * ell T / (2 * Real.pi)| ≤ Cμ / T := hint T (by linarith) + _ ≤ |Cμ| / T := by gcongr; exact le_abs_self _ + _ ≤ |Cμ| / 1 := div_le_div_of_nonneg_left (abs_nonneg _) one_pos (by linarith) + _ = |Cμ| := div_one _ + _ ≤ |Cμ| * L' := le_mul_of_one_le_right (abs_nonneg _) hL'1 + have h5 : (Zc.N T₁ T₂ : ℝ) = (∫ t in T₁..T₂, μ t) + (1 / Real.pi) * Rres := by + rw [hN, hRres, mul_sub]; field_simp [Real.pi_ne_zero]; ring + have hkey : (Zc.N T (2 * T) : ℝ) - T * ell T / (2 * Real.pi) + = (1 / Real.pi) * Rres + + ((∫ t in T₁..T, μ t) + (∫ t in (2 * T)..T₂, μ t) + + ((∫ t in T..(2 * T), μ t) - T * ell T / (2 * Real.pi))) + - ((Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ)) := by + rw [hμsplit] at h5; linarith + rw [show T / (2 * Real.pi) * ell T = T * ell T / (2 * Real.pi) by ring, hkey] + have t1 := abs_sub ((1 / Real.pi) * Rres + + ((∫ t in T₁..T, μ t) + (∫ t in (2 * T)..T₂, μ t) + + ((∫ t in T..(2 * T), μ t) - T * ell T / (2 * Real.pi)))) + ((Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ)) + have t2 := abs_add_le ((1 / Real.pi) * Rres) + ((∫ t in T₁..T, μ t) + (∫ t in (2 * T)..T₂, μ t) + + ((∫ t in T..(2 * T), μ t) - T * ell T / (2 * Real.pi))) + have t3 := abs_add_le ((∫ t in T₁..T, μ t) + (∫ t in (2 * T)..T₂, μ t)) + ((∫ t in T..(2 * T), μ t) - T * ell T / (2 * Real.pi)) + have t4 := abs_add_le (∫ t in T₁..T, μ t) (∫ t in (2 * T)..T₂, μ t) + have t5 : |(Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ)| = (Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ) := + abs_of_nonneg (by positivity) + linarith + +end Zeta23.RvM diff --git a/zeta23/Zeta23/RvM/Halving.lean b/zeta23/Zeta23/RvM/Halving.lean index f3a8f429bd..8c8ba016fd 100644 --- a/zeta23/Zeta23/RvM/Halving.lean +++ b/zeta23/Zeta23/RvM/Halving.lean @@ -49,7 +49,7 @@ theorem N_le_two_mul_half : have hB : B.Finite := hW.subset inter_subset_left have hWAB : Z.window T₁ T₂ = A ∪ B := by ext ρ - simp only [hAdef, hBdef, mem_union, mem_inter_iff, mem_setOf_eq] + simp only [hAdef, hBdef, mem_union, mem_inter_iff, mem_ofPred_eq] constructor · intro h rcases lt_or_ge ρ.re (1 / 2) with h' | h' @@ -59,7 +59,7 @@ theorem N_le_two_mul_half : have hdisj : Disjoint A B := by rw [Set.disjoint_left] rintro ρ ⟨_, h1⟩ ⟨_, h2⟩ - simp only [mem_setOf_eq] at h1 h2 + simp only [mem_ofPred_eq] at h1 h2 linarith have hN : Z.N T₁ T₂ = ∑ᶠ ρ ∈ A, Z.mult ρ + ∑ᶠ ρ ∈ B, Z.mult ρ := by unfold ZeroConfig.N @@ -67,7 +67,7 @@ theorem N_le_two_mul_half : have himage : reflect '' A ⊆ B := by rintro _ ⟨ρ, ⟨hρW, hlt⟩, rfl⟩ refine ⟨Z.reflect_mem_window T₁ T₂ hρW, ?_⟩ - simp only [mem_setOf_eq, reflect_re] at hlt ⊢ + simp only [mem_ofPred_eq, reflect_re] at hlt ⊢ linarith have hAB : ∑ᶠ ρ ∈ A, Z.mult ρ ≤ ∑ᶠ ρ ∈ B, Z.mult ρ := by calc ∑ᶠ ρ ∈ A, Z.mult ρ = ∑ᶠ ρ ∈ A, Z.mult (reflect ρ) := diff --git a/zeta23/Zeta23/RvM/LocalCount.lean b/zeta23/Zeta23/RvM/LocalCount.lean index 42f9e1e712..f04f93a06b 100644 --- a/zeta23/Zeta23/RvM/LocalCount.lean +++ b/zeta23/Zeta23/RvM/LocalCount.lean @@ -6,27 +6,12 @@ SPDX-License-Identifier: Apache-2.0 /- Zeta23/RvM/LocalCount.lean -H-RvM's local count for Mathlib's ζ: N(t, t+1] ≤ A₀ log(|t| + 3) for all real t -(= Zeta23.RiemannVonMangoldt.local_count at Z := zetaZeroConfig; [Tit86, Thm 9.2]). - -Route (never evaluating ζ left of σ = 0.19, so no Stirling is needed): - * count only zeros with β ≥ 1/2 and double (Zeta23.ZeroConfig.N_le_two_mul_half, Zeta23/RvM/Halving.lean, - via the ρ ↦ 1−ρ̄ symmetry); - * Jensen-type zero count on a disc: the ported PNT+ `ZerosBound` (Zeta23/FromPNTPlus/StrongPNTPrefix.lean, - Apache-2.0) applied to g(w) := ζ(c₀ + 1.9 w)/ζ(c₀), c₀ := 2 + (t+½)i, r = 0.84, R = 0.95: - the β ≥ 1/2 part of the window lies in ‖w‖ ≤ 0.84 (1.5² + 0.5² ≤ (1.9·0.84)²), the big disc stays in - σ ≥ 0.195 and at distance ≥ 1 from the pole for |t| ≥ 4; - * ζ-growth ‖ζ(s)‖ ≤ C(|Im s|+3)^A on σ ≥ 0.15, ‖s−1‖ ≥ 1 and ‖ζ(2+it)‖ ≥ 1/3 - (Zeta23.RvM.zeta_growth_right / zeta_lower_bound_two, Zeta23/RvM/ZetaGrowth.lean); - * |t| < 4 by the finite constant N(−4, 5]. +H-RvM's local count for Mathlib's ζ: `N(t, t+1] ≤ A₀ log(|t| + 3)` for all real `t` +(`= Zeta23.RiemannVonMangoldt.local_count` at `Z := zetaZeroConfig`; [Tit86, Thm 9.2]), +instantiated from `Zeta23.RvM.DiscCountData.local_count_of`. -/ -import Zeta23.Prelude.InstancePriorities -import Zeta23.Statement.SeamClosed -import Zeta23.Defs.Counting -import Zeta23.FromPNTPlus.StrongPNTPrefix +import Zeta23.RvM.Generic import Zeta23.RvM.ZetaGrowth -import Zeta23.RvM.Halving - open Complex Set Filter Topology Metric @@ -34,263 +19,68 @@ noncomputable section namespace Zeta23.RvM -/-- zeros of ζ in any compact set are finite (none accumulate, none near the pole). -/ -theorem riemannZeta_zeros_finite_of_isCompact {K : Set ℂ} (hK : IsCompact K) : - (K ∩ {ρ : ℂ | ρ ≠ 1 ∧ riemannZeta ρ = 0}).Finite := by - choose t ht hfin using riemannZeta_zeros_locallyFinite - obtain ⟨I, -, hcover⟩ := hK.elim_nhds_subcover t (fun z _ => ht z) - refine (I.finite_toSet.biUnion fun z _ => hfin z).subset ?_ - rintro ρ ⟨hρK, hρ⟩ - obtain ⟨z, hzI, hρz⟩ := mem_iUnion₂.mp (hcover hρK) - exact mem_iUnion₂.mpr ⟨z, hzI, hρz, hρ⟩ - -/-- the rescaled function g(z) := ζ(s₀ + c z) · u. -/ -def gfun (s₀ c u : ℂ) (z : ℂ) : ℂ := riemannZeta (s₀ + c * z) * u - -lemma comp_affine_analyticAt {s₀ c z : ℂ} (h : s₀ + c * z ≠ 1) : - AnalyticAt ℂ (fun z : ℂ => riemannZeta (s₀ + c * z)) z := by - have hζ : AnalyticAt ℂ riemannZeta (s₀ + c * z) := riemannZeta_analyticOnNhd_compl_one _ h - have haff : AnalyticAt ℂ (fun z : ℂ => s₀ + c * z) z := by fun_prop - exact hζ.comp_of_eq haff rfl - -lemma gfun_analyticAt {s₀ c u z : ℂ} (h : s₀ + c * z ≠ 1) : AnalyticAt ℂ (gfun s₀ c u) z := by - have h1 := comp_affine_analyticAt h - have h2 : AnalyticAt ℂ (fun _ : ℂ => u) z := analyticAt_const - have := h1.mul h2 - exact this - -/-- order transport: the order of g at w is the multiplicity of ζ at s₀ + c w. -/ -lemma analyticOrderNatAt_gfun {s₀ c u w : ℂ} (hc : c ≠ 0) (hu : u ≠ 0) (h : s₀ + c * w ≠ 1) : - analyticOrderNatAt (gfun s₀ c u) w = zeroMult (s₀ + c * w) := by - unfold analyticOrderNatAt zeroMult gfun - congr 1 - have haff : AnalyticAt ℂ (fun z : ℂ => s₀ + c * z) w := by fun_prop - have hcomp : AnalyticAt ℂ (fun z => riemannZeta (s₀ + c * z)) w := comp_affine_analyticAt h - have hmul : (fun z ↦ riemannZeta (s₀ + c * z) * u) = - (fun z => riemannZeta (s₀ + c * z)) * fun _ => u := rfl - rw [hmul, analyticOrderAt_mul hcomp analyticAt_const] - have hconst : analyticOrderAt (fun _ : ℂ => u) w = 0 := - (analyticAt_const).analyticOrderAt_eq_zero.mpr hu - rw [hconst, add_zero] - have hderiv : deriv (fun z : ℂ => s₀ + c * z) w ≠ 0 := by - rw [deriv_const_add, deriv_const_mul _ differentiableAt_id, deriv_id'']; simpa using hc - have := analyticOrderAt_comp_of_deriv_ne_zero (f := riemannZeta) haff hderiv - simpa [Function.comp_def] using this - -/-- ‖z‖ ≤ |Re z| + |Im z| packaged for the window geometry: a point ρ with 0 < Re ρ < 1 and -t < Im ρ ≤ t + 1 lies within distance 3 of 2 + it. -/ -lemma norm_sub_center_le {ρ : ℂ} {t : ℝ} (h1 : 0 < ρ.re) (h2 : ρ.re < 1) (h3 : t < ρ.im) - (h4 : ρ.im ≤ t + 1) : ‖ρ - (2 + t * I)‖ ≤ 3 := by - refine (Complex.norm_le_abs_re_add_abs_im _).trans ?_ - have hre : (ρ - (2 + t * I)).re = ρ.re - 2 := by simp - have him : (ρ - (2 + t * I)).im = ρ.im - t := by simp - rw [hre, him, abs_of_neg (by linarith), abs_of_pos (by linarith)] - linarith - - - -/-- zeros with β ≥ 1/2 in the window (t, t+1], with multiplicity, as a real number. -/ -def NhalfR (t : ℝ) : ℝ := ∑ᶠ ρ ∈ zetaZeroConfig.window t (t + 1) ∩ {ρ | 1/2 ≤ ρ.re}, (zeroMult ρ : ℝ) - -/-- the β ≥ 1/2 half-window count is ≪ log(|t|+3) for |t| ≥ 4 (disc argument). -/ -theorem half_count_large : - ∃ A₁ : ℝ, ∀ t : ℝ, 4 ≤ |t| → NhalfR t ≤ A₁ * Real.log (|t| + 3) := by - obtain ⟨A, C, hC, hgrowth⟩ := zeta_growth_right - have hL := zeta_lower_bound_two - set A' : ℝ := max A 0 with hA' - have hA'0 : 0 ≤ A' := le_max_right _ _ - -- constants - set r : ℝ := 0.84 with hr - set R : ℝ := 0.95 with hR - have hlogRr : 0 < Real.log (R / r) := Real.log_pos (by norm_num [hr, hR]) - refine ⟨1 / Real.log (R / r) * (|Real.log (3 * C)| + 2 * A'), fun t ht => ?_⟩ - -- centre and rescaling - set c₀ : ℂ := 2 + (t + 1/2 : ℝ) * I with hc₀ - set κ : ℂ := ((19/10 : ℝ) : ℂ) with hκ - have hκ0 : κ ≠ 0 := by simp [hκ] - have hnormκ : ‖κ‖ = 1.9 := by simp [hκ]; norm_num - have hζc₀ : (1/3 : ℝ) ≤ ‖riemannZeta c₀‖ := by simpa [hc₀] using hL (t + 1/2) - have hζc₀ne : riemannZeta c₀ ≠ 0 := by - intro h; rw [h, norm_zero] at hζc₀; norm_num at hζc₀ - set u : ℂ := (riemannZeta c₀)⁻¹ with hu - have hu0 : u ≠ 0 := inv_ne_zero hζc₀ne - have hnu : ‖u‖ ≤ 3 := by - rw [hu, norm_inv]; rw [inv_le_comm₀ (by positivity) (by norm_num)]; linarith - set g : ℂ → ℂ := gfun c₀ κ u with hg - -- geometry: ‖c₀ + κ z - 1‖ ≥ |t + 1/2| - 1.9 ‖z‖ - have hc₀1 : |t + 1/2| ≤ ‖c₀ - 1‖ := by - have : (c₀ - 1).im = t + 1/2 := by simp [hc₀] - rw [← this]; exact Complex.abs_im_le_norm _ - have ht' : 3.5 ≤ |t + 1/2| := by - rcases le_abs'.mp ht with h | h - · rw [abs_of_neg (by linarith)]; linarith - · rw [abs_of_pos (by linarith)]; linarith - have hdist : ∀ z : ℂ, ‖z‖ ≤ 1 → |t + 1/2| - 1.9 * ‖z‖ ≤ ‖c₀ + κ * z - 1‖ := by - intro z hz - have h1 : ‖c₀ - 1‖ - ‖κ * z‖ ≤ ‖c₀ + κ * z - 1‖ := by - have := norm_sub_norm_le (c₀ - 1) (-(κ * z)) - rw [norm_neg] at this - have e : c₀ - 1 - -(κ * z) = c₀ + κ * z - 1 := by ring - rw [e] at this; linarith - rw [norm_mul, hnormκ] at h1; linarith - have hne1 : ∀ z : ℂ, ‖z‖ ≤ 1 → c₀ + κ * z ≠ 1 := by - intro z hz h - have := hdist z hz - rw [h, sub_self, norm_zero] at this - nlinarith - -- hypotheses of ZerosBound - have hfAnalytic : AnalyticOnNhd ℂ g (Metric.closedBall (0 : ℂ) 1) := by - intro z hz - rw [Metric.mem_closedBall, dist_zero_right] at hz - exact gfun_analyticAt (hne1 z hz) - have hg0 : g 0 = 1 := by simp [hg, gfun, hu, hζc₀ne] - have hfin : (SetOfZeros 1 g).Finite := by - have hK := riemannZeta_zeros_finite_of_isCompact (isCompact_closedBall c₀ (1.9 : ℝ)) - refine (hK.image fun ρ => (ρ - c₀) / κ).subset ?_ - rintro z ⟨hz, hgz⟩ - refine ⟨c₀ + κ * z, ⟨?_, hne1 z hz, ?_⟩, ?_⟩ - · rw [Metric.mem_closedBall, dist_eq_norm, add_sub_cancel_left, norm_mul, hnormκ]; nlinarith [norm_nonneg z] - · simpa [hg, gfun, hu0] using hgz - · show (c₀ + κ * z - c₀) / κ = z - rw [add_sub_cancel_left, mul_div_cancel_left₀ _ hκ0] - set B : ℝ := 3 * C * (|t| + 6) ^ A' with hB - have hBpos : 0 < B := by positivity - have hfz : ∀ z : ℂ, ‖z‖ ≤ R → ‖g z‖ ≤ B := by - intro z hz - have hz1 : ‖z‖ ≤ 1 := hz.trans (by norm_num [hR]) - set s : ℂ := c₀ + κ * z with hs - have hsre : (0.15:ℝ) ≤ s.re := by - have : s.re = 2 + 1.9 * z.re := by norm_num [hs, hc₀, hκ] - rw [this] - obtain ⟨h1, -⟩ := abs_le.mp ((abs_re_le_norm z).trans hz) - rw [hR] at h1; nlinarith - have hs1 : 1 ≤ ‖s - 1‖ := by have := hdist z hz1; rw [hR] at hz; nlinarith - have hsim : |s.im| + 3 ≤ |t| + 6 := by - have : s.im = t + 1/2 + 1.9 * z.im := by norm_num [hs, hc₀, hκ] - rw [this] - have hzi := (abs_im_le_norm z).trans hz; rw [hR] at hzi - have h1 := abs_add_le (t + 1/2) (1.9 * z.im) - have h2 : |1.9 * z.im| ≤ 1.9 * 0.95 := by - rw [abs_mul, abs_of_pos (by norm_num : (0:ℝ) < 1.9)]; nlinarith - have h3 : |t + 1/2| ≤ |t| + 1/2 := by simpa using abs_add_le t (1/2) - linarith - have h1 : ‖riemannZeta s‖ ≤ C * (|s.im| + 3) ^ A := hgrowth s hsre hs1 - have hbase : 1 ≤ |s.im| + 3 := by linarith [abs_nonneg s.im] - have h2 : (|s.im| + 3) ^ A ≤ (|s.im| + 3) ^ A' := Real.rpow_le_rpow_of_exponent_le hbase (le_max_left _ _) - have h3 : (|s.im| + 3) ^ A' ≤ (|t| + 6) ^ A' := Real.rpow_le_rpow (by linarith [abs_nonneg s.im]) hsim hA'0 - calc ‖g z‖ = ‖riemannZeta s‖ * ‖u‖ := by simp [hg, gfun, hs] - _ ≤ (C * (|t| + 6) ^ A') * 3 := by - apply mul_le_mul (h1.trans ((mul_le_mul_of_nonneg_left (h2.trans h3) hC.le))) hnu (norm_nonneg _) - positivity - _ = B := by rw [hB]; ring - have hZ := ZerosBound (B := B) (r := r) (R := R) (by norm_num [hr]) (by norm_num [hr]) - (by norm_num [hr, hR]) (by norm_num [hR]) hfAnalytic hg0 hfin hfz - -- the window's β ≥ 1/2 part maps injectively into the zero finset of g - set W : Set ℂ := zetaZeroConfig.window t (t + 1) ∩ {ρ | 1/2 ≤ ρ.re} with hW - have hWfin : W.Finite := (zetaZeroConfig.window_finite t (t + 1)).subset inter_subset_left - set φ : ℂ → ℂ := fun ρ => (ρ - c₀) / κ with hφ - have hφinj : Function.Injective φ := by - intro a b h; simp only [hφ] at h - have := congrArg (fun w => c₀ + κ * w) h - simpa [mul_div_cancel₀ _ hκ0] using this - have hφinv : ∀ ρ, c₀ + κ * φ ρ = ρ := by intro ρ; simp only [hφ]; field_simp; ring - have hmemS : ∀ ρ ∈ W, φ ρ ∈ (finiteSetOfZeros_mono (by norm_num [hr] : r < 1) hfin).toFinset := by - rintro ρ ⟨⟨hρZ, hρt, hρt1⟩, hρre⟩ - simp only [Set.Finite.mem_toFinset] - have hρ : IsNontrivialZero ρ := hρZ - refine ⟨?_, ?_⟩ - · -- ‖φ ρ‖ ≤ 0.84 - simp only [hφ, norm_div, hnormκ] - rw [div_le_iff₀ (by norm_num), hr] - have hre : (ρ - c₀).re = ρ.re - 2 := by simp [hc₀] - have him : (ρ - c₀).im = ρ.im - (t + 1/2) := by simp [hc₀] - have hsq : ‖ρ - c₀‖ ^ 2 ≤ (0.84 * 1.9) ^ 2 := by - rw [Complex.sq_norm, Complex.normSq_apply, hre, him] - have := hρ.2.2; have := hρre.out - nlinarith - exact (pow_le_pow_iff_left₀ (norm_nonneg _) (by norm_num) two_ne_zero).mp hsq - · show g (φ ρ) = 0 - simp only [hg, gfun, hφinv]; rw [hρ.1, zero_mul] - have hmult : ∀ ρ ∈ W, (zeroMult ρ : ℝ) = (analyticOrderNatAt g (φ ρ) : ℝ) := by - rintro ρ ⟨⟨hρZ, -, -⟩, -⟩ - have hρ : IsNontrivialZero ρ := hρZ - rw [analyticOrderNatAt_gfun hκ0 hu0 (by rw [hφinv]; exact hρ.not_trivial.2), hφinv] - -- compare the sums - have hsum : NhalfR t ≤ ((∑ ρ' ∈ (finiteSetOfZeros_mono (by norm_num [hr] : r < 1) hfin).toFinset, - analyticOrderNatAt g ρ' : ℕ) : ℝ) := by - unfold NhalfR - rw [← hW, finsum_mem_eq_finite_toFinset_sum _ hWfin, - Finset.sum_congr rfl (fun ρ hρ => hmult ρ (hWfin.mem_toFinset.mp hρ)), - ← Finset.sum_image (f := fun w => (analyticOrderNatAt g w : ℝ)) - (fun a _ b _ h => hφinj h)] - push_cast - apply Finset.sum_le_sum_of_subset_of_nonneg - · intro w hw - obtain ⟨ρ, hρ, rfl⟩ := Finset.mem_image.mp hw - exact hmemS ρ (hWfin.mem_toFinset.mp hρ) - · intros; positivity - -- log B ≤ (|log 3C| + 2A') log(|t|+3) - have hlog3 : 1 ≤ Real.log (|t| + 3) := by - rw [← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith [abs_nonneg t] - have hlog6 : Real.log (|t| + 6) ≤ 2 * Real.log (|t| + 3) := by - rw [← Real.log_rpow (by positivity), Real.rpow_two] - apply Real.log_le_log (by positivity); nlinarith [abs_nonneg t] - have hlogB : Real.log B ≤ (|Real.log (3 * C)| + 2 * A') * Real.log (|t| + 3) := by - rw [hB, Real.log_mul (by positivity) (by positivity), Real.log_rpow (by positivity)] - have h1 := le_abs_self (Real.log (3 * C)) - have h2 : |Real.log (3 * C)| ≤ |Real.log (3 * C)| * Real.log (|t| + 3) := - le_mul_of_one_le_right (abs_nonneg _) hlog3 - have h3 : A' * Real.log (|t| + 6) ≤ A' * (2 * Real.log (|t| + 3)) := - mul_le_mul_of_nonneg_left hlog6 hA'0 - linarith - calc NhalfR t ≤ _ := hsum - _ ≤ 1 / Real.log (R / r) * Real.log B := by exact_mod_cast hZ - _ ≤ 1 / Real.log (R / r) * ((|Real.log (3 * C)| + 2 * A') * Real.log (|t| + 3)) := - mul_le_mul_of_nonneg_left hlogB (by positivity) - _ = _ := by ring - -/-- small heights: N(t,t+1] ≤ N(−4,5] for |t| ≤ 4. -/ -theorem count_small (t : ℝ) (ht : |t| ≤ 4) : (Ncount t (t + 1) : ℝ) ≤ Ncount (-4) 5 := by - obtain ⟨h1, h2⟩ := abs_le.mp ht - have hsub : zetaZeroConfig.window t (t + 1) ⊆ zetaZeroConfig.window (-4) 5 := by - rintro ρ ⟨hρ, ha, hb⟩; exact ⟨hρ, by linarith, by linarith⟩ - have h' : zetaZeroConfig.N t (t + 1) ≤ zetaZeroConfig.N (-4) 5 := - zetaZeroConfig.finsum_mult_mono (-4) 5 hsub subset_rfl - rw [zetaZeroConfig_N, zetaZeroConfig_N] at h' - exact_mod_cast h' - -/-- **H-RvM local count for ζ** ([Tit86, Thm 9.2]): ∃ A₀ ≥ 1, ∀ t ∈ ℝ, N(t, t+1] ≤ A₀ log(|t| + 3), -zeros counted with multiplicity (analytic order of Mathlib's riemannZeta), two-sided in t. -/ +/-- **H-RvM local count for ζ** ([Tit86, Thm 9.2]): `∃ A₀ ≥ 1, ∀ t ∈ ℝ, N(t, t+1] ≤ A₀ log(|t| + 3)`, +zeros counted with multiplicity (analytic order of Mathlib's `riemannZeta`), two-sided in `t`. -/ theorem zeta_local_zero_count : ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ t : ℝ, (Ncount t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3) := by - obtain ⟨A₁, hA₁⟩ := half_count_large - set K : ℝ := (Ncount (-4) 5 : ℝ) with hK - have hK0 : 0 ≤ K := by positivity - refine ⟨max 1 (max (2 * A₁) K), le_max_left _ _, fun t => ?_⟩ - have hlog3 : 1 ≤ Real.log (|t| + 3) := by - rw [← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith [abs_nonneg t] - have hhalf : (Ncount t (t + 1) : ℝ) ≤ 2 * NhalfR t := by - have := zetaZeroConfig.N_le_two_mul_half t (t + 1) - simpa [NhalfR, zetaZeroConfig_N] using this - rcases le_or_gt 4 |t| with ht | ht - · calc (Ncount t (t + 1) : ℝ) ≤ 2 * NhalfR t := hhalf - _ ≤ 2 * (A₁ * Real.log (|t| + 3)) := by - have := hA₁ t ht; nlinarith - _ = (2 * A₁) * Real.log (|t| + 3) := by ring - _ ≤ max 1 (max (2 * A₁) K) * Real.log (|t| + 3) := by - apply mul_le_mul_of_nonneg_right _ (by linarith) - exact le_trans (le_max_left _ _) (le_max_right _ _) - · calc (Ncount t (t + 1) : ℝ) ≤ K := count_small t ht.le - _ ≤ K * Real.log (|t| + 3) := le_mul_of_one_le_right hK0 hlog3 - _ ≤ max 1 (max (2 * A₁) K) * Real.log (|t| + 3) := by - apply mul_le_mul_of_nonneg_right _ (by linarith) - exact le_trans (le_max_right _ _) (le_max_right _ _) - -/-- The same, in H-RvM's vocabulary (Z.N at Z := zetaZeroConfig). -/ + obtain ⟨A, C, hC, hgrowth⟩ := zeta_growth_right + let D : DiscCountData := + { f := riemannZeta + Zc := zetaZeroConfig + scale := 1 + t₀ := 4 + c₀ := 1 / 3 + C := C + A := max A 0 + hscale := le_rfl + ht₀ := by norm_num + hc₀ := by norm_num + hC := hC + hA := le_max_right _ _ + hfa := fun t ht s hs => by + rw [Metric.mem_ball, dist_eq_norm] at hs + have ht' : (3.5 : ℝ) ≤ |t + 1 / 2| := by + rcases le_abs'.mp ht with h | h + · rw [abs_of_neg (by linarith)]; linarith + · rw [abs_of_pos (by linarith)]; linarith + have him : |s.im - (t + 1 / 2)| < 1.9 * 1.05 := by + have := (Complex.abs_im_le_norm (s - (2 + (t + 1 / 2 : ℝ) * I))).trans_lt hs + simpa [Complex.sub_im] using this + have hs1 : s ≠ 1 := by + intro h; rw [h, Complex.one_im, zero_sub, abs_neg] at him; linarith + exact riemannZeta_analyticOnNhd_compl_one s hs1 + hlow := fun t _ => by simpa using zeta_lower_bound_two (t + 1 / 2) + hgrow := fun t ht s hs => by + rw [Metric.mem_closedBall, dist_eq_norm] at hs + have hre : (0.15 : ℝ) ≤ s.re := by + have := (Complex.abs_re_le_norm (s - (2 + (t + 1 / 2 : ℝ) * I))).trans hs + simp at this; linarith [(abs_le.mp this).1] + have him_diff : |s.im - (t + 1 / 2)| ≤ 1.9 * 0.95 := by + have := (Complex.abs_im_le_norm (s - (2 + (t + 1 / 2 : ℝ) * I))).trans hs + simpa [Complex.sub_im] using this + have ht' : (3.5 : ℝ) ≤ |t + 1 / 2| := by + rcases le_abs'.mp ht with h | h + · rw [abs_of_neg (by linarith)]; linarith + · rw [abs_of_pos (by linarith)]; linarith + have hs1 : 1 ≤ ‖s - 1‖ := by + have h1 : |s.im| ≤ ‖s - 1‖ := by simpa using Complex.abs_im_le_norm (s - 1) + have h2 := abs_sub_abs_le_abs_sub (t + 1 / 2) s.im + rw [abs_sub_comm] at h2; linarith + have hsim : |s.im| + 3 ≤ 1 * (|t| + 6) := by + have h1 := abs_sub_abs_le_abs_sub s.im (t + 1 / 2) + have h2 : |t + 1 / 2| ≤ |t| + 1 / 2 := by simpa using abs_add_le t (1 / 2) + linarith + have hbase : 1 ≤ |s.im| + 3 := by linarith [abs_nonneg s.im] + calc ‖riemannZeta s‖ ≤ C * (|s.im| + 3) ^ A := hgrowth s hre hs1 + _ ≤ C * (1 * (|t| + 6)) ^ max A 0 := by + refine mul_le_mul_of_nonneg_left ?_ hC.le + exact (Real.rpow_le_rpow_of_exponent_le hbase (le_max_left _ _)).trans + (Real.rpow_le_rpow (by linarith) hsim (le_max_right _ _)) + hlink := fun ρ hρ _ => ⟨hρ.1, rfl⟩ } + obtain ⟨A₀, hA₀, h⟩ := D.local_count_of + exact ⟨A₀, hA₀, fun t => by simpa [D, zetaZeroConfig_N, one_mul] using h t⟩ + +/-- The same, in H-RvM's vocabulary (`Z.N` at `Z := zetaZeroConfig`). -/ theorem zetaZeroConfig_local_count : ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ t : ℝ, (zetaZeroConfig.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3) := by simpa only [zetaZeroConfig_N] using zeta_local_zero_count diff --git a/zeta23/Zeta23/RvM/MainTerm.lean b/zeta23/Zeta23/RvM/MainTerm.lean index 54bffbb76e..db4aa8bfc6 100644 --- a/zeta23/Zeta23/RvM/MainTerm.lean +++ b/zeta23/Zeta23/RvM/MainTerm.lean @@ -22,11 +22,6 @@ Inputs (from other files): The assembly is proved once as the constant-parametric `rvM_main_param`; `rvM_main_aux` / `rvM_main` are its ∃-corollaries; MainTermExplicit.lean keeps only the numeric inputs and `rvM_main_explicit`. -/ -import Zeta23.RvM.Defs -import Zeta23.RvM.LocalCount -import Zeta23.Hypotheses -import Zeta23.WeilEF.XiLogDeriv -import Zeta23.Analytic.RectangleLogDeriv import Zeta23.RvM.GammaSide import Zeta23.RvM.Backlund import Zeta23.RvM.Fold @@ -208,10 +203,7 @@ theorem exists_goodHeight (a : ℝ) : ∃ T ∈ Set.Icc a (a + 1), GoodHeight T /-! (window arithmetic Ncount_add / Ncount_mono: Zeta23/Statement/SeamClosed.lean) -/ -set_option maxHeartbeats 1000000 in -/-- **rvM_main, parametric in all constants**: the five constant sources — -Backlund CB TB, local count A₀, int_mu Cμ Tμ, μ ≪ log CM, continuity of μ — are explicit parameters, so numeric -inputs give a numeric C_N. -/ +/-- **rvM_main, parametric in all constants**: delegates to `rvM_main_scaled` at `scale = 1`. -/ theorem rvM_main_param {CB TB A₀ Cμ Tμ CM : ℝ} (hB : ∀ T : ℝ, TB ≤ T → (∀ ρ, IsNontrivialZero ρ → ρ.im ≠ T) → |(∫ σ in (1 / 2 : ℝ)..2, logDeriv riemannZeta (σ + T * I)).im| ≤ CB * Real.log T) @@ -224,241 +216,47 @@ theorem rvM_main_param {CB TB A₀ Cμ Tμ CM : ℝ} (hμc : Continuous mu) : ∀ T : ℝ, max (max (TB + 1) (Tμ + 1)) 4 ≤ T → |(zetaZeroConfig.N T (2 * T) : ℝ) - T / (2 * Real.pi) * ell1 T| - ≤ (3 * |CB| + 4 * A₀ + 4 * CM + |Cμ| + 1) * Real.log T := by - have hA₀0 : 0 ≤ A₀ := by linarith + ≤ (2 * (4 * |CB| + Real.pi + 4 * A₀ + 4 * CM + |Cμ|)) * Real.log T := by intro T hT have hT4 : 4 ≤ T := le_trans (le_max_right _ _) hT - have hTB : TB + 1 ≤ T := le_trans (le_trans (le_max_left _ _) (le_max_left _ _)) hT - have hTμ : Tμ + 1 ≤ T := le_trans (le_trans (le_max_right _ _) (le_max_left _ _)) hT - have hlogT : 1 ≤ Real.log T := by - rw [← Real.log_exp 1] - exact Real.log_le_log (Real.exp_pos 1) (le_trans (by linarith [Real.exp_one_lt_d9]) le_rfl) - have hlogT0 : 0 < Real.log T := by linarith - -- good heights straddling [T, 2T] - obtain ⟨T₁, hT₁mem, hg1⟩ := exists_goodHeight (T - 1) - obtain ⟨T₂, hT₂mem, hg2⟩ := exists_goodHeight (2 * T) - have hT₁a : T - 1 ≤ T₁ := hT₁mem.1 - have hT₁b : T₁ ≤ T := by have := hT₁mem.2; linarith - have hT₂a : 2 * T ≤ T₂ := hT₂mem.1 - have hT₂b : T₂ ≤ 2 * T + 1 := hT₂mem.2 - have h1T₁ : 1 ≤ T₁ := by linarith - have h12 : T₁ < T₂ := by linarith - -- argument principle + split + Γ-side - have hN := N_eq_halfContour_completedZeta h1T₁ h12 hg1 hg2 - have hsplit := halfContour_completedZeta_split h1T₁ h12 hg1 hg2 - have hgam := gamma_side (T₁ := T₁) (T₂ := T₂) (by linarith) (by linarith) - -- window arithmetic - have hadd : (Ncount T₁ T₂ : ℝ) - = (Ncount T₁ T : ℝ) + (Ncount T (2*T) : ℝ) + (Ncount (2*T) T₂ : ℝ) := by - have e1 := Zeta23.Ncount_add (a := T₁) (b := T) (c := T₂) hT₁b (by linarith) - have e2 := Zeta23.Ncount_add (a := T) (b := 2*T) (c := T₂) (by linarith) hT₂a - rw [e1, e2] - push_cast - ring - -- small windows are O(log T) - have hlogsq : ∀ x : ℝ, 0 < x → x + 3 ≤ T ^ 2 → Real.log (x + 3) ≤ 2 * Real.log T := by - intro x hx hxT - calc Real.log (x + 3) ≤ Real.log (T ^ 2) := Real.log_le_log (by linarith) hxT - _ = 2 * Real.log T := by - rw [Real.log_pow] - push_cast - ring - have hw1 : (Ncount T₁ T : ℝ) ≤ 2 * A₀ * Real.log T := by - have hsub : Ncount T₁ T ≤ Ncount T₁ (T₁ + 1) := - Zeta23.Ncount_mono le_rfl (by linarith) - calc (Ncount T₁ T : ℝ) ≤ (Ncount T₁ (T₁ + 1) : ℝ) := by exact_mod_cast hsub - _ ≤ A₀ * Real.log (|T₁| + 3) := hA₀ T₁ - _ ≤ A₀ * (2 * Real.log T) := by - refine mul_le_mul_of_nonneg_left ?_ hA₀0 - rw [abs_of_pos (by linarith : 0 < T₁)] - exact hlogsq T₁ (by linarith) (by nlinarith) - _ = 2 * A₀ * Real.log T := by ring - have hw2 : (Ncount (2*T) T₂ : ℝ) ≤ 2 * A₀ * Real.log T := by - have hsub : Ncount (2*T) T₂ ≤ Ncount (2*T) (2*T + 1) := - Zeta23.Ncount_mono le_rfl hT₂b - calc (Ncount (2*T) T₂ : ℝ) ≤ (Ncount (2*T) (2*T+1) : ℝ) := by exact_mod_cast hsub - _ ≤ A₀ * Real.log (|2*T| + 3) := hA₀ (2*T) - _ ≤ A₀ * (2 * Real.log T) := by - refine mul_le_mul_of_nonneg_left ?_ hA₀0 - rw [abs_of_pos (by linarith : 0 < 2*T)] - exact hlogsq (2*T) (by linarith) (by nlinarith) - _ = 2 * A₀ * Real.log T := by ring - -- the ζ half-contour is O(log T) - have hbk1 := hB T₁ (by linarith) hg1 - have hbk2 := hB T₂ (by linarith) hg2 - have hvert := vertical_two T₁ T₂ - have hζbound : |(halfContour (logDeriv riemannZeta) T₁ T₂).im| - ≤ |CB| * Real.log T₁ + Real.pi + |CB| * Real.log T₂ := by - have hlog₁0 : 0 ≤ Real.log T₁ := Real.log_nonneg h1T₁ - have hlog₂0 : 0 ≤ Real.log T₂ := Real.log_nonneg (by linarith) - unfold halfContour - have eim : ((∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₁ * I)) - + (∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I)) * I - - ∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₂ * I)).im - = (∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₁ * I)).im - + ((∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I)) * I).im - - (∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₂ * I)).im := by - simp [Complex.add_im, Complex.sub_im] - rw [eim] - have hmulI : ((∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I)) * I).im - = (∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I) * I).im := - congrArg Complex.im (intervalIntegral.integral_mul_const (μ := MeasureTheory.volume) I - (fun t : ℝ => logDeriv riemannZeta (2 + t * I))).symm - have h1 : |(∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₁ * I)).im| ≤ |CB| * Real.log T₁ := - hbk1.trans (by - have : CB * Real.log T₁ ≤ |CB| * Real.log T₁ := - mul_le_mul_of_nonneg_right (le_abs_self CB) hlog₁0 - linarith) - have h2 : |(∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₂ * I)).im| ≤ |CB| * Real.log T₂ := - hbk2.trans (by - have : CB * Real.log T₂ ≤ |CB| * Real.log T₂ := - mul_le_mul_of_nonneg_right (le_abs_self CB) hlog₂0 - linarith) - calc |(∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₁ * I)).im - + ((∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I)) * I).im - - (∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₂ * I)).im| - ≤ |(∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₁ * I)).im| - + |((∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I)) * I).im| - + |(∫ σ in (1/2:ℝ)..2, logDeriv riemannZeta (σ + T₂ * I)).im| := by - exact (abs_sub _ _).trans (add_le_add (abs_add_le _ _) le_rfl) - _ ≤ |CB| * Real.log T₁ + Real.pi + |CB| * Real.log T₂ := by - rw [hmulI] - have := hvert - linarith - -- μ-integral bookkeeping - have hμint : ∀ a b : ℝ, IntervalIntegrable mu MeasureTheory.volume a b := - fun a b => hμc.intervalIntegrable a b - have hμsplit : (∫ t in T₁..T₂, mu t) - = (∫ t in T₁..T, mu t) + (∫ t in T..(2*T), mu t) + ∫ t in (2*T)..T₂, mu t := by - have e1 : (∫ t in T₁..(2*T), mu t) = (∫ t in T₁..T, mu t) + ∫ t in T..(2*T), mu t := - (intervalIntegral.integral_add_adjacent_intervals (hμint T₁ T) (hμint T (2*T))).symm - have e2 : (∫ t in T₁..T₂, mu t) = (∫ t in T₁..(2*T), mu t) + ∫ t in (2*T)..T₂, mu t := - (intervalIntegral.integral_add_adjacent_intervals (hμint T₁ (2*T)) (hμint (2*T) T₂)).symm - rw [e2, e1] - have hμwin : ∀ a b : ℝ, 1 ≤ a → a ≤ b → b ≤ 2*T + 1 → |b - a| ≤ 1 → - |∫ t in a..b, mu t| ≤ 2 * CM * Real.log T := by - intro a b ha hab hb hba - have hbound : ∀ t ∈ Set.uIoc a b, ‖mu t‖ ≤ CM * Real.log (2*T + 4) := by - intro t ht - rw [Set.uIoc_of_le hab] at ht - have ht1 : 1 ≤ t := le_trans ha ht.1.le - have ht2 : t ≤ 2*T + 1 := le_trans ht.2 hb - rw [Real.norm_eq_abs] - refine (hCM t ht1).trans ?_ - refine mul_le_mul_of_nonneg_left ?_ hCM0.le - exact Real.log_le_log (by linarith) (by linarith) - have := intervalIntegral.norm_integral_le_of_norm_le_const hbound - rw [Real.norm_eq_abs] at this - have hlog24 : Real.log (2*T + 4) ≤ 2 * Real.log T := by - calc Real.log (2*T + 4) ≤ Real.log (T ^ 2) := Real.log_le_log (by linarith) (by nlinarith) - _ = 2 * Real.log T := by rw [Real.log_pow]; push_cast; ring - calc |∫ t in a..b, mu t| ≤ CM * Real.log (2*T+4) * |b - a| := this - _ ≤ CM * (2 * Real.log T) * 1 := by - refine mul_le_mul ?_ hba (abs_nonneg _) (by positivity) - exact mul_le_mul_of_nonneg_left hlog24 hCM0.le - _ = 2 * CM * Real.log T := by ring - have hμ1 : |∫ t in T₁..T, mu t| ≤ 2 * CM * Real.log T := - hμwin T₁ T h1T₁ hT₁b (by linarith) (by rw [abs_of_nonneg (by linarith)]; linarith) - have hμ2 : |∫ t in (2*T)..T₂, mu t| ≤ 2 * CM * Real.log T := - hμwin (2*T) T₂ (by linarith) hT₂a (by linarith) (by rw [abs_of_nonneg (by linarith)]; linarith) - have hintmu := hCμ T (by linarith) - have hT0 : (0:ℝ) < T := by linarith - have hCμT : Cμ / T ≤ |Cμ| := by - calc Cμ / T ≤ |Cμ| / T := by gcongr; exact le_abs_self _ - _ ≤ |Cμ| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos - linarith - _ = |Cμ| := div_one _ - -- final assembly - have hπ : (0:ℝ) < Real.pi := Real.pi_pos - have hπ1 : (1:ℝ) ≤ Real.pi := by linarith [Real.pi_gt_three] - have hkey : (Ncount T (2*T) : ℝ) - T * ell1 T / (2 * Real.pi) - = (1/Real.pi) * (halfContour (logDeriv riemannZeta) T₁ T₂).im - + ((∫ t in T₁..T, mu t) + (∫ t in (2*T)..T₂, mu t) - + ((∫ t in T..(2*T), mu t) - T * ell1 T / (2 * Real.pi))) - - ((Ncount T₁ T : ℝ) + (Ncount (2*T) T₂ : ℝ)) := by - have hΛim : (1/Real.pi) * (halfContour (logDeriv completedRiemannZeta) T₁ T₂).im - = (1/Real.pi) * (halfContour (logDeriv riemannZeta) T₁ T₂).im - + (1/Real.pi) * (halfContour (logDeriv Complex.Gammaℝ) T₁ T₂).im := by - rw [hsplit, Complex.add_im] - ring - have h5 : (Ncount T₁ T₂ : ℝ) - = (1/Real.pi) * (halfContour (logDeriv riemannZeta) T₁ T₂).im - + ∫ t in T₁..T₂, mu t := by - rw [hN, hΛim, hgam] - rw [hμsplit] at h5 - have h6 := hadd - linarith - have hlogT₁ : Real.log T₁ ≤ Real.log T := Real.log_le_log (by linarith) hT₁b - have hlogT₂ : Real.log T₂ ≤ 2 * Real.log T := by - calc Real.log T₂ ≤ Real.log (T^2) := Real.log_le_log (by linarith) (by nlinarith) + have hmain := rvM_main_scaled zetaZeroConfig GoodHeight completedRiemannZeta mu ell1 + (scale := 1) (a₀ := 0) (CY := |CB|) (KY := Real.pi) (TY := TB) (A₀ := A₀) (CM := CM) + (Cμ := Cμ) (Tμ := Tμ) le_rfl le_rfl (abs_nonneg _) Real.pi_pos.le (by linarith) hCM0.le + (fun a _ => exists_goodHeight a) + (fun T₁ T₂ h1 h12 hg1 hg2 => by + rw [zetaZeroConfig_N]; exact N_eq_halfContour_completedZeta (le_trans (le_max_right _ _) h1) h12 hg1 hg2) + (fun T₁ T₂ h1 h12 hg1 hg2 => by + have h1T₁ : 1 ≤ T₁ := le_trans (le_max_right _ _) (le_trans (le_max_left _ _) h1) + have hTBT₁ : TB ≤ T₁ := le_trans (le_max_right _ _) h1 + have hsplit := halfContour_completedZeta_split h1T₁ h12 hg1 hg2 + have hgam := gamma_side (T₁ := T₁) (T₂ := T₂) (by linarith) (by linarith) + have hsub : (halfContour (logDeriv completedRiemannZeta) T₁ T₂).im - Real.pi * ∫ t in T₁..T₂, mu t + = (halfContour (logDeriv riemannZeta) T₁ T₂).im := by + rw [hsplit, Complex.add_im, ← hgam]; field_simp [Real.pi_ne_zero]; ring + rw [hsub, one_mul, one_mul] + have hbk : ∀ t : ℝ, 1 ≤ t → TB ≤ t → GoodHeight t → + |(∫ σ in (1 / 2 : ℝ)..2, logDeriv riemannZeta (σ + t * I)).im| ≤ |CB| * Real.log (|t| + 3) := by + intro t ht1 htB hgt + refine (hB t htB hgt).trans ?_ + have hlt : 0 ≤ Real.log t := Real.log_nonneg ht1 + have hlt' : Real.log t ≤ Real.log (|t| + 3) := + Real.log_le_log (by linarith) (by rw [abs_of_pos (by linarith)]; linarith) + exact (mul_le_mul_of_nonneg_right (le_abs_self CB) hlt).trans + (mul_le_mul_of_nonneg_left hlt' (abs_nonneg _)) + exact abs_im_halfContour_le (hbk T₁ h1T₁ hTBT₁ hg1) (hbk T₂ (by linarith) (by linarith) hg2) + (vertical_two T₁ T₂)) + (fun t => by rw [zetaZeroConfig_N, one_mul]; exact hA₀ t) + hμc (fun τ hτ => by rw [one_mul]; exact hCM τ hτ) hCμ + T (max_le hT (by linarith)) + rw [one_mul] at hmain + have hlog : Real.log (T + 2) ≤ 2 * Real.log T := by + calc Real.log (T + 2) ≤ Real.log (T ^ 2) := Real.log_le_log (by linarith) (by nlinarith) _ = 2 * Real.log T := by rw [Real.log_pow]; push_cast; ring - -- bound each piece - have hNc1 : (0:ℝ) ≤ (Ncount T₁ T : ℝ) := Nat.cast_nonneg _ - have hNc2 : (0:ℝ) ≤ (Ncount (2*T) T₂ : ℝ) := Nat.cast_nonneg _ - have hA : |(1/Real.pi) * (halfContour (logDeriv riemannZeta) T₁ T₂).im| - ≤ 3 * |CB| * Real.log T + 1 := by - rw [abs_mul, abs_of_pos (by positivity : (0:ℝ) < 1/Real.pi)] - have step1 : (1/Real.pi) * |(halfContour (logDeriv riemannZeta) T₁ T₂).im| - ≤ (1/Real.pi) * (|CB| * Real.log T₁ + Real.pi + |CB| * Real.log T₂) := by - exact mul_le_mul_of_nonneg_left hζbound (by positivity) - have hfrac : (1:ℝ)/Real.pi ≤ 1 := by - rw [div_le_one hπ] - exact hπ1 - have e1 : (1/Real.pi) * (|CB| * Real.log T₁) ≤ |CB| * Real.log T := by - calc (1/Real.pi) * (|CB| * Real.log T₁) ≤ 1 * (|CB| * Real.log T₁) := by - apply mul_le_mul_of_nonneg_right hfrac - exact mul_nonneg (abs_nonneg _) (Real.log_nonneg h1T₁) - _ = |CB| * Real.log T₁ := one_mul _ - _ ≤ |CB| * Real.log T := mul_le_mul_of_nonneg_left hlogT₁ (abs_nonneg _) - have e2 : (1/Real.pi) * Real.pi = 1 := by field_simp - have e3 : (1/Real.pi) * (|CB| * Real.log T₂) ≤ 2 * |CB| * Real.log T := by - calc (1/Real.pi) * (|CB| * Real.log T₂) ≤ 1 * (|CB| * Real.log T₂) := by - apply mul_le_mul_of_nonneg_right hfrac - exact mul_nonneg (abs_nonneg _) (Real.log_nonneg (by linarith)) - _ = |CB| * Real.log T₂ := one_mul _ - _ ≤ |CB| * (2 * Real.log T) := mul_le_mul_of_nonneg_left hlogT₂ (abs_nonneg _) - _ = 2 * |CB| * Real.log T := by ring - calc (1/Real.pi) * |(halfContour (logDeriv riemannZeta) T₁ T₂).im| - ≤ (1/Real.pi) * (|CB| * Real.log T₁) + (1/Real.pi) * Real.pi - + (1/Real.pi) * (|CB| * Real.log T₂) := by - rw [← mul_add, ← mul_add] - exact step1 - _ ≤ |CB| * Real.log T + 1 + 2 * |CB| * Real.log T := by - rw [e2] - linarith - _ = 3 * |CB| * Real.log T + 1 := by ring - have hD : |(∫ t in T..(2*T), mu t) - T * ell1 T / (2 * Real.pi)| ≤ |Cμ| * Real.log T := by - calc |(∫ t in T..(2*T), mu t) - T * ell1 T / (2 * Real.pi)| ≤ Cμ / T := hintmu - _ ≤ |Cμ| := hCμT - _ = |Cμ| * 1 := (mul_one _).symm - _ ≤ |Cμ| * Real.log T := mul_le_mul_of_nonneg_left hlogT (abs_nonneg _) - -- put it together - simp only [zetaZeroConfig_N] - rw [show T / (2 * Real.pi) * ell1 T = T * ell1 T / (2 * Real.pi) by ring, hkey] - have htri : |(1/Real.pi) * (halfContour (logDeriv riemannZeta) T₁ T₂).im - + ((∫ t in T₁..T, mu t) + (∫ t in (2*T)..T₂, mu t) - + ((∫ t in T..(2*T), mu t) - T * ell1 T / (2 * Real.pi))) - - ((Ncount T₁ T : ℝ) + (Ncount (2*T) T₂ : ℝ))| - ≤ |(1/Real.pi) * (halfContour (logDeriv riemannZeta) T₁ T₂).im| - + (|∫ t in T₁..T, mu t| + |∫ t in (2*T)..T₂, mu t| - + |(∫ t in T..(2*T), mu t) - T * ell1 T / (2 * Real.pi)|) - + ((Ncount T₁ T : ℝ) + (Ncount (2*T) T₂ : ℝ)) := by - have t1 := abs_sub (((1/Real.pi) * (halfContour (logDeriv riemannZeta) T₁ T₂).im - + ((∫ t in T₁..T, mu t) + (∫ t in (2*T)..T₂, mu t) - + ((∫ t in T..(2*T), mu t) - T * ell1 T / (2 * Real.pi))))) - (((Ncount T₁ T : ℝ) + (Ncount (2*T) T₂ : ℝ))) - have t2 := abs_add_le ((1/Real.pi) * (halfContour (logDeriv riemannZeta) T₁ T₂).im) - ((∫ t in T₁..T, mu t) + (∫ t in (2*T)..T₂, mu t) - + ((∫ t in T..(2*T), mu t) - T * ell1 T / (2 * Real.pi))) - have t3 := abs_add_le ((∫ t in T₁..T, mu t) + (∫ t in (2*T)..T₂, mu t)) - ((∫ t in T..(2*T), mu t) - T * ell1 T / (2 * Real.pi)) - have t4 := abs_add_le (∫ t in T₁..T, mu t) (∫ t in (2*T)..T₂, mu t) - have t5 : |(Ncount T₁ T : ℝ) + (Ncount (2*T) T₂ : ℝ)| - = (Ncount T₁ T : ℝ) + (Ncount (2*T) T₂ : ℝ) := abs_of_nonneg (by positivity) - linarith - refine htri.trans ?_ - linarith [hA, hμ1, hμ2, hD, hw1, hw2] + have hC0 : 0 ≤ 4 * |CB| + Real.pi + 4 * A₀ + 4 * CM + |Cμ| := by + have := Real.pi_pos; positivity + exact hmain.trans (by calc _ ≤ (4 * |CB| + Real.pi + 4 * A₀ + 4 * CM + |Cμ|) * (2 * Real.log T) := + mul_le_mul_of_nonneg_left hlog hC0 + _ = _ := by ring) /-- The assembly, stated against the two Backlund bounds as explicit hypotheses (∃-form; from `rvM_main_param` instantiated with the ∃-witnesses of Backlund, the local count, H-Γ's int_mu, μ ≪ log, continuity). -/ @@ -476,7 +274,6 @@ theorem rvM_main_aux (hΓ : GammaFacts) obtain ⟨CM, hCM0, hCM⟩ := mu_le_log hΓ exact ⟨_, _, rvM_main_param hB vertical_two hA₀1 hA₀ hCμ hCM0 hCM (mu_continuous hΓ)⟩ -set_option maxHeartbeats 1000000 in /-- (M7)+assembly: H-RvM's main clause for ζ, conditional on the Γ-facts. [Tit86, Thm 9.4]: N(T,2T) = (T/2π)(log(T/2π) + 2 log 2 − 1) + O(log T). -/ theorem rvM_main (hΓ : GammaFacts) : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → diff --git a/zeta23/Zeta23/RvM/NcountWindow.lean b/zeta23/Zeta23/RvM/NcountWindow.lean index b35d7be1a4..6cd61543a3 100644 --- a/zeta23/Zeta23/RvM/NcountWindow.lean +++ b/zeta23/Zeta23/RvM/NcountWindow.lean @@ -18,40 +18,17 @@ namespace Zeta23 /-- windows split: zerosIn a c = zerosIn a b ∪ zerosIn b c for a ≤ b ≤ c. -/ theorem zerosIn_union {a b c : ℝ} (h1 : a ≤ b) (h2 : b ≤ c) : - zerosIn a c = zerosIn a b ∪ zerosIn b c := by - ext ρ - simp only [zerosIn, Set.mem_setOf_eq, Set.mem_union] - constructor - · rintro ⟨hρ, ha, hb⟩ - rcases le_or_gt ρ.im b with hle | hgt - · exact Or.inl ⟨hρ, ha, hle⟩ - · exact Or.inr ⟨hρ, hgt, hb⟩ - · rintro (⟨hρ, ha, hb⟩ | ⟨hρ, ha, hb⟩) - · exact ⟨hρ, ha, le_trans hb h2⟩ - · exact ⟨hρ, lt_of_le_of_lt h1 ha, hb⟩ + zerosIn a c = zerosIn a b ∪ zerosIn b c := + zetaZeroConfig.window_union h1 h2 /-- window additivity: N(a,c] = N(a,b] + N(b,c]. -/ theorem Ncount_add {a b c : ℝ} (h1 : a ≤ b) (h2 : b ≤ c) : Ncount a c = Ncount a b + Ncount b c := by - unfold Ncount - rw [zerosIn_union h1 h2] - refine finsum_mem_union ?_ (zerosIn_finite a b) (zerosIn_finite b c) - rw [Set.disjoint_left] - rintro ρ ⟨_, _, hb⟩ ⟨_, ha, _⟩ - exact absurd hb (not_le.2 ha) + simpa only [zetaZeroConfig_N] using zetaZeroConfig.N_add h1 h2 /-- window monotonicity: (a,b] ⊆ (c,d] ⇒ N(a,b] ≤ N(c,d]. -/ theorem Ncount_mono {a b c d : ℝ} (hca : c ≤ a) (hbd : b ≤ d) : Ncount a b ≤ Ncount c d := by - unfold Ncount - have hsub : zerosIn a b ⊆ zerosIn c d := by - rintro ρ ⟨hρ, h1, h2⟩ - exact ⟨hρ, lt_of_le_of_lt hca h1, le_trans h2 hbd⟩ - rw [finsum_mem_eq_finite_toFinset_sum _ (zerosIn_finite a b), - finsum_mem_eq_finite_toFinset_sum _ (zerosIn_finite c d)] - apply Finset.sum_le_sum_of_subset - intro ρ hρ - rw [Set.Finite.mem_toFinset] at hρ ⊢ - exact hsub hρ + simpa only [zetaZeroConfig_N] using zetaZeroConfig.N_mono hca hbd end Zeta23 diff --git a/zeta23/Zeta23/RvM/ReZeroCount.lean b/zeta23/Zeta23/RvM/ReZeroCount.lean index 2c603bf088..3c680d44f7 100644 --- a/zeta23/Zeta23/RvM/ReZeroCount.lean +++ b/zeta23/Zeta23/RvM/ReZeroCount.lean @@ -5,16 +5,11 @@ SPDX-License-Identifier: Apache-2.0 -/ /- Zeta23/RvM/ReZeroCount.lean — the Jensen half (J) of Backlund's bound: -the number of zeros of Re ζ(σ + iT) on σ ∈ [1/2, 2] is ≪ log T. -Route: g(z) := (ζ(z+iT) + ζ(z−iT))/2 is analytic away from 1 ± iT and equals Re ζ(σ+iT) for real σ -(riemannZeta_conj); g(2) = Re ζ(2+iT) ≥ 2 − π²/6 > 1/3; rescale |z−2| ≤ 1.9 to the unit disc and -apply the ported PNT+ ZerosBound (r = 0.8, R = 0.9) with zeta_growth_right on both summands. -Used by Zeta23/RvM/Backlund.lean for backlund_horizontal. +the number of zeros of `Re ζ(σ + iT)` on `σ ∈ [1/2, 2]` is `≪ log T`, +instantiated from `Zeta23.RvM.reZeroCount_of_strip_growth`. -/ import Zeta23.RvM.BacklundDefs -import Zeta23.RvM.ZetaGrowth import Zeta23.RvM.LocalCount -import Zeta23.ZetaReflect open Complex Set Metric @@ -22,343 +17,62 @@ noncomputable section namespace Zeta23.RvM -/-- zeros of a function analytic on (a neighbourhood of each point of) an open ball are finite in -any closed sub-ball, given one nonvanishing point. -/ -lemma finite_zeros_closedBall {f : ℂ → ℂ} {R r : ℝ} (hrR : r < R) - (hA : AnalyticOnNhd ℂ f (Metric.ball 0 R)) {z₀ : ℂ} (hz₀ : z₀ ∈ Metric.ball 0 R) - (hfz₀ : f z₀ ≠ 0) : {z : ℂ | ‖z‖ ≤ r ∧ f z = 0}.Finite := by - have hU : IsPreconnected (Metric.ball (0:ℂ) R) := (convex_ball 0 R).isPreconnected - rcases hA.eqOn_zero_or_eventually_ne_zero_of_preconnected hU with h0 | hcod - · exact absurd (h0 hz₀) hfz₀ - rw [Filter.Eventually, codiscreteWithin_iff_locallyFiniteComplementWithin] at hcod - have hsub : Metric.closedBall (0:ℂ) r ⊆ Metric.ball 0 R := Metric.closedBall_subset_ball hrR - -- choose, for every z in the closed ball, a neighbourhood with finitely many zeros - have hloc : ∀ z ∈ Metric.closedBall (0:ℂ) r, ∃ t ∈ nhds z, - (t ∩ {x : ℂ | x ∈ Metric.ball (0:ℂ) R ∧ f x = 0}).Finite := by - intro z hz - obtain ⟨t, ht, hfin⟩ := hcod z (hsub hz) - refine ⟨t, ht, hfin.subset ?_⟩ - rintro x ⟨hxt, hxU, hx0⟩ - exact ⟨hxt, hxU, by simpa using hx0⟩ - choose t ht hfin using hloc - obtain ⟨I, hcover⟩ := (isCompact_closedBall (0:ℂ) r).elim_nhds_subcover' t ht - refine ((I.finite_toSet.biUnion fun z _ => hfin z z.2).subset ?_) - rintro x ⟨hxr, hx0⟩ - have hxball : x ∈ Metric.closedBall (0:ℂ) r := by - rwa [Metric.mem_closedBall, dist_zero_right] - obtain ⟨z, hzI, hxz⟩ := Set.mem_iUnion₂.mp (hcover hxball) - exact Set.mem_iUnion₂.mpr ⟨z, hzI, hxz, hsub hxball, hx0⟩ - -/-- the symmetrised function g_T(z) := (ζ(z+iT) + ζ(z−iT))/2; equals Re ζ(σ+iT) for real σ. -/ -def symZeta (T : ℝ) (z : ℂ) : ℂ := (riemannZeta (z + T * I) + riemannZeta (z - T * I)) / 2 - -lemma ne_one_of_im_large {T : ℝ} {z : ℂ} (hT : 4 ≤ T) (hz : ‖z‖ ≤ 2) : - z + 2 + T * I ≠ 1 ∧ z + 2 - T * I ≠ 1 := by - constructor <;> intro h - · have h1 := congrArg Complex.im h - simp only [Complex.add_im, Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im, - Complex.I_im, Complex.I_re, Complex.one_im, Complex.im_ofNat] at h1 - have := Complex.abs_im_le_norm z - have := abs_le.mp (this.trans hz) - linarith [this.1, this.2] - · have h1 := congrArg Complex.im h - simp only [Complex.sub_im, Complex.add_im, Complex.mul_im, Complex.ofReal_re, - Complex.ofReal_im, Complex.I_im, Complex.I_re, Complex.one_im, Complex.im_ofNat] at h1 - have := Complex.abs_im_le_norm z - have := abs_le.mp (this.trans hz) - linarith [this.1, this.2] - -lemma symZeta_analyticAt {T : ℝ} {z : ℂ} (h1 : z + T * I ≠ 1) (h2 : z - T * I ≠ 1) : - AnalyticAt ℂ (symZeta T) z := by - unfold symZeta - have ha : AnalyticAt ℂ (fun z : ℂ => riemannZeta (z + T * I)) z := by - have hζ : AnalyticAt ℂ riemannZeta ((fun z : ℂ => z + T * I) z) := - riemannZeta_analyticOnNhd_compl_one _ h1 - exact hζ.comp_of_eq (by fun_prop) rfl - have hb : AnalyticAt ℂ (fun z : ℂ => riemannZeta (z - T * I)) z := by - have hζ : AnalyticAt ℂ riemannZeta ((fun z : ℂ => z - T * I) z) := - riemannZeta_analyticOnNhd_compl_one _ h2 - exact hζ.comp_of_eq (by fun_prop) rfl - exact (ha.add hb).div_const - -/-- for real σ (and σ + iT ≠ 1), g_T(σ) is the real number Re ζ(σ + iT). -/ -lemma symZeta_ofReal {T : ℝ} (σ : ℝ) (h1 : (σ:ℂ) + T * I ≠ 1) : - symZeta T σ = (((riemannZeta ((σ:ℂ) + T * I)).re : ℝ) : ℂ) := by - unfold symZeta - have hconj : riemannZeta ((σ:ℂ) - T * I) = (starRingEnd ℂ) (riemannZeta ((σ:ℂ) + T * I)) := by - have h := riemannZeta_conj (s := (σ:ℂ) + T * I) h1 - have e : (starRingEnd ℂ) ((σ:ℂ) + T * I) = (σ:ℂ) - T * I := by - simp [Complex.ext_iff] - rw [e] at h - exact h - rw [hconj, Complex.add_conj] - push_cast - ring - -set_option maxHeartbeats 1600000 in -/-- **(J) the Jensen half of Backlund's bound**, parametric in the growth data (A, C) of ζ to the -right of σ = 0.15: for T ≥ 4, #{σ ∈ [1/2,2] : Re ζ(σ+iT) = 0} ≤ (1/log(0.9/0.8))·(|log 6C| + 2·max A 0)·log T. -/ +/-- **(J) the Jensen half of Backlund's bound**, parametric in the growth data `(A, C)` of `ζ` to +the right of `σ = 0.15`: for `T ≥ 4`, `#{σ ∈ [1/2, 2] : Re ζ(σ+iT) = 0} ≪ log T`. -/ theorem reZeroSet_card_le_of_growth {A C : ℝ} (hC : 0 < C) (hgrowth : ∀ s : ℂ, (0.15 : ℝ) ≤ s.re → 1 ≤ ‖s - 1‖ → ‖riemannZeta s‖ ≤ C * (|s.im| + 3) ^ A) : ∀ T : ℝ, 4 ≤ T → (reZeroSet T).Finite ∧ ((reZeroSet T).ncard : ℝ) - ≤ (1 / Real.log ((0.9 : ℝ) / 0.8) * (|Real.log (6 * C)| + 2 * max A 0)) * Real.log T := by - set A' : ℝ := max A 0 with hA' - have hA'0 : 0 ≤ A' := le_max_right _ _ - set r : ℝ := 0.8 with hr - set R : ℝ := 0.9 with hR - have hlogRr : 0 < Real.log (R / r) := Real.log_pos (by norm_num [hr, hR]) + ≤ (2 * (1 / Real.log ((0.9 : ℝ) / 0.8) * (Real.log (max (C / (1 / 3)) 1) + 2 * max A 0))) + * Real.log T := by intro T hT - set κ : ℂ := ((19/10 : ℝ) : ℂ) with hκ - have hκ0 : κ ≠ 0 := by simp [hκ] - have hnormκ : ‖κ‖ = 1.9 := by simp [hκ]; norm_num - -- the centre value g_T(2) = Re ζ(2+iT) ≥ 2 − π²/6 > 1/3 - have hne2 : (2:ℂ) + T * I ≠ 1 := by - have := ne_one_of_im_large (T := T) (z := 0) hT (by norm_num) - simpa using this.1 - have hsub1 := norm_riemannZeta_sub_one_le (s := 2 + T * I) (by simp) - have hre2 : 2 - Real.pi ^ 2 / 6 ≤ (riemannZeta (2 + T * I)).re := by - have h2 : |(riemannZeta (2 + T * I) - 1).re| ≤ Real.pi ^ 2 / 6 - 1 := - (Complex.abs_re_le_norm _).trans hsub1 - have h3 : (riemannZeta (2 + T * I) - 1).re = (riemannZeta (2 + T * I)).re - 1 := by simp - rw [h3] at h2 - linarith [(abs_le.mp h2).1] - have hthird := one_third_lt_two_sub_pi_sq_div_six - have hg2 : symZeta T 2 = (((riemannZeta ((2:ℂ) + T * I)).re : ℝ) : ℂ) := by - have h := symZeta_ofReal (T := T) 2 (by push_cast; exact hne2) - push_cast at h ⊢ - exact h - have hg2ne : symZeta T 2 ≠ 0 := by - rw [hg2] - simp only [ne_eq, Complex.ofReal_eq_zero] - linarith - set u : ℂ := (symZeta T 2)⁻¹ with hu - have hu0 : u ≠ 0 := inv_ne_zero hg2ne - have hnu : ‖u‖ ≤ 3 := by - rw [hu, norm_inv, inv_le_comm₀ (by positivity) (by norm_num)] - rw [hg2, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (by linarith)] - linarith - set G : ℂ → ℂ := fun w => symZeta T (2 + κ * w) * u with hG - have hGanalytic : ∀ w : ℂ, ‖w‖ ≤ 1.05 → AnalyticAt ℂ G w := by - intro w hw - have hκw : ‖κ * w‖ ≤ 2 := by - rw [norm_mul, hnormκ]; nlinarith [norm_nonneg w] - obtain ⟨h1, h2⟩ := ne_one_of_im_large (z := κ * w) hT hκw - have hs : AnalyticAt ℂ (symZeta T) (2 + κ * w) := by - apply symZeta_analyticAt - · rw [show (2:ℂ) + κ * w + T * I = κ * w + 2 + T * I by ring]; exact h1 - · rw [show (2:ℂ) + κ * w - T * I = κ * w + 2 - T * I by ring]; exact h2 - exact ((hs.comp_of_eq (by fun_prop : AnalyticAt ℂ (fun w : ℂ => 2 + κ * w) w) rfl).mul - analyticAt_const) - have hG0 : G 0 = 1 := by - simp only [hG, mul_zero, add_zero, hu] - exact mul_inv_cancel₀ hg2ne - -- finiteness of the unit-ball zeros - have hball : AnalyticOnNhd ℂ G (Metric.ball 0 1.05) := by - intro w hw - rw [Metric.mem_ball, dist_zero_right] at hw - exact hGanalytic w hw.le - have hfin : (SetOfZeros 1 G).Finite := by - have h := finite_zeros_closedBall (f := G) (R := 1.05) (r := 1) (by norm_num) hball - (z₀ := 0) (by simp; norm_num) (by rw [hG0]; exact one_ne_zero) - exact h.subset (by intro z hz; exact hz) - -- growth bound on ‖w‖ ≤ R - set B : ℝ := 6 * C * (T + 5) ^ A' with hB - have hBpos : 0 < B := by positivity - have hκre : κ.re = 1.9 := by rw [hκ]; norm_num [Complex.ofReal_re] - have hκim : κ.im = 0 := by rw [hκ]; simp - have hfz : ∀ w : ℂ, ‖w‖ ≤ R → ‖G w‖ ≤ B := by - intro w hw - have hwre := abs_le.mp ((Complex.abs_re_le_norm w).trans hw) - have hwim := abs_le.mp ((Complex.abs_im_le_norm w).trans hw) - rw [hR] at hwre hwim - have hκwre : (κ * w).re = 1.9 * w.re := by - rw [Complex.mul_re, hκre, hκim]; ring - have hκwim : (κ * w).im = 1.9 * w.im := by - rw [Complex.mul_im, hκre, hκim]; ring - have hzeta : ∀ ε : ℝ, ε = 1 ∨ ε = -1 → - ‖riemannZeta (2 + κ * w + ε * T * I)‖ ≤ C * (T + 5) ^ A' := by - intro ε hε - set s : ℂ := 2 + κ * w + ε * T * I with hs - have hsre : s.re = 2 + 1.9 * w.re := by - rw [hs] - simp only [Complex.add_re, Complex.mul_re, Complex.I_re, Complex.I_im, - Complex.ofReal_re, Complex.ofReal_im, Complex.re_ofNat, Complex.mul_im, hκre, hκim] - ring - have hsim : s.im = 1.9 * w.im + ε * T := by - rw [hs] - simp only [Complex.add_im, Complex.mul_im, Complex.I_re, Complex.I_im, - Complex.ofReal_re, Complex.ofReal_im, Complex.im_ofNat, Complex.mul_re, hκre, hκim] - ring - have hεT : T - 1.71 ≤ |1.9 * w.im + ε * T| := by - rcases hε with rfl | rfl - · rw [abs_of_pos (by nlinarith)]; nlinarith - · rw [abs_of_neg (by nlinarith)]; nlinarith - have h1 : (0.15:ℝ) ≤ s.re := by rw [hsre]; nlinarith - have h2 : 1 ≤ ‖s - 1‖ := by - have := Complex.abs_im_le_norm (s - 1) - have : |(s - 1).im| ≤ ‖s - 1‖ := this - have him : (s - 1).im = s.im := by simp - rw [him, hsim] at this - linarith [hεT.trans this] - have h3 := hgrowth s h1 h2 - have hbase1 : (1:ℝ) ≤ |s.im| + 3 := by linarith [abs_nonneg s.im] - have hA'A : (|s.im| + 3) ^ A ≤ (|s.im| + 3) ^ A' := - Real.rpow_le_rpow_of_exponent_le hbase1 (le_max_left _ _) - have hbase : |s.im| + 3 ≤ T + 5 := by - rw [hsim] - have h4 := abs_add_le (1.9 * w.im) (ε * T) - have h5 : |1.9 * w.im| ≤ 1.71 := by - rw [abs_mul, abs_of_pos (by norm_num : (0:ℝ) < 1.9)] - have : |w.im| ≤ 0.9 := abs_le.mpr ⟨hwim.1, hwim.2⟩ - nlinarith - have h6 : |ε * T| = T := by - rcases hε with rfl | rfl <;> rw [abs_mul] <;> - simp [abs_of_pos (by linarith : (0:ℝ) < T)] - linarith - have hmono : (|s.im| + 3) ^ A' ≤ (T + 5) ^ A' := - Real.rpow_le_rpow (by positivity) hbase hA'0 - calc ‖riemannZeta s‖ ≤ C * (|s.im| + 3) ^ A := h3 - _ ≤ C * (T + 5) ^ A' := by - exact mul_le_mul_of_nonneg_left (hA'A.trans hmono) hC.le - have hgb : ‖symZeta T (2 + κ * w)‖ ≤ C * (T + 5) ^ A' := by - have e1 : (2:ℂ) + κ * w + (1:ℝ) * T * I = 2 + κ * w + T * I := by push_cast; ring - have e2 : (2:ℂ) + κ * w + (-1:ℝ) * T * I = 2 + κ * w - T * I := by push_cast; ring - have ha := hzeta 1 (Or.inl rfl) - have hb := hzeta (-1) (Or.inr rfl) - rw [e1] at ha - rw [e2] at hb - unfold symZeta - calc ‖(riemannZeta (2 + κ * w + T * I) + riemannZeta (2 + κ * w - T * I)) / 2‖ - = ‖riemannZeta (2 + κ * w + T * I) + riemannZeta (2 + κ * w - T * I)‖ / 2 := by - rw [norm_div]; norm_num - _ ≤ (‖riemannZeta (2 + κ * w + T * I)‖ + ‖riemannZeta (2 + κ * w - T * I)‖) / 2 := by - gcongr - exact norm_add_le _ _ - _ ≤ C * (T + 5) ^ A' := by linarith - calc ‖G w‖ = ‖symZeta T (2 + κ * w)‖ * ‖u‖ := by rw [hG]; exact norm_mul _ _ - _ ≤ (C * (T + 5) ^ A') * 3 := by - apply mul_le_mul hgb hnu (norm_nonneg _) (by positivity) - _ ≤ B := by - rw [hB] - nlinarith [Real.rpow_nonneg (by linarith : (0:ℝ) ≤ T + 5) A'] - -- apply the ported ZerosBound - have hfAnalytic : AnalyticOnNhd ℂ G (Metric.closedBall (0:ℂ) 1) := by - intro w hw - rw [Metric.mem_closedBall, dist_zero_right] at hw - exact hGanalytic w (hw.trans (by norm_num)) - have hrlt1 : r < 1 := by norm_num [hr] - have hZ := ZerosBound (B := B) (r := r) (R := R) (by norm_num [hr]) hrlt1 - (by norm_num [hr, hR]) (by norm_num [hR]) hfAnalytic hG0 hfin hfz - set Z : Finset ℂ := (finiteSetOfZeros_mono hrlt1 hfin).toFinset with hZdef - have horder : ∀ ρ ∈ Z, 1 ≤ analyticOrderNatAt G ρ := by - intro ρ hρ - rw [hZdef, Set.Finite.mem_toFinset] at hρ - obtain ⟨hρr, hρ0⟩ := hρ - have hρr' : ‖ρ‖ ≤ r := hρr - have han : AnalyticAt ℂ G ρ := hGanalytic ρ (by rw [hr] at hρr'; linarith) - have hne0 : analyticOrderAt G ρ ≠ 0 := han.analyticOrderAt_ne_zero.mpr hρ0 - have hnetop : analyticOrderAt G ρ ≠ ⊤ := by - refine hball.analyticOrderAt_ne_top_of_isPreconnected (convex_ball _ _).isPreconnected - (x := 0) ?_ ?_ ?_ - · rw [Metric.mem_ball, dist_zero_right]; simp; norm_num - · rw [Metric.mem_ball, dist_zero_right]; rw [hr] at hρr'; linarith - · rw [(hGanalytic 0 (by norm_num)).analyticOrderAt_eq_zero.mpr - (by rw [hG0]; exact one_ne_zero)] - exact ENat.zero_ne_top - unfold analyticOrderNatAt - obtain ⟨n, hn⟩ := ENat.ne_top_iff_exists.mp hnetop - rw [← hn] at hne0 ⊢ - simp only [ENat.toNat_coe, ne_eq, Nat.cast_eq_zero] at hne0 ⊢ - omega - -- the real zeros inject into Z - set φ : ℝ → ℂ := fun σ => ((σ - 2 : ℝ) : ℂ) / κ with hφ - have hφinj : Set.InjOn φ (reZeroSet T) := by - intro a _ b _ h - simp only [hφ] at h - have h' : ((a - 2 : ℝ) : ℂ) = ((b - 2 : ℝ) : ℂ) := by - have := congrArg (fun z => z * κ) h - simpa [div_mul_cancel₀ _ hκ0] using this - have := Complex.ofReal_inj.mp h' - linarith - have hmem : ∀ σ ∈ reZeroSet T, φ σ ∈ SetOfZeros r G := by - rintro σ ⟨hσI, hσ0⟩ - have hσ1 : (1/2:ℝ) ≤ σ := hσI.1 - have hσ2 : σ ≤ 2 := hσI.2 - constructor - · show ‖((σ - 2 : ℝ) : ℂ) / κ‖ ≤ r - rw [norm_div, hnormκ, Complex.norm_real, Real.norm_eq_abs, hr] - rw [abs_of_nonpos (by linarith)] - rw [div_le_iff₀ (by norm_num)] - linarith - · show G (φ σ) = 0 - have hfix : (2:ℂ) + κ * φ σ = (σ:ℂ) := by - simp only [hφ] - field_simp - push_cast - ring - have hne1 : (σ:ℂ) + T * I ≠ 1 := by - intro h - have := congrArg Complex.im h - simp at this - linarith - simp only [hG, hfix] - rw [symZeta_ofReal σ hne1, hσ0] - simp - have himg : φ '' (reZeroSet T) ⊆ (↑Z : Set ℂ) := by - rintro _ ⟨σ, hσ, rfl⟩ - rw [hZdef] - simp only [Set.Finite.coe_toFinset] - exact hmem σ hσ - have hfinRe : (reZeroSet T).Finite := - Set.Finite.of_finite_image (Z.finite_toSet.subset himg) hφinj - refine ⟨hfinRe, ?_⟩ - have hcard : ((reZeroSet T).ncard : ℝ) ≤ (Z.card : ℝ) := by - have h1 : (reZeroSet T).ncard = (φ '' reZeroSet T).ncard := - (hφinj.ncard_image).symm - have h2 : (φ '' reZeroSet T).ncard ≤ (↑Z : Set ℂ).ncard := - Set.ncard_le_ncard himg Z.finite_toSet - rw [Set.ncard_coe_finset] at h2 - exact_mod_cast h1 ▸ h2 - have hsum : (Z.card : ℝ) ≤ ((∑ ρ ∈ Z, analyticOrderNatAt G ρ : ℕ) : ℝ) := by - have h := (Finset.card_eq_sum_ones Z).le.trans (Finset.sum_le_sum horder) - exact_mod_cast h - have hlogT : 1 ≤ Real.log T := by - rw [← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - have hlog5 : Real.log (T + 5) ≤ 2 * Real.log T := by - rw [← Real.log_rpow (by linarith : (0:ℝ) < T), Real.rpow_two] - apply Real.log_le_log (by linarith) - nlinarith - have hlogB : Real.log B ≤ (|Real.log (6 * C)| + 2 * A') * Real.log T := by - rw [hB, Real.log_mul (by positivity) (by positivity), - Real.log_rpow (by linarith : (0:ℝ) < T + 5)] - have h1 := le_abs_self (Real.log (6 * C)) - have h2 : |Real.log (6 * C)| ≤ |Real.log (6 * C)| * Real.log T := - le_mul_of_one_le_right (abs_nonneg _) hlogT - have h3 : A' * Real.log (T + 5) ≤ A' * (2 * Real.log T) := - mul_le_mul_of_nonneg_left hlog5 hA'0 - linarith - calc ((reZeroSet T).ncard : ℝ) ≤ (Z.card : ℝ) := hcard - _ ≤ _ := hsum - _ ≤ 1 / Real.log (R / r) * Real.log B := by exact_mod_cast hZ - _ ≤ 1 / Real.log (R / r) * ((|Real.log (6 * C)| + 2 * A') * Real.log T) := - mul_le_mul_of_nonneg_left hlogB (by positivity) + have hne1 : ∀ z : ℂ, z ∈ Metric.ball (2 : ℂ) (1.9 * 1.05) → + z + T * I ≠ 1 ∧ z - T * I ≠ 1 := fun z hz => by + rw [Metric.mem_ball, dist_eq_norm] at hz + have him : |z.im| < 1.9 * 1.05 := by + have := Complex.abs_im_le_norm (z - 2); simp at this; linarith + constructor <;> intro h <;> have h1 := congrArg Complex.im h <;> simp at h1 <;> + linarith [(abs_lt.mp him).1, (abs_lt.mp him).2] + have hre2 : (1 / 3 : ℝ) ≤ (riemannZeta (2 + T * I)).re := by + have hsub := (Complex.abs_re_le_norm _).trans + (norm_riemannZeta_sub_one_le (s := 2 + T * I) (by simp)) + simp at hsub; linarith [(abs_le.mp hsub).1, one_third_lt_two_sub_pi_sq_div_six] + have hbound : ∀ s : ℂ, (0.15 : ℝ) ≤ s.re → 1 ≤ |s.im| → + ‖riemannZeta s‖ ≤ C * (1 * (|s.im| + 3)) ^ max A 0 := fun s hre him => by + have hs1 : 1 ≤ ‖s - 1‖ := him.trans (by simpa using Complex.abs_im_le_norm (s - 1)) + rw [one_mul] + exact (hgrowth s hre hs1).trans (mul_le_mul_of_nonneg_left + (Real.rpow_le_rpow_of_exponent_le (by linarith [abs_nonneg s.im]) (le_max_left _ _)) hC.le) + obtain ⟨hfin, hcard⟩ := reZeroCount_of_strip_growth (f₁ := riemannZeta) (f₂ := riemannZeta) + (scale := 1) (c₀ := 1 / 3) (C := C) (A := max A 0) le_rfl (by norm_num) hC (le_max_right _ _) + (fun z hz => riemannZeta_analyticOnNhd_compl_one _ (hne1 z hz).1) + (fun z hz => riemannZeta_analyticOnNhd_compl_one _ (hne1 z hz).2) + (fun σ _ => by + have h1 : (σ : ℂ) + T * I ≠ 1 := fun h => by + have := congrArg Complex.im h; simp at this; linarith + have h := riemannZeta_conj (s := (σ : ℂ) + T * I) h1 + rwa [show (starRingEnd ℂ) ((σ : ℂ) + T * I) = (σ : ℂ) - T * I by simp [Complex.ext_iff]] at h) + hre2 + (fun s hre him => hbound s hre (by linarith [(abs_le.mp him).1, le_abs_self s.im])) + (fun s hre him => hbound s hre (by linarith [(abs_le.mp him).2, neg_abs_le s.im])) + refine ⟨hfin, hcard.trans ?_⟩ + have hlog : Real.log (1 * (|T| + 3)) ≤ 2 * Real.log T := by + rw [one_mul, abs_of_pos (by linarith : (0 : ℝ) < T)] + calc Real.log (T + 3) ≤ Real.log (T ^ 2) := Real.log_le_log (by linarith) (by nlinarith) + _ = 2 * Real.log T := by rw [Real.log_pow]; push_cast; ring + have hcoef : 0 ≤ 1 / Real.log ((0.9 : ℝ) / 0.8) * (Real.log (max (C / (1 / 3)) 1) + 2 * max A 0) := by + have : 0 < Real.log ((0.9 : ℝ) / 0.8) := Real.log_pos (by norm_num) + have : 0 ≤ Real.log (max (C / (1 / 3)) 1) := Real.log_nonneg (le_max_right _ _) + have : 0 ≤ max A 0 := le_max_right _ _ + positivity + calc _ ≤ (1 / Real.log ((0.9 : ℝ) / 0.8) * (Real.log (max (C / (1 / 3)) 1) + 2 * max A 0)) + * (2 * Real.log T) := mul_le_mul_of_nonneg_left hlog hcoef _ = _ := by ring -/-- **(J) the Jensen half of Backlund's bound**: #{σ ∈ [1/2,2] : Re ζ(σ+iT) = 0} ≪ log T. -/ +/-- **(J) the Jensen half of Backlund's bound**: `#{σ ∈ [1/2, 2] : Re ζ(σ+iT) = 0} ≪ log T`. -/ theorem reZeroSet_card_le : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → (reZeroSet T).Finite ∧ ((reZeroSet T).ncard : ℝ) ≤ C * Real.log T := by obtain ⟨A, C, hC, hgrowth⟩ := zeta_growth_right exact ⟨_, 4, reZeroSet_card_le_of_growth hC hgrowth⟩ -/-- explicit form at zeta_growth_right_at's literal data (A, C) = (1, 20/3): -ncard ≤ (1/log(0.9/0.8))·(|log 40| + 2)·log T (≈ 48.3·log T) for T ≥ 4. -/ -theorem reZeroSet_card_le_at : ∀ T : ℝ, 4 ≤ T → - (reZeroSet T).Finite ∧ ((reZeroSet T).ncard : ℝ) - ≤ (1 / Real.log ((0.9 : ℝ) / 0.8) * (|Real.log (6 * (20 / 3 : ℝ))| + 2 * max (1 : ℝ) 0)) - * Real.log T := - reZeroSet_card_le_of_growth (A := 1) (C := 20 / 3) (by norm_num) zeta_growth_right_at - end Zeta23.RvM diff --git a/zeta23/Zeta23/RvM/ZetaGrowth.lean b/zeta23/Zeta23/RvM/ZetaGrowth.lean index 79523c00f4..b0ababe996 100644 --- a/zeta23/Zeta23/RvM/ZetaGrowth.lean +++ b/zeta23/Zeta23/RvM/ZetaGrowth.lean @@ -204,9 +204,6 @@ theorem norm_riemannZeta_ge_of_two_le_re {s : ℂ} (hs : 2 ≤ s.re) : simp only [norm_one] at h' linarith -lemma two_sub_pi_sq_div_six_pos : 0 < 2 - Real.pi ^ 2 / 6 := by - linarith [pi_sq_div_six_sub_one_lt_one] - /-- 1/3 < 2 − π²/6 (π < 3.15 ⇒ π²/6 < 1.654). -/ lemma one_third_lt_two_sub_pi_sq_div_six : (1 / 3 : ℝ) < 2 - Real.pi ^ 2 / 6 := by have := Real.pi_lt_d2 @@ -218,11 +215,6 @@ theorem zeta_lower_bound_two : ∀ t : ℝ, (1 / 3 : ℝ) ≤ ‖riemannZeta (2 have h := norm_riemannZeta_ge_of_two_le_re (s := 2 + t * I) (by simp) linarith [one_third_lt_two_sub_pi_sq_div_six] -/-- ζ does not vanish on Re s ≥ 2 (of course Mathlib has this for Re s ≥ 1: -`riemannZeta_ne_zero_of_one_le_re`; restated for convenience). -/ -theorem riemannZeta_ne_zero_of_two_le_re {s : ℂ} (hs : 2 ≤ s.re) : riemannZeta s ≠ 0 := - riemannZeta_ne_zero_of_one_le_re (by linarith) - /-- Upper bound on Re s ≥ 2: ‖ζ(s)‖ ≤ π²/6. -/ theorem norm_riemannZeta_le_of_two_le_re {s : ℂ} (hs : 2 ≤ s.re) : ‖riemannZeta s‖ ≤ Real.pi ^ 2 / 6 := by diff --git a/zeta23/Zeta23/Statement.lean b/zeta23/Zeta23/Statement.lean index b8a95eb20c..52318207d3 100644 --- a/zeta23/Zeta23/Statement.lean +++ b/zeta23/Zeta23/Statement.lean @@ -72,27 +72,13 @@ riemannZeta_one_sub / completedRiemannZeta_one_sub + Γ-nonvanishing + conjugati level of analyticOrderAt for the reflection facts; isolated zeros + the pole at 1 for finiteness), and are not inputs of the paper. Paper [subsec:weil]: "The multiset {(γ_ρ,m_ρ)} is invariant under γ ↦ γ̄ (i.e. ρ ↦ 1−ρ̄; multiplicities agree because conj ξ(conj s) = ξ(s) = ξ(1−s))". -/ -structure ZetaSeam : Prop where - /-- H-fin: at a nontrivial zero the analytic order is finite and ≥ 1. -/ - one_le_mult : ∀ ρ, IsNontrivialZero ρ → 1 ≤ zeroMult ρ - /-- H-symm (set): ρ ↦ 1 − conj ρ preserves nontrivial zeros. -/ - reflect_zero : ∀ ρ, IsNontrivialZero ρ → IsNontrivialZero (reflect ρ) - /-- H-symm (multiplicity). -/ - mult_reflect : ∀ ρ, IsNontrivialZero ρ → zeroMult (reflect ρ) = zeroMult ρ - /-- local finiteness: finitely many nontrivial zeros with T₁ < γ ≤ T₂. -/ - finite_window : ∀ T₁ T₂ : ℝ, ({ρ | IsNontrivialZero ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}).Finite +abbrev ZetaSeam : Prop := ZeroSeam IsNontrivialZero zeroMult /-- The nontrivial zeros of ζ with their multiplicities, as an abstract zero configuration. carrier := {ρ | IsNontrivialZero ρ} exactly, mult := zeroMult exactly (seam requirement: H-EF's W then ranges over exactly the nontrivial zeros weighted by exactly the analytic order). -/ -def zetaZeros (hs : ZetaSeam) : ZeroConfig where - carrier := {ρ | IsNontrivialZero ρ} - mult := zeroMult - one_le_mult := hs.one_le_mult - strip := fun _ h => ⟨h.2.1.le, h.2.2.le⟩ - reflect_mem := hs.reflect_zero - mult_reflect := hs.mult_reflect - finite_window := hs.finite_window +def zetaZeros (hs : ZetaSeam) : ZeroConfig := + hs.toZeroConfig fun _ h => ⟨h.2.1.le, h.2.2.le⟩ section seam_rfl variable (hs : ZetaSeam) (T₁ T₂ : ℝ) @@ -133,24 +119,6 @@ lemma IsNontrivialZero.not_trivial {ρ : ℂ} (h : IsNontrivialZero ρ) : · rintro rfl simpa using h.2.2 -/-- Mathlib's RiemannHypothesis puts every nontrivial zero (in our sense) on the critical line. -/ -theorem RH_implies_on_line (hRH : RiemannHypothesis) {ρ : ℂ} (h : IsNontrivialZero ρ) : - ρ.re = 1 / 2 := - hRH ρ h.1 h.not_trivial.1 h.not_trivial.2 - -/-- Sanity anchor 1: under Mathlib's RiemannHypothesis all counted zeros are on the -line, so the on-line counts equal the full counts, with and without multiplicity. No other -hypotheses. -/ -theorem RH_implies_all_on_line (hRH : RiemannHypothesis) (T₁ T₂ : ℝ) : - N0 T₁ T₂ = Ncount T₁ T₂ ∧ N0star T₁ T₂ = Ndist T₁ T₂ := by - have hset : zerosIn T₁ T₂ ∩ {ρ | ρ.re = 1 / 2} = zerosIn T₁ T₂ := by - ext ρ - simp only [mem_inter_iff, mem_setOf_eq, and_iff_left_iff_imp] - exact fun hρ => RH_implies_on_line hRH hρ.1 - unfold N0 Ncount N0star Ndist - rw [hset] - exact ⟨rfl, rfl⟩ - /-- Sanity anchor 2 [eq:trivialchain], verbatim: "trivially N₀ˢ ≤ N₀* ≤ N₀ ≤ N, N₀ˢ ≤ Nˢ ≤ N_d ≤ N". Needs the seam facts (finiteness of the window; m_ρ ≥ 1), nothing from the paper. -/ @@ -175,16 +143,4 @@ Formal target: the ε-forms, for each fixed λ ∈ (0,1) with constant H(λ) (resp. 2F(λ)−1, F(λ)), which absorb c(λ)/log T; then the 2/3 (resp. 1/2, 3/4) forms via sup_{λ<1} H(λ) = H(1) = 2/3 etc. The effective c(λ) forms are not stated. -/ -/-- The statement of Theorem A (2/3, dyadic ε-form) as a Prop, for reference; Zeta23.thmA proves it. -/ -def ThmA_statement : Prop := - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) - -/-- The statement of Theorem B (1/2, dyadic ε-form). -/ -def ThmB_statement : Prop := - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) - -/-- The statement of Theorem C (3/4, dyadic ε-form). -/ -def ThmC_statement : Prop := - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) - end Zeta23 diff --git a/zeta23/Zeta23/Statement/Seam.lean b/zeta23/Zeta23/Statement/Seam.lean index 2fd6c9d89e..f8f0c197f8 100644 --- a/zeta23/Zeta23/Statement/Seam.lean +++ b/zeta23/Zeta23/Statement/Seam.lean @@ -56,7 +56,7 @@ theorem ZetaSeam.one_le_mult_holds : ∀ ρ, IsNontrivialZero ρ → 1 ≤ zeroM unfold zeroMult obtain ⟨n, hn⟩ := ENat.ne_top_iff_exists.mp hnetop rw [← hn] at hne0 ⊢ - simp only [ENat.toNat_coe, ne_eq, Nat.cast_eq_zero] at hne0 ⊢ + simp only [ENat.toNat_natCast, ne_eq, Nat.cast_eq_zero] at hne0 ⊢ omega /-- The zeros of ζ (away from 1) are locally finite on all of ℂ. -/ diff --git a/zeta23/Zeta23/Tail.lean b/zeta23/Zeta23/Tail.lean index b4d913b406..94a7064e76 100644 --- a/zeta23/Zeta23/Tail.lean +++ b/zeta23/Zeta23/Tail.lean @@ -31,9 +31,7 @@ Hypotheses taken (all proved elsewhere in the repository; none are Lean axioms): Zeta23.Params.norm_phiHat_sub_I_mul_le (Taper.lean), with C₁ := P.C1 T = ‖φ″‖₁; * hEt/hEh — Hermitian-ness of Ẽ, Ê (from the ρ ↦ 1−ρ̄ symmetry). -/ -import Zeta23.Defs import Zeta23.Assembly.Inputs -import Zeta23.Tail.Basic import Zeta23.Tail.Grid import Zeta23.Tail.Count import Zeta23.Tail.RankOne @@ -287,7 +285,7 @@ lemma finite_notTail (Z : ZeroConfig) (T : ℝ) : have hfin : (Z.ZIprime T).Finite := Z.finite_window _ _ refine (hfin.preimage Subtype.val_injective.injOn).subset ?_ intro ρ hρ - simp only [Set.mem_setOf_eq, InTail, not_or, not_le, not_lt] at hρ + simp only [Set.mem_ofPred_eq, InTail, not_or, not_le, not_lt] at hρ exact ⟨ρ.2, hρ.1, hρ.2⟩ namespace TailHyp @@ -308,8 +306,6 @@ lemma not_mem_sA_iff (ρ : Z.carrier) : ρ ∉ H.sA ↔ InTail T (ρ : ℂ).im : /-- K := e^{L/4} C₁. -/ def K (_ : TailHyp Z P T A₀ C₁) : ℝ := Real.exp (P.L T / 4) * C₁ -lemma K_nonneg : 0 ≤ H.K := by unfold K; have := H.hC₁; positivity - /-- Finite partial sums over tail zeros: ∑ m_ρ ‖u_ρ‖₂² ≤ L·θ₀ ("(eq:Enormsum) gives ‖E‖ ≤ 4A₀C₁²X^{1/2} L log(4T) D₀⁻² = Lθ₀"). -/ lemma partial_sum_le (u : Finset {ρ : Z.carrier // ρ ∉ H.sA}) : @@ -396,7 +392,7 @@ lemma Az_eq_sum (k l : Fin (P.d T)) : · rintro ⟨hy, h1, h2⟩ refine ⟨⟨y, hy⟩, ?_, rfl⟩ rw [sA, Set.Finite.mem_toFinset] - simp only [Set.mem_setOf_eq, InTail, not_or, not_le, not_lt] + simp only [Set.mem_ofPred_eq, InTail, not_or, not_le, not_lt] exact ⟨h1, h2⟩ rw [← hmap, Finset.sum_map] rfl @@ -673,6 +669,29 @@ theorem eventually_theta0_le (P : Params) (hP : P.Valid) {A₀ R : ℝ} (hA₀ : filter_upwards [eventually_ge_atTop T₀, hC₁R] with T hT hR exact theta0_le P hP hT (by linarith) (hC₁ T) hR +/-- **Unified tail package** for any `T`-dependent parameter family `Q : ℝ → Params` sharing `P.L`: +bundles `TailInputs Z (Q T) T (θ₀ T)` and `θ₀ T ≤ C · l T · T^{λ/2−1}` eventually. -/ +theorem eventually_tailPackage_of (Z : ZeroConfig) {P : Params} (hP : P.Valid) + (Q : ℝ → Params) (hQL : ∀ T, (Q T).L T = P.L T) + {A₀ R : ℝ} (hA₀ : 1 ≤ A₀) + (hloc : ∀ t : ℝ, (Z.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) + (C₁ : ℝ → ℝ) (hC₁ : ∀ T, 0 ≤ C₁ T) (hC₁R : ∀ᶠ T in atTop, C₁ T ≤ 2 * R) + (hdecay : ∀ᶠ T in atTop, ∀ (r y : ℝ), |y| ≤ 1 / 2 → (r : ℂ) - I * y ≠ 0 → + ‖(Q T).phiHat T (r - I * y)‖ ≤ Real.exp ((Q T).L T / 4) * C₁ T / ‖(r : ℂ) - I * y‖ ^ 2) + (ha : ∀ᶠ T in atTop, 0 < (Q T).a T) + (hconj : ∀ᶠ T in atTop, ∀ z : ℂ, + (Q T).phiHat T ((starRingEnd ℂ) z) = (starRingEnd ℂ) ((Q T).phiHat T z)) : + ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z (Q T) T (θ₀ T)) ∧ + ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := by + refine ⟨fun T => theta0 A₀ (Real.exp (P.L T / 4) * C₁ T) T, ?_, + eventually_theta0_le P hP hA₀ C₁ hC₁ hC₁R⟩ + have hL2 : ∀ᶠ T in atTop, 2 ≤ P.L T := (tendsto_L_atTop P hP).eventually_ge_atTop 2 + filter_upwards [eventually_ge_atTop T₀, hL2, hdecay, ha, hconj] with T hT hL hd ha' hc + have HT : TailHyp Z (Q T) T A₀ (C₁ T) := + { hT := hT, hL := (hQL T).symm ▸ hL, hA₀ := hA₀, hloc := hloc, hC₁ := hC₁ T, hdecay := hd } + rw [← hQL T] + exact HT.tailInputs ha' hc + /-- **N(I'∖I) ≪ D₀ l, eventually**: ∃ C, eventually N(I'∖I) ≤ C·√T·l(T) (C = 6A₀). -/ theorem eventually_NII_le (Z : ZeroConfig) {A₀ : ℝ} (hA₀ : 1 ≤ A₀) (hloc : ∀ t : ℝ, (Z.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) : diff --git a/zeta23/Zeta23/Tail/Basic.lean b/zeta23/Zeta23/Tail/Basic.lean index ef90f43b62..933f26e65e 100644 --- a/zeta23/Zeta23/Tail/Basic.lean +++ b/zeta23/Zeta23/Tail/Basic.lean @@ -17,8 +17,6 @@ namespace Tail [prop:tail]); equals 0 for γ ∈ I, T − γ for γ < T, γ − 2T for γ > 2T. -/ def distI (T γ : ℝ) : ℝ := max 0 (max (T - γ) (γ - 2 * T)) -lemma distI_nonneg (T γ : ℝ) : 0 ≤ distI T γ := le_max_left _ _ - lemma distI_of_le {T γ : ℝ} (hT : 0 ≤ T) (h : γ ≤ T) : distI T γ = T - γ := by unfold distI have h1 : max (T - γ) (γ - 2 * T) = T - γ := max_eq_left (by linarith) @@ -35,10 +33,6 @@ lemma distI_of_ge {T γ : ℝ} (hT : 0 ≤ T) (h : 2 * T ≤ γ) : distI T γ = zeros with γ ≤ 0.) -/ def InTail (T γ : ℝ) : Prop := γ ≤ T - Real.sqrt T ∨ 2 * T + Real.sqrt T < γ -lemma InTail_iff_not_mem_Ioc (T γ : ℝ) : - InTail T γ ↔ γ ∉ Set.Ioc (T - Real.sqrt T) (2 * T + Real.sqrt T) := by - simp only [InTail, Set.mem_Ioc, not_and_or, not_lt, not_le] - lemma sqrt_le_distI_of_InTail {T γ : ℝ} (hT : 0 ≤ T) (h : InTail T γ) : Real.sqrt T ≤ distI T γ := by have hs := Real.sqrt_nonneg T @@ -71,5 +65,73 @@ structure LocalCount {ι : Type*} (γ : ι → ℝ) (m : ι → ℕ) (A₀ : ℝ lemma LocalCount.A₀_pos {ι : Type*} {γ : ι → ℝ} {m : ι → ℕ} {A₀ : ℝ} (h : LocalCount γ m A₀) : 0 < A₀ := lt_of_lt_of_le one_pos h.one_le +/-- Elementary telescoping step for `p ≥ 1`, `a > 0`, `h > 0`: +`h · (a + h)^{-(p+1)} ≤ (a^{-p} − (a + h)^{-p}) / p`. -/ +lemma inv_pow_step {p : ℕ} (hp : 1 ≤ p) {a h : ℝ} (ha : 0 < a) (hh : 0 < h) : + h * ((a + h) ^ (p + 1))⁻¹ ≤ ((a ^ p)⁻¹ - ((a + h) ^ p)⁻¹) / p := by + have hah : 0 < a + h := by linarith + have hgeom : (p : ℝ) * h * a ^ (p - 1) ≤ (a + h) ^ p - a ^ p := by + induction p with + | zero => omega + | succ q ih => + cases q with + | zero => simp + | succ k => + have ih' := ih (by omega) + simp only [Nat.add_sub_cancel] at ih' ⊢ + have h1 : a ^ (k + 1) ≤ (a + h) ^ (k + 1) := pow_le_pow_left₀ ha.le (by linarith) _ + calc ((k + 1 + 1 : ℕ) : ℝ) * h * a ^ (k + 1) + = a * (((k + 1 : ℕ) : ℝ) * h * a ^ k) + h * a ^ (k + 1) := by + rw [pow_succ' a k]; push_cast; ring + _ ≤ a * ((a + h) ^ (k + 1) - a ^ (k + 1)) + h * (a + h) ^ (k + 1) := by gcongr + _ = (a + h) ^ (k + 1 + 1) - a ^ (k + 1 + 1) := by + rw [pow_succ' (a + h) (k + 1), pow_succ' a (k + 1)]; ring + have hp0 : (0 : ℝ) < p := by exact_mod_cast hp + have hnum : (p : ℝ) * h * a ^ p ≤ (a + h) * ((a + h) ^ p - a ^ p) := by + calc (p : ℝ) * h * a ^ p = a * ((p : ℝ) * h * a ^ (p - 1)) := by + rw [show a ^ p = a * a ^ (p - 1) by rw [← pow_succ', Nat.sub_add_cancel hp]]; ring + _ ≤ (a + h) * ((a + h) ^ p - a ^ p) := mul_le_mul (by linarith) hgeom (by positivity) hah.le + rw [le_div_iff₀ hp0, inv_sub_inv (by positivity) (by positivity), + show h * ((a + h) ^ (p + 1))⁻¹ * p = p * h / (a + h) ^ (p + 1) by ring, + div_le_div_iff₀ (by positivity) (by positivity)] + calc p * h * (a ^ p * (a + h) ^ p) = (p * h * a ^ p) * (a + h) ^ p := by ring + _ ≤ ((a + h) * ((a + h) ^ p - a ^ p)) * (a + h) ^ p := by gcongr + _ = ((a + h) ^ p - a ^ p) * (a + h) ^ (p + 1) := by rw [pow_succ']; ring + +/-- Telescoped inverse-power sum: for `p ≥ 1`, `D > 0`, `h > 0`, +`∑_{k ≤ d} (D + k h)^{-(p+1)} ≤ D^{-(p+1)} + (D^{-p} − (D + d h)^{-p}) / (p h)`. -/ +lemma sum_inv_affine_pow_le_telescope {p : ℕ} (hp : 1 ≤ p) {D h : ℝ} (hD : 0 < D) (hh : 0 < h) (d : ℕ) : + ∑ k ∈ Finset.range (d + 1), ((D + k * h) ^ (p + 1))⁻¹ + ≤ (D ^ (p + 1))⁻¹ + ((D ^ p)⁻¹ - ((D + d * h) ^ p)⁻¹) / (p * h) := by + induction d with + | zero => simp + | succ d ih => + rw [Finset.sum_range_succ] + have hp0 : (0 : ℝ) < p := by exact_mod_cast hp + have hstep := inv_pow_step hp (a := D + d * h) (h := h) (by positivity) hh + have hstep' : ((D + ((d + 1 : ℕ) : ℝ) * h) ^ (p + 1))⁻¹ + ≤ (((D + d * h) ^ p)⁻¹ - ((D + ((d + 1 : ℕ) : ℝ) * h) ^ p)⁻¹) / (p * h) := by + have e : D + ((d + 1 : ℕ) : ℝ) * h = D + d * h + h := by push_cast; ring + rw [e, le_div_iff₀ (by positivity)] + calc ((D + d * h + h) ^ (p + 1))⁻¹ * (p * h) = p * (h * ((D + d * h + h) ^ (p + 1))⁻¹) := by ring + _ ≤ p * ((((D + d * h) ^ p)⁻¹ - ((D + d * h + h) ^ p)⁻¹) / p) := mul_le_mul_of_nonneg_left hstep hp0.le + _ = _ := by field_simp + linarith [add_le_add ih hstep', show ((D ^ p)⁻¹ - ((D + d * h) ^ p)⁻¹) / (p * h) + + (((D + d * h) ^ p)⁻¹ - ((D + ((d + 1 : ℕ) : ℝ) * h) ^ p)⁻¹) / (p * h) + = ((D ^ p)⁻¹ - ((D + ((d + 1 : ℕ) : ℝ) * h) ^ p)⁻¹) / (p * h) by ring] + +/-- Unified inverse-power telescoping sum: for `p ≥ 1`, `D > 0`, `h > 0`, +`∑_{k < d} (D + k h)^{-(p+1)} ≤ D^{-(p+1)} + D^{-p} / (p h)`. -/ +lemma sum_inv_affine_pow_le {p : ℕ} (hp : 1 ≤ p) {D h : ℝ} (hD : 0 < D) (hh : 0 < h) (d : ℕ) : + ∑ k ∈ Finset.range d, ((D + k * h) ^ (p + 1))⁻¹ ≤ (D ^ (p + 1))⁻¹ + (D ^ p)⁻¹ / (p * h) := by + cases d with + | zero => simp; positivity + | succ d => + refine (sum_inv_affine_pow_le_telescope hp hD hh d).trans ?_ + have hp0 : (0 : ℝ) < p := by exact_mod_cast hp + have : 0 ≤ ((D + d * h) ^ p)⁻¹ / (p * h) := by positivity + linarith [show ((D ^ p)⁻¹ - ((D + d * h) ^ p)⁻¹) / (p * h) + = (D ^ p)⁻¹ / (p * h) - ((D + d * h) ^ p)⁻¹ / (p * h) by ring] + end Tail end Zeta23 diff --git a/zeta23/Zeta23/Tail/Count.lean b/zeta23/Zeta23/Tail/Count.lean index 3b99215577..18ceacf4cc 100644 --- a/zeta23/Zeta23/Tail/Count.lean +++ b/zeta23/Zeta23/Tail/Count.lean @@ -36,68 +36,17 @@ open Finset Real namespace Zeta23 namespace Tail -/-! #### Telescoping sums replacing ∫ x⁻³ and ∫ x⁻² -/ - -lemma inv_pow_three_step {a : ℝ} (ha : 0 < a) : - ((a + 1) ^ 3)⁻¹ ≤ ((a ^ 2)⁻¹ - ((a + 1) ^ 2)⁻¹) / 2 := by - rw [← sub_nonneg] - have key : ((a ^ 2)⁻¹ - ((a + 1) ^ 2)⁻¹) / 2 - ((a + 1) ^ 3)⁻¹ - = (3 * a + 1) / (2 * a ^ 2 * (a + 1) ^ 3) := by - field_simp; ring - rw [key]; positivity - -lemma inv_pow_two_step {a : ℝ} (ha : 0 < a) : - ((a + 1) ^ 2)⁻¹ ≤ a⁻¹ - (a + 1)⁻¹ := by - rw [← sub_nonneg] - have key : a⁻¹ - (a + 1)⁻¹ - ((a + 1) ^ 2)⁻¹ = 1 / (a * (a + 1) ^ 2) := by - field_simp; ring - rw [key]; positivity - -lemma sum_inv_pow_three_le_telescope {D : ℝ} (hD : 0 < D) (n : ℕ) : - ∑ i ∈ range (n + 1), ((D + i) ^ 3)⁻¹ ≤ (D ^ 3)⁻¹ + ((D ^ 2)⁻¹ - ((D + n) ^ 2)⁻¹) / 2 := by - induction n with - | zero => simp - | succ n ih => - rw [sum_range_succ] - have hstep := inv_pow_three_step (a := D + n) (by positivity) - have e : (D + ((n + 1 : ℕ) : ℝ)) = D + n + 1 := by push_cast; ring - rw [e] - calc _ ≤ (D ^ 3)⁻¹ + ((D ^ 2)⁻¹ - ((D + n) ^ 2)⁻¹) / 2 - + (((D + n) ^ 2)⁻¹ - ((D + n + 1) ^ 2)⁻¹) / 2 := add_le_add ih hstep - _ = _ := by ring - -lemma sum_inv_pow_two_le_telescope {D : ℝ} (hD : 0 < D) (n : ℕ) : - ∑ i ∈ range (n + 1), ((D + i) ^ 2)⁻¹ ≤ (D ^ 2)⁻¹ + (D⁻¹ - (D + n)⁻¹) := by - induction n with - | zero => simp - | succ n ih => - rw [sum_range_succ] - have hstep := inv_pow_two_step (a := D + n) (by positivity) - have e : (D + ((n + 1 : ℕ) : ℝ)) = D + n + 1 := by push_cast; ring - rw [e] - calc _ ≤ (D ^ 2)⁻¹ + (D⁻¹ - (D + n)⁻¹) + ((D + n)⁻¹ - (D + n + 1)⁻¹) := - add_le_add ih hstep - _ = _ := by ring +/-! #### Telescoping sums replacing ∫ x⁻³ and ∫ x⁻² (via `Tail.sum_inv_affine_pow_le`) -/ /-- ∑_{i 0 (any n). -/ lemma sum_inv_pow_three_le {D : ℝ} (hD : 0 < D) (n : ℕ) : ∑ i ∈ range n, ((D + i) ^ 3)⁻¹ ≤ (D ^ 3)⁻¹ + (D ^ 2)⁻¹ / 2 := by - cases n with - | zero => simp only [range_zero, sum_empty]; positivity - | succ n => - refine (sum_inv_pow_three_le_telescope hD n).trans ?_ - have : 0 ≤ ((D + n) ^ 2)⁻¹ := by positivity - linarith + simpa using sum_inv_affine_pow_le (p := 2) (by norm_num) hD one_pos n /-- ∑_{i 0 (any n). -/ lemma sum_inv_pow_two_le {D : ℝ} (hD : 0 < D) (n : ℕ) : ∑ i ∈ range n, ((D + i) ^ 2)⁻¹ ≤ (D ^ 2)⁻¹ + D⁻¹ := by - cases n with - | zero => simp only [range_zero, sum_empty]; positivity - | succ n => - refine (sum_inv_pow_two_le_telescope hD n).trans ?_ - have : 0 ≤ (D + n)⁻¹ := by positivity - linarith + simpa using sum_inv_affine_pow_le (p := 1) le_rfl hD one_pos n /-- log(B + j) ≤ log B + j/B. -/ lemma log_add_le_log_add_div {B j : ℝ} (hB : 0 < B) (hj : 0 ≤ j) : diff --git a/zeta23/Zeta23/Tail/Grid.lean b/zeta23/Zeta23/Tail/Grid.lean index d615377840..790ea67fae 100644 --- a/zeta23/Zeta23/Tail/Grid.lean +++ b/zeta23/Zeta23/Tail/Grid.lean @@ -25,51 +25,10 @@ open Finset Real namespace Zeta23 namespace Tail -/-- Telescoping replacement for ∫ x⁻⁴: for a > 0, h > 0, h·(a+h)⁻⁴ ≤ (a⁻³ − (a+h)⁻³)/3. -/ -lemma inv_pow_four_step {a h : ℝ} (ha : 0 < a) (hh : 0 < h) : - h * ((a + h) ^ 4)⁻¹ ≤ ((a ^ 3)⁻¹ - ((a + h) ^ 3)⁻¹) / 3 := by - have hah : 0 < a + h := by linarith - rw [← sub_nonneg] - have key : ((a ^ 3)⁻¹ - ((a + h) ^ 3)⁻¹) / 3 - h * ((a + h) ^ 4)⁻¹ - = (6 * a ^ 2 * h ^ 2 + 4 * a * h ^ 3 + h ^ 4) / (3 * a ^ 3 * (a + h) ^ 4) := by - field_simp - ring - rw [key] - positivity - -/-- Telescoped form: ∑_{k ≤ d} (D + k h)⁻⁴ ≤ D⁻⁴ + (D⁻³ − (D + d h)⁻³)/(3h). -/ -lemma sum_inv_pow_four_le_telescope {D h : ℝ} (hD : 0 < D) (hh : 0 < h) (d : ℕ) : - ∑ k ∈ range (d + 1), ((D + k * h) ^ 4)⁻¹ - ≤ (D ^ 4)⁻¹ + ((D ^ 3)⁻¹ - ((D + d * h) ^ 3)⁻¹) / (3 * h) := by - induction d with - | zero => simp - | succ d ih => - rw [sum_range_succ] - have hstep := inv_pow_four_step (a := D + d * h) (h := h) (by positivity) hh - have hstep' : ((D + ((d + 1 : ℕ) : ℝ) * h) ^ 4)⁻¹ - ≤ (((D + d * h) ^ 3)⁻¹ - ((D + ((d + 1 : ℕ) : ℝ) * h) ^ 3)⁻¹) / (3 * h) := by - have e : D + ((d + 1 : ℕ) : ℝ) * h = D + d * h + h := by push_cast; ring - rw [e, le_div_iff₀ (by positivity)] - calc ((D + d * h + h) ^ 4)⁻¹ * (3 * h) = 3 * (h * ((D + d * h + h) ^ 4)⁻¹) := by ring - _ ≤ 3 * ((((D + d * h) ^ 3)⁻¹ - ((D + d * h + h) ^ 3)⁻¹) / 3) := - mul_le_mul_of_nonneg_left hstep (by norm_num) - _ = _ := by ring - calc _ ≤ (D ^ 4)⁻¹ + ((D ^ 3)⁻¹ - ((D + d * h) ^ 3)⁻¹) / (3 * h) - + (((D + d * h) ^ 3)⁻¹ - ((D + ((d + 1 : ℕ) : ℝ) * h) ^ 3)⁻¹) / (3 * h) := - add_le_add ih hstep' - _ = _ := by ring - -/-- ∑_{k 0 (any d). -/ +/-- ∑_{k 0 (any d), via `Tail.sum_inv_affine_pow_le`. -/ lemma sum_inv_pow_four_le {D h : ℝ} (hD : 0 < D) (hh : 0 < h) (d : ℕ) : ∑ k ∈ range d, ((D + k * h) ^ 4)⁻¹ ≤ (D ^ 4)⁻¹ + (D ^ 3)⁻¹ / (3 * h) := by - cases d with - | zero => simp only [range_zero, sum_empty]; positivity - | succ d => - refine (sum_inv_pow_four_le_telescope hD hh d).trans ?_ - have : 0 ≤ ((D + d * h) ^ 3)⁻¹ / (3 * h) := by positivity - calc (D ^ 4)⁻¹ + ((D ^ 3)⁻¹ - ((D + d * h) ^ 3)⁻¹) / (3 * h) - = (D ^ 4)⁻¹ + (D ^ 3)⁻¹ / (3 * h) - ((D + d * h) ^ 3)⁻¹ / (3 * h) := by ring - _ ≤ _ := by linarith + simpa using sum_inv_affine_pow_le (p := 3) (by norm_num) hD hh d /-- From D⁻⁴ + D⁻³/(3h), h = 2π/L, to L·D⁻³ "(as D ≥ 1, L ≥ 2)". -/ lemma grid_const_bound {D L : ℝ} (hD : 1 ≤ D) (hL : 2 ≤ L) : diff --git a/zeta23/Zeta23/Tail/Package.lean b/zeta23/Zeta23/Tail/Package.lean index 2d01ee7d83..2b3ff1806d 100644 --- a/zeta23/Zeta23/Tail/Package.lean +++ b/zeta23/Zeta23/Tail/Package.lean @@ -28,15 +28,16 @@ namespace Tail lemma C1_nonneg (P : Params) (T : ℝ) : 0 ≤ P.C1 T := MeasureTheory.integral_nonneg fun _ => abs_nonneg _ -/-- **[prop:tail] package for Main.lean**: for an abstract zero configuration Z satisfying the -paper's inputs and valid parameters P, there is θ₀ : ℝ → ℝ (namely -θ₀(T) = 4A₀C₁²X^{1/2}log(4T)/D₀² = theta0 A₀ (e^{L/4}·C₁) T) such that eventually in T -Assembly.TailInputs Z P T (θ₀ T) holds ("‖Ẽ‖ ≤ θ₀", "‖Ê‖₁ ≤ θ₀/(aL)"), and -θ₀(T) ≤ C · l(T) · T^{λ/2−1} eventually ("θ₀ ≤ 32A₀‖ϱ″‖₁² l T^{λ/2−1}"). -/ -theorem eventually_tailPackage (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) : +/-- **[prop:tail] package from the local zero count alone**: for an abstract zero configuration Z +with the two-sided local count `N(t,t+1] ≤ A₀ log(|t|+3)` and valid parameters P, there is +`θ₀ : ℝ → ℝ` (namely `theta0 A₀ (e^{L/4}·C₁) T`) such that eventually in T `TailInputs Z P T (θ₀ T)` +holds and `θ₀(T) ≤ C · l(T) · T^{λ/2−1}` eventually. -/ +theorem eventually_tailPackage_of_rvm (Z : ZeroConfig) + (hloc : ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ t : ℝ, (Z.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) + (P : Params) (hP : P.Valid) : ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z P T (θ₀ T)) ∧ ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := by - obtain ⟨A₀, hA₀, hloc⟩ := H.RvM.local_count + obtain ⟨A₀, hA₀, hloc⟩ := hloc have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := (tendsto_L_atTop P hP).eventually_ge_atTop _ refine ⟨fun T => theta0 A₀ (Real.exp (P.L T / 4) * P.C1 T) T, ?_, ?_⟩ · refine eventually_tailInputs Z P hP hA₀ hloc (fun T => P.C1 T) (fun T => C1_nonneg P T) @@ -49,5 +50,15 @@ theorem eventually_tailPackage (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) · exact eventually_theta0_le P hP hA₀ (fun T => P.C1 T) (fun T => C1_nonneg P T) (hwL.mono fun T hwL => Params.C1_le hP hwL) +/-- **[prop:tail] package for Main.lean**: for an abstract zero configuration Z satisfying the +paper's inputs and valid parameters P, there is θ₀ : ℝ → ℝ (namely +θ₀(T) = 4A₀C₁²X^{1/2}log(4T)/D₀² = theta0 A₀ (e^{L/4}·C₁) T) such that eventually in T +Assembly.TailInputs Z P T (θ₀ T) holds ("‖Ẽ‖ ≤ θ₀", "‖Ê‖₁ ≤ θ₀/(aL)"), and +θ₀(T) ≤ C · l(T) · T^{λ/2−1} eventually ("θ₀ ≤ 32A₀‖ϱ″‖₁² l T^{λ/2−1}"). -/ +theorem eventually_tailPackage (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) : + ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z P T (θ₀ T)) ∧ + ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := + eventually_tailPackage_of_rvm Z H.RvM.local_count P hP + end Tail end Zeta23 diff --git a/zeta23/Zeta23/Tail/RankOne.lean b/zeta23/Zeta23/Tail/RankOne.lean index dd65943f87..870cf41854 100644 --- a/zeta23/Zeta23/Tail/RankOne.lean +++ b/zeta23/Zeta23/Tail/RankOne.lean @@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0 Zeta23/Tail/RankOne.lean — the linear-algebra step of [prop:tail] (the paper §4.2): eigenvalue bounds for a (possibly infinite) sum of rank-one matrices m_ρ u_ρ u_ρᵀ. - Paper, verbatim (proof of [prop:tail]): "Since E = ∑_{γ∉I'} m_ρ u_ρ u_ρᵀ and ‖uuᵀ‖ = ‖u‖₂², ‖E‖ ≤ ∑_{γ∉I'} m_ρ ‖u_ρ‖₂² [eq:Enormsum]" … "The trace-norm bound follows from the same chain, since ‖uuᵀ‖₁ = ‖u‖₂² as well". @@ -43,10 +42,6 @@ for Hermitian E). Paper: "the trace norm ‖Ê‖₁" in [prop:tail]; consumed i [prop:zeroside-rank] via |tr Ê| ≤ ‖Ê‖₁ and ‖Ê‖_F ≤ ‖Ê‖₁ (both proved below). -/ def traceNorm {E : Matrix n n ℂ} (hE : E.IsHermitian) : ℝ := ∑ i, |hE.eigenvalues i| -omit [DecidableEq n] in -lemma traceNorm_def [DecidableEq n] {E : Matrix n n ℂ} (hE : E.IsHermitian) : - traceNorm hE = ∑ i, |hE.eigenvalues i| := rfl - lemma traceNorm_nonneg {E : Matrix n n ℂ} (hE : E.IsHermitian) : 0 ≤ traceNorm hE := sum_nonneg fun _ _ => abs_nonneg _ @@ -163,16 +158,5 @@ theorem traceNorm_le_of_hasSum_vecMulVec {ι : Type*} {E : Matrix n n ℂ} _ = ∑' ρ, c ρ * ∑ k, ‖u ρ k‖ ^ 2 := tsum_congr hF_sum _ = S := hS.tsum_eq -/-- **[eq:Enormsum], operator-norm form** (the shape RHLinalg.weyl_posIndexAbove_le wants): -under the same hypotheses every eigenvalue satisfies |λᵢ(E)| ≤ S, i.e. ‖E‖ ≤ S. -Paper: "‖E‖ ≤ ∑_{γ∉I'} m_ρ ‖u_ρ‖₂²". -/ -theorem abs_eigenvalues_le_of_hasSum_vecMulVec {ι : Type*} {E : Matrix n n ℂ} - (hE : E.IsHermitian) (c : ι → ℝ) (hc : ∀ ρ, 0 ≤ c ρ) (u : ι → n → ℂ) {S : ℝ} - (hS : HasSum (fun ρ => c ρ * ∑ k, ‖u ρ k‖ ^ 2) S) - (hEsum : HasSum (fun ρ => ((c ρ : ℝ) : ℂ) • vecMulVec (u ρ) (u ρ)) E) (i : n) : - |hE.eigenvalues i| ≤ S := - (abs_eigenvalues_le_traceNorm hE i).trans - (traceNorm_le_of_hasSum_vecMulVec hE c hc u hS hEsum) - end Tail end Zeta23 diff --git a/zeta23/Zeta23/Taper.lean b/zeta23/Zeta23/Taper.lean index b7dd4ff5b0..b44e2e3464 100644 --- a/zeta23/Zeta23/Taper.lean +++ b/zeta23/Zeta23/Taper.lean @@ -50,8 +50,6 @@ theorem phiHatR_even (r : ℝ) : P.phiHatR T (-r) = P.phiHatR T r := Taper.phiHa theorem PhiR_even (r : ℝ) : P.PhiR T (-r) = P.PhiR T r := Taper.PhiR_even r theorem Aphi_even (y : ℝ) : P.Aphi T (-y) = P.Aphi T y := Taper.Aphi_even y theorem g_even (y : ℝ) : P.g T (-y) = P.g T y := Taper.g_even y -theorem psi'_even (r : ℝ) : P.psi' T (-r) = P.psi' T r := Taper.psi_even r - section variable (hP : P.Valid) (hwL : 8 * P.w ≤ P.L T) include hP hwL @@ -146,25 +144,15 @@ theorem abs_phiHatR_le_psi' (r : ℝ) : |P.phiHatR T r| ≤ P.psi' T r := Taper.abs_phiHatR_le_psi hP.taper hP.one_le_w (two_w_le hwL hP) r theorem abs_PhiR_le_psi' (r : ℝ) : |P.PhiR T r| ≤ P.psi' T r := Taper.abs_PhiR_le_psi hP.taper hP.one_le_w (two_w_le hwL hP) r -theorem psi'_nonneg (r : ℝ) : 0 ≤ P.psi' T r := - Taper.psi_nonneg hP.taper hP.one_le_w (two_w_le hwL hP) r - /-! #### [eq:psiints] -/ theorem integral_psi'_Ioi_le : ∫ r in Ioi 0, P.psi' T r ≤ 4 + 2 * Real.log (P.crho * P.L T / (4 * P.w)) := Taper.integral_psi_Ioi_le hP.taper hP.one_le_w hwL -theorem integral_psi'_sq_mul_abs_le : - ∫ r, P.psi' T r ^ 2 * |r| ≤ 8 + 8 * Real.log (P.crho * P.L T / (4 * P.w)) := - Taper.integral_psi_sq_mul_abs_le hP.taper hP.one_le_w hwL theorem integral_psi'_sq_le : ∫ r, P.psi' T r ^ 2 ≤ 8 * P.L T := Taper.integral_psi_sq_le hP.taper hP.one_le_w hwL theorem psi'_integrable : Integrable (P.psi' T) := Taper.psi_integrable hP.taper hP.one_le_w hwL theorem psi'_sq_integrable : Integrable (fun r => P.psi' T r ^ 2) := Taper.psi_sq_integrable hP.taper hP.one_le_w hwL -theorem psi'_sq_mul_abs_integrable : Integrable (fun r => P.psi' T r ^ 2 * |r|) := - Taper.psi_sq_mul_abs_integrable hP.taper hP.one_le_w hwL - - end end Params diff --git a/zeta23/Zeta23/Taper/Basic.lean b/zeta23/Zeta23/Taper/Basic.lean index 46c2dd65ed..78068e6274 100644 --- a/zeta23/Zeta23/Taper/Basic.lean +++ b/zeta23/Zeta23/Taper/Basic.lean @@ -18,7 +18,6 @@ Sub-file map (umbrella = Zeta23/Taper.lean): Zeta23/Taper.lean — umbrella + the consumer-facing `Params` layer -/ import Mathlib.Analysis.SpecialFunctions.SmoothTransition -import Zeta23.Defs import Zeta23.Poisson.PaperFT open Complex MeasureTheory Real Set Filter Topology @@ -57,13 +56,6 @@ noncomputable def cRho (ϱ : ℝ → ℝ) : ℝ := theorem cRho_eq (ϱ : ℝ → ℝ) : cRho ϱ = 4 * supDeriv ϱ + 4 * l1Deriv2 ϱ := rfl -/-- A concrete admissible profile, witnessing that `TaperProfile` is inhabited: Mathlib's -`Real.smoothTransition` (C^∞, monotone, `0` on `(−∞,0]`, `1` on `[1,∞)`). Not used by the -paper, which fixes an arbitrary ϱ. (A polynomial C³ smoothstep `x⁴(35 − 84x + 70x² − 20x³)` -would make the constants `‖ϱ'‖_∞ = 35/16`, `‖ϱ''‖₁ = 35/8` numeric; nothing downstream needs -numeric values, so the library function is used.) -/ -noncomputable def smoothstep (x : ℝ) : ℝ := Real.smoothTransition x - /-! ### The taper φ [eq:phidef], a, b [eq:abdef], Φ, g, A_φ [eq:PhigA], ψ [eq:psidef] -/ variable (ϱ : ℝ → ℝ) (L w : ℝ) @@ -177,7 +169,6 @@ theorem phi_integrable (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) end Basic - /-- `C₁ := ‖φ''‖₁` [prop:tail]. -/ noncomputable def C1 (ϱ : ℝ → ℝ) (L w : ℝ) : ℝ := ∫ u, |deriv (deriv (phi ϱ L w)) u| diff --git a/zeta23/Zeta23/Taper/Decay.lean b/zeta23/Zeta23/Taper/Decay.lean index 67c96e7c35..8fb906f98e 100644 --- a/zeta23/Zeta23/Taper/Decay.lean +++ b/zeta23/Zeta23/Taper/Decay.lean @@ -14,6 +14,7 @@ each lemma carries the minimal hypothesis it needs. import Mathlib import Zeta23.Taper.Norms import Zeta23.Taper.Strip +import Zeta23.Taper.PsiC open Complex MeasureTheory Real Set Filter Topology open scoped FourierTransform @@ -386,152 +387,27 @@ theorem abs_PhiR_le_psi (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ (abs_PhiR_mul_abs_le hϱ (by linarith) hwL) (abs_PhiR_mul_sq_le hϱ hw hwL) r theorem psi_nonneg (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) (r : ℝ) : - 0 ≤ psi ϱ L w r := by - have hL : 0 ≤ L := by linarith - have hc : 0 ≤ cRho ϱ := le_trans (by norm_num) (four_le_cRho hϱ) - unfold psi - split_ifs with hr - · exact hL - · exact le_min hL (le_min (by positivity) (by positivity)) + 0 ≤ psi ϱ L w r := PsiC.psi_nonneg (four_le_cRho hϱ) hw hwL r -theorem psi_even (r : ℝ) : psi ϱ L w (-r) = psi ϱ L w r := by - simp [psi] +theorem psi_even (r : ℝ) : psi ϱ L w (-r) = psi ϱ L w r := PsiC.psi_even r -theorem psi_le_L (_hϱ : TaperProfile ϱ) (_hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : - psi ϱ L w r ≤ L := by - unfold psi - split_ifs with hr - · exact le_rfl - · exact min_le_left _ _ +theorem psi_le_L (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) (r : ℝ) : + psi ϱ L w r ≤ L := PsiC.psi_le_L (four_le_cRho hϱ) hw hwL r -theorem psi_mul_abs_le (_hϱ : TaperProfile ϱ) (_hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : - psi ϱ L w r * |r| ≤ 2 := by - unfold psi - split_ifs with hr - · simp [hr] - · have hra : 0 < |r| := abs_pos.mpr hr - rw [← le_div_iff₀ hra] - exact (min_le_right _ _).trans (min_le_left _ _) +theorem psi_mul_abs_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) (r : ℝ) : + psi ϱ L w r * |r| ≤ 2 := PsiC.psi_mul_abs_le (four_le_cRho hϱ) hw hwL r -theorem psi_mul_sq_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : - psi ϱ L w r * r ^ 2 ≤ cRho ϱ / w := by - have hw0 : 0 < w := by linarith - have hc : 0 ≤ cRho ϱ := le_trans (by norm_num) (four_le_cRho hϱ) - unfold psi - split_ifs with hr - · simp [hr]; positivity - · have hr2 : 0 < r ^ 2 := by positivity - rw [← le_div_iff₀ hr2, div_div, mul_comm] - exact (min_le_right _ _).trans (min_le_right _ _) +theorem psi_mul_sq_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) (r : ℝ) : + psi ϱ L w r * r ^ 2 ≤ cRho ϱ / w := PsiC.psi_mul_sq_le (four_le_cRho hϱ) hw hwL r -/-! #### Measurability / integrability of ψ -/ +theorem psi_abs (r : ℝ) : psi ϱ L w |r| = psi ϱ L w r := PsiC.psi_abs r -theorem psi_abs (r : ℝ) : psi ϱ L w |r| = psi ϱ L w r := by - unfold psi - simp only [abs_eq_zero, abs_abs, sq_abs] - -theorem psi_measurable : Measurable (psi ϱ L w) := by - have h1 : Measurable (fun r : ℝ => min L (min (2 / |r|) (cRho ϱ / (w * r ^ 2)))) := - measurable_const.min ((measurable_const.div continuous_abs.measurable).min - (measurable_const.div (measurable_const.mul (measurable_id.pow_const 2)))) - have : psi ϱ L w = Set.piecewise {(0:ℝ)} (fun _ => L) (fun r => min L (min (2 / |r|) (cRho ϱ / (w * r ^ 2)))) := by - funext r - unfold psi - by_cases hr : r = 0 - · rw [if_pos hr, Set.piecewise_eq_of_mem _ _ _ (by simp [hr])] - · rw [if_neg hr, Set.piecewise_eq_of_notMem _ _ _ (by simp [hr])] - rw [this] - exact Measurable.piecewise (measurableSet_singleton 0) measurable_const h1 +theorem psi_measurable : Measurable (psi ϱ L w) := PsiC.psi_measurable -/-- For r > 0: ψ(r) ≤ (c_ϱ/w) · r^{−2} (rpow form). -/ theorem psi_le_rpow_neg_two (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) {r : ℝ} - (hr : 0 < r) : psi ϱ L w r ≤ cRho ϱ / w * r ^ (-2:ℝ) := by - have h := psi_mul_sq_le hϱ hw hwL r - rw [Real.rpow_neg hr.le, show (2:ℝ) = ((2:ℕ):ℝ) by norm_num, Real.rpow_natCast, - ← div_eq_mul_inv, le_div_iff₀ (by positivity)] - exact h + (hr : 0 < r) : psi ϱ L w r ≤ cRho ϱ / w * r ^ (-2:ℝ) := + PsiC.psi_le_rpow_neg_two (four_le_cRho hϱ) hw hwL hr -/-- The common integrable plateau majorant: `a` on [−1,1] and `b·|r|⁻²` outside (ψ: a = L, b = c_ϱ/w; -r²-moments: a = 4, b = C²). ∫ = 2a + 2b. -/ -private noncomputable def plateauMaj (a b : ℝ) (r : ℝ) : ℝ := - (Icc (-1:ℝ) 1).indicator (fun _ => a) r - + b * ((Ioi (1:ℝ)).indicator (fun x => x ^ (-2:ℝ)) r + (Ioi (1:ℝ)).indicator (fun x => x ^ (-2:ℝ)) (-r)) - -private theorem tail_indicator_integrable : - Integrable ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ))) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) one_pos).integrable_indicator measurableSet_Ioi - -private theorem plateauMaj_integrable (a b : ℝ) : Integrable (plateauMaj a b) := - ((integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp))).add - ((tail_indicator_integrable.add tail_indicator_integrable.comp_neg).const_mul _) - -private theorem integral_plateauMaj (a b : ℝ) : ∫ r, plateauMaj a b r = 2 * a + 2 * b := by - have h1 : Integrable ((Icc (-1:ℝ) 1).indicator (fun _ => a)) := - (integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp)) - have h2 := tail_indicator_integrable - have h3 : Integrable (fun r => (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := h2.comp_neg - have e1 : ∫ r, (Icc (-1:ℝ) 1).indicator (fun _ => a) r = 2 * a := by - rw [integral_indicator measurableSet_Icc, setIntegral_const, measureReal_def, - Real.volume_Icc, ENNReal.toReal_ofReal (by norm_num), smul_eq_mul] - norm_num - have e2 : ∫ r, (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r = 1 := by - rw [integral_indicator measurableSet_Ioi, integral_Ioi_rpow_of_lt (by norm_num) one_pos] - norm_num - have e3 : ∫ r, (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r) = 1 := by - rw [MeasureTheory.integral_neg_eq_self ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ))) volume] - exact e2 - have h23 : Integrable (fun r => (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r - + (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := h2.add h3 - unfold plateauMaj - calc ∫ r, ((Icc (-1:ℝ) 1).indicator (fun _ => a) r - + b * ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r - + (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r))) - = (∫ r, (Icc (-1:ℝ) 1).indicator (fun _ => a) r) - + ∫ r, b * ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r - + (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := - integral_add h1 (h23.const_mul _) - _ = 2 * a + b * ((∫ r, (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r) - + ∫ r, (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := by - rw [e1, integral_const_mul] - congr 2 - exact integral_add h2 h3 - _ = 2 * a + 2 * b := by rw [e2, e3]; ring - -/-- The integrable majorant of ψ: L on [−1,1] and (c_ϱ/w)|r|⁻² outside. -/ -private noncomputable abbrev psiMaj (ϱ : ℝ → ℝ) (L w : ℝ) : ℝ → ℝ := plateauMaj L (cRho ϱ / w) - -private theorem psiMaj_integrable : Integrable (psiMaj ϱ L w) := plateauMaj_integrable _ _ - -private theorem psi_le_psiMaj (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) (r : ℝ) : - psi ϱ L w r ≤ psiMaj ϱ L w r := by - have hw0 : 0 < w := by linarith - have hc : 0 ≤ cRho ϱ := le_trans (by norm_num) (four_le_cRho hϱ) - have hind : ∀ s : ℝ, 0 ≤ (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) s := fun s => - Set.indicator_nonneg (fun x hx => Real.rpow_nonneg (le_trans zero_le_one (le_of_lt hx)) _) _ - unfold psiMaj plateauMaj - by_cases h : r ∈ Icc (-1:ℝ) 1 - · rw [Set.indicator_of_mem h] - have := psi_le_L hϱ hw hwL r - nlinarith [hind r, hind (-r), div_nonneg hc hw0.le] - · rw [Set.indicator_of_notMem h, zero_add] - rw [mem_Icc, not_and_or, not_le, not_le] at h - rcases h with h | h - · -- r < -1 - have hr : 0 < -r := by linarith - rw [Set.indicator_of_notMem (show r ∉ Ioi (1:ℝ) by simp; linarith), - Set.indicator_of_mem (show -r ∈ Ioi (1:ℝ) by simp; linarith), zero_add] - have := psi_le_rpow_neg_two hϱ hw hwL hr - rw [← psi_abs, abs_of_neg (by linarith)] - exact this - · -- 1 < r - have hr : 0 < r := by linarith - rw [Set.indicator_of_mem (show r ∈ Ioi (1:ℝ) from h), - Set.indicator_of_notMem (show -r ∉ Ioi (1:ℝ) by simp; linarith), add_zero] - exact psi_le_rpow_neg_two hϱ hw hwL hr - -/-- φ̂_ℝ is continuous (paperFT of an integrable function, at real arguments; dominated -convergence with the bound ‖φ‖). Auxiliary version for this file; Zeta23/Taper/Fourier.lean -(downstream) carries phiHatR_continuous. -/ theorem continuous_paperFT_ofReal {f : ℝ → ℂ} (hf : Integrable f) : Continuous (fun r : ℝ => paperFT f r) := by unfold paperFT @@ -539,15 +415,12 @@ theorem continuous_paperFT_ofReal {f : ℝ → ℂ} (hf : Integrable f) : hf.norm ?_ · exact hf.aestronglyMeasurable.mul (Continuous.aestronglyMeasurable (by fun_prop)) · refine Eventually.of_forall fun u => ?_ - rw [norm_mul, norm_cexp_I_mul] - simp + rw [norm_mul, norm_cexp_I_mul]; simp · exact Eventually.of_forall fun u => by fun_prop theorem continuous_phiHatR_aux (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : - Continuous (phiHatR ϱ L w) := by - unfold phiHatR phiHat - exact Complex.continuous_re.comp - (continuous_paperFT_ofReal (phi_integrable hϱ hw hwL).ofReal) + Continuous (phiHatR ϱ L w) := + Complex.continuous_re.comp (continuous_paperFT_ofReal (phi_integrable hϱ hw hwL).ofReal) theorem continuous_PhiR_aux (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : Continuous (PhiR ϱ L w) := by @@ -556,407 +429,44 @@ theorem continuous_PhiR_aux (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w exact (phiSqC_contDiff hϱ hw hwL).continuous.integrable_of_hasCompactSupport (hasCompactSupport_of_support_subset_abs (phiSqC_support hϱ hw)) -/-! ### [eq:psiints]. We record upper bounds — every downstream citation of [eq:psiints] in §5 is -"≪ log L" or "≤ 8L". (Paper: "a direct computation (split at |r| = 2/L and |r| = c_ϱ/2w; note -c_ϱ L/4w ≥ 1 by [eq:wrange]) gives Ψ₀ = 4 + 2 log(c_ϱ L/4w), ∫ψ²|r| = 8 + 8 log(c_ϱ L/4w), -∫ψ² ≤ 8L".) -/ - -/-- Constants for [eq:psiints]: A := 2/L ≤ B := c_ϱ/(2w) ("note c_ϱ L/4w ≥ 1 by -[eq:wrange]"), B/A = c_ϱ L/(4w). -/ -private theorem psiints_consts (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - 0 < 2 / L ∧ 0 < cRho ϱ / (2 * w) ∧ 2 / L ≤ cRho ϱ / (2 * w) ∧ - (cRho ϱ / (2 * w)) / (2 / L) = cRho ϱ * L / (4 * w) := by - have hc := four_le_cRho hϱ - have hL : 0 < L := by linarith - have hw0 : 0 < w := by linarith - refine ⟨by positivity, by positivity, ?_, ?_⟩ - · rw [div_le_div_iff₀ hL (by positivity)]; nlinarith - · field_simp; ring - -/-- On (0, ∞), ψ is dominated by the three-piece majorant L·1_{(0,A]} + (2/r)·1_{(A,B]} + -(c_ϱ/w) r⁻²·1_{(B,∞)} (in fact with equality; ≤ is all we use). -/ -private theorem indicator_psi_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) (r : ℝ) : - (Ioi (0:ℝ)).indicator (psi ϱ L w) r - ≤ (Ioc 0 (2 / L)).indicator (fun _ => L) r - + (Ioc (2 / L) (cRho ϱ / (2 * w))).indicator (fun x => 2 * x⁻¹) r - + (Ioi (cRho ϱ / (2 * w))).indicator (fun x => cRho ϱ / w * x ^ (-2:ℝ)) r := by - obtain ⟨hA, hB, hAB, -⟩ := psiints_consts hϱ hw hwL - have hwL' : 2 * w ≤ L := by linarith - by_cases hr : r ∈ Ioi (0:ℝ) - · have hr0 : 0 < r := hr - rw [indicator_of_mem hr] - by_cases h1 : r ≤ 2 / L - · rw [indicator_of_mem (show r ∈ Ioc 0 (2 / L) from ⟨hr0, h1⟩), - indicator_of_notMem (show r ∉ Ioc (2 / L) (cRho ϱ / (2 * w)) from - fun h => not_lt.mpr h1 h.1), - indicator_of_notMem (show r ∉ Ioi (cRho ϱ / (2 * w)) from - fun h => not_lt.mpr (h1.trans hAB) h), add_zero, add_zero] - exact psi_le_L hϱ hw hwL' r - · rw [not_le] at h1 - by_cases h2 : r ≤ cRho ϱ / (2 * w) - · rw [indicator_of_notMem (show r ∉ Ioc 0 (2 / L) from fun h => not_le.mpr h1 h.2), - indicator_of_mem (show r ∈ Ioc (2 / L) (cRho ϱ / (2 * w)) from ⟨h1, h2⟩), - indicator_of_notMem (show r ∉ Ioi (cRho ϱ / (2 * w)) from fun h => not_lt.mpr h2 h), - zero_add, add_zero] - have := psi_mul_abs_le hϱ hw hwL' r - rw [abs_of_pos hr0] at this - rw [← div_eq_mul_inv, le_div_iff₀ hr0] - exact this - · rw [not_le] at h2 - rw [indicator_of_notMem (show r ∉ Ioc 0 (2 / L) from fun h => not_le.mpr h1 h.2), - indicator_of_notMem (show r ∉ Ioc (2 / L) (cRho ϱ / (2 * w)) from - fun h => not_le.mpr h2 h.2), - indicator_of_mem (show r ∈ Ioi (cRho ϱ / (2 * w)) from h2), zero_add, zero_add] - exact psi_le_rpow_neg_two hϱ hw hwL' hr0 - · rw [indicator_of_notMem hr] - have hr0 : r ≤ 0 := not_lt.mp hr - rw [indicator_of_notMem (show r ∉ Ioc 0 (2 / L) from fun h => hr h.1), - indicator_of_notMem (show r ∉ Ioc (2 / L) (cRho ϱ / (2 * w)) from - fun h => hr (lt_trans hA h.1)), - indicator_of_notMem (show r ∉ Ioi (cRho ϱ / (2 * w)) from fun h => hr (lt_trans hB h)), - add_zero, add_zero] - -/-- [eq:psiints]: Ψ₀ := ∫₀^∞ ψ(r) dr ≤ 4 + 2 log(c_ϱ L/(4w)) (paper: "="). -/ theorem integral_psi_Ioi_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - ∫ r in Ioi 0, psi ϱ L w r ≤ 4 + 2 * Real.log (cRho ϱ * L / (4 * w)) := by - obtain ⟨hA, hB, hAB, hBA⟩ := psiints_consts hϱ hw hwL - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - have hw0 : 0 < w := by linarith - have hc0 : 0 < cRho ϱ := lt_of_lt_of_le (by norm_num) (four_le_cRho hϱ) - set A := 2 / L with hAdef - set B := cRho ϱ / (2 * w) with hBdef - -- integrability of the three pieces - have i1 : IntegrableOn (fun _ : ℝ => L) (Ioc 0 A) := integrableOn_const (by simp) - have i2 : IntegrableOn (fun x : ℝ => 2 * x⁻¹) (Ioc A B) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Ioc_subset_Icc_self - exact continuousOn_const.mul - ((continuousOn_inv₀).mono fun x hx => ne_of_gt (lt_of_lt_of_le hA hx.1)) - have i3 : IntegrableOn (fun x : ℝ => cRho ϱ / w * x ^ (-2:ℝ)) (Ioi B) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) hB).const_mul _ - have I1 := i1.integrable_indicator measurableSet_Ioc - have I2 := i2.integrable_indicator measurableSet_Ioc - have I3 := i3.integrable_indicator measurableSet_Ioi - -- the three integrals - have e1 : ∫ r, (Ioc 0 A).indicator (fun _ => L) r = 2 := by - rw [integral_indicator measurableSet_Ioc, setIntegral_const, measureReal_def, - Real.volume_Ioc, ENNReal.toReal_ofReal (by linarith), smul_eq_mul, sub_zero, hAdef] - field_simp - have e2 : ∫ r, (Ioc A B).indicator (fun x => 2 * x⁻¹) r = 2 * Real.log (B / A) := by - rw [integral_indicator measurableSet_Ioc, ← intervalIntegral.integral_of_le hAB, - intervalIntegral.integral_const_mul, integral_inv] - exact fun h => by - have := (Set.mem_uIcc.mp h); rcases this with h | h <;> linarith [h.1, h.2] - have e3 : ∫ r, (Ioi B).indicator (fun x => cRho ϱ / w * x ^ (-2:ℝ)) r = 2 := by - rw [integral_indicator measurableSet_Ioi, integral_const_mul, - integral_Ioi_rpow_of_lt (by norm_num) hB] - norm_num - rw [Real.rpow_neg_one, hBdef] - field_simp - have I12 : Integrable (fun r => (Ioc 0 A).indicator (fun _ => L) r - + (Ioc A B).indicator (fun x => 2 * x⁻¹) r) := I1.add I2 - calc ∫ r in Ioi 0, psi ϱ L w r - = ∫ r, (Ioi (0:ℝ)).indicator (psi ϱ L w) r := (integral_indicator measurableSet_Ioi).symm - _ ≤ ∫ r, ((Ioc 0 A).indicator (fun _ => L) r - + (Ioc A B).indicator (fun x => 2 * x⁻¹) r - + (Ioi B).indicator (fun x => cRho ϱ / w * x ^ (-2:ℝ)) r) := by - refine integral_mono_of_nonneg (Eventually.of_forall fun r => ?_) ((I1.add I2).add I3) - (Eventually.of_forall fun r => indicator_psi_le hϱ hw hwL r) - exact Set.indicator_nonneg (fun x _ => psi_nonneg hϱ hw hwL' x) _ - _ = (∫ r, ((Ioc 0 A).indicator (fun _ => L) r + (Ioc A B).indicator (fun x => 2 * x⁻¹) r)) - + ∫ r, (Ioi B).indicator (fun x => cRho ϱ / w * x ^ (-2:ℝ)) r := integral_add I12 I3 - _ = ((∫ r, (Ioc 0 A).indicator (fun _ => L) r) + ∫ r, (Ioc A B).indicator (fun x => 2 * x⁻¹) r) - + ∫ r, (Ioi B).indicator (fun x => cRho ϱ / w * x ^ (-2:ℝ)) r := by - rw [integral_add I1 I2] - _ = 2 + 2 * Real.log (B / A) + 2 := by rw [e1, e2, e3] - _ = 4 + 2 * Real.log (cRho ϱ * L / (4 * w)) := by rw [hBA]; ring - -/-- [eq:psiints]: ∫_ℝ ψ(r)²|r| dr ≤ 8 + 8 log(c_ϱ L/(4w)) (paper: "="): split (0,2/L], -(2/L, c/2w], (c/2w, ∞): ∫₀^∞ ψ² r ≤ L²(2/L)²/2 + 4 log(cL/4w) + (c/w)²/(2(c/2w)²) = 2 + 4 log + 2. -/ + ∫ r in Ioi (0:ℝ), psi ϱ L w r ≤ 4 + 2 * Real.log (cRho ϱ * L / (4 * w)) := + PsiC.integral_psi_Ioi_le (four_le_cRho hϱ) hw hwL + theorem integral_psi_sq_mul_abs_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - ∫ r, psi ϱ L w r ^ 2 * |r| ≤ 8 + 8 * Real.log (cRho ϱ * L / (4 * w)) := by - obtain ⟨hA, hB, hAB, hBA⟩ := psiints_consts hϱ hw hwL - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - have hw0 : 0 < w := by linarith - have hc0 : 0 < cRho ϱ := lt_of_lt_of_le (by norm_num) (four_le_cRho hϱ) - set A := 2 / L with hAdef - set B := cRho ϱ / (2 * w) with hBdef - have hred : ∫ r, psi ϱ L w r ^ 2 * |r| = 2 * ∫ r in Ioi 0, psi ϱ L w r ^ 2 * r := by - have h := integral_comp_abs (f := fun x => psi ϱ L w x ^ 2 * x) - simp only [psi_abs] at h - exact h - rw [hred] - -- majorant pieces - have i1 : IntegrableOn (fun x : ℝ => L ^ 2 * x) (Ioc 0 A) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Ioc_subset_Icc_self - exact (continuousOn_const.mul continuousOn_id) - have i2 : IntegrableOn (fun x : ℝ => 4 * x⁻¹) (Ioc A B) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Ioc_subset_Icc_self - exact continuousOn_const.mul - ((continuousOn_inv₀).mono fun x hx => ne_of_gt (lt_of_lt_of_le hA hx.1)) - have i3 : IntegrableOn (fun x : ℝ => (cRho ϱ / w) ^ 2 * x ^ (-3:ℝ)) (Ioi B) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) hB).const_mul _ - have I1 := i1.integrable_indicator measurableSet_Ioc - have I2 := i2.integrable_indicator measurableSet_Ioc - have I3 := i3.integrable_indicator measurableSet_Ioi - have I12 : Integrable (fun r => (Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r - + (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r) := I1.add I2 - have I123 : Integrable (fun r => (Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r - + (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r - + (Ioi B).indicator (fun x : ℝ => (cRho ϱ / w) ^ 2 * x ^ (-3:ℝ)) r) := I12.add I3 - have hpt : ∀ r, (Ioi (0:ℝ)).indicator (fun x => psi ϱ L w x ^ 2 * x) r - ≤ (Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r - + (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r - + (Ioi B).indicator (fun x : ℝ => (cRho ϱ / w) ^ 2 * x ^ (-3:ℝ)) r := by - intro r - have h0 := psi_nonneg hϱ hw hwL' r - by_cases hr : 0 < r - · rw [indicator_of_mem (show r ∈ Ioi (0:ℝ) from hr)] - by_cases h1 : r ≤ A - · rw [indicator_of_mem (show r ∈ Ioc 0 A from ⟨hr, h1⟩), - indicator_of_notMem (show r ∉ Ioc A B from fun h => not_lt.mpr h1 h.1), - indicator_of_notMem (show r ∉ Ioi B from fun h => not_lt.mpr (h1.trans hAB) h), - add_zero, add_zero] - exact mul_le_mul_of_nonneg_right (pow_le_pow_left₀ h0 (psi_le_L hϱ hw hwL' r) 2) hr.le - · have h1' : A < r := not_le.mp h1 - by_cases h2 : r ≤ B - · rw [indicator_of_notMem (show r ∉ Ioc 0 A from fun h => h1 h.2), - indicator_of_mem (show r ∈ Ioc A B from ⟨h1', h2⟩), - indicator_of_notMem (show r ∉ Ioi B from fun h => not_lt.mpr h2 h), zero_add, add_zero] - have h := psi_mul_abs_le hϱ hw hwL' r - rw [abs_of_pos hr] at h - -- ψ² r = (ψ r)·ψ ≤ 2 ψ ≤ 2 · (2/r) - have h3 : psi ϱ L w r ≤ 2 * r⁻¹ := by - rw [← div_eq_mul_inv, le_div_iff₀ hr]; exact h - calc psi ϱ L w r ^ 2 * r = (psi ϱ L w r * r) * psi ϱ L w r := by ring - _ ≤ 2 * (2 * r⁻¹) := mul_le_mul h h3 h0 (by norm_num) - _ = 4 * r⁻¹ := by ring - · have h2' : B < r := not_le.mp h2 - rw [indicator_of_notMem (show r ∉ Ioc 0 A from fun h => h1 h.2), - indicator_of_notMem (show r ∉ Ioc A B from fun h => h2 h.2), - indicator_of_mem (show r ∈ Ioi B from h2'), zero_add, zero_add] - have h := psi_le_rpow_neg_two hϱ hw hwL' hr - have hcw : 0 ≤ cRho ϱ / w * r ^ (-2:ℝ) := by positivity - calc psi ϱ L w r ^ 2 * r ≤ (cRho ϱ / w * r ^ (-2:ℝ)) ^ 2 * r := by - exact mul_le_mul_of_nonneg_right (pow_le_pow_left₀ h0 h 2) hr.le - _ = (cRho ϱ / w) ^ 2 * r ^ (-3:ℝ) := by - have hr' : r ≠ 0 := hr.ne' - rw [mul_pow, ← Real.rpow_natCast (r ^ (-2:ℝ)) 2, ← Real.rpow_mul hr.le] - norm_num - field_simp - · rw [indicator_of_notMem (show r ∉ Ioi (0:ℝ) from hr), - indicator_of_notMem (show r ∉ Ioc 0 A from fun h => hr h.1), - indicator_of_notMem (show r ∉ Ioc A B from fun h => hr (lt_trans hA h.1)), - indicator_of_notMem (show r ∉ Ioi B from fun h => hr (lt_trans hB h)), add_zero, add_zero] - -- the three integrals - have e1 : ∫ r, (Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r = 2 := by - rw [integral_indicator measurableSet_Ioc, ← intervalIntegral.integral_of_le hA.le, - intervalIntegral.integral_const_mul, integral_id, hAdef] - field_simp - ring - have e2 : ∫ r, (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r = 4 * Real.log (B / A) := by - rw [integral_indicator measurableSet_Ioc, ← intervalIntegral.integral_of_le hAB, - intervalIntegral.integral_const_mul, integral_inv] - exact fun h => by - have := (Set.mem_uIcc.mp h); rcases this with h | h <;> linarith [h.1, h.2] - have e3 : ∫ r, (Ioi B).indicator (fun x : ℝ => (cRho ϱ / w) ^ 2 * x ^ (-3:ℝ)) r = 2 := by - rw [integral_indicator measurableSet_Ioi, integral_const_mul, - integral_Ioi_rpow_of_lt (by norm_num) hB] - norm_num - rw [hBdef] - field_simp - calc 2 * ∫ r in Ioi 0, psi ϱ L w r ^ 2 * r - = 2 * ∫ r, (Ioi (0:ℝ)).indicator (fun x => psi ϱ L w x ^ 2 * x) r := by - rw [integral_indicator measurableSet_Ioi] - _ ≤ 2 * ∫ r, ((Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r - + (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r - + (Ioi B).indicator (fun x : ℝ => (cRho ϱ / w) ^ 2 * x ^ (-3:ℝ)) r) := - mul_le_mul_of_nonneg_left (integral_mono_of_nonneg (Eventually.of_forall fun r => - Set.indicator_nonneg (fun x hx => mul_nonneg (sq_nonneg _) (le_of_lt hx)) _) I123 - (Eventually.of_forall hpt)) (by norm_num) - _ = 2 * (2 + 4 * Real.log (B / A) + 2) := by rw [integral_add I12 I3, integral_add I1 I2, e1, e2, e3] - _ = 8 + 8 * Real.log (cRho ϱ * L / (4 * w)) := by rw [hBA]; ring - -/-- [eq:psiints]: "∫_ℝ ψ² ≤ 8L". Uses only ψ ≤ min(L, 2/|r|): -∫ = 2∫₀^∞ ≤ 2(∫₀^{2/L} L² + ∫_{2/L}^∞ 4r⁻²) = 2(2L+2L). -/ + ∫ r, psi ϱ L w r ^ 2 * |r| ≤ 8 + 8 * Real.log (cRho ϱ * L / (4 * w)) := + PsiC.integral_psi_sq_mul_abs_le (four_le_cRho hϱ) hw hwL + theorem integral_psi_sq_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - ∫ r, psi ϱ L w r ^ 2 ≤ 8 * L := by - obtain ⟨hA, -, -, -⟩ := psiints_consts hϱ hw hwL - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - set A := 2 / L with hAdef - have hred : ∫ r, psi ϱ L w r ^ 2 = 2 * ∫ r in Ioi 0, psi ϱ L w r ^ 2 := by - have h := integral_comp_abs (f := fun x => psi ϱ L w x ^ 2) - simp only [psi_abs] at h - exact h - rw [hred] - have i1 : IntegrableOn (fun _ : ℝ => L ^ 2) (Ioc 0 A) := integrableOn_const (by simp) - have i2 : IntegrableOn (fun x : ℝ => 4 * x ^ (-2:ℝ)) (Ioi A) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) hA).const_mul _ - have I1 := i1.integrable_indicator measurableSet_Ioc - have I2 := i2.integrable_indicator measurableSet_Ioi - have I12 : Integrable (fun r => (Ioc 0 A).indicator (fun _ : ℝ => L ^ 2) r - + (Ioi A).indicator (fun x : ℝ => 4 * x ^ (-2:ℝ)) r) := I1.add I2 - have hpt : ∀ r, (Ioi (0:ℝ)).indicator (fun x => psi ϱ L w x ^ 2) r - ≤ (Ioc 0 A).indicator (fun _ : ℝ => L ^ 2) r + (Ioi A).indicator (fun x : ℝ => 4 * x ^ (-2:ℝ)) r := by - intro r - have h0 := psi_nonneg hϱ hw hwL' r - by_cases hr : 0 < r - · rw [indicator_of_mem (show r ∈ Ioi (0:ℝ) from hr)] - by_cases h1 : r ≤ A - · rw [indicator_of_mem (show r ∈ Ioc 0 A from ⟨hr, h1⟩), - indicator_of_notMem (show r ∉ Ioi A from fun h => not_lt.mpr h1 h), add_zero] - exact pow_le_pow_left₀ h0 (psi_le_L hϱ hw hwL' r) 2 - · have h1' : A < r := not_le.mp h1 - rw [indicator_of_notMem (show r ∉ Ioc 0 A from fun h => h1 h.2), - indicator_of_mem (show r ∈ Ioi A from h1'), zero_add] - have h := psi_mul_abs_le hϱ hw hwL' r - rw [abs_of_pos hr] at h - have h2 : psi ϱ L w r ≤ 2 * r⁻¹ := by - rw [← div_eq_mul_inv, le_div_iff₀ hr]; exact h - calc psi ϱ L w r ^ 2 ≤ (2 * r⁻¹) ^ 2 := pow_le_pow_left₀ h0 h2 2 - _ = 4 * r ^ (-2:ℝ) := by - rw [Real.rpow_neg hr.le, Real.rpow_two]; ring - · rw [indicator_of_notMem (show r ∉ Ioi (0:ℝ) from hr), - indicator_of_notMem (show r ∉ Ioc 0 A from fun h => hr h.1), - indicator_of_notMem (show r ∉ Ioi A from fun h => hr (lt_trans hA h)), add_zero] - have e1 : ∫ r, (Ioc 0 A).indicator (fun _ : ℝ => L ^ 2) r = 2 * L := by - rw [integral_indicator measurableSet_Ioc, setIntegral_const, measureReal_def, Real.volume_Ioc, - ENNReal.toReal_ofReal (by linarith), smul_eq_mul, sub_zero, hAdef] - field_simp - have e2 : ∫ r, (Ioi A).indicator (fun x : ℝ => 4 * x ^ (-2:ℝ)) r = 2 * L := by - rw [integral_indicator measurableSet_Ioi, integral_const_mul, - integral_Ioi_rpow_of_lt (by norm_num) hA] - norm_num - rw [Real.rpow_neg_one, hAdef] - field_simp - ring - calc 2 * ∫ r in Ioi 0, psi ϱ L w r ^ 2 - = 2 * ∫ r, (Ioi (0:ℝ)).indicator (fun x => psi ϱ L w x ^ 2) r := by - rw [integral_indicator measurableSet_Ioi] - _ ≤ 2 * ∫ r, ((Ioc 0 A).indicator (fun _ : ℝ => L ^ 2) r - + (Ioi A).indicator (fun x : ℝ => 4 * x ^ (-2:ℝ)) r) := - mul_le_mul_of_nonneg_left (integral_mono_of_nonneg - (Eventually.of_forall fun r => Set.indicator_nonneg (fun x _ => sq_nonneg _) _) I12 - (Eventually.of_forall hpt)) (by norm_num) - _ = 2 * (2 * L + 2 * L) := by rw [integral_add I1 I2, e1, e2] - _ = 8 * L := by ring + ∫ r, psi ϱ L w r ^ 2 ≤ 8 * L := + PsiC.integral_psi_sq_le (four_le_cRho hϱ) hw hwL theorem psi_integrable (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - Integrable (psi ϱ L w) := by - have hwL' : 2 * w ≤ L := by linarith - refine (psiMaj_integrable (ϱ := ϱ) (L := L) (w := w)).mono' - psi_measurable.aestronglyMeasurable (Eventually.of_forall fun r => ?_) - rw [Real.norm_of_nonneg (psi_nonneg hϱ hw hwL' r)] - exact psi_le_psiMaj hϱ hw hwL' r + Integrable (psi ϱ L w) := PsiC.psi_integrable (four_le_cRho hϱ) hw hwL theorem psi_sq_integrable (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - Integrable (fun r => psi ϱ L w r ^ 2) := by - have hwL' : 2 * w ≤ L := by linarith - refine ((psi_integrable hϱ hw hwL).const_mul L).mono' - (psi_measurable.pow_const 2).aestronglyMeasurable (Eventually.of_forall fun r => ?_) - have h0 := psi_nonneg hϱ hw hwL' r - have h1 := psi_le_L hϱ hw hwL' r - rw [Real.norm_of_nonneg (sq_nonneg _)] - nlinarith + Integrable (fun r => psi ϱ L w r ^ 2) := PsiC.psi_sq_integrable (four_le_cRho hϱ) hw hwL theorem psi_sq_mul_abs_integrable (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : Integrable (fun r => psi ϱ L w r ^ 2 * |r|) := by - have hwL' : 2 * w ≤ L := by linarith - refine ((psi_integrable hϱ hw hwL).const_mul 2).mono' - ((psi_measurable.pow_const 2).mul continuous_abs.measurable).aestronglyMeasurable + have h1 : Integrable (fun r => 2 * psi ϱ L w r) := (psi_integrable hϱ hw hwL).const_mul 2 + refine h1.mono' ((psi_measurable.pow_const 2).mul continuous_abs.measurable).aestronglyMeasurable (Eventually.of_forall fun r => ?_) - have h0 := psi_nonneg hϱ hw hwL' r - have h1 := psi_mul_abs_le hϱ hw hwL' r + have hp := psi_nonneg hϱ hw (by linarith) r rw [Real.norm_of_nonneg (by positivity)] - nlinarith - -/-! #### Generic moment bounds from |F| ≤ ψ-type information -/ - -/-- If |F| ≤ ψ pointwise then ∫ F²|r| ≤ ∫ ψ²|r| ≤ 8 + 8 log(c_ϱ L/4w). -/ -private theorem integral_sq_mul_abs_le_of_le_psi (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) - (hwL : 8 * w ≤ L) {F : ℝ → ℝ} (hF : ∀ r, |F r| ≤ psi ϱ L w r) : - ∫ r, F r ^ 2 * |r| ≤ 8 + 8 * Real.log (cRho ϱ * L / (4 * w)) := by - refine le_trans (integral_mono_of_nonneg (Eventually.of_forall fun r => by positivity) - (psi_sq_mul_abs_integrable hϱ hw hwL) (Eventually.of_forall fun r => ?_)) - (integral_psi_sq_mul_abs_le hϱ hw hwL) - have h : F r ^ 2 ≤ psi ϱ L w r ^ 2 := by - rw [← sq_abs (F r)] - exact pow_le_pow_left₀ (abs_nonneg _) (hF r) 2 - exact mul_le_mul_of_nonneg_right h (abs_nonneg r) - -/-- The integrable majorant for the r²-moments: 4 on [−1,1] and C²|r|⁻² outside. -/ -private noncomputable abbrev momMaj (C : ℝ) : ℝ → ℝ := plateauMaj 4 (C ^ 2) - -private theorem momMaj_integrable (C : ℝ) : Integrable (momMaj C) := plateauMaj_integrable _ _ - -private theorem integral_momMaj (C : ℝ) : ∫ r, momMaj C r = 8 + 2 * C ^ 2 := by - rw [integral_plateauMaj]; ring - -/-- Pointwise: |F(r)|·|r| ≤ 2 and |F(r)|·r² ≤ C give F(r)² r² ≤ momMaj C r. -/ -private theorem sq_mul_sq_le_momMaj {F : ℝ → ℝ} {C : ℝ} (_hC : 0 ≤ C) - (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) (r : ℝ) : - F r ^ 2 * r ^ 2 ≤ momMaj C r := by - have hind : ∀ s : ℝ, 0 ≤ (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) s := fun s => - Set.indicator_nonneg (fun x hx => Real.rpow_nonneg (le_trans zero_le_one (le_of_lt hx)) _) _ - have hsq : ∀ s : ℝ, 1 < s → F r ^ 2 * s ^ 2 * s ^ 2 ≤ C ^ 2 → F r ^ 2 * s ^ 2 ≤ C ^ 2 * s ^ (-2:ℝ) := by - intro s hs h - have hs0 : 0 < s := by linarith - rw [Real.rpow_neg hs0.le, show (2:ℝ) = ((2:ℕ):ℝ) by norm_num, Real.rpow_natCast, - ← div_eq_mul_inv, le_div_iff₀ (by positivity)] - exact h - unfold momMaj plateauMaj - by_cases h : r ∈ Icc (-1:ℝ) 1 - · rw [Set.indicator_of_mem h] - have hb : F r ^ 2 * r ^ 2 ≤ 4 := by - have := h1 r - have h0 : 0 ≤ |F r| * |r| := by positivity - calc F r ^ 2 * r ^ 2 = (|F r| * |r|) ^ 2 := by rw [mul_pow, sq_abs, sq_abs] - _ ≤ 2 ^ 2 := pow_le_pow_left₀ h0 this 2 - _ = 4 := by norm_num - nlinarith [hind r, hind (-r), sq_nonneg C] - · rw [Set.indicator_of_notMem h, zero_add] - rw [mem_Icc, not_and_or, not_le, not_le] at h - have hFsq : F r ^ 2 * r ^ 2 * r ^ 2 ≤ C ^ 2 := by - have := h2 r - have h0 : 0 ≤ |F r| * r ^ 2 := by positivity - calc F r ^ 2 * r ^ 2 * r ^ 2 = (|F r| * r ^ 2) ^ 2 := by rw [mul_pow, sq_abs]; ring - _ ≤ C ^ 2 := pow_le_pow_left₀ h0 this 2 - rcases h with h | h - · -- r < -1 - rw [Set.indicator_of_notMem (show r ∉ Ioi (1:ℝ) by simp; linarith), - Set.indicator_of_mem (show -r ∈ Ioi (1:ℝ) by simp; linarith), zero_add] - have := hsq (-r) (by linarith) (by simpa using hFsq) - simpa using this - · -- 1 < r - rw [Set.indicator_of_mem (show r ∈ Ioi (1:ℝ) from h), - Set.indicator_of_notMem (show -r ∉ Ioi (1:ℝ) by simp; linarith), add_zero] - exact hsq r h hFsq - -private theorem integrable_sq_mul_sq_of_bounds {F : ℝ → ℝ} {C : ℝ} (hFc : Continuous F) - (hC : 0 ≤ C) (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) : - Integrable (fun r => F r ^ 2 * r ^ 2) := by - refine (momMaj_integrable C).mono' (by fun_prop) (Eventually.of_forall fun r => ?_) - rw [Real.norm_of_nonneg (by positivity)] - exact sq_mul_sq_le_momMaj hC h1 h2 r - -private theorem integral_sq_mul_sq_le_of_bounds {F : ℝ → ℝ} {C : ℝ} - (hC : 0 ≤ C) (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) : - ∫ r, F r ^ 2 * r ^ 2 ≤ 8 + 2 * C ^ 2 := by - rw [← integral_momMaj C] - exact integral_mono_of_nonneg (Eventually.of_forall fun r => by positivity) - (momMaj_integrable C) (Eventually.of_forall fun r => sq_mul_sq_le_momMaj hC h1 h2 r) + calc psi ϱ L w r ^ 2 * |r| = psi ϱ L w r * (psi ϱ L w r * |r|) := by ring + _ ≤ psi ϱ L w r * 2 := mul_le_mul_of_nonneg_left (psi_mul_abs_le hϱ hw (by linarith) r) hp + _ = 2 * psi ϱ L w r := by ring /-- Consequence packaged for [prop:trace]/[prop:mumu]: ∫ φ̂(r)² |r| dr ≤ 8 + 8 log(c_ϱ L/4w). -/ theorem integral_phiHatR_sq_mul_abs_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : ∫ r, phiHatR ϱ L w r ^ 2 * |r| ≤ 8 + 8 * Real.log (cRho ϱ * L / (4 * w)) := - integral_sq_mul_abs_le_of_le_psi hϱ hw hwL + PsiC.integral_sq_mul_abs_le_of_le_psi (four_le_cRho hϱ) hw hwL (fun r => abs_phiHatR_le_psi hϱ hw (by linarith) r) theorem integral_PhiR_sq_mul_abs_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : ∫ x, PhiR ϱ L w x ^ 2 * |x| ≤ 8 + 8 * Real.log (cRho ϱ * L / (4 * w)) := - integral_sq_mul_abs_le_of_le_psi hϱ hw hwL + PsiC.integral_sq_mul_abs_le_of_le_psi (four_le_cRho hϱ) hw hwL (fun r => abs_PhiR_le_psi hϱ hw (by linarith) r) /-- Used for [prop:trace] (μ/Π tails): `φ̂(r)² r²` is integrable … -/ @@ -964,7 +474,7 @@ theorem integrable_phiHatR_sq_mul_sq (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL Integrable (fun r => phiHatR ϱ L w r ^ 2 * r ^ 2) := by have hw0 : 0 < w := by linarith have hwL' : 2 * w ≤ L := by linarith - exact integrable_sq_mul_sq_of_bounds (continuous_phiHatR_aux hϱ hw0 hwL') + exact PsiC.integrable_sq_mul_sq_of_bounds (continuous_phiHatR_aux hϱ hw0 hwL') (div_nonneg (le_trans (by norm_num) (four_le_cRho hϱ)) hw0.le) (abs_phiHatR_mul_abs_le hϱ hw0 hwL') (abs_phiHatR_mul_sq_le hϱ hw hwL') @@ -974,7 +484,7 @@ theorem integral_phiHatR_sq_mul_sq_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hw ∫ r, phiHatR ϱ L w r ^ 2 * r ^ 2 ≤ 8 + 2 * (cRho ϱ / w) ^ 2 := by have hw0 : 0 < w := by linarith have hwL' : 2 * w ≤ L := by linarith - exact integral_sq_mul_sq_le_of_bounds + exact PsiC.integral_sq_mul_sq_le_of_bounds (div_nonneg (le_trans (by norm_num) (four_le_cRho hϱ)) hw0.le) (abs_phiHatR_mul_abs_le hϱ hw0 hwL') (abs_phiHatR_mul_sq_le hϱ hw hwL') @@ -983,7 +493,7 @@ theorem integrable_PhiR_sq_mul_sq (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : Integrable (fun x => PhiR ϱ L w x ^ 2 * x ^ 2) := by have hw0 : 0 < w := by linarith have hwL' : 2 * w ≤ L := by linarith - exact integrable_sq_mul_sq_of_bounds (continuous_PhiR_aux hϱ hw0 hwL') + exact PsiC.integrable_sq_mul_sq_of_bounds (continuous_PhiR_aux hϱ hw0 hwL') (div_nonneg (le_trans (by norm_num) (four_le_cRho hϱ)) hw0.le) (abs_PhiR_mul_abs_le hϱ hw0 hwL') (abs_PhiR_mul_sq_le hϱ hw hwL') @@ -992,7 +502,7 @@ theorem integral_PhiR_sq_mul_sq_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : ∫ x, PhiR ϱ L w x ^ 2 * x ^ 2 ≤ 8 + 2 * (cRho ϱ / w) ^ 2 := by have hw0 : 0 < w := by linarith have hwL' : 2 * w ≤ L := by linarith - exact integral_sq_mul_sq_le_of_bounds + exact PsiC.integral_sq_mul_sq_le_of_bounds (div_nonneg (le_trans (by norm_num) (four_le_cRho hϱ)) hw0.le) (abs_PhiR_mul_abs_le hϱ hw0 hwL') (abs_PhiR_mul_sq_le hϱ hw hwL') diff --git a/zeta23/Zeta23/Taper/Fourier.lean b/zeta23/Zeta23/Taper/Fourier.lean index 41ef273659..899e881be1 100644 --- a/zeta23/Zeta23/Taper/Fourier.lean +++ b/zeta23/Zeta23/Taper/Fourier.lean @@ -160,14 +160,6 @@ theorem integrable_re_paperFT_sq_and {f : ℝ → ℂ} {Λ : ℝ} (hf : ContDiff /-! ### The paper's autocorrelation `(v ⋆ v)(y) := ∫ v(u) v(u+y) du` [eq:PhigA] versus Mathlib's convolution -/ -/-- `v ⋆ v` is even (no hypothesis on `v`: substitute `u ↦ u − y`). -/ -theorem autocorr_neg (v : ℝ → ℝ) (y : ℝ) : Params.autocorr v (-y) = Params.autocorr v y := by - simp only [Params.autocorr] - rw [← integral_add_right_eq_self _ y] - congr 1 with u - rw [mul_comm] - ring_nf - /-- For EVEN real `v`, the complexified autocorrelation is Mathlib's convolution `v_ℂ ⋆ v_ℂ`: `∫ v(u)v(u+y) du = ∫ v(t) v(y−t) dt` (substitute `u = −t`, use `v(−t) = v(t)`). -/ theorem ofReal_autocorr_eq_convolution (hv : ∀ u, v (-u) = v u) : diff --git a/zeta23/Zeta23/Taper/Gevrey.lean b/zeta23/Zeta23/Taper/Gevrey.lean index df944f8bb2..0657abd61d 100644 --- a/zeta23/Zeta23/Taper/Gevrey.lean +++ b/zeta23/Zeta23/Taper/Gevrey.lean @@ -47,14 +47,17 @@ namespace Taper open Real Complex Filter Topology Set Metric MeasureTheory intervalIntegral +/-- Shared Gevrey parameter validity `(s > 1, A > 0, B > 0)`. -/ +structure GevreyParams (s A B : ℝ) : Prop where + one_lt : 1 < s + A_pos : 0 < A + B_pos : 0 < B + /-- Gevrey-s derivative bounds in the (weaker-than-usual) form sup|ϱ^{(k)}| ≤ B·A^k·k^{sk} for all k ≥ 1, on top of the paper's TaperProfile and C^∞. -/ -structure GevreyProfile (s A B : ℝ) (ϱ : ℝ → ℝ) : Prop where +structure GevreyProfile (s A B : ℝ) (ϱ : ℝ → ℝ) : Prop extends GevreyParams s A B where taper : TaperProfile ϱ smooth : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ϱ - one_lt : 1 < s - A_pos : 0 < A - B_pos : 0 < B bound : ∀ k : ℕ, 1 ≤ k → ∀ x : ℝ, |iteratedDeriv k ϱ x| ≤ B * A ^ k * (k : ℝ) ^ (s * k) /-- the bump θ(x) = g(x) g(1−x), g = expNegInvGlue. -/ @@ -339,7 +342,7 @@ lemma Theta_of_one_le {x : ℝ} (hx : 1 ≤ x) : Theta x = Theta 1 := by simp lemma Theta_one_pos : 0 < Theta 1 := - intervalIntegral_pos_of_pos_on (theta_continuous.intervalIntegrable _ _) (fun x hx => theta_pos hx.1 hx.2) + intervalIntegral_pos_of_pos_on (theta_continuous.intervalIntegrable _ _) (fun _x hx => theta_pos hx.1 hx.2) zero_lt_one /-- ∫_0^1 θ ≥ e^{−8}/2 (θ ≥ e^{−8} on [1/4, 3/4]). -/ diff --git a/zeta23/Zeta23/Taper/GevreyPhi.lean b/zeta23/Zeta23/Taper/GevreyPhi.lean index a684395a18..dea0ba3e1e 100644 --- a/zeta23/Zeta23/Taper/GevreyPhi.lean +++ b/zeta23/Zeta23/Taper/GevreyPhi.lean @@ -7,8 +7,7 @@ SPDX-License-Identifier: Apache-2.0 Zeta23/Taper/GevreyPhi.lean — the L¹ bounds on the iterated derivatives of the concrete taper φ(u) = ϱ((L/2−|u|)/w) that the Gevrey tail lemma consumes. -/ -import Zeta23.Defs -import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Zeta23.Taper.Gevrey noncomputable section @@ -16,10 +15,8 @@ namespace Zeta23 /-- The Gevrey taper bound, as a hypothesis on (P, T): φ = P.phi T (as a ℂ-valued function) is C^∞ and ‖φ^{(k)}‖_{L¹} ≤ 2B·w·(A/w)^k·k^{sk} for all k ≥ 1 (= 2B w^{1−k} A^k k^{sk}). -/ -structure Params.GevreyPhiBound (P : Params) (T : ℝ) (s A B : ℝ) : Prop where - one_lt : 1 < s - A_pos : 0 < A - B_pos : 0 < B +structure Params.GevreyPhiBound (P : Params) (T : ℝ) (s A B : ℝ) : Prop + extends Taper.GevreyParams s A B where smooth : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (fun u : ℝ => (P.phi T u : ℂ)) bound : ∀ k : ℕ, 1 ≤ k → ∫ u, ‖iteratedDeriv k (fun u : ℝ => (P.phi T u : ℂ)) u‖ ≤ 2 * B * P.w * (A / P.w) ^ k * (k : ℝ) ^ (s * k) diff --git a/zeta23/Zeta23/Taper/GevreyRamps.lean b/zeta23/Zeta23/Taper/GevreyRamps.lean index 7b826885db..58d1ba5cac 100644 --- a/zeta23/Zeta23/Taper/GevreyRamps.lean +++ b/zeta23/Zeta23/Taper/GevreyRamps.lean @@ -26,23 +26,24 @@ namespace Taper variable {s A B : ℝ} {ϱ : ℝ → ℝ} -/-- for `i ≥ 1`, the `i`-th derivative of a profile vanishes off the open unit interval. -/ -lemma GevreyProfile.iteratedDeriv_eq_zero (hϱ : GevreyProfile s A B ϱ) {i : ℕ} (hi : 1 ≤ i) - {x : ℝ} (hx : x ∉ Set.Ioo (0:ℝ) 1) : iteratedDeriv i ϱ x = 0 := by +/-- For `i ≥ 1`, if `iteratedDeriv i ϱ` is continuous for a taper profile `ϱ`, +then it vanishes off the open unit interval `(0, 1)`. -/ +lemma iteratedDeriv_eq_zero_of_taper (hϱ : TaperProfile ϱ) {i : ℕ} (hi : 1 ≤ i) + (hcont : Continuous (iteratedDeriv i ϱ)) {x : ℝ} (hx : x ∉ Set.Ioo (0:ℝ) 1) : + iteratedDeriv i ϱ x = 0 := by have hi0 : i ≠ 0 := by omega - have hcont : Continuous (iteratedDeriv i ϱ) := hϱ.smooth.continuous_iteratedDeriv i (WithTop.coe_le_coe.mpr le_top) have hcl : IsClosed {y : ℝ | iteratedDeriv i ϱ y = 0} := isClosed_eq hcont continuous_const -- zero on the open pieces have h1 : Set.Iio (0:ℝ) ⊆ {y | iteratedDeriv i ϱ y = 0} := by intro y hy have hev : ϱ =ᶠ[𝓝 y] (fun _ => (0:ℝ)) := - Filter.eventually_of_mem (Iio_mem_nhds hy) (fun z hz => hϱ.taper.eq_zero z (le_of_lt hz)) + Filter.eventually_of_mem (Iio_mem_nhds hy) (fun z hz => hϱ.eq_zero z (le_of_lt hz)) show iteratedDeriv i ϱ y = 0 rw [hev.iteratedDeriv_eq i, iteratedDeriv_const, if_neg hi0] have h2 : Set.Ioi (1:ℝ) ⊆ {y | iteratedDeriv i ϱ y = 0} := by intro y hy have hev : ϱ =ᶠ[𝓝 y] (fun _ => (1:ℝ)) := - Filter.eventually_of_mem (Ioi_mem_nhds hy) (fun z hz => hϱ.taper.eq_one z (le_of_lt hz)) + Filter.eventually_of_mem (Ioi_mem_nhds hy) (fun z hz => hϱ.eq_one z (le_of_lt hz)) show iteratedDeriv i ϱ y = 0 rw [hev.iteratedDeriv_eq i, iteratedDeriv_const, if_neg hi0] -- hence on their closures @@ -55,23 +56,6 @@ lemma GevreyProfile.iteratedDeriv_eq_zero (hϱ : GevreyProfile s A B ϱ) {i : · exact h1' hx · exact h2' hx -/-- pointwise majorant: `|ϱ^{(k)}(x)| ≤ B A^k k^{sk} · 1_{(0,1)}(x)` for `k ≥ 1`. -/ -lemma GevreyProfile.abs_iteratedDeriv_le_indicator (hϱ : GevreyProfile s A B ϱ) {k : ℕ} - (hk : 1 ≤ k) (x : ℝ) : - |iteratedDeriv k ϱ x| ≤ (Set.Ioo (0:ℝ) 1).indicator (fun _ => B * A ^ k * (k : ℝ) ^ (s * k)) x := by - by_cases hx : x ∈ Set.Ioo (0:ℝ) 1 - · rw [Set.indicator_of_mem hx]; exact hϱ.bound k hk x - · rw [Set.indicator_of_notMem hx, hϱ.iteratedDeriv_eq_zero hk hx, abs_zero] - -/-- `iteratedDeriv` commutes with the coercion ℝ → ℂ for smooth functions. -/ -lemma iteratedDeriv_ofReal_comp {f : ℝ → ℝ} (hf : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) f) (k : ℕ) : - iteratedDeriv k (fun u => (f u : ℂ)) = fun u => ((iteratedDeriv k f u : ℝ) : ℂ) := by - induction k with - | zero => simp - | succ k ih => - rw [iteratedDeriv_succ, ih, iteratedDeriv_succ] - exact deriv_ofReal_comp (hf.differentiable_iteratedDeriv k (WithTop.coe_lt_coe.mpr (ENat.coe_lt_top k))) - section Ramps variable {L w : ℝ} @@ -87,101 +71,97 @@ lemma fM_eq (ϱ : ℝ → ℝ) (L w : ℝ) : fM ϱ L w = fun u => (fun x => ϱ (w⁻¹ * x)) (u + L / 2) := by funext u; simp only [fM, div_eq_inv_mul, add_comm u] -lemma fP_contDiff (hϱ : GevreyProfile s A B ϱ) : - ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (fP ϱ L w) := - hϱ.smooth.comp (by fun_prop) - -lemma fM_contDiff (hϱ : GevreyProfile s A B ϱ) : - ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (fM ϱ L w) := - hϱ.smooth.comp (by fun_prop) - -lemma iteratedDeriv_fP (hϱ : GevreyProfile s A B ϱ) (i : ℕ) (u : ℝ) : +lemma iteratedDeriv_fP_of_contDiff {i : ℕ} (hcd : ContDiff ℝ (i : WithTop ℕ∞) ϱ) (u : ℝ) : iteratedDeriv i (fP ϱ L w) u = (-1 : ℝ) ^ i * ((w⁻¹) ^ i * iteratedDeriv i ϱ ((L / 2 - u) / w)) := by - have hg := iteratedDeriv_comp_const_mul (n := i) (hϱ.smooth.of_le (WithTop.coe_le_coe.mpr le_top)) w⁻¹ + have hg := iteratedDeriv_comp_const_mul (n := i) hcd w⁻¹ rw [fP_eq] refine (congrFun (iteratedDeriv_comp_const_sub i (fun x => ϱ (w⁻¹ * x)) (L / 2)) u).trans ?_ simp only [smul_eq_mul, hg, div_eq_inv_mul] -lemma iteratedDeriv_fM (hϱ : GevreyProfile s A B ϱ) (i : ℕ) (u : ℝ) : +lemma iteratedDeriv_fM_of_contDiff {i : ℕ} (hcd : ContDiff ℝ (i : WithTop ℕ∞) ϱ) (u : ℝ) : iteratedDeriv i (fM ϱ L w) u = (w⁻¹) ^ i * iteratedDeriv i ϱ ((L / 2 + u) / w) := by - have hg := iteratedDeriv_comp_const_mul (n := i) (hϱ.smooth.of_le (WithTop.coe_le_coe.mpr le_top)) w⁻¹ + have hg := iteratedDeriv_comp_const_mul (n := i) hcd w⁻¹ rw [fM_eq] refine (congrFun (iteratedDeriv_comp_add_const i (fun x => ϱ (w⁻¹ * x)) (L / 2)) u).trans ?_ simp only [hg, div_eq_inv_mul, add_comm u] -/-- ramp majorants: `|f₊^{(k)}(u)| ≤ w^{−k}BA^k k^{sk}·1_{(L/2−w, L/2)}(u)` and symmetrically. -/ -lemma abs_iteratedDeriv_fP_le (hϱ : GevreyProfile s A B ϱ) (hw : 0 < w) {k : ℕ} (hk : 1 ≤ k) - (u : ℝ) : |iteratedDeriv k (fP ϱ L w) u| - ≤ (Set.Ioo (L / 2 - w) (L / 2)).indicator (fun _ => (w⁻¹) ^ k * (B * A ^ k * (k : ℝ) ^ (s * k))) u := by - rw [iteratedDeriv_fP hϱ, abs_mul, abs_pow, abs_neg, abs_one, one_pow, one_mul, abs_mul, - abs_of_nonneg (by positivity : (0:ℝ) ≤ (w⁻¹) ^ k)] - have h := hϱ.abs_iteratedDeriv_le_indicator hk ((L / 2 - u) / w) - have hset : ((L / 2 - u) / w ∈ Set.Ioo (0:ℝ) 1) ↔ (u ∈ Set.Ioo (L / 2 - w) (L / 2)) := by - simp only [Set.mem_Ioo, div_pos_iff_of_pos_right hw, div_lt_one hw] - constructor <;> intro h' <;> constructor <;> linarith [h'.1, h'.2] +/-- Pointwise ramp majorant for `f₊^{(k)}` given any `C^k` taper profile with `|ϱ^{(k)}| ≤ M`. -/ +lemma abs_iteratedDeriv_fP_le_of_bound (hϱ : TaperProfile ϱ) {k : ℕ} (hk : 1 ≤ k) + (hcd : ContDiff ℝ (k : WithTop ℕ∞) ϱ) {M : ℝ} (hM : ∀ x : ℝ, |iteratedDeriv k ϱ x| ≤ M) + (hw : 0 < w) (u : ℝ) : + |iteratedDeriv k (fP ϱ L w) u| + ≤ (Set.Ioo (L / 2 - w) (L / 2)).indicator (fun _ => (w⁻¹) ^ k * M) u := by + rw [iteratedDeriv_fP_of_contDiff hcd, abs_mul, abs_pow, abs_neg, abs_one, one_pow, one_mul, + abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ (w⁻¹) ^ k)] by_cases hu : u ∈ Set.Ioo (L / 2 - w) (L / 2) · rw [Set.indicator_of_mem hu] - rw [Set.indicator_of_mem (hset.mpr hu)] at h - exact mul_le_mul_of_nonneg_left h (by positivity) + exact mul_le_mul_of_nonneg_left (hM _) (by positivity) · rw [Set.indicator_of_notMem hu] - rw [Set.indicator_of_notMem (fun h' => hu (hset.mp h'))] at h - have : |iteratedDeriv k ϱ ((L / 2 - u) / w)| = 0 := le_antisymm h (abs_nonneg _) - rw [this, mul_zero] - -lemma abs_iteratedDeriv_fM_le (hϱ : GevreyProfile s A B ϱ) (hw : 0 < w) {k : ℕ} (hk : 1 ≤ k) - (u : ℝ) : |iteratedDeriv k (fM ϱ L w) u| - ≤ (Set.Ioo (-(L / 2)) (w - L / 2)).indicator (fun _ => (w⁻¹) ^ k * (B * A ^ k * (k : ℝ) ^ (s * k))) u := by - rw [iteratedDeriv_fM hϱ, abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ (w⁻¹) ^ k)] - have h := hϱ.abs_iteratedDeriv_le_indicator hk ((L / 2 + u) / w) - have hset : ((L / 2 + u) / w ∈ Set.Ioo (0:ℝ) 1) ↔ (u ∈ Set.Ioo (-(L / 2)) (w - L / 2)) := by - simp only [Set.mem_Ioo, div_pos_iff_of_pos_right hw, div_lt_one hw] - constructor <;> intro h' <;> constructor <;> linarith [h'.1, h'.2] + have hx : (L / 2 - u) / w ∉ Set.Ioo (0:ℝ) 1 := by + intro h; apply hu + simp only [Set.mem_Ioo, div_pos_iff_of_pos_right hw, div_lt_one hw] at h + constructor <;> linarith [h.1, h.2] + rw [iteratedDeriv_eq_zero_of_taper hϱ hk (hcd.continuous_iteratedDeriv k le_rfl) hx, + abs_zero, mul_zero] + +/-- Pointwise ramp majorant for `f₋^{(k)}` given any `C^k` taper profile with `|ϱ^{(k)}| ≤ M`. -/ +lemma abs_iteratedDeriv_fM_le_of_bound (hϱ : TaperProfile ϱ) {k : ℕ} (hk : 1 ≤ k) + (hcd : ContDiff ℝ (k : WithTop ℕ∞) ϱ) {M : ℝ} (hM : ∀ x : ℝ, |iteratedDeriv k ϱ x| ≤ M) + (hw : 0 < w) (u : ℝ) : + |iteratedDeriv k (fM ϱ L w) u| + ≤ (Set.Ioo (-(L / 2)) (w - L / 2)).indicator (fun _ => (w⁻¹) ^ k * M) u := by + rw [iteratedDeriv_fM_of_contDiff hcd, abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ (w⁻¹) ^ k)] by_cases hu : u ∈ Set.Ioo (-(L / 2)) (w - L / 2) · rw [Set.indicator_of_mem hu] - rw [Set.indicator_of_mem (hset.mpr hu)] at h - exact mul_le_mul_of_nonneg_left h (by positivity) + exact mul_le_mul_of_nonneg_left (hM _) (by positivity) · rw [Set.indicator_of_notMem hu] - rw [Set.indicator_of_notMem (fun h' => hu (hset.mp h'))] at h - have : |iteratedDeriv k ϱ ((L / 2 + u) / w)| = 0 := le_antisymm h (abs_nonneg _) - rw [this, mul_zero] + have hx : (L / 2 + u) / w ∉ Set.Ioo (0:ℝ) 1 := by + intro h; apply hu + simp only [Set.mem_Ioo, div_pos_iff_of_pos_right hw, div_lt_one hw] at h + constructor <;> linarith [h.1, h.2] + rw [iteratedDeriv_eq_zero_of_taper hϱ hk (hcd.continuous_iteratedDeriv k le_rfl) hx, + abs_zero, mul_zero] -/-- mixed Leibniz terms vanish: for `1 ≤ i`, `1 ≤ j` and `2w ≤ L`, +/-- Mixed Leibniz terms vanish: for `1 ≤ i`, `1 ≤ j` and `2w ≤ L`, `f₊^{(i)}(u)·f₋^{(j)}(u) = 0` (the open ramps are disjoint). -/ -lemma iteratedDeriv_fP_mul_fM_eq_zero (hϱ : GevreyProfile s A B ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) - {i j : ℕ} (hi : 1 ≤ i) (hj : 1 ≤ j) (u : ℝ) : +lemma iteratedDeriv_fP_mul_fM_eq_zero_of_contDiff (hϱ : TaperProfile ϱ) (hw : 0 < w) + (hwL : 2 * w ≤ L) {i j : ℕ} (hi : 1 ≤ i) (hj : 1 ≤ j) + (hci : ContDiff ℝ (i : WithTop ℕ∞) ϱ) (hcj : ContDiff ℝ (j : WithTop ℕ∞) ϱ) (u : ℝ) : iteratedDeriv i (fP ϱ L w) u * iteratedDeriv j (fM ϱ L w) u = 0 := by by_cases hu : u ∈ Set.Ioo (L / 2 - w) (L / 2) - · -- then u ∉ the other ramp - have hu' : (L / 2 + u) / w ∉ Set.Ioo (0:ℝ) 1 := by + · have hu' : (L / 2 + u) / w ∉ Set.Ioo (0:ℝ) 1 := by have h1 : 1 ≤ (L / 2 + u) / w := by rw [le_div_iff₀ hw]; linarith [hu.1] simp only [Set.mem_Ioo, not_and_or, not_lt] exact Or.inr h1 - rw [iteratedDeriv_fM hϱ, hϱ.iteratedDeriv_eq_zero hj hu']; ring + rw [iteratedDeriv_fM_of_contDiff hcj, + iteratedDeriv_eq_zero_of_taper hϱ hj (hcj.continuous_iteratedDeriv j le_rfl) hu']; ring · have hu' : (L / 2 - u) / w ∉ Set.Ioo (0:ℝ) 1 := by - intro h - apply hu + intro h; apply hu simp only [Set.mem_Ioo, div_pos_iff_of_pos_right hw, div_lt_one hw] at h constructor <;> linarith [h.1, h.2] - rw [iteratedDeriv_fP hϱ, hϱ.iteratedDeriv_eq_zero hi hu']; ring + rw [iteratedDeriv_fP_of_contDiff hci, + iteratedDeriv_eq_zero_of_taper hϱ hi (hci.continuous_iteratedDeriv i le_rfl) hu']; ring -/-- **|φ^{(k)}| ≤ |f₊^{(k)}| + |f₋^{(k)}|** for `k ≥ 1`. -/ -lemma abs_iteratedDeriv_phi_le (hϱ : GevreyProfile s A B ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) - {k : ℕ} (hk : 1 ≤ k) (u : ℝ) : +/-- **|φ^{(k)}| ≤ |f₊^{(k)}| + |f₋^{(k)}|** for any `C^k` taper profile (`k ≥ 1`, `2w ≤ L`). -/ +lemma abs_iteratedDeriv_phi_le_of_contDiff (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) + {k : ℕ} (hk : 1 ≤ k) (hcd : ContDiff ℝ (k : WithTop ℕ∞) ϱ) (u : ℝ) : |iteratedDeriv k (phi ϱ L w) u| ≤ |iteratedDeriv k (fP ϱ L w) u| + |iteratedDeriv k (fM ϱ L w) u| := by have hprod : phi ϱ L w = fP ϱ L w * fM ϱ L w := by - funext u; exact phi_eq_mul hϱ.taper hw hwL u - have hPk : ContDiffAt ℝ k (fP ϱ L w) u := ((fP_contDiff hϱ).of_le (WithTop.coe_le_coe.mpr le_top)).contDiffAt - have hMk : ContDiffAt ℝ k (fM ϱ L w) u := ((fM_contDiff hϱ).of_le (WithTop.coe_le_coe.mpr le_top)).contDiffAt + funext u; exact phi_eq_mul hϱ hw hwL u + have hPk : ContDiffAt ℝ k (fP ϱ L w) u := + (hcd.comp (by fun_prop : ContDiff ℝ (k : WithTop ℕ∞) fun u : ℝ => (L / 2 - u) / w)).contDiffAt + have hMk : ContDiffAt ℝ k (fM ϱ L w) u := + (hcd.comp (by fun_prop : ContDiff ℝ (k : WithTop ℕ∞) fun u : ℝ => (L / 2 + u) / w)).contDiffAt rw [hprod, iteratedDeriv_mul hPk hMk] have hk0 : (0:ℕ) ≠ k := by omega rw [Finset.sum_eq_add 0 k hk0] · simp only [Nat.choose_zero_right, Nat.cast_one, one_mul, iteratedDeriv_zero, Nat.sub_zero, Nat.choose_self, Nat.sub_self] have h0 : |fP ϱ L w u| ≤ 1 := by - unfold fP; rw [abs_of_nonneg (hϱ.taper.nonneg _)]; exact hϱ.taper.le_one _ + unfold fP; rw [abs_of_nonneg (hϱ.nonneg _)]; exact hϱ.le_one _ have h1 : |fM ϱ L w u| ≤ 1 := by - unfold fM; rw [abs_of_nonneg (hϱ.taper.nonneg _)]; exact hϱ.taper.le_one _ + unfold fM; rw [abs_of_nonneg (hϱ.nonneg _)]; exact hϱ.le_one _ calc |fP ϱ L w u * iteratedDeriv k (fM ϱ L w) u + iteratedDeriv k (fP ϱ L w) u * fM ϱ L w u| ≤ |fP ϱ L w u * iteratedDeriv k (fM ϱ L w) u| + |iteratedDeriv k (fP ϱ L w) u * fM ϱ L w u| := abs_add_le _ _ @@ -192,71 +172,57 @@ lemma abs_iteratedDeriv_phi_le (hϱ : GevreyProfile s A B ϱ) (hw : 0 < w) (hwL _ = _ := by ring · intro c hc hne have hc1 : 1 ≤ c := Nat.one_le_iff_ne_zero.mpr hne.1 - have hc2 : 1 ≤ k - c := by - have := Finset.mem_range.mp hc - omega - rw [mul_assoc, iteratedDeriv_fP_mul_fM_eq_zero hϱ hw hwL hc1 hc2, mul_zero] + have hcr := Finset.mem_range.mp hc + have hc2 : 1 ≤ k - c := by omega + rw [mul_assoc, iteratedDeriv_fP_mul_fM_eq_zero_of_contDiff hϱ hw hwL hc1 hc2 + (hcd.of_le (by exact_mod_cast (show c ≤ k by omega))) + (hcd.of_le (by exact_mod_cast (show k - c ≤ k by omega))), mul_zero] · intro h; exact absurd (Finset.mem_range.mpr (by omega)) h · intro h; exact absurd (Finset.mem_range.mpr (by omega)) h -/-- **Gevrey ramp lemma**: `‖φ^{(k)}‖_{L¹} ≤ 2B·w·(A/w)^k·k^{sk}` (`k ≥ 1`, `2w ≤ L`). -/ -theorem integral_abs_iteratedDeriv_phi_le (hϱ : GevreyProfile s A B ϱ) (hw : 0 < w) - (hwL : 2 * w ≤ L) {k : ℕ} (hk : 1 ≤ k) : - ∫ u, |iteratedDeriv k (phi ϱ L w) u| ≤ 2 * B * w * (A / w) ^ k * (k : ℝ) ^ (s * k) := by - set M : ℝ := (w⁻¹) ^ k * (B * A ^ k * (k : ℝ) ^ (s * k)) with hM - have hM0 : 0 ≤ M := by have := hϱ.A_pos; have := hϱ.B_pos; positivity +/-- **General ramp L¹ lemma**: `‖φ^{(k)}‖_{L¹} ≤ 2 · (w⁻¹)^k · M · w` for any `C^k` taper profile +with `|ϱ^{(k)}| ≤ M` (`k ≥ 1`, `2w ≤ L`). -/ +theorem integral_abs_iteratedDeriv_phi_le_of_bound (hϱ : TaperProfile ϱ) (hw : 0 < w) + (hwL : 2 * w ≤ L) {k : ℕ} (hk : 1 ≤ k) (hcd : ContDiff ℝ (k : WithTop ℕ∞) ϱ) + {M : ℝ} (hM : ∀ x : ℝ, |iteratedDeriv k ϱ x| ≤ M) : + ∫ u, |iteratedDeriv k (phi ϱ L w) u| ≤ 2 * ((w⁻¹) ^ k * M) * w := by + set C : ℝ := (w⁻¹) ^ k * M with hC set Rp := Set.Ioo (L / 2 - w) (L / 2) set Rm := Set.Ioo (-(L / 2)) (w - L / 2) - have hIp : Integrable (Rp.indicator fun _ => M) := - (integrable_indicator_iff measurableSet_Ioo).mpr (integrableOn_const (by simp [Rp])) - have hIm : Integrable (Rm.indicator fun _ => M) := - (integrable_indicator_iff measurableSet_Ioo).mpr (integrableOn_const (by simp [Rm])) + have hIp : Integrable (Rp.indicator fun _ => C) := + (integrable_indicator_iff measurableSet_Ioo).mpr (integrableOn_const (by simp)) + have hIm : Integrable (Rm.indicator fun _ => C) := + (integrable_indicator_iff measurableSet_Ioo).mpr (integrableOn_const (by simp)) have hmaj : ∀ u, |iteratedDeriv k (phi ϱ L w) u| - ≤ Rp.indicator (fun _ => M) u + Rm.indicator (fun _ => M) u := fun u => - (abs_iteratedDeriv_phi_le hϱ hw hwL hk u).trans - (add_le_add (abs_iteratedDeriv_fP_le hϱ hw hk u) (abs_iteratedDeriv_fM_le hϱ hw hk u)) - have hvol : ∀ a b : ℝ, b - a = w → ∫ u, (Set.Ioo a b).indicator (fun _ => M) u = M * w := by + ≤ Rp.indicator (fun _ => C) u + Rm.indicator (fun _ => C) u := fun u => + (abs_iteratedDeriv_phi_le_of_contDiff hϱ hw hwL hk hcd u).trans + (add_le_add (abs_iteratedDeriv_fP_le_of_bound hϱ hk hcd hM hw u) + (abs_iteratedDeriv_fM_le_of_bound hϱ hk hcd hM hw u)) + have hvol : ∀ a b : ℝ, b - a = w → ∫ u, (Set.Ioo a b).indicator (fun _ => C) u = C * w := by intro a b hab rw [integral_indicator_const _ measurableSet_Ioo, measureReal_def, Real.volume_Ioo, ENNReal.toReal_ofReal (by linarith), smul_eq_mul, hab, mul_comm] calc ∫ u, |iteratedDeriv k (phi ϱ L w) u| - ≤ ∫ u, (Rp.indicator (fun _ => M) u + Rm.indicator (fun _ => M) u) := + ≤ ∫ u, (Rp.indicator (fun _ => C) u + Rm.indicator (fun _ => C) u) := integral_mono_of_nonneg (Eventually.of_forall fun u => abs_nonneg _) (hIp.add hIm) (Eventually.of_forall hmaj) - _ = M * w + M * w := by + _ = C * w + C * w := by rw [integral_add hIp hIm, hvol _ _ (by ring), hvol _ _ (by ring)] - _ = 2 * B * w * (A / w) ^ k * (k : ℝ) ^ (s * k) := by - rw [hM, div_eq_mul_inv, mul_pow]; ring + _ = 2 * C * w := by ring + +/-- **Gevrey ramp lemma**: `‖φ^{(k)}‖_{L¹} ≤ 2B·w·(A/w)^k·k^{sk}` (`k ≥ 1`, `2w ≤ L`). -/ +theorem integral_abs_iteratedDeriv_phi_le (hϱ : GevreyProfile s A B ϱ) (hw : 0 < w) + (hwL : 2 * w ≤ L) {k : ℕ} (hk : 1 ≤ k) : + ∫ u, |iteratedDeriv k (phi ϱ L w) u| ≤ 2 * B * w * (A / w) ^ k * (k : ℝ) ^ (s * k) := by + have h := integral_abs_iteratedDeriv_phi_le_of_bound (L := L) hϱ.taper hw hwL hk + (hϱ.smooth.of_le (WithTop.coe_le_coe.mpr le_top)) (hϱ.bound k hk) + refine h.trans_eq ?_ + rw [div_eq_mul_inv, mul_pow]; ring end Ramps end Taper -/-- **Gevrey ramp lemma, in the `Params.GevreyPhiBound` interface**: a Gevrey-s profile makes -`P.phi T` a C^∞ window with ‖φ^{(k)}‖₁ ≤ 2B·w·(A/w)^k·k^{sk}. -/ -theorem Params.gevreyPhiBound_of_profile (P : Params) (T : ℝ) {s A B : ℝ} - (hϱ : Taper.GevreyProfile s A B P.ϱ) (hw : 0 < P.w) (h2w : 2 * P.w ≤ P.L T) : - P.GevreyPhiBound T s A B where - one_lt := hϱ.one_lt - A_pos := hϱ.A_pos - B_pos := hϱ.B_pos - smooth := by - have hprod : P.phi T = Taper.fP P.ϱ (P.L T) P.w * Taper.fM P.ϱ (P.L T) P.w := by - funext u; exact Taper.phi_eq_mul hϱ.taper hw h2w u - have h : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (P.phi T) := by - rw [hprod]; exact (Taper.fP_contDiff hϱ).mul (Taper.fM_contDiff hϱ) - exact Complex.ofRealCLM.contDiff.comp h - bound := by - intro k hk - have hprod : P.phi T = Taper.fP P.ϱ (P.L T) P.w * Taper.fM P.ϱ (P.L T) P.w := by - funext u; exact Taper.phi_eq_mul hϱ.taper hw h2w u - have hsm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (P.phi T) := by - rw [hprod]; exact (Taper.fP_contDiff hϱ).mul (Taper.fM_contDiff hϱ) - have h2 := Taper.iteratedDeriv_ofReal_comp (f := P.phi T) hsm k - rw [h2] - simp only [Complex.norm_real, Real.norm_eq_abs] - exact Taper.integral_abs_iteratedDeriv_phi_le hϱ hw h2w hk - end Zeta23 end diff --git a/zeta23/Zeta23/Taper/Norms.lean b/zeta23/Zeta23/Taper/Norms.lean index bacc3dc794..b12fd76e75 100644 --- a/zeta23/Zeta23/Taper/Norms.lean +++ b/zeta23/Zeta23/Taper/Norms.lean @@ -13,12 +13,6 @@ namespace Zeta23 namespace Taper -theorem taperProfile_smoothstep : TaperProfile smoothstep where - contDiff := Real.smoothTransition.contDiff - monotone := Real.smoothTransition.monotone - eq_zero := fun _ hx => Real.smoothTransition.zero_of_nonpos hx - eq_one := fun _ hx => Real.smoothTransition.one_of_one_le hx - /-! ### [eq:phinorms] -/ section Norms @@ -43,158 +37,123 @@ private lemma deriv_nonneg_of_monotone {f : ℝ → ℝ} (hf : Monotone f) {y : private lemma rho_differentiable (hϱ : TaperProfile ϱ) : Differentiable ℝ ϱ := hϱ.contDiff.differentiable (by norm_num) +/-- Even-integrand reduction: `∫ℝ |G| = 2∫₀^{L/2} |G|` for `|G|` even, `G = 0` off `[−L/2, L/2]`. -/ +private lemma integral_abs_eq_two_mul {G : ℝ → ℝ} {L : ℝ} (hL : 0 < L) (hcont : Continuous G) + (habs_even : ∀ u, |G (-u)| = |G u|) (hzero : ∀ u : ℝ, L / 2 < |u| → G u = 0) : + ∫ u, |G u| = 2 * ∫ u in (0 : ℝ)..(L / 2), |G u| := by + have heqIcc : ∫ u, |G u| = ∫ u in Icc (-(L / 2)) (L / 2), |G u| := by + refine (MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero fun u hu => ?_).symm + rw [mem_Icc, not_and_or, not_le, not_le] at hu + have habs : L / 2 < |u| := by + rcases hu with h | h + · linarith [neg_le_abs u] + · linarith [le_abs_self u] + rw [hzero u habs, abs_zero] + have hii : ∀ a b : ℝ, IntervalIntegrable (fun u => |G u|) volume a b := + fun a b => hcont.abs.intervalIntegrable a b + have hleft : ∫ u in (-(L / 2))..(0 : ℝ), |G u| = ∫ u in (0 : ℝ)..(L / 2), |G u| := by + have h1 := intervalIntegral.integral_comp_neg (a := (0 : ℝ)) (b := L / 2) (fun u => |G u|) + have h2 : (∫ x in (0 : ℝ)..(L / 2), |G (-x)|) = ∫ x in (0 : ℝ)..(L / 2), |G x| := + intervalIntegral.integral_congr fun x _ => habs_even x + rw [← h2, h1]; norm_num + rw [heqIcc, MeasureTheory.integral_Icc_eq_integral_Ioc, + ← intervalIntegral.integral_of_le (by linarith), + ← intervalIntegral.integral_add_adjacent_intervals (hii _ _) (hii _ _), hleft] + ring + /-- For u > 0, φ′(u) = −ϱ′((L/2 − u)/w)/w. -/ private lemma deriv_phi_pos (hϱ : TaperProfile ϱ) (_hw : 0 < w) {u : ℝ} (hu : 0 < u) : deriv (phi ϱ L w) u = -(deriv ϱ ((L / 2 - u) / w) / w) := by have hev : phi ϱ L w =ᶠ[nhds u] (fun v => ϱ ((L / 2 - v) / w)) := by filter_upwards [isOpen_Ioi.mem_nhds hu] with v hv - unfold phi - rw [abs_of_pos hv] + unfold phi; rw [abs_of_pos hv] rw [hev.deriv_eq] - have hg : HasDerivAt (fun v : ℝ => (L / 2 - v) / w) (-1 / w) u := by - have h1 : HasDerivAt (fun v : ℝ => L / 2 - v) (-1) u := (hasDerivAt_id u).const_sub (L / 2) - exact h1.div_const w - have hϱd : HasDerivAt ϱ (deriv ϱ ((L / 2 - u) / w)) ((L / 2 - u) / w) := - (rho_differentiable hϱ _).hasDerivAt + have hg : HasDerivAt (fun v : ℝ => (L / 2 - v) / w) (-1 / w) u := + ((hasDerivAt_id u).const_sub (L / 2)).div_const w have hcomp : HasDerivAt (fun v : ℝ => ϱ ((L / 2 - v) / w)) - (deriv ϱ ((L / 2 - u) / w) * (-1 / w)) u := hϱd.comp u hg - rw [hcomp.deriv] - ring + (deriv ϱ ((L / 2 - u) / w) * (-1 / w)) u := + ((rho_differentiable hϱ _).hasDerivAt).comp u hg + rw [hcomp.deriv]; ring -/-- ∫ℝ |F′| = 2 for an even C¹ bump: F(0) = 1, F = 0 off [−L/2, L/2], F′ ≤ 0 on (0,∞). -/ -private lemma integral_abs_deriv_eq_two {F : ℝ → ℝ} {L : ℝ} (hL : 0 < L) +private lemma deriv_phi_nonpos (hϱ : TaperProfile ϱ) (hw : 0 < w) {u : ℝ} (hu : 0 < u) : + deriv (phi ϱ L w) u ≤ 0 := by + rw [deriv_phi_pos hϱ hw hu] + have := div_nonneg (deriv_nonneg_of_monotone hϱ.monotone + (rho_differentiable hϱ ((L / 2 - u) / w))) hw.le + linarith + +/-- `∫ℝ |F′| = 2 · F(0)` for an even `C¹` bump with `F = 0` off `[−M, M]` and `F′ ≤ 0` on `(0,∞)` +(used both for `Taper.phi`/`phi²` here and for `integral_abs_deriv_le_two` in `ModWindow.lean`). -/ +theorem integral_abs_deriv_eq_two_mul {F : ℝ → ℝ} {M : ℝ} (hM : 0 < M) (hF : ContDiff ℝ 1 F) (heven : ∀ u, F (-u) = F u) (hnonpos : ∀ u : ℝ, 0 < u → deriv F u ≤ 0) - (hsupp : ∀ u : ℝ, L / 2 ≤ |u| → F u = 0) (hF0 : F 0 = 1) : - ∫ u, |deriv F u| = 2 := by + (hsupp : ∀ u : ℝ, M ≤ |u| → F u = 0) : + ∫ u, |deriv F u| = 2 * F 0 := by have hdcont : Continuous (deriv F) := hF.continuous_deriv le_rfl - have hodd : ∀ u : ℝ, deriv F (-u) = -(deriv F u) := by - intro u + have habs_even : ∀ u : ℝ, |deriv F (-u)| = |deriv F u| := fun u => by have h1 : deriv (fun x : ℝ => F (-x)) u = -deriv F (-u) := deriv_comp_neg F u - have h2 : (fun x : ℝ => F (-x)) = F := funext heven - rw [h2] at h1 - linarith - have hzero_out : ∀ u : ℝ, L / 2 < |u| → deriv F u = 0 := by - intro u hu - have hopen : IsOpen {v : ℝ | L / 2 < |v|} := isOpen_lt continuous_const continuous_abs + rw [show (fun x : ℝ => F (-x)) = F from funext heven] at h1 + rw [show deriv F (-u) = -deriv F u by linarith, abs_neg] + have hzero_out : ∀ u : ℝ, (2 * M) / 2 < |u| → deriv F u = 0 := fun u hu => by have hev : F =ᶠ[nhds u] (fun _ => (0 : ℝ)) := by - filter_upwards [hopen.mem_nhds hu] with v hv - exact hsupp v (le_of_lt hv) - rw [hev.deriv_eq] - simp - have heqIcc : ∫ u, |deriv F u| = ∫ u in Icc (-(L / 2)) (L / 2), |deriv F u| := by - refine (MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero fun u hu => ?_).symm - rw [mem_Icc, not_and_or, not_le, not_le] at hu - have : L / 2 < |u| := by - rcases hu with h | h - · calc L / 2 < -u := by linarith - _ ≤ |u| := neg_le_abs u - · calc L / 2 < u := h - _ ≤ |u| := le_abs_self u - rw [hzero_out u this, abs_zero] - have hIccIoc : ∫ u in Icc (-(L / 2)) (L / 2), |deriv F u| - = ∫ u in (-(L / 2))..(L / 2), |deriv F u| := by - rw [intervalIntegral.integral_of_le (by linarith), MeasureTheory.integral_Icc_eq_integral_Ioc] - have hii : ∀ a b : ℝ, IntervalIntegrable (fun u => |deriv F u|) MeasureTheory.volume a b := - fun a b => (hdcont.abs).intervalIntegrable a b - have hsplit : ∫ u in (-(L / 2))..(L / 2), |deriv F u| - = (∫ u in (-(L / 2))..(0 : ℝ), |deriv F u|) + ∫ u in (0 : ℝ)..(L / 2), |deriv F u| := - (intervalIntegral.integral_add_adjacent_intervals (hii _ _) (hii _ _)).symm - have hright : ∫ u in (0 : ℝ)..(L / 2), |deriv F u| = 1 := by - have habs : ∫ u in (0 : ℝ)..(L / 2), |deriv F u| - = ∫ u in (0 : ℝ)..(L / 2), -(deriv F u) := by - rw [intervalIntegral.integral_of_le (by linarith), intervalIntegral.integral_of_le - (by linarith)] - refine MeasureTheory.setIntegral_congr_fun measurableSet_Ioc fun u hu => ?_ - exact abs_of_nonpos (hnonpos u hu.1) + filter_upwards [(isOpen_lt continuous_const continuous_abs).mem_nhds + (by linarith : M < |u|)] with v hv + exact hsupp v hv.le + rw [hev.deriv_eq]; simp + rw [integral_abs_eq_two_mul (L := 2 * M) (by linarith) hdcont habs_even hzero_out, + show (2 * M) / 2 = M by ring] + have hright : ∫ u in (0 : ℝ)..M, |deriv F u| = F 0 := by + have habs : ∫ u in (0 : ℝ)..M, |deriv F u| = ∫ u in (0 : ℝ)..M, -(deriv F u) := by + rw [intervalIntegral.integral_of_le hM.le, intervalIntegral.integral_of_le hM.le] + exact MeasureTheory.setIntegral_congr_fun measurableSet_Ioc fun u hu => abs_of_nonpos (hnonpos u hu.1) rw [habs, intervalIntegral.integral_neg, intervalIntegral.integral_deriv_eq_sub - (fun x _ => (hF.differentiable (by norm_num)).differentiableAt) (hdcont.intervalIntegrable _ _)] - rw [hsupp (L / 2) (by rw [abs_of_pos (by linarith)]), hF0] + (fun x _ => (hF.differentiable (by norm_num)).differentiableAt) (hdcont.intervalIntegrable _ _), + hsupp M (by rw [abs_of_pos hM])] ring - have hleft : ∫ u in (-(L / 2))..(0 : ℝ), |deriv F u| - = ∫ u in (0 : ℝ)..(L / 2), |deriv F u| := by - have h1 := intervalIntegral.integral_comp_neg (a := (0 : ℝ)) (b := L / 2) - (fun u => |deriv F u|) - have h2 : (∫ x in (0 : ℝ)..(L / 2), |deriv F (-x)|) - = ∫ x in (0 : ℝ)..(L / 2), |deriv F x| := by - refine intervalIntegral.integral_congr fun x _ => ?_ - rw [hodd, abs_neg] - rw [← h2, h1] - norm_num - rw [heqIcc, hIccIoc, hsplit, hleft, hright] - ring + rw [hright] /-- [eq:phinorms]: "`‖φ'‖₁ = 2`". -/ theorem integral_abs_deriv_phi (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : ∫ u, |deriv (phi ϱ L w) u| = 2 := by - refine integral_abs_deriv_eq_two (by linarith) ((phi_contDiff hϱ hw hwL).of_le (by norm_num)) - phi_even (fun u hu => ?_) (fun u hu => phi_eq_zero hϱ hw hu) (phi_eq_one hϱ hw (by - rw [abs_zero]; linarith)) - rw [deriv_phi_pos hϱ hw hu] - have h1 : 0 ≤ deriv ϱ ((L / 2 - u) / w) := - deriv_nonneg_of_monotone hϱ.monotone (rho_differentiable hϱ _) - have h2 : 0 ≤ deriv ϱ ((L / 2 - u) / w) / w := div_nonneg h1 hw.le - linarith + rw [integral_abs_deriv_eq_two_mul (M := L / 2) (by linarith) + ((phi_contDiff hϱ hw hwL).of_le (by norm_num)) phi_even + (fun _ hu => deriv_phi_nonpos hϱ hw hu) (fun _ hu => phi_eq_zero hϱ hw hu), + phi_eq_one hϱ hw (by rw [abs_zero]; linarith), mul_one] /-- [eq:phinorms]: "`‖(φ²)'‖₁ = 2`". -/ theorem integral_abs_deriv_phi_sq (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : ∫ u, |deriv (fun u => phi ϱ L w u ^ 2) u| = 2 := by have hφ1 : ContDiff ℝ 1 (phi ϱ L w) := (phi_contDiff hϱ hw hwL).of_le (by norm_num) - have hderiv_sq : ∀ u : ℝ, deriv (fun u => phi ϱ L w u ^ 2) u - = 2 * phi ϱ L w u * deriv (phi ϱ L w) u := by - intro u - have hd : HasDerivAt (phi ϱ L w) (deriv (phi ϱ L w) u) u := - ((hφ1.differentiable (by norm_num)) u).hasDerivAt - have hpow : HasDerivAt (fun v => phi ϱ L w v ^ 2) - ((2 : ℕ) * phi ϱ L w u ^ (2 - 1) * deriv (phi ϱ L w) u) u := hd.pow 2 - rw [hpow.deriv] - norm_num - refine integral_abs_deriv_eq_two (L := L) (by linarith) (hφ1.pow 2) - (fun u => by rw [phi_even]) (fun u hu => ?_) (fun u hu => by - rw [phi_eq_zero hϱ hw hu]; ring) (by - rw [phi_eq_one hϱ hw (by rw [abs_zero]; linarith)]; ring) - rw [hderiv_sq u] - have h1 : 0 ≤ phi ϱ L w u := phi_nonneg hϱ u - have h2 : deriv (phi ϱ L w) u ≤ 0 := by - rw [deriv_phi_pos hϱ hw hu] - have := deriv_nonneg_of_monotone hϱ.monotone - (rho_differentiable hϱ ((L / 2 - u) / w)) - have h3 : 0 ≤ deriv ϱ ((L / 2 - u) / w) / w := div_nonneg this hw.le - linarith - nlinarith - - -/-- deriv ϱ vanishes left of 0 (ϱ is locally 0 there). -/ -private lemma derivRho_zero_left (hϱ : TaperProfile ϱ) {x : ℝ} (hx : x < 0) : deriv ϱ x = 0 := by - have hev : ϱ =ᶠ[nhds x] (fun _ => (0 : ℝ)) := by - filter_upwards [isOpen_Iio.mem_nhds hx] with v hv - exact hϱ.eq_zero v (le_of_lt hv) - rw [hev.deriv_eq] - simp - -/-- deriv ϱ vanishes right of 1 (ϱ is locally 1 there). -/ -private lemma derivRho_zero_right (hϱ : TaperProfile ϱ) {x : ℝ} (hx : 1 < x) : deriv ϱ x = 0 := by - have hev : ϱ =ᶠ[nhds x] (fun _ => (1 : ℝ)) := by - filter_upwards [isOpen_Ioi.mem_nhds hx] with v hv - exact hϱ.eq_one v (le_of_lt hv) - rw [hev.deriv_eq] - simp + rw [integral_abs_deriv_eq_two_mul (M := L / 2) (by linarith) (hφ1.pow 2) + (fun _ => by rw [phi_even]) (fun u hu => ?_) + (fun _ hu => by rw [phi_eq_zero hϱ hw hu]; ring), + phi_eq_one hϱ hw (by rw [abs_zero]; linarith)] + · ring + · have hpow : HasDerivAt (fun v => phi ϱ L w v ^ 2) + ((2 : ℕ) * phi ϱ L w u ^ (2 - 1) * deriv (phi ϱ L w) u) u := + (((hφ1.differentiable (by norm_num)) u).hasDerivAt).pow 2 + rw [hpow.deriv]; norm_num + exact mul_nonpos_of_nonneg_of_nonpos (by linarith [phi_nonneg hϱ (L := L) (w := w) u]) + (deriv_phi_nonpos hϱ hw hu) + +private lemma deriv_eq_zero_of_eqOn_open {g : ℝ → ℝ} {S : Set ℝ} {c : ℝ} (hS : IsOpen S) + (hg : ∀ v ∈ S, g v = c) {x : ℝ} (hx : x ∈ S) : deriv g x = 0 := by + have hev : g =ᶠ[nhds x] fun _ => c := by filter_upwards [hS.mem_nhds hx] with v hv using hg v hv + rw [hev.deriv_eq, deriv_const] + +private lemma derivRho_zero_left (hϱ : TaperProfile ϱ) {x : ℝ} (hx : x < 0) : deriv ϱ x = 0 := + deriv_eq_zero_of_eqOn_open isOpen_Iio (fun v hv => hϱ.eq_zero v hv.le) hx + +private lemma derivRho_zero_right (hϱ : TaperProfile ϱ) {x : ℝ} (hx : 1 < x) : deriv ϱ x = 0 := + deriv_eq_zero_of_eqOn_open isOpen_Ioi (fun v hv => hϱ.eq_one v hv.le) hx private lemma derivRho2_zero_left (hϱ : TaperProfile ϱ) {x : ℝ} (hx : x < 0) : - deriv (deriv ϱ) x = 0 := by - have hev : deriv ϱ =ᶠ[nhds x] (fun _ => (0 : ℝ)) := by - filter_upwards [isOpen_Iio.mem_nhds hx] with v hv - exact derivRho_zero_left hϱ hv - rw [hev.deriv_eq] - simp + deriv (deriv ϱ) x = 0 := + deriv_eq_zero_of_eqOn_open isOpen_Iio (fun _ hv => derivRho_zero_left hϱ hv) hx private lemma derivRho2_zero_right (hϱ : TaperProfile ϱ) {x : ℝ} (hx : 1 < x) : - deriv (deriv ϱ) x = 0 := by - have hev : deriv ϱ =ᶠ[nhds x] (fun _ => (0 : ℝ)) := by - filter_upwards [isOpen_Ioi.mem_nhds hx] with v hv - exact derivRho_zero_right hϱ hv - rw [hev.deriv_eq] - simp + deriv (deriv ϱ) x = 0 := + deriv_eq_zero_of_eqOn_open isOpen_Ioi (fun _ hv => derivRho_zero_right hϱ hv) hx private lemma derivRho_continuous (hϱ : TaperProfile ϱ) : Continuous (deriv ϱ) := hϱ.contDiff.continuous_deriv (by norm_num) @@ -224,46 +183,35 @@ private lemma l1Deriv2_nonneg (ϱ : ℝ → ℝ) : 0 ≤ l1Deriv2 ϱ := private lemma deriv_phi_odd (_hϱ : TaperProfile ϱ) (v : ℝ) : deriv (phi ϱ L w) (-v) = -(deriv (phi ϱ L w) v) := by - have h1 : deriv (fun x : ℝ => phi ϱ L w (-x)) v = -deriv (phi ϱ L w) (-v) := - deriv_comp_neg _ _ - have h2 : (fun x : ℝ => phi ϱ L w (-x)) = phi ϱ L w := funext fun x => phi_even x - rw [h2] at h1 + have h1 : deriv (fun x : ℝ => phi ϱ L w (-x)) v = -deriv (phi ϱ L w) (-v) := deriv_comp_neg _ _ + rw [show (fun x : ℝ => phi ϱ L w (-x)) = phi ϱ L w from funext fun x => phi_even x] at h1 linarith /-- [eq:phinorms]: "`‖φ'‖_∞ = ‖ϱ'‖_∞ / w`" (we record `≤`, which is what is used). -/ theorem abs_deriv_phi_le (hϱ : TaperProfile ϱ) (hw : 0 < w) (_hwL : 2 * w ≤ L) (u : ℝ) : |deriv (phi ϱ L w) u| ≤ supDeriv ϱ / w := by - have key : ∀ v : ℝ, 0 < v → |deriv (phi ϱ L w) v| ≤ supDeriv ϱ / w := by - intro v hv + have key : ∀ v : ℝ, 0 < v → |deriv (phi ϱ L w) v| ≤ supDeriv ϱ / w := fun v hv => by rw [deriv_phi_pos hϱ hw hv, abs_neg, abs_div, abs_of_pos hw] - gcongr - exact abs_derivRho_le hϱ _ - rcases lt_trichotomy u 0 with hu | hu | hu - · have heq : deriv (phi ϱ L w) u = -(deriv (phi ϱ L w) (-u)) := by - have := deriv_phi_odd hϱ (L := L) (w := w) (-u) - rwa [neg_neg] at this - rw [heq, abs_neg] + exact div_le_div_of_nonneg_right (abs_derivRho_le hϱ _) hw.le + rcases lt_trichotomy u 0 with hu | rfl | hu + · have heq := deriv_phi_odd hϱ (L := L) (w := w) (-u) + rw [neg_neg] at heq + rw [show deriv (phi ϱ L w) u = -deriv (phi ϱ L w) (-u) by linarith, abs_neg] exact key (-u) (by linarith) - · subst hu - have h0 : deriv (phi ϱ L w) 0 = 0 := by - have := deriv_phi_odd hϱ (L := L) (w := w) 0 - rw [neg_zero] at this - linarith - rw [h0, abs_zero] - have := supDeriv_nonneg hϱ - positivity + · have h0 := deriv_phi_odd hϱ (L := L) (w := w) 0 + rw [neg_zero] at h0 + rw [show deriv (phi ϱ L w) 0 = 0 by linarith, abs_zero] + exact div_nonneg (supDeriv_nonneg hϱ) hw.le · exact key u hu /-- For u > 0, φ″(u) = ϱ″((L/2 − u)/w)/w². -/ private lemma deriv2_phi_pos (hϱ : TaperProfile ϱ) (hw : 0 < w) {u : ℝ} (hu : 0 < u) : deriv (deriv (phi ϱ L w)) u = deriv (deriv ϱ) ((L / 2 - u) / w) / w ^ 2 := by have hev : deriv (phi ϱ L w) =ᶠ[nhds u] (fun v => -(deriv ϱ ((L / 2 - v) / w) / w)) := by - filter_upwards [isOpen_Ioi.mem_nhds hu] with v hv - exact deriv_phi_pos hϱ hw hv + filter_upwards [isOpen_Ioi.mem_nhds hu] with v hv using deriv_phi_pos hϱ hw hv rw [hev.deriv_eq] - have hg : HasDerivAt (fun v : ℝ => (L / 2 - v) / w) (-1 / w) u := by - have h1 : HasDerivAt (fun v : ℝ => L / 2 - v) (-1) u := (hasDerivAt_id u).const_sub (L / 2) - exact h1.div_const w + have hg : HasDerivAt (fun v : ℝ => (L / 2 - v) / w) (-1 / w) u := + ((hasDerivAt_id u).const_sub (L / 2)).div_const w have hd2 : HasDerivAt (deriv ϱ) (deriv (deriv ϱ) ((L / 2 - u) / w)) ((L / 2 - u) / w) := ((hϱ.contDiff.deriv' (n := 2)).differentiable (by norm_num) _).hasDerivAt have hcomp0 : HasDerivAt ((deriv ϱ) ∘ fun v : ℝ => (L / 2 - v) / w) @@ -272,40 +220,7 @@ private lemma deriv2_phi_pos (hϱ : TaperProfile ϱ) (hw : 0 < w) {u : ℝ} (hu (deriv (deriv ϱ) ((L / 2 - u) / w) * (-1 / w)) u := hcomp0 have hneg : HasDerivAt (fun v : ℝ => -(deriv ϱ ((L / 2 - v) / w) / w)) (-(deriv (deriv ϱ) ((L / 2 - u) / w) * (-1 / w) / w)) u := (hcomp.div_const w).neg - rw [hneg.deriv] - field_simp - -/-- Even-integrand reduction: ∫ℝ |G| = 2∫₀^{L/2} |G| for |G| even, G = 0 off [−L/2, L/2]. -/ -private lemma integral_abs_eq_two_mul {G : ℝ → ℝ} {L : ℝ} (hL : 0 < L) (hcont : Continuous G) - (habs_even : ∀ u, |G (-u)| = |G u|) (hzero : ∀ u : ℝ, L / 2 < |u| → G u = 0) : - ∫ u, |G u| = 2 * ∫ u in (0 : ℝ)..(L / 2), |G u| := by - have heqIcc : ∫ u, |G u| = ∫ u in Icc (-(L / 2)) (L / 2), |G u| := by - refine (MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero fun u hu => ?_).symm - rw [mem_Icc, not_and_or, not_le, not_le] at hu - have habs : L / 2 < |u| := by - rcases hu with h | h - · calc L / 2 < -u := by linarith - _ ≤ |u| := neg_le_abs u - · calc L / 2 < u := h - _ ≤ |u| := le_abs_self u - rw [hzero u habs, abs_zero] - have hIccIoc : ∫ u in Icc (-(L / 2)) (L / 2), |G u| - = ∫ u in (-(L / 2))..(L / 2), |G u| := by - rw [intervalIntegral.integral_of_le (by linarith), MeasureTheory.integral_Icc_eq_integral_Ioc] - have hii : ∀ a b : ℝ, IntervalIntegrable (fun u => |G u|) MeasureTheory.volume a b := - fun a b => (hcont.abs).intervalIntegrable a b - have hsplit : ∫ u in (-(L / 2))..(L / 2), |G u| - = (∫ u in (-(L / 2))..(0 : ℝ), |G u|) + ∫ u in (0 : ℝ)..(L / 2), |G u| := - (intervalIntegral.integral_add_adjacent_intervals (hii _ _) (hii _ _)).symm - have hleft : ∫ u in (-(L / 2))..(0 : ℝ), |G u| = ∫ u in (0 : ℝ)..(L / 2), |G u| := by - have h1 := intervalIntegral.integral_comp_neg (a := (0 : ℝ)) (b := L / 2) - (fun u => |G u|) - have h2 : (∫ x in (0 : ℝ)..(L / 2), |G (-x)|) = ∫ x in (0 : ℝ)..(L / 2), |G x| := - intervalIntegral.integral_congr fun x _ => habs_even x - rw [← h2, h1] - norm_num - rw [heqIcc, hIccIoc, hsplit, hleft] - ring + rw [hneg.deriv]; field_simp private lemma deriv_phi_contDiff (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : ContDiff ℝ 2 (deriv (phi ϱ L w)) := @@ -313,29 +228,19 @@ private lemma deriv_phi_contDiff (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * private lemma deriv2_phi_even (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) (v : ℝ) : deriv (deriv (phi ϱ L w)) (-v) = deriv (deriv (phi ϱ L w)) v := by - have h1 : deriv (fun x : ℝ => deriv (phi ϱ L w) (-x)) v - = -deriv (deriv (phi ϱ L w)) (-v) := deriv_comp_neg _ _ - have h2 : (fun x : ℝ => deriv (phi ϱ L w) (-x)) = fun x => -(deriv (phi ϱ L w) x) := - funext (deriv_phi_odd hϱ) - rw [h2] at h1 - have h3 : deriv (fun x : ℝ => -(deriv (phi ϱ L w) x)) v - = -(deriv (deriv (phi ϱ L w)) v) := + have h1 : deriv (fun x : ℝ => deriv (phi ϱ L w) (-x)) v = -deriv (deriv (phi ϱ L w)) (-v) := + deriv_comp_neg _ _ + have h3 : deriv (fun x : ℝ => -(deriv (phi ϱ L w) x)) v = -(deriv (deriv (phi ϱ L w)) v) := ((((deriv_phi_contDiff hϱ hw hwL).differentiable (by norm_num)) v).hasDerivAt.neg).deriv - rw [h3] at h1 + rw [show (fun x : ℝ => deriv (phi ϱ L w) (-x)) = fun x => -(deriv (phi ϱ L w) x) from + funext (deriv_phi_odd hϱ), h3] at h1 linarith private lemma deriv2_phi_zero_out (hϱ : TaperProfile ϱ) (hw : 0 < w) {u : ℝ} - (hu : L / 2 < |u|) : deriv (deriv (phi ϱ L w)) u = 0 := by - have hopen : IsOpen {v : ℝ | L / 2 < |v|} := isOpen_lt continuous_const continuous_abs - have hev : deriv (phi ϱ L w) =ᶠ[nhds u] (fun _ => (0 : ℝ)) := by - filter_upwards [hopen.mem_nhds hu] with v hv - have hφ0 : phi ϱ L w =ᶠ[nhds v] (fun _ => (0 : ℝ)) := by - filter_upwards [hopen.mem_nhds hv] with x hx - exact phi_eq_zero hϱ hw (le_of_lt hx) - rw [hφ0.deriv_eq] - simp - rw [hev.deriv_eq] - simp + (hu : L / 2 < |u|) : deriv (deriv (phi ϱ L w)) u = 0 := + deriv_eq_zero_of_eqOn_open (isOpen_lt continuous_const continuous_abs) + (fun _ hv => deriv_eq_zero_of_eqOn_open (isOpen_lt continuous_const continuous_abs) + (fun _ hx => phi_eq_zero hϱ hw hx.le) hv) hu /-- [eq:phinorms]: "`‖φ''‖₁ = 2‖ϱ''‖₁ / w`". -/ theorem integral_abs_deriv2_phi (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : @@ -344,45 +249,34 @@ theorem integral_abs_deriv2_phi (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * have hcont2 : Continuous (deriv (deriv (phi ϱ L w))) := (deriv_phi_contDiff hϱ hw hwL).continuous_deriv (by norm_num) rw [integral_abs_eq_two_mul hL hcont2 - (fun u => by rw [deriv2_phi_even hϱ hw hwL]) (fun u hu => deriv2_phi_zero_out hϱ hw hu)] + (fun u => by rw [deriv2_phi_even hϱ hw hwL]) (fun _ hu => deriv2_phi_zero_out hϱ hw hu)] have hcongr : ∫ u in (0 : ℝ)..(L / 2), |deriv (deriv (phi ϱ L w)) u| = ∫ u in (0 : ℝ)..(L / 2), |deriv (deriv ϱ) ((L / 2 - u) / w)| / w ^ 2 := by - rw [intervalIntegral.integral_of_le (by linarith), intervalIntegral.integral_of_le - (by linarith)] - refine MeasureTheory.setIntegral_congr_fun measurableSet_Ioc fun u hu => ?_ - rw [deriv2_phi_pos hϱ hw hu.1, abs_div, abs_of_pos (by positivity : (0 : ℝ) < w ^ 2)] - rw [hcongr] - have hsub1 : ∫ u in (0 : ℝ)..(L / 2), |deriv (deriv ϱ) ((L / 2 - u) / w)| / w ^ 2 - = ∫ y in (0 : ℝ)..(L / 2), |deriv (deriv ϱ) (y / w)| / w ^ 2 := by - have h := intervalIntegral.integral_comp_sub_left (a := (0 : ℝ)) (b := L / 2) - (fun y => |deriv (deriv ϱ) (y / w)| / w ^ 2) (L / 2) - simpa using h + rw [intervalIntegral.integral_of_le (by linarith), intervalIntegral.integral_of_le (by linarith)] + exact MeasureTheory.setIntegral_congr_fun measurableSet_Ioc fun u hu => by + rw [deriv2_phi_pos hϱ hw hu.1, abs_div, abs_of_pos (by positivity : (0 : ℝ) < w ^ 2)] + rw [hcongr, intervalIntegral.integral_div] + have hsub1 : ∫ u in (0 : ℝ)..(L / 2), |deriv (deriv ϱ) ((L / 2 - u) / w)| + = ∫ y in (0 : ℝ)..(L / 2), |deriv (deriv ϱ) (y / w)| := by + simpa using intervalIntegral.integral_comp_sub_left (a := (0 : ℝ)) (b := L / 2) + (fun y => |deriv (deriv ϱ) (y / w)|) (L / 2) rw [hsub1] - have hdiv : ∫ y in (0 : ℝ)..(L / 2), |deriv (deriv ϱ) (y / w)| / w ^ 2 - = (∫ y in (0 : ℝ)..(L / 2), |deriv (deriv ϱ) (y / w)|) / w ^ 2 := - intervalIntegral.integral_div _ _ - rw [hdiv] have hsub2 : ∫ y in (0 : ℝ)..(L / 2), |deriv (deriv ϱ) (y / w)| = w * ∫ y in (0 : ℝ)..(L / (2 * w)), |deriv (deriv ϱ) y| := by - have h := intervalIntegral.integral_comp_div (a := (0 : ℝ)) (b := L / 2) - (f := fun y => |deriv (deriv ϱ) y|) (ne_of_gt hw) - rw [h, smul_eq_mul] + rw [intervalIntegral.integral_comp_div (a := (0 : ℝ)) (b := L / 2) + (f := fun y => |deriv (deriv ϱ) y|) hw.ne', smul_eq_mul] norm_num [div_div] rw [hsub2] have hfull : ∫ y in (0 : ℝ)..(L / (2 * w)), |deriv (deriv ϱ) y| = l1Deriv2 ϱ := by - have hone : (1 : ℝ) ≤ L / (2 * w) := by - rw [le_div_iff₀ (by positivity)] - linarith + have hone : (1 : ℝ) ≤ L / (2 * w) := by rw [le_div_iff₀ (by positivity)]; linarith unfold l1Deriv2 - rw [intervalIntegral.integral_of_le (by linarith), - ← MeasureTheory.integral_Icc_eq_integral_Ioc] - refine (MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero fun x hx => ?_).symm.symm + rw [intervalIntegral.integral_of_le (by linarith), ← MeasureTheory.integral_Icc_eq_integral_Ioc] + refine MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero fun x hx => ?_ rw [mem_Icc, not_and_or, not_le, not_le] at hx rcases hx with h | h · rw [derivRho2_zero_left hϱ h, abs_zero] · rw [derivRho2_zero_right hϱ (by linarith), abs_zero] - rw [hfull] - field_simp + rw [hfull]; field_simp /-- [eq:phinorms]: "`‖(φ²)''‖₁ ≤ c_ϱ / w`" (uses `w ≥ 1`). -/ theorem integral_abs_deriv2_phi_sq_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) : @@ -391,113 +285,69 @@ theorem integral_abs_deriv2_phi_sq_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hw have hφ := phi_contDiff hϱ hw0 hwL have hφd : Differentiable ℝ (phi ϱ L w) := hφ.differentiable (by norm_num) have hφ'c : ContDiff ℝ 2 (deriv (phi ϱ L w)) := deriv_phi_contDiff hϱ hw0 hwL - have hφ'd : Differentiable ℝ (deriv (phi ϱ L w)) := hφ'c.differentiable (by norm_num) - have hφ'cont : Continuous (deriv (phi ϱ L w)) := hφ'c.continuous - have hφ''cont : Continuous (deriv (deriv (phi ϱ L w))) := hφ'c.continuous_deriv (by norm_num) have hφcs := phi_hasCompactSupport hϱ (L := L) hw0 - have hφ'cs : HasCompactSupport (deriv (phi ϱ L w)) := hφcs.deriv - have hφ''cs : HasCompactSupport (deriv (deriv (phi ϱ L w))) := hφ'cs.deriv - have hsq1 : deriv (fun v => phi ϱ L w v ^ 2) - = fun v => 2 * phi ϱ L w v * deriv (phi ϱ L w) v := by + have hsq1 : deriv (fun v => phi ϱ L w v ^ 2) = fun v => 2 * phi ϱ L w v * deriv (phi ϱ L w) v := by funext v - have hd : HasDerivAt (phi ϱ L w) (deriv (phi ϱ L w) v) v := (hφd v).hasDerivAt have hpow : HasDerivAt (fun x => phi ϱ L w x ^ 2) - ((2 : ℕ) * phi ϱ L w v ^ (2 - 1) * deriv (phi ϱ L w) v) v := hd.pow 2 - rw [hpow.deriv] - norm_num + ((2 : ℕ) * phi ϱ L w v ^ (2 - 1) * deriv (phi ϱ L w) v) v := (hφd v).hasDerivAt.pow 2 + rw [hpow.deriv]; norm_num have hid : ∀ u : ℝ, deriv (deriv (fun v => phi ϱ L w v ^ 2)) u = 2 * deriv (phi ϱ L w) u * deriv (phi ϱ L w) u - + 2 * phi ϱ L w u * deriv (deriv (phi ϱ L w)) u := by - intro u + + 2 * phi ϱ L w u * deriv (deriv (phi ϱ L w)) u := fun u => by rw [hsq1] - have h1 : HasDerivAt (fun v => 2 * phi ϱ L w v) (2 * deriv (phi ϱ L w) u) u := - (hφd u).hasDerivAt.const_mul 2 - have h2 : HasDerivAt (deriv (phi ϱ L w)) (deriv (deriv (phi ϱ L w)) u) u := - (hφ'd u).hasDerivAt have h3 : HasDerivAt (fun v => 2 * phi ϱ L w v * deriv (phi ϱ L w) v) (2 * deriv (phi ϱ L w) u * deriv (phi ϱ L w) u - + 2 * phi ϱ L w u * deriv (deriv (phi ϱ L w)) u) u := by - exact h1.mul h2 - rw [h3.deriv] - have hint_absphi' : MeasureTheory.Integrable (fun u => |deriv (phi ϱ L w) u|) := - (hφ'cont.abs).integrable_of_hasCompactSupport - (hφ'cs.comp_left (g := fun t => |t|) abs_zero) - have hint_absphi'' : MeasureTheory.Integrable (fun u => |deriv (deriv (phi ϱ L w)) u|) := - (hφ''cont.abs).integrable_of_hasCompactSupport - (hφ''cs.comp_left (g := fun t => |t|) abs_zero) - have hφsqc : ContDiff ℝ 3 (fun v => phi ϱ L w v ^ 2) := hφ.pow 2 - have hφsq''cont : Continuous (deriv (deriv (fun v => phi ϱ L w v ^ 2))) := - (hφsqc.deriv' (n := 2)).continuous_deriv (by norm_num) - have hφsqcs : HasCompactSupport (fun v => phi ϱ L w v ^ 2) := - hφcs.comp_left (g := fun t => t ^ 2) (by norm_num) - have hφsq''cs : HasCompactSupport (deriv (deriv (fun v => phi ϱ L w v ^ 2))) := - hφsqcs.deriv.deriv - have hint_lhs : MeasureTheory.Integrable - (fun u => |deriv (deriv (fun v => phi ϱ L w v ^ 2)) u|) := - (hφsq''cont.abs).integrable_of_hasCompactSupport - (hφsq''cs.comp_left (g := fun t => |t|) abs_zero) - have hmaj : MeasureTheory.Integrable - (fun u => 2 * (supDeriv ϱ / w) * |deriv (phi ϱ L w) u| - + 2 * |deriv (deriv (phi ϱ L w)) u|) := - (hint_absphi'.const_mul _).add (hint_absphi''.const_mul 2) + + 2 * phi ϱ L w u * deriv (deriv (phi ϱ L w)) u) u := + ((hφd u).hasDerivAt.const_mul 2).mul ((hφ'c.differentiable (by norm_num) u).hasDerivAt) + exact h3.deriv + have hint1 : Integrable (fun u => |deriv (phi ϱ L w) u|) := + hφ'c.continuous.abs.integrable_of_hasCompactSupport + (hφcs.deriv.comp_left (g := fun t => |t|) abs_zero) + have hint2 : Integrable (fun u => |deriv (deriv (phi ϱ L w)) u|) := + (hφ'c.continuous_deriv (by norm_num)).abs.integrable_of_hasCompactSupport + (hφcs.deriv.deriv.comp_left (g := fun t => |t|) abs_zero) + have hint_lhs : Integrable (fun u => |deriv (deriv (fun v => phi ϱ L w v ^ 2)) u|) := + (((hφ.pow 2).deriv' (n := 2)).continuous_deriv (by norm_num)).abs.integrable_of_hasCompactSupport + (((hφcs.comp_left (g := fun t => t ^ 2) (by norm_num)).deriv.deriv).comp_left + (g := fun t => |t|) abs_zero) calc ∫ u, |deriv (deriv (fun u => phi ϱ L w u ^ 2)) u| - ≤ ∫ u, (2 * (supDeriv ϱ / w) * |deriv (phi ϱ L w) u| - + 2 * |deriv (deriv (phi ϱ L w)) u|) := by - refine MeasureTheory.integral_mono hint_lhs hmaj fun u => ?_ + ≤ ∫ u, (2 * (supDeriv ϱ / w) * |deriv (phi ϱ L w) u| + 2 * |deriv (deriv (phi ϱ L w)) u|) := by + refine MeasureTheory.integral_mono hint_lhs ((hint1.const_mul _).add (hint2.const_mul 2)) fun u => ?_ rw [hid u] - have hsup := abs_deriv_phi_le hϱ hw0 hwL u have h1 : |2 * deriv (phi ϱ L w) u * deriv (phi ϱ L w) u| ≤ 2 * (supDeriv ϱ / w) * |deriv (phi ϱ L w) u| := by - rw [abs_mul, abs_mul] - rw [show |(2 : ℝ)| = 2 by norm_num] - have habs0 : (0 : ℝ) ≤ |deriv (phi ϱ L w) u| := abs_nonneg _ - have := mul_le_mul_of_nonneg_right hsup habs0 - nlinarith + rw [abs_mul, abs_mul, abs_two] + nlinarith [mul_le_mul_of_nonneg_right (abs_deriv_phi_le hϱ hw0 hwL u) (abs_nonneg (deriv (phi ϱ L w) u))] have h2 : |2 * phi ϱ L w u * deriv (deriv (phi ϱ L w)) u| ≤ 2 * |deriv (deriv (phi ϱ L w)) u| := by - rw [abs_mul, abs_mul] - rw [show |(2 : ℝ)| = 2 by norm_num] - have hφ01 : |phi ϱ L w u| ≤ 1 := by - rw [abs_of_nonneg (phi_nonneg hϱ u)] - exact phi_le_one hϱ u - have habs0 : (0 : ℝ) ≤ |deriv (deriv (phi ϱ L w)) u| := abs_nonneg _ - nlinarith - exact le_trans (abs_add_le _ _) (add_le_add h1 h2) + rw [abs_mul, abs_mul, abs_two, abs_of_nonneg (phi_nonneg hϱ u)] + nlinarith [phi_le_one hϱ (L := L) (w := w) u, abs_nonneg (deriv (deriv (phi ϱ L w)) u)] + exact (abs_add_le _ _).trans (add_le_add h1 h2) _ = 2 * (supDeriv ϱ / w) * (∫ u, |deriv (phi ϱ L w) u|) + 2 * ∫ u, |deriv (deriv (phi ϱ L w)) u| := by - rw [MeasureTheory.integral_add (hint_absphi'.const_mul _) (hint_absphi''.const_mul 2), + rw [MeasureTheory.integral_add (hint1.const_mul _) (hint2.const_mul 2), MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul] _ = 2 * (supDeriv ϱ / w) * 2 + 2 * (2 * l1Deriv2 ϱ / w) := by rw [integral_abs_deriv_phi hϱ hw0 hwL, integral_abs_deriv2_phi hϱ hw0 hwL] - _ = cRho ϱ / w := by - rw [cRho_eq] - field_simp - ring + _ = cRho ϱ / w := by rw [cRho_eq]; field_simp; ring /-- [eq:phinorms]: "`c_ϱ (≥ 4)`". -/ theorem four_le_cRho (hϱ : TaperProfile ϱ) : 4 ≤ cRho ϱ := by have hl1 := l1Deriv2_nonneg ϱ have hftc : ∫ y in (0 : ℝ)..1, deriv ϱ y = 1 := by rw [intervalIntegral.integral_deriv_eq_sub (fun x _ => rho_differentiable hϱ x) - ((derivRho_continuous hϱ).intervalIntegrable _ _)] - rw [hϱ.eq_one 1 le_rfl, hϱ.eq_zero 0 le_rfl] + ((derivRho_continuous hϱ).intervalIntegrable _ _), hϱ.eq_one 1 le_rfl, hϱ.eq_zero 0 le_rfl] ring have hone : (1 : ℝ) ≤ supDeriv ϱ := by - have hle : ∫ y in (0 : ℝ)..1, deriv ϱ y ≤ ∫ y in (0 : ℝ)..1, supDeriv ϱ := by - refine intervalIntegral.integral_mono_on (by norm_num) + have hle : ∫ y in (0 : ℝ)..1, deriv ϱ y ≤ ∫ y in (0 : ℝ)..1, supDeriv ϱ := + intervalIntegral.integral_mono_on (by norm_num) ((derivRho_continuous hϱ).intervalIntegrable _ _) intervalIntegrable_const - fun x _ => ?_ - exact le_trans (le_abs_self _) (abs_derivRho_le hϱ x) - rw [hftc] at hle - simpa using hle - rw [cRho_eq] - linarith + fun x _ => (le_abs_self _).trans (abs_derivRho_le hϱ x) + rw [hftc] at hle; simpa using hle + rw [cRho_eq]; linarith theorem two_mul_l1Deriv2_le_cRho (hϱ : TaperProfile ϱ) : 2 * l1Deriv2 ϱ ≤ cRho ϱ := by - have hl1 := l1Deriv2_nonneg ϱ - have hsup := supDeriv_nonneg hϱ - rw [cRho_eq] - linarith + rw [cRho_eq]; linarith [l1Deriv2_nonneg ϱ, supDeriv_nonneg hϱ] theorem C1_eq (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : C1 ϱ L w = 2 * l1Deriv2 ϱ / w := integral_abs_deriv2_phi hϱ hw hwL @@ -506,8 +356,7 @@ theorem C1_eq (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : theorem C1_le (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) : C1 ϱ L w ≤ 2 * l1Deriv2 ϱ := by rw [C1_eq hϱ (by linarith) hwL] - have := l1Deriv2_nonneg ϱ - exact div_le_self (by linarith) hw + exact div_le_self (by linarith [l1Deriv2_nonneg ϱ]) hw end Norms @@ -516,110 +365,70 @@ end Norms section AB variable {ϱ : ℝ → ℝ} {L w : ℝ} -private lemma L_pos (hw : 0 < w) (hwL : 2 * w ≤ L) : (0 : ℝ) < L := by linarith - private lemma integrable_phi_pow (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) - {n : ℕ} (hn : 0 < n) : - Integrable (fun u => phi ϱ L w u ^ n) := + {n : ℕ} (hn : 0 < n) : Integrable (fun u => phi ϱ L w u ^ n) := ((phi_continuous hϱ hw hwL).pow n).integrable_of_hasCompactSupport ((phi_hasCompactSupport hϱ hw).comp_left (g := (· ^ n)) (by simp [zero_pow hn.ne'])) +private lemma integral_one_Icc_symm {a : ℝ} (ha : 0 ≤ a) : + ∫ _ in Icc (-a) a, (1 : ℝ) = 2 * a := by + rw [MeasureTheory.setIntegral_const, MeasureTheory.measureReal_def, Real.volume_Icc, + ENNReal.toReal_ofReal (by linarith), smul_eq_mul, mul_one]; ring + theorem bConst_le_aConst (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : bConst ϱ L w ≤ aConst ϱ L w := by - have hL := L_pos hw hwL + have hL : 0 < L := by linarith unfold bConst aConst have hmono : ∫ u : ℝ, phi ϱ L w u ^ 4 ≤ ∫ u : ℝ, phi ϱ L w u ^ 2 := by refine MeasureTheory.integral_mono (integrable_phi_pow hϱ hw hwL (by norm_num)) (integrable_phi_pow hϱ hw hwL (by norm_num)) fun u => ?_ - have h0 := phi_nonneg hϱ (L := L) (w := w) u - have h1 := phi_le_one hϱ (L := L) (w := w) u - have hp2 : phi ϱ L w u ^ 2 ≤ 1 := pow_le_one₀ h0 h1 - have hp2n : (0 : ℝ) ≤ phi ϱ L w u ^ 2 := sq_nonneg _ - nlinarith [mul_le_mul_of_nonneg_left hp2 hp2n] + have hp2 : phi ϱ L w u ^ 2 ≤ 1 := pow_le_one₀ (phi_nonneg hϱ u) (phi_le_one hϱ u) + nlinarith [mul_le_mul_of_nonneg_left hp2 (sq_nonneg (phi ϱ L w u))] exact mul_le_mul_of_nonneg_left hmono (by positivity) theorem aConst_le_one (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : aConst ϱ L w ≤ 1 := by - have hL := L_pos hw hwL + have hL : 0 < L := by linarith unfold aConst - have hsupp : ∀ u ∉ Icc (-(L / 2)) (L / 2), phi ϱ L w u ^ 2 = 0 := by - intro u hu - have : phi ϱ L w u = 0 := by - apply phi_eq_zero hϱ hw - rw [mem_Icc, not_and_or, not_le, not_le] at hu + have heq : ∫ u : ℝ, phi ϱ L w u ^ 2 = ∫ u in Icc (-(L / 2)) (L / 2), phi ϱ L w u ^ 2 := by + refine (MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero fun u hu => ?_).symm + rw [mem_Icc, not_and_or, not_le, not_le] at hu + have habs : L / 2 ≤ |u| := by rcases hu with h | h - · calc L / 2 ≤ -u := by linarith - _ ≤ |u| := neg_le_abs u - · calc L / 2 ≤ u := by linarith - _ ≤ |u| := le_abs_self u - rw [this] - ring - have heq : ∫ u : ℝ, phi ϱ L w u ^ 2 = ∫ u in Icc (-(L / 2)) (L / 2), phi ϱ L w u ^ 2 := - (MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero hsupp).symm - have hle : ∫ u in Icc (-(L / 2)) (L / 2), phi ϱ L w u ^ 2 - ≤ ∫ u in Icc (-(L / 2)) (L / 2), (1 : ℝ) := by - refine MeasureTheory.setIntegral_mono_on - ((integrable_phi_pow hϱ hw hwL (by norm_num)).integrableOn) - (MeasureTheory.integrableOn_const (by simp)) measurableSet_Icc fun u _ => ?_ - have h0 := phi_nonneg hϱ (L := L) (w := w) u - have h1 := phi_le_one hϱ (L := L) (w := w) u - nlinarith - have hvol : ∫ u in Icc (-(L / 2)) (L / 2), (1 : ℝ) = L := by - rw [MeasureTheory.setIntegral_const] - rw [MeasureTheory.measureReal_def, Real.volume_Icc] - rw [ENNReal.toReal_ofReal (by linarith)] - rw [smul_eq_mul, mul_one] - ring + · linarith [neg_le_abs u] + · linarith [le_abs_self u] + rw [phi_eq_zero hϱ hw habs]; ring + have hle : ∫ u in Icc (-(L / 2)) (L / 2), phi ϱ L w u ^ 2 ≤ L := by + calc ∫ u in Icc (-(L / 2)) (L / 2), phi ϱ L w u ^ 2 + ≤ ∫ _ in Icc (-(L / 2)) (L / 2), (1 : ℝ) := + MeasureTheory.setIntegral_mono_on (integrable_phi_pow hϱ hw hwL two_pos).integrableOn + (MeasureTheory.integrableOn_const (by simp)) measurableSet_Icc fun u _ => by + nlinarith [phi_nonneg hϱ (L := L) (w := w) u, phi_le_one hϱ (L := L) (w := w) u] + _ = L := by rw [integral_one_Icc_symm (by linarith)]; ring calc L⁻¹ * ∫ u : ℝ, phi ϱ L w u ^ 2 ≤ L⁻¹ * L := by - rw [heq] - exact mul_le_mul_of_nonneg_left (le_trans hle (le_of_eq hvol)) (by positivity) + rw [heq]; exact mul_le_mul_of_nonneg_left hle (by positivity) _ = 1 := inv_mul_cancel₀ hL.ne' theorem one_sub_le_bConst (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : 1 - 2 * w / L ≤ bConst ϱ L w := by - have hL := L_pos hw hwL + have hL : 0 < L := by linarith unfold bConst have hplateau : ∫ u in Icc (-(L / 2 - w)) (L / 2 - w), phi ϱ L w u ^ 4 - = ∫ u in Icc (-(L / 2 - w)) (L / 2 - w), (1 : ℝ) := by - refine MeasureTheory.setIntegral_congr_fun measurableSet_Icc fun u hu => ?_ - have h1 : phi ϱ L w u = 1 := by - apply phi_eq_one hϱ hw - rw [mem_Icc] at hu - rw [abs_le] - exact ⟨hu.1, hu.2⟩ - rw [h1] - ring - have hvol : ∫ u in Icc (-(L / 2 - w)) (L / 2 - w), (1 : ℝ) = L - 2 * w := by - rw [MeasureTheory.setIntegral_const] - rw [MeasureTheory.measureReal_def, Real.volume_Icc] - rw [ENNReal.toReal_ofReal (by linarith)] - rw [smul_eq_mul, mul_one] - ring - have hle : ∫ u in Icc (-(L / 2 - w)) (L / 2 - w), phi ϱ L w u ^ 4 - ≤ ∫ u : ℝ, phi ϱ L w u ^ 4 := by - refine MeasureTheory.setIntegral_le_integral (integrable_phi_pow hϱ hw hwL (by norm_num)) ?_ - filter_upwards with u - have h0 := phi_nonneg hϱ (L := L) (w := w) u - positivity + = ∫ _ in Icc (-(L / 2 - w)) (L / 2 - w), (1 : ℝ) := + MeasureTheory.setIntegral_congr_fun measurableSet_Icc fun u hu => by + rw [phi_eq_one hϱ hw (abs_le.mpr ⟨hu.1, hu.2⟩)]; ring have hkey : L - 2 * w ≤ ∫ u : ℝ, phi ϱ L w u ^ 4 := by - rw [← hvol, ← hplateau] - exact hle + calc L - 2 * w = 2 * (L / 2 - w) := by ring + _ = ∫ _ in Icc (-(L / 2 - w)) (L / 2 - w), (1 : ℝ) := (integral_one_Icc_symm (by linarith)).symm + _ = ∫ u in Icc (-(L / 2 - w)) (L / 2 - w), phi ϱ L w u ^ 4 := hplateau.symm + _ ≤ ∫ u : ℝ, phi ϱ L w u ^ 4 := + MeasureTheory.setIntegral_le_integral (integrable_phi_pow hϱ hw hwL (by norm_num)) + (Eventually.of_forall fun _ => by positivity) calc 1 - 2 * w / L = L⁻¹ * (L - 2 * w) := by field_simp _ ≤ L⁻¹ * ∫ u : ℝ, phi ϱ L w u ^ 4 := mul_le_mul_of_nonneg_left hkey (by positivity) -theorem bConst_nonneg (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : - 0 ≤ bConst ϱ L w := by - unfold bConst - have h : (0 : ℝ) ≤ ∫ u : ℝ, phi ϱ L w u ^ 4 := by - refine MeasureTheory.integral_nonneg fun u => ?_ - have h0 := phi_nonneg hϱ (L := L) (w := w) u - positivity - have hL := L_pos hw hwL - positivity - end AB - end Taper end Zeta23 diff --git a/zeta23/Zeta23/Taper/Params.lean b/zeta23/Zeta23/Taper/Params.lean index bec20859e5..472a3fb176 100644 --- a/zeta23/Zeta23/Taper/Params.lean +++ b/zeta23/Zeta23/Taper/Params.lean @@ -12,7 +12,6 @@ pulling Taper/Decay, Taper/Fourier. Hypotheses: `hP : P.Valid`, `hwL : 8 * P.w ≤ P.L T` ([eq:wrange]). The remaining Params-layer facts (φ̂/Φ, ψ, g, A_φ, Plancherel) are in the umbrella Zeta23/Taper.lean. -/ -import Zeta23.Taper.Basic import Zeta23.Taper.Norms import Zeta23.Taper.Strip @@ -25,14 +24,6 @@ namespace Params variable (P : Params) (T : ℝ) theorem phi_eq : P.phi T = Taper.phi P.ϱ (P.L T) P.w := rfl -theorem a_eq : P.a T = Taper.aConst P.ϱ (P.L T) P.w := rfl -theorem b_eq : P.b T = Taper.bConst P.ϱ (P.L T) P.w := rfl -theorem phiHat_eq : P.phiHat T = Taper.phiHat P.ϱ (P.L T) P.w := rfl -theorem phiHatR_eq : P.phiHatR T = Taper.phiHatR P.ϱ (P.L T) P.w := rfl -theorem Phi_eq : P.Phi T = Taper.Phi P.ϱ (P.L T) P.w := rfl -theorem PhiR_eq : P.PhiR T = Taper.PhiR P.ϱ (P.L T) P.w := rfl -theorem g_eq : P.g T = Taper.g P.ϱ (P.L T) P.w := rfl -theorem Aphi_eq : P.Aphi T = Taper.Aphi P.ϱ (P.L T) P.w := rfl theorem crho_eq : P.crho = Taper.cRho P.ϱ := rfl /-- ψ (value `L` at `r = 0`); see `Taper.psi`. Since Defs uses the same body, @@ -40,8 +31,6 @@ theorem crho_eq : P.crho = Taper.cRho P.ϱ := rfl noncomputable def psi' (r : ℝ) : ℝ := Taper.psi P.ϱ (P.L T) P.w r theorem psi_eq_psi' : P.psi T = P.psi' T := rfl -theorem psi_eq : P.psi T = Taper.psi P.ϱ (P.L T) P.w := rfl - /-- `C₁ := ‖φ''‖₁` [prop:tail]. -/ noncomputable def C1 : ℝ := Taper.C1 P.ϱ (P.L T) P.w @@ -84,7 +73,6 @@ theorem b_le_a : P.b T ≤ P.a T := Taper.bConst_le_aConst hP.taper (w_pos hP) ( theorem a_le_one : P.a T ≤ 1 := Taper.aConst_le_one hP.taper (w_pos hP) (two_w_le hwL hP) theorem one_sub_le_b : 1 - 2 * P.w / P.L T ≤ P.b T := Taper.one_sub_le_bConst hP.taper (w_pos hP) (two_w_le hwL hP) -theorem b_nonneg : 0 ≤ P.b T := Taper.bConst_nonneg hP.taper (w_pos hP) (two_w_le hwL hP) theorem three_quarters_le_b : 3 / 4 ≤ P.b T := by have h1 := one_sub_le_b hP hwL have hL : 0 < P.L T := by linarith [hP.one_le_w] diff --git a/zeta23/Zeta23/Taper/PsiC.lean b/zeta23/Zeta23/Taper/PsiC.lean new file mode 100644 index 0000000000..89c114fd3e --- /dev/null +++ b/zeta23/Zeta23/Taper/PsiC.lean @@ -0,0 +1,393 @@ +/- +Copyright (c) 2026 Anthropic, PBC. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +SPDX-License-Identifier: Apache-2.0 +-/ +import Mathlib + +noncomputable section + +open Complex MeasureTheory Real Set Filter Topology + +namespace Zeta23 +namespace PsiC + +variable {c L w : ℝ} + +/-- `ψ_c(r) := min(L, 2/|r|, c/(w r²))` (value `L` at `r = 0`), i.e. `psiA c p` with +`(p.L, p.w) = (L, w)`. -/ +def psiC (c L w : ℝ) (r : ℝ) : ℝ := + if r = 0 then L else min L (min (2 / |r|) (c / (w * r ^ 2))) + +theorem psi_nonneg (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) (r : ℝ) : + 0 ≤ psiC c L w r := by + have hL : 0 ≤ L := by linarith + have hc0 : 0 ≤ c := le_trans (by norm_num) hc + unfold psiC + split_ifs with hr + · exact hL + · exact le_min hL (le_min (by positivity) (by positivity)) + +theorem psi_even (r : ℝ) : psiC c L w (-r) = psiC c L w r := by + simp [psiC] + +theorem psi_le_L (_hc : 4 ≤ c) (_hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : + psiC c L w r ≤ L := by + unfold psiC; split_ifs; exacts [le_rfl, min_le_left _ _] + +theorem psi_mul_abs_le (_hc : 4 ≤ c) (_hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : + psiC c L w r * |r| ≤ 2 := by + unfold psiC + split_ifs with hr + · simp [hr] + · rw [← le_div_iff₀ (abs_pos.mpr hr)] + exact (min_le_right _ _).trans (min_le_left _ _) + +theorem psi_mul_sq_le (hc : 4 ≤ c) (hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : + psiC c L w r * r ^ 2 ≤ c / w := by + have hw0 : 0 < w := by linarith + have hc0 : 0 ≤ c := le_trans (by norm_num) hc + unfold psiC + split_ifs with hr + · simp [hr]; positivity + · have hr2 : 0 < r ^ 2 := by positivity + rw [← le_div_iff₀ hr2, div_div, mul_comm] + exact (min_le_right _ _).trans (min_le_right _ _) + +/-! #### Measurability and unified `rpowMaj` majorant -/ + +theorem psi_abs (r : ℝ) : psiC c L w |r| = psiC c L w r := by + unfold psiC; simp only [abs_eq_zero, abs_abs, sq_abs] + +theorem psi_measurable : Measurable (psiC c L w) := by + have h1 : Measurable (fun r : ℝ => min L (min (2 / |r|) (c / (w * r ^ 2)))) := + measurable_const.min ((measurable_const.div continuous_abs.measurable).min + (measurable_const.div (measurable_const.mul (measurable_id.pow_const 2)))) + have : psiC c L w = Set.piecewise {(0 : ℝ)} (fun _ => L) + (fun r => min L (min (2 / |r|) (c / (w * r ^ 2)))) := by + funext r; unfold psiC + by_cases hr : r = 0 + · rw [if_pos hr, Set.piecewise_eq_of_mem _ _ _ (by simp [hr])] + · rw [if_neg hr, Set.piecewise_eq_of_notMem _ _ _ (by simp [hr])] + rw [this] + exact Measurable.piecewise (measurableSet_singleton 0) measurable_const h1 + +/-- For r > 0: ψ(r) ≤ (c/w) · r^{−2} (rpow form). -/ +theorem psi_le_rpow_neg_two (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) {r : ℝ} + (hr : 0 < r) : psiC c L w r ≤ c / w * r ^ (-2 : ℝ) := by + have h := psi_mul_sq_le hc hw hwL r + rw [Real.rpow_neg hr.le, show (2 : ℝ) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast, + ← div_eq_mul_inv, le_div_iff₀ (by positivity)] + exact h + +/-- Shared integrable majorant: `a` on `[−1, 1]` and `b · |r|^{-2}` outside. -/ +noncomputable def rpowMaj (a b : ℝ) (r : ℝ) : ℝ := + (Icc (-1 : ℝ) 1).indicator (fun _ => a) r + + b * ((Ioi (1 : ℝ)).indicator (fun x => x ^ (-2 : ℝ)) r + + (Ioi (1 : ℝ)).indicator (fun x => x ^ (-2 : ℝ)) (-r)) + +theorem rpowMaj_integrable (a b : ℝ) : Integrable (rpowMaj a b) := by + have h1 : Integrable ((Icc (-1 : ℝ) 1).indicator (fun _ => a)) := + (integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp)) + have h2 : Integrable ((Ioi (1 : ℝ)).indicator (fun x : ℝ => x ^ (-2 : ℝ))) := + (integrableOn_Ioi_rpow_of_lt (by norm_num) one_pos).integrable_indicator measurableSet_Ioi + exact h1.add ((h2.add h2.comp_neg).const_mul b) + +theorem integral_rpowMaj (a b : ℝ) : ∫ r, rpowMaj a b r = 2 * a + 2 * b := by + have h1 : Integrable ((Icc (-1 : ℝ) 1).indicator (fun _ => a)) := + (integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp)) + have h2 : Integrable ((Ioi (1 : ℝ)).indicator (fun x : ℝ => x ^ (-2 : ℝ))) := + (integrableOn_Ioi_rpow_of_lt (by norm_num) one_pos).integrable_indicator measurableSet_Ioi + have e1 : ∫ r, (Icc (-1 : ℝ) 1).indicator (fun _ => a) r = 2 * a := by + rw [integral_indicator measurableSet_Icc, setIntegral_const, measureReal_def, + Real.volume_Icc, ENNReal.toReal_ofReal (by norm_num), smul_eq_mul]; ring + have e2 : ∫ r, (Ioi (1 : ℝ)).indicator (fun x : ℝ => x ^ (-2 : ℝ)) r = 1 := by + rw [integral_indicator measurableSet_Ioi, integral_Ioi_rpow_of_lt (by norm_num) one_pos] + norm_num + have e3 : ∫ r, (Ioi (1 : ℝ)).indicator (fun x : ℝ => x ^ (-2 : ℝ)) (-r) = 1 := by + rw [MeasureTheory.integral_neg_eq_self ((Ioi (1 : ℝ)).indicator (fun x : ℝ => x ^ (-2 : ℝ))) volume] + exact e2 + have h23 : Integrable (fun r => (Ioi (1 : ℝ)).indicator (fun x : ℝ => x ^ (-2 : ℝ)) r + + (Ioi (1 : ℝ)).indicator (fun x : ℝ => x ^ (-2 : ℝ)) (-r)) := h2.add h2.comp_neg + unfold rpowMaj + rw [integral_add h1 (h23.const_mul b), e1, integral_const_mul, + integral_add h2 h2.comp_neg, e2, e3] + ring + +private lemma le_rpowMaj {f : ℝ → ℝ} {a b : ℝ} (hb : 0 ≤ b) + (h1 : ∀ r ∈ Icc (-1 : ℝ) 1, f r ≤ a) + (h2 : ∀ r, 1 < |r| → f r ≤ b * |r| ^ (-2 : ℝ)) (r : ℝ) : f r ≤ rpowMaj a b r := by + have hind : ∀ s : ℝ, 0 ≤ (Ioi (1 : ℝ)).indicator (fun x : ℝ => x ^ (-2 : ℝ)) s := fun s => + Set.indicator_nonneg (fun x hx => Real.rpow_nonneg (le_trans zero_le_one hx.le) _) _ + unfold rpowMaj + by_cases h : r ∈ Icc (-1 : ℝ) 1 + · rw [Set.indicator_of_mem h] + nlinarith [h1 r h, hind r, hind (-r)] + · rw [Set.indicator_of_notMem h, zero_add] + rw [mem_Icc, not_and_or, not_le, not_le] at h + rcases h with h | h + · rw [Set.indicator_of_notMem (show r ∉ Ioi (1 : ℝ) by simp; linarith), + Set.indicator_of_mem (show -r ∈ Ioi (1 : ℝ) by simp; linarith), zero_add] + have habs : |r| = -r := abs_of_neg (by linarith) + simpa [habs] using h2 r (by linarith) + · rw [Set.indicator_of_mem (show r ∈ Ioi (1 : ℝ) from h), + Set.indicator_of_notMem (show -r ∉ Ioi (1 : ℝ) by simp; linarith), add_zero] + have habs : |r| = r := abs_of_pos (by linarith) + simpa [habs] using h2 r (by linarith) + +/-! ### [eq:psiints]: shared 3-region indicator split on `(0, ∞)` -/ + +theorem psiints_consts (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : + 0 < 2 / L ∧ 0 < c / (2 * w) ∧ 2 / L ≤ c / (2 * w) ∧ + (c / (2 * w)) / (2 / L) = c * L / (4 * w) := by + have hL : 0 < L := by linarith + have hw0 : 0 < w := by linarith + refine ⟨by positivity, by positivity, ?_, ?_⟩ + · rw [div_le_div_iff₀ hL (by positivity)]; nlinarith + · field_simp; ring + +/-- Generic 3-region domination on `(0, ∞)` split at `0 < A ≤ B`. -/ +theorem integral_psiC_Ioi_split {f g1 g2 g3 : ℝ → ℝ} {A B : ℝ} + (hA : 0 < A) (hAB : A ≤ B) + (hf0 : ∀ r, 0 < r → 0 ≤ f r) + (hg1 : IntegrableOn g1 (Ioc 0 A)) (hg2 : IntegrableOn g2 (Ioc A B)) (hg3 : IntegrableOn g3 (Ioi B)) + (h1 : ∀ r, 0 < r → r ≤ A → f r ≤ g1 r) + (h2 : ∀ r, A < r → r ≤ B → f r ≤ g2 r) + (h3 : ∀ r, B < r → f r ≤ g3 r) : + ∫ r in Ioi (0 : ℝ), f r + ≤ (∫ r in Ioc 0 A, g1 r) + (∫ r in Ioc A B, g2 r) + ∫ r in Ioi B, g3 r := by + have hB : 0 < B := lt_of_lt_of_le hA hAB + have I1 := hg1.integrable_indicator measurableSet_Ioc + have I2 := hg2.integrable_indicator measurableSet_Ioc + have I3 := hg3.integrable_indicator measurableSet_Ioi + have hpt : ∀ r, (Ioi (0 : ℝ)).indicator f r + ≤ (Ioc 0 A).indicator g1 r + (Ioc A B).indicator g2 r + (Ioi B).indicator g3 r := by + intro r + by_cases hr : 0 < r + · rw [indicator_of_mem (show r ∈ Ioi (0 : ℝ) from hr)] + by_cases h1r : r ≤ A + · rw [indicator_of_mem (show r ∈ Ioc 0 A from ⟨hr, h1r⟩), + indicator_of_notMem (show r ∉ Ioc A B from fun h => not_lt.mpr h1r h.1), + indicator_of_notMem (show r ∉ Ioi B from fun h => not_lt.mpr (h1r.trans hAB) h), + add_zero, add_zero] + exact h1 r hr h1r + · have h1' : A < r := not_le.mp h1r + by_cases h2r : r ≤ B + · rw [indicator_of_notMem (show r ∉ Ioc 0 A from fun h => h1r h.2), + indicator_of_mem (show r ∈ Ioc A B from ⟨h1', h2r⟩), + indicator_of_notMem (show r ∉ Ioi B from fun h => not_lt.mpr h2r h), + zero_add, add_zero] + exact h2 r h1' h2r + · rw [indicator_of_notMem (show r ∉ Ioc 0 A from fun h => h1r h.2), + indicator_of_notMem (show r ∉ Ioc A B from fun h => h2r h.2), + indicator_of_mem (show r ∈ Ioi B from not_le.mp h2r), zero_add, zero_add] + exact h3 r (not_le.mp h2r) + · rw [indicator_of_notMem (show r ∉ Ioi (0 : ℝ) from hr), + indicator_of_notMem (show r ∉ Ioc 0 A from fun h => hr h.1), + indicator_of_notMem (show r ∉ Ioc A B from fun h => hr (lt_trans hA h.1)), + indicator_of_notMem (show r ∉ Ioi B from fun h => hr (lt_trans hB h)), add_zero, add_zero] + have I12 : Integrable (fun r => (Ioc 0 A).indicator g1 r + (Ioc A B).indicator g2 r) := I1.add I2 + calc ∫ r in Ioi (0 : ℝ), f r + = ∫ r, (Ioi (0 : ℝ)).indicator f r := (integral_indicator measurableSet_Ioi).symm + _ ≤ ∫ r, ((Ioc 0 A).indicator g1 r + (Ioc A B).indicator g2 r + (Ioi B).indicator g3 r) := + integral_mono_of_nonneg (Eventually.of_forall fun r => Set.indicator_nonneg hf0 r) + (I12.add I3) (Eventually.of_forall hpt) + _ = (∫ r in Ioc 0 A, g1 r) + (∫ r in Ioc A B, g2 r) + ∫ r in Ioi B, g3 r := by + rw [integral_add I12 I3, integral_add I1 I2, + integral_indicator measurableSet_Ioc, integral_indicator measurableSet_Ioc, + integral_indicator measurableSet_Ioi] + +private lemma integrableOn_inv_mul_Ioc {a A B : ℝ} (hA : 0 < A) : + IntegrableOn (fun x : ℝ => a * x⁻¹) (Ioc A B) := + (ContinuousOn.integrableOn_Icc (continuousOn_const.mul + (continuousOn_inv₀.mono fun _ hx => ne_of_gt (lt_of_lt_of_le hA hx.1)))).mono_set + Ioc_subset_Icc_self + +private lemma integral_inv_mul_Ioc {a A B : ℝ} (hA : 0 < A) (hAB : A ≤ B) : + ∫ x in Ioc A B, a * x⁻¹ = a * Real.log (B / A) := by + rw [← intervalIntegral.integral_of_le hAB, intervalIntegral.integral_const_mul, integral_inv] + exact fun h => by rcases Set.mem_uIcc.mp h with h | h <;> linarith [h.1, h.2] + +/-- [eq:psiints]: Ψ₀ := ∫₀^∞ ψ(r) dr ≤ 4 + 2 log(c L/(4w)). -/ +theorem integral_psi_Ioi_le (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : + ∫ r in Ioi 0, psiC c L w r ≤ 4 + 2 * Real.log (c * L / (4 * w)) := by + obtain ⟨hA, hB, hAB, hBA⟩ := psiints_consts hc hw hwL + have hwL' : 2 * w ≤ L := by linarith + have hL : 0 < L := by linarith + have hw0 : 0 < w := by linarith + have hc0 : 0 < c := by linarith + set A := 2 / L with hAdef + set B := c / (2 * w) with hBdef + have hsplit := integral_psiC_Ioi_split hA hAB + (fun r _ => psi_nonneg hc hw hwL' r) + (integrableOn_const (by simp) : IntegrableOn (fun _ : ℝ => L) (Ioc 0 A)) + (integrableOn_inv_mul_Ioc hA) + ((integrableOn_Ioi_rpow_of_lt (by norm_num) hB).const_mul (c / w)) + (fun r _ _ => psi_le_L hc hw hwL' r) + (fun r h1 _ => by + have hr : 0 < r := lt_trans hA h1 + have h := psi_mul_abs_le hc hw hwL' r + rw [abs_of_pos hr] at h; rw [← div_eq_mul_inv, le_div_iff₀ hr]; exact h) + (fun r h2 => psi_le_rpow_neg_two hc hw hwL' (lt_trans hB h2)) + have e1 : ∫ _ in Ioc 0 A, L = 2 := by + rw [setIntegral_const, measureReal_def, Real.volume_Ioc, + ENNReal.toReal_ofReal (by linarith), smul_eq_mul, sub_zero, hAdef]; field_simp + have e3 : ∫ x in Ioi B, c / w * x ^ (-2 : ℝ) = 2 := by + rw [integral_const_mul, integral_Ioi_rpow_of_lt (by norm_num) hB] + norm_num; rw [Real.rpow_neg_one, hBdef]; field_simp + calc ∫ r in Ioi 0, psiC c L w r + ≤ 2 + 2 * Real.log (B / A) + 2 := by rw [e1, integral_inv_mul_Ioc hA hAB, e3] at hsplit; exact hsplit + _ = 4 + 2 * Real.log (c * L / (4 * w)) := by rw [hBA]; ring + +/-- [eq:psiints]: ∫_ℝ ψ(r)²|r| dr ≤ 8 + 8 log(c L/(4w)). -/ +theorem integral_psi_sq_mul_abs_le (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : + ∫ r, psiC c L w r ^ 2 * |r| ≤ 8 + 8 * Real.log (c * L / (4 * w)) := by + obtain ⟨hA, hB, hAB, hBA⟩ := psiints_consts hc hw hwL + have hwL' : 2 * w ≤ L := by linarith + have hL : 0 < L := by linarith + have hw0 : 0 < w := by linarith + have hc0 : 0 < c := by linarith + set A := 2 / L with hAdef + set B := c / (2 * w) with hBdef + have hred : ∫ r, psiC c L w r ^ 2 * |r| = 2 * ∫ r in Ioi 0, psiC c L w r ^ 2 * r := by + simpa only [psi_abs] using integral_comp_abs (f := fun x => psiC c L w x ^ 2 * x) + rw [hred] + have hsplit := integral_psiC_Ioi_split hA hAB + (fun r hr => mul_nonneg (sq_nonneg _) hr.le) + ((ContinuousOn.integrableOn_Icc (continuousOn_const.mul continuousOn_id)).mono_set Ioc_subset_Icc_self : + IntegrableOn (fun x : ℝ => L ^ 2 * x) (Ioc 0 A)) + (integrableOn_inv_mul_Ioc hA) + ((integrableOn_Ioi_rpow_of_lt (a := (-3 : ℝ)) (by norm_num) hB).const_mul ((c / w) ^ 2)) + (fun r hr _ => mul_le_mul_of_nonneg_right + (pow_le_pow_left₀ (psi_nonneg hc hw hwL' r) (psi_le_L hc hw hwL' r) 2) hr.le) + (fun r h1 _ => by + have hr : 0 < r := lt_trans hA h1 + have h := psi_mul_abs_le hc hw hwL' r; rw [abs_of_pos hr] at h + have h3 : psiC c L w r ≤ 2 * r⁻¹ := by rw [← div_eq_mul_inv, le_div_iff₀ hr]; exact h + calc psiC c L w r ^ 2 * r = (psiC c L w r * r) * psiC c L w r := by ring + _ ≤ 2 * (2 * r⁻¹) := mul_le_mul h h3 (psi_nonneg hc hw hwL' r) (by norm_num) + _ = 4 * r⁻¹ := by ring) + (fun r h2 => by + have hr : 0 < r := lt_trans hB h2 + calc psiC c L w r ^ 2 * r + ≤ (c / w * r ^ (-2 : ℝ)) ^ 2 * r := mul_le_mul_of_nonneg_right + (pow_le_pow_left₀ (psi_nonneg hc hw hwL' r) (psi_le_rpow_neg_two hc hw hwL' hr) 2) hr.le + _ = (c / w) ^ 2 * r ^ (-3 : ℝ) := by + rw [mul_pow, ← Real.rpow_natCast (r ^ (-2 : ℝ)) 2, ← Real.rpow_mul hr.le] + norm_num; field_simp) + have e1 : ∫ x in Ioc 0 A, L ^ 2 * x = 2 := by + rw [← intervalIntegral.integral_of_le hA.le, intervalIntegral.integral_const_mul, integral_id, hAdef] + field_simp; ring + have e3 : ∫ x in Ioi B, (c / w) ^ 2 * x ^ (-3 : ℝ) = 2 := by + rw [integral_const_mul, integral_Ioi_rpow_of_lt (by norm_num) hB] + norm_num; rw [hBdef]; field_simp + rw [e1, integral_inv_mul_Ioc hA hAB, e3] at hsplit + linarith [hBA ▸ hsplit] + +/-- [eq:psiints]: "∫_ℝ ψ² ≤ 8L". -/ +theorem integral_psi_sq_le (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : + ∫ r, psiC c L w r ^ 2 ≤ 8 * L := by + obtain ⟨hA, -, -, -⟩ := psiints_consts hc hw hwL + have hwL' : 2 * w ≤ L := by linarith + have hL : 0 < L := by linarith + set A := 2 / L with hAdef + have hred : ∫ r, psiC c L w r ^ 2 = 2 * ∫ r in Ioi 0, psiC c L w r ^ 2 := by + simpa only [psi_abs] using integral_comp_abs (f := fun x => psiC c L w x ^ 2) + rw [hred] + have hsplit := integral_psiC_Ioi_split (B := A) hA le_rfl + (fun r _ => sq_nonneg _) + (integrableOn_const (by simp) : IntegrableOn (fun _ : ℝ => L ^ 2) (Ioc 0 A)) + (integrableOn_const (by simp) : IntegrableOn (fun _ : ℝ => (0 : ℝ)) (Ioc A A)) + ((integrableOn_Ioi_rpow_of_lt (a := (-2 : ℝ)) (by norm_num) hA).const_mul 4) + (fun r _ _ => pow_le_pow_left₀ (psi_nonneg hc hw hwL' r) (psi_le_L hc hw hwL' r) 2) + (fun r h1 h2 => absurd (h1.trans_le h2) (lt_irrefl _)) + (fun r h2 => by + have hr : 0 < r := lt_trans hA h2 + have h := psi_mul_abs_le hc hw hwL' r; rw [abs_of_pos hr] at h + have h' : psiC c L w r ≤ 2 * r⁻¹ := by rw [← div_eq_mul_inv, le_div_iff₀ hr]; exact h + calc psiC c L w r ^ 2 ≤ (2 * r⁻¹) ^ 2 := pow_le_pow_left₀ (psi_nonneg hc hw hwL' r) h' 2 + _ = 4 * r ^ (-2 : ℝ) := by rw [Real.rpow_neg hr.le, Real.rpow_two]; ring) + have e1 : ∫ _ in Ioc 0 A, L ^ 2 = 2 * L := by + rw [setIntegral_const, measureReal_def, Real.volume_Ioc, + ENNReal.toReal_ofReal (by linarith), smul_eq_mul, sub_zero, hAdef]; field_simp + have e2 : ∫ _ in Ioc A A, (0 : ℝ) = 0 := by simp + have e3 : ∫ x in Ioi A, 4 * x ^ (-2 : ℝ) = 2 * L := by + rw [integral_const_mul, integral_Ioi_rpow_of_lt (by norm_num) hA] + norm_num; rw [Real.rpow_neg_one, hAdef]; field_simp; ring + rw [e1, e2, e3] at hsplit + linarith + +theorem psi_integrable (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : + Integrable (psiC c L w) := by + have hwL' : 2 * w ≤ L := by linarith + have hw0 : 0 < w := by linarith + have hc0 : 0 ≤ c := by linarith + refine (rpowMaj_integrable L (c / w)).mono' psi_measurable.aestronglyMeasurable + (Eventually.of_forall fun r => ?_) + rw [Real.norm_of_nonneg (psi_nonneg hc hw hwL' r)] + exact le_rpowMaj (div_nonneg hc0 hw0.le) (fun x _ => psi_le_L hc hw hwL' x) + (fun x hx => by rw [← psi_abs]; exact psi_le_rpow_neg_two hc hw hwL' (by linarith)) r + +theorem psi_sq_integrable (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : + Integrable (fun r => psiC c L w r ^ 2) := by + have hwL' : 2 * w ≤ L := by linarith + refine ((psi_integrable hc hw hwL).const_mul L).mono' + (psi_measurable.pow_const 2).aestronglyMeasurable (Eventually.of_forall fun r => ?_) + rw [Real.norm_of_nonneg (sq_nonneg _)] + nlinarith [psi_nonneg hc hw hwL' r, psi_le_L hc hw hwL' r] + +theorem psi_sq_mul_abs_integrable (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : + Integrable (fun r => psiC c L w r ^ 2 * |r|) := by + have hwL' : 2 * w ≤ L := by linarith + refine ((psi_integrable hc hw hwL).const_mul 2).mono' + ((psi_measurable.pow_const 2).mul continuous_abs.measurable).aestronglyMeasurable + (Eventually.of_forall fun r => ?_) + rw [Real.norm_of_nonneg (by positivity)] + nlinarith [psi_nonneg hc hw hwL' r, psi_mul_abs_le hc hw hwL' r] + +/-! #### Generic moment bounds from |F| ≤ ψ-type information -/ + +/-- If |F| ≤ ψ pointwise then ∫ F²|r| ≤ ∫ ψ²|r| ≤ 8 + 8 log(c L/4w). -/ +theorem integral_sq_mul_abs_le_of_le_psi (hc : 4 ≤ c) (hw : 1 ≤ w) + (hwL : 8 * w ≤ L) {F : ℝ → ℝ} (hF : ∀ r, |F r| ≤ psiC c L w r) : + ∫ r, F r ^ 2 * |r| ≤ 8 + 8 * Real.log (c * L / (4 * w)) := by + refine le_trans (integral_mono_of_nonneg (Eventually.of_forall fun _ => by positivity) + (psi_sq_mul_abs_integrable hc hw hwL) (Eventually.of_forall fun r => ?_)) + (integral_psi_sq_mul_abs_le hc hw hwL) + exact mul_le_mul_of_nonneg_right + (by rw [← sq_abs (F r)]; exact pow_le_pow_left₀ (abs_nonneg _) (hF r) 2) (abs_nonneg r) + +private lemma sq_mul_sq_le_rpowMaj {F : ℝ → ℝ} {C : ℝ} + (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) (r : ℝ) : + F r ^ 2 * r ^ 2 ≤ rpowMaj 4 (C ^ 2) r := + le_rpowMaj (sq_nonneg C) + (fun x _ => by + calc F x ^ 2 * x ^ 2 = (|F x| * |x|) ^ 2 := by rw [mul_pow, sq_abs, sq_abs] + _ ≤ 2 ^ 2 := pow_le_pow_left₀ (by positivity) (h1 x) 2 + _ = 4 := by norm_num) + (fun x hx => by + have hx0 : 0 < |x| := by linarith + have hx2 : 0 < x ^ 2 := by rw [← sq_abs]; positivity + rw [Real.rpow_neg hx0.le, show (2 : ℝ) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast, + sq_abs, ← div_eq_mul_inv, le_div_iff₀ hx2] + calc F x ^ 2 * x ^ 2 * x ^ 2 = (|F x| * x ^ 2) ^ 2 := by rw [mul_pow, sq_abs]; ring + _ ≤ C ^ 2 := pow_le_pow_left₀ (by positivity) (h2 x) 2) r + +theorem integrable_sq_mul_sq_of_bounds {F : ℝ → ℝ} {C : ℝ} (hFc : Continuous F) + (_hC : 0 ≤ C) (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) : + Integrable (fun r => F r ^ 2 * r ^ 2) := + (rpowMaj_integrable 4 (C ^ 2)).mono' (by fun_prop) (Eventually.of_forall fun r => by + rw [Real.norm_of_nonneg (by positivity)]; exact sq_mul_sq_le_rpowMaj h1 h2 r) + +theorem integral_sq_mul_sq_le_of_bounds {F : ℝ → ℝ} {C : ℝ} + (_hC : 0 ≤ C) (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) : + ∫ r, F r ^ 2 * r ^ 2 ≤ 8 + 2 * C ^ 2 := by + have h := integral_rpowMaj 4 (C ^ 2) + rw [show 8 + 2 * C ^ 2 = ∫ r, rpowMaj 4 (C ^ 2) r by linarith] + exact integral_mono_of_nonneg (Eventually.of_forall fun _ => by positivity) + (rpowMaj_integrable 4 (C ^ 2)) (Eventually.of_forall fun r => sq_mul_sq_le_rpowMaj h1 h2 r) + +end PsiC +end Zeta23 + +end diff --git a/zeta23/Zeta23/Taper/Strip.lean b/zeta23/Zeta23/Taper/Strip.lean index c9f0745b73..13fbbb5477 100644 --- a/zeta23/Zeta23/Taper/Strip.lean +++ b/zeta23/Zeta23/Taper/Strip.lean @@ -5,11 +5,10 @@ SPDX-License-Identifier: Apache-2.0 -/ /- Zeta23 — Taper/Strip.lean. -[eq:hfbound] specialized to `f = φ`, `Λ_f = L/2` (as consumed by [prop:tail]): +Shared `RealWindowBase` Fourier-strip bounds (consumed by both `Taper.phi` here and +`AdmWindow` / `RealWindow` in `Zeta23/ThmD/WindowCore.lean`), plus `[eq:hfbound]` +specialized to `f = φ`, `Λ_f = L/2`: "`|φ̂(r − iy)| ≤ e^{L/4} ‖φ''‖₁ |r − iy|⁻²`" for `|y| ≤ 1/2`. -All three statements are proved here from the general-`f` bounds in Zeta23/Poisson/PaperFT.lean, -and are consumed via `Zeta23.Params.norm_phiHat_*`. -Reference: the paper, §2.1 [eq:hfbound], §4 [prop:tail]. -/ import Mathlib.Algebra.Order.Star.Real import Mathlib.MeasureTheory.Integral.Bochner.Set @@ -22,90 +21,146 @@ namespace Zeta23 namespace Taper +/-- `deriv` commutes with the coercion `ℝ → ℂ` for differentiable functions. -/ +theorem deriv_ofReal_comp {f : ℝ → ℝ} (hf : Differentiable ℝ f) : + deriv (fun u => (f u : ℂ)) = fun u => ((deriv f u : ℝ) : ℂ) := by + funext u + exact ((hf u).hasDerivAt.ofReal_comp).deriv + +/-- Minimal real `C²` window supported in `[−L/2, L/2]` with `0 ≤ f ≤ 1`, shared by `Taper.phi` +and `AdmWindow` (`Zeta23/ThmD/WindowCore.lean`). -/ +structure RealWindowBase (f : ℝ → ℝ) (L : ℝ) : Prop where + L_pos : 0 < L + nonneg : ∀ u, 0 ≤ f u + le_one : ∀ u, f u ≤ 1 + contDiff : ContDiff ℝ 2 f + support : ∀ u, L / 2 ≤ |u| → f u = 0 + +namespace RealWindowBase +variable {f : ℝ → ℝ} {L : ℝ} (hf : RealWindowBase f L) +include hf + +lemma continuous : Continuous f := hf.contDiff.continuous + +lemma eq_zero_of_not_mem {u : ℝ} (hu : u ∉ Icc (-(L / 2)) (L / 2)) : f u = 0 := by + apply hf.support + simp only [mem_Icc, not_and_or, not_le] at hu + rcases hu with hu | hu + · linarith [neg_le_abs u] + · linarith [le_abs_self u] + +lemma hasCompactSupport : HasCompactSupport f := + HasCompactSupport.intro isCompact_Icc fun _ hu => hf.eq_zero_of_not_mem hu + +lemma integrable : Integrable f := + hf.continuous.integrable_of_hasCompactSupport hf.hasCompactSupport + +lemma fC_continuous : Continuous (fun u => (f u : ℂ)) := Complex.continuous_ofReal.comp hf.continuous + +lemma fC_hasCompactSupport : HasCompactSupport (fun u => (f u : ℂ)) := + hf.hasCompactSupport.comp_left Complex.ofReal_zero + +lemma fC_contDiff : ContDiff ℝ 2 (fun u => (f u : ℂ)) := by + simpa [Function.comp_def] using Complex.ofRealCLM.contDiff.comp hf.contDiff + +lemma fC_supp : ∀ u, (f u : ℂ) ≠ 0 → |u| ≤ L / 2 := fun u hu => by + by_contra h + exact hu (by rw [hf.support u (le_of_lt (not_le.mp h)), ofReal_zero]) + +lemma integral_le : ∫ u, f u ≤ L := by + have hL : 0 ≤ L := hf.L_pos.le + have hle : ∀ u, f u ≤ (Icc (-(L / 2)) (L / 2)).indicator (fun _ => (1 : ℝ)) u := fun u => by + by_cases hu : u ∈ Icc (-(L / 2)) (L / 2) + · rw [indicator_of_mem hu]; exact hf.le_one u + · rw [indicator_of_notMem hu, hf.eq_zero_of_not_mem hu] + calc ∫ u, f u ≤ ∫ u, (Icc (-(L / 2)) (L / 2)).indicator (fun _ => (1 : ℝ)) u := + integral_mono hf.integrable + ((integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp))) hle + _ = L := by + rw [integral_indicator_const _ measurableSet_Icc, measureReal_def, Real.volume_Icc, + ENNReal.toReal_ofReal (by linarith), smul_eq_mul, mul_one]; ring + +lemma norm_ft_le (z : ℂ) : ‖paperFT (fun u => (f u : ℂ)) z‖ ≤ Real.exp (|z.im| * (L / 2)) * L := by + have hint : Integrable (fun u => (f u : ℂ)) := + hf.fC_continuous.integrable_of_hasCompactSupport hf.fC_hasCompactSupport + have h := norm_paperFT_le hint hf.fC_supp z + simp only [Complex.norm_real, Real.norm_eq_abs] at h + refine h.trans ?_ + gcongr + calc ∫ u, |f u| = ∫ u, f u := by congr 1 with u; exact abs_of_nonneg (hf.nonneg u) + _ ≤ L := hf.integral_le + +lemma norm_ft_mul_sq_le (z : ℂ) : + ‖paperFT (fun u => (f u : ℂ)) z‖ * ‖z‖ ^ 2 + ≤ Real.exp (|z.im| * (L / 2)) * ∫ u, |deriv (deriv f) u| := by + have h := norm_paperFT_mul_sq_le hf.fC_contDiff hf.fC_supp z + have hd1 : Differentiable ℝ f := hf.contDiff.differentiable (by norm_num) + have hd2 : Differentiable ℝ (deriv f) := (hf.contDiff.deriv' (n := 1)).differentiable (by norm_num) + rw [deriv_ofReal_comp hd1, deriv_ofReal_comp hd2] at h + simpa only [Complex.norm_real, Real.norm_eq_abs] using h + +lemma norm_ft_sub_I_mul_le (r y : ℝ) (hy : |y| ≤ 1 / 2) (hz : (r : ℂ) - I * y ≠ 0) : + ‖paperFT (fun u => (f u : ℂ)) (r - I * y)‖ + ≤ Real.exp (L / 4) * (∫ u, |deriv (deriv f) u|) / ‖(r : ℂ) - I * y‖ ^ 2 := by + have hL : 0 ≤ L := hf.L_pos.le + have hC1 : 0 ≤ ∫ u, |deriv (deriv f) u| := integral_nonneg fun _ => abs_nonneg _ + rw [le_div_iff₀ (by positivity)] + refine (hf.norm_ft_mul_sq_le _).trans ?_ + gcongr + have him : ((r : ℂ) - I * y).im = -y := by simp + rw [him, abs_neg] + nlinarith + +end RealWindowBase + section HfPhi variable {ϱ : ℝ → ℝ} {L w : ℝ} +/-- `Taper.phi ϱ L w` as a `RealWindowBase`. -/ +lemma phi_realWindowBase (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : + RealWindowBase (phi ϱ L w) L := + ⟨by linarith, phi_nonneg hϱ, phi_le_one hϱ, (phi_contDiff hϱ hw hwL).of_le (by norm_num), + fun _ hu => phi_eq_zero hϱ hw hu⟩ + /-- `u ↦ (φ u : ℂ)` is `C³`. -/ theorem phiC_contDiff (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : ContDiff ℝ 3 (fun u => (phi ϱ L w u : ℂ)) := ofRealCLM.contDiff.comp (phi_contDiff hϱ hw hwL) theorem phiC_support (hϱ : TaperProfile ϱ) (hw : 0 < w) : - ∀ u, (phi ϱ L w u : ℂ) ≠ 0 → |u| ≤ L / 2 := by - intro u hu + ∀ u, (phi ϱ L w u : ℂ) ≠ 0 → |u| ≤ L / 2 := fun u hu => by by_contra h exact hu (by rw [phi_eq_zero hϱ hw (le_of_lt (not_le.mp h)), ofReal_zero]) -/-- `deriv` commutes with the coercion `ℝ → ℂ` for differentiable functions. -/ -theorem deriv_ofReal_comp {f : ℝ → ℝ} (hf : Differentiable ℝ f) : - deriv (fun u => (f u : ℂ)) = fun u => ((deriv f u : ℝ) : ℂ) := by - funext u - exact ((hf u).hasDerivAt.ofReal_comp).deriv - theorem deriv_deriv_phiC (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : deriv (deriv (fun u => (phi ϱ L w u : ℂ))) = fun u => ((deriv (deriv (phi ϱ L w)) u : ℝ) : ℂ) := by have h3 := phi_contDiff hϱ hw hwL - have hd1 : Differentiable ℝ (phi ϱ L w) := h3.differentiable (by norm_num) - have hd2 : Differentiable ℝ (deriv (phi ϱ L w)) := - (h3.deriv' (n := 2)).differentiable (by norm_num) - rw [deriv_ofReal_comp hd1, deriv_ofReal_comp hd2] + rw [deriv_ofReal_comp (h3.differentiable (by norm_num)), + deriv_ofReal_comp ((h3.deriv' (n := 2)).differentiable (by norm_num))] /-- [eq:hfbound] for φ: `‖φ̂(z)‖ · ‖z‖² ≤ e^{|Im z|·L/2} · C₁` for all complex `z`, `C₁ = ‖φ''‖₁`. -/ theorem norm_phiHat_mul_sq_le (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) (z : ℂ) : - ‖phiHat ϱ L w z‖ * ‖z‖ ^ 2 ≤ Real.exp (|z.im| * (L / 2)) * C1 ϱ L w := by - have h := norm_paperFT_mul_sq_le ((phiC_contDiff hϱ hw hwL).of_le (by norm_num)) - (phiC_support hϱ hw) z - rw [deriv_deriv_phiC hϱ hw hwL] at h - simp only [Complex.norm_real, Real.norm_eq_abs] at h - exact h + ‖phiHat ϱ L w z‖ * ‖z‖ ^ 2 ≤ Real.exp (|z.im| * (L / 2)) * C1 ϱ L w := + (phi_realWindowBase hϱ hw hwL).norm_ft_mul_sq_le z /-- `∫ φ ≤ L` (since `0 ≤ φ ≤ 1` and `supp φ ⊆ [−L/2, L/2]`). -/ theorem integral_phi_le (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : - ∫ u, phi ϱ L w u ≤ L := by - have hL : 0 ≤ L := by linarith - have hle : ∀ u, phi ϱ L w u ≤ (Icc (-(L / 2)) (L / 2)).indicator (fun _ => (1 : ℝ)) u := by - intro u - by_cases hu : u ∈ Icc (-(L / 2)) (L / 2) - · rw [indicator_of_mem hu]; exact phi_le_one hϱ u - · rw [indicator_of_notMem hu] - have : u ∉ Function.support (phi ϱ L w) := fun h => hu (phi_support_subset hϱ hw h) - rw [Function.notMem_support] at this - rw [this] - calc ∫ u, phi ϱ L w u ≤ ∫ u, (Icc (-(L / 2)) (L / 2)).indicator (fun _ => (1 : ℝ)) u := by - apply integral_mono (phi_integrable hϱ hw hwL) _ hle - exact (integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp)) - _ = L := by - rw [integral_indicator_const _ measurableSet_Icc, measureReal_def, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), smul_eq_mul, mul_one] - ring + ∫ u, phi ϱ L w u ≤ L := + (phi_realWindowBase hϱ hw hwL).integral_le /-- [eq:hfbound] for φ, 0-th order: `‖φ̂(z)‖ ≤ e^{|Im z|·L/2} · ‖φ‖₁ ≤ e^{|Im z| L/2} · L`. -/ theorem norm_phiHat_le (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) (z : ℂ) : - ‖phiHat ϱ L w z‖ ≤ Real.exp (|z.im| * (L / 2)) * L := by - have hint : Integrable (fun u => (phi ϱ L w u : ℂ)) := (phi_integrable hϱ hw hwL).ofReal - have h := norm_paperFT_le hint (phiC_support hϱ hw) z - simp only [Complex.norm_real, Real.norm_eq_abs] at h - refine le_trans h ?_ - gcongr - calc ∫ u, |phi ϱ L w u| = ∫ u, phi ϱ L w u := by - congr 1 with u; exact abs_of_nonneg (phi_nonneg hϱ u) - _ ≤ L := integral_phi_le hϱ hw hwL + ‖phiHat ϱ L w z‖ ≤ Real.exp (|z.im| * (L / 2)) * L := + (phi_realWindowBase hϱ hw hwL).norm_ft_le z /-- The form used in [prop:tail]: for real `r` and `|y| ≤ 1/2`, `z := r − iy ≠ 0`, `‖φ̂(r − iy)‖ ≤ e^{L/4} C₁ / ‖r − iy‖²`. -/ theorem norm_phiHat_sub_I_mul_le (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) (r y : ℝ) (hy : |y| ≤ 1 / 2) (hz : (r : ℂ) - I * y ≠ 0) : - ‖phiHat ϱ L w (r - I * y)‖ ≤ Real.exp (L / 4) * C1 ϱ L w / ‖(r : ℂ) - I * y‖ ^ 2 := by - have hL : 0 ≤ L := by linarith - have hC1 : 0 ≤ C1 ϱ L w := integral_nonneg (fun _ => abs_nonneg _) - rw [le_div_iff₀ (by positivity)] - refine le_trans (norm_phiHat_mul_sq_le hϱ hw hwL _) ?_ - gcongr - have him : ((r : ℂ) - I * y).im = -y := by simp - rw [him, abs_neg] - nlinarith + ‖phiHat ϱ L w (r - I * y)‖ ≤ Real.exp (L / 4) * C1 ϱ L w / ‖(r : ℂ) - I * y‖ ^ 2 := + (phi_realWindowBase hϱ hw hwL).norm_ft_sub_I_mul_le r y hy hz end HfPhi diff --git a/zeta23/Zeta23/ThmD/AssemblyD.lean b/zeta23/Zeta23/ThmD/AssemblyD.lean index 023fb03749..9fc7533c9e 100644 --- a/zeta23/Zeta23/ThmD/AssemblyD.lean +++ b/zeta23/Zeta23/ThmD/AssemblyD.lean @@ -27,51 +27,30 @@ namespace ThmD Flat top (a = b = 1, J = 1/3): c = F(λ₁); Montgomery–Taylor window: c → cStar λ + O(w/L + 1/l). -/ def cRatio (lam1 a b J : ℝ) : ℝ := lam1 * a ^ 2 / (b + lam1 ^ 2 * J) -/-- flat-top sanity: cRatio λ₁ 1 1 (1/3) = F(λ₁). -/ -theorem cRatio_flat (lam1 : ℝ) : cRatio lam1 1 1 (1/3) = Ffun lam1 := by - unfold cRatio Ffun - ring_nf - -/-! ### The fixed-T endgame with an abstract constant (parametric copy of -Assembly.lean's N0star_lower_H; same proof) -/ - -/-- §6, Thm A-line, window-general: with cinv in the role of 1/λ₁ + λ₁/3 = 1/F(λ₁): -if 4trG^ − ‖G^‖² − 2N − 3N(I′∖I) − B(4+2‖G^‖+B) ≤ N₀*, |trG^ − N| ≤ R₁, ‖G^‖² ≤ cinv·N + R₂, -then (2 − cinv)N − [4R₁ + R₂ + 3NII + B(4 + 2√(cinv·N + R₂) + B)] ≤ N₀*. -/ -theorem N0star_lower_c - {N0star N NII trGh frGh B cinv R₁ R₂ : ℝ} (hB : 0 ≤ B) - (h0 : 4 * trGh - frGh - 2 * N - 3 * NII - B * (4 + 2 * Real.sqrt frGh + B) ≤ N0star) - (htr : |trGh - N| ≤ R₁) (hfr : frGh ≤ cinv * N + R₂) : - (2 - cinv) * N - (4 * R₁ + R₂ + 3 * NII - + B * (4 + 2 * Real.sqrt (cinv * N + R₂) + B)) ≤ N0star := by - have h1 : N - R₁ ≤ trGh := by - have := (abs_le.mp htr).1 - linarith - have h2 : Real.sqrt frGh ≤ Real.sqrt (cinv * N + R₂) := Real.sqrt_le_sqrt hfr - nlinarith [h0, h1, h2, hB, mul_le_mul_of_nonneg_left h2 hB] - -/-- link to the Theorem-D constant: 2 − 1/cStar λ = HD λ by definition. -/ -theorem two_sub_inv_cStar (lam : ℝ) : 2 - 1 / cStar lam = HD lam := rfl - /-! ### The D-interface for the traces (produced by Traces.lean, consumed by Endgame.lean) Mirrors Zeta23.TracesBounds (PrimeSideTemp.lean) with the window moments (a, b, J) as data and the ratio constant cRatio(λ₁; a, b, J) in place of F(λ₁). tr1 is [eq:tr1] verbatim (prop:trace is window-general); ratio/frhat carry the [eq:ratio-general] main terms. -/ -structure TracesBoundsD (P : Params) (aT bT JT trG trG2 Ncnt : ℝ → ℝ) : Prop where +/-- General window-D trace bounds parametric in the density-log ratio `lam1f` +(instantiated at `P.lam1` for `ζ` as `TracesBoundsD`, and at `ThmE.lam1q P q` for `L(s, χ)`). -/ +structure TracesBoundsDG (P : Params) (lam1f aT bT JT trG trG2 Ncnt : ℝ → ℝ) : Prop where /-- [eq:tr1] first equality (window-general prop:trace): tr G~ = a L N + O(L√X). -/ tr1 : EvBound (fun T => trG T - aT T * P.L T * Ncnt T) (fun T => P.L T * Real.sqrt (P.X T)) - /-- [eq:ratio-general]: (tr G~)²/tr G~² = cRatio(λ₁; a, b, J) N (1 + O(E_T)). -/ + /-- [eq:ratio-general]: (tr G~)²/tr G~² = cRatio(lam1f; a, b, J) N (1 + O(E_T)). -/ ratio : EvBound - (fun T => trG T ^ 2 / trG2 T - cRatio (P.lam1 T) (aT T) (bT T) (JT T) * Ncnt T) - (fun T => P.calE T * (cRatio (P.lam1 T) (aT T) (bT T) (JT T) * Ncnt T)) + (fun T => trG T ^ 2 / trG2 T - cRatio (lam1f T) (aT T) (bT T) (JT T) * Ncnt T) + (fun T => P.calE T * (cRatio (lam1f T) (aT T) (bT T) (JT T) * Ncnt T)) /-- hat-units form consumed by the Thm-A-line endgame: the positive part of - tr G~²/(aL)² − (1/cRatio)·N is O(E_T · (1/cRatio) N). (Recorded separately since the - division by (aL)² and the inversion are where TracesD does real work.) -/ + tr G~²/(aL)² − (1/cRatio)·N is O(E_T · (1/cRatio) N). -/ frhat : EvBound (fun T => max (trG2 T / (aT T * P.L T) ^ 2 - - (cRatio (P.lam1 T) (aT T) (bT T) (JT T))⁻¹ * Ncnt T) 0) - (fun T => P.calE T * ((cRatio (P.lam1 T) (aT T) (bT T) (JT T))⁻¹ * Ncnt T)) + - (cRatio (lam1f T) (aT T) (bT T) (JT T))⁻¹ * Ncnt T) 0) + (fun T => P.calE T * ((cRatio (lam1f T) (aT T) (bT T) (JT T))⁻¹ * Ncnt T)) + +/-- The ζ-instance of `TracesBoundsDG` (`lam1f = P.lam1`). -/ +abbrev TracesBoundsD (P : Params) (aT bT JT trG trG2 Ncnt : ℝ → ℝ) : Prop := + TracesBoundsDG P P.lam1 aT bT JT trG trG2 Ncnt /-! The ε-form wrappers live in Zeta23/ThmD/Endgame.lean (abstract) and Zeta23/ThmD/Final.lean (ζ). -/ diff --git a/zeta23/Zeta23/ThmD/BridgeD.lean b/zeta23/Zeta23/ThmD/BridgeD.lean index fa363dd357..a2175687e5 100644 --- a/zeta23/Zeta23/ThmD/BridgeD.lean +++ b/zeta23/Zeta23/ThmD/BridgeD.lean @@ -5,7 +5,7 @@ SPDX-License-Identifier: Apache-2.0 -/ /- Zeta23/ThmD/BridgeD.lean — the Montgomery–Taylor window is an admissible window: -`AdmWindow (phiD ϱ λ L w) L w (cDT ϱ λ)`, using the estimates of Zeta23/ThmD/Window.lean; +`AdmWindow (phiD ϱ λ L w) L w (cDT ϱ λ)`, directly from `admWindow_phiM (modFactor_cosD ...)`; the §5 local hypotheses for the D-data then come from Zeta23/ThmD/WindowCore.lean. -/ import Zeta23.ThmD.WindowLocalHyps @@ -21,27 +21,11 @@ namespace ThmD variable {ϱ : ℝ → ℝ} {lam L w : ℝ} -lemma four_le_cDT (hϱ : TaperProfile ϱ) (lam : ℝ) : 4 ≤ cDT ϱ lam := by - unfold cDT - have h := Taper.four_le_cRho hϱ - nlinarith [sq_nonneg lam] - /-- **The Montgomery–Taylor window is admissible** (paper §7.1, sentence 1: even, C_c², same support, ‖φ_D'‖₁, ‖(φ_D²)'‖₁ ≤ 2, second-derivative norms ≪ 1/w). -/ theorem admWindow_phiD (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) (hw : 1 ≤ w) - (hwL : 8 * w ≤ L) : AdmWindow (phiD ϱ lam L w) L w (cDT ϱ lam) where - one_le_w := hw - w8 := hwL - four_le_c := four_le_cDT hϱ lam - even := phiD_even - nonneg := phiD_nonneg hϱ - le_one := phiD_le_one hϱ - contDiff := phiD_contDiff hϱ h0 h1 (by linarith) (by linarith) - support := fun _ hu => phiD_eq_zero hϱ (by linarith) hu - l1_deriv := integral_abs_deriv_phiD_le hϱ h0 h1 (by linarith) (by linarith) - l1_deriv_sq := integral_abs_deriv_phiD_sq_le hϱ h0 h1 (by linarith) (by linarith) - l1_deriv2 := integral_abs_deriv2_phiD_le hϱ h0 h1 hw hwL - l1_deriv2_sq := integral_abs_deriv2_phiD_sq_le hϱ h0 h1 hw hwL + (hwL : 8 * w ≤ L) : AdmWindow (phiD ϱ lam L w) L w (cDT ϱ lam) := + admWindow_phiM (modFactor_cosD h0 h1 (by linarith)) hϱ hw hwL /-! ## Params-level wrappers (the D-analogue of `Params.localFun`) -/ diff --git a/zeta23/Zeta23/ThmD/Concrete.lean b/zeta23/Zeta23/ThmD/Concrete.lean index e8092bef6b..8801ca0d17 100644 --- a/zeta23/Zeta23/ThmD/Concrete.lean +++ b/zeta23/Zeta23/ThmD/Concrete.lean @@ -5,19 +5,12 @@ SPDX-License-Identifier: Apache-2.0 -/ /- Zeta23/ThmD/Concrete.lean — the concrete FactsD instance. -Mirror of Zeta23/PrimeSideB/Traces.lean's concreteData/concreteFacts for the Montgomery–Taylor -window (paper §7.1): plugs BridgeD (P.localFunD, localHypsCoreD_eventually) and the -Core-flipped §5 results into the DataD/FactsD interface of Zeta23/ThmD/Traces.lean, with the -[thm:D]-specific fields discharged by ThmD/PP.lean (sumA2g_close) + ThmD/Window.lean -(gD_deriv_facts, jD_close et al.). End product: TracesBoundsD for the concrete window, via -tracesBoundsD_of_factsD. +Plugs BridgeD (`P.localFunD`, `localHypsCoreD_eventually`) into `PrimeSide.concreteTraceFactsBase`, +with the `[thm:D]`-specific fields (`ab_range`, `sumJ`) shared with `Zeta23/ThmDE/Concrete.lean`. -/ -import Zeta23.PrimeSideA -import Zeta23.PrimeSideB.Concrete import Zeta23.PrimeSideB.Traces import Zeta23.ThmD.Traces import Zeta23.ThmD.BridgeD -import Zeta23.ThmD.PP noncomputable section @@ -33,22 +26,9 @@ variable (P : Params) /-- the concrete D-data: the abstract prime-side expressions evaluated at the Montgomery–Taylor window data P.localFunD T, plus the moment J_T of [eq:abJ]. -/ -def concreteDataD (Z : ZeroConfig) : DataD P where - aT := fun T => (P.localFunD T).a - bT := fun T => (P.localFunD T).b - trG := fun T => trGtA (P.toSetting T) (P.localFunD T) - trG2 := fun T => trGt2A (P.toSetting T) (P.localFunD T) - Ncnt := fun T => (Z.N T (2 * T) : ℝ) - Mtot := fun T => MtotalA (P.toSetting T) (P.localFunD T) - Mmumu := fun T => Mform (P.localFunD T).Phi T Zeta23.mu Zeta23.mu - MPP := fun T => Mform (P.localFunD T).Phi T (Zeta23.PX (P.X T)) (Zeta23.PX (P.X T)) - MmuP := fun T => Mform (P.localFunD T).Phi T Zeta23.mu (Zeta23.PX (P.X T)) - MmuPi := fun T => Mform (P.localFunD T).Phi T Zeta23.mu (Zeta23.PiX (P.X T)) - MPPi := fun T => Mform (P.localFunD T).Phi T (Zeta23.PX (P.X T)) (Zeta23.PiX (P.X T)) - MPiPi := fun T => Mform (P.localFunD T).Phi T (Zeta23.PiX (P.X T)) (Zeta23.PiX (P.X T)) - intMu2 := fun T => ∫ τ in T..(2 * T), Zeta23.mu τ ^ 2 - sumL2g := fun T => sumA2g (P.X T) (P.localFunD T).g - JT := fun T => 2 / P.L T ^ 3 * ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y +def concreteDataD (Z : ZeroConfig) : DataD P := + { concreteDataOf P P.localFunD Z with + JT := fun T => 2 / P.L T ^ 3 * ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y } variable {P} @@ -58,180 +38,82 @@ def LocalHypsCoreDEventually (P : Params) : Prop := ∃ T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → PrimeSide.LocalHypsCore (cDT P.ϱ P.lam) (P.toSetting T) (P.localFunD T) -/-- the CoreD analogue of PrimeSide.evBound_of_eventuallyAt. -/ -lemma evBound_of_eventuallyAtCoreD (hLoc : LocalHypsCoreDEventually P) - {f g : Setting → LocalFun → ℝ} - (h : ∃ C : ℝ, EventuallyAtCore (cDT P.ϱ P.lam) P.lam (fun p F => |f p F| ≤ C * g p F)) - (hg : ∀ᶠ T in atTop, 0 ≤ g (P.toSetting T) (P.localFunD T)) : - EvBound (fun T => f (P.toSetting T) (P.localFunD T)) - (fun T => g (P.toSetting T) (P.localFunD T)) := by +/-- The `sumJ` value `2/L³ ∫ g·y` is at most `1` for the Montgomery–Taylor window. -/ +lemma sumA2g_JT_le_one (hP : P.Valid) {T : ℝ} (hL0 : 0 < P.L T) (hLw : 2 * P.w ≤ P.L T) + (hF : PrimeSide.LocalHypsCore (cDT P.ϱ P.lam) (P.toSetting T) (P.localFunD T)) : + 2 / P.L T ^ 3 * ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y ≤ 1 := by + have hw0 : 0 < P.w := by linarith [hP.one_le_w] + have hg := gD_deriv_facts hP.taper hP.lam_pos hP.lam_le_one hw0 hLw + have hgle : ∀ y ∈ Set.Icc (0 : ℝ) (P.L T), (P.localFunD T).g y * y ≤ P.L T * y := fun y hy => + mul_le_mul_of_nonneg_right + ((hF.g_le_Aphi y).trans ((hF.Aphi_le y).trans + (max_le (by simp only [Params.toSetting_L]; linarith [abs_nonneg y]) hL0.le))) + hy.1 + have hIle : ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y + ≤ ∫ y in (0 : ℝ)..(P.L T), P.L T * y := + intervalIntegral.integral_mono_on hL0.le + ((hg.1.continuous.mul continuous_id).intervalIntegrable 0 (P.L T)) + ((continuous_const.mul continuous_id).intervalIntegrable 0 (P.L T)) hgle + have hIval : ∫ y in (0 : ℝ)..(P.L T), P.L T * y = P.L T ^ 3 / 2 := by + rw [intervalIntegral.integral_const_mul, integral_id]; ring + calc 2 / P.L T ^ 3 * ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y + ≤ 2 / P.L T ^ 3 * (P.L T ^ 3 / 2) := + mul_le_mul_of_nonneg_left (hIval ▸ hIle) (by positivity) + _ = 1 := by field_simp + +/-- Shared `ab_range` field for the Montgomery–Taylor window (`ζ` and `L(s, χ)`). -/ +lemma concreteAbRangeD (hP : P.Valid) (hLoc : LocalHypsCoreDEventually P) : + ∀ᶠ T in atTop, + 1 / 2 ≤ (P.localFunD T).b ∧ (P.localFunD T).b ≤ (P.localFunD T).a ∧ + (P.localFunD T).a ≤ 1 ∧ + 0 ≤ 2 / P.L T ^ 3 * ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y ∧ + 2 / P.L T ^ 3 * ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y ≤ 1 := by obtain ⟨T₀, hT₀⟩ := hLoc - obtain ⟨C, T₁, hT₁⟩ := h - obtain ⟨T₂, hT₂⟩ := eventually_atTop.mp hg - refine ⟨max C 1, by positivity, max T₀ (max T₁ T₂), fun T hT => ?_⟩ - have h0 : T₀ ≤ T := (le_max_left _ _).trans hT - have h1 : T₁ ≤ T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT - have h2 : T₂ ≤ T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT - have := hT₁ (P.toSetting T) (P.localFunD T) rfl h1 (hT₀ T h0) - calc |f (P.toSetting T) (P.localFunD T)| ≤ C * g (P.toSetting T) (P.localFunD T) := this - _ ≤ max C 1 * g (P.toSetting T) (P.localFunD T) := - mul_le_mul_of_nonneg_right (le_max_left _ _) (hT₂ T h2) + filter_upwards [eventually_ge_atTop T₀, eventually_L_ge P hP.lam_pos 8, + eventually_L_ge P hP.lam_pos (2 * P.w)] with T hT hL8 hLw + have hF := hT₀ T hT + have hL0 : 0 < P.L T := by linarith + exact ⟨hF.b_ge_half, hF.b_le_a, hF.a_le_one, + mul_nonneg (by positivity) (intervalIntegral.integral_nonneg hL0.le + fun y hy => mul_nonneg (hF.g_nonneg y) hy.1), + sumA2g_JT_le_one hP hL0 hLw hF⟩ -/-- vanishing of the autocorrelation beyond the support width. -/ -private lemma autocorr_eq_zero_of_support {h : ℝ → ℝ} {M : ℝ} - (hsupp : ∀ u : ℝ, M ≤ |u| → h u = 0) {y : ℝ} (hy : 2 * M ≤ |y|) (_hM : 0 ≤ M) : - Params.autocorr h y = 0 := by - show ∫ u, h u * h (u + y) = 0 - have hz : ∀ u : ℝ, h u * h (u + y) = 0 := by - intro u - rcases le_or_gt M (|u|) with hu | hu - · rw [hsupp u hu, zero_mul] - · have : M ≤ |u + y| := by - have h1 := abs_sub_abs_le_abs_sub y (-u) - rw [abs_neg, sub_neg_eq_add] at h1 - have h2 : |y + u| = |u + y| := by rw [add_comm] - rw [h2] at h1 - linarith - rw [hsupp _ this, mul_zero] - simp only [hz, MeasureTheory.integral_zero] +/-- Shared `sumJ` field builder from an Abel-summation closeness bound (`sumA2g_close` or +`sumA2gCoprime_close`). -/ +lemma concreteSumJD (hP : P.Valid) (sumF : ℝ → (ℝ → ℝ) → ℝ) + (hclose : ∃ C : ℝ, 0 < C ∧ ∀ (L X : ℝ) (g : ℝ → ℝ), 8 ≤ L → X = Real.exp L → + Differentiable ℝ g → Continuous (deriv g) → (∀ y : ℝ, |deriv g y| ≤ 2) → + (∀ y : ℝ, L ≤ y → g y = 0) → |sumF X g - ∫ y in (0 : ℝ)..L, g y * y| ≤ C * L ^ 2) : + EvBound (fun T => sumF (P.X T) (P.localFunD T).g - + P.L T ^ 3 / 2 * (2 / P.L T ^ 3 * ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y)) + (fun T => P.L T ^ 2) := by + obtain ⟨C, hC0, hC⟩ := hclose + obtain ⟨T₁, hT₁⟩ := eventually_atTop.mp (eventually_L_ge P hP.lam_pos 8) + obtain ⟨T₂, hT₂⟩ := eventually_atTop.mp (eventually_L_ge P hP.lam_pos (2 * P.w)) + refine ⟨C, hC0, max T₁ T₂, fun T hT => ?_⟩ + have hL8 : 8 ≤ P.L T := hT₁ T ((le_max_left _ _).trans hT) + have hLw : 2 * P.w ≤ P.L T := hT₂ T ((le_max_right _ _).trans hT) + have hw0 : 0 < P.w := by linarith [hP.one_le_w] + have hL0 : 0 < P.L T := by linarith + have hg := gD_deriv_facts hP.taper hP.lam_pos hP.lam_le_one hw0 hLw + have hgsupp : ∀ y : ℝ, P.L T ≤ y → (P.localFunD T).g y = 0 := fun y hy => by + show Params.autocorr (fun u => phiD P.ϱ P.lam (P.L T) P.w u ^ 2) y = 0 + refine Taper.autocorr_eq_zero_of_support _ (M := P.L T / 2) + (fun u hu => by rw [phiD_eq_zero hP.taper hw0 hu, zero_pow two_ne_zero]) ?_ + rw [abs_of_nonneg (by linarith : (0 : ℝ) ≤ y)]; linarith + have key := hC (P.L T) (P.X T) (P.localFunD T).g hL8 rfl hg.1 hg.2.1 hg.2.2 hgsupp + have e : P.L T ^ 3 / 2 * (2 / P.L T ^ 3 * ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y) + = ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y := by field_simp + dsimp only + rw [e] + exact key -/-- **FactsD for the concrete Montgomery–Taylor data.** Inputs: P.Valid, PaperInputs Z -(H-RvM, H-Γ, H-cheb, H-MV), and the CoreD taper facts eventually (BridgeD). -/ +/-- **FactsD for the concrete Montgomery–Taylor data.** -/ theorem concreteFactsD {Z : ZeroConfig} (hP : P.Valid) (inp : PaperInputs Z) - (hLoc : LocalHypsCoreDEventually P) : FactsD (concreteDataD P Z) := by - have hlam : 0 < P.lam ∧ P.lam ≤ 1 := ⟨hP.lam_pos, hP.lam_le_one⟩ - have hΓ := inp.Gamma - have hcheb := inp.cheb - set cϱD := cDT P.ϱ P.lam with hcD - have hreg : ∀ᶠ T in atTop, 0 ≤ T ∧ 0 ≤ l T ∧ 0 ≤ Real.log (l T) ∧ 0 ≤ P.L T ∧ 0 ≤ P.X T := by - filter_upwards [eventually_ge_atTop 1, eventually_l_ge 1, eventually_log_l_ge 1, - eventually_L_ge P hP.lam_pos 1, eventually_one_le_X P hP.lam_pos] with T h1 h2 h3 h4 h5 - exact ⟨by linarith, by linarith, by linarith, by linarith, by linarith⟩ - obtain ⟨T₀, hT₀⟩ := id hLoc - have e_ends := evBound_of_eventuallyAtCoreD hLoc - (PrimeSide.lem_ends cϱD P.lam hΓ hcheb hlam) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (mul_nonneg (mul_nonneg hL hl) hlog) (add_nonneg (sq_nonneg _) hX)) - have e_mumu := evBound_of_eventuallyAtCoreD hLoc - (PrimeSide.prop_mumu cϱD P.lam hΓ hcheb hlam) (by - filter_upwards [hreg, eventually_L_ge P hP.lam_pos 1] with T ⟨hT, hl, hlog, hL, hX⟩ hL1 - exact mul_nonneg (sq_nonneg _) (Real.log_nonneg hL1)) - have e_PP := evBound_of_eventuallyAtCoreD hLoc - (PrimeSide.prop_PP (cϱ := cϱD) (lam := P.lam) hcheb inp.MV hlam) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (sq_nonneg _) hX) - have e_muP := evBound_of_eventuallyAtCoreD hLoc - (PrimeSide.prop_cross_muP cϱD P.lam hΓ hcheb hlam) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg hl (Real.sqrt_nonneg _)) - have e_muPi := evBound_of_eventuallyAtCoreD hLoc - (PrimeSide.prop_cross_muPi cϱD P.lam hΓ hcheb hlam) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (mul_nonneg hl hL) (Real.sqrt_nonneg _)) - have e_PPi := evBound_of_eventuallyAtCoreD hLoc - (PrimeSide.prop_cross_PPi cϱD P.lam hΓ hcheb hlam) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg hL hX) - have e_PiPi := evBound_of_eventuallyAtCoreD hLoc - (PrimeSide.prop_cross_PiPi cϱD P.lam hΓ hcheb hlam) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact div_nonneg (mul_nonneg hL hX) hT) - refine ⟨hP.lam_pos, hP.lam_le_one, hP.one_le_w, ?ab_range, rvm_evBound inp.RvM, ?muints2, - ?prop_trace, e_ends, ?Msplit, e_mumu, e_PP, ?sumJ, e_muP, e_muPi, e_PPi, e_PiPi⟩ - case ab_range => - filter_upwards [eventually_ge_atTop T₀, eventually_L_ge P hP.lam_pos 8, - eventually_L_ge P hP.lam_pos (2 * P.w)] with T hT hL8 hLw - have hF := hT₀ T hT - have hL0 : 0 < P.L T := by linarith - refine ⟨hF.b_ge_half, hF.b_le_a, hF.a_le_one, ?_, ?_⟩ - · apply mul_nonneg (by positivity) - apply intervalIntegral.integral_nonneg (by linarith : (0:ℝ) ≤ P.L T) - intro y hy - exact mul_nonneg (hF.g_nonneg y) hy.1 - · have hgcont : Continuous (P.localFunD T).g := by - have hw0 : 0 < P.w := by linarith [hP.one_le_w] - have hg := gD_deriv_facts hP.taper hP.lam_pos hP.lam_le_one hw0 hLw - exact hg.1.continuous - have hgle : ∀ y ∈ Set.Icc (0:ℝ) (P.L T), (P.localFunD T).g y * y ≤ P.L T * y := by - intro y hy - apply mul_le_mul_of_nonneg_right _ hy.1 - calc (P.localFunD T).g y ≤ (P.localFunD T).Aphi y := hF.g_le_Aphi y - _ ≤ max ((P.toSetting T).L - |y|) 0 := hF.Aphi_le y - _ ≤ P.L T := by - apply max_le _ hL0.le - have := abs_nonneg y - show (P.toSetting T).L - |y| ≤ P.L T - have e : (P.toSetting T).L = P.L T := rfl - rw [e] - linarith - have hIle : ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y - ≤ ∫ y in (0:ℝ)..(P.L T), P.L T * y := by - apply intervalIntegral.integral_mono_on (by linarith : (0:ℝ) ≤ P.L T) ?_ ?_ hgle - · exact (hgcont.mul continuous_id).intervalIntegrable 0 (P.L T) - · exact (continuous_const.mul continuous_id).intervalIntegrable 0 (P.L T) - have hIval : ∫ y in (0:ℝ)..(P.L T), P.L T * y = P.L T ^ 3 / 2 := by - rw [intervalIntegral.integral_const_mul, integral_id] - ring - calc 2 / P.L T ^ 3 * ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y - ≤ 2 / P.L T ^ 3 * (P.L T ^ 3 / 2) := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - rw [← hIval] - exact hIle - _ = 1 := by field_simp - case muints2 => - obtain ⟨C, T₁, hC⟩ := hΓ.int_mu_sq - refine ⟨max C 1, by positivity, max T₁ 0, fun T hT => - (hC T ((le_max_left _ _).trans hT)).trans ?_⟩ - have hT0 : 0 ≤ T := (le_max_right _ _).trans hT - rw [mul_div_assoc] - refine mul_le_mul_of_nonneg_right (le_max_left _ _) ?_ - exact div_nonneg (div_nonneg (mul_nonneg hT0 (sq_nonneg _)) (by positivity)) (sq_nonneg _) - case prop_trace => - obtain ⟨A, hA, T₁, hN⟩ := rvm_evBound inp.RvM - obtain ⟨C, T₂, hC⟩ := PrimeSide.prop_trace cϱD P.lam hΓ hcheb hlam A - refine ⟨max C 1, by positivity, max T₀ (max T₁ T₂), fun T hT => ?_⟩ - have h0 : T₀ ≤ T := (le_max_left _ _).trans hT - have h1 : T₁ ≤ T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT - have h2 : T₂ ≤ T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT - have hF := hT₀ T h0 - have := hC (P.toSetting T) (P.localFunD T) rfl h2 hF (Z.N T (2 * T) : ℝ) (hN T h1) - refine this.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) ?_) - exact mul_nonneg hF.L_pos.le (Real.sqrt_nonneg _) - case Msplit => - filter_upwards [eventually_ge_atTop T₀] with T hT - exact eq_Msplit cϱD hΓ (P.toSetting T) (P.localFunD T) (hT₀ T hT) - case sumJ => - obtain ⟨C, hC0, hC⟩ := ThmD.sumA2g_close hcheb - refine ⟨C, hC0, ?_⟩ - obtain ⟨T₁, hT₁⟩ := eventually_atTop.mp (eventually_L_ge P hP.lam_pos 8) - obtain ⟨T₂, hT₂⟩ := eventually_atTop.mp (eventually_L_ge P hP.lam_pos (2 * P.w)) - refine ⟨max T₀ (max T₁ T₂), fun T hT => ?_⟩ - have h1 : T₁ ≤ T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT - have h2 : T₂ ≤ T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT - have hL8 : 8 ≤ P.L T := hT₁ T h1 - have hLw : 2 * P.w ≤ P.L T := hT₂ T h2 - have hw0 : 0 < P.w := by linarith [hP.one_le_w] - have hL0 : 0 < P.L T := by linarith - have hg := gD_deriv_facts hP.taper hP.lam_pos hP.lam_le_one hw0 hLw - have hgsupp : ∀ y : ℝ, P.L T ≤ y → (P.localFunD T).g y = 0 := by - intro y hy - show Params.autocorr (fun u => phiD P.ϱ P.lam (P.L T) P.w u ^ 2) y = 0 - apply autocorr_eq_zero_of_support (M := P.L T / 2) ?_ ?_ (by linarith) - · intro u hu - rw [phiD_eq_zero hP.taper hw0 hu, zero_pow two_ne_zero] - · rw [abs_of_nonneg (by linarith : (0:ℝ) ≤ y)] - linarith - have key := hC (P.L T) (P.X T) (P.localFunD T).g hL8 (by - show P.X T = Real.exp (P.L T) - rfl) hg.1 hg.2.1 hg.2.2 hgsupp - have e : P.L T ^ 3 / 2 * ((concreteDataD P Z).JT T) - = ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y := by - show P.L T ^ 3 / 2 * (2 / P.L T ^ 3 * ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y) = _ - field_simp - show |sumA2g (P.X T) (P.localFunD T).g - P.L T ^ 3 / 2 * ((concreteDataD P Z).JT T)| - ≤ C * P.L T ^ 2 - rw [e] - exact key + (hLoc : LocalHypsCoreDEventually P) : FactsD (concreteDataD P Z) := + ⟨concreteTraceFactsBase hP inp hLoc, + concreteAbRangeD hP hLoc, + concreteSumJD hP sumA2g (ThmD.sumA2g_close inp.cheb)⟩ /-- **TracesBoundsD for the concrete Montgomery–Taylor window.** -/ theorem tracesBoundsD_concrete {Z : ZeroConfig} (hP : P.Valid) (inp : PaperInputs Z) diff --git a/zeta23/Zeta23/ThmD/Endgame.lean b/zeta23/Zeta23/ThmD/Endgame.lean index 1f4c561d05..3310ba7d16 100644 --- a/zeta23/Zeta23/ThmD/Endgame.lean +++ b/zeta23/Zeta23/ThmD/Endgame.lean @@ -3,24 +3,6 @@ Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ -/- -Zeta23/ThmD/Endgame.lean — the §6 endgame for the Montgomery–Taylor window. Mirror of -Zeta23/Assembly.lean's 'thmA_abstract_err' (Thm A line) and 'thmBC_core' (Thm B/C lines) with - - * the flat-top ratio constant F(λ₁) = (1/λ₁ + λ₁/3)⁻¹ replaced by the window-general - c := cRatio λ₁ a b J = λ₁a²/(b + λ₁²J) of [eq:ratio-general] (Zeta23/ThmD/AssemblyD.lean), fed by - the D-trace package 'TracesBoundsD' (tr1 / ratio / frhat) instead of 'TracesBounds'; - * the algebraic step "H(λ₁) ≥ H(λ) − 1/(λl)" replaced by an abstract limit hypothesis - 'cRatio(λ₁(T), a_T, b_T, J_T) → c∞' (discharged in Zeta23/ThmD/Limit.lean with c∞ = c*(λ) = - cStar λ of [eq:vstar]), so the conclusions carry the constants 2 − 1/c∞, 2c∞ − 1, c∞; - * the zero side (prop:block, prop:tail, the H-EF bridge) taken for the window-realizing - parameter family 'P.atD T' of Zeta23/ThmD/ParamsD.lean, whose window at height T is exactly φ_D - and whose L, X, λ₁, d, τ_k, 𝓔_T are P's definitionally. - -Paper: §7.1 [thm:D] ("The argument of §6 applies verbatim with (1/λ₁ + λ₁/3) replaced by -1/c_λ(φ) …"). --/ -import Zeta23.Assembly import Zeta23.ThmD.AssemblyD import Zeta23.ThmD.ParamsD @@ -34,106 +16,35 @@ namespace ThmD open Assembly -section Star - -/-- **Theorem D, Thm-A line, at fixed λ ∈ (0,1), abstract zero configuration and abstract -D-traces.** If the D-trace package holds for data (a_T, b_T, J_T, trG̃, trG̃²) against N(T,2T), -the ratio constant cRatio(λ₁(T); a_T, b_T, J_T) tends to c∞ > 0, a_T ∈ [1/2, 1] eventually, and -the zero-side inputs hold for the window-realizing family P.atD T whose prime-side traces and -taper constant ARE (trG̃, trG̃², a_T), then for every ε > 0, eventually -N₀*(T,2T) ≥ (2 − 1/c∞ − ε) N(T,2T). -/ -theorem thmD_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsD P aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (P.lam1 T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) - (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) +/-- Common `o(N)` package for Theorem D moment endgames (shared by ζ and L(s,χ), c = 2 and c = 3). -/ +lemma thmD_moment_o (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + {aT cT θ₀ : ℝ → ℝ} {C₁ C₂ c : ℝ} (hC₁ : 0 < C₁) (hc0 : 0 < c) + (hc : Tendsto cT atTop (𝓝 c)) (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) + (hθnn : ∀ᶠ T in atTop, 0 ≤ θ₀ T) (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = (P.atD T).Gp T) - (hId : ∀ᶠ T in atTop, (P.atD T).trGtilde T = trG T ∧ (P.atD T).trGtildeSq T = trG2 T ∧ - (P.atD T).a T = aT T) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - c⁻¹ - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0star T (2 * T) := by + let N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) + let cinv : ℝ → ℝ := fun T => (cT T)⁻¹ + let R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T + let R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) + let B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) + R₁ =o[atTop] N ∧ R₂ =o[atTop] N ∧ (fun T => (NII Z T : ℝ)) =o[atTop] N ∧ + Tendsto B atTop (𝓝 0) ∧ (∀ᶠ T in atTop, 0 ≤ cinv T ∧ cinv T ≤ 2 * c⁻¹) ∧ + (fun T => |cinv T - c⁻¹| * N T) =o[atTop] N := by have hlam0 := hP.lam_pos have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, hfr2⟩ := hTr.frhat obtain ⟨Cθ, hθ⟩ := hθ₀ obtain ⟨CII, hII⟩ := hNII - -- the functions of T (abbreviations) - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cinv : ℝ → ℝ := fun T => (cRatio (P.lam1 T) (aT T) (bT T) (JT T))⁻¹ with hcinv - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T with hR₁ - set R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) with hR₂ - set B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) with hBdef - set err : ℝ → ℝ := fun T => (4 * R₁ T + R₂ T + 3 * (NII Z T : ℝ) - + B T * (4 + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) + |cinv T - c⁻¹| * N T with herr - -- basic limits - have hLtop := tendsto_L_atTop P hlam0 + set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) + set cinv : ℝ → ℝ := fun T => (cT T)⁻¹ + set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T + set R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) + set B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) have hcinv_to : Tendsto cinv atTop (𝓝 c⁻¹) := hc.inv₀ hc0.ne' - ------------------------------------------------------------------ - -- (1) the main inequality, eventually in T - ------------------------------------------------------------------ - have hmain : ∀ᶠ T in atTop, (2 - c⁻¹) * N T - err T ≤ (Z.N0star T (2 * T) : ℝ) := by - filter_upwards [hBlock, hTail, hGzGp, hId, ha, eventually_ge_atTop T₁, - eventually_ge_atTop T₂, eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w)] - with T hBl hTl hGG hid ha2 hT₁ hT₂ hT0 hl hE0 - obtain ⟨hidtr, hidfr, hida⟩ := hid - have hapos' : 0 < aT T := by linarith [ha2.1] - have haposD : 0 < (P.atD T).a T := by rw [hida]; exact hapos' - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - -- Seam A for the window-realizing parameters - have hA := seamA hT0 hBl hTl haposD hLpos - -- the hat-unit traces in terms of the abstract data - have hrt : rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T := by - rw [rtrace_hat, hGG, rtrace_tilde_Gp, hidtr, hida]; rfl - have hfr : frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) - = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T := by - rw [frobSq_hat, hGG, frobSq_tilde_Gp, hidfr, hida]; rfl - have haL : (P.atD T).a T * (P.atD T).L T = aT T * P.L T := by rw [hida]; rfl - rw [hrt, hfr, haL] at hA - -- |tr Ĝ − N| ≤ R₁ - have htr : |(aT T * P.L T)⁻¹ * trG T - N T| ≤ R₁ T := - trGhat_sub_N_le hapos' hLpos (by simpa only using htr1 T hT₁) - -- ‖Ĝ‖² ≤ cinv N + R₂ - have hfrb : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T ≤ cinv T * N T + R₂ T := by - have h := hfr2 T hT₂ - simp only at h - have h1 : trG2 T / (aT T * P.L T) ^ 2 - cinv T * N T ≤ C₂ * P.calE T * (cinv T * N T) := by - rw [← mul_assoc] at h - exact le_trans (le_trans (le_max_left _ 0) (le_abs_self _)) h - have e : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T = trG2 T / (aT T * P.L T) ^ 2 := by - rw [inv_pow, div_eq_inv_mul] - rw [e]; simp only [hR₂]; linarith - have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le - have h := N0star_lower_c hB₀ hA htr hfrb - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hcd : (2 - c⁻¹) * N T - |cinv T - c⁻¹| * N T ≤ (2 - cinv T) * N T := by - have h1 := mul_le_mul_of_nonneg_right (le_abs_self (cinv T - c⁻¹)) hN0 - linarith [h1] - simp only [herr, hR₁, hR₂, hBdef, hNdef] at h hcd ⊢ - linarith - ------------------------------------------------------------------ - -- (2) err = o(N) - ------------------------------------------------------------------ - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop Z H.RvM - -- R₁ = o(N) - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / aT T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [ha] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith [ha2.1]))] - rw [div_le_iff₀ (by linarith [ha2.1])]; nlinarith [ha2.1] - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl Z H.RvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - -- cinv is eventually in [0, 2/c] and bounded + have o1 : R₁ =o[atTop] N := + isLittleO_sqrtX_div_a P hP hlam1 hC₁ (ha.mono fun _ h => h.1) (fun hf => hoTl _ hf) have hcinv_bd : ∀ᶠ T in atTop, 0 ≤ cinv T ∧ cinv T ≤ 2 * c⁻¹ := by have hcpos : (0:ℝ) < c⁻¹ := inv_pos.mpr hc0 filter_upwards [hcinv_to.eventually (eventually_ge_nhds hcpos), @@ -143,286 +54,176 @@ theorem thmD_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P. refine isBigO_one_of_abs_le (C := 2 * c⁻¹) ?_ filter_upwards [hcinv_bd] with T h rw [abs_of_nonneg h.1]; exact h.2 - -- R₂ = o(N) have o2 : R₂ =o[atTop] N := by - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have i1 : (fun T => cinv T * N T) =O[atTop] N := by - have := hcinvO.mul (isBigO_refl N atTop) - simpa using this - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO i1 - refine (this.congr_left fun T => ?_).congr_right fun T => by simp - simp only [hR₂] - -- N(I′∖I) = o(N) - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z H.RvM isLittleO_sqrt_mul_l_Tl) - -- B → 0 - have o4 : Tendsto B atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ - · filter_upwards [hTail, ha, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by nlinarith [ha2.1]) - · filter_upwards [hTail, ha, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < aT T := by linarith [ha2.1] - have hq : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - simp only [hBdef] - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (aT T * P.L T) := by - have : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [this]; gcongr; exact ha2.1 - -- the bracket and the constant-drift term - have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) - (cl := cinv) hNtop o1 o2 o3 o4 hcinv_bd - have o6 : (fun T => |cinv T - c⁻¹| * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => cinv T - c⁻¹) atTop (𝓝 0) := by - simpa using hcinv_to.sub_const c⁻¹ - simpa using this.abs - have herr_o : err =o[atTop] N := o5.add o6 - ------------------------------------------------------------------ - -- (3) conclude - ------------------------------------------------------------------ - exact eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o - -end Star - -section BC - -/-- **Theorem D, Thm-B/C lines, at fixed λ ∈ (0,1) — common core** (mirror of -'Assembly.thmBC_core' with F(λ₁) ↦ cRatio(λ₁; a_T, b_T, J_T) → c∞): there is R = o(N) with, -eventually in T, (2c∞ − 1)N − 2R ≤ N₀ˢ(T,2T) and c∞·N − R ≤ N_d(T,2T). -/ -theorem thmD_BC_core (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsD P aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (P.lam1 T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) + have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₂ + have i1 : (fun T => cinv T * N T) =O[atTop] N := by simpa using hcinvO.mul (isBigO_refl N atTop) + exact ((((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO i1).congr_left fun _ => rfl).congr_right + fun _ => by simp + have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := + isLittleO_NII_of Z ⟨CII, hII⟩ hoTl + have o4 : Tendsto B atTop (𝓝 0) := + tendsto_theta_div_aL P hP hlam1 (ha.mono fun _ h => h.1) hθnn ⟨Cθ, hθ⟩ + have o6 : (fun T => |cinv T - c⁻¹| * N T) =o[atTop] N := + isLittleO_of_tendsto_zero_mul (by simpa using (hcinv_to.sub_const c⁻¹).abs) + exact ⟨o1, o2, o3, o4, hcinv_bd, o6⟩ + +/-- Unified `c`-parameterized moment endgame (covers both `c = 2` with `(4, 2, 3, 4, 1)` and `c = 3` +with `(6, 3, 5, 6, 2)`, for both `ζ` and `L(s, χ)`). -/ +theorem thmD_moment_core (a_tr a_N a_NII a_B scale : ℝ) (ha_tr : 0 ≤ a_tr) (hscale : 0 < scale) + (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + {aT cT trG trG2 θ₀ lower : ℝ → ℝ} + (hTr1 : EvBound (fun T => trG T - aT T * P.L T * (Z.N T (2 * T) : ℝ)) + (fun T => P.L T * Real.sqrt (P.X T))) + (hFr2 : EvBound (fun T => max (trG2 T / (aT T * P.L T) ^ 2 - (cT T)⁻¹ * (Z.N T (2 * T) : ℝ)) 0) + (fun T => P.calE T * ((cT T)⁻¹ * (Z.N T (2 * T) : ℝ)))) + {c : ℝ} (hc0 : 0 < c) (hc : Tendsto cT atTop (𝓝 c)) (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) + (hθnn : ∀ᶠ T in atTop, 0 ≤ θ₀ T) (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = (P.atD T).Gp T) - (hId : ∀ᶠ T in atTop, (P.atD T).trGtilde T = trG T ∧ (P.atD T).trGtildeSq T = trG2 T ∧ - (P.atD T).a T = aT T) : - ∃ R : ℝ → ℝ, R =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) ∧ - ∀ᶠ T in atTop, - (2 * c - 1) * (Z.N T (2 * T) : ℝ) - 2 * R T ≤ Z.N0s T (2 * T) ∧ - c * (Z.N T (2 * T) : ℝ) - R T ≤ Z.Nd T (2 * T) := by + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) + (hcalE : Tendsto P.calE atTop (𝓝 0)) + (hSeam : ∀ᶠ T in atTop, + a_tr * ((aT T * P.L T)⁻¹ * trG T) - ((aT T * P.L T)⁻¹) ^ 2 * trG2 T + - a_N * (Z.N T (2 * T) : ℝ) - a_NII * (NII Z T : ℝ) + - (θ₀ T / (aT T * P.L T)) + * (a_B + 2 * Real.sqrt (((aT T * P.L T)⁻¹) ^ 2 * trG2 T) + θ₀ T / (aT T * P.L T)) + ≤ scale * lower T) : + EpsLowerBound ((a_tr - a_N - c⁻¹) / scale) lower (fun T => (Z.N T (2 * T) : ℝ)) := by + intro ε hε have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - have hcalE := calE_tendsto_zero P hlam0 hlam1 (zero_le_one.trans hP.one_le_w) - obtain ⟨C₃, hC₃, T₃, hratio⟩ := hTr.ratio - obtain ⟨C₄, hC₄, T₄, htr1⟩ := hTr.tr1 - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cT : ℝ → ℝ := fun T => cRatio (P.lam1 T) (aT T) (bT T) (JT T) with hcT - set x : ℝ → ℝ := fun T => θ₀ T * (P.d T : ℝ) / trG T with hxdef - set R : ℝ → ℝ := fun T => (C₃ * P.calE T * (cT T * N T) - + 2 * x T * ((1 + C₃ * P.calE T) * (cT T * N T))) - + (NII Z T : ℝ) + |cT T - c| * N T with hRdef - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop Z H.RvM - have hcE0 : Tendsto (fun T => C₃ * P.calE T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₃ - -- √X ≤ N/(4C₄) eventually (√X = o(Tl) = o(N)) - have hsqrtX : ∀ᶠ T in atTop, C₄ * Real.sqrt (P.X T) ≤ N T / 4 := by - have ho := isLittleO_N_of_isLittleO_Tl Z H.RvM (isLittleO_sqrtX_Tl P hlam0 hlam1) - have h := ho.def (show (0:ℝ) < 1 / (4 * C₄) by positivity) - filter_upwards [h] with T hT - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _), - abs_of_nonneg (Nat.cast_nonneg _)] at hT - have : C₄ * Real.sqrt (P.X T) ≤ C₄ * (1 / (4 * C₄) * N T) := - mul_le_mul_of_nonneg_left hT hC₄.le - calc C₄ * Real.sqrt (P.X T) ≤ C₄ * (1 / (4 * C₄) * N T) := this - _ = N T / 4 := by field_simp - -- Step 0: eventually tr G̃ ≥ L N / 4 > 0 and x ≤ 8(|Cθ|+1) T^{λ/2−1} (so θ₀ d < tr G̃ and x → 0). - have hx : ∀ᶠ T in atTop, 0 < trG T ∧ 0 ≤ x T ∧ - x T ≤ 8 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) ∧ θ₀ T * (P.d T : ℝ) < trG T := by - filter_upwards [hTail, hθ, ha, eventually_ge_atTop T₄, eventually_N_ge Z H.RvM, eventually_l_pos, - eventually_gt_atTop (0:ℝ), hsqrtX, - (tendsto_rpow_halflam_sub_one P hlam1).eventually - (eventually_lt_nhds (show (0:ℝ) < 1 / (16 * (|Cθ| + 1)) by positivity))] - with T hTl hθT ha2 hT₄ hNge hl hT0 hsX hTs + obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr1 + obtain ⟨C₂, _, T₂, hfr2⟩ := hFr2 + set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) + set cinv : ℝ → ℝ := fun T => (cT T)⁻¹ + set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T + set R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) + set B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) + set err : ℝ → ℝ := fun T => (a_tr * R₁ T + R₂ T + a_NII * (NII Z T : ℝ) + + B T * (a_B + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) + |cinv T - c⁻¹| * N T + obtain ⟨o1, o2, o3, o4, hcinv_bd, o6⟩ := + thmD_moment_o Z P hP hlam (C₂ := C₂) hC₁ hc0 hc ha hθnn hθ₀ hNII hoTl hcalE + have hmain : ∀ᶠ T in atTop, (a_tr - a_N - c⁻¹) * N T - err T ≤ scale * lower T := by + filter_upwards [hSeam, hθnn, ha, eventually_ge_atTop T₁, eventually_ge_atTop T₂, eventually_l_pos] + with T hA hθ0 ha2 hT₁ hT₂ hl + have hapos' : 0 < aT T := by linarith [ha2.1] have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have h1 := (abs_le.mp (by simpa only using htr1 T hT₄)).1 - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hLN : 0 < P.L T * N T := by - have : 0 < T * l T / (4 * Real.pi) := by positivity - exact mul_pos hLpos (this.trans_le hNge) - have htrG : P.L T * N T / 4 ≤ trG T := by - -- trG ≥ a L N − C₄ L √X ≥ L N/2 − L N/4 - have e1 : aT T * P.L T * N T ≥ 1 / 2 * (P.L T * N T) := by nlinarith [ha2.1, hLN.le] - have e2 : C₄ * (P.L T * Real.sqrt (P.X T)) ≤ P.L T * (N T / 4) := by - have := mul_le_mul_of_nonneg_left hsX hLpos.le - linarith [this] - simp only [hNdef] at h1 e1 e2 ⊢ - nlinarith [h1, e1, e2] - have htrGpos : 0 < trG T := lt_of_lt_of_le (by positivity) htrG - have hd : (P.d T : ℝ) ≤ P.L T * T / (2 * Real.pi) := d_le P (by positivity) - have hθ' : θ₀ T ≤ (|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1) := by - refine hθT.trans ?_ - have : Cθ ≤ |Cθ| + 1 := by linarith [le_abs_self Cθ] - gcongr - have hθ0 := hTl.theta_nonneg - have hnum : θ₀ T * (P.d T : ℝ) - ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := - mul_le_mul hθ' hd (Nat.cast_nonneg _) (hθ0.trans hθ') - have hden : P.L T * (T * l T / (4 * Real.pi)) / 4 ≤ trG T := - le_trans (by gcongr) htrG - have hxle : x T ≤ 8 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) := by - simp only [hxdef] - rw [div_le_iff₀ htrGpos] - calc θ₀ T * (P.d T : ℝ) - ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := hnum - _ = 8 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * (P.L T * (T * l T / (4 * Real.pi)) / 4) := by - ring - _ ≤ 8 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * trG T := by gcongr - refine ⟨htrGpos, div_nonneg (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrGpos.le, hxle, ?_⟩ - have hx1 : x T < 1 := by - refine hxle.trans_lt ?_ - have := (lt_div_iff₀ (show (0:ℝ) < 16 * (|Cθ| + 1) by positivity)).mp hTs - nlinarith [abs_nonneg Cθ, Real.rpow_nonneg hT0.le (P.lam / 2 - 1)] - simp only [hxdef] at hx1 - rwa [div_lt_one htrGpos] at hx1 - -- cT is eventually in [0, c+1] - have hcT_bd : ∀ᶠ T in atTop, 0 ≤ cT T ∧ cT T ≤ c + 1 := by - filter_upwards [hc.eventually (eventually_ge_nhds hc0), - hc.eventually (eventually_le_nhds (show c < c + 1 by linarith))] with T h1 h2 - exact ⟨h1, h2⟩ - refine ⟨R, ?_, ?_⟩ - ------------------------------------------------------------------ - -- R = o(N) - ------------------------------------------------------------------ - · have hFN : (fun T => cT T * N T) =O[atTop] N := by - refine IsBigO.of_bound (c + 1) ?_ - filter_upwards [hcT_bd] with T hb - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_mul, abs_of_nonneg hb.1] - exact mul_le_mul_of_nonneg_right hb.2 (abs_nonneg _) - have o1 : (fun T => C₃ * P.calE T * (cT T * N T)) =o[atTop] N := by - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO hFN - simpa using this - have hxto : Tendsto x atTop (𝓝 0) := by - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds - (by simpa using (tendsto_rpow_halflam_sub_one P hlam1).const_mul (8 * (|Cθ| + 1))) - (hx.mono fun T h => h.2.1) (hx.mono fun T h => h.2.2.1) - have o2 : (fun T => 2 * x T * ((1 + C₃ * P.calE T) * (cT T * N T))) =o[atTop] N := by - have h2x : Tendsto (fun T => 2 * x T) atTop (𝓝 0) := by simpa using hxto.const_mul 2 - have hK : (fun T => 1 + C₃ * P.calE T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2) ?_ - filter_upwards [hcE0.eventually (eventually_ge_nhds (show (-1:ℝ) < 0 by norm_num)), - hcE0.eventually (eventually_le_nhds (show (0:ℝ) < 1 by norm_num))] with T h1 h2 - rw [abs_of_nonneg (by linarith)]; linarith - have := ((isLittleO_one_iff ℝ).2 h2x).mul_isBigO (hK.mul hFN) - simpa using this - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z H.RvM isLittleO_sqrt_mul_l_Tl) - have o4 : (fun T => |cT T - c| * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => cT T - c) atTop (𝓝 0) := by - simpa using hc.sub_const c - simpa using this.abs - exact ((o1.add o2).add o3).add o4 - ------------------------------------------------------------------ - -- the inequalities, eventually - ------------------------------------------------------------------ - · filter_upwards [hBlock, hTail, hGzGp, hId, hx, eventually_ge_atTop T₃, - eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w)] - with T hBl hTl hGG hid hxT hT₃ hT0 hl hE0 - obtain ⟨hidtr, hidfr, hida⟩ := hid - have hGt : ((P.atD T).tilde T (Z.Gz (P.atD T) T)).IsHermitian := by - rw [hGG]; exact isHermitian_tilde _ _ (Gp_isHermitian _ _) - -- [eq:zeroside2] - have hZ := seamA_BC hT0 hBl hTl le_rfl hGt - -- lem:CS, [eq:nplus-lower] - have hθ0 := hTl.theta_nonneg - have hrt : rtrace ((P.atD T).tilde T (Z.Gz (P.atD T) T)) = trG T := by - rw [hGG, rtrace_tilde_Gp, hidtr] - have hfr : frobSq ((P.atD T).tilde T (Z.Gz (P.atD T) T)) = trG2 T := by - rw [hGG, frobSq_tilde_Gp, hidfr] - have htr' : θ₀ T * (Fintype.card (Fin ((P.atD T).d T)) : ℝ) - < rtrace ((P.atD T).tilde T (Z.Gz (P.atD T) T)) := by - rw [card_fin_d, hrt]; exact hxT.2.2.2 - have hCS₀ := nplus_lower hGt hθ0 htr' - rw [card_fin_d, hrt, hfr] at hCS₀ - have hCS : (trG T - θ₀ T * (P.d T : ℝ)) ^ 2 / trG2 T ≤ (posIndexAbove hGt (θ₀ T) : ℝ) := hCS₀ - have hratio' : |trG T ^ 2 / trG2 T - cT T * N T| ≤ C₃ * P.calE T * (cT T * N T) := by - have := hratio T hT₃; simp only at this; rw [← mul_assoc] at this; exact this - have htrG2 : 0 ≤ trG2 T := by rw [← hfr]; exact frobSq_nonneg _ - have hnp := nplus_ge_explicit hCS hxT.1 (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrG2 hratio' - -- c N − |cT − c| N ≤ cT N - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hcd : c * N T - |cT T - c| * N T ≤ cT T * N T := by - have h1 := mul_le_mul_of_nonneg_right (neg_abs_le (cT T - c)) hN0 - linarith [h1] - simp only [hRdef, hxdef, hNdef] at hnp hcd hZ ⊢ - constructor <;> linarith [hZ.1, hZ.2, hnp, hcd] - -/-- **Theorem D, Thm-B line** (fixed λ, abstract): N₀ˢ(T,2T) ≥ (2c∞ − 1 − ε) N(T,2T) eventually. -/ -theorem thmD_simple_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsD P aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (P.lam1 T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) + have htr : |(aT T * P.L T)⁻¹ * trG T - N T| ≤ R₁ T := + trGhat_sub_N_le hapos' hLpos (htr1 T hT₁) + have hfrb : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T ≤ cinv T * N T + R₂ T := by + have h := hfr2 T hT₂; simp only at h; rw [← mul_assoc] at h + have h1 := le_trans (le_trans (le_max_left _ 0) (le_abs_self _)) h + have e : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T = trG2 T / (aT T * P.L T) ^ 2 := by + rw [inv_pow, div_eq_inv_mul] + rw [e]; linarith + have h := count_lower_moment_gen (R₁ := R₁ T) ha_tr (div_nonneg hθ0 (mul_pos hapos' hLpos).le) hA + (by linarith [(abs_le.mp htr).1]) hfrb + have hcd : (a_tr - a_N - c⁻¹) * N T - |cinv T - c⁻¹| * N T ≤ (a_tr - a_N - cinv T) * N T := by + have := mul_le_mul_of_nonneg_right (le_abs_self (cinv T - c⁻¹)) (Nat.cast_nonneg (Z.N T (2 * T))) + linarith + linarith + have o5 := err_isLittleO hNtop o1 o2 o3 o4 hcinv_bd + have oB : B =o[atTop] N := by + refine ((isLittleO_one_iff ℝ).2 o4).trans_isBigO (IsBigO.of_bound 1 ?_) + filter_upwards [hNtop.eventually_ge_atTop 1] with T h1 + rw [norm_one, Real.norm_eq_abs, abs_of_nonneg (by linarith), one_mul]; exact h1 + have o5' : (fun T => a_tr * R₁ T + R₂ T + a_NII * (NII Z T : ℝ) + + B T * (a_B + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) =o[atTop] N := + (o5.add (((o1.const_mul_left (a_tr - 4)).add (o3.const_mul_left (a_NII - 3))).add + (oB.const_mul_left (a_B - 4)))).congr_left fun _ => by ring + obtain ⟨T₀, hT₀⟩ := eps_form_of_isLittleO hmain (Eventually.of_forall fun _ => Nat.cast_nonneg _) + (o5'.add o6) (ε * scale) (mul_pos hε hscale) + refine ⟨T₀, fun T hT => ?_⟩ + have h1 : (a_tr - a_N - c⁻¹ - ε * scale) * N T ≤ scale * lower T := hT₀ T hT + have hmul : scale * (((a_tr - a_N - c⁻¹) / scale - ε) * N T) + = (a_tr - a_N - c⁻¹ - ε * scale) * N T := by field_simp + exact le_of_mul_le_mul_left (hmul.symm ▸ h1) hscale + +/-- Shared Seam-A transfer on `P.atD T` (reused by `thmD_abstract`, `thmDChi_abstract`, +`ThmD/Mult`, and `ThmDE/Mult`). -/ +theorem eventually_atD_of_seam (Z : ZeroConfig) (P : Params) (hP : P.Valid) + {aT trG trG2 θ₀ : ℝ → ℝ} (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = (P.atD T).Gp T) - (hId : ∀ᶠ T in atTop, (P.atD T).trGtilde T = trG T ∧ (P.atD T).trGtildeSq T = trG2 T ∧ - (P.atD T).a T = aT T) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * c - 1 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by - obtain ⟨R, hR, hev⟩ := thmD_BC_core Z H P hP hlam aT bT JT trG trG2 hTr hc0 hc ha hBlock θ₀ - hTail hθ₀ hNII hGzGp hId - refine eps_form_of_isLittleO (err := fun T => 2 * R T) (hev.mono fun T h => ?_) - (Eventually.of_forall fun T => Nat.cast_nonneg _) (hR.const_mul_left 2) - linarith [h.1] + (hrt : ∀ᶠ T in atTop, rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T) + (hfr : ∀ᶠ T in atTop, frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T) + (hida : ∀ᶠ T in atTop, (P.atD T).a T = aT T) + {c kN kNII : ℝ} {rhs : ℝ → ℝ} + (hseam : ∀ᶠ T in atTop, 0 ≤ T → 0 < (P.atD T).a T → 0 < (P.atD T).L T → + c * rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) - frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) + - kN * (Z.N T (2 * T) : ℝ) - kNII * (NII Z T : ℝ) + - θ₀ T / ((P.atD T).a T * (P.atD T).L T) * + (c + 2 * Real.sqrt (frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T))) + + θ₀ T / ((P.atD T).a T * (P.atD T).L T)) + ≤ rhs T) : + ∀ᶠ T in atTop, + c * ((aT T * P.L T)⁻¹ * trG T) - ((aT T * P.L T)⁻¹) ^ 2 * trG2 T + - kN * (Z.N T (2 * T) : ℝ) - kNII * (NII Z T : ℝ) + - θ₀ T / (aT T * P.L T) * + (c + 2 * Real.sqrt (((aT T * P.L T)⁻¹) ^ 2 * trG2 T) + θ₀ T / (aT T * P.L T)) + ≤ rhs T := by + filter_upwards [hseam, hrt, hfr, hida, ha, eventually_ge_atTop (0:ℝ), eventually_l_pos] + with T hA hrtT hfrT hidaT ha2 hT0 hl + have hlam0 := hP.lam_pos + have hA' := hA hT0 (by rw [hidaT]; linarith [ha2.1]) (by simp only [Params.L]; positivity) + have haL : (P.atD T).a T * (P.atD T).L T = aT T * P.L T := by rw [hidaT]; rfl + rwa [hrtT, hfrT, haL] at hA' -/-- **Theorem D, Thm-C line** (fixed λ, abstract): N_d(T,2T) ≥ (c∞ − ε) N(T,2T) eventually. -/ -theorem thmD_dist_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsD P aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (P.lam1 T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) +/-- Shared Seam-A transfer on `P.atD T` for `N₀*` (reused by `thmD_abstract` and `thmDChi_abstract`). -/ +lemma eventually_seamA_atD (Z : ZeroConfig) (P : Params) (hP : P.Valid) + {aT trG trG2 θ₀ : ℝ → ℝ} (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = (P.atD T).Gp T) - (hId : ∀ᶠ T in atTop, (P.atD T).trGtilde T = trG T ∧ (P.atD T).trGtildeSq T = trG2 T ∧ - (P.atD T).a T = aT T) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (c - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by - obtain ⟨R, hR, hev⟩ := thmD_BC_core Z H P hP hlam aT bT JT trG trG2 hTr hc0 hc ha hBlock θ₀ - hTail hθ₀ hNII hGzGp hId - exact eps_form_of_isLittleO (err := R) (hev.mono fun T h => h.2) - (Eventually.of_forall fun T => Nat.cast_nonneg _) hR + (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) + (hrt : ∀ᶠ T in atTop, rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T) + (hfr : ∀ᶠ T in atTop, frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T) + (hida : ∀ᶠ T in atTop, (P.atD T).a T = aT T) : + ∀ᶠ T in atTop, + 4 * ((aT T * P.L T)⁻¹ * trG T) - ((aT T * P.L T)⁻¹) ^ 2 * trG2 T + - 2 * (Z.N T (2 * T) : ℝ) - 3 * (NII Z T : ℝ) + - (θ₀ T / (aT T * P.L T)) + * (4 + 2 * Real.sqrt (((aT T * P.L T)⁻¹) ^ 2 * trG2 T) + θ₀ T / (aT T * P.L T)) + ≤ 1 * (Z.N0star T (2 * T) : ℝ) := + eventually_atD_of_seam Z P hP ha hrt hfr hida + (hBlock.and hTail |>.mono fun _ ⟨hBl, hTl⟩ hT0 ha' hL' => by + simpa only [one_mul] using seamA hT0 hBl hTl ha' hL') + +section Star -end BC +/-- Shared concrete-D inputs consumed by both the ζ (`ThmD`) and Dirichlet (`ThmDE`) endgames. -/ +structure ConcreteDSetupG (Z : ZeroConfig) (P : Params) (lam1f aT bT JT trG trG2 : ℝ → ℝ) : + Prop where + hTr : TracesBoundsDG P lam1f aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ)) + hc : Tendsto (fun T => cRatio (lam1f T) (aT T) (bT T) (JT T)) atTop (𝓝 (cStar P.lam)) + hc0 : 0 < cStar P.lam + ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1 + hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T + hTailPack : ∃ θ₀ : ℝ → ℝ, + (∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) ∧ + ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) + hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T + hrt : ∀ᶠ T in atTop, + rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T + hfr : ∀ᶠ T in atTop, + frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T + hida : ∀ᶠ T in atTop, (P.atD T).a T = aT T + hcalE : Tendsto P.calE atTop (𝓝 0) + +/-- Generic `N₀*` Theorem-D endgame from `ConcreteDSetupG`, shared by `ζ` and `L(s, χ)`. -/ +theorem ConcreteDSetupG.thmD_lam {Z : ZeroConfig} {P : Params} {lam1f aT bT JT trG trG2 : ℝ → ℝ} + (S : ConcreteDSetupG Z P lam1f aT bT JT trG trG2) (hP : P.Valid) (hlam : P.lam < 1) + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → + f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) : + DyadicLowerBound (2 - (cStar P.lam)⁻¹) + (fun T => Z.N0star T (2 * T)) (fun T => Z.N T (2 * T)) := by + obtain ⟨θ₀, hTail, hθ₀⟩ := S.hTailPack + have h := thmD_moment_core 4 2 3 4 1 (by norm_num) (by norm_num) Z P hP hlam S.hTr.tr1 + S.hTr.frhat S.hc0 S.hc S.ha (hTail.mono fun _ h => h.theta_nonneg) hθ₀ S.hNII hNtop hoTl + S.hcalE (eventually_seamA_atD Z P hP S.ha S.hBlock hTail S.hrt S.hfr S.hida) + simpa only [show (4 - 2 - (cStar P.lam)⁻¹) / 1 = 2 - (cStar P.lam)⁻¹ by ring] using h + +end Star end ThmD end Zeta23 diff --git a/zeta23/Zeta23/ThmD/Final.lean b/zeta23/Zeta23/ThmD/Final.lean index abd5c3c9d4..91335913a7 100644 --- a/zeta23/Zeta23/ThmD/Final.lean +++ b/zeta23/Zeta23/ThmD/Final.lean @@ -27,7 +27,6 @@ and dyadic summation (Main.cumulative_of_dyadic). -/ import Zeta23.Final import Zeta23.ThmD.Endgame -import Zeta23.ThmD.Concrete import Zeta23.ThmD.ZeroSideD import Zeta23.ThmD.Limit @@ -40,39 +39,41 @@ namespace ThmD open Assembly -/-- **Theorem D at fixed λ ∈ (0,1), abstract zero configuration with the paper's inputs** — -all three lines, constants HD λ = 2 − 1/c*(λ), 2c*(λ) − 1, c*(λ). -/ -theorem thmD_lam_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) : - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0star T (2 * T)) ∧ - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * cStar P.lam - 1 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T)) ∧ - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (cStar P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T)) := by +/-- Shared concrete-D inputs consumed by the §6 endgame abstracts. -/ +abbrev ConcreteDSetup (Z : ZeroConfig) (P : Params) : Prop := + ConcreteDSetupG Z P P.lam1 (concreteDataD P Z).aT (concreteDataD P Z).bT + (concreteDataD P Z).JT (concreteDataD P Z).trG (concreteDataD P Z).trG2 + +/-- Build the shared concrete-D endgame pack from `PaperInputs` + `P.Valid`. -/ +theorem concreteDSetup (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) : + ConcreteDSetup Z P := by have hLoc : LocalHypsCoreDEventually P := localHypsCoreD_eventually hP - have hTr := tracesBoundsD_concrete (Z := Z) hP H hLoc - have hc := tendsto_cRatio_concrete hP Z - have hc0 := cStar_pos hP.lam_pos hP.lam_le_one - have ha : ∀ᶠ T in atTop, 1 / 2 ≤ (concreteDataD P Z).aT T ∧ (concreteDataD P Z).aT T ≤ 1 := - (concreteFactsD hP H hLoc).ab_range.mono fun T h => ⟨h.1.trans h.2.1, h.2.2.1⟩ - have hBlock := eventually_blockInputsD Z hP obtain ⟨θ₀, hTail, hθ₀⟩ := eventually_tailPackageD Z H hP obtain ⟨A₀, hA₀, hloc⟩ := H.RvM.local_count - have hNII := Tail.eventually_NII_le Z hA₀ hloc have hGzGp := eventually_GzGpD Z H hP - have hId : ∀ᶠ T in atTop, (P.atD T).trGtilde T = (concreteDataD P Z).trG T ∧ - (P.atD T).trGtildeSq T = (concreteDataD P Z).trG2 T ∧ - (P.atD T).a T = (concreteDataD P Z).aT T := - Eventually.of_forall fun T => - ⟨Params.atD_trGtilde T hP, Params.atD_trGtildeSq T hP, Params.atD_a T hP⟩ - have hcalE := calE_tendsto_zero P hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w) - refine ⟨?_, ?_, ?_⟩ - · have h := thmD_abstract Z H P hP hlam _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ hTail hθ₀ hNII hGzGp - hId hcalE - simpa only [HD, one_div] using h - · exact thmD_simple_abstract Z H P hP hlam _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ hTail hθ₀ hNII - hGzGp hId - · exact thmD_dist_abstract Z H P hP hlam _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ hTail hθ₀ hNII - hGzGp hId + exact { + hTr := tracesBoundsD_concrete (Z := Z) hP H hLoc + hc := tendsto_cRatio_concrete hP Z + hc0 := cStar_pos hP.lam_pos hP.lam_le_one + ha := (concreteFactsD hP H hLoc).ab_range.mono fun T h => ⟨h.1.trans h.2.1, h.2.2.1⟩ + hBlock := eventually_blockInputsD Z hP + hTailPack := ⟨θ₀, hTail, hθ₀⟩ + hNII := Tail.eventually_NII_le Z hA₀ hloc + hrt := hGzGp.mono fun T hGG => by + rw [rtrace_hat, hGG, rtrace_tilde_Gp, Params.atD_trGtilde T hP, Params.atD_a T hP]; rfl + hfr := hGzGp.mono fun T hGG => by + rw [frobSq_hat, hGG, frobSq_tilde_Gp, Params.atD_trGtildeSq T hP, Params.atD_a T hP]; rfl + hida := Eventually.of_forall fun T => Params.atD_a T hP + hcalE := calE_tendsto_zero P hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w) + } + +/-- **Theorem D at fixed λ ∈ (0,1), abstract zero configuration with the paper's inputs**, +constant `HD λ = 2 − 1/c*(λ)`. -/ +theorem thmD_lam_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) : + DyadicLowerBound (HD P.lam) (fun T => Z.N0star T (2 * T)) (fun T => Z.N T (2 * T)) := by + simpa only [HD, one_div] using (concreteDSetup Z H P hP).thmD_lam hP hlam + (tendsto_N_atTop Z H.RvM) (fun _ h => isLittleO_N_of_isLittleO_Tl Z H.RvM h) /-! ## ζ: fixed λ, then λ → 1⁻, then cumulative — NO hypotheses -/ @@ -81,71 +82,22 @@ section Zeta /-- **Theorem D at fixed λ ∈ (0,1)**, Thm-A line, UNCONDITIONAL: N₀*(T,2T) ≥ (2 − 1/c*(λ) − ε) N(T,2T) for all large T. -/ theorem thmD_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD lam - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := by + DyadicLowerBound (HD lam) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T)) := by have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - exact (thmD_lam_abstract zetaZeroConfig paperInputs_zeta (paramsOf stdProfile lam) hP h1).1 - -/-- fixed λ, Thm-B line, UNCONDITIONAL: N₀ˢ(T,2T) ≥ (2c*(λ) − 1 − ε) N(T,2T). -/ -theorem thmD_simple_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * cStar lam - 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - exact (thmD_lam_abstract zetaZeroConfig paperInputs_zeta (paramsOf stdProfile lam) hP h1).2.1 - -/-- fixed λ, Thm-C line, UNCONDITIONAL: N_d(T,2T) ≥ (c*(λ) − ε) N(T,2T). -/ -theorem thmD_dist_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (cStar lam - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - exact (thmD_lam_abstract zetaZeroConfig paperInputs_zeta (paramsOf stdProfile lam) hP h1).2.2 + exact thmD_lam_abstract zetaZeroConfig paperInputs_zeta (paramsOf stdProfile lam) hP h1 /-- **Theorem D** [thm:D], UNCONDITIONAL: for every ε > 0 and all large T, -N₀*(T,2T) ≥ (2 − 1/c₁* − ε) N(T,2T), where 2 − 1/c₁* = HD 1 = 3/2 − cot(1/√2)/√2 (= 0.6725…): -at least that proportion of the nontrivial zeros of Mathlib's riemannZeta with T < Im ρ ≤ 2T, counted -with multiplicity, are matched by DISTINCT zeros on the critical line. -/ +N₀*(T,2T) ≥ (2 − 1/c₁* − ε) N(T,2T), where 2 − 1/c₁* = HD 1 = 3/2 − cot(1/√2)/√2 (= 0.6725…). -/ theorem thmD₀ : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := + DyadicLowerBound (HD 1) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T)) := eps_form_HD (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (N0star T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) fun lam h1 h2 => thmD_lam (by linarith) h2 - -/-- **Theorem D**, the constant written out: (3/2 − cot(1/√2)/√2 − ε) N(T,2T) ≤ N₀*(T,2T). -/ -theorem thmD₀' : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (3 / 2 - (Real.sqrt 2)⁻¹ * (Real.cos (Real.sqrt 2)⁻¹ / Real.sin (Real.sqrt 2)⁻¹) - ε) - * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := by - rw [← HD_one]; exact thmD₀ - -/-- **Theorem D**, simple-zeros line [thm:D], UNCONDITIONAL: N₀ˢ(T,2T) ≥ (2c₁* − 1 − ε) N(T,2T) -(= 0.5065…): at least that proportion are SIMPLE zeros ON the line. -/ -theorem thmD₀_simple : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * cStar 1 - 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - eps_form_twoCStar (N := fun T => (Ncount T (2 * T) : ℝ)) - (lower := fun T => (N0simple T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) fun lam h1 h2 => thmD_simple_lam (by linarith) h2 - -/-- **Theorem D**, distinct-zeros line [thm:D], UNCONDITIONAL: N_d(T,2T) ≥ (c₁* − ε) N(T,2T) -(= 0.7532…). -/ -theorem thmD₀_dist : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (cStar 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - eps_form_cStar (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (Ndist T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) fun lam h1 h2 => thmD_dist_lam (by linarith) h2 + (fun _ => Nat.cast_nonneg _) fun _ h1 h2 => thmD_lam (by linarith) h2 /-- **Theorem D**, cumulative, UNCONDITIONAL: liminf_{T→∞} N₀*(T)/N(T) ≥ 2 − 1/c₁*. -/ theorem thmD₀_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD 1 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := + DyadicLowerBound (HD 1) (fun T => N0star 0 T) (fun T => Ncount 0 T) := cumulative_of_dyadic zetaSeam paperInputs_zeta.RvM (fun _ _ _ => N0star_add' zetaSeam) thmD₀ -/-- cumulative simple-zeros line: liminf N₀ˢ(T)/N(T) ≥ 2c₁* − 1. -/ -theorem thmD₀_simple_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 * cStar 1 - 1 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := - cumulative_of_dyadic zetaSeam paperInputs_zeta.RvM (fun _ _ _ => N0simple_add' zetaSeam) - thmD₀_simple - -/-- cumulative distinct-zeros line: liminf N_d(T)/N(T) ≥ c₁*. -/ -theorem thmD₀_dist_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (cStar 1 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := - cumulative_of_dyadic zetaSeam paperInputs_zeta.RvM (fun _ _ _ => Ndist_add' zetaSeam) thmD₀_dist - end Zeta end ThmD diff --git a/zeta23/Zeta23/ThmD/Functional.lean b/zeta23/Zeta23/ThmD/Functional.lean index 41cc13afae..8eb30a251a 100644 --- a/zeta23/Zeta23/ThmD/Functional.lean +++ b/zeta23/Zeta23/ThmD/Functional.lean @@ -117,105 +117,6 @@ theorem cStar_pos {lam : ℝ} (h0 : 0 < lam) (h1 : lam ≤ 1) : 0 < cStar lam := have hd := cStar_denom_ge h0.le h1 positivity -/-- Lipschitz bound on [0,1]: |c*_x − c*_y| ≤ 14|x − y| (the constant is crude). -/ -theorem cStar_lipschitzOn {x y : ℝ} (hx0 : 0 ≤ x) (hx1 : x ≤ 1) (hy0 : 0 ≤ y) (hy1 : y ≤ 1) : - |cStar x - cStar y| ≤ 14 * |x - y| := by - have hs2 : (0:ℝ) < Real.sqrt 2 := by positivity - have h12 : (1:ℝ) ≤ Real.sqrt 2 := by nlinarith [Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 2)] - have h32 : Real.sqrt 2 ≤ 3 / 2 := by nlinarith [Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 2)] - set Nx := Real.sqrt 2 * Real.sin (theta x) with hNxd - set Ny := Real.sqrt 2 * Real.sin (theta y) with hNyd - set Dx := Real.cos (theta x) + theta x * Real.sin (theta x) with hDxd - set Dy := Real.cos (theta y) + theta y * Real.sin (theta y) with hDyd - have hDx0 : (3:ℝ)/4 ≤ Dx := cStar_denom_ge hx0 hx1 - have hDy0 : (3:ℝ)/4 ≤ Dy := cStar_denom_ge hy0 hy1 - have hθd : theta x - theta y = (x - y) / Real.sqrt 2 := by unfold theta; ring - have hθabs : |theta x - theta y| ≤ |x - y| := by - rw [hθd, abs_div, abs_of_pos hs2] - exact div_le_self (abs_nonneg _) h12 - have hsinθ : |Real.sin (theta x) - Real.sin (theta y)| ≤ |x - y| / Real.sqrt 2 := by - rw [← abs_of_pos hs2, ← abs_div, ← hθd] - exact Real.abs_sin_sub_sin_le _ _ - have hsinθ' : |Real.sin (theta x) - Real.sin (theta y)| ≤ |x - y| := - le_trans (Real.abs_sin_sub_sin_le _ _) hθabs - have hcosθ : |Real.cos (theta x) - Real.cos (theta y)| ≤ |x - y| := - le_trans (Real.abs_cos_sub_cos_le _ _) hθabs - have hθyabs : |theta y| ≤ 1 := by - rw [abs_of_nonneg (theta_nonneg hy0)] - exact le_trans (theta_le hy1 hy0) (le_of_lt sqrt_two_inv_lt_one) - -- |Nx − Ny| ≤ |x − y|·(3/2) (crude: √2 ≤ 3/2, |sin difference| ≤ |x−y|) - have hNd : |Nx - Ny| ≤ 3 / 2 * |x - y| := by - rw [hNxd, hNyd, ← mul_sub, abs_mul, abs_of_pos hs2] - exact mul_le_mul h32 hsinθ' (abs_nonneg _) (by norm_num) - -- |Dx − Dy| ≤ 3|x − y| - have hDd : |Dx - Dy| ≤ 3 * |x - y| := by - have e : Dx - Dy = (Real.cos (theta x) - Real.cos (theta y)) - + ((theta x - theta y) * Real.sin (theta x) - + theta y * (Real.sin (theta x) - Real.sin (theta y))) := by - rw [hDxd, hDyd]; ring - have h1 : |(theta x - theta y) * Real.sin (theta x)| ≤ |x - y| := by - rw [abs_mul] - calc |theta x - theta y| * |Real.sin (theta x)| ≤ |x - y| * 1 := - mul_le_mul hθabs (Real.abs_sin_le_one _) (abs_nonneg _) (abs_nonneg _) - _ = |x - y| := mul_one _ - have h2 : |theta y * (Real.sin (theta x) - Real.sin (theta y))| ≤ |x - y| := by - rw [abs_mul] - calc |theta y| * |Real.sin (theta x) - Real.sin (theta y)| ≤ 1 * |x - y| := - mul_le_mul hθyabs hsinθ' (abs_nonneg _) zero_le_one - _ = |x - y| := one_mul _ - calc |Dx - Dy| = |(Real.cos (theta x) - Real.cos (theta y)) - + ((theta x - theta y) * Real.sin (theta x) - + theta y * (Real.sin (theta x) - Real.sin (theta y)))| := by rw [e] - _ ≤ |Real.cos (theta x) - Real.cos (theta y)| - + |(theta x - theta y) * Real.sin (theta x) - + theta y * (Real.sin (theta x) - Real.sin (theta y))| := abs_add_le _ _ - _ ≤ |Real.cos (theta x) - Real.cos (theta y)| - + (|(theta x - theta y) * Real.sin (theta x)| - + |theta y * (Real.sin (theta x) - Real.sin (theta y))|) := by - linarith [abs_add_le ((theta x - theta y) * Real.sin (theta x)) - (theta y * (Real.sin (theta x) - Real.sin (theta y)))] - _ ≤ 3 * |x - y| := by linarith - -- |Ny| ≤ 3/2, |Dy| ≤ 2 - have hNy : |Ny| ≤ 3 / 2 := by - rw [hNyd, abs_mul, abs_of_pos hs2] - calc Real.sqrt 2 * |Real.sin (theta y)| ≤ (3/2) * 1 := - mul_le_mul h32 (Real.abs_sin_le_one _) (abs_nonneg _) (by norm_num) - _ = 3 / 2 := mul_one _ - have hDy2 : |Dy| ≤ 2 := by - rw [hDyd] - calc |Real.cos (theta y) + theta y * Real.sin (theta y)| - ≤ |Real.cos (theta y)| + |theta y * Real.sin (theta y)| := abs_add_le _ _ - _ ≤ 1 + 1 * 1 := by - refine add_le_add (Real.abs_cos_le_one _) ?_ - rw [abs_mul] - exact mul_le_mul hθyabs (Real.abs_sin_le_one _) (abs_nonneg _) zero_le_one - _ = 2 := by norm_num - -- assemble - have hDxne : Dx ≠ 0 := by linarith - have hDyne : Dy ≠ 0 := by linarith - have key : cStar x - cStar y = (Nx * Dy - Ny * Dx) / (Dx * Dy) := by - unfold cStar - rw [div_sub_div _ _ hDxne hDyne] - ring - rw [key, abs_div] - have hnum : |Nx * Dy - Ny * Dx| ≤ 15 / 2 * |x - y| := by - have e : Nx * Dy - Ny * Dx = (Nx - Ny) * Dy + Ny * (Dy - Dx) := by ring - rw [e] - calc |(Nx - Ny) * Dy + Ny * (Dy - Dx)| - ≤ |(Nx - Ny) * Dy| + |Ny * (Dy - Dx)| := abs_add_le _ _ - _ = |Nx - Ny| * |Dy| + |Ny| * |Dy - Dx| := by rw [abs_mul, abs_mul] - _ ≤ (3 / 2 * |x - y|) * 2 + (3 / 2) * (3 * |x - y|) := by - refine add_le_add (mul_le_mul hNd hDy2 (abs_nonneg _) (by positivity)) ?_ - rw [abs_sub_comm] - exact mul_le_mul hNy hDd (abs_nonneg _) (by norm_num) - _ = 15 / 2 * |x - y| := by ring - have hden : 9 / 16 ≤ |Dx * Dy| := by - rw [abs_of_pos (by nlinarith : (0:ℝ) < Dx * Dy)] - nlinarith - calc |Nx * Dy - Ny * Dx| / |Dx * Dy| ≤ (15 / 2 * |x - y|) / (9 / 16) := by - apply div_le_div₀ (by positivity) hnum (by norm_num) hden - _ ≤ 14 * |x - y| := by rw [div_div_eq_mul_div]; nlinarith [abs_nonneg (x - y)] - /-- c*_λ is continuous on [0,1] (its denominator is ≥ 3/4 there); this is all the λ → 1⁻ passage needs. -/ theorem cStar_continuousOn : ContinuousOn cStar (Set.Icc 0 1) := by have hnum : Continuous fun lam : ℝ => Real.sqrt 2 * Real.sin (theta lam) := by unfold theta; fun_prop @@ -476,7 +377,6 @@ theorem HD_one : rw [mul_inv_cancel₀ hs.ne', hsq] ring - /-- closed form of J* (used by Window.lean's jD_close): J* = sin(2ϑ)/(8ϑ³) − cos(2ϑ)/(4ϑ²) (pure algebra from jStar_eq + aStar_eq + bStar_eq, using λ² = 2ϑ², sin 2ϑ = 2 sin ϑ cos ϑ, cos 2ϑ = 1 − 2 sin²ϑ). -/ diff --git a/zeta23/Zeta23/ThmD/Limit.lean b/zeta23/Zeta23/ThmD/Limit.lean index 6013bdd232..2a3014e3da 100644 --- a/zeta23/Zeta23/ThmD/Limit.lean +++ b/zeta23/Zeta23/ThmD/Limit.lean @@ -10,7 +10,6 @@ Zeta23/ThmD/Limit.lean — Theorem D endgame: the exact-constant limit. (L3) the λ → 1⁻ ε-step for the three Theorem-D rates (HD, 2c*−1, c*), by the Lipschitz bound. -/ import Zeta23.ThmD.Concrete -import Zeta23.Assembly open Filter Real Topology @@ -74,8 +73,8 @@ theorem eps_form_of_approx {g : ℝ → ℝ} {N lower : ℝ → ℝ} (hg : ∀ δ : ℝ, 0 < δ → ∃ lam : ℝ, 1/2 ≤ lam ∧ lam < 1 ∧ g 1 - δ ≤ g lam) (hN : ∀ T, 0 ≤ N T) (h : ∀ lam : ℝ, 1/2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (g lam - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (g 1 - ε) * N T ≤ lower T := by + EpsLowerBound (g lam) lower N) : + EpsLowerBound (g 1) lower N := by intro ε hε obtain ⟨lam, hl1, hl2, hg'⟩ := hg (ε/2) (by linarith) obtain ⟨T₀, hT₀⟩ := h lam hl1 hl2 (ε/2) (by linarith) @@ -103,27 +102,11 @@ theorem approx_of_continuousWithinAt {g : ℝ → ℝ} (hg : ContinuousWithinAt private theorem one_mem : (1:ℝ) ∈ Set.Icc (0:ℝ) 1 := ⟨zero_le_one, le_rfl⟩ -/-- the c*-rate ε-step. -/ -theorem eps_form_cStar {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) - (h : ∀ lam : ℝ, 1/2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (cStar lam - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (cStar 1 - ε) * N T ≤ lower T := - eps_form_of_approx (approx_of_continuousWithinAt (cStar_continuousOn 1 one_mem)) hN h - -/-- the (2c* − 1)-rate ε-step. -/ -theorem eps_form_twoCStar {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) - (h : ∀ lam : ℝ, 1/2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, ((2 * cStar lam - 1) - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, ((2 * cStar 1 - 1) - ε) * N T ≤ lower T := - eps_form_of_approx (g := fun lam => 2 * cStar lam - 1) - (approx_of_continuousWithinAt - ((continuousWithinAt_const.mul (cStar_continuousOn 1 one_mem)).sub continuousWithinAt_const)) hN h - /-- the HD-rate ε-step (HD = 2 − 1/c*; c* 1 > 0 makes 1/c* continuous at 1 within [0,1]). -/ theorem eps_form_HD {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) (h : ∀ lam : ℝ, 1/2 ≤ lam → lam < 1 → - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (HD lam - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (HD 1 - ε) * N T ≤ lower T := by + EpsLowerBound (HD lam) lower N) : + EpsLowerBound (HD 1) lower N := by refine eps_form_of_approx (g := HD) (approx_of_continuousWithinAt ?_) hN h have hc : ContinuousWithinAt cStar (Set.Icc 0 1) 1 := cStar_continuousOn 1 one_mem have h1 : cStar 1 ≠ 0 := (cStar_pos one_pos le_rfl).ne' @@ -132,22 +115,31 @@ theorem eps_form_HD {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) /-! ### (L2) convergence of the concrete data -/ -/-- λ₁(T) → λ. -/ -theorem tendsto_lam1 {P : Params} (hlam : 0 < P.lam) : - Tendsto (fun T => P.lam1 T) atTop (𝓝 P.lam) := by +/-- `lam1f → λ` from the two-sided bound `λ − λ·c/l ≤ lam1f ≤ λ`; the ζ case is `c = 1`, +the χ case `c = c_q`. -/ +theorem tendsto_lam1_of {P : Params} (lam1f : ℝ → ℝ) (c : ℝ) + (hbound : ∀ᶠ T in atTop, P.lam - P.lam * c / l T ≤ lam1f T ∧ lam1f T ≤ P.lam) : + Tendsto lam1f atTop (𝓝 P.lam) := by have hl := Assembly.tendsto_l_atTop - have hbound : ∀ᶠ T in atTop, P.lam - P.lam / l T ≤ P.lam1 T ∧ P.lam1 T ≤ P.lam := by - filter_upwards [Assembly.eventually_l_pos] with T hlT - exact ⟨by linarith [Assembly.sub_lam1_le P T hlam.le hlT], - Assembly.lam1_le P T hlam.le hlT⟩ - have hlow : Tendsto (fun T => P.lam - P.lam / l T) atTop (𝓝 P.lam) := by - have h0 : Tendsto (fun T => P.lam / l T) atTop (𝓝 0) := + have hlow : Tendsto (fun T => P.lam - P.lam * c / l T) atTop (𝓝 P.lam) := by + have h0 : Tendsto (fun T => P.lam * c / l T) atTop (𝓝 0) := Tendsto.div_atTop tendsto_const_nhds hl have := tendsto_const_nhds (x := P.lam) (f := atTop (α := ℝ)) |>.sub h0 simpa using this exact tendsto_of_tendsto_of_tendsto_of_le_of_le' hlow tendsto_const_nhds (hbound.mono fun T h => h.1) (hbound.mono fun T h => h.2) +/-- λ₁(T) → λ. -/ +theorem tendsto_lam1 {P : Params} (hlam : 0 < P.lam) : + Tendsto (fun T => P.lam1 T) atTop (𝓝 P.lam) := by + refine tendsto_lam1_of (fun T => P.lam1 T) 1 ?_ + filter_upwards [Assembly.eventually_l_pos] with T hlT + refine ⟨?_, Assembly.lam1_le P T hlam.le hlT⟩ + have h := Assembly.sub_lam1_le P T hlam.le hlT + have e : P.lam * 1 / l T = P.lam / l T := by ring + rw [e] + linarith + /-- generic: data within C·w/L of a constant converges to it. -/ theorem tendsto_of_close {P : Params} (hlam : 0 < P.lam) {f : ℝ → ℝ} {c C : ℝ} (hclose : ∀ᶠ T in atTop, |f T - c| ≤ C * P.w / P.L T) : @@ -160,28 +152,31 @@ theorem tendsto_of_close {P : Params} (hlam : 0 < P.lam) {f : ℝ → ℝ} {c C have := hdiff.add_const c simpa using this -/-- the three concrete D-window moment limits, exported standalone. -/ -theorem tendsto_aD {P : Params} (hP : P.Valid) : - Tendsto (fun T => (P.localFunD T).a) atTop (𝓝 (aStar P.lam)) := by - apply tendsto_of_close hP.lam_pos (C := 4) +/-- Common `tendsto_of_close` wrapper for D-window moment limits. -/ +private theorem tendsto_D_close {P : Params} (hP : P.Valid) {f : ℝ → ℝ} {ℓ C : ℝ} + (hclose : ∀ {T : ℝ}, 8 * P.w ≤ P.L T → |f T - ℓ| ≤ C * P.w / P.L T) : + Tendsto f atTop (𝓝 ℓ) := by + apply tendsto_of_close hP.lam_pos (C := C) filter_upwards [(Assembly.tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop (8 * P.w)] with T hT - exact aD_close hP.taper hP.lam_pos hP.lam_le_one hP.one_le_w hT + exact hclose hT + +/-- the three concrete D-window moment limits, exported standalone. -/ +theorem tendsto_aD {P : Params} (hP : P.Valid) : + Tendsto (fun T => (P.localFunD T).a) atTop (𝓝 (aStar P.lam)) := + tendsto_D_close (C := 4) hP + (fun {_} hT => aD_close hP.taper hP.lam_pos hP.lam_le_one hP.one_le_w hT) theorem tendsto_bD {P : Params} (hP : P.Valid) : - Tendsto (fun T => (P.localFunD T).b) atTop (𝓝 (bStar P.lam)) := by - apply tendsto_of_close hP.lam_pos (C := 4) - filter_upwards [(Assembly.tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop (8 * P.w)] - with T hT - exact bD_close hP.taper hP.lam_pos hP.lam_le_one hP.one_le_w hT + Tendsto (fun T => (P.localFunD T).b) atTop (𝓝 (bStar P.lam)) := + tendsto_D_close (C := 4) hP + (fun {_} hT => bD_close hP.taper hP.lam_pos hP.lam_le_one hP.one_le_w hT) theorem tendsto_JD {P : Params} (hP : P.Valid) : Tendsto (fun T => 2 / P.L T ^ 3 * ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y) atTop - (𝓝 (jStar P.lam)) := by - apply tendsto_of_close hP.lam_pos (C := 16) - filter_upwards [(Assembly.tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop (8 * P.w)] - with T hT - exact jD_close hP.taper hP.lam_pos hP.lam_le_one hP.one_le_w hT + (𝓝 (jStar P.lam)) := + tendsto_D_close (C := 16) hP + (fun {_} hT => jD_close hP.taper hP.lam_pos hP.lam_le_one hP.one_le_w hT) /-- generic ratio limit: any λ₁-like sequence tending to λ and any data tending to the starred moments give cRatio → c*_λ. -/ diff --git a/zeta23/Zeta23/XiPrime/QuarticWindow/ModWindow.lean b/zeta23/Zeta23/ThmD/ModWindow.lean similarity index 50% rename from zeta23/Zeta23/XiPrime/QuarticWindow/ModWindow.lean rename to zeta23/Zeta23/ThmD/ModWindow.lean index 401612063d..61e0b35974 100644 --- a/zeta23/Zeta23/XiPrime/QuarticWindow/ModWindow.lean +++ b/zeta23/Zeta23/ThmD/ModWindow.lean @@ -4,29 +4,25 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/XiPrime/QuarticWindow/ModWindow.lean — a MODULATED ramp taper is an admissible window. +Zeta23/ThmD/ModWindow.lean — a MODULATED ramp taper is an admissible window, with generic +moment, sharp-cutoff, autocorrelation, and C¹-autocorrelation estimates. -Generic once-and-for-all version of Zeta23/ThmD/Window.lean + BridgeD.lean's `admWindow_phiD`: for the tree's ramp -taper φ = Taper.phi ϱ L w and a modulating factor f : ℝ → ℝ that is even, nonnegative, ≤ 1 and nonincreasing on -the core [0, L/2], C² on a neighbourhood of [−L/2, L/2], with |f′| ≤ A/L and |f″| ≤ B/L² on [−L/2, L/2], the window +For the tree's ramp taper φ = Taper.phi ϱ L w and a modulating factor f : ℝ → ℝ that is even, +nonnegative, ≤ 1 and nonincreasing on the core [0, L/2], C² on a neighbourhood of [−L/2, L/2], +with |f′| ≤ A/L and |f″| ≤ B/L² on [−L/2, L/2], the window φ_f(u) := f(u) · φ(u) -satisfies Zeta23.AdmWindow (φ_f) L w (cMod ϱ A B), cMod := cRho ϱ + A + A² + B (needs 1 ≤ w, 8w ≤ L). The ξ′ -profile windows P.phiV v T (Zeta23/XiPrime/Defs.lean) are the case f u = √(max 0 (v(u/L))) (Quartic.lean); ThmD's -Montgomery–Taylor window is the case f u = √(cos(√2λu/L)). -Mechanism: evenness/support/monotonicity give ‖φ_f′‖₁ = 2φ_f(0) ≤ 2 and ‖(φ_f²)′‖₁ ≤ 2 (total variation of a -unimodal function); the product rule and the taper's own norms ‖φ′‖₁ = 2, ‖φ″‖₁ = 2‖ϱ″‖₁/w, ‖(φ²)′‖₁ = 2, -‖(φ²)″‖₁ ≤ cRho/w (Zeta23/Taper/Norms.lean) give the second-derivative norms, the factor's derivatives costing only -A/L, B/L² ≤ A/(8w), B/(64w²). +satisfies Zeta23.AdmWindow (φ_f) L w (cMod ϱ A B), cMod := cRho ϱ + A + A² + B (needs 1 ≤ w, 8w ≤ L). +Both ThmD's Montgomery–Taylor window (`f u = √(cos(√2 λ u/L))`, Zeta23/ThmD/Window.lean) and the ξ′ +quartic window (`f u = √(max 0 (vQuartic(u/L)))`, Zeta23/XiPrime/QuarticWindow/Quartic.lean) are +instances. -/ import Zeta23.ThmD.WindowCore -import Zeta23.Taper.Norms noncomputable section open Real Set MeasureTheory Filter Topology namespace Zeta23 -namespace XiPrime /-- hypotheses on a modulating factor (already in the u-variable, i.e. f u = m(u/L)). -/ structure ModFactor (f : ℝ → ℝ) (L A B : ℝ) : Prop where @@ -68,9 +64,6 @@ theorem phiM_le_one (hf : ModFactor f L A B) (hϱ : TaperProfile ϱ) (hw : 0 < w mul_le_mul (hf.le_one u hu.le) (Taper.phi_le_one hϱ u) (Taper.phi_nonneg hϱ u) zero_le_one _ = 1 := mul_one 1 -theorem phiM_zero_le_one (hf : ModFactor f L A B) (hϱ : TaperProfile ϱ) (hw : 0 < w) : - phiM f ϱ L w 0 ≤ 1 := phiM_le_one hf hϱ hw 0 - /-- φ_f is C² (f is C² near the core; beyond the core φ_f vanishes identically). -/ theorem phiM_contDiff (hf : ModFactor f L A B) (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : ContDiff ℝ 2 (phiM f ϱ L w) := by @@ -84,7 +77,7 @@ theorem phiM_contDiff (hf : ModFactor f L A B) (hϱ : TaperProfile ϱ) (hw : 0 < exact hfu.mul ((Taper.phi_contDiff hϱ hw hwL).of_le (by norm_num)).contDiffAt · have hopen : IsOpen {v : ℝ | L / 2 < |v|} := continuous_abs.isOpen_preimage _ isOpen_Ioi have hmem : u ∈ {v : ℝ | L / 2 < |v|} := by - simp only [mem_setOf_eq]; linarith + simp only [Set.mem_ofPred_eq]; linarith refine ContDiffAt.congr_of_eventuallyEq (contDiffAt_const (c := 0)) ?_ filter_upwards [hopen.mem_nhds hmem] with v hv exact phiM_eq_zero hϱ hw hv.le @@ -118,71 +111,11 @@ theorem integral_abs_deriv_le_two {g : ℝ → ℝ} {M : ℝ} (hM : 0 < M) (hg : ContDiff ℝ 1 g) (heven : ∀ x, g (-x) = g x) (hanti : AntitoneOn g (Set.Ici 0)) (h1 : ∀ x, g x ≤ 1) (hsupp : ∀ x, M ≤ |x| → g x = 0) : ∫ u, |deriv g u| ≤ 2 := by - have hd : Differentiable ℝ g := hg.differentiable (by norm_num) - have hd' : Continuous (deriv g) := hg.continuous_deriv le_rfl - have hderiv0 : ∀ x : ℝ, M < |x| → deriv g x = 0 := by - intro x hx - have hopen : IsOpen {v : ℝ | M < |v|} := (continuous_abs).isOpen_preimage _ isOpen_Ioi - have hEq : g =ᶠ[nhds x] (fun _ => (0:ℝ)) := by - filter_upwards [hopen.mem_nhds hx] with v hv - exact hsupp v (le_of_lt hv) - rw [hEq.deriv_eq, deriv_const] - have hodd : ∀ x : ℝ, |deriv g (-x)| = |deriv g x| := by - intro x - have hfe : (fun y : ℝ => g (-y)) = g := funext heven - have h := deriv_comp_neg (f := g) (x := x) - rw [hfe] at h - have h' : deriv g (-x) = -deriv g x := by linarith - rw [h', abs_neg] - have habs : (fun u : ℝ => |deriv g u|) = fun u => (fun t => |deriv g t|) |u| := by - funext u - show |deriv g u| = |deriv g (|u|)| - rcases le_or_gt 0 u with h | h - · rw [abs_of_nonneg h] - · rw [abs_of_neg h, hodd] - have hhalf : ∫ u, |deriv g u| = 2 * ∫ u in Set.Ioi 0, |deriv g u| := by - conv_lhs => rw [habs] - exact integral_comp_abs (f := fun t => |deriv g t|) - have hcs : HasCompactSupport (deriv g) := by - apply HasCompactSupport.of_support_subset_isCompact (isCompact_Icc (a := -M) (b := M)) - intro x hx - rw [Function.mem_support] at hx - by_contra hmem - apply hx - apply hderiv0 - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hmem - rcases hmem with h | h - · rw [abs_of_neg (by linarith)]; linarith - · rw [abs_of_pos (by linarith)]; linarith - have hint : Integrable (fun u => |deriv g u|) := - (hd'.integrable_of_hasCompactSupport hcs).abs - have hsplit : ∫ u in Set.Ioi 0, |deriv g u| - = (∫ u in Set.Ioc 0 M, |deriv g u|) + ∫ u in Set.Ioi M, |deriv g u| := by - rw [← MeasureTheory.setIntegral_union (Set.Ioc_disjoint_Ioi le_rfl) measurableSet_Ioi - hint.integrableOn hint.integrableOn, Set.Ioc_union_Ioi_eq_Ioi hM.le] - have hfar : ∫ u in Set.Ioi M, |deriv g u| = 0 := by - apply MeasureTheory.setIntegral_eq_zero_of_forall_eq_zero - intro x hx - rw [hderiv0 x (by rw [abs_of_pos (lt_trans hM hx)]; exact hx), abs_zero] - have hneg : ∀ x ∈ Set.Ioc 0 M, |deriv g x| = -deriv g x := by - intro x hx - have hx0 : 0 < x := hx.1 - have hle : deriv g x ≤ 0 := by - have hmem : Set.Ici (0:ℝ) ∈ nhds x := Ici_mem_nhds hx0 - rw [← derivWithin_of_mem_nhds hmem] - exact hanti.derivWithin_nonpos - rw [abs_of_nonpos hle] - have hFTC : ∫ u in (0:ℝ)..M, deriv g u = g M - g 0 := - intervalIntegral.integral_deriv_eq_sub (fun x _ => hd x) ((hd'.intervalIntegrable) 0 M) - have hnear : ∫ u in Set.Ioc 0 M, |deriv g u| = g 0 - g M := by - rw [MeasureTheory.setIntegral_congr_fun measurableSet_Ioc hneg] - rw [← intervalIntegral.integral_of_le hM.le] at * - rw [intervalIntegral.integral_neg, hFTC] - ring - have hgM : g M = 0 := hsupp M (by rw [abs_of_pos hM]) - have hg0 : g 0 ≤ 1 := h1 0 - rw [hhalf, hsplit, hfar, hnear, hgM] - linarith + have hnonpos : ∀ u : ℝ, 0 < u → deriv g u ≤ 0 := fun u hu => by + rw [← derivWithin_of_mem_nhds (Ici_mem_nhds hu)] + exact hanti.derivWithin_nonpos + rw [Taper.integral_abs_deriv_eq_two_mul hM hg heven hnonpos hsupp] + linarith [h1 0] /-! ### first-derivative norms -/ @@ -276,7 +209,6 @@ theorem integral_abs_deriv2_mul_le {F G : ℝ → ℝ} {L δ A' B' : ℝ} (hδ : set U : Set ℝ := Ioo (-(L / 2 + δ)) (L / 2 + δ) with hUdef have hU : IsOpen U := isOpen_Ioo set H : ℝ → ℝ := fun u => F u * G u with hHdef - -- pointwise bound have hpt : ∀ u, |deriv (deriv H) u| ≤ B' * |G u| + 2 * A' * |deriv G u| + |deriv (deriv G) u| := by intro u rcases le_or_gt |u| (L / 2) with hu | hu @@ -302,7 +234,6 @@ theorem integral_abs_deriv2_mul_le {F G : ℝ → ℝ} {L δ A' B' : ℝ} (hδ : simp only [hHdef, hGzero v hv, mul_zero] rw [(deriv2_eq_zero_of_eqOn hV hz hu).2, abs_zero] positivity - -- integrability have hH2c : Continuous (deriv (deriv H)) := (hH.deriv' (n := 1)).continuous_deriv le_rfl have hG1c : Continuous (deriv G) := (hG.deriv' (n := 1)).continuous have hG2c : Continuous (deriv (deriv G)) := (hG.deriv' (n := 1)).continuous_deriv le_rfl @@ -386,10 +317,8 @@ theorem integral_abs_deriv2_phiM_le (hf : ModFactor f L A B) (hϱ : TaperProfile Taper.integral_abs_deriv2_phi hϱ hw0 h2wL rw [hI1, hI2] at hmain have hc := Taper.two_mul_l1Deriv2_le_cRho hϱ - have hl1 := l1Deriv2_nonneg' ϱ have hA := hf.A_nonneg; have hB := hf.B_nonneg refine hmain.trans ?_ - -- B/L²·∫|φ| + 2(A/L)·2 + 2‖ϱ″‖₁/w ≤ (cRho + A + A² + B)/w have e1 : B / L ^ 2 * ∫ u, |Taper.phi ϱ L w u| ≤ B / w := by calc B / L ^ 2 * ∫ u, |Taper.phi ϱ L w u| ≤ B / L ^ 2 * L := by gcongr _ = B / L := by field_simp @@ -419,7 +348,6 @@ theorem integral_abs_deriv2_phiM_sq_le (hf : ModFactor f L A B) (hϱ : TaperProf simp only [hUdef, mem_Ioo]; constructor <;> linarith [neg_abs_le u, le_abs_self u] have hsm2 : ContDiffOn ℝ 2 (fun u => f u * f u) U := hsm.mul hsm have hA := hf.A_nonneg; have hB := hf.B_nonneg - -- bounds for F := f·f on the core have hF0 : ∀ u, |u| ≤ L / 2 → |f u * f u| ≤ 1 := fun u hu => by rw [abs_mul]; have := hf.abs_le_one u hu; nlinarith [abs_nonneg (f u)] have hF1 : ∀ u, |u| ≤ L / 2 → |deriv (fun u => f u * f u) u| ≤ 2 * A / L := fun u hu => by @@ -434,7 +362,6 @@ theorem integral_abs_deriv2_phiM_sq_le (hf : ModFactor f L A B) (hϱ : TaperProf fun u hu => by rw [deriv2_mul_eq hU hsm hsm (hcore u hu)] have h0 := hf.abs_le_one u hu; have h1 := hf.deriv_le u hu; have h2 := hf.deriv2_le u hu - have hd0 := abs_nonneg (deriv f u) calc |deriv (deriv f) u * f u + 2 * (deriv f u * deriv f u) + f u * deriv (deriv f) u| ≤ |deriv (deriv f) u * f u| + |2 * (deriv f u * deriv f u)| + |f u * deriv (deriv f) u| := abs_add_three _ _ _ @@ -442,7 +369,6 @@ theorem integral_abs_deriv2_phiM_sq_le (hf : ModFactor f L A B) (hϱ : TaperProf rw [abs_mul, abs_mul, abs_mul, abs_mul, abs_two]; ring _ ≤ 2 * (B / L ^ 2 * 1) + 2 * (A / L * (A / L)) := by gcongr _ = (2 * B + 2 * A ^ 2) / L ^ 2 := by field_simp - -- the squared taper have hφ := Taper.phi_contDiff hϱ hw0 h2wL have hG : ContDiff ℝ 2 (fun u => Taper.phi ϱ L w u ^ 2) := (hφ.pow 2).of_le (by norm_num) have hGcs : HasCompactSupport (fun u => Taper.phi ϱ L w u ^ 2) := @@ -497,7 +423,367 @@ theorem admWindow_phiM (hf : ModFactor f L A B) (hϱ : TaperProfile ϱ) (hw : 1 l1_deriv2 := integral_abs_deriv2_phiM_le hf hϱ hw hwL l1_deriv2_sq := integral_abs_deriv2_phiM_sq_le hf hϱ hw hwL -end XiPrime +/-! ### generic edge estimate, moments, and sharp-cutoff autocorrelation -/ + +/-- The two-ramp indicator majorant on `[−L/2, −L/2+w]` and `[L/2−w, L/2]`. -/ +private def rampMaj (L w : ℝ) (u : ℝ) : ℝ := + (Icc (-(L / 2)) (-(L / 2) + w)).indicator (1 : ℝ → ℝ) u + + (Icc (L / 2 - w) (L / 2)).indicator (1 : ℝ → ℝ) u + +private lemma rampMaj_nonneg (L w u : ℝ) : 0 ≤ rampMaj L w u := + add_nonneg (indicator_nonneg (fun _ _ => zero_le_one) u) + (indicator_nonneg (fun _ _ => zero_le_one) u) + +private lemma rampMaj_integrable (L w : ℝ) : Integrable (rampMaj L w) := + Integrable.add + ((integrable_indicator_iff measurableSet_Icc).mpr + (integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top))) + ((integrable_indicator_iff measurableSet_Icc).mpr + (integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top))) + +private lemma integral_rampMaj {L w : ℝ} (hw : 0 ≤ w) : ∫ u, rampMaj L w u = 2 * w := by + have hi : ∀ a b : ℝ, Integrable ((Icc a b).indicator (1 : ℝ → ℝ)) := fun a b => + (integrable_indicator_iff measurableSet_Icc).mpr + (integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)) + unfold rampMaj + rw [MeasureTheory.integral_add (hi _ _) (hi _ _), + integral_indicator_one measurableSet_Icc, integral_indicator_one measurableSet_Icc, + measureReal_def, measureReal_def, Real.volume_Icc, Real.volume_Icc, + ENNReal.toReal_ofReal (by linarith), ENNReal.toReal_ofReal (by linarith)] + ring + +private lemma one_le_rampMaj {L w u : ℝ} (hin : |u| ≤ L / 2) (hedge : L / 2 - w < |u|) : + 1 ≤ rampMaj L w u := by + unfold rampMaj + have h0l := indicator_nonneg (s := Icc (-(L / 2)) (-(L / 2) + w)) (f := (1 : ℝ → ℝ)) + (fun _ _ => zero_le_one) u + have h0r := indicator_nonneg (s := Icc (L / 2 - w) (L / 2)) (f := (1 : ℝ → ℝ)) + (fun _ _ => zero_le_one) u + rcases le_or_gt u 0 with hneg | hpos + · have hu : u ∈ Icc (-(L / 2)) (-(L / 2) + w) := by + rw [abs_of_nonpos hneg] at hin hedge; exact ⟨by linarith, by linarith⟩ + rw [indicator_of_mem hu, Pi.one_apply]; linarith + · have hu : u ∈ Icc (L / 2 - w) (L / 2) := by + rw [abs_of_pos hpos] at hin hedge; exact ⟨by linarith, by linarith⟩ + rw [indicator_of_mem hu, Pi.one_apply]; linarith + +/-- substitution: ∫_{−L/2..L/2} g(u/L) du = L · ∫_{−1/2..1/2} g. -/ +theorem integral_scale {g : ℝ → ℝ} {L : ℝ} (hL : 0 < L) : + ∫ u in (-(L / 2))..(L / 2), g (u / L) = L * ∫ s in (-(1 : ℝ) / 2)..(1 / 2), g s := by + rw [intervalIntegral.integral_comp_div (f := g) hL.ne', smul_eq_mul, + show -(L / 2) / L = -(1 : ℝ) / 2 by field_simp, + show L / 2 / L = (1 : ℝ) / 2 by field_simp] + +/-- shared edge estimate: for `|h| ≤ 1` continuous on `[−L/2, L/2]` and a continuous plateau +`0 ≤ p ≤ 1` with `p = 1` on `[−L/2+w, L/2−w]` and `p = 0` off `[−L/2, L/2]`, +`|∫ h·p − ∫_{[−L/2,L/2]} h| ≤ 2w`. -/ +theorem edge_estimate {h p : ℝ → ℝ} {L w : ℝ} (_hL : 0 < L) (hw0 : 0 < w) + (_hwL : 2 * w ≤ L) (hh : ∀ u ∈ Icc (-(L / 2)) (L / 2), |h u| ≤ 1) + (hp0 : ∀ u, 0 ≤ p u) (hp1 : ∀ u, p u ≤ 1) + (hpl : ∀ u : ℝ, |u| ≤ L / 2 - w → p u = 1) (hsupp : ∀ u : ℝ, L / 2 ≤ |u| → p u = 0) + (hpc : Continuous p) (hhc : ContinuousOn h (Icc (-(L / 2)) (L / 2))) : + |(∫ u, h u * p u) - ∫ u in Icc (-(L / 2)) (L / 2), h u| ≤ 2 * w := by + have hrestr : ∫ u, h u * p u = ∫ u in Icc (-(L / 2)) (L / 2), h u * p u := by + rw [setIntegral_eq_integral_of_forall_compl_eq_zero] + intro x hx + rw [mem_Icc, not_and_or, not_le, not_le] at hx + have : L / 2 ≤ |x| := by + rcases hx with hc | hc + · linarith [neg_le_abs x] + · linarith [le_abs_self x] + rw [hsupp x this, mul_zero] + have hIhp : IntegrableOn (fun u => h u * p u) (Icc (-(L / 2)) (L / 2)) := + (hhc.mul hpc.continuousOn).integrableOn_compact isCompact_Icc + have hIh : IntegrableOn h (Icc (-(L / 2)) (L / 2)) := hhc.integrableOn_compact isCompact_Icc + rw [hrestr, ← MeasureTheory.integral_sub hIhp hIh] + have hptw : ∀ u ∈ Icc (-(L / 2)) (L / 2), |h u * p u - h u| ≤ rampMaj L w u := by + intro u hu + rcases le_or_gt |u| (L / 2 - w) with hpl' | hedge + · rw [hpl u hpl', mul_one, sub_self, abs_zero]; exact rampMaj_nonneg L w u + · have hbound : |h u * p u - h u| ≤ 1 := by + rw [show h u * p u - h u = h u * (p u - 1) by ring, abs_mul] + calc |h u| * |p u - 1| ≤ 1 * 1 := + mul_le_mul (hh u hu) (abs_le.mpr ⟨by linarith [hp0 u], by linarith [hp1 u]⟩) + (abs_nonneg _) zero_le_one + _ = 1 := mul_one 1 + exact hbound.trans (one_le_rampMaj (abs_le.mpr ⟨hu.1, hu.2⟩) hedge) + calc |∫ u in Icc (-(L / 2)) (L / 2), (h u * p u - h u)| + ≤ ∫ u in Icc (-(L / 2)) (L / 2), |h u * p u - h u| := abs_integral_le_integral_abs + _ ≤ ∫ u in Icc (-(L / 2)) (L / 2), rampMaj L w u := + setIntegral_mono_on (((hhc.mul hpc.continuousOn).sub hhc).abs.integrableOn_compact isCompact_Icc) + (rampMaj_integrable L w).integrableOn measurableSet_Icc hptw + _ ≤ ∫ u, rampMaj L w u := + setIntegral_le_integral (rampMaj_integrable L w) (ae_of_all _ (rampMaj_nonneg L w)) + _ = 2 * w := integral_rampMaj hw0.le + +/-- **Generic moment comparison for a modulated ramp taper:** +`|L⁻¹ ∫ φ_f^{2k} − ∫_{-1/2}^{1/2} v(s)^k ds| ≤ 2w/L` whenever `f(u)² = v(u/L)` on `[−L/2, L/2]`, +with `|v| ≤ 1` continuous on `[−1/2, 1/2]`. -/ +theorem mod_moment_close {f v : ℝ → ℝ} {ϱ : ℝ → ℝ} {L w : ℝ} {k : ℕ} + (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) (hk : 0 < k) + (hf2 : ∀ u ∈ Icc (-(L / 2)) (L / 2), f u ^ 2 = v (u / L)) + (hv_cont : ContinuousOn v (Icc (-(1 / 2 : ℝ)) (1 / 2))) + (hv_abs : ∀ s ∈ Icc (-(1 / 2 : ℝ)) (1 / 2), |v s| ≤ 1) : + |L⁻¹ * (∫ u, phiM f ϱ L w u ^ (2 * k)) - ∫ s in (-(1 : ℝ) / 2)..(1 / 2), v s ^ k| + ≤ 2 * w / L := by + have hL : 0 < L := by linarith + have hmap : ∀ u ∈ Icc (-(L / 2)) (L / 2), u / L ∈ Icc (-(1 / 2 : ℝ)) (1 / 2) := fun u hu => by + constructor + · rw [le_div_iff₀ hL]; linarith [hu.1] + · rw [div_le_iff₀ hL]; linarith [hu.2] + have hsub : ∫ s in (-(1 : ℝ) / 2)..(1 / 2), v s ^ k + = L⁻¹ * ∫ u in Icc (-(L / 2)) (L / 2), v (u / L) ^ k := by + rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by linarith : -(L / 2) ≤ L / 2), + integral_scale (g := fun s => v s ^ k) hL] + field_simp + have hwin : ∫ u, phiM f ϱ L w u ^ (2 * k) + = ∫ u, v (u / L) ^ k * Taper.phi ϱ L w u ^ (2 * k) := by + refine integral_congr_ae (ae_of_all _ fun u => ?_) + by_cases hu : u ∈ Icc (-(L / 2)) (L / 2) + · simp only [phiM, mul_pow, pow_mul, hf2 u hu] + · rw [mem_Icc, not_and_or, not_le, not_le] at hu + have habs : L / 2 ≤ |u| := by + rcases hu with h | h + · linarith [neg_le_abs u] + · linarith [le_abs_self u] + have hz := Taper.phi_eq_zero hϱ hw habs + simp only [phiM, hz, mul_zero, zero_pow (by omega : 2 * k ≠ 0)] + rw [hwin, hsub] + have hcore := edge_estimate (h := fun u => v (u / L) ^ k) (p := fun u => Taper.phi ϱ L w u ^ (2 * k)) + hL hw hwL + (fun u hu => by + rw [abs_pow] + exact (pow_le_pow_left₀ (abs_nonneg _) (hv_abs _ (hmap u hu)) k).trans_eq (one_pow k)) + (fun u => pow_nonneg (Taper.phi_nonneg hϱ u) _) + (fun u => (pow_le_pow_left₀ (Taper.phi_nonneg hϱ u) (Taper.phi_le_one hϱ u) _).trans_eq (one_pow _)) + (fun u hu => by simp only [Taper.phi_eq_one hϱ hw hu, one_pow]) + (fun u hu => by simp only [Taper.phi_eq_zero hϱ hw hu, zero_pow (by omega : 2 * k ≠ 0)]) + ((Taper.phi_continuous hϱ hw hwL).pow (2 * k)) + ((hv_cont.comp (continuousOn_id.div_const L) hmap).pow k) + rw [show L⁻¹ * (∫ u, v (u / L) ^ k * Taper.phi ϱ L w u ^ (2 * k)) + - L⁻¹ * ∫ u in Icc (-(L / 2)) (L / 2), v (u / L) ^ k + = L⁻¹ * ((∫ u, v (u / L) ^ k * Taper.phi ϱ L w u ^ (2 * k)) + - ∫ u in Icc (-(L / 2)) (L / 2), v (u / L) ^ k) by ring, + abs_mul, abs_of_pos (inv_pos.mpr hL)] + calc L⁻¹ * |(∫ u, v (u / L) ^ k * Taper.phi ϱ L w u ^ (2 * k)) + - ∫ u in Icc (-(L / 2)) (L / 2), v (u / L) ^ k| + ≤ L⁻¹ * (2 * w) := mul_le_mul_of_nonneg_left hcore (inv_nonneg.mpr hL.le) + _ = 2 * w / L := by rw [div_eq_inv_mul] + +/-- the sharp cutoff `1_{[−L/2,L/2]} · m`. -/ +def sharpMod (m : ℝ → ℝ) (L : ℝ) (u : ℝ) : ℝ := + (Icc (-(L / 2)) (L / 2)).indicator m u + +/-- Autocorrelation of a sharp indicator `1_{[−L/2,L/2]}·v(·/L)`: the full-line integral +equals the overlap integral. -/ +theorem integral_sharp_autocorr {v : ℝ → ℝ} {L y : ℝ} (hy0 : 0 ≤ y) (hyL : y ≤ L) : + ∫ u, sharpMod (fun u => v (u / L)) L u * sharpMod (fun u => v (u / L)) L (u + y) + = ∫ u in (-(L / 2))..(L / 2 - y), v (u / L) * v ((u + y) / L) := by + have hind : ∀ u : ℝ, + sharpMod (fun u => v (u / L)) L u * sharpMod (fun u => v (u / L)) L (u + y) + = (Icc (-(L / 2)) (L / 2 - y)).indicator (fun u => v (u / L) * v ((u + y) / L)) u := by + intro u + unfold sharpMod + by_cases hu : u ∈ Icc (-(L / 2)) (L / 2 - y) + · have hu1 : u ∈ Icc (-(L / 2)) (L / 2) := ⟨hu.1, by linarith [hu.2]⟩ + have hu2 : u + y ∈ Icc (-(L / 2)) (L / 2) := ⟨by linarith [hu.1], by linarith [hu.2]⟩ + rw [indicator_of_mem hu, indicator_of_mem hu1, indicator_of_mem hu2] + · rw [indicator_of_notMem hu] + rw [mem_Icc, not_and_or, not_le, not_le] at hu + rcases hu with hu | hu + · rw [indicator_of_notMem (s := Icc (-(L / 2)) (L / 2)) (a := u) + (by rw [mem_Icc]; push Not; intro h; linarith), zero_mul] + · rw [indicator_of_notMem (s := Icc (-(L / 2)) (L / 2)) (a := u + y) + (by rw [mem_Icc]; push Not; intro h; linarith), mul_zero] + rw [integral_congr_ae (ae_of_all _ hind), integral_indicator measurableSet_Icc, + integral_Icc_eq_integral_Ioc, + ← intervalIntegral.integral_of_le (by linarith : -(L / 2) ≤ L / 2 - y)] + +/-- **L¹ comparison of `φ_f²` with `sharpMod (v(·/L)) L`:** `∫ |φ_f² − sharpMod| ≤ 2w`. -/ +theorem integral_abs_phiMsq_sub_sharpMod {f v : ℝ → ℝ} {ϱ : ℝ → ℝ} {L w A B : ℝ} + (hf : ModFactor f L A B) (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) + (hf2 : ∀ u ∈ Icc (-(L / 2)) (L / 2), f u ^ 2 = v (u / L)) + (hv0 : ∀ s ∈ Icc (-(1 / 2 : ℝ)) (1 / 2), 0 ≤ v s) + (hv1 : ∀ s ∈ Icc (-(1 / 2 : ℝ)) (1 / 2), v s ≤ 1) : + ∫ u, |phiM f ϱ L w u ^ 2 - sharpMod (fun u => v (u / L)) L u| ≤ 2 * w := by + have hL : 0 < L := by linarith + have hmap : ∀ u ∈ Icc (-(L / 2)) (L / 2), u / L ∈ Icc (-(1 / 2 : ℝ)) (1 / 2) := fun u hu => by + constructor + · rw [le_div_iff₀ hL]; linarith [hu.1] + · rw [div_le_iff₀ hL]; linarith [hu.2] + have hpt : ∀ u : ℝ, |phiM f ϱ L w u ^ 2 - sharpMod (fun u => v (u / L)) L u| ≤ rampMaj L w u := by + intro u + rcases le_or_gt |u| (L / 2 - w) with hpl | hedge + · have huIcc : u ∈ Icc (-(L / 2)) (L / 2) := by + rw [abs_le] at hpl; exact ⟨by linarith [hpl.1], by linarith [hpl.2]⟩ + simp only [phiM, sharpMod, Taper.phi_eq_one hϱ hw hpl, mul_one, + hf2 u huIcc, indicator_of_mem huIcc, sub_self, abs_zero] + exact rampMaj_nonneg L w u + · rcases le_or_gt |u| (L / 2) with hin | hout + · have huIcc : u ∈ Icc (-(L / 2)) (L / 2) := abs_le.mp hin + have h2' : phiM f ϱ L w u ^ 2 ≤ 1 := + (pow_le_pow_left₀ (phiM_nonneg hf hϱ u) (phiM_le_one hf hϱ hw u) 2).trans_eq (one_pow 2) + have hs0 : 0 ≤ sharpMod (fun u => v (u / L)) L u := by + unfold sharpMod; rw [indicator_of_mem huIcc]; exact hv0 _ (hmap u huIcc) + have hs1 : sharpMod (fun u => v (u / L)) L u ≤ 1 := by + unfold sharpMod; rw [indicator_of_mem huIcc]; exact hv1 _ (hmap u huIcc) + have hbound : |phiM f ϱ L w u ^ 2 - sharpMod (fun u => v (u / L)) L u| ≤ 1 := + abs_le.mpr ⟨by linarith [sq_nonneg (phiM f ϱ L w u)], by linarith⟩ + exact hbound.trans (one_le_rampMaj hin hedge) + · have hnot : u ∉ Icc (-(L / 2)) (L / 2) := fun hm => by linarith [abs_le.mpr ⟨hm.1, hm.2⟩] + simp only [phiM_eq_zero hϱ hw hout.le, zero_pow two_ne_zero, sharpMod, + indicator_of_notMem hnot, sub_self, abs_zero] + exact rampMaj_nonneg L w u + calc ∫ u, |phiM f ϱ L w u ^ 2 - sharpMod (fun u => v (u / L)) L u| + ≤ ∫ u, rampMaj L w u := + integral_mono_of_nonneg (ae_of_all _ fun _ => abs_nonneg _) (rampMaj_integrable L w) + (ae_of_all _ hpt) + _ = 2 * w := integral_rampMaj hw.le + +/-- **Autocorrelation stability**: if `h` and `k` are bounded by `1`, `∫ |h − k| ≤ 2w`, +and `∫ k(u)k(u+y) = c`, then `|autocorr h y − c| ≤ 4w`. -/ +theorem autocorr_close {h k : ℝ → ℝ} {c w y : ℝ} + (hh1 : ∀ u, |h u| ≤ 1) (hk_meas : Measurable k) (hk1 : ∀ u, |k u| ≤ 1) + (hint_h : Integrable h) (hint_k : Integrable k) + (hCk : ∫ u, k u * k (u + y) = c) + (hd2w : ∫ u, |h u - k u| ≤ 2 * w) : + |Params.autocorr h y - c| ≤ 4 * w := by + have hint_d : Integrable (fun u => h u - k u) := hint_h.sub hint_k + have hint_hy : Integrable (fun u => h (u + y)) := hint_h.comp_add_right y + have hint_ky : Integrable (fun u => k (u + y)) := hint_k.comp_add_right y + have hint_dy : Integrable (fun u => h (u + y) - k (u + y)) := hint_hy.sub hint_ky + have hmeas_hy := hint_hy.aestronglyMeasurable + have hint_p1 : Integrable (fun u => (h u - k u) * h (u + y)) := + (hint_d.bdd_mul (c := 1) hmeas_hy (ae_of_all _ fun u => by rw [Real.norm_eq_abs]; exact hh1 (u + y))).congr + (ae_of_all _ fun u => by ring) + have hint_p2 : Integrable (fun u => k u * (h (u + y) - k (u + y))) := + hint_dy.bdd_mul (c := 1) hk_meas.aestronglyMeasurable (ae_of_all _ fun u => by rw [Real.norm_eq_abs]; exact hk1 u) + have hint_hh : Integrable (fun u => h u * h (u + y)) := + (hint_h.bdd_mul (c := 1) hmeas_hy (ae_of_all _ fun u => by rw [Real.norm_eq_abs]; exact hh1 (u + y))).congr + (ae_of_all _ fun u => by ring) + have hint_kk : Integrable (fun u => k u * k (u + y)) := + hint_ky.bdd_mul (c := 1) hk_meas.aestronglyMeasurable (ae_of_all _ fun u => by rw [Real.norm_eq_abs]; exact hk1 u) + have hdecomp : Params.autocorr h y - c + = (∫ u, (h u - k u) * h (u + y)) + ∫ u, k u * (h (u + y) - k (u + y)) := by + have e1 : Params.autocorr h y - c = ∫ u, (h u * h (u + y) - k u * k (u + y)) := by + rw [show Params.autocorr h y = ∫ u, h u * h (u + y) from rfl, ← hCk, integral_sub hint_hh hint_kk] + rw [e1, ← integral_add hint_p1 hint_p2] + exact integral_congr_ae (ae_of_all _ fun u => by ring) + have hb1 : |∫ u, (h u - k u) * h (u + y)| ≤ 2 * w := + calc |∫ u, (h u - k u) * h (u + y)| ≤ ∫ u, |(h u - k u) * h (u + y)| := abs_integral_le_integral_abs + _ ≤ ∫ u, |h u - k u| := integral_mono_of_nonneg (ae_of_all _ fun _ => abs_nonneg _) hint_d.abs + (ae_of_all _ fun u => by + dsimp only; rw [abs_mul]; exact (mul_le_mul_of_nonneg_left (hh1 (u + y)) (abs_nonneg _)).trans_eq (mul_one _)) + _ ≤ 2 * w := hd2w + have hb2 : |∫ u, k u * (h (u + y) - k (u + y))| ≤ 2 * w := + calc |∫ u, k u * (h (u + y) - k (u + y))| + ≤ ∫ u, |k u * (h (u + y) - k (u + y))| := abs_integral_le_integral_abs + _ ≤ ∫ u, |h (u + y) - k (u + y)| := integral_mono_of_nonneg (ae_of_all _ fun _ => abs_nonneg _) hint_dy.abs + (ae_of_all _ fun u => by + dsimp only; rw [abs_mul]; exact (mul_le_mul_of_nonneg_right (hk1 u) (abs_nonneg _)).trans_eq (one_mul _)) + _ = ∫ u, |h u - k u| := integral_add_right_eq_self (fun u => |h u - k u|) y + _ ≤ 2 * w := hd2w + rw [hdecomp] + exact (abs_add_le _ _).trans (by linarith) + +/-- **Generic autocorrelation comparison for a modulated ramp taper:** +`|autocorr(φ_f², y) − c| ≤ 4w` for `y ∈ [0, L]`, where `c` is the sharp overlap integral. -/ +theorem autocorr_phiMsq_close {f v : ℝ → ℝ} {ϱ : ℝ → ℝ} {L w A B y c : ℝ} + (hf : ModFactor f L A B) (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) + (hf2 : ∀ u ∈ Icc (-(L / 2)) (L / 2), f u ^ 2 = v (u / L)) + (hv_cont : Continuous v) + (hv0 : ∀ s ∈ Icc (-(1 / 2 : ℝ)) (1 / 2), 0 ≤ v s) + (hv1 : ∀ s ∈ Icc (-(1 / 2 : ℝ)) (1 / 2), v s ≤ 1) + (hy0 : 0 ≤ y) (hyL : y ≤ L) + (hC : ∫ u in (-(L / 2))..(L / 2 - y), v (u / L) * v ((u + y) / L) = c) : + |Params.autocorr (fun u => phiM f ϱ L w u ^ 2) y - c| ≤ 4 * w := by + have hL : 0 < L := by linarith + have hmap : ∀ u ∈ Icc (-(L / 2)) (L / 2), u / L ∈ Icc (-(1 / 2 : ℝ)) (1 / 2) := fun u hu => by + constructor + · rw [le_div_iff₀ hL]; linarith [hu.1] + · rw [div_le_iff₀ hL]; linarith [hu.2] + have hh1 : ∀ u, |phiM f ϱ L w u ^ 2| ≤ 1 := fun u => by + rw [abs_of_nonneg (sq_nonneg _)] + exact (pow_le_pow_left₀ (phiM_nonneg hf hϱ u) (phiM_le_one hf hϱ hw u) 2).trans_eq (one_pow 2) + have hk_meas : Measurable (sharpMod (fun u => v (u / L)) L) := + Measurable.indicator (hv_cont.comp (continuous_id.div_const L)).measurable measurableSet_Icc + have hk1 : ∀ u, |sharpMod (fun u => v (u / L)) L u| ≤ 1 := fun u => by + unfold sharpMod + by_cases hm : u ∈ Icc (-(L / 2)) (L / 2) + · rw [indicator_of_mem hm, abs_of_nonneg (hv0 _ (hmap u hm))]; exact hv1 _ (hmap u hm) + · rw [indicator_of_notMem hm, abs_zero]; exact zero_le_one + have hint_h : Integrable (fun u => phiM f ϱ L w u ^ 2) := + ((phiM_contDiff hf hϱ hw hwL).pow 2).continuous.integrable_of_hasCompactSupport + ((phiM_hasCompactSupport hϱ hw).comp_left (g := fun t => t ^ 2) (by norm_num)) + have hint_k : Integrable (sharpMod (fun u => v (u / L)) L) := + (integrable_indicator_iff measurableSet_Icc).mpr + (((hv_cont.comp (continuous_id.div_const L)).continuousOn).integrableOn_compact isCompact_Icc) + have hCk : ∫ u, sharpMod (fun u => v (u / L)) L u * sharpMod (fun u => v (u / L)) L (u + y) = c := + (integral_sharp_autocorr hy0 hyL).trans hC + exact autocorr_close hh1 hk_meas hk1 hint_h hint_k hCk + (integral_abs_phiMsq_sub_sharpMod hf hϱ hw hwL hf2 hv0 hv1) + +/-! ### C¹ facts for autocorrelations -/ + +section AutocorrC1 +open scoped Convolution + +private theorem autocorr_eq_conv {h : ℝ → ℝ} (heven : ∀ x : ℝ, h (-x) = h x) : + Params.autocorr h = h ⋆[ContinuousLinearMap.mul ℝ ℝ] h := by + funext y + show ∫ u, h u * h (u + y) = ∫ t, h t * h (y - t) + have e1 : ∫ u, h u * h (u + y) = ∫ t, h (t - y) * h t := by + rw [← integral_add_right_eq_self (μ := volume) (fun t => h (t - y) * h t) y] + exact integral_congr_ae (ae_of_all _ fun u => by simp only [add_sub_cancel_right]) + rw [e1] + refine integral_congr_ae (ae_of_all _ fun t => ?_) + dsimp only; rw [show t - y = -(y - t) by ring, heven, mul_comm] + +theorem autocorr_deriv_facts {h : ℝ → ℝ} (hC : ContDiff ℝ 1 h) (hcs : HasCompactSupport h) + (heven : ∀ x : ℝ, h (-x) = h x) (hb : ∀ u : ℝ, |h u| ≤ 1) + (hI : ∫ u, |deriv h u| ≤ 2) : + Differentiable ℝ (Params.autocorr h) ∧ Continuous (deriv (Params.autocorr h)) + ∧ ∀ y : ℝ, |deriv (Params.autocorr h) y| ≤ 2 := by + have hloc : LocallyIntegrable h volume := + (hC.continuous.integrable_of_hasCompactSupport hcs).locallyIntegrable + have hD : ∀ y : ℝ, HasDerivAt (Params.autocorr h) + ((h ⋆[ContinuousLinearMap.mul ℝ ℝ] deriv h) y) y := fun y => by + rw [autocorr_eq_conv heven] + exact HasCompactSupport.hasDerivAt_convolution_right _ hloc hcs hC y + have hderiv_eq : deriv (Params.autocorr h) = h ⋆[ContinuousLinearMap.mul ℝ ℝ] deriv h := + funext fun y => (hD y).deriv + have hcs' : HasCompactSupport (deriv h) := hcs.deriv + have hcont' : Continuous (deriv h) := hC.continuous_deriv le_rfl + refine ⟨fun y => (hD y).differentiableAt, hderiv_eq ▸ hcs'.continuous_convolution_right _ hloc hcont', ?_⟩ + intro y + rw [hderiv_eq] + show |∫ t, h t * deriv h (y - t)| ≤ 2 + have hint' : Integrable (fun t => deriv h (y - t)) := + (hcont'.integrable_of_hasCompactSupport hcs').comp_sub_left y + calc |∫ t, h t * deriv h (y - t)| ≤ ∫ t, |h t * deriv h (y - t)| := abs_integral_le_integral_abs + _ ≤ ∫ t, |deriv h (y - t)| := integral_mono_of_nonneg (ae_of_all _ fun _ => abs_nonneg _) hint'.abs + (ae_of_all _ fun t => by + dsimp only; rw [abs_mul]; exact (mul_le_mul_of_nonneg_right (hb t) (abs_nonneg _)).trans_eq (one_mul _)) + _ = ∫ t, |deriv h t| := integral_sub_left_eq_self (fun t => |deriv h t|) (μ := volume) y + _ ≤ 2 := hI + +/-- C¹ facts for `autocorr (φ_f²)`. -/ +theorem phiM_sq_deriv_facts (hf : ModFactor f L A B) (hϱ : TaperProfile ϱ) + (hw : 0 < w) (hwL : 2 * w ≤ L) : + Differentiable ℝ (Params.autocorr (fun u => phiM f ϱ L w u ^ 2)) + ∧ Continuous (deriv (Params.autocorr (fun u => phiM f ϱ L w u ^ 2))) + ∧ ∀ y : ℝ, |deriv (Params.autocorr (fun u => phiM f ϱ L w u ^ 2)) y| ≤ 2 := + autocorr_deriv_facts + (((phiM_contDiff hf hϱ hw hwL).pow 2).of_le (by norm_num)) + ((phiM_hasCompactSupport hϱ hw).comp_left (g := fun t => t ^ 2) (by norm_num)) + (fun x => by rw [phiM_even hf]) + (fun u => by + rw [abs_of_nonneg (sq_nonneg _)] + exact (pow_le_pow_left₀ (phiM_nonneg hf hϱ u) (phiM_le_one hf hϱ hw u) 2).trans_eq (one_pow 2)) + (integral_abs_deriv_phiM_sq_le hf hϱ hw hwL) + +end AutocorrC1 + end Zeta23 end diff --git a/zeta23/Zeta23/ThmD/Mult.lean b/zeta23/Zeta23/ThmD/Mult.lean index a36b073fd6..564118b377 100644 --- a/zeta23/Zeta23/ThmD/Mult.lean +++ b/zeta23/Zeta23/ThmD/Mult.lean @@ -14,7 +14,6 @@ For Mathlib's riemannZeta, NO hypotheses. The multiplicity-aware zero side and ZeroSide/Mult.lean and Assembly/SeamMult.lean; the underlying bookkeeping is Σ_ρ (c·m_ρ − m_ρ²). -/ import Zeta23.ThmD.Final -import Zeta23.Assembly.SeamMult import Zeta23.FinalMult noncomputable section @@ -26,352 +25,71 @@ namespace ThmD open Assembly -/-- the c = 3 fixed-T algebra with an abstract second-moment constant: -from 6trĜ − ‖Ĝ‖² − 3N − 5NII − B(6+2√‖Ĝ‖²+B) ≤ 2N_d, |trĜ − N| ≤ R₁, ‖Ĝ‖² ≤ cinv·N + R₂: -(3 − cinv)N − [6R₁ + R₂ + 5NII + B(6 + 2√(cinv N + R₂) + B)] ≤ 2N_d. -/ -theorem Nd_lower_c3 - {Nd N NII trGh frGh B cinv R₁ R₂ : ℝ} (hB : 0 ≤ B) - (h0 : 6 * trGh - frGh - 3 * N - 5 * NII - B * (6 + 2 * Real.sqrt frGh + B) ≤ 2 * Nd) - (htr : |trGh - N| ≤ R₁) (hfr : frGh ≤ cinv * N + R₂) : - (3 - cinv) * N - (6 * R₁ + R₂ + 5 * NII - + B * (6 + 2 * Real.sqrt (cinv * N + R₂) + B)) ≤ 2 * Nd := by - have h1 : N - R₁ ≤ trGh := by - have := (abs_le.mp htr).1 - linarith - have h2 : Real.sqrt frGh ≤ Real.sqrt (cinv * N + R₂) := Real.sqrt_le_sqrt hfr - nlinarith [h0, h1, h2, hB, mul_le_mul_of_nonneg_left h2 hB] - section Abstract -/-- **multiplicity-aware Theorem D, c = 2 (simple ∧ on-line), abstract**: the thmD_abstract -statement with conclusion N₀ˢ. -/ -theorem thmD_mult2_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsD P aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (P.lam1 T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) +/-- Shared Seam-A transfer on `P.atD T`, reused by zeta (`ThmD`) and Dirichlet (`ThmDE`). -/ +theorem eventually_atD_of_seamA (Z : ZeroConfig) (P : Params) (hP : P.Valid) + {aT trG trG2 θ₀ : ℝ → ℝ} (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = (P.atD T).Gp T) - (hId : ∀ᶠ T in atTop, (P.atD T).trGtilde T = trG T ∧ (P.atD T).trGtildeSq T = trG2 T ∧ - (P.atD T).a T = aT T) - (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - c⁻¹ - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, hfr2⟩ := hTr.frhat - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - -- the functions of T (abbreviations) - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cinv : ℝ → ℝ := fun T => (cRatio (P.lam1 T) (aT T) (bT T) (JT T))⁻¹ with hcinv - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T with hR₁ - set R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) with hR₂ - set B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) with hBdef - set err : ℝ → ℝ := fun T => (4 * R₁ T + R₂ T + 3 * (NII Z T : ℝ) - + B T * (4 + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) + |cinv T - c⁻¹| * N T with herr - -- basic limits - have hLtop := tendsto_L_atTop P hlam0 - have hcinv_to : Tendsto cinv atTop (𝓝 c⁻¹) := hc.inv₀ hc0.ne' - ------------------------------------------------------------------ - -- (1) the main inequality, eventually in T - ------------------------------------------------------------------ - have hmain : ∀ᶠ T in atTop, (2 - c⁻¹) * N T - err T ≤ (Z.N0s T (2 * T) : ℝ) := by - filter_upwards [hBlock, hTail, hGzGp, hId, ha, eventually_ge_atTop T₁, - eventually_ge_atTop T₂, eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w), eventually_w8 hP] - with T hBl hTl hGG hid ha2 hT₁ hT₂ hT0 hl hE0 h8 - obtain ⟨hidtr, hidfr, hida⟩ := hid - have hapos' : 0 < aT T := by linarith [ha2.1] - have haposD : 0 < (P.atD T).a T := by rw [hida]; exact hapos' - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - -- Seam A for the window-realizing parameters - have hA := seamA_mult2 hT0 (fun z => GzGp.phiHat_conj _ T z) (fun r => GzGp.phiHat_ofReal _ T r) - (poissonSqD hP h8) hTl haposD hLpos - -- the hat-unit traces in terms of the abstract data - have hrt : rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T := by - rw [rtrace_hat, hGG, rtrace_tilde_Gp, hidtr, hida]; rfl - have hfr : frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) - = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T := by - rw [frobSq_hat, hGG, frobSq_tilde_Gp, hidfr, hida]; rfl - have haL : (P.atD T).a T * (P.atD T).L T = aT T * P.L T := by rw [hida]; rfl - rw [hrt, hfr, haL] at hA - -- |tr Ĝ − N| ≤ R₁ - have htr : |(aT T * P.L T)⁻¹ * trG T - N T| ≤ R₁ T := - trGhat_sub_N_le hapos' hLpos (by simpa only using htr1 T hT₁) - -- ‖Ĝ‖² ≤ cinv N + R₂ - have hfrb : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T ≤ cinv T * N T + R₂ T := by - have h := hfr2 T hT₂ - simp only at h - have h1 : trG2 T / (aT T * P.L T) ^ 2 - cinv T * N T ≤ C₂ * P.calE T * (cinv T * N T) := by - rw [← mul_assoc] at h - exact le_trans (le_trans (le_max_left _ 0) (le_abs_self _)) h - have e : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T = trG2 T / (aT T * P.L T) ^ 2 := by - rw [inv_pow, div_eq_inv_mul] - rw [e]; simp only [hR₂]; linarith - have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le - have h := N0star_lower_c hB₀ hA htr hfrb - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hcd : (2 - c⁻¹) * N T - |cinv T - c⁻¹| * N T ≤ (2 - cinv T) * N T := by - have h1 := mul_le_mul_of_nonneg_right (le_abs_self (cinv T - c⁻¹)) hN0 - linarith [h1] - simp only [herr, hR₁, hR₂, hBdef, hNdef] at h hcd ⊢ - linarith - ------------------------------------------------------------------ - -- (2) err = o(N) - ------------------------------------------------------------------ - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop Z H.RvM - -- R₁ = o(N) - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / aT T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [ha] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith [ha2.1]))] - rw [div_le_iff₀ (by linarith [ha2.1])]; nlinarith [ha2.1] - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl Z H.RvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - -- cinv is eventually in [0, 2/c] and bounded - have hcinv_bd : ∀ᶠ T in atTop, 0 ≤ cinv T ∧ cinv T ≤ 2 * c⁻¹ := by - have hcpos : (0:ℝ) < c⁻¹ := inv_pos.mpr hc0 - filter_upwards [hcinv_to.eventually (eventually_ge_nhds hcpos), - hcinv_to.eventually (eventually_le_nhds (show c⁻¹ < 2 * c⁻¹ by linarith))] with T h1 h2 - exact ⟨h1, h2⟩ - have hcinvO : cinv =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * c⁻¹) ?_ - filter_upwards [hcinv_bd] with T h - rw [abs_of_nonneg h.1]; exact h.2 - -- R₂ = o(N) - have o2 : R₂ =o[atTop] N := by - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have i1 : (fun T => cinv T * N T) =O[atTop] N := by - have := hcinvO.mul (isBigO_refl N atTop) - simpa using this - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO i1 - refine (this.congr_left fun T => ?_).congr_right fun T => by simp - simp only [hR₂] - -- N(I′∖I) = o(N) - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z H.RvM isLittleO_sqrt_mul_l_Tl) - -- B → 0 - have o4 : Tendsto B atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ - · filter_upwards [hTail, ha, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by nlinarith [ha2.1]) - · filter_upwards [hTail, ha, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < aT T := by linarith [ha2.1] - have hq : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - simp only [hBdef] - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (aT T * P.L T) := by - have : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [this]; gcongr; exact ha2.1 - -- the bracket and the constant-drift term - have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) - (cl := cinv) hNtop o1 o2 o3 o4 hcinv_bd - have o6 : (fun T => |cinv T - c⁻¹| * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => cinv T - c⁻¹) atTop (𝓝 0) := by - simpa using hcinv_to.sub_const c⁻¹ - simpa using this.abs - have herr_o : err =o[atTop] N := o5.add o6 - ------------------------------------------------------------------ - -- (3) conclude - ------------------------------------------------------------------ - exact eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o - -/-- **multiplicity-aware Theorem D, c = 3 (distinct), abstract**: (3/2 − 1/(2c) − ε)N ≤ N_d. -/ -theorem thmD_mult3_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsD P aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (P.lam1 T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) + (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) + (hrt : ∀ᶠ T in atTop, rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T) + (hfr : ∀ᶠ T in atTop, frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T) + (hida : ∀ᶠ T in atTop, (P.atD T).a T = aT T) + {c kN kNII : ℝ} {rhs : ℝ → ℝ} + (hseam : ∀ T ≥ (0:ℝ), ZeroSide.PhiHatConj T (P.atD T) → ZeroSide.PhiHatReal T (P.atD T) → + ZeroSide.PoissonSq T (P.atD T) → TailInputs Z (P.atD T) T (θ₀ T) → + 0 < (P.atD T).a T → 0 < (P.atD T).L T → + c * rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) - frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) + - kN * (Z.N T (2 * T) : ℝ) - kNII * (NII Z T : ℝ) + - θ₀ T / ((P.atD T).a T * (P.atD T).L T) * + (c + 2 * Real.sqrt (frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T))) + + θ₀ T / ((P.atD T).a T * (P.atD T).L T)) + ≤ rhs T) : + ∀ᶠ T in atTop, + c * ((aT T * P.L T)⁻¹ * trG T) - ((aT T * P.L T)⁻¹) ^ 2 * trG2 T + - kN * (Z.N T (2 * T) : ℝ) - kNII * (NII Z T : ℝ) + - θ₀ T / (aT T * P.L T) * + (c + 2 * Real.sqrt (((aT T * P.L T)⁻¹) ^ 2 * trG2 T) + θ₀ T / (aT T * P.L T)) + ≤ rhs T := + eventually_atD_of_seam Z P hP ha hrt hfr hida + (hTail.and (eventually_w8 hP) |>.mono fun T ⟨hTl, h8⟩ hT0 ha' hL' => + hseam T hT0 (fun z => GzGp.phiHat_conj _ T z) (fun r => GzGp.phiHat_ofReal _ T r) + (poissonSqD hP h8) hTl ha' hL') + +/-- Unified `c = 2` and `c = 3` multiplicity-aware Theorem-D endgame on `P.atD T`, +shared by `ζ` (`ThmD`) and `L(s, χ)` (`ThmDE`). -/ +theorem thmD_mult_pair_of_atD (Z : ZeroConfig) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + {aT cT trG trG2 θ₀ : ℝ → ℝ} + (hTr1 : EvBound (fun T => trG T - aT T * P.L T * (Z.N T (2 * T) : ℝ)) + (fun T => P.L T * Real.sqrt (P.X T))) + (hFr2 : EvBound (fun T => max (trG2 T / (aT T * P.L T) ^ 2 - (cT T)⁻¹ * (Z.N T (2 * T) : ℝ)) 0) + (fun T => P.calE T * ((cT T)⁻¹ * (Z.N T (2 * T) : ℝ)))) + {c : ℝ} (hc0 : 0 < c) (hc : Tendsto cT atTop (𝓝 c)) (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) + (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = (P.atD T).Gp T) - (hId : ∀ᶠ T in atTop, (P.atD T).trGtilde T = trG T ∧ (P.atD T).trGtildeSq T = trG2 T ∧ - (P.atD T).a T = aT T) + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) + (hrt : ∀ᶠ T in atTop, rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T) + (hfr : ∀ᶠ T in atTop, frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T) + (hida : ∀ᶠ T in atTop, (P.atD T).a T = aT T) (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (3 / 2 - c⁻¹ / 2 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by - intro ε hε - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, hfr2⟩ := hTr.frhat - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - -- the functions of T (abbreviations) - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cinv : ℝ → ℝ := fun T => (cRatio (P.lam1 T) (aT T) (bT T) (JT T))⁻¹ with hcinv - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T with hR₁ - set R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) with hR₂ - set B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) with hBdef - set err : ℝ → ℝ := fun T => (6 * R₁ T + R₂ T + 5 * (NII Z T : ℝ) - + B T * (6 + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) + |cinv T - c⁻¹| * N T with herr - -- basic limits - have hLtop := tendsto_L_atTop P hlam0 - have hcinv_to : Tendsto cinv atTop (𝓝 c⁻¹) := hc.inv₀ hc0.ne' - ------------------------------------------------------------------ - -- (1) the main inequality, eventually in T - ------------------------------------------------------------------ - have hmain : ∀ᶠ T in atTop, (3 - c⁻¹) * N T - err T ≤ 2 * (Z.Nd T (2 * T) : ℝ) := by - filter_upwards [hBlock, hTail, hGzGp, hId, ha, eventually_ge_atTop T₁, - eventually_ge_atTop T₂, eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w), eventually_w8 hP] - with T hBl hTl hGG hid ha2 hT₁ hT₂ hT0 hl hE0 h8 - obtain ⟨hidtr, hidfr, hida⟩ := hid - have hapos' : 0 < aT T := by linarith [ha2.1] - have haposD : 0 < (P.atD T).a T := by rw [hida]; exact hapos' - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - -- Seam A for the window-realizing parameters - have hA := seamA_mult3 hT0 (fun z => GzGp.phiHat_conj _ T z) (fun r => GzGp.phiHat_ofReal _ T r) - (poissonSqD hP h8) hTl haposD hLpos - -- the hat-unit traces in terms of the abstract data - have hrt : rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T := by - rw [rtrace_hat, hGG, rtrace_tilde_Gp, hidtr, hida]; rfl - have hfr : frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) - = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T := by - rw [frobSq_hat, hGG, frobSq_tilde_Gp, hidfr, hida]; rfl - have haL : (P.atD T).a T * (P.atD T).L T = aT T * P.L T := by rw [hida]; rfl - rw [hrt, hfr, haL] at hA - -- |tr Ĝ − N| ≤ R₁ - have htr : |(aT T * P.L T)⁻¹ * trG T - N T| ≤ R₁ T := - trGhat_sub_N_le hapos' hLpos (by simpa only using htr1 T hT₁) - -- ‖Ĝ‖² ≤ cinv N + R₂ - have hfrb : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T ≤ cinv T * N T + R₂ T := by - have h := hfr2 T hT₂ - simp only at h - have h1 : trG2 T / (aT T * P.L T) ^ 2 - cinv T * N T ≤ C₂ * P.calE T * (cinv T * N T) := by - rw [← mul_assoc] at h - exact le_trans (le_trans (le_max_left _ 0) (le_abs_self _)) h - have e : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T = trG2 T / (aT T * P.L T) ^ 2 := by - rw [inv_pow, div_eq_inv_mul] - rw [e]; simp only [hR₂]; linarith - have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le - have h := Nd_lower_c3 hB₀ hA htr hfrb - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hcd : (3 - c⁻¹) * N T - |cinv T - c⁻¹| * N T ≤ (3 - cinv T) * N T := by - have h1 := mul_le_mul_of_nonneg_right (le_abs_self (cinv T - c⁻¹)) hN0 - linarith [h1] - simp only [herr, hR₁, hR₂, hBdef, hNdef] at h hcd ⊢ - linarith - ------------------------------------------------------------------ - -- (2) err = o(N) - ------------------------------------------------------------------ - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop Z H.RvM - -- R₁ = o(N) - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / aT T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [ha] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith [ha2.1]))] - rw [div_le_iff₀ (by linarith [ha2.1])]; nlinarith [ha2.1] - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl Z H.RvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - -- cinv is eventually in [0, 2/c] and bounded - have hcinv_bd : ∀ᶠ T in atTop, 0 ≤ cinv T ∧ cinv T ≤ 2 * c⁻¹ := by - have hcpos : (0:ℝ) < c⁻¹ := inv_pos.mpr hc0 - filter_upwards [hcinv_to.eventually (eventually_ge_nhds hcpos), - hcinv_to.eventually (eventually_le_nhds (show c⁻¹ < 2 * c⁻¹ by linarith))] with T h1 h2 - exact ⟨h1, h2⟩ - have hcinvO : cinv =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * c⁻¹) ?_ - filter_upwards [hcinv_bd] with T h - rw [abs_of_nonneg h.1]; exact h.2 - -- R₂ = o(N) - have o2 : R₂ =o[atTop] N := by - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have i1 : (fun T => cinv T * N T) =O[atTop] N := by - have := hcinvO.mul (isBigO_refl N atTop) - simpa using this - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO i1 - refine (this.congr_left fun T => ?_).congr_right fun T => by simp - simp only [hR₂] - -- N(I′∖I) = o(N) - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z H.RvM isLittleO_sqrt_mul_l_Tl) - -- B → 0 - have o4 : Tendsto B atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ - · filter_upwards [hTail, ha, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by nlinarith [ha2.1]) - · filter_upwards [hTail, ha, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < aT T := by linarith [ha2.1] - have hq : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - simp only [hBdef] - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (aT T * P.L T) := by - have : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [this]; gcongr; exact ha2.1 - -- the bracket and the constant-drift term - have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) - (cl := cinv) hNtop o1 o2 o3 o4 hcinv_bd - have o6 : (fun T => |cinv T - c⁻¹| * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => cinv T - c⁻¹) atTop (𝓝 0) := by - simpa using hcinv_to.sub_const c⁻¹ - simpa using this.abs - -- the extra 2R₁ + 2NII + 2B of the c = 3 bracket - have oB : B =o[atTop] N := by - refine ((isLittleO_one_iff ℝ).2 o4).trans_isBigO (IsBigO.of_bound 1 ?_) - filter_upwards [hNtop.eventually_ge_atTop 1] with T h1 - rw [norm_one, Real.norm_eq_abs, abs_of_nonneg (by linarith), one_mul]; exact h1 - have o5' : (fun T => 6 * R₁ T + R₂ T + 5 * (NII Z T : ℝ) - + B T * (6 + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) =o[atTop] N := by - have := o5.add (((o1.const_mul_left 2).add (o3.const_mul_left 2)).add (oB.const_mul_left 2)) - exact this.congr_left fun T => by ring - have herr_o : err =o[atTop] N := o5'.add o6 - ------------------------------------------------------------------ - -- (3) conclude (halve) - ------------------------------------------------------------------ - have hfin := eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o - (2 * ε) (by linarith) - obtain ⟨T₀, hT₀⟩ := hfin - exact ⟨T₀, fun T hT => by have := hT₀ T hT; linarith⟩ + DyadicLowerBound (2 - c⁻¹) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) ∧ + DyadicLowerBound (3 / 2 - c⁻¹ / 2) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := by + have hθ0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T := hTail.mono fun _ h => h.theta_nonneg + refine ⟨?_, ?_⟩ + · simpa only [show (4 - 2 - c⁻¹) / 1 = 2 - c⁻¹ by ring] using + thmD_moment_core 4 2 3 4 1 (by norm_num) (by norm_num) Z P hP hlam hTr1 hFr2 hc0 hc ha + hθ0 hθ₀ hNII hNtop hoTl hcalE + (eventually_atD_of_seamA Z P hP ha hTail hrt hfr hida + (fun _ h0 hc' hr hp htl ha' hL' => by + simpa only [one_mul] using seamA_mult2 h0 hc' hr hp htl ha' hL')) + · simpa only [show (6 - 3 - c⁻¹) / 2 = 3 / 2 - c⁻¹ / 2 by ring] using + thmD_moment_core 6 3 5 6 2 (by norm_num) (by norm_num) Z P hP hlam hTr1 hFr2 hc0 hc ha + hθ0 hθ₀ hNII hNtop hoTl hcalE + (eventually_atD_of_seamA Z P hP ha hTail hrt hfr hida + (fun _ h0 hc' hr hp htl ha' hL' => seamA_mult3 h0 hc' hr hp htl ha' hL')) end Abstract @@ -382,97 +100,72 @@ def GD (lam : ℝ) : ℝ := 3 / 2 - (cStar lam)⁻¹ / 2 lemma GD_eq (lam : ℝ) : GD lam = (HD lam + 1) / 2 := by simp only [GD, HD, one_div]; ring +/-- The `GD`-rate `λ → 1⁻` step (via `GD = (HD + 1) / 2`), shared by `ζ` and `L(s, χ)`. -/ +theorem eps_form_GD {N lower : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) + (h : ∀ lam : ℝ, 1 / 2 ≤ lam → lam < 1 → EpsLowerBound (GD lam) lower N) : + EpsLowerBound (GD 1) lower N := by + have hHD := eps_form_HD (N := N) (lower := fun T => 2 * lower T - N T) hN + (fun lam hl1 hl2 ε hε => by + obtain ⟨T₀, hT₀⟩ := h lam hl1 hl2 (ε / 2) (by linarith) + refine ⟨T₀, fun T hT => ?_⟩ + have := hT₀ T hT; simp only [GD_eq] at this; linarith) + intro ε hε + obtain ⟨T₀, hT₀⟩ := hHD (2 * ε) (by linarith) + refine ⟨T₀, fun T hT => ?_⟩ + have := hT₀ T hT; rw [GD_eq]; linarith + +/-- Both multiplicity-aware Theorem-D bounds from `ConcreteDSetupG`, shared by `ζ` and `L(s, χ)`. -/ +theorem ConcreteDSetupG.thmD_mult_pair {Z : ZeroConfig} {P : Params} + {lam1f aT bT JT trG trG2 : ℝ → ℝ} (S : ConcreteDSetupG Z P lam1f aT bT JT trG trG2) + (hP : P.Valid) (hlam : P.lam < 1) + (hNtop : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop) + (hoTl : ∀ f : ℝ → ℝ, f =o[atTop] (fun T => T * l T) → + f =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) : + DyadicLowerBound (HD P.lam) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) ∧ + DyadicLowerBound (GD P.lam) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := by + obtain ⟨θ₀, hTail, hθ₀⟩ := S.hTailPack + simpa only [HD, GD, one_div] using + thmD_mult_pair_of_atD Z P hP hlam S.hTr.tr1 S.hTr.frhat S.hc0 S.hc S.ha hTail hθ₀ S.hNII + hNtop hoTl S.hrt S.hfr S.hida S.hcalE + /-- both lines at fixed λ ∈ (0,1), abstract zero configuration. -/ theorem thmD_mult_lam_abstract (Z : ZeroConfig) (H : PaperInputs Z) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) : - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T)) ∧ - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (GD P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T)) := by - have hLoc : LocalHypsCoreDEventually P := localHypsCoreD_eventually hP - have hTr := tracesBoundsD_concrete (Z := Z) hP H hLoc - have hc := tendsto_cRatio_concrete hP Z - have hc0 := cStar_pos hP.lam_pos hP.lam_le_one - have ha : ∀ᶠ T in atTop, 1 / 2 ≤ (concreteDataD P Z).aT T ∧ (concreteDataD P Z).aT T ≤ 1 := - (concreteFactsD hP H hLoc).ab_range.mono fun T h => ⟨h.1.trans h.2.1, h.2.2.1⟩ - have hBlock := eventually_blockInputsD Z hP - obtain ⟨θ₀, hTail, hθ₀⟩ := eventually_tailPackageD Z H hP - obtain ⟨A₀, hA₀, hloc⟩ := H.RvM.local_count - have hNII := Tail.eventually_NII_le Z hA₀ hloc - have hGzGp := eventually_GzGpD Z H hP - have hId : ∀ᶠ T in atTop, - (P.atD T).trGtilde T = (concreteDataD P Z).trG T ∧ - (P.atD T).trGtildeSq T = (concreteDataD P Z).trG2 T ∧ - (P.atD T).a T = (concreteDataD P Z).aT T := - Eventually.of_forall fun T => - ⟨Params.atD_trGtilde T hP, Params.atD_trGtildeSq T hP, Params.atD_a T hP⟩ - have hcalE := calE_tendsto_zero P hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w) - refine ⟨?_, ?_⟩ - · have h := thmD_mult2_abstract Z H P hP hlam _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ hTail hθ₀ hNII - hGzGp hId hcalE - simpa only [HD, one_div] using h - · have h := thmD_mult3_abstract Z H P hP hlam _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ hTail hθ₀ hNII - hGzGp hId hcalE - simpa only [GD] using h - -/-- ζ at fixed λ ∈ (0,1): (HD(λ) − ε)N ≤ N₀ˢ, UNCONDITIONAL. -/ -theorem thmD_simple_mult_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (HD lam - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - simpa [paramsOf] using (thmD_mult_lam_abstract zetaZeroConfig paperInputs_zeta - (paramsOf stdProfile lam) hP h1).1 - -/-- ζ at fixed λ ∈ (0,1): (GD(λ) − ε)N ≤ N_d, UNCONDITIONAL. -/ -theorem thmD_dist_mult_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (GD lam - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := by + DyadicLowerBound (HD P.lam) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) ∧ + DyadicLowerBound (GD P.lam) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := + (concreteDSetup Z H P hP).thmD_mult_pair hP hlam (tendsto_N_atTop Z H.RvM) + (fun _ h => isLittleO_N_of_isLittleO_Tl Z H.RvM h) + +private theorem thmD_mult_lam {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : + DyadicLowerBound (HD lam) (fun T => N0simple T (2 * T)) (fun T => Ncount T (2 * T)) ∧ + DyadicLowerBound (GD lam) (fun T => Ndist T (2 * T)) (fun T => Ncount T (2 * T)) := by have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - simpa [paramsOf] using (thmD_mult_lam_abstract zetaZeroConfig paperInputs_zeta - (paramsOf stdProfile lam) hP h1).2 + simpa [paramsOf] using thmD_mult_lam_abstract zetaZeroConfig paperInputs_zeta + (paramsOf stdProfile lam) hP h1 /-- **0.6725… of the zeros of ζ are SIMPLE AND ON THE CRITICAL LINE, UNCONDITIONAL** -([thm:D]'s second constant: 2 − 1/c₁* = 3/2 − cot(1/√2)/√2, the same as for N₀*, now for the -simple-and-on-line count; the Cauchy–Schwarz form in Zeta23/ThmD/Final.lean has 2c₁* − 1 = 0.50659…). -/ +([thm:D]'s second constant: `HD 1 = 2 − 1/c₁*`). -/ theorem thmD₀_simple_mult : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := + DyadicLowerBound (HD 1) (fun T => N0simple T (2 * T)) (fun T => Ncount T (2 * T)) := eps_form_HD (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (N0simple T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) fun lam hl1 hl2 => thmD_simple_mult_lam (by linarith) hl2 - -/-- the same with the constant written out. -/ -theorem thmD₀_simple_mult' : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (3 / 2 - (Real.sqrt 2)⁻¹ * (Real.cos (Real.sqrt 2)⁻¹ / Real.sin (Real.sqrt 2)⁻¹) - ε) - * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := by - rw [← HD_one]; exact thmD₀_simple_mult + (fun _ => Nat.cast_nonneg _) fun _ hl1 hl2 => (thmD_mult_lam (by linarith) hl2).1 /-- **(3 − 1/c₁*)/2 = 0.83625… of the zeros of ζ are DISTINCT, UNCONDITIONAL** ([thm:D]'s third -constant; the Cauchy–Schwarz form in Zeta23/ThmD/Final.lean has c₁* = 0.75329…). -/ +constant). -/ theorem thmD₀_dist_mult : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (GD 1 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := by - -- GD = (HD + 1)/2: run eps_form_HD on lower' := 2·N_d − N - have h := eps_form_HD (N := fun T => (Ncount T (2 * T) : ℝ)) - (lower := fun T => 2 * (Ndist T (2 * T) : ℝ) - (Ncount T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) (fun lam hl1 hl2 ε hε => by - obtain ⟨T₀, hT₀⟩ := thmD_dist_mult_lam (by linarith) hl2 (ε / 2) (by linarith) - refine ⟨T₀, fun T hT => ?_⟩ - have := hT₀ T hT - simp only [GD_eq] at this - linarith) - intro ε hε - obtain ⟨T₀, hT₀⟩ := h (2 * ε) (by linarith) - refine ⟨T₀, fun T hT => ?_⟩ - have := hT₀ T hT - rw [GD_eq] - linarith + DyadicLowerBound (GD 1) (fun T => Ndist T (2 * T)) (fun T => Ncount T (2 * T)) := + eps_form_GD (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (Ndist T (2 * T) : ℝ)) + (fun _ => Nat.cast_nonneg _) fun _ hl1 hl2 => (thmD_mult_lam (by linarith) hl2).2 /-- cumulative: liminf N₀ˢ(T)/N(T) ≥ 0.6725… -/ theorem thmD₀_simple_mult_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD 1 - ε) * (Ncount 0 T : ℝ) ≤ N0simple 0 T := + DyadicLowerBound (HD 1) (fun T => N0simple 0 T) (fun T => Ncount 0 T) := cumulative_of_dyadic zetaSeam paperInputs_zeta.RvM (fun _ _ _ => N0simple_add' zetaSeam) thmD₀_simple_mult /-- cumulative: liminf N_d(T)/N(T) ≥ 0.83625… -/ theorem thmD₀_dist_mult_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (GD 1 - ε) * (Ncount 0 T : ℝ) ≤ Ndist 0 T := + DyadicLowerBound (GD 1) (fun T => Ndist 0 T) (fun T => Ncount 0 T) := cumulative_of_dyadic zetaSeam paperInputs_zeta.RvM (fun _ _ _ => Ndist_add' zetaSeam) thmD₀_dist_mult diff --git a/zeta23/Zeta23/ThmD/PP.lean b/zeta23/Zeta23/ThmD/PP.lean index a6e31fd189..9b6c6791de 100644 --- a/zeta23/Zeta23/ThmD/PP.lean +++ b/zeta23/Zeta23/ThmD/PP.lean @@ -9,15 +9,10 @@ The single changed proof step of §7.1 (the paper, text preceding [eq:ratio-gene "the last step of Proposition [prop:PP] is replaced by partial summation from [eq:cheb2]: since |g'| ≤ ‖(φ²)'‖₁ ≤ 2, Σ_{n≤X} a_n² g(y_n) = ∫_0^L g(y)·y dy + O(L²) = (L³/2)·J + O(L²)." -Generic in g. Hypothesis on g: -g is taken C¹ with |g'| ≤ 2 (exactly the paper's "since |g'| ≤ 2") rather than Lipschitz-2 — -this matches Mathlib's Abel summation formula (sum_mul_eq_sub_integral_mul₀) directly, and the -concrete g_D = φ_D² ⋆ φ_D² is C¹ with |g_D'| ≤ ‖(φ_D²)'‖₁ ≤ 2 (Window.lean). Consumed by the FactsD instance for the Montgomery–Taylor window (sumJ field). -/ import Zeta23.PrimeSideB.PP import Zeta23.ThmD.Window -import Mathlib.NumberTheory.AbelSummation noncomputable section @@ -30,9 +25,7 @@ namespace ThmD /-- **The partial-summation step, abstract in the weights** (Abel summation): for any weight sequence 'c' with c 0 = c 1 = 0 whose partial sums satisfy the [eq:cheb2a]-shape |Σ_{k≤t} c k − (log t)²/2| ≤ C₀ log t (t ≥ 2), and any C¹ g with |g'| ≤ 2, g ≡ 0 on [L,∞): - Σ_{n≤X} c n · g(log n) = ∫_0^L g(y)·y dy + O(L²), X = e^L. -(Instances: c n = Λ(n)²/n — 'sumA2g_close' below, ζ; and c n = Λ(n)²/n·1_{(n,q)=1} — the -Dirichlet-character version in Zeta23/ThmDE/, from [eq:cheb2a] for n coprime to q.) -/ + Σ_{n≤X} c n · g(log n) = ∫_0^L g(y)·y dy + O(L²), X = e^L. -/ theorem abel_sum_close {c : ℕ → ℝ} {C₀ : ℝ} (hc0 : c 0 = 0) (hc1 : c 1 = 0) (hC₀ : ∀ t : ℝ, 2 ≤ t → |(∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k) - Real.log t ^ 2 / 2| ≤ C₀ * Real.log t) : @@ -41,295 +34,37 @@ theorem abel_sum_close {c : ℕ → ℝ} {C₀ : ℝ} (hc0 : c 0 = 0) (hc1 : c 1 (∀ y : ℝ, L ≤ y → g y = 0) → |(∑ n ∈ PrimeSide.primeRange X, c n * g (Real.log n)) - ∫ y in (0:ℝ)..L, g y * y| ≤ (2 * |C₀| + 10) * L ^ 2 := by - classical intro L X g hL hX hgd hg'c hg'le hgsupp - have hL0 : 0 < L := by linarith - have hX1 : 1 < X := by - rw [hX] - calc (1:ℝ) = Real.exp 0 := Real.exp_zero.symm - _ < Real.exp L := Real.exp_lt_exp.mpr hL0 - have hX0 : 0 < X := by linarith - have hlogX : Real.log X = L := by rw [hX, Real.log_exp] - -- the Abel data - set f : ℝ → ℝ := fun t => g (Real.log t) with hfdef - -- differentiability and derivative of f on t > 0 - have hfderiv : ∀ t : ℝ, 0 < t → HasDerivAt f (deriv g (Real.log t) / t) t := by + subst hX + have hS : ∀ t ∈ Set.Ioc (1 : ℝ) (Real.exp L), + |(∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k) - ∫ y in (0 : ℝ)..Real.log t, y| + ≤ |C₀| * Real.log t + 1 := by intro t ht - have h1 := (hgd (Real.log t)).hasDerivAt - have h2 := Real.hasDerivAt_log ht.ne' - have := h1.comp t h2 - rw [hfdef] - exact this.congr_deriv (by ring) - have hdiff : ∀ t ∈ Set.Icc (1:ℝ) X, DifferentiableAt ℝ f t := fun t ht => - (hfderiv t (by linarith [ht.1])).differentiableAt - have hderiv_eq : Set.EqOn (deriv f) (fun t => deriv g (Real.log t) / t) - (Set.Icc (1:ℝ) X) := fun t ht => (hfderiv t (by linarith [ht.1])).deriv - have hint : MeasureTheory.IntegrableOn (deriv f) (Set.Icc (1:ℝ) X) := by - apply MeasureTheory.IntegrableOn.congr_fun _ (fun t ht => (hderiv_eq ht).symm) - measurableSet_Icc - apply ContinuousOn.integrableOn_compact isCompact_Icc - apply ContinuousOn.div - · exact (hg'c.comp_continuousOn (Real.continuousOn_log.mono (by - intro t ht - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - intro h - rw [h] at ht - linarith [ht.1]))) - · exact continuousOn_id - · intro t ht - have := ht.1 - intro h - rw [h] at this - linarith - -- Abel's summation formula - have habel := sum_mul_eq_sub_integral_mul₀ c hc0 (f := f) X hdiff hint - have hfX : f X = 0 := by - rw [hfdef] - simp only - rw [hlogX] - exact hgsupp L le_rfl - rw [hfX, zero_mul, zero_sub] at habel - -- the weighted sum as the Abel sum - have hsum_eq : (∑ n ∈ PrimeSide.primeRange X, c n * g (Real.log n)) - = ∑ k ∈ Finset.Icc 0 ⌊X⌋₊, f k * c k := by - unfold PrimeSide.primeRange - rw [Finset.Icc_eq_cons_Ioc (Nat.zero_le _), Finset.sum_cons, hc0, mul_zero, zero_add] - apply Finset.sum_congr rfl - intro n _ - rw [hfdef, mul_comm] - -- the partial sums vs (log t)²/2 - have hSIoc : ∀ t : ℝ, (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) = ∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k := by - intro t - rw [Finset.Icc_eq_cons_Ioc (Nat.zero_le _), Finset.sum_cons, hc0, zero_add] - have hSbound : ∀ t ∈ Set.Ioc (1:ℝ) X, - |(∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - Real.log t ^ 2 / 2| ≤ |C₀| * Real.log t + 1 := by - intro t ht - have hlogt : 0 ≤ Real.log t := Real.log_nonneg (by linarith [ht.1]) - rw [hSIoc t] + have hlogt : 0 ≤ Real.log t := Real.log_nonneg ht.1.le + rw [integral_id, zero_pow two_ne_zero, sub_zero] rcases le_or_gt 2 t with h2 | h2 - · have := hC₀ t h2 - calc |(∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k) - Real.log t ^ 2 / 2| ≤ C₀ * Real.log t := this - _ ≤ |C₀| * Real.log t := mul_le_mul_of_nonneg_right (le_abs_self C₀) hlogt - _ ≤ |C₀| * Real.log t + 1 := by linarith - · -- 1 < t < 2: the sum is c 1 = 0 and log²t/2 ≤ 1 - have hfl : ⌊t⌋₊ = 1 := by - rw [Nat.floor_eq_iff (by linarith [ht.1] : (0:ℝ) ≤ t)] - constructor - · push_cast - linarith [ht.1] - · push_cast - linarith - rw [hfl] - have he : Finset.Ioc 0 1 = {1} := rfl - rw [he, Finset.sum_singleton, hc1] - have hlt : Real.log t ^ 2 / 2 ≤ 1 := by - have ha : Real.log t ≤ Real.log 2 := Real.log_le_log (by linarith [ht.1]) h2.le - have hb : Real.log 2 ≤ 1 := by - have := Real.log_le_sub_one_of_pos (by norm_num : (0:ℝ) < 2) - linarith - nlinarith [hlogt] - calc |(0:ℝ) - Real.log t ^ 2 / 2| = Real.log t ^ 2 / 2 := by - rw [zero_sub, abs_neg, abs_of_nonneg (by positivity)] - _ ≤ 1 := hlt - _ ≤ |C₀| * Real.log t + 1 := by - linarith [mul_nonneg (abs_nonneg C₀) hlogt] - -- error piece - have hlogcont : ContinuousOn Real.log (Set.Icc (1:ℝ) X) := by - apply Real.continuousOn_log.mono - intro t ht - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - intro h0 - rw [h0] at ht - linarith [ht.1] - have hi1 : MeasureTheory.IntegrableOn - (fun t => deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) (Set.Ioc (1:ℝ) X) := - (integrableOn_mul_sum_Icc c (by norm_num : (0:ℝ) ≤ 1) hint).mono_set - Set.Ioc_subset_Icc_self - have hi2 : MeasureTheory.IntegrableOn (fun t => deriv f t * (Real.log t ^ 2 / 2)) - (Set.Ioc (1:ℝ) X) := by - refine MeasureTheory.IntegrableOn.mono_set ?_ (Set.Ioc_subset_Icc_self) - exact hint.mul_continuousOn ((hlogcont.pow 2).div_const 2) isCompact_Icc - have herr : |(∫ t in Set.Ioc (1:ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - ∫ t in Set.Ioc (1:ℝ) X, deriv f t * (Real.log t ^ 2 / 2)| ≤ (2 * |C₀| + 4) * L ^ 2 := by - rw [← MeasureTheory.integral_sub hi1 hi2] - -- pointwise majorant 2|C₀| log t/t + 2/t on (1, X] - have hmajint : MeasureTheory.IntegrableOn - (fun t => 2 * |C₀| * Real.log t / t + 2 / t) (Set.Ioc (1:ℝ) X) := by - refine MeasureTheory.IntegrableOn.mono_set ?_ (Set.Ioc_subset_Icc_self) - apply ContinuousOn.integrableOn_compact isCompact_Icc - apply ContinuousOn.add - · apply ContinuousOn.div (hlogcont.const_smul (2 * |C₀|) |>.congr ?_) continuousOn_id ?_ - · intro t ht - simp [smul_eq_mul] - · intro t ht h0 - simp only [id_eq] at h0 - rw [h0] at ht - linarith [ht.1] - · apply ContinuousOn.div continuousOn_const continuousOn_id ?_ - intro t ht h0 - simp only [id_eq] at h0 - rw [h0] at ht - linarith [ht.1] - have hptw : ∀ t ∈ Set.Ioc (1:ℝ) X, - |deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * (Real.log t ^ 2 / 2)| - ≤ 2 * |C₀| * Real.log t / t + 2 / t := by - intro t ht - have ht1 : 1 < t := ht.1 - have ht0 : 0 < t := by linarith - have hfd : deriv f t = deriv g (Real.log t) / t := - hderiv_eq ⟨ht1.le, ht.2⟩ - have hfdabs : |deriv f t| ≤ 2 / t := by - rw [hfd, abs_div, abs_of_pos ht0] - exact div_le_div_of_nonneg_right (hg'le _) ht0.le - have e : deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - deriv f t * (Real.log t ^ 2 / 2) - = deriv f t * ((∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - Real.log t ^ 2 / 2) := by ring - rw [e, abs_mul] - calc |deriv f t| * |(∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - Real.log t ^ 2 / 2| - ≤ (2 / t) * (|C₀| * Real.log t + 1) := by - apply mul_le_mul hfdabs (hSbound t ht) (abs_nonneg _) (by positivity) - _ = 2 * |C₀| * Real.log t / t + 2 / t := by - field_simp - try ring - have hmono : |∫ t in Set.Ioc (1:ℝ) X, - (deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * (Real.log t ^ 2 / 2))| - ≤ ∫ t in Set.Ioc (1:ℝ) X, (2 * |C₀| * Real.log t / t + 2 / t) := by - calc |∫ t in Set.Ioc (1:ℝ) X, - (deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * (Real.log t ^ 2 / 2))| - ≤ ∫ t in Set.Ioc (1:ℝ) X, - |deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * (Real.log t ^ 2 / 2)| := - MeasureTheory.abs_integral_le_integral_abs - _ ≤ ∫ t in Set.Ioc (1:ℝ) X, (2 * |C₀| * Real.log t / t + 2 / t) := by - apply MeasureTheory.setIntegral_mono_on ((hi1.sub hi2).abs) hmajint - measurableSet_Ioc hptw - -- evaluate the majorant integral: |C₀| L² + 2 L - have hmaj_eval : ∫ t in Set.Ioc (1:ℝ) X, (2 * |C₀| * Real.log t / t + 2 / t) - = |C₀| * L ^ 2 + 2 * L := by - rw [← intervalIntegral.integral_of_le hX1.le] - have hH : ∀ t ∈ Set.uIcc (1:ℝ) X, HasDerivAt - (fun t => |C₀| * Real.log t ^ 2 + 2 * Real.log t) - (2 * |C₀| * Real.log t / t + 2 / t) t := by - intro t ht - rw [Set.uIcc_of_le hX1.le] at ht - have ht0 : 0 < t := by linarith [ht.1] - have hlog := Real.hasDerivAt_log ht0.ne' - have h1 : HasDerivAt (fun t => |C₀| * Real.log t ^ 2) - (|C₀| * (2 * Real.log t * t⁻¹)) t := by - have := ((hlog.pow 2)).const_mul |C₀| - exact this.congr_deriv (by push_cast; ring) - have h2 : HasDerivAt (fun t => 2 * Real.log t) (2 * t⁻¹) t := hlog.const_mul 2 - have := h1.add h2 - exact this.congr_deriv (by ring) - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hH ?_] - · rw [hlogX, Real.log_one] - try ring - · apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le hX1.le] - apply ContinuousOn.add - · apply ContinuousOn.div ?_ continuousOn_id ?_ - · exact (hlogcont.const_smul (2 * |C₀|)).congr (fun t ht => by simp [smul_eq_mul]) - · intro t ht h0 - simp only [id_eq] at h0 - rw [h0] at ht - linarith [ht.1] - · apply ContinuousOn.div continuousOn_const continuousOn_id ?_ - intro t ht h0 - simp only [id_eq] at h0 - rw [h0] at ht - linarith [ht.1] - rw [hmaj_eval] at hmono - calc |∫ t in Set.Ioc (1:ℝ) X, - (deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * (Real.log t ^ 2 / 2))| - ≤ |C₀| * L ^ 2 + 2 * L := hmono - _ ≤ (2 * |C₀| + 4) * L ^ 2 := by - nlinarith [abs_nonneg C₀, sq_nonneg L] - -- main piece: change of variables + integration by parts - have hmain : ∫ t in Set.Ioc (1:ℝ) X, deriv f t * (Real.log t ^ 2 / 2) - = -∫ y in (0:ℝ)..L, g y * y := by - rw [← intervalIntegral.integral_of_le hX1.le] - rw [intervalIntegral.integral_congr (g := fun t => (deriv g (Real.log t) / t) - * (Real.log t ^ 2 / 2)) (by - rw [Set.uIcc_of_le hX1.le] - intro t ht - simp only - rw [hderiv_eq ht])] - have hsub : ∫ t in (1:ℝ)..X, (deriv g (Real.log t) / t) * (Real.log t ^ 2 / 2) - = ∫ y in (0:ℝ)..L, deriv g y * (y ^ 2 / 2) := by - have hXL : Real.exp L = X := hX.symm - have himg : Real.exp '' Set.uIcc (0:ℝ) L ⊆ {t : ℝ | 0 < t} := by - rintro t ⟨y, _, rfl⟩ - exact Real.exp_pos y - have hgcont : ContinuousOn (fun t => (deriv g (Real.log t) / t) - * (Real.log t ^ 2 / 2)) {t : ℝ | 0 < t} := by - have hlogc : ContinuousOn Real.log {t : ℝ | 0 < t} := by - apply Real.continuousOn_log.mono - intro t ht - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - intro h0 - rw [h0] at ht - exact lt_irrefl 0 (Set.mem_setOf_eq ▸ ht) - apply ContinuousOn.mul - · apply ContinuousOn.div (hg'c.comp_continuousOn hlogc) continuousOn_id - intro t ht h0 - simp only [id_eq] at h0 - rw [h0] at ht - exact lt_irrefl 0 (Set.mem_setOf_eq ▸ ht) - · exact (hlogc.pow 2).div_const 2 - have := intervalIntegral.integral_comp_mul_deriv' (f := Real.exp) (f' := Real.exp) - (g := fun t => (deriv g (Real.log t) / t) * (Real.log t ^ 2 / 2)) (a := (0:ℝ)) (b := L) - (fun x _ => Real.hasDerivAt_exp x) Real.continuous_exp.continuousOn - (hgcont.mono himg) - rw [Real.exp_zero, hXL] at this - rw [← this] - apply intervalIntegral.integral_congr - intro y hy - simp only [Function.comp_apply] - rw [Real.log_exp] - have he : Real.exp y ≠ 0 := (Real.exp_pos y).ne' - field_simp - try ring - rw [hsub] - have hv : ∀ y ∈ Set.uIcc (0:ℝ) L, HasDerivAt (fun y : ℝ => y ^ 2 / 2) y y := by - intro y _ - have := (hasDerivAt_pow 2 y).div_const 2 - exact this.congr_deriv (by push_cast; ring) - have hparts := intervalIntegral.integral_mul_deriv_eq_deriv_mul - (u := g) (u' := deriv g) (v := fun y : ℝ => y ^ 2 / 2) (v' := fun y : ℝ => y) - (fun y _ => (hgd y).hasDerivAt) hv (hg'c.intervalIntegrable 0 L) - (continuous_id.intervalIntegrable 0 L) - have hgL : g L = 0 := hgsupp L le_rfl - rw [hgL] at hparts - have e2 : ∫ y in (0:ℝ)..L, deriv g y * (y ^ 2 / 2) - = -∫ y in (0:ℝ)..L, g y * y := by - have : (∫ y in (0:ℝ)..L, g y * y) - = 0 * (L ^ 2 / 2) - g 0 * (0 ^ 2 / 2) - ∫ y in (0:ℝ)..L, deriv g y * (y ^ 2 / 2) := - hparts - have e3 : (0:ℝ) * (L ^ 2 / 2) - g 0 * (0 ^ 2 / 2) = 0 := by ring - rw [e3, zero_sub] at this - linarith - exact e2 - -- assemble - rw [hsum_eq, habel] - have e : -(∫ t in Set.Ioc (1:ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - ∫ y in (0:ℝ)..L, g y * y - = -((∫ t in Set.Ioc (1:ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - ∫ t in Set.Ioc (1:ℝ) X, deriv f t * (Real.log t ^ 2 / 2)) - - ((∫ t in Set.Ioc (1:ℝ) X, deriv f t * (Real.log t ^ 2 / 2)) - + ∫ y in (0:ℝ)..L, g y * y) := by ring - rw [e] - have hzero : (∫ t in Set.Ioc (1:ℝ) X, deriv f t * (Real.log t ^ 2 / 2)) - + ∫ y in (0:ℝ)..L, g y * y = 0 := by - rw [hmain] + · exact (hC₀ t h2).trans + (by nlinarith [le_abs_self C₀, hlogt]) + · have hfl : ⌊t⌋₊ = 1 := + (Nat.floor_eq_iff (by linarith [ht.1] : (0 : ℝ) ≤ t)).2 + ⟨by push_cast; linarith [ht.1], by push_cast; linarith⟩ + rw [hfl, show Finset.Ioc 0 1 = {1} from rfl, Finset.sum_singleton, hc1, zero_sub, + abs_neg, abs_of_nonneg (by positivity)] + have hlog2 : Real.log t ≤ 1 := + (Real.log_le_log (by linarith [ht.1]) h2.le).trans + (by linarith [Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 2)]) + nlinarith [abs_nonneg C₀, hlogt] + have hgen := PrimeSide.abel_sum_density_general hc0 (ρ := fun y : ℝ => y) + (E := fun y : ℝ => |C₀| * y + 1) continuous_id (by fun_prop) (by linarith : (0 : ℝ) < L) + hS hgd hg'c hg'le hgsupp + have hEeval : 2 * ∫ y in (0 : ℝ)..L, (|C₀| * y + 1) = |C₀| * L ^ 2 + 2 * L := by + rw [intervalIntegral.integral_add + ((show Continuous (fun y : ℝ => |C₀| * y) by fun_prop).intervalIntegrable _ _) + (continuous_const.intervalIntegrable _ _), intervalIntegral.integral_const_mul, + integral_id, intervalIntegral.integral_const, smul_eq_mul] ring - rw [hzero] - calc |-((∫ t in Set.Ioc (1:ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - ∫ t in Set.Ioc (1:ℝ) X, deriv f t * (Real.log t ^ 2 / 2)) - 0| - = |(∫ t in Set.Ioc (1:ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - ∫ t in Set.Ioc (1:ℝ) X, deriv f t * (Real.log t ^ 2 / 2)| := by - rw [sub_zero, abs_neg] - _ ≤ (2 * |C₀| + 4) * L ^ 2 := herr - _ ≤ (2 * |C₀| + 10) * L ^ 2 := by - nlinarith [abs_nonneg C₀, sq_nonneg L] + rw [hEeval] at hgen + exact hgen.trans (by nlinarith [abs_nonneg C₀, sq_nonneg L]) /-- **[thm:D proof], the partial-summation step** (replaces [eq:gbounds]+sandwich): for any C¹ weight g with |g'| ≤ 2 and g ≡ 0 on [L, ∞), diff --git a/zeta23/Zeta23/ThmD/ParamsD.lean b/zeta23/Zeta23/ThmD/ParamsD.lean index cae614e55a..4cea726d9c 100644 --- a/zeta23/Zeta23/ThmD/ParamsD.lean +++ b/zeta23/Zeta23/ThmD/ParamsD.lean @@ -78,9 +78,6 @@ theorem atD_localFun (hP : P.Valid) : (P.atD T).localFun T = P.localFunD T := by theorem atD_a (hP : P.Valid) : (P.atD T).a T = (P.localFunD T).a := by rw [← atD_localFun T hP]; rfl -theorem atD_b (hP : P.Valid) : (P.atD T).b T = (P.localFunD T).b := by - rw [← atD_localFun T hP]; rfl - /-- the prime-side traces of 'P.atD T' at height T are the abstract-layer traces of the D-data. -/ theorem atD_trGtilde (hP : P.Valid) : (P.atD T).trGtilde T = PrimeSide.trGtA (P.toSetting T) (P.localFunD T) := by diff --git a/zeta23/Zeta23/ThmD/PsiC.lean b/zeta23/Zeta23/ThmD/PsiC.lean deleted file mode 100644 index 9776201c0b..0000000000 --- a/zeta23/Zeta23/ThmD/PsiC.lean +++ /dev/null @@ -1,573 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -import Zeta23.Taper -import Zeta23.PrimeSideA.Basic - -noncomputable section - -open Complex MeasureTheory Real Set Filter Topology - -namespace Zeta23 -namespace PsiC - -variable {c L w : ℝ} - -/-- `ψ_c(r) := min(L, 2/|r|, c/(w r²))` (value `L` at `r = 0`), i.e. `psiA c p` with -`(p.L, p.w) = (L, w)`. -/ -def psiC (c L w : ℝ) (r : ℝ) : ℝ := - if r = 0 then L else min L (min (2 / |r|) (c / (w * r ^ 2))) - -lemma psiC_eq_psiA (c : ℝ) (p : PrimeSide.Setting) : psiC c p.L p.w = PrimeSide.psiA c p := by - funext r; rfl - -theorem psi_nonneg (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) (r : ℝ) : - 0 ≤ psiC c L w r := by - have hL : 0 ≤ L := by linarith - have hc0 : 0 ≤ c := le_trans (by norm_num) hc - unfold psiC - split_ifs with hr - · exact hL - · exact le_min hL (le_min (by positivity) (by positivity)) - -theorem psi_even (r : ℝ) : psiC c L w (-r) = psiC c L w r := by - simp [psiC] - -theorem psi_le_L (_hc : 4 ≤ c) (_hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : - psiC c L w r ≤ L := by - unfold psiC - split_ifs with hr - · exact le_rfl - · exact min_le_left _ _ - -theorem psi_mul_abs_le (_hc : 4 ≤ c) (_hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : - psiC c L w r * |r| ≤ 2 := by - unfold psiC - split_ifs with hr - · simp [hr] - · have hra : 0 < |r| := abs_pos.mpr hr - rw [← le_div_iff₀ hra] - exact (min_le_right _ _).trans (min_le_left _ _) - -theorem psi_mul_sq_le (hc : 4 ≤ c) (hw : 1 ≤ w) (_hwL : 2 * w ≤ L) (r : ℝ) : - psiC c L w r * r ^ 2 ≤ c / w := by - have hw0 : 0 < w := by linarith - have hc0 : 0 ≤ c := le_trans (by norm_num) hc - unfold psiC - split_ifs with hr - · simp [hr]; positivity - · have hr2 : 0 < r ^ 2 := by positivity - rw [← le_div_iff₀ hr2, div_div, mul_comm] - exact (min_le_right _ _).trans (min_le_right _ _) - -/-! #### Measurability / integrability of ψ -/ - -theorem psi_abs (r : ℝ) : psiC c L w |r| = psiC c L w r := by - unfold psiC - simp only [abs_eq_zero, abs_abs, sq_abs] - -theorem psi_measurable : Measurable (psiC c L w) := by - have h1 : Measurable (fun r : ℝ => min L (min (2 / |r|) (c / (w * r ^ 2)))) := - measurable_const.min ((measurable_const.div continuous_abs.measurable).min - (measurable_const.div (measurable_const.mul (measurable_id.pow_const 2)))) - have : psiC c L w = Set.piecewise {(0:ℝ)} (fun _ => L) (fun r => min L (min (2 / |r|) (c / (w * r ^ 2)))) := by - funext r - unfold psiC - by_cases hr : r = 0 - · rw [if_pos hr, Set.piecewise_eq_of_mem _ _ _ (by simp [hr])] - · rw [if_neg hr, Set.piecewise_eq_of_notMem _ _ _ (by simp [hr])] - rw [this] - exact Measurable.piecewise (measurableSet_singleton 0) measurable_const h1 - -/-- For r > 0: ψ(r) ≤ (c_ϱ/w) · r^{−2} (rpow form). -/ -theorem psi_le_rpow_neg_two (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) {r : ℝ} - (hr : 0 < r) : psiC c L w r ≤ c / w * r ^ (-2:ℝ) := by - have h := psi_mul_sq_le hc hw hwL r - rw [Real.rpow_neg hr.le, show (2:ℝ) = ((2:ℕ):ℝ) by norm_num, Real.rpow_natCast, - ← div_eq_mul_inv, le_div_iff₀ (by positivity)] - exact h - -/-- The integrable majorant of ψ: L on [−1,1] and (c_ϱ/w)|r|⁻² outside. -/ -noncomputable def psiMaj (c L w : ℝ) (r : ℝ) : ℝ := - (Icc (-1:ℝ) 1).indicator (fun _ => L) r - + c / w * ((Ioi (1:ℝ)).indicator (fun x => x ^ (-2:ℝ)) r - + (Ioi (1:ℝ)).indicator (fun x => x ^ (-2:ℝ)) (-r)) - -theorem psiMaj_integrable : Integrable (psiMaj c L w) := by - have h1 : Integrable ((Icc (-1:ℝ) 1).indicator (fun _ => L)) := - (integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp)) - have h2 : Integrable ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ))) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) one_pos).integrable_indicator measurableSet_Ioi - have h3 : Integrable (fun r => (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := - h2.comp_neg - exact h1.add ((h2.add h3).const_mul _) - -theorem psi_le_psiMaj (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 2 * w ≤ L) (r : ℝ) : - psiC c L w r ≤ psiMaj c L w r := by - have hw0 : 0 < w := by linarith - have hc0 : 0 ≤ c := le_trans (by norm_num) hc - have hind : ∀ s : ℝ, 0 ≤ (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) s := fun s => - Set.indicator_nonneg (fun x hx => Real.rpow_nonneg (le_trans zero_le_one (le_of_lt hx)) _) _ - unfold psiMaj - by_cases h : r ∈ Icc (-1:ℝ) 1 - · rw [Set.indicator_of_mem h] - have := psi_le_L hc hw hwL r - nlinarith [hind r, hind (-r), div_nonneg hc0 hw0.le] - · rw [Set.indicator_of_notMem h, zero_add] - rw [mem_Icc, not_and_or, not_le, not_le] at h - rcases h with h | h - · -- r < -1 - have hr : 0 < -r := by linarith - rw [Set.indicator_of_notMem (show r ∉ Ioi (1:ℝ) by simp; linarith), - Set.indicator_of_mem (show -r ∈ Ioi (1:ℝ) by simp; linarith), zero_add] - have := psi_le_rpow_neg_two hc hw hwL hr - rw [← psi_abs, abs_of_neg (by linarith)] - exact this - · -- 1 < r - have hr : 0 < r := by linarith - rw [Set.indicator_of_mem (show r ∈ Ioi (1:ℝ) from h), - Set.indicator_of_notMem (show -r ∉ Ioi (1:ℝ) by simp; linarith), add_zero] - exact psi_le_rpow_neg_two hc hw hwL hr - -/-! ### [eq:psiints]. We record upper bounds — every downstream citation of [eq:psiints] in §5 is -"≪ log L" or "≤ 8L". (Paper: "a direct computation (split at |r| = 2/L and |r| = c_ϱ/2w; note -c_ϱ L/4w ≥ 1 by [eq:wrange]) gives Ψ₀ = 4 + 2 log(c_ϱ L/4w), ∫ψ²|r| = 8 + 8 log(c_ϱ L/4w), -∫ψ² ≤ 8L".) -/ - -/-- Constants for [eq:psiints]: A := 2/L ≤ B := c_ϱ/(2w) ("note c_ϱ L/4w ≥ 1 by -[eq:wrange]"), B/A = c_ϱ L/(4w). -/ -theorem psiints_consts (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - 0 < 2 / L ∧ 0 < c / (2 * w) ∧ 2 / L ≤ c / (2 * w) ∧ - (c / (2 * w)) / (2 / L) = c * L / (4 * w) := by - have hc := hc - have hL : 0 < L := by linarith - have hw0 : 0 < w := by linarith - refine ⟨by positivity, by positivity, ?_, ?_⟩ - · rw [div_le_div_iff₀ hL (by positivity)]; nlinarith - · field_simp; ring - -/-- On (0, ∞), ψ is dominated by the three-piece majorant L·1_{(0,A]} + (2/r)·1_{(A,B]} + -(c_ϱ/w) r⁻²·1_{(B,∞)} (in fact with equality; ≤ is all we use). -/ -theorem indicator_psi_le (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) (r : ℝ) : - (Ioi (0:ℝ)).indicator (psiC c L w) r - ≤ (Ioc 0 (2 / L)).indicator (fun _ => L) r - + (Ioc (2 / L) (c / (2 * w))).indicator (fun x => 2 * x⁻¹) r - + (Ioi (c / (2 * w))).indicator (fun x => c / w * x ^ (-2:ℝ)) r := by - obtain ⟨hA, hB, hAB, -⟩ := psiints_consts hc hw hwL - have hwL' : 2 * w ≤ L := by linarith - by_cases hr : r ∈ Ioi (0:ℝ) - · have hr0 : 0 < r := hr - rw [indicator_of_mem hr] - by_cases h1 : r ≤ 2 / L - · rw [indicator_of_mem (show r ∈ Ioc 0 (2 / L) from ⟨hr0, h1⟩), - indicator_of_notMem (show r ∉ Ioc (2 / L) (c / (2 * w)) from - fun h => not_lt.mpr h1 h.1), - indicator_of_notMem (show r ∉ Ioi (c / (2 * w)) from - fun h => not_lt.mpr (h1.trans hAB) h), add_zero, add_zero] - exact psi_le_L hc hw hwL' r - · rw [not_le] at h1 - by_cases h2 : r ≤ c / (2 * w) - · rw [indicator_of_notMem (show r ∉ Ioc 0 (2 / L) from fun h => not_le.mpr h1 h.2), - indicator_of_mem (show r ∈ Ioc (2 / L) (c / (2 * w)) from ⟨h1, h2⟩), - indicator_of_notMem (show r ∉ Ioi (c / (2 * w)) from fun h => not_lt.mpr h2 h), - zero_add, add_zero] - have := psi_mul_abs_le hc hw hwL' r - rw [abs_of_pos hr0] at this - rw [← div_eq_mul_inv, le_div_iff₀ hr0] - exact this - · rw [not_le] at h2 - rw [indicator_of_notMem (show r ∉ Ioc 0 (2 / L) from fun h => not_le.mpr h1 h.2), - indicator_of_notMem (show r ∉ Ioc (2 / L) (c / (2 * w)) from - fun h => not_le.mpr h2 h.2), - indicator_of_mem (show r ∈ Ioi (c / (2 * w)) from h2), zero_add, zero_add] - exact psi_le_rpow_neg_two hc hw hwL' hr0 - · rw [indicator_of_notMem hr] - have hr0 : r ≤ 0 := not_lt.mp hr - rw [indicator_of_notMem (show r ∉ Ioc 0 (2 / L) from fun h => hr h.1), - indicator_of_notMem (show r ∉ Ioc (2 / L) (c / (2 * w)) from - fun h => hr (lt_trans hA h.1)), - indicator_of_notMem (show r ∉ Ioi (c / (2 * w)) from fun h => hr (lt_trans hB h)), - add_zero, add_zero] - -/-- [eq:psiints]: Ψ₀ := ∫₀^∞ ψ(r) dr ≤ 4 + 2 log(c_ϱ L/(4w)) (paper: "="). -/ -theorem integral_psi_Ioi_le (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - ∫ r in Ioi 0, psiC c L w r ≤ 4 + 2 * Real.log (c * L / (4 * w)) := by - obtain ⟨hA, hB, hAB, hBA⟩ := psiints_consts hc hw hwL - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - have hw0 : 0 < w := by linarith - have hc0 : 0 < c := lt_of_lt_of_le (by norm_num) (hc) - set A := 2 / L with hAdef - set B := c / (2 * w) with hBdef - -- integrability of the three pieces - have i1 : IntegrableOn (fun _ : ℝ => L) (Ioc 0 A) := integrableOn_const (by simp) - have i2 : IntegrableOn (fun x : ℝ => 2 * x⁻¹) (Ioc A B) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Ioc_subset_Icc_self - exact continuousOn_const.mul - ((continuousOn_inv₀).mono fun x hx => ne_of_gt (lt_of_lt_of_le hA hx.1)) - have i3 : IntegrableOn (fun x : ℝ => c / w * x ^ (-2:ℝ)) (Ioi B) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) hB).const_mul _ - have I1 := i1.integrable_indicator measurableSet_Ioc - have I2 := i2.integrable_indicator measurableSet_Ioc - have I3 := i3.integrable_indicator measurableSet_Ioi - -- the three integrals - have e1 : ∫ r, (Ioc 0 A).indicator (fun _ => L) r = 2 := by - rw [integral_indicator measurableSet_Ioc, setIntegral_const, measureReal_def, - Real.volume_Ioc, ENNReal.toReal_ofReal (by linarith), smul_eq_mul, sub_zero, hAdef] - field_simp - have e2 : ∫ r, (Ioc A B).indicator (fun x => 2 * x⁻¹) r = 2 * Real.log (B / A) := by - rw [integral_indicator measurableSet_Ioc, ← intervalIntegral.integral_of_le hAB, - intervalIntegral.integral_const_mul, integral_inv] - exact fun h => by - have := (Set.mem_uIcc.mp h); rcases this with h | h <;> linarith [h.1, h.2] - have e3 : ∫ r, (Ioi B).indicator (fun x => c / w * x ^ (-2:ℝ)) r = 2 := by - rw [integral_indicator measurableSet_Ioi, integral_const_mul, - integral_Ioi_rpow_of_lt (by norm_num) hB] - norm_num - rw [Real.rpow_neg_one, hBdef] - field_simp - have I12 : Integrable (fun r => (Ioc 0 A).indicator (fun _ => L) r - + (Ioc A B).indicator (fun x => 2 * x⁻¹) r) := I1.add I2 - calc ∫ r in Ioi 0, psiC c L w r - = ∫ r, (Ioi (0:ℝ)).indicator (psiC c L w) r := (integral_indicator measurableSet_Ioi).symm - _ ≤ ∫ r, ((Ioc 0 A).indicator (fun _ => L) r - + (Ioc A B).indicator (fun x => 2 * x⁻¹) r - + (Ioi B).indicator (fun x => c / w * x ^ (-2:ℝ)) r) := by - refine integral_mono_of_nonneg (Eventually.of_forall fun r => ?_) ((I1.add I2).add I3) - (Eventually.of_forall fun r => indicator_psi_le hc hw hwL r) - exact Set.indicator_nonneg (fun x _ => psi_nonneg hc hw hwL' x) _ - _ = (∫ r, ((Ioc 0 A).indicator (fun _ => L) r + (Ioc A B).indicator (fun x => 2 * x⁻¹) r)) - + ∫ r, (Ioi B).indicator (fun x => c / w * x ^ (-2:ℝ)) r := integral_add I12 I3 - _ = ((∫ r, (Ioc 0 A).indicator (fun _ => L) r) + ∫ r, (Ioc A B).indicator (fun x => 2 * x⁻¹) r) - + ∫ r, (Ioi B).indicator (fun x => c / w * x ^ (-2:ℝ)) r := by - rw [integral_add I1 I2] - _ = 2 + 2 * Real.log (B / A) + 2 := by rw [e1, e2, e3] - _ = 4 + 2 * Real.log (c * L / (4 * w)) := by rw [hBA]; ring - -/-- [eq:psiints]: ∫_ℝ ψ(r)²|r| dr ≤ 8 + 8 log(c_ϱ L/(4w)) (paper: "="): split (0,2/L], -(2/L, c/2w], (c/2w, ∞): ∫₀^∞ ψ² r ≤ L²(2/L)²/2 + 4 log(cL/4w) + (c/w)²/(2(c/2w)²) = 2 + 4 log + 2. -/ -theorem integral_psi_sq_mul_abs_le (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - ∫ r, psiC c L w r ^ 2 * |r| ≤ 8 + 8 * Real.log (c * L / (4 * w)) := by - obtain ⟨hA, hB, hAB, hBA⟩ := psiints_consts hc hw hwL - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - have hw0 : 0 < w := by linarith - have hc0 : 0 < c := lt_of_lt_of_le (by norm_num) (hc) - set A := 2 / L with hAdef - set B := c / (2 * w) with hBdef - have hred : ∫ r, psiC c L w r ^ 2 * |r| = 2 * ∫ r in Ioi 0, psiC c L w r ^ 2 * r := by - have h := integral_comp_abs (f := fun x => psiC c L w x ^ 2 * x) - simp only [psi_abs] at h - exact h - rw [hred] - -- majorant pieces - have i1 : IntegrableOn (fun x : ℝ => L ^ 2 * x) (Ioc 0 A) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Ioc_subset_Icc_self - exact (continuousOn_const.mul continuousOn_id) - have i2 : IntegrableOn (fun x : ℝ => 4 * x⁻¹) (Ioc A B) := by - refine (ContinuousOn.integrableOn_Icc ?_).mono_set Ioc_subset_Icc_self - exact continuousOn_const.mul - ((continuousOn_inv₀).mono fun x hx => ne_of_gt (lt_of_lt_of_le hA hx.1)) - have i3 : IntegrableOn (fun x : ℝ => (c / w) ^ 2 * x ^ (-3:ℝ)) (Ioi B) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) hB).const_mul _ - have I1 := i1.integrable_indicator measurableSet_Ioc - have I2 := i2.integrable_indicator measurableSet_Ioc - have I3 := i3.integrable_indicator measurableSet_Ioi - have I12 : Integrable (fun r => (Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r - + (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r) := I1.add I2 - have I123 : Integrable (fun r => (Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r - + (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r - + (Ioi B).indicator (fun x : ℝ => (c / w) ^ 2 * x ^ (-3:ℝ)) r) := I12.add I3 - have hpt : ∀ r, (Ioi (0:ℝ)).indicator (fun x => psiC c L w x ^ 2 * x) r - ≤ (Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r - + (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r - + (Ioi B).indicator (fun x : ℝ => (c / w) ^ 2 * x ^ (-3:ℝ)) r := by - intro r - have h0 := psi_nonneg hc hw hwL' r - by_cases hr : 0 < r - · rw [indicator_of_mem (show r ∈ Ioi (0:ℝ) from hr)] - by_cases h1 : r ≤ A - · rw [indicator_of_mem (show r ∈ Ioc 0 A from ⟨hr, h1⟩), - indicator_of_notMem (show r ∉ Ioc A B from fun h => not_lt.mpr h1 h.1), - indicator_of_notMem (show r ∉ Ioi B from fun h => not_lt.mpr (h1.trans hAB) h), - add_zero, add_zero] - exact mul_le_mul_of_nonneg_right (pow_le_pow_left₀ h0 (psi_le_L hc hw hwL' r) 2) hr.le - · have h1' : A < r := not_le.mp h1 - by_cases h2 : r ≤ B - · rw [indicator_of_notMem (show r ∉ Ioc 0 A from fun h => h1 h.2), - indicator_of_mem (show r ∈ Ioc A B from ⟨h1', h2⟩), - indicator_of_notMem (show r ∉ Ioi B from fun h => not_lt.mpr h2 h), zero_add, add_zero] - have h := psi_mul_abs_le hc hw hwL' r - rw [abs_of_pos hr] at h - -- ψ² r = (ψ r)·ψ ≤ 2 ψ ≤ 2 · (2/r) - have h3 : psiC c L w r ≤ 2 * r⁻¹ := by - rw [← div_eq_mul_inv, le_div_iff₀ hr]; exact h - calc psiC c L w r ^ 2 * r = (psiC c L w r * r) * psiC c L w r := by ring - _ ≤ 2 * (2 * r⁻¹) := mul_le_mul h h3 h0 (by norm_num) - _ = 4 * r⁻¹ := by ring - · have h2' : B < r := not_le.mp h2 - rw [indicator_of_notMem (show r ∉ Ioc 0 A from fun h => h1 h.2), - indicator_of_notMem (show r ∉ Ioc A B from fun h => h2 h.2), - indicator_of_mem (show r ∈ Ioi B from h2'), zero_add, zero_add] - have h := psi_le_rpow_neg_two hc hw hwL' hr - have hcw : 0 ≤ c / w * r ^ (-2:ℝ) := by positivity - calc psiC c L w r ^ 2 * r ≤ (c / w * r ^ (-2:ℝ)) ^ 2 * r := by - exact mul_le_mul_of_nonneg_right (pow_le_pow_left₀ h0 h 2) hr.le - _ = (c / w) ^ 2 * r ^ (-3:ℝ) := by - have hr' : r ≠ 0 := hr.ne' - rw [mul_pow, ← Real.rpow_natCast (r ^ (-2:ℝ)) 2, ← Real.rpow_mul hr.le] - norm_num - field_simp - · rw [indicator_of_notMem (show r ∉ Ioi (0:ℝ) from hr), - indicator_of_notMem (show r ∉ Ioc 0 A from fun h => hr h.1), - indicator_of_notMem (show r ∉ Ioc A B from fun h => hr (lt_trans hA h.1)), - indicator_of_notMem (show r ∉ Ioi B from fun h => hr (lt_trans hB h)), add_zero, add_zero] - -- the three integrals - have e1 : ∫ r, (Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r = 2 := by - rw [integral_indicator measurableSet_Ioc, ← intervalIntegral.integral_of_le hA.le, - intervalIntegral.integral_const_mul, integral_id, hAdef] - field_simp - ring - have e2 : ∫ r, (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r = 4 * Real.log (B / A) := by - rw [integral_indicator measurableSet_Ioc, ← intervalIntegral.integral_of_le hAB, - intervalIntegral.integral_const_mul, integral_inv] - exact fun h => by - have := (Set.mem_uIcc.mp h); rcases this with h | h <;> linarith [h.1, h.2] - have e3 : ∫ r, (Ioi B).indicator (fun x : ℝ => (c / w) ^ 2 * x ^ (-3:ℝ)) r = 2 := by - rw [integral_indicator measurableSet_Ioi, integral_const_mul, - integral_Ioi_rpow_of_lt (by norm_num) hB] - norm_num - rw [hBdef] - field_simp - calc 2 * ∫ r in Ioi 0, psiC c L w r ^ 2 * r - = 2 * ∫ r, (Ioi (0:ℝ)).indicator (fun x => psiC c L w x ^ 2 * x) r := by - rw [integral_indicator measurableSet_Ioi] - _ ≤ 2 * ∫ r, ((Ioc 0 A).indicator (fun x : ℝ => L ^ 2 * x) r - + (Ioc A B).indicator (fun x : ℝ => 4 * x⁻¹) r - + (Ioi B).indicator (fun x : ℝ => (c / w) ^ 2 * x ^ (-3:ℝ)) r) := - mul_le_mul_of_nonneg_left (integral_mono_of_nonneg (Eventually.of_forall fun r => - Set.indicator_nonneg (fun x hx => mul_nonneg (sq_nonneg _) (le_of_lt hx)) _) I123 - (Eventually.of_forall hpt)) (by norm_num) - _ = 2 * (2 + 4 * Real.log (B / A) + 2) := by rw [integral_add I12 I3, integral_add I1 I2, e1, e2, e3] - _ = 8 + 8 * Real.log (c * L / (4 * w)) := by rw [hBA]; ring - -/-- [eq:psiints]: "∫_ℝ ψ² ≤ 8L". Uses only ψ ≤ min(L, 2/|r|): -∫ = 2∫₀^∞ ≤ 2(∫₀^{2/L} L² + ∫_{2/L}^∞ 4r⁻²) = 2(2L+2L). -/ -theorem integral_psi_sq_le (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - ∫ r, psiC c L w r ^ 2 ≤ 8 * L := by - obtain ⟨hA, -, -, -⟩ := psiints_consts hc hw hwL - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - set A := 2 / L with hAdef - have hred : ∫ r, psiC c L w r ^ 2 = 2 * ∫ r in Ioi 0, psiC c L w r ^ 2 := by - have h := integral_comp_abs (f := fun x => psiC c L w x ^ 2) - simp only [psi_abs] at h - exact h - rw [hred] - have i1 : IntegrableOn (fun _ : ℝ => L ^ 2) (Ioc 0 A) := integrableOn_const (by simp) - have i2 : IntegrableOn (fun x : ℝ => 4 * x ^ (-2:ℝ)) (Ioi A) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) hA).const_mul _ - have I1 := i1.integrable_indicator measurableSet_Ioc - have I2 := i2.integrable_indicator measurableSet_Ioi - have I12 : Integrable (fun r => (Ioc 0 A).indicator (fun _ : ℝ => L ^ 2) r - + (Ioi A).indicator (fun x : ℝ => 4 * x ^ (-2:ℝ)) r) := I1.add I2 - have hpt : ∀ r, (Ioi (0:ℝ)).indicator (fun x => psiC c L w x ^ 2) r - ≤ (Ioc 0 A).indicator (fun _ : ℝ => L ^ 2) r + (Ioi A).indicator (fun x : ℝ => 4 * x ^ (-2:ℝ)) r := by - intro r - have h0 := psi_nonneg hc hw hwL' r - by_cases hr : 0 < r - · rw [indicator_of_mem (show r ∈ Ioi (0:ℝ) from hr)] - by_cases h1 : r ≤ A - · rw [indicator_of_mem (show r ∈ Ioc 0 A from ⟨hr, h1⟩), - indicator_of_notMem (show r ∉ Ioi A from fun h => not_lt.mpr h1 h), add_zero] - exact pow_le_pow_left₀ h0 (psi_le_L hc hw hwL' r) 2 - · have h1' : A < r := not_le.mp h1 - rw [indicator_of_notMem (show r ∉ Ioc 0 A from fun h => h1 h.2), - indicator_of_mem (show r ∈ Ioi A from h1'), zero_add] - have h := psi_mul_abs_le hc hw hwL' r - rw [abs_of_pos hr] at h - have h2 : psiC c L w r ≤ 2 * r⁻¹ := by - rw [← div_eq_mul_inv, le_div_iff₀ hr]; exact h - calc psiC c L w r ^ 2 ≤ (2 * r⁻¹) ^ 2 := pow_le_pow_left₀ h0 h2 2 - _ = 4 * r ^ (-2:ℝ) := by - rw [Real.rpow_neg hr.le, Real.rpow_two]; ring - · rw [indicator_of_notMem (show r ∉ Ioi (0:ℝ) from hr), - indicator_of_notMem (show r ∉ Ioc 0 A from fun h => hr h.1), - indicator_of_notMem (show r ∉ Ioi A from fun h => hr (lt_trans hA h)), add_zero] - have e1 : ∫ r, (Ioc 0 A).indicator (fun _ : ℝ => L ^ 2) r = 2 * L := by - rw [integral_indicator measurableSet_Ioc, setIntegral_const, measureReal_def, Real.volume_Ioc, - ENNReal.toReal_ofReal (by linarith), smul_eq_mul, sub_zero, hAdef] - field_simp - have e2 : ∫ r, (Ioi A).indicator (fun x : ℝ => 4 * x ^ (-2:ℝ)) r = 2 * L := by - rw [integral_indicator measurableSet_Ioi, integral_const_mul, - integral_Ioi_rpow_of_lt (by norm_num) hA] - norm_num - rw [Real.rpow_neg_one, hAdef] - field_simp - ring - calc 2 * ∫ r in Ioi 0, psiC c L w r ^ 2 - = 2 * ∫ r, (Ioi (0:ℝ)).indicator (fun x => psiC c L w x ^ 2) r := by - rw [integral_indicator measurableSet_Ioi] - _ ≤ 2 * ∫ r, ((Ioc 0 A).indicator (fun _ : ℝ => L ^ 2) r - + (Ioi A).indicator (fun x : ℝ => 4 * x ^ (-2:ℝ)) r) := - mul_le_mul_of_nonneg_left (integral_mono_of_nonneg - (Eventually.of_forall fun r => Set.indicator_nonneg (fun x _ => sq_nonneg _) _) I12 - (Eventually.of_forall hpt)) (by norm_num) - _ = 2 * (2 * L + 2 * L) := by rw [integral_add I1 I2, e1, e2] - _ = 8 * L := by ring - -theorem psi_integrable (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - Integrable (psiC c L w) := by - have hwL' : 2 * w ≤ L := by linarith - refine (psiMaj_integrable (c := c) (L := L) (w := w)).mono' - psi_measurable.aestronglyMeasurable (Eventually.of_forall fun r => ?_) - rw [Real.norm_of_nonneg (psi_nonneg hc hw hwL' r)] - exact psi_le_psiMaj hc hw hwL' r - -theorem psi_sq_integrable (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - Integrable (fun r => psiC c L w r ^ 2) := by - have hwL' : 2 * w ≤ L := by linarith - refine ((psi_integrable hc hw hwL).const_mul L).mono' - (psi_measurable.pow_const 2).aestronglyMeasurable (Eventually.of_forall fun r => ?_) - have h0 := psi_nonneg hc hw hwL' r - have h1 := psi_le_L hc hw hwL' r - rw [Real.norm_of_nonneg (sq_nonneg _)] - nlinarith - -theorem psi_sq_mul_abs_integrable (hc : 4 ≤ c) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - Integrable (fun r => psiC c L w r ^ 2 * |r|) := by - have hwL' : 2 * w ≤ L := by linarith - refine ((psi_integrable hc hw hwL).const_mul 2).mono' - ((psi_measurable.pow_const 2).mul continuous_abs.measurable).aestronglyMeasurable - (Eventually.of_forall fun r => ?_) - have h0 := psi_nonneg hc hw hwL' r - have h1 := psi_mul_abs_le hc hw hwL' r - rw [Real.norm_of_nonneg (by positivity)] - nlinarith - -/-! #### Generic moment bounds from |F| ≤ ψ-type information -/ - -/-- If |F| ≤ ψ pointwise then ∫ F²|r| ≤ ∫ ψ²|r| ≤ 8 + 8 log(c_ϱ L/4w). -/ -theorem integral_sq_mul_abs_le_of_le_psi (hc : 4 ≤ c) (hw : 1 ≤ w) - (hwL : 8 * w ≤ L) {F : ℝ → ℝ} (hF : ∀ r, |F r| ≤ psiC c L w r) : - ∫ r, F r ^ 2 * |r| ≤ 8 + 8 * Real.log (c * L / (4 * w)) := by - refine le_trans (integral_mono_of_nonneg (Eventually.of_forall fun r => by positivity) - (psi_sq_mul_abs_integrable hc hw hwL) (Eventually.of_forall fun r => ?_)) - (integral_psi_sq_mul_abs_le hc hw hwL) - have h : F r ^ 2 ≤ psiC c L w r ^ 2 := by - rw [← sq_abs (F r)] - exact pow_le_pow_left₀ (abs_nonneg _) (hF r) 2 - exact mul_le_mul_of_nonneg_right h (abs_nonneg r) - -/-- The integrable majorant for the r²-moments: 4 on [−1,1] and C²|r|⁻² outside. -/ -noncomputable def momMaj (C : ℝ) (r : ℝ) : ℝ := - (Icc (-1:ℝ) 1).indicator (fun _ => (4:ℝ)) r - + C ^ 2 * ((Ioi (1:ℝ)).indicator (fun x => x ^ (-2:ℝ)) r - + (Ioi (1:ℝ)).indicator (fun x => x ^ (-2:ℝ)) (-r)) - -theorem momMaj_integrable (C : ℝ) : Integrable (momMaj C) := by - have h1 : Integrable ((Icc (-1:ℝ) 1).indicator (fun _ => (4:ℝ))) := - (integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp)) - have h2 : Integrable ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ))) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) one_pos).integrable_indicator measurableSet_Ioi - have h3 : Integrable (fun r => (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := - h2.comp_neg - exact h1.add ((h2.add h3).const_mul _) - -theorem integral_momMaj (C : ℝ) : ∫ r, momMaj C r = 8 + 2 * C ^ 2 := by - have h1 : Integrable ((Icc (-1:ℝ) 1).indicator (fun _ => (4:ℝ))) := - (integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp)) - have h2 : Integrable ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ))) := - (integrableOn_Ioi_rpow_of_lt (by norm_num) one_pos).integrable_indicator measurableSet_Ioi - have h3 : Integrable (fun r => (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := - h2.comp_neg - have e1 : ∫ r, (Icc (-1:ℝ) 1).indicator (fun _ => (4:ℝ)) r = 8 := by - rw [integral_indicator measurableSet_Icc, setIntegral_const, measureReal_def, - Real.volume_Icc, ENNReal.toReal_ofReal (by norm_num), smul_eq_mul] - norm_num - have e2 : ∫ r, (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r = 1 := by - rw [integral_indicator measurableSet_Ioi, integral_Ioi_rpow_of_lt (by norm_num) one_pos] - norm_num - have e3 : ∫ r, (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r) = 1 := by - have hneg := MeasureTheory.integral_neg_eq_self - ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ))) volume - rw [hneg] - exact e2 - have h23 : Integrable (fun r => (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r - + (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := h2.add h3 - unfold momMaj - calc ∫ r, ((Icc (-1:ℝ) 1).indicator (fun _ => (4:ℝ)) r - + C ^ 2 * ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r - + (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r))) - = (∫ r, (Icc (-1:ℝ) 1).indicator (fun _ => (4:ℝ)) r) - + ∫ r, C ^ 2 * ((Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r - + (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := - integral_add h1 (h23.const_mul _) - _ = 8 + C ^ 2 * ((∫ r, (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) r) - + ∫ r, (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) (-r)) := by - rw [e1, integral_const_mul] - congr 2 - exact integral_add h2 h3 - _ = 8 + 2 * C ^ 2 := by rw [e2, e3]; ring - -/-- Pointwise: |F(r)|·|r| ≤ 2 and |F(r)|·r² ≤ C give F(r)² r² ≤ momMaj C r. -/ -theorem sq_mul_sq_le_momMaj {F : ℝ → ℝ} {C : ℝ} (_hC : 0 ≤ C) - (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) (r : ℝ) : - F r ^ 2 * r ^ 2 ≤ momMaj C r := by - have hind : ∀ s : ℝ, 0 ≤ (Ioi (1:ℝ)).indicator (fun x : ℝ => x ^ (-2:ℝ)) s := fun s => - Set.indicator_nonneg (fun x hx => Real.rpow_nonneg (le_trans zero_le_one (le_of_lt hx)) _) _ - have hsq : ∀ s : ℝ, 1 < s → F r ^ 2 * s ^ 2 * s ^ 2 ≤ C ^ 2 → F r ^ 2 * s ^ 2 ≤ C ^ 2 * s ^ (-2:ℝ) := by - intro s hs h - have hs0 : 0 < s := by linarith - rw [Real.rpow_neg hs0.le, show (2:ℝ) = ((2:ℕ):ℝ) by norm_num, Real.rpow_natCast, - ← div_eq_mul_inv, le_div_iff₀ (by positivity)] - exact h - unfold momMaj - by_cases h : r ∈ Icc (-1:ℝ) 1 - · rw [Set.indicator_of_mem h] - have hb : F r ^ 2 * r ^ 2 ≤ 4 := by - have := h1 r - have h0 : 0 ≤ |F r| * |r| := by positivity - calc F r ^ 2 * r ^ 2 = (|F r| * |r|) ^ 2 := by rw [mul_pow, sq_abs, sq_abs] - _ ≤ 2 ^ 2 := pow_le_pow_left₀ h0 this 2 - _ = 4 := by norm_num - nlinarith [hind r, hind (-r), sq_nonneg C] - · rw [Set.indicator_of_notMem h, zero_add] - rw [mem_Icc, not_and_or, not_le, not_le] at h - have hFsq : F r ^ 2 * r ^ 2 * r ^ 2 ≤ C ^ 2 := by - have := h2 r - have h0 : 0 ≤ |F r| * r ^ 2 := by positivity - calc F r ^ 2 * r ^ 2 * r ^ 2 = (|F r| * r ^ 2) ^ 2 := by rw [mul_pow, sq_abs]; ring - _ ≤ C ^ 2 := pow_le_pow_left₀ h0 this 2 - rcases h with h | h - · -- r < -1 - rw [Set.indicator_of_notMem (show r ∉ Ioi (1:ℝ) by simp; linarith), - Set.indicator_of_mem (show -r ∈ Ioi (1:ℝ) by simp; linarith), zero_add] - have := hsq (-r) (by linarith) (by simpa using hFsq) - simpa using this - · -- 1 < r - rw [Set.indicator_of_mem (show r ∈ Ioi (1:ℝ) from h), - Set.indicator_of_notMem (show -r ∉ Ioi (1:ℝ) by simp; linarith), add_zero] - exact hsq r h hFsq - -theorem integrable_sq_mul_sq_of_bounds {F : ℝ → ℝ} {C : ℝ} (hFc : Continuous F) - (hC : 0 ≤ C) (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) : - Integrable (fun r => F r ^ 2 * r ^ 2) := by - refine (momMaj_integrable C).mono' (by fun_prop) (Eventually.of_forall fun r => ?_) - rw [Real.norm_of_nonneg (by positivity)] - exact sq_mul_sq_le_momMaj hC h1 h2 r - -theorem integral_sq_mul_sq_le_of_bounds {F : ℝ → ℝ} {C : ℝ} - (hC : 0 ≤ C) (h1 : ∀ r, |F r| * |r| ≤ 2) (h2 : ∀ r, |F r| * r ^ 2 ≤ C) : - ∫ r, F r ^ 2 * r ^ 2 ≤ 8 + 2 * C ^ 2 := by - rw [← integral_momMaj C] - exact integral_mono_of_nonneg (Eventually.of_forall fun r => by positivity) - (momMaj_integrable C) (Eventually.of_forall fun r => sq_mul_sq_le_momMaj hC h1 h2 r) - - -end PsiC -end Zeta23 - -end diff --git a/zeta23/Zeta23/ThmD/Traces.lean b/zeta23/Zeta23/ThmD/Traces.lean index 0bfd1870e7..82678acfe5 100644 --- a/zeta23/Zeta23/ThmD/Traces.lean +++ b/zeta23/Zeta23/ThmD/Traces.lean @@ -34,35 +34,19 @@ structure DataD (P : Params) extends PrimeSide.Data P where variable {P : Params} (D : DataD P) -/-- Hypotheses of the window-general [thm:traces] assembly (paper §7.1 "Propositions 5.1–5.5 hold -verbatim" + the partial-summation step). All fields except ab_range and sumJ are verbatim copies -of Zeta23.PrimeSide.Facts (window-generic); see that structure for the paper labels. -/ -structure FactsD : Prop where - lam_pos : 0 < P.lam - lam_le_one : P.lam ≤ 1 - one_le_w : 1 ≤ P.w +/-- Window-general `[thm:traces]` hypotheses over an arbitrary density log `ell1f ≥ l` +(extends `PrimeSide.TraceFactsBase`; instantiated at `ell1` for `ζ` and `ell1q q` for `L(s, χ)`). -/ +structure FactsDG (ell1f : ℝ → ℝ) (D : DataD P) : Prop + extends toTraceFactsBase : PrimeSide.TraceFactsBase ell1f D.toData where /-- window-general [eq:abJ] ranges: 1/2 ≤ b ≤ a ≤ 1 and 0 ≤ J ≤ 1 eventually. -/ ab_range : ∀ᶠ T in atTop, 1 / 2 ≤ D.bT T ∧ D.bT T ≤ D.aT T ∧ D.aT T ≤ 1 ∧ 0 ≤ D.JT T ∧ D.JT T ≤ 1 - rvm : EvBound (fun T => D.Ncnt T - T * ell1 T / (2 * π)) l - muints2 : EvBound (fun T => D.intMu2 T - T * ell1 T ^ 2 / (4 * π ^ 2)) - (fun T => T * ell1 T ^ 2 / (4 * π ^ 2) / l T ^ 2) - prop_trace : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.L T * Real.sqrt (P.X T)) - lem_ends : EvBound (fun T => D.trG2 T - D.Mtot T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) - Msplit : ∀ᶠ T in atTop, D.Mtot T = - D.Mmumu T + D.MPP T + 2 * D.MmuP T + 2 * D.MmuPi T + 2 * D.MPPi T + D.MPiPi T - prop_mumu : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) - (fun T => l T ^ 2 * Real.log (P.L T)) - prop_PP : EvBound (fun T => D.MPP T - T / π * D.sumL2g T) (fun T => P.L T ^ 2 * P.X T) /-- the §7.1 partial-summation step in place of the sandwich: Σ_{n≤X} a_n² g(y_n) = (L³/2)·J_T + O(L²). -/ sumJ : EvBound (fun T => D.sumL2g T - P.L T ^ 3 / 2 * D.JT T) (fun T => P.L T ^ 2) - cross_muP : EvBound D.MmuP (fun T => l T * Real.sqrt (P.X T)) - cross_muPi : EvBound D.MmuPi (fun T => l T * P.L T * Real.sqrt (P.X T)) - cross_PPi : EvBound D.MPPi (fun T => P.L T * P.X T) - cross_PiPi : EvBound D.MPiPi (fun T => P.L T * P.X T / T) + +/-- The `ζ`-instance of `FactsDG` (`ell1f = ell1`). -/ +abbrev FactsD (D : DataD P) : Prop := FactsDG ell1 D /-- The pointwise inequality behind the D-version of [eq:tr2] ([eq:ratio-general] main term): with the window moments b, J symbolic and the partial-summation input |S − L³J/2| ≤ Cs·L² @@ -70,7 +54,7 @@ in place of the flat-top sandwich, |G2 − (TL/2π)(bℓ² + L²J)| ≤ C·E·(T Simpler than PrimeSide.tr2_pointwise: no (b−1)-collapse is needed since b stays in the main term. -/ theorem tr2D_pointwise (T L ℓ lT X E S I2 b J G2 w CR Cμ Cs : ℝ) (hT : 1 ≤ T) (hL : 1 ≤ L) (hl : 1 ≤ lT) (hlog : 1 ≤ Real.log lT) (hX : 1 ≤ X) - (hℓl : lT ≤ ℓ) (hLl : L ≤ lT) (hw : 1 ≤ w) (hL2w : 2 * w ≤ L) + (hℓl : lT ≤ ℓ) (hLl : L ≤ lT) (hw : 1 ≤ w) (_hL2w : 2 * w ≤ L) (hb : 1 / 2 ≤ b) (hb1 : b ≤ 1) (hJ0 : 0 ≤ J) (hE0 : 0 ≤ E) (hEw : w / L ≤ E) (hEmid : (lT ^ 2 + X) * Real.log lT / (T * lT) ≤ E) (hCR : 0 ≤ CR) (hCμ : 0 ≤ Cμ) (hCs : 0 ≤ Cs) @@ -80,103 +64,20 @@ theorem tr2D_pointwise (T L ℓ lT X E S I2 b J G2 w CR Cμ Cs : ℝ) |G2 - T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J)| ≤ (4 * π * CR + 2 * Cμ + 4 * Cs) * (E * (T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J))) := by have hπ : 0 < π := Real.pi_pos - have hT0 : 0 < T := by linarith - have hL0 : 0 < L := by linarith - have hl0 : 0 < lT := by linarith - have hℓ0 : 0 < ℓ := by linarith - have hℓ1 : 1 ≤ ℓ := le_trans hl hℓl - have hlog0 : 0 ≤ Real.log lT := by linarith - have hX0 : 0 ≤ X := by linarith - have hw0 : 0 ≤ w := by linarith - have hb0 : 0 < b := by linarith - set M₂ := T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J) with hM₂def - -- the ℓ²-piece lower bound: TLℓ²/(4π) ≤ M₂ - have hMa : T * L * ℓ ^ 2 / (4 * π) ≤ M₂ := by - rw [hM₂def] - have h1 : T * L * ℓ ^ 2 / (4 * π) = T * L / (2 * π) * (ℓ ^ 2 / 2) := by ring + have hMa : T * L * ℓ ^ 2 / (2 * π * 2) ≤ T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J) := by + have h1 : T * L * ℓ ^ 2 / (2 * π * 2) = T * L / (2 * π) * (ℓ ^ 2 / 2) := by ring rw [h1] apply mul_le_mul_of_nonneg_left _ (by positivity) nlinarith [sq_nonneg ℓ, sq_nonneg L] - have hM0 : 0 ≤ M₂ := le_trans (by positivity) hMa - have hEM0 : 0 ≤ E * M₂ := mul_nonneg hE0 hM0 - have hE_L : 1 / L ≤ E := le_trans (by gcongr) hEw - have hE_l2 : 1 / lT ^ 2 ≤ E := by - refine le_trans ?_ hE_L - rw [div_le_div_iff₀ (by positivity) hL0, one_mul, one_mul] - calc L ≤ lT := hLl - _ = lT * 1 := (mul_one _).symm - _ ≤ lT * lT := by gcongr - _ = lT ^ 2 := (sq lT).symm - -- piece A: the lem_ends-type remainder - have hA : L * lT * Real.log lT * (lT ^ 2 + X) ≤ 4 * π * (E * M₂) := by - have h1 : (lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (4 * π)) ≤ E * M₂ := - mul_le_mul hEmid hMa (by positivity) hE0 - have h2 : 4 * π * ((lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (4 * π))) - = L * Real.log lT * (lT ^ 2 + X) * ℓ ^ 2 / lT := by - field_simp - have h3 : L * lT * Real.log lT * (lT ^ 2 + X) - ≤ L * Real.log lT * (lT ^ 2 + X) * ℓ ^ 2 / lT := by - rw [le_div_iff₀ hl0] - have hll : lT * lT ≤ ℓ ^ 2 := by - rw [sq] - exact mul_le_mul hℓl hℓl hl0.le hℓ0.le - have h0 : 0 ≤ L * Real.log lT * (lT ^ 2 + X) := by positivity - calc L * lT * Real.log lT * (lT ^ 2 + X) * lT - = L * Real.log lT * (lT ^ 2 + X) * (lT * lT) := by ring - _ ≤ L * Real.log lT * (lT ^ 2 + X) * ℓ ^ 2 := by gcongr - calc L * lT * Real.log lT * (lT ^ 2 + X) - ≤ L * Real.log lT * (lT ^ 2 + X) * ℓ ^ 2 / lT := h3 - _ = 4 * π * ((lT ^ 2 + X) * Real.log lT / (T * lT) * (T * L * ℓ ^ 2 / (4 * π))) := h2.symm - _ ≤ 4 * π * (E * M₂) := by gcongr - -- piece B1: the μ-moment remainder - have hB1 : |2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2))| ≤ 2 * Cμ * (E * M₂) := by - rw [abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ 2 * π * b * L)] - calc 2 * π * b * L * |I2 - T * ℓ ^ 2 / (4 * π ^ 2)| - ≤ 2 * π * 1 * L * (Cμ * (T * ℓ ^ 2 / (4 * π ^ 2) / lT ^ 2)) := by gcongr - _ = 2 * Cμ * ((1 / lT ^ 2) * (T * L * ℓ ^ 2 / (4 * π))) := by - field_simp - try ring - _ ≤ 2 * Cμ * ((1 / lT ^ 2) * M₂) := by - have h0 : (0:ℝ) ≤ 1 / lT ^ 2 := by positivity - gcongr - _ ≤ 2 * Cμ * (E * M₂) := by gcongr - -- piece B3: the partial-summation remainder - have hB3 : |T / π * (S - L ^ 3 * J / 2)| ≤ 4 * Cs * (E * M₂) := by - rw [abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ T / π)] - calc T / π * |S - L ^ 3 * J / 2| ≤ T / π * (Cs * L ^ 2) := by gcongr - _ = 4 * Cs * ((L / ℓ ^ 2) * (T * L * ℓ ^ 2 / (4 * π))) := by - field_simp - try ring - _ ≤ 4 * Cs * ((1 / L) * M₂) := by - have hLℓ2 : L / ℓ ^ 2 ≤ 1 / L := by - rw [div_le_div_iff₀ (by positivity) hL0] - have hLℓ : L ≤ ℓ := le_trans hLl hℓl - nlinarith - have h0 : (0:ℝ) ≤ L / ℓ ^ 2 := by positivity - apply mul_le_mul_of_nonneg_left _ (by positivity) - calc L / ℓ ^ 2 * (T * L * ℓ ^ 2 / (4 * π)) ≤ 1 / L * (T * L * ℓ ^ 2 / (4 * π)) := by - gcongr - _ ≤ 1 / L * M₂ := by - have : (0:ℝ) ≤ 1 / L := by positivity - gcongr - _ ≤ 4 * Cs * (E * M₂) := by gcongr - -- assemble - have hsplit : (2 * π * b * L * I2 + T / π * S) - M₂ - = 2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2)) + T / π * (S - L ^ 3 * J / 2) := by - rw [hM₂def] - field_simp - ring - calc |G2 - M₂| - ≤ |G2 - (2 * π * b * L * I2 + T / π * S)| - + |(2 * π * b * L * I2 + T / π * S) - M₂| := abs_sub_le _ _ _ - _ ≤ CR * (L * lT * Real.log lT * (lT ^ 2 + X)) - + (|2 * π * b * L * (I2 - T * ℓ ^ 2 / (4 * π ^ 2))| + |T / π * (S - L ^ 3 * J / 2)|) := by - gcongr - rw [hsplit] - exact abs_add_le _ _ - _ ≤ CR * (4 * π * (E * M₂)) + (2 * Cμ * (E * M₂) + 4 * Cs * (E * M₂)) := by - gcongr - _ = (4 * π * CR + 2 * Cμ + 4 * Cs) * (E * M₂) := by ring + have hcore := PrimeSide.tr2_pointwise_of T L ℓ lT X E S (L ^ 3 * J / 2) I2 b + (T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J)) G2 w 2 CR Cμ Cs + hT hL hl hlog hX hℓl hLl hw (by norm_num) (by linarith) hb1 hMa + hE0 hEw hEmid hCR hCμ hCs hR hμ hSJ + have hm : b * (T * L * ℓ ^ 2 / (2 * π)) + T / π * (L ^ 3 * J / 2) + = T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J) := by ring + have hc : 2 * π * 2 * CR + 2 * Cμ + 2 * 2 * Cs = 4 * π * CR + 2 * Cμ + 4 * Cs := by ring + rw [hm, hc] at hcore + exact hcore /-- from `f → 0`: eventually `C * f T ≤ 1/2` (used for the `Cᵢ·𝓔_T ≤ 1/2` side conditions of `ratioD_pointwise`, here and in ThmDE.Traces). -/ @@ -186,7 +87,6 @@ theorem eventually_const_mul_le_half {f : ℝ → ℝ} (hf : Tendsto f atTop (nh rw [lt_div_iff₀ (by positivity)] at hT linarith -set_option maxHeartbeats 800000 in /-- The pointwise inequality behind [eq:ratio-general], every quantity a real variable; the identity cRatio(L/ℓ; a, b, J)·N · (TL/2π)(bℓ² + L²J) = (aL)²N · Tℓ/2π is where the window-general constant is checked (mirrors PrimeSide.ratio_pointwise; a stays on tr G̃). -/ @@ -206,285 +106,115 @@ theorem ratioD_pointwise (T L ℓ lT E N G G2 A aa b J C₁ C₂ : ℝ) have hℓ0 : 0 < ℓ := by linarith have ha0 : 0 < aa := by linarith have hb0 : 0 < b := by linarith - set M₂ := T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J) with hM₂def have hden : 0 < b * ℓ ^ 2 + L ^ 2 * J := by - have h1' : 0 < b * ℓ ^ 2 := by positivity + have : 0 < b * ℓ ^ 2 := by positivity nlinarith [mul_nonneg (sq_nonneg L) hJ0] - have hM0 : 0 < M₂ := by - rw [hM₂def] - positivity - set Φ₀ := cRatio (L / ℓ) aa b J * N with hΦ₀def + have hM0 : 0 < T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J) := by positivity have hdenR : 0 < b + (L / ℓ) ^ 2 * J := by have : 0 ≤ (L / ℓ) ^ 2 * J := by positivity linarith - have hF0 : 0 < cRatio (L / ℓ) aa b J := by - unfold cRatio - apply div_pos (by positivity) hdenR - have hΦ0 : 0 < Φ₀ := mul_pos hF0 hN0 - have key : Φ₀ * M₂ = (aa * L) ^ 2 * N * (T * ℓ / (2 * π)) := by - rw [hΦ₀def, hM₂def] - unfold cRatio - field_simp - try ring - set α := G - aa * L * N with hαdef - set bb := G2 - M₂ with hbbdef - set δ := N - T * ℓ / (2 * π) with hδdef - have hbb : |bb| ≤ C₂ * (E * M₂) := h2 - have hG2low : M₂ / 2 ≤ G2 := by - have hx1 : -(C₂ * (E * M₂)) ≤ bb := (abs_le.mp hbb).1 - have hx2 : C₂ * (E * M₂) ≤ 1 / 2 * M₂ := by - rw [← mul_assoc] - exact mul_le_mul_of_nonneg_right hs2 hM0.le - have hx3 : bb = G2 - M₂ := hbbdef - linarith - have hG2pos : 0 < G2 := lt_of_lt_of_le (by positivity) hG2low - have hid : G ^ 2 - Φ₀ * G2 = (aa * L) ^ 2 * N * δ + 2 * (aa * L * N) * α + α ^ 2 - Φ₀ * bb := by - have hG : G = aa * L * N + α := by rw [hαdef]; ring - have hG2 : G2 = M₂ + bb := by rw [hbbdef]; ring - rw [hG, hG2, hδdef] - linear_combination (-1 : ℝ) * key - have hLN0 : 0 ≤ aa * L * N := by positivity - have hNup : N ≤ T * ℓ / (2 * π) + A * ℓ := by - have := (abs_le.mp hN).2 - nlinarith - have hLN2 : (aa * L * N) ^ 2 ≤ 2 * (Φ₀ * M₂) := by - rw [key] - have h' : (aa * L * N) ^ 2 = (aa * L) ^ 2 * N * N := by ring - rw [h'] - have hc : (aa * L) ^ 2 * N * N ≤ (aa * L) ^ 2 * N * (T * ℓ / (2 * π) + A * ℓ) := - mul_le_mul_of_nonneg_left hNup (by positivity) - have hd : (aa * L) ^ 2 * N * (A * ℓ) ≤ (aa * L) ^ 2 * N * (T * ℓ / (2 * π)) := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - rw [le_div_iff₀ (by positivity)] - nlinarith - nlinarith - have t1 : |(aa * L) ^ 2 * N * δ| ≤ 2 * π * A * (E * (Φ₀ * M₂)) := by - rw [abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ (aa * L) ^ 2 * N)] - calc (aa * L) ^ 2 * N * |δ| ≤ (aa * L) ^ 2 * N * (A * ℓ) := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - exact hN.trans (mul_le_mul_of_nonneg_left hℓl hA) - _ = 2 * π * A * ((1 / T) * ((aa * L) ^ 2 * N * (T * ℓ / (2 * π)))) := by - field_simp - try ring - _ = 2 * π * A * ((1 / T) * (Φ₀ * M₂)) := by rw [key] - _ ≤ 2 * π * A * (E * (Φ₀ * M₂)) := by - have h0 : 0 ≤ Φ₀ * M₂ := by positivity - gcongr - have t2 : |2 * (aa * L * N) * α| ≤ 4 * C₁ * (E * (Φ₀ * M₂)) := by - rw [abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ 2 * (aa * L * N))] - calc 2 * (aa * L * N) * |α| ≤ 2 * (aa * L * N) * (C₁ * (E * (aa * L * N))) := by gcongr - _ = 2 * C₁ * E * (aa * L * N) ^ 2 := by ring - _ ≤ 2 * C₁ * E * (2 * (Φ₀ * M₂)) := by gcongr - _ = 4 * C₁ * (E * (Φ₀ * M₂)) := by ring - have t3 : |α ^ 2| ≤ C₁ * (E * (Φ₀ * M₂)) := by - rw [abs_pow] - calc |α| ^ 2 ≤ (C₁ * (E * (aa * L * N))) ^ 2 := by gcongr - _ = (C₁ * E) * (C₁ * E) * (aa * L * N) ^ 2 := by ring - _ ≤ (C₁ * E) * (1 / 2) * (2 * (Φ₀ * M₂)) := by - have h0 : 0 ≤ C₁ * E := by positivity - gcongr - _ = C₁ * (E * (Φ₀ * M₂)) := by ring - have t4 : |Φ₀ * bb| ≤ C₂ * (E * (Φ₀ * M₂)) := by - rw [abs_mul, abs_of_pos hΦ0] - calc Φ₀ * |bb| ≤ Φ₀ * (C₂ * (E * M₂)) := by gcongr - _ = C₂ * (E * (Φ₀ * M₂)) := by ring - have hnum : |G ^ 2 - Φ₀ * G2| ≤ (2 * π * A + 5 * C₁ + C₂) * (E * (Φ₀ * M₂)) := by - rw [hid] - calc |(aa * L) ^ 2 * N * δ + 2 * (aa * L * N) * α + α ^ 2 - Φ₀ * bb| - ≤ |(aa * L) ^ 2 * N * δ| + |2 * (aa * L * N) * α| + |α ^ 2| + |Φ₀ * bb| := by - refine (abs_sub _ _).trans ?_ - linarith [abs_add_three ((aa * L) ^ 2 * N * δ) (2 * (aa * L * N) * α) (α ^ 2)] - _ ≤ 2 * π * A * (E * (Φ₀ * M₂)) + 4 * C₁ * (E * (Φ₀ * M₂)) + C₁ * (E * (Φ₀ * M₂)) - + C₂ * (E * (Φ₀ * M₂)) := by gcongr - _ = (2 * π * A + 5 * C₁ + C₂) * (E * (Φ₀ * M₂)) := by ring - have hq : G ^ 2 / G2 - Φ₀ = (G ^ 2 - Φ₀ * G2) / G2 := by - field_simp - rw [hq, abs_div, abs_of_pos hG2pos, div_le_iff₀ hG2pos] - calc |G ^ 2 - Φ₀ * G2| ≤ (2 * π * A + 5 * C₁ + C₂) * (E * (Φ₀ * M₂)) := hnum - _ = 2 * (2 * π * A + 5 * C₁ + C₂) * (E * Φ₀) * (M₂ / 2) := by ring - _ ≤ 2 * (2 * π * A + 5 * C₁ + C₂) * (E * Φ₀) * G2 := by - have h0 : 0 ≤ 2 * (2 * π * A + 5 * C₁ + C₂) * (E * Φ₀) := by positivity - gcongr - -section assemblyD -variable {D} (h : FactsD D) -include h - -private lemma NcntD_lower : ∀ᶠ T in Filter.atTop, T * l T / (4 * π) ≤ D.Ncnt T := by - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le - filter_upwards [hN, Filter.eventually_ge_atTop (4 * π * A), PaperParams.eventually_l_ge 0] - with T hN hTA hl - have hπ := Real.pi_pos - have h1 : -(A * l T) ≤ D.Ncnt T - T * ell1 T / (2 * π) := (abs_le.mp hN).1 - have h2 : T * l T ≤ T * ell1 T := - mul_le_mul_of_nonneg_left (PaperParams.l_le_ell1 T) (by nlinarith) - have h3 : T * l T / (2 * π) ≤ T * ell1 T / (2 * π) := - div_le_div_of_nonneg_right h2 (by positivity) - have h4 : T * l T / (4 * π) = T * l T / (2 * π) - T * l T / (4 * π) := by ring - have h5 : A * l T ≤ T * l T / (4 * π) := by - rw [le_div_iff₀ (by positivity)] - nlinarith - linarith - -private lemma T_le_NcntD : ∀ᶠ T in Filter.atTop, T ≤ 4 * π * D.Ncnt T := by - filter_upwards [NcntD_lower h, PaperParams.eventually_l_ge 1, Filter.eventually_ge_atTop 0] - with T hN hl hT - have hπ := Real.pi_pos - have : T * l T ≤ 4 * π * D.Ncnt T := by - rw [div_le_iff₀ (by positivity)] at hN - linarith - nlinarith + have hcR0 : 0 < cRatio (L / ℓ) aa b J := by unfold cRatio; exact div_pos (by positivity) hdenR + have hkey : cRatio (L / ℓ) aa b J * (T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J)) + = (aa * L) ^ 2 * (T * ℓ / (2 * π)) := by unfold cRatio; field_simp; try ring + exact PrimeSide.ratio_pointwise_of T L ℓ lT E N G G2 + (T * L / (2 * π) * (b * ℓ ^ 2 + L ^ 2 * J)) aa (cRatio (L / ℓ) aa b J) A C₁ C₂ + hT hL hℓ1 hℓl hN0 hE0 hET hA hC₁ hC₂ ha0 hM0 hcR0 hs1 hs2 hTA hkey h1 h2 hN -private lemma NcntD_pos : ∀ᶠ T in Filter.atTop, 0 < D.Ncnt T := by - filter_upwards [NcntD_lower h, PaperParams.eventually_l_ge 1, Filter.eventually_ge_atTop 1] - with T hN hl hT - have hπ := Real.pi_pos - have h0 : (0:ℝ) < T * l T / (4 * π) := by positivity - linarith - -private lemma regimeD : ∀ᶠ T in Filter.atTop, 1 ≤ T ∧ 1 ≤ l T ∧ 1 ≤ Real.log (l T) - ∧ 1 ≤ P.L T ∧ 1 ≤ P.X T ∧ P.L T ≤ l T ∧ P.X T ≤ T := by - have hlam := h.lam_pos - filter_upwards [Filter.eventually_ge_atTop 1, PaperParams.eventually_l_ge 1, - PaperParams.eventually_log_l_ge 1, PaperParams.eventually_L_ge P hlam 1, - PaperParams.eventually_one_le_X P hlam, - PaperParams.eventually_X_le_T P hlam h.lam_le_one] with T h1 h2 h3 h4 h5 h6 - exact ⟨h1, h2, h3, h4, h5, PaperParams.L_le_l P h.lam_le_one (by linarith), h6⟩ - -/-- the D-form of [eq:tr1]': tr G̃ = a L N (1 + O(𝓔)) — a STAYS (no collapse to 1). -/ -private lemma tr1'D : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.calE T * (D.aT T * P.L T * D.Ncnt T)) := by - obtain ⟨C₁, hC₁, h1⟩ := h.prop_trace.eventually_le - have hlam := h.lam_pos - have hw : 0 ≤ P.w := by linarith [h.one_le_w] +/-- The `[eq:tr1]'` estimate for a window-general trace package, shared by the ζ and χ +assemblies: only the triple `(trG, aT, Ncnt)` and the two threshold facts enter. -/ +lemma tr1'D_gen {P : Params} {trG aT Ncnt bT : ℝ → ℝ} + (hlam : 0 < P.lam) (hw1 : 1 ≤ P.w) + (hprop : EvBound (fun T => trG T - aT T * P.L T * Ncnt T) + (fun T => P.L T * Real.sqrt (P.X T))) + (hab : ∀ᶠ T in atTop, 1 / 2 ≤ bT T ∧ bT T ≤ aT T ∧ aT T ≤ 1) + (hTN : ∀ᶠ T in atTop, T ≤ 4 * π * Ncnt T) + (hNpos : ∀ᶠ T in atTop, 0 < Ncnt T) : + EvBound (fun T => trG T - aT T * P.L T * Ncnt T) + (fun T => P.calE T * (aT T * P.L T * Ncnt T)) := by + obtain ⟨C₁, hC₁, h1⟩ := hprop.eventually_le + have hw : 0 ≤ P.w := by linarith refine EvBound.of_eventually_le (c := 8 * π * C₁) (by positivity) ?_ - filter_upwards [h1, h.ab_range, PaperParams.calE_ge_rpow hlam hw, - PaperParams.calE_nonneg_eventually hlam hw, T_le_NcntD h, NcntD_pos h, + filter_upwards [h1, hab, PaperParams.calE_ge_rpow hlam hw, + PaperParams.calE_nonneg_eventually hlam hw, hTN, hNpos, Filter.eventually_ge_atTop 1, PaperParams.eventually_L_ge P hlam 1] with T h1 hab hEr hE0 hTN hN0 hT1 hL1 - obtain ⟨hb2, hba, ha1, hJ0, hJ1⟩ := hab + obtain ⟨hb2, hba, ha1⟩ := hab have hT0 : 0 < T := by linarith have hL0 : 0 ≤ P.L T := by linarith - have ha2 : 1 / 2 ≤ D.aT T := le_trans hb2 hba + have ha2 : 1 / 2 ≤ aT T := le_trans hb2 hba have hB : C₁ * (P.L T * Real.sqrt (P.X T)) - ≤ 8 * π * C₁ * (P.calE T * (D.aT T * P.L T * D.Ncnt T)) := by + ≤ 8 * π * C₁ * (P.calE T * (aT T * P.L T * Ncnt T)) := by have hs : Real.sqrt (P.X T) ≤ T ^ (P.lam / 2 - 1) * T := by rw [PaperParams.rpow_half_sub_one_mul hT0] exact PaperParams.sqrt_X_le_rpow P hlam hT0 - have hs2 : T ^ (P.lam / 2 - 1) * T ≤ P.calE T * (4 * π * D.Ncnt T) := + have hs2 : T ^ (P.lam / 2 - 1) * T ≤ P.calE T * (4 * π * Ncnt T) := mul_le_mul hEr hTN hT0.le hE0 calc C₁ * (P.L T * Real.sqrt (P.X T)) - ≤ C₁ * (P.L T * (P.calE T * (4 * π * D.Ncnt T))) := by gcongr; exact hs.trans hs2 - _ = 4 * π * C₁ * (P.calE T * (P.L T * D.Ncnt T)) := by ring - _ ≤ 4 * π * C₁ * (P.calE T * ((2 * D.aT T) * P.L T * D.Ncnt T)) := by - have h2a : (1:ℝ) ≤ 2 * D.aT T := by linarith + ≤ C₁ * (P.L T * (P.calE T * (4 * π * Ncnt T))) := by gcongr; exact hs.trans hs2 + _ = 4 * π * C₁ * (P.calE T * (P.L T * Ncnt T)) := by ring + _ ≤ 4 * π * C₁ * (P.calE T * ((2 * aT T) * P.L T * Ncnt T)) := by + have h2a : (1:ℝ) ≤ 2 * aT T := by linarith have hnn : 0 ≤ P.calE T := hE0 - have hLN : 0 ≤ P.L T * D.Ncnt T := mul_nonneg hL0 hN0.le - calc 4 * π * C₁ * (P.calE T * (P.L T * D.Ncnt T)) - = 4 * π * C₁ * (P.calE T * (1 * P.L T * D.Ncnt T)) := by ring - _ ≤ 4 * π * C₁ * (P.calE T * (2 * D.aT T * P.L T * D.Ncnt T)) := by + have hLN : 0 ≤ P.L T * Ncnt T := mul_nonneg hL0 hN0.le + calc 4 * π * C₁ * (P.calE T * (P.L T * Ncnt T)) + = 4 * π * C₁ * (P.calE T * (1 * P.L T * Ncnt T)) := by ring + _ ≤ 4 * π * C₁ * (P.calE T * (2 * aT T * P.L T * Ncnt T)) := by gcongr - - _ = 8 * π * C₁ * (P.calE T * (D.aT T * P.L T * D.Ncnt T)) := by ring + _ = 8 * π * C₁ * (P.calE T * (aT T * P.L T * Ncnt T)) := by ring exact le_trans h1 hB -end assemblyD - -section assemblyD2 -variable {D} (h : FactsD D) +section assemblyD +variable {ell1f : ℝ → ℝ} {D} (h : FactsDG ell1f D) include h -/-- the D main term: (TL/2π)(b ℓ₁² + L² J) [eq:ratio-general]. -/ -private def mainTr2D (P : Params) (D : DataD P) (T : ℝ) : ℝ := - T * P.L T / (2 * π) * (D.bT T * ell1 T ^ 2 + P.L T ^ 2 * D.JT T) +/-- the D-form of [eq:tr1]': tr G̃ = a L N (1 + O(𝓔)) — a STAYS (no collapse to 1). -/ +private lemma tr1'D : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) + (fun T => P.calE T * (D.aT T * P.L T * D.Ncnt T)) := + tr1'D_gen h.lam_pos h.one_le_w h.prop_trace + (h.ab_range.mono fun _ h => ⟨h.1, h.2.1, h.2.2.1⟩) + h.toTraceFactsBase.T_le_Ncnt h.toTraceFactsBase.Ncnt_pos -/-- the D-form of [eq:tr2], first form (verbatim mirror of PrimeSide.tr2_first over FactsD). -/ -private lemma tr2_firstD : EvBound - (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumL2g T)) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - have e3 : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.prop_mumu.mono_right' one_pos ?_ - filter_upwards [regimeD h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - have hlogL : Real.log (P.L T) ≤ Real.log (l T) := Real.log_le_log (by linarith) hLl - have hlogL0 : 0 ≤ Real.log (P.L T) := Real.log_nonneg hL - calc l T ^ 2 * Real.log (P.L T) ≤ l T ^ 2 * Real.log (l T) := by gcongr - _ = 1 * l T * Real.log (l T) * l T := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have e4 : EvBound (fun T => D.MPP T - T / π * D.sumL2g T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.prop_PP.mono_right' one_pos ?_ - filter_upwards [regimeD h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - calc P.L T ^ 2 * P.X T = P.L T * P.L T * 1 * P.X T := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have hsqrtX : ∀ᶠ T in Filter.atTop, Real.sqrt (P.X T) ≤ P.X T := by - filter_upwards [regimeD h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - rw [Real.sqrt_le_left (by linarith)] - nlinarith - have e5 : EvBound D.MmuP (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_muP.mono_right' one_pos ?_ - filter_upwards [regimeD h, hsqrtX] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ hs - calc l T * Real.sqrt (P.X T) ≤ l T * P.X T := by gcongr - _ = 1 * l T * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have e6 : EvBound D.MmuPi (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_muPi.mono_right' one_pos ?_ - filter_upwards [regimeD h, hsqrtX] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ hs - calc l T * P.L T * Real.sqrt (P.X T) ≤ l T * P.L T * P.X T := by gcongr - _ = P.L T * l T * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have e7 : EvBound D.MPPi (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_PPi.mono_right' one_pos ?_ - filter_upwards [regimeD h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - calc P.L T * P.X T = P.L T * 1 * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have e8 : EvBound D.MPiPi (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_PiPi.mono_right' one_pos ?_ - filter_upwards [regimeD h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - calc P.L T * P.X T / T ≤ P.L T * P.X T := div_le_self (by nlinarith) hT - _ = P.L T * 1 * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have S := h.lem_ends.add (e3.add (e4.add (((e5.const_mul 2).add (e6.const_mul 2)).add - ((e7.const_mul 2).add e8)))) - refine S.congr_left ?_ - filter_upwards [h.Msplit] with T hM - rw [hM] - ring +/-- the D main term: (TL/2π)(b ell1f² + L² J) [eq:ratio-general]. -/ +private def mainTr2D (P : Params) (ell1f : ℝ → ℝ) (D : DataD P) (T : ℝ) : ℝ := + T * P.L T / (2 * π) * (D.bT T * ell1f T ^ 2 + P.L T ^ 2 * D.JT T) -/-- the D-form of [eq:tr2], second form: tr G̃² = (TL/2π)(bℓ₁² + L²J)(1 + O(𝓔_T)). -/ -private lemma tr2D : EvBound (fun T => D.trG2 T - mainTr2D P D T) - (fun T => P.calE T * mainTr2D P D T) := by +/-- the D-form of [eq:tr2], second form: tr G̃² = (TL/2π)(b ell1f² + L²J)(1 + O(𝓔_T)). -/ +private lemma tr2D : EvBound (fun T => D.trG2 T - mainTr2D P ell1f D T) + (fun T => P.calE T * mainTr2D P ell1f D T) := by have hlam := h.lam_pos have hw1 := h.one_le_w have hw : 0 ≤ P.w := by linarith - obtain ⟨CR, hCR, hR⟩ := (tr2_firstD h).eventually_le + obtain ⟨CR, hCR, hR⟩ := h.toTraceFactsBase.tr2_first.eventually_le obtain ⟨Cμ, hCμ, hμ⟩ := h.muints2.eventually_le obtain ⟨Cs, hCs, hsj⟩ := h.sumJ.eventually_le refine EvBound.of_eventually_le (c := 4 * π * CR + 2 * Cμ + 4 * Cs) (by positivity) ?_ - filter_upwards [hR, hμ, hsj, h.ab_range, regimeD h, PaperParams.calE_ge_w_div_L hlam hw, - PaperParams.calE_ge_mid hlam hw, PaperParams.calE_nonneg_eventually hlam hw, - PaperParams.eventually_L_ge P hlam (2 * P.w)] - with T hR hμ hsj hab hreg hEw hEmid hE0 hL2w + filter_upwards [hR, hμ, hsj, h.ab_range, h.ell1_ge, h.toTraceFactsBase.regime, + PaperParams.calE_ge_w_div_L hlam hw, PaperParams.calE_ge_mid hlam hw, + PaperParams.calE_nonneg_eventually hlam hw, PaperParams.eventually_L_ge P hlam (2 * P.w)] + with T hR hμ hsj hab hle hreg hEw hEmid hE0 hL2w obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg obtain ⟨hb2, hba, ha1, hJ0, -⟩ := hab have hSJ : |D.sumL2g T - P.L T ^ 3 * D.JT T / 2| ≤ Cs * P.L T ^ 2 := by have e : P.L T ^ 3 * D.JT T / 2 = P.L T ^ 3 / 2 * D.JT T := by ring rw [e] exact hsj - exact tr2D_pointwise T (P.L T) (ell1 T) (l T) (P.X T) (P.calE T) (D.sumL2g T) (D.intMu2 T) - (D.bT T) (D.JT T) (D.trG2 T) P.w CR Cμ Cs hT hL hl hlog hX (PaperParams.l_le_ell1 T) hLl hw1 hL2w + exact tr2D_pointwise T (P.L T) (ell1f T) (l T) (P.X T) (P.calE T) (D.sumL2g T) (D.intMu2 T) + (D.bT T) (D.JT T) (D.trG2 T) P.w CR Cμ Cs hT hL hl hlog hX hle hLl hw1 hL2w hb2 (hba.trans ha1) hJ0 hE0 hEw hEmid hCR.le hCμ.le hCs.le hR hμ hSJ -/-- the D-form of [eq:ratio]: (tr G̃)²/tr G̃² = cRatio(λ₁; a, b, J)·N·(1 + O(𝓔_T)). -/ +/-- Shared `1 / T ≤ calE T` helper for `ratioD` and `frhatD`. -/ +private lemma eventually_calE_inv_le : + ∀ᶠ T in atTop, 1 ≤ T → 1 / T ≤ P.calE T := by + have hlam1 := h.lam_le_one + filter_upwards [PaperParams.calE_ge_rpow h.lam_pos (by linarith [h.one_le_w])] with T hEr hT + refine le_trans ?_ hEr + rw [one_div, ← Real.rpow_neg_one] + exact Real.rpow_le_rpow_of_exponent_le hT (by linarith [h.lam_pos]) + +/-- the D-form of [eq:ratio]: (tr G̃)²/tr G̃² = cRatio(L/ell1f; a, b, J)·N·(1 + O(𝓔_T)). -/ private lemma ratioD : EvBound - (fun T => D.trG T ^ 2 / D.trG2 T - cRatio (P.lam1 T) (D.aT T) (D.bT T) (D.JT T) * D.Ncnt T) - (fun T => P.calE T * (cRatio (P.lam1 T) (D.aT T) (D.bT T) (D.JT T) * D.Ncnt T)) := by + (fun T => D.trG T ^ 2 / D.trG2 T - cRatio (P.L T / ell1f T) (D.aT T) (D.bT T) (D.JT T) * D.Ncnt T) + (fun T => P.calE T * (cRatio (P.L T / ell1f T) (D.aT T) (D.bT T) (D.JT T) * D.Ncnt T)) := by have hlam := h.lam_pos have hlam1 := h.lam_le_one have hw : 0 ≤ P.w := by linarith [h.one_le_w] @@ -492,23 +222,17 @@ private lemma ratioD : EvBound obtain ⟨C₂, hC₂, h2⟩ := (tr2D h).eventually_le obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le have hcal := PaperParams.calE_tendsto_zero hlam hlam1 hw - have hs1 := eventually_const_mul_le_half hcal hC₁ - have hs2 := eventually_const_mul_le_half hcal hC₂ refine EvBound.of_eventually_le (c := 2 * (2 * π * A + 5 * C₁ + C₂)) (by positivity) ?_ - filter_upwards [h1, h2, hN, hs1, hs2, regimeD h, h.ab_range, PaperParams.calE_ge_rpow hlam hw, - PaperParams.calE_nonneg_eventually hlam hw, NcntD_pos h, Filter.eventually_ge_atTop (2 * π * A)] - with T h1 h2 hN hs1 hs2 hreg hab hEr hE0 hN0 hTA - obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg - obtain ⟨hb2, hba, -, hJ0, -⟩ := hab - have hET : 1 / T ≤ P.calE T := by - refine le_trans ?_ hEr - rw [one_div, ← Real.rpow_neg_one] - exact Real.rpow_le_rpow_of_exponent_le hT (by linarith) - exact ratioD_pointwise T (P.L T) (ell1 T) (l T) (P.calE T) (D.Ncnt T) (D.trG T) (D.trG2 T) - A (D.aT T) (D.bT T) (D.JT T) C₁ C₂ hT (by linarith) (hl.trans (PaperParams.l_le_ell1 T)) (PaperParams.l_le_ell1 T) - hN0 hE0 hET hA.le hC₁.le hC₂.le (le_trans hb2 hba) hb2 hJ0 hs1 hs2 hTA h1 h2 hN + filter_upwards [h1, h2, hN, eventually_const_mul_le_half hcal hC₁, + eventually_const_mul_le_half hcal hC₂, h.ell1_ge, h.toTraceFactsBase.regime, h.ab_range, + eventually_calE_inv_le h, PaperParams.calE_nonneg_eventually hlam hw, + h.toTraceFactsBase.Ncnt_pos, Filter.eventually_ge_atTop (2 * π * A)] + with T h1 h2 hN hs1 hs2 hle ⟨hT, hl, _, hL, _, _, _⟩ ⟨hb2, hba, _, hJ0, _⟩ hET hE0 hN0 hTA + exact ratioD_pointwise T (P.L T) (ell1f T) (l T) (P.calE T) (D.Ncnt T) (D.trG T) (D.trG2 T) + A (D.aT T) (D.bT T) (D.JT T) C₁ C₂ hT (by linarith) (hl.trans hle) hle + hN0 hE0 (hET hT) hA.le hC₁.le hC₂.le (hb2.trans hba) hb2 hJ0 hs1 hs2 hTA h1 h2 hN -end assemblyD2 +end assemblyD /-- pointwise form of the hat-units Frobenius bound: the positive part of G2/(aL)² − (1/cRatio)N is ≤ (4πA + 2C₂)·E·((1/cRatio)N). -/ @@ -629,39 +353,37 @@ theorem frhatD_pointwise (T L ℓ lT E N G2 A aa b J C₂ : ℝ) _ = (4 * π * A + 2 * C₂) * (E * ((cRatio (L / ℓ) aa b J)⁻¹ * N)) := by ring exact max_le hup (by positivity) -/-- the frhat field: the D-form hat-units second-moment upper bound. -/ -private lemma frhatD {D : DataD P} (h : FactsD D) : EvBound +/-- the frhat field: the D-form hat-units second-moment upper bound over arbitrary `ell1f ≥ l`. -/ +private lemma frhatD {ell1f : ℝ → ℝ} {D : DataD P} (h : FactsDG ell1f D) : EvBound (fun T => max (D.trG2 T / (D.aT T * P.L T) ^ 2 - - (cRatio (P.lam1 T) (D.aT T) (D.bT T) (D.JT T))⁻¹ * D.Ncnt T) 0) - (fun T => P.calE T * ((cRatio (P.lam1 T) (D.aT T) (D.bT T) (D.JT T))⁻¹ * D.Ncnt T)) := by + - (cRatio (P.L T / ell1f T) (D.aT T) (D.bT T) (D.JT T))⁻¹ * D.Ncnt T) 0) + (fun T => P.calE T * ((cRatio (P.L T / ell1f T) (D.aT T) (D.bT T) (D.JT T))⁻¹ * D.Ncnt T)) := by have hlam := h.lam_pos have hw : 0 ≤ P.w := by linarith [h.one_le_w] obtain ⟨C₂, hC₂, h2⟩ := (tr2D h).eventually_le obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le refine EvBound.of_eventually_le (c := 4 * π * A + 2 * C₂) (by positivity) ?_ - filter_upwards [h2, hN, regimeD h, h.ab_range, PaperParams.calE_ge_rpow hlam hw, - PaperParams.calE_nonneg_eventually hlam hw, NcntD_pos h, - Filter.eventually_ge_atTop (4 * π * A)] - with T h2 hN hreg hab hEr hE0 hN0 hTA - obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg - obtain ⟨hb2, hba, -, hJ0, -⟩ := hab - have hET : 1 / T ≤ P.calE T := by - refine le_trans ?_ hEr - rw [one_div, ← Real.rpow_neg_one] - exact Real.rpow_le_rpow_of_exponent_le hT (by linarith) - refine le_trans (le_of_eq (abs_of_nonneg (le_max_right _ _))) ?_ - exact frhatD_pointwise T (P.L T) (ell1 T) (l T) (P.calE T) (D.Ncnt T) (D.trG2 T) - A (D.aT T) (D.bT T) (D.JT T) C₂ hT (by linarith) (hl.trans (PaperParams.l_le_ell1 T)) - (PaperParams.l_le_ell1 T) hN0 hE0 hET hA.le hC₂.le (le_trans hb2 hba) hb2 hJ0 hTA h2 hN + filter_upwards [h2, hN, h.ell1_ge, h.toTraceFactsBase.regime, h.ab_range, + eventually_calE_inv_le h, PaperParams.calE_nonneg_eventually hlam hw, + h.toTraceFactsBase.Ncnt_pos, Filter.eventually_ge_atTop (4 * π * A)] + with T h2 hN hle ⟨hT, hl, _, hL, _, _, _⟩ ⟨hb2, hba, _, hJ0, _⟩ hET hE0 hN0 hTA + rw [abs_of_nonneg (le_max_right _ _)] + exact frhatD_pointwise T (P.L T) (ell1f T) (l T) (P.calE T) (D.Ncnt T) (D.trG2 T) + A (D.aT T) (D.bT T) (D.JT T) C₂ hT (by linarith) (hl.trans hle) + hle hN0 hE0 (hET hT) hA.le hC₂.le (hb2.trans hba) hb2 hJ0 hTA h2 hN -/-- **[eq:ratio-general] assembly**: the D-interface traces bounds with ratio constant -cRatio λ₁ a b J. The body mirrors Zeta23.PrimeSide.tracesBounds_of_facts with b, J -symbolic. -/ -theorem tracesBoundsD_of_factsD (h : FactsD D) : - TracesBoundsD P D.aT D.bT D.JT D.trG D.trG2 D.Ncnt where +/-- **[eq:ratio-general] assembly** over an arbitrary density log `ell1f ≥ l` +(shared by `ζ` and `L(s, χ)`). -/ +theorem tracesBoundsDG_of_factsDG {ell1f : ℝ → ℝ} (h : FactsDG ell1f D) : + TracesBoundsDG P (fun T => P.L T / ell1f T) D.aT D.bT D.JT D.trG D.trG2 D.Ncnt where tr1 := h.prop_trace ratio := ratioD h frhat := frhatD h +/-- **[eq:ratio-general] assembly** for `ζ` (`ell1f = ell1`). -/ +theorem tracesBoundsD_of_factsD (h : FactsD D) : + TracesBoundsD P D.aT D.bT D.JT D.trG D.trG2 D.Ncnt := + tracesBoundsDG_of_factsDG D h + end ThmD end Zeta23 diff --git a/zeta23/Zeta23/ThmD/Window.lean b/zeta23/Zeta23/ThmD/Window.lean index 749ca9b7ad..8be7f6cafd 100644 --- a/zeta23/Zeta23/ThmD/Window.lean +++ b/zeta23/Zeta23/ThmD/Window.lean @@ -4,27 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/ThmD/Window.lean — [thm:D], the concrete window. A summary of the statements -proved is given at the bottom of the file. +Zeta23/ThmD/Window.lean — [thm:D], the concrete Montgomery–Taylor window: + φ_D(u) := √(cos(√2 λ u/L)) · φ_flat(u) = phiM (cosD lam L) ϱ L w u. -The concrete Montgomery–Taylor window of the [thm:D] proof (paper §7.1): - φ_D(u) := √(cos(√2 λ u/L)) · φ_flat(u), φ_flat = Zeta23.Taper.phi ϱ L w (the §2.2 ramp taper), -i.e. the paper's "cos(√2 u/l)^{1/2} ϱ(L/2−|u|)" at general 0 < λ ≤ 1 (we avoid the λ = 1 -endpoint; the paper's display is the λ = 1 case with w = 1) and with the ramp width w kept -free as everywhere else in this project. - -On the support [−L/2, L/2] the cosine argument is ≤ √2λ/2 = ϑ ≤ 1/√2 < π/2, so cos ≥ cos ϑ ≥ 3/4 -> 0 there and √cos is smooth on a neighbourhood; off the support φ_flat kills everything -(and Real.sqrt of a negative is 0, so φ_D is total and 0 outside [−L/2, L/2] regardless). - -WHY THESE STATEMENTS (paper §7.1, first paragraph): "Nothing in Sections 4–5 used that φ is -flat-topped, only: φ ∈ C_c² even, 0 ≤ φ ≤ 1, supp φ = [−L/2,L/2], φ nonincreasing in |u| -(so ‖φ'‖₁ ≤ 2, ‖(φ²)'‖₁ ≤ 2), and ‖φ''‖₁, ‖(φ²)''‖₁ ≪ 1" + the moments [eq:abJ] "differ from -those of v*_λ by O(1/L)". +The admissibility and moment/autocorrelation machinery live generically in `Zeta23/ThmD/ModWindow.lean`; +this file supplies the `ModFactor` instance `modFactor_cosD`, the moment bounds `aD_close`, `bD_close`, +the closed-form sharp autocorrelation `Cfun` and its y-moment giving `jD_close`, and `gD_deriv_facts`. -/ -import Zeta23.Taper.Basic -import Zeta23.Taper.Norms -import Zeta23.Taper.Decay +import Zeta23.ThmD.ModWindow import Zeta23.ThmD.Functional noncomputable section @@ -34,1177 +21,198 @@ open Real Set MeasureTheory namespace Zeta23 namespace ThmD -/-- the Montgomery–Taylor window: φ_D(u) := √(v*_λ(u/L)) · (ramp taper). -/ +/-- the Montgomery–Taylor modulating factor `√(v*_λ(u/L))`. -/ +def cosD (lam L : ℝ) (u : ℝ) : ℝ := + Real.sqrt (vStar lam (u / L)) + +/-- the Montgomery–Taylor window: `φ_D(u) := √(v*_λ(u/L)) · (ramp taper)`. -/ def phiD (ϱ : ℝ → ℝ) (lam L w : ℝ) (u : ℝ) : ℝ := - Real.sqrt (vStar lam (u / L)) * Taper.phi ϱ L w u + phiM (cosD lam L) ϱ L w u + +/-- explicit window constant for `φ_D`. -/ +def cDT (ϱ : ℝ → ℝ) (_lam : ℝ) : ℝ := + cMod ϱ 2 16 variable {ϱ : ℝ → ℝ} {lam L w : ℝ} -/-! ### pointwise / support facts (sentence 1 of §7.1) -/ +/-! ### pointwise facts and the `ModFactor` instance -/ theorem phiD_even (u : ℝ) : phiD ϱ lam L w (-u) = phiD ϱ lam L w u := by - unfold phiD vStar + unfold phiD phiM cosD vStar rw [Taper.phi_even] norm_num [neg_div, mul_neg, Real.cos_neg] -theorem phiD_nonneg (hϱ : TaperProfile ϱ) (u : ℝ) : 0 ≤ phiD ϱ lam L w u := - mul_nonneg (Real.sqrt_nonneg _) (Taper.phi_nonneg hϱ u) - -theorem phiD_le_one (hϱ : TaperProfile ϱ) (u : ℝ) : phiD ϱ lam L w u ≤ 1 := by - unfold phiD - calc Real.sqrt (vStar lam (u / L)) * Taper.phi ϱ L w u - ≤ 1 * 1 := by - refine mul_le_mul ?_ (Taper.phi_le_one hϱ u) (Taper.phi_nonneg hϱ u) zero_le_one - rw [show (1:ℝ) = Real.sqrt 1 from (Real.sqrt_one).symm] - exact Real.sqrt_le_sqrt (by unfold vStar; exact Real.cos_le_one _) - _ = 1 := mul_one 1 - theorem phiD_eq_zero (hϱ : TaperProfile ϱ) (hw : 0 < w) {u : ℝ} (hu : L / 2 ≤ |u|) : - phiD ϱ lam L w u = 0 := by - unfold phiD - rw [Taper.phi_eq_zero hϱ hw hu, mul_zero] + phiD ϱ lam L w u = 0 := + phiM_eq_zero hϱ hw hu -/-- on the support, the cosine factor is bounded below: for |u| ≤ L/2 (0 < λ ≤ 1, L > 0), -cos(√2 λ u/L) ≥ 3/4. -/ -theorem cos_factor_ge (h0 : 0 < lam) (h1 : lam ≤ 1) (hL : 0 < L) {u : ℝ} - (hu : |u| ≤ L / 2) : 3 / 4 ≤ vStar lam (u / L) := by - unfold vStar - have h := Real.one_sub_sq_div_two_le_cos (x := Real.sqrt 2 * lam * (u / L)) - have hsq : Real.sqrt 2 ^ 2 = 2 := Real.sq_sqrt (by norm_num) - have hu2 : u ^ 2 ≤ (L / 2) ^ 2 := by - rw [← sq_abs u] - exact pow_le_pow_left₀ (abs_nonneg u) hu 2 - have hlam2 : lam ^ 2 ≤ 1 := pow_le_one₀ h0.le h1 - have hq0 : 0 ≤ u ^ 2 / L ^ 2 := by positivity - have hq : u ^ 2 / L ^ 2 ≤ 1 / 4 := by - rw [div_le_iff₀ (by positivity)] - nlinarith - have harg : (Real.sqrt 2 * lam * (u / L)) ^ 2 ≤ 1 / 2 := by - rw [mul_pow, mul_pow, div_pow, hsq] - nlinarith [mul_nonneg (sub_nonneg.mpr hlam2) hq0] - linarith - -/-- φ_D ∈ C² (product of the C³ ramp with √cos, smooth near the support; glued with 0 off it). -/ -theorem phiD_contDiff (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) (hw : 0 < w) - (hwL : 2 * w ≤ L) : ContDiff ℝ 2 (phiD ϱ lam L w) := by - have hL : 0 < L := by linarith - rw [contDiff_iff_contDiffAt] - intro u - rcases lt_or_ge |u| (2 * L / 3) with hu | hu - · -- near the support: √(cos) is smooth since cos ≥ some positive bound on a neighbourhood - unfold phiD - apply ContDiffAt.mul ?_ - (((Taper.phi_contDiff hϱ hw hwL).of_le (by norm_num)).contDiffAt) - apply ContDiffAt.sqrt ?_ ?_ - · exact ((Real.contDiff_cos.comp (by fun_prop : ContDiff ℝ 2 - (fun u : ℝ => Real.sqrt 2 * lam * (u / L)))).contDiffAt) - · -- cos(√2 λ u/L) ≠ 0 for |u| < 2L/3: the argument is < √2·(2/3) < π/2 - have hs32 : Real.sqrt 2 ≤ 3 / 2 := by - nlinarith [Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 2), Real.sqrt_nonneg 2] - have harg : |Real.sqrt 2 * lam * (u / L)| < π / 2 := by - rw [abs_mul, abs_div, abs_of_nonneg (by positivity : (0:ℝ) ≤ Real.sqrt 2 * lam), - abs_of_pos hL] - have h1' : Real.sqrt 2 * lam ≤ 3 / 2 := by - calc Real.sqrt 2 * lam ≤ (3/2) * 1 := by - apply mul_le_mul hs32 h1 h0.le (by norm_num) - _ = 3 / 2 := mul_one _ - have h2' : |u| / L < 2 / 3 := by - rw [div_lt_iff₀ hL] - linarith - calc Real.sqrt 2 * lam * (|u| / L) ≤ (3/2) * (|u| / L) := by - apply mul_le_mul_of_nonneg_right h1' (by positivity) - _ < (3/2) * (2/3) := by - apply mul_lt_mul_of_pos_left h2' (by norm_num) - _ = 1 := by norm_num - _ < π / 2 := by nlinarith [Real.pi_gt_three] - apply ne_of_gt - unfold vStar - apply Real.cos_pos_of_mem_Ioo - constructor - · linarith [neg_abs_le (Real.sqrt 2 * lam * (u / L)), harg] - · linarith [le_abs_self (Real.sqrt 2 * lam * (u / L))] - · -- |u| ≥ 2L/3 > L/2: φ_D vanishes on a neighbourhood of u - have hopen : IsOpen {v : ℝ | L / 2 < |v|} := by - have : {v : ℝ | L / 2 < |v|} = (fun v : ℝ => |v|) ⁻¹' Set.Ioi (L / 2) := rfl - rw [this] - exact (continuous_abs).isOpen_preimage _ isOpen_Ioi - have hmem : u ∈ {v : ℝ | L / 2 < |v|} := by - simp only [Set.mem_setOf_eq] - calc L / 2 < 2 * L / 3 := by linarith - _ ≤ |u| := hu - apply ContDiffAt.congr_of_eventuallyEq (contDiffAt_const (c := 0)) - filter_upwards [hopen.mem_nhds hmem] with v hv - exact phiD_eq_zero hϱ hw (le_of_lt hv) - -/-- φ_D is nonincreasing in |u|: antitone on [0, ∞). -/ -theorem phiD_antitoneOn (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) (hw : 0 < w) - (hwL : 2 * w ≤ L) : AntitoneOn (phiD ϱ lam L w) (Set.Ici 0) := by - have hL : 0 < L := by linarith - intro x hx y hy hxy - simp only [Set.mem_Ici] at hx hy - rcases le_or_gt (L / 2) y with hYL | hYL - · rw [phiD_eq_zero hϱ hw (by rwa [abs_of_nonneg hy])] - exact phiD_nonneg hϱ x - · unfold phiD - have hcosx : 0 ≤ vStar lam (x / L) := by - have := cos_factor_ge (u := x) h0 h1 hL (by rw [abs_of_nonneg hx]; linarith) - linarith - have hdiv : x / L ≤ y / L := by gcongr - have hargle : Real.sqrt 2 * lam * (x / L) ≤ Real.sqrt 2 * lam * (y / L) := by - apply mul_le_mul_of_nonneg_left hdiv (by positivity) - have hypi : Real.sqrt 2 * lam * (y / L) ≤ π := by - have hs32 : Real.sqrt 2 ≤ 3 / 2 := by - nlinarith [Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 2), Real.sqrt_nonneg 2] - have hyd : y / L ≤ 1 / 2 := by - rw [div_le_iff₀ hL] - linarith - calc Real.sqrt 2 * lam * (y / L) ≤ (3 / 2) * 1 * (1 / 2) := by - apply mul_le_mul (mul_le_mul hs32 h1 h0.le (by norm_num)) hyd (by positivity) - (by norm_num) - _ ≤ π := by nlinarith [Real.pi_gt_three] - refine mul_le_mul ?_ ?_ (Taper.phi_nonneg hϱ y) (Real.sqrt_nonneg _) - · apply Real.sqrt_le_sqrt - unfold vStar - exact Real.cos_le_cos_of_nonneg_of_le_pi (by positivity) hypi hargle - · unfold Taper.phi - apply hϱ.monotone - rw [abs_of_nonneg hx, abs_of_nonneg hy] - gcongr - -/-! ### derivative norms (sentence 1 of §7.1, parenthetical + last clause) -/ - -/-- generic: an even C¹ function, nonincreasing on [0,∞), with values in [0,1] and support in -[−M, M], has total variation ∫|f'| ≤ 2 (= 2(f(0) − f(M))). Used for φ_D and φ_D². -/ -private theorem integral_abs_deriv_le_two {f : ℝ → ℝ} {M : ℝ} (hM : 0 < M) - (hf : ContDiff ℝ 1 f) (heven : ∀ x, f (-x) = f x) (hanti : AntitoneOn f (Set.Ici 0)) - (h1 : ∀ x, f x ≤ 1) (hsupp : ∀ x, M ≤ |x| → f x = 0) : - ∫ u, |deriv f u| ≤ 2 := by - have hd : Differentiable ℝ f := hf.differentiable (by norm_num) - have hd' : Continuous (deriv f) := hf.continuous_deriv le_rfl - -- deriv vanishes beyond the support - have hderiv0 : ∀ x : ℝ, M < |x| → deriv f x = 0 := by - intro x hx - have hopen : IsOpen {v : ℝ | M < |v|} := - (continuous_abs).isOpen_preimage _ isOpen_Ioi - have hEq : f =ᶠ[nhds x] (fun _ => (0:ℝ)) := by - filter_upwards [hopen.mem_nhds hx] with v hv - exact hsupp v (le_of_lt hv) - rw [hEq.deriv_eq, deriv_const] - -- |deriv f| is even - have hodd : ∀ x : ℝ, |deriv f (-x)| = |deriv f x| := by - intro x - have hfe : (fun y : ℝ => f (-y)) = f := funext heven - have h := deriv_comp_neg (f := f) (x := x) - rw [hfe] at h - have h' : deriv f (-x) = -deriv f x := by linarith - rw [h', abs_neg] - -- reduce to (0, ∞) - have habs : (fun u : ℝ => |deriv f u|) = fun u => (fun t => |deriv f t|) |u| := by - funext u - show |deriv f u| = |deriv f (|u|)| - rcases le_or_gt 0 u with h | h - · rw [abs_of_nonneg h] - · rw [abs_of_neg h, hodd] - have hhalf : ∫ u, |deriv f u| = 2 * ∫ u in Set.Ioi 0, |deriv f u| := by - conv_lhs => rw [habs] - exact integral_comp_abs (f := fun t => |deriv f t|) - -- integrability - have hcs : HasCompactSupport (deriv f) := by - apply HasCompactSupport.of_support_subset_isCompact (isCompact_Icc (a := -M) (b := M)) - intro x hx - rw [Function.mem_support] at hx - by_contra hmem - apply hx - apply hderiv0 - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hmem - rcases hmem with h | h - · rw [abs_of_neg (by linarith)]; linarith - · rw [abs_of_pos (by linarith)]; linarith - have hint : Integrable (fun u => |deriv f u|) := - (hd'.integrable_of_hasCompactSupport hcs).abs - -- split (0, ∞) = (0, M] ∪ (M, ∞); the far part vanishes - have hsplit : ∫ u in Set.Ioi 0, |deriv f u| - = (∫ u in Set.Ioc 0 M, |deriv f u|) + ∫ u in Set.Ioi M, |deriv f u| := by - rw [← MeasureTheory.setIntegral_union (Set.Ioc_disjoint_Ioi le_rfl) measurableSet_Ioi - hint.integrableOn hint.integrableOn, Set.Ioc_union_Ioi_eq_Ioi hM.le] - have hfar : ∫ u in Set.Ioi M, |deriv f u| = 0 := by - apply MeasureTheory.setIntegral_eq_zero_of_forall_eq_zero - intro x hx - rw [hderiv0 x (by rw [abs_of_pos (lt_trans hM hx)]; exact hx), abs_zero] - -- on (0, M]: |f'| = −f' (antitone), and FTC - have hneg : ∀ x ∈ Set.Ioc 0 M, |deriv f x| = -deriv f x := by - intro x hx - have hx0 : 0 < x := hx.1 - have hle : deriv f x ≤ 0 := by - have hmem : Set.Ici (0:ℝ) ∈ nhds x := Ici_mem_nhds hx0 - rw [← derivWithin_of_mem_nhds hmem] - exact hanti.derivWithin_nonpos - rw [abs_of_nonpos hle] - have hFTC : ∫ u in (0:ℝ)..M, deriv f u = f M - f 0 := - intervalIntegral.integral_deriv_eq_sub (fun x _ => hd x) - ((hd'.intervalIntegrable) 0 M) - have hnear : ∫ u in Set.Ioc 0 M, |deriv f u| = f 0 - f M := by - rw [MeasureTheory.setIntegral_congr_fun measurableSet_Ioc hneg] - rw [← intervalIntegral.integral_of_le hM.le] at * - rw [intervalIntegral.integral_neg, hFTC] - ring - have hfM : f M = 0 := hsupp M (by rw [abs_of_pos hM]) - have hf0 : f 0 ≤ 1 := h1 0 - rw [hhalf, hsplit, hfar, hnear, hfM] - linarith - -/-- ‖φ_D'‖₁ ≤ 2 (even, nonincreasing in |u|, 0 ≤ φ_D ≤ 1, compact support). -/ -theorem integral_abs_deriv_phiD_le (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) - (hw : 0 < w) (hwL : 2 * w ≤ L) : ∫ u, |deriv (phiD ϱ lam L w) u| ≤ 2 := by - have hL : 0 < L := by linarith - exact integral_abs_deriv_le_two (by positivity : (0:ℝ) < L / 2) - ((phiD_contDiff hϱ h0 h1 hw hwL).of_le (by norm_num)) phiD_even - (phiD_antitoneOn hϱ h0 h1 hw hwL) (phiD_le_one hϱ) - (fun x hx => phiD_eq_zero hϱ hw hx) - -/-- ‖(φ_D²)'‖₁ ≤ 2 (same mechanism for φ_D²). -/ -theorem integral_abs_deriv_phiD_sq_le (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) - (hw : 0 < w) (hwL : 2 * w ≤ L) : - ∫ u, |deriv (fun u => phiD ϱ lam L w u ^ 2) u| ≤ 2 := by - have hL : 0 < L := by linarith - refine integral_abs_deriv_le_two (by positivity : (0:ℝ) < L / 2) - (((phiD_contDiff hϱ h0 h1 hw hwL).pow 2).of_le (by norm_num)) ?_ ?_ ?_ ?_ - · intro x - rw [phiD_even] - · intro x hx y hy hxy - exact pow_le_pow_left₀ (phiD_nonneg hϱ y) - (phiD_antitoneOn hϱ h0 h1 hw hwL hx hy hxy) 2 - · intro x - calc phiD ϱ lam L w x ^ 2 ≤ 1 ^ 2 := - pow_le_pow_left₀ (phiD_nonneg hϱ x) (phiD_le_one hϱ x) 2 - _ = 1 := one_pow 2 - · intro x hx - rw [phiD_eq_zero hϱ hw hx, zero_pow two_ne_zero] - -/-- ‖φ_D''‖₁ ≤ C(ϱ, λ)/w: explicit window-constant (the §7.1 "≪ 1" with w-dependence kept, -matching [eq:phinorms]'s shape; cDT plays the role of c_ϱ for this window). -/ -def cDT (ϱ : ℝ → ℝ) (lam : ℝ) : ℝ := - 64 * (Taper.cRho ϱ + 1) * (1 + lam ^ 2) - -/-- φ_D² = (cosine factor) · φ², with no square root: (√v)² = v wherever φ ≠ 0 (there v ≥ 3/4), -and both sides vanish elsewhere. -/ -theorem phiD_sq_eq (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) (hw : 0 < w) - (hwL : 2 * w ≤ L) : - (fun u => phiD ϱ lam L w u ^ 2) - = fun u => vStar lam (u / L) * Taper.phi ϱ L w u ^ 2 := by - have hL : 0 < L := by linarith - funext u - unfold phiD - rcases le_or_gt (L / 2) |u| with hu | hu - · rw [Taper.phi_eq_zero hϱ hw hu] - ring - · have hv : 0 ≤ vStar lam (u / L) := by - have := cos_factor_ge h0 h1 hL hu.le - linarith - - rw [mul_pow, Real.sq_sqrt hv] - -private theorem hasDerivAt_cosFactor (u : ℝ) : +/-- on `|u| < 2L/3` (`0 < λ ≤ 1`, `L > 0`), `vStar lam (u / L) > 1/2`. -/ +private lemma vStar_gt_half (h0 : 0 < lam) (h1 : lam ≤ 1) (hL : 0 < L) {u : ℝ} + (hu : |u| < 2 * L / 3) : 1 / 2 < vStar lam (u / L) := by + have hs32 : Real.sqrt 2 ≤ 3 / 2 := by + nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2), Real.sqrt_nonneg 2] + have h1' : Real.sqrt 2 * lam ≤ 3 / 2 := + (mul_le_mul hs32 h1 h0.le (by norm_num)).trans_eq (mul_one _) + have h2' : |u| / L < 2 / 3 := by rw [div_lt_iff₀ hL]; linarith + have habs : |Real.sqrt 2 * lam * (u / L)| < 1 := by + rw [abs_mul, abs_div, abs_of_nonneg (by positivity : (0 : ℝ) ≤ Real.sqrt 2 * lam), + abs_of_pos hL] + calc Real.sqrt 2 * lam * (|u| / L) ≤ (3 / 2) * (|u| / L) := + mul_le_mul_of_nonneg_right h1' (by positivity) + _ < (3 / 2) * (2 / 3) := mul_lt_mul_of_pos_left h2' (by norm_num) + _ = 1 := by norm_num + have harg2 : (Real.sqrt 2 * lam * (u / L)) ^ 2 < 1 := by + rw [← sq_abs]; exact (pow_lt_pow_left₀ habs (abs_nonneg _) (by norm_num)).trans_eq (one_pow 2) + have := Real.one_sub_sq_div_two_le_cos (x := Real.sqrt 2 * lam * (u / L)) + unfold vStar; linarith + +private lemma vStar_pos_core (h0 : 0 < lam) (h1 : lam ≤ 1) {s : ℝ} + (hs : s ∈ Icc (-(1 / 2 : ℝ)) (1 / 2)) : 0 < vStar lam s := by + have h := vStar_gt_half h0 h1 one_pos (u := s) (by + have := abs_le.mpr ⟨hs.1, hs.2⟩; linarith) + simpa using (by linarith : (0 : ℝ) < vStar lam (s / 1)) + +private lemma hasDerivAt_vStar (u : ℝ) : HasDerivAt (fun u : ℝ => vStar lam (u / L)) - (-(Real.sqrt 2 * lam * (1 / L)) * Real.sin (Real.sqrt 2 * lam * (u / L))) u := by + (-(Real.sqrt 2 * lam / L) * Real.sin (Real.sqrt 2 * lam * (u / L))) u := by have hlin : HasDerivAt (fun u : ℝ => Real.sqrt 2 * lam * (u / L)) (Real.sqrt 2 * lam * (1 / L)) u := by simpa using ((hasDerivAt_id u).div_const L).const_mul (Real.sqrt 2 * lam) - have h := (Real.hasDerivAt_cos (Real.sqrt 2 * lam * (u / L))).comp u hlin unfold vStar - exact h.congr_deriv (by ring) + exact ((Real.hasDerivAt_cos _).comp u hlin).congr_deriv (by ring) -private theorem hasDerivAt_cosFactor' (u : ℝ) : - HasDerivAt (fun u : ℝ => -(Real.sqrt 2 * lam * (1 / L)) - * Real.sin (Real.sqrt 2 * lam * (u / L))) - (-(Real.sqrt 2 * lam * (1 / L)) ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) u := by +private lemma hasDerivAt_vStar' (u : ℝ) : + HasDerivAt (fun u : ℝ => -(Real.sqrt 2 * lam / L) * Real.sin (Real.sqrt 2 * lam * (u / L))) + (-(Real.sqrt 2 * lam / L) ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) u := by have hlin : HasDerivAt (fun u : ℝ => Real.sqrt 2 * lam * (u / L)) (Real.sqrt 2 * lam * (1 / L)) u := by simpa using ((hasDerivAt_id u).div_const L).const_mul (Real.sqrt 2 * lam) - have h := ((Real.hasDerivAt_sin (Real.sqrt 2 * lam * (u / L))).comp u hlin).const_mul - (-(Real.sqrt 2 * lam * (1 / L))) - exact h.congr_deriv (by ring) - -/-- restriction of ∫|g| to the support interval (g vanishing outside). -/ -private theorem integral_abs_eq_setIntegral {g : ℝ → ℝ} {M : ℝ} (hM : 0 ≤ M) - (h0 : ∀ x : ℝ, M < |x| → g x = 0) : - ∫ u, |g u| = ∫ u in Set.Icc (-M) M, |g u| := by - rw [MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero] - intro x hx - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hx - have hMx : M < |x| := by - rcases hx with h | h - · rw [abs_of_neg (by linarith : x < 0)] - linarith - · rw [abs_of_pos (by linarith : 0 < x)] - linarith - rw [h0 x hMx, abs_zero] - -/-- second derivatives vanish beyond the support. -/ -private theorem deriv2_eq_zero_outside {f : ℝ → ℝ} {M : ℝ} - (hsupp : ∀ x : ℝ, M ≤ |x| → f x = 0) {x : ℝ} (hx : M < |x|) : - deriv (deriv f) x = 0 := by - have hopen : IsOpen {v : ℝ | M < |v|} := (continuous_abs).isOpen_preimage _ isOpen_Ioi - have h1 : deriv f =ᶠ[nhds x] (fun _ => (0:ℝ)) := by - have hmem := hopen.mem_nhds hx - filter_upwards [eventually_eventually_nhds.mpr hmem] with v hv - have hEq : f =ᶠ[nhds v] (fun _ => (0:ℝ)) := by - filter_upwards [hv] with t ht - exact hsupp t (le_of_lt ht) - rw [hEq.deriv_eq, deriv_const] - rw [h1.deriv_eq, deriv_const] - -theorem integral_abs_deriv2_phiD_sq_le (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) - (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - ∫ u, |deriv (deriv (fun u => phiD ϱ lam L w u ^ 2)) u| ≤ cDT ϱ lam / w := by - have hw0 : 0 < w := by linarith - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - have hs32 : Real.sqrt 2 ≤ 3 / 2 := by - nlinarith [Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 2), Real.sqrt_nonneg 2] - set ω : ℝ := Real.sqrt 2 * lam * (1 / L) with hωdef - have hω0 : 0 ≤ ω := by positivity - have hωle : ω ≤ 2 / L := by - rw [hωdef] - rw [div_eq_mul_one_div 2 L] - apply mul_le_mul_of_nonneg_right _ (by positivity) - nlinarith - -- names for the factors - set c : ℝ → ℝ := fun u => vStar lam (u / L) with hcdef - set g : ℝ → ℝ := fun u => Taper.phi ϱ L w u ^ 2 with hgdef - have hgC : ContDiff ℝ 3 g := (Taper.phi_contDiff hϱ hw0 hwL').pow 2 - have hgd : Differentiable ℝ g := hgC.differentiable (by norm_num) - have hg1C : ContDiff ℝ 2 (deriv g) := hgC.deriv' - have hg1d : Differentiable ℝ (deriv g) := hg1C.differentiable (by norm_num) - have hg1 : ∀ u, HasDerivAt g (deriv g u) u := fun u => (hgd u).hasDerivAt - have hg2 : ∀ u, HasDerivAt (deriv g) (deriv (deriv g) u) u := fun u => (hg1d u).hasDerivAt - -- first derivative of F := c·g - have hF1 : deriv (fun u => c u * g u) = fun u => (-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) - * g u + c u * deriv g u := by - funext u - exact ((hasDerivAt_cosFactor u).mul (hg1 u)).deriv - -- second derivative - have hF2 : ∀ u, deriv (deriv (fun u => c u * g u)) u - = (-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * g u - + 2 * ((-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * deriv g u) - + c u * deriv (deriv g) u := by - intro u - rw [hF1] - have hstep : HasDerivAt (fun u => (-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * g u - + c u * deriv g u) - ((-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * g u - + (-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * deriv g u - + ((-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * deriv g u - + c u * deriv (deriv g) u)) u := - (((hasDerivAt_cosFactor' u).mul (hg1 u)).add ((hasDerivAt_cosFactor u).mul (hg2 u))) - rw [hstep.deriv] - ring - -- rewrite the goal through φ_D² = c·g - rw [show (fun u => phiD ϱ lam L w u ^ 2) = fun u => c u * g u from - phiD_sq_eq hϱ h0 h1 hw0 hwL'] - -- support restriction - have hsupp : ∀ x : ℝ, L / 2 ≤ |x| → c x * g x = 0 := by - intro x hx - rw [hgdef] - simp only - rw [Taper.phi_eq_zero hϱ hw0 hx] - ring - have hrestr : ∫ u, |deriv (deriv (fun u => c u * g u)) u| - = ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv (fun u => c u * g u)) u| := - integral_abs_eq_setIntegral (by positivity) (fun x hx => deriv2_eq_zero_outside hsupp hx) - rw [hrestr] - -- pointwise bound and integration - have hgle : ∀ u, g u ≤ 1 := by - intro u - rw [hgdef] - simp only - calc Taper.phi ϱ L w u ^ 2 ≤ 1 ^ 2 := - pow_le_pow_left₀ (Taper.phi_nonneg hϱ u) (Taper.phi_le_one hϱ u) 2 - _ = 1 := one_pow 2 - have hg0 : ∀ u, 0 ≤ g u := fun u => sq_nonneg _ - have hcle : ∀ u, |c u| ≤ 1 := fun u => Real.abs_cos_le_one _ - have hpt : ∀ u, |deriv (deriv (fun u => c u * g u)) u| - ≤ ω ^ 2 + 2 * ω * |deriv g u| + |deriv (deriv g) u| := by - intro u - rw [hF2 u] - have e1 : |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * g u| ≤ ω ^ 2 := by - rw [abs_mul, abs_mul, abs_neg, abs_pow, abs_of_nonneg hω0] - calc ω ^ 2 * |Real.cos (Real.sqrt 2 * lam * (u / L))| * |g u| - ≤ ω ^ 2 * 1 * 1 := by - apply mul_le_mul (mul_le_mul_of_nonneg_left (Real.abs_cos_le_one _) (by positivity)) - (by rw [abs_of_nonneg (hg0 u)]; exact hgle u) (abs_nonneg _) (by positivity) - _ = ω ^ 2 := by ring - have e2 : |2 * ((-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * deriv g u)| - ≤ 2 * ω * |deriv g u| := by - rw [abs_mul, abs_mul, abs_mul, abs_neg, abs_of_nonneg hω0] - rw [show |(2:ℝ)| = 2 from abs_of_pos two_pos] - calc 2 * (ω * |Real.sin (Real.sqrt 2 * lam * (u / L))| * |deriv g u|) - ≤ 2 * (ω * 1 * |deriv g u|) := by - apply mul_le_mul_of_nonneg_left _ (by norm_num) - apply mul_le_mul_of_nonneg_right _ (abs_nonneg _) - exact mul_le_mul_of_nonneg_left (Real.abs_sin_le_one _) hω0 - _ = 2 * ω * |deriv g u| := by ring - have e3 : |c u * deriv (deriv g) u| ≤ |deriv (deriv g) u| := by - rw [abs_mul] - calc |c u| * |deriv (deriv g) u| ≤ 1 * |deriv (deriv g) u| := - mul_le_mul_of_nonneg_right (hcle u) (abs_nonneg _) - _ = _ := one_mul _ - calc |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * g u - + 2 * ((-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * deriv g u) - + c u * deriv (deriv g) u| - ≤ |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * g u - + 2 * ((-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * deriv g u)| - + |c u * deriv (deriv g) u| := abs_add_le _ _ - _ ≤ |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * g u| - + |2 * ((-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * deriv g u)| - + |c u * deriv (deriv g) u| := by - linarith [abs_add_le ((-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * g u) - (2 * ((-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * deriv g u))] - _ ≤ _ := by linarith [e1, e2, e3] - -- integrability of the majorant pieces (continuous with compact support / on compact) - have hg1cont : Continuous (deriv g) := hg1C.continuous - have hg2cont : Continuous (deriv (deriv g)) := hg1C.continuous_deriv (by norm_num) - have iconst : MeasureTheory.IntegrableOn (fun _ : ℝ => (ω ^ 2 : ℝ)) - (Set.Icc (-(L/2)) (L/2)) := - MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top) - have iabs1 : MeasureTheory.IntegrableOn (fun u => 2 * ω * |deriv g u|) - (Set.Icc (-(L/2)) (L/2)) := - ((hg1cont.abs.continuousOn).integrableOn_compact isCompact_Icc).const_mul _ - have iabs2 : MeasureTheory.IntegrableOn (fun u => |deriv (deriv g) u|) - (Set.Icc (-(L/2)) (L/2)) := - (hg2cont.abs.continuousOn).integrableOn_compact isCompact_Icc - have isum : MeasureTheory.IntegrableOn (fun u => ω ^ 2 + 2 * ω * |deriv g u|) - (Set.Icc (-(L/2)) (L/2)) := - ((by fun_prop : Continuous fun u : ℝ => ω ^ 2 + 2 * ω * |deriv g u|)).continuousOn.integrableOn_compact - isCompact_Icc - have hmajint : MeasureTheory.IntegrableOn - (fun u => ω ^ 2 + 2 * ω * |deriv g u| + |deriv (deriv g) u|) - (Set.Icc (-(L/2)) (L/2)) := - ((by fun_prop : Continuous fun u : ℝ => - ω ^ 2 + 2 * ω * |deriv g u| + |deriv (deriv g) u|)).continuousOn.integrableOn_compact - isCompact_Icc - have hmono : ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv (fun u => c u * g u)) u| - ≤ ∫ u in Set.Icc (-(L/2)) (L/2), - (ω ^ 2 + 2 * ω * |deriv g u| + |deriv (deriv g) u|) := by - apply MeasureTheory.integral_mono_of_nonneg - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _) hmajint - (MeasureTheory.ae_of_all _ fun u => hpt u) - refine le_trans hmono ?_ - -- evaluate the majorant integral - have hIg1 : Integrable (fun u => |deriv g u|) := by - apply hg1cont.abs.integrable_of_hasCompactSupport - apply HasCompactSupport.abs - apply HasCompactSupport.of_support_subset_isCompact - (isCompact_Icc (a := -(L/2)) (b := L/2)) - intro x hx - rw [Function.mem_support] at hx - by_contra hmem - apply hx - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hmem - have : L / 2 < |x| := by - rcases hmem with h | h - · rw [abs_of_neg (by linarith)]; linarith - · rw [abs_of_pos (by linarith)]; linarith - -- deriv g = 0 beyond the support of g - have hopen : IsOpen {v : ℝ | L / 2 < |v|} := (continuous_abs).isOpen_preimage _ isOpen_Ioi - have hEq : g =ᶠ[nhds x] (fun _ => (0:ℝ)) := by - filter_upwards [hopen.mem_nhds this] with v hv - rw [hgdef] - simp only - rw [Taper.phi_eq_zero hϱ hw0 (le_of_lt hv), zero_pow two_ne_zero] - rw [hEq.deriv_eq, deriv_const] - have hIg2 : Integrable (fun u => |deriv (deriv g) u|) := by - apply hg2cont.abs.integrable_of_hasCompactSupport - apply HasCompactSupport.abs - apply HasCompactSupport.of_support_subset_isCompact - (isCompact_Icc (a := -(L/2)) (b := L/2)) - intro x hx - rw [Function.mem_support] at hx - by_contra hmem - apply hx - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hmem - have hgt : L / 2 < |x| := by - rcases hmem with h | h - · rw [abs_of_neg (by linarith)]; linarith - · rw [abs_of_pos (by linarith)]; linarith - exact deriv2_eq_zero_outside (fun t ht => by - rw [hgdef]; simp only; rw [Taper.phi_eq_zero hϱ hw0 ht, zero_pow two_ne_zero]) hgt - have hsplit2 : ∫ u in Set.Icc (-(L/2)) (L/2), - (ω ^ 2 + 2 * ω * |deriv g u| + |deriv (deriv g) u|) - ≤ ω ^ 2 * L + 2 * ω * 2 + Taper.cRho ϱ / w := by - have ea : ∫ u in Set.Icc (-(L/2)) (L/2), (ω ^ 2 + 2 * ω * |deriv g u|) - = (∫ u in Set.Icc (-(L/2)) (L/2), (ω ^ 2 : ℝ)) - + ∫ u in Set.Icc (-(L/2)) (L/2), (2 * ω * |deriv g u|) := - MeasureTheory.integral_add iconst iabs1 - have eb : ∫ u in Set.Icc (-(L/2)) (L/2), (2 * ω * |deriv g u|) - = 2 * ω * ∫ u in Set.Icc (-(L/2)) (L/2), |deriv g u| := - MeasureTheory.integral_const_mul _ _ - have e1 : ∫ u in Set.Icc (-(L/2)) (L/2), (ω ^ 2 + 2 * ω * |deriv g u| - + |deriv (deriv g) u|) - = (∫ u in Set.Icc (-(L/2)) (L/2), (ω ^ 2 : ℝ)) - + 2 * ω * (∫ u in Set.Icc (-(L/2)) (L/2), |deriv g u|) - + ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv g) u| := by - calc ∫ u in Set.Icc (-(L/2)) (L/2), (ω ^ 2 + 2 * ω * |deriv g u| + |deriv (deriv g) u|) - = (∫ u in Set.Icc (-(L/2)) (L/2), (ω ^ 2 + 2 * ω * |deriv g u|)) - + ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv g) u| := - MeasureTheory.integral_add isum iabs2 - _ = _ := by rw [ea, eb] - rw [e1] - have c1 : ∫ u in Set.Icc (-(L/2)) (L/2), (ω ^ 2 : ℝ) ≤ ω ^ 2 * L := by - rw [MeasureTheory.setIntegral_const, MeasureTheory.measureReal_def, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), smul_eq_mul] - nlinarith [sq_nonneg ω] - have c2 : ∫ u in Set.Icc (-(L/2)) (L/2), |deriv g u| ≤ 2 := by - refine le_trans (MeasureTheory.setIntegral_le_integral hIg1 - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _)) ?_ - rw [hgdef] - exact le_of_eq (Taper.integral_abs_deriv_phi_sq hϱ hw0 hwL') - have c3 : ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv g) u| ≤ Taper.cRho ϱ / w := by - refine le_trans (MeasureTheory.setIntegral_le_integral hIg2 - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _)) ?_ - rw [hgdef] - exact Taper.integral_abs_deriv2_phi_sq_le hϱ hw hwL' - have hω0' : (0:ℝ) ≤ 2 * ω := by positivity - nlinarith [mul_le_mul_of_nonneg_left c2 hω0'] - refine le_trans hsplit2 ?_ - -- final arithmetic: ω ≤ 2/L, L ≥ 8w, cRho ≥ 4 - have hcr := Taper.cRho_eq ϱ - have hc4 : (0:ℝ) ≤ Taper.cRho ϱ := by - have := Taper.four_le_cRho hϱ - linarith - have hωL : ω ^ 2 * L ≤ 4 / L := by - calc ω ^ 2 * L ≤ (2/L) ^ 2 * L := by - apply mul_le_mul_of_nonneg_right (pow_le_pow_left₀ hω0 hωle 2) hL.le - _ = 4 / L := by field_simp; ring - - have hLw : 1 / L ≤ 1 / (8 * w) := by - apply one_div_le_one_div_of_le (by positivity) hwL - have hfin : 4 / L + 2 * ω * 2 + Taper.cRho ϱ / w ≤ cDT ϱ lam / w := by - have h4L : 4 / L ≤ 1 / w := by - rw [div_le_div_iff₀ hL hw0] - linarith - have h2ω : 2 * ω * 2 ≤ 1 / w := by - have h8 : 8 / L ≤ 1 / w := by - rw [div_le_div_iff₀ hL hw0] - linarith - have h4ω : 2 * ω * 2 ≤ 8 / L := by - have := hωle - have e : (8:ℝ) / L = 4 * (2 / L) := by ring - rw [e] - linarith - linarith - have hcdt : (2 + Taper.cRho ϱ) / w ≤ cDT ϱ lam / w := by - apply div_le_div_of_nonneg_right ?_ hw0.le - unfold cDT - nlinarith [hc4, sq_nonneg lam] - have : 4 / L + 2 * ω * 2 + Taper.cRho ϱ / w ≤ (2 + Taper.cRho ϱ) / w := by - have expand : (2 + Taper.cRho ϱ) / w = 1 / w + 1 / w + Taper.cRho ϱ / w := by - field_simp - ring - rw [expand] - linarith [h4L, h2ω] - linarith [hcdt] - linarith [hωL, hfin] + exact (((Real.hasDerivAt_sin _).comp u hlin).const_mul (-(Real.sqrt 2 * lam / L))).congr_deriv + (by ring) -set_option maxHeartbeats 1000000 in -theorem integral_abs_deriv2_phiD_le (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) - (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - ∫ u, |deriv (deriv (phiD ϱ lam L w)) u| ≤ cDT ϱ lam / w := by - have hw0 : 0 < w := by linarith - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith +/-- `cosD lam L` satisfies `ModFactor` with `A = 2`, `B = 16`. -/ +theorem modFactor_cosD (h0 : 0 < lam) (h1 : lam ≤ 1) (hL : 0 < L) : + ModFactor (cosD lam L) L 2 16 := by + set ω : ℝ := Real.sqrt 2 * lam / L with hωdef have hs32 : Real.sqrt 2 ≤ 3 / 2 := by - nlinarith [Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 2), Real.sqrt_nonneg 2] - set ω : ℝ := Real.sqrt 2 * lam * (1 / L) with hωdef + nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2), Real.sqrt_nonneg 2] have hω0 : 0 ≤ ω := by positivity have hωle : ω ≤ 2 / L := by - rw [hωdef, div_eq_mul_one_div 2 L] - apply mul_le_mul_of_nonneg_right _ (by positivity) - nlinarith - set c : ℝ → ℝ := fun u => vStar lam (u / L) with hcdef - set U : Set ℝ := {v : ℝ | |v| < 2 * L / 3} with hUdef - have hUopen : IsOpen U := (continuous_abs).isOpen_preimage _ isOpen_Iio - have hIccU : Set.Icc (-(L/2)) (L/2) ⊆ U := by - intro x hx - show |x| < 2 * L / 3 - have : |x| ≤ L / 2 := abs_le.mpr ⟨hx.1, hx.2⟩ - linarith - have hUc : ∀ u ∈ U, 1 / 2 < c u := by - intro u hu - have hu' : |u| < 2 * L / 3 := hu - have h1' : Real.sqrt 2 * lam ≤ 3 / 2 := by - calc Real.sqrt 2 * lam ≤ (3/2) * 1 := mul_le_mul hs32 h1 h0.le (by norm_num) - _ = 3 / 2 := mul_one _ - have h2' : |u| / L < 2 / 3 := by - rw [div_lt_iff₀ hL] - linarith - have habs : |Real.sqrt 2 * lam * (u / L)| < 1 := by - rw [abs_mul, abs_div, abs_of_nonneg (by positivity : (0:ℝ) ≤ Real.sqrt 2 * lam), - abs_of_pos hL] - calc Real.sqrt 2 * lam * (|u| / L) ≤ (3/2) * (|u| / L) := - mul_le_mul_of_nonneg_right h1' (by positivity) - _ < (3/2) * (2/3) := mul_lt_mul_of_pos_left h2' (by norm_num) - _ = 1 := by norm_num - have harg2 : (Real.sqrt 2 * lam * (u / L)) ^ 2 < 1 := by - calc (Real.sqrt 2 * lam * (u / L)) ^ 2 = |Real.sqrt 2 * lam * (u / L)| ^ 2 := - (sq_abs _).symm - _ < 1 ^ 2 := by - apply pow_lt_pow_left₀ habs (abs_nonneg _) (by norm_num) - _ = 1 := one_pow 2 - have := Real.one_sub_sq_div_two_le_cos (x := Real.sqrt 2 * lam * (u / L)) - rw [hcdef] - simp only - unfold vStar - linarith - have hUc0 : ∀ u ∈ U, c u ≠ 0 := fun u hu => by linarith [hUc u hu] - have hsqrtc : ∀ u ∈ U, 1 / 2 ≤ Real.sqrt (c u) := by - intro u hu - rw [show (1:ℝ)/2 = Real.sqrt ((1/2)^2) from (Real.sqrt_sq (by norm_num)).symm] - apply Real.sqrt_le_sqrt - nlinarith [hUc u hu] - have hsqrtc1 : ∀ u : ℝ, Real.sqrt (c u) ≤ 1 := by - intro u - rw [show (1:ℝ) = Real.sqrt 1 from Real.sqrt_one.symm] + rw [hωdef]; gcongr; nlinarith + set U : Set ℝ := Ioo (-(L / 2 + L / 6)) (L / 2 + L / 6) with hUdef + have hU_abs : ∀ u ∈ U, |u| < 2 * L / 3 := fun u hu => by + rw [abs_lt]; constructor <;> linarith [hu.1, hu.2] + have hUc : ∀ u ∈ U, 1 / 2 < vStar lam (u / L) := fun u hu => vStar_gt_half h0 h1 hL (hU_abs u hu) + have hcoreU : ∀ u, |u| ≤ L / 2 → u ∈ U := fun u hu => by + rw [hUdef, mem_Ioo]; constructor <;> linarith [neg_abs_le u, le_abs_self u] + have hsqrt_ge : ∀ u ∈ U, 1 / 2 ≤ cosD lam L u := fun u hu => by + unfold cosD + rw [show (1 : ℝ) / 2 = Real.sqrt ((1 / 2) ^ 2) from (Real.sqrt_sq (by norm_num)).symm] + exact Real.sqrt_le_sqrt (by linarith [hUc u hu]) + have hsqrt_le : ∀ u, cosD lam L u ≤ 1 := fun u => by + unfold cosD + rw [show (1 : ℝ) = Real.sqrt 1 from Real.sqrt_one.symm] + exact Real.sqrt_le_sqrt (Real.cos_le_one _) + set q1 : ℝ → ℝ := fun u => + (-(ω * Real.sin (Real.sqrt 2 * lam * (u / L)))) / (2 * cosD lam L u) with hq1def + have hq1 : ∀ u ∈ U, HasDerivAt (cosD lam L) (q1 u) u := fun u hu => by + have h := (hasDerivAt_vStar (lam := lam) (L := L) u).sqrt (by linarith [hUc u hu]) + refine h.congr_deriv ?_ + simp only [hq1def, hωdef, cosD]; ring + have hq1_le : ∀ u ∈ U, |q1 u| ≤ ω := fun u hu => by + have hden : 1 ≤ |2 * cosD lam L u| := by + rw [abs_of_pos (by linarith [hsqrt_ge u hu])]; linarith [hsqrt_ge u hu] + rw [hq1def, abs_div, abs_neg, abs_mul, abs_of_nonneg hω0] + calc ω * |Real.sin (Real.sqrt 2 * lam * (u / L))| / |2 * cosD lam L u| + ≤ ω * 1 / 1 := div_le_div₀ (by positivity) + (mul_le_mul_of_nonneg_left (Real.abs_sin_le_one _) hω0) one_pos hden + _ = ω := by ring + refine ⟨by norm_num, by norm_num, ?_, fun _ => Real.sqrt_nonneg _, fun u _ => hsqrt_le u, + ?_, ⟨L / 6, by positivity, ?_⟩, ?_, ?_⟩ + · intro u; unfold cosD vStar; norm_num [neg_div, mul_neg, Real.cos_neg] + · intro x hx y hy hxy + have hx0 : 0 ≤ x := hx.1 + have hy0 : 0 ≤ y := hy.1 + unfold cosD vStar apply Real.sqrt_le_sqrt - rw [hcdef] - simp only - unfold vStar - exact Real.cos_le_one _ - -- cosine-factor derivatives (global) - have hc1 : ∀ u : ℝ, HasDerivAt c (-ω * Real.sin (Real.sqrt 2 * lam * (u / L))) u := by - intro u - have h := hasDerivAt_cosFactor (lam := lam) (L := L) u - rw [hcdef] - convert h using 1 - set c1 : ℝ → ℝ := fun u => -ω * Real.sin (Real.sqrt 2 * lam * (u / L)) with hc1def - have hc2 : ∀ u : ℝ, HasDerivAt c1 (-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) u := by - intro u - have h := hasDerivAt_cosFactor' (lam := lam) (L := L) u - have e : c1 = fun u : ℝ => -(Real.sqrt 2 * lam * (1 / L)) - * Real.sin (Real.sqrt 2 * lam * (u / L)) := by - rw [hc1def, hωdef] - rw [e] - convert h using 1 - have hc1abs : ∀ u : ℝ, |c1 u| ≤ ω := by - intro u - rw [hc1def] - simp only - rw [abs_mul, abs_neg, abs_of_nonneg hω0] - calc ω * |Real.sin (Real.sqrt 2 * lam * (u / L))| ≤ ω * 1 := - mul_le_mul_of_nonneg_left (Real.abs_sin_le_one _) hω0 - _ = ω := mul_one _ - have hc2abs : ∀ u : ℝ, |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L)))| ≤ ω ^ 2 := by - intro u - rw [abs_mul, abs_neg, abs_pow, abs_of_nonneg hω0] - calc ω ^ 2 * |Real.cos (Real.sqrt 2 * lam * (u / L))| ≤ ω ^ 2 * 1 := - mul_le_mul_of_nonneg_left (Real.abs_cos_le_one _) (by positivity) - _ = ω ^ 2 := mul_one _ - -- √(cosine factor) and its derivatives on U - set q : ℝ → ℝ := fun u => Real.sqrt (c u) with hqdef - set q1 : ℝ → ℝ := fun u => c1 u / (2 * Real.sqrt (c u)) with hq1def - have hq1 : ∀ u ∈ U, HasDerivAt q (q1 u) u := fun u hu => (hc1 u).sqrt (hUc0 u hu) - have hq1abs : ∀ u ∈ U, |q1 u| ≤ ω := by - intro u hu - rw [hq1def] - simp only - rw [abs_div] - have hden : (1:ℝ) ≤ |2 * Real.sqrt (c u)| := by - rw [abs_of_pos (by nlinarith [hsqrtc u hu] : (0:ℝ) < 2 * Real.sqrt (c u))] - nlinarith [hsqrtc u hu] - calc |c1 u| / |2 * Real.sqrt (c u)| ≤ |c1 u| / 1 := - div_le_div_of_nonneg_left (abs_nonneg _) one_pos hden - _ = |c1 u| := div_one _ - _ ≤ ω := hc1abs u - set q2 : ℝ → ℝ := fun u => ((-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) - * (2 * Real.sqrt (c u)) - c1 u * (2 * q1 u)) / (2 * Real.sqrt (c u)) ^ 2 with hq2def - have hq2 : ∀ u ∈ U, HasDerivAt q1 (q2 u) u := by - intro u hu - have hden : (2 : ℝ) * Real.sqrt (c u) ≠ 0 := by nlinarith [hsqrtc u hu] - have h2q : HasDerivAt (fun y => 2 * Real.sqrt (c y)) (2 * q1 u) u := (hq1 u hu).const_mul 2 - exact (hc2 u).div h2q hden - have hq2abs : ∀ u ∈ U, |q2 u| ≤ 4 * ω ^ 2 := by - intro u hu - rw [hq2def] - simp only - rw [abs_div] - have hs05 := hsqrtc u hu - have hs1 := hsqrtc1 u - have hdenge : (1:ℝ) ≤ |(2 * Real.sqrt (c u)) ^ 2| := by - rw [abs_of_pos (by nlinarith : (0:ℝ) < (2 * Real.sqrt (c u)) ^ 2)] - nlinarith - have hnum : |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * (2 * Real.sqrt (c u)) - - c1 u * (2 * q1 u)| ≤ 4 * ω ^ 2 := by - have e1 : |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * (2 * Real.sqrt (c u))| - ≤ 2 * ω ^ 2 := by - rw [abs_mul] - calc |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L)))| * |2 * Real.sqrt (c u)| - ≤ ω ^ 2 * 2 := by - apply mul_le_mul (hc2abs u) ?_ (abs_nonneg _) (by positivity) - rw [abs_of_pos (by nlinarith : (0:ℝ) < 2 * Real.sqrt (c u))] - nlinarith - _ = 2 * ω ^ 2 := by ring - have e2 : |c1 u * (2 * q1 u)| ≤ 2 * ω ^ 2 := by - rw [abs_mul] - have h2q : |2 * q1 u| ≤ 2 * ω := by - rw [abs_mul, show |(2:ℝ)| = 2 from abs_of_pos two_pos] - exact mul_le_mul_of_nonneg_left (hq1abs u hu) (by norm_num) - calc |c1 u| * |2 * q1 u| ≤ ω * (2 * ω) := - mul_le_mul (hc1abs u) h2q (abs_nonneg _) hω0 - _ = 2 * ω ^ 2 := by ring - calc |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * (2 * Real.sqrt (c u)) - - c1 u * (2 * q1 u)| - ≤ |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * (2 * Real.sqrt (c u))| - + |c1 u * (2 * q1 u)| := abs_sub _ _ - _ ≤ 4 * ω ^ 2 := by linarith - calc |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * (2 * Real.sqrt (c u)) - - c1 u * (2 * q1 u)| / |(2 * Real.sqrt (c u)) ^ 2| - ≤ |(-ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * (2 * Real.sqrt (c u)) - - c1 u * (2 * q1 u)| / 1 := - div_le_div_of_nonneg_left (abs_nonneg _) one_pos hdenge - _ ≤ 4 * ω ^ 2 := by rw [div_one]; exact hnum - -- φ and its derivatives - set φf : ℝ → ℝ := Taper.phi ϱ L w with hφdef - have hφC : ContDiff ℝ 3 φf := Taper.phi_contDiff hϱ hw0 hwL' - have hφd : Differentiable ℝ φf := hφC.differentiable (by norm_num) - have hφ1C : ContDiff ℝ 2 (deriv φf) := hφC.deriv' - have hφ1d : Differentiable ℝ (deriv φf) := hφ1C.differentiable (by norm_num) - have hφ1 : ∀ u, HasDerivAt φf (deriv φf u) u := fun u => (hφd u).hasDerivAt - have hφ2 : ∀ u, HasDerivAt (deriv φf) (deriv (deriv φf) u) u := fun u => (hφ1d u).hasDerivAt - have hφ1cont : Continuous (deriv φf) := hφ1C.continuous - have hφ2cont : Continuous (deriv (deriv φf)) := hφ1C.continuous_deriv (by norm_num) - -- first derivative of φ_D on U - have hD1 : ∀ u ∈ U, HasDerivAt (phiD ϱ lam L w) (q1 u * φf u + q u * deriv φf u) u := by - intro u hu - have h := (hq1 u hu).mul (hφ1 u) - exact h - have hder1 : ∀ u ∈ U, deriv (phiD ϱ lam L w) u = q1 u * φf u + q u * deriv φf u := - fun u hu => (hD1 u hu).deriv - -- second derivative on U - have hdd : ∀ x ∈ U, deriv (deriv (phiD ϱ lam L w)) x - = q2 x * φf x + 2 * (q1 x * deriv φf x) + q x * deriv (deriv φf) x := by - intro x hx - have hEq : deriv (phiD ϱ lam L w) =ᶠ[nhds x] - (fun u => q1 u * φf u + q u * deriv φf u) := by - filter_upwards [hUopen.mem_nhds hx] with v hv - exact hder1 v hv + apply Real.cos_le_cos_of_nonneg_of_le_pi (by positivity) _ (by gcongr) + have hyd : y / L ≤ 1 / 2 := by rw [div_le_iff₀ hL]; linarith [hy.2] + calc Real.sqrt 2 * lam * (y / L) ≤ (3 / 2) * 1 * (1 / 2) := + mul_le_mul (mul_le_mul hs32 h1 h0.le (by norm_num)) hyd + (by positivity) (by norm_num) + _ ≤ π := by linarith [Real.pi_gt_three] + · intro u hu + have hcd : ContDiffAt ℝ 2 (fun x => vStar lam (x / L)) u := by + unfold vStar + exact (Real.contDiff_cos.comp (by fun_prop : ContDiff ℝ 2 fun x => + Real.sqrt 2 * lam * (x / L))).contDiffAt + exact (hcd.sqrt (by linarith [hUc u hu])).contDiffWithinAt + · intro u hu + rw [(hq1 u (hcoreU u hu)).deriv] + exact (hq1_le u (hcoreU u hu)).trans hωle + · intro u hu + have huU := hcoreU u hu + have hEq : deriv (cosD lam L) =ᶠ[nhds u] q1 := by + filter_upwards [isOpen_Ioo.mem_nhds huU] with v hv using (hq1 v hv).deriv rw [hEq.deriv_eq] - have hstep : HasDerivAt (fun u => q1 u * φf u + q u * deriv φf u) - (q2 x * φf x + q1 x * deriv φf x + (q1 x * deriv φf x + q x * deriv (deriv φf) x)) x := - ((hq2 x hx).mul (hφ1 x)).add ((hq1 x hx).mul (hφ2 x)) - rw [hstep.deriv] - ring - -- support restriction - have hsuppD : ∀ x : ℝ, L / 2 ≤ |x| → phiD ϱ lam L w x = 0 := fun x hx => - phiD_eq_zero hϱ hw0 hx - have hrestr : ∫ u, |deriv (deriv (phiD ϱ lam L w)) u| - = ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv (phiD ϱ lam L w)) u| := - integral_abs_eq_setIntegral (by positivity) - (fun x hx => deriv2_eq_zero_outside hsuppD hx) - rw [hrestr] - -- pointwise bound on the support interval - have hpt : ∀ u ∈ Set.Icc (-(L/2)) (L/2), |deriv (deriv (phiD ϱ lam L w)) u| - ≤ 4 * ω ^ 2 + 2 * ω * |deriv φf u| + |deriv (deriv φf) u| := by - intro u hu - have huU := hIccU hu - rw [hdd u huU] - have e1 : |q2 u * φf u| ≤ 4 * ω ^ 2 := by - rw [abs_mul] - calc |q2 u| * |φf u| ≤ (4 * ω ^ 2) * 1 := by - apply mul_le_mul (hq2abs u huU) ?_ (abs_nonneg _) (by positivity) - rw [hφdef, abs_of_nonneg (Taper.phi_nonneg hϱ u)] - exact Taper.phi_le_one hϱ u - _ = 4 * ω ^ 2 := mul_one _ - have e2 : |2 * (q1 u * deriv φf u)| ≤ 2 * ω * |deriv φf u| := by - rw [abs_mul, abs_mul, show |(2:ℝ)| = 2 from abs_of_pos two_pos] - calc 2 * (|q1 u| * |deriv φf u|) ≤ 2 * (ω * |deriv φf u|) := by - apply mul_le_mul_of_nonneg_left _ (by norm_num) - exact mul_le_mul_of_nonneg_right (hq1abs u huU) (abs_nonneg _) - _ = 2 * ω * |deriv φf u| := by ring - have e3 : |q u * deriv (deriv φf) u| ≤ |deriv (deriv φf) u| := by - rw [abs_mul] - have : |q u| ≤ 1 := by - rw [hqdef, abs_of_nonneg (Real.sqrt_nonneg _)] - exact hsqrtc1 u - calc |q u| * |deriv (deriv φf) u| ≤ 1 * |deriv (deriv φf) u| := - mul_le_mul_of_nonneg_right this (abs_nonneg _) - _ = _ := one_mul _ - calc |q2 u * φf u + 2 * (q1 u * deriv φf u) + q u * deriv (deriv φf) u| - ≤ |q2 u * φf u + 2 * (q1 u * deriv φf u)| + |q u * deriv (deriv φf) u| := abs_add_le _ _ - _ ≤ |q2 u * φf u| + |2 * (q1 u * deriv φf u)| + |q u * deriv (deriv φf) u| := by - linarith [abs_add_le (q2 u * φf u) (2 * (q1 u * deriv φf u))] - _ ≤ _ := by linarith - -- integrability and evaluation of the majorant - have iconst : MeasureTheory.IntegrableOn (fun _ : ℝ => (4 * ω ^ 2 : ℝ)) - (Set.Icc (-(L/2)) (L/2)) := - MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top) - have iabs1 : MeasureTheory.IntegrableOn (fun u => 2 * ω * |deriv φf u|) - (Set.Icc (-(L/2)) (L/2)) := - ((hφ1cont.abs.continuousOn).integrableOn_compact isCompact_Icc).const_mul _ - have iabs2 : MeasureTheory.IntegrableOn (fun u => |deriv (deriv φf) u|) - (Set.Icc (-(L/2)) (L/2)) := - (hφ2cont.abs.continuousOn).integrableOn_compact isCompact_Icc - have isum : MeasureTheory.IntegrableOn (fun u => 4 * ω ^ 2 + 2 * ω * |deriv φf u|) - (Set.Icc (-(L/2)) (L/2)) := - ((by fun_prop : Continuous fun u : ℝ => 4 * ω ^ 2 + 2 * ω * |deriv φf u|)).continuousOn.integrableOn_compact - isCompact_Icc - have hmajint : MeasureTheory.IntegrableOn - (fun u => 4 * ω ^ 2 + 2 * ω * |deriv φf u| + |deriv (deriv φf) u|) - (Set.Icc (-(L/2)) (L/2)) := - ((by fun_prop : Continuous fun u : ℝ => - 4 * ω ^ 2 + 2 * ω * |deriv φf u| + |deriv (deriv φf) u|)).continuousOn.integrableOn_compact - isCompact_Icc - have hIφD : MeasureTheory.IntegrableOn (fun u => |deriv (deriv (phiD ϱ lam L w)) u|) - (Set.Icc (-(L/2)) (L/2)) := by - have hd1C : ContDiff ℝ 1 (deriv (phiD ϱ lam L w)) := - (phiD_contDiff hϱ h0 h1 hw0 hwL').deriv' - have hcont2 : Continuous (deriv (deriv (phiD ϱ lam L w))) := - hd1C.continuous_deriv (by norm_num) - exact (hcont2.abs.continuousOn).integrableOn_compact isCompact_Icc - have hmono : ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv (phiD ϱ lam L w)) u| - ≤ ∫ u in Set.Icc (-(L/2)) (L/2), - (4 * ω ^ 2 + 2 * ω * |deriv φf u| + |deriv (deriv φf) u|) := - MeasureTheory.setIntegral_mono_on hIφD hmajint measurableSet_Icc hpt - refine le_trans hmono ?_ - -- integrals of |φ'| and |φ''| over ℝ (compact support) - have hIg1 : Integrable (fun u => |deriv φf u|) := by - apply hφ1cont.abs.integrable_of_hasCompactSupport - apply HasCompactSupport.abs - apply HasCompactSupport.of_support_subset_isCompact - (isCompact_Icc (a := -(L/2)) (b := L/2)) - intro x hx - rw [Function.mem_support] at hx - by_contra hmem - apply hx - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hmem - have hgt : L / 2 < |x| := by - rcases hmem with h | h - · rw [abs_of_neg (by linarith : x < 0)]; linarith - · rw [abs_of_pos (by linarith : 0 < x)]; linarith - have hopen : IsOpen {v : ℝ | L / 2 < |v|} := (continuous_abs).isOpen_preimage _ isOpen_Ioi - have hEq : φf =ᶠ[nhds x] (fun _ => (0:ℝ)) := by - filter_upwards [hopen.mem_nhds hgt] with v hv - rw [hφdef] - exact Taper.phi_eq_zero hϱ hw0 (le_of_lt hv) - rw [hEq.deriv_eq, deriv_const] - have hIg2 : Integrable (fun u => |deriv (deriv φf) u|) := by - apply hφ2cont.abs.integrable_of_hasCompactSupport - apply HasCompactSupport.abs - apply HasCompactSupport.of_support_subset_isCompact - (isCompact_Icc (a := -(L/2)) (b := L/2)) - intro x hx - rw [Function.mem_support] at hx - by_contra hmem - apply hx - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hmem - have hgt : L / 2 < |x| := by - rcases hmem with h | h - · rw [abs_of_neg (by linarith : x < 0)]; linarith - · rw [abs_of_pos (by linarith : 0 < x)]; linarith - exact deriv2_eq_zero_outside (fun t ht => by - rw [hφdef]; exact Taper.phi_eq_zero hϱ hw0 ht) hgt - have hsplit2 : ∫ u in Set.Icc (-(L/2)) (L/2), - (4 * ω ^ 2 + 2 * ω * |deriv φf u| + |deriv (deriv φf) u|) - ≤ 4 * ω ^ 2 * L + 2 * ω * 2 + Taper.cRho ϱ / (2 * w) := by - have ea : ∫ u in Set.Icc (-(L/2)) (L/2), (4 * ω ^ 2 + 2 * ω * |deriv φf u|) - = (∫ u in Set.Icc (-(L/2)) (L/2), (4 * ω ^ 2 : ℝ)) - + ∫ u in Set.Icc (-(L/2)) (L/2), (2 * ω * |deriv φf u|) := - MeasureTheory.integral_add iconst iabs1 - have eb : ∫ u in Set.Icc (-(L/2)) (L/2), (2 * ω * |deriv φf u|) - = 2 * ω * ∫ u in Set.Icc (-(L/2)) (L/2), |deriv φf u| := - MeasureTheory.integral_const_mul _ _ - have e1 : ∫ u in Set.Icc (-(L/2)) (L/2), (4 * ω ^ 2 + 2 * ω * |deriv φf u| - + |deriv (deriv φf) u|) - = (∫ u in Set.Icc (-(L/2)) (L/2), (4 * ω ^ 2 : ℝ)) - + 2 * ω * (∫ u in Set.Icc (-(L/2)) (L/2), |deriv φf u|) - + ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv φf) u| := by - calc ∫ u in Set.Icc (-(L/2)) (L/2), - (4 * ω ^ 2 + 2 * ω * |deriv φf u| + |deriv (deriv φf) u|) - = (∫ u in Set.Icc (-(L/2)) (L/2), (4 * ω ^ 2 + 2 * ω * |deriv φf u|)) - + ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv φf) u| := - MeasureTheory.integral_add isum iabs2 - _ = _ := by rw [ea, eb] - rw [e1] - have c1b : ∫ u in Set.Icc (-(L/2)) (L/2), (4 * ω ^ 2 : ℝ) ≤ 4 * ω ^ 2 * L := by - rw [MeasureTheory.setIntegral_const, MeasureTheory.measureReal_def, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), smul_eq_mul] - nlinarith [sq_nonneg ω] - have c2b : ∫ u in Set.Icc (-(L/2)) (L/2), |deriv φf u| ≤ 2 := by - refine le_trans (MeasureTheory.setIntegral_le_integral hIg1 - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _)) ?_ - rw [hφdef] - exact le_of_eq (Taper.integral_abs_deriv_phi hϱ hw0 hwL') - have c3b : ∫ u in Set.Icc (-(L/2)) (L/2), |deriv (deriv φf) u| - ≤ Taper.cRho ϱ / (2 * w) := by - refine le_trans (MeasureTheory.setIntegral_le_integral hIg2 - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _)) ?_ - rw [hφdef] - rw [Taper.integral_abs_deriv2_phi hϱ hw0 hwL'] - rw [div_le_div_iff₀ hw0 (by positivity)] - have hcr := Taper.cRho_eq ϱ - have hsup0 : 0 ≤ Taper.supDeriv ϱ := Real.iSup_nonneg fun x => abs_nonneg _ - nlinarith [mul_nonneg hsup0 hw0.le] - have hω0' : (0:ℝ) ≤ 2 * ω := by positivity - nlinarith [mul_le_mul_of_nonneg_left c2b hω0'] - refine le_trans hsplit2 ?_ - -- final arithmetic - have hc4 : (0:ℝ) ≤ Taper.cRho ϱ := by linarith [Taper.four_le_cRho hϱ] - have hωL : 4 * ω ^ 2 * L ≤ 16 / L := by - calc 4 * ω ^ 2 * L ≤ 4 * (2/L) ^ 2 * L := by - apply mul_le_mul_of_nonneg_right _ hL.le - apply mul_le_mul_of_nonneg_left (pow_le_pow_left₀ hω0 hωle 2) (by norm_num) - _ = 16 / L := by field_simp; ring - have h4L : 16 / L ≤ 2 / w := by - rw [div_le_div_iff₀ hL hw0] - linarith - have h2ω : 2 * ω * 2 ≤ 1 / w := by - have h8 : 8 / L ≤ 1 / w := by - rw [div_le_div_iff₀ hL hw0] - linarith - have h4ω : 2 * ω * 2 ≤ 8 / L := by - have e : (8:ℝ) / L = 4 * (2 / L) := by ring - rw [e] - linarith - linarith - have hcrw : Taper.cRho ϱ / (2 * w) ≤ Taper.cRho ϱ / w := by - apply div_le_div_of_nonneg_left hc4 hw0 - linarith - have hcdt : (3 + Taper.cRho ϱ) / w ≤ cDT ϱ lam / w := by - apply div_le_div_of_nonneg_right ?_ hw0.le - unfold cDT - nlinarith [hc4, sq_nonneg lam] - calc 4 * ω ^ 2 * L + 2 * ω * 2 + Taper.cRho ϱ / (2 * w) - ≤ 2 / w + 1 / w + Taper.cRho ϱ / w := by linarith [hωL, h4L, h2ω, hcrw] - _ = (3 + Taper.cRho ϱ) / w := by - field_simp - ring - _ ≤ cDT ϱ lam / w := hcdt - - -/-! ### the moments [eq:abJ] vs their scale-free limits (last sentence of the [thm:D] proof: -"Its constants [eq:abJ] differ from those of v*_1 by O(1/L)") -/ - -/-- shared edge estimate for the moment comparisons: for |h| ≤ 1 and a plateau function -0 ≤ p ≤ 1 with p = 1 on [−L/2+w, L/2−w] and p = 0 off [−L/2, L/2], -|∫ h·p − ∫_{[−L/2,L/2]} h| ≤ 2w (the integrands differ only on the two ramps). -/ -private theorem edge_estimate {h p : ℝ → ℝ} {L w : ℝ} (_hL : 0 < L) (hw0 : 0 < w) - (hwL : 2 * w ≤ L) (hh : ∀ u, |h u| ≤ 1) (hp0 : ∀ u, 0 ≤ p u) (hp1 : ∀ u, p u ≤ 1) - (hpl : ∀ u : ℝ, |u| ≤ L/2 - w → p u = 1) (hsupp : ∀ u : ℝ, L/2 ≤ |u| → p u = 0) - (hpc : Continuous p) (hhc : Continuous h) : - |(∫ u, h u * p u) - ∫ u in Set.Icc (-(L/2)) (L/2), h u| ≤ 2 * w := by - have hrestr : ∫ u, h u * p u = ∫ u in Set.Icc (-(L/2)) (L/2), h u * p u := by - rw [MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero] - intro x hx - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hx - have : L / 2 ≤ |x| := by - rcases hx with hc | hc - · rw [abs_of_neg (by linarith : x < 0)]; linarith - · rw [abs_of_pos (by linarith : 0 < x)]; linarith - rw [hsupp x this, mul_zero] - have hIhp : MeasureTheory.IntegrableOn (fun u => h u * p u) (Set.Icc (-(L/2)) (L/2)) := - ((hhc.mul hpc).continuousOn).integrableOn_compact isCompact_Icc - have hIh : MeasureTheory.IntegrableOn h (Set.Icc (-(L/2)) (L/2)) := - (hhc.continuousOn).integrableOn_compact isCompact_Icc - have hsub : (∫ u, h u * p u) - ∫ u in Set.Icc (-(L/2)) (L/2), h u - = ∫ u in Set.Icc (-(L/2)) (L/2), (h u * p u - h u) := by - rw [hrestr, ← MeasureTheory.integral_sub hIhp hIh] - rw [hsub] - -- the two-ramp majorant - set maj : ℝ → ℝ := fun u => (Set.Icc (-(L/2)) (-(L/2) + w)).indicator (1 : ℝ → ℝ) u - + (Set.Icc (L/2 - w) (L/2)).indicator (1 : ℝ → ℝ) u with hmaj - have hImaj : Integrable maj := by - apply Integrable.add - · exact (MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)) - · exact (MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)) - have hind0 : ∀ (s : Set ℝ) (u : ℝ), 0 ≤ s.indicator (1 : ℝ → ℝ) u := fun s u => - Set.indicator_nonneg (fun _ _ => zero_le_one) u - have hptw : ∀ u ∈ Set.Icc (-(L/2)) (L/2), |h u * p u - h u| ≤ maj u := by - intro u hu - have hmaj0 : 0 ≤ maj u := by - rw [hmaj] - exact add_nonneg (hind0 _ u) (hind0 _ u) - rcases le_or_gt |u| (L/2 - w) with hpl' | hedge - · rw [hpl u hpl', mul_one, sub_self, abs_zero] - exact hmaj0 - · have hbound : |h u * p u - h u| ≤ 1 := by - have e : h u * p u - h u = h u * (p u - 1) := by ring - rw [e, abs_mul] - calc |h u| * |p u - 1| ≤ 1 * 1 := by - apply mul_le_mul (hh u) ?_ (abs_nonneg _) zero_le_one - rw [abs_le] - exact ⟨by linarith [hp0 u], by linarith [hp1 u]⟩ - _ = 1 := mul_one 1 - have hone : (1:ℝ) ≤ maj u := by - rw [hmaj] - show (1:ℝ) ≤ (Set.Icc (-(L/2)) (-(L/2) + w)).indicator (1 : ℝ → ℝ) u - + (Set.Icc (L/2 - w) (L/2)).indicator (1 : ℝ → ℝ) u - rcases le_or_gt u 0 with hneg | hpos - · have hu1 : u ∈ Set.Icc (-(L/2)) (-(L/2) + w) := by - refine ⟨hu.1, ?_⟩ - have habs : |u| = -u := abs_of_nonpos hneg - rw [habs] at hedge - linarith - have := hind0 (Set.Icc (L/2 - w) (L/2)) u - rw [Set.indicator_of_mem hu1, Pi.one_apply] - linarith - · have hu1 : u ∈ Set.Icc (L/2 - w) (L/2) := by - refine ⟨?_, hu.2⟩ - have habs : |u| = u := abs_of_pos hpos - rw [habs] at hedge - linarith - have := hind0 (Set.Icc (-(L/2)) (-(L/2) + w)) u - rw [Set.indicator_of_mem hu1, Pi.one_apply] - linarith - linarith - calc |∫ u in Set.Icc (-(L/2)) (L/2), (h u * p u - h u)| - ≤ ∫ u in Set.Icc (-(L/2)) (L/2), |h u * p u - h u| := - MeasureTheory.abs_integral_le_integral_abs - _ ≤ ∫ u in Set.Icc (-(L/2)) (L/2), maj u := by - apply MeasureTheory.setIntegral_mono_on - (((hhc.mul hpc).sub hhc).abs.continuousOn.integrableOn_compact isCompact_Icc) - hImaj.integrableOn measurableSet_Icc hptw - _ ≤ ∫ u, maj u := - MeasureTheory.setIntegral_le_integral hImaj - (MeasureTheory.ae_of_all _ fun u => by - rw [hmaj] - apply add_nonneg <;> exact Set.indicator_nonneg (fun _ _ => zero_le_one) u) - _ = 2 * w := by - rw [hmaj] - rw [MeasureTheory.integral_add - ((MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top))) - ((MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)))] - rw [MeasureTheory.integral_indicator_one measurableSet_Icc, - MeasureTheory.integral_indicator_one measurableSet_Icc, - MeasureTheory.measureReal_def, MeasureTheory.measureReal_def, - Real.volume_Icc, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), ENNReal.toReal_ofReal (by linarith)] - ring - -/-- substitution: ∫_{−L/2..L/2} v(u/L) du = L · ∫_{−1/2..1/2} v. -/ -private theorem integral_scale {v : ℝ → ℝ} {L : ℝ} (hL : 0 < L) : - ∫ u in (-(L/2))..(L/2), v (u / L) = L * ∫ s in (-(1:ℝ)/2)..(1/2), v s := by - rw [intervalIntegral.integral_comp_div (f := v) hL.ne', smul_eq_mul, - show -(L/2) / L = -(1:ℝ)/2 by field_simp; try ring, - show L/2 / L = (1:ℝ)/2 by rw [div_div]; rw [div_eq_div_iff (by positivity) (by norm_num)]; ring] + have hden0 : 2 * cosD lam L u ≠ 0 := by linarith [hsqrt_ge u huU] + have hnum : HasDerivAt (fun x => -(ω * Real.sin (Real.sqrt 2 * lam * (x / L)))) + (-(ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L)))) u := by + have h := hasDerivAt_vStar' (lam := lam) (L := L) u + simpa [hωdef, neg_mul] using h + have hd2 : HasDerivAt q1 _ u := hnum.div ((hq1 u huU).const_mul 2) hden0 + rw [hd2.deriv, abs_div] + have hdenge : 1 ≤ |(2 * cosD lam L u) ^ 2| := by + rw [abs_of_pos (by nlinarith [hsqrt_ge u huU])]; nlinarith [hsqrt_ge u huU] + have h1' : |-(ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * (2 * cosD lam L u)| ≤ 2 * ω ^ 2 := by + have h2pos : 0 < 2 * cosD lam L u := by linarith [hsqrt_ge u huU] + rw [abs_mul, abs_neg, abs_mul, abs_pow, abs_of_nonneg hω0, abs_of_pos h2pos] + calc ω ^ 2 * |Real.cos _| * (2 * cosD lam L u) ≤ ω ^ 2 * 1 * (2 * 1) := by + gcongr; exact Real.abs_cos_le_one _; exact hsqrt_le u + _ = 2 * ω ^ 2 := by ring + have h2' : |-(ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * (2 * q1 u)| ≤ 2 * ω ^ 2 := by + rw [abs_mul, abs_neg, abs_mul, abs_mul, abs_of_nonneg hω0, abs_two] + calc ω * |Real.sin _| * (2 * |q1 u|) ≤ ω * 1 * (2 * ω) := by + gcongr; exact Real.abs_sin_le_one _; exact hq1_le u huU + _ = 2 * ω ^ 2 := by ring + calc |-(ω ^ 2 * Real.cos (Real.sqrt 2 * lam * (u / L))) * (2 * cosD lam L u) + - -(ω * Real.sin (Real.sqrt 2 * lam * (u / L))) * (2 * q1 u)| + / |(2 * cosD lam L u) ^ 2| + ≤ (2 * ω ^ 2 + 2 * ω ^ 2) / 1 := + div_le_div₀ (by positivity) ((abs_sub _ _).trans (by linarith)) one_pos hdenge + _ = 4 * ω ^ 2 := by ring + _ ≤ 4 * (2 / L) ^ 2 := by gcongr + _ = 16 / L ^ 2 := by ring + +/-! ### moments a_D and b_D -/ + +private lemma cosD_sq_core (h0 : 0 < lam) (h1 : lam ≤ 1) (hL : 0 < L) {u : ℝ} + (hu : u ∈ Icc (-(L / 2)) (L / 2)) : cosD lam L u ^ 2 = vStar lam (u / L) := by + have h := vStar_gt_half h0 h1 hL (u := u) (by have := abs_le.mpr ⟨hu.1, hu.2⟩; linarith) + exact Real.sq_sqrt (by linarith) /-- a_D := L⁻¹∫φ_D²; |a_D − a*_λ| ≤ 4w/L. -/ theorem aD_close (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : |L⁻¹ * (∫ u, phiD ϱ lam L w u ^ 2) - aStar lam| ≤ 4 * w / L := by - have hw0 : 0 < w := by linarith - have hwL' : 2 * w ≤ L := by linarith have hL : 0 < L := by linarith - -- the scale-free mean as an integral over [−L/2, L/2] - have hsub : aStar lam = L⁻¹ * ∫ u in Set.Icc (-(L/2)) (L/2), vStar lam (u / L) := by - rw [MeasureTheory.integral_Icc_eq_integral_Ioc, - ← intervalIntegral.integral_of_le (by linarith : -(L/2) ≤ L/2), integral_scale hL] - unfold aStar - field_simp - -- the window integral via φ_D² = c·φ² - have hwin : ∫ u, phiD ϱ lam L w u ^ 2 = ∫ u, vStar lam (u / L) * Taper.phi ϱ L w u ^ 2 := by - rw [phiD_sq_eq hϱ h0 h1 hw0 hwL'] - rw [hwin, hsub] - have hcore := edge_estimate (h := fun u => vStar lam (u / L)) - (p := fun u => Taper.phi ϱ L w u ^ 2) hL hw0 hwL' - (fun u => by - unfold vStar - exact Real.abs_cos_le_one _) - (fun u => sq_nonneg _) - (fun u => by - calc Taper.phi ϱ L w u ^ 2 ≤ 1 ^ 2 := - pow_le_pow_left₀ (Taper.phi_nonneg hϱ u) (Taper.phi_le_one hϱ u) 2 - _ = 1 := one_pow 2) - (fun u hu => by - show Taper.phi ϱ L w u ^ 2 = 1 - rw [Taper.phi_eq_one hϱ hw0 hu, one_pow]) - (fun u hu => by - show Taper.phi ϱ L w u ^ 2 = 0 - rw [Taper.phi_eq_zero hϱ hw0 hu, zero_pow two_ne_zero]) - ((Taper.phi_continuous hϱ hw0 hwL').pow 2) - (by - unfold vStar - fun_prop) - have e : L⁻¹ * (∫ u, vStar lam (u / L) * Taper.phi ϱ L w u ^ 2) - - L⁻¹ * ∫ u in Set.Icc (-(L/2)) (L/2), vStar lam (u / L) - = L⁻¹ * ((∫ u, vStar lam (u / L) * Taper.phi ϱ L w u ^ 2) - - ∫ u in Set.Icc (-(L/2)) (L/2), vStar lam (u / L)) := by ring - rw [e, abs_mul, abs_of_pos (by positivity : (0:ℝ) < L⁻¹)] - calc L⁻¹ * |(∫ u, vStar lam (u / L) * Taper.phi ϱ L w u ^ 2) - - ∫ u in Set.Icc (-(L/2)) (L/2), vStar lam (u / L)| - ≤ L⁻¹ * (2 * w) := mul_le_mul_of_nonneg_left hcore (by positivity) - _ ≤ 4 * w / L := by - rw [div_eq_mul_inv] - nlinarith [hw0.le, inv_pos.mpr hL] + have h := mod_moment_close (f := cosD lam L) (v := vStar lam) (w := w) (k := 1) hϱ (by linarith) + (by linarith) one_pos (fun u hu => cosD_sq_core h0 h1 hL hu) + (by unfold vStar; fun_prop) (fun s _ => Real.abs_cos_le_one _) + simp only [mul_one, pow_one] at h + exact h.trans (div_le_div_of_nonneg_right (by linarith) hL.le) /-- b_D := L⁻¹∫φ_D⁴; |b_D − b*_λ| ≤ 4w/L. -/ theorem bD_close (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : |L⁻¹ * (∫ u, phiD ϱ lam L w u ^ 4) - bStar lam| ≤ 4 * w / L := by - have hw0 : 0 < w := by linarith - have hwL' : 2 * w ≤ L := by linarith have hL : 0 < L := by linarith - have hsub : bStar lam = L⁻¹ * ∫ u in Set.Icc (-(L/2)) (L/2), vStar lam (u / L) ^ 2 := by - rw [MeasureTheory.integral_Icc_eq_integral_Ioc, - ← intervalIntegral.integral_of_le (by linarith : -(L/2) ≤ L/2), - integral_scale (v := fun s => vStar lam s ^ 2) hL] - unfold bStar - field_simp - have hwin : ∫ u, phiD ϱ lam L w u ^ 4 - = ∫ u, vStar lam (u / L) ^ 2 * Taper.phi ϱ L w u ^ 4 := by - have e : (fun u => phiD ϱ lam L w u ^ 4) - = fun u => vStar lam (u / L) ^ 2 * Taper.phi ϱ L w u ^ 4 := by - have h2 := phiD_sq_eq hϱ h0 h1 hw0 hwL' - funext u - have := congrFun h2 u - calc phiD ϱ lam L w u ^ 4 = (phiD ϱ lam L w u ^ 2) ^ 2 := by ring - _ = (vStar lam (u / L) * Taper.phi ϱ L w u ^ 2) ^ 2 := by rw [this] - _ = vStar lam (u / L) ^ 2 * Taper.phi ϱ L w u ^ 4 := by ring - rw [e] - rw [hwin, hsub] - have hcore := edge_estimate (h := fun u => vStar lam (u / L) ^ 2) - (p := fun u => Taper.phi ϱ L w u ^ 4) hL hw0 hwL' - (fun u => by - rw [abs_pow] - calc |vStar lam (u / L)| ^ 2 ≤ 1 ^ 2 := by - apply pow_le_pow_left₀ (abs_nonneg _) ?_ 2 - unfold vStar - exact Real.abs_cos_le_one _ - _ = 1 := one_pow 2) - (fun u => by positivity) - (fun u => by - calc Taper.phi ϱ L w u ^ 4 ≤ 1 ^ 4 := - pow_le_pow_left₀ (Taper.phi_nonneg hϱ u) (Taper.phi_le_one hϱ u) 4 - _ = 1 := one_pow 4) - (fun u hu => by - show Taper.phi ϱ L w u ^ 4 = 1 - rw [Taper.phi_eq_one hϱ hw0 hu, one_pow]) - (fun u hu => by - show Taper.phi ϱ L w u ^ 4 = 0 - rw [Taper.phi_eq_zero hϱ hw0 hu, zero_pow (by norm_num : (4:ℕ) ≠ 0)]) - ((Taper.phi_continuous hϱ hw0 hwL').pow 4) - (by - unfold vStar - fun_prop) - have e : L⁻¹ * (∫ u, vStar lam (u / L) ^ 2 * Taper.phi ϱ L w u ^ 4) - - L⁻¹ * ∫ u in Set.Icc (-(L/2)) (L/2), vStar lam (u / L) ^ 2 - = L⁻¹ * ((∫ u, vStar lam (u / L) ^ 2 * Taper.phi ϱ L w u ^ 4) - - ∫ u in Set.Icc (-(L/2)) (L/2), vStar lam (u / L) ^ 2) := by ring - rw [e, abs_mul, abs_of_pos (by positivity : (0:ℝ) < L⁻¹)] - calc L⁻¹ * |(∫ u, vStar lam (u / L) ^ 2 * Taper.phi ϱ L w u ^ 4) - - ∫ u in Set.Icc (-(L/2)) (L/2), vStar lam (u / L) ^ 2| - ≤ L⁻¹ * (2 * w) := mul_le_mul_of_nonneg_left hcore (by positivity) - _ ≤ 4 * w / L := by - rw [div_eq_mul_inv] - nlinarith [hw0.le, inv_pos.mpr hL] + have h := mod_moment_close (f := cosD lam L) (v := vStar lam) (w := w) (k := 2) hϱ (by linarith) + (by linarith) two_pos (fun u hu => cosD_sq_core h0 h1 hL hu) + (by unfold vStar; fun_prop) (fun s _ => Real.abs_cos_le_one _) + exact h.trans (div_le_div_of_nonneg_right (by linarith) hL.le) -section JMoment -/-! #### jD_close: the J-moment of the window vs J* (no Fubini — everything is one-variable: -the sharp-window autocorrelation has a trigonometric closed form (product-to-sum + explicit -antiderivatives), its y-moment evaluates to (L³/2)·(the closed form of J*) [jStar_closed], and -the ramp only moves the autocorrelation by 4w pointwise). -/ +/-! ### jD_close: closed-form sharp autocorrelation and its y-moment -/ /-- the sharp-cutoff comparison autocorrelation, in closed form: Cfun y := (L−y)/2 · cos(ω̃y) + sin(ω̃(L−y))/(2ω̃), ω̃ := √2λ/L. -/ @@ -1212,74 +220,60 @@ def Cfun (lam L : ℝ) (y : ℝ) : ℝ := (L - y) / 2 * Real.cos (Real.sqrt 2 * lam * (1 / L) * y) + Real.sin (Real.sqrt 2 * lam * (1 / L) * (L - y)) / (2 * (Real.sqrt 2 * lam * (1 / L))) -/-- product-to-sum evaluation: for 0 ≤ y ≤ L, -∫ u in −L/2..(L/2−y), v(u/L)·v((u+y)/L) du = Cfun y. -/ +/-- product-to-sum evaluation: ∫ u in −L/2..(L/2−y), v(u/L)·v((u+y)/L) du = Cfun y. -/ theorem integral_cos_overlap (h0 : 0 < lam) (hL : 0 < L) (y : ℝ) : - ∫ u in (-(L/2))..(L/2 - y), vStar lam (u / L) * vStar lam ((u + y) / L) + ∫ u in (-(L / 2))..(L / 2 - y), vStar lam (u / L) * vStar lam ((u + y) / L) = Cfun lam L y := by - have hωpos : (0:ℝ) < Real.sqrt 2 * lam * (1 / L) := by positivity + have hωpos : (0 : ℝ) < Real.sqrt 2 * lam * (1 / L) := by positivity set ω : ℝ := Real.sqrt 2 * lam * (1 / L) with hωdef have hH : ∀ u : ℝ, HasDerivAt (fun u => Real.cos (ω * y) * u / 2 + Real.sin (ω * (2 * u + y)) / (4 * ω)) (vStar lam (u / L) * vStar lam ((u + y) / L)) u := by intro u have hlin : HasDerivAt (fun u : ℝ => ω * (2 * u + y)) (ω * 2) u := by - simpa using (((hasDerivAt_id u).const_mul (2:ℝ)).add_const y).const_mul ω - have h1 : HasDerivAt (fun u : ℝ => Real.cos (ω * y) * u / 2) - (Real.cos (ω * y) / 2) u := by + simpa using (((hasDerivAt_id u).const_mul (2 : ℝ)).add_const y).const_mul ω + have h1 : HasDerivAt (fun u : ℝ => Real.cos (ω * y) * u / 2) (Real.cos (ω * y) / 2) u := by simpa using ((hasDerivAt_id u).const_mul (Real.cos (ω * y))).div_const 2 have h2 : HasDerivAt (fun u : ℝ => Real.sin (ω * (2 * u + y)) / (4 * ω)) (Real.cos (ω * (2 * u + y)) * (ω * 2) / (4 * ω)) u := ((Real.hasDerivAt_sin (ω * (2 * u + y))).comp u hlin).div_const (4 * ω) - have h3 := h1.add h2 - refine h3.congr_deriv ?_ + refine (h1.add h2).congr_deriv ?_ unfold vStar have e1 : Real.sqrt 2 * lam * (u / L) = ω * u := by rw [hωdef]; ring have e2 : Real.sqrt 2 * lam * ((u + y) / L) = ω * (u + y) := by rw [hωdef]; ring rw [e1, e2] have hpts : Real.cos (ω * u) * Real.cos (ω * (u + y)) = (Real.cos (ω * y) + Real.cos (ω * (2 * u + y))) / 2 := by - have ha : ω * y = ω * (u + y) - ω * u := by ring - have hb : ω * (2 * u + y) = ω * (u + y) + ω * u := by ring - rw [ha, hb, Real.cos_sub, Real.cos_add] + rw [show ω * y = ω * (u + y) - ω * u by ring, + show ω * (2 * u + y) = ω * (u + y) + ω * u by ring, Real.cos_sub, Real.cos_add] ring - rw [hpts] - field_simp - ring + rw [hpts]; field_simp; ring rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun u _ => hH u) (Continuous.intervalIntegrable (by unfold vStar; fun_prop) _ _)] - unfold Cfun - rw [← hωdef] - have e3 : ω * (2 * (L / 2 - y) + y) = ω * (L - y) := by ring - have e6 : ω * (2 * -(L / 2) + y) = -(ω * (L - y)) := by ring - rw [e3, e6, Real.sin_neg] - field_simp - ring + unfold Cfun; rw [← hωdef] + rw [show ω * (2 * (L / 2 - y) + y) = ω * (L - y) by ring, + show ω * (2 * -(L / 2) + y) = -(ω * (L - y)) by ring, Real.sin_neg] + field_simp; ring -/-- the y-moment of the sharp autocorrelation, in closed form: -∫_0^L Cfun(y)·y dy = (L³/2)·(sin(2ϑ)/(8ϑ³) − cos(2ϑ)/(4ϑ²)) (explicit antiderivatives). -/ +/-- the y-moment of the sharp autocorrelation, in closed form. -/ theorem integral_Cfun_moment (h0 : 0 < lam) (_h1 : lam ≤ 1) (hL : 0 < L) : - ∫ y in (0:ℝ)..L, Cfun lam L y * y + ∫ y in (0 : ℝ)..L, Cfun lam L y * y = L ^ 3 / 2 * (Real.sin (2 * theta lam) / (8 * theta lam ^ 3) - Real.cos (2 * theta lam) / (4 * theta lam ^ 2)) := by - have hωpos : (0:ℝ) < Real.sqrt 2 * lam * (1 / L) := by positivity + have hωpos : (0 : ℝ) < Real.sqrt 2 * lam * (1 / L) := by positivity set ω : ℝ := Real.sqrt 2 * lam * (1 / L) with hωdef have hθ : 0 < theta lam := theta_pos h0 have hωL : ω * L = 2 * theta lam := by rw [hωdef, show theta lam = lam / Real.sqrt 2 from rfl] - have hs2 : (0:ℝ) < Real.sqrt 2 := by positivity + have hs2 : (0 : ℝ) < Real.sqrt 2 := by positivity have hsq : Real.sqrt 2 ^ 2 = 2 := Real.sq_sqrt (by norm_num) - field_simp - ring_nf - try rw [hsq] - try ring + field_simp; ring_nf; rw [hsq] set H : ℝ → ℝ := fun y => (((L * y - y ^ 2) / ω + 2 / ω ^ 3) * Real.sin (ω * y) + ((L - 2 * y) / ω ^ 2) * Real.cos (ω * y)) / 2 + ((y / ω) * Real.cos (ω * (L - y)) + Real.sin (ω * (L - y)) / ω ^ 2) / (2 * ω) with hHdef have hH : ∀ y : ℝ, HasDerivAt H (Cfun lam L y * y) y := by intro y - have hlin1 : HasDerivAt (fun y : ℝ => ω * y) ω y := by - simpa using (hasDerivAt_id y).const_mul ω + have hlin1 : HasDerivAt (fun y : ℝ => ω * y) ω y := by simpa using (hasDerivAt_id y).const_mul ω have hlin2 : HasDerivAt (fun y : ℝ => ω * (L - y)) (ω * (-1)) y := ((hasDerivAt_id y).const_sub L).const_mul ω have hsin1 : HasDerivAt (fun y : ℝ => Real.sin (ω * y)) (Real.cos (ω * y) * ω) y := @@ -1288,505 +282,83 @@ theorem integral_Cfun_moment (h0 : 0 < lam) (_h1 : lam ≤ 1) (hL : 0 < L) : (Real.hasDerivAt_cos (ω * y)).comp y hlin1 have hsin2 : HasDerivAt (fun y : ℝ => Real.sin (ω * (L - y))) (Real.cos (ω * (L - y)) * (ω * (-1))) y := by - have := (Real.hasDerivAt_sin (ω * (L - y))).comp y hlin2 - simpa [Function.comp_def] using this + simpa [Function.comp_def] using (Real.hasDerivAt_sin (ω * (L - y))).comp y hlin2 have hcos2 : HasDerivAt (fun y : ℝ => Real.cos (ω * (L - y))) (-Real.sin (ω * (L - y)) * (ω * (-1))) y := by - have := (Real.hasDerivAt_cos (ω * (L - y))).comp y hlin2 - simpa [Function.comp_def] using this - have hq : HasDerivAt (fun y : ℝ => y ^ 2) (2 * y) y := by - simpa using hasDerivAt_pow 2 y + simpa [Function.comp_def] using (Real.hasDerivAt_cos (ω * (L - y))).comp y hlin2 have hp1 : HasDerivAt (fun y : ℝ => (L * y - y ^ 2) / ω + 2 / ω ^ 3) ((L * 1 - 2 * y) / ω) y := - ((((hasDerivAt_id y).const_mul L).sub hq).div_const ω).add_const (2 / ω ^ 3) - have hp2 : HasDerivAt (fun y : ℝ => (L - 2 * y) / ω ^ 2) (-(2 * 1) / ω ^ 2) y := by - have : HasDerivAt (fun y : ℝ => L - 2 * y) (-(2 * 1)) y := by - simpa using ((hasDerivAt_id y).const_mul (2:ℝ)).const_sub L - exact this.div_const (ω ^ 2) - have hp3 : HasDerivAt (fun y : ℝ => y / ω) (1 / ω) y := by - simpa using (hasDerivAt_id y).div_const ω - have hA := ((hp1.mul hsin1).add (hp2.mul hcos1)).div_const 2 - have hB := (((hp3.mul hcos2).add (hsin2.div_const (ω ^ 2))).div_const (2 * ω)) - have htot := hA.add hB - refine htot.congr_deriv ?_ - unfold Cfun - rw [← hωdef] - have hω0 : ω ≠ 0 := ne_of_gt hωpos - field_simp - ring + ((((hasDerivAt_id y).const_mul L).sub (by simpa using hasDerivAt_pow 2 y)).div_const ω).add_const _ + have hp2 : HasDerivAt (fun y : ℝ => (L - 2 * y) / ω ^ 2) (-(2 * 1) / ω ^ 2) y := + (by simpa using ((hasDerivAt_id y).const_mul (2 : ℝ)).const_sub L : + HasDerivAt (fun y : ℝ => L - 2 * y) (-(2 * 1)) y).div_const (ω ^ 2) + have hp3 : HasDerivAt (fun y : ℝ => y / ω) (1 / ω) y := by simpa using (hasDerivAt_id y).div_const ω + refine ((((hp1.mul hsin1).add (hp2.mul hcos1)).div_const 2).add + (((hp3.mul hcos2).add (hsin2.div_const (ω ^ 2))).div_const (2 * ω))).congr_deriv ?_ + unfold Cfun; rw [← hωdef]; have hω0 : ω ≠ 0 := hωpos.ne'; field_simp; ring rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun y _ => hH y) - (Continuous.intervalIntegrable (by - unfold Cfun - rw [← hωdef] - fun_prop) _ _)] - rw [hHdef] + (Continuous.intervalIntegrable (by unfold Cfun; rw [← hωdef]; fun_prop) _ _), hHdef] simp only - rw [show ω * (0:ℝ) = 0 by ring, show ω * (L - L) = 0 by ring, show ω * (L - 0) = ω * L by ring, + rw [show ω * (0 : ℝ) = 0 by ring, show ω * (L - L) = 0 by ring, show ω * (L - 0) = ω * L by ring, hωL, Real.sin_zero, Real.cos_zero] - have hω0 : ω ≠ 0 := ne_of_gt hωpos - have hωeq : ω = 2 * theta lam / L := by - rw [eq_div_iff hL.ne'] - exact hωL - rw [hωeq] - field_simp - ring - -/-- the sharp window k := 1_{[−L/2,L/2]}·v(·/L). -/ -def sharpW (lam L : ℝ) (u : ℝ) : ℝ := - (Set.Icc (-(L/2)) (L/2)).indicator (fun u => vStar lam (u / L)) u - -/-- the sharp-window autocorrelation (full line) equals the overlap integral, i.e. Cfun. -/ -theorem sharp_autocorr_eq (h0 : 0 < lam) (hL : 0 < L) {y : ℝ} - (hy0 : 0 ≤ y) (hyL : y ≤ L) : - ∫ u, sharpW lam L u * sharpW lam L (u + y) = Cfun lam L y := by - have hind : ∀ u : ℝ, sharpW lam L u * sharpW lam L (u + y) - = (Set.Icc (-(L/2)) (L/2 - y)).indicator - (fun u => vStar lam (u / L) * vStar lam ((u + y) / L)) u := by - intro u - unfold sharpW - by_cases hu : u ∈ Set.Icc (-(L/2)) (L/2 - y) - · have hu1 : u ∈ Set.Icc (-(L/2)) (L/2) := ⟨hu.1, by linarith [hu.2]⟩ - have hu2 : u + y ∈ Set.Icc (-(L/2)) (L/2) := ⟨by linarith [hu.1], by linarith [hu.2]⟩ - rw [Set.indicator_of_mem hu, Set.indicator_of_mem hu1, Set.indicator_of_mem hu2] - · rw [Set.indicator_of_notMem hu] - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hu - rcases hu with hu | hu - · rw [Set.indicator_of_notMem (s := Set.Icc (-(L/2)) (L/2)) (a := u) - (by rw [Set.mem_Icc]; push Not; intro h; linarith), zero_mul] - · rw [Set.indicator_of_notMem (s := Set.Icc (-(L/2)) (L/2)) (a := u + y) - (by rw [Set.mem_Icc]; push Not; intro h; linarith), mul_zero] - rw [MeasureTheory.integral_congr_ae (MeasureTheory.ae_of_all _ hind), - MeasureTheory.integral_indicator measurableSet_Icc, - MeasureTheory.integral_Icc_eq_integral_Ioc, - ← intervalIntegral.integral_of_le (by linarith : -(L/2) ≤ L/2 - y)] - exact integral_cos_overlap h0 hL y - -/-- the window and the sharp cutoff differ by at most 2w in L¹. -/ -theorem integral_abs_phiDsq_sub_sharp (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) - (hw : 0 < w) (hwL : 2 * w ≤ L) : - ∫ u, |phiD ϱ lam L w u ^ 2 - sharpW lam L u| ≤ 2 * w := by - have hL : 0 < L := by linarith - have hsq := phiD_sq_eq hϱ h0 h1 hw hwL - set maj : ℝ → ℝ := fun u => (Set.Icc (-(L/2)) (-(L/2) + w)).indicator (1 : ℝ → ℝ) u - + (Set.Icc (L/2 - w) (L/2)).indicator (1 : ℝ → ℝ) u with hmaj - have hImaj : Integrable maj := by - apply Integrable.add <;> - exact (MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)) - have hind0 : ∀ (s : Set ℝ) (u : ℝ), 0 ≤ s.indicator (1 : ℝ → ℝ) u := fun s u => - Set.indicator_nonneg (fun _ _ => zero_le_one) u - have hpt : ∀ u : ℝ, |phiD ϱ lam L w u ^ 2 - sharpW lam L u| ≤ maj u := by - intro u - have hmaj0 : 0 ≤ maj u := by - rw [hmaj] - exact add_nonneg (hind0 _ u) (hind0 _ u) - have hval : phiD ϱ lam L w u ^ 2 = vStar lam (u / L) * Taper.phi ϱ L w u ^ 2 := - congrFun hsq u - rcases le_or_gt |u| (L/2 - w) with hpl | hedge - · -- plateau: φ = 1 and u ∈ Icc, so both sides are v(u/L) - have huIcc : u ∈ Set.Icc (-(L/2)) (L/2) := by - rw [abs_le] at hpl - constructor <;> [linarith [hpl.1]; linarith [hpl.2]] - rw [hval, Taper.phi_eq_one hϱ hw hpl, one_pow, mul_one] - unfold sharpW - rw [Set.indicator_of_mem huIcc, sub_self, abs_zero] - exact hmaj0 - · rcases le_or_gt |u| (L/2) with hin | hout - · -- edge: both sides in [−1, 1], difference ≤ 1, and maj = 1 there - have hbound : |phiD ϱ lam L w u ^ 2 - sharpW lam L u| ≤ 1 := by - have h1' : 0 ≤ phiD ϱ lam L w u ^ 2 := sq_nonneg _ - have h2' : phiD ϱ lam L w u ^ 2 ≤ 1 := by - calc phiD ϱ lam L w u ^ 2 ≤ 1 ^ 2 := - pow_le_pow_left₀ (phiD_nonneg hϱ u) (phiD_le_one hϱ u) 2 - _ = 1 := one_pow 2 - have h3' : 0 ≤ sharpW lam L u := by - unfold sharpW - apply Set.indicator_nonneg - intro x hx - have := cos_factor_ge (u := x) h0 h1 hL (abs_le.mpr ⟨hx.1, hx.2⟩) - linarith - have h4' : sharpW lam L u ≤ 1 := by - unfold sharpW - by_cases hm : u ∈ Set.Icc (-(L/2)) (L/2) - · rw [Set.indicator_of_mem hm] - unfold vStar - exact Real.cos_le_one _ - · rw [Set.indicator_of_notMem hm] - exact zero_le_one - rw [abs_le] - constructor <;> linarith - have hone : (1:ℝ) ≤ maj u := by - rw [hmaj] - show (1:ℝ) ≤ (Set.Icc (-(L/2)) (-(L/2) + w)).indicator (1 : ℝ → ℝ) u - + (Set.Icc (L/2 - w) (L/2)).indicator (1 : ℝ → ℝ) u - rcases le_or_gt u 0 with hneg | hpos - · have hu1 : u ∈ Set.Icc (-(L/2)) (-(L/2) + w) := by - refine ⟨?_, ?_⟩ - · have : |u| = -u := abs_of_nonpos hneg - rw [this] at hin - linarith - · have : |u| = -u := abs_of_nonpos hneg - rw [this] at hedge - linarith - have := hind0 (Set.Icc (L/2 - w) (L/2)) u - rw [Set.indicator_of_mem hu1, Pi.one_apply] - linarith - · have hu1 : u ∈ Set.Icc (L/2 - w) (L/2) := by - refine ⟨?_, ?_⟩ - · have : |u| = u := abs_of_pos hpos - rw [this] at hedge - linarith - · have : |u| = u := abs_of_pos hpos - rw [this] at hin - linarith - have := hind0 (Set.Icc (-(L/2)) (-(L/2) + w)) u - rw [Set.indicator_of_mem hu1, Pi.one_apply] - linarith - linarith - · -- outside: both vanish - have h1' : phiD ϱ lam L w u = 0 := phiD_eq_zero hϱ hw (le_of_lt hout) - have h2' : sharpW lam L u = 0 := by - unfold sharpW - apply Set.indicator_of_notMem - intro hm - have : |u| ≤ L / 2 := abs_le.mpr ⟨hm.1, hm.2⟩ - linarith - rw [h1', h2'] - norm_num - exact hmaj0 - -- integrate the pointwise bound - calc ∫ u, |phiD ϱ lam L w u ^ 2 - sharpW lam L u| - ≤ ∫ u, maj u := by - apply MeasureTheory.integral_mono_of_nonneg - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _) hImaj - (MeasureTheory.ae_of_all _ hpt) - _ = 2 * w := by - rw [hmaj] - rw [MeasureTheory.integral_add - ((MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top))) - ((MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top))), - MeasureTheory.integral_indicator_one measurableSet_Icc, - MeasureTheory.integral_indicator_one measurableSet_Icc, - MeasureTheory.measureReal_def, MeasureTheory.measureReal_def, - Real.volume_Icc, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), ENNReal.toReal_ofReal (by linarith)] - ring - -/-- pointwise comparison of the window autocorrelation with the sharp one: ≤ 4w on [0, L]. -/ -theorem autocorr_phiDsq_close (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) - (hw : 0 < w) (hwL : 2 * w ≤ L) {y : ℝ} (hy0 : 0 ≤ y) (hyL : y ≤ L) : - |Params.autocorr (fun u => phiD ϱ lam L w u ^ 2) y - Cfun lam L y| ≤ 4 * w := by - have hL : 0 < L := by linarith - set h : ℝ → ℝ := fun u => phiD ϱ lam L w u ^ 2 with hhdef - set k : ℝ → ℝ := sharpW lam L with hkdef - have hh_cont : Continuous h := ((phiD_contDiff hϱ h0 h1 hw hwL).pow 2).continuous - have hh1 : ∀ u, |h u| ≤ 1 := by - intro u - rw [hhdef] - simp only - rw [abs_of_nonneg (sq_nonneg _)] - calc phiD ϱ lam L w u ^ 2 ≤ 1 ^ 2 := - pow_le_pow_left₀ (phiD_nonneg hϱ u) (phiD_le_one hϱ u) 2 - _ = 1 := one_pow 2 - have hk_meas : Measurable k := by - rw [hkdef] - unfold sharpW - exact Measurable.indicator (by unfold vStar; fun_prop) measurableSet_Icc - have hk1 : ∀ u, |k u| ≤ 1 := by - intro u - rw [hkdef] - unfold sharpW - by_cases hm : u ∈ Set.Icc (-(L/2)) (L/2) - · rw [Set.indicator_of_mem hm] - unfold vStar - exact Real.abs_cos_le_one _ - · rw [Set.indicator_of_notMem hm, abs_zero] - exact zero_le_one - have hcs : HasCompactSupport h := by - apply HasCompactSupport.of_support_subset_isCompact - (isCompact_Icc (a := -(L/2)) (b := L/2)) - intro x hx - rw [Function.mem_support] at hx - by_contra hmem - apply hx - rw [hhdef] - simp only - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hmem - have : L / 2 ≤ |x| := by - rcases hmem with hc | hc - · rw [abs_of_neg (by linarith : x < 0)]; linarith - · rw [abs_of_pos (by linarith : 0 < x)]; linarith - rw [phiD_eq_zero hϱ hw this, zero_pow two_ne_zero] - have hint_h : Integrable h := hh_cont.integrable_of_hasCompactSupport hcs - have hint_k : Integrable k := by - rw [hkdef] - unfold sharpW - exact (MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (((by unfold vStar; fun_prop : Continuous fun u : ℝ => vStar lam (u / L)).continuousOn).integrableOn_compact - isCompact_Icc) - have hint_d : Integrable (fun u => h u - k u) := hint_h.sub hint_k - have hint_hy : Integrable (fun u => h (u + y)) := hint_h.comp_add_right y - have hint_ky : Integrable (fun u => k (u + y)) := hint_k.comp_add_right y - have hint_dy : Integrable (fun u => h (u + y) - k (u + y)) := hint_hy.sub hint_ky - have hmeas_hy : MeasureTheory.AEStronglyMeasurable (fun u => h (u + y)) MeasureTheory.volume := - hint_hy.aestronglyMeasurable - -- products - have hint_p1 : Integrable (fun u => (h u - k u) * h (u + y)) := by - have := hint_d.bdd_mul (c := 1) hmeas_hy (MeasureTheory.ae_of_all _ fun u => by - rw [Real.norm_eq_abs] - exact hh1 (u + y)) - exact this.congr (MeasureTheory.ae_of_all _ fun u => by ring) - have hint_p2 : Integrable (fun u => k u * (h (u + y) - k (u + y))) := by - exact hint_dy.bdd_mul (c := 1) hk_meas.aestronglyMeasurable (MeasureTheory.ae_of_all _ fun u => by - rw [Real.norm_eq_abs] - exact hk1 u) - have hint_hh : Integrable (fun u => h u * h (u + y)) := by - have := hint_h.bdd_mul (c := 1) hmeas_hy (MeasureTheory.ae_of_all _ fun u => by - rw [Real.norm_eq_abs] - exact hh1 (u + y)) - exact this.congr (MeasureTheory.ae_of_all _ fun u => by ring) - have hint_kk : Integrable (fun u => k u * k (u + y)) := by - exact hint_ky.bdd_mul (c := 1) hk_meas.aestronglyMeasurable (MeasureTheory.ae_of_all _ fun u => by - rw [Real.norm_eq_abs] - exact hk1 u) - -- decomposition - have hCk : ∫ u, k u * k (u + y) = Cfun lam L y := sharp_autocorr_eq h0 hL hy0 hyL - have hdecomp : Params.autocorr h y - Cfun lam L y - = (∫ u, (h u - k u) * h (u + y)) + ∫ u, k u * (h (u + y) - k (u + y)) := by - have e1 : Params.autocorr h y - Cfun lam L y - = ∫ u, (h u * h (u + y) - k u * k (u + y)) := by - rw [show Params.autocorr h y = ∫ u, h u * h (u + y) from rfl, ← hCk, - MeasureTheory.integral_sub hint_hh hint_kk] - rw [e1, ← MeasureTheory.integral_add hint_p1 hint_p2] - apply MeasureTheory.integral_congr_ae - apply MeasureTheory.ae_of_all - intro u - ring - -- the L¹ bound, twice - have hd2w := integral_abs_phiDsq_sub_sharp hϱ h0 h1 hw hwL - have hint_dabs : Integrable (fun u => |h u - k u|) := hint_d.abs - have hb1 : |∫ u, (h u - k u) * h (u + y)| ≤ 2 * w := by - calc |∫ u, (h u - k u) * h (u + y)| ≤ ∫ u, |(h u - k u) * h (u + y)| := - MeasureTheory.abs_integral_le_integral_abs - _ ≤ ∫ u, |h u - k u| := by - apply MeasureTheory.integral_mono_of_nonneg - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _) hint_dabs - (MeasureTheory.ae_of_all _ fun u => ?_) - show |(h u - k u) * h (u + y)| ≤ |h u - k u| - rw [abs_mul] - calc |h u - k u| * |h (u + y)| ≤ |h u - k u| * 1 := - mul_le_mul_of_nonneg_left (hh1 (u + y)) (abs_nonneg _) - _ = |h u - k u| := mul_one _ - _ ≤ 2 * w := hd2w - have hb2 : |∫ u, k u * (h (u + y) - k (u + y))| ≤ 2 * w := by - have htrans : ∫ u, |h (u + y) - k (u + y)| = ∫ u, |h u - k u| := - MeasureTheory.integral_add_right_eq_self (fun u => |h u - k u|) y - calc |∫ u, k u * (h (u + y) - k (u + y))| - ≤ ∫ u, |k u * (h (u + y) - k (u + y))| := MeasureTheory.abs_integral_le_integral_abs - _ ≤ ∫ u, |h (u + y) - k (u + y)| := by - apply MeasureTheory.integral_mono_of_nonneg - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _) (hint_dy.abs) - (MeasureTheory.ae_of_all _ fun u => ?_) - show |k u * (h (u + y) - k (u + y))| ≤ |h (u + y) - k (u + y)| - rw [abs_mul] - calc |k u| * |h (u + y) - k (u + y)| ≤ 1 * |h (u + y) - k (u + y)| := - mul_le_mul_of_nonneg_right (hk1 u) (abs_nonneg _) - _ = _ := one_mul _ - _ = ∫ u, |h u - k u| := htrans - _ ≤ 2 * w := hd2w - calc |Params.autocorr h y - Cfun lam L y| - = |(∫ u, (h u - k u) * h (u + y)) + ∫ u, k u * (h (u + y) - k (u + y))| := by - rw [hdecomp] - _ ≤ |∫ u, (h u - k u) * h (u + y)| + |∫ u, k u * (h (u + y) - k (u + y))| := abs_add_le _ _ - _ ≤ 4 * w := by linarith - -end JMoment + have hωeq : ω = 2 * theta lam / L := by rw [eq_div_iff hL.ne']; exact hωL + rw [hωeq]; field_simp; ring /-- J_D := (2/L³)∫_0^L g_D(y)·y dy, g_D = φ_D² ⋆ φ_D² [eq:abJ]; |J_D − J*_λ| ≤ 16w/L. -/ theorem jD_close (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : - |2 / L ^ 3 * (∫ y in (0:ℝ)..L, Params.autocorr (fun u => phiD ϱ lam L w u ^ 2) y * y) + |2 / L ^ 3 * (∫ y in (0 : ℝ)..L, Params.autocorr (fun u => phiD ϱ lam L w u ^ 2) y * y) - jStar lam| ≤ 16 * w / L := by have hw0 : 0 < w := by linarith have hwL' : 2 * w ≤ L := by linarith have hL : 0 < L := by linarith + have hf := modFactor_cosD h0 h1 hL set A : ℝ → ℝ := Params.autocorr (fun u => phiD ϱ lam L w u ^ 2) with hAdef - have hAcont : Continuous A := by - rw [hAdef] - refine Taper.autocorr_continuous_of_support _ (M := L/2) - ((phiD_contDiff hϱ h0 h1 hw0 hwL').pow 2).continuous ?_ - intro u hu - show phiD ϱ lam L w u ^ 2 = 0 - rw [phiD_eq_zero hϱ hw0 hu, zero_pow two_ne_zero] - have hCcont : Continuous (Cfun lam L) := by - unfold Cfun - fun_prop - have hIA : IntervalIntegrable (fun y => A y * y) MeasureTheory.volume 0 L := + have hAcont : Continuous A := + Taper.autocorr_continuous_of_support _ (M := L / 2) + ((phiM_contDiff hf hϱ hw0 hwL').pow 2).continuous + (fun u hu => by simp only [phiD, phiM_eq_zero hϱ hw0 hu, zero_pow two_ne_zero]) + have hCcont : Continuous (Cfun lam L) := by unfold Cfun; fun_prop + have hIA : IntervalIntegrable (fun y => A y * y) volume 0 L := (hAcont.mul continuous_id).intervalIntegrable 0 L - have hIC : IntervalIntegrable (fun y => Cfun lam L y * y) MeasureTheory.volume 0 L := + have hIC : IntervalIntegrable (fun y => Cfun lam L y * y) volume 0 L := (hCcont.mul continuous_id).intervalIntegrable 0 L - have hsplit : ∫ y in (0:ℝ)..L, A y * y - = (∫ y in (0:ℝ)..L, (A y - Cfun lam L y) * y) + ∫ y in (0:ℝ)..L, Cfun lam L y * y := by - have e1 : ∫ y in (0:ℝ)..L, (A y - Cfun lam L y) * y - = ∫ y in (0:ℝ)..L, (A y * y - Cfun lam L y * y) := - intervalIntegral.integral_congr (fun y _ => by ring) + have hsplit : ∫ y in (0 : ℝ)..L, A y * y + = (∫ y in (0 : ℝ)..L, (A y - Cfun lam L y) * y) + ∫ y in (0 : ℝ)..L, Cfun lam L y * y := by + have e1 : ∫ y in (0 : ℝ)..L, (A y - Cfun lam L y) * y + = ∫ y in (0 : ℝ)..L, (A y * y - Cfun lam L y * y) := + intervalIntegral.integral_congr fun y _ => by ring rw [e1, intervalIntegral.integral_sub hIA hIC] ring - have hcmp : |∫ y in (0:ℝ)..L, (A y - Cfun lam L y) * y| ≤ 4 * w * L * L := by + have hcmp : |∫ y in (0 : ℝ)..L, (A y - Cfun lam L y) * y| ≤ 4 * w * L * L := by have hb := intervalIntegral.norm_integral_le_of_norm_le_const (C := 4 * w * L) - (f := fun y => (A y - Cfun lam L y) * y) (a := 0) (b := L) ?_ - · rw [Real.norm_eq_abs] at hb - calc |∫ y in (0:ℝ)..L, (A y - Cfun lam L y) * y| ≤ 4 * w * L * |L - 0| := hb - _ = 4 * w * L * L := by rw [sub_zero, abs_of_pos hL] - · intro y hy - rw [Set.uIoc_of_le hL.le] at hy - rw [Real.norm_eq_abs] - show |(A y - Cfun lam L y) * y| ≤ 4 * w * L - rw [abs_mul] - calc |A y - Cfun lam L y| * |y| ≤ (4 * w) * L := by - apply mul_le_mul (autocorr_phiDsq_close hϱ h0 h1 hw0 hwL' hy.1.le hy.2) ?_ - (abs_nonneg _) (by positivity) - rw [abs_of_pos hy.1] - exact hy.2 - _ = 4 * w * L := rfl - have hmain : 2 / L ^ 3 * ∫ y in (0:ℝ)..L, Cfun lam L y * y = jStar lam := by - rw [integral_Cfun_moment h0 h1 hL, jStar_closed h0 h1] - field_simp - try ring - have e : 2 / L ^ 3 * (∫ y in (0:ℝ)..L, A y * y) - jStar lam - = 2 / L ^ 3 * (∫ y in (0:ℝ)..L, (A y - Cfun lam L y) * y) := by - rw [hsplit, mul_add, hmain] - try ring - rw [← hAdef] at * - rw [e, abs_mul, abs_of_pos (by positivity : (0:ℝ) < 2 / L ^ 3)] - calc 2 / L ^ 3 * |∫ y in (0:ℝ)..L, (A y - Cfun lam L y) * y| + (f := fun y => (A y - Cfun lam L y) * y) (a := 0) (b := L) fun y hy => by + rw [Set.uIoc_of_le hL.le] at hy + rw [Real.norm_eq_abs, abs_mul, abs_of_pos hy.1] + have hclose := autocorr_phiMsq_close hf hϱ hw0 hwL' + (fun u hu => cosD_sq_core h0 h1 hL hu) (by unfold vStar; fun_prop) + (fun s hs => (vStar_pos_core h0 h1 hs).le) (fun s _ => Real.cos_le_one _) + hy.1.le hy.2 (integral_cos_overlap h0 hL y) + exact mul_le_mul hclose hy.2 (by linarith [hy.1]) (by positivity) + rw [Real.norm_eq_abs, sub_zero, abs_of_pos hL] at hb + exact hb.trans_eq (by ring) + have hmain : 2 / L ^ 3 * ∫ y in (0 : ℝ)..L, Cfun lam L y * y = jStar lam := by + rw [integral_Cfun_moment h0 h1 hL, jStar_closed h0 h1]; field_simp + rw [show 2 / L ^ 3 * (∫ y in (0 : ℝ)..L, A y * y) - jStar lam + = 2 / L ^ 3 * (∫ y in (0 : ℝ)..L, (A y - Cfun lam L y) * y) by rw [hsplit, mul_add, hmain]; ring, + abs_mul, abs_of_pos (by positivity : (0 : ℝ) < 2 / L ^ 3)] + calc 2 / L ^ 3 * |∫ y in (0 : ℝ)..L, (A y - Cfun lam L y) * y| ≤ 2 / L ^ 3 * (4 * w * L * L) := mul_le_mul_of_nonneg_left hcmp (by positivity) - _ = 8 * w / L := by - field_simp - ring - _ ≤ 16 * w / L := by - apply div_le_div_of_nonneg_right ?_ hL.le - linarith - -section AutocorrC1 -/-! #### C¹ facts for the autocorrelation (the g_D-side hypotheses of ThmD/PP.sumA2g_close): -for h C¹ with compact support and |h| ≤ 1, the autocorrelation is differentiable with -deriv = h ⋆ h' and |deriv| ≤ ∫|h'|. Via Mathlib's convolution calculus. -/ - -open scoped Convolution - -variable {h : ℝ → ℝ} - -private theorem autocorr_eq_conv (heven : ∀ x : ℝ, h (-x) = h x) : - Params.autocorr h = h ⋆[ContinuousLinearMap.mul ℝ ℝ] h := by - funext y - show ∫ u, h u * h (u + y) = ∫ t, h t * h (y - t) - have e1 : ∫ u, h u * h (u + y) = ∫ t, h (t - y) * h t := by - have := MeasureTheory.integral_add_right_eq_self (μ := MeasureTheory.volume) - (fun t => h (t - y) * h t) y - rw [← this] - apply MeasureTheory.integral_congr_ae - apply MeasureTheory.ae_of_all - intro u - simp only [add_sub_cancel_right] - rw [e1] - apply MeasureTheory.integral_congr_ae - apply MeasureTheory.ae_of_all - intro t - show h (t - y) * h t = h t * h (y - t) - have e2 : h (t - y) = h (y - t) := by - rw [show t - y = -(y - t) by ring, heven] - rw [e2, mul_comm] + _ = 8 * w / L := by field_simp; ring + _ ≤ 16 * w / L := div_le_div_of_nonneg_right (by linarith) hL.le -theorem autocorr_deriv_facts (hC : ContDiff ℝ 1 h) (hcs : HasCompactSupport h) - (heven : ∀ x : ℝ, h (-x) = h x) (hb : ∀ u : ℝ, |h u| ≤ 1) - (hI : ∫ u, |deriv h u| ≤ 2) : - Differentiable ℝ (Params.autocorr h) ∧ Continuous (deriv (Params.autocorr h)) - ∧ ∀ y : ℝ, |deriv (Params.autocorr h) y| ≤ 2 := by - have hloc : MeasureTheory.LocallyIntegrable h MeasureTheory.volume := - (hC.continuous.integrable_of_hasCompactSupport hcs).locallyIntegrable - have hD : ∀ y : ℝ, HasDerivAt (Params.autocorr h) - ((h ⋆[ContinuousLinearMap.mul ℝ ℝ] deriv h) y) y := by - intro y - rw [autocorr_eq_conv heven] - exact HasCompactSupport.hasDerivAt_convolution_right _ hloc hcs hC y - have hdiff : Differentiable ℝ (Params.autocorr h) := fun y => (hD y).differentiableAt - have hderiv_eq : deriv (Params.autocorr h) = h ⋆[ContinuousLinearMap.mul ℝ ℝ] deriv h := - funext fun y => (hD y).deriv - have hcs' : HasCompactSupport (deriv h) := hcs.deriv - have hcont' : Continuous (deriv h) := hC.continuous_deriv le_rfl - refine ⟨hdiff, ?_, ?_⟩ - · rw [hderiv_eq] - exact hcs'.continuous_convolution_right _ hloc hcont' - · intro y - rw [hderiv_eq] - show |∫ t, h t * deriv h (y - t)| ≤ 2 - have hint' : MeasureTheory.Integrable (fun t => deriv h (y - t)) := by - have h1 : MeasureTheory.Integrable (deriv h) := - hcont'.integrable_of_hasCompactSupport hcs' - have h2 := h1.comp_sub_left y - exact h2 - calc |∫ t, h t * deriv h (y - t)| ≤ ∫ t, |h t * deriv h (y - t)| := - MeasureTheory.abs_integral_le_integral_abs - _ ≤ ∫ t, |deriv h (y - t)| := by - apply MeasureTheory.integral_mono_of_nonneg - (MeasureTheory.ae_of_all _ fun t => abs_nonneg _) hint'.abs - (MeasureTheory.ae_of_all _ fun t => ?_) - show |h t * deriv h (y - t)| ≤ |deriv h (y - t)| - rw [abs_mul] - calc |h t| * |deriv h (y - t)| ≤ 1 * |deriv h (y - t)| := - mul_le_mul_of_nonneg_right (hb t) (abs_nonneg _) - _ = |deriv h (y - t)| := one_mul _ - _ = ∫ t, |deriv h t| := by - have := MeasureTheory.integral_sub_left_eq_self (fun t => |deriv h t|) - (μ := MeasureTheory.volume) y - exact this - _ ≤ 2 := hI - -/-- the φ_D²-instance: g_D := autocorr(φ_D²) is C¹ with |g_D'| ≤ 2 (the paper's -"|g'| ≤ ‖(φ²)'‖₁ ≤ 2"), the exact hypotheses of ThmD/PP.sumA2g_close. -/ +/-- the φ_D²-instance: g_D := autocorr(φ_D²) is C¹ with |g_D'| ≤ 2. -/ theorem gD_deriv_facts (hϱ : TaperProfile ϱ) (h0 : 0 < lam) (h1 : lam ≤ 1) (hw : 0 < w) (hwL : 2 * w ≤ L) : Differentiable ℝ (Params.autocorr (fun u => phiD ϱ lam L w u ^ 2)) ∧ Continuous (deriv (Params.autocorr (fun u => phiD ϱ lam L w u ^ 2))) - ∧ ∀ y : ℝ, |deriv (Params.autocorr (fun u => phiD ϱ lam L w u ^ 2)) y| ≤ 2 := by - have hL : 0 < L := by linarith - apply autocorr_deriv_facts - · exact ((phiD_contDiff hϱ h0 h1 hw hwL).pow 2).of_le (by norm_num) - · apply HasCompactSupport.of_support_subset_isCompact - (isCompact_Icc (a := -(L/2)) (b := L/2)) - intro x hx - rw [Function.mem_support] at hx - by_contra hmem - apply hx - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hmem - have : L / 2 ≤ |x| := by - rcases hmem with hc | hc - · rw [abs_of_neg (by linarith : x < 0)]; linarith - · rw [abs_of_pos (by linarith : 0 < x)]; linarith - rw [phiD_eq_zero hϱ hw this, zero_pow two_ne_zero] - · intro x - rw [phiD_even] - · intro u - rw [abs_of_nonneg (sq_nonneg _)] - calc phiD ϱ lam L w u ^ 2 ≤ 1 ^ 2 := - pow_le_pow_left₀ (phiD_nonneg hϱ u) (phiD_le_one hϱ u) 2 - _ = 1 := one_pow 2 - · exact integral_abs_deriv_phiD_sq_le hϱ h0 h1 hw hwL - -end AutocorrC1 - -/-! -Summary of the statements proved in this file: -cos_factor_ge, phiD_contDiff, phiD_antitoneOn, integral_abs_deriv_phiD_le, -integral_abs_deriv_phiD_sq_le, integral_abs_deriv2_phiD_le, integral_abs_deriv2_phiD_sq_le, -aD_close, bD_close, jD_close (via the 1-D route: jStar_closed [Functional.lean] + the -sharp-window autocorrelation closed form integral_cos_overlap/sharp_autocorr_eq + the -y-moment closed form integral_Cfun_moment + the 4w ramp comparison -integral_abs_phiDsq_sub_sharp/autocorr_phiDsq_close — no Fubini anywhere). --/ + ∧ ∀ y : ℝ, |deriv (Params.autocorr (fun u => phiD ϱ lam L w u ^ 2)) y| ≤ 2 := + phiM_sq_deriv_facts (modFactor_cosD h0 h1 (by linarith)) hϱ hw hwL end ThmD end Zeta23 diff --git a/zeta23/Zeta23/ThmD/WindowCore.lean b/zeta23/Zeta23/ThmD/WindowCore.lean index ee3be51a87..b5c62b6a6b 100644 --- a/zeta23/Zeta23/ThmD/WindowCore.lean +++ b/zeta23/Zeta23/ThmD/WindowCore.lean @@ -10,11 +10,8 @@ Zeta23/ThmD/WindowCore.lean — the test-family facts of §5 for an ARBITRARY ad Paper §7.1: "Propositions 5.1–5.5 hold verbatim for any even C_c² window with the same support and derivative norms." We package such a window as `AdmWindow v L w c` (even, `0 ≤ v ≤ 1`, `C²`, `supp v ⊆ [−L/2, L/2]`, `‖v'‖₁, ‖(v²)'‖₁ ≤ 2`, `‖v''‖₁, ‖(v²)''‖₁ ≤ c/w`, `c ≥ 4`, -`1 ≤ w`, `8w ≤ L`) and derive, ONCE, everything `LocalHypsCore` asks of the data -`(v̂, (v²)^, v⋆v, v²⋆v², a, b)` — by the same generic lemmas (Zeta23/Poisson/PaperFT.lean, -Zeta23/Taper/{Strip,Decay,Fourier}.lean §Generic, Zeta23/Poisson.lean) that the flat-top facade -Zeta23/Taper.lean specializes to `Taper.phi`. The Montgomery–Taylor window `ThmD.phiD` is an -`AdmWindow` with `c = cDT` (Zeta23/ThmD/BridgeD.lean); so is the flat window with `c = cRho ϱ`. +`1 ≤ w`, `8w ≤ L`) and derive, ONCE via `RealWindow`, everything `LocalHypsCore` asks of the +data `(v̂, (v²)^, v⋆v, v²⋆v², a, b)` for both `v` and `v²`. -/ import Zeta23.Taper import Zeta23.Poisson @@ -69,6 +66,94 @@ def localFun : PrimeSide.LocalFun := ⟨vHatR v, VPhiR v, Av v, gv v, av v L, bv end Defs +/-! ## Shared `RealWindow` Fourier machinery (instantiated for both `v` and `v²`) -/ + +private structure RealWindow (f : ℝ → ℝ) (L w c : ℝ) : Prop + extends Taper.RealWindowBase f L where + w_pos : 0 < w + even : ∀ u, f (-u) = f u + l1_deriv : ∫ u, |deriv f u| ≤ 2 + l1_deriv2 : ∫ u, |deriv (deriv f) u| ≤ c / w + +namespace RealWindow +variable {f : ℝ → ℝ} {L w c : ℝ} (hf : RealWindow f L w c) +include hf + +private abbrev ft (f : ℝ → ℝ) (z : ℂ) : ℂ := paperFT (fun u => (f u : ℂ)) z +private abbrev ftR (f : ℝ → ℝ) (r : ℝ) : ℝ := (ft f r).re + +lemma abs_ftR_le_L (r : ℝ) : |ftR f r| ≤ L := + (Complex.abs_re_le_norm _).trans (by simpa using hf.norm_ft_le (r : ℂ)) + +lemma abs_ftR_mul_abs_le (r : ℝ) : |ftR f r| * |r| ≤ 2 := by + have h := Taper.norm_paperFT_mul_le (hf.fC_contDiff.of_le (by norm_num)) hf.fC_supp (r : ℂ) + rw [Taper.deriv_ofReal_comp (hf.contDiff.differentiable (by norm_num))] at h + simp only [Complex.norm_real, Real.norm_eq_abs, Complex.ofReal_im, abs_zero, zero_mul, + Real.exp_zero, one_mul] at h + calc |ftR f r| * |r| ≤ ‖ft f r‖ * |r| := + mul_le_mul_of_nonneg_right (Complex.abs_re_le_norm _) (abs_nonneg r) + _ ≤ ∫ u, |deriv f u| := h + _ ≤ 2 := hf.l1_deriv + +lemma abs_ftR_mul_sq_le (r : ℝ) : |ftR f r| * r ^ 2 ≤ c / w := by + have h := hf.norm_ft_mul_sq_le (r : ℂ) + simp only [Complex.norm_real, Real.norm_eq_abs, Complex.ofReal_im, abs_zero, zero_mul, + Real.exp_zero, one_mul, sq_abs] at h + calc |ftR f r| * r ^ 2 ≤ ‖ft f r‖ * r ^ 2 := + mul_le_mul_of_nonneg_right (Complex.abs_re_le_norm _) (sq_nonneg r) + _ ≤ ∫ u, |deriv (deriv f) u| := h + _ ≤ c / w := hf.l1_deriv2 + +lemma abs_ftR_le_psiA (p : PrimeSide.Setting) (hL : p.L = L) (hw : p.w = w) (r : ℝ) : + |ftR f r| ≤ PrimeSide.psiA c p r := by + unfold PrimeSide.psiA + rw [hL, hw] + split_ifs with hr + · exact hf.abs_ftR_le_L r + · have hra : 0 < |r| := abs_pos.mpr hr + refine le_min (hf.abs_ftR_le_L r) (le_min ?_ ?_) + · rw [le_div_iff₀ hra]; exact hf.abs_ftR_mul_abs_le r + · rw [le_div_iff₀ (by have := hf.w_pos; positivity), show w * r ^ 2 = r ^ 2 * w by ring, + ← mul_assoc, ← le_div_iff₀ hf.w_pos] + exact hf.abs_ftR_mul_sq_le r + +lemma ft_ofReal (r : ℝ) : ft f r = (ftR f r : ℂ) := Taper.paperFT_ofReal_eq_re hf.even r + +lemma ftR_even (r : ℝ) : ftR f (-r) = ftR f r := by + simp only [ftR, ft, Complex.ofReal_neg, Taper.paperFT_neg_of_even hf.even] + +lemma ftR_continuous : Continuous (ftR f) := + (Taper.contDiff_re_paperFT_ofReal hf.fC_continuous hf.fC_hasCompactSupport 0).continuous + +lemma ftR_contDiff_one : ContDiff ℝ 1 (ftR f) := + Taper.contDiff_re_paperFT_ofReal hf.fC_continuous hf.fC_hasCompactSupport 1 + +lemma ftR_sq_eq (r : ℝ) : ((ftR f r) ^ 2 : ℂ) = paperFT (fun u => (Params.autocorr f u : ℂ)) r := by + have h := Taper.paperFT_autocorr hf.even hf.continuous hf.hasCompactSupport r + change paperFT (fun u => (Params.autocorr f u : ℂ)) r = ft f r ^ 2 at h + rw [hf.ft_ofReal r] at h + exact h.symm + +lemma integrable_ftR_sq : Integrable (fun r => ftR f r ^ 2) := + (Taper.integrable_re_paperFT_sq_and hf.fC_contDiff hf.fC_supp).1 + +lemma integrable_ftR_sq_mul_abs : Integrable (fun r => ftR f r ^ 2 * |r|) := + (Taper.integrable_re_paperFT_sq_and hf.fC_contDiff hf.fC_supp).2 + +lemma integral_ftR_sq_mul_cos (y : ℝ) : + ∫ r, ftR f r ^ 2 * Real.cos (r * y) = 2 * π * Params.autocorr f y := + Taper.integral_mul_cos_of_paperFT_eq (A := Params.autocorr f) (G := fun r => ftR f r ^ 2) + (Taper.autocorr_continuous_of_even hf.even hf.continuous hf.hasCompactSupport) + (Taper.autocorr_integrable_of_even hf.even hf.continuous hf.hasCompactSupport) + hf.integrable_ftR_sq + (fun r => by rw [← hf.ftR_sq_eq r]; push_cast; ring) y + +lemma integral_ftR_sq : ∫ r, ftR f r ^ 2 = 2 * π * Params.autocorr f 0 := by + have h := hf.integral_ftR_sq_mul_cos 0 + simpa only [mul_zero, Real.cos_zero, mul_one] using h + +end RealWindow + variable {v : ℝ → ℝ} {L w c : ℝ} /-! ## Elementary consequences of admissibility -/ @@ -82,94 +167,49 @@ lemma L_pos : 0 < L := by linarith [hW.one_le_w, hW.w8] lemma two_w_le : 2 * w ≤ L := by linarith [hW.one_le_w, hW.w8] lemma c_nonneg : 0 ≤ c := le_trans (by norm_num) hW.four_le_c -lemma continuous : Continuous v := hW.contDiff.continuous - -lemma eq_zero_of_not_mem {u : ℝ} (hu : u ∉ Icc (-(L / 2)) (L / 2)) : v u = 0 := by - apply hW.support - simp only [mem_Icc, not_and_or, not_le] at hu - rcases hu with hu | hu - · linarith [neg_le_abs u] - · linarith [le_abs_self u] - -lemma hasCompactSupport : HasCompactSupport v := - HasCompactSupport.intro isCompact_Icc fun _ hu => hW.eq_zero_of_not_mem hu - -lemma support_subset : Function.support v ⊆ Icc (-(L / 2)) (L / 2) := fun u hu => by - by_contra h - exact hu (hW.eq_zero_of_not_mem h) - -lemma integrable : Integrable v := hW.continuous.integrable_of_hasCompactSupport hW.hasCompactSupport - lemma sq_even (u : ℝ) : v (-u) ^ 2 = v u ^ 2 := by rw [hW.even] lemma sq_eq_zero (u : ℝ) (hu : L / 2 ≤ |u|) : v u ^ 2 = 0 := by rw [hW.support u hu, zero_pow two_ne_zero] -lemma sq_hasCompactSupport : HasCompactSupport (fun u => v u ^ 2) := - hW.hasCompactSupport.comp_left (g := fun x : ℝ => x ^ 2) (by simp) +lemma sq_le_self (u : ℝ) : v u ^ 2 ≤ v u := by + have h0 := hW.nonneg u; have h1 := hW.le_one u; nlinarith -lemma sq_continuous : Continuous (fun u => v u ^ 2) := hW.continuous.pow 2 +private lemma toRealWindow : RealWindow v L w c := + ⟨⟨hW.L_pos, hW.nonneg, hW.le_one, hW.contDiff, hW.support⟩, + hW.w_pos, hW.even, hW.l1_deriv, hW.l1_deriv2⟩ + +private lemma sqToRealWindow : RealWindow (fun u => v u ^ 2) L w c := + ⟨⟨hW.L_pos, fun _ => sq_nonneg _, fun u => (hW.sq_le_self u).trans (hW.le_one u), + hW.contDiff.pow 2, hW.sq_eq_zero⟩, + hW.w_pos, hW.sq_even, hW.l1_deriv_sq, hW.l1_deriv2_sq⟩ + +lemma continuous : Continuous v := hW.toRealWindow.continuous +lemma eq_zero_of_not_mem {u : ℝ} (hu : u ∉ Icc (-(L / 2)) (L / 2)) : v u = 0 := + hW.toRealWindow.eq_zero_of_not_mem hu +lemma hasCompactSupport : HasCompactSupport v := hW.toRealWindow.hasCompactSupport +lemma support_subset : Function.support v ⊆ Icc (-(L / 2)) (L / 2) := fun _ hu => by + by_contra h; exact hu (hW.eq_zero_of_not_mem h) +lemma integrable : Integrable v := hW.toRealWindow.integrable +lemma sq_hasCompactSupport : HasCompactSupport (fun u => v u ^ 2) := hW.sqToRealWindow.hasCompactSupport +lemma sq_continuous : Continuous (fun u => v u ^ 2) := hW.sqToRealWindow.continuous lemma integrable_pow {n : ℕ} (hn : 0 < n) : Integrable (fun u => v u ^ n) := (hW.continuous.pow n).integrable_of_hasCompactSupport (hW.hasCompactSupport.comp_left (g := (· ^ n)) (by simp [zero_pow hn.ne'])) -/-! #### the ℂ-valued window and its square, as inputs to the PaperFT lemmas -/ - -lemma vC_continuous : Continuous (fun u => (v u : ℂ)) := Complex.continuous_ofReal.comp hW.continuous - -lemma vC_hasCompactSupport : HasCompactSupport (fun u => (v u : ℂ)) := - hW.hasCompactSupport.comp_left Complex.ofReal_zero - -lemma vC_contDiff : ContDiff ℝ 2 (fun u => (v u : ℂ)) := by - have := Complex.ofRealCLM.contDiff.comp hW.contDiff - simpa [Function.comp_def] using this - -lemma vC_supp : ∀ u, (v u : ℂ) ≠ 0 → |u| ≤ L / 2 := by - intro u hu - by_contra h - exact hu (by rw [hW.support u (le_of_lt (not_le.mp h)), ofReal_zero]) - -lemma vSqC_continuous : Continuous (fun u => (((v u) ^ 2 : ℝ) : ℂ)) := - Complex.continuous_ofReal.comp hW.sq_continuous - -lemma vSqC_hasCompactSupport : HasCompactSupport (fun u => (((v u) ^ 2 : ℝ) : ℂ)) := - hW.hasCompactSupport.comp_left (g := fun x : ℝ => ((x ^ 2 : ℝ) : ℂ)) (by simp) - -lemma vSqC_contDiff : ContDiff ℝ 2 (fun u => (((v u) ^ 2 : ℝ) : ℂ)) := by - have := Complex.ofRealCLM.contDiff.comp (hW.contDiff.pow 2) - simpa [Function.comp_def] using this - -lemma vSqC_supp : ∀ u, (((v u) ^ 2 : ℝ) : ℂ) ≠ 0 → |u| ≤ L / 2 := by - intro u hu - apply hW.vC_supp u - intro h - apply hu - rw [Complex.ofReal_eq_zero] at h - simp [h] - -/-! #### `∫ v ≤ L`, `∫ v² ≤ L` -/ - -lemma integral_le : ∫ u, v u ≤ L := by - have hL : 0 ≤ L := hW.L_pos.le - have hle : ∀ u, v u ≤ (Icc (-(L / 2)) (L / 2)).indicator (fun _ => (1 : ℝ)) u := by - intro u - by_cases hu : u ∈ Icc (-(L / 2)) (L / 2) - · rw [indicator_of_mem hu]; exact hW.le_one u - · rw [indicator_of_notMem hu, hW.eq_zero_of_not_mem hu] - calc ∫ u, v u ≤ ∫ u, (Icc (-(L / 2)) (L / 2)).indicator (fun _ => (1 : ℝ)) u := by - apply integral_mono hW.integrable _ hle - exact (integrable_indicator_iff measurableSet_Icc).mpr (integrableOn_const (by simp)) - _ = L := by - rw [integral_indicator_const _ measurableSet_Icc, measureReal_def, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), smul_eq_mul, mul_one] - ring +lemma integral_le : ∫ u, v u ≤ L := hW.toRealWindow.integral_le +lemma integral_sq_le : ∫ u, v u ^ 2 ≤ L := hW.sqToRealWindow.integral_le -lemma sq_le_self (u : ℝ) : v u ^ 2 ≤ v u := by - have h0 := hW.nonneg u; have h1 := hW.le_one u; nlinarith +lemma vC_continuous : Continuous (fun u => (v u : ℂ)) := hW.toRealWindow.fC_continuous +lemma vC_hasCompactSupport : HasCompactSupport (fun u => (v u : ℂ)) := hW.toRealWindow.fC_hasCompactSupport +lemma vC_contDiff : ContDiff ℝ 2 (fun u => (v u : ℂ)) := hW.toRealWindow.fC_contDiff +lemma vC_supp : ∀ u, (v u : ℂ) ≠ 0 → |u| ≤ L / 2 := hW.toRealWindow.fC_supp -lemma integral_sq_le : ∫ u, v u ^ 2 ≤ L := - le_trans (integral_mono (hW.integrable_pow two_pos) hW.integrable hW.sq_le_self) hW.integral_le +lemma vSqC_continuous : Continuous (fun u => (((v u) ^ 2 : ℝ) : ℂ)) := hW.sqToRealWindow.fC_continuous +lemma vSqC_hasCompactSupport : HasCompactSupport (fun u => (((v u) ^ 2 : ℝ) : ℂ)) := hW.sqToRealWindow.fC_hasCompactSupport +lemma vSqC_contDiff : ContDiff ℝ 2 (fun u => (((v u) ^ 2 : ℝ) : ℂ)) := hW.sqToRealWindow.fC_contDiff +lemma vSqC_supp : ∀ u, (((v u) ^ 2 : ℝ) : ℂ) ≠ 0 → |u| ≤ L / 2 := hW.sqToRealWindow.fC_supp end Basic @@ -179,114 +219,32 @@ section Bounds variable (hW : AdmWindow v L w c) include hW -lemma norm_vHat_le (z : ℂ) : ‖vHat v z‖ ≤ Real.exp (|z.im| * (L / 2)) * L := by - have hint : Integrable (fun u => (v u : ℂ)) := - hW.vC_continuous.integrable_of_hasCompactSupport hW.vC_hasCompactSupport - have h := norm_paperFT_le hint hW.vC_supp z - simp only [Complex.norm_real, Real.norm_eq_abs] at h - refine le_trans h ?_ - gcongr - calc ∫ u, |v u| = ∫ u, v u := by congr 1 with u; exact abs_of_nonneg (hW.nonneg u) - _ ≤ L := hW.integral_le +lemma norm_vHat_le (z : ℂ) : ‖vHat v z‖ ≤ Real.exp (|z.im| * (L / 2)) * L := + hW.toRealWindow.norm_ft_le z lemma norm_vHat_mul_sq_le (z : ℂ) : - ‖vHat v z‖ * ‖z‖ ^ 2 ≤ Real.exp (|z.im| * (L / 2)) * ∫ u, |deriv (deriv v) u| := by - have h := norm_paperFT_mul_sq_le hW.vC_contDiff hW.vC_supp z - have hd1 : Differentiable ℝ v := hW.contDiff.differentiable (by norm_num) - have hd2 : Differentiable ℝ (deriv v) := (hW.contDiff.deriv' (n := 1)).differentiable (by norm_num) - rw [Taper.deriv_ofReal_comp hd1, Taper.deriv_ofReal_comp hd2] at h - simp only [Complex.norm_real, Real.norm_eq_abs] at h - exact h - -set_option linter.unusedSectionVars false in -- `hW` is unused here but kept so that call sites can write `hW.` -lemma abs_vHatR_le_norm (r : ℝ) : |vHatR v r| ≤ ‖vHat v r‖ := Complex.abs_re_le_norm _ -set_option linter.unusedSectionVars false in -- `hW` is unused here but kept so that call sites can write `hW.` -lemma abs_VPhiR_le_norm (r : ℝ) : |VPhiR v r| ≤ ‖VPhi v r‖ := Complex.abs_re_le_norm _ - -lemma abs_vHatR_le_L (r : ℝ) : |vHatR v r| ≤ L := by - refine (hW.abs_vHatR_le_norm r).trans ?_ - simpa using hW.norm_vHat_le (r : ℂ) - -lemma abs_vHatR_mul_abs_le (r : ℝ) : |vHatR v r| * |r| ≤ 2 := by - have h := Taper.norm_paperFT_mul_le (hW.vC_contDiff.of_le (by norm_num)) hW.vC_supp (r : ℂ) - rw [Taper.deriv_ofReal_comp (hW.contDiff.differentiable (by norm_num))] at h - simp only [Complex.norm_real, Real.norm_eq_abs, Complex.ofReal_im, abs_zero, zero_mul, - Real.exp_zero, one_mul] at h - calc |vHatR v r| * |r| ≤ ‖vHat v r‖ * |r| := - mul_le_mul_of_nonneg_right (hW.abs_vHatR_le_norm r) (abs_nonneg r) - _ ≤ ∫ u, |deriv v u| := h - _ ≤ 2 := hW.l1_deriv + ‖vHat v z‖ * ‖z‖ ^ 2 ≤ Real.exp (|z.im| * (L / 2)) * ∫ u, |deriv (deriv v) u| := + hW.toRealWindow.norm_ft_mul_sq_le z -lemma abs_vHatR_mul_sq_le (r : ℝ) : |vHatR v r| * r ^ 2 ≤ c / w := by - have h := hW.norm_vHat_mul_sq_le (r : ℂ) - simp only [Complex.norm_real, Real.norm_eq_abs, Complex.ofReal_im, abs_zero, zero_mul, - Real.exp_zero, one_mul, sq_abs] at h - calc |vHatR v r| * r ^ 2 ≤ ‖vHat v r‖ * r ^ 2 := - mul_le_mul_of_nonneg_right (hW.abs_vHatR_le_norm r) (sq_nonneg r) - _ ≤ ∫ u, |deriv (deriv v) u| := h - _ ≤ c / w := hW.l1_deriv2 - -lemma abs_VPhiR_le_L (r : ℝ) : |VPhiR v r| ≤ L := by - refine (hW.abs_VPhiR_le_norm r).trans ?_ - have hint : Integrable (fun u => (((v u) ^ 2 : ℝ) : ℂ)) := - hW.vSqC_continuous.integrable_of_hasCompactSupport hW.vSqC_hasCompactSupport - have h := norm_paperFT_le hint hW.vSqC_supp (r : ℂ) - simp only [Complex.norm_real, Real.norm_eq_abs, Complex.ofReal_im, abs_zero, zero_mul, - Real.exp_zero, one_mul] at h - refine h.trans ?_ - calc ∫ u, |v u ^ 2| = ∫ u, v u ^ 2 := by congr 1 with u; exact abs_of_nonneg (sq_nonneg _) - _ ≤ L := hW.integral_sq_le - -lemma abs_VPhiR_mul_abs_le (r : ℝ) : |VPhiR v r| * |r| ≤ 2 := by - have h := Taper.norm_paperFT_mul_le (hW.vSqC_contDiff.of_le (by norm_num)) hW.vSqC_supp (r : ℂ) - have hd1 : Differentiable ℝ (fun u => v u ^ 2) := (hW.contDiff.differentiable (by norm_num)).pow 2 - rw [Taper.deriv_ofReal_comp hd1] at h - simp only [Complex.norm_real, Real.norm_eq_abs, Complex.ofReal_im, abs_zero, zero_mul, - Real.exp_zero, one_mul] at h - calc |VPhiR v r| * |r| ≤ ‖VPhi v r‖ * |r| := - mul_le_mul_of_nonneg_right (hW.abs_VPhiR_le_norm r) (abs_nonneg r) - _ ≤ ∫ u, |deriv (fun u => v u ^ 2) u| := h - _ ≤ 2 := hW.l1_deriv_sq - -lemma abs_VPhiR_mul_sq_le (r : ℝ) : |VPhiR v r| * r ^ 2 ≤ c / w := by - have h := norm_paperFT_mul_sq_le hW.vSqC_contDiff hW.vSqC_supp (r : ℂ) - have hd1 : Differentiable ℝ (fun u => v u ^ 2) := (hW.contDiff.differentiable (by norm_num)).pow 2 - have hd2 : Differentiable ℝ (deriv (fun u => v u ^ 2)) := - (((hW.contDiff.pow 2).deriv' (n := 1)).differentiable (by norm_num)) - rw [Taper.deriv_ofReal_comp hd1, Taper.deriv_ofReal_comp hd2] at h - simp only [Complex.norm_real, Real.norm_eq_abs, Complex.ofReal_im, abs_zero, zero_mul, - Real.exp_zero, one_mul, sq_abs] at h - calc |VPhiR v r| * r ^ 2 ≤ ‖VPhi v r‖ * r ^ 2 := - mul_le_mul_of_nonneg_right (hW.abs_VPhiR_le_norm r) (sq_nonneg r) - _ ≤ ∫ u, |deriv (deriv fun u => v u ^ 2) u| := h - _ ≤ c / w := hW.l1_deriv2_sq +lemma norm_vHat_sub_I_mul_le (r y : ℝ) (hy : |y| ≤ 1 / 2) (hz : (r : ℂ) - I * y ≠ 0) : + ‖vHat v (r - I * y)‖ + ≤ Real.exp (L / 4) * (∫ u, |deriv (deriv v) u|) / ‖(r : ℂ) - I * y‖ ^ 2 := + hW.toRealWindow.norm_ft_sub_I_mul_le r y hy hz + +lemma abs_vHatR_le_L (r : ℝ) : |vHatR v r| ≤ L := hW.toRealWindow.abs_ftR_le_L r +lemma abs_vHatR_mul_abs_le (r : ℝ) : |vHatR v r| * |r| ≤ 2 := hW.toRealWindow.abs_ftR_mul_abs_le r +lemma abs_vHatR_mul_sq_le (r : ℝ) : |vHatR v r| * r ^ 2 ≤ c / w := hW.toRealWindow.abs_ftR_mul_sq_le r + +lemma abs_VPhiR_le_L (r : ℝ) : |VPhiR v r| ≤ L := hW.sqToRealWindow.abs_ftR_le_L r +lemma abs_VPhiR_mul_abs_le (r : ℝ) : |VPhiR v r| * |r| ≤ 2 := hW.sqToRealWindow.abs_ftR_mul_abs_le r +lemma abs_VPhiR_mul_sq_le (r : ℝ) : |VPhiR v r| * r ^ 2 ≤ c / w := hW.sqToRealWindow.abs_ftR_mul_sq_le r /-- `|v̂| ≤ ψ_c` in the majorant spelling `psiA c p` (for any `p` with `p.L = L`, `p.w = w`). -/ lemma abs_vHatR_le_psiA (p : PrimeSide.Setting) (hL : p.L = L) (hw : p.w = w) (r : ℝ) : - |vHatR v r| ≤ PrimeSide.psiA c p r := by - unfold PrimeSide.psiA - rw [hL, hw] - split_ifs with hr - · exact hW.abs_vHatR_le_L r - · have hra : 0 < |r| := abs_pos.mpr hr - refine le_min (hW.abs_vHatR_le_L r) (le_min ?_ ?_) - · rw [le_div_iff₀ hra]; exact hW.abs_vHatR_mul_abs_le r - · rw [le_div_iff₀ (by have := hW.w_pos; positivity), show w * r ^ 2 = r ^ 2 * w by ring, - ← mul_assoc, ← le_div_iff₀ hW.w_pos] - exact hW.abs_vHatR_mul_sq_le r + |vHatR v r| ≤ PrimeSide.psiA c p r := hW.toRealWindow.abs_ftR_le_psiA p hL hw r lemma abs_VPhiR_le_psiA (p : PrimeSide.Setting) (hL : p.L = L) (hw : p.w = w) (r : ℝ) : - |VPhiR v r| ≤ PrimeSide.psiA c p r := by - unfold PrimeSide.psiA - rw [hL, hw] - split_ifs with hr - · exact hW.abs_VPhiR_le_L r - · have hra : 0 < |r| := abs_pos.mpr hr - refine le_min (hW.abs_VPhiR_le_L r) (le_min ?_ ?_) - · rw [le_div_iff₀ hra]; exact hW.abs_VPhiR_mul_abs_le r - · rw [le_div_iff₀ (by have := hW.w_pos; positivity), show w * r ^ 2 = r ^ 2 * w by ring, - ← mul_assoc, ← le_div_iff₀ hW.w_pos] - exact hW.abs_VPhiR_mul_sq_le r + |VPhiR v r| ≤ PrimeSide.psiA c p r := hW.sqToRealWindow.abs_ftR_le_psiA p hL hw r end Bounds @@ -300,26 +258,15 @@ omit hW in lemma vHat_ofReal (heven : ∀ u, v (-u) = v u) (r : ℝ) : vHat v r = (vHatR v r : ℂ) := Taper.paperFT_ofReal_eq_re (v := v) heven r -lemma vHat_ofReal' (r : ℝ) : vHat v r = (vHatR v r : ℂ) := vHat_ofReal hW.even r +lemma vHat_ofReal' (r : ℝ) : vHat v r = (vHatR v r : ℂ) := hW.toRealWindow.ft_ofReal r +lemma VPhi_ofReal (r : ℝ) : VPhi v r = (VPhiR v r : ℂ) := hW.sqToRealWindow.ft_ofReal r -lemma VPhi_ofReal (r : ℝ) : VPhi v r = (VPhiR v r : ℂ) := - Taper.paperFT_ofReal_eq_re (v := fun u => v u ^ 2) hW.sq_even r +lemma vHatR_even (r : ℝ) : vHatR v (-r) = vHatR v r := hW.toRealWindow.ftR_even r +lemma VPhiR_even (r : ℝ) : VPhiR v (-r) = VPhiR v r := hW.sqToRealWindow.ftR_even r -lemma vHatR_even (r : ℝ) : vHatR v (-r) = vHatR v r := by - simp only [vHatR, vHat, Complex.ofReal_neg, Taper.paperFT_neg_of_even hW.even] - -lemma VPhiR_even (r : ℝ) : VPhiR v (-r) = VPhiR v r := by - simp only [VPhiR, VPhi, Complex.ofReal_neg] - rw [Taper.paperFT_neg_of_even (v := fun u => v u ^ 2) hW.sq_even] - -lemma vHatR_continuous : Continuous (vHatR v) := - (Taper.contDiff_re_paperFT_ofReal hW.vC_continuous hW.vC_hasCompactSupport 0).continuous - -lemma VPhiR_continuous : Continuous (VPhiR v) := - (Taper.contDiff_re_paperFT_ofReal hW.vSqC_continuous hW.vSqC_hasCompactSupport 0).continuous - -lemma VPhiR_contDiff_one : ContDiff ℝ 1 (VPhiR v) := - Taper.contDiff_re_paperFT_ofReal hW.vSqC_continuous hW.vSqC_hasCompactSupport 1 +lemma vHatR_continuous : Continuous (vHatR v) := hW.toRealWindow.ftR_continuous +lemma VPhiR_continuous : Continuous (VPhiR v) := hW.sqToRealWindow.ftR_continuous +lemma VPhiR_contDiff_one : ContDiff ℝ 1 (VPhiR v) := hW.sqToRealWindow.ftR_contDiff_one lemma VPhiR_zero : VPhiR v 0 = av v L * L := by have hL : L ≠ 0 := hW.L_pos.ne' @@ -337,55 +284,30 @@ lemma Av_zero : Av v 0 = av v L * L := by congr 1; funext u; rw [add_zero, sq] /-- `v̂² = (A_v)^` on ℝ. -/ -lemma vHatR_sq_eq (r : ℝ) : ((vHatR v r) ^ 2 : ℂ) = paperFT (fun u => (Av v u : ℂ)) r := by - have h := Taper.paperFT_autocorr (v := v) hW.even hW.continuous hW.hasCompactSupport r - have h2 : paperFT (fun u => (v u : ℂ)) r = (vHatR v r : ℂ) := hW.vHat_ofReal' r - rw [h2] at h - exact h.symm +lemma vHatR_sq_eq (r : ℝ) : ((vHatR v r) ^ 2 : ℂ) = paperFT (fun u => (Av v u : ℂ)) r := + hW.toRealWindow.ftR_sq_eq r /-- `V² = (g_v)^` on ℝ. -/ -lemma VPhiR_sq_eq (r : ℝ) : ((VPhiR v r) ^ 2 : ℂ) = paperFT (fun u => (gv v u : ℂ)) r := by - have h := Taper.paperFT_autocorr (v := fun u => v u ^ 2) hW.sq_even hW.sq_continuous - hW.sq_hasCompactSupport r - have h2 : paperFT (fun u => (((v u) ^ 2 : ℝ) : ℂ)) r = (VPhiR v r : ℂ) := hW.VPhi_ofReal r - beta_reduce at h - rw [h2] at h - exact h.symm - -lemma integrable_vHatR_sq : Integrable (fun r => vHatR v r ^ 2) := - (Taper.integrable_re_paperFT_sq_and hW.vC_contDiff hW.vC_supp).1 - -lemma integrable_vHatR_sq_mul_abs : Integrable (fun r => vHatR v r ^ 2 * |r|) := - (Taper.integrable_re_paperFT_sq_and hW.vC_contDiff hW.vC_supp).2 - -lemma integrable_VPhiR_sq : Integrable (fun x => VPhiR v x ^ 2) := - (Taper.integrable_re_paperFT_sq_and hW.vSqC_contDiff hW.vSqC_supp).1 +lemma VPhiR_sq_eq (r : ℝ) : ((VPhiR v r) ^ 2 : ℂ) = paperFT (fun u => (gv v u : ℂ)) r := + hW.sqToRealWindow.ftR_sq_eq r -lemma integrable_VPhiR_sq_mul_abs : Integrable (fun x => VPhiR v x ^ 2 * |x|) := - (Taper.integrable_re_paperFT_sq_and hW.vSqC_contDiff hW.vSqC_supp).2 +lemma integrable_vHatR_sq : Integrable (fun r => vHatR v r ^ 2) := hW.toRealWindow.integrable_ftR_sq +lemma integrable_vHatR_sq_mul_abs : Integrable (fun r => vHatR v r ^ 2 * |r|) := hW.toRealWindow.integrable_ftR_sq_mul_abs +lemma integrable_VPhiR_sq : Integrable (fun x => VPhiR v x ^ 2) := hW.sqToRealWindow.integrable_ftR_sq +lemma integrable_VPhiR_sq_mul_abs : Integrable (fun x => VPhiR v x ^ 2 * |x|) := hW.sqToRealWindow.integrable_ftR_sq_mul_abs /-! #### the autocorrelations -/ -set_option linter.unusedSectionVars false in -- `hW` is unused here but kept so that call sites can write `hW.` -lemma Av_even (y : ℝ) : Av v (-y) = Av v y := Taper.autocorr_even' _ y -set_option linter.unusedSectionVars false in -- `hW` is unused here but kept so that call sites can write `hW.` -lemma gv_even (y : ℝ) : gv v (-y) = gv v y := Taper.autocorr_even' _ y - +set_option linter.unusedSectionVars false in lemma integrable_mul_shift (y : ℝ) : Integrable fun u => v u * v (u + y) := by have hc := hW.continuous refine Continuous.integrable_of_hasCompactSupport (by fun_prop) ?_ exact HasCompactSupport.intro (K := Icc (-(L / 2)) (L / 2)) isCompact_Icc fun u hu => by rw [hW.eq_zero_of_not_mem hu, zero_mul] -lemma integrable_sq_mul_shift (y : ℝ) : Integrable fun u => v u ^ 2 * v (u + y) ^ 2 := by - have hc := hW.continuous - refine Continuous.integrable_of_hasCompactSupport (by fun_prop) ?_ - exact HasCompactSupport.intro (K := Icc (-(L / 2)) (L / 2)) isCompact_Icc fun u hu => by - rw [hW.eq_zero_of_not_mem hu]; ring - -set_option linter.unusedSectionVars false in -- `hW` is unused here but kept so that call sites can write `hW.` +set_option linter.unusedSectionVars false in lemma gv_nonneg (y : ℝ) : 0 ≤ gv v y := - integral_nonneg fun u => mul_nonneg (sq_nonneg _) (sq_nonneg _) + integral_nonneg fun _u => mul_nonneg (sq_nonneg _) (sq_nonneg _) lemma gv_le_Av (y : ℝ) : gv v y ≤ Av v y := by unfold gv Av Params.autocorr @@ -395,52 +317,31 @@ lemma gv_le_Av (y : ℝ) : gv v y ≤ Av v y := by lemma Av_le (y : ℝ) : Av v y ≤ max (L - |y|) 0 := by have h := Taper.autocorr_le_of_support v (M := L / 2) hW.nonneg hW.le_one hW.support y - rw [show 2 * (L / 2) = L by ring] at h - exact h - -lemma Av_nonneg (y : ℝ) : 0 ≤ Av v y := le_trans (hW.gv_nonneg y) (hW.gv_le_Av y) + rwa [show 2 * (L / 2) = L by ring] at h lemma gv_eq_zero {y : ℝ} (hy : L ≤ |y|) : gv v y = 0 := Taper.autocorr_eq_zero_of_support (fun u => v u ^ 2) (M := L / 2) hW.sq_eq_zero (by linarith) -lemma Av_eq_zero {y : ℝ} (hy : L ≤ |y|) : Av v y = 0 := - Taper.autocorr_eq_zero_of_support v (M := L / 2) hW.support (by linarith) - lemma gv_continuous : Continuous (gv v) := Taper.autocorr_continuous_of_support (fun u => v u ^ 2) (M := L / 2) hW.sq_continuous hW.sq_eq_zero -lemma Av_continuous : Continuous (Av v) := - Taper.autocorr_continuous_of_support v (M := L / 2) hW.continuous hW.support - /-! #### inversion (cosine form) and Plancherel -/ lemma integral_vHatR_sq_mul_cos (y : ℝ) : ∫ r, vHatR v r ^ 2 * Real.cos (r * y) = 2 * π * Av v y := - Taper.integral_mul_cos_of_paperFT_eq (A := Av v) (G := fun r => vHatR v r ^ 2) - (Taper.autocorr_continuous_of_even hW.even hW.continuous hW.hasCompactSupport) - (Taper.autocorr_integrable_of_even hW.even hW.continuous hW.hasCompactSupport) - hW.integrable_vHatR_sq - (fun r => by rw [← hW.vHatR_sq_eq r]; push_cast; ring) y + hW.toRealWindow.integral_ftR_sq_mul_cos y lemma integral_VPhiR_sq_mul_cos (y : ℝ) : ∫ x, VPhiR v x ^ 2 * Real.cos (x * y) = 2 * π * gv v y := - Taper.integral_mul_cos_of_paperFT_eq (A := gv v) (G := fun r => VPhiR v r ^ 2) - (Taper.autocorr_continuous_of_even hW.sq_even hW.sq_continuous hW.sq_hasCompactSupport) - (Taper.autocorr_integrable_of_even hW.sq_even hW.sq_continuous hW.sq_hasCompactSupport) - hW.integrable_VPhiR_sq - (fun r => by rw [← hW.VPhiR_sq_eq r]; push_cast; ring) y + hW.sqToRealWindow.integral_ftR_sq_mul_cos y lemma integral_vHatR_sq : ∫ r, vHatR v r ^ 2 = 2 * π * av v L * L := by - have h := hW.integral_vHatR_sq_mul_cos 0 - simp only [mul_zero, Real.cos_zero, mul_one] at h - rw [h, hW.Av_zero] - ring + have h : ∫ r, vHatR v r ^ 2 = 2 * π * Av v 0 := hW.toRealWindow.integral_ftR_sq + rw [h, hW.Av_zero]; ring lemma integral_VPhiR_sq : ∫ r, VPhiR v r ^ 2 = 2 * π * bv v L * L := by - have h := hW.integral_VPhiR_sq_mul_cos 0 - simp only [mul_zero, Real.cos_zero, mul_one] at h - rw [h, hW.gv_zero] - ring + have h : ∫ r, VPhiR v r ^ 2 = 2 * π * gv v 0 := hW.sqToRealWindow.integral_ftR_sq + rw [h, hW.gv_zero]; ring end Fourier @@ -465,8 +366,7 @@ theorem hasSum_vHatR_mul (T τ τ' : ℝ) : (L * VPhiR v (τ - τ')) := by have h := Poisson.hasSum_paperFT_mul_paperFT hW.L_pos hW.continuous hW.support hW.even hW.vHat_decay T τ τ' - have h2 := (Complex.reCLM.hasSum h) - convert h2 using 1 + convert Complex.reCLM.hasSum h using 1 · funext k simp only [Complex.reCLM_apply] rw [show paperFT (fun u => (v u : ℂ)) = vHat v from rfl, hW.vHat_ofReal', hW.vHat_ofReal'] @@ -488,8 +388,7 @@ lemma bv_le_av : bv v L ≤ av v L := by have hmono : ∫ u : ℝ, v u ^ 4 ≤ ∫ u : ℝ, v u ^ 2 := by refine integral_mono (hW.integrable_pow (by norm_num)) (hW.integrable_pow (by norm_num)) fun u => ?_ have hp2 : v u ^ 2 ≤ 1 := pow_le_one₀ (hW.nonneg u) (hW.le_one u) - have hp2n : (0 : ℝ) ≤ v u ^ 2 := sq_nonneg _ - nlinarith [mul_le_mul_of_nonneg_left hp2 hp2n] + nlinarith [mul_le_mul_of_nonneg_left hp2 (sq_nonneg (v u))] exact mul_le_mul_of_nonneg_left hmono (by have := hW.L_pos; positivity) lemma av_le_one : av v L ≤ 1 := by @@ -498,13 +397,6 @@ lemma av_le_one : av v L ≤ 1 := by mul_le_mul_of_nonneg_left hW.integral_sq_le (by have := hW.L_pos; positivity) _ = 1 := inv_mul_cancel₀ hW.L_pos.ne' -lemma bv_nonneg : 0 ≤ bv v L := by - unfold bv - have h : (0 : ℝ) ≤ ∫ u : ℝ, v u ^ 4 := integral_nonneg fun u => by - have := hW.nonneg u; positivity - have := hW.L_pos - positivity - end AB end AdmWindow diff --git a/zeta23/Zeta23/ThmD/WindowLocalHyps.lean b/zeta23/Zeta23/ThmD/WindowLocalHyps.lean index 32cd116764..820209a6f2 100644 --- a/zeta23/Zeta23/ThmD/WindowLocalHyps.lean +++ b/zeta23/Zeta23/ThmD/WindowLocalHyps.lean @@ -9,7 +9,6 @@ Zeta23/ThmD/PsiC.lean (ψ-majorant integrals), field by field; `b ≥ 1/2` is an property of the particular window — for `φ_D` it holds for large `T`, see BridgeD.lean). -/ import Zeta23.ThmD.WindowCore -import Zeta23.ThmD.PsiC noncomputable section @@ -18,6 +17,9 @@ open Real Set MeasureTheory namespace Zeta23 namespace AdmWindow +private lemma psiC_eq_psiA (c : ℝ) (p : PrimeSide.Setting) : PsiC.psiC c p.L p.w = PrimeSide.psiA c p := + funext fun _ => rfl + /-- **Admissible window ⇒ `LocalHypsCore`.** For any `p : Setting` in the regime (`0 < λ ≤ 1`, `l ≥ 1`, `X ≥ 1`) and any window `v` admissible at scale `(p.L, p.w)` with constant `c` and `b_v ≥ 1/2`, the local data `(v̂, V, A_v, g_v, a_v, b_v)` satisfy all of §5's hypotheses. -/ @@ -30,9 +32,9 @@ theorem localHypsCore {v : ℝ → ℝ} {c : ℝ} (p : PrimeSide.Setting) (hW : have hwL := hW.w8 have hcw : 0 ≤ c / p.w := div_nonneg hW.c_nonneg hW.w_pos.le have hψ1 : ∀ r, |vHatR v r| ≤ PsiC.psiC c p.L p.w r := fun r => by - rw [PsiC.psiC_eq_psiA]; exact hW.abs_vHatR_le_psiA p rfl rfl r + rw [psiC_eq_psiA]; exact hW.abs_vHatR_le_psiA p rfl rfl r have hψ2 : ∀ r, |VPhiR v r| ≤ PsiC.psiC c p.L p.w r := fun r => by - rw [PsiC.psiC_eq_psiA]; exact hW.abs_VPhiR_le_psiA p rfl rfl r + rw [psiC_eq_psiA]; exact hW.abs_VPhiR_le_psiA p rfl rfl r exact { four_le_cϱ := hc lam_pos := hlam @@ -79,13 +81,13 @@ theorem localHypsCore {v : ℝ → ℝ} {c : ℝ} (p : PrimeSide.Setting) (hW : b_le_a := hW.bv_le_av a_le_one := hW.av_le_one psi_integrable := by - rw [← PsiC.psiC_eq_psiA]; exact PsiC.psi_integrable hc hw hwL + rw [← psiC_eq_psiA]; exact PsiC.psi_integrable hc hw hwL psi_sq_integrable := by - rw [← PsiC.psiC_eq_psiA]; exact PsiC.psi_sq_integrable hc hw hwL + rw [← psiC_eq_psiA]; exact PsiC.psi_sq_integrable hc hw hwL integral_psi_Ioi_le := by - rw [← PsiC.psiC_eq_psiA]; exact PsiC.integral_psi_Ioi_le hc hw hwL + rw [← psiC_eq_psiA]; exact PsiC.integral_psi_Ioi_le hc hw hwL integral_psi_sq_le := by - rw [← PsiC.psiC_eq_psiA]; exact PsiC.integral_psi_sq_le hc hw hwL + rw [← psiC_eq_psiA]; exact PsiC.integral_psi_sq_le hc hw hwL phiHat_le_psi := hW.abs_vHatR_le_psiA p rfl rfl Phi_le_psi := hW.abs_VPhiR_le_psiA p rfl rfl PiX_cont := PiX_continuous p.X_pos diff --git a/zeta23/Zeta23/ThmD/ZeroSideD.lean b/zeta23/Zeta23/ThmD/ZeroSideD.lean index 7cf0e9a21c..81e90e7edd 100644 --- a/zeta23/Zeta23/ThmD/ZeroSideD.lean +++ b/zeta23/Zeta23/ThmD/ZeroSideD.lean @@ -22,7 +22,6 @@ The analytic side conditions they ask for (φ̂ real/conj-symmetric, lem:poisson import Zeta23.ThmD.ParamsD import Zeta23.ZeroSide import Zeta23.Tail -import Zeta23.Hypotheses.GzGp noncomputable section @@ -76,11 +75,6 @@ theorem aD_range_of (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) (h4π : 4 bv_phiD_ge_half hP.taper hP.lam_pos hP.lam_le_one hP.one_le_w h8 h4π _ ≤ AdmWindow.av (P.phiD T) (P.L T) := hW.bv_le_av -theorem eventually_aD_range {P : Params} (hP : P.Valid) : - ∀ᶠ T in atTop, 1 / 2 ≤ (P.atD T).a T ∧ (P.atD T).a T ≤ 1 := by - filter_upwards [eventually_w8 hP, eventually_w4pi hP] with T h8 h4π - exact aD_range_of hP h8 h4π - /-! ### lem:poisson for φ_D and prop:block -/ theorem poissonSqD (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) : @@ -142,31 +136,27 @@ theorem hdecayD (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) (r y : ℝ) (h (hz : (r : ℂ) - I * y ≠ 0) : ‖(P.atD T).phiHat T (r - I * y)‖ ≤ Real.exp ((P.atD T).L T / 4) * C1D P T / ‖(r : ℂ) - I * y‖ ^ 2 := by - have hW := admWindow_params hP h8 - have hL : 0 ≤ P.L T := hW.L_pos.le - rw [atD_phiHat hP, Params.atD_L, le_div_iff₀ (by positivity)] - refine le_trans (hW.norm_vHat_mul_sq_le _) ?_ - unfold C1D - gcongr - have him : ((r : ℂ) - I * y).im = -y := by simp - rw [him, abs_neg] - nlinarith + rw [atD_phiHat hP, Params.atD_L] + exact (admWindow_params hP h8).norm_vHat_sub_I_mul_le r y hy hz + +theorem eventually_tailPackageD_of_localCount (Z : ZeroConfig) {P : Params} (hP : P.Valid) + {A₀ : ℝ} (hA₀ : 1 ≤ A₀) + (hloc : ∀ t : ℝ, (Z.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) : + ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z (P.atD T) T (θ₀ T)) ∧ + ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := + Tail.eventually_tailPackage_of Z hP P.atD (fun _ => rfl) hA₀ hloc (C1D P) + (C1D_nonneg P) (R := cDT P.ϱ P.lam / 2) + ((eventually_w8 hP).mono fun T h8 => by linarith [C1D_le hP h8]) + ((eventually_w8 hP).mono fun T h8 r y hy hz => hdecayD hP h8 r y hy hz) + (by filter_upwards [eventually_w8 hP, eventually_w4pi hP] with T h8 h4π + linarith [(aD_range_of hP h8 h4π).1]) + (Eventually.of_forall fun T z => GzGp.phiHat_conj _ T z) theorem eventually_tailPackageD (Z : ZeroConfig) (H : PaperInputs Z) {P : Params} (hP : P.Valid) : ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z (P.atD T) T (θ₀ T)) ∧ ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := by obtain ⟨A₀, hA₀, hloc⟩ := H.RvM.local_count - refine ⟨fun T => Tail.theta0 A₀ (Real.exp (P.L T / 4) * C1D P T) T, ?_, ?_⟩ - · have hL2 : ∀ᶠ T in atTop, 2 ≤ P.L T := (tendsto_L hP).eventually_ge_atTop 2 - filter_upwards [eventually_ge_atTop Tail.T₀, hL2, eventually_w8 hP, eventually_w4pi hP] - with T hT hL h8 h4π - have HT : Tail.TailHyp Z (P.atD T) T A₀ (C1D P T) := - { hT := hT, hL := hL, hA₀ := hA₀, hloc := hloc, hC₁ := C1D_nonneg P T, - hdecay := fun r y hy hz => hdecayD hP h8 r y hy hz } - have ha : 0 < (P.atD T).a T := by linarith [(aD_range_of hP h8 h4π).1] - exact HT.tailInputs ha (fun z => GzGp.phiHat_conj _ T z) - · exact Tail.eventually_theta0_le P hP hA₀ (C1D P) (C1D_nonneg P) (R := cDT P.ϱ P.lam / 2) - ((eventually_w8 hP).mono fun T h8 => by linarith [C1D_le hP h8]) + exact eventually_tailPackageD_of_localCount Z hP hA₀ hloc end ThmD end Zeta23 diff --git a/zeta23/Zeta23/ThmDE/Concrete.lean b/zeta23/Zeta23/ThmDE/Concrete.lean index c01dda1632..826082d063 100644 --- a/zeta23/Zeta23/ThmDE/Concrete.lean +++ b/zeta23/Zeta23/ThmDE/Concrete.lean @@ -5,12 +5,8 @@ SPDX-License-Identifier: Apache-2.0 -/ /- Zeta23/ThmDE/Concrete.lean — the concrete FactsDChi instance: -Zeta23/ThmE/TracesChi.lean's concreteFactsChi (the χ prime side from PaperInputsChi) re-run for the -Montgomery–Taylor window data P.localFunD T (BridgeD: LocalHypsCore eventually), with the -[eq:gbounds] sandwich replaced by the coprime partial-summation step (Zeta23/ThmDE/PP.lean) and the -window moments (a_D, b_D, J_D) kept symbolic — exactly as Zeta23/ThmD/Concrete.lean does for ζ. -End product: TracesBoundsDChi for the concrete window (tracesBoundsDChi_concrete), plus the -identification of the Params-level χ-traces of the window-realizing family P.atD with these data. +delegates `TraceFactsBase` to `ThmE.concreteTraceFactsBaseChi` and `ab_range` / `sumJ` to +`ThmD.concreteAbRangeD` / `ThmD.concreteSumJD`. -/ import Zeta23.ThmDE.Traces import Zeta23.ThmDE.PP @@ -47,185 +43,19 @@ variable (P : Params) (κ q : ℕ) (c : ℕ → ℂ) /-- the concrete χ-D data: the abstract χ prime-side expressions at the Montgomery–Taylor window data P.localFunD T, plus J_T [eq:abJ] and the coprime sum. -/ -def concreteDataDChi (Z : ZeroConfig) : DataDChi P where - aT := fun T => (P.localFunD T).a - bT := fun T => (P.localFunD T).b - trG := fun T => trGtChiA κ q c (P.toSetting T) (P.localFunD T) - trG2 := fun T => trGt2ChiA κ q c (P.toSetting T) (P.localFunD T) - Ncnt := fun T => (Z.N T (2 * T) : ℝ) - Mtot := fun T => MtotalChiA κ q c (P.toSetting T) (P.localFunD T) - Mmumu := fun T => Mform (P.localFunD T).Phi T (muq κ q) (muq κ q) - MPP := fun T => Mform (P.localFunD T).Phi T (PXc c (P.X T)) (PXc c (P.X T)) - MmuP := fun T => Mform (P.localFunD T).Phi T (muq κ q) (PXc c (P.X T)) - intMu2 := fun T => ∫ τ in T..(2 * T), muq κ q τ ^ 2 - sumL2gq := fun T => sumA2gCoprime q (P.X T) (P.localFunD T).g - JT := fun T => 2 / P.L T ^ 3 * ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y +def concreteDataDChi (Z : ZeroConfig) : DataDChi P := + { concreteDataChiOf P κ q c P.localFunD Z with + JT := fun T => 2 / P.L T ^ 3 * ∫ y in (0 : ℝ)..(P.L T), (P.localFunD T).g y * y } variable {P κ q c} -/-- vanishing of the autocorrelation beyond the support width. -/ -private lemma autocorr_eq_zero_of_support {h : ℝ → ℝ} {M : ℝ} - (hsupp : ∀ u : ℝ, M ≤ |u| → h u = 0) {y : ℝ} (hy : 2 * M ≤ |y|) (_hM : 0 ≤ M) : - Params.autocorr h y = 0 := by - show ∫ u, h u * h (u + y) = 0 - have hz : ∀ u : ℝ, h u * h (u + y) = 0 := by - intro u - rcases le_or_gt M (|u|) with hu | hu - · rw [hsupp u hu, zero_mul] - · have : M ≤ |u + y| := by - have h1 := abs_sub_abs_le_abs_sub y (-u) - rw [abs_neg, sub_neg_eq_add] at h1 - have h2 : |y + u| = |u + y| := by rw [add_comm] - rw [h2] at h1 - linarith - rw [hsupp _ this, mul_zero] - simp only [hz, MeasureTheory.integral_zero] - -set_option maxHeartbeats 1600000 in -/-- **FactsDChi for the concrete Montgomery–Taylor data of L(s,χ).** Inputs: P.Valid, 1 ≤ q, -unimodular coefficients, PaperInputsChi (H-RvM(χ), H-Γ(χ), H-cheb, H-cheb-coprime, H-MV), and the -CoreD taper facts eventually (BridgeD). -/ +/-- **FactsDChi for the concrete Montgomery–Taylor data of L(s,χ).** -/ theorem concreteFactsDChi {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ q) (hcu : CoeffUnimodular q c) (inp : PaperInputsChi κ q c Z) - (hLoc : ThmD.LocalHypsCoreDEventually P) : FactsDChi q (concreteDataDChi P κ q c Z) := by - have hlam : 0 < P.lam ∧ P.lam ≤ 1 := ⟨hP.lam_pos, hP.lam_le_one⟩ - have hΓq := inp.Gamma - have hcheb := inp.cheb - have hc : CoeffOK q c := hcu.toCoeffOK - set cϱD := cDT P.ϱ P.lam with hcD - have hreg : ∀ᶠ T in atTop, 0 ≤ T ∧ 0 ≤ l T ∧ 0 ≤ Real.log (l T) ∧ 0 ≤ P.L T ∧ 0 ≤ P.X T := by - filter_upwards [eventually_ge_atTop 1, eventually_l_ge 1, eventually_log_l_ge 1, - eventually_L_ge P hP.lam_pos 1, eventually_one_le_X P hP.lam_pos] with T h1 h2 h3 h4 h5 - exact ⟨by linarith, by linarith, by linarith, by linarith, by linarith⟩ - obtain ⟨T₀, hT₀⟩ := id hLoc - have e_ends := ThmD.evBound_of_eventuallyAtCoreD hLoc - (lem_ends_chi (κ := κ) (q := q) (c := c) (cϱ := cϱD) (lam := P.lam) hΓq hcheb hc hlam hq) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (mul_nonneg (mul_nonneg hL hl) hlog) (add_nonneg (sq_nonneg _) hX)) - have e_mumu := ThmD.evBound_of_eventuallyAtCoreD hLoc - (prop_mumu_chi (cϱ := cϱD) (lam := P.lam) hΓq hc hq hlam) (by - filter_upwards [hreg, eventually_L_ge P hP.lam_pos 1] with T ⟨hT, hl, hlog, hL, hX⟩ hL1 - exact mul_nonneg (sq_nonneg _) (Real.log_nonneg hL1)) - have e_PP := ThmD.evBound_of_eventuallyAtCoreD hLoc - (prop_PP_chi (cϱ := cϱD) (lam := P.lam) hcheb inp.MV hcu hlam) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (sq_nonneg _) hX) - have e_muP := ThmD.evBound_of_eventuallyAtCoreD hLoc - (prop_cross_muP_chi_proved (cϱ := cϱD) (lam := P.lam) hΓq hcheb hc hq hlam) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg hl (Real.sqrt_nonneg _)) - refine ⟨hP.lam_pos, hP.lam_le_one, hP.one_le_w, hq, ?ab_range, rvm_evBound_chi inp.RvM, - ?muints2, ?prop_trace, e_ends, ?Msplit, e_mumu, e_PP, ?sumJ, e_muP⟩ - case ab_range => - filter_upwards [eventually_ge_atTop T₀, eventually_L_ge P hP.lam_pos 8, - eventually_L_ge P hP.lam_pos (2 * P.w)] with T hT hL8 hLw - have hF := hT₀ T hT - have hL0 : 0 < P.L T := by linarith - refine ⟨hF.b_ge_half, hF.b_le_a, hF.a_le_one, ?_, ?_⟩ - · apply mul_nonneg (by positivity) - apply intervalIntegral.integral_nonneg (by linarith : (0:ℝ) ≤ P.L T) - intro y hy - exact mul_nonneg (hF.g_nonneg y) hy.1 - · have hgcont : Continuous (P.localFunD T).g := by - have hw0 : 0 < P.w := by linarith [hP.one_le_w] - have hg := gD_deriv_facts hP.taper hP.lam_pos hP.lam_le_one hw0 hLw - exact hg.1.continuous - have hgle : ∀ y ∈ Set.Icc (0:ℝ) (P.L T), (P.localFunD T).g y * y ≤ P.L T * y := by - intro y hy - apply mul_le_mul_of_nonneg_right _ hy.1 - calc (P.localFunD T).g y ≤ (P.localFunD T).Aphi y := hF.g_le_Aphi y - _ ≤ max ((P.toSetting T).L - |y|) 0 := hF.Aphi_le y - _ ≤ P.L T := by - apply max_le _ hL0.le - have := abs_nonneg y - show (P.toSetting T).L - |y| ≤ P.L T - have e : (P.toSetting T).L = P.L T := rfl - rw [e] - linarith - have hIle : ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y - ≤ ∫ y in (0:ℝ)..(P.L T), P.L T * y := by - apply intervalIntegral.integral_mono_on (by linarith : (0:ℝ) ≤ P.L T) ?_ ?_ hgle - · exact (hgcont.mul continuous_id).intervalIntegrable 0 (P.L T) - · exact (continuous_const.mul continuous_id).intervalIntegrable 0 (P.L T) - have hIval : ∫ y in (0:ℝ)..(P.L T), P.L T * y = P.L T ^ 3 / 2 := by - rw [intervalIntegral.integral_const_mul, integral_id] - ring - calc 2 / P.L T ^ 3 * ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y - ≤ 2 / P.L T ^ 3 * (P.L T ^ 3 / 2) := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - rw [← hIval] - exact hIle - _ = 1 := by field_simp - case muints2 => - obtain ⟨C, T₁, hC⟩ := hΓq.int_mu_sq - refine ⟨max C 1, by positivity, max T₁ 0, fun T hT => - (hC T ((le_max_left _ _).trans hT)).trans ?_⟩ - have hT0 : 0 ≤ T := (le_max_right _ _).trans hT - rw [mul_div_assoc] - refine mul_le_mul_of_nonneg_right (le_max_left _ _) ?_ - exact div_nonneg (div_nonneg (mul_nonneg hT0 (sq_nonneg _)) (by positivity)) (sq_nonneg _) - case prop_trace => - obtain ⟨A, hA, T₁, hN⟩ := rvm_evBound_chi inp.RvM - obtain ⟨C, T₂, hC⟩ := prop_trace_chi (κ := κ) (q := q) (c := c) (cϱ := cϱD) - (lam := P.lam) hΓq hcheb hc hlam A hq - refine ⟨max C 1, by positivity, max (max T₀ 1) (max T₁ T₂), fun T hT => ?_⟩ - have h0 : T₀ ≤ T := ((le_max_left _ _).trans (le_max_left _ _)).trans hT - have hT1' : (1:ℝ) ≤ T := ((le_max_right _ _).trans (le_max_left _ _)).trans hT - have h1 : T₁ ≤ T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT - have h2 : T₂ ≤ T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT - have hF := hT₀ T h0 - have hT0' : (0:ℝ) < T := by linarith - have hNT : |(Z.N T (2 * T) : ℝ) - T / (2 * π) * ell1q q T| ≤ A * Real.log T := by - have hl : l T ≤ Real.log T := by - unfold Zeta23.l - rw [Real.log_div hT0'.ne' (by positivity)] - have : 0 ≤ Real.log (2 * π) := Real.log_nonneg (by nlinarith [Real.pi_gt_three]) - linarith - have hN' := hN T h1 - simp only at hN' - rw [show T * ell1q q T / (2 * π) = T / (2 * π) * ell1q q T by ring] at hN' - calc |(Z.N T (2 * T) : ℝ) - T / (2 * π) * ell1q q T| ≤ A * l T := hN' - _ ≤ A * Real.log T := mul_le_mul_of_nonneg_left hl hA.le - have key := hC (P.toSetting T) (P.localFunD T) rfl h2 hF (Z.N T (2 * T) : ℝ) hNT - refine key.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) ?_) - exact mul_nonneg hF.L_pos.le (Real.sqrt_nonneg _) - case Msplit => - obtain ⟨T₁, hT₁⟩ := eq_Msplit_chi (κ := κ) (q := q) (c := c) (cϱ := cϱD) (lam := P.lam) - hΓq hc hlam - filter_upwards [eventually_ge_atTop T₀, eventually_ge_atTop T₁] with T h0 h1 - exact hT₁ (P.toSetting T) (P.localFunD T) rfl h1 (hT₀ T h0) - case sumJ => - obtain ⟨C, hC0, hC⟩ := ThmDE.sumA2gCoprime_close inp.chebq - refine ⟨C, hC0, ?_⟩ - obtain ⟨T₁, hT₁⟩ := eventually_atTop.mp (eventually_L_ge P hP.lam_pos 8) - obtain ⟨T₂, hT₂⟩ := eventually_atTop.mp (eventually_L_ge P hP.lam_pos (2 * P.w)) - refine ⟨max T₀ (max T₁ T₂), fun T hT => ?_⟩ - have h1 : T₁ ≤ T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT - have h2 : T₂ ≤ T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT - have hL8 : 8 ≤ P.L T := hT₁ T h1 - have hLw : 2 * P.w ≤ P.L T := hT₂ T h2 - have hw0 : 0 < P.w := by linarith [hP.one_le_w] - have hL0 : 0 < P.L T := by linarith - have hg := gD_deriv_facts hP.taper hP.lam_pos hP.lam_le_one hw0 hLw - have hgsupp : ∀ y : ℝ, P.L T ≤ y → (P.localFunD T).g y = 0 := by - intro y hy - show Params.autocorr (fun u => phiD P.ϱ P.lam (P.L T) P.w u ^ 2) y = 0 - apply autocorr_eq_zero_of_support (M := P.L T / 2) ?_ ?_ (by linarith) - · intro u hu - rw [phiD_eq_zero hP.taper hw0 hu, zero_pow two_ne_zero] - · rw [abs_of_nonneg (by linarith : (0:ℝ) ≤ y)] - linarith - have key := hC (P.L T) (P.X T) (P.localFunD T).g hL8 (by - show P.X T = Real.exp (P.L T) - rfl) hg.1 hg.2.1 hg.2.2 hgsupp - have e : P.L T ^ 3 / 2 * ((concreteDataDChi P κ q c Z).JT T) - = ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y := by - show P.L T ^ 3 / 2 * (2 / P.L T ^ 3 * ∫ y in (0:ℝ)..(P.L T), (P.localFunD T).g y * y) = _ - field_simp - show |sumA2gCoprime q (P.X T) (P.localFunD T).g - P.L T ^ 3 / 2 * ((concreteDataDChi P κ q c Z).JT T)| - ≤ C * P.L T ^ 2 - rw [e] - exact key + (hLoc : ThmD.LocalHypsCoreDEventually P) : FactsDChi q (concreteDataDChi P κ q c Z) := + ⟨concreteTraceFactsBaseChi hP hq hcu inp hLoc, + concreteAbRangeD hP hLoc, + concreteSumJD hP (sumA2gCoprime q) (ThmDE.sumA2gCoprime_close inp.chebq)⟩ /-- **TracesBoundsDChi for the concrete Montgomery–Taylor window and L(s,χ).** -/ theorem tracesBoundsDChi_concrete {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ q) diff --git a/zeta23/Zeta23/ThmDE/Endgame.lean b/zeta23/Zeta23/ThmDE/Endgame.lean deleted file mode 100644 index 2880863db6..0000000000 --- a/zeta23/Zeta23/ThmDE/Endgame.lean +++ /dev/null @@ -1,435 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/ThmDE/Endgame.lean — the §6 endgame for L(s,χ) with the -Montgomery–Taylor ratio constant: paper [thm:E], last clause ("Theorem D holds likewise."). - -A mirror of Zeta23/ThmD/Endgame.lean (thmD_abstract / thmD_BC_core / thmD_simple_abstract / -thmD_dist_abstract) with the χ-substitutions of Zeta23/ThmE/AssemblyQ.lean: - * (H : PaperInputs Z) ↦ (hRvM : ThmE.RiemannVonMangoldtChi q Z) — the only use of H there was - H.RvM (growth of N(T,2T)): tendsto_N_atTop ↦ ThmE.tendsto_N_atTop_chi, - isLittleO_N_of_isLittleO_Tl ↦ ThmE.isLittleO_N_of_isLittleO_Tl_chi, - eventually_N_ge ↦ ThmE.eventually_N_ge_chi; - * TracesBoundsD ↦ ThmDE.TracesBoundsDChi P q (cRatio taken at λ_{1,χ} = ThmE.lam1q P q T); - * the prime-side matrix/traces (P.atD T).Gp / trGtilde / trGtildeSq ↦ ThmE.GpChi / - trGtildeChi / trGtildeSqChi of (P.atD T) (rtrace_tilde_GpChi, frobSq_tilde_GpChi, - GpChi_isHermitian). -Everything else (seamA, seamA_BC, N0star_lower_c, nplus_lower, nplus_ge_explicit, err_isLittleO, -eps_form_of_isLittleO, the o-calculus) is q-independent and reused verbatim. Conclusions carry -the constants 2 − 1/c∞, 2c∞ − 1, c∞ for an abstract limit c∞ of cRatio(λ_{1,χ}(T); a_T, b_T, J_T). --/ -import Zeta23.ThmE.AssemblyQ -import Zeta23.ThmDE.TracesHyp -import Zeta23.ThmD.ParamsD - -noncomputable section - -open Filter Asymptotics Topology Real -open RHLinalg - -namespace Zeta23 -namespace ThmDE - -open Assembly ThmD ThmE - -section Star - -/-- **Theorem D for L(s,χ), Thm-A line, at fixed λ ∈ (0,1), abstract zero configuration and abstract -D-traces.** If the D-trace package holds for data (a_T, b_T, J_T, trG̃, trG̃²) against N(T,2T), -the ratio constant cRatio(λ₁(T); a_T, b_T, J_T) tends to c∞ > 0, a_T ∈ [1/2, 1] eventually, and -the zero-side inputs hold for the window-realizing family P.atD T whose prime-side traces and -taper constant ARE (trG̃, trG̃², a_T), then for every ε > 0, eventually -N₀*(T,2T) ≥ (2 − 1/c∞ − ε) N(T,2T). -/ -theorem thmDChi_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) - (P : Params) (hP : P.Valid) (hlam : P.lam < 1) - (hRvM : RiemannVonMangoldtChi q Z) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsDChi P q aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (lam1q P q T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) - (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = GpChi (P.atD T) κ q cf T) - (hId : ∀ᶠ T in atTop, trGtildeChi (P.atD T) κ q cf T = trG T ∧ - trGtildeSqChi (P.atD T) κ q cf T = trG2 T ∧ (P.atD T).a T = aT T) - (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - c⁻¹ - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0star T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, hfr2⟩ := hTr.frhat - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - -- the functions of T (abbreviations) - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cinv : ℝ → ℝ := fun T => (cRatio (lam1q P q T) (aT T) (bT T) (JT T))⁻¹ with hcinv - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T with hR₁ - set R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) with hR₂ - set B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) with hBdef - set err : ℝ → ℝ := fun T => (4 * R₁ T + R₂ T + 3 * (NII Z T : ℝ) - + B T * (4 + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) + |cinv T - c⁻¹| * N T with herr - -- basic limits - have hLtop := tendsto_L_atTop P hlam0 - have hcinv_to : Tendsto cinv atTop (𝓝 c⁻¹) := hc.inv₀ hc0.ne' - ------------------------------------------------------------------ - -- (1) the main inequality, eventually in T - ------------------------------------------------------------------ - have hmain : ∀ᶠ T in atTop, (2 - c⁻¹) * N T - err T ≤ (Z.N0star T (2 * T) : ℝ) := by - filter_upwards [hBlock, hTail, hGzGp, hId, ha, eventually_ge_atTop T₁, - eventually_ge_atTop T₂, eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w)] - with T hBl hTl hGG hid ha2 hT₁ hT₂ hT0 hl hE0 - obtain ⟨hidtr, hidfr, hida⟩ := hid - have hapos' : 0 < aT T := by linarith [ha2.1] - have haposD : 0 < (P.atD T).a T := by rw [hida]; exact hapos' - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - -- Seam A for the window-realizing parameters - have hA := seamA hT0 hBl hTl haposD hLpos - -- the hat-unit traces in terms of the abstract data - have hrt : rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T := by - rw [rtrace_hat, hGG, rtrace_tilde_GpChi, hidtr, hida]; rfl - have hfr : frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) - = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T := by - rw [frobSq_hat, hGG, frobSq_tilde_GpChi, hidfr, hida]; rfl - have haL : (P.atD T).a T * (P.atD T).L T = aT T * P.L T := by rw [hida]; rfl - rw [hrt, hfr, haL] at hA - -- |tr Ĝ − N| ≤ R₁ - have htr : |(aT T * P.L T)⁻¹ * trG T - N T| ≤ R₁ T := - trGhat_sub_N_le hapos' hLpos (by simpa only using htr1 T hT₁) - -- ‖Ĝ‖² ≤ cinv N + R₂ - have hfrb : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T ≤ cinv T * N T + R₂ T := by - have h := hfr2 T hT₂ - simp only at h - have h1 : trG2 T / (aT T * P.L T) ^ 2 - cinv T * N T ≤ C₂ * P.calE T * (cinv T * N T) := by - rw [← mul_assoc] at h - exact le_trans (le_trans (le_max_left _ 0) (le_abs_self _)) h - have e : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T = trG2 T / (aT T * P.L T) ^ 2 := by - rw [inv_pow, div_eq_inv_mul] - rw [e]; simp only [hR₂]; linarith - have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le - have h := N0star_lower_c hB₀ hA htr hfrb - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hcd : (2 - c⁻¹) * N T - |cinv T - c⁻¹| * N T ≤ (2 - cinv T) * N T := by - have h1 := mul_le_mul_of_nonneg_right (le_abs_self (cinv T - c⁻¹)) hN0 - linarith [h1] - simp only [herr, hR₁, hR₂, hBdef, hNdef] at h hcd ⊢ - linarith - ------------------------------------------------------------------ - -- (2) err = o(N) - ------------------------------------------------------------------ - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop_chi q Z hq hRvM - -- R₁ = o(N) - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / aT T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [ha] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith [ha2.1]))] - rw [div_le_iff₀ (by linarith [ha2.1])]; nlinarith [ha2.1] - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - -- cinv is eventually in [0, 2/c] and bounded - have hcinv_bd : ∀ᶠ T in atTop, 0 ≤ cinv T ∧ cinv T ≤ 2 * c⁻¹ := by - have hcpos : (0:ℝ) < c⁻¹ := inv_pos.mpr hc0 - filter_upwards [hcinv_to.eventually (eventually_ge_nhds hcpos), - hcinv_to.eventually (eventually_le_nhds (show c⁻¹ < 2 * c⁻¹ by linarith))] with T h1 h2 - exact ⟨h1, h2⟩ - have hcinvO : cinv =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * c⁻¹) ?_ - filter_upwards [hcinv_bd] with T h - rw [abs_of_nonneg h.1]; exact h.2 - -- R₂ = o(N) - have o2 : R₂ =o[atTop] N := by - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have i1 : (fun T => cinv T * N T) =O[atTop] N := by - have := hcinvO.mul (isBigO_refl N atTop) - simpa using this - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO i1 - refine (this.congr_left fun T => ?_).congr_right fun T => by simp - simp only [hR₂] - -- N(I′∖I) = o(N) - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_sqrt_mul_l_Tl) - -- B → 0 - have o4 : Tendsto B atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ - · filter_upwards [hTail, ha, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by nlinarith [ha2.1]) - · filter_upwards [hTail, ha, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < aT T := by linarith [ha2.1] - have hq : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - simp only [hBdef] - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (aT T * P.L T) := by - have : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [this]; gcongr; exact ha2.1 - -- the bracket and the constant-drift term - have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) - (cl := cinv) hNtop o1 o2 o3 o4 hcinv_bd - have o6 : (fun T => |cinv T - c⁻¹| * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => cinv T - c⁻¹) atTop (𝓝 0) := by - simpa using hcinv_to.sub_const c⁻¹ - simpa using this.abs - have herr_o : err =o[atTop] N := o5.add o6 - ------------------------------------------------------------------ - -- (3) conclude - ------------------------------------------------------------------ - exact eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o - -end Star - -section BC - -/-- **Theorem D for L(s,χ), Thm-B/C lines, at fixed λ ∈ (0,1) — common core** (mirror of -'Assembly.thmBC_core' with F(λ₁) ↦ cRatio(λ₁; a_T, b_T, J_T) → c∞): there is R = o(N) with, -eventually in T, (2c∞ − 1)N − 2R ≤ N₀ˢ(T,2T) and c∞·N − R ≤ N_d(T,2T). -/ -theorem thmDChi_BC_core (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) - (P : Params) (hP : P.Valid) (hlam : P.lam < 1) - (hRvM : RiemannVonMangoldtChi q Z) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsDChi P q aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (lam1q P q T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) - (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = GpChi (P.atD T) κ q cf T) - (hId : ∀ᶠ T in atTop, trGtildeChi (P.atD T) κ q cf T = trG T ∧ - trGtildeSqChi (P.atD T) κ q cf T = trG2 T ∧ (P.atD T).a T = aT T) : - ∃ R : ℝ → ℝ, R =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) ∧ - ∀ᶠ T in atTop, - (2 * c - 1) * (Z.N T (2 * T) : ℝ) - 2 * R T ≤ Z.N0s T (2 * T) ∧ - c * (Z.N T (2 * T) : ℝ) - R T ≤ Z.Nd T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - have hcalE := calE_tendsto_zero P hlam0 hlam1 (zero_le_one.trans hP.one_le_w) - obtain ⟨C₃, hC₃, T₃, hratio⟩ := hTr.ratio - obtain ⟨C₄, hC₄, T₄, htr1⟩ := hTr.tr1 - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cT : ℝ → ℝ := fun T => cRatio (lam1q P q T) (aT T) (bT T) (JT T) with hcT - set x : ℝ → ℝ := fun T => θ₀ T * (P.d T : ℝ) / trG T with hxdef - set R : ℝ → ℝ := fun T => (C₃ * P.calE T * (cT T * N T) - + 2 * x T * ((1 + C₃ * P.calE T) * (cT T * N T))) - + (NII Z T : ℝ) + |cT T - c| * N T with hRdef - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop_chi q Z hq hRvM - have hcE0 : Tendsto (fun T => C₃ * P.calE T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₃ - -- √X ≤ N/(4C₄) eventually (√X = o(Tl) = o(N)) - have hsqrtX : ∀ᶠ T in atTop, C₄ * Real.sqrt (P.X T) ≤ N T / 4 := by - have ho := isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM (isLittleO_sqrtX_Tl P hlam0 hlam1) - have h := ho.def (show (0:ℝ) < 1 / (4 * C₄) by positivity) - filter_upwards [h] with T hT - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _), - abs_of_nonneg (Nat.cast_nonneg _)] at hT - have : C₄ * Real.sqrt (P.X T) ≤ C₄ * (1 / (4 * C₄) * N T) := - mul_le_mul_of_nonneg_left hT hC₄.le - calc C₄ * Real.sqrt (P.X T) ≤ C₄ * (1 / (4 * C₄) * N T) := this - _ = N T / 4 := by field_simp - -- Step 0: eventually tr G̃ ≥ L N / 4 > 0 and x ≤ 8(|Cθ|+1) T^{λ/2−1} (so θ₀ d < tr G̃ and x → 0). - have hx : ∀ᶠ T in atTop, 0 < trG T ∧ 0 ≤ x T ∧ - x T ≤ 8 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) ∧ θ₀ T * (P.d T : ℝ) < trG T := by - filter_upwards [hTail, hθ, ha, eventually_ge_atTop T₄, eventually_N_ge_chi q Z hq hRvM, eventually_l_pos, - eventually_gt_atTop (0:ℝ), hsqrtX, - (tendsto_rpow_halflam_sub_one P hlam1).eventually - (eventually_lt_nhds (show (0:ℝ) < 1 / (16 * (|Cθ| + 1)) by positivity))] - with T hTl hθT ha2 hT₄ hNge hl hT0 hsX hTs - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have h1 := (abs_le.mp (by simpa only using htr1 T hT₄)).1 - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hLN : 0 < P.L T * N T := by - have : 0 < T * l T / (4 * Real.pi) := by positivity - exact mul_pos hLpos (this.trans_le hNge) - have htrG : P.L T * N T / 4 ≤ trG T := by - -- trG ≥ a L N − C₄ L √X ≥ L N/2 − L N/4 - have e1 : aT T * P.L T * N T ≥ 1 / 2 * (P.L T * N T) := by nlinarith [ha2.1, hLN.le] - have e2 : C₄ * (P.L T * Real.sqrt (P.X T)) ≤ P.L T * (N T / 4) := by - have := mul_le_mul_of_nonneg_left hsX hLpos.le - linarith [this] - simp only [hNdef] at h1 e1 e2 ⊢ - nlinarith [h1, e1, e2] - have htrGpos : 0 < trG T := lt_of_lt_of_le (by positivity) htrG - have hd : (P.d T : ℝ) ≤ P.L T * T / (2 * Real.pi) := d_le P (by positivity) - have hθ' : θ₀ T ≤ (|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1) := by - refine hθT.trans ?_ - have : Cθ ≤ |Cθ| + 1 := by linarith [le_abs_self Cθ] - gcongr - have hθ0 := hTl.theta_nonneg - have hnum : θ₀ T * (P.d T : ℝ) - ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := - mul_le_mul hθ' hd (Nat.cast_nonneg _) (hθ0.trans hθ') - have hden : P.L T * (T * l T / (4 * Real.pi)) / 4 ≤ trG T := - le_trans (by gcongr) htrG - have hxle : x T ≤ 8 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) := by - simp only [hxdef] - rw [div_le_iff₀ htrGpos] - calc θ₀ T * (P.d T : ℝ) - ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := hnum - _ = 8 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * (P.L T * (T * l T / (4 * Real.pi)) / 4) := by - ring - _ ≤ 8 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * trG T := by gcongr - refine ⟨htrGpos, div_nonneg (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrGpos.le, hxle, ?_⟩ - have hx1 : x T < 1 := by - refine hxle.trans_lt ?_ - have := (lt_div_iff₀ (show (0:ℝ) < 16 * (|Cθ| + 1) by positivity)).mp hTs - nlinarith [abs_nonneg Cθ, Real.rpow_nonneg hT0.le (P.lam / 2 - 1)] - simp only [hxdef] at hx1 - rwa [div_lt_one htrGpos] at hx1 - -- cT is eventually in [0, c+1] - have hcT_bd : ∀ᶠ T in atTop, 0 ≤ cT T ∧ cT T ≤ c + 1 := by - filter_upwards [hc.eventually (eventually_ge_nhds hc0), - hc.eventually (eventually_le_nhds (show c < c + 1 by linarith))] with T h1 h2 - exact ⟨h1, h2⟩ - refine ⟨R, ?_, ?_⟩ - ------------------------------------------------------------------ - -- R = o(N) - ------------------------------------------------------------------ - · have hFN : (fun T => cT T * N T) =O[atTop] N := by - refine IsBigO.of_bound (c + 1) ?_ - filter_upwards [hcT_bd] with T hb - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_mul, abs_of_nonneg hb.1] - exact mul_le_mul_of_nonneg_right hb.2 (abs_nonneg _) - have o1 : (fun T => C₃ * P.calE T * (cT T * N T)) =o[atTop] N := by - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO hFN - simpa using this - have hxto : Tendsto x atTop (𝓝 0) := by - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds - (by simpa using (tendsto_rpow_halflam_sub_one P hlam1).const_mul (8 * (|Cθ| + 1))) - (hx.mono fun T h => h.2.1) (hx.mono fun T h => h.2.2.1) - have o2 : (fun T => 2 * x T * ((1 + C₃ * P.calE T) * (cT T * N T))) =o[atTop] N := by - have h2x : Tendsto (fun T => 2 * x T) atTop (𝓝 0) := by simpa using hxto.const_mul 2 - have hK : (fun T => 1 + C₃ * P.calE T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2) ?_ - filter_upwards [hcE0.eventually (eventually_ge_nhds (show (-1:ℝ) < 0 by norm_num)), - hcE0.eventually (eventually_le_nhds (show (0:ℝ) < 1 by norm_num))] with T h1 h2 - rw [abs_of_nonneg (by linarith)]; linarith - have := ((isLittleO_one_iff ℝ).2 h2x).mul_isBigO (hK.mul hFN) - simpa using this - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_sqrt_mul_l_Tl) - have o4 : (fun T => |cT T - c| * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => cT T - c) atTop (𝓝 0) := by - simpa using hc.sub_const c - simpa using this.abs - exact ((o1.add o2).add o3).add o4 - ------------------------------------------------------------------ - -- the inequalities, eventually - ------------------------------------------------------------------ - · filter_upwards [hBlock, hTail, hGzGp, hId, hx, eventually_ge_atTop T₃, - eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w)] - with T hBl hTl hGG hid hxT hT₃ hT0 hl hE0 - obtain ⟨hidtr, hidfr, hida⟩ := hid - have hGt : ((P.atD T).tilde T (Z.Gz (P.atD T) T)).IsHermitian := by - rw [hGG]; exact isHermitian_tilde _ _ (GpChi_isHermitian _ _ _ _ _) - -- [eq:zeroside2] - have hZ := seamA_BC hT0 hBl hTl le_rfl hGt - -- lem:CS, [eq:nplus-lower] - have hθ0 := hTl.theta_nonneg - have hrt : rtrace ((P.atD T).tilde T (Z.Gz (P.atD T) T)) = trG T := by - rw [hGG, rtrace_tilde_GpChi, hidtr] - have hfr : frobSq ((P.atD T).tilde T (Z.Gz (P.atD T) T)) = trG2 T := by - rw [hGG, frobSq_tilde_GpChi, hidfr] - have htr' : θ₀ T * (Fintype.card (Fin ((P.atD T).d T)) : ℝ) - < rtrace ((P.atD T).tilde T (Z.Gz (P.atD T) T)) := by - rw [card_fin_d, hrt]; exact hxT.2.2.2 - have hCS₀ := nplus_lower hGt hθ0 htr' - rw [card_fin_d, hrt, hfr] at hCS₀ - have hCS : (trG T - θ₀ T * (P.d T : ℝ)) ^ 2 / trG2 T ≤ (posIndexAbove hGt (θ₀ T) : ℝ) := hCS₀ - have hratio' : |trG T ^ 2 / trG2 T - cT T * N T| ≤ C₃ * P.calE T * (cT T * N T) := by - have := hratio T hT₃; simp only at this; rw [← mul_assoc] at this; exact this - have htrG2 : 0 ≤ trG2 T := by rw [← hfr]; exact frobSq_nonneg _ - have hnp := nplus_ge_explicit hCS hxT.1 (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrG2 hratio' - -- c N − |cT − c| N ≤ cT N - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hcd : c * N T - |cT T - c| * N T ≤ cT T * N T := by - have h1 := mul_le_mul_of_nonneg_right (neg_abs_le (cT T - c)) hN0 - linarith [h1] - simp only [hRdef, hxdef, hNdef] at hnp hcd hZ ⊢ - constructor <;> linarith [hZ.1, hZ.2, hnp, hcd] - -/-- **Theorem D for L(s,χ), Thm-B line** (fixed λ, abstract): N₀ˢ(T,2T) ≥ (2c∞ − 1 − ε) N(T,2T) eventually. -/ -theorem thmDChi_simple_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) - (P : Params) (hP : P.Valid) (hlam : P.lam < 1) - (hRvM : RiemannVonMangoldtChi q Z) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsDChi P q aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (lam1q P q T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) - (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = GpChi (P.atD T) κ q cf T) - (hId : ∀ᶠ T in atTop, trGtildeChi (P.atD T) κ q cf T = trG T ∧ - trGtildeSqChi (P.atD T) κ q cf T = trG2 T ∧ (P.atD T).a T = aT T) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * c - 1 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by - obtain ⟨R, hR, hev⟩ := thmDChi_BC_core Z κ hq cf P hP hlam hRvM aT bT JT trG trG2 hTr hc0 hc - ha hBlock θ₀ hTail hθ₀ hNII hGzGp hId - refine eps_form_of_isLittleO (err := fun T => 2 * R T) (hev.mono fun T h => ?_) - (Eventually.of_forall fun T => Nat.cast_nonneg _) (hR.const_mul_left 2) - linarith [h.1] - -/-- **Theorem D for L(s,χ), Thm-C line** (fixed λ, abstract): N_d(T,2T) ≥ (c∞ − ε) N(T,2T) eventually. -/ -theorem thmDChi_dist_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) - (P : Params) (hP : P.Valid) (hlam : P.lam < 1) - (hRvM : RiemannVonMangoldtChi q Z) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsDChi P q aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (lam1q P q T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) - (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = GpChi (P.atD T) κ q cf T) - (hId : ∀ᶠ T in atTop, trGtildeChi (P.atD T) κ q cf T = trG T ∧ - trGtildeSqChi (P.atD T) κ q cf T = trG2 T ∧ (P.atD T).a T = aT T) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (c - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by - obtain ⟨R, hR, hev⟩ := thmDChi_BC_core Z κ hq cf P hP hlam hRvM aT bT JT trG trG2 hTr hc0 hc - ha hBlock θ₀ hTail hθ₀ hNII hGzGp hId - exact eps_form_of_isLittleO (err := R) (hev.mono fun T h => h.2) - (Eventually.of_forall fun T => Nat.cast_nonneg _) hR - -end BC - -end ThmDE -end Zeta23 - -end diff --git a/zeta23/Zeta23/ThmDE/Final.lean b/zeta23/Zeta23/ThmDE/Final.lean index bcdb9d9ee9..51ee0ec7ec 100644 --- a/zeta23/Zeta23/ThmDE/Final.lean +++ b/zeta23/Zeta23/ThmDE/Final.lean @@ -20,12 +20,10 @@ Endgame (§6 for χ with the window-general ratio constant), and ThmE/Final.lean input package paperInputsChi_L (EF(χ), RvM(χ), Γ(χ), cheb, cheb-coprime, MV — all theorems). -/ import Zeta23.ThmE.Final -import Zeta23.ThmDE.Endgame +import Zeta23.ThmD.Endgame import Zeta23.ThmDE.Concrete import Zeta23.ThmDE.ZeroSide import Zeta23.ThmDE.Limit -import Zeta23.ThmD.ZeroSideD -import Zeta23.ThmD.Limit open Filter Topology @@ -36,44 +34,46 @@ namespace ThmDE open ThmD ThmE Assembly -/-- **Theorem D for L(s,χ) at fixed λ ∈ (0,1), abstract zero configuration with the χ-inputs** — -all three lines. -/ -theorem thmDChi_lam_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) - (hcu : CoeffUnimodular q cf) (H : PaperInputsChi κ q cf Z) (P : Params) (hP : P.Valid) - (hlam : P.lam < 1) : - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0star T (2 * T)) ∧ - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * cStar P.lam - 1 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T)) ∧ - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (cStar P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T)) := by +/-- Shared concrete-χ-D inputs for the §6 endgame abstracts. -/ +abbrev ConcreteDChiSetup (Z : ZeroConfig) (P : Params) (κ q : ℕ) (cf : ℕ → ℂ) : Prop := + ConcreteDSetupG Z P (lam1q P q) (concreteDataDChi P κ q cf Z).aT + (concreteDataDChi P κ q cf Z).bT (concreteDataDChi P κ q cf Z).JT + (concreteDataDChi P κ q cf Z).trG (concreteDataDChi P κ q cf Z).trG2 + +theorem concreteDChiSetup (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) + (hcu : CoeffUnimodular q cf) (H : PaperInputsChi κ q cf Z) (P : Params) (hP : P.Valid) : + ConcreteDChiSetup Z P κ q cf := by have hLoc : ThmD.LocalHypsCoreDEventually P := localHypsCoreD_eventually hP - have hTr := tracesBoundsDChi_concrete (Z := Z) hP hq hcu H hLoc - have hc := tendsto_cRatio_concreteChi hP hq _ _ _ (tendsto_aD hP) (tendsto_bD hP) - (tendsto_JD hP) - have hc0 := cStar_pos hP.lam_pos hP.lam_le_one - have ha : ∀ᶠ T in atTop, 1 / 2 ≤ (concreteDataDChi P κ q cf Z).aT T ∧ - (concreteDataDChi P κ q cf Z).aT T ≤ 1 := - (concreteFactsDChi hP hq hcu H hLoc).ab_range.mono fun T h => ⟨h.1.trans h.2.1, h.2.2.1⟩ - have hBlock := eventually_blockInputsD Z hP obtain ⟨A₀, hA₀, hloc⟩ := H.RvM.local_count obtain ⟨θ₀, hTail, hθ₀⟩ := eventually_tailPackageD_of_localCount Z hP hA₀ hloc - have hNII := Tail.eventually_NII_le Z hA₀ hloc have hGzGp := eventually_GzGpDChi Z hP H.EF - have hId : ∀ᶠ T in atTop, - trGtildeChi (P.atD T) κ q cf T = (concreteDataDChi P κ q cf Z).trG T ∧ - trGtildeSqChi (P.atD T) κ q cf T = (concreteDataDChi P κ q cf Z).trG2 T ∧ - (P.atD T).a T = (concreteDataDChi P κ q cf Z).aT T := - Eventually.of_forall fun T => - ⟨Params.atD_trGtildeChi hP κ q cf T, Params.atD_trGtildeSqChi hP κ q cf T, - Params.atD_a T hP⟩ - have hcalE := calE_tendsto_zero P hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w) - refine ⟨?_, ?_, ?_⟩ - · have h := thmDChi_abstract Z κ hq cf P hP hlam H.RvM _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ hTail hθ₀ - hNII hGzGp hId hcalE - simpa only [HD, one_div] using h - · exact thmDChi_simple_abstract Z κ hq cf P hP hlam H.RvM _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ hTail - hθ₀ hNII hGzGp hId - · exact thmDChi_dist_abstract Z κ hq cf P hP hlam H.RvM _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ hTail - hθ₀ hNII hGzGp hId + exact { + hTr := tracesBoundsDChi_concrete (Z := Z) hP hq hcu H hLoc + hc := tendsto_cRatio_concreteChi hP hq _ _ _ (tendsto_aD hP) (tendsto_bD hP) (tendsto_JD hP) + hc0 := cStar_pos hP.lam_pos hP.lam_le_one + ha := (concreteFactsDChi hP hq hcu H hLoc).ab_range.mono fun T h => + ⟨h.1.trans h.2.1, h.2.2.1⟩ + hBlock := eventually_blockInputsD Z hP + hTailPack := ⟨θ₀, hTail, hθ₀⟩ + hNII := Tail.eventually_NII_le Z hA₀ hloc + hrt := hGzGp.mono fun T hGG => by + rw [rtrace_hat, hGG, rtrace_tilde_GpChi, Params.atD_trGtildeChi hP κ q cf T, + Params.atD_a T hP]; rfl + hfr := hGzGp.mono fun T hGG => by + rw [frobSq_hat, hGG, frobSq_tilde_GpChi, Params.atD_trGtildeSqChi hP κ q cf T, + Params.atD_a T hP]; rfl + hida := Eventually.of_forall fun T => Params.atD_a T hP + hcalE := calE_tendsto_zero P hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w) + } + +/-- **Theorem D for L(s,χ) at fixed λ ∈ (0,1), abstract zero configuration with the χ-inputs**. -/ +theorem thmDChi_lam_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) + (hcu : CoeffUnimodular q cf) (H : PaperInputsChi κ q cf Z) (P : Params) (hP : P.Valid) + (hlam : P.lam < 1) : + DyadicLowerBound (HD P.lam) (fun T => Z.N0star T (2 * T)) (fun T => Z.N T (2 * T)) := by + simpa only [HD, one_div] using (concreteDChiSetup Z κ hq cf hcu H P hP).thmD_lam hP hlam + (tendsto_N_atTop_chi q Z hq H.RvM) + (fun _ h => isLittleO_N_of_isLittleO_Tl_chi q Z hq H.RvM h) /-! ## L(s,χ): fixed λ, then λ → 1⁻ — NO hypotheses -/ @@ -84,32 +84,11 @@ variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} /-- **Theorem D for L(s,χ) at fixed λ ∈ (0,1)**, Thm-A line, UNCONDITIONAL. -/ theorem thmE_D_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (HD lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - simpa [paramsOf] using (thmDChi_lam_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) (coeff χ) - (coeffUnimodular_of_primitive hq hprim) (paperInputsChi_L hq hprim) (paramsOf stdProfile lam) - hP h1).1 - -/-- fixed λ, Thm-B line for L(s,χ), UNCONDITIONAL. -/ -theorem thmE_D_simple_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) - (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * cStar lam - 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - simpa [paramsOf] using (thmDChi_lam_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) (coeff χ) - (coeffUnimodular_of_primitive hq hprim) (paperInputsChi_L hq hprim) (paramsOf stdProfile lam) - hP h1).2.1 - -/-- fixed λ, Thm-C line for L(s,χ), UNCONDITIONAL. -/ -theorem thmE_D_dist_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) - (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (cStar lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := by + DyadicLowerBound (HD lam) (fun T => N0starL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := by have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - simpa [paramsOf] using (thmDChi_lam_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) (coeff χ) - (coeffUnimodular_of_primitive hq hprim) (paperInputsChi_L hq hprim) (paramsOf stdProfile lam) - hP h1).2.2 + simpa [paramsOf] using thmDChi_lam_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) + (coeff χ) (coeffUnimodular_of_primitive hq hprim) (paperInputsChi_L hq hprim) + (paramsOf stdProfile lam) hP h1 /-- **[thm:E] "Theorem D holds likewise", first constant, NO hypotheses**: for every primitive Dirichlet character χ mod q > 1, for every ε > 0 and all large T, at least @@ -117,36 +96,10 @@ Dirichlet character χ mod q > 1, for every ε > 0 and all large T, at least ordinate in (T,2T], counted with multiplicity, are matched by DISTINCT critical-line zeros (2 − 1/c₁* = HD 1 = 3/2 − cot(1/√2)/√2 = 0.6725…). -/ theorem thmE_D₀ (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (HD 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := + DyadicLowerBound (HD 1) (fun T => N0starL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := eps_form_HD (N := fun T => (NcountL χ T (2 * T) : ℝ)) (lower := fun T => (N0starL χ T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) fun lam h1 h2 => thmE_D_lam hq hprim (by linarith) h2 - -/-- the same with the constant written out: (3/2 − cot(1/√2)/√2 − ε)·N_χ ≤ N*_{0,χ}. -/ -theorem thmE_D₀' (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (3 / 2 - (Real.sqrt 2)⁻¹ * (Real.cos (Real.sqrt 2)⁻¹ / Real.sin (Real.sqrt 2)⁻¹) - ε) - * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := by - rw [← HD_one]; exact thmE_D₀ hq hprim - -/-- **[thm:E] "Theorem D holds likewise", second constant, NO hypotheses**: -N^s_{0,χ}(T,2T) ≥ (2c₁* − 1 − ε)·N_χ(T,2T) — simple AND on the line (0.5065…). -/ -theorem thmE_D₀_simple (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * cStar 1 - 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := - eps_form_twoCStar (N := fun T => (NcountL χ T (2 * T) : ℝ)) - (lower := fun T => (N0simpleL χ T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) fun lam h1 h2 => thmE_D_simple_lam hq hprim (by linarith) h2 - -/-- **[thm:E] "Theorem D holds likewise", third constant, NO hypotheses**: -N_{d,χ}(T,2T) ≥ (c₁* − ε)·N_χ(T,2T) — distinct zeros (0.7532…). -/ -theorem thmE_D₀_dist (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (cStar 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := - eps_form_cStar (N := fun T => (NcountL χ T (2 * T) : ℝ)) - (lower := fun T => (NdistL χ T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) fun lam h1 h2 => thmE_D_dist_lam hq hprim (by linarith) h2 + (fun _ => Nat.cast_nonneg _) fun _ h1 h2 => thmE_D_lam hq hprim (by linarith) h2 end Dirichlet diff --git a/zeta23/Zeta23/ThmDE/Limit.lean b/zeta23/Zeta23/ThmDE/Limit.lean index f886a98137..e1d86f544f 100644 --- a/zeta23/Zeta23/ThmDE/Limit.lean +++ b/zeta23/Zeta23/ThmDE/Limit.lean @@ -21,19 +21,10 @@ namespace ThmDE theorem tendsto_lam1q {P : Params} (hP : P.Valid) {q : ℕ} (hq : 1 ≤ q) : Tendsto (fun T => ThmE.lam1q P q T) atTop (𝓝 P.lam) := by have hlam := hP.lam_pos - have hl := Assembly.tendsto_l_atTop - have hbound : ∀ᶠ T in atTop, P.lam - P.lam * ThmE.cq q / l T ≤ ThmE.lam1q P q T - ∧ ThmE.lam1q P q T ≤ P.lam := by - filter_upwards [Assembly.eventually_l_pos, eventually_gt_atTop (0:ℝ)] with T hlT hT - exact ⟨by linarith [ThmE.sub_lam1q_le P hq hT hlam.le hlT], - ThmE.lam1q_le P hq hT hlam.le hlT⟩ - have hlow : Tendsto (fun T => P.lam - P.lam * ThmE.cq q / l T) atTop (𝓝 P.lam) := by - have h0 : Tendsto (fun T => P.lam * ThmE.cq q / l T) atTop (𝓝 0) := - Tendsto.div_atTop tendsto_const_nhds hl - have := tendsto_const_nhds (x := P.lam) (f := atTop (α := ℝ)) |>.sub h0 - simpa using this - exact tendsto_of_tendsto_of_tendsto_of_le_of_le' hlow tendsto_const_nhds - (hbound.mono fun T h => h.1) (hbound.mono fun T h => h.2) + refine ThmD.tendsto_lam1_of (fun T => ThmE.lam1q P q T) (ThmE.cq q) ?_ + filter_upwards [Assembly.eventually_l_pos, eventually_gt_atTop (0:ℝ)] with T hlT hT + exact ⟨by linarith [ThmE.sub_lam1q_le P hq hT hlam.le hlT], + ThmE.lam1q_le P hq hT hlam.le hlT⟩ /-- the χ concrete-ratio limit, parametric in the window-moment limits. -/ theorem tendsto_cRatio_concreteChi {P : Params} (hP : P.Valid) {q : ℕ} (hq : 1 ≤ q) diff --git a/zeta23/Zeta23/ThmDE/Mult.lean b/zeta23/Zeta23/ThmDE/Mult.lean index c76052f981..2beec94ca1 100644 --- a/zeta23/Zeta23/ThmDE/Mult.lean +++ b/zeta23/Zeta23/ThmDE/Mult.lean @@ -28,375 +28,15 @@ namespace ThmDE open Assembly ThmD ThmE -section Abstract - -/-- **multiplicity-aware Theorem D for L(s,χ), c = 2 (simple ∧ on-line), abstract.** -/ -theorem thmDChi_mult2_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) - (P : Params) (hP : P.Valid) (hlam : P.lam < 1) - (hRvM : RiemannVonMangoldtChi q Z) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsDChi P q aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (lam1q P q T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) - (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = GpChi (P.atD T) κ q cf T) - (hId : ∀ᶠ T in atTop, trGtildeChi (P.atD T) κ q cf T = trG T ∧ - trGtildeSqChi (P.atD T) κ q cf T = trG2 T ∧ (P.atD T).a T = aT T) - (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - c⁻¹ - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, hfr2⟩ := hTr.frhat - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - -- the functions of T (abbreviations) - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cinv : ℝ → ℝ := fun T => (cRatio (lam1q P q T) (aT T) (bT T) (JT T))⁻¹ with hcinv - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T with hR₁ - set R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) with hR₂ - set B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) with hBdef - set err : ℝ → ℝ := fun T => (4 * R₁ T + R₂ T + 3 * (NII Z T : ℝ) - + B T * (4 + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) + |cinv T - c⁻¹| * N T with herr - -- basic limits - have hLtop := tendsto_L_atTop P hlam0 - have hcinv_to : Tendsto cinv atTop (𝓝 c⁻¹) := hc.inv₀ hc0.ne' - ------------------------------------------------------------------ - -- (1) the main inequality, eventually in T - ------------------------------------------------------------------ - have hmain : ∀ᶠ T in atTop, (2 - c⁻¹) * N T - err T ≤ (Z.N0s T (2 * T) : ℝ) := by - filter_upwards [hBlock, hTail, hGzGp, hId, ha, eventually_ge_atTop T₁, - eventually_ge_atTop T₂, eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w), eventually_w8 hP] - with T hBl hTl hGG hid ha2 hT₁ hT₂ hT0 hl hE0 h8 - obtain ⟨hidtr, hidfr, hida⟩ := hid - have hapos' : 0 < aT T := by linarith [ha2.1] - have haposD : 0 < (P.atD T).a T := by rw [hida]; exact hapos' - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - -- Seam A for the window-realizing parameters - have hA := seamA_mult2 hT0 (fun z => GzGp.phiHat_conj _ T z) (fun r => GzGp.phiHat_ofReal _ T r) - (poissonSqD hP h8) hTl haposD hLpos - -- the hat-unit traces in terms of the abstract data - have hrt : rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T := by - rw [rtrace_hat, hGG, rtrace_tilde_GpChi, hidtr, hida]; rfl - have hfr : frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) - = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T := by - rw [frobSq_hat, hGG, frobSq_tilde_GpChi, hidfr, hida]; rfl - have haL : (P.atD T).a T * (P.atD T).L T = aT T * P.L T := by rw [hida]; rfl - rw [hrt, hfr, haL] at hA - -- |tr Ĝ − N| ≤ R₁ - have htr : |(aT T * P.L T)⁻¹ * trG T - N T| ≤ R₁ T := - trGhat_sub_N_le hapos' hLpos (by simpa only using htr1 T hT₁) - -- ‖Ĝ‖² ≤ cinv N + R₂ - have hfrb : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T ≤ cinv T * N T + R₂ T := by - have h := hfr2 T hT₂ - simp only at h - have h1 : trG2 T / (aT T * P.L T) ^ 2 - cinv T * N T ≤ C₂ * P.calE T * (cinv T * N T) := by - rw [← mul_assoc] at h - exact le_trans (le_trans (le_max_left _ 0) (le_abs_self _)) h - have e : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T = trG2 T / (aT T * P.L T) ^ 2 := by - rw [inv_pow, div_eq_inv_mul] - rw [e]; simp only [hR₂]; linarith - have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le - have h := N0star_lower_c hB₀ hA htr hfrb - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hcd : (2 - c⁻¹) * N T - |cinv T - c⁻¹| * N T ≤ (2 - cinv T) * N T := by - have h1 := mul_le_mul_of_nonneg_right (le_abs_self (cinv T - c⁻¹)) hN0 - linarith [h1] - simp only [herr, hR₁, hR₂, hBdef, hNdef] at h hcd ⊢ - linarith - ------------------------------------------------------------------ - -- (2) err = o(N) - ------------------------------------------------------------------ - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop_chi q Z hq hRvM - -- R₁ = o(N) - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / aT T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [ha] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith [ha2.1]))] - rw [div_le_iff₀ (by linarith [ha2.1])]; nlinarith [ha2.1] - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - -- cinv is eventually in [0, 2/c] and bounded - have hcinv_bd : ∀ᶠ T in atTop, 0 ≤ cinv T ∧ cinv T ≤ 2 * c⁻¹ := by - have hcpos : (0:ℝ) < c⁻¹ := inv_pos.mpr hc0 - filter_upwards [hcinv_to.eventually (eventually_ge_nhds hcpos), - hcinv_to.eventually (eventually_le_nhds (show c⁻¹ < 2 * c⁻¹ by linarith))] with T h1 h2 - exact ⟨h1, h2⟩ - have hcinvO : cinv =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * c⁻¹) ?_ - filter_upwards [hcinv_bd] with T h - rw [abs_of_nonneg h.1]; exact h.2 - -- R₂ = o(N) - have o2 : R₂ =o[atTop] N := by - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have i1 : (fun T => cinv T * N T) =O[atTop] N := by - have := hcinvO.mul (isBigO_refl N atTop) - simpa using this - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO i1 - refine (this.congr_left fun T => ?_).congr_right fun T => by simp - simp only [hR₂] - -- N(I′∖I) = o(N) - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_sqrt_mul_l_Tl) - -- B → 0 - have o4 : Tendsto B atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ - · filter_upwards [hTail, ha, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by nlinarith [ha2.1]) - · filter_upwards [hTail, ha, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < aT T := by linarith [ha2.1] - have hq : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - simp only [hBdef] - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (aT T * P.L T) := by - have : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [this]; gcongr; exact ha2.1 - -- the bracket and the constant-drift term - have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) - (cl := cinv) hNtop o1 o2 o3 o4 hcinv_bd - have o6 : (fun T => |cinv T - c⁻¹| * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => cinv T - c⁻¹) atTop (𝓝 0) := by - simpa using hcinv_to.sub_const c⁻¹ - simpa using this.abs - have herr_o : err =o[atTop] N := o5.add o6 - ------------------------------------------------------------------ - -- (3) conclude - ------------------------------------------------------------------ - exact eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o - -/-- **multiplicity-aware Theorem D for L(s,χ), c = 3 (distinct), abstract.** -/ -theorem thmDChi_mult3_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) - (P : Params) (hP : P.Valid) (hlam : P.lam < 1) - (hRvM : RiemannVonMangoldtChi q Z) - (aT bT JT trG trG2 : ℝ → ℝ) - (hTr : TracesBoundsDChi P q aT bT JT trG trG2 (fun T => (Z.N T (2 * T) : ℝ))) - {c : ℝ} (hc0 : 0 < c) - (hc : Tendsto (fun T => cRatio (lam1q P q T) (aT T) (bT T) (JT T)) atTop (𝓝 c)) - (ha : ∀ᶠ T in atTop, 1 / 2 ≤ aT T ∧ aT T ≤ 1) - (hBlock : ∀ᶠ T in atTop, BlockInputs Z (P.atD T) T) - (θ₀ : ℝ → ℝ) (hTail : ∀ᶠ T in atTop, TailInputs Z (P.atD T) T (θ₀ T)) - (hθ₀ : ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1)) - (hNII : ∃ C : ℝ, ∀ᶠ T in atTop, (NII Z T : ℝ) ≤ C * Real.sqrt T * l T) - (hGzGp : ∀ᶠ T in atTop, Z.Gz (P.atD T) T = GpChi (P.atD T) κ q cf T) - (hId : ∀ᶠ T in atTop, trGtildeChi (P.atD T) κ q cf T = trG T ∧ - trGtildeSqChi (P.atD T) κ q cf T = trG2 T ∧ (P.atD T).a T = aT T) - (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (3 / 2 - c⁻¹ / 2 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by - intro ε hε - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, hfr2⟩ := hTr.frhat - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - -- the functions of T (abbreviations) - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cinv : ℝ → ℝ := fun T => (cRatio (lam1q P q T) (aT T) (bT T) (JT T))⁻¹ with hcinv - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / aT T with hR₁ - set R₂ : ℝ → ℝ := fun T => C₂ * P.calE T * (cinv T * N T) with hR₂ - set B : ℝ → ℝ := fun T => θ₀ T / (aT T * P.L T) with hBdef - set err : ℝ → ℝ := fun T => (6 * R₁ T + R₂ T + 5 * (NII Z T : ℝ) - + B T * (6 + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) + |cinv T - c⁻¹| * N T with herr - -- basic limits - have hLtop := tendsto_L_atTop P hlam0 - have hcinv_to : Tendsto cinv atTop (𝓝 c⁻¹) := hc.inv₀ hc0.ne' - ------------------------------------------------------------------ - -- (1) the main inequality, eventually in T - ------------------------------------------------------------------ - have hmain : ∀ᶠ T in atTop, (3 - c⁻¹) * N T - err T ≤ 2 * (Z.Nd T (2 * T) : ℝ) := by - filter_upwards [hBlock, hTail, hGzGp, hId, ha, eventually_ge_atTop T₁, - eventually_ge_atTop T₂, eventually_ge_atTop (0:ℝ), eventually_l_pos, - eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w), eventually_w8 hP] - with T hBl hTl hGG hid ha2 hT₁ hT₂ hT0 hl hE0 h8 - obtain ⟨hidtr, hidfr, hida⟩ := hid - have hapos' : 0 < aT T := by linarith [ha2.1] - have haposD : 0 < (P.atD T).a T := by rw [hida]; exact hapos' - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - -- Seam A for the window-realizing parameters - have hA := seamA_mult3 hT0 (fun z => GzGp.phiHat_conj _ T z) (fun r => GzGp.phiHat_ofReal _ T r) - (poissonSqD hP h8) hTl haposD hLpos - -- the hat-unit traces in terms of the abstract data - have hrt : rtrace ((P.atD T).hat T (Z.Gz (P.atD T) T)) = (aT T * P.L T)⁻¹ * trG T := by - rw [rtrace_hat, hGG, rtrace_tilde_GpChi, hidtr, hida]; rfl - have hfr : frobSq ((P.atD T).hat T (Z.Gz (P.atD T) T)) - = ((aT T * P.L T)⁻¹) ^ 2 * trG2 T := by - rw [frobSq_hat, hGG, frobSq_tilde_GpChi, hidfr, hida]; rfl - have haL : (P.atD T).a T * (P.atD T).L T = aT T * P.L T := by rw [hida]; rfl - rw [hrt, hfr, haL] at hA - -- |tr Ĝ − N| ≤ R₁ - have htr : |(aT T * P.L T)⁻¹ * trG T - N T| ≤ R₁ T := - trGhat_sub_N_le hapos' hLpos (by simpa only using htr1 T hT₁) - -- ‖Ĝ‖² ≤ cinv N + R₂ - have hfrb : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T ≤ cinv T * N T + R₂ T := by - have h := hfr2 T hT₂ - simp only at h - have h1 : trG2 T / (aT T * P.L T) ^ 2 - cinv T * N T ≤ C₂ * P.calE T * (cinv T * N T) := by - rw [← mul_assoc] at h - exact le_trans (le_trans (le_max_left _ 0) (le_abs_self _)) h - have e : ((aT T * P.L T)⁻¹) ^ 2 * trG2 T = trG2 T / (aT T * P.L T) ^ 2 := by - rw [inv_pow, div_eq_inv_mul] - rw [e]; simp only [hR₂]; linarith - have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le - have h := Nd_lower_c3 hB₀ hA htr hfrb - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hcd : (3 - c⁻¹) * N T - |cinv T - c⁻¹| * N T ≤ (3 - cinv T) * N T := by - have h1 := mul_le_mul_of_nonneg_right (le_abs_self (cinv T - c⁻¹)) hN0 - linarith [h1] - simp only [herr, hR₁, hR₂, hBdef, hNdef] at h hcd ⊢ - linarith - ------------------------------------------------------------------ - -- (2) err = o(N) - ------------------------------------------------------------------ - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop_chi q Z hq hRvM - -- R₁ = o(N) - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / aT T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [ha] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith [ha2.1]))] - rw [div_le_iff₀ (by linarith [ha2.1])]; nlinarith [ha2.1] - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - -- cinv is eventually in [0, 2/c] and bounded - have hcinv_bd : ∀ᶠ T in atTop, 0 ≤ cinv T ∧ cinv T ≤ 2 * c⁻¹ := by - have hcpos : (0:ℝ) < c⁻¹ := inv_pos.mpr hc0 - filter_upwards [hcinv_to.eventually (eventually_ge_nhds hcpos), - hcinv_to.eventually (eventually_le_nhds (show c⁻¹ < 2 * c⁻¹ by linarith))] with T h1 h2 - exact ⟨h1, h2⟩ - have hcinvO : cinv =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * c⁻¹) ?_ - filter_upwards [hcinv_bd] with T h - rw [abs_of_nonneg h.1]; exact h.2 - -- R₂ = o(N) - have o2 : R₂ =o[atTop] N := by - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have i1 : (fun T => cinv T * N T) =O[atTop] N := by - have := hcinvO.mul (isBigO_refl N atTop) - simpa using this - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO i1 - refine (this.congr_left fun T => ?_).congr_right fun T => by simp - simp only [hR₂] - -- N(I′∖I) = o(N) - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_sqrt_mul_l_Tl) - -- B → 0 - have o4 : Tendsto B atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ - · filter_upwards [hTail, ha, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by nlinarith [ha2.1]) - · filter_upwards [hTail, ha, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < aT T := by linarith [ha2.1] - have hq : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - simp only [hBdef] - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (aT T * P.L T) := by - have : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [this]; gcongr; exact ha2.1 - -- the bracket and the constant-drift term - have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) - (cl := cinv) hNtop o1 o2 o3 o4 hcinv_bd - have o6 : (fun T => |cinv T - c⁻¹| * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => cinv T - c⁻¹) atTop (𝓝 0) := by - simpa using hcinv_to.sub_const c⁻¹ - simpa using this.abs - -- the extra 2R₁ + 2NII + 2B of the c = 3 bracket - have oB : B =o[atTop] N := by - refine ((isLittleO_one_iff ℝ).2 o4).trans_isBigO (IsBigO.of_bound 1 ?_) - filter_upwards [hNtop.eventually_ge_atTop 1] with T h1 - rw [norm_one, Real.norm_eq_abs, abs_of_nonneg (by linarith), one_mul]; exact h1 - have o5' : (fun T => 6 * R₁ T + R₂ T + 5 * (NII Z T : ℝ) - + B T * (6 + 2 * Real.sqrt (cinv T * N T + R₂ T) + B T)) =o[atTop] N := by - have := o5.add (((o1.const_mul_left 2).add (o3.const_mul_left 2)).add (oB.const_mul_left 2)) - exact this.congr_left fun T => by ring - have herr_o : err =o[atTop] N := o5'.add o6 - ------------------------------------------------------------------ - -- (3) conclude (halve) - ------------------------------------------------------------------ - have hfin := eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o - (2 * ε) (by linarith) - obtain ⟨T₀, hT₀⟩ := hfin - exact ⟨T₀, fun T hT => by have := hT₀ T hT; linarith⟩ - -end Abstract - /-- both mult lines at fixed λ ∈ (0,1), abstract zero configuration with the χ-inputs. -/ theorem thmDChi_mult_lam_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) (hcu : CoeffUnimodular q cf) (H : PaperInputsChi κ q cf Z) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) : - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (HD P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T)) ∧ - (∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (GD P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T)) := by - have hLoc : ThmD.LocalHypsCoreDEventually P := localHypsCoreD_eventually hP - have hTr := tracesBoundsDChi_concrete (Z := Z) hP hq hcu H hLoc - have hc := tendsto_cRatio_concreteChi hP hq _ _ _ (tendsto_aD hP) (tendsto_bD hP) - (tendsto_JD hP) - have hc0 := cStar_pos hP.lam_pos hP.lam_le_one - have ha : ∀ᶠ T in atTop, 1 / 2 ≤ (concreteDataDChi P κ q cf Z).aT T ∧ - (concreteDataDChi P κ q cf Z).aT T ≤ 1 := - (concreteFactsDChi hP hq hcu H hLoc).ab_range.mono fun T h => ⟨h.1.trans h.2.1, h.2.2.1⟩ - have hBlock := eventually_blockInputsD Z hP - obtain ⟨A₀, hA₀, hloc⟩ := H.RvM.local_count - obtain ⟨θ₀, hTail, hθ₀⟩ := eventually_tailPackageD_of_localCount Z hP hA₀ hloc - have hNII := Tail.eventually_NII_le Z hA₀ hloc - have hGzGp := eventually_GzGpDChi Z hP H.EF - have hId : ∀ᶠ T in atTop, - trGtildeChi (P.atD T) κ q cf T = (concreteDataDChi P κ q cf Z).trG T ∧ - trGtildeSqChi (P.atD T) κ q cf T = (concreteDataDChi P κ q cf Z).trG2 T ∧ - (P.atD T).a T = (concreteDataDChi P κ q cf Z).aT T := - Eventually.of_forall fun T => - ⟨Params.atD_trGtildeChi hP κ q cf T, Params.atD_trGtildeSqChi hP κ q cf T, - Params.atD_a T hP⟩ - have hcalE := calE_tendsto_zero P hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w) - refine ⟨?_, ?_⟩ - · have h := thmDChi_mult2_abstract Z κ hq cf P hP hlam H.RvM _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ - hTail hθ₀ hNII hGzGp hId hcalE - simpa only [HD, one_div] using h - · have h := thmDChi_mult3_abstract Z κ hq cf P hP hlam H.RvM _ _ _ _ _ hTr hc0 hc ha hBlock θ₀ - hTail hθ₀ hNII hGzGp hId hcalE - simpa only [GD] using h + DyadicLowerBound (HD P.lam) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) ∧ + DyadicLowerBound (GD P.lam) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := + (concreteDChiSetup Z κ hq cf hcu H P hP).thmD_mult_pair hP hlam + (tendsto_N_atTop_chi q Z hq H.RvM) + (fun _ h => isLittleO_N_of_isLittleO_Tl_chi q Z hq H.RvM h) /-! ## L(s,χ): fixed λ, then λ → 1⁻ — NO hypotheses -/ @@ -404,53 +44,29 @@ section Dirichlet variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} -/-- fixed λ: (HD(λ) − ε)·N_χ ≤ N^s_{0,χ}, UNCONDITIONAL. -/ -theorem thmE_D_simple_mult_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) - (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (HD lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - simpa [paramsOf] using (thmDChi_mult_lam_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) - (coeff χ) (coeffUnimodular_of_primitive hq hprim) (paperInputsChi_L hq hprim) - (paramsOf stdProfile lam) hP h1).1 - -/-- fixed λ: (GD(λ) − ε)·N_χ ≤ N_{d,χ}, UNCONDITIONAL. -/ -theorem thmE_D_dist_mult_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) +private theorem thmE_D_mult_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (GD lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := by + DyadicLowerBound (HD lam) (fun T => N0simpleL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) ∧ + DyadicLowerBound (GD lam) (fun T => NdistL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := by have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - simpa [paramsOf] using (thmDChi_mult_lam_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) - (coeff χ) (coeffUnimodular_of_primitive hq hprim) (paperInputsChi_L hq hprim) - (paramsOf stdProfile lam) hP h1).2 + simpa [paramsOf] using thmDChi_mult_lam_abstract (LZeros (LSeam_of hq hprim)) (parity χ) + (by omega) (coeff χ) (coeffUnimodular_of_primitive hq hprim) (paperInputsChi_L hq hprim) + (paramsOf stdProfile lam) hP h1 /-- **0.6725… of the zeros of L(s,χ) are SIMPLE AND ON THE CRITICAL LINE, UNCONDITIONAL** (every primitive χ mod q > 1; multiplicity-aware Theorem D: HD 1 = 2 − 1/c₁* = 3/2 − cot(1/√2)/√2). -/ theorem thmE_D₀_simple_mult (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (HD 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := + DyadicLowerBound (HD 1) (fun T => N0simpleL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := eps_form_HD (N := fun T => (NcountL χ T (2 * T) : ℝ)) (lower := fun T => (N0simpleL χ T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) fun lam hl1 hl2 => thmE_D_simple_mult_lam hq hprim (by linarith) hl2 + (fun _ => Nat.cast_nonneg _) fun _ hl1 hl2 => (thmE_D_mult_lam hq hprim (by linarith) hl2).1 /-- **(3 − 1/c₁*)/2 = 0.83625… of the zeros of L(s,χ) are DISTINCT, UNCONDITIONAL.** -/ theorem thmE_D₀_dist_mult (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (GD 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := by - have h := eps_form_HD (N := fun T => (NcountL χ T (2 * T) : ℝ)) - (lower := fun T => 2 * (NdistL χ T (2 * T) : ℝ) - (NcountL χ T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) (fun lam hl1 hl2 ε hε => by - obtain ⟨T₀, hT₀⟩ := thmE_D_dist_mult_lam hq hprim (by linarith) hl2 (ε / 2) (by linarith) - refine ⟨T₀, fun T hT => ?_⟩ - have := hT₀ T hT - simp only [GD_eq] at this - linarith) - intro ε hε - obtain ⟨T₀, hT₀⟩ := h (2 * ε) (by linarith) - refine ⟨T₀, fun T hT => ?_⟩ - have := hT₀ T hT - rw [GD_eq] - linarith + DyadicLowerBound (GD 1) (fun T => NdistL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := + eps_form_GD (N := fun T => (NcountL χ T (2 * T) : ℝ)) + (lower := fun T => (NdistL χ T (2 * T) : ℝ)) + (fun _ => Nat.cast_nonneg _) fun _ hl1 hl2 => (thmE_D_mult_lam hq hprim (by linarith) hl2).2 end Dirichlet diff --git a/zeta23/Zeta23/ThmDE/Traces.lean b/zeta23/Zeta23/ThmDE/Traces.lean index 6b9eb56351..d5eda5c89b 100644 --- a/zeta23/Zeta23/ThmDE/Traces.lean +++ b/zeta23/Zeta23/ThmDE/Traces.lean @@ -5,272 +5,33 @@ SPDX-License-Identifier: Apache-2.0 -/ /- Zeta23/ThmDE/Traces.lean — [eq:ratio-general] for L(s,χ): -the window-general [thm:traces] assembly of Zeta23/ThmD/Traces.lean (moments b, J symbolic; the -[eq:gbounds] sandwich replaced by the §7.1 partial-summation field sumJ) with the Dirichlet- -character changes of Zeta23/ThmE/TracesChi.lean ([thm:E] proof (iii)): ℓ₁ ↦ ℓ_{1,χ}, three-term -[eq:Msplit] (no pole terms), Σ_{(n,q)=1}. The pointwise real inequalities tr2D_pointwise / -ratioD_pointwise / frhatD_pointwise (Zeta23/ThmD/Traces.lean) are reused VERBATIM with ℓ := ℓ_{1,χ} -(they take the density-log as a free real ≥ l). Output: Zeta23.ThmDE.TracesBoundsDChi. +thin instantiation of `ThmD.FactsDG` and `ThmD.tracesBoundsDG_of_factsDG` at `ell1f = ell1q q`. -/ import Zeta23.ThmD.Traces import Zeta23.ThmE.TracesChi -import Zeta23.ThmDE.TracesHyp noncomputable section -open Real Filter - namespace Zeta23 namespace ThmDE open ThmD ThmE -/-- the data of the χ-D assembly: TracesChi's DataChi plus the window moment J_T [eq:abJ]. -/ -structure DataDChi (P : Params) extends ThmE.DataChi P where - /-- J := (2/L³) ∫_0^L g(y) y dy [eq:abJ]. -/ - JT : ℝ → ℝ - -variable {P : Params} {q : ℕ} (D : DataDChi P) - -/-- Hypotheses of the window-general χ-[thm:traces] assembly: ThmE.FactsChi with the sandwich -fields (sum_lower/sum_upper) replaced by sumJ and abdef by ab_range (as in ThmD.FactsD). -/ -structure FactsDChi (q : ℕ) (D : DataDChi P) : Prop where - lam_pos : 0 < P.lam - lam_le_one : P.lam ≤ 1 - one_le_w : 1 ≤ P.w - one_le_q : 1 ≤ q - /-- window-general [eq:abJ] ranges: 1/2 ≤ b ≤ a ≤ 1 and 0 ≤ J ≤ 1 eventually. -/ - ab_range : ∀ᶠ T in atTop, - 1 / 2 ≤ D.bT T ∧ D.bT T ≤ D.aT T ∧ D.aT T ≤ 1 ∧ 0 ≤ D.JT T ∧ D.JT T ≤ 1 - rvm : EvBound (fun T => D.Ncnt T - T * ell1q q T / (2 * π)) l - muints2 : EvBound (fun T => D.intMu2 T - T * ell1q q T ^ 2 / (4 * π ^ 2)) - (fun T => T * ell1q q T ^ 2 / (4 * π ^ 2) / l T ^ 2) - prop_trace : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.L T * Real.sqrt (P.X T)) - lem_ends : EvBound (fun T => D.trG2 T - D.Mtot T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) - Msplit : ∀ᶠ T in atTop, D.Mtot T = D.Mmumu T + D.MPP T + 2 * D.MmuP T - prop_mumu : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) - (fun T => l T ^ 2 * Real.log (P.L T)) - prop_PP : EvBound (fun T => D.MPP T - T / π * D.sumL2gq T) (fun T => P.L T ^ 2 * P.X T) - /-- the §7.1 partial-summation step for the coprime sum: - Σ_{n≤X,(n,q)=1} a_n² g(y_n) = (L³/2)·J_T + O_q(L²). -/ - sumJ : EvBound (fun T => D.sumL2gq T - P.L T ^ 3 / 2 * D.JT T) (fun T => P.L T ^ 2) - cross_muP : EvBound D.MmuP (fun T => l T * Real.sqrt (P.X T)) - -section assemblyD -variable {D} (h : FactsDChi q D) -include h - -private lemma NcntD_lower : ∀ᶠ T in Filter.atTop, T * l T / (4 * π) ≤ D.Ncnt T := by - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le - filter_upwards [hN, Filter.eventually_ge_atTop (4 * π * A), PaperParams.eventually_l_ge 0, - Filter.eventually_gt_atTop (0:ℝ)] with T hN hTA hl hT0 - have hπ := Real.pi_pos - have h1 : -(A * l T) ≤ D.Ncnt T - T * ell1q q T / (2 * π) := (abs_le.mp hN).1 - have h2 : T * l T ≤ T * ell1q q T := - mul_le_mul_of_nonneg_left (ThmE.l_le_ell1q h.one_le_q hT0) (by linarith) - have h3 : T * l T / (2 * π) ≤ T * ell1q q T / (2 * π) := - div_le_div_of_nonneg_right h2 (by positivity) - have h4 : T * l T / (4 * π) = T * l T / (2 * π) - T * l T / (4 * π) := by ring - have h5 : A * l T ≤ T * l T / (4 * π) := by - rw [le_div_iff₀ (by positivity)] - nlinarith - linarith - -private lemma T_le_NcntD : ∀ᶠ T in Filter.atTop, T ≤ 4 * π * D.Ncnt T := by - filter_upwards [NcntD_lower h, PaperParams.eventually_l_ge 1, Filter.eventually_ge_atTop 0] - with T hN hl hT - have hπ := Real.pi_pos - have : T * l T ≤ 4 * π * D.Ncnt T := by - rw [div_le_iff₀ (by positivity)] at hN - linarith - nlinarith - -private lemma NcntD_pos : ∀ᶠ T in Filter.atTop, 0 < D.Ncnt T := by - filter_upwards [NcntD_lower h, PaperParams.eventually_l_ge 1, Filter.eventually_ge_atTop 1] - with T hN hl hT - have hπ := Real.pi_pos - have h0 : (0:ℝ) < T * l T / (4 * π) := by positivity - linarith - -private lemma regimeD : ∀ᶠ T in Filter.atTop, 1 ≤ T ∧ 1 ≤ l T ∧ 1 ≤ Real.log (l T) - ∧ 1 ≤ P.L T ∧ 1 ≤ P.X T ∧ P.L T ≤ l T ∧ P.X T ≤ T := by - have hlam := h.lam_pos - filter_upwards [Filter.eventually_ge_atTop 1, PaperParams.eventually_l_ge 1, - PaperParams.eventually_log_l_ge 1, PaperParams.eventually_L_ge P hlam 1, - PaperParams.eventually_one_le_X P hlam, - PaperParams.eventually_X_le_T P hlam h.lam_le_one] with T h1 h2 h3 h4 h5 h6 - exact ⟨h1, h2, h3, h4, h5, PaperParams.L_le_l P h.lam_le_one (by linarith), h6⟩ +/-- The χ-instance of `ThmD.TracesBoundsDG` (`lam1f = lam1q P q`). -/ +abbrev TracesBoundsDChi (P : Params) (q : ℕ) (aT bT JT trG trG2 Ncnt : ℝ → ℝ) : Prop := + TracesBoundsDG P (lam1q P q) aT bT JT trG trG2 Ncnt -/-- the D-form of [eq:tr1]': tr G̃ = a L N (1 + O(𝓔)) — a STAYS (no collapse to 1). -/ -private lemma tr1'D : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.calE T * (D.aT T * P.L T * D.Ncnt T)) := by - obtain ⟨C₁, hC₁, h1⟩ := h.prop_trace.eventually_le - have hlam := h.lam_pos - have hw : 0 ≤ P.w := by linarith [h.one_le_w] - refine EvBound.of_eventually_le (c := 8 * π * C₁) (by positivity) ?_ - filter_upwards [h1, h.ab_range, PaperParams.calE_ge_rpow hlam hw, - PaperParams.calE_nonneg_eventually hlam hw, T_le_NcntD h, NcntD_pos h, - Filter.eventually_ge_atTop 1, PaperParams.eventually_L_ge P hlam 1] - with T h1 hab hEr hE0 hTN hN0 hT1 hL1 - obtain ⟨hb2, hba, ha1, hJ0, hJ1⟩ := hab - have hT0 : 0 < T := by linarith - have hL0 : 0 ≤ P.L T := by linarith - have ha2 : 1 / 2 ≤ D.aT T := le_trans hb2 hba - have hB : C₁ * (P.L T * Real.sqrt (P.X T)) - ≤ 8 * π * C₁ * (P.calE T * (D.aT T * P.L T * D.Ncnt T)) := by - have hs : Real.sqrt (P.X T) ≤ T ^ (P.lam / 2 - 1) * T := by - rw [PaperParams.rpow_half_sub_one_mul hT0] - exact PaperParams.sqrt_X_le_rpow P hlam hT0 - have hs2 : T ^ (P.lam / 2 - 1) * T ≤ P.calE T * (4 * π * D.Ncnt T) := - mul_le_mul hEr hTN hT0.le hE0 - calc C₁ * (P.L T * Real.sqrt (P.X T)) - ≤ C₁ * (P.L T * (P.calE T * (4 * π * D.Ncnt T))) := by gcongr; exact hs.trans hs2 - _ = 4 * π * C₁ * (P.calE T * (P.L T * D.Ncnt T)) := by ring - _ ≤ 4 * π * C₁ * (P.calE T * ((2 * D.aT T) * P.L T * D.Ncnt T)) := by - have h2a : (1:ℝ) ≤ 2 * D.aT T := by linarith - have hnn : 0 ≤ P.calE T := hE0 - have hLN : 0 ≤ P.L T * D.Ncnt T := mul_nonneg hL0 hN0.le - calc 4 * π * C₁ * (P.calE T * (P.L T * D.Ncnt T)) - = 4 * π * C₁ * (P.calE T * (1 * P.L T * D.Ncnt T)) := by ring - _ ≤ 4 * π * C₁ * (P.calE T * (2 * D.aT T * P.L T * D.Ncnt T)) := by - gcongr - - _ = 8 * π * C₁ * (P.calE T * (D.aT T * P.L T * D.Ncnt T)) := by ring - exact le_trans h1 hB +/-- The data of the χ-D assembly (reuses `ThmD.DataD` with zero pole terms). -/ +abbrev DataDChi (P : Params) := ThmD.DataD P +/-- Hypotheses of the window-general χ-[thm:traces] assembly as `ThmD.FactsDG (ell1q q)`. -/ +abbrev FactsDChi {P : Params} (q : ℕ) (D : DataDChi P) : Prop := + ThmD.FactsDG (ell1q q) D -/-- the D main term: (TL/2π)(b ℓ₁² + L² J) [eq:ratio-general]. -/ -private def mainTr2D (P : Params) (q : ℕ) (D : DataDChi P) (T : ℝ) : ℝ := - T * P.L T / (2 * π) * (D.bT T * ell1q q T ^ 2 + P.L T ^ 2 * D.JT T) - -/-- the D-form of [eq:tr2], first form (verbatim mirror of PrimeSide.tr2_first over FactsD). -/ -private lemma tr2_firstD : EvBound - (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumL2gq T)) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - have e3 : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.prop_mumu.mono_right' one_pos ?_ - filter_upwards [regimeD h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - have hlogL : Real.log (P.L T) ≤ Real.log (l T) := Real.log_le_log (by linarith) hLl - have hlogL0 : 0 ≤ Real.log (P.L T) := Real.log_nonneg hL - calc l T ^ 2 * Real.log (P.L T) ≤ l T ^ 2 * Real.log (l T) := by gcongr - _ = 1 * l T * Real.log (l T) * l T := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have e4 : EvBound (fun T => D.MPP T - T / π * D.sumL2gq T) - (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.prop_PP.mono_right' one_pos ?_ - filter_upwards [regimeD h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - calc P.L T ^ 2 * P.X T = P.L T * P.L T * 1 * P.X T := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have hsqrtX : ∀ᶠ T in Filter.atTop, Real.sqrt (P.X T) ≤ P.X T := by - filter_upwards [regimeD h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - rw [Real.sqrt_le_left (by linarith)] - nlinarith - have e5 : EvBound D.MmuP (fun T => P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := by - refine h.cross_muP.mono_right' one_pos ?_ - filter_upwards [regimeD h, hsqrtX] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ hs - calc l T * Real.sqrt (P.X T) ≤ l T * P.X T := by gcongr - _ = 1 * l T * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * l T * Real.log (l T) * (l T ^ 2 + P.X T)) := (one_mul _).symm - have S := h.lem_ends.add (e3.add (e4.add (e5.const_mul 2))) - refine S.congr_left ?_ - filter_upwards [h.Msplit] with T hM - rw [hM] - ring - -/-- the D-form of [eq:tr2], second form: tr G̃² = (TL/2π)(bℓ₁² + L²J)(1 + O(𝓔_T)). -/ -private lemma tr2D : EvBound (fun T => D.trG2 T - mainTr2D P q D T) - (fun T => P.calE T * mainTr2D P q D T) := by - have hlam := h.lam_pos - have hw1 := h.one_le_w - have hw : 0 ≤ P.w := by linarith - obtain ⟨CR, hCR, hR⟩ := (tr2_firstD h).eventually_le - obtain ⟨Cμ, hCμ, hμ⟩ := h.muints2.eventually_le - obtain ⟨Cs, hCs, hsj⟩ := h.sumJ.eventually_le - refine EvBound.of_eventually_le (c := 4 * π * CR + 2 * Cμ + 4 * Cs) (by positivity) ?_ - filter_upwards [hR, hμ, hsj, h.ab_range, regimeD h, PaperParams.calE_ge_w_div_L hlam hw, - PaperParams.calE_ge_mid hlam hw, PaperParams.calE_nonneg_eventually hlam hw, - PaperParams.eventually_L_ge P hlam (2 * P.w), Filter.eventually_gt_atTop (0:ℝ)] - with T hR hμ hsj hab hreg hEw hEmid hE0 hL2w hT0 - obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg - obtain ⟨hb2, hba, ha1, hJ0, -⟩ := hab - have hSJ : |D.sumL2gq T - P.L T ^ 3 * D.JT T / 2| ≤ Cs * P.L T ^ 2 := by - have e : P.L T ^ 3 * D.JT T / 2 = P.L T ^ 3 / 2 * D.JT T := by ring - rw [e] - exact hsj - exact tr2D_pointwise T (P.L T) (ell1q q T) (l T) (P.X T) (P.calE T) (D.sumL2gq T) (D.intMu2 T) - (D.bT T) (D.JT T) (D.trG2 T) P.w CR Cμ Cs hT hL hl hlog hX (ThmE.l_le_ell1q h.one_le_q hT0) hLl hw1 hL2w - hb2 (hba.trans ha1) hJ0 hE0 hEw hEmid hCR.le hCμ.le hCs.le hR hμ hSJ - -/-- the D-form of [eq:ratio]: (tr G̃)²/tr G̃² = cRatio(λ₁; a, b, J)·N·(1 + O(𝓔_T)). -/ -private lemma ratioD : EvBound - (fun T => D.trG T ^ 2 / D.trG2 T - cRatio (ThmE.lam1q P q T) (D.aT T) (D.bT T) (D.JT T) * D.Ncnt T) - (fun T => P.calE T * (cRatio (ThmE.lam1q P q T) (D.aT T) (D.bT T) (D.JT T) * D.Ncnt T)) := by - have hlam := h.lam_pos - have hlam1 := h.lam_le_one - have hw : 0 ≤ P.w := by linarith [h.one_le_w] - obtain ⟨C₁, hC₁, h1⟩ := (tr1'D h).eventually_le - obtain ⟨C₂, hC₂, h2⟩ := (tr2D h).eventually_le - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le - have hcal := PaperParams.calE_tendsto_zero hlam hlam1 hw - have hs1 := ThmD.eventually_const_mul_le_half hcal hC₁ - have hs2 := ThmD.eventually_const_mul_le_half hcal hC₂ - refine EvBound.of_eventually_le (c := 2 * (2 * π * A + 5 * C₁ + C₂)) (by positivity) ?_ - filter_upwards [h1, h2, hN, hs1, hs2, regimeD h, h.ab_range, PaperParams.calE_ge_rpow hlam hw, - PaperParams.calE_nonneg_eventually hlam hw, NcntD_pos h, Filter.eventually_ge_atTop (2 * π * A), - Filter.eventually_gt_atTop (0:ℝ)] - with T h1 h2 hN hs1 hs2 hreg hab hEr hE0 hN0 hTA hT0 - obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg - obtain ⟨hb2, hba, -, hJ0, -⟩ := hab - have hET : 1 / T ≤ P.calE T := by - refine le_trans ?_ hEr - rw [one_div, ← Real.rpow_neg_one] - exact Real.rpow_le_rpow_of_exponent_le hT (by linarith) - exact ratioD_pointwise T (P.L T) (ell1q q T) (l T) (P.calE T) (D.Ncnt T) (D.trG T) (D.trG2 T) - A (D.aT T) (D.bT T) (D.JT T) C₁ C₂ hT (by linarith) (hl.trans (ThmE.l_le_ell1q h.one_le_q hT0)) (ThmE.l_le_ell1q h.one_le_q hT0) - hN0 hE0 hET hA.le hC₁.le hC₂.le (le_trans hb2 hba) hb2 hJ0 hs1 hs2 hTA h1 h2 hN - - -end assemblyD - -/-- the frhat field: the D-form hat-units second-moment upper bound. -/ -private lemma frhatD {D : DataDChi P} (h : FactsDChi q D) : EvBound - (fun T => max (D.trG2 T / (D.aT T * P.L T) ^ 2 - - (cRatio (ThmE.lam1q P q T) (D.aT T) (D.bT T) (D.JT T))⁻¹ * D.Ncnt T) 0) - (fun T => P.calE T * ((cRatio (ThmE.lam1q P q T) (D.aT T) (D.bT T) (D.JT T))⁻¹ * D.Ncnt T)) := by - have hlam := h.lam_pos - have hw : 0 ≤ P.w := by linarith [h.one_le_w] - obtain ⟨C₂, hC₂, h2⟩ := (tr2D h).eventually_le - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le - refine EvBound.of_eventually_le (c := 4 * π * A + 2 * C₂) (by positivity) ?_ - filter_upwards [h2, hN, regimeD h, h.ab_range, PaperParams.calE_ge_rpow hlam hw, - PaperParams.calE_nonneg_eventually hlam hw, NcntD_pos h, - Filter.eventually_ge_atTop (4 * π * A), Filter.eventually_gt_atTop (0:ℝ)] - with T h2 hN hreg hab hEr hE0 hN0 hTA hT0 - obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg - obtain ⟨hb2, hba, -, hJ0, -⟩ := hab - have hET : 1 / T ≤ P.calE T := by - refine le_trans ?_ hEr - rw [one_div, ← Real.rpow_neg_one] - exact Real.rpow_le_rpow_of_exponent_le hT (by linarith) - refine le_trans (le_of_eq (abs_of_nonneg (le_max_right _ _))) ?_ - exact frhatD_pointwise T (P.L T) (ell1q q T) (l T) (P.calE T) (D.Ncnt T) (D.trG2 T) - A (D.aT T) (D.bT T) (D.JT T) C₂ hT (by linarith) (hl.trans (ThmE.l_le_ell1q h.one_le_q hT0)) - (ThmE.l_le_ell1q h.one_le_q hT0) hN0 hE0 hET hA.le hC₂.le (le_trans hb2 hba) hb2 hJ0 hTA h2 hN - -/-- **[eq:ratio-general] for L(s,χ), assembled.** -/ -theorem tracesBoundsDChi_of_factsDChi (h : FactsDChi q D) : - TracesBoundsDChi P q D.aT D.bT D.JT D.trG D.trG2 D.Ncnt where - tr1 := h.prop_trace - ratio := ratioD h - frhat := frhatD h +/-- **[eq:ratio-general] for L(s,χ), assembled via `ThmD.tracesBoundsDG_of_factsDG`.** -/ +theorem tracesBoundsDChi_of_factsDChi {P : Params} {q : ℕ} (D : DataDChi P) (h : FactsDChi q D) : + TracesBoundsDChi P q D.aT D.bT D.JT D.trG D.trG2 D.Ncnt := + ThmD.tracesBoundsDG_of_factsDG D h end ThmDE end Zeta23 - -end diff --git a/zeta23/Zeta23/ThmDE/TracesHyp.lean b/zeta23/Zeta23/ThmDE/TracesHyp.lean deleted file mode 100644 index 9965c30438..0000000000 --- a/zeta23/Zeta23/ThmDE/TracesHyp.lean +++ /dev/null @@ -1,40 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/ThmDE/TracesHyp.lean — [thm:E], last sentence: "Theorem D holds likewise." -The D-trace interface for a Dirichlet character: Zeta23.ThmD.TracesBoundsD -(Zeta23/ThmD/AssemblyD.lean) with λ₁ ↦ λ_{1,χ} = L/ℓ_{1,χ} (Zeta23.ThmE.lam1q). Produced by -Zeta23/ThmDE/Traces.lean (FactsDChi ⇒ this), consumed by Zeta23/ThmDE/Endgame.lean. --/ -import Zeta23.ThmD.AssemblyD -import Zeta23.ThmE.TracesHypChi - -noncomputable section - -open Real - -namespace Zeta23 -namespace ThmDE - -open ThmD ThmE - -/-- **[eq:ratio-general] for L(s,χ)** with the Montgomery–Taylor window moments (a, b, J) as data: -tr1 = [eq:tr1] (window-general prop:trace); ratio/frhat carry the main term -cRatio(λ_{1,χ}; a, b, J)·N and its hat-units inverse. Constants may depend on q. -/ -structure TracesBoundsDChi (P : Params) (q : ℕ) (aT bT JT trG trG2 Ncnt : ℝ → ℝ) : Prop where - tr1 : EvBound (fun T => trG T - aT T * P.L T * Ncnt T) (fun T => P.L T * Real.sqrt (P.X T)) - ratio : EvBound - (fun T => trG T ^ 2 / trG2 T - cRatio (lam1q P q T) (aT T) (bT T) (JT T) * Ncnt T) - (fun T => P.calE T * (cRatio (lam1q P q T) (aT T) (bT T) (JT T) * Ncnt T)) - frhat : EvBound - (fun T => max (trG2 T / (aT T * P.L T) ^ 2 - - (cRatio (lam1q P q T) (aT T) (bT T) (JT T))⁻¹ * Ncnt T) 0) - (fun T => P.calE T * ((cRatio (lam1q P q T) (aT T) (bT T) (JT T))⁻¹ * Ncnt T)) - -end ThmDE -end Zeta23 - -end diff --git a/zeta23/Zeta23/ThmDE/ZeroSide.lean b/zeta23/Zeta23/ThmDE/ZeroSide.lean index ad5b0f7c9f..77f9146d4c 100644 --- a/zeta23/Zeta23/ThmDE/ZeroSide.lean +++ b/zeta23/Zeta23/ThmDE/ZeroSide.lean @@ -37,18 +37,8 @@ theorem eventually_tailPackageD_of_localCount (Z : ZeroConfig) {P : Params} (hP {A₀ : ℝ} (hA₀ : 1 ≤ A₀) (hloc : ∀ t : ℝ, (Z.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) : ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z (P.atD T) T (θ₀ T)) ∧ - ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := by - refine ⟨fun T => Tail.theta0 A₀ (Real.exp (P.L T / 4) * C1D P T) T, ?_, ?_⟩ - · have hL2 : ∀ᶠ T in atTop, 2 ≤ P.L T := (tendsto_L hP).eventually_ge_atTop 2 - filter_upwards [eventually_ge_atTop Tail.T₀, hL2, eventually_w8 hP, eventually_w4pi hP] - with T hT hL h8 h4π - have HT : Tail.TailHyp Z (P.atD T) T A₀ (C1D P T) := - { hT := hT, hL := hL, hA₀ := hA₀, hloc := hloc, hC₁ := C1D_nonneg P T, - hdecay := fun r y hy hz => hdecayD hP h8 r y hy hz } - have ha : 0 < (P.atD T).a T := by linarith [(aD_range_of hP h8 h4π).1] - exact HT.tailInputs ha (fun z => GzGp.phiHat_conj _ T z) - · exact Tail.eventually_theta0_le P hP hA₀ (C1D P) (C1D_nonneg P) (R := cDT P.ϱ P.lam / 2) - ((eventually_w8 hP).mono fun T h8 => by linarith [C1D_le hP h8]) + ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := + ThmD.eventually_tailPackageD_of_localCount Z hP hA₀ hloc /-! ### The H-EF(χ) bridge for φ_D -/ diff --git a/zeta23/Zeta23/ThmE/AssemblyQ.lean b/zeta23/Zeta23/ThmE/AssemblyQ.lean index 97133fcbca..d03541677e 100644 --- a/zeta23/Zeta23/ThmE/AssemblyQ.lean +++ b/zeta23/Zeta23/ThmE/AssemblyQ.lean @@ -14,7 +14,7 @@ are reused verbatim — only the λ₁/ℓ₁-dependent steps and the prime-side Every constant below may depend on q (q fixed; recorded for [rem:otherL](i)). -/ import Zeta23.Assembly -import Zeta23.ThmE.TracesHypChi +import Zeta23.ThmE.Hypotheses open Filter Asymptotics Topology Real @@ -130,40 +130,6 @@ lemma eventually_N_ge_chi (hq : 1 ≤ q) (hR : RiemannVonMangoldtChi q Z) : have h5 : T / (2 * π) * l T = 2 * (T * l T / (4 * π)) := by ring linarith -/-- H-RvM(χ) ⇒ `N_χ(T,2T) ≤ K_q · T l` eventually for some constant; `K_q = 1 + c_q` works -(ℓ_{1,χ} ≤ (1 + c_q) l once l ≥ 1). -/ -lemma eventually_N_le_chi (hq : 1 ≤ q) (hR : RiemannVonMangoldtChi q Z) : - ∀ᶠ T in atTop, (Z.N T (2 * T) : ℝ) ≤ (1 + cq q) * (T * l T) := by - obtain ⟨C, T₀, h⟩ := hR.main - filter_upwards [eventually_ge_atTop T₀, eventually_log_le_two_l, eventually_log_nonneg, - eventually_one_le_l, eventually_ge_atTop (16 * |C| + 4), eventually_gt_atTop 0] - with T hT hlog hlog0 hl hTC hT0 - have h1 := (abs_le.mp (h T hT)).2 - have hc := cq_pos hq - have hℓ : ell1q q T ≤ (1 + cq q) * l T := by - rw [ell1q_eq hq hT0]; nlinarith - have h2 : C * Real.log T ≤ |C| * (2 * l T) := - (mul_le_mul_of_nonneg_right (le_abs_self C) hlog0).trans - (mul_le_mul_of_nonneg_left hlog (abs_nonneg C)) - have h3 : T / (2 * π) * ell1q q T ≤ T / (2 * π) * ((1 + cq q) * l T) := - mul_le_mul_of_nonneg_left hℓ (by positivity) - have hlpos : (0:ℝ) < l T := by linarith - have hY : (0:ℝ) ≤ (1 + cq q) * l T := by nlinarith - have hdiv : T / (2 * π) ≤ T / 6 := - div_le_div_of_nonneg_left hT0.le (by norm_num) (by nlinarith [Real.pi_gt_three]) - have hπ : T / (2 * π) * ((1 + cq q) * l T) ≤ (1 + cq q) * (T * l T) / 6 := by - calc T / (2 * π) * ((1 + cq q) * l T) ≤ T / 6 * ((1 + cq q) * l T) := - mul_le_mul_of_nonneg_right hdiv hY - _ = (1 + cq q) * (T * l T) / 6 := by ring - have h6 : 2 * |C| * l T ≤ (1 + cq q) * (T * l T) / 6 := by - rw [le_div_iff₀ (by norm_num)] - have e1 : (16 * |C| + 4) * l T ≤ T * l T := mul_le_mul_of_nonneg_right hTC hlpos.le - have e2 : T * l T ≤ (1 + cq q) * (T * l T) := by - nlinarith [cq_pos hq, mul_pos hT0 hlpos] - nlinarith [abs_nonneg C, hlpos] - have hnn : 0 ≤ (1 + cq q) * (T * l T) := by nlinarith [mul_pos hT0 hlpos, cq_pos hq] - linarith - lemma tendsto_N_atTop_chi (hq : 1 ≤ q) (hR : RiemannVonMangoldtChi q Z) : Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop := tendsto_atTop_mono' _ (eventually_N_ge_chi q Z hq hR) @@ -277,135 +243,24 @@ theorem thmE_A_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = GpChi P κ q cf T) (ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1) (hcalE : Tendsto P.calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Hfun P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0star T (2 * T) := by + DyadicLowerBound (Hfun P.lam) (fun T => Z.N0star T (2 * T)) (fun T => Z.N T (2 * T)) := by have hlam0 := hP.lam_pos have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, htr2⟩ := hTr.tr2 - obtain ⟨CN, T₃, hRvM'⟩ := hRvM.main - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cl : ℝ → ℝ := fun T => 1 / lam1q P q T + lam1q P q T / 3 with hcl - set K : ℝ → ℝ := fun T => (1 + C₂ * P.calE T) / P.a T ^ 2 with hK - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / P.a T with hR₁ - set R₂ : ℝ → ℝ := fun T => cl T * ((K T - 1) * N T + K T * (|CN| * Real.log T)) with hR₂ - set B : ℝ → ℝ := fun T => θ₀ T / (P.a T * P.L T) with hBdef - set err : ℝ → ℝ := fun T => (4 * R₁ T + R₂ T + 3 * (NII Z T : ℝ) - + B T * (4 + 2 * Real.sqrt (cl T * N T + R₂ T) + B T)) + cq q / (P.lam * l T) * N T with herr - have hLtop := tendsto_L_atTop P hlam0 - have ha1 := tendsto_a_one P hlam0 ha - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have hKto : Tendsto K atTop (𝓝 1) := by - have h1 : Tendsto (fun T => 1 + C₂ * P.calE T) atTop (𝓝 1) := by - simpa using tendsto_const_nhds.add hcE0 - have h2 : Tendsto (fun T => P.a T ^ 2) atTop (𝓝 1) := by simpa using ha1.pow 2 - simpa [hK, Pi.div_def] using h1.div h2 one_ne_zero - have hmain : ∀ᶠ T in atTop, Hfun P.lam * N T - err T ≤ (Z.N0star T (2 * T) : ℝ) := by - filter_upwards [hBlock, hTail, hGzGp, hapos, eventually_ge_atTop T₁, - eventually_ge_atTop T₂, eventually_ge_atTop T₃, eventually_gt_atTop (0:ℝ), eventually_l_pos, - eventually_log_nonneg, hcE0.eventually (eventually_gt_nhds (show (-1:ℝ) < 0 by norm_num))] - with T hB hTl hGG ha2 hT₁ hT₂ hT₃ hT0 hl hlog hcE - have hapos' : 0 < P.a T := by linarith - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hℓ₁ : 0 < ell1q q T := ell1q_pos hq hT0 hl - have hKnn : 0 ≤ 1 + C₂ * P.calE T := by linarith - have hA := seamA hT0.le hB hTl hapos' hLpos - have htr2' : trGtildeSqChi P κ q cf T - mainTr2Chi P q T - ≤ C₂ * P.calE T * mainTr2Chi P q T := by - have := htr2 T hT₂ - simp only at this - rw [← mul_assoc] at this - exact (le_abs_self _).trans this - have htr1' : |trGtildeChi P κ q cf T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| - ≤ C₁ * (P.L T * Real.sqrt (P.X T)) := by - have := htr1 T hT₁; simpa only using this - have hRvM'' : T * ell1q q T / (2 * Real.pi) ≤ N T + |CN| * Real.log T := by - have h1 := (abs_le.mp (hRvM' T hT₃)).1 - have h2 : CN * Real.log T ≤ |CN| * Real.log T := - mul_le_mul_of_nonneg_right (le_abs_self _) hlog - have h3 : T / (2 * Real.pi) * ell1q q T = T * ell1q q T / (2 * Real.pi) := by ring - simp only [hNdef]; linarith - have hSB := seamBChi P κ q cf hGG hapos' hLpos hℓ₁ htr1' hKnn htr2' hRvM'' - have hB₀ : 0 ≤ B T := div_nonneg hTl.theta_nonneg (mul_pos hapos' hLpos).le - have h := N0star_lower_H hB₀ hA hSB.1 hSB.2 - have hH := Hfun_lam1q_ge P hq hT0 hlam0 hl - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hHN : (Hfun P.lam - cq q / (P.lam * l T)) * N T ≤ Hfun (lam1q P q T) * N T := - mul_le_mul_of_nonneg_right hH hN0 - simp only [herr, hR₁, hR₂, hBdef, hcl, hK, hNdef] at h hHN ⊢ - linarith - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop_chi q Z hq hRvM - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / P.a T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [hapos] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith))] - rw [div_le_iff₀ (by linarith)]; nlinarith - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - have o2 : R₂ =o[atTop] N := by - have hclO : cl =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 / P.lam + 1 / 3) ?_ - filter_upwards [eventually_clam_bounds_chi q P hq hlam0 hlam1] with T h - rw [abs_of_nonneg h.1]; exact h.2 - have hK1 : Tendsto (fun T => K T - 1) atTop (𝓝 0) := by simpa using hKto.sub_const 1 - have hKO : K =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2) ?_ - filter_upwards [hKto.eventually (eventually_ge_nhds (show (0:ℝ) < 1 by norm_num)), - hKto.eventually (eventually_le_nhds (show (1:ℝ) < 2 by norm_num))] with T h1 h2 - rw [abs_of_nonneg h1]; exact h2 - have i1 : (fun T => (K T - 1) * N T) =o[atTop] N := isLittleO_of_tendsto_zero_mul hK1 - have i2 : (fun T => K T * (|CN| * Real.log T)) =o[atTop] N := - isLittleO_of_bdd_mul hKO - ((isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_log_Tl).const_mul_left _) - exact isLittleO_of_bdd_mul hclO (i1.add i2) - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO - (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_sqrt_mul_l_Tl) - have o4 : Tendsto B atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup ?_ ?_ - · filter_upwards [hTail, hapos, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by positivity) - · filter_upwards [hTail, hapos, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < P.a T := by linarith - have hq' : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - simp only [hBdef] - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (P.a T * P.L T) := by - have e : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [e]; gcongr - have o5 := err_isLittleO (R₁ := R₁) (R₂ := R₂) (NII := fun T => (NII Z T : ℝ)) (B := B) - (cl := cl) hNtop o1 o2 o3 o4 (eventually_clam_bounds_chi q P hq hlam0 hlam1) - have o6 : (fun T => cq q / (P.lam * l T) * N T) =o[atTop] N := by - refine isLittleO_of_tendsto_zero_mul ?_ - have : Tendsto (fun T => P.lam * l T) atTop atTop := tendsto_l_atTop.const_mul_atTop hlam0 - simpa using tendsto_const_nhds.div_atTop this - have herr_o : err =o[atTop] N := o5.add o6 - exact eps_form_of_isLittleO hmain (Eventually.of_forall fun T => Nat.cast_nonneg _) herr_o + exact Assembly.thmA_gen Z P hP hlam hTr (fun _ => rfl) + hRvM.main hBlock θ₀ hTail hθ₀ hNII + (hGzGp.mono fun T h => by rw [h]; exact isHermitian_tilde P T (GpChi_isHermitian P κ q cf T)) + (hGzGp.mono fun T h => by + rw [h]; exact rtrace_tilde_GpChi P κ q cf T) + (hGzGp.mono fun T h => by + rw [h]; exact frobSq_tilde_GpChi P κ q cf T) + ha ((eventually_gt_atTop 0).and eventually_l_pos |>.mono fun T ⟨hT, hl⟩ => + ell1q_pos hq hT hl) + (tendsto_N_atTop_chi q Z hq hRvM) + (fun hf => isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM hf) + (eventually_clam_bounds_chi q P hq hlam0 hlam1) + ((eventually_gt_atTop 0).and eventually_l_pos |>.mono fun T ⟨hT, hl⟩ => + Hfun_lam1q_ge P hq hT hlam0 hl) + hcalE end MainChi @@ -432,126 +287,22 @@ theorem thmE_BC_core (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : Ffun P.lam * (Z.N T (2 * T) : ℝ) - R T ≤ Z.Nd T (2 * T) := by have hlam0 := hP.lam_pos have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨C₃, hC₃, T₃, hratio⟩ := hTr.ratio - obtain ⟨C₄, hC₄, T₄, htr1'⟩ := hTr.tr1' - obtain ⟨Cθ, hθ⟩ := hθ₀ - obtain ⟨CII, hII⟩ := hNII - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set x : ℝ → ℝ := fun T => θ₀ T * (P.d T : ℝ) / trGtildeChi P κ q cf T with hxdef - set R : ℝ → ℝ := fun T => (C₃ * P.calE T * (Ffun (lam1q P q T) * N T) - + 2 * x T * ((1 + C₃ * P.calE T) * (Ffun (lam1q P q T) * N T))) - + (NII Z T : ℝ) + cq q / l T * N T with hRdef - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop_chi q Z hq hRvM - have hcE0 : Tendsto (fun T => C₃ * P.calE T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₃ - have hcE4 : Tendsto (fun T => C₄ * P.calE T) atTop (𝓝 0) := by simpa using hcalE.const_mul C₄ - have hx : ∀ᶠ T in atTop, 0 < trGtildeChi P κ q cf T ∧ 0 ≤ x T ∧ - x T ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) ∧ - θ₀ T * (P.d T : ℝ) < trGtildeChi P κ q cf T := by - filter_upwards [hTail, hθ, eventually_ge_atTop T₄, eventually_N_ge_chi q Z hq hRvM, - eventually_l_pos, eventually_gt_atTop (0:ℝ), - hcE4.eventually (eventually_lt_nhds (show (0:ℝ) < 1/2 by norm_num)), - (tendsto_rpow_halflam_sub_one P hlam1).eventually - (eventually_lt_nhds (show (0:ℝ) < 1 / (8 * (|Cθ| + 1)) by positivity))] - with T hTl hθT hT₄ hNge hl hT0 hcE hTs - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have h1 := (abs_le.mp (by simpa only using htr1' T hT₄)).1 - have hLN : 0 < P.L T * N T := by - have : 0 < T * l T / (4 * Real.pi) := by positivity - exact mul_pos hLpos (this.trans_le hNge) - have htrG : P.L T * N T / 2 ≤ trGtildeChi P κ q cf T := by - have : C₄ * P.calE T * (P.L T * N T) ≤ 1 / 2 * (P.L T * N T) := - mul_le_mul_of_nonneg_right hcE.le hLN.le - simp only [hNdef] at this h1 ⊢; linarith - have htrGpos : 0 < trGtildeChi P κ q cf T := lt_of_lt_of_le (by positivity) htrG - have hd : (P.d T : ℝ) ≤ P.L T * T / (2 * Real.pi) := d_le P (by positivity) - have hθ' : θ₀ T ≤ (|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1) := by - refine hθT.trans ?_ - have : Cθ ≤ |Cθ| + 1 := by linarith [le_abs_self Cθ] - gcongr - have hθ0 := hTl.theta_nonneg - have hnum : θ₀ T * (P.d T : ℝ) - ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := - mul_le_mul hθ' hd (Nat.cast_nonneg _) (hθ0.trans hθ') - have hden : P.L T * (T * l T / (4 * Real.pi)) / 2 ≤ trGtildeChi P κ q cf T := - le_trans (by gcongr) htrG - have hxle : x T ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) := by - simp only [hxdef] - rw [div_le_iff₀ htrGpos] - calc θ₀ T * (P.d T : ℝ) - ≤ ((|Cθ| + 1) * l T * T ^ (P.lam / 2 - 1)) * (P.L T * T / (2 * Real.pi)) := hnum - _ = 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * (P.L T * (T * l T / (4 * Real.pi)) / 2) := by - ring - _ ≤ 4 * (|Cθ| + 1) * T ^ (P.lam / 2 - 1) * trGtildeChi P κ q cf T := by gcongr - refine ⟨htrGpos, div_nonneg (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrGpos.le, hxle, ?_⟩ - have hx1 : x T < 1 := by - refine hxle.trans_lt ?_ - have := (lt_div_iff₀ (show (0:ℝ) < 8 * (|Cθ| + 1) by positivity)).mp hTs - nlinarith [abs_nonneg Cθ, Real.rpow_nonneg hT0.le (P.lam / 2 - 1)] - simp only [hxdef] at hx1 - rwa [div_lt_one htrGpos] at hx1 - refine ⟨R, ?_, ?_⟩ - · have hFN : (fun T => Ffun (lam1q P q T) * N T) =O[atTop] N := by - refine IsBigO.of_bound 1 ?_ - filter_upwards [eventually_l_pos, eventually_gt_atTop 0] with T hl hT0 - have hb := Ffun_bounds (lam1q_pos P hq hT0 hlam0 hl).le - ((lam1q_le P hq hT0 hlam0.le hl).trans hlam1) - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_mul, abs_of_nonneg hb.1, one_mul] - exact mul_le_of_le_one_left (abs_nonneg _) hb.2 - have o1 : (fun T => C₃ * P.calE T * (Ffun (lam1q P q T) * N T)) =o[atTop] N := by - have := ((isLittleO_one_iff ℝ).2 hcE0).mul_isBigO hFN - simpa using this - have hxto : Tendsto x atTop (𝓝 0) := by - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds - (by simpa using (tendsto_rpow_halflam_sub_one P hlam1).const_mul (4 * (|Cθ| + 1))) - (hx.mono fun T h => h.2.1) (hx.mono fun T h => h.2.2.1) - have o2 : (fun T => 2 * x T * ((1 + C₃ * P.calE T) * (Ffun (lam1q P q T) * N T))) - =o[atTop] N := by - have h2x : Tendsto (fun T => 2 * x T) atTop (𝓝 0) := by simpa using hxto.const_mul 2 - have hK : (fun T => 1 + C₃ * P.calE T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2) ?_ - filter_upwards [hcE0.eventually (eventually_ge_nhds (show (-1:ℝ) < 0 by norm_num)), - hcE0.eventually (eventually_le_nhds (show (0:ℝ) < 1 by norm_num))] with T h1 h2 - rw [abs_of_nonneg (by linarith)]; linarith - have := ((isLittleO_one_iff ℝ).2 h2x).mul_isBigO (hK.mul hFN) - simpa using this - have o3 : (fun T => (NII Z T : ℝ)) =o[atTop] N := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO - (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_sqrt_mul_l_Tl) - have o4 : (fun T => cq q / l T * N T) =o[atTop] N := - isLittleO_of_tendsto_zero_mul (tendsto_const_nhds.div_atTop tendsto_l_atTop) - exact ((o1.add o2).add o3).add o4 - · filter_upwards [hBlock, hTail, hGzGp, hx, eventually_ge_atTop T₃, eventually_gt_atTop (0:ℝ), - eventually_l_pos, eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w)] - with T hB hTl hGG hxT hT₃ hT0 hl hE0 - have hGt : (P.tilde T (Z.Gz P T)).IsHermitian := by - rw [hGG]; exact isHermitian_tilde P T (GpChi_isHermitian P κ q cf T) - have hZ := seamA_BC hT0.le hB hTl le_rfl hGt - have hθ0 := hTl.theta_nonneg - have hrt : RHLinalg.rtrace (P.tilde T (Z.Gz P T)) = trGtildeChi P κ q cf T := by - rw [hGG, rtrace_tilde_GpChi] - have hfr : RHLinalg.frobSq (P.tilde T (Z.Gz P T)) = trGtildeSqChi P κ q cf T := by - rw [hGG, frobSq_tilde_GpChi] - have htr' : θ₀ T * (Fintype.card (Fin (P.d T)) : ℝ) < RHLinalg.rtrace (P.tilde T (Z.Gz P T)) := by - rw [card_fin_d, hrt]; exact hxT.2.2.2 - have hCS := nplus_lower hGt hθ0 htr' - rw [card_fin_d, hrt, hfr] at hCS - have hratio' : |trGtildeChi P κ q cf T ^ 2 / trGtildeSqChi P κ q cf T - - Ffun (lam1q P q T) * N T| ≤ C₃ * P.calE T * (Ffun (lam1q P q T) * N T) := by - have := hratio T hT₃; simp only at this; rw [← mul_assoc] at this; exact this - have htrG2 : 0 ≤ trGtildeSqChi P κ q cf T := by rw [← hfr]; exact frobSq_nonneg _ - have hnp := nplus_ge_explicit hCS hxT.1 (mul_nonneg hθ0 (Nat.cast_nonneg _)) htrG2 hratio' - have hF := Ffun_lam1q_ge P hq hT0 hlam0 hlam1 hl - have hN0 : 0 ≤ N T := Nat.cast_nonneg _ - have hFN : (Ffun P.lam - cq q / l T) * N T ≤ Ffun (lam1q P q T) * N T := - mul_le_mul_of_nonneg_right hF hN0 - simp only [hRdef, hxdef, hNdef] at hnp hFN hZ ⊢ - constructor <;> nlinarith [hZ.1, hZ.2, hnp, hFN] + exact Assembly.thmBC_core_gen Z P hP hlam hTr hBlock θ₀ hTail hθ₀ hNII + (hGzGp.mono fun T h => by rw [h]; exact isHermitian_tilde P T (GpChi_isHermitian P κ q cf T)) + (hGzGp.mono fun T h => by + rw [h]; exact rtrace_tilde_GpChi P κ q cf T) + (hGzGp.mono fun T h => by + rw [h]; exact frobSq_tilde_GpChi P κ q cf T) + (eventually_N_ge_chi q Z hq hRvM) + (fun hf => isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM hf) + ((eventually_gt_atTop 0).and eventually_l_pos |>.mono fun T ⟨hT, hl⟩ => + lam1q_pos P hq hT hlam0 hl) + ((eventually_gt_atTop 0).and eventually_l_pos |>.mono fun T ⟨hT, hl⟩ => + lam1q_le P hq hT hlam0.le hl) + ((eventually_gt_atTop 0).and eventually_l_pos |>.mono fun T ⟨hT, hl⟩ => + Ffun_lam1q_ge P hq hT hlam0 hlam1 hl) + (eventually_calE_nonneg P hlam0 (zero_le_one.trans hP.one_le_w)) + hcalE end MainBCChi diff --git a/zeta23/Zeta23/ThmE/BacklundChi.lean b/zeta23/Zeta23/ThmE/BacklundChi.lean index 3e9a7b0ff8..61c18df494 100644 --- a/zeta23/Zeta23/ThmE/BacklundChi.lean +++ b/zeta23/Zeta23/ThmE/BacklundChi.lean @@ -13,6 +13,7 @@ assembly `backlund_horizontalChi_of_count`. Constants may depend on q and χ. -/ import Zeta23.ThmE.LGrowth import Zeta23.ThmE.RvMChiDefs +import Zeta23.RvM.Backlund import Mathlib.Analysis.SpecialFunctions.Integrals.Basic open Complex Set MeasureTheory Real intervalIntegral @@ -42,15 +43,10 @@ section Variation variable {T : ℝ} -/-- `σ ↦ ζ(σ+iT)` has derivative `ζ'(σ+iT)` in the real variable `σ`. -/ +/-- `σ ↦ L(σ+iT, χ)` has derivative `L'(σ+iT, χ)` in the real variable `σ`. -/ lemma hasDerivAt_LFunction_horizontal (hχ1 : χ ≠ 1) (σ : ℝ) : - HasDerivAt (fun σ : ℝ => χ.LFunction (σ + T * I)) (deriv χ.LFunction (σ + T * I)) σ := by - have hζ : HasDerivAt χ.LFunction (deriv χ.LFunction (σ + T * I)) (σ + T * I) := - ((DirichletCharacter.differentiable_LFunction hχ1) _).hasDerivAt - have hγ : HasDerivAt (fun σ : ℝ => (σ : ℂ) + T * I) 1 σ := by - have h1 : HasDerivAt (fun t : ℝ => (t : ℂ)) 1 σ := Complex.ofRealCLM.hasDerivAt - simpa using h1.add_const ((T : ℂ) * I) - exact (hζ.comp σ hγ).congr_deriv (mul_one _) + HasDerivAt (fun σ : ℝ => χ.LFunction (σ + T * I)) (deriv χ.LFunction (σ + T * I)) σ := + RvM.hasDerivAt_horizontal_of ((DirichletCharacter.differentiable_LFunction hχ1) _) lemma continuous_LFunction_horizontal (hχ1 : χ ≠ 1) : Continuous (fun σ : ℝ => χ.LFunction (σ + T * I)) := @@ -62,15 +58,12 @@ lemma continuous_deriv_LFunction_horizontal (hχ1 : χ ≠ 1) : have hA : AnalyticOnNhd ℂ χ.LFunction univ := LFunction_analyticOnNhd hχ1 exact hA.deriv.continuousOn.comp_continuous hγ (fun _ => mem_univ _) -/-- `σ ↦ ζ'/ζ(σ+iT)` is continuous on `[1/2,2]` when ζ has no zero on that segment. -/ +/-- `σ ↦ L'/L(σ+iT, χ)` is continuous on `[1/2,2]` when `L` has no zero on that segment. -/ lemma continuousOn_logDeriv_horizontal (hχ1 : χ ≠ 1) (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, χ.LFunction (σ + T * I) ≠ 0) : - ContinuousOn (fun σ : ℝ => logDeriv χ.LFunction (σ + T * I)) (Set.Icc (1/2 : ℝ) 2) := by - have h : ContinuousOn (fun σ : ℝ => deriv χ.LFunction (σ + T * I) / χ.LFunction (σ + T * I)) - (Set.Icc (1/2 : ℝ) 2) := - (continuous_deriv_LFunction_horizontal hχ1).continuousOn.div - (continuous_LFunction_horizontal hχ1).continuousOn hnz - exact h.congr (fun σ _ => by rw [logDeriv_apply]) + ContinuousOn (fun σ : ℝ => logDeriv χ.LFunction (σ + T * I)) (Set.Icc (1/2 : ℝ) 2) := + RvM.continuousOn_logDeriv_horizontal_of (continuous_LFunction_horizontal hχ1) + (continuous_deriv_LFunction_horizontal hχ1) hnz lemma intervalIntegrable_logDeriv_horizontal (hχ1 : χ ≠ 1) (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, χ.LFunction (σ + T * I) ≠ 0) @@ -79,191 +72,42 @@ lemma intervalIntegrable_logDeriv_horizontal (hχ1 : χ ≠ 1) ((continuousOn_logDeriv_horizontal hχ1 hnz).mono (Set.uIcc_subset_Icc hu hv)).intervalIntegrable -/-- **Base case.** If `Re ζ(σ+iT) ≠ 0` on `(u,v) ⊆ [1/2,2]` then `|Im ∫_u^v ζ'/ζ(σ+iT) dσ| ≤ 2π`. -/ +/-- **Base case.** If `Re L(σ+iT, χ) ≠ 0` on `(u,v) ⊆ [1/2,2]` then `|Im ∫_u^v L'/L(σ+iT) dσ| ≤ 2π`. -/ lemma im_integral_le_two_pi (hχ1 : χ ≠ 1) (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, χ.LFunction (σ + T * I) ≠ 0) {u v : ℝ} (hu : 1/2 ≤ u) (huv : u < v) (hv : v ≤ 2) (hno : ∀ σ ∈ Set.Ioo u v, (χ.LFunction (σ + T * I)).re ≠ 0) : - |(∫ σ in u..v, logDeriv χ.LFunction (σ + T * I)).im| ≤ 2 * Real.pi := by - set w : ℝ → ℂ := fun σ => χ.LFunction (σ + T * I) with hwdef - have hwc : Continuous w := continuous_LFunction_horizontal hχ1 - have huI : u ∈ Set.Icc (1/2 : ℝ) 2 := ⟨hu, by linarith⟩ - have hvI : v ∈ Set.Icc (1/2 : ℝ) 2 := ⟨by linarith, hv⟩ - have hsub : Set.Icc u v ⊆ Set.Icc (1/2 : ℝ) 2 := Set.Icc_subset_Icc hu hv - -- the sign ε ∈ {±1} of Re w at the midpoint - set m : ℝ := (u + v) / 2 with hmdef - have hm : m ∈ Set.Ioo u v := ⟨by rw [hmdef]; linarith, by rw [hmdef]; linarith⟩ - set ε : ℝ := if 0 < (w m).re then 1 else -1 with hεdef - have hε : ε = 1 ∨ ε = -1 := by by_cases h : 0 < (w m).re <;> simp [hεdef, h] - have hε0 : ε ≠ 0 := by rcases hε with h | h <;> simp [h] - have hεm : 0 < ε * (w m).re := by - by_cases h : 0 < (w m).re - · simp [hεdef, h] - · have h' : (w m).re < 0 := lt_of_le_of_ne (not_lt.mp h) (hno m hm) - simp only [hεdef, if_neg h]; linarith - -- g := ε · Re w is continuous and, by the IVT, positive on all of (u,v) - set g : ℝ → ℝ := fun x => ε * (w x).re with hgdef - have hg : Continuous g := continuous_const.mul (Complex.continuous_re.comp hwc) - have hpos : ∀ σ ∈ Set.Ioo u v, 0 < g σ := by - intro σ hσ - by_contra hneg - have hσne : g σ ≠ 0 := mul_ne_zero hε0 (hno σ hσ) - have hσneg : g σ < 0 := lt_of_le_of_ne (not_lt.mp hneg) hσne - have hIcc : Set.uIcc σ m ⊆ Set.Ioo u v := Set.ordConnected_Ioo.uIcc_subset hσ hm - have h0 : (0 : ℝ) ∈ Set.uIcc (g σ) (g m) := - Set.mem_uIcc.mpr (Or.inl ⟨hσneg.le, hεm.le⟩) - obtain ⟨x, hx, hx0⟩ := intermediate_value_uIcc hg.continuousOn h0 - exact mul_ne_zero hε0 (hno x (hIcc hx)) hx0 - -- by continuity, g ≥ 0 on the closed interval - have hnonneg : ∀ σ ∈ Set.Icc u v, 0 ≤ g σ := by - have hcl : IsClosed {x | 0 ≤ g x} := isClosed_le continuous_const hg - have : Set.Icc u v ⊆ {x | 0 ≤ g x} := by - rw [← closure_Ioo huv.ne] - exact hcl.closure_subset_iff.mpr (fun x hx => (hpos x hx).le) - exact fun σ hσ => this hσ - -- hence ε·w stays in the slit plane on [u,v] - have hslit : ∀ σ ∈ Set.Icc u v, (ε : ℂ) * w σ ∈ Complex.slitPlane := by - intro σ hσ - rw [Complex.mem_slitPlane_iff, Complex.re_ofReal_mul, Complex.im_ofReal_mul] - rcases (hnonneg σ hσ).lt_or_eq with h | h - · exact Or.inl h - · right - intro him - have hre : (w σ).re = 0 := by - rcases mul_eq_zero.mp h.symm with h1 | h1 - · exact absurd h1 hε0 - · exact h1 - have him' : (w σ).im = 0 := by - rcases mul_eq_zero.mp him with h1 | h1 - · exact absurd h1 hε0 - · exact h1 - exact hnz σ (hsub hσ) (Complex.ext hre him') - -- Φ := log(ε·w) is a primitive of ζ'/ζ(σ+iT) on [u,v] - have hderiv : ∀ σ ∈ Set.uIcc u v, HasDerivAt (fun x : ℝ => Complex.log ((ε : ℂ) * w x)) - (logDeriv χ.LFunction (σ + T * I)) σ := by - intro σ hσ - rw [Set.uIcc_of_le huv.le] at hσ - have hwσ : w σ ≠ 0 := hnz σ (hsub hσ) - have hεc : (ε : ℂ) ≠ 0 := by exact_mod_cast hε0 - have h1 := (hasDerivAt_LFunction_horizontal (T := T) hχ1 σ).const_mul (ε : ℂ) - have h2 := (Complex.hasDerivAt_log (hslit σ hσ)).comp σ h1 - have e : ((ε : ℂ) * w σ)⁻¹ * ((ε : ℂ) * deriv χ.LFunction (σ + T * I)) - = logDeriv χ.LFunction (σ + T * I) := by - rw [logDeriv_apply, show χ.LFunction ((σ : ℂ) + T * I) = w σ from rfl] - field_simp - rw [e] at h2 - exact h2 - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hderiv - (intervalIntegrable_logDeriv_horizontal hχ1 hnz huI hvI), - Complex.sub_im, Complex.log_im, Complex.log_im] - calc |((ε : ℂ) * w v).arg - ((ε : ℂ) * w u).arg| - ≤ |((ε : ℂ) * w v).arg| + |((ε : ℂ) * w u).arg| := abs_sub _ _ - _ ≤ Real.pi + Real.pi := add_le_add (Complex.abs_arg_le_pi _) (Complex.abs_arg_le_pi _) - _ = 2 * Real.pi := by ring + |(∫ σ in u..v, logDeriv χ.LFunction (σ + T * I)).im| ≤ 2 * Real.pi := + RvM.im_integral_le_two_pi_of (hasDerivAt_LFunction_horizontal hχ1) + (fun hu hv => intervalIntegrable_logDeriv_horizontal hχ1 hnz hu hv) hnz hu huv hv hno -/-- **Induction.** With `P ⊇` the zeros of `Re ζ(σ+iT)` in `[1/2,2]`: -`|Im ∫_u^v ζ'/ζ(σ+iT) dσ| ≤ 2π (#(P ∩ (u,v)) + 1)` for `1/2 ≤ u < v ≤ 2`. -/ +/-- **Induction.** With `P ⊇` the zeros of `Re L(σ+iT,χ)` in `[1/2,2]`: +`|Im ∫_u^v L'/L(σ+iT) dσ| ≤ 2π (#(P ∩ (u,v)) + 1)` for `1/2 ≤ u < v ≤ 2`. -/ lemma im_integral_logDeriv_le_aux (hχ1 : χ ≠ 1) (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, χ.LFunction (σ + T * I) ≠ 0) (P : Finset ℝ) (hP : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, (χ.LFunction (σ + T * I)).re = 0 → σ ∈ P) : ∀ n : ℕ, ∀ u v : ℝ, 1/2 ≤ u → u < v → v ≤ 2 → (P.filter (fun x => u < x ∧ x < v)).card ≤ n → |(∫ σ in u..v, logDeriv χ.LFunction (σ + T * I)).im| - ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := by - -- the empty-interior case, used twice - have base : ∀ u v : ℝ, 1/2 ≤ u → u < v → v ≤ 2 → - (P.filter (fun x => u < x ∧ x < v)).card = 0 → - |(∫ σ in u..v, logDeriv χ.LFunction (σ + T * I)).im| - ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := by - intro u v hu huv hv hc - have hno : ∀ σ ∈ Set.Ioo u v, (χ.LFunction (σ + T * I)).re ≠ 0 := by - intro σ hσ hre - have hσP : σ ∈ P.filter (fun x => u < x ∧ x < v) := - Finset.mem_filter.mpr ⟨hP σ ⟨by linarith [hσ.1], by linarith [hσ.2]⟩ hre, hσ.1, hσ.2⟩ - rw [Finset.card_eq_zero] at hc - simp [hc] at hσP - rw [hc] - have := im_integral_le_two_pi hχ1 hnz hu huv hv hno - simpa using this - intro n - induction n with - | zero => - intro u v hu huv hv hc - exact base u v hu huv hv (Nat.le_zero.mp hc) - | succ n ih => - intro u v hu huv hv hc - by_cases hc0 : (P.filter (fun x => u < x ∧ x < v)).card = 0 - · exact base u v hu huv hv hc0 - obtain ⟨m, hm⟩ := Finset.card_pos.mp (Nat.pos_of_ne_zero hc0) - obtain ⟨-, hum, hmv⟩ := Finset.mem_filter.mp hm - -- the two halves carry fewer points: c₁ + c₂ + 1 ≤ c - set S := P.filter (fun x => u < x ∧ x < v) with hSdef - set S₁ := P.filter (fun x => u < x ∧ x < m) with hS₁def - set S₂ := P.filter (fun x => m < x ∧ x < v) with hS₂def - have hdisj : Disjoint S₁ S₂ := by - rw [Finset.disjoint_left] - intro x hx1 hx2 - have := (Finset.mem_filter.mp hx1).2.2 - have := (Finset.mem_filter.mp hx2).2.1 - linarith - have hsubS : S₁ ∪ S₂ ⊆ S.erase m := by - intro x hx - rw [Finset.mem_erase] - rcases Finset.mem_union.mp hx with hx | hx - · obtain ⟨hxP, hux, hxm⟩ := Finset.mem_filter.mp hx - exact ⟨hxm.ne, Finset.mem_filter.mpr ⟨hxP, hux, by linarith⟩⟩ - · obtain ⟨hxP, hmx, hxv⟩ := Finset.mem_filter.mp hx - exact ⟨hmx.ne', Finset.mem_filter.mpr ⟨hxP, by linarith, hxv⟩⟩ - have hcard : S₁.card + S₂.card + 1 ≤ S.card := by - have h1 : S₁.card + S₂.card = (S₁ ∪ S₂).card := (Finset.card_union_of_disjoint hdisj).symm - have h2 : (S₁ ∪ S₂).card ≤ (S.erase m).card := Finset.card_le_card hsubS - have h3 : (S.erase m).card = S.card - 1 := Finset.card_erase_of_mem hm - have h4 : 1 ≤ S.card := Finset.card_pos.mpr ⟨m, hm⟩ - omega - have hc1 : S₁.card ≤ n := by omega - have hc2 : S₂.card ≤ n := by omega - have e1 := ih u m hu hum (by linarith) hc1 - have e2 := ih m v (by linarith) hmv hv hc2 - -- split the integral at m - have hmI : m ∈ Set.Icc (1/2 : ℝ) 2 := ⟨by linarith, by linarith⟩ - have huI : u ∈ Set.Icc (1/2 : ℝ) 2 := ⟨hu, by linarith⟩ - have hvI : v ∈ Set.Icc (1/2 : ℝ) 2 := ⟨by linarith, hv⟩ - rw [← intervalIntegral.integral_add_adjacent_intervals - (intervalIntegrable_logDeriv_horizontal hχ1 hnz huI hmI) - (intervalIntegrable_logDeriv_horizontal hχ1 hnz hmI hvI), Complex.add_im] - have hcast : ((S₁.card : ℝ) + 1) + ((S₂.card : ℝ) + 1) ≤ (S.card : ℝ) + 1 := by - have : ((S₁.card + S₂.card + 1 : ℕ) : ℝ) ≤ (S.card : ℝ) := by exact_mod_cast hcard - push_cast at this; linarith - calc |(∫ σ in u..m, logDeriv χ.LFunction (σ + T * I)).im - + (∫ σ in m..v, logDeriv χ.LFunction (σ + T * I)).im| - ≤ |(∫ σ in u..m, logDeriv χ.LFunction (σ + T * I)).im| - + |(∫ σ in m..v, logDeriv χ.LFunction (σ + T * I)).im| := abs_add_le _ _ - _ ≤ 2 * Real.pi * ((S₁.card : ℝ) + 1) + 2 * Real.pi * ((S₂.card : ℝ) + 1) := add_le_add e1 e2 - _ ≤ 2 * Real.pi * ((S.card : ℝ) + 1) := by nlinarith [Real.pi_pos] + ≤ 2 * Real.pi * ((P.filter (fun x => u < x ∧ x < v)).card + 1) := + Analytic.im_integral_logDeriv_le_aux_of + (fun u v hu huv hv hno => by simpa using im_integral_le_two_pi hχ1 hnz hu huv hv hno) + (fun hu hv => intervalIntegrable_logDeriv_horizontal hχ1 hnz hu hv) P hP -/-- **(V) Variation of the argument along `[1/2,2] + iT`:** if `ζ ≠ 0` there and `Re ζ(σ+iT)` has -finitely many zeros, then `|Im ∫_{1/2}^{2} ζ'/ζ(σ+iT) dσ| ≤ 2π (#reZeroSetL χ T + 1)`. -/ +/-- **(V) Variation of the argument along `[1/2,2] + iT`:** if `L ≠ 0` there and `Re L(σ+iT)` has +finitely many zeros, then `|Im ∫_{1/2}^{2} L'/L(σ+iT) dσ| ≤ 2π (#reZeroSetL χ T + 1)`. -/ theorem im_integral_logDeriv_le (hχ1 : χ ≠ 1) (hnz : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, χ.LFunction (σ + T * I) ≠ 0) (hfin : (reZeroSetL χ T).Finite) : |(∫ σ in (1 / 2 : ℝ)..2, logDeriv χ.LFunction (σ + T * I)).im| - ≤ 2 * Real.pi * ((reZeroSetL χ T).ncard + 1) := by - set P := hfin.toFinset with hPdef - have hP : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, (χ.LFunction (σ + T * I)).re = 0 → σ ∈ P := - fun σ hσ h => hfin.mem_toFinset.mpr ⟨hσ, h⟩ - have h := im_integral_logDeriv_le_aux hχ1 hnz P hP P.card (1/2) 2 le_rfl (by norm_num) le_rfl - (Finset.card_filter_le _ _) - have hc : ((P.filter (fun x => (1/2 : ℝ) < x ∧ x < 2)).card : ℝ) ≤ (reZeroSetL χ T).ncard := by - rw [Set.ncard_eq_toFinset_card _ hfin] - exact_mod_cast Finset.card_filter_le _ _ - refine h.trans ?_ - nlinarith [Real.pi_pos] + ≤ 2 * Real.pi * ((reZeroSetL χ T).ncard + 1) := + RvM.im_integral_logDeriv_le_of rfl (im_integral_logDeriv_le_aux hχ1 hnz) hfin end Variation /-! ## Assembly of Backlund's bound from (J) = `reZeroSet_card_le` and (V) -/ -/-- ζ has no zero on `[1/2,2] + iT` when `T` is not the ordinate of a nontrivial zero. -/ +/-- `L(·, χ)` has no zero on `[1/2,2] + iT` when `T` is not the ordinate of a nontrivial zero. -/ lemma LFunction_ne_zero_on_segment (hχ1 : χ ≠ 1) {T : ℝ} (hord : ∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T) : ∀ σ ∈ Set.Icc (1/2 : ℝ) 2, χ.LFunction (σ + T * I) ≠ 0 := by intro σ hσ hz @@ -273,30 +117,9 @@ lemma LFunction_ne_zero_on_segment (hχ1 : χ ≠ 1) {T : ℝ} (hord : ∀ ρ, I · simpa using h · exact DirichletCharacter.LFunction_ne_zero_of_one_le_re χ (Or.inl hχ1) (by simpa using h) hz -/-- **Backlund's bound for L(s,χ) from the zero count (J)**, two-sided in the height. -/ -theorem backlund_horizontalChi_of_count (hχ1 : χ ≠ 1) - (hJ : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ |T| → - (reZeroSetL χ T).Finite ∧ ((reZeroSetL χ T).ncard : ℝ) ≤ C * Real.log |T|) : - ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ |T| → - (∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T) → - |(∫ σ in (1 / 2 : ℝ)..2, logDeriv χ.LFunction (σ + T * I)).im| ≤ C * Real.log |T| := by - obtain ⟨C, T₀, hJ⟩ := hJ - refine ⟨2 * Real.pi * (C + 1), max T₀ 3, fun T hT hord => ?_⟩ - have hT₀ : T₀ ≤ |T| := (le_max_left _ _).trans hT - have hT3 : (3 : ℝ) ≤ |T| := (le_max_right _ _).trans hT - obtain ⟨hfin, hcount⟩ := hJ T hT₀ - have hlog : 1 ≤ Real.log |T| := by - rw [← Real.log_exp 1] - exact Real.log_le_log (Real.exp_pos 1) (by linarith [Real.exp_one_lt_d9.trans (by norm_num : (2.7182818286 : ℝ) < 3)]) - have h := im_integral_logDeriv_le hχ1 (LFunction_ne_zero_on_segment hχ1 hord) hfin - refine h.trans ?_ - have hπ := Real.pi_pos - nlinarith [hcount, hlog, mul_nonneg hπ.le (sub_nonneg.mpr hlog)] - - /-! ## The vertical side σ = 2 -/ -/-- `Re ζ(2+it) > 0` (indeed `≥ 2 − π²/6`), from `‖ζ(s) − 1‖ ≤ π²/6 − 1 < 1` on `Re s ≥ 2`. -/ +/-- `Re L(2+it, χ) > 0` (indeed `≥ 2 − π²/6`), from `‖L(s, χ) − 1‖ ≤ π²/6 − 1 < 1` on `Re s ≥ 2`. -/ lemma re_LFunction_two_pos (t : ℝ) : 0 < (χ.LFunction (2 + t * I)).re := by have h := norm_LFunction_sub_one_le (χ := χ) (s := 2 + t * I) (by simp) have h2 : |(χ.LFunction (2 + t * I) - 1).re| ≤ ‖χ.LFunction (2 + t * I) - 1‖ := @@ -305,59 +128,27 @@ lemma re_LFunction_two_pos (t : ℝ) : 0 < (χ.LFunction (2 + t * I)).re := by have h3 := (abs_le.mp (h2.trans h)).1 linarith [Zeta23.RvM.pi_sq_div_six_sub_one_lt_one] -/-- `t ↦ log ζ(2+it)` is a primitive of `t ↦ ζ'/ζ(2+it)·i`. -/ +/-- `t ↦ log L(2+it, χ)` is a primitive of `t ↦ L'/L(2+it, χ)·i`. -/ lemma hasDerivAt_log_LFunction_two (hχ1 : χ ≠ 1) (t : ℝ) : HasDerivAt (fun t : ℝ => Complex.log (χ.LFunction (2 + t * I))) - (logDeriv χ.LFunction (2 + t * I) * I) t := by - have hζ : HasDerivAt χ.LFunction (deriv χ.LFunction (2 + t * I)) (2 + t * I) := - ((DirichletCharacter.differentiable_LFunction hχ1) _).hasDerivAt - have hγ : HasDerivAt (fun t : ℝ => (2 : ℂ) + t * I) I t := by - have h1 : HasDerivAt (fun t : ℝ => (t : ℂ)) 1 t := Complex.ofRealCLM.hasDerivAt - simpa using (h1.mul_const I).const_add (2 : ℂ) - have hcomp : HasDerivAt (fun t : ℝ => χ.LFunction (2 + t * I)) (deriv χ.LFunction (2 + t * I) * I) t := - hζ.comp t hγ - have hlog : HasDerivAt Complex.log (χ.LFunction (2 + t * I))⁻¹ (χ.LFunction (2 + t * I)) := - Complex.hasDerivAt_log (Or.inl (re_LFunction_two_pos t)) - have h := hlog.comp t hcomp - have e : (χ.LFunction (2 + t * I))⁻¹ * (deriv χ.LFunction (2 + t * I) * I) - = logDeriv χ.LFunction (2 + t * I) * I := by - rw [logDeriv_apply]; ring - rw [e] at h - exact h + (logDeriv χ.LFunction (2 + t * I) * I) t := + RvM.hasDerivAt_log_two_of ((DirichletCharacter.differentiable_LFunction hχ1) _) + (re_LFunction_two_pos t) -/-- Continuity of `t ↦ ζ'/ζ(2+it)·i`. -/ +/-- Continuity of `t ↦ L'/L(2+it, χ)·i`. -/ lemma continuous_logDeriv_LFunction_two (hχ1 : χ ≠ 1) : - Continuous (fun t : ℝ => logDeriv χ.LFunction (2 + t * I) * I) := by - have hγ : Continuous (fun t : ℝ => (2 : ℂ) + t * I) := by fun_prop - have hA : AnalyticOnNhd ℂ χ.LFunction univ := LFunction_analyticOnNhd hχ1 - have hd : Continuous (fun t : ℝ => deriv χ.LFunction (2 + t * I)) := - hA.deriv.continuousOn.comp_continuous hγ (fun _ => mem_univ _) - have hz : Continuous (fun t : ℝ => χ.LFunction (2 + t * I)) := - hA.continuousOn.comp_continuous hγ (fun _ => mem_univ _) - have hne : ∀ t : ℝ, χ.LFunction (2 + t * I) ≠ 0 := fun t h => by - have := re_LFunction_two_pos (χ := χ) t; rw [h] at this; simp at this - simp only [logDeriv_apply] - exact ((hd.div hz hne).mul continuous_const) + Continuous (fun t : ℝ => logDeriv χ.LFunction (2 + t * I) * I) := + RvM.continuous_logDeriv_two_of (LFunction_analyticOnNhd hχ1) (fun _ => mem_univ _) + (re_LFunction_two_pos (χ := χ)) -/-- **Vertical side σ = 2**. `|Im (∫_{T₁}^{T₂} ζ'/ζ(2+it)·i dt)| ≤ π` for all `T₁, T₂`: -`log ζ(2+it)` is a primitive, and `|arg ζ(2+it)| ≤ π/2` since `Re ζ(2+it) > 0`. +/-- **Vertical side σ = 2**. `|Im (∫_{T₁}^{T₂} L'/L(2+it, χ)·i dt)| ≤ π` for all `T₁, T₂`: +`log L(2+it, χ)` is a primitive, and `|arg L(2+it, χ)| ≤ π/2` since `Re L(2+it, χ) > 0`. (Only an absolute constant is needed downstream; the sharper bound `2 log 3` also holds — |arg| ≤ arcsin(π²/6−1) — but is not worth the trigonometry.) -/ theorem vertical_twoChi (hχ1 : χ ≠ 1) : ∀ T₁ T₂ : ℝ, - |(∫ t in T₁..T₂, logDeriv χ.LFunction (2 + t * I) * I).im| ≤ Real.pi := by - intro T₁ T₂ - rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hasDerivAt_log_LFunction_two hχ1 t) - ((continuous_logDeriv_LFunction_two hχ1).intervalIntegrable _ _)] - rw [Complex.sub_im, Complex.log_im, Complex.log_im] - have h1 : |(χ.LFunction (2 + T₂ * I)).arg| ≤ π / 2 := - Complex.abs_arg_le_pi_div_two_iff.mpr (re_LFunction_two_pos T₂).le - have h2 : |(χ.LFunction (2 + T₁ * I)).arg| ≤ π / 2 := - Complex.abs_arg_le_pi_div_two_iff.mpr (re_LFunction_two_pos T₁).le - calc |(χ.LFunction (2 + T₂ * I)).arg - (χ.LFunction (2 + T₁ * I)).arg| - ≤ |(χ.LFunction (2 + T₂ * I)).arg| + |(χ.LFunction (2 + T₁ * I)).arg| := abs_sub _ _ - _ ≤ π / 2 + π / 2 := add_le_add h1 h2 - _ = π := by ring - + |(∫ t in T₁..T₂, logDeriv χ.LFunction (2 + t * I) * I).im| ≤ Real.pi := + RvM.vertical_two_of (re_LFunction_two_pos (χ := χ)) (hasDerivAt_log_LFunction_two hχ1) + (continuous_logDeriv_LFunction_two hχ1) end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/ChebCoprime.lean b/zeta23/Zeta23/ThmE/ChebCoprime.lean index 242ddd0dc8..b14a6b37f8 100644 --- a/zeta23/Zeta23/ThmE/ChebCoprime.lean +++ b/zeta23/Zeta23/ThmE/ChebCoprime.lean @@ -289,128 +289,5 @@ theorem chebyshevMertensCoprime (q : ℕ) (hq : 1 ≤ q) : ChebyshevMertensCopri linarith _ ≤ (Cb + 2 * Real.log q ^ 2) * Real.log x ^ 2 := by nlinarith -/-- **Uniform coprime Chebyshev–Mertens**: one absolute `A` with -`ChebyshevMertensCoprimeBounded q (A·(1 + log q)²)` for every `q ≥ 1` (the uniform-in-`q` -`chebq_uniform` input; constant = ζ-constants + the (log q)² prime-power loss). -/ -theorem chebyshevMertensCoprimeBounded : - ∃ A : ℝ, 0 ≤ A ∧ ∀ q : ℕ, 1 ≤ q → - ChebyshevMertensCoprimeBounded q (A * (1 + Real.log q) ^ 2) := by - obtain ⟨Ca, hCa⟩ := Zeta23.Cheb.chebyshevMertens.cheb2a - obtain ⟨Cb, hCb⟩ := Zeta23.Cheb.chebyshevMertens.cheb2b - refine ⟨|Ca| + |Cb| + 2, by positivity, fun q hq => ?_⟩ - have hq1 : (1:ℝ) ≤ (q:ℝ) := by exact_mod_cast hq - have hlq : (0:ℝ) ≤ Real.log q := Real.log_nonneg hq1 - have hA1 : (1:ℝ) ≤ (1 + Real.log q) ^ 2 := by nlinarith - have hq2 : Real.log q ^ 2 ≤ (1 + Real.log q) ^ 2 := by nlinarith - constructor - · intro x hx - have hlogx : Real.log 2 ≤ Real.log x := Real.log_le_log two_pos hx - have hlog2 : (0.6931471803:ℝ) < Real.log 2 := Real.log_two_gt_d9 - have hsplit := Finset.sum_filter_add_sum_filter_not (Finset.Ioc 0 ⌊x⌋₊) - (fun n => Nat.Coprime n q) (fun n => (Λ n : ℝ) ^ 2 / n) - have hrem : ∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => ¬ Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n ≤ Real.log q ^ 2 := by - have h0 := removed_le q hq x (fun _ => 1) 1 (fun n _ => ⟨zero_le_one, le_rfl⟩) zero_le_one - simpa using h0 - have hrem0 : (0:ℝ) ≤ ∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => ¬ Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n := by - apply Finset.sum_nonneg - intro n _ - have h0 := ArithmeticFunction.vonMangoldt_nonneg (n := n) - positivity - have hall := hCa x hx - calc |∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => Nat.Coprime n q), (Λ n : ℝ) ^ 2 / n - - Real.log x ^ 2 / 2| - = |(∑ n ∈ Finset.Ioc 0 ⌊x⌋₊, (Λ n : ℝ) ^ 2 / n - Real.log x ^ 2 / 2) - - ∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => ¬ Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n| := by - rw [← hsplit] - congr 1 - ring - _ ≤ |∑ n ∈ Finset.Ioc 0 ⌊x⌋₊, (Λ n : ℝ) ^ 2 / n - Real.log x ^ 2 / 2| - + |∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => ¬ Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n| := abs_sub _ _ - _ ≤ Ca * Real.log x + Real.log q ^ 2 := by - rw [abs_of_nonneg hrem0] - linarith - _ ≤ (|Ca| + |Cb| + 2) * (1 + Real.log q) ^ 2 * Real.log x := by - have e1 : Ca * Real.log x ≤ |Ca| * ((1 + Real.log q) ^ 2 * Real.log x) := by - have h2 : Ca ≤ |Ca| := le_abs_self _ - have h3 : (0:ℝ) ≤ Real.log x := by linarith - calc Ca * Real.log x ≤ |Ca| * Real.log x := mul_le_mul_of_nonneg_right h2 h3 - _ = |Ca| * Real.log x * 1 := (mul_one _).symm - _ ≤ |Ca| * Real.log x * (1 + Real.log q) ^ 2 := - mul_le_mul_of_nonneg_left hA1 (mul_nonneg (abs_nonneg Ca) h3) - _ = |Ca| * ((1 + Real.log q) ^ 2 * Real.log x) := by ring - have e2 : Real.log q ^ 2 ≤ 2 * ((1 + Real.log q) ^ 2 * Real.log x) := by - have h3 : (1:ℝ)/2 ≤ Real.log x := by linarith - nlinarith - have e3 : (0:ℝ) ≤ |Cb| * ((1 + Real.log q) ^ 2 * Real.log x) := by - have h3 : (0:ℝ) ≤ Real.log x := by linarith - positivity - nlinarith - · intro x hx - have hx1 : (1:ℝ) ≤ x := by linarith - have hlogx : Real.log 2 ≤ Real.log x := Real.log_le_log two_pos hx - have hlogx0 : (0:ℝ) ≤ Real.log x := Real.log_nonneg hx1 - have hlog2 : (0.6931471803:ℝ) < Real.log 2 := Real.log_two_gt_d9 - have hsplit := Finset.sum_filter_add_sum_filter_not (Finset.Ioc 0 ⌊x⌋₊) - (fun n => Nat.Coprime n q) (fun n => (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n)) - have hwbd : ∀ n ∈ Finset.Ioc 0 ⌊x⌋₊, - 0 ≤ Real.log x - Real.log n ∧ Real.log x - Real.log n ≤ Real.log x := by - intro n hn - obtain ⟨hn0, hnx⟩ := Finset.mem_Ioc.1 hn - have hn1 : (1:ℝ) ≤ (n:ℝ) := by exact_mod_cast hn0 - have hnn : (n:ℝ) ≤ x := le_trans (by exact_mod_cast hnx) (Nat.floor_le (by linarith)) - constructor - · have h0 := Real.log_le_log (by linarith : (0:ℝ) < (n:ℝ)) hnn - linarith - · have h0 := Real.log_nonneg hn1 - linarith - have hrem := removed_le q hq x (fun n => Real.log x - Real.log n) (Real.log x) hwbd hlogx0 - have hrem0 : (0:ℝ) ≤ ∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => ¬ Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n) := by - apply Finset.sum_nonneg - intro n hn - have hmem := (Finset.mem_filter.1 hn).1 - have hw := (hwbd n hmem).1 - have h0 := ArithmeticFunction.vonMangoldt_nonneg (n := n) - positivity - have hall := hCb x hx - calc |∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n) - Real.log x ^ 3 / 6| - = |(∑ n ∈ Finset.Ioc 0 ⌊x⌋₊, (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n) - - Real.log x ^ 3 / 6) - - ∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => ¬ Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n)| := by - rw [← hsplit] - congr 1 - ring - _ ≤ |∑ n ∈ Finset.Ioc 0 ⌊x⌋₊, (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n) - - Real.log x ^ 3 / 6| - + |∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => ¬ Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * (Real.log x - Real.log n)| := abs_sub _ _ - _ ≤ Cb * Real.log x ^ 2 + Real.log x * Real.log q ^ 2 := by - rw [abs_of_nonneg hrem0] - linarith - _ ≤ (|Ca| + |Cb| + 2) * (1 + Real.log q) ^ 2 * Real.log x ^ 2 := by - have h3 : (1:ℝ)/2 ≤ Real.log x := by linarith - have e1 : Cb * Real.log x ^ 2 ≤ |Cb| * ((1 + Real.log q) ^ 2 * Real.log x ^ 2) := by - calc Cb * Real.log x ^ 2 ≤ |Cb| * Real.log x ^ 2 := - mul_le_mul_of_nonneg_right (le_abs_self _) (sq_nonneg _) - _ = |Cb| * Real.log x ^ 2 * 1 := (mul_one _).symm - _ ≤ |Cb| * Real.log x ^ 2 * (1 + Real.log q) ^ 2 := - mul_le_mul_of_nonneg_left hA1 (mul_nonneg (abs_nonneg Cb) (sq_nonneg _)) - _ = |Cb| * ((1 + Real.log q) ^ 2 * Real.log x ^ 2) := by ring - have e2 : Real.log x * Real.log q ^ 2 ≤ 2 * ((1 + Real.log q) ^ 2 * Real.log x ^ 2) := by - nlinarith [sq_nonneg (Real.log x)] - have e3 : (0:ℝ) ≤ |Ca| * ((1 + Real.log q) ^ 2 * Real.log x ^ 2) := by positivity - nlinarith - -/-- the plain (per-q) version, re-derived from the uniform one. -/ -theorem chebyshevMertensCoprime' (q : ℕ) (hq : 1 ≤ q) : ChebyshevMertensCoprime q := by - obtain ⟨A, hA0, hA⟩ := chebyshevMertensCoprimeBounded - exact (hA q hq).toChebyshevMertensCoprime - end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/ContourChi.lean b/zeta23/Zeta23/ThmE/ContourChi.lean index 174a65a6e6..61f95a8433 100644 --- a/zeta23/Zeta23/ThmE/ContourChi.lean +++ b/zeta23/Zeta23/ThmE/ContourChi.lean @@ -4,16 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/ThmE/ContourChi.lean — Rectangle identity for H·(completed L)'/(completed L) -(primitive χ mod q > 1): no pole terms (the completed L-function is entire), via the pole-free -weighted argument principle Zeta23.Analytic.rectangleIntegral'_mul_logDeriv. -Runs with f := completedLSym χ = q^{s/2}·completedLFunction χ (symmetrized form: -same zeros; cleanest functional equation completedLSym_one_sub). +Zeta23/ThmE/ContourChi.lean — Rectangle identity for H·Λ_sym'/Λ_sym(·,χ) +(primitive χ mod q > 1): instantiation of `Zeta23.WeilEF.rectangle_identity_entire`. -/ import Zeta23.ThmE.VerticalLineChi import Zeta23.ThmE.CountByIntegralChi -import Zeta23.ThmE.SeamL -import Zeta23.Analytic.RectangleLogDeriv +import Zeta23.WeilEF.GenericEF noncomputable section @@ -29,12 +25,11 @@ open Zeta23.WeilEF variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} -set_option maxHeartbeats 800000 in /-- **Rectangle identity for L(s,χ)** at a zero-free height R (no pole terms): -(1/2πi)∮_{[1−c,c]×[−R,R]} H·Λ'/Λ(·,χ) = Σ_{|γ| Hfn k s * logDeriv (completedLSym χ) s) ((1 - c : ℝ) - R * I) ((c : ℝ) + R * I) = ∑ ρ ∈ Z, (zeroMultL χ ρ : ℂ) * Hfn k ρ := by - classical have hχ1 : χ ≠ 1 := ne_one_of_primitive hq hprim - set z : ℂ := (1 - c : ℝ) - R * I with hzdef - set w : ℂ := (c : ℝ) + R * I with hwdef - have hzre : z.re = 1 - c := by simp [hzdef] - have hzim : z.im = -R := by simp [hzdef] - have hwre : w.re = c := by simp [hwdef] - have hwim : w.im = R := by simp [hwdef] - have hre : z.re ≤ w.re := by rw [hzre, hwre]; linarith - have him : z.im ≤ w.im := by rw [hzim, hwim]; linarith - have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ - (1 - c ≤ s.re ∧ s.re ≤ c) ∧ (-R ≤ s.im ∧ s.im ≤ R) := by - intro s - simp only [Rectangle, Complex.mem_reProdIm, hzre, hzim, hwre, hwim, - Set.uIcc_of_le (show (1 - c : ℝ) ≤ c by linarith), - Set.uIcc_of_le (show (-R : ℝ) ≤ R by linarith), Set.mem_Icc] - have hfin := LSeam_finite_window (χ := χ) hq hprim (-R) R - set Z : Finset ℂ := hfin.toFinset with hZdef - have hZmemiff : ∀ ρ : ℂ, ρ ∈ Z ↔ (IsNontrivialZeroL χ ρ ∧ -R < ρ.im ∧ ρ.im ≤ R) := by - intro ρ - rw [hZdef, Set.Finite.mem_toFinset] - constructor - · rintro ⟨h1, h2⟩ - exact ⟨h1, h2⟩ - · rintro ⟨h1, h2⟩ - exact ⟨h1, h2⟩ - have hZcoe : (Z : Set ℂ) = {ρ : ℂ | IsNontrivialZeroL χ ρ ∧ -R < ρ.im ∧ ρ.im < R} := by - ext ρ - rw [Finset.mem_coe, hZmemiff] - simp only [Set.mem_setOf_eq] - constructor - · rintro ⟨h1, h2, h3⟩ - refine ⟨h1, h2, lt_of_le_of_ne h3 ?_⟩ - intro h - refine hgood ρ (Or.inl h) (by linarith [h1.2.1]) (by linarith [h1.2.2]) ?_ - exact (completedLFunction_eq_zero_iff_of_re_pos hq h1.2.1).mpr h1.1 - · rintro ⟨h1, h2, h3⟩ - exact ⟨h1, h2, h3.le⟩ - refine ⟨Z, hZcoe, ?_⟩ - have hf : AnalyticOnNhd ℂ (completedLSym χ) (Rectangle z w) := fun s _ => - (differentiable_completedLSym hχ1).analyticAt s - have hg : AnalyticOnNhd ℂ (Hfn k) (Rectangle z w) := by - intro s _ - have hdiff : Differentiable ℂ (Hfn k) := by - unfold Hfn - exact (differentiable_paperFT hk.continuous hkc).comp - ((differentiable_id.sub_const _).div_const _) - exact hdiff.analyticAt s - have hborder : ∀ s ∈ RectangleBorder z w, completedLSym χ s ≠ 0 := by - intro s hs h0 - rw [completedLSym_eq_zero_iff'] at h0 - have hsrect := rectangleBorder_subset_rectangle z w hs - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsrect - simp only [RectangleBorder, Set.mem_union, Complex.mem_reProdIm, Set.mem_singleton_iff, - hzre, hzim, hwre, hwim] at hs - rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ - · exact hgood s (Or.inr h') hr1 hr2 h0 - · exact completedLFunction_ne_zero_of_re_nonpos hq hprim (by rw [h']; linarith) h0 - · exact hgood s (Or.inl h') hr1 hr2 h0 - · exact completedLFunction_ne_zero_of_one_le_re hq hχ1 (by rw [h']; linarith) h0 - have hZchar : ∀ s ∈ Rectangle z w, (completedLSym χ s = 0 ↔ s ∈ Z) := by - intro s hsrect - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsrect - rw [completedLSym_eq_zero_iff', hZmemiff] - constructor - · intro h0 - have hrepos : 0 < s.re := by - by_contra hle - exact completedLFunction_ne_zero_of_re_nonpos hq hprim (by linarith) h0 - have hrelt : s.re < 1 := by - by_contra hge - exact completedLFunction_ne_zero_of_one_le_re hq hχ1 (by linarith) h0 - have hnz : IsNontrivialZeroL χ s := - ⟨(completedLFunction_eq_zero_iff_of_re_pos hq hrepos).mp h0, hrepos, hrelt⟩ - refine ⟨hnz, ?_, hi2⟩ - rcases lt_or_eq_of_le hi1 with h | h - · exact h - · exact absurd h0 (hgood s (Or.inr h.symm) hr1 hr2) - · rintro ⟨h1, _, _⟩ - exact (completedLFunction_eq_zero_iff_of_re_pos hq h1.2.1).mpr h1.1 - have hZsub : (Z : Set ℂ) ⊆ Rectangle z w := by - intro ρ hρ - rw [Finset.mem_coe, hZmemiff] at hρ - obtain ⟨h1, h2, h3⟩ := hρ - exact (hmem ρ).mpr ⟨⟨by linarith [h1.2.1], by linarith [h1.2.2]⟩, h2.le, h3⟩ - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv hre him hf hg hborder - Z hZchar hZsub - rw [key] - refine Finset.sum_congr rfl fun ρ hρ => ?_ - have h1 := ((hZmemiff ρ).mp hρ).1 - congr 2 - -- analyticOrderNatAt (completedLSym χ) ρ = zeroMultL χ ρ + obtain ⟨Z, hZcoe, hrect⟩ := rectangle_identity_entire + (differentiable_completedLSym hχ1) (differentiable_Hfn hk hkc) (by linarith) (by linarith) + (Zset := {ρ : ℂ | IsNontrivialZeroL χ ρ}) (fun s => completedLSym_eq_zero_iff hq hprim) + (fun ρ hρ => ⟨by linarith [hρ.2.1], by linarith [hρ.2.2]⟩) + (fun s him h1 h2 h0 => hgood s him h1 h2 ((completedLSym_eq_zero_iff' s).mp h0)) + refine ⟨Z, hZcoe, hrect.trans (Finset.sum_congr rfl fun ρ hρ => ?_)⟩ + have h1 : IsNontrivialZeroL χ ρ := (by rw [← Finset.mem_coe, hZcoe] at hρ; exact hρ.1) rw [analyticOrderNatAt_completedLSym hq hχ1 h1.2.1] + +end ThmE +end Zeta23 diff --git a/zeta23/Zeta23/ThmE/CountByIntegralChi.lean b/zeta23/Zeta23/ThmE/CountByIntegralChi.lean index 924cc5c863..cbbd62292d 100644 --- a/zeta23/Zeta23/ThmE/CountByIntegralChi.lean +++ b/zeta23/Zeta23/ThmE/CountByIntegralChi.lean @@ -42,15 +42,6 @@ lemma qpow_ne_zero (s : ℂ) : (q : ℂ) ^ (s / 2) ≠ 0 := by lemma differentiable_qpow : Differentiable ℂ (fun s : ℂ => (q : ℂ) ^ (s / 2)) := fun _ => ((differentiableAt_id.div_const 2).const_cpow (Or.inl natCast_q_ne_zero)) -lemma hasDerivAt_qpow (s : ℂ) : - HasDerivAt (fun s : ℂ => (q : ℂ) ^ (s / 2)) ((q : ℂ) ^ (s / 2) * Complex.log q * (1 / 2)) s := by - have h := ((hasDerivAt_id s).div_const 2).const_cpow (c := (q : ℂ)) (Or.inl natCast_q_ne_zero) - simpa using h - -lemma logDeriv_qpow (s : ℂ) : logDeriv (fun s : ℂ => (q : ℂ) ^ (s / 2)) s = Real.log q / 2 := by - rw [logDeriv_apply, (hasDerivAt_qpow s).deriv, Complex.natCast_log] - field_simp [qpow_ne_zero s] - lemma differentiable_completedLSym (hχ1 : χ ≠ 1) : Differentiable ℂ (completedLSym χ) := differentiable_qpow.mul (differentiable_completedLFunction hχ1) @@ -59,12 +50,6 @@ lemma completedLSym_eq_zero_iff' (s : ℂ) : completedLSym χ s = 0 ↔ complete rw [mul_eq_zero] simp only [qpow_ne_zero s, false_or] -lemma logDeriv_completedLSym (hχ1 : χ ≠ 1) {s : ℂ} (hΛ : completedLFunction χ s ≠ 0) : - logDeriv (completedLSym χ) s = Real.log q / 2 + logDeriv (completedLFunction χ) s := by - unfold completedLSym - rw [logDeriv_mul (f := fun s : ℂ => (q : ℂ) ^ (s / 2)) (g := completedLFunction χ) s - (qpow_ne_zero s) hΛ (differentiable_qpow s) (differentiable_completedLFunction hχ1 s), logDeriv_qpow] - /-- **Functional equation for Λ_sym**: Λ_sym(1−w,χ) = W(χ)·Λ_sym(w,χ⁻¹). -/ lemma completedLSym_one_sub (hprim : χ.IsPrimitive) (w : ℂ) : completedLSym χ (1 - w) = rootNumber χ * completedLSym χ⁻¹ w := by @@ -146,7 +131,6 @@ lemma analyticOrderNatAt_completedLSym (hq : 1 < q) (hχ1 : χ ≠ 1) {ρ : ℂ} rw [hmul, analyticOrderAt_mul hqan hΛan, hqan.analyticOrderAt_eq_zero.mpr (qpow_ne_zero ρ), zero_add] - /-- **Bridge for the Γ-side (GammaSideChi).** On Re s > 0 with L(s,χ) ≠ 0: logDeriv Λ_sym(s,χ) = logDeriv L(s,χ) + logDeriv (z ↦ q^{z/2}·γ_χ(z)) (s). -/ lemma logDeriv_completedLSym_split (hq : 1 < q) (hχ1 : χ ≠ 1) {s : ℂ} (hre : 0 < s.re) @@ -177,64 +161,14 @@ theorem rectangleIntegral'_logDeriv_completedLSym_eq_NcountL (hq : 1 < q) (hprim (hgood₂ : ∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T₂) : RectangleIntegral' (logDeriv (completedLSym χ)) (-1 + T₁ * I) (2 + T₂ * I) = (NcountL χ T₁ T₂ : ℂ) := by - classical have hχ1 := ne_one_of_primitive hq hprim - set z : ℂ := -1 + T₁ * I with hzdef - set w : ℂ := 2 + T₂ * I with hwdef - have hzre : z.re = -1 := by simp [z] - have hzim : z.im = T₁ := by simp [z] - have hwre : w.re = 2 := by simp [w] - have hwim : w.im = T₂ := by simp [w] - have hre : z.re ≤ w.re := by rw [hzre, hwre]; norm_num - have him : z.im ≤ w.im := by rw [hzim, hwim]; exact hT - have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ - (-1 ≤ s.re ∧ s.re ≤ 2) ∧ (T₁ ≤ s.im ∧ s.im ≤ T₂) := by - intro s - simp only [Rectangle, mem_reProdIm, hzre, hzim, hwre, hwim, - uIcc_of_le (show (-1 : ℝ) ≤ 2 by norm_num), uIcc_of_le hT, mem_Icc] - have hf : AnalyticOnNhd ℂ (completedLSym χ) (Rectangle z w) := fun s _ => - (differentiable_completedLSym hχ1).analyticAt s - have hg : AnalyticOnNhd ℂ (fun _ : ℂ => (1 : ℂ)) (Rectangle z w) := fun _ _ => analyticAt_const - have hfin := (LSeam_of hq hprim).finite_window T₁ T₂ - have hZ : ∀ s ∈ Rectangle z w, completedLSym χ s = 0 ↔ s ∈ hfin.toFinset := by - intro s hs - rw [Set.Finite.mem_toFinset] - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hs - rw [completedLSym_eq_zero_iff hq hprim] - constructor - · intro hnz - exact ⟨hnz, lt_of_le_of_ne hi1 (fun h' => hgood₁ s hnz h'.symm), hi2⟩ - · rintro ⟨hnz, _⟩ - exact hnz - have hZsub : ((hfin.toFinset : Finset ℂ) : Set ℂ) ⊆ Rectangle z w := by - intro s hs - rw [Finset.mem_coe, Set.Finite.mem_toFinset] at hs - obtain ⟨⟨_, h1, h2⟩, hi1, hi2⟩ := hs - exact (hmem s).mpr ⟨⟨by linarith, by linarith⟩, hi1.le, hi2⟩ - have hborder : ∀ s ∈ RectangleBorder z w, completedLSym χ s ≠ 0 := by - intro s hs h0 - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp (rectangleBorder_subset_rectangle z w hs) - have hnz := (completedLSym_eq_zero_iff hq hprim).mp h0 - simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, hzre, hzim, hwre, - hwim] at hs - rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ - · exact hgood₁ s hnz h' - · linarith [hnz.2.1] - · exact hgood₂ s hnz h' - · linarith [hnz.2.2] - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv hre him hf hg hborder - hfin.toFinset hZ hZsub - simp only [one_mul, mul_one] at key - rw [show (fun s => logDeriv (completedLSym χ) s) = logDeriv (completedLSym χ) from rfl] at key - rw [key] - unfold NcountL have hset : zerosInL χ T₁ T₂ = {ρ | IsNontrivialZeroL χ ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂} := by ext ρ; simp [zerosInL] - rw [hset, finsum_mem_eq_finite_toFinset_sum _ hfin, Nat.cast_sum] - refine Finset.sum_congr rfl (fun ρ hρ => ?_) - rw [Set.Finite.mem_toFinset] at hρ - obtain ⟨⟨_, h1, _⟩, _⟩ := hρ - rw [analyticOrderNatAt_completedLSym hq hχ1 h1] + rw [NcountL, hset] + exact Zeta23.Analytic.rectangleIntegral'_logDeriv_strip_eq_finsum hT + (fun s _ => (differentiable_completedLSym hχ1).analyticAt s) + ((LSeam_of hq hprim).finite_window T₁ T₂) (fun _ => completedLSym_eq_zero_iff hq hprim) + (fun _ h => h.2) hgood₁ hgood₂ (fun ρ h => analyticOrderNatAt_completedLSym hq hχ1 h.2.1) end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/CrossMuPChi.lean b/zeta23/Zeta23/ThmE/CrossMuPChi.lean index 72aadaadc7..0f8ef8ecfc 100644 --- a/zeta23/Zeta23/ThmE/CrossMuPChi.lean +++ b/zeta23/Zeta23/ThmE/CrossMuPChi.lean @@ -4,19 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/ThmE/CrossMuPChi.lean — [prop:cross] (i) for L(s,χ): `𝓜[μ_χ, P_{X,χ}] ≪_q l√X` -(statement in Zeta23/ThmE/PrimeSideChi.lean, which re-exports this proof). - -Route = the ζ-proof of Zeta23/PrimeSideA/CrossMuP.lean (double IBP, no differentiation under the -integral), with two changes: the density μ_χ's bounds come from the H-Γ(χ) package -(`GammaFactsChi`: stirling for |μ_χ| ≤ C_q·l on I, deriv_bound for |μ_χ′| ≤ C/T), and the prime -sum has complex unimodular-or-smaller coefficients: `Re(c_n·n^{−iτ}) = ‖c_n‖·cos(τ·log n − arg c_n)`, -handled by the PHASE-SHIFTED oscillatory bound `abs_Mform_cos_phase_le` (CrossMuPCore) — the bounds -enter only through `‖c_n‖ ≤ 1`, exactly per [thm:E] proof (iii). +Zeta23/ThmE/CrossMuPChi.lean — [prop:cross] (i) for L(s,χ): `𝓜[μ_χ, P_{X,χ}] ≪_q l √X`, +instantiated from `PrimeSide.abs_Mform_u_PcDir_eventually`. -/ -import Zeta23.PrimeSideA.Basic import Zeta23.PrimeSideA.CrossMuPCore -import Zeta23.ThmE.Hypotheses import Zeta23.ThmE.PrimeSideChi noncomputable section @@ -29,50 +20,7 @@ namespace ThmE open Zeta23.PrimeSide -/-! ## The Mform finite-sum split and the oscillatory bound -/ - -open Zeta23.PrimeSide in -/-- `𝓜[u, P_{X,c}]` as the finite phase-split sum (mirror of the ζ `Mform_mu_PX_eq`). -/ -lemma Mform_mu_PXc_eq {Φ : ℝ → ℝ} (hΦ : Continuous Φ) {u : ℝ → ℝ} (hu : Continuous u) - (c : ℕ → ℂ) (X T : ℝ) : - Mform Φ T u (PXc c X) - = ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, (-(1 / Real.pi) * ((Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)))) - * ((c n).re * Mform Φ T u (fun t => Real.cos (t * Real.log n)) - + (c n).im * Mform Φ T u (fun t => Real.sin (t * Real.log n))) := by - unfold Mform - have h1 : (fun q : ℝ × ℝ => Φ (q.1 - q.2) ^ 2 * u q.1 * PXc c X q.2) - = fun q => ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, (-(1 / Real.pi) * ((Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)))) - * ((c n).re * (Φ (q.1 - q.2) ^ 2 * u q.1 * Real.cos (q.2 * Real.log n)) - + (c n).im * (Φ (q.1 - q.2) ^ 2 * u q.1 * Real.sin (q.2 * Real.log n))) := by - funext q - rw [PXc_eq_sum_cos_sin, Finset.mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - ring - rw [h1, integral_finsetSum] - · refine Finset.sum_congr rfl fun n _ => ?_ - rw [integral_const_mul] - congr 1 - have i1 := (Mform_integrableOn' (T := T) hΦ hu - (show Continuous fun t : ℝ => Real.cos (t * Real.log n) by fun_prop)).const_mul ((c n).re) - have i2 := (Mform_integrableOn' (T := T) hΦ hu - (show Continuous fun t : ℝ => Real.sin (t * Real.log n) by fun_prop)).const_mul ((c n).im) - beta_reduce at i1 i2 - rw [integral_add i1 i2, integral_const_mul, integral_const_mul] - · intro n _ - have i1 := (Mform_integrableOn' (T := T) hΦ hu - (show Continuous fun t : ℝ => Real.cos (t * Real.log n) by fun_prop)).const_mul ((c n).re) - have i2 := (Mform_integrableOn' (T := T) hΦ hu - (show Continuous fun t : ℝ => Real.sin (t * Real.log n) by fun_prop)).const_mul ((c n).im) - beta_reduce at i1 i2 - exact (i1.add i2).const_mul _ - -/-! ## [prop:cross](i) for L(s,χ) — the proof -/ - -open Zeta23.PrimeSide in -/-- **[prop:cross](i) for L(s,χ)** (statement = `prop_cross_muP_chi` of PrimeSideChi.lean, plus -the mathematically-required `1 ≤ q`): `|𝓜[μ_χ, P_{X,χ}]| ≪_q l√X`. Complex coefficients enter -only through `|re|, |im| ≤ ‖c n‖ ≤ 1` ([thm:E] (iii)); the sin-part uses the phase-shifted -oscillatory bound at `θ = −π/2`. -/ +/-- **[prop:cross](i) for L(s,χ)**: `|𝓜[μ_χ, P_{X,χ}]| ≪_q l √X`. -/ theorem prop_cross_muP_chi_proved {κ q : ℕ} {c : ℕ → ℂ} {cϱ lam : ℝ} (hΓq : GammaFactsChi κ q) (hcheb : ChebyshevMertens) (hc : CoeffOK q c) (hq : 1 ≤ q) (hlam : 0 < lam ∧ lam ≤ 1) : @@ -80,135 +28,22 @@ theorem prop_cross_muP_chi_proved {κ q : ℕ} {c : ℕ → ℂ} {cϱ lam : ℝ} |Mform F.Phi p.T (muq κ q) (PXc c p.X)| ≤ C * (Zeta23.l p.T * Real.sqrt p.X)) := by obtain ⟨Cμ, T₁, hCμ, hT₁⟩ := muq_abs_le κ q hΓq hq obtain ⟨Cd, hCd⟩ := hΓq.deriv_bound - obtain ⟨Cc, hCc⟩ := hcheb.cheb1c - have hμ : ContDiff ℝ 1 (muq κ q) := hΓq.smooth.of_le (by exact_mod_cast le_top) - refine ⟨4 * (4 * Cμ + |Cd|) * |Cc|, max T₁ (2 * π * Real.exp (|(2:ℝ)| / lam)), ?_⟩ - intro p F hplam hT hF - have hT₁' : T₁ ≤ p.T := (le_max_left _ _).trans hT - have hT2 : 2 * π * Real.exp (|(2:ℝ)| / p.lam) ≤ p.T := by - rw [hplam]; exact (le_max_right _ _).trans hT - have hlam0 : 0 < p.lam := hplam ▸ hlam.1 - have hT1 : 1 ≤ p.T := Setting.one_le_T (div_nonneg (abs_nonneg _) hlam0.le) hT2 - have hT0 : 0 ≤ p.T := by linarith - have hl1 : 1 ≤ p.l := hF.one_le_l - have hL := hF.L_pos - have hX2 : 2 ≤ p.X := Setting.le_X_of_T hlam0 hT2 - have hlogX : Real.log p.X = p.L := by simp [Setting.X] - -- sup bounds for μ_χ, μ_χ' on I - have hB : ∀ τ ∈ Set.Icc p.T (2 * p.T), |muq κ q τ| ≤ Cμ * p.l := hT₁ p hT₁' - have hD : ∀ τ ∈ Set.Icc p.T (2 * p.T), |deriv (muq κ q) τ| ≤ |Cd| / p.T := by - intro τ hτ - have hτ1 : 1 ≤ |τ| := by rw [abs_of_nonneg (by linarith [hτ.1])]; linarith [hτ.1] - refine (hCd τ hτ1).trans ?_ - rw [abs_of_nonneg (by linarith [hτ.1])] - calc Cd / τ ≤ |Cd| / τ := div_le_div_of_nonneg_right (le_abs_self _) (by linarith [hτ.1]) - _ ≤ |Cd| / p.T := div_le_div_of_nonneg_left (abs_nonneg _) (by linarith) hτ.1 - set S : ℝ := ∫ x, F.Phi x ^ 2 with hSdef - have hS : S ≤ 2 * π * p.L := hF.integral_Phi_sq_le - have hS0 : 0 ≤ S := integral_nonneg fun x => sq_nonneg _ - set K : ℝ := (4 * (Cμ * p.l) + |Cd| / p.T * p.T) * S with hKdef - have hKeq : K = (4 * Cμ * p.l + |Cd|) * S := by - have hTne : p.T ≠ 0 := by linarith - rw [hKdef, div_mul_cancel₀ _ hTne] - ring - have hK0 : 0 ≤ K := by rw [hKeq]; positivity - -- per-n coefficient and frequency - have hren : ∀ n : ℕ, 2 ≤ n → (0:ℝ) < Real.log n := fun n h2 => - Real.log_pos (by exact_mod_cast h2) - have hosc : ∀ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - |(-(1 / Real.pi) * ((Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)))) - * ((c n).re * Mform F.Phi p.T (muq κ q) (fun t => Real.cos (t * Real.log n)) - + (c n).im * Mform F.Phi p.T (muq κ q) (fun t => Real.sin (t * Real.log n)))| - ≤ (1 / Real.pi) * (2 * K) * ((Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) / Real.log n) := by - intro n hn - have ha0 : (0:ℝ) ≤ (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) := - mul_nonneg ArithmeticFunction.vonMangoldt_nonneg (Real.rpow_nonneg (Nat.cast_nonneg n) _) - rcases Nat.lt_or_ge n 2 with h2 | h2 - · have hn1 : n = 1 := by - have : 0 < n := (Finset.mem_Ioc.mp hn).1 - omega - subst hn1 - simp - · have hy : 0 < Real.log n := hren n h2 - -- cos part - have hMc := abs_Mform_cos_le hT0 hF.Phi_contDiff hF.Phi_sq_integrable hμ hB hD hy.ne' - rw [abs_of_pos hy] at hMc - -- sin part via the phase bound at θ = −π/2 - have hsin_eq : Mform F.Phi p.T (muq κ q) (fun t => Real.sin (t * Real.log n)) - = Mform F.Phi p.T (muq κ q) (fun t => Real.cos (t * Real.log n + -(π / 2))) := by - unfold Mform - refine integral_congr_ae (Filter.Eventually.of_forall fun z => ?_) - simp only [] - rw [show z.2 * Real.log n + -(π / 2) = z.2 * Real.log n - π / 2 by ring, - Real.cos_sub_pi_div_two] - have hMs := abs_Mform_cos_phase_le hT0 hF.Phi_contDiff hF.Phi_sq_integrable hμ hB hD - hy.ne' (-(π / 2)) - rw [abs_of_pos hy] at hMs - rw [← hsin_eq] at hMs - -- |re|, |im| ≤ ‖c n‖ ≤ 1 - have hre : |(c n).re| ≤ 1 := (Complex.abs_re_le_norm _).trans (hc.norm_le n) - have him : |(c n).im| ≤ 1 := (Complex.abs_im_le_norm _).trans (hc.norm_le n) - have hKb : (4 * (Cμ * p.l) + |Cd| / p.T * p.T) * S / Real.log n = K / Real.log n := by - rw [hKdef] - rw [abs_mul] - have h1 : |(c n).re * Mform F.Phi p.T (muq κ q) (fun t => Real.cos (t * Real.log n)) - + (c n).im * Mform F.Phi p.T (muq κ q) (fun t => Real.sin (t * Real.log n))| - ≤ 2 * (K / Real.log n) := by - calc |(c n).re * Mform F.Phi p.T (muq κ q) (fun t => Real.cos (t * Real.log n)) - + (c n).im * Mform F.Phi p.T (muq κ q) (fun t => Real.sin (t * Real.log n))| - ≤ |(c n).re| * |Mform F.Phi p.T (muq κ q) (fun t => Real.cos (t * Real.log n))| - + |(c n).im| * |Mform F.Phi p.T (muq κ q) (fun t => Real.sin (t * Real.log n))| := by - refine (abs_add_le _ _).trans ?_ - rw [abs_mul, abs_mul] - _ ≤ 1 * (K / Real.log n) + 1 * (K / Real.log n) := by - refine add_le_add (mul_le_mul hre (hMc.trans (le_of_eq hKb)) (abs_nonneg _) - zero_le_one) (mul_le_mul him (hMs.trans (le_of_eq hKb)) (abs_nonneg _) zero_le_one) - _ = 2 * (K / Real.log n) := by ring - calc |(-(1 / Real.pi) * ((Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ))))| * |_| - ≤ (1 / Real.pi * ((Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)))) * (2 * (K / Real.log n)) := by - rw [abs_mul, abs_neg, abs_of_pos (by positivity : (0:ℝ) < 1 / Real.pi), - abs_of_nonneg ha0] - exact mul_le_mul_of_nonneg_left h1 (by positivity) - _ = 1 / Real.pi * (2 * K) * ((Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) / Real.log n) := by - field_simp - -- sum over n - rw [Mform_mu_PXc_eq hF.Phi_contDiff.continuous hμ.continuous] - refine (Finset.abs_sum_le_sum_abs _ _).trans ((Finset.sum_le_sum hosc).trans ?_) - rw [← Finset.mul_sum] - have hsum : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) / Real.log n - ≤ |Cc| * Real.sqrt p.X / p.L := by - have h := hCc p.X hX2 - rw [hlogX] at h - have e : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) / Real.log n - = ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) / (Real.sqrt n * Real.log n) := by - refine Finset.sum_congr rfl fun n hn => ?_ - have hn1 : 1 ≤ n := (Finset.mem_Ioc.mp hn).1 - rcases eq_or_lt_of_le hn1 with h1 | h2 - · rw [← h1] - simp - · have hn0 : (0:ℝ) < (n : ℝ) := by exact_mod_cast Nat.lt_of_lt_of_le Nat.zero_lt_one hn1 - have hs : (0:ℝ) < Real.sqrt n := Real.sqrt_pos.mpr hn0 - have hlg : (0:ℝ) < Real.log n := Real.log_pos (by exact_mod_cast h2) - rw [Real.rpow_neg (Nat.cast_nonneg n), ← Real.sqrt_eq_rpow] - field_simp - rw [e] - exact h.trans (div_le_div_of_nonneg_right - (mul_le_mul_of_nonneg_right (le_abs_self Cc) (Real.sqrt_nonneg _)) hL.le) - have hsum0 : 0 ≤ ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) / Real.log n := - Finset.sum_nonneg fun n _ => div_nonneg - (mul_nonneg ArithmeticFunction.vonMangoldt_nonneg (Real.rpow_nonneg (Nat.cast_nonneg n) _)) - (Real.log_natCast_nonneg _) - calc 1 / Real.pi * (2 * K) * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) / Real.log n - ≤ 1 / Real.pi * (2 * ((4 * Cμ * p.l + |Cd|) * (2 * π * p.L))) - * (|Cc| * Real.sqrt p.X / p.L) := by - rw [hKeq] - gcongr - _ = 4 * (4 * Cμ * p.l + |Cd|) * |Cc| * Real.sqrt p.X := by field_simp; ring - _ ≤ 4 * ((4 * Cμ + |Cd|) * p.l) * |Cc| * Real.sqrt p.X := by - gcongr - nlinarith [abs_nonneg Cd, hCμ] - _ = 4 * (4 * Cμ + |Cd|) * |Cc| * (Zeta23.l p.T * Real.sqrt p.X) := by ring + let c' : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) * c n + have hPXc : ∀ X, PXc c X = PcDir X c' := fun X => by + funext τ + rw [PXc_eq_sum_cos_sin, PcDir, Finset.mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun n hn => ?_ + have hn0 : (0 : ℝ) < n := by exact_mod_cast (Finset.mem_Ioc.mp hn).1 + rw [Real.rpow_neg hn0.le, ← Real.sqrt_eq_rpow] + have hre : (c' n).re = -(Λ n : ℝ) * (c n).re := by simp [c'] + have him : (c' n).im = -(Λ n : ℝ) * (c n).im := by simp [c'] + rw [hre, him]; field_simp; ring + have hc' : ∀ n, ‖c' n‖ ≤ Λ n := fun n => by + calc ‖c' n‖ = Λ n * ‖c n‖ := by simp [c', abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] + _ ≤ Λ n * 1 := mul_le_mul_of_nonneg_left (hc.norm_le n) ArithmeticFunction.vonMangoldt_nonneg + _ = Λ n := mul_one _ + simpa only [hPXc] using abs_Mform_u_PcDir_eventually (cϱ := cϱ) hcheb hlam + (hΓq.smooth.of_le (by exact_mod_cast le_top)) hCμ.le hT₁ hCd hc' end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/EFLitChi.lean b/zeta23/Zeta23/ThmE/EFLitChi.lean index d205e0ceba..404041eff8 100644 --- a/zeta23/Zeta23/ThmE/EFLitChi.lean +++ b/zeta23/Zeta23/ThmE/EFLitChi.lean @@ -5,18 +5,11 @@ SPDX-License-Identifier: Apache-2.0 -/ /- Zeta23/ThmE/EFLitChi.lean — the literature-form explicit formula for L(s,χ) -(primitive χ mod q > 1) and its bridge to ExplicitFormulaPaperChi. - -The paper does not display the χ-EF ([thm:E] proof (i), -§8.2, says only "the derivation of Appendix A applies to [IK04, Theorem 5.12] for -L(s,χ)"); literatureRHSchi below is a transcription of IK04-Thm-5.12-for-L(s,χ), with -the χ/conj(χ) leg assignment forced by the paper's ν-side display P_{X,χ} (§8.2). - -Conventions: h := paperFT k (h(z) = ∫k(u)e^{izu}du); κ = (1−χ(−1))/2; no pole terms (Λ(s,χ) -entire for primitive χ, q > 1); coefficients c n = (coeff χ) n (the character values ℕ → ℂ). +(primitive χ mod q > 1) and its bridge to ExplicitFormulaPaperChi, delegating +shared twisted inversion, Stirling-growth, and bridge machinery to +`Zeta23.ExplicitFormula` and `Zeta23.ExplicitFormula.Bridge`. -/ import Zeta23.ThmE.PrimeSideChi -import Zeta23.ExplicitFormula import Zeta23.ExplicitFormula.Bridge noncomputable section @@ -32,203 +25,87 @@ namespace ThmE open Zeta23.PrimeSide /-- Right-hand side of the literature explicit formula for L(s,χ), primitive χ mod q > 1 -(IK04 Thm 5.12 specialised; transcription — see file header): - −Σ_{n≥1} (Λ(n)/√n)(c(n) k(log n) + conj(c(n)) k(−log n)) - + (1/2π)∫_ℝ h(r)·[Re ψ(1/4 + κ/2 + ir/2) + log(q/π)] dr. -/ +(no pole terms): `literatureRHS_of κ q c false k` without the `0 -` prefix. -/ def literatureRHSchi (κ q : ℕ) (c : ℕ → ℂ) (k : ℝ → ℂ) : ℂ := - ∑' n : ℕ, ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ) * (c n * k (Real.log n) + (starRingEnd ℂ) (c n) * k (-Real.log n)) + (1 / (2 * π) : ℂ) * ∫ r : ℝ, paperFT k r * ((((Complex.digamma (1 / 4 + (κ : ℂ) / 2 + I * r / 2)).re + Real.log (q / π) : ℝ)) : ℂ) -/-- **H-EF(χ), literature form**: for every k ∈ C_c²(ℝ), the zero sum converges absolutely and - Σ_ρ m_ρ h(γ_ρ) = literatureRHSchi. -/ +theorem literatureRHSchi_eq_of (κ q : ℕ) (c : ℕ → ℂ) (k : ℝ → ℂ) : + literatureRHSchi κ q c k = Zeta23.EF.literatureRHS_of κ q c false k := by + simp [literatureRHSchi, Zeta23.EF.literatureRHS_of] + +/-- **H-EF(χ), literature form**: `EF_lit_of (literatureRHSchi κ q c) Z`. -/ def EF_lit_chi (κ q : ℕ) (c : ℕ → ℂ) (Z : ZeroConfig) : Prop := - ∀ k : ℝ → ℂ, ContDiff ℝ 2 k → HasCompactSupport k → - Summable (fun ρ : Z.carrier => (Z.mult ρ : ℂ) * paperFT k (gammaOf ρ)) ∧ - ∑' ρ : Z.carrier, (Z.mult ρ : ℂ) * paperFT k (gammaOf ρ) = literatureRHSchi κ q c k + Zeta23.EF.EF_lit_of (literatureRHSchi κ q c) Z -/-- Twisted prime term (mirror of Zeta23.EF.prime_term): the c-twisted prime sum equals -∫ h·P_{X,χ} — transcription target: P_{X,χ} = −π⁻¹ Re Σ_{n≤X} Λ(n)χ(n)n^{−1/2−iτ} (§8.2); -Re-unfolding via PXc_eq_sum_cos_sin (Hypotheses.lean) assigns c(n) to the e^{−iτ log n} leg. -/ theorem integrable_paperFT_mul_sin {k : ℝ → ℂ} (hFk : Integrable (FourierTransform.fourier k)) (y : ℝ) : - Integrable (fun r : ℝ => paperFT k r * (Real.sin (r * y) : ℂ)) := by - refine (Zeta23.EF.integrable_paperFT_ofReal hFk).mul_bdd (c := 1) (by fun_prop) ?_ - filter_upwards with r - rw [Complex.norm_real, Real.norm_eq_abs] - exact Real.abs_sin_le_one _ + Integrable (fun r : ℝ => paperFT k r * (Real.sin (r * y) : ℂ)) := + Zeta23.EF.integrable_paperFT_mul_sin hFk y -/-- Twisted inversion pairing: cc * k(y) + conj(cc) * k(-y) equals (1/pi) times the integral of -h(tau) * (Re cc * cos(tau y) + Im cc * sin(tau y)). -/ theorem ck_add_conj_k_neg {k : ℝ → ℂ} (hk : Continuous k) (hki : Integrable k) (hFk : Integrable (FourierTransform.fourier k)) (cc : ℂ) (y : ℝ) : cc * k y + (starRingEnd ℂ) cc * k (-y) = (1 / π : ℂ) * ∫ τ : ℝ, paperFT k τ - * ((cc.re * Real.cos (τ * y) + cc.im * Real.sin (τ * y) : ℝ) : ℂ) := by - rw [Zeta23.EF.paper_inversion hk hki hFk y, Zeta23.EF.paper_inversion hk hki hFk (-y), - mul_left_comm cc, mul_left_comm ((starRingEnd ℂ) cc), ← mul_add, - ← Zeta23.EF.cintegral_const_mul cc, ← Zeta23.EF.cintegral_const_mul ((starRingEnd ℂ) cc), - ← integral_add ((Zeta23.EF.integrable_paperFT_mul_cexp hFk y).const_mul cc) - ((Zeta23.EF.integrable_paperFT_mul_cexp hFk (-y)).const_mul _)] - have hconj : (starRingEnd ℂ) cc = (cc.re : ℂ) - (cc.im : ℂ) * I := by - apply Complex.ext <;> simp - have hcc : cc = (cc.re : ℂ) + (cc.im : ℂ) * I := (Complex.re_add_im cc).symm - have h2 : ∀ τ : ℝ, cc * (paperFT k τ * cexp (-I * τ * y)) - + (starRingEnd ℂ) cc * (paperFT k τ * cexp (-I * τ * ↑(-y))) - = 2 * (paperFT k τ * ((cc.re * Real.cos (τ * y) + cc.im * Real.sin (τ * y) : ℝ) : ℂ)) := by - intro τ - have he1 : cexp (-I * τ * y) = Real.cos (τ * y) - Real.sin (τ * y) * I := by - rw [show (-I * τ * y : ℂ) = ((-(τ * y) : ℝ) : ℂ) * I by push_cast; ring, - Complex.exp_mul_I] - push_cast - simp - ring - have he2 : cexp (-I * τ * ((-y : ℝ) : ℂ)) = Real.cos (τ * y) + Real.sin (τ * y) * I := by - rw [show (-I * τ * ((-y : ℝ) : ℂ) : ℂ) = (((τ * y) : ℝ) : ℂ) * I by push_cast; ring, - Complex.exp_mul_I] - push_cast - ring - rw [he1, he2] - nth_rewrite 1 [hcc] - rw [hconj] - push_cast - ring_nf - rw [Complex.I_sq] - ring - simp_rw [h2] - rw [Zeta23.EF.cintegral_const_mul, ← mul_assoc] - congr 1 - field_simp + * ((cc.re * Real.cos (τ * y) + cc.im * Real.sin (τ * y) : ℝ) : ℂ) := + Zeta23.EF.ck_add_conj_k_neg hk hki hFk cc y -/-- Support step, twisted: the summand vanishes for n outside (0, floor(e^L)]. -/ theorem prime_summand_chi_eq_zero {c : ℕ → ℂ} {k : ℝ → ℂ} {L : ℝ} - (hks : tsupport k ⊆ Icc (-L) L) - {n : ℕ} (hn : n ∉ Finset.Ioc 0 ⌊Real.exp L⌋₊) : + (hks : tsupport k ⊆ Icc (-L) L) {n : ℕ} (hn : n ∉ Finset.Ioc 0 ⌊Real.exp L⌋₊) : ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ) - * (c n * k (Real.log n) + (starRingEnd ℂ) (c n) * k (-Real.log n)) = 0 := by - rcases Nat.eq_zero_or_pos n with rfl | hpos - · simp - · have hn' : ⌊Real.exp L⌋₊ < n := by - simp only [Finset.mem_Ioc, not_and, not_le] at hn - exact hn hpos - have hX : Real.exp L < n := (Nat.floor_lt (Real.exp_pos L).le).mp hn' - have hlog : L < Real.log n := by - rw [← Real.log_exp L] - exact Real.log_lt_log (Real.exp_pos L) hX - have h1 : k (Real.log n) = 0 := by - apply image_eq_zero_of_notMem_tsupport - intro hmem - have := (hks hmem).2 - linarith - have h2 : k (-Real.log n) = 0 := by - apply image_eq_zero_of_notMem_tsupport - intro hmem - have := (hks hmem).1 - linarith - rw [h1, h2, mul_zero, mul_zero, add_zero, mul_zero] -theorem prime_term_chi {q : ℕ} {c : ℕ → ℂ} {k : ℝ → ℂ} {L : ℝ} (hk : Continuous k) + * (c n * k (Real.log n) + (starRingEnd ℂ) (c n) * k (-Real.log n)) = 0 := + Zeta23.EF.prime_summand_twisted_eq_zero hks hn + +private theorem integrable_paperFT_mul_cos_sin {k : ℝ → ℂ} + (hFk : Integrable (FourierTransform.fourier k)) (c : ℕ → ℂ) (n : ℕ) : + Integrable (fun τ : ℝ => paperFT k τ + * (((c n).re * Real.cos (τ * Real.log n) + (c n).im * Real.sin (τ * Real.log n) : ℝ) : ℂ)) := by + have h1 := (Zeta23.EF.integrable_paperFT_mul_cos hFk (Real.log n)).const_mul (((c n).re : ℂ)) + have h2 := (integrable_paperFT_mul_sin hFk (Real.log n)).const_mul (((c n).im : ℂ)) + exact (h1.add h2).congr (Filter.Eventually.of_forall fun τ => by + simp only [Pi.add_apply]; push_cast [-Complex.ofReal_cos, -Complex.ofReal_sin]; ring) + +private theorem paperFT_mul_PXc_eq (c : ℕ → ℂ) (k : ℝ → ℂ) (L : ℝ) : + (fun τ : ℝ => paperFT k τ * (PXc c (Real.exp L) τ : ℂ)) + = fun τ : ℝ => ∑ n ∈ Finset.Ioc 0 ⌊Real.exp L⌋₊, + (-(1 / π) * ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ)) + * (paperFT k τ * (((c n).re * Real.cos (τ * Real.log n) + + (c n).im * Real.sin (τ * Real.log n) : ℝ) : ℂ)) := by + ext τ + rw [PXc_eq_sum_cos_sin]; push_cast; rw [Finset.mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun n hn => ?_ + have hn0' : (0 : ℝ) < (n : ℝ) := by exact_mod_cast (Finset.mem_Ioc.mp hn).1 + rw [show ((n : ℝ) ^ (-(1 / 2 : ℝ)) : ℝ) = 1 / Real.sqrt n by + rw [Real.rpow_neg hn0'.le, Real.sqrt_eq_rpow, ← one_div]] + push_cast; ring + +theorem integrable_paperFT_mul_PXc {k : ℝ → ℂ} (c : ℕ → ℂ) (L : ℝ) + (hFk : Integrable (FourierTransform.fourier k)) : + Integrable (fun τ : ℝ => paperFT k τ * (PXc c (Real.exp L) τ : ℂ)) := by + rw [paperFT_mul_PXc_eq] + exact integrable_finsetSum _ fun n _ => (integrable_paperFT_mul_cos_sin hFk c n).const_mul _ + +theorem prime_term_chi {_q : ℕ} {c : ℕ → ℂ} {k : ℝ → ℂ} {L : ℝ} (hk : Continuous k) (hks : tsupport k ⊆ Icc (-L) L) (hFk : Integrable (FourierTransform.fourier k)) : -(∑' n : ℕ, ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ) * (c n * k (Real.log n) + (starRingEnd ℂ) (c n) * k (-Real.log n))) = ∫ τ : ℝ, paperFT k τ * (PXc c (Real.exp L) τ : ℂ) := by have hki : Integrable k := hk.integrable_of_hasCompactSupport (Zeta23.EF.hasCompactSupport_of_tsupport_subset hks) - set S := Finset.Ioc 0 ⌊Real.exp L⌋₊ with hS - rw [tsum_eq_sum (s := S) (fun n hn => prime_summand_chi_eq_zero hks hn)] - have step1 : ∑ n ∈ S, ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ) - * (c n * k (Real.log n) + (starRingEnd ℂ) (c n) * k (-Real.log n)) - = ∑ n ∈ S, ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ) - * ((1 / π : ℂ) * ∫ τ : ℝ, paperFT k τ - * (((c n).re * Real.cos (τ * Real.log n) - + (c n).im * Real.sin (τ * Real.log n) : ℝ) : ℂ)) := by - refine Finset.sum_congr rfl fun n _ => ?_ - rw [ck_add_conj_k_neg hk hki hFk (c n) (Real.log n)] - rw [step1] - have hint : ∀ n : ℕ, Integrable (fun τ : ℝ => paperFT k τ - * (((c n).re * Real.cos (τ * Real.log n) - + (c n).im * Real.sin (τ * Real.log n) : ℝ) : ℂ)) := by - intro n - have h1 := (Zeta23.EF.integrable_paperFT_mul_cos hFk (Real.log n)).const_mul - (((c n).re : ℂ)) - have h2 := (integrable_paperFT_mul_sin hFk (Real.log n)).const_mul (((c n).im : ℂ)) - refine (h1.add h2).congr (Filter.Eventually.of_forall fun τ => ?_) - simp only [Pi.add_apply] - push_cast [-Complex.ofReal_cos, -Complex.ofReal_sin] - ring - have step2 : (fun τ : ℝ => paperFT k τ * (PXc c (Real.exp L) τ : ℂ)) - = fun τ : ℝ => ∑ n ∈ S, (-(1 / π) * ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ)) - * (paperFT k τ * (((c n).re * Real.cos (τ * Real.log n) - + (c n).im * Real.sin (τ * Real.log n) : ℝ) : ℂ)) := by - ext τ - rw [PXc_eq_sum_cos_sin, ← hS] - push_cast - rw [Finset.mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n hn => ?_ - have hn0 : 0 < n := (Finset.mem_Ioc.mp hn).1 - have hn0' : (0:ℝ) < (n:ℝ) := by exact_mod_cast hn0 - have hpow : ((n:ℝ) ^ (-(1/2 : ℝ)) : ℝ) = 1 / Real.sqrt n := by - rw [Real.rpow_neg hn0'.le, Real.sqrt_eq_rpow] - exact (one_div _).symm - rw [hpow] - push_cast - ring - rw [step2, integral_finsetSum _ (fun n _ => (hint n).const_mul _)] - rw [← Finset.sum_neg_distrib] + rw [tsum_eq_sum (s := Finset.Ioc 0 ⌊Real.exp L⌋₊) (fun n hn => prime_summand_chi_eq_zero hks hn), + paperFT_mul_PXc_eq, integral_finsetSum _ (fun n _ => (integrable_paperFT_mul_cos_sin hFk c n).const_mul _), + ← Finset.sum_neg_distrib] refine Finset.sum_congr rfl fun n _ => ?_ - rw [Zeta23.EF.cintegral_const_mul] - ring + rw [ck_add_conj_k_neg hk hki hFk (c n) (Real.log n), Zeta23.EF.cintegral_const_mul]; ring -/-- κ-shifted archimedean term (mirror of Zeta23.EF.gamma_term): pointwise-rearrangement of the -bracket into μ_χ (muq's definition is (1/2π)(log(q/π) + Re ψ(1/4+κ/2+iτ/2))). -/ theorem gamma_term_chi {κ q : ℕ} (_hq : 1 ≤ q) (k : ℝ → ℂ) : (1 / (2 * π) : ℂ) * ∫ r : ℝ, paperFT k r * ((((Complex.digamma (1 / 4 + (κ : ℂ) / 2 + I * r / 2)).re + Real.log (q / π) : ℝ)) : ℂ) = ∫ τ : ℝ, paperFT k τ * (muq κ q τ : ℂ) := by - rw [← Zeta23.EF.cintegral_const_mul] - congr 1 - ext r - simp only [muq] - push_cast - ring + rw [← Zeta23.EF.cintegral_const_mul]; congr 1; ext r; simp only [muq]; push_cast; ring -/-- Integrability of h·P_{X,χ} (finite twisted cos/sin sum; no Chebyshev input needed). -/ -theorem integrable_paperFT_mul_PXc {k : ℝ → ℂ} (c : ℕ → ℂ) (L : ℝ) - (hFk : Integrable (FourierTransform.fourier k)) : - Integrable (fun τ : ℝ => paperFT k τ * (PXc c (Real.exp L) τ : ℂ)) := by - set S := Finset.Ioc 0 ⌊Real.exp L⌋₊ with hS - have hint : ∀ n : ℕ, Integrable (fun τ : ℝ => paperFT k τ - * (((c n).re * Real.cos (τ * Real.log n) - + (c n).im * Real.sin (τ * Real.log n) : ℝ) : ℂ)) := by - intro n - have h1 := (Zeta23.EF.integrable_paperFT_mul_cos hFk (Real.log n)).const_mul - (((c n).re : ℂ)) - have h2 := (integrable_paperFT_mul_sin hFk (Real.log n)).const_mul (((c n).im : ℂ)) - refine (h1.add h2).congr (Filter.Eventually.of_forall fun τ => ?_) - simp only [Pi.add_apply] - push_cast [-Complex.ofReal_cos, -Complex.ofReal_sin] - ring - have step2 : (fun τ : ℝ => paperFT k τ * (PXc c (Real.exp L) τ : ℂ)) - = fun τ : ℝ => ∑ n ∈ S, (-(1 / π) * ((ArithmeticFunction.vonMangoldt n / Real.sqrt n : ℝ) : ℂ)) - * (paperFT k τ * (((c n).re * Real.cos (τ * Real.log n) - + (c n).im * Real.sin (τ * Real.log n) : ℝ) : ℂ)) := by - ext τ - rw [PXc_eq_sum_cos_sin, ← hS] - push_cast - rw [Finset.mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n hn => ?_ - have hn0 : 0 < n := (Finset.mem_Ioc.mp hn).1 - have hn0' : (0:ℝ) < (n:ℝ) := by exact_mod_cast hn0 - have hpow : ((n:ℝ) ^ (-(1/2 : ℝ)) : ℝ) = 1 / Real.sqrt n := by - rw [Real.rpow_neg hn0'.le, Real.sqrt_eq_rpow] - exact (one_div _).symm - rw [hpow] - push_cast - ring - rw [step2] - exact integrable_finsetSum _ (fun n _ => (hint n).const_mul _) - -/-- Mirror of Zeta23.EF.literatureRHS_eq_integral_nu — NO pole term for q > 1. -/ theorem literatureRHSchi_eq_integral_nu {κ q : ℕ} {c : ℕ → ℂ} {k : ℝ → ℂ} {L : ℝ} (hq : 1 ≤ q) (_hL : 0 < L) (hk : Continuous k) (hks : tsupport k ⊆ Icc (-L) L) (hFk : Integrable (FourierTransform.fourier k)) @@ -236,162 +113,38 @@ theorem literatureRHSchi_eq_integral_nu {κ q : ℕ} {c : ℕ → ℂ} {k : ℝ literatureRHSchi κ q c k = ∫ τ : ℝ, paperFT k τ * (nuXc κ q c (Real.exp L) τ : ℂ) := by have hP := integrable_paperFT_mul_PXc (k := k) c L hFk unfold literatureRHSchi - rw [prime_term_chi (q := q) hk hks hFk, gamma_term_chi hq k, ← integral_add hP hμ] - congr 1 - ext τ - simp only [nuXc] - push_cast - ring + rw [prime_term_chi (_q := q) hk hks hFk, gamma_term_chi hq k, ← integral_add hP hμ] + congr 1; ext τ; simp only [nuXc]; push_cast; ring - -/-- From H-Gamma(chi): |mu_chi(tau)| <= K2 (1+|tau|)^(1/2) for all tau (continuity on [-1,1]; -Stirling with log(q|tau|/2pi) and log x <= 2 x^(1/2) for |tau| >= 1). -/ theorem abs_muq_le_of_gammaFactsChi {κ q : ℕ} (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : - ∃ K₂ : ℝ, 0 ≤ K₂ ∧ ∀ τ : ℝ, |muq κ q τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := by - obtain ⟨C, hC⟩ := hΓq.stirling - obtain ⟨M, hM⟩ := isCompact_Icc.exists_bound_of_continuousOn - (hΓq.smooth.continuous.continuousOn (s := Icc (-1 : ℝ) 1)) - have hπ : 0 < 1 / (2 * π) := by positivity - have hq0 : (0:ℝ) < q := by exact_mod_cast hq - set Lq : ℝ := |Real.log (2 * π / q)| with hLq - set K₂ : ℝ := max M 0 + |C| + (1 / (2 * π)) * Lq + 1 / π with hK₂ - have hLq0 : 0 ≤ Lq := abs_nonneg _ - have hK₂nn : 0 ≤ K₂ := by - have h1 : 0 ≤ max M 0 := le_max_right _ _ - have h2 : (0:ℝ) ≤ 1 / π := by positivity - positivity - refine ⟨K₂, hK₂nn, fun τ => ?_⟩ - have hb1 : 1 ≤ (1 + |τ|) ^ (1 / 2 : ℝ) := - Real.one_le_rpow (by linarith [abs_nonneg τ]) (by norm_num) - rcases le_or_gt |τ| 1 with hτ | hτ - · have := hM τ (abs_le.mp hτ) - rw [Real.norm_eq_abs] at this - calc |muq κ q τ| ≤ max M 0 := this.trans (le_max_left _ _) - _ ≤ K₂ * 1 := by - rw [mul_one, hK₂] - have : (0:ℝ) ≤ 1 / π := by positivity - have : (0:ℝ) ≤ (1 / (2 * π)) * Lq := by positivity - linarith [abs_nonneg C] - _ ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := by gcongr - · have hτ1 : 1 ≤ |τ| := hτ.le - have hst := hC τ hτ1 - have hsq : 1 ≤ τ ^ 2 := by rw [← sq_abs]; nlinarith - have hCτ : C / τ ^ 2 ≤ |C| := by - calc C / τ ^ 2 ≤ |C| / τ ^ 2 := by gcongr; exact le_abs_self C - _ ≤ |C| := div_le_self (abs_nonneg C) hsq - have hlogsplit : (q : ℝ) * |τ| / (2 * π) = |τ| / (2 * π / q) := by - field_simp - have hlog : |Real.log ((q:ℝ) * |τ| / (2 * π))| ≤ Real.log |τ| + Lq := by - rw [hlogsplit, Real.log_div (by positivity) (by positivity)] - calc abs (Real.log |τ| - Real.log (2 * π / q)) - ≤ abs (Real.log |τ|) + Lq := abs_sub _ _ - _ = Real.log |τ| + Lq := by rw [abs_of_nonneg (Real.log_nonneg hτ1)] - have hlog2 : Real.log |τ| ≤ 2 * (1 + |τ|) ^ (1 / 2 : ℝ) := by - have := Real.log_le_rpow_div (abs_nonneg τ) (by norm_num : (0 : ℝ) < 1 / 2) - have hmono : |τ| ^ (1 / 2 : ℝ) ≤ (1 + |τ|) ^ (1 / 2 : ℝ) := - Real.rpow_le_rpow (abs_nonneg τ) (by linarith) (by norm_num) - calc Real.log |τ| ≤ |τ| ^ (1 / 2 : ℝ) / (1 / 2) := this - _ = 2 * |τ| ^ (1 / 2 : ℝ) := by ring - _ ≤ 2 * (1 + |τ|) ^ (1 / 2 : ℝ) := by gcongr - have hmu : |muq κ q τ| ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + Lq) := by - have htri : |muq κ q τ| ≤ |muq κ q τ - 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| - + |1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| := by - have := abs_add_le (muq κ q τ - 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))) - (1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))) - rwa [sub_add_cancel] at this - calc |muq κ q τ| ≤ C / τ ^ 2 + |1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| := by - linarith - _ ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + Lq) := by - rw [abs_mul, abs_of_pos hπ] - gcongr - set b := (1 + |τ|) ^ (1 / 2 : ℝ) with hb - calc |muq κ q τ| ≤ |C| + (1 / (2 * π)) * (Real.log |τ| + Lq) := hmu - _ ≤ |C| + (1 / (2 * π)) * (2 * b + Lq) := by gcongr - _ = (|C| + (1 / (2 * π)) * Lq) * 1 + (1 / π) * b := by ring - _ ≤ (|C| + (1 / (2 * π)) * Lq) * b + (1 / π) * b := by - gcongr - _ = (|C| + (1 / (2 * π)) * Lq + 1 / π) * b := by ring - _ ≤ K₂ * b := by - gcongr - rw [hK₂] - linarith [le_max_right M 0] + ∃ K₂ : ℝ, 0 ≤ K₂ ∧ ∀ τ : ℝ, |muq κ q τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := + Zeta23.EF.abs_le_of_stirling (by exact_mod_cast hq) hΓq.smooth.continuous hΓq.stirling -/-- k in C_c^2 and H-Gamma(chi) imply h_k times mu_chi is integrable. -/ theorem integrable_paperFT_mul_muq {κ q : ℕ} {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : - Integrable (fun τ : ℝ => paperFT k τ * (muq κ q τ : ℂ)) := by - obtain ⟨Lam, hLam⟩ := Zeta23.EF.exists_abs_le_of_hasCompactSupport hkc - obtain ⟨K₂, hK₂, hmu⟩ := abs_muq_le_of_gammaFactsChi hΓq hq - set K₁ : ℝ := (∫ u, ‖k u‖) + ∫ u, ‖deriv (deriv k) u‖ with hK₁ - have hK₁nn : 0 ≤ K₁ := by positivity - have hmeas : AEStronglyMeasurable (fun τ : ℝ => paperFT k τ * (muq κ q τ : ℂ)) := - (Zeta23.EF.integrable_paperFT_ofReal (Zeta23.EF.integrable_fourier_of_contDiff_two hk hkc)).aestronglyMeasurable.mul - (Complex.continuous_ofReal.comp hΓq.smooth.continuous).aestronglyMeasurable - have hdom : Integrable (fun τ : ℝ => 2 * K₁ * K₂ * (1 + ‖τ‖) ^ (-(3 / 2) : ℝ)) := - (integrable_one_add_norm (by rw [Module.finrank_self]; norm_num)).const_mul _ - refine hdom.mono' hmeas (Filter.Eventually.of_forall fun τ => ?_) - rw [norm_mul, Complex.norm_real, Real.norm_eq_abs, Real.norm_eq_abs] - have hb : 0 < 1 + |τ| := by linarith [abs_nonneg τ] - have h1 : ‖paperFT k τ‖ * (1 + τ ^ 2) ≤ K₁ := Zeta23.EF.norm_paperFT_mul_one_add_sq_le hk hLam τ - have h2 : |muq κ q τ| ≤ K₂ * (1 + |τ|) ^ (1 / 2 : ℝ) := hmu τ - have hsq : (1 + |τ|) ^ (2 : ℝ) ≤ 2 * (1 + τ ^ 2) := by - rw [Real.rpow_two] - nlinarith [sq_abs τ, sq_nonneg (1 - |τ|)] - have key : (1 + |τ|) ^ (1 / 2 : ℝ) ≤ 2 * (1 + τ ^ 2) * (1 + |τ|) ^ (-(3 / 2) : ℝ) := by - rw [show (1 / 2 : ℝ) = 2 + (-(3 / 2)) by norm_num, Real.rpow_add hb] - exact mul_le_mul_of_nonneg_right hsq (Real.rpow_nonneg hb.le _) - calc ‖paperFT k τ‖ * |muq κ q τ| - ≤ ‖paperFT k τ‖ * (K₂ * (1 + |τ|) ^ (1 / 2 : ℝ)) := by gcongr - _ ≤ ‖paperFT k τ‖ * (K₂ * (2 * (1 + τ ^ 2) * (1 + |τ|) ^ (-(3 / 2) : ℝ))) := by gcongr - _ = (‖paperFT k τ‖ * (1 + τ ^ 2)) * (2 * K₂ * (1 + |τ|) ^ (-(3 / 2) : ℝ)) := by ring - _ ≤ K₁ * (2 * K₂ * (1 + |τ|) ^ (-(3 / 2) : ℝ)) := by - gcongr - _ = 2 * K₁ * K₂ * (1 + |τ|) ^ (-(3 / 2) : ℝ) := by ring -/-- **Bridge** (App-A-for-χ, mirror of Zeta23.EF.explicitFormulaPaper_of_lit): the literature form -plus the χ-Γ facts give the paper form H-EF(χ). [Proof: transplant of the ζ-case chain with -ν_{X,χ} = μ_χ + P_{X,χ}; side-integrabilities via the Bridge.lean toolkit (norm_paperFT bounds, -abs_mu-type from GammaFactsChi.stirling) + PXc continuity/boundedness (PXc_abs_le).] -/ + Integrable (fun τ : ℝ => paperFT k τ * (muq κ q τ : ℂ)) := + Zeta23.EF.integrable_paperFT_mul_of_sqrt_growth hk hkc hΓq.smooth.continuous + (abs_muq_le_of_gammaFactsChi hΓq hq) + +/-- **Bridge** (App-A-for-χ): delegates to `Zeta23.EF.prop_EF_of_lit_gen`. -/ theorem explicitFormulaPaperChi_of_lit {κ q : ℕ} {c : ℕ → ℂ} {Z : ZeroConfig} (hEF : EF_lit_chi κ q c Z) (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) (_hc : CoeffOK q c) : ExplicitFormulaPaperChi κ q c Z := by intro L hL f g hf hg hfs hgs - have hfc : HasCompactSupport f := - IsCompact.of_isClosed_subset isCompact_Icc (isClosed_tsupport f) hfs - have hgc : HasCompactSupport g := - IsCompact.of_isClosed_subset isCompact_Icc (isClosed_tsupport g) hgs - have hkd : ContDiff ℝ 2 (Zeta23.EF.weilTest f g) := Zeta23.EF.weilTest_contDiff hf hg.continuous hfc - have hk : Continuous (Zeta23.EF.weilTest f g) := hkd.continuous - have hks : tsupport (Zeta23.EF.weilTest f g) ⊆ Icc (-L) L := - Zeta23.EF.tsupport_weilTest_subset hfs hgs - have hkcs : HasCompactSupport (Zeta23.EF.weilTest f g) := - Zeta23.EF.weilTest_hasCompactSupport hfc hgc - have hFk : Integrable (FourierTransform.fourier (Zeta23.EF.weilTest f g)) := - Zeta23.EF.integrable_fourier_of_contDiff_two hkd hkcs - have hμ : Integrable (fun τ : ℝ => paperFT (Zeta23.EF.weilTest f g) τ * (muq κ q τ : ℂ)) := - integrable_paperFT_mul_muq hkd hkcs hΓq hq - obtain ⟨hsum, heq⟩ := hEF (Zeta23.EF.weilTest f g) hkd hkcs - have hfac : ∀ z : ℂ, paperFT (Zeta23.EF.weilTest f g) z - = paperFT f z * (starRingEnd ℂ) (paperFT g ((starRingEnd ℂ) z)) := - Zeta23.EF.paperFT_weilTest hf.continuous hg.continuous hfc hgc - have hterm : (fun ρ : Z.carrier => (Z.mult ρ : ℂ) * paperFT (Zeta23.EF.weilTest f g) (gammaOf ρ)) - = fun ρ : Z.carrier => Z.Wsummand f g ρ := by - ext ρ - simp only [ZeroConfig.Wsummand, hfac, mul_assoc] - have hreal : (fun τ : ℝ => paperFT (Zeta23.EF.weilTest f g) τ * (nuXc κ q c (Real.exp L) τ : ℂ)) - = fun τ : ℝ => paperFT f τ * (starRingEnd ℂ) (paperFT g τ) * (nuXc κ q c (Real.exp L) τ : ℂ) := by - ext τ - rw [hfac, Complex.conj_ofReal] + have hfc : HasCompactSupport f := Zeta23.EF.hasCompactSupport_of_tsupport_subset hfs + have hgc : HasCompactSupport g := Zeta23.EF.hasCompactSupport_of_tsupport_subset hgs + have hkd := Zeta23.EF.weilTest_contDiff hf hg.continuous hfc + have hkcs := Zeta23.EF.weilTest_hasCompactSupport hfc hgc + have hFk := Zeta23.EF.integrable_fourier_of_contDiff_two hkd hkcs + have hμ := integrable_paperFT_mul_muq hkd hkcs hΓq hq have hnuint : Integrable (fun τ : ℝ => paperFT (Zeta23.EF.weilTest f g) τ - * (nuXc κ q c (Real.exp L) τ : ℂ)) := by - refine ((hμ.add (integrable_paperFT_mul_PXc (k := Zeta23.EF.weilTest f g) c L hFk)).congr - (Filter.Eventually.of_forall fun τ => ?_)) - simp only [Pi.add_apply, nuXc] - push_cast - ring - refine ⟨hterm ▸ hsum, hreal ▸ hnuint, ?_⟩ - rw [literatureRHSchi_eq_integral_nu hq hL hk hks hFk hμ, hreal] at heq - rw [← heq, ZeroConfig.W, ← hterm] + * (nuXc κ q c (Real.exp L) τ : ℂ)) := + (hμ.add (integrable_paperFT_mul_PXc c L hFk)).congr + (Filter.Eventually.of_forall fun τ => by simp only [Pi.add_apply, nuXc]; push_cast; ring) + exact Zeta23.EF.prop_EF_of_lit_gen Z (literatureRHSchi κ q c) (nuXc κ q c (Real.exp L)) + hEF hf hg hfs hgs hnuint + (literatureRHSchi_eq_integral_nu hq hL hkd.continuous (Zeta23.EF.tsupport_weilTest_subset hfs hgs) hFk hμ) end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/Final.lean b/zeta23/Zeta23/ThmE/Final.lean index 70fa805aba..2659f54aac 100644 --- a/zeta23/Zeta23/ThmE/Final.lean +++ b/zeta23/Zeta23/ThmE/Final.lean @@ -29,8 +29,7 @@ variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} theorem thmE_A_lam (hs : LSeam χ) (hprim : χ.IsPrimitive) (hq : 1 < q) (H : PaperInputsChi (parity χ) q (coeff χ) (LZeros hs)) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Hfun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := by + DyadicLowerBound (Hfun lam) (fun T => N0starL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := by have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le exact thmE_A_lam_of_traces hs (by omega) taperProfile_stdProfile h0 h1 H.RvM (thm_traces_chi hP (by omega) (coeffUnimodular_of_primitive hq hprim) H @@ -41,41 +40,10 @@ theorem thmE_A_lam (hs : LSeam χ) (hprim : χ.IsPrimitive) (hq : 1 < q) /-- **Theorem E, first bound** [thm:E]. -/ theorem thmE_A (hs : LSeam χ) (hprim : χ.IsPrimitive) (hq : 1 < q) (H : PaperInputsChi (parity χ) q (coeff χ) (LZeros hs)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 / 3 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := + DyadicLowerBound (2 / 3) (fun T => N0starL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := Assembly.eps_form_twoThirds (N := fun T => (NcountL χ T (2 * T) : ℝ)) (lower := fun T => (N0starL χ T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) - (fun lam hl1 hl2 => thmE_A_lam hs hprim hq H (by linarith) hl2) - -/-- **Theorem E, second bound** [thm:E]. -/ -theorem thmE_B (hs : LSeam χ) (hprim : χ.IsPrimitive) (hq : 1 < q) - (H : PaperInputsChi (parity χ) q (coeff χ) (LZeros hs)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (1 / 2 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := by - refine Assembly.eps_form_half (N := fun T => (NcountL χ T (2 * T) : ℝ)) - (lower := fun T => (N0simpleL χ T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) ?_ - intro lam hl1 hl2 - have hP := paramsOf_valid taperProfile_stdProfile (show (0:ℝ) < lam by linarith) hl2.le - exact thmE_B_lam_of_traces hs (by omega) taperProfile_stdProfile (by linarith) hl2 H.RvM - (thm_traces_chi hP (by omega) (coeffUnimodular_of_primitive hq hprim) H - (PrimeSide.localHypsEventually hP)) - (eventually_GzGpChi _ hP H.EF) - (Assembly.calE_tendsto_zero _ hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w)) - -/-- **Theorem E, third bound** [thm:E]. -/ -theorem thmE_C (hs : LSeam χ) (hprim : χ.IsPrimitive) (hq : 1 < q) - (H : PaperInputsChi (parity χ) q (coeff χ) (LZeros hs)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (3 / 4 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := by - refine Assembly.eps_form_threeQuarters (N := fun T => (NcountL χ T (2 * T) : ℝ)) - (lower := fun T => (NdistL χ T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) ?_ - intro lam hl1 hl2 - have hP := paramsOf_valid taperProfile_stdProfile (show (0:ℝ) < lam by linarith) hl2.le - exact thmE_C_lam_of_traces hs (by omega) taperProfile_stdProfile (by linarith) hl2 H.RvM - (thm_traces_chi hP (by omega) (coeffUnimodular_of_primitive hq hprim) H - (PrimeSide.localHypsEventually hP)) - (eventually_GzGpChi _ hP H.EF) - (Assembly.calE_tendsto_zero _ hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w)) + (fun _ hl1 hl2 => thmE_A_lam hs hprim hq H (by linarith) hl2) /-! ## Zero hypotheses -/ @@ -91,21 +59,8 @@ theorem paperInputsChi_L (hq : 1 < q) (hprim : χ.IsPrimitive) : at least (2/3 − ε)·N_χ(T,2T) of the zeros of Mathlib's `DirichletCharacter.LFunction χ` with ordinate in (T,2T], counted with multiplicity, are matched by distinct critical-line zeros. -/ theorem thmE_A₀ (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 / 3 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := + DyadicLowerBound (2 / 3) (fun T => N0starL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := thmE_A (LSeam_of hq hprim) hprim hq (paperInputsChi_L hq hprim) -/-- **Theorem E, bound 2, no hypotheses** (1/2 simple-and-on-line). -/ -theorem thmE_B₀ (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (1 / 2 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := - thmE_B (LSeam_of hq hprim) hprim hq (paperInputsChi_L hq hprim) - -/-- **Theorem E, bound 3, no hypotheses** (3/4 distinct). -/ -theorem thmE_C₀ (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (3 / 4 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := - thmE_C (LSeam_of hq hprim) hprim hq (paperInputsChi_L hq hprim) - end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/FoldChi.lean b/zeta23/Zeta23/ThmE/FoldChi.lean index 593eaa2bea..1d7f855762 100644 --- a/zeta23/Zeta23/ThmE/FoldChi.lean +++ b/zeta23/Zeta23/ThmE/FoldChi.lean @@ -151,49 +151,27 @@ lemma continuousAt_logDeriv_completedLSym (hq : 1 < q) (hprim : χ.IsPrimitive) /-! ## The fold -/ +private lemma continuous_logDeriv_completedLSym_horizontal (hq : 1 < q) (hprim : χ.IsPrimitive) + {T : ℝ} (hgood : ∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T) : + Continuous fun σ : ℝ => logDeriv (completedLSym χ) (σ + T * I) := + continuous_iff_continuousAt.mpr fun σ => + ContinuousAt.comp (f := fun σ : ℝ => (σ : ℂ) + T * I) + (continuousAt_logDeriv_completedLSym hq hprim (s := σ + T * I) (by simpa using hgood)) + (by fun_prop) + /-- Horizontal fold at a good height T: ∫_{−1}^{2} F(σ+iT)dσ = 2i·Im ∫_{1/2}^{2} F(σ+iT)dσ. -/ lemma horizontal_foldChi (hq : 1 < q) (hprim : χ.IsPrimitive) {T : ℝ} (hgood : ∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T) : ∫ σ in (-1 : ℝ)..2, logDeriv (completedLSym χ) (σ + T * I) - = 2 * I * ((∫ σ in (1 / 2 : ℝ)..2, logDeriv (completedLSym χ) (σ + T * I)).im : ℂ) := by - set F := logDeriv (completedLSym χ) with hF - have hcont : Continuous fun σ : ℝ => F (σ + T * I) := by - refine continuous_iff_continuousAt.mpr fun σ => ?_ - have h := continuousAt_logDeriv_completedLSym hq hprim (s := σ + T * I) (by simpa using hgood) - exact ContinuousAt.comp (f := fun σ : ℝ => (σ : ℂ) + T * I) h (by fun_prop) - have hsplit := intervalIntegral.integral_add_adjacent_intervals - (hcont.intervalIntegrable (μ := volume) (-1) (1 / 2)) - (hcont.intervalIntegrable (μ := volume) (1 / 2) 2) - rw [← hsplit] - set A := ∫ σ in (1 / 2 : ℝ)..2, F (σ + T * I) with hA - have hleft : ∫ σ in (-1 : ℝ)..(1 / 2), F (σ + T * I) = -conj A := by - have hsub := intervalIntegral.integral_comp_sub_left (f := fun x : ℝ => F (x + T * I)) - (a := (1 / 2 : ℝ)) (b := 2) (1 : ℝ) - norm_num at hsub - rw [← hsub, hA, ← intervalIntegral_conj, ← intervalIntegral.integral_neg] - apply intervalIntegral.integral_congr - intro x _ - have key := logDeriv_completedLSym_one_sub_conj hq hprim (x + T * I) - have e : (1 : ℂ) - conj ((x : ℂ) + T * I) = 1 - (x : ℂ) + T * I := by - simp [Complex.ext_iff] - simp only [hF] at key ⊢ - rw [← e, key] - rw [hleft, neg_add_eq_sub, Complex.sub_conj] - push_cast - ring + = 2 * I * ((∫ σ in (1 / 2 : ℝ)..2, logDeriv (completedLSym χ) (σ + T * I)).im : ℂ) := + Zeta23.RvM.horizontal_fold_of T (continuous_logDeriv_completedLSym_horizontal hq hprim hgood) + fun _ _ => logDeriv_completedLSym_one_sub_conj hq hprim _ /-- Vertical fold: ∫_{T₁}^{T₂} F(−1+it)dt = −conj ∫_{T₁}^{T₂} F(2+it)dt. -/ lemma vertical_foldChi (hq : 1 < q) (hprim : χ.IsPrimitive) (T₁ T₂ : ℝ) : ∫ t in T₁..T₂, logDeriv (completedLSym χ) (-1 + t * I) - = -conj (∫ t in T₁..T₂, logDeriv (completedLSym χ) (2 + t * I)) := by - rw [← intervalIntegral_conj, ← intervalIntegral.integral_neg] - apply intervalIntegral.integral_congr - intro t _ - have key := logDeriv_completedLSym_one_sub_conj hq hprim (2 + t * I) - have e : (1 : ℂ) - conj ((2 : ℂ) + t * I) = -1 + t * I := by - simp [Complex.ext_iff]; norm_num - show logDeriv (completedLSym χ) (-1 + t * I) = -conj (logDeriv (completedLSym χ) (2 + t * I)) - rw [← e, key] + = -conj (∫ t in T₁..T₂, logDeriv (completedLSym χ) (2 + t * I)) := + Zeta23.RvM.vertical_fold_of fun _ _ => logDeriv_completedLSym_one_sub_conj hq hprim _ /-- **The fold** for Λ_sym(s,χ): for good heights T₁ ≤ T₂ (any sign), ∮_{∂([−1,2]×[T₁,T₂])} Λ_sym'/Λ_sym = 2i·Im(halfContour (Λ_sym'/Λ_sym) T₁ T₂). -/ @@ -201,39 +179,23 @@ theorem rectangleIntegral_logDeriv_completedLSym_eq_halfContour (hq : 1 < q) (hprim : χ.IsPrimitive) {T₁ T₂ : ℝ} (hg1 : ∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T₁) (hg2 : ∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T₂) : RectangleIntegral (logDeriv (completedLSym χ)) (-1 + T₁ * I) (2 + T₂ * I) - = 2 * I * ((Zeta23.RvM.halfContour (logDeriv (completedLSym χ)) T₁ T₂).im : ℂ) := by - have hre1 : (-1 + T₁ * I).re = -1 := by simp - have him1 : (-1 + T₁ * I).im = T₁ := by simp - have hre2 : (2 + T₂ * I : ℂ).re = 2 := by simp - have him2 : (2 + T₂ * I : ℂ).im = T₂ := by simp - simp only [RectangleIntegral, HIntegral, VIntegral, hre1, him1, hre2, him2, smul_eq_mul, - Complex.ofReal_neg, Complex.ofReal_one, Complex.ofReal_ofNat] - rw [horizontal_foldChi hq hprim hg1, horizontal_foldChi hq hprim hg2, vertical_foldChi hq hprim T₁ T₂] - simp only [Zeta23.RvM.halfContour, Complex.add_im, Complex.sub_im, Complex.mul_I_im] - generalize (∫ σ in (1 / 2 : ℝ)..2, logDeriv (completedLSym χ) (σ + T₁ * I)) = A₁ - generalize (∫ σ in (1 / 2 : ℝ)..2, logDeriv (completedLSym χ) (σ + T₂ * I)) = A₂ - generalize (∫ t in T₁..T₂, logDeriv (completedLSym χ) (2 + t * I)) = B - have e1 : 2 * I * (A₁.im : ℂ) - 2 * I * (A₂.im : ℂ) + I * B - I * -conj B - = 2 * I * (A₁.im : ℂ) - 2 * I * (A₂.im : ℂ) + I * (B + conj B) := by ring - rw [e1, Complex.add_conj] - push_cast - ring + = 2 * I * ((Zeta23.RvM.halfContour (logDeriv (completedLSym χ)) T₁ T₂).im : ℂ) := + Zeta23.RvM.rectangleIntegral_eq_halfContour_of_fold + (continuous_logDeriv_completedLSym_horizontal hq hprim hg1) + (continuous_logDeriv_completedLSym_horizontal hq hprim hg2) + (fun _ _ => logDeriv_completedLSym_one_sub_conj hq hprim _) + (fun _ _ => logDeriv_completedLSym_one_sub_conj hq hprim _) + (fun _ _ => logDeriv_completedLSym_one_sub_conj hq hprim _) /-- **N_χ(T₁,T₂) = (1/π)·Im ∫_L Λ_sym'/Λ_sym** for good heights T₁ ≤ T₂ of any sign. -/ theorem NcountL_eq_im_halfContour (hq : 1 < q) (hprim : χ.IsPrimitive) {T₁ T₂ : ℝ} (h12 : T₁ ≤ T₂) (hg1 : ∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T₁) (hg2 : ∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T₂) : (NcountL χ T₁ T₂ : ℝ) - = (1 / Real.pi) * (Zeta23.RvM.halfContour (logDeriv (completedLSym χ)) T₁ T₂).im := by - have h := rectangleIntegral'_logDeriv_completedLSym_eq_NcountL hq hprim h12 hg1 hg2 - change (1 / (2 * Real.pi * I)) • RectangleIntegral _ _ _ = _ at h - rw [rectangleIntegral_logDeriv_completedLSym_eq_halfContour hq hprim hg1 hg2, smul_eq_mul] at h - have h' : ((NcountL χ T₁ T₂ : ℝ) : ℂ) - = (((1 / Real.pi) * (Zeta23.RvM.halfContour (logDeriv (completedLSym χ)) T₁ T₂).im : ℝ) : ℂ) := by - push_cast - rw [← h] - field_simp - exact_mod_cast h' + = (1 / Real.pi) * (Zeta23.RvM.halfContour (logDeriv (completedLSym χ)) T₁ T₂).im := + Zeta23.RvM.natCast_eq_im_halfContour + (rectangleIntegral'_logDeriv_completedLSym_eq_NcountL hq hprim h12 hg1 hg2) + (rectangleIntegral_logDeriv_completedLSym_eq_halfContour hq hprim hg1 hg2) end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/FullLineChi.lean b/zeta23/Zeta23/ThmE/FullLineChi.lean index b7bb191530..3a85c23b84 100644 --- a/zeta23/Zeta23/ThmE/FullLineChi.lean +++ b/zeta23/Zeta23/ThmE/FullLineChi.lean @@ -14,7 +14,6 @@ import Zeta23.ThmE.ContourChi import Zeta23.ThmE.LocalCountChi import Zeta23.ThmE.GzGpChi import Zeta23.WeilEF.GoodHeights -import Zeta23.ThmE.LandauChi import Zeta23.WeilEF.ZeroSummabilityGen noncomputable section @@ -42,64 +41,7 @@ lemma isNontrivialZeroL_of_mem_closedBall (hχ1 : χ ≠ 1) {t r : ℝ} (hr : r by_contra h exact DirichletCharacter.LFunction_ne_zero_of_one_le_re χ (Or.inl hχ1) (not_lt.mp h) hz -/-- a finite set of nontrivial zeros with ordinates in (a, a+6] has total multiplicity -≤ 6 A₀ log(|a|+9) (six unit windows of the local count). -/ -lemma sum_mult_six_windows_L (hs : LSeam χ) {A₀ : ℝ} - (hLC : Tail.LocalCount (fun ρ : (LZeros hs).carrier => (ρ : ℂ).im) - (fun ρ : (LZeros hs).carrier => (LZeros hs).mult ρ) A₀) - {a : ℤ} (F : Finset (LZeros hs).carrier) - (hF : ∀ ρ ∈ F, (a : ℝ) < (ρ : ℂ).im ∧ (ρ : ℂ).im ≤ (a : ℝ) + 6) : - ∑ ρ ∈ F, ((LZeros hs).mult ρ : ℝ) ≤ 6 * (A₀ * Real.log (|(a : ℝ)| + 9)) := by - classical - have hA₀ := hLC.A₀_pos.le - -- key k : ℕ with a + k < Im ≤ a + k + 1 - set key : (LZeros hs).carrier → ℕ := fun ρ => (⌈(ρ : ℂ).im⌉ - a - 1).toNat with hkey - have hkey_spec : ∀ ρ ∈ F, ((a : ℝ) + key ρ < (ρ : ℂ).im ∧ (ρ : ℂ).im ≤ (a : ℝ) + key ρ + 1) - ∧ key ρ < 6 := by - intro ρ hρ - obtain ⟨h1, h2⟩ := hF ρ hρ - have hc1 := Int.le_ceil (ρ : ℂ).im - have hc2 := Int.ceil_lt_add_one (ρ : ℂ).im - have hlo : a + 1 ≤ ⌈(ρ : ℂ).im⌉ := by - have : (a : ℝ) < ⌈(ρ : ℂ).im⌉ := lt_of_lt_of_le h1 hc1 - have : a < ⌈(ρ : ℂ).im⌉ := by exact_mod_cast this - omega - have hhi : ⌈(ρ : ℂ).im⌉ ≤ a + 6 := by - have : (⌈(ρ : ℂ).im⌉ : ℝ) < (a : ℝ) + 6 + 1 := by linarith - have : ⌈(ρ : ℂ).im⌉ < a + 6 + 1 := by exact_mod_cast this - omega - have hk : ((key ρ : ℕ) : ℤ) = ⌈(ρ : ℂ).im⌉ - a - 1 := by - simp only [hkey]; rw [Int.toNat_of_nonneg (by omega)] - have hkR : ((key ρ : ℕ) : ℝ) = (⌈(ρ : ℂ).im⌉ : ℝ) - a - 1 := by exact_mod_cast hk - refine ⟨⟨by linarith, by linarith⟩, ?_⟩ - have : ((key ρ : ℕ) : ℤ) < 6 := by omega - exact_mod_cast this - have h := Tail.sum_mult_le_of_windows F (fun ρ => (LZeros hs).mult ρ) key 6 - (C := A₀ * Real.log (|(a : ℝ)| + 9)) (fun ρ hρ => (hkey_spec ρ hρ).2) (fun k hk => by - have hw := hLC.window ((a : ℝ) + k) (F.filter fun ρ => key ρ = k) (fun ρ hρ => by - simp only [Finset.mem_filter] at hρ - have := (hkey_spec ρ hρ.1).1 - rw [hρ.2] at this; exact this) - refine hw.trans (mul_le_mul_of_nonneg_left ?_ hA₀) - apply Real.log_le_log (by positivity) - have : |(a : ℝ) + k| ≤ |(a : ℝ)| + k := by - calc |(a:ℝ) + k| ≤ |(a:ℝ)| + |(k:ℝ)| := abs_add_le _ _ - _ = |(a:ℝ)| + k := by rw [Nat.abs_cast] - have hk6 : (k : ℝ) < 6 := by exact_mod_cast hk - linarith) - simpa using h - -/-- card ≤ total multiplicity (each nontrivial zero has multiplicity ≥ 1). -/ -lemma card_le_sum_mult_L (hs : LSeam χ) (F : Finset (LZeros hs).carrier) : - (F.card : ℝ) ≤ ∑ ρ ∈ F, ((LZeros hs).mult ρ : ℝ) := by - rw [Finset.card_eq_sum_ones, Nat.cast_sum] - refine Finset.sum_le_sum fun ρ _ => ?_ - exact_mod_cast (LZeros hs).one_le_mult ρ ρ.2 - -set_option maxHeartbeats 1600000 in -/-- Good heights for L(s,χ) (template: Zeta23.WeilEF.good_heights; gap-selection via -exists_far_point + localCountChi; the L'/L bound via L_logDeriv_partial_fraction's count -conjunct, both ±R as in the ζ-case). -/ +/-- Good heights for L(s,χ) (delegates to `Zeta23.WeilEF.good_heights_of`). -/ theorem good_heights_chi (hq : 1 < q) (hprim : χ.IsPrimitive) : ∃ C : ℝ, 0 < C ∧ ∀ j : ℕ, 7 ≤ j → ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ @@ -108,181 +50,11 @@ theorem good_heights_chi (hq : 1 < q) (hprim : χ.IsPrimitive) : ‖logDeriv χ.LFunction s‖ ≤ C * (Real.log ((q:ℝ) * ((j : ℝ) + 3))) ^ 2 := by have hχ1 : χ ≠ 1 := ne_one_of_primitive hq hprim have hs : LSeam χ := LSeam_of hq hprim - have hq1 : (1 : ℝ) ≤ (q : ℝ) := by exact_mod_cast hq.le - have hlogq : 0 ≤ Real.log (q : ℝ) := Real.log_nonneg hq1 - classical obtain ⟨C, hC, hpf⟩ := L_logDeriv_partial_fraction hχ1 obtain ⟨A₀, hA₀, hloc⟩ := localCountChi hq hprim - have hloc' : ∀ t : ℝ, ((LZeros hs).N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3) := by - intro t; rw [LZeros_N]; exact hloc t - have hLC := Tail.LocalCount.ofWindowCount (LZeros hs) hA₀ hloc' - refine ⟨2 * C * (48 * A₀ + 3), by positivity, fun j hj => ?_⟩ - have hj7 : (7 : ℝ) ≤ j := by exact_mod_cast hj - set Lj : ℝ := Real.log ((j : ℝ) + 3) with hLj - set Lg : ℝ := Real.log ((q : ℝ) * ((j : ℝ) + 3)) with hLg - have hLgq : Lg = Real.log (q : ℝ) + Lj := by - rw [hLg, hLj, Real.log_mul (by positivity) (by positivity)] - have hLj1 : 1 ≤ Lj := by - rw [hLj, ← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - have hLjLg : Lj ≤ Lg := by rw [hLgq]; linarith - have hLg1 : 1 ≤ Lg := hLj1.trans hLjLg - have hlog2j : Real.log 2 ≤ Lj := by - rw [hLj]; exact Real.log_le_log (by norm_num) (by linarith) - have hlog2 : Real.log 2 ≤ Lg := hlog2j.trans hLjLg - -- the two finite families of zeros near height ±j - set Wp : Set ℂ := (LZeros hs).window ((j : ℝ) - 3) ((j : ℝ) + 3) with hWp - set Wm : Set ℂ := (LZeros hs).window (-(j : ℝ) - 4) (-(j : ℝ) + 2) with hWm - have hWpfin : ((fun ρ : (LZeros hs).carrier => (ρ : ℂ)) ⁻¹' Wp).Finite := - ((LZeros hs).finite_window _ _).preimage Subtype.val_injective.injOn - have hWmfin : ((fun ρ : (LZeros hs).carrier => (ρ : ℂ)) ⁻¹' Wm).Finite := - ((LZeros hs).finite_window _ _).preimage Subtype.val_injective.injOn - set Fp : Finset (LZeros hs).carrier := hWpfin.toFinset with hFp - set Fm : Finset (LZeros hs).carrier := hWmfin.toFinset with hFm - have hFp_mem : ∀ ρ : (LZeros hs).carrier, ρ ∈ Fp ↔ (ρ : ℂ) ∈ Wp := fun ρ => by - rw [hFp, Set.Finite.mem_toFinset]; rfl - have hFm_mem : ∀ ρ : (LZeros hs).carrier, ρ ∈ Fm ↔ (ρ : ℂ) ∈ Wm := fun ρ => by - rw [hFm, Set.Finite.mem_toFinset]; rfl - set S : Finset ℝ := Fp.image (fun ρ : (LZeros hs).carrier => (ρ : ℂ).im) - ∪ Fm.image (fun ρ : (LZeros hs).carrier => -(ρ : ℂ).im) with hS - -- count: |S| ≤ 24 A₀ Lg - have hcountp : ∑ ρ ∈ Fp, ((LZeros hs).mult ρ : ℝ) ≤ 6 * (A₀ * (2 * Lg)) := by - have h := sum_mult_six_windows_L hs hLC (a := (j : ℤ) - 3) Fp (fun ρ hρ => by - have := ((hFp_mem ρ).mp hρ).2; push_cast; constructor <;> linarith [this.1, this.2]) - refine h.trans (mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left ?_ hLC.A₀_pos.le) - (by norm_num)) - · have : |((j : ℤ) - 3 : ℤ)| = (j : ℤ) - 3 := abs_of_nonneg (by omega) - have habs : |(((j:ℤ) - 3 : ℤ) : ℝ)| = (j : ℝ) - 3 := by - rw [← Int.cast_abs, this]; push_cast; ring - rw [habs] - calc Real.log ((j:ℝ) - 3 + 9) ≤ Real.log (2 * ((j:ℝ) + 3)) := - Real.log_le_log (by linarith) (by linarith) - _ = Real.log 2 + Lj := by rw [Real.log_mul (by norm_num) (by linarith)] - _ ≤ 2 * Lg := by linarith - have hcountm : ∑ ρ ∈ Fm, ((LZeros hs).mult ρ : ℝ) ≤ 6 * (A₀ * (2 * Lg)) := by - have h := sum_mult_six_windows_L hs hLC (a := -(j : ℤ) - 4) Fm (fun ρ hρ => by - have := ((hFm_mem ρ).mp hρ).2; push_cast; constructor <;> linarith [this.1, this.2]) - refine h.trans (mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left ?_ hLC.A₀_pos.le) - (by norm_num)) - · have : |(-(j : ℤ) - 4 : ℤ)| = (j : ℤ) + 4 := by - rw [abs_of_nonpos (by omega)]; ring - have habs : |((-(j:ℤ) - 4 : ℤ) : ℝ)| = (j : ℝ) + 4 := by - rw [← Int.cast_abs, this]; push_cast; ring - rw [habs] - calc Real.log ((j:ℝ) + 4 + 9) ≤ Real.log (((j:ℝ) + 3) ^ 2) := by - apply Real.log_le_log (by linarith); nlinarith - _ = 2 * Lj := by rw [Real.log_pow]; push_cast; ring - _ ≤ 2 * Lg := by linarith - have hcard : (S.card : ℝ) ≤ 24 * A₀ * Lg := by - have h1 : S.card ≤ Fp.card + Fm.card := - (Finset.card_union_le _ _).trans (Nat.add_le_add Finset.card_image_le Finset.card_image_le) - have h1' : (S.card : ℝ) ≤ Fp.card + Fm.card := by exact_mod_cast h1 - linarith [card_le_sum_mult_L hs Fp, card_le_sum_mult_L hs Fm] - -- the good height - obtain ⟨R, hR1, hR2, hfar⟩ := exists_far_point S j - set δ : ℝ := 1 / (2 * ((S.card : ℝ) + 1)) with hδ - have hδpos : 0 < δ := by rw [hδ]; positivity - have hδinv : 1 / δ = 2 * ((S.card : ℝ) + 1) := by rw [hδ, one_div_one_div] - refine ⟨R, hR1, hR2, fun s hs' hσ1 hσ2 => ?_⟩ - have hR6 : (6 : ℝ) ≤ |R| := by rw [abs_of_nonneg (by linarith)]; linarith - have hR6' : (6 : ℝ) ≤ |-R| := by rwa [abs_neg] - have hlogR : Real.log ((q : ℝ) * (|R| + 3)) ≤ 2 * Lg := by - rw [abs_of_nonneg (by linarith), Real.log_mul (by positivity) (by linarith)] - have : Real.log (R + 3) ≤ Real.log 2 + Lj := by - calc Real.log (R + 3) ≤ Real.log (2 * ((j:ℝ) + 3)) := Real.log_le_log (by linarith) (by linarith) - _ = Real.log 2 + Lj := by rw [Real.log_mul (by norm_num) (by linarith)] - rw [hLgq]; linarith - -- s in the conclusion ball of the partial fraction at t = s.im - have hsball : s ∈ Metric.closedBall (2 + s.im * I) (3 / 2) := by - rw [Metric.mem_closedBall, dist_eq_norm] - have : s - (2 + s.im * I) = ((s.re - 2 : ℝ) : ℂ) := by - apply Complex.ext <;> simp - rw [this, Complex.norm_real, Real.norm_eq_abs, abs_sub_comm, abs_of_nonneg (by linarith)] - linarith - -- every zero in the pf ball at height s.im = ±R has its (signed) ordinate in S - have hordS : ∀ ρ : ℂ, ρ ∈ Metric.closedBall (2 + s.im * I) (22/25 * (91/50)) → - χ.LFunction ρ = 0 → δ ≤ ‖s - ρ‖ := by - intro ρ hρ hz - have hnt := isNontrivialZeroL_of_mem_closedBall hχ1 (by norm_num) hρ hz - have him := im_mem_of_mem_closedBall hρ - rw [abs_le] at him - have hρc : ρ ∈ (LZeros hs).carrier := by rw [LZeros_carrier]; exact hnt - refine le_trans ?_ (abs_im_sub_le_norm_sub s ρ) - rcases hs' with hsR | hsR - · -- Im ρ ∈ S via Fp - have hmem : (⟨ρ, hρc⟩ : (LZeros hs).carrier) ∈ Fp := by - rw [hFp_mem] - refine ⟨hρc, ?_, ?_⟩ <;> rw [hsR] at him <;> nlinarith - have : ρ.im ∈ S := by - rw [hS, Finset.mem_union]; left - exact Finset.mem_image.mpr ⟨(⟨ρ, hρc⟩ : (LZeros hs).carrier), hmem, rfl⟩ - have := hfar _ this - rwa [hsR] - · have hmem : (⟨ρ, hρc⟩ : (LZeros hs).carrier) ∈ Fm := by - rw [hFm_mem] - refine ⟨hρc, ?_, ?_⟩ <;> rw [hsR] at him <;> nlinarith - have : -ρ.im ∈ S := by - rw [hS, Finset.mem_union]; right - exact Finset.mem_image.mpr ⟨(⟨ρ, hρc⟩ : (LZeros hs).carrier), hmem, rfl⟩ - have := hfar _ this - rw [hsR, show |(-R) - ρ.im| = |R - (-ρ.im)| by rw [← abs_neg]; ring_nf] - exact this - -- L(s,χ) ≠ 0: s itself would be a zero in the ball at distance 0 - have hζ : χ.LFunction s ≠ 0 := by - intro hz - have h0 := hordS s (Metric.closedBall_subset_closedBall (by norm_num) hsball) hz - simp at h0; linarith - refine ⟨hζ, ?_⟩ - -- apply the partial fraction at t := s.im - have ht6 : (6 : ℝ) ≤ |s.im| := by rcases hs' with h | h <;> rw [h] <;> assumption - obtain ⟨Z, hZ, hZsum, hZpf⟩ := hpf s.im ht6 - have hZpf' := hZpf s hsball hζ - have hlogt : Real.log ((q : ℝ) * (|s.im| + 3)) ≤ 2 * Lg := by - rcases hs' with h | h - · rw [h]; exact hlogR - · rw [h, abs_neg]; exact hlogR - -- the sum over Z - have hZmem : ∀ ρ ∈ Z, ρ ∈ Metric.closedBall (2 + s.im * I) (22/25 * (91/50)) ∧ χ.LFunction ρ = 0 := by - intro ρ hρ - have : ρ ∈ (↑Z : Set ℂ) := hρ - rw [hZ] at this - exact this - have hsumZ : ‖∑ ρ ∈ Z, (analyticOrderNatAt χ.LFunction ρ : ℂ) / (s - ρ)‖ - ≤ (C * (2 * Lg)) * (1 / δ) := by - calc ‖∑ ρ ∈ Z, (analyticOrderNatAt χ.LFunction ρ : ℂ) / (s - ρ)‖ - ≤ ∑ ρ ∈ Z, ‖(analyticOrderNatAt χ.LFunction ρ : ℂ) / (s - ρ)‖ := norm_sum_le _ _ - _ ≤ ∑ ρ ∈ Z, (analyticOrderNatAt χ.LFunction ρ : ℝ) * (1 / δ) := by - refine Finset.sum_le_sum fun ρ hρ => ?_ - obtain ⟨hρb, hρz⟩ := hZmem ρ hρ - have hd := hordS ρ hρb hρz - have hsρ : 0 < ‖s - ρ‖ := lt_of_lt_of_le hδpos hd - rw [norm_div, Complex.norm_natCast, div_eq_mul_one_div] - refine mul_le_mul_of_nonneg_left ?_ (Nat.cast_nonneg _) - exact one_div_le_one_div_of_le hδpos hd - _ = (∑ ρ ∈ Z, (analyticOrderNatAt χ.LFunction ρ : ℝ)) * (1 / δ) := by rw [Finset.sum_mul] - _ ≤ (C * (2 * Lg)) * (1 / δ) := by - refine mul_le_mul_of_nonneg_right (hZsum.trans ?_) (one_div_nonneg.mpr hδpos.le) - exact mul_le_mul_of_nonneg_left hlogt hC.le - -- assemble - have hmain : ‖logDeriv χ.LFunction s‖ ≤ C * (2 * Lg) + (C * (2 * Lg)) * (1 / δ) := by - have h1 : ‖logDeriv χ.LFunction s‖ - ≤ ‖logDeriv χ.LFunction s - ∑ ρ ∈ Z, (analyticOrderNatAt χ.LFunction ρ : ℂ) / (s - ρ)‖ - + ‖∑ ρ ∈ Z, (analyticOrderNatAt χ.LFunction ρ : ℂ) / (s - ρ)‖ := norm_le_norm_sub_add _ _ - have h2 := hZpf'.trans (mul_le_mul_of_nonneg_left hlogt hC.le) - linarith [hsumZ] - refine hmain.trans ?_ - rw [hδinv] - have hc := hcard - have hA := hLC.A₀_pos.le - -- C·2Lg·(1 + 2(n+1)) ≤ 2C(48A₀+3) Lg² - have : C * (2 * Lg) + C * (2 * Lg) * (2 * ((S.card : ℝ) + 1)) - = 2 * C * Lg * (2 * (S.card : ℝ) + 3) := by ring - rw [this] - have hn : 2 * (S.card : ℝ) + 3 ≤ (48 * A₀ + 3) * Lg := by nlinarith - calc 2 * C * Lg * (2 * (S.card : ℝ) + 3) ≤ 2 * C * Lg * ((48 * A₀ + 3) * Lg) := - mul_le_mul_of_nonneg_left hn (by positivity) - _ = 2 * C * (48 * A₀ + 3) * Real.log ((q : ℝ) * ((j : ℝ) + 3)) ^ 2 := by rw [hLg]; ring + exact good_heights_of (LZeros hs) χ.LFunction (q : ℝ) (by exact_mod_cast hq.le) hC hpf hA₀ + (fun t => by rw [LZeros_N]; exact hloc t) + (fun hρ hz => by rw [LZeros_carrier]; exact isNontrivialZeroL_of_mem_closedBall hχ1 (by norm_num) hρ hz) /-- Zero-sum summability for L(s,χ) (template: Zeta23.WeilEF.EF_zero_sum_summable via the local count; with good_heights_chi). -/ diff --git a/zeta23/Zeta23/ThmE/FullLineChiAssembly.lean b/zeta23/Zeta23/ThmE/FullLineChiAssembly.lean index d2b8da4f42..52cf22ca24 100644 --- a/zeta23/Zeta23/ThmE/FullLineChiAssembly.lean +++ b/zeta23/Zeta23/ThmE/FullLineChiAssembly.lean @@ -10,7 +10,6 @@ good_heights_chi (FullLineChi), horizontal_vanish_chi (HorizontalChi), verticals_eq_chi + zero_sum_limit_chi (FullLineChiFold), and the χ majorant pack (FullLineChiProof). Template: Zeta23/WeilEF/FullLineAssembly.lean. -/ -import Zeta23.ThmE.FullLineChiProof import Zeta23.ThmE.FullLineChiFold import Zeta23.ThmE.HorizontalChi import Zeta23.WeilEF.FullLineAssembly @@ -37,24 +36,15 @@ theorem exists_heights_chi (hq : 1 < q) (hprim : χ.IsPrimitive) : ∀ s : ℂ, (s.im = R j ∨ s.im = -R j) → 1 / 2 ≤ s.re → s.re ≤ 2 → χ.LFunction s ≠ 0 ∧ ‖logDeriv χ.LFunction s‖ ≤ Cg * (Real.log ((q:ℝ) * ((j : ℝ) + 10))) ^ 2 := by obtain ⟨C, hC, h⟩ := good_heights_chi hq hprim - have hex : ∀ j : ℕ, ∃ R : ℝ, ((j + 7 : ℕ) : ℝ) ≤ R ∧ R ≤ ((j + 7 : ℕ) : ℝ) + 1 ∧ - ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → - χ.LFunction s ≠ 0 ∧ - ‖logDeriv χ.LFunction s‖ ≤ C * (Real.log ((q:ℝ) * (((j + 7 : ℕ) : ℝ) + 3))) ^ 2 := - fun j => h (j + 7) (by omega) - refine ⟨C, hC, fun j => (hex j).choose, fun j => ?_⟩ - dsimp only - obtain ⟨hs1, hs2, hs3⟩ := (hex j).choose_spec - have e : ((j + 7 : ℕ) : ℝ) = (j : ℝ) + 7 := by push_cast; ring - refine ⟨?_, ?_, ?_⟩ - · calc (j : ℝ) + 7 = ((j + 7 : ℕ) : ℝ) := e.symm - _ ≤ _ := hs1 - · exact hs2.trans (by rw [e]; linarith) - · intro s him h1 h2 - have e3 : Real.log ((q:ℝ) * (((j + 7 : ℕ) : ℝ) + 3)) = Real.log ((q:ℝ) * ((j : ℝ) + 10)) := by - rw [e]; ring_nf - obtain ⟨h3, h4⟩ := hs3 s him h1 h2 - exact ⟨h3, by rwa [e3] at h4⟩ + obtain ⟨R, hR⟩ := exists_heights_reindex + (P := fun x R => ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → + χ.LFunction s ≠ 0 ∧ ‖logDeriv χ.LFunction s‖ ≤ C * (Real.log ((q : ℝ) * x)) ^ 2) + (j₀ := 7) (m := 7) le_rfl h + refine ⟨C, hC, R, fun j => ?_⟩ + obtain ⟨h1, h2, h3⟩ := hR j + refine ⟨by norm_num at h1 ⊢; linarith, by norm_num at h2 ⊢; linarith, fun s him hr1 hr2 => ?_⟩ + have e : (q : ℝ) * ((j : ℝ) + (7 : ℕ) + 3) = (q : ℝ) * ((j : ℝ) + 10) := by push_cast; ring + simpa only [e] using h3 s him hr1 hr2 /-! ## Λ(·,χ) ≠ 0 on the horizontal sides (left half by the functional equation + conjugation: Λ_sym(s,χ) = W(χ)·conj Λ_sym(1 − conj s, χ), and 1 − conj s has re = 1 − re s > 1/2, SAME im) -/ @@ -141,10 +131,8 @@ theorem tendsto_interval_FlineChi (hq : 1 < q) (hprim : χ.IsPrimitive) {k : ℝ (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3 / 2) {R : ℕ → ℝ} (hR : ∀ j : ℕ, (j : ℝ) ≤ R j) : Tendsto (fun j : ℕ => ∫ t in (-R j)..R j, FlineChi χ k c t) atTop - (𝓝 (∫ t, FlineChi χ k c t)) := by - have hRtop : Tendsto R atTop atTop := tendsto_atTop_mono hR tendsto_natCast_atTop_atTop - exact intervalIntegral_tendsto_integral (integrable_FlineChi hq hprim hk hkc hc1 hc2) - (tendsto_neg_atTop_atBot.comp hRtop) hRtop + (𝓝 (∫ t, FlineChi χ k c t)) := + tendsto_intervalIntegral_of_integrable (integrable_FlineChi hq hprim hk hkc hc1 hc2) hR /-! ## The assembly -/ @@ -158,47 +146,19 @@ theorem full_line_identity_chi' (hq : 1 < q) (hprim : χ.IsPrimitive) = ∑' ρ : (LZeros (LSeam_of hq hprim)).carrier, ((LZeros (LSeam_of hq hprim)).mult ρ : ℂ) * Hfn k ρ := by obtain ⟨Cg, hCg, R, hR⟩ := exists_heights_chi hq hprim - set f : ℂ → ℂ := fun s => Hfn k s * logDeriv (completedLSym χ) s with hf - -- the rectangle identity at every height R_j have hrect : ∀ j : ℕ, ∃ Z : Finset ℂ, ((Z : Set ℂ) = {ρ : ℂ | IsNontrivialZeroL χ ρ ∧ -R j < ρ.im ∧ ρ.im < R j}) ∧ - RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) - = ∑ ρ ∈ Z, (zeroMultL χ ρ : ℂ) * Hfn k ρ := by - intro j - obtain ⟨h1, h2, h3⟩ := hR j - exact rectangle_identity_chi hq hprim hk hkc hc1 hc2 (R := R j) (by linarith) + RectangleIntegral' (fun s => Hfn k s * logDeriv (completedLSym χ) s) + (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) + = ∑ ρ ∈ Z, (zeroMultL χ ρ : ℂ) * Hfn k ρ := fun j => + rectangle_identity_chi hq hprim hk hkc hc1 hc2 (R := R j) (by linarith [(hR j).1]) (completedL_ne_zero_on_horizontals hq hprim hc1 hc2 - (fun s him hr1 hr2 => (h3 s him hr1 hr2).1)) + (fun s him hr1 hr2 => ((hR j).2.2 s him hr1 hr2).1)) choose Z hZ hE using hrect - -- the three limits obtain ⟨hHtop, hHbot⟩ := horizontal_vanish_chi hq hprim hk hkc hc1 hc2 hCg hR - have hZlim := zero_sum_limit_chi hq hprim hk hkc (R := R) (fun j => ⟨(hR j).1, (hR j).2.1⟩) hZ - have hV := tendsto_interval_FlineChi hq hprim hk hkc hc1 hc2 (R := R) - (fun j => by linarith [(hR j).1]) - -- decomposition of the normalized rectangle integral - have hdec : ∀ j : ℕ, RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) - = (1 / (2 * Real.pi * I) : ℂ) * (HIntegral f (1 - c) c (-(R j)) - HIntegral f (1 - c) c (R j)) - + (1 / (2 * Real.pi) : ℂ) * ∫ t in (-R j)..R j, FlineChi χ k c t := by - intro j - obtain ⟨e1, e2, e3, e4⟩ := corner_re_im c (R j) - rw [RectangleIntegral', RectangleIntegral, smul_eq_mul, e1, e2, e3, e4] - have hv := verticals_eq_chi hq hprim hk hkc hc1 hc2 (R j) - rw [hf] - rw [show ∀ A B V₁ V₂ : ℂ, A - B + V₁ - V₂ = (A - B) + (V₁ - V₂) from fun _ _ _ _ => by ring, hv, - smul_eq_mul, mul_add, inv_two_pi_I_mul_I] - -- LHS → (1/2π) ∫ F - have hL : Tendsto (fun j : ℕ => RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I)) - atTop (𝓝 ((1 / (2 * Real.pi) : ℂ) * ∫ t, FlineChi χ k c t)) := by - have h := ((hHbot.sub hHtop).const_mul (1 / (2 * Real.pi * I) : ℂ)).add - (hV.const_mul (1 / (2 * Real.pi) : ℂ)) - simp only [sub_zero, mul_zero, zero_add] at h - refine h.congr fun j => ?_ - rw [hdec j] - have hL' : Tendsto (fun j : ℕ => ∑ ρ ∈ Z j, (zeroMultL χ ρ : ℂ) * Hfn k ρ) - atTop (𝓝 ((1 / (2 * Real.pi) : ℂ) * ∫ t, FlineChi χ k c t)) := - hL.congr fun j => hE j - have := tendsto_nhds_unique hL' hZlim - exact this + exact full_line_limit_of hE (fun j => verticals_eq_chi hq hprim hk hkc hc1 hc2 (R j)) hHtop hHbot + (tendsto_interval_FlineChi hq hprim hk hkc hc1 hc2 (fun j => by linarith [(hR j).1])) + (zero_sum_limit_chi hq hprim hk hkc (fun j => ⟨(hR j).1, (hR j).2.1⟩) hZ) end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/FullLineChiFold.lean b/zeta23/Zeta23/ThmE/FullLineChiFold.lean index 0091aebaa9..e0dc2277dc 100644 --- a/zeta23/Zeta23/ThmE/FullLineChiFold.lean +++ b/zeta23/Zeta23/ThmE/FullLineChiFold.lean @@ -16,6 +16,7 @@ zero_sum_limit (ZeroSumLimit.lean): -/ import Zeta23.ThmE.FullLineChi import Zeta23.WeilEF.FullLine +import Zeta23.WeilEF.ZeroSumLimit import Zeta23.ThmE.FoldChi open Complex MeasureTheory Set Topology Filter DirichletCharacter @@ -60,49 +61,15 @@ theorem verticals_eq_chi (hq : 1 < q) (hprim : χ.IsPrimitive) {k : ℝ → ℂ} - VIntegral (fun s => Hfn k s * logDeriv (completedLSym χ) s) (1 - c) (-R) R = I • ∫ t in (-R)..R, FlineChi χ k c t := by have hχ1 := ne_one_of_primitive hq hprim - have hprim' : χ⁻¹.IsPrimitive := isPrimitive_inv hprim - set L := logDeriv (completedLSym χ) with hL - set L' := logDeriv (completedLSym χ⁻¹) with hL' - have hLc : Continuous (fun t : ℝ => L ((c : ℂ) + t * I)) := - continuous_logDeriv_completedLSym_line hq hprim hc1 - have hL'c : Continuous (fun t : ℝ => L' ((c : ℂ) + t * I)) := - continuous_logDeriv_completedLSym_line (χ := χ⁻¹) hq hprim' hc1 - have hHc := continuous_Hfn_line hk hkc c - have hH2 : Continuous (fun t : ℝ => Hfn k (1 - c - t * I)) := by - have h := continuous_Hfn_line hk hkc (1 - c) - have : (fun t : ℝ => Hfn k (1 - c - t * I)) - = (fun t : ℝ => Hfn k (((1 - c : ℝ) : ℂ) + t * I)) ∘ fun t : ℝ => -t := by - funext t; simp only [Function.comp_apply, one_sub_cast] - rw [this]; exact h.comp continuous_neg - -- the left-line integrand, pointwise: L((1−c)+iy,χ) = −L'(c−iy,χ⁻¹) - have hleft : ∀ y : ℝ, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * L (((1 - c : ℝ) : ℂ) + y * I) - = -(Hfn k (1 - c - ((-y : ℝ) : ℂ) * I) * L' ((c : ℂ) + ((-y : ℝ) : ℂ) * I)) := by - intro y - have hs : ((1 - c : ℝ) : ℂ) + y * I = 1 - conj ((c : ℂ) + y * I) := by - apply Complex.ext <;> simp - have hval : L (((1 - c : ℝ) : ℂ) + y * I) = -L' ((c : ℂ) + ((-y : ℝ) : ℂ) * I) := by - rw [hs, hL, logDeriv_completedLSym_one_sub_conj hq hprim, hL', + exact verticals_fold_of hk hkc + (continuous_logDeriv_completedLSym_line hq hprim hc1) + (continuous_logDeriv_completedLSym_line (χ := χ⁻¹) hq (isPrimitive_inv hprim) hc1) + (fun y => by + have hs : ((1 - c : ℝ) : ℂ) + y * I = 1 - conj ((c : ℂ) + y * I) := by + apply Complex.ext <;> simp + rw [hs, logDeriv_completedLSym_one_sub_conj hq hprim, ← logDeriv_completedLSym_inv_conj hq hχ1] - congr 2 - apply Complex.ext <;> simp - have hH : Hfn k (((1 - c : ℝ) : ℂ) + y * I) = Hfn k (1 - c - ((-y : ℝ) : ℂ) * I) := by - congr 1; push_cast; ring - rw [hval, hH]; ring - have hI1 : IntervalIntegrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * L ((c : ℂ) + t * I)) - volume (-R) R := (hHc.mul hLc).intervalIntegrable _ _ - have hI2 : IntervalIntegrable (fun t : ℝ => Hfn k (1 - c - t * I) * L' ((c : ℂ) + t * I)) - volume (-R) R := (hH2.mul hL'c).intervalIntegrable _ _ - have hfold : (∫ y in (-R)..R, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * L (((1 - c : ℝ) : ℂ) + y * I)) - = -∫ t in (-R)..R, Hfn k (1 - c - t * I) * L' ((c : ℂ) + t * I) := by - simp_rw [hleft] - rw [intervalIntegral.integral_neg] - have h := intervalIntegral.integral_comp_neg (a := -R) (b := R) - (fun t : ℝ => Hfn k (1 - c - t * I) * L' ((c : ℂ) + t * I)) - simp only [neg_neg] at h - rw [← h] - dsimp only [VIntegral] - rw [hfold, ← smul_sub, sub_neg_eq_add, ← intervalIntegral.integral_add hI1 hI2] - congr 1 + congr 2; apply Complex.ext <;> simp) R /-! ## (Z) the zero-sum limit -/ @@ -113,59 +80,11 @@ theorem zero_sum_limit_chi (hq : 1 < q) (hprim : χ.IsPrimitive) {k : ℝ → (hZ : ∀ j : ℕ, ((Z j : Set ℂ) = {ρ : ℂ | IsNontrivialZeroL χ ρ ∧ -R j < ρ.im ∧ ρ.im < R j})) : Tendsto (fun j : ℕ => ∑ ρ ∈ Z j, (zeroMultL χ ρ : ℂ) * Hfn k ρ) atTop (𝓝 (∑' ρ : (LZeros (LSeam_of hq hprim)).carrier, - ((LZeros (LSeam_of hq hprim)).mult ρ : ℂ) * Hfn k ρ)) := by - classical - set ZC := LZeros (LSeam_of hq hprim) with hZC - set g : ZC.carrier → ℂ := fun ρ => (ZC.mult ρ : ℂ) * Hfn k ρ with hg - have hsum : Summable g := EF_zero_sum_summable_chi hq hprim hk hkc - have hmemZ : ∀ j ρ, ρ ∈ Z j ↔ IsNontrivialZeroL χ ρ ∧ -R j < ρ.im ∧ ρ.im < R j := by - intro j ρ - rw [← Finset.mem_coe, hZ j] - rfl - set s : ℕ → Finset ZC.carrier := fun j => (Z j).subtype (· ∈ ZC.carrier) with hsdef - have hsum_eq : ∀ j, ∑ x ∈ s j, g x = ∑ ρ ∈ Z j, (zeroMultL χ ρ : ℂ) * Hfn k ρ := by - intro j - have h1 := Finset.sum_subtype_eq_sum_filter (s := Z j) - (p := (· ∈ ZC.carrier)) (fun ρ : ℂ => (zeroMultL χ ρ : ℂ) * Hfn k ρ) - have h2 : (Z j).filter (· ∈ ZC.carrier) = Z j := by - apply Finset.filter_true_of_mem - intro ρ hρ - exact ((hmemZ j ρ).mp hρ).1 - rw [h2] at h1 - rw [← h1] - rfl - have hRmono : ∀ i j : ℕ, i ≤ j → R i ≤ R j := by - intro i j hij - rcases hij.eq_or_lt with h | h - · rw [h] - · have : (i : ℝ) + 1 ≤ j := by exact_mod_cast h - linarith [(hR i).2, (hR j).1] - have hmono : Monotone s := by - intro i j hij x hx - rw [Finset.mem_subtype, hmemZ] at hx ⊢ - obtain ⟨h1, h2, h3⟩ := hx - have := hRmono i j hij - exact ⟨h1, by linarith, by linarith⟩ - have hexh : ∀ b : Finset ZC.carrier, ∃ j, b ≤ s j := by - intro b - set M : ℝ := ∑ x ∈ b, |((x : ℂ)).im| with hM - have hMle : ∀ x ∈ b, |((x : ℂ)).im| ≤ M := fun x hx => - Finset.single_le_sum (f := fun x : ZC.carrier => |((x : ℂ)).im|) - (fun _ _ => abs_nonneg _) hx - obtain ⟨j, hj⟩ := exists_nat_gt M - refine ⟨j, fun x hx => ?_⟩ - rw [Finset.mem_subtype, hmemZ] - have hx0 : IsNontrivialZeroL χ (x : ℂ) := x.2 - have habs := abs_le.mp (hMle x hx) - have hRj := (hR j).1 - exact ⟨hx0, by linarith [habs.1], by linarith [habs.2]⟩ - have hs_tend : Tendsto s atTop atTop := tendsto_atTop_atTop_of_monotone hmono hexh - have hT : Tendsto (fun S : Finset ZC.carrier => ∑ x ∈ S, g x) atTop (𝓝 (∑' x, g x)) := by - have hHas := hsum.hasSum - simpa [HasSum] using hHas - have := hT.comp hs_tend - refine this.congr (fun j => ?_) - simp only [Function.comp_apply, hsum_eq] + ((LZeros (LSeam_of hq hprim)).mult ρ : ℂ) * Hfn k ρ)) := + zero_sum_limit_of (Zset := (LZeros (LSeam_of hq hprim)).carrier) + (fun ρ => (zeroMultL χ ρ : ℂ) * Hfn k ρ) (EF_zero_sum_summable_chi hq hprim hk hkc) + (monotone_of_unit_intervals (m := 7) fun j => ⟨(hR j).1, by linarith [(hR j).2]⟩) + (fun j => by linarith [(hR j).1]) hZ end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/FullLineChiProof.lean b/zeta23/Zeta23/ThmE/FullLineChiProof.lean index 9416a67313..7f54b67d03 100644 --- a/zeta23/Zeta23/ThmE/FullLineChiProof.lean +++ b/zeta23/Zeta23/ThmE/FullLineChiProof.lean @@ -25,172 +25,8 @@ open Zeta23.WeilEF widened — needed for ψ((s+κ)/2) with re s ≤ 3/2, κ ≤ 1) -/ theorem digamma_growth_wide : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1/4 ≤ s.re → s.re ≤ 2 → - ‖Complex.digamma s‖ ≤ C * Real.log (2 + |s.im|) := by - -- differentiability of ψ on the right half-plane - have hdiff : ∀ s : ℂ, 0 < s.re → DifferentiableAt ℂ Complex.digamma s := by - intro s hs - have hzero : ∀ m : ℕ, s ≠ -(m : ℂ) := by - intro m h - rw [h] at hs - simp only [Complex.neg_re, Complex.natCast_re] at hs - nlinarith [Nat.cast_nonneg (α := ℝ) m] - have hopen : IsOpen {w : ℂ | 0 < w.re} := isOpen_lt continuous_const Complex.continuous_re - have hΓan : AnalyticAt ℂ Complex.Gamma s := by - rw [Complex.analyticAt_iff_eventually_differentiableAt] - filter_upwards [hopen.mem_nhds hs] with w hw - refine Complex.differentiableAt_Gamma w fun m => ?_ - intro h - rw [h] at hw - simp only [Complex.neg_re, Complex.natCast_re] at hw - nlinarith [Nat.cast_nonneg (α := ℝ) m] - have hΓne : Complex.Gamma s ≠ 0 := Complex.Gamma_ne_zero hzero - have hψan : AnalyticAt ℂ Complex.digamma s := by - have h1 : AnalyticAt ℂ (deriv Complex.Gamma) s := hΓan.deriv - have h2 := h1.div hΓan hΓne - exact h2.congr (by - filter_upwards with w - rw [Complex.digamma_def, logDeriv_apply] - rfl) - exact hψan.differentiableAt - -- bound on the compact rectangle |Im| ≤ 1/2 - have hK : IsCompact (Complex.reProdIm (Set.Icc (1/4 : ℝ) 2) (Set.Icc (-(1/2) : ℝ) (1/2))) := - isCompact_Icc.reProdIm isCompact_Icc - have hcontK : ContinuousOn Complex.digamma - (Complex.reProdIm (Set.Icc (1/4 : ℝ) 2) (Set.Icc (-(1/2) : ℝ) (1/2))) := by - intro s hs - have hsre : 1/4 ≤ s.re := (Complex.mem_reProdIm.mp hs).1.1 - exact ((hdiff s (by linarith)).continuousAt).continuousWithinAt - obtain ⟨M, hM⟩ := hK.exists_bound_of_continuousOn hcontK - have hM0 : (0 : ℝ) ≤ M := by - have h := hM (1/2 : ℂ) (by - rw [Complex.mem_reProdIm] - constructor - · simp only [Complex.div_ofNat_re, Complex.one_re] - norm_num - · simp only [Complex.div_ofNat_im, Complex.one_im] - norm_num) - exact le_trans (norm_nonneg _) h - have hlog2 : (0 : ℝ) < Real.log 2 := Real.log_pos (by norm_num) - have hπ : (0 : ℝ) < Real.pi := Real.pi_pos - set K₀ : ℝ := 14 + Real.pi + Real.log 4 with hK₀ - have hK₀0 : (0 : ℝ) < K₀ := by positivity - refine ⟨max (M / Real.log 2) (1 + K₀ / Real.log 2) + 1, by positivity, fun s hre1 hre2 => ?_⟩ - have hlogmono : Real.log 2 ≤ Real.log (2 + |s.im|) := by - apply Real.log_le_log (by norm_num) - have := abs_nonneg s.im - linarith - have hlogpos : (0 : ℝ) < Real.log (2 + |s.im|) := lt_of_lt_of_le hlog2 hlogmono - rcases le_or_gt (|s.im|) (1/2) with him | him - · -- compact part - have hsK : s ∈ Complex.reProdIm (Set.Icc (1/4 : ℝ) 2) (Set.Icc (-(1/2) : ℝ) (1/2)) := by - rw [Complex.mem_reProdIm] - refine ⟨⟨hre1, hre2⟩, ?_⟩ - rw [Set.mem_Icc] - constructor <;> [linarith [neg_abs_le s.im]; linarith [le_abs_self s.im]] - calc ‖Complex.digamma s‖ ≤ M := hM s hsK - _ = (M / Real.log 2) * Real.log 2 := by - field_simp - _ ≤ (max (M / Real.log 2) (1 + K₀ / Real.log 2) + 1) * Real.log (2 + |s.im|) := by - apply mul_le_mul ?_ hlogmono hlog2.le (by positivity) - calc M / Real.log 2 ≤ max (M / Real.log 2) (1 + K₀ / Real.log 2) := le_max_left _ _ - _ ≤ max (M / Real.log 2) (1 + K₀ / Real.log 2) + 1 := by linarith - · -- Stirling part: ‖ψ‖ ≤ ‖ψ − log s + (1/2)/s‖ + ‖log s‖ + ‖(1/2)/s‖ - have hsre0 : (0 : ℝ) < s.re := by linarith - have hst := Zeta23.StirlingVert.digamma_stirling (w := s) hsre0 (by linarith) - have hsnorm_lo : (1/4 : ℝ) ≤ ‖s‖ := - le_trans hre1 (le_trans (le_abs_self _) (Complex.abs_re_le_norm s)) - have hsnorm0 : (0 : ℝ) < ‖s‖ := by linarith - have hs0 : s ≠ 0 := by - intro h - rw [h, norm_zero] at hsnorm0 - exact lt_irrefl 0 hsnorm0 - have hsnorm_hi : ‖s‖ ≤ 2 + |s.im| := by - calc ‖s‖ ≤ |s.re| + |s.im| := Complex.norm_le_abs_re_add_abs_im s - _ ≤ 2 + |s.im| := by - have : |s.re| ≤ 2 := by - rw [abs_le] - constructor <;> linarith - linarith - -- ‖log s‖ ≤ |log ‖s‖| + π ≤ (log 4 + log(2+|im|)) + π - have hlog_s : ‖Complex.log s‖ ≤ |Real.log ‖s‖| + Real.pi := by - calc ‖Complex.log s‖ ≤ |(Complex.log s).re| + |(Complex.log s).im| := - Complex.norm_le_abs_re_add_abs_im _ - _ ≤ |Real.log ‖s‖| + Real.pi := by - rw [Complex.log_re, Complex.log_im] - have := Complex.abs_arg_le_pi s - linarith [abs_nonneg (Complex.arg s)] - have hlog_abs : |Real.log ‖s‖| ≤ Real.log 4 + Real.log (2 + |s.im|) := by - rcases le_or_gt (Real.log ‖s‖) 0 with hneg | hpos - · -- ‖s‖ ≤ 1-ish: |log| = −log ≤ log 4 since ‖s‖ ≥ 1/4 - have h1 : Real.log (1/4 : ℝ) ≤ Real.log ‖s‖ := Real.log_le_log (by norm_num) hsnorm_lo - have h2 : Real.log (1/4 : ℝ) = -Real.log 4 := by - rw [show (1/4 : ℝ) = 4⁻¹ by norm_num, Real.log_inv] - rw [abs_of_nonpos hneg] - have h3 : (0 : ℝ) ≤ Real.log (2 + |s.im|) := by - apply Real.log_nonneg - have := abs_nonneg s.im - linarith - linarith - · rw [abs_of_pos hpos] - have h1 : Real.log ‖s‖ ≤ Real.log (2 + |s.im|) := by - apply Real.log_le_log hsnorm0 - have := abs_nonneg s.im - linarith - have h2 : (0 : ℝ) ≤ Real.log 4 := Real.log_nonneg (by norm_num) - linarith - have hinv_s : ‖(1/2 : ℂ) / s‖ ≤ 2 := by - rw [norm_div] - have h1 : ‖(1/2 : ℂ)‖ = 1/2 := by - rw [show (1/2 : ℂ) = ((1/2 : ℝ) : ℂ) by norm_num, Complex.norm_real, - Real.norm_eq_abs, abs_of_pos (by norm_num)] - rw [h1, div_le_iff₀ hsnorm0] - linarith - have him2 : 3 / s.im ^ 2 ≤ 12 := by - have h1 : (1/4 : ℝ) ≤ s.im ^ 2 := by - have h2 : (1/2 : ℝ) ≤ |s.im| := him.le - nlinarith [abs_nonneg s.im, sq_abs s.im] - rw [div_le_iff₀ (by nlinarith)] - nlinarith - have htot : ‖Complex.digamma s‖ - ≤ Real.log (2 + |s.im|) + K₀ := by - have h1 : ‖Complex.digamma s‖ - ≤ ‖Complex.digamma s - Complex.log s + (1/2 : ℂ) / s‖ + ‖Complex.log s‖ - + ‖(1/2 : ℂ) / s‖ := by - have h2 : Complex.digamma s = (Complex.digamma s - Complex.log s + (1/2 : ℂ) / s) - + Complex.log s - (1/2 : ℂ) / s := by ring - calc ‖Complex.digamma s‖ - = ‖(Complex.digamma s - Complex.log s + (1/2 : ℂ) / s) - + Complex.log s - (1/2 : ℂ) / s‖ := by rw [← h2] - _ ≤ ‖(Complex.digamma s - Complex.log s + (1/2 : ℂ) / s) + Complex.log s‖ - + ‖(1/2 : ℂ) / s‖ := norm_sub_le _ _ - _ ≤ ‖Complex.digamma s - Complex.log s + (1/2 : ℂ) / s‖ + ‖Complex.log s‖ - + ‖(1/2 : ℂ) / s‖ := by - have := norm_add_le (Complex.digamma s - Complex.log s + (1/2 : ℂ) / s) - (Complex.log s) - linarith - rw [hK₀] - have hπ4 : Real.pi < 4 := Real.pi_lt_four - calc ‖Complex.digamma s‖ - ≤ ‖Complex.digamma s - Complex.log s + (1/2 : ℂ) / s‖ + ‖Complex.log s‖ - + ‖(1/2 : ℂ) / s‖ := h1 - _ ≤ 3 / s.im ^ 2 + (|Real.log ‖s‖| + Real.pi) + 2 := by - have := hst - linarith [hlog_s, hinv_s] - _ ≤ 12 + ((Real.log 4 + Real.log (2 + |s.im|)) + Real.pi) + 2 := by - linarith [him2, hlog_abs] - _ ≤ Real.log (2 + |s.im|) + (14 + Real.pi + Real.log 4) := by linarith - calc ‖Complex.digamma s‖ ≤ Real.log (2 + |s.im|) + K₀ := htot - _ ≤ Real.log (2 + |s.im|) + (K₀ / Real.log 2) * Real.log (2 + |s.im|) := by - have h3 : K₀ / Real.log 2 * Real.log 2 ≤ K₀ / Real.log 2 * Real.log (2 + |s.im|) := - mul_le_mul_of_nonneg_left hlogmono (by positivity) - have h4 : K₀ / Real.log 2 * Real.log 2 = K₀ := by field_simp - linarith - _ = (1 + K₀ / Real.log 2) * Real.log (2 + |s.im|) := by ring - _ ≤ (max (M / Real.log 2) (1 + K₀ / Real.log 2) + 1) * Real.log (2 + |s.im|) := by - apply mul_le_mul_of_nonneg_right ?_ hlogpos.le - calc (1 + K₀ / Real.log 2) ≤ max (M / Real.log 2) (1 + K₀ / Real.log 2) := - le_max_right _ _ - _ ≤ max (M / Real.log 2) (1 + K₀ / Real.log 2) + 1 := by linarith + ‖Complex.digamma s‖ ≤ C * Real.log (2 + |s.im|) := + Zeta23.WeilEF.digamma_growth_wide /-! ## The archimedean log-derivative G_{q,κ} := logDeriv (s ↦ q^{s/2} Γℝ(s+κ)) -/ @@ -351,22 +187,14 @@ theorem continuous_logDeriv_L_line (hχ1 : χ ≠ 1) {c : ℝ} (hc1 : 1 < c) : theorem integrable_mul_logDeriv_L_of_decay (hχ1 : χ ≠ 1) {φ : ℝ → ℂ} (hφc : Continuous φ) {C : ℝ} (hφ : ∀ t, ‖φ t‖ ≤ C / (1 + t ^ 2)) {c : ℝ} (hc1 : 1 < c) : Integrable (fun t : ℝ => φ t * logDeriv χ.LFunction ((c : ℂ) + t * I)) := by - obtain ⟨M, hM0, hM⟩ := norm_logDeriv_L_le_of_one_lt_re hχ1 hc1 - have hC0 : 0 ≤ C := by - have := le_trans (norm_nonneg _) (hφ 0); simpa using this - refine Integrable.mono' ((integrable_inv_one_add_sq.const_mul (C * M))) - (hφc.mul (continuous_logDeriv_L_line hχ1 hc1)).aestronglyMeasurable - (Eventually.of_forall fun t => ?_) - rw [norm_mul] - calc ‖φ t‖ * ‖logDeriv χ.LFunction ((c : ℂ) + t * I)‖ - ≤ (C / (1 + t ^ 2)) * M := mul_le_mul (hφ t) (hM t) (norm_nonneg _) (by positivity) - _ = C * M * (1 + t ^ 2)⁻¹ := by ring + obtain ⟨_, _, hM⟩ := norm_logDeriv_L_le_of_one_lt_re hχ1 hc1 + exact integrable_decay_mul_bdd hφc (continuous_logDeriv_L_line hχ1 hc1) hφ hM /-- **Integrability of `H(c+it)·L'/L(χ)(c+it)`** on re = c ∈ (1, 3/2] (`hintL`). -/ theorem integrable_Hfn_mul_logDeriv_L (hχ1 : χ ≠ 1) {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3 / 2) : Integrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * logDeriv χ.LFunction ((c : ℂ) + t * I)) := by - obtain ⟨C, hC0, hC⟩ := norm_Hfn_le hk hkc + obtain ⟨C, _, hC⟩ := norm_Hfn_le hk hkc exact integrable_mul_logDeriv_L_of_decay hχ1 (continuous_Hfn_line hk hkc c) (fun t => hC c t (by linarith) (by linarith)) hc1 @@ -377,35 +205,11 @@ theorem integrable_mul_logDeriv_archChi_of_decay (κ : ℕ) (hκ : κ ≤ 1) {φ {σ : ℝ} (hσ1 : 1 / 2 ≤ σ) (hσ2 : σ ≤ 3 / 2) : Integrable (fun t : ℝ => φ t * logDeriv (archChi q κ) ((σ : ℂ) + t * I)) := by obtain ⟨CG, hCG, hGb⟩ := norm_logDeriv_archChi_le q κ hκ - set K : ℝ := C * (5 * CG) with hK - have hmaj : Integrable (fun t : ℝ => K * ((1 : ℝ) + ‖t‖ ^ 2) ^ (-(3 / 2 : ℝ) / 2)) := - (integrable_rpow_neg_one_add_norm_sq (E := ℝ) (μ := volume) - (by rw [Module.finrank_self]; norm_num)).const_mul K - have hGc : Continuous (fun t : ℝ => logDeriv (archChi q κ) ((σ : ℂ) + t * I)) := by - refine continuous_iff_continuousAt.mpr fun t => ?_ - have hre : 0 < ((σ : ℂ) + t * I).re := by simp; linarith - show ContinuousAt ((logDeriv (archChi q κ)) ∘ (fun t : ℝ => (σ : ℂ) + t * I)) t - exact ContinuousAt.comp (differentiableAt_logDeriv_archChi q κ hre).continuousAt - (by fun_prop : Continuous fun t : ℝ => (σ : ℂ) + t * I).continuousAt - refine Integrable.mono' hmaj (hφc.mul hGc).aestronglyMeasurable (Eventually.of_forall fun t => ?_) - have hq' : 0 < (1 + t ^ 2 : ℝ) := by positivity - have hL : ‖logDeriv (archChi q κ) ((σ : ℂ) + t * I)‖ ≤ (5 * CG) * (1 + t ^ 2) ^ (1 / 4 : ℝ) := by - refine (hGb σ t hσ1 hσ2).trans ?_ - have := log_two_add_le (abs_nonneg t) - rw [sq_abs] at this - nlinarith - rw [norm_mul] - have hpow : (C / (1 + t ^ 2)) * ((5 * CG) * (1 + t ^ 2) ^ (1 / 4 : ℝ)) - = K * ((1 : ℝ) + ‖t‖ ^ 2) ^ (-(3 / 2 : ℝ) / 2) := by - rw [Real.norm_eq_abs, sq_abs, hK] - have e : (1 + t ^ 2 : ℝ) ^ (-(3 / 2 : ℝ) / 2) = (1 + t ^ 2) ^ (1 / 4 : ℝ) / (1 + t ^ 2) := by - rw [show (-(3 / 2 : ℝ) / 2) = (1 / 4 : ℝ) - 1 by norm_num, Real.rpow_sub hq', Real.rpow_one] - rw [e] - field_simp - calc ‖φ t‖ * ‖logDeriv (archChi q κ) ((σ : ℂ) + t * I)‖ - ≤ (C / (1 + t ^ 2)) * ((5 * CG) * (1 + t ^ 2) ^ (1 / 4 : ℝ)) := - mul_le_mul (hC t) hL (norm_nonneg _) (by positivity) - _ = K * ((1 : ℝ) + ‖t‖ ^ 2) ^ (-(3 / 2 : ℝ) / 2) := hpow + have hGc : Continuous (fun t : ℝ => logDeriv (archChi q κ) ((σ : ℂ) + t * I)) := + continuous_iff_continuousAt.mpr fun t => + ContinuousAt.comp (differentiableAt_logDeriv_archChi q κ (by simp; linarith)).continuousAt + (by fun_prop : Continuous fun t : ℝ => (σ : ℂ) + t * I).continuousAt + exact integrable_decay_mul_log hφc hGc hC0 hC hCG.le (fun t => hGb σ t hσ1 hσ2) omit [NeZero q] in /-- gammaFactor in terms of the parity: `gammaFactor χ s = Γℝ(s + parity χ)`. -/ @@ -476,146 +280,15 @@ end MajorantsChi section LineShift -/-- **G-generic archimedean line shift** (gamma_line_shift with Γℝ'/Γℝ replaced by -any `G` holomorphic on re > 0 with ‖G(σ+it)‖ ≤ C_G log(2+|t|) on 1/2 ≤ σ ≤ 3/2). -/ +/-- **G-generic archimedean line shift** (delegates to `Zeta23.WeilEF.line_shift_generic`). -/ theorem line_shift_generic {G : ℂ → ℂ} (hGd : ∀ s : ℂ, 0 < s.re → DifferentiableAt ℂ G s) (hGgrowth : ∃ C : ℝ, 0 < C ∧ ∀ σ t : ℝ, 1 / 2 ≤ σ → σ ≤ 3 / 2 → ‖G (σ + t * I)‖ ≤ C * Real.log (2 + |t|)) {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3/2) : ∫ t : ℝ, (Hfn k (c + t * I) + Hfn k (1 - c - t * I)) * G (c + t * I) - = ∫ t : ℝ, paperFT k t * (G (1/2 + t * I) + G (1/2 - t * I)) := by - -- differentiability - have hHd : Differentiable ℂ (Hfn k) := by - have h := differentiable_paperFT hk.continuous hkc - show Differentiable ℂ (fun s => paperFT k ((s - 1/2) / I)) - exact h.comp ((differentiable_id.sub_const _).div_const I) - set f₁ : ℂ → ℂ := fun s => Hfn k s * G s with hf₁ - set f₂ : ℂ → ℂ := fun s => Hfn k (1 - s) * G s with hf₂ - have hf₁d : ∀ s : ℂ, 1 / 2 ≤ s.re → s.re ≤ c → DifferentiableAt ℂ f₁ s := fun s h1 _ => - (hHd s).mul (hGd s (by linarith)) - have hf₂d : ∀ s : ℂ, 1 / 2 ≤ s.re → s.re ≤ c → DifferentiableAt ℂ f₂ s := fun s h1 _ => - ((hHd (1 - s)).comp s ((differentiableAt_const _).sub differentiableAt_id)).mul (hGd s (by linarith)) - -- the majorant - obtain ⟨Lam₁, hLam₁⟩ := Zeta23.EF.exists_abs_le_of_hasCompactSupport hkc - set Lam : ℝ := max Lam₁ 0 with hLam - have hLam0 : 0 ≤ Lam := le_max_right _ _ - have hsupp : ∀ u, k u ≠ 0 → |u| ≤ Lam := fun u hu => (hLam₁ u hu).trans (le_max_left _ _) - have hki : Integrable k := hk.continuous.integrable_of_hasCompactSupport hkc - set N : ℝ := (∫ u, ‖k u‖) + ∫ u, ‖deriv (deriv k) u‖ with hN - have hN0 : 0 ≤ N := add_nonneg (integral_nonneg fun _ => norm_nonneg _) (integral_nonneg fun _ => norm_nonneg _) - obtain ⟨CG, hCG, hGb⟩ := hGgrowth - set M : ℝ := 2 * Real.exp Lam * N * CG * 6 with hM - have hM0 : 0 ≤ M := by positivity - set φ : ℝ → ℝ := fun t => M * (1 + ‖t‖) ^ (-(3 / 2 : ℝ)) with hφ - have hφi : Integrable φ := by - have := (integrable_one_add_norm (E := ℝ) (μ := volume) (r := 3/2) - (by rw [Module.finrank_self]; norm_num)).const_mul M - exact this - have hφlim : Filter.Tendsto (fun x : ℝ => M * (1 + x) ^ (-(3 / 2 : ℝ))) Filter.atTop (nhds 0) := by - have h1 : Filter.Tendsto (fun x : ℝ => (1 + x) ^ (-(3 / 2 : ℝ))) Filter.atTop (nhds 0) := - (tendsto_rpow_neg_atTop (by norm_num)).comp (Filter.tendsto_atTop_add_const_left _ 1 Filter.tendsto_id) - simpa using h1.const_mul M - have hφtop : Filter.Tendsto φ Filter.atTop (nhds 0) := by - have : φ = (fun x : ℝ => M * (1 + x) ^ (-(3 / 2 : ℝ))) ∘ (fun t : ℝ => ‖t‖) := by - funext t; simp [hφ] - rw [this] - exact hφlim.comp (by simpa using Filter.tendsto_abs_atTop_atTop) - have hφbot : Filter.Tendsto φ Filter.atBot (nhds 0) := by - have : φ = (fun x : ℝ => M * (1 + x) ^ (-(3 / 2 : ℝ))) ∘ (fun t : ℝ => ‖t‖) := by - funext t; simp [hφ] - rw [this] - exact hφlim.comp (by simpa using Filter.tendsto_abs_atBot_atTop) - -- the key pointwise bound: for |Im z| ≤ 1, ‖paperFT k z‖·‖G(σ+it)‖ ≤ φ t when Re z = ±t - have hkey : ∀ (σ t : ℝ) (z : ℂ), 1 / 2 ≤ σ → σ ≤ c → |z.im| ≤ 1 → z.re ^ 2 = t ^ 2 → - ‖paperFT k z‖ * ‖G (σ + t * I)‖ ≤ φ t := by - intro σ t z h1 h2 hz hzt - have hH := norm_paperFT_le_uniform hk hki hLam0 hsupp hz - rw [hzt] at hH - have hGG := hGb σ t h1 (by linarith) - have hl := log_two_add_div_le (abs_nonneg t) - calc ‖paperFT k z‖ * ‖G (σ + t * I)‖ - ≤ (2 * Real.exp Lam * N / (1 + t ^ 2)) * (CG * Real.log (2 + |t|)) := - mul_le_mul hH hGG (norm_nonneg _) (by positivity) - _ = (2 * Real.exp Lam * N * CG) * (Real.log (2 + |t|) / (1 + |t| ^ 2)) := by - rw [sq_abs]; ring - _ ≤ (2 * Real.exp Lam * N * CG) * (6 * (1 + |t|) ^ (-(3 / 2 : ℝ))) := - mul_le_mul_of_nonneg_left hl (by positivity) - _ = φ t := by simp only [hφ, hM, Real.norm_eq_abs]; ring - -- z-bookkeeping for Hfn on the two lines - have hz₁ : ∀ σ t : ℝ, ((σ : ℂ) + t * I - 1 / 2) / I = (t : ℂ) + ((1 / 2 - σ : ℝ) : ℂ) * I := by - intro σ t; field_simp; push_cast; ring_nf; simp [I_sq]; ring - have hz₂ : ∀ σ t : ℝ, ((1 - ((σ : ℂ) + t * I)) - 1 / 2) / I = ((-t : ℝ) : ℂ) + ((σ - 1 / 2 : ℝ) : ℂ) * I := by - intro σ t; field_simp; push_cast; ring_nf; simp [I_sq]; ring - have hb₁ : ∀ σ t : ℝ, 1 / 2 ≤ σ → σ ≤ c → ‖f₁ (σ + t * I)‖ ≤ φ t := by - intro σ t h1 h2 - simp only [hf₁, Hfn, norm_mul] - rw [hz₁] - refine hkey σ t _ h1 h2 ?_ ?_ - · simp only [add_im, ofReal_im, mul_im, ofReal_re, I_re, I_im, mul_zero, mul_one, zero_add, add_zero] - rw [abs_le]; constructor <;> linarith - · simp - have hb₂ : ∀ σ t : ℝ, 1 / 2 ≤ σ → σ ≤ c → ‖f₂ (σ + t * I)‖ ≤ φ t := by - intro σ t h1 h2 - simp only [hf₂, Hfn, norm_mul] - rw [hz₂] - refine hkey σ t _ h1 h2 ?_ ?_ - · simp only [add_im, ofReal_im, mul_im, ofReal_re, I_re, I_im, mul_zero, mul_one, zero_add, add_zero] - rw [abs_le]; constructor <;> linarith - · simp - -- shift both lines - have hab : (1:ℝ) / 2 ≤ c := by linarith - have hs₁ := vertical_line_shift hab hf₁d hφi hb₁ hφtop hφbot - have hs₂ := vertical_line_shift hab hf₂d hφi hb₂ hφtop hφbot - -- integrability on the lines - have hi₁c : Integrable (fun t : ℝ => f₁ (c + t * I)) := - integrable_line (fun t => hf₁d _ (by simp; linarith) (by simp)) hφi (fun t => hb₁ c t hab le_rfl) - have hi₂c : Integrable (fun t : ℝ => f₂ (c + t * I)) := - integrable_line (fun t => hf₂d _ (by simp; linarith) (by simp)) hφi (fun t => hb₂ c t hab le_rfl) - have hi₁h : Integrable (fun t : ℝ => f₁ ((1/2 : ℝ) + t * I)) := - integrable_line (fun t => hf₁d _ (by simp) (by simp; linarith)) hφi (fun t => hb₁ (1/2) t le_rfl hab) - have hi₂h : Integrable (fun t : ℝ => f₂ ((1/2 : ℝ) + t * I)) := - integrable_line (fun t => hf₂d _ (by simp) (by simp; linarith)) hφi (fun t => hb₂ (1/2) t le_rfl hab) - -- LHS = ∫ f₁(c+it) + ∫ f₂(c+it) - have hL : ∫ t : ℝ, (Hfn k (c + t * I) + Hfn k (1 - c - t * I)) * G (c + t * I) - = (∫ t : ℝ, f₁ (c + t * I)) + ∫ t : ℝ, f₂ (c + t * I) := by - rw [← integral_add hi₁c hi₂c] - refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_) - simp only [hf₁, hf₂] - rw [show (1 : ℂ) - (↑c + ↑t * I) = 1 - ↑c - ↑t * I by ring] - ring - rw [hL, hs₁, hs₂] - -- evaluate on the critical line - have e₁ : ∀ t : ℝ, f₁ ((1/2 : ℝ) + t * I) = paperFT k t * G (1/2 + t * I) := by - intro t - simp only [hf₁, Hfn] - congr 2 - · push_cast; field_simp; ring - · push_cast; ring - have e₂ : ∀ t : ℝ, f₂ ((1/2 : ℝ) + t * I) = paperFT k (((-t : ℝ) : ℂ)) * G (1/2 + t * I) := by - intro t - simp only [hf₂, Hfn] - congr 2 - · push_cast; field_simp; ring - · push_cast; ring - simp_rw [e₁, e₂] - -- t ↦ −t in the second integral - have hneg : ∫ t : ℝ, paperFT k (((-t : ℝ) : ℂ)) * G (1/2 + t * I) - = ∫ t : ℝ, paperFT k t * G (1/2 - t * I) := by - rw [← integral_neg_eq_self] - refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_) - simp only [neg_neg] - push_cast - ring_nf - rw [hneg, ← integral_add] - · refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_) - ring - · have := hi₁h; simp_rw [e₁] at this; exact this - · have := hi₂h; simp_rw [e₂] at this - have h2 := this.comp_neg - simp only [neg_neg] at h2 - refine (h2.congr (Filter.Eventually.of_forall fun t => ?_)) - push_cast; ring_nf + = ∫ t : ℝ, paperFT k t * (G (1/2 + t * I) + G (1/2 - t * I)) := + Zeta23.WeilEF.line_shift_generic hGd hGgrowth hk hkc hc1 hc2 variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} diff --git a/zeta23/Zeta23/ThmE/GammaFactsChiProof.lean b/zeta23/Zeta23/ThmE/GammaFactsChiProof.lean index ffde98d45c..9ba1ab2896 100644 --- a/zeta23/Zeta23/ThmE/GammaFactsChiProof.lean +++ b/zeta23/Zeta23/ThmE/GammaFactsChiProof.lean @@ -15,7 +15,6 @@ Key remark: in the Stirling field the conductor constant cancels: μ_χ(τ) − (1/2π)log(q|τ|/2π) = (1/2π)[Re ψ(a + iτ/2) − log(|τ|/2)], a := 1/4 + κ/2 ∈ {1/4, 3/4}, so the ζ proof applies verbatim at abscissa a. -/ -import Zeta23.ThmE.Hypotheses import Zeta23.GammaFacts.Complete import Zeta23.WeilEF.GammaRBracket import Zeta23.ThmE.IntMuChi @@ -55,39 +54,25 @@ theorem muq_eq (κ q : ℕ) (τ : ℝ) : push_cast; ring rw [e]; ring +/-- `muq κ q` as a `Zeta23.muLine`. -/ +lemma muq_eq_muLine (κ q : ℕ) : + muq κ q = Zeta23.muLine (absc κ) ((1 / (2 * Real.pi)) * Real.log (q / Real.pi)) := by + funext τ; exact muq_eq κ q τ + theorem arg_mem (hκ : κ ≤ 1) (t : ℝ) : ((absc κ : ℝ) : ℂ) + Complex.I * (t : ℂ) ∈ Complex.integerComplement := MuFields.abscissa_mem (absc_pos κ) (absc_lt_one hκ) t -/-! ### even -/ - -theorem muq_even (hκ : κ ≤ 1) (τ : ℝ) : muq κ q (-τ) = muq κ q τ := by - rw [muq_eq, muq_eq] - congr 2 - have hconj : ((absc κ : ℝ) : ℂ) + Complex.I * (((-τ) / 2 : ℝ) : ℂ) - = starRingEnd ℂ (((absc κ : ℝ) : ℂ) + Complex.I * ((τ / 2 : ℝ) : ℂ)) := by - simp only [map_add, map_mul, Complex.conj_ofReal, Complex.conj_I] - push_cast; ring - rw [hconj, Zeta23.WeilEF.digamma_conj (arg_mem hκ _), Complex.conj_re] +/-! ### even, smooth, monotone, minimum at 0, μ_χ(0) > −1, derivative bound (via `muLine`) -/ -/-! ### monotone, minimum at 0 -/ +theorem muq_even (_hκ : κ ≤ 1) (τ : ℝ) : muq κ q (-τ) = muq κ q τ := by + rw [muq_eq_muLine]; exact Zeta23.muLine_even _ _ τ theorem muq_monotoneOn (hκ : κ ≤ 1) : MonotoneOn (muq κ q) (Set.Ici (0 : ℝ)) := by - intro t₁ h₁ t₂ h₂ h12 - rw [muq_eq, muq_eq] - have hmono := MuFields.re_digamma_mono (a := absc κ) (absc_pos κ) (absc_lt_one hκ) - (Set.mem_Ici.mpr (by linarith [Set.mem_Ici.mp h₁] : (0 : ℝ) ≤ t₁ / 2)) - (Set.mem_Ici.mpr (by linarith [Set.mem_Ici.mp h₂] : (0 : ℝ) ≤ t₂ / 2)) - (by linarith) - have h2π : (0 : ℝ) ≤ 1 / (2 * Real.pi) := by positivity - have := mul_le_mul_of_nonneg_left hmono h2π - linarith + rw [muq_eq_muLine]; exact MuFields.muLine_monotoneOn (absc_pos κ) (absc_lt_one hκ) _ theorem muq_zero_le (hκ : κ ≤ 1) (τ : ℝ) : muq κ q 0 ≤ muq κ q τ := by - rcases le_total 0 τ with h | h - · exact muq_monotoneOn hκ (Set.mem_Ici.mpr le_rfl) (Set.mem_Ici.mpr h) h - · rw [← muq_even hκ τ] - exact muq_monotoneOn hκ (Set.mem_Ici.mpr le_rfl) (Set.mem_Ici.mpr (by linarith)) (by linarith) + rw [muq_eq_muLine]; exact MuFields.muLine_zero_le (absc_pos κ) (absc_lt_one hκ) _ τ /-! ### Stirling (the conductor constant cancels) -/ @@ -119,235 +104,24 @@ theorem muq_stirling (hκ : κ ≤ 1) (hq : 1 ≤ q) : ∃ C : ℝ, ∀ τ : ℝ |muq κ q τ - (1 / (2 * Real.pi)) * Real.log (q * |τ| / (2 * Real.pi))| ≤ C / τ ^ 2 := ⟨20 / (2 * Real.pi), muq_stirling_const hκ hq⟩ -/-! ### μ_χ(0) > −1 -/ - theorem neg_one_lt_muq_zero (hκ : κ ≤ 1) (hq : 1 ≤ q) : (-1 : ℝ) < muq κ q 0 := by - rw [muq_eq, show ((0 : ℝ) / 2 : ℝ) = (0 : ℝ) by norm_num] - have ha0 := absc_pos κ - have ha1 := absc_lt_one hκ - have ha4 := quarter_le_absc κ - rw [MuFields.re_digamma_vertical ha0 ha1 0] - -- the series is termwise nonnegative - have hS : (0 : ℝ) ≤ ∑' n : ℕ, - (1 / ((n : ℝ) + 1) - ((n : ℝ) + 1 + absc κ) / (((n : ℝ) + 1 + absc κ) ^ 2 + (0 : ℝ) ^ 2)) := by - refine tsum_nonneg fun n => ?_ - have hna : (0 : ℝ) < (n : ℝ) + 1 + absc κ := by positivity - have h1 : ((n : ℝ) + 1 + absc κ) / (((n : ℝ) + 1 + absc κ) ^ 2 + (0 : ℝ) ^ 2) - = 1 / ((n : ℝ) + 1 + absc κ) := by - rw [show ((n : ℝ) + 1 + absc κ) ^ 2 + (0 : ℝ) ^ 2 = ((n : ℝ) + 1 + absc κ) * ((n : ℝ) + 1 + absc κ) by ring, - div_mul_eq_div_div, div_self hna.ne'] - rw [h1] - have h2 : (0 : ℝ) < (n : ℝ) + 1 := by positivity - have h3 : 1 / ((n : ℝ) + 1 + absc κ) ≤ 1 / ((n : ℝ) + 1) := - one_div_le_one_div_of_le h2 (by linarith) - linarith - -- 1/a ≤ 4 - have hinv : absc κ / (absc κ ^ 2 + (0:ℝ) ^ 2) ≤ 4 := by - rw [show absc κ ^ 2 + (0:ℝ) ^ 2 = absc κ * absc κ by ring, div_mul_eq_div_div, div_self ha0.ne'] - rw [div_le_iff₀ ha0]; linarith - -- log(q/π) ≥ −log π > −1.4 - have hγ : Real.eulerMascheroniConstant < 2 / 3 := Real.eulerMascheroniConstant_lt_two_thirds - have hπ3 : (3.14 : ℝ) < Real.pi := Real.pi_gt_d2 - have hπ4 : Real.pi < 4 := Real.pi_lt_four - have hlogπ : Real.log Real.pi < 1.4 := by - have h1 : Real.log Real.pi < Real.log 4 := Real.log_lt_log Real.pi_pos hπ4 - have h2 : Real.log 4 = 2 * Real.log 2 := by - rw [show (4 : ℝ) = 2 ^ 2 by norm_num, Real.log_pow]; push_cast; ring - have h3 := Real.log_two_lt_d9 - nlinarith - have hq0 : (0:ℝ) < q := by exact_mod_cast (lt_of_lt_of_le zero_lt_one hq) + rw [muq_eq_muLine] + refine MuFields.neg_one_lt_muLine_zero (quarter_le_absc κ) (absc_lt_one hκ) ?_ + have hq0 : (0 : ℝ) < q := by exact_mod_cast (lt_of_lt_of_le zero_lt_one hq) have hlogq : -Real.log Real.pi ≤ Real.log (q / Real.pi) := by rw [Real.log_div hq0.ne' Real.pi_pos.ne'] - have : 0 ≤ Real.log q := Real.log_nonneg (by exact_mod_cast hq) - linarith - set S := ∑' n : ℕ, - (1 / ((n : ℝ) + 1) - ((n : ℝ) + 1 + absc κ) / (((n : ℝ) + 1 + absc κ) ^ 2 + (0 : ℝ) ^ 2)) - have h2π : 0 < 2 * Real.pi := by positivity - -- μ(0) ≥ (−γ − 4 − log π)/(2π) > −1 - have hsum : -6.07 ≤ -Real.eulerMascheroniConstant - absc κ / (absc κ ^ 2 + (0:ℝ) ^ 2) + S - + Real.log (q / Real.pi) := by linarith - have : -1 < (1 / (2 * Real.pi)) * (-6.07) := by - have h607 : (1 / (2 * Real.pi)) * 6.07 < 1 := by - rw [div_mul_eq_mul_div, one_mul, div_lt_one h2π]; nlinarith - linarith - calc (-1 : ℝ) < (1 / (2 * Real.pi)) * (-6.07) := this - _ ≤ (1 / (2 * Real.pi)) * (-Real.eulerMascheroniConstant - absc κ / (absc κ ^ 2 + (0:ℝ) ^ 2) + S) - + (1 / (2 * Real.pi)) * Real.log (q / Real.pi) := by - rw [← mul_add]; exact mul_le_mul_of_nonneg_left hsum (by positivity) - -/-! ### smooth -/ + linarith [Real.log_nonneg (by exact_mod_cast hq : (1 : ℝ) ≤ q)] + have h2π : 0 ≤ 1 / (2 * Real.pi) := by positivity + have hmul := mul_le_mul_of_nonneg_left hlogq h2π + linarith [show 1 / (2 * Real.pi) * (-Real.log Real.pi) = -(Real.log Real.pi / (2 * Real.pi)) by ring] -private lemma gamma_ne_neg_nat {z : ℂ} (hz : 0 < z.re) : ∀ m : ℕ, z ≠ -m := by - intro m h - rw [h] at hz - simp only [Complex.neg_re, Complex.natCast_re] at hz - exact (not_lt.mpr (neg_nonpos.mpr (Nat.cast_nonneg m))) hz - -/-- ψ is analytic on the right half-plane. -/ -theorem analyticAt_digamma' {z : ℂ} (hz : 0 < z.re) : - AnalyticAt ℂ Complex.digamma z := by - have hU : IsOpen {w : ℂ | 0 < w.re} := isOpen_lt continuous_const Complex.continuous_re - have hGamD : DifferentiableOn ℂ Complex.Gamma {w : ℂ | 0 < w.re} := fun w hw => - (Complex.differentiableAt_Gamma w (gamma_ne_neg_nat hw)).differentiableWithinAt - have hGamA := hGamD.analyticOnNhd hU - have h1 : AnalyticAt ℂ (deriv Complex.Gamma) z := (hGamA z hz).deriv - have h2 : AnalyticAt ℂ Complex.Gamma z := hGamA z hz - have h3 : Complex.Gamma z ≠ 0 := Complex.Gamma_ne_zero (gamma_ne_neg_nat hz) - have h4 := h1.div h2 h3 - exact h4.congr (by - filter_upwards with w - rw [Complex.digamma_def, logDeriv_apply] - rfl) - - -set_option backward.isDefEq.respectTransparency false in theorem muq_smooth (κ q : ℕ) : ContDiff ℝ ⊤ (muq κ q) := by - have hfun : muq κ q = fun τ : ℝ => (1 / (2 * Real.pi)) - * (Complex.digamma (((absc κ : ℝ) : ℂ) + Complex.I * (τ : ℂ) / 2)).re - + (1 / (2 * Real.pi)) * Real.log (q / Real.pi) := by - funext τ; rw [muq_eq]; congr 3; push_cast; ring - rw [hfun] - have hc : ContDiff ℝ ⊤ (fun τ : ℝ => (((absc κ : ℝ) : ℂ) + Complex.I * (τ : ℂ) / 2 : ℂ)) := by - have h1 : ContDiff ℝ ⊤ (fun τ : ℝ => (τ : ℂ)) := Complex.ofRealCLM.contDiff - have h2 : ContDiff ℝ ⊤ (fun τ : ℝ => Complex.I * (τ : ℂ)) := contDiff_const.mul h1 - have h3 : ContDiff ℝ ⊤ (fun τ : ℝ => Complex.I * (τ : ℂ) / 2) := by - simpa [div_eq_mul_inv] using h2.mul contDiff_const - exact contDiff_const.add h3 - refine contDiff_iff_contDiffAt.mpr fun τ => ?_ - have hz : (0 : ℝ) < ((((absc κ : ℝ) : ℂ) + Complex.I * (τ : ℂ) / 2 : ℂ)).re := by - simp; exact absc_pos κ - have h4' : AnalyticAt ℝ Complex.digamma (((absc κ : ℝ) : ℂ) + Complex.I * (τ : ℂ) / 2) := - AnalyticAt.restrictScalars (analyticAt_digamma' hz) - have h4 : ContDiffAt ℝ ⊤ Complex.digamma (((absc κ : ℝ) : ℂ) + Complex.I * (τ : ℂ) / 2) := - h4'.contDiffAt - have h5 : ContDiffAt ℝ ⊤ - (fun τ : ℝ => Complex.digamma (((absc κ : ℝ) : ℂ) + Complex.I * (τ : ℂ) / 2)) τ := - h4.comp τ hc.contDiffAt - have h6 : ContDiffAt ℝ ⊤ - (fun τ : ℝ => (Complex.digamma (((absc κ : ℝ) : ℂ) + Complex.I * (τ : ℂ) / 2)).re) τ := - (Complex.reCLM.contDiff.contDiffAt).comp τ h5 - have h7 := (contDiffAt_const (c := (1 / (2 * Real.pi) : ℝ))).mul h6 - exact h7.add contDiffAt_const - -/-! ### μ_χ′ ≪ 1/|τ| (mirror of MuFields.mu_deriv_bound at abscissa a ≥ 1/4) -/ + rw [muq_eq_muLine]; exact Zeta23.muLine_smooth (absc_pos κ) _ -set_option backward.isDefEq.respectTransparency false in theorem muq_deriv_bound_const (hκ : κ ≤ 1) (τ : ℝ) (hτ : 1 ≤ |τ|) : |deriv (muq κ q) τ| ≤ (24 / Real.pi) / |τ| := by - have hτ0 : (0 : ℝ) < |τ| := by linarith - set zA : ℂ := ((absc κ : ℝ) : ℂ) + (Complex.I / 2) * (τ : ℂ) with hzA - have hzA_eq : zA = ((absc κ : ℝ) : ℂ) + Complex.I * ((τ / 2 : ℝ) : ℂ) := by - rw [hzA] - push_cast - ring - have hmem : zA ∈ Complex.integerComplement := by - rw [hzA_eq] - exact arg_mem hκ (τ / 2) - have hψd : DifferentiableAt ℂ Complex.digamma zA := - Zeta23.Stirling.differentiableAt_digamma hmem - -- chain rule: μ has derivative (1/2π)·Re(ψ′(zA)·(I/2)) at τ - have hginner : HasDerivAt (fun x : ℝ => ((absc κ : ℝ) : ℂ) + (Complex.I / 2) * (x : ℂ)) - (Complex.I / 2) τ := by - have h1 : HasDerivAt (fun x : ℝ => ((x : ℝ) : ℂ)) 1 τ := Complex.ofRealCLM.hasDerivAt - have h2 := (h1.const_mul (Complex.I / 2)).const_add (((absc κ : ℝ) : ℂ)) - simpa using h2 - have hcompd : HasDerivAt - (fun x : ℝ => Complex.digamma (((absc κ : ℝ) : ℂ) + (Complex.I / 2) * (x : ℂ))) - ((Complex.I / 2) • deriv Complex.digamma zA) τ := by - have h3 := HasDerivAt.scomp τ hψd.hasDerivAt hginner - exact h3 - have hre : HasDerivAt - (fun x : ℝ => (Complex.digamma (((absc κ : ℝ) : ℂ) + (Complex.I / 2) * (x : ℂ))).re) - (((Complex.I / 2) • deriv Complex.digamma zA).re) τ := - (Complex.reCLM.hasFDerivAt.comp_hasDerivAt τ hcompd) - have hmuD : HasDerivAt (muq κ q) - (1 / (2 * Real.pi) * (((Complex.I / 2) • deriv Complex.digamma zA).re)) τ := by - have h4 := (hre.const_mul (1 / (2 * Real.pi))).add_const ((1 / (2 * Real.pi)) * Real.log (q / Real.pi)) - have h5 : muq κ q = fun x : ℝ => - 1 / (2 * Real.pi) * (Complex.digamma (((absc κ : ℝ) : ℂ) + (Complex.I / 2) * (x : ℂ))).re - + (1 / (2 * Real.pi)) * Real.log (q / Real.pi) := by - funext x - rw [muq_eq] - congr 3 - push_cast; ring - rw [h5] - exact h4 - rw [hmuD.deriv] - -- bound the derivative value by the trigamma tail - have htri := Zeta23.Stirling.hasSum_trigamma hmem - have hnorm_term : ∀ n : ℕ, ‖(1 : ℂ) / (zA + n) ^ 2‖ - = (((absc κ : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := by - intro n - have hre2 : (zA + n).re = (absc κ : ℝ) + n := by - rw [hzA_eq] - simp - have him2 : (zA + n).im = τ / 2 := by - rw [hzA_eq] - simp - rw [norm_div, norm_one, norm_pow, one_div] - congr 1 - rw [show ‖zA + (n : ℂ)‖ ^ 2 = Complex.normSq (zA + n) from Complex.sq_norm _, - Complex.normSq_apply, hre2, him2] - ring - -- comparison with the quarter line: (a+n)² ≥ (1/4+n)² - have hcmp : ∀ n : ℕ, (((absc κ : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ - ≤ (((1 / 4 : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := by - intro n - have ha := quarter_le_absc κ - rw [← one_div, ← one_div] - apply one_div_le_one_div_of_le (by positivity) - nlinarith [Nat.cast_nonneg (α := ℝ) n] - have hsummable_a : Summable (fun n : ℕ => (((absc κ : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹) := - Summable.of_nonneg_of_le (fun n => by positivity) hcmp (MuFields.summable_quarter_line (τ / 2)) - have hsummable_norm : Summable (fun n : ℕ => ‖(1 : ℂ) / (zA + n) ^ 2‖) := by - refine hsummable_a.congr fun n => ?_ - exact (hnorm_term n).symm - have hψ'bound : ‖deriv Complex.digamma zA‖ ≤ 24 / |τ| := by - have h6 : deriv Complex.digamma zA = ∑' n : ℕ, (1 : ℂ) / (zA + n) ^ 2 := htri.tsum_eq.symm - rw [h6] - calc ‖∑' n : ℕ, (1 : ℂ) / (zA + n) ^ 2‖ ≤ ∑' n : ℕ, ‖(1 : ℂ) / (zA + n) ^ 2‖ := - norm_tsum_le_tsum_norm hsummable_norm - _ = ∑' n : ℕ, (((absc κ : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := by - congr 1 - funext n - exact hnorm_term n - _ ≤ ∑' n : ℕ, (((1 / 4 : ℝ) + n) ^ 2 + (τ / 2) ^ 2)⁻¹ := - Summable.tsum_le_tsum hcmp hsummable_a (MuFields.summable_quarter_line (τ / 2)) - _ ≤ 12 / |τ / 2| := MuFields.trigamma_tail_le (by - rw [abs_div] - rw [show |(2 : ℝ)| = 2 by norm_num] - linarith) - _ = 24 / |τ| := by - rw [abs_div, show |(2 : ℝ)| = 2 by norm_num] - field_simp - norm_num - -- |Re((I/2)•ψ′)| ≤ ‖ψ′‖/2 - have hval : |(((Complex.I / 2) • deriv Complex.digamma zA).re)| - ≤ ‖deriv Complex.digamma zA‖ / 2 := by - calc |(((Complex.I / 2) • deriv Complex.digamma zA).re)| - ≤ ‖(Complex.I / 2) • deriv Complex.digamma zA‖ := Complex.abs_re_le_norm _ - _ = ‖Complex.I / 2‖ * ‖deriv Complex.digamma zA‖ := norm_smul _ _ - _ = ‖deriv Complex.digamma zA‖ / 2 := by - rw [norm_div, Complex.norm_I] - rw [show ‖(2 : ℂ)‖ = 2 from by - rw [show (2 : ℂ) = ((2 : ℝ) : ℂ) by norm_num, Complex.norm_real, - Real.norm_eq_abs, abs_of_pos (by norm_num)]] - ring - have hπ : (0 : ℝ) < Real.pi := Real.pi_pos - rw [abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ 1 / (2 * Real.pi))] - calc 1 / (2 * Real.pi) * |(((Complex.I / 2) • deriv Complex.digamma zA).re)| - ≤ 1 / (2 * Real.pi) * (‖deriv Complex.digamma zA‖ / 2) := by - gcongr - _ ≤ 1 / (2 * Real.pi) * ((24 / |τ|) / 2) := by - gcongr - _ ≤ (24 / Real.pi) / |τ| := by - rw [div_div, div_mul_eq_mul_div, one_mul] - rw [div_le_div_iff₀ (by positivity) (by positivity)] - ring_nf - have e1 : Real.pi * Real.pi⁻¹ = 1 := mul_inv_cancel₀ hπ.ne' - have e2 : |τ| * |τ|⁻¹ = 1 := mul_inv_cancel₀ hτ0.ne' - nlinarith [e1, e2] - + rw [muq_eq_muLine] + exact MuFields.muLine_deriv_bound_const (quarter_le_absc κ) (absc_lt_one hκ) _ τ hτ theorem muq_deriv_bound (hκ : κ ≤ 1) : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |deriv (muq κ q) τ| ≤ C / |τ| := ⟨24 / Real.pi, muq_deriv_bound_const hκ⟩ @@ -363,7 +137,7 @@ theorem gammaFactsChi_of_int (hκ : κ ≤ 1) (hq : 1 ≤ q) |(∫ τ in T..(2 * T), muq κ q τ ^ 2) - T * ell1q q T ^ 2 / (4 * Real.pi ^ 2)| ≤ C * (T * ell1q q T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2) : GammaFactsChi κ q := - ⟨muq_even hκ, muq_smooth κ q, muq_monotoneOn hκ, muq_zero_le hκ, neg_one_lt_muq_zero hκ hq, + ⟨muq_even hκ, (muq_smooth κ q).of_le le_top, muq_monotoneOn hκ, muq_zero_le hκ, neg_one_lt_muq_zero hκ hq, muq_stirling hκ hq, muq_deriv_bound hκ, hint, hint2⟩ /-- **H-Γ(χ), unconditionally** (parity κ ≤ 1, modulus q ≥ 1): all nine fields are theorems diff --git a/zeta23/Zeta23/ThmE/GammaSideChi.lean b/zeta23/Zeta23/ThmE/GammaSideChi.lean index 07b64e0a55..09e16f2968 100644 --- a/zeta23/Zeta23/ThmE/GammaSideChi.lean +++ b/zeta23/Zeta23/ThmE/GammaSideChi.lean @@ -147,35 +147,8 @@ theorem re_logDeriv_archChi_half (t : ℝ) : theorem gammaSideChi {T₁ T₂ : ℝ} (_h0 : 0 < T₁) (_h0' : 0 < T₂) : (1 / Real.pi) * (RvM.halfContour (logDeriv (archChi q κ)) T₁ T₂).im = ∫ t in T₁..T₂, muq κ q t := by - set F := logDeriv (archChi q κ) with hF - have hrect : (Set.uIcc (1/2:ℝ) 2 ×ℂ Set.uIcc T₁ T₂) ⊆ rightHalfPlane := by - rintro s ⟨hre, -⟩ - rw [Set.uIcc_of_le (by norm_num : (1/2:ℝ) ≤ 2)] at hre - show 0 < s.re - have := hre.1 - linarith [this] - have hCG := Complex.integral_boundary_rect_eq_zero_of_differentiableOn F (1/2 + T₁ * I) - (2 + T₂ * I) ((logDeriv_archChi_differentiableOn q κ).mono (by simpa using hrect)) - simp only [add_re, one_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, - add_zero, add_im, one_im, mul_im, zero_add, div_ofNat_re, div_ofNat_im, zero_div, - re_ofNat, im_ofNat] at hCG - have hhc : RvM.halfContour F T₁ T₂ = I * ∫ y : ℝ in T₁..T₂, F (1/2 + y * I) := by - unfold RvM.halfContour - have hthis := hCG - simp only [smul_eq_mul] at hthis - have hc : ((1/2 : ℝ) : ℂ) = (1/2 : ℂ) := by norm_num - simp only [hc] at hthis - linear_combination hthis - rw [hhc, Complex.mul_im, Complex.I_re, Complex.I_im, zero_mul, one_mul, zero_add] - have hcont : Continuous fun y : ℝ => F (1/2 + y * I) := by - have hd := logDeriv_archChi_differentiableOn q κ - have hmap : Continuous fun y : ℝ => ((1:ℂ)/2 + y * I) := by fun_prop - refine (hd.continuousOn.comp_continuous hmap fun y => ?_) - show 0 < ((1:ℂ)/2 + y * I).re - simp - rw [show ((∫ y : ℝ in T₁..T₂, F (1/2 + y * I)).re) = ∫ y : ℝ in T₁..T₂, (F (1/2 + y * I)).re from - (Complex.reCLM.intervalIntegral_comp_comm (hcont.intervalIntegrable _ _)).symm] - simp_rw [hF, re_logDeriv_archChi_half] + rw [RvM.halfContour_im_eq_integral_re_half (logDeriv_archChi_differentiableOn q κ)] + simp_rw [re_logDeriv_archChi_half] rw [intervalIntegral.integral_const_mul] field_simp diff --git a/zeta23/Zeta23/ThmE/GzGpChi.lean b/zeta23/Zeta23/ThmE/GzGpChi.lean index 7a9e4eee81..04599f2db0 100644 --- a/zeta23/Zeta23/ThmE/GzGpChi.lean +++ b/zeta23/Zeta23/ThmE/GzGpChi.lean @@ -54,17 +54,4 @@ theorem ZeroConfig.Gz_eq_GpChi (Z : ZeroConfig) (P : Params) (κ q : ℕ) (c : (GzGp.fk_contDiff P T hφC2 l) (GzGp.fk_tsupport P T hφsupp k) (GzGp.fk_tsupport P T hφsupp l) rw [GzGp.Gz_eq_W, hW, GzGpChi.EFrhs_eq_GpChi] -/-- Under H-EF(χ) the zero-side entries are absolutely summable (for the χ-tail file). -/ -theorem ZeroConfig.summable_Gsummand_chi (Z : ZeroConfig) (P : Params) (κ q : ℕ) (c : ℕ → ℂ) (T : ℝ) - (hEF : ThmE.ExplicitFormulaPaperChi κ q c Z) (hL : 0 < P.L T) - (hφC2 : ContDiff ℝ 2 (fun u => (P.phi T u : ℂ))) - (hφsupp : tsupport (P.phi T) ⊆ Icc (-(P.L T / 2)) (P.L T / 2)) (k l : Fin (P.d T)) : - Summable (fun ρ : Z.carrier => Z.Gsummand P T k l ρ) := by - obtain ⟨hS, -, -⟩ := hEF (P.L T) hL (P.fk T k) (P.fk T l) (GzGp.fk_contDiff P T hφC2 k) - (GzGp.fk_contDiff P T hφC2 l) (GzGp.fk_tsupport P T hφsupp k) (GzGp.fk_tsupport P T hφsupp l) - refine hS.congr fun ρ => ?_ - unfold ZeroConfig.Gsummand ZeroConfig.Wsummand - rw [GzGp.paperFT_fk, GzGp.paperFT_fk, ← Complex.conj_ofReal (P.tau T l), ← map_sub, - GzGp.phiHat_conj, Complex.conj_conj, Complex.conj_ofReal] - end Zeta23 diff --git a/zeta23/Zeta23/ThmE/HorizontalChi.lean b/zeta23/Zeta23/ThmE/HorizontalChi.lean index 941f67dbe9..390caacdd5 100644 --- a/zeta23/Zeta23/ThmE/HorizontalChi.lean +++ b/zeta23/Zeta23/ThmE/HorizontalChi.lean @@ -4,11 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/ThmE/HorizontalChi.lean — the horizontal sides of the explicit-formula rectangle for L(s,χ) -vanish along good heights. The analogue for L(s,χ) of Zeta23/WeilEF/Horizontal.lean: ‖H‖ ≤ C_H/(1+R²) (norm_Hfn_le); -for re s ∈ [1/2, 3/2]: Λ'/Λ_sym = L'/L + (arch)' /arch (logDeriv_completedLSym_split, exists_parity, -norm_logDeriv_archChi_le); for re s < 1/2 reflect with logDeriv_completedLSym_one_sub_conj -(s ↦ 1 − conj s keeps the imaginary part); then length × sup and log²(q(j+10))/(1+(j+7)²) → 0. +Zeta23/ThmE/HorizontalChi.lean — Horizontal sides vanish along good heights for L(s,χ) +(instantiation of `Zeta23.WeilEF.horizontal_vanish_of_log_sq`). -/ import Zeta23.ThmE.FullLineChiProof @@ -34,127 +31,48 @@ theorem horizontal_vanish_chi (hq : 1 < q) (hprim : χ.IsPrimitive) {k : ℝ → ∧ Tendsto (fun j : ℕ => HIntegral (fun s => Hfn k s * logDeriv (completedLSym χ) s) (1 - c) c (-(R j))) atTop (𝓝 0) := by have hχ1 : χ ≠ 1 := ne_one_of_primitive hq hprim - obtain ⟨CH, hCH0, hH⟩ := norm_Hfn_le hk hkc obtain ⟨κ, hκ1, hκdef⟩ := exists_parity' χ obtain ⟨Ca, hCa, harch⟩ := norm_logDeriv_archChi_le q κ hκ1 - have hq2 : (2:ℝ) ≤ q := by exact_mod_cast hq - have hq0 : (0:ℝ) < q := by linarith - set Lg : ℕ → ℝ := fun j => Real.log ((q:ℝ) * ((j : ℝ) + 10)) with hLgdef + have hq2 : (2 : ℝ) ≤ q := by exact_mod_cast hq + have hq0 : (0 : ℝ) < q := by linarith + set Lg : ℕ → ℝ := fun j => Real.log ((q : ℝ) * ((j : ℝ) + 10)) have hLg1 : ∀ j : ℕ, 1 ≤ Lg j := fun j => by - rw [hLgdef, ← Real.log_exp 1] - refine Real.log_le_log (Real.exp_pos 1) ?_ - have := Real.exp_one_lt_d9 - have : (0 : ℝ) ≤ j := Nat.cast_nonneg j - nlinarith - have hLg_ge : ∀ j : ℕ, Real.log ((j:ℝ) + 10) ≤ Lg j := fun j => by - show Real.log ((j:ℝ) + 10) ≤ Real.log ((q:ℝ) * ((j : ℝ) + 10)) - rw [Real.log_mul hq0.ne' (by positivity)] - linarith [Real.log_nonneg (by linarith : (1:ℝ) ≤ q)] - set K : ℝ := Ca + Cg with hKdef - have hK0 : 0 < K := by positivity - -- the arch factor is archChi q κ - have harchfun : (fun z => (q : ℂ) ^ (z / 2) * DirichletCharacter.gammaFactor χ z) = archChi q κ := by - funext z; rw [hκdef z]; rfl - -- ‖Λ'/Λ_sym(s)‖ ≤ K log²(q(j+10)) on the good horizontals, re s ∈ [1/2, 3/2] + rw [← Real.log_exp 1] + exact Real.log_le_log (Real.exp_pos 1) (by nlinarith [Real.exp_one_lt_d9, Nat.cast_nonneg (α := ℝ) j]) + have hLg_ge : ∀ j : ℕ, Real.log ((j : ℝ) + 10) ≤ Lg j := fun j => by + dsimp [Lg]; rw [Real.log_mul hq0.ne' (by positivity)] + linarith [Real.log_nonneg (by linarith : (1 : ℝ) ≤ q)] + set K : ℝ := Ca + Cg + have harchfun : (fun z => (q : ℂ) ^ (z / 2) * DirichletCharacter.gammaFactor χ z) = archChi q κ := + funext fun z => by rw [hκdef z]; rfl have hright : ∀ (j : ℕ) (s : ℂ), (s.im = R j ∨ s.im = -R j) → 1/2 ≤ s.re → s.re ≤ 3/2 → ‖logDeriv (completedLSym χ) s‖ ≤ K * (Lg j) ^ 2 := by intro j s hsim hre1 hre2 obtain ⟨hR1, hR2, hRs⟩ := hR j - have hj0 : (0:ℝ) ≤ j := Nat.cast_nonneg j - have hRj0 : 0 ≤ R j := by linarith + have hRj0 : 0 ≤ R j := by linarith [Nat.cast_nonneg (α := ℝ) j] obtain ⟨hL, hLL⟩ := hRs s hsim hre1 (by linarith) - have hre0 : 0 < s.re := by linarith - rw [logDeriv_completedLSym_split hq hχ1 hre0 hL, harchfun] + rw [logDeriv_completedLSym_split hq hχ1 (by linarith) hL, harchfun] have him8 : |s.im| ≤ (j : ℝ) + 8 := by - rcases hsim with h | h - · rw [h, abs_of_nonneg hRj0]; exact hR2 - · rw [h, abs_neg, abs_of_nonneg hRj0]; exact hR2 + rcases hsim with h | h <;> simp [h, abs_of_nonneg hRj0, hR2] have ha : ‖logDeriv (archChi q κ) s‖ ≤ Ca * Lg j := by - have h := harch s.re s.im hre1 hre2 - rw [Complex.re_add_im] at h - refine h.trans (mul_le_mul_of_nonneg_left ?_ hCa.le) - refine (Real.log_le_log (by positivity) (by linarith)).trans (hLg_ge j) + have h := harch s.re s.im hre1 hre2; rw [Complex.re_add_im] at h + exact h.trans (mul_le_mul_of_nonneg_left + ((Real.log_le_log (by positivity) (by linarith)).trans (hLg_ge j)) hCa.le) have hLg2 : Lg j ≤ Lg j ^ 2 := by nlinarith [hLg1 j] calc ‖logDeriv χ.LFunction s + logDeriv (archChi q κ) s‖ ≤ ‖logDeriv χ.LFunction s‖ + ‖logDeriv (archChi q κ) s‖ := norm_add_le _ _ - _ ≤ Cg * Lg j ^ 2 + Ca * Lg j ^ 2 := by - have : Ca * Lg j ≤ Ca * Lg j ^ 2 := mul_le_mul_of_nonneg_left hLg2 hCa.le - linarith - _ = K * Lg j ^ 2 := by rw [hKdef]; ring - -- the same bound on the whole horizontal segment x ∈ [1-c, c], by reflection for x < 1/2 - have hall : ∀ (j : ℕ) (x y : ℝ), (y = R j ∨ y = -R j) → 1 - c ≤ x → x ≤ c → - ‖logDeriv (completedLSym χ) ((x : ℂ) + y * I)‖ ≤ K * (Lg j) ^ 2 := by - intro j x y hy hx1 hx2 - rcases le_or_gt (1/2 : ℝ) x with hx | hx - · exact hright j _ (by rcases hy with h | h <;> simp [h]) (by simpa using hx) - (by simp; linarith) - · -- reflect: s = 1 − conj s', s' := (1 − x) + y i (same imaginary part) - set s' : ℂ := ((1 - x : ℝ) : ℂ) + y * I with hs'def - have him' : s'.im = y := by simp [hs'def] - have hre' : s'.re = 1 - x := by simp [hs'def] - have e : ((x : ℂ) + y * I) = 1 - (starRingEnd ℂ) s' := by - apply Complex.ext <;> simp [hs'def] - rw [e, logDeriv_completedLSym_one_sub_conj hq hprim s', norm_neg, Complex.norm_conj] - refine hright j s' ?_ (by rw [hre']; linarith) (by rw [hre']; linarith) - rw [him']; exact hy - -- integral bound along either horizontal - have hint : ∀ (j : ℕ) (y : ℝ), (y = R j ∨ y = -R j) → - ‖HIntegral (fun s => Hfn k s * logDeriv (completedLSym χ) s) (1 - c) c y‖ - ≤ CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| := by - intro j y hy - unfold HIntegral - refine intervalIntegral.norm_integral_le_of_norm_le_const fun x hx => ?_ - rw [Set.uIoc_of_le (by linarith)] at hx - have hy2 : y ^ 2 = (R j) ^ 2 := by rcases hy with h | h <;> simp [h] - dsimp only - rw [norm_mul, ← hy2] - exact mul_le_mul (hH x y (by linarith [hx.1]) (by linarith [hx.2])) - (hall j x y hy hx.1.le hx.2) (norm_nonneg _) (by positivity) - -- the majorant tends to 0 - set Lq : ℝ := Real.log q with hLq - have hLq0 : 0 ≤ Lq := Real.log_nonneg (by linarith) - set b : ℕ → ℝ := fun j => CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| with hbdef - have hLg_sq : ∀ j : ℕ, Lg j ^ 2 ≤ 2 * Lq ^ 2 + 8 * ((j : ℝ) + 10) := fun j => by - have hy0 : (0 : ℝ) ≤ (j : ℝ) + 10 := by positivity - have h := Real.log_le_rpow_div hy0 (by norm_num : (0:ℝ) < 1/2) - have hsq : (((j : ℝ) + 10) ^ (1/2 : ℝ)) ^ 2 = (j : ℝ) + 10 := by - rw [← Real.rpow_natCast, ← Real.rpow_mul hy0]; norm_num - have h0 : 0 ≤ Real.log ((j:ℝ) + 10) := Real.log_nonneg (by linarith [(Nat.cast_nonneg j : (0:ℝ) ≤ j)]) - have hl2 : Real.log ((j:ℝ) + 10) ^ 2 ≤ 4 * ((j : ℝ) + 10) := by - calc Real.log ((j:ℝ) + 10) ^ 2 ≤ (((j : ℝ) + 10) ^ (1/2 : ℝ) / (1/2)) ^ 2 := pow_le_pow_left₀ h0 h 2 - _ = 4 * ((j : ℝ) + 10) := by rw [div_pow, hsq]; ring - have hsplit : Lg j = Lq + Real.log ((j:ℝ) + 10) := by - show Real.log ((q:ℝ) * ((j : ℝ) + 10)) = Real.log q + Real.log ((j:ℝ) + 10) - exact Real.log_mul hq0.ne' (by positivity) - rw [hsplit] - nlinarith [sq_nonneg (Lq - Real.log ((j:ℝ) + 10))] - have hb_le : ∀ j : ℕ, b j ≤ (CH * K * |c - (1 - c)| * (2 * Lq ^ 2 + 16)) / ((j : ℝ) + 7) := fun j => by - obtain ⟨hR1, hR2, -⟩ := hR j - have hj0 : (0 : ℝ) ≤ j := Nat.cast_nonneg j - have h1 : Lg j ^ 2 / (1 + R j ^ 2) ≤ (2 * Lq ^ 2 + 16) / ((j : ℝ) + 7) := by - rw [div_le_div_iff₀ (by positivity) (by positivity)] - have hR7 : ((j : ℝ) + 7) ^ 2 ≤ R j ^ 2 := pow_le_pow_left₀ (by positivity) hR1 2 - have hj7 : (j:ℝ) + 7 ≤ ((j : ℝ) + 7) ^ 2 := by nlinarith - nlinarith [hLg_sq j, hR7, mul_le_mul_of_nonneg_right (hLg_sq j) (show (0:ℝ) ≤ (j:ℝ) + 7 by positivity), - mul_nonneg hLq0 hLq0, sq_nonneg ((j:ℝ) + 7)] - have e : b j = CH * K * |c - (1 - c)| * (Lg j ^ 2 / (1 + R j ^ 2)) := by - rw [hbdef]; ring - rw [e] - calc CH * K * |c - (1 - c)| * (Lg j ^ 2 / (1 + R j ^ 2)) - ≤ CH * K * |c - (1 - c)| * ((2 * Lq ^ 2 + 16) / ((j : ℝ) + 7)) := - mul_le_mul_of_nonneg_left h1 (by positivity) - _ = CH * K * |c - (1 - c)| * (2 * Lq ^ 2 + 16) / ((j : ℝ) + 7) := by ring - have hb0 : ∀ j, 0 ≤ b j := fun j => by rw [hbdef]; positivity - have hb : Tendsto b atTop (𝓝 0) := by - have hlim : Tendsto (fun j : ℕ => (CH * K * |c - (1 - c)| * (2 * Lq ^ 2 + 16)) / ((j : ℝ) + 7)) - atTop (𝓝 0) := - tendsto_const_nhds.div_atTop - (tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop) - exact squeeze_zero hb0 hb_le hlim - exact ⟨squeeze_zero_norm (fun j => hint j (R j) (Or.inl rfl)) hb, - squeeze_zero_norm (fun j => hint j (-(R j)) (Or.inr rfl)) hb⟩ + _ ≤ Cg * Lg j ^ 2 + Ca * Lg j ^ 2 := + add_le_add hLL (ha.trans (mul_le_mul_of_nonneg_left hLg2 hCa.le)) + _ = K * Lg j ^ 2 := by dsimp [K]; ring + refine horizontal_vanish_of_log_sq hk hkc (by linarith) (by linarith) (K := K) (A := (q : ℝ)) + (by positivity) (by linarith) (j₀ := 7) (by omega) fun j => ⟨(hR j).1, fun s hsim hre1 hre2 => ?_⟩ + rw [show ((q : ℝ) * ((j : ℝ) + (7 : ℕ) + 3)) = (q : ℝ) * ((j : ℝ) + 10) by push_cast; ring] + rcases le_or_gt (1/2 : ℝ) s.re with hx | hx + · exact hright j s hsim hx (by linarith) + · set s' : ℂ := 1 - (starRingEnd ℂ) s + have hs : s = 1 - (starRingEnd ℂ) s' := by simp [s'] + rw [hs, logDeriv_completedLSym_one_sub_conj hq hprim s', norm_neg, Complex.norm_conj] + exact hright j s' (by simpa [s'] using hsim) (by simp [s']; linarith) (by simp [s']; linarith) end ThmE end Zeta23 - -end diff --git a/zeta23/Zeta23/ThmE/Hypotheses.lean b/zeta23/Zeta23/ThmE/Hypotheses.lean index 65062889f7..a0feddb59b 100644 --- a/zeta23/Zeta23/ThmE/Hypotheses.lean +++ b/zeta23/Zeta23/ThmE/Hypotheses.lean @@ -27,6 +27,7 @@ for an ABSTRACT `ZeroConfig`; only `Zeta23/ThmE/Statement.lean` mentions Mathlib this file only states the inputs. -/ import Zeta23.Hypotheses +import Zeta23.PrimeSideTemp import Mathlib.NumberTheory.DirichletCharacter.Basic open scoped BigOperators ArithmeticFunction ComplexConjugate @@ -93,21 +94,9 @@ structure RiemannVonMangoldtChi (q : ℕ) (Z : ZeroConfig) : Prop where local_count : ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ t : ℝ, (Z.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3) /-- **H-Γ(χ)**: "μ_χ = (1/2π)log(q|τ|/2π) + O(τ⁻²) satisfies (eq:mufacts)–(eq:muints) with ℓ₁ replaced -by ℓ_{1,χ}" ([thm:E] proof (iii)) — the nine fields of `Zeta23.GammaFacts` for `muq κ q` and `ell1q q`. -/ -structure GammaFactsChi (κ q : ℕ) : Prop where - even : ∀ τ : ℝ, muq κ q (-τ) = muq κ q τ - smooth : ContDiff ℝ ⊤ (muq κ q) - monotoneOn : MonotoneOn (muq κ q) (Ici 0) - mu_zero_le : ∀ τ : ℝ, muq κ q 0 ≤ muq κ q τ - neg_one_lt_mu_zero : -1 < muq κ q 0 - stirling : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → - |muq κ q τ - (1 / (2 * Real.pi)) * Real.log (q * |τ| / (2 * Real.pi))| ≤ C / τ ^ 2 - deriv_bound : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |deriv (muq κ q) τ| ≤ C / |τ| - int_mu : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - |(∫ τ in T..(2 * T), muq κ q τ) - T * ell1q q T / (2 * Real.pi)| ≤ C / T - int_mu_sq : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - |(∫ τ in T..(2 * T), muq κ q τ ^ 2) - T * ell1q q T ^ 2 / (4 * Real.pi ^ 2)| - ≤ C * (T * ell1q q T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 +by ℓ_{1,χ}" ([thm:E] proof (iii)) — `GammaFactsFor` specialized to `muq κ q` and `ell1q q`. -/ +abbrev GammaFactsChi (κ q : ℕ) : Prop := + GammaFactsFor (muq κ q) (fun τ => q * |τ| / (2 * Real.pi)) (ell1q q) /-- **The Chebyshev–Mertens bounds for the coefficients Λ(n)χ(n)** ([thm:E] proof (iii): "|Λ(n)χ(n)| = Λ(n)·1_{(n,q)=1}, so Lemma lem:cheb holds for these coefficients with O_q(·) errors (finitely many @@ -217,12 +206,6 @@ structure GammaFactsChiBounded (κ q : ℕ) (C : ℝ) : Prop where |(∫ τ in T..(2 * T), muq κ q τ ^ 2) - T * ell1q q T ^ 2 / (4 * Real.pi ^ 2)| ≤ C * (T * ell1q q T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 -/-- forgetting the uniformity. -/ -lemma GammaFactsChiBounded.toGammaFactsChi {κ q : ℕ} {C : ℝ} - (h : GammaFactsChiBounded κ q C) : GammaFactsChi κ q := - ⟨h.even, h.smooth, h.monotoneOn, h.mu_zero_le, h.neg_one_lt_mu_zero, - ⟨C, h.stirling⟩, ⟨C, h.deriv_bound⟩, ⟨C, C, h.int_mu⟩, ⟨C, C, h.int_mu_sq⟩⟩ - /-- `ChebyshevMertensCoprime` with both constants bounded by `B`. -/ structure ChebyshevMertensCoprimeBounded (q : ℕ) (B : ℝ) : Prop where cheb2a : ∀ x : ℝ, 2 ≤ x → @@ -232,10 +215,37 @@ structure ChebyshevMertensCoprimeBounded (q : ℕ) (B : ℝ) : Prop where |∑ n ∈ (Finset.Ioc 0 ⌊x⌋₊).filter (fun n => Nat.Coprime n q), Λ n ^ 2 / n * (Real.log x - Real.log n) - Real.log x ^ 3 / 6| ≤ B * Real.log x ^ 2 -/-- forgetting the uniformity. -/ -lemma ChebyshevMertensCoprimeBounded.toChebyshevMertensCoprime {q : ℕ} {B : ℝ} - (h : ChebyshevMertensCoprimeBounded q B) : ChebyshevMertensCoprime q := - ⟨⟨B, h.cheb2a⟩, ⟨B, h.cheb2b⟩⟩ +section TracesChiDefs +variable (P : Params) (κ q : ℕ) (c : ℕ → ℂ) + +/-- `λ_{1,χ} := L/ℓ_{1,χ}` ([thm:E] proof (iii): "λ₁ = L/ℓ_{1,χ} → λ as q is fixed"). -/ +def lam1q (T : ℝ) : ℝ := P.L T / ell1q q T + +/-- G_{kl} for L(s,χ) via the PRIME side: `∫ φ̂(τ−τ_k) φ̂(τ−τ_l) ν_{X,χ}(τ) dτ`. -/ +def GentryChi (T : ℝ) (k l : ℤ) : ℝ := + ∫ τ : ℝ, P.phiHatR T (τ - P.tau T k) * P.phiHatR T (τ - P.tau T l) * nuXc κ q c (P.X T) τ + +/-- tr G̃ for L(s,χ) (prime side). -/ +def trGtildeChi (T : ℝ) : ℝ := (P.L T)⁻¹ * ∑ k : Fin (P.d T), GentryChi P κ q c T k k + +/-- tr G̃² for L(s,χ) (prime side). -/ +def trGtildeSqChi (T : ℝ) : ℝ := + (P.L T)⁻¹ ^ 2 * ∑ k : Fin (P.d T), ∑ l : Fin (P.d T), GentryChi P κ q c T k l ^ 2 + +/-- The main term of [eq:tr2] for L(s,χ): `(TL/2π)(ℓ_{1,χ}² + L²/3)`. -/ +def mainTr2Chi (T : ℝ) : ℝ := + T * P.L T / (2 * Real.pi) * (ell1q q T ^ 2 + P.L T ^ 2 / 3) + +/-- `[thm:traces]` for `L(s,χ)` as an instance of `Zeta23.TracesBoundsG`. -/ +abbrev TracesBoundsChi (aT trG trG2 Ncnt : ℝ → ℝ) : Prop := + TracesBoundsG P P.calE aT trG trG2 (mainTr2Chi P q) (ell1q q) Ncnt + +/-- The Theorem E traces hypothesis at a zero configuration Z. -/ +def ThmTracesHypChi (Z : ZeroConfig) : Prop := + TracesBoundsChi P q P.a (trGtildeChi P κ q c) (trGtildeSqChi P κ q c) + (fun T => (Z.N T (2 * T) : ℝ)) + +end TracesChiDefs end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/IntMuChi.lean b/zeta23/Zeta23/ThmE/IntMuChi.lean index 8b2456f220..b4831232b5 100644 --- a/zeta23/Zeta23/ThmE/IntMuChi.lean +++ b/zeta23/Zeta23/ThmE/IntMuChi.lean @@ -7,13 +7,8 @@ SPDX-License-Identifier: Apache-2.0 Zeta23/ThmE/IntMuChi.lean — the [eq:muints]-type integrals for μ_χ: the int_mu / int_mu_sq fields of GammaFactsChi κ q. -Route: the proofs are generic in the function — with explicit -constants (`int_g_explicit`, `int_g_sq_explicit`; the ∃-forms and the fixed-q μ_χ forms are their corollaries) -for an arbitrary continuous g with |g(τ) − (1/2π)log(|τ|/2π)| ≤ C/τ² (section Generic). Then μ_χ = g + (log q)/(2π) with -g := μ_χ − (log q)/(2π), since the conductor cancels in the Stirling field: - μ_χ(τ) − (1/2π)log(q|τ|/2π) = g(τ) − (1/2π)log(|τ|/2π), -and ell1q q T = ell1 T + log q, so - ∫_T^{2T} μ_χ = T·ell1q/(2π) + O(1/T), ∫_T^{2T} μ_χ² = (T·ell1q²/4π²)(1 + O(l⁻²)). +Generic continuous-g lemmas live in `Zeta23.MuInts` (`GammaFacts/IntMu.lean`); +this file re-exports thin wrappers and builds the μ_χ / q-uniform forms. -/ import Zeta23.ThmE.Hypotheses import Zeta23.GammaFacts.IntMu @@ -30,407 +25,35 @@ section Generic variable {g : ℝ → ℝ} -/-- Explicit-constant form of `int_g_of_stirling` (constants depend only on the Stirling constant C). -/ theorem int_g_explicit (hcont : Continuous g) {C : ℝ} (hC : ∀ τ : ℝ, 1 ≤ |τ| → |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) {T : ℝ} (hT : 1 ≤ T) : - |(∫ τ in T..(2 * T), g τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T := by - have hC0 : 0 ≤ C := by - have h := hC 1 (by norm_num) - have := abs_nonneg (g 1 - 1 / (2 * Real.pi) * Real.log (|1| / (2 * Real.pi))) - nlinarith - have hμcont : Continuous g := hcont - have hT0 : (0 : ℝ) < T := by linarith - -- split μ = main + error on [T, 2T] - have hint_mu : IntervalIntegrable g volume T (2 * T) := - hμcont.intervalIntegrable _ _ - have hint_main : IntervalIntegrable - (fun τ : ℝ => (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - refine ContinuousOn.mul continuousOn_const ?_ - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact ((Real.continuousAt_log (by positivity)).comp - (continuousAt_id.div_const _)).continuousWithinAt - have hsplit : (∫ τ in T..(2 * T), g τ) - = (∫ τ in T..(2 * T), (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) - + ∫ τ in T..(2 * T), - (g τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) := by - rw [← intervalIntegral.integral_add hint_main (hint_mu.sub hint_main)] - congr 1 - funext τ - ring - rw [hsplit, MuInts.integral_main_eq hT0] - rw [add_sub_cancel_left] - -- bound the error integral - have herr_int : IntervalIntegrable - (fun τ : ℝ => g τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) - volume T (2 * T) := hint_mu.sub hint_main - have hbound : ∀ τ ∈ Set.Icc T (2 * T), - |g τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| ≤ C / τ ^ 2 := by - intro τ hτ - have hτ1 : (1 : ℝ) ≤ τ := le_trans hT hτ.1 - have habs : |τ| = τ := abs_of_pos (by linarith) - have h := hC τ (by rwa [habs]) - rwa [habs] at h - have hCtau : IntervalIntegrable (fun τ : ℝ => C / τ ^ 2) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact (continuousAt_const.div (continuousAt_pow _ _) (by positivity)).continuousWithinAt - have hCint : ∫ τ in T..(2 * T), C / τ ^ 2 = C / (2 * T) := by - have hftc2 : ∀ τ ∈ Set.uIcc T (2 * T), - HasDerivAt (fun x : ℝ => -C / x) (C / τ ^ 2) τ := by - intro τ hτ - rw [Set.uIcc_of_le (by linarith)] at hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - have hinv : HasDerivAt (fun x : ℝ => x⁻¹) (-1 / τ ^ 2) τ := (hasDerivAt_id τ).inv hτ0.ne' - have h1 := hinv.const_mul (-C) - have h3 : (fun x : ℝ => -C * x⁻¹) = fun x : ℝ => -C / x := by - funext x - ring - rw [h3] at h1 - have heq : -C * (-1 / τ ^ 2) = C / τ ^ 2 := by ring - rw [heq] at h1 - exact h1 - rw [integral_eq_sub_of_hasDerivAt hftc2 hCtau] - field_simp - ring - calc |∫ τ in T..(2 * T), - (g τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi)))| - ≤ ∫ τ in T..(2 * T), - |g τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| := - intervalIntegral.abs_integral_le_integral_abs (by linarith) - _ ≤ ∫ τ in T..(2 * T), C / τ ^ 2 := by - refine intervalIntegral.integral_mono_on (by linarith) herr_int.abs hCtau ?_ - intro τ hτ - exact hbound τ hτ - _ = C / (2 * T) := hCint - _ ≤ C / T := by - have h2 : (0 : ℝ) < 2 * T := by linarith - rw [div_le_div_iff₀ h2 hT0] - nlinarith + |(∫ τ in T..(2 * T), g τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T := + MuInts.int_g_explicit hcont hC hT - -set_option maxHeartbeats 1600000 in -/-- Explicit-constant form of `int_g_sq_of_stirling` (constants depend only on the Stirling constant C). -/ theorem int_g_sq_explicit (hcont : Continuous g) {C : ℝ} (hC : ∀ τ : ℝ, 1 ≤ |τ| → |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) {T : ℝ} (hT : max (2 * Real.pi * Real.exp 4) (32 * Real.pi ^ 2 * (C * (1 + C) + 1)) ≤ T) : |(∫ τ in T..(2 * T), g τ ^ 2) - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ (8 * (1 + 2 * Real.log 2 ^ 2) + 1) * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 := by - have hC0 : 0 ≤ C := by - have h := hC 1 (by norm_num) - have := abs_nonneg (g 1 - 1 / (2 * Real.pi) * Real.log (|1| / (2 * Real.pi))) - nlinarith - have hπ : (0 : ℝ) < Real.pi := Real.pi_pos - have hμcont : Continuous g := hcont - set C₂ : ℝ := C * (1 + C) + 1 with hC₂ - have hC₂0 : (0 : ℝ) < C₂ := by nlinarith - set m : ℝ := Real.log 2 with hm - have hm0 : (0 : ℝ) < m := Real.log_pos (by norm_num) - have hm1 : m < 1 := by - rw [hm] - have := Real.log_two_lt_d9 - linarith - have hT1 : 2 * Real.pi * Real.exp 4 ≤ T := le_trans (le_max_left _ _) hT - have hT2 : 32 * Real.pi ^ 2 * C₂ ≤ T := le_trans (le_max_right _ _) hT - have hexp1 : (1 : ℝ) ≤ Real.exp 4 := by - have := Real.add_one_le_exp (4 : ℝ) - linarith - have hT0 : (0 : ℝ) < T := by nlinarith [Real.exp_pos (4 : ℝ)] - have hL4 : (4 : ℝ) ≤ l T := by - unfold l - rw [show (4 : ℝ) = Real.log (Real.exp 4) from (Real.log_exp 4).symm] - apply Real.log_le_log (Real.exp_pos 4) - rw [le_div_iff₀ (by positivity)] - linarith - set L : ℝ := l T with hLdef - have hL0 : (0 : ℝ) < L := by linarith - have hL_le_T : L ≤ T := by - rw [hLdef] - unfold l - have h1 := Real.log_le_sub_one_of_pos (by positivity : (0 : ℝ) < T / (2 * Real.pi)) - have h2 : T / (2 * Real.pi) ≤ T := by - rw [div_le_iff₀ (by positivity)] - have hπ3 : (3 : ℝ) < Real.pi := Real.pi_gt_three - nlinarith - linarith - have hell : ell1 T = L + 2 * m - 1 := by - unfold ell1 - rw [← hLdef, ← hm] - have hell_pos : (0 : ℝ) < ell1 T := by - rw [hell] - nlinarith - have hell_ge : L / 2 ≤ ell1 T := by - rw [hell] - nlinarith - have hell2 : L ^ 2 / 4 ≤ ell1 T ^ 2 := by - nlinarith [hell_ge, hL0, hell_pos] - have hmain_bound : ∀ τ ∈ Set.Icc T (2 * T), - |(1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| ≤ (L + m) / (2 * Real.pi) := by - intro τ hτ - have hτT : T ≤ τ := hτ.1 - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτT - have hlog_nonneg : (0 : ℝ) ≤ Real.log (τ / (2 * Real.pi)) := by - apply Real.log_nonneg - rw [le_div_iff₀ (by positivity)] - nlinarith - have hlog_le : Real.log (τ / (2 * Real.pi)) ≤ L + m := by - have h1 : Real.log (τ / (2 * Real.pi)) ≤ Real.log (2 * T / (2 * Real.pi)) := by - apply Real.log_le_log (by positivity) - gcongr - exact hτ.2 - have h2 : Real.log (2 * T / (2 * Real.pi)) = m + L := by - rw [show 2 * T / (2 * Real.pi) = 2 * (T / (2 * Real.pi)) by ring, - Real.log_mul (by norm_num) (by positivity), hm, hLdef] - rfl - linarith - rw [abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ 1 / (2 * Real.pi)), - abs_of_nonneg hlog_nonneg] - rw [one_div, div_eq_mul_inv (L + m), mul_comm (L + m)] - exact mul_le_mul_of_nonneg_left hlog_le (by positivity) - have herr_bound : ∀ τ ∈ Set.Icc T (2 * T), - |g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2| - ≤ C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C) := by - intro τ hτ - have hτT : T ≤ τ := hτ.1 - have hτ1 : (1 : ℝ) ≤ τ := by nlinarith - have habs : |τ| = τ := abs_of_pos (by linarith) - have herr := hC τ (by rwa [habs]) - rw [habs] at herr - have hmb := hmain_bound τ hτ - have hsq : g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2 - = (g τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) - * (g τ + (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) := by - ring - rw [hsq, abs_mul] - have hτ2 : (0 : ℝ) < τ ^ 2 := by positivity - have hCτ : C / τ ^ 2 ≤ C := by - rw [div_le_iff₀ hτ2] - have hτsq1 : (1 : ℝ) ≤ τ ^ 2 := by nlinarith - nlinarith - have hsum_bound : |g τ + (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| - ≤ 2 * ((L + m) / (2 * Real.pi)) + C := by - have h4 := abs_sub_abs_le_abs_sub (g τ) - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) - have h5 : |g τ - (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| ≤ C := - le_trans herr hCτ - have h3 : |g τ| ≤ (L + m) / (2 * Real.pi) + C := by linarith - calc |g τ + (1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| - ≤ |g τ| + |(1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))| := - abs_add_le _ _ - _ ≤ 2 * ((L + m) / (2 * Real.pi)) + C := by linarith - exact mul_le_mul herr hsum_bound (abs_nonneg _) (by positivity) - have hint_mu2 : IntervalIntegrable (fun τ : ℝ => g τ ^ 2) volume T (2 * T) := - (hμcont.pow 2).intervalIntegrable _ _ - have hint_main2 : IntervalIntegrable - (fun τ : ℝ => ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2) - volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact ((continuousAt_const.mul ((Real.continuousAt_log (by positivity)).comp - (continuousAt_id.div_const _))).pow 2).continuousWithinAt - have hCtau2 : IntervalIntegrable - (fun τ : ℝ => C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C)) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact ((continuousAt_const.div (continuousAt_pow _ _) (by positivity)).mul - continuousAt_const).continuousWithinAt - have hmain2 : ∫ τ in T..(2 * T), ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2 - = (1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) := by - rw [show (fun τ : ℝ => ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2) - = fun τ : ℝ => (1 / (4 * Real.pi ^ 2)) * Real.log (τ / (2 * Real.pi)) ^ 2 - from funext fun τ => by field_simp; ring] - rw [intervalIntegral.integral_const_mul, MuInts.integral_main_sq_eq hT0, hm] - have hsplit : (∫ τ in T..(2 * T), g τ ^ 2) - = (∫ τ in T..(2 * T), ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2) - + ∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2) := by - rw [← intervalIntegral.integral_add hint_main2 (hint_mu2.sub hint_main2)] - congr 1 - funext τ - ring - have hCint : ∫ τ in T..(2 * T), C / τ ^ 2 = C / (2 * T) := by - have hftc2 : ∀ τ ∈ Set.uIcc T (2 * T), - HasDerivAt (fun x : ℝ => -C / x) (C / τ ^ 2) τ := by - intro τ hτ - rw [Set.uIcc_of_le (by linarith)] at hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - have hinv : HasDerivAt (fun x : ℝ => x⁻¹) (-1 / τ ^ 2) τ := - (hasDerivAt_id τ).inv hτ0.ne' - have h1 := hinv.const_mul (-C) - have h3 : (fun x : ℝ => -C * x⁻¹) = fun x : ℝ => -C / x := by - funext x - ring - rw [h3] at h1 - have heq : -C * (-1 / τ ^ 2) = C / τ ^ 2 := by ring - rw [heq] at h1 - exact h1 - have hCtau : IntervalIntegrable (fun τ : ℝ => C / τ ^ 2) volume T (2 * T) := by - apply ContinuousOn.intervalIntegrable - rw [Set.uIcc_of_le (by linarith)] - intro τ hτ - have hτ0 : (0 : ℝ) < τ := lt_of_lt_of_le hT0 hτ.1 - exact (continuousAt_const.div (continuousAt_pow _ _) - (by positivity)).continuousWithinAt - rw [integral_eq_sub_of_hasDerivAt hftc2 hCtau] - field_simp - ring - have herrI : |∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| - ≤ (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) := by - have hCint2 : ∫ τ in T..(2 * T), C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C) - = (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) := by - rw [show (fun τ : ℝ => C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C)) - = fun τ : ℝ => (2 * ((L + m) / (2 * Real.pi)) + C) * (C / τ ^ 2) - from funext fun τ => by ring] - rw [intervalIntegral.integral_const_mul, hCint] - ring - calc |∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| - ≤ ∫ τ in T..(2 * T), - |g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2| := - intervalIntegral.abs_integral_le_integral_abs (by linarith) - _ ≤ ∫ τ in T..(2 * T), C / τ ^ 2 * (2 * ((L + m) / (2 * Real.pi)) + C) := by - refine intervalIntegral.integral_mono_on (by linarith) - (hint_mu2.sub hint_main2).abs hCtau2 ?_ - intro τ hτ - exact herr_bound τ hτ - _ = (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) := hCint2 - rw [hsplit, hmain2] - set X : ℝ := T * ell1 T ^ 2 / (4 * Real.pi ^ 2) / L ^ 2 with hX - have hX1 : T / (16 * Real.pi ^ 2) ≤ X := by - rw [hX, div_div, div_le_div_iff₀ (by positivity) (by positivity)] - nlinarith [hell2, hT0.le, sq_nonneg L, mul_pos hT0 (mul_pos hπ hπ)] - have hX0 : (0 : ℝ) < X := by - rw [hX] - positivity - have htri : |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - + (∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - + |∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| := by - have h1 := abs_add_le - ((1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) - (∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)) - calc |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - + (∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - = |((1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) - + ∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| := by - congr 1 - ring - _ ≤ _ := h1 - have hmain_dev : |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ 8 * (1 + 2 * m ^ 2) * X := by - have h1 : (1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2) = T * (1 - 2 * m ^ 2) / (4 * Real.pi ^ 2) := by - ring - rw [h1, abs_div, abs_mul, abs_of_pos hT0, - abs_of_pos (by positivity : (0 : ℝ) < 4 * Real.pi ^ 2)] - have habs1 : |1 - 2 * m ^ 2| ≤ 1 + 2 * m ^ 2 := by - rw [abs_le] - constructor <;> nlinarith [sq_nonneg m] - calc T * |1 - 2 * m ^ 2| / (4 * Real.pi ^ 2) - ≤ T * (1 + 2 * m ^ 2) / (4 * Real.pi ^ 2) := by gcongr - _ = 4 * (1 + 2 * m ^ 2) * (T / (16 * Real.pi ^ 2)) := by ring - _ ≤ 4 * (1 + 2 * m ^ 2) * X := by - gcongr - _ ≤ 8 * (1 + 2 * m ^ 2) * X := by nlinarith [hX0, sq_nonneg m] - have herr_final : (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) ≤ 1 * X := by - have hπ3 : (3 : ℝ) < Real.pi := Real.pi_gt_three - have hb1 : 2 * ((L + m) / (2 * Real.pi)) ≤ L := by - have h2a : (L + m) / (2 * Real.pi) ≤ (L + 1) / (2 * Real.pi) := by - gcongr - have h2b : (L + 1) / (2 * Real.pi) ≤ (L + 1) / 6 := - div_le_div_of_nonneg_left (by linarith) (by norm_num) (by nlinarith) - have h3 : (L + 1) / 6 ≤ L / 2 := by - rw [div_le_div_iff₀ (by norm_num) (by norm_num)] - nlinarith - linarith - have hb2 : 2 * ((L + m) / (2 * Real.pi)) + C ≤ (1 + C) * L := by - have h4 : C ≤ C * L := by nlinarith - nlinarith - have hb3 : (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) ≤ C₂ * L / T := by - have h5 : (0 : ℝ) ≤ 2 * ((L + m) / (2 * Real.pi)) + C := by positivity - have h6 : (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) - ≤ (C / (2 * T)) * ((1 + C) * L) := by - apply mul_le_mul_of_nonneg_left hb2 (by positivity) - calc (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) - ≤ (C / (2 * T)) * ((1 + C) * L) := h6 - _ = (C * (1 + C)) * L / (2 * T) := by ring - _ ≤ C₂ * L / T := by - rw [div_le_div_iff₀ (by linarith) (by linarith)] - have h7 : (0 : ℝ) ≤ C * (1 + C) := by nlinarith - nlinarith [mul_nonneg (mul_nonneg h7 hL0.le) hT0.le, hL0.le, hT0.le] - have hb4 : C₂ * L / T ≤ C₂ := by - rw [div_le_iff₀ hT0] - nlinarith - have hb5 : C₂ ≤ T / (32 * Real.pi ^ 2) := by - rw [le_div_iff₀ (by positivity)] - nlinarith - have hb6 : T / (32 * Real.pi ^ 2) ≤ T / (16 * Real.pi ^ 2) := by - apply div_le_div_of_nonneg_left hT0.le (by positivity) - nlinarith - rw [one_mul] - calc (C / (2 * T)) * (2 * ((L + m) / (2 * Real.pi)) + C) - ≤ C₂ * L / T := hb3 - _ ≤ C₂ := hb4 - _ ≤ T / (32 * Real.pi ^ 2) := hb5 - _ ≤ T / (16 * Real.pi ^ 2) := hb6 - _ ≤ X := hX1 - calc |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - + (∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ |(1 / (4 * Real.pi ^ 2)) * (T * (ell1 T ^ 2 + 1 - 2 * m ^ 2)) - - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - + |∫ τ in T..(2 * T), - (g τ ^ 2 - ((1 / (2 * Real.pi)) * Real.log (τ / (2 * Real.pi))) ^ 2)| := htri - _ ≤ 8 * (1 + 2 * m ^ 2) * X + 1 * X := by - have := le_trans herrI herr_final - linarith [hmain_dev] - _ = (8 * (1 + 2 * m ^ 2) + 1) * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / L ^ 2 := by - rw [hX] - ring - + ≤ (8 * (1 + 2 * Real.log 2 ^ 2) + 1) * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 := + MuInts.int_g_sq_explicit hcont hC hT -/-- **[eq:muints].1 given Stirling**: ∫_T^{2T} g = Tℓ₁/(2π) + O(1/T) (∃-form, from `int_g_explicit`). -/ theorem int_g_of_stirling (hcont : Continuous g) (hst : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - |(∫ τ in T..(2 * T), g τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T := by - obtain ⟨C, hC⟩ := hst - exact ⟨C, 1, fun T hT => int_g_explicit hcont hC hT⟩ + |(∫ τ in T..(2 * T), g τ) - T * ell1 T / (2 * Real.pi)| ≤ C / T := + MuInts.int_g_of_stirling hcont hst -/-- **[eq:muints].2 given Stirling**: ∫_T^{2T} g² = (Tℓ₁²/4π²)(1 + O(ℓ⁻²)) (∃-form, from `int_g_sq_explicit`). -/ theorem int_g_sq_of_stirling (hcont : Continuous g) (hst : ∃ C : ℝ, ∀ τ : ℝ, 1 ≤ |τ| → |g τ - (1 / (2 * Real.pi)) * Real.log (|τ| / (2 * Real.pi))| ≤ C / τ ^ 2) : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → |(∫ τ in T..(2 * T), g τ ^ 2) - T * ell1 T ^ 2 / (4 * Real.pi ^ 2)| - ≤ C * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 := by - obtain ⟨C, hC⟩ := hst - exact ⟨_, _, fun T hT => int_g_sq_explicit hcont hC hT⟩ + ≤ C * (T * ell1 T ^ 2 / (4 * Real.pi ^ 2)) / l T ^ 2 := + MuInts.int_g_sq_of_stirling hcont hst end Generic diff --git a/zeta23/Zeta23/ThmE/LGrowth.lean b/zeta23/Zeta23/ThmE/LGrowth.lean index 5ff8a85283..436b3b2497 100644 --- a/zeta23/Zeta23/ThmE/LGrowth.lean +++ b/zeta23/Zeta23/ThmE/LGrowth.lean @@ -314,15 +314,6 @@ theorem LFunction_lower_bound_two {s : ℂ} (hs : 2 ≤ s.re) : (1 / 3 : ℝ) simp only [norm_one] at h' linarith [Zeta23.RvM.one_third_lt_two_sub_pi_sq_div_six] -/-- Upper bound on Re s ≥ 2: ‖L(s,χ)‖ ≤ π²/6. -/ -theorem norm_LFunction_le_of_two_le_re {s : ℂ} (hs : 2 ≤ s.re) : - ‖χ.LFunction s‖ ≤ Real.pi ^ 2 / 6 := by - have h := norm_LFunction_sub_one_le (χ := χ) hs - have h' : ‖χ.LFunction s‖ ≤ ‖χ.LFunction s - 1‖ + ‖(1 : ℂ)‖ := by - simpa using norm_le_norm_sub_add (χ.LFunction s) (1 : ℂ) - simp only [norm_one] at h' - linarith - theorem LFunction_ne_zero_of_two_le_re {s : ℂ} (hs : 2 ≤ s.re) : χ.LFunction s ≠ 0 := by intro h have := LFunction_lower_bound_two (χ := χ) hs diff --git a/zeta23/Zeta23/ThmE/LandauChi.lean b/zeta23/Zeta23/ThmE/LandauChi.lean index 9b9f9a3307..eb8f661084 100644 --- a/zeta23/Zeta23/ThmE/LandauChi.lean +++ b/zeta23/Zeta23/ThmE/LandauChi.lean @@ -26,7 +26,6 @@ namespace ThmE variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} -set_option maxHeartbeats 800000 in /-- **Partial fraction for L'/L(s,χ) at height t** (|t| ≥ 6, χ ≠ 1): a finite set Z — the L-zeros within distance (22/25)·(91/50) of 2+it — with Σ-multiplicity ≤ C·log(q(|t|+3)) and L'/L(s) = Σ_{ρ ∈ Z} m_ρ/(s−ρ) + O(log(q(|t|+3))) on the ball of radius 3/2 around 2+it. -/ @@ -38,102 +37,36 @@ theorem L_logDeriv_partial_fraction (hχ1 : χ ≠ 1) : ∃ C : ℝ, 0 < C ∧ ∀ s ∈ Metric.closedBall (2 + t * I) (3/2), χ.LFunction s ≠ 0 → ‖logDeriv χ.LFunction s - ∑ ρ ∈ Z, (analyticOrderNatAt χ.LFunction ρ : ℂ) / (s - ρ)‖ ≤ C * Real.log ((q : ℝ) * (|t| + 3)) := by - have hq1 : (1 : ℝ) ≤ (q : ℝ) := by exact_mod_cast NeZero.pos q - refine ⟨(44795000 * 50 / 91) * (Real.log 72 + 3) + 12 * (Real.log 72 + 3), by positivity, - fun t ht => ?_⟩ - set s₀ : ℂ := 2 + t * I with hs₀ - have hs₀re : s₀.re = 2 := by simp [hs₀] - have hLs₀ : χ.LFunction s₀ ≠ 0 := - LFunction_ne_zero_of_two_le_re (by rw [hs₀re]) - have hlow : (1/3 : ℝ) ≤ ‖χ.LFunction s₀‖ := LFunction_lower_bound_two (by rw [hs₀re]) - have hfa : AnalyticOnNhd ℂ χ.LFunction (Metric.closedBall s₀ (91/50)) := fun s _ => - (DirichletCharacter.differentiable_LFunction hχ1).analyticAt s - set B : ℝ := 24 * (q : ℝ) * (|t| + 5) with hB - have hB2 : 2 ≤ B := by - rw [hB] - nlinarith [abs_nonneg t] - have hfB : ∀ w ∈ Metric.closedBall s₀ (24/25 * (91/50)), - ‖χ.LFunction w‖ ≤ B * ‖χ.LFunction s₀‖ := by - intro w hw - rw [Metric.mem_closedBall, Complex.dist_eq] at hw - have hwre : (0.15 : ℝ) ≤ w.re := by - have h := Complex.abs_re_le_norm (w - s₀) - have hre : (w - s₀).re = w.re - 2 := by simp [hs₀] - rw [hre] at h - have := abs_le.mp (h.trans hw) - linarith [this.1] - have hwim : |w.im| ≤ |t| + 2 := by - have h := Complex.abs_im_le_norm (w - s₀) - have him : (w - s₀).im = w.im - t := by simp [hs₀] - rw [him] at h - have h4 : |w.im - t| ≤ 24/25 * (91/50) := h.trans hw - have h3 : |w.im| - |t| ≤ |w.im - t| := abs_sub_abs_le_abs_sub w.im t - linarith - calc ‖χ.LFunction w‖ ≤ 8 * q * (|w.im| + 3) := LFunction_growth_right_uniform hχ1 hwre - _ ≤ 8 * q * (|t| + 5) := by - have h8q : (0:ℝ) ≤ 8 * (q:ℝ) := by positivity - nlinarith [mul_le_mul_of_nonneg_left (show |w.im| + 3 ≤ |t| + 5 by linarith) h8q] - _ = B * (1/3) := by rw [hB]; ring - _ ≤ B * ‖χ.LFunction s₀‖ := by - refine mul_le_mul_of_nonneg_left hlow ?_ - rw [hB] - positivity - obtain ⟨Z, hZset, hZcount, hZpf⟩ := Zeta23.WeilEF.logDeriv_partial_fraction_disk - (f := χ.LFunction) (by norm_num : (0:ℝ) < 91/50) hfa hLs₀ hB2 hfB - have hlogB : Real.log B ≤ (Real.log 72 + 3) * Real.log ((q:ℝ) * (|t| + 3)) := by - have hqt3 : (1:ℝ) < (q:ℝ) * (|t| + 3) := by nlinarith [abs_nonneg t] - have hlog1 : (2:ℝ) ≤ Real.log ((q:ℝ) * (|t| + 3)) := by - rw [Real.le_log_iff_exp_le (by nlinarith [abs_nonneg t])] - have h1 := Real.exp_one_lt_d9 - calc Real.exp 2 = Real.exp 1 * Real.exp 1 := by rw [← Real.exp_add]; norm_num - _ ≤ 2.7182818286 * 2.7182818286 := by nlinarith [Real.exp_pos 1] - _ ≤ 9 := by norm_num - _ ≤ (q:ℝ) * (|t| + 3) := by nlinarith - have h1 : B ≤ 72 * ((q:ℝ) * (|t| + 3)) := by - rw [hB] - nlinarith [abs_nonneg t] - have h2 : Real.log B ≤ Real.log 72 + Real.log ((q:ℝ) * (|t| + 3)) := by - calc Real.log B ≤ Real.log (72 * ((q:ℝ) * (|t| + 3))) := - Real.log_le_log (by rw [hB]; positivity) h1 - _ = Real.log 72 + Real.log ((q:ℝ) * (|t| + 3)) := - Real.log_mul (by norm_num) (by positivity) - have h72 : (0:ℝ) ≤ Real.log 72 := Real.log_nonneg (by norm_num) - nlinarith [mul_nonneg h72 (by linarith : (0:ℝ) ≤ Real.log ((q:ℝ) * (|t| + 3)) - 1)] - have hlogpos : (0:ℝ) < Real.log ((q:ℝ) * (|t| + 3)) := by - have : (1:ℝ) < (q:ℝ) * (|t| + 3) := by nlinarith [abs_nonneg t] - exact Real.log_pos this - refine ⟨Z, hZset, ?_, ?_⟩ - · refine hZcount.trans ?_ - have hlog1211 : (1:ℝ)/12 ≤ Real.log ((24/25 : ℝ)/(22/25)) := by - rw [show ((24/25 : ℝ))/(22/25) = 12/11 by norm_num] - have h := Real.log_le_sub_one_of_pos (show (0:ℝ) < 11/12 by norm_num) - rw [show (11/12:ℝ) = (12/11)⁻¹ by norm_num, Real.log_inv] at h - linarith - have hlp : (0:ℝ) < Real.log ((24/25 : ℝ)/(22/25)) := by - rw [show ((24/25 : ℝ))/(22/25) = 12/11 by norm_num] - exact Real.log_pos (by norm_num) - have hlogBnn : (0:ℝ) ≤ Real.log B := Real.log_nonneg (by linarith) - calc 1 / Real.log ((24/25 : ℝ)/(22/25)) * Real.log B ≤ 12 * Real.log B := by - refine mul_le_mul_of_nonneg_right ?_ hlogBnn - rw [div_le_iff₀ hlp] - linarith - _ ≤ 12 * ((Real.log 72 + 3) * Real.log ((q:ℝ) * (|t| + 3))) := - mul_le_mul_of_nonneg_left hlogB (by norm_num) - _ ≤ ((44795000 * 50 / 91) * (Real.log 72 + 3) + 12 * (Real.log 72 + 3)) - * Real.log ((q:ℝ) * (|t| + 3)) := by - have h72 : (0:ℝ) ≤ Real.log 72 := Real.log_nonneg (by norm_num) - nlinarith - · intro s hs hLs - have hs' : s ∈ Metric.closedBall s₀ (83/100 * (91/50)) := - Metric.closedBall_subset_closedBall (by norm_num) hs - refine (hZpf s hs' hLs).trans ?_ - calc 44795000 / (91/50) * Real.log B - ≤ 44795000 / (91/50) * ((Real.log 72 + 3) * Real.log ((q:ℝ) * (|t| + 3))) := - mul_le_mul_of_nonneg_left hlogB (by norm_num) - _ ≤ ((44795000 * 50 / 91) * (Real.log 72 + 3) + 12 * (Real.log 72 + 3)) - * Real.log ((q:ℝ) * (|t| + 3)) := by - have h72 : (0:ℝ) ≤ Real.log 72 := Real.log_nonneg (by norm_num) - nlinarith + let D : Zeta23.WeilEF.TwoLineLandauData := + { f := χ.LFunction + scale := (q : ℝ) + t₀ := 6 + c₀ := 1 / 3 + C₀ := 16 + A := 1 + hscale := by exact_mod_cast NeZero.pos q + hc₀ := by norm_num + hC₀ := by norm_num + hA := zero_le_one + hfa := fun _ _ s _ => (DirichletCharacter.differentiable_LFunction hχ1).analyticAt s + hlow := fun _ _ => LFunction_lower_bound_two (by simp) + hgrow := fun t _ w hw => by + rw [Metric.mem_closedBall, Complex.dist_eq] at hw + have hwre : (0.15 : ℝ) ≤ w.re := by + have h := Complex.abs_re_le_norm (w - (2 + t * I)) + simp at h; linarith [(abs_le.mp (h.trans hw)).1] + have hwim : |w.im| ≤ |t| + 2 := by + have h := Complex.abs_im_le_norm (w - (2 + t * I)) + simp at h + have h3 := abs_sub_abs_le_abs_sub w.im t + linarith [h.trans hw] + rw [Real.rpow_one] + calc ‖χ.LFunction w‖ ≤ 8 * q * (|w.im| + 3) := LFunction_growth_right_uniform hχ1 hwre + _ ≤ 16 * ((q : ℝ) * (|t| + 3)) := by + have hq0 : (0 : ℝ) ≤ q := Nat.cast_nonneg q + nlinarith [abs_nonneg t] } + obtain ⟨C, hC, hpf⟩ := D.logDeriv_partial_fraction_of + exact ⟨C, hC, fun t ht => (hpf t ht).2⟩ end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/LocalCountChi.lean b/zeta23/Zeta23/ThmE/LocalCountChi.lean index 603d34e237..e412be7919 100644 --- a/zeta23/Zeta23/ThmE/LocalCountChi.lean +++ b/zeta23/Zeta23/ThmE/LocalCountChi.lean @@ -4,19 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -The two-sided local zero count for L(s,χ): - N_χ(t, t+1] ≤ A₀ log(|t|+3) for ALL real t (A₀ depends on q through the growth constants) — - derived from the q-uniform count `localCountChi_uniform_proof` (one absolute A₀, log(q(|t|+3))). -Route: halve by Zeta23.ZeroConfig.N_le_two_mul_half -(applied to LZeros), then ZerosBound on g(w) := L(c₀+1.9w,χ)/L(c₀,χ), -c₀ = 2+(t+½)i, r = .84, R = .95, with Zeta23.ThmE.LFunction_growth_right / LFunction_lower_bound_two; -L(·,χ) is entire for χ ≠ 1, so no pole bookkeeping and no |t| ≥ 4 split. +Zeta23/ThmE/LocalCountChi.lean — two-sided local zero count for `L(s, χ)`: +`N_χ(t, t+1] ≤ A₀ log(|t|+3)` for all real `t`, derived from the `q`-uniform count +`localCountChi_uniform_proof` (one absolute `A₀`, `log(q(|t|+3))`), instantiated from +`Zeta23.RvM.DiscCountData.local_count_large`. -/ import Zeta23.ThmE.LGrowth -import Zeta23.ThmE.Statement -import Zeta23.RvM.Halving -import Zeta23.RvM.ReZeroCount -import Zeta23.FromPNTPlus.StrongPNTPrefix +import Zeta23.RvM.Generic open Complex Set DirichletCharacter @@ -27,223 +21,69 @@ namespace ThmE variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} -/-- rescaled L: w ↦ L(c₀ + κ w, χ) · u. -/ -def gfunL (χ : DirichletCharacter ℂ q) (c₀ κ u : ℂ) (z : ℂ) : ℂ := χ.LFunction (c₀ + κ * z) * u - -lemma gfunL_analyticAt (hχ1 : χ ≠ 1) (c₀ κ u z : ℂ) : AnalyticAt ℂ (gfunL χ c₀ κ u) z := by - unfold gfunL - have hL : AnalyticAt ℂ χ.LFunction (c₀ + κ * z) := - LFunction_analyticOnNhd hχ1 _ (Set.mem_univ _) - have haff : AnalyticAt ℂ (fun z : ℂ => c₀ + κ * z) z := by fun_prop - have hcomp : AnalyticAt ℂ (fun z => χ.LFunction (c₀ + κ * z)) z := hL.comp_of_eq haff rfl - have hconst : AnalyticAt ℂ (fun _ : ℂ => u) z := analyticAt_const - exact hcomp.mul hconst - -lemma analyticOrderNatAt_gfunL (hχ1 : χ ≠ 1) {c₀ κ u : ℂ} (hκ0 : κ ≠ 0) (hu0 : u ≠ 0) (w : ℂ) : - analyticOrderNatAt (gfunL χ c₀ κ u) w = zeroMultL χ (c₀ + κ * w) := by - unfold analyticOrderNatAt zeroMultL gfunL - congr 1 - have haff : AnalyticAt ℂ (fun z : ℂ => c₀ + κ * z) w := by fun_prop - have hcomp : AnalyticAt ℂ (fun z => χ.LFunction (c₀ + κ * z)) w := by - have hL : AnalyticAt ℂ χ.LFunction (c₀ + κ * w) := - LFunction_analyticOnNhd hχ1 _ (Set.mem_univ _) - exact hL.comp_of_eq haff rfl - have hmul : (fun z ↦ χ.LFunction (c₀ + κ * z) * u) = - (fun z => χ.LFunction (c₀ + κ * z)) * fun _ => u := rfl - rw [hmul, analyticOrderAt_mul hcomp analyticAt_const] - have hconst : analyticOrderAt (fun _ : ℂ => u) w = 0 := - (analyticAt_const).analyticOrderAt_eq_zero.mpr hu0 - rw [hconst, add_zero] - have hderiv : deriv (fun z : ℂ => c₀ + κ * z) w ≠ 0 := by - rw [deriv_const_add, deriv_const_mul _ differentiableAt_id, deriv_id'']; simpa using hκ0 - have := analyticOrderAt_comp_of_deriv_ne_zero (f := χ.LFunction) haff hderiv - simpa [Function.comp_def] using this - /-! ## The q-UNIFORM count (one absolute A₀ for every primitive χ mod q > 1) -/ -set_option maxHeartbeats 1600000 in -/-- **q-uniform local count**: ONE absolute A₀ with -N_χ(t,t+1] ≤ A₀·log(q(|t|+3)) for every primitive χ mod q > 1. Same disc/ZerosBound argument as the ζ local -count, with the uniform linear growth ‖L(s,χ)‖ ≤ 8q(|Im s|+3) (LFunction_growth_right_uniform) so that log B -stays additive in log q. -/ +/-- **q-uniform local count**: ONE absolute `A₀` with +`N_χ(t,t+1] ≤ A₀·log(q(|t|+3))` for every primitive `χ mod q > 1`, instantiated from +`RvM.DiscCountData.local_count_large`. -/ theorem localCountChi_uniform_proof : ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ (q : ℕ) [NeZero q] (χ : DirichletCharacter ℂ q), 1 < q → χ.IsPrimitive → ∀ t : ℝ, (NcountL χ t (t + 1) : ℝ) ≤ A₀ * Real.log (q * (|t| + 3)) := by - set r : ℝ := 0.84 with hr - set R : ℝ := 0.95 with hR - have hlogRr : 0 < Real.log (R / r) := Real.log_pos (by norm_num [hr, hR]) - refine ⟨max 1 (2 * (1 / Real.log (R / r) * 5)), le_max_left _ _, ?_⟩ - intro q _ χ hq1 hprim t + set A₁ : ℝ := 2 / Real.log ((0.95 : ℝ) / 0.84) * (Real.log (max ((8 : ℝ) / (1 / 3)) 1) + 2 * 1) + refine ⟨max 1 A₁, le_max_left _ _, fun q _ χ hq1 hprim t => ?_⟩ have hχ1 : χ ≠ 1 := ne_one_of_primitive hq1 hprim have hs : LSeam χ := LSeam_of hq1 hprim - have hq0 : (0:ℝ) < (q:ℝ) := by exact_mod_cast Nat.pos_of_ne_zero (NeZero.ne q) - have hq2 : (2:ℝ) ≤ (q:ℝ) := by exact_mod_cast hq1 - -- the absolute log quantity - set L : ℝ := Real.log ((q:ℝ) * (|t| + 3)) with hLdef - have hqt6 : (6:ℝ) ≤ (q:ℝ) * (|t| + 3) := by nlinarith [abs_nonneg t] - have hL1 : 1 ≤ L := by - rw [hLdef, ← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - have hL0 : 0 < L := by linarith - -- halving - have hhalf : (NcountL χ t (t + 1) : ℝ) ≤ - 2 * ∑ᶠ ρ ∈ (LZeros hs).window t (t + 1) ∩ {ρ : ℂ | 1/2 ≤ ρ.re}, ((LZeros hs).mult ρ : ℝ) := by - have := (LZeros hs).N_le_two_mul_half t (t + 1) - rwa [LZeros_N] at this - set c₀ : ℂ := 2 + (t + 1/2 : ℝ) * I with hc₀ - set κ : ℂ := ((19/10 : ℝ) : ℂ) with hκ - have hκ0 : κ ≠ 0 := by simp [hκ] - have hnormκ : ‖κ‖ = 1.9 := by simp [hκ]; norm_num - have hLc₀ : (1/3 : ℝ) ≤ ‖χ.LFunction c₀‖ := LFunction_lower_bound_two (by simp [hc₀]) - have hLc₀ne : χ.LFunction c₀ ≠ 0 := by - intro h; rw [h, norm_zero] at hLc₀; norm_num at hLc₀ - set u : ℂ := (χ.LFunction c₀)⁻¹ with hu - have hu0 : u ≠ 0 := inv_ne_zero hLc₀ne - have hnu : ‖u‖ ≤ 3 := by - rw [hu, norm_inv]; rw [inv_le_comm₀ (by positivity) (by norm_num)]; linarith - set G : ℂ → ℂ := gfunL χ c₀ κ u with hG - have hfAnalytic : AnalyticOnNhd ℂ G (Metric.closedBall (0:ℂ) 1) := - fun z _ => gfunL_analyticAt hχ1 c₀ κ u z - have hG0 : G 0 = 1 := by - simp only [hG, gfunL, mul_zero, add_zero, hu] - exact mul_inv_cancel₀ hLc₀ne - have hfin : (SetOfZeros 1 G).Finite := by - have h := RvM.finite_zeros_closedBall (f := G) (R := 1.05) (r := 1) (by norm_num) - (fun z _ => gfunL_analyticAt hχ1 c₀ κ u z) (z₀ := 0) (by simp; norm_num) - (by rw [hG0]; exact one_ne_zero) - exact h.subset (by intro z hz; exact hz) - set B : ℝ := 24 * (q:ℝ) * (|t| + 6) with hB - have hBpos : 0 < B := by positivity - have hfz : ∀ z : ℂ, ‖z‖ ≤ R → ‖G z‖ ≤ B := by - intro z hz - set s : ℂ := c₀ + κ * z with hs' - have hκre : κ.re = 1.9 := by rw [hκ]; norm_num [Complex.ofReal_re] - have hκim : κ.im = 0 := by rw [hκ]; simp - have hzre := abs_le.mp ((Complex.abs_re_le_norm z).trans hz) - have hzim := abs_le.mp ((Complex.abs_im_le_norm z).trans hz) - rw [hR] at hzre hzim - have hsre : s.re = 2 + 1.9 * z.re := by - rw [hs', hc₀] - simp only [Complex.add_re, Complex.mul_re, Complex.I_re, Complex.I_im, Complex.ofReal_re, - Complex.ofReal_im, Complex.re_ofNat, hκre, hκim] - ring - have hsim : s.im = (t + 1/2) + 1.9 * z.im := by - rw [hs', hc₀] - simp only [Complex.add_im, Complex.mul_im, Complex.I_re, Complex.I_im, Complex.ofReal_re, - Complex.ofReal_im, Complex.im_ofNat, hκre, hκim] - ring - have h1 : (0.15:ℝ) ≤ s.re := by rw [hsre]; nlinarith - have h3 := LFunction_growth_right_uniform hχ1 h1 - have hbase : |s.im| + 3 ≤ |t| + 6 := by - rw [hsim] - have h4 := abs_add_le (t + 1/2) (1.9 * z.im) - have h5 : |1.9 * z.im| ≤ 1.9 * 0.95 := by - rw [abs_mul, abs_of_pos (by norm_num : (0:ℝ) < 1.9)] - have : |z.im| ≤ 0.95 := abs_le.mpr ⟨hzim.1, hzim.2⟩ - nlinarith - have h6 : |t + 1/2| ≤ |t| + 1/2 := by simpa using abs_add_le t (1/2) - linarith - calc ‖G z‖ = ‖χ.LFunction s‖ * ‖u‖ := by rw [hG]; exact norm_mul _ _ - _ ≤ (8 * q * (|s.im| + 3)) * 3 := by - apply mul_le_mul h3 hnu (norm_nonneg _) (by positivity) - _ ≤ (8 * q * (|t| + 6)) * 3 := by nlinarith - _ = B := by rw [hB]; ring - have hrlt1 : r < 1 := by norm_num [hr] - have hZ := ZerosBound (B := B) (r := r) (R := R) (by norm_num [hr]) hrlt1 - (by norm_num [hr, hR]) (by norm_num [hR]) hfAnalytic hG0 hfin hfz - set Z : Finset ℂ := (finiteSetOfZeros_mono hrlt1 hfin).toFinset with hZdef - set W : Set ℂ := (LZeros hs).window t (t + 1) ∩ {ρ : ℂ | 1/2 ≤ ρ.re} with hW - have hWfin : W.Finite := ((LZeros hs).window_finite t (t + 1)).subset inter_subset_left - set φ : ℂ → ℂ := fun ρ => (ρ - c₀) / κ with hφ - have hφinj : Function.Injective φ := by - intro a b h; simp only [hφ] at h - have := congrArg (fun w => c₀ + κ * w) h - simpa [mul_div_cancel₀ _ hκ0] using this - have hφinv : ∀ ρ, c₀ + κ * φ ρ = ρ := by intro ρ; simp only [hφ]; field_simp; ring - have hmemS : ∀ ρ ∈ W, φ ρ ∈ Z := by - rintro ρ ⟨⟨hρZ, hρt, hρt1⟩, hρre⟩ - have hρ : IsNontrivialZeroL χ ρ := by rwa [LZeros_carrier] at hρZ - rw [hZdef, Set.Finite.mem_toFinset] - refine ⟨?_, ?_⟩ - · show ‖φ ρ‖ ≤ r - simp only [hφ, norm_div, hnormκ] - rw [div_le_iff₀ (by norm_num), hr] - have hre : (ρ - c₀).re = ρ.re - 2 := by simp [hc₀] - have him : (ρ - c₀).im = ρ.im - (t + 1/2) := by simp [hc₀] - have hsq : ‖ρ - c₀‖ ^ 2 ≤ (0.84 * 1.9) ^ 2 := by - rw [Complex.sq_norm, Complex.normSq_apply, hre, him] - have := hρ.2.2; have := hρre.out - nlinarith - exact (pow_le_pow_iff_left₀ (norm_nonneg _) (by norm_num) two_ne_zero).mp hsq - · show G (φ ρ) = 0 - simp only [hG, gfunL, hφinv] - rw [hρ.1, zero_mul] - have hmult : ∀ ρ ∈ W, ((LZeros hs).mult ρ : ℝ) = (analyticOrderNatAt G (φ ρ) : ℝ) := by - rintro ρ ⟨⟨hρZ, -, -⟩, -⟩ - rw [LZeros_mult, hG, analyticOrderNatAt_gfunL hχ1 hκ0 hu0, hφinv] - have hsum : (∑ᶠ ρ ∈ W, ((LZeros hs).mult ρ : ℝ)) ≤ - ((∑ ρ' ∈ Z, analyticOrderNatAt G ρ' : ℕ) : ℝ) := by - rw [finsum_mem_eq_finite_toFinset_sum _ hWfin, - Finset.sum_congr rfl (fun ρ hρ => hmult ρ (hWfin.mem_toFinset.mp hρ)), - ← Finset.sum_image (f := fun w => (analyticOrderNatAt G w : ℝ)) - (fun a _ b _ h => hφinj h)] - push_cast - apply Finset.sum_le_sum_of_subset_of_nonneg - · intro w hw - obtain ⟨ρ, hρ, rfl⟩ := Finset.mem_image.mp hw - exact hmemS ρ (hWfin.mem_toFinset.mp hρ) - · intros; positivity - -- log B ≤ 5 L, by monotonicity alone - have hsq : (q:ℝ) * (|t| + 3) * ((q:ℝ) * (|t| + 3)) = ((q:ℝ) * (|t| + 3))^2 := by ring - have hL6 : Real.log 6 ≤ L := by rw [hLdef]; exact Real.log_le_log (by norm_num) hqt6 - have hlog24 : Real.log 24 ≤ 2 * L := by - have h36 : Real.log 24 ≤ Real.log 36 := Real.log_le_log (by norm_num) (by norm_num) - have h2 : Real.log 36 = 2 * Real.log 6 := by - rw [show (36:ℝ) = 6^2 by norm_num, Real.log_pow]; push_cast; ring - linarith - have hlogq : Real.log (q:ℝ) ≤ L := by - rw [hLdef] - apply Real.log_le_log hq0 - nlinarith [abs_nonneg t] - have hlogt6 : Real.log (|t| + 6) ≤ 2 * L := by - have h1 : Real.log (|t| + 6) ≤ Real.log (((q:ℝ) * (|t| + 3))^2) := by - apply Real.log_le_log (by positivity) - nlinarith [abs_nonneg t] - have h2 : Real.log (((q:ℝ) * (|t| + 3))^2) = 2 * L := by - rw [hLdef, Real.log_pow]; push_cast; ring - linarith - have hlogB : Real.log B ≤ 5 * L := by - rw [hB, Real.log_mul (by positivity) (by positivity), - Real.log_mul (by norm_num) (by positivity)] - linarith - calc (NcountL χ t (t + 1) : ℝ) - ≤ 2 * ∑ᶠ ρ ∈ W, ((LZeros hs).mult ρ : ℝ) := hhalf - _ ≤ 2 * ((∑ ρ' ∈ Z, analyticOrderNatAt G ρ' : ℕ) : ℝ) := by linarith [hsum] - _ ≤ 2 * (1 / Real.log (R / r) * Real.log B) := by - have h : ((∑ ρ' ∈ Z, analyticOrderNatAt G ρ' : ℕ) : ℝ) ≤ - 1 / Real.log (R / r) * Real.log B := by exact_mod_cast hZ - linarith - _ ≤ 2 * (1 / Real.log (R / r) * (5 * L)) := by - have := mul_le_mul_of_nonneg_left hlogB (by positivity : (0:ℝ) ≤ 1 / Real.log (R / r)) - linarith - _ = (2 * (1 / Real.log (R / r) * 5)) * L := by ring - _ ≤ max 1 (2 * (1 / Real.log (R / r) * 5)) * L := by - apply mul_le_mul_of_nonneg_right (le_max_right _ _) (by linarith) - + let D : RvM.DiscCountData := + { f := χ.LFunction + Zc := LZeros hs + scale := (q : ℝ) + t₀ := 0 + c₀ := 1 / 3 + C := 8 + A := 1 + hscale := by exact_mod_cast hq1.le + ht₀ := le_rfl + hc₀ := by norm_num + hC := by norm_num + hA := zero_le_one + hfa := fun _ _ s _ => LFunction_analyticOnNhd hχ1 s (Set.mem_univ _) + hlow := fun _ _ => LFunction_lower_bound_two (by simp) + hgrow := fun t _ s hs' => by + rw [Metric.mem_closedBall, dist_eq_norm] at hs' + have hre : (0.15 : ℝ) ≤ s.re := by + have := (Complex.abs_re_le_norm (s - (2 + (t + 1 / 2 : ℝ) * I))).trans hs' + simp at this; linarith [(abs_le.mp this).1] + have hsim : |s.im| + 3 ≤ |t| + 6 := by + have h1 := (Complex.abs_im_le_norm (s - (2 + (t + 1 / 2 : ℝ) * I))).trans hs' + simp at h1 + have h2 := abs_sub_abs_le_abs_sub s.im (t + 1 / 2) + have h3 : |t + 1 / 2| ≤ |t| + 1 / 2 := by simpa using abs_add_le t (1 / 2) + linarith + rw [Real.rpow_one] + calc ‖χ.LFunction s‖ ≤ 8 * q * (|s.im| + 3) := LFunction_growth_right_uniform hχ1 hre + _ ≤ 8 * ((q : ℝ) * (|t| + 6)) := by + have hq0 : (0 : ℝ) ≤ q := Nat.cast_nonneg q + nlinarith + hlink := fun ρ hρ _ => by + rw [LZeros_carrier] at hρ + exact ⟨hρ.1, by rw [LZeros_mult]; rfl⟩ } + have h := D.local_count_large (t := t) (abs_nonneg t) + rw [show D.Zc.N t (t + 1) = NcountL χ t (t + 1) from LZeros_N hs t (t + 1)] at h + have hq1' : (1 : ℝ) ≤ q := by exact_mod_cast hq1.le + have hlog0 : 0 ≤ Real.log ((q : ℝ) * (|t| + 3)) := + Real.log_nonneg (by nlinarith [abs_nonneg t]) + exact h.trans (mul_le_mul_of_nonneg_right (le_max_right _ _) hlog0) /-- **Local count for L(s,χ)**, two-sided (per-χ constant; from the q-uniform count: -log(q(|t|+3)) = log q + log(|t|+3) ≤ (1 + log q)·log(|t|+3) as log(|t|+3) ≥ 1). -/ +`log(q(|t|+3)) = log q + log(|t|+3) ≤ (1 + log q)·log(|t|+3)` as `log(|t|+3) ≥ 1`). -/ theorem localCountChi (hq : 1 < q) (hprim : χ.IsPrimitive) : ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ t : ℝ, (NcountL χ t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3) := by obtain ⟨A₀, hA₀, h⟩ := localCountChi_uniform_proof - have hq0 : (0:ℝ) < (q:ℝ) := by exact_mod_cast (lt_trans Nat.zero_lt_one hq) + have hq0 : (0 : ℝ) < (q : ℝ) := by exact_mod_cast (lt_trans Nat.zero_lt_one hq) have hlogq : 0 ≤ Real.log q := Real.log_nonneg (by exact_mod_cast hq.le) refine ⟨A₀ * (1 + Real.log q), by nlinarith, fun t => ?_⟩ - have hlog3 : 1 ≤ Real.log (|t| + 3) := by - rw [← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith [abs_nonneg t] + have hlog3 := RvM.one_le_log_scale_add_three (scale := 1) le_rfl t + rw [one_mul] at hlog3 have hsplit : Real.log (q * (|t| + 3)) = Real.log q + Real.log (|t| + 3) := Real.log_mul hq0.ne' (by linarith [abs_nonneg t]) calc (NcountL χ t (t + 1) : ℝ) ≤ A₀ * Real.log (q * (|t| + 3)) := h q χ hq hprim t diff --git a/zeta23/Zeta23/ThmE/Main.lean b/zeta23/Zeta23/ThmE/Main.lean index 04b1fb17f4..f61d29bfeb 100644 --- a/zeta23/Zeta23/ThmE/Main.lean +++ b/zeta23/Zeta23/ThmE/Main.lean @@ -14,16 +14,11 @@ zero-side/tail/taper inputs are discharged from the SAME Z-generic project files hTr — [thm:traces] for ν_{X,χ} (ThmTracesHypChi), hGzGp — the [eq:Gdef]-identity for L(s,χ) (zero side = prime side, from H-EF(χ)). -/ -import Zeta23.ThmE.Statement -import Zeta23.ThmE.AssemblyQ -import Zeta23.ThmE.SeamL import Zeta23.ThmE.GzGpChi import Zeta23.ThmE.RvMChi import Zeta23.ThmE.TracesChi import Zeta23.ThmE.ChebCoprime -import Zeta23.ThmE.GammaFactsChiProof import Zeta23.MV.Final -import Zeta23.PrimeSideA.Bridge import Mathlib.NumberTheory.DirichletCharacter.Bounds import Zeta23.Main @@ -39,19 +34,8 @@ use of `PaperInputs` is the local count — here taken from `RiemannVonMangoldtC theorem tailPackageChi (Z : ZeroConfig) {q : ℕ} (hRvM : RiemannVonMangoldtChi q Z) (P : Params) (hP : P.Valid) : ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z P T (θ₀ T)) ∧ - ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := by - obtain ⟨A₀, hA₀, hloc⟩ := hRvM.local_count - have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := (Tail.tendsto_L_atTop P hP).eventually_ge_atTop _ - refine ⟨fun T => Tail.theta0 A₀ (Real.exp (P.L T / 4) * P.C1 T) T, ?_, ?_⟩ - · refine Tail.eventually_tailInputs Z P hP hA₀ hloc (fun T => P.C1 T) - (fun T => Tail.C1_nonneg P T) ?_ ?_ ?_ - · filter_upwards [hwL] with T hwL - exact fun r y hy hz => Params.norm_phiHat_sub_I_mul_le hP hwL r y hy hz - · filter_upwards [hwL] with T hwL - linarith [Params.half_le_a hP hwL] - · exact Eventually.of_forall fun T z => GzGp.phiHat_conj P T z - · exact Tail.eventually_theta0_le P hP hA₀ (fun T => P.C1 T) (fun T => Tail.C1_nonneg P T) - (hwL.mono fun T hwL => Params.C1_le hP hwL) + ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := + Tail.eventually_tailPackage_of_rvm Z hRvM.local_count P hP /-- boundary count for a χ-configuration (from the two-sided local count). -/ theorem NIIChi (Z : ZeroConfig) {q : ℕ} (hRvM : RiemannVonMangoldtChi q Z) : @@ -70,8 +54,7 @@ theorem thmE_A_lam_of_traces (hs : LSeam χ) (hq : 1 ≤ q) (hGzGp : ∀ᶠ T in atTop, (LZeros hs).Gz (paramsOf ϱ lam) T = GpChi (paramsOf ϱ lam) (parity χ) q (coeff χ) T) (hcalE : Tendsto (paramsOf ϱ lam).calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Hfun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := by + DyadicLowerBound (Hfun lam) (fun T => N0starL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := by have hP := paramsOf_valid hϱ h0 h1.le obtain ⟨θ₀, hTail, hθ₀⟩ := tailPackageChi (LZeros hs) hRvM _ hP have hBlock := eventually_blockInputs (LZeros hs) _ hP @@ -87,93 +70,12 @@ theorem thmE_A_lam_of_traces (hs : LSeam χ) (hq : 1 ≤ q) hRvM hTr hBlock θ₀ hTail hθ₀ hNII hGzGp ha hcalE simpa [paramsOf] using h -/-- **Theorem E, second bound (simple on-line zeros) at fixed λ, modulo the χ inputs** ([thm:E]). -/ -theorem thmE_B_lam_of_traces (hs : LSeam χ) (hq : 1 ≤ q) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hRvM : RiemannVonMangoldtChi q (LZeros hs)) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros hs)) - (hGzGp : ∀ᶠ T in atTop, - (LZeros hs).Gz (paramsOf ϱ lam) T = GpChi (paramsOf ϱ lam) (parity χ) q (coeff χ) T) - (hcalE : Tendsto (paramsOf ϱ lam).calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun lam - 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := by - have hP := paramsOf_valid hϱ h0 h1.le - obtain ⟨θ₀, hTail, hθ₀⟩ := tailPackageChi (LZeros hs) hRvM _ hP - have hBlock := eventually_blockInputs (LZeros hs) _ hP - have hNII := NIIChi (LZeros hs) hRvM - obtain ⟨R, hR, hev⟩ := thmE_BC_core (LZeros hs) (parity χ) hq (coeff χ) (paramsOf ϱ lam) hP h1 - hRvM hTr hBlock θ₀ hTail hθ₀ hNII hGzGp hcalE - have h := Assembly.eps_form_of_isLittleO (err := fun T => 2 * R T) (hev.mono fun T h => by - simpa using h.1) - (Filter.Eventually.of_forall fun T => Nat.cast_nonneg _) (hR.const_mul_left 2) - simpa [paramsOf] using h - -/-- **Theorem E, third bound (distinct zeros) at fixed λ, modulo the χ inputs** ([thm:E]). -/ -theorem thmE_C_lam_of_traces (hs : LSeam χ) (hq : 1 ≤ q) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hRvM : RiemannVonMangoldtChi q (LZeros hs)) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros hs)) - (hGzGp : ∀ᶠ T in atTop, - (LZeros hs).Gz (paramsOf ϱ lam) T = GpChi (paramsOf ϱ lam) (parity χ) q (coeff χ) T) - (hcalE : Tendsto (paramsOf ϱ lam).calE atTop (𝓝 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Ffun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := by - have hP := paramsOf_valid hϱ h0 h1.le - obtain ⟨θ₀, hTail, hθ₀⟩ := tailPackageChi (LZeros hs) hRvM _ hP - have hBlock := eventually_blockInputs (LZeros hs) _ hP - have hNII := NIIChi (LZeros hs) hRvM - obtain ⟨R, hR, hev⟩ := thmE_BC_core (LZeros hs) (parity χ) hq (coeff χ) (paramsOf ϱ lam) hP h1 - hRvM hTr hBlock θ₀ hTail hθ₀ hNII hGzGp hcalE - have h := Assembly.eps_form_of_isLittleO (err := R) (hev.mono fun T h => by simpa using h.2) - (Filter.Eventually.of_forall fun T => Nat.cast_nonneg _) hR - simpa [paramsOf] using h - -/-! ## The seam discharged (Zeta23/ThmE/SeamL.lean): the gates without the `LSeam` hypothesis -/ +/-! ## The seam discharged (Zeta23/ThmE/SeamL.lean) -/ section SeamDischarged variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} -/-- Theorem E bound 1 at fixed λ, for a PRIMITIVE χ mod q > 1; -remaining hypotheses: RvM(χ), the χ-traces package, the χ-EF bridge, 𝓔 → 0. -/ -theorem thmE_A_lam_of_traces' (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hRvM : RiemannVonMangoldtChi q (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hGzGp : ∀ᶠ T in Filter.atTop, - (LZeros (LSeam_of hq hprim)).Gz (paramsOf ϱ lam) T - = GpChi (paramsOf ϱ lam) (parity χ) q (coeff χ) T) - (hcalE : Filter.Tendsto (paramsOf ϱ lam).calE Filter.atTop (nhds 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Hfun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := - thmE_A_lam_of_traces (LSeam_of hq hprim) (by omega) hϱ h0 h1 hRvM hTr hGzGp hcalE - -/-- Theorem E bound 2, seam discharged. -/ -theorem thmE_B_lam_of_traces' (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hRvM : RiemannVonMangoldtChi q (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hGzGp : ∀ᶠ T in Filter.atTop, - (LZeros (LSeam_of hq hprim)).Gz (paramsOf ϱ lam) T - = GpChi (paramsOf ϱ lam) (parity χ) q (coeff χ) T) - (hcalE : Filter.Tendsto (paramsOf ϱ lam).calE Filter.atTop (nhds 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun lam - 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := - thmE_B_lam_of_traces (LSeam_of hq hprim) (by omega) hϱ h0 h1 hRvM hTr hGzGp hcalE - -/-- Theorem E bound 3, seam discharged. -/ -theorem thmE_C_lam_of_traces' (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hRvM : RiemannVonMangoldtChi q (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hGzGp : ∀ᶠ T in Filter.atTop, - (LZeros (LSeam_of hq hprim)).Gz (paramsOf ϱ lam) T - = GpChi (paramsOf ϱ lam) (parity χ) q (coeff χ) T) - (hcalE : Filter.Tendsto (paramsOf ϱ lam).calE Filter.atTop (nhds 0)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Ffun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := - thmE_C_lam_of_traces (LSeam_of hq hprim) (by omega) hϱ h0 h1 hRvM hTr hGzGp hcalE - omit [NeZero q] in /-- the χ-EF bridge at FIXED T (the eventual form below is this plus two asymptotic side conditions). Conditions: 0 < L(T) and 8w ≤ L(T). -/ @@ -185,6 +87,7 @@ theorem GzGpChi_at {Z : ZeroConfig} {κ : ℕ} {c : ℕ → ℂ} (P : Params) (h · exact (Complex.ofRealCLM.contDiff.comp (Params.phi_contDiff hP hwL)).of_le (by norm_num) · exact closure_minimal (Params.phi_support_subset hP) isClosed_Icc +omit [NeZero q] in /-- the χ-EF bridge, eventual-in-T form (`Gz_eq_GpChi` + the Taper side conditions; mirror of Main.lean's `eventually_side_conditions` first component). -/ theorem eventually_GzGpChi {Z : ZeroConfig} {κ : ℕ} {c : ℕ → ℂ} (P : Params) (hP : P.Valid) @@ -196,80 +99,9 @@ theorem eventually_GzGpChi {Z : ZeroConfig} {κ : ℕ} {c : ℕ → ℂ} (P : Pa filter_upwards [hwL, hLpos] with T hwL hL exact GzGpChi_at P hP hEF T hL hwL -/-- **Theorem E bound 1 at fixed λ**: remaining inputs are -exactly the χ-arithmetic trio (EF(χ) paper form, RvM(χ), traces(χ)). -/ -theorem thmE_A_lam_final (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hRvM : RiemannVonMangoldtChi q (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Hfun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := by - have hP := paramsOf_valid hϱ h0 h1.le - exact thmE_A_lam_of_traces' hq hprim hϱ h0 h1 hRvM hTr - (eventually_GzGpChi _ hP hEF) - (Assembly.calE_tendsto_zero _ hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w)) - -/-- same, bound 2 (simple on-line). -/ -theorem thmE_B_lam_final (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hRvM : RiemannVonMangoldtChi q (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun lam - 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := by - have hP := paramsOf_valid hϱ h0 h1.le - exact thmE_B_lam_of_traces' hq hprim hϱ h0 h1 hRvM hTr - (eventually_GzGpChi _ hP hEF) - (Assembly.calE_tendsto_zero _ hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w)) - -/-- same, bound 3 (distinct). -/ -theorem thmE_C_lam_final (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hRvM : RiemannVonMangoldtChi q (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Ffun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := by - have hP := paramsOf_valid hϱ h0 h1.le - exact thmE_C_lam_of_traces' hq hprim hϱ h0 h1 hRvM hTr - (eventually_GzGpChi _ hP hEF) - (Assembly.calE_tendsto_zero _ hP.lam_pos hP.lam_le_one (zero_le_one.trans hP.one_le_w)) - -/-! ## RvM(χ) discharged (Zeta23.ThmE.rvmChi): remaining inputs are -(EF(χ) paper form, traces(χ)). -/ - -/-- **Theorem E bound 1 at fixed λ, TWO hypotheses** (EF-bridge side conditions, 𝓔 → 0 and -RvM(χ) all discharged). -/ -theorem thmE_A_lam₂ (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Hfun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := - thmE_A_lam_final hq hprim hϱ h0 h1 hEF (rvmChi hq hprim) hTr - -/-- bound 2, two hypotheses. -/ -theorem thmE_B_lam₂ (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun lam - 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := - thmE_B_lam_final hq hprim hϱ h0 h1 hEF (rvmChi hq hprim) hTr - -/-- bound 3, two hypotheses. -/ -theorem thmE_C_lam₂ (hq : 1 < q) (hprim : χ.IsPrimitive) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) - (hTr : ThmTracesHypChi (paramsOf ϱ lam) (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Ffun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := - thmE_C_lam_final hq hprim hϱ h0 h1 hEF (rvmChi hq hprim) hTr - end SeamDischarged -/-! ## thm:traces(χ) discharged via `thm_traces_chi`: Theorem E at ONE hypothesis -/ +/-! ## thm:traces(χ) discharged via `thm_traces_chi` -/ section OneHyp @@ -310,40 +142,6 @@ theorem PaperInputsChi.of_EF (hq : 1 < q) (hprim : χ.IsPrimitive) MV := exists_MVHilbert_of_diag ⟨13, by norm_num, MV.mvDiag_thirteen⟩ Gamma := GammaChi.gammaFactsChi parity_le_one (by omega) -/-- **Theorem E bound 1 at fixed λ, ONE hypothesis** — everything but the χ-explicit formula -(paper form) is a theorem. -/ -theorem thmE_A_lam₁ (hq : 1 < q) (hprim : χ.IsPrimitive) - {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Hfun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0starL χ T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - exact thmE_A_lam₂ hq hprim taperProfile_stdProfile h0 h1 hEF - (thm_traces_chi hP (by omega) (coeffUnimodular_of_primitive hq hprim) - (PaperInputsChi.of_EF hq hprim hEF) (PrimeSide.localHypsEventually hP)) - -/-- bound 2, one hypothesis. -/ -theorem thmE_B_lam₁ (hq : 1 < q) (hprim : χ.IsPrimitive) - {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 * Ffun lam - 1 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - exact thmE_B_lam₂ hq hprim taperProfile_stdProfile h0 h1 hEF - (thm_traces_chi hP (by omega) (coeffUnimodular_of_primitive hq hprim) - (PaperInputsChi.of_EF hq hprim hEF) (PrimeSide.localHypsEventually hP)) - -/-- bound 3, one hypothesis. -/ -theorem thmE_C_lam₁ (hq : 1 < q) (hprim : χ.IsPrimitive) - {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : ExplicitFormulaPaperChi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim))) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Ffun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - exact thmE_C_lam₂ hq hprim taperProfile_stdProfile h0 h1 hEF - (thm_traces_chi hP (by omega) (coeffUnimodular_of_primitive hq hprim) - (PaperInputsChi.of_EF hq hprim hEF) (PrimeSide.localHypsEventually hP)) - end OneHyp end ThmE diff --git a/zeta23/Zeta23/ThmE/MainChi.lean b/zeta23/Zeta23/ThmE/MainChi.lean index 8152319d61..a48666197e 100644 --- a/zeta23/Zeta23/ThmE/MainChi.lean +++ b/zeta23/Zeta23/ThmE/MainChi.lean @@ -3,10 +3,8 @@ Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ -import Zeta23.ThmE.FullLineChi import Zeta23.ThmE.EFLitChi import Zeta23.WeilEF.Main -import Zeta23.ThmE.FullLineChiProof import Zeta23.ThmE.FullLineChiAssembly noncomputable section @@ -23,154 +21,99 @@ open Zeta23.WeilEF variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} -/-- Inverse-character values are the conjugates: (χ⁻¹)(n) = conj (χ(n)) (unit values have -norm 1; non-units give 0 = conj 0). -/ +/-- Inverse-character values are the conjugates: `(χ⁻¹)(n) = conj (χ(n))`. -/ theorem inv_coeff_eq_conj (a : ZMod q) : (χ⁻¹ a : ℂ) = (starRingEnd ℂ) (χ a) := by by_cases ha : IsUnit a · rw [MulChar.inv_apply_eq_inv' χ a, Complex.inv_eq_conj] exact χ.unit_norm_eq_one ha.unit · rw [MulChar.map_nonunit χ ha, MulChar.map_nonunit χ⁻¹ ha, map_zero] -set_option maxHeartbeats 1600000 in -/-- **The explicit formula for L(s,χ), literature form, discharged** — mirror of -Zeta23.WeilEF.EF_lit_zeta. -/ -theorem EF_lit_chi_L (hq : 1 < q) (hprim : χ.IsPrimitive) : - EF_lit_chi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim)) := by - intro k hk hkc - refine ⟨EF_zero_sum_summable_chi hq hprim hk hkc, ?_⟩ +private theorem full_line_split_chi (hq : 1 < q) (hprim : χ.IsPrimitive) + {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) : + (∫ t : ℝ, + (Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) + + Hfn k (1 - (5/4:ℝ) - t * I) + * logDeriv (completedLSym χ⁻¹) (((5/4:ℝ):ℂ) + t * I))) + = (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) + * (logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) + - logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I))) + + ((∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) + * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I)) + + ∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) + * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I)) := by have hχ1 : χ ≠ 1 := ne_one_of_primitive hq hprim have hχi1 : χ⁻¹ ≠ 1 := inv_ne_one hχ1 have h54a : (1:ℝ) < 5/4 := by norm_num have h54b : (5/4:ℝ) ≤ 3/2 := by norm_num have hkneg2 : ContDiff ℝ 2 (fun u : ℝ => k (-u)) := hk.comp contDiff_neg - have hknegc : HasCompactSupport (fun u : ℝ => k (-u)) := by - exact hkc.comp_homeomorph (Homeomorph.neg ℝ) - have hfull := full_line_identity_chi' hq hprim hk hkc h54a h54b + have hknegc : HasCompactSupport (fun u : ℝ => k (-u)) := hkc.comp_homeomorph (Homeomorph.neg ℝ) have hH2eq : ∀ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) = Hfn (fun u => k (-u)) (((5/4:ℝ):ℂ) + t * I) := fun t => Hfn_mirror k (5/4) t - -- pointwise: Λsym-split into the common archimedean part and each character's L - have hsplitpt : ∀ (ψ : DirichletCharacter ℂ q), ψ ≠ 1 → ∀ t : ℝ, - logDeriv (completedLSym ψ) (((5/4:ℝ):ℂ) + t * I) - = (logDeriv (completedLSym ψ) (((5/4:ℝ):ℂ) + t * I) - - logDeriv ψ.LFunction (((5/4:ℝ):ℂ) + t * I)) - + logDeriv ψ.LFunction (((5/4:ℝ):ℂ) + t * I) := by - intro ψ hψ t - ring - have hintL : ∀ (g : ℝ → ℂ), ContDiff ℝ 2 g → HasCompactSupport g → - ∀ (ψ : DirichletCharacter ℂ q), ψ ≠ 1 → - Integrable (fun t : ℝ => Hfn g (((5/4:ℝ):ℂ) + t * I) - * logDeriv ψ.LFunction (((5/4:ℝ):ℂ) + t * I)) := fun g hg hgc ψ hψ => - integrable_Hfn_mul_logDeriv_L hψ hg hgc h54a h54b - have hline_re : ∀ t : ℝ, (0:ℝ) < ((((5/4:ℝ)):ℂ) + t * I).re := by - intro t - simp only [Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.ofReal_im, - Complex.I_re, Complex.I_im] - norm_num - have hline_re1 : ∀ t : ℝ, (1:ℝ) ≤ ((((5/4:ℝ)):ℂ) + t * I).re := by - intro t - simp only [Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.ofReal_im, - Complex.I_re, Complex.I_im] - norm_num have harchdiff : ∀ t : ℝ, logDeriv (completedLSym χ⁻¹) (((5/4:ℝ):ℂ) + t * I) - logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I) = logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) - - logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I) := by - intro t - exact logDeriv_completedLSym_sub_L_inv hq hχ1 hχi1 (hline_re t) - (DirichletCharacter.LFunction_ne_zero_of_one_le_re χ (Or.inl hχ1) (hline_re1 t)) - (DirichletCharacter.LFunction_ne_zero_of_one_le_re χ⁻¹ (Or.inl hχi1) (hline_re1 t)) - have hintΓ : Integrable (fun t : ℝ => (Hfn k (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I)) - * (logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) - - logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I))) := - integrable_Hsum_mul_archDiff hq hχ1 hk hkc h54a h54b - have hint1 := hintL k hk hkc χ hχ1 + - logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I) := fun t => + logDeriv_completedLSym_sub_L_inv hq hχ1 hχi1 (by simp) + (DirichletCharacter.LFunction_ne_zero_of_one_le_re χ (Or.inl hχ1) (by simp; norm_num)) + (DirichletCharacter.LFunction_ne_zero_of_one_le_re χ⁻¹ (Or.inl hχi1) (by simp; norm_num)) + have hintΓ := integrable_Hsum_mul_archDiff hq hχ1 hk hkc h54a h54b + have hint1 := integrable_Hfn_mul_logDeriv_L hχ1 hk hkc h54a h54b have hint2 : Integrable (fun t : ℝ => Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I)) := by - have heq : (fun t : ℝ => Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I)) - = fun t : ℝ => Hfn (fun u => k (-u)) (((5/4:ℝ):ℂ) + t * I) - * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I) := by - funext t - rw [hH2eq t] - rw [heq] - exact hintL (fun u => k (-u)) hkneg2 hknegc χ⁻¹ hχi1 - -- split the full-line integral into Γ-common + two prime legs - have hsplitint : (∫ t : ℝ, - (Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv (completedLSym χ⁻¹) (((5/4:ℝ):ℂ) + t * I))) - = (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) - * (logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) - - logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I))) - + ((∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) - * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I)) - + ∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I)) := by - have hintsum : Integrable (fun t : ℝ => - Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I)) := by - refine (hint1.add hint2).congr (Filter.Eventually.of_forall fun t => ?_) - simp only [Pi.add_apply] - calc (∫ t : ℝ, - (Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv (completedLSym χ⁻¹) (((5/4:ℝ):ℂ) + t * I))) - = ∫ t : ℝ, ((Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) - * (logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) - - logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I)) - + (Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I))) := by - congr 1 - funext t - linear_combination (Hfn k (1 - (5/4:ℝ) - t * I)) * (harchdiff t) - _ = (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) - * (logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) - - logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I))) - + ∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I)) := - integral_add hintΓ hintsum - _ = _ := by rw [integral_add hint1 hint2] - -- prime legs + simpa only [hH2eq] using integrable_Hfn_mul_logDeriv_L hχi1 hkneg2 hknegc h54a h54b + have hint12 : Integrable (fun t : ℝ => Hfn k (((5/4:ℝ):ℂ) + t * I) + * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I) + + Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I)) := + hint1.add hint2 + rw [← integral_add hint1 hint2, ← integral_add hintΓ hint12] + congr 1; funext t + linear_combination (Hfn k (1 - (5/4:ℝ) - t * I)) * (harchdiff t) + +private theorem prime_legs_chi (hq : 1 < q) (hprim : χ.IsPrimitive) + {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) : + (1 / (2 * Real.pi) : ℂ) * ((∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) + * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I)) + + ∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) + * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I)) + = - ∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) + * ((coeff χ) n * k (Real.log n) + (starRingEnd ℂ) ((coeff χ) n) * k (-Real.log n)) := by + have hχ1 : χ ≠ 1 := ne_one_of_primitive hq hprim + have hχi1 : χ⁻¹ ≠ 1 := inv_ne_one hχ1 + have h54a : (1:ℝ) < 5/4 := by norm_num + have hkneg2 : ContDiff ℝ 2 (fun u : ℝ => k (-u)) := hk.comp contDiff_neg + have hknegc : HasCompactSupport (fun u : ℝ => k (-u)) := hkc.comp_homeomorph (Homeomorph.neg ℝ) + have hH2eq : ∀ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) + = Hfn (fun u => k (-u)) (((5/4:ℝ):ℂ) + t * I) := fun t => Hfn_mirror k (5/4) t have hζ1 : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I) - = -∑' n : ℕ, (χ n : ℂ) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by - have h := prime_side_line_chi hχ1 hk hkc h54a - have h2 : (∫ t : ℝ, Hfn k ((5/4:ℝ) + t * I) - * (-logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I))) - = -∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) - * logDeriv χ.LFunction (((5/4:ℝ):ℂ) + t * I) := by - rw [← integral_neg] - congr 1 - funext t - ring - rw [h2] at h - linear_combination -h + = -∑' n : ℕ, (coeff χ) n * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := + prime_leg_of_neg (prime_side_line_chi hχ1 hk hkc h54a) have hζ2 : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I) - = -∑' n : ℕ, (starRingEnd ℂ) (χ n) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n) := by - have h := prime_side_line_chi hχi1 (k := fun u => k (-u)) hkneg2 hknegc h54a - have h2 : (∫ t : ℝ, Hfn (fun u => k (-u)) ((5/4:ℝ) + t * I) - * (-logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I))) - = -∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv (χ⁻¹).LFunction (((5/4:ℝ):ℂ) + t * I) := by - rw [← integral_neg] - congr 1 - funext t - rw [hH2eq t] - ring - rw [h2] at h - have h3 : (∑' n : ℕ, ((χ⁻¹) n : ℂ) * ((Λ n / Real.sqrt n : ℝ) : ℂ) - * (fun u => k (-u)) (Real.log n)) - = ∑' n : ℕ, (starRingEnd ℂ) (χ n) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n) := by - refine tsum_congr fun n => ?_ - rw [inv_coeff_eq_conj] + = -∑' n : ℕ, (starRingEnd ℂ) ((coeff χ) n) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n) := by + have h := prime_leg_of_neg (prime_side_line_chi hχi1 (k := fun u => k (-u)) hkneg2 hknegc h54a) + have h3 : (∑' n : ℕ, ((χ⁻¹) n : ℂ) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n)) + = ∑' n : ℕ, (starRingEnd ℂ) ((coeff χ) n) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n) := + tsum_congr fun n => by rw [inv_coeff_eq_conj]; rfl rw [h3] at h - linear_combination -h - -- Γ-part + simpa only [hH2eq] using h + have hsum1 := summable_vonMangoldt_mul_compact (coeff χ) hkc + have hsum2 := summable_vonMangoldt_mul_compact (fun n => (starRingEnd ℂ) ((coeff χ) n)) hknegc + have hmerge : (∑' n : ℕ, (coeff χ) n * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n)) + + (∑' n : ℕ, (starRingEnd ℂ) ((coeff χ) n) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n)) + = ∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) + * ((coeff χ) n * k (Real.log n) + (starRingEnd ℂ) ((coeff χ) n) * k (-Real.log n)) := by + rw [← hsum1.tsum_add hsum2]; exact tsum_congr fun n => by ring + rw [mul_add, hζ1, hζ2, ← hmerge]; ring + +/-- **The explicit formula for L(s,χ), literature form, discharged** — mirror of +`Zeta23.WeilEF.EF_lit_zeta`. -/ +theorem EF_lit_chi_L (hq : 1 < q) (hprim : χ.IsPrimitive) : + EF_lit_chi (parity χ) q (coeff χ) (LZeros (LSeam_of hq hprim)) := by + intro k hk hkc + refine ⟨EF_zero_sum_summable_chi hq hprim hk hkc, ?_⟩ + have hfull := full_line_identity_chi' hq hprim hk hkc (c := 5/4) (by norm_num) (by norm_num) have hΓeval : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) * (logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) @@ -179,87 +122,23 @@ theorem EF_lit_chi_L (hq : 1 < q) (hprim : χ.IsPrimitive) : * ((((Complex.digamma (1 / 4 + ((parity χ : ℕ) : ℂ) / 2 + I * r / 2)).re + Real.log ((q:ℝ) / Real.pi) : ℝ)) : ℂ) := by congr 1 - rw [gamma_line_shift_chi' hq hprim hk hkc h54a h54b] - congr 1 - funext t - congr 1 + rw [gamma_line_shift_chi' hq hprim hk hkc (by norm_num) (by norm_num)] + congr 1; funext t; congr 1 + have hπ : (Real.pi : ℝ) ≠ 0 := Real.pi_ne_zero have hreal : (2 * Real.pi * muq (parity χ) q t : ℝ) = (Complex.digamma (1 / 4 + ((parity χ : ℕ) : ℂ) / 2 + I * t / 2)).re - + Real.log ((q:ℝ) / Real.pi) := by - simp only [muq] - have hπ : (Real.pi : ℝ) ≠ 0 := Real.pi_ne_zero - field_simp - ring + + Real.log ((q:ℝ) / Real.pi) := by simp only [muq]; field_simp; ring rw [hreal] - -- final assembly into literatureRHSchi - obtain ⟨B₁, hB₁⟩ := Zeta23.EF.exists_abs_le_of_hasCompactSupport hkc - have hsummable_gen : ∀ (g : ℝ → ℂ), (∀ u, g u ≠ 0 → |u| ≤ max B₁ 0) → - ∀ (cf : ℕ → ℂ), (∀ n, ‖cf n‖ ≤ 1) → - Summable (fun n : ℕ => cf n * ((Λ n / Real.sqrt n : ℝ) : ℂ) * g (Real.log n)) := by - intro g hg cf hcf - refine summable_of_hasFiniteSupport ?_ - have hsub : Function.support (fun n : ℕ => cf n * ((Λ n / Real.sqrt n : ℝ) : ℂ) - * g (Real.log n)) ⊆ Set.Iic ⌈Real.exp (max B₁ 0)⌉₊ := by - intro n hn - rw [Function.mem_support] at hn - have hgne : g (Real.log n) ≠ 0 := by - intro h - rw [h, mul_zero] at hn - exact hn rfl - have hlog := hg _ hgne - have hn0 : n ≠ 0 := by - rintro rfl - simp at hn - have hn1 : (1:ℝ) ≤ (n:ℝ) := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr hn0 - have hle : (n:ℝ) ≤ Real.exp (max B₁ 0) := by - have h2 : Real.log n ≤ max B₁ 0 := (le_abs_self _).trans hlog - calc (n:ℝ) = Real.exp (Real.log n) := (Real.exp_log (by linarith)).symm - _ ≤ Real.exp (max B₁ 0) := Real.exp_le_exp.mpr h2 - rw [Set.mem_Iic] - exact_mod_cast hle.trans (Nat.le_ceil _) - exact (Set.finite_Iic _).subset hsub - have hnormcoeff : ∀ n : ℕ, ‖((coeff χ) n : ℂ)‖ ≤ 1 := fun n => - DirichletCharacter.norm_le_one χ _ - have hnormcoeffc : ∀ n : ℕ, ‖(starRingEnd ℂ) ((coeff χ) n)‖ ≤ 1 := fun n => by - rw [RCLike.norm_conj] - exact hnormcoeff n - have hsummable1 : Summable (fun n : ℕ => (coeff χ) n * ((Λ n / Real.sqrt n : ℝ) : ℂ) - * k (Real.log n)) := - hsummable_gen k (fun u hu => (hB₁ u hu).trans (le_max_left _ _)) _ hnormcoeff - have hsummable2 : Summable (fun n : ℕ => (starRingEnd ℂ) ((coeff χ) n) - * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n)) := by - refine hsummable_gen (fun u => k (-u)) (fun u hu => ?_) _ hnormcoeffc - have h2 := hB₁ (-u) hu - rw [abs_neg] at h2 - exact h2.trans (le_max_left _ _) - have hmerge : (∑' n : ℕ, (coeff χ) n * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n)) - + (∑' n : ℕ, (starRingEnd ℂ) ((coeff χ) n) * ((Λ n / Real.sqrt n : ℝ) : ℂ) - * k (-Real.log n)) - = ∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) - * ((coeff χ) n * k (Real.log n) + (starRingEnd ℂ) ((coeff χ) n) * k (-Real.log n)) := by - rw [← Summable.tsum_add hsummable1 hsummable2] - refine tsum_congr fun n => ?_ - ring unfold literatureRHSchi calc ∑' ρ : (LZeros (LSeam_of hq hprim)).carrier, ((LZeros (LSeam_of hq hprim)).mult ρ : ℂ) * paperFT k (gammaOf (ρ:ℂ)) - = ∑' ρ : (LZeros (LSeam_of hq hprim)).carrier, - ((LZeros (LSeam_of hq hprim)).mult ρ : ℂ) * Hfn k (ρ:ℂ) := by - refine tsum_congr fun ρ => rfl - _ = (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, + = (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv (completedLSym χ) (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv (completedLSym χ⁻¹) (((5/4:ℝ):ℂ) + t * I)) := hfull.symm - _ = - (∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) - * ((coeff χ) n * k (Real.log n) - + (starRingEnd ℂ) ((coeff χ) n) * k (-Real.log n))) - + (1 / (2 * Real.pi) : ℂ) * ∫ r : ℝ, paperFT k r - * ((((Complex.digamma (1 / 4 + ((parity χ : ℕ) : ℂ) / 2 + I * r / 2)).re - + Real.log ((q:ℝ) / Real.pi) : ℝ)) : ℂ) := by - rw [hsplitint, mul_add, hΓeval, mul_add, hζ1, hζ2, ← hmerge] - simp only [coeff] + _ = _ := by + rw [full_line_split_chi hq hprim hk hkc, mul_add, hΓeval, prime_legs_chi hq hprim hk hkc] ring - _ = _ := rfl end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/MainTermChi.lean b/zeta23/Zeta23/ThmE/MainTermChi.lean index be2de34516..565b271cb9 100644 --- a/zeta23/Zeta23/ThmE/MainTermChi.lean +++ b/zeta23/Zeta23/ThmE/MainTermChi.lean @@ -14,14 +14,9 @@ local count = localCountChi. The assembly is proved once, q-uniformly (`mainChi_uniform_aux`, absolute constants, log scale log(q(T+2))); the per-χ headline `mainChi` is its corollary. -/ -import Zeta23.ThmE.LGrowth -import Zeta23.ThmE.Statement -import Zeta23.ThmE.Hypotheses import Zeta23.ThmE.LocalCountChi import Zeta23.ThmE.GammaSideChi -import Zeta23.ThmE.CountByIntegralChi import Zeta23.ThmE.FoldChi -import Zeta23.ThmE.RvMChiDefs import Zeta23.Assembly import Zeta23.ThmE.ReZeroCountChi import Zeta23.ThmE.GammaFactsChiProof @@ -37,30 +32,6 @@ variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} /-! ### window helpers -/ -lemma zerosInL_subset_of_le {a b c d : ℝ} (hca : c ≤ a) (hbd : b ≤ d) : - zerosInL χ a b ⊆ zerosInL χ c d := by - rintro ρ ⟨hρ, h1, h2⟩ - exact ⟨hρ, lt_of_le_of_lt hca h1, le_trans h2 hbd⟩ - -lemma NcountL_le_of_subset (hq : 1 < q) (hprim : χ.IsPrimitive) {a b c d : ℝ} - (h : zerosInL χ a b ⊆ zerosInL χ c d) : NcountL χ a b ≤ NcountL χ c d := by - have hs : LSeam χ := LSeam_of hq hprim - have hsub : (LZeros hs).window a b ⊆ (LZeros hs).window c d := by - rw [LZeros_window, LZeros_window] - exact h - have hmono := (LZeros hs).finsum_mult_mono (T₁ := c) (T₂ := d) hsub subset_rfl - have e1 := LZeros_N (hs := hs) (T₁ := a) (T₂ := b) - have e2 := LZeros_N (hs := hs) (T₁ := c) (T₂ := d) - unfold ZeroConfig.N at e1 e2 - rw [← e1, ← e2] - exact hmono - -lemma NcountL_add (hq : 1 < q) (hprim : χ.IsPrimitive) {T₁ T T₂ : ℝ} (h1 : T₁ ≤ T) (h2 : T ≤ T₂) : - NcountL χ T₁ T₂ = NcountL χ T₁ T + NcountL χ T T₂ := by - have hs : LSeam χ := LSeam_of hq hprim - have := Assembly.N_add (Z := LZeros hs) (a := T₁) (b := T) (c := T₂) h1 h2 - simpa only [LZeros_N] using this - /-- zero-free ordinates for L are dense: every [a, a+1] contains one. -/ lemma exists_goodHeightL (hq : 1 < q) (hprim : χ.IsPrimitive) (a : ℝ) : ∃ T ∈ Set.Icc a (a + 1), GoodHeightL χ T := by @@ -184,79 +155,16 @@ lemma halfContourChi_split (hq : 1 < q) (hprim : χ.IsPrimitive) {κ : ℕ} /-! ### The q-UNIFORM assembly (absolute constants) -/ -/-- q-uniform |μ_χ| ≤ (C+2)·log(q(τ+3)) for τ ≥ 1, from the bounded Stirling field. -/ +/-- q-uniform |μ_χ| ≤ (C+2)·log(q(τ+3)) for τ ≥ 1, from `RvM.mu_le_log_of_stirling`. -/ theorem muq_le_log_uniform {κ q : ℕ} [NeZero q] {C : ℝ} (hC : 0 ≤ C) (hst : ∀ τ : ℝ, 1 ≤ |τ| → |muq κ q τ - (1 / (2 * Real.pi)) * Real.log (q * |τ| / (2 * Real.pi))| ≤ C / τ ^ 2) (hq1 : 1 ≤ q) : ∀ τ : ℝ, 1 ≤ τ → - |muq κ q τ| ≤ (C + 2) * Real.log ((q:ℝ) * (τ + 3)) := by - intro τ hτ - have hτ0 : (0:ℝ) < τ := by linarith - have hq0 : (0:ℝ) < (q:ℝ) := by exact_mod_cast Nat.pos_of_ne_zero (NeZero.ne q) - have hq1' : (1:ℝ) ≤ (q:ℝ) := by exact_mod_cast hq1 - have h1 := hst τ (by rw [abs_of_pos hτ0]; exact hτ) - rw [abs_of_pos hτ0] at h1 - obtain ⟨hl, hr⟩ := abs_le.mp h1 - set L : ℝ := Real.log ((q:ℝ) * (τ + 3)) with hLdef - have hqt4 : (4:ℝ) ≤ (q:ℝ) * (τ + 3) := by nlinarith - have hL1 : 1 ≤ L := by - rw [hLdef, ← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - -- 0 ≤ log(qτ/2π) ≤ L and C/τ² ≤ C - have harg : Real.log ((q:ℝ) * τ / (2 * Real.pi)) ≤ L := by - rw [hLdef] - apply Real.log_le_log (by positivity) - have hπ3 := Real.pi_gt_three - rw [div_le_iff₀ (by positivity)] - nlinarith - have hCτ : |C / τ ^ 2| ≤ C := by - rw [abs_div, abs_of_nonneg hC, abs_of_pos (by positivity : (0:ℝ) < τ ^ 2)] - apply div_le_self hC (by nlinarith) - obtain ⟨hCl, hCr⟩ := abs_le.mp hCτ - have h2π0 : 0 < 1 / (2 * Real.pi) := by positivity - have h2π1 : 1 / (2 * Real.pi) ≤ 1 := by - rw [div_le_one (by positivity)]; nlinarith [Real.pi_gt_three] - -- lower bound for log(qτ/2π): ≥ −log(2π) ≥ −2 ≥ −2L (qτ ≥ 1·1 = 1 ⇒ log ≥ −log 2π) - have hlow : -(2 * L) ≤ 1 / (2 * Real.pi) * Real.log ((q:ℝ) * τ / (2 * Real.pi)) := by - have h7 : Real.log ((q:ℝ) * τ / (2 * Real.pi)) ≥ -Real.log (2 * Real.pi) := by - rw [Real.log_div (by positivity) (by positivity)] - have : 0 ≤ Real.log ((q:ℝ) * τ) := Real.log_nonneg (by nlinarith) - linarith - have h8 : Real.log (2 * Real.pi) ≤ 2 * L := by - have h9 : Real.log (2 * Real.pi) ≤ Real.log 16 := by - apply Real.log_le_log (by positivity) - nlinarith [Real.pi_lt_d2] - have h10 : Real.log 16 = 2 * Real.log 4 := by - rw [show (16:ℝ) = 4^2 by norm_num, Real.log_pow]; push_cast; ring - have h11 : Real.log 4 ≤ L := by - rw [hLdef]; exact Real.log_le_log (by norm_num) hqt4 - linarith - have hln2π0 : 0 ≤ Real.log (2 * Real.pi) := - Real.log_nonneg (by nlinarith [Real.pi_gt_three]) - have h12 := mul_le_mul_of_nonneg_left h7 h2π0.le - -- h12 : (1/2π)·(−log 2π) ≤ (1/2π)·log(qτ/2π) - have h13 : -(2 * L) ≤ 1 / (2 * Real.pi) * -(Real.log (2 * Real.pi)) := by - have h14 : 1 / (2 * Real.pi) * Real.log (2 * Real.pi) ≤ 1 * (2 * L) := by - apply mul_le_mul h2π1 h8 hln2π0 (by norm_num) - nlinarith - linarith - rw [abs_le] - constructor - · have : 1 / (2 * Real.pi) * Real.log ((q:ℝ) * τ / (2 * Real.pi)) - C ≤ muq κ q τ := by linarith - nlinarith - · have hup : 1 / (2 * Real.pi) * Real.log ((q:ℝ) * τ / (2 * Real.pi)) ≤ L := by - rcases le_or_gt 0 (Real.log ((q:ℝ) * τ / (2 * Real.pi))) with h | h - · calc 1 / (2 * Real.pi) * Real.log ((q:ℝ) * τ / (2 * Real.pi)) - ≤ 1 * Real.log ((q:ℝ) * τ / (2 * Real.pi)) := mul_le_mul_of_nonneg_right h2π1 h - _ = Real.log ((q:ℝ) * τ / (2 * Real.pi)) := one_mul _ - _ ≤ L := harg - · nlinarith - nlinarith + |muq κ q τ| ≤ (C + 2) * Real.log ((q : ℝ) * (τ + 3)) := + RvM.mu_le_log_of_stirling (by exact_mod_cast hq1) hC hst -set_option maxHeartbeats 3200000 in /-- q-uniform main-term assembly, parametric in the uniform Backlund and H-Γ(χ)-bounded inputs -(shapes = RvMChiUniform's backlund_horizontalChi_uniform / gammaFactsChi_uniform). -/ +(delegates to `Zeta23.RvM.rvM_main_scaled`). -/ theorem mainChi_uniform_aux (hBack : ∃ C : ℝ, ∀ (q : ℕ) [NeZero q] (χ : DirichletCharacter ℂ q), χ ≠ 1 → ∀ T : ℝ, (∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T) → @@ -271,240 +179,47 @@ theorem mainChi_uniform_aux obtain ⟨CB, hB⟩ := hBack obtain ⟨CΓ, hΓall⟩ := hΓ obtain ⟨A₀, hA₀1, hA₀⟩ := localCountChi_uniform_proof - have hA₀0 : 0 ≤ A₀ := by linarith set CM : ℝ := |CΓ| + 2 with hCM - have hCM0 : 0 < CM := by positivity - refine ⟨4 * |CB| + 4 + 8 * A₀ + 8 * CM + |CΓ|, max 4 (|CΓ| + 1), - by positivity, ?_⟩ + refine ⟨4 * |CB| + Real.pi + 4 * A₀ + 4 * CM + |CΓ|, max 4 (|CΓ| + 1), by positivity, ?_⟩ intro q _ χ hq1 hprim T hT have hχ1 : χ ≠ 1 := ne_one_of_primitive hq1 hprim - have hq0 : (0:ℝ) < (q:ℝ) := by exact_mod_cast Nat.pos_of_ne_zero (NeZero.ne q) - have hq2 : (2:ℝ) ≤ (q:ℝ) := by exact_mod_cast hq1 - have hqnat1 : 1 ≤ q := hq1.le - have hT4 : 4 ≤ T := le_trans (le_max_left _ _) hT - have hTΓ : |CΓ| + 1 ≤ T := le_trans (le_max_right _ _) hT - -- parity - obtain ⟨κ, hκ1, hκdef⟩ : ∃ κ : ℕ, κ ≤ 1 ∧ - ∀ s, gammaFactor χ s = Complex.Gammaℝ (s + κ) := by + have hs : LSeam χ := LSeam_of hq1 hprim + obtain ⟨κ, hκ1, hκdef⟩ : ∃ κ : ℕ, κ ≤ 1 ∧ ∀ s, gammaFactor χ s = Complex.Gammaℝ (s + κ) := by rcases χ.even_or_odd with he | ho · exact ⟨0, by norm_num, fun s => by rw [he.gammaFactor_def]; norm_num⟩ · exact ⟨1, le_rfl, fun s => by rw [ho.gammaFactor_def]; norm_num⟩ - have hΓb := hΓall κ q hκ1 hqnat1 - -- log scale - set L' : ℝ := Real.log ((q:ℝ) * (T + 2)) with hL'def - have hqT12 : (12:ℝ) ≤ (q:ℝ) * (T + 2) := by nlinarith - have hL'1 : 1 ≤ L' := by - rw [hL'def, ← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - have hL'0 : 0 < L' := by linarith - -- generic: log(q·x) ≤ 2L' whenever 0 < x ≤ (T+2)²·q (used at x = |T₁|+3 etc.) - have hlog2L : ∀ x : ℝ, 0 < x → (q:ℝ) * x ≤ ((q:ℝ) * (T + 2))^2 → Real.log ((q:ℝ) * x) ≤ 2 * L' := by - intro x hx hxq - have h1 : Real.log ((q:ℝ) * x) ≤ Real.log (((q:ℝ) * (T + 2))^2) := - Real.log_le_log (by positivity) hxq - have h2 : Real.log (((q:ℝ) * (T + 2))^2) = 2 * L' := by - rw [hL'def, Real.log_pow]; push_cast; ring - linarith - -- good heights - obtain ⟨T₁, hT₁mem, hg1⟩ := exists_goodHeightL hq1 hprim (T - 1) - obtain ⟨T₂, hT₂mem, hg2⟩ := exists_goodHeightL hq1 hprim (2 * T) - have hT₁a : T - 1 ≤ T₁ := hT₁mem.1 - have hT₁b : T₁ ≤ T := by have := hT₁mem.2; linarith - have hT₂a : 2 * T ≤ T₂ := hT₂mem.1 - have hT₂b : T₂ ≤ 2 * T + 1 := hT₂mem.2 - have h1T₁ : 1 ≤ T₁ := by linarith - have h12 : T₁ ≤ T₂ := by linarith - have hN := NcountL_eq_im_halfContour hq1 hprim h12 hg1 hg2 - have hsplit := halfContourChi_split hq1 hprim hκdef h1T₁ h12 hg1 hg2 - have hgam := gammaSideChi q κ (T₁ := T₁) (T₂ := T₂) (by linarith) (by linarith) - have hadd : (NcountL χ T₁ T₂ : ℝ) - = (NcountL χ T₁ T : ℝ) + (NcountL χ T (2*T) : ℝ) + (NcountL χ (2*T) T₂ : ℝ) := by - have e1 := NcountL_add hq1 hprim (T₁ := T₁) (T := T) (T₂ := T₂) hT₁b (by linarith) - have e2 := NcountL_add hq1 hprim (T₁ := T) (T := 2*T) (T₂ := T₂) (by linarith) hT₂a - rw [e1, e2]; push_cast; ring - -- end windows ≤ 2A₀L' each... (uniform local count at T₁ resp. 2T) - have hw1 : (NcountL χ T₁ T : ℝ) ≤ 2 * A₀ * L' := by - have hsub : NcountL χ T₁ T ≤ NcountL χ T₁ (T₁ + 1) := - NcountL_le_of_subset hq1 hprim (zerosInL_subset_of_le le_rfl (by linarith)) - calc (NcountL χ T₁ T : ℝ) ≤ (NcountL χ T₁ (T₁ + 1) : ℝ) := by exact_mod_cast hsub - _ ≤ A₀ * Real.log ((q:ℝ) * (|T₁| + 3)) := hA₀ q χ hq1 hprim T₁ - _ ≤ A₀ * (2 * L') := by - refine mul_le_mul_of_nonneg_left ?_ hA₀0 - apply hlog2L _ (by positivity) - rw [abs_of_pos (by linarith : (0:ℝ) < T₁)] - nlinarith - _ = 2 * A₀ * L' := by ring - have hw2 : (NcountL χ (2*T) T₂ : ℝ) ≤ 2 * A₀ * L' := by - have hsub : NcountL χ (2*T) T₂ ≤ NcountL χ (2*T) (2*T + 1) := - NcountL_le_of_subset hq1 hprim (zerosInL_subset_of_le le_rfl hT₂b) - calc (NcountL χ (2*T) T₂ : ℝ) ≤ (NcountL χ (2*T) (2*T+1) : ℝ) := by exact_mod_cast hsub - _ ≤ A₀ * Real.log ((q:ℝ) * (|2*T| + 3)) := hA₀ q χ hq1 hprim (2*T) - _ ≤ A₀ * (2 * L') := by - refine mul_le_mul_of_nonneg_left ?_ hA₀0 - apply hlog2L _ (by positivity) - rw [abs_of_pos (by linarith : (0:ℝ) < 2*T)] - nlinarith - _ = 2 * A₀ * L' := by ring - -- Backlund on the horizontals + π on the vertical - have habs₁ : |T₁| = T₁ := abs_of_pos (by linarith) - have habs₂ : |T₂| = T₂ := abs_of_pos (by linarith) - have hbk1 := hB q χ hχ1 T₁ hg1 - have hbk2 := hB q χ hχ1 T₂ hg2 - rw [habs₁] at hbk1 - rw [habs₂] at hbk2 - have hlogqT₁ : Real.log ((q:ℝ) * (T₁ + 3)) ≤ 2 * L' := - hlog2L _ (by linarith) (by nlinarith) - have hlogqT₂ : Real.log ((q:ℝ) * (T₂ + 3)) ≤ 2 * L' := - hlog2L _ (by linarith) (by nlinarith) - have hbk1' : |(∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₁ * I)).im| ≤ |CB| * (2 * L') := by - refine hbk1.trans (le_trans (mul_le_mul (le_abs_self CB) hlogqT₁ ?_ (abs_nonneg _)) le_rfl) - have : (0:ℝ) < (q:ℝ) * (T₁ + 3) := by positivity - rw [← Real.log_one] - exact Real.log_le_log one_pos (by nlinarith) - have hbk2' : |(∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₂ * I)).im| ≤ |CB| * (2 * L') := by - refine hbk2.trans (le_trans (mul_le_mul (le_abs_self CB) hlogqT₂ ?_ (abs_nonneg _)) le_rfl) - rw [← Real.log_one] - exact Real.log_le_log one_pos (by nlinarith) - have hvert := vertical_twoChi hχ1 T₁ T₂ - have hLbound : |(RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im| - ≤ |CB| * (2 * L') + Real.pi + |CB| * (2 * L') := by - unfold RvM.halfContour - have eim : ((∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₁ * I)) - + (∫ t in T₁..T₂, logDeriv χ.LFunction (2 + t * I)) * I - - ∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₂ * I)).im - = (∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₁ * I)).im - + ((∫ t in T₁..T₂, logDeriv χ.LFunction (2 + t * I)) * I).im - - (∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₂ * I)).im := by - simp [Complex.add_im, Complex.sub_im] - rw [eim] - have hmulI : ((∫ t in T₁..T₂, logDeriv χ.LFunction (2 + t * I)) * I).im - = (∫ t in T₁..T₂, logDeriv χ.LFunction (2 + t * I) * I).im := - congrArg Complex.im (intervalIntegral.integral_mul_const (μ := MeasureTheory.volume) I - (fun t : ℝ => logDeriv χ.LFunction (2 + t * I))).symm - calc |(∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₁ * I)).im - + ((∫ t in T₁..T₂, logDeriv χ.LFunction (2 + t * I)) * I).im - - (∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₂ * I)).im| - ≤ |(∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₁ * I)).im| - + |((∫ t in T₁..T₂, logDeriv χ.LFunction (2 + t * I)) * I).im| - + |(∫ σ in (1/2:ℝ)..2, logDeriv χ.LFunction (σ + T₂ * I)).im| := - (abs_sub _ _).trans (add_le_add (abs_add_le _ _) le_rfl) - _ ≤ |CB| * (2 * L') + Real.pi + |CB| * (2 * L') := by - rw [hmulI] - linarith [hvert] - -- μ_χ bookkeeping (bounded Γ-facts) - have hμc : Continuous (muq κ q) := hΓb.smooth.continuous - have hCMbound := muq_le_log_uniform (abs_nonneg CΓ) - (fun τ hτ => (hΓb.stirling τ hτ).trans (by - have : CΓ / τ ^ 2 ≤ |CΓ| / τ ^ 2 := by - gcongr - exact le_abs_self _ - linarith)) hqnat1 - have hμint : ∀ a b : ℝ, IntervalIntegrable (muq κ q) MeasureTheory.volume a b := - fun a b => hμc.intervalIntegrable a b - have hμsplit : (∫ t in T₁..T₂, muq κ q t) - = (∫ t in T₁..T, muq κ q t) + (∫ t in T..(2*T), muq κ q t) - + ∫ t in (2*T)..T₂, muq κ q t := by - have e1 : (∫ t in T₁..(2*T), muq κ q t) - = (∫ t in T₁..T, muq κ q t) + ∫ t in T..(2*T), muq κ q t := - (intervalIntegral.integral_add_adjacent_intervals (hμint T₁ T) (hμint T (2*T))).symm - have e2 : (∫ t in T₁..T₂, muq κ q t) - = (∫ t in T₁..(2*T), muq κ q t) + ∫ t in (2*T)..T₂, muq κ q t := - (intervalIntegral.integral_add_adjacent_intervals (hμint T₁ (2*T)) (hμint (2*T) T₂)).symm - rw [e2, e1] - have hμwin : ∀ a b : ℝ, 1 ≤ a → a ≤ b → b ≤ 2*T + 1 → |b - a| ≤ 1 → - |∫ t in a..b, muq κ q t| ≤ 2 * CM * L' := by - intro a b ha hab hb hba - have hbound : ∀ t ∈ Set.uIoc a b, ‖muq κ q t‖ ≤ CM * (2 * L') := by - intro t ht - rw [Set.uIoc_of_le hab] at ht - have ht1 : 1 ≤ t := le_trans ha ht.1.le - have ht2 : t ≤ 2*T + 1 := le_trans ht.2 hb - rw [Real.norm_eq_abs] - refine (hCMbound t ht1).trans ?_ - have h1 : Real.log ((q:ℝ) * (t + 3)) ≤ 2 * L' := - hlog2L _ (by linarith) (by nlinarith) - calc (|CΓ| + 2) * Real.log ((q:ℝ) * (t + 3)) ≤ (|CΓ| + 2) * (2 * L') := by - apply mul_le_mul_of_nonneg_left h1 (by positivity) - _ = CM * (2 * L') := by rw [hCM] - have hnorm := intervalIntegral.norm_integral_le_of_norm_le_const hbound - rw [Real.norm_eq_abs] at hnorm - calc |∫ t in a..b, muq κ q t| ≤ CM * (2 * L') * |b - a| := hnorm - _ ≤ CM * (2 * L') * 1 := by - apply mul_le_mul_of_nonneg_left hba (by positivity) - _ = 2 * CM * L' := by ring - have hμ1 : |∫ t in T₁..T, muq κ q t| ≤ 2 * CM * L' := - hμwin T₁ T h1T₁ hT₁b (by linarith) (by rw [abs_of_nonneg (by linarith)]; linarith) - have hμ2 : |∫ t in (2*T)..T₂, muq κ q t| ≤ 2 * CM * L' := - hμwin (2*T) T₂ (by linarith) hT₂a (by linarith) (by rw [abs_of_nonneg (by linarith)]; linarith) - have hintmu := hΓb.int_mu T (by linarith [le_abs_self CΓ]) - have hCΓT : CΓ / T ≤ |CΓ| := by - calc CΓ / T ≤ |CΓ| / T := by gcongr; exact le_abs_self _ - _ ≤ |CΓ| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos - linarith - _ = |CΓ| := div_one _ - have hπ : (0:ℝ) < Real.pi := Real.pi_pos - have hkey : (NcountL χ T (2*T) : ℝ) - T / (2 * Real.pi) * ell1q q T - = (1/Real.pi) * (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im - + ((∫ t in T₁..T, muq κ q t) + (∫ t in (2*T)..T₂, muq κ q t) - + ((∫ t in T..(2*T), muq κ q t) - T * ell1q q T / (2 * Real.pi))) - - ((NcountL χ T₁ T : ℝ) + (NcountL χ (2*T) T₂ : ℝ)) := by - have hΛim : (1/Real.pi) * (RvM.halfContour (logDeriv (completedLSym χ)) T₁ T₂).im - = (1/Real.pi) * (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im - + (1/Real.pi) * (RvM.halfContour (logDeriv (archChi q κ)) T₁ T₂).im := by - rw [hsplit, Complex.add_im]; ring - have h5 : (NcountL χ T₁ T₂ : ℝ) - = (1/Real.pi) * (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im - + ∫ t in T₁..T₂, muq κ q t := by - rw [hN, hΛim, hgam] - rw [hμsplit] at h5 - have hTell : T / (2 * Real.pi) * ell1q q T = T * ell1q q T / (2 * Real.pi) := by ring - rw [hTell] - linarith [hadd] - have hA : |(1/Real.pi) * (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im| - ≤ (4 * |CB| + 4) * L' := by - rw [abs_mul, abs_of_pos (by positivity : (0:ℝ) < 1/Real.pi)] - have hπ1 : (1:ℝ) ≤ Real.pi := by linarith [Real.pi_gt_three] - have hfrac : (1:ℝ)/Real.pi ≤ 1 := by rw [div_le_one hπ]; exact hπ1 - have step : (1/Real.pi) * |(RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im| - ≤ |CB| * (2 * L') + Real.pi + |CB| * (2 * L') := by - calc (1/Real.pi) * |(RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im| - ≤ 1 * |(RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im| := - mul_le_mul_of_nonneg_right hfrac (abs_nonneg _) - _ = |(RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im| := one_mul _ - _ ≤ |CB| * (2 * L') + Real.pi + |CB| * (2 * L') := hLbound - have hπ4 : Real.pi ≤ 4 * L' := by nlinarith [Real.pi_lt_d2] - nlinarith [abs_nonneg CB] - have hmid : |(∫ t in T..(2*T), muq κ q t) - T * ell1q q T / (2 * Real.pi)| ≤ |CΓ| * L' := by - calc |(∫ t in T..(2*T), muq κ q t) - T * ell1q q T / (2 * Real.pi)| ≤ CΓ / T := hintmu - _ ≤ |CΓ| := hCΓT - _ ≤ |CΓ| * L' := le_mul_of_one_le_right (abs_nonneg _) hL'1 - rw [hkey] - have htri : |(1/Real.pi) * (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im - + ((∫ t in T₁..T, muq κ q t) + (∫ t in (2*T)..T₂, muq κ q t) - + ((∫ t in T..(2*T), muq κ q t) - T * ell1q q T / (2 * Real.pi))) - - ((NcountL χ T₁ T : ℝ) + (NcountL χ (2*T) T₂ : ℝ))| - ≤ |(1/Real.pi) * (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im| - + (|∫ t in T₁..T, muq κ q t| + |∫ t in (2*T)..T₂, muq κ q t| - + |(∫ t in T..(2*T), muq κ q t) - T * ell1q q T / (2 * Real.pi)|) - + ((NcountL χ T₁ T : ℝ) + (NcountL χ (2*T) T₂ : ℝ)) := by - have h2 := abs_add_le (∫ t in T₁..T, muq κ q t) (∫ t in (2*T)..T₂, muq κ q t) - have h3 := abs_add_le ((∫ t in T₁..T, muq κ q t) + (∫ t in (2*T)..T₂, muq κ q t)) - ((∫ t in T..(2*T), muq κ q t) - T * ell1q q T / (2 * Real.pi)) - have h1 := abs_add_le ((1/Real.pi) * (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im) - ((∫ t in T₁..T, muq κ q t) + (∫ t in (2*T)..T₂, muq κ q t) - + ((∫ t in T..(2*T), muq κ q t) - T * ell1q q T / (2 * Real.pi))) - have h4 := abs_sub (((1/Real.pi) * (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im) - + ((∫ t in T₁..T, muq κ q t) + (∫ t in (2*T)..T₂, muq κ q t) - + ((∫ t in T..(2*T), muq κ q t) - T * ell1q q T / (2 * Real.pi)))) - ((NcountL χ T₁ T : ℝ) + (NcountL χ (2*T) T₂ : ℝ)) - have h5 : |(NcountL χ T₁ T : ℝ) + (NcountL χ (2*T) T₂ : ℝ)| - = (NcountL χ T₁ T : ℝ) + (NcountL χ (2*T) T₂ : ℝ) := abs_of_nonneg (by positivity) - rw [h5] at h4 - linarith - refine htri.trans ?_ - nlinarith [hA, hμ1, hμ2, hmid, hw1, hw2, hL'0] + have hΓb := hΓall κ q hκ1 hq1.le + have hμle := muq_le_log_uniform (abs_nonneg CΓ) + (fun τ hτ => (hΓb.stirling τ hτ).trans (by gcongr; exact le_abs_self _)) hq1.le + have hmain := RvM.rvM_main_scaled (LZeros hs) (GoodHeightL χ) (completedLSym χ) (muq κ q) (ell1q q) + (scale := (q : ℝ)) (a₀ := 0) (CY := |CB|) (KY := Real.pi) (TY := 0) (A₀ := A₀) (CM := CM) + (Cμ := CΓ) (Tμ := |CΓ|) (by exact_mod_cast hq1.le) le_rfl (abs_nonneg _) Real.pi_pos.le + (by linarith) (by positivity) + (fun a _ => exists_goodHeightL hq1 hprim a) + (fun T₁ T₂ _ h12 hg1 hg2 => by + rw [LZeros_N]; exact NcountL_eq_im_halfContour hq1 hprim h12.le hg1 hg2) + (fun T₁ T₂ h1 h12 hg1 hg2 => by + have h1T₁ : 1 ≤ T₁ := le_trans (le_max_right _ _) (le_trans (le_max_left _ _) h1) + have hsplit := halfContourChi_split hq1 hprim hκdef h1T₁ h12.le hg1 hg2 + have hgam := gammaSideChi q κ (T₁ := T₁) (T₂ := T₂) (by linarith) (by linarith) + have hsub : (RvM.halfContour (logDeriv (completedLSym χ)) T₁ T₂).im - Real.pi * ∫ t in T₁..T₂, muq κ q t + = (RvM.halfContour (logDeriv χ.LFunction) T₁ T₂).im := by + rw [hsplit, Complex.add_im, ← hgam]; field_simp [Real.pi_ne_zero]; ring + rw [hsub] + have hbk : ∀ t : ℝ, GoodHeightL χ t → + |(∫ σ in (1 / 2 : ℝ)..2, logDeriv χ.LFunction (σ + t * I)).im| + ≤ |CB| * Real.log ((q : ℝ) * (|t| + 3)) := fun t hgt => by + have hq1' : (1 : ℝ) ≤ q := by exact_mod_cast hq1.le + exact (hB q χ hχ1 t hgt).trans (mul_le_mul_of_nonneg_right (le_abs_self CB) + (Real.log_nonneg (by nlinarith [abs_nonneg t]))) + exact RvM.abs_im_halfContour_le (hbk T₁ hg1) (hbk T₂ hg2) (vertical_twoChi hχ1 T₁ T₂)) + (fun t => by rw [LZeros_N]; exact hA₀ q χ hq1 hprim t) + hΓb.smooth.continuous hμle (fun T' hT' => hΓb.int_mu T' (by linarith [le_abs_self CΓ])) + T (by + have hT4 : 4 ≤ T := le_trans (le_max_left _ _) hT + have hTΓ : |CΓ| + 1 ≤ T := le_trans (le_max_right _ _) hT + exact max_le (max_le (max_le (by linarith) hTΓ) hT4) (by linarith)) + simpa only [LZeros_N] using hmain /-! ### Per-χ main term (from the q-uniform assembly) -/ diff --git a/zeta23/Zeta23/ThmE/MuMuChi.lean b/zeta23/Zeta23/ThmE/MuMuChi.lean index f1166eda0c..0a3a366163 100644 --- a/zeta23/Zeta23/ThmE/MuMuChi.lean +++ b/zeta23/Zeta23/ThmE/MuMuChi.lean @@ -5,316 +5,46 @@ SPDX-License-Identifier: Apache-2.0 -/ /- Zeta23/ThmE/MuMuChi.lean — [prop:mumu] for Dirichlet characters (Theorem E, paper sec 7.2): -the diagonal mu_chi-evaluation. - -Differences from the zeta-version: mu -> muq kappa q; window sup-bound |mu_chi| <= C_a * l -(muq_abs_le) instead of |mu| <= l, so the core lemmas carry an abstract bound A (>= 0); the -K-increment arrives in unified K(|r|+r^2)/t shape (muq_increment_bound); constants fold at the -end (C is existentially bound). +the diagonal `μ_χ`-evaluation, proved by specializing `PrimeSide.prop_mumu_gen`. -/ import Zeta23.ThmE.PrimeSideChi -import Zeta23.PrimeSideB.PPKernel +import Zeta23.PrimeSideA.MuMu noncomputable section -set_option backward.isDefEq.respectTransparency false - open MeasureTheory Real Set -open scoped BigOperators namespace Zeta23 namespace ThmE open Zeta23.PrimeSide -variable {cϱ : ℝ} {κ : ℕ} {q : ℕ} - -section Core - -variable {p : Setting} {F : LocalFun} - -/-- Core scalar estimate (chi-version): for every x, the inner shear integral differs from -the window integral of muq^2 by at most (A^2 + A*K)|x| + A*K*x^2. -/ -theorem abs_inner_sub_le_chi (hΓq : GammaFactsChi κ q) (hT2 : 2 ≤ p.T) - {A : ℝ} (hA0 : 0 ≤ A) - (hμl : ∀ τ ∈ Icc p.T (2 * p.T), |muq κ q τ| ≤ A) - {K : ℝ} (hK0 : 0 ≤ K) - (hKinc : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, - |muq κ q (t + r) - muq κ q t| ≤ K * (|r| + r ^ 2) / t) - (x : ℝ) : - |(∫ τ' in Ix p.T x, muq κ q (x + τ') * muq κ q τ') - - ∫ τ' in Icc p.T (2 * p.T), muq κ q τ' ^ 2| - ≤ (A ^ 2 + A * K) * |x| + A * K * x ^ 2 := by - have hμc : Continuous (muq κ q) := hΓq.smooth.continuous - have hT0 : (0 : ℝ) < p.T := by linarith - have hcnn : 0 ≤ ∫ τ' in Icc p.T (2 * p.T), muq κ q τ' ^ 2 := - setIntegral_nonneg measurableSet_Icc fun τ' _ => sq_nonneg _ - have hsq_bound : ∀ τ' ∈ Icc p.T (2 * p.T), ‖muq κ q τ' ^ 2‖ ≤ A ^ 2 := by - intro τ' hτ' - have h := hμl τ' hτ' - rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] - nlinarith [abs_nonneg (muq κ q τ'), sq_abs (muq κ q τ')] - have hcle : ∫ τ' in Icc p.T (2 * p.T), muq κ q τ' ^ 2 ≤ A ^ 2 * p.T := by - have h := norm_setIntegral_le_of_norm_le_const (μ := volume) (s := Icc p.T (2 * p.T)) - (f := fun τ' => muq κ q τ' ^ 2) - (by rw [Real.volume_Icc]; exact ENNReal.ofReal_lt_top) hsq_bound - rw [Real.norm_eq_abs, abs_of_nonneg hcnn, measureReal_def, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), show 2 * p.T - p.T = p.T by ring] at h - exact h - rcases le_or_gt |x| p.T with hx | hx - · have hIle : max (p.T - x) p.T ≤ min (2 * p.T - x) (2 * p.T) := Ix_le hT0.le hx - have hlen : min (2 * p.T - x) (2 * p.T) - max (p.T - x) p.T = p.T - |x| := - Ix_length - have hIxI : Ix p.T x ⊆ Icc p.T (2 * p.T) := fun τ' hτ' => (mem_Ix.mp hτ').2 - have hIxcompact : IsCompact (Ix p.T x) := by unfold Ix; exact isCompact_Icc - have hIxmeas : MeasurableSet (Ix p.T x) := measurableSet_Ix p.T x - have hIxfin : volume (Ix p.T x) ≠ ⊤ := by - unfold Ix; rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top - have hIxvol : (volume : Measure ℝ).real (Ix p.T x) = p.T - |x| := by - unfold Ix - rw [measureReal_def, Real.volume_Icc, ENNReal.toReal_ofReal (by linarith)] - linarith - have hIxInt1 : IntegrableOn (fun τ' => muq κ q (x + τ') * muq κ q τ') (Ix p.T x) := - ContinuousOn.integrableOn_compact hIxcompact (by fun_prop) - have hIxInt2 : IntegrableOn (fun τ' => muq κ q τ' ^ 2) (Ix p.T x) := - ContinuousOn.integrableOn_compact hIxcompact (by fun_prop) - have hIInt2 : IntegrableOn (fun τ' => muq κ q τ' ^ 2) (Icc p.T (2 * p.T)) := - ContinuousOn.integrableOn_compact isCompact_Icc (by fun_prop) - have hlip : |(∫ τ' in Ix p.T x, muq κ q (x + τ') * muq κ q τ') - - ∫ τ' in Ix p.T x, muq κ q τ' ^ 2| ≤ A * (K * (|x| + x ^ 2)) := by - rw [← integral_sub hIxInt1 hIxInt2] - have hb : ∀ τ' ∈ Ix p.T x, - ‖muq κ q (x + τ') * muq κ q τ' - muq κ q τ' ^ 2‖ - ≤ K * (|x| + x ^ 2) / p.T * A := by - intro τ' hτ' - obtain ⟨_, hmem2⟩ := mem_Ix.mp hτ' - have hτT : p.T ≤ τ' := hmem2.1 - have h2τ : 2 ≤ τ' := by linarith - have hinc := hKinc τ' h2τ x - rw [show τ' + x = x + τ' by ring] at hinc - have hμτ : |muq κ q τ'| ≤ A := hμl τ' hmem2 - have hqd : K * (|x| + x ^ 2) / τ' ≤ K * (|x| + x ^ 2) / p.T := by - gcongr - calc ‖muq κ q (x + τ') * muq κ q τ' - muq κ q τ' ^ 2‖ - = |muq κ q (x + τ') - muq κ q τ'| * |muq κ q τ'| := by - rw [Real.norm_eq_abs, ← abs_mul]; congr 1; ring - _ ≤ K * (|x| + x ^ 2) / p.T * A := - mul_le_mul (hinc.trans hqd) hμτ (abs_nonneg _) (by positivity) - have h := norm_setIntegral_le_of_norm_le_const (μ := volume) (s := Ix p.T x) - (f := fun τ' => muq κ q (x + τ') * muq κ q τ' - muq κ q τ' ^ 2) - (lt_of_le_of_ne (le_top) hIxfin) hb - rw [Real.norm_eq_abs, hIxvol] at h - refine h.trans ?_ - have hfrac : (p.T - |x|) / p.T ≤ 1 := by - rw [div_le_one hT0]; linarith [abs_nonneg x] - have hnum : (0 : ℝ) ≤ K * (|x| + x ^ 2) := by positivity - calc K * (|x| + x ^ 2) / p.T * A * (p.T - |x|) - = A * (K * (|x| + x ^ 2)) * ((p.T - |x|) / p.T) := by ring - _ ≤ A * (K * (|x| + x ^ 2)) * 1 := by - have : (0 : ℝ) ≤ A * (K * (|x| + x ^ 2)) := by positivity - exact mul_le_mul_of_nonneg_left hfrac this - _ = A * (K * (|x| + x ^ 2)) := mul_one _ - have hcomp : |(∫ τ' in Ix p.T x, muq κ q τ' ^ 2) - - ∫ τ' in Icc p.T (2 * p.T), muq κ q τ' ^ 2| ≤ A ^ 2 * |x| := by - rw [abs_sub_comm, ← setIntegral_sdiff hIxmeas hIInt2 hIxI] - have hdvol : (volume : Measure ℝ).real (Icc p.T (2 * p.T) \ Ix p.T x) = |x| := by - have hsub : volume (Icc p.T (2 * p.T) \ Ix p.T x) - = volume (Icc p.T (2 * p.T)) - volume (Ix p.T x) := - measure_sdiff hIxI hIxmeas.nullMeasurableSet hIxfin - rw [measureReal_def, hsub] - unfold Ix - rw [Real.volume_Icc, Real.volume_Icc, - ← ENNReal.ofReal_sub _ (by linarith : - (0 : ℝ) ≤ min (2 * p.T - x) (2 * p.T) - max (p.T - x) p.T), - ENNReal.toReal_ofReal (by linarith [abs_nonneg x])] - linarith - have hb : ∀ τ' ∈ Icc p.T (2 * p.T) \ Ix p.T x, ‖muq κ q τ' ^ 2‖ ≤ A ^ 2 := - fun τ' hτ' => hsq_bound τ' hτ'.1 - have h := norm_setIntegral_le_of_norm_le_const (μ := volume) - (s := Icc p.T (2 * p.T) \ Ix p.T x) (f := fun τ' => muq κ q τ' ^ 2) - (lt_of_le_of_lt (measure_mono Set.sdiff_subset) - (by rw [Real.volume_Icc]; exact ENNReal.ofReal_lt_top)) hb - rw [Real.norm_eq_abs, hdvol] at h - exact h - refine (abs_sub_le _ (∫ τ' in Ix p.T x, muq κ q τ' ^ 2) _).trans ?_ - refine (add_le_add hlip hcomp).trans ?_ - nlinarith [abs_nonneg x, sq_nonneg x, mul_nonneg (mul_nonneg hA0 hK0) (abs_nonneg x)] - · rw [Ix_eq_empty hT0.le hx, Measure.restrict_empty, integral_zero_measure, zero_sub, - abs_neg, abs_of_nonneg hcnn] - refine hcle.trans ?_ - nlinarith [mul_nonneg (sq_nonneg A) (by linarith : (0 : ℝ) ≤ |x| - p.T), - mul_nonneg (mul_nonneg hA0 hK0) (abs_nonneg x), - mul_nonneg (mul_nonneg hA0 hK0) (sq_nonneg x)] - -/-- Core estimate of [prop:mumu]_chi at fixed (p, F). -/ -theorem mumu_core_chi (hΓq : GammaFactsChi κ q) (hF : LocalHypsCore cϱ p F) (hT2 : 2 ≤ p.T) - {A : ℝ} (hA0 : 0 ≤ A) - (hμl : ∀ τ ∈ Icc p.T (2 * p.T), |muq κ q τ| ≤ A) - {K : ℝ} (hK0 : 0 ≤ K) - (hKinc : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, - |muq κ q (t + r) - muq κ q t| ≤ K * (|r| + r ^ 2) / t) : - |Mform F.Phi p.T (muq κ q) (muq κ q) - - 2 * π * F.b * p.L * ∫ τ in p.T..(2 * p.T), muq κ q τ ^ 2| - ≤ (A ^ 2 + A * K) * (∫ x, F.Phi x ^ 2 * |x|) - + A * K * ∫ x, F.Phi x ^ 2 * x ^ 2 := by - have hμc : Continuous (muq κ q) := hΓq.smooth.continuous - have hΦc : Continuous F.Phi := hF.Phi_contDiff.continuous - have hGc : Continuous fun qq : ℝ × ℝ => muq κ q qq.1 * muq κ q qq.2 := by fun_prop - set c : ℝ := ∫ τ' in Icc p.T (2 * p.T), muq κ q τ' ^ 2 with hc - have hc' : ∫ τ in p.T..(2 * p.T), muq κ q τ ^ 2 = c := by - rw [intervalIntegral.integral_of_le (by linarith), hc, integral_Icc_eq_integral_Ioc] - have hshear : Mform F.Phi p.T (muq κ q) (muq κ q) - = ∫ x, F.Phi x ^ 2 * ∫ τ' in Ix p.T x, muq κ q (x + τ') * muq κ q τ' := by - unfold Mform - simp only [mul_assoc] - exact sqIntegral_shear hΦc hGc - have hfInt : Integrable (fun x => F.Phi x ^ 2 * ∫ τ' in Ix p.T x, - muq κ q (x + τ') * muq κ q τ') := integrable_sq_mul_inner hΦc hGc - have hgInt : Integrable (fun x => F.Phi x ^ 2 * c) := hF.Phi_sq_integrable.mul_const c - have hmain : 2 * π * F.b * p.L * c = ∫ x, F.Phi x ^ 2 * c := by - rw [integral_mul_const c (fun x => F.Phi x ^ 2), hF.Phi_sq_integral] - rw [hc', hshear, hmain, ← integral_sub hfInt hgInt] - have hpt : ∀ x : ℝ, |F.Phi x ^ 2 * (∫ τ' in Ix p.T x, muq κ q (x + τ') * muq κ q τ') - - F.Phi x ^ 2 * c| - ≤ (A ^ 2 + A * K) * (F.Phi x ^ 2 * |x|) + A * K * (F.Phi x ^ 2 * x ^ 2) := by - intro x - rw [← mul_sub, abs_mul, abs_of_nonneg (sq_nonneg (F.Phi x))] - have hinner := abs_inner_sub_le_chi hΓq hT2 hA0 hμl hK0 hKinc x - rw [← hc] at hinner - calc F.Phi x ^ 2 * |(∫ τ' in Ix p.T x, muq κ q (x + τ') * muq κ q τ') - c| - ≤ F.Phi x ^ 2 * ((A ^ 2 + A * K) * |x| + A * K * x ^ 2) := by - gcongr - _ = (A ^ 2 + A * K) * (F.Phi x ^ 2 * |x|) + A * K * (F.Phi x ^ 2 * x ^ 2) := by ring - calc |∫ x, (F.Phi x ^ 2 * (∫ τ' in Ix p.T x, muq κ q (x + τ') * muq κ q τ') - - F.Phi x ^ 2 * c)| - ≤ ∫ x, |F.Phi x ^ 2 * (∫ τ' in Ix p.T x, muq κ q (x + τ') * muq κ q τ') - - F.Phi x ^ 2 * c| := by - rw [← Real.norm_eq_abs] - refine (norm_integral_le_integral_norm _).trans (le_of_eq ?_) - simp_rw [Real.norm_eq_abs] - _ ≤ ∫ x, ((A ^ 2 + A * K) * (F.Phi x ^ 2 * |x|) + A * K * (F.Phi x ^ 2 * x ^ 2)) := - integral_mono (hfInt.sub hgInt).abs - ((hF.Phi_sq_mul_abs_integrable.const_mul _).add - (hF.Phi_sq_mul_sq_integrable.const_mul _)) hpt - _ = (A ^ 2 + A * K) * (∫ x, F.Phi x ^ 2 * |x|) - + A * K * ∫ x, F.Phi x ^ 2 * x ^ 2 := by - rw [integral_add (hF.Phi_sq_mul_abs_integrable.const_mul _) - (hF.Phi_sq_mul_sq_integrable.const_mul _), - integral_const_mul, integral_const_mul] - -end Core - -variable (cϱ lam : ℝ) +set_option linter.unusedVariables false in +/-- **[prop:mumu] for Dirichlet characters (Theorem E)**: +`𝓜[μ_χ, μ_χ] = 2π b L ∫_T^{2T} μ_χ² + O_{cϱ,κ,q}(l² log L)`. -/ +theorem prop_mumu_chi_proved {κ q : ℕ} {cϱ lam : ℝ} (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) + (hcheb : Zeta23.ChebyshevMertens) (hlam : 0 < lam ∧ lam ≤ 1) : + ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => + |Mform F.Phi p.T (muq κ q) (muq κ q) + - 2 * π * F.b * p.L * ∫ τ in p.T..(2 * p.T), muq κ q τ ^ 2| + ≤ C * (Zeta23.l p.T ^ 2 * Real.log p.L)) := by + obtain ⟨K, hK0, hKinc⟩ := muq_increment_bound hΓq hq + obtain ⟨Ca, T₀a, hCa0, hT₀a⟩ := muq_abs_le κ q hΓq hq + exact prop_mumu_gen cϱ lam hΓq.smooth.continuous hCa0.le hT₀a hK0 hK0 + (fun t ht r => by simpa [mul_add] using hKinc t ht r) set_option linter.unusedVariables false in -set_option maxHeartbeats 1000000 in -/-- [prop:mumu]_chi: the diagonal mu_chi evaluation with O_q(l^2 log L) error; proof of the -statement recorded in Zeta23/ThmE/PrimeSideChi.lean. -/ -theorem prop_mumu_chi {κ q : ℕ} {c : ℕ → ℂ} (hΓq : GammaFactsChi κ q) (hc : CoeffOK q c) - (hq : 1 ≤ q) (hlam : 0 < lam ∧ lam ≤ 1) : +/-- Interface-matching alias for `TracesChi` / `ThmDE`. -/ +theorem prop_mumu_chi {κ q : ℕ} {c : ℕ → ℂ} {cϱ lam : ℝ} (hΓq : GammaFactsChi κ q) + (_hc : CoeffOK q c) (hq : 1 ≤ q) (hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => |Mform F.Phi p.T (muq κ q) (muq κ q) - 2 * π * F.b * p.L * ∫ τ in p.T..(2 * p.T), muq κ q τ ^ 2| ≤ C * (Zeta23.l p.T ^ 2 * Real.log p.L)) := by obtain ⟨K, hK0, hKinc⟩ := muq_increment_bound hΓq hq obtain ⟨Ca, T₀a, hCa0, hT₀a⟩ := muq_abs_le κ q hΓq hq - refine ⟨(Ca ^ 2 + Ca * K) * (12 + 4 * max 0 (Real.log cϱ)) - + (Ca ^ 2 + Ca * K) * (8 + 2 * cϱ ^ 2), - max T₀a 2, fun p F hplam hT hF => ?_⟩ - have hT2 : 2 ≤ p.T := le_trans (le_max_right _ _) hT - have hμl := hT₀a p (le_trans (le_max_left _ _) hT) - have hl1 : 1 ≤ p.l := hF.one_le_l - have hl0 : (0 : ℝ) ≤ p.l := by linarith - have hA0 : (0 : ℝ) ≤ Ca * p.l := by positivity - have hcore := mumu_core_chi hΓq hF hT2 hA0 hμl hK0 hKinc - have hI1 := hF.integral_Phi_sq_mul_abs_le - have hI2 := hF.integral_Phi_sq_mul_sq_le - have hL8 : 8 ≤ p.L := hF.eight_le_L - have hlog2 : 2 ≤ Real.log p.L := by - rw [Real.le_log_iff_exp_le (by linarith)] - have h1 := Real.exp_one_lt_d9 - calc Real.exp 2 = Real.exp 1 * Real.exp 1 := by rw [← Real.exp_add]; norm_num - _ ≤ 2.7182818286 * 2.7182818286 := by nlinarith [Real.exp_pos 1] - _ ≤ 8 := by norm_num - _ ≤ p.L := hL8 - have hlogpos : 0 < Real.log p.L := by linarith - have hcϱ4 : 4 ≤ cϱ := hF.four_le_cϱ - have hw1 : 1 ≤ p.w := hF.one_le_w - have hm0 : 0 ≤ max 0 (Real.log cϱ) := le_max_left _ _ - have hA : ∫ x, F.Phi x ^ 2 * |x| ≤ (12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L := by - refine hI1.trans ?_ - have hlogbound : Real.log (cϱ * p.L / (4 * p.w)) ≤ max 0 (Real.log cϱ) + Real.log p.L := by - calc Real.log (cϱ * p.L / (4 * p.w)) ≤ Real.log (cϱ * p.L) := by - apply Real.log_le_log (by positivity) - apply div_le_self (by positivity) - linarith - _ = Real.log cϱ + Real.log p.L := Real.log_mul (by positivity) (by positivity) - _ ≤ max 0 (Real.log cϱ) + Real.log p.L := by - have := le_max_right (0 : ℝ) (Real.log cϱ) - linarith - have h8 : 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) - ≤ 8 + 8 * (max 0 (Real.log cϱ) + Real.log p.L) := by linarith - refine h8.trans ?_ - nlinarith [mul_nonneg hm0 (by linarith : (0 : ℝ) ≤ Real.log p.L - 2)] - have hB : ∫ x, F.Phi x ^ 2 * x ^ 2 ≤ 8 + 2 * cϱ ^ 2 := by - refine hI2.trans ?_ - have hdiv : cϱ / p.w ≤ cϱ := div_le_self (by linarith) hw1 - have hdivnn : 0 ≤ cϱ / p.w := by positivity - nlinarith - have hI1nn : 0 ≤ ∫ x, F.Phi x ^ 2 * |x| := integral_nonneg fun x => by positivity - have hI2nn : 0 ≤ ∫ x, F.Phi x ^ 2 * x ^ 2 := integral_nonneg fun x => by positivity - refine hcore.trans ?_ - have hAK0 : (0 : ℝ) ≤ (Ca * p.l) ^ 2 + (Ca * p.l) * K := by positivity - have hstep : ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * (∫ x, F.Phi x ^ 2 * |x|) - + (Ca * p.l) * K * (∫ x, F.Phi x ^ 2 * x ^ 2) - ≤ ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * ((12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L) - + ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * (8 + 2 * cϱ ^ 2) := by - have h1 : ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * (∫ x, F.Phi x ^ 2 * |x|) - ≤ ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * ((12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L) := - mul_le_mul_of_nonneg_left hA hAK0 - have h2 : (Ca * p.l) * K * (∫ x, F.Phi x ^ 2 * x ^ 2) - ≤ ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * (8 + 2 * cϱ ^ 2) := by - have h3 : (Ca * p.l) * K * (∫ x, F.Phi x ^ 2 * x ^ 2) - ≤ (Ca * p.l) * K * (8 + 2 * cϱ ^ 2) := - mul_le_mul_of_nonneg_left hB (by positivity) - refine h3.trans ?_ - have : (0 : ℝ) ≤ (Ca * p.l) ^ 2 := sq_nonneg _ - nlinarith [sq_nonneg (Ca * p.l), mul_nonneg (by positivity : (0:ℝ) ≤ 8 + 2 * cϱ ^ 2) - (sq_nonneg (Ca * p.l))] - linarith - refine hstep.trans ?_ - -- fold into C * (l^2 log L), using l >= 1, log L >= 2, and l = Zeta23.l p.T - have hleq : p.l = Zeta23.l p.T := rfl - have hl2 : (1 : ℝ) ≤ p.l ^ 2 := by nlinarith - have hKCa : (0:ℝ) ≤ Ca * K := by positivity - have hCK : ((Ca * p.l) ^ 2 + (Ca * p.l) * K) - ≤ (Ca ^ 2 + Ca * K) * p.l ^ 2 := by - have : (Ca * p.l) * K ≤ Ca * K * p.l ^ 2 := by - nlinarith [mul_nonneg hKCa (by nlinarith : (0:ℝ) ≤ p.l ^ 2 - p.l)] - nlinarith [sq_nonneg (Ca * p.l)] - have hCK0 : (0:ℝ) ≤ Ca ^ 2 + Ca * K := by positivity - have h12m : (0 : ℝ) ≤ 12 + 4 * max 0 (Real.log cϱ) := by positivity - have h82 : (0 : ℝ) ≤ 8 + 2 * cϱ ^ 2 := by positivity - rw [← hleq] - calc ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * ((12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L) - + ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * (8 + 2 * cϱ ^ 2) - ≤ (Ca ^ 2 + Ca * K) * p.l ^ 2 * ((12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L) - + (Ca ^ 2 + Ca * K) * p.l ^ 2 * ((8 + 2 * cϱ ^ 2) * Real.log p.L) := by - have ha := mul_le_mul_of_nonneg_right hCK - (by positivity : (0:ℝ) ≤ (12 + 4 * max 0 (Real.log cϱ)) * Real.log p.L) - have hb2 : ((Ca * p.l) ^ 2 + (Ca * p.l) * K) * (8 + 2 * cϱ ^ 2) - ≤ (Ca ^ 2 + Ca * K) * p.l ^ 2 * ((8 + 2 * cϱ ^ 2) * Real.log p.L) := by - have h1 := mul_le_mul_of_nonneg_right hCK h82 - refine h1.trans ?_ - have h2 : (1:ℝ) ≤ Real.log p.L := by linarith - calc (Ca ^ 2 + Ca * K) * p.l ^ 2 * (8 + 2 * cϱ ^ 2) - ≤ (Ca ^ 2 + Ca * K) * p.l ^ 2 * (8 + 2 * cϱ ^ 2) * Real.log p.L := - le_mul_of_one_le_right (by positivity) h2 - _ = (Ca ^ 2 + Ca * K) * p.l ^ 2 * ((8 + 2 * cϱ ^ 2) * Real.log p.L) := by ring - linarith - _ = ((Ca ^ 2 + Ca * K) * (12 + 4 * max 0 (Real.log cϱ)) - + (Ca ^ 2 + Ca * K) * (8 + 2 * cϱ ^ 2)) * (p.l ^ 2 * Real.log p.L) := by - ring + exact prop_mumu_gen cϱ lam hΓq.smooth.continuous hCa0.le hT₀a hK0 hK0 + (fun t ht r => by simpa [mul_add] using hKinc t ht r) end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/Mult.lean b/zeta23/Zeta23/ThmE/Mult.lean index 5cd648bfc6..b282cff903 100644 --- a/zeta23/Zeta23/ThmE/Mult.lean +++ b/zeta23/Zeta23/ThmE/Mult.lean @@ -41,249 +41,39 @@ theorem moments_of_traces_chi : (∀ δ > (0:ℝ), ∀ᶠ T in atTop, frobSq (P.hat T (Z.Gz P T)) ≤ (kfun P.lam + δ) * (Z.N T (2 * T) : ℝ)) := by have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - have hw0 : 0 ≤ P.w := zero_le_one.trans hP.one_le_w - have hcalE := calE_tendsto_zero P hlam0 hlam1 hw0 - obtain ⟨C₁, hC₁, T₁, htr1⟩ := hTr.tr1 - obtain ⟨C₂, hC₂, T₂, htr2⟩ := hTr.tr2 - obtain ⟨CN, T₃, hRvM'⟩ := hRvM.main - set N : ℝ → ℝ := fun T => (Z.N T (2 * T) : ℝ) with hNdef - set cl : ℝ → ℝ := fun T => 1 / lam1q P q T + lam1q P q T / 3 with hcl - set K : ℝ → ℝ := fun T => (1 + C₂ * P.calE T) / P.a T ^ 2 with hK - set R₁ : ℝ → ℝ := fun T => C₁ * Real.sqrt (P.X T) / P.a T with hR₁ - set R₂ : ℝ → ℝ := fun T => cl T * ((K T - 1) * N T + K T * (|CN| * Real.log T)) with hR₂ - have hLtop := tendsto_L_atTop P hlam0 - have ha1 := tendsto_a_one P hlam0 ha - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hcE0 : Tendsto (fun T => C₂ * P.calE T) atTop (𝓝 0) := by - simpa using hcalE.const_mul C₂ - have hKto : Tendsto K atTop (𝓝 1) := by - have h1 : Tendsto (fun T => 1 + C₂ * P.calE T) atTop (𝓝 1) := by - simpa using tendsto_const_nhds.add hcE0 - have h2 : Tendsto (fun T => P.a T ^ 2) atTop (𝓝 1) := by simpa using ha1.pow 2 - simpa [hK, Pi.div_def] using h1.div h2 one_ne_zero - -- pointwise: seam B at every large T - have hpt : ∀ᶠ T in atTop, |rtrace (P.hat T (Z.Gz P T)) - N T| ≤ R₁ T ∧ - frobSq (P.hat T (Z.Gz P T)) ≤ cl T * N T + R₂ T := by - filter_upwards [hGzGp, hapos, eventually_ge_atTop T₁, eventually_ge_atTop T₂, - eventually_ge_atTop T₃, eventually_gt_atTop (0:ℝ), eventually_l_pos, eventually_log_nonneg, - hcE0.eventually (eventually_gt_nhds (show (-1:ℝ) < 0 by norm_num))] - with T hGG ha2 hT₁ hT₂ hT₃ hT0 hl hlog hcE - have hapos' : 0 < P.a T := by linarith - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hℓ₁ : 0 < ell1q q T := ell1q_pos hq hT0 hl - have hKnn : 0 ≤ 1 + C₂ * P.calE T := by linarith - have htr2' : trGtildeSqChi P κ q cf T - mainTr2Chi P q T - ≤ C₂ * P.calE T * mainTr2Chi P q T := by - have := htr2 T hT₂ - simp only at this - rw [← mul_assoc] at this - exact (le_abs_self _).trans this - have htr1' : |trGtildeChi P κ q cf T - P.a T * P.L T * (Z.N T (2 * T) : ℝ)| - ≤ C₁ * (P.L T * Real.sqrt (P.X T)) := by - have := htr1 T hT₁; simpa only using this - have hRvM'' : T * ell1q q T / (2 * Real.pi) ≤ N T + |CN| * Real.log T := by - have h1 := (abs_le.mp (hRvM' T hT₃)).1 - have h2 : CN * Real.log T ≤ |CN| * Real.log T := - mul_le_mul_of_nonneg_right (le_abs_self _) hlog - have h3 : T / (2 * Real.pi) * ell1q q T = T * ell1q q T / (2 * Real.pi) := by ring - simp only [hNdef]; linarith - have hSB := seamBChi P κ q cf hGG hapos' hLpos hℓ₁ htr1' hKnn htr2' hRvM'' - refine ⟨?_, ?_⟩ - · simpa only [hR₁, hNdef] using hSB.1 - · have := hSB.2 - simp only [hR₂, hcl, hK, hNdef] at this ⊢ - linarith - -- R₁, R₂ = o(N) (as in Assembly.thmA_abstract_err) - have o1 : R₁ =o[atTop] N := by - have hbd : (fun T => C₁ / P.a T) =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 * C₁) ?_ - filter_upwards [hapos] with T ha2 - rw [abs_of_nonneg (div_nonneg hC₁.le (by linarith))] - rw [div_le_iff₀ (by linarith)]; nlinarith - have := isLittleO_of_bdd_mul hbd - (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM (isLittleO_sqrtX_Tl P hlam0 hlam1)) - exact this.congr_left fun T => by simp only [hR₁]; ring - have o2 : R₂ =o[atTop] N := by - have hclO : cl =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2 / P.lam + 1 / 3) ?_ - filter_upwards [eventually_clam_bounds_chi q P hq hlam0 hlam1] with T h - rw [abs_of_nonneg h.1]; exact h.2 - have hK1 : Tendsto (fun T => K T - 1) atTop (𝓝 0) := by simpa using hKto.sub_const 1 - have hKO : K =O[atTop] (fun _ => (1:ℝ)) := by - refine isBigO_one_of_abs_le (C := 2) ?_ - filter_upwards [hKto.eventually (eventually_ge_nhds (show (0:ℝ) < 1 by norm_num)), - hKto.eventually (eventually_le_nhds (show (1:ℝ) < 2 by norm_num))] with T h1 h2 - rw [abs_of_nonneg h1]; exact h2 - have i1 : (fun T => (K T - 1) * N T) =o[atTop] N := isLittleO_of_tendsto_zero_mul hK1 - have i2 : (fun T => K T * (|CN| * Real.log T)) =o[atTop] N := - isLittleO_of_bdd_mul hKO ((isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_log_Tl).const_mul_left _) - exact isLittleO_of_bdd_mul hclO (i1.add i2) - -- cl → κ(λ) - have hclto : Tendsto cl atTop (𝓝 (kfun P.lam)) := by - have hl1 := ThmDE.tendsto_lam1q (P := P) hP hq - simp only [hcl, kfun] - exact ((tendsto_const_nhds.div hl1 hlam0.ne')).add (hl1.div_const 3) - have hNtop : Tendsto N atTop atTop := tendsto_N_atTop_chi q Z hq hRvM - refine ⟨fun δ hδ => ?_, fun δ hδ => ?_⟩ - · filter_upwards [hpt, o1.def hδ, hNtop.eventually_ge_atTop 0] with T h h1 hN0 - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg hN0] at h1 - have := (abs_le.mp h.1).1 - have : R₁ T ≤ δ * N T := (le_abs_self _).trans h1 - simp only [hNdef] at * - linarith - · have hδ2 : 0 < δ / 2 := by linarith - filter_upwards [hpt, o2.def hδ2, hNtop.eventually_ge_atTop 0, - hclto.eventually (eventually_le_nhds (show kfun P.lam < kfun P.lam + δ / 2 by linarith))] - with T h h2 hN0 hcl2 - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg hN0] at h2 - have hR₂ : R₂ T ≤ δ / 2 * N T := (le_abs_self _).trans h2 - have hclN : cl T * N T ≤ (kfun P.lam + δ / 2) * N T := mul_le_mul_of_nonneg_right hcl2 hN0 - simp only [hNdef] at * - linarith [h.2] + refine moments_of_traces_core Z P hP hlam ha (lam1q P q) (ell1q q) + (trGtildeChi P κ q cf) (trGtildeSqChi P κ q cf) (mainTr2Chi P q) + hTr.tr1 hTr.tr2 hRvM.main + ((eventually_gt_atTop (0:ℝ)).and eventually_l_pos |>.mono fun _ ⟨h0, hl⟩ => ell1q_pos hq h0 hl) + (hGzGp.mono fun T hGG _ _ _ ha0 hL0 hl0 h1 hcE h2 h3 => by + have hSB := seamBChi P κ q cf hGG ha0 hL0 hl0 h1 hcE h2 h3; exact ⟨hSB.1, by linarith [hSB.2]⟩) + ?_ ?_ (tendsto_N_atTop_chi q Z hq hRvM) (fun _ => isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM) + · refine isBigO_one_of_abs_le (C := 2 / P.lam + 1 / 3) ?_ + filter_upwards [eventually_clam_bounds_chi q P hq hlam0 hlam.le] with T h + rw [abs_of_nonneg h.1]; exact h.2 + · have hl1 := ThmDE.tendsto_lam1q (P := P) hP hq + simp only [kfun] + exact (tendsto_const_nhds (x := (1:ℝ)).div hl1 hlam0.ne').add (hl1.div_const 3) end Moments section Abstract -variable (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) (hRvM : RiemannVonMangoldtChi q Z) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) - (hTr : ThmTracesHypChi P κ q cf Z) - (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = GpChi P κ q cf T) - -include hq hRvM hP hlam hTr hGzGp in -/-- **multiplicity-aware Theorem B at fixed λ ∈ (0,1)**: N₀ˢ(T,2T) ≥ (H(λ) − ε)·N(T,2T). -/ -theorem thmBmult_chi_abstract : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Hfun P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le +/-- **multiplicity-aware Theorems B and C at fixed λ ∈ (0,1)** for a χ-configuration. -/ +theorem thmBCmult_chi_abstract (Z : ZeroConfig) (κ : ℕ) {q : ℕ} (hq : 1 ≤ q) (cf : ℕ → ℂ) + (hRvM : RiemannVonMangoldtChi q Z) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) + (hTr : ThmTracesHypChi P κ q cf Z) + (hGzGp : ∀ᶠ T in atTop, Z.Gz P T = GpChi P κ q cf T) : + DyadicLowerBound (Hfun P.lam) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) ∧ + DyadicLowerBound (Gfun P.lam) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := by obtain ⟨θ₀, hTail, Cθ, hθ⟩ := tailPackageChi Z hRvM P hP - obtain ⟨CII, hII⟩ := NIIChi Z hRvM have ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1 := by filter_upwards [(Tail.tendsto_L_atTop _ hP).eventually_ge_atTop (8 * P.w)] with T hwL exact ⟨(Params.one_sub_le_b hP hwL).trans (Params.b_le_a hP hwL), Params.a_le_one hP hwL⟩ obtain ⟨htrace, hfrob⟩ := moments_of_traces_chi Z κ hq cf hRvM P hP hlam hTr hGzGp ha - have hLtop := tendsto_L_atTop P hlam0 - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := hLtop.eventually_ge_atTop _ - -- the c = 2 seam, eventually - have h0 : ∀ᶠ T in atTop, 4 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - - 2 * (Z.N T (2 * T) : ℝ) - 3 * (NII Z T : ℝ) - - θ₀ T / (P.a T * P.L T) - * (4 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) - ≤ (Z.N0s T (2 * T) : ℝ) := by - filter_upwards [hTail, hwL, hapos, eventually_ge_atTop (0:ℝ), eventually_l_pos] - with T hTl h8 ha2 hT0 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact seamA_mult2 hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal (ZeroSide.poissonSq hP h8) hTl - (by linarith) hLpos - have hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T) := by - filter_upwards [hTail, hapos, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by positivity) - have hBto : Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup hB0 ?_ - filter_upwards [hTail, hapos, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < P.a T := by linarith - have hq' : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (P.a T * P.L T) := by - have e : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [e]; gcongr - have hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_sqrt_mul_l_Tl) - have hNtop := tendsto_N_atTop_chi q Z hq hRvM - have h := count_certificate Z P (kfun P.lam) (fun T => (Z.N0s T (2 * T) : ℝ)) θ₀ h0 hB0 hBto - hNII_o hNtop htrace hfrob - simpa only [Hfun_eq_two_sub_kfun] using h - -include hq hRvM hP hlam hTr hGzGp in -/-- **multiplicity-aware Theorem C at fixed λ ∈ (0,1)**: N_d(T,2T) ≥ (G(λ) − ε)·N(T,2T), -G(λ) = 3/2 − κ(λ)/2. -/ -theorem thmCmult_chi_abstract : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (Gfun P.lam - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨θ₀, hTail, Cθ, hθ⟩ := tailPackageChi Z hRvM P hP - obtain ⟨CII, hII⟩ := NIIChi Z hRvM - have ha : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ P.a T ∧ P.a T ≤ 1 := by - filter_upwards [(Tail.tendsto_L_atTop _ hP).eventually_ge_atTop (8 * P.w)] with T hwL - exact ⟨(Params.one_sub_le_b hP hwL).trans (Params.b_le_a hP hwL), Params.a_le_one hP hwL⟩ - obtain ⟨htrace, hfrob⟩ := moments_of_traces_chi Z κ hq cf hRvM P hP hlam hTr hGzGp ha - have hLtop := tendsto_L_atTop P hlam0 - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := hLtop.eventually_ge_atTop _ - have h0 : ∀ᶠ T in atTop, 6 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - - 3 * (Z.N T (2 * T) : ℝ) - 5 * (NII Z T : ℝ) - - θ₀ T / (P.a T * P.L T) - * (6 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) - ≤ 2 * (Z.Nd T (2 * T) : ℝ) := by - filter_upwards [hTail, hwL, hapos, eventually_ge_atTop (0:ℝ), eventually_l_pos] - with T hTl h8 ha2 hT0 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact seamA_mult3 hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal (ZeroSide.poissonSq hP h8) hTl - (by linarith) hLpos - have hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T) := by - filter_upwards [hTail, hapos, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by positivity) - have hBto : Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup hB0 ?_ - filter_upwards [hTail, hapos, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < P.a T := by linarith - have hq' : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (P.a T * P.L T) := by - have e : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [e]; gcongr - have hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM isLittleO_sqrt_mul_l_Tl) - have hNtop := tendsto_N_atTop_chi q Z hq hRvM - have h := count_certificate_c3 Z P (kfun P.lam) (fun T => (Z.Nd T (2 * T) : ℝ)) θ₀ h0 hB0 hBto - hNII_o hNtop htrace hfrob - simpa only [Gfun] using h + simpa only [Hfun_eq_two_sub_kfun, Gfun] using multBC_of_moments Z P hP hlam (kfun P.lam) ha + hTail ⟨Cθ, hθ⟩ (NIIChi Z hRvM) (tendsto_N_atTop_chi q Z hq hRvM) + (fun _ => isLittleO_N_of_isLittleO_Tl_chi q Z hq hRvM) htrace hfrob end Abstract @@ -293,49 +83,33 @@ section Dirichlet variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} -/-- multiplicity-aware Theorem E/B at fixed λ ∈ (0,1): (H(λ) − ε)·N_χ ≤ N^s_{0,χ}, UNCONDITIONAL. -/ -theorem thmE_B_mult_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) - (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Hfun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := by - have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le - have H := paperInputsChi_L hq hprim - have hTr := thm_traces_chi hP (by omega) (coeffUnimodular_of_primitive hq hprim) H - (PrimeSide.localHypsEventually hP) - have hGzGp := eventually_GzGpChi _ hP H.EF - simpa [paramsOf] using thmBmult_chi_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) (coeff χ) - H.RvM (paramsOf stdProfile lam) hP h1 hTr hGzGp - -/-- multiplicity-aware Theorem E/C at fixed λ ∈ (0,1): (G(λ) − ε)·N_χ ≤ N_{d,χ}, UNCONDITIONAL. -/ -theorem thmE_C_mult_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) +private theorem thmE_BC_mult_lam (hq : 1 < q) (hprim : χ.IsPrimitive) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (Gfun lam - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := by + DyadicLowerBound (Hfun lam) (fun T => N0simpleL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) ∧ + DyadicLowerBound (Gfun lam) (fun T => NdistL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := by have hP := paramsOf_valid taperProfile_stdProfile h0 h1.le have H := paperInputsChi_L hq hprim have hTr := thm_traces_chi hP (by omega) (coeffUnimodular_of_primitive hq hprim) H (PrimeSide.localHypsEventually hP) have hGzGp := eventually_GzGpChi _ hP H.EF - simpa [paramsOf] using thmCmult_chi_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) (coeff χ) - H.RvM (paramsOf stdProfile lam) hP h1 hTr hGzGp + simpa [paramsOf] using thmBCmult_chi_abstract (LZeros (LSeam_of hq hprim)) (parity χ) (by omega) + (coeff χ) H.RvM (paramsOf stdProfile lam) hP h1 hTr hGzGp /-- **At least 2/3 of the zeros of L(s,χ) are SIMPLE AND ON THE CRITICAL LINE, UNCONDITIONAL** (every primitive χ mod q > 1; as stated in [thm:E]). -/ theorem thmE_B₀_mult (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 / 3 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ N0simpleL χ T (2 * T) := + DyadicLowerBound (2 / 3) (fun T => N0simpleL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := eps_form_twoThirds (N := fun T => (NcountL χ T (2 * T) : ℝ)) (lower := fun T => (N0simpleL χ T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) - fun lam hl1 hl2 => thmE_B_mult_lam hq hprim (by linarith) hl2 + fun _ hl1 hl2 => (thmE_BC_mult_lam hq hprim (by linarith) hl2).1 /-- **At least 5/6 of the zeros of L(s,χ) are DISTINCT, UNCONDITIONAL** (every primitive χ mod q > 1; as stated in [thm:E]). -/ theorem thmE_C₀_mult (hq : 1 < q) (hprim : χ.IsPrimitive) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (5 / 6 - ε) * (NcountL χ T (2 * T) : ℝ) ≤ NdistL χ T (2 * T) := + DyadicLowerBound (5 / 6) (fun T => NdistL χ T (2 * T)) (fun T => NcountL χ T (2 * T)) := eps_form_fiveSixths (N := fun T => (NcountL χ T (2 * T) : ℝ)) (lower := fun T => (NdistL χ T (2 * T) : ℝ)) (fun _ => Nat.cast_nonneg _) - fun lam hl1 hl2 => thmE_C_mult_lam hq hprim (by linarith) hl2 + fun _ hl1 hl2 => (thmE_BC_mult_lam hq hprim (by linarith) hl2).2 end Dirichlet diff --git a/zeta23/Zeta23/ThmE/PPChi.lean b/zeta23/Zeta23/ThmE/PPChi.lean index db2e3d5296..d0576e46ad 100644 --- a/zeta23/Zeta23/ThmE/PPChi.lean +++ b/zeta23/Zeta23/ThmE/PPChi.lean @@ -7,32 +7,14 @@ SPDX-License-Identifier: Apache-2.0 Part of the Zeta23 formalization of the paper "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". -/ -import Zeta23.PrimeSideB.PPKernel import Zeta23.PrimeSideB.PP -import Zeta23.ThmE.Hypotheses import Zeta23.ThmE.PrimeSideChi /-! # [prop:PP] for L(s,chi) -[thm:E] proof (iii) (§8.2): "the coefficients a_n acquire unimodular factors chi(n)n^{i.}, which -leave the diagonal D unchanged (|chi(n)|^2 = 1) and enter Lemma lem:MV and all other bounds only -through |a_n|". This file proves that sentence for [prop:PP]: - -* prop_PP_chi: |M[P_{X,c}, P_{X,c}] − (T/pi)·sumA2gCoprime| ≤ C·L²X, over EventuallyAtCore - (window-generic: no flat-top plateau fact used); hypotheses H-cheb + H-MV + CoeffUnimodular - (unimodularity used EXACTLY once: the diagonal main term a_n²·normSq(c n)). -* sumA2gCoprime_upper (over EventuallyAtCore) and sumA2gCoprime_lower (over the FULL EventuallyAt: - the lower g-sandwich needs LocalHyps.g_lower, which LocalHypsCore deliberately lacks — the - Montgomery–Taylor window case supplies its own analogue), from H-cheb-coprime. - -Route (magnitude/phase): write c n = r_n·exp(i·phi_n), -r_n := norm (c n), phi_n := arg (c n), so P_{X,c}(tau) = −(1/pi)·Sum_n a_n·r_n·cos(tau·log n − phi_n) -— ONE family of phase-shifted cosines. The PPKernel pair decomposition generalizes by a single -phase parameter (Jker already carries an arbitrary constant): AminusPh/AplusPh below. On the -diagonal the phase difference vanishes and AminusPh = Aminus, giving the zeta diagonal with weight -r_n²; the off-diagonal [lem:MV] application takes x_n with norm x_n ≤ a_n ("only through |a_n|"); -the O2 bound is phase-free. +Corollary of `PrimeSide.prop_PP_vonMangoldt_bound` (`PrimeSideB/PP.lean`) and the filtered +`g`-sandwiches `sum_a2g_upper_filter` / `sum_a2g_lower_filter`. -/ noncomputable section @@ -47,8 +29,7 @@ open Zeta23.PrimeSide variable {cϱ lam : ℝ} {q : ℕ} {c : ℕ → ℂ} -/-- Sum_{n ≤ X, (n,q)=1} Lambda(n)²/n · g(log n) — the [prop:PP] main-term sum for L(s,chi) -(index set = ChebyshevMertensCoprime's). -/ +/-- `Σ_{n ≤ X, (n,q)=1} Λ(n)²/n · g(log n)` — the `[prop:PP]` main-term sum for `L(s, χ)`. -/ def sumA2gCoprime (q : ℕ) (X : ℝ) (g : ℝ → ℝ) : ℝ := ∑ n ∈ (Finset.Ioc 0 ⌊X⌋₊).filter (fun n => Nat.Coprime n q), (Λ n : ℝ) ^ 2 / n * g (Real.log n) @@ -61,938 +42,52 @@ lemma sum_w_eq_sumA2gCoprime (hc : CoeffUnimodular q c) (X : ℝ) (g : ℝ → refine Finset.sum_congr rfl fun n hn => ?_ have hn0 : 0 < n := (Finset.mem_Ioc.mp hn).1 by_cases hcop : Nat.Coprime n q - · rw [if_pos hcop, hc.norm_eq n hn0 hcop, acoef_sq] - ring - · rw [if_neg hcop, hc.toCoeffOK.vanish n hcop] - simp - -section PhaseKernel -variable {Φ : ℝ → ℝ} {T : ℝ} - -/-- A⁻ with phases. -/ -def AminusPh (Φ : ℝ → ℝ) (T y y' φ φ' : ℝ) : ℝ := - ∫ x in Icc (-T) T, - Φ x ^ 2 * Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) - -/-- A⁺ with phases. -/ -def AplusPh (Φ : ℝ → ℝ) (T y y' φ φ' : ℝ) : ℝ := - ∫ x in Icc (-T) T, - Φ x ^ 2 * Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) - -/-- Equal phases: AminusPh = Aminus (the diagonal case). -/ -lemma AminusPh_self (y y' φ : ℝ) : AminusPh Φ T y y' φ φ = Aminus Φ T y y' := by - unfold AminusPh Aminus JmK - simp only [sub_self, sub_zero] - -/-- Continuity of the phased Jker integrand in x (mirror of continuous_Jker_offset). -/ -lemma continuous_Jker_offset_ph (θ y ψ T : ℝ) : - Continuous (fun x : ℝ => - Jker θ (x * y - ψ) (max (T - x) T) (min (2 * T - x) (2 * T))) := by - by_cases hθ : θ = 0 - · simp only [Jker, hθ, if_true]; fun_prop - · simp only [Jker, hθ, if_false]; fun_prop - -/-- Product-to-sum with phases on the sheared window (mirror of inner_cos_cos). -/ -lemma inner_cos_cos_ph (hT : 0 ≤ T) {x : ℝ} (hx : |x| ≤ T) (y y' φ φ' : ℝ) : - ∫ τ' in Ix T x, Real.cos ((x + τ') * y - φ) * Real.cos (τ' * y' - φ') - = (Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) - + Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) / 2 := by - have hle := Ix_le hT hx - unfold Ix - rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hle, - ← intervalIntegral_cos_linear_eq_Jker, ← intervalIntegral_cos_linear_eq_Jker, - ← intervalIntegral.integral_add (by apply Continuous.intervalIntegrable; fun_prop) - (by apply Continuous.intervalIntegrable; fun_prop), - ← intervalIntegral.integral_div] - apply intervalIntegral.integral_congr - intro t _ - simp only - rw [cos_mul_cos_eq] - congr 2 <;> (congr 1; ring) - -end PhaseKernel - - -section PhasePair -variable {Φ : ℝ → ℝ} {T : ℝ} - -/-- [eq:MPP] per pair with phases: for T ≥ 0, -M[cos(·y − φ), cos(·y' − φ')] = ½ A⁻_ph + ½ A⁺_ph. -/ -lemma Mform_cos_cos_ph (hT : 0 ≤ T) (hΦ : Continuous Φ) (y y' φ φ' : ℝ) : - Mform Φ T (fun τ => Real.cos (τ * y - φ)) (fun τ => Real.cos (τ * y' - φ')) - = (AminusPh Φ T y y' φ φ' + AplusPh Φ T y y' φ φ') / 2 := by - unfold Mform AminusPh AplusPh - have h1 : (fun q : ℝ × ℝ => Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * y - φ) * Real.cos (q.2 * y' - φ')) - = fun q => Φ (q.1 - q.2) ^ 2 * - (fun q : ℝ × ℝ => Real.cos (q.1 * y - φ) * Real.cos (q.2 * y' - φ')) q := by - funext q; ring - rw [h1, sqIntegral_shear hΦ (by fun_prop)] - rw [← setIntegral_eq_integral_of_forall_compl_eq_zero (s := Icc (-T) T) ?zero] - case zero => - intro x hx - rw [Ix_eq_empty hT (not_mem_Icc_neg hx)]; simp - have h2 : ∀ x ∈ Icc (-T) T, - Φ x ^ 2 * ∫ τ' in Ix T x, Real.cos ((x + τ') * y - φ) * Real.cos (τ' * y' - φ') - = (Φ x ^ 2 * Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) - + Φ x ^ 2 * Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) / 2 := by - intro x hx - rw [inner_cos_cos_ph hT (abs_le.mpr ⟨by linarith [hx.1], hx.2⟩)] - ring - rw [setIntegral_congr_fun measurableSet_Icc h2, integral_div, integral_add] - · exact ((hΦ.pow 2).mul (continuous_Jker_offset_ph _ _ _ _)).integrableOn_Icc - · exact ((hΦ.pow 2).mul (continuous_Jker_offset_ph _ _ _ _)).integrableOn_Icc - -/-- O₂-type bound, phase-free (mirror of abs_Aplus_le): for 0 < y + y', -|A⁺_ph(y,y',φ,φ')| ≤ (2/(y+y'))·∫Φ². -/ -lemma abs_AplusPh_le (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) {y y' : ℝ} - (hyy : 0 < y + y') (φ φ' : ℝ) : - |AplusPh Φ T y y' φ φ'| ≤ 2 / (y + y') * ∫ x, Φ x ^ 2 := by - unfold AplusPh - have hne : y + y' ≠ 0 := hyy.ne' - have hint : IntegrableOn (fun x => Φ x ^ 2 * - Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) (Icc (-T) T) := - ((hΦ.pow 2).mul (continuous_Jker_offset_ph _ _ _ _)).integrableOn_Icc - calc |∫ x in Icc (-T) T, Φ x ^ 2 * - Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))| - ≤ ∫ x in Icc (-T) T, |Φ x ^ 2 * - Jker (y + y') (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T))| := - abs_integral_le_integral_abs - _ ≤ ∫ x in Icc (-T) T, Φ x ^ 2 * (2 / (y + y')) := by - apply setIntegral_mono_on hint.abs (hΦ2.integrableOn.mul_const _) measurableSet_Icc - intro x _ - rw [abs_mul, abs_of_nonneg (sq_nonneg _)] - refine mul_le_mul_of_nonneg_left ?_ (sq_nonneg _) - have h := abs_Jker_le hne (x * y - (φ + φ')) (max (T - x) T) (min (2 * T - x) (2 * T)) - rwa [abs_of_pos hyy] at h - _ = 2 / (y + y') * ∫ x in Icc (-T) T, Φ x ^ 2 := by rw [integral_mul_const]; ring - _ ≤ 2 / (y + y') * ∫ x, Φ x ^ 2 := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - exact setIntegral_le_integral hΦ2 (Filter.Eventually.of_forall fun x => sq_nonneg _) - -end PhasePair - -section PhaseO1 -variable {Φ : ℝ → ℝ} {T : ℝ} - -/-- O₁-type exact evaluation with phases (mirror of sub_mul_Aminus_eq): for θ := y − y' ≠ 0, T ≥ 0, -ψ := φ − φ': -θ·A⁻_ph(y,y',φ,φ') = [sin(θ2T−ψ)C⁻(y) + cos(θ2T−ψ)S⁻(y) − (sin(θT−ψ)C⁻(y') + cos(θT−ψ)S⁻(y'))] - + [sin(θ2T−ψ)C⁺(y') + cos(θ2T−ψ)S⁺(y') − (sin(θT−ψ)C⁺(y) + cos(θT−ψ)S⁺(y))]. -/ -lemma sub_mul_AminusPh_eq (hT : 0 ≤ T) (hΦ : Continuous Φ) {y y' : ℝ} (hθ : y - y' ≠ 0) - (φ φ' : ℝ) : - (y - y') * AminusPh Φ T y y' φ φ' - = (Real.sin ((y - y') * (2 * T) - (φ - φ')) * Cm Φ T y - + Real.cos ((y - y') * (2 * T) - (φ - φ')) * Sm Φ T y - - (Real.sin ((y - y') * T - (φ - φ')) * Cm Φ T y' - + Real.cos ((y - y') * T - (φ - φ')) * Sm Φ T y')) - + (Real.sin ((y - y') * (2 * T) - (φ - φ')) * Cp Φ T y' - + Real.cos ((y - y') * (2 * T) - (φ - φ')) * Sp Φ T y' - - (Real.sin ((y - y') * T - (φ - φ')) * Cp Φ T y - + Real.cos ((y - y') * T - (φ - φ')) * Sp Φ T y)) := by - unfold AminusPh Cm Sm Cp Sp - have hcont : Continuous fun x => Φ x ^ 2 * ((y - y') * - Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) := by - have := continuous_Jker_offset_ph (y - y') y (φ - φ') T; fun_prop - rw [← integral_const_mul] - have e1 : ∀ x, (y - y') * (Φ x ^ 2 * - Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) - = Φ x ^ 2 * ((y - y') * - Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) := by - intro x; ring - simp_rw [e1] - rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by linarith : -T ≤ T), - ← intervalIntegral.integral_add_adjacent_intervals (b := 0) - (hcont.intervalIntegrable _ _) (hcont.intervalIntegrable _ _)] - have hL : ∫ x in (-T)..0, Φ x ^ 2 * ((y - y') * - Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) - = ∫ x in (-T)..0, Φ x ^ 2 * (Real.sin (((y - y') * (2 * T) - (φ - φ')) + x * y) - - Real.sin (((y - y') * T - (φ - φ')) + x * y')) := by - apply intervalIntegral.integral_congr - intro x hx - rw [Set.uIcc_of_le (by linarith : -T ≤ 0)] at hx - simp only - congr 1 - rw [max_eq_left (by linarith [hx.2]), min_eq_right (by linarith [hx.2]), Jker_of_ne hθ, - mul_div_cancel₀ _ hθ] - congr 1 - · rw [show (y - y') * (2 * T) + (x * y - (φ - φ')) = ((y - y') * (2 * T) - (φ - φ')) + x * y by ring] - · rw [show (y - y') * (T - x) + (x * y - (φ - φ')) = ((y - y') * T - (φ - φ')) + x * y' by ring] - have hR : ∫ x in (0:ℝ)..T, Φ x ^ 2 * ((y - y') * - Jker (y - y') (x * y - (φ - φ')) (max (T - x) T) (min (2 * T - x) (2 * T))) - = ∫ x in (0:ℝ)..T, Φ x ^ 2 * (Real.sin (((y - y') * (2 * T) - (φ - φ')) + x * y') - - Real.sin (((y - y') * T - (φ - φ')) + x * y)) := by - apply intervalIntegral.integral_congr - intro x hx - rw [Set.uIcc_of_le hT] at hx - simp only - congr 1 - rw [max_eq_right (by linarith [hx.1]), min_eq_left (by linarith [hx.1]), Jker_of_ne hθ, - mul_div_cancel₀ _ hθ] - congr 1 - · rw [show (y - y') * (2 * T - x) + (x * y - (φ - φ')) = ((y - y') * (2 * T) - (φ - φ')) + x * y' by ring] - · rw [show (y - y') * T + (x * y - (φ - φ')) = ((y - y') * T - (φ - φ')) + x * y by ring] - rw [hL, hR, integral_sq_mul_sin_sub_sin hΦ, integral_sq_mul_sin_sub_sin hΦ] - -end PhaseO1 - -/-! ## The magnitude/phase form of P_{X,c} -/ - -section PXcForm - -/-- n^(−1/2 − iτ) = (√n)⁻¹·e^{−i·τ·log n} for n ≥ 1. -/ -lemma cpow_neg_half_sub_I_mul {n : ℕ} (hn : 1 ≤ n) (τ : ℝ) : - (n : ℂ) ^ (-(1 / 2 : ℂ) - Complex.I * τ) - = (((Real.sqrt n)⁻¹ : ℝ) : ℂ) * Complex.exp ((-(τ * Real.log n) : ℝ) * Complex.I) := by - have hn0 : (0:ℝ) < n := by exact_mod_cast hn - have hnC : (n : ℂ) ≠ 0 := by - simp only [ne_eq, Nat.cast_eq_zero] - omega - have hlog : Complex.log (n : ℂ) = ((Real.log n : ℝ) : ℂ) := by - rw [show ((n : ℕ) : ℂ) = (((n : ℕ) : ℝ) : ℂ) by push_cast; rfl] - exact (Complex.ofReal_log hn0.le).symm - rw [Complex.cpow_def_of_ne_zero hnC, hlog] - have harg : ((Real.log n : ℝ) : ℂ) * (-(1 / 2 : ℂ) - Complex.I * τ) - = ((-(Real.log n / 2) : ℝ) : ℂ) + ((-(τ * Real.log n) : ℝ) : ℂ) * Complex.I := by - push_cast - ring - rw [harg, Complex.exp_add] - congr 1 - rw [← Complex.ofReal_exp] - congr 1 - rw [Real.exp_neg] - congr 1 - rw [Real.sqrt_eq_rpow, Real.rpow_def_of_pos hn0] - congr 1 - ring - -/-- The magnitude/phase form: P_{X,c}(τ) = −(1/π) Σ_n a_n·‖c n‖·cos(τ·log n − arg(c n)). -/ -lemma PXc_eq_sum (c : ℕ → ℂ) (X τ : ℝ) : - PXc c X τ = -(1 / π) * ∑ n ∈ primeRange X, - acoef n * ‖c n‖ * Real.cos (τ * Real.log n - (c n).arg) := by - unfold PXc - congr 1 - rw [Complex.re_sum] - refine Finset.sum_congr rfl fun n hn => ?_ - have hn1 : 1 ≤ n := one_le_of_mem_primeRange hn - rw [cpow_neg_half_sub_I_mul hn1] - have hsplit : ((Λ n : ℝ) : ℂ) * c n * ((((Real.sqrt n)⁻¹ : ℝ) : ℂ) - * Complex.exp ((-(τ * Real.log n) : ℝ) * Complex.I)) - = (((Λ n : ℝ) * (Real.sqrt n)⁻¹ : ℝ) : ℂ) - * (c n * Complex.exp ((-(τ * Real.log n) : ℝ) * Complex.I)) := by - push_cast - ring - rw [hsplit, Complex.re_ofReal_mul] - have hc : c n * Complex.exp ((-(τ * Real.log n) : ℝ) * Complex.I) - = ((‖c n‖ : ℝ) : ℂ) * Complex.exp ((((c n).arg - τ * Real.log n : ℝ)) * Complex.I) := by - conv_lhs => rw [← Complex.norm_mul_exp_arg_mul_I (c n)] - rw [mul_assoc, ← Complex.exp_add] - congr 2 - push_cast - ring - rw [hc, Complex.re_ofReal_mul, Complex.exp_ofReal_mul_I_re] - have hcos : Real.cos ((c n).arg - τ * Real.log n) = Real.cos (τ * Real.log n - (c n).arg) := by - rw [← Real.cos_neg] - congr 1 - ring - rw [hcos] - unfold acoef - rw [div_eq_mul_inv] - ring - -end PXcForm - -/-! ## H-MV with phases -/ - -section MVPh -variable {C : ℝ} - -/-- Mirror of MV_real with a per-index phase: for real weights u, v and phases φv, -both trig sums Σ_{n≠m} u_n v_m·trig(cc(y_n−y_m) − (φv_n − φv_m))/(y_n−y_m) obey the H-MV bound. -/ -lemma MV_real_ph (hMV : Zeta23.MVHilbert C) (X cc : ℝ) (u v φv : ℕ → ℝ) : - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - u n * v m * Real.cos (cc * (Real.log n - Real.log m) - (φv n - φv m)) - / (Real.log n - Real.log m))| - ≤ C * Real.sqrt (∑ n ∈ primeRange X, u n ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, v n ^ 2 * (2 * n)) ∧ - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - u n * v m * Real.sin (cc * (Real.log n - Real.log m) - (φv n - φv m)) - / (Real.log n - Real.log m))| - ≤ C * Real.sqrt (∑ n ∈ primeRange X, u n ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, v n ^ 2 * (2 * n)) := by - set x : ℕ → ℂ := fun n => (u n : ℂ) - * Complex.exp ((cc * Real.log n - φv n : ℝ) * Complex.I) with hx - set z : ℕ → ℂ := fun n => (v n : ℂ) - * Complex.exp ((cc * Real.log n - φv n : ℝ) * Complex.I) with hz - have key := MV_primeRange hMV X x z - have hnx : ∀ n, ‖x n‖ ^ 2 = u n ^ 2 := by - intro n - simp only [hx, norm_mul, Complex.norm_exp_ofReal_mul_I, mul_one, Complex.norm_real, - Real.norm_eq_abs, sq_abs] - have hnz : ∀ n, ‖z n‖ ^ 2 = v n ^ 2 := by - intro n - simp only [hz, norm_mul, Complex.norm_exp_ofReal_mul_I, mul_one, Complex.norm_real, - Real.norm_eq_abs, sq_abs] - simp_rw [hnx, hnz] at key - have hprod : ∀ n m, x n * conj (z m) - = ((u n * v m : ℝ) : ℂ) - * Complex.exp ((cc * (Real.log n - Real.log m) - (φv n - φv m) : ℝ) * Complex.I) := by - intro n m - have harg : ((cc * Real.log n - φv n : ℝ) : ℂ) * Complex.I - + ((cc * Real.log m - φv m : ℝ) : ℂ) * (starRingEnd ℂ) Complex.I - = ((cc * (Real.log n - Real.log m) - (φv n - φv m) : ℝ) : ℂ) * Complex.I := by - rw [Complex.conj_I]; push_cast; ring - simp only [hx, hz, map_mul, Complex.conj_ofReal, ← Complex.exp_conj] - rw [mul_mul_mul_comm, ← Complex.exp_add, harg] - push_cast; ring - have hre : (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℂ) else x n * conj (z m) / ((Real.log n - Real.log m : ℝ) : ℂ))).re - = ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - u n * v m * Real.cos (cc * (Real.log n - Real.log m) - (φv n - φv m)) - / (Real.log n - Real.log m)) := by - rw [Complex.re_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [Complex.re_sum] - refine Finset.sum_congr rfl fun m _ => ?_ - split_ifs with h - · simp - · rw [hprod, Complex.div_ofReal_re, Complex.re_ofReal_mul, Complex.exp_ofReal_mul_I_re] - have him : (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℂ) else x n * conj (z m) / ((Real.log n - Real.log m : ℝ) : ℂ))).im - = ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - u n * v m * Real.sin (cc * (Real.log n - Real.log m) - (φv n - φv m)) - / (Real.log n - Real.log m)) := by - rw [Complex.im_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [Complex.im_sum] - refine Finset.sum_congr rfl fun m _ => ?_ - split_ifs with h - · simp - · rw [hprod, Complex.div_ofReal_im, Complex.im_ofReal_mul, Complex.exp_ofReal_mul_I_im] - constructor - · rw [← hre]; exact (Complex.abs_re_le_norm _).trans key - · rw [← him]; exact (Complex.abs_im_le_norm _).trans key - -/-- Size bound with weights on BOTH slots: |w₁| ≤ 1, |w₂| ≤ W ⟹ the MV bound ≤ 2CW·ΣΛ², -in both slot orders. -/ -lemma MV_size_le₂ (hC : 0 ≤ C) (X : ℝ) {w₁ w₂ : ℕ → ℝ} {W : ℝ} (hW : 0 ≤ W) - (hw₁ : ∀ n ∈ primeRange X, |w₁ n| ≤ 1) (hw₂ : ∀ n ∈ primeRange X, |w₂ n| ≤ W) : - C * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₁ n) ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₂ n) ^ 2 * (2 * n)) - ≤ 2 * C * W * ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 ∧ - C * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₂ n) ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₁ n) ^ 2 * (2 * n)) - ≤ 2 * C * W * ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 := by - set Λ2 := ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 with hΛ2 - have hΛ2nn : 0 ≤ Λ2 := Finset.sum_nonneg fun n _ => sq_nonneg _ - have hbd : ∀ (w : ℕ → ℝ) (B : ℝ), 0 ≤ B → (∀ n ∈ primeRange X, |w n| ≤ B) → - ∑ n ∈ primeRange X, (acoef n * w n) ^ 2 * (2 * n) ≤ B ^ 2 * (2 * Λ2) := by - intro w B hB hw - rw [hΛ2, Finset.mul_sum, Finset.mul_sum] - refine Finset.sum_le_sum fun n hn => ?_ - rw [mul_pow, mul_comm (acoef n ^ 2), mul_assoc, - acoef_sq_mul_two_mul (one_le_of_mem_primeRange hn)] - apply mul_le_mul_of_nonneg_right _ (by positivity) - exact (sq_abs (w n)).symm ▸ pow_le_pow_left₀ (abs_nonneg _) (hw n hn) 2 - have h1 := hbd w₁ 1 zero_le_one hw₁ - have h2 := hbd w₂ W hW hw₂ - have hs1 : Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₁ n) ^ 2 * (2 * n)) - ≤ Real.sqrt (2 * Λ2) := by - refine (Real.sqrt_le_sqrt h1).trans ?_ - rw [one_pow, one_mul] - have hs2 : Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₂ n) ^ 2 * (2 * n)) - ≤ W * Real.sqrt (2 * Λ2) := by - calc Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₂ n) ^ 2 * (2 * n)) - ≤ Real.sqrt (W ^ 2 * (2 * Λ2)) := Real.sqrt_le_sqrt h2 - _ = W * Real.sqrt (2 * Λ2) := by rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq hW] - have hsq : Real.sqrt (2 * Λ2) * Real.sqrt (2 * Λ2) = 2 * Λ2 := - Real.mul_self_sqrt (by positivity) - constructor - · calc C * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₁ n) ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₂ n) ^ 2 * (2 * n)) - ≤ C * Real.sqrt (2 * Λ2) * (W * Real.sqrt (2 * Λ2)) := by - refine mul_le_mul ?_ hs2 (Real.sqrt_nonneg _) (by positivity) - exact mul_le_mul_of_nonneg_left hs1 hC - _ = C * W * (Real.sqrt (2 * Λ2) * Real.sqrt (2 * Λ2)) := by ring - _ = 2 * C * W * Λ2 := by rw [hsq]; ring - · calc C * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₂ n) ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, (acoef n * w₁ n) ^ 2 * (2 * n)) - ≤ C * (W * Real.sqrt (2 * Λ2)) * Real.sqrt (2 * Λ2) := by - refine mul_le_mul ?_ hs1 (Real.sqrt_nonneg _) (by positivity) - exact mul_le_mul_of_nonneg_left hs2 hC - _ = C * W * (Real.sqrt (2 * Λ2) * Real.sqrt (2 * Λ2)) := by ring - _ = 2 * C * W * Λ2 := by rw [hsq]; ring - -end MVPh - -/-! ## The decomposition 𝓜[P_{X,c}, P_{X,c}] = 𝒟 + 𝒪₁ + 𝒪₂, weighted and phased -/ - -section Decomp -variable {Φ : ℝ → ℝ} {T : ℝ} - -/-- [eq:MPP] for P_{X,c} (mirror of Mform_PX_PX): with weights a_k‖c k‖ and phases arg(c k). -/ -lemma Mform_PXc_PXc (hT : 0 ≤ T) (hΦ : Continuous Φ) (c : ℕ → ℂ) (X : ℝ) : - Mform Φ T (PXc c X) (PXc c X) - = (1 / (2 * π ^ 2)) * - ((∑ n ∈ primeRange X, (acoef n * ‖c n‖) ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - + (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AminusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg)) - + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg) := by - have h1 : Mform Φ T (PXc c X) (PXc c X) = (1 / π ^ 2) * - ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (acoef n * ‖c n‖) * (acoef m * ‖c m‖) * - Mform Φ T (fun τ => Real.cos (τ * Real.log n - (c n).arg)) - (fun τ => Real.cos (τ * Real.log m - (c m).arg)) := by - unfold Mform - have hpt : ∀ q : ℝ × ℝ, Φ (q.1 - q.2) ^ 2 * PXc c X q.1 * PXc c X q.2 - = (1 / π ^ 2) * ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (acoef n * ‖c n‖) * (acoef m * ‖c m‖) * - (Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * Real.log n - (c n).arg) - * Real.cos (q.2 * Real.log m - (c m).arg)) := by - intro q - rw [PXc_eq_sum, PXc_eq_sum] - rw [show ∀ A B : ℝ, Φ (q.1 - q.2) ^ 2 * (-(1 / π) * A) * (-(1 / π) * B) - = (1 / π ^ 2) * (Φ (q.1 - q.2) ^ 2 * (A * B)) from fun A B => by ring, - Finset.sum_mul_sum, Finset.mul_sum] - congr 1 - refine Finset.sum_congr rfl fun n _ => ?_ - rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun m _ => ?_ - ring - simp_rw [hpt] - rw [integral_const_mul] - congr 1 - have hint : ∀ n m : ℕ, Integrable (fun q : ℝ × ℝ => - (acoef n * ‖c n‖) * (acoef m * ‖c m‖) * - (Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * Real.log n - (c n).arg) - * Real.cos (q.2 * Real.log m - (c m).arg))) - (volume.restrict (Icc T (2 * T) ×ˢ Icc T (2 * T))) := fun n m => - (Mform_integrableOn hΦ (u := fun τ => Real.cos (τ * Real.log n - (c n).arg)) - (v := fun τ => Real.cos (τ * Real.log m - (c m).arg)) (by fun_prop) (by fun_prop)).const_mul _ - rw [integral_finsetSum _ (fun n _ => integrable_finsetSum _ (fun m _ => hint n m))] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [integral_finsetSum _ (fun m _ => hint n m)] - refine Finset.sum_congr rfl fun m _ => ?_ - rw [integral_const_mul] - have h2 : ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (acoef n * ‖c n‖) * (acoef m * ‖c m‖) * - Mform Φ T (fun τ => Real.cos (τ * Real.log n - (c n).arg)) - (fun τ => Real.cos (τ * Real.log m - (c m).arg)) - = (1 / 2) * ((∑ n ∈ primeRange X, (acoef n * ‖c n‖) ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - + (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AminusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg)) - + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg) := by - simp_rw [Mform_cos_cos_ph hT hΦ] - have e : ∀ n m : ℕ, (acoef n * ‖c n‖) * (acoef m * ‖c m‖) * - ((AminusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg - + AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg) / 2) - = (1 / 2) * ((acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AminusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg) - + (1 / 2) * ((acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg) := by - intro n m; ring - simp_rw [e, Finset.sum_add_distrib, ← Finset.mul_sum] - have hA := sum_sum_eq_diag_add_offdiag (primeRange X) - (fun n m => (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AminusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg) - have hdiag : ∑ n ∈ primeRange X, (acoef n * ‖c n‖) * (acoef n * ‖c n‖) - * AminusPh Φ T (Real.log n) (Real.log n) (c n).arg (c n).arg - = ∑ n ∈ primeRange X, (acoef n * ‖c n‖) ^ 2 * Aminus Φ T (Real.log n) (Real.log n) := by - refine Finset.sum_congr rfl fun n _ => ?_ - rw [AminusPh_self] - ring - rw [hA, hdiag] - ring - rw [h1, h2] - ring - -end Decomp - -/-! ## The three estimates, weighted and phased -/ - -section Estimates -variable {Φ : ℝ → ℝ} {T : ℝ} - -/-- 𝒟 for P_{X,c} (mirror of diag_estimate; weight ‖c n‖² ≤ 1 rides along). -/ -lemma diag_estimate_chi (hT : 0 ≤ T) (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) - (hΦabs : Integrable fun x => Φ x ^ 2 * |x|) {g : ℝ → ℝ} - (hFT : ∀ y, ∫ x, Φ x ^ 2 * Real.cos (x * y) = 2 * π * g y) (hc1 : ∀ n, ‖c n‖ ≤ 1) (X : ℝ) : - |(1 / (2 * π ^ 2)) * (∑ n ∈ primeRange X, (acoef n * ‖c n‖) ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - - T / π * ∑ n ∈ primeRange X, acoef n ^ 2 * ‖c n‖ ^ 2 * g (Real.log n)| - ≤ (1 / (2 * π ^ 2)) * (∑ n ∈ primeRange X, acoef n ^ 2) * ∫ x, Φ x ^ 2 * |x| := by - have hπ : (0:ℝ) < π := Real.pi_pos - have e : (1 / (2 * π ^ 2)) * (∑ n ∈ primeRange X, (acoef n * ‖c n‖) ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - - T / π * ∑ n ∈ primeRange X, acoef n ^ 2 * ‖c n‖ ^ 2 * g (Real.log n) - = (1 / (2 * π ^ 2)) * ∑ n ∈ primeRange X, (acoef n * ‖c n‖) ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n)) := by - simp_rw [hFT] - rw [Finset.mul_sum, Finset.mul_sum, Finset.mul_sum, ← Finset.sum_sub_distrib] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [mul_pow] - field_simp - rw [e, abs_mul, abs_of_pos (by positivity), mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ (by positivity) - calc |∑ n ∈ primeRange X, (acoef n * ‖c n‖) ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n))| - ≤ ∑ n ∈ primeRange X, |(acoef n * ‖c n‖) ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n))| := - Finset.abs_sum_le_sum_abs _ _ - _ ≤ ∑ n ∈ primeRange X, acoef n ^ 2 * ∫ x, Φ x ^ 2 * |x| := by - refine Finset.sum_le_sum fun n _ => ?_ - rw [abs_mul, abs_of_nonneg (sq_nonneg _)] - calc (acoef n * ‖c n‖) ^ 2 * - |Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n)| - ≤ acoef n ^ 2 * |Aminus Φ T (Real.log n) (Real.log n) - - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n)| := by - apply mul_le_mul_of_nonneg_right _ (abs_nonneg _) - rw [mul_pow] - calc acoef n ^ 2 * ‖c n‖ ^ 2 ≤ acoef n ^ 2 * 1 ^ 2 := by - apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) - exact pow_le_pow_left₀ (norm_nonneg _) (hc1 n) 2 - _ = acoef n ^ 2 := by ring - _ ≤ acoef n ^ 2 * ∫ x, Φ x ^ 2 * |x| := - mul_le_mul_of_nonneg_left (abs_Aminus_diag_sub_le hT hΦ hΦ2 hΦabs _) (sq_nonneg _) - _ = (∑ n ∈ primeRange X, acoef n ^ 2) * ∫ x, Φ x ^ 2 * |x| := by rw [Finset.sum_mul] - -/-- 𝒪₂ for P_{X,c} (mirror of O2_estimate; weights ≤ 1, phase-free bound). -/ -lemma O2_estimate_chi (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) - (hc1 : ∀ n, ‖c n‖ ≤ 1) (X T : ℝ) : - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg| - ≤ (∫ x, Φ x ^ 2) / Real.log 2 * (∑ n ∈ primeRange X, acoef n) ^ 2 := by - have hW : 0 ≤ ∫ x, Φ x ^ 2 := integral_nonneg fun x => sq_nonneg _ - have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - have hper : ∀ n ∈ primeRange X, ∀ m ∈ primeRange X, - |(acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg| - ≤ acoef n * acoef m * ((∫ x, Φ x ^ 2) / Real.log 2) := by - intro n hn m hm - rw [abs_mul, abs_mul, abs_of_nonneg (mul_nonneg (acoef_nonneg n) (norm_nonneg _)), - abs_of_nonneg (mul_nonneg (acoef_nonneg m) (norm_nonneg _))] - rcases acoef_eq_zero_or_two_le hn with h0 | hn2 - · simp [h0] - rcases acoef_eq_zero_or_two_le hm with h0 | hm2 - · simp [h0] - have hwn : acoef n * ‖c n‖ ≤ acoef n := by - calc acoef n * ‖c n‖ ≤ acoef n * 1 := mul_le_mul_of_nonneg_left (hc1 n) (acoef_nonneg n) - _ = acoef n := mul_one _ - have hwm : acoef m * ‖c m‖ ≤ acoef m := by - calc acoef m * ‖c m‖ ≤ acoef m * 1 := mul_le_mul_of_nonneg_left (hc1 m) (acoef_nonneg m) - _ = acoef m := mul_one _ - have hyn : Real.log 2 ≤ Real.log n := Real.log_le_log (by norm_num) (by exact_mod_cast hn2) - have hym : Real.log 2 ≤ Real.log m := Real.log_le_log (by norm_num) (by exact_mod_cast hm2) - have hpos : 0 < Real.log n + Real.log m := by linarith - have hA : |AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg| - ≤ (∫ x, Φ x ^ 2) / Real.log 2 := by - calc |AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg| - ≤ 2 / (Real.log n + Real.log m) * ∫ x, Φ x ^ 2 := abs_AplusPh_le hΦ hΦ2 hpos _ _ - _ ≤ 2 / (2 * Real.log 2) * ∫ x, Φ x ^ 2 := by gcongr; linarith - _ = (∫ x, Φ x ^ 2) / Real.log 2 := by field_simp - exact mul_le_mul (mul_le_mul hwn hwm (mul_nonneg (acoef_nonneg m) (norm_nonneg _)) - (acoef_nonneg n)) hA (abs_nonneg _) (mul_nonneg (acoef_nonneg n) (acoef_nonneg m)) - refine le_trans (Finset.abs_sum_le_sum_abs _ _) ?_ - refine le_trans (Finset.sum_le_sum fun n _ => Finset.abs_sum_le_sum_abs _ _) ?_ - refine le_trans (Finset.sum_le_sum fun n hn => Finset.sum_le_sum fun m hm => hper n hn m hm) ?_ - refine le_of_eq ?_ - rw [sq, Finset.sum_mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun m _ => ?_ - ring - -end Estimates - -/-! ## 𝒪₁ for P_{X,c} -/ - -section O1Chi -variable {Φ : ℝ → ℝ} {T : ℝ} - -/-- 𝒪₁ for P_{X,c} (mirror of O1_bound; weights a_k‖c k‖ ≤ a_k, phases arg(c k) ride into -MV_real_ph): |Σ_{n≠m} w_n w_m A⁻_ph| ≤ 16·C·(∫Φ²)·ΣΛ². -/ -theorem O1_bound_chi {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (hT : 0 ≤ T) - (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) (hc1 : ∀ n, ‖c n‖ ≤ 1) (X : ℝ) : - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AminusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg)| - ≤ 16 * C * (∫ x, Φ x ^ 2) * ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 := by - set W : ℝ := ∫ x, Φ x ^ 2 with hW - have hW0 : 0 ≤ W := MeasureTheory.integral_nonneg fun x => sq_nonneg _ - set Λ2 : ℝ := ∑ n ∈ primeRange X, (Λ n : ℝ) ^ 2 with hΛ2 - have hΛ2nn : 0 ≤ Λ2 := Finset.sum_nonneg fun n _ => sq_nonneg _ - set S1 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * (‖c n‖ * Cm Φ T (Real.log n)) * (acoef m * ‖c m‖) - * Real.sin ((2 * T) * (Real.log n - Real.log m) - ((c n).arg - (c m).arg)) / (Real.log n - Real.log m)) with hS1 - set S2 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * (‖c n‖ * Sm Φ T (Real.log n)) * (acoef m * ‖c m‖) - * Real.cos ((2 * T) * (Real.log n - Real.log m) - ((c n).arg - (c m).arg)) / (Real.log n - Real.log m)) with hS2 - set S3 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * ‖c n‖ * (acoef m * (‖c m‖ * Cm Φ T (Real.log m))) - * Real.sin (T * (Real.log n - Real.log m) - ((c n).arg - (c m).arg)) / (Real.log n - Real.log m)) with hS3 - set S4 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * ‖c n‖ * (acoef m * (‖c m‖ * Sm Φ T (Real.log m))) - * Real.cos (T * (Real.log n - Real.log m) - ((c n).arg - (c m).arg)) / (Real.log n - Real.log m)) with hS4 - set S5 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * ‖c n‖ * (acoef m * (‖c m‖ * Cp Φ T (Real.log m))) - * Real.sin ((2 * T) * (Real.log n - Real.log m) - ((c n).arg - (c m).arg)) / (Real.log n - Real.log m)) with hS5 - set S6 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * ‖c n‖ * (acoef m * (‖c m‖ * Sp Φ T (Real.log m))) - * Real.cos ((2 * T) * (Real.log n - Real.log m) - ((c n).arg - (c m).arg)) / (Real.log n - Real.log m)) with hS6 - set S7 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * (‖c n‖ * Cp Φ T (Real.log n)) * (acoef m * ‖c m‖) - * Real.sin (T * (Real.log n - Real.log m) - ((c n).arg - (c m).arg)) / (Real.log n - Real.log m)) with hS7 - set S8 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - acoef n * (‖c n‖ * Sp Φ T (Real.log n)) * (acoef m * ‖c m‖) - * Real.cos (T * (Real.log n - Real.log m) - ((c n).arg - (c m).arg)) / (Real.log n - Real.log m)) with hS8 - have hsplit : ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AminusPh Φ T (Real.log n) (Real.log m) ((c n).arg) ((c m).arg)) - = S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8 := by - rw [hS1, hS2, hS3, hS4, hS5, hS6, hS7, hS8] - simp only [← Finset.sum_sub_distrib, ← Finset.sum_add_distrib] - refine Finset.sum_congr rfl fun n hn => Finset.sum_congr rfl fun m hm => ?_ - by_cases hnm : n = m - · simp [hnm] - · simp only [if_neg hnm] - have hθ : Real.log n - Real.log m ≠ 0 := by - have hn1 := one_le_of_mem_primeRange hn - have hm1 := one_le_of_mem_primeRange hm - have hinj : Real.log n ≠ Real.log m := by - rcases lt_or_gt_of_ne hnm with hlt | hgt - · exact ne_of_lt (Real.log_lt_log (by exact_mod_cast hn1) (by exact_mod_cast hlt)) - · exact ne_of_gt (Real.log_lt_log (by exact_mod_cast hm1) (by exact_mod_cast hgt)) - exact sub_ne_zero.mpr hinj - have hA := sub_mul_AminusPh_eq (Φ := Φ) hT hΦ hθ ((c n).arg) ((c m).arg) - have hAm : AminusPh Φ T (Real.log n) (Real.log m) ((c n).arg) ((c m).arg) - = ((Real.sin ((Real.log n - Real.log m) * (2 * T) - ((c n).arg - (c m).arg)) * Cm Φ T (Real.log n) - + Real.cos ((Real.log n - Real.log m) * (2 * T) - ((c n).arg - (c m).arg)) * Sm Φ T (Real.log n) - - (Real.sin ((Real.log n - Real.log m) * T - ((c n).arg - (c m).arg)) * Cm Φ T (Real.log m) - + Real.cos ((Real.log n - Real.log m) * T - ((c n).arg - (c m).arg)) * Sm Φ T (Real.log m))) - + (Real.sin ((Real.log n - Real.log m) * (2 * T) - ((c n).arg - (c m).arg)) * Cp Φ T (Real.log m) - + Real.cos ((Real.log n - Real.log m) * (2 * T) - ((c n).arg - (c m).arg)) * Sp Φ T (Real.log m) - - (Real.sin ((Real.log n - Real.log m) * T - ((c n).arg - (c m).arg)) * Cp Φ T (Real.log n) - + Real.cos ((Real.log n - Real.log m) * T - ((c n).arg - (c m).arg)) * Sp Φ T (Real.log n)))) - / (Real.log n - Real.log m) := by - rw [eq_div_iff hθ, mul_comm] - exact hA - rw [hAm, mul_comm ((2 : ℝ) * T) (Real.log n - Real.log m), - mul_comm T (Real.log n - Real.log m)] - field_simp - ring - have hb : ∀ (M : ℕ → ℝ), (∀ n ∈ primeRange X, |M n| ≤ W) → - (∀ n ∈ primeRange X, |‖c n‖ * M n| ≤ W) := by - intro M hM n hn - rw [abs_mul, abs_of_nonneg (norm_nonneg _)] - calc ‖c n‖ * |M n| ≤ 1 * W := by - apply mul_le_mul (hc1 n) (hM n hn) (abs_nonneg _) zero_le_one - _ = W := one_mul _ - have hc1' : ∀ n ∈ primeRange X, |(‖c n‖ : ℝ)| ≤ 1 := by - intro n _ - rw [abs_of_nonneg (norm_nonneg _)] - exact hc1 n - have hw_Cm : ∀ n ∈ primeRange X, |Cm Φ T (Real.log n)| ≤ W := fun n _ => abs_Cm_le hT hΦ hΦ2 _ - have hw_Sm : ∀ n ∈ primeRange X, |Sm Φ T (Real.log n)| ≤ W := fun n _ => abs_Sm_le hT hΦ hΦ2 _ - have hw_Cp : ∀ n ∈ primeRange X, |Cp Φ T (Real.log n)| ≤ W := fun n _ => abs_Cp_le hT hΦ hΦ2 _ - have hw_Sp : ∀ n ∈ primeRange X, |Sp Φ T (Real.log n)| ≤ W := fun n _ => abs_Sp_le hT hΦ hΦ2 _ - have hb1 : |S1| ≤ 2 * C * W * Λ2 := by - rw [hS1] - have h := (MV_real_ph hMV X (2 * T) (fun k => acoef k * (‖c k‖ * Cm Φ T (Real.log k))) (fun k => acoef k * ‖c k‖) (fun k => (c k).arg)).2 - have hsz := (MV_size_le₂ hC X hW0 hc1' (hb _ hw_Cm)).2 - have hfin := h.trans hsz - rw [← hΛ2] at hfin - exact hfin - have hb2 : |S2| ≤ 2 * C * W * Λ2 := by - rw [hS2] - have h := (MV_real_ph hMV X (2 * T) (fun k => acoef k * (‖c k‖ * Sm Φ T (Real.log k))) (fun k => acoef k * ‖c k‖) (fun k => (c k).arg)).1 - have hsz := (MV_size_le₂ hC X hW0 hc1' (hb _ hw_Sm)).2 - have hfin := h.trans hsz - rw [← hΛ2] at hfin - exact hfin - have hb3 : |S3| ≤ 2 * C * W * Λ2 := by - rw [hS3] - have h := (MV_real_ph hMV X (T) (fun k => acoef k * ‖c k‖) (fun k => acoef k * (‖c k‖ * Cm Φ T (Real.log k))) (fun k => (c k).arg)).2 - have hsz := (MV_size_le₂ hC X hW0 hc1' (hb _ hw_Cm)).1 - have hfin := h.trans hsz - rw [← hΛ2] at hfin - exact hfin - have hb4 : |S4| ≤ 2 * C * W * Λ2 := by - rw [hS4] - have h := (MV_real_ph hMV X (T) (fun k => acoef k * ‖c k‖) (fun k => acoef k * (‖c k‖ * Sm Φ T (Real.log k))) (fun k => (c k).arg)).1 - have hsz := (MV_size_le₂ hC X hW0 hc1' (hb _ hw_Sm)).1 - have hfin := h.trans hsz - rw [← hΛ2] at hfin - exact hfin - have hb5 : |S5| ≤ 2 * C * W * Λ2 := by - rw [hS5] - have h := (MV_real_ph hMV X (2 * T) (fun k => acoef k * ‖c k‖) (fun k => acoef k * (‖c k‖ * Cp Φ T (Real.log k))) (fun k => (c k).arg)).2 - have hsz := (MV_size_le₂ hC X hW0 hc1' (hb _ hw_Cp)).1 - have hfin := h.trans hsz - rw [← hΛ2] at hfin - exact hfin - have hb6 : |S6| ≤ 2 * C * W * Λ2 := by - rw [hS6] - have h := (MV_real_ph hMV X (2 * T) (fun k => acoef k * ‖c k‖) (fun k => acoef k * (‖c k‖ * Sp Φ T (Real.log k))) (fun k => (c k).arg)).1 - have hsz := (MV_size_le₂ hC X hW0 hc1' (hb _ hw_Sp)).1 - have hfin := h.trans hsz - rw [← hΛ2] at hfin - exact hfin - have hb7 : |S7| ≤ 2 * C * W * Λ2 := by - rw [hS7] - have h := (MV_real_ph hMV X (T) (fun k => acoef k * (‖c k‖ * Cp Φ T (Real.log k))) (fun k => acoef k * ‖c k‖) (fun k => (c k).arg)).2 - have hsz := (MV_size_le₂ hC X hW0 hc1' (hb _ hw_Cp)).2 - have hfin := h.trans hsz - rw [← hΛ2] at hfin - exact hfin - have hb8 : |S8| ≤ 2 * C * W * Λ2 := by - rw [hS8] - have h := (MV_real_ph hMV X (T) (fun k => acoef k * (‖c k‖ * Sp Φ T (Real.log k))) (fun k => acoef k * ‖c k‖) (fun k => (c k).arg)).1 - have hsz := (MV_size_le₂ hC X hW0 hc1' (hb _ hw_Sp)).2 - have hfin := h.trans hsz - rw [← hΛ2] at hfin - exact hfin - rw [hsplit] - have habs : |S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8| - ≤ |S1| + |S2| + |S3| + |S4| + |S5| + |S6| + |S7| + |S8| := by - have t1 := abs_add_le S1 S2 - have t2 := abs_sub (S1 + S2) S3 - have t3 := abs_sub (S1 + S2 - S3) S4 - have t4 := abs_add_le (S1 + S2 - S3 - S4) S5 - have t5 := abs_add_le (S1 + S2 - S3 - S4 + S5) S6 - have t6 := abs_sub (S1 + S2 - S3 - S4 + S5 + S6) S7 - have t7 := abs_sub (S1 + S2 - S3 - S4 + S5 + S6 - S7) S8 - linarith - calc |S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8| - ≤ |S1| + |S2| + |S3| + |S4| + |S5| + |S6| + |S7| + |S8| := habs - _ ≤ 8 * (2 * C * W * Λ2) := by linarith - _ = 16 * C * W * Λ2 := by ring - -end O1Chi - -/-! ## The coprime g-sandwich (§5.4 with [eq:cheb2] restricted to (n,q)=1) -/ + · rw [if_pos hcop, hc.norm_eq n hn0 hcop, acoef_sq]; ring + · rw [if_neg hcop, hc.toCoeffOK.vanish n hcop]; simp section SandwichChi -variable {p : Setting} {F : LocalFun} -/-- Upper half, over the window-generic Core layer (uses only g ≤ A_φ ≤ (L−|y|)₊). -/ -theorem sumA2gCoprime_upper (hchebq : ChebyshevMertensCoprime q) (_hlam : 0 < lam ∧ lam ≤ 1) : +/-- Upper half, over the window-generic Core layer (uses only `g ≤ A_φ ≤ (L−|y|)₊`). -/ +theorem sumA2gCoprime_upper (hchebq : ChebyshevMertensCoprime q) (hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => - sumA2gCoprime q p.X F.g ≤ p.L ^ 3 / 6 + C * p.L ^ 2) := by - obtain ⟨C, hC⟩ := hchebq.cheb2b - refine ⟨C, 0, fun p F _ _ hF => ?_⟩ - have hX1 : (1:ℝ) ≤ p.X := by linarith [hF.two_le_X] - have h1 : sumA2gCoprime q p.X F.g - ≤ ∑ n ∈ (Finset.Ioc 0 ⌊p.X⌋₊).filter (fun n => Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * (p.L - Real.log n) := by - unfold sumA2gCoprime - refine Finset.sum_le_sum fun n hn => ?_ - have hn' : n ∈ primeRange p.X := (Finset.mem_filter.mp hn).1 - refine mul_le_mul_of_nonneg_left ?_ (a2_nonneg n) - calc F.g (Real.log n) ≤ F.Aphi (Real.log n) := hF.g_le_Aphi _ - _ ≤ max (p.L - |Real.log n|) 0 := hF.Aphi_le _ - _ = p.L - Real.log n := by - rw [abs_of_nonneg (log_nonneg_of_mem_primeRange hn'), max_eq_left] - have := log_le_of_mem_primeRange hX1 hn' - rw [p.log_X] at this; linarith - have h2 := hC p.X hF.two_le_X - rw [p.log_X] at h2 - have h3 := (abs_le.mp h2).2 - linarith + sumA2gCoprime q p.X F.g ≤ p.L ^ 3 / 6 + C * p.L ^ 2) := + sum_a2g_upper_filter (cϱ := cϱ) (fun n => Nat.Coprime n q) hchebq.cheb2b hlam -/-- Lower half, over the FULL taper layer (needs the flat-top bound g_lower, absent from Core). -/ -theorem sumA2gCoprime_lower (hchebq : ChebyshevMertensCoprime q) (_hlam : 0 < lam ∧ lam ≤ 1) : +/-- Lower half, over the FULL taper layer (needs the flat-top bound `g_lower`, absent from Core). -/ +theorem sumA2gCoprime_lower (hchebq : ChebyshevMertensCoprime q) (hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAt cϱ lam (fun p F => - (p.L - 2 * p.w) ^ 3 / 6 - C * p.L ^ 2 ≤ sumA2gCoprime q p.X F.g) := by - obtain ⟨C, hC⟩ := hchebq.cheb2b - refine ⟨max C 0, 0, fun p F _ _ hF => ?_⟩ - set L' := p.L - 2 * p.w with hL' - set x' := Real.exp L' with hx' - have hL'pos : 6 ≤ L' := by have := hF.w_le; have := hF.eight_le_L; rw [hL']; linarith - have hL'le : L' ≤ p.L := by rw [hL']; linarith [hF.one_le_w] - have hx'2 : 2 ≤ x' := by linarith [Real.add_one_le_exp L'] - have hx'X : x' ≤ p.X := Real.exp_le_exp.mpr hL'le - have hlogx' : Real.log x' = L' := Real.log_exp _ - have hsub : (Finset.Ioc 0 ⌊x'⌋₊).filter (fun n => Nat.Coprime n q) - ⊆ (Finset.Ioc 0 ⌊p.X⌋₊).filter (fun n => Nat.Coprime n q) := - Finset.filter_subset_filter _ (Finset.Ioc_subset_Ioc_right (Nat.floor_le_floor hx'X)) - have h1 : ∑ n ∈ (Finset.Ioc 0 ⌊x'⌋₊).filter (fun n => Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * (Real.log x' - Real.log n) ≤ sumA2gCoprime q p.X F.g := by - unfold sumA2gCoprime - calc ∑ n ∈ (Finset.Ioc 0 ⌊x'⌋₊).filter (fun n => Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * (Real.log x' - Real.log n) - ≤ ∑ n ∈ (Finset.Ioc 0 ⌊x'⌋₊).filter (fun n => Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * F.g (Real.log n) := by - refine Finset.sum_le_sum fun n hn => mul_le_mul_of_nonneg_left ?_ (a2_nonneg n) - have hn' : n ∈ primeRange x' := (Finset.mem_filter.mp hn).1 - calc Real.log x' - Real.log n ≤ max (p.L - 2 * p.w - |Real.log n|) 0 := by - rw [hlogx', abs_of_nonneg (log_nonneg_of_mem_primeRange hn'), hL'] - exact le_max_left _ _ - _ ≤ F.g (Real.log n) := hF.g_lower _ - _ ≤ ∑ n ∈ (Finset.Ioc 0 ⌊p.X⌋₊).filter (fun n => Nat.Coprime n q), - (Λ n : ℝ) ^ 2 / n * F.g (Real.log n) := by - apply Finset.sum_le_sum_of_subset_of_nonneg hsub - intro n _ _ - have : 0 ≤ F.g (Real.log n) := le_trans (le_max_right _ _) (hF.g_lower _) - exact mul_nonneg (a2_nonneg n) this - have h2 := hC x' hx'2 - rw [hlogx'] at h2 - have h3 := (abs_le.mp h2).1 - have hCmax : C * L' ^ 2 ≤ max C 0 * p.L ^ 2 := by - calc C * L' ^ 2 ≤ max C 0 * L' ^ 2 := - mul_le_mul_of_nonneg_right (le_max_left _ _) (sq_nonneg _) - _ ≤ max C 0 * p.L ^ 2 := by - apply mul_le_mul_of_nonneg_left _ (le_max_right _ _) - exact pow_le_pow_left₀ (by linarith) hL'le 2 - rw [hlogx'] at h1 - linarith + (p.L - 2 * p.w) ^ 3 / 6 - C * p.L ^ 2 ≤ sumA2gCoprime q p.X F.g) := + sum_a2g_lower_filter (cϱ := cϱ) (fun n => Nat.Coprime n q) hchebq.cheb2b hlam end SandwichChi -/-! ## Assembly: [prop:PP] for L(s,chi) -/ - section Results -/-- **prop_PP_chi, q-uniform form** (hybrid range, [rem:otherL](i)): the same constant and -threshold for every modulus and unimodular coefficient sequence — the ∃ C T₀ sit outside (q, c). -(The constant does not depend on (q, c); unimodularity enters only through the norm bound and the -diagonal identity. `prop_PP_chi` below is the (q, c)-specialisation of this theorem.) -/ +/-- **prop_PP_chi, q-uniform form** (hybrid range, `[rem:otherL](i)`): corollary of +`PrimeSide.prop_PP_vonMangoldt_bound`. -/ theorem prop_PP_chi_uniform (hcheb : Zeta23.ChebyshevMertens) (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hlam : 0 < lam ∧ lam ≤ 1) : ∃ C T₀ : ℝ, ∀ (q : ℕ) (c : ℕ → ℂ), CoeffUnimodular q c → ∀ (p : Setting) (F : LocalFun), p.lam = lam → T₀ ≤ p.T → LocalHypsCore cϱ p F → |Mform F.Phi p.T (PXc c p.X) (PXc c p.X) - p.T / π * sumA2gCoprime q p.X F.g| ≤ C * (p.L ^ 2 * p.X) := by - obtain ⟨CMV, hCMV, hMV⟩ := hMV - obtain ⟨x₀, h1b⟩ := hcheb.cheb1b - obtain ⟨C1d, h1d⟩ := hcheb.cheb1d - obtain ⟨C2a, h2a⟩ := hcheb.cheb2a - refine ⟨(1 / (2 * π ^ 2)) * ((1 / 2 + |C2a|) * (8 + 8 * |cϱ|) + 16 * CMV * (2 * π) * |C1d| - + 2 * π / Real.log 2 * 9), - max (2 * π * Real.exp (|x₀| / lam)) 1, fun q c hc p F hplam hT hF => ?_⟩ - have hc1 : ∀ n, ‖c n‖ ≤ 1 := hc.toCoeffOK.norm_le - have hT1 : 1 ≤ p.T := le_trans (le_max_right _ _) hT - have hT0 : 0 ≤ p.T := by linarith - have hX0 : x₀ ≤ p.X := Setting.le_X_of_T (hplam ▸ hlam.1) - (by rw [hplam]; exact (le_max_left _ _).trans hT) - have hX2 : 2 ≤ p.X := hF.two_le_X - have hL8 : 8 ≤ p.L := hF.eight_le_L - have hL1 : 1 ≤ p.L := by linarith - have hLX : p.L ≤ p.X := hF.L_le_X - have hlogX : Real.log p.X = p.L := p.log_X - have hΦc : Continuous F.Phi := hF.Phi_contDiff.continuous - have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - set W := ∫ x, F.Phi x ^ 2 with hWdef - have hW0 : 0 ≤ W := integral_nonneg fun x => sq_nonneg _ - have hWle : W ≤ 2 * π * p.L := hF.integral_Phi_sq_le - set ΛΦ := ∫ x, F.Phi x ^ 2 * |x| with hΛΦdef - have hΛΦ0 : 0 ≤ ΛΦ := integral_nonneg fun x => mul_nonneg (sq_nonneg _) (abs_nonneg _) - have hΛΦle : ΛΦ ≤ (8 + 8 * |cϱ|) * p.L := by - have h1 := hF.integral_Phi_sq_mul_abs_le - have hcϱ : 4 ≤ cϱ := hF.four_le_cϱ - have hw : 1 ≤ p.w := hF.one_le_w - have harg : 0 < cϱ * p.L / (4 * p.w) := by positivity - have hlog : Real.log (cϱ * p.L / (4 * p.w)) ≤ cϱ * p.L / (4 * p.w) := by - linarith [Real.log_le_sub_one_of_pos harg] - have hfrac : cϱ * p.L / (4 * p.w) ≤ |cϱ| * p.L := by - rw [div_le_iff₀ (by positivity), abs_of_nonneg (by linarith)] - have hcL : 0 ≤ cϱ * p.L := mul_nonneg (by linarith) (by linarith) - nlinarith [mul_nonneg hcL (by linarith : (0:ℝ) ≤ 4 * p.w - 1)] - calc ΛΦ ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) := h1 - _ ≤ 8 + 8 * (|cϱ| * p.L) := by linarith - _ ≤ 8 * p.L + 8 * (|cϱ| * p.L) := by linarith - _ = (8 + 8 * |cϱ|) * p.L := by ring - have hsuma : ∑ n ∈ primeRange p.X, acoef n ≤ 3 * Real.sqrt p.X := h1b p.X hX0 - have hsuma0 : 0 ≤ ∑ n ∈ primeRange p.X, acoef n := Finset.sum_nonneg fun n _ => acoef_nonneg n - have hsumΛ2 : ∑ n ∈ primeRange p.X, (Λ n : ℝ) ^ 2 ≤ |C1d| * p.X * p.L := by - have h := h1d p.X hX2 - rw [hlogX] at h - refine h.trans ?_ - have hXL : 0 ≤ p.X * p.L := mul_nonneg (by linarith) (by linarith) - calc C1d * p.X * p.L = C1d * (p.X * p.L) := by ring - _ ≤ |C1d| * (p.X * p.L) := mul_le_mul_of_nonneg_right (le_abs_self _) hXL - _ = |C1d| * p.X * p.L := by ring - have hsuma2 : ∑ n ∈ primeRange p.X, acoef n ^ 2 ≤ (1 / 2 + |C2a|) * p.L ^ 2 := by - have h := h2a p.X hX2 - rw [hlogX] at h - simp_rw [acoef_sq] - have h3 := (abs_le.mp h).2 - unfold primeRange - calc ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) ^ 2 / n ≤ p.L ^ 2 / 2 + C2a * p.L := by linarith - _ ≤ p.L ^ 2 / 2 + |C2a| * p.L ^ 2 := by - have h4 : C2a * p.L ≤ |C2a| * p.L := mul_le_mul_of_nonneg_right (le_abs_self _) (by linarith) - have h5 : |C2a| * p.L ≤ |C2a| * p.L ^ 2 := by - apply mul_le_mul_of_nonneg_left _ (abs_nonneg _); nlinarith - linarith - _ = (1 / 2 + |C2a|) * p.L ^ 2 := by ring - have hD := diag_estimate_chi hT0 hΦc hF.Phi_sq_integrable hF.Phi_sq_mul_abs_integrable - hF.Phi_sq_fourier hc1 p.X - have hO1 := O1_bound_chi (c := c) hMV hCMV.le hT0 hΦc hF.Phi_sq_integrable hc1 p.X - have hO2 := O2_estimate_chi (c := c) hΦc hF.Phi_sq_integrable hc1 p.X p.T - rw [Mform_PXc_PXc hT0 hΦc, ← sum_w_eq_sumA2gCoprime hc p.X F.g] - set D := ∑ n ∈ primeRange p.X, (acoef n * ‖c n‖) ^ 2 * Aminus F.Phi p.T (Real.log n) (Real.log n) - set O1 := ∑ n ∈ primeRange p.X, ∑ m ∈ primeRange p.X, - (if n = m then (0:ℝ) else (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AminusPh F.Phi p.T (Real.log n) (Real.log m) (c n).arg (c m).arg) - set O2 := ∑ n ∈ primeRange p.X, ∑ m ∈ primeRange p.X, - (acoef n * ‖c n‖) * (acoef m * ‖c m‖) - * AplusPh F.Phi p.T (Real.log n) (Real.log m) (c n).arg (c m).arg - have hk : (0:ℝ) < 1 / (2 * π ^ 2) := by positivity - have bD : |1 / (2 * π ^ 2) * D - p.T / π * ∑ n ∈ primeRange p.X, acoef n ^ 2 * ‖c n‖ ^ 2 * F.g (Real.log n)| - ≤ 1 / (2 * π ^ 2) * ((1 / 2 + |C2a|) * (8 + 8 * |cϱ|)) * (p.L ^ 2 * p.X) := by - refine hD.trans ?_ - rw [mul_assoc, mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ hk.le - calc (∑ n ∈ primeRange p.X, acoef n ^ 2) * ΛΦ - ≤ ((1 / 2 + |C2a|) * p.L ^ 2) * ((8 + 8 * |cϱ|) * p.L) := by - apply mul_le_mul hsuma2 hΛΦle hΛΦ0 (by positivity) - _ ≤ ((1 / 2 + |C2a|) * p.L ^ 2) * ((8 + 8 * |cϱ|) * p.X) := by gcongr - _ = (1 / 2 + |C2a|) * (8 + 8 * |cϱ|) * (p.L ^ 2 * p.X) := by ring - have bO1 : |1 / (2 * π ^ 2) * O1| - ≤ 1 / (2 * π ^ 2) * (16 * CMV * (2 * π) * |C1d|) * (p.L ^ 2 * p.X) := by - rw [abs_mul, abs_of_pos hk, mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ hk.le - calc |O1| ≤ 16 * CMV * W * ∑ n ∈ primeRange p.X, (Λ n : ℝ) ^ 2 := hO1 - _ ≤ 16 * CMV * (2 * π * p.L) * (|C1d| * p.X * p.L) := by - apply mul_le_mul _ hsumΛ2 (Finset.sum_nonneg fun n _ => sq_nonneg _) (by positivity) - exact mul_le_mul_of_nonneg_left hWle (by positivity) - _ = 16 * CMV * (2 * π) * |C1d| * (p.L ^ 2 * p.X) := by ring - have bO2 : |1 / (2 * π ^ 2) * O2| ≤ 1 / (2 * π ^ 2) * (2 * π / Real.log 2 * 9) * (p.L ^ 2 * p.X) := by - rw [abs_mul, abs_of_pos hk, mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ hk.le - calc |O2| ≤ W / Real.log 2 * (∑ n ∈ primeRange p.X, acoef n) ^ 2 := hO2 - _ ≤ (2 * π * p.L) / Real.log 2 * (3 * Real.sqrt p.X) ^ 2 := by - apply mul_le_mul _ _ (sq_nonneg _) (by positivity) - · exact div_le_div_of_nonneg_right hWle hlog2.le - · exact pow_le_pow_left₀ hsuma0 hsuma 2 - _ = 2 * π / Real.log 2 * 9 * (p.L * p.X) := by - rw [mul_pow, Real.sq_sqrt (by linarith)]; ring - _ ≤ 2 * π / Real.log 2 * 9 * (p.L ^ 2 * p.X) := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - have hLL : p.L ≤ p.L ^ 2 := by nlinarith - exact mul_le_mul_of_nonneg_right hLL (by linarith) - have split : 1 / (2 * π ^ 2) * (D + O1 + O2) - - p.T / π * ∑ n ∈ primeRange p.X, acoef n ^ 2 * ‖c n‖ ^ 2 * F.g (Real.log n) - = (1 / (2 * π ^ 2) * D - p.T / π * ∑ n ∈ primeRange p.X, acoef n ^ 2 * ‖c n‖ ^ 2 * F.g (Real.log n)) - + 1 / (2 * π ^ 2) * O1 + 1 / (2 * π ^ 2) * O2 := by ring - rw [split] - calc |(1 / (2 * π ^ 2) * D - p.T / π * ∑ n ∈ primeRange p.X, acoef n ^ 2 * ‖c n‖ ^ 2 * F.g (Real.log n)) - + 1 / (2 * π ^ 2) * O1 + 1 / (2 * π ^ 2) * O2| - ≤ |1 / (2 * π ^ 2) * D - p.T / π * ∑ n ∈ primeRange p.X, acoef n ^ 2 * ‖c n‖ ^ 2 * F.g (Real.log n)| - + |1 / (2 * π ^ 2) * O1| + |1 / (2 * π ^ 2) * O2| := abs_add_three _ _ _ - _ ≤ 1 / (2 * π ^ 2) * ((1 / 2 + |C2a|) * (8 + 8 * |cϱ|)) * (p.L ^ 2 * p.X) - + 1 / (2 * π ^ 2) * (16 * CMV * (2 * π) * |C1d|) * (p.L ^ 2 * p.X) - + 1 / (2 * π ^ 2) * (2 * π / Real.log 2 * 9) * (p.L ^ 2 * p.X) := - add_le_add (add_le_add bD bO1) bO2 - _ = (1 / (2 * π ^ 2)) * ((1 / 2 + |C2a|) * (8 + 8 * |cϱ|) + 16 * CMV * (2 * π) * |C1d| - + 2 * π / Real.log 2 * 9) * (p.L ^ 2 * p.X) := by ring - + obtain ⟨C, T₀, h⟩ := prop_PP_vonMangoldt_bound (cϱ := cϱ) hcheb hMV hlam + refine ⟨C, T₀, fun q c hc p F hplam hT hF => ?_⟩ + let c' : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) * c n + have hnorm : ∀ n, ‖c' n‖ = Λ n * ‖c n‖ := fun n => by + simp [c', abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] + have hle : ∀ n, ‖c' n‖ ≤ Λ n := fun n => by + rw [hnorm] + exact mul_le_of_le_one_right ArithmeticFunction.vonMangoldt_nonneg (hc.toCoeffOK.norm_le n) + have hsum : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c' n‖ ^ 2 / n * F.g (Real.log n) + = sumA2gCoprime q p.X F.g := by + rw [← sum_w_eq_sumA2gCoprime hc p.X F.g] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [hnorm, acoef_sq]; ring + rw [PXc_eq_PcDir, ← hsum] + exact h c' hle p F hplam hT hF -/-- **[prop:PP] for L(s,chi)** ([thm:E] (iii)): under H-cheb + H-MV + CoeffUnimodular, -|𝓜[P_{X,c},P_{X,c}] − (T/π)·Σ_{n≤X,(n,q)=1}Λ(n)²/n·g(log n)| ≤ C·L²X for T ≥ T₀, over the -window-generic Core taper layer. -Proof: the q-uniform form `prop_PP_chi_uniform` above, specialised to (q, c) — the constant and -threshold do not depend on them. -/ +/-- **[prop:PP] for L(s,chi)** (`[thm:E]` (iii)). -/ theorem prop_PP_chi (hcheb : Zeta23.ChebyshevMertens) (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hc : CoeffUnimodular q c) (hlam : 0 < lam ∧ lam ≤ 1) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => diff --git a/zeta23/Zeta23/ThmE/PrimeSideChi.lean b/zeta23/Zeta23/ThmE/PrimeSideChi.lean index bdfbbe56c3..76552704c9 100644 --- a/zeta23/Zeta23/ThmE/PrimeSideChi.lean +++ b/zeta23/Zeta23/ThmE/PrimeSideChi.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ -import Zeta23.PrimeSideA.Basic -import Zeta23.PrimeSideA.Ends +/- +Zeta23/ThmE/PrimeSideChi.lean — §5-χ prime-side theorems for Dirichlet L-functions L(s,χ), +dispatched via the unified `PrimeSide` generic engines (`gamma_*`, `prop_trace_generic`, +`lem_ends_nu`, `Mform_add_*`). +-/ +import Zeta23.PrimeSideA import Zeta23.ThmE.Hypotheses open MeasureTheory Real Set Finset @@ -19,7 +23,6 @@ open Zeta23.PrimeSide /-! ## Definitions: the χ-analogues of GentryA / trGtA / trGt2A / MtotalA -/ - variable (κ q : ℕ) (c : ℕ → ℂ) /-- `G_{kl}` for L(s,χ), abstract-taper form (mirror of `GentryA` with `ν_{X,χ}`). -/ @@ -38,1402 +41,175 @@ def trGt2ChiA (p : Setting) (F : LocalFun) : ℝ := def MtotalChiA (p : Setting) (F : LocalFun) : ℝ := Mform F.Phi p.T (nuXc κ q c p.X) (nuXc κ q c p.X) -/-! ## The six §5-χ obligations (proofs mirror Zeta23/PrimeSideA.lean) -/ - -variable {cϱ lam : ℝ} - -/-! ## The large-T regime for χ: elementary consequences -/ - -section RegimeChi - -/-- From H-Γ(χ)'s Stirling bound: `|μ_χ| ≤ C·l` on `[T, 2T]` for large `T` (C = C(κ,q)). -/ -lemma muq_abs_le (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : - ∃ C T₀ : ℝ, 0 < C ∧ ∀ p : Setting, T₀ ≤ p.T → - ∀ τ ∈ Set.Icc p.T (2 * p.T), |muq κ q τ| ≤ C * Zeta23.l p.T := by - obtain ⟨Cs, hCs⟩ := hΓq.stirling - refine ⟨Real.log q + Real.log 2 + 1 + |Cs|, 2 * π * Real.exp 1, ?_, ?_⟩ - · have h1 : (0:ℝ) ≤ Real.log q := Real.log_nonneg (by exact_mod_cast hq) - have h2 : (0:ℝ) < Real.log 2 := Real.log_pos one_lt_two - positivity - intro p hT τ hτ - have hπ : (0:ℝ) < π := Real.pi_pos - have he1 : (1:ℝ) ≤ Real.exp 1 := by linarith [Real.add_one_le_exp 1] - have hT0 : 2 * π ≤ p.T := by nlinarith - have hl1 : 1 ≤ Zeta23.l p.T := by - rw [Zeta23.l, ← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - rw [le_div_iff₀ (by positivity)] - nlinarith - have hτpos : (0:ℝ) < τ := by nlinarith [hτ.1, Real.pi_gt_three] - have hτ1 : 1 ≤ |τ| := by - rw [abs_of_pos hτpos] - nlinarith [hτ.1, Real.pi_gt_three] - have hst := hCs τ hτ1 - have hq0 : (0:ℝ) < q := by exact_mod_cast lt_of_lt_of_le zero_lt_one hq - have hx1 : (1:ℝ) ≤ (q:ℝ) * |τ| / (2 * π) := by - rw [le_div_iff₀ (by positivity), abs_of_pos hτpos] - have h2 : 2 * π ≤ τ := le_trans hT0 hτ.1 - have hq1 : (1:ℝ) ≤ (q:ℝ) := by exact_mod_cast hq - nlinarith - have hlog0 : 0 ≤ Real.log ((q:ℝ) * |τ| / (2 * π)) := Real.log_nonneg hx1 - have hlogup : Real.log ((q:ℝ) * |τ| / (2 * π)) ≤ Real.log q + Real.log 2 + Zeta23.l p.T := by - have hτT : |τ| ≤ 2 * p.T := by - rw [abs_of_pos hτpos] - exact hτ.2 - calc Real.log ((q:ℝ) * |τ| / (2 * π)) ≤ Real.log ((q:ℝ) * (2 * p.T) / (2 * π)) := by - apply Real.log_le_log (by positivity) - gcongr - _ = Real.log q + Real.log 2 + Zeta23.l p.T := by - have hTpos : (0:ℝ) < p.T := by nlinarith - rw [show (q:ℝ) * (2 * p.T) / (2 * π) = (q:ℝ) * (2 * (p.T / (2 * π))) by ring, - Real.log_mul (ne_of_gt hq0) (by positivity), - Real.log_mul (by norm_num) (ne_of_gt (by positivity : (0:ℝ) < p.T / (2 * π))), Zeta23.l] - ring - have hCsb : Cs / τ ^ 2 ≤ |Cs| := by - calc Cs / τ ^ 2 ≤ |Cs| / τ ^ 2 := by gcongr; exact le_abs_self _ - _ ≤ |Cs| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos - nlinarith [sq_abs τ] - _ = |Cs| := div_one _ - have h2π : (1:ℝ) ≤ 2 * π := by nlinarith [Real.pi_gt_three] - calc |muq κ q τ| - = |(muq κ q τ - (1 / (2 * π)) * Real.log ((q:ℝ) * |τ| / (2 * π))) - + (1 / (2 * π)) * Real.log ((q:ℝ) * |τ| / (2 * π))| := by ring_nf - _ ≤ |muq κ q τ - (1 / (2 * π)) * Real.log ((q:ℝ) * |τ| / (2 * π))| - + |(1 / (2 * π)) * Real.log ((q:ℝ) * |τ| / (2 * π))| := abs_add_le _ _ - _ ≤ |Cs| + (Real.log q + Real.log 2 + Zeta23.l p.T) := by - have e1 : |(1 / (2 * π)) * Real.log ((q:ℝ) * |τ| / (2 * π))| - ≤ Real.log q + Real.log 2 + Zeta23.l p.T := by - rw [abs_mul, abs_of_pos (by positivity : (0:ℝ) < 1 / (2 * π)), abs_of_nonneg hlog0] - calc 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) - ≤ 1 * Real.log ((q:ℝ) * |τ| / (2 * π)) := by - apply mul_le_mul_of_nonneg_right _ hlog0 - rw [div_le_one (by positivity)] - exact h2π - _ = Real.log ((q:ℝ) * |τ| / (2 * π)) := one_mul _ - _ ≤ Real.log q + Real.log 2 + Zeta23.l p.T := hlogup - linarith [hst.trans hCsb] - _ ≤ (Real.log q + Real.log 2 + 1 + |Cs|) * Zeta23.l p.T := by - have hlq : (0:ℝ) ≤ Real.log q := Real.log_nonneg (by exact_mod_cast hq) - have hl2 : (0:ℝ) < Real.log 2 := Real.log_pos one_lt_two - nlinarith [abs_nonneg Cs] - -/-- `|P_{X,c}(τ)| ≤ √X` for `X` large (mirror of `PX_abs_le`; only `‖c‖ ≤ 1` is used). -/ -lemma PXc_abs_le (hcheb : ChebyshevMertens) (hc : CoeffOK q c) : - ∃ x₀ : ℝ, 1 ≤ x₀ ∧ ∀ X : ℝ, x₀ ≤ X → ∀ τ : ℝ, |PXc c X τ| ≤ Real.sqrt X := by - obtain ⟨x₀, hx₀⟩ := hcheb.cheb1b - refine ⟨max x₀ 1, le_max_right _ _, fun X hX τ => ?_⟩ - have hXx : x₀ ≤ X := (le_max_left _ _).trans hX - have hX1 : (1:ℝ) ≤ X := (le_max_right _ _).trans hX - have hπ3 : (3:ℝ) < π := Real.pi_gt_three - unfold PXc - rw [abs_mul, abs_neg, abs_of_pos (by positivity : (0:ℝ) < 1 / π)] - have hsum : |(∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, - ((Λ n : ℝ) : ℂ) * c n * (n : ℂ) ^ (-(1 / 2 : ℂ) - Complex.I * τ)).re| - ≤ ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, Λ n / Real.sqrt n := by - refine (Complex.abs_re_le_norm _).trans ?_ - refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun n hn => ?_) - have hn0 : 0 < n := (Finset.mem_Ioc.1 hn).1 - rw [norm_mul, norm_mul] - have h1 : ‖((Λ n : ℝ) : ℂ)‖ = Λ n := by - rw [Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] - have h2 : ‖(n : ℂ) ^ (-(1 / 2 : ℂ) - Complex.I * τ)‖ = 1 / Real.sqrt n := by - rw [Complex.norm_natCast_cpow_of_pos hn0] - have hre : (-(1 / 2 : ℂ) - Complex.I * τ).re = -(1/2 : ℝ) := by simp - rw [hre, Real.rpow_neg (Nat.cast_nonneg n), ← Real.sqrt_eq_rpow, one_div] - rw [h1, h2] - calc Λ n * ‖c n‖ * (1 / Real.sqrt n) ≤ Λ n * 1 * (1 / Real.sqrt n) := by - gcongr - exact hc.norm_le n - _ = Λ n / Real.sqrt n := by ring - calc 1 / π * |(∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, - ((Λ n : ℝ) : ℂ) * c n * (n : ℂ) ^ (-(1 / 2 : ℂ) - Complex.I * τ)).re| - ≤ 1 / π * ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, Λ n / Real.sqrt n := by - apply mul_le_mul_of_nonneg_left hsum (by positivity) - _ ≤ 1 / π * (3 * Real.sqrt X) := by - apply mul_le_mul_of_nonneg_left (hx₀ X hXx) (by positivity) - _ ≤ Real.sqrt X := by - rw [div_mul_eq_mul_div, one_mul, div_le_iff₀ (by positivity)] - nlinarith [Real.sqrt_nonneg X] - -end RegimeChi - -/-! ## The P-part Fourier identities for χ (Core-typed; phases via the complex Dirichlet kernel) -/ +/-- Re-export of the complex geometric-sum bound for downstream consumers. -/ +abbrev abs_sin_mul_norm_geom_le := PrimeSide.abs_sin_mul_norm_geom_le -section PPartChi +/-! ## Bridge `PXc c X = PcDir X (fun n => -(Λ n : ℂ) * c n)` -/ -variable {cϱ : ℝ} {p : Setting} {F : LocalFun} +lemma PXc_eq_PcDir (c : ℕ → ℂ) (X : ℝ) : + PXc c X = PcDir X (fun n => -((Λ n : ℝ) : ℂ) * c n) := by + funext τ + rw [PXc_eq_sum_cos_sin, PcDir, Finset.mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun n hn => ?_ + have hn0 : (0 : ℝ) < n := by exact_mod_cast (Finset.mem_Ioc.mp hn).1 + rw [Real.rpow_neg hn0.le, ← Real.sqrt_eq_rpow] + have hre : (-((Λ n : ℝ) : ℂ) * c n).re = -(Λ n : ℝ) * (c n).re := by simp + have him : (-((Λ n : ℝ) : ℂ) * c n).im = -(Λ n : ℝ) * (c n).im := by simp + rw [hre, him]; field_simp; ring -/-- Core copy of `integral_phiHat_sq_mul_sin` (the original is typed over full `LocalHyps`). -/ -lemma integral_phiHat_sq_mul_sin_core (hF : LocalHypsCoreW cϱ p F) (y : ℝ) : - ∫ r, F.phiHat r ^ 2 * Real.sin (r * y) = 0 := by - have h := MeasureTheory.integral_neg_eq_self (fun r => F.phiHat r ^ 2 * Real.sin (r * y)) - MeasureTheory.volume - simp only [hF.phiHat_even, neg_mul, Real.sin_neg, mul_neg, MeasureTheory.integral_neg] at h - linarith - -/-- Core copy of `integral_phiHat_sq_mul_cos_shift`. -/ -lemma integral_phiHat_sq_mul_cos_shift_core (hF : LocalHypsCoreW cϱ p F) (t y : ℝ) : - ∫ r, F.phiHat r ^ 2 * Real.cos ((t + r) * y) = 2 * π * F.Aphi y * Real.cos (t * y) := by - have h1 : ∀ r, F.phiHat r ^ 2 * Real.cos ((t + r) * y) - = Real.cos (t * y) * (F.phiHat r ^ 2 * Real.cos (r * y)) - - Real.sin (t * y) * (F.phiHat r ^ 2 * Real.sin (r * y)) := by - intro r - rw [add_mul, Real.cos_add] - ring - simp_rw [h1] - rw [MeasureTheory.integral_sub, MeasureTheory.integral_const_mul, - MeasureTheory.integral_const_mul, hF.phiHat_sq_fourier, integral_phiHat_sq_mul_sin_core hF] - · ring - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_cos_le_one _)).const_mul _ - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_sin_le_one _)).const_mul _ - -/-- `∫ φ̂(r)² Re(z·e^{−i(t+r)y}) dr = 2π A_φ(y)·Re(z e^{−ity})` — the phase-twisted Fourier identity. -/ -lemma integral_phiHat_sq_re_twist_core (hF : LocalHypsCoreW cϱ p F) (z : ℂ) (t y : ℝ) : - ∫ r, F.phiHat r ^ 2 * (z * Complex.exp (-Complex.I * ((t + r) * y))).re - = 2 * π * F.Aphi y * (z * Complex.exp (-Complex.I * (t * y))).re := by - have key : ∀ r : ℝ, (z * Complex.exp (-Complex.I * ((t + r) * y))).re - = (z * Complex.exp (-Complex.I * (t * y))).re * Real.cos (r * y) - + (z * Complex.exp (-Complex.I * (t * y))).im * Real.sin (r * y) := by - intro r - have e1 : Complex.exp (-Complex.I * ((t + r) * y)) - = Complex.exp (-Complex.I * (t * y)) * Complex.exp (-Complex.I * (r * y)) := by - rw [← Complex.exp_add] - congr 1 - ring - rw [e1, ← mul_assoc] - rw [show -Complex.I * ((r:ℝ) * y) = ((-(r * y) : ℝ) : ℂ) * Complex.I by - push_cast; ring] - rw [Complex.exp_mul_I] - simp only [Complex.mul_re, Complex.add_re, Complex.add_im, Complex.mul_im, - Complex.cos_ofReal_re, Complex.sin_ofReal_re, Complex.cos_ofReal_im, - Complex.sin_ofReal_im, Real.cos_neg, Real.sin_neg] - ring_nf - simp [Complex.I_re, Complex.I_im] - have e2 : ∀ r : ℝ, F.phiHat r ^ 2 * (z * Complex.exp (-Complex.I * ((t + r) * y))).re - = (z * Complex.exp (-Complex.I * (t * y))).re * (F.phiHat r ^ 2 * Real.cos (r * y)) - + (z * Complex.exp (-Complex.I * (t * y))).im * (F.phiHat r ^ 2 * Real.sin (r * y)) := by - intro r - rw [key r] - ring - simp_rw [e2] - have hint1 : MeasureTheory.Integrable (fun r => F.phiHat r ^ 2 * Real.cos (r * y)) := - hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_cos_le_one _) - have hint2 : MeasureTheory.Integrable (fun r => F.phiHat r ^ 2 * Real.sin (r * y)) := - hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) (fun x => Real.abs_sin_le_one _) - rw [MeasureTheory.integral_add (hint1.const_mul _) (hint2.const_mul _), - MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul, - hF.phiHat_sq_fourier, integral_phiHat_sq_mul_sin_core hF] - ring - -end PPartChi - -/-! ## μ_χ increments and positivity (mirrors of the ζ-side lemmas; constants depend on κ, q) -/ +lemma PXc_continuous (_hX : 0 < X) : Continuous (PXc c X) := by + rw [PXc_eq_PcDir]; exact PcDir_continuous X _ -section MuqAnalytic +/-! ## Regime bounds for `μ_χ` and `P_{X,χ}` -/ -variable {κ q : ℕ} +variable {cϱ lam : ℝ} -/-- Crude global bound: |μ_χ(τ)| ≤ M + |τ| (mirror of mu_linear_bound; q enters only M). -/ -lemma muq_linear_bound (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : - ∃ M : ℝ, 0 ≤ M ∧ ∀ τ, |muq κ q τ| ≤ M + |τ| := by - obtain ⟨C, hC⟩ := hΓq.stirling - obtain ⟨M₁, hM₁⟩ := isCompact_Icc.exists_bound_of_continuousOn - (hΓq.smooth.continuous.continuousOn (s := Set.Icc (-1 : ℝ) 1)) - have hq1 : (1:ℝ) ≤ (q:ℝ) := by exact_mod_cast hq - have hlq : (0:ℝ) ≤ Real.log q := Real.log_nonneg hq1 - refine ⟨max M₁ (1 + Real.log q + |C|), le_max_of_le_right (by positivity), fun τ => ?_⟩ - rcases le_or_gt 1 |τ| with h1 | h1 - · have hst := hC τ h1 - have hq0 : (0:ℝ) < q := lt_of_lt_of_le zero_lt_one hq1 - have hx : 0 < (q:ℝ) * |τ| / (2 * π) := by positivity - have hπ3 := Real.pi_gt_three - have hlog : |Real.log ((q:ℝ) * |τ| / (2 * π))| ≤ Real.log q + |τ| + 2 * π := by - rw [abs_le] - constructor - · have h2 := Real.log_le_sub_one_of_pos (inv_pos.2 hx) - rw [Real.log_inv] at h2 - have h3 : ((q:ℝ) * |τ| / (2 * π))⁻¹ ≤ 2 * π := by - rw [inv_div, div_le_iff₀ (by positivity : (0:ℝ) < (q:ℝ) * |τ|)] - nlinarith [mul_le_mul hq1 h1 zero_le_one (le_trans zero_le_one hq1), Real.pi_pos] - nlinarith - · have h2 : Real.log ((q:ℝ) * |τ| / (2 * π)) ≤ Real.log ((q:ℝ) * |τ|) := by - apply Real.log_le_log hx - rw [div_le_iff₀ (by positivity)] - nlinarith [mul_nonneg (le_trans zero_le_one hq1) (abs_nonneg τ), Real.pi_gt_three] - have h3 : Real.log ((q:ℝ) * |τ|) = Real.log q + Real.log |τ| := - Real.log_mul (by positivity) (by positivity) - have h4 : Real.log |τ| ≤ |τ| - 1 := by - have := Real.log_le_sub_one_of_pos (lt_of_lt_of_le zero_lt_one h1) - linarith - nlinarith - have hCτ : C / τ ^ 2 ≤ |C| := by - calc C / τ ^ 2 ≤ |C| / τ ^ 2 := by gcongr; exact le_abs_self _ - _ ≤ |C| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos - nlinarith [sq_abs τ] - _ = |C| := div_one _ - have h2 : |1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| ≤ Real.log q + 1 + |τ| := by - rw [abs_mul, abs_of_pos (by positivity : (0:ℝ) < 1 / (2 * π))] - have h2π1 : (1:ℝ) ≤ 2 * π := by nlinarith - have e1 : 1 / (2 * π) * |Real.log ((q:ℝ) * |τ| / (2 * π))| - ≤ 1 / (2 * π) * (Real.log q + |τ| + 2 * π) := - mul_le_mul_of_nonneg_left hlog (by positivity) - have e2 : 1 / (2 * π) * (Real.log q + |τ| + 2 * π) - = (Real.log q + |τ|) / (2 * π) + 1 := by field_simp - have e3 : (Real.log q + |τ|) / (2 * π) ≤ Real.log q + |τ| := by - apply div_le_self (by positivity) - exact h2π1 - linarith - calc |muq κ q τ| - = |(muq κ q τ - 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))) - + 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| := by ring_nf - _ ≤ |muq κ q τ - 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| - + |1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| := abs_add_le _ _ - _ ≤ |C| + (Real.log q + 1 + |τ|) := add_le_add (hst.trans hCτ) h2 - _ ≤ max M₁ (1 + Real.log q + |C|) + |τ| := by - linarith [le_max_right M₁ (1 + Real.log q + |C|)] - · have := hM₁ τ ⟨by linarith [neg_abs_le τ], by linarith [le_abs_self τ]⟩ - simp only [Real.norm_eq_abs] at this - linarith [le_max_left M₁ (1 + Real.log q + |C|), abs_nonneg τ] +lemma muq_abs_le (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : + ∃ C T₀ : ℝ, 0 < C ∧ ∀ p : Setting, T₀ ≤ p.T → + ∀ τ ∈ Set.Icc p.T (2 * p.T), |muq κ q τ| ≤ C * Zeta23.l p.T := + gamma_abs_le hΓq (by exact_mod_cast hq) -/-- Increment bound (mirror of mu_increment_bound, unified K(|r| + r²)/t shape). -/ -lemma muq_increment_bound (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : +lemma muq_increment_bound {κ q : ℕ} (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : ∃ K : ℝ, 0 ≤ K ∧ ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |muq κ q (t + r) - muq κ q t| ≤ K * (|r| + r ^ 2) / t := by - obtain ⟨C₁, hC₁⟩ := hΓq.deriv_bound - obtain ⟨M, hM0, hM⟩ := muq_linear_bound hΓq hq - refine ⟨max (2 * |C₁|) (18 * M + 18), le_max_of_le_right (by positivity), fun t ht r => ?_⟩ + obtain ⟨K, hK0, hK⟩ := gamma_increment_bound hΓq (by exact_mod_cast hq) + refine ⟨max K 10, le_max_of_le_right (by norm_num), fun t ht r => (hK t ht r).trans ?_⟩ have ht0 : 0 < t := by linarith - rw [le_div_iff₀ ht0] - rcases le_or_gt |r| (t / 2) with hr | hr - · have hmvt : ‖muq κ q (t + r) - muq κ q t‖ ≤ (2 * |C₁| / t) * ‖(t + r) - t‖ := by - apply Convex.norm_image_sub_le_of_norm_deriv_le (s := Set.Icc (t / 2) (3 * t / 2)) - · intro x _ - exact hΓq.smooth.contDiffAt.differentiableAt (by simp) - · intro x hx - have hx1 : 1 ≤ |x| := by - rw [abs_of_pos (by linarith [hx.1])] - linarith [hx.1] - calc ‖deriv (muq κ q) x‖ = |deriv (muq κ q) x| := Real.norm_eq_abs _ - _ ≤ C₁ / |x| := hC₁ x hx1 - _ ≤ |C₁| / |x| := by gcongr; exact le_abs_self _ - _ ≤ |C₁| / (t / 2) := by - apply div_le_div_of_nonneg_left (abs_nonneg _) (by linarith) - rw [abs_of_pos (by linarith [hx.1])] - exact hx.1 - _ = 2 * |C₁| / t := by field_simp - · exact convex_Icc _ _ - · constructor <;> linarith - · constructor <;> linarith [le_abs_self r, neg_abs_le r] - simp only [add_sub_cancel_left, Real.norm_eq_abs] at hmvt - calc |muq κ q (t + r) - muq κ q t| * t ≤ (2 * |C₁| / t * |r|) * t := by gcongr - _ = 2 * |C₁| * |r| := by field_simp - _ ≤ max (2 * |C₁|) (18 * M + 18) * (|r| + r ^ 2) := by - nlinarith [le_max_left (2 * |C₁|) (18 * M + 18), abs_nonneg r, sq_nonneg r, - le_max_right (2 * |C₁|) (18 * M + 18)] - · have h1 : |muq κ q (t + r) - muq κ q t| ≤ 2 * M + 2 + 7 * |r| := by - calc |muq κ q (t + r) - muq κ q t| ≤ |muq κ q (t + r)| + |muq κ q t| := abs_sub _ _ - _ ≤ (M + |t + r|) + (M + |t|) := add_le_add (hM _) (hM _) - _ ≤ (M + (|t| + |r|)) + (M + |t|) := by linarith [abs_add_le t r] - _ = 2 * M + 2 * |t| + |r| := by ring - _ ≤ 2 * M + 2 + 7 * |r| := by - rw [abs_of_pos ht0] - nlinarith - calc |muq κ q (t + r) - muq κ q t| * t ≤ (2 * M + 2 + 7 * |r|) * t := by gcongr - _ ≤ (2 * M + 2 + 7 * |r|) * (2 * |r|) := by - apply mul_le_mul_of_nonneg_left (by linarith) (by positivity) - _ = (4 * M + 4) * |r| + 14 * |r| ^ 2 := by ring - _ = (4 * M + 4) * |r| + 14 * r ^ 2 := by rw [sq_abs] - _ ≤ max (2 * |C₁|) (18 * M + 18) * (|r| + r ^ 2) := by - nlinarith [le_max_right (2 * |C₁|) (18 * M + 18), abs_nonneg r, sq_nonneg r, hM0] - -/-- μ_χ ≥ 0 far out (mirror of mu_nonneg_eventually; uses q ≥ 1 ⇒ log(qτ/2π) ≥ log(τ/2π)). -/ -lemma muq_nonneg_eventually (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : - ∃ τ₀ : ℝ, 0 ≤ τ₀ ∧ ∀ x, τ₀ ≤ x → 0 ≤ muq κ q x := by - obtain ⟨C, hC⟩ := hΓq.stirling - refine ⟨2 * π * Real.exp (2 * π * |C|), by positivity, fun x hx => ?_⟩ - have hq1 : (1:ℝ) ≤ (q:ℝ) := by exact_mod_cast hq - have h1 : (1:ℝ) ≤ Real.exp (2 * π * |C|) := Real.one_le_exp (by positivity) - have hπ3 := Real.pi_gt_three - have hx1 : 1 ≤ x := by nlinarith - have hx0 : 0 < x := by linarith - have hst := hC x (by rwa [abs_of_pos hx0]) - rw [abs_of_pos hx0] at hst - have hlog : 2 * π * |C| ≤ Real.log ((q:ℝ) * x / (2 * π)) := by - have e1 : Real.exp (2 * π * |C|) ≤ (q:ℝ) * x / (2 * π) := by - rw [le_div_iff₀ (by positivity)] - nlinarith - calc 2 * π * |C| = Real.log (Real.exp (2 * π * |C|)) := (Real.log_exp _).symm - _ ≤ Real.log ((q:ℝ) * x / (2 * π)) := Real.log_le_log (Real.exp_pos _) e1 - have hCx : C / x ^ 2 ≤ |C| := by - calc C / x ^ 2 ≤ |C| / x ^ 2 := by gcongr; exact le_abs_self _ - _ ≤ |C| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos - nlinarith - _ = |C| := div_one _ - have h2 : |C| ≤ 1 / (2 * π) * Real.log ((q:ℝ) * x / (2 * π)) := by - rw [div_mul_eq_mul_div, one_mul, le_div_iff₀ (by positivity)] - linarith - linarith [(abs_le.1 hst).1] - -end MuqAnalytic - -/-! ## The complex Dirichlet kernel bound (mirror of the cosine-kernel lemmas) -/ - -section KernelChi - -variable {cϱ : ℝ} {p : Setting} {F : LocalFun} - -/-- `|sin(θ/2)|·‖Σ_{k ?_ - rw [hw, ← Complex.exp_nat_mul] - congr 1 - push_cast - ring - have hw1 : w ≠ 1 := by - intro hww - rw [hw, Complex.exp_eq_one_iff] at hww - obtain ⟨n, hn⟩ := hww - have hθ : θ = n * (2 * π) := by - have h2 := congrArg Complex.im hn - simpa [Complex.mul_im, Complex.I_re, Complex.I_im] using h2 - apply hs - rw [hθ, show (n : ℝ) * (2 * π) / 2 = n * π by ring] - exact Real.sin_int_mul_pi n - have hnormw : ‖w - 1‖ = 2 * |Real.sin (θ / 2)| := by - rw [hw, Complex.exp_mul_I] - have hre : (Complex.cos ↑θ + Complex.sin ↑θ * Complex.I - 1).re = Real.cos θ - 1 := by - simp [Complex.sub_re, Complex.add_re, Complex.mul_re, Complex.I_re, Complex.I_im, - Complex.one_re, Complex.cos_ofReal_re, Complex.sin_ofReal_im, Complex.sin_ofReal_re] - have him : (Complex.cos ↑θ + Complex.sin ↑θ * Complex.I - 1).im = Real.sin θ := by - simp [Complex.sub_im, Complex.add_im, Complex.mul_im, Complex.I_re, Complex.I_im, - Complex.one_im, Complex.cos_ofReal_im, Complex.sin_ofReal_re, Complex.sin_ofReal_im] - rw [show ‖Complex.cos ↑θ + Complex.sin ↑θ * Complex.I - 1‖ - = Real.sqrt ((Real.cos θ - 1) ^ 2 + Real.sin θ ^ 2) by - rw [← hre, ← him] - rw [Complex.norm_eq_sqrt_sq_add_sq]] - have e : (Real.cos θ - 1) ^ 2 + Real.sin θ ^ 2 = (2 * Real.sin (θ / 2)) ^ 2 := by - have h1 : Real.cos (2 * (θ / 2)) = 2 * Real.cos (θ / 2) ^ 2 - 1 := Real.cos_two_mul (θ / 2) - have h2 : Real.sin (θ / 2) ^ 2 + Real.cos (θ / 2) ^ 2 = 1 := Real.sin_sq_add_cos_sq (θ / 2) - have h3 : 2 * (θ / 2) = θ := by ring - rw [h3] at h1 - have hpyth := Real.sin_sq_add_cos_sq θ - nlinarith - rw [e, Real.sqrt_sq_eq_abs, abs_mul, abs_two] - have hnormw0 : (0:ℝ) < ‖w - 1‖ := by - rw [hnormw] - have := abs_pos.2 hs - positivity - rw [hsum, geom_sum_eq hw1, norm_div] - have hwd : ‖w ^ d - 1‖ ≤ 2 := by - calc ‖w ^ d - 1‖ ≤ ‖w ^ d‖ + ‖(1:ℂ)‖ := norm_sub_le _ _ - _ = ‖w‖ ^ d + 1 := by rw [norm_pow, norm_one] - _ = 1 + 1 := by - rw [hw, Complex.norm_exp_ofReal_mul_I, one_pow] - _ = 2 := by norm_num - rw [hnormw] - rw [mul_div_assoc'] - rw [div_le_one (by rw [← hnormw]; exact hnormw0)] - calc |Real.sin (θ / 2)| * ‖w ^ d - 1‖ ≤ |Real.sin (θ / 2)| * 2 := - mul_le_mul_of_nonneg_left hwd (abs_nonneg _) - _ = 2 * |Real.sin (θ / 2)| := by ring - -/-- Mirror of Aphi_mul_sum_cos_le for the complex kernel: A_φ(y)·‖Σ_{k ?_ - rw [← Complex.exp_add] - congr 1 - simp only [Setting.tau] - push_cast - ring - have hnorm : ‖∑ k ∈ Finset.range p.d, Complex.exp ((-(p.tau k * y) : ℝ) * Complex.I)‖ - = ‖∑ k ∈ Finset.range p.d, Complex.exp (((k : ℝ) * (-(p.h * y)) : ℝ) * Complex.I)‖ := by - rw [hfac, norm_mul, Complex.norm_exp_ofReal_mul_I, one_mul] - have hdir := abs_sin_mul_norm_geom_le (-(p.h * y)) p.d - have hsin_eq : |Real.sin (-(p.h * y) / 2)| = Real.sin (π * y / p.L) := by - have hθ : p.h * y / 2 = π * y / p.L := by - simp only [Setting.h] - field_simp - rw [show -(p.h * y) / 2 = -(p.h * y / 2) by ring, Real.sin_neg, abs_neg, hθ] - rw [abs_of_nonneg] - apply Real.sin_nonneg_of_nonneg_of_le_pi - · positivity - · rw [div_le_iff₀ hL] - nlinarith [Real.pi_pos] - have hsin : 2 * m / p.L ≤ Real.sin (π * y / p.L) := two_min_div_le_sin hL hy0.le hyL.le - rw [hnorm] - set S := ‖∑ k ∈ Finset.range p.d, Complex.exp (((k : ℝ) * (-(p.h * y)) : ℝ) * Complex.I)‖ - with hS - have hS0 : 0 ≤ S := norm_nonneg _ - rw [hsin_eq] at hdir - have hS1 : 2 * m / p.L * S ≤ 1 := - (mul_le_mul_of_nonneg_right hsin hS0).trans hdir - have hS2 : 2 * m * S ≤ p.L := by - have h4 := mul_le_mul_of_nonneg_left hS1 hL.le - rw [mul_one, ← mul_assoc, mul_div_cancel₀ _ hL.ne'] at h4 - linarith - have hA1 : F.Aphi y ≤ p.L - y := (hF.Aphi_le y).trans (by simp [hyabs, hyL.le]) - have key : (p.L - y) * Real.log 2 ≤ p.L * m := by - rcases le_total y (p.L - y) with h | h - · rw [hm, min_eq_left h] - nlinarith - · rw [hm, min_eq_right h] - nlinarith - rw [le_div_iff₀ (by positivity)] - calc F.Aphi y * S * (2 * Real.log 2) ≤ (p.L - y) * S * (2 * Real.log 2) := by gcongr - _ = ((p.L - y) * Real.log 2) * (2 * S) := by ring - _ ≤ (p.L * m) * (2 * S) := by gcongr - _ = p.L * (2 * m * S) := by ring - _ ≤ p.L * p.L := by gcongr - _ = p.L ^ 2 := (sq _).symm - -/-- sin-analogue of the shifted Fourier identity. -/ -lemma integral_phiHat_sq_mul_sin_shift_core (hF : LocalHypsCoreW cϱ p F) (t y : ℝ) : - ∫ r, F.phiHat r ^ 2 * Real.sin ((t + r) * y) = 2 * π * F.Aphi y * Real.sin (t * y) := by - have h1 : ∀ r, F.phiHat r ^ 2 * Real.sin ((t + r) * y) - = Real.sin (t * y) * (F.phiHat r ^ 2 * Real.cos (r * y)) - + Real.cos (t * y) * (F.phiHat r ^ 2 * Real.sin (r * y)) := by - intro r - rw [add_mul, Real.sin_add] - ring - simp_rw [h1] - rw [MeasureTheory.integral_add, MeasureTheory.integral_const_mul, - MeasureTheory.integral_const_mul, hF.phiHat_sq_fourier, integral_phiHat_sq_mul_sin_core hF] - · ring - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_cos_le_one _)).const_mul _ - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_sin_le_one _)).const_mul _ - -/-- **P-part of [prop:trace] for χ at one grid point** (cos/sin-split form): - ∫ φ̂(r)² P_{X,c}(t+r) dr = −2 Σ_{n≤X} a_n A_φ(log n)·((c n).re cos(t log n) + (c n).im sin(t log n)). -/ -lemma P_part_chi_eq (hF : LocalHypsCoreW cϱ p F) (c : ℕ → ℂ) (t : ℝ) : - ∫ r, F.phiHat r ^ 2 * PXc c p.X (t + r) - = -2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) * F.Aphi (Real.log n) - * ((c n).re * Real.cos (t * Real.log n) + (c n).im * Real.sin (t * Real.log n)) := by - have h1 : (fun r => F.phiHat r ^ 2 * PXc c p.X (t + r)) - = fun r => ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - (-(1 / Real.pi) * ((Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)))) - * ((c n).re * (F.phiHat r ^ 2 * Real.cos ((t + r) * Real.log n)) - + (c n).im * (F.phiHat r ^ 2 * Real.sin ((t + r) * Real.log n))) := by - funext r - rw [PXc_eq_sum_cos_sin, Finset.mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [show (t + r) * Real.log n = (t + r) * Real.log n from rfl] - ring - rw [h1, MeasureTheory.integral_finsetSum] - · rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [MeasureTheory.integral_const_mul, MeasureTheory.integral_add, - MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul, - integral_phiHat_sq_mul_cos_shift_core hF, integral_phiHat_sq_mul_sin_shift_core hF] - · have hπ : Real.pi ≠ 0 := Real.pi_ne_zero - field_simp - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_cos_le_one _)).const_mul _ - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_sin_le_one _)).const_mul _ - · intro n _ - exact (((hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_cos_le_one _)).const_mul _).add - ((hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_sin_le_one _)).const_mul _)).const_mul _ - -end KernelChi - -/-- `P_{X,c}` is continuous in τ. -/ -lemma PXc_continuous (_hX : 0 < X) : Continuous (PXc c X) := by - unfold PXc - apply Continuous.mul continuous_const - apply Complex.continuous_re.comp - apply continuous_finsetSum - intro n hn - have hn0 : 0 < n := (Finset.mem_Ioc.1 hn).1 - have hnC : (n : ℂ) ≠ 0 := Nat.cast_ne_zero.2 hn0.ne' - apply Continuous.mul continuous_const - apply Continuous.const_cpow ?_ (Or.inl hnC) - fun_prop - -/-! ## Diagonal decomposition and the trace bounds for χ -/ - -section TraceChi - -variable {cϱ : ℝ} {p : Setting} {F : LocalFun} {κ q : ℕ} {c : ℕ → ℂ} - -/-- μ_χ-part bound at one grid point (mirror of mu_part_bound, K(|r|+r²)/t shape). -/ -lemma muq_part_bound (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) (hF : LocalHypsCoreW cϱ p F) {K : ℝ} - (_hK0 : 0 ≤ K) - (hK : ∀ t : ℝ, 2 ≤ t → ∀ r : ℝ, |muq κ q (t + r) - muq κ q t| ≤ K * (|r| + r ^ 2) / t) - {t : ℝ} (ht : 2 ≤ t) : - |(∫ r, F.phiHat r ^ 2 * muq κ q (t + r)) - 2 * π * F.a * p.L * muq κ q t| - ≤ K * ((∫ r, F.phiHat r ^ 2 * |r|) + (∫ r, F.phiHat r ^ 2 * r ^ 2)) / t := by - have ht0 : (0:ℝ) < t := by linarith - obtain ⟨M, hM0, hM⟩ := muq_linear_bound hΓq hq - have hmeas : MeasureTheory.AEStronglyMeasurable (fun r => F.phiHat r ^ 2 * muq κ q (t + r)) - MeasureTheory.volume := by - have hc' : Continuous fun r => F.phiHat r ^ 2 * muq κ q (t + r) := by - have h1 := hΓq.smooth.continuous - have h2 := hF.phiHat_cont - fun_prop - exact hc'.aestronglyMeasurable - have hint : MeasureTheory.Integrable (fun r => F.phiHat r ^ 2 * muq κ q (t + r)) := by - refine MeasureTheory.Integrable.mono' - ((hF.phiHat_sq_integrable.const_mul (M + t)).add hF.phiHat_sq_mul_abs_integrable) hmeas ?_ - refine Filter.Eventually.of_forall fun r => ?_ - simp only [Real.norm_eq_abs, Pi.add_apply] - rw [abs_mul, abs_of_nonneg (sq_nonneg _)] - have htr : |t + r| ≤ t + |r| := by - calc |t + r| ≤ |t| + |r| := abs_add_le _ _ - _ = t + |r| := by rw [abs_of_pos ht0] - calc F.phiHat r ^ 2 * |muq κ q (t + r)| ≤ F.phiHat r ^ 2 * (M + |t + r|) := by - gcongr - exact hM _ - _ ≤ F.phiHat r ^ 2 * (M + (t + |r|)) := by gcongr - _ = (M + t) * F.phiHat r ^ 2 + F.phiHat r ^ 2 * |r| := by ring - have hconst : 2 * π * F.a * p.L * muq κ q t = ∫ r, F.phiHat r ^ 2 * muq κ q t := by - rw [MeasureTheory.integral_mul_const, hF.phiHat_sq_integral] - rw [hconst, ← MeasureTheory.integral_sub hint (hF.phiHat_sq_integrable.mul_const _)] - have hgi : MeasureTheory.Integrable - (fun r => K * (F.phiHat r ^ 2 * |r|) / t + K * (F.phiHat r ^ 2 * r ^ 2) / t) := - ((hF.phiHat_sq_mul_abs_integrable.const_mul K).div_const t).add - ((hF.phiHat_sq_mul_sq_integrable.const_mul K).div_const t) - rw [← Real.norm_eq_abs] - calc ‖∫ r, F.phiHat r ^ 2 * muq κ q (t + r) - F.phiHat r ^ 2 * muq κ q t‖ - ≤ ∫ r, K * (F.phiHat r ^ 2 * |r|) / t + K * (F.phiHat r ^ 2 * r ^ 2) / t := by - refine MeasureTheory.norm_integral_le_of_norm_le hgi - (Filter.Eventually.of_forall fun r => ?_) - rw [Real.norm_eq_abs, ← mul_sub, abs_mul, abs_of_nonneg (sq_nonneg _)] - calc F.phiHat r ^ 2 * |muq κ q (t + r) - muq κ q t| - ≤ F.phiHat r ^ 2 * (K * (|r| + r ^ 2) / t) := by - gcongr - exact hK t ht r - _ = K * (F.phiHat r ^ 2 * |r|) / t + K * (F.phiHat r ^ 2 * r ^ 2) / t := by ring - _ = K * ((∫ r, F.phiHat r ^ 2 * |r|) + (∫ r, F.phiHat r ^ 2 * r ^ 2)) / t := by - rw [MeasureTheory.integral_add ((hF.phiHat_sq_mul_abs_integrable.const_mul K).div_const t) - ((hF.phiHat_sq_mul_sq_integrable.const_mul K).div_const t), - MeasureTheory.integral_div, MeasureTheory.integral_div, - MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul] - ring - -/-- Integrability of φ̂(r)² μ_χ(t+r). -/ -lemma muq_part_integrable (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) (hF : LocalHypsCoreW cϱ p F) - {t : ℝ} (ht0 : 0 < t) : - MeasureTheory.Integrable (fun r => F.phiHat r ^ 2 * muq κ q (t + r)) := by - obtain ⟨M, hM0, hM⟩ := muq_linear_bound hΓq hq - have hmeas : MeasureTheory.AEStronglyMeasurable (fun r => F.phiHat r ^ 2 * muq κ q (t + r)) - MeasureTheory.volume := by - have hc' : Continuous fun r => F.phiHat r ^ 2 * muq κ q (t + r) := by - have h1 := hΓq.smooth.continuous - have h2 := hF.phiHat_cont - fun_prop - exact hc'.aestronglyMeasurable - refine MeasureTheory.Integrable.mono' - ((hF.phiHat_sq_integrable.const_mul (M + t)).add hF.phiHat_sq_mul_abs_integrable) hmeas ?_ - refine Filter.Eventually.of_forall fun r => ?_ - simp only [Real.norm_eq_abs, Pi.add_apply] - rw [abs_mul, abs_of_nonneg (sq_nonneg _)] - have htr : |t + r| ≤ t + |r| := by - calc |t + r| ≤ |t| + |r| := abs_add_le _ _ - _ = t + |r| := by rw [abs_of_pos ht0] - calc F.phiHat r ^ 2 * |muq κ q (t + r)| ≤ F.phiHat r ^ 2 * (M + |t + r|) := by - gcongr - exact hM _ - _ ≤ F.phiHat r ^ 2 * (M + (t + |r|)) := by gcongr - _ = (M + t) * F.phiHat r ^ 2 + F.phiHat r ^ 2 * |r| := by ring - -/-- Integrability of φ̂(r)² P_{X,c}(t+r) (bounded × integrable). -/ -lemma PXc_part_integrable (hF : LocalHypsCoreW cϱ p F) (hc : CoeffOK q c) (t : ℝ) : - MeasureTheory.Integrable (fun r => F.phiHat r ^ 2 * PXc c p.X (t + r)) := by - refine hF.phiHat_sq_mul_integrable_of_bdd - ((PXc_continuous c p.X_pos).comp (continuous_const_add t)) - (c := 1 / Real.pi * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) * 2) (fun x => ?_) - rw [PXc_eq_sum_cos_sin, abs_mul, abs_neg, - abs_of_pos (by positivity : (0:ℝ) < 1 / Real.pi)] gcongr - refine (Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum fun n hn => ?_) - have hn0 : 0 < n := (Finset.mem_Ioc.1 hn).1 - have ha : (0:ℝ) ≤ (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) := by - have h0 := ArithmeticFunction.vonMangoldt_nonneg (n := n) - positivity - rw [abs_mul, abs_of_nonneg ha] - gcongr - have h1 := hc.norm_le n - have h2 : |(c n).re| ≤ 1 := (Complex.abs_re_le_norm _).trans h1 - have h3 : |(c n).im| ≤ 1 := (Complex.abs_im_le_norm _).trans h1 - calc |(c n).re * Real.cos ((t + x) * Real.log n) + (c n).im * Real.sin ((t + x) * Real.log n)| - ≤ |(c n).re * Real.cos ((t + x) * Real.log n)| - + |(c n).im * Real.sin ((t + x) * Real.log n)| := abs_add_le _ _ - _ ≤ 1 * 1 + 1 * 1 := by - rw [abs_mul, abs_mul] - exact add_le_add (mul_le_mul h2 (Real.abs_cos_le_one _) (abs_nonneg _) zero_le_one) - (mul_le_mul h3 (Real.abs_sin_le_one _) (abs_nonneg _) zero_le_one) - _ = 2 := by norm_num - -/-- Diagonal decomposition for χ: G_kk = μ_χ-part + P-part (no Π). -/ -lemma GentryChiA_diag_eq (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) (hF : LocalHypsCoreW cϱ p F) - (hc : CoeffOK q c) (k : ℤ) (hk : 0 < p.tau k) : - GentryChiA κ q c p F k k = (∫ r, F.phiHat r ^ 2 * muq κ q (p.tau k + r)) - + ∫ r, F.phiHat r ^ 2 * PXc c p.X (p.tau k + r) := by - unfold GentryChiA - have htrans : (∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) * nuXc κ q c p.X τ) - = ∫ r, F.phiHat r ^ 2 * nuXc κ q c p.X (p.tau k + r) := by - rw [← MeasureTheory.integral_add_right_eq_self _ (p.tau k)] - congr 1 - funext r - simp only [add_sub_cancel_right] - ring_nf - rw [htrans] - have hν : ∀ r, F.phiHat r ^ 2 * nuXc κ q c p.X (p.tau k + r) - = F.phiHat r ^ 2 * muq κ q (p.tau k + r) + F.phiHat r ^ 2 * PXc c p.X (p.tau k + r) := by - intro r - simp only [nuXc] - ring - simp_rw [hν] - rw [MeasureTheory.integral_add (muq_part_integrable hΓq hq hF hk) (PXc_part_integrable hF hc _)] - -/-- Sum of the P-parts over the grid (mirror of sum_P_part_bound via the complex kernel). -/ -lemma sum_P_part_chi_bound (hF : LocalHypsCoreW cϱ p F) (hc : CoeffOK q c) : - |∑ k ∈ Finset.range p.d, ∫ r, F.phiHat r ^ 2 * PXc c p.X (p.tau k + r)| - ≤ p.L ^ 2 / Real.log 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) := by - have hlog2 : 0 < Real.log 2 := Real.log_pos one_lt_two - simp_rw [P_part_chi_eq hF c] - rw [← Finset.mul_sum, Finset.sum_comm, abs_mul, abs_neg, abs_two] - have hterm : ∀ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - |∑ k ∈ Finset.range p.d, (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) * F.Aphi (Real.log n) - * ((c n).re * Real.cos (p.tau k * Real.log n) - + (c n).im * Real.sin (p.tau k * Real.log n))| - ≤ (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) * (p.L ^ 2 / (2 * Real.log 2)) := by - intro n hn - have hn0 : 0 < n := (Finset.mem_Ioc.1 hn).1 - have ha : (0:ℝ) ≤ (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) := by - have h0 := ArithmeticFunction.vonMangoldt_nonneg (n := n) - positivity - rcases Nat.lt_or_ge n 2 with hn2 | hn2 - · have hn1 : n = 1 := by omega - subst hn1 - simp [ArithmeticFunction.vonMangoldt_apply_one] - · have hre : ∀ θ : ℝ, (c n).re * Real.cos θ + (c n).im * Real.sin θ - = (c n * Complex.exp ((-θ : ℝ) * Complex.I)).re := by - intro θ - rw [show ((-θ : ℝ) : ℂ) = -(θ : ℂ) by push_cast; ring] - rw [show (-(θ:ℂ)) * Complex.I = ((-θ : ℝ) : ℂ) * Complex.I by push_cast; ring] - rw [Complex.exp_mul_I] - simp only [Complex.mul_re, Complex.add_re, Complex.add_im, Complex.mul_im, - Complex.cos_ofReal_re, Complex.sin_ofReal_re, Complex.cos_ofReal_im, - Complex.sin_ofReal_im, Real.cos_neg, Real.sin_neg, Complex.I_re, Complex.I_im] - ring - have hsum_eq : ∑ k ∈ Finset.range p.d, (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) - * F.Aphi (Real.log n) * ((c n).re * Real.cos (p.tau k * Real.log n) - + (c n).im * Real.sin (p.tau k * Real.log n)) - = (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) * (F.Aphi (Real.log n) - * (c n * ∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)).re) := by - rw [Finset.mul_sum, Complex.re_sum] - rw [Finset.mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun k _ => ?_ - rw [hre (p.tau k * Real.log n)] - ring - rw [hsum_eq, abs_mul, abs_of_nonneg ha] - gcongr - have hy : Real.log 2 ≤ Real.log n := Real.log_le_log two_pos (by exact_mod_cast hn2) - have hA0 := hF.Aphi_nonneg (Real.log n) - calc |F.Aphi (Real.log n) * (c n * ∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)).re| - = F.Aphi (Real.log n) * |(c n * ∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)).re| := by - rw [abs_mul, abs_of_nonneg hA0] - _ ≤ F.Aphi (Real.log n) * ‖∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)‖ := by - gcongr - refine (Complex.abs_re_le_norm _).trans ?_ - rw [norm_mul] - calc ‖c n‖ * ‖∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)‖ - ≤ 1 * ‖∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)‖ := by - gcongr - exact hc.norm_le n - _ = _ := one_mul _ - _ ≤ p.L ^ 2 / (2 * Real.log 2) := Aphi_mul_norm_tauKernel_le hF hy - calc 2 * |∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ∑ k ∈ Finset.range p.d, - (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) * F.Aphi (Real.log n) - * ((c n).re * Real.cos (p.tau k * Real.log n) - + (c n).im * Real.sin (p.tau k * Real.log n))| - ≤ 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, |∑ k ∈ Finset.range p.d, - (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) * F.Aphi (Real.log n) - * ((c n).re * Real.cos (p.tau k * Real.log n) - + (c n).im * Real.sin (p.tau k * Real.log n))| := by - gcongr - exact Finset.abs_sum_le_sum_abs _ _ - _ ≤ 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) * (p.L ^ 2 / (2 * Real.log 2)) := by - gcongr with n hn - exact hterm n hn - _ = p.L ^ 2 / Real.log 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) := by - rw [← Finset.sum_mul] - field_simp - -end TraceChi + nlinarith [le_max_left K 10, le_max_right K 10, abs_nonneg r, sq_nonneg r] -set_option linter.unusedVariables false in -set_option maxHeartbeats 4000000 in -/-- **[prop:trace] for L(s,χ)** ([thm:E] (iii); no Π-part, μ → μ_{κ,q}, ℓ₁ → ℓ_{1,χ}): -`tr G̃ = aL·N + O_q(L√X)` for any `N` with `|N − Tℓ_{1,χ}/2π| ≤ A log T` (the H-RvM(χ) main shape). -Constants depend on (cϱ, λ, A, κ, q, the H-Γ(χ)/H-cheb constants). -/ -theorem prop_trace_chi (hΓq : GammaFactsChi κ q) (hcheb : ChebyshevMertens) +lemma PXc_abs_le {q : ℕ} {c : ℕ → ℂ} (hcheb : ChebyshevMertens) (hc : CoeffOK q c) : + ∃ x₀ : ℝ, ∀ X : ℝ, x₀ ≤ X → ∀ τ : ℝ, |PXc c X τ| ≤ Real.sqrt X := by + obtain ⟨x₀, hx₀⟩ := hcheb.cheb1b + refine ⟨x₀, fun X hX τ => ?_⟩ + rw [PXc_eq_PcDir] + refine (PcDir_abs_le X _ τ).trans ?_ + have hsum : ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, ‖-((Λ n : ℝ) : ℂ) * c n‖ / Real.sqrt n ≤ 3 * Real.sqrt X := by + refine (Finset.sum_le_sum fun n _ => div_le_div_of_nonneg_right ?_ (Real.sqrt_nonneg _)).trans (hx₀ X hX) + calc ‖-((Λ n : ℝ) : ℂ) * c n‖ = Λ n * ‖c n‖ := by + simp [abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] + _ ≤ Λ n * 1 := mul_le_mul_of_nonneg_left (hc.norm_le n) ArithmeticFunction.vonMangoldt_nonneg + _ = Λ n := mul_one _ + calc (1 / Real.pi) * ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, ‖-((Λ n : ℝ) : ℂ) * c n‖ / Real.sqrt n + ≤ (1 / Real.pi) * (3 * Real.sqrt X) := mul_le_mul_of_nonneg_left hsum (by positivity) + _ = (3 / Real.pi) * Real.sqrt X := by ring + _ ≤ 1 * Real.sqrt X := mul_le_mul_of_nonneg_right ((div_le_one Real.pi_pos).2 Real.pi_gt_three.le) + (Real.sqrt_nonneg _) + _ = Real.sqrt X := one_mul _ + +/-! ## `[prop:trace]` for L(s,χ) -/ + +theorem prop_trace_chi {κ q : ℕ} {c : ℕ → ℂ} + (hΓq : GammaFactsChi κ q) (hcheb : ChebyshevMertens) (hc : CoeffOK q c) (hlam : 0 < lam ∧ lam ≤ 1) (A : ℝ) (hq : 1 ≤ q) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => ∀ N : ℝ, - |N - p.T / (2 * Real.pi) * ell1q q p.T| ≤ A * Real.log p.T → + |N - p.T / (2 * π) * ell1q q p.T| ≤ A * Real.log p.T → |trGtChiA κ q c p F - F.a * p.L * N| ≤ C * (p.L * Real.sqrt p.X)) := by - obtain ⟨K, hK0, hK⟩ := muq_increment_bound hΓq hq + let A' : ℝ := |A| * (1 + Real.log (2 * π)) + obtain ⟨C₀, T₀, hC₀⟩ := prop_trace_generic cϱ lam hΓq (by exact_mod_cast hq) hlam 0 A' obtain ⟨x₀, hx₀⟩ := hcheb.cheb1b - obtain ⟨Cml, T₁, hCml0, hCml⟩ := muq_abs_le κ q hΓq hq - obtain ⟨τ₀, hτ₀0, hτ₀⟩ := muq_nonneg_eventually hΓq hq - obtain ⟨Cμ, T₂, hCμ⟩ := hΓq.int_mu - refine ⟨K * (16 + 2 * cϱ + 2 * cϱ ^ 2) + 4 * π * Cml / lam + 5 + |Cμ| + 8 * |A| / lam, - max (max T₁ 4) (max (2 * π * Real.exp (|x₀| / lam)) (max (τ₀ + 1) (max T₂ 1))), - fun p F hplam hT hF => ?_⟩ - intro N hN - have hTa : max T₁ 4 ≤ p.T := (le_max_left _ _).trans hT - have hTb : max (2 * π * Real.exp (|x₀| / lam)) (max (τ₀ + 1) (max T₂ 1)) ≤ p.T := - (le_max_right _ _).trans hT - have hT₁' : T₁ ≤ p.T := (le_max_left _ _).trans hTa - have hT4 : 4 ≤ p.T := (le_max_right _ _).trans hTa - have hTx : 2 * π * Real.exp (|x₀| / lam) ≤ p.T := (le_max_left _ _).trans hTb - have hTτ : τ₀ + 1 ≤ p.T := ((le_max_left _ _).trans (le_max_right _ _)).trans hTb - have hT2 : T₂ ≤ p.T := (((le_max_left _ _).trans (le_max_right _ _)).trans - (le_max_right _ _)).trans hTb - have hT0 : (0:ℝ) < p.T := by linarith + refine ⟨4 * max C₀ 0, max T₀ (2 * π * Real.exp (|x₀| / lam)), fun p F hplam hT hF N hN => ?_⟩ + let c' : ℕ → ℂ := fun n => -((Λ n : ℝ) : ℂ) * c n + have hnu : ∀ τ, nuXc κ q c p.X τ = muq κ q τ + 0 * Zeta23.PiX p.X τ + PcDir p.X c' τ := fun τ => by + simp [nuXc, PXc_eq_PcDir, c'] + have hS₁ : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c' n‖ / Real.sqrt n ≤ 3 * Real.sqrt p.X := by + have hX : x₀ ≤ p.X := Setting.le_X_of_T (hplam ▸ hlam.1) (by rw [hplam]; exact (le_max_right _ _).trans hT) + refine (Finset.sum_le_sum fun n _ => div_le_div_of_nonneg_right ?_ (Real.sqrt_nonneg _)).trans (hx₀ p.X hX) + calc ‖c' n‖ = Λ n * ‖c n‖ := by simp [c', abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg] + _ ≤ Λ n * 1 := mul_le_mul_of_nonneg_left (hc.norm_le n) ArithmeticFunction.vonMangoldt_nonneg + _ = Λ n := mul_one _ + have hN' : |N - p.T * ell1q q p.T / (2 * π)| ≤ A' * Zeta23.l p.T := by + have hTpos : 0 < p.T := lt_of_lt_of_le (by positivity) ((le_max_right _ _).trans hT) + have hl1 : 1 ≤ p.l := hF.one_le_l + have hlog_eq : p.l = Real.log p.T - Real.log (2 * π) := + Real.log_div hTpos.ne' (by positivity) + have hlog2pi : 0 ≤ Real.log (2 * π) := Real.log_nonneg (by nlinarith [Real.pi_gt_three]) + have hlog : Real.log p.T ≤ (1 + Real.log (2 * π)) * p.l := by nlinarith + have hlogT_nn : 0 ≤ Real.log p.T := by linarith + calc |N - p.T * ell1q q p.T / (2 * π)| + = |N - p.T / (2 * π) * ell1q q p.T| := by ring_nf + _ ≤ A * Real.log p.T := hN + _ ≤ |A| * Real.log p.T := mul_le_mul_of_nonneg_right (le_abs_self A) hlogT_nn + _ ≤ |A| * ((1 + Real.log (2 * π)) * p.l) := mul_le_mul_of_nonneg_left hlog (abs_nonneg A) + _ = A' * Zeta23.l p.T := by simp [A', Setting.l]; ring + have h := hC₀ p F c' hplam ((le_max_left _ _).trans hT) hF (by simp [c']) N hN' + have heq : trGtChiA κ q c p F = (p.L)⁻¹ * (∑ k : Fin p.d, ∫ τ, F.phiHat (τ - p.tau k) + * F.phiHat (τ - p.tau k) * (muq κ q τ + 0 * Zeta23.PiX p.X τ + PcDir p.X c' τ)) := by + simp only [trGtChiA, GentryChiA, hnu] + rw [heq] + refine h.trans ?_ have hL := hF.L_pos - have hL8 := hF.eight_le_L - have hc4 := hF.four_le_cϱ - have hc0 : (0:ℝ) ≤ cϱ := by linarith - have hlam0 : 0 < p.lam := hplam ▸ hlam.1 - have hX : x₀ ≤ p.X := Setting.le_X_of_T hlam0 (by rw [hplam]; exact hTx) - have hX1 : 1 ≤ Real.sqrt p.X := by - rw [Real.le_sqrt' one_pos, one_pow] - exact Real.one_le_exp hL.le |>.trans_eq rfl - have hsX : 0 ≤ Real.sqrt p.X := Real.sqrt_nonneg _ - have hh0 : 0 < p.h := by - simp only [Setting.h] - positivity - have hl1 : (1:ℝ) ≤ Zeta23.l p.T := hF.one_le_l - have ha1 := hF.a_le_one - have ha0 := hF.a_pos.le - set I₁ := ∫ r, F.phiHat r ^ 2 * |r| with hI₁def - set I₂ := ∫ r, F.phiHat r ^ 2 * r ^ 2 with hI₂def - have hI₁0 : 0 ≤ I₁ := MeasureTheory.integral_nonneg fun r => by positivity - have hI₂0 : 0 ≤ I₂ := MeasureTheory.integral_nonneg fun r => by positivity - have hI₁ : I₁ ≤ 8 + 2 * cϱ * p.L := by - refine hF.integral_phiHat_sq_mul_abs_le.trans ?_ - have h1 : Real.log (cϱ * p.L / (4 * p.w)) ≤ cϱ * p.L / (4 * p.w) := - Real.log_le_self (by have := hF.one_le_w; positivity) - have h2 : cϱ * p.L / (4 * p.w) ≤ cϱ * p.L / 4 := by - apply div_le_div_of_nonneg_left (by positivity) (by norm_num) - linarith [hF.one_le_w] - linarith - have hI₂ : I₂ ≤ 8 + 2 * cϱ ^ 2 := by - refine hF.integral_phiHat_sq_mul_sq_le.trans ?_ - have h3 : (cϱ / p.w) ^ 2 ≤ cϱ ^ 2 := by - rw [div_pow] - exact div_le_self (sq_nonneg _) (by nlinarith [hF.one_le_w]) - linarith - have hsumFin : ∑ k : Fin p.d, GentryChiA κ q c p F k k - = ∑ k ∈ Finset.range p.d, GentryChiA κ q c p F k k := - Fin.sum_univ_eq_sum_range (fun k => GentryChiA κ q c p F k k) p.d - have hτg : ∀ k ∈ Finset.range p.d, p.T ≤ p.tau k ∧ p.tau k ≤ 2 * p.T := fun k hk => - p.tau_mem hL hT0.le hk - set Gμ : ℕ → ℝ := fun k => ∫ r, F.phiHat r ^ 2 * muq κ q (p.tau k + r) with hGμ - set GP : ℕ → ℝ := fun k => ∫ r, F.phiHat r ^ 2 * PXc c p.X (p.tau k + r) with hGP - have hdecomp : ∑ k ∈ Finset.range p.d, GentryChiA κ q c p F k k - = ∑ k ∈ Finset.range p.d, Gμ k + ∑ k ∈ Finset.range p.d, GP k := by - rw [← Finset.sum_add_distrib] - refine Finset.sum_congr rfl fun k hk => ?_ - exact GentryChiA_diag_eq hΓq hq hF.toCoreW hc k (by linarith [(hτg k hk).1]) - have h1 : |∑ k ∈ Finset.range p.d, Gμ k - 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, - muq κ q (p.tau k)| ≤ p.d * (K * (I₁ + I₂) / p.T) := by - rw [Finset.mul_sum, ← Finset.sum_sub_distrib] - refine (Finset.abs_sum_le_sum_abs _ _).trans ?_ - have hbd : ∀ k ∈ Finset.range p.d, |Gμ k - 2 * π * F.a * p.L * muq κ q (p.tau k)| - ≤ K * (I₁ + I₂) / p.T := by - intro k hk - have ht2 : 2 ≤ p.tau k := by linarith [(hτg k hk).1] - refine (muq_part_bound hΓq hq hF.toCoreW hK0 hK ht2).trans ?_ - exact div_le_div_of_nonneg_left (by positivity) hT0 (hτg k hk).1 - refine (Finset.sum_le_sum hbd).trans ?_ - rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] - have hhT : p.h ≤ p.T := by - simp only [Setting.h] - rw [div_le_iff₀ hL] - nlinarith [Real.pi_lt_four] - have hh1 : p.h ≤ 1 := by - simp only [Setting.h] - rw [div_le_one hL] - nlinarith [Real.pi_lt_four] - have h2 : |2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, muq κ q (p.tau k) - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), muq κ q τ| - ≤ 4 * π * Cml * p.L * Zeta23.l p.T := by - have hR := riemann_sum_monotone (μ := muq κ q) (T := p.T) hh0 hhT - (hΓq.monotoneOn.mono (fun x hx => by - simp only [Set.mem_Ici] at hx ⊢ - linarith)) - (fun x hx => hτ₀ x (by linarith)) - rw [← p.d_eq_floor hL] at hR - have hsum2 : ∑ k ∈ Finset.range p.d, muq κ q (p.tau k) - = ∑ k ∈ Finset.range p.d, muq κ q (p.T + k * p.h) := by - refine Finset.sum_congr rfl fun k _ => by rw [Setting.tau_natCast] - rw [hsum2] - have hid : 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, muq κ q (p.T + k * p.h) - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), muq κ q τ - = F.a * p.L ^ 2 * (p.h * ∑ k ∈ Finset.range p.d, muq κ q (p.T + k * p.h) - - ∫ τ in p.T..(2 * p.T), muq κ q τ) := by - simp only [Setting.h] - field_simp - rw [hid, abs_mul, abs_of_nonneg (by positivity)] - have hμ2T : muq κ q (2 * p.T) ≤ Cml * Zeta23.l p.T := by - have hv := hCml p hT₁' (2 * p.T) ⟨by linarith, le_rfl⟩ - exact (le_abs_self _).trans hv - have hμ2T0 : 0 ≤ muq κ q (2 * p.T) := hτ₀ _ (by linarith) - calc F.a * p.L ^ 2 * |p.h * ∑ k ∈ Finset.range p.d, muq κ q (p.T + k * p.h) - - ∫ τ in p.T..(2 * p.T), muq κ q τ| - ≤ F.a * p.L ^ 2 * (2 * p.h * muq κ q (2 * p.T)) := by gcongr - _ ≤ 1 * p.L ^ 2 * (2 * p.h * (Cml * Zeta23.l p.T)) := by gcongr - _ = 4 * π * Cml * p.L * Zeta23.l p.T := by - simp only [Setting.h] - field_simp - ring - have h4 : |∑ k ∈ Finset.range p.d, GP k| ≤ p.L ^ 2 / Real.log 2 * (3 * Real.sqrt p.X) := by - refine (sum_P_part_chi_bound hF.toCoreW hc).trans ?_ - have hconv : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Λ n : ℝ) * (n : ℝ) ^ (-(1/2 : ℝ)) - = ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, Λ n / Real.sqrt n := by - refine Finset.sum_congr rfl fun n hn => ?_ - have hn0 : 0 < n := (Finset.mem_Ioc.1 hn).1 - rw [Real.rpow_neg (Nat.cast_nonneg n), ← Real.sqrt_eq_rpow, div_eq_mul_inv] - rw [hconv] - have hnn : (0:ℝ) ≤ p.L ^ 2 / Real.log 2 := by - have hlog2'' : (0:ℝ) < Real.log 2 := Real.log_pos one_lt_two - positivity - exact mul_le_mul_of_nonneg_left (hx₀ p.X hX) hnn - have hcomb : |∑ k ∈ Finset.range p.d, GentryChiA κ q c p F k k - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), muq κ q τ| - ≤ p.d * (K * (I₁ + I₂) / p.T) + 4 * π * Cml * p.L * Zeta23.l p.T - + p.L ^ 2 / Real.log 2 * (3 * Real.sqrt p.X) := by - rw [hdecomp] - calc |∑ k ∈ Finset.range p.d, Gμ k + ∑ k ∈ Finset.range p.d, GP k - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), muq κ q τ| - = |(∑ k ∈ Finset.range p.d, Gμ k - - 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, muq κ q (p.tau k)) - + (2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, muq κ q (p.tau k) - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), muq κ q τ) - + ∑ k ∈ Finset.range p.d, GP k| := by ring_nf - _ ≤ |∑ k ∈ Finset.range p.d, Gμ k - - 2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, muq κ q (p.tau k)| - + |2 * π * F.a * p.L * ∑ k ∈ Finset.range p.d, muq κ q (p.tau k) - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), muq κ q τ| - + |∑ k ∈ Finset.range p.d, GP k| := abs_add_three _ _ _ - _ ≤ _ := by linarith - set S := p.L * Real.sqrt p.X with hS - have hS8 : 8 ≤ S := by nlinarith - have hS1 : 1 ≤ S := by linarith - have hS0 : 0 ≤ S := by linarith - have hLS : p.L ≤ S := by nlinarith - have hlX : Zeta23.l p.T ≤ 2 / lam * Real.sqrt p.X := by - have he : Real.sqrt p.X = Real.exp (p.lam * Zeta23.l p.T / 2) := by - rw [show p.X = Real.exp (p.L) from rfl, ← Real.exp_half] - rfl - rw [he, div_mul_eq_mul_div, le_div_iff₀ hlam.1] - have h1 := Real.add_one_le_exp (p.lam * Zeta23.l p.T / 2) - rw [hplam] at * - nlinarith [hlam.1] - have hlog2 : (0.6931471803 : ℝ) < Real.log 2 := Real.log_two_gt_d9 - have hlog2' : (0:ℝ) < Real.log 2 := by linarith - have hd : (p.d : ℝ) ≤ p.L * p.T / (2 * π) := p.d_le (by positivity) - have hπ1 : (1:ℝ) ≤ 2 * π := by nlinarith [Real.pi_gt_three] - have t1 : (p.d : ℝ) * (K * (I₁ + I₂) / p.T) - ≤ p.L * (K * (16 + 2 * cϱ + 2 * cϱ ^ 2) * S) := by - have e1 : (p.d : ℝ) * (K * (I₁ + I₂) / p.T) - ≤ p.L * p.T / (2 * π) * (K * (I₁ + I₂) / p.T) := by - gcongr - have e2 : p.L * p.T / (2 * π) * (K * (I₁ + I₂) / p.T) - = p.L * (K * (I₁ + I₂)) / (2 * π) := by - field_simp - have e3 : I₁ + I₂ ≤ (16 + 2 * cϱ + 2 * cϱ ^ 2) * p.L := by - have u1 : (16:ℝ) ≤ 16 * p.L := by nlinarith - have u3 : 2 * cϱ ^ 2 ≤ 2 * cϱ ^ 2 * p.L := by nlinarith [sq_nonneg cϱ] - nlinarith - calc (p.d : ℝ) * (K * (I₁ + I₂) / p.T) ≤ p.L * (K * (I₁ + I₂)) / (2 * π) := by - rw [← e2] - exact e1 - _ ≤ p.L * (K * (I₁ + I₂)) := by - apply div_le_self (by positivity) - exact hπ1 - _ ≤ p.L * (K * ((16 + 2 * cϱ + 2 * cϱ ^ 2) * p.L)) := by gcongr - _ = p.L * (K * (16 + 2 * cϱ + 2 * cϱ ^ 2)) * p.L := by ring - _ ≤ p.L * (K * (16 + 2 * cϱ + 2 * cϱ ^ 2)) * S := by - have hnn : (0:ℝ) ≤ p.L * (K * (16 + 2 * cϱ + 2 * cϱ ^ 2)) := by positivity - exact mul_le_mul_of_nonneg_left hLS hnn - _ = p.L * (K * (16 + 2 * cϱ + 2 * cϱ ^ 2) * S) := by ring - have t2 : 4 * π * Cml * p.L * Zeta23.l p.T ≤ p.L * (4 * π * Cml / lam * S) := by - have e1 : Zeta23.l p.T ≤ S / lam := by - rw [le_div_iff₀ hlam.1] - calc Zeta23.l p.T * lam ≤ (2 / lam * Real.sqrt p.X) * lam := by - gcongr - exact hlam.1.le - _ = 2 * Real.sqrt p.X := by - have hne := hlam.1.ne' - field_simp - _ ≤ p.L * Real.sqrt p.X := by - exact mul_le_mul_of_nonneg_right (by linarith) hsX - _ = S := hS.symm - calc 4 * π * Cml * p.L * Zeta23.l p.T ≤ 4 * π * Cml * p.L * (S / lam) := by - gcongr - _ = p.L * (4 * π * Cml / lam * S) := by - have hne := hlam.1.ne' - field_simp - have t4 : p.L ^ 2 / Real.log 2 * (3 * Real.sqrt p.X) ≤ p.L * (5 * S) := by - have e1 : p.L ^ 2 / Real.log 2 * (3 * Real.sqrt p.X) = p.L * ((3 / Real.log 2) * S) := by - rw [hS] - field_simp - rw [e1] - gcongr - rw [div_le_iff₀ hlog2'] - nlinarith - have hmu_form : |trGtChiA κ q c p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), muq κ q τ| - ≤ (K * (16 + 2 * cϱ + 2 * cϱ ^ 2) + 4 * π * Cml / lam + 5) * S := by - have htr : trGtChiA κ q c p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), muq κ q τ - = p.L⁻¹ * (∑ k ∈ Finset.range p.d, GentryChiA κ q c p F k k - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), muq κ q τ) := by - simp only [trGtChiA, hsumFin] - field_simp - rw [htr, abs_mul, abs_of_pos (inv_pos.2 hL)] - calc p.L⁻¹ * |∑ k ∈ Finset.range p.d, GentryChiA κ q c p F k k - - F.a * p.L ^ 2 * ∫ τ in p.T..(2 * p.T), muq κ q τ| - ≤ p.L⁻¹ * (p.L * (K * (16 + 2 * cϱ + 2 * cϱ ^ 2) * S) - + p.L * (4 * π * Cml / lam * S) + p.L * (5 * S)) := by - gcongr - refine hcomb.trans ?_ - linarith - _ = (K * (16 + 2 * cϱ + 2 * cϱ ^ 2) + 4 * π * Cml / lam + 5) * S := by - field_simp - have hT1' : (1:ℝ) ≤ p.T := by linarith - have hμint := hCμ p.T hT2 - have e2' : |F.a * p.L * ((∫ τ in p.T..(2 * p.T), muq κ q τ) - p.T * ell1q q p.T / (2 * π))| - ≤ |Cμ| * S := by - rw [abs_mul, abs_of_nonneg (mul_nonneg ha0 hL.le)] - have hi : |(∫ τ in p.T..(2 * p.T), muq κ q τ) - p.T * ell1q q p.T / (2 * π)| ≤ |Cμ| := by - refine hμint.trans ?_ - calc Cμ / p.T ≤ |Cμ| / p.T := by gcongr; exact le_abs_self _ - _ ≤ |Cμ| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos - exact hT1' - _ = |Cμ| := div_one _ - calc F.a * p.L * |(∫ τ in p.T..(2 * p.T), muq κ q τ) - p.T * ell1q q p.T / (2 * π)| - ≤ 1 * p.L * |Cμ| := by gcongr - _ = p.L * |Cμ| := by ring - _ ≤ S * |Cμ| := mul_le_mul_of_nonneg_right hLS (abs_nonneg _) - _ = |Cμ| * S := by ring - have e3' : |F.a * p.L * (p.T * ell1q q p.T / (2 * π) - N)| ≤ 8 * |A| / lam * S := by - rw [abs_mul, abs_of_nonneg (mul_nonneg ha0 hL.le), abs_sub_comm] - have hlogT : Real.log p.T ≤ Zeta23.l p.T + 3 := by - have e1 : Zeta23.l p.T = Real.log p.T - Real.log (2 * π) := by - rw [Zeta23.l, Real.log_div (ne_of_gt hT0) (by positivity)] - have hlog2π : Real.log (2 * π) ≤ 3 := by - rw [show (3:ℝ) = Real.log (Real.exp 3) by rw [Real.log_exp]] - apply Real.log_le_log (by nlinarith [Real.pi_gt_three]) - have he1 := Real.exp_one_gt_d9 - have he3 : Real.exp 3 = Real.exp 1 * Real.exp 1 * Real.exp 1 := by - rw [← Real.exp_add, ← Real.exp_add] - norm_num - have hp2 : (7.3:ℝ) ≤ Real.exp 1 * Real.exp 1 := by nlinarith - have hp3 : (19:ℝ) ≤ Real.exp 1 * Real.exp 1 * Real.exp 1 := by nlinarith - rw [he3] - nlinarith [Real.pi_lt_four] - linarith - have hwin : |N - p.T * ell1q q p.T / (2 * π)| ≤ |A| * (Zeta23.l p.T + 3) := by - rw [show p.T * ell1q q p.T / (2 * π) = p.T / (2 * π) * ell1q q p.T by ring] - refine hN.trans ?_ - have hlogT0 : (0:ℝ) ≤ Real.log p.T := Real.log_nonneg hT1' - calc A * Real.log p.T ≤ |A| * Real.log p.T := - mul_le_mul_of_nonneg_right (le_abs_self A) hlogT0 - _ ≤ |A| * (Zeta23.l p.T + 3) := mul_le_mul_of_nonneg_left hlogT (abs_nonneg A) - calc F.a * p.L * |N - p.T * ell1q q p.T / (2 * π)| - ≤ 1 * p.L * (|A| * (Zeta23.l p.T + 3)) := by gcongr - _ = p.L * (|A| * (Zeta23.l p.T + 3)) := by ring - _ ≤ p.L * (|A| * (4 * Zeta23.l p.T)) := by - gcongr - linarith - _ ≤ p.L * (|A| * (4 * (2 / lam * Real.sqrt p.X))) := by gcongr - _ = 8 * |A| / lam * (p.L * Real.sqrt p.X) := by - have hne := hlam.1.ne' - field_simp - ring - _ = 8 * |A| / lam * S := by rw [hS] - calc |trGtChiA κ q c p F - F.a * p.L * N| - = |(trGtChiA κ q c p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), muq κ q τ) - + F.a * p.L * ((∫ τ in p.T..(2 * p.T), muq κ q τ) - p.T * ell1q q p.T / (2 * π)) - + F.a * p.L * (p.T * ell1q q p.T / (2 * π) - N)| := by ring_nf - _ ≤ |trGtChiA κ q c p F - F.a * p.L * ∫ τ in p.T..(2 * p.T), muq κ q τ| - + |F.a * p.L * ((∫ τ in p.T..(2 * p.T), muq κ q τ) - p.T * ell1q q p.T / (2 * π))| - + |F.a * p.L * (p.T * ell1q q p.T / (2 * π) - N)| := abs_add_three _ _ _ - _ ≤ (K * (16 + 2 * cϱ + 2 * cϱ ^ 2) + 4 * π * Cml / lam + 5 + |Cμ| + 8 * |A| / lam) * S := by - linarith [hmu_form, e2', e3'] - - -set_option linter.unusedVariables false in -/-- **[eq:Msplit] for L(s,χ)**: three terms only (`Π_X ≡ 0`): -`𝓜 = 𝓜[μ_χ,μ_χ] + 𝓜[P,P] + 2𝓜[μ_χ,P]`. -/ -theorem eq_Msplit_chi (hΓq : GammaFactsChi κ q) (hc : CoeffOK q c) - (hlam : 0 < lam ∧ lam ≤ 1) : - ∃ T₀ : ℝ, ∀ (p : Setting) (F : LocalFun), p.lam = lam → T₀ ≤ p.T → - LocalHypsCore cϱ p F → + have h1 : p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c' n‖ / Real.sqrt n + ≤ 4 * (p.L * Real.sqrt p.X) := by nlinarith [mul_le_mul_of_nonneg_left hS₁ hL.le] + calc C₀ * (p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c' n‖ / Real.sqrt n) + ≤ max C₀ 0 * (p.L * Real.sqrt p.X + p.L * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c' n‖ / Real.sqrt n) := + mul_le_mul_of_nonneg_right (le_max_left _ _) (by positivity) + _ ≤ max C₀ 0 * (4 * (p.L * Real.sqrt p.X)) := mul_le_mul_of_nonneg_left h1 (le_max_right _ _) + _ = 4 * max C₀ 0 * (p.L * Real.sqrt p.X) := by ring + +/-! ## `[eq:Msplit]` for L(s,χ) -/ + +theorem eq_Msplit_chi {κ q : ℕ} {c : ℕ → ℂ} + (hΓq : GammaFactsChi κ q) (_hc : CoeffOK q c) (_hlam : 0 < lam ∧ lam ≤ 1) : + EventuallyAtCore cϱ lam (fun p F => MtotalChiA κ q c p F = Mform F.Phi p.T (muq κ q) (muq κ q) + Mform F.Phi p.T (PXc c p.X) (PXc c p.X) - + 2 * Mform F.Phi p.T (muq κ q) (PXc c p.X) := by - refine ⟨1, fun p F hplam hT hF => ?_⟩ - have hμc : Continuous (muq κ q) := hΓq.smooth.continuous - have hPc : Continuous (PXc c p.X) := PXc_continuous c p.X_pos - have hΦ : Continuous F.Phi := hF.Phi_contDiff.continuous - have hΦe : ∀ r, F.Phi (-r) = F.Phi r := hF.Phi_even - have hsum : Continuous (muq κ q + PXc c p.X) := hμc.add hPc - have he : MtotalChiA κ q c p F = Mform F.Phi p.T (muq κ q + PXc c p.X) (muq κ q + PXc c p.X) := by - unfold MtotalChiA nuXc - rfl - rw [he, Mform_add_left hΦ hμc hPc hsum, Mform_add_right hΦ hμc hPc hμc, - Mform_add_right hΦ hμc hPc hPc, Mform_comm hΦe (PXc c p.X) (muq κ q)] + + 2 * Mform F.Phi p.T (muq κ q) (PXc c p.X)) := by + refine ⟨0, fun p F _ _ hF => ?_⟩ + have hΦ := hF.Phi_contDiff.continuous + have hμ := hΓq.smooth.continuous + have hP := PXc_continuous c p.X_pos + have hnu : nuXc κ q c p.X = muq κ q + PXc c p.X := rfl + dsimp only [MtotalChiA] + rw [hnu, Mform_add_left hΦ hμ hP (hμ.add hP), + Mform_add_right hΦ hμ hP hμ, Mform_add_right hΦ hμ hP hP, + Mform_comm hF.Phi_even (PXc c p.X) (muq κ q)] ring +/-! ## `[lem:ends]` for L(s,χ) -/ -set_option maxHeartbeats 1600000 in -/-- μ_χ satisfies the `NuBound` μ-part: `|μ_χ(τ)| ≤ C₀·l + log⁺(|τ|/4T)` for large `T` -(three ranges: |τ| ≤ 1 via the linear bound; 1 ≤ |τ| ≤ 4T and |τ| > 4T via Stirling). -/ -lemma muq_nuBound (hΓq : GammaFactsChi κ q) (hq : 1 ≤ q) : - ∃ C₀ T₀ : ℝ, 1 ≤ C₀ ∧ ∀ p : Setting, T₀ ≤ p.T → ∀ τ : ℝ, - |muq κ q τ| ≤ C₀ * Zeta23.l p.T + max (Real.log (|τ| / (4 * p.T))) 0 := by - obtain ⟨M, hM0, hM⟩ := muq_linear_bound hΓq hq - obtain ⟨Cs, hCs⟩ := hΓq.stirling - have hq1 : (1:ℝ) ≤ (q:ℝ) := by exact_mod_cast hq - have hlq : (0:ℝ) ≤ Real.log q := Real.log_nonneg hq1 - refine ⟨max 1 (M + Real.log q + |Cs| + 10), 2 * π * Real.exp 1, le_max_left _ _, - fun p hT τ => ?_⟩ - set C₀ := max 1 (M + Real.log q + |Cs| + 10) with hC₀ - have hπ : (0:ℝ) < π := Real.pi_pos - have hπ3 := Real.pi_gt_three - have he1 : (1:ℝ) ≤ Real.exp 1 := by linarith [Real.add_one_le_exp 1] - have hT0 : (0:ℝ) < p.T := by nlinarith - have hl1 : 1 ≤ Zeta23.l p.T := by - rw [Zeta23.l, ← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - rw [le_div_iff₀ (by positivity)] - nlinarith - have hl0 : (0:ℝ) ≤ Zeta23.l p.T := by linarith - have hC₀M : M + Real.log q + |Cs| + 10 ≤ C₀ := le_max_right _ _ - have hC₀1 : (1:ℝ) ≤ C₀ := le_max_left _ _ - have hmax0 : (0:ℝ) ≤ max (Real.log (|τ| / (4 * p.T))) 0 := le_max_right _ _ - have hlogT : Real.log p.T ≤ Zeta23.l p.T + 3 := by - have e1 : Zeta23.l p.T = Real.log p.T - Real.log (2 * π) := by - rw [Zeta23.l, Real.log_div (ne_of_gt hT0) (by positivity)] - have hlog2π : (0:ℝ) ≤ Real.log (2 * π) := Real.log_nonneg (by nlinarith) - have hlog2π' : Real.log (2 * π) ≤ 3 := by - rw [show (3:ℝ) = Real.log (Real.exp 3) by rw [Real.log_exp]] - apply Real.log_le_log (by positivity) - have he3 : Real.exp 3 = Real.exp 1 * Real.exp 1 * Real.exp 1 := by - rw [← Real.exp_add, ← Real.exp_add] - norm_num - have hee := Real.exp_one_gt_d9 - have hp2 : (7.3:ℝ) ≤ Real.exp 1 * Real.exp 1 := by nlinarith - have hp3 : (19:ℝ) ≤ Real.exp 1 * Real.exp 1 * Real.exp 1 := by nlinarith - rw [he3] - nlinarith [Real.pi_lt_four] - linarith - rcases le_or_gt |τ| 1 with hτ1 | hτ1 - · -- small |τ| - have h1 : |muq κ q τ| ≤ M + 1 := by - have := hM τ - linarith - have h2 : M + 1 ≤ C₀ * Zeta23.l p.T := by - calc M + 1 ≤ C₀ * 1 := by - rw [mul_one] - linarith [abs_nonneg Cs] - _ ≤ C₀ * Zeta23.l p.T := by - apply mul_le_mul_of_nonneg_left hl1 - linarith - linarith - · -- |τ| ≥ 1: Stirling - have hτ0 : (0:ℝ) < |τ| := by linarith - have hst := hCs τ hτ1.le - have hCsb : Cs / τ ^ 2 ≤ |Cs| := by - calc Cs / τ ^ 2 ≤ |Cs| / τ ^ 2 := by gcongr; exact le_abs_self _ - _ ≤ |Cs| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos - nlinarith [sq_abs τ] - _ = |Cs| := div_one _ - have hbase : |muq κ q τ| ≤ 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) + |Cs| - ∨ Real.log ((q:ℝ) * |τ| / (2 * π)) < 0 := by - rcases le_or_gt 0 (Real.log ((q:ℝ) * |τ| / (2 * π))) with hpos | hneg - · left - have h1 := (abs_le.1 hst).2 - have h2 := (abs_le.1 hst).1 - have h3 : |muq κ q τ| ≤ |muq κ q τ - 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| - + 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) := by - have := abs_add_le (muq κ q τ - 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))) - (1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))) - simp only [sub_add_cancel] at this - refine this.trans ?_ - have habs : |1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| - = 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) := by - rw [abs_of_nonneg (by positivity)] - rw [habs] - linarith [hst.trans hCsb] - · right - exact hneg - have hfrac1 : 1 / (2 * π) ≤ 1 := by - rw [div_le_one (by positivity)] - nlinarith - -- in the negative-log case the Stirling bound already gives |μq| ≤ |Cs| - rcases hbase with hb | hneg - · -- split the log - have hlogsplit : Real.log ((q:ℝ) * |τ| / (2 * π)) - = Real.log q + Real.log |τ| - Real.log (2 * π) := by - rw [Real.log_div (by positivity) (by positivity), Real.log_mul (by positivity) - (ne_of_gt hτ0)] - have hlog2π0 : (0:ℝ) ≤ Real.log (2 * π) := Real.log_nonneg (by nlinarith) - rcases le_or_gt |τ| (4 * p.T) with hτT | hτT - · -- middle range - have hlogτ : Real.log |τ| ≤ Real.log 4 + Real.log p.T := by - rw [← Real.log_mul (by norm_num) (ne_of_gt hT0)] - exact Real.log_le_log hτ0 hτT - have hlog4 : Real.log 4 ≤ 2 := by - rw [show (2:ℝ) = Real.log (Real.exp 2) by rw [Real.log_exp]] - apply Real.log_le_log (by norm_num) - have hee := Real.exp_one_gt_d9 - have hp2 : (7.3:ℝ) ≤ Real.exp 1 * Real.exp 1 := by nlinarith - have he2 : Real.exp 2 = Real.exp 1 * Real.exp 1 := by - rw [← Real.exp_add] - norm_num - nlinarith - have hchain : |muq κ q τ| ≤ Real.log q + (Zeta23.l p.T + 5) + |Cs| := by - have h4 : Real.log ((q:ℝ) * |τ| / (2 * π)) ≤ Real.log q + (Zeta23.l p.T + 5) := by - rw [hlogsplit] - linarith - have h5 : 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) - ≤ Real.log q + (Zeta23.l p.T + 5) := by - rcases le_or_gt 0 (Real.log ((q:ℝ) * |τ| / (2 * π))) with hpos | hneg2 - · calc 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) - ≤ 1 * Real.log ((q:ℝ) * |τ| / (2 * π)) := - mul_le_mul_of_nonneg_right hfrac1 hpos - _ = Real.log ((q:ℝ) * |τ| / (2 * π)) := one_mul _ - _ ≤ Real.log q + (Zeta23.l p.T + 5) := h4 - · have : 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) ≤ 0 := by - apply mul_nonpos_of_nonneg_of_nonpos (by positivity) hneg2.le - nlinarith - linarith - have hfin : Real.log q + (Zeta23.l p.T + 5) + |Cs| ≤ C₀ * Zeta23.l p.T := by - have h9 : M + Real.log q + |Cs| + 10 ≤ C₀ := hC₀M - have h10 : C₀ * Zeta23.l p.T = C₀ + C₀ * (Zeta23.l p.T - 1) := by ring - have h11 : Zeta23.l p.T - 1 ≤ C₀ * (Zeta23.l p.T - 1) := - le_mul_of_one_le_left (by linarith) hC₀1 - linarith - linarith - · -- far range - have hlogτ : Real.log |τ| = Real.log (|τ| / (4 * p.T)) + Real.log (4 * p.T) := by - rw [← Real.log_mul (by - intro h0 - have := div_eq_zero_iff.1 h0 - rcases this with h | h - · exact (ne_of_gt hτ0) h - · nlinarith) (by positivity)] - congr 1 - field_simp - have hratio1 : (1:ℝ) ≤ |τ| / (4 * p.T) := by - rw [le_div_iff₀ (by positivity)] - linarith - have hlogr0 : 0 ≤ Real.log (|τ| / (4 * p.T)) := Real.log_nonneg hratio1 - have hmaxeq : max (Real.log (|τ| / (4 * p.T))) 0 = Real.log (|τ| / (4 * p.T)) := - max_eq_left hlogr0 - have hlog4T : Real.log (4 * p.T) ≤ 2 + (Zeta23.l p.T + 3) := by - rw [Real.log_mul (by norm_num) (ne_of_gt hT0)] - have hlog4 : Real.log 4 ≤ 2 := by - rw [show (2:ℝ) = Real.log (Real.exp 2) by rw [Real.log_exp]] - apply Real.log_le_log (by norm_num) - have hee := Real.exp_one_gt_d9 - have hp2 : (7.3:ℝ) ≤ Real.exp 1 * Real.exp 1 := by nlinarith - have he2 : Real.exp 2 = Real.exp 1 * Real.exp 1 := by - rw [← Real.exp_add] - norm_num - nlinarith - linarith - have h4 : Real.log ((q:ℝ) * |τ| / (2 * π)) - ≤ Real.log q + Real.log (|τ| / (4 * p.T)) + (Zeta23.l p.T + 5) := by - rw [hlogsplit, hlogτ] - linarith - have h5 : 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) - ≤ Real.log q + Real.log (|τ| / (4 * p.T)) + (Zeta23.l p.T + 5) := by - rcases le_or_gt 0 (Real.log ((q:ℝ) * |τ| / (2 * π))) with hpos | hneg2 - · calc 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) - ≤ 1 * Real.log ((q:ℝ) * |τ| / (2 * π)) := - mul_le_mul_of_nonneg_right hfrac1 hpos - _ = Real.log ((q:ℝ) * |τ| / (2 * π)) := one_mul _ - _ ≤ _ := h4 - · have h6 : 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π)) ≤ 0 := by - apply mul_nonpos_of_nonneg_of_nonpos (by positivity) hneg2.le - nlinarith - have hfin : Real.log q + (Zeta23.l p.T + 5) + |Cs| ≤ C₀ * Zeta23.l p.T := by - have h9 : M + Real.log q + |Cs| + 10 ≤ C₀ := hC₀M - have h10 : C₀ * Zeta23.l p.T = C₀ + C₀ * (Zeta23.l p.T - 1) := by ring - have h11 : Zeta23.l p.T - 1 ≤ C₀ * (Zeta23.l p.T - 1) := - le_mul_of_one_le_left (by linarith) hC₀1 - linarith - rw [hmaxeq] - linarith - · -- log < 0: |μq| ≤ |Cs| directly - have h1 : |muq κ q τ| ≤ |Cs| + 1 / (2 * π) * |Real.log ((q:ℝ) * |τ| / (2 * π))| := by - have h2 := hst.trans hCsb - have h3 := abs_add_le (muq κ q τ - 1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))) - (1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))) - simp only [sub_add_cancel] at h3 - have h4 : |1 / (2 * π) * Real.log ((q:ℝ) * |τ| / (2 * π))| - = 1 / (2 * π) * |Real.log ((q:ℝ) * |τ| / (2 * π))| := by - rw [abs_mul, abs_of_pos (by positivity : (0:ℝ) < 1 / (2 * π))] - linarith - -- |log| when log < 0: the argument ≥ |τ|/(2π·…)… bound |log| ≤ log 2π (argument ≥ q|τ|/2π ≥ 1/(2π)) - have harg : (1:ℝ) / (2 * π) ≤ (q:ℝ) * |τ| / (2 * π) := by - apply div_le_div_of_nonneg_right _ (by positivity) - nlinarith - have h5 : |Real.log ((q:ℝ) * |τ| / (2 * π))| ≤ Real.log (2 * π) := by - rw [abs_of_neg hneg] - have h6 := Real.log_le_log (by positivity : (0:ℝ) < 1 / (2 * π)) harg - rw [Real.log_div one_ne_zero (by positivity), Real.log_one] at h6 - linarith - have hlog2π' : Real.log (2 * π) ≤ 3 := by - rw [show (3:ℝ) = Real.log (Real.exp 3) by rw [Real.log_exp]] - apply Real.log_le_log (by positivity) - have he3 : Real.exp 3 = Real.exp 1 * Real.exp 1 * Real.exp 1 := by - rw [← Real.exp_add, ← Real.exp_add] - norm_num - have hee := Real.exp_one_gt_d9 - have hp2 : (7.3:ℝ) ≤ Real.exp 1 * Real.exp 1 := by nlinarith - have hp3 : (19:ℝ) ≤ Real.exp 1 * Real.exp 1 * Real.exp 1 := by nlinarith - rw [he3] - nlinarith [Real.pi_lt_four] - have hchain : |muq κ q τ| ≤ |Cs| + 3 := by - have h7 : 1 / (2 * π) * |Real.log ((q:ℝ) * |τ| / (2 * π))| ≤ 3 := by - calc 1 / (2 * π) * |Real.log ((q:ℝ) * |τ| / (2 * π))| - ≤ 1 * |Real.log ((q:ℝ) * |τ| / (2 * π))| := - mul_le_mul_of_nonneg_right hfrac1 (abs_nonneg _) - _ = |Real.log ((q:ℝ) * |τ| / (2 * π))| := one_mul _ - _ ≤ Real.log (2 * π) := h5 - _ ≤ 3 := hlog2π' - linarith - have hfin : |Cs| + 3 ≤ C₀ * Zeta23.l p.T := by - have h8 : |Cs| + 3 ≤ C₀ := by linarith - have h10 : C₀ * 1 ≤ C₀ * Zeta23.l p.T := - mul_le_mul_of_nonneg_left hl1 (by linarith) - linarith - linarith - -set_option linter.unusedVariables false in -/-- **[lem:ends] for L(s,χ)**: `tr G̃² = 𝓜 + O_q(L·l·log l·(l² + X))` (same error shape as ζ: -`B_χ = ℓ_{1,χ} + 4√X ≤ C_q(l + √X)` and the ψ-tail machinery is coefficient-independent). -/ -theorem lem_ends_chi (hΓq : GammaFactsChi κ q) (hcheb : ChebyshevMertens) - (hc : CoeffOK q c) (hlam : 0 < lam ∧ lam ≤ 1) (hq : 1 ≤ q) : +theorem lem_ends_chi {κ q : ℕ} {c : ℕ → ℂ} + (hΓq : GammaFactsChi κ q) (hcheb : ChebyshevMertens) (hc : CoeffOK q c) + (hlam : 0 < lam ∧ lam ≤ 1) (hq : 1 ≤ q) : ∃ C : ℝ, EventuallyAtCore cϱ lam (fun p F => |trGt2ChiA κ q c p F - MtotalChiA κ q c p F| ≤ C * (p.L * Zeta23.l p.T * Real.log (Zeta23.l p.T) * (Zeta23.l p.T ^ 2 + p.X))) := by - obtain ⟨Cends, T₀e, hends⟩ := Zeta23.PrimeSide.lem_ends_nu (cϱ := cϱ) (lam := lam) - obtain ⟨C₀, T₀μ, hC₀1, hμB⟩ := muq_nuBound (κ := κ) (q := q) hΓq hq - obtain ⟨x₀, hx₀1, hPb⟩ := PXc_abs_le (q := q) (c := c) hcheb hc - refine ⟨|Cends| * (2 * C₀ ^ 2 + 2), - max T₀e (max T₀μ (2 * π * Real.exp (|x₀| / lam))), fun p F hplam hT hF => ?_⟩ - have hTe : T₀e ≤ p.T := (le_max_left _ _).trans hT - have hTμ : T₀μ ≤ p.T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT - have hTx : 2 * π * Real.exp (|x₀| / lam) ≤ p.T := - ((le_max_right _ _).trans (le_max_right _ _)).trans hT - have hlam0 : 0 < p.lam := hplam ▸ hlam.1 - have hX : x₀ ≤ p.X := Setting.le_X_of_T hlam0 (by rw [hplam]; exact hTx) - have hL := hF.L_pos - have hl1 : (1:ℝ) ≤ Zeta23.l p.T := hF.one_le_l - have hsX : 0 ≤ Real.sqrt p.X := Real.sqrt_nonneg _ - set B : ℝ := C₀ * Zeta23.l p.T + Real.sqrt p.X with hB - have hcont : Continuous (nuXc κ q c p.X) := by - have h1 : (nuXc κ q c p.X) = fun τ => muq κ q τ + PXc c p.X τ := rfl - rw [h1] - exact (hΓq.smooth.continuous).add (PXc_continuous c p.X_pos) - have hnu : Zeta23.PrimeSide.NuBound p B (nuXc κ q c p.X) := by - intro τ - have h1 : |nuXc κ q c p.X τ| ≤ |muq κ q τ| + |PXc c p.X τ| := by - have h0 : nuXc κ q c p.X τ = muq κ q τ + PXc c p.X τ := rfl - rw [h0] - exact abs_add_le _ _ - have h2 := hμB p hTμ τ - have h3 := hPb p.X hX τ - rw [hB] - linarith - have hlB : Zeta23.l p.T ≤ B := by - rw [hB] - nlinarith - have hmain := hends p F B (nuXc κ q c p.X) hplam hTe hF hcont hnu hlB + obtain ⟨Ce, Te, he⟩ := lem_ends_nu cϱ lam + obtain ⟨C₀, Tμ, hC₀1, hμ⟩ := gamma_nuBound hΓq (by exact_mod_cast hq) + obtain ⟨x₀, hx₀⟩ := PXc_abs_le hcheb hc + refine ⟨2 * |Ce| * C₀ ^ 2, max (max Te Tμ) (2 * π * Real.exp (|x₀| / lam)), + fun p F hplam hT hF => ?_⟩ + have hTe : Te ≤ p.T := (le_max_left _ _).trans ((le_max_left _ _).trans hT) + have hTμ : Tμ ≤ p.T := (le_max_right _ _).trans ((le_max_left _ _).trans hT) + have hX : x₀ ≤ p.X := Setting.le_X_of_T (hplam ▸ hlam.1) (by rw [hplam]; exact (le_max_right _ _).trans hT) + set B := C₀ * p.l + Real.sqrt p.X + have hν : NuBound p B (nuXc κ q c p.X) := fun τ => by + calc |muq κ q τ + PXc c p.X τ| ≤ |muq κ q τ| + |PXc c p.X τ| := abs_add_le _ _ + _ ≤ (C₀ * p.l + max (Real.log (|τ| / (4 * p.T))) 0) + Real.sqrt p.X := + add_le_add (hμ p hTμ τ) (hx₀ p.X hX τ) + _ = B + max (Real.log (|τ| / (4 * p.T))) 0 := by ring + have hl1 : 1 ≤ p.l := hF.one_le_l + have hBl : p.l ≤ B := by nlinarith [Real.sqrt_nonneg p.X] + have hcont : Continuous (nuXc κ q c p.X) := hΓq.smooth.continuous.add (PXc_continuous c p.X_pos) + have h := he p F B (nuXc κ q c p.X) hplam hTe hF hcont hν hBl + have hB2 : B ^ 2 ≤ 2 * C₀ ^ 2 * (p.l ^ 2 + p.X) := by + have hs : Real.sqrt p.X ^ 2 = p.X := Real.sq_sqrt p.X_pos.le + nlinarith [sq_nonneg (C₀ * p.l - Real.sqrt p.X), + mul_nonneg (show (0 : ℝ) ≤ C₀ ^ 2 - 1 by nlinarith) p.X_pos.le] + have hnn : 0 ≤ p.L * p.l * Real.log p.l := by + have := hF.L_pos; have := Real.log_nonneg hl1; positivity have heq : trGt2ChiA κ q c p F - MtotalChiA κ q c p F - = (p.L)⁻¹ ^ 2 * ∑ k : Fin p.d, ∑ l : Fin p.d, - Zeta23.PrimeSide.GentryNu (nuXc κ q c p.X) p F k l ^ 2 - - Zeta23.PrimeSide.MtotalNu (nuXc κ q c p.X) p F := rfl - show |trGt2ChiA κ q c p F - MtotalChiA κ q c p F| ≤ _ - rw [heq] - refine hmain.trans ?_ - have hB2 : B ^ 2 ≤ (2 * C₀ ^ 2 + 2) * (Zeta23.l p.T ^ 2 + p.X) := by - have hsq : Real.sqrt p.X ^ 2 = p.X := Real.sq_sqrt (le_of_lt p.X_pos) - have hC₀0 : (0:ℝ) ≤ C₀ := by linarith - rw [hB] - nlinarith [sq_nonneg (C₀ * Zeta23.l p.T - Real.sqrt p.X), sq_nonneg (Zeta23.l p.T), - sq_nonneg (Real.sqrt p.X), mul_nonneg (mul_nonneg hC₀0 hC₀0) (sq_nonneg (Zeta23.l p.T))] - have hlog0 : 0 ≤ Real.log (Zeta23.l p.T) := Real.log_nonneg hl1 - calc Cends * (p.L * p.l * Real.log p.l * B ^ 2) - ≤ |Cends| * (p.L * p.l * Real.log p.l * B ^ 2) := by - apply mul_le_mul_of_nonneg_right (le_abs_self _) - positivity - _ ≤ |Cends| * (p.L * p.l * Real.log p.l * ((2 * C₀ ^ 2 + 2) * (Zeta23.l p.T ^ 2 + p.X))) := by - gcongr - _ = |Cends| * (2 * C₀ ^ 2 + 2) - * (p.L * Zeta23.l p.T * Real.log (Zeta23.l p.T) * (Zeta23.l p.T ^ 2 + p.X)) := by - ring - + = (p.L)⁻¹ ^ 2 * ∑ k : Fin p.d, ∑ l : Fin p.d, GentryNu (nuXc κ q c p.X) p F k l ^ 2 + - MtotalNu (nuXc κ q c p.X) p F := rfl + dsimp only; rw [heq] + refine h.trans ?_ + calc Ce * (p.L * p.l * Real.log p.l * B ^ 2) + ≤ |Ce| * (p.L * p.l * Real.log p.l * B ^ 2) := + mul_le_mul_of_nonneg_right (le_abs_self _) (by positivity) + _ ≤ |Ce| * (p.L * p.l * Real.log p.l * (2 * C₀ ^ 2 * (p.l ^ 2 + p.X))) := by gcongr + _ = 2 * |Ce| * C₀ ^ 2 * (p.L * Zeta23.l p.T * Real.log (Zeta23.l p.T) + * (Zeta23.l p.T ^ 2 + p.X)) := by ring end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/ReZeroCountChi.lean b/zeta23/Zeta23/ThmE/ReZeroCountChi.lean index af934bdf53..b9db969bce 100644 --- a/zeta23/Zeta23/ThmE/ReZeroCountChi.lean +++ b/zeta23/Zeta23/ThmE/ReZeroCountChi.lean @@ -4,15 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/ThmE/ReZeroCountChi.lean — the Jensen half of Backlund's bound for L(s,χ): the number of -zeros of Re L(σ+iT,χ) on σ ∈ [1/2,2] is ≪_χ log|T|. -This is the analogue of Zeta23/RvM/ReZeroCount.lean (same route and proof) for L(s,χ), using the -symmetrised function g(z) := (L(z+iT,χ) + L(z−iT,χ⁻¹))/2 (entire; = Re L(σ+iT,χ) on ℝ by -LFunction_conj), growth for χ and χ⁻¹ from LFunction_growth_right, and no pole -bookkeeping — hence two-sided in the height T. +Zeta23/ThmE/ReZeroCountChi.lean — the Jensen half of Backlund's bound for `L(s, χ)`: +`#{σ ∈ [1/2, 2] : Re L(σ+iT, χ) = 0} ≪ log(q(|T|+3))` uniformly in `q, χ, T`, +instantiated from `Zeta23.RvM.reZeroCount_of_strip_growth`. -/ import Zeta23.ThmE.BacklundChi -import Zeta23.RvM.ReZeroCount open Complex Set Metric Zeta23.RvM @@ -23,263 +19,36 @@ namespace ThmE variable {q : ℕ} [NeZero q] {χ : DirichletCharacter ℂ q} -/-- the symmetrised function g_T(z) := (L(z+iT,χ) + L(z−iT,χ⁻¹))/2; equals Re L(σ+iT,χ) for real σ. -/ -def symL (χ : DirichletCharacter ℂ q) (T : ℝ) (z : ℂ) : ℂ := - (χ.LFunction (z + T * I) + χ⁻¹.LFunction (z - T * I)) / 2 - -lemma symL_analyticAt (hχ1 : χ ≠ 1) (T : ℝ) (z : ℂ) : AnalyticAt ℂ (symL χ T) z := by - have hinv : χ⁻¹ ≠ 1 := fun h => hχ1 (inv_eq_one.mp h) - unfold symL - have ha : AnalyticAt ℂ (fun z : ℂ => χ.LFunction (z + T * I)) z := - (LFunction_analyticOnNhd hχ1 _ (mem_univ _)).comp_of_eq (by fun_prop) rfl - have hb : AnalyticAt ℂ (fun z : ℂ => χ⁻¹.LFunction (z - T * I)) z := - (LFunction_analyticOnNhd hinv _ (mem_univ _)).comp_of_eq (by fun_prop) rfl - exact (ha.add hb).div_const - -/-- for real σ, g_T(σ) is the real number Re L(σ + iT, χ). -/ -lemma symL_ofReal (hχ1 : χ ≠ 1) {T : ℝ} (σ : ℝ) : - symL χ T σ = (((χ.LFunction ((σ:ℂ) + T * I)).re : ℝ) : ℂ) := by - unfold symL - have hconj : χ⁻¹.LFunction ((σ:ℂ) - T * I) = (starRingEnd ℂ) (χ.LFunction ((σ:ℂ) + T * I)) := by - have h := LFunction_conj hχ1 ((σ:ℂ) - T * I) - have e : (starRingEnd ℂ) ((σ:ℂ) - T * I) = (σ:ℂ) + T * I := by - simp - rw [e] at h - rw [h, Complex.conj_conj] - rw [hconj, Complex.add_conj] - push_cast - ring - /-! ## The q-UNIFORM Jensen count and Backlund bound (absolute constants) -/ -set_option maxHeartbeats 1600000 in -/-- **(J), q-uniform** (the per-χ `reZeroSetL_card_le` below is its corollary): -#{σ ∈ [1/2,2] : Re L(σ+iT,χ) = 0} ≤ C·log(q(|T|+3)) with an absolute C, -for every modulus q, every χ ≠ 1 mod q and every real T. -/ +/-- **(J), q-uniform**: `#{σ ∈ [1/2, 2] : Re L(σ+iT, χ) = 0} ≤ C·log(q(|T|+3))` with an +absolute `C`, for every modulus `q`, every `χ ≠ 1 mod q`, and every real `T`. -/ theorem reZeroSetL_card_le_uniform : ∃ C : ℝ, ∀ (q : ℕ) [NeZero q] (χ : DirichletCharacter ℂ q), χ ≠ 1 → ∀ T : ℝ, (reZeroSetL χ T).Finite ∧ ((reZeroSetL χ T).ncard : ℝ) ≤ C * Real.log (q * (|T| + 3)) := by - set r : ℝ := 0.8 with hr - set R : ℝ := 0.9 with hR - have hlogRr : 0 < Real.log (R / r) := Real.log_pos (by norm_num [hr, hR]) - refine ⟨1 / Real.log (R / r) * (Real.log 24 + 2), fun q _ χ hχ1 T => ?_⟩ + refine ⟨1 / Real.log ((0.9 : ℝ) / 0.8) * (Real.log (max ((8 : ℝ) / (1 / 3)) 1) + 2 * 1), + fun q _ χ hχ1 T => ?_⟩ have hinv : χ⁻¹ ≠ 1 := fun h => hχ1 (inv_eq_one.mp h) - have hq1 : (1:ℝ) ≤ q := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr (NeZero.ne q) - have hgrowth₁ : ∀ s : ℂ, (0.15:ℝ) ≤ s.re → ‖χ.LFunction s‖ ≤ 8 * q * (|s.im| + 3) := - fun s hs => LFunction_growth_right_uniform hχ1 hs - have hgrowth₂ : ∀ s : ℂ, (0.15:ℝ) ≤ s.re → ‖χ⁻¹.LFunction s‖ ≤ 8 * q * (|s.im| + 3) := - fun s hs => LFunction_growth_right_uniform hinv hs - set κ : ℂ := ((19/10 : ℝ) : ℂ) with hκ - have hκ0 : κ ≠ 0 := by simp [hκ] - have hnormκ : ‖κ‖ = 1.9 := by simp [hκ]; norm_num - -- the centre value g_T(2) = Re L(2+iT,χ) ≥ 2 − π²/6 > 1/3 - have hsub1 := norm_LFunction_sub_one_le (χ := χ) (s := 2 + T * I) (by simp) - have hre2 : 2 - Real.pi ^ 2 / 6 ≤ (χ.LFunction (2 + T * I)).re := by - have h2 : |(χ.LFunction (2 + T * I) - 1).re| ≤ Real.pi ^ 2 / 6 - 1 := - (Complex.abs_re_le_norm _).trans hsub1 - have h3 : (χ.LFunction (2 + T * I) - 1).re = (χ.LFunction (2 + T * I)).re - 1 := by simp - rw [h3] at h2 - linarith [(abs_le.mp h2).1] - have hthird := one_third_lt_two_sub_pi_sq_div_six - have hg2 : symL χ T 2 = (((χ.LFunction ((2:ℂ) + T * I)).re : ℝ) : ℂ) := by - have h := symL_ofReal hχ1 (T := T) 2 - push_cast at h ⊢ - exact h - have hg2ne : symL χ T 2 ≠ 0 := by - rw [hg2] - simp only [ne_eq, Complex.ofReal_eq_zero] - linarith - set u : ℂ := (symL χ T 2)⁻¹ with hu - have hu0 : u ≠ 0 := inv_ne_zero hg2ne - have hnu : ‖u‖ ≤ 3 := by - rw [hu, norm_inv, inv_le_comm₀ (by positivity) (by norm_num)] - rw [hg2, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (by linarith)] - linarith - set G : ℂ → ℂ := fun w => symL χ T (2 + κ * w) * u with hG - have hGanalytic : ∀ w : ℂ, ‖w‖ ≤ 1.05 → AnalyticAt ℂ G w := by - intro w _ - exact ((symL_analyticAt hχ1 T _).comp_of_eq - (by fun_prop : AnalyticAt ℂ (fun w : ℂ => 2 + κ * w) w) rfl).mul analyticAt_const - have hG0 : G 0 = 1 := by - simp only [hG, mul_zero, add_zero, hu] - exact mul_inv_cancel₀ hg2ne - -- finiteness of the unit-ball zeros - have hball : AnalyticOnNhd ℂ G (Metric.ball 0 1.05) := by - intro w hw - rw [Metric.mem_ball, dist_zero_right] at hw - exact hGanalytic w hw.le - have hfin : (SetOfZeros 1 G).Finite := by - have h := finite_zeros_closedBall (f := G) (R := 1.05) (r := 1) (by norm_num) hball - (z₀ := 0) (by simp; norm_num) (by rw [hG0]; exact one_ne_zero) - exact h.subset (by intro z hz; exact hz) - -- growth bound on ‖w‖ ≤ R - set B : ℝ := 24 * q * (|T| + 5) with hB - have hBpos : 0 < B := by positivity - have hκre : κ.re = 1.9 := by rw [hκ]; norm_num [Complex.ofReal_re] - have hκim : κ.im = 0 := by rw [hκ]; simp - have hfz : ∀ w : ℂ, ‖w‖ ≤ R → ‖G w‖ ≤ B := by - intro w hw - have hwre := abs_le.mp ((Complex.abs_re_le_norm w).trans hw) - have hwim := abs_le.mp ((Complex.abs_im_le_norm w).trans hw) - rw [hR] at hwre hwim - have hκwre : (κ * w).re = 1.9 * w.re := by - rw [Complex.mul_re, hκre, hκim]; ring - have hκwim : (κ * w).im = 1.9 * w.im := by - rw [Complex.mul_im, hκre, hκim]; ring - have hgen : ∀ (Lf : ℂ → ℂ), - (∀ s : ℂ, (0.15:ℝ) ≤ s.re → ‖Lf s‖ ≤ 8 * q * (|s.im| + 3)) → - ∀ ε : ℝ, (ε = 1 ∨ ε = -1) → ‖Lf (2 + κ * w + ε * T * I)‖ ≤ 8 * q * (|T| + 5) := by - intro Lf hg ε hε - set s : ℂ := 2 + κ * w + ε * T * I with hs - have hsre : s.re = 2 + 1.9 * w.re := by - rw [hs] - simp only [Complex.add_re, Complex.mul_re, Complex.I_re, Complex.I_im, - Complex.ofReal_re, Complex.ofReal_im, Complex.re_ofNat, Complex.mul_im, hκre, hκim] - ring - have hsim : s.im = 1.9 * w.im + ε * T := by - rw [hs] - simp only [Complex.add_im, Complex.mul_im, Complex.I_re, Complex.I_im, - Complex.ofReal_re, Complex.ofReal_im, Complex.im_ofNat, Complex.mul_re, hκre, hκim] - ring - have h1 : (0.15:ℝ) ≤ s.re := by rw [hsre]; nlinarith - have h3 := hg s h1 - have hbase : |s.im| + 3 ≤ |T| + 5 := by - rw [hsim] - have h4 := abs_add_le (1.9 * w.im) (ε * T) - have h5 : |1.9 * w.im| ≤ 1.71 := by - rw [abs_mul, abs_of_pos (by norm_num : (0:ℝ) < 1.9)] - have : |w.im| ≤ 0.9 := abs_le.mpr ⟨hwim.1, hwim.2⟩ - nlinarith - have h6 : |ε * T| = |T| := by - rcases hε with rfl | rfl <;> simp - linarith - calc ‖Lf s‖ ≤ 8 * q * (|s.im| + 3) := h3 - _ ≤ 8 * q * (|T| + 5) := by gcongr - have hgb : ‖symL χ T (2 + κ * w)‖ ≤ 8 * q * (|T| + 5) := by - have e1 : (2:ℂ) + κ * w + (1:ℝ) * T * I = 2 + κ * w + T * I := by push_cast; ring - have e2 : (2:ℂ) + κ * w + (-1:ℝ) * T * I = 2 + κ * w - T * I := by push_cast; ring - have ha := hgen χ.LFunction hgrowth₁ 1 (Or.inl rfl) - have hb := hgen χ⁻¹.LFunction hgrowth₂ (-1) (Or.inr rfl) - rw [e1] at ha - rw [e2] at hb - unfold symL - calc ‖(χ.LFunction (2 + κ * w + T * I) + χ⁻¹.LFunction (2 + κ * w - T * I)) / 2‖ - = ‖χ.LFunction (2 + κ * w + T * I) + χ⁻¹.LFunction (2 + κ * w - T * I)‖ / 2 := by - rw [norm_div]; norm_num - _ ≤ (‖χ.LFunction (2 + κ * w + T * I)‖ + ‖χ⁻¹.LFunction (2 + κ * w - T * I)‖) / 2 := by - gcongr - exact norm_add_le _ _ - _ ≤ 8 * q * (|T| + 5) := by linarith - calc ‖G w‖ = ‖symL χ T (2 + κ * w)‖ * ‖u‖ := by rw [hG]; exact norm_mul _ _ - _ ≤ (8 * q * (|T| + 5)) * 3 := by - apply mul_le_mul hgb hnu (norm_nonneg _) (by positivity) - _ = B := by rw [hB]; ring - -- apply ZerosBound - have hfAnalytic : AnalyticOnNhd ℂ G (Metric.closedBall (0:ℂ) 1) := by - intro w hw - rw [Metric.mem_closedBall, dist_zero_right] at hw - exact hGanalytic w (hw.trans (by norm_num)) - have hrlt1 : r < 1 := by norm_num [hr] - have hZ := ZerosBound (B := B) (r := r) (R := R) (by norm_num [hr]) hrlt1 - (by norm_num [hr, hR]) (by norm_num [hR]) hfAnalytic hG0 hfin hfz - set Z : Finset ℂ := (finiteSetOfZeros_mono hrlt1 hfin).toFinset with hZdef - have horder : ∀ ρ ∈ Z, 1 ≤ analyticOrderNatAt G ρ := by - intro ρ hρ - rw [hZdef, Set.Finite.mem_toFinset] at hρ - obtain ⟨hρr, hρ0⟩ := hρ - have hρr' : ‖ρ‖ ≤ r := hρr - have han : AnalyticAt ℂ G ρ := hGanalytic ρ (by rw [hr] at hρr'; linarith) - have hne0 : analyticOrderAt G ρ ≠ 0 := han.analyticOrderAt_ne_zero.mpr hρ0 - have hnetop : analyticOrderAt G ρ ≠ ⊤ := by - refine hball.analyticOrderAt_ne_top_of_isPreconnected (convex_ball _ _).isPreconnected - (x := 0) ?_ ?_ ?_ - · rw [Metric.mem_ball, dist_zero_right]; simp; norm_num - · rw [Metric.mem_ball, dist_zero_right]; rw [hr] at hρr'; linarith - · rw [(hGanalytic 0 (by norm_num)).analyticOrderAt_eq_zero.mpr - (by rw [hG0]; exact one_ne_zero)] - exact ENat.zero_ne_top - unfold analyticOrderNatAt - obtain ⟨n, hn⟩ := ENat.ne_top_iff_exists.mp hnetop - rw [← hn] at hne0 ⊢ - simp only [ENat.toNat_coe, ne_eq, Nat.cast_eq_zero] at hne0 ⊢ - omega - -- the real zeros inject into Z - set φ : ℝ → ℂ := fun σ => ((σ - 2 : ℝ) : ℂ) / κ with hφ - have hφinj : Set.InjOn φ (reZeroSetL χ T) := by - intro a _ b _ h - simp only [hφ] at h - have h' : ((a - 2 : ℝ) : ℂ) = ((b - 2 : ℝ) : ℂ) := by - have := congrArg (fun z => z * κ) h - simpa [div_mul_cancel₀ _ hκ0] using this - have := Complex.ofReal_inj.mp h' - linarith - have hmem : ∀ σ ∈ reZeroSetL χ T, φ σ ∈ SetOfZeros r G := by - rintro σ ⟨hσI, hσ0⟩ - have hσ1 : (1/2:ℝ) ≤ σ := hσI.1 - have hσ2 : σ ≤ 2 := hσI.2 - constructor - · show ‖((σ - 2 : ℝ) : ℂ) / κ‖ ≤ r - rw [norm_div, hnormκ, Complex.norm_real, Real.norm_eq_abs, hr] - rw [abs_of_nonpos (by linarith)] - rw [div_le_iff₀ (by norm_num)] - linarith - · show G (φ σ) = 0 - have hfix : (2:ℂ) + κ * φ σ = (σ:ℂ) := by - simp only [hφ] - field_simp - push_cast - ring - simp only [hG, hfix] - rw [symL_ofReal hχ1 σ, hσ0] - simp - have himg : φ '' (reZeroSetL χ T) ⊆ (↑Z : Set ℂ) := by - rintro _ ⟨σ, hσ, rfl⟩ - rw [hZdef] - simp only [Set.Finite.coe_toFinset] - exact hmem σ hσ - have hfinRe : (reZeroSetL χ T).Finite := - Set.Finite.of_finite_image (Z.finite_toSet.subset himg) hφinj - refine ⟨hfinRe, ?_⟩ - have hcard : ((reZeroSetL χ T).ncard : ℝ) ≤ (Z.card : ℝ) := by - have h1 : (reZeroSetL χ T).ncard = (φ '' reZeroSetL χ T).ncard := - (hφinj.ncard_image).symm - have h2 : (φ '' reZeroSetL χ T).ncard ≤ (↑Z : Set ℂ).ncard := - Set.ncard_le_ncard himg Z.finite_toSet - rw [Set.ncard_coe_finset] at h2 - exact_mod_cast h1 ▸ h2 - have hsum : (Z.card : ℝ) ≤ ((∑ ρ ∈ Z, analyticOrderNatAt G ρ : ℕ) : ℝ) := by - have h := (Finset.card_eq_sum_ones Z).le.trans (Finset.sum_le_sum horder) - exact_mod_cast h - -- log B ≤ (log 24 + 2)·log(q(|T|+3)) - have hT3 : (3:ℝ) ≤ |T| + 3 := by linarith [abs_nonneg T] - have hqT : (3:ℝ) ≤ q * (|T| + 3) := by nlinarith - have hlogqT : 1 ≤ Real.log (q * (|T| + 3)) := by - rw [← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - have hlog5 : Real.log (|T| + 5) ≤ Real.log (|T| + 3) + 1 := by - have h53 : |T| + 5 ≤ (|T| + 3) * Real.exp 1 := by - have := Real.add_one_le_exp (1:ℝ); nlinarith [abs_nonneg T] - calc Real.log (|T| + 5) ≤ Real.log ((|T| + 3) * Real.exp 1) := - Real.log_le_log (by positivity) h53 - _ = Real.log (|T| + 3) + 1 := by - rw [Real.log_mul (by positivity) (Real.exp_pos 1).ne', Real.log_exp] - have hlogB : Real.log B ≤ (Real.log 24 + 2) * Real.log (q * (|T| + 3)) := by - rw [hB, Real.log_mul (by positivity) (by positivity), Real.log_mul (by norm_num) (by positivity)] - have hsplit : Real.log (q * (|T| + 3)) = Real.log q + Real.log (|T| + 3) := - Real.log_mul (by positivity) (by positivity) - have hlq : 0 ≤ Real.log q := Real.log_nonneg hq1 - have hl24 : 0 ≤ Real.log 24 := Real.log_nonneg (by norm_num) - rw [hsplit] at hlogqT ⊢ - nlinarith - calc ((reZeroSetL χ T).ncard : ℝ) ≤ (Z.card : ℝ) := hcard - _ ≤ _ := hsum - _ ≤ 1 / Real.log (R / r) * Real.log B := by exact_mod_cast hZ - _ ≤ 1 / Real.log (R / r) * ((Real.log 24 + 2) * Real.log (q * (|T| + 3))) := - mul_le_mul_of_nonneg_left hlogB (by positivity) - _ = _ := by ring - -/-- **Backlund's bound for L(s,χ), q-uniform** (absolute C; all q, all χ ≠ 1, all T). -/ + have hq1 : (1 : ℝ) ≤ q := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr (NeZero.ne q) + have hre2 : (1 / 3 : ℝ) ≤ (χ.LFunction (2 + T * I)).re := by + have hsub := (Complex.abs_re_le_norm _).trans + (norm_LFunction_sub_one_le (χ := χ) (s := 2 + T * I) (by simp)) + simp at hsub; linarith [(abs_le.mp hsub).1, one_third_lt_two_sub_pi_sq_div_six] + exact reZeroCount_of_strip_growth (f₁ := χ.LFunction) (f₂ := χ⁻¹.LFunction) + (scale := (q : ℝ)) (c₀ := 1 / 3) (C := 8) (A := 1) hq1 (by norm_num) (by norm_num) zero_le_one + (fun _ _ => LFunction_analyticOnNhd hχ1 _ (mem_univ _)) + (fun _ _ => LFunction_analyticOnNhd hinv _ (mem_univ _)) + (fun σ _ => by + have h := LFunction_conj hχ1 ((σ : ℂ) - T * I) + rw [show (starRingEnd ℂ) ((σ : ℂ) - T * I) = (σ : ℂ) + T * I by simp] at h + rw [h, Complex.conj_conj]) + hre2 + (fun s hre _ => by + simpa [Real.rpow_one, mul_assoc] using LFunction_growth_right_uniform hχ1 hre) + (fun s hre _ => by + simpa [Real.rpow_one, mul_assoc] using LFunction_growth_right_uniform hinv hre) + +/-- **Backlund's bound for L(s,χ), q-uniform** (absolute `C`; all `q`, all `χ ≠ 1`, all `T`). -/ theorem backlund_horizontalChi_uniform : ∃ C : ℝ, ∀ (q : ℕ) [NeZero q] (χ : DirichletCharacter ℂ q), χ ≠ 1 → ∀ T : ℝ, (∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T) → |(∫ σ in (1 / 2 : ℝ)..2, logDeriv χ.LFunction (σ + T * I)).im| @@ -287,48 +56,32 @@ theorem backlund_horizontalChi_uniform : ∃ C : ℝ, ∀ (q : ℕ) [NeZero q] ( obtain ⟨C, hC⟩ := reZeroSetL_card_le_uniform refine ⟨2 * Real.pi * (C + 1), fun q _ χ hχ1 T hord => ?_⟩ obtain ⟨hfin, hcount⟩ := hC q χ hχ1 T - have hq1 : (1:ℝ) ≤ q := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr (NeZero.ne q) - have hqT : (3:ℝ) ≤ q * (|T| + 3) := by nlinarith [abs_nonneg T] - have hlog : 1 ≤ Real.log (q * (|T| + 3)) := by - rw [← Real.log_exp 1] - exact Real.log_le_log (Real.exp_pos 1) (by linarith [Real.exp_one_lt_d9.trans (by norm_num : (2.7182818286 : ℝ) < 3)]) + have hq1 : (1 : ℝ) ≤ q := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr (NeZero.ne q) + have hlog := one_le_log_scale_add_three hq1 T have h := im_integral_logDeriv_le hχ1 (LFunction_ne_zero_on_segment hχ1 hord) hfin refine h.trans ?_ have hπ := Real.pi_pos nlinarith [hcount, hlog, mul_nonneg hπ.le (sub_nonneg.mpr hlog)] - /-! ## Per-χ forms -/ -/-- **(J) the Jensen half of Backlund's bound for L(s,χ)**: #{σ ∈ [1/2,2] : Re L(σ+iT,χ) = 0} ≪_χ log |T| -(per-χ form; from the q-uniform bound, since q(|T|+3) ≤ |T|² once |T| ≥ 2q + 6). -/ +/-- **(J) the Jensen half of Backlund's bound for L(s,χ)**: `#{σ ∈ [1/2, 2] : Re L(σ+iT, χ) = 0} ≪_χ log |T|`. -/ theorem reZeroSetL_card_le (hχ1 : χ ≠ 1) : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ |T| → (reZeroSetL χ T).Finite ∧ ((reZeroSetL χ T).ncard : ℝ) ≤ C * Real.log |T| := by obtain ⟨C, hC⟩ := reZeroSetL_card_le_uniform - have hq1 : (1:ℝ) ≤ q := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr (NeZero.ne q) + have hq1 : (1 : ℝ) ≤ q := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr (NeZero.ne q) refine ⟨2 * |C|, 2 * q + 6, fun T hT => ?_⟩ obtain ⟨hfin, hcount⟩ := hC q χ hχ1 T refine ⟨hfin, hcount.trans ?_⟩ - have hT3 : (3:ℝ) ≤ |T| := by linarith - have hqT : (q:ℝ) * (|T| + 3) ≤ |T| ^ 2 := by - nlinarith [mul_nonneg (sub_nonneg.2 hT) (by positivity : (0:ℝ) ≤ |T| + 3)] - have hpos : (0:ℝ) < q * (|T| + 3) := by positivity + have hqT : (q : ℝ) * (|T| + 3) ≤ |T| ^ 2 := by + nlinarith [mul_nonneg (sub_nonneg.2 hT) (by positivity : (0 : ℝ) ≤ |T| + 3)] have hlog : Real.log (q * (|T| + 3)) ≤ 2 * Real.log |T| := - calc Real.log (q * (|T| + 3)) ≤ Real.log (|T| ^ 2) := Real.log_le_log hpos hqT - _ = 2 * Real.log |T| := by rw [Real.log_pow]; norm_num + (Real.log_le_log (by positivity) hqT).trans (by rw [Real.log_pow]; norm_num) have hlog0 : 0 ≤ Real.log (q * (|T| + 3)) := Real.log_nonneg (by nlinarith) calc C * Real.log (q * (|T| + 3)) ≤ |C| * Real.log (q * (|T| + 3)) := mul_le_mul_of_nonneg_right (le_abs_self C) hlog0 _ ≤ |C| * (2 * Real.log |T|) := mul_le_mul_of_nonneg_left hlog (abs_nonneg C) _ = 2 * |C| * Real.log |T| := by ring -/-- **Backlund's bound for L(s,χ)**: two-sided in T; constants depend on χ. -/ -theorem backlund_horizontalChi (hχ1 : χ ≠ 1) : ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ |T| → - (∀ ρ, IsNontrivialZeroL χ ρ → ρ.im ≠ T) → - |(∫ σ in (1 / 2 : ℝ)..2, logDeriv χ.LFunction (σ + T * I)).im| ≤ C * Real.log |T| := - backlund_horizontalChi_of_count hχ1 (reZeroSetL_card_le hχ1) - end ThmE end Zeta23 - -end diff --git a/zeta23/Zeta23/ThmE/RvMChi.lean b/zeta23/Zeta23/ThmE/RvMChi.lean index dbd208e727..dca91ce344 100644 --- a/zeta23/Zeta23/ThmE/RvMChi.lean +++ b/zeta23/Zeta23/ThmE/RvMChi.lean @@ -18,7 +18,6 @@ Decomposition (mirrors the Riemann–von Mangoldt argument for ζ; each piece in fold by Λ(1−s̄,χ) = ε(χ)·conj Λ(s,χ) (ε drops out of Λ'/Λ), Γ-side = ∫μ_χ (GammaFactsChi), Backlund for L via g(z) = (L(z+iT,χ)+L(z−iT,χ̄))/2, non-ordinate perturbation. -/ -import Zeta23.ThmE.LocalCountChi import Zeta23.ThmE.MainTermChi open Complex Set DirichletCharacter diff --git a/zeta23/Zeta23/ThmE/SeamL.lean b/zeta23/Zeta23/ThmE/SeamL.lean index a3ea63e64d..0d1386e132 100644 --- a/zeta23/Zeta23/ThmE/SeamL.lean +++ b/zeta23/Zeta23/ThmE/SeamL.lean @@ -334,7 +334,7 @@ theorem LSeam_one_le_mult (hq : 1 < q) (hprim : χ.IsPrimitive) : unfold zeroMultL obtain ⟨n, hn⟩ := ENat.ne_top_iff_exists.mp hnetop rw [← hn] at hne0 ⊢ - simp only [ENat.toNat_coe, ne_eq, Nat.cast_eq_zero] at hne0 ⊢ + simp only [ENat.toNat_natCast, ne_eq, Nat.cast_eq_zero] at hne0 ⊢ omega /-- local finiteness of the zeros of L(·,χ) in ordinate windows. -/ diff --git a/zeta23/Zeta23/ThmE/Statement.lean b/zeta23/Zeta23/ThmE/Statement.lean index 1aaec6acca..17c37c344a 100644 --- a/zeta23/Zeta23/ThmE/Statement.lean +++ b/zeta23/Zeta23/ThmE/Statement.lean @@ -58,16 +58,11 @@ def zerosInL (T₁ T₂ : ℝ) : Set ℂ := {ρ | IsNontrivialZeroL χ ρ ∧ T def NcountL (T₁ T₂ : ℝ) : ℕ := ∑ᶠ ρ ∈ zerosInL χ T₁ T₂, zeroMultL χ ρ /-- N_{d,χ}(T₁,T₂): distinct zeros. -/ def NdistL (T₁ T₂ : ℝ) : ℕ := (zerosInL χ T₁ T₂).ncard -/-- N_{0,χ}(T₁,T₂): on the line, with multiplicity. -/ -def N0L (T₁ T₂ : ℝ) : ℕ := ∑ᶠ ρ ∈ zerosInL χ T₁ T₂ ∩ {ρ | ρ.re = 1 / 2}, zeroMultL χ ρ /-- N*_{0,χ}(T₁,T₂): on the line, distinct. -/ def N0starL (T₁ T₂ : ℝ) : ℕ := (zerosInL χ T₁ T₂ ∩ {ρ | ρ.re = 1 / 2}).ncard /-- N^s_{0,χ}(T₁,T₂): on the line and simple. -/ def N0simpleL (T₁ T₂ : ℝ) : ℕ := (zerosInL χ T₁ T₂ ∩ {ρ | ρ.re = 1 / 2} ∩ {ρ | zeroMultL χ ρ = 1}).ncard -/-- N^s_χ(T₁,T₂): simple zeros. -/ -def NsimpleL (T₁ T₂ : ℝ) : ℕ := (zerosInL χ T₁ T₂ ∩ {ρ | zeroMultL χ ρ = 1}).ncard - /-! ## 2. The seam: the zeros of L(s,χ) as an abstract ZeroConfig ([thm:E] proof (ii)) -/ /-- Classical facts about L(s,χ), χ primitive mod q > 1, needed to instantiate `Zeta23.ZeroConfig` — @@ -76,25 +71,14 @@ obligations discharged from Mathlib elsewhere in the repository, not inputs of t "the multiset of zeros of L(s,χ) is invariant under ρ ↦ 1−ρ̄ with multiplicities (functional equation χ ↔ χ̄ composed with conj L(conj s,χ) = L(s,χ̄))". (The γ ↦ −γ symmetry fails for complex χ; the abstract layer does not use it — the local count in `RiemannVonMangoldtChi` is two-sided instead.) -/ -structure LSeam : Prop where - one_le_mult : ∀ ρ, IsNontrivialZeroL χ ρ → 1 ≤ zeroMultL χ ρ - reflect_zero : ∀ ρ, IsNontrivialZeroL χ ρ → IsNontrivialZeroL χ (reflect ρ) - mult_reflect : ∀ ρ, IsNontrivialZeroL χ ρ → zeroMultL χ (reflect ρ) = zeroMultL χ ρ - finite_window : ∀ T₁ T₂ : ℝ, - ({ρ | IsNontrivialZeroL χ ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}).Finite +abbrev LSeam : Prop := ZeroSeam (IsNontrivialZeroL χ) (zeroMultL χ) variable {χ} /-- The nontrivial zeros of L(s,χ) with multiplicities, as an abstract zero configuration (carrier := exactly the nontrivial zeros, mult := exactly the analytic order). -/ -def LZeros (hs : LSeam χ) : ZeroConfig where - carrier := {ρ | IsNontrivialZeroL χ ρ} - mult := zeroMultL χ - one_le_mult := hs.one_le_mult - strip := fun _ h => ⟨h.2.1.le, h.2.2.le⟩ - reflect_mem := hs.reflect_zero - mult_reflect := hs.mult_reflect - finite_window := hs.finite_window +def LZeros (hs : LSeam χ) : ZeroConfig := + hs.toZeroConfig fun _ h => ⟨h.2.1.le, h.2.2.le⟩ section seam_rfl variable (hs : LSeam χ) (T₁ T₂ : ℝ) @@ -115,16 +99,6 @@ lemma LZeros_window : (LZeros hs).window T₁ T₂ = zerosInL χ T₁ T₂ := by @[simp] lemma LZeros_N0s : (LZeros hs).N0s T₁ T₂ = N0simpleL χ T₁ T₂ := by simp [ZeroConfig.N0s, N0simpleL, LZeros_window, ZeroConfig.onLine] -/-- [eq:trivialchain] for L(s,χ), from the abstract `ZeroConfig.trivial_chain`. -/ -theorem trivial_chainL (hs : LSeam χ) (T₁ T₂ : ℝ) : - N0simpleL χ T₁ T₂ ≤ N0starL χ T₁ T₂ ∧ N0starL χ T₁ T₂ ≤ N0L χ T₁ T₂ ∧ - N0L χ T₁ T₂ ≤ NcountL χ T₁ T₂ ∧ N0simpleL χ T₁ T₂ ≤ NsimpleL χ T₁ T₂ ∧ - NsimpleL χ T₁ T₂ ≤ NdistL χ T₁ T₂ ∧ NdistL χ T₁ T₂ ≤ NcountL χ T₁ T₂ := by - have h := (LZeros hs).trivial_chain T₁ T₂ - simpa only [ZeroConfig.N0s, ZeroConfig.N0star, ZeroConfig.N0, ZeroConfig.N, ZeroConfig.Ns, - ZeroConfig.Nd, LZeros_window, ZeroConfig.onLine, LZeros_simple, LZeros_mult, N0simpleL, N0starL, - N0L, NcountL, NsimpleL, NdistL] using h - end seam_rfl /-! ## 3. Theorem E — parameters ([thm:E]; ε-forms at fixed λ ∈ (0,1), then 2/3, 1/2, 3/4) @@ -145,6 +119,5 @@ def coeff : ℕ → ℂ := fun n => χ (n : ZMod q) -- The four Theorem E statements (thmE_A_lam, thmE_A, thmE_B, thmE_C) are theorems in -- Zeta23/ThmE/Final.lean, together with the zero-hypothesis forms thmE_A₀/thmE_B₀/thmE_C₀. - end ThmE end Zeta23 diff --git a/zeta23/Zeta23/ThmE/TracesChi.lean b/zeta23/Zeta23/ThmE/TracesChi.lean index 2794450223..3c20bd8873 100644 --- a/zeta23/Zeta23/ThmE/TracesChi.lean +++ b/zeta23/Zeta23/ThmE/TracesChi.lean @@ -7,30 +7,17 @@ SPDX-License-Identifier: Apache-2.0 Part of the Zeta23 formalization of the paper "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". -/ -import Zeta23.ThmE.TracesHypChi -import Zeta23.ThmE.PrimeSideChi import Zeta23.ThmE.PPChi import Zeta23.ThmE.MuMuChi import Zeta23.ThmE.CrossMuPChi -import Zeta23.PrimeSideB -import Zeta23.PrimeSideB.Concrete +import Zeta23.PrimeSideB.Traces import Zeta23.PrimeSideA.Bridge /-! # [thm:traces] for L(s,chi) — the E3 assembly -Mirror of Zeta23/PrimeSideB.lean (abstract Facts → TracesBounds assembly) and -Zeta23/PrimeSideB/Traces.lean (concrete instantiation) for a Dirichlet character: -ell1 ↦ ell1q q, nu_X ↦ nu_{X,chi} = mu_{kappa,q} + P_{X,c} (no pole term: [eq:Msplit] has three -terms), [prop:PP] main sum ↦ sumA2gCoprime. The real-variable pointwise lemmas tr2_pointwise and -ratio_pointwise (PrimeSideB.lean) are reused verbatim — they take the density-log as a free real, -and ell1q slots in (l ≤ ell1q for q ≥ 1). Constants may depend on q (q fixed in [thm:E]; the -q-uniformity question for [rem:otherL](i) is not addressed in this file). - -Inputs: prop_trace_chi, eq_Msplit_chi (PrimeSideChi.lean); -prop_mumu_chi (MuMuChi.lean); prop_cross_muP_chi_proved (CrossMuPChi.lean); -prop_PP_chi + sumA2gCoprime sandwich (PPChi.lean); -lem_ends_chi (via the nu-generic lem:ends). +Shares `concreteDataChiOf` and `concreteTraceFactsBaseChi` between the flat-top taper +(`concreteFactsChi` here) and the Montgomery–Taylor window (`Zeta23/ThmDE/Concrete.lean`). -/ noncomputable section @@ -48,305 +35,65 @@ lemma l_le_ell1q {q : ℕ} (hq : 1 ≤ q) {T : ℝ} (hT : 0 < T) : Zeta23.l T unfold ell1q Zeta23.l have h1 : Real.log (T / (2 * π)) ≤ Real.log (q * T / (2 * π)) := by apply Real.log_le_log (by positivity) - have hq' : (1:ℝ) ≤ q := by exact_mod_cast hq + have hq' : (1 : ℝ) ≤ q := by exact_mod_cast hq rw [div_le_div_iff_of_pos_right (by positivity)] nlinarith - have h2 : 0 < 2 * Real.log 2 - 1 := Zeta23.PaperParams.two_log_two_sub_one_pos - linarith - -/-- The data of the chi-[thm:traces] assembly (mirror of PrimeSide.Data; no Pi-terms). -/ -structure DataChi (P : Params) where - aT : ℝ → ℝ - bT : ℝ → ℝ - trG : ℝ → ℝ - trG2 : ℝ → ℝ - Ncnt : ℝ → ℝ - Mtot : ℝ → ℝ - Mmumu : ℝ → ℝ - MPP : ℝ → ℝ - MmuP : ℝ → ℝ - intMu2 : ℝ → ℝ - sumL2gq : ℝ → ℝ - -variable {P : Params} {q : ℕ} (D : DataChi P) - -/-- Hypotheses of the chi-assembly = conclusions of the §5-chi sub-results (mirror of -PrimeSide.Facts; [thm:E] proof (iii)). -/ -structure FactsChi (q : ℕ) (D : DataChi P) : Prop where - lam_pos : 0 < P.lam - lam_le_one : P.lam ≤ 1 - one_le_w : 1 ≤ P.w - one_le_q : 1 ≤ q - abdef : ∀ᶠ T in atTop, 1 - 2 * P.w / P.L T ≤ D.bT T ∧ D.bT T ≤ D.aT T ∧ D.aT T ≤ 1 - rvm : EvBound (fun T => D.Ncnt T - T * ell1q q T / (2 * π)) Zeta23.l - muints2 : EvBound (fun T => D.intMu2 T - T * ell1q q T ^ 2 / (4 * π ^ 2)) - (fun T => T * ell1q q T ^ 2 / (4 * π ^ 2) / Zeta23.l T ^ 2) - prop_trace : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.L T * Real.sqrt (P.X T)) - lem_ends : EvBound (fun T => D.trG2 T - D.Mtot T) - (fun T => P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T)) - Msplit : ∀ᶠ T in atTop, D.Mtot T = D.Mmumu T + D.MPP T + 2 * D.MmuP T - prop_mumu : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) - (fun T => Zeta23.l T ^ 2 * Real.log (P.L T)) - prop_PP : EvBound (fun T => D.MPP T - T / π * D.sumL2gq T) (fun T => P.L T ^ 2 * P.X T) - sum_lower : EvBound (fun T => min (D.sumL2gq T - (P.L T - 2 * P.w) ^ 3 / 6) 0) - (fun T => P.L T ^ 2) - sum_upper : EvBound (fun T => max (D.sumL2gq T - P.L T ^ 3 / 6) 0) (fun T => P.L T ^ 2) - cross_muP : EvBound D.MmuP (fun T => Zeta23.l T * Real.sqrt (P.X T)) - -section assembly -variable {D} (h : FactsChi q D) -include h + linarith [Zeta23.PaperParams.two_log_two_sub_one_pos] -theorem tr1_chi : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.L T * Real.sqrt (P.X T)) := h.prop_trace +/-- The data of the χ-[thm:traces] assembly (reuses `PrimeSide.Data` with zero pole terms). -/ +abbrev DataChi (P : Params) := PrimeSide.Data P -lemma Ncnt_lower_chi : ∀ᶠ T in atTop, T * Zeta23.l T / (4 * π) ≤ D.Ncnt T := by - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le - filter_upwards [hN, eventually_ge_atTop (4 * π * A), eventually_l_ge 0, eventually_gt_atTop 0] - with T hN hTA hl hT0 - have hπ := Real.pi_pos - have hle := l_le_ell1q h.one_le_q hT0 - have h1 : -(A * Zeta23.l T) ≤ D.Ncnt T - T * ell1q q T / (2 * π) := (abs_le.mp hN).1 - have h2 : T * Zeta23.l T ≤ T * ell1q q T := - mul_le_mul_of_nonneg_left hle (by linarith) - have h3 : T * Zeta23.l T / (2 * π) ≤ T * ell1q q T / (2 * π) := - div_le_div_of_nonneg_right h2 (by positivity) - have h4 : T * Zeta23.l T / (4 * π) = T * Zeta23.l T / (2 * π) - T * Zeta23.l T / (4 * π) := by - ring - have h5 : A * Zeta23.l T ≤ T * Zeta23.l T / (4 * π) := by - rw [le_div_iff₀ (by positivity)]; nlinarith - linarith +/-- Hypotheses of the χ-assembly as an instance of `PrimeSide.FactsG (ell1q q)`. -/ +abbrev FactsChi {P : Params} (q : ℕ) (D : DataChi P) : Prop := PrimeSide.FactsG (ell1q q) D -lemma T_le_Ncnt_chi : ∀ᶠ T in atTop, T ≤ 4 * π * D.Ncnt T := by - filter_upwards [Ncnt_lower_chi h, eventually_l_ge 1, eventually_ge_atTop 0] with T hN hl hT - have hπ := Real.pi_pos - have : T * Zeta23.l T ≤ 4 * π * D.Ncnt T := by rw [div_le_iff₀ (by positivity)] at hN; linarith - nlinarith - -lemma Ncnt_pos_chi : ∀ᶠ T in atTop, 0 < D.Ncnt T := by - filter_upwards [Ncnt_lower_chi h, eventually_l_ge 1, eventually_ge_atTop 1] with T hN hl hT - have hπ := Real.pi_pos - have h0 : 0 < T * Zeta23.l T / (4 * π) := by positivity - linarith - -theorem tr1'_chi : EvBound (fun T => D.trG T - P.L T * D.Ncnt T) - (fun T => P.calE T * (P.L T * D.Ncnt T)) := by - obtain ⟨C₁, hC₁, h1⟩ := h.prop_trace.eventually_le - have hlam := h.lam_pos - have hw : 0 ≤ P.w := by linarith [h.one_le_w] - refine EvBound.of_eventually_le (c := 4 * π * C₁ + 2) (by positivity) ?_ - filter_upwards [h1, h.abdef, calE_ge_w_div_L hlam hw, calE_ge_rpow hlam hw, - calE_nonneg_eventually hlam hw, T_le_Ncnt_chi h, Ncnt_pos_chi h, eventually_ge_atTop 1, - eventually_L_ge P hlam 1] with T h1 hab hEw hEr hE0 hTN hN0 hT1 hL1 - obtain ⟨hb1, hba, ha1⟩ := hab - have hT0 : 0 < T := by linarith - have hL0 : 0 ≤ P.L T := by linarith - set N := D.Ncnt T - set L := P.L T - set E := P.calE T - have hLN : 0 ≤ L * N := mul_nonneg hL0 hN0.le - have hA : |D.aT T * L * N - L * N| ≤ 2 * E * (L * N) := by - have e : D.aT T * L * N - L * N = -((1 - D.aT T) * (L * N)) := by ring - rw [e, abs_neg, abs_of_nonneg (mul_nonneg (by linarith) hLN)] - have h2 : 1 - D.aT T ≤ 2 * E := by - have e2 : 2 * P.w / L = 2 * (P.w / L) := by ring - linarith - exact mul_le_mul_of_nonneg_right h2 hLN - have hB : C₁ * (L * Real.sqrt (P.X T)) ≤ 4 * π * C₁ * (E * (L * N)) := by - have hs : Real.sqrt (P.X T) ≤ T ^ (P.lam / 2 - 1) * T := by - rw [rpow_half_sub_one_mul hT0]; exact sqrt_X_le_rpow P hlam hT0 - have hs2 : T ^ (P.lam / 2 - 1) * T ≤ E * (4 * π * N) := - mul_le_mul hEr hTN hT0.le hE0 - calc C₁ * (L * Real.sqrt (P.X T)) ≤ C₁ * (L * (E * (4 * π * N))) := by - gcongr; exact hs.trans hs2 - _ = 4 * π * C₁ * (E * (L * N)) := by ring - calc |D.trG T - L * N| - ≤ |D.trG T - D.aT T * L * N| + |D.aT T * L * N - L * N| := abs_sub_le _ _ _ - _ ≤ C₁ * (L * Real.sqrt (P.X T)) + 2 * E * (L * N) := add_le_add h1 hA - _ ≤ 4 * π * C₁ * (E * (L * N)) + 2 * E * (L * N) := by linarith - _ = (4 * π * C₁ + 2) * (E * (L * N)) := by ring - -lemma regime_chi : ∀ᶠ T in atTop, 1 ≤ T ∧ 1 ≤ Zeta23.l T ∧ 1 ≤ Real.log (Zeta23.l T) ∧ 1 ≤ P.L T ∧ - 1 ≤ P.X T ∧ P.L T ≤ Zeta23.l T ∧ P.X T ≤ T := by - have hlam := h.lam_pos - filter_upwards [eventually_ge_atTop 1, eventually_l_ge 1, eventually_log_l_ge 1, - eventually_L_ge P hlam 1, eventually_one_le_X P hlam, eventually_X_le_T P hlam h.lam_le_one] - with T h1 h2 h3 h4 h5 h6 - exact ⟨h1, h2, h3, h4, h5, L_le_l P h.lam_le_one (by linarith), h6⟩ - -/-- [eq:tr2] first form for chi (three-term Msplit). -/ -theorem tr2_first_chi : EvBound - (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumL2gq T)) - (fun T => P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T)) := by - have e4 : EvBound (fun T => D.MPP T - T / π * D.sumL2gq T) - (fun T => P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T)) := by - refine h.prop_PP.mono_right' one_pos ?_ - filter_upwards [regime_chi h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - calc P.L T ^ 2 * P.X T = P.L T * P.L T * 1 * P.X T := by ring - _ ≤ P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = 1 * (P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T)) := (one_mul _).symm - have e3 : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) - (fun T => P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T)) := by - refine h.prop_mumu.mono_right' one_pos ?_ - filter_upwards [regime_chi h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - have hlogL : Real.log (P.L T) ≤ Real.log (Zeta23.l T) := Real.log_le_log (by linarith) hLl - have hlogL0 : 0 ≤ Real.log (P.L T) := Real.log_nonneg hL - calc Zeta23.l T ^ 2 * Real.log (P.L T) ≤ Zeta23.l T ^ 2 * Real.log (Zeta23.l T) := by gcongr - _ = 1 * Zeta23.l T * Real.log (Zeta23.l T) * Zeta23.l T := by ring - _ ≤ P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = _ := (one_mul _).symm - have hsqrtX : ∀ᶠ T in atTop, Real.sqrt (P.X T) ≤ P.X T := by - filter_upwards [regime_chi h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ - rw [Real.sqrt_le_left (by linarith)] - nlinarith - have e5 : EvBound D.MmuP - (fun T => P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T)) := by - refine h.cross_muP.mono_right' one_pos ?_ - filter_upwards [regime_chi h, hsqrtX] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ hs - calc Zeta23.l T * Real.sqrt (P.X T) ≤ Zeta23.l T * P.X T := by gcongr - _ = 1 * Zeta23.l T * 1 * (0 + P.X T) := by ring - _ ≤ P.L T * Zeta23.l T * Real.log (Zeta23.l T) * (Zeta23.l T ^ 2 + P.X T) := by gcongr; nlinarith - _ = _ := (one_mul _).symm - have S := h.lem_ends.add (e3.add (e4.add (e5.const_mul 2))) - refine S.congr_left ?_ - filter_upwards [h.Msplit] with T hM - rw [hM]; ring - -/-- [eq:tr2], second form for chi. -/ -theorem tr2_chi : EvBound (fun T => D.trG2 T - mainTr2Chi P q T) - (fun T => P.calE T * mainTr2Chi P q T) := by - have hlam := h.lam_pos - have hw1 := h.one_le_w - have hw : 0 ≤ P.w := by linarith - obtain ⟨CR, hCR, hR⟩ := (tr2_first_chi h).eventually_le - obtain ⟨Cμ, hCμ, hμ⟩ := h.muints2.eventually_le - obtain ⟨Cu, hCu, hu⟩ := h.sum_upper.eventually_le - obtain ⟨Cl, hCl, hlo⟩ := h.sum_lower.eventually_le - refine EvBound.of_eventually_le - (c := 2 * π * CR + Cμ + 2 + 6 * (Cu + Cl + 2 * P.w)) (by positivity) ?_ - filter_upwards [hR, hμ, hu, hlo, h.abdef, regime_chi h, calE_ge_w_div_L hlam hw, - calE_ge_mid hlam hw, calE_nonneg_eventually hlam hw, eventually_L_ge P hlam (2 * P.w), - eventually_gt_atTop 0] - with T hR hμ hu hlo hab hreg hEw hEmid hE0 hL2w hT0 - obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg - obtain ⟨hb1, hba, ha1⟩ := hab - have hSup : D.sumL2gq T - P.L T ^ 3 / 6 ≤ Cu * P.L T ^ 2 := by - rw [abs_of_nonneg (le_max_right _ _)] at hu - exact (le_max_left _ _).trans hu - have hSlo : -(Cl * P.L T ^ 2) ≤ D.sumL2gq T - (P.L T - 2 * P.w) ^ 3 / 6 := - (abs_le.mp hlo).1.trans (min_le_left _ _) - exact tr2_pointwise T (P.L T) (ell1q q T) (Zeta23.l T) (P.X T) (P.calE T) (D.sumL2gq T) - (D.intMu2 T) (D.bT T) (D.trG2 T) P.w CR Cμ Cu Cl hT hL hl hlog hX - (l_le_ell1q h.one_le_q hT0) hLl hw1 hL2w hb1 (hba.trans ha1) - hE0 hEw hEmid hCR.le hCμ.le hCu.le hCl.le hR hμ hSup hSlo - -/-- [eq:ratio] for chi. -/ -theorem ratio_chi : EvBound - (fun T => D.trG T ^ 2 / D.trG2 T - Ffun (lam1q P q T) * D.Ncnt T) - (fun T => P.calE T * (Ffun (lam1q P q T) * D.Ncnt T)) := by - have hlam := h.lam_pos - have hlam1 := h.lam_le_one - have hw : 0 ≤ P.w := by linarith [h.one_le_w] - obtain ⟨C₁, hC₁, h1⟩ := (tr1'_chi h).eventually_le - obtain ⟨C₂, hC₂, h2⟩ := (tr2_chi h).eventually_le - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le - have hcal := calE_tendsto_zero hlam hlam1 hw - have hs1 : ∀ᶠ T in atTop, C₁ * P.calE T ≤ 1 / 2 := by - filter_upwards [hcal.eventually (Iio_mem_nhds (show (0:ℝ) < 1 / (2 * C₁) by positivity))] - with T hT - rw [lt_div_iff₀ (by positivity)] at hT - linarith - have hs2 : ∀ᶠ T in atTop, C₂ * P.calE T ≤ 1 / 2 := by - filter_upwards [hcal.eventually (Iio_mem_nhds (show (0:ℝ) < 1 / (2 * C₂) by positivity))] - with T hT - rw [lt_div_iff₀ (by positivity)] at hT - linarith - refine EvBound.of_eventually_le (c := 2 * (2 * π * A + 5 * C₁ + C₂)) (by positivity) ?_ - filter_upwards [h1, h2, hN, hs1, hs2, regime_chi h, calE_ge_rpow hlam hw, - calE_nonneg_eventually hlam hw, Ncnt_pos_chi h, eventually_ge_atTop (2 * π * A), - eventually_gt_atTop 0] - with T h1 h2 hN hs1 hs2 hreg hEr hE0 hN0 hTA hT0 - obtain ⟨hT, hl, hlog, hL, hX, hLl, hXT⟩ := hreg - have hle := l_le_ell1q h.one_le_q hT0 - have hET : 1 / T ≤ P.calE T := by - refine le_trans ?_ hEr - rw [one_div, ← Real.rpow_neg_one] - exact Real.rpow_le_rpow_of_exponent_le hT (by linarith) - exact ratio_pointwise T (P.L T) (ell1q q T) (Zeta23.l T) (P.calE T) (D.Ncnt T) (D.trG T) - (D.trG2 T) A C₁ C₂ hT (by linarith) (hl.trans hle) hle hN0 hE0 hET hA.le hC₁.le - hC₂.le hs1 hs2 hTA h1 h2 hN - -/-- [thm:traces] for chi, assembled. -/ -theorem tracesBoundsChi_of_factsChi : TracesBoundsChi P q D.aT D.trG D.trG2 D.Ncnt where - tr1 := tr1_chi h - tr1' := tr1'_chi h - tr2 := tr2_chi h - ratio := ratio_chi h - -end assembly +/-- `[thm:traces]` for `L(s, χ)`, assembled via `PrimeSide.tracesBoundsG_of_factsG`. -/ +theorem tracesBoundsChi_of_factsChi {P : Params} {q : ℕ} {D : DataChi P} (h : FactsChi q D) : + TracesBoundsChi P q D.aT D.trG D.trG2 D.Ncnt := + PrimeSide.tracesBoundsG_of_factsG h /-! ## Concrete instantiation -/ section Concrete variable (P : Params) (κ q : ℕ) (c : ℕ → ℂ) -/-- rfl-bridges between the abstract-taper chi-quantities and the concrete ones. -/ -lemma GentryChiA_concrete (T : ℝ) (k l : ℤ) : - GentryChiA κ q c (P.toSetting T) (P.localFun T) k l = GentryChi P κ q c T k l := rfl lemma trGtChiA_concrete (T : ℝ) : trGtChiA κ q c (P.toSetting T) (P.localFun T) = trGtildeChi P κ q c T := rfl lemma trGt2ChiA_concrete (T : ℝ) : trGt2ChiA κ q c (P.toSetting T) (P.localFun T) = trGtildeSqChi P κ q c T := rfl -/-- The concrete chi-data. -/ -def concreteDataChi (Z : ZeroConfig) : DataChi P where - aT := P.a - bT := P.b - trG := trGtildeChi P κ q c - trG2 := trGtildeSqChi P κ q c +/-- Concrete `DataChi P` for an arbitrary `LocalFun` family `loc : ℝ → LocalFun`. -/ +def concreteDataChiOf (loc : ℝ → LocalFun) (Z : ZeroConfig) : DataChi P where + aT := fun T => (loc T).a + bT := fun T => (loc T).b + trG := fun T => trGtChiA κ q c (P.toSetting T) (loc T) + trG2 := fun T => trGt2ChiA κ q c (P.toSetting T) (loc T) Ncnt := fun T => (Z.N T (2 * T) : ℝ) - Mtot := fun T => MtotalChiA κ q c (P.toSetting T) (P.localFun T) - Mmumu := fun T => Mform (P.PhiR T) T (muq κ q) (muq κ q) - MPP := fun T => Mform (P.PhiR T) T (PXc c (P.X T)) (PXc c (P.X T)) - MmuP := fun T => Mform (P.PhiR T) T (muq κ q) (PXc c (P.X T)) + Mtot := fun T => MtotalChiA κ q c (P.toSetting T) (loc T) + Mmumu := fun T => Mform (loc T).Phi T (muq κ q) (muq κ q) + MPP := fun T => Mform (loc T).Phi T (PXc c (P.X T)) (PXc c (P.X T)) + MmuP := fun T => Mform (loc T).Phi T (muq κ q) (PXc c (P.X T)) + MmuPi := fun _ => 0 + MPPi := fun _ => 0 + MPiPi := fun _ => 0 intMu2 := fun T => ∫ τ in T..(2 * T), muq κ q τ ^ 2 - sumL2gq := fun T => sumA2gCoprime q (P.X T) (P.g T) + sumL2g := fun T => sumA2gCoprime q (P.X T) (loc T).g + +/-- The concrete chi-data for the flat-top taper `P.localFun`. -/ +def concreteDataChi (Z : ZeroConfig) : DataChi P := concreteDataChiOf P κ q c P.localFun Z variable {P κ q c} /-- H-RvM(chi) in the l-majorant form. -/ lemma rvm_evBound_chi {Z : ZeroConfig} (hR : RiemannVonMangoldtChi q Z) : - EvBound (fun T => (Z.N T (2 * T) : ℝ) - T * ell1q q T / (2 * π)) Zeta23.l := by - obtain ⟨C, T₀, hC⟩ := hR.main - refine ⟨2 * max C 1, by positivity, max T₀ (4 * π ^ 2), fun T hT => ?_⟩ - have hT₀ : T₀ ≤ T := (le_max_left _ _).trans hT - have hT4 : 4 * π ^ 2 ≤ T := (le_max_right _ _).trans hT - have hπ := Real.pi_pos - have hT0 : 0 < T := lt_of_lt_of_le (by positivity) hT4 - have h1 := hC T hT₀ - have h2 : T / (2 * π) * ell1q q T = T * ell1q q T / (2 * π) := by ring - rw [h2] at h1 - have hl : Real.log T ≤ 2 * Zeta23.l T := by - unfold Zeta23.l - rw [Real.log_div hT0.ne' (by positivity)] - have h3 : Real.log ((2 * π) ^ 2) ≤ Real.log T := - Real.log_le_log (by positivity) (by nlinarith only [hT4]) - rw [Real.log_pow] at h3 - push_cast at h3 - linarith only [h3] - have hlog0 : 0 ≤ Real.log T := Real.log_nonneg (by nlinarith only [hT4, hπ, Real.pi_gt_three]) - calc |(Z.N T (2 * T) : ℝ) - T * ell1q q T / (2 * π)| ≤ C * Real.log T := h1 - _ ≤ max C 1 * Real.log T := mul_le_mul_of_nonneg_right (le_max_left _ _) hlog0 - _ ≤ max C 1 * (2 * Zeta23.l T) := mul_le_mul_of_nonneg_left hl (by positivity) - _ = 2 * max C 1 * Zeta23.l T := by ring - -set_option maxHeartbeats 1600000 in -/-- FactsChi for the concrete data, from the chi-inputs together with the taper facts -(including lem_ends_chi). -/ -theorem concreteFactsChi {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ q) - (hcu : CoeffUnimodular q c) (inp : PaperInputsChi κ q c Z) - (hLoc : LocalHypsEventually cϱ P) : FactsChi q (concreteDataChi P κ q c Z) := by + EvBound (fun T => (Z.N T (2 * T) : ℝ) - T * ell1q q T / (2 * π)) Zeta23.l := + PrimeSide.rvm_evBound_gen hR.main + +/-- Shared `TraceFactsBase (ell1q q)` builder for any concrete window family `loc : ℝ → LocalFun` +eventually satisfying `LocalHypsCore cϱ`. -/ +theorem concreteTraceFactsBaseChi {cϱ : ℝ} {Z : ZeroConfig} {loc : ℝ → LocalFun} + (hP : P.Valid) (hq : 1 ≤ q) (hcu : CoeffUnimodular q c) (inp : PaperInputsChi κ q c Z) + (hLoc : ∃ T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → LocalHypsCore cϱ (P.toSetting T) (loc T)) : + TraceFactsBase (ell1q q) (concreteDataChiOf P κ q c loc Z) := by have hlam : 0 < P.lam ∧ P.lam ≤ 1 := ⟨hP.lam_pos, hP.lam_le_one⟩ have hΓq := inp.Gamma have hcheb := inp.cheb @@ -356,51 +103,47 @@ theorem concreteFactsChi {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ filter_upwards [eventually_ge_atTop 1, eventually_l_ge 1, eventually_log_l_ge 1, eventually_L_ge P hP.lam_pos 1, eventually_one_le_X P hP.lam_pos] with T h1 h2 h3 h4 h5 exact ⟨by linarith, by linarith, by linarith, by linarith, by linarith⟩ - obtain ⟨T₀, hT₀⟩ := id hLoc - have e_ends := evBound_of_eventuallyAt hLoc - ((lem_ends_chi (κ := κ) (q := q) (c := c) (cϱ := cϱ) (lam := P.lam) hΓq hcheb hc hlam hq).imp - fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (mul_nonneg (mul_nonneg hL hl) hlog) (add_nonneg (sq_nonneg _) hX)) - have e_mumu := evBound_of_eventuallyAt hLoc - ((prop_mumu_chi (cϱ := cϱ) (lam := P.lam) hΓq hc hq hlam).imp - fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg, eventually_L_ge P hP.lam_pos 1] with T ⟨hT, hl, hlog, hL, hX⟩ hL1 - exact mul_nonneg (sq_nonneg _) (Real.log_nonneg hL1)) - have e_PP := evBound_of_eventuallyAt hLoc - ((prop_PP_chi (cϱ := cϱ) (lam := P.lam) hcheb inp.MV hcu hlam).imp - fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg (sq_nonneg _) hX) - have e_muP := evBound_of_eventuallyAt hLoc - ((prop_cross_muP_chi_proved (cϱ := cϱ) (lam := P.lam) hΓq hcheb hc hq hlam).imp - fun _ h => h.to_eventuallyAt) (by - filter_upwards [hreg] with T ⟨hT, hl, hlog, hL, hX⟩ - exact mul_nonneg hl (Real.sqrt_nonneg _)) - refine ⟨hP.lam_pos, hP.lam_le_one, hP.one_le_w, hq, ?abdef, rvm_evBound_chi inp.RvM, ?muints2, - ?prop_trace, ?lem_ends, ?Msplit, ?prop_mumu, ?prop_PP, ?sum_lower, ?sum_upper, ?cross_muP⟩ - case abdef => - filter_upwards [eventually_ge_atTop T₀] with T hT - have hF := hT₀ T hT - exact ⟨hF.b_lower, hF.b_le_a, hF.a_le_one⟩ + obtain ⟨T₀, hT₀⟩ := hLoc + refine ⟨hP.lam_pos, hP.lam_le_one, hP.one_le_w, + (eventually_gt_atTop (0 : ℝ)).mono fun _ hT0 => l_le_ell1q hq hT0, + rvm_evBound_chi inp.RvM, ?muints2, ?prop_trace, + evBound_of_eventually ⟨T₀, hT₀⟩ + (lem_ends_chi (κ := κ) (q := q) (c := c) (cϱ := cϱ) (lam := P.lam) hΓq hcheb hc hlam hq) + (hreg.mono fun _ ⟨_, hl, hlog, hL, hX⟩ => + mul_nonneg (mul_nonneg (mul_nonneg hL hl) hlog) (add_nonneg (sq_nonneg _) hX)), + ?Msplit, + evBound_of_eventually ⟨T₀, hT₀⟩ + (prop_mumu_chi (cϱ := cϱ) (lam := P.lam) hΓq hc hq hlam) (by + filter_upwards [hreg, eventually_L_ge P hP.lam_pos 1] with _ _ hL1 + exact mul_nonneg (sq_nonneg _) (Real.log_nonneg hL1)), + evBound_of_eventually ⟨T₀, hT₀⟩ + (prop_PP_chi (cϱ := cϱ) (lam := P.lam) hcheb inp.MV hcu hlam) + (hreg.mono fun _ ⟨_, _, _, _, hX⟩ => mul_nonneg (sq_nonneg _) hX), + evBound_of_eventually ⟨T₀, hT₀⟩ + (prop_cross_muP_chi_proved (cϱ := cϱ) (lam := P.lam) hΓq hcheb hc hq hlam) + (hreg.mono fun _ ⟨_, hl, _, _, _⟩ => mul_nonneg hl (Real.sqrt_nonneg _)), + EvBound.zero (hreg.mono fun _ ⟨_, hl, _, hL, _⟩ => mul_nonneg (mul_nonneg hl hL) (Real.sqrt_nonneg _)), + EvBound.zero (hreg.mono fun _ ⟨_, _, _, hL, hX⟩ => mul_nonneg hL hX), + EvBound.zero (hreg.mono fun _ ⟨hT, _, _, hL, hX⟩ => div_nonneg (mul_nonneg hL hX) hT)⟩ case muints2 => obtain ⟨C, T₁, hC⟩ := hΓq.int_mu_sq refine ⟨max C 1, by positivity, max T₁ 0, fun T hT => (hC T ((le_max_left _ _).trans hT)).trans ?_⟩ have hT0 : 0 ≤ T := (le_max_right _ _).trans hT rw [mul_div_assoc] - refine mul_le_mul_of_nonneg_right (le_max_left _ _) ?_ - exact div_nonneg (div_nonneg (mul_nonneg hT0 (sq_nonneg _)) (by positivity)) (sq_nonneg _) + exact mul_le_mul_of_nonneg_right (le_max_left _ _) + (div_nonneg (div_nonneg (mul_nonneg hT0 (sq_nonneg _)) (by positivity)) (sq_nonneg _)) case prop_trace => obtain ⟨A, hA, T₁, hN⟩ := rvm_evBound_chi inp.RvM - obtain ⟨C, T₂, hC⟩ := prop_trace_chi (κ := κ) (q := q) (c := c) (cϱ := cϱ) (lam := P.lam) hΓq hcheb hc hlam A hq + obtain ⟨C, T₂, hC⟩ := prop_trace_chi (κ := κ) (q := q) (c := c) (cϱ := cϱ) (lam := P.lam) + hΓq hcheb hc hlam A hq refine ⟨max C 1, by positivity, max (max T₀ 1) (max T₁ T₂), fun T hT => ?_⟩ have h0 : T₀ ≤ T := ((le_max_left _ _).trans (le_max_left _ _)).trans hT - have hT1' : (1:ℝ) ≤ T := ((le_max_right _ _).trans (le_max_left _ _)).trans hT + have hT1' : (1 : ℝ) ≤ T := ((le_max_right _ _).trans (le_max_left _ _)).trans hT have h1 : T₁ ≤ T := ((le_max_left _ _).trans (le_max_right _ _)).trans hT have h2 : T₂ ≤ T := ((le_max_right _ _).trans (le_max_right _ _)).trans hT have hF := hT₀ T h0 - have hT0' : (0:ℝ) < T := by linarith + have hT0' : (0 : ℝ) < T := by linarith have hNT : |(Z.N T (2 * T) : ℝ) - T / (2 * π) * ell1q q T| ≤ A * Real.log T := by have hl : Zeta23.l T ≤ Real.log T := by unfold Zeta23.l @@ -410,29 +153,35 @@ theorem concreteFactsChi {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ have hN' := hN T h1 simp only at hN' rw [show T * ell1q q T / (2 * π) = T / (2 * π) * ell1q q T by ring] at hN' - calc |(Z.N T (2 * T) : ℝ) - T / (2 * π) * ell1q q T| ≤ A * Zeta23.l T := hN' - _ ≤ A * Real.log T := mul_le_mul_of_nonneg_left hl hA.le - have key := hC (P.toSetting T) (P.localFun T) rfl h2 hF.toCore (Z.N T (2 * T) : ℝ) hNT - rw [trGtChiA_concrete] at key - refine key.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) ?_) - exact mul_nonneg hF.L_pos.le (Real.sqrt_nonneg _) - case lem_ends => - exact e_ends.congr_left (Eventually.of_forall fun T => by - show trGtildeSqChi P κ q c T - _ = _ - rw [← trGt2ChiA_concrete] - rfl) + exact hN'.trans (mul_le_mul_of_nonneg_left hl hA.le) + have key := hC (P.toSetting T) (loc T) rfl h2 hF (Z.N T (2 * T) : ℝ) hNT + exact key.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) + (mul_nonneg hF.L_pos.le (Real.sqrt_nonneg _))) case Msplit => obtain ⟨T₁, hT₁⟩ := eq_Msplit_chi (κ := κ) (q := q) (c := c) (cϱ := cϱ) (lam := P.lam) hΓq hc hlam filter_upwards [eventually_ge_atTop T₀, eventually_ge_atTop T₁] with T h0 h1 - exact hT₁ (P.toSetting T) (P.localFun T) rfl h1 (hT₀ T h0).toCore - case prop_mumu => exact e_mumu - case prop_PP => exact e_PP + have hM := hT₁ (P.toSetting T) (loc T) rfl h1 (hT₀ T h0) + change MtotalChiA κ q c (P.toSetting T) (loc T) = _ + 2 * 0 + 2 * 0 + 0 + rw [mul_zero, add_zero, add_zero, add_zero] + exact hM + +/-- FactsChi for the concrete data, from the chi-inputs together with the taper facts. -/ +theorem concreteFactsChi {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ q) + (hcu : CoeffUnimodular q c) (inp : PaperInputsChi κ q c Z) + (hLoc : LocalHypsEventually cϱ P) : FactsChi q (concreteDataChi P κ q c Z) := by + have hlam : 0 < P.lam ∧ P.lam ≤ 1 := ⟨hP.lam_pos, hP.lam_le_one⟩ + obtain ⟨T₀, hT₀⟩ := id hLoc + refine ⟨concreteTraceFactsBaseChi hP hq hcu inp ⟨T₀, fun T hT => (hT₀ T hT).toCore⟩, + ?abdef, ?sum_lower, ?sum_upper⟩ + case abdef => + filter_upwards [eventually_ge_atTop T₀] with T hT + have hF := hT₀ T hT + exact ⟨hF.b_lower, hF.b_le_a, hF.a_le_one⟩ case sum_lower => obtain ⟨C, T₁, hC⟩ := sumA2gCoprime_lower (cϱ := cϱ) (lam := P.lam) (q := q) inp.chebq hlam refine ⟨max C 1, by positivity, max T₀ T₁, fun T hT => ?_⟩ - have h0 : T₀ ≤ T := (le_max_left _ _).trans hT - have h1 : T₁ ≤ T := (le_max_right _ _).trans hT - have key := hC (P.toSetting T) (P.localFun T) rfl h1 (hT₀ T h0) + have key := hC (P.toSetting T) (P.localFun T) rfl ((le_max_right _ _).trans hT) + (hT₀ T ((le_max_left _ _).trans hT)) simp only [Params.toSetting_L, Params.toSetting_X, Params.toSetting_w, Params.localFun_g] at key show |min (sumA2gCoprime q (P.X T) (P.g T) - (P.L T - 2 * P.w) ^ 3 / 6) 0| ≤ max C 1 * P.L T ^ 2 rw [abs_of_nonpos (min_le_right _ _)] @@ -446,9 +195,8 @@ theorem concreteFactsChi {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ case sum_upper => obtain ⟨C, T₁, hC⟩ := sumA2gCoprime_upper (cϱ := cϱ) (lam := P.lam) (q := q) inp.chebq hlam refine ⟨max C 1, by positivity, max T₀ T₁, fun T hT => ?_⟩ - have h0 : T₀ ≤ T := (le_max_left _ _).trans hT - have h1 : T₁ ≤ T := (le_max_right _ _).trans hT - have key := hC (P.toSetting T) (P.localFun T) rfl h1 (hT₀ T h0).toCore + have key := hC (P.toSetting T) (P.localFun T) rfl ((le_max_right _ _).trans hT) + (hT₀ T ((le_max_left _ _).trans hT)).toCore simp only [Params.toSetting_L, Params.toSetting_X, Params.localFun_g] at key show |max (sumA2gCoprime q (P.X T) (P.g T) - P.L T ^ 3 / 6) 0| ≤ max C 1 * P.L T ^ 2 rw [abs_of_nonneg (le_max_right _ _)] @@ -456,7 +204,6 @@ theorem concreteFactsChi {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ mul_le_mul_of_nonneg_right (le_max_left _ _) (sq_nonneg _) have hpos : 0 ≤ max C 1 * P.L T ^ 2 := by positivity exact max_le (by linarith) hpos - case cross_muP => exact e_muP /-- **[thm:traces] for L(s,χ), concrete.** -/ theorem thm_traces_chi {cϱ : ℝ} {Z : ZeroConfig} (hP : P.Valid) (hq : 1 ≤ q) diff --git a/zeta23/Zeta23/ThmE/TracesHypChi.lean b/zeta23/Zeta23/ThmE/TracesHypChi.lean deleted file mode 100644 index c8dfa95eeb..0000000000 --- a/zeta23/Zeta23/ThmE/TracesHypChi.lean +++ /dev/null @@ -1,62 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/ThmE/TracesHypChi.lean — the thm:traces package for Dirichlet L-functions. -Mirror of Zeta23/PrimeSideTemp.lean ([thm:traces] as an explicit hypothesis) -with ζ's density ν_X replaced by ν_{X,χ} and ℓ₁ by ℓ_{1,χ} ([thm:E] proof (i),(iii)). -The hypothesis is discharged by the §5-χ generalization elsewhere in the repository; it is an -explicit hypothesis of the Theorem E assembly, never a Lean axiom. --/ -import Zeta23.ThmE.Hypotheses -import Zeta23.PrimeSideTemp - -open Real Filter - -noncomputable section - -namespace Zeta23 -namespace ThmE - -variable (P : Params) (κ q : ℕ) (c : ℕ → ℂ) - -/-- `λ_{1,χ} := L/ℓ_{1,χ}` ([thm:E] proof (iii): "λ₁ = L/ℓ_{1,χ} → λ as q is fixed"). -/ -def lam1q (T : ℝ) : ℝ := P.L T / ell1q q T - -/-- G_{kl} for L(s,χ) via the PRIME side: `∫ φ̂(τ−τ_k) φ̂(τ−τ_l) ν_{X,χ}(τ) dτ` -([eq:Gdef] second expression with ν_{X,χ}). -/ -def GentryChi (T : ℝ) (k l : ℤ) : ℝ := - ∫ τ : ℝ, P.phiHatR T (τ - P.tau T k) * P.phiHatR T (τ - P.tau T l) * nuXc κ q c (P.X T) τ - -/-- tr G̃ for L(s,χ) (prime side). -/ -def trGtildeChi (T : ℝ) : ℝ := (P.L T)⁻¹ * ∑ k : Fin (P.d T), GentryChi P κ q c T k k - -/-- tr G̃² for L(s,χ) (prime side). -/ -def trGtildeSqChi (T : ℝ) : ℝ := - (P.L T)⁻¹ ^ 2 * ∑ k : Fin (P.d T), ∑ l : Fin (P.d T), GentryChi P κ q c T k l ^ 2 - -/-- The main term of [eq:tr2] for L(s,χ): `(TL/2π)(ℓ_{1,χ}² + L²/3)`. -/ -def mainTr2Chi (T : ℝ) : ℝ := - T * P.L T / (2 * Real.pi) * (ell1q q T ^ 2 + P.L T ^ 2 / 3) - -/-- **[thm:traces] for L(s,χ)** (the conclusions of the paper [thm:traces] with ℓ₁ → ℓ_{1,χ}, -λ₁ → λ_{1,χ}, ν_X → ν_{X,χ}; [thm:E] proof (iii)). Same EvBound shapes as `Zeta23.TracesBounds`; -all constants may additionally depend on q (q fixed in [thm:E]; recorded for the hybrid-range -question [rem:otherL](i)). -/ -structure TracesBoundsChi (aT trG trG2 Ncnt : ℝ → ℝ) : Prop where - tr1 : EvBound (fun T => trG T - aT T * P.L T * Ncnt T) - (fun T => P.L T * Real.sqrt (P.X T)) - tr1' : EvBound (fun T => trG T - P.L T * Ncnt T) (fun T => P.calE T * (P.L T * Ncnt T)) - tr2 : EvBound (fun T => trG2 T - mainTr2Chi P q T) (fun T => P.calE T * mainTr2Chi P q T) - ratio : EvBound (fun T => trG T ^ 2 / trG2 T - Ffun (lam1q P q T) * Ncnt T) - (fun T => P.calE T * (Ffun (lam1q P q T) * Ncnt T)) - -/-- The Theorem E traces hypothesis at a zero configuration Z (the analogue of `Zeta23.ThmTracesHyp`). -/ -def ThmTracesHypChi (Z : ZeroConfig) : Prop := - TracesBoundsChi P q P.a (trGtildeChi P κ q c) (trGtildeSqChi P κ q c) - (fun T => (Z.N T (2 * T) : ℝ)) - -end ThmE -end Zeta23 diff --git a/zeta23/Zeta23/ThmE/VerticalLineChi.lean b/zeta23/Zeta23/ThmE/VerticalLineChi.lean index 59b02623e0..e61b1304d8 100644 --- a/zeta23/Zeta23/ThmE/VerticalLineChi.lean +++ b/zeta23/Zeta23/ThmE/VerticalLineChi.lean @@ -54,151 +54,39 @@ theorem integrand_eq_tsum_chi (hχ1 : χ ≠ 1) {k : ℝ → ℂ} {c : ℝ} (hc1 rw [Hfn_line, neg_logDeriv_LFunction_eq hχ1 hre, LSeries, ← tsum_mul_left] omit [NeZero q] in -/-- Per-n line integral, twisted: the χ(n)-coefficient rides through the tilted inversion. -/ +/-- Per-n line integral, twisted: pulls `χ n` out of `per_n_line_integral`. -/ theorem per_n_line_integral_chi {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (n : ℕ) : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n = (χ n : ℂ) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by - rcases Nat.eq_zero_or_pos n with rfl | hn - · simp [LSeries.term] - · have hn1 : (1:ℝ) ≤ (n:ℝ) := by exact_mod_cast hn - have hn0 : (0:ℝ) < (n:ℝ) := by linarith - have hnC : (n:ℂ) ≠ 0 := by exact_mod_cast hn.ne' - have hterm : ∀ t : ℝ, LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n - = (χ n : ℂ) * ((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ) - * cexp (-I * t * Real.log n) := by - intro t - rw [LSeries.term_of_ne_zero hn.ne', div_eq_mul_inv, ← Complex.cpow_neg] - have hsplit : (-((((c:ℝ)):ℂ) + t * I)) = (-((c:ℝ):ℂ)) + (-(I * t)) := by ring - rw [hsplit, Complex.cpow_add _ _ hnC] - have h1 : (n:ℂ) ^ (-((c:ℝ):ℂ)) = (((n:ℝ) ^ (-c) : ℝ) : ℂ) := by - rw [show ((n:ℂ)) = (((n:ℝ):ℂ)) by push_cast; rfl, - show (-((c:ℝ):ℂ)) = ((-c : ℝ) : ℂ) by push_cast; rfl, - ← Complex.ofReal_cpow hn0.le] - have h2 : (n:ℂ) ^ (-(I * t)) = cexp (-I * t * Real.log n) := by - rw [Complex.cpow_def_of_ne_zero hnC] - congr 1 - rw [show ((n:ℂ)) = (((n:ℝ):ℂ)) by push_cast; rfl, ← Complex.ofReal_log hn0.le] - ring - rw [h1, h2] - ring - simp_rw [hterm] - have hre : (fun t : ℝ => paperFT (tilt k (c - 1/2)) t - * ((χ n : ℂ) * ((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ) * cexp (-I * t * Real.log n))) - = fun t : ℝ => ((χ n : ℂ) * ((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * (paperFT (tilt k (c - 1/2)) t * cexp (-I * t * Real.log n)) := by - funext t - ring - rw [hre, Zeta23.EF.cintegral_const_mul] - rw [show (1 / (2 * (Real.pi : ℂ))) * (((χ n : ℂ) * ((Λ n : ℝ) : ℂ) - * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * cexp (-I * t * Real.log n)) - = ((χ n : ℂ) * ((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * ((1 / (2 * (Real.pi : ℂ))) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t - * cexp (-I * t * Real.log n)) from by ring] - rw [tilted_inversion hk hkc (c - 1/2) (Real.log n)] - have hexp : Real.exp ((c - 1/2) * Real.log n) = (n:ℝ) ^ (c - 1/2) := by - rw [Real.rpow_def_of_pos hn0] - ring_nf - have hpow : ((n:ℝ) ^ (-c) : ℝ) * ((n:ℝ) ^ (c - 1/2) : ℝ) = ((n:ℝ) ^ (-(1/2) : ℝ) : ℝ) := by - rw [← Real.rpow_add hn0] - congr 1 - ring - have hsqrt : ((n:ℝ) ^ (-(1/2) : ℝ) : ℝ) = 1 / Real.sqrt n := by - rw [Real.rpow_neg hn0.le, Real.sqrt_eq_rpow] - exact (one_div _).symm - calc (χ n : ℂ) * ((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ) - * (k (Real.log n) * ((Real.exp ((c - 1/2) * Real.log n) : ℝ) : ℂ)) - = (χ n : ℂ) * (((Λ n * ((n:ℝ) ^ (-c) * (n:ℝ) ^ (c - 1/2)) : ℝ)) : ℂ) - * k (Real.log n) := by - rw [hexp] - push_cast - ring - _ = (χ n : ℂ) * ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by - rw [hpow, hsqrt, mul_one_div] + have hterm : ∀ t : ℝ, paperFT (tilt k (c - 1/2)) t + * LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n + = (χ n : ℂ) * (paperFT (tilt k (c - 1/2)) t + * LSeries.term (fun n => (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n) := by + intro t + rcases eq_or_ne n 0 with rfl | hn + · simp [LSeries.term_zero] + · simp only [LSeries.term_of_ne_zero hn]; ring + simp_rw [hterm] + rw [Zeta23.EF.cintegral_const_mul, + show (1 / (2 * (Real.pi : ℂ))) * ((χ n : ℂ) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t + * LSeries.term (fun n => (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n) + = (χ n : ℂ) * ((1 / (2 * (Real.pi : ℂ))) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t + * LSeries.term (fun n => (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n) from by ring, + per_n_line_integral hk hkc n, mul_assoc] omit [NeZero q] in -/-- Twisted tsum/integral swap (domination: ‖χ(n)‖ ≤ 1 reduces to the ζ-side majorant). -/ +/-- Twisted tsum/integral swap (delegates to `line_integral_swap_twist`). -/ theorem line_integral_swap_chi (_hχ1 : χ ≠ 1) {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) : ∫ t : ℝ, (∑' n : ℕ, paperFT (tilt k (c - 1/2)) t * LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n) = ∑' n : ℕ, ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n := by - have hkb2 : ContDiff ℝ 2 (tilt k (c - 1/2)) := tilt_contDiff hk _ - have hkbc : HasCompactSupport (tilt k (c - 1/2)) := tilt_hasCompactSupport hkc _ - have hFkb := Zeta23.EF.integrable_fourier_of_contDiff_two hkb2 hkbc - have hpfi : Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t) := - Zeta23.EF.integrable_paperFT_ofReal hFkb - have hre : ∀ t : ℝ, ((((c:ℝ)):ℂ) + t * I).re = c := by - intro t - simp - have hnormle : ∀ (n : ℕ) (t : ℝ), ‖LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) - (((c:ℝ):ℂ) + t * I) n‖ ≤ if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c)) := by - intro n t - rcases eq_or_ne n 0 with rfl | hn - · simp [LSeries.term_zero] - · rw [LSeries.term_of_ne_zero hn, norm_div, norm_mul, - Complex.norm_natCast_cpow_of_pos (Nat.pos_of_ne_zero hn), hre, if_neg hn, - Complex.norm_real, Real.norm_eq_abs, - abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg, - Real.rpow_neg (Nat.cast_nonneg n), div_eq_mul_inv] - have hχb := DirichletCharacter.norm_le_one χ (n : ZMod q) - have hrp : (0:ℝ) ≤ ((n:ℝ) ^ (c:ℝ))⁻¹ := by positivity - have hΛ0 : (0:ℝ) ≤ Λ n := ArithmeticFunction.vonMangoldt_nonneg - calc ‖(χ (n : ZMod q) : ℂ)‖ * Λ n * ((n:ℝ) ^ (c:ℝ))⁻¹ - ≤ 1 * Λ n * ((n:ℝ) ^ (c:ℝ))⁻¹ := by gcongr - _ = Λ n * ((n:ℝ) ^ (c:ℝ))⁻¹ := by ring - have hcont : ∀ n : ℕ, Continuous (fun t : ℝ => - LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n) := by - intro n - rcases eq_or_ne n 0 with rfl | hn - · simpa [LSeries.term_zero] using continuous_const - · simp only [LSeries.term_of_ne_zero hn] - refine continuous_const.div ?_ (fun t => ?_) - · refine Continuous.const_cpow (by fun_prop) (Or.inl ?_) - exact_mod_cast hn - · exact cpow_ne_zero_iff.mpr (Or.inl (by exact_mod_cast hn)) - have hint : ∀ n : ℕ, Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n) := by - intro n - refine hpfi.mul_bdd (c := if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c))) - (hcont n).aestronglyMeasurable ?_ - filter_upwards with t - exact hnormle n t - have hcn : Summable (fun n : ℕ => if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c))) := by - have hs : LSeriesSummable (fun n => (Λ n : ℂ)) (c : ℂ) := - ArithmeticFunction.LSeriesSummable_vonMangoldt (by simpa using hc1) - have hns : Summable (fun n : ℕ => ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖) := - summable_norm_iff.mpr hs - refine hns.congr fun n => ?_ - rcases eq_or_ne n 0 with rfl | hn - · simp [LSeries.term_zero] - · rw [LSeries.term_of_ne_zero hn, norm_div, - Complex.norm_natCast_cpow_of_pos (Nat.pos_of_ne_zero hn), Complex.ofReal_re, - if_neg hn, Complex.norm_real, Real.norm_eq_abs, - abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg, - Real.rpow_neg (Nat.cast_nonneg n), div_eq_mul_inv] - have hsum : Summable (fun n : ℕ => ∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n‖) := by - refine Summable.of_nonneg_of_le (fun n => integral_nonneg fun t => norm_nonneg _) - (fun n => ?_) - ((hcn.mul_left (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t‖))) - calc (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n‖) - ≤ ∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t‖ - * (if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c))) := by - refine integral_mono_of_nonneg (Filter.Eventually.of_forall fun t => norm_nonneg _) - (hpfi.norm.mul_const _) (Filter.Eventually.of_forall fun t => ?_) - simp only - rw [norm_mul] - exact mul_le_mul_of_nonneg_left (hnormle n t) (norm_nonneg _) - _ = (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t‖) - * (if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c))) := by - rw [integral_mul_const] - exact (MeasureTheory.hasSum_integral_of_summable_integral_norm hint hsum).tsum_eq.symm + * LSeries.term (fun n => (χ n : ℂ) * (Λ n : ℂ)) (((c:ℝ):ℂ) + t * I) n := + line_integral_swap_twist (fun n => (χ n : ℂ)) + (fun n => DirichletCharacter.norm_le_one χ (n : ZMod q)) hk hkc hc1 /-- **The twisted prime side**: (1/2π)∫ H(c+it)(−L'/L)(c+it)dt = Σ Λ(n)χ(n)n^{−1/2}k(log n). -/ theorem prime_side_line_chi (hχ1 : χ ≠ 1) {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) diff --git a/zeta23/Zeta23/TracesBoundsE.lean b/zeta23/Zeta23/TracesBoundsE.lean deleted file mode 100644 index 2cc51f3ef9..0000000000 --- a/zeta23/Zeta23/TracesBoundsE.lean +++ /dev/null @@ -1,59 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- - Part of the Zeta23 formalization of the paper - "More than two thirds of the zeros of the Riemann zeta function lie on the critical line". - Bracketed labels ([prop:cross], [eq:Msplit], …) and section numbers (§5.4, …) refer to that paper. --/ -import Zeta23.PrimeSideTemp - -/-! -# [thm:traces] conclusions with an ABSTRACT error rate - -LIGHT file (imports only Zeta23.PrimeSideTemp) so that Zeta23/Assembly.lean can import it: -`TracesBoundsE P Err aT trG trG2 Ncnt` = the four conclusions of the paper [thm:traces] ([eq:tr1] both forms, -[eq:tr2] second form, [eq:ratio]) with an arbitrary rate `Err : ℝ → ℝ` in place of the paper's 𝓔_T; -`TracesBounds` (Zeta23/PrimeSideTemp.lean) is the instance `Err := P.calE`, supplied by the paper's route -(Zeta23/PrimeSideB/Traces.lean via `TracesBounds.toE`). --/ - -noncomputable section - -open Filter Topology Real - -namespace Zeta23 - -/-! ## [thm:traces] conclusions with an abstract rate -/ - -/-- The four conclusions of [thm:traces] with an abstract error rate `Err` (cf. `TracesBounds`, -Zeta23/PrimeSideTemp.lean, which is the case `Err = P.calE` = the paper's 𝓔_T). -/ -structure TracesBoundsE (P : Params) (Err aT trG trG2 Ncnt : ℝ → ℝ) : Prop where - tr1 : EvBound (fun T => trG T - aT T * P.L T * Ncnt T) (fun T => P.L T * Real.sqrt (P.X T)) - tr1' : EvBound (fun T => trG T - P.L T * Ncnt T) (fun T => Err T * (P.L T * Ncnt T)) - tr2 : EvBound (fun T => trG2 T - P.mainTr2 T) (fun T => Err T * P.mainTr2 T) - ratio : EvBound (fun T => trG T ^ 2 / trG2 T - Ffun (P.lam1 T) * Ncnt T) - (fun T => Err T * (Ffun (P.lam1 T) * Ncnt T)) - -lemma TracesBounds.toE {P : Params} {aT trG trG2 Ncnt : ℝ → ℝ} - (h : TracesBounds P aT trG trG2 Ncnt) : TracesBoundsE P P.calE aT trG trG2 Ncnt := - ⟨h.tr1, h.tr1', h.tr2, h.ratio⟩ - -lemma TracesBoundsE.toTracesBounds {P : Params} {aT trG trG2 Ncnt : ℝ → ℝ} - (h : TracesBoundsE P P.calE aT trG trG2 Ncnt) : TracesBounds P aT trG trG2 Ncnt := - ⟨h.tr1, h.tr1', h.tr2, h.ratio⟩ - -/-- [thm:traces] for the concrete prime-side data and the count of `Z`, abstract rate. -/ -def ThmTracesHypE (P : Params) (Err : ℝ → ℝ) (Z : ZeroConfig) : Prop := - TracesBoundsE P Err P.a P.trGtilde P.trGtildeSq (fun T => (Z.N T (2 * T) : ℝ)) - -lemma thmTracesHyp_iff_E (P : Params) (Z : ZeroConfig) : - ThmTracesHyp P Z ↔ ThmTracesHypE P P.calE Z := - ⟨fun h => TracesBounds.toE h, fun h => h.toTracesBounds⟩ - - -end Zeta23 - -end diff --git a/zeta23/Zeta23/Unconditional.lean b/zeta23/Zeta23/Unconditional.lean index 660f47f8cf..75fa570ffc 100644 --- a/zeta23/Zeta23/Unconditional.lean +++ b/zeta23/Zeta23/Unconditional.lean @@ -29,22 +29,12 @@ namespace Zeta23 /-- **≥ 2/3 of ζ's nontrivial zeros are on the critical line** (dyadic windows (T, 2T]). -/ theorem two_thirds_on_critical_line : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0star T (2 * T) := + DyadicLowerBound (2 / 3) (fun T => N0star T (2 * T)) (fun T => Ncount T (2 * T)) := thmA₀ /-- cumulative form: liminf_{T→∞} N₀*(T)/N(T) ≥ 2/3. -/ theorem two_thirds_on_critical_line_cumulative : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 / 3 - ε) * (Ncount 0 T : ℝ) ≤ N0star 0 T := + DyadicLowerBound (2 / 3) (fun T => N0star 0 T) (fun T => Ncount 0 T) := thmA₀_cumulative -/-- **≥ 1/2 of the zeros are simple and on the critical line.** -/ -theorem half_simple_on_critical_line : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (1 / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ N0simple T (2 * T) := - thmB₀ - -/-- **≥ 3/4 of the zeros are distinct.** -/ -theorem three_quarters_distinct : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 4 - ε) * (Ncount T (2 * T) : ℝ) ≤ Ndist T (2 * T) := - thmC₀ - end Zeta23 diff --git a/zeta23/Zeta23/WeilEF/Contour.lean b/zeta23/Zeta23/WeilEF/Contour.lean index a97c1b07b4..1f4cf01f52 100644 --- a/zeta23/Zeta23/WeilEF/Contour.lean +++ b/zeta23/Zeta23/WeilEF/Contour.lean @@ -4,18 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/WeilEF/Contour.lean — The main contour: rectangle identity for H·Λ'/Λ, -horizontal vanishing along good heights, and the R → ∞ full-line identity. -Consumes: Zeta23.Analytic.rectangleIntegral'_mul_logDeriv_of_poles, -Zeta23.WeilEF.GoodHeights, differentiable_paperFT, -XiLogDeriv zeros/poles data, Mathlib completedRiemannZeta_residue_one / -completedHurwitzZetaEven_residue_zero. +Zeta23/WeilEF/Contour.lean — Rectangle identity for H·Λ'/Λ (instantiation of +`Zeta23.WeilEF.rectangle_identity_of` with poles `P = {0, 1}`). -/ -import Zeta23.WeilEF.VerticalLine +import Zeta23.WeilEF.GenericEF import Zeta23.WeilEF.GoodHeights -import Zeta23.Analytic.RectangleLogDeriv -import Zeta23.RvM.CountByIntegral -import Zeta23.Statement.SeamClosed noncomputable section @@ -25,11 +18,9 @@ namespace WeilEF open Complex Topology Filter Set /-- **Rectangle identity** at a zero-free height R: the weighted argument principle for -H·Λ'/Λ over [1−c, c] × [−R, R]: (1/2πi)∮ = Σ_{|γ_ρ| < R} m_ρ H(ρ) − H(0) − H(1) -(Λ's poles at 0 and 1 are simple with residues 1 and... sign handled by the −m·g(p) pole terms -with m = 1 at both). -/ +H·Λ'/Λ over `[1−c, c] × [−R, R]`: `(1/2πi)∮ = Σ_{|γ_ρ| < R} m_ρ H(ρ) − H(0) − H(1)`. -/ theorem rectangle_identity {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3/2) {R : ℝ} (hR : 7 ≤ R) + {c : ℝ} (hc1 : 1 < c) (_hc2 : c ≤ 3/2) {R : ℝ} (hR : 7 ≤ R) (hgood : ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 - c ≤ s.re → s.re ≤ c → completedRiemannZeta s ≠ 0) : ∃ Z : Finset ℂ, @@ -38,160 +29,50 @@ theorem rectangle_identity {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasC ((1 - c : ℝ) - R * I) ((c : ℝ) + R * I) = (∑ ρ ∈ Z, (zeroMult ρ : ℂ) * Hfn k ρ) - Hfn k 0 - Hfn k 1 := by classical - set z : ℂ := (1 - c : ℝ) - R * I with hzdef - set w : ℂ := (c : ℝ) + R * I with hwdef - have hzre : z.re = 1 - c := by simp [hzdef] - have hzim : z.im = -R := by simp [hzdef] - have hwre : w.re = c := by simp [hwdef] - have hwim : w.im = R := by simp [hwdef] - have hre : z.re ≤ w.re := by rw [hzre, hwre]; linarith - have him : z.im ≤ w.im := by rw [hzim, hwim]; linarith - have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ - (1 - c ≤ s.re ∧ s.re ≤ c) ∧ (-R ≤ s.im ∧ s.im ≤ R) := by - intro s - simp only [Rectangle, Complex.mem_reProdIm, hzre, hzim, hwre, hwim, - Set.uIcc_of_le (show (1 - c : ℝ) ≤ c by linarith), - Set.uIcc_of_le (show (-R : ℝ) ≤ R by linarith), Set.mem_Icc] - set P : Finset ℂ := {0, 1} with hPdef - have hfin := zetaSeam.finite_window (-R) R - set Z : Finset ℂ := hfin.toFinset with hZdef - have hZmemiff : ∀ ρ : ℂ, ρ ∈ Z ↔ (IsNontrivialZero ρ ∧ -R < ρ.im ∧ ρ.im ≤ R) := by - intro ρ - rw [hZdef, Set.Finite.mem_toFinset] - constructor - · rintro ⟨h1, h2⟩ - exact ⟨h1, h2⟩ - · rintro ⟨h1, h2⟩ - exact ⟨h1, h2⟩ - have hZcoe : (Z : Set ℂ) = {ρ : ℂ | IsNontrivialZero ρ ∧ -R < ρ.im ∧ ρ.im < R} := by - ext ρ - rw [Finset.mem_coe, hZmemiff] - simp only [Set.mem_setOf_eq] - constructor - · rintro ⟨h1, h2, h3⟩ - refine ⟨h1, h2, lt_of_le_of_ne h3 ?_⟩ - intro h - exact hgood ρ (Or.inl h) (by linarith [h1.2.1]) (by linarith [h1.2.2]) - ((Zeta23.RvM.completedRiemannZeta_eq_zero_iff_of_re_pos h1.2.1).mpr h1.1) - · rintro ⟨h1, h2, h3⟩ - exact ⟨h1, h2, h3.le⟩ - refine ⟨Z, hZcoe, ?_⟩ - have hZP : Disjoint Z P := by - rw [Finset.disjoint_left] - intro ρ hρ hρP - have h1 := ((hZmemiff ρ).mp hρ).1 - rw [hPdef] at hρP - simp only [Finset.mem_insert, Finset.mem_singleton] at hρP - rcases hρP with rfl | rfl - · have h2 := h1.2.1 - rw [Complex.zero_re] at h2 - exact lt_irrefl _ h2 - · have h2 := h1.2.2 - rw [Complex.one_re] at h2 - exact lt_irrefl _ h2 - have hPint : ∀ p ∈ P, Rectangle z w ∈ 𝓝 p := by - intro p hp - rw [rectangle_mem_nhds_iff, Complex.mem_reProdIm, Set.uIoo_of_le hre, Set.uIoo_of_le him, - hzre, hzim, hwre, hwim] - rw [hPdef] at hp - simp only [Finset.mem_insert, Finset.mem_singleton] at hp + have hPint : ∀ p ∈ ({0, 1} : Finset ℂ), 1 - c < p.re ∧ p.re < c ∧ -R < p.im ∧ p.im < R := by + intro p hp; simp only [Finset.mem_insert, Finset.mem_singleton] at hp + rcases hp with rfl | rfl <;> (simp; exact ⟨by linarith, by linarith, by linarith⟩) + have hPnotZ : ∀ p ∈ ({0, 1} : Finset ℂ), p ∉ {ρ : ℂ | IsNontrivialZero ρ} := by + intro p hp hnz; simp only [Finset.mem_insert, Finset.mem_singleton] at hp rcases hp with rfl | rfl - · constructor - · simp only [Complex.zero_re, Set.mem_Ioo] - constructor <;> linarith - · simp only [Complex.zero_im, Set.mem_Ioo] - constructor <;> linarith - · constructor - · simp only [Complex.one_re, Set.mem_Ioo] - constructor <;> linarith - · simp only [Complex.one_im, Set.mem_Ioo] - constructor <;> linarith - have hf : AnalyticOnNhd ℂ completedRiemannZeta (Rectangle z w \ (P : Set ℂ)) := by + · exact lt_irrefl (0 : ℝ) (by simpa using hnz.2.1) + · exact lt_irrefl (1 : ℝ) (by simpa using hnz.2.2) + have hf : AnalyticOnNhd ℂ completedRiemannZeta + (Rectangle (((1 - c : ℝ) : ℂ) - R * I) ((c : ℝ) + R * I) \ (({0, 1} : Finset ℂ) : Set ℂ)) := by rintro s ⟨_, hsP⟩ - rw [hPdef] at hsP simp only [Finset.coe_insert, Finset.coe_singleton, Set.mem_insert_iff, Set.mem_singleton_iff, not_or] at hsP exact Zeta23.RvM.analyticAt_completedRiemannZeta hsP.1 hsP.2 - have hg : AnalyticOnNhd ℂ (Hfn k) (Rectangle z w) := by - intro s _ - have hdiff : Differentiable ℂ (Hfn k) := by - unfold Hfn - exact (differentiable_paperFT hk.continuous hkc).comp - ((differentiable_id.sub_const _).div_const _) - exact hdiff.analyticAt s - have hborder : ∀ s ∈ RectangleBorder z w, completedRiemannZeta s ≠ 0 := by - intro s hs h0 - have hsrect := rectangleBorder_subset_rectangle z w hs - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsrect - simp only [RectangleBorder, Set.mem_union, Complex.mem_reProdIm, Set.mem_singleton_iff, - hzre, hzim, hwre, hwim] at hs - rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ - · exact hgood s (Or.inr h') hr1 hr2 h0 - · exact Zeta23.RvM.completedRiemannZeta_ne_zero_of_re_nonpos (by rw [h']; linarith) h0 - · exact hgood s (Or.inl h') hr1 hr2 h0 - · exact Zeta23.RvM.completedRiemannZeta_ne_zero_of_one_le_re (by rw [h']; linarith) h0 - have hZchar : ∀ s ∈ Rectangle z w \ (P : Set ℂ), (completedRiemannZeta s = 0 ↔ s ∈ Z) := by - rintro s ⟨hsrect, hsP⟩ - rw [hPdef] at hsP - simp only [Finset.coe_insert, Finset.coe_singleton, Set.mem_insert_iff, - Set.mem_singleton_iff, not_or] at hsP - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsrect - rw [hZmemiff] - constructor - · intro h0 - have hrepos : 0 < s.re := by - by_contra hle - exact Zeta23.RvM.completedRiemannZeta_ne_zero_of_re_nonpos (by linarith) h0 - have hrelt : s.re < 1 := by - by_contra hge - exact Zeta23.RvM.completedRiemannZeta_ne_zero_of_one_le_re (by linarith) h0 - have hnz : IsNontrivialZero s := - ⟨(Zeta23.RvM.completedRiemannZeta_eq_zero_iff_of_re_pos hrepos).mp h0, hrepos, hrelt⟩ - refine ⟨hnz, ?_, hi2⟩ - rcases lt_or_eq_of_le hi1 with h | h - · exact h - · exact absurd h0 (hgood s (Or.inr h.symm) hr1 hr2) - · rintro ⟨h1, _, _⟩ - exact (Zeta23.RvM.completedRiemannZeta_eq_zero_iff_of_re_pos h1.2.1).mpr h1.1 - have hZsub : (Z : Set ℂ) ⊆ Rectangle z w := by - intro ρ hρ - rw [Finset.mem_coe, hZmemiff] at hρ - obtain ⟨h1, h2, h3⟩ := hρ - exact (hmem ρ).mpr ⟨⟨by linarith [h1.2.1], by linarith [h1.2.2]⟩, h2.le, h3⟩ - have hpole : ∀ p ∈ P, ∃ cp : ℂ, cp ≠ 0 ∧ - Filter.Tendsto (fun s => (s - p) ^ (1 : ℕ) * completedRiemannZeta s) - (nhdsWithin p {p}ᶜ) (nhds cp) := by - intro p hp - rw [hPdef] at hp - simp only [Finset.mem_insert, Finset.mem_singleton] at hp + have hZ : ∀ s, s ∉ ({0, 1} : Finset ℂ) → (completedRiemannZeta s = 0 ↔ IsNontrivialZero s) := fun s _ => by + refine ⟨fun h0 => ?_, fun h => (Zeta23.RvM.completedRiemannZeta_eq_zero_iff_of_re_pos h.2.1).mpr h.1⟩ + have hpos : 0 < s.re := by + by_contra h; exact Zeta23.RvM.completedRiemannZeta_ne_zero_of_re_nonpos (by linarith) h0 + have hlt : s.re < 1 := by + by_contra h; exact Zeta23.RvM.completedRiemannZeta_ne_zero_of_one_le_re (by linarith) h0 + exact ⟨(Zeta23.RvM.completedRiemannZeta_eq_zero_iff_of_re_pos hpos).mp h0, hpos, hlt⟩ + have hpole : ∀ p ∈ ({0, 1} : Finset ℂ), ∃ cp : ℂ, cp ≠ 0 ∧ + Tendsto (fun s => (s - p) ^ (1 : ℕ) * completedRiemannZeta s) (𝓝[≠] p) (𝓝 cp) := by + intro p hp; simp only [Finset.mem_insert, Finset.mem_singleton] at hp rcases hp with rfl | rfl · refine ⟨-1, by norm_num, ?_⟩ have h := HurwitzZeta.completedHurwitzZetaEven_residue_zero (0 : UnitAddCircle) norm_num at h - refine h.congr (fun s => ?_) - simp [completedRiemannZeta] - · refine ⟨1, one_ne_zero, ?_⟩ - refine completedRiemannZeta_residue_one.congr (fun s => ?_) - simp - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv_of_poles hre him Z P hZP hPint hf hg - hborder hZchar hZsub (fun _ => 1) hpole - rw [key] + exact h.congr fun s => by simp [completedRiemannZeta] + · exact ⟨1, one_ne_zero, completedRiemannZeta_residue_one.congr fun s => by simp⟩ + obtain ⟨Z, hZcoe, hrect⟩ := rectangle_identity_of (P := {0, 1}) (m := fun _ => 1) + (by linarith) (by linarith) hPint hPnotZ (zetaSeam.finite_window (-R) R) hf + (differentiable_Hfn hk hkc) hZ (fun ρ hρ => ⟨by linarith [hρ.2.1], by linarith [hρ.2.2]⟩) + hgood hpole + refine ⟨Z, hZcoe, ?_⟩ + rw [hrect] have hord : ∀ ρ ∈ Z, (analyticOrderNatAt completedRiemannZeta ρ : ℂ) = (zeroMult ρ : ℂ) := by intro ρ hρ - have h1 := ((hZmemiff ρ).mp hρ).1 + have h1 : IsNontrivialZero ρ := (by rw [← Finset.mem_coe, hZcoe] at hρ; exact hρ.1) rw [Zeta23.RvM.analyticOrderNatAt_completedRiemannZeta h1.2.1 - (fun h' => by - have h2 := h1.2.2 - rw [h', Complex.one_re] at h2 - exact lt_irrefl _ h2)] - have hPsum : ∑ p ∈ P, ((1 : ℕ) : ℂ) * Hfn k p = Hfn k 0 + Hfn k 1 := by - rw [hPdef, Finset.sum_insert (by simp), Finset.sum_singleton] - ring - rw [Finset.sum_congr rfl (fun ρ hρ => by rw [hord ρ hρ]), hPsum] - ring - -/- `full_line_identity` (the R → ∞ limit) lives in Zeta23/WeilEF/FullLine.lean, -which imports this file. -/ + (fun h' => by have := h1.2.2; rw [h', Complex.one_re] at this; exact lt_irrefl _ this)] + have hPsum : ∑ p ∈ ({0, 1} : Finset ℂ), ((1 : ℕ) : ℂ) * Hfn k p = Hfn k 0 + Hfn k 1 := by + rw [Finset.sum_insert (by simp), Finset.sum_singleton]; ring + rw [Finset.sum_congr rfl fun ρ hρ => by rw [hord ρ hρ], hPsum]; ring end WeilEF end Zeta23 diff --git a/zeta23/Zeta23/WeilEF/Effective.lean b/zeta23/Zeta23/WeilEF/Effective.lean index 401f1318bd..143007a39e 100644 --- a/zeta23/Zeta23/WeilEF/Effective.lean +++ b/zeta23/Zeta23/WeilEF/Effective.lean @@ -15,10 +15,8 @@ E2. zeta_local_zero_count_explicit : N(t,t+1] ≤ A₀ * log(|t|+3) with named A E3. mu_increment_explicit : |μ(t+r) − μ(t)| ≤ K(|r| + r²)/t with named K (from digamma_stirling's ≤ 3/im² remainder + the explicit main-term derivative). -/ -import Zeta23.RvM.ZetaGrowth import Zeta23.RvM.LocalCount import Zeta23.RvM.CountByIntegral -import Zeta23.GammaFacts.StirlingVert import Zeta23.WeilEF.Landau import Mathlib.NumberTheory.LSeries.HurwitzZetaValues import Zeta23.ThmE.GammaFactsChiProof @@ -34,14 +32,6 @@ namespace WeilEF /-! ## E1: explicit growth constant on the quarter-strip -/ -/-- **E1**: ‖ζ(s)‖ ≤ (13/2)·|Im s| on 1/4 ≤ Re s (≤ 2), |Im s| ≥ 1 — the explicit form of -zeta_growth_quarter's ∃-pair: (A, C) = (1, 13/2). -/ -theorem zeta_growth_quarter_explicit {s : ℂ} (h₁ : (1/4 : ℝ) ≤ s.re) (h₃ : 1 ≤ |s.im|) : - ‖riemannZeta s‖ ≤ (13/2) * |s.im| := by - have h := Zeta23.RvM.riemannZeta_linear_growth (δ := 1/4) (by norm_num) h₁ h₃ - have : (5/2 + ((1:ℝ)/4)⁻¹) = (13/2 : ℝ) := by norm_num - rwa [this] at h - /-! ## E1b: the partial fraction with fully numeric constant `zeta_logDeriv_partial_fraction_explicit` is the forall-form of Zeta23.WeilEF.zeta_logDeriv_partial_fraction (Landau.lean) with constant 135000000: the same @@ -53,469 +43,12 @@ via log 3 <= 9/8 (3 <= e^(9/8): e*e^(1/8) >= 2.7182818*(1+1/8) = 3.058, add_one_ log (17/2) <= log 9 = 2*log 3 <= 9/4; sum <= 43/8; 24612638*43/8 <= 132293000. -/ -set_option maxHeartbeats 1600000 in -theorem zeta_logDeriv_partial_fraction_explicit : ∀ t : ℝ, 6 ≤ |t| → - ∃ Z : Finset ℂ, - (↑Z = {ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) | riemannZeta ρ = 0}) ∧ - ((∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ 135000000 * Real.log (|t| + 3)) ∧ - ∀ s ∈ Metric.closedBall (2 + t * I) (3/2), riemannZeta s ≠ 0 → - ‖logDeriv riemannZeta s - ∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℂ) / (s - ρ)‖ - ≤ 135000000 * Real.log (|t| + 3) := by - intro t ht - set A : ℝ := 1 with hAdef - set C₀ : ℝ := 13/2 with hC₀def - have hC₀ : (0:ℝ) < C₀ := by rw [hC₀def]; norm_num - have hgrow : ∀ s : ℂ, (1/4 : ℝ) ≤ s.re → s.re ≤ 2 → 1 ≤ |s.im| → - ‖riemannZeta s‖ ≤ C₀ * |s.im| ^ A := by - intro s h₁ h₂ h₃ - rw [hC₀def, hAdef, Real.rpow_one] - exact zeta_growth_quarter_explicit h₁ h₃ - set A' : ℝ := max A 0 with hA' - have hA'0 : 0 ≤ A' := le_max_right _ _ - set s₀ : ℂ := 2 + t * I with hs₀ - have hs₀re : s₀.re = 2 := by simp [hs₀] - have hs₀im : s₀.im = t := by simp [hs₀] - have hζs₀ : riemannZeta s₀ ≠ 0 := - riemannZeta_ne_zero_of_one_lt_re (by rw [hs₀re]; norm_num) - have hlow : (1/3 : ℝ) ≤ ‖riemannZeta s₀‖ := Zeta23.RvM.zeta_lower_bound_two t - -- analyticity on the closed ball of radius 91/50 - have hone : (1 : ℂ) ∉ Metric.closedBall s₀ (91/50) := by - intro h - rw [Metric.mem_closedBall, Complex.dist_eq] at h - have him : ((1 : ℂ) - s₀).im = -t := by simp [hs₀] - have : |t| ≤ ‖(1 : ℂ) - s₀‖ := by - calc |t| = |((1:ℂ) - s₀).im| := by rw [him, abs_neg] - _ ≤ ‖(1:ℂ) - s₀‖ := Complex.abs_im_le_norm _ - linarith - have hfa : AnalyticOnNhd ℂ riemannZeta (Metric.closedBall s₀ (91/50)) := - Zeta23.RvM.analyticOnNhd_riemannZeta hone - -- the B-bound on the (24/25)·(91/50)-ball - set B : ℝ := 3 * (C₀ * (|t| + 2) ^ A' + 2) with hB - have ht2 : (1:ℝ) ≤ |t| + 2 := by linarith - have hpow1 : (1:ℝ) ≤ (|t| + 2) ^ A' := Real.one_le_rpow ht2 hA'0 - have hB2 : 2 ≤ B := by - rw [hB] - nlinarith [mul_nonneg hC₀.le (le_trans zero_le_one hpow1)] - have hfB : ∀ w ∈ Metric.closedBall s₀ (24/25 * (91/50)), ‖riemannZeta w‖ ≤ B * ‖riemannZeta s₀‖ := by - intro w hw - rw [Metric.mem_closedBall, Complex.dist_eq] at hw - have hwre : |w.re - 2| ≤ 24/25 * (91/50) := by - have := Complex.abs_re_le_norm (w - s₀) - have hre : (w - s₀).re = w.re - 2 := by simp [hs₀] - rw [hre] at this - linarith - have hwim : |w.im - t| ≤ 24/25 * (91/50) := by - have := Complex.abs_im_le_norm (w - s₀) - have him : (w - s₀).im = w.im - t := by simp [hs₀] - rw [him] at this - linarith - have hwim1 : 1 ≤ |w.im| := by - have h3 : |t| - |w.im| ≤ |t - w.im| := abs_sub_abs_le_abs_sub t w.im - have h4 : |t - w.im| = |w.im - t| := abs_sub_comm t w.im - linarith [hwim] - have hwimt : |w.im| ≤ |t| + 2 := by - have := abs_sub_abs_le_abs_sub w.im t - have h2 : |w.im| - |t| ≤ |w.im - t| := this - linarith [hwim] - have hbound : ‖riemannZeta w‖ ≤ C₀ * (|t| + 2) ^ A' + 2 := by - rcases le_or_gt w.re 2 with hre2 | hre2 - · have h14 : (1/4 : ℝ) ≤ w.re := by - rw [abs_le] at hwre - linarith - have := hgrow w h14 hre2 hwim1 - calc ‖riemannZeta w‖ ≤ C₀ * |w.im| ^ A := this - _ ≤ C₀ * (|t| + 2) ^ A' := by - refine mul_le_mul_of_nonneg_left ?_ hC₀.le - calc |w.im| ^ A ≤ |w.im| ^ A' := - Real.rpow_le_rpow_of_exponent_le hwim1 (le_max_left _ _) - _ ≤ (|t| + 2) ^ A' := Real.rpow_le_rpow (by linarith) hwimt hA'0 - _ ≤ C₀ * (|t| + 2) ^ A' + 2 := by linarith - · have := Zeta23.RvM.norm_riemannZeta_le_of_two_le_re (s := w) (by linarith) - have hπ : (Real.pi : ℝ) ^ 2 / 6 ≤ 2 := by nlinarith [Real.pi_lt_d2, Real.pi_gt_three] - calc ‖riemannZeta w‖ ≤ Real.pi ^ 2 / 6 := this - _ ≤ 2 := hπ - _ ≤ C₀ * (|t| + 2) ^ A' + 2 := by - nlinarith [mul_nonneg hC₀.le (le_trans zero_le_one hpow1)] - calc ‖riemannZeta w‖ ≤ C₀ * (|t| + 2) ^ A' + 2 := hbound - _ = (B * (1/3)) := by rw [hB]; ring - _ ≤ B * ‖riemannZeta s₀‖ := by - refine mul_le_mul_of_nonneg_left hlow (by rw [hB]; positivity) - obtain ⟨Z, hZset, hZcount, hZpf⟩ := logDeriv_partial_fraction_disk (f := riemannZeta) - (by norm_num : (0:ℝ) < 91/50) hfa hζs₀ hB2 hfB - refine ⟨Z, ?_, ?_, ?_⟩ - · rw [hZset] - · refine hZcount.trans ?_ - have hT3 : (2:ℝ) ≤ Real.log (|t| + 3) := by - rw [Real.le_log_iff_exp_le (by linarith)] - have h1 := Real.exp_one_lt_d9 - calc Real.exp 2 = Real.exp 1 * Real.exp 1 := by rw [← Real.exp_add]; norm_num - _ ≤ 2.7182818286 * 2.7182818286 := by nlinarith [Real.exp_pos 1] - _ ≤ 9 := by norm_num - _ ≤ |t| + 3 := by linarith - have hlogB : Real.log B ≤ (Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3) := by - have h1 : B ≤ 3 * ((C₀ + 2) * (|t| + 2) ^ A') := by - rw [hB] - nlinarith [hpow1, hC₀] - have h2 : Real.log B ≤ Real.log (3 * ((C₀ + 2) * (|t| + 2) ^ A')) := - Real.log_le_log (by rw [hB]; positivity) h1 - rw [Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity), - Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity), - Real.log_mul (by positivity : (C₀ + 2 : ℝ) ≠ 0) (by positivity), - Real.log_rpow (by linarith : (0:ℝ) < |t| + 2)] at h2 - have h3 : Real.log (|t| + 2) ≤ Real.log (|t| + 3) := - Real.log_le_log (by linarith) (by linarith) - have h4 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have h5 : (0:ℝ) ≤ Real.log (C₀ + 2) := Real.log_nonneg (by linarith) - have hBeq : Real.log B = Real.log 3 + Real.log (C₀ * (|t| + 2) ^ A' + 2) := by - rw [hB, Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity)] - rw [hBeq] - nlinarith [mul_nonneg hA'0 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - Real.log (|t|+2)), - mul_nonneg h4 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - 1), - mul_nonneg h5 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - 1), hT3] - have hratio : ((24/25 : ℝ))/(22/25) = 12/11 := by norm_num - have hlog1211 : (1:ℝ)/12 ≤ Real.log ((24/25)/(22/25)) := by - rw [hratio] - have h := Real.log_le_sub_one_of_pos (show (0:ℝ) < 11/12 by norm_num) - rw [show (11/12:ℝ) = (12/11)⁻¹ by norm_num, Real.log_inv] at h - linarith - have hlogpos : (0:ℝ) < Real.log ((24/25)/(22/25)) := by - rw [hratio] - exact Real.log_pos (by norm_num) - have hlogBnn : (0:ℝ) ≤ Real.log B := Real.log_nonneg (by linarith) - have h4 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have h5 : (0:ℝ) ≤ Real.log (C₀ + 2) := Real.log_nonneg (by linarith) - calc 1 / Real.log ((24/25)/(22/25)) * Real.log B ≤ 12 * Real.log B := by - refine mul_le_mul_of_nonneg_right ?_ hlogBnn - rw [div_le_iff₀ hlogpos] - linarith - _ ≤ 12 * ((Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3)) := - mul_le_mul_of_nonneg_left hlogB (by norm_num) - _ ≤ 135000000 * Real.log (|t| + 3) := by - have hA'1 : A' = 1 := by rw [hA', hAdef]; norm_num - have hlog3 : Real.log 3 ≤ 9/8 := by - rw [Real.log_le_iff_le_exp (by norm_num)] - have he := Real.exp_one_gt_d9 - have h18 : Real.exp (1/8 : ℝ) ≥ 1 + 1/8 := by - have := Real.add_one_le_exp (1/8 : ℝ) - linarith - calc (3:ℝ) ≤ 2.718281828 * (1 + 1/8) := by norm_num - _ ≤ Real.exp 1 * Real.exp (1/8) := by - have h0 : (0:ℝ) < Real.exp 1 := Real.exp_pos 1 - have h1 : (2.718281828:ℝ) ≤ Real.exp 1 := by linarith - nlinarith [Real.exp_pos (1/8 : ℝ)] - _ = Real.exp (9/8 : ℝ) := by rw [← Real.exp_add]; norm_num - have hlog17 : Real.log (C₀ + 2) ≤ 9/4 := by - rw [hC₀def] - have h9 : (13/2 : ℝ) + 2 ≤ 9 := by norm_num - calc Real.log ((13:ℝ)/2 + 2) ≤ Real.log 9 := Real.log_le_log (by norm_num) h9 - _ = Real.log (3 ^ 2) := by norm_num - _ = 2 * Real.log 3 := by rw [Real.log_pow]; push_cast; ring - _ ≤ 9/4 := by linarith - have hsum : Real.log 3 + Real.log (C₀ + 2) + A' ≤ 35/8 := by - rw [hA'1] - linarith - have hc0 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have hc1 : (0:ℝ) ≤ Real.log (C₀ + 2) := by - rw [hC₀def] - exact Real.log_nonneg (by norm_num) - have hfold : (12:ℝ) * (Real.log 3 + Real.log (C₀ + 2) + A') ≤ 135000000 := - le_trans (mul_le_mul_of_nonneg_left hsum (by norm_num : (0:ℝ) ≤ 12)) (by norm_num) - calc (12:ℝ) * ((Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3)) - = (12 * (Real.log 3 + Real.log (C₀ + 2) + A')) * Real.log (|t| + 3) := by ring - _ ≤ 135000000 * Real.log (|t| + 3) := - mul_le_mul_of_nonneg_right hfold (by linarith) - · intro s hs hζs - have hs' : s ∈ Metric.closedBall s₀ (83/100 * (91/50)) := - Metric.closedBall_subset_closedBall (by norm_num) hs - refine (hZpf s hs' hζs).trans ?_ - have hT3 : (2:ℝ) ≤ Real.log (|t| + 3) := by - rw [Real.le_log_iff_exp_le (by linarith)] - have h1 := Real.exp_one_lt_d9 - calc Real.exp 2 = Real.exp 1 * Real.exp 1 := by rw [← Real.exp_add]; norm_num - _ ≤ 2.7182818286 * 2.7182818286 := by nlinarith [Real.exp_pos 1] - _ ≤ 9 := by norm_num - _ ≤ |t| + 3 := by linarith - have hlogB : Real.log B ≤ (Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3) := by - have h1 : B ≤ 3 * ((C₀ + 2) * (|t| + 2) ^ A') := by - rw [hB] - nlinarith [hpow1, hC₀] - have h2 : Real.log B ≤ Real.log (3 * ((C₀ + 2) * (|t| + 2) ^ A')) := - Real.log_le_log (by rw [hB]; positivity) h1 - rw [Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity), - Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity), - Real.log_mul (by positivity : (C₀ + 2 : ℝ) ≠ 0) (by positivity), - Real.log_rpow (by linarith : (0:ℝ) < |t| + 2)] at h2 - have h3 : Real.log (|t| + 2) ≤ Real.log (|t| + 3) := - Real.log_le_log (by linarith) (by linarith) - have h4 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have h5 : (0:ℝ) ≤ Real.log (C₀ + 2) := Real.log_nonneg (by linarith) - have hBeq : Real.log B = Real.log 3 + Real.log (C₀ * (|t| + 2) ^ A' + 2) := by - rw [hB, Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity)] - rw [hBeq] - nlinarith [mul_nonneg hA'0 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - Real.log (|t|+2)), - mul_nonneg h4 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - 1), - mul_nonneg h5 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - 1), hT3] - have h4 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have h5 : (0:ℝ) ≤ Real.log (C₀ + 2) := Real.log_nonneg (by linarith) - calc 44795000 / (91/50) * Real.log B - ≤ 44795000 / (91/50) * ((Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3)) := - mul_le_mul_of_nonneg_left hlogB (by norm_num) - _ ≤ 135000000 * Real.log (|t| + 3) := by - have hA'1 : A' = 1 := by rw [hA', hAdef]; norm_num - have hlog3 : Real.log 3 ≤ 9/8 := by - rw [Real.log_le_iff_le_exp (by norm_num)] - have he := Real.exp_one_gt_d9 - have h18 : Real.exp (1/8 : ℝ) ≥ 1 + 1/8 := by - have := Real.add_one_le_exp (1/8 : ℝ) - linarith - calc (3:ℝ) ≤ 2.718281828 * (1 + 1/8) := by norm_num - _ ≤ Real.exp 1 * Real.exp (1/8) := by - have h0 : (0:ℝ) < Real.exp 1 := Real.exp_pos 1 - have h1 : (2.718281828:ℝ) ≤ Real.exp 1 := by linarith - nlinarith [Real.exp_pos (1/8 : ℝ)] - _ = Real.exp (9/8 : ℝ) := by rw [← Real.exp_add]; norm_num - have hlog17 : Real.log (C₀ + 2) ≤ 9/4 := by - rw [hC₀def] - have h9 : (13/2 : ℝ) + 2 ≤ 9 := by norm_num - calc Real.log ((13:ℝ)/2 + 2) ≤ Real.log 9 := Real.log_le_log (by norm_num) h9 - _ = Real.log (3 ^ 2) := by norm_num - _ = 2 * Real.log 3 := by rw [Real.log_pow]; push_cast; ring - _ ≤ 9/4 := by linarith - have hsum : Real.log 3 + Real.log (C₀ + 2) + A' ≤ 35/8 := by - rw [hA'1] - linarith - have hlogT3nn : (0:ℝ) ≤ Real.log (|t| + 3) := by linarith - have hc0 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have hc1 : (0:ℝ) ≤ Real.log (C₀ + 2) := by - rw [hC₀def] - exact Real.log_nonneg (by norm_num) - have hfold : (44795000 / (91/50) : ℝ) * (Real.log 3 + Real.log (C₀ + 2) + A') - ≤ 135000000 := - le_trans (mul_le_mul_of_nonneg_left hsum (by norm_num : (0:ℝ) ≤ 44795000 / (91/50))) - (by norm_num) - calc 44795000 / (91/50) - * ((Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3)) - = (44795000 / (91/50) * (Real.log 3 + Real.log (C₀ + 2) + A')) - * Real.log (|t| + 3) := by ring - _ ≤ 135000000 * Real.log (|t| + 3) := - mul_le_mul_of_nonneg_right hfold hlogT3nn - - /-! ## E3: explicit mu-increment constant -/ -/-- mu agrees with the chi-side muq at (kappa, q) = (0, 1). -/ -theorem mu_eq_muq01 : Zeta23.mu = Zeta23.ThmE.muq 0 1 := by - funext τ - simp only [Zeta23.mu, Zeta23.ThmE.muq] - have h1 : Real.log ((1:ℕ) / Real.pi) = -Real.log Real.pi := by - push_cast - rw [one_div, Real.log_inv] - rw [h1] - have h2 : (1/4 : ℂ) + ((0:ℕ):ℂ) / 2 + Complex.I * (τ:ℂ) / 2 - = 1/4 + Complex.I * (τ:ℂ) / 2 := by - push_cast - ring - rw [h2] - ring - -/-- **E3a**: explicit derivative bound for the ζ-side μ: |μ′(τ)| ≤ (24/π)/|τ| for |τ| ≥ 1. -/ -theorem mu_deriv_bound_explicit (τ : ℝ) (hτ : 1 ≤ |τ|) : - |deriv Zeta23.mu τ| ≤ (24 / Real.pi) / |τ| := by - rw [mu_eq_muq01] - exact Zeta23.ThmE.GammaChi.muq_deriv_bound_const (q := 1) (by norm_num) τ hτ - -/-- **E3**: fully explicit μ-increment bound, K = 16: for t ≥ 2 and t + r ≥ 2, -|μ(t+r) − μ(t)| ≤ 16·(|r| + r²)/t. (Both-endpoints-≥-2 is exactly what the prime-side -consumers use — the Ix-window keeps both points in [T, 2T].) Proof: MVT with -mu_deriv_bound_explicit; for r ≥ −t/2 the whole segment has |τ| ≥ t/2 so |μ′| ≤ (48/π)/t; -otherwise t + r < t/2 forces |r| > t/2, and |μ′| ≤ 12/π on [2, ∞) gives -|Δμ| ≤ (12/π)|r| ≤ (24/π)·r²/t. 48/π ≤ 16. -/ -theorem mu_increment_explicit (t : ℝ) (ht : 2 ≤ t) (r : ℝ) (htr : 2 ≤ t + r) : - |Zeta23.mu (t + r) - Zeta23.mu t| ≤ 16 * (|r| + r ^ 2) / t := by - have ht0 : (0:ℝ) < t := by linarith - have hsmooth : ContDiff ℝ ⊤ (Zeta23.mu) := by - rw [mu_eq_muq01] - exact (Zeta23.ThmE.GammaChi.gammaFactsChi (κ := 0) (q := 1) (by norm_num) (by norm_num)).smooth - have hdiff : Differentiable ℝ Zeta23.mu := hsmooth.differentiable (by simp) - -- derivative bound on [m, ∞) for m ≥ 1 - have hderiv_on : ∀ m : ℝ, 1 ≤ m → ∀ τ ∈ Set.Icc (min t (t+r)) (max t (t+r)), - m ≤ |τ| → |deriv Zeta23.mu τ| ≤ (24 / Real.pi) / m := by - intro m hm τ _ hmτ - have h1 := mu_deriv_bound_explicit τ (le_trans hm hmτ) - calc |deriv Zeta23.mu τ| ≤ (24 / Real.pi) / |τ| := h1 - _ ≤ (24 / Real.pi) / m := by - gcongr - rcases le_or_gt (t/2) (t + r) with hbig | hsmall - · -- whole segment in [t/2, ∞), t/2 ≥ 1 - have hm1 : (1:ℝ) ≤ t/2 := by linarith - have hseg : ∀ τ ∈ Set.Icc (min t (t+r)) (max t (t+r)), (t/2 : ℝ) ≤ |τ| := by - intro τ hτ - have h1 : t/2 ≤ τ := by - rcases le_total t (t+r) with h | h - · rw [min_eq_left h] at hτ - linarith [hτ.1] - · rw [min_eq_right h] at hτ - linarith [hτ.1] - calc t/2 ≤ τ := h1 - _ ≤ |τ| := le_abs_self τ - have hbound : ∀ τ ∈ Set.Icc (min t (t+r)) (max t (t+r)), - ‖deriv Zeta23.mu τ‖ ≤ (24 / Real.pi) / (t/2) := by - intro τ hτ - rw [Real.norm_eq_abs] - exact hderiv_on (t/2) hm1 τ hτ (hseg τ hτ) - have hmem1 : t ∈ Set.Icc (min t (t+r)) (max t (t+r)) := - ⟨min_le_left _ _, le_max_left _ _⟩ - have hmem2 : t + r ∈ Set.Icc (min t (t+r)) (max t (t+r)) := - ⟨min_le_right _ _, le_max_right _ _⟩ - have hmvt := (convex_Icc (min t (t+r)) (max t (t+r))).norm_image_sub_le_of_norm_deriv_le - (f := Zeta23.mu) (fun τ _ => hdiff τ) hbound hmem1 hmem2 - rw [Real.norm_eq_abs, show t + r - t = r by ring, Real.norm_eq_abs] at hmvt - have hπ3 : (3:ℝ) ≤ Real.pi := Real.pi_gt_three.le - have hcoef : (24 / Real.pi) / (t/2) ≤ 16 / t := by - rw [div_div_eq_mul_div, div_le_div_iff₀ ht0 ht0] - have h24 : 24 / Real.pi ≤ 8 := by - rw [div_le_iff₀ (by linarith : (0:ℝ) < Real.pi)] - linarith - nlinarith - calc |Zeta23.mu (t + r) - Zeta23.mu t| ≤ (24 / Real.pi) / (t/2) * |r| := hmvt - _ ≤ 16 / t * |r| := by - have : (0:ℝ) ≤ |r| := abs_nonneg r - exact mul_le_mul_of_nonneg_right hcoef this - _ ≤ 16 * (|r| + r ^ 2) / t := by - rw [div_mul_eq_mul_div] - gcongr - nlinarith [sq_nonneg r, abs_nonneg r] - · -- t + r < t/2: then |r| > t/2; both endpoints ≥ 2 so |μ′| ≤ 12/π on the segment - have hr2 : t + r < t/2 := hsmall - have hrneg : r < -(t/2) := by linarith - have hrabs : t/2 < |r| := by - rw [abs_of_neg (by linarith : r < 0)] - linarith - have hseg2 : ∀ τ ∈ Set.Icc (min t (t+r)) (max t (t+r)), (2:ℝ) ≤ |τ| := by - intro τ hτ - have hmin : min t (t+r) = t + r := min_eq_right (by linarith) - rw [hmin] at hτ - have h1 : 2 ≤ τ := le_trans htr hτ.1 - calc (2:ℝ) ≤ τ := h1 - _ ≤ |τ| := le_abs_self τ - have hbound2 : ∀ τ ∈ Set.Icc (min t (t+r)) (max t (t+r)), - ‖deriv Zeta23.mu τ‖ ≤ (24 / Real.pi) / 2 := by - intro τ hτ - rw [Real.norm_eq_abs] - exact hderiv_on 2 (by norm_num) τ hτ (hseg2 τ hτ) - have hmem1 : t ∈ Set.Icc (min t (t+r)) (max t (t+r)) := - ⟨min_le_left _ _, le_max_left _ _⟩ - have hmem2 : t + r ∈ Set.Icc (min t (t+r)) (max t (t+r)) := - ⟨min_le_right _ _, le_max_right _ _⟩ - have hmvt := (convex_Icc (min t (t+r)) (max t (t+r))).norm_image_sub_le_of_norm_deriv_le - (f := Zeta23.mu) (fun τ _ => hdiff τ) hbound2 hmem1 hmem2 - rw [Real.norm_eq_abs, show t + r - t = r by ring, Real.norm_eq_abs] at hmvt - have hπ3 : (3:ℝ) ≤ Real.pi := Real.pi_gt_three.le - have h24 : 24 / Real.pi ≤ 8 := by - rw [div_le_iff₀ (by linarith : (0:ℝ) < Real.pi)] - linarith - -- (12/π)|r| ≤ 4|r| ≤ 8 r²/t (since |r| > t/2 → r² > |r|·t/2 → r²/t > |r|/2) - calc |Zeta23.mu (t + r) - Zeta23.mu t| ≤ (24 / Real.pi) / 2 * |r| := hmvt - _ ≤ 4 * |r| := by nlinarith [abs_nonneg r] - _ ≤ 16 * (|r| + r ^ 2) / t := by - rw [le_div_iff₀ ht0] - have hr2' : |r| * t ≤ 2 * r ^ 2 := by - have h1 : |r| * t < |r| * (2 * |r|) := by - have : (0:ℝ) < |r| := by linarith - nlinarith - nlinarith [sq_abs r] - nlinarith [abs_nonneg r, sq_nonneg r] - /-! ## E2(i): explicit local zero count away from the origin -/ -set_option maxHeartbeats 800000 in -/-- **E2(i)**: for |t + 1/2| ≥ 6, the unit-window zero count satisfies -N(t, t+1] ≤ 540000000·log(|t|+3) — explicit, via reflection halving -(zetaZeroConfig.N_le_two_mul_half) + the explicit partial-fraction count conjunct -(the half-window {Re ≥ 1/2, ordinate ∈ (t, t+1]} sits inside the counting ball -of radius (22/25)(91/50) around 2 + (t+1/2)i: distance² ≤ (3/2)² + (1/2)² < 1.6016²). -/ -theorem zeta_local_count_explicit_large (t : ℝ) (hc : 6 ≤ |t + 1/2|) : - (Zeta23.Ncount t (t + 1) : ℝ) ≤ 540000000 * Real.log (|t| + 3) := by - obtain ⟨Z, hZset, hZcount, -⟩ := zeta_logDeriv_partial_fraction_explicit (t + 1/2) hc - have hhalf := Zeta23.zetaZeroConfig.N_le_two_mul_half (T₁ := t) (T₂ := t + 1) - set S : Set ℂ := Zeta23.zetaZeroConfig.window t (t + 1) ∩ {ρ | 1/2 ≤ ρ.re} with hSdef - have hsubset : S ⊆ (Z : Set ℂ) := by - rintro ρ ⟨⟨hcar, him1, him2⟩, hre⟩ - rw [hZset] - have hnz : Zeta23.IsNontrivialZero ρ := hcar - refine ⟨?_, hnz.1⟩ - rw [Metric.mem_closedBall, Complex.dist_eq] - have hre2 : ρ.re < 1 := hnz.2.2 - have hremem : (1/2 : ℝ) ≤ ρ.re := hre - have h1 : |ρ.re - 2| ≤ 3/2 := by - rw [abs_le] - constructor - · linarith - · linarith - have h2 : |ρ.im - (t + 1/2)| ≤ 1/2 := by - rw [abs_le] - constructor - · linarith - · linarith - have hnormsq : ‖ρ - (2 + (t + 1/2 : ℝ) * Complex.I)‖ ^ 2 - = (ρ.re - 2) ^ 2 + (ρ.im - (t + 1/2)) ^ 2 := by - rw [← Complex.normSq_eq_norm_sq, Complex.normSq_apply] - have hre' : (ρ - (2 + (t + 1/2 : ℝ) * Complex.I)).re = ρ.re - 2 := by simp - have him' : (ρ - (2 + (t + 1/2 : ℝ) * Complex.I)).im = ρ.im - (t + 1/2) := by simp - rw [hre', him'] - ring - have hsq : ‖ρ - (2 + (t + 1/2 : ℝ) * Complex.I)‖ ^ 2 ≤ 5/2 := by - rw [hnormsq] - have ha := abs_le.mp h1 - have hb := abs_le.mp h2 - nlinarith [ha.1, ha.2, hb.1, hb.2] - nlinarith [norm_nonneg (ρ - (2 + (t + 1/2 : ℝ) * Complex.I)), hsq] - have hSfin : S.Finite := Z.finite_toSet.subset hsubset - have hsum : (∑ᶠ ρ ∈ S, (Zeta23.zetaZeroConfig.mult ρ : ℝ)) - ≤ ∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℝ) := by - rw [finsum_mem_eq_finite_toFinset_sum _ hSfin] - have hsub2 : hSfin.toFinset ⊆ Z := by - intro ρ hρ - rw [Set.Finite.mem_toFinset] at hρ - exact Finset.mem_coe.mp (hsubset hρ) - exact Finset.sum_le_sum_of_subset_of_nonneg hsub2 (fun ρ _ _ => by positivity) - have hlogfold : Real.log (|t + 1/2| + 3) ≤ 2 * Real.log (|t| + 3) := by - have h1 : |t + 1/2| + 3 ≤ (|t| + 3) ^ 2 := by - have := abs_add_le t (1/2 : ℝ) - nlinarith [abs_nonneg t] - calc Real.log (|t + 1/2| + 3) ≤ Real.log ((|t| + 3) ^ 2) := - Real.log_le_log (by positivity) h1 - _ = 2 * Real.log (|t| + 3) := by - rw [Real.log_pow] - push_cast - ring - have hNle : (Zeta23.Ncount t (t + 1) : ℝ) = (Zeta23.zetaZeroConfig.N t (t + 1) : ℝ) := by - rw [Zeta23.zetaZeroConfig_N] - rw [hNle] - have hlognn : (0:ℝ) ≤ Real.log (|t| + 3) := Real.log_nonneg (by linarith [abs_nonneg t]) - calc (Zeta23.zetaZeroConfig.N t (t + 1) : ℝ) - ≤ 2 * ∑ᶠ ρ ∈ S, (Zeta23.zetaZeroConfig.mult ρ : ℝ) := hhalf - _ ≤ 2 * ∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℝ) := by linarith [hsum] - _ ≤ 2 * (135000000 * Real.log (|t + 1/2| + 3)) := by linarith [hZcount] - _ ≤ 2 * (135000000 * (2 * Real.log (|t| + 3))) := by nlinarith [hlogfold] - _ = 540000000 * Real.log (|t| + 3) := by ring - /-! ## E2(iii) brick 1: the Gamma-norm bound -/ -/-- |Γ(z)| ≤ Γ(Re z) for Re z > 0 (integral representation + pointwise norm). -/ -theorem norm_Gamma_le_Gamma_re {z : ℂ} (hz : 0 < z.re) : - ‖Complex.Gamma z‖ ≤ Real.Gamma z.re := by - rw [Complex.Gamma_eq_integral hz, Real.Gamma_eq_integral hz, Complex.GammaIntegral] - calc ‖∫ x in Set.Ioi (0:ℝ), ((-x).exp : ℂ) * (x:ℂ) ^ (z - 1)‖ - ≤ ∫ x in Set.Ioi (0:ℝ), ‖((-x).exp : ℂ) * (x:ℂ) ^ (z - 1)‖ := - norm_integral_le_integral_norm _ - _ = ∫ x in Set.Ioi (0:ℝ), Real.exp (-x) * x ^ (z.re - 1) := by - refine setIntegral_congr_fun measurableSet_Ioi (fun x hx => ?_) - have hx0 : (0:ℝ) < x := hx - rw [norm_mul, Complex.norm_cpow_eq_rpow_re_of_pos hx0, Complex.norm_real, - Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] - simp - /-- ξ(s) := s(s−1)/2·Λ₀(s) + 1/2 — ENTIRE by construction (Λ₀ = completedRiemannZeta₀), and equal to s(s−1)/2·Λ(s) away from {0, 1} (algebra with Λ = Λ₀ − 1/s − 1/(1−s)). -/ noncomputable def xi (s : ℂ) : ℂ := s * (s - 1) / 2 * completedRiemannZeta₀ s + 1/2 @@ -564,375 +97,5 @@ theorem xi_two : xi 2 = (Real.pi : ℂ) / 6 := by field_simp ring -/-- Γ(x) ≤ 24 on [1/4, 5] (recurrence to [2,4] + monotonicity on [2,∞) + Γ(4) = 6, Γ(5) = 24). -/ -theorem Real_Gamma_le_24 {x : ℝ} (hx1 : (1/4 : ℝ) ≤ x) (hx2 : x ≤ 5) : - Real.Gamma x ≤ 24 := by - have hΓ4 : Real.Gamma 4 = 6 := by - rw [show (4:ℝ) = (3:ℕ) + 1 by norm_num, Real.Gamma_nat_eq_factorial] - norm_num - have hΓ5 : Real.Gamma 5 = 24 := by - rw [show (5:ℝ) = (4:ℕ) + 1 by norm_num, Real.Gamma_nat_eq_factorial] - norm_num - rcases le_or_gt 2 x with h2 | h2 - · -- monotone branch - calc Real.Gamma x ≤ Real.Gamma 5 := - Real.Gamma_strictMonoOn_Ici.monotoneOn (Set.mem_Ici.mpr h2) - (Set.mem_Ici.mpr (by norm_num)) hx2 - _ = 24 := hΓ5 - · -- recurrence branch: Γ(x) = Γ(x+2)/(x(x+1)), x+2 ∈ [9/4, 4) - have hx0 : (0:ℝ) < x := by linarith - have hrec : Real.Gamma (x + 2) = (x + 1) * x * Real.Gamma x := by - rw [show x + 2 = (x + 1) + 1 by ring, Real.Gamma_add_one (by linarith), - Real.Gamma_add_one (by linarith)] - ring - have hG2 : Real.Gamma (x + 2) ≤ 6 := by - rcases le_or_gt 2 (x + 2) with h | h - · calc Real.Gamma (x + 2) ≤ Real.Gamma 4 := - Real.Gamma_strictMonoOn_Ici.monotoneOn (Set.mem_Ici.mpr h) - (Set.mem_Ici.mpr (by norm_num)) (by linarith) - _ = 6 := hΓ4 - · linarith - have hge : (1/4 : ℝ) * (5/4) ≤ x * (x + 1) := by nlinarith - have hΓpos : (0:ℝ) < Real.Gamma x := Real.Gamma_pos_of_pos hx0 - have h6 : (x + 1) * x * Real.Gamma x ≤ 6 := by - rw [← hrec] - exact hG2 - nlinarith - -/-- Pointwise bound for ξ on the right half-strip of the disk: for 1/2 ≤ Re s ≤ 10, s ≠ 1, -‖ξ(s)‖ ≤ ‖s‖/2·24·(‖s−1‖·(1/2 + ‖s‖/Re s) + 1). -/ -theorem xi_norm_le_right {s : ℂ} (hre : (1/2 : ℝ) ≤ s.re) (hs1 : s ≠ 1) - (hup : s.re ≤ 10) : - ‖xi s‖ ≤ ‖s‖ / 2 * 24 * (‖s - 1‖ * (1/2 + ‖s‖ / s.re) + 1) := by - have hs0 : s ≠ 0 := by - intro h - rw [h] at hre - norm_num at hre - have hrepos : (0:ℝ) < s.re := by linarith - rw [xi_eq s hs0 hs1] - have hζ := Zeta23.RvM.norm_riemannZeta_le_of_re_pos hrepos hs1 - have hΓne : Complex.Gammaℝ s ≠ 0 := Complex.Gammaℝ_ne_zero_of_re_pos hrepos - have hΛ : completedRiemannZeta s = Complex.Gammaℝ s * riemannZeta s := by - have h := riemannZeta_def_of_ne_zero hs0 - rw [h] - field_simp - have hΓnorm : ‖Complex.Gammaℝ s‖ ≤ 24 := by - rw [Complex.Gammaℝ_def, norm_mul] - have h1 : ‖(Real.pi : ℂ) ^ (-s / 2)‖ ≤ 1 := by - rw [Complex.norm_cpow_eq_rpow_re_of_pos Real.pi_pos] - have hexp : (-s / 2).re = -(s.re / 2) := by - simp [Complex.neg_re, Complex.div_re] - ring - rw [hexp, Real.rpow_neg Real.pi_pos.le] - have hππ : (1:ℝ) ≤ Real.pi ^ (s.re / 2 : ℝ) := - Real.one_le_rpow (by linarith [Real.pi_gt_three]) (by linarith) - rw [inv_le_one_iff₀] - right - exact hππ - have h2 : ‖Complex.Gamma (s / 2)‖ ≤ 24 := by - have hre2 : (0:ℝ) < (s / 2).re := by - have : (s / 2).re = s.re / 2 := by - rw [Complex.div_ofNat_re] - rw [this] - linarith - calc ‖Complex.Gamma (s / 2)‖ ≤ Real.Gamma ((s / 2).re) := norm_Gamma_le_Gamma_re hre2 - _ ≤ 24 := by - have heq : (s / 2).re = s.re / 2 := by - rw [Complex.div_ofNat_re] - refine Real_Gamma_le_24 ?_ ?_ - · rw [heq] - linarith - · rw [heq] - linarith - calc ‖(Real.pi : ℂ) ^ (-s / 2)‖ * ‖Complex.Gamma (s / 2)‖ ≤ 1 * 24 := by - exact mul_le_mul h1 h2 (norm_nonneg _) (by norm_num) - _ = 24 := by norm_num - have hprod : ‖(s - 1) * riemannZeta s‖ ≤ ‖s - 1‖ * (1/2 + ‖s‖ / s.re) + 1 := by - rw [norm_mul] - have h1 : ‖s - 1‖ * ‖riemannZeta s‖ - ≤ ‖s - 1‖ * (1/2 + 1 / ‖1 - s‖ + ‖s‖ / s.re) := - mul_le_mul_of_nonneg_left hζ (norm_nonneg _) - have h2 : ‖s - 1‖ * (1 / ‖1 - s‖) ≤ 1 := by - rw [norm_sub_rev] - rcases eq_or_ne (‖(1:ℂ) - s‖) 0 with h | h - · rw [h] - norm_num - · rw [mul_one_div, div_le_one (lt_of_le_of_ne (norm_nonneg _) (Ne.symm h))] - nlinarith [norm_nonneg (s - 1), norm_nonneg s, norm_nonneg (riemannZeta s), - div_nonneg (norm_nonneg s) hrepos.le] - calc ‖s * (s - 1) / 2 * completedRiemannZeta s‖ - = ‖s‖ / 2 * (‖Complex.Gammaℝ s‖ * ‖(s - 1) * riemannZeta s‖) := by - rw [hΛ] - rw [show s * (s - 1) / 2 * (Complex.Gammaℝ s * riemannZeta s) - = s / 2 * (Complex.Gammaℝ s * ((s - 1) * riemannZeta s)) by ring] - rw [norm_mul, norm_mul, norm_div] - simp [Complex.norm_ofNat] - _ ≤ ‖s‖ / 2 * (24 * (‖s - 1‖ * (1/2 + ‖s‖ / s.re) + 1)) := by - refine mul_le_mul_of_nonneg_left ?_ (by positivity) - refine mul_le_mul hΓnorm hprod (norm_nonneg _) (by norm_num) - _ = ‖s‖ / 2 * 24 * (‖s - 1‖ * (1/2 + ‖s‖ / s.re) + 1) := by ring - -/-- Numeric ξ-bound on the counting disk: ‖ξ(s)‖ ≤ 32000 for ‖s − 2‖ ≤ 1992/250 (= 7.968). -/ -theorem xi_norm_le_ball {s : ℂ} (hs : ‖s - (2:ℂ)‖ ≤ 1992/250) : ‖xi s‖ ≤ 32000 := by - have hnorm_s : ‖s‖ ≤ 2 + 1992/250 := by - calc ‖s‖ = ‖(s - 2) + 2‖ := by ring_nf - _ ≤ ‖s - (2:ℂ)‖ + ‖(2:ℂ)‖ := norm_add_le _ _ - _ ≤ 1992/250 + 2 := by - have h2 : ‖(2:ℂ)‖ = 2 := by norm_num - linarith [h2 ▸ le_refl (‖(2:ℂ)‖)] - _ = 2 + 1992/250 := by ring - have hre_bounds : -6 ≤ s.re ∧ s.re ≤ 10 := by - have h := Complex.abs_re_le_norm (s - 2) - have hre2 : (s - 2).re = s.re - 2 := by simp - rw [hre2] at h - have := abs_le.mp (h.trans hs) - constructor <;> linarith [this.1, this.2] - rcases le_or_gt (1/2 : ℝ) s.re with hgt | hlt - · -- right branch - rcases eq_or_ne s 1 with rfl | hs1 - · -- ξ(1) = 1/2 - have : xi 1 = 1/2 := by - unfold xi - norm_num - rw [this] - rw [show ‖(1/2 : ℂ)‖ = 1/2 by norm_num] - norm_num - · have h := xi_norm_le_right hgt hs1 hre_bounds.2 - have hs1n : ‖s - 1‖ ≤ 1 + 1992/250 := by - calc ‖s - 1‖ = ‖(s - 2) + 1‖ := by ring_nf - _ ≤ ‖s - (2:ℂ)‖ + ‖(1:ℂ)‖ := norm_add_le _ _ - _ ≤ 1992/250 + 1 := by - have h1 : ‖(1:ℂ)‖ = 1 := by norm_num - linarith [h1 ▸ le_refl (‖(1:ℂ)‖)] - _ = 1 + 1992/250 := by ring - have hdiv : ‖s‖ / s.re ≤ (2 + 1992/250) / (1/2) := by - have h1 : ‖s‖ / s.re ≤ ‖s‖ / (1/2) := by - gcongr - refine h1.trans ?_ - gcongr - refine h.trans ?_ - calc ‖s‖ / 2 * 24 * (‖s - 1‖ * (1/2 + ‖s‖ / s.re) + 1) - ≤ (2 + 1992/250) / 2 * 24 - * ((1 + 1992/250) * (1/2 + (2 + 1992/250) / (1/2)) + 1) := by - gcongr <;> first | assumption | positivity - _ ≤ 32000 := by norm_num - · -- left branch: reflect through the functional equation - rcases eq_or_ne s 0 with rfl | hs0 - · rw [← xi_one_sub 0] - have h1 : (1:ℂ) - 0 = 1 := by norm_num - rw [h1] - have : xi 1 = 1/2 := by - unfold xi - norm_num - rw [this, show ‖(1/2 : ℂ)‖ = 1/2 by norm_num] - norm_num - · rw [← xi_one_sub s] - have hwre : (1/2 : ℝ) ≤ (1 - s).re := by - simp only [Complex.sub_re, Complex.one_re] - linarith - have hwre10 : (1 - s).re ≤ 10 := by - simp only [Complex.sub_re, Complex.one_re] - linarith [hre_bounds.1] - have hw1 : (1 : ℂ) - s ≠ 1 := by - intro h - exact hs0 (by linear_combination -h) - have h := xi_norm_le_right hwre hw1 hwre10 - have hns : ‖s‖ ≤ 2 + 1992/250 := hnorm_s - have hn1s : ‖(1:ℂ) - s‖ ≤ 3 + 1992/250 := by - calc ‖(1:ℂ) - s‖ ≤ ‖(1:ℂ)‖ + ‖s‖ := norm_sub_le _ _ - _ ≤ 1 + (2 + 1992/250) := by - have h1 : ‖(1:ℂ)‖ = 1 := by norm_num - linarith [h1 ▸ le_refl (‖(1:ℂ)‖)] - _ = 3 + 1992/250 := by ring - have hmid : ‖(1:ℂ) - s - 1‖ = ‖s‖ := by - rw [show (1:ℂ) - s - 1 = -s by ring, norm_neg] - have hdivw : ‖(1:ℂ) - s‖ / (1 - s).re ≤ (3 + 1992/250) / (1/2) := by - have h1 : ‖(1:ℂ) - s‖ / (1 - s).re ≤ ‖(1:ℂ) - s‖ / (1/2) := by - gcongr - refine h1.trans ?_ - gcongr - refine h.trans ?_ - rw [hmid] - calc ‖(1:ℂ) - s‖ / 2 * 24 * (‖s‖ * (1/2 + ‖(1:ℂ) - s‖ / (1 - s).re) + 1) - ≤ (3 + 1992/250) / 2 * 24 - * ((2 + 1992/250) * (1/2 + (3 + 1992/250) / (1/2)) + 1) := by - gcongr <;> first | assumption | positivity - _ ≤ 32000 := by norm_num - -set_option maxHeartbeats 1600000 in -/-- **E2(ii): the small-box count.** For |t + 1/2| < 6, N(t, t+1] ≤ 144 (Jensen/Landau disk -for ξ at centre 2, radius 83/10, with the numeric ball bound ‖ξ‖ ≤ 32000 = 62000·‖ξ(2)‖·…). -/ -theorem zeta_local_count_box (t : ℝ) (hc : |t + 1/2| < 6) : - (Zeta23.Ncount t (t + 1) : ℝ) ≤ 144 := by - have hfa : AnalyticOnNhd ℂ xi (Metric.closedBall (2:ℂ) (83/10)) := fun s _ => - xi_differentiable.analyticAt s - have hxi2 : xi 2 ≠ 0 := by - rw [xi_two] - simp only [ne_eq, div_eq_zero_iff] - push Not - constructor - · exact_mod_cast Real.pi_ne_zero - · norm_num - have hxi2norm : ‖xi 2‖ = Real.pi / 6 := by - rw [xi_two] - rw [show ((Real.pi : ℂ) / 6) = ((Real.pi / 6 : ℝ) : ℂ) by push_cast; ring] - rw [Complex.norm_real, Real.norm_eq_abs, abs_of_pos (by positivity)] - have hB2 : (2:ℝ) ≤ 62000 := by norm_num - have hfB : ∀ w ∈ Metric.closedBall (2:ℂ) (24/25 * (83/10)), ‖xi w‖ ≤ 62000 * ‖xi 2‖ := by - intro w hw - rw [Metric.mem_closedBall, Complex.dist_eq] at hw - have hw' : ‖w - (2:ℂ)‖ ≤ 1992/250 := le_trans hw (by norm_num) - calc ‖xi w‖ ≤ 32000 := xi_norm_le_ball hw' - _ ≤ 62000 * (Real.pi / 6) := by nlinarith [Real.pi_gt_d2] - _ = 62000 * ‖xi 2‖ := by rw [hxi2norm] - obtain ⟨Z, hZset, hZcount, -⟩ := Zeta23.WeilEF.logDeriv_partial_fraction_disk - (f := xi) (by norm_num : (0:ℝ) < 83/10) hfa hxi2 hB2 hfB - -- the window sits inside the zero-ball - have hhalfwin : Zeta23.zetaZeroConfig.window t (t + 1) ⊆ (Z : Set ℂ) := by - rintro ρ ⟨hcar, him1, him2⟩ - rw [hZset] - have hnz : Zeta23.IsNontrivialZero ρ := hcar - have hre0 : 0 < ρ.re := hnz.2.1 - have hre1 : ρ.re < 1 := hnz.2.2 - have hΛ0 : completedRiemannZeta ρ = 0 := - (Zeta23.RvM.completedRiemannZeta_eq_zero_iff_of_re_pos hre0).mpr hnz.1 - have hρ0 : ρ ≠ 0 := by - intro h - rw [h] at hre0 - norm_num at hre0 - have hρ1 : ρ ≠ 1 := by - intro h - rw [h] at hre1 - norm_num at hre1 - refine ⟨?_, ?_⟩ - · -- ball membership: |im ρ| ≤ 13/2 and re ∈ (0,1): distance to 2 ≤ sqrt(4 + 42.25) ≤ 7.3 - rw [Metric.mem_closedBall, Complex.dist_eq] - have him : |ρ.im| ≤ 13/2 := by - rw [abs_le] - have h1 := abs_lt.mp hc - constructor <;> linarith - have hnormsq : ‖ρ - (2:ℂ)‖ ^ 2 = (ρ.re - 2) ^ 2 + ρ.im ^ 2 := by - rw [← Complex.normSq_eq_norm_sq, Complex.normSq_apply] - have h1 : (ρ - (2:ℂ)).re = ρ.re - 2 := by simp - have h2 : (ρ - (2:ℂ)).im = ρ.im := by simp - rw [h1, h2] - ring - have hsq : ‖ρ - (2:ℂ)‖ ^ 2 ≤ (22/25 * (83/10)) ^ 2 := by - rw [hnormsq] - have ha := abs_le.mp him - nlinarith - nlinarith [norm_nonneg (ρ - (2:ℂ))] - · -- xi ρ = 0 - rw [xi_eq ρ hρ0 hρ1, hΛ0] - ring - -- orders: ord_xi = zeroMult on the window - have hord : ∀ ρ ∈ Zeta23.zetaZeroConfig.window t (t + 1), - (Zeta23.zetaZeroConfig.mult ρ : ℝ) ≤ (analyticOrderNatAt xi ρ : ℝ) := by - intro ρ hρ - obtain ⟨hcar, -, -⟩ := hρ - have hnz : Zeta23.IsNontrivialZero ρ := hcar - have hre0 : 0 < ρ.re := hnz.2.1 - have hre1 : ρ.re < 1 := hnz.2.2 - have hρ0 : ρ ≠ 0 := fun h => by rw [h] at hre0; norm_num at hre0 - have hρ1 : ρ ≠ 1 := fun h => by rw [h] at hre1; norm_num at hre1 - have hcongr : analyticOrderNatAt xi ρ = analyticOrderNatAt completedRiemannZeta ρ := by - have hopen : IsOpen {s : ℂ | s ≠ 0 ∧ s ≠ 1} := by - refine IsOpen.inter ?_ ?_ - · exact isOpen_ne - · exact isOpen_ne - have hmem : ρ ∈ {s : ℂ | s ≠ 0 ∧ s ≠ 1} := ⟨hρ0, hρ1⟩ - have hev : xi =ᶠ[nhds ρ] (fun s => s * (s - 1) / 2) * completedRiemannZeta := by - refine Filter.eventually_of_mem (hopen.mem_nhds hmem) (fun s hs => ?_) - exact xi_eq s hs.1 hs.2 - have hpre : AnalyticAt ℂ (fun s : ℂ => s * (s - 1) / 2) ρ := by - apply Differentiable.analyticAt - exact (differentiable_id.mul (differentiable_id.sub_const 1)).div_const 2 - have hΛa : AnalyticAt ℂ completedRiemannZeta ρ := - Zeta23.RvM.analyticAt_completedRiemannZeta hρ0 hρ1 - have hpre0 : analyticOrderAt (fun s : ℂ => s * (s - 1) / 2) ρ = 0 := by - rw [hpre.analyticOrderAt_eq_zero] - intro h - have h2 : ρ * (ρ - 1) = 0 := by - field_simp at h - simpa using h - rcases mul_eq_zero.mp h2 with h3 | h3 - · exact hρ0 h3 - · exact hρ1 (by linear_combination h3) - unfold analyticOrderNatAt - rw [analyticOrderAt_congr hev, analyticOrderAt_mul hpre hΛa, hpre0, zero_add] - rw [hcongr, Zeta23.RvM.analyticOrderNatAt_completedRiemannZeta hre0 hρ1] - exact le_refl _ - -- assemble - have hWfin : (Zeta23.zetaZeroConfig.window t (t + 1)).Finite := - Zeta23.zetaZeroConfig.window_finite t (t + 1) - have hNle : (Zeta23.Ncount t (t + 1) : ℝ) = (Zeta23.zetaZeroConfig.N t (t + 1) : ℝ) := by - rw [Zeta23.zetaZeroConfig_N] - rw [hNle] - have hsum : (Zeta23.zetaZeroConfig.N t (t + 1) : ℝ) - ≤ ∑ ρ ∈ Z, (analyticOrderNatAt xi ρ : ℝ) := by - have hN : (Zeta23.zetaZeroConfig.N t (t + 1) : ℝ) - = ∑ ρ ∈ hWfin.toFinset, (Zeta23.zetaZeroConfig.mult ρ : ℝ) := by - have h1 : Zeta23.zetaZeroConfig.N t (t + 1) - = ∑ ρ ∈ hWfin.toFinset, Zeta23.zetaZeroConfig.mult ρ := by - rw [ZeroConfig.N, finsum_mem_eq_finite_toFinset_sum _ hWfin] - rw [h1] - push_cast - rfl - rw [hN] - have hsub2 : hWfin.toFinset ⊆ Z := by - intro ρ hρ - rw [Set.Finite.mem_toFinset] at hρ - exact Finset.mem_coe.mp (hhalfwin hρ) - calc ∑ ρ ∈ hWfin.toFinset, (Zeta23.zetaZeroConfig.mult ρ : ℝ) - ≤ ∑ ρ ∈ hWfin.toFinset, (analyticOrderNatAt xi ρ : ℝ) := by - refine Finset.sum_le_sum (fun ρ hρ => ?_) - rw [Set.Finite.mem_toFinset] at hρ - exact hord ρ hρ - _ ≤ ∑ ρ ∈ Z, (analyticOrderNatAt xi ρ : ℝ) := - Finset.sum_le_sum_of_subset_of_nonneg hsub2 (fun ρ _ _ => by positivity) - refine hsum.trans ?_ - refine hZcount.trans ?_ - -- 12·log 62000 ≤ 144 - have hlp : (0:ℝ) < Real.log ((24/25 : ℝ)/(22/25)) := by - rw [show ((24/25 : ℝ))/(22/25) = 12/11 by norm_num] - exact Real.log_pos (by norm_num) - have hlog1211 : (1:ℝ)/12 ≤ Real.log ((24/25 : ℝ)/(22/25)) := by - rw [show ((24/25 : ℝ))/(22/25) = 12/11 by norm_num] - have h := Real.log_le_sub_one_of_pos (show (0:ℝ) < 11/12 by norm_num) - rw [show (11/12:ℝ) = (12/11)⁻¹ by norm_num, Real.log_inv] at h - linarith - have hlogB : Real.log 62000 ≤ 12 := by - rw [Real.log_le_iff_le_exp (by norm_num)] - have h1 := Real.exp_one_gt_d9 - have h12 : (2.7182818283:ℝ) ^ (12:ℕ) ≤ Real.exp 12 := by - have : Real.exp 12 = (Real.exp 1) ^ (12:ℕ) := by - rw [← Real.exp_nat_mul] - norm_num - rw [this] - gcongr <;> linarith - calc (62000:ℝ) ≤ 2.7182818283 ^ (12:ℕ) := by norm_num - _ ≤ Real.exp 12 := h12 - have hlogBnn : (0:ℝ) ≤ Real.log 62000 := Real.log_nonneg (by norm_num) - calc 1 / Real.log ((24/25 : ℝ)/(22/25)) * Real.log 62000 - ≤ 12 * Real.log 62000 := by - refine mul_le_mul_of_nonneg_right ?_ hlogBnn - rw [div_le_iff₀ hlp] - linarith - _ ≤ 12 * 12 := by linarith - _ = 144 := by norm_num - -/-- **E2 — the fully explicit local zero count**: -N(t, t+1] ≤ 540000000·log(|t|+3) for every t ∈ ℝ, unconditionally. -/ -theorem zeta_local_zero_count_explicit (t : ℝ) : - (Zeta23.Ncount t (t + 1) : ℝ) ≤ 540000000 * Real.log (|t| + 3) := by - rcases le_or_gt 6 (|t + 1/2|) with h | h - · exact zeta_local_count_explicit_large t h - · refine (zeta_local_count_box t h).trans ?_ - have h1 : (1:ℝ) ≤ Real.log (|t| + 3) := by - rw [Real.le_log_iff_exp_le (by linarith [abs_nonneg t])] - have := Real.exp_one_lt_d9 - linarith [abs_nonneg t] - nlinarith - end WeilEF end Zeta23 diff --git a/zeta23/Zeta23/WeilEF/FullLine.lean b/zeta23/Zeta23/WeilEF/FullLine.lean index a2ae92dfd3..9b90298658 100644 --- a/zeta23/Zeta23/WeilEF/FullLine.lean +++ b/zeta23/Zeta23/WeilEF/FullLine.lean @@ -4,13 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/WeilEF/FullLine.lean — the R → ∞ limit of the rectangle identity -(Zeta23.WeilEF.rectangle_identity, proved): along good heights R_j ∈ [j, j+1] the horizontal -sides vanish (‖H‖ ≪_k 1/R², ‖Λ'/Λ‖ ≪ log²j on them, reflecting Λ'/Λ(1−s) = −Λ'/Λ(s) for -re s < 1/2), the vertical sides converge to the full-line integral (dominated convergence; the -left side is folded onto the right by the functional equation and t ↦ −t), and the zero sums -over |γ| < R_j converge to the absolutely convergent tsum (EF_zero_sum_summable). The -resulting statement is consumed by Zeta23/WeilEF/Main.lean. +Zeta23/WeilEF/FullLine.lean — ζ-specific majorants, horizontal nonvanishing, and vertical-side +folding on top of `Zeta23.WeilEF.GenericEF`. -/ import Zeta23.WeilEF.Contour @@ -22,252 +17,78 @@ namespace WeilEF open Complex Topology Filter Set MeasureTheory open scoped ArithmeticFunction -/-! ## Majorant pack -/ +/-! ## ζ and Γℝ vertical-line majorants -/ section Majorants -/-- `H(σ+it)` as a paper Fourier transform at `t + i(1/2 − σ)`. -/ -theorem Hfn_apply (k : ℝ → ℂ) (σ t : ℝ) : - Hfn k ((σ : ℂ) + t * I) = paperFT k ((t : ℂ) + ((1 / 2 - σ : ℝ) : ℂ) * I) := by - unfold Hfn - congr 1 - apply Complex.ext <;> simp - -/-- **Uniform decay of H on the strip −1 ≤ re ≤ 2**: `‖H(σ+it)‖ ≤ C_k/(1+t²)`. -/ -theorem norm_Hfn_le {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) : - ∃ C : ℝ, 0 ≤ C ∧ ∀ σ t : ℝ, -1 ≤ σ → σ ≤ 2 → ‖Hfn k ((σ : ℂ) + t * I)‖ ≤ C / (1 + t ^ 2) := by - obtain ⟨Λ₁, hΛ₁⟩ := Zeta23.EF.exists_abs_le_of_hasCompactSupport hkc - set B : ℝ := max Λ₁ 0 with hB - have hsupp : ∀ u, k u ≠ 0 → |u| ≤ B := fun u hu => (hΛ₁ u hu).trans (le_max_left _ _) - have hB0 : 0 ≤ B := le_max_right _ _ - have hki : Integrable k := hk.continuous.integrable_of_hasCompactSupport hkc - set A : ℝ := Real.exp (3 / 2 * B) * ((∫ u, ‖k u‖) + ∫ u, ‖deriv (deriv k) u‖) with hA - have hI1 : 0 ≤ ∫ u, ‖k u‖ := integral_nonneg fun _ => norm_nonneg _ - have hI2 : 0 ≤ ∫ u, ‖deriv (deriv k) u‖ := integral_nonneg fun _ => norm_nonneg _ - have hA0 : 0 ≤ A := by positivity - refine ⟨2 * A, by positivity, fun σ t hσ1 hσ2 => ?_⟩ - rw [Hfn_apply] - set z : ℂ := (t : ℂ) + ((1 / 2 - σ : ℝ) : ℂ) * I with hz - have hzim : z.im = 1 / 2 - σ := by simp [hz] - have hzre : z.re = t := by simp [hz] - have him : |z.im| ≤ 3 / 2 := by rw [hzim, abs_le]; constructor <;> linarith - have hexp : Real.exp (|z.im| * B) ≤ Real.exp (3 / 2 * B) := - Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_right him hB0) - have hzn : |t| ≤ ‖z‖ := by rw [← hzre]; exact Complex.abs_re_le_norm z - have ht2 : 0 < 1 + t ^ 2 := by positivity - by_cases ht : |t| ≤ 1 - · -- small t: the L¹ bound - have h1 := Zeta23.norm_paperFT_le hki hsupp z - calc ‖paperFT k z‖ ≤ Real.exp (|z.im| * B) * ∫ u, ‖k u‖ := h1 - _ ≤ Real.exp (3 / 2 * B) * ∫ u, ‖k u‖ := by gcongr - _ ≤ A := by rw [hA]; nlinarith [Real.exp_pos (3 / 2 * B)] - _ ≤ 2 * A / (1 + t ^ 2) := by - rw [le_div_iff₀ ht2] - have : t ^ 2 ≤ 1 := by rw [← sq_abs]; nlinarith [abs_nonneg t] - nlinarith - · -- large t: the second-derivative bound - push Not at ht - have hz0 : z ≠ 0 := by - intro h; rw [h] at hzn; simp at hzn; rw [hzn] at ht; simp at ht; linarith - have h2 := Zeta23.norm_paperFT_le_div hk hsupp hz0 - have hzsq : t ^ 2 ≤ ‖z‖ ^ 2 := by rw [← sq_abs]; exact pow_le_pow_left₀ (abs_nonneg _) hzn 2 - have ht1 : 1 ≤ t ^ 2 := by rw [← sq_abs]; nlinarith - calc ‖paperFT k z‖ ≤ Real.exp (|z.im| * B) * (∫ u, ‖deriv (deriv k) u‖) / ‖z‖ ^ 2 := h2 - _ ≤ Real.exp (3 / 2 * B) * (∫ u, ‖deriv (deriv k) u‖) / t ^ 2 := by - gcongr - _ ≤ A / t ^ 2 := by - gcongr; rw [hA]; nlinarith [Real.exp_pos (3 / 2 * B)] - _ ≤ 2 * A / (1 + t ^ 2) := by - rw [div_le_div_iff₀ (by positivity) ht2]; nlinarith - -/-- `H` is continuous along vertical lines (indeed paperFT k is entire). -/ -theorem continuous_Hfn_line {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (σ : ℝ) : - Continuous (fun t : ℝ => Hfn k ((σ : ℂ) + t * I)) := by - have h := (differentiable_paperFT hk.continuous hkc).continuous - unfold Hfn - exact h.comp (by fun_prop) - -/-- **ζ'/ζ is bounded on vertical lines to the right of 1**: -`‖ζ'/ζ(c+it)‖ ≤ Σ Λ(n) n^{−c}`. -/ +/-- **ζ'/ζ is bounded on vertical lines to the right of 1**: `‖ζ'/ζ(c+it)‖ ≤ Σ Λ(n) n^{−c}`. -/ theorem norm_logDeriv_zeta_le_of_one_lt_re {c : ℝ} (hc1 : 1 < c) : ∃ M : ℝ, 0 ≤ M ∧ ∀ t : ℝ, ‖logDeriv riemannZeta ((c : ℂ) + t * I)‖ ≤ M := by have hre : ∀ t : ℝ, ((c : ℂ) + t * I).re = c := fun t => by simp - have hsum : Summable (fun n : ℕ => ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖) := by - have h := ArithmeticFunction.LSeriesSummable_vonMangoldt (s := (c : ℂ)) (by simpa using hc1) - exact summable_norm_iff.mpr h + have hsum : Summable (fun n : ℕ => ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖) := + summable_norm_iff.mpr (ArithmeticFunction.LSeriesSummable_vonMangoldt (s := (c : ℂ)) (by simpa using hc1)) refine ⟨∑' n : ℕ, ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖, tsum_nonneg fun _ => norm_nonneg _, fun t => ?_⟩ - have hre1 : 1 < ((c : ℂ) + t * I).re := by rw [hre]; exact hc1 - have h1 : logDeriv riemannZeta ((c : ℂ) + t * I) - = -LSeries (fun n => (Λ n : ℂ)) ((c : ℂ) + t * I) := by - have h2 := ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hre1 + have h1 : logDeriv riemannZeta ((c : ℂ) + t * I) = -LSeries (fun n => (Λ n : ℂ)) ((c : ℂ) + t * I) := by + have h2 := ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div (by rw [hre t]; exact hc1) rw [logDeriv, Pi.div_apply, h2]; ring have hnorm : ∀ n : ℕ, ‖LSeries.term (fun n => (Λ n : ℂ)) ((c : ℂ) + t * I) n‖ - = ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖ := by - intro n + = ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖ := fun n => by rw [LSeries.norm_term_eq, LSeries.norm_term_eq, hre, Complex.ofReal_re] - have hsum' : Summable (fun n : ℕ => ‖LSeries.term (fun n => (Λ n : ℂ)) ((c : ℂ) + t * I) n‖) := by - simp_rw [hnorm]; exact hsum rw [h1, norm_neg, LSeries] - calc ‖∑' n, LSeries.term (fun n => (Λ n : ℂ)) ((c : ℂ) + t * I) n‖ - ≤ ∑' n, ‖LSeries.term (fun n => (Λ n : ℂ)) ((c : ℂ) + t * I) n‖ := norm_tsum_le_tsum_norm hsum' - _ = ∑' n, ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖ := by simp_rw [hnorm] + exact (norm_tsum_le_tsum_norm (by simp_rw [hnorm]; exact hsum)).trans_eq (by simp_rw [hnorm]) /-- `t ↦ ζ'/ζ(c+it)` is continuous for `c > 1`. -/ theorem continuous_logDeriv_zeta_line {c : ℝ} (hc1 : 1 < c) : Continuous (fun t : ℝ => logDeriv riemannZeta ((c : ℂ) + t * I)) := by - have hline : Continuous (fun t : ℝ => ((c : ℂ) + t * I)) := by fun_prop refine continuous_iff_continuousAt.mpr fun t => ?_ - have hs1 : ((c : ℂ) + t * I) ≠ 1 := by - intro h; have := congrArg Complex.re h; simp at this; linarith - have hre1 : 1 < ((c : ℂ) + t * I).re := by simp; linarith - have hζ : riemannZeta ((c : ℂ) + t * I) ≠ 0 := riemannZeta_ne_zero_of_one_lt_re hre1 + have hs1 : ((c : ℂ) + t * I) ≠ 1 := fun h => by + have := congrArg Complex.re h; simp at this; linarith + have hζ : riemannZeta ((c : ℂ) + t * I) ≠ 0 := riemannZeta_ne_zero_of_one_lt_re (by simp; exact hc1) have han := analyticAt_riemannZeta hs1 - have hd : ContinuousAt (deriv riemannZeta) ((c : ℂ) + t * I) := han.deriv.continuousAt - have hc : ContinuousAt riemannZeta ((c : ℂ) + t * I) := han.continuousAt - have : ContinuousAt (fun s => deriv riemannZeta s / riemannZeta s) ((c : ℂ) + t * I) := - hd.div hc hζ - show ContinuousAt ((fun s => deriv riemannZeta s / riemannZeta s) ∘ (fun t : ℝ => (c : ℂ) + t * I)) t - exact ContinuousAt.comp this hline.continuousAt + exact ContinuousAt.comp (f := fun t : ℝ => (c : ℂ) + t * I) + (han.deriv.continuousAt.div han.continuousAt hζ) (by fun_prop) -/-- generic: a continuous `φ` with `‖φ(t)‖ ≤ C/(1+t²)` times `ζ'/ζ(c+it)` is integrable. -/ +/-- A continuous `φ` with `‖φ(t)‖ ≤ C/(1+t²)` times `ζ'/ζ(c+it)` is integrable. -/ theorem integrable_mul_logDeriv_zeta_of_decay {φ : ℝ → ℂ} (hφc : Continuous φ) {C : ℝ} (hφ : ∀ t, ‖φ t‖ ≤ C / (1 + t ^ 2)) {c : ℝ} (hc1 : 1 < c) : Integrable (fun t : ℝ => φ t * logDeriv riemannZeta ((c : ℂ) + t * I)) := by - obtain ⟨M, hM0, hM⟩ := norm_logDeriv_zeta_le_of_one_lt_re hc1 - have hC0 : 0 ≤ C := by - have := le_trans (norm_nonneg _) (hφ 0); simpa using this - refine Integrable.mono' ((integrable_inv_one_add_sq.const_mul (C * M))) - (hφc.mul (continuous_logDeriv_zeta_line hc1)).aestronglyMeasurable - (Eventually.of_forall fun t => ?_) - rw [norm_mul] - calc ‖φ t‖ * ‖logDeriv riemannZeta ((c : ℂ) + t * I)‖ - ≤ (C / (1 + t ^ 2)) * M := mul_le_mul (hφ t) (hM t) (norm_nonneg _) (by positivity) - _ = C * M * (1 + t ^ 2)⁻¹ := by ring + obtain ⟨_, _, hM⟩ := norm_logDeriv_zeta_le_of_one_lt_re hc1 + exact integrable_decay_mul_bdd hφc (continuous_logDeriv_zeta_line hc1) hφ hM /-- **Integrability of `H(c+it)·ζ'/ζ(c+it)`** on `re = c ∈ (1, 3/2]`. -/ theorem integrable_Hfn_mul_logDeriv_zeta {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3 / 2) : Integrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * logDeriv riemannZeta ((c : ℂ) + t * I)) := by - obtain ⟨C, hC0, hC⟩ := norm_Hfn_le hk hkc + obtain ⟨C, _, hC⟩ := norm_Hfn_le hk hkc exact integrable_mul_logDeriv_zeta_of_decay (continuous_Hfn_line hk hkc c) (fun t => hC c t (by linarith) (by linarith)) hc1 -/-- elementary: `log(2+x) ≤ 5 (1+x²)^{1/4}` for `x ≥ 0`. -/ -theorem log_two_add_le {x : ℝ} (hx : 0 ≤ x) : Real.log (2 + x) ≤ 5 * (1 + x ^ 2) ^ (1 / 4 : ℝ) := by - have h2x : 0 < 2 + x := by linarith - -- log(2+x) ≤ 2 √(2+x) - have h1 : Real.log (2 + x) ≤ 2 * Real.sqrt (2 + x) := by - have hs : 0 < Real.sqrt (2 + x) := Real.sqrt_pos.mpr h2x - have := Real.log_le_sub_one_of_pos hs - rw [Real.log_sqrt h2x.le] at this - linarith - -- √(2+x) ≤ √2 + √x ≤ 3/2 + √x - have h2 : Real.sqrt (2 + x) ≤ 3 / 2 + Real.sqrt x := by - have hsx := Real.sq_sqrt hx - have hs0 := Real.sqrt_nonneg x - calc Real.sqrt (2 + x) ≤ Real.sqrt ((3 / 2 + Real.sqrt x) ^ 2) := - Real.sqrt_le_sqrt (by nlinarith) - _ = 3 / 2 + Real.sqrt x := Real.sqrt_sq (by positivity) - -- √x ≤ (1+x²)^{1/4}, 1 ≤ (1+x²)^{1/4} - have hq0 : 0 ≤ (1 + x ^ 2 : ℝ) := by positivity - have h3 : Real.sqrt x ≤ (1 + x ^ 2) ^ (1 / 4 : ℝ) := by - have e : Real.sqrt x = (x ^ 2) ^ (1 / 4 : ℝ) := by - rw [Real.sqrt_eq_rpow, ← Real.rpow_natCast_mul hx]; norm_num - rw [e] - exact Real.rpow_le_rpow (by positivity) (by linarith) (by norm_num) - have h4 : (1 : ℝ) ≤ (1 + x ^ 2) ^ (1 / 4 : ℝ) := Real.one_le_rpow (by nlinarith) (by norm_num) - linarith - /-- `t ↦ Γℝ'/Γℝ(σ+it)` is continuous for `0 < σ ≤ 3/2`. -/ theorem continuous_logDeriv_Gammaℝ_line {σ : ℝ} (hσ0 : 0 < σ) (hσ2 : σ ≤ 3 / 2) : Continuous (fun t : ℝ => logDeriv Complex.Gammaℝ ((σ : ℂ) + t * I)) := by have hfun : (fun t : ℝ => logDeriv Complex.Gammaℝ ((σ : ℂ) + t * I)) = fun t : ℝ => -((Real.log Real.pi : ℝ) : ℂ) / 2 - + (1 / 2) * Complex.digamma (((σ : ℂ) + t * I) / 2) := by - funext t - exact logDeriv_Gammaℝ (by simp; exact hσ0) + + (1 / 2) * Complex.digamma (((σ : ℂ) + t * I) / 2) := + funext fun t => logDeriv_Gammaℝ (by simp; exact hσ0) rw [hfun] - refine continuous_const.add (continuous_const.mul ?_) - refine continuous_iff_continuousAt.mpr fun t => ?_ + refine continuous_const.add (continuous_const.mul (continuous_iff_continuousAt.mpr fun t => ?_)) have hz : ((σ : ℂ) + t * I) / 2 ∈ Complex.integerComplement := by rintro ⟨n, hn⟩ - have hre := congrArg Complex.re hn - have him := congrArg Complex.im hn - simp at hre him - -- σ/2 ∈ (0, 3/4] is not an integer - have h1 : (0 : ℝ) < n := by rw [hre]; linarith - have h2 : (n : ℝ) < 1 := by rw [hre]; linarith - have : (0 : ℤ) < n := by exact_mod_cast h1 - have : n < (1 : ℤ) := by exact_mod_cast h2 + have hre := congrArg Complex.re hn; simp at hre + have : (0 : ℤ) < n := by exact_mod_cast (show (0 : ℝ) < n by linarith) + have : n < (1 : ℤ) := by exact_mod_cast (show (n : ℝ) < 1 by linarith) omega - show ContinuousAt (Complex.digamma ∘ fun t : ℝ => ((σ : ℂ) + t * I) / 2) t exact ContinuousAt.comp (g := Complex.digamma) (f := fun t : ℝ => ((σ : ℂ) + t * I) / 2) - (Zeta23.Stirling.differentiableAt_digamma hz).continuousAt - (by fun_prop : Continuous fun t : ℝ => ((σ : ℂ) + t * I) / 2).continuousAt + (Zeta23.Stirling.differentiableAt_digamma hz).continuousAt (by fun_prop) -/-- generic: a continuous `φ` with `‖φ(t)‖ ≤ C/(1+t²)` times `Γℝ'/Γℝ(σ+it)`, `1/2 ≤ σ ≤ 3/2`, -is integrable (digamma growth ≪ log(2+|t|) on the strip). -/ +/-- A continuous `φ` with `‖φ(t)‖ ≤ C/(1+t²)` times `Γℝ'/Γℝ(σ+it)` (`1/2 ≤ σ ≤ 3/2`) is integrable. -/ theorem integrable_mul_logDeriv_Gammaℝ_of_decay {φ : ℝ → ℂ} (hφc : Continuous φ) {C : ℝ} (hC0 : 0 ≤ C) (hC : ∀ t, ‖φ t‖ ≤ C / (1 + t ^ 2)) {σ : ℝ} (hσ1 : 1 / 2 ≤ σ) (hσ2 : σ ≤ 3 / 2) : Integrable (fun t : ℝ => φ t * logDeriv Complex.Gammaℝ ((σ : ℂ) + t * I)) := by - obtain ⟨Cψ, hCψ, hψ⟩ := digamma_growth_strip - set a : ℝ := Real.log Real.pi / 2 with ha - set b : ℝ := Cψ / 2 with hb - have ha0 : 0 ≤ a := by rw [ha]; have := Real.log_nonneg (by linarith [Real.pi_gt_three] : (1:ℝ) ≤ Real.pi); linarith - have hb0 : 0 ≤ b := by rw [hb]; linarith - set K : ℝ := C * (a + 5 * b) with hK - -- majorant K (1 + ‖t‖²)^{−3/4} - have hmaj : Integrable (fun t : ℝ => K * ((1 : ℝ) + ‖t‖ ^ 2) ^ (-(3 / 2 : ℝ) / 2)) := - (integrable_rpow_neg_one_add_norm_sq (E := ℝ) (μ := volume) - (by rw [Module.finrank_self]; norm_num)).const_mul K - refine Integrable.mono' hmaj - (hφc.mul (continuous_logDeriv_Gammaℝ_line (by linarith) hσ2)).aestronglyMeasurable - (Eventually.of_forall fun t => ?_) - have hσ0 : 0 < σ := by linarith - have hq : 0 < (1 + t ^ 2 : ℝ) := by positivity - -- ‖Γℝ'/Γℝ(σ+it)‖ ≤ a + b log(2+|t|) ≤ (a + 5b)(1+t²)^{1/4} - have hL : ‖logDeriv Complex.Gammaℝ ((σ : ℂ) + t * I)‖ ≤ (a + 5 * b) * (1 + t ^ 2) ^ (1 / 4 : ℝ) := by - rw [logDeriv_Gammaℝ (by simp; exact hσ0)] - have hw1 : 1 / 4 ≤ (((σ : ℂ) + t * I) / 2).re := by simp; linarith - have hw2 : (((σ : ℂ) + t * I) / 2).re ≤ 1 := by simp; linarith - have hψb := hψ _ hw1 hw2 - have him : |(((σ : ℂ) + t * I) / 2).im| = |t| / 2 := by simp [abs_div] - rw [him] at hψb - have hlog : Real.log (2 + |t| / 2) ≤ 5 * (1 + t ^ 2) ^ (1 / 4 : ℝ) := by - have hlt : Real.log (2 + |t| / 2) ≤ Real.log (2 + |t|) := - Real.log_le_log (x := 2 + |t| / 2) (y := 2 + |t|) (by positivity) (by linarith [abs_nonneg t]) - refine le_trans hlt ?_ - have := log_two_add_le (abs_nonneg t) - rwa [sq_abs] at this - have hone : (1 : ℝ) ≤ (1 + t ^ 2) ^ (1 / 4 : ℝ) := Real.one_le_rpow (by nlinarith) (by norm_num) - calc ‖-((Real.log Real.pi : ℝ) : ℂ) / 2 + 1 / 2 * Complex.digamma (((σ : ℂ) + t * I) / 2)‖ - ≤ ‖-((Real.log Real.pi : ℝ) : ℂ) / 2‖ + ‖(1 / 2 : ℂ) * Complex.digamma (((σ : ℂ) + t * I) / 2)‖ := - norm_add_le _ _ - _ ≤ a + b * Real.log (2 + |t| / 2) := by - apply add_le_add - · rw [norm_div, norm_neg, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (by linarith), - show ‖(2:ℂ)‖ = 2 by norm_num, ha] - · rw [norm_mul, show ‖(1 / 2 : ℂ)‖ = 1 / 2 by norm_num, hb] - nlinarith - _ ≤ a * (1 + t ^ 2) ^ (1 / 4 : ℝ) + b * (5 * (1 + t ^ 2) ^ (1 / 4 : ℝ)) := by - apply add_le_add - · nlinarith - · exact mul_le_mul_of_nonneg_left hlog hb0 - _ = (a + 5 * b) * (1 + t ^ 2) ^ (1 / 4 : ℝ) := by ring - rw [norm_mul] - have hH := hC t - have hpow : (C / (1 + t ^ 2)) * ((a + 5 * b) * (1 + t ^ 2) ^ (1 / 4 : ℝ)) - = K * ((1 : ℝ) + ‖t‖ ^ 2) ^ (-(3 / 2 : ℝ) / 2) := by - rw [Real.norm_eq_abs, sq_abs, hK] - have e : (1 + t ^ 2 : ℝ) ^ (-(3 / 2 : ℝ) / 2) = (1 + t ^ 2) ^ (1 / 4 : ℝ) / (1 + t ^ 2) := by - rw [show (-(3 / 2 : ℝ) / 2) = (1 / 4 : ℝ) - 1 by norm_num, Real.rpow_sub hq, Real.rpow_one] - rw [e] - field_simp - calc ‖φ t‖ * ‖logDeriv Complex.Gammaℝ ((σ : ℂ) + t * I)‖ - ≤ (C / (1 + t ^ 2)) * ((a + 5 * b) * (1 + t ^ 2) ^ (1 / 4 : ℝ)) := - mul_le_mul hH hL (norm_nonneg _) (by positivity) - _ = K * ((1 : ℝ) + ‖t‖ ^ 2) ^ (-(3 / 2 : ℝ) / 2) := hpow + obtain ⟨M, hM0, hM⟩ := norm_logDeriv_Gammaℝ_le + exact integrable_decay_mul_log hφc (continuous_logDeriv_Gammaℝ_line (by linarith) hσ2) + hC0 hC hM0.le (fun t => hM σ t hσ1 hσ2) /-- **Integrability of `H(σ+it)·Γℝ'/Γℝ(σ+it)`** for `1/2 ≤ σ ≤ 3/2`. -/ theorem integrable_Hfn_mul_logDeriv_Gammaℝ {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) @@ -279,146 +100,86 @@ theorem integrable_Hfn_mul_logDeriv_Gammaℝ {k : ℝ → ℂ} (hk : ContDiff end Majorants -/-! ## Good heights (indexed so that no side conditions remain: R_j ∈ [j+7, j+8]) -/ +/-! ## Horizontal nonvanishing & vertical folding for Λ -/ -section Heights - -/-- nonvanishing of Λ on the horizontal sides `im = ±R`, `1−c ≤ re ≤ c`, given ζ ≠ 0 on -`im = ±R`, `1/2 ≤ re ≤ 2` (the left half by the functional equation Λ(1−s) = Λ(s)). -/ +/-- Nonvanishing of Λ on the horizontal sides `im = ±R`, `1−c ≤ re ≤ c`, given `ζ ≠ 0` on +`im = ±R`, `1/2 ≤ re ≤ 2` (the left half by `Λ(1−s) = Λ(s)`). -/ theorem completedZeta_ne_zero_on_horizontals {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3 / 2) {R : ℝ} (hζ : ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → riemannZeta s ≠ 0) : ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 - c ≤ s.re → s.re ≤ c → completedRiemannZeta s ≠ 0 := by - -- the right half first have aux : ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → - completedRiemannZeta s ≠ 0 := by - intro s him h1 h2 h0 + completedRiemannZeta s ≠ 0 := fun s him h1 h2 h0 => by rcases lt_or_ge s.re 1 with hlt | hge - · have hnt := ((completedZeta_zeros_strip (by linarith) hlt).1).mp h0 - exact hζ s him h1 h2 hnt.1 + · exact hζ s him h1 h2 (((completedZeta_zeros_strip (by linarith) hlt).1).mp h0).1 · exact Zeta23.RvM.completedRiemannZeta_ne_zero_of_one_le_re hge h0 intro s him h1 h2 rcases le_or_gt (1 / 2 : ℝ) s.re with hre | hre · exact aux s him hre (by linarith) - · -- reflect: Λ s = Λ (1 − s) - have e : completedRiemannZeta s = completedRiemannZeta (1 - s) := - (completedRiemannZeta_one_sub s).symm - rw [e] - apply aux (1 - s) - · rcases him with h | h - · right; simp [h] - · left; simp [h] - · simp; linarith - · simp; linarith - -end Heights - -/-! ## The vertical sides -/ + · rw [← completedRiemannZeta_one_sub s] + exact aux (1 - s) (him.elim (fun h => Or.inr (by simp [h])) (fun h => Or.inl (by simp [h]))) + (by simp; linarith) (by simp; linarith) section Verticals variable {k : ℝ → ℂ} -/-- the full-line integrand `F(t) := [H(c+it) + H(1−c−it)]·Λ'/Λ(c+it)`. -/ +/-- The full-line integrand `F(t) := [H(c+it) + H(1−c−it)]·Λ'/Λ(c+it)`. -/ def Fline (k : ℝ → ℂ) (c : ℝ) (t : ℝ) : ℂ := (Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) * logDeriv completedRiemannZeta ((c : ℂ) + t * I) -theorem one_sub_cast (c t : ℝ) : (1 : ℂ) - c - t * I = ((1 - c : ℝ) : ℂ) + ((-t : ℝ) : ℂ) * I := by - push_cast; ring - -/-- continuity of the reflected weight `t ↦ H(1 − c − it)` (= `H((1−c) + i(−t))`). -/ -theorem continuous_Hfn_reflect {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (c : ℝ) : - Continuous (fun t : ℝ => Hfn k (1 - c - t * I)) := by - have : (fun t : ℝ => Hfn k (1 - c - t * I)) - = (fun t : ℝ => Hfn k (((1 - c : ℝ) : ℂ) + t * I)) ∘ fun t : ℝ => -t := by - funext t; simp only [Function.comp_apply, one_sub_cast] - rw [this]; exact (continuous_Hfn_line hk hkc (1 - c)).comp continuous_neg - -/-- on `re = c > 1`: `Λ'/Λ = Γℝ'/Γℝ + ζ'/ζ`. -/ +/-- On `re = c > 1`: `Λ'/Λ = Γℝ'/Γℝ + ζ'/ζ`. -/ theorem logDeriv_completedZeta_line {c : ℝ} (hc1 : 1 < c) (t : ℝ) : logDeriv completedRiemannZeta ((c : ℂ) + t * I) - = logDeriv Complex.Gammaℝ ((c : ℂ) + t * I) + logDeriv riemannZeta ((c : ℂ) + t * I) := by - have hre : ((c : ℂ) + t * I).re = c := by simp - refine logDeriv_completedZeta _ ?_ ?_ (by rw [hre]; linarith) - · intro h; have := congrArg Complex.re h; simp at this; linarith - · exact riemannZeta_ne_zero_of_one_lt_re (by rw [hre]; exact hc1) + = logDeriv Complex.Gammaℝ ((c : ℂ) + t * I) + logDeriv riemannZeta ((c : ℂ) + t * I) := + logDeriv_completedZeta _ + (fun h => by have := congrArg Complex.re h; simp at this; linarith) + (riemannZeta_ne_zero_of_one_lt_re (by simp; exact hc1)) (by simp; linarith) /-- **Integrability of the full-line integrand.** -/ theorem integrable_Fline (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3 / 2) : Integrable (Fline k c) := by obtain ⟨C, hC0, hC⟩ := norm_Hfn_le hk hkc - set φ : ℝ → ℂ := fun t => Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I) with hφ + set φ : ℝ → ℂ := fun t => Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I) have hφc : Continuous φ := (continuous_Hfn_line hk hkc c).add (continuous_Hfn_reflect hk hkc c) - have hφb : ∀ t, ‖φ t‖ ≤ (2 * C) / (1 + t ^ 2) := by - intro t + have hφb : ∀ t, ‖φ t‖ ≤ (2 * C) / (1 + t ^ 2) := fun t => by have h1 := hC c t (by linarith) (by linarith) have h2 := hC (1 - c) (-t) (by linarith) (by linarith) - rw [← one_sub_cast] at h2 - rw [neg_sq] at h2 + rw [← one_sub_cast, neg_sq] at h2 calc ‖φ t‖ ≤ ‖Hfn k ((c : ℂ) + t * I)‖ + ‖Hfn k (1 - c - t * I)‖ := norm_add_le _ _ _ ≤ C / (1 + t ^ 2) + C / (1 + t ^ 2) := add_le_add h1 h2 _ = (2 * C) / (1 + t ^ 2) := by ring have hΓ := integrable_mul_logDeriv_Gammaℝ_of_decay hφc (by positivity) hφb (by linarith : (1:ℝ) / 2 ≤ c) hc2 have hζ := integrable_mul_logDeriv_zeta_of_decay hφc hφb hc1 - refine (hΓ.add hζ).congr (Eventually.of_forall fun t => ?_) - simp only [Fline, hφ, logDeriv_completedZeta_line hc1 t, Pi.add_apply] - ring + exact (hΓ.add hζ).congr (Eventually.of_forall fun t => by + simp only [Fline, φ, logDeriv_completedZeta_line hc1 t, Pi.add_apply]; ring) -/-- Folding the left vertical side onto the right one: for every `R`, -`V_f(c; −R, R) − V_f(1−c; −R, R) = I • ∫_{−R}^{R} F`, `f := H·Λ'/Λ`. -/ +/-- Folding the left vertical side onto the right one for `H·Λ'/Λ`. -/ theorem verticals_eq (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3 / 2) (R : ℝ) : VIntegral (fun s => Hfn k s * logDeriv completedRiemannZeta s) c (-R) R - VIntegral (fun s => Hfn k s * logDeriv completedRiemannZeta s) (1 - c) (-R) R = I • ∫ t in (-R)..R, Fline k c t := by - - set L := logDeriv completedRiemannZeta with hL - have hLc : Continuous (fun t : ℝ => L ((c : ℂ) + t * I)) := by - have : (fun t : ℝ => L ((c:ℂ) + t * I)) = fun t : ℝ => logDeriv Complex.Gammaℝ ((c : ℂ) + t * I) - + logDeriv riemannZeta ((c : ℂ) + t * I) := funext (logDeriv_completedZeta_line hc1) - rw [this] + have hLc : Continuous (fun t : ℝ => logDeriv completedRiemannZeta ((c : ℂ) + t * I)) := by + rw [show (fun t : ℝ => logDeriv completedRiemannZeta ((c:ℂ) + t * I)) = + fun t : ℝ => logDeriv Complex.Gammaℝ ((c : ℂ) + t * I) + + logDeriv riemannZeta ((c : ℂ) + t * I) from funext (logDeriv_completedZeta_line hc1)] exact (continuous_logDeriv_Gammaℝ_line (by linarith) hc2).add (continuous_logDeriv_zeta_line hc1) - have hHc := continuous_Hfn_line hk hkc c - have hH2 : Continuous (fun t : ℝ => Hfn k (1 - c - t * I)) := continuous_Hfn_reflect hk hkc c - -- the left-line integrand, pointwise - have hleft : ∀ y : ℝ, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * L (((1 - c : ℝ) : ℂ) + y * I) - = -(Hfn k (1 - c - ((-y : ℝ) : ℂ) * I) * L ((c : ℂ) + ((-y : ℝ) : ℂ) * I)) := by - intro y + have h := verticals_fold_of hk hkc hLc hLc (fun y => by have hs : ((1 - c : ℝ) : ℂ) + y * I = 1 - ((c : ℂ) + ((-y : ℝ) : ℂ) * I) := by push_cast; ring - have h0 : (c : ℂ) + ((-y:ℝ):ℂ) * I ≠ 0 := by - intro h; have := congrArg Complex.re h; simp at this; linarith - have h1 : (c : ℂ) + ((-y:ℝ):ℂ) * I ≠ 1 := by - intro h; have := congrArg Complex.re h; simp at this; linarith - rw [hs, hL, logDeriv_completedZeta_one_sub _ h0 h1] - have : (1:ℂ) - ((c : ℂ) + ((-y:ℝ):ℂ) * I) = 1 - c - ((-y : ℝ) : ℂ) * I := by ring - rw [this]; ring - have hI1 : IntervalIntegrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * L ((c : ℂ) + t * I)) - volume (-R) R := (hHc.mul hLc).intervalIntegrable _ _ - have hI2 : IntervalIntegrable (fun t : ℝ => Hfn k (1 - c - t * I) * L ((c : ℂ) + t * I)) - volume (-R) R := (hH2.mul hLc).intervalIntegrable _ _ - have hfold : (∫ y in (-R)..R, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * L (((1 - c : ℝ) : ℂ) + y * I)) - = -∫ t in (-R)..R, Hfn k (1 - c - t * I) * L ((c : ℂ) + t * I) := by - simp_rw [hleft] - rw [intervalIntegral.integral_neg] - have h := intervalIntegral.integral_comp_neg (a := -R) (b := R) - (fun t : ℝ => Hfn k (1 - c - t * I) * L ((c : ℂ) + t * I)) - simp only [neg_neg] at h - rw [← h] - dsimp only [VIntegral] - rw [hfold, ← smul_sub, sub_neg_eq_add, ← intervalIntegral.integral_add hI1 hI2] - congr 1 - refine intervalIntegral.integral_congr fun t _ => ?_ - simp only [Fline] - ring - -/-- the truncated integrals converge to the full-line integral along any `R_j → ∞`. -/ + have h0 : (c : ℂ) + ((-y:ℝ):ℂ) * I ≠ 0 := fun h => by + have := congrArg Complex.re h; simp at this; linarith + have h1 : (c : ℂ) + ((-y:ℝ):ℂ) * I ≠ 1 := fun h => by + have := congrArg Complex.re h; simp at this; linarith + rw [hs, logDeriv_completedZeta_one_sub _ h0 h1]) R + rw [h]; congr 1 + exact intervalIntegral.integral_congr fun t _ => by simp only [Fline]; ring + +/-- The truncated integrals converge to the full-line integral along any `R_j ≥ j`. -/ theorem tendsto_interval_Fline (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3 / 2) {R : ℕ → ℝ} (hR : ∀ j : ℕ, (j : ℝ) ≤ R j) : - Tendsto (fun j : ℕ => ∫ t in (-R j)..R j, Fline k c t) atTop (𝓝 (∫ t, Fline k c t)) := by - have hRtop : Tendsto R atTop atTop := - tendsto_atTop_mono hR tendsto_natCast_atTop_atTop - exact intervalIntegral_tendsto_integral (integrable_Fline hk hkc hc1 hc2) - (tendsto_neg_atTop_atBot.comp hRtop) hRtop + Tendsto (fun j : ℕ => ∫ t in (-R j)..R j, Fline k c t) atTop (𝓝 (∫ t, Fline k c t)) := + tendsto_intervalIntegral_of_integrable (integrable_Fline hk hkc hc1 hc2) hR end Verticals diff --git a/zeta23/Zeta23/WeilEF/FullLineAssembly.lean b/zeta23/Zeta23/WeilEF/FullLineAssembly.lean index a6f27d0578..486dab4e7d 100644 --- a/zeta23/Zeta23/WeilEF/FullLineAssembly.lean +++ b/zeta23/Zeta23/WeilEF/FullLineAssembly.lean @@ -4,11 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/WeilEF/FullLineAssembly.lean — the R → ∞ assembly of -`full_line_identity` from: rectangle_identity (Contour), the majorant pack + heights + -vertical limits (FullLine), horizontal_vanish (Horizontal), zero_sum_limit (ZeroSumLimit). +Zeta23/WeilEF/FullLineAssembly.lean — R → ∞ assembly of `full_line_identity` via +`Zeta23.WeilEF.full_line_limit_of`. -/ -import Zeta23.WeilEF.FullLine import Zeta23.WeilEF.Horizontal import Zeta23.WeilEF.ZeroSumLimit @@ -19,23 +17,7 @@ namespace WeilEF open Complex Topology Filter Set MeasureTheory -/-- corners of the rectangle: real and imaginary parts. -/ -theorem corner_re_im (c R : ℝ) : - ((((1 - c : ℝ) : ℂ) - R * I).re = 1 - c) ∧ ((((1 - c : ℝ) : ℂ) - R * I).im = -R) ∧ - ((((c : ℝ) : ℂ) + R * I).re = c) ∧ ((((c : ℝ) : ℂ) + R * I).im = R) := by - refine ⟨?_, ?_, ?_, ?_⟩ <;> simp - -/-- `(1/(2πi))·(i·X) = (1/2π)·X`. -/ -theorem inv_two_pi_I_mul_I (X : ℂ) : - (1 / (2 * Real.pi * I) : ℂ) * (I * X) = (1 / (2 * Real.pi) : ℂ) * X := by - have hI : (I : ℂ) ≠ 0 := I_ne_zero - have hπ : (Real.pi : ℂ) ≠ 0 := ofReal_ne_zero.mpr Real.pi_pos.ne' - field_simp - -/-- **Full-line identity** (R → ∞ along good heights; horizontal pieces vanish by -good_heights + digamma growth + the 1/R² decay of H): -(1/2π)∫ [H(c+it) + H(1−c−it)]·Λ'/Λ(c+it) dt = Σ_ρ m_ρ H(ρ) − H(0) − H(1), -with the zero-side sum the (absolutely convergent) tsum over the carrier. -/ +/-- **Full-line identity** (R → ∞ along good heights). -/ theorem full_line_identity (hs : ZetaSeam) {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3/2) : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, (Hfn k ((c:ℂ) + t * I) + Hfn k (1 - c - t * I)) @@ -43,50 +25,18 @@ theorem full_line_identity (hs : ZetaSeam) {k : ℝ → ℂ} (hk : ContDiff ℝ = (∑' ρ : (zetaZeros hs).carrier, ((zetaZeros hs).mult ρ : ℂ) * Hfn k ρ) - Hfn k 0 - Hfn k 1 := by obtain ⟨Cg, hCg, R, hR⟩ := good_heights - set f : ℂ → ℂ := fun s => Hfn k s * logDeriv completedRiemannZeta s with hf - -- the rectangle identity at every height R_j have hrect : ∀ j : ℕ, ∃ Z : Finset ℂ, ((Z : Set ℂ) = {ρ : ℂ | IsNontrivialZero ρ ∧ -R j < ρ.im ∧ ρ.im < R j}) ∧ - RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) - = (∑ ρ ∈ Z, (zeroMult ρ : ℂ) * Hfn k ρ) - Hfn k 0 - Hfn k 1 := by - intro j - obtain ⟨h1, h2, h3⟩ := hR j - exact rectangle_identity hk hkc hc1 hc2 (R := R j) (by linarith) - (completedZeta_ne_zero_on_horizontals hc1 hc2 (fun s him hr1 hr2 => (h3 s him hr1 hr2).1)) + RectangleIntegral' (fun s => Hfn k s * logDeriv completedRiemannZeta s) + (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) + = (∑ ρ ∈ Z, (zeroMult ρ : ℂ) * Hfn k ρ) - Hfn k 0 - Hfn k 1 := fun j => + rectangle_identity hk hkc hc1 hc2 (R := R j) (by linarith [(hR j).1]) + (completedZeta_ne_zero_on_horizontals hc1 hc2 (fun s him hr1 hr2 => ((hR j).2.2 s him hr1 hr2).1)) choose Z hZ hE using hrect - -- the three limits obtain ⟨hHtop, hHbot⟩ := horizontal_vanish hk hkc hc1 hc2 hCg hR - have hZlim := zero_sum_limit hs hk hkc (R := R) (fun j => ⟨(hR j).1, (hR j).2.1⟩) hZ - have hV := tendsto_interval_Fline hk hkc hc1 hc2 (R := R) (fun j => by linarith [(hR j).1]) - -- decomposition of the normalized rectangle integral - have hdec : ∀ j : ℕ, RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) - = (1 / (2 * Real.pi * I) : ℂ) * (HIntegral f (1 - c) c (-(R j)) - HIntegral f (1 - c) c (R j)) - + (1 / (2 * Real.pi) : ℂ) * ∫ t in (-R j)..R j, Fline k c t := by - intro j - obtain ⟨e1, e2, e3, e4⟩ := corner_re_im c (R j) - rw [RectangleIntegral', RectangleIntegral, smul_eq_mul, e1, e2, e3, e4] - have hv := verticals_eq hk hkc hc1 hc2 (R j) - rw [hf] - rw [show ∀ A B V₁ V₂ : ℂ, A - B + V₁ - V₂ = (A - B) + (V₁ - V₂) from fun _ _ _ _ => by ring, hv, - smul_eq_mul, mul_add, inv_two_pi_I_mul_I] - -- LHS → (1/2π) ∫ F - have hL : Tendsto (fun j : ℕ => RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I)) - atTop (𝓝 ((1 / (2 * Real.pi) : ℂ) * ∫ t, Fline k c t)) := by - have h := ((hHbot.sub hHtop).const_mul (1 / (2 * Real.pi * I) : ℂ)).add - (hV.const_mul (1 / (2 * Real.pi) : ℂ)) - simp only [sub_zero, mul_zero, zero_add] at h - refine h.congr fun j => ?_ - rw [hdec j] - -- RHS → Σ' − H0 − H1 - have hRt : Tendsto (fun j : ℕ => (∑ ρ ∈ Z j, (zeroMult ρ : ℂ) * Hfn k ρ) - Hfn k 0 - Hfn k 1) - atTop (𝓝 ((∑' ρ : (zetaZeros hs).carrier, ((zetaZeros hs).mult ρ : ℂ) * Hfn k ρ) - - Hfn k 0 - Hfn k 1)) := - (hZlim.sub_const _).sub_const _ - have hL' : Tendsto (fun j : ℕ => (∑ ρ ∈ Z j, (zeroMult ρ : ℂ) * Hfn k ρ) - Hfn k 0 - Hfn k 1) - atTop (𝓝 ((1 / (2 * Real.pi) : ℂ) * ∫ t, Fline k c t)) := - hL.congr fun j => hE j - have := tendsto_nhds_unique hL' hRt - exact this + exact full_line_limit_of hE (fun j => verticals_eq hk hkc hc1 hc2 (R j)) hHtop hHbot + (tendsto_interval_Fline hk hkc hc1 hc2 (fun j => by linarith [(hR j).1])) + (((zero_sum_limit hs hk hkc (fun j => ⟨(hR j).1, (hR j).2.1⟩) hZ).sub_const _).sub_const _) end WeilEF end Zeta23 diff --git a/zeta23/Zeta23/WeilEF/GenericEF.lean b/zeta23/Zeta23/WeilEF/GenericEF.lean new file mode 100644 index 0000000000..f94975ef91 --- /dev/null +++ b/zeta23/Zeta23/WeilEF/GenericEF.lean @@ -0,0 +1,421 @@ +/- +Copyright (c) 2026 Anthropic, PBC. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +SPDX-License-Identifier: Apache-2.0 +-/ +/- +Zeta23/WeilEF/GenericEF.lean — Shared contour & full-line engine for explicit formulas. + +Unifies: + * `Zeta23/WeilEF/{Contour,Horizontal,FullLine,FullLineAssembly}.lean` (ζ, poles `{0, 1}`), + * `Zeta23/ThmE/{ContourChi,HorizontalChi,FullLineChiProof,FullLineChiFold,FullLineChiAssembly}.lean` + (primitive χ, poles `∅`, dual character on left vertical), + * `Zeta23/XiPrime/ExplicitFormula/{Contour,FullLine}.lean` (entire `f`, poles `∅`). +-/ +import Zeta23.WeilEF.VerticalLine +import Zeta23.RvM.CountByIntegral + +noncomputable section + +namespace Zeta23 +namespace WeilEF + +open Complex Topology Filter Set MeasureTheory + +/-! ## §1. Hfn majorants and generic integrability -/ + +/-- `H(σ+it)` as a paper Fourier transform at `t + i(1/2 − σ)`. -/ +theorem Hfn_apply (k : ℝ → ℂ) (σ t : ℝ) : + Hfn k ((σ : ℂ) + t * I) = paperFT k ((t : ℂ) + ((1 / 2 - σ : ℝ) : ℂ) * I) := by + unfold Hfn; congr 1; apply Complex.ext <;> simp + +/-- **Uniform decay of H on the strip `−1 ≤ re ≤ 2`**: `‖H(σ+it)‖ ≤ C_k/(1+t²)`. -/ +theorem norm_Hfn_le {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ σ t : ℝ, -1 ≤ σ → σ ≤ 2 → ‖Hfn k ((σ : ℂ) + t * I)‖ ≤ C / (1 + t ^ 2) := by + obtain ⟨Λ₁, hΛ₁⟩ := Zeta23.EF.exists_abs_le_of_hasCompactSupport hkc + set B : ℝ := max Λ₁ 0 + have hsupp : ∀ u, k u ≠ 0 → |u| ≤ B := fun u hu => (hΛ₁ u hu).trans (le_max_left _ _) + have hB0 : 0 ≤ B := le_max_right _ _ + have hki : Integrable k := hk.continuous.integrable_of_hasCompactSupport hkc + set A : ℝ := Real.exp (3 / 2 * B) * ((∫ u, ‖k u‖) + ∫ u, ‖deriv (deriv k) u‖) + have hI1 : 0 ≤ ∫ u, ‖k u‖ := integral_nonneg fun _ => norm_nonneg _ + have hI2 : 0 ≤ ∫ u, ‖deriv (deriv k) u‖ := integral_nonneg fun _ => norm_nonneg _ + have hA0 : 0 ≤ A := by positivity + refine ⟨2 * A, by positivity, fun σ t hσ1 hσ2 => ?_⟩ + rw [Hfn_apply] + set z : ℂ := (t : ℂ) + ((1 / 2 - σ : ℝ) : ℂ) * I + have him : |z.im| ≤ 3 / 2 := by simp only [z, add_im, ofReal_im, mul_im, ofReal_re, I_re, I_im, + mul_zero, mul_one, zero_add, add_zero, abs_le]; constructor <;> linarith + have hexp : Real.exp (|z.im| * B) ≤ Real.exp (3 / 2 * B) := + Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_right him hB0) + have hzn : |t| ≤ ‖z‖ := by + have hzre : z.re = t := by simp [z] + rw [← hzre]; exact Complex.abs_re_le_norm z + have ht2 : 0 < 1 + t ^ 2 := by positivity + by_cases ht : |t| ≤ 1 + · have h1 := Zeta23.norm_paperFT_le hki hsupp z + calc ‖paperFT k z‖ ≤ Real.exp (|z.im| * B) * ∫ u, ‖k u‖ := h1 + _ ≤ Real.exp (3 / 2 * B) * ∫ u, ‖k u‖ := by gcongr + _ ≤ A := by dsimp [A]; nlinarith [Real.exp_pos (3 / 2 * B)] + _ ≤ 2 * A / (1 + t ^ 2) := by + rw [le_div_iff₀ ht2] + have : t ^ 2 ≤ 1 := by rw [← sq_abs]; nlinarith [abs_nonneg t] + nlinarith + · push Not at ht + have hz0 : z ≠ 0 := fun h => by rw [h, norm_zero] at hzn; linarith + have h2 := Zeta23.norm_paperFT_le_div hk hsupp hz0 + have hzsq : t ^ 2 ≤ ‖z‖ ^ 2 := by rw [← sq_abs]; exact pow_le_pow_left₀ (abs_nonneg _) hzn 2 + have ht1 : 1 ≤ t ^ 2 := by rw [← sq_abs]; nlinarith + calc ‖paperFT k z‖ ≤ Real.exp (|z.im| * B) * (∫ u, ‖deriv (deriv k) u‖) / ‖z‖ ^ 2 := h2 + _ ≤ Real.exp (3 / 2 * B) * (∫ u, ‖deriv (deriv k) u‖) / t ^ 2 := by gcongr + _ ≤ A / t ^ 2 := by gcongr; dsimp [A]; nlinarith [Real.exp_pos (3 / 2 * B)] + _ ≤ 2 * A / (1 + t ^ 2) := by rw [div_le_div_iff₀ (by positivity) ht2]; nlinarith + +/-- `H` is continuous along vertical lines. -/ +theorem continuous_Hfn_line {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (σ : ℝ) : + Continuous (fun t : ℝ => Hfn k ((σ : ℂ) + t * I)) := + (differentiable_Hfn hk hkc).continuous.comp (by fun_prop) + +theorem one_sub_cast (c t : ℝ) : (1 : ℂ) - c - t * I = ((1 - c : ℝ) : ℂ) + ((-t : ℝ) : ℂ) * I := by + push_cast; ring + +/-- Continuity of the reflected weight `t ↦ H(1 − c − it)`. -/ +theorem continuous_Hfn_reflect {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (c : ℝ) : + Continuous (fun t : ℝ => Hfn k (1 - c - t * I)) := by + have : (fun t : ℝ => Hfn k (1 - c - t * I)) + = (fun t : ℝ => Hfn k (((1 - c : ℝ) : ℂ) + t * I)) ∘ fun t : ℝ => -t := by + funext t; simp only [Function.comp_apply, one_sub_cast] + rw [this]; exact (continuous_Hfn_line hk hkc (1 - c)).comp continuous_neg + +/-- Elementary: `log(2+x) ≤ 5 (1+x²)^{1/4}` for `x ≥ 0`. -/ +theorem log_two_add_le {x : ℝ} (hx : 0 ≤ x) : Real.log (2 + x) ≤ 5 * (1 + x ^ 2) ^ (1 / 4 : ℝ) := by + have h1 : Real.log (2 + x) ≤ 2 * Real.sqrt (2 + x) := by + have := Real.log_le_rpow_div (show (0:ℝ) ≤ 2 + x by linarith) (show (0:ℝ) < 1 / 2 by norm_num) + rw [Real.sqrt_eq_rpow]; linarith + have h2 : Real.sqrt (2 + x) ≤ (5 / 2) * (1 + x ^ 2) ^ (1 / 4 : ℝ) := by + have h4 : (2 + x) ^ 2 ≤ (5 / 2) ^ 4 * (1 + x ^ 2) := by + have : 0 ≤ 3 * (x - 1) ^ 2 + 30 * x ^ 2 := by positivity + nlinarith + have hr : ((5 / 2) * (1 + x ^ 2) ^ (1 / 4 : ℝ)) ^ 2 = (5 / 2) ^ 2 * Real.sqrt (1 + x ^ 2) := by + rw [mul_pow, Real.sqrt_eq_rpow, show ((1 + x ^ 2) ^ (1 / 4 : ℝ)) ^ (2 : ℕ) + = ((1 + x ^ 2) ^ (1 / 4 : ℝ)) ^ (2 : ℝ) from (Real.rpow_natCast _ 2).symm, + ← Real.rpow_mul (by positivity)] + norm_num + have hsq : 2 + x ≤ (5 / 2) ^ 2 * Real.sqrt (1 + x ^ 2) := by + have := Real.sqrt_le_sqrt h4 + rw [Real.sqrt_sq (by linarith), Real.sqrt_mul (by positivity), + show (5 / 2 : ℝ) ^ 4 = ((5 / 2) ^ 2) ^ 2 by ring, Real.sqrt_sq (by positivity)] at this + exact this + have := Real.sqrt_le_sqrt hsq + rwa [← hr, Real.sqrt_sq (by positivity)] at this + linarith + +/-- Generic integrability: `(continuous, ≤ C/(1+t²)) × (continuous, ≤ M)` is integrable on ℝ. -/ +theorem integrable_decay_mul_bdd {φ ψ : ℝ → ℂ} (hφc : Continuous φ) (hψc : Continuous ψ) + {C : ℝ} (hφ : ∀ t, ‖φ t‖ ≤ C / (1 + t ^ 2)) {M : ℝ} (hψ : ∀ t, ‖ψ t‖ ≤ M) : + Integrable (fun t => φ t * ψ t) := by + have hC0 : 0 ≤ C := by have := le_trans (norm_nonneg _) (hφ 0); simpa using this + have hM0 : 0 ≤ M := le_trans (norm_nonneg _) (hψ 0) + refine Integrable.mono' (integrable_inv_one_add_sq.const_mul (C * M)) + (hφc.mul hψc).aestronglyMeasurable (Eventually.of_forall fun t => ?_) + rw [norm_mul] + calc ‖φ t‖ * ‖ψ t‖ ≤ (C / (1 + t ^ 2)) * M := mul_le_mul (hφ t) (hψ t) (norm_nonneg _) (by positivity) + _ = C * M * (1 + t ^ 2)⁻¹ := by ring + +/-- Generic integrability: `(continuous, ≤ C/(1+t²)) × (continuous, ≤ M log(2+|t|))` is integrable. -/ +theorem integrable_decay_mul_log {φ ψ : ℝ → ℂ} (hφc : Continuous φ) (hψc : Continuous ψ) + {C : ℝ} (hC0 : 0 ≤ C) (hφ : ∀ t, ‖φ t‖ ≤ C / (1 + t ^ 2)) + {M : ℝ} (hM0 : 0 ≤ M) (hψ : ∀ t, ‖ψ t‖ ≤ M * Real.log (2 + |t|)) : + Integrable (fun t => φ t * ψ t) := by + set K : ℝ := C * (5 * M) + have hmaj : Integrable (fun t : ℝ => K * ((1 : ℝ) + ‖t‖ ^ 2) ^ (-(3 / 2 : ℝ) / 2)) := + (integrable_rpow_neg_one_add_norm_sq (E := ℝ) (μ := volume) + (by rw [Module.finrank_self]; norm_num)).const_mul K + refine Integrable.mono' hmaj (hφc.mul hψc).aestronglyMeasurable (Eventually.of_forall fun t => ?_) + have hq : 0 < (1 + t ^ 2 : ℝ) := by positivity + have hlog : Real.log (2 + |t|) ≤ 5 * (1 + t ^ 2) ^ (1 / 4 : ℝ) := by + have := log_two_add_le (abs_nonneg t); rwa [sq_abs] at this + have e : (1 + t ^ 2 : ℝ) ^ (-(3 / 2 : ℝ) / 2) = (1 + t ^ 2) ^ (1 / 4 : ℝ) / (1 + t ^ 2) := by + rw [show (-(3 / 2 : ℝ) / 2) = (1 / 4 : ℝ) - 1 by norm_num, Real.rpow_sub hq, Real.rpow_one] + rw [norm_mul, Real.norm_eq_abs, sq_abs, e] + calc ‖φ t‖ * ‖ψ t‖ ≤ (C / (1 + t ^ 2)) * (M * (5 * (1 + t ^ 2) ^ (1 / 4 : ℝ))) := + mul_le_mul (hφ t) ((hψ t).trans (mul_le_mul_of_nonneg_left hlog hM0)) (norm_nonneg _) + (by positivity) + _ = K * ((1 + t ^ 2) ^ (1 / 4 : ℝ) / (1 + t ^ 2)) := by dsimp [K]; ring + +/-! ## §2. Generic rectangle identity (with optional poles) -/ + +/-- **Generic rectangle identity with optional poles `P`**: +`(1/2πi) ∮_{[1−c, c] × [−R, R]} g · f'/f = ∑_{ρ ∈ Z} ord_ρ(f)·g(ρ) − ∑_{p ∈ P} m(p)·g(p)`. -/ +theorem rectangle_identity_of {f g : ℂ → ℂ} {c R : ℝ} (hc : 1 - c < c) (hR : 0 ≤ R) + {Zset : Set ℂ} {P : Finset ℂ} (m : ℂ → ℕ) + (hPint : ∀ p ∈ P, 1 - c < p.re ∧ p.re < c ∧ -R < p.im ∧ p.im < R) + (hPnotZ : ∀ p ∈ P, p ∉ Zset) + (hfin : {ρ : ℂ | ρ ∈ Zset ∧ -R < ρ.im ∧ ρ.im ≤ R}.Finite) + (hf : AnalyticOnNhd ℂ f (Rectangle (((1 - c : ℝ) : ℂ) - R * I) ((c : ℝ) + R * I) \ (P : Set ℂ))) + (hg : Differentiable ℂ g) + (hZ : ∀ s, s ∉ P → (f s = 0 ↔ s ∈ Zset)) + (hstrip : ∀ ρ ∈ Zset, 1 - c < ρ.re ∧ ρ.re < c) + (hgood : ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 - c ≤ s.re → s.re ≤ c → f s ≠ 0) + (hpole : ∀ p ∈ P, ∃ cp : ℂ, cp ≠ 0 ∧ + Tendsto (fun s => (s - p) ^ m p * f s) (𝓝[≠] p) (𝓝 cp)) : + ∃ Z : Finset ℂ, + ((Z : Set ℂ) = {ρ : ℂ | ρ ∈ Zset ∧ -R < ρ.im ∧ ρ.im < R}) ∧ + RectangleIntegral' (fun s => g s * logDeriv f s) + (((1 - c : ℝ) : ℂ) - R * I) ((c : ℝ) + R * I) + = (∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) * g ρ) + - ∑ p ∈ P, (m p : ℂ) * g p := by + classical + obtain ⟨z, w, hz, hw, hzre, hzim, hwre, hwim, hre, him, hmem⟩ := + rectSetup c R hc.le (by linarith) + set Z : Finset ℂ := hfin.toFinset with hZdef + have hZmem : ∀ ρ : ℂ, ρ ∈ Z ↔ ρ ∈ Zset ∧ -R < ρ.im ∧ ρ.im ≤ R := fun ρ => by + rw [hZdef, Set.Finite.mem_toFinset]; rfl + have hZcoe : (Z : Set ℂ) = {ρ : ℂ | ρ ∈ Zset ∧ -R < ρ.im ∧ ρ.im < R} := by + ext ρ; rw [Finset.mem_coe, hZmem]; simp only [Set.mem_ofPred_eq] + refine ⟨fun ⟨h1, h2, h3⟩ => ⟨h1, h2, lt_of_le_of_ne h3 fun h => ?_⟩, fun ⟨h1, h2, h3⟩ => ⟨h1, h2, h3.le⟩⟩ + have hρP : ρ ∉ P := fun hp => hPnotZ ρ hp h1 + have hst := hstrip ρ h1 + exact hgood ρ (Or.inl h) hst.1.le hst.2.le ((hZ ρ hρP).mpr h1) + refine ⟨Z, hZcoe, ?_⟩ + have hZP : Disjoint Z P := Finset.disjoint_left.mpr fun ρ hρ hρP => hPnotZ ρ hρP ((hZmem ρ).mp hρ).1 + have hPint' : ∀ p ∈ P, Rectangle z w ∈ 𝓝 p := fun p hp => by + rw [rectangle_mem_nhds_iff, Complex.mem_reProdIm, Set.uIoo_of_le hre, Set.uIoo_of_le him, + hzre, hzim, hwre, hwim] + obtain ⟨h1, h2, h3, h4⟩ := hPint p hp + exact ⟨⟨h1, h2⟩, ⟨h3, h4⟩⟩ + have hf' : AnalyticOnNhd ℂ f (Rectangle z w \ (P : Set ℂ)) := by rwa [hz, hw] + have hg' : AnalyticOnNhd ℂ g (Rectangle z w) := fun s _ => hg.analyticAt s + have hborder : ∀ s ∈ RectangleBorder z w, f s ≠ 0 := by + intro s hs h0 + have hsrect := rectangleBorder_subset_rectangle z w hs + obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsrect + have hsP : s ∉ P := fun hp => by + obtain ⟨h1, h2, h3, h4⟩ := hPint s hp + simp only [RectangleBorder, Set.mem_union, Complex.mem_reProdIm, Set.mem_singleton_iff, + hzre, hzim, hwre, hwim] at hs + rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ <;> linarith + simp only [RectangleBorder, Set.mem_union, Complex.mem_reProdIm, Set.mem_singleton_iff, + hzre, hzim, hwre, hwim] at hs + rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ + · exact hgood s (Or.inr h') hr1 hr2 h0 + · have := (hstrip s ((hZ s hsP).mp h0)).1; linarith + · exact hgood s (Or.inl h') hr1 hr2 h0 + · have := (hstrip s ((hZ s hsP).mp h0)).2; linarith + have hZchar : ∀ s ∈ Rectangle z w \ (P : Set ℂ), (f s = 0 ↔ s ∈ Z) := by + rintro s ⟨hsrect, hsP⟩ + have hsP' : s ∉ P := by simpa using hsP + obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsrect + rw [hZmem] + refine ⟨fun h0 => ?_, fun ⟨h1, _, _⟩ => (hZ s hsP').mpr h1⟩ + refine ⟨(hZ s hsP').mp h0, ?_, hi2⟩ + exact lt_of_le_of_ne hi1 fun h => hgood s (Or.inr h.symm) hr1 hr2 h0 + have hZsub : (Z : Set ℂ) ⊆ Rectangle z w := fun ρ hρ => by + obtain ⟨h1, h2, h3⟩ := (hZmem ρ).mp (Finset.mem_coe.mp hρ) + have hst := hstrip ρ h1 + exact (hmem ρ).mpr ⟨⟨hst.1.le, hst.2.le⟩, h2.le, h3⟩ + rw [← hz, ← hw] + exact Zeta23.Analytic.rectangleIntegral'_mul_logDeriv_of_poles hre him Z P hZP hPint' hf' hg' + hborder hZchar hZsub m hpole + +/-- **Pole-free rectangle identity for entire `f`**: derives finiteness of zeros in the rectangle +automatically from `finite_zeros_rectangle`. -/ +theorem rectangle_identity_entire {f g : ℂ → ℂ} (hf : Differentiable ℂ f) (hg : Differentiable ℂ g) + {c R : ℝ} (hc : 1 - c < c) (hR : 0 ≤ R) {Zset : Set ℂ} (hZ : ∀ s, f s = 0 ↔ s ∈ Zset) + (hstrip : ∀ ρ ∈ Zset, 1 - c < ρ.re ∧ ρ.re < c) + (hgood : ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 - c ≤ s.re → s.re ≤ c → f s ≠ 0) : + ∃ Z : Finset ℂ, + ((Z : Set ℂ) = {ρ : ℂ | ρ ∈ Zset ∧ -R < ρ.im ∧ ρ.im < R}) ∧ + RectangleIntegral' (fun s => g s * logDeriv f s) + (((1 - c : ℝ) : ℂ) - R * I) ((c : ℝ) + R * I) + = ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) * g ρ := by + obtain ⟨z, w, hz, hw, hzre, hzim, hwre, hwim, _, _, hmem⟩ := rectSetup c R hc.le (by linarith) + have hzB : z ∈ RectangleBorder z w := Or.inl (Or.inl (Or.inl ⟨Set.left_mem_uIcc, rfl⟩)) + have hfz : f z ≠ 0 := fun h0 => by + have := (hstrip z ((hZ z).mp h0)).1; linarith + have hfinR := Zeta23.Analytic.finite_zeros_rectangle (fun s _ => hf.analyticAt s) + (rectangleBorder_subset_rectangle z w hzB) hfz + have hfin : {ρ : ℂ | ρ ∈ Zset ∧ -R < ρ.im ∧ ρ.im ≤ R}.Finite := hfinR.subset fun ρ ⟨h1, h2, h3⟩ => + ⟨(hmem ρ).mpr ⟨⟨(hstrip ρ h1).1.le, (hstrip ρ h1).2.le⟩, h2.le, h3⟩, (hZ ρ).mpr h1⟩ + obtain ⟨Z, hZcoe, hrect⟩ := rectangle_identity_of (P := ∅) (m := fun _ => 0) hc hR + (by simp) (by simp) hfin (fun s _ => hf.analyticAt s) hg (fun s _ => hZ s) hstrip hgood (by simp) + rw [Finset.sum_empty, sub_zero] at hrect + exact ⟨Z, hZcoe, hrect⟩ + +/-! ## §3. Generic horizontal-side vanishing, vertical fold, and full-line limit -/ + +/-- **Generic horizontal-side vanishing**: if `‖logDeriv f s‖ ≤ K · log²(A · (j + j₀ + 3))` on +`Im s = ±R j, 1−c ≤ Re s ≤ c` with `1 ≤ A`, `1 ≤ j₀`, `j + j₀ ≤ R j`, and `1−c ≤ c ≤ 2`, then +both horizontal integrals vanish as `j → ∞`. -/ +theorem horizontal_vanish_of_log_sq {f : ℂ → ℂ} {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) + (hkc : HasCompactSupport k) {c : ℝ} (hc : 1 - c ≤ c) (hc2 : c ≤ 2) + {K A : ℝ} (hK : 0 ≤ K) (hA : 1 ≤ A) {j₀ : ℕ} (hj₀ : 1 ≤ j₀) {R : ℕ → ℝ} + (hR : ∀ j : ℕ, (j : ℝ) + j₀ ≤ R j ∧ + ∀ s : ℂ, (s.im = R j ∨ s.im = -R j) → 1 - c ≤ s.re → s.re ≤ c → + ‖logDeriv f s‖ ≤ K * (Real.log (A * ((j : ℝ) + j₀ + 3))) ^ 2) : + Tendsto (fun j : ℕ => HIntegral (fun s => Hfn k s * logDeriv f s) (1 - c) c (R j)) + atTop (𝓝 0) + ∧ Tendsto (fun j : ℕ => HIntegral (fun s => Hfn k s * logDeriv f s) (1 - c) c (-(R j))) + atTop (𝓝 0) := by + obtain ⟨CH, hCH0, hH⟩ := norm_Hfn_le hk hkc + set n : ℕ → ℝ := fun j => (j : ℝ) + j₀ + have hn1 : ∀ j, 1 ≤ n j := fun j => by + have : (1 : ℝ) ≤ j₀ := by exact_mod_cast hj₀ + have : (0 : ℝ) ≤ j := Nat.cast_nonneg j + dsimp [n]; linarith + set Lg : ℕ → ℝ := fun j => Real.log (A * (n j + 3)) + have hint : ∀ (j : ℕ) (y : ℝ), (y = R j ∨ y = -R j) → + ‖HIntegral (fun s => Hfn k s * logDeriv f s) (1 - c) c y‖ + ≤ CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| := by + intro j y hy + unfold HIntegral + refine intervalIntegral.norm_integral_le_of_norm_le_const fun x hx => ?_ + rw [Set.uIoc_of_le hc] at hx + have hy2 : y ^ 2 = (R j) ^ 2 := by rcases hy with h | h <;> simp [h] + dsimp only + rw [norm_mul, ← hy2] + refine mul_le_mul (hH x y (by linarith [hx.1]) (by linarith [hx.2])) ?_ (norm_nonneg _) + (by positivity) + exact (hR j).2 ((x : ℂ) + y * I) (by rcases hy with h | h <;> simp [h]) + (by simpa using hx.1.le) (by simpa using hx.2) + set b : ℕ → ℝ := fun j => CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| + have hb0 : ∀ j, 0 ≤ b j := fun j => by dsimp [b]; positivity + have hA0 : 0 < A := by linarith + have hLA0 : 0 ≤ Real.log A := Real.log_nonneg hA + have hLg_split : ∀ j, Lg j ^ 2 ≤ 2 * (Real.log A) ^ 2 + 2 * (Real.log (n j + 3)) ^ 2 := fun j => by + have e : Lg j = Real.log A + Real.log (n j + 3) := + Real.log_mul hA0.ne' (by linarith [hn1 j]) + rw [e]; nlinarith [sq_nonneg (Real.log A - Real.log (n j + 3))] + have hb_le : ∀ j : ℕ, b j ≤ (2 * CH * K * |c - (1 - c)|) + * ((Real.log A) ^ 2 / n j + (Real.log (n j + 3)) ^ 2 / (1 * (n j + 3) + (-3))) := fun j => by + have hnR : n j ≤ R j := (hR j).1 + have hn0 : 0 < n j := by linarith [hn1 j] + have hden : n j ≤ 1 + R j ^ 2 := by nlinarith [hnR, hn1 j] + have e1 : (1 : ℝ) * (n j + 3) + (-3) = n j := by ring + rw [e1, ← add_div] + have h1 : Lg j ^ 2 / (1 + R j ^ 2) ≤ (2 * (Real.log A) ^ 2 + 2 * (Real.log (n j + 3)) ^ 2) / n j := + (div_le_div_of_nonneg_left (sq_nonneg _) hn0 hden).trans + (div_le_div_of_nonneg_right (hLg_split j) hn0.le) + have e : b j = CH * K * |c - (1 - c)| * (Lg j ^ 2 / (1 + R j ^ 2)) := by dsimp [b]; ring + rw [e] + calc CH * K * |c - (1 - c)| * (Lg j ^ 2 / (1 + R j ^ 2)) + ≤ CH * K * |c - (1 - c)| * ((2 * (Real.log A) ^ 2 + 2 * (Real.log (n j + 3)) ^ 2) / n j) := + mul_le_mul_of_nonneg_left h1 (by positivity) + _ = _ := by ring + have hntop : Tendsto n atTop atTop := + tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop + have hlim1 : Tendsto (fun j : ℕ => (Real.log A) ^ 2 / n j) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop hntop + have hlim2 : Tendsto (fun j : ℕ => (Real.log (n j + 3)) ^ 2 / (1 * (n j + 3) + (-3))) atTop (𝓝 0) := + (Real.tendsto_pow_log_div_mul_add_atTop 1 (-3) 2 one_ne_zero).comp + (tendsto_atTop_add_const_right _ _ hntop) + have hb : Tendsto b atTop (𝓝 0) := by + have hlim := (hlim1.add hlim2).const_mul (2 * CH * K * |c - (1 - c)|) + simp only [add_zero, mul_zero] at hlim + exact squeeze_zero hb0 hb_le hlim + exact ⟨squeeze_zero_norm (fun j => hint j (R j) (Or.inl rfl)) hb, + squeeze_zero_norm (fun j => hint j (-(R j)) (Or.inr rfl)) hb⟩ + +/-- Generic vertical-side fold: if `L((1-c)+iy) = -L'(c-iy)` and both `L`, `L'` are continuous on +`Re s = c`, then `V_{H·L}(c; -R, R) - V_{H·L}(1-c; -R, R) = I • ∫_{-R}^{R} (H(c+it)·L(c+it) + H(1-c-it)·L'(c+it))`. -/ +theorem verticals_fold_of {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} + {L L' : ℂ → ℂ} (hLc : Continuous (fun t : ℝ => L ((c : ℂ) + t * I))) + (hL'c : Continuous (fun t : ℝ => L' ((c : ℂ) + t * I))) + (hLfold : ∀ y : ℝ, L (((1 - c : ℝ) : ℂ) + y * I) = -L' ((c : ℂ) + ((-y : ℝ) : ℂ) * I)) + (R : ℝ) : + VIntegral (fun s => Hfn k s * L s) c (-R) R - VIntegral (fun s => Hfn k s * L s) (1 - c) (-R) R + = I • ∫ t in (-R)..R, (Hfn k ((c : ℂ) + t * I) * L ((c : ℂ) + t * I) + + Hfn k (1 - c - t * I) * L' ((c : ℂ) + t * I)) := by + have hHc := continuous_Hfn_line hk hkc c + have hH2 := continuous_Hfn_reflect hk hkc c + have hleft : ∀ y : ℝ, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * L (((1 - c : ℝ) : ℂ) + y * I) + = -(Hfn k (1 - c - ((-y : ℝ) : ℂ) * I) * L' ((c : ℂ) + ((-y : ℝ) : ℂ) * I)) := fun y => by + have hH : Hfn k (((1 - c : ℝ) : ℂ) + y * I) = Hfn k (1 - c - ((-y : ℝ) : ℂ) * I) := by + congr 1; push_cast; ring + rw [hLfold y, hH]; ring + have hI1 : IntervalIntegrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * L ((c : ℂ) + t * I)) + volume (-R) R := (hHc.mul hLc).intervalIntegrable _ _ + have hI2 : IntervalIntegrable (fun t : ℝ => Hfn k (1 - c - t * I) * L' ((c : ℂ) + t * I)) + volume (-R) R := (hH2.mul hL'c).intervalIntegrable _ _ + have hfold : (∫ y in (-R)..R, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * L (((1 - c : ℝ) : ℂ) + y * I)) + = -∫ t in (-R)..R, Hfn k (1 - c - t * I) * L' ((c : ℂ) + t * I) := by + simp_rw [hleft] + rw [intervalIntegral.integral_neg] + have h := intervalIntegral.integral_comp_neg (a := -R) (b := R) + (fun t : ℝ => Hfn k (1 - c - t * I) * L' ((c : ℂ) + t * I)) + simp only [neg_neg] at h + rw [← h] + dsimp only [VIntegral] + rw [hfold, ← smul_sub, sub_neg_eq_add, ← intervalIntegral.integral_add hI1 hI2] + +/-- Corners of the rectangle: real and imaginary parts. -/ +theorem corner_re_im (c R : ℝ) : + ((((1 - c : ℝ) : ℂ) - R * I).re = 1 - c) ∧ ((((1 - c : ℝ) : ℂ) - R * I).im = -R) ∧ + ((((c : ℝ) : ℂ) + R * I).re = c) ∧ ((((c : ℝ) : ℂ) + R * I).im = R) := by + refine ⟨?_, ?_, ?_, ?_⟩ <;> simp + +/-- `(1/(2πi))·(i·X) = (1/2π)·X`. -/ +theorem inv_two_pi_I_mul_I (X : ℂ) : + (1 / (2 * Real.pi * I) : ℂ) * (I * X) = (1 / (2 * Real.pi) : ℂ) * X := by + have hI : (I : ℂ) ≠ 0 := I_ne_zero + have hπ : (Real.pi : ℂ) ≠ 0 := ofReal_ne_zero.mpr Real.pi_pos.ne' + field_simp + +/-- Generic rectangle-to-full-line limit: given rectangle integrals `RectangleIntegral' f` +equaling `rhs j → L_rhs`, vanishing horizontals, folded verticals `= I • ∫_{-R j}^{R j} F`, +and `∫_{-R j}^{R j} F → ∫ F`, concludes `(1 / 2π) ∫ F = L_rhs`. -/ +theorem full_line_limit_of {f : ℂ → ℂ} {F : ℝ → ℂ} {c : ℝ} {R : ℕ → ℝ} {rhs : ℕ → ℂ} {L_rhs : ℂ} + (hE : ∀ j, RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) = rhs j) + (hVfold : ∀ j, VIntegral f c (-R j) (R j) - VIntegral f (1 - c) (-R j) (R j) + = I • ∫ t in (-R j)..R j, F t) + (hHtop : Tendsto (fun j => HIntegral f (1 - c) c (R j)) atTop (𝓝 0)) + (hHbot : Tendsto (fun j => HIntegral f (1 - c) c (-(R j))) atTop (𝓝 0)) + (hV : Tendsto (fun j => ∫ t in (-R j)..R j, F t) atTop (𝓝 (∫ t, F t))) + (hRlim : Tendsto rhs atTop (𝓝 L_rhs)) : + (1 / (2 * Real.pi) : ℂ) * ∫ t, F t = L_rhs := by + have hdec : ∀ j : ℕ, RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) + = (1 / (2 * Real.pi * I) : ℂ) * (HIntegral f (1 - c) c (-(R j)) - HIntegral f (1 - c) c (R j)) + + (1 / (2 * Real.pi) : ℂ) * ∫ t in (-R j)..R j, F t := fun j => by + obtain ⟨e1, e2, e3, e4⟩ := corner_re_im c (R j) + rw [RectangleIntegral', RectangleIntegral, smul_eq_mul, e1, e2, e3, e4, + show ∀ A B V₁ V₂ : ℂ, A - B + V₁ - V₂ = (A - B) + (V₁ - V₂) from fun _ _ _ _ => by ring, + hVfold j, smul_eq_mul, mul_add, inv_two_pi_I_mul_I] + have hL : Tendsto (fun j : ℕ => RectangleIntegral' f (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I)) + atTop (𝓝 ((1 / (2 * Real.pi) : ℂ) * ∫ t, F t)) := by + have h := ((hHbot.sub hHtop).const_mul (1 / (2 * Real.pi * I) : ℂ)).add + (hV.const_mul (1 / (2 * Real.pi) : ℂ)) + simp only [sub_zero, mul_zero, zero_add] at h + exact h.congr fun j => (hdec j).symm + exact tendsto_nhds_unique (hL.congr hE) hRlim + +/-- Truncated integrals of an integrable `F` converge to `∫ F` along any `R_j ≥ j`. -/ +theorem tendsto_intervalIntegral_of_integrable {F : ℝ → ℂ} (hF : Integrable F) {R : ℕ → ℝ} + (hR : ∀ j : ℕ, (j : ℝ) ≤ R j) : + Tendsto (fun j : ℕ => ∫ t in (-R j)..R j, F t) atTop (𝓝 (∫ t, F t)) := by + have hRtop : Tendsto R atTop atTop := tendsto_atTop_mono hR tendsto_natCast_atTop_atTop + exact intervalIntegral_tendsto_integral hF (tendsto_neg_atTop_atBot.comp hRtop) hRtop + +/-- Re-index a good-heights existence theorem `∀ j ≥ j₀, ∃ R ∈ [j, j+1], ...` into a height +sequence `R : ℕ → ℝ` with `R j ∈ [j + m, j + m + 1]`. -/ +theorem exists_heights_reindex {P : ℝ → ℝ → Prop} {j₀ m : ℕ} (hm : j₀ ≤ m) + (hGH : ∀ j : ℕ, j₀ ≤ j → ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ P ((j : ℝ) + 3) R) : + ∃ R : ℕ → ℝ, ∀ j : ℕ, (j : ℝ) + m ≤ R j ∧ R j ≤ (j : ℝ) + m + 1 ∧ + P ((j : ℝ) + m + 3) (R j) := by + have hex : ∀ j : ℕ, ∃ R : ℝ, ((j + m : ℕ) : ℝ) ≤ R ∧ R ≤ ((j + m : ℕ) : ℝ) + 1 ∧ + P (((j + m : ℕ) : ℝ) + 3) R := fun j => hGH (j + m) (by omega) + refine ⟨fun j => (hex j).choose, fun j => ?_⟩ + obtain ⟨h1, h2, h3⟩ := (hex j).choose_spec + have e : ((j + m : ℕ) : ℝ) = (j : ℝ) + m := by push_cast; ring + exact ⟨by rwa [← e], by rwa [← e], by rwa [← e]⟩ + +/-- Monotonicity of a sequence `R j ∈ [j + m, j + m + 1]`. -/ +theorem monotone_of_unit_intervals {R : ℕ → ℝ} {m : ℝ} + (hR : ∀ j : ℕ, (j : ℝ) + m ≤ R j ∧ R j ≤ (j : ℝ) + m + 1) : Monotone R := by + intro i j hij + rcases hij.eq_or_lt with rfl | h + · exact le_rfl + · have : (i : ℝ) + 1 ≤ j := by exact_mod_cast h + linarith [(hR i).2, (hR j).1] + +end WeilEF +end Zeta23 diff --git a/zeta23/Zeta23/WeilEF/GoodHeights.lean b/zeta23/Zeta23/WeilEF/GoodHeights.lean index dba3f39a75..4b2d8b903b 100644 --- a/zeta23/Zeta23/WeilEF/GoodHeights.lean +++ b/zeta23/Zeta23/WeilEF/GoodHeights.lean @@ -98,16 +98,16 @@ lemma im_mem_of_mem_closedBall {t r : ℝ} {ρ : ℂ} (hρ : ρ ∈ Metric.close /-- a finite set of nontrivial zeros with ordinates in (a, a+6] has total multiplicity ≤ 6 A₀ log(|a|+9) (six unit windows of the local count). -/ -lemma sum_mult_six_windows {A₀ : ℝ} - (hLC : Tail.LocalCount (fun ρ : zetaZeroConfig.carrier => (ρ : ℂ).im) - (fun ρ : zetaZeroConfig.carrier => zetaZeroConfig.mult ρ) A₀) - {a : ℤ} (F : Finset zetaZeroConfig.carrier) +lemma sum_mult_six_windows (ZC : ZeroConfig) {A₀ : ℝ} + (hLC : Tail.LocalCount (fun ρ : ZC.carrier => (ρ : ℂ).im) + (fun ρ : ZC.carrier => ZC.mult ρ) A₀) + {a : ℤ} (F : Finset ZC.carrier) (hF : ∀ ρ ∈ F, (a : ℝ) < (ρ : ℂ).im ∧ (ρ : ℂ).im ≤ (a : ℝ) + 6) : - ∑ ρ ∈ F, (zetaZeroConfig.mult ρ : ℝ) ≤ 6 * (A₀ * Real.log (|(a : ℝ)| + 9)) := by + ∑ ρ ∈ F, (ZC.mult ρ : ℝ) ≤ 6 * (A₀ * Real.log (|(a : ℝ)| + 9)) := by classical have hA₀ := hLC.A₀_pos.le -- key k : ℕ with a + k < Im ≤ a + k + 1 - set key : zetaZeroConfig.carrier → ℕ := fun ρ => (⌈(ρ : ℂ).im⌉ - a - 1).toNat with hkey + set key : ZC.carrier → ℕ := fun ρ => (⌈(ρ : ℂ).im⌉ - a - 1).toNat with hkey have hkey_spec : ∀ ρ ∈ F, ((a : ℝ) + key ρ < (ρ : ℂ).im ∧ (ρ : ℂ).im ≤ (a : ℝ) + key ρ + 1) ∧ key ρ < 6 := by intro ρ hρ @@ -128,7 +128,7 @@ lemma sum_mult_six_windows {A₀ : ℝ} refine ⟨⟨by linarith, by linarith⟩, ?_⟩ have : ((key ρ : ℕ) : ℤ) < 6 := by omega exact_mod_cast this - have h := Tail.sum_mult_le_of_windows F (fun ρ => zetaZeroConfig.mult ρ) key 6 + have h := Tail.sum_mult_le_of_windows F (fun ρ => ZC.mult ρ) key 6 (C := A₀ * Real.log (|(a : ℝ)| + 9)) (fun ρ hρ => (hkey_spec ρ hρ).2) (fun k hk => by have hw := hLC.window ((a : ℝ) + k) (F.filter fun ρ => key ρ = k) (fun ρ hρ => by simp only [Finset.mem_filter] at hρ @@ -144,53 +144,73 @@ lemma sum_mult_six_windows {A₀ : ℝ} simpa using h /-- card ≤ total multiplicity (each nontrivial zero has multiplicity ≥ 1). -/ -lemma card_le_sum_mult (F : Finset zetaZeroConfig.carrier) : - (F.card : ℝ) ≤ ∑ ρ ∈ F, (zetaZeroConfig.mult ρ : ℝ) := by +lemma card_le_sum_mult (ZC : ZeroConfig) (F : Finset ZC.carrier) : + (F.card : ℝ) ≤ ∑ ρ ∈ F, (ZC.mult ρ : ℝ) := by rw [Finset.card_eq_sum_ones, Nat.cast_sum] refine Finset.sum_le_sum fun ρ _ => ?_ - exact_mod_cast zetaZeroConfig.one_le_mult ρ ρ.2 + exact_mod_cast ZC.one_le_mult ρ ρ.2 /-! ### good heights -/ -/-- **Good heights**: for every j ≥ 7 there is R ∈ [j, j+1] such that on both horizontal segments -Im s = ±R, 1/2 ≤ Re s ≤ 2, ζ(s) ≠ 0 and ‖ζ'/ζ(s)‖ ≤ C log²(j+3) (R avoids the ordinates of all -zeros with |Im ρ ∓ R| < 2 by at least 1/(2(n+1)), n ≪ log j their number; then the partial -fraction ζ'/ζ(s) = Σ_{|ρ−(2±iR)| ≤ 1.6} m_ρ/(s−ρ) + O(log) with Σ m_ρ ≪ log). -/ -theorem good_heights_at : ∃ C : ℝ, 0 < C ∧ ∀ j : ℕ, 7 ≤ j → +set_option maxHeartbeats 400000 in +/-- Generic good-heights theorem with arbitrary threshold `t₁` and starting integer `j₀ ≥ 4` +(`t₁ ≤ j₀`), for any zero configuration `ZC` and analytic function `f` with a partial-fraction +bound scaled by `qscale ≥ 1`, a local zero count, and ball-zero membership in `ZC.carrier` for +`|t| ≥ j₀`. Shared by `riemannZeta` (`qscale = 1`), primitive `L(s, χ)` (`qscale = q`), and +`XiPrime` two-line functions (`ξ'/Γℝ`, `hardyW`). -/ +theorem good_heights_of_threshold (ZC : ZeroConfig) (f : ℂ → ℂ) (qscale : ℝ) (hq1 : 1 ≤ qscale) + {t₁ : ℝ} {j₀ : ℕ} (hj₀4 : 4 ≤ j₀) (ht₁j₀ : t₁ ≤ j₀) + {C : ℝ} (hC : 0 < C) + (hpf : ∀ t : ℝ, t₁ ≤ |t| → ∃ Z : Finset ℂ, + ((Z : Set ℂ) = {ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) | f ρ = 0}) ∧ + ((∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℝ)) ≤ C * Real.log (qscale * (|t| + 3))) ∧ + ∀ s ∈ Metric.closedBall (2 + t * I) (3/2), f s ≠ 0 → + ‖logDeriv f s - ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ + ≤ C * Real.log (qscale * (|t| + 3))) + {A₀ : ℝ} (hA₀ : 1 ≤ A₀) + (hloc : ∀ t : ℝ, (ZC.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) + (hball_mem : ∀ {t : ℝ} {ρ : ℂ}, (j₀ : ℝ) ≤ |t| → + ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) → f ρ = 0 → ρ ∈ ZC.carrier) : + ∃ C' : ℝ, 0 < C' ∧ ∀ j : ℕ, j₀ ≤ j → ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → - riemannZeta s ≠ 0 ∧ ‖logDeriv riemannZeta s‖ ≤ C * (Real.log ((j : ℝ) + 3)) ^ 2 := by + f s ≠ 0 ∧ ‖logDeriv f s‖ ≤ C' * (Real.log (qscale * ((j : ℝ) + 3))) ^ 2 := by classical - obtain ⟨C, hC, hpf⟩ := zeta_logDeriv_partial_fraction - obtain ⟨A₀, hA₀, hloc⟩ := Zeta23.RvM.zetaZeroConfig_local_count - have hLC := Tail.LocalCount.ofWindowCount zetaZeroConfig hA₀ hloc + have hlogq : 0 ≤ Real.log qscale := Real.log_nonneg hq1 + have hLC := Tail.LocalCount.ofWindowCount ZC hA₀ hloc refine ⟨2 * C * (48 * A₀ + 3), by positivity, fun j hj => ?_⟩ - have hj7 : (7 : ℝ) ≤ j := by exact_mod_cast hj - set Lg : ℝ := Real.log ((j : ℝ) + 3) with hLg - have hLg1 : 1 ≤ Lg := by - rw [hLg, ← Real.log_exp 1] + have hj4 : (4 : ℝ) ≤ j := by exact_mod_cast hj₀4.trans hj + have hjj₀ : (j₀ : ℝ) ≤ j := by exact_mod_cast hj + set Lj : ℝ := Real.log ((j : ℝ) + 3) with hLj + set Lg : ℝ := Real.log (qscale * ((j : ℝ) + 3)) with hLg + have hLgq : Lg = Real.log qscale + Lj := by + rw [hLg, hLj, Real.log_mul (by linarith) (by positivity)] + have hLj1 : 1 ≤ Lj := by + rw [hLj, ← Real.log_exp 1] apply Real.log_le_log (Real.exp_pos 1) have := Real.exp_one_lt_d9; linarith - have hlog2 : Real.log 2 ≤ Lg := by - rw [hLg]; exact Real.log_le_log (by norm_num) (by linarith) + have hLjLg : Lj ≤ Lg := by rw [hLgq]; linarith + have hLg1 : 1 ≤ Lg := hLj1.trans hLjLg + have hlog2j : Real.log 2 ≤ Lj := by + rw [hLj]; exact Real.log_le_log (by norm_num) (by linarith) -- the two finite families of zeros near height ±j - set Wp : Set ℂ := zetaZeroConfig.window ((j : ℝ) - 3) ((j : ℝ) + 3) with hWp - set Wm : Set ℂ := zetaZeroConfig.window (-(j : ℝ) - 4) (-(j : ℝ) + 2) with hWm - have hWpfin : ((fun ρ : zetaZeroConfig.carrier => (ρ : ℂ)) ⁻¹' Wp).Finite := - (zetaZeroConfig.finite_window _ _).preimage Subtype.val_injective.injOn - have hWmfin : ((fun ρ : zetaZeroConfig.carrier => (ρ : ℂ)) ⁻¹' Wm).Finite := - (zetaZeroConfig.finite_window _ _).preimage Subtype.val_injective.injOn - set Fp : Finset zetaZeroConfig.carrier := hWpfin.toFinset with hFp - set Fm : Finset zetaZeroConfig.carrier := hWmfin.toFinset with hFm - have hFp_mem : ∀ ρ : zetaZeroConfig.carrier, ρ ∈ Fp ↔ (ρ : ℂ) ∈ Wp := fun ρ => by + set Wp : Set ℂ := ZC.window ((j : ℝ) - 3) ((j : ℝ) + 3) with hWp + set Wm : Set ℂ := ZC.window (-(j : ℝ) - 4) (-(j : ℝ) + 2) with hWm + have hWpfin : ((fun ρ : ZC.carrier => (ρ : ℂ)) ⁻¹' Wp).Finite := + (ZC.finite_window _ _).preimage Subtype.val_injective.injOn + have hWmfin : ((fun ρ : ZC.carrier => (ρ : ℂ)) ⁻¹' Wm).Finite := + (ZC.finite_window _ _).preimage Subtype.val_injective.injOn + set Fp : Finset ZC.carrier := hWpfin.toFinset with hFp + set Fm : Finset ZC.carrier := hWmfin.toFinset with hFm + have hFp_mem : ∀ ρ : ZC.carrier, ρ ∈ Fp ↔ (ρ : ℂ) ∈ Wp := fun ρ => by rw [hFp, Set.Finite.mem_toFinset]; rfl - have hFm_mem : ∀ ρ : zetaZeroConfig.carrier, ρ ∈ Fm ↔ (ρ : ℂ) ∈ Wm := fun ρ => by + have hFm_mem : ∀ ρ : ZC.carrier, ρ ∈ Fm ↔ (ρ : ℂ) ∈ Wm := fun ρ => by rw [hFm, Set.Finite.mem_toFinset]; rfl - set S : Finset ℝ := Fp.image (fun ρ : zetaZeroConfig.carrier => (ρ : ℂ).im) - ∪ Fm.image (fun ρ : zetaZeroConfig.carrier => -(ρ : ℂ).im) with hS + set S : Finset ℝ := Fp.image (fun ρ : ZC.carrier => (ρ : ℂ).im) + ∪ Fm.image (fun ρ : ZC.carrier => -(ρ : ℂ).im) with hS -- count: |S| ≤ 24 A₀ Lg - have hcountp : ∑ ρ ∈ Fp, (zetaZeroConfig.mult ρ : ℝ) ≤ 6 * (A₀ * (2 * Lg)) := by - have h := sum_mult_six_windows hLC (a := (j : ℤ) - 3) Fp (fun ρ hρ => by + have hcountp : ∑ ρ ∈ Fp, (ZC.mult ρ : ℝ) ≤ 6 * (A₀ * (2 * Lg)) := by + have h := sum_mult_six_windows ZC hLC (a := (j : ℤ) - 3) Fp (fun ρ hρ => by have := ((hFp_mem ρ).mp hρ).2; push_cast; constructor <;> linarith [this.1, this.2]) refine h.trans (mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left ?_ hLC.A₀_pos.le) (by norm_num)) @@ -200,10 +220,10 @@ theorem good_heights_at : ∃ C : ℝ, 0 < C ∧ ∀ j : ℕ, 7 ≤ j → rw [habs] calc Real.log ((j:ℝ) - 3 + 9) ≤ Real.log (2 * ((j:ℝ) + 3)) := Real.log_le_log (by linarith) (by linarith) - _ = Real.log 2 + Lg := by rw [Real.log_mul (by norm_num) (by linarith)] + _ = Real.log 2 + Lj := by rw [Real.log_mul (by norm_num) (by linarith)] _ ≤ 2 * Lg := by linarith - have hcountm : ∑ ρ ∈ Fm, (zetaZeroConfig.mult ρ : ℝ) ≤ 6 * (A₀ * (2 * Lg)) := by - have h := sum_mult_six_windows hLC (a := -(j : ℤ) - 4) Fm (fun ρ hρ => by + have hcountm : ∑ ρ ∈ Fm, (ZC.mult ρ : ℝ) ≤ 6 * (A₀ * (2 * Lg)) := by + have h := sum_mult_six_windows ZC hLC (a := -(j : ℤ) - 4) Fm (fun ρ hρ => by have := ((hFm_mem ρ).mp hρ).2; push_cast; constructor <;> linarith [this.1, this.2]) refine h.trans (mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left ?_ hLC.A₀_pos.le) (by norm_num)) @@ -214,25 +234,28 @@ theorem good_heights_at : ∃ C : ℝ, 0 < C ∧ ∀ j : ℕ, 7 ≤ j → rw [habs] calc Real.log ((j:ℝ) + 4 + 9) ≤ Real.log (((j:ℝ) + 3) ^ 2) := by apply Real.log_le_log (by linarith); nlinarith - _ = 2 * Lg := by rw [Real.log_pow]; push_cast; ring + _ = 2 * Lj := by rw [Real.log_pow]; push_cast; ring + _ ≤ 2 * Lg := by linarith have hcard : (S.card : ℝ) ≤ 24 * A₀ * Lg := by have h1 : S.card ≤ Fp.card + Fm.card := (Finset.card_union_le _ _).trans (Nat.add_le_add Finset.card_image_le Finset.card_image_le) have h1' : (S.card : ℝ) ≤ Fp.card + Fm.card := by exact_mod_cast h1 - linarith [card_le_sum_mult Fp, card_le_sum_mult Fm] + linarith [card_le_sum_mult ZC Fp, card_le_sum_mult ZC Fm] -- the good height obtain ⟨R, hR1, hR2, hfar⟩ := exists_far_point S j set δ : ℝ := 1 / (2 * ((S.card : ℝ) + 1)) with hδ have hδpos : 0 < δ := by rw [hδ]; positivity have hδinv : 1 / δ = 2 * ((S.card : ℝ) + 1) := by rw [hδ, one_div_one_div] refine ⟨R, hR1, hR2, fun s hs hσ1 hσ2 => ?_⟩ - have hR6 : (6 : ℝ) ≤ |R| := by rw [abs_of_nonneg (by linarith)]; linarith - have hR6' : (6 : ℝ) ≤ |-R| := by rwa [abs_neg] - have hlogR : Real.log (|R| + 3) ≤ 2 * Lg := by - rw [abs_of_nonneg (by linarith)] - calc Real.log (R + 3) ≤ Real.log (2 * ((j:ℝ) + 3)) := Real.log_le_log (by linarith) (by linarith) - _ = Real.log 2 + Lg := by rw [Real.log_mul (by norm_num) (by linarith)] - _ ≤ 2 * Lg := by linarith + have hRj₀ : (j₀ : ℝ) ≤ |R| := by rw [abs_of_nonneg (by linarith)]; linarith + have hRj₀' : (j₀ : ℝ) ≤ |-R| := by rwa [abs_neg] + have hsj₀ : (j₀ : ℝ) ≤ |s.im| := by rcases hs with h | h <;> rw [h] <;> assumption + have hlogR : Real.log (qscale * (|R| + 3)) ≤ 2 * Lg := by + rw [abs_of_nonneg (by linarith), Real.log_mul (by linarith) (by linarith)] + have : Real.log (R + 3) ≤ Real.log 2 + Lj := by + calc Real.log (R + 3) ≤ Real.log (2 * ((j:ℝ) + 3)) := Real.log_le_log (by linarith) (by linarith) + _ = Real.log 2 + Lj := by rw [Real.log_mul (by norm_num) (by linarith)] + rw [hLgq]; linarith -- s in the conclusion ball of the partial fraction at t = s.im have hsball : s ∈ Metric.closedBall (2 + s.im * I) (3 / 2) := by rw [Metric.mem_closedBall, dist_eq_norm] @@ -242,87 +265,129 @@ theorem good_heights_at : ∃ C : ℝ, 0 < C ∧ ∀ j : ℕ, 7 ≤ j → linarith -- every zero in the pf ball at height s.im = ±R has its (signed) ordinate in S have hordS : ∀ ρ : ℂ, ρ ∈ Metric.closedBall (2 + s.im * I) (22/25 * (91/50)) → - riemannZeta ρ = 0 → δ ≤ ‖s - ρ‖ := by + f ρ = 0 → δ ≤ ‖s - ρ‖ := by intro ρ hρ hz - have hnt := isNontrivialZero_of_mem_closedBall (by norm_num) hρ hz + have hρc : ρ ∈ ZC.carrier := hball_mem hsj₀ hρ hz have him := im_mem_of_mem_closedBall hρ rw [abs_le] at him - have hρc : ρ ∈ zetaZeroConfig.carrier := by rw [zetaZeroConfig_carrier]; exact hnt refine le_trans ?_ (abs_im_sub_le_norm_sub s ρ) rcases hs with hsR | hsR - · -- Im ρ ∈ S via Fp - have hmem : (⟨ρ, hρc⟩ : zetaZeroConfig.carrier) ∈ Fp := by + · have hmem : (⟨ρ, hρc⟩ : ZC.carrier) ∈ Fp := by rw [hFp_mem] refine ⟨hρc, ?_, ?_⟩ <;> rw [hsR] at him <;> nlinarith have : ρ.im ∈ S := by rw [hS, Finset.mem_union]; left - exact Finset.mem_image.mpr ⟨(⟨ρ, hρc⟩ : zetaZeroConfig.carrier), hmem, rfl⟩ + exact Finset.mem_image.mpr ⟨(⟨ρ, hρc⟩ : ZC.carrier), hmem, rfl⟩ have := hfar _ this rwa [hsR] - · have hmem : (⟨ρ, hρc⟩ : zetaZeroConfig.carrier) ∈ Fm := by + · have hmem : (⟨ρ, hρc⟩ : ZC.carrier) ∈ Fm := by rw [hFm_mem] refine ⟨hρc, ?_, ?_⟩ <;> rw [hsR] at him <;> nlinarith have : -ρ.im ∈ S := by rw [hS, Finset.mem_union]; right - exact Finset.mem_image.mpr ⟨(⟨ρ, hρc⟩ : zetaZeroConfig.carrier), hmem, rfl⟩ + exact Finset.mem_image.mpr ⟨(⟨ρ, hρc⟩ : ZC.carrier), hmem, rfl⟩ have := hfar _ this rw [hsR, show |(-R) - ρ.im| = |R - (-ρ.im)| by rw [← abs_neg]; ring_nf] exact this - -- ζ(s) ≠ 0: s itself would be a zero in the ball at distance 0 - have hζ : riemannZeta s ≠ 0 := by + -- f(s) ≠ 0: s itself would be a zero in the ball at distance 0 + have hζ : f s ≠ 0 := by intro hz have h0 := hordS s (Metric.closedBall_subset_closedBall (by norm_num) hsball) hz simp at h0; linarith refine ⟨hζ, ?_⟩ -- apply the partial fraction at t := s.im - have ht6 : (6 : ℝ) ≤ |s.im| := by rcases hs with h | h <;> rw [h] <;> assumption - obtain ⟨Z, hZ, hZsum, hZpf⟩ := hpf s.im ht6 + have ht₁ : t₁ ≤ |s.im| := ht₁j₀.trans hsj₀ + obtain ⟨Z, hZ, hZsum, hZpf⟩ := hpf s.im ht₁ have hZpf' := hZpf s hsball hζ - have hlogt : Real.log (|s.im| + 3) ≤ 2 * Lg := by + have hlogt : Real.log (qscale * (|s.im| + 3)) ≤ 2 * Lg := by rcases hs with h | h · rw [h]; exact hlogR · rw [h, abs_neg]; exact hlogR -- the sum over Z - have hZmem : ∀ ρ ∈ Z, ρ ∈ Metric.closedBall (2 + s.im * I) (22/25 * (91/50)) ∧ riemannZeta ρ = 0 := by + have hZmem : ∀ ρ ∈ Z, ρ ∈ Metric.closedBall (2 + s.im * I) (22/25 * (91/50)) ∧ f ρ = 0 := by intro ρ hρ have : ρ ∈ (↑Z : Set ℂ) := hρ rw [hZ] at this exact this - have hsumZ : ‖∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℂ) / (s - ρ)‖ + have hsumZ : ‖∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ ≤ (C * (2 * Lg)) * (1 / δ) := by - calc ‖∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℂ) / (s - ρ)‖ - ≤ ∑ ρ ∈ Z, ‖(analyticOrderNatAt riemannZeta ρ : ℂ) / (s - ρ)‖ := norm_sum_le _ _ - _ ≤ ∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℝ) * (1 / δ) := by + calc ‖∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ + ≤ ∑ ρ ∈ Z, ‖(analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ := norm_sum_le _ _ + _ ≤ ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℝ) * (1 / δ) := by refine Finset.sum_le_sum fun ρ hρ => ?_ obtain ⟨hρb, hρz⟩ := hZmem ρ hρ have hd := hordS ρ hρb hρz - have hsρ : 0 < ‖s - ρ‖ := lt_of_lt_of_le hδpos hd rw [norm_div, Complex.norm_natCast, div_eq_mul_one_div] refine mul_le_mul_of_nonneg_left ?_ (Nat.cast_nonneg _) exact one_div_le_one_div_of_le hδpos hd - _ = (∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℝ)) * (1 / δ) := by rw [Finset.sum_mul] + _ = (∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℝ)) * (1 / δ) := by rw [Finset.sum_mul] _ ≤ (C * (2 * Lg)) * (1 / δ) := by refine mul_le_mul_of_nonneg_right (hZsum.trans ?_) (by positivity) exact mul_le_mul_of_nonneg_left hlogt hC.le -- assemble - have hmain : ‖logDeriv riemannZeta s‖ ≤ C * (2 * Lg) + (C * (2 * Lg)) * (1 / δ) := by - have h1 : ‖logDeriv riemannZeta s‖ - ≤ ‖logDeriv riemannZeta s - ∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℂ) / (s - ρ)‖ - + ‖∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℂ) / (s - ρ)‖ := norm_le_norm_sub_add _ _ + have hmain : ‖logDeriv f s‖ ≤ C * (2 * Lg) + (C * (2 * Lg)) * (1 / δ) := by + have h1 : ‖logDeriv f s‖ + ≤ ‖logDeriv f s - ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ + + ‖∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ := norm_le_norm_sub_add _ _ have h2 := hZpf'.trans (mul_le_mul_of_nonneg_left hlogt hC.le) linarith [hsumZ] refine hmain.trans ?_ rw [hδinv] - have hc := hcard - have hA := hLC.A₀_pos.le - -- C·2Lg·(1 + 2(n+1)) ≤ 2C(48A₀+3) Lg² have : C * (2 * Lg) + C * (2 * Lg) * (2 * ((S.card : ℝ) + 1)) = 2 * C * Lg * (2 * (S.card : ℝ) + 3) := by ring rw [this] have hn : 2 * (S.card : ℝ) + 3 ≤ (48 * A₀ + 3) * Lg := by nlinarith calc 2 * C * Lg * (2 * (S.card : ℝ) + 3) ≤ 2 * C * Lg * ((48 * A₀ + 3) * Lg) := mul_le_mul_of_nonneg_left hn (by positivity) - _ = 2 * C * (48 * A₀ + 3) * Real.log ((j : ℝ) + 3) ^ 2 := by rw [hLg]; ring + _ = 2 * C * (48 * A₀ + 3) * Real.log (qscale * ((j : ℝ) + 3)) ^ 2 := by rw [hLg]; ring + +/-- Generic good-heights theorem at standard threshold `t₁ = 6, j₀ = 7` (shared by `riemannZeta` +and primitive `L(s, χ)`). -/ +theorem good_heights_of (ZC : ZeroConfig) (f : ℂ → ℂ) (qscale : ℝ) (hq1 : 1 ≤ qscale) + {C : ℝ} (hC : 0 < C) + (hpf : ∀ t : ℝ, 6 ≤ |t| → ∃ Z : Finset ℂ, + ((Z : Set ℂ) = {ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) | f ρ = 0}) ∧ + ((∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℝ)) ≤ C * Real.log (qscale * (|t| + 3))) ∧ + ∀ s ∈ Metric.closedBall (2 + t * I) (3/2), f s ≠ 0 → + ‖logDeriv f s - ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ + ≤ C * Real.log (qscale * (|t| + 3))) + {A₀ : ℝ} (hA₀ : 1 ≤ A₀) + (hloc : ∀ t : ℝ, (ZC.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) + (hball_mem : ∀ {t : ℝ} {ρ : ℂ}, ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) → + f ρ = 0 → ρ ∈ ZC.carrier) : + ∃ C' : ℝ, 0 < C' ∧ ∀ j : ℕ, 7 ≤ j → + ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ + ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → + f s ≠ 0 ∧ ‖logDeriv f s‖ ≤ C' * (Real.log (qscale * ((j : ℝ) + 3))) ^ 2 := + good_heights_of_threshold ZC f qscale hq1 (by omega) (by norm_num) hC hpf hA₀ hloc + (fun _ hρ hz => hball_mem hρ hz) + +/-- Good heights directly from `TwoLineLandauData` + a local zero count and ball-zero membership. -/ +theorem TwoLineLandauData.good_heights_of (D : TwoLineLandauData) (ZC : ZeroConfig) + {j₀ : ℕ} (hj₀4 : 4 ≤ j₀) (ht₀j₀ : D.t₀ ≤ j₀) + {A₀ : ℝ} (hA₀ : 1 ≤ A₀) + (hloc : ∀ t : ℝ, (ZC.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) + (hball_mem : ∀ {t : ℝ} {ρ : ℂ}, (j₀ : ℝ) ≤ |t| → + ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) → D.f ρ = 0 → ρ ∈ ZC.carrier) : + ∃ C' : ℝ, 0 < C' ∧ ∀ j : ℕ, j₀ ≤ j → + ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ + ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → + D.f s ≠ 0 ∧ ‖logDeriv D.f s‖ ≤ C' * (Real.log (D.scale * ((j : ℝ) + 3))) ^ 2 := by + obtain ⟨C, hC, hpf⟩ := D.logDeriv_partial_fraction_of + exact good_heights_of_threshold ZC D.f D.scale D.hscale hj₀4 ht₀j₀ hC + (fun t ht => (hpf t ht).2) hA₀ hloc hball_mem + +/-- **Good heights**: for every j ≥ 7 there is R ∈ [j, j+1] such that on both horizontal segments +Im s = ±R, 1/2 ≤ Re s ≤ 2, ζ(s) ≠ 0 and ‖ζ'/ζ(s)‖ ≤ C log²(j+3). -/ +theorem good_heights_at : ∃ C : ℝ, 0 < C ∧ ∀ j : ℕ, 7 ≤ j → + ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ + ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → + riemannZeta s ≠ 0 ∧ ‖logDeriv riemannZeta s‖ ≤ C * (Real.log ((j : ℝ) + 3)) ^ 2 := by + obtain ⟨C, hC, hpf⟩ := zeta_logDeriv_partial_fraction + obtain ⟨A₀, hA₀, hloc⟩ := Zeta23.RvM.zetaZeroConfig_local_count + simpa [one_mul] using good_heights_of zetaZeroConfig riemannZeta 1 le_rfl hC + (by simpa [one_mul] using hpf) hA₀ hloc + (fun hρ hz => by rw [zetaZeroConfig_carrier]; exact isNontrivialZero_of_mem_closedBall (by norm_num) hρ hz) /-- **Good heights**, in the consumed shape: a height function `R_j ∈ [j+7, j+8]` (all `j : ℕ`) with ζ ≠ 0 and `‖ζ'/ζ‖ ≤ C_g log²(j+10)` on both horizontal lines `im = ±R_j`, `1/2 ≤ re ≤ 2` diff --git a/zeta23/Zeta23/WeilEF/Horizontal.lean b/zeta23/Zeta23/WeilEF/Horizontal.lean index 837c38c48d..e5a893d25a 100644 --- a/zeta23/Zeta23/WeilEF/Horizontal.lean +++ b/zeta23/Zeta23/WeilEF/Horizontal.lean @@ -4,15 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/WeilEF/Horizontal.lean — the horizontal sides of the explicit-formula rectangle vanish along -good heights (a sub-piece of `full_line_identity`). - -For `s = x ± iR_j`, `x ∈ [1−c, c] ⊂ [−1/2, 3/2]`: `‖H(s)‖ ≤ C_H/(1+R_j²)` (`norm_Hfn_le`), and -`‖Λ'/Λ(s)‖ ≤ K·log²(j+10)`: for `re s ≥ 1/2` split `Λ'/Λ = Γℝ'/Γℝ + ζ'/ζ` (`logDeriv_completedZeta`), -bound `ζ'/ζ` by the good-height hypothesis and `Γℝ'/Γℝ = −log π/2 + ψ(s/2)/2` by -`digamma_growth_strip`; for `re s < 1/2` reflect with `Λ'/Λ(s) = −Λ'/Λ(1−s)` -(`logDeriv_completedZeta_one_sub`), `1−s` lying on the opposite good horizontal. Hence -`‖HIntegral‖ ≤ (2c−1)·C_H·K·log²(j+10)/(1+R_j²) → 0`. +Zeta23/WeilEF/Horizontal.lean — Horizontal sides vanish along good heights +(instantiation of `Zeta23.WeilEF.horizontal_vanish_of_log_sq`). -/ import Zeta23.WeilEF.FullLine @@ -33,140 +26,44 @@ theorem horizontal_vanish {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCo (1 - c) c (R j)) atTop (𝓝 0) ∧ Tendsto (fun j : ℕ => HIntegral (fun s => Hfn k s * logDeriv completedRiemannZeta s) (1 - c) c (-(R j))) atTop (𝓝 0) := by - obtain ⟨CH, hCH0, hH⟩ := norm_Hfn_le hk hkc - obtain ⟨Cψ, hCψ, hψ⟩ := digamma_growth_strip - set Lg : ℕ → ℝ := fun j => Real.log ((j : ℝ) + 10) with hLgdef - have hLg1 : ∀ j : ℕ, 1 ≤ Lg j := fun j => by - rw [hLgdef, ← Real.log_exp 1] - refine Real.log_le_log (Real.exp_pos 1) ?_ - have := Real.exp_one_lt_d9 - have : (0 : ℝ) ≤ j := Nat.cast_nonneg j - linarith - have hlogπ : 0 < Real.log Real.pi := Real.log_pos (by linarith [Real.pi_gt_three]) - set K : ℝ := Real.log Real.pi / 2 + Cψ + Cg with hKdef - have hK0 : 0 < K := by positivity - -- ‖Λ'/Λ(s)‖ ≤ K log²(j+10) on the good horizontals, re s ∈ [1/2, 2] - have hright : ∀ (j : ℕ) (s : ℂ), (s.im = R j ∨ s.im = -R j) → 1/2 ≤ s.re → s.re ≤ 2 → - ‖logDeriv completedRiemannZeta s‖ ≤ K * (Lg j) ^ 2 := by + obtain ⟨CΓ, hCΓ, hΓ⟩ := norm_logDeriv_Gammaℝ_le + set K : ℝ := CΓ + Cg + have hLg1 : ∀ j : ℕ, 1 ≤ Real.log ((j : ℝ) + 10) := fun j => by + rw [← Real.log_exp 1] + exact Real.log_le_log (Real.exp_pos 1) (by linarith [Real.exp_one_lt_d9, Nat.cast_nonneg (α := ℝ) j]) + have hright : ∀ (j : ℕ) (s : ℂ), (s.im = R j ∨ s.im = -R j) → 1/2 ≤ s.re → s.re ≤ 3/2 → + ‖logDeriv completedRiemannZeta s‖ ≤ K * (Real.log ((j : ℝ) + 10)) ^ 2 := by intro j s hsim hre1 hre2 obtain ⟨hR1, hR2, hRs⟩ := hR j - have hj0 : (0:ℝ) ≤ j := Nat.cast_nonneg j - have hRj0 : 0 ≤ R j := by linarith - have him7 : 7 ≤ |s.im| := by - rcases hsim with h | h - · rw [h, abs_of_nonneg hRj0]; linarith - · rw [h, abs_neg, abs_of_nonneg hRj0]; linarith - have hs0 : s ≠ 0 := fun h => by rw [h] at him7; norm_num at him7 - have hs1 : s ≠ 1 := fun h => by rw [h] at him7; norm_num at him7 - obtain ⟨hζ, hLζ⟩ := hRs s hsim hre1 hre2 - have hre0 : 0 < s.re := by linarith - rw [logDeriv_completedZeta s hs1 hζ hre0, logDeriv_Gammaℝ hre0] - have hψs : ‖Complex.digamma (s / 2)‖ ≤ Cψ * Real.log (2 + |(s / 2).im|) := - hψ (s / 2) (by simp; linarith) (by simp; linarith) - have hlog2 : Real.log (2 + |(s / 2).im|) ≤ Lg j := by - have him8 : |s.im| ≤ (j : ℝ) + 8 := by - rcases hsim with h | h - · rw [h, abs_of_nonneg hRj0]; exact hR2 - · rw [h, abs_neg, abs_of_nonneg hRj0]; exact hR2 - have e : |(s / 2).im| = |s.im| / 2 := by simp [abs_div] - rw [e, hLgdef] - exact Real.log_le_log (by positivity) (by linarith) - have hLg2 : Lg j ≤ Lg j ^ 2 := by nlinarith [hLg1 j] - calc ‖-((Real.log Real.pi : ℝ) : ℂ) / 2 + 1 / 2 * Complex.digamma (s / 2) + logDeriv riemannZeta s‖ - ≤ ‖-((Real.log Real.pi : ℝ) : ℂ) / 2‖ + ‖(1 / 2 : ℂ) * Complex.digamma (s / 2)‖ - + ‖logDeriv riemannZeta s‖ := norm_add₃_le - _ = Real.log Real.pi / 2 + 1 / 2 * ‖Complex.digamma (s / 2)‖ + ‖logDeriv riemannZeta s‖ := by - rw [norm_div, norm_neg, Complex.norm_real, Real.norm_eq_abs, abs_of_pos hlogπ, norm_mul] - norm_num - _ ≤ Real.log Real.pi / 2 * Lg j ^ 2 + Cψ * Lg j ^ 2 + Cg * Lg j ^ 2 := by - have h1 : Real.log Real.pi / 2 ≤ Real.log Real.pi / 2 * Lg j ^ 2 := by - have : (1:ℝ) ≤ Lg j ^ 2 := by nlinarith [hLg1 j] - nlinarith - have h2 : 1 / 2 * ‖Complex.digamma (s / 2)‖ ≤ Cψ * Lg j ^ 2 := by - have := hψs.trans (mul_le_mul_of_nonneg_left (hlog2.trans hLg2) hCψ.le) - nlinarith [norm_nonneg (Complex.digamma (s / 2))] - linarith - _ = K * Lg j ^ 2 := by rw [hKdef]; ring - -- the same bound on the whole horizontal segment x ∈ [1-c, c], by reflection for x < 1/2 - have hall : ∀ (j : ℕ) (x y : ℝ), (y = R j ∨ y = -R j) → 1 - c ≤ x → x ≤ c → - ‖logDeriv completedRiemannZeta ((x : ℂ) + y * I)‖ ≤ K * (Lg j) ^ 2 := by - intro j x y hy hx1 hx2 - rcases le_or_gt (1/2 : ℝ) x with hx | hx - · exact hright j _ (by rcases hy with h | h <;> simp [h]) (by simpa using hx) - (by simp; linarith) - · -- reflect: s = 1 − s', s' := (1 − x) − y i on the opposite good horizontal - set s' : ℂ := ((1 - x : ℝ) : ℂ) + (-y) * I with hs'def - have him' : s'.im = -y := by simp [hs'def] - have hre' : s'.re = 1 - x := by simp [hs'def] - have hy0 : y ≠ 0 := by - obtain ⟨hR1, -, -⟩ := hR j - have hj0 : (0:ℝ) ≤ j := Nat.cast_nonneg j - have hRpos : 0 < R j := by linarith - rcases hy with h | h - · rw [h]; exact hRpos.ne' - · rw [h]; exact (neg_lt_zero.mpr hRpos).ne - have hs'0 : s' ≠ 0 := fun h => hy0 (by - have him0 := congrArg Complex.im h - rw [him'] at him0; simpa using him0) - have hs'1 : s' ≠ 1 := fun h => hy0 (by - have him1 := congrArg Complex.im h - rw [him'] at him1; simpa using him1) - have e : ((x : ℂ) + y * I) = 1 - s' := by - simp only [hs'def]; push_cast; ring - rw [e, logDeriv_completedZeta_one_sub s' hs'0 hs'1, norm_neg] - refine hright j s' ?_ (by rw [hre']; linarith) (by rw [hre']; linarith) - rw [him'] - rcases hy with h | h - · right; rw [h] - · left; rw [h, neg_neg] - -- integral bound along either horizontal - have hint : ∀ (j : ℕ) (y : ℝ), (y = R j ∨ y = -R j) → - ‖HIntegral (fun s => Hfn k s * logDeriv completedRiemannZeta s) (1 - c) c y‖ - ≤ CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| := by - intro j y hy - unfold HIntegral - refine intervalIntegral.norm_integral_le_of_norm_le_const fun x hx => ?_ - rw [Set.uIoc_of_le (by linarith)] at hx - have hy2 : y ^ 2 = (R j) ^ 2 := by rcases hy with h | h <;> simp [h] - dsimp only - rw [norm_mul, ← hy2] - exact mul_le_mul (hH x y (by linarith [hx.1]) (by linarith [hx.2])) - (hall j x y hy hx.1.le hx.2) (norm_nonneg _) (by positivity) - -- the majorant tends to 0 - set b : ℕ → ℝ := fun j => CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| with hbdef - have hLg_sq : ∀ j : ℕ, Lg j ^ 2 ≤ 4 * ((j : ℝ) + 10) := fun j => by - have hy0 : (0 : ℝ) ≤ (j : ℝ) + 10 := by positivity - have h := Real.log_le_rpow_div hy0 (by norm_num : (0:ℝ) < 1/2) - have hsq : (((j : ℝ) + 10) ^ (1/2 : ℝ)) ^ 2 = (j : ℝ) + 10 := by - rw [← Real.rpow_natCast, ← Real.rpow_mul hy0]; norm_num - have h0 : 0 ≤ Lg j := (zero_le_one.trans (hLg1 j)) - calc Lg j ^ 2 ≤ (((j : ℝ) + 10) ^ (1/2 : ℝ) / (1/2)) ^ 2 := pow_le_pow_left₀ h0 h 2 - _ = 4 * ((j : ℝ) + 10) := by rw [div_pow, hsq]; ring - have hb_le : ∀ j : ℕ, b j ≤ (8 * CH * K * |c - (1 - c)|) / ((j : ℝ) + 7) := fun j => by - obtain ⟨hR1, hR2, -⟩ := hR j have hj0 : (0 : ℝ) ≤ j := Nat.cast_nonneg j - have h1 : Lg j ^ 2 / (1 + R j ^ 2) ≤ 8 / ((j : ℝ) + 7) := by - rw [div_le_div_iff₀ (by positivity) (by positivity)] - have hR7 : ((j : ℝ) + 7) ^ 2 ≤ R j ^ 2 := pow_le_pow_left₀ (by positivity) hR1 2 - nlinarith [hLg_sq j, hR7, mul_le_mul_of_nonneg_right (hLg_sq j) (show (0:ℝ) ≤ (j:ℝ) + 7 by positivity), - sq_nonneg ((j:ℝ) + 7)] - have e : b j = CH * K * |c - (1 - c)| * (Lg j ^ 2 / (1 + R j ^ 2)) := by - rw [hbdef]; ring - rw [e] - calc CH * K * |c - (1 - c)| * (Lg j ^ 2 / (1 + R j ^ 2)) - ≤ CH * K * |c - (1 - c)| * (8 / ((j : ℝ) + 7)) := - mul_le_mul_of_nonneg_left h1 (by positivity) - _ = 8 * CH * K * |c - (1 - c)| / ((j : ℝ) + 7) := by ring - have hb0 : ∀ j, 0 ≤ b j := fun j => by rw [hbdef]; positivity - have hb : Tendsto b atTop (𝓝 0) := by - have hlim : Tendsto (fun j : ℕ => (8 * CH * K * |c - (1 - c)|) / ((j : ℝ) + 7)) atTop (𝓝 0) := - tendsto_const_nhds.div_atTop - (tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop) - exact squeeze_zero hb0 hb_le hlim - exact ⟨squeeze_zero_norm (fun j => hint j (R j) (Or.inl rfl)) hb, - squeeze_zero_norm (fun j => hint j (-(R j)) (Or.inr rfl)) hb⟩ + have habs : |s.im| = R j := by + rcases hsim with h | h <;> simp [h, abs_of_nonneg (by linarith : 0 ≤ R j)] + have hs1 : s ≠ 1 := fun h => by rw [h, Complex.one_im, abs_zero] at habs; linarith + obtain ⟨hζ, hLζ⟩ := hRs s hsim hre1 (by linarith) + rw [logDeriv_completedZeta s hs1 hζ (by linarith)] + have hGb : ‖logDeriv Complex.Gammaℝ s‖ ≤ CΓ * Real.log ((j : ℝ) + 10) := by + have h1 := hΓ s.re s.im hre1 hre2 + rw [Complex.re_add_im, habs] at h1 + exact h1.trans (mul_le_mul_of_nonneg_left + (Real.log_le_log (by linarith) (by linarith)) hCΓ.le) + have hLg2 : Real.log ((j : ℝ) + 10) ≤ (Real.log ((j : ℝ) + 10)) ^ 2 := by nlinarith [hLg1 j] + calc ‖logDeriv Complex.Gammaℝ s + logDeriv riemannZeta s‖ + ≤ ‖logDeriv Complex.Gammaℝ s‖ + ‖logDeriv riemannZeta s‖ := norm_add_le _ _ + _ ≤ CΓ * (Real.log ((j : ℝ) + 10)) ^ 2 + Cg * (Real.log ((j : ℝ) + 10)) ^ 2 := + add_le_add (hGb.trans (mul_le_mul_of_nonneg_left hLg2 hCΓ.le)) hLζ + _ = K * (Real.log ((j : ℝ) + 10)) ^ 2 := by dsimp [K]; ring + refine horizontal_vanish_of_log_sq hk hkc (by linarith) (by linarith) (K := K) (A := 1) + (by positivity) le_rfl (j₀ := 7) (by omega) fun j => ⟨(hR j).1, fun s hsim hre1 hre2 => ?_⟩ + rw [one_mul, show ((j : ℝ) + (7 : ℕ) + 3) = (j : ℝ) + 10 by push_cast; ring] + rcases le_or_gt (1/2 : ℝ) s.re with hx | hx + · exact hright j s hsim hx (by linarith) + · have hRj0 : 0 < R j := by linarith [(hR j).1, Nat.cast_nonneg (α := ℝ) j] + have him0 : s.im ≠ 0 := by rcases hsim with h | h <;> linarith + have hs'0 : 1 - s ≠ 0 := fun h => him0 (by have := congrArg Complex.im h; simp at this; exact this) + have hs'1 : 1 - s ≠ 1 := fun h => him0 (by have := congrArg Complex.im h; simp at this; exact this) + rw [show s = 1 - (1 - s) by ring, logDeriv_completedZeta_one_sub (1 - s) hs'0 hs'1, norm_neg] + exact hright j (1 - s) (hsim.elim (fun h => Or.inr (by simp [h])) (fun h => Or.inl (by simp [h]))) + (by simp; linarith) (by simp; linarith) end WeilEF end Zeta23 - -end diff --git a/zeta23/Zeta23/WeilEF/Landau.lean b/zeta23/Zeta23/WeilEF/Landau.lean index 5b6d356d64..8964e2763e 100644 --- a/zeta23/Zeta23/WeilEF/Landau.lean +++ b/zeta23/Zeta23/WeilEF/Landau.lean @@ -338,7 +338,7 @@ lemma finite_SetOfZeros {f : ℂ → ℂ} obtain ⟨z, hz, hρz⟩ := Set.mem_iUnion₂.mp (hs hρball) refine Set.mem_biUnion hz ?_ refine ⟨hρz, hsub1 hρball, ?_⟩ - simp only [Set.mem_setOf_eq, not_not] + simp only [Set.mem_ofPred_eq, not_not] exact hρ.2 /-- **Landau partial fraction on a general disk** (affine rescaling of the unit version): @@ -434,7 +434,7 @@ theorem logDeriv_partial_fraction_disk {f : ℂ → ℂ} {s₀ : ℂ} {R B : ℝ rw [analyticOrderNatAt, analyticOrderNatAt, hsmul, hcomp] refine ⟨Zg.image φ, ?_, ?_, ?_⟩ · ext ρ - simp only [Finset.coe_image, Set.mem_image, Finset.mem_coe, Set.mem_setOf_eq] + simp only [Finset.coe_image, Set.mem_image, Finset.mem_coe, Set.mem_ofPred_eq] constructor · rintro ⟨ρg, hρg, rfl⟩ obtain ⟨h1, h2⟩ := (hZgmem ρg).mp hρg @@ -505,156 +505,153 @@ theorem logDeriv_partial_fraction_disk {f : ℂ → ℂ} {s₀ : ℂ} {R B : ℝ end UnitDisk -/-- **Partial fraction for ζ'/ζ at height t** (|t| ≥ 6): there is a finite set Z — exactly the -ζ-zeros within distance (22/25)·(91/50) of 2+it — such that on the ball of radius 3/2 around -2+it (covering 1/2 ≤ Re s ≤ 2 at height t), away from zeros, -ζ'/ζ(s) = Σ_{ρ ∈ Z} m_ρ/(s−ρ) + O(log(|t|+3)). -/ -theorem zeta_logDeriv_partial_fraction : ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, 6 ≤ |t| → +/-- Bundled two-line analyticity, lower bound on `Re s = 2`, and polynomial growth on the +`(24/25)·(91/50)`-disk around `2 + i t` for `|t| ≥ t₀`, feeding Landau's partial fraction and +good-heights factories uniformly for `ζ`, `L(s, χ)`, `ξ'/Γℝ`, and `hardyW`. -/ +structure TwoLineLandauData where + f : ℂ → ℂ + scale : ℝ + t₀ : ℝ + c₀ : ℝ + C₀ : ℝ + A : ℝ + hscale : 1 ≤ scale + hc₀ : 0 < c₀ + hC₀ : 0 < C₀ + hA : 0 ≤ A + hfa : ∀ t : ℝ, t₀ ≤ |t| → AnalyticOnNhd ℂ f (Metric.closedBall (2 + t * I) (91 / 50)) + hlow : ∀ t : ℝ, t₀ ≤ |t| → c₀ ≤ ‖f (2 + t * I)‖ + hgrow : ∀ t : ℝ, t₀ ≤ |t| → ∀ w ∈ Metric.closedBall (2 + t * I) (24 / 25 * (91 / 50)), + ‖f w‖ ≤ C₀ * (scale * (|t| + 3)) ^ A + +/-- **Generic two-line Landau partial fraction**: from `TwoLineLandauData`, for `|t| ≥ D.t₀`, +`D.f (2 + i t) ≠ 0`, there is a finite set `Z` of zeros in the `(22/25)·(91/50)`-ball around +`2 + i t` with total multiplicity and partial-fraction remainder on the `3/2`-ball both +`≤ C · log (D.scale * (|t| + 3))`. -/ +theorem TwoLineLandauData.logDeriv_partial_fraction_of (D : TwoLineLandauData) : + ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, D.t₀ ≤ |t| → + D.f (2 + t * I) ≠ 0 ∧ ∃ Z : Finset ℂ, - (↑Z = {ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) | riemannZeta ρ = 0}) ∧ - ((∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ C * Real.log (|t| + 3)) ∧ - ∀ s ∈ Metric.closedBall (2 + t * I) (3/2), riemannZeta s ≠ 0 → - ‖logDeriv riemannZeta s - ∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℂ) / (s - ρ)‖ - ≤ C * Real.log (|t| + 3) := by - obtain ⟨A, C₀, hC₀, hgrow⟩ := Zeta23.RvM.zeta_growth_quarter - set A' : ℝ := max A 0 with hA' - have hA'0 : 0 ≤ A' := le_max_right _ _ - have hCpos : (0:ℝ) < (44795000 * 50 / 91) * (Real.log 3 + Real.log (C₀ + 2) + A' + 1) := by - have h1 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have h2 : (0:ℝ) ≤ Real.log (C₀ + 2) := Real.log_nonneg (by linarith) - positivity - refine ⟨(44795000 * 50 / 91) * (Real.log 3 + Real.log (C₀ + 2) + A' + 1), hCpos, - fun t ht => ?_⟩ + ((Z : Set ℂ) = {ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) | D.f ρ = 0}) ∧ + ((∑ ρ ∈ Z, (analyticOrderNatAt D.f ρ : ℝ)) ≤ C * Real.log (D.scale * (|t| + 3))) ∧ + ∀ s ∈ Metric.closedBall (2 + t * I) (3/2), D.f s ≠ 0 → + ‖logDeriv D.f s - ∑ ρ ∈ Z, (analyticOrderNatAt D.f ρ : ℂ) / (s - ρ)‖ + ≤ C * Real.log (D.scale * (|t| + 3)) := by + set M : ℝ := max (D.C₀ / D.c₀) 2 with hM + have hM2 : 2 ≤ M := le_max_right _ _ + have hM_ratio : D.C₀ / D.c₀ ≤ M := le_max_left _ _ + have hlogM : 0 < Real.log M := Real.log_pos (by linarith) + set C : ℝ := (44795000 * 50 / 91) * (Real.log M + D.A) with hC + have hCpos : 0 < C := by rw [hC]; have := D.hA; positivity + refine ⟨C, hCpos, fun t ht => ?_⟩ set s₀ : ℂ := 2 + t * I with hs₀ - have hs₀re : s₀.re = 2 := by simp [hs₀] - have hs₀im : s₀.im = t := by simp [hs₀] - have hζs₀ : riemannZeta s₀ ≠ 0 := - riemannZeta_ne_zero_of_one_lt_re (by rw [hs₀re]; norm_num) - have hlow : (1/3 : ℝ) ≤ ‖riemannZeta s₀‖ := Zeta23.RvM.zeta_lower_bound_two t - -- analyticity on the closed ball of radius 91/50 - have hone : (1 : ℂ) ∉ Metric.closedBall s₀ (91/50) := by - intro h - rw [Metric.mem_closedBall, Complex.dist_eq] at h - have him : ((1 : ℂ) - s₀).im = -t := by simp [hs₀] - have : |t| ≤ ‖(1 : ℂ) - s₀‖ := by - calc |t| = |((1:ℂ) - s₀).im| := by rw [him, abs_neg] - _ ≤ ‖(1:ℂ) - s₀‖ := Complex.abs_im_le_norm _ - linarith - have hfa : AnalyticOnNhd ℂ riemannZeta (Metric.closedBall s₀ (91/50)) := - Zeta23.RvM.analyticOnNhd_riemannZeta hone - -- the B-bound on the (24/25)·(91/50)-ball - set B : ℝ := 3 * (C₀ * (|t| + 2) ^ A' + 2) with hB - have ht2 : (1:ℝ) ≤ |t| + 2 := by linarith - have hpow1 : (1:ℝ) ≤ (|t| + 2) ^ A' := Real.one_le_rpow ht2 hA'0 - have hB2 : 2 ≤ B := by - rw [hB] - nlinarith [mul_nonneg hC₀.le (le_trans zero_le_one hpow1)] - have hfB : ∀ w ∈ Metric.closedBall s₀ (24/25 * (91/50)), ‖riemannZeta w‖ ≤ B * ‖riemannZeta s₀‖ := by - intro w hw - rw [Metric.mem_closedBall, Complex.dist_eq] at hw - have hwre : |w.re - 2| ≤ 24/25 * (91/50) := by - have := Complex.abs_re_le_norm (w - s₀) - have hre : (w - s₀).re = w.re - 2 := by simp [hs₀] - rw [hre] at this - linarith - have hwim : |w.im - t| ≤ 24/25 * (91/50) := by - have := Complex.abs_im_le_norm (w - s₀) - have him : (w - s₀).im = w.im - t := by simp [hs₀] - rw [him] at this - linarith - have hwim1 : 1 ≤ |w.im| := by - have h3 : |t| - |w.im| ≤ |t - w.im| := abs_sub_abs_le_abs_sub t w.im - have h4 : |t - w.im| = |w.im - t| := abs_sub_comm t w.im - linarith [hwim] - have hwimt : |w.im| ≤ |t| + 2 := by - have := abs_sub_abs_le_abs_sub w.im t - have h2 : |w.im| - |t| ≤ |w.im - t| := this - linarith [hwim] - have hbound : ‖riemannZeta w‖ ≤ C₀ * (|t| + 2) ^ A' + 2 := by - rcases le_or_gt w.re 2 with hre2 | hre2 - · have h14 : (1/4 : ℝ) ≤ w.re := by - rw [abs_le] at hwre - linarith - have := hgrow w h14 hre2 hwim1 - calc ‖riemannZeta w‖ ≤ C₀ * |w.im| ^ A := this - _ ≤ C₀ * (|t| + 2) ^ A' := by - refine mul_le_mul_of_nonneg_left ?_ hC₀.le - calc |w.im| ^ A ≤ |w.im| ^ A' := - Real.rpow_le_rpow_of_exponent_le hwim1 (le_max_left _ _) - _ ≤ (|t| + 2) ^ A' := Real.rpow_le_rpow (by linarith) hwimt hA'0 - _ ≤ C₀ * (|t| + 2) ^ A' + 2 := by linarith - · have := Zeta23.RvM.norm_riemannZeta_le_of_two_le_re (s := w) (by linarith) - have hπ : (Real.pi : ℝ) ^ 2 / 6 ≤ 2 := by nlinarith [Real.pi_lt_d2, Real.pi_gt_three] - calc ‖riemannZeta w‖ ≤ Real.pi ^ 2 / 6 := this - _ ≤ 2 := hπ - _ ≤ C₀ * (|t| + 2) ^ A' + 2 := by - nlinarith [mul_nonneg hC₀.le (le_trans zero_le_one hpow1)] - calc ‖riemannZeta w‖ ≤ C₀ * (|t| + 2) ^ A' + 2 := hbound - _ = (B * (1/3)) := by rw [hB]; ring - _ ≤ B * ‖riemannZeta s₀‖ := by - refine mul_le_mul_of_nonneg_left hlow (by rw [hB]; positivity) - obtain ⟨Z, hZset, hZcount, hZpf⟩ := logDeriv_partial_fraction_disk (f := riemannZeta) - (by norm_num : (0:ℝ) < 91/50) hfa hζs₀ hB2 hfB - -- logarithmic bookkeeping shared by the count bound and the partial-fraction bound - have hT3 : (2:ℝ) ≤ Real.log (|t| + 3) := by + have hlow : D.c₀ ≤ ‖D.f s₀‖ := D.hlow t ht + have hne : D.f s₀ ≠ 0 := by intro h; rw [h, norm_zero] at hlow; linarith [D.hc₀] + have hqt3 : (3 : ℝ) ≤ D.scale * (|t| + 3) := by nlinarith [D.hscale, abs_nonneg t] + have hlog1 : (1 : ℝ) ≤ Real.log (D.scale * (|t| + 3)) := by rw [Real.le_log_iff_exp_le (by linarith)] - have h1 := Real.exp_one_lt_d9 - calc Real.exp 2 = Real.exp 1 * Real.exp 1 := by rw [← Real.exp_add]; norm_num - _ ≤ 2.7182818286 * 2.7182818286 := by nlinarith [Real.exp_pos 1] - _ ≤ 9 := by norm_num - _ ≤ |t| + 3 := by linarith - have hlogB : Real.log B ≤ (Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3) := by - have h1 : B ≤ 3 * ((C₀ + 2) * (|t| + 2) ^ A') := by - rw [hB] - nlinarith [hpow1, hC₀] - have h2 : Real.log B ≤ Real.log (3 * ((C₀ + 2) * (|t| + 2) ^ A')) := - Real.log_le_log (by rw [hB]; positivity) h1 - rw [Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity), - Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity), - Real.log_mul (by positivity : (C₀ + 2 : ℝ) ≠ 0) (by positivity), - Real.log_rpow (by linarith : (0:ℝ) < |t| + 2)] at h2 - have h3 : Real.log (|t| + 2) ≤ Real.log (|t| + 3) := - Real.log_le_log (by linarith) (by linarith) - have h4 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have h5 : (0:ℝ) ≤ Real.log (C₀ + 2) := Real.log_nonneg (by linarith) - have hBeq : Real.log B = Real.log 3 + Real.log (C₀ * (|t| + 2) ^ A' + 2) := by - rw [hB, Real.log_mul (by norm_num : (3:ℝ) ≠ 0) (by positivity)] - rw [hBeq] - nlinarith [mul_nonneg hA'0 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - Real.log (|t|+2)), - mul_nonneg h4 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - 1), - mul_nonneg h5 (by linarith : (0:ℝ) ≤ Real.log (|t|+3) - 1), hT3] - have h4 : (0:ℝ) ≤ Real.log 3 := Real.log_nonneg (by norm_num) - have h5 : (0:ℝ) ≤ Real.log (C₀ + 2) := Real.log_nonneg (by linarith) - refine ⟨Z, ?_, ?_, ?_⟩ - · rw [hZset] + linarith [Real.exp_one_lt_d9] + set B : ℝ := M * (D.scale * (|t| + 3)) ^ D.A with hB + have hpow1 : (1 : ℝ) ≤ (D.scale * (|t| + 3)) ^ D.A := Real.one_le_rpow (by linarith) D.hA + have hB2 : 2 ≤ B := by rw [hB]; nlinarith + have hfB : ∀ w ∈ Metric.closedBall s₀ (24/25 * (91/50)), ‖D.f w‖ ≤ B * ‖D.f s₀‖ := by + intro w hw + calc ‖D.f w‖ ≤ D.C₀ * (D.scale * (|t| + 3)) ^ D.A := D.hgrow t ht w hw + _ = (D.C₀ / D.c₀) * (D.scale * (|t| + 3)) ^ D.A * D.c₀ := by + have := D.hc₀.ne'; field_simp + _ ≤ M * (D.scale * (|t| + 3)) ^ D.A * ‖D.f s₀‖ := by + have h1 : (D.C₀ / D.c₀) * (D.scale * (|t| + 3)) ^ D.A ≤ B := by + rw [hB]; exact mul_le_mul_of_nonneg_right hM_ratio (by linarith) + exact mul_le_mul h1 hlow D.hc₀.le (by linarith) + obtain ⟨Z, hZset, hZcount, hZpf⟩ := logDeriv_partial_fraction_disk (f := D.f) + (by norm_num : (0:ℝ) < 91/50) (D.hfa t ht) hne hB2 hfB + have hlogB : Real.log B ≤ (Real.log M + D.A) * Real.log (D.scale * (|t| + 3)) := by + rw [hB, Real.log_mul (by linarith) (by positivity), Real.log_rpow (by linarith)] + nlinarith [mul_nonneg hlogM.le (by linarith : (0:ℝ) ≤ Real.log (D.scale * (|t| + 3)) - 1)] + have hlogBnn : 0 ≤ Real.log B := Real.log_nonneg (by linarith) + refine ⟨hne, Z, hZset, ?_, ?_⟩ · refine hZcount.trans ?_ - have hratio : ((24/25 : ℝ))/(22/25) = 12/11 := by norm_num + have hratio : ((24/25 : ℝ)) / (22/25) = 12/11 := by norm_num + have hlogpos : (0:ℝ) < Real.log ((24/25)/(22/25)) := by rw [hratio]; exact Real.log_pos (by norm_num) have hlog1211 : (1:ℝ)/12 ≤ Real.log ((24/25)/(22/25)) := by rw [hratio] have h := Real.log_le_sub_one_of_pos (show (0:ℝ) < 11/12 by norm_num) rw [show (11/12:ℝ) = (12/11)⁻¹ by norm_num, Real.log_inv] at h linarith - have hlogpos : (0:ℝ) < Real.log ((24/25)/(22/25)) := by - rw [hratio] - exact Real.log_pos (by norm_num) - have hlogBnn : (0:ℝ) ≤ Real.log B := Real.log_nonneg (by linarith) calc 1 / Real.log ((24/25)/(22/25)) * Real.log B ≤ 12 * Real.log B := by refine mul_le_mul_of_nonneg_right ?_ hlogBnn - rw [div_le_iff₀ hlogpos] - linarith - _ ≤ 12 * ((Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3)) := + rw [div_le_iff₀ hlogpos]; linarith + _ ≤ 12 * ((Real.log M + D.A) * Real.log (D.scale * (|t| + 3))) := mul_le_mul_of_nonneg_left hlogB (by norm_num) - _ ≤ 44795000 * 50 / 91 * (Real.log 3 + Real.log (C₀ + 2) + A' + 1) * Real.log (|t| + 3) := by - nlinarith [hT3, hA'0] - · intro s hs hζs + _ ≤ C * Real.log (D.scale * (|t| + 3)) := by + rw [hC]; have := D.hA; nlinarith [mul_nonneg (by linarith : (0:ℝ) ≤ Real.log M + D.A) (by linarith : (0:ℝ) ≤ Real.log (D.scale * (|t| + 3)))] + · intro s hs hfs have hs' : s ∈ Metric.closedBall s₀ (83/100 * (91/50)) := Metric.closedBall_subset_closedBall (by norm_num) hs - refine (hZpf s hs' hζs).trans ?_ + refine (hZpf s hs' hfs).trans ?_ calc 44795000 / (91/50) * Real.log B - ≤ 44795000 / (91/50) * ((Real.log 3 + Real.log (C₀ + 2) + A') * Real.log (|t| + 3)) := + ≤ 44795000 / (91/50) * ((Real.log M + D.A) * Real.log (D.scale * (|t| + 3))) := mul_le_mul_of_nonneg_left hlogB (by norm_num) - _ ≤ (44795000 * 50 / 91) * (Real.log 3 + Real.log (C₀ + 2) + A' + 1) * Real.log (|t| + 3) := by - nlinarith [hT3, hA'0] + _ = C * Real.log (D.scale * (|t| + 3)) := by rw [hC]; ring + +/-- **Partial fraction for ζ'/ζ at height t** (|t| ≥ 6): there is a finite set Z — exactly the +ζ-zeros within distance (22/25)·(91/50) of 2+it — such that on the ball of radius 3/2 around +2+it (covering 1/2 ≤ Re s ≤ 2 at height t), away from zeros, +ζ'/ζ(s) = Σ_{ρ ∈ Z} m_ρ/(s−ρ) + O(log(|t|+3)). -/ +theorem zeta_logDeriv_partial_fraction : ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, 6 ≤ |t| → + ∃ Z : Finset ℂ, + (↑Z = {ρ ∈ Metric.closedBall (2 + t * I) (22/25 * (91/50)) | riemannZeta ρ = 0}) ∧ + ((∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ C * Real.log (|t| + 3)) ∧ + ∀ s ∈ Metric.closedBall (2 + t * I) (3/2), riemannZeta s ≠ 0 → + ‖logDeriv riemannZeta s - ∑ ρ ∈ Z, (analyticOrderNatAt riemannZeta ρ : ℂ) / (s - ρ)‖ + ≤ C * Real.log (|t| + 3) := by + obtain ⟨A, C₀, hC₀, hgrow⟩ := Zeta23.RvM.zeta_growth_quarter + let D : TwoLineLandauData := + { f := riemannZeta + scale := 1 + t₀ := 6 + c₀ := 1 / 3 + C₀ := C₀ + 2 + A := max A 0 + hscale := le_rfl + hc₀ := by norm_num + hC₀ := by linarith + hA := le_max_right _ _ + hfa := fun t ht => Zeta23.RvM.analyticOnNhd_riemannZeta fun h => by + rw [Metric.mem_closedBall, Complex.dist_eq] at h + have : |t| ≤ ‖(1 : ℂ) - (2 + t * I)‖ := by + simpa [Complex.sub_im] using Complex.abs_im_le_norm ((1 : ℂ) - (2 + t * I)) + linarith + hlow := fun t _ => Zeta23.RvM.zeta_lower_bound_two t + hgrow := fun t ht w hw => by + rw [Metric.mem_closedBall, Complex.dist_eq] at hw + have hwre : |w.re - 2| ≤ 24/25 * (91/50) := by + have := Complex.abs_re_le_norm (w - (2 + t * I)) + simp at this; linarith + have hwim : |w.im - t| ≤ 24/25 * (91/50) := by + have := Complex.abs_im_le_norm (w - (2 + t * I)) + simp at this; linarith + have hpow1 : (1 : ℝ) ≤ (1 * (|t| + 3)) ^ max A 0 := + Real.one_le_rpow (by linarith [abs_nonneg t]) (le_max_right _ _) + rcases le_or_gt w.re 2 with hre2 | hre2 + · have hwim1 : 1 ≤ |w.im| := by + have := abs_sub_abs_le_abs_sub t w.im; rw [abs_sub_comm] at this; linarith + have hwimt : |w.im| ≤ 1 * (|t| + 3) := by + have := abs_sub_abs_le_abs_sub w.im t; linarith + calc ‖riemannZeta w‖ ≤ C₀ * |w.im| ^ A := + hgrow w (by rw [abs_le] at hwre; linarith) hre2 hwim1 + _ ≤ C₀ * (1 * (|t| + 3)) ^ max A 0 := by + refine mul_le_mul_of_nonneg_left ?_ hC₀.le + exact (Real.rpow_le_rpow_of_exponent_le hwim1 (le_max_left _ _)).trans + (Real.rpow_le_rpow (by linarith) hwimt (le_max_right _ _)) + _ ≤ (C₀ + 2) * (1 * (|t| + 3)) ^ max A 0 := by nlinarith + · have hπ : (Real.pi : ℝ) ^ 2 / 6 ≤ 2 := by nlinarith [Real.pi_lt_d2, Real.pi_gt_three] + calc ‖riemannZeta w‖ ≤ Real.pi ^ 2 / 6 := + Zeta23.RvM.norm_riemannZeta_le_of_two_le_re (s := w) (by linarith) + _ ≤ 2 := hπ + _ ≤ (C₀ + 2) * (1 * (|t| + 3)) ^ max A 0 := by nlinarith } + obtain ⟨C, hC, hpf⟩ := D.logDeriv_partial_fraction_of + exact ⟨C, hC, fun t ht => by simpa [D, one_mul] using (hpf t ht).2⟩ end WeilEF diff --git a/zeta23/Zeta23/WeilEF/Main.lean b/zeta23/Zeta23/WeilEF/Main.lean index 75a3ef8d5e..937a8ee3cf 100644 --- a/zeta23/Zeta23/WeilEF/Main.lean +++ b/zeta23/Zeta23/WeilEF/Main.lean @@ -4,9 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/WeilEF/Main.lean — Final assembly: EF_lit for the concrete ζ zero configuration. +Zeta23/WeilEF/Main.lean — Final assembly: EF_lit for the concrete ζ zero configuration, +plus shared prime-sum finiteness and leg-negation helpers reused by `ThmE/MainChi.lean`. -/ -import Zeta23.WeilEF.ZeroSummability import Zeta23.WeilEF.FullLineAssembly noncomputable section @@ -17,9 +17,8 @@ namespace WeilEF open Complex MeasureTheory open scoped ArithmeticFunction - /-- Mirror identity: the left-line test factor is the right-line factor of the reflected test -function: H_k(1 − c − it) = H_{k∘neg}(c + it). -/ +function: `H_k(1 − c − it) = H_{k∘neg}(c + it)`. -/ theorem Hfn_mirror (k : ℝ → ℂ) (c t : ℝ) : Hfn k (1 - c - t * I) = Hfn (fun u => k (-u)) ((c:ℂ) + t * I) := by rw [Hfn_line] @@ -30,96 +29,62 @@ theorem Hfn_mirror (k : ℝ → ℂ) (c t : ℝ) : have harg : I * ((1 - (c:ℂ) - t * I - 1/2) / I) * u = (((- ((c - 1/2) * u) : ℝ)) : ℂ) + I * ↑t * ↑(-u : ℝ) := by have hI : (I : ℂ) ≠ 0 := I_ne_zero - field_simp - push_cast - ring - rw [harg, Complex.exp_add, ← Complex.ofReal_exp] - push_cast - ring + field_simp; push_cast; ring + rw [harg, Complex.exp_add, ← Complex.ofReal_exp]; push_cast; ring_nf + +/-- Finite-support summability of `n ↦ cf n * (Λ n / √n) * g (log n)` for any compactly +supported `g : ℝ → ℂ` and arbitrary coefficients `cf : ℕ → ℂ`. -/ +theorem summable_vonMangoldt_mul_compact (cf : ℕ → ℂ) {g : ℝ → ℂ} (hgc : HasCompactSupport g) : + Summable (fun n : ℕ => cf n * ((Λ n / Real.sqrt n : ℝ) : ℂ) * g (Real.log n)) := by + obtain ⟨B₁, hB₁⟩ := Zeta23.EF.exists_abs_le_of_hasCompactSupport hgc + refine summable_of_hasFiniteSupport ((Set.finite_Iic ⌈Real.exp (max B₁ 0)⌉₊).subset fun n hn => ?_) + rw [Function.mem_support] at hn + have hgne : g (Real.log n) ≠ 0 := fun h => hn (by rw [h, mul_zero]) + have hn0 : n ≠ 0 := by rintro rfl; simp at hn + have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr hn0 + have hle : (n : ℝ) ≤ Real.exp (max B₁ 0) := by + calc (n : ℝ) = Real.exp (Real.log n) := (Real.exp_log (by linarith)).symm + _ ≤ Real.exp (max B₁ 0) := + Real.exp_le_exp.mpr ((le_abs_self _).trans ((hB₁ _ hgne).trans (le_max_left _ _))) + exact Set.mem_Iic.mpr (by exact_mod_cast hle.trans (Nat.le_ceil _)) -/-- The literature-form Weil explicit formula holds for Mathlib's ζ -(zero set = IsNontrivialZero, multiplicities = analyticOrderAt). Together with Zeta23.EF.explicitFormulaPaper_of_lit + GammaFacts this yields -ExplicitFormulaPaper (zetaZeros hs) outright. +/-- Sign flip for a prime-side vertical line integral. -/ +theorem prime_leg_of_neg {φ L : ℝ → ℂ} {S : ℂ} + (h : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, φ t * (-L t) = S) : + (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, φ t * L t = -S := by + have h2 : (∫ t : ℝ, φ t * (-L t)) = -∫ t : ℝ, φ t * L t := by + rw [← integral_neg]; congr 1; funext t; ring + rw [h2] at h; linear_combination -h -Assembly: full_line_identity (Contour) splits via logDeriv_completedZeta (XiLogDeriv) into -• ζ-part = prime_side_line (k) + prime_side_line (k ∘ Neg.neg), - giving −Σ Λ(n)n^{−1/2}(k(log n) + k(−log n)) after sign bookkeeping, -• Γℝ-part = gamma_line_shift + gammaR_bracket → (1/2π)∫ h(r)[Re ψ(1/4+ir/2) − log π]dr, -• zero side: Σ' m_ρ H(ρ) with H(ρ) = h(γ_ρ) (Hfn at ρ = paperFT k ((ρ−1/2)/i) = h(γ_ρ) by - gammaOf's definition), pole side: H(0) = h(i/2), H(1) = h(−i/2); -EF_lit's Summable clause = EF_zero_sum_summable (ZeroSummability). -/ +/-- The literature-form Weil explicit formula holds for Mathlib's ζ. -/ theorem EF_lit_zeta (hs : ZetaSeam) : Zeta23.EF.EF_lit (zetaZeros hs) := by intro k hk hkc refine ⟨EF_zero_sum_summable hs hk hkc, ?_⟩ - -- Fix c := 5/4; split LΛ = LΓℝ + Lζ on the line; evaluate the three parts; rearrange. have h54a : (1:ℝ) < 5/4 := by norm_num have h54b : (5/4:ℝ) ≤ 3/2 := by norm_num have hkneg2 : ContDiff ℝ 2 (fun u : ℝ => k (-u)) := hk.comp contDiff_neg - have hknegc : HasCompactSupport (fun u : ℝ => k (-u)) := by - have := hkc.comp_homeomorph (Homeomorph.neg ℝ) - exact this + have hknegc : HasCompactSupport (fun u : ℝ => k (-u)) := hkc.comp_homeomorph (Homeomorph.neg ℝ) have hfull := full_line_identity hs hk hkc h54a h54b - -- pointwise split of Λ'/Λ on the line Re = 5/4 - have hsne : ∀ t : ℝ, ((5/4:ℝ) : ℂ) + t * I ≠ 0 ∧ ((5/4:ℝ) : ℂ) + t * I ≠ 1 - ∧ riemannZeta (((5/4:ℝ) : ℂ) + t * I) ≠ 0 ∧ 0 < ((((5/4:ℝ) : ℂ)) + t * I).re := by - intro t - have hre : ((((5/4:ℝ) : ℂ)) + t * I).re = 5/4 := by simp - refine ⟨fun h => ?_, fun h => ?_, riemannZeta_ne_zero_of_one_lt_re (by rw [hre]; norm_num), by - rw [hre]; norm_num⟩ - · rw [h] at hre - simp at hre - linarith - · rw [h] at hre - simp at hre - linarith - have hsplit : ∀ t : ℝ, logDeriv completedRiemannZeta (((5/4:ℝ):ℂ) + t * I) - = logDeriv Complex.Gammaℝ (((5/4:ℝ):ℂ) + t * I) - + logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) := by - intro t - obtain ⟨h0, h1, hζ, hpos⟩ := hsne t - exact logDeriv_completedZeta _ h1 hζ hpos - -- notation have hH2eq : ∀ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) = Hfn (fun u => k (-u)) (((5/4:ℝ):ℂ) + t * I) := fun t => Hfn_mirror k (5/4) t - -- integrability of the ζ-parts have hint1 : Integrable (fun t : ℝ => Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) := integrable_Hfn_mul_logDeriv_zeta hk hkc h54a h54b have hint2 : Integrable (fun t : ℝ => Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) := by - have heq : (fun t : ℝ => Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) - = fun t : ℝ => Hfn (fun u => k (-u)) (((5/4:ℝ):ℂ) + t * I) - * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) := by - funext t - rw [hH2eq t] - rw [heq] - exact integrable_Hfn_mul_logDeriv_zeta hkneg2 hknegc h54a h54b + simpa only [hH2eq] using integrable_Hfn_mul_logDeriv_zeta hkneg2 hknegc h54a h54b have hintζ : Integrable (fun t : ℝ => (Hfn k (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) := by - refine (hint1.add hint2).congr (Filter.Eventually.of_forall fun t => ?_) - simp only [Pi.add_apply] - ring - -- integrability of the Γℝ-part + + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) := + (hint1.add hint2).congr (Filter.Eventually.of_forall fun t => by simp only [Pi.add_apply]; ring) have hintΓ1 : Integrable (fun t : ℝ => Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv Complex.Gammaℝ (((5/4:ℝ):ℂ) + t * I)) := integrable_Hfn_mul_logDeriv_Gammaℝ hk hkc (by norm_num) (by norm_num) have hintΓ2 : Integrable (fun t : ℝ => Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv Complex.Gammaℝ (((5/4:ℝ):ℂ) + t * I)) := by - have heq : (fun t : ℝ => Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv Complex.Gammaℝ (((5/4:ℝ):ℂ) + t * I)) - = fun t : ℝ => Hfn (fun u => k (-u)) (((5/4:ℝ):ℂ) + t * I) - * logDeriv Complex.Gammaℝ (((5/4:ℝ):ℂ) + t * I) := by - funext t - rw [hH2eq t] - rw [heq] - exact integrable_Hfn_mul_logDeriv_Gammaℝ hkneg2 hknegc (σ := 5/4) (by norm_num) (by norm_num) + simpa only [hH2eq] using integrable_Hfn_mul_logDeriv_Gammaℝ hkneg2 hknegc (σ := 5/4) (by norm_num) (by norm_num) have hintΓ : Integrable (fun t : ℝ => (Hfn k (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv Complex.Gammaℝ (((5/4:ℝ):ℂ) + t * I)) := by - refine (hintΓ1.add hintΓ2).congr (Filter.Eventually.of_forall fun t => ?_) - simp only [Pi.add_apply] - ring - -- split the full-line integral + + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv Complex.Gammaℝ (((5/4:ℝ):ℂ) + t * I)) := + (hintΓ1.add hintΓ2).congr (Filter.Eventually.of_forall fun t => by simp only [Pi.add_apply]; ring) have hsplitint : (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv completedRiemannZeta (((5/4:ℝ):ℂ) + t * I)) = (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) @@ -127,146 +92,57 @@ theorem EF_lit_zeta (hs : ZetaSeam) : Zeta23.EF.EF_lit (zetaZeros hs) := by + ∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) := by rw [← integral_add hintΓ hintζ] - congr 1 - funext t + congr 1; funext t show (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv completedRiemannZeta (((5/4:ℝ):ℂ) + t * I) = _ - rw [hsplit t] - ring - -- ζ-part evaluation via prime_side_line (both lines) + rw [logDeriv_completedZeta_line h54a t]; ring have hζ1 : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) - = -∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by - have h := prime_side_line hk hkc h54a - have h2 : (∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) - * (-logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I))) - = -∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) - * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) := by - rw [← integral_neg] - congr 1 - funext t - ring - rw [h2] at h - linear_combination -h + = -∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := + prime_leg_of_neg (prime_side_line hk hkc h54a) have hζ2 : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) = -∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n) := by - have h := prime_side_line hkneg2 hknegc h54a - have h2 : (∫ t : ℝ, Hfn (fun u => k (-u)) (((5/4:ℝ):ℂ) + t * I) - * (-logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I))) - = -∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) := by - rw [← integral_neg] - congr 1 - funext t - rw [hH2eq t] - ring - rw [h2] at h - have h3 : (∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * (fun u => k (-u)) (Real.log n)) - = ∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n) := rfl - rw [h3] at h - linear_combination -h - -- Γ-part evaluation + have h := prime_leg_of_neg (prime_side_line hkneg2 hknegc h54a) + simpa only [hH2eq] using h have hΓeval : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv Complex.Gammaℝ (((5/4:ℝ):ℂ) + t * I) = (1 / (2 * Real.pi) : ℂ) * ∫ r : ℝ, paperFT k r * ((Zeta23.EF.gammaBracket r : ℝ) : ℂ) := by - congr 1 - rw [gamma_line_shift hk hkc h54a h54b] - congr 1 - funext t - rw [gammaR_bracket t] - congr 2 - unfold Zeta23.EF.gammaBracket - congr 3 - ring - -- pole values + congr 1; rw [gamma_line_shift hk hkc h54a h54b] + congr 1; funext t; rw [gammaR_bracket t] + congr 2; unfold Zeta23.EF.gammaBracket; congr 3; ring have hpole0 : Hfn k 0 = paperFT k (I / 2) := by - unfold Hfn - congr 1 - rw [div_eq_iff Complex.I_ne_zero, div_mul_eq_mul_div, Complex.I_mul_I] - norm_num + unfold Hfn; congr 1 + rw [div_eq_iff Complex.I_ne_zero, div_mul_eq_mul_div, Complex.I_mul_I]; norm_num have hpole1 : Hfn k 1 = paperFT k (-I / 2) := by - unfold Hfn - congr 1 - rw [div_eq_iff Complex.I_ne_zero] - rw [show (-I / 2) * I = -(I * I) / 2 by ring, Complex.I_mul_I] - norm_num - -- summability of the two prime sums (finite support) - obtain ⟨B₁, hB₁⟩ := Zeta23.EF.exists_abs_le_of_hasCompactSupport hkc - have hsummable_gen : ∀ (g : ℝ → ℂ), (∀ u, g u ≠ 0 → |u| ≤ max B₁ 0) → - Summable (fun n : ℕ => ((Λ n / Real.sqrt n : ℝ) : ℂ) * g (Real.log n)) := by - intro g hg - refine summable_of_hasFiniteSupport ?_ - have hsub : Function.support (fun n : ℕ => ((Λ n / Real.sqrt n : ℝ) : ℂ) * g (Real.log n)) - ⊆ Set.Iic ⌈Real.exp (max B₁ 0)⌉₊ := by - intro n hn - rw [Function.mem_support] at hn - have hgne : g (Real.log n) ≠ 0 := by - intro h - rw [h, mul_zero] at hn - exact hn rfl - have hlog := hg _ hgne - have hn0 : n ≠ 0 := by - rintro rfl - simp at hn - have hn1 : (1:ℝ) ≤ (n:ℝ) := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr hn0 - have : (n:ℝ) ≤ Real.exp (max B₁ 0) := by - have h2 : Real.log n ≤ max B₁ 0 := (le_abs_self _).trans hlog - calc (n:ℝ) = Real.exp (Real.log n) := (Real.exp_log (by linarith)).symm - _ ≤ Real.exp (max B₁ 0) := Real.exp_le_exp.mpr h2 - rw [Set.mem_Iic] - exact_mod_cast this.trans (Nat.le_ceil _) - exact (Set.finite_Iic _).subset hsub - have hsummable1 : Summable (fun n : ℕ => ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n)) := - hsummable_gen k (fun u hu => (hB₁ u hu).trans (le_max_left _ _)) - have hsummable2 : Summable (fun n : ℕ => ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n)) := by - refine hsummable_gen (fun u => k (-u)) (fun u hu => ?_) - have h2 := hB₁ (-u) hu - rw [abs_neg] at h2 - exact h2.trans (le_max_left _ _) - -- assemble + unfold Hfn; congr 1 + rw [div_eq_iff Complex.I_ne_zero, show (-I / 2) * I = -(I * I) / 2 by ring, Complex.I_mul_I]; norm_num + have hsum1 : Summable (fun n : ℕ => ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n)) := by + simpa using summable_vonMangoldt_mul_compact (fun _ => 1) hkc + have hsum2 : Summable (fun n : ℕ => ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n)) := by + simpa using summable_vonMangoldt_mul_compact (fun _ => 1) hknegc have hmerge : (∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n)) + (∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (-Real.log n)) = ∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * (k (Real.log n) + k (-Real.log n)) := by - rw [← Summable.tsum_add hsummable1 hsummable2] - refine tsum_congr fun n => ?_ - ring - -- paperFT k (gammaOf ρ) = Hfn k ρ definitionally - have hgammaOf : ∀ ρ : (zetaZeros hs).carrier, - paperFT k (gammaOf (ρ : ℂ)) = Hfn k (ρ : ℂ) := fun ρ => rfl + rw [← hsum1.tsum_add hsum2]; exact tsum_congr fun n => by ring + have hζboth : (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) + = -∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * (k (Real.log n) + k (-Real.log n)) := by + have hsum_int : (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) + * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) + = (∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) + + ∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) := by + rw [← integral_add hint1 hint2]; congr 1; funext t; ring + rw [hsum_int, mul_add, hζ1, hζ2, ← hmerge]; ring rw [Zeta23.EF.literatureRHS] calc ∑' ρ : (zetaZeros hs).carrier, ((zetaZeros hs).mult ρ : ℂ) * paperFT k (gammaOf (ρ:ℂ)) - = ∑' ρ : (zetaZeros hs).carrier, ((zetaZeros hs).mult ρ : ℂ) * Hfn k (ρ:ℂ) := by - refine tsum_congr fun ρ => by rw [hgammaOf ρ] + = ∑' ρ : (zetaZeros hs).carrier, ((zetaZeros hs).mult ρ : ℂ) * Hfn k (ρ:ℂ) := rfl _ = (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv completedRiemannZeta (((5/4:ℝ):ℂ) + t * I)) - + Hfn k 0 + Hfn k 1 := by - rw [hfull] - ring - _ = paperFT k (I / 2) + paperFT k (-I / 2) - - (∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * (k (Real.log n) + k (-Real.log n))) - + (1 / (2 * Real.pi) : ℂ) * ∫ r : ℝ, paperFT k r * ((Zeta23.EF.gammaBracket r : ℝ) : ℂ) := by - rw [hsplitint, mul_add, hΓeval, hpole0, hpole1] - have hζboth : (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) - + Hfn k (1 - (5/4:ℝ) - t * I)) * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) - = -∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * (k (Real.log n) + k (-Real.log n)) := by - have hsum2 : (∫ t : ℝ, (Hfn k (((5/4:ℝ):ℂ) + t * I) + Hfn k (1 - (5/4:ℝ) - t * I)) - * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) - = (∫ t : ℝ, Hfn k (((5/4:ℝ):ℂ) + t * I) - * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I)) - + ∫ t : ℝ, Hfn k (1 - (5/4:ℝ) - t * I) - * logDeriv riemannZeta (((5/4:ℝ):ℂ) + t * I) := by - rw [← integral_add hint1 hint2] - congr 1 - funext t - ring - rw [hsum2, mul_add, hζ1, hζ2, ← hmerge] - ring - rw [hζboth] - ring + + Hfn k 0 + Hfn k 1 := by rw [hfull]; ring + _ = _ := by rw [hsplitint, mul_add, hΓeval, hζboth, hpole0, hpole1]; ring -/-- **Hypothesis-free form**: [eq:EFstd] holds for the canonical -unconditional ζ zero configuration. -/ +/-- **Hypothesis-free form**: `[eq:EFstd]` holds for the canonical unconditional ζ zero configuration. -/ theorem EF_lit_zetaZeroConfig : Zeta23.EF.EF_lit zetaZeroConfig := EF_lit_zeta zetaSeam end WeilEF diff --git a/zeta23/Zeta23/WeilEF/VerticalLine.lean b/zeta23/Zeta23/WeilEF/VerticalLine.lean index cfc4a8b030..f5c4e485af 100644 --- a/zeta23/Zeta23/WeilEF/VerticalLine.lean +++ b/zeta23/Zeta23/WeilEF/VerticalLine.lean @@ -20,11 +20,10 @@ Zeta23.EF.norm_paperFT_mul_one_add_sq_le × Σ Λ(n)n^{−c} < ∞) gives the pr import Zeta23.WeilEF.XiLogDeriv import Zeta23.GammaFacts.StirlingVert import Mathlib.NumberTheory.LSeries.Dirichlet -import Zeta23.ExplicitFormula import Zeta23.ExplicitFormula.Bridge import Zeta23.WeilEF.GammaRBracket -import Zeta23.Poisson.PaperFT import Mathlib.Analysis.SpecialFunctions.JapaneseBracket +import Mathlib.Analysis.Normed.Group.FunctionSeries noncomputable section @@ -79,170 +78,215 @@ theorem tilted_inversion {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCom rfl +/-- The L-series term on the vertical line `Re s = c`, factored as `a n · n^{-c} · e^{-it log n}`. -/ +theorem LSeries_term_line (a : ℕ → ℂ) (c t : ℝ) {n : ℕ} (hn : n ≠ 0) : + LSeries.term a ((c : ℂ) + t * I) n + = a n * ((((n : ℝ) ^ (-c) : ℝ)) : ℂ) * cexp (-I * t * Real.log n) := by + have hn0 : (0 : ℝ) < (n : ℝ) := by exact_mod_cast Nat.pos_of_ne_zero hn + have hnC : (n : ℂ) ≠ 0 := by exact_mod_cast hn + rw [LSeries.term_of_ne_zero hn, div_eq_mul_inv, ← Complex.cpow_neg, + show (-((c : ℂ) + t * I)) = (-(c : ℂ)) + (-(I * t)) by ring, Complex.cpow_add _ _ hnC] + have h1 : (n : ℂ) ^ (-(c : ℂ)) = (((n : ℝ) ^ (-c) : ℝ) : ℂ) := by + rw [show (n : ℂ) = ((n : ℝ) : ℂ) by push_cast; rfl, + show (-(c : ℂ)) = ((-c : ℝ) : ℂ) by push_cast; rfl, ← Complex.ofReal_cpow hn0.le] + have h2 : (n : ℂ) ^ (-(I * t)) = cexp (-I * t * Real.log n) := by + rw [Complex.cpow_def_of_ne_zero hnC]; congr 1 + rw [show (n : ℂ) = ((n : ℝ) : ℂ) by push_cast; rfl, ← Complex.ofReal_log hn0.le]; ring + rw [h1, h2]; ring + +/-- Norm of the L-series term on the vertical line `Re s = c`. -/ +theorem norm_LSeries_term_line (a : ℕ → ℂ) (c t : ℝ) (n : ℕ) : + ‖LSeries.term a ((c : ℂ) + t * I) n‖ = if n = 0 then (0 : ℝ) else ‖a n‖ * ((n : ℝ) ^ (-c)) := by + rcases eq_or_ne n 0 with rfl | hn + · simp [LSeries.term_zero] + · rw [LSeries.term_of_ne_zero hn, norm_div, + Complex.norm_natCast_cpow_of_pos (Nat.pos_of_ne_zero hn), + show ((c : ℂ) + t * I).re = c by simp, if_neg hn, + Real.rpow_neg (Nat.cast_nonneg n), div_eq_mul_inv] + +/-- General per-n vertical-line integral: +`(1/2π) ∫ paperFT (tilt k (c − 1/2)) t · term_n(a, c+it) dt = a_n · n^{-1/2} · k(log n)`. -/ +theorem per_n_line_integral_gen {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) + (a : ℕ → ℂ) (c : ℝ) (n : ℕ) : + (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, + paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n + = a n / ((Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp [LSeries.term] + · have hn0 : (0 : ℝ) < (n : ℝ) := by exact_mod_cast hn + simp_rw [LSeries_term_line a c _ hn.ne'] + have hre : (fun t : ℝ => paperFT (tilt k (c - 1/2)) t + * (a n * (((n : ℝ) ^ (-c) : ℝ) : ℂ) * cexp (-I * t * Real.log n))) + = fun t : ℝ => (a n * (((n : ℝ) ^ (-c) : ℝ) : ℂ)) + * (paperFT (tilt k (c - 1/2)) t * cexp (-I * t * Real.log n)) := by funext t; ring + rw [hre, Zeta23.EF.cintegral_const_mul, + show (1 / (2 * (Real.pi : ℂ))) * ((a n * (((n : ℝ) ^ (-c) : ℝ) : ℂ)) + * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * cexp (-I * t * Real.log n)) + = (a n * (((n : ℝ) ^ (-c) : ℝ) : ℂ)) + * ((1 / (2 * (Real.pi : ℂ))) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t + * cexp (-I * t * Real.log n)) from by ring, + tilted_inversion hk hkc (c - 1/2) (Real.log n)] + have hexp : Real.exp ((c - 1/2) * Real.log n) = (n : ℝ) ^ (c - 1/2) := by + rw [Real.rpow_def_of_pos hn0]; ring_nf + have hpow : ((n : ℝ) ^ (-c) : ℝ) * ((n : ℝ) ^ (c - 1/2) : ℝ) = 1 / Real.sqrt n := by + rw [← Real.rpow_add hn0, show -c + (c - 1 / 2) = -(1 / 2 : ℝ) by ring, + Real.rpow_neg hn0.le, Real.sqrt_eq_rpow, ← one_div] + rw [hexp] + calc a n * (((n : ℝ) ^ (-c) : ℝ) : ℂ) * (k (Real.log n) * (((n : ℝ) ^ (c - 1/2) : ℝ) : ℂ)) + = a n * ((((n : ℝ) ^ (-c) * (n : ℝ) ^ (c - 1/2) : ℝ)) : ℂ) * k (Real.log n) := by + push_cast; ring + _ = a n / ((Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by rw [hpow]; push_cast; ring + +/-- Continuity of each L-series term along the vertical line `Re s = c`. -/ +theorem continuous_LSeries_term_line (a : ℕ → ℂ) (c : ℝ) (n : ℕ) : + Continuous (fun t : ℝ => LSeries.term a ((c : ℂ) + t * I) n) := by + rcases eq_or_ne n 0 with rfl | hn + · simpa [LSeries.term_zero] using continuous_const + · simp only [LSeries.term_of_ne_zero hn] + exact continuous_const.div (Continuous.const_cpow (by fun_prop) (Or.inl (by exact_mod_cast hn))) + (fun _ => cpow_ne_zero_iff.mpr (Or.inl (by exact_mod_cast hn))) + +/-- Summable majorant of the vertical-line term norms. -/ +theorem summable_coeff_bound (a : ℕ → ℂ) (c : ℝ) + (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : + Summable (fun n : ℕ => if n = 0 then (0 : ℝ) else ‖a n‖ * ((n : ℝ) ^ (-c))) := + (summable_nat_add_iff 1).mp (((summable_nat_add_iff 1).mpr ha).congr fun _ => by simp) + +/-- Continuity of `t ↦ LSeries a (c + it)` under absolute convergence. -/ +theorem continuous_LSeries_line (a : ℕ → ℂ) (c : ℝ) + (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : + Continuous (fun t : ℝ => LSeries a ((c : ℂ) + t * I)) := + continuous_tsum (continuous_LSeries_term_line a c) (summable_coeff_bound a c ha) + (fun n t => le_of_eq (norm_LSeries_term_line a c t n)) + +/-- General tsum/integral swap on `Re s = c` for any absolutely convergent Dirichlet series. -/ +theorem line_integral_swap_gen {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) + (a : ℕ → ℂ) (c : ℝ) (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : + ∫ t : ℝ, (∑' n : ℕ, paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n) + = ∑' n : ℕ, ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n := by + have hpfi : Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t) := + Zeta23.EF.integrable_paperFT_ofReal + (Zeta23.EF.integrable_fourier_of_contDiff_two (tilt_contDiff hk _) (tilt_hasCompactSupport hkc _)) + have hint : ∀ n : ℕ, Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t + * LSeries.term a ((c : ℂ) + t * I) n) := fun n => + hpfi.mul_bdd (c := if n = 0 then (0 : ℝ) else ‖a n‖ * ((n : ℝ) ^ (-c))) + (continuous_LSeries_term_line a c n).aestronglyMeasurable + (Filter.Eventually.of_forall fun t => (norm_LSeries_term_line a c t n).le) + have hsum : Summable (fun n : ℕ => ∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t + * LSeries.term a ((c : ℂ) + t * I) n‖) := by + refine ((summable_coeff_bound a c ha).mul_left + (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t‖)).congr fun n => ?_ + rw [← integral_mul_const] + exact integral_congr_ae (Filter.Eventually.of_forall fun t => by + simp only [norm_mul, norm_LSeries_term_line]) + exact (MeasureTheory.hasSum_integral_of_summable_integral_norm hint hsum).tsum_eq.symm + +/-- **General Dirichlet-line integral**: +`(1/2π) ∫_ℝ H(c+it) · L(a, c+it) dt = Σ_N a_N N^{-1/2} k(log N)`, plus integrability. -/ +theorem dirichlet_line {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (c : ℝ) + (a : ℕ → ℂ) (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : + Integrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * LSeries a ((c : ℂ) + t * I)) ∧ + (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, Hfn k ((c : ℂ) + t * I) * LSeries a ((c : ℂ) + t * I)) + = ∑' N : ℕ, a N / ((Real.sqrt N : ℝ) : ℂ) * k (Real.log N) := by + have hpfi : Integrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I)) := + (Zeta23.EF.integrable_paperFT_ofReal + (Zeta23.EF.integrable_fourier_of_contDiff_two (tilt_contDiff hk _) + (tilt_hasCompactSupport hkc _))).congr + (Filter.Eventually.of_forall fun t => (Hfn_line k c t).symm) + refine ⟨hpfi.mul_bdd (c := ∑' n : ℕ, (if n = 0 then (0 : ℝ) else ‖a n‖ * ((n : ℝ) ^ (-c)))) + (continuous_LSeries_line a c ha).aestronglyMeasurable + (Filter.Eventually.of_forall fun t => by + have hs : Summable (fun n : ℕ => ‖LSeries.term a ((c : ℂ) + t * I) n‖) := + (summable_coeff_bound a c ha).congr fun n => (norm_LSeries_term_line a c t n).symm + exact (norm_tsum_le_tsum_norm hs).trans_eq + (tsum_congr fun n => norm_LSeries_term_line a c t n)), ?_⟩ + have h1 : ∀ t : ℝ, Hfn k (c + t * I) * LSeries a (c + t * I) + = ∑' n : ℕ, paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n := fun t => by + rw [Hfn_line, LSeries, ← tsum_mul_left] + calc (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, Hfn k (c + t * I) * LSeries a (c + t * I) + = (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, ∑' n : ℕ, paperFT (tilt k (c - 1/2)) t + * LSeries.term a (c + t * I) n := by rw [integral_congr_ae (Filter.Eventually.of_forall h1)] + _ = (1 / (2 * Real.pi) : ℂ) * ∑' n : ℕ, ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t + * LSeries.term a (c + t * I) n := by rw [line_integral_swap_gen hk hkc a c ha] + _ = ∑' n : ℕ, (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t + * LSeries.term a (c + t * I) n := by rw [← tsum_mul_left] + _ = ∑' n : ℕ, a n / ((Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := + tsum_congr fun n => per_n_line_integral_gen hk hkc a c n + /-- Step 1 (pointwise on the line): the integrand is the tsum of tilted-transform × L-series terms. −ζ'/ζ = LSeries ↗Λ on Re s > 1 (Mathlib), then distribute paperFT (tilt k b) t. -/ theorem integrand_eq_tsum {k : ℝ → ℂ} {c : ℝ} (hc1 : 1 < c) (t : ℝ) : Hfn k (c + t * I) * (-logDeriv riemannZeta (c + t * I)) = ∑' n : ℕ, paperFT (tilt k (c - 1/2)) t * LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n := by - have hre : 1 < ((c : ℂ) + t * I).re := by - simp only [Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.ofReal_im, - Complex.I_re, Complex.I_im] - simpa using hc1 - have h1 : -logDeriv riemannZeta ((c : ℂ) + t * I) = LSeries (fun n => (Λ n : ℂ)) ((c:ℂ) + t * I) := by - have h2 := ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hre - rw [logDeriv, Pi.div_apply, h2] - ring + have hre : 1 < ((c : ℂ) + t * I).re := by simpa using hc1 + have h1 : -logDeriv riemannZeta ((c : ℂ) + t * I) = LSeries (fun n => (Λ n : ℂ)) ((c : ℂ) + t * I) := by + rw [logDeriv, Pi.div_apply, ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hre]; ring rw [Hfn_line, h1, LSeries, ← tsum_mul_left] -/-- Step 2 (per-n line integral): (1/2π)∫ paperFT(tilt k b) t · term_n(c+it) dt - = Λ(n) n^{−1/2} k(log n). -/ +/-- Step 2 (per-n line integral): specialization of `per_n_line_integral_gen` to `Λ`. -/ theorem per_n_line_integral {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (n : ℕ) : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n = ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by - rcases Nat.eq_zero_or_pos n with rfl | hn - · simp [LSeries.term] - · have hn1 : (1:ℝ) ≤ (n:ℝ) := by exact_mod_cast hn - have hn0 : (0:ℝ) < (n:ℝ) := by linarith - have hnC : (n:ℂ) ≠ 0 := by exact_mod_cast hn.ne' - have hterm : ∀ t : ℝ, LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n - = ((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ) * cexp (-I * t * Real.log n) := by - intro t - rw [LSeries.term_of_ne_zero hn.ne', div_eq_mul_inv, ← Complex.cpow_neg] - have hsplit : (-((c:ℂ) + t * I)) = (-(c:ℂ)) + (-(I * t)) := by ring - rw [hsplit, Complex.cpow_add _ _ hnC] - have h1 : (n:ℂ) ^ (-(c:ℂ)) = (((n:ℝ) ^ (-c) : ℝ) : ℂ) := by - rw [show ((n:ℂ)) = (((n:ℝ):ℂ)) by push_cast; rfl, - show (-(c:ℂ)) = ((-c : ℝ) : ℂ) by push_cast; rfl, - ← Complex.ofReal_cpow hn0.le] - have h2 : (n:ℂ) ^ (-(I * t)) = cexp (-I * t * Real.log n) := by - rw [Complex.cpow_def_of_ne_zero hnC] - congr 1 - rw [show ((n:ℂ)) = (((n:ℝ):ℂ)) by push_cast; rfl, ← Complex.ofReal_log hn0.le] - ring - rw [h1, h2] - ring - simp_rw [hterm] - have hre : (fun t : ℝ => paperFT (tilt k (c - 1/2)) t - * (((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ) * cexp (-I * t * Real.log n))) - = fun t : ℝ => (((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * (paperFT (tilt k (c - 1/2)) t * cexp (-I * t * Real.log n)) := by - funext t - ring - rw [hre, Zeta23.EF.cintegral_const_mul] - rw [show (1 / (2 * (Real.pi : ℂ))) * ((((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * cexp (-I * t * Real.log n)) - = (((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * ((1 / (2 * (Real.pi : ℂ))) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t - * cexp (-I * t * Real.log n)) from by ring] - rw [tilted_inversion hk hkc (c - 1/2) (Real.log n)] - have hexp : Real.exp ((c - 1/2) * Real.log n) = (n:ℝ) ^ (c - 1/2) := by - rw [Real.rpow_def_of_pos hn0] - ring_nf - have hpow : ((n:ℝ) ^ (-c) : ℝ) * ((n:ℝ) ^ (c - 1/2) : ℝ) = ((n:ℝ) ^ (-(1/2) : ℝ) : ℝ) := by - rw [← Real.rpow_add hn0] - congr 1 - ring - have hsqrt : ((n:ℝ) ^ (-(1/2) : ℝ) : ℝ) = 1 / Real.sqrt n := by - rw [Real.rpow_neg hn0.le, Real.sqrt_eq_rpow] - exact (one_div _).symm - calc ((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ) - * (k (Real.log n) * ((Real.exp ((c - 1/2) * Real.log n) : ℝ) : ℂ)) - = ((Λ n : ℝ) : ℂ) * (((n:ℝ) ^ (-c) : ℝ) : ℂ) - * (k (Real.log n) * (((n:ℝ) ^ (c - 1/2) : ℝ) : ℂ)) := by rw [hexp] - _ = ((((Λ n : ℝ) * ((n:ℝ) ^ (-c) * (n:ℝ) ^ (c - 1/2)) : ℝ)) : ℂ) * k (Real.log n) := by - push_cast - ring - _ = ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by - rw [hpow, hsqrt, mul_one_div] + simpa [Complex.ofReal_div] using per_n_line_integral_gen hk hkc (fun n => (Λ n : ℂ)) c n -/-- Step 3 (tsum/integral swap): dominated by ‖paperFT (tilt k b)‖ ∈ L¹ × Σ Λ(n)n^{−c} < ∞. -/ +/-- Summability of `‖a n * Λ n‖ · n^{-c}` for `‖a n‖ ≤ 1` and `1 < c`. -/ +private lemma summable_twist_vonMangoldt (a : ℕ → ℂ) (ha : ∀ n : ℕ, ‖a n‖ ≤ 1) + {c : ℝ} (hc1 : 1 < c) : + Summable (fun n : ℕ => ‖a n * (Λ n : ℂ)‖ * (n : ℝ) ^ (-c)) := by + have hns : Summable (fun n : ℕ => ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖) := + summable_norm_iff.mpr (ArithmeticFunction.LSeriesSummable_vonMangoldt (by simpa using hc1)) + refine (summable_nat_add_iff 1).mp ?_ + refine Summable.of_nonneg_of_le (fun n => by positivity) (fun n => ?_) + ((summable_nat_add_iff 1).mpr hns) + have hn : n + 1 ≠ 0 := Nat.succ_ne_zero n + rw [LSeries.term_of_ne_zero hn, norm_div, norm_mul, + Complex.norm_natCast_cpow_of_pos (Nat.succ_pos n), Complex.ofReal_re, + Real.rpow_neg (Nat.cast_nonneg _), div_eq_mul_inv] + have := ha (n + 1) + have hΛ : 0 ≤ ‖((Λ (n + 1) : ℝ) : ℂ)‖ := norm_nonneg _ + have hrp : 0 ≤ (((n + 1 : ℕ) : ℝ) ^ c)⁻¹ := by positivity + calc ‖a (n + 1)‖ * ‖((Λ (n + 1) : ℝ) : ℂ)‖ * (((n + 1 : ℕ) : ℝ) ^ c)⁻¹ + ≤ 1 * ‖((Λ (n + 1) : ℝ) : ℂ)‖ * (((n + 1 : ℕ) : ℝ) ^ c)⁻¹ := by gcongr + _ = ‖((Λ (n + 1) : ℝ) : ℂ)‖ * (((n.succ : ℕ) : ℝ) ^ c)⁻¹ := by rw [one_mul] + +/-- Step 3 (tsum/integral swap, with any bounded twist `‖a n‖ ≤ 1`): specialization of +`line_integral_swap_gen`. -/ +theorem line_integral_swap_twist (a : ℕ → ℂ) (ha : ∀ n : ℕ, ‖a n‖ ≤ 1) + {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) + {c : ℝ} (hc1 : 1 < c) : + ∫ t : ℝ, (∑' n : ℕ, paperFT (tilt k (c - 1/2)) t + * LSeries.term (fun n => a n * (Λ n : ℂ)) (((c : ℝ) : ℂ) + t * I) n) + = ∑' n : ℕ, ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t + * LSeries.term (fun n => a n * (Λ n : ℂ)) (((c : ℝ) : ℂ) + t * I) n := + line_integral_swap_gen hk hkc (fun n => a n * (Λ n : ℂ)) c (summable_twist_vonMangoldt a ha hc1) + +/-- Step 3 (tsum/integral swap): untwisted specialization of `line_integral_swap_twist`. -/ theorem line_integral_swap {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) : ∫ t : ℝ, (∑' n : ℕ, paperFT (tilt k (c - 1/2)) t * LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n) = ∑' n : ℕ, ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n := by - have hkb2 : ContDiff ℝ 2 (tilt k (c - 1/2)) := tilt_contDiff hk _ - have hkbc : HasCompactSupport (tilt k (c - 1/2)) := tilt_hasCompactSupport hkc _ - have hFkb := Zeta23.EF.integrable_fourier_of_contDiff_two hkb2 hkbc - have hpfi : Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t) := - Zeta23.EF.integrable_paperFT_ofReal hFkb - have hre : ∀ t : ℝ, ((c:ℂ) + t * I).re = c := by - intro t - simp - have hnorm : ∀ (n : ℕ) (t : ℝ), ‖LSeries.term (fun n => (Λ n : ℂ)) ((c:ℂ) + t * I) n‖ - = if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c)) := by - intro n t - rw [LSeries.norm_term_eq, hre, Complex.norm_real, Real.norm_eq_abs, - abs_of_nonneg ArithmeticFunction.vonMangoldt_nonneg, Real.rpow_neg (Nat.cast_nonneg n), - div_eq_mul_inv] - have hcont : ∀ n : ℕ, Continuous (fun t : ℝ => - LSeries.term (fun n => (Λ n : ℂ)) ((c:ℂ) + t * I) n) := by - intro n - rcases eq_or_ne n 0 with rfl | hn - · simpa [LSeries.term_zero] using continuous_const - · simp only [LSeries.term_of_ne_zero hn] - refine continuous_const.div ?_ (fun t => ?_) - · refine Continuous.const_cpow (by fun_prop) (Or.inl ?_) - exact_mod_cast hn - · exact cpow_ne_zero_iff.mpr (Or.inl (by exact_mod_cast hn)) - have hint : ∀ n : ℕ, Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (Λ n : ℂ)) ((c:ℂ) + t * I) n) := by - intro n - refine hpfi.mul_bdd (c := if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c))) - (hcont n).aestronglyMeasurable ?_ - filter_upwards with t - rw [hnorm n t] - have heval : ∀ n : ℕ, (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (Λ n : ℂ)) ((c:ℂ) + t * I) n‖) - = (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t‖) - * (if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c))) := by - intro n - rw [← integral_mul_const] - refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_) - simp only - rw [norm_mul, hnorm n t] - have hcn : Summable (fun n : ℕ => if n = 0 then (0:ℝ) else (Λ n : ℝ) * ((n:ℝ) ^ (-c))) := by - have hs : LSeriesSummable (fun n => (Λ n : ℂ)) (c : ℂ) := - ArithmeticFunction.LSeriesSummable_vonMangoldt (by simpa using hc1) - have hns : Summable (fun n : ℕ => ‖LSeries.term (fun n => (Λ n : ℂ)) (c : ℂ) n‖) := - summable_norm_iff.mpr hs - refine hns.congr fun n => ?_ - simpa using hnorm n 0 - have hsum : Summable (fun n : ℕ => ∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (Λ n : ℂ)) ((c:ℂ) + t * I) n‖) := by - refine ((hcn.mul_left (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t‖)).congr fun n => ?_) - rw [heval n] - exact (MeasureTheory.hasSum_integral_of_summable_integral_norm hint hsum).tsum_eq.symm + simpa using line_integral_swap_twist (fun _ => (1 : ℂ)) (fun _ => by simp) hk hkc hc1 -/-- **Prime side on Re s = c ∈ (1, 3/2]**: -(1/2π)∫_ℝ H(c+it)·(−ζ'/ζ)(c+it) dt = Σ_{n≥1} Λ(n) n^{−1/2} k(log n). -/ +/-- **Prime side on Re s = c ∈ (1, 3/2]**: specialization of `dirichlet_line` to `Λ`. -/ theorem prime_side_line {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) : (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, Hfn k (c + t * I) * (-logDeriv riemannZeta (c + t * I)) = ∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by + have ha : Summable (fun n : ℕ => ‖(Λ n : ℂ)‖ * (n : ℝ) ^ (-c)) := by + simpa using summable_twist_vonMangoldt (fun _ => 1) (fun _ => by simp) hc1 have h1 : ∀ t : ℝ, Hfn k (c + t * I) * (-logDeriv riemannZeta (c + t * I)) - = ∑' n : ℕ, paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n := fun t => integrand_eq_tsum hc1 t - calc (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, Hfn k (c + t * I) * (-logDeriv riemannZeta (c + t * I)) - = (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, ∑' n : ℕ, paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n := by - rw [integral_congr_ae (Filter.Eventually.of_forall h1)] - _ = (1 / (2 * Real.pi) : ℂ) * ∑' n : ℕ, ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n := by - rw [line_integral_swap hk hkc hc1] - _ = ∑' n : ℕ, (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t - * LSeries.term (fun n => (Λ n : ℂ)) (c + t * I) n := by - rw [← tsum_mul_left] - _ = ∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := - tsum_congr fun n => per_n_line_integral hk hkc n - -/-- Coarse digamma growth on the right half-plane strip (consumed by the Γℝ line shift and the -horizontal-segment estimates; any polynomial bound works — dischargeable via a Stirling-type -estimate or directly). -/ -theorem digamma_growth_strip : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1/4 ≤ s.re → s.re ≤ 1 → + = Hfn k (c + t * I) * LSeries (fun n => (Λ n : ℂ)) (c + t * I) := fun t => by + rw [integrand_eq_tsum hc1 t, Hfn_line, LSeries, ← tsum_mul_left] + rw [integral_congr_ae (Filter.Eventually.of_forall h1), (dirichlet_line hk hkc c _ ha).2] + exact tsum_congr fun n => by simp [Complex.ofReal_div] + +/-- Coarse digamma growth on the wide right half-plane strip `1/4 ≤ Re s ≤ 2` +(consumed by both the ζ and χ Γℝ line shifts and horizontal-segment estimates). -/ +theorem digamma_growth_wide : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1/4 ≤ s.re → s.re ≤ 2 → ‖Complex.digamma s‖ ≤ C * Real.log (2 + |s.im|) := by -- differentiability of ψ on the right half-plane have hdiff : ∀ s : ℂ, 0 < s.re → DifferentiableAt ℂ Complex.digamma s := by @@ -271,10 +315,10 @@ theorem digamma_growth_strip : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1/4 ≤ s.re rfl) exact hψan.differentiableAt -- bound on the compact rectangle |Im| ≤ 1/2 - have hK : IsCompact (Complex.reProdIm (Set.Icc (1/4 : ℝ) 1) (Set.Icc (-(1/2) : ℝ) (1/2))) := + have hK : IsCompact (Complex.reProdIm (Set.Icc (1/4 : ℝ) 2) (Set.Icc (-(1/2) : ℝ) (1/2))) := isCompact_Icc.reProdIm isCompact_Icc have hcontK : ContinuousOn Complex.digamma - (Complex.reProdIm (Set.Icc (1/4 : ℝ) 1) (Set.Icc (-(1/2) : ℝ) (1/2))) := by + (Complex.reProdIm (Set.Icc (1/4 : ℝ) 2) (Set.Icc (-(1/2) : ℝ) (1/2))) := by intro s hs have hsre : 1/4 ≤ s.re := (Complex.mem_reProdIm.mp hs).1.1 exact ((hdiff s (by linarith)).continuousAt).continuousWithinAt @@ -300,7 +344,7 @@ theorem digamma_growth_strip : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1/4 ≤ s.re have hlogpos : (0 : ℝ) < Real.log (2 + |s.im|) := lt_of_lt_of_le hlog2 hlogmono rcases le_or_gt (|s.im|) (1/2) with him | him · -- compact part - have hsK : s ∈ Complex.reProdIm (Set.Icc (1/4 : ℝ) 1) (Set.Icc (-(1/2) : ℝ) (1/2)) := by + have hsK : s ∈ Complex.reProdIm (Set.Icc (1/4 : ℝ) 2) (Set.Icc (-(1/2) : ℝ) (1/2)) := by rw [Complex.mem_reProdIm] refine ⟨⟨hre1, hre2⟩, ?_⟩ rw [Set.mem_Icc] @@ -322,10 +366,10 @@ theorem digamma_growth_strip : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1/4 ≤ s.re intro h rw [h, norm_zero] at hsnorm0 exact lt_irrefl 0 hsnorm0 - have hsnorm_hi : ‖s‖ ≤ 1 + |s.im| := by + have hsnorm_hi : ‖s‖ ≤ 2 + |s.im| := by calc ‖s‖ ≤ |s.re| + |s.im| := Complex.norm_le_abs_re_add_abs_im s - _ ≤ 1 + |s.im| := by - have : |s.re| ≤ 1 := by + _ ≤ 2 + |s.im| := by + have : |s.re| ≤ 2 := by rw [abs_le] constructor <;> linarith linarith @@ -410,6 +454,12 @@ theorem digamma_growth_strip : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1/4 ≤ s.re le_max_right _ _ _ ≤ max (M / Real.log 2) (1 + K₀ / Real.log 2) + 1 := by linarith +/-- Coarse digamma growth on `1/4 ≤ Re s ≤ 1` (specialization of `digamma_growth_wide`). -/ +theorem digamma_growth_strip : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1/4 ≤ s.re → s.re ≤ 1 → + ‖Complex.digamma s‖ ≤ C * Real.log (2 + |s.im|) := by + obtain ⟨C, hC, h⟩ := digamma_growth_wide + exact ⟨C, hC, fun s h1 h2 => h s h1 (by linarith)⟩ + /-- continuity ⇒ integrability on vertical lines under a majorant (used by vertical_line_shift). -/ lemma integrable_line {f : ℂ → ℂ} {σ : ℝ} (hf : ∀ t : ℝ, DifferentiableAt ℂ f (σ + t * I)) {φ : ℝ → ℝ} (hφ : Integrable φ) (hb : ∀ t : ℝ, ‖f (σ + t * I)‖ ≤ φ t) : @@ -637,33 +687,28 @@ lemma norm_logDeriv_Gammaℝ_le : ∃ C : ℝ, 0 < C ∧ ∀ σ t : ℝ, 1 / 2 nlinarith [hC.le, hloght, Real.log_nonneg (show (1:ℝ) ≤ 2 + |t/2| by linarith [abs_nonneg (t/2)])] _ = (2 * Real.log Real.pi + C) * Real.log (2 + |t|) := by ring -/-- **Archimedean line shift**: the Γℝ'/Γℝ-part of the two -vertical lines shifts to the critical line (rectangle with no poles of Γℝ'/Γℝ in Re s > 0, -horizontal pieces vanish by digamma growth × [eq:hfbound] decay of paperFT k). -/ -theorem gamma_line_shift {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) +/-- `H = Hfn k` is entire (paperFT of a compactly supported C² function). -/ +theorem differentiable_Hfn {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) : + Differentiable ℂ (Hfn k) := + (differentiable_paperFT hk.continuous hkc).comp ((differentiable_id.sub_const _).div_const I) + +/-- **G-generic archimedean line shift**: shifts `(H(c+it) + H(1−c−it))·G(c+it)` from `Re s = c` +to the critical line `Re s = 1/2` for any `G` holomorphic on `Re s > 0` with +`‖G(σ+it)‖ ≤ C_G log(2+|t|)` on `1/2 ≤ σ ≤ 3/2`. -/ +theorem line_shift_generic {G : ℂ → ℂ} (hGd : ∀ s : ℂ, 0 < s.re → DifferentiableAt ℂ G s) + (hGgrowth : ∃ C : ℝ, 0 < C ∧ ∀ σ t : ℝ, 1 / 2 ≤ σ → σ ≤ 3 / 2 → + ‖G (σ + t * I)‖ ≤ C * Real.log (2 + |t|)) + {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3/2) : - ∫ t : ℝ, (Hfn k (c + t * I) + Hfn k (1 - c - t * I)) * logDeriv Complex.Gammaℝ (c + t * I) - = ∫ t : ℝ, paperFT k t - * (logDeriv Complex.Gammaℝ (1/2 + t * I) + logDeriv Complex.Gammaℝ (1/2 - t * I)) := by - set G := logDeriv Complex.Gammaℝ with hG - -- differentiability - have hHd : Differentiable ℂ (Hfn k) := by - have h := differentiable_paperFT hk.continuous hkc - show Differentiable ℂ (fun s => paperFT k ((s - 1/2) / I)) - exact h.comp ((differentiable_id.sub_const _).div_const I) - have hGd : ∀ s : ℂ, 0 < s.re → DifferentiableAt ℂ G s := by - intro s hs - have hA := analyticAt_Gammaℝ hs - have : G = fun z => deriv Gammaℝ z / Gammaℝ z := by funext z; rw [hG, logDeriv_apply] - rw [this] - exact hA.deriv.differentiableAt.div hA.differentiableAt (Gammaℝ_ne_zero_of_re_pos hs) + ∫ t : ℝ, (Hfn k (c + t * I) + Hfn k (1 - c - t * I)) * G (c + t * I) + = ∫ t : ℝ, paperFT k t * (G (1/2 + t * I) + G (1/2 - t * I)) := by + have hHd : Differentiable ℂ (Hfn k) := differentiable_Hfn hk hkc set f₁ : ℂ → ℂ := fun s => Hfn k s * G s with hf₁ set f₂ : ℂ → ℂ := fun s => Hfn k (1 - s) * G s with hf₂ have hf₁d : ∀ s : ℂ, 1 / 2 ≤ s.re → s.re ≤ c → DifferentiableAt ℂ f₁ s := fun s h1 _ => (hHd s).mul (hGd s (by linarith)) have hf₂d : ∀ s : ℂ, 1 / 2 ≤ s.re → s.re ≤ c → DifferentiableAt ℂ f₂ s := fun s h1 _ => ((hHd (1 - s)).comp s ((differentiableAt_const _).sub differentiableAt_id)).mul (hGd s (by linarith)) - -- the majorant obtain ⟨Lam₁, hLam₁⟩ := Zeta23.EF.exists_abs_le_of_hasCompactSupport hkc set Lam : ℝ := max Lam₁ 0 with hLam have hLam0 : 0 ≤ Lam := le_max_right _ _ @@ -671,29 +716,23 @@ theorem gamma_line_shift {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCom have hki : Integrable k := hk.continuous.integrable_of_hasCompactSupport hkc set N : ℝ := (∫ u, ‖k u‖) + ∫ u, ‖deriv (deriv k) u‖ with hN have hN0 : 0 ≤ N := add_nonneg (integral_nonneg fun _ => norm_nonneg _) (integral_nonneg fun _ => norm_nonneg _) - obtain ⟨CG, hCG, hGb⟩ := norm_logDeriv_Gammaℝ_le + obtain ⟨CG, hCG, hGb⟩ := hGgrowth set M : ℝ := 2 * Real.exp Lam * N * CG * 6 with hM have hM0 : 0 ≤ M := by positivity set φ : ℝ → ℝ := fun t => M * (1 + ‖t‖) ^ (-(3 / 2 : ℝ)) with hφ - have hφi : Integrable φ := by - have := (integrable_one_add_norm (E := ℝ) (μ := volume) (r := 3/2) + have hφi : Integrable φ := + (integrable_one_add_norm (E := ℝ) (μ := volume) (r := 3/2) (by rw [Module.finrank_self]; norm_num)).const_mul M - exact this have hφlim : Filter.Tendsto (fun x : ℝ => M * (1 + x) ^ (-(3 / 2 : ℝ))) Filter.atTop (nhds 0) := by have h1 : Filter.Tendsto (fun x : ℝ => (1 + x) ^ (-(3 / 2 : ℝ))) Filter.atTop (nhds 0) := (tendsto_rpow_neg_atTop (by norm_num)).comp (Filter.tendsto_atTop_add_const_left _ 1 Filter.tendsto_id) simpa using h1.const_mul M - have hφtop : Filter.Tendsto φ Filter.atTop (nhds 0) := by - have : φ = (fun x : ℝ => M * (1 + x) ^ (-(3 / 2 : ℝ))) ∘ (fun t : ℝ => ‖t‖) := by - funext t; simp [hφ] - rw [this] - exact hφlim.comp (by simpa using Filter.tendsto_abs_atTop_atTop) - have hφbot : Filter.Tendsto φ Filter.atBot (nhds 0) := by - have : φ = (fun x : ℝ => M * (1 + x) ^ (-(3 / 2 : ℝ))) ∘ (fun t : ℝ => ‖t‖) := by - funext t; simp [hφ] - rw [this] - exact hφlim.comp (by simpa using Filter.tendsto_abs_atBot_atTop) - -- the key pointwise bound: for |Im z| ≤ 1, ‖paperFT k z‖·‖G(σ+it)‖ ≤ φ t when Re z = ±t + have hφtop : Filter.Tendsto φ Filter.atTop (nhds 0) := + hφlim.comp (show Filter.Tendsto (fun t : ℝ => ‖t‖) Filter.atTop Filter.atTop by + simpa only [Real.norm_eq_abs] using Filter.tendsto_abs_atTop_atTop) + have hφbot : Filter.Tendsto φ Filter.atBot (nhds 0) := + hφlim.comp (show Filter.Tendsto (fun t : ℝ => ‖t‖) Filter.atBot Filter.atTop by + simpa only [Real.norm_eq_abs] using Filter.tendsto_abs_atBot_atTop) have hkey : ∀ (σ t : ℝ) (z : ℂ), 1 / 2 ≤ σ → σ ≤ c → |z.im| ≤ 1 → z.re ^ 2 = t ^ 2 → ‖paperFT k z‖ * ‖G (σ + t * I)‖ ≤ φ t := by intro σ t z h1 h2 hz hzt @@ -709,32 +748,25 @@ theorem gamma_line_shift {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCom _ ≤ (2 * Real.exp Lam * N * CG) * (6 * (1 + |t|) ^ (-(3 / 2 : ℝ))) := mul_le_mul_of_nonneg_left hl (by positivity) _ = φ t := by simp only [hφ, hM, Real.norm_eq_abs]; ring - -- z-bookkeeping for Hfn on the two lines have hz₁ : ∀ σ t : ℝ, ((σ : ℂ) + t * I - 1 / 2) / I = (t : ℂ) + ((1 / 2 - σ : ℝ) : ℂ) * I := by intro σ t; field_simp; push_cast; ring_nf; simp [I_sq]; ring have hz₂ : ∀ σ t : ℝ, ((1 - ((σ : ℂ) + t * I)) - 1 / 2) / I = ((-t : ℝ) : ℂ) + ((σ - 1 / 2 : ℝ) : ℂ) * I := by intro σ t; field_simp; push_cast; ring_nf; simp [I_sq]; ring have hb₁ : ∀ σ t : ℝ, 1 / 2 ≤ σ → σ ≤ c → ‖f₁ (σ + t * I)‖ ≤ φ t := by intro σ t h1 h2 - simp only [hf₁, Hfn, norm_mul] - rw [hz₁] - refine hkey σ t _ h1 h2 ?_ ?_ - · simp only [add_im, ofReal_im, mul_im, ofReal_re, I_re, I_im, mul_zero, mul_one, zero_add, add_zero] - rw [abs_le]; constructor <;> linarith - · simp + simp only [hf₁, Hfn, norm_mul]; rw [hz₁] + refine hkey σ t _ h1 h2 ?_ (by simp) + simp only [add_im, ofReal_im, mul_im, ofReal_re, I_re, I_im, mul_zero, mul_one, zero_add, add_zero] + rw [abs_le]; constructor <;> linarith have hb₂ : ∀ σ t : ℝ, 1 / 2 ≤ σ → σ ≤ c → ‖f₂ (σ + t * I)‖ ≤ φ t := by intro σ t h1 h2 - simp only [hf₂, Hfn, norm_mul] - rw [hz₂] - refine hkey σ t _ h1 h2 ?_ ?_ - · simp only [add_im, ofReal_im, mul_im, ofReal_re, I_re, I_im, mul_zero, mul_one, zero_add, add_zero] - rw [abs_le]; constructor <;> linarith - · simp - -- shift both lines + simp only [hf₂, Hfn, norm_mul]; rw [hz₂] + refine hkey σ t _ h1 h2 ?_ (by simp) + simp only [add_im, ofReal_im, mul_im, ofReal_re, I_re, I_im, mul_zero, mul_one, zero_add, add_zero] + rw [abs_le]; constructor <;> linarith have hab : (1:ℝ) / 2 ≤ c := by linarith have hs₁ := vertical_line_shift hab hf₁d hφi hb₁ hφtop hφbot have hs₂ := vertical_line_shift hab hf₂d hφi hb₂ hφtop hφbot - -- integrability on the lines have hi₁c : Integrable (fun t : ℝ => f₁ (c + t * I)) := integrable_line (fun t => hf₁d _ (by simp; linarith) (by simp)) hφi (fun t => hb₁ c t hab le_rfl) have hi₂c : Integrable (fun t : ℝ => f₂ (c + t * I)) := @@ -743,46 +775,48 @@ theorem gamma_line_shift {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCom integrable_line (fun t => hf₁d _ (by simp) (by simp; linarith)) hφi (fun t => hb₁ (1/2) t le_rfl hab) have hi₂h : Integrable (fun t : ℝ => f₂ ((1/2 : ℝ) + t * I)) := integrable_line (fun t => hf₂d _ (by simp) (by simp; linarith)) hφi (fun t => hb₂ (1/2) t le_rfl hab) - -- LHS = ∫ f₁(c+it) + ∫ f₂(c+it) have hL : ∫ t : ℝ, (Hfn k (c + t * I) + Hfn k (1 - c - t * I)) * G (c + t * I) = (∫ t : ℝ, f₁ (c + t * I)) + ∫ t : ℝ, f₂ (c + t * I) := by rw [← integral_add hi₁c hi₂c] refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_) simp only [hf₁, hf₂] - rw [show (1 : ℂ) - (↑c + ↑t * I) = 1 - ↑c - ↑t * I by ring] - ring + rw [show (1 : ℂ) - (↑c + ↑t * I) = 1 - ↑c - ↑t * I by ring]; ring rw [hL, hs₁, hs₂] - -- evaluate on the critical line - have e₁ : ∀ t : ℝ, f₁ ((1/2 : ℝ) + t * I) = paperFT k t * G (1/2 + t * I) := by - intro t - simp only [hf₁, Hfn] - congr 2 + have e₁ : ∀ t : ℝ, f₁ ((1/2 : ℝ) + t * I) = paperFT k t * G (1/2 + t * I) := fun t => by + simp only [hf₁, Hfn]; congr 2 · push_cast; field_simp; ring · push_cast; ring - have e₂ : ∀ t : ℝ, f₂ ((1/2 : ℝ) + t * I) = paperFT k (((-t : ℝ) : ℂ)) * G (1/2 + t * I) := by - intro t - simp only [hf₂, Hfn] - congr 2 + have e₂ : ∀ t : ℝ, f₂ ((1/2 : ℝ) + t * I) = paperFT k (((-t : ℝ) : ℂ)) * G (1/2 + t * I) := fun t => by + simp only [hf₂, Hfn]; congr 2 · push_cast; field_simp; ring · push_cast; ring simp_rw [e₁, e₂] - -- t ↦ −t in the second integral have hneg : ∫ t : ℝ, paperFT k (((-t : ℝ) : ℂ)) * G (1/2 + t * I) = ∫ t : ℝ, paperFT k t * G (1/2 - t * I) := by rw [← integral_neg_eq_self] refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_) - simp only [neg_neg] - push_cast - ring_nf + simp only [neg_neg]; push_cast; ring_nf rw [hneg, ← integral_add] - · refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_) - ring + · refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_); ring · have := hi₁h; simp_rw [e₁] at this; exact this · have := hi₂h; simp_rw [e₂] at this - have h2 := this.comp_neg - simp only [neg_neg] at h2 - refine (h2.congr (Filter.Eventually.of_forall fun t => ?_)) - push_cast; ring_nf + exact this.comp_neg.congr (Filter.Eventually.of_forall fun t => by simp only [neg_neg]; push_cast; ring_nf) + +/-- **Archimedean line shift**: the Γℝ'/Γℝ-part of the two +vertical lines shifts to the critical line (instantiation of `line_shift_generic`). -/ +theorem gamma_line_shift {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) + {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 3/2) : + ∫ t : ℝ, (Hfn k (c + t * I) + Hfn k (1 - c - t * I)) * logDeriv Complex.Gammaℝ (c + t * I) + = ∫ t : ℝ, paperFT k t + * (logDeriv Complex.Gammaℝ (1/2 + t * I) + logDeriv Complex.Gammaℝ (1/2 - t * I)) := + line_shift_generic + (fun s hs => by + have hA := analyticAt_Gammaℝ hs + have : logDeriv Complex.Gammaℝ = fun z => deriv Gammaℝ z / Gammaℝ z := by + funext z; exact logDeriv_apply _ z + rw [this] + exact hA.deriv.differentiableAt.div hA.differentiableAt (Gammaℝ_ne_zero_of_re_pos hs)) + norm_logDeriv_Gammaℝ_le hk hkc hc1 hc2 end WeilEF end Zeta23 diff --git a/zeta23/Zeta23/WeilEF/XiLogDeriv.lean b/zeta23/Zeta23/WeilEF/XiLogDeriv.lean index 71b1eaed44..5f0d68ef2a 100644 --- a/zeta23/Zeta23/WeilEF/XiLogDeriv.lean +++ b/zeta23/Zeta23/WeilEF/XiLogDeriv.lean @@ -59,9 +59,7 @@ lemma completedZeta_eventuallyEq_mul {s : ℂ} (hs : 0 < s.re) : /-- ζ is analytic at every s ≠ 1. -/ lemma analyticAt_riemannZeta {s : ℂ} (hs : s ≠ 1) : AnalyticAt ℂ riemannZeta s := - DifferentiableOn.analyticAt (s := ({1}ᶜ : Set ℂ)) - (fun _ hu => (differentiableAt_riemannZeta hu).differentiableWithinAt) - (isOpen_compl_singleton.mem_nhds hs) + analyticOn_riemannZeta s hs /-- On the right half-plane away from 1 and from the zeros of ζ: Λ'/Λ = Γℝ'/Γℝ + ζ'/ζ. -/ theorem logDeriv_completedZeta (s : ℂ) (hs1 : s ≠ 1) diff --git a/zeta23/Zeta23/WeilEF/ZeroSumLimit.lean b/zeta23/Zeta23/WeilEF/ZeroSumLimit.lean index 703785534b..b95585a6cf 100644 --- a/zeta23/Zeta23/WeilEF/ZeroSumLimit.lean +++ b/zeta23/Zeta23/WeilEF/ZeroSumLimit.lean @@ -21,6 +21,36 @@ namespace WeilEF open Complex Topology Filter Set +/-- **Generic zero-sum limit**: finite sums over `{|Im ρ| < R_j} ∩ Zset` (for monotone `R_j ≥ j`) +converge to the tsum of an absolutely convergent `g` over `Zset`. -/ +theorem zero_sum_limit_of {Zset : Set ℂ} (g : ℂ → ℂ) (hsum : Summable (fun ρ : Zset => g ρ)) + {R : ℕ → ℝ} (hRmono : Monotone R) (hRge : ∀ j : ℕ, (j : ℝ) ≤ R j) + {Z : ℕ → Finset ℂ} + (hZ : ∀ j : ℕ, ((Z j : Set ℂ) = {ρ : ℂ | ρ ∈ Zset ∧ -R j < ρ.im ∧ ρ.im < R j})) : + Tendsto (fun j : ℕ => ∑ ρ ∈ Z j, g ρ) atTop (𝓝 (∑' ρ : Zset, g ρ)) := by + classical + have hmemZ : ∀ j ρ, ρ ∈ Z j ↔ ρ ∈ Zset ∧ -R j < ρ.im ∧ ρ.im < R j := fun j ρ => by + rw [← Finset.mem_coe, hZ j]; rfl + set s : ℕ → Finset Zset := fun j => (Z j).subtype (· ∈ Zset) with hsdef + have hsum_eq : ∀ j, ∑ x ∈ s j, g x = ∑ ρ ∈ Z j, g ρ := fun j => by + have h1 := Finset.sum_subtype_eq_sum_filter (s := Z j) (p := (· ∈ Zset)) g + have h2 : (Z j).filter (· ∈ Zset) = Z j := + Finset.filter_true_of_mem fun ρ hρ => ((hmemZ j ρ).mp hρ).1 + rw [h2] at h1; rw [← h1] + have hmono : Monotone s := fun i j hij x hx => by + rw [Finset.mem_subtype, hmemZ] at hx ⊢ + have := hRmono hij; exact ⟨hx.1, by linarith [hx.2.1], by linarith [hx.2.2]⟩ + have hexh : ∀ B : Finset Zset, ∃ j, B ≤ s j := fun B => by + set M : ℝ := ∑ x ∈ B, |((x : ℂ)).im| + obtain ⟨j, hj⟩ := exists_nat_gt M + refine ⟨j, fun x hx => ?_⟩ + rw [Finset.mem_subtype, hmemZ] + have habs := abs_le.mp (Finset.single_le_sum (f := fun x : Zset => |((x : ℂ)).im|) + (fun _ _ => abs_nonneg _) hx) + have hRj := hRge j + exact ⟨x.2, by linarith [habs.1], by linarith [habs.2]⟩ + exact (hsum.hasSum.comp (tendsto_atTop_atTop_of_monotone hmono hexh)).congr fun j => hsum_eq j + /-- **Zero-sum limit.** The truncated zero sums over `|Im ρ| < R_j` converge to the full tsum over all nontrivial zeros. -/ theorem zero_sum_limit (hs : ZetaSeam) {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) @@ -28,62 +58,11 @@ theorem zero_sum_limit (hs : ZetaSeam) {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) {Z : ℕ → Finset ℂ} (hZ : ∀ j : ℕ, ((Z j : Set ℂ) = {ρ : ℂ | IsNontrivialZero ρ ∧ -R j < ρ.im ∧ ρ.im < R j})) : Tendsto (fun j : ℕ => ∑ ρ ∈ Z j, (zeroMult ρ : ℂ) * Hfn k ρ) atTop - (𝓝 (∑' ρ : (zetaZeros hs).carrier, ((zetaZeros hs).mult ρ : ℂ) * Hfn k ρ)) := by - classical - set g : (zetaZeros hs).carrier → ℂ := fun ρ => ((zetaZeros hs).mult ρ : ℂ) * Hfn k ρ with hg - -- absolute convergence : Hfn k ρ = paperFT k (gammaOf ρ) definitionally - have hsum : Summable g := EF_zero_sum_summable hs hk hkc - have hmemZ : ∀ j ρ, ρ ∈ Z j ↔ IsNontrivialZero ρ ∧ -R j < ρ.im ∧ ρ.im < R j := by - intro j ρ - rw [← Finset.mem_coe, hZ j] - rfl - -- the finite sets, viewed in the carrier subtype - set s : ℕ → Finset (zetaZeros hs).carrier := - fun j => (Z j).subtype (· ∈ (zetaZeros hs).carrier) with hsdef - have hsum_eq : ∀ j, ∑ x ∈ s j, g x = ∑ ρ ∈ Z j, (zeroMult ρ : ℂ) * Hfn k ρ := by - intro j - have h1 := Finset.sum_subtype_eq_sum_filter (s := Z j) - (p := (· ∈ (zetaZeros hs).carrier)) (fun ρ : ℂ => (zeroMult ρ : ℂ) * Hfn k ρ) - have h2 : (Z j).filter (· ∈ (zetaZeros hs).carrier) = Z j := by - apply Finset.filter_true_of_mem - intro ρ hρ - exact ((hmemZ j ρ).mp hρ).1 - rw [h2] at h1 - rw [← h1] - rfl - -- monotone and exhausting - have hRmono : ∀ i j : ℕ, i ≤ j → R i ≤ R j := by - intro i j hij - rcases hij.eq_or_lt with h | h - · rw [h] - · have : (i : ℝ) + 1 ≤ j := by exact_mod_cast h - linarith [(hR i).2, (hR j).1] - have hmono : Monotone s := by - intro i j hij x hx - rw [Finset.mem_subtype, hmemZ] at hx ⊢ - obtain ⟨h1, h2, h3⟩ := hx - have := hRmono i j hij - exact ⟨h1, by linarith, by linarith⟩ - have hexh : ∀ b : Finset (zetaZeros hs).carrier, ∃ j, b ≤ s j := by - intro b - set M : ℝ := ∑ x ∈ b, |((x : ℂ)).im| with hM - have hMle : ∀ x ∈ b, |((x : ℂ)).im| ≤ M := fun x hx => - Finset.single_le_sum (f := fun x : (zetaZeros hs).carrier => |((x : ℂ)).im|) - (fun _ _ => abs_nonneg _) hx - obtain ⟨j, hj⟩ := exists_nat_gt M - refine ⟨j, fun x hx => ?_⟩ - rw [Finset.mem_subtype, hmemZ] - have hx0 : IsNontrivialZero (x : ℂ) := x.2 - have habs := abs_le.mp (hMle x hx) - have hRj := (hR j).1 - exact ⟨hx0, by linarith [habs.1], by linarith [habs.2]⟩ - have hs_tend : Tendsto s atTop atTop := tendsto_atTop_atTop_of_monotone hmono hexh - have hT : Tendsto (fun S : Finset (zetaZeros hs).carrier => ∑ x ∈ S, g x) atTop - (𝓝 (∑' x, g x)) := by - exact hsum.hasSum - have := hT.comp hs_tend - refine this.congr (fun j => ?_) - simp only [Function.comp_apply, hsum_eq] + (𝓝 (∑' ρ : (zetaZeros hs).carrier, ((zetaZeros hs).mult ρ : ℂ) * Hfn k ρ)) := + zero_sum_limit_of (Zset := (zetaZeros hs).carrier) (fun ρ => (zeroMult ρ : ℂ) * Hfn k ρ) + (EF_zero_sum_summable hs hk hkc) + (monotone_of_unit_intervals (m := 7) fun j => ⟨(hR j).1, by linarith [(hR j).2]⟩) + (fun j => by linarith [(hR j).1]) hZ end WeilEF end Zeta23 diff --git a/zeta23/Zeta23/WeilEF/ZeroSummability.lean b/zeta23/Zeta23/WeilEF/ZeroSummability.lean index 7b5e1595f7..99e42b7a0a 100644 --- a/zeta23/Zeta23/WeilEF/ZeroSummability.lean +++ b/zeta23/Zeta23/WeilEF/ZeroSummability.lean @@ -26,10 +26,6 @@ lemma gammaOf_im (ρ : ℂ) : (gammaOf ρ).im = 1 / 2 - ρ.re := by lemma abs_im_le_norm_gammaOf (ρ : ℂ) : |ρ.im| ≤ ‖gammaOf ρ‖ := by rw [← gammaOf_re]; exact Complex.abs_re_le_norm _ -/-- For a point of the open strip, |Im γ_ρ| < 1/2. -/ -lemma abs_gammaOf_im_lt {ρ : ℂ} (h : 0 < ρ.re ∧ ρ.re < 1) : |(gammaOf ρ).im| < 1 / 2 := by - rw [gammaOf_im, abs_lt]; constructor <;> linarith [h.1, h.2] - /-- For a point of the closed strip, |Im γ_ρ| ≤ 1/2. -/ lemma abs_gammaOf_im_le {ρ : ℂ} (h : 0 ≤ ρ.re ∧ ρ.re ≤ 1) : |(gammaOf ρ).im| ≤ 1 / 2 := by rw [gammaOf_im, abs_le]; constructor <;> linarith [h.1, h.2] @@ -186,7 +182,7 @@ theorem EF_zero_sum_summable_gen (Z : ZeroConfig) {A₀ : ℝ} (hA₀ : 1 ≤ A hfin.preimage Subtype.val_injective.injOn filter_upwards [hSfin.compl_mem_cofinite] with ρ hρ simp only [Set.mem_compl_iff, Set.mem_preimage, ZeroConfig.window, Set.mem_inter_iff, - Set.mem_setOf_eq, not_and, not_le] at hρ + Set.mem_ofPred_eq, not_and, not_le] at hρ have hρmem : (ρ : ℂ) ∈ Z.carrier := ρ.2 -- ‖γ_ρ‖ ≥ |Im ρ| ≥ 1 have him : 1 ≤ |(ρ : ℂ).im| := by @@ -224,7 +220,6 @@ theorem EF_zero_sum_summable_gen (Z : ZeroConfig) {A₀ : ℝ} (hA₀ : 1 ≤ A _ = C * ((Z.mult (ρ : ℂ) : ℝ) / (1 + Complex.normSq (gammaOf (ρ : ℂ)))) := by ring - /-! ### The ζ instances -/ /-- **Σ_ρ m_ρ/(1+|γ_ρ|²) converges** (dyadic/unit-window summation of the local count). -/ diff --git a/zeta23/Zeta23/XiPrime/Assembly.lean b/zeta23/Zeta23/XiPrime/Assembly.lean index 48f192ac51..63231553e2 100644 --- a/zeta23/Zeta23/XiPrime/Assembly.lean +++ b/zeta23/Zeta23/XiPrime/Assembly.lean @@ -20,7 +20,6 @@ See Zeta23/XiPrime/Statement.lean for the Props. rtrace/frobSq of Ĝ(T). -/ import Zeta23.XiPrime.Statement -import Zeta23.XiPrime.CertificateFn import Zeta23.FinalMult noncomputable section @@ -82,22 +81,6 @@ theorem kappa_nonneg_of_coeffMoments (Z : ZeroConfig) (hR : RiemannVonMangoldt Z exact mul_neg_of_neg_of_pos hk hNT linarith -/-- same for GzMoments. -/ -theorem kappa_nonneg_of_gzMoments (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) (Pf : ℝ → Params) - {κ : ℝ} (hM : GzMoments Z Pf κ) : 0 ≤ κ := by - rcases le_or_gt 0 κ with h | hneg - · exact h - · exfalso - obtain ⟨-, hfr⟩ := hM - have hδ : 0 < -κ / 2 := by linarith - have hN := (tendsto_N_atTop Z hR).eventually_gt_atTop 0 - obtain ⟨T, hT, hNT⟩ := ((hfr (-κ / 2) hδ).and hN).exists - have h0 := frobSq_nonneg ((Pf T).hat T (Z.Gz (Pf T) T)) - have : (κ + -κ / 2) * (Z.N T (2 * T) : ℝ) < 0 := by - have hk : κ + -κ / 2 < 0 := by linarith - exact mul_neg_of_neg_of_pos hk hNT - linarith - /-! ## §A2. The fixed-λ certificate bounds from GzMoments, flat family, abstract Z -/ section Flat @@ -105,23 +88,11 @@ section Flat variable (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) (P : Params) (hP : P.Valid) (hlam : P.lam < 1) include hR hP in -/-- prop:tail package for Z from the LOCAL COUNT alone (Zeta23.Tail.eventually_tailPackage takes the whole -PaperInputs bundle but uses only RvM.local_count; this is that proof with the bundle opened). -/ +/-- prop:tail package for Z from the LOCAL COUNT alone (delegates to `Tail.eventually_tailPackage_of_rvm`). -/ theorem eventually_tailPackage_of_rvm : ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z P T (θ₀ T)) ∧ - ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := by - obtain ⟨A₀, hA₀, hloc⟩ := hR.local_count - have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := (tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop _ - refine ⟨fun T => Tail.theta0 A₀ (Real.exp (P.L T / 4) * P.C1 T) T, ?_, ?_⟩ - · refine Tail.eventually_tailInputs Z P hP hA₀ hloc (fun T => P.C1 T) (fun T => Tail.C1_nonneg P T) - ?_ ?_ ?_ - · filter_upwards [hwL] with T hwL - exact fun r y hy hz => Params.norm_phiHat_sub_I_mul_le hP hwL r y hy hz - · filter_upwards [hwL] with T hwL - linarith [Params.half_le_a hP hwL] - · exact Eventually.of_forall fun T z => GzGp.phiHat_conj P T z - · exact Tail.eventually_theta0_le P hP hA₀ (fun T => P.C1 T) (fun T => Tail.C1_nonneg P T) - (hwL.mono fun T hwL => Params.C1_le hP hwL) + ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := + Tail.eventually_tailPackage_of_rvm Z hR.local_count P hP include hR hP in /-- the two zero-side side conditions the endgame needs, from RvM.local_count and the taper facts. -/ @@ -136,126 +107,25 @@ theorem eventually_side_conditions_of_rvm : exact Tail.eventually_NII_le Z hA₀ hloc include hR hP hlam in -/-- **(2 − κ − ε)·N(T,2T) ≤ N₀ˢ(T,2T)** at fixed λ ∈ (0,1), flat window, abstract Z, from GzMoments. -/ -theorem simple_bound_of_gzMoments {κ : ℝ} (hM : GzMoments Z (fun _ => P) κ) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 - κ - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le +private lemma bounds_of_gzMoments {κ : ℝ} (hM : GzMoments Z (fun _ => P) κ) : + DyadicLowerBound (2 - κ) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) ∧ + DyadicLowerBound (3 / 2 - κ / 2) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := by obtain ⟨ha, hNII⟩ := eventually_side_conditions_of_rvm Z hR P hP obtain ⟨θ₀, hTail, Cθ, hθ⟩ := eventually_tailPackage_of_rvm Z hR P hP - obtain ⟨htrace, hfrob⟩ := hM - have hLtop := tendsto_L_atTop P hlam0 - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := hLtop.eventually_ge_atTop _ - have h0 : ∀ᶠ T in atTop, 4 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - - 2 * (Z.N T (2 * T) : ℝ) - 3 * (NII Z T : ℝ) - - θ₀ T / (P.a T * P.L T) - * (4 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) - ≤ (Z.N0s T (2 * T) : ℝ) := by - filter_upwards [hTail, hwL, hapos, eventually_ge_atTop (0:ℝ), eventually_l_pos] - with T hTl h8 ha2 hT0 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact seamA_mult2 hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal (ZeroSide.poissonSq hP h8) hTl - (by linarith) hLpos - have hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T) := by - filter_upwards [hTail, hapos, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by positivity) - have hBto : Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup hB0 ?_ - filter_upwards [hTail, hapos, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < P.a T := by linarith - have hq' : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (P.a T * P.L T) := by - have e : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [e]; gcongr - have hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by - obtain ⟨CII, hII⟩ := hNII - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z hR isLittleO_sqrt_mul_l_Tl) - have hNtop := tendsto_N_atTop Z hR - exact count_certificate Z P κ (fun T => (Z.N0s T (2 * T) : ℝ)) θ₀ h0 hB0 hBto - hNII_o hNtop htrace hfrob + exact multBC_of_moments Z P hP hlam κ ha hTail ⟨Cθ, hθ⟩ hNII + (tendsto_N_atTop Z hR) (fun _ => isLittleO_N_of_isLittleO_Tl Z hR) hM.1 hM.2 + +include hR hP hlam in +/-- **(2 − κ − ε)·N(T,2T) ≤ N₀ˢ(T,2T)** at fixed λ ∈ (0,1), flat window, abstract Z, from GzMoments. -/ +theorem simple_bound_of_gzMoments {κ : ℝ} (hM : GzMoments Z (fun _ => P) κ) : + DyadicLowerBound (2 - κ) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) := + (bounds_of_gzMoments Z hR P hP hlam hM).1 include hR hP hlam in /-- **(3/2 − κ/2 − ε)·N(T,2T) ≤ N_d(T,2T)** at fixed λ ∈ (0,1), flat window, abstract Z, from GzMoments. -/ theorem dist_bound_of_gzMoments {κ : ℝ} (hM : GzMoments Z (fun _ => P) κ) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 2 - κ / 2 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by - have hlam0 := hP.lam_pos - have hlam1 : P.lam ≤ 1 := hlam.le - obtain ⟨ha, hNII⟩ := eventually_side_conditions_of_rvm Z hR P hP - obtain ⟨θ₀, hTail, Cθ, hθ⟩ := eventually_tailPackage_of_rvm Z hR P hP - obtain ⟨htrace, hfrob⟩ := hM - have hLtop := tendsto_L_atTop P hlam0 - have hapos : ∀ᶠ T in atTop, 1 / 2 ≤ P.a T := by - filter_upwards [ha, hLtop.eventually_ge_atTop (4 * P.w)] with T h hL4 - have hw := hP.one_le_w - have hLpos : 0 < P.L T := by linarith - have : 2 * P.w / P.L T ≤ 1 / 2 := by rw [div_le_iff₀ hLpos]; linarith - linarith [h.1] - have hwL : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := hLtop.eventually_ge_atTop _ - have h0 : ∀ᶠ T in atTop, 6 * rtrace (P.hat T (Z.Gz P T)) - frobSq (P.hat T (Z.Gz P T)) - - 3 * (Z.N T (2 * T) : ℝ) - 5 * (NII Z T : ℝ) - - θ₀ T / (P.a T * P.L T) - * (6 + 2 * Real.sqrt (frobSq (P.hat T (Z.Gz P T))) + θ₀ T / (P.a T * P.L T)) - ≤ 2 * (Z.Nd T (2 * T) : ℝ) := by - filter_upwards [hTail, hwL, hapos, eventually_ge_atTop (0:ℝ), eventually_l_pos] - with T hTl h8 ha2 hT0 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact seamA_mult3 hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal (ZeroSide.poissonSq hP h8) hTl - (by linarith) hLpos - have hB0 : ∀ᶠ T in atTop, 0 ≤ θ₀ T / (P.a T * P.L T) := by - filter_upwards [hTail, hapos, eventually_l_pos] with T hTl ha2 hl - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - exact div_nonneg hTl.theta_nonneg (by positivity) - have hBto : Tendsto (fun T => θ₀ T / (P.a T * P.L T)) atTop (𝓝 0) := by - have hup : Tendsto (fun T => 2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) atTop (𝓝 0) := by - simpa using (tendsto_theta_over_L P hlam0 hlam1).const_mul (2 * |Cθ|) - refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hup hB0 ?_ - filter_upwards [hTail, hapos, eventually_l_pos, hθ, eventually_gt_atTop (0:ℝ)] - with T hTl ha2 hl hθT hT0 - have hLpos : 0 < P.L T := by simp only [Params.L]; positivity - have hapos' : 0 < P.a T := by linarith - have hq' : 0 ≤ l T * T ^ (P.lam / 2 - 1) / P.L T := by positivity - rw [div_le_iff₀ (mul_pos hapos' hLpos)] - calc θ₀ T ≤ Cθ * l T * T ^ (P.lam / 2 - 1) := hθT - _ ≤ |Cθ| * l T * T ^ (P.lam / 2 - 1) := by gcongr; exact le_abs_self _ - _ = |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T := by field_simp - _ ≤ (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (P.a T * P.L T) := by - have e : |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T) * P.L T - = (2 * |Cθ| * (l T * T ^ (P.lam / 2 - 1) / P.L T)) * (1 / 2 * P.L T) := by ring - rw [e]; gcongr - have hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by - obtain ⟨CII, hII⟩ := hNII - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z hR isLittleO_sqrt_mul_l_Tl) - have hNtop := tendsto_N_atTop Z hR - exact count_certificate_c3 Z P κ (fun T => (Z.Nd T (2 * T) : ℝ)) θ₀ h0 hB0 hBto - hNII_o hNtop htrace hfrob + DyadicLowerBound (3 / 2 - κ / 2) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := + (bounds_of_gzMoments Z hR P hP hlam hM).2 end Flat @@ -339,81 +209,89 @@ theorem family_tail_package : rw [e]; gcongr include hR hP hlam hW in -/-- **(2 − κ − ε)·N(T,2T) ≤ N₀ˢ(T,2T)** at fixed λ ∈ (0,1) for a window FAMILY, abstract Z, from GzMoments. -/ -theorem simple_bound_of_gzMoments_family {κ : ℝ} (hM : GzMoments Z Pf κ) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 - κ - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.N0s T (2 * T) := by - have hL : ∀ T, (Pf T).L T = P.L T := fun T => by simp only [Params.L, hW.lam_eq] +/-- Shared family moment-bound core for `simple_bound_of_gzMoments_family` and +`dist_bound_of_gzMoments_family`. -/ +private lemma family_bound_of_gzMoments {κ c kN kNII : ℝ} {rhs : ℝ → ℝ} {Goal : Prop} + (hM : GzMoments Z Pf κ) + (hseam : ∀ {T θ₀ : ℝ}, 0 ≤ T → ZeroSide.PhiHatConj T (Pf T) → ZeroSide.PhiHatReal T (Pf T) → + ZeroSide.PoissonSq T (Pf T) → Assembly.TailInputs Z (Pf T) T θ₀ → + 0 < (Pf T).a T → 0 < (Pf T).L T → + c * rtrace ((Pf T).hat T (Z.Gz (Pf T) T)) - frobSq ((Pf T).hat T (Z.Gz (Pf T) T)) + - kN * (Z.N T (2 * T) : ℝ) - kNII * (NII Z T : ℝ) + - θ₀ / ((Pf T).a T * (Pf T).L T) + * (c + 2 * Real.sqrt (frobSq ((Pf T).hat T (Z.Gz (Pf T) T))) + + θ₀ / ((Pf T).a T * (Pf T).L T)) + ≤ rhs T) + (hcert : ∀ (B : ℝ → ℝ), + (∀ᶠ T in atTop, 0 ≤ frobSq ((Pf T).hat T (Z.Gz (Pf T) T))) → + (∀ᶠ T in atTop, c * rtrace ((Pf T).hat T (Z.Gz (Pf T) T)) + - frobSq ((Pf T).hat T (Z.Gz (Pf T) T)) + - kN * (Z.N T (2 * T) : ℝ) - kNII * (NII Z T : ℝ) + - B T * (c + 2 * Real.sqrt (frobSq ((Pf T).hat T (Z.Gz (Pf T) T))) + B T) + ≤ rhs T) → + (∀ᶠ T in atTop, 0 ≤ B T) → Tendsto B atTop (𝓝 0) → + ((fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ))) → + Tendsto (fun T => (Z.N T (2 * T) : ℝ)) atTop atTop → + (∀ δ > 0, ∀ᶠ T in atTop, + (1 - δ) * (Z.N T (2 * T) : ℝ) ≤ rtrace ((Pf T).hat T (Z.Gz (Pf T) T))) → + (∀ δ > 0, ∀ᶠ T in atTop, + frobSq ((Pf T).hat T (Z.Gz (Pf T) T)) ≤ (κ + δ) * (Z.N T (2 * T) : ℝ)) → Goal) : + Goal := by obtain ⟨-, hNII⟩ := eventually_side_conditions_of_rvm Z hR P hP obtain ⟨θ₀, hTail, hB0, hBto⟩ := family_tail_package Z P hP hlam hW - obtain ⟨htrace, hfrob⟩ := hM + have hL : ∀ T, (Pf T).L T = P.L T := fun T => by simp only [Params.L, hW.lam_eq] have hLtop := tendsto_L_atTop P hP.lam_pos - have h0 : ∀ᶠ T in atTop, 4 * rtrace ((Pf T).hat T (Z.Gz (Pf T) T)) + have h0 : ∀ᶠ T in atTop, c * rtrace ((Pf T).hat T (Z.Gz (Pf T) T)) - frobSq ((Pf T).hat T (Z.Gz (Pf T) T)) - - 2 * (Z.N T (2 * T) : ℝ) - 3 * (NII Z T : ℝ) + - kN * (Z.N T (2 * T) : ℝ) - kNII * (NII Z T : ℝ) - θ₀ T / ((Pf T).a T * (Pf T).L T) - * (4 + 2 * Real.sqrt (frobSq ((Pf T).hat T (Z.Gz (Pf T) T))) + * (c + 2 * Real.sqrt (frobSq ((Pf T).hat T (Z.Gz (Pf T) T))) + θ₀ T / ((Pf T).a T * (Pf T).L T)) - ≤ (Z.N0s T (2 * T) : ℝ) := by + ≤ rhs T := by filter_upwards [hTail, hW.poisson, hW.a_half, eventually_ge_atTop (0:ℝ), hLtop.eventually_gt_atTop 0] with T hTl hPo ha2 hT0 hLT have hLpos : 0 < (Pf T).L T := by rw [hL]; exact hLT - exact seamA_mult2 hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal hPo hTl (by linarith) hLpos - have hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by - obtain ⟨CII, hII⟩ := hNII - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z hR isLittleO_sqrt_mul_l_Tl) - exact count_certificate_fn κ (N := fun T => (Z.N T (2 * T) : ℝ)) (NII := fun T => (NII Z T : ℝ)) - (tr := fun T => rtrace ((Pf T).hat T (Z.Gz (Pf T) T))) - (fr := fun T => frobSq ((Pf T).hat T (Z.Gz (Pf T) T))) - (B := fun T => θ₀ T / ((Pf T).a T * (Pf T).L T)) (lower := fun T => (Z.N0s T (2 * T) : ℝ)) - (Eventually.of_forall fun T => frobSq_nonneg _) h0 hB0 hBto hNII_o (tendsto_N_atTop Z hR) - htrace hfrob + exact hseam hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal hPo hTl (by linarith) hLpos + exact hcert (fun T => θ₀ T / ((Pf T).a T * (Pf T).L T)) + (Eventually.of_forall fun T => frobSq_nonneg _) h0 hB0 hBto + (isLittleO_NII_N Z hR hNII) (tendsto_N_atTop Z hR) hM.1 hM.2 + +include hR hP hlam hW in +/-- **(2 − κ − ε)·N(T,2T) ≤ N₀ˢ(T,2T)** at fixed λ ∈ (0,1) for a window FAMILY, abstract Z, from GzMoments. -/ +theorem simple_bound_of_gzMoments_family {κ : ℝ} (hM : GzMoments Z Pf κ) : + DyadicLowerBound (2 - κ) (fun T => Z.N0s T (2 * T)) (fun T => Z.N T (2 * T)) := + family_bound_of_gzMoments Z hR P hP hlam hW hM + (fun hT0 hc hr hp htl ha hL => seamA_mult2 hT0 hc hr hp htl ha hL) + (fun B hfr0 h0 hB0 hBto hNII hNtop htr hfr => by + simpa only [show (4 - 2 - κ) / 1 = 2 - κ by ring] using + count_certificate_fn_gen 4 2 3 4 1 κ (by norm_num) (by norm_num) hfr0 + (h0.mono fun _ ht => by simpa only [one_mul] using ht) hB0 hBto hNII hNtop htr hfr) include hR hP hlam hW in /-- **(3/2 − κ/2 − ε)·N(T,2T) ≤ N_d(T,2T)** at fixed λ for a window FAMILY, abstract Z, from GzMoments. -/ theorem dist_bound_of_gzMoments_family {κ : ℝ} (hM : GzMoments Z Pf κ) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 2 - κ / 2 - ε) * (Z.N T (2 * T) : ℝ) ≤ Z.Nd T (2 * T) := by - have hL : ∀ T, (Pf T).L T = P.L T := fun T => by simp only [Params.L, hW.lam_eq] - obtain ⟨-, hNII⟩ := eventually_side_conditions_of_rvm Z hR P hP - obtain ⟨θ₀, hTail, hB0, hBto⟩ := family_tail_package Z P hP hlam hW - obtain ⟨htrace, hfrob⟩ := hM - have hLtop := tendsto_L_atTop P hP.lam_pos - have h0 : ∀ᶠ T in atTop, 6 * rtrace ((Pf T).hat T (Z.Gz (Pf T) T)) - - frobSq ((Pf T).hat T (Z.Gz (Pf T) T)) - - 3 * (Z.N T (2 * T) : ℝ) - 5 * (NII Z T : ℝ) - - θ₀ T / ((Pf T).a T * (Pf T).L T) - * (6 + 2 * Real.sqrt (frobSq ((Pf T).hat T (Z.Gz (Pf T) T))) - + θ₀ T / ((Pf T).a T * (Pf T).L T)) - ≤ 2 * (Z.Nd T (2 * T) : ℝ) := by - filter_upwards [hTail, hW.poisson, hW.a_half, eventually_ge_atTop (0:ℝ), - hLtop.eventually_gt_atTop 0] with T hTl hPo ha2 hT0 hLT - have hLpos : 0 < (Pf T).L T := by rw [hL]; exact hLT - exact seamA_mult3 hT0 ZeroSide.phiHatConj ZeroSide.phiHatReal hPo hTl (by linarith) hLpos - have hNII_o : (fun T => (NII Z T : ℝ)) =o[atTop] (fun T => (Z.N T (2 * T) : ℝ)) := by - obtain ⟨CII, hII⟩ := hNII - have hO : (fun T => (NII Z T : ℝ)) =O[atTop] (fun T => Real.sqrt T * l T) := by - refine IsBigO.of_bound CII ?_ - filter_upwards [hII, eventually_l_pos] with T h hl - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg _), - abs_of_nonneg (by positivity)] - simpa [mul_assoc] using h - exact hO.trans_isLittleO (isLittleO_N_of_isLittleO_Tl Z hR isLittleO_sqrt_mul_l_Tl) - exact count_certificate_c3_fn κ (N := fun T => (Z.N T (2 * T) : ℝ)) (NII := fun T => (NII Z T : ℝ)) - (tr := fun T => rtrace ((Pf T).hat T (Z.Gz (Pf T) T))) - (fr := fun T => frobSq ((Pf T).hat T (Z.Gz (Pf T) T))) - (B := fun T => θ₀ T / ((Pf T).a T * (Pf T).L T)) (lower := fun T => (Z.Nd T (2 * T) : ℝ)) - (Eventually.of_forall fun T => frobSq_nonneg _) h0 hB0 hBto hNII_o (tendsto_N_atTop Z hR) - htrace hfrob + DyadicLowerBound (3 / 2 - κ / 2) (fun T => Z.Nd T (2 * T)) (fun T => Z.N T (2 * T)) := + family_bound_of_gzMoments Z hR P hP hlam hW hM + (fun hT0 hc hr hp htl ha hL => seamA_mult3 hT0 hc hr hp htl ha hL) + (fun B hfr0 h0 hB0 hBto hNII hNtop htr hfr => by + simpa only [show (6 - 3 - κ) / 2 = 3 / 2 - κ / 2 by ring] using + count_certificate_fn_gen 6 3 5 6 2 κ (by norm_num) (by norm_num) hfr0 h0 hB0 hBto hNII hNtop htr hfr) end Family /-! ## §A2′. Instantiation at the zeros of ξ′: FixedLamBounds from the four component Props (flat window) -/ +/-- Pair two one-sided fixed-λ bounds into a joint eventual statement. -/ +theorem fixedLam_of {κ : ℝ} {N lowS lowD : ℝ → ℝ} + (hA : EpsLowerBound (2 - κ) lowS N) + (hB : EpsLowerBound (3 / 2 - κ / 2) lowD N) : + EpsLowerBoundPair (2 - κ) (3 / 2 - κ / 2) lowS lowD N := by + intro ε hε + obtain ⟨T₁, hT₁⟩ := hA ε hε + obtain ⟨T₂, hT₂⟩ := hB ε hε + refine ⟨max T₁ T₂, fun T hT => + ⟨hT₁ T (le_trans (le_max_left _ _) hT), hT₂ T (le_trans (le_max_right _ _) hT)⟩⟩ + /-- **[XF′ Thm 8.2] at fixed λ, flat window, from the interface Props.** Every undischarged classical input is an explicit binder: (F2) hF2, the seam hs, H-RvM for ξ′ hR; the analytic content arrives as the three interface propositions instantiated at Z := xiDerivZeros hF2 hs and the flat family fun _ => P. -/ @@ -422,21 +300,15 @@ theorem fixedLam_flat (hF2 : XiDerivZerosInStrip) (hs : XiDerivSeam) (hR : XiDer (hCM : CoeffMoments (xiDerivZeros hF2 hs) (fun _ => paramsOf ϱ lam) xiCoeffFamily (kappaXi lam vFlat)) (hTT : XiTraceTransfer (xiDerivZeros hF2 hs) (fun _ => paramsOf ϱ lam) xiCoeffFamily) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - kappaXi lam vFlat - ε) * (Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (3 / 2 - kappaXi lam vFlat / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) := by + DyadicLowerBoundPair (2 - kappaXi lam vFlat) (3 / 2 - kappaXi lam vFlat / 2) + (fun T => N0simple T (2 * T)) (fun T => Ndist T (2 * T)) (fun T => Ncount T (2 * T)) := by have hP := paramsOf_valid hϱ h0 h1.le have hκ := kappa_nonneg_of_coeffMoments _ hR _ _ hCM have hM := gzMoments_of_transfer _ _ _ hκ hCM hTT have hlam' : (paramsOf ϱ lam).lam < 1 := h1 - have hA := simple_bound_of_gzMoments (xiDerivZeros hF2 hs) hR (paramsOf ϱ lam) hP hlam' hM - have hB := dist_bound_of_gzMoments (xiDerivZeros hF2 hs) hR (paramsOf ϱ lam) hP hlam' hM - intro ε hε - obtain ⟨T₁, hT₁⟩ := hA ε hε - obtain ⟨T₂, hT₂⟩ := hB ε hε - refine ⟨max T₁ T₂, fun T hT => ⟨?_, ?_⟩⟩ - · simpa using hT₁ T (le_trans (le_max_left _ _) hT) - · simpa using hT₂ T (le_trans (le_max_right _ _) hT) + exact fixedLam_of + (simple_bound_of_gzMoments (xiDerivZeros hF2 hs) hR (paramsOf ϱ lam) hP hlam' hM) + (dist_bound_of_gzMoments (xiDerivZeros hF2 hs) hR (paramsOf ϱ lam) hP hlam' hM) /-- **[XF′ Thm 8.2] at fixed λ for a window family Pf (e.g. (paramsOf ϱ lam).atV vQuartic) and profile v, from the interface Props + the family's zero-side facts (`WindowZeroSide`).** -/ @@ -445,28 +317,22 @@ theorem fixedLam_family (hF2 : XiDerivZerosInStrip) (hs : XiDerivSeam) (hR : XiD {v : ℝ → ℝ} {Pf : ℝ → Params} (hW : WindowZeroSide (xiDerivZeros hF2 hs) (paramsOf ϱ lam) Pf) (hCM : CoeffMoments (xiDerivZeros hF2 hs) Pf xiCoeffFamily (kappaXi lam v)) (hTT : XiTraceTransfer (xiDerivZeros hF2 hs) Pf xiCoeffFamily) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - kappaXi lam v - ε) * (Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (3 / 2 - kappaXi lam v / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) := by + DyadicLowerBoundPair (2 - kappaXi lam v) (3 / 2 - kappaXi lam v / 2) + (fun T => N0simple T (2 * T)) (fun T => Ndist T (2 * T)) (fun T => Ncount T (2 * T)) := by have hP := paramsOf_valid hϱ h0 h1.le have hκ := kappa_nonneg_of_coeffMoments _ hR _ _ hCM have hM := gzMoments_of_transfer _ _ _ hκ hCM hTT have hlam' : (paramsOf ϱ lam).lam < 1 := h1 - have hA := simple_bound_of_gzMoments_family (xiDerivZeros hF2 hs) hR (paramsOf ϱ lam) hP hlam' hW hM - have hB := dist_bound_of_gzMoments_family (xiDerivZeros hF2 hs) hR (paramsOf ϱ lam) hP hlam' hW hM - intro ε hε - obtain ⟨T₁, hT₁⟩ := hA ε hε - obtain ⟨T₂, hT₂⟩ := hB ε hε - refine ⟨max T₁ T₂, fun T hT => ⟨?_, ?_⟩⟩ - · simpa using hT₁ T (le_trans (le_max_left _ _) hT) - · simpa using hT₂ T (le_trans (le_max_right _ _) hT) + exact fixedLam_of + (simple_bound_of_gzMoments_family (xiDerivZeros hF2 hs) hR (paramsOf ϱ lam) hP hlam' hW hM) + (dist_bound_of_gzMoments_family (xiDerivZeros hF2 hs) hR (paramsOf ϱ lam) hP hlam' hW hM) /-- ε-free decimals from a strict certified inequality at one λ (used by Final.lean with CertFlat / CertQuartic): if c < 2 − κ and cd < 3/2 − κ/2 strictly and the fixed-λ bounds hold for κ, then c·N ≤ N₀ˢ and cd·N ≤ N_d eventually. -/ theorem headline_of_strict {κ c cd : ℝ} {N lowS lowD : ℝ → ℝ} (hN : ∀ T, 0 ≤ N T) (hc : c < 2 - κ) (hcd : cd < 3 / 2 - κ / 2) - (h : ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 - κ - ε) * N T ≤ lowS T ∧ (3 / 2 - κ / 2 - ε) * N T ≤ lowD T) : + (h : EpsLowerBoundPair (2 - κ) (3 / 2 - κ / 2) lowS lowD N) : ∃ T₀ : ℝ, ∀ T ≥ T₀, c * N T ≤ lowS T ∧ cd * N T ≤ lowD T := by set ε := min (2 - κ - c) (3 / 2 - κ / 2 - cd) with hε have hε0 : 0 < ε := lt_min (by linarith) (by linarith) @@ -502,38 +368,23 @@ lemma Ndist_add {a b d : ℝ} (hab : a ≤ b) (hbd : b ≤ d) : /-- H-RvM for ξ′ ⇒ N_{ξ′}(0,T) → ∞. -/ lemma tendsto_Ncount_zero_atTop (hR : XiDerivRvM hF2 hs) : Tendsto (fun T => (Ncount 0 T : ℝ)) atTop atTop := by - have h1 : Tendsto (fun T : ℝ => ((xiDerivZeros hF2 hs).N (T / 2) (2 * (T / 2)) : ℝ)) atTop atTop := - (tendsto_N_atTop (xiDerivZeros hF2 hs) hR).comp (tendsto_id.atTop_div_const two_pos) - refine tendsto_atTop_mono' _ ?_ h1 - filter_upwards [eventually_ge_atTop 0] with T hT - have hsplit := Assembly.N_add (xiDerivZeros hF2 hs) (a := 0) (b := T / 2) (c := T) (by linarith) - (by linarith) - have : 2 * (T / 2) = T := by ring - rw [this] - simp only [xiDerivZeros_N] at hsplit ⊢ - exact_mod_cast hsplit ▸ Nat.le_add_left _ _ + simpa only [xiDerivZeros_N] using Assembly.tendsto_N_zero_atTop (xiDerivZeros hF2 hs) hR /-- dyadic summation for one interval-additive count f against N_{ξ′}. -/ theorem cumulative_of_dyadic (hR : XiDerivRvM hF2 hs) {c : ℝ} {f : ℝ → ℝ → ℕ} (hf_add : ∀ a b d : ℝ, a ≤ b → b ≤ d → f a d = f a b + f b d) - (h : ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (c - ε) * (Ncount T (2 * T) : ℝ) ≤ f T (2 * T)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (c - ε) * (Ncount 0 T : ℝ) ≤ f 0 T := by - refine Assembly.dyadic (f := fun a b => (f a b : ℝ)) (g := fun a b => (Ncount a b : ℝ)) - (c := c) ?_ ?_ (fun _ _ => Nat.cast_nonneg _) (fun _ _ => Nat.cast_nonneg _) - (tendsto_Ncount_zero_atTop hF2 hs hR) h - · intro a b d hab hbd - exact_mod_cast hf_add a b d hab hbd - · intro a b d hab hbd - exact_mod_cast Ncount_add hF2 hs hab hbd + (h : DyadicLowerBound (c) (fun T => f T (2 * T)) (fun T => Ncount T (2 * T))) : + DyadicLowerBound (c) (fun T => f 0 T) (fun T => Ncount 0 T) := by + simpa only [xiDerivZeros_N] using + Assembly.cumulative_of_dyadic_zeroConfig (xiDerivZeros hF2 hs) hR hf_add + (by simpa only [xiDerivZeros_N] using h) /-- the fixed-λ pair of ε-bounds on dyadic windows ⇒ the same pair on (0,T]. -/ theorem cumulative_of_fixedLam (hR : XiDerivRvM hF2 hs) {κ : ℝ} - (h : ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - κ - ε) * (Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (3 / 2 - κ / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ)) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - κ - ε) * (Ncount 0 T : ℝ) ≤ (N0simple 0 T : ℝ) ∧ - (3 / 2 - κ / 2 - ε) * (Ncount 0 T : ℝ) ≤ (Ndist 0 T : ℝ) := by + (h : DyadicLowerBoundPair (2 - κ) (3 / 2 - κ / 2) + (fun T => N0simple T (2 * T)) (fun T => Ndist T (2 * T)) (fun T => Ncount T (2 * T))) : + DyadicLowerBoundPair (2 - κ) (3 / 2 - κ / 2) + (fun T => N0simple 0 T) (fun T => Ndist 0 T) (fun T => Ncount 0 T) := by have hA := cumulative_of_dyadic hF2 hs hR (c := 2 - κ) (f := N0simple) (fun a b d => N0simple_add hF2 hs) fun ε hε => by obtain ⟨T₀, hT₀⟩ := h ε hε @@ -555,34 +406,6 @@ end Cumulative t₀ ≤ T, Statement §6), so the W headline holds for T ≥ max T₀ t₀. Constants: wCoeffFamily has the same density D₁, hence the same κ₁(λ, v) and the same certificates CertFlat / CertQuartic. -/ -/-- **[XF′ Thm 9.4] at fixed λ, window family Pf, from the interface Props instantiated at wZeros.** -/ -theorem fixedLam_family_W {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) - (hR : RiemannVonMangoldt (wZeros hZ hs)) - {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - {v : ℝ → ℝ} {Pf : ℝ → Params} (hW : WindowZeroSide (wZeros hZ hs) (paramsOf ϱ lam) Pf) - (hCM : CoeffMoments (wZeros hZ hs) Pf wCoeffFamily (kappaXi lam v)) - (hTT : XiTraceTransfer (wZeros hZ hs) Pf wCoeffFamily) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - kappaXi lam v - ε) * (NcountW T (2 * T) : ℝ) ≤ (N0simpleW T (2 * T) : ℝ) ∧ - (3 / 2 - kappaXi lam v / 2 - ε) * (NcountW T (2 * T) : ℝ) ≤ (NdistW T (2 * T) : ℝ) := by - have hP := paramsOf_valid hϱ h0 h1.le - have hκ := kappa_nonneg_of_coeffMoments _ hR _ _ hCM - have hM := gzMoments_of_transfer _ _ _ hκ hCM hTT - have hlam' : (paramsOf ϱ lam).lam < 1 := h1 - have hA := simple_bound_of_gzMoments_family (wZeros hZ hs) hR (paramsOf ϱ lam) hP hlam' hW hM - have hB := dist_bound_of_gzMoments_family (wZeros hZ hs) hR (paramsOf ϱ lam) hP hlam' hW hM - intro ε hε - obtain ⟨T₁, hT₁⟩ := hA ε hε - obtain ⟨T₂, hT₂⟩ := hB ε hε - refine ⟨max (max T₁ T₂) t₀, fun T hT => ?_⟩ - have ht : t₀ ≤ T := (le_max_right _ _).trans hT - have h12 : max T₁ T₂ ≤ T := (le_max_left _ _).trans hT - have hA' := hT₁ T ((le_max_left _ _).trans h12) - have hB' := hT₂ T ((le_max_right _ _).trans h12) - rw [wZeros_N hZ hs ht, wZeros_N0s hZ hs ht] at hA' - rw [wZeros_N hZ hs ht, wZeros_Nd hZ hs ht] at hB' - exact ⟨hA', hB'⟩ - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Certificate.lean b/zeta23/Zeta23/XiPrime/Certificate.lean index 716cda2053..0d1201d78c 100644 --- a/zeta23/Zeta23/XiPrime/Certificate.lean +++ b/zeta23/Zeta23/XiPrime/Certificate.lean @@ -54,16 +54,5 @@ theorem certFlat : CertFlat := theorem certQuartic : CertQuartic := cert_of_strict_at_one continuousOn_kappaXi_vQuartic cert_quartic_one_strict -/-- the sharp seven-digit versions, also at some λ < 1. -/ -theorem certFlat_sharp : ∃ lam : ℝ, 1 / 2 ≤ lam ∧ lam < 1 ∧ - (0.858383 : ℝ) < 2 - kappaXi lam vFlat ∧ (0.929191 : ℝ) < 3 / 2 - kappaXi lam vFlat / 2 := - cert_of_strict_at_one continuousOn_kappaXi_vFlat - ⟨by linarith [cert_flat_one], by linarith [cert_flat_dist_one]⟩ - -theorem certQuartic_sharp : ∃ lam : ℝ, 1 / 2 ≤ lam ∧ lam < 1 ∧ - (0.868640 : ℝ) < 2 - kappaXi lam vQuartic ∧ (0.934320 : ℝ) < 3 / 2 - kappaXi lam vQuartic / 2 := - cert_of_strict_at_one continuousOn_kappaXi_vQuartic - ⟨by linarith [cert_quartic_one], by linarith [cert_quartic_dist_one]⟩ - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Certificate/D1.lean b/zeta23/Zeta23/XiPrime/Certificate/D1.lean index 9e457cd652..321c03b870 100644 --- a/zeta23/Zeta23/XiPrime/Certificate/D1.lean +++ b/zeta23/Zeta23/XiPrime/Certificate/D1.lean @@ -61,18 +61,6 @@ theorem D1coeff_succ (k : ℕ) : field_simp ring -/-- the ratio is at most 1/3 (its value at k = 0). -/ -theorem D1coeff_succ_le_third (k : ℕ) : D1coeff (k + 1) ≤ D1coeff k / 3 := by - rw [D1coeff_succ] - have hk : (0 : ℝ) ≤ k := Nat.cast_nonneg k - have hpos : (0 : ℝ) < (k + 2) * (2 * k + 3) := by positivity - have hr : 2 * ((k : ℝ) + 1) / ((k + 2) * (2 * k + 3)) ≤ 1 / 3 := by - rw [div_le_div_iff₀ hpos (by norm_num)] - nlinarith - calc D1coeff k * (2 * (k + 1) / ((k + 2) * (2 * k + 3))) - ≤ D1coeff k * (1 / 3) := mul_le_mul_of_nonneg_left hr (D1coeff_nonneg k) - _ = D1coeff k / 3 := by ring - /-- for k ≥ 9 the ratio is at most 20/231 (its value at k = 9; the ratio decreases in k). -/ theorem D1coeff_succ_le (k : ℕ) (hk : 9 ≤ k) : D1coeff (k + 1) ≤ D1coeff k * (20 / 231) := by rw [D1coeff_succ] @@ -212,21 +200,12 @@ theorem D1_nonneg {s : ℝ} (hs : 0 ≤ s) : 0 ≤ D1 s := by rw [D1trunc_one] at h exact le_trans (by positivity) h -theorem D1_zero : D1 0 = 0 := by - rw [D1_eq_trunc_add_tail 0] - simp [D1trunc_eq, D1term] - /-- the certified tail constant ε₉ := D1coeff 9 · Σ_j (20/231)^j = (1024/3273645375)·(231/211). -/ def eps9 : ℝ := 1024 / 2990212875 theorem eps9_eq : eps9 = D1coeff 9 * (1 - 20 / 231)⁻¹ := by rw [D1coeff_nine, eps9]; norm_num -theorem eps9_pos : 0 < eps9 := by unfold eps9; norm_num - -/-- ε₉ < 3.425·10⁻⁷ (the paper quotes ε₉ ≤ 3.43·10⁻⁷). -/ -theorem eps9_lt : eps9 < 3425 / 10 ^ 10 := by unfold eps9; norm_num - /-- on [0,1] the tail from k = 9 on is at most ε₉. -/ theorem D1tail9_le {s : ℝ} (hs0 : 0 ≤ s) (hs1 : s ≤ 1) : ∑' k, D1term (k + 9) s ≤ eps9 := by have hgeo : Summable (fun j : ℕ => D1coeff 9 * (20 / 231 : ℝ) ^ j) := @@ -250,10 +229,6 @@ theorem D1_le_D1trunc9_add {s : ℝ} (hs0 : 0 ≤ s) (hs1 : s ≤ 1) : D1 s ≤ rw [D1_eq_trunc_add_tail 9] linarith [D1tail9_le hs0 hs1] -theorem D1_mem_Icc {s : ℝ} (hs0 : 0 ≤ s) (hs1 : s ≤ 1) : - D1 s ∈ Icc (D1trunc 9 s) (D1trunc 9 s + eps9) := - ⟨D1trunc_le_D1 9 hs0, D1_le_D1trunc9_add hs0 hs1⟩ - /-- D1trunc K is a polynomial, hence continuous. -/ theorem continuous_D1trunc (K : ℕ) : Continuous (D1trunc K) := by unfold D1trunc; fun_prop @@ -304,7 +279,7 @@ theorem integral_D1trunc (K : ℕ) (s : ℝ) : have hint : ∀ k, IntervalIntegrable (fun u => D1term k u) MeasureTheory.volume 0 s := fun k => by unfold D1term; exact (continuous_const.mul (continuous_pow _)).intervalIntegrable _ _ simp only [D1trunc_eq] - rw [intervalIntegral.integral_add, intervalIntegral.integral_sub, intervalIntegral.integral_finset_sum] + rw [intervalIntegral.integral_add, intervalIntegral.integral_sub, intervalIntegral.integral_finsetSum] · simp only [integral_D1term, integral_id, intervalIntegral.integral_const_mul, integral_pow] norm_num ring @@ -313,7 +288,7 @@ theorem integral_D1trunc (K : ℕ) (s : ℝ) : · exact (continuous_const.mul (continuous_pow 2)).intervalIntegrable _ _ · exact (continuous_id.intervalIntegrable _ _).sub ((continuous_const.mul (continuous_pow 2)).intervalIntegrable _ _) - · exact (continuous_finset_sum _ fun k _ => + · exact (continuous_finsetSum _ fun k _ => (continuous_const.mul (continuous_pow _))).intervalIntegrable _ _ /-- **uniform diagonal-law main term:** for s ∈ [0,1], diff --git a/zeta23/Zeta23/XiPrime/Certificate/Poly.lean b/zeta23/Zeta23/XiPrime/Certificate/Poly.lean index f702f49756..0ac6892b73 100644 --- a/zeta23/Zeta23/XiPrime/Certificate/Poly.lean +++ b/zeta23/Zeta23/XiPrime/Certificate/Poly.lean @@ -39,7 +39,7 @@ def polyInt (c : List ℝ) (a b : ℝ) : ℝ := theorem integral_polyEval (c : List ℝ) (a b : ℝ) : ∫ x in a..b, polyEval c x = polyInt c a b := by unfold polyEval polyInt - rw [intervalIntegral.integral_finset_sum] + rw [intervalIntegral.integral_finsetSum] · refine Finset.sum_congr rfl fun k _ => ?_ rw [intervalIntegral.integral_const_mul, integral_pow] · intro k _ @@ -192,10 +192,6 @@ theorem continuous_vQuartic : Continuous vQuartic := by unfold vQuartic; fun_pro theorem vQuartic_nonneg_on {s : ℝ} (hs : s ∈ Icc (-(1:ℝ)/2) (1/2)) : 0 ≤ vQuartic s := (vQuartic_pos ⟨by linarith [hs.1], hs.2⟩).le -theorem continuous_vFlat : Continuous vFlat := continuous_const - -theorem vFlat_nonneg (s : ℝ) : 0 ≤ vFlat s := by simp [vFlat] - theorem convQ_nonneg {r : ℝ} (hr : r ∈ Icc (0:ℝ) 1) : 0 ≤ convQ r := by -- (v⋆v)(r) is an integral of a product of positive functions over an interval of length 1 − r ≥ 0 rw [← vConv_vQuartic] diff --git a/zeta23/Zeta23/XiPrime/CertificateFn.lean b/zeta23/Zeta23/XiPrime/CertificateFn.lean deleted file mode 100644 index af2ad3b030..0000000000 --- a/zeta23/Zeta23/XiPrime/CertificateFn.lean +++ /dev/null @@ -1,135 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/CertificateFn.lean — the c = 2 and c = 3 count certificates over ABSTRACT REAL FUNCTIONS. - -Zeta23.Assembly.count_certificate / count_certificate_c3 are stated for ONE parameter set P, with the -moments written as rtrace (P.hat T (Z.Gz P T)), frobSq (…) and the tail size as θ₀ T/(P.a T · P.L T). Their -proofs never look inside those three real numbers (beyond frobSq ≥ 0). For a HEIGHT FAMILY Pf : ℝ → Params -(the window at height T is (Pf T).phi T — the quartic window, Defs.Params.atV) we need the same algebra -with tr, fr, B, N, NII, lower arbitrary real functions of T; this file is that copy, proofs verbatim. --/ -import Zeta23.Assembly.CertificateC3 - -open Filter Asymptotics Topology Real - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Assembly - -/-- **c = 2 count certificate, function-abstract form.** If eventually -4·tr − fr − 2N − 3NII − B(4 + 2√fr + B) ≤ lower, B ≥ 0, B → 0, NII = o(N), N → ∞, fr ≥ 0, and for every -δ > 0 eventually (1−δ)N ≤ tr and fr ≤ (κ+δ)N, then for every ε > 0 eventually (2 − κ − ε)N ≤ lower. -/ -theorem count_certificate_fn (κ : ℝ) {N NII tr fr B lower : ℝ → ℝ} - (hfr0 : ∀ᶠ T in atTop, 0 ≤ fr T) - (h0 : ∀ᶠ T in atTop, - 4 * tr T - fr T - 2 * N T - 3 * NII T - B T * (4 + 2 * Real.sqrt (fr T) + B T) ≤ lower T) - (hB0 : ∀ᶠ T in atTop, 0 ≤ B T) - (hBto : Tendsto B atTop (𝓝 0)) - (hNII_o : NII =o[atTop] N) - (hNtop : Tendsto N atTop atTop) - (htrace : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, (1 - δ) * N T ≤ tr T) - (hfrob : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, fr T ≤ (κ + δ) * N T) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (2 - κ - ε) * N T ≤ lower T := by - intro ε hε - set δ : ℝ := ε / 6 with hδdef - have hδ : 0 < δ := by simp only [hδdef]; linarith - have hκδ0 : 0 ≤ κ + δ := by - by_contra h - rw [not_le] at h - obtain ⟨T, hT1, hT2, hT3⟩ := - ((hfrob δ hδ).and ((hNtop.eventually_ge_atTop 1).and hfr0)).exists - have : fr T < 0 := lt_of_le_of_lt hT1 (mul_neg_of_neg_of_pos h (by linarith)) - linarith - have hot := err_isLittleO (N := N) (R₁ := fun _ => 0) (R₂ := fun _ => 0) - (NII := NII) (B := B) (cl := fun _ => κ + δ) (K := κ + δ) - hNtop (isLittleO_zero _ _) (isLittleO_zero _ _) hNII_o hBto - (Eventually.of_forall fun _ => ⟨hκδ0, le_rfl⟩) - have hsmall : ∀ᶠ T in atTop, - 3 * NII T + B T * (4 + 2 * Real.sqrt ((κ + δ) * N T) + B T) ≤ δ * N T := by - filter_upwards [hot.def hδ, hNtop.eventually_ge_atTop 0] with T h1 hN0 - simp only [Real.norm_eq_abs, mul_zero, zero_add, add_zero, abs_of_nonneg hN0] at h1 - exact (le_abs_self _).trans h1 - have hmain : ∀ᶠ T in atTop, (2 - κ - ε) * N T ≤ lower T := by - filter_upwards [h0, hB0, htrace δ hδ, hfrob δ hδ, hsmall, - hNtop.eventually_ge_atTop 0] with T hA hB₀ htr hfr hsm hN0 - have hlow := N0star_lower_moment (κ := κ) (R₁ := δ * N T) (R₂ := δ * N T) hB₀ hA - (by linarith) (by linarith) - rw [show κ * N T + δ * N T = (κ + δ) * N T by ring] at hlow - have hfin : (2 - κ - ε) * N T - = (2 - κ) * N T - (4 * (δ * N T) + δ * N T + δ * N T) := by - simp only [hδdef]; ring - rw [hfin] - linarith [hsm, hlow] - obtain ⟨T₀, hT₀⟩ := eventually_atTop.mp hmain - exact ⟨T₀, fun T hT => hT₀ T hT⟩ - -/-- **c = 3 count certificate, function-abstract form:** from -6·tr − fr − 3N − 5NII − B(6 + 2√fr + B) ≤ 2·lower and the moments, eventually (3/2 − κ/2 − ε)N ≤ lower. -/ -theorem count_certificate_c3_fn (κ : ℝ) {N NII tr fr B lower : ℝ → ℝ} - (hfr0 : ∀ᶠ T in atTop, 0 ≤ fr T) - (h0 : ∀ᶠ T in atTop, - 6 * tr T - fr T - 3 * N T - 5 * NII T - B T * (6 + 2 * Real.sqrt (fr T) + B T) ≤ 2 * lower T) - (hB0 : ∀ᶠ T in atTop, 0 ≤ B T) - (hBto : Tendsto B atTop (𝓝 0)) - (hNII_o : NII =o[atTop] N) - (hNtop : Tendsto N atTop atTop) - (htrace : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, (1 - δ) * N T ≤ tr T) - (hfrob : ∀ δ > (0:ℝ), ∀ᶠ T in atTop, fr T ≤ (κ + δ) * N T) : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, (3 / 2 - κ / 2 - ε) * N T ≤ lower T := by - intro ε hε - set δ : ℝ := ε / 6 with hδdef - have hδ : 0 < δ := by simp only [hδdef]; linarith - have hκδ0 : 0 ≤ κ + δ := by - by_contra h - rw [not_le] at h - obtain ⟨T, hT1, hT2, hT3⟩ := - ((hfrob δ hδ).and ((hNtop.eventually_ge_atTop 1).and hfr0)).exists - have : fr T < 0 := lt_of_le_of_lt hT1 (mul_neg_of_neg_of_pos h (by linarith)) - linarith - have hot := err_isLittleO (N := N) (R₁ := fun _ => 0) (R₂ := fun _ => 0) - (NII := NII) (B := B) (cl := fun _ => κ + δ) (K := κ + δ) - hNtop (isLittleO_zero _ _) (isLittleO_zero _ _) hNII_o hBto - (Eventually.of_forall fun _ => ⟨hκδ0, le_rfl⟩) - have hBsmall : ∀ᶠ T in atTop, B T ≤ δ / 2 * N T := by - have hB1 : ∀ᶠ T in atTop, B T ≤ 1 := - hBto.eventually (eventually_le_nhds (show (0:ℝ) < 1 by norm_num)) - filter_upwards [hB1, hNtop.eventually_ge_atTop (2 / δ)] with T h1 h2 - have : 1 ≤ δ / 2 * N T := by - rw [div_le_iff₀ hδ] at h2 - nlinarith - linarith - have hsmall : ∀ᶠ T in atTop, - (5 / 2) * NII T + (B T / 2) * (6 + 2 * Real.sqrt ((κ + δ) * N T) + B T) - ≤ 2 * δ * N T := by - filter_upwards [hot.def hδ, hNII_o.def hδ, hNtop.eventually_ge_atTop 0, hBsmall, hB0] - with T h1 hnii hN0 hBs hB₀ - simp only [Real.norm_eq_abs, mul_zero, zero_add, add_zero, abs_of_nonneg hN0] at h1 hnii - have h1' : 3 * NII T + B T * (4 + 2 * Real.sqrt ((κ + δ) * N T) + B T) ≤ δ * N T := - (le_abs_self _).trans h1 - have hnii' : NII T ≤ δ * N T := (le_abs_self _).trans hnii - have hB₀' : 0 ≤ B T := hB₀ - nlinarith - have hmain : ∀ᶠ T in atTop, (3 / 2 - κ / 2 - ε) * N T ≤ lower T := by - filter_upwards [h0, hB0, htrace δ hδ, hfrob δ hδ, hsmall, - hNtop.eventually_ge_atTop 0] with T hA hB₀ htr hfr hsm hN0 - have hlow := count_lower_moment_c3_five (κ := κ) (R₁ := δ * N T) (R₂ := δ * N T) hB₀ hA - (by linarith) (by linarith) - rw [show κ * N T + δ * N T = (κ + δ) * N T by ring] at hlow - have hεδ : (3 / 2 - κ / 2 - ε) * N T - ≤ (3 / 2 - κ / 2) * N T - (3 * (δ * N T) + δ * N T / 2 + 2 * δ * N T) := by - simp only [hδdef]; nlinarith - linarith [hsm, hlow, hεδ] - obtain ⟨T₀, hT₀⟩ := eventually_atTop.mp hmain - exact ⟨T₀, fun T hT => hT₀ T hT⟩ - -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Coeff.lean b/zeta23/Zeta23/XiPrime/Coeff.lean index 9b414760c0..ee82784b20 100644 --- a/zeta23/Zeta23/XiPrime/Coeff.lean +++ b/zeta23/Zeta23/XiPrime/Coeff.lean @@ -19,11 +19,9 @@ from Also here: Coeff/LSeries (L(C_J,s) = B/(Λ⋆−A), for the explicit-formula modules). -/ import Zeta23.XiPrime.Statement -import Zeta23.XiPrime.Coeff.Upper import Zeta23.XiPrime.Coeff.H3 import Zeta23.XiPrime.Coeff.LSeries import Zeta23.XiPrime.Coeff.LT -import Zeta23.XiPrime.Certificate.D1 open scoped BigOperators ArithmeticFunction open Complex @@ -33,10 +31,6 @@ noncomputable section namespace Zeta23 namespace XiPrime -/-- ‖(l/2 : ℂ)‖ ≥ l/2. -/ -lemma norm_real_half_l_ge (T : ℝ) : l T / 2 ≤ ‖(((l T / 2 : ℝ)) : ℂ)‖ := by - rw [Complex.norm_real, Real.norm_eq_abs]; exact le_abs_self _ - /-- **[XF′ Lemma 7.1 + Remark 7.2] for the ξ′ family b_N = C(N; L_T).** -/ theorem xiCoeffFamily_hyps : xiCoeffFamily.Hyps where c_one := fun _ => xiCoeff_one _ @@ -46,14 +40,5 @@ theorem xiCoeffFamily_hyps : xiCoeffFamily.Hyps where D_cont := continuous_D1 D_nonneg := fun _ hs => D1_nonneg hs.1 -/-- **the same for the Z′ family b_N = C(N; l/2) (real parameter).** -/ -theorem wCoeffFamily_hyps : wCoeffFamily.Hyps where - c_one := fun _ => xiCoeff_one _ - H1 := coeff_H1 (fun T => ((l T / 2 : ℝ) : ℂ)) (fun T _ => norm_real_half_l_ge T) - H2 := coeff_H2 (fun T => ((l T / 2 : ℝ) : ℂ)) (fun T _ => norm_real_half_l_ge T) - H3 := coeff_H3 (fun T => ((l T / 2 : ℝ) : ℂ)) (fun T => by simp) (fun T => by simp) - D_cont := continuous_D1 - D_nonneg := fun _ hs => D1_nonneg hs.1 - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Coeff/Abel.lean b/zeta23/Zeta23/XiPrime/Coeff/Abel.lean index dd5cc13ad2..e24aac1832 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/Abel.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/Abel.lean @@ -45,9 +45,6 @@ lemma Mfun_mono : Monotone Mfun := fun _ _ hab => sum_le_sum_of_subset_of_nonneg (Icc_subset_Icc le_rfl (Nat.floor_le_floor hab)) fun n _ _ => div_nonneg ArithmeticFunction.vonMangoldt_nonneg (Nat.cast_nonneg n) -lemma Mfun_nonneg (t : ℝ) : 0 ≤ Mfun t := - sum_nonneg fun n _ => div_nonneg ArithmeticFunction.vonMangoldt_nonneg (Nat.cast_nonneg n) - lemma abs_Mfun_sub_log_le {t : ℝ} (ht : 1 ≤ t) : |Mfun t - Real.log t| ≤ KM := by rw [Mfun_eq_Ioc]; exact Cheb.mertensFirst ht diff --git a/zeta23/Zeta23/XiPrime/Coeff/Basic.lean b/zeta23/Zeta23/XiPrime/Coeff/Basic.lean index c09349957b..2d9bde5345 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/Basic.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/Basic.lean @@ -70,17 +70,6 @@ theorem sum_Ioc_mul_apply (f g : ArithmeticFunction R) (h : ℕ → R) (X : ℕ) obtain ⟨_, hab, _⟩ := hx simp [hab, mul_assoc] -/-- Same with the factors swapped: Σ_{N≤X} (f∗g)(N) h(N) = Σ_{e≤X} g(e) Σ_{d≤X/e} f(d) h(de). -/ -theorem sum_Ioc_mul_apply' (f g : ArithmeticFunction R) (h : ℕ → R) (X : ℕ) : - ∑ N ∈ Ioc 0 X, (f * g) N * h N = - ∑ e ∈ Ioc 0 X, g e * ∑ d ∈ Ioc 0 (X / e), f d * h (d * e) := by - rw [mul_comm f g, sum_Ioc_mul_apply] - refine sum_congr rfl fun e _ => ?_ - congr 1 - refine sum_congr rfl fun d _ => ?_ - rw [mul_comm e d] - - /-- A nonnegative weight with w(de) ≤ w(d)·w(e) (e.g. N ↦ N^{-σ}, or N ↦ g(N)/N with g submultiplicative). -/ structure SubmultWeight (w : ℕ → ℝ) : Prop where nonneg : ∀ n, 0 ≤ w n @@ -137,7 +126,6 @@ theorem sum_Ioc_pow_apply_le {f : ArithmeticFunction ℝ} {w : ℕ → ℝ} (hw mul_le_mul_of_nonneg_right (sum_Ioc_pow_apply_le hw hf X m) h0 _ = (∑ n ∈ Ioc 0 X, f n * w n) ^ (m + 1 + 1) := by ring - end Swap /-! ### Λ, Λ·log and the Dirichlet powers Λ^{∗m} -/ @@ -278,21 +266,6 @@ lemma lamLogPow_nonneg (k n : ℕ) : 0 ≤ (lamLog ^ k) n := pow_apply_nonneg la @[simp] lemma xiCoeff_one (Λs : ℂ) : xiCoeff Λs 1 = 0 := by simp [xiCoeff, ArithmeticFunction.vonMangoldt_apply_one] -/-- the j-sum may be taken over any range ⊇ range (Ω N): the extra terms vanish. -/ -lemma xiCoeff_eq_sum_range_of_le (Λs : ℂ) {N M : ℕ} (hM : Ω N ≤ M) : - xiCoeff Λs N = -((Λ N : ℝ) : ℂ) + - ∑ j ∈ Finset.range M, (Λs⁻¹) ^ (j + 1) * ((lamLogConv j N : ℝ) : ℂ) := by - unfold xiCoeff - congr 1 - refine (sum_subset (range_subset_range.mpr hM) fun j _ hj => ?_) - have : Ω N ≤ j := by simpa using hj - rw [lamLogConv_eq_zero_of_le this]; simp - -/-- C(N; conj Λ⋆) = conj C(N; Λ⋆) (C is a real polynomial in Λ⋆⁻¹). -/ -lemma xiCoeff_conj (Λs : ℂ) (N : ℕ) : xiCoeff (conj Λs) N = conj (xiCoeff Λs N) := by - unfold xiCoeff - simp [map_sum, map_neg, map_add, map_mul, map_pow, map_inv₀, Complex.conj_ofReal] - /-- the "j-part" of C: C_J(N;Λ⋆) := Σ_{j<Ω N} Λ⋆^{-(j+1)}·lamLogConv j N, so that C = −Λ + C_J. This is the coefficient sequence met by the explicit formula: its L-series is B/(Λ⋆ − A). -/ def xiCoeffJ (Λs : ℂ) (N : ℕ) : ℂ := diff --git a/zeta23/Zeta23/XiPrime/Coeff/DiagLaw.lean b/zeta23/Zeta23/XiPrime/Coeff/DiagLaw.lean index 5a1ead751f..a61e519259 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/DiagLaw.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/DiagLaw.lean @@ -13,10 +13,8 @@ Assembly (K-truncation): S = Σ_{k≤K} S_sf,k + R with 0 ≤ R ≤ non-squarefree part (Coeff/NonSquarefree, O_K(l)) + k-tail (Coeff/Upper + Coeff/Tail, ≤ ε·l²), ∫ D₁ = ∫ D1trunc K + tail (Certificate/D1). -/ -import Zeta23.XiPrime.Coeff.Upper import Zeta23.XiPrime.Coeff.MainTerm.Squarefree import Zeta23.XiPrime.Coeff.MainTerm.Asymp -import Zeta23.XiPrime.Coeff.NonSquarefree import Zeta23.XiPrime.Coeff.PrimeSums import Zeta23.XiPrime.Coeff.Param import Zeta23.XiPrime.Coeff.Tail @@ -39,9 +37,6 @@ def sfPart (Λs : ℂ) (k : ℕ) (y : ℝ) : ℝ := def bPart (Λs : ℂ) (K : ℕ) (y : ℝ) : ℝ := ∑ N ∈ (Ioc 0 ⌊Real.exp y⌋₊).filter (fun N => ¬ (Squarefree N ∧ ω N ≤ K)), ‖xiCoeff Λs N‖ ^ 2 / N -lemma sfPart_nonneg (Λs : ℂ) (k : ℕ) (y : ℝ) : 0 ≤ sfPart Λs k y := - sum_nonneg fun N _ => div_nonneg (sq_nonneg _) (Nat.cast_nonneg N) - lemma bPart_nonneg (Λs : ℂ) (K : ℕ) (y : ℝ) : 0 ≤ bPart Λs K y := sum_nonneg fun N _ => div_nonneg (sq_nonneg _) (Nat.cast_nonneg N) diff --git a/zeta23/Zeta23/XiPrime/Coeff/LSeries.lean b/zeta23/Zeta23/XiPrime/Coeff/LSeries.lean index da9c0a5732..879189fd3c 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/LSeries.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/LSeries.lean @@ -234,19 +234,6 @@ lemma summable_norm_xiCoeffJ_gen (hσ₀ : 1 < σ₀) {Λs : ℂ} (hΛ : R0sig exact summable_of_sum_range_le hf fun n => (sum_range_le_sum_Ioc hf hf0 n).trans (sum_norm_xiCoeffJ_rpow_le_gen hσ₀ hΛ n) -/-- **(C2) on any line σ₀ > 1.** -/ -theorem norm_xiCoeffJ_tsum_le_of_gt_one (σ₀ : ℝ) (hσ₀ : 1 < σ₀) : - ∃ R₀ C : ℝ, 0 < R₀ ∧ ∀ Λs : ℂ, R₀ ≤ ‖Λs‖ → - Summable (fun N : ℕ => ‖xiCoeffJ Λs N‖ * (N : ℝ) ^ (-σ₀)) ∧ - ∑' N, ‖xiCoeffJ Λs N‖ * (N : ℝ) ^ (-σ₀) ≤ C / ‖Λs‖ := by - refine ⟨R0sig σ₀, (4 / (σ₀ - 1)) * Asig (sigAux σ₀), R0sig_pos σ₀, fun Λs hΛ => ?_⟩ - have hf : ∀ N, 0 ≤ ‖xiCoeffJ Λs N‖ * (N : ℝ) ^ (-σ₀) := norm_xiCoeffJ_rpow_nonneg Λs σ₀ - have hf0 : ‖xiCoeffJ Λs 0‖ * ((0:ℕ) : ℝ) ^ (-σ₀) = 0 := by simp - have hbound : ∀ n, ∑ i ∈ range n, ‖xiCoeffJ Λs i‖ * (i : ℝ) ^ (-σ₀) - ≤ (4 / (σ₀ - 1)) * Asig (sigAux σ₀) / ‖Λs‖ := - fun n => (sum_range_le_sum_Ioc hf hf0 n).trans (sum_norm_xiCoeffJ_rpow_le_gen hσ₀ hΛ n) - exact ⟨summable_of_sum_range_le hf hbound, Real.tsum_le_of_sum_range_le hf hbound⟩ - /-- summability of ‖C_J‖·N^{−σ} for σ ≥ σ₀. -/ lemma summable_norm_xiCoeffJ_rpow_gen (hσ₀ : 1 < σ₀) {Λs : ℂ} (hΛ : R0sig σ₀ ≤ ‖Λs‖) {σ : ℝ} (hσ : σ₀ ≤ σ) : Summable (fun N : ℕ => ‖xiCoeffJ Λs N‖ * (N : ℝ) ^ (-σ)) := by @@ -312,12 +299,6 @@ end general /-! ### the line Re s = 5/4 (the ξ′ explicit formula's contour): instances of the general statements -/ -/-- **(C2) absolute bound** at 5/4: Σ' ‖C_J(N;Λ⋆)‖ N^{-5/4} ≤ C/‖Λ⋆‖ for ‖Λ⋆‖ ≥ R₀ (with summability). -/ -theorem norm_xiCoeffJ_tsum_le : ∃ R₀ C : ℝ, 0 < R₀ ∧ ∀ Λs : ℂ, R₀ ≤ ‖Λs‖ → - Summable (fun N : ℕ => ‖xiCoeffJ Λs N‖ * (N : ℝ) ^ (-(5/4 : ℝ))) ∧ - ∑' N, ‖xiCoeffJ Λs N‖ * (N : ℝ) ^ (-(5/4 : ℝ)) ≤ C / ‖Λs‖ := - norm_xiCoeffJ_tsum_le_of_gt_one (5/4) (by norm_num) - /-- **(C1) the closed form** at 5/4: L(C_J, s) = B(s)/(Λ⋆ − A(s)) for 5/4 ≤ Re s and ‖Λ⋆‖ ≥ R₀. -/ theorem LSeries_xiCoeffJ : ∃ R₀ : ℝ, 0 < R₀ ∧ ∀ Λs : ℂ, R₀ ≤ ‖Λs‖ → ∀ s : ℂ, 5 / 4 ≤ s.re → Summable (fun N : ℕ => ‖xiCoeffJ Λs N‖ * (N : ℝ) ^ (-s.re)) ∧ diff --git a/zeta23/Zeta23/XiPrime/Coeff/LT.lean b/zeta23/Zeta23/XiPrime/Coeff/LT.lean index 0ab55b45ba..dabe87a5ac 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/LT.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/LT.lean @@ -26,17 +26,5 @@ lemma norm_LT_ge (T : ℝ) : l T / 2 ≤ ‖LT T‖ := by calc l T / 2 ≤ |(LT T).re| := by rw [re_LT]; exact le_abs_self _ _ ≤ ‖LT T‖ := Complex.abs_re_le_norm _ -lemma LT_ne_zero {T : ℝ} (hl : 0 < l T) : LT T ≠ 0 := by - intro h - have := congrArg Complex.re h - rw [re_LT, Complex.zero_re] at this - linarith - -lemma LT_add_ne_zero {T δ : ℝ} (hl : 0 < l T) (hδ : 0 ≤ δ) : LT T + (δ : ℂ) ≠ 0 := by - intro h - have := congrArg Complex.re h - rw [Complex.add_re, re_LT, Complex.ofReal_re, Complex.zero_re] at this - linarith - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Coeff/MainTerm/Asymp.lean b/zeta23/Zeta23/XiPrime/Coeff/MainTerm/Asymp.lean index 9a8a36520d..39371f3a85 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/MainTerm/Asymp.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/MainTerm/Asymp.lean @@ -34,8 +34,6 @@ def Tk (k : ℕ) (u : ℝ) : ℝ := Sdiv (lamLog ^ k) u def Wk (k : ℕ) (u : ℝ) : ℝ := ∑ N ∈ Finset.Ioc 0 ⌊Real.exp u⌋₊, (lamLog ^ k) N * Real.log N ^ 2 / N -lemma Tk_def (k : ℕ) (u : ℝ) : Tk k u = ∑ N ∈ Finset.Ioc 0 ⌊Real.exp u⌋₊, (lamLog ^ k) N / N := rfl - lemma Wk_def (k : ℕ) (u : ℝ) : Wk k u = ∑ N ∈ Finset.Ioc 0 ⌊Real.exp u⌋₊, (lamLog ^ k) N * Real.log N ^ 2 / N := rfl @@ -50,8 +48,6 @@ lemma Tk_succ (k : ℕ) (u : ℝ) : lemma Tk_mono (k : ℕ) : Monotone (Tk k) := Sdiv_mono (lamLogPow_nonneg k) -lemma Tk_nonneg (k : ℕ) (u : ℝ) : 0 ≤ Tk k u := Sdiv_nonneg (lamLogPow_nonneg k) u - /-- Σ_{d ≤ e^u} Λ(d) log d / d ≤ u·(u + K). -/ lemma sum_lam_log_div_le {u : ℝ} (hu : 0 ≤ u) : ∑ d ∈ Ioc 0 ⌊Real.exp u⌋₊, Λ d * Real.log d / d ≤ u * (u + KM) := by @@ -65,41 +61,6 @@ lemma sum_lam_log_div_le {u : ℝ} (hu : 0 ≤ u) : _ = u * Sdiv Λ u := by rw [← mul_sum]; rfl _ ≤ u * (u + KM) := mul_le_mul_of_nonneg_left (Sdiv_lam_le hu) hu -/-- **the one-variable Mertens sums** Σ_{n ≤ e^u} Λ(n)/n·(log n)^j = u^{j+1}/(j+1) + O((1+u)^j) -(mertens_step with f(v) = v^j; j = 1 is Tk 1, and j = 1, 2, 3 are the three sums of the k = 1 (prime) term). -/ -theorem sum_vonMangoldt_div_mul_log_pow (j : ℕ) {u : ℝ} (hu : 0 ≤ u) : - |(∑ n ∈ Ioc 0 ⌊Real.exp u⌋₊, Λ n / n * Real.log n ^ j) - u ^ (j + 1) / (j + 1)| - ≤ KM * (j + 1) * (1 + u) ^ j := by - have hK := KM_nonneg - have hderiv : ∀ v ∈ Set.Icc 0 u, HasDerivAt (fun v : ℝ => v ^ j) ((fun v : ℝ => (j : ℝ) * v ^ (j - 1)) v) v := - fun v _ => by simpa using (hasDerivAt_id' v).fun_pow j - have hcont : ContinuousOn (fun v : ℝ => (j : ℝ) * v ^ (j - 1)) (Set.Icc 0 u) := by fun_prop - have hstep := mertens_step hu hderiv hcont - rw [integral_pow] at hstep - simp only [zero_pow (Nat.succ_ne_zero j), sub_zero] at hstep - have h1 : |u ^ j| ≤ (1 + u) ^ j := by - rw [abs_of_nonneg (pow_nonneg hu j)]; exact pow_le_pow_left₀ hu (by linarith) j - have h2 : ∫ v in (0:ℝ)..u, |(j : ℝ) * v ^ (j - 1)| ≤ j * (1 + u) ^ j := by - have hint : IntervalIntegrable (fun v : ℝ => |(j : ℝ) * v ^ (j - 1)|) MeasureTheory.volume 0 u := by - apply Continuous.intervalIntegrable; fun_prop - calc ∫ v in (0:ℝ)..u, |(j : ℝ) * v ^ (j - 1)| ≤ ∫ _ in (0:ℝ)..u, (j : ℝ) * (1 + u) ^ (j - 1) := by - refine intervalIntegral.integral_mono_on hu hint intervalIntegrable_const fun v hv => ?_ - rw [abs_of_nonneg (mul_nonneg (Nat.cast_nonneg j) (pow_nonneg hv.1 _))] - exact mul_le_mul_of_nonneg_left (pow_le_pow_left₀ hv.1 (by linarith [hv.2]) _) (Nat.cast_nonneg j) - _ = (j : ℝ) * (u * (1 + u) ^ (j - 1)) := by - rw [intervalIntegral.integral_const, smul_eq_mul, sub_zero]; ring - _ ≤ j * (1 + u) ^ j := by - rcases j with _ | m - · simp - · refine mul_le_mul_of_nonneg_left ?_ (Nat.cast_nonneg _) - rw [Nat.add_sub_cancel, pow_succ' (1 + u) m] - exact mul_le_mul_of_nonneg_right (by linarith) (by positivity) - have e : ((j : ℝ) + 1) = ((j + 1 : ℕ) : ℝ) := by push_cast; ring - calc |(∑ n ∈ Ioc 0 ⌊Real.exp u⌋₊, Λ n / n * Real.log n ^ j) - u ^ (j + 1) / (j + 1)| - ≤ KM * (|u ^ j| + ∫ v in (0:ℝ)..u, |(j : ℝ) * v ^ (j - 1)|) := by exact_mod_cast hstep - _ ≤ KM * ((1 + u) ^ j + j * (1 + u) ^ j) := mul_le_mul_of_nonneg_left (add_le_add h1 h2) hK - _ = KM * (j + 1) * (1 + u) ^ j := by ring - /-! ### the Mertens induction for Tk -/ /-- the polynomial integral ∫₀ᵘ v (u − v)^N dv = u^{N+2}/((N+1)(N+2)). -/ diff --git a/zeta23/Zeta23/XiPrime/Coeff/NonSquarefree.lean b/zeta23/Zeta23/XiPrime/Coeff/NonSquarefree.lean index 668f6e3966..eec64cb28d 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/NonSquarefree.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/NonSquarefree.lean @@ -30,14 +30,6 @@ namespace XiPrime def SdivP (f : ArithmeticFunction ℝ) (P : ℕ → Prop) [DecidablePred P] (u : ℝ) : ℝ := ∑ N ∈ (Ioc 0 ⌊Real.exp u⌋₊).filter P, f N / N -lemma SdivP_nonneg {f : ArithmeticFunction ℝ} (hf : ∀ n, 0 ≤ f n) (P : ℕ → Prop) [DecidablePred P] - (u : ℝ) : 0 ≤ SdivP f P u := - sum_nonneg fun N _ => div_nonneg (hf N) (Nat.cast_nonneg N) - -lemma SdivP_le_Sdiv {f : ArithmeticFunction ℝ} (hf : ∀ n, 0 ≤ f n) (P : ℕ → Prop) [DecidablePred P] - (u : ℝ) : SdivP f P u ≤ Sdiv f u := - sum_le_sum_of_subset_of_nonneg (filter_subset _ _) fun N _ _ => div_nonneg (hf N) (Nat.cast_nonneg N) - lemma SdivP_mono_pred {f : ArithmeticFunction ℝ} (hf : ∀ n, 0 ≤ f n) {P Q : ℕ → Prop} [DecidablePred P] [DecidablePred Q] (hPQ : ∀ n, P n → Q n) (u : ℝ) : SdivP f P u ≤ SdivP f Q u := sum_le_sum_of_subset_of_nonneg (fun N hN => by @@ -54,13 +46,6 @@ lemma SdivP_or_le {f : ArithmeticFunction ℝ} (hf : ∀ n, 0 ≤ f n) (P Q : sum_nonneg fun N _ => div_nonneg (hf N) (Nat.cast_nonneg N) linarith -lemma SdivP_mono_u {f : ArithmeticFunction ℝ} (hf : ∀ n, 0 ≤ f n) (P : ℕ → Prop) [DecidablePred P] : - Monotone (SdivP f P) := by - intro a b hab - refine sum_le_sum_of_subset_of_nonneg (filter_subset_filter _ (Ioc_subset_Ioc le_rfl ?_)) ?_ - · exact Nat.floor_le_floor (Real.exp_le_exp.mpr hab) - · exact fun N _ _ => div_nonneg (hf N) (Nat.cast_nonneg N) - /-- SdivP as an unrestricted sum with an indicator. -/ lemma SdivP_eq_sum_ite (f : ArithmeticFunction ℝ) (P : ℕ → Prop) [DecidablePred P] (u : ℝ) : SdivP f P u = ∑ N ∈ Ioc 0 ⌊Real.exp u⌋₊, f N * (if P N then ((N:ℕ):ℝ)⁻¹ else 0) := by @@ -207,29 +192,6 @@ lemma sum_not_squarefree_vonMangoldt_sq_div_le (X : ℕ) : sum_le_sum_of_subset_of_nonneg (filter_subset _ _) fun n _ _ => defect_term_nonneg n _ ≤ Cdef := by simpa using defect_le (X : ℝ) -/-- Σ_{n ≤ x, n not squarefree} Λ(n) log n/n ≤ 2·Cdef. -/ -lemma sum_not_squarefree_lamLog_div_le (X : ℕ) : - ∑ n ∈ (Ioc 0 X).filter (fun n => ¬ Squarefree n), Λ n * Real.log n / n ≤ 2 * Cdef := by - calc ∑ n ∈ (Ioc 0 X).filter (fun n => ¬ Squarefree n), Λ n * Real.log n / n - ≤ ∑ n ∈ (Ioc 0 X).filter (fun n => ¬ Squarefree n), 2 * (Λ n * (Real.log n - Λ n) / n) := by - refine sum_le_sum fun n hn => ?_ - have hns : ¬ Squarefree n := (mem_filter.mp hn).2 - rcases eq_or_ne (Λ n) 0 with h0 | h0 - · simp [h0] - · have h1 := (vonMangoldt_le_log_sub_of_not_prime h0 (not_prime_of_not_squarefree hns)).1 - -- log n ≤ 2 (log n − Λ n) - have : Λ n * Real.log n ≤ 2 * (Λ n * (Real.log n - Λ n)) := by - nlinarith [ArithmeticFunction.vonMangoldt_nonneg (n := n)] - calc Λ n * Real.log n / n = (Λ n * Real.log n) / n := by ring - _ ≤ (2 * (Λ n * (Real.log n - Λ n))) / n := div_le_div_of_nonneg_right this (Nat.cast_nonneg n) - _ = 2 * (Λ n * (Real.log n - Λ n) / n) := by ring - _ = 2 * ∑ n ∈ (Ioc 0 X).filter (fun n => ¬ Squarefree n), Λ n * (Real.log n - Λ n) / n := by - rw [mul_sum] - _ ≤ 2 * ∑ n ∈ Ioc 0 X, Λ n * (Real.log n - Λ n) / n := - mul_le_mul_of_nonneg_left - (sum_le_sum_of_subset_of_nonneg (filter_subset _ _) fun n _ _ => defect_term_nonneg n) zero_le_two - _ ≤ 2 * Cdef := by have := defect_le (X : ℝ); simp at this; linarith - /-- Σ_{p ≤ X prime} log²p/p² ≤ Cdef (the a = 2 slice of the defect sum at X²). -/ lemma sum_prime_log_sq_div_sq_le (X : ℕ) : ∑ p ∈ (Ioc 0 X).filter Nat.Prime, Real.log p ^ 2 / (p:ℝ) ^ 2 ≤ Cdef := by @@ -304,15 +266,6 @@ lemma sum_dvd_vonMangoldt_div_le {p : ℕ} (hp : p.Prime) (X : ℕ) : /-- Σ_{N≤e^u, p∣N} Λ^{∗m}(N)/N. -/ def Dsum (m p : ℕ) (u : ℝ) : ℝ := SdivP (Λ ^ m) (fun N => p ∣ N) u -lemma Dsum_zero {p : ℕ} (hp : p.Prime) (u : ℝ) : Dsum 0 p u = 0 := by - unfold Dsum SdivP - refine sum_eq_zero fun N hN => ?_ - have hpN : p ∣ N := (mem_filter.mp hN).2 - rw [pow_zero, ArithmeticFunction.one_apply] - split_ifs with h1 - · subst h1; exact absurd (Nat.eq_one_of_dvd_one hpN ▸ hp) Nat.not_prime_one - · simp - /-- the bracket G := u + (m+1)K + 1 used in all the inductions (≥ 1, ≥ u + K, monotone in m and u). -/ def Gb (m : ℕ) (u : ℝ) : ℝ := u + (m + 1) * KM + 1 @@ -409,8 +362,6 @@ theorem Dsum_le {p : ℕ} (hp : p.Prime) : ∀ (m : ℕ) {u : ℝ}, 0 ≤ u → /-- Σ_{N≤e^u, ¬Squarefree N} Λ^{∗m}(N)/N. -/ def Nsf (m : ℕ) (u : ℝ) : ℝ := SdivP (Λ ^ m) (fun N => ¬ Squarefree N) u -lemma Nsf_nonneg (m : ℕ) (u : ℝ) : 0 ≤ Nsf m u := SdivP_nonneg (lamPow_nonneg m) _ u - /-- the splitting: d·e not squarefree, Λ d ≠ 0 ⇒ d not prime ∨ e not squarefree ∨ (d prime ∧ d ∣ e). -/ lemma split_not_squarefree (d e : ℕ) (_hd : Λ d ≠ 0) (h : ¬ Squarefree (d * e)) : ¬ d.Prime ∨ (¬ Squarefree e ∨ (d.Prime ∧ d ∣ e)) := by diff --git a/zeta23/Zeta23/XiPrime/Coeff/Param.lean b/zeta23/Zeta23/XiPrime/Coeff/Param.lean index cbbb95d893..3ef9f98283 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/Param.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/Param.lean @@ -38,15 +38,6 @@ lemma normSq_param_eq : ‖Λs‖ ^ 2 = l ^ 2 / 4 + Λs.im ^ 2 := by lemma normSq_param_ge : l ^ 2 / 4 ≤ ‖Λs‖ ^ 2 := by rw [normSq_param_eq hl hre him]; nlinarith [sq_nonneg Λs.im] -lemma normSq_param_le : ‖Λs‖ ^ 2 ≤ l ^ 2 / 4 + 1 := by - rw [normSq_param_eq hl hre him] - have : Λs.im ^ 2 ≤ 1 := by - have h := abs_le.mp him - nlinarith - linarith - -lemma norm_param_pos : 0 < ‖Λs‖ := lt_of_lt_of_le (by linarith) (norm_param_ge hl hre him) - /-- |Re(Λs⁻¹) − 2/l| ≤ 8/l³ (indeed 0 ≤ 2/l − Re(Λs⁻¹) = 2t²/(l(l²/4+t²)) ≤ 8t²/l³). -/ lemma inv_re_param : |(Λs⁻¹).re - 2 / l| ≤ 8 / l ^ 3 := by have hl0 : 0 < l := by linarith diff --git a/zeta23/Zeta23/XiPrime/Coeff/PowerSums.lean b/zeta23/Zeta23/XiPrime/Coeff/PowerSums.lean index 9bf05b03b9..7005c26920 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/PowerSums.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/PowerSums.lean @@ -40,9 +40,6 @@ lemma log_le_of_mem_Ioc_floor_exp {u : ℝ} {d : ℕ} (hd : d ∈ Ioc 0 ⌊Real. (Nat.cast_le.mpr (mem_Ioc.mp hd).2).trans (Nat.floor_le (Real.exp_pos u).le) exact (Real.log_le_iff_le_exp (by exact_mod_cast hd0)).mpr hdx -lemma log_nonneg_of_mem_Ioc {X : ℕ} {d : ℕ} (_hd : d ∈ Ioc 0 X) : 0 ≤ Real.log d := - Real.log_natCast_nonneg d - lemma floor_exp_div (u : ℝ) {d : ℕ} (hd : 0 < d) : ⌊Real.exp u⌋₊ / d = ⌊Real.exp (u - Real.log d)⌋₊ := by rw [← Nat.floor_div_natCast, Real.exp_sub, Real.exp_log (by exact_mod_cast hd)] diff --git a/zeta23/Zeta23/XiPrime/Coeff/ReexpansionGen.lean b/zeta23/Zeta23/XiPrime/Coeff/ReexpansionGen.lean index 1d233844ce..681c2c8b1a 100644 --- a/zeta23/Zeta23/XiPrime/Coeff/ReexpansionGen.lean +++ b/zeta23/Zeta23/XiPrime/Coeff/ReexpansionGen.lean @@ -220,7 +220,7 @@ theorem sum_norm_eGen_sq_div_le (hre : ∀ T, (Lb T).re = l T / 2) {T : ℝ} (hT exact mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right hlogN hFm0) (pow_nonneg hx'0 _) calc ‖eGen Lb T r N‖ ^ 2 / N ≤ (x' ^ r * (u * Fmaj x' N)) ^ 2 / N := div_le_div_of_nonneg_right hsq hN0.le - _ = x' ^ (2 * r) * u ^ 2 * (Fmaj x' N ^ 2 / N) := by rw [pow_mul]; ring + _ = x' ^ (2 * r) * u ^ 2 * (Fmaj x' N ^ 2 / N) := by rw [pow_mul]; ring_nf calc ∑ N ∈ Ioc 0 ⌊x⌋₊, ‖eGen Lb T r N‖ ^ 2 / N ≤ ∑ N ∈ Ioc 0 ⌊x⌋₊, x' ^ (2 * r) * u ^ 2 * (Fmaj x' N ^ 2 / N) := Finset.sum_le_sum hpt _ = x' ^ (2 * r) * u ^ 2 * ∑ N ∈ Ioc 0 ⌊x⌋₊, Fmaj x' N ^ 2 / N := by rw [Finset.mul_sum] diff --git a/zeta23/Zeta23/XiPrime/Coeff/ReexpansionW.lean b/zeta23/Zeta23/XiPrime/Coeff/ReexpansionW.lean deleted file mode 100644 index f40f64aeb3..0000000000 --- a/zeta23/Zeta23/XiPrime/Coeff/ReexpansionW.lean +++ /dev/null @@ -1,57 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Coeff/ReexpansionW.lean — the δ-re-expansion of C(N; L + δ) about a GENERAL base L = Lb(T) with -Re Lb(T) = l(T)/2, and its instance at the REAL base ½l for the Z′ (Hardy W) coefficients [XF′ §6 at §9.3(ii)] -(discharges ReexpansionW wCoeffFamily of Zeta23/XiPrime/Transfer/InputsW.lean). - -This is Coeff/Reexpansion.lean (base L_T = l/2 + iπ/4) made base-generic: every step there uses only -Re L = l/2 (⇒ ‖L‖ ≥ l/2, L ≠ 0, L + δ ≠ 0), so the same e_r(N) := Σ_{j<Ω N}(−1)^r C(r+j,j) L^{-(j+1+r)}[(Λlog)∗Λ^{∗j}](N), -the same expansion C(N;L+δ) − C(N;L) = Σ_{r≥1} e_r δ^r (0 ≤ δ ≤ 1/2, l ≥ 2) and the same bounds (ρ₀ = 4, A = CF, T₀ = T0re) -hold verbatim. The generic section lives in Coeff/ReexpansionGen.lean; this file is the Z′ instance. --/ -import Zeta23.XiPrime.Transfer.InputsW -import Zeta23.XiPrime.Coeff.ReexpansionGen - -open scoped BigOperators ArithmeticFunction ArithmeticFunction.Omega -open Finset Real - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -/-! ### the Z′ instance: base ½l (real) -/ - -/-- the real base of the Z′ coefficients: ½ l(T). -/ -def halfL (T : ℝ) : ℂ := ((l T / 2 : ℝ) : ℂ) - -@[simp] lemma halfL_re (T : ℝ) : (halfL T).re = l T / 2 := by simp [halfL] - -/-- e_r(N) for the Z′ family. -/ -def eW : ℝ → ℕ → ℕ → ℂ := eGen halfL - -/-- **ReexpansionW for the Z′ coefficient family** with e = eW, ρ₀ = 4, A = CF, T₀ = T0re. -/ -theorem wReexpansion_eW : ∃ ρ₀ A T₀ : ℝ, 0 ≤ ρ₀ ∧ ReexpansionW wCoeffFamily eW ρ₀ A T₀ := by - refine ⟨4, CF, T0re, by norm_num, ?_⟩ - exact - { expand := fun T hT δ hδ N => by - have hl := l_ge_of_T0re_le hT - have hKe : 0 ≤ 128 * Real.exp 1 * KM := mul_nonneg (by positivity) KM_nonneg - have h := eGen_expand halfL halfL_re (T := T) (by linarith) hδ N - simpa [eW, halfL, wCoeffFamily] using h - e_one := fun T r => eGen_one halfL T r - H1 := fun T hT r _ x hx2 hxl => eGen_H1 halfL halfL_re hT r hx2 hxl - H2 := fun T hT r _ x hx2 hxl => eGen_H2 halfL halfL_re hT r hx2 hxl - H3 := fun T hT r _ x hx2 hxl => eGen_H3 halfL halfL_re hT r hx2 hxl } - -/-- **ReexpansionW for the Z′ coefficient family**, ∃-e form (the sentence InputsW.lean asks for). -/ -theorem wReexpansion : - ∃ (e : ℝ → ℕ → ℕ → ℂ) (ρ₀ A T₀ : ℝ), 0 ≤ ρ₀ ∧ ReexpansionW wCoeffFamily e ρ₀ A T₀ := - ⟨eW, wReexpansion_eW⟩ - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Defs.lean b/zeta23/Zeta23/XiPrime/Defs.lean index 16460e4d68..763c04d034 100644 --- a/zeta23/Zeta23/XiPrime/Defs.lean +++ b/zeta23/Zeta23/XiPrime/Defs.lean @@ -102,9 +102,6 @@ def Pc (X : ℝ) (c : ℕ → ℂ) (τ : ℝ) : ℝ := (1 / Real.pi) * ∑ N ∈ Finset.Ioc 0 ⌊X⌋₊, ((c N).re * Real.cos (τ * Real.log N) + (c N).im * Real.sin (τ * Real.log N)) / Real.sqrt N -/-- P^{(1)}_X(τ; Λ⋆) := P_c(X; τ) with c = C(·; Λ⋆) [XF′ Thm 4.2]. -/ -def P1X (X : ℝ) (Λs : ℂ) (τ : ℝ) : ℝ := Pc X (xiCoeff Λs) τ - /-- ν_{c,ϖ}(X) := μ + ϖ·Π_X + P_c(X): density with general coefficients c and POLE WEIGHT ϖ (so that ξ′ and Z′ are one prime-side theorem). ξ′: ϖ = 1 [XF′ Thm 4.2(a)]; Z′: ϖ = 2 [Thm 9.2(a)]. -/ def nucW (cPi X : ℝ) (c : ℕ → ℂ) (τ : ℝ) : ℝ := mu τ + cPi * PiX X τ + Pc X c τ @@ -112,9 +109,6 @@ def nucW (cPi X : ℝ) (c : ℕ → ℂ) (τ : ℝ) : ℝ := mu τ + cPi * PiX X /-- ν_c(X) := μ + Π_X + P_c(X) (pole weight 1; the ξ′ density). -/ def nuc (X : ℝ) (c : ℕ → ℂ) (τ : ℝ) : ℝ := nucW 1 X c τ -/-- ν^{𝒵}_c(X) := μ + 2·Π_X + P_c(X) (pole weight 2; the Z′ density). -/ -def nucZ (X : ℝ) (c : ℕ → ℂ) (τ : ℝ) : ℝ := nucW 2 X c τ - end XiPrime namespace Params @@ -237,12 +231,5 @@ def zerosInW (T₁ T₂ : ℝ) : Set ℂ := {ρ | IsWZero ρ ∧ T₁ < ρ.im /-- N_W(T₁,T₂), with multiplicity [XF′ (Z7)]: = N(T₁,T₂) + O(log T₂). -/ def NcountW (T₁ T₂ : ℝ) : ℕ := ∑ᶠ ρ ∈ zerosInW T₁ T₂, wMult ρ -/-- N_{d,W}(T₁,T₂): distinct zeros of W with T₁ < Im ≤ T₂. -/ -def NdistW (T₁ T₂ : ℝ) : ℕ := (zerosInW T₁ T₂).ncard - -/-- #{ρ : T₁ < Im ρ ≤ T₂, Re ρ = 1/2, W(ρ) = 0 simple} = #{t ∈ (T₁,T₂] : Z′(t) = 0 ≠ Z″(t)} [XF′ (Z3)]. -/ -def N0simpleW (T₁ T₂ : ℝ) : ℕ := - (zerosInW T₁ T₂ ∩ {ρ | ρ.re = 1 / 2} ∩ {ρ | wMult ρ = 1}).ncard - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula.lean index 753bc765e7..d79b17f0d4 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula.lean @@ -36,7 +36,6 @@ Design decisions (do not rely on a body by rfl without checking these): -/ import Zeta23.XiPrime.Seam import Zeta23.WeilEF.Main -import Zeta23.WeilEF.Effective open scoped BigOperators ArithmeticFunction ComplexConjugate open Complex MeasureTheory Set Filter Topology @@ -51,8 +50,6 @@ open Zeta23.WeilEF (Hfn) /-! ## 0. Bridge to Zeta23.WeilEF.xi (same body ⇒ rfl), so Effective.lean's ξ-bounds transfer. (ξ entire, ξ(1−s) = ξ(s), ξ = ½s(s−1)Λ off {0,1}, ξ′ entire: Statement.lean §1, proved there.) -/ -theorem xi_eq_weilXi : xi = Zeta23.WeilEF.xi := rfl - /-! ## 1. (F1) Symmetries and the seam (Zeta23/XiPrime/Seam.lean): xiDeriv_one_sub, xi_conj, xiDeriv_conj, xiDeriv_reflect, xiDeriv_reflect_eq_zero_iff, xiDerivMult_reflect, one_le_xiDerivMult_iff, analyticOrderAt_xiDeriv_ne_top, diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/Contour.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/Contour.lean index a006417c06..8246312320 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/Contour.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/Contour.lean @@ -4,15 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -(EF1) contour step, generic in the function f. - -The weighted argument principle on the rectangle [1−c, c] × [−R, R] for an entire f whose zeros all -lie in the open vertical strip 1−c < Re s < c and which does not vanish on the two horizontal sides: - (1/2πi) ∮ g · f′/f = Σ_{ρ : f ρ = 0, |Im ρ| < R} ord_ρ(f) · g(ρ). -No pole terms (contrast Zeta23.WeilEF.rectangle_identity for Λ, which has − H(0) − H(1)). +(EF1) contour step, generic in the function f — delegates to `Zeta23.WeilEF.rectangle_identity_entire`. -/ import Zeta23.XiPrime.ExplicitFormula -import Zeta23.WeilEF.FullLineAssembly +import Zeta23.WeilEF.GenericEF noncomputable section @@ -22,24 +17,12 @@ namespace XiPrime open Complex Topology Filter Set MeasureTheory open Zeta23.WeilEF (Hfn) -/-- `H = Hfn k` is entire (paperFT of a compactly supported C² function). -/ +/-- `H = Hfn k` is entire (delegates to `Zeta23.WeilEF.differentiable_Hfn`). -/ theorem differentiable_Hfn {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) : - Differentiable ℂ (Hfn k) := by - unfold Hfn - exact (Zeta23.WeilEF.differentiable_paperFT hk.continuous hkc).comp - ((differentiable_id.sub_const _).div_const _) - -/-- membership in the closed rectangle with corners (1−c) − iR and c + iR. -/ -theorem mem_rectangle_iff {c R : ℝ} (hc : 1 - c ≤ c) (hR : 0 ≤ R) (s : ℂ) : - s ∈ Rectangle (((1 - c : ℝ) : ℂ) - R * I) ((c : ℝ) + R * I) ↔ - (1 - c ≤ s.re ∧ s.re ≤ c) ∧ (-R ≤ s.im ∧ s.im ≤ R) := by - obtain ⟨e1, e2, e3, e4⟩ := Zeta23.WeilEF.corner_re_im c R - simp only [Rectangle, Complex.mem_reProdIm, e1, e2, e3, e4, Set.uIcc_of_le hc, - Set.uIcc_of_le (show (-R : ℝ) ≤ R by linarith), Set.mem_Icc] + Differentiable ℂ (Hfn k) := + Zeta23.WeilEF.differentiable_Hfn hk hkc -/-- **Generic rectangle identity.** f, g entire; every zero of f has 1−c < Re < c (Zset = zero set); -f ≠ 0 on the horizontal lines Im s = ±R, 1−c ≤ Re s ≤ c. Then the zeros of f with |Im| < R form a -finite set Z and (1/2πi)∮_{∂([1−c,c]×[−R,R])} g·f′/f = Σ_{ρ∈Z} ord_ρ(f)·g(ρ). -/ +/-- **Generic rectangle identity** (delegates to `Zeta23.WeilEF.rectangle_identity_entire`). -/ theorem rectangle_identity_of {f g : ℂ → ℂ} (hf : Differentiable ℂ f) (hg : Differentiable ℂ g) {c : ℝ} (hc : 1 - c < c) {Zset : Set ℂ} (hZ : ∀ s, f s = 0 ↔ s ∈ Zset) (hstrip : ∀ ρ ∈ Zset, 1 - c < ρ.re ∧ ρ.re < c) {R : ℝ} (hR : 0 ≤ R) @@ -48,69 +31,10 @@ theorem rectangle_identity_of {f g : ℂ → ℂ} (hf : Differentiable ℂ f) (h ((Z : Set ℂ) = {ρ : ℂ | ρ ∈ Zset ∧ -R < ρ.im ∧ ρ.im < R}) ∧ RectangleIntegral' (fun s => g s * logDeriv f s) (((1 - c : ℝ) : ℂ) - R * I) ((c : ℝ) + R * I) - = ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) * g ρ := by - classical - set z : ℂ := ((1 - c : ℝ) : ℂ) - R * I with hzdef - set w : ℂ := (c : ℝ) + R * I with hwdef - have hzre : z.re = 1 - c := by simp [hzdef] - have hzim : z.im = -R := by simp [hzdef] - have hwre : w.re = c := by simp [hwdef] - have hwim : w.im = R := by simp [hwdef] - have hre : z.re ≤ w.re := by rw [hzre, hwre]; linarith - have him : z.im ≤ w.im := by rw [hzim, hwim]; linarith - have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ - (1 - c ≤ s.re ∧ s.re ≤ c) ∧ (-R ≤ s.im ∧ s.im ≤ R) := by - intro s - simp only [Rectangle, Complex.mem_reProdIm, hzre, hzim, hwre, hwim, - Set.uIcc_of_le (show (1 - c : ℝ) ≤ c by linarith), - Set.uIcc_of_le (show (-R : ℝ) ≤ R by linarith), Set.mem_Icc] - have hfA : AnalyticOnNhd ℂ f (Rectangle z w) := fun s _ => hf.analyticAt s - have hgA : AnalyticOnNhd ℂ g (Rectangle z w) := fun s _ => hg.analyticAt s - have hborder : ∀ s ∈ RectangleBorder z w, f s ≠ 0 := by - intro s hs h0 - have hsrect := rectangleBorder_subset_rectangle z w hs - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsrect - simp only [RectangleBorder, Set.mem_union, Complex.mem_reProdIm, Set.mem_singleton_iff, - hzre, hzim, hwre, hwim] at hs - rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ - · exact hgood s (Or.inr h') hr1 hr2 h0 - · have h1 := (hstrip s ((hZ s).mp h0)).1 - rw [h'] at h1 - exact lt_irrefl _ h1 - · exact hgood s (Or.inl h') hr1 hr2 h0 - · have h1 := (hstrip s ((hZ s).mp h0)).2 - rw [h'] at h1 - exact lt_irrefl _ h1 - have hzB : z ∈ RectangleBorder z w := Or.inl (Or.inl (Or.inl ⟨Set.left_mem_uIcc, rfl⟩)) - have hfin := Zeta23.Analytic.finite_zeros_rectangle hfA - (rectangleBorder_subset_rectangle z w hzB) (hborder z hzB) - set Z : Finset ℂ := hfin.toFinset with hZdef - have hZmem : ∀ ρ, ρ ∈ Z ↔ ρ ∈ Rectangle z w ∧ f ρ = 0 := by - intro ρ - rw [hZdef, Set.Finite.mem_toFinset, Set.mem_inter_iff, Set.mem_preimage, - Set.mem_singleton_iff] - have hZcoe : (Z : Set ℂ) = {ρ : ℂ | ρ ∈ Zset ∧ -R < ρ.im ∧ ρ.im < R} := by - ext ρ - rw [Finset.mem_coe, hZmem, Set.mem_setOf_eq, hmem] - constructor - · rintro ⟨⟨⟨hr1, hr2⟩, hi1, hi2⟩, h0⟩ - have hρZ := (hZ ρ).mp h0 - refine ⟨hρZ, lt_of_le_of_ne hi1 ?_, lt_of_le_of_ne hi2 ?_⟩ - · intro h; exact hgood ρ (Or.inr h.symm) hr1 hr2 h0 - · intro h; exact hgood ρ (Or.inl h) hr1 hr2 h0 - · rintro ⟨hρZ, hi1, hi2⟩ - have h1 := hstrip ρ hρZ - exact ⟨⟨⟨h1.1.le, h1.2.le⟩, hi1.le, hi2.le⟩, (hZ ρ).mpr hρZ⟩ - refine ⟨Z, hZcoe, ?_⟩ - refine Zeta23.Analytic.rectangleIntegral'_mul_logDeriv hre him hfA hgA hborder Z ?_ ?_ - · intro s hs - rw [hZmem] - exact ⟨fun h => ⟨hs, h⟩, fun h => h.2⟩ - · intro ρ hρ - exact ((hZmem ρ).mp hρ).1 + = ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) * g ρ := + Zeta23.WeilEF.rectangle_identity_entire hf hg hc hR hZ hstrip hgood -/-- **Rectangle identity for ξ′** under (F2): at a height R ≥ 0 where ξ′ ≠ 0 on Im s = ±R, -1−c ≤ Re s ≤ c (c > 1): (1/2πi)∮ H·ξ″/ξ′ = Σ_{ξ′(ρ)=0, |Im ρ| Iff.rfl) - (fun ρ hρ => by - have h := hF2 ρ hρ - constructor <;> linarith [h.1, h.2]) + (fun ρ hρ => by have h := hF2 ρ hρ; constructor <;> linarith [h.1, h.2]) hR hgood end XiPrime diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/DirichletLine.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/DirichletLine.lean index 623d272854..6cbdd94e69 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/DirichletLine.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/DirichletLine.lean @@ -5,13 +5,9 @@ SPDX-License-Identifier: Apache-2.0 -/ /- A Dirichlet series with general complex coefficients against the Weil test -weight on a vertical line: - (1/2π) ∫_ℝ H(c+it) · Σ_N a_N N^{−(c+it)} dt = Σ_N a_N N^{−1/2} k(log N), -H = Zeta23.WeilEF.Hfn k, for k ∈ C_c²(ℝ), any real c, and Σ_N ‖a_N‖ N^{−c} < ∞. -[XF′ Thm 4.2 (e)]. +weight on a vertical line: delegates to `Zeta23.WeilEF.dirichlet_line`. -/ import Zeta23.WeilEF.Main -import Mathlib.Analysis.Normed.Group.FunctionSeries noncomputable section @@ -19,227 +15,33 @@ namespace Zeta23 namespace XiPrime open Complex MeasureTheory -open Zeta23.WeilEF (Hfn tilt Hfn_line tilted_inversion tilt_contDiff tilt_hasCompactSupport) +open Zeta23.WeilEF (Hfn) -/-- the L-series term on the line, factored: a_N · N^{−c} · e^{−it log N}. -/ -theorem LSeries_term_line (a : ℕ → ℂ) (c t : ℝ) {n : ℕ} (hn : n ≠ 0) : - LSeries.term a ((c : ℂ) + t * I) n - = a n * ((((n : ℝ) ^ (-c) : ℝ)) : ℂ) * cexp (-I * t * Real.log n) := by - have hn' : 0 < n := Nat.pos_of_ne_zero hn - have hn0 : (0:ℝ) < (n:ℝ) := by exact_mod_cast hn' - have hnC : (n:ℂ) ≠ 0 := by exact_mod_cast hn - rw [LSeries.term_of_ne_zero hn, div_eq_mul_inv, ← Complex.cpow_neg] - have hsplit : (-((c:ℂ) + t * I)) = (-(c:ℂ)) + (-(I * t)) := by ring - rw [hsplit, Complex.cpow_add _ _ hnC] - have h1 : (n:ℂ) ^ (-(c:ℂ)) = (((n:ℝ) ^ (-c) : ℝ) : ℂ) := by - rw [show ((n:ℂ)) = (((n:ℝ):ℂ)) by push_cast; rfl, - show (-(c:ℂ)) = ((-c : ℝ) : ℂ) by push_cast; rfl, - ← Complex.ofReal_cpow hn0.le] - have h2 : (n:ℂ) ^ (-(I * t)) = cexp (-I * t * Real.log n) := by - rw [Complex.cpow_def_of_ne_zero hnC] - congr 1 - rw [show ((n:ℂ)) = (((n:ℝ):ℂ)) by push_cast; rfl, ← Complex.ofReal_log hn0.le] - ring - rw [h1, h2] - ring - -/-- norm of the L-series term on the line Re s = c. -/ -theorem norm_LSeries_term_line (a : ℕ → ℂ) (c t : ℝ) (n : ℕ) : - ‖LSeries.term a ((c : ℂ) + t * I) n‖ = if n = 0 then (0:ℝ) else ‖a n‖ * ((n:ℝ) ^ (-c)) := by - rcases eq_or_ne n 0 with rfl | hn - · simp [LSeries.term_zero] - · have hre : ((c:ℂ) + t * I).re = c := by simp - rw [LSeries.term_of_ne_zero hn, norm_div, - Complex.norm_natCast_cpow_of_pos (Nat.pos_of_ne_zero hn), hre, if_neg hn, - Real.rpow_neg (Nat.cast_nonneg n), div_eq_mul_inv] - -/-- Step 1 (pointwise): H(c+it) · L(a, c+it) = Σ' paperFT(tilt k (c−1/2)) t · term_N. -/ -theorem integrand_eq_tsum_gen (k : ℝ → ℂ) (a : ℕ → ℂ) (c t : ℝ) : - Hfn k (c + t * I) * LSeries a (c + t * I) - = ∑' n : ℕ, paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n := by - rw [Hfn_line, LSeries, ← tsum_mul_left] - -/-- Step 2 (per-N line integral): (1/2π)∫ paperFT(tilt k (c−1/2)) t · term_N(c+it) dt - = a_N N^{−1/2} k(log N). -/ -theorem per_n_line_integral_gen {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - (a : ℕ → ℂ) (c : ℝ) (n : ℕ) : - (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, - paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n - = a n / ((Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by - rcases Nat.eq_zero_or_pos n with rfl | hn - · simp [LSeries.term] - · have hn0 : (0:ℝ) < (n:ℝ) := by exact_mod_cast hn - simp_rw [LSeries_term_line a c _ hn.ne'] - have hre : (fun t : ℝ => paperFT (tilt k (c - 1/2)) t - * (a n * (((n:ℝ) ^ (-c) : ℝ) : ℂ) * cexp (-I * t * Real.log n))) - = fun t : ℝ => (a n * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * (paperFT (tilt k (c - 1/2)) t * cexp (-I * t * Real.log n)) := by - funext t - ring - rw [hre, Zeta23.EF.cintegral_const_mul] - rw [show (1 / (2 * (Real.pi : ℂ))) * ((a n * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * cexp (-I * t * Real.log n)) - = (a n * (((n:ℝ) ^ (-c) : ℝ) : ℂ)) - * ((1 / (2 * (Real.pi : ℂ))) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t - * cexp (-I * t * Real.log n)) from by ring] - rw [tilted_inversion hk hkc (c - 1/2) (Real.log n)] - have hexp : Real.exp ((c - 1/2) * Real.log n) = (n:ℝ) ^ (c - 1/2) := by - rw [Real.rpow_def_of_pos hn0] - ring_nf - have hpow : ((n:ℝ) ^ (-c) : ℝ) * ((n:ℝ) ^ (c - 1/2) : ℝ) = ((n:ℝ) ^ (-(1/2) : ℝ) : ℝ) := by - rw [← Real.rpow_add hn0] - congr 1 - ring - have hsqrt : ((n:ℝ) ^ (-(1/2) : ℝ) : ℝ) = 1 / Real.sqrt n := by - rw [Real.rpow_neg hn0.le, Real.sqrt_eq_rpow] - exact (one_div _).symm - calc a n * (((n:ℝ) ^ (-c) : ℝ) : ℂ) - * (k (Real.log n) * ((Real.exp ((c - 1/2) * Real.log n) : ℝ) : ℂ)) - = a n * (((n:ℝ) ^ (-c) : ℝ) : ℂ) - * (k (Real.log n) * (((n:ℝ) ^ (c - 1/2) : ℝ) : ℂ)) := by rw [hexp] - _ = a n * ((((n:ℝ) ^ (-c) * (n:ℝ) ^ (c - 1/2) : ℝ)) : ℂ) * k (Real.log n) := by - push_cast - ring - _ = a n / ((Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := by - rw [hpow, hsqrt] - push_cast - ring - -/-- continuity of each L-series term along the line. -/ -theorem continuous_LSeries_term_line (a : ℕ → ℂ) (c : ℝ) (n : ℕ) : - Continuous (fun t : ℝ => LSeries.term a ((c:ℂ) + t * I) n) := by - rcases eq_or_ne n 0 with rfl | hn - · simpa [LSeries.term_zero] using continuous_const - · simp only [LSeries.term_of_ne_zero hn] - refine continuous_const.div ?_ (fun t => ?_) - · refine Continuous.const_cpow (by fun_prop) (Or.inl ?_) - exact_mod_cast hn - · exact cpow_ne_zero_iff.mpr (Or.inl (by exact_mod_cast hn)) - -/-- the summable majorant of the term norms. -/ -theorem summable_coeff_bound (a : ℕ → ℂ) (c : ℝ) - (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : - Summable (fun n : ℕ => if n = 0 then (0:ℝ) else ‖a n‖ * ((n:ℝ) ^ (-c))) := by - refine (summable_nat_add_iff 1).mp ?_ - have := (summable_nat_add_iff 1).mpr ha - refine this.congr fun n => ?_ - simp - -/-- continuity of t ↦ L(a, c+it) (uniformly convergent series of continuous functions). -/ +/-- Continuity of `t ↦ LSeries a (c + it)` along the vertical line `Re s = c`. -/ theorem continuous_LSeries_line (a : ℕ → ℂ) (c : ℝ) (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : - Continuous (fun t : ℝ => LSeries a ((c:ℂ) + t * I)) := by - have h := continuous_tsum (continuous_LSeries_term_line a c) (summable_coeff_bound a c ha) - (fun n t => le_of_eq (norm_LSeries_term_line a c t n)) - exact h - -/-- ‖L(a, c+it)‖ ≤ Σ' majorant. -/ -theorem norm_LSeries_line_le (a : ℕ → ℂ) (c t : ℝ) - (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : - ‖LSeries a ((c:ℂ) + t * I)‖ ≤ ∑' n : ℕ, (if n = 0 then (0:ℝ) else ‖a n‖ * ((n:ℝ) ^ (-c))) := by - have hs : Summable (fun n : ℕ => ‖LSeries.term a ((c:ℂ) + t * I) n‖) := - (summable_coeff_bound a c ha).congr fun n => (norm_LSeries_term_line a c t n).symm - calc ‖LSeries a ((c:ℂ) + t * I)‖ = ‖∑' n, LSeries.term a ((c:ℂ) + t * I) n‖ := rfl - _ ≤ ∑' n, ‖LSeries.term a ((c:ℂ) + t * I) n‖ := norm_tsum_le_tsum_norm hs - _ = _ := tsum_congr fun n => norm_LSeries_term_line a c t n - -/-- integrability of each term and summability of the L¹ norms (the domination for Step 3). -/ -theorem line_terms_integrable {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - (a : ℕ → ℂ) (c : ℝ) (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : - (∀ n : ℕ, Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t - * LSeries.term a ((c:ℂ) + t * I) n)) ∧ - Summable (fun n : ℕ => ∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t - * LSeries.term a ((c:ℂ) + t * I) n‖) := by - have hkb2 : ContDiff ℝ 2 (tilt k (c - 1/2)) := tilt_contDiff hk _ - have hkbc : HasCompactSupport (tilt k (c - 1/2)) := tilt_hasCompactSupport hkc _ - have hFkb := Zeta23.EF.integrable_fourier_of_contDiff_two hkb2 hkbc - have hpfi : Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t) := - Zeta23.EF.integrable_paperFT_ofReal hFkb - have hcont : ∀ n : ℕ, Continuous (fun t : ℝ => LSeries.term a ((c:ℂ) + t * I) n) := - continuous_LSeries_term_line a c - have hint : ∀ n : ℕ, Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t - * LSeries.term a ((c:ℂ) + t * I) n) := by - intro n - refine hpfi.mul_bdd (c := if n = 0 then (0:ℝ) else ‖a n‖ * ((n:ℝ) ^ (-c))) - (hcont n).aestronglyMeasurable ?_ - filter_upwards with t - rw [norm_LSeries_term_line] - have heval : ∀ n : ℕ, (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t - * LSeries.term a ((c:ℂ) + t * I) n‖) - = (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t‖) - * (if n = 0 then (0:ℝ) else ‖a n‖ * ((n:ℝ) ^ (-c))) := by - intro n - rw [← integral_mul_const] - refine integral_congr_ae (Filter.Eventually.of_forall fun t => ?_) - simp only - rw [norm_mul, norm_LSeries_term_line] - have hcn := summable_coeff_bound a c ha - refine ⟨hint, ?_⟩ - refine ((hcn.mul_left (∫ t : ℝ, ‖paperFT (tilt k (c - 1/2)) t‖)).congr fun n => ?_) - rw [heval n] - -/-- Step 3 (tsum/integral swap). -/ -theorem line_integral_swap_gen {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - (a : ℕ → ℂ) (c : ℝ) (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : - ∫ t : ℝ, (∑' n : ℕ, paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n) - = ∑' n : ℕ, ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n := by - obtain ⟨hint, hsum⟩ := line_terms_integrable hk hkc a c ha - exact (MeasureTheory.hasSum_integral_of_summable_integral_norm hint hsum).tsum_eq.symm - -/-- integrability of H(c+it)·L(a, c+it) on the line. -/ -theorem integrable_Hfn_mul_LSeries {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) - (hkc : HasCompactSupport k) (a : ℕ → ℂ) (c : ℝ) - (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : - Integrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * LSeries a ((c : ℂ) + t * I)) := by - have hkb2 : ContDiff ℝ 2 (tilt k (c - 1/2)) := tilt_contDiff hk _ - have hkbc : HasCompactSupport (tilt k (c - 1/2)) := tilt_hasCompactSupport hkc _ - have hFkb := Zeta23.EF.integrable_fourier_of_contDiff_two hkb2 hkbc - have hpfi : Integrable (fun t : ℝ => paperFT (tilt k (c - 1/2)) t) := - Zeta23.EF.integrable_paperFT_ofReal hFkb - have hpfi' : Integrable (fun t : ℝ => Hfn k ((c:ℂ) + t * I)) := - hpfi.congr (Filter.Eventually.of_forall fun t => (Hfn_line k c t).symm) - refine hpfi'.mul_bdd (c := ∑' n : ℕ, (if n = 0 then (0:ℝ) else ‖a n‖ * ((n:ℝ) ^ (-c)))) - (continuous_LSeries_line a c ha).aestronglyMeasurable ?_ - filter_upwards with t - exact norm_LSeries_line_le a c t ha + Continuous (fun t : ℝ => LSeries a ((c : ℂ) + t * I)) := + Zeta23.WeilEF.continuous_LSeries_line a c ha -/-- **(EF3)**: (1/2π)∫_ℝ H(c+it)·Σ_N a_N N^{−(c+it)} dt = Σ_N a_N N^{−1/2} k(log N). -/ +/-- **(EF3)**: `(1/2π) ∫_ℝ H(c+it) · Σ_N a_N N^{-(c+it)} dt = Σ_N a_N N^{-1/2} k(log N)`. -/ theorem dirichlet_line {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (c : ℝ) (a : ℕ → ℂ) (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : Integrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * LSeries a ((c : ℂ) + t * I)) ∧ (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, Hfn k ((c : ℂ) + t * I) * LSeries a ((c : ℂ) + t * I)) - = ∑' N : ℕ, a N / ((Real.sqrt N : ℝ) : ℂ) * k (Real.log N) := by - refine ⟨integrable_Hfn_mul_LSeries hk hkc a c ha, ?_⟩ - have h1 : ∀ t : ℝ, Hfn k (c + t * I) * LSeries a (c + t * I) - = ∑' n : ℕ, paperFT (tilt k (c - 1/2)) t * LSeries.term a (c + t * I) n := - fun t => integrand_eq_tsum_gen k a c t - calc (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, Hfn k (c + t * I) * LSeries a (c + t * I) - = (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, ∑' n : ℕ, paperFT (tilt k (c - 1/2)) t - * LSeries.term a (c + t * I) n := by - rw [integral_congr_ae (Filter.Eventually.of_forall h1)] - _ = (1 / (2 * Real.pi) : ℂ) * ∑' n : ℕ, ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t - * LSeries.term a (c + t * I) n := by - rw [line_integral_swap_gen hk hkc a c ha] - _ = ∑' n : ℕ, (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, paperFT (tilt k (c - 1/2)) t - * LSeries.term a (c + t * I) n := by - rw [← tsum_mul_left] - _ = ∑' n : ℕ, a n / ((Real.sqrt n : ℝ) : ℂ) * k (Real.log n) := - tsum_congr fun n => per_n_line_integral_gen hk hkc a c n + = ∑' N : ℕ, a N / ((Real.sqrt N : ℝ) : ℂ) * k (Real.log N) := + Zeta23.WeilEF.dirichlet_line hk hkc c a ha -/-- the mirrored weight: (1/2π)∫ H(1−c−it)·L(a,c+it) dt = Σ_N a_N N^{−1/2} k(−log N). -/ +/-- The mirrored weight: `(1/2π) ∫ H(1−c−it) · L(a, c+it) dt = Σ_N a_N N^{-1/2} k(−log N)`. -/ theorem dirichlet_line_mirror {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (c : ℝ) (a : ℕ → ℂ) (ha : Summable (fun N : ℕ => ‖a N‖ * (N : ℝ) ^ (-c))) : Integrable (fun t : ℝ => Hfn k (1 - c - t * I) * LSeries a ((c : ℂ) + t * I)) ∧ (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, Hfn k (1 - c - t * I) * LSeries a ((c : ℂ) + t * I)) = ∑' N : ℕ, a N / ((Real.sqrt N : ℝ) : ℂ) * k (-Real.log N) := by - have hkneg2 : ContDiff ℝ 2 (fun u : ℝ => k (-u)) := hk.comp contDiff_neg - have hknegc : HasCompactSupport (fun u : ℝ => k (-u)) := hkc.comp_homeomorph (Homeomorph.neg ℝ) have heq : (fun t : ℝ => Hfn k (1 - c - t * I) * LSeries a ((c : ℂ) + t * I)) = fun t : ℝ => Hfn (fun u => k (-u)) ((c : ℂ) + t * I) * LSeries a ((c : ℂ) + t * I) := by - funext t - rw [Zeta23.WeilEF.Hfn_mirror k c t] + funext t; rw [Zeta23.WeilEF.Hfn_mirror k c t] rw [heq] - exact dirichlet_line hkneg2 hknegc c a ha + exact dirichlet_line (hk.comp contDiff_neg) (hkc.comp_homeomorph (Homeomorph.neg ℝ)) c a ha end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/EntryError.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/EntryError.lean index 4f8720428b..ec98b5b657 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/EntryError.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/EntryError.lean @@ -118,7 +118,7 @@ theorem abs_sub_midpoint_le (t a b : ℝ) : |t - (a + b) / 2| ≤ (|t - a| + |t exact div_le_div_of_nonneg_right (abs_add_le _ _) zero_le_two /-- **core estimate** (see file header). -/ -theorem entry_core {w g : ℝ → ℂ} {a b T ε Cg W W' : ℝ} (hT : 0 < T) (ha : T ≤ a) (hb : T ≤ b) +theorem entry_core {w g : ℝ → ℂ} {a b T ε Cg W W' : ℝ} (hT : 0 < T) (ha : T ≤ a) (_hb : T ≤ b) (hwc : Continuous w) (hgc : Continuous g) (hε : 0 ≤ ε) (hCg : 0 ≤ Cg) (hW : 0 ≤ W) (hW' : 0 ≤ W') (hw : ∀ t, ‖w t‖ ≤ W * (cauchyK a t * cauchyK b t)) diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/Expansion.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/Expansion.lean index 73d287e15c..b1de73202e 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/Expansion.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/Expansion.lean @@ -48,9 +48,6 @@ theorem logDeriv_zeta_eq_neg_Afn {s : ℂ} (hs : 1 < s.re) : logDeriv riemannZet rw [logDeriv, Pi.div_apply, h2] ring -theorem Efn_eq (s : ℂ) (hs : 1 < s.re) : Efn s = Lfn s - Afn s := by - rw [Efn, logDeriv_zeta_eq_neg_Afn hs]; ring - /-- the open half-plane Re s > 1. -/ theorem isOpen_one_lt_re : IsOpen {s : ℂ | 1 < s.re} := isOpen_lt continuous_const Complex.continuous_re @@ -77,11 +74,6 @@ theorem hasDerivAt_Afn {s : ℂ} (hs : 1 < s.re) : HasDerivAt Afn (-Bfn s) s := rw [logMul_vonMangoldt] at this exact this -theorem differentiableAt_Afn {s : ℂ} (hs : 1 < s.re) : DifferentiableAt ℂ Afn s := - (hasDerivAt_Afn hs).differentiableAt - -theorem deriv_Afn {s : ℂ} (hs : 1 < s.re) : deriv Afn s = -Bfn s := (hasDerivAt_Afn hs).deriv - /-- B is absolutely summable on Re s > 1. -/ theorem summable_Bfn {s : ℂ} (hs : 1 < s.re) : LSeriesSummable (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) s := by @@ -117,11 +109,6 @@ theorem hasDerivAt_logDeriv_zeta {s : ℂ} (hs : 1 < s.re) : theorem differentiableAt_Efn {s : ℂ} (hs : 1 < s.re) : DifferentiableAt ℂ Efn s := (differentiableAt_Lfn hs).add (hasDerivAt_logDeriv_zeta hs).differentiableAt -theorem deriv_Efn {s : ℂ} (hs : 1 < s.re) : deriv Efn s = deriv Lfn s + Bfn s := by - have h : HasDerivAt Efn (deriv Lfn s + Bfn s) s := - (differentiableAt_Lfn hs).hasDerivAt.add (hasDerivAt_logDeriv_zeta hs) - exact h.deriv - /-- ξ′ = ξ · E on Re s > 1 (Seam.xiDeriv_eq_xi_mul). -/ theorem xiDeriv_eq_xi_mul_Efn {s : ℂ} (hs : 1 < s.re) : xiDeriv s = xi s * Efn s := by obtain ⟨hs1, -, hpos, hζ⟩ := one_lt_re_of hs @@ -199,38 +186,39 @@ theorem freeze_bound {L L' A B Λs : ℂ} {A₀ B₀ : ℝ} (hA : ‖A‖ ≤ A _ ≤ B₀ * ‖L - Λs‖ / ((‖L‖ - A₀) * (‖Λs‖ - A₀)) := by exact div_le_div_of_nonneg_left (by positivity) (by positivity) hden -/-- E′/E in the (L′+B)/(L−A) form, on Re s > 1. -/ -theorem deriv_Efn_div_Efn_eq {s : ℂ} (hs : 1 < s.re) : - deriv Efn s / Efn s = (deriv Lfn s + Bfn s) / (Lfn s - Afn s) := by - rw [deriv_Efn hs, Efn_eq s hs] - /-! ## 3. Uniform bounds for A and B on the line Re s = 5/4 -/ +/-- Uniform bound on an absolutely convergent L-series in the half-plane `Re s ≥ c`. -/ +theorem LSeries_norm_le_of_re_ge {a : ℕ → ℂ} {c : ℝ} (hsum : LSeriesSummable a (c : ℂ)) : + ∃ M : ℝ, 0 ≤ M ∧ ∀ s : ℂ, c ≤ s.re → ‖LSeries a s‖ ≤ M := by + have hnorm : Summable (fun n : ℕ => ‖LSeries.term a (c : ℂ) n‖) := summable_norm_iff.mpr hsum + refine ⟨∑' n : ℕ, ‖LSeries.term a (c : ℂ) n‖, tsum_nonneg fun _ => norm_nonneg _, fun s hs => ?_⟩ + have hle : ∀ n : ℕ, ‖LSeries.term a s n‖ ≤ ‖LSeries.term a (c : ℂ) n‖ := fun n => by + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp [LSeries.term_zero] + rw [LSeries.norm_term_eq, LSeries.norm_term_eq] + simp only [hn.ne', if_false, Complex.ofReal_re] + exact div_le_div_of_nonneg_left (norm_nonneg _) (by positivity) + (Real.rpow_le_rpow_of_exponent_le (by exact_mod_cast hn) hs) + have hsum' := Summable.of_nonneg_of_le (fun _ => norm_nonneg _) hle hnorm + exact (norm_tsum_le_tsum_norm hsum').trans (hsum'.tsum_le_tsum hle hnorm) + +theorem norm_Afn_le_at {c : ℝ} (hc : 1 < c) : + ∃ A₀ : ℝ, 0 ≤ A₀ ∧ ∀ t : ℝ, ‖Afn ((c : ℂ) + t * I)‖ ≤ A₀ := by + obtain ⟨M, hM0, hM⟩ := LSeries_norm_le_of_re_ge + (ArithmeticFunction.LSeriesSummable_vonMangoldt (s := (c : ℂ)) (by simpa using hc)) + exact ⟨M, hM0, fun t => hM _ (by simp)⟩ + +theorem norm_Bfn_le_at {c : ℝ} (hc : 1 < c) : + ∃ B₀ : ℝ, 0 ≤ B₀ ∧ ∀ t : ℝ, ‖Bfn ((c : ℂ) + t * I)‖ ≤ B₀ := by + obtain ⟨M, hM0, hM⟩ := LSeries_norm_le_of_re_ge (summable_Bfn (s := (c : ℂ)) (by simpa using hc)) + exact ⟨M, hM0, fun t => hM _ (by simp)⟩ + theorem re_54 (t : ℝ) : (((5/4 : ℝ) : ℂ) + t * I).re = 5/4 := by simp theorem one_lt_re_54 (t : ℝ) : 1 < (((5/4 : ℝ) : ℂ) + t * I).re := by rw [re_54]; norm_num -theorem norm_Afn_le : ∃ A₀ : ℝ, 0 ≤ A₀ ∧ ∀ t : ℝ, ‖Afn (((5/4 : ℝ) : ℂ) + t * I)‖ ≤ A₀ := by - obtain ⟨M, hM0, hM⟩ := Zeta23.WeilEF.norm_logDeriv_zeta_le_of_one_lt_re (c := 5/4) (by norm_num) - refine ⟨M, hM0, fun t => ?_⟩ - have h := hM t - rw [logDeriv_zeta_eq_neg_Afn (one_lt_re_54 t), norm_neg] at h - exact h - -theorem norm_Bfn_le : ∃ B₀ : ℝ, 0 ≤ B₀ ∧ ∀ t : ℝ, ‖Bfn (((5/4 : ℝ) : ℂ) + t * I)‖ ≤ B₀ := by - have hsum : Summable (fun n : ℕ => - ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((5/4:ℝ):ℂ)) n‖) := - summable_norm_iff.mpr (summable_Bfn (s := ((5/4:ℝ):ℂ)) (by simp; norm_num)) - refine ⟨∑' n : ℕ, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((5/4:ℝ):ℂ)) n‖, - tsum_nonneg fun _ => norm_nonneg _, fun t => ?_⟩ - have hnorm : ∀ n : ℕ, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((5/4:ℝ):ℂ) + t * I) n‖ - = ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((5/4:ℝ):ℂ)) n‖ := by - intro n - rw [LSeries.norm_term_eq, LSeries.norm_term_eq, re_54, Complex.ofReal_re] - unfold Bfn LSeries - calc ‖∑' n, LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((5/4:ℝ):ℂ) + t * I) n‖ - ≤ ∑' n, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((5/4:ℝ):ℂ) + t * I) n‖ := - norm_tsum_le_tsum_norm (by simp_rw [hnorm]; exact hsum) - _ = _ := by simp_rw [hnorm] +theorem norm_Afn_le : ∃ A₀ : ℝ, 0 ≤ A₀ ∧ ∀ t : ℝ, ‖Afn (((5/4 : ℝ) : ℂ) + t * I)‖ ≤ A₀ := + norm_Afn_le_at (by norm_num) /-! ## 4. L on the line Re s = 5/4 (Stirling via Zeta23.GammaFacts) -/ @@ -327,8 +315,6 @@ theorem norm_log_w_sub_le {t : ℝ} (ht : 2 ≤ t) : rw [div_le_div_iff₀ (by positivity) ht0] nlinarith -theorem s54_eq (t : ℝ) : ((5/4:ℝ):ℂ) + t * I = ((5/4:ℝ):ℂ) + ((t:ℝ):ℂ) * I := rfl - theorem half_s54 (t : ℝ) : (((5/4:ℝ):ℂ) + t * I) / 2 = ((5/8:ℝ):ℂ) + ((t/2:ℝ):ℂ) * I := by push_cast; ring @@ -656,11 +642,6 @@ theorem LSeries_real_conj (a : ℕ → ℝ) (s : ℂ) : theorem Afn_conj (s : ℂ) : Afn (conj s) = conj (Afn s) := LSeries_real_conj _ s theorem Bfn_conj (s : ℂ) : Bfn (conj s) = conj (Bfn s) := LSeries_real_conj _ s -/-- the frozen object B/(Λ⋆ − A) is conjugation-equivariant in (Λ⋆, s). -/ -theorem frozen_conj (Λs s : ℂ) : - Bfn (conj s) / (conj Λs - Afn (conj s)) = conj (Bfn s / (Λs - Afn s)) := by - rw [Bfn_conj, Afn_conj, map_div₀, map_sub] - theorem conj_s54 (t : ℝ) : conj (((5/4:ℝ):ℂ) + t * I) = ((5/4:ℝ):ℂ) + (-t:ℝ) * I := by simp only [map_add, map_mul, Complex.conj_ofReal, Complex.conj_I] push_cast @@ -716,30 +697,6 @@ theorem continuous_lineC (c : ℝ) : Continuous (fun t : ℝ => (c:ℂ) + t * I) theorem conj_lineC' (c t : ℝ) : conj ((c:ℂ) + t * I) = (c:ℂ) + (-t:ℝ) * I := by simp only [map_add, map_mul, Complex.conj_ofReal, Complex.conj_I]; push_cast; ring -/-- A is bounded on Re s = c > 1. -/ -theorem norm_Afn_le_at (hc : 1 < c) : ∃ A₀ : ℝ, 0 ≤ A₀ ∧ ∀ t : ℝ, ‖Afn ((c:ℂ) + t * I)‖ ≤ A₀ := by - obtain ⟨M, hM0, hM⟩ := Zeta23.WeilEF.norm_logDeriv_zeta_le_of_one_lt_re (c := c) hc - refine ⟨M, hM0, fun t => ?_⟩ - have h := hM t - rw [logDeriv_zeta_eq_neg_Afn (by rw [re_lineC]; exact hc), norm_neg] at h - exact h - -/-- B is bounded on Re s = c > 1. -/ -theorem norm_Bfn_le_at (hc : 1 < c) : ∃ B₀ : ℝ, 0 ≤ B₀ ∧ ∀ t : ℝ, ‖Bfn ((c:ℂ) + t * I)‖ ≤ B₀ := by - have hsum : Summable (fun n : ℕ => ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (c:ℂ) n‖) := - summable_norm_iff.mpr (summable_Bfn (s := (c:ℂ)) (by simpa using hc)) - refine ⟨∑' n : ℕ, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (c:ℂ) n‖, - tsum_nonneg fun _ => norm_nonneg _, fun t => ?_⟩ - have hnorm : ∀ n : ℕ, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) ((c:ℂ) + t * I) n‖ - = ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (c:ℂ) n‖ := by - intro n - rw [LSeries.norm_term_eq, LSeries.norm_term_eq, re_lineC, Complex.ofReal_re] - unfold Bfn LSeries - calc ‖∑' n, LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) ((c:ℂ) + t * I) n‖ - ≤ ∑' n, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) ((c:ℂ) + t * I) n‖ := - norm_tsum_le_tsum_norm (by simp_rw [hnorm]; exact hsum) - _ = _ := by simp_rw [hnorm] - theorem EofL_eq_sub {s : ℂ} (hs : 1 < s.re) : EofL Λf s = Λf s - Afn s := by rw [EofL, logDeriv_zeta_eq_neg_Afn hs]; ring @@ -813,10 +770,6 @@ theorem ArchLineData.derivE_div_E_conj (h : ArchLineData c Λf Lpar) {t : ℝ} ( rw [← conj_lineC', h.derivE_conj ht, h.E_conj (by rw [re_lineC]; exact h.one_lt) (by rw [im_lineC]; exact ht), map_div₀] -theorem ArchLineData.norm_Λ_neg (h : ArchLineData c Λf Lpar) (t : ℝ) (ht : t ≠ 0) : - ‖Λf ((c:ℂ) + (-t:ℝ) * I)‖ = ‖Λf ((c:ℂ) + t * I)‖ := by - rw [← conj_lineC', h.conj_symm _ (by rw [re_lineC]; exact h.one_lt) (by rw [im_lineC]; exact ht), Complex.norm_conj] - /-- **the uniform bound for E′/E on the line**, given E ≠ 0 there. -/ theorem ArchLineData.derivE_div_E_uniform (h : ArchLineData c Λf Lpar) (hE : ∀ t : ℝ, EofL Λf ((c:ℂ) + t * I) ≠ 0) : @@ -977,49 +930,12 @@ theorem ArchLineData.frozen_uniform (h : ArchLineData c Λf Lpar) : ≤ B₀ / (Real.log T / 4) := div_le_div₀ hB0 (hB t) hq hden _ = 4 * B₀ / Real.log T := by field_simp -/-- ‖E(c+it)‖ ≤ M log(2+|t|). -/ -theorem ArchLineData.norm_E_line (h : ArchLineData c Λf Lpar) : - ∃ M : ℝ, ∀ t : ℝ, ‖EofL Λf ((c:ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|) := by - obtain ⟨A₀, hA0, hA⟩ := norm_Afn_le_at h.one_lt - obtain ⟨M, hM⟩ := h.upper - have hlog2 : (1:ℝ) / 2 ≤ Real.log 2 := by linarith [Real.log_two_gt_d9] - have hlogpos : ∀ t : ℝ, Real.log 2 ≤ Real.log (2 + |t|) := fun t => - Real.log_le_log two_pos (by linarith [abs_nonneg t]) - refine ⟨M + 2 * A₀, fun t => ?_⟩ - rw [EofL_eq_sub (by rw [re_lineC]; exact h.one_lt)] - calc ‖Λf ((c:ℂ) + t * I) - Afn ((c:ℂ) + t * I)‖ - ≤ ‖Λf ((c:ℂ) + t * I)‖ + ‖Afn ((c:ℂ) + t * I)‖ := norm_sub_le _ _ - _ ≤ M * Real.log (2 + |t|) + A₀ := add_le_add (hM t) (hA t) - _ ≤ (M + 2 * A₀) * Real.log (2 + |t|) := by nlinarith [hlogpos t] - -/-- ‖(E + E′/E)(c+it)‖ ≤ M log(2+|t|), given E ≠ 0 on the line. -/ -theorem ArchLineData.norm_E_add_dE_line (h : ArchLineData c Λf Lpar) - (hE : ∀ t : ℝ, EofL Λf ((c:ℂ) + t * I) ≠ 0) : - ∃ M : ℝ, ∀ t : ℝ, ‖EofL Λf ((c:ℂ) + t * I) + deriv (EofL Λf) ((c:ℂ) + t * I) / EofL Λf ((c:ℂ) + t * I)‖ - ≤ M * Real.log (2 + |t|) := by - obtain ⟨M, hM⟩ := h.norm_E_line - obtain ⟨CE, hCE0, hCE⟩ := h.derivE_div_E_uniform hE - have hlog2 : (1:ℝ) / 2 ≤ Real.log 2 := by linarith [Real.log_two_gt_d9] - have hlogpos : ∀ t : ℝ, Real.log 2 ≤ Real.log (2 + |t|) := fun t => - Real.log_le_log two_pos (by linarith [abs_nonneg t]) - refine ⟨M + 2 * CE, fun t => ?_⟩ - calc _ ≤ ‖EofL Λf ((c:ℂ) + t * I)‖ + ‖deriv (EofL Λf) ((c:ℂ) + t * I) / EofL Λf ((c:ℂ) + t * I)‖ := - norm_add_le _ _ - _ ≤ M * Real.log (2 + |t|) + CE := add_le_add (hM t) (hCE t) - _ ≤ (M + 2 * CE) * Real.log (2 + |t|) := by nlinarith [hlogpos t] - end generic /-! ## 7. The ξ′ instance: (c, Λ, Λ⋆) = (5/4, L, L⋆); the uniform bound for E′/E under (F2) and the freezing estimate -/ section uniform -theorem differentiableOn_Efn : DifferentiableOn ℂ Efn {s : ℂ | 1 < s.re} := - fun _ hs => (differentiableAt_Efn hs).differentiableWithinAt - -theorem analyticAt_Efn {s : ℂ} (hs : 1 < s.re) : AnalyticAt ℂ Efn s := - differentiableOn_Efn.analyticAt (isOpen_one_lt_re.mem_nhds hs) - theorem differentiableOn_Lfn : DifferentiableOn ℂ Lfn {s : ℂ | 1 < s.re} := fun _ hs => (differentiableAt_Lfn hs).differentiableWithinAt @@ -1156,6 +1072,5 @@ theorem frozen_uniform : end uniform - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/FullLine.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/FullLine.lean index c153464c65..cc718aa35c 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/FullLine.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/FullLine.lean @@ -38,15 +38,10 @@ variable {f : ℂ → ℂ} {k : ℝ → ℂ} {c : ℝ} def Fline (f : ℂ → ℂ) (k : ℝ → ℂ) (c : ℝ) (t : ℝ) : ℂ := (Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) * logDeriv f ((c : ℂ) + t * I) -/-- the two-sided weight t ↦ H(c+it) + H(1−c−it) is continuous. -/ +/-- the two-sided weight `t ↦ H(c+it) + H(1−c−it)` is continuous. -/ theorem continuous_weight (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (c : ℝ) : - Continuous (fun t : ℝ => Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) := by - refine (continuous_Hfn_line hk hkc c).add ?_ - have h := continuous_Hfn_line hk hkc (1 - c) - have : (fun t : ℝ => Hfn k (1 - c - t * I)) - = (fun t : ℝ => Hfn k (((1 - c : ℝ) : ℂ) + t * I)) ∘ fun t : ℝ => -t := by - funext t; simp only [Function.comp_apply, one_sub_cast] - rw [this]; exact h.comp continuous_neg + Continuous (fun t : ℝ => Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) := + (continuous_Hfn_line hk hkc c).add (Zeta23.WeilEF.continuous_Hfn_reflect hk hkc c) /-- the two-sided weight decays like 1/(1+t²) when −1 ≤ 1−c and c ≤ 2. -/ theorem norm_weight_le (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (hc0 : -1 ≤ c) (hc2 : c ≤ 2) : @@ -76,23 +71,8 @@ theorem continuous_logDeriv_line (hf : Differentiable ℂ f) (σ : ℝ) theorem integrable_decay_mul_log {φ ψ : ℝ → ℂ} (hφc : Continuous φ) (hψc : Continuous ψ) {C : ℝ} (hC0 : 0 ≤ C) (hφ : ∀ t, ‖φ t‖ ≤ C / (1 + t ^ 2)) {M : ℝ} (hM0 : 0 ≤ M) (hψ : ∀ t, ‖ψ t‖ ≤ M * Real.log (2 + |t|)) : - Integrable (fun t => φ t * ψ t) := by - set K : ℝ := C * (5 * M) with hK - have hmaj : Integrable (fun t : ℝ => K * ((1 : ℝ) + ‖t‖ ^ 2) ^ (-(3 / 2 : ℝ) / 2)) := - (integrable_rpow_neg_one_add_norm_sq (E := ℝ) (μ := volume) - (by rw [Module.finrank_self]; norm_num)).const_mul K - refine Integrable.mono' hmaj (hφc.mul hψc).aestronglyMeasurable - (Eventually.of_forall fun t => ?_) - have hq : 0 < (1 + t ^ 2 : ℝ) := by positivity - have hlog : Real.log (2 + |t|) ≤ 5 * (1 + t ^ 2) ^ (1 / 4 : ℝ) := by - have := log_two_add_le (abs_nonneg t); rwa [sq_abs] at this - have e : (1 + t ^ 2 : ℝ) ^ (-(3 / 2 : ℝ) / 2) = (1 + t ^ 2) ^ (1 / 4 : ℝ) / (1 + t ^ 2) := by - rw [show (-(3 / 2 : ℝ) / 2) = (1 / 4 : ℝ) - 1 by norm_num, Real.rpow_sub hq, Real.rpow_one] - rw [norm_mul, Real.norm_eq_abs, sq_abs, e] - calc ‖φ t‖ * ‖ψ t‖ ≤ (C / (1 + t ^ 2)) * (M * (5 * (1 + t ^ 2) ^ (1 / 4 : ℝ))) := - mul_le_mul (hφ t) ((hψ t).trans (mul_le_mul_of_nonneg_left hlog hM0)) (norm_nonneg _) - (by positivity) - _ = K * ((1 + t ^ 2) ^ (1 / 4 : ℝ) / (1 + t ^ 2)) := by rw [hK]; ring + Integrable (fun t => φ t * ψ t) := + Zeta23.WeilEF.integrable_decay_mul_log hφc hψc hC0 hφ hM0 hψ /-- points of the line Re s = c are not zeros of f. -/ theorem ne_zero_on_line {Zset : Set ℂ} (hZ : ∀ s, f s = 0 ↔ s ∈ Zset) @@ -131,45 +111,16 @@ theorem verticals_eq_of (hf : Differentiable ℂ f) (hne : ∀ t : ℝ, f ((c : VIntegral (fun s => Hfn k s * logDeriv f s) c (-R) R - VIntegral (fun s => Hfn k s * logDeriv f s) (1 - c) (-R) R = I • ∫ t in (-R)..R, Fline f k c t := by - set L := logDeriv f with hL - have hLc : Continuous (fun t : ℝ => L ((c : ℂ) + t * I)) := continuous_logDeriv_line hf c hne - have hHc := continuous_Hfn_line hk hkc c - have hH2 : Continuous (fun t : ℝ => Hfn k (1 - c - t * I)) := by - have h := continuous_Hfn_line hk hkc (1 - c) - have : (fun t : ℝ => Hfn k (1 - c - t * I)) - = (fun t : ℝ => Hfn k (((1 - c : ℝ) : ℂ) + t * I)) ∘ fun t : ℝ => -t := by - funext t; simp only [Function.comp_apply, one_sub_cast] - rw [this]; exact h.comp continuous_neg - have hleft : ∀ y : ℝ, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * L (((1 - c : ℝ) : ℂ) + y * I) - = -(Hfn k (1 - c - ((-y : ℝ) : ℂ) * I) * L ((c : ℂ) + ((-y : ℝ) : ℂ) * I)) := by - intro y + have hLc := continuous_logDeriv_line hf c hne + have h := Zeta23.WeilEF.verticals_fold_of hk hkc hLc hLc (fun y => by have hs : ((1 - c : ℝ) : ℂ) + y * I = 1 - ((c : ℂ) + ((-y : ℝ) : ℂ) * I) := by push_cast; ring - rw [hs, hsymm] - have : (1:ℂ) - ((c : ℂ) + ((-y:ℝ):ℂ) * I) = 1 - c - ((-y : ℝ) : ℂ) * I := by ring - rw [this]; ring - have hI1 : IntervalIntegrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * L ((c : ℂ) + t * I)) - volume (-R) R := (hHc.mul hLc).intervalIntegrable _ _ - have hI2 : IntervalIntegrable (fun t : ℝ => Hfn k (1 - c - t * I) * L ((c : ℂ) + t * I)) - volume (-R) R := (hH2.mul hLc).intervalIntegrable _ _ - have hfold : (∫ y in (-R)..R, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * L (((1 - c : ℝ) : ℂ) + y * I)) - = -∫ t in (-R)..R, Hfn k (1 - c - t * I) * L ((c : ℂ) + t * I) := by - simp_rw [hleft] - rw [intervalIntegral.integral_neg] - have h := intervalIntegral.integral_comp_neg (a := -R) (b := R) - (fun t : ℝ => Hfn k (1 - c - t * I) * L ((c : ℂ) + t * I)) - simp only [neg_neg] at h - rw [← h] - dsimp only [VIntegral] - rw [hfold, ← smul_sub, sub_neg_eq_add, ← intervalIntegral.integral_add hI1 hI2] - congr 1 - refine intervalIntegral.integral_congr fun t _ => ?_ - simp only [Fline] - ring + rw [hs, hsymm]) R + rw [h]; congr 1 + exact intervalIntegral.integral_congr fun t _ => by simp only [Fline]; ring /-! ## Good heights, re-indexed -/ -/-- from "∀ j ≥ j₀ ∃ R ∈ [j, j+1] …" to a height SEQUENCE R_j ∈ [j+j₀, j+j₀+1], j₀ ≥ 1, with the -log²-bound written in terms of j. -/ +/-- from "∀ j ≥ j₀ ∃ R ∈ [j, j+1] …" to a height sequence `R_j ∈ [j+j₀', j+j₀'+1]`, `j₀' ≥ 1`. -/ theorem exists_heights_of {a b : ℝ} (hGH : ∃ C : ℝ, 0 < C ∧ ∃ j₀ : ℕ, ∀ j : ℕ, j₀ ≤ j → ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ ∀ s : ℂ, (s.im = R ∨ s.im = -R) → a ≤ s.re → s.re ≤ b → @@ -179,21 +130,15 @@ theorem exists_heights_of {a b : ℝ} ∀ s : ℂ, (s.im = R j ∨ s.im = -R j) → a ≤ s.re → s.re ≤ b → f s ≠ 0 ∧ ‖logDeriv f s‖ ≤ C * (Real.log ((j : ℝ) + j₀ + 3)) ^ 2 := by obtain ⟨C, hC, j₀, h⟩ := hGH - have hex : ∀ j : ℕ, ∃ R : ℝ, ((j + (j₀ + 1) : ℕ) : ℝ) ≤ R ∧ R ≤ ((j + (j₀ + 1) : ℕ) : ℝ) + 1 ∧ - ∀ s : ℂ, (s.im = R ∨ s.im = -R) → a ≤ s.re → s.re ≤ b → - f s ≠ 0 ∧ ‖logDeriv f s‖ ≤ C * (Real.log (((j + (j₀ + 1) : ℕ) : ℝ) + 3)) ^ 2 := - fun j => h (j + (j₀ + 1)) (by omega) - refine ⟨C, hC, j₀ + 1, by omega, fun j => (hex j).choose, fun j => ?_⟩ - obtain ⟨hs1, hs2, hs3⟩ := (hex j).choose_spec - have e : ((j + (j₀ + 1) : ℕ) : ℝ) = (j : ℝ) + ((j₀ + 1 : ℕ) : ℝ) := by push_cast; ring - refine ⟨by rw [← e]; exact hs1, by rw [← e]; exact hs2, fun s him h1 h2 => ?_⟩ - rw [← e] - exact hs3 s him h1 h2 + obtain ⟨R, hR⟩ := Zeta23.WeilEF.exists_heights_reindex + (P := fun x R => ∀ s : ℂ, (s.im = R ∨ s.im = -R) → a ≤ s.re → s.re ≤ b → + f s ≠ 0 ∧ ‖logDeriv f s‖ ≤ C * (Real.log x) ^ 2) + (j₀ := j₀) (m := j₀ + 1) (by omega) h + exact ⟨C, hC, j₀ + 1, by omega, R, hR⟩ /-! ## The horizontal sides -/ -/-- **Horizontal sides vanish**: ‖H‖ ≤ C_H/(1+R_j²) on the segment and ‖f′/f‖ ≤ K log²(j+j₀+3) there, -R_j ≥ j + j₀ ≥ 1, so ‖HIntegral‖ ≤ (2c−1)·C_H·K·log²/(1+R_j²) → 0. -/ +/-- **Horizontal sides vanish** (delegates to `Zeta23.WeilEF.horizontal_vanish_of_log_sq`). -/ theorem horizontal_vanish_of (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (hc : 1 - c ≤ c) (hc2 : c ≤ 2) {K : ℝ} (hK : 0 ≤ K) {j₀ : ℕ} (hj₀ : 1 ≤ j₀) {R : ℕ → ℝ} (hR : ∀ j : ℕ, (j : ℝ) + j₀ ≤ R j ∧ @@ -202,110 +147,19 @@ theorem horizontal_vanish_of (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) Tendsto (fun j : ℕ => HIntegral (fun s => Hfn k s * logDeriv f s) (1 - c) c (R j)) atTop (𝓝 0) ∧ Tendsto (fun j : ℕ => HIntegral (fun s => Hfn k s * logDeriv f s) (1 - c) c (-(R j))) - atTop (𝓝 0) := by - obtain ⟨CH, hCH0, hH⟩ := norm_Hfn_le hk hkc - set n : ℕ → ℝ := fun j => (j : ℝ) + j₀ with hndef - have hn1 : ∀ j, 1 ≤ n j := fun j => by - have : (1 : ℝ) ≤ (j₀ : ℝ) := by exact_mod_cast hj₀ - have : (0 : ℝ) ≤ (j : ℝ) := Nat.cast_nonneg j - simp only [hndef]; linarith - set Lg : ℕ → ℝ := fun j => Real.log (n j + 3) with hLgdef - have hLg_eq : ∀ j : ℕ, Real.log ((j : ℝ) + j₀ + 3) = Lg j := fun j => by simp only [hLgdef, hndef] - -- integral bound along either horizontal - have hint : ∀ (j : ℕ) (y : ℝ), (y = R j ∨ y = -R j) → - ‖HIntegral (fun s => Hfn k s * logDeriv f s) (1 - c) c y‖ - ≤ CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| := by - intro j y hy - unfold HIntegral - refine intervalIntegral.norm_integral_le_of_norm_le_const fun x hx => ?_ - rw [Set.uIoc_of_le hc] at hx - have hy2 : y ^ 2 = (R j) ^ 2 := by rcases hy with h | h <;> simp [h] - dsimp only - rw [norm_mul, ← hy2] - refine mul_le_mul (hH x y (by linarith [hx.1]) (by linarith [hx.2])) ?_ (norm_nonneg _) - (by positivity) - rw [← hLg_eq] - have hxre : ((x : ℂ) + y * I).re = x := by simp - exact (hR j).2 ((x : ℂ) + y * I) (by rcases hy with h | h <;> simp [h]) (by rw [hxre]; exact hx.1.le) - (by rw [hxre]; exact hx.2) - -- the majorant tends to 0 - set b : ℕ → ℝ := fun j => CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| with hbdef - have hb0 : ∀ j, 0 ≤ b j := fun j => by rw [hbdef]; positivity - have hb_le : ∀ j : ℕ, b j ≤ (CH * K * |c - (1 - c)|) * (Lg j ^ 2 / (1 * (n j + 3) + (-3))) := by - intro j - have hnR : n j ≤ R j := (hR j).1 - have hn0 : 0 < n j := by linarith [hn1 j] - have hden : n j ≤ 1 + R j ^ 2 := by nlinarith [hnR, hn1 j] - have e1 : (1 : ℝ) * (n j + 3) + (-3) = n j := by ring - rw [e1] - have h1 : Lg j ^ 2 / (1 + R j ^ 2) ≤ Lg j ^ 2 / n j := - div_le_div_of_nonneg_left (sq_nonneg _) hn0 hden - have e : b j = CH * K * |c - (1 - c)| * (Lg j ^ 2 / (1 + R j ^ 2)) := by rw [hbdef]; ring - rw [e] - exact mul_le_mul_of_nonneg_left h1 (by positivity) - have hntop : Tendsto (fun j : ℕ => n j + 3) atTop atTop := by - simp only [hndef] - exact tendsto_atTop_add_const_right _ _ - (tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop) - have hlim0 : Tendsto (fun j : ℕ => Lg j ^ 2 / (1 * (n j + 3) + (-3))) atTop (𝓝 0) := by - have h := (Real.tendsto_pow_log_div_mul_add_atTop 1 (-3) 2 one_ne_zero).comp hntop - exact h - have hb : Tendsto b atTop (𝓝 0) := by - have hlim := hlim0.const_mul (CH * K * |c - (1 - c)|) - rw [mul_zero] at hlim - exact squeeze_zero hb0 hb_le hlim - exact ⟨squeeze_zero_norm (fun j => hint j (R j) (Or.inl rfl)) hb, - squeeze_zero_norm (fun j => hint j (-(R j)) (Or.inr rfl)) hb⟩ + atTop (𝓝 0) := + Zeta23.WeilEF.horizontal_vanish_of_log_sq hk hkc hc hc2 hK le_rfl hj₀ fun j => + ⟨(hR j).1, fun s hsim h1 h2 => by simpa only [one_mul] using (hR j).2 s hsim h1 h2⟩ /-! ## The zero side -/ -/-- **Zero-sum limit**: finite sums over the windows {|Im ρ| < R_j} ∩ Zset (R increasing to ∞) -converge to the tsum of an absolutely convergent g over Zset. -/ +/-- **Zero-sum limit**: delegates to `Zeta23.WeilEF.zero_sum_limit_of`. -/ theorem zero_sum_limit_of {Zset : Set ℂ} (g : ℂ → ℂ) (hsum : Summable (fun ρ : Zset => g ρ)) {R : ℕ → ℝ} (hRmono : Monotone R) (hRge : ∀ j : ℕ, (j : ℝ) ≤ R j) {Z : ℕ → Finset ℂ} (hZ : ∀ j : ℕ, ((Z j : Set ℂ) = {ρ : ℂ | ρ ∈ Zset ∧ -R j < ρ.im ∧ ρ.im < R j})) : - Tendsto (fun j : ℕ => ∑ ρ ∈ Z j, g ρ) atTop (𝓝 (∑' ρ : Zset, g ρ)) := by - classical - set G : Zset → ℂ := fun ρ => g ρ with hG - have hmemZ : ∀ j ρ, ρ ∈ Z j ↔ ρ ∈ Zset ∧ -R j < ρ.im ∧ ρ.im < R j := by - intro j ρ - rw [← Finset.mem_coe, hZ j] - rfl - set s : ℕ → Finset Zset := fun j => (Z j).subtype (· ∈ Zset) with hsdef - have hsum_eq : ∀ j, ∑ x ∈ s j, G x = ∑ ρ ∈ Z j, g ρ := by - intro j - have h1 := Finset.sum_subtype_eq_sum_filter (s := Z j) (p := (· ∈ Zset)) g - have h2 : (Z j).filter (· ∈ Zset) = Z j := by - apply Finset.filter_true_of_mem - intro ρ hρ - exact ((hmemZ j ρ).mp hρ).1 - rw [h2] at h1 - rw [← h1] - have hmono : Monotone s := by - intro i j hij x hx - rw [Finset.mem_subtype, hmemZ] at hx ⊢ - obtain ⟨h1, h2, h3⟩ := hx - have := hRmono hij - exact ⟨h1, by linarith, by linarith⟩ - have hexh : ∀ B : Finset Zset, ∃ j, B ≤ s j := by - intro B - set M : ℝ := ∑ x ∈ B, |((x : ℂ)).im| with hM - have hMle : ∀ x ∈ B, |((x : ℂ)).im| ≤ M := fun x hx => - Finset.single_le_sum (f := fun x : Zset => |((x : ℂ)).im|) (fun _ _ => abs_nonneg _) hx - obtain ⟨j, hj⟩ := exists_nat_gt M - refine ⟨j, fun x hx => ?_⟩ - rw [Finset.mem_subtype, hmemZ] - have habs := abs_le.mp (hMle x hx) - have hRj := hRge j - exact ⟨x.2, by linarith [habs.1], by linarith [habs.2]⟩ - have hs_tend : Tendsto s atTop atTop := tendsto_atTop_atTop_of_monotone hmono hexh - have hT : Tendsto (fun S : Finset Zset => ∑ x ∈ S, G x) atTop (𝓝 (∑' x, G x)) := by - have hHas := hsum.hasSum - simpa [HasSum] using hHas - have := hT.comp hs_tend - refine this.congr (fun j => ?_) - simp only [Function.comp_apply, hsum_eq] + Tendsto (fun j : ℕ => ∑ ρ ∈ Z j, g ρ) atTop (𝓝 (∑' ρ : Zset, g ρ)) := + Zeta23.WeilEF.zero_sum_limit_of g hsum hRmono hRge hZ /-! ## Assembly -/ @@ -349,34 +203,11 @@ theorem full_line_identity_of (hf : Differentiable ℂ f) (hc : 1 / 2 < c) (hc2 -- the three limits obtain ⟨hHtop, hHbot⟩ := horizontal_vanish_of (f := f) hk hkc hcc.le hc2 hCg.le hj₀ (R := R) (fun j => ⟨(hR j).1, fun s him h1 h2 => ((hR j).2.2 s him h1 h2).2⟩) - have hZlim := zero_sum_limit_of (fun ρ => (analyticOrderNatAt f ρ : ℂ) * Hfn k ρ) hsum - hRmono hRge hZc - have hV := tendsto_intervalIntegral_of_integrable - (integrable_Fline_of hf hne hline hk hkc (by linarith) hc2) hRge - -- decomposition of the normalized rectangle integral - have hdec : ∀ j : ℕ, RectangleIntegral' F (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) - = (1 / (2 * Real.pi * I) : ℂ) * (HIntegral F (1 - c) c (-(R j)) - HIntegral F (1 - c) c (R j)) - + (1 / (2 * Real.pi) : ℂ) * ∫ t in (-R j)..R j, Fline f k c t := by - intro j - obtain ⟨e1, e2, e3, e4⟩ := Zeta23.WeilEF.corner_re_im c (R j) - rw [RectangleIntegral', RectangleIntegral, smul_eq_mul, e1, e2, e3, e4] - have hv := verticals_eq_of hf hne hsymm hk hkc (R j) - rw [hF] - rw [show ∀ A B V₁ V₂ : ℂ, A - B + V₁ - V₂ = (A - B) + (V₁ - V₂) from fun _ _ _ _ => by ring, hv, - smul_eq_mul, mul_add, Zeta23.WeilEF.inv_two_pi_I_mul_I] - -- LHS → (1/2π) ∫ F - have hL : Tendsto (fun j : ℕ => RectangleIntegral' F (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I)) - atTop (𝓝 ((1 / (2 * Real.pi) : ℂ) * ∫ t, Fline f k c t)) := by - have h := ((hHbot.sub hHtop).const_mul (1 / (2 * Real.pi * I) : ℂ)).add - (hV.const_mul (1 / (2 * Real.pi) : ℂ)) - simp only [sub_zero, mul_zero, zero_add] at h - refine h.congr fun j => ?_ - rw [hdec j] - have hL' : Tendsto (fun j : ℕ => ∑ ρ ∈ Z j, (analyticOrderNatAt f ρ : ℂ) * Hfn k ρ) - atTop (𝓝 ((1 / (2 * Real.pi) : ℂ) * ∫ t, Fline f k c t)) := - hL.congr fun j => hE j - have := tendsto_nhds_unique hL' hZlim - exact this + exact Zeta23.WeilEF.full_line_limit_of hE + (fun j => verticals_eq_of hf hne hsymm hk hkc (R j)) hHtop hHbot + (tendsto_intervalIntegral_of_integrable + (integrable_Fline_of hf hne hline hk hkc (by linarith) hc2) hRge) + (zero_sum_limit_of (fun ρ => (analyticOrderNatAt f ρ : ℂ) * Hfn k ρ) hsum hRmono hRge hZc) end Generic diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/GramBridge.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/GramBridge.lean index 3366cab977..7fb1a2dcc9 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/GramBridge.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/GramBridge.lean @@ -22,9 +22,6 @@ hφsupp : tsupport (P.phi T) ⊆ Icc (−L/2) (L/2), hL : 0 < P.L T. -/ import Zeta23.XiPrime.ExplicitFormula import Zeta23.Hypotheses.GzGp -import Zeta23.ExplicitFormula.Bridge -import Zeta23.GammaFacts.Complete -import Zeta23.WeilEF.VerticalLine open scoped ComplexConjugate FourierTransform open Complex MeasureTheory Set Filter Topology @@ -228,14 +225,6 @@ theorem tau_mem (hL : 0 < P.L T) (hT : 0 < T) (k : Fin (P.d T)) : · nlinarith [mul_nonneg hk0 hh.le] · linarith -/-- T ≤ τ⋆_{kl} ≤ 2T. -/ -theorem tauStar_mem (hL : 0 < P.L T) (hT : 0 < T) (k l : Fin (P.d T)) : - T ≤ P.tauStar T k l ∧ P.tauStar T k l ≤ 2 * T := by - obtain ⟨h1, h2⟩ := tau_mem P T hL hT k - obtain ⟨h3, h4⟩ := tau_mem P T hL hT l - unfold Params.tauStar - constructor <;> linarith - end Pair end XiPrime diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/JTerm.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/JTerm.lean index e275a60489..f558e3afae 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/JTerm.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/JTerm.lean @@ -61,15 +61,15 @@ theorem JcorrG_estimate {c : ℝ} {dE : ℝ → ℂ} {Lpar : ℝ → ℂ} (hunifG : ∃ C T₀ : ℝ, 0 ≤ C ∧ 8 ≤ T₀ ∧ ∀ T : ℝ, T₀ ≤ T → ∀ τ t : ℝ, T ≤ τ → ‖DfroG c (Lpar τ) t‖ ≤ C / Real.log T) : ∃ K T₀ : ℝ, 0 ≤ K ∧ 8 ≤ T₀ ∧ - ∀ {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - {T a b W W' : ℝ} (hT : T₀ ≤ T) (ha : T ≤ a) (hb : T ≤ b) (hW : 0 ≤ W) (hW' : 0 ≤ W') - (hw1 : ∀ t : ℝ, ‖Hfn k ((c:ℂ) + t * I)‖ ≤ W * (cauchyK a t * cauchyK b t)) - (hw2 : ∀ t : ℝ, (|t - a| + |t - b|) * ‖Hfn k ((c:ℂ) + t * I)‖ ≤ W' * (cauchyK a t * cauchyK b t)) - (hw1' : ∀ t : ℝ, ‖Hfn k (1 - (c:ℂ) - t * I)‖ ≤ W * (cauchyK (-a) t * cauchyK (-b) t)) - (hw2' : ∀ t : ℝ, (|t + a| + |t + b|) * ‖Hfn k (1 - (c:ℂ) - t * I)‖ ≤ W' * (cauchyK (-a) t * cauchyK (-b) t)) - {cJ : ℕ → ℂ} (hcs : Summable (fun N : ℕ => ‖cJ N‖ * (N : ℝ) ^ (-c))) - (hC1 : ∀ t : ℝ, LSeries cJ ((c:ℂ) + t * I) = DfroG c (Lpar ((a + b) / 2)) t) - (hC1' : ∀ t : ℝ, LSeries (fun N => conj (cJ N)) ((c:ℂ) + t * I) = DfroG c (conj (Lpar ((a + b) / 2))) t), + ∀ {k : ℝ → ℂ} (_hk : ContDiff ℝ 2 k) (_hkc : HasCompactSupport k) + {T a b W W' : ℝ} (_hT : T₀ ≤ T) (_ha : T ≤ a) (_hb : T ≤ b) (_hW : 0 ≤ W) (_hW' : 0 ≤ W') + (_hw1 : ∀ t : ℝ, ‖Hfn k ((c:ℂ) + t * I)‖ ≤ W * (cauchyK a t * cauchyK b t)) + (_hw2 : ∀ t : ℝ, (|t - a| + |t - b|) * ‖Hfn k ((c:ℂ) + t * I)‖ ≤ W' * (cauchyK a t * cauchyK b t)) + (_hw1' : ∀ t : ℝ, ‖Hfn k (1 - (c:ℂ) - t * I)‖ ≤ W * (cauchyK (-a) t * cauchyK (-b) t)) + (_hw2' : ∀ t : ℝ, (|t + a| + |t + b|) * ‖Hfn k (1 - (c:ℂ) - t * I)‖ ≤ W' * (cauchyK (-a) t * cauchyK (-b) t)) + {cJ : ℕ → ℂ} (_hcs : Summable (fun N : ℕ => ‖cJ N‖ * (N : ℝ) ^ (-c))) + (_hC1 : ∀ t : ℝ, LSeries cJ ((c:ℂ) + t * I) = DfroG c (Lpar ((a + b) / 2)) t) + (_hC1' : ∀ t : ℝ, LSeries (fun N => conj (cJ N)) ((c:ℂ) + t * I) = DfroG c (conj (Lpar ((a + b) / 2))) t), ‖JcorrG c dE k - ((∑' N : ℕ, cJ N / ((Real.sqrt N : ℝ) : ℂ) * k (Real.log N)) + ∑' N : ℕ, conj (cJ N) / ((Real.sqrt N : ℝ) : ℂ) * k (-Real.log N))‖ ≤ K * ((W + W') / (T * Real.log T) / (4 + (a - b) ^ 2) + W / T ^ 2) := by @@ -229,8 +229,6 @@ theorem JcorrG_estimate {c : ℝ} {dE : ℝ → ℂ} {Lpar : ℝ → ℂ} def Dfro (Λs : ℂ) (t : ℝ) : ℂ := Bfn (((5/4:ℝ):ℂ) + t * I) / (Λs - Afn (((5/4:ℝ):ℂ) + t * I)) -theorem Dfro_eq_DfroG : Dfro = DfroG (5/4) := rfl - theorem dEE_conj_neg (hF2 : XiDerivZerosInStrip) (t : ℝ) : dEE t = conj (dEE (-t)) := by unfold dEE rw [← derivE_div_E_conj (one_lt_re_54 (-t)) (xiDeriv_ne_zero_line hF2 (-t)), conj_s54]; simp @@ -239,15 +237,15 @@ theorem dEE_conj_neg (hF2 : XiDerivZerosInStrip) (t : ℝ) : dEE t = conj (dEE ( frozen_uniform / derivE_div_E_uniform. -/ theorem Jcorr_estimate (hF2 : XiDerivZerosInStrip) : ∃ K T₀ : ℝ, 0 ≤ K ∧ 8 ≤ T₀ ∧ - ∀ {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - {T a b W W' : ℝ} (hT : T₀ ≤ T) (ha : T ≤ a) (hb : T ≤ b) (hW : 0 ≤ W) (hW' : 0 ≤ W') - (hw1 : ∀ t : ℝ, ‖Hfn k (((5/4:ℝ):ℂ) + t * I)‖ ≤ W * (cauchyK a t * cauchyK b t)) - (hw2 : ∀ t : ℝ, (|t - a| + |t - b|) * ‖Hfn k (((5/4:ℝ):ℂ) + t * I)‖ ≤ W' * (cauchyK a t * cauchyK b t)) - (hw1' : ∀ t : ℝ, ‖Hfn k (1 - (5/4:ℝ) - t * I)‖ ≤ W * (cauchyK (-a) t * cauchyK (-b) t)) - (hw2' : ∀ t : ℝ, (|t + a| + |t + b|) * ‖Hfn k (1 - (5/4:ℝ) - t * I)‖ ≤ W' * (cauchyK (-a) t * cauchyK (-b) t)) - {cJ : ℕ → ℂ} (hcs : Summable (fun N : ℕ => ‖cJ N‖ * (N : ℝ) ^ (-(5/4:ℝ)))) - (hC1 : ∀ t : ℝ, LSeries cJ (((5/4:ℝ):ℂ) + t * I) = Dfro (Lstar ((a + b) / 2)) t) - (hC1' : ∀ t : ℝ, LSeries (fun N => conj (cJ N)) (((5/4:ℝ):ℂ) + t * I) = Dfro (conj (Lstar ((a + b) / 2))) t), + ∀ {k : ℝ → ℂ} (_hk : ContDiff ℝ 2 k) (_hkc : HasCompactSupport k) + {T a b W W' : ℝ} (_hT : T₀ ≤ T) (_ha : T ≤ a) (_hb : T ≤ b) (_hW : 0 ≤ W) (_hW' : 0 ≤ W') + (_hw1 : ∀ t : ℝ, ‖Hfn k (((5/4:ℝ):ℂ) + t * I)‖ ≤ W * (cauchyK a t * cauchyK b t)) + (_hw2 : ∀ t : ℝ, (|t - a| + |t - b|) * ‖Hfn k (((5/4:ℝ):ℂ) + t * I)‖ ≤ W' * (cauchyK a t * cauchyK b t)) + (_hw1' : ∀ t : ℝ, ‖Hfn k (1 - (5/4:ℝ) - t * I)‖ ≤ W * (cauchyK (-a) t * cauchyK (-b) t)) + (_hw2' : ∀ t : ℝ, (|t + a| + |t + b|) * ‖Hfn k (1 - (5/4:ℝ) - t * I)‖ ≤ W' * (cauchyK (-a) t * cauchyK (-b) t)) + {cJ : ℕ → ℂ} (_hcs : Summable (fun N : ℕ => ‖cJ N‖ * (N : ℝ) ^ (-(5/4:ℝ)))) + (_hC1 : ∀ t : ℝ, LSeries cJ (((5/4:ℝ):ℂ) + t * I) = Dfro (Lstar ((a + b) / 2)) t) + (_hC1' : ∀ t : ℝ, LSeries (fun N => conj (cJ N)) (((5/4:ℝ):ℂ) + t * I) = Dfro (conj (Lstar ((a + b) / 2))) t), ‖Jcorr k - ((∑' N : ℕ, cJ N / ((Real.sqrt N : ℝ) : ℂ) * k (Real.log N)) + ∑' N : ℕ, conj (cJ N) / ((Real.sqrt N : ℝ) : ℂ) * k (-Real.log N))‖ ≤ K * ((W + W') / (T * Real.log T) / (4 + (a - b) ^ 2) + W / T ^ 2) := diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/LineBound.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/LineBound.lean index 93df6faaf4..9fbe17fb08 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/LineBound.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/LineBound.lean @@ -61,53 +61,34 @@ theorem norm_Lfn_line : ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, _ ≤ CΓ * Real.log (2 + |t|) + 4 / 5 + 4 := by rw [hs]; linarith [hG, h1, h2] _ ≤ (CΓ + 10) * Real.log (2 + |t|) := by nlinarith +private lemma norm_line_add_const_bound {f g h : ℝ → ℂ} + (hle : ∀ t, ‖f t‖ ≤ ‖g t‖ + ‖h t‖) + (hg : ∃ C₁, 0 < C₁ ∧ ∀ t, ‖g t‖ ≤ C₁ * Real.log (2 + |t|)) + (hh : ∃ C₂, 0 ≤ C₂ ∧ ∀ t, ‖h t‖ ≤ C₂) : + ∃ C, 0 < C ∧ ∀ t, ‖f t‖ ≤ C * Real.log (2 + |t|) := by + obtain ⟨C₁, hC₁, hg⟩ := hg + obtain ⟨C₂, hC₂, hh⟩ := hh + refine ⟨C₁ + 2 * C₂ + 1, by positivity, fun t => ?_⟩ + have hlog := half_le_log_two_add_abs t + calc ‖f t‖ ≤ ‖g t‖ + ‖h t‖ := hle t + _ ≤ C₁ * Real.log (2 + |t|) + C₂ := add_le_add (hg t) (hh t) + _ ≤ (C₁ + 2 * C₂ + 1) * Real.log (2 + |t|) := by nlinarith + /-- **‖E(5/4 + it)‖ ≤ C log(2 + |t|)**, E = ξ′/ξ = L + ζ′/ζ. -/ theorem norm_Efn_line : ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, - ‖Efn (((5 / 4 : ℝ) : ℂ) + t * I)‖ ≤ C * Real.log (2 + |t|) := by - obtain ⟨CL, hCL, hL⟩ := norm_Lfn_line - obtain ⟨A₀, hA0, hA⟩ := norm_Afn_le - refine ⟨CL + 2 * A₀ + 1, by positivity, fun t => ?_⟩ - have hlog := half_le_log_two_add_abs t - have h : ‖logDeriv riemannZeta (((5 / 4 : ℝ) : ℂ) + t * I)‖ ≤ A₀ := by - rw [logDeriv_zeta_eq_neg_Afn (one_lt_re_54 t), norm_neg]; exact hA t - calc ‖Efn (((5 / 4 : ℝ) : ℂ) + t * I)‖ - ≤ ‖Lfn (((5 / 4 : ℝ) : ℂ) + t * I)‖ + ‖logDeriv riemannZeta (((5 / 4 : ℝ) : ℂ) + t * I)‖ := - norm_add_le _ _ - _ ≤ CL * Real.log (2 + |t|) + A₀ := add_le_add (hL t) h - _ ≤ (CL + 2 * A₀ + 1) * Real.log (2 + |t|) := by nlinarith + ‖Efn (((5 / 4 : ℝ) : ℂ) + t * I)‖ ≤ C * Real.log (2 + |t|) := + norm_line_add_const_bound + (fun t => (norm_add_le _ _).trans_eq <| by + rw [logDeriv_zeta_eq_neg_Afn (one_lt_re_54 t), norm_neg]) + norm_Lfn_line norm_Afn_le /-- **‖ξ″/ξ′(5/4 + it)‖ ≤ C log(2 + |t|)** under (F2) (ξ′ ≠ 0 on the line). -/ theorem norm_logDeriv_xiDeriv_line (hF2 : XiDerivZerosInStrip) : ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, - ‖logDeriv xiDeriv (((5 / 4 : ℝ) : ℂ) + t * I)‖ ≤ C * Real.log (2 + |t|) := by - obtain ⟨CEn, hCEn, hEn⟩ := norm_Efn_line - obtain ⟨CE, hCE0, hCE⟩ := derivE_div_E_uniform hF2 - refine ⟨CEn + 2 * CE + 1, by positivity, fun t => ?_⟩ - have hlog := half_le_log_two_add_abs t - rw [logDeriv_xiDeriv_eq_Efn (one_lt_re_54 t) (xiDeriv_ne_zero_line hF2 t)] - calc ‖Efn (((5 / 4 : ℝ) : ℂ) + t * I) - + deriv Efn (((5 / 4 : ℝ) : ℂ) + t * I) / Efn (((5 / 4 : ℝ) : ℂ) + t * I)‖ - ≤ ‖Efn (((5 / 4 : ℝ) : ℂ) + t * I)‖ - + ‖deriv Efn (((5 / 4 : ℝ) : ℂ) + t * I) / Efn (((5 / 4 : ℝ) : ℂ) + t * I)‖ := norm_add_le _ _ - _ ≤ CEn * Real.log (2 + |t|) + CE := add_le_add (hEn t) (hCE t) - _ ≤ (CEn + 2 * CE + 1) * Real.log (2 + |t|) := by nlinarith - -/-- E is continuous along the line Re s = 5/4. -/ -theorem continuous_Efn_line : Continuous (fun t : ℝ => Efn (((5 / 4 : ℝ) : ℂ) + t * I)) := by - refine continuous_iff_continuousAt.mpr fun t => ?_ - exact ((analyticAt_Efn (one_lt_re_54 t)).continuousAt).comp - (f := fun t : ℝ => ((5 / 4 : ℝ) : ℂ) + t * I) (x := t) (by fun_prop) - -/-- ξ″/ξ′ is continuous along the line Re s = 5/4 (ξ′ entire and zero-free there under (F2)). -/ -theorem continuous_logDeriv_xiDeriv_line (hF2 : XiDerivZerosInStrip) : - Continuous (fun t : ℝ => logDeriv xiDeriv (((5 / 4 : ℝ) : ℂ) + t * I)) := by - refine continuous_iff_continuousAt.mpr fun t => ?_ - have hne := xiDeriv_ne_zero_line hF2 t - have ha := xiDeriv_analyticAt (((5 / 4 : ℝ) : ℂ) + t * I) - have hc : ContinuousAt (logDeriv xiDeriv) (((5 / 4 : ℝ) : ℂ) + t * I) := by - have := (ha.deriv.continuousAt).div ha.continuousAt hne - simpa only [logDeriv] using this - exact hc.comp (f := fun t : ℝ => ((5 / 4 : ℝ) : ℂ) + t * I) (x := t) (by fun_prop) + ‖logDeriv xiDeriv (((5 / 4 : ℝ) : ℂ) + t * I)‖ ≤ C * Real.log (2 + |t|) := + norm_line_add_const_bound + (fun t => by rw [logDeriv_xiDeriv_eq_Efn (one_lt_re_54 t) (xiDeriv_ne_zero_line hF2 t)]; exact norm_add_le _ _) + norm_Efn_line (derivE_div_E_uniform hF2) end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/LitCorr.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/LitCorr.lean index 6642936e98..b38b4c5feb 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/LitCorr.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/LitCorr.lean @@ -31,7 +31,6 @@ open Zeta23.WeilEF (Hfn Hfn_mirror gamma_line_shift gammaR_bracket prime_side_li /-! ## §A. The archimedean line -/ - open Complex MeasureTheory Filter Topology open Zeta23.WeilEF (Hfn Hfn_mirror gamma_line_shift gammaR_bracket norm_Hfn_le continuous_Hfn_line integrable_Hfn_mul_logDeriv_Gammaℝ) @@ -40,19 +39,6 @@ open Zeta23.WeilEF (Hfn Hfn_mirror gamma_line_shift gammaR_bracket norm_Hfn_le theorem Lfn_eq (s : ℂ) : Lfn s = logDeriv Complex.Gammaℝ s + (1 / s + 1 / (s - 1)) := by unfold Lfn; ring -/-- 1/s + 1/(s−1) is the logarithmic derivative of s(s−1), off {0,1}. -/ -theorem logDeriv_mul_sub_one {s : ℂ} (h0 : s ≠ 0) (h1 : s ≠ 1) : - logDeriv (fun w : ℂ => w * (w - 1)) s = 1 / s + 1 / (s - 1) := by - have h1' : s - 1 ≠ 0 := sub_ne_zero.mpr h1 - rw [logDeriv_mul (f := fun w : ℂ => w) (g := fun w : ℂ => w - 1) s h0 h1' - differentiableAt_id (differentiableAt_id.sub_const 1)] - have e1 : logDeriv (fun w : ℂ => w) s = 1 / s := by - rw [logDeriv_apply]; simp - have e2 : logDeriv (fun w : ℂ => w - 1) s = 1 / (s - 1) := by - rw [logDeriv_apply] - simp - rw [e1, e2] - /-- **Γℝ piece** (WeilEF.gamma_line_shift + gammaR_bracket): (1/2π)∫[H(c+it)+H(1−c−it)]·Γℝ′/Γℝ(c+it) dt = (1/2π)∫ h_k(r)·gammaBracket(r) dr. -/ theorem gamma_line {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) @@ -125,7 +111,6 @@ theorem archimedean_line {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCom rw [hsplit, mul_add, gamma_line hk hkc hc1 hc2, hR] ring - /-! ## §B. The generic line Re s = c: two-sided weight and the ζ-case evaluation -/ /-- the two-sided test weight on the line c: H(c+it) + H(1−c−it). -/ diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/PrimeTermJ.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/PrimeTermJ.lean index f24bafedc6..5baebdb31f 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/PrimeTermJ.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/PrimeTermJ.lean @@ -133,7 +133,7 @@ theorem paperFT_mul_Pc_eq (k : ℝ → ℂ) (L : ℝ) (c : ℕ → ℂ) : theorem integrable_paperFT_mul_Pc {k : ℝ → ℂ} (L : ℝ) (hFk : Integrable (𝓕 k)) (c : ℕ → ℂ) : Integrable (fun τ : ℝ => paperFT k τ * ((Pc (Real.exp L) c τ : ℝ) : ℂ)) := by rw [paperFT_mul_Pc_eq] - exact integrable_finset_sum _ (fun N _ => (integrable_paperFT_mul_trig hFk (c N) _).const_mul _) + exact MeasureTheory.integrable_finsetSum _ (fun N _ => (integrable_paperFT_mul_trig hFk (c N) _).const_mul _) /-- **Prime term with complex coefficients.** For k continuous with supp k ⊆ [−L, L], 𝓕k integrable, c : ℕ → ℂ: Σ_N (c_N k(log N) + c̄_N k(−log N))/√N = ∫ h_k(τ) P_c(e^L; τ) dτ. -/ @@ -151,7 +151,7 @@ theorem prime_term_complex {k : ℝ → ℂ} {L : ℝ} (hk : Continuous k) (hks / ((Real.sqrt N : ℝ) : ℂ) := by refine Finset.sum_congr rfl fun N _ => ?_ rw [c_mul_k_add_conj_mul_k_neg hk hki hFk] - rw [step1, paperFT_mul_Pc_eq, integral_finset_sum _ + rw [step1, paperFT_mul_Pc_eq, MeasureTheory.integral_finsetSum _ (fun N _ => (integrable_paperFT_mul_trig hFk (c N) _).const_mul _)] refine Finset.sum_congr rfl fun N _ => ?_ rw [cintegral_const_mul] diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/TestWeight.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/TestWeight.lean index 545614fe97..baa0e80d11 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/TestWeight.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/TestWeight.lean @@ -33,6 +33,7 @@ A consumer needing ONE (C, T₁) for several items should use §C + the §D–§ The line is Re s = 5/4, written `(5/4 : ℂ) + t * I`. -/ import Zeta23.XiPrime.ExplicitFormula +import Zeta23.Taper.Strip import Zeta23.Hypotheses.GzGp open scoped BigOperators ComplexConjugate @@ -53,102 +54,6 @@ namespace TestWeight /-! ## §A. Generic real analysis: the Cauchy convolution lemma (W5) -/ -/-- the Cauchy kernel 1/(1+(t−a)²) is integrable. -/ -theorem integrable_inv_one_add_sq_sub (a : ℝ) : - Integrable (fun t : ℝ => 1 / (1 + (t - a) ^ 2)) := by - have h := integrable_inv_one_add_sq.comp_sub_right a - refine h.congr (Eventually.of_forall fun t => ?_) - simp [one_div] - -theorem integral_inv_one_add_sq_sub (a : ℝ) : ∫ t : ℝ, 1 / (1 + (t - a) ^ 2) = Real.pi := by - have h := integral_sub_right_eq_self (μ := (volume : Measure ℝ)) (fun u : ℝ => (1 + u ^ 2)⁻¹) a - simp only [one_div] - rw [h] - exact integral_univ_inv_one_add_sq - -/-- pointwise: 1/((1+(t−a)²)(1+(t−b)²)) ≤ 4/(4+(a−b)²) · (1/(1+(t−a)²) + 1/(1+(t−b)²)). -/ -theorem cauchyConv_pointwise (a b t : ℝ) : - 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) - ≤ 4 / (4 + (a - b) ^ 2) * (1 / (1 + (t - a) ^ 2) + 1 / (1 + (t - b) ^ 2)) := by - have hp : 0 < 1 + (t - a) ^ 2 := by positivity - have hq : 0 < 1 + (t - b) ^ 2 := by positivity - have hD : 0 < 4 + (a - b) ^ 2 := by positivity - rw [div_add_div _ _ hp.ne' hq.ne', div_mul_div_comm, div_le_div_iff₀ (by positivity) (by positivity)] - have key : 4 + (a - b) ^ 2 ≤ 4 * ((1 + (t - b) ^ 2) + (1 + (t - a) ^ 2)) := by - nlinarith [sq_nonneg ((t - a) + (t - b)), sq_nonneg (t - a), sq_nonneg (t - b)] - calc 1 * ((4 + (a - b) ^ 2) * ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2))) - = (4 + (a - b) ^ 2) * ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) := by ring - _ ≤ 4 * ((1 + (t - b) ^ 2) + (1 + (t - a) ^ 2)) * ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) := by - gcongr - _ = 4 * (1 * (1 + (t - b) ^ 2) + (1 + (t - a) ^ 2) * 1) * ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) := by - ring - -/-- (W5a) integrability of the product of two Cauchy kernels. -/ -theorem cauchyConv_integrable (a b : ℝ) : - Integrable (fun t : ℝ => 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2))) := by - refine (integrable_inv_one_add_sq_sub a).mono' - (continuous_const.div (by fun_prop) fun t => by positivity).aestronglyMeasurable - (Eventually.of_forall fun t => ?_) - have hp : 0 < 1 + (t - a) ^ 2 := by positivity - have hq : 1 ≤ 1 + (t - b) ^ 2 := by nlinarith [sq_nonneg (t - b)] - rw [Real.norm_eq_abs, abs_of_nonneg (by positivity), one_div_le_one_div (by positivity) hp] - nlinarith - -/-- (W5b) ∫ dt/((1+(t−a)²)(1+(t−b)²)) ≤ 32π/(4+(a−b)²) (we even get 8π). -/ -theorem cauchyConv_integral_le (a b : ℝ) : - ∫ t : ℝ, 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) ≤ 32 * Real.pi / (4 + (a - b) ^ 2) := by - have hD : 0 < 4 + (a - b) ^ 2 := by positivity - have hmaj : Integrable (fun t : ℝ => - 4 / (4 + (a - b) ^ 2) * (1 / (1 + (t - a) ^ 2) + 1 / (1 + (t - b) ^ 2))) := - ((integrable_inv_one_add_sq_sub a).add (integrable_inv_one_add_sq_sub b)).const_mul _ - calc ∫ t : ℝ, 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) - ≤ ∫ t : ℝ, 4 / (4 + (a - b) ^ 2) * (1 / (1 + (t - a) ^ 2) + 1 / (1 + (t - b) ^ 2)) := - integral_mono_of_nonneg (Eventually.of_forall fun t => by positivity) hmaj - (Eventually.of_forall fun t => cauchyConv_pointwise a b t) - _ = 4 / (4 + (a - b) ^ 2) * (Real.pi + Real.pi) := by - rw [integral_const_mul, integral_add (integrable_inv_one_add_sq_sub a) - (integrable_inv_one_add_sq_sub b), integral_inv_one_add_sq_sub, integral_inv_one_add_sq_sub] - _ = 8 * Real.pi / (4 + (a - b) ^ 2) := by ring - _ ≤ 32 * Real.pi / (4 + (a - b) ^ 2) := by - gcongr; linarith [Real.pi_pos] - -/-- **(W5)** the Cauchy convolution lemma, packaged (integrability and bound together). -/ -theorem cauchyConv (a b : ℝ) : - Integrable (fun t : ℝ => 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2))) ∧ - ∫ t : ℝ, 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) ≤ 32 * Real.pi / (4 + (a - b) ^ 2) := - ⟨cauchyConv_integrable a b, cauchyConv_integral_le a b⟩ - -/-- the same bound with the friendlier denominator 1 + (a−b)². -/ -theorem cauchyConv_integral_le' (a b : ℝ) : - ∫ t : ℝ, 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) ≤ 32 * Real.pi / (1 + (a - b) ^ 2) := by - refine (cauchyConv_integral_le a b).trans ?_ - gcongr - norm_num - -theorem measurableSet_far (a R : ℝ) : MeasurableSet {t : ℝ | R ≤ |t - a|} := - (isClosed_le continuous_const (by fun_prop)).measurableSet - -/-- **(W5, far region)**: for R > 0, ∫_{|t−a| ≥ R} dt/((1+(t−a)²)(1+(t−b)²)) ≤ π/R². -/ -theorem cauchyConv_far (a b : ℝ) {R : ℝ} (hR : 0 < R) : - ∫ t in {t : ℝ | R ≤ |t - a|}, 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) - ≤ Real.pi / R ^ 2 := by - have hg : Integrable (fun t : ℝ => 1 / R ^ 2 * (1 / (1 + (t - b) ^ 2))) := - (integrable_inv_one_add_sq_sub b).const_mul _ - calc ∫ t in {t : ℝ | R ≤ |t - a|}, 1 / ((1 + (t - a) ^ 2) * (1 + (t - b) ^ 2)) - ≤ ∫ t in {t : ℝ | R ≤ |t - a|}, 1 / R ^ 2 * (1 / (1 + (t - b) ^ 2)) := by - refine setIntegral_mono_on (cauchyConv_integrable a b).integrableOn hg.integrableOn - (measurableSet_far a R) fun t ht => ?_ - have ht : R ≤ |t - a| := ht - have hq : 0 < 1 + (t - b) ^ 2 := by positivity - have hRa : R ^ 2 ≤ 1 + (t - a) ^ 2 := by - rw [← sq_abs (t - a)]; nlinarith [abs_nonneg (t - a)] - rw [one_div_mul_one_div, one_div_le_one_div (by positivity) (by positivity)] - exact mul_le_mul_of_nonneg_right hRa hq.le - _ ≤ ∫ t : ℝ, 1 / R ^ 2 * (1 / (1 + (t - b) ^ 2)) := - setIntegral_le_integral hg (Eventually.of_forall fun t => by positivity) - _ = Real.pi / R ^ 2 := by - rw [integral_const_mul, integral_inv_one_add_sq_sub]; ring - /-! ## §B. paperFT helpers -/ /-- [eq:hfbound], first order: supp f ⊆ [−Λ, Λ], f ∈ C_c¹ ⇒ ‖h_f(z)‖·‖z‖ ≤ e^{|Im z|Λ}‖f′‖₁. @@ -203,11 +108,6 @@ theorem Hfn_five_four (k : ℝ → ℂ) (t : ℝ) : rw [div_eq_iff Complex.I_ne_zero] linear_combination (3 / 4 : ℂ) * Complex.I_sq -/-- bridge for consumers who spell the line point with a real 5/4: `((5/4:ℝ):ℂ) + t*I`. -/ -theorem Hfn_five_four_ofReal (k : ℝ → ℂ) (t : ℝ) : - Hfn k (((5 / 4 : ℝ) : ℂ) + t * I) = Hfn k ((5 / 4 : ℂ) + t * I) := by - push_cast; rfl - /-- the mirrored weight on the line: H_{k∘neg}(5/4 + it) = h_k(−t + 3i/4). -/ theorem Hfn_five_four_neg (k : ℝ → ℂ) (t : ℝ) : Hfn (fun u => k (-u)) ((5 / 4 : ℂ) + t * I) = paperFT k (-(t : ℂ) + 3 / 4 * I) := by @@ -316,26 +216,19 @@ theorem integral_norm_phiC_le (h : WindowAt P T C) : ∫ u, ‖(P.phi T u : ℂ) ring theorem deriv_phiC (h : WindowAt P T C) : - deriv (fun u => (P.phi T u : ℂ)) = fun u => ((deriv (P.phi T) u : ℝ) : ℂ) := by - funext u - exact ((h.contDiff.differentiable (by norm_num) u).hasDerivAt.ofReal_comp).deriv + deriv (fun u => (P.phi T u : ℂ)) = fun u => ((deriv (P.phi T) u : ℝ) : ℂ) := + Taper.deriv_ofReal_comp (h.contDiff.differentiable (by norm_num)) theorem deriv2_phiC (h : WindowAt P T C) : deriv (deriv (fun u => (P.phi T u : ℂ))) = fun u => ((deriv (deriv (P.phi T)) u : ℝ) : ℂ) := by rw [h.deriv_phiC] - funext u - have hd : Differentiable ℝ (deriv (P.phi T)) := - (h.contDiff.deriv' (n := 2)).differentiable (by norm_num) - exact ((hd u).hasDerivAt.ofReal_comp).deriv + exact Taper.deriv_ofReal_comp ((h.contDiff.deriv' (n := 2)).differentiable (by norm_num)) theorem deriv3_phiC (h : WindowAt P T C) : deriv (deriv (deriv (fun u => (P.phi T u : ℂ)))) = fun u => ((deriv (deriv (deriv (P.phi T))) u : ℝ) : ℂ) := by rw [h.deriv2_phiC] - funext u - have hd : Differentiable ℝ (deriv (deriv (P.phi T))) := - ((h.contDiff.deriv' (n := 2)).deriv' (n := 1)).differentiable (by norm_num) - exact ((hd u).hasDerivAt.ofReal_comp).deriv + exact Taper.deriv_ofReal_comp (((h.contDiff.deriv' (n := 2)).deriv' (n := 1)).differentiable (by norm_num)) theorem integral_norm_deriv_phiC_le (h : WindowAt P T C) : ∫ u, ‖deriv (fun u => (P.phi T u : ℂ)) u‖ ≤ C := by @@ -426,19 +319,12 @@ theorem mfactor_moment_le (h : WindowAt P T C) (x : ℝ) : have := h.abs_re_mul_norm_phiHat_le (-(x : ℂ) + 3 / 4 * I) rwa [mline_re, mline_im, neg_sq, abs_neg] at this -/-- the factor on the real line (no exponential): ‖φ̂(x)‖ ≤ (1+C) L/(1+x²). -/ -theorem rfactor_le (h : WindowAt P T C) (x : ℝ) : - ‖P.phiHat T x‖ ≤ (1 + C) * P.L T / (1 + x ^ 2) := by - have := h.norm_phiHat_le (x : ℂ) - simpa only [Complex.ofReal_re, Complex.ofReal_im, abs_zero, zero_mul, Real.exp_zero, mul_one] using this - end WindowAt end TestWeight /-! ## §E. The Weil test function k = f_k ⋆ f̃_l and its transform -/ - namespace TestWeight namespace WindowAt @@ -470,12 +356,6 @@ theorem kfun_tsupport (h : WindowAt P T C) (k l : ℤ) : tsupport (kfun P T k l) ⊆ Icc (-P.L T) (P.L T) := EF.tsupport_weilTest_subset (h.fk_tsupport k) (h.fk_tsupport l) -theorem kfun_continuous (h : WindowAt P T C) (k l : ℤ) : Continuous (kfun P T k l) := - (h.kfun_contDiff k l).continuous - -theorem kfun_integrable (h : WindowAt P T C) (k l : ℤ) : Integrable (kfun P T k l) := - (h.kfun_continuous k l).integrable_of_hasCompactSupport (h.kfun_hasCompactSupport k l) - /-- (W0, mirrored) u ↦ k(−u) ∈ C². -/ theorem kfun_neg_contDiff (h : WindowAt P T C) (k l : ℤ) : ContDiff ℝ 2 (fun u => kfun P T k l (-u)) := @@ -523,471 +403,89 @@ theorem Hfn_kfun_neg (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : /-! ## §F. (W1)–(W3): pointwise bounds on the line Re s = 5/4 -/ -/-- **(W1)** ‖H(5/4+it)‖ ≤ (1+C)² X^{3/4} L² / ((1+(t−τ_k)²)(1+(t−τ_l)²)). -/ -theorem norm_Hfn_kfun_le (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : - ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / - ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := by +private lemma norm_prod_bound (h : WindowAt P T C) {f : ℝ → ℂ} {x y : ℝ} + (hf : ∀ u, ‖f u‖ ≤ (1 + C) * Real.exp (3 / 4 * (P.L T / 2)) * P.L T / (1 + u ^ 2)) : + ‖f x * f y‖ ≤ (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / + ((1 + x ^ 2) * (1 + y ^ 2)) := by have hC := h.C_nonneg have hL := h.L_pos - rw [h.Hfn_kfun, norm_mul] - calc ‖P.phiHat T (((t - P.tau T k : ℝ) : ℂ) - 3 / 4 * I)‖ - * ‖P.phiHat T (((t - P.tau T l : ℝ) : ℂ) - 3 / 4 * I)‖ - ≤ ((1 + C) * Real.exp (3 / 4 * (P.L T / 2)) * P.L T / (1 + (t - P.tau T k) ^ 2)) - * ((1 + C) * Real.exp (3 / 4 * (P.L T / 2)) * P.L T / (1 + (t - P.tau T l) ^ 2)) := - mul_le_mul (h.factor_le _) (h.factor_le _) (norm_nonneg _) (by positivity) + rw [norm_mul] + calc ‖f x‖ * ‖f y‖ + ≤ ((1 + C) * Real.exp (3 / 4 * (P.L T / 2)) * P.L T / (1 + x ^ 2)) + * ((1 + C) * Real.exp (3 / 4 * (P.L T / 2)) * P.L T / (1 + y ^ 2)) := + mul_le_mul (hf x) (hf y) (norm_nonneg _) (by positivity) _ = (1 + C) ^ 2 * (Real.exp (3 / 4 * (P.L T / 2)) * Real.exp (3 / 4 * (P.L T / 2))) * P.L T ^ 2 / - ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := by + ((1 + x ^ 2) * (1 + y ^ 2)) := by rw [div_mul_div_comm]; ring _ = _ := by rw [exp_mul_exp_eq_X_rpow] -/-- **(W2)** (|t−τ_k| + |t−τ_l|) ‖H(5/4+it)‖ ≤ 4C(1+C) X^{3/4} L / ((1+(t−τ_k)²)(1+(t−τ_l)²)). -/ -theorem moment_norm_Hfn_kfun_le (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : - (|t - P.tau T k| + |t - P.tau T l|) * ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ 4 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T / - ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := by +private lemma moment_norm_prod_bound (h : WindowAt P T C) {f : ℝ → ℂ} {x y : ℝ} + (hf : ∀ u, ‖f u‖ ≤ (1 + C) * Real.exp (3 / 4 * (P.L T / 2)) * P.L T / (1 + u ^ 2)) + (hf' : ∀ u, |u| * ‖f u‖ ≤ 2 * C * Real.exp (3 / 4 * (P.L T / 2)) / (1 + u ^ 2)) : + (|x| + |y|) * ‖f x * f y‖ ≤ 4 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T / + ((1 + x ^ 2) * (1 + y ^ 2)) := by have hC := h.C_nonneg have hL := h.L_pos - rw [h.Hfn_kfun, norm_mul, ← exp_mul_exp_eq_X_rpow] - set A := ‖P.phiHat T (((t - P.tau T k : ℝ) : ℂ) - 3 / 4 * I)‖ - set B := ‖P.phiHat T (((t - P.tau T l : ℝ) : ℂ) - 3 / 4 * I)‖ + rw [norm_mul, ← exp_mul_exp_eq_X_rpow] set e := Real.exp (3 / 4 * (P.L T / 2)) - have hA := h.factor_le (t - P.tau T k) - have hA' := h.factor_moment_le (t - P.tau T k) - have hB := h.factor_le (t - P.tau T l) - have hB' := h.factor_moment_le (t - P.tau T l) - have hp : 0 < 1 + (t - P.tau T k) ^ 2 := by positivity - have hq : 0 < 1 + (t - P.tau T l) ^ 2 := by positivity - calc (|t - P.tau T k| + |t - P.tau T l|) * (A * B) - = (|t - P.tau T k| * A) * B + A * (|t - P.tau T l| * B) := by ring - _ ≤ (2 * C * e / (1 + (t - P.tau T k) ^ 2)) * ((1 + C) * e * P.L T / (1 + (t - P.tau T l) ^ 2)) - + ((1 + C) * e * P.L T / (1 + (t - P.tau T k) ^ 2)) * (2 * C * e / (1 + (t - P.tau T l) ^ 2)) := - add_le_add (mul_le_mul hA' hB (by positivity) (by positivity)) - (mul_le_mul hA hB' (by positivity) (by positivity)) - _ = 4 * C * (1 + C) * (e * e) * P.L T / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := by + have hp : 0 < 1 + x ^ 2 := by positivity + have hq : 0 < 1 + y ^ 2 := by positivity + calc (|x| + |y|) * (‖f x‖ * ‖f y‖) + = (|x| * ‖f x‖) * ‖f y‖ + ‖f x‖ * (|y| * ‖f y‖) := by ring + _ ≤ (2 * C * e / (1 + x ^ 2)) * ((1 + C) * e * P.L T / (1 + y ^ 2)) + + ((1 + C) * e * P.L T / (1 + x ^ 2)) * (2 * C * e / (1 + y ^ 2)) := + add_le_add (mul_le_mul (hf' x) (hf y) (by positivity) (by positivity)) + (mul_le_mul (hf x) (hf' y) (by positivity) (by positivity)) + _ = 4 * C * (1 + C) * (e * e) * P.L T / ((1 + x ^ 2) * (1 + y ^ 2)) := by field_simp ring +private lemma moment_norm_kfun_signed (h : WindowAt P T C) (neg : Bool) (k l : ℤ) (t : ℝ) : + let s : ℝ := if neg then 1 else -1 + let kf := if neg then fun u => kfun P T k l (-u) else kfun P T k l + (|t + s * P.tau T k| + |t + s * P.tau T l|) * ‖Hfn kf ((5 / 4 : ℂ) + t * I)‖ + ≤ 4 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T / + ((1 + (t + s * P.tau T k) ^ 2) * (1 + (t + s * P.tau T l) ^ 2)) := by + cases neg + · simpa [sub_eq_add_neg] using + h.Hfn_kfun k l t ▸ h.moment_norm_prod_bound h.factor_le h.factor_moment_le + · simpa using + h.Hfn_kfun_neg k l t ▸ h.moment_norm_prod_bound h.mfactor_le h.mfactor_moment_le + +/-- **(W1)** ‖H(5/4+it)‖ ≤ (1+C)² X^{3/4} L² / ((1+(t−τ_k)²)(1+(t−τ_l)²)). -/ +theorem norm_Hfn_kfun_le (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : + ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ + ≤ (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / + ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := + h.Hfn_kfun k l t ▸ h.norm_prod_bound h.factor_le + +/-- **(W2)** (|t−τ_k| + |t−τ_l|) ‖H(5/4+it)‖ ≤ 4C(1+C) X^{3/4} L / ((1+(t−τ_k)²)(1+(t−τ_l)²)). -/ +theorem moment_norm_Hfn_kfun_le (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : + (|t - P.tau T k| + |t - P.tau T l|) * ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ + ≤ 4 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T / + ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := by + simpa [sub_eq_add_neg] using h.moment_norm_kfun_signed false k l t + /-- **(W3, size)** the mirrored weight: ‖H_{k∘neg}(5/4+it)‖ ≤ (1+C)² X^{3/4} L² / ((1+(t+τ_k)²)(1+(t+τ_l)²)). -/ theorem norm_Hfn_kfun_neg_le (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ ≤ (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / - ((1 + (t + P.tau T k) ^ 2) * (1 + (t + P.tau T l) ^ 2)) := by - have hC := h.C_nonneg - have hL := h.L_pos - rw [h.Hfn_kfun_neg, norm_mul] - calc ‖P.phiHat T (-((t + P.tau T k : ℝ) : ℂ) + 3 / 4 * I)‖ - * ‖P.phiHat T (-((t + P.tau T l : ℝ) : ℂ) + 3 / 4 * I)‖ - ≤ ((1 + C) * Real.exp (3 / 4 * (P.L T / 2)) * P.L T / (1 + (t + P.tau T k) ^ 2)) - * ((1 + C) * Real.exp (3 / 4 * (P.L T / 2)) * P.L T / (1 + (t + P.tau T l) ^ 2)) := - mul_le_mul (h.mfactor_le _) (h.mfactor_le _) (norm_nonneg _) (by positivity) - _ = (1 + C) ^ 2 * (Real.exp (3 / 4 * (P.L T / 2)) * Real.exp (3 / 4 * (P.L T / 2))) * P.L T ^ 2 / - ((1 + (t + P.tau T k) ^ 2) * (1 + (t + P.tau T l) ^ 2)) := by - rw [div_mul_div_comm]; ring - _ = _ := by rw [exp_mul_exp_eq_X_rpow] + ((1 + (t + P.tau T k) ^ 2) * (1 + (t + P.tau T l) ^ 2)) := + h.Hfn_kfun_neg k l t ▸ h.norm_prod_bound h.mfactor_le /-- **(W3, first moment)** (|t+τ_k| + |t+τ_l|) ‖H_{k∘neg}(5/4+it)‖ ≤ 4C(1+C) X^{3/4} L / (…). -/ theorem moment_norm_Hfn_kfun_neg_le (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : (|t + P.tau T k| + |t + P.tau T l|) * ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ ≤ 4 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T / ((1 + (t + P.tau T k) ^ 2) * (1 + (t + P.tau T l) ^ 2)) := by - have hC := h.C_nonneg - have hL := h.L_pos - rw [h.Hfn_kfun_neg, norm_mul, ← exp_mul_exp_eq_X_rpow] - set A := ‖P.phiHat T (-((t + P.tau T k : ℝ) : ℂ) + 3 / 4 * I)‖ - set B := ‖P.phiHat T (-((t + P.tau T l : ℝ) : ℂ) + 3 / 4 * I)‖ - set e := Real.exp (3 / 4 * (P.L T / 2)) - have hA := h.mfactor_le (t + P.tau T k) - have hA' := h.mfactor_moment_le (t + P.tau T k) - have hB := h.mfactor_le (t + P.tau T l) - have hB' := h.mfactor_moment_le (t + P.tau T l) - have hp : 0 < 1 + (t + P.tau T k) ^ 2 := by positivity - have hq : 0 < 1 + (t + P.tau T l) ^ 2 := by positivity - calc (|t + P.tau T k| + |t + P.tau T l|) * (A * B) - = (|t + P.tau T k| * A) * B + A * (|t + P.tau T l| * B) := by ring - _ ≤ (2 * C * e / (1 + (t + P.tau T k) ^ 2)) * ((1 + C) * e * P.L T / (1 + (t + P.tau T l) ^ 2)) - + ((1 + C) * e * P.L T / (1 + (t + P.tau T k) ^ 2)) * (2 * C * e / (1 + (t + P.tau T l) ^ 2)) := - add_le_add (mul_le_mul hA' hB (by positivity) (by positivity)) - (mul_le_mul hA hB' (by positivity) (by positivity)) - _ = 4 * C * (1 + C) * (e * e) * P.L T / ((1 + (t + P.tau T k) ^ 2) * (1 + (t + P.tau T l) ^ 2)) := by - field_simp - ring + simpa using h.moment_norm_kfun_signed true k l t /-! ## §G. (W4): the transform on the real line -/ -/-- **(W4)** on ℝ the transform is the real number φ̂_ℝ(τ−τ_k) φ̂_ℝ(τ−τ_l). -/ -theorem paperFT_kfun_ofReal (h : WindowAt P T C) (k l : ℤ) (τ : ℝ) : - paperFT (kfun P T k l) τ - = ((P.phiHatR T (τ - P.tau T k) * P.phiHatR T (τ - P.tau T l) : ℝ) : ℂ) := by - rw [h.paperFT_kfun, ← Complex.ofReal_sub, ← Complex.ofReal_sub, GzGp.phiHat_ofReal, - GzGp.phiHat_ofReal, Complex.ofReal_mul] - -theorem norm_paperFT_kfun_ofReal_le (h : WindowAt P T C) (k l : ℤ) (τ : ℝ) : - ‖paperFT (kfun P T k l) τ‖ - ≤ (1 + C) ^ 2 * P.L T ^ 2 / ((1 + (τ - P.tau T k) ^ 2) * (1 + (τ - P.tau T l) ^ 2)) := by - have hC := h.C_nonneg - have hL := h.L_pos - rw [h.paperFT_kfun, norm_mul, ← Complex.ofReal_sub, ← Complex.ofReal_sub] - calc ‖P.phiHat T ((τ - P.tau T k : ℝ) : ℂ)‖ * ‖P.phiHat T ((τ - P.tau T l : ℝ) : ℂ)‖ - ≤ ((1 + C) * P.L T / (1 + (τ - P.tau T k) ^ 2)) * ((1 + C) * P.L T / (1 + (τ - P.tau T l) ^ 2)) := - mul_le_mul (h.rfactor_le _) (h.rfactor_le _) (norm_nonneg _) (by positivity) - _ = _ := by rw [div_mul_div_comm]; ring - -theorem continuous_paperFT_kfun_ofReal (h : WindowAt P T C) (k l : ℤ) : - Continuous (fun τ : ℝ => paperFT (kfun P T k l) τ) := - (WeilEF.differentiable_paperFT (h.kfun_continuous k l) (h.kfun_hasCompactSupport k l)).continuous.comp - Complex.continuous_ofReal - -/-- **(W4)** h_k is integrable on ℝ. -/ -theorem integrable_paperFT_kfun_ofReal (h : WindowAt P T C) (k l : ℤ) : - Integrable (fun τ : ℝ => paperFT (kfun P T k l) τ) := by - refine ((cauchyConv_integrable (P.tau T k) (P.tau T l)).const_mul ((1 + C) ^ 2 * P.L T ^ 2)).mono' - (h.continuous_paperFT_kfun_ofReal k l).aestronglyMeasurable (Eventually.of_forall fun τ => ?_) - rw [mul_one_div] - exact h.norm_paperFT_kfun_ofReal_le k l τ - -/-- **(W4)** ∫‖h_k‖ ≤ 32π (1+C)² L² / (1 + (τ_k − τ_l)²). -/ -theorem integral_norm_paperFT_kfun_ofReal_le (h : WindowAt P T C) (k l : ℤ) : - ∫ τ : ℝ, ‖paperFT (kfun P T k l) τ‖ - ≤ 32 * Real.pi * (1 + C) ^ 2 * P.L T ^ 2 / (1 + (P.tau T k - P.tau T l) ^ 2) := by - have hC := h.C_nonneg - have hL := h.L_pos - calc ∫ τ : ℝ, ‖paperFT (kfun P T k l) τ‖ - ≤ ∫ τ : ℝ, (1 + C) ^ 2 * P.L T ^ 2 * (1 / ((1 + (τ - P.tau T k) ^ 2) * (1 + (τ - P.tau T l) ^ 2))) := - integral_mono_of_nonneg (Eventually.of_forall fun _ => norm_nonneg _) - ((cauchyConv_integrable _ _).const_mul _) - (Eventually.of_forall fun τ => by - beta_reduce; rw [mul_one_div]; exact h.norm_paperFT_kfun_ofReal_le k l τ) - _ = (1 + C) ^ 2 * P.L T ^ 2 * ∫ τ : ℝ, 1 / ((1 + (τ - P.tau T k) ^ 2) * (1 + (τ - P.tau T l) ^ 2)) := - integral_const_mul _ _ - _ ≤ (1 + C) ^ 2 * P.L T ^ 2 * (32 * Real.pi / (1 + (P.tau T k - P.tau T l) ^ 2)) := - mul_le_mul_of_nonneg_left (cauchyConv_integral_le' _ _) (by positivity) - _ = _ := by ring - /-! ## §H. (W6): integrated consequences on the line Re s = 5/4 -/ -theorem continuous_Hfn_kfun (h : WindowAt P T C) (k l : ℤ) : - Continuous (fun t : ℝ => Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)) := by - have hc := (WeilEF.differentiable_paperFT (h.kfun_continuous k l) (h.kfun_hasCompactSupport k l)).continuous - unfold Hfn - exact hc.comp (by fun_prop) - -theorem continuous_Hfn_kfun_neg (h : WindowAt P T C) (k l : ℤ) : - Continuous (fun t : ℝ => Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)) := by - have hc := (WeilEF.differentiable_paperFT ((h.kfun_neg_contDiff k l).continuous) - (h.kfun_neg_hasCompactSupport k l)).continuous - unfold Hfn - exact hc.comp (by fun_prop) - -/-- (W6) t ↦ H(5/4+it) is integrable. -/ -theorem integrable_Hfn_kfun (h : WindowAt P T C) (k l : ℤ) : - Integrable (fun t : ℝ => Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)) := by - refine ((cauchyConv_integrable (P.tau T k) (P.tau T l)).const_mul - ((1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2)).mono' - (h.continuous_Hfn_kfun k l).aestronglyMeasurable (Eventually.of_forall fun t => ?_) - rw [mul_one_div] - exact h.norm_Hfn_kfun_le k l t - -theorem integrable_Hfn_kfun_neg (h : WindowAt P T C) (k l : ℤ) : - Integrable (fun t : ℝ => Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)) := by - refine ((cauchyConv_integrable (-P.tau T k) (-P.tau T l)).const_mul - ((1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2)).mono' - (h.continuous_Hfn_kfun_neg k l).aestronglyMeasurable (Eventually.of_forall fun t => ?_) - rw [mul_one_div, sub_neg_eq_add, sub_neg_eq_add] - exact h.norm_Hfn_kfun_neg_le k l t - -/-- **(W6a)** ∫‖H(5/4+it)‖dt ≤ 32π(1+C)² X^{3/4} L² / (1+(τ_k−τ_l)²). -/ -theorem integral_norm_Hfn_kfun_le (h : WindowAt P T C) (k l : ℤ) : - ∫ t : ℝ, ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ 32 * Real.pi * (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / (1 + (P.tau T k - P.tau T l) ^ 2) := by - have hC := h.C_nonneg - have hL := h.L_pos - have hX := h.X_pos - calc ∫ t : ℝ, ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ ∫ t : ℝ, (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * (1 / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2))) := - integral_mono_of_nonneg (Eventually.of_forall fun _ => norm_nonneg _) - ((cauchyConv_integrable _ _).const_mul _) - (Eventually.of_forall fun t => by beta_reduce; rw [mul_one_div]; exact h.norm_Hfn_kfun_le k l t) - _ = (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * ∫ t : ℝ, 1 / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := - integral_const_mul _ _ - _ ≤ (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 * (32 * Real.pi / (1 + (P.tau T k - P.tau T l) ^ 2)) := - mul_le_mul_of_nonneg_left (cauchyConv_integral_le' _ _) (by positivity) - _ = _ := by ring - -/-- **(W6a, mirrored)** ∫‖H_{k∘neg}(5/4+it)‖dt ≤ 32π(1+C)² X^{3/4} L² / (1+(τ_k−τ_l)²). -/ -theorem integral_norm_Hfn_kfun_neg_le (h : WindowAt P T C) (k l : ℤ) : - ∫ t : ℝ, ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ 32 * Real.pi * (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / (1 + (P.tau T k - P.tau T l) ^ 2) := by - have hC := h.C_nonneg - have hL := h.L_pos - have hX := h.X_pos - calc ∫ t : ℝ, ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ ∫ t : ℝ, (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * (1 / ((1 + (t - -P.tau T k) ^ 2) * (1 + (t - -P.tau T l) ^ 2))) := - integral_mono_of_nonneg (Eventually.of_forall fun _ => norm_nonneg _) - ((cauchyConv_integrable _ _).const_mul _) - (Eventually.of_forall fun t => by - beta_reduce; rw [mul_one_div, sub_neg_eq_add, sub_neg_eq_add]; exact h.norm_Hfn_kfun_neg_le k l t) - _ = (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * ∫ t : ℝ, 1 / ((1 + (t - -P.tau T k) ^ 2) * (1 + (t - -P.tau T l) ^ 2)) := - integral_const_mul _ _ - _ ≤ (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * (32 * Real.pi / (1 + (-P.tau T k - -P.tau T l) ^ 2)) := - mul_le_mul_of_nonneg_left (cauchyConv_integral_le' _ _) (by positivity) - _ = _ := by ring - -theorem abs_sub_tauStar_le (P : Params) (T : ℝ) (k l : ℤ) (t : ℝ) : - |t - P.tauStar T k l| ≤ (|t - P.tau T k| + |t - P.tau T l|) / 2 := by - have : t - P.tauStar T k l = ((t - P.tau T k) + (t - P.tau T l)) / 2 := by - unfold Params.tauStar; ring - rw [this, abs_div, abs_two] - gcongr - exact abs_add_le _ _ - -theorem abs_add_tauStar_le (P : Params) (T : ℝ) (k l : ℤ) (t : ℝ) : - |t + P.tauStar T k l| ≤ (|t + P.tau T k| + |t + P.tau T l|) / 2 := by - have : t + P.tauStar T k l = ((t + P.tau T k) + (t + P.tau T l)) / 2 := by - unfold Params.tauStar; ring - rw [this, abs_div, abs_two] - gcongr - exact abs_add_le _ _ - -/-- **(W6b, pointwise)** (1+|t−τ⋆|)‖H(5/4+it)‖ ≤ (1+C)(1+3C) X^{3/4} L² / ((1+(t−τ_k)²)(1+(t−τ_l)²)). -/ -theorem weighted_norm_Hfn_kfun_le (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : - (1 + |t - P.tauStar T k l|) * ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ (1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / - ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := by - have hC := h.C_nonneg - have hL := h.one_le_L - have hX := h.X_pos - have hXr : 0 ≤ P.X T ^ (3 / 4 : ℝ) := Real.rpow_nonneg hX.le _ - have h1 := h.norm_Hfn_kfun_le k l t - have h2 := h.moment_norm_Hfn_kfun_le k l t - have hts := abs_sub_tauStar_le P T k l t - set D := (1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2) - have hD : 0 < D := by positivity - set N := ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - have hN : 0 ≤ N := norm_nonneg _ - calc (1 + |t - P.tauStar T k l|) * N - ≤ N + (1 / 2) * ((|t - P.tau T k| + |t - P.tau T l|) * N) := by nlinarith - _ ≤ (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / D - + (1 / 2) * (4 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T / D) := by gcongr - _ = ((1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 + 2 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T) / D := by - ring - _ ≤ ((1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2) / D := by - gcongr - nlinarith [mul_nonneg (mul_nonneg (mul_nonneg hC (by linarith : (0:ℝ) ≤ 1 + C)) hXr) - (mul_nonneg (by linarith : (0:ℝ) ≤ P.L T) (sub_nonneg.mpr hL))] - -/-- **(W6b, pointwise, mirrored)** (1+|t+τ⋆|)‖H_{k∘neg}(5/4+it)‖ ≤ (1+C)(1+3C) X^{3/4} L² / (…). -/ -theorem weighted_norm_Hfn_kfun_neg_le (h : WindowAt P T C) (k l : ℤ) (t : ℝ) : - (1 + |t + P.tauStar T k l|) * ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ (1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / - ((1 + (t + P.tau T k) ^ 2) * (1 + (t + P.tau T l) ^ 2)) := by - have hC := h.C_nonneg - have hL := h.one_le_L - have hX := h.X_pos - have hXr : 0 ≤ P.X T ^ (3 / 4 : ℝ) := Real.rpow_nonneg hX.le _ - have h1 := h.norm_Hfn_kfun_neg_le k l t - have h2 := h.moment_norm_Hfn_kfun_neg_le k l t - have hts := abs_add_tauStar_le P T k l t - set D := (1 + (t + P.tau T k) ^ 2) * (1 + (t + P.tau T l) ^ 2) - have hD : 0 < D := by positivity - set N := ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - have hN : 0 ≤ N := norm_nonneg _ - calc (1 + |t + P.tauStar T k l|) * N - ≤ N + (1 / 2) * ((|t + P.tau T k| + |t + P.tau T l|) * N) := by nlinarith - _ ≤ (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / D - + (1 / 2) * (4 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T / D) := by gcongr - _ = ((1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 + 2 * C * (1 + C) * P.X T ^ (3 / 4 : ℝ) * P.L T) / D := by - ring - _ ≤ ((1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2) / D := by - gcongr - nlinarith [mul_nonneg (mul_nonneg (mul_nonneg hC (by linarith : (0:ℝ) ≤ 1 + C)) hXr) - (mul_nonneg (by linarith : (0:ℝ) ≤ P.L T) (sub_nonneg.mpr hL))] - -theorem integrable_weighted_norm_Hfn_kfun (h : WindowAt P T C) (k l : ℤ) : - Integrable (fun t : ℝ => (1 + |t - P.tauStar T k l|) * ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖) := by - refine ((cauchyConv_integrable (P.tau T k) (P.tau T l)).const_mul - ((1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2)).mono' - (((continuous_const.add (by fun_prop)).mul (h.continuous_Hfn_kfun k l).norm).aestronglyMeasurable) - (Eventually.of_forall fun t => ?_) - rw [Real.norm_eq_abs, abs_of_nonneg (by positivity), mul_one_div] - exact h.weighted_norm_Hfn_kfun_le k l t - -theorem integrable_weighted_norm_Hfn_kfun_neg (h : WindowAt P T C) (k l : ℤ) : - Integrable (fun t : ℝ => - (1 + |t + P.tauStar T k l|) * ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖) := by - refine ((cauchyConv_integrable (-P.tau T k) (-P.tau T l)).const_mul - ((1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2)).mono' - (((continuous_const.add (by fun_prop)).mul (h.continuous_Hfn_kfun_neg k l).norm).aestronglyMeasurable) - (Eventually.of_forall fun t => ?_) - rw [Real.norm_eq_abs, abs_of_nonneg (by positivity), mul_one_div, sub_neg_eq_add, sub_neg_eq_add] - exact h.weighted_norm_Hfn_kfun_neg_le k l t - -/-- **(W6b)** ∫(1+|t−τ⋆|)‖H(5/4+it)‖dt ≤ 32π(1+C)(1+3C) X^{3/4} L² / (1+(τ_k−τ_l)²). -/ -theorem integral_weighted_norm_Hfn_kfun_le (h : WindowAt P T C) (k l : ℤ) : - ∫ t : ℝ, (1 + |t - P.tauStar T k l|) * ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ 32 * Real.pi * ((1 + C) * (1 + 3 * C)) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - / (1 + (P.tau T k - P.tau T l) ^ 2) := by - have hC := h.C_nonneg - have hL := h.L_pos - have hX := h.X_pos - calc ∫ t : ℝ, (1 + |t - P.tauStar T k l|) * ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ ∫ t : ℝ, (1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * (1 / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2))) := - integral_mono_of_nonneg (Eventually.of_forall fun _ => by positivity) - ((cauchyConv_integrable _ _).const_mul _) - (Eventually.of_forall fun t => by beta_reduce; rw [mul_one_div]; exact h.weighted_norm_Hfn_kfun_le k l t) - _ = (1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * ∫ t : ℝ, 1 / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := - integral_const_mul _ _ - _ ≤ (1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * (32 * Real.pi / (1 + (P.tau T k - P.tau T l) ^ 2)) := - mul_le_mul_of_nonneg_left (cauchyConv_integral_le' _ _) (by positivity) - _ = _ := by ring - -/-- **(W6b, mirrored)** ∫(1+|t+τ⋆|)‖H_{k∘neg}(5/4+it)‖dt ≤ 32π(1+C)(1+3C) X^{3/4} L² / (1+(τ_k−τ_l)²). -/ -theorem integral_weighted_norm_Hfn_kfun_neg_le (h : WindowAt P T C) (k l : ℤ) : - ∫ t : ℝ, (1 + |t + P.tauStar T k l|) * ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ 32 * Real.pi * ((1 + C) * (1 + 3 * C)) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - / (1 + (P.tau T k - P.tau T l) ^ 2) := by - have hC := h.C_nonneg - have hL := h.L_pos - have hX := h.X_pos - calc ∫ t : ℝ, (1 + |t + P.tauStar T k l|) * ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ ∫ t : ℝ, (1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * (1 / ((1 + (t - -P.tau T k) ^ 2) * (1 + (t - -P.tau T l) ^ 2))) := - integral_mono_of_nonneg (Eventually.of_forall fun _ => by positivity) - ((cauchyConv_integrable _ _).const_mul _) - (Eventually.of_forall fun t => by - beta_reduce; rw [mul_one_div, sub_neg_eq_add, sub_neg_eq_add] - exact h.weighted_norm_Hfn_kfun_neg_le k l t) - _ = (1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * ∫ t : ℝ, 1 / ((1 + (t - -P.tau T k) ^ 2) * (1 + (t - -P.tau T l) ^ 2)) := - integral_const_mul _ _ - _ ≤ (1 + C) * (1 + 3 * C) * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 - * (32 * Real.pi / (1 + (-P.tau T k - -P.tau T l) ^ 2)) := - mul_le_mul_of_nonneg_left (cauchyConv_integral_le' _ _) (by positivity) - _ = _ := by ring - /-! ### far region: |t − τ⋆| ≥ 3τ⋆/4 (τ⋆ = (τ_k+τ_l)/2, T ≤ τ_k, τ_l ≤ 2T) -/ -/-- for 0 ≤ k < d: T ≤ τ_k ≤ 2T (τ_k = T + k·2π/L, d = ⌊LT/2π⌋). -/ -theorem tau_mem_Icc (h : WindowAt P T C) (k : Fin (P.d T)) : - T ≤ P.tau T (k : ℤ) ∧ P.tau T (k : ℤ) ≤ 2 * T := by - have hL := h.L_pos - have hT := h.T_pos - have hh : 0 < P.hgrid T := by unfold Params.hgrid; positivity - have hk0 : (0 : ℝ) ≤ ((k : ℤ) : ℝ) := by exact_mod_cast (Int.natCast_nonneg _) - have hkd : ((k : ℤ) : ℝ) ≤ (P.d T : ℝ) := by - have : ((k : ℕ) : ℝ) ≤ (P.d T : ℝ) := by exact_mod_cast k.2.le - exact_mod_cast this - have hd : (P.d T : ℝ) ≤ P.L T * T / (2 * Real.pi) := by - unfold Params.d; exact Nat.floor_le (by positivity) - constructor - · show T ≤ T + ((k : ℤ) : ℝ) * P.hgrid T - nlinarith - · show T + ((k : ℤ) : ℝ) * P.hgrid T ≤ 2 * T - have : ((k : ℤ) : ℝ) * P.hgrid T ≤ (P.L T * T / (2 * Real.pi)) * P.hgrid T := - mul_le_mul_of_nonneg_right (hkd.trans hd) hh.le - have hgrid : (P.L T * T / (2 * Real.pi)) * P.hgrid T = T := by - unfold Params.hgrid; field_simp - linarith - -theorem far_subset {τk τl T : ℝ} (hk1 : T ≤ τk) (hk2 : τk ≤ 2 * T) (hl1 : T ≤ τl) (hl2 : τl ≤ 2 * T) : - {t : ℝ | 3 * ((τk + τl) / 2) / 4 ≤ |t - (τk + τl) / 2|} ⊆ {t : ℝ | T / 4 ≤ |t - τk|} := by - intro t ht - simp only [mem_setOf_eq] at ht ⊢ - have h1 : |t - (τk + τl) / 2| ≤ |t - τk| + |τk - (τk + τl) / 2| := abs_sub_le _ _ _ - have h2 : |τk - (τk + τl) / 2| ≤ T / 2 := by - rw [abs_le]; constructor <;> linarith - linarith - -theorem far_subset_neg {τk τl T : ℝ} (hk1 : T ≤ τk) (hk2 : τk ≤ 2 * T) (hl1 : T ≤ τl) (hl2 : τl ≤ 2 * T) : - {t : ℝ | 3 * ((τk + τl) / 2) / 4 ≤ |t + (τk + τl) / 2|} ⊆ {t : ℝ | T / 4 ≤ |t - -τk|} := by - intro t ht - simp only [mem_setOf_eq] at ht ⊢ - have h1 : |t - -((τk + τl) / 2)| ≤ |t - -τk| + |-τk - -((τk + τl) / 2)| := abs_sub_le _ _ _ - have h2 : |-τk - -((τk + τl) / 2)| ≤ T / 2 := by - rw [abs_le]; constructor <;> linarith - rw [sub_neg_eq_add] at h1 - linarith - -/-- **(W6c)** far from the bump: ∫_{|t−τ⋆| ≥ 3τ⋆/4} ‖H(5/4+it)‖ dt ≤ 16π (1+C)² X^{3/4} L² / T², -for T ≤ τ_k, τ_l ≤ 2T (tau_mem_Icc). -/ -theorem setIntegral_far_norm_Hfn_kfun_le (h : WindowAt P T C) {k l : ℤ} - (hk1 : T ≤ P.tau T k) (hk2 : P.tau T k ≤ 2 * T) (hl1 : T ≤ P.tau T l) (hl2 : P.tau T l ≤ 2 * T) : - ∫ t in {t : ℝ | 3 * P.tauStar T k l / 4 ≤ |t - P.tauStar T k l|}, - ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ 16 * Real.pi * (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / T ^ 2 := by - have hC := h.C_nonneg - have hL := h.L_pos - have hX := h.X_pos - have hT := h.T_pos - set K := (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 with hK - have hK0 : 0 ≤ K := by positivity - have hsub := far_subset hk1 hk2 hl1 hl2 - have hg : Integrable (fun t : ℝ => K * (1 / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)))) := - (cauchyConv_integrable _ _).const_mul K - calc ∫ t in {t : ℝ | 3 * P.tauStar T k l / 4 ≤ |t - P.tauStar T k l|}, - ‖Hfn (kfun P T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ ∫ t in {t : ℝ | 3 * P.tauStar T k l / 4 ≤ |t - P.tauStar T k l|}, - K * (1 / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2))) := - setIntegral_mono_on (h.integrable_Hfn_kfun k l).norm.integrableOn hg.integrableOn - (measurableSet_far _ _) (fun t _ => by rw [mul_one_div]; exact h.norm_Hfn_kfun_le k l t) - _ ≤ ∫ t in {t : ℝ | T / 4 ≤ |t - P.tau T k|}, - K * (1 / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2))) := - setIntegral_mono_set hg.integrableOn - (Eventually.of_forall fun t => by simp only [Pi.zero_apply]; positivity) - (HasSubset.Subset.eventuallyLE (by unfold Params.tauStar; exact hsub)) - _ = K * ∫ t in {t : ℝ | T / 4 ≤ |t - P.tau T k|}, - 1 / ((1 + (t - P.tau T k) ^ 2) * (1 + (t - P.tau T l) ^ 2)) := integral_const_mul _ _ - _ ≤ K * (Real.pi / (T / 4) ^ 2) := - mul_le_mul_of_nonneg_left (cauchyConv_far _ _ (by positivity)) hK0 - _ = 16 * Real.pi * (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / T ^ 2 := by - rw [hK]; field_simp; ring - -/-- **(W6c, mirrored)** ∫_{|t+τ⋆| ≥ 3τ⋆/4} ‖H_{k∘neg}(5/4+it)‖ dt ≤ 16π (1+C)² X^{3/4} L² / T². -/ -theorem setIntegral_far_norm_Hfn_kfun_neg_le (h : WindowAt P T C) {k l : ℤ} - (hk1 : T ≤ P.tau T k) (hk2 : P.tau T k ≤ 2 * T) (hl1 : T ≤ P.tau T l) (hl2 : P.tau T l ≤ 2 * T) : - ∫ t in {t : ℝ | 3 * P.tauStar T k l / 4 ≤ |t + P.tauStar T k l|}, - ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ 16 * Real.pi * (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / T ^ 2 := by - have hC := h.C_nonneg - have hL := h.L_pos - have hX := h.X_pos - have hT := h.T_pos - set K := (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 with hK - have hK0 : 0 ≤ K := by positivity - have hsub := far_subset_neg hk1 hk2 hl1 hl2 - have hg : Integrable (fun t : ℝ => - K * (1 / ((1 + (t - -P.tau T k) ^ 2) * (1 + (t - -P.tau T l) ^ 2)))) := - (cauchyConv_integrable _ _).const_mul K - calc ∫ t in {t : ℝ | 3 * P.tauStar T k l / 4 ≤ |t + P.tauStar T k l|}, - ‖Hfn (fun u => kfun P T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ ∫ t in {t : ℝ | 3 * P.tauStar T k l / 4 ≤ |t + P.tauStar T k l|}, - K * (1 / ((1 + (t - -P.tau T k) ^ 2) * (1 + (t - -P.tau T l) ^ 2))) := by - refine setIntegral_mono_on (h.integrable_Hfn_kfun_neg k l).norm.integrableOn hg.integrableOn - ?_ (fun t _ => by - rw [mul_one_div, sub_neg_eq_add, sub_neg_eq_add]; exact h.norm_Hfn_kfun_neg_le k l t) - have := measurableSet_far (-P.tauStar T k l) (3 * P.tauStar T k l / 4) - simp only [sub_neg_eq_add] at this - exact this - _ ≤ ∫ t in {t : ℝ | T / 4 ≤ |t - -P.tau T k|}, - K * (1 / ((1 + (t - -P.tau T k) ^ 2) * (1 + (t - -P.tau T l) ^ 2))) := - setIntegral_mono_set hg.integrableOn - (Eventually.of_forall fun t => by simp only [Pi.zero_apply]; positivity) - (HasSubset.Subset.eventuallyLE (by unfold Params.tauStar; exact hsub)) - _ = K * ∫ t in {t : ℝ | T / 4 ≤ |t - -P.tau T k|}, - 1 / ((1 + (t - -P.tau T k) ^ 2) * (1 + (t - -P.tau T l) ^ 2)) := integral_const_mul _ _ - _ ≤ K * (Real.pi / (T / 4) ^ 2) := - mul_le_mul_of_nonneg_left (cauchyConv_far _ _ (by positivity)) hK0 - _ = 16 * Real.pi * (1 + C) ^ 2 * P.X T ^ (3 / 4 : ℝ) * P.L T ^ 2 / T ^ 2 := by - rw [hK]; field_simp; ring - end WindowAt end TestWeight @@ -1015,13 +513,6 @@ theorem testWeight_regular (hPf : FamilyHyps Pf) : ⟨⟨h.kfun_contDiff k l, h.kfun_hasCompactSupport k l, h.kfun_tsupport k l⟩, ⟨h.kfun_neg_contDiff k l, h.kfun_neg_hasCompactSupport k l, h.kfun_neg_tsupport k l⟩⟩⟩ -/-- **[XF′ Lemma 3.1]** for the family: h_k(z) = φ̂(z−τ_k) φ̂(z−τ_l), all complex z, eventually in T. -/ -theorem testWeight_paperFT (hPf : FamilyHyps Pf) : - ∃ T₁ : ℝ, ∀ T : ℝ, T₁ ≤ T → ∀ (k l : ℤ) (z : ℂ), - paperFT (kfun (Pf T) T k l) z = (Pf T).phiHat T (z - (Pf T).tau T k) * (Pf T).phiHat T (z - (Pf T).tau T l) := by - obtain ⟨C, T₁, -, hW⟩ := hPf.windowAt - exact ⟨T₁, fun T hT k l z => (hW T hT).paperFT_kfun k l z⟩ - /-- **(W1)** size on the line Re s = 5/4. -/ theorem testWeight_norm_le (hPf : FamilyHyps Pf) : ∃ C T₁ : ℝ, 0 < C ∧ ∀ T : ℝ, T₁ ≤ T → ∀ (k l : ℤ) (t : ℝ), @@ -1067,69 +558,6 @@ theorem testWeight_neg_norm_le (hPf : FamilyHyps Pf) : apply mul_le_mul_of_nonneg_right _ hXr nlinarith [sq_nonneg (1 + C)] -/-- **(W4)** on the real line: real-valued product formula, integrable, ∫‖·‖ ≤ C L²/(1+(τ_k−τ_l)²). -/ -theorem testWeight_real_line (hPf : FamilyHyps Pf) : - ∃ C T₁ : ℝ, 0 < C ∧ ∀ T : ℝ, T₁ ≤ T → ∀ k l : ℤ, - (∀ τ : ℝ, paperFT (kfun (Pf T) T k l) τ - = (((Pf T).phiHatR T (τ - (Pf T).tau T k) * (Pf T).phiHatR T (τ - (Pf T).tau T l) : ℝ) : ℂ)) ∧ - Integrable (fun τ : ℝ => paperFT (kfun (Pf T) T k l) τ) ∧ - ∫ τ : ℝ, ‖paperFT (kfun (Pf T) T k l) τ‖ - ≤ C * (Pf T).L T ^ 2 / (1 + ((Pf T).tau T k - (Pf T).tau T l) ^ 2) := by - obtain ⟨C, T₁, hC, hW⟩ := hPf.windowAt - exact ⟨32 * Real.pi * (1 + C) ^ 2, T₁, by positivity, fun T hT k l => - ⟨(hW T hT).paperFT_kfun_ofReal k l, (hW T hT).integrable_paperFT_kfun_ofReal k l, - (hW T hT).integral_norm_paperFT_kfun_ofReal_le k l⟩⟩ - -/-- **(W6)** for the family: integrability, ∫‖H‖, ∫(1+|t−τ⋆|)‖H‖ ≤ C X^{3/4}L²/(1+Δ²), and the far tail -≤ C X^{3/4} L²/T² (for T ≤ τ_k, τ_l ≤ 2T); plus the same four for the mirrored weight around −τ⋆. -/ -theorem testWeight_integrals (hPf : FamilyHyps Pf) : - ∃ C T₁ : ℝ, 0 < C ∧ ∀ T : ℝ, T₁ ≤ T → ∀ k l : ℤ, - Integrable (fun t : ℝ => Hfn (kfun (Pf T) T k l) ((5 / 4 : ℂ) + t * I)) ∧ - Integrable (fun t : ℝ => Hfn (fun u => kfun (Pf T) T k l (-u)) ((5 / 4 : ℂ) + t * I)) ∧ - ∫ t : ℝ, ‖Hfn (kfun (Pf T) T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ C * (Pf T).X T ^ (3 / 4 : ℝ) * (Pf T).L T ^ 2 / (1 + ((Pf T).tau T k - (Pf T).tau T l) ^ 2) ∧ - ∫ t : ℝ, ‖Hfn (fun u => kfun (Pf T) T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ C * (Pf T).X T ^ (3 / 4 : ℝ) * (Pf T).L T ^ 2 / (1 + ((Pf T).tau T k - (Pf T).tau T l) ^ 2) ∧ - ∫ t : ℝ, (1 + |t - (Pf T).tauStar T k l|) * ‖Hfn (kfun (Pf T) T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ C * (Pf T).X T ^ (3 / 4 : ℝ) * (Pf T).L T ^ 2 / (1 + ((Pf T).tau T k - (Pf T).tau T l) ^ 2) ∧ - ∫ t : ℝ, (1 + |t + (Pf T).tauStar T k l|) - * ‖Hfn (fun u => kfun (Pf T) T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ C * (Pf T).X T ^ (3 / 4 : ℝ) * (Pf T).L T ^ 2 / (1 + ((Pf T).tau T k - (Pf T).tau T l) ^ 2) ∧ - (T ≤ (Pf T).tau T k → (Pf T).tau T k ≤ 2 * T → T ≤ (Pf T).tau T l → (Pf T).tau T l ≤ 2 * T → - ∫ t in {t : ℝ | 3 * (Pf T).tauStar T k l / 4 ≤ |t - (Pf T).tauStar T k l|}, - ‖Hfn (kfun (Pf T) T k l) ((5 / 4 : ℂ) + t * I)‖ - ≤ C * (Pf T).X T ^ (3 / 4 : ℝ) * (Pf T).L T ^ 2 / T ^ 2 ∧ - ∫ t in {t : ℝ | 3 * (Pf T).tauStar T k l / 4 ≤ |t + (Pf T).tauStar T k l|}, - ‖Hfn (fun u => kfun (Pf T) T k l (-u)) ((5 / 4 : ℂ) + t * I)‖ - ≤ C * (Pf T).X T ^ (3 / 4 : ℝ) * (Pf T).L T ^ 2 / T ^ 2) := by - obtain ⟨C, T₁, hC, hW⟩ := hPf.windowAt - -- one constant dominating 32π(1+C)², 32π(1+C)(1+3C), 16π(1+C)²: - refine ⟨32 * Real.pi * ((1 + C) * (1 + 3 * C)), T₁, by positivity, fun T hT k l => ?_⟩ - have h := hW T hT - have hX := h.X_pos - have hL := h.L_pos - have hT0 := h.T_pos - have hXr : 0 ≤ (Pf T).X T ^ (3 / 4 : ℝ) := Real.rpow_nonneg hX.le _ - have hcc : (1 + C) ^ 2 ≤ (1 + C) * (1 + 3 * C) := by nlinarith - have hc1 : 32 * Real.pi * (1 + C) ^ 2 ≤ 32 * Real.pi * ((1 + C) * (1 + 3 * C)) := - mul_le_mul_of_nonneg_left hcc (by positivity) - have hc2 : 16 * Real.pi * (1 + C) ^ 2 ≤ 32 * Real.pi * ((1 + C) * (1 + 3 * C)) := by - nlinarith [mul_nonneg Real.pi_pos.le (sq_nonneg (1 + C))] - refine ⟨h.integrable_Hfn_kfun k l, h.integrable_Hfn_kfun_neg k l, ?_, ?_, - h.integral_weighted_norm_Hfn_kfun_le k l, h.integral_weighted_norm_Hfn_kfun_neg_le k l, - fun hk1 hk2 hl1 hl2 => ⟨?_, ?_⟩⟩ - · exact (h.integral_norm_Hfn_kfun_le k l).trans (by gcongr) - · exact (h.integral_norm_Hfn_kfun_neg_le k l).trans (by gcongr) - · exact (h.setIntegral_far_norm_Hfn_kfun_le hk1 hk2 hl1 hl2).trans (by gcongr) - · exact (h.setIntegral_far_norm_Hfn_kfun_neg_le hk1 hk2 hl1 hl2).trans (by gcongr) - -/-- (W6, indices) for a Fin d index the hypothesis T ≤ τ_k ≤ 2T of the far-tail bound holds eventually. -/ -theorem testWeight_tau_mem_Icc (hPf : FamilyHyps Pf) : - ∃ T₁ : ℝ, ∀ T : ℝ, T₁ ≤ T → ∀ k : Fin ((Pf T).d T), - T ≤ (Pf T).tau T (k : ℤ) ∧ (Pf T).tau T (k : ℤ) ≤ 2 * T := by - obtain ⟨C, T₁, -, hW⟩ := hPf.windowAt - exact ⟨T₁, fun T hT k => (hW T hT).tau_mem_Icc k⟩ - end Family end XiPrime diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/XiEFAssembly.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/XiEFAssembly.lean index cf03915a10..4668f1b90d 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/XiEFAssembly.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/XiEFAssembly.lean @@ -14,7 +14,6 @@ Jcorr_estimate (Expansion + EntryError + DirichletLine), prime_term_complex (Pri FamilyHyps.perT / pow_log_absorb (FamilyFacts). -/ import Zeta23.XiPrime.ExplicitFormula.ZeroFree -import Zeta23.XiPrime.ExplicitFormula.FullLine import Zeta23.XiPrime.ExplicitFormula.JTerm import Zeta23.XiPrime.ExplicitFormula.PrimeTermJ import Zeta23.XiPrime.ExplicitFormula.FamilyFacts diff --git a/zeta23/Zeta23/XiPrime/ExplicitFormula/ZeroFree.lean b/zeta23/Zeta23/XiPrime/ExplicitFormula/ZeroFree.lean index 9b486018e8..9a840bdc5b 100644 --- a/zeta23/Zeta23/XiPrime/ExplicitFormula/ZeroFree.lean +++ b/zeta23/Zeta23/XiPrime/ExplicitFormula/ZeroFree.lean @@ -35,10 +35,6 @@ ROUTE (Hadamard-free; no product formula for ξ is used). Fix s with ξ(s) ≠ ξ′(s) = ξ(s)·ξ′/ξ(s) ≠ 0; σ ≤ 0 follows from ξ′(1−s) = −ξ′(s) (Seam.xiDeriv_one_sub). -/ import Zeta23.XiPrime.ExplicitFormula -import Zeta23.WeilEF.ZeroSumLimit -import Zeta23.GammaFacts.StirlingVert -import Zeta23.GammaFacts.Series -import Zeta23.GammaFacts.Complete import Zeta23.RvM.Statement import Zeta23.Assembly @@ -114,19 +110,21 @@ theorem isBigO_mul_near_weightPole {F g : ℂ → ℂ} {q r : ℂ} (hF : Differe simpa only [Pi.one_apply, mul_one, Pi.one_def] using this have h2 : (fun s => r * ((F s - F q) / (s - q))) =O[𝓝[≠] q] (1 : ℂ → ℂ) := (hslope.const_mul r).isBigO_one ℂ - refine (h1.add h2).congr' ?_ EventuallyEq.rfl - filter_upwards [self_mem_nhdsWithin] with s hs - have hsq : s - q ≠ 0 := sub_ne_zero.mpr hs - simp only [Pi.sub_apply] - field_simp - ring + have hcongr : (fun s => (g - fun s => r / (s - q)) s * F s + r * ((F s - F q) / (s - q))) + =ᶠ[𝓝[≠] q] ((fun s => g s * F s) - fun s => r * F q / (s - q)) := by + filter_upwards [self_mem_nhdsWithin] with s hs + have hsq : s - q ≠ 0 := sub_ne_zero.mpr hs + simp only [Pi.sub_apply] + field_simp + ring + exact (h1.add h2).congr' hcongr EventuallyEq.rfl /-- **Weighted argument principle with a meromorphic weight.** f analytic on a neighbourhood of every point of the closed rectangle and nonvanishing on its border, Z its (finite) zero set there; g analytic on the rectangle off a finite set Q of interior points, disjoint from Z, with principal part r q/(· − q) at q ∈ Q. Then (1/2πi)∮ g·f′/f = Σ_{ρ∈Z} ord_ρ(f)·g(ρ) + Σ_{q∈Q} r q·(f′/f)(q). -/ -theorem rectangleIntegral'_mul_logDeriv_weightPoles {f g : ℂ → ℂ} {z w : ℂ} (hre : z.re ≤ w.re) +theorem rectangleIntegral_mul_logDeriv_weightPoles {f g : ℂ → ℂ} {z w : ℂ} (hre : z.re ≤ w.re) (him : z.im ≤ w.im) (Z Q : Finset ℂ) (hZQ : Disjoint Z Q) (hQint : ∀ q ∈ Q, Rectangle z w ∈ 𝓝 q) (hf : AnalyticOnNhd ℂ f (Rectangle z w)) @@ -153,35 +151,17 @@ theorem rectangleIntegral'_mul_logDeriv_weightPoles {f g : ℂ → ℂ} {z w : have hord : ∀ ρ ∈ Z, analyticOrderAt f ρ ≠ ⊤ := fun ρ hρ => hf.analyticOrderAt_ne_top_of_isPreconnected hpre hzR (hZsub hρ) hordz -- zeros are interior points - have hZint : ∀ ρ ∈ Z, Rectangle z w ∈ 𝓝 ρ := by - intro ρ hρ - have hρR : ρ ∈ Rectangle z w := hZsub hρ - have hρB : ρ ∉ RectangleBorder z w := fun h => hborder ρ h ((hZ ρ hρR).mpr hρ) - obtain ⟨h1, h2⟩ := hρR - have h1' : z.re ≤ ρ.re ∧ ρ.re ≤ w.re := by simpa [uIcc_of_le hre] using h1 - have h2' : z.im ≤ ρ.im ∧ ρ.im ≤ w.im := by simpa [uIcc_of_le him] using h2 - simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, not_or] at hρB - obtain ⟨⟨⟨hb1, hb2⟩, hb3⟩, hb4⟩ := hρB - rw [rectangle_mem_nhds_iff, mem_reProdIm, uIoo_of_le hre, uIoo_of_le him] - refine ⟨⟨lt_of_le_of_ne h1'.1 (fun h => hb2 ⟨h.symm, h2⟩), - lt_of_le_of_ne h1'.2 (fun h => hb4 ⟨h, h2⟩)⟩, - ⟨lt_of_le_of_ne h2'.1 (fun h => hb1 ⟨h1, h.symm⟩), - lt_of_le_of_ne h2'.2 (fun h => hb3 ⟨h1, h⟩)⟩⟩ + have hZint : ∀ ρ ∈ Z, Rectangle z w ∈ 𝓝 ρ := fun ρ hρ => + rectangle_mem_nhds_of_mem_of_not_mem_border hre him (hZsub hρ) + (fun h => hborder ρ h ((hZ ρ (hZsub hρ)).mpr hρ)) -- residues: ord·g at zeros of f, r·f′/f at poles of g let A : ℂ → ℂ := fun p => if p ∈ Q then r p * logDeriv f p else (analyticOrderNatAt f p : ℂ) * g p have hint : ∀ p ∈ Z ∪ Q, Rectangle z w ∈ 𝓝 p := by intro p hp rcases Finset.mem_union.mp hp with hp | hp exacts [hZint p hp, hQint p hp] - have key := Zeta23.Analytic.residueTheorem_finset (f := fun s => g s * logDeriv f s) hre him - (Z ∪ Q) A hint ?holo ?near - · rw [key, Finset.sum_union hZQ] - have hZsum : ∑ p ∈ Z, A p = ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) * g ρ := - Finset.sum_congr rfl (fun p hp => by simp [A, hZnotQ p hp]) - have hQsum : ∑ p ∈ Q, A p = ∑ q ∈ Q, r q * logDeriv f q := - Finset.sum_congr rfl (fun p hp => by simp [A, hp]) - rw [hZsum, hQsum] - case holo => + have hholo : DifferentiableOn ℂ (fun s => g s * logDeriv f s) + (Rectangle z w \ ((Z ∪ Q : Finset ℂ) : Set ℂ)) := by intro s hs have hsQ : s ∉ Q := fun h => hs.2 (by simp [h]) have hsZ : s ∉ Z := fun h => hs.2 (by simp [h]) @@ -191,7 +171,8 @@ theorem rectangleIntegral'_mul_logDeriv_weightPoles {f g : ℂ → ℂ} {z w : apply DifferentiableAt.differentiableWithinAt show DifferentiableAt ℂ (fun s => g s * (deriv f s / f s)) s exact hga.differentiableAt.mul (hfa.deriv.differentiableAt.div hfa.differentiableAt hfs) - case near => + have hnear_all : ∀ p ∈ Z ∪ Q, + ((fun s => g s * logDeriv f s) - fun s => A p / (s - p)) =O[𝓝[≠] p] (1 : ℂ → ℂ) := by intro p hp rcases Finset.mem_union.mp hp with hρ | hq · have hA : A p = (analyticOrderNatAt f p : ℂ) * g p := by simp [A, hZnotQ p hρ] @@ -208,6 +189,14 @@ theorem rectangleIntegral'_mul_logDeriv_weightPoles {f g : ℂ → ℂ} {z w : exact hfa.deriv.differentiableAt.div hfa.differentiableAt hfp rw [hA] exact isBigO_mul_near_weightPole (F := logDeriv f) hF (hnear p hq) + have key := Zeta23.Analytic.residueTheorem_finset (f := fun s => g s * logDeriv f s) hre him + (Z ∪ Q) A hint hholo hnear_all + rw [key, Finset.sum_union hZQ] + have hZsum : ∑ p ∈ Z, A p = ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) * g ρ := + Finset.sum_congr rfl (fun p hp => by simp [A, hZnotQ p hp]) + have hQsum : ∑ p ∈ Q, A p = ∑ q ∈ Q, r q * logDeriv f q := + Finset.sum_congr rfl (fun p hp => by simp [A, hp]) + rw [hZsum, hQsum] /-- **ML bound** for a rectangle integral: ‖∮ f‖ ≤ (sup_border ‖f‖) · (perimeter). -/ theorem norm_rectangleIntegral_le {f : ℂ → ℂ} {z w : ℂ} (hre : z.re ≤ w.re) (him : z.im ≤ w.im) @@ -319,34 +308,6 @@ theorem logDeriv_xi_reflect (s : ℂ) : logDeriv xi (reflect s) = -conj (logDeri /-! ## §C. Growth of ξ′/ξ on the contour -/ -/-- ψ is differentiable (in particular continuous) on the open right half-plane -(Γ analytic and nonvanishing there; as in Zeta23.WeilEF.digamma_growth_strip). -/ -theorem differentiableAt_digamma {s : ℂ} (hs : 0 < s.re) : - DifferentiableAt ℂ Complex.digamma s := by - have hzero : ∀ m : ℕ, s ≠ -(m : ℂ) := by - intro m h - rw [h] at hs - simp only [Complex.neg_re, Complex.natCast_re] at hs - nlinarith [Nat.cast_nonneg (α := ℝ) m] - have hopen : IsOpen {w : ℂ | 0 < w.re} := isOpen_lt continuous_const Complex.continuous_re - have hΓan : AnalyticAt ℂ Complex.Gamma s := by - rw [Complex.analyticAt_iff_eventually_differentiableAt] - filter_upwards [hopen.mem_nhds hs] with w hw - refine Complex.differentiableAt_Gamma w fun m => ?_ - intro h - rw [h] at hw - simp only [Complex.neg_re, Complex.natCast_re] at hw - nlinarith [Nat.cast_nonneg (α := ℝ) m] - have hΓne : Complex.Gamma s ≠ 0 := Complex.Gamma_ne_zero hzero - have hψan : AnalyticAt ℂ Complex.digamma s := by - have h1 : AnalyticAt ℂ (deriv Complex.Gamma) s := hΓan.deriv - have h2 := h1.div hΓan hΓne - exact h2.congr (by - filter_upwards with w - rw [Complex.digamma_def, logDeriv_apply] - rfl) - exact hψan.differentiableAt - /-- iterated functional equation: ψ(z + n) = ψ(z) + Σ_{k 0). -/ theorem digamma_add_nat {z : ℂ} (hz : 0 < z.re) (n : ℕ) : Complex.digamma (z + n) = Complex.digamma z + ∑ k ∈ Finset.range n, 1 / (z + k) := by @@ -362,135 +323,64 @@ theorem digamma_add_nat {z : ℂ} (hz : 0 < z.re) (n : ℕ) : one_div] ring -/-- ψ grows logarithmically on Re z ≥ 1/2: Stirling (Zeta23.StirlingVert.digamma_stirling) for -|Im z| ≥ 1/2; for |Im z| < 1/2 shift z back into the compact box [1/2,3/2] × [−1/2,1/2] with the -functional equation and bound the harmonic-type sum by 2(1 + log n). -/ +/-- ψ grows logarithmically on Re z ≥ 1/2: shift z into `[1/2, 3/2)` via `digamma_add_nat`, +apply `WeilEF.digamma_growth_wide`, and bound the harmonic shift by `2(1 + log(2 + ‖z‖))`. -/ theorem norm_digamma_le : ∃ C : ℝ, 0 < C ∧ ∀ z : ℂ, 1 / 2 ≤ z.re → ‖Complex.digamma z‖ ≤ C * Real.log (2 + ‖z‖) := by - -- the compact box - have hK : IsCompact (Set.Icc (1 / 2 : ℝ) (3 / 2) ×ℂ Set.Icc (-(1 / 2) : ℝ) (1 / 2)) := - isCompact_Icc.reProdIm isCompact_Icc - have hcont : ContinuousOn Complex.digamma (Set.Icc (1 / 2 : ℝ) (3 / 2) ×ℂ Set.Icc (-(1 / 2) : ℝ) (1 / 2)) := by - intro s hs - have : 1 / 2 ≤ s.re := (Complex.mem_reProdIm.mp hs).1.1 - exact (differentiableAt_digamma (by linarith)).continuousAt.continuousWithinAt - obtain ⟨M, hM⟩ := hK.exists_bound_of_continuousOn hcont - have hM0 : 0 ≤ M := le_trans (norm_nonneg _) (hM 1 (by - rw [Complex.mem_reProdIm, Complex.one_re, Complex.one_im, Set.mem_Icc, Set.mem_Icc]; norm_num)) + obtain ⟨Cw, hCw, hwide⟩ := Zeta23.WeilEF.digamma_growth_wide have hlog2 : 0 < Real.log 2 := Real.log_pos one_lt_two - have hlog4 : 0 ≤ Real.log 4 := Real.log_nonneg (by norm_num) - set K₀ : ℝ := 14 + Real.pi + Real.log 4 with hK₀ - have hK₀0 : 0 ≤ K₀ := by have := Real.pi_pos; rw [hK₀]; linarith - refine ⟨(K₀ + M + 4) / Real.log 2 + 2, by positivity, fun z hz => ?_⟩ + refine ⟨Cw + 2 + 2 / Real.log 2, by positivity, fun z hz => ?_⟩ have hL : Real.log 2 ≤ Real.log (2 + ‖z‖) := Real.log_le_log two_pos (by linarith [norm_nonneg z]) have hL0 : 0 < Real.log (2 + ‖z‖) := hlog2.trans_le hL - suffices h : ‖Complex.digamma z‖ ≤ 2 * Real.log (2 + ‖z‖) + (K₀ + M + 4) by - calc ‖Complex.digamma z‖ ≤ 2 * Real.log (2 + ‖z‖) + (K₀ + M + 4) := h - _ = 2 * Real.log (2 + ‖z‖) + ((K₀ + M + 4) / Real.log 2) * Real.log 2 := by field_simp - _ ≤ 2 * Real.log (2 + ‖z‖) + ((K₀ + M + 4) / Real.log 2) * Real.log (2 + ‖z‖) := by - have : 0 ≤ (K₀ + M + 4) / Real.log 2 := by positivity - nlinarith - _ = ((K₀ + M + 4) / Real.log 2 + 2) * Real.log (2 + ‖z‖) := by ring - have hzre0 : 0 < z.re := by linarith - have hnorm_lo : 1 / 2 ≤ ‖z‖ := le_trans hz (le_trans (le_abs_self _) (Complex.abs_re_le_norm z)) - have hnorm0 : 0 < ‖z‖ := by linarith - rcases le_or_gt (1 / 2 : ℝ) |z.im| with him | him - · -- Stirling: ‖ψ‖ ≤ ‖ψ − log z + (1/2)/z‖ + ‖log z‖ + ‖(1/2)/z‖ ≤ 12 + (log 4 + log(2+|z|) + π) + 2 - have hst := Zeta23.StirlingVert.digamma_stirling (w := z) hzre0 him - have hlog_s : ‖Complex.log z‖ ≤ |Real.log ‖z‖| + Real.pi := by - calc ‖Complex.log z‖ ≤ |(Complex.log z).re| + |(Complex.log z).im| := - Complex.norm_le_abs_re_add_abs_im _ - _ ≤ |Real.log ‖z‖| + Real.pi := by - rw [Complex.log_re, Complex.log_im] - have := Complex.abs_arg_le_pi z - linarith - have hlog_abs : |Real.log ‖z‖| ≤ Real.log 4 + Real.log (2 + ‖z‖) := by - rcases le_or_gt (Real.log ‖z‖) 0 with hneg | hpos - · have h1 : Real.log (1 / 4 : ℝ) ≤ Real.log ‖z‖ := Real.log_le_log (by norm_num) (by linarith) - have h2 : Real.log (1 / 4 : ℝ) = -Real.log 4 := by - rw [show (1 / 4 : ℝ) = 4⁻¹ by norm_num, Real.log_inv] - rw [abs_of_nonpos hneg] - linarith - · rw [abs_of_pos hpos] - have h1 : Real.log ‖z‖ ≤ Real.log (2 + ‖z‖) := Real.log_le_log hnorm0 (by linarith) - linarith - have hinv : ‖(1 / 2 : ℂ) / z‖ ≤ 2 := by - rw [norm_div, div_le_iff₀ hnorm0] - have h1 : ‖(1 / 2 : ℂ)‖ = 1 / 2 := by - rw [show (1 / 2 : ℂ) = ((1 / 2 : ℝ) : ℂ) by norm_num, Complex.norm_real, - Real.norm_eq_abs, abs_of_pos (by norm_num)] - rw [h1]; linarith - have him2 : 3 / z.im ^ 2 ≤ 12 := by - have h1 : (1 / 4 : ℝ) ≤ z.im ^ 2 := by nlinarith [abs_nonneg z.im, sq_abs z.im] - rw [div_le_iff₀ (by nlinarith)] - nlinarith - have hsplit : ‖Complex.digamma z‖ - ≤ ‖Complex.digamma z - Complex.log z + (1 / 2 : ℂ) / z‖ + ‖Complex.log z‖ - + ‖(1 / 2 : ℂ) / z‖ := by - have h2 : Complex.digamma z = (Complex.digamma z - Complex.log z + (1 / 2 : ℂ) / z) - + Complex.log z - (1 / 2 : ℂ) / z := by ring - calc ‖Complex.digamma z‖ - = ‖(Complex.digamma z - Complex.log z + (1 / 2 : ℂ) / z) + Complex.log z - - (1 / 2 : ℂ) / z‖ := by rw [← h2] - _ ≤ ‖(Complex.digamma z - Complex.log z + (1 / 2 : ℂ) / z) + Complex.log z‖ - + ‖(1 / 2 : ℂ) / z‖ := norm_sub_le _ _ - _ ≤ _ := by - have := norm_add_le (Complex.digamma z - Complex.log z + (1 / 2 : ℂ) / z) (Complex.log z) - linarith - rw [hK₀] - linarith [hL0] - · -- near the real axis: z = z₀ + n with z₀ in the box - set n : ℕ := ⌊z.re - 1 / 2⌋₊ with hn - set z₀ : ℂ := z - n with hz₀ - have hfl : (n : ℝ) ≤ z.re - 1 / 2 := Nat.floor_le (by linarith) - have hfl2 : z.re - 1 / 2 < n + 1 := Nat.lt_floor_add_one (z.re - 1 / 2) - have hz₀re : z₀.re = z.re - n := by simp [hz₀] - have hz₀im : z₀.im = z.im := by simp [hz₀] - have hz₀B : z₀ ∈ Set.Icc (1 / 2 : ℝ) (3 / 2) ×ℂ Set.Icc (-(1 / 2) : ℝ) (1 / 2) := by - rw [Complex.mem_reProdIm, hz₀re, hz₀im, Set.mem_Icc, Set.mem_Icc] - have := abs_lt.mp him - refine ⟨⟨by linarith, by linarith⟩, by linarith, by linarith⟩ - have hz₀pos : 0 < z₀.re := by rw [hz₀re]; linarith - have hzeq : z = z₀ + n := by simp [hz₀] - have hψ : Complex.digamma z = Complex.digamma z₀ + ∑ k ∈ Finset.range n, 1 / (z₀ + k) := by - rw [hzeq]; exact digamma_add_nat hz₀pos n - have hterm : ∀ k ∈ Finset.range n, ‖1 / (z₀ + (k : ℂ))‖ ≤ 2 * (1 / ((k : ℝ) + 1)) := by - intro k _ - have hre : (z₀ + (k : ℂ)).re = z₀.re + k := by simp - have hpos : 0 < z₀.re + k := by positivity - have hnk : z₀.re + k ≤ ‖z₀ + (k : ℂ)‖ := by - calc z₀.re + k = |(z₀ + (k : ℂ)).re| := by rw [hre, abs_of_pos hpos] - _ ≤ ‖z₀ + (k : ℂ)‖ := Complex.abs_re_le_norm _ - rw [norm_div, norm_one] - calc 1 / ‖z₀ + (k : ℂ)‖ ≤ 1 / (z₀.re + k) := one_div_le_one_div_of_le hpos hnk - _ ≤ 1 / (1 / 2 + k) := one_div_le_one_div_of_le (by positivity) (by linarith [hz₀B.1.1]) - _ ≤ 2 * (1 / ((k : ℝ) + 1)) := by - rw [div_le_iff₀ (by positivity)] - have hk0 : (0 : ℝ) ≤ k := Nat.cast_nonneg k - field_simp - nlinarith - have hlogn : Real.log n ≤ Real.log (2 + ‖z‖) := by - rcases Nat.eq_zero_or_pos n with h0 | hpos - · rw [h0, Nat.cast_zero, Real.log_zero]; exact hL0.le - · apply Real.log_le_log (by exact_mod_cast hpos) - have : z.re ≤ ‖z‖ := le_trans (le_abs_self _) (Complex.abs_re_le_norm z) - linarith - have hsum : ‖∑ k ∈ Finset.range n, 1 / (z₀ + (k : ℂ))‖ ≤ 2 * (1 + Real.log (2 + ‖z‖)) := by - calc ‖∑ k ∈ Finset.range n, 1 / (z₀ + (k : ℂ))‖ - ≤ ∑ k ∈ Finset.range n, ‖1 / (z₀ + (k : ℂ))‖ := norm_sum_le _ _ - _ ≤ ∑ k ∈ Finset.range n, 2 * (1 / ((k : ℝ) + 1)) := Finset.sum_le_sum hterm - _ = 2 * ((harmonic n : ℚ) : ℝ) := by - rw [← Finset.mul_sum, Zeta23.DigammaSeries.harmonic_cast_eq] - _ ≤ 2 * (1 + Real.log n) := by - have := harmonic_le_one_add_log n - linarith - _ ≤ 2 * (1 + Real.log (2 + ‖z‖)) := by linarith - calc ‖Complex.digamma z‖ = ‖Complex.digamma z₀ + ∑ k ∈ Finset.range n, 1 / (z₀ + (k : ℂ))‖ := by - rw [hψ] - _ ≤ ‖Complex.digamma z₀‖ + ‖∑ k ∈ Finset.range n, 1 / (z₀ + (k : ℂ))‖ := norm_add_le _ _ - _ ≤ M + 2 * (1 + Real.log (2 + ‖z‖)) := add_le_add (hM z₀ hz₀B) hsum - _ ≤ 2 * Real.log (2 + ‖z‖) + (K₀ + M + 4) := by linarith + set n : ℕ := ⌊z.re - 1 / 2⌋₊ + set z₀ : ℂ := z - n + have hfl : (n : ℝ) ≤ z.re - 1 / 2 := Nat.floor_le (by linarith) + have hfl2 : z.re - 1 / 2 < n + 1 := Nat.lt_floor_add_one (z.re - 1 / 2) + have hz₀re : z₀.re = z.re - n := by simp [z₀] + have hz₀im : z₀.im = z.im := by simp [z₀] + have hz₀lo : 1 / 2 ≤ z₀.re := by linarith + have hψ0 : ‖Complex.digamma z₀‖ ≤ Cw * Real.log (2 + ‖z‖) := by + have h1 := hwide z₀ (by linarith) (by linarith) + have h2 : Real.log (2 + |z₀.im|) ≤ Real.log (2 + ‖z‖) := + Real.log_le_log (by positivity) (by rw [hz₀im]; linarith [Complex.abs_im_le_norm z]) + exact h1.trans (mul_le_mul_of_nonneg_left h2 hCw.le) + have hterm : ∀ k ∈ Finset.range n, ‖1 / (z₀ + (k : ℂ))‖ ≤ 2 * (1 / ((k : ℝ) + 1)) := by + intro k _ + have hpos : 0 < z₀.re + k := by positivity + have hnk : z₀.re + k ≤ ‖z₀ + (k : ℂ)‖ := by + calc z₀.re + k = |(z₀ + (k : ℂ)).re| := by rw [Complex.add_re, Complex.natCast_re, abs_of_pos hpos] + _ ≤ ‖z₀ + (k : ℂ)‖ := Complex.abs_re_le_norm _ + rw [norm_div, norm_one] + calc 1 / ‖z₀ + (k : ℂ)‖ ≤ 1 / (z₀.re + k) := one_div_le_one_div_of_le hpos hnk + _ ≤ 1 / (1 / 2 + k) := one_div_le_one_div_of_le (by positivity) (by linarith) + _ ≤ 2 * (1 / ((k : ℝ) + 1)) := by + rw [div_le_iff₀ (by positivity)] + have hk0 : (0 : ℝ) ≤ k := Nat.cast_nonneg k + field_simp; nlinarith + have hlogn : Real.log n ≤ Real.log (2 + ‖z‖) := by + rcases Nat.eq_zero_or_pos n with h0 | hpos + · rw [h0, Nat.cast_zero, Real.log_zero]; exact hL0.le + · apply Real.log_le_log (by exact_mod_cast hpos) + linarith [le_trans (le_abs_self z.re) (Complex.abs_re_le_norm z)] + have hsum : ‖∑ k ∈ Finset.range n, 1 / (z₀ + (k : ℂ))‖ ≤ 2 * (1 + Real.log (2 + ‖z‖)) := by + calc ‖∑ k ∈ Finset.range n, 1 / (z₀ + (k : ℂ))‖ + ≤ ∑ k ∈ Finset.range n, ‖1 / (z₀ + (k : ℂ))‖ := norm_sum_le _ _ + _ ≤ ∑ k ∈ Finset.range n, 2 * (1 / ((k : ℝ) + 1)) := Finset.sum_le_sum hterm + _ = 2 * ((harmonic n : ℚ) : ℝ) := by + rw [← Finset.mul_sum, Zeta23.DigammaSeries.harmonic_cast_eq] + _ ≤ 2 * (1 + Real.log n) := by linarith [harmonic_le_one_add_log n] + _ ≤ 2 * (1 + Real.log (2 + ‖z‖)) := by linarith + have hψ : Complex.digamma z = Complex.digamma z₀ + ∑ k ∈ Finset.range n, 1 / (z₀ + k) := by + rw [show z = z₀ + n by simp [z₀]]; exact digamma_add_nat (by linarith) n + have h2 : (2 : ℝ) ≤ (2 / Real.log 2) * Real.log (2 + ‖z‖) := by + calc (2 : ℝ) = (2 / Real.log 2) * Real.log 2 := by field_simp + _ ≤ (2 / Real.log 2) * Real.log (2 + ‖z‖) := mul_le_mul_of_nonneg_left hL (by positivity) + calc ‖Complex.digamma z‖ + ≤ ‖Complex.digamma z₀‖ + ‖∑ k ∈ Finset.range n, 1 / (z₀ + (k : ℂ))‖ := by + rw [hψ]; exact norm_add_le _ _ + _ ≤ Cw * Real.log (2 + ‖z‖) + 2 * (1 + Real.log (2 + ‖z‖)) := add_le_add hψ0 hsum + _ ≤ (Cw + 2 + 2 / Real.log 2) * Real.log (2 + ‖z‖) := by linarith /-- ‖Γℝ′/Γℝ(w)‖ ≤ C log(2 + |w|) for Re w ≥ 1. -/ theorem norm_logDeriv_Gammaℝ_le_far : ∃ C : ℝ, 0 < C ∧ ∀ w : ℂ, 1 ≤ w.re → @@ -782,11 +672,17 @@ theorem norm_wt_le_border {s : ℂ} {R : ℝ} (hR : 2 * ‖s‖ + 4 ≤ R) : /-! ## §D. The square identity at a good height -/ +/-- Principal part of `wt s` near a pole `q ∈ {s, reflect s}`: subtracting `r/(w - q)` leaves +the other simple-pole term `c/(a - w)`, which is continuous at `q ≠ a`. -/ +private lemma isBigO_sub_one_div_of_ne {a q : ℂ} (hne : a ≠ q) (c : ℂ) : + (fun w : ℂ => c / (a - w)) =O[𝓝[≠] q] (1 : ℂ → ℂ) := by + have hne' : a - q ≠ 0 := sub_ne_zero.mpr hne + have hc : ContinuousAt (fun w : ℂ => c / (a - w)) q := + continuousAt_const.div (by fun_prop) hne' + exact (hc.tendsto.mono_left nhdsWithin_le_nhds).isBigO_one ℂ + /-- **Square identity.** ξ(s) ≠ 0, Re s ≠ 1/2, R ≥ |s| + 2 with ζ ≠ 0 on Im = ±R, 1/2 ≤ Re ≤ 2: -(1/2πi)∮_{∂([1−R,R]×[−R,R])} wt s · ξ′/ξ = Σ_{|Im ρ| < R} m_ρ wt s ρ − ξ′/ξ(s) + ξ′/ξ(reflect s). -(ζ ≠ 0 on Re ∈ [1/2, 2] of the lines Im = ±R keeps ALL zeros of ξ off those lines: a zero ρ with -Re ρ < 1/2 would give the zero 1 − ρ with Re ∈ (1/2, 1) on the mirrored line — -Zeta23.WeilEF.completedZeta_ne_zero_on_horizontals.) -/ +(1/2πi)∮_{∂([1−R,R]×[−R,R])} wt s · ξ′/ξ = Σ_{|Im ρ| < R} m_ρ wt s ρ − ξ′/ξ(s) + ξ′/ξ(reflect s). -/ theorem square_identity {s : ℂ} (hxi : xi s ≠ 0) (hs : s.re ≠ 1 / 2) {R : ℝ} (hR : ‖s‖ + 2 ≤ R) (hζ : ∀ p : ℂ, (p.im = R ∨ p.im = -R) → 1 / 2 ≤ p.re → p.re ≤ 2 → riemannZeta p ≠ 0) : ∃ Z : Finset ℂ, ((Z : Set ℂ) = {ρ : ℂ | IsNontrivialZero ρ ∧ -R < ρ.im ∧ ρ.im < R}) ∧ @@ -799,36 +695,28 @@ theorem square_identity {s : ℂ} (hxi : xi s ≠ 0) (hs : s.re ≠ 1 / 2) {R : have hre : (zc R).re ≤ (wc R).re := by simp; linarith have him : (zc R).im ≤ (wc R).im := by simp; linarith have hmem : ∀ p : ℂ, p ∈ Rectangle (zc R) (wc R) ↔ - (1 - R ≤ p.re ∧ p.re ≤ R) ∧ (-R ≤ p.im ∧ p.im ≤ R) := by - intro p + (1 - R ≤ p.re ∧ p.re ≤ R) ∧ (-R ≤ p.im ∧ p.im ≤ R) := fun p => by simp only [Rectangle, Complex.mem_reProdIm, zc_re, zc_im, wc_re, wc_im, Set.uIcc_of_le (show (1 - R : ℝ) ≤ R by linarith), Set.uIcc_of_le (show (-R : ℝ) ≤ R by linarith), Set.mem_Icc] have hint : ∀ p : ℂ, Rectangle (zc R) (wc R) ∈ 𝓝 p ↔ - (1 - R < p.re ∧ p.re < R) ∧ (-R < p.im ∧ p.im < R) := by - intro p + (1 - R < p.re ∧ p.re < R) ∧ (-R < p.im ∧ p.im < R) := fun p => by rw [rectangle_mem_nhds_iff, Complex.mem_reProdIm, Set.uIoo_of_le hre, Set.uIoo_of_le him, zc_re, zc_im, wc_re, wc_im, Set.mem_Ioo, Set.mem_Ioo] - -- no zero of ξ on the lines Im = ±R have hΛ := Zeta23.WeilEF.completedZeta_ne_zero_on_horizontals (c := 3 / 2) (R := R) (by norm_num) le_rfl hζ - have hnoZ : ∀ p : ℂ, (p.im = R ∨ p.im = -R) → xi p ≠ 0 := by - intro p hp h0 + have hnoZ : ∀ p : ℂ, (p.im = R ∨ p.im = -R) → xi p ≠ 0 := fun p hp h0 => by have hnz := (xi_eq_zero_iff p).mp h0 exact hΛ p hp (by linarith [hnz.2.1]) (by linarith [hnz.2.2]) (Zeta23.RvM.completedRiemannZeta_eq_zero_iff.mpr hnz) - -- the zero finset have hfin : {ρ : ℂ | IsNontrivialZero ρ ∧ -R < ρ.im ∧ ρ.im < R}.Finite := (zetaSeam.finite_window (-R) R).subset (fun ρ ⟨h1, h2, h3⟩ => ⟨h1, h2, h3.le⟩) set Z : Finset ℂ := hfin.toFinset with hZdef - have hZmem : ∀ ρ, ρ ∈ Z ↔ IsNontrivialZero ρ ∧ -R < ρ.im ∧ ρ.im < R := by - intro ρ; rw [hZdef, Set.Finite.mem_toFinset]; rfl + have hZmem : ∀ ρ, ρ ∈ Z ↔ IsNontrivialZero ρ ∧ -R < ρ.im ∧ ρ.im < R := fun ρ => by + rw [hZdef, Set.Finite.mem_toFinset]; rfl refine ⟨Z, hfin.coe_toFinset, ?_⟩ - -- the two poles of the weight - have hsr : s ≠ reflect s := by - intro h; apply hs - have := congrArg Complex.re h - simp [reflect] at this; linarith + have hsr : s ≠ reflect s := fun h => hs (by + have := congrArg Complex.re h; simp [reflect] at this; linarith) have hxi' : xi (reflect s) ≠ 0 := by rw [xi_reflect]; exact (map_ne_zero _).mpr hxi set Q : Finset ℂ := {s, reflect s} with hQdef have hZQ : Disjoint Z Q := by @@ -838,37 +726,27 @@ theorem square_identity {s : ℂ} (hxi : xi s ≠ 0) (hs : s.re ≠ 1 / 2) {R : simp only [hQdef, Finset.mem_insert, Finset.mem_singleton] at hq rcases hq with rfl | rfl exacts [hxi hz, hxi' hz] - have hsint : Rectangle (zc R) (wc R) ∈ 𝓝 s := by - rw [hint] - exact ⟨⟨by linarith, by linarith⟩, by linarith, by linarith⟩ - have hs'int : Rectangle (zc R) (wc R) ∈ 𝓝 (reflect s) := by + have hQint : ∀ q ∈ Q, Rectangle (zc R) (wc R) ∈ 𝓝 q := fun q hq => by rw [hint] - have e1 : (reflect s).re = 1 - s.re := by simp [reflect] - have e2 : (reflect s).im = s.im := by simp [reflect] - rw [e1, e2] - exact ⟨⟨by linarith, by linarith⟩, by linarith, by linarith⟩ - have hQint : ∀ q ∈ Q, Rectangle (zc R) (wc R) ∈ 𝓝 q := by - intro q hq - simp only [hQdef, Finset.mem_insert, Finset.mem_singleton] at hq - rcases hq with rfl | rfl - exacts [hsint, hs'int] + rcases (by simpa [hQdef] using hq : q = s ∨ q = reflect s) with rfl | rfl + · exact ⟨⟨by linarith, by linarith⟩, by linarith, by linarith⟩ + · simp only [reflect, Complex.sub_re, Complex.one_re, Complex.conj_re, + Complex.sub_im, Complex.one_im, Complex.conj_im, zero_sub] + exact ⟨⟨by linarith, by linarith⟩, by linarith, by linarith⟩ have hf : AnalyticOnNhd ℂ xi (Rectangle (zc R) (wc R)) := fun p _ => xi_differentiable.analyticAt p have hg : ∀ p ∈ Rectangle (zc R) (wc R) \ (Q : Set ℂ), AnalyticAt ℂ (wt s) p := by rintro p ⟨_, hpQ⟩ simp only [hQdef, Finset.coe_insert, Finset.coe_singleton, Set.mem_insert_iff, Set.mem_singleton_iff, not_or] at hpQ have hopen : IsOpen (({s, reflect s} : Set ℂ)ᶜ) := (Set.toFinite _).isClosed.isOpen_compl - apply DifferentiableOn.analyticAt (s := (({s, reflect s} : Set ℂ)ᶜ)) - · intro w hw - simp only [Set.mem_compl_iff, Set.mem_insert_iff, Set.mem_singleton_iff, not_or] at hw - have h1 : s - w ≠ 0 := sub_ne_zero.mpr (Ne.symm hw.1) - have h2 : reflect s - w ≠ 0 := sub_ne_zero.mpr (Ne.symm hw.2) - apply DifferentiableAt.differentiableWithinAt - show DifferentiableAt ℂ (fun w => 1 / (s - w) - 1 / (reflect s - w)) w - fun_prop (disch := assumption) - · exact hopen.mem_nhds (by simp [hpQ.1, hpQ.2]) - have hborder : ∀ p ∈ RectangleBorder (zc R) (wc R), xi p ≠ 0 := by - intro p hp h0 + refine DifferentiableOn.analyticAt (s := (({s, reflect s} : Set ℂ)ᶜ)) (fun w hw => ?_) + (hopen.mem_nhds (by simp [hpQ.1, hpQ.2])) + simp only [Set.mem_compl_iff, Set.mem_insert_iff, Set.mem_singleton_iff, not_or] at hw + have h1 : s - w ≠ 0 := sub_ne_zero.mpr (Ne.symm hw.1) + have h2 : reflect s - w ≠ 0 := sub_ne_zero.mpr (Ne.symm hw.2) + exact (by fun_prop (disch := assumption) : + DifferentiableAt ℂ (fun w => 1 / (s - w) - 1 / (reflect s - w)) w).differentiableWithinAt + have hborder : ∀ p ∈ RectangleBorder (zc R) (wc R), xi p ≠ 0 := fun p hp h0 => by have hnz := (xi_eq_zero_iff p).mp h0 simp only [RectangleBorder, Set.mem_union, Complex.mem_reProdIm, Set.mem_singleton_iff, zc_re, zc_im, wc_re, wc_im] at hp @@ -877,71 +755,38 @@ theorem square_identity {s : ℂ} (hxi : xi s ≠ 0) (hs : s.re ≠ 1 / 2) {R : · linarith [hnz.2.1] · exact hnoZ p (Or.inl h') h0 · linarith [hnz.2.2] - have hZchar : ∀ p ∈ Rectangle (zc R) (wc R), xi p = 0 ↔ p ∈ Z := by - intro p hp + have hZchar : ∀ p ∈ Rectangle (zc R) (wc R), xi p = 0 ↔ p ∈ Z := fun p hp => by rw [hZmem, xi_eq_zero_iff] - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem p).mp hp - constructor - · intro hnz - refine ⟨hnz, lt_of_le_of_ne hi1 (fun h => ?_), lt_of_le_of_ne hi2 (fun h => ?_)⟩ - · exact hnoZ p (Or.inr h.symm) ((xi_eq_zero_iff p).mpr hnz) - · exact hnoZ p (Or.inl h) ((xi_eq_zero_iff p).mpr hnz) - · exact fun h => h.1 - have hZsub : (Z : Set ℂ) ⊆ Rectangle (zc R) (wc R) := by - intro ρ hρ - rw [Finset.mem_coe, hZmem] at hρ - obtain ⟨h1, h2, h3⟩ := hρ + obtain ⟨⟨_, _⟩, ⟨hi1, hi2⟩⟩ := (hmem p).mp hp + refine ⟨fun hnz => ⟨hnz, lt_of_le_of_ne hi1 fun h => hnoZ p (Or.inr h.symm) + ((xi_eq_zero_iff p).mpr hnz), lt_of_le_of_ne hi2 fun h => hnoZ p (Or.inl h) + ((xi_eq_zero_iff p).mpr hnz)⟩, fun h => h.1⟩ + have hZsub : (Z : Set ℂ) ⊆ Rectangle (zc R) (wc R) := fun ρ hρ => by + obtain ⟨h1, h2, h3⟩ := (hZmem ρ).mp (Finset.mem_coe.mp hρ) exact (hmem ρ).mpr ⟨⟨by linarith [h1.2.1], by linarith [h1.2.2]⟩, h2.le, h3.le⟩ - -- principal parts of the weight: −1/(w − s) at s, +1/(w − s′) at s′ set r : ℂ → ℂ := fun q => if q = s then -1 else 1 with hrdef have hr1 : r s = -1 := by simp [hrdef] have hr2 : r (reflect s) = 1 := by simp [hrdef, hsr.symm] have hnear : ∀ q ∈ Q, (wt s - fun w => r q / (w - q)) =O[𝓝[≠] q] (1 : ℂ → ℂ) := by intro q hq - simp only [hQdef, Finset.mem_insert, Finset.mem_singleton] at hq - rcases hq with h | h - · subst h - have hne : reflect q - q ≠ 0 := sub_ne_zero.mpr (Ne.symm hsr) - have hc : ContinuousAt (fun w => -(1 / (reflect q - w))) q := by - have h1 : ContinuousAt (fun w : ℂ => reflect q - w) q := by fun_prop - exact (continuousAt_const.div h1 hne).neg - have hO : (fun w => -(1 / (reflect q - w))) =O[𝓝[≠] q] (1 : ℂ → ℂ) := - (hc.tendsto.mono_left nhdsWithin_le_nhds).isBigO_one ℂ - refine hO.congr' ?_ EventuallyEq.rfl - have hev : ∀ᶠ w in 𝓝 q, reflect q - w ≠ 0 := - (continuous_const.sub continuous_id).continuousAt.eventually_ne hne - filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds hev] with w hw hw2 - have hwq : w - q ≠ 0 := sub_ne_zero.mpr hw - have hqw : q - w ≠ 0 := sub_ne_zero.mpr (Ne.symm hw) - simp only [Pi.sub_apply, wt, hr1] - field_simp - ring - · subst h - have hne : s - reflect s ≠ 0 := sub_ne_zero.mpr hsr - have hc : ContinuousAt (fun w => 1 / (s - w)) (reflect s) := by - have h1 : ContinuousAt (fun w : ℂ => s - w) (reflect s) := by fun_prop - exact continuousAt_const.div h1 hne - have hO : (fun w => 1 / (s - w)) =O[𝓝[≠] (reflect s)] (1 : ℂ → ℂ) := - (hc.tendsto.mono_left nhdsWithin_le_nhds).isBigO_one ℂ - refine hO.congr' ?_ EventuallyEq.rfl - have hev : ∀ᶠ w in 𝓝 (reflect s), s - w ≠ 0 := - (continuous_const.sub continuous_id).continuousAt.eventually_ne hne - filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds hev] with w hw hw2 - have hwq : w - reflect s ≠ 0 := sub_ne_zero.mpr hw - have hqw : reflect s - w ≠ 0 := sub_ne_zero.mpr (Ne.symm hw) - simp only [Pi.sub_apply, wt, hr2] - field_simp - ring - have key := rectangleIntegral'_mul_logDeriv_weightPoles hre him Z Q hZQ hQint hf hg hborder - hZchar hZsub r hnear - rw [key] + rcases (by simpa [hQdef] using hq : q = s ∨ q = reflect s) with rfl | rfl + · refine (isBigO_sub_one_div_of_ne hsr.symm (-1)).congr' ?_ EventuallyEq.rfl + filter_upwards [self_mem_nhdsWithin] with w hw + have h1 : w - q ≠ 0 := sub_ne_zero.mpr hw + have h2 : q - w ≠ 0 := sub_ne_zero.mpr (Ne.symm hw) + simp only [Pi.sub_apply, wt, hr1]; field_simp; ring + · refine (isBigO_sub_one_div_of_ne hsr 1).congr' ?_ EventuallyEq.rfl + filter_upwards [self_mem_nhdsWithin] with w hw + have h1 : w - reflect s ≠ 0 := sub_ne_zero.mpr hw + have h2 : reflect s - w ≠ 0 := sub_ne_zero.mpr (Ne.symm hw) + simp only [Pi.sub_apply, wt, hr2]; field_simp; ring + rw [rectangleIntegral_mul_logDeriv_weightPoles hre him Z Q hZQ hQint hf hg hborder + hZchar hZsub r hnear] have hZsum : ∑ ρ ∈ Z, (analyticOrderNatAt xi ρ : ℂ) * wt s ρ = ∑ ρ ∈ Z, (zeroMult ρ : ℂ) * wt s ρ := - Finset.sum_congr rfl (fun ρ hρ => by rw [analyticOrderNatAt_xi ((hZmem ρ).mp hρ).1]) + Finset.sum_congr rfl fun ρ hρ => by rw [analyticOrderNatAt_xi ((hZmem ρ).mp hρ).1] have hQsum : ∑ q ∈ Q, r q * logDeriv xi q = -logDeriv xi s + logDeriv xi (reflect s) := by - rw [hQdef, Finset.sum_insert (by simpa using hsr), Finset.sum_singleton, hr1, hr2] - ring - rw [hZsum, hQsum] - ring + rw [hQdef, Finset.sum_insert (by simpa using hsr), Finset.sum_singleton, hr1, hr2]; ring + rw [hZsum, hQsum]; ring /-! ## §E. Limits along the good heights -/ @@ -1139,67 +984,21 @@ theorem summable_mult_mul {φ : ℂ → ℂ} {C : ℝ} _ = C * ((zeroMult (ρ : ℂ) : ℝ) / (1 + Complex.normSq (gammaOf (ρ : ℂ)))) := by field_simp -/-- the finite zero sums over {|Im ρ| < R_j} converge to the tsum (generic form of -Zeta23.WeilEF.zero_sum_limit). -/ +/-- the finite zero sums over `{|Im ρ| < R_j}` converge to the tsum (via `WeilEF.zero_sum_limit_of`). -/ theorem zero_sum_limit_gen {φ : ℂ → ℂ} (hφ : Summable (fun ρ : zetaZeroConfig.carrier => (zeroMult ρ : ℂ) * φ ρ)) {R : ℕ → ℝ} (hR : ∀ j : ℕ, (j : ℝ) + 7 ≤ R j ∧ R j ≤ (j : ℝ) + 8) {Z : ℕ → Finset ℂ} (hZ : ∀ j : ℕ, ((Z j : Set ℂ) = {ρ : ℂ | IsNontrivialZero ρ ∧ -R j < ρ.im ∧ ρ.im < R j})) : Tendsto (fun j : ℕ => ∑ ρ ∈ Z j, (zeroMult ρ : ℂ) * φ ρ) atTop - (𝓝 (∑' ρ : zetaZeroConfig.carrier, (zeroMult ρ : ℂ) * φ ρ)) := by - classical - set g : zetaZeroConfig.carrier → ℂ := fun ρ => (zeroMult ρ : ℂ) * φ ρ with hg - have hsum : Summable g := hφ - have hmemZ : ∀ j ρ, ρ ∈ Z j ↔ IsNontrivialZero ρ ∧ -R j < ρ.im ∧ ρ.im < R j := by - intro j ρ - rw [← Finset.mem_coe, hZ j] - rfl - set sF : ℕ → Finset zetaZeroConfig.carrier := - fun j => (Z j).subtype (· ∈ zetaZeroConfig.carrier) with hsdef - have hsum_eq : ∀ j, ∑ x ∈ sF j, g x = ∑ ρ ∈ Z j, (zeroMult ρ : ℂ) * φ ρ := by - intro j - have h1 := Finset.sum_subtype_eq_sum_filter (s := Z j) - (p := (· ∈ zetaZeroConfig.carrier)) (fun ρ : ℂ => (zeroMult ρ : ℂ) * φ ρ) - have h2 : (Z j).filter (· ∈ zetaZeroConfig.carrier) = Z j := by - apply Finset.filter_true_of_mem - intro ρ hρ - exact ((hmemZ j ρ).mp hρ).1 - rw [h2] at h1 - rw [← h1] - have hRmono : ∀ i j : ℕ, i ≤ j → R i ≤ R j := by - intro i j hij - rcases hij.eq_or_lt with h | h - · rw [h] - · have : (i : ℝ) + 1 ≤ j := by exact_mod_cast h - linarith [(hR i).2, (hR j).1] - have hmono : Monotone sF := by - intro i j hij x hx - rw [Finset.mem_subtype, hmemZ] at hx ⊢ - obtain ⟨h1, h2, h3⟩ := hx - have := hRmono i j hij - exact ⟨h1, by linarith, by linarith⟩ - have hexh : ∀ b : Finset zetaZeroConfig.carrier, ∃ j, b ≤ sF j := by - intro b - set M : ℝ := ∑ x ∈ b, |((x : ℂ)).im| with hM - have hMle : ∀ x ∈ b, |((x : ℂ)).im| ≤ M := fun x hx => - Finset.single_le_sum (f := fun x : zetaZeroConfig.carrier => |((x : ℂ)).im|) - (fun _ _ => abs_nonneg _) hx - obtain ⟨j, hj⟩ := exists_nat_gt M - refine ⟨j, fun x hx => ?_⟩ - rw [Finset.mem_subtype, hmemZ] - have hx0 : IsNontrivialZero (x : ℂ) := x.2 - have habs := abs_le.mp (hMle x hx) - have hRj := (hR j).1 - exact ⟨hx0, by linarith [habs.1], by linarith [habs.2]⟩ - have hs_tend : Tendsto sF atTop atTop := tendsto_atTop_atTop_of_monotone hmono hexh - have hT : Tendsto (fun S : Finset zetaZeroConfig.carrier => ∑ x ∈ S, g x) atTop - (𝓝 (∑' x, g x)) := by - have hHas := hsum.hasSum - simp only [HasSum, SummationFilter.unconditional_filter] at hHas - exact hHas - have := hT.comp hs_tend - refine this.congr (fun j => ?_) - simp only [Function.comp_apply, hsum_eq] + (𝓝 (∑' ρ : zetaZeroConfig.carrier, (zeroMult ρ : ℂ) * φ ρ)) := + Zeta23.WeilEF.zero_sum_limit_of (Zset := zetaZeroConfig.carrier) + (fun ρ => (zeroMult ρ : ℂ) * φ ρ) hφ + (fun i j hij => by + rcases hij.eq_or_lt with rfl | h + · exact le_rfl + · have : (i : ℝ) + 1 ≤ j := by exact_mod_cast h + linarith [(hR i).2, (hR j).1]) + (fun j => by linarith [(hR j).1]) hZ theorem summable_wt {s : ℂ} (hxi : xi s ≠ 0) : Summable (fun ρ : zetaZeroConfig.carrier => (zeroMult ρ : ℂ) * wt s ρ) := by diff --git a/zeta23/Zeta23/XiPrime/FamilyFlat.lean b/zeta23/Zeta23/XiPrime/FamilyFlat.lean index b37f71bf4f..fd535ebf38 100644 --- a/zeta23/Zeta23/XiPrime/FamilyFlat.lean +++ b/zeta23/Zeta23/XiPrime/FamilyFlat.lean @@ -14,52 +14,17 @@ Zeta23/Taper/GevreyRamps.lean proves exactly ∫|φ^{(k)}| ≤ 2B·w·(A/w)^k· (s, A, B) ϱ, and Zeta23/Taper/Gevrey.lean supplies the instance rhoTwo (gevreyProfile_rhoTwo). That is all the unconditional headline needs (Final.lean instantiates at ϱ := rhoTwo). The generic C³-TaperProfile version is not treated here. -/ -import Zeta23.XiPrime.ExplicitFormula -import Zeta23.XiPrime.Assembly -import Zeta23.Taper.GevreyRamps -import Zeta23.Taper.Gevrey -import Zeta23.Taper.Params +import Zeta23.XiPrime.FamilyHyps noncomputable section -open Filter Set MeasureTheory - namespace Zeta23 namespace XiPrime -/-- derivatives of every order of a compactly supported function are compactly supported. -/ -lemma hasCompactSupport_iteratedDeriv {f : ℝ → ℝ} (hf : HasCompactSupport f) (k : ℕ) : - HasCompactSupport (iteratedDeriv k f) := by - induction k with - | zero => simpa using hf - | succ k ih => simpa [iteratedDeriv_succ] using ih.deriv - /-- **FamilyHyps for the flat family at a Gevrey taper profile** (λ ∈ (0,1), w = 1). -/ theorem familyHyps_flat_gevrey {s A B : ℝ} {ϱ : ℝ → ℝ} (hϱ : Taper.GevreyProfile s A B ϱ) {lam : ℝ} - (h0 : 0 < lam) (h1 : lam < 1) : FamilyHyps (fun _ => paramsOf ϱ lam) := by - have hP : (paramsOf ϱ lam).Valid := paramsOf_valid hϱ.taper h0 h1.le - have hA := hϱ.A_pos - have hB := hϱ.B_pos - refine ⟨⟨lam, h0, h1, fun _ => rfl⟩, ?_⟩ - obtain ⟨T₀, hT₀⟩ := Filter.eventually_atTop.mp - ((Assembly.tendsto_L_atTop (paramsOf ϱ lam) hP.lam_pos).eventually_ge_atTop 8) - refine ⟨∑ k ∈ Finset.Icc (1:ℕ) 3, 2 * B * (1:ℝ) * (A / 1) ^ k * ((k : ℕ) : ℝ) ^ (s * (k : ℕ)), T₀, - fun T hT => ?_⟩ - have hL8 : 8 ≤ (paramsOf ϱ lam).L T := hT₀ T hT - have h8 : 8 * (paramsOf ϱ lam).w ≤ (paramsOf ϱ lam).L T := by - show 8 * (1:ℝ) ≤ (paramsOf ϱ lam).L T; linarith - have hwL : 2 * (1:ℝ) ≤ (paramsOf ϱ lam).L T := by linarith - have hcd : ContDiff ℝ 3 ((paramsOf ϱ lam).phi T) := Params.phi_contDiff hP h8 - refine ⟨hcd, closure_minimal (Params.phi_support_subset hP) isClosed_Icc, - fun u => Params.phi_even' u, - fun u => abs_le.mpr ⟨by linarith [Params.phi_nonneg hP (T := T) u], Params.phi_le_one hP u⟩, - fun j hj1 hj3 => ⟨?_, ?_⟩⟩ - · exact ((hcd.continuous_iteratedDeriv j (by exact_mod_cast hj3)).integrable_of_hasCompactSupport - (hasCompactSupport_iteratedDeriv (Params.phi_hasCompactSupport hP) j)) - · have hb := Taper.integral_abs_iteratedDeriv_phi_le (L := (paramsOf ϱ lam).L T) hϱ one_pos hwL hj1 - refine hb.trans ?_ - refine Finset.single_le_sum (f := fun k : ℕ => 2 * B * (1:ℝ) * (A / 1) ^ k * ((k : ℕ) : ℝ) ^ (s * (k : ℕ))) - (fun k _ => by positivity) (Finset.mem_Icc.mpr ⟨hj1, hj3⟩) + (h0 : 0 < lam) (h1 : lam < 1) : FamilyHyps (fun _ => paramsOf ϱ lam) := + familyHyps_flat (paramsOf_valid hϱ.taper h0 h1.le) h1 end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/FamilyHyps.lean b/zeta23/Zeta23/XiPrime/FamilyHyps.lean index e8809a5400..387804cb6b 100644 --- a/zeta23/Zeta23/XiPrime/FamilyHyps.lean +++ b/zeta23/Zeta23/XiPrime/FamilyHyps.lean @@ -23,7 +23,6 @@ import Zeta23.XiPrime.ExplicitFormula import Zeta23.XiPrime.Assembly import Zeta23.XiPrime.QuarticWindow.Params import Zeta23.Taper.GevreyRamps -import Zeta23.Taper.Params noncomputable section @@ -33,38 +32,16 @@ namespace Zeta23 namespace XiPrime namespace FamilyHypsC3 -/-! ## §1. C³ ramp calculus for a TaperProfile -/ +/-! ## §1. C³ ramp calculus for a TaperProfile (thin wrapper over `Taper.GevreyRamps`) -/ section Ramps variable {ϱ : ℝ → ℝ} {L w : ℝ} /-- for 1 ≤ i ≤ 3 the i-th derivative of a C³ profile vanishes off (0,1). -/ lemma iteratedDeriv_eq_zero (hϱ : TaperProfile ϱ) {i : ℕ} (hi : 1 ≤ i) (hi3 : i ≤ 3) - {x : ℝ} (hx : x ∉ Set.Ioo (0:ℝ) 1) : iteratedDeriv i ϱ x = 0 := by - have hi0 : i ≠ 0 := by omega - have hcont : Continuous (iteratedDeriv i ϱ) := - hϱ.contDiff.continuous_iteratedDeriv i (by exact_mod_cast hi3) - have hcl : IsClosed {y : ℝ | iteratedDeriv i ϱ y = 0} := isClosed_eq hcont continuous_const - have h1 : Set.Iio (0:ℝ) ⊆ {y | iteratedDeriv i ϱ y = 0} := by - intro y hy - have hev : ϱ =ᶠ[𝓝 y] (fun _ => (0:ℝ)) := - Filter.eventually_of_mem (Iio_mem_nhds hy) (fun z hz => hϱ.eq_zero z (le_of_lt hz)) - show iteratedDeriv i ϱ y = 0 - rw [hev.iteratedDeriv_eq i, iteratedDeriv_const, if_neg hi0] - have h2 : Set.Ioi (1:ℝ) ⊆ {y | iteratedDeriv i ϱ y = 0} := by - intro y hy - have hev : ϱ =ᶠ[𝓝 y] (fun _ => (1:ℝ)) := - Filter.eventually_of_mem (Ioi_mem_nhds hy) (fun z hz => hϱ.eq_one z (le_of_lt hz)) - show iteratedDeriv i ϱ y = 0 - rw [hev.iteratedDeriv_eq i, iteratedDeriv_const, if_neg hi0] - have h1' : Set.Iic (0:ℝ) ⊆ {y | iteratedDeriv i ϱ y = 0} := by - rw [← closure_Iio]; exact hcl.closure_subset_iff.mpr h1 - have h2' : Set.Ici (1:ℝ) ⊆ {y | iteratedDeriv i ϱ y = 0} := by - rw [← closure_Ioi]; exact hcl.closure_subset_iff.mpr h2 - simp only [Set.mem_Ioo, not_and_or, not_lt] at hx - rcases hx with hx | hx - · exact h1' hx - · exact h2' hx + {x : ℝ} (hx : x ∉ Set.Ioo (0:ℝ) 1) : iteratedDeriv i ϱ x = 0 := + Taper.iteratedDeriv_eq_zero_of_taper hϱ hi + (hϱ.contDiff.continuous_iteratedDeriv i (by exact_mod_cast hi3)) hx /-- a uniform bound for |ϱ^{(i)}|, 1 ≤ i ≤ 3. -/ lemma exists_deriv_bound (hϱ : TaperProfile ϱ) : @@ -84,158 +61,13 @@ lemma exists_deriv_bound (hϱ : TaperProfile ϱ) : · exact (hC3 x hx').trans (le_trans (le_max_right _ _) (le_max_left _ _)) · rw [iteratedDeriv_eq_zero hϱ hi hi3 hx, abs_zero]; exact le_max_right _ _ -open Taper in -lemma iteratedDeriv_fP (hϱ : TaperProfile ϱ) {i : ℕ} (hi3 : i ≤ 3) (u : ℝ) : - iteratedDeriv i (fP ϱ L w) u = (-1 : ℝ) ^ i * ((w⁻¹) ^ i * iteratedDeriv i ϱ ((L / 2 - u) / w)) := by - have hg := iteratedDeriv_comp_const_mul (n := i) (hϱ.contDiff.of_le (by exact_mod_cast hi3)) w⁻¹ - rw [fP_eq] - refine (congrFun (iteratedDeriv_comp_const_sub i (fun x => ϱ (w⁻¹ * x)) (L / 2)) u).trans ?_ - simp only [smul_eq_mul, hg, div_eq_inv_mul] - -open Taper in -lemma iteratedDeriv_fM (hϱ : TaperProfile ϱ) {i : ℕ} (hi3 : i ≤ 3) (u : ℝ) : - iteratedDeriv i (fM ϱ L w) u = (w⁻¹) ^ i * iteratedDeriv i ϱ ((L / 2 + u) / w) := by - have hg := iteratedDeriv_comp_const_mul (n := i) (hϱ.contDiff.of_le (by exact_mod_cast hi3)) w⁻¹ - rw [fM_eq] - refine (congrFun (iteratedDeriv_comp_add_const i (fun x => ϱ (w⁻¹ * x)) (L / 2)) u).trans ?_ - simp only [hg, div_eq_inv_mul, add_comm u] - -open Taper in -/-- ramp majorants. -/ -lemma abs_iteratedDeriv_fP_le (hϱ : TaperProfile ϱ) {B : ℝ} - (hB : ∀ i : ℕ, 1 ≤ i → i ≤ 3 → ∀ x : ℝ, |iteratedDeriv i ϱ x| ≤ B) (hw : 0 < w) {k : ℕ} - (hk : 1 ≤ k) (hk3 : k ≤ 3) (u : ℝ) : |iteratedDeriv k (fP ϱ L w) u| - ≤ (Set.Ioo (L / 2 - w) (L / 2)).indicator (fun _ => (w⁻¹) ^ k * B) u := by - rw [iteratedDeriv_fP hϱ hk3, abs_mul, abs_pow, abs_neg, abs_one, one_pow, one_mul, abs_mul, - abs_of_nonneg (by positivity : (0:ℝ) ≤ (w⁻¹) ^ k)] - by_cases hu : u ∈ Set.Ioo (L / 2 - w) (L / 2) - · rw [Set.indicator_of_mem hu] - exact mul_le_mul_of_nonneg_left (hB k hk hk3 _) (by positivity) - · rw [Set.indicator_of_notMem hu] - have hx : (L / 2 - u) / w ∉ Set.Ioo (0:ℝ) 1 := by - intro h - apply hu - simp only [Set.mem_Ioo, div_pos_iff_of_pos_right hw, div_lt_one hw] at h - constructor <;> linarith [h.1, h.2] - rw [iteratedDeriv_eq_zero hϱ hk hk3 hx, abs_zero, mul_zero] - -open Taper in -lemma abs_iteratedDeriv_fM_le (hϱ : TaperProfile ϱ) {B : ℝ} - (hB : ∀ i : ℕ, 1 ≤ i → i ≤ 3 → ∀ x : ℝ, |iteratedDeriv i ϱ x| ≤ B) (hw : 0 < w) {k : ℕ} - (hk : 1 ≤ k) (hk3 : k ≤ 3) (u : ℝ) : |iteratedDeriv k (fM ϱ L w) u| - ≤ (Set.Ioo (-(L / 2)) (w - L / 2)).indicator (fun _ => (w⁻¹) ^ k * B) u := by - rw [iteratedDeriv_fM hϱ hk3, abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ (w⁻¹) ^ k)] - by_cases hu : u ∈ Set.Ioo (-(L / 2)) (w - L / 2) - · rw [Set.indicator_of_mem hu] - exact mul_le_mul_of_nonneg_left (hB k hk hk3 _) (by positivity) - · rw [Set.indicator_of_notMem hu] - have hx : (L / 2 + u) / w ∉ Set.Ioo (0:ℝ) 1 := by - intro h - apply hu - simp only [Set.mem_Ioo, div_pos_iff_of_pos_right hw, div_lt_one hw] at h - constructor <;> linarith [h.1, h.2] - rw [iteratedDeriv_eq_zero hϱ hk hk3 hx, abs_zero, mul_zero] - -open Taper in -/-- mixed Leibniz terms vanish (open ramps disjoint when 2w ≤ L). -/ -lemma iteratedDeriv_fP_mul_fM_eq_zero (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) - {i j : ℕ} (hi : 1 ≤ i) (hi3 : i ≤ 3) (hj : 1 ≤ j) (hj3 : j ≤ 3) (u : ℝ) : - iteratedDeriv i (fP ϱ L w) u * iteratedDeriv j (fM ϱ L w) u = 0 := by - by_cases hu : u ∈ Set.Ioo (L / 2 - w) (L / 2) - · have hu' : (L / 2 + u) / w ∉ Set.Ioo (0:ℝ) 1 := by - have h1 : 1 ≤ (L / 2 + u) / w := by rw [le_div_iff₀ hw]; linarith [hu.1] - simp only [Set.mem_Ioo, not_and_or, not_lt] - exact Or.inr h1 - rw [iteratedDeriv_fM hϱ hj3, iteratedDeriv_eq_zero hϱ hj hj3 hu']; ring - · have hu' : (L / 2 - u) / w ∉ Set.Ioo (0:ℝ) 1 := by - intro h - apply hu - simp only [Set.mem_Ioo, div_pos_iff_of_pos_right hw, div_lt_one hw] at h - constructor <;> linarith [h.1, h.2] - rw [iteratedDeriv_fP hϱ hi3, iteratedDeriv_eq_zero hϱ hi hi3 hu']; ring - -open Taper in -lemma fP_contDiffAt (hϱ : TaperProfile ϱ) (u : ℝ) : ContDiffAt ℝ 3 (fP ϱ L w) u := - (hϱ.contDiff.comp (by fun_prop : ContDiff ℝ 3 fun u : ℝ => (L / 2 - u) / w)).contDiffAt - -open Taper in -lemma fM_contDiffAt (hϱ : TaperProfile ϱ) (u : ℝ) : ContDiffAt ℝ 3 (fM ϱ L w) u := - (hϱ.contDiff.comp (by fun_prop : ContDiff ℝ 3 fun u : ℝ => (L / 2 + u) / w)).contDiffAt - -open Taper in -/-- |φ^{(k)}| ≤ |f₊^{(k)}| + |f₋^{(k)}|, 1 ≤ k ≤ 3. -/ -lemma abs_iteratedDeriv_phi_le (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) - {k : ℕ} (hk : 1 ≤ k) (hk3 : k ≤ 3) (u : ℝ) : - |iteratedDeriv k (phi ϱ L w) u| - ≤ |iteratedDeriv k (fP ϱ L w) u| + |iteratedDeriv k (fM ϱ L w) u| := by - have hprod : phi ϱ L w = fP ϱ L w * fM ϱ L w := by - funext u; exact phi_eq_mul hϱ hw hwL u - have hPk : ContDiffAt ℝ k (fP ϱ L w) u := (fP_contDiffAt hϱ u).of_le (by exact_mod_cast hk3) - have hMk : ContDiffAt ℝ k (fM ϱ L w) u := (fM_contDiffAt hϱ u).of_le (by exact_mod_cast hk3) - rw [hprod, iteratedDeriv_mul hPk hMk] - have hk0 : (0:ℕ) ≠ k := by omega - rw [Finset.sum_eq_add 0 k hk0] - · simp only [Nat.choose_zero_right, Nat.cast_one, one_mul, iteratedDeriv_zero, Nat.sub_zero, - Nat.choose_self, Nat.sub_self] - have h0 : |fP ϱ L w u| ≤ 1 := by - unfold fP; rw [abs_of_nonneg (hϱ.nonneg _)]; exact hϱ.le_one _ - have h1 : |fM ϱ L w u| ≤ 1 := by - unfold fM; rw [abs_of_nonneg (hϱ.nonneg _)]; exact hϱ.le_one _ - calc |fP ϱ L w u * iteratedDeriv k (fM ϱ L w) u + iteratedDeriv k (fP ϱ L w) u * fM ϱ L w u| - ≤ |fP ϱ L w u * iteratedDeriv k (fM ϱ L w) u| + |iteratedDeriv k (fP ϱ L w) u * fM ϱ L w u| := - abs_add_le _ _ - _ = |fP ϱ L w u| * |iteratedDeriv k (fM ϱ L w) u| + |iteratedDeriv k (fP ϱ L w) u| * |fM ϱ L w u| := by - rw [abs_mul, abs_mul] - _ ≤ 1 * |iteratedDeriv k (fM ϱ L w) u| + |iteratedDeriv k (fP ϱ L w) u| * 1 := by - gcongr - _ = _ := by ring - · intro c hc hne - have hc1 : 1 ≤ c := Nat.one_le_iff_ne_zero.mpr hne.1 - have hcr := Finset.mem_range.mp hc - have hc2 : 1 ≤ k - c := by omega - rw [mul_assoc, iteratedDeriv_fP_mul_fM_eq_zero hϱ hw hwL hc1 (by omega) hc2 (by omega), mul_zero] - · intro h; exact absurd (Finset.mem_range.mpr (by omega)) h - · intro h; exact absurd (Finset.mem_range.mpr (by omega)) h - -open Taper in -/-- pointwise ramp majorant for φ^{(k)}. -/ -lemma abs_iteratedDeriv_phi_le_indicator (hϱ : TaperProfile ϱ) {B : ℝ} - (hB : ∀ i : ℕ, 1 ≤ i → i ≤ 3 → ∀ x : ℝ, |iteratedDeriv i ϱ x| ≤ B) (hw : 0 < w) (hwL : 2 * w ≤ L) - {k : ℕ} (hk : 1 ≤ k) (hk3 : k ≤ 3) (u : ℝ) : - |iteratedDeriv k (phi ϱ L w) u| - ≤ (Set.Ioo (L / 2 - w) (L / 2)).indicator (fun _ => (w⁻¹) ^ k * B) u - + (Set.Ioo (-(L / 2)) (w - L / 2)).indicator (fun _ => (w⁻¹) ^ k * B) u := - (abs_iteratedDeriv_phi_le hϱ hw hwL hk hk3 u).trans - (add_le_add (abs_iteratedDeriv_fP_le hϱ hB hw hk hk3 u) (abs_iteratedDeriv_fM_le hϱ hB hw hk hk3 u)) - -lemma integral_indicator_Ioo_const {a b M : ℝ} (hab : a ≤ b) : - ∫ u, (Set.Ioo a b).indicator (fun _ => M) u = M * (b - a) := by - rw [integral_indicator_const _ measurableSet_Ioo, measureReal_def, Real.volume_Ioo, - ENNReal.toReal_ofReal (by linarith), smul_eq_mul, mul_comm] - -open Taper in /-- **‖φ^{(k)}‖_{L¹} ≤ 2B·w^{1−k}** for 1 ≤ k ≤ 3 (2w ≤ L). -/ -theorem integral_abs_iteratedDeriv_phi_le (hϱ : TaperProfile ϱ) {B : ℝ} (hB0 : 0 ≤ B) +theorem integral_abs_iteratedDeriv_phi_le (hϱ : TaperProfile ϱ) {B : ℝ} (_hB0 : 0 ≤ B) (hB : ∀ i : ℕ, 1 ≤ i → i ≤ 3 → ∀ x : ℝ, |iteratedDeriv i ϱ x| ≤ B) (hw : 0 < w) (hwL : 2 * w ≤ L) {k : ℕ} (hk : 1 ≤ k) (hk3 : k ≤ 3) : - ∫ u, |iteratedDeriv k (phi ϱ L w) u| ≤ 2 * ((w⁻¹) ^ k * B) * w := by - set M : ℝ := (w⁻¹) ^ k * B with hM - have hM0 : 0 ≤ M := by positivity - set Rp := Set.Ioo (L / 2 - w) (L / 2) - set Rm := Set.Ioo (-(L / 2)) (w - L / 2) - have hIp : Integrable (Rp.indicator fun _ => M) := - (integrable_indicator_iff measurableSet_Ioo).mpr (integrableOn_const (by simp)) - have hIm : Integrable (Rm.indicator fun _ => M) := - (integrable_indicator_iff measurableSet_Ioo).mpr (integrableOn_const (by simp)) - calc ∫ u, |iteratedDeriv k (phi ϱ L w) u| - ≤ ∫ u, (Rp.indicator (fun _ => M) u + Rm.indicator (fun _ => M) u) := - integral_mono_of_nonneg (Eventually.of_forall fun u => abs_nonneg _) (hIp.add hIm) - (Eventually.of_forall fun u => abs_iteratedDeriv_phi_le_indicator hϱ hB hw hwL hk hk3 u) - _ = M * w + M * w := by - rw [integral_add hIp hIm, integral_indicator_Ioo_const (by linarith), - integral_indicator_Ioo_const (by linarith)] - ring - _ = 2 * M * w := by ring + ∫ u, |iteratedDeriv k (Taper.phi ϱ L w) u| ≤ 2 * ((w⁻¹) ^ k * B) * w := + Taper.integral_abs_iteratedDeriv_phi_le_of_bound hϱ hw hwL hk + (hϱ.contDiff.of_le (by exact_mod_cast hk3)) (hB k hk hk3) end Ramps diff --git a/zeta23/Zeta23/XiPrime/FamilyHypsV.lean b/zeta23/Zeta23/XiPrime/FamilyHypsV.lean index cda9409e7d..5436496f90 100644 --- a/zeta23/Zeta23/XiPrime/FamilyHypsV.lean +++ b/zeta23/Zeta23/XiPrime/FamilyHypsV.lean @@ -22,8 +22,7 @@ Leibniz + iteratedDeriv_comp_const_mul (|(h̃(·/L))^{(i)}| ≤ H·L^{−i}) + t (k ≥ 1) and ∫|φ| ≤ L give ‖φ_v^{(j)}‖₁ ≤ 2^j·(2B+1)·H ≤ 8(2B+1)H, uniformly in T (L ≥ 1, w ≥ 1). -/ import Zeta23.XiPrime.FamilyHyps -import Zeta23.XiPrime.QuarticWindow.Params -import Zeta23.XiPrime.QuarticWindow.ModWindow +import Zeta23.ThmD.ModWindow import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Topology.MetricSpace.Thickening @@ -220,7 +219,7 @@ theorem integral_abs_iteratedDeriv_mul_le (hϱ : TaperProfile ϱ) {B : ℝ} (hB0 exact ((hφcd.continuous_iteratedDeriv j (by exact_mod_cast hj)).integrable_of_hasCompactSupport (FamilyHypsC3.hasCompactSupport_iteratedDeriv' (Taper.phi_hasCompactSupport hϱ hw) j)).abs have hGint : Integrable G := by - refine integrable_finset_sum _ fun i hi => ?_ + refine MeasureTheory.integrable_finsetSum _ fun i hi => ?_ exact ((hφj_int (k - i) (by omega)).const_mul _).const_mul _ have hpt : ∀ u : ℝ, |iteratedDeriv k (g * φ) u| ≤ G u := by intro u @@ -273,7 +272,7 @@ theorem integral_abs_iteratedDeriv_mul_le (hϱ : TaperProfile ϱ) {B : ℝ} (hB0 (Eventually.of_forall hpt) _ = ∑ i ∈ Finset.range (k + 1), ∫ u, (k.choose i : ℝ) * ((L⁻¹) ^ i * H * |iteratedDeriv (k - i) φ u|) := by - rw [hG, integral_finset_sum _ (fun i hi => + rw [hG, MeasureTheory.integral_finsetSum _ (fun i hi => ((hφj_int (k - i) (by omega)).const_mul _).const_mul _)] _ ≤ ∑ i ∈ Finset.range (k + 1), (k.choose i : ℝ) * ((2 * B + 1) * H) := Finset.sum_le_sum hterm _ = (2:ℝ) ^ k * ((2 * B + 1) * H) := by @@ -330,11 +329,6 @@ theorem _root_.Zeta23.XiPrime.familyHyps_atV {P : Params} (hP : P.Valid) (hlam : · rw [hF] exact integral_abs_iteratedDeriv_mul_le hP.taper hB0 hB hw1 hwL hL1 hh hH1 hH hj1 hj3 -/-- the quartic instance: the 0.86864 / 0.93432 ξ′ window family. -/ -theorem _root_.Zeta23.XiPrime.familyHyps_atV_quartic {P : Params} (hP : P.Valid) (hlam : P.lam < 1) - (hv : WindowProfile vQuartic) : FamilyHyps (P.atV vQuartic) := - familyHyps_atV hP hlam hv - end FamilyHypsV end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Final.lean b/zeta23/Zeta23/XiPrime/Final.lean index e977c23ce5..c65eed0ad8 100644 --- a/zeta23/Zeta23/XiPrime/Final.lean +++ b/zeta23/Zeta23/XiPrime/Final.lean @@ -46,29 +46,13 @@ uniformly for k ≤ log log T/(2 log log log T)); at k = 1 these are 0.4 and 0.4 ϱ is the taper profile of the test window (any TaperProfile; the tree's stdProfile = Real.smoothTransition is supplied in the *_std corollaries so that no profile variable remains). -/ -import Zeta23.XiPrime.Assembly import Zeta23.XiPrime.Inputs import Zeta23.XiPrime.Certificate -import Zeta23.XiPrime.Window -import Zeta23.XiPrime.QuarticWindow.ZeroSide -import Zeta23.XiPrime.Seam -import Zeta23.XiPrime.ZeroCount -import Zeta23.XiPrime.ExplicitFormula.ZeroFree import Zeta23.XiPrime.ExplicitFormula.Main import Zeta23.XiPrime.Coeff import Zeta23.XiPrime.Coeff.Reexpansion import Zeta23.XiPrime.FamilyFlat -import Zeta23.XiPrime.FamilyHyps import Zeta23.XiPrime.FamilyHypsV -import Zeta23.XiPrime.Hardy.ZeroFree -import Zeta23.XiPrime.Hardy.Seam -import Zeta23.XiPrime.Hardy.Count -import Zeta23.XiPrime.Hardy.EFFinal -import Zeta23.XiPrime.Hardy.ZFunction -import Zeta23.Taper.Gevrey -import Zeta23.Defs.Profile -import Zeta23.RvM.Statement -import Zeta23.Statement.SeamClosed noncomputable section @@ -123,11 +107,6 @@ theorem xiDeriv_simple_on_line_flat : (coeffMoments_flat_xi _ xiDerivZeros₀_rvm hϱ hl0 hl2 xiCoeffFamily_hyps) (traceTransfer_flat _ xiDerivZeros₀_rvm hϱ hl0 hl2 (xiEF_flat hϱ hl0 hl2) hρ₀ hE)) -include hϱ in -/-- the same sentence, as the Prop HeadlineFlat stated in Statement.lean (rfl repackaging). -/ -theorem headlineFlat : HeadlineFlat := - xiDeriv_simple_on_line_flat hϱ - include hϱ in /-- **[XF′ Thm 8.2] — ξ′, flat window, cumulative heights (0,T].** There is T₀ such that for every T ≥ T₀: 0.85838 · N_{ξ′}(0,T) ≤ N⁰ˢ_{ξ′}(0,T) and 0.92919 · N_{ξ′}(0,T) ≤ N_{d,ξ′}(0,T) @@ -148,10 +127,6 @@ theorem xiDeriv_simple_on_line_flat_cumulative : (coeffMoments_flat_xi _ xiDerivZeros₀_rvm hϱ hl0 hl2 xiCoeffFamily_hyps) (traceTransfer_flat _ xiDerivZeros₀_rvm hϱ hl0 hl2 (xiEF_flat hϱ hl0 hl2) hρ₀ hE))) -include hϱ in -theorem headlineCumulative_flat : HeadlineCumulative 0.85838 0.92919 := - xiDeriv_simple_on_line_flat_cumulative hϱ - end Flat /-! ### The same with the tree's concrete profile ϱ := stdProfile (= Real.smoothTransition), so that the @@ -159,20 +134,6 @@ type mentions no profile variable. -/ section FlatStd -/-- Unconditional (ϱ := stdProfile = Real.smoothTransition). -/ -theorem xiDeriv_simple_on_line_flat_std : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.85838 : ℝ) * (Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (0.92919 : ℝ) * (Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) := - xiDeriv_simple_on_line_flat taperProfile_stdProfile - -/-- Unconditional, cumulative. -/ -theorem xiDeriv_simple_on_line_flat_cumulative_std : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.85838 : ℝ) * (Ncount 0 T : ℝ) ≤ (N0simple 0 T : ℝ) ∧ - (0.92919 : ℝ) * (Ncount 0 T : ℝ) ≤ (Ndist 0 T : ℝ) := - xiDeriv_simple_on_line_flat_cumulative taperProfile_stdProfile - end FlatStd /-! ## The hypothesis-free theorem @@ -183,13 +144,6 @@ Zeta23/Taper/Gevrey.lean) the window-regularity class FamilyHyps of the explicit section Unconditional -/-- The explicit formula for ξ′ for the flat family at ϱ₂, every λ ∈ (0,1) — a theorem: `xiEF` -with (F2) := `xiDerivZerosInStrip_holds`, the seam := `xiDerivSeam_of_strip`, -FamilyHyps := `familyHyps_flat_gevrey`. -/ -theorem xiEF_flat_rhoTwo {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - XiEF xiDerivZeros₀ (fun _ => paramsOf Taper.rhoTwo lam) := - xiEF_xiDerivZeros _ _ (familyHyps_flat_gevrey Taper.gevreyProfile_rhoTwo h0 h1) - /-- **[XF′ Thm 8.2] for ξ′ — unconditional, no hypotheses.** There is T₀ such that for every T ≥ T₀: 0.85838 · N_{ξ′}(T,2T) ≤ N⁰ˢ_{ξ′}(T,2T) and 0.92919 · N_{ξ′}(T,2T) ≤ N_{d,ξ′}(T,2T), where N_{ξ′}(T,2T) is the number of zeros ρ₁ of ξ′ (ξ = Riemann's xi-function, Defs.xi, identified with Mathlib's @@ -210,145 +164,14 @@ theorem xiDeriv_simple_on_line_cumulative : (0.92919 : ℝ) * (Ncount 0 T : ℝ) ≤ (Ndist 0 T : ℝ) := xiDeriv_simple_on_line_flat_cumulative Taper.gevreyProfile_rhoTwo.taper -/-- **[XF′ Thm 8.2] at every fixed λ ∈ (0,1), flat window — unconditional:** for every ε > 0 and all large T, -(2 − κ₁(λ) − ε)·N_{ξ′}(T,2T) ≤ N⁰ˢ_{ξ′}(T,2T) and (3/2 − κ₁(λ)/2 − ε)·N_{ξ′}(T,2T) ≤ N_{d,ξ′}(T,2T), κ₁(λ) := kappaXi λ vFlat -= 1/c_λ(flat; D₁) with the full series D₁ (Statement.FixedLamBounds). -/ -theorem xiDeriv_fixedLamBounds {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : FixedLamBounds vFlat lam := by - obtain ⟨e, ρ₀, A, T₁, hρ₀, hE⟩ := xiReexpansion - exact fixedLam_flat _ _ xiDerivZeros₀_rvm Taper.gevreyProfile_rhoTwo.taper h0 h1 - (coeffMoments_flat_xi _ xiDerivZeros₀_rvm Taper.gevreyProfile_rhoTwo.taper h0 h1 xiCoeffFamily_hyps) - (traceTransfer_flat _ xiDerivZeros₀_rvm Taper.gevreyProfile_rhoTwo.taper h0 h1 (xiEF_flat_rhoTwo h0 h1) - hρ₀ hE) - -/-- **[XF′ Thm 8.2], the literal λ → 1⁻ form, flat window — unconditional:** for every ε > 0 and all large T, -(2 − κ₁(1) − ε)·N_{ξ′}(T,2T) ≤ N⁰ˢ_{ξ′}(T,2T) and (3/2 − κ₁(1)/2 − ε)·N_{ξ′}(T,2T) ≤ N_{d,ξ′}(T,2T), where -κ₁(1) = kappaXi 1 vFlat = 1/λ + 2∫₀¹(1−r)D₁(λr)dr at λ = 1 ([XF′]: 2 − κ₁(1) = 0.858383…). From the fixed-λ form by -continuity of λ ↦ κ₁(λ) on (0,1] (continuousOn_kappaXi_vFlat + eps_form_of_continuousOn). -/ -theorem xiDeriv_simple_on_line_limitForm : - ∀ ε > 0, ∃ T₀ : ℝ, ∀ T ≥ T₀, - (2 - kappaXi 1 vFlat - ε) * (Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (3 / 2 - kappaXi 1 vFlat / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) := by - have hκ : ContinuousOn (fun lam => kappaXi lam vFlat) (Set.Icc (1/2) 1) := - continuousOn_kappaXi_vFlat.mono fun x hx => ⟨by linarith [hx.1], hx.2⟩ - have hA := eps_form_of_continuousOn (g := fun lam => 2 - kappaXi lam vFlat) - (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (N0simple T (2 * T) : ℝ)) - (continuousOn_const.sub hκ) (fun _ => Nat.cast_nonneg _) - (fun lam hl1 hl2 ε hε => by - obtain ⟨T₀, hT₀⟩ := xiDeriv_fixedLamBounds (by linarith) hl2 ε hε - exact ⟨T₀, fun T hT => (hT₀ T hT).1⟩) - have hB := eps_form_of_continuousOn (g := fun lam => 3 / 2 - kappaXi lam vFlat / 2) - (N := fun T => (Ncount T (2 * T) : ℝ)) (lower := fun T => (Ndist T (2 * T) : ℝ)) - (continuousOn_const.sub (hκ.div_const 2)) (fun _ => Nat.cast_nonneg _) - (fun lam hl1 hl2 ε hε => by - obtain ⟨T₀, hT₀⟩ := xiDeriv_fixedLamBounds (by linarith) hl2 ε hε - exact ⟨T₀, fun T hT => (hT₀ T hT).2⟩) - intro ε hε - obtain ⟨T₁, hT₁⟩ := hA ε hε - obtain ⟨T₂, hT₂⟩ := hB ε hε - exact ⟨max T₁ T₂, fun T hT => - ⟨hT₁ T ((le_max_left _ _).trans hT), hT₂ T ((le_max_right _ _).trans hT)⟩⟩ - /-- Non-vacuity companions. The counted sets are finite — so Ncount (a finsum) and N0simple/Ndist (ncard's) are honest cardinalities, not Lean's junk value 0 for infinite sets — and the denominator N_{ξ′}(T,2T) → ∞. -/ theorem zerosIn_finite (T₁ T₂ : ℝ) : (zerosIn T₁ T₂).Finite := by have h := xiDerivZeros₀.window_finite T₁ T₂ rwa [show xiDerivZeros₀.window T₁ T₂ = zerosIn T₁ T₂ from xiDerivZeros_window _ _ _ _] at h -theorem tendsto_Ncount_atTop : Tendsto (fun T => (Ncount T (2 * T) : ℝ)) atTop atTop := by - simpa [xiDerivZeros₀] using Assembly.tendsto_N_atTop xiDerivZeros₀ xiDerivZeros₀_rvm - -/-- the Props stated in Statement.lean, unconditionally. -/ -theorem headlineFlat_unconditional : HeadlineFlat := xiDeriv_simple_on_line - -theorem headlineCumulative_unconditional : HeadlineCumulative 0.85838 0.92919 := - xiDeriv_simple_on_line_cumulative - end Unconditional -/-! ## The same proportions against the zeta zero count N(T,2T) ([XF′ (F3)]: N_{ξ′}(T) = N(T) + O(log T)) - -Both configurations obey Riemann–von Mangoldt with the same main term (T/2π)ℓ₁ (ξ′: xiDerivZeros₀_rvm; ζ: -Zeta23.RvM.riemannVonMangoldt Zeta23.gammaFacts), so N_{ξ′}(T,2T) ≥ (1−δ)N_ζ(T,2T) eventually for every δ > 0, and the strict -certificate margin absorbs the δ. N_ζ = Zeta23.Ncount = the nontrivial zeros of Mathlib's riemannZeta in T < Im ≤ 2T -with multiplicity (Zeta23/Statement.lean). -/ - -section VsZeta - -open Asymptotics in -/-- N_{ξ′}(T,2T) ≥ (1 − δ)·N_ζ(T,2T) eventually, every δ > 0. -/ -theorem eventually_zetaCount_le_Ncount (δ : ℝ) (hδ : 0 < δ) : - ∀ᶠ T in atTop, (1 - δ) * (Zeta23.zetaZeroConfig.N T (2 * T) : ℝ) ≤ (Ncount T (2 * T) : ℝ) := by - have hRζ : RiemannVonMangoldt Zeta23.zetaZeroConfig := Zeta23.RvM.riemannVonMangoldt Zeta23.gammaFacts - obtain ⟨C₁, T₁, h₁⟩ := xiDerivZeros₀_rvm.main - obtain ⟨C₂, T₂, h₂⟩ := hRζ.main - -- (|C₁| + |C₂|)·log T = o(N_ζ) - have ho : (fun T => (|C₁| + |C₂|) * Real.log T) =o[atTop] fun T => (Zeta23.zetaZeroConfig.N T (2 * T) : ℝ) := - Assembly.isLittleO_N_of_isLittleO_Tl _ hRζ (Assembly.isLittleO_log_Tl.const_mul_left _) - filter_upwards [ho.def hδ, eventually_ge_atTop T₁, eventually_ge_atTop T₂, eventually_ge_atTop (1:ℝ)] - with T hsmall hT₁ hT₂ hT1 - have hN0 : 0 ≤ (Zeta23.zetaZeroConfig.N T (2 * T) : ℝ) := Nat.cast_nonneg _ - have hlog : 0 ≤ Real.log T := Real.log_nonneg hT1 - rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg hN0, abs_of_nonneg (by positivity)] at hsmall - have a₁ := (abs_le.mp (h₁ T hT₁)).1 - have a₂ := (abs_le.mp (h₂ T hT₂)).2 - have e : (xiDerivZeros₀.N T (2 * T) : ℝ) = (Ncount T (2 * T) : ℝ) := by simp [xiDerivZeros₀] - rw [e] at a₁ - have hC₁ : C₁ * Real.log T ≤ |C₁| * Real.log T := mul_le_mul_of_nonneg_right (le_abs_self _) hlog - have hC₂ : C₂ * Real.log T ≤ |C₂| * Real.log T := mul_le_mul_of_nonneg_right (le_abs_self _) hlog - nlinarith - -/-- **vs. N_ζ — unconditional:** there is T₀ such that for every T ≥ T₀, - 0.85838 · N_ζ(T,2T) ≤ N⁰ˢ_{ξ′}(T,2T) and 0.92919 · N_ζ(T,2T) ≤ N_{d,ξ′}(T,2T), -N_ζ(T,2T) = Zeta23.Ncount T (2T) = # nontrivial zeros of ζ with T < Im ≤ 2T, with multiplicity. ("At least 85.838 % of -N(T,2T)": that many simple critical-line zeros of ξ′ at height in (T,2T].) -/ -theorem xiDeriv_simple_vs_zetaCount : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.85838 : ℝ) * (Zeta23.Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (0.92919 : ℝ) * (Zeta23.Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) := by - obtain ⟨lam, hl1, hl2, hc, hcd⟩ := certFlat - have hl0 : 0 < lam := by linarith - have hfix := xiDeriv_fixedLamBounds hl0 hl2 - have hκ : 0 ≤ kappaXi lam vFlat := (kappaXi_pos_vFlat hl0 hl2.le).le - refine headline_of_strict (N := fun T => (Zeta23.Ncount T (2 * T) : ℝ)) - (lowS := fun T => (N0simple T (2 * T) : ℝ)) (lowD := fun T => (Ndist T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) hc hcd ?_ - intro ε hε - -- ε/2 on the ξ′ side, δ := ε/8 on the count side ((2−κ)·δ ≤ 2δ ≤ ε/4 ≤ ε/2) - obtain ⟨T₁, hT₁⟩ := hfix (ε / 2) (by linarith) - obtain ⟨T₂, hT₂⟩ := eventually_atTop.mp (eventually_zetaCount_le_Ncount (ε / 8) (by linarith)) - refine ⟨max T₁ T₂, fun T hT => ?_⟩ - obtain ⟨hA, hB⟩ := hT₁ T ((le_max_left _ _).trans hT) - have hz := hT₂ T ((le_max_right _ _).trans hT) - have ez : (Zeta23.zetaZeroConfig.N T (2 * T) : ℝ) = (Zeta23.Ncount T (2 * T) : ℝ) := by - simp [Zeta23.zetaZeroConfig] - rw [ez] at hz - have hNζ : 0 ≤ (Zeta23.Ncount T (2 * T) : ℝ) := Nat.cast_nonneg _ - have hNξ : 0 ≤ (Ncount T (2 * T) : ℝ) := Nat.cast_nonneg _ - have hκ2 : kappaXi lam vFlat ≤ 2 := by linarith - have hS0 : 0 ≤ (N0simple T (2 * T) : ℝ) := Nat.cast_nonneg _ - have hD0 : 0 ≤ (Ndist T (2 * T) : ℝ) := Nat.cast_nonneg _ - show (2 - kappaXi lam vFlat - ε) * (Zeta23.Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (3 / 2 - kappaXi lam vFlat / 2 - ε) * (Zeta23.Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) - constructor - · by_cases h : 0 ≤ 2 - kappaXi lam vFlat - ε - · have h2 : 0 ≤ 2 - kappaXi lam vFlat - ε / 2 := by linarith - have step := mul_le_mul_of_nonneg_left hz h2 - have k1 : 0 ≤ 4 - (2 - kappaXi lam vFlat) + ε / 2 := by linarith - have key := mul_nonneg (mul_nonneg hε.le k1) hNζ - linarith [step, hA, key] - · have h' : 2 - kappaXi lam vFlat - ε < 0 := lt_of_not_ge h - nlinarith [h', hNζ, hS0] - · by_cases h : 0 ≤ 3 / 2 - kappaXi lam vFlat / 2 - ε - · have h2 : 0 ≤ 3 / 2 - kappaXi lam vFlat / 2 - ε / 2 := by linarith - have step := mul_le_mul_of_nonneg_left hz h2 - have k1 : 0 ≤ 4 - (3 / 2 - kappaXi lam vFlat / 2) + ε / 2 := by linarith - have key := mul_nonneg (mul_nonneg hε.le k1) hNζ - linarith [step, hB, key] - · have h' : 3 / 2 - kappaXi lam vFlat / 2 - ε < 0 := lt_of_not_ge h - nlinarith [h', hNζ, hD0] - -end VsZeta - /-! ## The quartic window v(s) = 1 − (7/100)(2s)² − (51/200)(2s)⁴ [XF′ Thm 8.2, optimal-window line] Same binder list as the flat case: the extra input (the zero-side facts for the height family @@ -389,10 +212,6 @@ theorem xiDeriv_simple_on_line_quartic : (traceTransfer_quartic _ xiDerivZeros₀_rvm hϱ hl0 hl2 (xiEF_atV hϱ hl0 hl2 windowProfile_vQuartic) hρ₀ hE)) -include hϱ in -theorem headlineQuartic : HeadlineQuartic := - xiDeriv_simple_on_line_quartic hϱ - include hϱ in /-- **[XF′ Thm 8.2] — ξ′, quartic window, cumulative heights (0,T]:** 0.86864·N_{ξ′}(0,T) ≤ N⁰ˢ_{ξ′}(0,T) and 0.93432·N_{ξ′}(0,T) ≤ N_{d,ξ′}(0,T) for all large T. Same conditions. -/ @@ -413,10 +232,6 @@ theorem xiDeriv_simple_on_line_quartic_cumulative : (traceTransfer_quartic _ xiDerivZeros₀_rvm hϱ hl0 hl2 (xiEF_atV hϱ hl0 hl2 windowProfile_vQuartic) hρ₀ hE))) -include hϱ in -theorem headlineCumulative_quartic : HeadlineCumulative 0.86864 0.93432 := - xiDeriv_simple_on_line_quartic_cumulative hϱ - end Quartic /-- **[XF′ Thm 8.2], quartic (near-optimal) window — unconditional, no hypotheses:** for all large T, @@ -434,166 +249,6 @@ theorem xiDeriv_simple_on_line_quartic_cumulative_std : (0.93432 : ℝ) * (Ncount 0 T : ℝ) ≤ (Ndist 0 T : ℝ) := xiDeriv_simple_on_line_quartic_cumulative taperProfile_stdProfile -theorem headlineQuartic_unconditional : HeadlineQuartic := xiDeriv_simple_on_line_quartic_std - -theorem headlineCumulative_quartic_unconditional : HeadlineCumulative 0.86864 0.93432 := - xiDeriv_simple_on_line_quartic_cumulative_std - -/-! ## Z′ — the stationary points of Hardy's function [XF′ §9, Thm 9.4] - -W := ζ′ + L₂ζ (Defs.hardyW) is the Mathlib-honest meromorphic function with Z′(t) = i e^{iϑ(t)} W(½+it) -[XF′ (Z3)], so "t ∈ (T,2T], Z′(t) = 0 ≠ Z″(t)" is "½+it is a simple zero of W" and NcountW counts all non-real -zeros of W in the height window. The W headline is assembled by the same spine at Z := the zeros of W with -|Im| ≥ t_W. Inputs, all proved in this tree: (Z6)(iii) — there is t_W > 0 above which every zero of W lies in -the open strip — wZerosInStrip_holds (reflection-symmetry positivity Σ_{|γ|≤T} m_ρ(1−β_ρ) = N_T/2 beats -Re L₋ = O(1/t²); no Littlewood gap theorem, no zero-free region); the W seam wSeam_of_strip; the -zero-side family facts (windowZeroSide_flat); the prime side for wCoeffFamily (wCoeffFamily_hyps + the ξ′ prime -side; same density D₁ ⇒ same κ₁ ⇒ the same certificate certFlat). (Z7) H-RvM + local count for W — -riemannVonMangoldt_W. The W two-trace transfer wTraceTransfer_of with wReexpansion -(Inputs.traceTransfer_flat_w). The W explicit formula WEF (StatementW.lean) for the flat family -(wEF_flat below), so the W headlines carry no hypothesis beyond the taper binder hϱ. -/ - -/-- the height t_W > 0 above which all zeros of W are in the open critical strip (from wZerosInStrip_holds). -/ -def wStripHeight : ℝ := Classical.choose wZerosInStrip_holds - -theorem wStripHeight_pos : 0 < wStripHeight := (Classical.choose_spec wZerosInStrip_holds).1 - -theorem wZerosInStrip_wStripHeight : WZerosInStrip wStripHeight := (Classical.choose_spec wZerosInStrip_holds).2 - -/-- The W seam facts at `t_W`, obtained as a theorem via `wSeam_of_strip`. -/ -theorem wSeam_wStripHeight : WSeam wStripHeight := wSeam_of_strip wStripHeight_pos wZerosInStrip_wStripHeight - -/-- **The zeros of W with |Im| ≥ t_W, all of them, with multiplicity — hypothesis-free configuration.** -/ -def wZeros₀ : ZeroConfig := wZeros wZerosInStrip_wStripHeight wSeam_wStripHeight - -/-- (Z7) for W, hypothesis-free: Riemann–von Mangoldt + local count for the zeros of W above t_W. -/ -theorem wZeros₀_rvm : RiemannVonMangoldt wZeros₀ := riemannVonMangoldt_W wZerosInStrip_wStripHeight wSeam_wStripHeight - -/-- **The W explicit formula for the flat family, any C³ taper, every λ ∈ (0,1)** — the W explicit formula wEF -(assembled from EFExpansion, EFContour, the test-weight / Gram-bridge / low-zero facts and the pole + L-series facts) instantiated at -(Z6) := wZerosInStrip_holds, seam := wSeam_of_strip, (Z7) := riemannVonMangoldt_W, FamilyHyps := familyHyps_flat. -/ -theorem wEF_flat {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) : - WEF wZeros₀ (fun _ => paramsOf ϱ lam) := - wEF wZerosInStrip_wStripHeight wSeam_wStripHeight wZeros₀_rvm _ (familyHyps_flat (paramsOf_valid hϱ h0 h1.le) h1) - -section HardyFlat - -variable {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) - -include hϱ in -/-- **[XF′ Thm 9.4] — Z′, flat window:** there is T₀ such that for every T ≥ T₀, - 0.85838 · N_W(T,2T) ≤ #{ρ : W(ρ) = 0 simple, Re ρ = 1/2, T < Im ρ ≤ 2T} (= #{t ∈ (T,2T] : Z′(t) = 0 ≠ Z″(t)}), - 0.92919 · N_W(T,2T) ≤ N_{d,W}(T,2T), -where N_W counts all zeros of W with T < Im ≤ 2T with multiplicity. No hypotheses beyond "ϱ is a C³ taper profile" -(conclusion ϱ-free); hardyW_simple_on_line below is the binder-free instance. -/ -theorem hardyW_simple_on_line_flat : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.85838 : ℝ) * (NcountW T (2 * T) : ℝ) ≤ (N0simpleW T (2 * T) : ℝ) ∧ - (0.92919 : ℝ) * (NcountW T (2 * T) : ℝ) ≤ (NdistW T (2 * T) : ℝ) := by - obtain ⟨lam, hl1, hl2, hc, hcd⟩ := certFlat - have hl0 : 0 < lam := by linarith - exact headline_of_strict (N := fun T => (NcountW T (2 * T) : ℝ)) - (lowS := fun T => (N0simpleW T (2 * T) : ℝ)) (lowD := fun T => (NdistW T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) hc hcd - (fixedLam_family_W wZerosInStrip_wStripHeight wSeam_wStripHeight wZeros₀_rvm hϱ hl0 hl2 - (windowZeroSide_flat wZeros₀ wZeros₀_rvm (paramsOf ϱ lam) (paramsOf_valid hϱ hl0 hl2.le)) - (coeffMoments_flat_w _ wZeros₀_rvm hϱ hl0 hl2 wCoeffFamily_hyps) - (traceTransfer_flat_w _ wZeros₀_rvm hϱ hl0 hl2 (wEF_flat hϱ hl0 hl2))) - -include hϱ in -theorem headlineW_flat : HeadlineW 0.85838 0.92919 := - hardyW_simple_on_line_flat hϱ - -end HardyFlat - -/-- **[XF′ Thm 9.4] — simple stationary points of Hardy's Z-function — unconditional, no hypotheses.** -There is T₀ such that for every T ≥ T₀: - 0.85838 · N_W(T,2T) ≤ N⁰ˢ_W(T,2T) and 0.92919 · N_W(T,2T) ≤ N_{d,W}(T,2T), -where W := ζ′ + L₂ζ = ζ′ − ½(χ′/χ)ζ (Defs.hardyW; Z′(t) = i e^{iϑ(t)} W(½+it) [XF′ (Z3)]), N_W(T,2T) counts all zeros of W with -T < Im ≤ 2T with multiplicity (NcountW), N⁰ˢ_W those that are simple with Re = 1/2 — equivalently the t ∈ (T,2T] with -Z′(t) = 0 ≠ Z″(t) — and N_{d,W} the distinct ones. So at least 85.838 % of the zeros of W (of "𝒵′") at height in (T,2T] -are simple and on the critical line, i.e. are simple real stationary points of Hardy's Z. -/ -theorem hardyW_simple_on_line : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.85838 : ℝ) * (NcountW T (2 * T) : ℝ) ≤ (N0simpleW T (2 * T) : ℝ) ∧ - (0.92919 : ℝ) * (NcountW T (2 * T) : ℝ) ≤ (NdistW T (2 * T) : ℝ) := - hardyW_simple_on_line_flat taperProfile_stdProfile - -theorem headlineW_unconditional : HeadlineW 0.85838 0.92919 := hardyW_simple_on_line - -/-! ### Z′ with the quartic window [XF′ Thm 9.4 "resp. 86.86 % (optimal window)"] -/ - -/-- the W explicit formula for the profiled family P.atV v, any C³ taper, any admissible profile. -/ -theorem wEF_atV {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) {v : ℝ → ℝ} - (hv : WindowProfile v) : WEF wZeros₀ ((paramsOf ϱ lam).atV v) := - wEF wZerosInStrip_wStripHeight wSeam_wStripHeight wZeros₀_rvm _ - (familyHyps_atV (paramsOf_valid hϱ h0 h1.le) h1 hv) - -/-- **[XF′ Thm 9.4], quartic window — any C³ taper:** 0.86864·N_W(T,2T) ≤ N⁰ˢ_W(T,2T) and 0.93432·N_W ≤ N_{d,W}, large T. -/ -theorem hardyW_simple_on_line_quartic {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.86864 : ℝ) * (NcountW T (2 * T) : ℝ) ≤ (N0simpleW T (2 * T) : ℝ) ∧ - (0.93432 : ℝ) * (NcountW T (2 * T) : ℝ) ≤ (NdistW T (2 * T) : ℝ) := by - obtain ⟨lam, hl1, hl2, hc, hcd⟩ := certQuartic - have hl0 : 0 < lam := by linarith - exact headline_of_strict (N := fun T => (NcountW T (2 * T) : ℝ)) - (lowS := fun T => (N0simpleW T (2 * T) : ℝ)) (lowD := fun T => (NdistW T (2 * T) : ℝ)) - (fun _ => Nat.cast_nonneg _) hc hcd - (fixedLam_family_W wZerosInStrip_wStripHeight wSeam_wStripHeight wZeros₀_rvm hϱ hl0 hl2 - (windowZeroSide_atV wZeros₀ wZeros₀_rvm (paramsOf_valid hϱ hl0 hl2.le)) - (coeffMoments_quartic_w _ wZeros₀_rvm hϱ hl0 hl2 wCoeffFamily_hyps) - (traceTransfer_quartic_w _ wZeros₀_rvm hϱ hl0 hl2 (wEF_atV hϱ hl0 hl2 windowProfile_vQuartic))) - -/-- **[XF′ Thm 9.4], quartic window — unconditional, no hypotheses:** at least 86.864 % of the zeros of W at height in -(T,2T] are simple real stationary points of Hardy's Z, at least 93.432 % are distinct. -/ -theorem hardyW_simple_on_line_quartic_std : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.86864 : ℝ) * (NcountW T (2 * T) : ℝ) ≤ (N0simpleW T (2 * T) : ℝ) ∧ - (0.93432 : ℝ) * (NcountW T (2 * T) : ℝ) ≤ (NdistW T (2 * T) : ℝ) := - hardyW_simple_on_line_quartic taperProfile_stdProfile - -theorem headlineW_quartic_unconditional : HeadlineW 0.86864 0.93432 := hardyW_simple_on_line_quartic_std - -/-! ## Z′ literally: simple real stationary points of Hardy's Z-function [XF′ (Z3) + Thm 9.4] - -Zeta23/XiPrime/Hardy/ZFunction.lean defines Hardy's Z branch-free: sline t := 1/2 + t·I, Gfun t := Γℝ(sline t), -ephase t := Gfun t / ‖Gfun t‖ (= e^{iϑ(t)} — no arg/log branch), ZC t := ephase t · ζ(sline t), hardyZ t := (ZC t).re, and proves -ZC is real, HasDerivAt ZC (I · ephase t · hardyW (sline t)) t for t ≠ 0 [(Z3)], hence Z′(t) = 0 ↔ W(½+it) = 0 and then -Z″(t) ≠ 0 ↔ the zero is simple, and ncard_simpleStationaryZ : for 0 < T, - #{t ∈ (T,2T] | Z′(t) = 0 ∧ Z″(t) ≠ 0} = N0simpleW T (2T). -/ - -section HardyZ - -/-- **Simple real stationary points of Hardy's Z — unconditional, no hypotheses** ([XF′ Thm 9.4], flat window): -there is T₀ such that for every T ≥ T₀, - 0.85838 · N_W(T,2T) ≤ #{t ∈ (T,2T] : Z′(t) = 0 and Z″(t) ≠ 0}, -N_W(T,2T) = NcountW T (2T) = the number of zeros of W = ζ′ − ½(χ′/χ)ζ with T < Im ≤ 2T, counted with multiplicity -(= N(T,2T) + O(log T), the zeta zero count, by Hardy.Count), Z = hardyZ Hardy's Z-function (ZFunction.lean). -/ -theorem hardyZ_simple_stationary_points : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.85838 : ℝ) * (NcountW T (2 * T) : ℝ) - ≤ ({t ∈ Set.Ioc T (2 * T) | deriv hardyZ t = 0 ∧ deriv (deriv hardyZ) t ≠ 0}.ncard : ℝ) := by - obtain ⟨T₀, h⟩ := hardyW_simple_on_line - refine ⟨max T₀ 1, fun T hT => ?_⟩ - have hT0 : 0 < T := by linarith [le_max_right T₀ 1] - have := (h T (le_trans (le_max_left _ _) hT)).1 - rw [← ncard_simpleStationaryZ hT0] at this - simpa [simpleStationaryZ] using this - -/-- the same with the quartic window: **0.86864 · N_W(T,2T) ≤ #{t ∈ (T,2T] : Z′(t) = 0 ≠ Z″(t)}**, unconditionally. -/ -theorem hardyZ_simple_stationary_points_quartic : - ∃ T₀ : ℝ, ∀ T ≥ T₀, - (0.86864 : ℝ) * (NcountW T (2 * T) : ℝ) - ≤ ({t ∈ Set.Ioc T (2 * T) | deriv hardyZ t = 0 ∧ deriv (deriv hardyZ) t ≠ 0}.ncard : ℝ) := by - obtain ⟨T₀, h⟩ := hardyW_simple_on_line_quartic_std - refine ⟨max T₀ 1, fun T hT => ?_⟩ - have hT0 : 0 < T := by linarith [le_max_right T₀ 1] - have := (h T (le_trans (le_max_left _ _) hT)).1 - rw [← ncard_simpleStationaryZ hT0] at this - simpa [simpleStationaryZ] using this - -end HardyZ - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/Basic.lean b/zeta23/Zeta23/XiPrime/Hardy/Basic.lean deleted file mode 100644 index 4d33d26edc..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/Basic.lean +++ /dev/null @@ -1,289 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/Basic.lean — analytic facts about χ, L₂ and W := ζ′ − ½(χ′/χ)ζ OFF THE REAL AXIS -(W zero side; [XF′ §9.0–9.1 (Z2)]). - -Everything here is at points s with Im s ≠ 0, where Γℝ(s), Γℝ(1−s) are analytic and nonzero, ζ, ζ′ are analytic -(s ≠ 1), hence χ = Γℝ(1−s)/Γℝ(s) is an analytic unit, L₂ = −½ χ′/χ = ½[(Γℝ′/Γℝ)(s) + (Γℝ′/Γℝ)(1−s)] is analytic, -and W = ζ′ + L₂ζ is analytic. Exports: ζ(s) = χ(s)ζ(1−s) (zeta_eq_chiFE_mul); L₂(1−s) = L₂(s), L₂(s̄) = conj L₂(s); -W(s̄) = conj W(s); the functional equation **W(s) = −χ(s)·W(1−s)**; hence IsWZero (reflect ρ) ↔ IsWZero ρ and -analyticOrderAt hardyW (reflect ρ) = analyticOrderAt hardyW ρ. --/ -import Zeta23.XiPrime.Statement -import Zeta23.ZetaReflect -import Zeta23.RvM.Fold -import Zeta23.RvM.GammaSide -import Zeta23.RvM.CountByIntegral -import Zeta23.WeilEF.XiLogDeriv -import Mathlib.Analysis.SpecialFunctions.Gamma.Deligne -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Calculus.Deriv.Shift - -open Complex Set Filter Topology -open scoped ComplexConjugate - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy - -/-! ### §1. Γℝ off the real axis -/ - -lemma ne_neg_nat_of_im_ne_zero {s : ℂ} (hs : s.im ≠ 0) (m : ℕ) : s ≠ -(m : ℂ) := by - intro h; apply hs; rw [h]; simp - -lemma ne_one_of_im_ne_zero {s : ℂ} (hs : s.im ≠ 0) : s ≠ 1 := by - intro h; apply hs; rw [h]; simp - -lemma ne_zero_of_im_ne_zero {s : ℂ} (hs : s.im ≠ 0) : s ≠ 0 := by - intro h; apply hs; rw [h]; simp - -lemma im_one_sub_ne_zero {s : ℂ} (hs : s.im ≠ 0) : (1 - s).im ≠ 0 := by - simpa using hs - -lemma half_ne_neg_nat {s : ℂ} (hs : s.im ≠ 0) (m : ℕ) : s / 2 ≠ -(m : ℂ) := by - intro h; apply hs - have : (s / 2).im = 0 := by rw [h]; simp - simpa using this - -lemma Gammaℝ_ne_zero_of_im_ne_zero {s : ℂ} (hs : s.im ≠ 0) : Gammaℝ s ≠ 0 := by - rw [Ne, Gammaℝ_eq_zero_iff, not_exists] - intro n h; apply hs; rw [h]; simp - -/-- Γℝ is complex-differentiable at every non-real point. -/ -lemma differentiableAt_Gammaℝ_of_im_ne_zero {s : ℂ} (hs : s.im ≠ 0) : DifferentiableAt ℂ Gammaℝ s := by - have h1 : DifferentiableAt ℂ (fun z : ℂ => (Real.pi : ℂ) ^ (-z / 2)) s := by - refine DifferentiableAt.const_cpow ?_ (Or.inl (by exact_mod_cast Real.pi_ne_zero)) - exact (differentiableAt_id.neg).div_const 2 - have h2 : DifferentiableAt ℂ (fun z : ℂ => Complex.Gamma (z / 2)) s := - (Complex.differentiableAt_Gamma _ (half_ne_neg_nat hs)).comp s (differentiableAt_id.div_const 2) - have : Gammaℝ = fun z : ℂ => (Real.pi : ℂ) ^ (-z / 2) * Complex.Gamma (z / 2) := funext Gammaℝ_def - rw [this]; exact h1.mul h2 - -lemma isOpen_im_ne_zero : IsOpen {s : ℂ | s.im ≠ 0} := isOpen_ne_fun Complex.continuous_im continuous_const - -lemma analyticAt_Gammaℝ_of_im_ne_zero {s : ℂ} (hs : s.im ≠ 0) : AnalyticAt ℂ Gammaℝ s := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - filter_upwards [isOpen_im_ne_zero.mem_nhds hs] with z hz - exact differentiableAt_Gammaℝ_of_im_ne_zero hz - -lemma analyticAt_Gammaℝ_one_sub {s : ℂ} (hs : s.im ≠ 0) : AnalyticAt ℂ (fun z => Gammaℝ (1 - z)) s := - (analyticAt_Gammaℝ_of_im_ne_zero (im_one_sub_ne_zero hs)).comp (analyticAt_const.sub analyticAt_id) - -/-! ### §2. χ and L₂ -/ - -lemma chiFE_def (s : ℂ) : chiFE s = Gammaℝ (1 - s) / Gammaℝ s := rfl - -lemma chiFE_analyticAt {s : ℂ} (hs : s.im ≠ 0) : AnalyticAt ℂ chiFE s := by - have : chiFE = fun z => Gammaℝ (1 - z) / Gammaℝ z := funext chiFE_def - rw [this] - exact (analyticAt_Gammaℝ_one_sub hs).div (analyticAt_Gammaℝ_of_im_ne_zero hs) - (Gammaℝ_ne_zero_of_im_ne_zero hs) - -lemma chiFE_ne_zero {s : ℂ} (hs : s.im ≠ 0) : chiFE s ≠ 0 := - div_ne_zero (Gammaℝ_ne_zero_of_im_ne_zero (im_one_sub_ne_zero hs)) (Gammaℝ_ne_zero_of_im_ne_zero hs) - -lemma chiFE_mul_chiFE_one_sub {s : ℂ} (hs : s.im ≠ 0) : chiFE s * chiFE (1 - s) = 1 := by - rw [chiFE_def, chiFE_def, sub_sub_cancel] - field_simp [Gammaℝ_ne_zero_of_im_ne_zero hs, Gammaℝ_ne_zero_of_im_ne_zero (im_one_sub_ne_zero hs)] - -/-- logDeriv χ = −(Γℝ′/Γℝ)(1−s) − (Γℝ′/Γℝ)(s). -/ -lemma logDeriv_chiFE {s : ℂ} (hs : s.im ≠ 0) : - logDeriv chiFE s = -(logDeriv Gammaℝ (1 - s)) - logDeriv Gammaℝ s := by - have hG := Gammaℝ_ne_zero_of_im_ne_zero hs - have hG1 := Gammaℝ_ne_zero_of_im_ne_zero (im_one_sub_ne_zero hs) - have e : chiFE = fun z => Gammaℝ (1 - z) / Gammaℝ z := funext chiFE_def - have hd1 : DifferentiableAt ℂ (fun z : ℂ => Gammaℝ (1 - z)) s := - (differentiableAt_Gammaℝ_of_im_ne_zero (im_one_sub_ne_zero hs)).comp s - ((differentiableAt_const (1:ℂ)).sub differentiableAt_id) - rw [e, logDeriv_div _ (by simpa using hG1) hG hd1 (differentiableAt_Gammaℝ_of_im_ne_zero hs)] - congr 1 - -- logDeriv (Γℝ ∘ (1 − ·)) s = −(logDeriv Γℝ)(1 − s) - rw [logDeriv_apply, logDeriv_apply] - have : deriv (fun z => Gammaℝ (1 - z)) s = -deriv Gammaℝ (1 - s) := by - rw [deriv_comp_const_sub] - rw [this]; ring - -/-- **L₂ = ½[(Γℝ′/Γℝ)(s) + (Γℝ′/Γℝ)(1−s)]** off the real axis. -/ -theorem L2_eq {s : ℂ} (hs : s.im ≠ 0) : L2 s = (logDeriv Gammaℝ s + logDeriv Gammaℝ (1 - s)) / 2 := by - rw [L2, logDeriv_chiFE hs]; ring - -theorem L2_one_sub {s : ℂ} (hs : s.im ≠ 0) : L2 (1 - s) = L2 s := by - rw [L2_eq hs, L2_eq (im_one_sub_ne_zero hs), sub_sub_cancel]; ring - -theorem L2_conj {s : ℂ} (hs : s.im ≠ 0) : L2 (conj s) = conj (L2 s) := by - have hs' : (conj s).im ≠ 0 := by simpa using hs - rw [L2_eq hs', L2_eq hs, map_div₀, map_add, ← Zeta23.RvM.logDeriv_Gammaℝ_conj, - ← Zeta23.RvM.logDeriv_Gammaℝ_conj, map_sub, map_one, map_ofNat] - -theorem L2_analyticAt {s : ℂ} (hs : s.im ≠ 0) : AnalyticAt ℂ L2 s := by - have e : L2 = fun z => -(1/2) * (deriv chiFE z / chiFE z) := by - funext z; rw [L2, logDeriv_apply] - rw [e] - exact analyticAt_const.mul ((chiFE_analyticAt hs).deriv.div (chiFE_analyticAt hs) (chiFE_ne_zero hs)) - -/-- χ′ = −2·L₂·χ. -/ -theorem deriv_chiFE {s : ℂ} (hs : s.im ≠ 0) : deriv chiFE s = -2 * L2 s * chiFE s := by - have h : L2 s = -(1/2) * (deriv chiFE s / chiFE s) := by rw [L2, logDeriv_apply] - rw [h]; field_simp [chiFE_ne_zero hs] - -/-! ### §3. ζ(s) = χ(s)·ζ(1−s) off the real axis -/ - -theorem zeta_eq_chiFE_mul {s : ℂ} (hs : s.im ≠ 0) : - riemannZeta s = chiFE s * riemannZeta (1 - s) := by - have hs0 := ne_zero_of_im_ne_zero hs - have hs1' : (1 - s) ≠ 0 := sub_ne_zero.mpr (ne_one_of_im_ne_zero hs).symm - have hG := Gammaℝ_ne_zero_of_im_ne_zero hs - have hG1 := Gammaℝ_ne_zero_of_im_ne_zero (im_one_sub_ne_zero hs) - have h1 := Zeta23.RvM.completedRiemannZeta_eq_Gammaℝ_mul hs0 hG - have h2 := Zeta23.RvM.completedRiemannZeta_eq_Gammaℝ_mul hs1' hG1 - have hΛ : completedRiemannZeta (1 - s) = completedRiemannZeta s := completedRiemannZeta_one_sub s - -- Γℝ(s)ζ(s) = Λ(s) = Λ(1−s) = Γℝ(1−s)ζ(1−s) - rw [chiFE_def] - field_simp - rw [h1, h2] at * - linear_combination -hΛ - -/-! ### §4. W off the real axis: analyticity, Schwarz reflection, the functional equation -/ - -lemma isOpen_ne_one : IsOpen ({1}ᶜ : Set ℂ) := isOpen_compl_singleton - -lemma analyticAt_riemannZeta {s : ℂ} (hs : s ≠ 1) : AnalyticAt ℂ riemannZeta s := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - filter_upwards [isOpen_ne_one.mem_nhds hs] with z hz - exact differentiableAt_riemannZeta hz - -lemma analyticAt_deriv_riemannZeta {s : ℂ} (hs : s ≠ 1) : AnalyticAt ℂ (deriv riemannZeta) s := - (analyticAt_riemannZeta hs).deriv - -/-- W is analytic at every non-real point. -/ -theorem hardyW_analyticAt {s : ℂ} (hs : s.im ≠ 0) : AnalyticAt ℂ hardyW s := by - have e : hardyW = fun z => deriv riemannZeta z + L2 z * riemannZeta z := funext fun z => rfl - rw [e] - exact (analyticAt_deriv_riemannZeta (ne_one_of_im_ne_zero hs)).add - ((L2_analyticAt hs).mul (analyticAt_riemannZeta (ne_one_of_im_ne_zero hs))) - -theorem hardyW_differentiableAt {s : ℂ} (hs : s.im ≠ 0) : DifferentiableAt ℂ hardyW s := - (hardyW_analyticAt hs).differentiableAt - -theorem hardyW_analyticOnNhd : AnalyticOnNhd ℂ hardyW {s : ℂ | s.im ≠ 0} := fun _ hs => hardyW_analyticAt hs - -/-- generic: a derivative inherits Schwarz reflection symmetry (local version). -/ -lemma deriv_conj_of_symm {f : ℂ → ℂ} {s : ℂ} (hd : DifferentiableAt ℂ f s) - (h : ∀ᶠ z in 𝓝 (conj s), f (conj z) = conj (f z)) : deriv f (conj s) = conj (deriv f s) := by - have h1 : HasDerivAt (fun z => conj (f (conj z))) (conj (deriv f s)) (conj s) := - hd.hasDerivAt.conj_conj - have h2 : (fun z => conj (f (conj z))) =ᶠ[𝓝 (conj s)] f := by - filter_upwards [h] with z hz - rw [hz, Complex.conj_conj] - exact (h1.congr_of_eventuallyEq h2.symm).deriv - -lemma deriv_riemannZeta_conj {s : ℂ} (hs : s ≠ 1) : - deriv riemannZeta (conj s) = conj (deriv riemannZeta s) := by - refine deriv_conj_of_symm (differentiableAt_riemannZeta hs) ?_ - have hs' : conj s ≠ 1 := by - intro h; apply hs; rw [← Complex.conj_conj s, h, map_one] - filter_upwards [isOpen_ne_one.mem_nhds hs'] with z hz - exact Zeta23.riemannZeta_conj (Set.mem_compl_singleton_iff.mp hz) - -/-- **W(s̄) = conj W(s)** off the real axis. -/ -theorem hardyW_conj {s : ℂ} (hs : s.im ≠ 0) : hardyW (conj s) = conj (hardyW s) := by - have hs1 := ne_one_of_im_ne_zero hs - show deriv riemannZeta (conj s) + L2 (conj s) * riemannZeta (conj s) = _ - rw [deriv_riemannZeta_conj hs1, L2_conj hs, Zeta23.riemannZeta_conj hs1, hardyW, map_add, map_mul] - -/-- ζ′(s) = χ′(s)ζ(1−s) − χ(s)ζ′(1−s) off the real axis. -/ -theorem deriv_riemannZeta_eq {s : ℂ} (hs : s.im ≠ 0) : - deriv riemannZeta s = deriv chiFE s * riemannZeta (1 - s) - chiFE s * deriv riemannZeta (1 - s) := by - have hev : riemannZeta =ᶠ[𝓝 s] fun z => chiFE z * riemannZeta (1 - z) := by - filter_upwards [isOpen_im_ne_zero.mem_nhds hs] with z hz - exact zeta_eq_chiFE_mul hz - rw [hev.deriv_eq] - have h1 : HasDerivAt chiFE (deriv chiFE s) s := (chiFE_analyticAt hs).differentiableAt.hasDerivAt - have hz1 : (1 - s) ≠ 1 := by - intro h; apply hs; have : s = 0 := by linear_combination -h - rw [this]; simp - have h2 : HasDerivAt (fun z => riemannZeta (1 - z)) (-deriv riemannZeta (1 - s)) s := by - have hd : HasDerivAt riemannZeta (deriv riemannZeta (1 - s)) (1 - s) := - (differentiableAt_riemannZeta hz1).hasDerivAt - have := hd.comp s ((hasDerivAt_const s (1:ℂ)).sub (hasDerivAt_id s)) - simpa [Function.comp_def] using this - have h : HasDerivAt (fun z => chiFE z * riemannZeta (1 - z)) - (deriv chiFE s * riemannZeta (1 - s) + chiFE s * -deriv riemannZeta (1 - s)) s := h1.mul h2 - rw [h.deriv]; ring - -/-- **The functional equation W(s) = −χ(s)·W(1−s)** off the real axis [XF′ (Z2)]. -/ -theorem hardyW_eq_neg_chiFE_mul {s : ℂ} (hs : s.im ≠ 0) : hardyW s = -chiFE s * hardyW (1 - s) := by - have hs' := im_one_sub_ne_zero hs - rw [hardyW, hardyW, deriv_riemannZeta_eq hs, deriv_chiFE hs, zeta_eq_chiFE_mul hs, L2_one_sub hs] - ring - -theorem hardyW_one_sub_eq_zero_iff {s : ℂ} (hs : s.im ≠ 0) : hardyW (1 - s) = 0 ↔ hardyW s = 0 := by - rw [hardyW_eq_neg_chiFE_mul hs, mul_eq_zero, neg_eq_zero] - exact ⟨fun h => Or.inr h, fun h => h.resolve_left (chiFE_ne_zero hs)⟩ - -theorem hardyW_conj_eq_zero_iff {s : ℂ} (hs : s.im ≠ 0) : hardyW (conj s) = 0 ↔ hardyW s = 0 := by - rw [hardyW_conj hs, map_eq_zero] - -/-- the non-real zeros of W are invariant under ρ ↦ 1 − ρ̄. -/ -theorem isWZero_reflect_iff (ρ : ℂ) : IsWZero (reflect ρ) ↔ IsWZero ρ := by - unfold IsWZero reflect - constructor - · rintro ⟨h0, him⟩ - have him' : ρ.im ≠ 0 := by simpa using him - have hc : (conj ρ).im ≠ 0 := by simpa using him' - exact ⟨(hardyW_conj_eq_zero_iff him').mp ((hardyW_one_sub_eq_zero_iff hc).mp h0), him'⟩ - · rintro ⟨h0, him⟩ - have hc : (conj ρ).im ≠ 0 := by simpa using him - exact ⟨(hardyW_one_sub_eq_zero_iff hc).mpr ((hardyW_conj_eq_zero_iff him).mpr h0), by simpa using him⟩ - -/-! ### §5. The analytic order of W under the two symmetries -/ - -theorem analyticOrderAt_hardyW_one_sub {w : ℂ} (hw : w.im ≠ 0) : - analyticOrderAt hardyW (1 - w) = analyticOrderAt hardyW w := by - have hg : AnalyticAt ℂ (fun z : ℂ => 1 - z) w := analyticAt_const.sub analyticAt_id - have hg' : deriv (fun z : ℂ => 1 - z) w ≠ 0 := by rw [deriv_const_sub]; simp - -- W(1−z) = −χ(z)⁻¹·W(z) near w - have hev : (hardyW ∘ fun z : ℂ => 1 - z) =ᶠ[𝓝 w] (fun z => -(chiFE z)⁻¹) * hardyW := by - filter_upwards [isOpen_im_ne_zero.mem_nhds hw] with z hz - simp only [Function.comp_apply, Pi.mul_apply] - rw [hardyW_eq_neg_chiFE_mul hz] - field_simp [chiFE_ne_zero hz] - have hu : AnalyticAt ℂ (fun z => -(chiFE z)⁻¹) w := ((chiFE_analyticAt hw).inv (chiFE_ne_zero hw)).neg - have hu0 : analyticOrderAt (fun z => -(chiFE z)⁻¹) w = 0 := - hu.analyticOrderAt_eq_zero.mpr (neg_ne_zero.mpr (inv_ne_zero (chiFE_ne_zero hw))) - calc analyticOrderAt hardyW (1 - w) - = analyticOrderAt (hardyW ∘ fun z : ℂ => 1 - z) w := by - rw [analyticOrderAt_comp_of_deriv_ne_zero hg hg'] - _ = analyticOrderAt ((fun z => -(chiFE z)⁻¹) * hardyW) w := analyticOrderAt_congr hev - _ = analyticOrderAt (fun z => -(chiFE z)⁻¹) w + analyticOrderAt hardyW w := - analyticOrderAt_mul hu (hardyW_analyticAt hw) - _ = analyticOrderAt hardyW w := by rw [hu0, zero_add] - -theorem analyticOrderAt_hardyW_conj {w : ℂ} (hw : w.im ≠ 0) : - analyticOrderAt hardyW (conj w) = analyticOrderAt hardyW w := by - have hw' : (conj w).im ≠ 0 := by simpa using hw - have hev : (fun z => conj (hardyW (conj z))) =ᶠ[𝓝 (conj w)] hardyW := by - filter_upwards [isOpen_im_ne_zero.mem_nhds hw'] with z hz - have hz' : (conj z).im ≠ 0 := by simpa using hz - rw [hardyW_conj hz, Complex.conj_conj] - calc analyticOrderAt hardyW (conj w) - = analyticOrderAt (fun z => conj (hardyW (conj z))) (conj w) := (analyticOrderAt_congr hev).symm - _ = analyticOrderAt hardyW w := Zeta23.analyticOrderAt_conj_conj _ _ - -/-- **m_{1−ρ̄} = m_ρ** for non-real ρ. -/ -theorem wMult_reflect {ρ : ℂ} (hρ : ρ.im ≠ 0) : wMult (reflect ρ) = wMult ρ := by - unfold wMult reflect - have hc : (conj ρ).im ≠ 0 := by simpa using hρ - rw [analyticOrderAt_hardyW_one_sub hc, analyticOrderAt_hardyW_conj hρ] - -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/Contour.lean b/zeta23/Zeta23/XiPrime/Hardy/Contour.lean deleted file mode 100644 index a887d946c9..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/Contour.lean +++ /dev/null @@ -1,162 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/Contour.lean — the argument principle for Ω = Γℝ·W on [−1,2]×[T₁,T₂] and the fold onto the -right half-contour. This is the function-specific part — zeros of Ω on the rectangle ↔ the W count; the fold itself is -the generic ZeroCount/GenericRvM.rectangleIntegral_eq_halfContour_of_fold instantiated at F := logDeriv Ω, valid for -heights T₁ ≥ t₀ > 0 where Ω is analytic and its zeros are W's with equal orders. - N_W(T₁,T₂) = (1/π)·Im ∫_L Ω′/Ω, L = [½+iT₁ → 2+iT₁ → 2+iT₂ → ½+iT₂] (good heights t₀ ≤ T₁ ≤ T₂). --/ -import Zeta23.XiPrime.Hardy.Omega -import Zeta23.XiPrime.ZeroCount.GenericRvM - -open Complex Set Filter Topology MeasureTheory intervalIntegral -open scoped ComplexConjugate - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy - -variable {t₀ : ℝ} - -/-- T is a zero-free ordinate for W: no non-real zero of W has Im ρ = T. -/ -def GoodHeightW (T : ℝ) : Prop := ∀ ρ : ℂ, IsWZero ρ → ρ.im ≠ T - -/-- every unit interval [a, a+1] with a ≥ t₀ contains a good height. -/ -theorem exists_goodHeightW (hs : WSeam t₀) {a : ℝ} (ha : t₀ ≤ a) : ∃ T ∈ Icc a (a + 1), GoodHeightW T := by - have hsub : ({ρ | IsWZero ρ} ∩ {ρ | a < ρ.im ∧ ρ.im ≤ a + 1}) - ⊆ {ρ | IsWZero ρ ∧ t₀ ≤ |ρ.im|} ∩ {ρ | a < ρ.im ∧ ρ.im ≤ a + 1} := by - rintro ρ ⟨hρ, h1, h2⟩ - exact ⟨⟨hρ, by rw [abs_of_pos (by linarith [hs.pos])]; linarith⟩, h1, h2⟩ - have hfin : ((fun ρ : ℂ => ρ.im) '' ({ρ | IsWZero ρ} ∩ {ρ | a < ρ.im ∧ ρ.im ≤ a + 1})).Finite := - ((hs.finite_window a (a + 1)).subset hsub).image _ - have hinf : (Ioo a (a + 1)).Infinite := Ioo_infinite (by linarith) - obtain ⟨T, hT, hTnot⟩ := (hinf.diff hfin).nonempty - refine ⟨T, ⟨hT.1.le, hT.2.le⟩, ?_⟩ - intro ρ hρ him - apply hTnot - exact ⟨ρ, ⟨hρ, by rw [him]; exact hT.1, by rw [him]; exact hT.2.le⟩, him⟩ - -theorem goodHeightW_ne_zero {T : ℝ} (hT : T ≠ 0) (hg : GoodHeightW T) {s : ℂ} (hs : s.im = T) : - hardyW s ≠ 0 := fun h => hg s ⟨h, by rw [hs]; exact hT⟩ hs - -theorem goodHeightW_omegaW_ne_zero {T : ℝ} (hT : T ≠ 0) (hg : GoodHeightW T) {s : ℂ} (hs : s.im = T) : - omegaW s ≠ 0 := fun h => goodHeightW_ne_zero hT hg hs ((omegaW_eq_zero_iff (by rw [hs]; exact hT)).mp h) - -/-- **N_W(T₁,T₂) as a contour integral**: (1/2πi)∮_{∂([−1,2]×[T₁,T₂])} Ω′/Ω = NcountW T₁ T₂ for good heights -t₀ ≤ T₁ ≤ T₂ (all zeros there have 0 < Re < 1 by the strip hypothesis, so none sit on the vertical edges). -/ -theorem rectangleIntegral'_logDeriv_omegaW_eq_NcountW (hZ : WZerosInStrip t₀) (hs : WSeam t₀) - {T₁ T₂ : ℝ} (h0 : t₀ ≤ T₁) (hT : T₁ ≤ T₂) (hg₁ : GoodHeightW T₁) (hg₂ : GoodHeightW T₂) : - RectangleIntegral' (logDeriv omegaW) (-1 + T₁ * I) (2 + T₂ * I) = (NcountW T₁ T₂ : ℂ) := by - classical - have ht₀ := hs.pos - set z : ℂ := -1 + T₁ * I with hzdef - set w : ℂ := 2 + T₂ * I with hwdef - have hzre : z.re = -1 := by simp [z] - have hzim : z.im = T₁ := by simp [z] - have hwre : w.re = 2 := by simp [w] - have hwim : w.im = T₂ := by simp [w] - have hre : z.re ≤ w.re := by rw [hzre, hwre]; norm_num - have him : z.im ≤ w.im := by rw [hzim, hwim]; exact hT - have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ (-1 ≤ s.re ∧ s.re ≤ 2) ∧ (T₁ ≤ s.im ∧ s.im ≤ T₂) := by - intro s - simp only [Rectangle, mem_reProdIm, hzre, hzim, hwre, hwim, - uIcc_of_le (show (-1 : ℝ) ≤ 2 by norm_num), uIcc_of_le hT, mem_Icc] - have hoff : Rectangle z w ⊆ {s : ℂ | s.im ≠ 0} := fun s hsR => by - have := ((hmem s).mp hsR).2.1; exact fun h => by rw [h] at this; linarith - have hf : AnalyticOnNhd ℂ omegaW (Rectangle z w) := omegaW_analyticOnNhd hoff - have hg : AnalyticOnNhd ℂ (fun _ : ℂ => (1 : ℂ)) (Rectangle z w) := fun _ _ => analyticAt_const - have hfin := hs.finite_window T₁ T₂ - have hZf : ∀ s ∈ Rectangle z w, omegaW s = 0 ↔ s ∈ hfin.toFinset := by - intro s hsR - rw [Set.Finite.mem_toFinset] - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsR - have hsim : s.im ≠ 0 := hoff hsR - constructor - · intro h0 - have hW0 := (omegaW_eq_zero_iff hsim).mp h0 - refine ⟨⟨⟨hW0, hsim⟩, by rw [abs_of_pos (by linarith)]; linarith⟩, - lt_of_le_of_ne hi1 (fun h' => hg₁ s ⟨hW0, hsim⟩ h'.symm), hi2⟩ - · rintro ⟨⟨⟨hW0, -⟩, -⟩, _⟩ - exact (omegaW_eq_zero_iff hsim).mpr hW0 - have hZsub : ((hfin.toFinset : Finset ℂ) : Set ℂ) ⊆ Rectangle z w := by - intro s hsZ - rw [Finset.mem_coe, Set.Finite.mem_toFinset] at hsZ - obtain ⟨⟨⟨h0, -⟩, ht⟩, hi1, hi2⟩ := hsZ - obtain ⟨ha, hb⟩ := hZ s h0 ht - exact (hmem s).mpr ⟨⟨by linarith, by linarith⟩, hi1.le, hi2⟩ - have hborder : ∀ s ∈ RectangleBorder z w, omegaW s ≠ 0 := by - intro s hsB h0 - have hsR := rectangleBorder_subset_rectangle z w hsB - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsR - have hsim : s.im ≠ 0 := hoff hsR - have hW0 := (omegaW_eq_zero_iff hsim).mp h0 - obtain ⟨ha, hb⟩ := hZ s hW0 (by rw [abs_of_pos (by linarith)]; linarith) - simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, hzre, hzim, hwre, hwim] at hsB - rcases hsB with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ - · exact hg₁ s ⟨hW0, hsim⟩ h' - · linarith - · exact hg₂ s ⟨hW0, hsim⟩ h' - · linarith - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv hre him hf hg hborder hfin.toFinset hZf hZsub - simp only [one_mul, mul_one] at key - rw [show (fun s => logDeriv omegaW s) = logDeriv omegaW from rfl] at key - rw [key] - unfold NcountW - have hset : zerosInW T₁ T₂ = {ρ | IsWZero ρ ∧ t₀ ≤ |ρ.im|} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂} := by - ext ρ - simp only [zerosInW, mem_setOf_eq, mem_inter_iff] - constructor - · rintro ⟨hρ, h1, h2⟩; exact ⟨⟨hρ, by rw [abs_of_pos (by linarith)]; linarith⟩, h1, h2⟩ - · rintro ⟨⟨hρ, -⟩, h1, h2⟩; exact ⟨hρ, h1, h2⟩ - rw [hset, finsum_mem_eq_finite_toFinset_sum _ hfin, Nat.cast_sum] - refine Finset.sum_congr rfl fun ρ hρ => ?_ - rw [Set.Finite.mem_toFinset] at hρ - rw [analyticOrderNatAt_omegaW hρ.1.1.2] - -/-! ### the fold -/ - -lemma continuous_logDeriv_omegaW_horizontal {T : ℝ} (hT : T ≠ 0) (hg : GoodHeightW T) : - Continuous fun σ : ℝ => logDeriv omegaW (σ + T * I) := by - refine continuous_iff_continuousAt.mpr fun σ => ?_ - have hne : omegaW (σ + T * I) ≠ 0 := goodHeightW_omegaW_ne_zero hT hg (by simp) - have ha := omegaW_analyticAt (s := σ + T * I) (by simp [hT]) - have hc : ContinuousAt (logDeriv omegaW) (σ + T * I) := by - have := (ha.deriv.continuousAt).div ha.continuousAt hne - simpa only [logDeriv] using this - exact hc.comp (f := fun σ : ℝ => (σ : ℂ) + T * I) (by fun_prop) - -/-- **the fold**: for good heights 0 < T₁ ≤ T₂, ∮ Ω′/Ω = 2i·Im(halfContour (Ω′/Ω) T₁ T₂) -(instance of ZeroCount/GenericRvM's rectangleIntegral_eq_halfContour_of_fold with F := logDeriv Ω). -/ -theorem rectangleIntegral_logDeriv_omegaW_eq_halfContour {T₁ T₂ : ℝ} (h1 : 0 < T₁) (h12 : T₁ ≤ T₂) - (hg₁ : GoodHeightW T₁) (hg₂ : GoodHeightW T₂) : - RectangleIntegral (logDeriv omegaW) (-1 + T₁ * I) (2 + T₂ * I) - = 2 * I * ((Zeta23.RvM.halfContour (logDeriv omegaW) T₁ T₂).im : ℂ) := by - have hT₂ : 0 < T₂ := lt_of_lt_of_le h1 h12 - refine ZeroCount.GenericRvM.rectangleIntegral_eq_halfContour_of_fold - (continuous_logDeriv_omegaW_horizontal h1.ne' hg₁) (continuous_logDeriv_omegaW_horizontal hT₂.ne' hg₂) - (fun x _ => logDeriv_omegaW_one_sub_conj (by simp [h1.ne'])) - (fun x _ => logDeriv_omegaW_one_sub_conj (by simp [hT₂.ne'])) - (fun t ht => logDeriv_omegaW_one_sub_conj ?_) - rw [uIcc_of_le h12] at ht - simp; linarith [ht.1] - -/-- **N_W(T₁,T₂) = (1/π)·Im ∫_L Ω′/Ω** for good heights t₀ ≤ T₁ ≤ T₂. -/ -theorem NcountW_eq_im_halfContour (hZ : WZerosInStrip t₀) (hs : WSeam t₀) {T₁ T₂ : ℝ} - (h0 : t₀ ≤ T₁) (h12 : T₁ ≤ T₂) (hg₁ : GoodHeightW T₁) (hg₂ : GoodHeightW T₂) : - (NcountW T₁ T₂ : ℝ) = (1 / Real.pi) * (Zeta23.RvM.halfContour (logDeriv omegaW) T₁ T₂).im := by - have h1 : 0 < T₁ := lt_of_lt_of_le hs.pos h0 - exact ZeroCount.GenericRvM.natCast_eq_im_halfContour - (rectangleIntegral'_logDeriv_omegaW_eq_NcountW hZ hs h0 h12 hg₁ hg₂) - (rectangleIntegral_logDeriv_omegaW_eq_halfContour h1 h12 hg₁ hg₂) - -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/Count.lean b/zeta23/Zeta23/XiPrime/Hardy/Count.lean deleted file mode 100644 index 91b42d3154..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/Count.lean +++ /dev/null @@ -1,291 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/Count.lean — Riemann–von Mangoldt for the non-real zeros of W. - - riemannVonMangoldt_W (hZ : WZerosInStrip t₀) (hs : WSeam t₀) : RiemannVonMangoldt (wZeros hZ hs) -i.e. |N_W(T,2T) − (T/2π)ℓ₁(T)| ≤ C log T (T ≥ T₀) and the two-sided local count N_W(t,t+1] ≤ A₀ log(|t|+3). -Route: the local count and the horizontal O(log T) bounds are the generic two-line Landau/Jensen -machine (Zeta23/XiPrime/ZeroCount/Generic.lean) instantiated at f := W with the inputs of Hardy/TwoLine.lean; the main -term comes from the argument principle for Ω = Γℝ·W (Hardy/Contour.lean): N_W = (1/π)Im∫_L Ω′/Ω, Ω′/Ω = Γℝ′/Γℝ + W′/W, -the Γℝ-part and the μ-bookkeeping being the generic ZeroCount/GenericRvM.rvM_main_of (Zeta23.RvM.gamma_side), and the W-part O(log T) -(horizontals: Generic; the vertical Re s = 2: W = ζ·(ζ′/ζ + L₂) with each factor of positive real part there, so -each turns by at most π — Zeta23/XiPrime/ZeroCount/ArgBound.lean + vertical_two). --/ -import Zeta23.XiPrime.Hardy.Contour -import Zeta23.XiPrime.ZeroCount -import Zeta23.XiPrime.ZeroCount.Generic -import Zeta23.XiPrime.ZeroCount.ArgBound -import Zeta23.XiPrime.ZeroCount.Sides -import Zeta23.RvM.Backlund - -open Complex Set Filter Topology MeasureTheory intervalIntegral Metric -open scoped ComplexConjugate - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy - -open Zeta23.RvM (halfContour) -open Zeta23.XiPrime.ZeroCount (two_line_ne_one zeta_two_line_ne_zero logDeriv_zeta_analyticAt - continuousAt_logDeriv_of_analyticAt abs_im_integral_logDeriv_vertical_le_pi) - -variable {t₀ : ℝ} - -/-! ### the vertical side Re s = 2: W = ζ·G, G := ζ′/ζ + L₂ -/ - -/-- G := ζ′/ζ + L₂ (so W = ζ·G where ζ ≠ 0). -/ -def Gw (s : ℂ) : ℂ := logDeriv riemannZeta s + L2 s - -lemma Gw_analyticAt {s : ℂ} (hs : s.im ≠ 0) (hζ : riemannZeta s ≠ 0) : AnalyticAt ℂ Gw s := by - have e : Gw = fun z => logDeriv riemannZeta z + L2 z := rfl - rw [e]; exact (logDeriv_zeta_analyticAt (ne_one_of_im_ne_zero hs) hζ).add (L2_analyticAt hs) - -/-- W = ζ·G near any non-real point where ζ ≠ 0; hence logDeriv W = ζ′/ζ + G′/G there (if also G ≠ 0). -/ -lemma logDeriv_hardyW_eq_of_zeta_ne {s : ℂ} (hs : s.im ≠ 0) (hζ : riemannZeta s ≠ 0) (hG : Gw s ≠ 0) : - logDeriv hardyW s = logDeriv riemannZeta s + logDeriv Gw s := by - have hs1 := ne_one_of_im_ne_zero hs - have hcont : ContinuousAt riemannZeta s := (differentiableAt_riemannZeta hs1).continuousAt - have hev : hardyW =ᶠ[𝓝 s] fun z => riemannZeta z * Gw z := by - filter_upwards [hcont.eventually_ne hζ] with z hz - exact hardyW_eq_zeta_mul hz - have h1 : logDeriv hardyW s = logDeriv (fun z => riemannZeta z * Gw z) s := by - rw [logDeriv_apply, logDeriv_apply, hev.deriv_eq, hev.eq_of_nhds] - rw [h1, logDeriv_mul s hζ hG (differentiableAt_riemannZeta hs1) (Gw_analyticAt hs hζ).differentiableAt] - -/-- **the vertical side**: for t₁ from hardyW_two_line_lower and t₁ ≤ T₁ ≤ T₂, -|Im ∫_{T₁}^{T₂} (W′/W)(2+it)·i dt| ≤ 2π. -/ -theorem vertical_boundW : ∃ t₁ : ℝ, 2 ≤ t₁ ∧ ∀ T₁ T₂ : ℝ, t₁ ≤ T₁ → T₁ ≤ T₂ → - (∀ t ∈ Icc T₁ T₂, hardyW (2 + t * I) ≠ 0) ∧ - |(∫ t in T₁..T₂, logDeriv hardyW (2 + t * I) * I).im| ≤ 2 * Real.pi := by - obtain ⟨t₁, ht₁, hlow⟩ := hardyW_two_line_lower - refine ⟨t₁, ht₁, fun T₁ T₂ hT₁ h12 => ?_⟩ - have hfacts : ∀ t ∈ Icc T₁ T₂, t ≠ 0 ∧ ((2 : ℂ) + t * I).im ≠ 0 ∧ 3 ≤ (Gw (2 + t * I)).re ∧ - Gw (2 + t * I) ≠ 0 ∧ hardyW (2 + t * I) ≠ 0 := by - intro t ht - have ht0 : 0 < t := by linarith [ht.1] - have habs : t₁ ≤ |t| := by rw [abs_of_pos ht0]; linarith [ht.1] - obtain ⟨hre, hnorm⟩ := hlow t habs - have hG0 : Gw (2 + t * I) ≠ 0 := fun h => by - have : (Gw (2 + t * I)).re = 0 := by rw [h]; simp - unfold Gw at this; linarith - have hW0 : hardyW (2 + t * I) ≠ 0 := fun h => by rw [h, norm_zero] at hnorm; linarith - exact ⟨ht0.ne', by simp [ht0.ne'], hre, hG0, hW0⟩ - refine ⟨fun t ht => (hfacts t ht).2.2.2.2, ?_⟩ - -- pointwise split along the segment - have heq : EqOn (fun t : ℝ => logDeriv hardyW (2 + t * I) * I) - (fun t : ℝ => logDeriv riemannZeta (2 + t * I) * I + logDeriv Gw (2 + t * I) * I) (uIcc T₁ T₂) := by - intro t ht - rw [uIcc_of_le h12] at ht - obtain ⟨-, hs, -, hG, -⟩ := hfacts t ht - simp only - rw [logDeriv_hardyW_eq_of_zeta_ne hs (zeta_two_line_ne_zero t) hG]; ring - -- integrability (continuity along the segment) - have hcζ : ContinuousOn (fun t : ℝ => logDeriv riemannZeta (2 + t * I) * I) (uIcc T₁ T₂) := by - intro t ht - rw [uIcc_of_le h12] at ht - obtain ⟨-, hs, -, -, -⟩ := hfacts t ht - have hc := continuousAt_logDeriv_of_analyticAt - (analyticAt_riemannZeta (ne_one_of_im_ne_zero hs)) (zeta_two_line_ne_zero t) - exact ((hc.comp (f := fun t : ℝ => (2 : ℂ) + t * I) (x := t) (by fun_prop)).mul - continuousAt_const).continuousWithinAt - have hcG : ContinuousOn (fun t : ℝ => logDeriv Gw (2 + t * I) * I) (uIcc T₁ T₂) := by - intro t ht - rw [uIcc_of_le h12] at ht - obtain ⟨-, hs, -, hG, -⟩ := hfacts t ht - have hc := continuousAt_logDeriv_of_analyticAt (Gw_analyticAt hs (zeta_two_line_ne_zero t)) hG - exact ((hc.comp (f := fun t : ℝ => (2 : ℂ) + t * I) (x := t) (by fun_prop)).mul - continuousAt_const).continuousWithinAt - rw [integral_congr heq, integral_add hcζ.intervalIntegrable hcG.intervalIntegrable, Complex.add_im] - have h1 : |(∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I) * I).im| ≤ Real.pi := Zeta23.RvM.vertical_two T₁ T₂ - have h2 : |(∫ t in T₁..T₂, logDeriv Gw (2 + t * I) * I).im| ≤ Real.pi := by - refine abs_im_integral_logDeriv_vertical_le_pi (σ := 2) h12 (fun t ht => ?_) (fun t ht => ?_) - · obtain ⟨-, hs, -, -, -⟩ := hfacts t ht - have := Gw_analyticAt hs (zeta_two_line_ne_zero t) - simpa using this - · obtain ⟨-, -, hre, -, -⟩ := hfacts t ht - have : ((2 : ℝ) : ℂ) + t * I = 2 + t * I := by push_cast; ring - rw [this]; linarith - calc |(∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I) * I).im + (∫ t in T₁..T₂, logDeriv Gw (2 + t * I) * I).im| - ≤ |(∫ t in T₁..T₂, logDeriv riemannZeta (2 + t * I) * I).im| - + |(∫ t in T₁..T₂, logDeriv Gw (2 + t * I) * I).im| := abs_add_le _ _ - _ ≤ 2 * Real.pi := by linarith - -/-! ### the Generic two-line machine at f := W -/ - -/-- the packaged Generic hypotheses for W (t₁ from the two-line lower bound). -/ -theorem hardyW_generic_inputs : ∃ (Cf t₁ : ℝ), 0 < Cf ∧ 2 ≤ t₁ ∧ - (∀ t : ℝ, t₁ ≤ |t| → AnalyticOnNhd ℂ hardyW (closedBall (2 + t * I) (91 / 50))) ∧ - (∀ s : ℂ, 1 / 8 ≤ s.re → s.re ≤ 4 → 2 ≤ |s.im| → ‖hardyW s‖ ≤ Cf * |s.im| ^ 2) ∧ - (∀ t : ℝ, t₁ ≤ |t| → 1 ≤ ‖hardyW (2 + t * I)‖) := by - obtain ⟨Cf, hCf, hgrow⟩ := hardyW_growth - obtain ⟨t₁, ht₁, hlow⟩ := hardyW_two_line_lower - exact ⟨Cf, t₁, hCf, ht₁, fun t ht => hardyW_analyticOnNhd_disc t (le_trans ht₁ ht), hgrow, - fun t ht => (hlow t ht).2⟩ - -/-- **horizontal sides**: |Im ∫_{1/2}^{2} (W′/W)(σ+iT) dσ| ≤ C log(|T|+3) at good heights |T| ≥ t₁. -/ -theorem horizontal_boundW : ∃ C t₁ : ℝ, 0 < C ∧ 4 ≤ t₁ ∧ ∀ T : ℝ, t₁ ≤ |T| → GoodHeightW T → - |(∫ σ in (1 / 2 : ℝ)..2, logDeriv hardyW (σ + T * I)).im| ≤ C * Real.log (|T| + 3) := by - obtain ⟨Cf, t₁, hCf, ht₁, hfa, hgrow, hlow⟩ := hardyW_generic_inputs - obtain ⟨C, t₂, hC, ht₂4, ht₁₂, h⟩ := Zeta23.XiPrime.ZeroCount.Generic.horizontal_bound_two_line hfa hCf hgrow hlow - refine ⟨C, t₂, hC, ht₂4, fun T hT hg => h T hT fun ρ _ h0 him => ?_⟩ - have hT0 : T ≠ 0 := by intro h; rw [h] at hT; norm_num at hT; linarith - exact hg ρ ⟨h0, by rw [him]; exact hT0⟩ him - -/-- **local count** for any ZeroConfig whose carrier consists of non-real W-zeros with m = wMult. -/ -theorem local_countW (Zc : ZeroConfig) - (hlink : ∀ ρ ∈ Zc.carrier, 1 / 2 ≤ ρ.re → hardyW ρ = 0 ∧ analyticOrderNatAt hardyW ρ = Zc.mult ρ) : - ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ t : ℝ, (Zc.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3) := by - obtain ⟨Cf, t₁, hCf, _, hfa, hgrow, hlow⟩ := hardyW_generic_inputs - exact Zeta23.XiPrime.ZeroCount.Generic.local_count_two_line hfa hCf hgrow hlow Zc hlink - -theorem local_count_wZeros (hZ : WZerosInStrip t₀) (hs : WSeam t₀) : - ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ t : ℝ, ((wZeros hZ hs).N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3) := - local_countW (wZeros hZ hs) fun _ hρ _ => ⟨hρ.1.1, rfl⟩ - -/-! ### splitting Ω′/Ω = Γℝ′/Γℝ + W′/W along the half-contour -/ - -theorem halfContour_omegaW_split {T₁ T₂ : ℝ} (h1 : 0 < T₁) (h12 : T₁ ≤ T₂) - (hg₁ : GoodHeightW T₁) (hg₂ : GoodHeightW T₂) (hvert : ∀ t ∈ Icc T₁ T₂, hardyW (2 + t * I) ≠ 0) : - halfContour (logDeriv omegaW) T₁ T₂ = - halfContour (logDeriv Complex.Gammaℝ) T₁ T₂ + halfContour (logDeriv hardyW) T₁ T₂ := by - have hseg : ∀ (T : ℝ), 0 < T → GoodHeightW T → ∀ σ ∈ uIcc (1 / 2 : ℝ) 2, - 0 < ((σ : ℂ) + T * I).re ∧ ((σ : ℂ) + T * I).im ≠ 0 ∧ hardyW ((σ : ℂ) + T * I) ≠ 0 := by - intro T hT hg σ hσ - rw [uIcc_of_le (by norm_num : (1/2:ℝ) ≤ 2)] at hσ - exact ⟨by simp; linarith [hσ.1], by simp [hT.ne'], goodHeightW_ne_zero hT.ne' hg (by simp)⟩ - have hver : ∀ t ∈ uIcc T₁ T₂, 0 < ((2 : ℂ) + t * I).re ∧ ((2 : ℂ) + t * I).im ≠ 0 ∧ - hardyW ((2 : ℂ) + t * I) ≠ 0 := by - intro t ht - rw [uIcc_of_le h12] at ht - exact ⟨by simp, by simp; linarith [ht.1], hvert t ht⟩ - have hT₂ : 0 < T₂ := lt_of_lt_of_le h1 h12 - have keyb : EqOn (fun σ : ℝ => logDeriv omegaW ((σ : ℂ) + T₁ * I)) - (fun σ : ℝ => logDeriv Complex.Gammaℝ ((σ : ℂ) + T₁ * I) + logDeriv hardyW ((σ : ℂ) + T₁ * I)) - (uIcc (1 / 2 : ℝ) 2) := fun σ hσ => by - obtain ⟨-, him, hne⟩ := hseg T₁ h1 hg₁ σ hσ - exact logDeriv_omegaW_eq him hne - have keyt : EqOn (fun σ : ℝ => logDeriv omegaW ((σ : ℂ) + T₂ * I)) - (fun σ : ℝ => logDeriv Complex.Gammaℝ ((σ : ℂ) + T₂ * I) + logDeriv hardyW ((σ : ℂ) + T₂ * I)) - (uIcc (1 / 2 : ℝ) 2) := fun σ hσ => by - obtain ⟨-, him, hne⟩ := hseg T₂ hT₂ hg₂ σ hσ - exact logDeriv_omegaW_eq him hne - have keyr : EqOn (fun t : ℝ => logDeriv omegaW ((2 : ℂ) + t * I)) - (fun t : ℝ => logDeriv Complex.Gammaℝ ((2 : ℂ) + t * I) + logDeriv hardyW ((2 : ℂ) + t * I)) - (uIcc T₁ T₂) := fun t ht => by - obtain ⟨-, him, hne⟩ := hver t ht - exact logDeriv_omegaW_eq him hne - have hΓc : ∀ {s : ℂ}, 0 < s.re → ContinuousAt (logDeriv Complex.Gammaℝ) s := fun hs => - (Zeta23.RvM.logDeriv_Gammaℝ_differentiableOn.differentiableAt - (Zeta23.RvM.isOpen_rightHalfPlane.mem_nhds hs)).continuousAt - have hWc : ∀ {s : ℂ}, s.im ≠ 0 → hardyW s ≠ 0 → ContinuousAt (logDeriv hardyW) s := fun hs hne => - continuousAt_logDeriv_of_analyticAt (hardyW_analyticAt hs) hne - have hintbΓ : ∀ (T : ℝ), 0 < T → GoodHeightW T → - IntervalIntegrable (fun σ : ℝ => logDeriv Complex.Gammaℝ ((σ : ℂ) + T * I)) volume (1 / 2) 2 := by - intro T hT hg - apply ContinuousOn.intervalIntegrable - intro σ hσ - obtain ⟨hre, -, -⟩ := hseg T hT hg σ hσ - exact ((hΓc hre).comp (f := fun σ : ℝ => (σ : ℂ) + T * I) (x := σ) (by fun_prop)).continuousWithinAt - have hintbW : ∀ (T : ℝ), 0 < T → GoodHeightW T → - IntervalIntegrable (fun σ : ℝ => logDeriv hardyW ((σ : ℂ) + T * I)) volume (1 / 2) 2 := by - intro T hT hg - apply ContinuousOn.intervalIntegrable - intro σ hσ - obtain ⟨-, him, hne⟩ := hseg T hT hg σ hσ - exact ((hWc him hne).comp (f := fun σ : ℝ => (σ : ℂ) + T * I) (x := σ) (by fun_prop)).continuousWithinAt - have hintrΓ : IntervalIntegrable (fun t : ℝ => logDeriv Complex.Gammaℝ ((2 : ℂ) + t * I)) volume T₁ T₂ := by - apply ContinuousOn.intervalIntegrable - intro t ht - exact ((hΓc (hver t ht).1).comp (f := fun t : ℝ => (2 : ℂ) + t * I) (x := t) (by fun_prop)).continuousWithinAt - have hintrW : IntervalIntegrable (fun t : ℝ => logDeriv hardyW ((2 : ℂ) + t * I)) volume T₁ T₂ := by - apply ContinuousOn.intervalIntegrable - intro t ht - exact ((hWc (hver t ht).2.1 (hver t ht).2.2).comp (f := fun t : ℝ => (2 : ℂ) + t * I) (x := t) - (by fun_prop)).continuousWithinAt - unfold halfContour - rw [integral_congr keyb, integral_congr keyt, integral_congr keyr, - integral_add (hintbΓ T₁ h1 hg₁) (hintbW T₁ h1 hg₁), integral_add (hintbΓ T₂ hT₂ hg₂) (hintbW T₂ hT₂ hg₂), - integral_add hintrΓ hintrW] - ring - -/-! ### the W-part of the half-contour is O(log T) -/ - -theorem halfContour_hardyW_bound : ∃ C T₀ : ℝ, 0 < C ∧ 4 ≤ T₀ ∧ ∀ T₁ T₂ : ℝ, T₀ ≤ T₁ → T₁ ≤ T₂ → - GoodHeightW T₁ → GoodHeightW T₂ → - (∀ t ∈ Icc T₁ T₂, hardyW (2 + t * I) ≠ 0) ∧ - |(halfContour (logDeriv hardyW) T₁ T₂).im| - ≤ C * Real.log (|T₁| + 3) + 2 * Real.pi + C * Real.log (|T₂| + 3) := by - obtain ⟨CH, tH, hCH, htH4, hH⟩ := horizontal_boundW - obtain ⟨tV, htV2, hV⟩ := vertical_boundW - refine ⟨CH, max tH tV, hCH, le_trans htH4 (le_max_left _ _), fun T₁ T₂ hT₁ h12 hg₁ hg₂ => ?_⟩ - have h1 := hH T₁ (le_trans (le_trans (le_max_left _ _) hT₁) (le_abs_self _)) hg₁ - have h2 := hH T₂ (le_trans (le_trans (le_max_left _ _) (hT₁.trans h12)) (le_abs_self _)) hg₂ - obtain ⟨hne, h3⟩ := hV T₁ T₂ (le_trans (le_max_right _ _) hT₁) h12 - refine ⟨hne, ?_⟩ - unfold halfContour - have eim : ((∫ σ in (1/2:ℝ)..2, logDeriv hardyW (σ + T₁ * I)) - + (∫ t in T₁..T₂, logDeriv hardyW (2 + t * I)) * I - - ∫ σ in (1/2:ℝ)..2, logDeriv hardyW (σ + T₂ * I)).im - = (∫ σ in (1/2:ℝ)..2, logDeriv hardyW (σ + T₁ * I)).im - + ((∫ t in T₁..T₂, logDeriv hardyW (2 + t * I)) * I).im - - (∫ σ in (1/2:ℝ)..2, logDeriv hardyW (σ + T₂ * I)).im := by - simp [Complex.add_im, Complex.sub_im] - rw [eim] - have hmulI : ((∫ t in T₁..T₂, logDeriv hardyW (2 + t * I)) * I).im - = (∫ t in T₁..T₂, logDeriv hardyW (2 + t * I) * I).im := - congrArg Complex.im (intervalIntegral.integral_mul_const (μ := volume) I - (fun t : ℝ => logDeriv hardyW (2 + t * I))).symm - rw [hmulI] - calc |(∫ σ in (1/2:ℝ)..2, logDeriv hardyW (σ + T₁ * I)).im - + (∫ t in T₁..T₂, logDeriv hardyW (2 + t * I) * I).im - - (∫ σ in (1/2:ℝ)..2, logDeriv hardyW (σ + T₂ * I)).im| - ≤ |(∫ σ in (1/2:ℝ)..2, logDeriv hardyW (σ + T₁ * I)).im| - + |(∫ t in T₁..T₂, logDeriv hardyW (2 + t * I) * I).im| - + |(∫ σ in (1/2:ℝ)..2, logDeriv hardyW (σ + T₂ * I)).im| := - (abs_sub _ _).trans (add_le_add (abs_add_le _ _) le_rfl) - _ ≤ CH * Real.log (|T₁| + 3) + 2 * Real.pi + CH * Real.log (|T₂| + 3) := by linarith - -/-! ### the main term -/ - -/-- **Riemann–von Mangoldt main term for W**: |N_W(T,2T) − (T/2π)ℓ₁(T)| ≤ C log T for T ≥ T₀ -(instance of ZeroCount/GenericRvM.rvM_main_of: Zc := wZeros, Good := GoodHeightW, Λ := Ω, residual = the W half-contour). -/ -theorem hardyW_rvM_main (hZ : WZerosInStrip t₀) (hs : WSeam t₀) : - ∃ C T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - |((wZeros hZ hs).N T (2 * T) : ℝ) - T / (2 * Real.pi) * ell1 T| ≤ C * Real.log T := by - have ht₀ := hs.pos - obtain ⟨CY, TY, hCY, hTY4, hYb⟩ := halfContour_hardyW_bound - refine ZeroCount.GenericRvM.rvM_main_of (wZeros hZ hs) GoodHeightW omegaW ht₀.le - (fun a ha => exists_goodHeightW hs ha) - (fun T₁ T₂ h0 h12 hg₁ hg₂ => by - rw [wZeros_N hZ hs h0]; exact NcountW_eq_im_halfContour hZ hs h0 h12 hg₁ hg₂) - ⟨CY, 2 * Real.pi, max TY t₀, hCY, by positivity, fun T₁ T₂ hT h12 hg₁ hg₂ => ?_⟩ - (local_count_wZeros hZ hs) - have hTY : TY ≤ T₁ := le_trans (le_max_left _ _) hT - have h1 : 0 < T₁ := lt_of_lt_of_le ht₀ (le_trans (le_max_right _ _) hT) - obtain ⟨hvert, hbound⟩ := hYb T₁ T₂ hTY h12 hg₁ hg₂ - rw [halfContour_omegaW_split h1 h12 hg₁ hg₂ hvert, Complex.add_im, add_sub_cancel_left] - exact hbound - -/-- **H-RvM for the non-real zeros of W** (|Im| ≥ t₀): main count + two-sided local count. -/ -theorem riemannVonMangoldt_W (hZ : WZerosInStrip t₀) (hs : WSeam t₀) : RiemannVonMangoldt (wZeros hZ hs) := - ⟨hardyW_rvM_main hZ hs, local_count_wZeros hZ hs⟩ - -end Hardy - -export Hardy (riemannVonMangoldt_W) - -/-- with the seam discharged: only the strip hypothesis (and t₀ > 0) remain. -/ -theorem riemannVonMangoldt_W' {t₀ : ℝ} (ht₀ : 0 < t₀) (hZ : WZerosInStrip t₀) : - RiemannVonMangoldt (wZeros hZ (wSeam_of_strip ht₀ hZ)) := - riemannVonMangoldt_W hZ (wSeam_of_strip ht₀ hZ) - -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFBasic.lean b/zeta23/Zeta23/XiPrime/Hardy/EFBasic.lean deleted file mode 100644 index 3be1b63d6b..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFBasic.lean +++ /dev/null @@ -1,340 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFBasic.lean — basic objects of the W explicit formula [XF′ §9.0–9.1]. - * analyticity of Γℝ, χ = chiFE, L₂, W at the REAL points of the strip away from the poles (Hardy/Basic.lean - has everything off the real axis); - * E₂ := L₂ + ζ′/ζ ( = W/ζ where ζ ≠ 0 ) and F_𝒵 := L₂ + W′/W; [XF′ (Z1)] F_𝒵 = E₂ + E₂′/E₂ on 1 < Re s < 3/2 - wherever W ≠ 0; E₂ = L₂ − A, E₂′ = L₂′ + B; - * [XF′ (Z2)] F_𝒵(1−s) = −F_𝒵(s), E₂(s̄) = conj E₂(s), F_𝒵(s̄) = conj F_𝒵(s) (off ℝ); - * the low zeros of W in a compact box of the half-plane Re s > 1 are finitely many, hence a line Re s = c, - c ∈ [9/8, 5/4], carrying no zero of W of height < t₀ exists (the "choice of c" of Hardy/EFMain). --/ -import Zeta23.XiPrime.Hardy.TwoLine -import Zeta23.XiPrime.ExplicitFormula.Expansion - -open scoped BigOperators ArithmeticFunction ComplexConjugate -open Complex MeasureTheory Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Hardy - -/-! ## 1. Analyticity at real points away from the poles -/ - -/-- Γℝ is differentiable at s unless s/2 is a non-positive integer. -/ -lemma differentiableAt_Gammaℝ_of_ne {s : ℂ} (hs : ∀ m : ℕ, s / 2 ≠ -(m : ℂ)) : - DifferentiableAt ℂ Gammaℝ s := by - have h1 : DifferentiableAt ℂ (fun z : ℂ => (Real.pi : ℂ) ^ (-z / 2)) s := by - refine DifferentiableAt.const_cpow ?_ (Or.inl (by exact_mod_cast Real.pi_ne_zero)) - exact (differentiableAt_id.neg).div_const 2 - have h2 : DifferentiableAt ℂ (fun z : ℂ => Complex.Gamma (z / 2)) s := - (Complex.differentiableAt_Gamma _ hs).comp s (differentiableAt_id.div_const 2) - have : Gammaℝ = fun z : ℂ => (Real.pi : ℂ) ^ (-z / 2) * Complex.Gamma (z / 2) := funext Gammaℝ_def - rw [this]; exact h1.mul h2 - -/-- points of the vertical strip 1 < Re s < 3/2: no pole of Γℝ(s), Γℝ(1−s) and s ≠ 0, 1. -/ -def GoodStrip : Set ℂ := {s : ℂ | 1 < s.re ∧ s.re < 3 / 2} - -lemma isOpen_goodStrip : IsOpen GoodStrip := - (isOpen_lt continuous_const Complex.continuous_re).inter (isOpen_lt Complex.continuous_re continuous_const) - -lemma goodStrip_half_ne {s : ℂ} (hs : s ∈ GoodStrip) (m : ℕ) : s / 2 ≠ -(m : ℂ) := by - intro h - have := congrArg Complex.re h - simp at this - have h1 := hs.1 - have : (0:ℝ) ≤ m := Nat.cast_nonneg m - linarith - -lemma goodStrip_one_sub_half_ne {s : ℂ} (hs : s ∈ GoodStrip) (m : ℕ) : (1 - s) / 2 ≠ -(m : ℂ) := by - intro h - have := congrArg Complex.re h - simp at this - obtain ⟨h1, h2⟩ := hs - -- (1 - re s)/2 ∈ (−1/4, 0): equals −m only if m = 0… but then re s = 1, excluded; or m ≥ 1 ⇒ re s ≥ 3. - rcases Nat.eq_zero_or_pos m with rfl | hm - · simp at this; linarith - · have : (1:ℝ) ≤ m := by exact_mod_cast hm - linarith - -lemma goodStrip_ne_zero {s : ℂ} (hs : s ∈ GoodStrip) : s ≠ 0 := fun h => by - have := hs.1; rw [h] at this; simp at this; linarith -lemma goodStrip_ne_one {s : ℂ} (hs : s ∈ GoodStrip) : s ≠ 1 := fun h => by - have := hs.1; rw [h] at this; simp at this - -lemma Gammaℝ_ne_zero_of_ne {s : ℂ} (hs : ∀ m : ℕ, s / 2 ≠ -(m : ℂ)) : Gammaℝ s ≠ 0 := by - rw [Ne, Gammaℝ_eq_zero_iff, not_exists] - intro n h - apply hs n - rw [h]; ring - -lemma analyticAt_Gammaℝ_goodStrip {s : ℂ} (hs : s ∈ GoodStrip) : AnalyticAt ℂ Gammaℝ s := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - filter_upwards [isOpen_goodStrip.mem_nhds hs] with z hz - exact differentiableAt_Gammaℝ_of_ne (goodStrip_half_ne hz) - -lemma analyticAt_Gammaℝ_one_sub_goodStrip {s : ℂ} (hs : s ∈ GoodStrip) : - AnalyticAt ℂ (fun z => Gammaℝ (1 - z)) s := by - have h : AnalyticAt ℂ Gammaℝ (1 - s) := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - have hopen : IsOpen ((fun z : ℂ => 1 - z) ⁻¹' GoodStrip) := isOpen_goodStrip.preimage (by fun_prop) - have hmem : (1 - s) ∈ (fun z : ℂ => 1 - z) ⁻¹' GoodStrip := by simpa using hs - filter_upwards [hopen.mem_nhds hmem] with z hz - have := goodStrip_one_sub_half_ne hz - refine differentiableAt_Gammaℝ_of_ne fun m => ?_ - have h := this m - simpa using h - exact h.comp (analyticAt_const.sub analyticAt_id) - -lemma chiFE_analyticAt_goodStrip {s : ℂ} (hs : s ∈ GoodStrip) : AnalyticAt ℂ chiFE s := by - have : chiFE = fun z => Gammaℝ (1 - z) / Gammaℝ z := funext chiFE_def - rw [this] - exact (analyticAt_Gammaℝ_one_sub_goodStrip hs).div (analyticAt_Gammaℝ_goodStrip hs) - (Gammaℝ_ne_zero_of_ne (goodStrip_half_ne hs)) - -lemma chiFE_ne_zero_goodStrip {s : ℂ} (hs : s ∈ GoodStrip) : chiFE s ≠ 0 := - div_ne_zero (Gammaℝ_ne_zero_of_ne (goodStrip_one_sub_half_ne hs)) (Gammaℝ_ne_zero_of_ne (goodStrip_half_ne hs)) - -lemma L2_analyticAt_goodStrip {s : ℂ} (hs : s ∈ GoodStrip) : AnalyticAt ℂ L2 s := by - have e : L2 = fun z => -(1/2) * (deriv chiFE z / chiFE z) := by - funext z; rw [L2, logDeriv_apply] - rw [e] - exact analyticAt_const.mul ((chiFE_analyticAt_goodStrip hs).deriv.div (chiFE_analyticAt_goodStrip hs) - (chiFE_ne_zero_goodStrip hs)) - -lemma hardyW_analyticAt_goodStrip {s : ℂ} (hs : s ∈ GoodStrip) : AnalyticAt ℂ hardyW s := by - have e : hardyW = fun z => deriv riemannZeta z + L2 z * riemannZeta z := funext fun z => rfl - rw [e] - exact (analyticAt_deriv_riemannZeta (goodStrip_ne_one hs)).add - ((L2_analyticAt_goodStrip hs).mul (Hardy.analyticAt_riemannZeta (goodStrip_ne_one hs))) - -/-! ## 2. E₂ and F_𝒵 -/ - -/-- E₂ := L₂ + ζ′/ζ (= W/ζ wherever ζ ≠ 0; = L₂ − A on Re s > 1). -/ -def E2fn (s : ℂ) : ℂ := L2 s + logDeriv riemannZeta s - -/-- F_𝒵 := L₂ + W′/W [XF′ §9.0]. -/ -def FZfn (s : ℂ) : ℂ := L2 s + logDeriv hardyW s - -theorem hardyW_eq_zeta_mul_E2fn {s : ℂ} (hζ : riemannZeta s ≠ 0) : hardyW s = riemannZeta s * E2fn s := by - rw [E2fn, hardyW_eq_zeta_mul hζ]; ring - -theorem E2fn_eq_L2_sub_Afn {s : ℂ} (hs : 1 < s.re) : E2fn s = L2 s - Afn s := by - rw [E2fn, logDeriv_zeta_eq_neg_Afn hs]; ring - -theorem E2fn_eq_Efn_add {s : ℂ} : E2fn s = Efn s + (L2 s - Lfn s) := by - rw [E2fn, Efn]; ring - -theorem analyticAt_E2fn {s : ℂ} (hs : s ∈ GoodStrip) : AnalyticAt ℂ E2fn s := by - have e : E2fn = fun z => L2 z + logDeriv riemannZeta z := rfl - have h1 : AnalyticAt ℂ (logDeriv riemannZeta) s := by - have : logDeriv riemannZeta = fun z => deriv riemannZeta z / riemannZeta z := by - funext z; rw [logDeriv_apply] - rw [this] - exact (analyticAt_deriv_riemannZeta (goodStrip_ne_one hs)).div - (Hardy.analyticAt_riemannZeta (goodStrip_ne_one hs)) (riemannZeta_ne_zero_of_one_lt_re hs.1) - rw [e]; exact (L2_analyticAt_goodStrip hs).add h1 - -theorem differentiableAt_E2fn {s : ℂ} (hs : s ∈ GoodStrip) : DifferentiableAt ℂ E2fn s := - (analyticAt_E2fn hs).differentiableAt - -theorem differentiableAt_L2 {s : ℂ} (hs : s ∈ GoodStrip) : DifferentiableAt ℂ L2 s := - (L2_analyticAt_goodStrip hs).differentiableAt - -theorem deriv_E2fn {s : ℂ} (hs : s ∈ GoodStrip) : deriv E2fn s = deriv L2 s + Bfn s := by - have h : HasDerivAt E2fn (deriv L2 s + Bfn s) s := - (differentiableAt_L2 hs).hasDerivAt.add (hasDerivAt_logDeriv_zeta hs.1) - exact h.deriv - -theorem E2fn_ne_zero {s : ℂ} (hs : 1 < s.re) (hW : hardyW s ≠ 0) : E2fn s ≠ 0 := by - intro h; apply hW - rw [hardyW_eq_zeta_mul_E2fn (riemannZeta_ne_zero_of_one_lt_re hs), h, mul_zero] - -/-- **[XF′ (Z1)]** F_𝒵 = E₂ + E₂′/E₂ on 1 < Re s < 3/2 wherever W ≠ 0. -/ -theorem FZfn_eq {s : ℂ} (hs : s ∈ GoodStrip) (hW : hardyW s ≠ 0) : - FZfn s = E2fn s + deriv E2fn s / E2fn s := by - have hev : hardyW =ᶠ[𝓝 s] fun z => riemannZeta z * E2fn z := by - filter_upwards [isOpen_goodStrip.mem_nhds hs] with z hz - exact hardyW_eq_zeta_mul_E2fn (riemannZeta_ne_zero_of_one_lt_re hz.1) - have hζ := riemannZeta_ne_zero_of_one_lt_re hs.1 - have hE : E2fn s ≠ 0 := E2fn_ne_zero hs.1 hW - have e1 : logDeriv hardyW s = logDeriv (fun z => riemannZeta z * E2fn z) s := by - simp only [logDeriv_apply, hev.deriv_eq, hev.self_of_nhds] - rw [FZfn, e1, logDeriv_mul (f := riemannZeta) (g := E2fn) s hζ hE - (differentiableAt_riemannZeta (goodStrip_ne_one hs)) (differentiableAt_E2fn hs), logDeriv_apply (f := E2fn)] - rw [E2fn]; ring - -/-- E₂′/E₂ = F_𝒵 − E₂. -/ -theorem derivE2_div_E2_eq {s : ℂ} (hs : s ∈ GoodStrip) (hW : hardyW s ≠ 0) : - deriv E2fn s / E2fn s = FZfn s - E2fn s := by - rw [FZfn_eq hs hW]; ring - -/-! ## 3. Symmetries (off the real axis) -/ - -theorem logDeriv_riemannZeta_conj {s : ℂ} (hs : s ≠ 1) : - logDeriv riemannZeta (conj s) = conj (logDeriv riemannZeta s) := by - rw [logDeriv_apply, logDeriv_apply, deriv_riemannZeta_conj hs, Zeta23.riemannZeta_conj hs, map_div₀] - -theorem E2fn_conj {s : ℂ} (hs : s.im ≠ 0) : E2fn (conj s) = conj (E2fn s) := by - rw [E2fn, E2fn, L2_conj hs, logDeriv_riemannZeta_conj (ne_one_of_im_ne_zero hs), map_add] - -theorem logDeriv_hardyW_conj {s : ℂ} (hs : s.im ≠ 0) : - logDeriv hardyW (conj s) = conj (logDeriv hardyW s) := by - have hs' : (conj s).im ≠ 0 := by simpa using hs - rw [logDeriv_apply, logDeriv_apply, hardyW_conj hs] - rw [deriv_conj_of_symm (hardyW_differentiableAt hs) ?_, map_div₀] - filter_upwards [isOpen_im_ne_zero.mem_nhds hs'] with z hz - exact hardyW_conj hz - -theorem FZfn_conj {s : ℂ} (hs : s.im ≠ 0) : FZfn (conj s) = conj (FZfn s) := by - rw [FZfn, FZfn, L2_conj hs, logDeriv_hardyW_conj hs, map_add] - -/-- W′/W(1−s) = −W′/W(s) − 2L₂(s) [XF′ (Z2)], wherever W(s) ≠ 0, off ℝ. -/ -theorem logDeriv_hardyW_one_sub {s : ℂ} (hs : s.im ≠ 0) (hW : hardyW s ≠ 0) : - logDeriv hardyW (1 - s) = -logDeriv hardyW s - 2 * L2 s := by - have hs' := im_one_sub_ne_zero hs - have hev : (fun z => hardyW (1 - z)) =ᶠ[𝓝 s] fun z => -(hardyW z / chiFE z) := by - filter_upwards [isOpen_im_ne_zero.mem_nhds hs] with z hz - rw [hardyW_eq_neg_chiFE_mul hz] - field_simp [chiFE_ne_zero hz] - have hχ := chiFE_ne_zero hs - have hdW := hardyW_differentiableAt hs - have hdχ := (chiFE_analyticAt hs).differentiableAt - have hd1 : deriv (fun z => hardyW (1 - z)) s = -deriv hardyW (1 - s) := by - have h1 : HasDerivAt (fun z : ℂ => 1 - z) (-1) s := by - simpa using (hasDerivAt_const s (1:ℂ)).fun_sub (hasDerivAt_id s) - have h := (hardyW_differentiableAt hs').hasDerivAt.comp s h1 - rw [show (hardyW ∘ HSub.hSub 1) = (fun z => hardyW (1 - z)) from rfl] at h - rw [h.deriv]; ring - have hd2 : deriv (fun z => hardyW (1 - z)) s = deriv (fun z => -(hardyW z / chiFE z)) s := hev.deriv_eq - have hd3 : deriv (fun z => -(hardyW z / chiFE z)) s - = -((deriv hardyW s * chiFE s - hardyW s * deriv chiFE s) / chiFE s ^ 2) := by - have h := ((hdW.hasDerivAt).div (hdχ.hasDerivAt) hχ).neg - exact h.deriv - have hval : hardyW (1 - s) = -(hardyW s / chiFE s) := hev.self_of_nhds - have hderiv : deriv hardyW (1 - s) = (deriv hardyW s * chiFE s - hardyW s * deriv chiFE s) / chiFE s ^ 2 := by - have : deriv hardyW (1 - s) = -deriv (fun z => hardyW (1 - z)) s := by rw [hd1]; ring - rw [this, hd2, hd3]; ring - rw [logDeriv_apply, logDeriv_apply, hval, hderiv, deriv_chiFE hs] - field_simp - ring - -/-- **[XF′ (Z2)]** F_𝒵(1−s) = −F_𝒵(s), off ℝ, wherever W(s) ≠ 0. -/ -theorem FZfn_one_sub {s : ℂ} (hs : s.im ≠ 0) (hW : hardyW s ≠ 0) : FZfn (1 - s) = -FZfn s := by - rw [FZfn, FZfn, L2_one_sub hs, logDeriv_hardyW_one_sub hs hW]; ring - -/-! ## 4. Finitely many low zeros to the right of Re s = 1; a zero-free line -/ - -/-- the compact box [9/8, 5/4] × [−t₀, t₀] carries finitely many zeros of W. -/ -theorem finite_lowZeros_right (t₀ : ℝ) : - ({s : ℂ | 9/8 ≤ s.re ∧ s.re ≤ 5/4 ∧ |s.im| ≤ t₀} ∩ hardyW ⁻¹' {0}).Finite := by - -- W is analytic on a neighbourhood of the box and not identically zero there (W = ζ·E₂ with - -- Re E₂(5/4 + it) ≠ 0 for large t); isolated zeros + compactness. - obtain ⟨t₁, ht₁, hlow⟩ := hardyW_two_line_lower - -- We embed the box in the bigger rectangle [9/8, 2] × [−R, R], on which W is analytic - -- (W has no poles on 1 < Re s < 3), and use the nonvanishing point 2 + i t₁ from the two-line bound. - set R : ℝ := max (max t₀ 0) t₁ with hR - have hsub : {s : ℂ | 9/8 ≤ s.re ∧ s.re ≤ 5/4 ∧ |s.im| ≤ t₀} ∩ hardyW ⁻¹' {0} - ⊆ Rectangle (((9/8:ℝ):ℂ) - R * I) ((2:ℂ) + R * I) ∩ hardyW ⁻¹' {0} := by - intro s ⟨⟨h1, h2, h3⟩, h0⟩ - refine ⟨?_, h0⟩ - rw [mem_Rect (by simp; norm_num) (by simp; exact le_trans (by positivity) (le_max_of_le_left (le_max_right _ _)))] - simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_re, - re_ofNat, add_zero, sub_im, mul_im, zero_sub, add_im, im_ofNat, zero_add, sub_zero] - refine ⟨h1, by linarith, ?_, ?_⟩ - · have := (abs_le.mp h3).1; have : t₀ ≤ R := le_trans (le_max_left _ _) (le_max_left _ _); linarith - · have := (abs_le.mp h3).2; have : t₀ ≤ R := le_trans (le_max_left _ _) (le_max_left _ _); linarith - refine Set.Finite.subset ?_ hsub - -- analyticity on the closed rectangle [9/8, 2] × [−R, R]: 1 < Re < 3 avoids every pole - have hanal : AnalyticOnNhd ℂ hardyW (Rectangle (((9/8:ℝ):ℂ) - R * I) ((2:ℂ) + R * I)) := by - intro s hs - have hR0 : 0 ≤ R := le_trans (le_max_right _ _) (le_max_left _ _) - rw [mem_Rect (by simp; norm_num) (by simp; linarith)] at hs - simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_re, - re_ofNat, add_zero, sub_im, mul_im, zero_sub, add_im, im_ofNat, zero_add, sub_zero] at hs - obtain ⟨h1, h2, -, -⟩ := hs - -- points with 1 < Re < 3: Γℝ(s), Γℝ(1−s) analytic, s ≠ 1 - have hne1 : s ≠ 1 := fun h => by rw [h] at h1; simp at h1; linarith - have hA : ∀ m : ℕ, s / 2 ≠ -(m:ℂ) := by - intro m h; have := congrArg Complex.re h; simp at this - have : (0:ℝ) ≤ m := Nat.cast_nonneg m; linarith - have hB : ∀ m : ℕ, (1 - s) / 2 ≠ -(m:ℂ) := by - intro m h; have := congrArg Complex.re h; simp at this - rcases Nat.eq_zero_or_pos m with rfl | hm - · simp at this; linarith - · rcases Nat.lt_or_ge m 2 with hm2 | hm2 - · interval_cases m <;> simp at this <;> linarith - · have : (2:ℝ) ≤ m := by exact_mod_cast hm2 - linarith - -- assemble: chiFE analytic & ≠ 0 at s - have hG : AnalyticAt ℂ Gammaℝ s := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - have hopen : IsOpen {z : ℂ | 1 < z.re ∧ z.re < 3} := - (isOpen_lt continuous_const Complex.continuous_re).inter (isOpen_lt Complex.continuous_re continuous_const) - filter_upwards [hopen.mem_nhds (show s ∈ {z : ℂ | 1 < z.re ∧ z.re < 3} from ⟨by linarith, by linarith⟩)] with z hz - refine differentiableAt_Gammaℝ_of_ne fun m h => ?_ - have := congrArg Complex.re h; simp at this - have : (0:ℝ) ≤ m := Nat.cast_nonneg m; linarith [hz.1] - have hG1 : AnalyticAt ℂ (fun z => Gammaℝ (1 - z)) s := by - have h : AnalyticAt ℂ Gammaℝ (1 - s) := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - have hopen : IsOpen {z : ℂ | -2 < z.re ∧ z.re < 0} := - (isOpen_lt continuous_const Complex.continuous_re).inter (isOpen_lt Complex.continuous_re continuous_const) - have hmem : (1 - s) ∈ {z : ℂ | -2 < z.re ∧ z.re < 0} := by - simp only [mem_setOf_eq, sub_re, one_re]; constructor <;> linarith - filter_upwards [hopen.mem_nhds hmem] with z hz - refine differentiableAt_Gammaℝ_of_ne fun m h => ?_ - have := congrArg Complex.re h; simp at this - rcases Nat.eq_zero_or_pos m with rfl | hm - · simp at this; linarith [hz.2] - · have : (1:ℝ) ≤ m := by exact_mod_cast hm - linarith [hz.1] - exact h.comp (analyticAt_const.sub analyticAt_id) - have hχ : AnalyticAt ℂ chiFE s := by - have : chiFE = fun z => Gammaℝ (1 - z) / Gammaℝ z := funext chiFE_def - rw [this]; exact hG1.div hG (Gammaℝ_ne_zero_of_ne hA) - have hχ0 : chiFE s ≠ 0 := div_ne_zero (Gammaℝ_ne_zero_of_ne hB) (Gammaℝ_ne_zero_of_ne hA) - have hL2 : AnalyticAt ℂ L2 s := by - have e : L2 = fun z => -(1/2) * (deriv chiFE z / chiFE z) := by funext z; rw [L2, logDeriv_apply] - rw [e]; exact analyticAt_const.mul (hχ.deriv.div hχ hχ0) - have e : hardyW = fun z => deriv riemannZeta z + L2 z * riemannZeta z := funext fun z => rfl - rw [e] - exact (analyticAt_deriv_riemannZeta hne1).add (hL2.mul (Hardy.analyticAt_riemannZeta hne1)) - -- the nonvanishing point 2 + i t₁ lies in the rectangle - have hx : (2:ℂ) + t₁ * I ∈ Rectangle (((9/8:ℝ):ℂ) - R * I) ((2:ℂ) + R * I) := by - have hR0 : t₁ ≤ R := le_max_right _ _ - rw [mem_Rect (by simp; norm_num) (by simp; linarith)] - simp; constructor <;> [norm_num; constructor <;> linarith] - have hWx : hardyW ((2:ℂ) + t₁ * I) ≠ 0 := by - have := (hlow t₁ (by rw [abs_of_pos (by linarith)])).2 - intro h; rw [h, norm_zero] at this; linarith - exact Zeta23.Analytic.finite_zeros_rectangle hanal hx hWx - -/-- **choice of the line**: some c ∈ [9/8, 5/4] such that W has no zero of height < t₀ on Re s = c. -/ -theorem exists_zeroFree_line (t₀ : ℝ) : - ∃ c : ℝ, 9/8 ≤ c ∧ c ≤ 5/4 ∧ ∀ s : ℂ, s.re = c → |s.im| < t₀ → hardyW s ≠ 0 := by - have hfin := finite_lowZeros_right t₀ - set bad : Finset ℝ := (hfin.image Complex.re).toFinset with hbad - obtain ⟨c, hc, hcb⟩ := (Icc_infinite (show (9/8:ℝ) < 5/4 by norm_num)).exists_notMem_finset bad - refine ⟨c, hc.1, hc.2, fun s hsre hsim h0 => hcb ?_⟩ - rw [hbad, Set.Finite.mem_toFinset] - exact ⟨s, ⟨⟨by rw [hsre]; exact hc.1, by rw [hsre]; exact hc.2, hsim.le⟩, h0⟩, hsre⟩ - -/-- … and then also none on Re s = 1 − c (off ℝ by W(1−s) = 0 ↔ W(s) = 0; at the real point via -the reflection identity extended to the real point by continuity). -/ -theorem hardyW_ne_zero_reflect_line {c t₀ : ℝ} - (h : ∀ s : ℂ, s.re = c → |s.im| < t₀ → hardyW s ≠ 0) : - ∀ s : ℂ, s.re = 1 - c → |s.im| < t₀ → s.im ≠ 0 → hardyW s ≠ 0 := by - intro s hsre hsim him h0 - have h1 : hardyW (1 - s) = 0 := (hardyW_one_sub_eq_zero_iff him).mpr h0 - exact h (1 - s) (by simp [hsre]) (by simpa using hsim) h1 - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFContour.lean b/zeta23/Zeta23/XiPrime/Hardy/EFContour.lean deleted file mode 100644 index 2cf2d75db2..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFContour.lean +++ /dev/null @@ -1,455 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFContour.lean — the two full-line contour identities of the W explicit formula -([XF′ Prop 9.1, Thm 9.2(a), (Z4)]). - - lminus_line_identity : (1/2π) ∫ [H(c+it) + H(1−c−it)]·(Lfn − L₂)(c+it) dt = ½ (H(0) + H(1)), - w_full_line_identity : (1/2π) ∫ [H(c+it) + H(1−c−it)]·(L₂ + W′/W)(c+it) dt - = Σ'_{ρ ∈ wZeros} m_ρ H(ρ) + Σ_{ρ ∈ lowZerosW c t₀} ord_ρ(W) H(ρ) − (3/2)(H(0) + H(1)), -for 1 < c ≤ 5/4, H = WeilEF.Hfn k (k ∈ C²_c). Pipeline: EFContour/Rectangle.lean (the identities at a fixed height: -pole-free argument principle for (Γℝ)⁻¹, (Γℝ)⁻¹∘(1−·), s(s−1), s(s−1)², Wreg) → EFContour/Limit.lean (the -integrand-generic R → ∞ passage) with: heights/horizontal bounds from Hardy/GoodHeightsW.lean (W) or from -the explicit Γℝ′/Γℝ log bounds (L₋); the fold symmetries L₋(1−s) = −L₋(s), F_𝒵(1−s) = −F_𝒵(s); summability of the zero -sum from hR.local_count via WeilEF.EF_zero_sum_summable_gen; and FullLine.zero_sum_limit_of for the windows. -The low zeros (|Im ρ| < t₀, 1−c < Re ρ < c, ρ ∉ {0,1}; REAL zeros of W included) form a fixed finite set. --/ -import Zeta23.XiPrime.Hardy.EFContour.Rectangle -import Zeta23.XiPrime.Hardy.EFContour.Limit -import Zeta23.XiPrime.Hardy.GoodHeightsW -import Zeta23.WeilEF.ZeroSummabilityGen - -open Complex Set Filter Topology MeasureTheory -open Zeta23.WeilEF (Hfn) - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Hardy Hardy.EFContour - -/-! ## §1. L₋ := Lfn − L₂ through G = (Γℝ)⁻¹; symmetry; analyticity; bounds -/ - -namespace Hardy -namespace EFContour - -/-- logDeriv (G∘(1−·)) s = −(G′/G)(1−s). -/ -lemma logDeriv_invGammaℝ_comp_one_sub (s : ℂ) : - logDeriv (fun z => invGammaℝ (1 - z)) s = -logDeriv invGammaℝ (1 - s) := by - have h := logDeriv_comp (f := invGammaℝ) (g := fun z : ℂ => 1 - z) (x := s) (differentiable_invGammaℝ _) - ((differentiableAt_const _).sub differentiableAt_id) - rw [show (invGammaℝ ∘ fun z : ℂ => 1 - z) = fun z => invGammaℝ (1 - z) from rfl] at h - rw [h, deriv_const_sub, deriv_id'']; ring - -/-- L₂ = −½[(G′/G)(s) + (G′/G)(1−s)] wherever Γℝ(s), Γℝ(1−s) ≠ 0. -/ -lemma L2_eq_G {s : ℂ} (h0 : Gammaℝ s ≠ 0) (h1 : Gammaℝ (1 - s) ≠ 0) : - L2 s = -(1 / 2 : ℂ) * (logDeriv invGammaℝ s + logDeriv invGammaℝ (1 - s)) := by - rw [L2, logDeriv_chiFE_eq h1 h0, logDeriv_Gammaℝ_one_sub_eq h1, logDeriv_invGammaℝ_comp_one_sub]; ring - -/-- L₋ = −½(G′/G)(s) + ½(G′/G)(1−s) + 1/s + 1/(s−1). -/ -lemma Lminus_eq_G {s : ℂ} (h0 : Gammaℝ s ≠ 0) (h1 : Gammaℝ (1 - s) ≠ 0) : - Lfn s - L2 s = -(1 / 2 : ℂ) * logDeriv invGammaℝ s + (1 / 2 : ℂ) * logDeriv invGammaℝ (1 - s) - + 1 / s + 1 / (s - 1) := by - rw [Lfn, logDeriv_Gammaℝ_eq_neg h0, L2_eq_G h0 h1]; ring - -/-- **L₋ is odd under s ↦ 1−s** (on the strip off the poles). -/ -theorem Lminus_one_sub {s : ℂ} (h0 : Gammaℝ s ≠ 0) (h1 : Gammaℝ (1 - s) ≠ 0) (hs0 : s ≠ 0) (hs1 : s ≠ 1) : - Lfn (1 - s) - L2 (1 - s) = -(Lfn s - L2 s) := by - have h1' : Gammaℝ (1 - (1 - s)) ≠ 0 := by rw [sub_sub_cancel]; exact h0 - rw [Lminus_eq_G h1 h1', Lminus_eq_G h0 h1, sub_sub_cancel] - have : (1 : ℂ) - s ≠ 0 := sub_ne_zero.mpr (Ne.symm hs1) - have : (1 : ℂ) - s - 1 ≠ 0 := by rw [sub_sub_cancel_left]; exact neg_ne_zero.mpr hs0 - have : s - 1 ≠ 0 := sub_ne_zero.mpr hs1 - field_simp - ring - -theorem Lfn_analyticAt {s : ℂ} (h0 : Gammaℝ s ≠ 0) (hs0 : s ≠ 0) (hs1 : s ≠ 1) : AnalyticAt ℂ Lfn s := by - have e : Lfn = fun z => deriv Gammaℝ z / Gammaℝ z + 1 / z + 1 / (z - 1) := by - funext z; rw [Lfn, logDeriv_apply] - rw [e] - have hG := analyticAt_Gammaℝ h0 - refine ((hG.deriv.div hG h0).add (analyticAt_const.div analyticAt_id hs0)).add - (analyticAt_const.div (analyticAt_id.sub analyticAt_const) (sub_ne_zero.mpr hs1)) - -theorem Lminus_analyticAt {s : ℂ} (hs : s ∈ stripReg) : AnalyticAt ℂ (fun z => Lfn z - L2 z) s := - (Lfn_analyticAt (Gammaℝ_ne_zero_of_re hs.1 hs.2.2.1) hs.2.2.1 hs.2.2.2).sub (L2_analyticAt_of_mem hs) - -/-- ‖Γℝ′/Γℝ(u)‖ ≤ log(|Im u|+3) + 6 on −1/4 ≤ Re u ≤ 2, |Im u| ≥ 2 (shift once when Re u ≤ 0). -/ -lemma norm_logDeriv_Gammaℝ_le_strip {u : ℂ} (hre : -1 / 4 ≤ u.re) (hre' : u.re ≤ 2) (him : 2 ≤ |u.im|) : - ‖logDeriv Gammaℝ u‖ ≤ Real.log (|u.im| + 3) + 6 := by - rcases lt_or_ge 0 u.re with hpos | hnp - · have := ZeroCount.norm_logDeriv_Gammaℝ_le_log hpos (by linarith) him - linarith - · have hu : u.im ≠ 0 := by intro h; rw [h] at him; norm_num at him - rw [logDeriv_Gammaℝ_shift hu] - have h2 := ZeroCount.norm_logDeriv_Gammaℝ_le_log (s := u + 2) (by simp; linarith) (by simp; linarith) - (by simpa using him) - have hinv : ‖1 / u‖ ≤ 1 := by - rw [norm_div, norm_one, div_le_one (norm_pos_iff.mpr (ne_zero_of_im_ne_zero hu))] - exact le_trans (by linarith) (Complex.abs_im_le_norm u) - calc ‖logDeriv Gammaℝ (u + 2) - 1 / u‖ ≤ ‖logDeriv Gammaℝ (u + 2)‖ + ‖1 / u‖ := norm_sub_le _ _ - _ ≤ (Real.log (|(u + 2).im| + 3) + 5) + 1 := add_le_add h2 hinv - _ = Real.log (|u.im| + 3) + 6 := by simp; ring - -/-- horizontal bound for L₋: ‖(Lfn − L₂)(s)‖ ≤ log(|Im s|+3) + 7 on 1−c ≤ Re s ≤ c, |Im s| ≥ 2. -/ -lemma norm_Lminus_le {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 5 / 4) {s : ℂ} (hr1 : 1 - c ≤ s.re) (hr2 : s.re ≤ c) - (him : 2 ≤ |s.im|) : ‖Lfn s - L2 s‖ ≤ Real.log (|s.im| + 3) + 7 := by - have hs : s.im ≠ 0 := by intro h; rw [h] at him; norm_num at him - have hs0 : s ≠ 0 := ne_zero_of_im_ne_zero hs - have hs1 : s ≠ 1 := ne_one_of_im_ne_zero hs - have h0 : Gammaℝ s ≠ 0 := Gammaℝ_ne_zero_of_re (by linarith) hs0 - have h1 : Gammaℝ (1 - s) ≠ 0 := Gammaℝ_one_sub_ne_zero_of_re (by linarith) hs1 - rw [Lminus_eq_G h0 h1] - have hG : ∀ u : ℂ, Gammaℝ u ≠ 0 → ‖logDeriv invGammaℝ u‖ = ‖logDeriv Gammaℝ u‖ := fun u hu => by - rw [logDeriv_Gammaℝ_eq_neg hu, norm_neg] - have hA : ‖logDeriv invGammaℝ s‖ ≤ Real.log (|s.im| + 3) + 6 := by - rw [hG s h0]; exact norm_logDeriv_Gammaℝ_le_strip (by linarith) (by linarith) him - have hB : ‖logDeriv invGammaℝ (1 - s)‖ ≤ Real.log (|s.im| + 3) + 6 := by - rw [hG (1 - s) h1] - have := norm_logDeriv_Gammaℝ_le_strip (u := 1 - s) (by simp; linarith) (by simp; linarith) (by simpa using him) - simpa using this - have hsnorm : 2 ≤ ‖s‖ := le_trans him (Complex.abs_im_le_norm s) - have hs1norm : 2 ≤ ‖s - 1‖ := by - have := Complex.abs_im_le_norm (s - 1); simp at this; linarith - have hC : ‖1 / s‖ ≤ 1 / 2 := by - rw [norm_div, norm_one]; exact div_le_div_of_nonneg_left zero_le_one (by norm_num) hsnorm - have hD : ‖1 / (s - 1)‖ ≤ 1 / 2 := by - rw [norm_div, norm_one]; exact div_le_div_of_nonneg_left zero_le_one (by norm_num) hs1norm - have hhalf : ‖(1 / 2 : ℂ)‖ = 1 / 2 := by norm_num - have hnhalf : ‖(-(1 / 2) : ℂ)‖ = 1 / 2 := by norm_num - calc ‖-(1 / 2 : ℂ) * logDeriv invGammaℝ s + (1 / 2 : ℂ) * logDeriv invGammaℝ (1 - s) + 1 / s + 1 / (s - 1)‖ - ≤ ‖-(1 / 2 : ℂ) * logDeriv invGammaℝ s‖ + ‖(1 / 2 : ℂ) * logDeriv invGammaℝ (1 - s)‖ + ‖1 / s‖ + ‖1 / (s - 1)‖ := by - refine (norm_add_le _ _).trans (add_le_add ((norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl)) le_rfl) - _ ≤ (1 / 2) * (Real.log (|s.im| + 3) + 6) + (1 / 2) * (Real.log (|s.im| + 3) + 6) + 1 / 2 + 1 / 2 := by - rw [norm_mul, norm_mul, hhalf, hnhalf]; gcongr - _ = Real.log (|s.im| + 3) + 7 := by ring - -end EFContour -end Hardy - -/-! ## §2. The L₋ line identity -/ - -/-- **(1/2π) ∫ [H(c+it) + H(1−c−it)] · (Lfn − L₂)(c+it) dt = ½(H(0) + H(1))**, 1 < c ≤ 5/4. -/ -theorem lminus_line_identity {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 5 / 4) {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) - (hkc : HasCompactSupport k) : - Integrable (fun t : ℝ => (Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) - * (Lfn ((c : ℂ) + t * I) - L2 ((c : ℂ) + t * I))) ∧ - (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, (Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) - * (Lfn ((c : ℂ) + t * I) - L2 ((c : ℂ) + t * I))) - = (1 / 2 : ℂ) * (Hfn k 0 + Hfn k 1) := by - set F : ℂ → ℂ := fun s => Lfn s - L2 s with hF - -- points of the two vertical lines are in stripReg - have hline_mem : ∀ t : ℝ, ((c : ℂ) + t * I) ∈ stripReg := fun t => - ⟨by simp; linarith, by simp; linarith, fun h => by have := congrArg Complex.re h; simp at this; linarith, - fun h => by have := congrArg Complex.re h; simp at this; linarith⟩ - have hl : Continuous fun t : ℝ => (c : ℂ) + t * I := by fun_prop - have hFc : Continuous fun t : ℝ => F ((c : ℂ) + t * I) := by - refine continuous_iff_continuousAt.mpr fun t => ?_ - exact ContinuousAt.comp (f := fun t : ℝ => (c : ℂ) + t * I) (x := t) - ((Lminus_analyticAt (hline_mem t)).continuousAt) hl.continuousAt - have hsymm : ∀ t : ℝ, F (1 - ((c : ℂ) + t * I)) = -F ((c : ℂ) + t * I) := by - intro t - obtain ⟨ha, hb, h0, h1⟩ := hline_mem t - exact Lminus_one_sub (Gammaℝ_ne_zero_of_re ha h0) (Gammaℝ_one_sub_ne_zero_of_re hb h1) h0 h1 - -- line bound: explicit for |t| ≥ 2, compactness for |t| ≤ 2 - obtain ⟨B, hB⟩ : ∃ B : ℝ, ∀ t ∈ Icc (-2 : ℝ) 2, ‖F ((c : ℂ) + t * I)‖ ≤ B := - isCompact_Icc.exists_bound_of_continuousOn hFc.continuousOn - have hline : ∃ M : ℝ, ∀ t : ℝ, ‖F ((c : ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|) := by - have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - refine ⟨max (|B| / Real.log 2) 12, fun t => ?_⟩ - have hl2 : Real.log 2 ≤ Real.log (2 + |t|) := Real.log_le_log (by norm_num) (by linarith [abs_nonneg t]) - rcases le_or_gt |t| 2 with ht | ht - · have h1 := hB t (abs_le.mp ht) - calc ‖F ((c : ℂ) + t * I)‖ ≤ |B| := h1.trans (le_abs_self B) - _ = (|B| / Real.log 2) * Real.log 2 := by field_simp - _ ≤ max (|B| / Real.log 2) 12 * Real.log (2 + |t|) := - mul_le_mul (le_max_left _ _) hl2 hlog2.le (le_trans (by positivity) (le_max_left _ _)) - · have h := norm_Lminus_le hc1 hc2 (s := (c : ℂ) + t * I) (by simp; linarith) (by simp) (by simp; linarith) - have hl3 : Real.log (|t| + 3) ≤ 2 * Real.log (2 + |t|) := by - rw [← Real.log_rpow (by linarith [abs_nonneg t]), Real.rpow_two] - exact Real.log_le_log (by linarith [abs_nonneg t]) (by nlinarith [abs_nonneg t]) - have hl4 : 1 ≤ Real.log (2 + |t|) := by - rw [← Real.log_exp 1] - exact Real.log_le_log (Real.exp_pos 1) (by linarith [Real.exp_one_lt_d9]) - simp only [add_im, ofReal_im, mul_im, ofReal_re, I_im, I_re, zero_add, mul_one, mul_zero, add_zero] at h - calc ‖F ((c : ℂ) + t * I)‖ ≤ Real.log (|t| + 3) + 7 := h - _ ≤ 12 * Real.log (2 + |t|) := by linarith - _ ≤ max (|B| / Real.log 2) 12 * Real.log (2 + |t|) := - mul_le_mul_of_nonneg_right (le_max_right _ _) (by linarith) - -- heights R_j := j + 2 and the horizontal bound - set R : ℕ → ℝ := fun j => (j : ℝ) + 2 with hRdef - have hR : ∀ j : ℕ, (j : ℝ) + (2 : ℕ) ≤ R j ∧ R j ≤ (j : ℝ) + (2 : ℕ) + 1 := fun j => by - simp only [hRdef, Nat.cast_ofNat]; constructor <;> linarith - have hhor : ∀ j : ℕ, ∀ s : ℂ, (s.im = R j ∨ s.im = -R j) → 1 - c ≤ s.re → s.re ≤ c → - ‖F s‖ ≤ 9 * (Real.log ((j : ℝ) + (2 : ℕ) + 3)) ^ 2 := by - intro j s him hr1 hr2 - have habs : |s.im| = R j := by - rcases him with h | h - · rw [h, abs_of_nonneg]; simp [hRdef]; positivity - · rw [h, abs_neg, abs_of_nonneg]; simp [hRdef]; positivity - have h2 : 2 ≤ |s.im| := by rw [habs]; simp [hRdef] - have h := norm_Lminus_le hc1 hc2 hr1 hr2 h2 - rw [habs] at h - set Lg := Real.log ((j : ℝ) + (2 : ℕ) + 3) with hLg - have hLg1 : 1 ≤ Lg := by - rw [hLg, ← Real.log_exp 1] - exact Real.log_le_log (Real.exp_pos 1) (by push_cast; linarith [Real.exp_one_lt_d9]) - have hl : Real.log (R j + 3) ≤ 2 * Lg := by - rw [hLg, ← Real.log_rpow (by push_cast; positivity), Real.rpow_two] - apply Real.log_le_log (by simp [hRdef]; positivity) - simp only [hRdef]; push_cast; nlinarith - calc ‖F s‖ ≤ Real.log (R j + 3) + 7 := h - _ ≤ 2 * Lg + 7 * Lg ^ 2 := by nlinarith - _ ≤ 9 * Lg ^ 2 := by nlinarith - -- rectangle values (constant) and the limit - have hE : ∀ j : ℕ, RectangleIntegral' (fun s => Hfn k s * F s) (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) - = (1 / 2 : ℂ) * (Hfn k 0 + Hfn k 1) := fun j => - rect_Lminus hk hkc hc1 hc2 (R := R j) (by simp [hRdef]; positivity) - exact full_line_of_rectangles (by linarith) (by linarith) hk hkc hFc hsymm hline (j₀ := 2) (by norm_num) - (K := 9) (by norm_num) hR hhor hE tendsto_const_nhds - -/-! ## §3. The low zeros of W and the W full-line identity -/ - -/-- the set of low zeros of W inside the contour strip: W(ρ) = 0, ρ ∉ {0,1}, |Im ρ| < t₀, 1−c < Re ρ < c -(REAL zeros included). -/ -def lowZerosSet (c t₀ : ℝ) : Set ℂ := - {ρ : ℂ | hardyW ρ = 0 ∧ ρ ≠ 0 ∧ ρ ≠ 1 ∧ |ρ.im| < t₀ ∧ 1 - c < ρ.re ∧ ρ.re < c} - -open Classical in -/-- the low zeros of W as a Finset (∅ if infinite — it is finite in every use, see finite_lowZerosSet). -/ -def lowZerosW (c t₀ : ℝ) : Finset ℂ := - if h : (lowZerosSet c t₀).Finite then h.toFinset else ∅ - -theorem mem_lowZerosW {c t₀ : ℝ} {ρ : ℂ} (h : ρ ∈ lowZerosW c t₀) : |ρ.im| < t₀ ∧ 1 - c < ρ.re ∧ ρ.re < c := by - unfold lowZerosW at h - split_ifs at h with hfin - · obtain ⟨-, -, -, h1, h2, h3⟩ := hfin.mem_toFinset.mp h - exact ⟨h1, h2, h3⟩ - · simp at h - -theorem mem_lowZerosW_iff {c t₀ : ℝ} (hfin : (lowZerosSet c t₀).Finite) {ρ : ℂ} : - ρ ∈ lowZerosW c t₀ ↔ ρ ∈ lowZerosSet c t₀ := by - unfold lowZerosW; rw [dif_pos hfin, Set.Finite.mem_toFinset] - -/-- the low-zero set is finite for every 1 < c ≤ 5/4 and every t₀: it lies in the zero set of the analytic Wreg on the -closed rectangle [1−c, c] × [−T, T] (T = max t₀ 1), and Wreg 0 = ¼ ≠ 0. -/ -theorem finite_lowZerosSet {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 5 / 4) (t₀ : ℝ) : (lowZerosSet c t₀).Finite := by - set T : ℝ := max t₀ 1 with hT - have hT0 : 0 < T := lt_of_lt_of_le one_pos (le_max_right _ _) - have hfA : AnalyticOnNhd ℂ Wreg (Rectangle (zc c T) (wc c T)) := fun s hs => - Wreg_analyticAt (re_bounds_of_mem hc1 hc2 hT0 hs).1 (re_bounds_of_mem hc1 hc2 hT0 hs).2 - have hfin := Zeta23.Analytic.finite_zeros_rectangle hfA (zero_mem_rect hc1 hc2 hT0) (by rw [Wreg_zero]; norm_num) - refine hfin.subset ?_ - rintro ρ ⟨h0, hne0, hne1, him, hr1, hr2⟩ - have hρQ : ρ ∈ Rectangle (zc c T) (wc c T) := - (mem_rect_iff (by linarith) hT0.le ρ).mpr ⟨⟨hr1.le, hr2.le⟩, - by linarith [(abs_lt.mp him).1, le_max_left t₀ 1], by linarith [(abs_lt.mp him).2, le_max_left t₀ 1]⟩ - refine ⟨hρQ, ?_⟩ - rw [Set.mem_preimage, Set.mem_singleton_iff, - Wreg_eq_zero_iff ⟨(re_bounds_of_mem hc1 hc2 hT0 hρQ).1, (re_bounds_of_mem hc1 hc2 hT0 hρQ).2, hne0, hne1⟩] - exact h0 - -theorem mem_lowZerosW_iff' {c t₀ : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 5 / 4) {ρ : ℂ} : - ρ ∈ lowZerosW c t₀ ↔ ρ ∈ lowZerosSet c t₀ := mem_lowZerosW_iff (finite_lowZerosSet hc1 hc2 t₀) - -/-- re-indexing good heights into a sequence R_j ∈ [j+j₁, j+j₁+1], j₁ ≥ 1, R_j > t₀. -/ -lemma exists_heightsW {t₀ : ℝ} - (hGH : ∃ C : ℝ, 0 < C ∧ ∃ j₀ : ℕ, t₀ + 1 ≤ j₀ ∧ ∀ j : ℕ, j₀ ≤ j → ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ - ∀ s : ℂ, (s.im = R ∨ s.im = -R) → -1 ≤ s.re → s.re ≤ 2 → - hardyW s ≠ 0 ∧ ‖L2 s + logDeriv hardyW s‖ ≤ C * (Real.log ((j : ℝ) + 3)) ^ 2) : - ∃ C : ℝ, 0 < C ∧ ∃ j₁ : ℕ, 1 ≤ j₁ ∧ t₀ < j₁ ∧ ∃ R : ℕ → ℝ, ∀ j : ℕ, - (j : ℝ) + j₁ ≤ R j ∧ R j ≤ (j : ℝ) + j₁ + 1 ∧ - ∀ s : ℂ, (s.im = R j ∨ s.im = -R j) → -1 ≤ s.re → s.re ≤ 2 → - hardyW s ≠ 0 ∧ ‖L2 s + logDeriv hardyW s‖ ≤ C * (Real.log ((j : ℝ) + j₁ + 3)) ^ 2 := by - obtain ⟨C, hC, j₀, ht₀, h⟩ := hGH - have hex : ∀ j : ℕ, ∃ R : ℝ, ((j + (j₀ + 1) : ℕ) : ℝ) ≤ R ∧ R ≤ ((j + (j₀ + 1) : ℕ) : ℝ) + 1 ∧ - ∀ s : ℂ, (s.im = R ∨ s.im = -R) → -1 ≤ s.re → s.re ≤ 2 → - hardyW s ≠ 0 ∧ ‖L2 s + logDeriv hardyW s‖ ≤ C * (Real.log (((j + (j₀ + 1) : ℕ) : ℝ) + 3)) ^ 2 := - fun j => h (j + (j₀ + 1)) (by omega) - refine ⟨C, hC, j₀ + 1, by omega, by push_cast; linarith, fun j => (hex j).choose, fun j => ?_⟩ - obtain ⟨hs1, hs2, hs3⟩ := (hex j).choose_spec - have e : ((j + (j₀ + 1) : ℕ) : ℝ) = (j : ℝ) + ((j₀ + 1 : ℕ) : ℝ) := by push_cast; ring - refine ⟨by rw [← e]; exact hs1, by rw [← e]; exact hs2, fun s him h1 h2 => ?_⟩ - rw [← e] - exact hs3 s him h1 h2 - -/-- **The W full-line identity** [XF′ Prop 9.1 / (Z4)]. -/ -theorem w_full_line_identity {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) - (hR : RiemannVonMangoldt (wZeros hZ hs)) - {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 5 / 4) - (hWc : ∀ s : ℂ, s.re = c → |s.im| < t₀ → hardyW s ≠ 0) - (hWc' : ∀ s : ℂ, s.re = 1 - c → |s.im| < t₀ → hardyW s ≠ 0) - (hline : ∃ M : ℝ, ∀ t : ℝ, ‖L2 ((c : ℂ) + t * I) + logDeriv hardyW ((c : ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|)) - {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) : - Summable (fun ρ : (wZeros hZ hs).carrier => (wMult (ρ : ℂ) : ℂ) * Hfn k ρ) ∧ - (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, (Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) - * (L2 ((c : ℂ) + t * I) + logDeriv hardyW ((c : ℂ) + t * I))) - = (∑' ρ : (wZeros hZ hs).carrier, (wMult (ρ : ℂ) : ℂ) * Hfn k ρ) - + (∑ ρ ∈ lowZerosW c t₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - - (3 / 2 : ℂ) * (Hfn k 0 + Hfn k 1) := by - classical - have ht₀ : 0 < t₀ := hs.pos - set F : ℂ → ℂ := fun s => L2 s + logDeriv hardyW s with hF - set Zc : ZeroConfig := wZeros hZ hs with hZc - -- summability of the zero sum from the local count - obtain ⟨A₀, hA₀, hloc⟩ := hR.local_count - have hsum : Summable (fun ρ : Zc.carrier => (wMult (ρ : ℂ) : ℂ) * Hfn k ρ) := - Zeta23.WeilEF.EF_zero_sum_summable_gen Zc hA₀ hloc hk hkc - refine ⟨hsum, ?_⟩ - -- W ≠ 0 on the two vertical lines (any height) - have hvert : ∀ s : ℂ, (s.re = 1 - c ∨ s.re = c) → hardyW s ≠ 0 := by - intro s hre h0 - rcases lt_or_ge |s.im| t₀ with hlt | hge - · rcases hre with h | h - · exact hWc' s h hlt h0 - · exact hWc s h hlt h0 - · have := hZ s h0 hge - rcases hre with h | h <;> rw [h] at this <;> linarith [this.1, this.2] - have hline_mem : ∀ t : ℝ, ((c : ℂ) + t * I) ∈ stripReg := fun t => - ⟨by simp; linarith, by simp; linarith, fun h => by have := congrArg Complex.re h; simp at this; linarith, - fun h => by have := congrArg Complex.re h; simp at this; linarith⟩ - have hline_mem' : ∀ t : ℝ, ((1 : ℂ) - ((c : ℂ) + t * I)) ∈ stripReg := fun t => - ⟨by simp; linarith, by simp; linarith, fun h => by have := congrArg Complex.re h; simp at this; linarith, - fun h => by have := congrArg Complex.re h; simp at this; linarith⟩ - -- F is analytic at every point of both lines - have hFan : ∀ s : ℂ, s ∈ stripReg → hardyW s ≠ 0 → AnalyticAt ℂ F s := by - intro s hsR hW - have ha := hardyW_analyticAt_of_mem hsR - have e : F = fun z => L2 z + deriv hardyW z / hardyW z := by funext z; simp only [hF, logDeriv_apply] - rw [e] - exact (L2_analyticAt_of_mem hsR).add (ha.deriv.div ha hW) - have hl : Continuous fun t : ℝ => (c : ℂ) + t * I := by fun_prop - have hl' : Continuous fun t : ℝ => (1 : ℂ) - ((c : ℂ) + t * I) := by fun_prop - have hFc : Continuous fun t : ℝ => F ((c : ℂ) + t * I) := by - refine continuous_iff_continuousAt.mpr fun t => ?_ - exact ContinuousAt.comp (f := fun t : ℝ => (c : ℂ) + t * I) (x := t) - (hFan _ (hline_mem t) (hvert _ (Or.inr (by simp)))).continuousAt hl.continuousAt - have hFc' : Continuous fun t : ℝ => F (1 - ((c : ℂ) + t * I)) := by - refine continuous_iff_continuousAt.mpr fun t => ?_ - exact ContinuousAt.comp (f := fun t : ℝ => (1 : ℂ) - ((c : ℂ) + t * I)) (x := t) - (hFan _ (hline_mem' t) (hvert _ (Or.inl (by simp)))).continuousAt hl'.continuousAt - -- the fold symmetry on the line, extended to t = 0 by continuity - have hsymm : ∀ t : ℝ, F (1 - ((c : ℂ) + t * I)) = -F ((c : ℂ) + t * I) := by - have heq : (fun t : ℝ => F (1 - ((c : ℂ) + t * I))) = fun t : ℝ => -F ((c : ℂ) + t * I) := by - refine Continuous.ext_on (dense_compl_singleton (0 : ℝ)) hFc' hFc.neg (fun t ht => ?_) - have him : ((c : ℂ) + t * I).im ≠ 0 := by simpa using ht - exact L2_add_logDeriv_hardyW_one_sub him (hvert _ (Or.inr (by simp))) - intro t; exact congr_fun heq t - -- good heights - obtain ⟨C, hC, j₁, hj₁, hj₁t, R, hRj⟩ := exists_heightsW (hardyW_good_heights hZ hs) - have hRt : ∀ j : ℕ, t₀ < R j := fun j => by - have := (hRj j).1; have : (0:ℝ) ≤ j := Nat.cast_nonneg j; linarith - have hR0 : ∀ j : ℕ, 0 < R j := fun j => lt_trans ht₀ (hRt j) - have hRge : ∀ j : ℕ, (j : ℝ) ≤ R j := fun j => by have := (hRj j).1; have : (0:ℝ) ≤ j₁ := Nat.cast_nonneg j₁; linarith - have hRmono : Monotone R := by - intro i j hij - rcases hij.eq_or_lt with h | h - · rw [h] - · have : (i : ℝ) + 1 ≤ j := by exact_mod_cast h - linarith [(hRj i).2.1, (hRj j).1] - have hhor : ∀ j : ℕ, ∀ s : ℂ, (s.im = R j ∨ s.im = -R j) → 1 - c ≤ s.re → s.re ≤ c → - ‖F s‖ ≤ C * (Real.log ((j : ℝ) + j₁ + 3)) ^ 2 := fun j s him h1 h2 => - ((hRj j).2.2 s him (by linarith) (by linarith)).2 - -- W ≠ 0 on the border of every rectangle - have hWb : ∀ j : ℕ, ∀ s ∈ RectangleBorder (zc c (R j)) (wc c (R j)), hardyW s ≠ 0 := by - intro j s hsb - rcases border_cases hsb with h | h | h | h - · exact hvert s (Or.inl h) - · exact hvert s (Or.inr h) - · obtain ⟨⟨h1, h2⟩, -⟩ := (mem_rect_iff (by linarith) (hR0 j).le s).mp (rectangleBorder_subset_rectangle _ _ hsb) - exact ((hRj j).2.2 s (Or.inr h) (by linarith) (by linarith)).1 - · obtain ⟨⟨h1, h2⟩, -⟩ := (mem_rect_iff (by linarith) (hR0 j).le s).mp (rectangleBorder_subset_rectangle _ _ hsb) - exact ((hRj j).2.2 s (Or.inl h) (by linarith) (by linarith)).1 - -- the rectangle identities - have hrect : ∀ j : ℕ, ∃ Z : Finset ℂ, - ((Z : Set ℂ) = {ρ : ℂ | ρ ∈ Rectangle (zc c (R j)) (wc c (R j)) ∧ ρ ≠ 0 ∧ ρ ≠ 1 ∧ hardyW ρ = 0}) ∧ - RectangleIntegral' (fun s => Hfn k s * F s) (zc c (R j)) (wc c (R j)) - = (∑ ρ ∈ Z, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - (3 / 2 : ℂ) * (Hfn k 0 + Hfn k 1) := - fun j => rect_FZ hk hkc hc1 hc2 (hR0 j) (hWb j) - choose Z hZc hE using hrect - have hmemZ : ∀ j ρ, ρ ∈ Z j ↔ ρ ∈ Rectangle (zc c (R j)) (wc c (R j)) ∧ ρ ≠ 0 ∧ ρ ≠ 1 ∧ hardyW ρ = 0 := by - intro j ρ; rw [← Finset.mem_coe, hZc j]; rfl - -- the low zeros: finite (inside Z 0) and described by lowZerosSet - have hlow_sub : ∀ j, lowZerosSet c t₀ ⊆ (Z j : Set ℂ) := by - intro j ρ hρ - obtain ⟨h0, hne0, hne1, him, hr1, hr2⟩ := hρ - rw [Finset.mem_coe, hmemZ] - refine ⟨(mem_rect_iff (by linarith) (hR0 j).le ρ).mpr ⟨⟨hr1.le, hr2.le⟩, ?_, ?_⟩, hne0, hne1, h0⟩ - · linarith [(abs_lt.mp him).1, hRt j] - · linarith [(abs_lt.mp him).2, hRt j] - have hfin : (lowZerosSet c t₀).Finite := (Z 0).finite_toSet.subset (hlow_sub 0) - -- splitting Z j into the configuration window and the low zeros - set Zbig : ℕ → Finset ℂ := fun j => (Z j).filter (fun ρ => t₀ ≤ |ρ.im|) with hZbig - have hZbig_coe : ∀ j : ℕ, ((Zbig j : Finset ℂ) : Set ℂ) = {ρ : ℂ | ρ ∈ Zc.carrier ∧ -R j < ρ.im ∧ ρ.im < R j} := by - intro j - ext ρ - rw [Finset.mem_coe, hZbig, Finset.mem_filter, hmemZ, Set.mem_setOf_eq] - constructor - · rintro ⟨⟨hρQ, h0, h1, hW0⟩, him⟩ - have himne : ρ.im ≠ 0 := by intro h; rw [h, abs_zero] at him; linarith - obtain ⟨-, hi1, hi2⟩ := (mem_rect_iff (by linarith) (hR0 j).le ρ).mp hρQ - refine ⟨⟨⟨hW0, himne⟩, him⟩, lt_of_le_of_ne hi1 ?_, lt_of_le_of_ne hi2 ?_⟩ - · intro h - have hb : ρ ∈ RectangleBorder (zc c (R j)) (wc c (R j)) := by - refine Or.inl (Or.inl (Or.inl ⟨?_, ?_⟩)) - · obtain ⟨⟨a, b⟩, -⟩ := (mem_rect_iff (by linarith) (hR0 j).le ρ).mp hρQ - simp only [zc_re, wc_re]; exact Set.mem_uIcc.mpr (Or.inl ⟨a, b⟩) - · simp [← h] - exact hWb j ρ hb hW0 - · intro h - have hb : ρ ∈ RectangleBorder (zc c (R j)) (wc c (R j)) := by - refine Or.inl (Or.inr ⟨?_, ?_⟩) - · obtain ⟨⟨a, b⟩, -⟩ := (mem_rect_iff (by linarith) (hR0 j).le ρ).mp hρQ - simp only [zc_re, wc_re]; exact Set.mem_uIcc.mpr (Or.inl ⟨a, b⟩) - · simp [h] - exact hWb j ρ hb hW0 - · rintro ⟨⟨⟨hW0, himne⟩, him⟩, hi1, hi2⟩ - have hstrip := hZ ρ hW0 him - refine ⟨⟨(mem_rect_iff (by linarith) (hR0 j).le ρ).mpr ⟨⟨by linarith [hstrip.1], by linarith [hstrip.2]⟩, - hi1.le, hi2.le⟩, ne_zero_of_im_ne_zero himne, ne_one_of_im_ne_zero himne, hW0⟩, him⟩ - have hsplit : ∀ j : ℕ, ∑ ρ ∈ Z j, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ - = (∑ ρ ∈ Zbig j, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - + ∑ ρ ∈ lowZerosW c t₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ := by - intro j - have hlow_eq : lowZerosW c t₀ = (Z j).filter (fun ρ => ¬ t₀ ≤ |ρ.im|) := by - ext ρ - rw [mem_lowZerosW_iff hfin, Finset.mem_filter, hmemZ] - constructor - · intro hρ - have := hlow_sub j hρ - rw [Finset.mem_coe, hmemZ] at this - exact ⟨this, not_le.mpr hρ.2.2.2.1⟩ - · rintro ⟨⟨hρQ, h0, h1, hW0⟩, him⟩ - obtain ⟨⟨hr1, hr2⟩, -⟩ := (mem_rect_iff (by linarith) (hR0 j).le ρ).mp hρQ - refine ⟨hW0, h0, h1, not_le.mp him, lt_of_le_of_ne hr1 ?_, lt_of_le_of_ne hr2 ?_⟩ - · intro h; exact hvert ρ (Or.inl h.symm) hW0 - · intro h; exact hvert ρ (Or.inr h) hW0 - rw [hlow_eq, hZbig] - exact (Finset.sum_filter_add_sum_filter_not (Z j) (fun ρ => t₀ ≤ |ρ.im|) _).symm - -- the limit of the big part - have hZlim := zero_sum_limit_of (Zset := Zc.carrier) (fun ρ => (wMult ρ : ℂ) * Hfn k ρ) hsum hRmono hRge hZbig_coe - have hmult : ∀ ρ, (analyticOrderNatAt hardyW ρ : ℂ) = (wMult ρ : ℂ) := fun ρ => by rw [analyticOrderNatAt_hardyW] - have hElim : Tendsto (fun j => (∑ ρ ∈ Z j, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - (3 / 2 : ℂ) * (Hfn k 0 + Hfn k 1)) - atTop (𝓝 ((∑' ρ : Zc.carrier, (wMult (ρ : ℂ) : ℂ) * Hfn k ρ) - + (∑ ρ ∈ lowZerosW c t₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - (3 / 2 : ℂ) * (Hfn k 0 + Hfn k 1))) := by - have h1 : Tendsto (fun j => ∑ ρ ∈ Zbig j, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) atTop - (𝓝 (∑' ρ : Zc.carrier, (wMult (ρ : ℂ) : ℂ) * Hfn k ρ)) := by - refine hZlim.congr fun j => Finset.sum_congr rfl fun ρ _ => by rw [hmult] - have := (h1.add_const (∑ ρ ∈ lowZerosW c t₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ)).sub_const - ((3 / 2 : ℂ) * (Hfn k 0 + Hfn k 1)) - refine this.congr fun j => ?_ - rw [hsplit j] - have hE' : ∀ j : ℕ, RectangleIntegral' (fun s => Hfn k s * F s) (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) - = (∑ ρ ∈ Z j, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - (3 / 2 : ℂ) * (Hfn k 0 + Hfn k 1) := - fun j => hE j - exact (full_line_of_rectangles (by linarith) (by linarith) hk hkc hFc hsymm hline hj₁ hC.le - (fun j => ⟨(hRj j).1, (hRj j).2.1⟩) hhor hE' hElim).2 - -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFContour/Analytic.lean b/zeta23/Zeta23/XiPrime/Hardy/EFContour/Analytic.lean deleted file mode 100644 index 1c011999da..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFContour/Analytic.lean +++ /dev/null @@ -1,255 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFContour/Analytic.lean — analytic data for the W explicit-formula contour INCLUDING THE REAL AXIS. - -Hardy/Basic.lean proves everything about χ, L₂, W at points with Im s ≠ 0. The contour -[1−c, c] × [−R, R] (1 < c ≤ 5/4) crosses the real axis, so here we redo the analytic facts on the vertical strip -−2 < Re s < 3 minus the two genuine singular points 0 and 1, using ONE device: G := (Γℝ)⁻¹ = π^{s/2}/Γ(s/2) is -ENTIRE (Mathlib's differentiable_one_div_Gamma), Γℝ = G⁻¹ literally, and Γℝ s ≠ 0 ↔ s is not a pole of Γℝ -(Mathlib's junk value at the poles is 0 and Γℝ has no genuine zeros). Hence - * Γℝ analytic at s ⇔ Γℝ s ≠ 0; χ = Γℝ(1−·)·G analytic where Γℝ(1−s) ≠ 0, nonzero where moreover Γℝ s ≠ 0; - L₂ = −½χ′/χ and W = ζ′ + L₂ζ analytic on {−2 < Re < 3} \ {0, 1}; - * G has a SIMPLE zero at 0 (G(s) = s·G(s+2)/(2π), from Gammaℝ_add_two), so G∘(1−·) has a simple zero at 1, - s·(G′/G)(s) → 1 at 0, and therefore s·L₂(s) → −½ (s → 0), (s−1)·L₂(s) → ½ (s → 1); - * with Mathlib's tendsto_riemannZeta_sub_one_div (ζ(s) − 1/(s−1) → γ) and a removable singularity: - (s−1)²ζ′(s) → −1, whence the POLE DATA of W: s·W(s) → ¼ (s → 0), (s−1)²·W(s) → −½ (s → 1); - * Wreg := s(s−1)²·W(s), filled in with ¼ at 0 and −½ at 1, is analytic on {−2 < Re < 3}, nonzero at 0, 1, - and has the zeros and orders of W elsewhere. --/ -import Zeta23.XiPrime.Hardy.TwoLine -import Mathlib.Analysis.Complex.RemovableSingularity -import Mathlib.NumberTheory.Harmonic.ZetaAsymp - -open Complex Set Filter Topology -open scoped ComplexConjugate - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy -namespace EFContour - -/-! ### §1. G := (Γℝ)⁻¹ is entire; Γℝ is analytic exactly where it is nonzero -/ - -/-- G(s) := (Γℝ s)⁻¹. -/ -def invGammaℝ (s : ℂ) : ℂ := (Gammaℝ s)⁻¹ - -lemma invGammaℝ_eq (s : ℂ) : invGammaℝ s = (Real.pi : ℂ) ^ (s / 2) * (1 / Complex.Gamma (s / 2)) := by - rw [invGammaℝ, Gammaℝ_def, mul_inv, ← cpow_neg, one_div] - congr 2; ring - -/-- G is entire. -/ -theorem differentiable_invGammaℝ : Differentiable ℂ invGammaℝ := by - have e : invGammaℝ = fun s => (Real.pi : ℂ) ^ (s / 2) * (1 / Complex.Gamma (s / 2)) := funext invGammaℝ_eq - rw [e] - refine Differentiable.mul ?_ ?_ - · intro s - exact DifferentiableAt.const_cpow (differentiableAt_id.div_const 2) - (Or.inl (by exact_mod_cast Real.pi_ne_zero)) - · have h := Complex.differentiable_one_div_Gamma.comp (differentiable_id.div_const (2:ℂ)) - intro s - have := h s - simpa [Function.comp_def, one_div] using this - -theorem analyticAt_invGammaℝ (s : ℂ) : AnalyticAt ℂ invGammaℝ s := differentiable_invGammaℝ.analyticAt s - -lemma Gammaℝ_eq_inv_invGammaℝ : Gammaℝ = invGammaℝ⁻¹ := by - funext s; rw [Pi.inv_apply, invGammaℝ, inv_inv] - -lemma invGammaℝ_ne_zero_iff {s : ℂ} : invGammaℝ s ≠ 0 ↔ Gammaℝ s ≠ 0 := by - rw [invGammaℝ, ne_eq, inv_eq_zero] - -lemma invGammaℝ_eq_zero_iff {s : ℂ} : invGammaℝ s = 0 ↔ Gammaℝ s = 0 := by - rw [invGammaℝ, inv_eq_zero] - -/-- Γℝ is analytic at every point where it is nonzero (= every non-pole). -/ -theorem analyticAt_Gammaℝ {s : ℂ} (hs : Gammaℝ s ≠ 0) : AnalyticAt ℂ Gammaℝ s := by - rw [Gammaℝ_eq_inv_invGammaℝ] - exact (analyticAt_invGammaℝ s).fun_inv (invGammaℝ_ne_zero_iff.mpr hs) - -theorem differentiableAt_Gammaℝ {s : ℂ} (hs : Gammaℝ s ≠ 0) : DifferentiableAt ℂ Gammaℝ s := - (analyticAt_Gammaℝ hs).differentiableAt - -/-- Γℝ s ≠ 0 unless s ∈ {0, −2, −4, …}; in particular on −2 < Re s, s ≠ 0. -/ -theorem Gammaℝ_ne_zero_of_re {s : ℂ} (hre : -2 < s.re) (h0 : s ≠ 0) : Gammaℝ s ≠ 0 := by - rw [Ne, Gammaℝ_eq_zero_iff, not_exists] - intro n hn - rcases Nat.eq_zero_or_pos n with h | h - · subst h; simp at hn; exact h0 hn - · have : s.re = -(2 * n) := by rw [hn]; simp - have : (1 : ℝ) ≤ n := by exact_mod_cast h - linarith - -/-- Γℝ (1 − s) ≠ 0 on Re s < 3, s ≠ 1. -/ -theorem Gammaℝ_one_sub_ne_zero_of_re {s : ℂ} (hre : s.re < 3) (h1 : s ≠ 1) : Gammaℝ (1 - s) ≠ 0 := - Gammaℝ_ne_zero_of_re (by simp; linarith) (sub_ne_zero.mpr (Ne.symm h1)) - -/-- logDeriv Γℝ = −logDeriv G where Γℝ ≠ 0. -/ -theorem logDeriv_Gammaℝ_eq_neg {s : ℂ} (hs : Gammaℝ s ≠ 0) : logDeriv Gammaℝ s = -logDeriv invGammaℝ s := by - rw [Gammaℝ_eq_inv_invGammaℝ] - have hG := invGammaℝ_ne_zero_iff.mpr hs - rw [logDeriv_apply, logDeriv_apply, deriv_inv'' (differentiable_invGammaℝ s) hG, Pi.inv_apply] - field_simp - -/-! ### §2. The simple zero of G at 0 -/ - -/-- G(s) = s · G(s+2)/(2π) for every s (at s = 0 both sides vanish). -/ -theorem invGammaℝ_eq_mul (s : ℂ) : invGammaℝ s = s * (invGammaℝ (s + 2) / (2 * Real.pi)) := by - rcases eq_or_ne s 0 with rfl | hs - · simp [invGammaℝ_eq_zero_iff, Gammaℝ_eq_zero_iff] - · rw [invGammaℝ, invGammaℝ, Gammaℝ_add_two hs] - have hπ : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero - rcases eq_or_ne (Gammaℝ s) 0 with h0 | h0 - · simp [h0] - · field_simp - -lemma invGammaℝ_two : invGammaℝ 2 = Real.pi := by - have hπ : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero - rw [invGammaℝ, Gammaℝ_def, show (-(2:ℂ)) / 2 = -1 by norm_num, show (2:ℂ) / 2 = 1 by norm_num, - Complex.Gamma_one, cpow_neg_one, mul_one, inv_inv] - -/-- the cofactor h(s) := G(s+2)/(2π), entire with h(0) = ½. -/ -def invGammaℝCof (s : ℂ) : ℂ := invGammaℝ (s + 2) / (2 * Real.pi) - -lemma differentiable_invGammaℝCof : Differentiable ℂ invGammaℝCof := - (differentiable_invGammaℝ.comp (differentiable_id.add_const 2)).div_const _ - -lemma invGammaℝCof_zero : invGammaℝCof 0 = 1 / 2 := by - rw [invGammaℝCof, zero_add, invGammaℝ_two] - have hπ : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero - field_simp - -lemma invGammaℝ_eq_id_mul : invGammaℝ = fun s => id s * invGammaℝCof s := by - funext s; rw [id, invGammaℝCof]; exact invGammaℝ_eq_mul s - -lemma invGammaℝ_eq_id_mul' : invGammaℝ = id * invGammaℝCof := by - rw [invGammaℝ_eq_id_mul]; rfl - -/-- G has a simple zero at 0. -/ -theorem analyticOrderAt_invGammaℝ_zero : analyticOrderAt invGammaℝ 0 = 1 := by - rw [invGammaℝ_eq_id_mul', analyticOrderAt_mul analyticAt_id (differentiable_invGammaℝCof.analyticAt 0)] - have h1 : analyticOrderAt (id : ℂ → ℂ) 0 = (1 : ℕ) := by - rw [analyticAt_id.analyticOrderAt_eq_natCast] - exact ⟨fun _ => 1, analyticAt_const, one_ne_zero, Eventually.of_forall fun z => by simp⟩ - have h2 : analyticOrderAt invGammaℝCof 0 = 0 := - (differentiable_invGammaℝCof.analyticAt 0).analyticOrderAt_eq_zero.mpr (by rw [invGammaℝCof_zero]; norm_num) - rw [h1, h2, add_zero]; rfl - -theorem analyticOrderNatAt_invGammaℝ_zero : analyticOrderNatAt invGammaℝ 0 = 1 := by - rw [analyticOrderNatAt, analyticOrderAt_invGammaℝ_zero]; rfl - -/-- G ∘ (1 − ·) has a simple zero at 1. -/ -theorem analyticOrderAt_invGammaℝ_one_sub_one : analyticOrderAt (fun s => invGammaℝ (1 - s)) 1 = 1 := by - have hg : AnalyticAt ℂ (fun z : ℂ => 1 - z) 1 := analyticAt_const.sub analyticAt_id - have hg' : deriv (fun z : ℂ => 1 - z) 1 ≠ 0 := by rw [deriv_const_sub]; simp - have := analyticOrderAt_comp_of_deriv_ne_zero (f := invGammaℝ) hg hg' - simp only [Function.comp_def, sub_self] at this - rw [this, analyticOrderAt_invGammaℝ_zero] - -theorem analyticOrderNatAt_invGammaℝ_one_sub_one : analyticOrderNatAt (fun s => invGammaℝ (1 - s)) 1 = 1 := by - rw [analyticOrderNatAt, analyticOrderAt_invGammaℝ_one_sub_one]; rfl - -/-- **s·(G′/G)(s) → 1 as s → 0.** -/ -theorem tendsto_mul_logDeriv_invGammaℝ_zero : - Tendsto (fun s : ℂ => s * logDeriv invGammaℝ s) (𝓝[≠] 0) (𝓝 1) := by - -- near 0, s ≠ 0: logDeriv G s = 1/s + logDeriv h s (h = invGammaℝCof, h 0 = 1/2 ≠ 0) - have hh0 : invGammaℝCof 0 ≠ 0 := by rw [invGammaℝCof_zero]; norm_num - have hcont : ContinuousAt (logDeriv invGammaℝCof) 0 := by - have ha := differentiable_invGammaℝCof.analyticAt 0 - exact ha.deriv.continuousAt.div ha.continuousAt hh0 - -- h ≠ 0 near 0 - have hne : ∀ᶠ s in 𝓝 (0:ℂ), invGammaℝCof s ≠ 0 := - differentiable_invGammaℝCof.continuous.continuousAt.eventually_ne hh0 - have hev : ∀ᶠ s in 𝓝[≠] (0:ℂ), s * logDeriv invGammaℝ s = 1 + s * logDeriv invGammaℝCof s := by - have h1 : ∀ᶠ s in 𝓝[≠] (0:ℂ), s ≠ 0 := self_mem_nhdsWithin - filter_upwards [h1, mem_nhdsWithin_of_mem_nhds hne] with s hs hhs - rw [invGammaℝ_eq_id_mul, logDeriv_mul s (by simpa using hs) hhs differentiableAt_id (differentiable_invGammaℝCof s)] - rw [logDeriv_id] - field_simp - have hlim : Tendsto (fun s : ℂ => 1 + s * logDeriv invGammaℝCof s) (𝓝[≠] 0) (𝓝 1) := by - have h2 : Tendsto (fun s : ℂ => s * logDeriv invGammaℝCof s) (𝓝 0) (𝓝 0) := by - have := (continuous_id.continuousAt (x := (0:ℂ))).tendsto.mul hcont.tendsto - simpa using this - have h3 : Tendsto (fun s : ℂ => s * logDeriv invGammaℝCof s) (𝓝[≠] 0) (𝓝 0) := - h2.mono_left nhdsWithin_le_nhds - have := h3.const_add 1 - simpa using this - exact hlim.congr' (hev.mono fun _ h => h.symm) - -/-! ### §3. χ, L₂ and W on the strip off {0, 1} -/ - -lemma chiFE_eq_mul : chiFE = fun s => Gammaℝ (1 - s) * invGammaℝ s := by - funext s; rw [chiFE, invGammaℝ, div_eq_mul_inv] - -theorem analyticAt_Gammaℝ_one_sub {s : ℂ} (hs : Gammaℝ (1 - s) ≠ 0) : AnalyticAt ℂ (fun z => Gammaℝ (1 - z)) s := - (analyticAt_Gammaℝ hs).comp (analyticAt_const.sub analyticAt_id) - -/-- χ is analytic wherever Γℝ(1−s) ≠ 0 (in particular at 0, where it has a simple zero). -/ -theorem chiFE_analyticAt' {s : ℂ} (hs : Gammaℝ (1 - s) ≠ 0) : AnalyticAt ℂ chiFE s := by - rw [chiFE_eq_mul]; exact (analyticAt_Gammaℝ_one_sub hs).mul (analyticAt_invGammaℝ s) - -theorem chiFE_ne_zero' {s : ℂ} (h1 : Gammaℝ (1 - s) ≠ 0) (h0 : Gammaℝ s ≠ 0) : chiFE s ≠ 0 := by - rw [chiFE]; exact div_ne_zero h1 h0 - -/-- logDeriv χ = logDeriv (Γℝ∘(1−·)) + logDeriv G wherever both factors are nonzero. -/ -theorem logDeriv_chiFE_eq {s : ℂ} (h1 : Gammaℝ (1 - s) ≠ 0) (h0 : Gammaℝ s ≠ 0) : - logDeriv chiFE s = logDeriv (fun z => Gammaℝ (1 - z)) s + logDeriv invGammaℝ s := by - rw [chiFE_eq_mul, logDeriv_mul s h1 (invGammaℝ_ne_zero_iff.mpr h0) - (analyticAt_Gammaℝ_one_sub h1).differentiableAt (differentiable_invGammaℝ s)] - -/-- logDeriv (Γℝ∘(1−·)) = −logDeriv (G∘(1−·)) wherever Γℝ(1−s) ≠ 0. -/ -theorem logDeriv_Gammaℝ_one_sub_eq {s : ℂ} (h1 : Gammaℝ (1 - s) ≠ 0) : - logDeriv (fun z => Gammaℝ (1 - z)) s = -logDeriv (fun z => invGammaℝ (1 - z)) s := by - have e : (fun z => Gammaℝ (1 - z)) = (fun z => invGammaℝ (1 - z))⁻¹ := by - funext z; rw [Pi.inv_apply, invGammaℝ, inv_inv] - have hd : DifferentiableAt ℂ (fun z => invGammaℝ (1 - z)) s := - (differentiable_invGammaℝ _).comp s ((differentiableAt_const _).sub differentiableAt_id) - have hG : invGammaℝ (1 - s) ≠ 0 := invGammaℝ_ne_zero_iff.mpr h1 - rw [e, logDeriv_apply, logDeriv_apply, deriv_inv'' hd hG, Pi.inv_apply] - field_simp - -theorem L2_analyticAt' {s : ℂ} (h1 : Gammaℝ (1 - s) ≠ 0) (h0 : Gammaℝ s ≠ 0) : AnalyticAt ℂ L2 s := by - have e : L2 = fun z => -(1/2) * (deriv chiFE z / chiFE z) := by - funext z; rw [L2, logDeriv_apply] - rw [e] - exact analyticAt_const.mul ((chiFE_analyticAt' h1).deriv.div (chiFE_analyticAt' h1) (chiFE_ne_zero' h1 h0)) - -theorem hardyW_analyticAt' {s : ℂ} (hs1 : s ≠ 1) (h1 : Gammaℝ (1 - s) ≠ 0) (h0 : Gammaℝ s ≠ 0) : - AnalyticAt ℂ hardyW s := by - have hζ : AnalyticAt ℂ riemannZeta s := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - filter_upwards [isOpen_ne.mem_nhds hs1] with z hz - exact differentiableAt_riemannZeta hz - have e : hardyW = fun z => deriv riemannZeta z + L2 z * riemannZeta z := rfl - rw [e] - exact hζ.deriv.add ((L2_analyticAt' h1 h0).mul hζ) - -/-- the working region: the vertical strip −2 < Re s < 3 minus {0, 1}. -/ -def stripReg : Set ℂ := {s : ℂ | -2 < s.re ∧ s.re < 3 ∧ s ≠ 0 ∧ s ≠ 1} - -lemma isOpen_stripReg : IsOpen stripReg := by - have e : stripReg = ({s : ℂ | -2 < s.re} ∩ {s : ℂ | s.re < 3}) ∩ ({s : ℂ | s ≠ 0} ∩ {s : ℂ | s ≠ 1}) := by - ext s; simp only [stripReg, mem_setOf_eq, mem_inter_iff]; tauto - rw [e] - exact ((isOpen_lt continuous_const Complex.continuous_re).inter - (isOpen_lt Complex.continuous_re continuous_const)).inter (isOpen_ne.inter isOpen_ne) - -theorem hardyW_analyticAt_of_mem {s : ℂ} (hs : s ∈ stripReg) : AnalyticAt ℂ hardyW s := - hardyW_analyticAt' hs.2.2.2 (Gammaℝ_one_sub_ne_zero_of_re hs.2.1 hs.2.2.2) (Gammaℝ_ne_zero_of_re hs.1 hs.2.2.1) - -theorem L2_analyticAt_of_mem {s : ℂ} (hs : s ∈ stripReg) : AnalyticAt ℂ L2 s := - L2_analyticAt' (Gammaℝ_one_sub_ne_zero_of_re hs.2.1 hs.2.2.2) (Gammaℝ_ne_zero_of_re hs.1 hs.2.2.1) - -theorem hardyW_analyticOnNhd_stripReg : AnalyticOnNhd ℂ hardyW stripReg := fun _ hs => hardyW_analyticAt_of_mem hs - -end EFContour -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFContour/Limit.lean b/zeta23/Zeta23/XiPrime/Hardy/EFContour/Limit.lean deleted file mode 100644 index 66105030b2..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFContour/Limit.lean +++ /dev/null @@ -1,218 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -The R → ∞ passage of the explicit-formula contour argument, -generic in the integrand. - -The integrand 'logDeriv f' of an entire f replaced by an arbitrary F : ℂ → ℂ and the rectangle values replaced by a -given convergent sequence E_j → L: fold of the two verticals by the odd symmetry F(1−s) = −F(s) on the -line, vanishing of the horizontals from ‖H‖ ≤ C_H/(1+R²) (WeilEF.norm_Hfn_le) and an O(log²) bound for -F at the heights R_j ∈ [j+j₀, j+j₀+1], truncated → full integral by dominated convergence, and -uniqueness of limits. Nothing about zeros, poles or good heights lives here (they enter only through -hE / hlim / hhor). --/ -import Zeta23.XiPrime.ExplicitFormula.FullLine - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy -namespace EFContour - -open Complex Topology Filter Set MeasureTheory -open Zeta23.WeilEF (Hfn norm_Hfn_le continuous_Hfn_line one_sub_cast log_two_add_le) - -variable {F : ℂ → ℂ} {k : ℝ → ℂ} {c : ℝ} - -/-- the full-line integrand against an abstract F: [H(c+it) + H(1−c−it)] · F(c+it). -/ -def FlineF (F : ℂ → ℂ) (k : ℝ → ℂ) (c : ℝ) (t : ℝ) : ℂ := - (Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) * F ((c : ℂ) + t * I) - -/-! ## Integrability of the full-line integrand -/ - -/-- **Integrability** of FlineF from continuity + a log bound for F on Re s = c (−1 ≤ c ≤ 2). -/ -theorem integrable_FlineF_of (hFc : Continuous fun t : ℝ => F ((c : ℂ) + t * I)) - (hline : ∃ M : ℝ, ∀ t : ℝ, ‖F ((c : ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|)) - (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (hc0 : -1 ≤ c) (hc2 : c ≤ 2) : - Integrable (FlineF F k c) := by - obtain ⟨C, hC0, hC⟩ := norm_weight_le hk hkc hc0 hc2 - obtain ⟨M, hM⟩ := hline - have hM' : ∀ t : ℝ, ‖F ((c : ℂ) + t * I)‖ ≤ max M 0 * Real.log (2 + |t|) := fun t => - (hM t).trans (mul_le_mul_of_nonneg_right (le_max_left _ _) - (Real.log_nonneg (by linarith [abs_nonneg t]))) - exact integrable_decay_mul_log (continuous_weight hk hkc c) hFc hC0 hC (le_max_right _ _) hM' - -/-! ## The vertical sides -/ - -/-- Folding the left vertical side onto the right one by F(1−s) = −F(s) on the line: -V(c; −R, R) − V(1−c; −R, R) = I • ∫_{−R}^{R} FlineF. -/ -theorem verticals_eq_F (hFc : Continuous fun t : ℝ => F ((c : ℂ) + t * I)) - (hsymm : ∀ t : ℝ, F (1 - ((c : ℂ) + t * I)) = -F ((c : ℂ) + t * I)) - (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (R : ℝ) : - VIntegral (fun s => Hfn k s * F s) c (-R) R - - VIntegral (fun s => Hfn k s * F s) (1 - c) (-R) R - = I • ∫ t in (-R)..R, FlineF F k c t := by - have hHc := continuous_Hfn_line hk hkc c - have hH2 : Continuous (fun t : ℝ => Hfn k (1 - c - t * I)) := by - have h := continuous_Hfn_line hk hkc (1 - c) - have : (fun t : ℝ => Hfn k (1 - c - t * I)) - = (fun t : ℝ => Hfn k (((1 - c : ℝ) : ℂ) + t * I)) ∘ fun t : ℝ => -t := by - funext t; simp only [Function.comp_apply, one_sub_cast] - rw [this]; exact h.comp continuous_neg - have hleft : ∀ y : ℝ, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * F (((1 - c : ℝ) : ℂ) + y * I) - = -(Hfn k (1 - c - ((-y : ℝ) : ℂ) * I) * F ((c : ℂ) + ((-y : ℝ) : ℂ) * I)) := by - intro y - have hs : ((1 - c : ℝ) : ℂ) + y * I = 1 - ((c : ℂ) + ((-y : ℝ) : ℂ) * I) := by push_cast; ring - rw [hs, hsymm] - have : (1:ℂ) - ((c : ℂ) + ((-y:ℝ):ℂ) * I) = 1 - c - ((-y : ℝ) : ℂ) * I := by ring - rw [this]; ring - have hI1 : IntervalIntegrable (fun t : ℝ => Hfn k ((c : ℂ) + t * I) * F ((c : ℂ) + t * I)) - volume (-R) R := (hHc.mul hFc).intervalIntegrable _ _ - have hI2 : IntervalIntegrable (fun t : ℝ => Hfn k (1 - c - t * I) * F ((c : ℂ) + t * I)) - volume (-R) R := (hH2.mul hFc).intervalIntegrable _ _ - have hfold : (∫ y in (-R)..R, Hfn k (((1 - c : ℝ) : ℂ) + y * I) * F (((1 - c : ℝ) : ℂ) + y * I)) - = -∫ t in (-R)..R, Hfn k (1 - c - t * I) * F ((c : ℂ) + t * I) := by - simp_rw [hleft] - rw [intervalIntegral.integral_neg] - have h := intervalIntegral.integral_comp_neg (a := -R) (b := R) - (fun t : ℝ => Hfn k (1 - c - t * I) * F ((c : ℂ) + t * I)) - simp only [neg_neg] at h - rw [← h] - dsimp only [VIntegral] - rw [hfold, ← smul_sub, sub_neg_eq_add, ← intervalIntegral.integral_add hI1 hI2] - congr 1 - refine intervalIntegral.integral_congr fun t _ => ?_ - simp only [FlineF] - ring - -/-! ## The horizontal sides -/ - -/-- **Horizontal sides vanish**: ‖H‖ ≤ C_H/(1+R_j²) on the segment and ‖F‖ ≤ K log²(j+j₀+3) there, -R_j ≥ j + j₀ ≥ 1, so ‖HIntegral‖ ≤ (2c−1)·C_H·K·log²/(1+R_j²) → 0. -/ -theorem horizontal_vanish_F (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - (hc : 1 - c ≤ c) (hc2 : c ≤ 2) {K : ℝ} (hK : 0 ≤ K) {j₀ : ℕ} (hj₀ : 1 ≤ j₀) {R : ℕ → ℝ} - (hR : ∀ j : ℕ, (j : ℝ) + j₀ ≤ R j ∧ - ∀ s : ℂ, (s.im = R j ∨ s.im = -R j) → 1 - c ≤ s.re → s.re ≤ c → - ‖F s‖ ≤ K * (Real.log ((j : ℝ) + j₀ + 3)) ^ 2) : - Tendsto (fun j : ℕ => HIntegral (fun s => Hfn k s * F s) (1 - c) c (R j)) atTop (𝓝 0) - ∧ Tendsto (fun j : ℕ => HIntegral (fun s => Hfn k s * F s) (1 - c) c (-(R j))) atTop (𝓝 0) := by - obtain ⟨CH, hCH0, hH⟩ := norm_Hfn_le hk hkc - set n : ℕ → ℝ := fun j => (j : ℝ) + j₀ with hndef - have hn1 : ∀ j, 1 ≤ n j := fun j => by - have : (1 : ℝ) ≤ (j₀ : ℝ) := by exact_mod_cast hj₀ - have : (0 : ℝ) ≤ (j : ℝ) := Nat.cast_nonneg j - simp only [hndef]; linarith - set Lg : ℕ → ℝ := fun j => Real.log (n j + 3) with hLgdef - have hLg_eq : ∀ j : ℕ, Real.log ((j : ℝ) + j₀ + 3) = Lg j := fun j => by simp only [hLgdef, hndef] - -- integral bound along either horizontal - have hint : ∀ (j : ℕ) (y : ℝ), (y = R j ∨ y = -R j) → - ‖HIntegral (fun s => Hfn k s * F s) (1 - c) c y‖ - ≤ CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| := by - intro j y hy - unfold HIntegral - refine intervalIntegral.norm_integral_le_of_norm_le_const fun x hx => ?_ - rw [Set.uIoc_of_le hc] at hx - have hy2 : y ^ 2 = (R j) ^ 2 := by rcases hy with h | h <;> simp [h] - dsimp only - rw [norm_mul, ← hy2] - refine mul_le_mul (hH x y (by linarith [hx.1]) (by linarith [hx.2])) ?_ (norm_nonneg _) - (by positivity) - rw [← hLg_eq] - have hxre : ((x : ℂ) + y * I).re = x := by simp - exact (hR j).2 ((x : ℂ) + y * I) (by rcases hy with h | h <;> simp [h]) - (by rw [hxre]; exact hx.1.le) (by rw [hxre]; exact hx.2) - -- the majorant tends to 0 - set b : ℕ → ℝ := fun j => CH / (1 + (R j) ^ 2) * (K * Lg j ^ 2) * |c - (1 - c)| with hbdef - have hb0 : ∀ j, 0 ≤ b j := fun j => by rw [hbdef]; positivity - have hb_le : ∀ j : ℕ, b j ≤ (CH * K * |c - (1 - c)|) * (Lg j ^ 2 / (1 * (n j + 3) + (-3))) := by - intro j - have hnR : n j ≤ R j := (hR j).1 - have hn0 : 0 < n j := by linarith [hn1 j] - have hden : n j ≤ 1 + R j ^ 2 := by nlinarith [hnR, hn1 j] - have e1 : (1 : ℝ) * (n j + 3) + (-3) = n j := by ring - rw [e1] - have h1 : Lg j ^ 2 / (1 + R j ^ 2) ≤ Lg j ^ 2 / n j := - div_le_div_of_nonneg_left (sq_nonneg _) hn0 hden - have e : b j = CH * K * |c - (1 - c)| * (Lg j ^ 2 / (1 + R j ^ 2)) := by rw [hbdef]; ring - rw [e] - exact mul_le_mul_of_nonneg_left h1 (by positivity) - have hntop : Tendsto (fun j : ℕ => n j + 3) atTop atTop := by - simp only [hndef] - exact tendsto_atTop_add_const_right _ _ - (tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop) - have hlim0 : Tendsto (fun j : ℕ => Lg j ^ 2 / (1 * (n j + 3) + (-3))) atTop (𝓝 0) := - (Real.tendsto_pow_log_div_mul_add_atTop 1 (-3) 2 one_ne_zero).comp hntop - have hb : Tendsto b atTop (𝓝 0) := by - have hlim := hlim0.const_mul (CH * K * |c - (1 - c)|) - rw [mul_zero] at hlim - exact squeeze_zero hb0 hb_le hlim - exact ⟨squeeze_zero_norm (fun j => hint j (R j) (Or.inl rfl)) hb, - squeeze_zero_norm (fun j => hint j (-(R j)) (Or.inr rfl)) hb⟩ - -/-! ## Assembly -/ - -/-- **Generic passage to the full line.** If the normalised rectangle integrals of H·F over -[1−c, c] × [−R_j, R_j] have known values E_j → L, F is continuous with log growth on Re s = c, odd under -s ↦ 1−s between the two vertical lines, and O(log²) on the horizontal segments at the heights R_j ∈ [j+j₀, j+j₀+1], -then the full-line integral exists and (1/2π)∫[H(c+it)+H(1−c−it)]F(c+it)dt = L. -/ -theorem full_line_of_rectangles {F : ℂ → ℂ} {k : ℝ → ℂ} {c : ℝ} - (hc : 1 / 2 < c) (hc2 : c ≤ 2) (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - (hFc : Continuous fun t : ℝ => F ((c : ℂ) + t * I)) - (hsymm : ∀ t : ℝ, F (1 - ((c : ℂ) + t * I)) = -F ((c : ℂ) + t * I)) - (hline : ∃ M : ℝ, ∀ t : ℝ, ‖F ((c : ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|)) - {R : ℕ → ℝ} {j₀ : ℕ} (hj₀ : 1 ≤ j₀) {K : ℝ} (hK : 0 ≤ K) - (hR : ∀ j : ℕ, (j : ℝ) + j₀ ≤ R j ∧ R j ≤ (j : ℝ) + j₀ + 1) - (hhor : ∀ j : ℕ, ∀ s : ℂ, (s.im = R j ∨ s.im = -R j) → 1 - c ≤ s.re → s.re ≤ c → - ‖F s‖ ≤ K * (Real.log ((j : ℝ) + j₀ + 3)) ^ 2) - {E : ℕ → ℂ} (hE : ∀ j : ℕ, - RectangleIntegral' (fun s => Hfn k s * F s) (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) = E j) - {L : ℂ} (hlim : Tendsto E atTop (𝓝 L)) : - Integrable (FlineF F k c) ∧ - (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, (Hfn k ((c : ℂ) + t * I) + Hfn k (1 - c - t * I)) * F ((c : ℂ) + t * I)) - = L := by - have hcc : 1 - c < c := by linarith - have hRge : ∀ j : ℕ, (j : ℝ) ≤ R j := fun j => by - have := (hR j).1; have : (0:ℝ) ≤ j₀ := Nat.cast_nonneg j₀; linarith - have hInt : Integrable (FlineF F k c) := integrable_FlineF_of hFc hline hk hkc (by linarith) hc2 - refine ⟨hInt, ?_⟩ - set G : ℂ → ℂ := fun s => Hfn k s * F s with hG - -- the three limits - obtain ⟨hHtop, hHbot⟩ := horizontal_vanish_F (F := F) hk hkc hcc.le hc2 hK hj₀ (R := R) - (fun j => ⟨(hR j).1, hhor j⟩) - have hV := tendsto_intervalIntegral_of_integrable hInt hRge - -- decomposition of the normalized rectangle integral - have hdec : ∀ j : ℕ, RectangleIntegral' G (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I) - = (1 / (2 * Real.pi * I) : ℂ) * (HIntegral G (1 - c) c (-(R j)) - HIntegral G (1 - c) c (R j)) - + (1 / (2 * Real.pi) : ℂ) * ∫ t in (-R j)..R j, FlineF F k c t := by - intro j - obtain ⟨e1, e2, e3, e4⟩ := Zeta23.WeilEF.corner_re_im c (R j) - rw [RectangleIntegral', RectangleIntegral, smul_eq_mul, e1, e2, e3, e4] - have hv := verticals_eq_F hFc hsymm hk hkc (R j) - rw [hG] - rw [show ∀ A B V₁ V₂ : ℂ, A - B + V₁ - V₂ = (A - B) + (V₁ - V₂) from fun _ _ _ _ => by ring, hv, - smul_eq_mul, mul_add, Zeta23.WeilEF.inv_two_pi_I_mul_I] - -- rectangle_j → (1/2π) ∫ FlineF - have hLHS : Tendsto (fun j : ℕ => RectangleIntegral' G (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I)) - atTop (𝓝 ((1 / (2 * Real.pi) : ℂ) * ∫ t, FlineF F k c t)) := by - have h := ((hHbot.sub hHtop).const_mul (1 / (2 * Real.pi * I) : ℂ)).add - (hV.const_mul (1 / (2 * Real.pi) : ℂ)) - simp only [sub_zero, mul_zero, zero_add] at h - refine h.congr fun j => ?_ - rw [hdec j] - -- rectangle_j = E_j → L - have hRHS : Tendsto (fun j : ℕ => RectangleIntegral' G (((1 - c : ℝ) : ℂ) - R j * I) ((c : ℝ) + R j * I)) - atTop (𝓝 L) := hlim.congr fun j => (hE j).symm - have huniq := tendsto_nhds_unique hLHS hRHS - -- ∫ FlineF is literally the displayed integral - exact huniq - -end EFContour -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFContour/Poles.lean b/zeta23/Zeta23/XiPrime/Hardy/EFContour/Poles.lean deleted file mode 100644 index edc5c5039a..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFContour/Poles.lean +++ /dev/null @@ -1,346 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -The pole data of W at 0 and 1 and the regularised Wreg := s(s−1)²·W. - - s·L₂(s) → −½ (s→0), (s−1)·L₂(s) → ½ (s→1), (s−1)²ζ′(s) → −1, s·W(s) → ¼, (s−1)²·W(s) → −½; - Wreg := update (update (s ↦ s(s−1)²W(s)) 0 ¼) 1 (−½) is analytic on −2 < Re s < 3 (removable singularities), - agrees with s(s−1)²W(s) off {0,1}, has W's zeros and orders there, and logDeriv Wreg = logDeriv(s(s−1)²) + W′/W. --/ -import Zeta23.XiPrime.Hardy.EFContour.Analytic - -open Complex Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy -namespace EFContour - -/-! ### helpers: nonvanishing of Γℝ near 0 and 1, punctured maps -/ - -lemma eventually_Gammaℝ_ne_zero_nhdsWithin_zero : ∀ᶠ s in 𝓝[≠] (0:ℂ), Gammaℝ s ≠ 0 := by - have hre : ∀ᶠ s in 𝓝 (0:ℂ), -2 < s.re := - (continuous_re.isOpen_preimage _ isOpen_Ioi).mem_nhds (by simp) - filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds hre] with s hs hsre - exact Gammaℝ_ne_zero_of_re hsre hs - -lemma eventually_Gammaℝ_one_sub_ne_zero_nhds_zero : ∀ᶠ s in 𝓝 (0:ℂ), Gammaℝ (1 - s) ≠ 0 := by - have h1 : ∀ᶠ s in 𝓝 (0:ℂ), s.re < 3 := (continuous_re.isOpen_preimage _ isOpen_Iio).mem_nhds (by simp) - have h2 : ∀ᶠ s in 𝓝 (0:ℂ), s ≠ 1 := isOpen_ne.mem_nhds zero_ne_one - filter_upwards [h1, h2] with s hs hs1 - exact Gammaℝ_one_sub_ne_zero_of_re hs hs1 - -lemma eventually_Gammaℝ_ne_zero_nhds_one : ∀ᶠ s in 𝓝 (1:ℂ), Gammaℝ s ≠ 0 := by - have h1 : ∀ᶠ s in 𝓝 (1:ℂ), -2 < s.re := - (continuous_re.isOpen_preimage _ isOpen_Ioi).mem_nhds (by - simp only [Set.mem_preimage, Complex.one_re, Set.mem_Ioi]; norm_num) - have h2 : ∀ᶠ s in 𝓝 (1:ℂ), s ≠ 0 := isOpen_ne.mem_nhds one_ne_zero - filter_upwards [h1, h2] with s hs hs0 - exact Gammaℝ_ne_zero_of_re hs hs0 - -lemma eventually_Gammaℝ_one_sub_ne_zero_nhdsWithin_one : ∀ᶠ s in 𝓝[≠] (1:ℂ), Gammaℝ (1 - s) ≠ 0 := by - have h1 : ∀ᶠ s in 𝓝 (1:ℂ), s.re < 3 := (continuous_re.isOpen_preimage _ isOpen_Iio).mem_nhds (by simp) - filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds h1] with s hs hsre - exact Gammaℝ_one_sub_ne_zero_of_re hsre hs - -/-- s ↦ 1 − s maps 𝓝[≠] 1 to 𝓝[≠] 0. -/ -lemma tendsto_one_sub_nhdsWithin : Tendsto (fun s : ℂ => 1 - s) (𝓝[≠] 1) (𝓝[≠] 0) := by - refine tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ ?_ ?_ - · have : Tendsto (fun s : ℂ => 1 - s) (𝓝 1) (𝓝 (1 - 1)) := (continuous_const.sub continuous_id).tendsto 1 - simpa using this.mono_left nhdsWithin_le_nhds - · filter_upwards [self_mem_nhdsWithin] with s hs - rw [mem_compl_singleton_iff] at hs ⊢ - exact sub_ne_zero.mpr (Ne.symm hs) - -/-- logDeriv of an analytic nonvanishing function is continuous. -/ -lemma continuousAt_logDeriv {f : ℂ → ℂ} {s : ℂ} (hf : AnalyticAt ℂ f s) (h0 : f s ≠ 0) : - ContinuousAt (logDeriv f) s := by - have e : logDeriv f = fun z => deriv f z / f z := by funext z; rw [logDeriv_apply] - rw [e]; exact hf.deriv.continuousAt.div hf.continuousAt h0 - -/-! ### §4. Pole limits -/ - -theorem tendsto_mul_L2_zero : Tendsto (fun s : ℂ => s * L2 s) (𝓝[≠] 0) (𝓝 (-(1 / 2 : ℂ))) := by - -- near 0 (s ≠ 0): s·L₂ = −½ (s·logDeriv(Γℝ∘(1−·)) s + s·logDeriv G s) - have hA0 : Gammaℝ (1 - 0) ≠ 0 := by simp [Gammaℝ_one] - have hcontA : ContinuousAt (logDeriv (fun z => Gammaℝ (1 - z))) 0 := - continuousAt_logDeriv (analyticAt_Gammaℝ_one_sub hA0) hA0 - have hev : ∀ᶠ s in 𝓝[≠] (0:ℂ), s * L2 s - = -(1/2) * (s * logDeriv (fun z => Gammaℝ (1 - z)) s + s * logDeriv invGammaℝ s) := by - filter_upwards [eventually_Gammaℝ_ne_zero_nhdsWithin_zero, - mem_nhdsWithin_of_mem_nhds eventually_Gammaℝ_one_sub_ne_zero_nhds_zero] with s h0 h1 - rw [L2, logDeriv_chiFE_eq h1 h0]; ring - have hlim1 : Tendsto (fun s : ℂ => s * logDeriv (fun z => Gammaℝ (1 - z)) s) (𝓝[≠] 0) (𝓝 0) := by - have := ((continuous_id.continuousAt (x := (0:ℂ))).tendsto.mul hcontA.tendsto).mono_left - (nhdsWithin_le_nhds (s := {(0:ℂ)}ᶜ)) - simpa using this - have hlim : Tendsto (fun s : ℂ => -(1/2) * (s * logDeriv (fun z => Gammaℝ (1 - z)) s - + s * logDeriv invGammaℝ s)) (𝓝[≠] 0) (𝓝 (-(1/2) * (0 + 1))) := - (hlim1.add tendsto_mul_logDeriv_invGammaℝ_zero).const_mul _ - rw [show (-(1 / 2 : ℂ)) = -(1/2) * (0 + 1) by ring] - exact hlim.congr' (hev.mono fun _ h => h.symm) - -theorem tendsto_mul_L2_one : Tendsto (fun s : ℂ => (s - 1) * L2 s) (𝓝[≠] 1) (𝓝 (1 / 2 : ℂ)) := by - have hG1 : Gammaℝ 1 ≠ 0 := by simp [Gammaℝ_one] - have hcontG : ContinuousAt (logDeriv invGammaℝ) 1 := - continuousAt_logDeriv (analyticAt_invGammaℝ 1) (invGammaℝ_ne_zero_iff.mpr hG1) - -- the Γℝ(1−·) half: (s−1)·logDeriv(Γℝ∘(1−·)) s = −((1−s)·logDeriv G (1−s)) → −1 - have hev : ∀ᶠ s in 𝓝[≠] (1:ℂ), (s - 1) * L2 s - = -(1/2) * (-((1 - s) * logDeriv invGammaℝ (1 - s)) + (s - 1) * logDeriv invGammaℝ s) := by - filter_upwards [eventually_Gammaℝ_one_sub_ne_zero_nhdsWithin_one, - mem_nhdsWithin_of_mem_nhds eventually_Gammaℝ_ne_zero_nhds_one] with s h1 h0 - rw [L2, logDeriv_chiFE_eq h1 h0, logDeriv_Gammaℝ_one_sub_eq h1] - have hcomp : logDeriv (fun z => invGammaℝ (1 - z)) s = logDeriv invGammaℝ (1 - s) * (-1) := by - have e : (fun z => invGammaℝ (1 - z)) = invGammaℝ ∘ (fun z : ℂ => 1 - z) := rfl - rw [e, logDeriv_comp (differentiable_invGammaℝ _) (by fun_prop)] - congr 1 - rw [deriv_const_sub, deriv_id''] - rw [hcomp]; ring - have hlim1 : Tendsto (fun s : ℂ => (1 - s) * logDeriv invGammaℝ (1 - s)) (𝓝[≠] 1) (𝓝 1) := - tendsto_mul_logDeriv_invGammaℝ_zero.comp tendsto_one_sub_nhdsWithin - have hlim2 : Tendsto (fun s : ℂ => (s - 1) * logDeriv invGammaℝ s) (𝓝[≠] 1) (𝓝 0) := by - have h : Tendsto (fun s : ℂ => (s - 1) * logDeriv invGammaℝ s) (𝓝 1) - (𝓝 ((1 - 1) * logDeriv invGammaℝ 1)) := - ((tendsto_id (x := 𝓝 (1:ℂ))).sub_const 1).mul hcontG.tendsto - have h' := h.mono_left (nhdsWithin_le_nhds (s := {(1:ℂ)}ᶜ)) - simpa using h' - have hlim : Tendsto (fun s : ℂ => -(1/2) * (-((1 - s) * logDeriv invGammaℝ (1 - s)) - + (s - 1) * logDeriv invGammaℝ s)) (𝓝[≠] 1) (𝓝 (-(1/2) * (-1 + 0))) := - (hlim1.neg.add hlim2).const_mul _ - rw [show (1 / 2 : ℂ) = -(1/2) * (-1 + 0) by ring] - exact hlim.congr' (hev.mono fun _ h => h.symm) - -/-- the regular part of ζ at 1 in Mathlib's normalisation: F := ζ − (Γℝ)⁻¹/(s−1) is differentiable AT 1 -(HurwitzZeta.differentiableAt_hurwitzZetaEven_sub_one_div) and near 1. -/ -def zetaReg (s : ℂ) : ℂ := riemannZeta s - 1 / (s - 1) / Gammaℝ s - -lemma zetaReg_differentiableAt_one : DifferentiableAt ℂ zetaReg 1 := by - have h := HurwitzZeta.differentiableAt_hurwitzZetaEven_sub_one_div 0 - rw [HurwitzZeta.hurwitzZetaEven_zero] at h - exact h - -lemma zetaReg_differentiableAt {s : ℂ} (hs1 : s ≠ 1) (hΓ : Gammaℝ s ≠ 0) : DifferentiableAt ℂ zetaReg s := by - have h1 : DifferentiableAt ℂ (fun z : ℂ => 1 / (z - 1)) s := - (differentiableAt_const (1:ℂ)).div (differentiableAt_id.sub_const 1) (sub_ne_zero.mpr hs1) - have h2 : DifferentiableAt ℂ (fun z : ℂ => 1 / (z - 1) / Gammaℝ z) s := h1.div (differentiableAt_Gammaℝ hΓ) hΓ - exact (differentiableAt_riemannZeta hs1).sub h2 - -lemma zetaReg_analyticAt_one : AnalyticAt ℂ zetaReg 1 := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - filter_upwards [eventually_Gammaℝ_ne_zero_nhds_one] with s hΓ - rcases eq_or_ne s 1 with rfl | hs1 - · exact zetaReg_differentiableAt_one - · exact zetaReg_differentiableAt hs1 hΓ - -/-- ζ = zetaReg + G/(·−1) as FUNCTIONS (G = (Γℝ)⁻¹; both sides junk-equal at 1 and at the poles of Γℝ). -/ -lemma riemannZeta_eq_zetaReg_add : riemannZeta = fun s => zetaReg s + invGammaℝ s / (s - 1) := by - funext s - rw [zetaReg, invGammaℝ] - ring - -theorem tendsto_sq_mul_deriv_zeta_one : - Tendsto (fun s : ℂ => (s - 1) ^ 2 * deriv riemannZeta s) (𝓝[≠] 1) (𝓝 (-1)) := by - -- derivative of the polar part H := G/(s−1) off 1 - have hH : ∀ s : ℂ, s ≠ 1 → deriv (fun z => invGammaℝ z / (z - 1)) s - = (deriv invGammaℝ s * (s - 1) - invGammaℝ s) / (s - 1) ^ 2 := by - intro s hs - have h := (differentiable_invGammaℝ s).hasDerivAt.div - ((hasDerivAt_id s).sub_const (1:ℂ)) (sub_ne_zero.mpr hs) - have e : (fun z : ℂ => invGammaℝ z / (z - 1)) = (invGammaℝ / fun x => id x - 1) := rfl - rw [e, h.deriv] - simp only [id] - ring - have hev : ∀ᶠ s in 𝓝[≠] (1:ℂ), (s - 1) ^ 2 * deriv riemannZeta s - = (s - 1) ^ 2 * deriv zetaReg s + (deriv invGammaℝ s * (s - 1) - invGammaℝ s) := by - filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds eventually_Gammaℝ_ne_zero_nhds_one] - with s hs hΓ - have hdz := zetaReg_differentiableAt hs hΓ - have hdH : DifferentiableAt ℂ (fun z => invGammaℝ z / (z - 1)) s := - (differentiable_invGammaℝ s).div (differentiableAt_id.sub (differentiableAt_const _)) (sub_ne_zero.mpr hs) - rw [riemannZeta_eq_zetaReg_add] - rw [show (fun s => zetaReg s + invGammaℝ s / (s - 1)) = zetaReg + fun z => invGammaℝ z / (z - 1) from rfl, - deriv_add hdz hdH, hH s hs, mul_add, mul_div_cancel₀ _ (pow_ne_zero 2 (sub_ne_zero.mpr hs))] - -- limits of the three pieces - have hcont : ContinuousAt (deriv zetaReg) 1 := zetaReg_analyticAt_one.deriv.continuousAt - have hl1 : Tendsto (fun s : ℂ => (s - 1) ^ 2 * deriv zetaReg s) (𝓝[≠] 1) (𝓝 0) := by - have h : Tendsto (fun s : ℂ => (s - 1) ^ 2 * deriv zetaReg s) (𝓝 1) (𝓝 ((1 - 1) ^ 2 * deriv zetaReg 1)) := - (((tendsto_id (x := 𝓝 (1:ℂ))).sub_const 1).pow 2).mul hcont.tendsto - have h' := h.mono_left (nhdsWithin_le_nhds (s := {(1:ℂ)}ᶜ)) - simpa using h' - have hl2 : Tendsto (fun s : ℂ => deriv invGammaℝ s * (s - 1) - invGammaℝ s) (𝓝[≠] 1) (𝓝 (0 - 1)) := by - have hG1 : invGammaℝ 1 = 1 := by rw [invGammaℝ, Gammaℝ_one, inv_one] - have hd : ContinuousAt (deriv invGammaℝ) 1 := (analyticAt_invGammaℝ 1).deriv.continuousAt - have h1 : Tendsto (fun s : ℂ => deriv invGammaℝ s * (s - 1)) (𝓝 1) (𝓝 0) := by - have : Tendsto (fun s : ℂ => deriv invGammaℝ s * (s - 1)) (𝓝 1) (𝓝 (deriv invGammaℝ 1 * (1 - 1))) := - hd.tendsto.mul ((tendsto_id (x := 𝓝 (1:ℂ))).sub_const 1) - simpa using this - have h2 : Tendsto invGammaℝ (𝓝 1) (𝓝 1) := by - have := (differentiable_invGammaℝ.continuous.continuousAt (x := (1:ℂ))).tendsto - rwa [hG1] at this - exact (h1.sub h2).mono_left nhdsWithin_le_nhds - have hlim := hl1.add hl2 - rw [show (-1 : ℂ) = 0 + (0 - 1) by ring] - exact hlim.congr' (hev.mono fun _ h => h.symm) - -theorem tendsto_mul_hardyW_zero : Tendsto (fun s : ℂ => s * hardyW s) (𝓝[≠] 0) (𝓝 (1 / 4 : ℂ)) := by - -- s·W = s·ζ′ + (s·L₂)·ζ → 0 + (−½)(−½) - have hζ : AnalyticAt ℂ riemannZeta 0 := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - filter_upwards [isOpen_ne.mem_nhds (zero_ne_one : (0:ℂ) ≠ 1)] with z hz - exact differentiableAt_riemannZeta hz - have h1 : Tendsto (fun s : ℂ => s * deriv riemannZeta s) (𝓝[≠] 0) (𝓝 0) := by - have := ((continuous_id.continuousAt (x := (0:ℂ))).tendsto.mul hζ.deriv.continuousAt.tendsto).mono_left - (nhdsWithin_le_nhds (s := {(0:ℂ)}ᶜ)) - simpa using this - have h2 : Tendsto riemannZeta (𝓝[≠] 0) (𝓝 (-1 / 2)) := by - have := hζ.continuousAt.tendsto.mono_left (nhdsWithin_le_nhds (s := {(0:ℂ)}ᶜ)) - rwa [riemannZeta_zero] at this - have hlim := h1.add (tendsto_mul_L2_zero.mul h2) - have e : ∀ s : ℂ, s * hardyW s = s * deriv riemannZeta s + s * L2 s * riemannZeta s := by - intro s; rw [hardyW]; ring - simp_rw [e] - convert hlim using 2 - norm_num - -theorem tendsto_sq_mul_hardyW_one : - Tendsto (fun s : ℂ => (s - 1) ^ 2 * hardyW s) (𝓝[≠] 1) (𝓝 (-(1 / 2 : ℂ))) := by - have hlim := tendsto_sq_mul_deriv_zeta_one.add (tendsto_mul_L2_one.mul riemannZeta_residue_one) - have e : ∀ s : ℂ, (s - 1) ^ 2 * hardyW s - = (s - 1) ^ 2 * deriv riemannZeta s + (s - 1) * L2 s * ((s - 1) * riemannZeta s) := by - intro s; rw [hardyW]; ring - simp_rw [e] - convert hlim using 2 - norm_num - -/-! ### §5. The regularised Wreg -/ - -/-- p(s) := s(s−1)², the polar polynomial of W on the strip. -/ -def polarPoly (s : ℂ) : ℂ := s * (s - 1) ^ 2 - -/-- Wreg := s(s−1)²·W(s) with the removable singularities at 0, 1 filled in (values ¼, −½). -/ -def Wreg : ℂ → ℂ := - Function.update (Function.update (fun s : ℂ => polarPoly s * hardyW s) 0 (1 / 4)) 1 (-(1 / 2)) - -theorem Wreg_eq {s : ℂ} (h0 : s ≠ 0) (h1 : s ≠ 1) : Wreg s = polarPoly s * hardyW s := by - simp [Wreg, Function.update_of_ne h1, Function.update_of_ne h0] - -theorem Wreg_zero : Wreg 0 = 1 / 4 := by - simp [Wreg] - -theorem Wreg_one : Wreg 1 = -(1 / 2) := by - simp [Wreg] - -lemma polarPoly_analyticAt (s : ℂ) : AnalyticAt ℂ polarPoly s := by - have e : polarPoly = fun s : ℂ => s * (s - 1) ^ 2 := rfl - rw [e]; fun_prop - -lemma polarPoly_ne_zero {s : ℂ} (h0 : s ≠ 0) (h1 : s ≠ 1) : polarPoly s ≠ 0 := - mul_ne_zero h0 (pow_ne_zero _ (sub_ne_zero.mpr h1)) - -/-- off {0,1}, Wreg agrees with p·W on a neighbourhood. -/ -lemma Wreg_eventuallyEq {s : ℂ} (h0 : s ≠ 0) (h1 : s ≠ 1) : - Wreg =ᶠ[𝓝 s] fun z => polarPoly z * hardyW z := by - filter_upwards [isOpen_ne.mem_nhds h0, isOpen_ne.mem_nhds h1] with z hz0 hz1 - exact Wreg_eq hz0 hz1 - -lemma Wreg_eventuallyEq_nhdsWithin_zero : - ∀ᶠ z in 𝓝[≠] (0:ℂ), Wreg z = polarPoly z * hardyW z := by - filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds (isOpen_ne.mem_nhds (zero_ne_one : (0:ℂ) ≠ 1))] - with z hz0 hz1 - exact Wreg_eq hz0 hz1 - -lemma Wreg_eventuallyEq_nhdsWithin_one : - ∀ᶠ z in 𝓝[≠] (1:ℂ), Wreg z = polarPoly z * hardyW z := by - filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds (isOpen_ne.mem_nhds (one_ne_zero : (1:ℂ) ≠ 0))] - with z hz1 hz0 - exact Wreg_eq hz0 hz1 - -lemma mem_stripReg_of_near {s : ℂ} (hre : -2 < s.re) (hre' : s.re < 3) (h0 : s ≠ 0) (h1 : s ≠ 1) : - s ∈ stripReg := ⟨hre, hre', h0, h1⟩ - -/-- Wreg is analytic on the strip −2 < Re s < 3 (including at 0 and 1). -/ -theorem Wreg_analyticAt {s : ℂ} (hre : -2 < s.re) (hre' : s.re < 3) : AnalyticAt ℂ Wreg s := by - -- the strip condition is open - have hstrip : ∀ᶠ z in 𝓝 s, -2 < z.re ∧ z.re < 3 := by - filter_upwards [(continuous_re.isOpen_preimage _ isOpen_Ioi).mem_nhds (show s ∈ re ⁻¹' Ioi (-2) from hre), - (continuous_re.isOpen_preimage _ isOpen_Iio).mem_nhds (show s ∈ re ⁻¹' Iio 3 from hre')] with z h1 h2 - exact ⟨h1, h2⟩ - -- differentiability of p·W at points of the strip off {0,1} - have hdiff : ∀ z : ℂ, -2 < z.re → z.re < 3 → z ≠ 0 → z ≠ 1 → DifferentiableAt ℂ Wreg z := by - intro z h1 h2 hz0 hz1 - have ha : AnalyticAt ℂ (fun z => polarPoly z * hardyW z) z := - (polarPoly_analyticAt z).mul (hardyW_analyticAt_of_mem ⟨h1, h2, hz0, hz1⟩) - exact (ha.congr (Wreg_eventuallyEq hz0 hz1).symm).differentiableAt - rcases eq_or_ne s 0 with rfl | h0 - · -- removable singularity at 0 - refine Complex.analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt ?_ ?_ - · filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds hstrip, - mem_nhdsWithin_of_mem_nhds (isOpen_ne.mem_nhds (zero_ne_one : (0:ℂ) ≠ 1))] with z hz0 hz hz1 - exact hdiff z hz.1 hz.2 hz0 hz1 - · unfold Wreg - rw [continuousAt_update_of_ne zero_ne_one, continuousAt_update_same] - have h0 : Tendsto (fun z : ℂ => (z - 1) ^ 2) (𝓝 0) (𝓝 ((0 - 1) ^ 2)) := - ((tendsto_id (x := 𝓝 (0:ℂ))).sub_const 1).pow 2 - have h := (h0.mono_left (nhdsWithin_le_nhds (s := {(0:ℂ)}ᶜ))).mul tendsto_mul_hardyW_zero - have e : ∀ z : ℂ, polarPoly z * hardyW z = (z - 1) ^ 2 * (z * hardyW z) := by - intro z; rw [polarPoly]; ring - simp_rw [e] - convert h using 2; norm_num - rcases eq_or_ne s 1 with rfl | h1 - · -- removable singularity at 1 - refine Complex.analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt ?_ ?_ - · filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds hstrip, - mem_nhdsWithin_of_mem_nhds (isOpen_ne.mem_nhds (one_ne_zero : (1:ℂ) ≠ 0))] with z hz1 hz hz0 - exact hdiff z hz.1 hz.2 hz0 hz1 - · unfold Wreg - rw [continuousAt_update_same] - -- the inner update differs from p·W only at 0 - have hev : (fun z : ℂ => polarPoly z * hardyW z) - =ᶠ[𝓝[≠] (1:ℂ)] Function.update (fun s : ℂ => polarPoly s * hardyW s) 0 (1 / 4) := by - filter_upwards [mem_nhdsWithin_of_mem_nhds (isOpen_ne.mem_nhds (one_ne_zero : (1:ℂ) ≠ 0))] with z hz0 - rw [Function.update_of_ne hz0] - refine Tendsto.congr' hev ?_ - have h := (((continuous_id).continuousAt (x := (1:ℂ))).tendsto.mono_left - (nhdsWithin_le_nhds (s := {(1:ℂ)}ᶜ))).mul tendsto_sq_mul_hardyW_one - have e : ∀ z : ℂ, polarPoly z * hardyW z = z * ((z - 1) ^ 2 * hardyW z) := by - intro z; rw [polarPoly]; ring - simp_rw [e] - convert h using 2 <;> simp - · exact ((polarPoly_analyticAt s).mul (hardyW_analyticAt_of_mem ⟨hre, hre', h0, h1⟩)).congr - (Wreg_eventuallyEq h0 h1).symm - -/-- off {0,1} (inside the strip) Wreg vanishes exactly where W does … -/ -theorem Wreg_eq_zero_iff {s : ℂ} (hs : s ∈ stripReg) : Wreg s = 0 ↔ hardyW s = 0 := by - obtain ⟨-, -, h0, h1⟩ := hs - rw [Wreg_eq h0 h1, mul_eq_zero, or_iff_right (polarPoly_ne_zero h0 h1)] - -/-- … with the same analytic order. -/ -theorem analyticOrderAt_Wreg {s : ℂ} (hs : s ∈ stripReg) : analyticOrderAt Wreg s = analyticOrderAt hardyW s := by - obtain ⟨hre, hre', h0, h1⟩ := hs - rw [analyticOrderAt_congr (Wreg_eventuallyEq h0 h1)] - have e : (fun z => polarPoly z * hardyW z) = polarPoly * hardyW := rfl - rw [e, analyticOrderAt_mul (polarPoly_analyticAt s) (hardyW_analyticAt_of_mem ⟨hre, hre', h0, h1⟩), - (polarPoly_analyticAt s).analyticOrderAt_eq_zero.mpr (polarPoly_ne_zero h0 h1), zero_add] - -/-- logDeriv Wreg = logDeriv p + W′/W off {0,1} where W ≠ 0. -/ -theorem logDeriv_Wreg {s : ℂ} (hs : s ∈ stripReg) (hW : hardyW s ≠ 0) : - logDeriv Wreg s = logDeriv polarPoly s + logDeriv hardyW s := by - obtain ⟨hre, hre', h0, h1⟩ := hs - have hev := Wreg_eventuallyEq h0 h1 - have e1 : logDeriv Wreg s = logDeriv (fun z => polarPoly z * hardyW z) s := by - rw [logDeriv_apply, logDeriv_apply, hev.deriv_eq, hev.eq_of_nhds] - rw [e1] - exact logDeriv_mul s (polarPoly_ne_zero h0 h1) hW (polarPoly_analyticAt s).differentiableAt - (hardyW_analyticAt_of_mem ⟨hre, hre', h0, h1⟩).differentiableAt - -end EFContour -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFContour/Rectangle.lean b/zeta23/Zeta23/XiPrime/Hardy/EFContour/Rectangle.lean deleted file mode 100644 index 96bd1bc274..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFContour/Rectangle.lean +++ /dev/null @@ -1,452 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFContour/Rectangle.lean — the rectangle identities at a fixed height R for the two W-integrands. - -Rectangle Q := [1−c, c] × [−R, R], 1 < c ≤ 5/4, R > 0; z = (1−c) − iR, w = c + iR (the FullLine/Limit convention); -H = WeilEF.Hfn k (entire). Every identity is the POLE-FREE weighted argument principle -Zeta23.Analytic.rectangleIntegral'_mul_logDeriv (f analytic on Q, f ≠ 0 on ∂Q, zeros of f in Q listed) applied to: - G := (Γℝ)⁻¹ (entire; zeros in Q: {0}, simple) ⇒ (1/2πi)∮ H·G′/G = H(0) - G∘(1−·) (entire; zeros in Q: {1}, simple) ⇒ (1/2πi)∮ H·(G∘(1−·))′/… = H(1) - q := s(s−1) (FullLine.mulSubOne; zeros 0,1 simple) ⇒ H(0) + H(1) - p := s(s−1)² (Poles.polarPoly; zeros 0 simple, 1 double) ⇒ H(0) + 2H(1) - Wreg := p·W filled in at 0,1 (Poles.Wreg; analytic on Q; zeros = W's off {0,1}, same orders) ⇒ Σ_{W(ρ)=0} ord_ρ(W)·H(ρ) -and on ∂Q (no point of ∂Q is 0 or 1, and W ≠ 0 on ∂Q by hypothesis): - Γℝ′/Γℝ = −G′/G, (Γℝ′/Γℝ)(1−s) = (G∘(1−·))′/(G∘(1−·))(s), L₂ = ½[Γℝ′/Γℝ(s) + Γℝ′/Γℝ(1−s)], 1/s + 1/(s−1) = q′/q, - W′/W = Wreg′/Wreg − p′/p. Hence - rect_Lminus : (1/2πi)∮ H·(Lfn − L₂) = ½(H(0) + H(1)), - rect_FZ : (1/2πi)∮ H·(L₂ + W′/W) = Σ_{ρ∈Q, ρ∉{0,1}, W(ρ)=0} ord_ρ(W)·H(ρ) − (3/2)(H(0) + H(1)). --/ -import Zeta23.XiPrime.Hardy.EFContour.Poles -import Zeta23.XiPrime.ExplicitFormula.FullLine - -open Complex Set Filter Topology MeasureTheory -open Zeta23.WeilEF (Hfn) - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy -namespace EFContour - -variable {k : ℝ → ℂ} {c R : ℝ} - -/-! ### §1. The rectangle: corners, membership, border -/ - -/-- lower-left corner (1−c) − iR. -/ -def zc (c R : ℝ) : ℂ := ((1 - c : ℝ) : ℂ) - R * I -/-- upper-right corner c + iR. -/ -def wc (c R : ℝ) : ℂ := (c : ℝ) + R * I - -@[simp] lemma zc_re (c R : ℝ) : (zc c R).re = 1 - c := by simp [zc] -@[simp] lemma zc_im (c R : ℝ) : (zc c R).im = -R := by simp [zc] -@[simp] lemma wc_re (c R : ℝ) : (wc c R).re = c := by simp [wc] -@[simp] lemma wc_im (c R : ℝ) : (wc c R).im = R := by simp [wc] - -lemma mem_rect_iff (hc : 1 - c ≤ c) (hR : 0 ≤ R) (s : ℂ) : - s ∈ Rectangle (zc c R) (wc c R) ↔ (1 - c ≤ s.re ∧ s.re ≤ c) ∧ (-R ≤ s.im ∧ s.im ≤ R) := by - simp only [Rectangle, Complex.mem_reProdIm, zc_re, zc_im, wc_re, wc_im, Set.uIcc_of_le hc, - Set.uIcc_of_le (show (-R : ℝ) ≤ R by linarith), Set.mem_Icc] - -lemma border_cases {s : ℂ} (hs : s ∈ RectangleBorder (zc c R) (wc c R)) : - s.re = 1 - c ∨ s.re = c ∨ s.im = -R ∨ s.im = R := by - simp only [RectangleBorder, Set.mem_union, Complex.mem_reProdIm, Set.mem_singleton_iff, - zc_re, zc_im, wc_re, wc_im] at hs - rcases hs with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ - · exact Or.inr (Or.inr (Or.inl h')) - · exact Or.inl h' - · exact Or.inr (Or.inr (Or.inr h')) - · exact Or.inr (Or.inl h') - -section Geometry -variable (hc1 : 1 < c) (hc2 : c ≤ 5 / 4) (hR : 0 < R) -include hc1 hc2 hR - -omit hR in -lemma zc_le_wc_re : (zc c R).re ≤ (wc c R).re := by simp; linarith -omit hc1 hc2 in -lemma zc_le_wc_im : (zc c R).im ≤ (wc c R).im := by simp; linarith - -/-- points of the closed rectangle lie in the strip −2 < Re < 3. -/ -lemma re_bounds_of_mem {s : ℂ} (hs : s ∈ Rectangle (zc c R) (wc c R)) : -2 < s.re ∧ s.re < 3 := by - obtain ⟨⟨h1, h2⟩, -⟩ := (mem_rect_iff (by linarith) hR.le s).mp hs - exact ⟨by linarith, by linarith⟩ - -/-- 0 and 1 are interior points; no border point is 0 or 1. -/ -lemma border_ne_zero_one {s : ℂ} (hs : s ∈ RectangleBorder (zc c R) (wc c R)) : s ≠ 0 ∧ s ≠ 1 := by - rcases border_cases hs with h | h | h | h <;> - refine ⟨fun e => ?_, fun e => ?_⟩ <;> (rw [e] at h; simp at h) <;> linarith - -lemma mem_stripReg_of_border {s : ℂ} (hs : s ∈ RectangleBorder (zc c R) (wc c R)) : s ∈ stripReg := by - obtain ⟨h0, h1⟩ := border_ne_zero_one hc1 hc2 hR hs - obtain ⟨ha, hb⟩ := re_bounds_of_mem hc1 hc2 hR (rectangleBorder_subset_rectangle _ _ hs) - exact ⟨ha, hb, h0, h1⟩ - -lemma zero_mem_rect : (0 : ℂ) ∈ Rectangle (zc c R) (wc c R) := - (mem_rect_iff (by linarith) hR.le 0).mpr ⟨⟨by simp; linarith, by simp; linarith⟩, by simp; linarith, by simp [hR.le]⟩ - -lemma one_mem_rect : (1 : ℂ) ∈ Rectangle (zc c R) (wc c R) := - (mem_rect_iff (by linarith) hR.le 1).mpr ⟨⟨by simp; linarith, by simp; linarith⟩, by simp; linarith, by simp [hR.le]⟩ - -lemma Gammaℝ_ne_zero_of_mem {s : ℂ} (hs : s ∈ Rectangle (zc c R) (wc c R)) (h0 : s ≠ 0) : Gammaℝ s ≠ 0 := - Gammaℝ_ne_zero_of_re (re_bounds_of_mem hc1 hc2 hR hs).1 h0 - -lemma Gammaℝ_one_sub_ne_zero_of_mem {s : ℂ} (hs : s ∈ Rectangle (zc c R) (wc c R)) (h1 : s ≠ 1) : - Gammaℝ (1 - s) ≠ 0 := - Gammaℝ_one_sub_ne_zero_of_re (re_bounds_of_mem hc1 hc2 hR hs).2 h1 - -end Geometry - -/-! ### §2. The four explicit pieces -/ - -variable (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) (hc1 : 1 < c) (hc2 : c ≤ 5 / 4) (hR : 0 < R) -include hk hkc hc1 hc2 hR - -omit hc1 hc2 hR in -lemma Hfn_analyticOnNhd (U : Set ℂ) : AnalyticOnNhd ℂ (Hfn k) U := fun s _ => (differentiable_Hfn hk hkc).analyticAt s - -/-- (a) (1/2πi)∮ H·G′/G = H(0). -/ -theorem rect_invGammaℝ : - RectangleIntegral' (fun s => Hfn k s * logDeriv invGammaℝ s) (zc c R) (wc c R) = Hfn k 0 := by - classical - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv (zc_le_wc_re hc1 hc2) (zc_le_wc_im hR) - (f := invGammaℝ) (g := Hfn k) (fun s _ => analyticAt_invGammaℝ s) (Hfn_analyticOnNhd hk hkc _) - (fun s hs => invGammaℝ_ne_zero_iff.mpr - (Gammaℝ_ne_zero_of_mem hc1 hc2 hR (rectangleBorder_subset_rectangle _ _ hs) (border_ne_zero_one hc1 hc2 hR hs).1)) - {0} (fun s hs => by - rw [Finset.mem_singleton, invGammaℝ_eq_zero_iff] - constructor - · intro h; by_contra h0; exact Gammaℝ_ne_zero_of_mem hc1 hc2 hR hs h0 h - · rintro rfl; simp [Gammaℝ_eq_zero_iff]) - (by simpa using zero_mem_rect hc1 hc2 hR) - rw [key, Finset.sum_singleton, analyticOrderNatAt_invGammaℝ_zero] - simp - -/-- (b) (1/2πi)∮ H·(G∘(1−·))′/(G∘(1−·)) = H(1). -/ -theorem rect_invGammaℝ_one_sub : - RectangleIntegral' (fun s => Hfn k s * logDeriv (fun z => invGammaℝ (1 - z)) s) (zc c R) (wc c R) = Hfn k 1 := by - classical - have han : ∀ s : ℂ, AnalyticAt ℂ (fun z => invGammaℝ (1 - z)) s := fun s => - (analyticAt_invGammaℝ _).comp (analyticAt_const.sub analyticAt_id) - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv (zc_le_wc_re hc1 hc2) (zc_le_wc_im hR) - (f := fun z => invGammaℝ (1 - z)) (g := Hfn k) (fun s _ => han s) (Hfn_analyticOnNhd hk hkc _) - (fun s hs => invGammaℝ_ne_zero_iff.mpr - (Gammaℝ_one_sub_ne_zero_of_mem hc1 hc2 hR (rectangleBorder_subset_rectangle _ _ hs) - (border_ne_zero_one hc1 hc2 hR hs).2)) - {1} (fun s hs => by - rw [Finset.mem_singleton, invGammaℝ_eq_zero_iff] - constructor - · intro h; by_contra h1; exact Gammaℝ_one_sub_ne_zero_of_mem hc1 hc2 hR hs h1 h - · rintro rfl; simp [Gammaℝ_eq_zero_iff]) - (by simpa using one_mem_rect hc1 hc2 hR) - rw [key, Finset.sum_singleton, analyticOrderNatAt_invGammaℝ_one_sub_one] - simp - -/-- (c) (1/2πi)∮ H·q′/q = H(0) + H(1), q = s(s−1). -/ -theorem rect_mulSubOne : - RectangleIntegral' (fun s => Hfn k s * logDeriv mulSubOne s) (zc c R) (wc c R) = Hfn k 0 + Hfn k 1 := by - classical - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv (zc_le_wc_re hc1 hc2) (zc_le_wc_im hR) - (f := mulSubOne) (g := Hfn k) (fun s _ => differentiable_mulSubOne.analyticAt s) - (Hfn_analyticOnNhd hk hkc _) - (fun s hs => by - obtain ⟨h0, h1⟩ := border_ne_zero_one hc1 hc2 hR hs - rw [Ne, mulSubOne_eq_zero_iff]; simp [h0, h1]) - {0, 1} (fun s _ => by rw [mulSubOne_eq_zero_iff]; simp) - (by - intro s hs - simp only [Finset.coe_insert, Finset.coe_singleton, Set.mem_insert_iff, Set.mem_singleton_iff] at hs - rcases hs with rfl | rfl - · exact zero_mem_rect hc1 hc2 hR - · exact one_mem_rect hc1 hc2 hR) - rw [key, Finset.sum_insert (by simp), Finset.sum_singleton, analyticOrderNatAt_mulSubOne_zero, - analyticOrderNatAt_mulSubOne_one] - simp - -/-! #### the polar polynomial p = q · (s−1) -/ - -omit hk hkc hc1 hc2 hR in -/-- s ↦ s − 1. -/ -lemma differentiable_subOne : Differentiable ℂ (fun s : ℂ => s - 1) := by fun_prop - -/-- the second factor, as a named function to keep elaboration syntactic. -/ -def subOne (s : ℂ) : ℂ := s - 1 - -omit hk hkc hc1 hc2 hR in -lemma differentiable_subOne' : Differentiable ℂ subOne := by unfold subOne; fun_prop - -omit hk hkc hc1 hc2 hR in -lemma polarPoly_eq_mul : polarPoly = mulSubOne * subOne := by - funext s; simp only [Pi.mul_apply, polarPoly, mulSubOne, subOne]; ring - -omit hk hkc hc1 hc2 hR in -lemma analyticOrderAt_subOne_zero : analyticOrderAt subOne 0 = 0 := - (differentiable_subOne'.analyticAt 0).analyticOrderAt_eq_zero.mpr (by simp [subOne]) - -omit hk hkc hc1 hc2 hR in -lemma analyticOrderAt_subOne_one : analyticOrderAt subOne 1 = (1 : ℕ) := by - rw [(differentiable_subOne'.analyticAt 1).analyticOrderAt_eq_natCast] - exact ⟨fun _ => 1, analyticAt_const, one_ne_zero, Eventually.of_forall fun z => by simp [subOne]⟩ - -omit hk hkc hc1 hc2 hR in -/-- from a (nonzero) natural order back to the ℕ∞ order. -/ -lemma analyticOrderAt_of_nat {f : ℂ → ℂ} {z : ℂ} {n : ℕ} (hn : n ≠ 0) (h : analyticOrderNatAt f z = n) : - analyticOrderAt f z = n := by - have hne : analyticOrderAt f z ≠ ⊤ := by - intro ht; rw [analyticOrderNatAt, ht] at h; simp at h; exact hn h.symm - rw [← ENat.coe_toNat hne] - unfold analyticOrderNatAt at h - rw [h] - -omit hk hkc hc1 hc2 hR in -lemma differentiable_polarPoly : Differentiable ℂ polarPoly := by - unfold polarPoly; fun_prop - -omit hk hkc hc1 hc2 hR in -lemma polarPoly_eq_zero_iff (s : ℂ) : polarPoly s = 0 ↔ s = 0 ∨ s = 1 := by - rw [polarPoly, mul_eq_zero, pow_eq_zero_iff two_ne_zero, sub_eq_zero] - -omit hk hkc hc1 hc2 hR in -lemma analyticOrderNatAt_polarPoly_zero : analyticOrderNatAt polarPoly 0 = 1 := by - unfold analyticOrderNatAt - rw [polarPoly_eq_mul, analyticOrderAt_mul (differentiable_mulSubOne.analyticAt 0) (differentiable_subOne'.analyticAt 0), - analyticOrderAt_subOne_zero, add_zero, analyticOrderAt_of_nat one_ne_zero analyticOrderNatAt_mulSubOne_zero] - rfl - -omit hk hkc hc1 hc2 hR in -lemma analyticOrderNatAt_polarPoly_one : analyticOrderNatAt polarPoly 1 = 2 := by - unfold analyticOrderNatAt - rw [polarPoly_eq_mul, analyticOrderAt_mul (differentiable_mulSubOne.analyticAt 1) (differentiable_subOne'.analyticAt 1), - analyticOrderAt_subOne_one, analyticOrderAt_of_nat one_ne_zero analyticOrderNatAt_mulSubOne_one] - rfl - -/-- (d) (1/2πi)∮ H·p′/p = H(0) + 2·H(1). -/ -theorem rect_polarPoly : - RectangleIntegral' (fun s => Hfn k s * logDeriv polarPoly s) (zc c R) (wc c R) = Hfn k 0 + 2 * Hfn k 1 := by - classical - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv (zc_le_wc_re hc1 hc2) (zc_le_wc_im hR) - (f := polarPoly) (g := Hfn k) (fun s _ => differentiable_polarPoly.analyticAt s) - (Hfn_analyticOnNhd hk hkc _) - (fun s hs => by - obtain ⟨h0, h1⟩ := border_ne_zero_one hc1 hc2 hR hs - rw [Ne, polarPoly_eq_zero_iff]; simp [h0, h1]) - {0, 1} (fun s _ => by rw [polarPoly_eq_zero_iff]; simp) - (by - intro s hs - simp only [Finset.coe_insert, Finset.coe_singleton, Set.mem_insert_iff, Set.mem_singleton_iff] at hs - rcases hs with rfl | rfl - · exact zero_mem_rect hc1 hc2 hR - · exact one_mem_rect hc1 hc2 hR) - rw [key, Finset.sum_insert (by simp), Finset.sum_singleton, analyticOrderNatAt_polarPoly_zero, - analyticOrderNatAt_polarPoly_one] - push_cast; ring - -/-! ### §3. The W piece -/ - -/-- (e) (1/2πi)∮ H·Wreg′/Wreg = Σ_{ρ ∈ Q, ρ ∉ {0,1}, W(ρ)=0} ord_ρ(W)·H(ρ), provided W ≠ 0 on ∂Q. -/ -theorem rect_Wreg (hW : ∀ s ∈ RectangleBorder (zc c R) (wc c R), hardyW s ≠ 0) : - ∃ Z : Finset ℂ, ((Z : Set ℂ) = {ρ : ℂ | ρ ∈ Rectangle (zc c R) (wc c R) ∧ ρ ≠ 0 ∧ ρ ≠ 1 ∧ hardyW ρ = 0}) ∧ - RectangleIntegral' (fun s => Hfn k s * logDeriv Wreg s) (zc c R) (wc c R) - = ∑ ρ ∈ Z, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ := by - classical - have hre := zc_le_wc_re (R := R) hc1 hc2 - have him := zc_le_wc_im (c := c) hR - have hfA : AnalyticOnNhd ℂ Wreg (Rectangle (zc c R) (wc c R)) := fun s hs => - Wreg_analyticAt (re_bounds_of_mem hc1 hc2 hR hs).1 (re_bounds_of_mem hc1 hc2 hR hs).2 - -- membership in stripReg for non-polar rectangle points - have hreg : ∀ s ∈ Rectangle (zc c R) (wc c R), s ≠ 0 → s ≠ 1 → s ∈ stripReg := fun s hs h0 h1 => - ⟨(re_bounds_of_mem hc1 hc2 hR hs).1, (re_bounds_of_mem hc1 hc2 hR hs).2, h0, h1⟩ - have hborder : ∀ s ∈ RectangleBorder (zc c R) (wc c R), Wreg s ≠ 0 := by - intro s hs - obtain ⟨h0, h1⟩ := border_ne_zero_one hc1 hc2 hR hs - rw [Ne, Wreg_eq_zero_iff (hreg s (rectangleBorder_subset_rectangle _ _ hs) h0 h1)] - exact hW s hs - have hzB : zc c R ∈ RectangleBorder (zc c R) (wc c R) := Or.inl (Or.inl (Or.inl ⟨Set.left_mem_uIcc, rfl⟩)) - have hfin := Zeta23.Analytic.finite_zeros_rectangle hfA (rectangleBorder_subset_rectangle _ _ hzB) (hborder _ hzB) - set Z : Finset ℂ := hfin.toFinset with hZdef - have hZmem : ∀ ρ, ρ ∈ Z ↔ ρ ∈ Rectangle (zc c R) (wc c R) ∧ Wreg ρ = 0 := by - intro ρ - rw [hZdef, Set.Finite.mem_toFinset, Set.mem_inter_iff, Set.mem_preimage, Set.mem_singleton_iff] - -- zeros of Wreg in Q are exactly W's zeros off {0,1} - have hchar : ∀ ρ, ρ ∈ Rectangle (zc c R) (wc c R) → - (Wreg ρ = 0 ↔ ρ ≠ 0 ∧ ρ ≠ 1 ∧ hardyW ρ = 0) := by - intro ρ hρ - constructor - · intro h - have h0 : ρ ≠ 0 := by rintro rfl; rw [Wreg_zero] at h; norm_num at h - have h1 : ρ ≠ 1 := by rintro rfl; rw [Wreg_one] at h; norm_num at h - exact ⟨h0, h1, (Wreg_eq_zero_iff (hreg ρ hρ h0 h1)).mp h⟩ - · rintro ⟨h0, h1, h⟩ - exact (Wreg_eq_zero_iff (hreg ρ hρ h0 h1)).mpr h - refine ⟨Z, ?_, ?_⟩ - · ext ρ - rw [Finset.mem_coe, hZmem, Set.mem_setOf_eq] - constructor - · rintro ⟨hρ, h⟩; exact ⟨hρ, (hchar ρ hρ).mp h⟩ - · rintro ⟨hρ, h⟩; exact ⟨hρ, (hchar ρ hρ).mpr h⟩ - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv hre him hfA (Hfn_analyticOnNhd hk hkc _) - hborder Z (fun s hs => by rw [hZmem]; exact ⟨fun h => ⟨hs, h⟩, fun h => h.2⟩) - (fun ρ hρ => ((hZmem ρ).mp hρ).1) - rw [key] - refine Finset.sum_congr rfl (fun ρ hρ => ?_) - obtain ⟨hρQ, hρ0⟩ := (hZmem ρ).mp hρ - obtain ⟨h0, h1, -⟩ := (hchar ρ hρQ).mp hρ0 - rw [analyticOrderNatAt, analyticOrderNatAt, analyticOrderAt_Wreg (hreg ρ hρQ h0 h1)] - -/-! ### §4. The border identities and linear combination -/ - -omit hk hkc in -/-- on ∂Q: L₂ = ½ (G∘(1−·))′/(G∘(1−·)) − ½ G′/G. -/ -lemma L2_border {s : ℂ} (hs : s ∈ RectangleBorder (zc c R) (wc c R)) : - L2 s = (1 / 2 : ℂ) * logDeriv (fun z => invGammaℝ (1 - z)) s - (1 / 2 : ℂ) * logDeriv invGammaℝ s := by - obtain ⟨h0, h1⟩ := border_ne_zero_one hc1 hc2 hR hs - have hsQ := rectangleBorder_subset_rectangle _ _ hs - have hG0 := Gammaℝ_ne_zero_of_mem hc1 hc2 hR hsQ h0 - have hG1 := Gammaℝ_one_sub_ne_zero_of_mem hc1 hc2 hR hsQ h1 - rw [L2, logDeriv_chiFE_eq hG1 hG0, logDeriv_Gammaℝ_one_sub_eq hG1] - ring - -omit hk hkc in -/-- on ∂Q: Lfn − L₂ = −½ G′/G − ½ (G∘(1−·))′/(G∘(1−·)) + q′/q. -/ -lemma Lminus_border {s : ℂ} (hs : s ∈ RectangleBorder (zc c R) (wc c R)) : - Lfn s - L2 s = -(1 / 2 : ℂ) * logDeriv invGammaℝ s - (1 / 2 : ℂ) * logDeriv (fun z => invGammaℝ (1 - z)) s - + logDeriv mulSubOne s := by - obtain ⟨h0, h1⟩ := border_ne_zero_one hc1 hc2 hR hs - have hsQ := rectangleBorder_subset_rectangle _ _ hs - have hG0 := Gammaℝ_ne_zero_of_mem hc1 hc2 hR hsQ h0 - rw [L2_border hc1 hc2 hR hs, Lfn, logDeriv_Gammaℝ_eq_neg hG0, logDeriv_mulSubOne_eq h0 h1] - ring - -omit hk hkc in -/-- on ∂Q (W ≠ 0 there): L₂ + W′/W = ½ (G∘(1−·))′/… − ½ G′/G + Wreg′/Wreg − p′/p. -/ -lemma FZ_border (hW : ∀ s ∈ RectangleBorder (zc c R) (wc c R), hardyW s ≠ 0) - {s : ℂ} (hs : s ∈ RectangleBorder (zc c R) (wc c R)) : - L2 s + logDeriv hardyW s = (1 / 2 : ℂ) * logDeriv (fun z => invGammaℝ (1 - z)) s - - (1 / 2 : ℂ) * logDeriv invGammaℝ s + logDeriv Wreg s - logDeriv polarPoly s := by - rw [L2_border hc1 hc2 hR hs, logDeriv_Wreg (mem_stripReg_of_border hc1 hc2 hR hs) (hW s hs)] - ring - -omit hc1 hc2 hR in -/-- H·φ is integrable along ∂Q when φ is continuous at every border point. -/ -lemma borderIntegrable_of_continuousOn {φ : ℂ → ℂ} - (hφ : ContinuousOn φ (RectangleBorder (zc c R) (wc c R))) : - RectangleBorderIntegrable (fun s => Hfn k s * φ s) (zc c R) (wc c R) := - ((differentiable_Hfn hk hkc).continuous.continuousOn.mul hφ).rectangleBorder_integrable - -omit hk hkc hc1 hc2 hR in -/-- logDeriv f is continuous on ∂Q when f is analytic and nonzero at every border point. -/ -lemma continuousOn_logDeriv_border {f : ℂ → ℂ} (hf : ∀ s ∈ RectangleBorder (zc c R) (wc c R), AnalyticAt ℂ f s) - (hne : ∀ s ∈ RectangleBorder (zc c R) (wc c R), f s ≠ 0) : - ContinuousOn (logDeriv f) (RectangleBorder (zc c R) (wc c R)) := by - intro s hs - have ha := hf s hs - exact (ha.deriv.continuousAt.div ha.continuousAt (hne s hs)).continuousWithinAt - -omit hk hkc hc1 hc2 hR in -/-- linearity of the normalised rectangle integral in the test integrand (four-term form). -/ -lemma rect'_lincomb {z w : ℂ} {φ₁ φ₂ φ₃ φ₄ : ℂ → ℂ} (a₁ a₂ a₃ a₄ : ℂ) - (h₁ : RectangleBorderIntegrable (fun s => Hfn k s * φ₁ s) z w) - (h₂ : RectangleBorderIntegrable (fun s => Hfn k s * φ₂ s) z w) - (h₃ : RectangleBorderIntegrable (fun s => Hfn k s * φ₃ s) z w) - (h₄ : RectangleBorderIntegrable (fun s => Hfn k s * φ₄ s) z w) : - RectangleIntegral' (fun s => Hfn k s * (a₁ * φ₁ s + a₂ * φ₂ s + a₃ * φ₃ s + a₄ * φ₄ s)) z w - = a₁ * RectangleIntegral' (fun s => Hfn k s * φ₁ s) z w + a₂ * RectangleIntegral' (fun s => Hfn k s * φ₂ s) z w - + a₃ * RectangleIntegral' (fun s => Hfn k s * φ₃ s) z w + a₄ * RectangleIntegral' (fun s => Hfn k s * φ₄ s) z w := by - -- scalar multiples are border-integrable - have hsm : ∀ (a : ℂ) (φ : ℂ → ℂ), RectangleBorderIntegrable (fun s => Hfn k s * φ s) z w → - RectangleBorderIntegrable (fun s => a • (Hfn k s * φ s)) z w := by - intro a φ h - exact ⟨h.1.smul a, h.2.1.smul a, h.2.2.1.smul a, h.2.2.2.smul a⟩ - have e : (fun s => Hfn k s * (a₁ * φ₁ s + a₂ * φ₂ s + a₃ * φ₃ s + a₄ * φ₄ s)) - = (((fun s => a₁ • (Hfn k s * φ₁ s)) + (fun s => a₂ • (Hfn k s * φ₂ s))) - + (fun s => a₃ • (Hfn k s * φ₃ s))) + (fun s => a₄ • (Hfn k s * φ₄ s)) := by - funext s; simp only [Pi.add_apply, smul_eq_mul]; ring - have hadd12 : RectangleBorderIntegrable ((fun s => a₁ • (Hfn k s * φ₁ s)) + (fun s => a₂ • (Hfn k s * φ₂ s))) z w := by - obtain ⟨b1, b2, b3, b4⟩ := hsm a₁ φ₁ h₁; obtain ⟨c1, c2, c3, c4⟩ := hsm a₂ φ₂ h₂ - exact ⟨b1.add c1, b2.add c2, b3.add c3, b4.add c4⟩ - have hadd123 : RectangleBorderIntegrable (((fun s => a₁ • (Hfn k s * φ₁ s)) + (fun s => a₂ • (Hfn k s * φ₂ s))) - + (fun s => a₃ • (Hfn k s * φ₃ s))) z w := by - obtain ⟨b1, b2, b3, b4⟩ := hadd12; obtain ⟨c1, c2, c3, c4⟩ := hsm a₃ φ₃ h₃ - exact ⟨b1.add c1, b2.add c2, b3.add c3, b4.add c4⟩ - rw [e, RectangleIntegral', RectangleBorderIntegrable.add hadd123 (hsm a₄ φ₄ h₄), - RectangleBorderIntegrable.add hadd12 (hsm a₃ φ₃ h₃), RectangleBorderIntegrable.add (hsm a₁ φ₁ h₁) (hsm a₂ φ₂ h₂), - RectangleIntegral.const_smul, RectangleIntegral.const_smul, RectangleIntegral.const_smul, - RectangleIntegral.const_smul] - simp only [RectangleIntegral', smul_eq_mul] - ring - -/-- **(1/2πi)∮ H·(Lfn − L₂) = ½(H(0) + H(1)).** -/ -theorem rect_Lminus : - RectangleIntegral' (fun s => Hfn k s * (Lfn s - L2 s)) (zc c R) (wc c R) = (1 / 2 : ℂ) * (Hfn k 0 + Hfn k 1) := by - have hb0 : ∀ s ∈ RectangleBorder (zc c R) (wc c R), Gammaℝ s ≠ 0 := fun s hs => - Gammaℝ_ne_zero_of_mem hc1 hc2 hR (rectangleBorder_subset_rectangle _ _ hs) (border_ne_zero_one hc1 hc2 hR hs).1 - have hb1 : ∀ s ∈ RectangleBorder (zc c R) (wc c R), Gammaℝ (1 - s) ≠ 0 := fun s hs => - Gammaℝ_one_sub_ne_zero_of_mem hc1 hc2 hR (rectangleBorder_subset_rectangle _ _ hs) (border_ne_zero_one hc1 hc2 hR hs).2 - have hcongr : Set.EqOn (fun s => Hfn k s * (Lfn s - L2 s)) - (fun s => Hfn k s * ((-(1/2:ℂ)) * logDeriv invGammaℝ s + (-(1/2:ℂ)) * logDeriv (fun z => invGammaℝ (1 - z)) s - + (1:ℂ) * logDeriv mulSubOne s + (0:ℂ) * logDeriv mulSubOne s)) (RectangleBorder (zc c R) (wc c R)) := by - intro s hs - simp only - rw [Lminus_border hc1 hc2 hR hs]; ring - have hI1 := borderIntegrable_of_continuousOn hk hkc - (continuousOn_logDeriv_border (fun s _ => analyticAt_invGammaℝ s) (fun s hs => invGammaℝ_ne_zero_iff.mpr (hb0 s hs))) - have hI2 := borderIntegrable_of_continuousOn hk hkc - (continuousOn_logDeriv_border (f := fun z => invGammaℝ (1 - z)) - (fun s _ => (analyticAt_invGammaℝ _).comp (analyticAt_const.sub analyticAt_id)) - (fun s hs => invGammaℝ_ne_zero_iff.mpr (hb1 s hs))) - have hI3 := borderIntegrable_of_continuousOn hk hkc - (continuousOn_logDeriv_border (f := mulSubOne) (fun s _ => differentiable_mulSubOne.analyticAt s) - (fun s hs => by - obtain ⟨h0, h1⟩ := border_ne_zero_one hc1 hc2 hR hs - rw [Ne, mulSubOne_eq_zero_iff]; simp [h0, h1])) - rw [RectangleIntegral'_congr hcongr, rect'_lincomb _ _ _ _ hI1 hI2 hI3 hI3, - rect_invGammaℝ hk hkc hc1 hc2 hR, rect_invGammaℝ_one_sub hk hkc hc1 hc2 hR, rect_mulSubOne hk hkc hc1 hc2 hR] - ring - -/-- **(1/2πi)∮ H·(L₂ + W′/W) = Σ_{W(ρ)=0 in Q, ρ ∉ {0,1}} ord_ρ(W)·H(ρ) − (3/2)(H(0) + H(1))**, if W ≠ 0 on ∂Q. -/ -theorem rect_FZ (hW : ∀ s ∈ RectangleBorder (zc c R) (wc c R), hardyW s ≠ 0) : - ∃ Z : Finset ℂ, ((Z : Set ℂ) = {ρ : ℂ | ρ ∈ Rectangle (zc c R) (wc c R) ∧ ρ ≠ 0 ∧ ρ ≠ 1 ∧ hardyW ρ = 0}) ∧ - RectangleIntegral' (fun s => Hfn k s * (L2 s + logDeriv hardyW s)) (zc c R) (wc c R) - = (∑ ρ ∈ Z, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - (3 / 2 : ℂ) * (Hfn k 0 + Hfn k 1) := by - obtain ⟨Z, hZ, hE⟩ := rect_Wreg hk hkc hc1 hc2 hR hW - refine ⟨Z, hZ, ?_⟩ - have hb0 : ∀ s ∈ RectangleBorder (zc c R) (wc c R), Gammaℝ s ≠ 0 := fun s hs => - Gammaℝ_ne_zero_of_mem hc1 hc2 hR (rectangleBorder_subset_rectangle _ _ hs) (border_ne_zero_one hc1 hc2 hR hs).1 - have hb1 : ∀ s ∈ RectangleBorder (zc c R) (wc c R), Gammaℝ (1 - s) ≠ 0 := fun s hs => - Gammaℝ_one_sub_ne_zero_of_mem hc1 hc2 hR (rectangleBorder_subset_rectangle _ _ hs) (border_ne_zero_one hc1 hc2 hR hs).2 - have hcongr : Set.EqOn (fun s => Hfn k s * (L2 s + logDeriv hardyW s)) - (fun s => Hfn k s * ((1/2:ℂ) * logDeriv (fun z => invGammaℝ (1 - z)) s + (-(1/2:ℂ)) * logDeriv invGammaℝ s - + (1:ℂ) * logDeriv Wreg s + (-1:ℂ) * logDeriv polarPoly s)) (RectangleBorder (zc c R) (wc c R)) := by - intro s hs - simp only - rw [FZ_border hc1 hc2 hR hW hs]; ring - have hI1 := borderIntegrable_of_continuousOn hk hkc - (continuousOn_logDeriv_border (f := fun z => invGammaℝ (1 - z)) - (fun s _ => (analyticAt_invGammaℝ _).comp (analyticAt_const.sub analyticAt_id)) - (fun s hs => invGammaℝ_ne_zero_iff.mpr (hb1 s hs))) - have hI2 := borderIntegrable_of_continuousOn hk hkc - (continuousOn_logDeriv_border (fun s _ => analyticAt_invGammaℝ s) (fun s hs => invGammaℝ_ne_zero_iff.mpr (hb0 s hs))) - have hI3 := borderIntegrable_of_continuousOn hk hkc - (continuousOn_logDeriv_border (f := Wreg) - (fun s hs => Wreg_analyticAt (mem_stripReg_of_border hc1 hc2 hR hs).1 (mem_stripReg_of_border hc1 hc2 hR hs).2.1) - (fun s hs => by - rw [Ne, Wreg_eq_zero_iff (mem_stripReg_of_border hc1 hc2 hR hs)]; exact hW s hs)) - have hI4 := borderIntegrable_of_continuousOn hk hkc - (continuousOn_logDeriv_border (f := polarPoly) (fun s _ => differentiable_polarPoly.analyticAt s) - (fun s hs => by - obtain ⟨h0, h1⟩ := border_ne_zero_one hc1 hc2 hR hs - rw [Ne, polarPoly_eq_zero_iff]; simp [h0, h1])) - rw [RectangleIntegral'_congr hcongr, rect'_lincomb _ _ _ _ hI1 hI2 hI3 hI4, - rect_invGammaℝ hk hkc hc1 hc2 hR, rect_invGammaℝ_one_sub hk hkc hc1 hc2 hR, hE, rect_polarPoly hk hkc hc1 hc2 hR] - ring - -end EFContour -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFExpansion.lean b/zeta23/Zeta23/XiPrime/Hardy/EFExpansion.lean deleted file mode 100644 index 2dfd7f9c0d..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFExpansion.lean +++ /dev/null @@ -1,727 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFExpansion.lean — L₂ on the line Re s = c (9/8 ≤ c ≤ 5/4), the freeze, and the uniform line bounds -for the W explicit formula (template: Zeta23/XiPrime/ExplicitFormula/Expansion.lean §§3–7 with L ↦ L₂, -L⋆ ↦ L₂⋆ := ½log(τ/2π) (real: no phase), 5/4 ↦ c). - - X1 norm_L2_sub_L2star_self_le : ‖L₂(c+it) − L₂⋆(t)‖ ≤ C/t (t ≥ 2) — one-point Stirling: L₂ = ½[Γℝ′/Γℝ(s) + - Γℝ′/Γℝ(1−s)], the second shifted to 3−s (Hardy.logDeriv_Gammaℝ_shift); ψ(w) = log w − 1/(2w) + O(Im w)⁻² at - w₁ = s/2 and w₂ = (3−s)/2, whose logarithms have phases → +π/2, −π/2 that cancel, leaving ½log(t/2) − ½log π. - X2 norm_deriv_L2_le; X3 norm_L2_sub_L2star_le, norm_L2_ge; X4 norm_Afn_le_line, norm_Bfn_le_line; - X5 freeze_on_line_W; X6 frozen_uniform_W; X7 derivE2_div_E2_uniform (+ continuity, conj); X8 the F_𝒵 / E₂ line bounds. --/ -import Zeta23.XiPrime.Hardy.EFBasic -import Zeta23.XiPrime.Hardy.TwoLine - -open Complex Set Filter Topology -open scoped ComplexConjugate ArithmeticFunction - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy - -variable {c : ℝ} - -/-! ## A. the line Re s = c -/ - -theorem re_line (c t : ℝ) : (((c : ℝ) : ℂ) + t * I).re = c := by simp -theorem im_line (c t : ℝ) : (((c : ℝ) : ℂ) + t * I).im = t := by simp - -theorem one_lt_re_line (hc1 : 9/8 ≤ c) (t : ℝ) : 1 < (((c:ℝ):ℂ) + t * I).re := by rw [re_line]; linarith - -theorem mem_goodStrip_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) (t : ℝ) : ((c:ℝ):ℂ) + t * I ∈ GoodStrip := by - refine ⟨?_, ?_⟩ <;> rw [re_line] <;> linarith - -theorem norm_line_ge (c t : ℝ) : |t| ≤ ‖((c:ℝ):ℂ) + t * I‖ := by - have := Complex.abs_im_le_norm (((c:ℝ):ℂ) + t * I); simpa using this - -theorem norm_line_sub_ge (c a t : ℝ) : |t| ≤ ‖((c:ℝ):ℂ) + t * I - (a:ℂ)‖ := by - have := Complex.abs_im_le_norm (((c:ℝ):ℂ) + t * I - (a:ℂ)); simpa using this - -theorem norm_sub_line_ge (c a t : ℝ) : |t| ≤ ‖(a:ℂ) - (((c:ℝ):ℂ) + t * I)‖ := by - rw [norm_sub_rev]; exact norm_line_sub_ge c a t - -theorem conj_line (c t : ℝ) : conj (((c:ℝ):ℂ) + t * I) = ((c:ℝ):ℂ) + (-t:ℝ) * I := by - apply Complex.ext <;> simp - -theorem continuous_line (c : ℝ) : Continuous (fun t : ℝ => ((c:ℝ):ℂ) + t * I) := by fun_prop - -theorem norm_add₃_le' {a b d : ℂ} : ‖a + b + d‖ ≤ ‖a‖ + ‖b‖ + ‖d‖ := - (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) - -/-! ## X4. Uniform bounds for A and B on the line -/ - -theorem norm_Afn_le_line (hc1 : 9/8 ≤ c) : - ∃ A₀ : ℝ, 0 ≤ A₀ ∧ ∀ t : ℝ, ‖Afn (((c:ℝ):ℂ) + t * I)‖ ≤ A₀ := by - obtain ⟨M, hM0, hM⟩ := Zeta23.WeilEF.norm_logDeriv_zeta_le_of_one_lt_re (c := c) (by linarith) - refine ⟨M, hM0, fun t => ?_⟩ - have h := hM t - rw [logDeriv_zeta_eq_neg_Afn (one_lt_re_line hc1 t), norm_neg] at h - exact h - -theorem norm_Bfn_le_line (hc1 : 9/8 ≤ c) : - ∃ B₀ : ℝ, 0 ≤ B₀ ∧ ∀ t : ℝ, ‖Bfn (((c:ℝ):ℂ) + t * I)‖ ≤ B₀ := by - have hc : 1 < ((c:ℝ):ℂ).re := by simp; linarith - have hsum : Summable (fun n : ℕ => ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) ((c:ℝ):ℂ) n‖) := - summable_norm_iff.mpr (summable_Bfn hc) - refine ⟨∑' n : ℕ, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) ((c:ℝ):ℂ) n‖, - tsum_nonneg fun _ => norm_nonneg _, fun t => ?_⟩ - have hnorm : ∀ n : ℕ, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((c:ℝ):ℂ) + t * I) n‖ - = ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) ((c:ℝ):ℂ) n‖ := by - intro n - rw [LSeries.norm_term_eq, LSeries.norm_term_eq, re_line, Complex.ofReal_re] - unfold Bfn LSeries - calc ‖∑' n, LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((c:ℝ):ℂ) + t * I) n‖ - ≤ ∑' n, ‖LSeries.term (fun n => ((Λ n * Real.log n : ℝ) : ℂ)) (((c:ℝ):ℂ) + t * I) n‖ := - norm_tsum_le_tsum_norm (by simp_rw [hnorm]; exact hsum) - _ = _ := by simp_rw [hnorm] - -/-! ## X1. One-point Stirling for L₂ on the line -/ - -section stirling -open Real in -/-- the complex logarithm near the positive imaginary axis, general abscissa 0 < a ≤ 1: -‖log(a + i t/2) − (log(t/2) + iπ/2)‖ ≤ 6/t for t ≥ 2. -/ -theorem norm_log_sub_le_gen {a t : ℝ} (ha0 : 0 < a) (ha1 : a ≤ 1) (ht : 2 ≤ t) : - ‖Complex.log (((a:ℝ):ℂ) + ((t/2:ℝ):ℂ) * I) - - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I)‖ ≤ 6 / t := by - set w : ℂ := ((a:ℝ):ℂ) + ((t/2:ℝ):ℂ) * I with hw - have hwre : w.re = a := by simp [hw] - have hwim : w.im = t/2 := by simp [hw] - have ht0 : 0 < t := by linarith - have ht2 : 0 < t/2 := by linarith - have hnorm_sq : ‖w‖ ^ 2 = a^2 + (t/2)^2 := by - rw [Complex.sq_norm, Complex.normSq_apply, hwre, hwim]; ring - have hnorm_ge : t/2 ≤ ‖w‖ := by - have := Complex.abs_im_le_norm w - rw [hwim, abs_of_pos ht2] at this - exact this - have hnorm_pos : 0 < ‖w‖ := lt_of_lt_of_le ht2 hnorm_ge - have hnorm_le : ‖w‖ ≤ a + t/2 := by - calc ‖w‖ ≤ ‖((a:ℝ):ℂ)‖ + ‖((t/2:ℝ):ℂ) * I‖ := norm_add_le _ _ - _ = a + t/2 := by - rw [norm_mul, Complex.norm_I, mul_one, Complex.norm_real, Complex.norm_real, - Real.norm_eq_abs, Real.norm_eq_abs, abs_of_pos ha0, abs_of_pos ht2] - -- the difference, componentwise - have hre : (Complex.log w - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I)).re - = Real.log ‖w‖ - Real.log (t/2) := by - simp [Complex.log_re] - have him : (Complex.log w - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I)).im - = Complex.arg w - Real.pi/2 := by - simp [Complex.log_im] - -- real part: 0 ≤ log‖w‖ − log(t/2) ≤ 2a/t ≤ 2/t - have hre_bd : |Real.log ‖w‖ - Real.log (t/2)| ≤ 2 / t := by - have h1 : 0 ≤ Real.log ‖w‖ - Real.log (t/2) := by - have := Real.log_le_log ht2 hnorm_ge - linarith - rw [abs_of_nonneg h1, ← Real.log_div hnorm_pos.ne' ht2.ne'] - have h2 : Real.log (‖w‖ / (t/2)) ≤ ‖w‖ / (t/2) - 1 := Real.log_le_sub_one_of_pos (by positivity) - have h3 : ‖w‖ / (t/2) - 1 ≤ 2 / t := by - have : ‖w‖ / (t/2) ≤ (a + t/2) / (t/2) := div_le_div_of_nonneg_right hnorm_le ht2.le - have e : (a + t/2) / (t/2) = 2 * a / t + 1 := by field_simp - have e2 : 2 * a / t ≤ 2 / t := by rw [div_le_div_iff₀ ht0 ht0]; nlinarith - linarith - exact h2.trans h3 - -- imaginary part: 0 ≤ π/2 − arg w ≤ 4a/t ≤ 4/t - have him_bd : |Complex.arg w - Real.pi/2| ≤ 4 / t := by - have harg : Complex.arg w = Real.arcsin (w.im / ‖w‖) := - Complex.arg_of_re_nonneg (by rw [hwre]; exact ha0.le) - set u : ℝ := w.im / ‖w‖ with hu - have hu0 : 0 ≤ u := by rw [hu, hwim]; positivity - have hu1 : u ≤ 1 := by - rw [hu, div_le_one hnorm_pos, hwim]; exact hnorm_ge - set v : ℝ := Real.pi/2 - Real.arcsin u with hv - have hv0 : 0 ≤ v := by - have := Real.arcsin_le_pi_div_two u - rw [hv]; linarith - have hv1 : v ≤ Real.pi/2 := by - have : 0 ≤ Real.arcsin u := Real.arcsin_nonneg.mpr hu0 - rw [hv]; linarith - have hsinv : Real.sin v = Real.sqrt (1 - u ^ 2) := by - rw [hv, ← Real.arccos_eq_pi_div_two_sub_arcsin, Real.sin_arccos] - have hsqrt : Real.sqrt (1 - u ^ 2) = a / ‖w‖ := by - have e : 1 - u ^ 2 = (a / ‖w‖) ^ 2 := by - rw [hu, hwim, div_pow, div_pow] - field_simp - nlinarith [hnorm_sq] - rw [e, Real.sqrt_sq (by positivity)] - have hjordan : 2 / Real.pi * v ≤ Real.sin v := Real.mul_le_sin hv0 hv1 - have hvle : v ≤ Real.pi / 2 * (a / ‖w‖) := by - rw [hsinv, hsqrt] at hjordan - have hπ := Real.pi_pos - have : v = Real.pi / 2 * (2 / Real.pi * v) := by field_simp - rw [this] - exact mul_le_mul_of_nonneg_left hjordan (by positivity) - have hfin : Real.pi / 2 * (a / ‖w‖) ≤ 4 / t := by - have hπ4 : Real.pi ≤ 4 := Real.pi_le_four - have h1 : a / ‖w‖ ≤ a / (t/2) := div_le_div_of_nonneg_left ha0.le ht2 hnorm_ge - calc Real.pi / 2 * (a / ‖w‖) ≤ 4 / 2 * (a / (t/2)) := by - exact mul_le_mul (by linarith) h1 (by positivity) (by norm_num) - _ = 4 * a / t := by field_simp - _ ≤ 4 / t := by rw [div_le_div_iff₀ ht0 ht0]; nlinarith - rw [harg, show Real.arcsin u - Real.pi / 2 = -v by rw [hv]; ring, abs_neg, abs_of_nonneg hv0] - exact hvle.trans hfin - -- combine - calc ‖Complex.log w - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I)‖ - ≤ |(Complex.log w - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I)).re| - + |(Complex.log w - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I)).im| := - Complex.norm_le_abs_re_add_abs_im _ - _ ≤ 2 / t + 4 / t := by rw [hre, him]; exact add_le_add hre_bd him_bd - _ = 6 / t := by ring - - -/-- the twin near the NEGATIVE imaginary axis: ‖log(a − i t/2) − (log(t/2) − iπ/2)‖ ≤ 6/t. -/ -theorem norm_log_sub_le_gen_neg {a t : ℝ} (ha0 : 0 < a) (ha1 : a ≤ 1) (ht : 2 ≤ t) : - ‖Complex.log (((a:ℝ):ℂ) - ((t/2:ℝ):ℂ) * I) - - (((Real.log (t/2) : ℝ) : ℂ) - ((Real.pi/2 : ℝ) : ℂ) * I)‖ ≤ 6 / t := by - have h := norm_log_sub_le_gen ha0 ha1 ht - set z : ℂ := ((a:ℝ):ℂ) + ((t/2:ℝ):ℂ) * I with hz - have harg : z.arg ≠ Real.pi := by - have : 0 ≤ z.re := by simp [hz]; exact ha0.le - have h1 := Complex.arg_le_pi_div_two_iff.mpr (Or.inl this) - intro h2; rw [h2] at h1; linarith [Real.pi_pos] - have hconj : conj z = ((a:ℝ):ℂ) - ((t/2:ℝ):ℂ) * I := by - rw [hz, map_add, map_mul, Complex.conj_ofReal, Complex.conj_ofReal, Complex.conj_I]; ring - have hlog : Complex.log (conj z) = conj (Complex.log z) := by - rw [Complex.log_conj_eq_ite, if_neg harg] - rw [← hconj, hlog] - have e : (((Real.log (t/2) : ℝ) : ℂ) - ((Real.pi/2 : ℝ) : ℂ) * I) - = conj (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I) := by - rw [map_add, map_mul, Complex.conj_ofReal, Complex.conj_ofReal, Complex.conj_I]; ring - rw [e, ← map_sub, Complex.norm_conj] - exact h - -/-- the explicit form of L₂ on Re s ∈ (1, 3/2), off the real axis: -L₂(s) = −log π/2 + ¼ψ(s/2) + ¼ψ((3−s)/2) − 1/(2(1−s)). -/ -theorem L2_eq_digamma_shift {s : ℂ} (hs : s ∈ GoodStrip) (him : s.im ≠ 0) : - L2 s = -(Real.log Real.pi : ℂ) / 2 + (1/4 : ℂ) * Complex.digamma (s / 2) - + (1/4 : ℂ) * Complex.digamma ((3 - s) / 2) - (1/2 : ℂ) / (1 - s) := by - have hu : (1 - s).im ≠ 0 := im_one_sub_ne_zero him - rw [L2_eq him, logDeriv_Gammaℝ_shift hu, show (1:ℂ) - s + 2 = 3 - s by ring, - Zeta23.RvM.logDeriv_Gammaℝ (by exact lt_trans zero_lt_one hs.1), - Zeta23.RvM.logDeriv_Gammaℝ (by simp; linarith [hs.2])] - ring - -/-- **X1. one-point Stirling for L₂**: ‖L₂(c+it) − L₂⋆(t)‖ ≤ 12/t for t ≥ 2 (L₂⋆(t) = ½log(t/2π), real). -/ -theorem norm_L2_sub_L2star_self_le' (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) {t : ℝ} (ht : 2 ≤ t) : - ‖L2 (((c:ℝ):ℂ) + t * I) - ((L2star t : ℝ) : ℂ)‖ ≤ 12 / t := by - have ht0 : 0 < t := by linarith - set s : ℂ := ((c:ℝ):ℂ) + t * I with hs - have hsG : s ∈ GoodStrip := mem_goodStrip_line hc1 hc2 t - have hsim : s.im ≠ 0 := by rw [hs, im_line]; exact ht0.ne' - -- the two Stirling points - set w₁ : ℂ := (((c/2:ℝ)):ℂ) + ((t/2:ℝ):ℂ) * I with hw₁ - set w₂ : ℂ := ((((3-c)/2:ℝ)):ℂ) - ((t/2:ℝ):ℂ) * I with hw₂ - have hsw₁ : s / 2 = w₁ := by simp [hs, hw₁]; ring - have hsw₂ : (3 - s) / 2 = w₂ := by simp [hs, hw₂]; ring - have hw₁re : 0 < w₁.re := by simp [hw₁]; linarith - have hw₂re : 0 < w₂.re := by simp [hw₂]; linarith - have hw₁im : w₁.im = t/2 := by simp [hw₁] - have hw₂im : w₂.im = -(t/2) := by simp [hw₂] - have hw₁im' : 1/2 ≤ |w₁.im| := by rw [hw₁im, abs_of_pos (by linarith)]; linarith - have hw₂im' : 1/2 ≤ |w₂.im| := by rw [hw₂im, abs_neg, abs_of_pos (by linarith)]; linarith - have hst₁ : ‖Complex.digamma w₁ - Complex.log w₁ + (1/2 : ℂ) / w₁‖ ≤ 6 / t := by - refine (Zeta23.StirlingVert.digamma_stirling hw₁re hw₁im').trans ?_ - rw [hw₁im, div_le_div_iff₀ (by positivity) ht0]; nlinarith - have hst₂ : ‖Complex.digamma w₂ - Complex.log w₂ + (1/2 : ℂ) / w₂‖ ≤ 6 / t := by - refine (Zeta23.StirlingVert.digamma_stirling hw₂re hw₂im').trans ?_ - rw [hw₂im, neg_sq, div_le_div_iff₀ (by positivity) ht0]; nlinarith - have hlog₁ := norm_log_sub_le_gen (a := c/2) (by linarith) (by linarith) ht - have hlog₂ := norm_log_sub_le_gen_neg (a := (3-c)/2) (by linarith) (by linarith) ht - -- reciprocals are O(1/t) - have hw₁inv : ‖w₁⁻¹‖ ≤ (t/2)⁻¹ := by - rw [norm_inv]; refine inv_anti₀ (by positivity) ?_ - have := Complex.abs_im_le_norm w₁; rwa [hw₁im, abs_of_pos (by positivity)] at this - have hw₂inv : ‖w₂⁻¹‖ ≤ (t/2)⁻¹ := by - rw [norm_inv]; refine inv_anti₀ (by positivity) ?_ - have := Complex.abs_im_le_norm w₂; rwa [hw₂im, abs_neg, abs_of_pos (by positivity)] at this - have hsinv : ‖(1 - s)⁻¹‖ ≤ t⁻¹ := by - rw [norm_inv]; refine inv_anti₀ ht0 ?_ - have := Complex.abs_im_le_norm (1 - s) - rw [hs] at this; simp at this; rwa [abs_of_pos ht0] at this - -- the decomposition - have hL : L2 s = -(Real.log Real.pi : ℂ) / 2 + (1/4 : ℂ) * Complex.digamma w₁ - + (1/4 : ℂ) * Complex.digamma w₂ - (1/2 : ℂ) / (1 - s) := by - rw [L2_eq_digamma_shift hsG hsim, hsw₁, hsw₂] - have hstar : ((L2star t : ℝ) : ℂ) - = (1/4 : ℂ) * ((((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I) - + (((Real.log (t/2) : ℝ) : ℂ) - ((Real.pi/2 : ℝ) : ℂ) * I)) - - (Real.log Real.pi : ℂ) / 2 := by - unfold L2star - have e1 : Real.log (t / (2 * Real.pi)) = Real.log (t/2) - Real.log Real.pi := by - rw [show t / (2 * Real.pi) = (t/2) / Real.pi by ring, Real.log_div (by positivity) Real.pi_pos.ne'] - rw [e1]; push_cast; ring - have key : L2 s - ((L2star t : ℝ) : ℂ) - = (1/4 : ℂ) * (Complex.digamma w₁ - Complex.log w₁ + (1/2 : ℂ) / w₁) - + (1/4 : ℂ) * (Complex.digamma w₂ - Complex.log w₂ + (1/2 : ℂ) / w₂) - + ((1/4 : ℂ) * (Complex.log w₁ - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I)) - + (1/4 : ℂ) * (Complex.log w₂ - (((Real.log (t/2) : ℝ) : ℂ) - ((Real.pi/2 : ℝ) : ℂ) * I)) - + (-(1/8 : ℂ) * w₁⁻¹ - (1/8 : ℂ) * w₂⁻¹ - (1/2 : ℂ) * (1 - s)⁻¹)) := by - rw [hL, hstar]; simp only [div_eq_mul_inv]; ring - rw [key] - have n14 : ‖(1/4 : ℂ)‖ = 1/4 := by norm_num - have n18 : ‖(1/8 : ℂ)‖ = 1/8 := by norm_num - have n12 : ‖(1/2 : ℂ)‖ = 1/2 := by norm_num - have hrest : ‖-(1/8 : ℂ) * w₁⁻¹ - (1/8 : ℂ) * w₂⁻¹ - (1/2 : ℂ) * (1 - s)⁻¹‖ - ≤ (1/8) * (t/2)⁻¹ + (1/8) * (t/2)⁻¹ + (1/2) * t⁻¹ := by - calc ‖-(1/8 : ℂ) * w₁⁻¹ - (1/8 : ℂ) * w₂⁻¹ - (1/2 : ℂ) * (1 - s)⁻¹‖ - ≤ ‖-(1/8 : ℂ) * w₁⁻¹‖ + ‖(1/8 : ℂ) * w₂⁻¹‖ + ‖(1/2 : ℂ) * (1 - s)⁻¹‖ := norm_sub₃_le' - _ ≤ (1/8) * (t/2)⁻¹ + (1/8) * (t/2)⁻¹ + (1/2) * t⁻¹ := by - rw [norm_mul, norm_neg, n18, norm_mul, n18, norm_mul, n12] - gcongr - calc ‖(1/4 : ℂ) * (Complex.digamma w₁ - Complex.log w₁ + (1/2 : ℂ) / w₁) - + (1/4 : ℂ) * (Complex.digamma w₂ - Complex.log w₂ + (1/2 : ℂ) / w₂) - + ((1/4 : ℂ) * (Complex.log w₁ - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I)) - + (1/4 : ℂ) * (Complex.log w₂ - (((Real.log (t/2) : ℝ) : ℂ) - ((Real.pi/2 : ℝ) : ℂ) * I)) - + (-(1/8 : ℂ) * w₁⁻¹ - (1/8 : ℂ) * w₂⁻¹ - (1/2 : ℂ) * (1 - s)⁻¹))‖ - ≤ ‖(1/4 : ℂ) * (Complex.digamma w₁ - Complex.log w₁ + (1/2 : ℂ) / w₁)‖ - + ‖(1/4 : ℂ) * (Complex.digamma w₂ - Complex.log w₂ + (1/2 : ℂ) / w₂)‖ - + (‖(1/4 : ℂ) * (Complex.log w₁ - (((Real.log (t/2) : ℝ) : ℂ) + ((Real.pi/2 : ℝ) : ℂ) * I))‖ - + ‖(1/4 : ℂ) * (Complex.log w₂ - (((Real.log (t/2) : ℝ) : ℂ) - ((Real.pi/2 : ℝ) : ℂ) * I))‖ - + ‖-(1/8 : ℂ) * w₁⁻¹ - (1/8 : ℂ) * w₂⁻¹ - (1/2 : ℂ) * (1 - s)⁻¹‖) := - norm_add₃_le'.trans (add_le_add le_rfl norm_add₃_le') - _ ≤ (1/4) * (6/t) + (1/4) * (6/t) + ((1/4) * (6/t) + (1/4) * (6/t) - + ((1/8) * (t/2)⁻¹ + (1/8) * (t/2)⁻¹ + (1/2) * t⁻¹)) := by - rw [norm_mul, norm_mul, norm_mul, norm_mul, n14] - gcongr - _ = 7 / t := by field_simp; ring - _ ≤ 12 / t := by rw [div_le_div_iff₀ ht0 ht0]; nlinarith - -/-- X1 in ∃-form: ‖L₂(c+it) − L₂⋆(t)‖ ≤ C/t for t ≥ 2. -/ -theorem norm_L2_sub_L2star_self_le (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - ∃ C : ℝ, ∀ t : ℝ, 2 ≤ t → ‖L2 (((c:ℝ):ℂ) + t * I) - ((L2star t : ℝ) : ℂ)‖ ≤ C / t := - ⟨12, fun _ ht => norm_L2_sub_L2star_self_le' hc1 hc2 ht⟩ - -end stirling - -/-! ## X2. L₂′ on the line -/ - -section derivL2 - -/-- the explicit digamma form of L₂ (right side of L2_eq_digamma_shift), for differentiation. -/ -def L2D (s : ℂ) : ℂ := - -(Real.log Real.pi : ℂ) / 2 + (1/4 : ℂ) * Complex.digamma (s / 2) - + (1/4 : ℂ) * Complex.digamma ((3 - s) / 2) - (1/2 : ℂ) / (1 - s) - -theorem isOpen_goodStrip_off : IsOpen (GoodStrip ∩ {s : ℂ | s.im ≠ 0}) := isOpen_goodStrip.inter isOpen_im_ne_zero - -theorem L2_eventuallyEq_L2D {s : ℂ} (hs : s ∈ GoodStrip) (him : s.im ≠ 0) : L2 =ᶠ[𝓝 s] L2D := by - filter_upwards [isOpen_goodStrip_off.mem_nhds ⟨hs, him⟩] with z hz - exact L2_eq_digamma_shift hz.1 hz.2 - -theorem hasDerivAt_L2D {s : ℂ} (hs1 : s ≠ 1) (hsi : (s / 2).im ≠ 0) (hsi' : ((3 - s) / 2).im ≠ 0) : - HasDerivAt L2D ((1/8 : ℂ) * deriv Complex.digamma (s / 2) - (1/8 : ℂ) * deriv Complex.digamma ((3 - s) / 2) - - (1/2 : ℂ) * ((1 - s) ^ 2)⁻¹) s := by - have hmem := mem_integerComplement_of_im_ne_zero hsi - have hmem' := mem_integerComplement_of_im_ne_zero hsi' - have hψ : HasDerivAt (fun z => Complex.digamma (z / 2)) (deriv Complex.digamma (s / 2) * (1 / 2)) s := by - have h1 := (Zeta23.Stirling.differentiableAt_digamma hmem).hasDerivAt - have h2 : HasDerivAt (fun z : ℂ => z / 2) (1 / 2) s := by - simpa using (hasDerivAt_id s).div_const (2:ℂ) - exact h1.comp s h2 - have hψ' : HasDerivAt (fun z => Complex.digamma ((3 - z) / 2)) (deriv Complex.digamma ((3 - s) / 2) * (-(1 / 2))) s := by - have h1 := (Zeta23.Stirling.differentiableAt_digamma hmem').hasDerivAt - have h2 : HasDerivAt (fun z : ℂ => (3 - z) / 2) (-(1 / 2)) s := by - have := ((hasDerivAt_const s (3:ℂ)).fun_sub (hasDerivAt_id s)).div_const (2:ℂ) - exact this.congr_deriv (by ring) - exact h1.comp s h2 - have hinv1 : HasDerivAt (fun z : ℂ => (1/2 : ℂ) / (1 - z)) ((1/2 : ℂ) * ((1 - s) ^ 2)⁻¹) s := by - have hne : (1 - s) ≠ 0 := sub_ne_zero.mpr (Ne.symm hs1) - have h := (hasDerivAt_inv hne).comp s ((hasDerivAt_const s (1:ℂ)).fun_sub (hasDerivAt_id s)) - have h' : HasDerivAt (fun z : ℂ => (1 - z)⁻¹) (((1 - s) ^ 2)⁻¹) s := by - refine h.congr_deriv ?_; simp - have := h'.const_mul (1/2 : ℂ) - simpa [div_eq_mul_inv] using this - have := (((hasDerivAt_const s (-(Real.log Real.pi : ℂ) / 2)).add (hψ.const_mul (1/4 : ℂ))).add - (hψ'.const_mul (1/4 : ℂ))).sub hinv1 - exact this.congr_deriv (by ring) - -theorem deriv_L2_eq {s : ℂ} (hs : s ∈ GoodStrip) (hsi : s.im ≠ 0) : - deriv L2 s = (1/8 : ℂ) * deriv Complex.digamma (s / 2) - (1/8 : ℂ) * deriv Complex.digamma ((3 - s) / 2) - - (1/2 : ℂ) * ((1 - s) ^ 2)⁻¹ := by - have hs1 : s ≠ 1 := goodStrip_ne_one hs - have hsi2 : (s / 2).im ≠ 0 := by rw [Complex.div_ofNat_im]; exact div_ne_zero hsi two_ne_zero - have hsi3 : ((3 - s) / 2).im ≠ 0 := by - rw [Complex.div_ofNat_im]; refine div_ne_zero ?_ two_ne_zero; simpa using hsi - rw [(L2_eventuallyEq_L2D hs hsi).deriv_eq] - exact (hasDerivAt_L2D hs1 hsi2 hsi3).deriv - -/-- **X2. L₂′ on the line**: ‖L₂′(c+it)‖ ≤ 4/|t| for |t| ≥ 2. -/ -theorem norm_deriv_L2_le' (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) {t : ℝ} (ht : 2 ≤ |t|) : - ‖deriv L2 (((c:ℝ):ℂ) + t * I)‖ ≤ 4 / |t| := by - set s : ℂ := ((c:ℝ):ℂ) + t * I with hs - have ht0 : 0 < |t| := by linarith - have htne : t ≠ 0 := abs_pos.mp ht0 - have hsim : s.im = t := by simp [hs] - rw [deriv_L2_eq (mem_goodStrip_line hc1 hc2 t) (by rwa [hsim])] - -- the two trigamma terms - have hw₁ : 0 < (s / 2).re := by rw [Complex.div_ofNat_re, hs, re_line]; linarith - have hw₁im : (s / 2).im = t / 2 := by rw [Complex.div_ofNat_im, hsim] - have hw₁i : 1/2 ≤ |(s / 2).im| := by rw [hw₁im, abs_div, abs_two]; linarith - have hw₂ : 0 < ((3 - s) / 2).re := by rw [Complex.div_ofNat_re]; simp [hs]; linarith - have hw₂im : ((3 - s) / 2).im = -(t / 2) := by rw [Complex.div_ofNat_im]; simp [hs]; ring - have hw₂i : 1/2 ≤ |((3 - s) / 2).im| := by rw [hw₂im, abs_neg, abs_div, abs_two]; linarith - have hψ₁ := norm_deriv_digamma_le hw₁ hw₁i - have hψ₂ := norm_deriv_digamma_le hw₂ hw₂i - rw [hw₁im, abs_div, abs_two] at hψ₁ - rw [hw₂im, neg_sq, abs_neg, abs_div, abs_two] at hψ₂ - have hinv : ‖((1 - s) ^ 2)⁻¹‖ ≤ (|t| ^ 2)⁻¹ := by - rw [norm_inv, norm_pow] - refine inv_anti₀ (by positivity) (pow_le_pow_left₀ (abs_nonneg t) ?_ 2) - have := Complex.abs_im_le_norm (1 - s); rw [hs] at this; simpa using this - have htt : t ^ 2 = |t| ^ 2 := (sq_abs t).symm - have n18 : ‖(1/8 : ℂ)‖ = 1/8 := by norm_num - have n12 : ‖(1/2 : ℂ)‖ = 1/2 := by norm_num - calc ‖(1/8 : ℂ) * deriv Complex.digamma (s / 2) - (1/8 : ℂ) * deriv Complex.digamma ((3 - s) / 2) - - (1/2 : ℂ) * ((1 - s) ^ 2)⁻¹‖ - ≤ ‖(1/8 : ℂ) * deriv Complex.digamma (s / 2)‖ + ‖(1/8 : ℂ) * deriv Complex.digamma ((3 - s) / 2)‖ - + ‖(1/2 : ℂ) * ((1 - s) ^ 2)⁻¹‖ := norm_sub₃_le' - _ ≤ (1/8) * (1 / (t/2) ^ 2 + 2 / (|t| / 2)) + (1/8) * (1 / (t/2) ^ 2 + 2 / (|t| / 2)) - + (1/2) * (|t| ^ 2)⁻¹ := by - rw [norm_mul, norm_mul, norm_mul, n18, n12] - gcongr - _ = 3 / (2 * |t| ^ 2) + 1 / |t| := by - have e : (t / 2) ^ 2 = |t| ^ 2 / 4 := by rw [div_pow, htt]; norm_num - rw [e]; field_simp; ring - _ ≤ 4 / |t| := by - rw [div_add_div _ _ (by positivity) ht0.ne', div_le_div_iff₀ (by positivity) ht0] - nlinarith - -theorem norm_deriv_L2_le (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - ∃ C : ℝ, ∀ t : ℝ, 2 ≤ |t| → ‖deriv L2 (((c:ℝ):ℂ) + t * I)‖ ≤ C / |t| := - ⟨4, fun _ ht => norm_deriv_L2_le' hc1 hc2 ht⟩ - -end derivL2 - -/-! ## X3. L₂ against a frozen L₂⋆(τ), and the lower bound for ‖L₂‖ -/ - -section frozen - -/-- ‖L₂⋆(t) − L₂⋆(τ)‖ = ½|log t − log τ| ≤ |t−τ|/(2 min t τ). -/ -theorem norm_L2star_sub_L2star_le {t τ : ℝ} (ht : 0 < t) (hτ : 0 < τ) : - ‖((L2star t : ℝ) : ℂ) - ((L2star τ : ℝ) : ℂ)‖ ≤ |t - τ| / (2 * min t τ) := by - have e : ((L2star t : ℝ) : ℂ) - ((L2star τ : ℝ) : ℂ) = (((Real.log t - Real.log τ) / 2 : ℝ) : ℂ) := by - rw [← Complex.ofReal_sub]; congr 1 - unfold L2star - rw [Real.log_div ht.ne' (by positivity), Real.log_div hτ.ne' (by positivity)]; ring - rw [e, Complex.norm_real, Real.norm_eq_abs, abs_div, abs_two] - have := abs_log_sub_log_le ht hτ - have hm : 0 < min t τ := lt_min ht hτ - rw [div_le_div_iff₀ two_pos (by positivity)] - calc |Real.log t - Real.log τ| * (2 * min t τ) = 2 * (|Real.log t - Real.log τ| * min t τ) := by ring - _ ≤ 2 * |t - τ| := by - have := (le_div_iff₀ hm).mp this - linarith - _ = |t - τ| * 2 := by ring - -/-- **X3a. L₂ against a frozen L₂⋆(τ)**: ‖L₂(c+it) − L₂⋆(τ)‖ ≤ (|t−τ| + 24)/(2 min t τ) for t, τ ≥ 2. -/ -theorem norm_L2_sub_L2star_le' (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) {t τ : ℝ} (ht : 2 ≤ t) (hτ : 2 ≤ τ) : - ‖L2 (((c:ℝ):ℂ) + t * I) - ((L2star τ : ℝ) : ℂ)‖ ≤ (|t - τ| + 24) / (2 * min t τ) := by - have ht0 : 0 < t := by linarith - have hτ0 : 0 < τ := by linarith - have hm : 0 < min t τ := lt_min ht0 hτ0 - have h1 := norm_L2_sub_L2star_self_le' hc1 hc2 ht - have h2 := norm_L2star_sub_L2star_le ht0 hτ0 - calc ‖L2 (((c:ℝ):ℂ) + t * I) - ((L2star τ : ℝ) : ℂ)‖ - ≤ ‖L2 (((c:ℝ):ℂ) + t * I) - ((L2star t : ℝ) : ℂ)‖ + ‖((L2star t : ℝ) : ℂ) - ((L2star τ : ℝ) : ℂ)‖ := - norm_sub_le_norm_sub_add_norm_sub _ _ _ - _ ≤ 12 / t + |t - τ| / (2 * min t τ) := add_le_add h1 h2 - _ ≤ 24 / (2 * min t τ) + |t - τ| / (2 * min t τ) := by - have : 12 / t ≤ 24 / (2 * min t τ) := by - rw [div_le_div_iff₀ ht0 (by positivity)] - nlinarith [min_le_left t τ] - linarith - _ = (|t - τ| + 24) / (2 * min t τ) := by ring - -theorem norm_L2_sub_L2star_le (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - ∃ C : ℝ, ∀ t τ : ℝ, 2 ≤ t → 2 ≤ τ → - ‖L2 (((c:ℝ):ℂ) + t * I) - ((L2star τ : ℝ) : ℂ)‖ ≤ C * (|t - τ| + 1) / min t τ := by - refine ⟨12, fun t τ ht hτ => (norm_L2_sub_L2star_le' hc1 hc2 ht hτ).trans ?_⟩ - have hm : 0 < min t τ := lt_min (by linarith) (by linarith) - rw [div_le_div_iff₀ (by positivity) hm] - nlinarith [abs_nonneg (t - τ)] - -theorem log_two_pi_le_two' : Real.log (2 * Real.pi) ≤ 2 := log_two_pi_le_two - -/-- ‖L₂⋆(τ)‖ ≥ ½log τ − 1 for τ > 0. -/ -theorem norm_L2star_ge {τ : ℝ} (hτ : 0 < τ) : Real.log τ / 2 - 1 ≤ ‖((L2star τ : ℝ) : ℂ)‖ := by - rw [Complex.norm_real, Real.norm_eq_abs] - unfold L2star - rw [Real.log_div hτ.ne' (by positivity)] - have := le_abs_self ((Real.log τ - Real.log (2 * Real.pi)) / 2) - linarith [log_two_pi_le_two] - -/-- ‖L₂(c+it)‖ ≥ ½log t − 7 for t ≥ 2. -/ -theorem norm_L2_ge_pos (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) {t : ℝ} (ht : 2 ≤ t) : - Real.log t / 2 - 7 ≤ ‖L2 (((c:ℝ):ℂ) + t * I)‖ := by - have ht0 : 0 < t := by linarith - have h1 := norm_L2_sub_L2star_self_le' hc1 hc2 ht - have h2 := norm_L2star_ge ht0 - have h3 := norm_sub_norm_le (((L2star t : ℝ) : ℂ)) (L2 (((c:ℝ):ℂ) + t * I)) - rw [norm_sub_rev] at h3 - have h12 : 12 / t ≤ 6 := by rw [div_le_iff₀ ht0]; linarith - linarith - -/-- **X3b.** ‖L₂(c+it)‖ ≥ ½log|t| − 7 for |t| ≥ 2 (t < 0 by conjugation). -/ -theorem norm_L2_ge' (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) {t : ℝ} (ht : 2 ≤ |t|) : - Real.log |t| / 2 - 7 ≤ ‖L2 (((c:ℝ):ℂ) + t * I)‖ := by - rcases le_or_gt 0 t with h | h - · rw [abs_of_nonneg h] at ht ⊢; exact norm_L2_ge_pos hc1 hc2 ht - · have ht' : 2 ≤ -t := by rwa [abs_of_neg h] at ht - have him : (((c:ℝ):ℂ) + (-t:ℝ) * I).im ≠ 0 := by rw [im_line]; linarith - have e : ((c:ℝ):ℂ) + t * I = conj (((c:ℝ):ℂ) + (-t:ℝ) * I) := by - rw [conj_line]; simp - rw [e, L2_conj him, Complex.norm_conj, abs_of_neg h] - exact norm_L2_ge_pos hc1 hc2 ht' - -theorem norm_L2_ge (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - ∃ C : ℝ, ∀ t : ℝ, 2 ≤ |t| → Real.log |t| / 2 - C ≤ ‖L2 (((c:ℝ):ℂ) + t * I)‖ := - ⟨7, fun _ ht => norm_L2_ge' hc1 hc2 ht⟩ - -end frozen - -/-! ## The archimedean line data for W: (c, L₂, L₂⋆) — instance of ExplicitFormula/Expansion §G -/ - -/-- ‖L₂(c+it)‖ ≤ M·log(2+|t|) for all real t. -/ -theorem norm_L2_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - ∃ M : ℝ, 0 ≤ M ∧ ∀ t : ℝ, ‖L2 (((c:ℝ):ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|) := by - -- compact middle - have hcont : Continuous (fun t : ℝ => L2 (((c:ℝ):ℂ) + t * I)) := by - refine continuous_iff_continuousAt.mpr fun t => ?_ - exact ((L2_analyticAt_goodStrip (mem_goodStrip_line hc1 hc2 t)).continuousAt).comp_of_eq - (continuous_line c).continuousAt rfl - obtain ⟨M₀, hM₀⟩ := (isCompact_Icc (a := -(2:ℝ)) (b := 2)).exists_bound_of_continuousOn hcont.continuousOn - have hlog2 : (1:ℝ) / 2 ≤ Real.log 2 := by linarith [Real.log_two_gt_d9] - have hlogpos : ∀ t : ℝ, Real.log 2 ≤ Real.log (2 + |t|) := fun t => - Real.log_le_log two_pos (by linarith [abs_nonneg t]) - refine ⟨max (2 * |M₀|) 16, by positivity, fun t => ?_⟩ - have hL2 : 0 < Real.log (2 + |t|) := lt_of_lt_of_le (by linarith) (hlogpos t) - rcases le_or_gt |t| 2 with h | h - · have := hM₀ t (abs_le.mp h) - calc ‖L2 (((c:ℝ):ℂ) + t * I)‖ ≤ |M₀| := this.trans (le_abs_self _) - _ ≤ (2 * |M₀|) * Real.log 2 := by nlinarith [abs_nonneg M₀] - _ ≤ max (2 * |M₀|) 16 * Real.log (2 + |t|) := - mul_le_mul (le_max_left _ _) (hlogpos t) (by positivity) (by positivity) - · -- |t| ≥ 2: ‖L₂‖ ≤ ‖L₂⋆‖ + 12/|t| ≤ log|t|/2 + 1 + 6 - have ht2 : 2 ≤ |t| := h.le - have key : ‖L2 (((c:ℝ):ℂ) + t * I)‖ ≤ Real.log |t| / 2 + 7 := by - have hmain : ∀ u : ℝ, 2 ≤ u → ‖L2 (((c:ℝ):ℂ) + u * I)‖ ≤ Real.log u / 2 + 7 := by - intro u hu - have hu0 : 0 < u := by linarith - have h1 := norm_L2_sub_L2star_self_le' hc1 hc2 hu - have h12 : 12 / u ≤ 6 := by rw [div_le_iff₀ hu0]; linarith - have hstar : ‖((L2star u : ℝ) : ℂ)‖ ≤ Real.log u / 2 + 1 := by - rw [Complex.norm_real, Real.norm_eq_abs] - unfold L2star - rw [Real.log_div hu0.ne' (by positivity), abs_le] - have hlu : 0 ≤ Real.log u := Real.log_nonneg (by linarith) - have h2π : 0 ≤ Real.log (2 * Real.pi) := Real.log_nonneg (by linarith [Real.pi_gt_three]) - constructor <;> nlinarith [log_two_pi_le_two] - have := norm_le_norm_add_norm_sub' (L2 (((c:ℝ):ℂ) + u * I)) ((L2star u : ℝ) : ℂ) - have h3 : ‖L2 (((c:ℝ):ℂ) + u * I)‖ ≤ ‖((L2star u : ℝ) : ℂ)‖ + ‖L2 (((c:ℝ):ℂ) + u * I) - ((L2star u : ℝ) : ℂ)‖ := - norm_le_insert' _ _ - linarith - rcases le_or_gt 0 t with hpos | hneg - · rw [abs_of_nonneg hpos] at ht2 ⊢; exact hmain t ht2 - · have ht' : 2 ≤ -t := by rwa [abs_of_neg hneg] at ht2 - have him : (((c:ℝ):ℂ) + (-t:ℝ) * I).im ≠ 0 := by rw [im_line]; linarith - have e : ((c:ℝ):ℂ) + t * I = conj (((c:ℝ):ℂ) + (-t:ℝ) * I) := by rw [conj_line]; simp - rw [e, L2_conj him, Complex.norm_conj, abs_of_neg hneg] - exact hmain (-t) ht' - have hlogle : Real.log |t| ≤ Real.log (2 + |t|) := Real.log_le_log (by linarith) (by linarith) - calc ‖L2 (((c:ℝ):ℂ) + t * I)‖ ≤ Real.log |t| / 2 + 7 := key - _ ≤ 16 * Real.log (2 + |t|) := by nlinarith [hlogpos t] - _ ≤ max (2 * |M₀|) 16 * Real.log (2 + |t|) := - mul_le_mul_of_nonneg_right (le_max_right _ _) hL2.le - - -/-- **ArchLineData for W** on 9/8 ≤ c ≤ 5/4: Λ = L₂, Λ⋆(τ) = (L2star τ : ℂ); fields from X1–X4 above. -/ -theorem archLineData_L2 (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - ArchLineData c L2 (fun τ => ((L2star τ : ℝ) : ℂ)) where - one_lt := by linarith - le := by linarith - analytic := fun t => L2_analyticAt_goodStrip (mem_goodStrip_line hc1 hc2 t) - conj_symm := fun z _ hz => L2_conj hz - two_pt := norm_L2_sub_L2star_le hc1 hc2 - deriv_le := by - obtain ⟨C, h⟩ := norm_deriv_L2_le hc1 hc2 - refine ⟨C, fun t ht => ?_⟩ - have h' := h t (by rw [abs_of_pos (by linarith)]; exact ht) - rwa [abs_of_pos (by linarith : (0:ℝ) < t)] at h' - lower := by - obtain ⟨C, h⟩ := norm_L2_ge hc1 hc2 - refine ⟨C, fun t ht => ?_⟩ - have h' := h t (by rw [abs_of_pos (by linarith)]; exact ht) - rwa [abs_of_pos (by linarith : (0:ℝ) < t)] at h' - lower_par := ⟨1, fun τ hτ => norm_L2star_ge (by linarith)⟩ - upper := (norm_L2_line hc1 hc2).imp fun _ h => h.2 - -/-! ## X5–X6. The freeze on the line -/ - -section freeze - -/-- E₂′/E₂ in the (L₂′+B)/(L₂−A) form on the line. -/ -theorem derivE2_div_E2_eq_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) (t : ℝ) : - deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I) - = (deriv L2 (((c:ℝ):ℂ) + t * I) + Bfn (((c:ℝ):ℂ) + t * I)) - / (L2 (((c:ℝ):ℂ) + t * I) - Afn (((c:ℝ):ℂ) + t * I)) := by - rw [deriv_E2fn (mem_goodStrip_line hc1 hc2 t), E2fn_eq_L2_sub_Afn (one_lt_re_line hc1 t)] - -/-- **X5. the freezing estimate on the line Re s = c** [XF′ Lemma 2.4 for W]. -/ -theorem freeze_on_line_W (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - ∃ C T₀ : ℝ, 0 ≤ C ∧ 8 ≤ T₀ ∧ ∀ T : ℝ, T₀ ≤ T → ∀ τ t : ℝ, T ≤ τ → T / 4 ≤ t → - ‖deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I) - - Bfn (((c:ℝ):ℂ) + t * I) / (((L2star τ : ℝ) : ℂ) - Afn (((c:ℝ):ℂ) + t * I))‖ - ≤ C * (|t - τ| + 1) / (T * Real.log T) := - (archLineData_L2 hc1 hc2).freeze_on_line - -/-- **X6.** the frozen object is uniformly small on the line: ‖B/(L₂⋆(τ) − A(c+it))‖ ≤ 4B₀/log T. -/ -theorem frozen_uniform_W (hc1 : 9/8 ≤ c) : - ∃ C T₀ : ℝ, 0 ≤ C ∧ 8 ≤ T₀ ∧ ∀ T : ℝ, T₀ ≤ T → ∀ τ t : ℝ, T ≤ τ → - ‖Bfn (((c:ℝ):ℂ) + t * I) / (((L2star τ : ℝ) : ℂ) - Afn (((c:ℝ):ℂ) + t * I))‖ ≤ C / Real.log T := by - obtain ⟨A₀, hA0, hA⟩ := norm_Afn_le_line hc1 - obtain ⟨B₀, hB0, hB⟩ := norm_Bfn_le_line hc1 - refine ⟨4 * B₀, max 8 (Real.exp (4 * (A₀ + 6))), by positivity, le_max_left _ _, ?_⟩ - intro T hT τ t hτ - have hT8 : 8 ≤ T := le_trans (le_max_left _ _) hT - have hT0 : 0 < T := by linarith - have hτ0 : 0 < τ := by linarith - have hlogT : 4 * (A₀ + 6) ≤ Real.log T := by - have := Real.log_le_log (Real.exp_pos _) (le_trans (le_max_right _ _) hT) - rwa [Real.log_exp] at this - have hlogτ : Real.log T ≤ Real.log τ := Real.log_le_log hT0 hτ - have hΛ : Real.log T / 4 ≤ ‖((L2star τ : ℝ) : ℂ)‖ - A₀ := by - have := norm_L2star_ge hτ0; nlinarith - have hlogT1 : 1 ≤ Real.log T := by nlinarith - have hq : 0 < Real.log T / 4 := by linarith - have hden : Real.log T / 4 ≤ ‖((L2star τ : ℝ) : ℂ) - Afn (((c:ℝ):ℂ) + t * I)‖ := - hΛ.trans (norm_sub_ge_of_le (hA t)) - rw [norm_div] - calc ‖Bfn (((c:ℝ):ℂ) + ↑t * I)‖ / ‖((L2star τ : ℝ) : ℂ) - Afn (((c:ℝ):ℂ) + ↑t * I)‖ - ≤ B₀ / (Real.log T / 4) := div_le_div₀ hB0 (hB t) hq hden - _ = 4 * B₀ / Real.log T := by field_simp - -end freeze - -/-! ## X7. The uniform bound for E₂′/E₂ on the line (given W ≠ 0 there), continuity, conjugation -/ - -section uniform - -theorem continuous_E2fn_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - Continuous (fun t : ℝ => E2fn (((c:ℝ):ℂ) + t * I)) := - (archLineData_L2 hc1 hc2).continuous_E_line - -theorem continuous_derivE2_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - Continuous (fun t : ℝ => deriv E2fn (((c:ℝ):ℂ) + t * I)) := - (archLineData_L2 hc1 hc2).continuous_derivE_line - -/-- continuity of t ↦ E₂′/E₂(c+it), given W ≠ 0 on the line. -/ -theorem continuous_derivE2_div_E2_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) - (hW : ∀ t : ℝ, hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) : - Continuous (fun t : ℝ => deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)) := - (continuous_derivE2_line hc1 hc2).div (continuous_E2fn_line hc1 hc2) - fun t => E2fn_ne_zero (one_lt_re_line hc1 t) (hW t) - -/-- conjugation: E₂′/E₂(s̄) = conj(E₂′/E₂(s)) for s on the line with Im s ≠ 0 and W(s) ≠ 0. -/ -theorem derivE2_div_E2_conj (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) {t : ℝ} (ht : t ≠ 0) - (hW : hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) : - deriv E2fn (conj (((c:ℝ):ℂ) + t * I)) / E2fn (conj (((c:ℝ):ℂ) + t * I)) - = conj (deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)) := by - set s : ℂ := ((c:ℝ):ℂ) + t * I with hs - have hsim : s.im ≠ 0 := by rw [hs, im_line]; exact ht - have hsG : s ∈ GoodStrip := mem_goodStrip_line hc1 hc2 t - have hcG : conj s ∈ GoodStrip := by - rw [hs, conj_line]; exact mem_goodStrip_line hc1 hc2 (-t) - have hWc : hardyW (conj s) ≠ 0 := by rw [hardyW_conj hsim]; simpa using hW - rw [derivE2_div_E2_eq hcG hWc, derivE2_div_E2_eq hsG hW, FZfn_conj hsim, E2fn_conj hsim, map_sub] - -/-- **X7. uniform bound**: given W ≠ 0 on Re s = c, ‖E₂′/E₂(c+it)‖ ≤ C_E for every real t. -/ -theorem derivE2_div_E2_uniform (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) - (hW : ∀ t : ℝ, hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) : - ∃ CE : ℝ, 0 ≤ CE ∧ ∀ t : ℝ, - ‖deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)‖ ≤ CE := - (archLineData_L2 hc1 hc2).derivE_div_E_uniform fun t => E2fn_ne_zero (one_lt_re_line hc1 t) (hW t) - -/-- The conjugation symmetry in the `dE2` spelling: conj (E₂′/E₂(c − it)) = E₂′/E₂(c + it). -/ -theorem derivE2_div_E2_conj_symm (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) - (_hW : ∀ t : ℝ, hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) (t : ℝ) (ht : t ≠ 0) : - conj (deriv E2fn (((c:ℝ):ℂ) + ((-t : ℝ) : ℂ) * I) / E2fn (((c:ℝ):ℂ) + ((-t : ℝ) : ℂ) * I)) - = deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I) := by - have h : deriv E2fn (((c:ℝ):ℂ) + ((-t : ℝ) : ℂ) * I) / E2fn (((c:ℝ):ℂ) + ((-t : ℝ) : ℂ) * I) - = conj (deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)) := - (archLineData_L2 hc1 hc2).derivE_div_E_conj ht - rw [h, Complex.conj_conj] - -end uniform - -/-! ## X8. The line bounds and continuity for E₂ and F_𝒵 = L₂ + W′/W -/ - -section linebounds - -/-- **X8a.** ‖E₂(c+it)‖ ≤ M log(2+|t|) and t ↦ E₂(c+it) is continuous. -/ -theorem norm_E2fn_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) : - ∃ M : ℝ, ∀ t : ℝ, ‖E2fn (((c:ℝ):ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|) := - (archLineData_L2 hc1 hc2).norm_E_line - -/-- **X8b. the line bound for F_𝒵 = L₂ + W′/W** (given W ≠ 0 on the line). -/ -theorem norm_FZ_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) (hW : ∀ t : ℝ, hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) : - ∃ M : ℝ, ∀ t : ℝ, ‖L2 (((c:ℝ):ℂ) + t * I) + logDeriv hardyW (((c:ℝ):ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|) := by - obtain ⟨M, hM⟩ := norm_E2fn_line hc1 hc2 - obtain ⟨CE, hCE0, hCE⟩ := derivE2_div_E2_uniform hc1 hc2 hW - have hlog2 : (1:ℝ) / 2 ≤ Real.log 2 := by linarith [Real.log_two_gt_d9] - have hlogpos : ∀ t : ℝ, Real.log 2 ≤ Real.log (2 + |t|) := fun t => - Real.log_le_log two_pos (by linarith [abs_nonneg t]) - refine ⟨M + 2 * CE, fun t => ?_⟩ - have h := FZfn_eq (mem_goodStrip_line hc1 hc2 t) (hW t) - unfold FZfn at h - rw [h] - calc ‖E2fn (((c:ℝ):ℂ) + t * I) + deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)‖ - ≤ ‖E2fn (((c:ℝ):ℂ) + t * I)‖ + ‖deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)‖ := - norm_add_le _ _ - _ ≤ M * Real.log (2 + |t|) + CE := add_le_add (hM t) (hCE t) - _ ≤ (M + 2 * CE) * Real.log (2 + |t|) := by nlinarith [hlogpos t] - -theorem continuous_FZ_line (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) (hW : ∀ t : ℝ, hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) : - Continuous (fun t : ℝ => L2 (((c:ℝ):ℂ) + t * I) + logDeriv hardyW (((c:ℝ):ℂ) + t * I)) := by - have e : (fun t : ℝ => L2 (((c:ℝ):ℂ) + t * I) + logDeriv hardyW (((c:ℝ):ℂ) + t * I)) - = fun t : ℝ => E2fn (((c:ℝ):ℂ) + t * I) - + deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I) := by - funext t - have h := FZfn_eq (mem_goodStrip_line hc1 hc2 t) (hW t) - unfold FZfn at h - exact h - rw [e] - exact (continuous_E2fn_line hc1 hc2).add (continuous_derivE2_div_E2_line hc1 hc2 hW) - -end linebounds - -/-! ## Packaged in the field order of `E2LineFacts` / `FreezeFactsW` -/ - -theorem e2LineFacts' (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) (hW : ∀ t : ℝ, hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) : - (∀ t : ℝ, hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) ∧ - (∃ CE : ℝ, 0 ≤ CE ∧ ∀ t : ℝ, ‖deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)‖ ≤ CE) ∧ - Continuous (fun t : ℝ => deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)) := - ⟨hW, derivE2_div_E2_uniform hc1 hc2 hW, continuous_derivE2_div_E2_line hc1 hc2 hW⟩ - -theorem freezeFactsW' (hc1 : 9/8 ≤ c) (hc2 : c ≤ 5/4) (hW : ∀ t : ℝ, hardyW (((c:ℝ):ℂ) + t * I) ≠ 0) : - (∃ C T₀ : ℝ, 0 ≤ C ∧ 8 ≤ T₀ ∧ ∀ T : ℝ, T₀ ≤ T → ∀ τ t : ℝ, T ≤ τ → T / 4 ≤ t → - ‖deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I) - - Bfn (((c:ℝ):ℂ) + t * I) / (((L2star τ : ℝ) : ℂ) - Afn (((c:ℝ):ℂ) + t * I))‖ - ≤ C * (|t - τ| + 1) / (T * Real.log T)) ∧ - (∃ C T₀ : ℝ, 0 ≤ C ∧ 8 ≤ T₀ ∧ ∀ T : ℝ, T₀ ≤ T → ∀ τ t : ℝ, T ≤ τ → - ‖Bfn (((c:ℝ):ℂ) + t * I) / (((L2star τ : ℝ) : ℂ) - Afn (((c:ℝ):ℂ) + t * I))‖ ≤ C / Real.log T) ∧ - (∀ t : ℝ, t ≠ 0 → conj (deriv E2fn (((c:ℝ):ℂ) + ((-t : ℝ) : ℂ) * I) / E2fn (((c:ℝ):ℂ) + ((-t : ℝ) : ℂ) * I)) - = deriv E2fn (((c:ℝ):ℂ) + t * I) / E2fn (((c:ℝ):ℂ) + t * I)) := - ⟨freeze_on_line_W hc1 hc2, frozen_uniform_W hc1, derivE2_div_E2_conj_symm hc1 hc2 hW⟩ - -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFFinal.lean b/zeta23/Zeta23/XiPrime/Hardy/EFFinal.lean deleted file mode 100644 index 1a81ae71b1..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFFinal.lean +++ /dev/null @@ -1,68 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFFinal.lean — the W explicit formula WEF, instantiated. - theorem wEF (hZ : WZerosInStrip t₀) (hs : WSeam t₀) (hR : RiemannVonMangoldt (wZeros hZ hs)) - (Pf : ℝ → Params) (hPf : FamilyHyps Pf) : WEF (wZeros hZ hs) Pf -from EFMain.wEF_of with LineFactsW ← Hardy/EFExpansion (e2LineFacts', freezeFactsW', norm_FZ_line), -ContourFactsW ← Hardy/EFContour (w_full_line_identity + lminus_line_identity), -CoeffFactsC ← Coeff/LSeries.LSeries_xiCoeffJ_of_gt_one at σ₀ = 9/8. --/ -import Zeta23.XiPrime.Hardy.EFMain -import Zeta23.XiPrime.Hardy.EFExpansion -import Zeta23.XiPrime.Hardy.EFContour -import Zeta23.XiPrime.Coeff.LSeries -import Zeta23.XiPrime.ExplicitFormula.Main - -open scoped BigOperators ArithmeticFunction ComplexConjugate -open Complex MeasureTheory Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Hardy - -/-- `LineFactsW` derived from the EF expansion. -/ -theorem lineFactsW : LineFactsW := by - intro c hc1 hc2 hW - obtain ⟨h1, h2, h3⟩ := e2LineFacts' hc1 hc2 hW - obtain ⟨f1, f2, f3⟩ := freezeFactsW' hc1 hc2 hW - exact ⟨⟨h1, h2, h3⟩, ⟨f1, f2, f3⟩, norm_FZ_line hc1 hc2 hW⟩ - -/-- `ContourFactsW` assembled from Hardy/EFContour.lean (`w_full_line_identity`, `lminus_line_identity`). -/ -theorem contourFactsW {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) (hR : RiemannVonMangoldt (wZeros hZ hs)) : - ContourFactsW hZ hs := by - intro c hc1 hc2 hWc hWc' hline - have hc1' : 1 < c := by linarith - refine ⟨⟨lowZerosW c t₀, fun ρ hρ => mem_lowZerosW hρ, fun k hk hkc => ?_⟩, fun k hk hkc => ?_⟩ - · exact w_full_line_identity hZ hs hR hc1' hc2 hWc hWc' hline hk hkc - · exact lminus_line_identity hc1' hc2 hk hkc - -/-- `CoeffFactsC` from `LSeries_xiCoeffJ_of_gt_one` at σ₀ = 9/8. -/ -theorem coeffFactsC : CoeffFactsC := by - obtain ⟨R₀, hR₀, h⟩ := LSeries_xiCoeffJ_of_gt_one (9/8) (by norm_num) - refine ⟨⟨R₀, hR₀, fun Λs hΛ c hc1 hc2 => ?_⟩, fun Λs N => ?_⟩ - · have hre : (((c:ℝ):ℂ)).re = c := by simp - have h0 := h Λs hΛ ((c:ℝ):ℂ) (by simp; linarith) - refine ⟨?_, fun t => ?_⟩ - · have := h0.1 - rw [xiCoeffJ'_eq] - simpa using this - · obtain ⟨-, -, h3⟩ := h Λs hΛ ((c:ℂ) + t * I) (by simp; linarith) - rw [xiCoeffJ'_eq, Afn, Bfn] - exact h3 - · rw [xiCoeffJ'_eq, xiCoeffJ'_eq, xiCoeffJ_conj] - -/-- **WEF** [XF′ Thm 9.2]: the explicit formula for W = ζ′ + L₂ζ (i.e. for Z′), entrywise, frozen coefficients at -the REAL parameter L_{2⋆}(τ⋆), pole weight 2, error C·T^{−δ}·(1/max(1,(τ_k−τ_l)²) + 1/T). -/ -theorem wEF {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) (hR : RiemannVonMangoldt (wZeros hZ hs)) - (Pf : ℝ → Params) (hPf : FamilyHyps Pf) : WEF (wZeros hZ hs) Pf := - wEF_of hZ hs hR lineFactsW (contourFactsW hZ hs hR) coeffFactsC Pf hPf - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFJTermW.lean b/zeta23/Zeta23/XiPrime/Hardy/EFJTermW.lean deleted file mode 100644 index 78e33bd9ea..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFJTermW.lean +++ /dev/null @@ -1,66 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFJTermW.lean — the W correction functional JcorrW c k on the line Re s = c, 1 < c ≤ 5/4, as the -W INSTANCE of the generic J-term theorem ExplicitFormula/JTerm.JcorrG_estimate. -[XF′ Thm 9.2 (b)–(e)]: E ↦ E₂, freezing parameter the REAL number L_{2⋆}(τ⋆) (so the mirrored weight freezes to the SAME -Dirichlet object — (G1) is vacuous). Inputs: E2LineFacts c (EFLitCorrW) and FreezeFactsW c (below; corresponding to -EFExpansion X5, X6, X7-conj). JcorrW_estimate is consumed by Hardy/EFMain. --/ -import Zeta23.XiPrime.Hardy.EFLitCorrW -import Zeta23.XiPrime.ExplicitFormula.JTerm - -open scoped BigOperators ArithmeticFunction ComplexConjugate -open Complex MeasureTheory Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Zeta23.WeilEF (Hfn) - -/-- The frozen Dirichlet object on the line c with real parameter L_{2⋆}(τ): -D_c(τ; t) := B(c+it)/(L2star τ − A(c+it)) (= DfroG c (L2star τ)). -/ -def DfroC (c τ : ℝ) (t : ℝ) : ℂ := - Bfn ((c:ℂ) + t * I) / (((L2star τ : ℝ) : ℂ) - Afn ((c:ℂ) + t * I)) - -theorem DfroC_eq (c τ : ℝ) : DfroC c τ = DfroG c ((L2star τ : ℝ) : ℂ) := rfl - -/-- The freezing facts for E₂ on the line c. -/ -structure FreezeFactsW (c : ℝ) : Prop where - freeze : ∃ C T₀ : ℝ, 0 ≤ C ∧ 8 ≤ T₀ ∧ ∀ T : ℝ, T₀ ≤ T → ∀ τ t : ℝ, T ≤ τ → T / 4 ≤ t → - ‖dE2 c t - DfroC c τ t‖ ≤ C * (|t - τ| + 1) / (T * Real.log T) - unif : ∃ C T₀ : ℝ, 0 ≤ C ∧ 8 ≤ T₀ ∧ ∀ T : ℝ, T₀ ≤ T → ∀ τ t : ℝ, T ≤ τ → - ‖DfroC c τ t‖ ≤ C / Real.log T - conj_symm : ∀ t : ℝ, t ≠ 0 → conj (dE2 c (-t)) = dE2 c t - -/-- **the W J-term estimate** — instance of JcorrG_estimate at (c, dE2 c, τ ↦ (L2star τ : ℂ)). -/ -theorem JcorrW_estimate {c : ℝ} (_hc1 : 1 < c) (_hc2 : c ≤ 5/4) (hE2 : E2LineFacts c) (hF : FreezeFactsW c) : - ∃ K T₀ : ℝ, 0 ≤ K ∧ 8 ≤ T₀ ∧ - ∀ {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) - {T a b W W' : ℝ} (hT : T₀ ≤ T) (ha : T ≤ a) (hb : T ≤ b) (hW : 0 ≤ W) (hW' : 0 ≤ W') - (hw1 : ∀ t : ℝ, ‖Hfn k ((c:ℂ) + t * I)‖ ≤ W * (cauchyK a t * cauchyK b t)) - (hw2 : ∀ t : ℝ, (|t - a| + |t - b|) * ‖Hfn k ((c:ℂ) + t * I)‖ ≤ W' * (cauchyK a t * cauchyK b t)) - (hw1' : ∀ t : ℝ, ‖Hfn k (1 - (c:ℂ) - t * I)‖ ≤ W * (cauchyK (-a) t * cauchyK (-b) t)) - (hw2' : ∀ t : ℝ, (|t + a| + |t + b|) * ‖Hfn k (1 - (c:ℂ) - t * I)‖ ≤ W' * (cauchyK (-a) t * cauchyK (-b) t)) - {cJ : ℕ → ℂ} (hcs : Summable (fun N : ℕ => ‖cJ N‖ * (N : ℝ) ^ (-c))) - (hC1 : ∀ t : ℝ, LSeries cJ ((c:ℂ) + t * I) = DfroC c ((a + b) / 2) t) - (hC1' : ∀ t : ℝ, LSeries (fun N => conj (cJ N)) ((c:ℂ) + t * I) = DfroC c ((a + b) / 2) t), - ‖JcorrW c k - ((∑' N : ℕ, cJ N / ((Real.sqrt N : ℝ) : ℂ) * k (Real.log N)) - + ∑' N : ℕ, conj (cJ N) / ((Real.sqrt N : ℝ) : ℂ) * k (-Real.log N))‖ - ≤ K * ((W + W') / (T * Real.log T) / (4 + (a - b) ^ 2) + W / T ^ 2) := by - obtain ⟨K, T₀, hK, hT₀, h⟩ := JcorrG_estimate (c := c) (dE := dE2 c) (Lpar := fun τ => ((L2star τ : ℝ) : ℂ)) - hE2.cont hE2.bound hF.conj_symm hF.freeze hF.unif - refine ⟨K, T₀, hK, hT₀, ?_⟩ - intro k hk hkc T a b W W' hT ha hb hW hW' hw1 hw2 hw1' hw2' cJ hcs hC1 hC1' - have hC1'' : ∀ t : ℝ, LSeries (fun N => conj (cJ N)) ((c:ℂ) + t * I) - = DfroG c (conj (((L2star ((a + b) / 2) : ℝ) : ℂ))) t := fun t => by - rw [Complex.conj_ofReal]; exact hC1' t - exact h hk hkc hT ha hb hW hW' hw1 hw2 hw1' hw2' hcs hC1 hC1'' - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFLitCorrW.lean b/zeta23/Zeta23/XiPrime/Hardy/EFLitCorrW.lean deleted file mode 100644 index 7e784373cd..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFLitCorrW.lean +++ /dev/null @@ -1,139 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFLitCorrW.lean — the W explicit formula in "literature form with correction" on a line -Re s = c, 1 < c ≤ 5/4. [XF′ Prop 9.1 + Thm 9.2 (a)]: - Σ'_{ρ ∈ 𝒩_W} m_ρ h_k(γ_ρ) = literatureRHSW k + JcorrW c k − Σ_{ρ ∈ E₀} m_ρ H(ρ), - literatureRHSW k = literatureRHS k + (H(0) + H(1)) (pole weight 2; GramBridgeW), - JcorrW c k := (1/2π) ∫ [H(c+it) + H(1−c−it)]·(E₂′/E₂)(c+it) dt, -from three inputs taken as Props (discharged in Hardy/EFMain.lean): the full-line identity for -F_𝒵 = L₂ + W′/W, the L₋-line identity (1/2π)∫[H+H̃](L − L₂) = ½(H(0)+H(1)), -and the line facts for E₂; plus the c-generic ζ-side evaluation (1/2π)∫[H+H̃]·E = literatureRHS k -(ExplicitFormula/LitCorr.Efn_line_identity, with HwC and its integrability helpers). -Pointwise on the line: F_𝒵 = E₂ + E₂′/E₂ (EFBasic.FZfn_eq) and E₂ = E − (L − L₂) (EFBasic.E2fn_eq_Efn_add). --/ -import Zeta23.XiPrime.Hardy.EFBasic -import Zeta23.XiPrime.Hardy.GramBridgeW -import Zeta23.XiPrime.ExplicitFormula.LitCorr - -open scoped BigOperators ArithmeticFunction ComplexConjugate -open Complex MeasureTheory Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Hardy -open Zeta23.WeilEF (Hfn Hfn_mirror prime_side_line norm_Hfn_le continuous_Hfn_line - integrable_Hfn_mul_logDeriv_zeta integrable_Hfn_mul_logDeriv_Gammaℝ) - -/-! ## objects on the line Re s = c -/ - -/-- E₂′/E₂ on the line. -/ -def dE2 (c : ℝ) (t : ℝ) : ℂ := deriv E2fn ((c:ℂ) + t * I) / E2fn ((c:ℂ) + t * I) - -/-- the W correction functional JcorrW c k := (1/2π) ∫ [H(c+it)+H(1−c−it)]·(E₂′/E₂)(c+it) dt. -/ -def JcorrW (c : ℝ) (k : ℝ → ℂ) : ℂ := (1 / (2 * Real.pi) : ℂ) * ∫ t : ℝ, HwC c k t * dE2 c t - -/-! ## the three input Props -/ - -/-- The full-line identity for F_𝒵 = L₂ + W′/W with a GIVEN finite low-zero set E₀. -/ -def WFullLineIdentityWith {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) (c : ℝ) (E₀ : Finset ℂ) : Prop := - ∀ (k : ℝ → ℂ), ContDiff ℝ 2 k → HasCompactSupport k → - Summable (fun ρ : (wZeros hZ hs).carrier => (wMult (ρ : ℂ) : ℂ) * Hfn k ρ) ∧ - (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, (Hfn k ((c:ℂ) + t * I) + Hfn k (1 - c - t * I)) - * (L2 ((c:ℂ) + t * I) + logDeriv hardyW ((c:ℂ) + t * I))) - = (∑' ρ : (wZeros hZ hs).carrier, (wMult (ρ : ℂ) : ℂ) * Hfn k ρ) - + (∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - - (3/2 : ℂ) * (Hfn k 0 + Hfn k 1) - -/-- The full-line identity for F_𝒵 = L₂ + W′/W, with the finite low-zero set E₀. -/ -def WFullLineIdentity {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) (c : ℝ) : Prop := - ∃ E₀ : Finset ℂ, (∀ ρ ∈ E₀, |ρ.im| < t₀ ∧ 1 - c < ρ.re ∧ ρ.re < c) ∧ WFullLineIdentityWith hZ hs c E₀ - -/-- The L₋-line identity. -/ -def LminusLineIdentity (c : ℝ) : Prop := - ∀ (k : ℝ → ℂ), ContDiff ℝ 2 k → HasCompactSupport k → - Integrable (fun t : ℝ => (Hfn k ((c:ℂ) + t * I) + Hfn k (1 - c - t * I)) - * (Lfn ((c:ℂ) + t * I) - L2 ((c:ℂ) + t * I))) ∧ - (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, (Hfn k ((c:ℂ) + t * I) + Hfn k (1 - c - t * I)) - * (Lfn ((c:ℂ) + t * I) - L2 ((c:ℂ) + t * I))) - = (1/2 : ℂ) * (Hfn k 0 + Hfn k 1) - -/-- The E₂ facts on the whole line Re s = c (for the chosen c). -/ -structure E2LineFacts (c : ℝ) : Prop where - W_ne : ∀ t : ℝ, hardyW ((c:ℂ) + t * I) ≠ 0 - bound : ∃ CE : ℝ, 0 ≤ CE ∧ ∀ t : ℝ, ‖dE2 c t‖ ≤ CE - cont : Continuous (dE2 c) - -/-! ## the W explicit formula, literature form with correction -/ - -theorem Hfn_zero_one_eq (k : ℝ → ℂ) : Hfn k 0 + Hfn k 1 = paperFT k (I / 2) + paperFT k (-I / 2) := by - have hpole0 : Hfn k 0 = paperFT k (I / 2) := by - unfold Hfn; congr 1 - rw [div_eq_iff Complex.I_ne_zero, div_mul_eq_mul_div, Complex.I_mul_I]; norm_num - have hpole1 : Hfn k 1 = paperFT k (-I / 2) := by - unfold Hfn; congr 1 - rw [div_eq_iff Complex.I_ne_zero] - rw [show (-I / 2) * I = -(I * I) / 2 by ring, Complex.I_mul_I]; norm_num - rw [hpole0, hpole1] - -/-- pointwise on the line: F_𝒵 = E − (L − L₂) + E₂′/E₂. -/ -theorem FZfn_line_split {c : ℝ} (hc1 : 1 < c) (hc2 : c ≤ 5/4) (hW : ∀ t : ℝ, hardyW ((c:ℂ) + t * I) ≠ 0) - (t : ℝ) : - L2 ((c:ℂ) + t * I) + logDeriv hardyW ((c:ℂ) + t * I) - = Efn ((c:ℂ) + t * I) - (Lfn ((c:ℂ) + t * I) - L2 ((c:ℂ) + t * I)) + dE2 c t := by - have hs : ((c:ℂ) + t * I) ∈ GoodStrip := by - constructor <;> simp <;> linarith - have h := FZfn_eq hs (hW t) - rw [FZfn] at h - rw [h, dE2, E2fn_eq_Efn_add]; ring - -/-- **the W explicit formula, literature form with correction** (see file header). -/ -theorem w_EF_lit_corr {t₀ c : ℝ} {hZ : WZerosInStrip t₀} {hs : WSeam t₀} (hc1 : 1 < c) (hc2 : c ≤ 5/4) - {E₀ : Finset ℂ} (hWL' : WFullLineIdentityWith hZ hs c E₀) (hLm : LminusLineIdentity c) (hE2 : E2LineFacts c) - {k : ℝ → ℂ} (hk : ContDiff ℝ 2 k) (hkc : HasCompactSupport k) : - Summable (fun ρ : (wZeros hZ hs).carrier => (wMult (ρ : ℂ) : ℂ) * paperFT k (gammaOf ρ)) ∧ - ∑' ρ : (wZeros hZ hs).carrier, (wMult (ρ : ℂ) : ℂ) * paperFT k (gammaOf ρ) - = literatureRHSW k + JcorrW c k - ∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ := by - have hgammaOf : ∀ ρ : ℂ, paperFT k (gammaOf ρ) = Hfn k ρ := fun ρ => rfl - simp_rw [hgammaOf] - obtain ⟨hsum, hfull⟩ := hWL' k hk hkc - refine ⟨hsum, ?_⟩ - obtain ⟨hintLm, hLmv⟩ := hLm k hk hkc - obtain ⟨hintE, hEv⟩ := Efn_line_identity hc1 (by linarith) hk hkc - obtain ⟨CE, -, hCE⟩ := hE2.bound - have hintJ : Integrable (fun t : ℝ => HwC c k t * dE2 c t) := - integrable_HwC_mul_bdd hc1 (by linarith) hk hkc hE2.cont hCE - have hintLm' : Integrable (fun t : ℝ => HwC c k t * (Lfn ((c:ℂ) + t * I) - L2 ((c:ℂ) + t * I))) := hintLm - -- split the F_𝒵 line integral - have e : ∀ t : ℝ, HwC c k t * (L2 ((c:ℂ) + t * I) + logDeriv hardyW ((c:ℂ) + t * I)) - = HwC c k t * Efn ((c:ℂ) + t * I) - HwC c k t * (Lfn ((c:ℂ) + t * I) - L2 ((c:ℂ) + t * I)) - + HwC c k t * dE2 c t := by - intro t; rw [FZfn_line_split hc1 hc2 hE2.W_ne t]; ring - have hfull' : (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, HwC c k t * (L2 ((c:ℂ) + t * I) + logDeriv hardyW ((c:ℂ) + t * I))) - = (∑' ρ : (wZeros hZ hs).carrier, (wMult (ρ : ℂ) : ℂ) * Hfn k ρ) - + (∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) - (3/2 : ℂ) * (Hfn k 0 + Hfn k 1) := hfull - simp_rw [e] at hfull' - have hA : Integrable (fun t : ℝ => HwC c k t * Efn ((c:ℂ) + t * I) - - HwC c k t * (Lfn ((c:ℂ) + t * I) - L2 ((c:ℂ) + t * I))) := hintE.sub hintLm' - rw [integral_add hA hintJ, integral_sub hintE hintLm'] at hfull' - have hLmv' : (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, HwC c k t * (Lfn ((c:ℂ) + t * I) - L2 ((c:ℂ) + t * I))) - = (1/2 : ℂ) * (Hfn k 0 + Hfn k 1) := hLmv - rw [literatureRHSW_eq, ← Hfn_zero_one_eq, JcorrW] - -- linear algebra on hfull' - have key : (∑' ρ : (wZeros hZ hs).carrier, (wMult (ρ : ℂ) : ℂ) * Hfn k ρ) - = (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, HwC c k t * Efn ((c:ℂ) + t * I)) - - (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, HwC c k t * (Lfn ((c:ℂ) + t * I) - L2 ((c:ℂ) + t * I))) - + (1 / (2 * Real.pi) : ℂ) * (∫ t : ℝ, HwC c k t * dE2 c t) - - (∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn k ρ) + (3/2 : ℂ) * (Hfn k 0 + Hfn k 1) := by - linear_combination -hfull' - rw [key, hEv, hLmv'] - ring - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFMain.lean b/zeta23/Zeta23/XiPrime/Hardy/EFMain.lean deleted file mode 100644 index 269b3177e0..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFMain.lean +++ /dev/null @@ -1,423 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFMain.lean — the W explicit formula WEF [XF′ Thm 9.2], assembled. -External inputs enter as Prop-valued hypotheses with fixed shapes (so this file stands independently; -Hardy/EFFinal.lean instantiates them): - LineFactsW — (EFExpansion X5–X8): for 9/8 ≤ c ≤ 5/4 and W ≠ 0 on Re s = c: - E2LineFacts c ∧ FreezeFactsW c ∧ the F_𝒵 line bound; - ContourFactsW — (EFContour): WFullLineIdentity hZ hs c ∧ LminusLineIdentity c, given W ≠ 0 on - Re s = c and Re s = 1 − c below height t₀ and the line bound; - CoeffFactsC — LSeries_xiCoeffJ on lines Re s = c ≥ 9/8, + conj; -everything else is proved in the tree: the choice of c (EFBasic.exists_zeroFree_line), W(1−c) ≠ 0 at the real point -(reflection identity extended by continuity, below), GramBridge/GramBridgeW, HW.kfun_facts (weights at -|Im z| ≤ 3/4), w_EF_lit_corr (EFLitCorrW), JcorrW_estimate (EFJTermW), prime_term_complex, FamilyFacts. --/ -import Zeta23.XiPrime.Hardy.EFJTermW -import Zeta23.XiPrime.Hardy.EFWeights -import Zeta23.XiPrime.ExplicitFormula.GramBridge -import Zeta23.XiPrime.ExplicitFormula.PrimeTermJ -import Zeta23.XiPrime.ExplicitFormula.FamilyFacts -import Zeta23.XiPrime.ExplicitFormula.XiEFAssembly - -open scoped BigOperators ArithmeticFunction ComplexConjugate -open Complex MeasureTheory Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Hardy -open Zeta23.WeilEF (Hfn) - -/-! ## 1. Input Props -/ - -/-- EFExpansion, consumer shape. -/ -def LineFactsW : Prop := - ∀ c : ℝ, 9/8 ≤ c → c ≤ 5/4 → (∀ t : ℝ, hardyW ((c:ℂ) + t * I) ≠ 0) → - E2LineFacts c ∧ FreezeFactsW c ∧ - (∃ M : ℝ, ∀ t : ℝ, ‖L2 ((c:ℂ) + t * I) + logDeriv hardyW ((c:ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|)) - -/-- The EFContour data, in consumer shape. -/ -def ContourFactsW {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) : Prop := - ∀ c : ℝ, 9/8 ≤ c → c ≤ 5/4 → - (∀ s : ℂ, s.re = c → |s.im| < t₀ → hardyW s ≠ 0) → - (∀ s : ℂ, s.re = 1 - c → |s.im| < t₀ → hardyW s ≠ 0) → - (∃ M : ℝ, ∀ t : ℝ, ‖L2 ((c:ℂ) + t * I) + logDeriv hardyW ((c:ℂ) + t * I)‖ ≤ M * Real.log (2 + |t|)) → - WFullLineIdentity hZ hs c ∧ LminusLineIdentity c - -/-- The L-series identity on lines Re s = c ≥ 9/8, consumer shape (real or complex parameter). -/ -def CoeffFactsC : Prop := - (∃ R₀ : ℝ, 0 < R₀ ∧ ∀ Λs : ℂ, R₀ ≤ ‖Λs‖ → ∀ c : ℝ, 9/8 ≤ c → c ≤ 5/4 → - Summable (fun N : ℕ => ‖xiCoeffJ' Λs N‖ * (N : ℝ) ^ (-c)) ∧ - ∀ t : ℝ, LSeries (xiCoeffJ' Λs) ((c:ℂ) + t * I) - = Bfn ((c:ℂ) + t * I) / (Λs - Afn ((c:ℂ) + t * I))) ∧ - (∀ (Λs : ℂ) (N : ℕ), xiCoeffJ' (conj Λs) N = conj (xiCoeffJ' Λs N)) - -/-! ## 2. W at the real point 1 − c: the reflection identity by continuity -/ - -/-- the left strip −1/2 < Re s < 0: W is analytic there (no poles: Γℝ(s) and Γℝ(1−s) regular, s ≠ 1). -/ -lemma hardyW_analyticAt_leftStrip {s : ℂ} (h1 : -1/2 < s.re) (h2 : s.re < 0) : AnalyticAt ℂ hardyW s := by - have hne1 : s ≠ 1 := fun h => by rw [h] at h2; simp at h2; linarith - have hA : ∀ m : ℕ, s / 2 ≠ -(m:ℂ) := by - intro m h; have := congrArg Complex.re h; simp at this - rcases Nat.eq_zero_or_pos m with rfl | hm - · simp at this; linarith - · have : (1:ℝ) ≤ m := by exact_mod_cast hm - linarith - have hB : ∀ m : ℕ, (1 - s) / 2 ≠ -(m:ℂ) := by - intro m h; have := congrArg Complex.re h; simp at this - have : (0:ℝ) ≤ m := Nat.cast_nonneg m; linarith - have hopenL : IsOpen {z : ℂ | -1/2 < z.re ∧ z.re < 0} := - (isOpen_lt continuous_const Complex.continuous_re).inter (isOpen_lt Complex.continuous_re continuous_const) - have hG : AnalyticAt ℂ Gammaℝ s := by - refine Complex.analyticAt_iff_eventually_differentiableAt.mpr ?_ - filter_upwards [hopenL.mem_nhds (show s ∈ {z : ℂ | -1/2 < z.re ∧ z.re < 0} from ⟨h1, h2⟩)] with z hz - refine differentiableAt_Gammaℝ_of_ne fun m h => ?_ - have := congrArg Complex.re h; simp at this - rcases Nat.eq_zero_or_pos m with rfl | hm - · simp at this; linarith [hz.2] - · have : (1:ℝ) ≤ m := by exact_mod_cast hm - linarith [hz.1] - have hG1 : AnalyticAt ℂ (fun z => Gammaℝ (1 - z)) s := by - have h : AnalyticAt ℂ Gammaℝ (1 - s) := - Zeta23.WeilEF.analyticAt_Gammaℝ (by simp; linarith) - exact h.comp (analyticAt_const.sub analyticAt_id) - have hχ : AnalyticAt ℂ chiFE s := by - have : chiFE = fun z => Gammaℝ (1 - z) / Gammaℝ z := funext chiFE_def - rw [this]; exact hG1.div hG (Gammaℝ_ne_zero_of_ne hA) - have hχ0 : chiFE s ≠ 0 := div_ne_zero (Gammaℝ_ne_zero_of_ne hB) (Gammaℝ_ne_zero_of_ne hA) - have hL2 : AnalyticAt ℂ L2 s := by - have e : L2 = fun z => -(1/2) * (deriv chiFE z / chiFE z) := by funext z; rw [L2, logDeriv_apply] - rw [e]; exact analyticAt_const.mul (hχ.deriv.div hχ hχ0) - have e : hardyW = fun z => deriv riemannZeta z + L2 z * riemannZeta z := funext fun z => rfl - rw [e] - exact (analyticAt_deriv_riemannZeta hne1).add (hL2.mul (Hardy.analyticAt_riemannZeta hne1)) - -/-- **W(s) = −χ(s) W(1−s) at every point of the strip 1 < Re s < 3/2, real points included** -(Hardy.hardyW_eq_neg_chiFE_mul off ℝ, extended by continuity). -/ -theorem hardyW_eq_neg_chiFE_mul_goodStrip {s : ℂ} (hs : s ∈ GoodStrip) : - hardyW s = -chiFE s * hardyW (1 - s) := by - by_cases him : s.im ≠ 0 - · exact hardyW_eq_neg_chiFE_mul him - push Not at him - -- both sides are continuous at s; they agree on the punctured vertical line through s - have hcW : ContinuousAt hardyW s := (hardyW_analyticAt_goodStrip hs).continuousAt - have hcχ : ContinuousAt chiFE s := (chiFE_analyticAt_goodStrip hs).continuousAt - have hcW1 : ContinuousAt (fun z => hardyW (1 - z)) s := by - have h : AnalyticAt ℂ hardyW (1 - s) := - hardyW_analyticAt_leftStrip (by simp; linarith [hs.2]) (by simp; linarith [hs.1]) - exact h.continuousAt.comp_of_eq (by fun_prop) rfl - have hcR : ContinuousAt (fun z => -chiFE z * hardyW (1 - z)) s := (hcχ.neg).mul hcW1 - -- the sequence s + i/n → s with nonzero imaginary parts - have hseq : Tendsto (fun n : ℕ => s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I) atTop (𝓝 s) := by - have h1 : Tendsto (fun n : ℕ => (1 / ((n:ℝ) + 1) : ℝ)) atTop (𝓝 0) := - tendsto_one_div_add_atTop_nhds_zero_nat - have h2 : Tendsto (fun n : ℕ => (((1 / ((n:ℝ) + 1) : ℝ)) : ℂ)) atTop (𝓝 ((0:ℝ):ℂ)) := - ((Complex.continuous_ofReal.tendsto 0).comp h1) - have h3 := (h2.mul_const I).const_add s - simpa using h3 - have heq : ∀ n : ℕ, hardyW (s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I) - = -chiFE (s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I) * hardyW (1 - (s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I)) := by - intro n - apply hardyW_eq_neg_chiFE_mul - have : (s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I).im = 1 / ((n:ℝ) + 1) := by - rw [Complex.add_im, Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im, Complex.I_re, Complex.I_im, him]; ring - rw [this]; exact one_div_ne_zero (Nat.cast_add_one_ne_zero n) - have hL := hcW.tendsto.comp hseq - have hR := hcR.tendsto.comp hseq - have : (fun n : ℕ => hardyW (s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I)) - = fun n : ℕ => -chiFE (s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I) * hardyW (1 - (s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I)) := - funext heq - rw [show (hardyW ∘ fun n : ℕ => s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I) - = fun n : ℕ => hardyW (s + ((1 / ((n:ℝ) + 1) : ℝ) : ℂ) * I) from rfl, this] at hL - exact tendsto_nhds_unique hL hR - -/-- zero-freeness transfers from Re s = c to Re s = 1 − c (all points, below any height). -/ -theorem hardyW_ne_zero_reflect {c t₀ : ℝ} (hc1 : 1 < c) (hc2 : c < 3/2) - (h : ∀ s : ℂ, s.re = c → |s.im| < t₀ → hardyW s ≠ 0) : - ∀ s : ℂ, s.re = 1 - c → |s.im| < t₀ → hardyW s ≠ 0 := by - intro s hsre hsim h0 - have hs' : (1 - s) ∈ GoodStrip := by constructor <;> simp [hsre] <;> linarith - have h1 := hardyW_eq_neg_chiFE_mul_goodStrip hs' - rw [sub_sub_cancel, h0, mul_zero] at h1 - exact h (1 - s) (by simp [hsre]) (by simpa using hsim) h1 - -/-! ## 3. Small geometric helpers -/ - -theorem Hfn_eq_paperFT' (k : ℝ → ℂ) (s : ℂ) : Hfn k s = paperFT k ((s - 1/2) / I) := rfl - -theorem arg_re_im (ρ : ℂ) : ((ρ - 1/2) / I).re = ρ.im ∧ ((ρ - 1/2) / I).im = 1/2 - ρ.re := by - rw [Complex.div_I] - constructor <;> simp - -theorem line_arg (c t : ℝ) : (((c:ℂ) + t * I) - 1/2) / I = (t:ℂ) + ((1/2 - c : ℝ) : ℂ) * I := by - rw [div_eq_iff Complex.I_ne_zero]; push_cast; ring_nf; rw [Complex.I_sq]; ring - -theorem mirror_arg (c t : ℝ) : ((1 - (c:ℂ) - t * I) - 1/2) / I = ((-t:ℝ):ℂ) + ((c - 1/2 : ℝ) : ℂ) * I := by - rw [div_eq_iff Complex.I_ne_zero]; push_cast; ring_nf; rw [Complex.I_sq]; ring - -theorem cauchyK_neg_arg (a t : ℝ) : cauchyK a (-t) = cauchyK (-a) t := by - unfold cauchyK; ring_nf - -/-! ## 4. The assembly -/ - -theorem wEF_of {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) (_hR : RiemannVonMangoldt (wZeros hZ hs)) - (hLF : LineFactsW) (hCF : ContourFactsW hZ hs) (hCO : CoeffFactsC) - (Pf : ℝ → Params) (hPf : FamilyHyps Pf) : WEF (wZeros hZ hs) Pf := by - -- (0) the line - obtain ⟨c, hc1, hc2, hWc⟩ := exists_zeroFree_line t₀ - have hc1' : 1 < c := by linarith - have ht₀ : 0 < t₀ := hs.pos - have hWline : ∀ t : ℝ, hardyW ((c:ℂ) + t * I) ≠ 0 := by - intro t - by_cases ht : |t| < t₀ - · exact hWc _ (by simp) (by simpa using ht) - · intro h0 - have := (hZ _ h0 (by simp; linarith [not_lt.mp ht])).2 - simp at this; linarith - have hWc' := hardyW_ne_zero_reflect hc1' (by linarith) hWc - obtain ⟨hE2, hFr, hline⟩ := hLF c hc1 hc2 hWline - obtain ⟨⟨E₀, hE₀mem, hWL'⟩, hLm⟩ := hCF c hc1 hc2 hWc hWc' hline - -- (1) constants - obtain ⟨lam, Cφ, T₁, hlam0, hlam1, hCφ0, hT₁0, hper⟩ := hPf.perT - obtain ⟨Cw, Tw, hCw0, hkf⟩ := HW.kfun_facts hPf - obtain ⟨⟨R₀, hR₀0, hco⟩, hconj⟩ := hCO - obtain ⟨K, TJ, hK0, hTJ8, hJ⟩ := JcorrW_estimate hc1' hc2 hE2 hFr - obtain ⟨Ca, Ta, hCa0, habs⟩ := pow_log_absorb lam hlam1 hlam0 (A := 1) zero_le_one - obtain ⟨M₀, hM₀⟩ : ∃ M₀ : ℝ, M₀ = ∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℝ) := ⟨_, rfl⟩ - have hM₀0 : 0 ≤ M₀ := by rw [hM₀]; exact Finset.sum_nonneg fun _ _ => Nat.cast_nonneg _ - obtain ⟨δ, hδ⟩ : ∃ δ : ℝ, δ = (1 - 3 * lam / 4) / 2 := ⟨_, rfl⟩ - have hδ0 : 0 < δ := by rw [hδ]; nlinarith - obtain ⟨T₀, hT₀⟩ : ∃ T₀ : ℝ, T₀ = max (max (max T₁ Tw) (max TJ Ta)) (max (Real.exp (2 * (R₀ + 1))) (2 * t₀)) := - ⟨_, rfl⟩ - refine ⟨2 * K * Cw * Ca + 16 * Cw * Ca * M₀, δ, T₀, hδ0, fun T hT k l => ?_⟩ - rw [hT₀] at hT - have hT₁ : T₁ ≤ T := le_trans (le_trans (le_trans (le_max_left _ _) (le_max_left _ _)) (le_max_left _ _)) hT - have hTw : Tw ≤ T := le_trans (le_trans (le_trans (le_max_right _ _) (le_max_left _ _)) (le_max_left _ _)) hT - have hTJ : TJ ≤ T := le_trans (le_trans (le_trans (le_max_left _ _) (le_max_right _ _)) (le_max_left _ _)) hT - have hTa : Ta ≤ T := le_trans (le_trans (le_trans (le_max_right _ _) (le_max_right _ _)) (le_max_left _ _)) hT - have hTR : Real.exp (2 * (R₀ + 1)) ≤ T := le_trans (le_trans (le_max_left _ _) (le_max_right _ _)) hT - have hTt₀ : 2 * t₀ ≤ T := le_trans (le_trans (le_max_right _ _) (le_max_right _ _)) hT - have hT8 : 8 ≤ T := le_trans hTJ8 hTJ - have hT0 : 0 < T := by linarith - -- per-height facts - obtain ⟨-, hL1, -, hX, hLlog, hX34, hφC2, hsupp, hL0, -, -, -⟩ := hper T hT₁ - obtain ⟨⟨hkcd, hkc, hks⟩, -, -, hwz⟩ := hkf T hTw (k : ℤ) (l : ℤ) - set kf : ℝ → ℂ := kfun (Pf T) T k l with hkf_def - obtain ⟨a, ha_def⟩ : ∃ a : ℝ, a = (Pf T).tau T k := ⟨_, rfl⟩ - obtain ⟨b, hb_def⟩ : ∃ b : ℝ, b = (Pf T).tau T l := ⟨_, rfl⟩ - have ha : T ≤ a := by rw [ha_def]; exact (tau_mem (Pf T) T hL0 hT0 k).1 - have hb : T ≤ b := by rw [hb_def]; exact (tau_mem (Pf T) T hL0 hT0 l).1 - have hτs : (Pf T).tauStar T k l = (a + b) / 2 := by rw [ha_def, hb_def]; rfl - have hτsT : T ≤ (a + b) / 2 := by linarith - obtain ⟨Λr, hΛr⟩ : ∃ Λr : ℝ, Λr = L2star ((a + b) / 2) := ⟨_, rfl⟩ - obtain ⟨Λs, hΛs⟩ : ∃ Λs : ℂ, Λs = ((Λr : ℝ) : ℂ) := ⟨_, rfl⟩ - -- ‖Λ⋆‖ ≥ R₀ - have hΛR : R₀ ≤ ‖Λs‖ := by - have h3 : 2 * (R₀ + 1) ≤ Real.log T := by - have := Real.log_le_log (Real.exp_pos _) hTR - rwa [Real.log_exp] at this - have h2 : Real.log T ≤ Real.log ((a + b) / 2) := Real.log_le_log hT0 hτsT - have hval : Λr = Real.log ((a + b) / 2) / 2 - Real.log (2 * Real.pi) / 2 := by - rw [hΛr, L2star, Real.log_div (by linarith) (by positivity)]; ring - have : R₀ ≤ Λr := by rw [hval]; linarith [log_two_pi_le_two] - rw [hΛs, Complex.norm_real, Real.norm_eq_abs] - exact this.trans (le_abs_self _) - -- coefficients - obtain ⟨cJ, hcJ⟩ : ∃ cJ : ℕ → ℂ, cJ = xiCoeffJ' Λs := ⟨_, rfl⟩ - obtain ⟨hcs, hC1r⟩ := hco Λs hΛR c hc1 hc2 - rw [← hcJ] at hcs - have hC1 : ∀ t : ℝ, LSeries cJ ((c:ℂ) + t * I) = DfroC c ((a + b) / 2) t := fun t => by - rw [hcJ, hC1r t, DfroC, hΛs, hΛr] - have hcJconj : (fun N => conj (cJ N)) = cJ := by - funext N; rw [hcJ, ← hconj, hΛs, Complex.conj_ofReal] - have hC1' : ∀ t : ℝ, LSeries (fun N => conj (cJ N)) ((c:ℂ) + t * I) = DfroC c ((a + b) / 2) t := by - intro t; rw [hcJconj]; exact hC1 t - -- weights on the line c - obtain ⟨W, hW⟩ : ∃ W : ℝ, W = Cw * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 := ⟨_, rfl⟩ - obtain ⟨W', hW'⟩ : ∃ W' : ℝ, W' = Cw * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T := ⟨_, rfl⟩ - have hXpos : 0 ≤ (Pf T).X T ^ (3/4 : ℝ) := Real.rpow_nonneg (by rw [hX]; exact (Real.exp_pos _).le) _ - have hW0 : 0 ≤ W := by rw [hW]; positivity - have hW'0 : 0 ≤ W' := by rw [hW']; positivity - have hcim : |(1/2 : ℝ) - c| ≤ 3/4 := by rw [abs_le]; constructor <;> linarith - have hcim' : |c - (1/2 : ℝ)| ≤ 3/4 := by rw [abs_le]; constructor <;> linarith - have hw1 : ∀ t : ℝ, ‖Hfn kf ((c:ℂ) + t * I)‖ ≤ W * (cauchyK a t * cauchyK b t) := by - intro t - rw [Hfn_eq_paperFT', line_arg] - have h := (hwz ((t:ℂ) + ((1/2 - c : ℝ) : ℂ) * I) (by simpa using hcim)).1 - rw [← ha_def, ← hb_def] at h - simpa [hW] using h - have hw2 : ∀ t : ℝ, (|t - a| + |t - b|) * ‖Hfn kf ((c:ℂ) + t * I)‖ ≤ W' * (cauchyK a t * cauchyK b t) := by - intro t - rw [Hfn_eq_paperFT', line_arg] - have h := (hwz ((t:ℂ) + ((1/2 - c : ℝ) : ℂ) * I) (by simpa using hcim)).2 - rw [← ha_def, ← hb_def] at h - simpa [hW'] using h - have hw1' : ∀ t : ℝ, ‖Hfn kf (1 - (c:ℂ) - t * I)‖ ≤ W * (cauchyK (-a) t * cauchyK (-b) t) := by - intro t - rw [Hfn_eq_paperFT', mirror_arg, ← cauchyK_neg_arg, ← cauchyK_neg_arg] - have h := (hwz (((-t:ℝ):ℂ) + ((c - 1/2 : ℝ) : ℂ) * I) (by simpa using hcim')).1 - rw [← ha_def, ← hb_def] at h - simpa [hW] using h - have hw2' : ∀ t : ℝ, (|t + a| + |t + b|) * ‖Hfn kf (1 - (c:ℂ) - t * I)‖ ≤ W' * (cauchyK (-a) t * cauchyK (-b) t) := by - intro t - rw [Hfn_eq_paperFT', mirror_arg, ← cauchyK_neg_arg, ← cauchyK_neg_arg] - have h := (hwz (((-t:ℝ):ℂ) + ((c - 1/2 : ℝ) : ℂ) * I) (by simpa using hcim')).2 - rw [← ha_def, ← hb_def] at h - have e1 : |(-t) - a| = |t + a| := by rw [← abs_neg]; ring_nf - have e2 : |(-t) - b| = |t + b| := by rw [← abs_neg]; ring_nf - have hre : ((((-t:ℝ):ℂ)) + ((c - 1/2 : ℝ) : ℂ) * I).re = -t := by simp - rw [hre, e1, e2] at h - rw [hW']; exact h - -- the J estimate - have hJk := hJ hkcd hkc (T := T) (a := a) (b := b) (W := W) (W' := W') hTJ ha hb hW0 hW'0 - hw1 hw2 hw1' hw2' hcs hC1 hC1' - -- the explicit formula in literature form with correction - obtain ⟨hsumρ, hlit⟩ := w_EF_lit_corr (hZ := hZ) (hs := hs) hc1' hc2 hWL' hLm hE2 hkcd hkc - have hgam : ∀ ρ : ℂ, paperFT kf (gammaOf ρ) = Hfn kf ρ := fun _ => rfl - simp_rw [hgam] at hsumρ hlit - -- zero side - have hGs : ∀ ρ : ℂ, (wZeros hZ hs).Gsummand (Pf T) T k l ρ = (wMult ρ : ℂ) * Hfn kf ρ := fun ρ => - Gsummand_eq_mult_Hfn (Pf T) T (wZeros hZ hs) hφC2 hsupp k l ρ - have hGz : (wZeros hZ hs).Gz (Pf T) T k l - = literatureRHSW kf + JcorrW c kf - ∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn kf ρ := by - rw [← hlit] - exact tsum_congr fun ρ => hGs ρ - -- the frozen main term as a prime-side density - have hFk := Zeta23.EF.integrable_fourier_of_contDiff_two hkcd hkc - have hS : (∑' N : ℕ, cJ N / ((Real.sqrt N : ℝ) : ℂ) * kf (Real.log N)) - + (∑' N : ℕ, conj (cJ N) / ((Real.sqrt N : ℝ) : ℂ) * kf (-Real.log N)) - = ∫ τ : ℝ, paperFT kf τ * ((Pc ((Pf T).X T) cJ τ : ℝ) : ℂ) := by - have h1 := summable_coeff_mul_k hks cJ true - have h2 := summable_coeff_mul_k hks (fun N => conj (cJ N)) false - simp only [ite_true] at h1 - simp only [Bool.false_eq_true, ite_false] at h2 - rw [← Summable.tsum_add h1 h2, hX, ← prime_term_complex hkcd.continuous hks hFk cJ] - refine tsum_congr fun N => ?_ - ring - have hnuc : ∀ τ : ℝ, nucW 2 ((Pf T).X T) (xiCoeff (((L2star ((Pf T).tauStar T k l)) : ℝ) : ℂ)) τ - = nucW 2 ((Pf T).X T) (fun N => -((Λ N : ℝ) : ℂ)) τ + Pc ((Pf T).X T) cJ τ := by - intro τ; rw [hτs, nucW_xiCoeff_eq', hcJ, hΛs, hΛr]; rfl - have hintPc : Integrable (fun τ : ℝ => paperFT kf τ * ((Pc ((Pf T).X T) cJ τ : ℝ) : ℂ)) := by - rw [hX]; exact integrable_paperFT_mul_Pc ((Pf T).L T) hFk cJ - have hG1 := GentryW1_eq (Pf T) T hφC2 hsupp hL0 k l cJ hnuc hintPc - -- the entry error - have hdiff : (wZeros hZ hs).Gz (Pf T) T k l - (((Pf T).GentryW1 T k l : ℝ) : ℂ) - = (JcorrW c kf - ((∑' N : ℕ, cJ N / ((Real.sqrt N : ℝ) : ℂ) * kf (Real.log N)) - + ∑' N : ℕ, conj (cJ N) / ((Real.sqrt N : ℝ) : ℂ) * kf (-Real.log N))) - - ∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn kf ρ := by - rw [hGz, hG1, hS]; ring - refine ⟨(hsumρ.congr fun ρ => (hGs ρ).symm), ?_⟩ - rw [hdiff, ← ha_def, ← hb_def] - -- the low-zero sum - have hlow : ‖∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn kf ρ‖ ≤ M₀ * (16 * W / T ^ 4) := by - calc ‖∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn kf ρ‖ - ≤ ∑ ρ ∈ E₀, ‖(analyticOrderNatAt hardyW ρ : ℂ) * Hfn kf ρ‖ := norm_sum_le _ _ - _ ≤ ∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℝ) * (16 * W / T ^ 4) := by - refine Finset.sum_le_sum fun ρ hρ => ?_ - rw [norm_mul, Complex.norm_natCast] - refine mul_le_mul_of_nonneg_left ?_ (Nat.cast_nonneg _) - obtain ⟨him, hre1, hre2⟩ := hE₀mem ρ hρ - obtain ⟨hzre, hzim⟩ := arg_re_im ρ - rw [Hfn_eq_paperFT'] - have hz : |((ρ - 1/2) / I).im| ≤ 3/4 := by - rw [hzim, abs_le]; constructor <;> linarith - have h := (hwz _ hz).1 - rw [hzre, ← ha_def, ← hb_def] at h - refine h.trans ?_ - have hKa : cauchyK a ρ.im ≤ 4 / T ^ 2 := HW.cauchyK_le_of_far hT0 (by - rw [abs_sub_comm, abs_of_pos (by linarith [abs_lt.mp him])] - linarith [(abs_lt.mp him).2]) - have hKb : cauchyK b ρ.im ≤ 4 / T ^ 2 := HW.cauchyK_le_of_far hT0 (by - rw [abs_sub_comm, abs_of_pos (by linarith [abs_lt.mp him])] - linarith [(abs_lt.mp him).2]) - calc Cw * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 * (cauchyK a ρ.im * cauchyK b ρ.im) - ≤ Cw * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 * (4 / T ^ 2 * (4 / T ^ 2)) := by - refine mul_le_mul_of_nonneg_left ?_ (by positivity) - exact mul_le_mul hKa hKb (cauchyK_nonneg _ _) (by positivity) - _ = 16 * W / T ^ 4 := by rw [hW]; ring - _ = M₀ * (16 * W / T ^ 4) := by rw [hM₀, Finset.sum_mul] - -- numeric absorption - obtain ⟨hab1, hab2⟩ := habs T hTa - have hlogT : 0 < Real.log T := Real.log_pos (by linarith) - have hXL : (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 ≤ T ^ (3 * lam / 4) * Real.log T ^ 2 := by - refine mul_le_mul hX34 ?_ (by positivity) (Real.rpow_nonneg hT0.le _) - exact pow_le_pow_left₀ hL0.le hLlog 2 - have hWW : W + W' ≤ 2 * Cw * (T ^ (3 * lam / 4) * Real.log T ^ 2) := by - have hLL : (Pf T).L T ≤ (Pf T).L T ^ 2 := by - calc (Pf T).L T = (Pf T).L T * 1 := by ring - _ ≤ (Pf T).L T * (Pf T).L T := mul_le_mul_of_nonneg_left hL1 hL0.le - _ = (Pf T).L T ^ 2 := by ring - have e : W + W' = Cw * (Pf T).X T ^ (3/4 : ℝ) * ((Pf T).L T ^ 2 + (Pf T).L T) := by - rw [hW, hW']; ring - rw [e] - calc Cw * (Pf T).X T ^ (3/4 : ℝ) * ((Pf T).L T ^ 2 + (Pf T).L T) - ≤ Cw * (Pf T).X T ^ (3/4 : ℝ) * (2 * (Pf T).L T ^ 2) := - mul_le_mul_of_nonneg_left (by linarith) (mul_nonneg hCw0 hXpos) - _ = 2 * Cw * ((Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2) := by ring - _ ≤ 2 * Cw * (T ^ (3 * lam / 4) * Real.log T ^ 2) := - mul_le_mul_of_nonneg_left hXL (by positivity) - have hWle : W ≤ Cw * (T ^ (3 * lam / 4) * Real.log T ^ 2) := by - rw [hW, show Cw * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 - = Cw * ((Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2) by ring] - exact mul_le_mul_of_nonneg_left hXL hCw0 - have hmax : 0 < max 1 ((a - b) ^ 2) := lt_of_lt_of_le one_pos (le_max_left _ _) - have h1 : (W + W') / (T * Real.log T) / (4 + (a - b) ^ 2) - ≤ 2 * Cw * Ca * T ^ (-δ) * (1 / max 1 ((a - b) ^ 2)) := by - have e1 : (W + W') / (T * Real.log T) ≤ 2 * Cw * Ca * T ^ (-δ) := by - calc (W + W') / (T * Real.log T) - ≤ 2 * Cw * (T ^ (3 * lam / 4) * Real.log T ^ 2) / (T * Real.log T) := - div_le_div_of_nonneg_right hWW (by positivity) - _ = 2 * Cw * (T ^ (3 * lam / 4) * Real.log T ^ 2 * 1 / (T * Real.log T)) := by ring - _ ≤ 2 * Cw * (Ca * T ^ (-((1 - 3 * lam / 4) / 2))) := mul_le_mul_of_nonneg_left hab1 (by positivity) - _ = 2 * Cw * Ca * T ^ (-δ) := by rw [hδ]; ring - have e2 : 1 / (4 + (a - b) ^ 2) ≤ 1 / max 1 ((a - b) ^ 2) := - div_le_div_of_nonneg_left zero_le_one hmax (max_one_le_four_add _) - calc (W + W') / (T * Real.log T) / (4 + (a - b) ^ 2) - = (W + W') / (T * Real.log T) * (1 / (4 + (a - b) ^ 2)) := by ring - _ ≤ 2 * Cw * Ca * T ^ (-δ) * (1 / max 1 ((a - b) ^ 2)) := - mul_le_mul e1 e2 (by positivity) (by positivity) - have h2 : W / T ^ 2 ≤ Cw * Ca * T ^ (-δ) * (1 / T) := by - calc W / T ^ 2 ≤ Cw * (T ^ (3 * lam / 4) * Real.log T ^ 2) / T ^ 2 := - div_le_div_of_nonneg_right hWle (by positivity) - _ = Cw * (T ^ (3 * lam / 4) * Real.log T ^ 2 * 1 / T ^ 2) := by ring - _ ≤ Cw * (Ca * T ^ (-((1 - 3 * lam / 4) / 2)) / T) := mul_le_mul_of_nonneg_left hab2 hCw0 - _ = Cw * Ca * T ^ (-δ) * (1 / T) := by rw [hδ]; ring - have h3 : M₀ * (16 * W / T ^ 4) ≤ 16 * Cw * Ca * M₀ * T ^ (-δ) * (1 / T) := by - have hT1 : (1:ℝ) ≤ T := by linarith - have hpow : T ^ 2 ≤ T ^ 4 := pow_le_pow_right₀ hT1 (by norm_num) - have hWT4 : W / T ^ 4 ≤ Cw * Ca * T ^ (-δ) * (1 / T) := - (div_le_div_of_nonneg_left hW0 (by positivity) hpow).trans h2 - have := mul_le_mul_of_nonneg_left hWT4 (by positivity : (0:ℝ) ≤ 16 * M₀) - calc M₀ * (16 * W / T ^ 4) = 16 * M₀ * (W / T ^ 4) := by ring - _ ≤ 16 * M₀ * (Cw * Ca * T ^ (-δ) * (1 / T)) := this - _ = 16 * Cw * Ca * M₀ * T ^ (-δ) * (1 / T) := by ring - have hTδ : 0 ≤ T ^ (-δ) := Real.rpow_nonneg hT0.le _ - calc ‖(JcorrW c kf - ((∑' N : ℕ, cJ N / ((Real.sqrt N : ℝ) : ℂ) * kf (Real.log N)) - + ∑' N : ℕ, conj (cJ N) / ((Real.sqrt N : ℝ) : ℂ) * kf (-Real.log N))) - - ∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn kf ρ‖ - ≤ ‖JcorrW c kf - ((∑' N : ℕ, cJ N / ((Real.sqrt N : ℝ) : ℂ) * kf (Real.log N)) - + ∑' N : ℕ, conj (cJ N) / ((Real.sqrt N : ℝ) : ℂ) * kf (-Real.log N))‖ - + ‖∑ ρ ∈ E₀, (analyticOrderNatAt hardyW ρ : ℂ) * Hfn kf ρ‖ := norm_sub_le _ _ - _ ≤ K * ((W + W') / (T * Real.log T) / (4 + (a - b) ^ 2) + W / T ^ 2) + M₀ * (16 * W / T ^ 4) := - add_le_add hJk hlow - _ ≤ K * (2 * Cw * Ca * T ^ (-δ) * (1 / max 1 ((a - b) ^ 2)) + Cw * Ca * T ^ (-δ) * (1 / T)) - + 16 * Cw * Ca * M₀ * T ^ (-δ) * (1 / T) := - add_le_add (mul_le_mul_of_nonneg_left (add_le_add h1 h2) hK0) h3 - _ ≤ (2 * K * Cw * Ca + 16 * Cw * Ca * M₀) * T ^ (-δ) * (1 / max 1 ((a - b) ^ 2) + 1 / T) := by - have hnn1 : 0 ≤ K * Cw * Ca * T ^ (-δ) * (1 / T) := by positivity - have hnn2 : 0 ≤ 16 * Cw * Ca * M₀ * T ^ (-δ) * (1 / max 1 ((a - b) ^ 2)) := by positivity - have e : (2 * K * Cw * Ca + 16 * Cw * Ca * M₀) * T ^ (-δ) * (1 / max 1 ((a - b) ^ 2) + 1 / T) - = (K * (2 * Cw * Ca * T ^ (-δ) * (1 / max 1 ((a - b) ^ 2)) + Cw * Ca * T ^ (-δ) * (1 / T)) - + 16 * Cw * Ca * M₀ * T ^ (-δ) * (1 / T)) - + (K * Cw * Ca * T ^ (-δ) * (1 / T) + 16 * Cw * Ca * M₀ * T ^ (-δ) * (1 / max 1 ((a - b) ^ 2))) := by - ring - rw [e]; linarith - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/EFWeights.lean b/zeta23/Zeta23/XiPrime/Hardy/EFWeights.lean deleted file mode 100644 index 71a45b411c..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/EFWeights.lean +++ /dev/null @@ -1,216 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/EFWeights.lean — the pair-weight bounds at an ARBITRARY imaginary shift |Im z| ≤ 3/4 -(namespace Zeta23.XiPrime.HW). This file builds on the per-window layer `TestWeight.WindowAt` of -ExplicitFormula/TestWeight.lean (norm_phiHat_le / abs_re_mul_norm_phiHat_le at general z, paperFT_kfun, kfun regularity). - -The W contour runs on Re s = c with c ∈ (1, 5/4], and the low-zero / pole terms need -the weight at points with |Re ρ − 1/2| ≤ 3/4 off the line; so the per-factor estimates -(‖φ̂(w)‖ ≤ (1+C)e^{|Im w|L/2}L/(1+(Re w)²), |Re w|‖φ̂(w)‖ ≤ 2C·e^{|Im w|L/2}/(1+(Re w)²)) are evaluated at any z with -|Im z| ≤ 3/4, using e^{|Im z|L/2} ≤ e^{3L/8} (L ≥ 1); the two exponential factors multiply to X^{3/4}. - paperFT_kfun_bounds : ‖ĥ_{kfun}(z)‖ ≤ C·X^{3/4}·L²·K_{τ_k}(Re z)K_{τ_l}(Re z), - (|Re z−τ_k| + |Re z−τ_l|)·‖ĥ_{kfun}(z)‖ ≤ C·X^{3/4}·L·K_{τ_k}(Re z)K_{τ_l}(Re z); - paperFT_comp_neg : ĥ_{u ↦ k(−u)}(z) = ĥ_k(−z) (re-export of TestWeight.paperFT_comp_neg); - cauchyK_le_of_far : K_a(x) ≤ 4/T² when |x − a| ≥ T/2; - kfun_regular', kfun_facts : (W0) for kfun and for u ↦ kfun(−u), one threshold / one constant with the bounds. --/ -import Zeta23.XiPrime.ExplicitFormula.TestWeight -import Zeta23.XiPrime.ExplicitFormula.EntryError - -open scoped ComplexConjugate -open Complex MeasureTheory Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace HW - -open Zeta23.WeilEF (Hfn) - -/-! ## A. reflection of the paper Fourier transform -/ - -/-- ĥ_{u ↦ k(−u)}(z) = ĥ_k(−z). -/ -theorem paperFT_comp_neg (k : ℝ → ℂ) (z : ℂ) : paperFT (fun u => k (-u)) z = paperFT k (-z) := - TestWeight.paperFT_comp_neg k z - -/-! ## A'. the far Cauchy kernel (used by EFLowZeros and EFMain) -/ - -/-- if |x − a| ≥ T/2 > 0 then K_a(x) = (1 + (x−a)²)⁻¹ ≤ 4/T². -/ -lemma cauchyK_le_of_far {a x T : ℝ} (hT : 0 < T) (h : T / 2 ≤ |x - a|) : cauchyK a x ≤ 4 / T ^ 2 := by - unfold cauchyK - have habs : (T / 2) ^ 2 ≤ (x - a) ^ 2 := by - rw [← sq_abs (x - a)] - exact pow_le_pow_left₀ (by linarith) h 2 - rw [inv_eq_one_div, div_le_div_iff₀ (by positivity) (by positivity)] - nlinarith - -/-! ## B. the factor and pair bounds at |Im| ≤ 3/4, from TestWeight.WindowAt -/ - -section Bounds -variable {P : Params} {T C : ℝ} - -/-- factor bounds at w = z − a with |Im z| ≤ 3/4. -/ -lemma factor_bounds_le (w : TestWeight.WindowAt P T C) (z : ℂ) (hz : |z.im| ≤ 3/4) (a : ℝ) : - ‖P.phiHat T (z - a)‖ - ≤ (1 + C) * Real.exp (3/4 * (P.L T / 2)) * P.L T * (1 + (z.re - a) ^ 2)⁻¹ ∧ - |z.re - a| * ‖P.phiHat T (z - a)‖ - ≤ 2 * C * Real.exp (3/4 * (P.L T / 2)) * (1 + (z.re - a) ^ 2)⁻¹ := by - have hL0 : 0 ≤ P.L T := le_trans zero_le_one w.one_le_L - have hC0 : 0 ≤ C := w.C_nonneg - have him : (z - a).im = z.im := by simp - have hre : (z - a).re = z.re - a := by simp - have hexp : Real.exp (|(z - a).im| * (P.L T / 2)) ≤ Real.exp (3/4 * (P.L T / 2)) := by - rw [him]; exact Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_right hz (by linarith)) - have hK : 0 ≤ (1 + (z.re - a) ^ 2)⁻¹ := by positivity - constructor - · have h := w.norm_phiHat_le (z - a) - rw [hre, div_eq_mul_inv] at h - have h1 : 0 ≤ 1 + C := by linarith - exact h.trans (mul_le_mul_of_nonneg_right - (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hexp h1) hL0) hK) - · have h := w.abs_re_mul_norm_phiHat_le (z - a) - rw [hre, div_eq_mul_inv] at h - have h4 : 0 ≤ 2 * C := by positivity - exact h.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hexp h4) hK) - -/-- pair bounds at |Im z| ≤ 3/4. -/ -lemma pair_bounds_le (w : TestWeight.WindowAt P T C) (z : ℂ) (hz : |z.im| ≤ 3/4) (a b : ℝ) : - ‖P.phiHat T (z - a) * P.phiHat T (z - b)‖ - ≤ (1 + C) ^ 2 * P.X T ^ (3/4 : ℝ) * P.L T ^ 2 * ((1 + (z.re - a) ^ 2)⁻¹ * (1 + (z.re - b) ^ 2)⁻¹) ∧ - (|z.re - a| + |z.re - b|) * ‖P.phiHat T (z - a) * P.phiHat T (z - b)‖ - ≤ 4 * C * (1 + C) * P.X T ^ (3/4 : ℝ) * P.L T * ((1 + (z.re - a) ^ 2)⁻¹ * (1 + (z.re - b) ^ 2)⁻¹) := by - set L := P.L T with hLdef - set E := Real.exp (3/4 * (L / 2)) with hEdef - have hL1 : 1 ≤ L := w.one_le_L - have hC0 : 0 ≤ C := w.C_nonneg - have hE : 0 < E := Real.exp_pos _ - have hEX : E * E = P.X T ^ (3/4 : ℝ) := TestWeight.WindowAt.exp_mul_exp_eq_X_rpow P T - obtain ⟨ha0, ha1⟩ := factor_bounds_le w z hz a - obtain ⟨hb0, hb1⟩ := factor_bounds_le w z hz b - set Ka := (1 + (z.re - a) ^ 2)⁻¹ - set Kb := (1 + (z.re - b) ^ 2)⁻¹ - have hKa : 0 ≤ Ka := by positivity - have hKb : 0 ≤ Kb := by positivity - set A := ‖P.phiHat T (z - a)‖ - set B := ‖P.phiHat T (z - b)‖ - have hB : 0 ≤ B := norm_nonneg _ - rw [norm_mul] - constructor - · calc A * B ≤ ((1 + C) * E * L * Ka) * ((1 + C) * E * L * Kb) := mul_le_mul ha0 hb0 hB (by positivity) - _ = (1 + C) ^ 2 * (E * E) * L ^ 2 * (Ka * Kb) := by ring - _ = (1 + C) ^ 2 * P.X T ^ (3/4 : ℝ) * L ^ 2 * (Ka * Kb) := by rw [hEX] - · have h1 : |z.re - a| * (A * B) ≤ (2 * C * E * Ka) * ((1 + C) * E * L * Kb) := by - calc |z.re - a| * (A * B) = (|z.re - a| * A) * B := by ring - _ ≤ (2 * C * E * Ka) * ((1 + C) * E * L * Kb) := mul_le_mul ha1 hb0 hB (by positivity) - have h2 : |z.re - b| * (A * B) ≤ ((1 + C) * E * L * Ka) * (2 * C * E * Kb) := by - calc |z.re - b| * (A * B) = A * (|z.re - b| * B) := by ring - _ ≤ ((1 + C) * E * L * Ka) * (2 * C * E * Kb) := mul_le_mul ha0 hb1 (by positivity) (by positivity) - calc (|z.re - a| + |z.re - b|) * (A * B) = |z.re - a| * (A * B) + |z.re - b| * (A * B) := by ring - _ ≤ (2 * C * E * Ka) * ((1 + C) * E * L * Kb) + ((1 + C) * E * L * Ka) * (2 * C * E * Kb) := - add_le_add h1 h2 - _ = 4 * C * (1 + C) * (E * E) * L * (Ka * Kb) := by ring - _ = 4 * C * (1 + C) * P.X T ^ (3/4 : ℝ) * L * (Ka * Kb) := by rw [hEX] - -end Bounds - -/-! ## C. the consumer statements -/ - -/-- **the pair-weight bounds at any |Im z| ≤ 3/4.** -/ -theorem paperFT_kfun_bounds {Pf : ℝ → Params} (hPf : FamilyHyps Pf) : - ∃ C T₁ : ℝ, 0 ≤ C ∧ ∀ T : ℝ, T₁ ≤ T → ∀ (k l : ℤ) (z : ℂ), |z.im| ≤ 3/4 → - ‖paperFT (kfun (Pf T) T k l) z‖ - ≤ C * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re) ∧ - (|z.re - (Pf T).tau T k| + |z.re - (Pf T).tau T l|) * ‖paperFT (kfun (Pf T) T k l) z‖ - ≤ C * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re) := by - obtain ⟨C, T₁, hC1, hW⟩ := hPf.windowAt - have hC : 0 ≤ C := le_trans zero_le_one hC1 - refine ⟨4 * (1 + C) ^ 2, T₁, by positivity, fun T hT k l z hz => ?_⟩ - have w := hW T hT - rw [w.paperFT_kfun k l z] - obtain ⟨h1, h2⟩ := pair_bounds_le w z hz ((Pf T).tau T k) ((Pf T).tau T l) - have hKK : 0 ≤ (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re) := by - have := cauchyK_nonneg ((Pf T).tau T k) z.re - have := cauchyK_nonneg ((Pf T).tau T l) z.re - have : 0 ≤ (Pf T).X T ^ (3/4 : ℝ) := Real.rpow_nonneg (Real.exp_pos _).le _ - positivity - have hKK1 : 0 ≤ (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re) := by - have := cauchyK_nonneg ((Pf T).tau T k) z.re - have := cauchyK_nonneg ((Pf T).tau T l) z.re - have : 0 ≤ (Pf T).X T ^ (3/4 : ℝ) := Real.rpow_nonneg (Real.exp_pos _).le _ - have : 0 ≤ (Pf T).L T := le_trans zero_le_one w.one_le_L - positivity - have hc1 : (1 + C) ^ 2 ≤ 4 * (1 + C) ^ 2 := by nlinarith [sq_nonneg (1 + C)] - have hc2 : 4 * C * (1 + C) ≤ 4 * (1 + C) ^ 2 := by nlinarith - constructor - · calc ‖(Pf T).phiHat T (z - (Pf T).tau T k) * (Pf T).phiHat T (z - (Pf T).tau T l)‖ - ≤ (1 + C) ^ 2 * ((Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re)) := by - simpa only [cauchyK, mul_assoc] using h1 - _ ≤ 4 * (1 + C) ^ 2 * ((Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re)) := - mul_le_mul_of_nonneg_right hc1 hKK - _ = _ := by ring - · calc (|z.re - (Pf T).tau T k| + |z.re - (Pf T).tau T l|) * - ‖(Pf T).phiHat T (z - (Pf T).tau T k) * (Pf T).phiHat T (z - (Pf T).tau T l)‖ - ≤ 4 * C * (1 + C) * ((Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re)) := by - simpa only [cauchyK, mul_assoc] using h2 - _ ≤ 4 * (1 + C) ^ 2 * ((Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re)) := - mul_le_mul_of_nonneg_right hc2 hKK1 - _ = _ := by ring - -/-- ĥ for the mirrored pair test function. -/ -theorem paperFT_kfun_neg (P : Params) (T : ℝ) (k l : ℤ) (z : ℂ) : - paperFT (fun u => kfun P T k l (-u)) z = paperFT (kfun P T k l) (-z) := - paperFT_comp_neg _ z - -/-! ## D. (W0) for kfun and its mirror, same threshold as the bounds -/ - -/-- **(W0)** regularity and support of kfun and of u ↦ kfun(−u). -/ -theorem kfun_regular' {Pf : ℝ → Params} (hPf : FamilyHyps Pf) : - ∃ T₁ : ℝ, ∀ T : ℝ, T₁ ≤ T → ∀ k l : ℤ, - (ContDiff ℝ 2 (kfun (Pf T) T k l) ∧ HasCompactSupport (kfun (Pf T) T k l) ∧ - tsupport (kfun (Pf T) T k l) ⊆ Icc (-(Pf T).L T) ((Pf T).L T)) ∧ - (ContDiff ℝ 2 (fun u => kfun (Pf T) T k l (-u)) ∧ HasCompactSupport (fun u => kfun (Pf T) T k l (-u)) ∧ - tsupport (fun u => kfun (Pf T) T k l (-u)) ⊆ Icc (-(Pf T).L T) ((Pf T).L T)) ∧ - 1 ≤ (Pf T).L T := by - obtain ⟨C, T₁, _, hW⟩ := hPf.windowAt - refine ⟨T₁, fun T hT k l => ?_⟩ - have w := hW T hT - exact ⟨⟨w.kfun_contDiff k l, w.kfun_hasCompactSupport k l, w.kfun_tsupport k l⟩, - ⟨w.kfun_neg_contDiff k l, w.kfun_neg_hasCompactSupport k l, w.kfun_neg_tsupport k l⟩, w.one_le_L⟩ - -/-- All weight facts under one threshold and one constant, in the form consumed by `Hardy/EFMain`. -/ -theorem kfun_facts {Pf : ℝ → Params} (hPf : FamilyHyps Pf) : - ∃ C T₁ : ℝ, 0 ≤ C ∧ ∀ T : ℝ, T₁ ≤ T → ∀ k l : ℤ, - (ContDiff ℝ 2 (kfun (Pf T) T k l) ∧ HasCompactSupport (kfun (Pf T) T k l) ∧ - tsupport (kfun (Pf T) T k l) ⊆ Icc (-(Pf T).L T) ((Pf T).L T)) ∧ - (ContDiff ℝ 2 (fun u => kfun (Pf T) T k l (-u)) ∧ HasCompactSupport (fun u => kfun (Pf T) T k l (-u)) ∧ - tsupport (fun u => kfun (Pf T) T k l (-u)) ⊆ Icc (-(Pf T).L T) ((Pf T).L T)) ∧ - 1 ≤ (Pf T).L T ∧ - ∀ z : ℂ, |z.im| ≤ 3/4 → - ‖paperFT (kfun (Pf T) T k l) z‖ - ≤ C * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T ^ 2 * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re) ∧ - (|z.re - (Pf T).tau T k| + |z.re - (Pf T).tau T l|) * ‖paperFT (kfun (Pf T) T k l) z‖ - ≤ C * (Pf T).X T ^ (3/4 : ℝ) * (Pf T).L T * - (cauchyK ((Pf T).tau T k) z.re * cauchyK ((Pf T).tau T l) z.re) := by - obtain ⟨T₀, h0⟩ := kfun_regular' hPf - obtain ⟨C, T₁, hC, h1⟩ := paperFT_kfun_bounds hPf - refine ⟨C, max T₀ T₁, hC, fun T hT k l => ?_⟩ - obtain ⟨a, b, c⟩ := h0 T (le_trans (le_max_left _ _) hT) k l - exact ⟨a, b, c, fun z hz => h1 T (le_trans (le_max_right _ _) hT) k l z hz⟩ - -end HW -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/GoodHeightsW.lean b/zeta23/Zeta23/XiPrime/Hardy/GoodHeightsW.lean deleted file mode 100644 index a0d193b60f..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/GoodHeightsW.lean +++ /dev/null @@ -1,185 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/GoodHeightsW.lean — good heights for the W contour integrand F_𝒵 := L₂ + W′/W -(consumed by Hardy/EFContour.lean; W-analogue of Zeta23/XiPrime/ZeroCount/GoodHeights.lean). - - hardyW_good_heights (hZ : WZerosInStrip t₀) (hs : WSeam t₀) : - ∃ C > 0, ∃ j₀ ≥ t₀ + 1, ∀ j ≥ j₀, ∃ R ∈ [j, j+1], ∀ s, Im s = ±R → −1 ≤ Re s ≤ 2 → - W(s) ≠ 0 ∧ ‖L₂(s) + W′/W(s)‖ ≤ C·log²(j+3). - -Route: on 1/2 ≤ Re s ≤ 2 this is the GENERIC two-line machine (ZeroCount/Generic.good_heights_two_line) at f := W with -the inputs of Hardy/Count.hardyW_generic_inputs (W analytic on the discs about 2+it, ‖W‖ ≤ C|Im|², -‖W(2+it)‖ ≥ 1) and the configuration wZeros hZ hs, plus ‖L₂(s)‖ ≤ log(|Im s|+3) + 6 there (Stirling via -ZeroCount.norm_logDeriv_Gammaℝ_le_log, the (1−s)-half shifted by Hardy/TwoLine.logDeriv_Gammaℝ_shift); on -−1 ≤ Re s < 1/2 by the ODD symmetry F_𝒵(1−s) = −F_𝒵(s), which is the logarithmic derivative of the functional -equation W(s) = −χ(s)W(1−s) (χ′/χ = −2L₂, L₂(1−s) = L₂(s)). --/ -import Zeta23.XiPrime.Hardy.Count - -open Complex Set Filter Topology Metric -open scoped ComplexConjugate - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy - -variable {t₀ : ℝ} - -/-! ### ‖L₂‖ ≪ log on 1/2 ≤ Re s ≤ 2 -/ - -/-- ‖L₂(s)‖ ≤ log(|Im s| + 3) + 6 for 1/2 ≤ Re s ≤ 2, |Im s| ≥ 2. -/ -theorem norm_L2_le_log {s : ℂ} (hre : 1 / 2 ≤ s.re) (hre' : s.re ≤ 2) (him : 2 ≤ |s.im|) : - ‖L2 s‖ ≤ Real.log (|s.im| + 3) + 6 := by - have hs : s.im ≠ 0 := by intro h; rw [h] at him; norm_num at him - rw [L2_eq hs] - have h1 : ‖logDeriv Gammaℝ s‖ ≤ Real.log (|s.im| + 3) + 5 := - Zeta23.XiPrime.ZeroCount.norm_logDeriv_Gammaℝ_le_log (by linarith) (by linarith) him - -- the (1−s)-term: shift to 3 − s - have hu : (1 - s).im ≠ 0 := im_one_sub_ne_zero hs - have hshift := logDeriv_Gammaℝ_shift hu - have e3 : (1 - s) + 2 = 3 - s := by ring - rw [e3] at hshift - have h3re : 0 < (3 - s).re := by simp; linarith - have h3re' : (3 - s).re ≤ 4 := by simp; linarith - have h3im : 2 ≤ |(3 - s).im| := by simpa using him - have h2 : ‖logDeriv Gammaℝ (3 - s)‖ ≤ Real.log (|s.im| + 3) + 5 := by - have := Zeta23.XiPrime.ZeroCount.norm_logDeriv_Gammaℝ_le_log h3re h3re' h3im - simpa using this - have hinv : ‖1 / (1 - s)‖ ≤ 1 / 2 := by - rw [norm_div, norm_one] - have : 2 ≤ ‖1 - s‖ := by - have h := Complex.abs_im_le_norm (1 - s) - simp at h; linarith - rw [div_le_div_iff₀ (by linarith) (by norm_num)] - linarith - have h2' : ‖logDeriv Gammaℝ (1 - s)‖ ≤ Real.log (|s.im| + 3) + 5 + 1 / 2 := by - rw [hshift] - exact (norm_sub_le _ _).trans (add_le_add h2 hinv) - have hlog : 0 ≤ Real.log (|s.im| + 3) := Real.log_nonneg (by linarith [abs_nonneg s.im]) - calc ‖(logDeriv Gammaℝ s + logDeriv Gammaℝ (1 - s)) / 2‖ - = ‖logDeriv Gammaℝ s + logDeriv Gammaℝ (1 - s)‖ / 2 := by rw [norm_div]; norm_num - _ ≤ (‖logDeriv Gammaℝ s‖ + ‖logDeriv Gammaℝ (1 - s)‖) / 2 := by gcongr; exact norm_add_le _ _ - _ ≤ Real.log (|s.im| + 3) + 6 := by linarith - -/-! ### the odd symmetry of F_𝒵 = L₂ + W′/W -/ - -/-- logarithmic derivative of W(s) = −χ(s)W(1−s): W′/W(s) = −2L₂(s) − (W′/W)(1−s) (off ℝ, W(s) ≠ 0). -/ -theorem logDeriv_hardyW_eq_reflect {s : ℂ} (hs : s.im ≠ 0) (hW : hardyW s ≠ 0) : - logDeriv hardyW s = -2 * L2 s - logDeriv hardyW (1 - s) := by - have hs' : (1 - s).im ≠ 0 := im_one_sub_ne_zero hs - have hW' : hardyW (1 - s) ≠ 0 := fun h => hW ((hardyW_one_sub_eq_zero_iff hs).mp h) - have hχ : chiFE s ≠ 0 := chiFE_ne_zero hs - -- the functional equation as an identity of functions near s - have hev : hardyW =ᶠ[𝓝 s] fun z => (-1 : ℂ) * (chiFE z * hardyW (1 - z)) := by - filter_upwards [isOpen_im_ne_zero.mem_nhds hs] with z hz - rw [hardyW_eq_neg_chiFE_mul hz]; ring - have h1 : logDeriv hardyW s = logDeriv (fun z => (-1 : ℂ) * (chiFE z * hardyW (1 - z))) s := by - rw [logDeriv_apply, logDeriv_apply, hev.deriv_eq, hev.eq_of_nhds] - have hdχ : DifferentiableAt ℂ chiFE s := (chiFE_analyticAt hs).differentiableAt - have hdg : DifferentiableAt ℂ (fun z : ℂ => 1 - z) s := by fun_prop - have hdW1 : DifferentiableAt ℂ (fun z => hardyW (1 - z)) s := - (hardyW_differentiableAt hs').comp s hdg - have h2 : logDeriv (fun z => chiFE z * hardyW (1 - z)) s - = logDeriv chiFE s + logDeriv (fun z => hardyW (1 - z)) s := - logDeriv_mul s hχ hW' hdχ hdW1 - have h3 : logDeriv (fun z => hardyW (1 - z)) s = -logDeriv hardyW (1 - s) := by - have hc : logDeriv (hardyW ∘ fun z : ℂ => 1 - z) s - = logDeriv hardyW (1 - s) * deriv (fun z : ℂ => 1 - z) s := - logDeriv_comp (hardyW_differentiableAt hs') hdg - have hd : deriv (fun z : ℂ => 1 - z) s = -1 := by - rw [deriv_const_sub, deriv_id''] - have : (hardyW ∘ fun z : ℂ => 1 - z) = fun z => hardyW (1 - z) := rfl - rw [this] at hc - rw [hc, hd]; ring - have hL : logDeriv chiFE s = -2 * L2 s := by - simp only [L2]; ring - rw [h1, logDeriv_const_mul s (-1 : ℂ) (by norm_num), h2, h3, hL] - ring - -/-- **F_𝒵(1−s) = −F_𝒵(s)**, F_𝒵 := L₂ + W′/W (off ℝ, at points where W ≠ 0). -/ -theorem L2_add_logDeriv_hardyW_one_sub {s : ℂ} (hs : s.im ≠ 0) (hW : hardyW s ≠ 0) : - L2 (1 - s) + logDeriv hardyW (1 - s) = -(L2 s + logDeriv hardyW s) := by - rw [logDeriv_hardyW_eq_reflect hs hW, L2_one_sub hs]; ring - -/-! ### good heights -/ - -/-- **Good heights for F_𝒵 = L₂ + W′/W.** -/ -theorem hardyW_good_heights (hZ : WZerosInStrip t₀) (hs : WSeam t₀) : - ∃ C : ℝ, 0 < C ∧ ∃ j₀ : ℕ, t₀ + 1 ≤ j₀ ∧ ∀ j : ℕ, j₀ ≤ j → - ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ - ∀ s : ℂ, (s.im = R ∨ s.im = -R) → -1 ≤ s.re → s.re ≤ 2 → - hardyW s ≠ 0 ∧ ‖L2 s + logDeriv hardyW s‖ ≤ C * (Real.log ((j : ℝ) + 3)) ^ 2 := by - classical - obtain ⟨Cf, t₁, hCf, ht₁2, hfa, hgrow, hlow⟩ := hardyW_generic_inputs - set Zc := wZeros hZ hs with hZc - set T₀ : ℝ := max t₁ t₀ with hT₀ - have hfa' : ∀ t : ℝ, T₀ ≤ |t| → AnalyticOnNhd ℂ hardyW (closedBall (2 + t * I) (91 / 50)) := - fun t ht => hfa t (le_trans (le_max_left _ _) ht) - have hlow' : ∀ t : ℝ, T₀ ≤ |t| → 1 ≤ ‖hardyW (2 + t * I)‖ := - fun t ht => hlow t (le_trans (le_max_left _ _) ht) - have hlink : ∀ ρ ∈ Zc.carrier, 1 / 2 ≤ ρ.re → hardyW ρ = 0 ∧ analyticOrderNatAt hardyW ρ = Zc.mult ρ := - fun ρ hρ _ => ⟨hρ.1.1, rfl⟩ - have hlink' : ∀ ρ : ℂ, 0 < ρ.re → T₀ ≤ |ρ.im| → hardyW ρ = 0 → ρ ∈ Zc.carrier := by - intro ρ _ hT h0 - have him : ρ.im ≠ 0 := by - intro h; rw [h, abs_zero] at hT - linarith [le_trans ht₁2 (le_max_left t₁ t₀)] - exact ⟨⟨h0, him⟩, le_trans (le_max_right _ _) hT⟩ - obtain ⟨C, hC, j₀, hgh⟩ := - Zeta23.XiPrime.ZeroCount.Generic.good_heights_two_line hfa' hCf hgrow hlow' Zc hlink hlink' - refine ⟨C + 10, by positivity, max (max j₀ 2) (⌈t₀⌉₊ + 1), ?_, fun j hj => ?_⟩ - · have h1 : t₀ ≤ ⌈t₀⌉₊ := Nat.le_ceil t₀ - have h2 : ((⌈t₀⌉₊ + 1 : ℕ) : ℝ) ≤ ((max (max j₀ 2) (⌈t₀⌉₊ + 1) : ℕ) : ℝ) := by - exact_mod_cast le_max_right _ _ - push_cast at h2 ⊢; linarith - have hj₀ : j₀ ≤ j := le_trans (le_trans (le_max_left _ _) (le_max_left _ _)) hj - have hj2 : (2 : ℝ) ≤ j := by exact_mod_cast le_trans (le_trans (le_max_right _ _) (le_max_left _ _)) hj - obtain ⟨R, hR1, hR2, hright⟩ := hgh j hj₀ - refine ⟨R, hR1, hR2, ?_⟩ - set Lg : ℝ := Real.log ((j : ℝ) + 3) with hLg - have hLg1 : 1 ≤ Lg := by - rw [hLg, ← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - have hlogR : Real.log (R + 3) ≤ 2 * Lg := by - have hlog2 : Real.log 2 ≤ Lg := by rw [hLg]; exact Real.log_le_log (by norm_num) (by linarith) - calc Real.log (R + 3) ≤ Real.log (2 * ((j:ℝ) + 3)) := Real.log_le_log (by linarith) (by linarith) - _ = Real.log 2 + Lg := by rw [Real.log_mul (by norm_num) (by linarith)] - _ ≤ 2 * Lg := by linarith - -- right half first, with the L₂ term added - have right : ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → - hardyW s ≠ 0 ∧ ‖L2 s + logDeriv hardyW s‖ ≤ (C + 10) * Lg ^ 2 := by - intro s hsR h1 h2 - obtain ⟨hW, hb⟩ := hright s hsR h1 h2 - have habs : |s.im| = R := by - rcases hsR with h | h - · rw [h, abs_of_nonneg (by linarith)] - · rw [h, abs_neg, abs_of_nonneg (by linarith)] - have hL2 : ‖L2 s‖ ≤ 2 * Lg + 6 := by - have := norm_L2_le_log h1 h2 (by rw [habs]; linarith) - rw [habs] at this; linarith - refine ⟨hW, (norm_add_le _ _).trans ?_⟩ - have : Lg ≤ Lg ^ 2 := by nlinarith - nlinarith [hb, hL2] - intro s hsR hσ1 hσ2 - rcases le_or_gt (1 / 2 : ℝ) s.re with h | h - · exact right s hsR h hσ2 - · have hsim : s.im ≠ 0 := by - rcases hsR with h' | h' <;> rw [h'] <;> [skip; rw [neg_ne_zero]] <;> linarith - have h1 : (1 - s).im = R ∨ (1 - s).im = -R := by - rcases hsR with h' | h' <;> simp [h'] - obtain ⟨hne, hb⟩ := right (1 - s) h1 (by simp; linarith) (by simp; linarith) - have hWs : hardyW s ≠ 0 := fun h0 => hne ((hardyW_one_sub_eq_zero_iff hsim).mpr h0) - refine ⟨hWs, ?_⟩ - rw [L2_add_logDeriv_hardyW_one_sub hsim hWs, norm_neg] at hb - exact hb - -end Hardy -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/GramBridgeW.lean b/zeta23/Zeta23/XiPrime/Hardy/GramBridgeW.lean deleted file mode 100644 index ad4155c89a..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/GramBridgeW.lean +++ /dev/null @@ -1,138 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/GramBridgeW.lean — the pole-weight-2 Gram bridge for the W (= Z′) explicit formula -(adaptation of ExplicitFormula/GramBridge.lean (S2)/(S3) with ν ↦ nucW 2 = μ + 2·Π_X + P_c -[XF′ Prop 9.1 / Thm 9.2(a): the pole weight doubles]). - - literatureRHSW k := 2·(ĥ(i/2) + ĥ(−i/2)) − Σ_n Λ(n)n^{-1/2}(k(log n) + k(−log n)) + (1/2π)∫ ĥ·γ-bracket - = literatureRHS k + (ĥ(i/2) + ĥ(−i/2)) (literatureRHSW_eq) - literatureRHSW (kfun) = ∫ ĥ(τ)·nucW 2 X (−Λ) (τ) dτ (literatureRHSW_eq_integral_nucW) - nucW ϖ X (C(·;Λ⋆)) = nucW ϖ X (−Λ) + P_{C+Λ}(X) (nucW_xiCoeff_eq') - M^𝒵_{kl} = GentryW1 = literatureRHSW (kfun) + ∫ ĥ·P_{cJ} given the density split (GentryW1_eq) --/ -import Zeta23.XiPrime.ExplicitFormula.GramBridge -import Zeta23.XiPrime.ExplicitFormula.PrimeTermJ -import Zeta23.XiPrime.StatementW -import Zeta23.ExplicitFormula.Bridge - -open scoped ComplexConjugate FourierTransform ArithmeticFunction -open Complex MeasureTheory Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Zeta23.EF - -/-- the literature right-hand side with POLE WEIGHT 2 (the W / Z′ explicit formula). -/ -def literatureRHSW (k : ℝ → ℂ) : ℂ := - 2 * (paperFT k (I / 2) + paperFT k (-I / 2)) - - (∑' n : ℕ, ((Λ n / Real.sqrt n : ℝ) : ℂ) * (k (Real.log n) + k (-Real.log n))) - + (1 / (2 * Real.pi) : ℂ) * ∫ r : ℝ, paperFT k r * ((gammaBracket r : ℝ) : ℂ) - -theorem literatureRHSW_eq (k : ℝ → ℂ) : - literatureRHSW k = literatureRHS k + (paperFT k (I / 2) + paperFT k (-I / 2)) := by - unfold literatureRHSW literatureRHS - ring - -/-- ν with pole weight ϖ for the ξ′/W coefficients splits off the ζ density: -nucW ϖ X (C(·;Λ⋆)) = nucW ϖ X (−Λ) + P_{C+Λ}(X). -/ -theorem nucW_xiCoeff_eq' (cPi X : ℝ) (Λs : ℂ) (τ : ℝ) : - nucW cPi X (xiCoeff Λs) τ - = nucW cPi X (fun N => -((Λ N : ℝ) : ℂ)) τ + Pc X (fun N => xiCoeff Λs N + ((Λ N : ℝ) : ℂ)) τ := by - have hsplit : Pc X (xiCoeff Λs) τ - = Pc X (fun N => -((Λ N : ℝ) : ℂ)) τ + Pc X (fun N => xiCoeff Λs N + ((Λ N : ℝ) : ℂ)) τ := by - rw [← Pc_add] - exact Pc_congr (fun N _ => by ring) τ - simp only [nucW] - rw [hsplit] - ring - -/-- nucW 2 X (−Λ) = ν_X + Π_X pointwise. -/ -theorem nucW_two_neg_vonMangoldt (X τ : ℝ) : - nucW 2 X (fun N => -((Λ N : ℝ) : ℂ)) τ = nuX X τ + PiX X τ := by - simp only [nucW, nuX, Pc_neg_vonMangoldt] - ring - -section Pair -variable (P : Params) (T : ℝ) - -/-- **literatureRHSW (f_k ⋆ f̃_l) = ∫ ĥ(τ)·[μ + 2Π_X + P_X](τ) dτ**, X = e^L. -/ -theorem literatureRHSW_eq_integral_nucW (hφC2 : ContDiff ℝ 2 (fun u => (P.phi T u : ℂ))) - (hφsupp : tsupport (P.phi T) ⊆ Icc (-(P.L T / 2)) (P.L T / 2)) (hL : 0 < P.L T) (k l : ℤ) : - literatureRHSW (kfun P T k l) - = ∫ τ : ℝ, paperFT (kfun P T k l) τ * ((nucW 2 (P.X T) (fun N => -((Λ N : ℝ) : ℂ)) τ : ℝ) : ℂ) := by - have hkd := pairTest_contDiff P T hφC2 hφsupp k l - have hkc := pairTest_hasCompactSupport P T hφsupp k l - have hks := tsupport_pairTest P T hφsupp k l - have hFk := Zeta23.EF.integrable_fourier_of_contDiff_two hkd hkc - have hμ := Zeta23.EF.integrable_paperFT_mul_mu hkd hkc Zeta23.gammaFacts - have hnu : Integrable (fun τ : ℝ => paperFT (kfun P T k l) τ * (nuX (P.X T) τ : ℂ)) := - integrable_paperFT_pairTest_mul_nuX P T hφC2 hφsupp hL k l - have hPi : Integrable (fun τ : ℝ => paperFT (kfun P T k l) τ * (PiX (P.X T) τ : ℂ)) := - Zeta23.EF.integrable_paperFT_mul_PiX hL hFk - rw [literatureRHSW_eq, Zeta23.EF.literatureRHS_eq_integral_nu hL hkd.continuous hks hFk hμ, - Zeta23.EF.pole_term hL hkd.continuous hks hFk] - change (∫ τ : ℝ, paperFT (kfun P T k l) τ * (nuX (P.X T) τ : ℂ)) - + (∫ τ : ℝ, paperFT (kfun P T k l) τ * (PiX (P.X T) τ : ℂ)) = _ - rw [← integral_add hnu hPi] - refine integral_congr_ae (ae_of_all _ fun τ => ?_) - dsimp only - rw [nucW_two_neg_vonMangoldt] - push_cast - ring - -/-- integrability of ĥ·nucW 2 X (−Λ). -/ -theorem integrable_paperFT_pairTest_mul_nucW2 (hφC2 : ContDiff ℝ 2 (fun u => (P.phi T u : ℂ))) - (hφsupp : tsupport (P.phi T) ⊆ Icc (-(P.L T / 2)) (P.L T / 2)) (hL : 0 < P.L T) (k l : ℤ) : - Integrable (fun τ : ℝ => - paperFT (kfun P T k l) τ * ((nucW 2 (P.X T) (fun N => -((Λ N : ℝ) : ℂ)) τ : ℝ) : ℂ)) := by - have hkd := pairTest_contDiff P T hφC2 hφsupp k l - have hkc := pairTest_hasCompactSupport P T hφsupp k l - have hFk := Zeta23.EF.integrable_fourier_of_contDiff_two hkd hkc - have hnu : Integrable (fun τ : ℝ => paperFT (kfun P T k l) τ * (nuX (P.X T) τ : ℂ)) := - integrable_paperFT_pairTest_mul_nuX P T hφC2 hφsupp hL k l - have hPi : Integrable (fun τ : ℝ => paperFT (kfun P T k l) τ * (PiX (P.X T) τ : ℂ)) := - Zeta23.EF.integrable_paperFT_mul_PiX hL hFk - refine (hnu.add hPi).congr (ae_of_all _ fun τ => ?_) - simp only [Pi.add_apply] - rw [nucW_two_neg_vonMangoldt] - push_cast - ring - -/-- **M^𝒵_{kl} = literatureRHSW + J-term**: the entry-dependent W main term splits as the pole-weight-2 literature -RHS plus ∫ ĥ·P_{cJ}, given the density decomposition nucW 2 X (C(·; L_{2⋆})) = nucW 2 X (−Λ) + P_{cJ}(X). -/ -theorem GentryW1_eq (hφC2 : ContDiff ℝ 2 (fun u => (P.phi T u : ℂ))) - (hφsupp : tsupport (P.phi T) ⊆ Icc (-(P.L T / 2)) (P.L T / 2)) (hL : 0 < P.L T) - (k l : Fin (P.d T)) (cJ : ℕ → ℂ) - (hnuc : ∀ τ : ℝ, nucW 2 (P.X T) (xiCoeff (((L2star (P.tauStar T k l)) : ℝ) : ℂ)) τ - = nucW 2 (P.X T) (fun N => -((Λ N : ℝ) : ℂ)) τ + Pc (P.X T) cJ τ) - (hint : Integrable (fun τ : ℝ => paperFT (kfun P T k l) τ * ((Pc (P.X T) cJ τ : ℝ) : ℂ))) : - (((P.GentryW1 T k l : ℝ)) : ℂ) - = literatureRHSW (kfun P T k l) + ∫ τ : ℝ, paperFT (kfun P T k l) τ * ((Pc (P.X T) cJ τ : ℝ) : ℂ) := by - have hW : ∀ τ : ℝ, ((P.phiHatR T (τ - P.tau T k) : ℝ) : ℂ) * ((P.phiHatR T (τ - P.tau T l) : ℝ) : ℂ) - = paperFT (kfun P T k l) τ := fun τ => by - rw [← Complex.ofReal_mul, paperFT_pairTest_ofReal P T hφC2 hφsupp k l τ] - have hmain := integrable_paperFT_pairTest_mul_nucW2 P T hφC2 hφsupp hL k l - rw [literatureRHSW_eq_integral_nucW P T hφC2 hφsupp hL] - unfold Params.GentryW1 Params.GentryCW - rw [← integral_complex_ofReal] - have h1 : ∀ τ : ℝ, - ((P.phiHatR T (τ - P.tau T k) * P.phiHatR T (τ - P.tau T l) - * nucW 2 (P.X T) (xiCoeff (((L2star (P.tauStar T k l)) : ℝ) : ℂ)) τ : ℝ) : ℂ) - = paperFT (kfun P T k l) τ * ((nucW 2 (P.X T) (fun N => -((Λ N : ℝ) : ℂ)) τ : ℝ) : ℂ) - + paperFT (kfun P T k l) τ * ((Pc (P.X T) cJ τ : ℝ) : ℂ) := by - intro τ - rw [hnuc τ]; push_cast; rw [hW τ]; ring - simp_rw [h1] - rw [integral_add hmain hint] - -end Pair - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/Omega.lean b/zeta23/Zeta23/XiPrime/Hardy/Omega.lean deleted file mode 100644 index e9565d4143..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/Omega.lean +++ /dev/null @@ -1,104 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/Omega.lean — the completed object Ω := Γℝ·W. - -W(s) = −χ(s)W(1−s) with χ = Γℝ(1−s)/Γℝ(s) says exactly that Ω(s) := Γℝ(s)·W(s) is ODD under s ↦ 1−s off the real -axis: Ω(1−s) = −Ω(s); also Ω(s̄) = conj Ω(s). So Ω plays for W the role ξ′ plays for itself in -Zeta23/XiPrime/ZeroCount/Contour.lean: logDeriv Ω (1−s̄) = −conj logDeriv Ω (s) (the fold), Ω is analytic off ℝ with the -same zeros and orders as W there, and logDeriv Ω = Γℝ′/Γℝ + W′/W (the split; Γℝ′/Γℝ gives the main term). --/ -import Zeta23.XiPrime.Hardy.Seam - -open Complex Set Filter Topology Metric -open scoped ComplexConjugate - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy - -/-- Ω := Γℝ · W. -/ -def omegaW (s : ℂ) : ℂ := Gammaℝ s * hardyW s - -lemma omegaW_def (s : ℂ) : omegaW s = Gammaℝ s * hardyW s := rfl - -theorem omegaW_analyticAt {s : ℂ} (hs : s.im ≠ 0) : AnalyticAt ℂ omegaW s := - (analyticAt_Gammaℝ_of_im_ne_zero hs).mul (hardyW_analyticAt hs) - -theorem omegaW_analyticOnNhd {U : Set ℂ} (hU : U ⊆ {s : ℂ | s.im ≠ 0}) : AnalyticOnNhd ℂ omegaW U := - fun _ hs => omegaW_analyticAt (hU hs) - -theorem omegaW_eq_zero_iff {s : ℂ} (hs : s.im ≠ 0) : omegaW s = 0 ↔ hardyW s = 0 := by - rw [omegaW, mul_eq_zero]; exact ⟨fun h => h.resolve_left (Gammaℝ_ne_zero_of_im_ne_zero hs), Or.inr⟩ - -/-- Ω and W have the same order at non-real points. -/ -theorem analyticOrderAt_omegaW {s : ℂ} (hs : s.im ≠ 0) : analyticOrderAt omegaW s = analyticOrderAt hardyW s := by - have h0 : analyticOrderAt Gammaℝ s = 0 := - (analyticAt_Gammaℝ_of_im_ne_zero hs).analyticOrderAt_eq_zero.mpr (Gammaℝ_ne_zero_of_im_ne_zero hs) - have e : omegaW = Gammaℝ * hardyW := funext fun z => rfl - rw [e, analyticOrderAt_mul (analyticAt_Gammaℝ_of_im_ne_zero hs) (hardyW_analyticAt hs), h0, zero_add] - -theorem analyticOrderNatAt_omegaW {s : ℂ} (hs : s.im ≠ 0) : analyticOrderNatAt omegaW s = wMult s := by - unfold analyticOrderNatAt wMult; rw [analyticOrderAt_omegaW hs] - -/-- **Ω(1−s) = −Ω(s)** off the real axis. -/ -theorem omegaW_one_sub {s : ℂ} (hs : s.im ≠ 0) : omegaW (1 - s) = -omegaW s := by - have hs' := im_one_sub_ne_zero hs - rw [omegaW, omegaW, hardyW_eq_neg_chiFE_mul hs, chiFE_def] - field_simp [Gammaℝ_ne_zero_of_im_ne_zero hs] - -theorem omegaW_conj {s : ℂ} (hs : s.im ≠ 0) : omegaW (conj s) = conj (omegaW s) := by - rw [omegaW, omegaW, Zeta23.RvM.Gammaℝ_conj, hardyW_conj hs, map_mul] - -theorem omegaW_differentiableAt {s : ℂ} (hs : s.im ≠ 0) : DifferentiableAt ℂ omegaW s := - (omegaW_analyticAt hs).differentiableAt - -/-- Ω′(1−s) = Ω′(s). -/ -theorem deriv_omegaW_one_sub {s : ℂ} (hs : s.im ≠ 0) : deriv omegaW (1 - s) = deriv omegaW s := by - have hev : omegaW =ᶠ[𝓝 s] fun z => -omegaW (1 - z) := by - filter_upwards [isOpen_im_ne_zero.mem_nhds hs] with z hz - rw [omegaW_one_sub hz]; ring - rw [hev.deriv_eq] - have hd : DifferentiableAt ℂ omegaW (1 - s) := omegaW_differentiableAt (im_one_sub_ne_zero hs) - have h1 : deriv (fun z => omegaW (1 - z)) s = -deriv omegaW (1 - s) := by - rw [deriv_comp_const_sub] - have h2 : deriv (fun z => -omegaW (1 - z)) s = -deriv (fun z => omegaW (1 - z)) s := - deriv.neg (f := fun z => omegaW (1 - z)) - rw [h2, h1]; ring - -theorem deriv_omegaW_conj {s : ℂ} (hs : s.im ≠ 0) : deriv omegaW (conj s) = conj (deriv omegaW s) := by - refine deriv_conj_of_symm (omegaW_differentiableAt hs) ?_ - have hs' : (conj s).im ≠ 0 := by simpa using hs - filter_upwards [isOpen_im_ne_zero.mem_nhds hs'] with z hz - exact omegaW_conj hz - -theorem logDeriv_omegaW_one_sub {s : ℂ} (hs : s.im ≠ 0) : logDeriv omegaW (1 - s) = -logDeriv omegaW s := by - rw [logDeriv_apply, logDeriv_apply, deriv_omegaW_one_sub hs, omegaW_one_sub hs, div_neg] - -theorem logDeriv_omegaW_conj {s : ℂ} (hs : s.im ≠ 0) : - logDeriv omegaW (conj s) = conj (logDeriv omegaW s) := by - rw [logDeriv_apply, logDeriv_apply, deriv_omegaW_conj hs, omegaW_conj hs, map_div₀] - -/-- **the fold identity**: logDeriv Ω (1 − s̄) = −conj (logDeriv Ω s) off the real axis. -/ -theorem logDeriv_omegaW_one_sub_conj {s : ℂ} (hs : s.im ≠ 0) : - logDeriv omegaW (1 - conj s) = -conj (logDeriv omegaW s) := by - have hs' : (conj s).im ≠ 0 := by simpa using hs - rw [logDeriv_omegaW_one_sub hs', logDeriv_omegaW_conj hs] - -/-- **the split**: logDeriv Ω = Γℝ′/Γℝ + W′/W where W ≠ 0 (off the real axis). -/ -theorem logDeriv_omegaW_eq {s : ℂ} (hs : s.im ≠ 0) (hW : hardyW s ≠ 0) : - logDeriv omegaW s = logDeriv Gammaℝ s + logDeriv hardyW s := by - have e : omegaW = fun z => Gammaℝ z * hardyW z := funext fun z => rfl - rw [e, logDeriv_mul s (Gammaℝ_ne_zero_of_im_ne_zero hs) hW (differentiableAt_Gammaℝ_of_im_ne_zero hs) - (hardyW_differentiableAt hs)] - -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/Seam.lean b/zeta23/Zeta23/XiPrime/Hardy/Seam.lean deleted file mode 100644 index aa2ca10c56..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/Seam.lean +++ /dev/null @@ -1,141 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/Seam.lean — the SEAM facts for W := ζ′ − ½(χ′/χ)ζ (W zero side). - -Discharges `WSeam t₀` (Zeta23/XiPrime/Statement.lean §6) given t₀ > 0 and WZerosInStrip t₀: - theorem wSeam_of_strip (ht₀ : 0 < t₀) (hZ : WZerosInStrip t₀) : WSeam t₀ -(the strip hypothesis is used ONLY for finite_window; one_le_mult / reflect_zero / mult_reflect hold for every -non-real zero: Hardy/Basic.lean's functional equation + Schwarz reflection, and W ≢ 0 on each half-plane by the -explicit points 2 ± it₁ of Hardy/TwoLine.lean). --/ -import Zeta23.XiPrime.Hardy.TwoLine -import Zeta23.Analytic.RectangleLogDeriv -import Mathlib.Analysis.Complex.Convex - -open Complex Set Filter Topology Metric -open scoped ComplexConjugate - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy - -/-- In this import closure typeclass search does not find `ContinuousSMul ℝ ℂ` on its own; the convexity lemmas below need it, so the instance is supplied explicitly. -/ -local instance instContinuousSMulRealComplex : ContinuousSMul ℝ ℂ := - ⟨((Complex.continuous_ofReal.comp continuous_fst).mul continuous_snd).congr fun p => by - simp [Complex.real_smul]⟩ - -variable {t₀ : ℝ} - -/-! ### W ≢ 0 near any non-real point -/ - -theorem analyticOrderAt_hardyW_ne_top {s : ℂ} (hs : s.im ≠ 0) : analyticOrderAt hardyW s ≠ ⊤ := by - intro htop - rw [analyticOrderAt_eq_top] at htop - rcases lt_or_gt_of_ne hs with hneg | hpos - · -- lower half-plane - have hU : IsPreconnected {z : ℂ | z.im < 0} := (convex_halfSpace_im_lt 0).isPreconnected - have hall : EqOn hardyW 0 {z : ℂ | z.im < 0} := - (hardyW_analyticOnNhd.mono fun z (hz : z.im < 0) => hz.ne).eqOn_zero_of_preconnected_of_eventuallyEq_zero - hU hneg htop - obtain ⟨z, hz, hne⟩ := exists_hardyW_ne_zero_lower - exact hne (hall hz) - · have hU : IsPreconnected {z : ℂ | 0 < z.im} := (convex_halfSpace_im_gt 0).isPreconnected - have hall : EqOn hardyW 0 {z : ℂ | 0 < z.im} := - (hardyW_analyticOnNhd.mono fun z (hz : 0 < z.im) => hz.ne').eqOn_zero_of_preconnected_of_eventuallyEq_zero - hU hpos htop - obtain ⟨z, hz, hne⟩ := exists_hardyW_ne_zero_upper - exact hne (hall hz) - -theorem wMult_cast {ρ : ℂ} (hρ : ρ.im ≠ 0) : (wMult ρ : ℕ∞) = analyticOrderAt hardyW ρ := by - unfold wMult; exact ENat.coe_toNat (analyticOrderAt_hardyW_ne_top hρ) - -theorem analyticOrderNatAt_hardyW (ρ : ℂ) : analyticOrderNatAt hardyW ρ = wMult ρ := rfl - -/-- 1 ≤ m_ρ ↔ W(ρ) = 0, for non-real ρ. -/ -theorem one_le_wMult_iff {ρ : ℂ} (hρ : ρ.im ≠ 0) : 1 ≤ wMult ρ ↔ hardyW ρ = 0 := by - have ha := hardyW_analyticAt hρ - have h0 : wMult ρ = 0 ↔ hardyW ρ ≠ 0 := by - rw [← ha.analyticOrderAt_eq_zero, ← wMult_cast hρ]; norm_cast - constructor - · intro h; by_contra hne; have := h0.mpr hne; omega - · intro h; by_contra hlt; exact (h0.mp (by omega)) h - -/-! ### finiteness of height windows (uses the strip hypothesis) -/ - -/-- zeros of W with |Im| ≥ t₀ inside a compact height range are finite (in the half-strip [0,2] × [a,b], a ≥ t₀ > 0, -or its mirror image). -/ -theorem finite_upper (ht₀ : 0 < t₀) (hZ : WZerosInStrip t₀) (b : ℝ) : - ({ρ | IsWZero ρ ∧ t₀ ≤ |ρ.im|} ∩ {ρ | 0 < ρ.im ∧ ρ.im ≤ b}).Finite := by - obtain ⟨t₁, ht₁, hlow⟩ := hardyW_two_line_lower - set M : ℝ := max b (max t₁ t₀) with hM - set z : ℂ := (0 : ℂ) + (t₀ : ℝ) * I with hz - set w : ℂ := (2 : ℂ) + (M : ℝ) * I with hw - have hzre : z.re = 0 := by simp [hz] - have hzim : z.im = t₀ := by simp [hz] - have hwre : w.re = 2 := by simp [hw] - have hwim : w.im = M := by simp [hw] - have ht₀M : t₀ ≤ M := le_trans (le_max_right _ _) (le_max_right _ _) - have hmem : ∀ s : ℂ, 0 ≤ s.re → s.re ≤ 2 → t₀ ≤ s.im → s.im ≤ M → s ∈ Rectangle z w := by - intro s h1 h2 h3 h4 - simp only [Rectangle, mem_reProdIm, hzre, hzim, hwre, hwim, uIcc_of_le (by norm_num : (0:ℝ) ≤ 2), - uIcc_of_le ht₀M, mem_Icc] - exact ⟨⟨h1, h2⟩, ⟨h3, h4⟩⟩ - have hsub : Rectangle z w ⊆ {s : ℂ | s.im ≠ 0} := by - intro s hs - simp only [Rectangle, mem_reProdIm, hzim, hwim, uIcc_of_le ht₀M, mem_Icc] at hs - exact fun h0 => by linarith [hs.2.1] - have hx : (2 : ℂ) + (max t₁ t₀ : ℝ) * I ∈ Rectangle z w := - hmem _ (by simp) (by simp) (by simp) (by simp [hM]) - have hfx : hardyW ((2 : ℂ) + (max t₁ t₀ : ℝ) * I) ≠ 0 := by - intro h0 - have := (hlow (max t₁ t₀) (by rw [abs_of_pos (by positivity)]; exact le_max_left _ _)).2 - rw [h0, norm_zero] at this; linarith - have hfin := Zeta23.Analytic.finite_zeros_rectangle (hardyW_analyticOnNhd.mono hsub) hx hfx - refine hfin.subset ?_ - rintro ρ ⟨⟨⟨hρ0, hρim⟩, hρt⟩, hpos, hle⟩ - have habs : |ρ.im| = ρ.im := abs_of_pos hpos - obtain ⟨ha, hb⟩ := hZ ρ hρ0 hρt - refine ⟨hmem ρ ha.le (by linarith) (by rw [← habs]; exact hρt) (le_trans hle (le_max_left _ _)), ?_⟩ - simpa using hρ0 - -theorem finite_lower (ht₀ : 0 < t₀) (hZ : WZerosInStrip t₀) (a : ℝ) : - ({ρ | IsWZero ρ ∧ t₀ ≤ |ρ.im|} ∩ {ρ | a ≤ ρ.im ∧ ρ.im < 0}).Finite := by - -- the mirror image under conj of the upper set with b := −a - have h := (finite_upper ht₀ hZ (-a)).image conj - refine h.subset ?_ - rintro ρ ⟨⟨hρ, hρt⟩, ha, hneg⟩ - refine ⟨conj ρ, ⟨⟨?_, by simpa using hρt⟩, by simp; linarith, by simp; linarith⟩, Complex.conj_conj ρ⟩ - exact ⟨(hardyW_conj_eq_zero_iff hρ.2).mpr hρ.1, by simpa using hρ.2⟩ - -theorem finite_window_W (ht₀ : 0 < t₀) (hZ : WZerosInStrip t₀) (T₁ T₂ : ℝ) : - ({ρ | IsWZero ρ ∧ t₀ ≤ |ρ.im|} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}).Finite := by - refine ((finite_upper ht₀ hZ T₂).union (finite_lower ht₀ hZ T₁)).subset ?_ - rintro ρ ⟨hρ, h1, h2⟩ - rcases lt_or_gt_of_ne hρ.1.2 with hneg | hpos - · exact Or.inr ⟨hρ, h1.le, hneg⟩ - · exact Or.inl ⟨hρ, hpos, h2⟩ - -/-! ### the seam -/ - -/-- **The W seam**, given t₀ > 0 and the strip hypothesis (used only for finite_window). -/ -theorem wSeam_of_strip {t₀ : ℝ} (ht₀ : 0 < t₀) (hZ : WZerosInStrip t₀) : WSeam t₀ where - pos := ht₀ - one_le_mult := fun _ h _ => (one_le_wMult_iff h.2).mpr h.1 - reflect_zero := fun ρ h _ => (isWZero_reflect_iff ρ).mpr h - mult_reflect := fun _ h _ => wMult_reflect h.2 - finite_window := finite_window_W ht₀ hZ - -end Hardy - -export Hardy (wSeam_of_strip) - -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/TwoLine.lean b/zeta23/Zeta23/XiPrime/Hardy/TwoLine.lean deleted file mode 100644 index b1e7070a1e..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/TwoLine.lean +++ /dev/null @@ -1,282 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/TwoLine.lean — estimates for W on the line Re s = 2 and in the strip 1/8 ≤ Re ≤ 4, |Im| ≥ 2 -(zero side; [XF′ (Z5), (Z6)(i), (Z7) local inputs]). These are exactly the hypotheses -(hfa, hgrow, hlow') of Zeta23/XiPrime/ZeroCount/Generic.lean, for f := hardyW: - * hardyW_analyticOnNhd_disc : W analytic on closedBall (2+it) (91/50) for |t| ≥ 2 (the disc misses ℝ); - * re_L2_two_ge : Re L₂(2+it) ≥ ½log(|t|/2) − 3 (digamma Stirling at 1+it/2 and, via the shift Γℝ′/Γℝ(u) = - Γℝ′/Γℝ(u+2) − 1/u twice, at (3−it)/2); - * hardyW_two_line_lower : ∃ t₁ ≥ 2, ∀ |t| ≥ t₁, 1 ≤ ‖W(2+it)‖ (= ‖ζ(2+it)‖·‖L₂ + ζ′/ζ‖ ≥ (1/3)·3); - * hardyW_growth : ‖W(s)‖ ≤ C·|Im s|² on 1/8 ≤ Re s ≤ 4, |Im s| ≥ 2. --/ -import Zeta23.XiPrime.Hardy.Basic -import Zeta23.XiPrime.ZeroCount.Y - -open Complex Set Filter Topology Metric -open scoped ComplexConjugate - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy - -/-! ### the shift Γℝ′/Γℝ(u) = Γℝ′/Γℝ(u+2) − 1/u off the real axis -/ - -theorem logDeriv_Gammaℝ_shift {u : ℂ} (hu : u.im ≠ 0) : - logDeriv Gammaℝ u = logDeriv Gammaℝ (u + 2) - 1 / u := by - have hu0 := ne_zero_of_im_ne_zero hu - have hu2 : (u + 2).im ≠ 0 := by simpa using hu - -- Γℝ(z+2) = Γℝ(z)·z/(2π) near u - have hev : (fun z => Gammaℝ (z + 2)) =ᶠ[𝓝 u] fun z => Gammaℝ z * (z / 2 / (Real.pi : ℂ)) := by - filter_upwards [isOpen_im_ne_zero.mem_nhds hu] with z hz - rw [Gammaℝ_add_two (ne_zero_of_im_ne_zero hz)]; ring - have hd2 : DifferentiableAt ℂ Gammaℝ (u + 2) := differentiableAt_Gammaℝ_of_im_ne_zero hu2 - have hdu : DifferentiableAt ℂ Gammaℝ u := differentiableAt_Gammaℝ_of_im_ne_zero hu - -- logDeriv of the left side - have hL : logDeriv (fun z => Gammaℝ (z + 2)) u = logDeriv Gammaℝ (u + 2) := by - rw [logDeriv_apply, logDeriv_apply, deriv_comp_add_const] - -- logDeriv of the right side - have hlin : DifferentiableAt ℂ (fun z : ℂ => z / 2 / (Real.pi : ℂ)) u := by fun_prop - have hπ : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero - have hR : logDeriv (fun z => Gammaℝ z * (z / 2 / (Real.pi : ℂ))) u = logDeriv Gammaℝ u + 1 / u := by - rw [logDeriv_mul u (Gammaℝ_ne_zero_of_im_ne_zero hu) (by simp [hu0, hπ]) hdu hlin] - congr 1 - rw [logDeriv_apply] - have : deriv (fun z : ℂ => z / 2 / (Real.pi : ℂ)) u = 1 / 2 / (Real.pi : ℂ) := by - rw [deriv_div_const, deriv_div_const, deriv_id''] - rw [this]; field_simp - -- the two functions agree near u, so their logDerivs at u agree - have heq : logDeriv (fun z => Gammaℝ (z + 2)) u = logDeriv (fun z => Gammaℝ z * (z / 2 / (Real.pi : ℂ))) u := by - rw [logDeriv_apply, logDeriv_apply, hev.deriv_eq, hev.eq_of_nhds] - rw [← hL, heq, hR]; ring - -/-! ### Re L₂ on the line Re s = 2 -/ - -/-- Re Γℝ′/Γℝ(s) ≥ −1 + ½(log(|Im s|/2) − 4) for Re s > 0, |Im s| ≥ 2. -/ -lemma re_logDeriv_Gammaℝ_ge {s : ℂ} (hs : 0 < s.re) (him : 2 ≤ |s.im|) : - -1 + (1 / 2) * (Real.log (|s.im| / 2) - 4) ≤ (logDeriv Gammaℝ s).re := by - rw [Zeta23.RvM.logDeriv_Gammaℝ hs] - have hw : 0 < (s / 2).re := by simp; linarith - have hwim : (s / 2).im = s.im / 2 := by simp - have hw' : 1 ≤ |(s / 2).im| := by rw [hwim, abs_div, abs_two]; linarith - have hψ := Zeta23.XiPrime.ZeroCount.re_digamma_ge hw hw' - rw [hwim, abs_div, abs_two] at hψ - have hlogpi : Real.log Real.pi ≤ 2 := by - have h4 : Real.log Real.pi ≤ Real.log 4 := Real.log_le_log Real.pi_pos Real.pi_lt_four.le - have h4' : Real.log 4 = 2 * Real.log 2 := by - rw [show (4:ℝ) = 2 ^ 2 by norm_num, Real.log_pow]; push_cast; ring - linarith [Real.log_two_lt_d9] - have hre_const : (-(Real.log Real.pi : ℂ) / 2).re = -(Real.log Real.pi) / 2 := by - simp [Complex.neg_re, Complex.div_ofNat_re] - have hre_half : ((1 / 2 : ℂ) * Complex.digamma (s / 2)).re = (1 / 2) * (Complex.digamma (s / 2)).re := by - rw [Complex.mul_re]; simp - simp only [Complex.add_re] - rw [hre_const, hre_half] - linarith - -/-- **Re L₂(2+it) ≥ ½log(|t|/2) − 3** for |t| ≥ 2. -/ -theorem re_L2_two_ge {t : ℝ} (ht : 2 ≤ |t|) : - (1 / 2) * Real.log (|t| / 2) - 3 ≤ (L2 (2 + t * I)).re := by - have him : ((2 : ℂ) + t * I).im ≠ 0 := by - simp; intro h; rw [h] at ht; norm_num at ht - rw [L2_eq him] - -- the (1−s)-term: 1 − s = −1 − it; shift twice to 3 − it - have e1 : (1 : ℂ) - (2 + t * I) = -1 - t * I := by ring - have hu1 : ((-1 : ℂ) - t * I).im ≠ 0 := by simpa using him - have hu2 : ((-1 : ℂ) - t * I + 2).im ≠ 0 := by simpa using him - have hshift : logDeriv Gammaℝ (-1 - t * I) - = logDeriv Gammaℝ (3 - t * I) - 1 / (1 - t * I) - 1 / (-1 - t * I) := by - rw [logDeriv_Gammaℝ_shift hu1, logDeriv_Gammaℝ_shift hu2] - have e2 : (-1 : ℂ) - t * I + 2 = 1 - t * I := by ring - have e3 : (1 : ℂ) - t * I + 2 = 3 - t * I := by ring - rw [e2, e3] - rw [e1, hshift] - have hA := re_logDeriv_Gammaℝ_ge (s := 2 + t * I) (by simp) (by simpa using ht) - have hB := re_logDeriv_Gammaℝ_ge (s := 3 - t * I) (by simp) (by simpa using ht) - have himA : |((2 : ℂ) + t * I).im| = |t| := by simp - have himB : |((3 : ℂ) - t * I).im| = |t| := by simp [abs_neg] - rw [himA] at hA; rw [himB] at hB - -- the two rational terms have opposite real parts - have hr : ((1 : ℂ) / (1 - t * I)).re = ((1 : ℂ) / (-1 - t * I)).re * (-1) := by - rw [one_div, one_div, Complex.inv_re, Complex.inv_re] - simp [Complex.normSq_apply]; ring - have hsum_re : (logDeriv Gammaℝ (2 + t * I) - + (logDeriv Gammaℝ (3 - t * I) - 1 / (1 - t * I) - 1 / (-1 - t * I))).re - = (logDeriv Gammaℝ (2 + t * I)).re + (logDeriv Gammaℝ (3 - t * I)).re := by - simp only [Complex.add_re, Complex.sub_re] - rw [hr]; ring - rw [Complex.div_re] - simp only [Complex.normSq_ofNat, Complex.re_ofNat, Complex.im_ofNat, mul_zero, zero_div, add_zero] - rw [hsum_re] - nlinarith - -/-! ### analyticity on the Landau discs -/ - -lemma im_ne_zero_of_mem_closedBall {t r : ℝ} (hr : r < 2) (ht : 2 ≤ |t|) {z : ℂ} - (hz : z ∈ closedBall ((2 : ℂ) + t * I) r) : z.im ≠ 0 := by - intro h0 - rw [mem_closedBall, dist_eq_norm] at hz - have him := Complex.abs_im_le_norm (z - (2 + t * I)) - simp [h0] at him - linarith [hz] - -theorem hardyW_analyticOnNhd_disc (t : ℝ) (ht : 2 ≤ |t|) : - AnalyticOnNhd ℂ hardyW (closedBall ((2 : ℂ) + t * I) (91 / 50)) := fun _ hz => - hardyW_analyticAt (im_ne_zero_of_mem_closedBall (by norm_num) ht hz) - -/-! ### the lower bound on Re s = 2 -/ - -lemma two_line_im_ne_zero {t : ℝ} (ht : 2 ≤ |t|) : ((2 : ℂ) + t * I).im ≠ 0 := by - simp; intro h; rw [h] at ht; norm_num at ht - -/-- W = ζ·(ζ′/ζ + L₂) where ζ ≠ 0. -/ -lemma hardyW_eq_zeta_mul {s : ℂ} (hζ : riemannZeta s ≠ 0) : - hardyW s = riemannZeta s * (logDeriv riemannZeta s + L2 s) := by - rw [hardyW, logDeriv_apply]; field_simp - -/-- **‖W(2+it)‖ ≥ 1 for |t| ≥ t₁**, and Re(ζ′/ζ + L₂)(2+it) ≥ 3 there [XF′ (Z6)(i)]. -/ -theorem hardyW_two_line_lower : ∃ t₁ : ℝ, 2 ≤ t₁ ∧ ∀ t : ℝ, t₁ ≤ |t| → - 3 ≤ (logDeriv riemannZeta (2 + t * I) + L2 (2 + t * I)).re ∧ 1 ≤ ‖hardyW (2 + t * I)‖ := by - set K : ℝ := ‖deriv riemannZeta 2 / riemannZeta 2‖ with hK - have hK0 : 0 ≤ K := norm_nonneg _ - refine ⟨2 * Real.exp (12 + 2 * K), ?_, fun t ht => ?_⟩ - · have : 1 ≤ Real.exp (12 + 2 * K) := Real.one_le_exp (by positivity) - linarith - have hexp1 : 1 ≤ Real.exp (12 + 2 * K) := Real.one_le_exp (by positivity) - have ht2 : 2 ≤ |t| := by linarith - have hlog : 12 + 2 * K ≤ Real.log (|t| / 2) := by - rw [Real.le_log_iff_exp_le (by positivity)] - linarith - have hL := re_L2_two_ge ht2 - have hζζ : -K ≤ (logDeriv riemannZeta (2 + t * I)).re := by - have h1 := Complex.abs_re_le_norm (logDeriv riemannZeta (2 + t * I)) - rw [abs_le] at h1 - linarith [h1.1, Zeta23.XiPrime.ZeroCount.norm_logDeriv_zeta_two_le t] - have hG : 3 ≤ (logDeriv riemannZeta (2 + t * I) + L2 (2 + t * I)).re := by - rw [Complex.add_re]; linarith - refine ⟨hG, ?_⟩ - rw [hardyW_eq_zeta_mul (Zeta23.XiPrime.ZeroCount.zeta_two_line_ne_zero t), norm_mul] - have hz : (1 / 3 : ℝ) ≤ ‖riemannZeta (2 + t * I)‖ := Zeta23.RvM.zeta_lower_bound_two t - have hGn : 3 ≤ ‖logDeriv riemannZeta (2 + t * I) + L2 (2 + t * I)‖ := le_trans hG (Complex.re_le_norm _) - calc (1 : ℝ) = (1 / 3) * 3 := by norm_num - _ ≤ ‖riemannZeta (2 + t * I)‖ * ‖logDeriv riemannZeta (2 + t * I) + L2 (2 + t * I)‖ := by gcongr - -/-- W is not identically zero on either half-plane: W(2 ± it₁) ≠ 0. -/ -theorem exists_hardyW_ne_zero_upper : ∃ z : ℂ, 0 < z.im ∧ hardyW z ≠ 0 := by - obtain ⟨t₁, ht₁, h⟩ := hardyW_two_line_lower - refine ⟨2 + t₁ * I, by simp; linarith, fun h0 => ?_⟩ - have := (h t₁ (by rw [abs_of_pos (by linarith)])).2 - rw [h0, norm_zero] at this; linarith - -theorem exists_hardyW_ne_zero_lower : ∃ z : ℂ, z.im < 0 ∧ hardyW z ≠ 0 := by - obtain ⟨t₁, ht₁, h⟩ := hardyW_two_line_lower - refine ⟨2 + ((-t₁ : ℝ) : ℂ) * I, by simp; linarith, fun h0 => ?_⟩ - have := (h (-t₁) (by rw [abs_neg, abs_of_pos (by linarith)])).2 - rw [h0, norm_zero] at this; linarith - -/-! ### polynomial growth of W in the strip -/ - -/-- ‖Γℝ′/Γℝ(s)‖ ≤ ‖s‖/4 + 5 for Re s > 0, |Im s| ≥ 2 (crude, from ‖ψ(w)‖ ≤ ‖w‖ + 8). -/ -lemma norm_logDeriv_Gammaℝ_le_lin {s : ℂ} (hs : 0 < s.re) (him : 2 ≤ |s.im|) : - ‖logDeriv Gammaℝ s‖ ≤ ‖s‖ / 4 + 5 := by - rw [Zeta23.RvM.logDeriv_Gammaℝ hs] - have hw : 0 < (s / 2).re := by simp; linarith - have hw' : 1 ≤ |(s / 2).im| := by - have : (s / 2).im = s.im / 2 := by simp - rw [this, abs_div, abs_two]; linarith - have hψ := Zeta23.XiPrime.ZeroCount.norm_digamma_le hw hw' - have hns : ‖s / 2‖ = ‖s‖ / 2 := by rw [norm_div]; norm_num - rw [hns] at hψ - have hlogpi : Real.log Real.pi ≤ 2 := by - have h4 : Real.log Real.pi ≤ Real.log 4 := Real.log_le_log Real.pi_pos Real.pi_lt_four.le - have h4' : Real.log 4 = 2 * Real.log 2 := by - rw [show (4:ℝ) = 2 ^ 2 by norm_num, Real.log_pow]; push_cast; ring - linarith [Real.log_two_lt_d9] - have h1 : ‖-(Real.log Real.pi : ℂ) / 2‖ ≤ 1 := by - rw [norm_div, norm_neg, Complex.norm_real, Real.norm_eq_abs, - abs_of_nonneg (Real.log_nonneg (by linarith [Real.pi_gt_three]))] - norm_num; linarith - have h2 : ‖(1 / 2 : ℂ) * Complex.digamma (s / 2)‖ ≤ (1 / 2) * (‖s‖ / 2 + 8) := by - rw [norm_mul]; norm_num; linarith - calc ‖-(Real.log Real.pi : ℂ) / 2 + (1 / 2 : ℂ) * Complex.digamma (s / 2)‖ - ≤ ‖-(Real.log Real.pi : ℂ) / 2‖ + ‖(1 / 2 : ℂ) * Complex.digamma (s / 2)‖ := norm_add_le _ _ - _ ≤ 1 + (1 / 2) * (‖s‖ / 2 + 8) := add_le_add h1 h2 - _ = ‖s‖ / 4 + 5 := by ring - -/-- ‖L₂(s)‖ ≤ 2|Im s| + 12 for 1/8 ≤ Re s ≤ 4, |Im s| ≥ 2. -/ -lemma norm_L2_le {s : ℂ} (hre : 1 / 8 ≤ s.re) (hre' : s.re ≤ 4) (him : 2 ≤ |s.im|) : - ‖L2 s‖ ≤ 2 * |s.im| + 12 := by - have hs : s.im ≠ 0 := by intro h; rw [h] at him; norm_num at him - have hpos : 0 < s.re := by linarith - rw [L2_eq hs] - -- shift the (1−s)-term twice: 1 − s ↦ 5 − s, Re ≥ 1 - have hu1 : (1 - s).im ≠ 0 := im_one_sub_ne_zero hs - have hu2 : (1 - s + 2).im ≠ 0 := by simpa using hs - have hshift : logDeriv Gammaℝ (1 - s) = logDeriv Gammaℝ (5 - s) - 1 / (3 - s) - 1 / (1 - s) := by - rw [logDeriv_Gammaℝ_shift hu1, logDeriv_Gammaℝ_shift hu2] - have e2 : (1 : ℂ) - s + 2 = 3 - s := by ring - have e3 : (3 : ℂ) - s + 2 = 5 - s := by ring - rw [e2, e3] - rw [hshift] - have hns : ‖s‖ ≤ |s.re| + |s.im| := Complex.norm_le_abs_re_add_abs_im s - have hsre : |s.re| ≤ 4 := by rw [abs_le]; constructor <;> linarith - have hA := norm_logDeriv_Gammaℝ_le_lin hpos him - have h5 : (5 - s).im = -s.im := by simp - have hB := norm_logDeriv_Gammaℝ_le_lin (s := 5 - s) (by simp; linarith) (by rw [h5, abs_neg]; exact him) - have hn5 : ‖(5 : ℂ) - s‖ ≤ 5 + ‖s‖ := by - calc ‖(5 : ℂ) - s‖ ≤ ‖(5:ℂ)‖ + ‖s‖ := norm_sub_le _ _ - _ = 5 + ‖s‖ := by norm_num - -- the two rational terms are ≤ 1/2 each - have hinv : ∀ a : ℝ, ‖(1 : ℂ) / ((a : ℂ) - s)‖ ≤ 1 / 2 := by - intro a - rw [norm_div, norm_one] - have : |s.im| ≤ ‖(a : ℂ) - s‖ := by - have h := Complex.abs_im_le_norm ((a : ℂ) - s) - simpa [abs_neg] using h - rw [div_le_div_iff₀ (by linarith) (by norm_num)] - linarith - have h3 := hinv 3; have h1' := hinv 1 - push_cast at h3 h1' - calc ‖(logDeriv Gammaℝ s + (logDeriv Gammaℝ (5 - s) - 1 / (3 - s) - 1 / (1 - s))) / 2‖ - = ‖logDeriv Gammaℝ s + (logDeriv Gammaℝ (5 - s) - 1 / (3 - s) - 1 / (1 - s))‖ / 2 := by - rw [norm_div]; norm_num - _ ≤ (‖logDeriv Gammaℝ s‖ + (‖logDeriv Gammaℝ (5 - s)‖ + ‖(1:ℂ) / (3 - s)‖ + ‖(1:ℂ) / (1 - s)‖)) / 2 := by - gcongr - refine (norm_add_le _ _).trans ?_ - gcongr - exact (norm_sub_le _ _).trans (add_le_add (norm_sub_le _ _) le_rfl) - _ ≤ ((‖s‖ / 4 + 5) + ((5 + ‖s‖) / 4 + 5 + 1 / 2 + 1 / 2)) / 2 := by - gcongr - · exact hB.trans (by linarith) - _ ≤ 2 * |s.im| + 12 := by nlinarith [norm_nonneg s] - -/-- **growth of W**: ‖W(s)‖ ≤ C·|Im s|² on 1/8 ≤ Re s ≤ 4, |Im s| ≥ 2. -/ -theorem hardyW_growth : ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, 1 / 8 ≤ s.re → s.re ≤ 4 → 2 ≤ |s.im| → - ‖hardyW s‖ ≤ C * |s.im| ^ 2 := by - obtain ⟨Cζ, hCζ, hζb⟩ := Zeta23.RvM.zeta_growth (δ := 1 / 16) (by norm_num) - refine ⟨40 * Cζ, by positivity, fun s hre hre' him => ?_⟩ - set t : ℝ := |s.im| with ht - have ht2 : 2 ≤ t := him - have hζ : ‖riemannZeta s‖ ≤ Cζ * t := hζb s (by linarith) (by linarith) - have hζ' : ‖deriv riemannZeta s‖ ≤ 24 * Cζ * t := - Zeta23.XiPrime.ZeroCount.norm_deriv_zeta_le hCζ hζb hre him - have hL : ‖L2 s‖ ≤ 2 * t + 12 := norm_L2_le hre hre' him - calc ‖hardyW s‖ = ‖deriv riemannZeta s + L2 s * riemannZeta s‖ := rfl - _ ≤ ‖deriv riemannZeta s‖ + ‖L2 s‖ * ‖riemannZeta s‖ := by - refine (norm_add_le _ _).trans ?_; rw [norm_mul] - _ ≤ 24 * Cζ * t + (2 * t + 12) * (Cζ * t) := by gcongr - _ ≤ 40 * Cζ * t ^ 2 := by - have hCt : 0 ≤ Cζ * t := by positivity - have h12 : 12 ≤ 6 * t := by linarith - nlinarith [hCt, h12] - -end Hardy -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Hardy/ZFunction.lean b/zeta23/Zeta23/XiPrime/Hardy/ZFunction.lean deleted file mode 100644 index dc2399d604..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/ZFunction.lean +++ /dev/null @@ -1,371 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/Hardy/ZFunction.lean — Hardy's Z-function and [XF′ (Z3)]: Z′(t) = i e^{iϑ(t)} W(½+it) -(branch-free construction). - G(t) := Γℝ(½+it) (≠ 0), e(t) := G(t)/‖G(t)‖ (this IS the classical e^{iϑ(t)}: |χ(½+it)| = 1 and - χ = conj G/G, so e² = 1/χ, e(0) = 1, e(−t) = conj e(t)); ZC(t) := e(t)·ζ(½+it) ∈ ℂ; hardyZ t := Re ZC(t). -We PROVE: ZC(t) is real (so hardyZ t = ZC t); HasDerivAt ZC (i·e(t)·W(½+it)) t for t ≠ 0 [(Z3)], via -e′/e = i·Re(Γℝ′/Γℝ)(½+it) = i·L₂(½+it); hence the stationary points of Z at height t ≠ 0 are exactly the zeros -of W on the critical line, and Z′(t) = 0 ≠ Z″(t) ⟺ the zero ½+it of W is simple; hence the literal Z′ form of the -W headline (the corollary itself is stated in Final.lean from ncard_simpleStationaryZ). --/ -import Zeta23.XiPrime.Statement -import Zeta23.XiPrime.Hardy.Basic -import Mathlib.Analysis.InnerProductSpace.Calculus -import Mathlib.Analysis.SpecialFunctions.Sqrt - -open scoped ComplexConjugate -open Complex Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime - -open Hardy - -/-- ContinuousSMul ℝ ℂ is not found by instance search in this closure. -/ -local instance instContinuousSMulRealComplexZ : ContinuousSMul ℝ ℂ := - ⟨((Complex.continuous_ofReal.comp continuous_fst).mul continuous_snd).congr fun p => by - simp [Complex.real_smul]⟩ - -/-! ## 1. The phase e(t) = e^{iϑ(t)} and Hardy's Z -/ - -/-- the critical line parametrisation s(t) = ½ + it. -/ -def sline (t : ℝ) : ℂ := 1/2 + t * I - -/-- G(t) := Γℝ(½ + it). -/ -def Gfun (t : ℝ) : ℂ := Gammaℝ (sline t) - -/-- e(t) := G(t)/‖G(t)‖ = e^{iϑ(t)}, ϑ = the Riemann–Siegel theta function (branch-free definition). -/ -def ephase (t : ℝ) : ℂ := Gfun t / (‖Gfun t‖ : ℂ) - -/-- Hardy's function as a complex number: Z(t) := e^{iϑ(t)} ζ(½+it). -/ -def ZC (t : ℝ) : ℂ := ephase t * riemannZeta (sline t) - -/-- **Hardy's Z-function** Z : ℝ → ℝ (the real part of ZC; ZC is real, ZC_im below). -/ -def hardyZ (t : ℝ) : ℝ := (ZC t).re - -@[simp] lemma sline_re (t : ℝ) : (sline t).re = 1/2 := by simp [sline] -@[simp] lemma sline_im (t : ℝ) : (sline t).im = t := by simp [sline] -lemma sline_ne_one (t : ℝ) : sline t ≠ 1 := fun h => by - have := congrArg Complex.re h; simp at this -lemma conj_sline (t : ℝ) : conj (sline t) = sline (-t) := by - apply Complex.ext <;> simp [sline] -lemma one_sub_sline (t : ℝ) : 1 - sline t = sline (-t) := by - apply Complex.ext <;> simp [sline] <;> norm_num - -lemma Gfun_ne_zero (t : ℝ) : Gfun t ≠ 0 := - Complex.Gammaℝ_ne_zero_of_re_pos (by simp [sline]) - -lemma normG_pos (t : ℝ) : 0 < ‖Gfun t‖ := norm_pos_iff.mpr (Gfun_ne_zero t) - -lemma Gfun_neg (t : ℝ) : Gfun (-t) = conj (Gfun t) := by - rw [Gfun, Gfun, ← conj_sline, Zeta23.RvM.Gammaℝ_conj] - -lemma norm_Gfun_neg (t : ℝ) : ‖Gfun (-t)‖ = ‖Gfun t‖ := by rw [Gfun_neg, Complex.norm_conj] - -lemma ephase_ne_zero (t : ℝ) : ephase t ≠ 0 := - div_ne_zero (Gfun_ne_zero t) (by exact_mod_cast (normG_pos t).ne') - -lemma norm_ephase (t : ℝ) : ‖ephase t‖ = 1 := by - rw [ephase, norm_div, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (normG_pos t), - div_self (normG_pos t).ne'] - -lemma conj_ephase (t : ℝ) : conj (ephase t) = ephase (-t) := by - rw [ephase, ephase, map_div₀, Complex.conj_ofReal, Gfun_neg, Complex.norm_conj] - -lemma conj_ephase_mul (t : ℝ) : conj (ephase t) * ephase t = 1 := by - rw [← Complex.normSq_eq_conj_mul_self, Complex.normSq_eq_norm_sq, norm_ephase]; norm_num - -/-- χ(½+it) = conj G(t)/G(t). -/ -lemma chiFE_sline (t : ℝ) : chiFE (sline t) = conj (Gfun t) / Gfun t := by - rw [chiFE, one_sub_sline, ← Gfun_neg]; rfl - -/-- e(t)² = 1/χ(½+it). -/ -lemma ephase_sq (t : ℝ) : ephase t ^ 2 * chiFE (sline t) = 1 := by - have hG := Gfun_ne_zero t - have hn : ((‖Gfun t‖ : ℂ)) ≠ 0 := by exact_mod_cast (normG_pos t).ne' - have hnn : ((‖Gfun t‖ : ℂ)) ^ 2 = conj (Gfun t) * Gfun t := by - rw [← Complex.normSq_eq_conj_mul_self, Complex.normSq_eq_norm_sq]; push_cast; ring - rw [chiFE_sline, ephase, div_pow] - field_simp - rw [hnn]; ring - -/-- **Z is real**: conj ZC(t) = ZC(t). -/ -theorem conj_ZC (t : ℝ) : conj (ZC t) = ZC t := by - by_cases ht : t = 0 - · subst ht - rw [ZC, map_mul, conj_ephase, neg_zero, ← Zeta23.riemannZeta_conj (sline_ne_one 0), conj_sline, neg_zero] - have him : (sline t).im ≠ 0 := by simpa using ht - rw [ZC, map_mul, ← Zeta23.riemannZeta_conj (sline_ne_one t), conj_sline, ← one_sub_sline] - -- ζ(1−s) = ζ(s)/χ(s) = ζ(s)·e² - have hχ := chiFE_ne_zero him - have h1 : riemannZeta (1 - sline t) = riemannZeta (sline t) * ephase t ^ 2 := by - have := zeta_eq_chiFE_mul him - have e2 := ephase_sq t - calc riemannZeta (1 - sline t) = riemannZeta (sline t) / chiFE (sline t) := by - rw [this]; field_simp - _ = riemannZeta (sline t) * ephase t ^ 2 := by - rw [div_eq_iff hχ, mul_assoc, e2, mul_one] - rw [h1] - calc conj (ephase t) * (riemannZeta (sline t) * ephase t ^ 2) - = (conj (ephase t) * ephase t) * ephase t * riemannZeta (sline t) := by ring - _ = ephase t * riemannZeta (sline t) := by rw [conj_ephase_mul, one_mul] - -theorem ZC_im (t : ℝ) : (ZC t).im = 0 := by - have := congrArg Complex.im (conj_ZC t) - simp at this; linarith - -theorem hardyZ_eq (t : ℝ) : ((hardyZ t : ℝ) : ℂ) = ZC t := by - apply Complex.ext <;> simp [hardyZ, ZC_im] - -/-! ## 2. Derivatives: e′/e = i·Re(Γℝ′/Γℝ)(½+it) = i·L₂(½+it) -/ - -lemma hasDerivAt_sline (t : ℝ) : HasDerivAt sline I t := by - have h1 : HasDerivAt (fun x : ℝ => (x : ℂ)) 1 t := by simpa using (hasDerivAt_id t).ofReal_comp - have h2 := (h1.mul_const I).const_add (1/2 : ℂ) - rw [one_mul] at h2 - exact h2 - -lemma hasDerivAt_Gfun (t : ℝ) : HasDerivAt Gfun (deriv Gammaℝ (sline t) * I) t := by - have hd : DifferentiableAt ℂ Gammaℝ (sline t) := - Zeta23.WeilEF.differentiableAt_Gammaℝ (by simp) - exact hd.hasDerivAt.comp t (hasDerivAt_sline t) - -/-- g(t) := (Γℝ′/Γℝ)(½+it). -/ -def gG (t : ℝ) : ℂ := logDeriv Gammaℝ (sline t) - -lemma hasDerivAt_normG (t : ℝ) : - HasDerivAt (fun t => ‖Gfun t‖) (-(gG t).im * ‖Gfun t‖) t := by - -- ‖G‖² has derivative 2⟪G, G′⟫ = 2 Re(conj G · G′·) ; G′ = Γℝ′(s)·i - have h1 := (hasDerivAt_Gfun t).norm_sq - have h2 := h1.sqrt (pow_pos (normG_pos t) 2).ne' - have e1 : (fun y => Real.sqrt (‖Gfun y‖ ^ 2)) = fun y => ‖Gfun y‖ := by - funext y; rw [Real.sqrt_sq (norm_nonneg _)] - rw [e1] at h2 - convert h2 using 1 - have hG : Gammaℝ (sline t) ≠ 0 := Gfun_ne_zero t - have hrel : deriv Gammaℝ (sline t) * conj (Gfun t) = gG t * ((‖Gfun t‖ ^ 2 : ℝ) : ℂ) := by - rw [gG, logDeriv_apply, Gfun] - have : ((‖Gammaℝ (sline t)‖ ^ 2 : ℝ) : ℂ) = conj (Gammaℝ (sline t)) * Gammaℝ (sline t) := by - rw [← Complex.normSq_eq_conj_mul_self, Complex.normSq_eq_norm_sq] - try push_cast - try ring - rw [this, div_mul_eq_mul_div, eq_div_iff hG] - try ring - rw [Real.sqrt_sq (norm_nonneg _), Complex.inner, - show deriv Gammaℝ (sline t) * I * conj (Gfun t) = (gG t * ((‖Gfun t‖ ^ 2 : ℝ) : ℂ)) * I by - rw [← hrel]; ring] - simp only [Complex.mul_re, Complex.mul_im, Complex.I_re, Complex.I_im, Complex.ofReal_re, - Complex.ofReal_im, mul_zero, mul_one, zero_sub, sub_zero] - have hn := (normG_pos t).ne' - field_simp - ring - -/-- **e′ = i·Re(g)·e**. -/ -theorem hasDerivAt_ephase (t : ℝ) : HasDerivAt ephase (I * ((gG t).re : ℂ) * ephase t) t := by - have hG := Gfun_ne_zero t - have hn : ((‖Gfun t‖ : ℂ)) ≠ 0 := by exact_mod_cast (normG_pos t).ne' - have h1 := hasDerivAt_Gfun t - have h2 : HasDerivAt (fun t => ((‖Gfun t‖ : ℝ) : ℂ)) (((-(gG t).im * ‖Gfun t‖ : ℝ)) : ℂ) t := - (hasDerivAt_normG t).ofReal_comp - have h3 := h1.div h2 hn - have e : (Gfun / fun t => ((‖Gfun t‖ : ℝ) : ℂ)) = ephase := rfl - rw [e] at h3 - refine h3.congr_deriv ?_ - -- algebra: (Γℝ′ i ‖G‖ − G·(−Im g ‖G‖))/‖G‖² = i Re(g) G/‖G‖, using Γℝ′ = g·G and i g + Im g = i Re g - have hG' : Gammaℝ (sline t) ≠ 0 := Gfun_ne_zero t - have hd : deriv Gammaℝ (sline t) = gG t * Gfun t := by - rw [gG, logDeriv_apply, Gfun]; field_simp - have key : I * gG t + (((gG t).im : ℝ) : ℂ) = I * (((gG t).re : ℝ) : ℂ) := by - apply Complex.ext <;> simp - rw [hd, ephase] - push_cast - field_simp - linear_combination key - -/-- L₂(½+it) = Re (Γℝ′/Γℝ)(½+it) ∈ ℝ [XF′ (Z3)], t ≠ 0. -/ -theorem L2_sline (t : ℝ) (ht : t ≠ 0) : L2 (sline t) = ((gG t).re : ℂ) := by - have him : (sline t).im ≠ 0 := by simpa using ht - rw [L2_eq him, one_sub_sline, ← conj_sline, Zeta23.RvM.logDeriv_Gammaℝ_conj, gG, - Complex.add_conj] - push_cast; ring - -lemma hasDerivAt_zeta_sline (t : ℝ) : HasDerivAt (fun t => riemannZeta (sline t)) (deriv riemannZeta (sline t) * I) t := - (differentiableAt_riemannZeta (sline_ne_one t)).hasDerivAt.comp t (hasDerivAt_sline t) - -/-- **[XF′ (Z3)] Z′(t) = i e^{iϑ(t)} W(½+it)**, t ≠ 0. -/ -theorem hasDerivAt_ZC {t : ℝ} (ht : t ≠ 0) : HasDerivAt ZC (I * ephase t * hardyW (sline t)) t := by - have h := (hasDerivAt_ephase t).fun_mul (hasDerivAt_zeta_sline t) - refine h.congr_deriv ?_ - rw [hardyW, L2_sline t ht]; ring - -lemma hasDerivAt_hardyW_sline {t : ℝ} (ht : t ≠ 0) : - HasDerivAt (fun t => hardyW (sline t)) (deriv hardyW (sline t) * I) t := by - have him : (sline t).im ≠ 0 := by simpa using ht - exact (hardyW_differentiableAt him).hasDerivAt.comp t (hasDerivAt_sline t) - -/-- the derivative of i·e·W(½+it). -/ -theorem hasDerivAt_dZC {t : ℝ} (ht : t ≠ 0) : - HasDerivAt (fun t => I * ephase t * hardyW (sline t)) - (-(ephase t) * (deriv hardyW (sline t) + ((gG t).re : ℂ) * hardyW (sline t))) t := by - have h := ((hasDerivAt_ephase t).const_mul I).mul (hasDerivAt_hardyW_sline ht) - refine h.congr_deriv ?_ - ring_nf; rw [Complex.I_sq]; ring - -/-! ## 3. Real derivatives of Z and the dictionary with zeros of W -/ - -/-- a complex-valued function of a real variable with identically zero imaginary part has real derivative. -/ -lemma im_deriv_eq_zero {f : ℝ → ℂ} {f' : ℂ} {t : ℝ} (hf : HasDerivAt f f' t) - (hreal : ∀ᶠ y in 𝓝 t, (f y).im = 0) : f'.im = 0 := by - have h1 : HasDerivAt (fun y => (f y).im) f'.im t := by - have := Complex.imCLM.hasFDerivAt.comp_hasDerivAt t hf - simpa [Function.comp_def] using this - have h2 : HasDerivAt (fun y => (f y).im) 0 t := by - refine (hasDerivAt_const t (0:ℝ)).congr_of_eventuallyEq ?_ - filter_upwards [hreal] with y hy; exact hy - exact h1.unique h2 - -theorem hasDerivAt_hardyZ {t : ℝ} (ht : t ≠ 0) : - HasDerivAt hardyZ ((I * ephase t * hardyW (sline t)).re) t := - Complex.reCLM.hasFDerivAt.comp_hasDerivAt t (hasDerivAt_ZC ht) - -/-- Z′(t) as a complex number is i e W(½+it) (which is therefore real). -/ -theorem dZC_im {t : ℝ} (ht : t ≠ 0) : (I * ephase t * hardyW (sline t)).im = 0 := - im_deriv_eq_zero (hasDerivAt_ZC ht) (Eventually.of_forall ZC_im) - -theorem deriv_hardyZ {t : ℝ} (ht : t ≠ 0) : ((deriv hardyZ t : ℝ) : ℂ) = I * ephase t * hardyW (sline t) := by - rw [(hasDerivAt_hardyZ ht).deriv] - apply Complex.ext <;> simp [dZC_im ht] - -/-- **Z′(t) = 0 ⟺ W(½+it) = 0** (t ≠ 0). -/ -theorem deriv_hardyZ_eq_zero_iff {t : ℝ} (ht : t ≠ 0) : deriv hardyZ t = 0 ↔ hardyW (sline t) = 0 := by - have hd := deriv_hardyZ ht - constructor - · intro h - have h0 : I * ephase t * hardyW (sline t) = 0 := by rw [← hd, h]; simp - rcases mul_eq_zero.mp h0 with h1 | h1 - · rcases mul_eq_zero.mp h1 with h2 | h2 - · exact absurd h2 Complex.I_ne_zero - · exact absurd h2 (ephase_ne_zero t) - · exact h1 - · intro h - rw [h, mul_zero] at hd - exact_mod_cast hd - -/-- deriv hardyZ agrees with Re(i e W(½+i·)) near any t ≠ 0. -/ -lemma deriv_hardyZ_eventuallyEq {t : ℝ} (ht : t ≠ 0) : - deriv hardyZ =ᶠ[𝓝 t] fun y => (I * ephase y * hardyW (sline y)).re := by - filter_upwards [isOpen_ne.mem_nhds ht] with y hy - exact (hasDerivAt_hardyZ hy).deriv - -theorem hasDerivAt_deriv_hardyZ {t : ℝ} (ht : t ≠ 0) : - HasDerivAt (deriv hardyZ) ((-(ephase t) * (deriv hardyW (sline t) + ((gG t).re : ℂ) * hardyW (sline t))).re) t := by - have h' : HasDerivAt (fun y => (I * ephase y * hardyW (sline y)).re) - ((-(ephase t) * (deriv hardyW (sline t) + ((gG t).re : ℂ) * hardyW (sline t))).re) t := - Complex.reCLM.hasFDerivAt.comp_hasDerivAt t (hasDerivAt_dZC ht) - exact h'.congr_of_eventuallyEq (deriv_hardyZ_eventuallyEq ht) - -theorem d2ZC_im {t : ℝ} (ht : t ≠ 0) : - (-(ephase t) * (deriv hardyW (sline t) + ((gG t).re : ℂ) * hardyW (sline t))).im = 0 := by - refine im_deriv_eq_zero (hasDerivAt_dZC ht) ?_ - filter_upwards [isOpen_ne.mem_nhds ht] with y hy - exact dZC_im hy - -/-- **at a zero of W on the line: Z″(t) ≠ 0 ⟺ W′(½+it) ≠ 0**. -/ -theorem deriv2_hardyZ_ne_zero_iff {t : ℝ} (ht : t ≠ 0) (hW : hardyW (sline t) = 0) : - deriv (deriv hardyZ) t ≠ 0 ↔ deriv hardyW (sline t) ≠ 0 := by - have him := d2ZC_im ht - have hderiv := (hasDerivAt_deriv_hardyZ ht).deriv - rw [hW, mul_zero, add_zero] at him hderiv - -- the complex number Y := −e·W′(s) is real and deriv (deriv hardyZ) t = Y.re - have hval : ((deriv (deriv hardyZ) t : ℝ) : ℂ) = -(ephase t) * deriv hardyW (sline t) := by - rw [hderiv] - exact Complex.ext (by simp) (by rw [Complex.ofReal_im]; exact him.symm) - constructor - · intro h hd - apply h - have := hval; rw [hd, mul_zero] at this - exact_mod_cast this - · intro h hd - apply h - have := hval; rw [hd] at this - have h0 : -(ephase t) * deriv hardyW (sline t) = 0 := by rw [← this]; simp - rcases mul_eq_zero.mp h0 with h1 | h1 - · exact absurd (neg_eq_zero.mp h1) (ephase_ne_zero t) - · exact h1 - -/-- simple zero of W ⟺ W = 0 and W′ ≠ 0 (W analytic off ℝ). -/ -theorem wMult_eq_one_iff {s : ℂ} (hs : s.im ≠ 0) : wMult s = 1 ↔ hardyW s = 0 ∧ deriv hardyW s ≠ 0 := by - have hA := hardyW_analyticAt hs - have key := hA.analyticOrderAt_deriv_add_one - unfold wMult - constructor - · intro h - have hne : analyticOrderAt hardyW s ≠ 0 := by - intro h0; rw [h0] at h; simp at h - have h0 : hardyW s = 0 := apply_eq_zero_of_analyticOrderAt_ne_zero hne - refine ⟨h0, ?_⟩ - have hfin : analyticOrderAt hardyW s = 1 := by - have hnt : analyticOrderAt hardyW s ≠ ⊤ := by intro ht; rw [ht] at h; simp at h - lift analyticOrderAt hardyW s to ℕ using hnt with n hn - simp at h; exact_mod_cast h - have e : (fun z => hardyW z - hardyW s) = hardyW := by funext z; rw [h0, sub_zero] - rw [e, hfin] at key - have hd0 : analyticOrderAt (deriv hardyW) s = 0 := by - by_contra hne0 - have h1 : (1 : ℕ∞) ≤ analyticOrderAt (deriv hardyW) s := ENat.one_le_iff_ne_zero.mpr hne0 - have h2 : (1 : ℕ∞) + 1 ≤ analyticOrderAt (deriv hardyW) s + 1 := add_le_add h1 le_rfl - rw [key] at h2 - exact absurd h2 (by decide) - rw [AnalyticAt.analyticOrderAt_eq_zero hA.deriv] at hd0 - exact hd0 - · rintro ⟨h0, hd⟩ - have e : (fun z => hardyW z - hardyW s) = hardyW := by funext z; rw [h0, sub_zero] - rw [e] at key - have hd0 : analyticOrderAt (deriv hardyW) s = 0 := (AnalyticAt.analyticOrderAt_eq_zero hA.deriv).mpr hd - rw [hd0, zero_add] at key - rw [← key]; rfl - -/-! ## 4. The Z′ form of the headline -/ - -/-- the stationary points of Z in (T, 2T] with Z″ ≠ 0, as a set of reals. -/ -def simpleStationaryZ (T : ℝ) : Set ℝ := - {t ∈ Ioc T (2 * T) | deriv hardyZ t = 0 ∧ deriv (deriv hardyZ) t ≠ 0} - -/-- **dictionary**: for T > 0, t ↦ ½+it maps simpleStationaryZ T bijectively onto the simple zeros of W on the -critical line with height in (T, 2T]. -/ -theorem image_simpleStationaryZ {T : ℝ} (hT : 0 < T) : - sline '' simpleStationaryZ T = zerosInW T (2 * T) ∩ {ρ | ρ.re = 1 / 2} ∩ {ρ | wMult ρ = 1} := by - ext ρ - constructor - · rintro ⟨t, ⟨⟨ht1, ht2⟩, hz, hnz⟩, rfl⟩ - have ht : t ≠ 0 := by intro h; rw [h] at ht1; linarith - have him : (sline t).im ≠ 0 := by simpa using ht - have hW := (deriv_hardyZ_eq_zero_iff ht).mp hz - have hd := (deriv2_hardyZ_ne_zero_iff ht hW).mp hnz - exact ⟨⟨⟨⟨hW, him⟩, by simpa using ht1, by simpa using ht2⟩, by simp⟩, (wMult_eq_one_iff him).mpr ⟨hW, hd⟩⟩ - · rintro ⟨⟨⟨⟨hW, him⟩, h1, h2⟩, hre⟩, hm⟩ - have hρ : ρ = sline ρ.im := by - apply Complex.ext <;> simp [sline]; simpa using hre - have ht : ρ.im ≠ 0 := him - refine ⟨ρ.im, ⟨⟨h1, h2⟩, ?_, ?_⟩, hρ.symm⟩ - · rw [deriv_hardyZ_eq_zero_iff ht, ← hρ]; exact hW - · have hW' : hardyW (sline ρ.im) = 0 := by rw [← hρ]; exact hW - rw [deriv2_hardyZ_ne_zero_iff ht hW', ← hρ] - exact ((wMult_eq_one_iff him).mp hm).2 - -theorem sline_injective : Function.Injective sline := by - intro a b h; have := congrArg Complex.im h; simpa using this - -theorem ncard_simpleStationaryZ {T : ℝ} (hT : 0 < T) : (simpleStationaryZ T).ncard = N0simpleW T (2 * T) := by - rw [N0simpleW, ← image_simpleStationaryZ hT, Set.ncard_image_of_injective _ sline_injective] - - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Hardy/ZeroFree.lean b/zeta23/Zeta23/XiPrime/Hardy/ZeroFree.lean deleted file mode 100644 index 0bf0396dd1..0000000000 --- a/zeta23/Zeta23/XiPrime/Hardy/ZeroFree.lean +++ /dev/null @@ -1,560 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -import Zeta23.XiPrime.ExplicitFormula.ZeroFree -import Zeta23.XiPrime.Hardy.Basic - -open scoped BigOperators ComplexConjugate -open Complex Set Filter Topology - -noncomputable section - -namespace Zeta23 -namespace XiPrime -namespace Hardy -namespace ZeroFree - -open Zeta23.XiPrime.ZeroFree - -/-! ## §1. Algebra: L₋, and ζ′/ζ + L₂ = ξ′/ξ − L₋ -/ - -/-- L₋(s) := ½(L(s) − L(1−s)) (L = Seam.Lfn = Γℝ′/Γℝ + 1/s + 1/(s−1)). -/ -def Lm (s : ℂ) : ℂ := (Lfn s - Lfn (1 - s)) / 2 - -theorem Lm_one_sub (s : ℂ) : Lm (1 - s) = -Lm s := by - unfold Lm; rw [sub_sub_cancel]; ring - -/-- Γℝ′/Γℝ(s) = −½log π + ½ψ(s/2) at every non-real s (Zeta23.RvM.logDeriv_Gammaℝ off the half-plane). -/ -theorem logDeriv_Gammaℝ_offreal {s : ℂ} (hs : s.im ≠ 0) : - logDeriv Complex.Gammaℝ s = -(Real.log Real.pi : ℂ) / 2 + (1 / 2 : ℂ) * Complex.digamma (s / 2) := by - have hπ : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero - have e : Complex.Gammaℝ = fun s : ℂ => (Real.pi : ℂ) ^ (-s / 2) * Complex.Gamma (s / 2) := by - funext s; rw [Complex.Gammaℝ_def] - have hf : (fun s : ℂ => (Real.pi : ℂ) ^ (-s / 2)) s ≠ 0 := by - simp only [ne_eq, cpow_eq_zero_iff, hπ, false_and, not_false_eq_true] - have hg : (fun s : ℂ => Complex.Gamma (s / 2)) s ≠ 0 := - Complex.Gamma_ne_zero (Hardy.half_ne_neg_nat hs) - have hdf : DifferentiableAt ℂ (fun s : ℂ => (Real.pi : ℂ) ^ (-s / 2)) s := - DifferentiableAt.const_cpow (by fun_prop) (Or.inl hπ) - have hΓ : DifferentiableAt ℂ Complex.Gamma (s / 2) := - Complex.differentiableAt_Gamma _ (Hardy.half_ne_neg_nat hs) - have hdg : DifferentiableAt ℂ (fun s : ℂ => Complex.Gamma (s / 2)) s := hΓ.comp s (by fun_prop) - rw [e, logDeriv_mul (f := fun s : ℂ => (Real.pi : ℂ) ^ (-s / 2)) - (g := fun s : ℂ => Complex.Gamma (s / 2)) s hf hg hdf hdg] - have h1 : logDeriv (fun s : ℂ => (Real.pi : ℂ) ^ (-s / 2)) s = -(Real.log Real.pi : ℂ) / 2 := by - have hder : HasDerivAt (fun s : ℂ => (Real.pi : ℂ) ^ (-s / 2)) - ((Real.pi : ℂ) ^ (-s / 2) * Complex.log Real.pi * (-1 / 2)) s := by - have : HasDerivAt (fun s : ℂ => -s / 2) (-1 / 2 : ℂ) s := by - simpa using ((hasDerivAt_id s).neg.div_const (2 : ℂ)) - exact this.const_cpow (Or.inl hπ) - rw [logDeriv_apply, hder.deriv] - have hne : (Real.pi : ℂ) ^ (-s / 2) ≠ 0 := hf - rw [Complex.ofReal_log Real.pi_pos.le] - field_simp - have h2 : logDeriv (fun s : ℂ => Complex.Gamma (s / 2)) s = (1 / 2 : ℂ) * Complex.digamma (s / 2) := by - have := logDeriv_comp (f := Complex.Gamma) (g := fun s : ℂ => s / 2) (x := s) hΓ (by fun_prop) - rw [show (Complex.Gamma ∘ fun s : ℂ => s / 2) = fun s => Complex.Gamma (s / 2) from rfl] at this - rw [this, Complex.digamma_def] - have : deriv (fun s : ℂ => s / 2) s = 1 / 2 := by - rw [deriv_div_const, deriv_id''] - rw [this]; ring - rw [h1, h2] - -/-- L₋(s) = 1/s + 1/(s−1) + ¼[ψ(s/2) − ψ((1−s)/2)] off the real axis. -/ -theorem Lm_eq {s : ℂ} (hs : s.im ≠ 0) : - Lm s = 1 / s + 1 / (s - 1) + (1 / 4 : ℂ) * (Complex.digamma (s / 2) - Complex.digamma ((1 - s) / 2)) := by - have h0 : s ≠ 0 := Hardy.ne_zero_of_im_ne_zero hs - have h1 : s - 1 ≠ 0 := sub_ne_zero.mpr (Hardy.ne_one_of_im_ne_zero hs) - have h2 : 1 - s ≠ 0 := sub_ne_zero.mpr (Hardy.ne_one_of_im_ne_zero hs).symm - unfold Lm Lfn - rw [logDeriv_Gammaℝ_offreal hs, logDeriv_Gammaℝ_offreal (Hardy.im_one_sub_ne_zero hs), - show (1 : ℂ) - s - 1 = -s by ring] - field_simp - ring - -/-- L₂(s) = −½log π + ¼[ψ(s/2) + ψ((1−s)/2)] off the real axis. -/ -theorem L2_eq_digamma {s : ℂ} (hs : s.im ≠ 0) : - L2 s = -(Real.log Real.pi : ℂ) / 2 - + (1 / 4 : ℂ) * (Complex.digamma (s / 2) + Complex.digamma ((1 - s) / 2)) := by - rw [Hardy.L2_eq hs, logDeriv_Gammaℝ_offreal hs, logDeriv_Gammaℝ_offreal (Hardy.im_one_sub_ne_zero hs)] - ring - -/-- ζ′/ζ + L₂ = ξ′/ξ − L₋ on Re s > 0, s ∉ ℝ, ζ(s) ≠ 0. -/ -theorem logDeriv_zeta_add_L2 {s : ℂ} (hs : s.im ≠ 0) (hre : 0 < s.re) (hζ : riemannZeta s ≠ 0) : - logDeriv riemannZeta s + L2 s = logDeriv xi s - Lm s := by - have h0 : s ≠ 0 := Hardy.ne_zero_of_im_ne_zero hs - have h1 : s - 1 ≠ 0 := sub_ne_zero.mpr (Hardy.ne_one_of_im_ne_zero hs) - have h2 : 1 - s ≠ 0 := sub_ne_zero.mpr (Hardy.ne_one_of_im_ne_zero hs).symm - rw [Hardy.L2_eq hs, logDeriv_xi_eq hre (Hardy.ne_one_of_im_ne_zero hs) hζ, Lm] - unfold Lfn - rw [show (1 : ℂ) - s - 1 = -s by ring] - field_simp - ring - -/-- W = ζ·(ζ′/ζ + L₂) wherever ζ ≠ 0. -/ -theorem hardyW_eq_mul {s : ℂ} (hζ : riemannZeta s ≠ 0) : - hardyW s = riemannZeta s * (logDeriv riemannZeta s + L2 s) := by - unfold hardyW - rw [logDeriv_apply] - field_simp - -/-! ## §2. Stirling, real parts -/ - -/-- ‖ψ(z) − log z‖ ≤ 4 for Re z > 0, |Im z| ≥ 1. -/ -theorem norm_digamma_sub_log_le {z : ℂ} (hz : 0 < z.re) (hi : 1 ≤ |z.im|) : - ‖Complex.digamma z - Complex.log z‖ ≤ 4 := by - have hst := Zeta23.StirlingVert.digamma_stirling (w := z) hz (by linarith) - have him2 : 3 / z.im ^ 2 ≤ 3 := by - rw [div_le_iff₀ (by nlinarith [sq_abs z.im])] - nlinarith [sq_abs z.im] - have hnorm : 1 ≤ ‖z‖ := le_trans hi (Complex.abs_im_le_norm z) - have hinv : ‖(1 / 2 : ℂ) / z‖ ≤ 1 / 2 := by - rw [norm_div, show (1 / 2 : ℂ) = ((1 / 2 : ℝ) : ℂ) by norm_num, Complex.norm_real, Real.norm_eq_abs, - abs_of_pos (by norm_num), div_le_iff₀ (by linarith)] - linarith - have e : Complex.digamma z - Complex.log z - = (Complex.digamma z - Complex.log z + (1 / 2 : ℂ) / z) - (1 / 2 : ℂ) / z := by ring - rw [e] - exact (norm_sub_le _ _).trans (by linarith) - -/-- Re ψ(z) ≥ log|Im z| − 4 for Re z > 0, |Im z| ≥ 1. -/ -theorem re_digamma_ge {z : ℂ} (hz : 0 < z.re) (hi : 1 ≤ |z.im|) : - Real.log |z.im| - 4 ≤ (Complex.digamma z).re := by - have h := norm_digamma_sub_log_le hz hi - have hre : |(Complex.digamma z - Complex.log z).re| ≤ 4 := - le_trans (Complex.abs_re_le_norm _) h - have hre' := (abs_le.mp hre).1 - rw [Complex.sub_re, Complex.log_re] at hre' - have hlog : Real.log |z.im| ≤ Real.log ‖z‖ := - Real.log_le_log (by linarith) (Complex.abs_im_le_norm z) - linarith - -/-- iterated functional equation off the real axis: ψ(z + n) = ψ(z) + Σ_{k simp - | succ n ih => - have hne : ∀ m : ℕ, z + n ≠ -(m : ℂ) := by - intro m h - have := congrArg Complex.im h - simp only [Complex.add_im, Complex.natCast_im, Complex.neg_im, add_zero, neg_zero] at this - exact hz this - rw [Nat.cast_succ, ← add_assoc, Complex.digamma_apply_add_one _ hne, ih, Finset.sum_range_succ, - one_div] - ring - -/-- Re ψ((1−s)/2) ≥ log(|Im s|/2) − 5 for Re s ≥ 1, |Im s| ≥ 2 (iterate down from Re ∈ (1/2, 3/2]). -/ -theorem re_digamma_half_one_sub_ge {s : ℂ} (hre : 1 ≤ s.re) (hi : 2 ≤ |s.im|) : - Real.log (|s.im| / 2) - 5 ≤ (Complex.digamma ((1 - s) / 2)).re := by - have hs : s.im ≠ 0 := fun h => by rw [h, abs_zero] at hi; linarith - set z : ℂ := (1 - s) / 2 with hzdef - have hzre : z.re = (1 - s.re) / 2 := by simp [hzdef] - have hzim : z.im = -s.im / 2 := by simp [hzdef] - have hz : z.im ≠ 0 := by rw [hzim]; intro h; apply hs; linarith - set N : ℕ := ⌊s.re / 2⌋₊ with hNdef - have hfl : (N : ℝ) ≤ s.re / 2 := Nat.floor_le (by linarith) - have hfl2 : s.re / 2 < N + 1 := Nat.lt_floor_add_one (s.re / 2) - have key := digamma_add_nat_offreal hz (N + 1) - -- the shifted point z + (N+1) has Re ∈ (1/2, 3/2] and |Im| = |Im s|/2 ≥ 1 - have hwre : 0 < (z + ((N + 1 : ℕ) : ℂ)).re := by - simp only [Complex.add_re, Complex.natCast_re, hzre]; push_cast; linarith - have hwim : (z + ((N + 1 : ℕ) : ℂ)).im = -s.im / 2 := by - simp only [Complex.add_im, Complex.natCast_im, hzim, add_zero] - have hwim1 : 1 ≤ |(z + ((N + 1 : ℕ) : ℂ)).im| := by - rw [hwim, abs_div, abs_neg, abs_two]; linarith - have hψw := re_digamma_ge hwre hwim1 - rw [hwim, abs_div, abs_neg, abs_two] at hψw - -- the correction terms: all but the last have Re ≤ 0; the last has Re ≤ 1/2 - have hterm : ∀ k : ℕ, (1 / (z + (k : ℂ))).re = (z.re + k) / Complex.normSq (z + k) := by - intro k; rw [one_div, Complex.inv_re]; simp - have hfirst : ∑ k ∈ Finset.range N, (1 / (z + (k : ℂ))).re ≤ 0 := by - apply Finset.sum_nonpos - intro k hk - rw [Finset.mem_range] at hk - have hk' : (k : ℝ) + 1 ≤ N := by exact_mod_cast hk - rw [hterm] - apply div_nonpos_of_nonpos_of_nonneg _ (Complex.normSq_nonneg _) - rw [hzre]; linarith - have hlast : (1 / (z + (N : ℂ))).re ≤ 1 / 2 := by - rw [hterm] - have hN1 : 1 ≤ Complex.normSq (z + N) := by - rw [Complex.normSq_apply] - have h1 : (z + (N : ℂ)).im = -s.im / 2 := by simp [hzim] - have h2 : 1 ≤ (-s.im / 2) ^ 2 := by - have : 1 ≤ |s.im| / 2 := by linarith - have h3 : (|s.im| / 2) ^ 2 = (-s.im / 2) ^ 2 := by rw [div_pow, div_pow, sq_abs]; ring - nlinarith - rw [h1] - nlinarith [sq_nonneg ((z + (N : ℂ)).re)] - have hre_le : z.re + N ≤ 1 / 2 := by rw [hzre]; linarith - rw [div_le_iff₀ (by linarith)] - linarith - have hsum : ∑ k ∈ Finset.range (N + 1), (1 / (z + (k : ℂ))).re ≤ 1 / 2 := by - rw [Finset.sum_range_succ]; linarith - -- assemble - have e : (Complex.digamma z).re = (Complex.digamma (z + ((N + 1 : ℕ) : ℂ))).re - - ∑ k ∈ Finset.range (N + 1), (1 / (z + (k : ℂ))).re := by - rw [key, Complex.add_re, Complex.re_sum]; ring - rw [e] - linarith - -/-- Re L₂(σ+it) ≥ ½ log|t| − C for σ ≥ 1, |t| ≥ 2. -/ -theorem re_L2_ge : ∃ C : ℝ, ∀ s : ℂ, 1 ≤ s.re → 2 ≤ |s.im| → - Real.log |s.im| / 2 - C ≤ (L2 s).re := by - refine ⟨Real.log 2 / 2 + Real.log Real.pi / 2 + 9 / 4, fun s hre hi => ?_⟩ - have hs : s.im ≠ 0 := fun h => by rw [h, abs_zero] at hi; linarith - have hA : Real.log (|s.im| / 2) - 4 ≤ (Complex.digamma (s / 2)).re := by - have h := re_digamma_ge (z := s / 2) (by simp; linarith) - (by rw [Complex.div_ofNat_im, abs_div, abs_two]; linarith) - rwa [Complex.div_ofNat_im, abs_div, abs_two] at h - have hB := re_digamma_half_one_sub_ge hre hi - have hlog : Real.log (|s.im| / 2) = Real.log |s.im| - Real.log 2 := by - rw [Real.log_div (by positivity) (by norm_num)] - have e : (L2 s).re = -(Real.log Real.pi) / 2 - + 1 / 4 * ((Complex.digamma (s / 2)).re + (Complex.digamma ((1 - s) / 2)).re) := by - rw [L2_eq_digamma hs, show (1 / 4 : ℂ) = ((1 / 4 : ℝ) : ℂ) by norm_num, Complex.add_re, - Complex.re_ofReal_mul, Complex.add_re] - congr 1 - rw [show (-(Real.log Real.pi : ℂ) / 2) = (((-(Real.log Real.pi) / 2 : ℝ)) : ℂ) by push_cast; ring, - Complex.ofReal_re] - rw [e] - linarith - -set_option maxHeartbeats 800000 in -/-- |Re L₋(σ+it)| ≤ C/t² for 1 ≤ σ ≤ 2, |t| ≥ 4. -/ -theorem abs_re_Lm_le : ∃ C : ℝ, 0 ≤ C ∧ ∀ s : ℂ, 1 ≤ s.re → s.re ≤ 2 → 4 ≤ |s.im| → - |(Lm s).re| ≤ C / s.im ^ 2 := by - refine ⟨11, by norm_num, fun s h1 h2 hi => ?_⟩ - have hs : s.im ≠ 0 := fun h => by rw [h, abs_zero] at hi; linarith - have hs' : (1 - s).im ≠ 0 := Hardy.im_one_sub_ne_zero hs - set t : ℝ := s.im with ht - have ht2 : 16 ≤ t ^ 2 := by nlinarith [sq_abs t] - have ht0 : 0 < t ^ 2 := by linarith - -- generic: |Re(1/w)| ≤ |Re w| / (Im w)² - have hinv : ∀ w : ℂ, w.im ^ 2 = t ^ 2 → |(1 / w).re| ≤ |w.re| / t ^ 2 := by - intro w hw - rw [one_div, Complex.inv_re, abs_div, abs_of_nonneg (Complex.normSq_nonneg _)] - have hN : t ^ 2 ≤ Complex.normSq w := by rw [Complex.normSq_apply, ← hw]; nlinarith - exact div_le_div_of_nonneg_left (abs_nonneg _) ht0 hN - -- one functional-equation step for ψ((1−s)/2) - have hFE : Complex.digamma ((1 - s) / 2) = Complex.digamma ((3 - s) / 2) - 2 / (1 - s) := by - have h := Complex.digamma_apply_add_one ((1 - s) / 2) (Hardy.half_ne_neg_nat hs') - rw [show (1 - s) / 2 + 1 = ((3 : ℂ) - s) / 2 by ring] at h - rw [h] - have : (1 : ℂ) - s ≠ 0 := sub_ne_zero.mpr (Hardy.ne_one_of_im_ne_zero hs).symm - field_simp - ring - -- Stirling remainders at z₁ = s/2 and z₂ = (3−s)/2 - set z₁ : ℂ := s / 2 with hz₁ - set z₂ : ℂ := (3 - s) / 2 with hz₂ - have hz₁re : z₁.re = s.re / 2 := by simp [hz₁] - have hz₁im : z₁.im = t / 2 := by simp [hz₁, ht] - have hz₂re : z₂.re = (3 - s.re) / 2 := by simp [hz₂] - have hz₂im : z₂.im = -t / 2 := by simp [hz₂, ht] - set E₁ : ℂ := Complex.digamma z₁ - Complex.log z₁ + (1 / 2 : ℂ) / z₁ with hE₁ - set E₂ : ℂ := Complex.digamma z₂ - Complex.log z₂ + (1 / 2 : ℂ) / z₂ with hE₂ - have hE₁b : ‖E₁‖ ≤ 12 / t ^ 2 := by - have h := Zeta23.StirlingVert.digamma_stirling (w := z₁) (by rw [hz₁re]; linarith) - (by rw [hz₁im, abs_div, abs_two]; linarith) - rw [hz₁im] at h - calc ‖E₁‖ ≤ 3 / (t / 2) ^ 2 := h - _ = 12 / t ^ 2 := by field_simp; ring - have hE₂b : ‖E₂‖ ≤ 12 / t ^ 2 := by - have h := Zeta23.StirlingVert.digamma_stirling (w := z₂) (by rw [hz₂re]; linarith) - (by rw [hz₂im, abs_div, abs_neg, abs_two]; linarith) - rw [hz₂im] at h - calc ‖E₂‖ ≤ 3 / (-t / 2) ^ 2 := h - _ = 12 / t ^ 2 := by field_simp; ring - -- the real part of log z₁ − log z₂ - have hn₁ : Complex.normSq z₁ = (s.re ^ 2 + t ^ 2) / 4 := by - rw [Complex.normSq_apply, hz₁re, hz₁im]; ring - have hn₂ : Complex.normSq z₂ = ((3 - s.re) ^ 2 + t ^ 2) / 4 := by - rw [Complex.normSq_apply, hz₂re, hz₂im]; ring - have hn₁pos : t ^ 2 / 4 ≤ Complex.normSq z₁ := by rw [hn₁]; nlinarith - have hn₂pos : t ^ 2 / 4 ≤ Complex.normSq z₂ := by rw [hn₂]; nlinarith - have hlogre : |(Complex.log z₁).re - (Complex.log z₂).re| ≤ 3 / (2 * t ^ 2) := by - have hl : ∀ z : ℂ, Real.log ‖z‖ = Real.log (Complex.normSq z) / 2 := fun z => by - rw [Complex.normSq_eq_norm_sq, Real.log_pow]; ring - rw [Complex.log_re, Complex.log_re, hl, hl] - set a := Complex.normSq z₁ - set b := Complex.normSq z₂ - have ha : 0 < a := by linarith - have hb : 0 < b := by linarith - have hab : |a - b| ≤ 3 / 4 := by - rw [hn₁, hn₂, abs_le]; constructor <;> nlinarith - have h1 : Real.log a - Real.log b ≤ |a - b| / (t ^ 2 / 4) := by - rw [← Real.log_div ha.ne' hb.ne'] - calc Real.log (a / b) ≤ a / b - 1 := Real.log_le_sub_one_of_pos (by positivity) - _ = (a - b) / b := by field_simp - _ ≤ |a - b| / b := div_le_div_of_nonneg_right (le_abs_self _) hb.le - _ ≤ |a - b| / (t ^ 2 / 4) := div_le_div_of_nonneg_left (abs_nonneg _) (by positivity) hn₂pos - have h2 : Real.log b - Real.log a ≤ |a - b| / (t ^ 2 / 4) := by - rw [← Real.log_div hb.ne' ha.ne'] - calc Real.log (b / a) ≤ b / a - 1 := Real.log_le_sub_one_of_pos (by positivity) - _ = (b - a) / a := by field_simp - _ ≤ |a - b| / a := div_le_div_of_nonneg_right (by rw [abs_sub_comm]; exact le_abs_self _) ha.le - _ ≤ |a - b| / (t ^ 2 / 4) := div_le_div_of_nonneg_left (abs_nonneg _) (by positivity) hn₁pos - have h3 : |a - b| / (t ^ 2 / 4) ≤ 3 / t ^ 2 := by - rw [div_le_div_iff₀ (by positivity) ht0]; nlinarith - have h4 : (3 : ℝ) / (2 * t ^ 2) = (3 / t ^ 2) / 2 := by ring - rw [abs_le, h4] - constructor <;> linarith - -- the four rational terms - have r1 : |(1 / s).re| ≤ 2 / t ^ 2 := by - refine (hinv s (by rw [ht])).trans ?_ - rw [abs_of_pos (by linarith)] - exact div_le_div_of_nonneg_right h2 ht0.le - have r2 : |(1 / (s - 1)).re| ≤ 1 / t ^ 2 := by - refine (hinv (s - 1) (by simp [ht])).trans ?_ - apply div_le_div_of_nonneg_right _ ht0.le - rw [Complex.sub_re, Complex.one_re, abs_of_nonneg (by linarith)]; linarith - have r3 : |((1 / 2 : ℂ) / z₁).re| ≤ 2 / t ^ 2 := by - rw [show (1 / 2 : ℂ) / z₁ = 1 / s by rw [hz₁]; field_simp] - exact r1 - have r4 : |((1 / 2 : ℂ) / z₂).re| ≤ 2 / t ^ 2 := by - rw [show (1 / 2 : ℂ) / z₂ = 1 / (3 - s) by rw [hz₂]; field_simp] - refine (hinv (3 - s) (by simp [ht])).trans ?_ - apply div_le_div_of_nonneg_right _ ht0.le - rw [Complex.sub_re, show (3 : ℂ).re = 3 by norm_num, abs_of_nonneg (by linarith)]; linarith - have r5 : |(2 / (1 - s)).re| ≤ 2 / t ^ 2 := by - rw [show (2 : ℂ) / (1 - s) = 2 * (1 / (1 - s)) by ring, - show ((2 : ℂ) * (1 / (1 - s))).re = 2 * (1 / (1 - s)).re by simp [Complex.mul_re], abs_mul, - abs_two] - have := hinv (1 - s) (by simp [ht]) - rw [Complex.sub_re, Complex.one_re] at this - have h' : |1 - s.re| ≤ 1 := by rw [abs_le]; constructor <;> linarith - calc 2 * |(1 / (1 - s)).re| ≤ 2 * (|1 - s.re| / t ^ 2) := by linarith - _ ≤ 2 * (1 / t ^ 2) := by gcongr - _ = 2 / t ^ 2 := by ring - have rE₁ : |E₁.re| ≤ 12 / t ^ 2 := (Complex.abs_re_le_norm _).trans hE₁b - have rE₂ : |E₂.re| ≤ 12 / t ^ 2 := (Complex.abs_re_le_norm _).trans hE₂b - -- the formula for Re L₋ - have e : (Lm s).re = (1 / s).re + (1 / (s - 1)).re - + 1 / 4 * (((Complex.log z₁).re - (Complex.log z₂).re) - - ((1 / 2 : ℂ) / z₁).re + ((1 / 2 : ℂ) / z₂).re + E₁.re - E₂.re + (2 / (1 - s)).re) := by - have hψ : Complex.digamma (s / 2) - Complex.digamma ((1 - s) / 2) - = (Complex.log z₁ - Complex.log z₂) - ((1 / 2 : ℂ) / z₁ - (1 / 2 : ℂ) / z₂) + (E₁ - E₂) - + 2 / (1 - s) := by - rw [hFE, hE₁, hE₂, hz₁, hz₂]; ring - rw [Lm_eq hs, hψ, show (1 / 4 : ℂ) = ((1 / 4 : ℝ) : ℂ) by norm_num] - simp only [Complex.add_re, Complex.sub_re, Complex.re_ofReal_mul] - ring - rw [e] - have habs := abs_le.mp hlogre - have := abs_le.mp r1; have := abs_le.mp r2; have := abs_le.mp r3; have := abs_le.mp r4 - have := abs_le.mp r5; have := abs_le.mp rE₁; have := abs_le.mp rE₂ - rw [abs_le] - constructor - · have : -(11 / t ^ 2) = -(2 / t ^ 2) - 1 / t ^ 2 - - 1 / 4 * (3 / (2 * t ^ 2) + 2 / t ^ 2 + 2 / t ^ 2 + 12 / t ^ 2 + 12 / t ^ 2 + 2 / t ^ 2) - - 1 / (8 * t ^ 2) := by ring - have h5 : 0 ≤ 1 / (8 * t ^ 2) := by positivity - linarith - · have : (11 / t ^ 2) = (2 / t ^ 2) + 1 / t ^ 2 - + 1 / 4 * (3 / (2 * t ^ 2) + 2 / t ^ 2 + 2 / t ^ 2 + 12 / t ^ 2 + 12 / t ^ 2 + 2 / t ^ 2) - + 1 / (8 * t ^ 2) := by ring - have h5 : 0 ≤ 1 / (8 * t ^ 2) := by positivity - linarith - -/-! ## §3. The zero sum: Re ξ′/ξ(σ+it) ≥ N_T/(8t²) -/ - -theorem finite_absWindow (T : ℝ) : {ρ : ℂ | IsNontrivialZero ρ ∧ |ρ.im| ≤ T}.Finite := by - refine (zetaSeam.finite_window (-T - 1) T).subset ?_ - rintro ρ ⟨h1, h2⟩ - have := abs_le.mp h2 - exact ⟨h1, by linarith, this.2⟩ - -/-- N_T := number of nontrivial zeros ρ of ζ with |Im ρ| ≤ T, counted with multiplicity. -/ -def NT (T : ℝ) : ℕ := ∑ ρ ∈ (finite_absWindow T).toFinset, zeroMult ρ - -/-- reflection symmetry of the multiset: Σ_{|γ|≤T} m_ρ (1 − β_ρ) = Σ_{|γ|≤T} m_ρ β_ρ, hence = N_T/2. -/ -theorem sum_mult_one_sub_re (T : ℝ) : - ∑ ρ ∈ (finite_absWindow T).toFinset, (zeroMult ρ : ℝ) * (1 - ρ.re) - = ∑ ρ ∈ (finite_absWindow T).toFinset, (zeroMult ρ : ℝ) * ρ.re := by - have hmem : ∀ ρ, ρ ∈ (finite_absWindow T).toFinset ↔ IsNontrivialZero ρ ∧ |ρ.im| ≤ T := fun ρ => by - rw [Set.Finite.mem_toFinset]; rfl - have hrr : ∀ ρ : ℂ, reflect (reflect ρ) = ρ := fun ρ => by simp [reflect] - have hre : ∀ ρ : ℂ, (reflect ρ).re = 1 - ρ.re := fun ρ => by simp [reflect] - have hmaps : ∀ ρ ∈ (finite_absWindow T).toFinset, reflect ρ ∈ (finite_absWindow T).toFinset := by - intro ρ hρ - rw [hmem] at hρ ⊢ - exact ⟨zeta_reflect_zero ρ hρ.1, by rw [reflect_im]; exact hρ.2⟩ - refine Finset.sum_nbij' reflect reflect hmaps hmaps (fun ρ _ => hrr ρ) (fun ρ _ => hrr ρ) ?_ - intro ρ hρ - rw [zeta_mult_reflect ρ ((hmem ρ).mp hρ).1, hre] - -theorem two_mul_sum_mult_one_sub_re (T : ℝ) : - 2 * ∑ ρ ∈ (finite_absWindow T).toFinset, (zeroMult ρ : ℝ) * (1 - ρ.re) = (NT T : ℝ) := by - rw [two_mul] - nth_rewrite 2 [sum_mult_one_sub_re] - rw [← Finset.sum_add_distrib, NT, Nat.cast_sum] - exact Finset.sum_congr rfl (fun ρ _ => by ring) - -/-- Re ξ′/ξ(σ+it) ≥ N_T/(8t²) for 1 ≤ σ ≤ 2 and |t| ≥ max(2, 2T). -/ -theorem re_logDeriv_xi_ge {T : ℝ} (_hT : 0 ≤ T) {s : ℂ} (h1 : 1 ≤ s.re) (h2 : s.re ≤ 2) - (ht : 2 ≤ |s.im|) (hT2 : 2 * T ≤ |s.im|) : - (NT T : ℝ) / (8 * s.im ^ 2) ≤ (logDeriv xi s).re := by - classical - have hxi : xi s ≠ 0 := xi_ne_zero_of_one_le_re h1 - rw [re_logDeriv_xi_eq_tsum hxi] - have hsum := summable_re_one_div hxi - have ht0 : 0 < s.im ^ 2 := by nlinarith [sq_abs s.im] - set F := (finite_absWindow T).toFinset with hF - have hmemF : ∀ ρ, ρ ∈ F ↔ IsNontrivialZero ρ ∧ |ρ.im| ≤ T := fun ρ => by - rw [hF, Set.Finite.mem_toFinset]; rfl - set f : zetaZeroConfig.carrier → ℝ := - fun ρ => (zeroMult ρ : ℝ) * ((s.re - (ρ : ℂ).re) / Complex.normSq (s - ρ)) with hfdef - have hnonneg : ∀ ρ : zetaZeroConfig.carrier, 0 ≤ f ρ := by - intro ρ - have hρ : IsNontrivialZero (ρ : ℂ) := ρ.2 - exact mul_nonneg (Nat.cast_nonneg _) (div_nonneg (by linarith [hρ.2.2]) (Complex.normSq_nonneg _)) - set F' : Finset zetaZeroConfig.carrier := F.subtype (· ∈ zetaZeroConfig.carrier) with hF' - have hle : ∑ x ∈ F', f x ≤ ∑' x, f x := hsum.sum_le_tsum F' (fun x _ => hnonneg x) - have heq : ∑ x ∈ F', f x = ∑ ρ ∈ F, (zeroMult ρ : ℝ) * ((s.re - ρ.re) / Complex.normSq (s - ρ)) := by - have h1 := Finset.sum_subtype_eq_sum_filter (s := F) (p := (· ∈ zetaZeroConfig.carrier)) - (fun ρ : ℂ => (zeroMult ρ : ℝ) * ((s.re - ρ.re) / Complex.normSq (s - ρ))) - have h2 : F.filter (· ∈ zetaZeroConfig.carrier) = F := by - apply Finset.filter_true_of_mem - intro ρ hρ - exact ((hmemF ρ).mp hρ).1 - rw [h2] at h1 - rw [← h1] - have hterm : ∀ ρ ∈ F, (zeroMult ρ : ℝ) * (1 - ρ.re) / (4 * s.im ^ 2) - ≤ (zeroMult ρ : ℝ) * ((s.re - ρ.re) / Complex.normSq (s - ρ)) := by - intro ρ hρ - obtain ⟨hz, hγ⟩ := (hmemF ρ).mp hρ - have hβ0 := hz.2.1 - have hβ1 := hz.2.2 - have habs : |s.im - ρ.im| ≤ 3 / 2 * |s.im| := by - calc |s.im - ρ.im| ≤ |s.im| + |ρ.im| := abs_sub _ _ - _ ≤ 3 / 2 * |s.im| := by linarith - have hsq : (s.im - ρ.im) ^ 2 ≤ (3 / 2 * |s.im|) ^ 2 := by - rw [← sq_abs (s.im - ρ.im)] - exact pow_le_pow_left₀ (abs_nonneg _) habs 2 - have hN : Complex.normSq (s - ρ) ≤ 4 * s.im ^ 2 := by - rw [Complex.normSq_apply, Complex.sub_re, Complex.sub_im] - nlinarith [sq_abs s.im] - have hNpos : 0 < Complex.normSq (s - ρ) := - Complex.normSq_pos.mpr (sub_ne_zero.mpr (fun h => by rw [h] at h1; linarith)) - calc (zeroMult ρ : ℝ) * (1 - ρ.re) / (4 * s.im ^ 2) - ≤ (zeroMult ρ : ℝ) * (s.re - ρ.re) / (4 * s.im ^ 2) := by - apply div_le_div_of_nonneg_right _ (by positivity) - exact mul_le_mul_of_nonneg_left (by linarith) (Nat.cast_nonneg _) - _ ≤ (zeroMult ρ : ℝ) * (s.re - ρ.re) / Complex.normSq (s - ρ) := - div_le_div_of_nonneg_left (mul_nonneg (Nat.cast_nonneg _) (by linarith)) hNpos hN - _ = (zeroMult ρ : ℝ) * ((s.re - ρ.re) / Complex.normSq (s - ρ)) := by ring - have hhalf := two_mul_sum_mult_one_sub_re T - calc (NT T : ℝ) / (8 * s.im ^ 2) - = (∑ ρ ∈ F, (zeroMult ρ : ℝ) * (1 - ρ.re)) / (4 * s.im ^ 2) := by - rw [← hhalf]; field_simp; ring - _ = ∑ ρ ∈ F, (zeroMult ρ : ℝ) * (1 - ρ.re) / (4 * s.im ^ 2) := by rw [Finset.sum_div] - _ ≤ ∑ ρ ∈ F, (zeroMult ρ : ℝ) * ((s.re - ρ.re) / Complex.normSq (s - ρ)) := Finset.sum_le_sum hterm - _ = ∑ x ∈ F', f x := heq.symm - _ ≤ ∑' x, f x := hle - -/-- N_T → ∞ (Riemann–von Mangoldt). -/ -theorem exists_NT_ge (K : ℝ) : ∃ T : ℝ, 0 ≤ T ∧ K ≤ (NT T : ℝ) := by - classical - have hRvM := Zeta23.RvM.riemannVonMangoldt Zeta23.gammaFacts - have h1 := Zeta23.Assembly.eventually_N_ge zetaZeroConfig hRvM - have h2 : ∀ᶠ T : ℝ in atTop, 4 * Real.pi * K ≤ T * l T := - Zeta23.Assembly.tendsto_Tl_atTop.eventually_ge_atTop _ - obtain ⟨T₁, hT1, hT2, hT0⟩ := (h1.and (h2.and (eventually_ge_atTop 0))).exists - refine ⟨2 * T₁, by linarith, ?_⟩ - have hK : K ≤ (zetaZeroConfig.N T₁ (2 * T₁) : ℝ) := by - refine le_trans ?_ hT1 - rw [le_div_iff₀ (by positivity)] - linarith - refine hK.trans ?_ - have hfinW := zetaZeroConfig.finite_window T₁ (2 * T₁) - have hN : zetaZeroConfig.N T₁ (2 * T₁) ≤ NT (2 * T₁) := by - unfold ZeroConfig.N NT - rw [show zetaZeroConfig.window T₁ (2 * T₁) - = zetaZeroConfig.carrier ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ 2 * T₁} from rfl, - finsum_mem_eq_finite_toFinset_sum _ hfinW] - apply Finset.sum_le_sum_of_subset_of_nonneg - · intro ρ hρ - rw [Set.Finite.mem_toFinset] at hρ ⊢ - obtain ⟨hc, hw1, hw2⟩ := hρ - refine ⟨hc, ?_⟩ - show |ρ.im| ≤ 2 * T₁ - rw [abs_of_pos (by linarith)] - exact hw2 - · intro _ _ _ - exact Nat.zero_le _ - exact_mod_cast hN - -/-! ## §4. W ≠ 0 on Re s ≥ 1, |Im s| ≥ t₀ -/ - -theorem regionA : ∃ tA : ℝ, 0 < tA ∧ ∀ s : ℂ, 1 ≤ s.re → s.re ≤ 2 → tA ≤ |s.im| → - 0 < (logDeriv xi s - Lm s).re := by - obtain ⟨C, hC0, hC⟩ := abs_re_Lm_le - obtain ⟨T, hT0, hT⟩ := exists_NT_ge (8 * C + 8) - refine ⟨max 4 (2 * T), by positivity, fun s h1 h2 ht => ?_⟩ - have ht4 : 4 ≤ |s.im| := le_trans (le_max_left _ _) ht - have hT2 : 2 * T ≤ |s.im| := le_trans (le_max_right _ _) ht - have ht0 : 0 < s.im ^ 2 := by nlinarith [sq_abs s.im] - have hlow := re_logDeriv_xi_ge hT0 h1 h2 (by linarith) hT2 - have hLm := (abs_le.mp (hC s h1 h2 ht4)).2 - rw [Complex.sub_re] - have : C / s.im ^ 2 < (NT T : ℝ) / (8 * s.im ^ 2) := by - rw [div_lt_div_iff₀ ht0 (by positivity)] - nlinarith - linarith - -theorem regionB : ∃ tB : ℝ, 0 < tB ∧ ∀ s : ℂ, 3 / 2 ≤ s.re → tB ≤ |s.im| → - 0 < (logDeriv riemannZeta s + L2 s).re := by - obtain ⟨C, hC⟩ := re_L2_ge - obtain ⟨M, hM0, hM⟩ := norm_logDeriv_zeta_le_far - refine ⟨max 2 (Real.exp (2 * (C + M) + 1)), by positivity, fun s hre ht => ?_⟩ - have ht2 : 2 ≤ |s.im| := le_trans (le_max_left _ _) ht - have hlog : 2 * (C + M) + 1 ≤ Real.log |s.im| := by - rw [← Real.log_exp (2 * (C + M) + 1)] - exact Real.log_le_log (Real.exp_pos _) (le_trans (le_max_right _ _) ht) - have hL2 := hC s (by linarith) ht2 - have hζ : -M ≤ (logDeriv riemannZeta s).re := by - have := (abs_le.mp (le_trans (Complex.abs_re_le_norm _) (hM s hre))).1 - linarith - rw [Complex.add_re] - linarith - -theorem hardyW_ne_zero_of_one_le_re : ∃ t₀ : ℝ, 0 < t₀ ∧ ∀ s : ℂ, 1 ≤ s.re → t₀ ≤ |s.im| → - hardyW s ≠ 0 := by - obtain ⟨tA, htA, hA⟩ := regionA - obtain ⟨tB, htB, hB⟩ := regionB - refine ⟨max tA tB, by positivity, fun s hre ht => ?_⟩ - have hs : s.im ≠ 0 := fun h => by - rw [h, abs_zero] at ht; linarith [le_max_left tA tB] - have hζ : riemannZeta s ≠ 0 := riemannZeta_ne_zero_of_one_le_re hre - rw [hardyW_eq_mul hζ] - refine mul_ne_zero hζ (fun h0 => ?_) - rcases le_or_gt s.re 2 with h2 | h2 - · have hpos := hA s hre h2 (le_trans (le_max_left _ _) ht) - rw [← logDeriv_zeta_add_L2 hs (by linarith) hζ, h0, Complex.zero_re] at hpos - exact lt_irrefl _ hpos - · have hpos := hB s (by linarith) (le_trans (le_max_right _ _) ht) - rw [h0, Complex.zero_re] at hpos - exact lt_irrefl _ hpos - -end ZeroFree -end Hardy - -/-- **(Z6), unconditionally**: there is a height t₀ > 0 above which every zero of W = ζ′ + L₂ζ lies in the -open critical strip 0 < Re s < 1. -/ -theorem wZerosInStrip_holds : ∃ t₀ : ℝ, 0 < t₀ ∧ WZerosInStrip t₀ := by - obtain ⟨t₀, ht₀, h⟩ := Hardy.ZeroFree.hardyW_ne_zero_of_one_le_re - refine ⟨t₀, ht₀, fun ρ hρ hρt => ?_⟩ - have him : ρ.im ≠ 0 := fun h0 => by rw [h0, abs_zero] at hρt; linarith - by_contra hc - rcases not_and_or.mp hc with h1 | h1 - · -- Re ρ ≤ 0: reflect to 1 − ρ - have h1' : 1 ≤ (1 - ρ).re := by simp; linarith [not_lt.mp h1] - have ht' : t₀ ≤ |(1 - ρ).im| := by simpa [abs_neg] using hρt - exact h (1 - ρ) h1' ht' ((Hardy.hardyW_one_sub_eq_zero_iff him).mpr hρ) - · exact h ρ (not_lt.mp h1) hρt hρ - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Inputs.lean b/zeta23/Zeta23/XiPrime/Inputs.lean index eec9cecd4a..69e8d63ef4 100644 --- a/zeta23/Zeta23/XiPrime/Inputs.lean +++ b/zeta23/Zeta23/XiPrime/Inputs.lean @@ -3,19 +3,9 @@ Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ -import Zeta23.XiPrime.Assembly -import Zeta23.XiPrime.PrimeSide.Moments -import Zeta23.XiPrime.Window -import Zeta23.XiPrime.Window.FlatAdm -import Zeta23.XiPrime.Window.Quartic import Zeta23.XiPrime.QuarticWindow import Zeta23.XiPrime.Transfer import Zeta23.XiPrime.PrimeSide.Final -import Zeta23.XiPrime.Transfer.W -import Zeta23.XiPrime.Coeff.ReexpansionW -import Zeta23.XiPrime.Certificate.D1 -import Zeta23.GammaFacts.Complete -import Zeta23.MV.Final noncomputable section @@ -67,12 +57,6 @@ theorem coeffMoments_flat_xi (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) {ϱ : CoeffMoments Z (fun _ => paramsOf ϱ lam) xiCoeffFamily (kappaXi lam vFlat) := coeffMoments_flat_D1 Z hR hϱ h0 h1 hF rfl -/-- P1 for Z′ (coefficients C(N; ½ l)), flat window. -/ -theorem coeffMoments_flat_w (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) - {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) (hF : wCoeffFamily.Hyps) : - CoeffMoments Z (fun _ => paramsOf ϱ lam) wCoeffFamily (kappaXi lam vFlat) := - coeffMoments_flat_D1 Z hR hϱ h0 h1 hF rfl - /-! ## P2 — the two-trace transfer, via xiTraceTransfer_of Remaining inputs: the explicit formula XiEF Z Pf and the coefficient @@ -115,46 +99,6 @@ theorem traceTransfer_quartic (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) {ϱ : ⟨1 / 2, by norm_num, hW.a_half⟩ hR hEF hρ₀ hE (frobSq_Ppart_le ppInput_of_PP hMV hC _ _ ⟨h0, h1.le⟩) -/-- **P2 for Z′ (W), flat family**, obtained from `wTraceTransfer_of` and `wReexpansion`; the one -remaining input is the W explicit formula `WEF Z Pf` (see StatementW.lean). -/ -theorem traceTransfer_flat_w (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) - {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) (hEF : WEF Z (fun _ => paramsOf ϱ lam)) : - XiTraceTransfer Z (fun _ => paramsOf ϱ lam) wCoeffFamily := by - have hP := paramsOf_valid hϱ h0 h1.le - obtain ⟨C, hC, hMV⟩ := MV.mv_hilbert - obtain ⟨e, ρ₀, A, T₁, hρ₀, hE⟩ := wReexpansion - have hW := windowZeroSide_flat Z hR (paramsOf ϱ lam) hP - exact wTraceTransfer_of Z (fun _ => paramsOf ϱ lam) wCoeffFamily (paramsOf ϱ lam) hP h1 - (fun _ => ⟨rfl, rfl⟩) - (localHypsCore_eventually (win := fun T => (paramsOf ϱ lam).phi T) hP (admFamily_taper hP)) gammaFacts - ⟨1 / 2, by norm_num, hW.a_half⟩ hR hEF hρ₀ hE - (frobSq_Ppart_le ppInput_of_PP hMV hC _ _ ⟨h0, h1.le⟩) - -/-- P1 for Z′, quartic window. -/ -theorem coeffMoments_quartic_w (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) {ϱ : ℝ → ℝ} (hϱ : TaperProfile ϱ) - {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) (hF : wCoeffFamily.Hyps) : - CoeffMoments Z ((paramsOf ϱ lam).atV vQuartic) wCoeffFamily (kappaXi lam vQuartic) := - coeffMoments_quartic_D1 Z hR hϱ h0 h1 hF rfl - -/-- **P2 for Z′ (W), quartic family.** -/ -theorem traceTransfer_quartic_w (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) {ϱ : ℝ → ℝ} - (hϱ : TaperProfile ϱ) {lam : ℝ} (h0 : 0 < lam) (h1 : lam < 1) - (hEF : WEF Z ((paramsOf ϱ lam).atV vQuartic)) : - XiTraceTransfer Z ((paramsOf ϱ lam).atV vQuartic) wCoeffFamily := by - have hP := paramsOf_valid hϱ h0 h1.le - obtain ⟨C, hC, hMV⟩ := MV.mv_hilbert - obtain ⟨e, ρ₀, A, T₁, hρ₀, hE⟩ := wReexpansion - have hW := windowZeroSide_atV Z hR hP - have hcore : ∃ T₁ : ℝ, ∀ T : ℝ, T₁ ≤ T → PrimeSide.LocalHypsCore (cQ (paramsOf ϱ lam).ϱ) - (((paramsOf ϱ lam).atV vQuartic T).toSetting T) (((paramsOf ϱ lam).atV vQuartic T).localFun T) := by - obtain ⟨T₁, hT₁⟩ := localHypsCoreQ_eventually hP - refine ⟨T₁, fun T hT => ?_⟩ - rw [Params.atV_toSetting, Params.atV_localFun T hP vQuartic_even] - exact hT₁ T hT - exact wTraceTransfer_of Z _ wCoeffFamily (paramsOf ϱ lam) hP h1 (fun _ => ⟨rfl, rfl⟩) hcore gammaFacts - ⟨1 / 2, by norm_num, hW.a_half⟩ hR hEF hρ₀ hE - (frobSq_Ppart_le ppInput_of_PP hMV hC _ _ ⟨h0, h1.le⟩) - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/Abel.lean b/zeta23/Zeta23/XiPrime/PrimeSide/Abel.lean index 78282e146f..af251cd564 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/Abel.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/Abel.lean @@ -4,20 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Part of the Zeta23 formalization. - Zeta23/XiPrime/PrimeSide/Abel.lean — ξ′ generalised-coefficient prime side: the -partial-summation step with a general diagonal density. - -Proof of Thm 8.1: "Proposition PP's diagonal becomes -Σ_{N≤X} |b_N|²/N · g(log N) = ∫_0^L g(y) d(Σ_{N≤e^y} |b_N|²/N) = l ∫_0^L g(y) D₁(y/l) dy + o(·) -by Lemma 7.1(i) (Abel summation; g is Lipschitz with constant ≪ 1 and supported in [−L,L])." -Abstract in everything: weights c ≥ 0 or not, any continuous density D, any C¹ window moment g -with |g′| ≤ 2 vanishing on [L, ∞). Mirror of Zeta23/ThmD/PP.lean's abel_sum_close (density -(log t)²/2 there ↦ l²·∫_0^{log t/l} D here), same Mathlib Abel-summation + IBP route. +partial-summation step with a general diagonal density, instantiated from +`PrimeSide.abel_sum_density_general`. -/ import Zeta23.PrimeSideB.PP -import Mathlib.NumberTheory.AbelSummation noncomputable section @@ -37,175 +28,21 @@ theorem abel_sum_density {c : ℕ → ℝ} (hc0 : c 0 = 0) {D : ℝ → ℝ} (hD (hg'le : ∀ y : ℝ, |deriv g y| ≤ 2) (hgsupp : ∀ y : ℝ, L ≤ y → g y = 0) : |(∑ n ∈ Finset.Ioc 0 ⌊Real.exp L⌋₊, c n * g (Real.log n)) - lT * ∫ y in (0:ℝ)..L, (D (y / lT) * g y)| ≤ 2 * η * L := by - classical - set X := Real.exp L with hX - have hX1 : 1 < X := by rw [hX]; exact Real.one_lt_exp_iff.2 hL - have hX0 : 0 < X := by linarith - have hlogX : Real.log X = L := by rw [hX, Real.log_exp] - have hη : 0 ≤ η := le_trans (abs_nonneg _) (hS 1 le_rfl hX1.le) - -- the Abel data - set f : ℝ → ℝ := fun t => g (Real.log t) with hfdef - have hfderiv : ∀ t : ℝ, 0 < t → HasDerivAt f (deriv g (Real.log t) / t) t := by - intro t ht - have h1 := (hgd (Real.log t)).hasDerivAt - have h2 := Real.hasDerivAt_log ht.ne' - have := h1.comp t h2 - rw [hfdef] - simpa [Function.comp_def, div_eq_mul_inv] using this - have hdiff : ∀ t ∈ Set.Icc (1:ℝ) X, DifferentiableAt ℝ f t := fun t ht => - (hfderiv t (by linarith [ht.1])).differentiableAt - have hderiv_eq : Set.EqOn (deriv f) (fun t => deriv g (Real.log t) / t) - (Set.Icc (1:ℝ) X) := fun t ht => (hfderiv t (by linarith [ht.1])).deriv - have hlogcont : ContinuousOn Real.log (Set.Icc (1:ℝ) X) := by - apply Real.continuousOn_log.mono + have hρ : Continuous (fun y : ℝ => lT * D (y / lT)) := + continuous_const.mul (hD.comp (continuous_id.div_const lT)) + have hS' : ∀ t ∈ Set.Ioc (1 : ℝ) (Real.exp L), + |(∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k) - ∫ y in (0 : ℝ)..Real.log t, lT * D (y / lT)| ≤ η := by intro t ht - simp only [Set.mem_compl_iff, Set.mem_singleton_iff] - intro h0 - rw [h0] at ht - linarith [ht.1] - have hinvcont : ContinuousOn (fun t : ℝ => t⁻¹) (Set.Icc (1:ℝ) X) := - continuousOn_inv₀.mono fun t ht => by - have h1 : (1:ℝ) ≤ t := ht.1 - simp only [Set.mem_compl_iff, Set.mem_singleton_iff, Set.mem_setOf_eq, ne_eq] - intro h0; linarith - have hint : IntegrableOn (deriv f) (Set.Icc (1:ℝ) X) := by - apply IntegrableOn.congr_fun _ (fun t ht => (hderiv_eq ht).symm) measurableSet_Icc - apply ContinuousOn.integrableOn_compact isCompact_Icc - simp_rw [div_eq_mul_inv] - exact ((hg'c.comp_continuousOn hlogcont)).mul hinvcont - -- Abel's summation formula - have habel := sum_mul_eq_sub_integral_mul₀ c hc0 (f := f) X hdiff hint - have hfX : f X = 0 := by - show g (Real.log X) = 0 - rw [hlogX]; exact hgsupp L le_rfl - rw [hfX, zero_mul, zero_sub] at habel - have hsum_eq : (∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, c n * g (Real.log n)) - = ∑ k ∈ Finset.Icc 0 ⌊X⌋₊, f k * c k := by - rw [Finset.Icc_eq_cons_Ioc (Nat.zero_le _), Finset.sum_cons, hc0, mul_zero, zero_add] - exact Finset.sum_congr rfl fun n _ => by rw [hfdef, mul_comm] - have hSIoc : ∀ t : ℝ, (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) = ∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k := by - intro t - rw [Finset.Icc_eq_cons_Ioc (Nat.zero_le _), Finset.sum_cons, hc0, zero_add] - -- the main-term function M(t) = l²·∫_0^{log t/l} D and its continuity on [1, X] - set ID : ℝ → ℝ := fun u => ∫ s in (0:ℝ)..u, D s with hID - have hIDderiv : ∀ u, HasDerivAt ID (D u) u := fun u => - (hD.integral_hasStrictDerivAt 0 u).hasDerivAt - have hIDcont : Continuous ID := continuous_iff_continuousAt.2 fun u => (hIDderiv u).continuousAt - set M : ℝ → ℝ := fun t => lT ^ 2 * ID (Real.log t / lT) with hM - have hMcont : ContinuousOn M (Set.Icc (1:ℝ) X) := by - refine continuousOn_const.mul (hIDcont.comp_continuousOn ?_) - exact hlogcont.div_const _ - -- error piece: |∫ f'·(S − M)| ≤ 2ηL - have hi1 : IntegrableOn (fun t => deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) (Set.Ioc (1:ℝ) X) := - (integrableOn_mul_sum_Icc c (by norm_num : (0:ℝ) ≤ 1) hint).mono_set Set.Ioc_subset_Icc_self - have hi2 : IntegrableOn (fun t => deriv f t * M t) (Set.Ioc (1:ℝ) X) := by - refine IntegrableOn.mono_set ?_ Set.Ioc_subset_Icc_self - exact hint.mul_continuousOn hMcont isCompact_Icc - have herr : |(∫ t in Set.Ioc (1:ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - ∫ t in Set.Ioc (1:ℝ) X, deriv f t * M t| ≤ 2 * η * L := by - rw [← integral_sub hi1 hi2] - have hmajint : IntegrableOn (fun t : ℝ => 2 * η * t⁻¹) (Set.Ioc (1:ℝ) X) := by - refine IntegrableOn.mono_set ?_ Set.Ioc_subset_Icc_self - exact ContinuousOn.integrableOn_compact isCompact_Icc (continuousOn_const.mul hinvcont) - have hptw : ∀ t ∈ Set.Ioc (1:ℝ) X, - |deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * M t| ≤ 2 * η * t⁻¹ := by - intro t ht - have ht1 : 1 < t := ht.1 - have ht0 : 0 < t := by linarith - have hfd : deriv f t = deriv g (Real.log t) / t := hderiv_eq ⟨ht1.le, ht.2⟩ - have hfdabs : |deriv f t| ≤ 2 / t := by - rw [hfd, abs_div, abs_of_pos ht0] - exact div_le_div_of_nonneg_right (hg'le _) ht0.le - rw [← mul_sub, abs_mul, hSIoc t] - calc |deriv f t| * |(∑ k ∈ Finset.Ioc 0 ⌊t⌋₊, c k) - M t| ≤ (2 / t) * η := - mul_le_mul hfdabs (hS t ht1.le ht.2) (abs_nonneg _) (by positivity) - _ = 2 * η * t⁻¹ := by rw [div_eq_mul_inv]; ring - have hmono : |∫ t in Set.Ioc (1:ℝ) X, - (deriv f t * (∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - deriv f t * M t)| - ≤ ∫ t in Set.Ioc (1:ℝ) X, 2 * η * t⁻¹ := by - refine (abs_integral_le_integral_abs).trans ?_ - exact setIntegral_mono_on ((hi1.sub hi2).abs) hmajint measurableSet_Ioc hptw - have hmaj_eval : ∫ t in Set.Ioc (1:ℝ) X, 2 * η * t⁻¹ = 2 * η * L := by - rw [← intervalIntegral.integral_of_le hX1.le, intervalIntegral.integral_const_mul, - integral_inv_of_pos one_pos hX0, div_one, hlogX] - rw [hmaj_eval] at hmono - exact hmono - -- main piece: ∫_1^X f'(t) M(t) dt = −l·∫_0^L D(y/l) g(y) dy (substitution + IBP) - have hmain : ∫ t in Set.Ioc (1:ℝ) X, deriv f t * M t - = -(lT * ∫ y in (0:ℝ)..L, (D (y / lT) * g y)) := by - rw [← intervalIntegral.integral_of_le hX1.le] - rw [intervalIntegral.integral_congr (g := fun t => (deriv g (Real.log t) / t) * M t) (by - rw [Set.uIcc_of_le hX1.le] - intro t ht - beta_reduce - rw [hderiv_eq ht])] - -- substitution t = e^y - have hsub : ∫ t in (1:ℝ)..X, (deriv g (Real.log t) / t) * M t - = ∫ y in (0:ℝ)..L, deriv g y * (lT ^ 2 * ID (y / lT)) := by - have himg : Real.exp '' Set.uIcc (0:ℝ) L ⊆ {t : ℝ | 0 < t} := by - rintro t ⟨y, _, rfl⟩; exact Real.exp_pos y - have hlogc : ContinuousOn Real.log {t : ℝ | 0 < t} := - Real.continuousOn_log.mono fun t ht => by - simp only [Set.mem_compl_iff, Set.mem_singleton_iff, Set.mem_setOf_eq] at ht ⊢ - exact ht.ne' - have hgcont : ContinuousOn (fun t => (deriv g (Real.log t) / t) * M t) {t : ℝ | 0 < t} := by - apply ContinuousOn.mul - · apply ContinuousOn.div (hg'c.comp_continuousOn hlogc) continuousOn_id - intro t ht; exact ne_of_gt ht - · exact continuousOn_const.mul (hIDcont.comp_continuousOn (hlogc.div_const _)) - have := intervalIntegral.integral_comp_mul_deriv' (f := Real.exp) (f' := Real.exp) - (g := fun t => (deriv g (Real.log t) / t) * M t) (a := (0:ℝ)) (b := L) - (fun x _ => Real.hasDerivAt_exp x) Real.continuous_exp.continuousOn - (hgcont.mono himg) - rw [Real.exp_zero] at this - rw [show Real.exp L = X from rfl] at this - rw [← this] - apply intervalIntegral.integral_congr - intro y _ - simp only [Function.comp_apply, hM] - rw [Real.log_exp] - have he : Real.exp y ≠ 0 := (Real.exp_pos y).ne' - field_simp - rw [hsub] - -- integration by parts with u = g, v = l²·ID(·/l), v' = l·D(·/l) - have hv : ∀ y ∈ Set.uIcc (0:ℝ) L, - HasDerivAt (fun y : ℝ => lT ^ 2 * ID (y / lT)) (lT * D (y / lT)) y := by - intro y _ - have h1 : HasDerivAt (fun y : ℝ => y / lT) (lT⁻¹) y := by - simpa [div_eq_mul_inv] using (hasDerivAt_id y).mul_const lT⁻¹ - have h2 := (hIDderiv (y / lT)).comp y h1 - have h3 := h2.const_mul (lT ^ 2) - exact h3.congr_deriv (by field_simp) - have hparts := intervalIntegral.integral_mul_deriv_eq_deriv_mul - (u := g) (u' := deriv g) (v := fun y : ℝ => lT ^ 2 * ID (y / lT)) - (v' := fun y : ℝ => lT * D (y / lT)) - (fun y _ => (hgd y).hasDerivAt) hv (hg'c.intervalIntegrable 0 L) - ((continuous_const.mul (hD.comp (continuous_id.div_const _))).intervalIntegrable 0 L) - have hgL : g L = 0 := hgsupp L le_rfl - have hID0 : ID (0 / lT) = 0 := by simp [hID] - beta_reduce at hparts - rw [hgL, hID0] at hparts - -- hparts : ∫ g · (l D(y/l)) = 0·v(L) − g(0)·(l²·0) − ∫ g' · v - have e2 : ∫ y in (0:ℝ)..L, deriv g y * (lT ^ 2 * ID (y / lT)) - = -(∫ y in (0:ℝ)..L, g y * (lT * D (y / lT))) := by - have : (∫ y in (0:ℝ)..L, g y * (lT * D (y / lT))) - = 0 * (lT ^ 2 * ID (L / lT)) - g 0 * (lT ^ 2 * 0) - - ∫ y in (0:ℝ)..L, deriv g y * (lT ^ 2 * ID (y / lT)) := hparts - linarith - rw [e2, ← intervalIntegral.integral_const_mul] - congr 1 - refine intervalIntegral.integral_congr fun y _ => ?_ - beta_reduce - ring - -- assemble - rw [hsum_eq, habel] - have e : -(∫ t in Set.Ioc (1:ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - lT * ∫ y in (0:ℝ)..L, (D (y / lT) * g y) - = -((∫ t in Set.Ioc (1:ℝ) X, deriv f t * ∑ k ∈ Finset.Icc 0 ⌊t⌋₊, c k) - - ∫ t in Set.Ioc (1:ℝ) X, deriv f t * M t) := by - rw [hmain]; ring - rw [e, abs_neg] - exact herr + rw [intervalIntegral.integral_const_mul, intervalIntegral.integral_comp_div D hl.ne', + zero_div, smul_eq_mul, ← mul_assoc, ← sq] + exact hS t ht.1.le ht.2 + have hgen := PrimeSide.abel_sum_density_general hc0 hρ continuous_const hL hS' hgd hg'c hg'le hgsupp + have hmain : ∫ y in (0 : ℝ)..L, g y * (lT * D (y / lT)) = + lT * ∫ y in (0 : ℝ)..L, (D (y / lT) * g y) := by + rw [← intervalIntegral.integral_const_mul] + exact intervalIntegral.integral_congr fun y _ => by ring + rw [hmain, intervalIntegral.integral_const, sub_zero, smul_eq_mul] at hgen + linarith end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/Concrete.lean b/zeta23/Zeta23/XiPrime/PrimeSide/Concrete.lean index 164f6f3185..85b4dbd674 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/Concrete.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/Concrete.lean @@ -19,7 +19,6 @@ Output: FactsXi for the concrete data, hence (Traces.lean) TracesBoundsXi and th -/ import Zeta23.XiPrime.Statement import Zeta23.XiPrime.PrimeSide.Traces -import Zeta23.XiPrime.PrimeSide.Density import Zeta23.XiPrime.PrimeSide.Cross import Zeta23.XiPrime.PrimeSide.Trace import Zeta23.XiPrime.PrimeSide.Abel @@ -94,7 +93,7 @@ def concreteData : DataXi P where MPPi := fun T => cPi * Mform (Fw P win T).Phi T (Pc (P.X T) (Fam.c T)) (Zeta23.PiX (P.X T)) MPiPi := fun T => cPi ^ 2 * Mform (Fw P win T).Phi T (Zeta23.PiX (P.X T)) (Zeta23.PiX (P.X T)) intMu2 := fun T => ∫ τ in T..(2 * T), Zeta23.mu τ ^ 2 - sumB2g := fun T => sumW2g (Fam.c T) (P.X T) (AdmWindow.gv (win T)) + sumL2g := fun T => sumW2g (Fam.c T) (P.X T) (AdmWindow.gv (win T)) end Data @@ -184,7 +183,7 @@ lemma sumSqDiv_eventually (hP : P.Valid) (hF : Fam.Hyps) : ∃ C₃ : ℝ, 0 ≤ lemma gv_deriv_facts {v : ℝ → ℝ} {L w c : ℝ} (hW : AdmWindow v L w c) : Differentiable ℝ (AdmWindow.gv v) ∧ Continuous (deriv (AdmWindow.gv v)) ∧ ∀ y : ℝ, |deriv (AdmWindow.gv v) y| ≤ 2 := by - apply ThmD.autocorr_deriv_facts + apply autocorr_deriv_facts · exact (hW.contDiff.pow 2).of_le (by norm_num) · exact hW.sq_hasCompactSupport · intro x; exact hW.sq_even x @@ -228,8 +227,10 @@ theorem concreteFacts (hP : P.Valid) (hlam1 : P.lam < 1) (hwin : AdmFamily P win have hS1nn : ∀ T, 0 ≤ S1 (Fam.c T) (P.X T) := fun T => S1_nonneg _ _ refine { lam_pos := hP.lam_pos + lam_le_one := hlam1.le lam_lt_one := hlam1 one_le_w := hP.one_le_w + ell1_ge := Eventually.of_forall fun _ => l_le_ell1 _ ab_range := ?ab rvm := hN muints2 := ?mu2 diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/Cross.lean b/zeta23/Zeta23/XiPrime/PrimeSide/Cross.lean index dbd51e50e7..fc84f4df0c 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/Cross.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/Cross.lean @@ -4,21 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Part of the Zeta23 formalization. - Zeta23/XiPrime/PrimeSide/Cross.lean — generalised-coefficient prime side: -[prop:cross](i) for the density P_c with ARBITRARY complex coefficients: - |𝓜[μ, P_c]| ≤ C · l · L · S₁(c), S₁(c) = Σ_{N≤X} ‖c_N‖/√N, -for T ≥ T₀ (C, T₀ depend on H-Γ only), provided c 1 = 0. - -Route = Zeta23/ThmE/CrossMuPChi.lean (double IBP, oscillatory bounds abs_Mform_cos_le / -abs_Mform_cos_phase_le of CrossMuPCore) with Λ(n)·χ(n) ↦ c_N/√N and the per-N saving 1/log N -replaced by 1/log 2 (N ≥ 2; the N = 1 term is killed by c 1 = 0). The ζ/χ proofs use the finer -Σ Λ(n)/(√n log n) ≪ √X/log X to get l√X; here the coefficient side only has the crude -S₁ ≪ √X·l, and l·L·S₁ ≪ L·l²·√X is still o(T·L·l²) — [XF′] Remark 7.2. +[prop:cross](i) for the density P_c with arbitrary complex coefficients (`c 1 = 0`), +instantiated from `PrimeSide.abs_Mform_u_PcDir_of_localHyps`. -/ import Zeta23.XiPrime.PrimeSide.Density -import Zeta23.PrimeSideA.CrossMuPCore noncomputable section @@ -30,145 +20,37 @@ namespace XiPrime open PrimeSide -/-- `𝓜[u, P_c]` as the finite cos/sin-split sum (mirror of ThmE.Mform_mu_PXc_eq). -/ -lemma Mform_u_Pc_eq {Φ : ℝ → ℝ} (hΦ : Continuous Φ) {u : ℝ → ℝ} (hu : Continuous u) - (c : ℕ → ℂ) (X T : ℝ) : - Mform Φ T u (Pc X c) - = ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, ((1 / Real.pi) * (Real.sqrt n)⁻¹) - * ((c n).re * Mform Φ T u (fun t => Real.cos (t * Real.log n)) - + (c n).im * Mform Φ T u (fun t => Real.sin (t * Real.log n))) := by - unfold Mform - have h1 : (fun q : ℝ × ℝ => Φ (q.1 - q.2) ^ 2 * u q.1 * Pc X c q.2) - = fun q => ∑ n ∈ Finset.Ioc 0 ⌊X⌋₊, ((1 / Real.pi) * (Real.sqrt n)⁻¹) - * ((c n).re * (Φ (q.1 - q.2) ^ 2 * u q.1 * Real.cos (q.2 * Real.log n)) - + (c n).im * (Φ (q.1 - q.2) ^ 2 * u q.1 * Real.sin (q.2 * Real.log n))) := by - funext q - unfold Pc - rw [Finset.mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [div_eq_mul_inv] - ring - rw [h1, integral_finset_sum] - · refine Finset.sum_congr rfl fun n _ => ?_ - rw [integral_const_mul] - congr 1 - have i1 := (Mform_integrableOn' (T := T) hΦ hu - (show Continuous fun t : ℝ => Real.cos (t * Real.log n) by fun_prop)).const_mul ((c n).re) - have i2 := (Mform_integrableOn' (T := T) hΦ hu - (show Continuous fun t : ℝ => Real.sin (t * Real.log n) by fun_prop)).const_mul ((c n).im) - beta_reduce at i1 i2 - rw [integral_add i1 i2, integral_const_mul, integral_const_mul] - · intro n _ - have i1 := (Mform_integrableOn' (T := T) hΦ hu - (show Continuous fun t : ℝ => Real.cos (t * Real.log n) by fun_prop)).const_mul ((c n).re) - have i2 := (Mform_integrableOn' (T := T) hΦ hu - (show Continuous fun t : ℝ => Real.sin (t * Real.log n) by fun_prop)).const_mul ((c n).im) - beta_reduce at i1 i2 - exact (i1.add i2).const_mul _ - /-- **[prop:cross](i) for P_c** with arbitrary complex coefficients (`c 1 = 0`): `|𝓜[μ, P_c]| ≤ C · l · L · S₁(c; X)` for `T ≥ T₀`, constants depending on H-Γ only. -/ -theorem cross_muPc {cϱ lam : ℝ} (hΓ : Zeta23.GammaFacts) (hlam : 0 < lam ∧ lam ≤ 1) : +theorem cross_muPc {cϱ lam : ℝ} (hΓ : Zeta23.GammaFacts) (_hlam : 0 < lam ∧ lam ≤ 1) : ∃ C T₀ : ℝ, ∀ (p : Setting) (F : LocalFun) (c : ℕ → ℂ), p.lam = lam → T₀ ≤ p.T → LocalHypsCore cϱ p F → c 1 = 0 → |Mform F.Phi p.T Zeta23.mu (Pc p.X c)| ≤ C * (p.l * p.L * S1 c p.X) := by obtain ⟨T₁, hT₁⟩ := mu_abs_le_l hΓ obtain ⟨Cd, hCd⟩ := hΓ.deriv_bound have hμ : ContDiff ℝ 1 Zeta23.mu := hΓ.smooth.of_le (by exact_mod_cast le_top) - refine ⟨8 * (4 + |Cd|) / Real.log 2, max T₁ 1, fun p F c hplam hT hF hc1 => ?_⟩ - have hT₁' : T₁ ≤ p.T := (le_max_left _ _).trans hT - have hT1 : 1 ≤ p.T := (le_max_right _ _).trans hT - have hT0 : 0 ≤ p.T := by linarith - have hl1 : 1 ≤ p.l := hF.one_le_l - have hL := hF.L_pos + refine ⟨4 * (4 + |Cd|) / Real.log 2, max T₁ 1, fun p F c _hplam hT hF hc1 => ?_⟩ have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - -- sup bounds for μ, μ' on I - have hB : ∀ τ ∈ Set.Icc p.T (2 * p.T), |Zeta23.mu τ| ≤ p.l := hT₁ p hT₁' - have hD : ∀ τ ∈ Set.Icc p.T (2 * p.T), |deriv Zeta23.mu τ| ≤ |Cd| / p.T := by - intro τ hτ - have hτ1 : 1 ≤ |τ| := by rw [abs_of_nonneg (by linarith [hτ.1])]; linarith [hτ.1] - refine (hCd τ hτ1).trans ?_ - rw [abs_of_nonneg (by linarith [hτ.1])] - calc Cd / τ ≤ |Cd| / τ := div_le_div_of_nonneg_right (le_abs_self _) (by linarith [hτ.1]) - _ ≤ |Cd| / p.T := div_le_div_of_nonneg_left (abs_nonneg _) (by linarith) hτ.1 - set S : ℝ := ∫ x, F.Phi x ^ 2 with hSdef - have hS : S ≤ 2 * π * p.L := hF.integral_Phi_sq_le - have hS0 : 0 ≤ S := integral_nonneg fun x => sq_nonneg _ - set K : ℝ := (4 * p.l + |Cd| / p.T * p.T) * S with hKdef - have hKeq : K = (4 * p.l + |Cd|) * S := by - have hTne : p.T ≠ 0 := by linarith - rw [hKdef, div_mul_cancel₀ _ hTne] - have hK0 : 0 ≤ K := by rw [hKeq]; positivity - -- per-n bound - have hosc : ∀ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - |((1 / Real.pi) * (Real.sqrt n)⁻¹) - * ((c n).re * Mform F.Phi p.T Zeta23.mu (fun t => Real.cos (t * Real.log n)) - + (c n).im * Mform F.Phi p.T Zeta23.mu (fun t => Real.sin (t * Real.log n)))| - ≤ (2 * K / (Real.pi * Real.log 2)) * (‖c n‖ / Real.sqrt n) := by - intro n hn + have hsum : ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / (Real.sqrt n * Real.log n) + ≤ S1 c p.X / Real.log 2 := by + unfold S1; rw [Finset.sum_div] + refine Finset.sum_le_sum fun n hn => ?_ rcases Nat.lt_or_ge n 2 with h2 | h2 - · have hn1 : n = 1 := by - have : 0 < n := (Finset.mem_Ioc.mp hn).1 - omega - subst hn1 - simp [hc1] - · have hy : 0 < Real.log n := Real.log_pos (by exact_mod_cast h2) - have hylog2 : Real.log 2 ≤ Real.log n := - Real.log_le_log (by norm_num) (by exact_mod_cast h2) - have hMc := abs_Mform_cos_le hT0 hF.Phi_contDiff hF.Phi_sq_integrable hμ hB hD hy.ne' - rw [abs_of_pos hy] at hMc - have hsin_eq : Mform F.Phi p.T Zeta23.mu (fun t => Real.sin (t * Real.log n)) - = Mform F.Phi p.T Zeta23.mu (fun t => Real.cos (t * Real.log n + -(π / 2))) := by - unfold Mform - refine integral_congr_ae (Filter.Eventually.of_forall fun z => ?_) - simp only [] - rw [show z.2 * Real.log n + -(π / 2) = z.2 * Real.log n - π / 2 by ring, - Real.cos_sub_pi_div_two] - have hMs := abs_Mform_cos_phase_le hT0 hF.Phi_contDiff hF.Phi_sq_integrable hμ hB hD - hy.ne' (-(π / 2)) - rw [abs_of_pos hy, ← hsin_eq] at hMs - have hre : |(c n).re| ≤ ‖c n‖ := Complex.abs_re_le_norm _ - have him : |(c n).im| ≤ ‖c n‖ := Complex.abs_im_le_norm _ - have hKn : (4 * p.l + |Cd| / p.T * p.T) * S / Real.log n ≤ K / Real.log 2 := by - rw [← hKdef] - exact div_le_div_of_nonneg_left hK0 hlog2 hylog2 - have h1 : |(c n).re * Mform F.Phi p.T Zeta23.mu (fun t => Real.cos (t * Real.log n)) - + (c n).im * Mform F.Phi p.T Zeta23.mu (fun t => Real.sin (t * Real.log n))| - ≤ 2 * ‖c n‖ * (K / Real.log 2) := by - calc |(c n).re * Mform F.Phi p.T Zeta23.mu (fun t => Real.cos (t * Real.log n)) - + (c n).im * Mform F.Phi p.T Zeta23.mu (fun t => Real.sin (t * Real.log n))| - ≤ |(c n).re| * |Mform F.Phi p.T Zeta23.mu (fun t => Real.cos (t * Real.log n))| - + |(c n).im| * |Mform F.Phi p.T Zeta23.mu (fun t => Real.sin (t * Real.log n))| := by - refine (abs_add_le _ _).trans ?_ - rw [abs_mul, abs_mul] - _ ≤ ‖c n‖ * (K / Real.log 2) + ‖c n‖ * (K / Real.log 2) := - add_le_add (mul_le_mul hre (hMc.trans hKn) (abs_nonneg _) (norm_nonneg _)) - (mul_le_mul him (hMs.trans hKn) (abs_nonneg _) (norm_nonneg _)) - _ = 2 * ‖c n‖ * (K / Real.log 2) := by ring - have hsq0 : 0 ≤ (Real.sqrt (n:ℝ))⁻¹ := inv_nonneg.2 (Real.sqrt_nonneg _) - rw [abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ (1 / Real.pi) * (Real.sqrt n)⁻¹)] - calc (1 / Real.pi) * (Real.sqrt n)⁻¹ * |_| ≤ (1 / Real.pi) * (Real.sqrt n)⁻¹ - * (2 * ‖c n‖ * (K / Real.log 2)) := mul_le_mul_of_nonneg_left h1 (by positivity) - _ = (2 * K / (Real.pi * Real.log 2)) * (‖c n‖ / Real.sqrt n) := by - field_simp - -- sum over n - rw [Mform_u_Pc_eq hF.Phi_contDiff.continuous hμ.continuous] - refine (Finset.abs_sum_le_sum_abs _ _).trans ((Finset.sum_le_sum hosc).trans ?_) - rw [← Finset.mul_sum] - change 2 * K / (π * Real.log 2) * S1 c p.X ≤ _ - have hS1 := S1_nonneg c p.X - have hπ3 := Real.pi_gt_three - calc 2 * K / (π * Real.log 2) * S1 c p.X - ≤ 2 * ((4 * p.l + |Cd|) * (2 * π * p.L)) / (π * Real.log 2) * S1 c p.X := by - rw [hKeq]; gcongr - _ = 4 * (4 * p.l + |Cd|) / Real.log 2 * (p.L * S1 c p.X) := by - field_simp <;> ring - _ ≤ 4 * ((4 + |Cd|) * (2 * p.l)) / Real.log 2 * (p.L * S1 c p.X) := by - gcongr - nlinarith [abs_nonneg Cd] - _ = 8 * (4 + |Cd|) / Real.log 2 * (p.l * p.L * S1 c p.X) := by - field_simp - ring + · have hn1 : n = 1 := by have := (Finset.mem_Ioc.mp hn).1; omega + subst hn1; simp [hc1] + · rw [div_div] + exact div_le_div_of_nonneg_left (norm_nonneg _) + (mul_pos (Real.sqrt_pos.2 (by exact_mod_cast (by omega : 0 < n))) hlog2) + (mul_le_mul_of_nonneg_left (Real.log_le_log (by norm_num) (by exact_mod_cast h2)) + (Real.sqrt_nonneg _)) + change |Mform F.Phi p.T Zeta23.mu (PcDir p.X c)| ≤ _ + refine (abs_Mform_u_PcDir_of_localHyps hF ((le_max_right _ _).trans hT) hμ zero_le_one + (fun τ hτ => by simpa using hT₁ p ((le_max_left _ _).trans hT) τ hτ) hCd hc1).trans ?_ + have hl0 : 0 ≤ p.l := by linarith [hF.one_le_l] + have hL0 : 0 ≤ p.L := hF.L_pos.le + calc 4 * (4 * 1 + |Cd|) * p.l * p.L * _ + ≤ 4 * (4 * 1 + |Cd|) * p.l * p.L * (S1 c p.X / Real.log 2) := by gcongr + _ = 4 * (4 + |Cd|) / Real.log 2 * (p.l * p.L * S1 c p.X) := by ring end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/Density.lean b/zeta23/Zeta23/XiPrime/PrimeSide/Density.lean index e74f9fd902..ee8c9f8a16 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/Density.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/Density.lean @@ -64,18 +64,12 @@ lemma abs_re_cos_add_im_sin_le (z : ℂ) (θ : ℝ) : nlinarith [sq_nonneg (z.re * Real.sin θ - z.im * Real.cos θ)] exact abs_le_of_sq_le_sq' h1 (norm_nonneg _) |>.elim (fun h2 h3 => abs_le.2 ⟨h2, h3⟩) -/-- `|P_c(X; τ)| ≤ (1/π) S₁(c; X)` for every τ. -/ -theorem Pc_abs_le (X : ℝ) (c : ℕ → ℂ) (τ : ℝ) : |Pc X c τ| ≤ (1 / π) * S1 c X := by - unfold Pc S1 - rw [abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ 1 / π)] - refine mul_le_mul_of_nonneg_left ?_ (by positivity) - refine (Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum fun N _ => ?_) - rw [abs_div, abs_of_nonneg (Real.sqrt_nonneg _)] - exact div_le_div_of_nonneg_right (abs_re_cos_add_im_sin_le _ _) (Real.sqrt_nonneg _) - -lemma Pc_continuous (X : ℝ) (c : ℕ → ℂ) : Continuous (Pc X c) := by - unfold Pc - fun_prop +/-- `|P_c(X; τ)| ≤ (1/π) S₁(c; X)` for every τ (`Pc = PcDir`). -/ +theorem Pc_abs_le (X : ℝ) (c : ℕ → ℂ) (τ : ℝ) : |Pc X c τ| ≤ (1 / π) * S1 c X := + PcDir_abs_le X c τ + +lemma Pc_continuous (X : ℝ) (c : ℕ → ℂ) : Continuous (Pc X c) := + PcDir_continuous X c lemma nucW_continuous (hΓ : Zeta23.GammaFacts) {X : ℝ} (hX : 0 < X) (cPi : ℝ) (c : ℕ → ℂ) : Continuous (nucW cPi X c) := by @@ -245,7 +239,7 @@ theorem cross_PcPi_le {cϱ : ℝ} {p : Setting} {F : LocalFun} (hF : LocalHypsCo calc |Mform F.Phi p.T (Pc p.X c) (Zeta23.PiX p.X)| ≤ (1 / π) * S1 c p.X * (3 * Real.sqrt p.X / p.T) * (p.T * ∫ x, F.Phi x ^ 2) := h _ ≤ (1 / π) * S1 c p.X * (3 * Real.sqrt p.X / p.T) * (p.T * (2 * π * p.L)) := by gcongr - _ = 6 * S1 c p.X * (p.L * Real.sqrt p.X) := by field_simp <;> ring + _ = 6 * S1 c p.X * (p.L * Real.sqrt p.X) := by field_simp; ring end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/Final.lean b/zeta23/Zeta23/XiPrime/PrimeSide/Final.lean index 29e0adc8f7..38bba4e8f7 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/Final.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/Final.lean @@ -12,7 +12,6 @@ forms of the producer theorems; also the flat-window wiring to XiPrime/Window. -/ import Zeta23.XiPrime.PrimeSide.PP import Zeta23.XiPrime.PrimeSide.Moments -import Zeta23.XiPrime.Window import Zeta23.XiPrime.Window.FlatAdm import Zeta23.XiPrime.PrimeSide.PPUpper import Zeta23.XiPrime.Window.Quartic @@ -27,91 +26,11 @@ namespace XiPrime open PrimeSide -/-- **CoeffMoments for the flat window, instantiated**: for every coefficient family with -(H1)–(H3), `CoeffMoments Z (fun _ => P) Fam (cWin Fam.D P.lam vFlat)⁻¹`. -/ -theorem coeffMoments_flat_cWin {P : Params} {Fam : CoeffFamily} {Z : ZeroConfig} - (hP : P.Valid) (hlam1 : P.lam < 1) (hF : Fam.Hyps) (hΓ : Zeta23.GammaFacts) - (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hPP : PPInput) (hRvM : RiemannVonMangoldt Z) : - CoeffMoments Z (fun _ => P) Fam (cWin Fam.D P.lam vFlat)⁻¹ := by - obtain ⟨T₀, hT₀⟩ := admFamily_taper hP - have hwin : AdmFamily P (fun T => P.phi T) P.crho := ⟨T₀, fun T hT => hT₀ T hT⟩ - have hD0 : ∀ x ∈ Icc (0:ℝ) 1, 0 ≤ Fam.D x := hF.D_nonneg - exact coeffMoments_flat hP hlam1 hwin hF hΓ hMV hPP hRvM - (cWin_vFlat_pos hD0 hP.lam_pos hP.lam_le_one) - (tendsto_cRatio_flat hP hF.D_cont.continuousOn hD0) - -/-- the same with the `1 / cWin` spelling (`kappaXi`-shape). -/ -theorem coeffMoments_flat_one_div {P : Params} {Fam : CoeffFamily} {Z : ZeroConfig} - (hP : P.Valid) (hlam1 : P.lam < 1) (hF : Fam.Hyps) (hΓ : Zeta23.GammaFacts) - (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hPP : PPInput) (hRvM : RiemannVonMangoldt Z) : - CoeffMoments Z (fun _ => P) Fam (1 / cWin Fam.D P.lam vFlat) := by - rw [one_div]; exact coeffMoments_flat_cWin hP hlam1 hF hΓ hMV hPP hRvM - /-- **[prop:PP] for P_c holds** (Zeta23/XiPrime/PrimeSide/PP.lean). -/ theorem ppInput_of_PP : PPInput := fun C cϱ hMV hC => ⟨KPP C cϱ, fun p F c hF hT hc1 => by unfold sumW2g sumSqDivW sumSqW S1 exact prop_PP_c' hMV hC.le hF hT c hc1⟩ -/-- **CoeffMoments, flat window — no prime-side input left.** Visible hypotheses: P.Valid, λ < 1, -the coefficient family's (H1)–(H3), H-Γ, H-MV, H-RvM for Z. -/ -theorem coeffMoments_flat_final {P : Params} {Fam : CoeffFamily} {Z : ZeroConfig} - (hP : P.Valid) (hlam1 : P.lam < 1) (hF : Fam.Hyps) (hΓ : Zeta23.GammaFacts) - (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hRvM : RiemannVonMangoldt Z) : - CoeffMoments Z (fun _ => P) Fam (cWin Fam.D P.lam vFlat)⁻¹ := - coeffMoments_flat_cWin hP hlam1 hF hΓ hMV ppInput_of_PP hRvM - -/-- the same with the `1 / cWin` spelling. -/ -theorem coeffMoments_flat_final' {P : Params} {Fam : CoeffFamily} {Z : ZeroConfig} - (hP : P.Valid) (hlam1 : P.lam < 1) (hF : Fam.Hyps) (hΓ : Zeta23.GammaFacts) - (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hRvM : RiemannVonMangoldt Z) : - CoeffMoments Z (fun _ => P) Fam (1 / cWin Fam.D P.lam vFlat) := by - rw [one_div]; exact coeffMoments_flat_final hP hlam1 hF hΓ hMV hRvM - -/-- **MomentsW for any admissible family, input-free in PP** (general pole weight; for Assembly's -profile and Z′ instances). -/ -theorem momentsW_of_family_final {P : Params} {Pf : ℝ → Params} {Fam : CoeffFamily} {cW : ℝ} - {Z : ZeroConfig} (cPi : ℝ) (hP : P.Valid) (hlam1 : P.lam < 1) - (hset : ∀ T, (Pf T).toSetting T = P.toSetting T) - (hloc : ∀ T, (Pf T).localFun T = AdmWindow.localFun ((Pf T).phi T) (P.L T)) - (haL : ∀ T, (Pf T).a T * (Pf T).L T = AdmWindow.av ((Pf T).phi T) (P.L T) * P.L T) - (hwin : AdmFamily P (fun T => (Pf T).phi T) cW) - (hF : Fam.Hyps) (hΓ : Zeta23.GammaFacts) (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) - (hRvM : RiemannVonMangoldt Z) {cinf : ℝ} (hc0 : 0 < cinf) - (hc : Tendsto (fun T => ThmD.cRatio (P.lam1 T) (AdmWindow.av ((Pf T).phi T) (P.L T)) - (AdmWindow.bv ((Pf T).phi T) (P.L T)) - (JD Fam.D (AdmWindow.gv ((Pf T).phi T)) (P.L T) (l T))) atTop (𝓝 cinf)) : - MomentsW Z Pf Fam cPi cinf⁻¹ := - momentsW_of_family cPi hP hlam1 hset hloc haL hwin hF hΓ hMV ppInput_of_PP hRvM hc0 hc - -/-- **CoeffMoments, QUARTIC window v(s) = 1 − (7/100)(2s)² − (51/200)(2s)⁴ — no prime-side input left.** -Window admissibility: admFamily_atV_quartic (Zeta23.XiPrime.QuarticWindow.Family); window -limit: tendsto_cRatio_quartic + cWin_vQuartic_pos (Zeta23.XiPrime.Window.Quartic). -/ -theorem coeffMoments_quartic_final {P : Params} {Fam : CoeffFamily} {Z : ZeroConfig} - (hP : P.Valid) (hlam1 : P.lam < 1) (hF : Fam.Hyps) (hΓ : Zeta23.GammaFacts) - (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hRvM : RiemannVonMangoldt Z) : - CoeffMoments Z (P.atV vQuartic) Fam (cWin Fam.D P.lam vQuartic)⁻¹ := by - have hD0 : ∀ x ∈ Icc (0:ℝ) 1, 0 ≤ Fam.D x := hF.D_nonneg - exact coeffMoments_atV hP hlam1 (admFamily_atV_quartic hP) hF hΓ hMV ppInput_of_PP hRvM - (cWin_vQuartic_pos hD0 hP.lam_pos hP.lam_le_one) - (tendsto_cRatio_quartic hP hF.D_cont.continuousOn hD0) - -/-- the same with the `1 / cWin` spelling. -/ -theorem coeffMoments_quartic_final' {P : Params} {Fam : CoeffFamily} {Z : ZeroConfig} - (hP : P.Valid) (hlam1 : P.lam < 1) (hF : Fam.Hyps) (hΓ : Zeta23.GammaFacts) - (hMV : ∃ C : ℝ, 0 < C ∧ Zeta23.MVHilbert C) (hRvM : RiemannVonMangoldt Z) : - CoeffMoments Z (P.atV vQuartic) Fam (1 / cWin Fam.D P.lam vQuartic) := by - rw [one_div]; exact coeffMoments_quartic_final hP hlam1 hF hΓ hMV hRvM - -/-- **PPUpper engine, input-free.** -/ -theorem frobSq_Ppart_le_final {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC : 0 < C) - (cϱ lam : ℝ) (hlam : 0 < lam ∧ lam ≤ 1) : - ∃ K T₀ : ℝ, ∀ (p : Setting) (F : LocalFun) (e : ℕ → ℂ), p.lam = lam → T₀ ≤ p.T → - LocalHypsCore cϱ p F → e 1 = 0 → - ∑ k : Fin p.d, ∑ l : Fin p.d, GentryNu (Pc p.X e) p F k l ^ 2 - ≤ K * p.L ^ 2 * (p.T * p.L * sumSqDivW e p.X + p.L * sumSqW e p.X - + p.L * S1 e p.X ^ 2 + p.L * p.l * Real.log p.l * (p.l + S1 e p.X) ^ 2) := - frobSq_Ppart_le ppInput_of_PP hMV hC cϱ lam hlam - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/Moments.lean b/zeta23/Zeta23/XiPrime/PrimeSide/Moments.lean index 2b5ce24d2b..e0df600f95 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/Moments.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/Moments.lean @@ -21,7 +21,6 @@ satisfy the three bookkeeping identities by rfl. -/ import Zeta23.XiPrime.PrimeSide.Concrete import Zeta23.PrimeSideB.Traces -import Zeta23.Assembly noncomputable section @@ -43,8 +42,6 @@ the Z′ layer uses `cΠ = 2`). -/ def _root_.Zeta23.Params.GpCW (cPi : ℝ) (c : ℕ → ℂ) : Matrix (Fin (Q.d T)) (Fin (Q.d T)) ℂ := fun k l => (Q.GentryCW T cPi c (k : ℤ) (l : ℤ) : ℂ) -lemma GpC_eq_GpCW (c : ℕ → ℂ) : Q.GpC T c = Q.GpCW T 1 c := rfl - lemma GentryCW_eq (cPi : ℝ) (c : ℕ → ℂ) (k l : ℤ) : Q.GentryCW T cPi c k l = GentryW cPi c (Q.toSetting T) (Q.localFun T) k l := rfl diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/PP.lean b/zeta23/Zeta23/XiPrime/PrimeSide/PP.lean index 53f44380c7..2c2199772a 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/PP.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/PP.lean @@ -7,37 +7,13 @@ SPDX-License-Identifier: Apache-2.0 Part of the Zeta23 formalization; bracketed labels such as [prop:PP] refer to the paper. -/ import Zeta23.XiPrime.Defs -import Zeta23.ThmE.PPChi +import Zeta23.PrimeSideB.PPKernel /-! -# [prop:PP] for a general-coefficient Dirichlet polynomial (ξ′ prime side) +# [prop:PP] for a general-coefficient Dirichlet polynomial (ξ′ prime side) -The ξ′ theorem's prime side ([XF′] Thm 8.1) is the paper's -§5 computation with the prime density P_X replaced by the Dirichlet polynomial with ARBITRARY complex -coefficients - P_c(X; τ) = (1/π) Σ_{N ≤ X} (Re c_N cos(τ log N) + Im c_N sin(τ log N))/√N = Zeta23.XiPrime.Pc X c τ -(Zeta23/XiPrime/Defs.lean). This file evaluates the bilinear form 𝓜[P_c, P_c] = PrimeSide.Mform Φ T P_c P_c -(paper §5 "Evaluation of 𝓜": the 𝒟/𝒪₁/𝒪₂ split + Montgomery–Vaughan) ONCE for -general weights: writing c_N = ‖c_N‖ e^{i arg c_N}, - P_c(τ) = (1/π) Σ_N w_N cos(τ log N − arg c_N), w_N := ‖c_N‖/√N, -a single family of phase-shifted cosines, so the phased kernels AminusPh/AplusPh of Zeta23/ThmE/PPChi.lean -(and everything kernel-side in Zeta23/PrimeSideB/PPKernel.lean, which is generic in the frequencies and -phases) apply verbatim. The three estimates are proved for an ARBITRARY real weight w ≥ 0 with w 1 = 0 -and arbitrary phases (section GeneralWeights), then specialised to w = ‖c‖/√· (section Results). - -Main result (NON-asymptotic: one (p, F), no T₀, no coefficient hypothesis beyond c 1 = 0): - -* prop_PP_c — the three-term form - |𝓜[P_c,P_c] − (T/π) Σ_N ‖c_N‖²/N g(log N)| - ≤ K₁(cϱ)·L·Σ‖c_N‖²/N + K₂·C·L·Σ‖c_N‖² + K₃·L·(Σ‖c_N‖/√N)² - with K₁ = (8+8cϱ)/(2π²) (𝒟: ∫Φ²|x| ≤ (8+8cϱ)L), K₂ = 32π/(2π²) (𝒪₁: H-MV with Σ w_N²·2N = 2Σ‖c_N‖², - ∫Φ² ≤ 2πL), K₃ = (2π/log 2)/(2π²) (𝒪₂: |A⁺(y,y′)| ≤ 2∫Φ²/(y+y′), y, y′ ≥ log 2 — this is where - c 1 = 0 is used: the frequency log 1 = 0 must carry zero weight); -* prop_PP_c' — the same with one constant KPP C cϱ, shaped exactly as the named input - Zeta23.XiPrime.PPInput of Zeta23/XiPrime/PrimeSide/Concrete.lean, whose four sums - Σ‖c‖²/N·g, Σ‖c‖²/N, Σ‖c‖², Σ‖c‖/√N are written here LITERALLY over Finset.Ioc 0 ⌊X⌋₊ (the bodies of - sumW2g / sumSqDivW / sumSqW / S1), so that PPInput closes by defeq without this file importing the - assembly. +Thin re-export of `Zeta23.PrimeSide.prop_PP_c` / `prop_PP_c'` (`PPKernel.lean`), since +`Zeta23.XiPrime.Pc = Zeta23.PrimeSide.PcDir` definitionally. -/ noncomputable section @@ -48,597 +24,14 @@ open scoped BigOperators namespace Zeta23 namespace XiPrime -open Zeta23.PrimeSide Zeta23.ThmE - -/-! ## The magnitude/phase form of P_c -/ - -section PcForm - -/-- Re c · cos θ + Im c · sin θ = ‖c‖ · cos(θ − arg c). -/ -lemma re_mul_cos_add_im_mul_sin (z : ℂ) (θ : ℝ) : - z.re * Real.cos θ + z.im * Real.sin θ = ‖z‖ * Real.cos (θ - z.arg) := by - have h1 : ‖z‖ * Real.cos z.arg = z.re := by - have := Complex.norm_mul_exp_arg_mul_I z - have h := congrArg Complex.re this - rw [Complex.re_ofReal_mul, Complex.exp_ofReal_mul_I_re] at h - exact h - have h2 : ‖z‖ * Real.sin z.arg = z.im := by - have := Complex.norm_mul_exp_arg_mul_I z - have h := congrArg Complex.im this - rw [Complex.im_ofReal_mul, Complex.exp_ofReal_mul_I_im] at h - exact h - rw [Real.cos_sub, ← h1, ← h2] - ring - -/-- the general weight w_N := ‖c_N‖/√N. -/ -def wcoef (c : ℕ → ℂ) (n : ℕ) : ℝ := ‖c n‖ / Real.sqrt n - -lemma wcoef_nonneg (c : ℕ → ℂ) (n : ℕ) : 0 ≤ wcoef c n := - div_nonneg (norm_nonneg _) (Real.sqrt_nonneg _) - -lemma wcoef_sq (c : ℕ → ℂ) (n : ℕ) : wcoef c n ^ 2 = ‖c n‖ ^ 2 / n := by - unfold wcoef - rw [div_pow, Real.sq_sqrt (Nat.cast_nonneg n)] - -lemma wcoef_sq_mul {c : ℕ → ℂ} {n : ℕ} (hn : 1 ≤ n) : wcoef c n ^ 2 * n = ‖c n‖ ^ 2 := by - rw [wcoef_sq] - have : (0:ℝ) < n := by exact_mod_cast hn - field_simp - -lemma wcoef_one {c : ℕ → ℂ} (hc1 : c 1 = 0) : wcoef c 1 = 0 := by - simp [wcoef, hc1] - -/-- The magnitude/phase form: P_c(X; τ) = (1/π) Σ_N w_N · cos(τ·log N − arg c_N) -(mirror of ThmE.PXc_eq_sum; sign +1/π here). -/ -lemma Pc_eq_sum (c : ℕ → ℂ) (X τ : ℝ) : - Pc X c τ = (1 / π) * ∑ n ∈ primeRange X, wcoef c n * Real.cos (τ * Real.log n - (c n).arg) := by - unfold Pc primeRange wcoef - congr 1 - refine Finset.sum_congr rfl fun n _ => ?_ - rw [re_mul_cos_add_im_mul_sin] - ring - -end PcForm - -/-! ## [prop:PP] for a general real weight w and phases φ - -Everything in this section is about the phased cosine polynomial Q(τ) := Σ_{N≤X} w_N cos(τ log N − φ_N) -with ARBITRARY w, φ : ℕ → ℝ; the hypotheses 0 ≤ w, w 1 = 0 enter only the 𝒪₂ estimate. -/ - -section GeneralWeights -variable {Φ : ℝ → ℝ} {T : ℝ} - -/-- Q(τ) := Σ_{N ∈ primeRange X} w_N cos(τ log N − φ_N). -/ -def cosPolyPh (X : ℝ) (w φ : ℕ → ℝ) (τ : ℝ) : ℝ := - ∑ n ∈ primeRange X, w n * Real.cos (τ * Real.log n - φ n) +open Zeta23.PrimeSide -/-- **[eq:MPP] for Q** (mirror of Mform_PXc_PXc): bilinearity, the per-pair phased -decomposition Mform_cos_cos_ph, and the diagonal/off-diagonal split: - 𝓜[Q,Q] = ½ ( Σ_n w_n² A⁻(y_n,y_n) + Σ_{n≠m} w_n w_m A⁻_ph + Σ_{n,m} w_n w_m A⁺_ph ). -/ -lemma Mform_cosPolyPh (hT : 0 ≤ T) (hΦ : Continuous Φ) (X : ℝ) (w φ : ℕ → ℝ) : - Mform Φ T (cosPolyPh X w φ) (cosPolyPh X w φ) - = (1 / 2) * - ((∑ n ∈ primeRange X, w n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - + (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else w n * w m - * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m))) - + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - w n * w m * AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) := by - have h1 : Mform Φ T (cosPolyPh X w φ) (cosPolyPh X w φ) = - ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, w n * w m * - Mform Φ T (fun τ => Real.cos (τ * Real.log n - φ n)) - (fun τ => Real.cos (τ * Real.log m - φ m)) := by - unfold Mform - have hpt : ∀ q : ℝ × ℝ, Φ (q.1 - q.2) ^ 2 * cosPolyPh X w φ q.1 * cosPolyPh X w φ q.2 - = ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - w n * w m * - (Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * Real.log n - φ n) - * Real.cos (q.2 * Real.log m - φ m)) := by - intro q - unfold cosPolyPh - rw [mul_assoc, Finset.sum_mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun m _ => ?_ - ring - simp_rw [hpt] - have hint : ∀ n m : ℕ, Integrable (fun q : ℝ × ℝ => - w n * w m * - (Φ (q.1 - q.2) ^ 2 * Real.cos (q.1 * Real.log n - φ n) - * Real.cos (q.2 * Real.log m - φ m))) - (volume.restrict (Icc T (2 * T) ×ˢ Icc T (2 * T))) := fun n m => - (Mform_integrableOn hΦ (u := fun τ => Real.cos (τ * Real.log n - φ n)) - (v := fun τ => Real.cos (τ * Real.log m - φ m)) (by fun_prop) (by fun_prop)).const_mul _ - rw [integral_finset_sum _ (fun n _ => integrable_finset_sum _ (fun m _ => hint n m))] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [integral_finset_sum _ (fun m _ => hint n m)] - refine Finset.sum_congr rfl fun m _ => ?_ - rw [integral_const_mul] - rw [h1] - simp_rw [Mform_cos_cos_ph hT hΦ] - have e : ∀ n m : ℕ, w n * w m * - ((AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m) - + AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) / 2) - = (1 / 2) * (w n * w m * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) - + (1 / 2) * (w n * w m * AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) := by - intro n m; ring - simp_rw [e, Finset.sum_add_distrib, ← Finset.mul_sum] - have hA := sum_sum_eq_diag_add_offdiag (primeRange X) - (fun n m => w n * w m * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) - have hdiag : ∑ n ∈ primeRange X, w n * w n * AminusPh Φ T (Real.log n) (Real.log n) (φ n) (φ n) - = ∑ n ∈ primeRange X, w n ^ 2 * Aminus Φ T (Real.log n) (Real.log n) := by - refine Finset.sum_congr rfl fun n _ => ?_ - rw [AminusPh_self] - ring - rw [hA, hdiag] - ring - -/-- **𝒟 for Q** (mirror of diag_estimate): with ∫Φ²cos(xy) = 2πg(y) [eq:Phi2FT], - |½ Σ w_n² A⁻(y_n,y_n) − πT Σ w_n² g(y_n)| ≤ ½ (Σ w_n²) ∫Φ²|x|. -/ -lemma diag_estimate_w (hT : 0 ≤ T) (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) - (hΦabs : Integrable fun x => Φ x ^ 2 * |x|) {g : ℝ → ℝ} - (hFT : ∀ y, ∫ x, Φ x ^ 2 * Real.cos (x * y) = 2 * π * g y) (X : ℝ) (w : ℕ → ℝ) : - |(1 / 2) * (∑ n ∈ primeRange X, w n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - - π * T * ∑ n ∈ primeRange X, w n ^ 2 * g (Real.log n)| - ≤ (1 / 2) * (∑ n ∈ primeRange X, w n ^ 2) * ∫ x, Φ x ^ 2 * |x| := by - have e : (1 / 2) * (∑ n ∈ primeRange X, w n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - - π * T * ∑ n ∈ primeRange X, w n ^ 2 * g (Real.log n) - = (1 / 2) * ∑ n ∈ primeRange X, w n ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n)) := by - simp_rw [hFT] - rw [Finset.mul_sum, Finset.mul_sum, Finset.mul_sum, ← Finset.sum_sub_distrib] - refine Finset.sum_congr rfl fun n _ => ?_ - ring - rw [e, abs_mul, abs_of_pos (by norm_num : (0:ℝ) < 1 / 2), mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ (by norm_num) - calc |∑ n ∈ primeRange X, w n ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n))| - ≤ ∑ n ∈ primeRange X, |w n ^ 2 * - (Aminus Φ T (Real.log n) (Real.log n) - T * ∫ x, Φ x ^ 2 * Real.cos (x * Real.log n))| := - Finset.abs_sum_le_sum_abs _ _ - _ ≤ ∑ n ∈ primeRange X, w n ^ 2 * ∫ x, Φ x ^ 2 * |x| := by - refine Finset.sum_le_sum fun n _ => ?_ - rw [abs_mul, abs_of_nonneg (sq_nonneg _)] - exact mul_le_mul_of_nonneg_left (abs_Aminus_diag_sub_le hT hΦ hΦ2 hΦabs _) (sq_nonneg _) - _ = (∑ n ∈ primeRange X, w n ^ 2) * ∫ x, Φ x ^ 2 * |x| := by rw [Finset.sum_mul] - -/-- for n ∈ primeRange X: either n = 1 (where the weight vanishes) or 2 ≤ n. -/ -lemma w_eq_zero_or_two_le {w : ℕ → ℝ} (hw1 : w 1 = 0) {X : ℝ} {n : ℕ} (hn : n ∈ primeRange X) : - w n = 0 ∨ 2 ≤ n := by - rcases Nat.lt_or_ge n 2 with h | h - · left - have : n = 1 := by have := one_le_of_mem_primeRange hn; omega - subst this; exact hw1 - · exact Or.inr h - -/-- **𝒪₂ for Q** (mirror of O2_estimate; "since y_n + y_m ≥ 2 log 2 the second inner -integral is O(1)"): |Σ_{n,m} w_n w_m A⁺_ph| ≤ (∫Φ²/log 2)·(Σ w_n)², for w ≥ 0 with w 1 = 0. -/ -lemma O2_estimate_w (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) (X T : ℝ) - {w : ℕ → ℝ} (hw0 : ∀ n, 0 ≤ w n) (hw1 : w 1 = 0) (φ : ℕ → ℝ) : - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - w n * w m * AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)| - ≤ (∫ x, Φ x ^ 2) / Real.log 2 * (∑ n ∈ primeRange X, w n) ^ 2 := by - have hW : 0 ≤ ∫ x, Φ x ^ 2 := integral_nonneg fun x => sq_nonneg _ - have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - have hper : ∀ n ∈ primeRange X, ∀ m ∈ primeRange X, - |w n * w m * AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)| - ≤ w n * w m * ((∫ x, Φ x ^ 2) / Real.log 2) := by - intro n hn m hm - rw [abs_mul, abs_mul, abs_of_nonneg (hw0 n), abs_of_nonneg (hw0 m)] - rcases w_eq_zero_or_two_le hw1 hn with h0 | hn2 - · simp [h0] - rcases w_eq_zero_or_two_le hw1 hm with h0 | hm2 - · simp [h0] - have hyn : Real.log 2 ≤ Real.log n := Real.log_le_log (by norm_num) (by exact_mod_cast hn2) - have hym : Real.log 2 ≤ Real.log m := Real.log_le_log (by norm_num) (by exact_mod_cast hm2) - have hpos : 0 < Real.log n + Real.log m := by linarith - have hA : |AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)| - ≤ (∫ x, Φ x ^ 2) / Real.log 2 := by - calc |AplusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)| - ≤ 2 / (Real.log n + Real.log m) * ∫ x, Φ x ^ 2 := abs_AplusPh_le hΦ hΦ2 hpos _ _ - _ ≤ 2 / (2 * Real.log 2) * ∫ x, Φ x ^ 2 := by gcongr; linarith - _ = (∫ x, Φ x ^ 2) / Real.log 2 := by field_simp - exact mul_le_mul_of_nonneg_left hA (mul_nonneg (hw0 n) (hw0 m)) - refine le_trans (Finset.abs_sum_le_sum_abs _ _) ?_ - refine le_trans (Finset.sum_le_sum fun n _ => Finset.abs_sum_le_sum_abs _ _) ?_ - refine le_trans (Finset.sum_le_sum fun n hn => Finset.sum_le_sum fun m hm => hper n hn m hm) ?_ - refine le_of_eq ?_ - rw [sq, Finset.sum_mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun m _ => ?_ - ring - -/-- H-MV size bookkeeping for a general weight (mirror of MV_size_le₂): if |M_n| ≤ W on the range then - C·√(Σ (w_n M_n)²·2n)·√(Σ w_n²·2n) ≤ 2CW·Σ w_n² n (both slot orders). -/ -lemma MV_size_le_w {C : ℝ} (hC : 0 ≤ C) (X : ℝ) (w : ℕ → ℝ) {M : ℕ → ℝ} {W : ℝ} (hW : 0 ≤ W) - (hM : ∀ n ∈ primeRange X, |M n| ≤ W) : - C * Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, w n ^ 2 * (2 * n)) - ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n ∧ - C * Real.sqrt (∑ n ∈ primeRange X, w n ^ 2 * (2 * n)) - * Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) - ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n := by - set S := ∑ n ∈ primeRange X, w n ^ 2 * n with hS - have hSnn : 0 ≤ S := Finset.sum_nonneg fun n _ => mul_nonneg (sq_nonneg _) (Nat.cast_nonneg _) - have h2S : ∑ n ∈ primeRange X, w n ^ 2 * (2 * n) = 2 * S := by - rw [hS, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - ring - have hMS : ∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n) ≤ W ^ 2 * (2 * S) := by - rw [← h2S, Finset.mul_sum] - refine Finset.sum_le_sum fun n hn => ?_ - have hM2 : M n ^ 2 ≤ W ^ 2 := by - rw [← sq_abs (M n)] - exact pow_le_pow_left₀ (abs_nonneg _) (hM n hn) 2 - have hnn : 0 ≤ w n ^ 2 * (2 * n) := mul_nonneg (sq_nonneg _) (by positivity) - calc (w n * M n) ^ 2 * (2 * n) = M n ^ 2 * (w n ^ 2 * (2 * n)) := by ring - _ ≤ W ^ 2 * (w n ^ 2 * (2 * n)) := mul_le_mul_of_nonneg_right hM2 hnn - have hs1 : Real.sqrt (∑ n ∈ primeRange X, w n ^ 2 * (2 * n)) = Real.sqrt (2 * S) := by rw [h2S] - have hs2 : Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) ≤ W * Real.sqrt (2 * S) := by - calc Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) - ≤ Real.sqrt (W ^ 2 * (2 * S)) := Real.sqrt_le_sqrt hMS - _ = W * Real.sqrt (2 * S) := by rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq hW] - have hsq : Real.sqrt (2 * S) * Real.sqrt (2 * S) = 2 * S := Real.mul_self_sqrt (by positivity) - have h2Snn : 0 ≤ Real.sqrt (2 * S) := Real.sqrt_nonneg _ - constructor - · rw [hs1] - calc C * Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) * Real.sqrt (2 * S) - ≤ C * (W * Real.sqrt (2 * S)) * Real.sqrt (2 * S) := by - apply mul_le_mul_of_nonneg_right _ h2Snn - exact mul_le_mul_of_nonneg_left hs2 hC - _ = C * W * (Real.sqrt (2 * S) * Real.sqrt (2 * S)) := by ring - _ = 2 * C * W * S := by rw [hsq]; ring - · rw [hs1] - calc C * Real.sqrt (2 * S) * Real.sqrt (∑ n ∈ primeRange X, (w n * M n) ^ 2 * (2 * n)) - ≤ C * Real.sqrt (2 * S) * (W * Real.sqrt (2 * S)) := - mul_le_mul_of_nonneg_left hs2 (mul_nonneg hC h2Snn) - _ = C * W * (Real.sqrt (2 * S) * Real.sqrt (2 * S)) := by ring - _ = 2 * C * W * S := by rw [hsq]; ring - -/-- One H-MV application with a bounded multiplier M (|M_n| ≤ W := ∫Φ²) in either slot and either -trig function: the four shapes of off-diagonal sums met in 𝒪₁ are each ≤ 2CW·Σ w_n² n. -/ -lemma MV_four {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (X cc : ℝ) (w φ : ℕ → ℝ) - {M : ℕ → ℝ} {W : ℝ} (hW : 0 ≤ W) (hM : ∀ n ∈ primeRange X, |M n| ≤ W) : - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * M n * w m * Real.sin (cc * (Real.log n - Real.log m) - (φ n - φ m)) - / (Real.log n - Real.log m))| ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n ∧ - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * M n * w m * Real.cos (cc * (Real.log n - Real.log m) - (φ n - φ m)) - / (Real.log n - Real.log m))| ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n ∧ - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * (w m * M m) * Real.sin (cc * (Real.log n - Real.log m) - (φ n - φ m)) - / (Real.log n - Real.log m))| ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n ∧ - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * (w m * M m) * Real.cos (cc * (Real.log n - Real.log m) - (φ n - φ m)) - / (Real.log n - Real.log m))| ≤ 2 * C * W * ∑ n ∈ primeRange X, w n ^ 2 * n := by - have hL := MV_real_ph hMV X cc (fun k => w k * M k) (fun k => w k) φ - have hR := MV_real_ph hMV X cc (fun k => w k) (fun k => w k * M k) φ - have hsz := MV_size_le_w hC X w hW hM - exact ⟨hL.2.trans hsz.1, hL.1.trans hsz.1, hR.2.trans hsz.2, hR.1.trans hsz.2⟩ - -/-- **𝒪₁ for Q** (mirror of O1_bound): the exact evaluation sub_mul_AminusPh_eq splits -Σ_{n≠m} w_n w_m A⁻_ph into eight off-diagonal trigonometric sums, each an H-MV sum with one bounded -multiplier (C^∓, S^∓, all ≤ ∫Φ² in modulus): |Σ_{n≠m} w_n w_m A⁻_ph| ≤ 16·C·(∫Φ²)·Σ_n w_n² n. -/ -theorem O1_bound_w {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (hT : 0 ≤ T) - (hΦ : Continuous Φ) (hΦ2 : Integrable fun x => Φ x ^ 2) (X : ℝ) (w φ : ℕ → ℝ) : - |∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else w n * w m - * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m))| - ≤ 16 * C * (∫ x, Φ x ^ 2) * ∑ n ∈ primeRange X, w n ^ 2 * n := by - set W : ℝ := ∫ x, Φ x ^ 2 with hW - have hW0 : 0 ≤ W := MeasureTheory.integral_nonneg fun x => sq_nonneg _ - set S : ℝ := ∑ n ∈ primeRange X, w n ^ 2 * n with hSdef - set S1 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * Cm Φ T (Real.log n) * w m - * Real.sin ((2 * T) * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS1 - set S2 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * Sm Φ T (Real.log n) * w m - * Real.cos ((2 * T) * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS2 - set S3 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * (w m * Cm Φ T (Real.log m)) - * Real.sin (T * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS3 - set S4 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * (w m * Sm Φ T (Real.log m)) - * Real.cos (T * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS4 - set S5 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * (w m * Cp Φ T (Real.log m)) - * Real.sin ((2 * T) * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS5 - set S6 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * (w m * Sp Φ T (Real.log m)) - * Real.cos ((2 * T) * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS6 - set S7 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * Cp Φ T (Real.log n) * w m - * Real.sin (T * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS7 - set S8 : ℝ := ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, (if n = m then (0:ℝ) else - w n * Sp Φ T (Real.log n) * w m - * Real.cos (T * (Real.log n - Real.log m) - (φ n - φ m)) / (Real.log n - Real.log m)) with hS8 - have hsplit : ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else w n * w m - * AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m)) - = S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8 := by - rw [hS1, hS2, hS3, hS4, hS5, hS6, hS7, hS8] - simp only [← Finset.sum_sub_distrib, ← Finset.sum_add_distrib] - refine Finset.sum_congr rfl fun n hn => Finset.sum_congr rfl fun m hm => ?_ - by_cases hnm : n = m - · simp [hnm] - · simp only [if_neg hnm] - have hθ : Real.log n - Real.log m ≠ 0 := by - have hn1 := one_le_of_mem_primeRange hn - have hm1 := one_le_of_mem_primeRange hm - have hinj : Real.log n ≠ Real.log m := by - rcases lt_or_gt_of_ne hnm with hlt | hgt - · exact ne_of_lt (Real.log_lt_log (by exact_mod_cast hn1) (by exact_mod_cast hlt)) - · exact ne_of_gt (Real.log_lt_log (by exact_mod_cast hm1) (by exact_mod_cast hgt)) - exact sub_ne_zero.mpr hinj - have hA := sub_mul_AminusPh_eq (Φ := Φ) hT hΦ hθ (φ n) (φ m) - have hAm : AminusPh Φ T (Real.log n) (Real.log m) (φ n) (φ m) - = ((Real.sin ((Real.log n - Real.log m) * (2 * T) - (φ n - φ m)) * Cm Φ T (Real.log n) - + Real.cos ((Real.log n - Real.log m) * (2 * T) - (φ n - φ m)) * Sm Φ T (Real.log n) - - (Real.sin ((Real.log n - Real.log m) * T - (φ n - φ m)) * Cm Φ T (Real.log m) - + Real.cos ((Real.log n - Real.log m) * T - (φ n - φ m)) * Sm Φ T (Real.log m))) - + (Real.sin ((Real.log n - Real.log m) * (2 * T) - (φ n - φ m)) * Cp Φ T (Real.log m) - + Real.cos ((Real.log n - Real.log m) * (2 * T) - (φ n - φ m)) * Sp Φ T (Real.log m) - - (Real.sin ((Real.log n - Real.log m) * T - (φ n - φ m)) * Cp Φ T (Real.log n) - + Real.cos ((Real.log n - Real.log m) * T - (φ n - φ m)) * Sp Φ T (Real.log n)))) - / (Real.log n - Real.log m) := by - rw [eq_div_iff hθ, mul_comm] - exact hA - rw [hAm, mul_comm ((2 : ℝ) * T) (Real.log n - Real.log m), - mul_comm T (Real.log n - Real.log m)] - field_simp - ring - have hw_Cm : ∀ n ∈ primeRange X, |Cm Φ T (Real.log n)| ≤ W := fun n _ => abs_Cm_le hT hΦ hΦ2 _ - have hw_Sm : ∀ n ∈ primeRange X, |Sm Φ T (Real.log n)| ≤ W := fun n _ => abs_Sm_le hT hΦ hΦ2 _ - have hw_Cp : ∀ n ∈ primeRange X, |Cp Φ T (Real.log n)| ≤ W := fun n _ => abs_Cp_le hT hΦ hΦ2 _ - have hw_Sp : ∀ n ∈ primeRange X, |Sp Φ T (Real.log n)| ≤ W := fun n _ => abs_Sp_le hT hΦ hΦ2 _ - have h2Cm := MV_four hMV hC X (2 * T) w φ hW0 hw_Cm - have h2Sm := MV_four hMV hC X (2 * T) w φ hW0 hw_Sm - have h2Cp := MV_four hMV hC X (2 * T) w φ hW0 hw_Cp - have h2Sp := MV_four hMV hC X (2 * T) w φ hW0 hw_Sp - have h1Cm := MV_four hMV hC X T w φ hW0 hw_Cm - have h1Sm := MV_four hMV hC X T w φ hW0 hw_Sm - have h1Cp := MV_four hMV hC X T w φ hW0 hw_Cp - have h1Sp := MV_four hMV hC X T w φ hW0 hw_Sp - have hb1 : |S1| ≤ 2 * C * W * S := h2Cm.1 - have hb2 : |S2| ≤ 2 * C * W * S := h2Sm.2.1 - have hb3 : |S3| ≤ 2 * C * W * S := h1Cm.2.2.1 - have hb4 : |S4| ≤ 2 * C * W * S := h1Sm.2.2.2 - have hb5 : |S5| ≤ 2 * C * W * S := h2Cp.2.2.1 - have hb6 : |S6| ≤ 2 * C * W * S := h2Sp.2.2.2 - have hb7 : |S7| ≤ 2 * C * W * S := h1Cp.1 - have hb8 : |S8| ≤ 2 * C * W * S := h1Sp.2.1 - rw [hsplit] - have habs : |S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8| - ≤ |S1| + |S2| + |S3| + |S4| + |S5| + |S6| + |S7| + |S8| := by - have t1 := abs_add_le S1 S2 - have t2 := abs_sub (S1 + S2) S3 - have t3 := abs_sub (S1 + S2 - S3) S4 - have t4 := abs_add_le (S1 + S2 - S3 - S4) S5 - have t5 := abs_add_le (S1 + S2 - S3 - S4 + S5) S6 - have t6 := abs_sub (S1 + S2 - S3 - S4 + S5 + S6) S7 - have t7 := abs_sub (S1 + S2 - S3 - S4 + S5 + S6 - S7) S8 - linarith - calc |S1 + S2 - S3 - S4 + S5 + S6 - S7 - S8| - ≤ |S1| + |S2| + |S3| + |S4| + |S5| + |S6| + |S7| + |S8| := habs - _ ≤ 8 * (2 * C * W * S) := by linarith - _ = 16 * C * W * S := by ring - -end GeneralWeights - -/-! ## Assembly: [prop:PP] for P_c -/ - -section Results -variable {C cϱ : ℝ} {p : Setting} {F : LocalFun} - -/-- [eq:MPP] for P_c: 𝓜[P_c,P_c] = (1/2π²)·(𝒟-sum + 𝒪₁-sum + 𝒪₂-sum) with weights w_N = ‖c_N‖/√N and -phases arg c_N ((1/π)·(1/π) = 1/π², as (−1/π)² in the ζ case). -/ -lemma Mform_Pc_Pc {Φ : ℝ → ℝ} {T : ℝ} (hT : 0 ≤ T) (hΦ : Continuous Φ) (c : ℕ → ℂ) (X : ℝ) : - Mform Φ T (Pc X c) (Pc X c) - = (1 / (2 * π ^ 2)) * - ((∑ n ∈ primeRange X, wcoef c n ^ 2 * Aminus Φ T (Real.log n) (Real.log n)) - + (∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - (if n = m then (0:ℝ) else wcoef c n * wcoef c m - * AminusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg)) - + ∑ n ∈ primeRange X, ∑ m ∈ primeRange X, - wcoef c n * wcoef c m - * AplusPh Φ T (Real.log n) (Real.log m) (c n).arg (c m).arg) := by - have hP : Pc X c = fun τ => (1 / π) * cosPolyPh X (wcoef c) (fun n => (c n).arg) τ := by - funext τ - rw [Pc_eq_sum] - rfl - rw [hP, Mform_const_mul_left, Mform_const_mul_right, Mform_cosPolyPh hT hΦ] - ring - -/-- the single constant of the PPInput-shaped form. -/ -def KPP (C cϱ : ℝ) : ℝ := (1 / (2 * π ^ 2)) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) - -/-- **[prop:PP] for the general-coefficient Dirichlet polynomial P_c — three-term form.** -For ONE (p, F) under the window-generic taper hypotheses LocalHypsCore, T ≥ 1, an H-MV constant C ≥ 0, -and any c : ℕ → ℂ with c 1 = 0: - |𝓜[P_c,P_c] − (T/π)·Σ_{N≤X} ‖c_N‖²/N·g(log N)| - ≤ (8+8cϱ)/(2π²)·L·Σ‖c_N‖²/N + 32π/(2π²)·C·L·Σ‖c_N‖² + (2π/log 2)/(2π²)·L·(Σ‖c_N‖/√N)², -all sums over N ∈ Finset.Ioc 0 ⌊X⌋₊ (= PrimeSide.primeRange X). -/ -theorem prop_PP_c (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (hF : LocalHypsCore cϱ p F) - (hT : 1 ≤ p.T) (c : ℕ → ℂ) (hc1 : c 1 = 0) : - |Mform F.Phi p.T (Pc p.X c) (Pc p.X c) - - p.T / π * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n * F.g (Real.log n)| - ≤ (1 / (2 * π ^ 2)) * (8 + 8 * cϱ) * p.L * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n) - + (1 / (2 * π ^ 2)) * (32 * π) * C * p.L * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2) - + (1 / (2 * π ^ 2)) * (2 * π / Real.log 2) * p.L - * (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) ^ 2 := by - -- all sums are over primeRange p.X (defeq); rename - show |Mform F.Phi p.T (Pc p.X c) (Pc p.X c) - - p.T / π * ∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 / n * F.g (Real.log n)| - ≤ (1 / (2 * π ^ 2)) * (8 + 8 * cϱ) * p.L * (∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 / n) - + (1 / (2 * π ^ 2)) * (32 * π) * C * p.L * (∑ n ∈ primeRange p.X, ‖c n‖ ^ 2) - + (1 / (2 * π ^ 2)) * (2 * π / Real.log 2) * p.L - * (∑ n ∈ primeRange p.X, ‖c n‖ / Real.sqrt n) ^ 2 - have hπ : (0:ℝ) < π := Real.pi_pos - have hT0 : 0 ≤ p.T := by linarith - have hL8 : 8 ≤ p.L := hF.eight_le_L - have hL1 : 1 ≤ p.L := by linarith - have hΦc : Continuous F.Phi := hF.Phi_contDiff.continuous - have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - have hcϱ : 4 ≤ cϱ := hF.four_le_cϱ - set W := ∫ x, F.Phi x ^ 2 with hWdef - have hW0 : 0 ≤ W := integral_nonneg fun x => sq_nonneg _ - have hWle : W ≤ 2 * π * p.L := hF.integral_Phi_sq_le - set ΛΦ := ∫ x, F.Phi x ^ 2 * |x| with hΛΦdef - have hΛΦ0 : 0 ≤ ΛΦ := integral_nonneg fun x => mul_nonneg (sq_nonneg _) (abs_nonneg _) - have hΛΦle : ΛΦ ≤ (8 + 8 * cϱ) * p.L := by - have h1 := hF.integral_Phi_sq_mul_abs_le - have hw : 1 ≤ p.w := hF.one_le_w - have hcL : 0 ≤ cϱ * p.L := mul_nonneg (by linarith) (by linarith) - have harg : 0 < cϱ * p.L / (4 * p.w) := by positivity - have hlog : Real.log (cϱ * p.L / (4 * p.w)) ≤ cϱ * p.L / (4 * p.w) := by - linarith [Real.log_le_sub_one_of_pos harg] - have hfrac : cϱ * p.L / (4 * p.w) ≤ cϱ * p.L := by - rw [div_le_iff₀ (by positivity)] - nlinarith [mul_nonneg hcL (by linarith : (0:ℝ) ≤ 4 * p.w - 1)] - calc ΛΦ ≤ 8 + 8 * Real.log (cϱ * p.L / (4 * p.w)) := h1 - _ ≤ 8 + 8 * (cϱ * p.L) := by linarith - _ ≤ 8 * p.L + 8 * (cϱ * p.L) := by linarith - _ = (8 + 8 * cϱ) * p.L := by ring - -- the three coefficient sums - set A := ∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 / n with hAdef - set B := ∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 with hBdef - set S₁ := ∑ n ∈ primeRange p.X, ‖c n‖ / Real.sqrt n with hS₁def - have hA0 : 0 ≤ A := Finset.sum_nonneg fun n _ => div_nonneg (sq_nonneg _) (Nat.cast_nonneg _) - have hB0 : 0 ≤ B := Finset.sum_nonneg fun n _ => sq_nonneg _ - -- the weight sums in terms of A, B, S₁ - have hwA : ∑ n ∈ primeRange p.X, wcoef c n ^ 2 = A := by - rw [hAdef] - exact Finset.sum_congr rfl fun n _ => wcoef_sq c n - have hwB : ∑ n ∈ primeRange p.X, wcoef c n ^ 2 * n = B := by - rw [hBdef] - exact Finset.sum_congr rfl fun n hn => wcoef_sq_mul (one_le_of_mem_primeRange hn) - have hwS : ∑ n ∈ primeRange p.X, wcoef c n = S₁ := by - rw [hS₁def] - rfl - have hwg : ∑ n ∈ primeRange p.X, wcoef c n ^ 2 * F.g (Real.log n) - = ∑ n ∈ primeRange p.X, ‖c n‖ ^ 2 / n * F.g (Real.log n) := by - refine Finset.sum_congr rfl fun n _ => ?_ - rw [wcoef_sq] - -- the three estimates - have hD := diag_estimate_w hT0 hΦc hF.Phi_sq_integrable hF.Phi_sq_mul_abs_integrable - hF.Phi_sq_fourier p.X (wcoef c) - have hO1 := O1_bound_w hMV hC hT0 hΦc hF.Phi_sq_integrable p.X (wcoef c) (fun n => (c n).arg) - have hO2 := O2_estimate_w hΦc hF.Phi_sq_integrable p.X p.T (wcoef_nonneg c) (wcoef_one hc1) - (fun n => (c n).arg) - rw [hwA] at hD - rw [hwB] at hO1 - rw [hwS] at hO2 - rw [Mform_Pc_Pc hT0 hΦc, ← hwg] - set D := ∑ n ∈ primeRange p.X, wcoef c n ^ 2 * Aminus F.Phi p.T (Real.log n) (Real.log n) - with hDdef - set O1 := ∑ n ∈ primeRange p.X, ∑ m ∈ primeRange p.X, - (if n = m then (0:ℝ) else wcoef c n * wcoef c m - * AminusPh F.Phi p.T (Real.log n) (Real.log m) (c n).arg (c m).arg) with hO1def - set O2 := ∑ n ∈ primeRange p.X, ∑ m ∈ primeRange p.X, - wcoef c n * wcoef c m - * AplusPh F.Phi p.T (Real.log n) (Real.log m) (c n).arg (c m).arg with hO2def - set G := ∑ n ∈ primeRange p.X, wcoef c n ^ 2 * F.g (Real.log n) with hGdef - have hk : (0:ℝ) < 1 / (2 * π ^ 2) := by positivity - -- 𝒟: rescale diag_estimate_w by 1/π² - have bD : |1 / (2 * π ^ 2) * D - p.T / π * G| ≤ 1 / (2 * π ^ 2) * (8 + 8 * cϱ) * p.L * A := by - have e : 1 / (2 * π ^ 2) * D - p.T / π * G = (1 / π ^ 2) * ((1 / 2) * D - π * p.T * G) := by - field_simp - rw [e, abs_mul, abs_of_pos (by positivity)] - calc 1 / π ^ 2 * |1 / 2 * D - π * p.T * G| - ≤ 1 / π ^ 2 * ((1 / 2) * A * ΛΦ) := mul_le_mul_of_nonneg_left hD (by positivity) - _ ≤ 1 / π ^ 2 * ((1 / 2) * A * ((8 + 8 * cϱ) * p.L)) := by - apply mul_le_mul_of_nonneg_left _ (by positivity) - exact mul_le_mul_of_nonneg_left hΛΦle (by positivity) - _ = 1 / (2 * π ^ 2) * (8 + 8 * cϱ) * p.L * A := by - field_simp - have bO1 : |1 / (2 * π ^ 2) * O1| ≤ 1 / (2 * π ^ 2) * (32 * π) * C * p.L * B := by - rw [abs_mul, abs_of_pos hk] - calc 1 / (2 * π ^ 2) * |O1| - ≤ 1 / (2 * π ^ 2) * (16 * C * W * B) := mul_le_mul_of_nonneg_left hO1 hk.le - _ ≤ 1 / (2 * π ^ 2) * (16 * C * (2 * π * p.L) * B) := by - apply mul_le_mul_of_nonneg_left _ hk.le - apply mul_le_mul_of_nonneg_right _ hB0 - exact mul_le_mul_of_nonneg_left hWle (by positivity) - _ = 1 / (2 * π ^ 2) * (32 * π) * C * p.L * B := by ring - have bO2 : |1 / (2 * π ^ 2) * O2| ≤ 1 / (2 * π ^ 2) * (2 * π / Real.log 2) * p.L * S₁ ^ 2 := by - rw [abs_mul, abs_of_pos hk] - calc 1 / (2 * π ^ 2) * |O2| - ≤ 1 / (2 * π ^ 2) * (W / Real.log 2 * S₁ ^ 2) := mul_le_mul_of_nonneg_left hO2 hk.le - _ ≤ 1 / (2 * π ^ 2) * ((2 * π * p.L) / Real.log 2 * S₁ ^ 2) := by - apply mul_le_mul_of_nonneg_left _ hk.le - apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) - exact div_le_div_of_nonneg_right hWle hlog2.le - _ = 1 / (2 * π ^ 2) * (2 * π / Real.log 2) * p.L * S₁ ^ 2 := by ring - have split : 1 / (2 * π ^ 2) * (D + O1 + O2) - p.T / π * G - = (1 / (2 * π ^ 2) * D - p.T / π * G) + 1 / (2 * π ^ 2) * O1 + 1 / (2 * π ^ 2) * O2 := by ring - rw [split] - calc |(1 / (2 * π ^ 2) * D - p.T / π * G) + 1 / (2 * π ^ 2) * O1 + 1 / (2 * π ^ 2) * O2| - ≤ |1 / (2 * π ^ 2) * D - p.T / π * G| + |1 / (2 * π ^ 2) * O1| + |1 / (2 * π ^ 2) * O2| := - abs_add_three _ _ _ - _ ≤ 1 / (2 * π ^ 2) * (8 + 8 * cϱ) * p.L * A - + 1 / (2 * π ^ 2) * (32 * π) * C * p.L * B - + 1 / (2 * π ^ 2) * (2 * π / Real.log 2) * p.L * S₁ ^ 2 := - add_le_add (add_le_add bD bO1) bO2 - -/-- **[prop:PP] for P_c — PPInput-shaped form** (one constant KPP C cϱ; literally the body of -Zeta23.XiPrime.PPInput in Zeta23/XiPrime/PrimeSide/Concrete.lean with K := KPP C cϱ). -/ -theorem prop_PP_c' (hMV : Zeta23.MVHilbert C) (hC : 0 ≤ C) (hF : LocalHypsCore cϱ p F) - (hT : 1 ≤ p.T) (c : ℕ → ℂ) (hc1 : c 1 = 0) : - |Mform F.Phi p.T (Pc p.X c) (Pc p.X c) - - p.T / π * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n * F.g (Real.log n)| - ≤ KPP C cϱ * p.L * - ((∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n) - + (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2) - + (∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n) ^ 2) := by - have h := prop_PP_c hMV hC hF hT c hc1 - refine h.trans ?_ - set A := ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 / n - set B := ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ ^ 2 - set S₁ := ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n - have hA0 : 0 ≤ A := Finset.sum_nonneg fun n _ => div_nonneg (sq_nonneg _) (Nat.cast_nonneg _) - have hB0 : 0 ≤ B := Finset.sum_nonneg fun n _ => sq_nonneg _ - have hS0 : 0 ≤ S₁ ^ 2 := sq_nonneg _ - have hL : 0 ≤ p.L := hF.L_pos.le - have hcϱ : 4 ≤ cϱ := hF.four_le_cϱ - have hπ : (0:ℝ) < π := Real.pi_pos - have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) - have hk : (0:ℝ) ≤ 1 / (2 * π ^ 2) := by positivity - have h1 : (0:ℝ) ≤ 8 + 8 * cϱ := by linarith - have h2 : (0:ℝ) ≤ 32 * π * C := by positivity - have h3 : (0:ℝ) ≤ 2 * π / Real.log 2 := by positivity - unfold KPP - have eA : 1 / (2 * π ^ 2) * (8 + 8 * cϱ) * p.L * A - ≤ 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * A := by - apply mul_le_mul_of_nonneg_right _ hA0 - apply mul_le_mul_of_nonneg_right _ hL - apply mul_le_mul_of_nonneg_left _ hk - linarith - have eB : 1 / (2 * π ^ 2) * (32 * π) * C * p.L * B - ≤ 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * B := by - rw [show 1 / (2 * π ^ 2) * (32 * π) * C = 1 / (2 * π ^ 2) * (32 * π * C) by ring] - apply mul_le_mul_of_nonneg_right _ hB0 - apply mul_le_mul_of_nonneg_right _ hL - apply mul_le_mul_of_nonneg_left _ hk - linarith - have eS : 1 / (2 * π ^ 2) * (2 * π / Real.log 2) * p.L * S₁ ^ 2 - ≤ 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * S₁ ^ 2 := by - apply mul_le_mul_of_nonneg_right _ hS0 - apply mul_le_mul_of_nonneg_right _ hL - apply mul_le_mul_of_nonneg_left _ hk - linarith - calc 1 / (2 * π ^ 2) * (8 + 8 * cϱ) * p.L * A - + 1 / (2 * π ^ 2) * (32 * π) * C * p.L * B - + 1 / (2 * π ^ 2) * (2 * π / Real.log 2) * p.L * S₁ ^ 2 - ≤ 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * A - + 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * B - + 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L * S₁ ^ 2 := - add_le_add (add_le_add eA eB) eS - _ = 1 / (2 * π ^ 2) * ((8 + 8 * cϱ) + 32 * π * C + 2 * π / Real.log 2) * p.L - * (A + B + S₁ ^ 2) := by ring - -end Results +abbrev wcoef := PrimeSide.wcoef +abbrev KPP := PrimeSide.KPP +abbrev Pc_eq_sum := @PrimeSide.PcDir_eq_sum +abbrev Mform_Pc_Pc := @PrimeSide.Mform_PcDir_PcDir +abbrev prop_PP_c := @PrimeSide.prop_PP_c +abbrev prop_PP_c' := @PrimeSide.prop_PP_c' end XiPrime end Zeta23 - diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/PPUpper.lean b/zeta23/Zeta23/XiPrime/PrimeSide/PPUpper.lean index a8fb46792d..d83b267644 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/PPUpper.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/PPUpper.lean @@ -51,10 +51,9 @@ lemma sumW2g_le {cϱ : ℝ} {p : Setting} {F : LocalFun} (hF : LocalHypsCore cϱ mul_le_mul_of_nonneg_left hg h0 _ = p.L * (‖e n‖ ^ 2 / n) := by ring -set_option maxHeartbeats 1600000 in /-- **Frobenius upper bound for the P-part Gram matrix of an arbitrary Dirichlet polynomial.** -/ theorem frobSq_Ppart_le (hPP : PPInput) {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC : 0 < C) - (cϱ lam : ℝ) (hlam : 0 < lam ∧ lam ≤ 1) : + (cϱ lam : ℝ) (_hlam : 0 < lam ∧ lam ≤ 1) : ∃ K T₀ : ℝ, ∀ (p : Setting) (F : LocalFun) (e : ℕ → ℂ), p.lam = lam → T₀ ≤ p.T → LocalHypsCore cϱ p F → e 1 = 0 → ∑ k : Fin p.d, ∑ l : Fin p.d, GentryNu (Pc p.X e) p F k l ^ 2 @@ -146,9 +145,15 @@ theorem frobSq_Ppart_le (hPP : PPInput) {C : ℝ} (hMV : Zeta23.MVHilbert C) (hC linarith [le_max_left (1 / π + max Kpp 0) (max Ce 0)] have hmax2 : max Ce 0 ≤ max (1 / π + max Kpp 0) (max Ce 0) + 1 := by linarith [le_max_right (1 / π + max Kpp 0) (max Ce 0)] - have hL2 : 0 ≤ p.L ^ 2 := sq_nonneg _ - nlinarith [mul_le_mul_of_nonneg_right hmax1 hA, mul_le_mul_of_nonneg_right hmax2 hE, - mul_nonneg hL2 hA, mul_nonneg hL2 hE] + have hsum : (1 / π + max Kpp 0) * (p.T * p.L * sumSqDivW e p.X + p.L * sumSqW e p.X + + p.L * S1 e p.X ^ 2) + max Ce 0 * (p.L * p.l * Real.log p.l * (p.l + S1 e p.X) ^ 2) + ≤ (max (1 / π + max Kpp 0) (max Ce 0) + 1) * (p.T * p.L * sumSqDivW e p.X + + p.L * sumSqW e p.X + p.L * S1 e p.X ^ 2 + + p.L * p.l * Real.log p.l * (p.l + S1 e p.X) ^ 2) := by + have ha := mul_le_mul_of_nonneg_right hmax1 hA + have he := mul_le_mul_of_nonneg_right hmax2 hE + linarith only [ha, he] + exact (mul_le_mul_of_nonneg_left hsum (sq_nonneg _)).trans_eq (by ring) end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/Trace.lean b/zeta23/Zeta23/XiPrime/PrimeSide/Trace.lean index c998f5b65d..fbe6c56fba 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/Trace.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/Trace.lean @@ -7,324 +7,40 @@ SPDX-License-Identifier: Apache-2.0 Part of the Zeta23 formalization. Zeta23/XiPrime/PrimeSide/Trace.lean — generalised-coefficient prime side: -[prop:trace] for the density ν = μ + cΠ·Π_X + P_c with ARBITRARY complex coefficients: - |tr G̃(ν) − a L N| ≤ C · (L √X + L · S₁(c)), S₁(c) = Σ_{N≤X} ‖c_N‖/√N, -for T ≥ T₀ and every N with |N − Tℓ₁/2π| ≤ A·l (C, T₀ depend on cϱ, λ, A, cΠ, H-Γ), c 1 = 0. - -Route: BY DIFFERENCE from the ζ result PrimeSide.prop_trace (tr G̃(ν_X) = aLN + O(L√X), proved, -with the proved Chebyshev bound): ν − ν_X = (cΠ−1)Π_X + (P_c − P_X), and the grid sums of -the Π-part (Pi_part_bound), the P_X-part (sum_P_part_bound) and the P_c-part (complex grid kernel -Aphi_mul_norm_tauKernel_le of ThmE/PrimeSideChi, here with weights ‖c_N‖/√N) are each O(L²√X) -resp. O(L² S₁). +[prop:trace] for the density `ν = μ + cΠ·Π_X + P_c` with arbitrary complex coefficients (`c 1 = 0`), +dispatched directly via `PrimeSide.prop_trace_generic`. -/ import Zeta23.XiPrime.PrimeSide.Density -import Zeta23.ThmE.PrimeSideChi noncomputable section open Real Filter MeasureTheory Set Finset -open scoped BigOperators ArithmeticFunction +open scoped BigOperators namespace Zeta23 namespace XiPrime -open PrimeSide ThmE +open PrimeSide variable {cϱ : ℝ} {p : Setting} {F : LocalFun} -/-- Integrability of `φ̂(r)² P_c(t+r)` (bounded × integrable). -/ +/-- Integrability of `φ̂(r)² P_c(t+r)` (`Pc = PcDir`). -/ lemma Pc_part_integrable (hF : LocalHypsCore cϱ p F) (c : ℕ → ℂ) (t : ℝ) : Integrable (fun r => F.phiHat r ^ 2 * Pc p.X c (t + r)) := - hF.phiHat_sq_mul_integrable_of_bdd ((Pc_continuous p.X c).comp (continuous_const_add t)) - (fun x => Pc_abs_le p.X c (t + x)) - -/-- **P_c-part of [prop:trace] at one grid point** (mirror of ThmE.P_part_chi_eq): -`∫ φ̂(r)² P_c(t+r) dr = 2 Σ_{N≤X} (√N)⁻¹ A_φ(log N)·(Re c_N cos(t log N) + Im c_N sin(t log N))`. -/ -lemma Pc_part_eq (hF : LocalHypsCoreW cϱ p F) (c : ℕ → ℂ) (t : ℝ) : - ∫ r, F.phiHat r ^ 2 * Pc p.X c (t + r) - = 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, (Real.sqrt n)⁻¹ * F.Aphi (Real.log n) - * ((c n).re * Real.cos (t * Real.log n) + (c n).im * Real.sin (t * Real.log n)) := by - have h1 : (fun r => F.phiHat r ^ 2 * Pc p.X c (t + r)) - = fun r => ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, - ((1 / Real.pi) * (Real.sqrt n)⁻¹) - * ((c n).re * (F.phiHat r ^ 2 * Real.cos ((t + r) * Real.log n)) - + (c n).im * (F.phiHat r ^ 2 * Real.sin ((t + r) * Real.log n))) := by - funext r - unfold Pc - rw [Finset.mul_sum, Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [div_eq_mul_inv] - ring - rw [h1, MeasureTheory.integral_finset_sum] - · rw [Finset.mul_sum] - refine Finset.sum_congr rfl fun n _ => ?_ - rw [MeasureTheory.integral_const_mul, MeasureTheory.integral_add, - MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul, - integral_phiHat_sq_mul_cos_shift_core hF, integral_phiHat_sq_mul_sin_shift_core hF] - · have hπ : Real.pi ≠ 0 := Real.pi_ne_zero - field_simp - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_cos_le_one _)).const_mul _ - · exact (hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_sin_le_one _)).const_mul _ - · intro n _ - exact (((hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_cos_le_one _)).const_mul _).add - ((hF.phiHat_sq_mul_integrable_of_bdd (by fun_prop) - (fun x => Real.abs_sin_le_one _)).const_mul _)).const_mul _ - -/-- **Sum of the P_c-parts over the grid** (mirror of ThmE.sum_P_part_chi_bound with weights -`‖c_N‖/√N`): `|Σ_{k ?_ - rw [hre (p.tau k * Real.log n)] - ring - rw [hsum_eq, abs_mul, abs_of_nonneg hs0, div_eq_mul_inv, mul_comm (‖c n‖), mul_assoc] - refine mul_le_mul_of_nonneg_left ?_ hs0 - have hy : Real.log 2 ≤ Real.log n := Real.log_le_log two_pos (by exact_mod_cast hn2) - have hA0 := hF.Aphi_nonneg (Real.log n) - calc |F.Aphi (Real.log n) * (c n * ∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)).re| - = F.Aphi (Real.log n) * |(c n * ∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)).re| := by - rw [abs_mul, abs_of_nonneg hA0] - _ ≤ F.Aphi (Real.log n) * (‖c n‖ * ‖∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)‖) := by - gcongr - exact (Complex.abs_re_le_norm _).trans (norm_mul_le _ _) - _ = ‖c n‖ * (F.Aphi (Real.log n) * ‖∑ k ∈ Finset.range p.d, - Complex.exp ((-(p.tau k * Real.log n) : ℝ) * Complex.I)‖) := by ring - _ ≤ ‖c n‖ * (p.L ^ 2 / (2 * Real.log 2)) := - mul_le_mul_of_nonneg_left (Aphi_mul_norm_tauKernel_le hF hy) (norm_nonneg _) - calc 2 * |∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ∑ k ∈ Finset.range p.d, - (Real.sqrt n)⁻¹ * F.Aphi (Real.log n) - * ((c n).re * Real.cos (p.tau k * Real.log n) - + (c n).im * Real.sin (p.tau k * Real.log n))| - ≤ 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, |∑ k ∈ Finset.range p.d, - (Real.sqrt n)⁻¹ * F.Aphi (Real.log n) - * ((c n).re * Real.cos (p.tau k * Real.log n) - + (c n).im * Real.sin (p.tau k * Real.log n))| := by - gcongr - exact Finset.abs_sum_le_sum_abs _ _ - _ ≤ 2 * ∑ n ∈ Finset.Ioc 0 ⌊p.X⌋₊, ‖c n‖ / Real.sqrt n * (p.L ^ 2 / (2 * Real.log 2)) := by - gcongr with n hn - exact hterm n hn - _ = p.L ^ 2 / Real.log 2 * S1 c p.X := by - rw [← Finset.sum_mul] - unfold S1 - field_simp + PcDir_part_integrable hF.toCoreW c t -/-- **Decomposition of a diagonal entry for ν** (mirror of GentryA_diag_eq): -`G_kk(ν) = G^μ_kk + cΠ·G^Π_kk + G^{P_c}_kk` after translating `τ = τ_k + r`. -/ -lemma GentryW_diag_eq (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p F) (cPi : ℝ) (c : ℕ → ℂ) - (k : ℤ) (hk : 0 < p.tau k) : - GentryW cPi c p F k k = (∫ r, F.phiHat r ^ 2 * Zeta23.mu (p.tau k + r)) - + cPi * (∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r)) - + (∫ r, F.phiHat r ^ 2 * Pc p.X c (p.tau k + r)) := by - show (∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) * nucW cPi p.X c τ) = _ - have htrans : (∫ τ, F.phiHat (τ - p.tau k) * F.phiHat (τ - p.tau k) * nucW cPi p.X c τ) - = ∫ r, F.phiHat r ^ 2 * nucW cPi p.X c (p.tau k + r) := by - rw [← integral_add_right_eq_self _ (p.tau k)] - congr 1; funext r; simp only [add_sub_cancel_right]; ring_nf - rw [htrans] - have hν : ∀ r, F.phiHat r ^ 2 * nucW cPi p.X c (p.tau k + r) - = (F.phiHat r ^ 2 * Zeta23.mu (p.tau k + r) - + cPi * (F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r))) - + F.phiHat r ^ 2 * Pc p.X c (p.tau k + r) := by - intro r; simp only [nucW]; ring - simp_rw [hν] - have h2 : Integrable (fun r => cPi * (F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r))) := - (Pi_part_integrable hF _).const_mul cPi - have h12 : Integrable (fun r => F.phiHat r ^ 2 * Zeta23.mu (p.tau k + r) - + cPi * (F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r))) := - (mu_part_integrable hΓ hF hk).add h2 - rw [integral_add h12 (Pc_part_integrable hF c _), - integral_add (mu_part_integrable hΓ hF hk) h2, integral_const_mul] +abbrev Pc_part_eq := @PrimeSide.PcDir_part_eq +abbrev sum_Pc_part_bound := @PrimeSide.sum_PcDir_part_bound -set_option maxHeartbeats 1600000 in -/-- **[prop:trace] for ν = μ + cΠ·Π_X + P_c** with arbitrary complex coefficients (`c 1 = 0`): +/-- **[prop:trace] for `ν = μ + cΠ·Π_X + P_c`** with arbitrary complex coefficients (`c 1 = 0`): `|tr G̃(ν) − a L N| ≤ C · (L √X + L · S₁(c; X))` for `T ≥ T₀` and every `N` with -`|N − Tℓ₁/2π| ≤ A·l`. Constants depend on (cϱ, λ, A, cΠ, H-Γ); the Chebyshev bound used is -`Zeta23.Cheb.chebyshevMertens`. -/ +`|N − Tℓ₁/2π| ≤ A·l`. -/ theorem prop_trace_W (cϱ lam : ℝ) (hΓ : Zeta23.GammaFacts) (hlam : 0 < lam ∧ lam ≤ 1) (cPi A : ℝ) : ∃ C T₀ : ℝ, ∀ (p : Setting) (F : LocalFun) (c : ℕ → ℂ), p.lam = lam → T₀ ≤ p.T → LocalHypsCore cϱ p F → c 1 = 0 → ∀ N : ℝ, |N - p.T * p.ell1 / (2 * π)| ≤ A * p.l → - |trGtW cPi c p F - F.a * p.L * N| ≤ C * (p.L * Real.sqrt p.X + p.L * S1 c p.X) := by - have hcheb := Zeta23.Cheb.chebyshevMertens - obtain ⟨C₀, T₀, hC₀⟩ := PrimeSide.prop_trace cϱ lam hΓ hcheb hlam A - obtain ⟨x₀, hx₀⟩ := hcheb.cheb1b - refine ⟨|C₀| + |cPi - 1| * (12 * π + 96 + 24 * cϱ ^ 2) + 3 / Real.log 2 + 1 / Real.log 2, - max (max T₀ 4) (2 * π * Real.exp (|x₀| / lam)), fun p F c hplam hT hF hc1 N hN => ?_⟩ - have hTa : max T₀ 4 ≤ p.T := (le_max_left _ _).trans hT - have hT₀' : T₀ ≤ p.T := (le_max_left _ _).trans hTa - have hT4 : 4 ≤ p.T := (le_max_right _ _).trans hTa - have hTx : 2 * π * Real.exp (|x₀| / lam) ≤ p.T := (le_max_right _ _).trans hT - have hT0 : 0 < p.T := by linarith - have h0 := hC₀ p F hplam hT₀' hF N hN - have hL := hF.L_pos - have hc4 := hF.four_le_cϱ - have hlam0 : 0 < p.lam := hplam ▸ hlam.1 - have hX : x₀ ≤ p.X := Setting.le_X_of_T hlam0 (by rw [hplam]; exact hTx) - have hsX : 0 ≤ Real.sqrt p.X := Real.sqrt_nonneg _ - have hlog2 : 0 < Real.log 2 := Real.log_pos one_lt_two - have ha1 := hF.a_le_one - have ha0 := hF.a_pos.le - have hS1 := S1_nonneg c p.X - -- the second taper moment - set I₂ := ∫ r, F.phiHat r ^ 2 * r ^ 2 with hI₂def - have hI₂0 : 0 ≤ I₂ := integral_nonneg fun r => by positivity - have hI₂ : I₂ ≤ 8 + 2 * cϱ ^ 2 := by - refine hF.integral_phiHat_sq_mul_sq_le.trans ?_ - have : (cϱ / p.w) ^ 2 ≤ cϱ ^ 2 := by - rw [div_pow]; exact div_le_self (sq_nonneg _) (by nlinarith [hF.one_le_w]) - linarith - -- grid facts - have hτ : ∀ k ∈ Finset.range p.d, p.T ≤ p.tau k ∧ p.tau k ≤ 2 * p.T := fun k hk => - p.tau_mem hL hT0.le hk - have hd : (p.d : ℝ) ≤ p.L * p.T := by - refine (p.d_le (by positivity)).trans (div_le_self (by positivity) ?_) - linarith [Real.pi_gt_three] - -- the three grid sums of the difference - set GPi : ℕ → ℝ := fun k => ∫ r, F.phiHat r ^ 2 * Zeta23.PiX p.X (p.tau k + r) with hGPi - set GP : ℕ → ℝ := fun k => ∫ r, F.phiHat r ^ 2 * Zeta23.PX p.X (p.tau k + r) with hGP - set GPc : ℕ → ℝ := fun k => ∫ r, F.phiHat r ^ 2 * Pc p.X c (p.tau k + r) with hGPc - have hdiff : ∑ k : Fin p.d, GentryW cPi c p F k k - ∑ k : Fin p.d, GentryA p F k k - = (cPi - 1) * ∑ k ∈ Finset.range p.d, GPi k + ∑ k ∈ Finset.range p.d, GPc k - - ∑ k ∈ Finset.range p.d, GP k := by - rw [Fin.sum_univ_eq_sum_range (fun k => GentryW cPi c p F k k) p.d, - Fin.sum_univ_eq_sum_range (fun k => GentryA p F k k) p.d, Finset.mul_sum, - ← Finset.sum_sub_distrib, ← Finset.sum_add_distrib, ← Finset.sum_sub_distrib] - refine Finset.sum_congr rfl fun k hk => ?_ - have hk0 : 0 < p.tau k := by linarith [(hτ k hk).1] - rw [GentryW_diag_eq hΓ hF cPi c k hk0, GentryA_diag_eq hΓ hF k hk0] - ring - -- (1) Π-part - have h3 : |∑ k ∈ Finset.range p.d, GPi k| - ≤ p.d * ((6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂) := by - have hbound : ∀ k ∈ Finset.range p.d, |GPi k| - ≤ (6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂ := by - intro k hk - have ht := (hτ k hk).1 - have ht2 : 2 ≤ p.tau k := by linarith - refine (Pi_part_bound hF ht2).trans ?_ - have e1 : 6 * Real.sqrt p.X / p.tau k ≤ 6 * Real.sqrt p.X / p.T := - div_le_div_of_nonneg_left (by positivity) hT0 ht - have e2 : 12 * Real.sqrt p.X / p.tau k ^ 2 ≤ 12 * Real.sqrt p.X / p.T := - div_le_div_of_nonneg_left (by positivity) hT0 (by nlinarith) - have e3 : 2 * π * F.a * p.L ≤ 2 * π * p.L := by - have h1 : 2 * π * F.a ≤ 2 * π := mul_le_of_le_one_right (by positivity) ha1 - nlinarith - have b1 : 6 * Real.sqrt p.X / p.tau k * (2 * π * F.a * p.L) - ≤ 6 * Real.sqrt p.X / p.T * (2 * π * p.L) := - mul_le_mul e1 e3 (by positivity) (by positivity) - have b2 : 12 * Real.sqrt p.X / p.tau k ^ 2 * I₂ - ≤ 12 * Real.sqrt p.X / p.T * I₂ := mul_le_mul_of_nonneg_right e2 hI₂0 - linarith - refine ((Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum hbound)).trans ?_ - rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] - have h3' : |(cPi - 1) * ∑ k ∈ Finset.range p.d, GPi k| - ≤ |cPi - 1| * (12 * π + 96 + 24 * cϱ ^ 2) * (p.L ^ 2 * Real.sqrt p.X) := by - rw [abs_mul, mul_assoc] - refine mul_le_mul_of_nonneg_left (h3.trans ?_) (abs_nonneg _) - calc (p.d : ℝ) * ((6 * Real.sqrt p.X / p.T) * (2 * π * p.L) + (12 * Real.sqrt p.X / p.T) * I₂) - ≤ (p.L * p.T) * ((6 * Real.sqrt p.X / p.T) * (2 * π * p.L) - + (12 * Real.sqrt p.X / p.T) * (8 + 2 * cϱ ^ 2)) := by gcongr - _ = (12 * π * p.L + 12 * (8 + 2 * cϱ ^ 2)) * (p.L * Real.sqrt p.X) := by - field_simp - ring - _ ≤ (12 * π * p.L + (96 + 24 * cϱ ^ 2) * p.L) * (p.L * Real.sqrt p.X) := by - have hL1 : 1 ≤ p.L := by linarith [hF.eight_le_L] - apply mul_le_mul_of_nonneg_right _ (by positivity) - nlinarith [sq_nonneg cϱ] - _ = (12 * π + 96 + 24 * cϱ ^ 2) * (p.L ^ 2 * Real.sqrt p.X) := by ring - -- (2) P_X-part - have h4 : |∑ k ∈ Finset.range p.d, GP k| ≤ 3 / Real.log 2 * (p.L ^ 2 * Real.sqrt p.X) := by - refine (sum_P_part_bound hF).trans ?_ - calc p.L ^ 2 / Real.log 2 * ∑ n ∈ primeRange p.X, acoef n - ≤ p.L ^ 2 / Real.log 2 * (3 * Real.sqrt p.X) := - mul_le_mul_of_nonneg_left (hx₀ _ hX) (div_nonneg (sq_nonneg _) hlog2.le) - _ = 3 / Real.log 2 * (p.L ^ 2 * Real.sqrt p.X) := by field_simp - -- (3) P_c-part - have h5 : |∑ k ∈ Finset.range p.d, GPc k| ≤ 1 / Real.log 2 * (p.L ^ 2 * S1 c p.X) := by - refine (sum_Pc_part_bound hF.toCoreW hc1).trans (le_of_eq ?_) - field_simp - -- combine - have hsplit : trGtW cPi c p F - F.a * p.L * N - = (trGtA p F - F.a * p.L * N) - + (p.L)⁻¹ * ((cPi - 1) * ∑ k ∈ Finset.range p.d, GPi k - + ∑ k ∈ Finset.range p.d, GPc k - ∑ k ∈ Finset.range p.d, GP k) := by - rw [← hdiff] - unfold trGtW trGtA - ring - rw [hsplit] - have hLinv : 0 < (p.L)⁻¹ := inv_pos.2 hL - have hA : 0 ≤ p.L * Real.sqrt p.X := by positivity - have hB : 0 ≤ p.L * S1 c p.X := by positivity - have h0' : |trGtA p F - F.a * p.L * N| ≤ |C₀| * (p.L * Real.sqrt p.X) := - h0.trans (mul_le_mul_of_nonneg_right (le_abs_self _) hA) - set K₁ := |cPi - 1| * (12 * π + 96 + 24 * cϱ ^ 2) with hK₁ - have hK₁0 : 0 ≤ K₁ := by positivity - calc |(trGtA p F - F.a * p.L * N) - + (p.L)⁻¹ * ((cPi - 1) * ∑ k ∈ Finset.range p.d, GPi k - + ∑ k ∈ Finset.range p.d, GPc k - ∑ k ∈ Finset.range p.d, GP k)| - ≤ |trGtA p F - F.a * p.L * N| - + (p.L)⁻¹ * (|(cPi - 1) * ∑ k ∈ Finset.range p.d, GPi k| - + |∑ k ∈ Finset.range p.d, GPc k| + |∑ k ∈ Finset.range p.d, GP k|) := by - refine (abs_add_le _ _).trans (add_le_add le_rfl ?_) - rw [abs_mul, abs_of_pos hLinv] - refine mul_le_mul_of_nonneg_left ?_ hLinv.le - exact (abs_sub _ _).trans (add_le_add (abs_add_le _ _) le_rfl) - _ ≤ |C₀| * (p.L * Real.sqrt p.X) - + (p.L)⁻¹ * (K₁ * (p.L ^ 2 * Real.sqrt p.X) - + 1 / Real.log 2 * (p.L ^ 2 * S1 c p.X) - + 3 / Real.log 2 * (p.L ^ 2 * Real.sqrt p.X)) := by - gcongr - _ = |C₀| * (p.L * Real.sqrt p.X) + K₁ * (p.L * Real.sqrt p.X) - + 3 / Real.log 2 * (p.L * Real.sqrt p.X) + 1 / Real.log 2 * (p.L * S1 c p.X) := by - field_simp - ring - _ ≤ (|C₀| + K₁ + 3 / Real.log 2 + 1 / Real.log 2) - * (p.L * Real.sqrt p.X + p.L * S1 c p.X) := by - have hk2 : 0 ≤ 3 / Real.log 2 := by positivity - have hk3 : 0 ≤ 1 / Real.log 2 := by positivity - nlinarith [mul_nonneg (abs_nonneg C₀) hB, mul_nonneg hK₁0 hB, mul_nonneg hk2 hB, - mul_nonneg hk3 hA] + |trGtW cPi c p F - F.a * p.L * N| ≤ C * (p.L * Real.sqrt p.X + p.L * S1 c p.X) := + prop_trace_generic cϱ lam (gammaFacts_toFor hΓ) le_rfl hlam cPi A end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/PrimeSide/Traces.lean b/zeta23/Zeta23/XiPrime/PrimeSide/Traces.lean index 29d12a9fe1..5af48264a7 100644 --- a/zeta23/Zeta23/XiPrime/PrimeSide/Traces.lean +++ b/zeta23/Zeta23/XiPrime/PrimeSide/Traces.lean @@ -155,39 +155,11 @@ end Rates /-! ## Data and hypotheses of the abstract assembly -/ -/-- the abstract real functions of T entering the ξ′ two-trace computation (mirror of -`PrimeSide.Data` + ThmD's `JT`; the pole weight `cΠ` is absorbed into the Π-cross data). -/ -structure DataXi (P : Params) where - /-- `a := L⁻¹ ∫ φ²` -/ - aT : ℝ → ℝ - /-- `b := L⁻¹ ∫ φ⁴` -/ - bT : ℝ → ℝ +/-- the abstract real functions of T entering the ξ′ two-trace computation (extends +`PrimeSide.Data` with `JT`, where `sumL2g` holds the diagonal `Σ_{N≤X} |c_N|²/N · g(log N)`). -/ +structure DataXi (P : Params) extends PrimeSide.Data P where /-- `J_T := (2/L³)·l·∫_0^L D(y/l) g(y) dy` -/ JT : ℝ → ℝ - /-- `tr M̃ᵀ` -/ - trG : ℝ → ℝ - /-- `tr (M̃ᵀ)²` -/ - trG2 : ℝ → ℝ - /-- the count `N` (any, with `N = Tℓ₁/2π + O(l)`) -/ - Ncnt : ℝ → ℝ - /-- `𝓜 = 𝓜[ν, ν]` -/ - Mtot : ℝ → ℝ - /-- `𝓜[μ, μ]` -/ - Mmumu : ℝ → ℝ - /-- `𝓜[P_c, P_c]` -/ - MPP : ℝ → ℝ - /-- `𝓜[μ, P_c]` -/ - MmuP : ℝ → ℝ - /-- `cΠ·𝓜[μ, Π_X]` -/ - MmuPi : ℝ → ℝ - /-- `cΠ·𝓜[P_c, Π_X]` -/ - MPPi : ℝ → ℝ - /-- `cΠ²·𝓜[Π_X, Π_X]` -/ - MPiPi : ℝ → ℝ - /-- `∫_T^{2T} μ²` -/ - intMu2 : ℝ → ℝ - /-- the diagonal `Σ_{N≤X} |c_N|²/N · g(log N)` -/ - sumB2g : ℝ → ℝ variable {P : Params} (D : DataXi P) @@ -199,42 +171,18 @@ def Mstar (P : Params) (T : ℝ) : ℝ := T * P.L T * l T ^ 2 /-- **Hypotheses of the ξ′ two-trace assembly** = the §5 sub-results for the density `ν = μ + cΠ·Π_X + P_c` with the crude coefficient majorants, + H-Γ's [eq:muints], + H-RvM-type count, -+ the window ranges. Mirror of `ThmD.FactsD` (see the file header for the three changes). -/ -structure FactsXi : Prop where - lam_pos : 0 < P.lam ++ the window ranges. Extends `PrimeSide.TraceFactsSpec`. -/ +structure FactsXi : Prop extends toTraceFactsSpec : PrimeSide.TraceFactsSpec ell1 + (fun T => P.L T * Real.sqrt (P.X T) * l T) (Rxi P) + (fun T => P.L T * l T ^ 2 * P.X T) + (fun T => P.L T * l T ^ 2 * Real.sqrt (P.X T)) + (fun T => P.L T * P.X T * l T) D.toData where lam_lt_one : P.lam < 1 - one_le_w : 1 ≤ P.w /-- window ranges [eq:abJ]: `1/2 ≤ b ≤ a ≤ 1`, `0 ≤ J_T` eventually. -/ ab_range : ∀ᶠ T in atTop, 1 / 2 ≤ D.bT T ∧ D.bT T ≤ D.aT T ∧ D.aT T ≤ 1 ∧ 0 ≤ D.JT T - /-- H-RvM-type: `N = T ℓ₁/2π + O(l)`. -/ - rvm : EvBound (fun T => D.Ncnt T - T * ell1 T / (2 * π)) l - /-- [eq:muints]: `∫_T^{2T} μ² = (Tℓ₁²/4π²)(1 + O(l⁻²))`. -/ - muints2 : EvBound (fun T => D.intMu2 T - T * ell1 T ^ 2 / (4 * π ^ 2)) - (fun T => T * ell1 T ^ 2 / (4 * π ^ 2) / l T ^ 2) - /-- [prop:trace] for ν: `tr G̃ = a L N + O(L √X · l)`. -/ - prop_trace : EvBound (fun T => D.trG T - D.aT T * P.L T * D.Ncnt T) - (fun T => P.L T * Real.sqrt (P.X T) * l T) - /-- [lem:ends] for ν (via lem_ends_nu with `B ≍ l(1+√X)`): `tr G̃² = 𝓜 + O(L l³ log l (1+X))`. -/ - lem_ends : EvBound (fun T => D.trG2 T - D.Mtot T) (Rxi P) - /-- [eq:Msplit]: the bilinear expansion of `𝓜[ν,ν]`, `ν = μ + cΠ·Π_X + P_c`. -/ - Msplit : ∀ᶠ T in atTop, D.Mtot T = - D.Mmumu T + D.MPP T + 2 * D.MmuP T + 2 * D.MmuPi T + 2 * D.MPPi T + D.MPiPi T - /-- [prop:mumu] (coefficient-free, verbatim): `𝓜[μ,μ] = 2π b L ∫_T^{2T} μ² + O(l² log L)`. -/ - prop_mumu : EvBound (fun T => D.Mmumu T - 2 * π * D.bT T * P.L T * D.intMu2 T) - (fun T => l T ^ 2 * Real.log (P.L T)) - /-- [prop:PP] for P_c: `𝓜[P_c,P_c] = (T/π) Σ |c_N|²/N g(log N) + O(L l² X)`. -/ - prop_PP : EvBound (fun T => D.MPP T - T / π * D.sumB2g T) (fun T => P.L T * l T ^ 2 * P.X T) /-- partial summation from the ε-form diagonal law: `Σ |c_N|²/N g(log N) = (L³/2) J_T + o(l² L)`. -/ sumJ : ∀ ε : ℝ, 0 < ε → ∀ᶠ T in atTop, - |D.sumB2g T - P.L T ^ 3 / 2 * D.JT T| ≤ ε * (l T ^ 2 * P.L T) - /-- [prop:cross] for ν: `𝓜[μ,P_c] ≪ L l² √X`. -/ - cross_muP : EvBound D.MmuP (fun T => P.L T * l T ^ 2 * Real.sqrt (P.X T)) - /-- `cΠ·𝓜[μ,Π_X] ≪ l L √X` -/ - cross_muPi : EvBound D.MmuPi (fun T => l T * P.L T * Real.sqrt (P.X T)) - /-- `cΠ·𝓜[P_c,Π_X] ≪ L X l` -/ - cross_PPi : EvBound D.MPPi (fun T => P.L T * P.X T * l T) - /-- `cΠ²·𝓜[Π_X,Π_X] ≪ L X / T` -/ - cross_PiPi : EvBound D.MPiPi (fun T => P.L T * P.X T / T) + |D.sumL2g T - P.L T ^ 3 / 2 * D.JT T| ≤ ε * (l T ^ 2 * P.L T) /-! ## Two exact identities -/ @@ -271,30 +219,15 @@ include h private lemma regime : ∀ᶠ T in atTop, 1 ≤ T ∧ 1 ≤ l T ∧ 1 ≤ Real.log (l T) ∧ 1 ≤ P.L T ∧ 1 ≤ P.X T ∧ P.L T ≤ l T ∧ P.X T ≤ T ∧ ell1 T ≤ 2 * l T := by - have hlam := h.lam_pos - filter_upwards [eventually_ge_atTop 1, eventually_l_ge 1, eventually_log_l_ge 1, - eventually_L_ge P hlam 1, eventually_one_le_X P hlam, - eventually_X_le_T P hlam h.lam_lt_one.le, eventually_ell1_le_two_l] with T h1 h2 h3 h4 h5 h6 h7 - exact ⟨h1, h2, h3, h4, h5, L_le_l P h.lam_lt_one.le (by linarith), h6, h7⟩ - -private lemma Ncnt_lower : ∀ᶠ T in atTop, T * l T / (4 * π) ≤ D.Ncnt T := by - obtain ⟨A, hA, hN⟩ := h.rvm.eventually_le - filter_upwards [hN, eventually_ge_atTop (4 * π * A), eventually_l_ge 0] with T hN hTA hl - have hπ := Real.pi_pos - have h1 : -(A * l T) ≤ D.Ncnt T - T * ell1 T / (2 * π) := (abs_le.mp hN).1 - have h2 : T * l T ≤ T * ell1 T := mul_le_mul_of_nonneg_left (l_le_ell1 T) (by nlinarith) - have h3 : T * l T / (2 * π) ≤ T * ell1 T / (2 * π) := - div_le_div_of_nonneg_right h2 (by positivity) - have h4 : T * l T / (4 * π) = T * l T / (2 * π) - T * l T / (4 * π) := by ring - have h5 : A * l T ≤ T * l T / (4 * π) := by - rw [le_div_iff₀ (by positivity)]; nlinarith - linarith - -private lemma Ncnt_pos : ∀ᶠ T in atTop, 0 < D.Ncnt T := by - filter_upwards [Ncnt_lower h, eventually_l_ge 1, eventually_ge_atTop 1] with T hN hl hT - have hπ := Real.pi_pos - have h0 : (0:ℝ) < T * l T / (4 * π) := by positivity - linarith + filter_upwards [h.toTraceFactsSpec.regime, eventually_ell1_le_two_l] + with T ⟨h1, h2, h3, h4, h5, hLl, h6⟩ h7 + exact ⟨h1, h2, h3, h4, h5, hLl, h6, h7⟩ + +private lemma Ncnt_lower : ∀ᶠ T in atTop, T * l T / (4 * π) ≤ D.Ncnt T := + h.toTraceFactsSpec.Ncnt_lower + +private lemma Ncnt_pos : ∀ᶠ T in atTop, 0 < D.Ncnt T := + h.toTraceFactsSpec.Ncnt_pos /-- `N ~ T ℓ₁ / 2π`. -/ lemma isEquivalent_Ncnt : D.Ncnt ~[atTop] (fun T => T * ell1 T / (2 * π)) := by @@ -334,53 +267,25 @@ theorem tr1' : D.trG ~[atTop] (fun T => D.aT T * P.L T * D.Ncnt T) := by /-- the first form of [eq:tr2]: all §5 remainders collected into `O(R_T)`. -/ private lemma tr2_first : EvBound - (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumB2g T)) (Rxi P) := by - -- each remainder is ≤ 1·R_T in the regime - have dom : ∀ᶠ T in atTop, - l T ^ 2 * Real.log (P.L T) ≤ 1 * Rxi P T ∧ - P.L T * l T ^ 2 * P.X T ≤ 1 * Rxi P T ∧ - P.L T * l T ^ 2 * Real.sqrt (P.X T) ≤ 1 * Rxi P T ∧ - l T * P.L T * Real.sqrt (P.X T) ≤ 1 * Rxi P T ∧ - P.L T * P.X T * l T ≤ 1 * Rxi P T ∧ - P.L T * P.X T / T ≤ 1 * Rxi P T := by - filter_upwards [regime h] with T ⟨hT, hl, hlog, hL, hX, hLl, hXT, _u0⟩ - have hsX : Real.sqrt (P.X T) ≤ P.X T := by - rw [Real.sqrt_le_left (by linarith)]; nlinarith - have hlogL : Real.log (P.L T) ≤ Real.log (l T) := Real.log_le_log (by linarith) hLl - have hR : Rxi P T = P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := rfl - have hl2 : l T ^ 2 ≤ l T ^ 3 := by nlinarith - have hl3 : l T ≤ l T ^ 3 := by nlinarith - have h13 : (1:ℝ) ≤ l T ^ 3 := by nlinarith - rw [one_mul, hR] - refine ⟨?_, ?_, ?_, ?_, ?_, ?_⟩ - · calc l T ^ 2 * Real.log (P.L T) ≤ l T ^ 2 * Real.log (l T) := by - gcongr - _ = 1 * l T ^ 2 * Real.log (l T) * 1 := by ring - _ ≤ P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := by gcongr <;> nlinarith - · calc P.L T * l T ^ 2 * P.X T = P.L T * l T ^ 2 * 1 * P.X T := by ring - _ ≤ P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := by gcongr <;> nlinarith - · calc P.L T * l T ^ 2 * Real.sqrt (P.X T) ≤ P.L T * l T ^ 2 * P.X T := by gcongr - _ = P.L T * l T ^ 2 * 1 * P.X T := by ring - _ ≤ P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := by gcongr <;> nlinarith - · calc l T * P.L T * Real.sqrt (P.X T) ≤ l T * P.L T * P.X T := by gcongr - _ = P.L T * l T * 1 * P.X T := by ring - _ ≤ P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := by gcongr <;> nlinarith - · calc P.L T * P.X T * l T = P.L T * l T * 1 * P.X T := by ring - _ ≤ P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := by gcongr <;> nlinarith - · calc P.L T * P.X T / T ≤ P.L T * P.X T := div_le_self (by nlinarith) hT - _ = P.L T * 1 * 1 * P.X T := by ring - _ ≤ P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := by gcongr <;> nlinarith - have e3 := h.prop_mumu.mono_right' one_pos (dom.mono fun T h => h.1) - have e4 := h.prop_PP.mono_right' one_pos (dom.mono fun T h => h.2.1) - have e5 := h.cross_muP.mono_right' one_pos (dom.mono fun T h => h.2.2.1) - have e6 := h.cross_muPi.mono_right' one_pos (dom.mono fun T h => h.2.2.2.1) - have e7 := h.cross_PPi.mono_right' one_pos (dom.mono fun T h => h.2.2.2.2.1) - have e8 := h.cross_PiPi.mono_right' one_pos (dom.mono fun T h => h.2.2.2.2.2) - have S := h.lem_ends.add (e3.add (e4.add (((e5.const_mul 2).add (e6.const_mul 2)).add - ((e7.const_mul 2).add e8)))) - refine S.congr_left ?_ - filter_upwards [h.Msplit] with T hM - rw [hM]; ring + (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumL2g T)) (Rxi P) := by + refine h.toTraceFactsSpec.tr2_first_of ?_ + filter_upwards [regime h] with T ⟨hT, hl, hlog, hL, hX, hLl, _, _⟩ + have hsX : Real.sqrt (P.X T) ≤ P.X T := by rw [Real.sqrt_le_left (by linarith)]; nlinarith + have hl2 : l T ^ 2 ≤ l T ^ 3 := by nlinarith + have hM : P.L T * l T ^ 2 * P.X T ≤ Rxi P T := by + calc P.L T * l T ^ 2 * P.X T = P.L T * l T ^ 2 * 1 * P.X T := by ring + _ ≤ P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := by gcongr; nlinarith + exact PrimeSide.tr2_dom_of hT hl hL hX hLl + (by calc l T ^ 2 * Real.log (l T) = 1 * l T ^ 2 * Real.log (l T) * 1 := by ring + _ ≤ P.L T * l T ^ 3 * Real.log (l T) * (1 + P.X T) := by gcongr; nlinarith) + (le_trans (show P.L T * l T * P.X T ≤ P.L T * l T ^ 2 * P.X T by + calc P.L T * l T * P.X T = P.L T * (l T * 1) * P.X T := by ring + _ ≤ P.L T * l T ^ 2 * P.X T := by gcongr; nlinarith) hM) + hM + (le_trans (show P.L T * l T ^ 2 * Real.sqrt (P.X T) ≤ P.L T * l T ^ 2 * P.X T by gcongr) hM) + (le_trans (show P.L T * P.X T * l T ≤ P.L T * l T ^ 2 * P.X T by + calc P.L T * P.X T * l T = P.L T * (l T * 1) * P.X T := by ring + _ ≤ P.L T * l T ^ 2 * P.X T := by gcongr; nlinarith) hM) /-- `M⋆ ≤ 4π · (TL/2π)(bℓ₁² + L²J)` and positivity of the main term, eventually. -/ private lemma Mstar_le : ∀ᶠ T in atTop, @@ -392,7 +297,7 @@ private lemma Mstar_le : ∀ᶠ T in atTop, unfold Mstar mainTr2Xi have h1 : 4 * π * (T * P.L T / (2 * π) * (D.bT T * ell1 T ^ 2 + P.L T ^ 2 * D.JT T)) = 2 * T * P.L T * (D.bT T * ell1 T ^ 2 + P.L T ^ 2 * D.JT T) := by - field_simp <;> ring + field_simp; ring rw [h1] have h2 : l T ^ 2 ≤ 2 * (D.bT T * ell1 T ^ 2 + P.L T ^ 2 * D.JT T) := by have : l T ^ 2 ≤ ell1 T ^ 2 := pow_le_pow_left₀ (by linarith) hℓ 2 @@ -405,7 +310,7 @@ private lemma Mstar_le : ∀ᶠ T in atTop, theorem tr2 : D.trG2 ~[atTop] mainTr2Xi P D.bT D.JT := by have hlam := h.lam_pos -- (A) the collected §5 remainder is o(M⋆) - have oA : (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumB2g T)) + have oA : (fun T => D.trG2 T - (2 * π * D.bT T * P.L T * D.intMu2 T + T / π * D.sumL2g T)) =o[atTop] Mstar P := by refine evBound_isLittleO_of_le_mul (E := fun T => 2 * (l T ^ 2 * P.X T / T)) (tr2_first h) (by simpa using (tendsto_l_sq_mul_X_div P hlam h.lam_lt_one).const_mul 2) ?_ @@ -415,7 +320,7 @@ theorem tr2 : D.trG2 ~[atTop] mainTr2Xi P D.bT D.JT := by unfold Rxi Mstar rw [show 2 * (l T ^ 2 * P.X T / T) * (T * P.L T * l T ^ 2) = P.L T * l T ^ 3 * l T * (2 * P.X T) by field_simp] - gcongr <;> linarith + gcongr; linarith -- (B) the μ-moment remainder is o(M⋆) have oB : (fun T => 2 * π * D.bT T * P.L T * (D.intMu2 T - T * ell1 T ^ 2 / (4 * π ^ 2))) =o[atTop] Mstar P := by @@ -432,11 +337,11 @@ theorem tr2 : D.trG2 ~[atTop] mainTr2Xi P D.bT D.JT := by have hl0 : 0 < l T := by linarith calc 2 * π * D.bT T * P.L T * |D.intMu2 T - T * ell1 T ^ 2 / (4 * π ^ 2)| ≤ 2 * π * 1 * P.L T * (Cμ * (T * ell1 T ^ 2 / (4 * π ^ 2) / l T ^ 2)) := by gcongr - _ = Cμ * T * P.L T * ell1 T ^ 2 / (2 * π * l T ^ 2) := by field_simp <;> ring + _ = Cμ * T * P.L T * ell1 T ^ 2 / (2 * π * l T ^ 2) := by field_simp; ring _ ≤ Cμ * T * P.L T * (4 * l T ^ 2) / (2 * π * l T ^ 2) := by gcongr - _ = (2 * Cμ / π) * (l T ^ 2)⁻¹ * Mstar P T := by unfold Mstar; field_simp <;> ring + _ = (2 * Cμ / π) * (l T ^ 2)⁻¹ * Mstar P T := by unfold Mstar; field_simp; ring -- (C) the partial-summation remainder is o(M⋆), straight from the ε-form - have oC : (fun T => T / π * (D.sumB2g T - P.L T ^ 3 / 2 * D.JT T)) =o[atTop] Mstar P := by + have oC : (fun T => T / π * (D.sumL2g T - P.L T ^ 3 / 2 * D.JT T)) =o[atTop] Mstar P := by rw [isLittleO_iff] intro c hc have hπ := Real.pi_pos @@ -444,7 +349,7 @@ theorem tr2 : D.trG2 ~[atTop] mainTr2Xi P D.bT D.JT := by Mstar_le h] with T hS hT ⟨hM0, _u0⟩ rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_pos hM0, abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ T / π)] - calc T / π * |D.sumB2g T - P.L T ^ 3 / 2 * D.JT T| ≤ T / π * (c * π * (l T ^ 2 * P.L T)) := by + calc T / π * |D.sumL2g T - P.L T ^ 3 / 2 * D.JT T| ≤ T / π * (c * π * (l T ^ 2 * P.L T)) := by gcongr _ = c * Mstar P T := by unfold Mstar; field_simp -- sum, and compare M⋆ with the main term @@ -461,7 +366,7 @@ theorem tr2 : D.trG2 ~[atTop] mainTr2Xi P D.bT D.JT := by refine key.congr' (Eventually.of_forall fun T => ?_) EventuallyEq.rfl have hπ : (π : ℝ) ≠ 0 := Real.pi_pos.ne' simp only [Pi.sub_apply, mainTr2Xi] - field_simp <;> ring + field_simp; ring private lemma nonzeros : ∀ᶠ T in atTop, T ≠ 0 ∧ P.L T ≠ 0 ∧ ell1 T ≠ 0 ∧ D.aT T ≠ 0 ∧ D.bT T * ell1 T ^ 2 + P.L T ^ 2 * D.JT T ≠ 0 ∧ T * ell1 T / (2 * π) ≠ 0 := by diff --git a/zeta23/Zeta23/XiPrime/QuarticWindow.lean b/zeta23/Zeta23/XiPrime/QuarticWindow.lean index ee89a16234..91865a75b4 100644 --- a/zeta23/Zeta23/XiPrime/QuarticWindow.lean +++ b/zeta23/Zeta23/XiPrime/QuarticWindow.lean @@ -14,9 +14,5 @@ Zeta23/XiPrime/QuarticWindow.lean — umbrella for the ξ′ quartic-window admi localHypsCoreQ_eventually QuarticWindow/Family.lean — admFamily_phiV_quartic / admFamily_atV_quartic (the AdmFamily bundle) -/ -import Zeta23.XiPrime.QuarticWindow.Params -import Zeta23.XiPrime.QuarticWindow.ModWindow -import Zeta23.XiPrime.QuarticWindow.Quartic import Zeta23.XiPrime.QuarticWindow.ZeroSide -import Zeta23.XiPrime.QuarticWindow.Moments import Zeta23.XiPrime.QuarticWindow.Family diff --git a/zeta23/Zeta23/XiPrime/QuarticWindow/Moments.lean b/zeta23/Zeta23/XiPrime/QuarticWindow/Moments.lean index 3b986f9e1d..3c1d5be4a3 100644 --- a/zeta23/Zeta23/XiPrime/QuarticWindow/Moments.lean +++ b/zeta23/Zeta23/XiPrime/QuarticWindow/Moments.lean @@ -7,18 +7,12 @@ SPDX-License-Identifier: Apache-2.0 Zeta23/XiPrime/QuarticWindow/Moments.lean — the moments of the quartic window vs their scale-free limits (consumed by the J_T limit in Zeta23/XiPrime/Window.lean). -With φ_Q := P.phiV vQuartic T (= phiM (fQ L) φ), φ_Q² = v(u/L)·φ(u)² on the core and φ differs from the sharp -cutoff 1_{[−L/2,L/2]} only on the two ramps of width w (the generic edge estimate of Zeta23/ThmD/Window.lean, -copied here since it is private there): - aV_quartic_close : |a_V − ∫v| = |L⁻¹∫φ_Q² − 2777/3000| ≤ 2w/L, - bV_quartic_close : |b_V − ∫v²| = |L⁻¹∫φ_Q⁴ − 518783/600000| ≤ 2w/L, - gV_quartic_close : |g_{φ_Q}(y) − L·vConv vQuartic (y/L)| ≤ 4w for y ∈ [0, L] (g = φ_Q² ⋆ φ_Q²), -hence b_V ≥ 1/2 (already at 8w ≤ L) and the eventual §5 LocalHypsCore for the quartic data -(localHypsCoreQ_eventually). +All generic edge/moment/autocorrelation machinery lives in `Zeta23/ThmD/ModWindow.lean`; this file +instantiates `mod_moment_close` and `autocorr_phiMsq_close` for `fQ`/`vQuartic` and exports the +Params-level bounds `aV_quartic_close`, `bV_quartic_close`, `gV_quartic_close`, and +`localHypsCoreQ_eventually`. -/ import Zeta23.XiPrime.QuarticWindow.Quartic -import Zeta23.ThmD.WindowLocalHyps -import Zeta23.PrimeSideB.Concrete noncomputable section @@ -29,455 +23,47 @@ namespace XiPrime variable {ϱ : ℝ → ℝ} {L w : ℝ} -/-! ### generic edge estimate and scaling -/ +private lemma fQ_sq_core (hL : 0 < L) {u : ℝ} (hu : u ∈ Icc (-(L / 2)) (L / 2)) : + fQ L u ^ 2 = vQuartic (u / L) := by + rw [fQ, Real.sq_sqrt (le_max_left _ _), + max_eq_right (vQuartic_pos (core_mem hL (abs_le.mpr ⟨hu.1, hu.2⟩))).le] -theorem edge_estimate {h p : ℝ → ℝ} {L w : ℝ} (_hL : 0 < L) (hw0 : 0 < w) - (hwL : 2 * w ≤ L) (hh : ∀ u, |h u| ≤ 1) (hp0 : ∀ u, 0 ≤ p u) (hp1 : ∀ u, p u ≤ 1) - (hpl : ∀ u : ℝ, |u| ≤ L/2 - w → p u = 1) (hsupp : ∀ u : ℝ, L/2 ≤ |u| → p u = 0) - (hpc : Continuous p) (hhc : Continuous h) : - |(∫ u, h u * p u) - ∫ u in Set.Icc (-(L/2)) (L/2), h u| ≤ 2 * w := by - have hrestr : ∫ u, h u * p u = ∫ u in Set.Icc (-(L/2)) (L/2), h u * p u := by - rw [MeasureTheory.setIntegral_eq_integral_of_forall_compl_eq_zero] - intro x hx - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hx - have : L / 2 ≤ |x| := by - rcases hx with hc | hc - · rw [abs_of_neg (by linarith : x < 0)]; linarith - · rw [abs_of_pos (by linarith : 0 < x)]; linarith - rw [hsupp x this, mul_zero] - have hIhp : MeasureTheory.IntegrableOn (fun u => h u * p u) (Set.Icc (-(L/2)) (L/2)) := - ((hhc.mul hpc).continuousOn).integrableOn_compact isCompact_Icc - have hIh : MeasureTheory.IntegrableOn h (Set.Icc (-(L/2)) (L/2)) := - (hhc.continuousOn).integrableOn_compact isCompact_Icc - have hsub : (∫ u, h u * p u) - ∫ u in Set.Icc (-(L/2)) (L/2), h u - = ∫ u in Set.Icc (-(L/2)) (L/2), (h u * p u - h u) := by - rw [hrestr, ← MeasureTheory.integral_sub hIhp hIh] - rw [hsub] - set maj : ℝ → ℝ := fun u => (Set.Icc (-(L/2)) (-(L/2) + w)).indicator (1 : ℝ → ℝ) u - + (Set.Icc (L/2 - w) (L/2)).indicator (1 : ℝ → ℝ) u with hmaj - have hImaj : Integrable maj := by - apply Integrable.add - · exact (MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)) - · exact (MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)) - have hind0 : ∀ (s : Set ℝ) (u : ℝ), 0 ≤ s.indicator (1 : ℝ → ℝ) u := fun s u => - Set.indicator_nonneg (fun _ _ => zero_le_one) u - have hptw : ∀ u ∈ Set.Icc (-(L/2)) (L/2), |h u * p u - h u| ≤ maj u := by - intro u hu - have hmaj0 : 0 ≤ maj u := by - rw [hmaj] - exact add_nonneg (hind0 _ u) (hind0 _ u) - rcases le_or_gt |u| (L/2 - w) with hpl' | hedge - · rw [hpl u hpl', mul_one, sub_self, abs_zero] - exact hmaj0 - · have hbound : |h u * p u - h u| ≤ 1 := by - have e : h u * p u - h u = h u * (p u - 1) := by ring - rw [e, abs_mul] - calc |h u| * |p u - 1| ≤ 1 * 1 := by - apply mul_le_mul (hh u) ?_ (abs_nonneg _) zero_le_one - rw [abs_le] - exact ⟨by linarith [hp0 u], by linarith [hp1 u]⟩ - _ = 1 := mul_one 1 - have hone : (1:ℝ) ≤ maj u := by - rw [hmaj] - show (1:ℝ) ≤ (Set.Icc (-(L/2)) (-(L/2) + w)).indicator (1 : ℝ → ℝ) u - + (Set.Icc (L/2 - w) (L/2)).indicator (1 : ℝ → ℝ) u - rcases le_or_gt u 0 with hneg | hpos - · have hu1 : u ∈ Set.Icc (-(L/2)) (-(L/2) + w) := by - refine ⟨hu.1, ?_⟩ - have habs : |u| = -u := abs_of_nonpos hneg - rw [habs] at hedge - linarith - have := hind0 (Set.Icc (L/2 - w) (L/2)) u - rw [Set.indicator_of_mem hu1, Pi.one_apply] - linarith - · have hu1 : u ∈ Set.Icc (L/2 - w) (L/2) := by - refine ⟨?_, hu.2⟩ - have habs : |u| = u := abs_of_pos hpos - rw [habs] at hedge - linarith - have := hind0 (Set.Icc (-(L/2)) (-(L/2) + w)) u - rw [Set.indicator_of_mem hu1, Pi.one_apply] - linarith - linarith - calc |∫ u in Set.Icc (-(L/2)) (L/2), (h u * p u - h u)| - ≤ ∫ u in Set.Icc (-(L/2)) (L/2), |h u * p u - h u| := - MeasureTheory.abs_integral_le_integral_abs - _ ≤ ∫ u in Set.Icc (-(L/2)) (L/2), maj u := by - apply MeasureTheory.setIntegral_mono_on - (((hhc.mul hpc).sub hhc).abs.continuousOn.integrableOn_compact isCompact_Icc) - hImaj.integrableOn measurableSet_Icc hptw - _ ≤ ∫ u, maj u := - MeasureTheory.setIntegral_le_integral hImaj - (MeasureTheory.ae_of_all _ fun u => by - rw [hmaj] - apply add_nonneg <;> exact Set.indicator_nonneg (fun _ _ => zero_le_one) u) - _ = 2 * w := by - rw [hmaj] - rw [MeasureTheory.integral_add - ((MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top))) - ((MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)))] - rw [MeasureTheory.integral_indicator_one measurableSet_Icc, - MeasureTheory.integral_indicator_one measurableSet_Icc, - MeasureTheory.measureReal_def, MeasureTheory.measureReal_def, - Real.volume_Icc, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), ENNReal.toReal_ofReal (by linarith)] - ring - -/-- substitution: ∫_{−L/2..L/2} g(u/L) du = L · ∫_{−1/2..1/2} g. -/ -theorem integral_scale {g : ℝ → ℝ} {L : ℝ} (hL : 0 < L) : - ∫ u in (-(L/2))..(L/2), g (u / L) = L * ∫ s in (-(1:ℝ)/2)..(1/2), g s := by - rw [intervalIntegral.integral_comp_div (f := g) hL.ne', smul_eq_mul, - show -(L/2) / L = -(1:ℝ)/2 by field_simp; try ring, - show L/2 / L = (1:ℝ)/2 by rw [div_div]; rw [div_eq_div_iff (by positivity) (by norm_num)]; ring] - -/-! ### φ_Q² and the profile -/ - -/-- the squared modulating factor, globally: m u := max 0 (v(u/L)) = f_Q² ∈ [0,1]. -/ -def mQ (L : ℝ) (u : ℝ) : ℝ := max 0 (vQuartic (u / L)) - -lemma mQ_nonneg (u : ℝ) : 0 ≤ mQ L u := le_max_left _ _ -lemma mQ_le_one (u : ℝ) : mQ L u ≤ 1 := max_le zero_le_one (vQuartic_le_one _) -lemma abs_mQ_le_one (u : ℝ) : |mQ L u| ≤ 1 := by rw [abs_of_nonneg (mQ_nonneg u)]; exact mQ_le_one u -lemma mQ_continuous (_hL : 0 < L) : Continuous (mQ L) := by - unfold mQ; exact continuous_const.max (continuous_vQuartic.comp (continuous_id.div_const L)) -lemma fQ_sq (u : ℝ) : fQ L u ^ 2 = mQ L u := Real.sq_sqrt (le_max_left _ _) -lemma mQ_core (hL : 0 < L) {u : ℝ} (hu : u ∈ Icc (-(L/2)) (L/2)) : mQ L u = vQuartic (u / L) := - max_eq_right (vQuartic_pos (core_mem hL (abs_le.mpr ⟨hu.1, hu.2⟩))).le - -lemma phiMQ_sq_eq (u : ℝ) : phiM (fQ L) ϱ L w u ^ 2 = mQ L u * Taper.phi ϱ L w u ^ 2 := by - rw [phiM, mul_pow, fQ_sq] - -lemma phiMQ_pow_four_eq (u : ℝ) : phiM (fQ L) ϱ L w u ^ 4 = mQ L u ^ 2 * Taper.phi ϱ L w u ^ 4 := by - have : phiM (fQ L) ϱ L w u ^ 4 = (phiM (fQ L) ϱ L w u ^ 2) ^ 2 := by ring - rw [this, phiMQ_sq_eq]; ring - -/-! ### a and b -/ +private lemma abs_vQuartic_le_one {s : ℝ} (hs : s ∈ Icc (-(1 / 2 : ℝ)) (1 / 2)) : + |vQuartic s| ≤ 1 := by + rw [abs_of_nonneg (vQuartic_pos hs).le]; exact vQuartic_le_one _ /-- |L⁻¹∫φ_Q² − ∫v| ≤ 2w/L. -/ theorem aQ_close (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : |L⁻¹ * (∫ u, phiM (fQ L) ϱ L w u ^ 2) - 2777 / 3000| ≤ 2 * w / L := by - have hw0 : 0 < w := by linarith - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - have hsub : (2777 : ℝ) / 3000 = L⁻¹ * ∫ u in Set.Icc (-(L/2)) (L/2), mQ L u := by - rw [setIntegral_congr_fun measurableSet_Icc (fun u hu => mQ_core hL hu), - MeasureTheory.integral_Icc_eq_integral_Ioc, - ← intervalIntegral.integral_of_le (by linarith : -(L/2) ≤ L/2), integral_scale hL, - integral_vQuartic] - field_simp - have hwin : ∫ u, phiM (fQ L) ϱ L w u ^ 2 = ∫ u, mQ L u * Taper.phi ϱ L w u ^ 2 := - integral_congr_ae (ae_of_all _ fun u => phiMQ_sq_eq u) - rw [hwin, hsub] - have hcore := edge_estimate (h := mQ L) (p := fun u => Taper.phi ϱ L w u ^ 2) hL hw0 hwL' - abs_mQ_le_one (fun u => sq_nonneg _) - (fun u => by - calc Taper.phi ϱ L w u ^ 2 ≤ 1 ^ 2 := pow_le_pow_left₀ (Taper.phi_nonneg hϱ u) (Taper.phi_le_one hϱ u) 2 - _ = 1 := one_pow 2) - (fun u hu => by show Taper.phi ϱ L w u ^ 2 = 1; rw [Taper.phi_eq_one hϱ hw0 hu, one_pow]) - (fun u hu => by show Taper.phi ϱ L w u ^ 2 = 0; rw [Taper.phi_eq_zero hϱ hw0 hu, zero_pow two_ne_zero]) - ((Taper.phi_continuous hϱ hw0 hwL').pow 2) (mQ_continuous hL) - have e : L⁻¹ * (∫ u, mQ L u * Taper.phi ϱ L w u ^ 2) - L⁻¹ * ∫ u in Set.Icc (-(L/2)) (L/2), mQ L u - = L⁻¹ * ((∫ u, mQ L u * Taper.phi ϱ L w u ^ 2) - ∫ u in Set.Icc (-(L/2)) (L/2), mQ L u) := by ring - rw [e, abs_mul, abs_of_pos (by positivity : (0:ℝ) < L⁻¹)] - calc L⁻¹ * |(∫ u, mQ L u * Taper.phi ϱ L w u ^ 2) - ∫ u in Set.Icc (-(L/2)) (L/2), mQ L u| - ≤ L⁻¹ * (2 * w) := mul_le_mul_of_nonneg_left hcore (by positivity) - _ = 2 * w / L := by rw [div_eq_inv_mul] + have h := mod_moment_close (f := fQ L) (v := vQuartic) (w := w) (k := 1) hϱ (by linarith) + (by linarith) one_pos (fun u hu => fQ_sq_core (by linarith) hu) continuous_vQuartic.continuousOn + (fun _ hs => abs_vQuartic_le_one hs) + simp only [mul_one, pow_one, integral_vQuartic] at h + exact h /-- |L⁻¹∫φ_Q⁴ − ∫v²| ≤ 2w/L. -/ theorem bQ_close (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) : |L⁻¹ * (∫ u, phiM (fQ L) ϱ L w u ^ 4) - 518783 / 600000| ≤ 2 * w / L := by - have hw0 : 0 < w := by linarith - have hwL' : 2 * w ≤ L := by linarith - have hL : 0 < L := by linarith - have hsub : (518783 : ℝ) / 600000 = L⁻¹ * ∫ u in Set.Icc (-(L/2)) (L/2), mQ L u ^ 2 := by - rw [setIntegral_congr_fun measurableSet_Icc (fun u hu => by show mQ L u ^ 2 = vQuartic (u / L) ^ 2; rw [mQ_core hL hu]), - MeasureTheory.integral_Icc_eq_integral_Ioc, - ← intervalIntegral.integral_of_le (by linarith : -(L/2) ≤ L/2), - integral_scale (g := fun s => vQuartic s ^ 2) hL, integral_vQuartic_sq] - field_simp - have hwin : ∫ u, phiM (fQ L) ϱ L w u ^ 4 = ∫ u, mQ L u ^ 2 * Taper.phi ϱ L w u ^ 4 := - integral_congr_ae (ae_of_all _ fun u => phiMQ_pow_four_eq u) - rw [hwin, hsub] - have hcore := edge_estimate (h := fun u => mQ L u ^ 2) (p := fun u => Taper.phi ϱ L w u ^ 4) hL hw0 hwL' - (fun u => by - rw [abs_of_nonneg (sq_nonneg _)] - calc mQ L u ^ 2 ≤ 1 ^ 2 := pow_le_pow_left₀ (mQ_nonneg u) (mQ_le_one u) 2 - _ = 1 := one_pow 2) - (fun u => by positivity) - (fun u => by - calc Taper.phi ϱ L w u ^ 4 ≤ 1 ^ 4 := pow_le_pow_left₀ (Taper.phi_nonneg hϱ u) (Taper.phi_le_one hϱ u) 4 - _ = 1 := one_pow 4) - (fun u hu => by show Taper.phi ϱ L w u ^ 4 = 1; rw [Taper.phi_eq_one hϱ hw0 hu, one_pow]) - (fun u hu => by show Taper.phi ϱ L w u ^ 4 = 0; rw [Taper.phi_eq_zero hϱ hw0 hu]; norm_num) - ((Taper.phi_continuous hϱ hw0 hwL').pow 4) ((mQ_continuous hL).pow 2) - have e : L⁻¹ * (∫ u, mQ L u ^ 2 * Taper.phi ϱ L w u ^ 4) - L⁻¹ * ∫ u in Set.Icc (-(L/2)) (L/2), mQ L u ^ 2 - = L⁻¹ * ((∫ u, mQ L u ^ 2 * Taper.phi ϱ L w u ^ 4) - ∫ u in Set.Icc (-(L/2)) (L/2), mQ L u ^ 2) := by - ring - rw [e, abs_mul, abs_of_pos (by positivity : (0:ℝ) < L⁻¹)] - calc L⁻¹ * |(∫ u, mQ L u ^ 2 * Taper.phi ϱ L w u ^ 4) - ∫ u in Set.Icc (-(L/2)) (L/2), mQ L u ^ 2| - ≤ L⁻¹ * (2 * w) := mul_le_mul_of_nonneg_left hcore (by positivity) - _ = 2 * w / L := by rw [div_eq_inv_mul] - -/-! ### the autocorrelation vs the sharp one -/ - -/-- the sharp window 1_{[−L/2,L/2]}·v(·/L). -/ -def sharpQ (L : ℝ) (u : ℝ) : ℝ := (Set.Icc (-(L/2)) (L/2)).indicator (fun u => vQuartic (u / L)) u - -theorem sharpQ_autocorr_eq (hL : 0 < L) {y : ℝ} (hy0 : 0 ≤ y) (hyL : y ≤ L) : - ∫ u, sharpQ L u * sharpQ L (u + y) = L * vConv vQuartic (y / L) := by - have hind : ∀ u : ℝ, sharpQ L u * sharpQ L (u + y) - = (Set.Icc (-(L/2)) (L/2 - y)).indicator - (fun u => vQuartic (u / L) * vQuartic ((u + y) / L)) u := by - intro u - unfold sharpQ - by_cases hu : u ∈ Set.Icc (-(L/2)) (L/2 - y) - · have hu1 : u ∈ Set.Icc (-(L/2)) (L/2) := ⟨hu.1, by linarith [hu.2]⟩ - have hu2 : u + y ∈ Set.Icc (-(L/2)) (L/2) := ⟨by linarith [hu.1], by linarith [hu.2]⟩ - rw [Set.indicator_of_mem hu, Set.indicator_of_mem hu1, Set.indicator_of_mem hu2] - · rw [Set.indicator_of_notMem hu] - rw [Set.mem_Icc, not_and_or, not_le, not_le] at hu - rcases hu with hu | hu - · rw [Set.indicator_of_notMem (s := Set.Icc (-(L/2)) (L/2)) (a := u) - (by rw [Set.mem_Icc]; push Not; intro h; linarith), zero_mul] - · rw [Set.indicator_of_notMem (s := Set.Icc (-(L/2)) (L/2)) (a := u + y) - (by rw [Set.mem_Icc]; push Not; intro h; linarith), mul_zero] - rw [MeasureTheory.integral_congr_ae (MeasureTheory.ae_of_all _ hind), - MeasureTheory.integral_indicator measurableSet_Icc, - MeasureTheory.integral_Icc_eq_integral_Ioc, - ← intervalIntegral.integral_of_le (by linarith : -(L/2) ≤ L/2 - y)] - -- substitution u = L s - have hsub := intervalIntegral.integral_comp_div (a := -(L/2)) (b := L/2 - y) - (f := fun s => vQuartic s * vQuartic (s + y / L)) hL.ne' - have e1 : -(L/2) / L = -(1:ℝ)/2 := by field_simp - have e2 : (L/2 - y) / L = 1/2 - y / L := by field_simp - rw [e1, e2, smul_eq_mul] at hsub - unfold vConv - rw [← hsub] - refine intervalIntegral.integral_congr fun u _ => ?_ - simp only [add_div] - -/-- ‖φ_Q² − sharp‖₁ ≤ 2w. -/ -theorem integral_abs_phiMQsq_sub_sharp (hϱ : TaperProfile ϱ) (hw : 0 < w) (hwL : 2 * w ≤ L) : - ∫ u, |phiM (fQ L) ϱ L w u ^ 2 - sharpQ L u| ≤ 2 * w := by - have hL : 0 < L := by linarith - set maj : ℝ → ℝ := fun u => (Set.Icc (-(L/2)) (-(L/2) + w)).indicator (1 : ℝ → ℝ) u - + (Set.Icc (L/2 - w) (L/2)).indicator (1 : ℝ → ℝ) u with hmaj - have hImaj : Integrable maj := by - apply Integrable.add <;> - exact (MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top)) - have hind0 : ∀ (s : Set ℝ) (u : ℝ), 0 ≤ s.indicator (1 : ℝ → ℝ) u := fun s u => - Set.indicator_nonneg (fun _ _ => zero_le_one) u - have hpt : ∀ u : ℝ, |phiM (fQ L) ϱ L w u ^ 2 - sharpQ L u| ≤ maj u := by - intro u - have hmaj0 : 0 ≤ maj u := by - rw [hmaj] - exact add_nonneg (hind0 _ u) (hind0 _ u) - have hval : phiM (fQ L) ϱ L w u ^ 2 = mQ L u * Taper.phi ϱ L w u ^ 2 := phiMQ_sq_eq u - rcases le_or_gt |u| (L/2 - w) with hpl | hedge - · have huIcc : u ∈ Set.Icc (-(L/2)) (L/2) := by - rw [abs_le] at hpl - constructor <;> [linarith [hpl.1]; linarith [hpl.2]] - rw [hval, Taper.phi_eq_one hϱ hw hpl, one_pow, mul_one, mQ_core hL huIcc] - unfold sharpQ - rw [Set.indicator_of_mem huIcc, sub_self, abs_zero] - exact hmaj0 - · rcases le_or_gt |u| (L/2) with hin | hout - · have hbound : |phiM (fQ L) ϱ L w u ^ 2 - sharpQ L u| ≤ 1 := by - have h1' : 0 ≤ phiM (fQ L) ϱ L w u ^ 2 := sq_nonneg _ - have h2' : phiM (fQ L) ϱ L w u ^ 2 ≤ 1 := by - rw [hval] - calc mQ L u * Taper.phi ϱ L w u ^ 2 ≤ 1 * 1 ^ 2 := - mul_le_mul (mQ_le_one u) - (pow_le_pow_left₀ (Taper.phi_nonneg hϱ u) (Taper.phi_le_one hϱ u) 2) - (sq_nonneg _) zero_le_one - _ = 1 := by norm_num - have h3' : 0 ≤ sharpQ L u := by - unfold sharpQ - apply Set.indicator_nonneg - intro x hx - exact (vQuartic_pos (core_mem hL (abs_le.mpr ⟨hx.1, hx.2⟩))).le - have h4' : sharpQ L u ≤ 1 := by - unfold sharpQ - by_cases hm : u ∈ Set.Icc (-(L/2)) (L/2) - · rw [Set.indicator_of_mem hm]; exact vQuartic_le_one _ - · rw [Set.indicator_of_notMem hm]; exact zero_le_one - rw [abs_le] - constructor <;> linarith - have hone : (1:ℝ) ≤ maj u := by - rw [hmaj] - show (1:ℝ) ≤ (Set.Icc (-(L/2)) (-(L/2) + w)).indicator (1 : ℝ → ℝ) u - + (Set.Icc (L/2 - w) (L/2)).indicator (1 : ℝ → ℝ) u - rcases le_or_gt u 0 with hneg | hpos - · have hu1 : u ∈ Set.Icc (-(L/2)) (-(L/2) + w) := by - refine ⟨?_, ?_⟩ - · have : |u| = -u := abs_of_nonpos hneg - rw [this] at hin - linarith - · have : |u| = -u := abs_of_nonpos hneg - rw [this] at hedge - linarith - have := hind0 (Set.Icc (L/2 - w) (L/2)) u - rw [Set.indicator_of_mem hu1, Pi.one_apply] - linarith - · have hu1 : u ∈ Set.Icc (L/2 - w) (L/2) := by - refine ⟨?_, ?_⟩ - · have : |u| = u := abs_of_pos hpos - rw [this] at hedge - linarith - · have : |u| = u := abs_of_pos hpos - rw [this] at hin - linarith - have := hind0 (Set.Icc (-(L/2)) (-(L/2) + w)) u - rw [Set.indicator_of_mem hu1, Pi.one_apply] - linarith - linarith - · have h1' : phiM (fQ L) ϱ L w u = 0 := phiM_eq_zero hϱ hw (le_of_lt hout) - have h2' : sharpQ L u = 0 := by - unfold sharpQ - apply Set.indicator_of_notMem - intro hm - have : |u| ≤ L / 2 := abs_le.mpr ⟨hm.1, hm.2⟩ - linarith - rw [h1', h2'] - norm_num - exact hmaj0 - calc ∫ u, |phiM (fQ L) ϱ L w u ^ 2 - sharpQ L u| - ≤ ∫ u, maj u := by - apply MeasureTheory.integral_mono_of_nonneg - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _) hImaj - (MeasureTheory.ae_of_all _ hpt) - _ = 2 * w := by - rw [hmaj] - rw [MeasureTheory.integral_add - ((MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top))) - ((MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (MeasureTheory.integrableOn_const (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top))), - MeasureTheory.integral_indicator_one measurableSet_Icc, - MeasureTheory.integral_indicator_one measurableSet_Icc, - MeasureTheory.measureReal_def, MeasureTheory.measureReal_def, - Real.volume_Icc, Real.volume_Icc, - ENNReal.toReal_ofReal (by linarith), ENNReal.toReal_ofReal (by linarith)] - ring + have h := mod_moment_close (f := fQ L) (v := vQuartic) (w := w) (k := 2) hϱ (by linarith) + (by linarith) two_pos (fun u hu => fQ_sq_core (by linarith) hu) continuous_vQuartic.continuousOn + (fun _ hs => abs_vQuartic_le_one hs) + rw [integral_vQuartic_sq] at h + exact h /-- **|g_{φ_Q}(y) − L·vConv vQuartic (y/L)| ≤ 4w for y ∈ [0, L]** (g = φ_Q² ⋆ φ_Q²). -/ theorem autocorr_phiMQsq_close (hϱ : TaperProfile ϱ) (hw : 1 ≤ w) (hwL : 8 * w ≤ L) {y : ℝ} (hy0 : 0 ≤ y) (hyL : y ≤ L) : |Params.autocorr (fun u => phiM (fQ L) ϱ L w u ^ 2) y - L * vConv vQuartic (y / L)| ≤ 4 * w := by - have hw0 : 0 < w := by linarith - have hwL' : 2 * w ≤ L := by linarith have hL : 0 < L := by linarith - have hf : ModFactor (fQ L) L (3/2) 12 := modFactor_fQ hL - set h : ℝ → ℝ := fun u => phiM (fQ L) ϱ L w u ^ 2 with hhdef - set k : ℝ → ℝ := sharpQ L with hkdef - have hh_cont : Continuous h := ((phiM_contDiff hf hϱ hw0 hwL').pow 2).continuous - have hh1 : ∀ u, |h u| ≤ 1 := by - intro u - rw [hhdef] - simp only - rw [abs_of_nonneg (sq_nonneg _)] - calc phiM (fQ L) ϱ L w u ^ 2 ≤ 1 ^ 2 := - pow_le_pow_left₀ (phiM_nonneg hf hϱ u) (phiM_le_one hf hϱ hw0 u) 2 - _ = 1 := one_pow 2 - have hk_meas : Measurable k := by - rw [hkdef] - unfold sharpQ - exact Measurable.indicator (continuous_vQuartic.comp (continuous_id.div_const L)).measurable - measurableSet_Icc - have hk1 : ∀ u, |k u| ≤ 1 := by - intro u - rw [hkdef] - unfold sharpQ - by_cases hm : u ∈ Set.Icc (-(L/2)) (L/2) - · rw [Set.indicator_of_mem hm, abs_le] - exact ⟨by linarith [(vQuartic_pos (core_mem hL (abs_le.mpr ⟨hm.1, hm.2⟩))).le], vQuartic_le_one _⟩ - · rw [Set.indicator_of_notMem hm, abs_zero] - exact zero_le_one - have hcs : HasCompactSupport h := - (phiM_hasCompactSupport (f := fQ L) hϱ (L := L) hw0).comp_left (g := fun t => t ^ 2) (by norm_num) - have hint_h : Integrable h := hh_cont.integrable_of_hasCompactSupport hcs - have hint_k : Integrable k := by - rw [hkdef] - unfold sharpQ - exact (MeasureTheory.integrable_indicator_iff measurableSet_Icc).mpr - (((continuous_vQuartic.comp (continuous_id.div_const L)).continuousOn).integrableOn_compact - isCompact_Icc) - have hint_d : Integrable (fun u => h u - k u) := hint_h.sub hint_k - have hint_hy : Integrable (fun u => h (u + y)) := hint_h.comp_add_right y - have hint_ky : Integrable (fun u => k (u + y)) := hint_k.comp_add_right y - have hint_dy : Integrable (fun u => h (u + y) - k (u + y)) := hint_hy.sub hint_ky - have hmeas_hy : MeasureTheory.AEStronglyMeasurable (fun u => h (u + y)) MeasureTheory.volume := - hint_hy.aestronglyMeasurable - have hint_p1 : Integrable (fun u => (h u - k u) * h (u + y)) := by - have := hint_d.bdd_mul (c := 1) hmeas_hy (MeasureTheory.ae_of_all _ fun u => by - rw [Real.norm_eq_abs] - exact hh1 (u + y)) - exact this.congr (MeasureTheory.ae_of_all _ fun u => by ring) - have hint_p2 : Integrable (fun u => k u * (h (u + y) - k (u + y))) := by - exact hint_dy.bdd_mul (c := 1) hk_meas.aestronglyMeasurable (MeasureTheory.ae_of_all _ fun u => by - rw [Real.norm_eq_abs] - exact hk1 u) - have hint_hh : Integrable (fun u => h u * h (u + y)) := by - have := hint_h.bdd_mul (c := 1) hmeas_hy (MeasureTheory.ae_of_all _ fun u => by - rw [Real.norm_eq_abs] - exact hh1 (u + y)) - exact this.congr (MeasureTheory.ae_of_all _ fun u => by ring) - have hint_kk : Integrable (fun u => k u * k (u + y)) := by - exact hint_ky.bdd_mul (c := 1) hk_meas.aestronglyMeasurable (MeasureTheory.ae_of_all _ fun u => by - rw [Real.norm_eq_abs] - exact hk1 u) - have hCk : ∫ u, k u * k (u + y) = L * vConv vQuartic (y / L) := sharpQ_autocorr_eq hL hy0 hyL - have hdecomp : Params.autocorr h y - L * vConv vQuartic (y / L) - = (∫ u, (h u - k u) * h (u + y)) + ∫ u, k u * (h (u + y) - k (u + y)) := by - have e1 : Params.autocorr h y - L * vConv vQuartic (y / L) - = ∫ u, (h u * h (u + y) - k u * k (u + y)) := by - rw [show Params.autocorr h y = ∫ u, h u * h (u + y) from rfl, ← hCk, - MeasureTheory.integral_sub hint_hh hint_kk] - rw [e1, ← MeasureTheory.integral_add hint_p1 hint_p2] - apply MeasureTheory.integral_congr_ae - apply MeasureTheory.ae_of_all - intro u - ring - have hd2w := integral_abs_phiMQsq_sub_sharp (L := L) hϱ hw0 hwL' - have hint_dabs : Integrable (fun u => |h u - k u|) := hint_d.abs - have hb1 : |∫ u, (h u - k u) * h (u + y)| ≤ 2 * w := by - calc |∫ u, (h u - k u) * h (u + y)| ≤ ∫ u, |(h u - k u) * h (u + y)| := - MeasureTheory.abs_integral_le_integral_abs - _ ≤ ∫ u, |h u - k u| := by - apply MeasureTheory.integral_mono_of_nonneg - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _) hint_dabs - (MeasureTheory.ae_of_all _ fun u => ?_) - show |(h u - k u) * h (u + y)| ≤ |h u - k u| - rw [abs_mul] - calc |h u - k u| * |h (u + y)| ≤ |h u - k u| * 1 := - mul_le_mul_of_nonneg_left (hh1 (u + y)) (abs_nonneg _) - _ = |h u - k u| := mul_one _ - _ ≤ 2 * w := hd2w - have hb2 : |∫ u, k u * (h (u + y) - k (u + y))| ≤ 2 * w := by - have htrans : ∫ u, |h (u + y) - k (u + y)| = ∫ u, |h u - k u| := - MeasureTheory.integral_add_right_eq_self (fun u => |h u - k u|) y - calc |∫ u, k u * (h (u + y) - k (u + y))| - ≤ ∫ u, |k u * (h (u + y) - k (u + y))| := MeasureTheory.abs_integral_le_integral_abs - _ ≤ ∫ u, |h (u + y) - k (u + y)| := by - apply MeasureTheory.integral_mono_of_nonneg - (MeasureTheory.ae_of_all _ fun u => abs_nonneg _) (hint_dy.abs) - (MeasureTheory.ae_of_all _ fun u => ?_) - show |k u * (h (u + y) - k (u + y))| ≤ |h (u + y) - k (u + y)| - rw [abs_mul] - calc |k u| * |h (u + y) - k (u + y)| ≤ 1 * |h (u + y) - k (u + y)| := - mul_le_mul_of_nonneg_right (hk1 u) (abs_nonneg _) - _ = _ := one_mul _ - _ = ∫ u, |h u - k u| := htrans - _ ≤ 2 * w := hd2w - calc |Params.autocorr h y - L * vConv vQuartic (y / L)| - = |(∫ u, (h u - k u) * h (u + y)) + ∫ u, k u * (h (u + y) - k (u + y))| := by rw [hdecomp] - _ ≤ |∫ u, (h u - k u) * h (u + y)| + |∫ u, k u * (h (u + y) - k (u + y))| := abs_add_le _ _ - _ ≤ 4 * w := by linarith + refine autocorr_phiMsq_close (modFactor_fQ hL) hϱ (by linarith) (by linarith) + (fun u hu => fQ_sq_core hL hu) continuous_vQuartic (fun _ hs => (vQuartic_pos hs).le) + (fun _ _ => vQuartic_le_one _) hy0 hyL ?_ + have hsub := intervalIntegral.integral_comp_div (a := -(L / 2)) (b := L / 2 - y) + (f := fun s => vQuartic s * vQuartic (s + y / L)) hL.ne' + rw [show -(L / 2) / L = -(1 : ℝ) / 2 by field_simp, + show (L / 2 - y) / L = 1 / 2 - y / L by field_simp, smul_eq_mul] at hsub + rw [vConv, ← hsub] + exact intervalIntegral.integral_congr fun u _ => by simp only [add_div] /-! ### Params-level exports -/ @@ -500,12 +86,12 @@ theorem bV_quartic_ge_half (hP : P.Valid) {T : ℝ} (hwL : 8 * P.w ≤ P.L T) : linarith [(abs_le.mp h).1] theorem gV_quartic_close_at (hP : P.Valid) {T : ℝ} (hwL : 8 * P.w ≤ P.L T) {y : ℝ} - (hy : y ∈ Icc (0:ℝ) (P.L T)) : + (hy : y ∈ Icc (0 : ℝ) (P.L T)) : |AdmWindow.gv (P.phiV vQuartic T) y - P.L T * vConv vQuartic (y / P.L T)| ≤ 4 * P.w := by rw [phiV_quartic_eq]; exact autocorr_phiMQsq_close hP.taper hP.one_le_w hwL hy.1 hy.2 theorem gV_quartic_close (hP : P.Valid) : - ∀ᶠ T in atTop, ∀ y ∈ Icc (0:ℝ) (P.L T), + ∀ᶠ T in atTop, ∀ y ∈ Icc (0 : ℝ) (P.L T), |AdmWindow.gv (P.phiV vQuartic T) y - P.L T * vConv vQuartic (y / P.L T)| ≤ 4 * P.w := by filter_upwards [Params.eventually_w8 hP] with T h8 y hy exact gV_quartic_close_at hP h8 hy diff --git a/zeta23/Zeta23/XiPrime/QuarticWindow/Params.lean b/zeta23/Zeta23/XiPrime/QuarticWindow/Params.lean index 23d868be19..e1ee462d13 100644 --- a/zeta23/Zeta23/XiPrime/QuarticWindow/Params.lean +++ b/zeta23/Zeta23/XiPrime/QuarticWindow/Params.lean @@ -83,15 +83,6 @@ theorem atV_phiHatR (hP : P.Valid) (hv : ∀ s, v (-s) = v s) : show AdmWindow.vHatR ((P.atV v T).phi T) = _ rw [atV_phi_valid T hP hv] -/-- the prime-side traces of `P.atV v T` at height T are the abstract-layer traces of the φ_v data. -/ -theorem atV_trGtilde (hP : P.Valid) (hv : ∀ s, v (-s) = v s) : - (P.atV v T).trGtilde T = PrimeSide.trGtA (P.toSetting T) (AdmWindow.localFun (P.phiV v T) (P.L T)) := by - rw [← PrimeSide.trGtA_concrete (P.atV v T) T, atV_localFun T hP hv]; rfl - -theorem atV_trGtildeSq (hP : P.Valid) (hv : ∀ s, v (-s) = v s) : - (P.atV v T).trGtildeSq T = PrimeSide.trGt2A (P.toSetting T) (AdmWindow.localFun (P.phiV v T) (P.L T)) := by - rw [← PrimeSide.trGt2A_concrete (P.atV v T) T, atV_localFun T hP hv]; rfl - /-! ### eventual side conditions shared by the QuarticWindow files -/ /-- L_T → ∞ (valid parameters). -/ diff --git a/zeta23/Zeta23/XiPrime/QuarticWindow/Quartic.lean b/zeta23/Zeta23/XiPrime/QuarticWindow/Quartic.lean index 4af6899969..d345222539 100644 --- a/zeta23/Zeta23/XiPrime/QuarticWindow/Quartic.lean +++ b/zeta23/Zeta23/XiPrime/QuarticWindow/Quartic.lean @@ -14,7 +14,7 @@ f_Q″ = (h″ − 2f_Q′²)/(2f_Q) (differentiate f_Q·f_Q = h twice) give |f_ |f_Q″| ≤ (5/8)(64/5 + 2·(3/2)²)/L² < 12/L². Smoothness: vQuartic > 0 on |s| < 3/5, so f_Q = √∘vQuartic∘(·/L) is C^∞ on |u| < (3/5)L ⊇ [−L/2, L/2] + margin L/10. -/ -import Zeta23.XiPrime.QuarticWindow.ModWindow +import Zeta23.ThmD.ModWindow import Zeta23.XiPrime.QuarticWindow.Params import Zeta23.XiPrime.Certificate.Poly diff --git a/zeta23/Zeta23/XiPrime/QuarticWindow/ZeroSide.lean b/zeta23/Zeta23/XiPrime/QuarticWindow/ZeroSide.lean index df7fe234ca..698cb0d0b7 100644 --- a/zeta23/Zeta23/XiPrime/QuarticWindow/ZeroSide.lean +++ b/zeta23/Zeta23/XiPrime/QuarticWindow/ZeroSide.lean @@ -15,9 +15,6 @@ count only) and the bundle -/ import Zeta23.XiPrime.QuarticWindow.Quartic import Zeta23.XiPrime.Assembly -import Zeta23.ZeroSide -import Zeta23.Tail -import Zeta23.Hypotheses.GzGp noncomputable section @@ -50,21 +47,8 @@ theorem poissonSqV_of {T : ℝ} (h8 : 8 * P.w ≤ P.L T) : ZeroSide.PoissonSq T convert h using 1 ring -theorem blockInputsV_of' (Z : ZeroConfig) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) (haT : 0 < (P.atV v T).a T) : - Assembly.BlockInputs Z (P.atV v T) T := by - have hL : 0 < P.L T := by linarith [hP.one_le_w] - exact ZeroSide.blockInputsAt Z (P.atV v T) T (fun z => GzGp.phiHat_conj _ T z) - (fun r => GzGp.phiHat_ofReal _ T r) (poissonSqV_of hP hv hW h8) hL (mul_pos haT (pow_pos hL 2)) - /-! ### the H-EF bridge -/ -theorem GzGpV_of' (Z : ZeroConfig) (hEF : ExplicitFormulaPaper Z) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) : - Z.Gz (P.atV v T) T = (P.atV v T).Gp T := by - have hL : 0 < P.L T := by linarith [hP.one_le_w] - refine Z.Gz_eq_Gp (P.atV v T) T hEF hL ?_ ?_ - · rw [Params.atV_phi_valid T hP hv]; exact (hW T h8).vC_contDiff - · rw [Params.atV_phi_valid T hP hv]; exact closure_minimal (hW T h8).support_subset isClosed_Icc - /-! ### prop:tail -/ omit hP hv hW in @@ -79,29 +63,20 @@ lemma C1Vv_le {T : ℝ} (h8 : 8 * P.w ≤ P.L T) : ∫ u, |deriv (deriv (P.phiV theorem hdecayV_of {T : ℝ} (h8 : 8 * P.w ≤ P.L T) (r y : ℝ) (hy : |y| ≤ 1 / 2) (hz : (r : ℂ) - I * y ≠ 0) : ‖(P.atV v T).phiHat T (r - I * y)‖ ≤ Real.exp ((P.atV v T).L T / 4) * (∫ u, |deriv (deriv (P.phiV v T)) u|) / ‖(r : ℂ) - I * y‖ ^ 2 := by - have hL : 0 ≤ P.L T := (hW T h8).L_pos.le - rw [Params.atV_phiHat T hP hv, Params.atV_L, le_div_iff₀ (by positivity)] - refine le_trans ((hW T h8).norm_vHat_mul_sq_le _) ?_ - gcongr - have him : ((r : ℂ) - I * y).im = -y := by simp - rw [him, abs_neg] - nlinarith + rw [Params.atV_phiHat T hP hv, Params.atV_L] + exact (hW T h8).norm_vHat_sub_I_mul_le r y hy hz include ha in theorem eventually_tailPackageV_of (Z : ZeroConfig) {A₀ : ℝ} (hA₀ : 1 ≤ A₀) (hloc : ∀ t : ℝ, (Z.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) : ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z (P.atV v T) T (θ₀ T)) ∧ - ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := by - refine ⟨fun T => Tail.theta0 A₀ (Real.exp (P.L T / 4) * ∫ u, |deriv (deriv (P.phiV v T)) u|) T, ?_, ?_⟩ - · have hL2 : ∀ᶠ T in atTop, 2 ≤ P.L T := (Params.tendsto_L_of_valid hP).eventually_ge_atTop 2 - filter_upwards [eventually_ge_atTop Tail.T₀, hL2, Params.eventually_w8 hP, ha] with T hT hL h8 haT - have HT : Tail.TailHyp Z (P.atV v T) T A₀ (∫ u, |deriv (deriv (P.phiV v T)) u|) := - { hT := hT, hL := hL, hA₀ := hA₀, hloc := hloc, hC₁ := C1Vv_nonneg P v T, - hdecay := fun r y hy hz => hdecayV_of hP hv hW h8 r y hy hz } - have ha' : 0 < (P.atV v T).a T := by linarith - exact HT.tailInputs ha' (fun z => GzGp.phiHat_conj _ T z) - · exact Tail.eventually_theta0_le P hP hA₀ (fun T => ∫ u, |deriv (deriv (P.phiV v T)) u|) - (C1Vv_nonneg P v) (R := cW / 2) ((Params.eventually_w8 hP).mono fun T h8 => by linarith [C1Vv_le hP hW h8]) + ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := + Tail.eventually_tailPackage_of Z hP (P.atV v) (fun _ => rfl) hA₀ hloc + (fun T => ∫ u, |deriv (deriv (P.phiV v T)) u|) (C1Vv_nonneg P v) (R := cW / 2) + ((Params.eventually_w8 hP).mono fun T h8 => by linarith [C1Vv_le hP hW h8]) + ((Params.eventually_w8 hP).mono fun T h8 r y hy hz => hdecayV_of hP hv hW h8 r y hy hz) + (ha.mono fun _ h => by linarith) + (Eventually.of_forall fun T z => GzGp.phiHat_conj _ T z) /-! ### The generic bundle -/ @@ -122,14 +97,6 @@ theorem atVQ_a_eq_av (hP : P.Valid) (T : ℝ) : (P.atV vQuartic T).a T = AdmWindow.av (P.phiV vQuartic T) (P.L T) := Params.atV_a T hP vQuartic_even -theorem atVQ_phiHat (hP : P.Valid) (T : ℝ) : - (P.atV vQuartic T).phiHat T = AdmWindow.vHat (P.phiV vQuartic T) := - Params.atV_phiHat T hP vQuartic_even - -theorem atVQ_phiHatR (hP : P.Valid) (T : ℝ) : - (P.atV vQuartic T).phiHatR T = AdmWindow.vHatR (P.phiV vQuartic T) := - Params.atV_phiHatR T hP vQuartic_even - /-! ### 1/2 ≤ a_V ≤ 1 -/ /-- φ_Q² ≥ (27/40)·φ² pointwise (on the core v ≥ 27/40; off it both vanish). -/ @@ -145,7 +112,16 @@ lemma phiV_quartic_sq_ge (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) (u : rw [Real.sq_sqrt (le_max_left _ _), max_eq_right (by linarith)] exact mul_le_mul_of_nonneg_right hv (sq_nonneg _) -set_option maxHeartbeats 1600000 in +private lemma integral_phi_sq_le_phiV_quartic (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) + (hint : Integrable (fun u => P.phiV vQuartic T u ^ 2)) : + 27 / 40 * ∫ u, P.phi T u ^ 2 ≤ ∫ u, P.phiV vQuartic T u ^ 2 := by + have hcs : HasCompactSupport (fun u => P.phi T u ^ 2) := + (Params.phi_hasCompactSupport hP).comp_left (g := fun t => t ^ 2) (by norm_num) + have hint' : Integrable (fun u => 27 / 40 * P.phi T u ^ 2) := + (((Params.phi_continuous hP h8).pow 2).integrable_of_hasCompactSupport hcs).const_mul _ + rw [← integral_const_mul] + exact integral_mono hint' hint (phiV_quartic_sq_ge hP h8) + theorem aV_range_of (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) : 1 / 2 ≤ (P.atV vQuartic T).a T ∧ (P.atV vQuartic T).a T ≤ 1 := by have hW := admWindow_phiV_quartic hP h8 @@ -153,26 +129,21 @@ theorem aV_range_of (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) : refine ⟨?_, hW.av_le_one⟩ have hw0 : 0 < P.w := by linarith [hP.one_le_w] have h2 : 2 * P.w ≤ P.L T := by linarith - have hL : 0 < P.L T := by linarith [hP.one_le_w] - -- av ≥ (27/40)·aConst ≥ (27/40)(1 − 2w/L) ≥ (27/40)(3/4) - have hb : 1 - 2 * P.w / P.L T ≤ P.a T := + have hL : 0 < P.L T := by linarith + have hb : 1 - 2 * P.w / P.L T ≤ Taper.aConst P.ϱ (P.L T) P.w := (Taper.one_sub_le_bConst hP.taper hw0 h2).trans (Taper.bConst_le_aConst hP.taper hw0 h2) have hwL : 2 * P.w / P.L T ≤ 1 / 4 := by rw [div_le_iff₀ hL]; linarith - have hint : Integrable (fun u => P.phiV vQuartic T u ^ 2) := hW.integrable_pow two_pos - have hint' : Integrable (fun u => 27 / 40 * P.phi T u ^ 2) := - ((Params.phi_continuous hP (by linarith)).fun_pow 2 |>.integrable_of_hasCompactSupport - ((Params.phi_hasCompactSupport hP).comp_left (g := fun t => t ^ 2) (by norm_num))).const_mul _ - have hcmp : 27 / 40 * ∫ u, P.phi T u ^ 2 ≤ ∫ u, P.phiV vQuartic T u ^ 2 := by - rw [← integral_const_mul] - exact integral_mono hint' hint (phiV_quartic_sq_ge hP h8) - have ha : P.a T = (P.L T)⁻¹ * ∫ u, P.phi T u ^ 2 := rfl - unfold AdmWindow.av - rw [ha] at hb - have hLi : 0 < (P.L T)⁻¹ := inv_pos.mpr hL - calc (1:ℝ) / 2 ≤ 27 / 40 * (1 - 2 * P.w / P.L T) := by nlinarith - _ ≤ 27 / 40 * ((P.L T)⁻¹ * ∫ u, P.phi T u ^ 2) := by gcongr - _ = (P.L T)⁻¹ * (27 / 40 * ∫ u, P.phi T u ^ 2) := by ring - _ ≤ (P.L T)⁻¹ * ∫ u, P.phiV vQuartic T u ^ 2 := mul_le_mul_of_nonneg_left hcmp hLi.le + have hcmp := integral_phi_sq_le_phiV_quartic hP h8 (hW.integrable_pow two_pos) + have ha : Taper.aConst P.ϱ (P.L T) P.w = (P.L T)⁻¹ * ∫ u, P.phi T u ^ 2 := by + rw [Taper.aConst] + simp only [Params.phi_eq] + have h1 : (1 : ℝ) / 2 ≤ 27 / 40 * (1 - 2 * P.w / P.L T) := by linarith + have h2' : 27 / 40 * (1 - 2 * P.w / P.L T) ≤ 27 / 40 * ((P.L T)⁻¹ * ∫ u, P.phi T u ^ 2) := by + rw [← ha]; exact mul_le_mul_of_nonneg_left hb (by norm_num) + have h3 : 27 / 40 * ((P.L T)⁻¹ * ∫ u, P.phi T u ^ 2) ≤ AdmWindow.av (P.phiV vQuartic T) (P.L T) := by + rw [AdmWindow.av, mul_left_comm] + exact mul_le_mul_of_nonneg_left hcmp (inv_nonneg.mpr hL.le) + exact h1.trans (h2'.trans h3) theorem eventually_aV_range (hP : P.Valid) : ∀ᶠ T in atTop, 1 / 2 ≤ (P.atV vQuartic T).a T ∧ (P.atV vQuartic T).a T ≤ 1 := by @@ -181,34 +152,6 @@ theorem eventually_aV_range (hP : P.Valid) : /-! ### the quartic exports (instances of §1) -/ -theorem poissonSqV (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) : ZeroSide.PoissonSq T (P.atV vQuartic T) := - poissonSqV_of hP vQuartic_even (fun _ h => admWindow_phiV_quartic hP h) h8 - -theorem blockInputsV_of (Z : ZeroConfig) (hP : P.Valid) {T : ℝ} (h8 : 8 * P.w ≤ P.L T) : - Assembly.BlockInputs Z (P.atV vQuartic T) T := - blockInputsV_of' hP vQuartic_even (fun _ h => admWindow_phiV_quartic hP h) Z h8 (by linarith [(aV_range_of hP h8).1]) - -theorem eventually_blockInputsV (Z : ZeroConfig) (hP : P.Valid) : - ∀ᶠ T in atTop, Assembly.BlockInputs Z (P.atV vQuartic T) T := by - filter_upwards [Params.eventually_w8 hP] with T h8 - exact blockInputsV_of Z hP h8 - -theorem GzGpV_of (Z : ZeroConfig) (hEF : ExplicitFormulaPaper Z) (hP : P.Valid) {T : ℝ} - (h8 : 8 * P.w ≤ P.L T) : Z.Gz (P.atV vQuartic T) T = (P.atV vQuartic T).Gp T := - GzGpV_of' hP vQuartic_even (fun _ h => admWindow_phiV_quartic hP h) Z hEF h8 - -theorem eventually_GzGpV (Z : ZeroConfig) (hEF : ExplicitFormulaPaper Z) (hP : P.Valid) : - ∀ᶠ T in atTop, Z.Gz (P.atV vQuartic T) T = (P.atV vQuartic T).Gp T := by - filter_upwards [Params.eventually_w8 hP] with T h8 - exact GzGpV_of Z hEF hP h8 - -theorem eventually_tailPackageV (Z : ZeroConfig) {A₀ : ℝ} (hA₀ : 1 ≤ A₀) - (hloc : ∀ t : ℝ, (Z.N t (t + 1) : ℝ) ≤ A₀ * Real.log (|t| + 3)) (hP : P.Valid) : - ∃ θ₀ : ℝ → ℝ, (∀ᶠ T in atTop, Assembly.TailInputs Z (P.atV vQuartic T) T (θ₀ T)) ∧ - ∃ C : ℝ, ∀ᶠ T in atTop, θ₀ T ≤ C * l T * T ^ (P.lam / 2 - 1) := - eventually_tailPackageV_of hP vQuartic_even (fun _ h => admWindow_phiV_quartic hP h) - ((eventually_aV_range hP).mono fun _ h => h.1) Z hA₀ hloc - /-- **The quartic window's zero side.** -/ theorem windowZeroSide_atV (Z : ZeroConfig) (hR : RiemannVonMangoldt Z) (hP : P.Valid) : WindowZeroSide Z P (P.atV vQuartic) := diff --git a/zeta23/Zeta23/XiPrime/Seam.lean b/zeta23/Zeta23/XiPrime/Seam.lean index f3cf3101f9..16e17a6773 100644 --- a/zeta23/Zeta23/XiPrime/Seam.lean +++ b/zeta23/Zeta23/XiPrime/Seam.lean @@ -21,12 +21,9 @@ ZeroCount/** and ExplicitFormula/** consume: analytic on Re s > 0, same zeros and orders as ξ′ there, polynomial growth). -/ import Zeta23.XiPrime.Statement -import Zeta23.ZetaReflect import Zeta23.RvM.Fold import Zeta23.RvM.GammaSide -import Zeta23.RvM.CountByIntegral import Zeta23.WeilEF.Effective -import Zeta23.Analytic.RectangleLogDeriv import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.Analysis.Calculus.Deriv.Shift @@ -40,8 +37,6 @@ namespace XiPrime /-! ### §1. ξ against Γℝ·ζ; reflection symmetries of ξ and ξ′ [XF′ (F1)] -/ -theorem xi_eq_weilXi' : xi = Zeta23.WeilEF.xi := rfl - theorem xi_two : xi 2 = (Real.pi : ℂ) / 6 := Zeta23.WeilEF.xi_two theorem xi_one : xi 1 = 1 / 2 := by simp [xi] @@ -164,12 +159,9 @@ theorem exists_xiDeriv_ne_zero : ∃ z : ℂ, xiDeriv z ≠ 0 := by by_contra! h exact analyticOrderAt_xiDeriv_ne_top 0 (analyticOrderAt_eq_top.mpr (Eventually.of_forall h)) -/-- analyticOrderNatAt ξ′ = xiDerivMult (definitional). -/ -theorem analyticOrderNatAt_xiDeriv (ρ : ℂ) : analyticOrderNatAt xiDeriv ρ = xiDerivMult ρ := rfl - theorem xiDerivMult_cast (ρ : ℂ) : (xiDerivMult ρ : ℕ∞) = analyticOrderAt xiDeriv ρ := by unfold xiDerivMult - exact ENat.coe_toNat (analyticOrderAt_xiDeriv_ne_top ρ) + exact ENat.natCast_toNat (analyticOrderAt_xiDeriv_ne_top ρ) /-- 1 ≤ m_{ρ} ↔ ξ′(ρ) = 0. -/ theorem one_le_xiDerivMult_iff (ρ : ℂ) : 1 ≤ xiDerivMult ρ ↔ xiDeriv ρ = 0 := by @@ -186,10 +178,6 @@ theorem one_le_xiDerivMult_iff (ρ : ℂ) : 1 ≤ xiDerivMult ρ ↔ xiDeriv ρ by_contra hlt exact (h0.mp (by omega)) h -theorem xiDerivMult_eq_zero_iff (ρ : ℂ) : xiDerivMult ρ = 0 ↔ xiDeriv ρ ≠ 0 := by - rw [← (xiDeriv_analyticAt ρ).analyticOrderAt_eq_zero, ← xiDerivMult_cast] - norm_cast - /-- the analytic order of ξ′ is invariant under s ↦ 1 − s … -/ theorem analyticOrderAt_xiDeriv_one_sub (w : ℂ) : analyticOrderAt xiDeriv (1 - w) = analyticOrderAt xiDeriv w := by @@ -267,7 +255,6 @@ theorem xiDerivSeam_of_strip (hF2 : XiDerivZerosInStrip) : XiDerivSeam where mult_reflect := fun ρ _ => xiDerivMult_reflect ρ finite_window := finite_window_of_strip hF2 - /-! ### §3. h, L = h′/h, and Y = ξ′/Γℝ [XF′ §0, Lemma 2.1] h(s) := s(s−1)/2 · Γℝ(s) (so ξ = h·ζ on Re s > 0, s ≠ 1), L := h′/h = Γℝ′/Γℝ + 1/s + 1/(s−1) @@ -355,14 +342,6 @@ theorem analyticOrderNatAt_Yfn {s : ℂ} (hs : 0 < s.re) : analyticOrderNatAt Yf unfold analyticOrderNatAt xiDerivMult rw [analyticOrderAt_Yfn hs] -/-- Y(s̄) = conj Y(s). -/ -theorem Yfn_conj (s : ℂ) : Yfn (conj s) = conj (Yfn s) := by - unfold Yfn - rw [xiDeriv_conj, Zeta23.RvM.Gammaℝ_conj, map_div₀] - -theorem norm_Yfn_conj (s : ℂ) : ‖Yfn (conj s)‖ = ‖Yfn s‖ := by - rw [Yfn_conj, Complex.norm_conj] - /-- logDeriv ξ′ = Γℝ′/Γℝ + Y′/Y on Re s > 0 wherever ξ′ ≠ 0. -/ theorem logDeriv_xiDeriv_eq {s : ℂ} (hs : 0 < s.re) (hne : xiDeriv s ≠ 0) : logDeriv xiDeriv s = logDeriv Gammaℝ s + logDeriv Yfn s := by @@ -411,21 +390,5 @@ theorem Yfn_eq_factor {s : ℂ} (hs : 0 < s.re) (hs1 : s ≠ 1) (hζ : riemannZe have hG := Gammaℝ_ne_zero_of_re_pos hs field_simp -/-- in the open strip the zeros of ξ are the zeros of ζ (Statement §1's sanity Prop). -/ -theorem xiZerosAreZetaZeros : XiZerosAreZetaZeros := by - intro s h0 h1 - have hs1 : s ≠ 1 := fun h => by rw [h] at h1; simp at h1 - have hs0 : s ≠ 0 := fun h => by simp [h] at h0 - rw [xi_eq_Gammaℝ_mul_zeta h0 hs1] - have hA : s * (s - 1) / 2 ≠ 0 := - div_ne_zero (mul_ne_zero hs0 (sub_ne_zero.mpr hs1)) two_ne_zero - have hG := Gammaℝ_ne_zero_of_re_pos h0 - constructor - · intro h - have h2 := (mul_eq_zero.mp h).resolve_left hA - exact (mul_eq_zero.mp h2).resolve_left hG - · intro h - rw [h, mul_zero, mul_zero] - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Statement.lean b/zeta23/Zeta23/XiPrime/Statement.lean index b1339c09f5..adc291d231 100644 --- a/zeta23/Zeta23/XiPrime/Statement.lean +++ b/zeta23/Zeta23/XiPrime/Statement.lean @@ -26,6 +26,7 @@ Definitions and named propositions only. Layout: §6 the Z′ (Hardy) layer: hypotheses + headline Props [XF′ §9]. -/ import Zeta23.XiPrime.Defs +import Zeta23.Defs.Counting import Zeta23.Hypotheses import Zeta23.PrimeSideTemp import Zeta23.LinAlg @@ -68,11 +69,6 @@ theorem xi_one_sub (s : ℂ) : xi (1 - s) = xi s := by theorem xiDeriv_differentiable : Differentiable ℂ xiDeriv := fun z => ((xi_differentiable.analyticAt z).deriv).differentiableAt -/-- In the open strip, the zeros of ξ are exactly the nontrivial zeros of ζ (sanity; s(s−1)/2 ≠ 0 and -Γℝ(s) ≠ 0 there). Stated here as a Prop. -/ -def XiZerosAreZetaZeros : Prop := - ∀ s : ℂ, 0 < s.re → s.re < 1 → (xi s = 0 ↔ riemannZeta s = 0) - /-! ## §2. The zeros of ξ′ as an abstract ZeroConfig [XF′ (F1)–(F3)] -/ /-- **(F2)** [XF′ §1]: "all zeros of ξ′ lie in 0 < Re s < 1" (Re ξ′/ξ(s) = Σ_ρ Re 1/(s−ρ) > 0 for Re s ≥ 1 @@ -90,23 +86,13 @@ XiPrime/Seam.lean. one_le_mult: ξ′ is entire and not identically zero the level of analyticOrderAt. finite_window: zeros of an entire function ≢ 0 are isolated, and the zeros of ξ′ are confined to a bounded vertical strip |Re s − ½| ≤ R₀ (for Re s ≥ R₀+½: Re L(s) > A(Re s) ≥ |A(s)|, the cheap half of (F2); then (F1)) — so each height window meets a compact set. -/ -structure XiDerivSeam : Prop where - one_le_mult : ∀ ρ, IsXiDerivZero ρ → 1 ≤ xiDerivMult ρ - reflect_zero : ∀ ρ, IsXiDerivZero ρ → IsXiDerivZero (reflect ρ) - mult_reflect : ∀ ρ, IsXiDerivZero ρ → xiDerivMult (reflect ρ) = xiDerivMult ρ - finite_window : ∀ T₁ T₂ : ℝ, ({ρ | IsXiDerivZero ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂}).Finite +abbrev XiDerivSeam : Prop := ZeroSeam IsXiDerivZero xiDerivMult /-- The zeros of ξ′ with their multiplicities as an Zeta23.ZeroConfig: carrier := {ρ | ξ′ ρ = 0} EXACTLY (all zeros), mult := xiDerivMult EXACTLY. Takes (F2) and the seam facts as arguments; every downstream theorem therefore displays them in its type until XiPrime/Final.lean supplies the theorems. -/ -def xiDerivZeros (hF2 : XiDerivZerosInStrip) (hs : XiDerivSeam) : ZeroConfig where - carrier := {ρ | IsXiDerivZero ρ} - mult := xiDerivMult - one_le_mult := hs.one_le_mult - strip := fun _ h => ⟨(hF2 _ h).1.le, (hF2 _ h).2.le⟩ - reflect_mem := hs.reflect_zero - mult_reflect := hs.mult_reflect - finite_window := hs.finite_window +def xiDerivZeros (hF2 : XiDerivZerosInStrip) (hs : XiDerivSeam) : ZeroConfig := + hs.toZeroConfig fun _ h => ⟨(hF2 _ h).1.le, (hF2 _ h).2.le⟩ section seam_rfl variable (hF2 : XiDerivZerosInStrip) (hs : XiDerivSeam) (T₁ T₂ : ℝ) @@ -177,10 +163,6 @@ def xiCoeffFamily : CoeffFamily := ⟨fun T N => xiCoeff (LT T) N, D1⟩ /-- the Z′ coefficient family: C(N; ½ l) (REAL parameter, no phase), same density D₁ [XF′ §9.3(ii)]. -/ def wCoeffFamily : CoeffFamily := ⟨fun T N => xiCoeff ((l T / 2 : ℝ) : ℂ) N, D1⟩ -/-- Sanity obligation for the tsum inside Defs.D1 (junk-zero guard): the series defining D₁ converges -for every real s (factorial decay). -/ -def D1Summable : Prop := ∀ s : ℝ, Summable (fun k : ℕ => D1coeff k * s ^ (2 * k + 3)) - /-! ## §4. The interface propositions (one per component) Conventions. Pf : ℝ → Params is a HEIGHT-INDEXED parameter family ("the window at height T is @@ -289,29 +271,6 @@ def FixedLamBounds (v : ℝ → ℝ) (lam : ℝ) : Prop := (2 - kappaXi lam v - ε) * (Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ (3 / 2 - kappaXi lam v / 2 - ε) * (Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) -/-- **Headline (flat window), ε-free certified form.** There is T₀ such that for all T ≥ T₀: - 0.85838 · N_{ξ′}(T,2T) ≤ N⁰ˢ_{ξ′}(T,2T) — at least 85.838% of the zeros of ξ′ with T < Im ≤ 2T, - counted with multiplicity, are SIMPLE and ON Re s = 1/2; - 0.92919 · N_{ξ′}(T,2T) ≤ N_{d,ξ′}(T,2T) — at least 92.919% are DISTINCT. -([XF′]'s certified values are 0.858383… / 0.929191…; five decimals frozen here, see CertFlat.) -/ -def HeadlineFlat : Prop := - ∃ T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - (0.85838 : ℝ) * (Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (0.92919 : ℝ) * (Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) - -/-- **Headline (quartic window), ε-free certified form:** 0.86864·N_{ξ′}(T,2T) ≤ N⁰ˢ_{ξ′}(T,2T) and -0.93432·N_{ξ′}(T,2T) ≤ N_{d,ξ′}(T,2T) for all large T ([XF′]: 0.868640… / 0.934320…). -/ -def HeadlineQuartic : Prop := - ∃ T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - (0.86864 : ℝ) * (Ncount T (2 * T) : ℝ) ≤ (N0simple T (2 * T) : ℝ) ∧ - (0.93432 : ℝ) * (Ncount T (2 * T) : ℝ) ≤ (Ndist T (2 * T) : ℝ) - -/-- cumulative form (liminf over (0,T]): c·N_{ξ′}(0,T) ≤ N⁰ˢ_{ξ′}(0,T) for large T, c = 0.85838 resp. -0.86864 — from the dyadic form by Zeta23.Assembly.dyadic, given H-RvM for ξ′ (N_{ξ′}(0,T) → ∞). -/ -def HeadlineCumulative (c cd : ℝ) : Prop := - ∃ T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - c * (Ncount 0 T : ℝ) ≤ (N0simple 0 T : ℝ) ∧ cd * (Ncount 0 T : ℝ) ≤ (Ndist 0 T : ℝ) - /-! The theorems of XiPrime/Final.lean state these headlines with their full types written out, e.g. theorem xiDeriv_simple_on_line_flat : ∃ T₀, ∀ T ≥ T₀, @@ -362,7 +321,7 @@ variable {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) lemma wZeros_window {T₁ T₂ : ℝ} (h : t₀ ≤ T₁) : (wZeros hZ hs).window T₁ T₂ = zerosInW T₁ T₂ := by ext ρ - simp only [ZeroConfig.window, zerosInW, wZeros, Set.mem_inter_iff, Set.mem_setOf_eq] + simp only [ZeroConfig.window, zerosInW, wZeros, Set.mem_inter_iff, Set.mem_ofPred_eq] constructor · rintro ⟨⟨hρ, -⟩, hw⟩ exact ⟨hρ, hw⟩ @@ -372,27 +331,7 @@ lemma wZeros_window {T₁ T₂ : ℝ} (h : t₀ ≤ T₁) : lemma wZeros_N {T₁ T₂ : ℝ} (h : t₀ ≤ T₁) : (wZeros hZ hs).N T₁ T₂ = NcountW T₁ T₂ := by simp [ZeroConfig.N, NcountW, wZeros_window hZ hs h]; rfl -lemma wZeros_Nd {T₁ T₂ : ℝ} (h : t₀ ≤ T₁) : (wZeros hZ hs).Nd T₁ T₂ = NdistW T₁ T₂ := by - simp [ZeroConfig.Nd, NdistW, wZeros_window hZ hs h] -lemma wZeros_N0s {T₁ T₂ : ℝ} (h : t₀ ≤ T₁) : (wZeros hZ hs).N0s T₁ T₂ = N0simpleW T₁ T₂ := by - simp [ZeroConfig.N0s, N0simpleW, wZeros_window hZ hs h, ZeroConfig.onLine, ZeroConfig.simple]; rfl - end wseam -/-- the W coefficient density has pole weight 2: Assembly uses Defs.nucZ / a GpC-analogue with 2·Π_X; -[XF′ §9.3(i)] "doubling Π_X multiplies negligible bounds by 2 or 4" — the CoeffMoments conclusion is -unchanged, so the W prime side is CoeffMoments for wCoeffFamily verbatim, with the Π-part lemmas carrying a -weight parameter. (Interface note only; no new Prop.) -/ -def wPoleWeight : ℝ := 2 - -/-- **Headline for Z′ (flat / quartic), ε-free** [XF′ Thm 9.4]: for all large T, -c·N_W(T,2T) ≤ #{simple zeros of W on Re s = 1/2 with T < Im ≤ 2T} (= #{t ∈ (T,2T]: Z′(t)=0≠Z″(t)}), -cd·N_W(T,2T) ≤ N_{d,W}(T,2T); and N_W(T,2T) = N(T,2T) + O(log T) [XF′ (Z7)] converts the denominator to -the zeta count Zeta23.Ncount if desired (stated separately in Final.lean). -/ -def HeadlineW (c cd : ℝ) : Prop := - ∃ T₀ : ℝ, ∀ T : ℝ, T₀ ≤ T → - c * (NcountW T (2 * T) : ℝ) ≤ (N0simpleW T (2 * T) : ℝ) ∧ - cd * (NcountW T (2 * T) : ℝ) ≤ (NdistW T (2 * T) : ℝ) - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/StatementW.lean b/zeta23/Zeta23/XiPrime/StatementW.lean deleted file mode 100644 index 7f646e74fd..0000000000 --- a/zeta23/Zeta23/XiPrime/StatementW.lean +++ /dev/null @@ -1,103 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/XiPrime/StatementW.lean — the interface for the Z′ (Hardy W) development. - -Statement.lean §6 fixes the W objects and counts (Defs.hardyW, IsWZero, wMult, -NcountW/NdistW/N0simpleW; WZerosInStrip, WSeam, wZeros + seam lemmas, HeadlineW) and Final.lean proves -HeadlineW 0.85838 0.92919. This file adds (i) the W explicit-formula -main term and Prop (pole weight 2, real fixed parameter) and (ii) the exact target statements for the W seam / -W-RvM / W-transfer results. As in Statement.lean: definitions and named Props only. - - §W1 the entry-dependent W main term M^𝒵_{kl} = ∫ φ̂(τ−τ_k)φ̂(τ−τ_l)[μ + 2·Π_X + P¹_X(τ; L_{2⋆}^{kl})]dτ - (Params.GentryW1 / GpW1; the weight-ϖ fixed-coefficient matrix is Params.GpCW) — coefficients - C(N; L_{2⋆}), L_{2⋆} = ½log(τ⋆/2π) real (Defs.L2star), pole weight 2 (Defs.nucW 2 = nucZ). - §W2 WEF Z Pf — [XF′ Thm 9.2] entrywise, same error shape as XiEF (a named Prop; proved in - XiPrime/Hardy/EFFinal.lean). - §W3 targets (documentation + Prop abbreviations): - wSeam_of_strip : 0 < t₀ → WZerosInStrip t₀ → WSeam t₀ - WRvM hZ hs := RiemannVonMangoldt (wZeros hZ hs) [XF′ (Z7)] - XiTraceTransfer (wZeros hZ hs) Pf wCoeffFamily from WEF + PPUpper + Π-part o(N) - wCoeffFamily.Hyps (proved: wCoeffFamily_hyps, Coeff.lean) - and how Final.hardyW_simple_on_line_flat consumes them. --/ -import Zeta23.XiPrime.Statement - -open scoped BigOperators -open Complex MeasureTheory Set Filter RHLinalg - -noncomputable section - -namespace Zeta23 - -namespace Params - -variable (P : Params) (T : ℝ) - -/-- **M^𝒵_{kl}** [XF′ Thm 9.2]: the ENTRY-DEPENDENT W main term -∫ φ̂(τ−τ_k) φ̂(τ−τ_l) [μ(τ) + 2·Π_X(τ) + P¹_X(τ; L_{2⋆}^{kl})] dτ with the coefficients C(N; L_{2⋆}) frozen at the -REAL parameter L_{2⋆} = L2star(τ⋆_{kl}) = ½ log(τ⋆/2π) (no iπ/4 phase: [XF′ §9.3(ii)]) and POLE WEIGHT 2 (the ½ -from shifting L₂ past s = 1 plus 3/2 from the poles of F_𝒵 = L₂ + W′/W at s = 0, 1: [XF′ Prop 9.1, Thm 9.2(a)]). -Built from Defs.GentryCW (one parenthesised integrand), so it shares every lemma about GentryCW. -/ -def GentryW1 (k l : ℤ) : ℝ := - P.GentryCW T 2 (XiPrime.xiCoeff ((XiPrime.L2star (P.tauStar T k l) : ℝ) : ℂ)) k l - -/-- the d×d matrix of W main terms, typed like P.Gp / P.Gp1. -/ -def GpW1 : Matrix (Fin (P.d T)) (Fin (P.d T)) ℂ := - fun k l => (P.GentryW1 T (k : ℤ) (l : ℤ) : ℂ) - -/- The fixed-coefficient, pole-weight-ϖ prime-side matrix (M^{c,ϖ}_{kl})_{k,l 0 — exactly XiEF's error shape (contour on the fixed line -Re s = 5/4, power saving only; the "+1/T" floor; 1/max 1 Δ² for min(1,Δ⁻²)), with the Summable conjunct (R2). -/ -def WEF (Z : ZeroConfig) (Pf : ℝ → Params) : Prop := - ∃ C δ T₀ : ℝ, 0 < δ ∧ ∀ T : ℝ, T₀ ≤ T → ∀ k l : Fin ((Pf T).d T), - Summable (fun ρ : Z.carrier => Z.Gsummand (Pf T) T k l ρ) ∧ - ‖Z.Gz (Pf T) T k l - ((Pf T).GentryW1 T k l : ℂ)‖ - ≤ C * T ^ (-δ) * (1 / max 1 (((Pf T).tau T k - (Pf T).tau T l) ^ 2) + 1 / T) - -/-! ## §W3. The W inputs of the Z′ headline - - • W-seam wSeam_of_strip {t₀ : ℝ} (ht₀ : 0 < t₀) (hZ : WZerosInStrip t₀) : WSeam t₀ - (W analytic off ℝ and ≢ 0 ⇒ one_le_mult via analyticOrderAt; - [XF′ (Z2)] W(s) = −χ(s)W(1−s), conj W(conj s) = W(s) ⇒ reflect_zero / mult_reflect at the - analyticOrderAt level (χ ≠ 0, ∞ off ℝ); finite_window from hZ (bounded strip) + isolated zeros). - • W-RvM RiemannVonMangoldt (wZeros hZ hs) [XF′ (Z7): N_W(T) = N(T) + O(log T), local - count ≪ log t — argument principle for F_𝒵 on Re s = 2 where Re(L₂ − A) > 0, Jensen; - with Y := ξ′/Γℝ ↦ W and the two real poles 0, 1 excised by t₀ > 0]. - • W-EF WEF (wZeros hZ hs) Pf. - • W-transfer WEF (wZeros hZ hs) Pf → … → XiTraceTransfer (wZeros hZ hs) Pf wCoeffFamily - — xiTraceTransfer_of with XiEF ↦ WEF plus ONE extra step: M^𝒵 has pole weight 2 - and the comparison matrix GpC (wCoeffFamily.c T) has weight 1; the difference is the Π-part - matrix (∫ φ̂φ̂ Π_X)_{kl}, whose hat-trace is ≪ d·L·√X/(T·aL²) ≍ √X = o(N) and whose hat-Frobenius - norm is ≪ d·√X/(T·L) ≍ √X = o(√N) ([XF′ §9.3(i)]: |Π_X(τ)| ≤ 3√X/(1+|τ|)), - then ‖A+B‖_F² ≤ (1+η)‖A‖_F² + (1+1/η)‖B‖_F². The coefficient re-expansion input is the - Reexpansion for the REAL parameter family L_{2⋆}(τ⋆) vs L2star-at-T = ½ l (no phase). - • (Z6)(iii) WZerosInStrip t₀ is a named Prop (Littlewood's gap theorem + de la Vallée Poussin), like (F2) for ξ′. - • wCoeffFamily.Hyps. -/ - -/-- **(Z7)** H-RvM + local count for the zeros of W at heights ≥ t₀, as the tree's structure. -/ -def WRvM {t₀ : ℝ} (hZ : WZerosInStrip t₀) (hs : WSeam t₀) : Prop := RiemannVonMangoldt (wZeros hZ hs) - -end XiPrime -end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/Transfer.lean b/zeta23/Zeta23/XiPrime/Transfer.lean index 469a31ec05..b2839e977f 100644 --- a/zeta23/Zeta23/XiPrime/Transfer.lean +++ b/zeta23/Zeta23/XiPrime/Transfer.lean @@ -40,8 +40,6 @@ INPUTS of the theorem xiTraceTransfer_of (§5), all named hypotheses: 0 ≤ ρ₀, Reexpansion F e ρ₀ A T₀ ([XF′ §6] e_r(N), the δ-expansion identity, H1–H3-type bounds) PPUpper cϱ P.lam (frobSq_Ppart_le, [prop:PP] upper bound, general coefficients) -/ -import Zeta23.XiPrime.Transfer.Inputs -import Zeta23.XiPrime.Transfer.Abstract import Zeta23.XiPrime.Transfer.Dependence import Zeta23.PrimeSideA.Bridge @@ -162,40 +160,8 @@ HatNegligible then XiTraceTransfer holds. -/ theorem xiTraceTransfer_of_negligible (Z : ZeroConfig) (Pf : ℝ → Params) (F : CoeffFamily) (hE : HatNegligible Z Pf (fun T => Z.Gz (Pf T) T - (Pf T).Gp1 T)) (hD : HatNegligible Z Pf (fun T => (Pf T).Gp1 T - (Pf T).GpC T (F.c T))) : - XiTraceTransfer Z Pf F := by - constructor - · intro δ hδ - filter_upwards [hE (δ / 2) (by positivity), hD (δ / 2) (by positivity)] with T hET hDT - set P := Pf T - have hdec : P.hat T (Z.Gz P T) = P.hat T (P.GpC T (F.c T)) - + P.hat T (P.Gp1 T - P.GpC T (F.c T)) + P.hat T (Z.Gz P T - P.Gp1 T) := by - rw [hat_sub', hat_sub']; abel - have := Transfer.rtrace_sub_of_decomp hdec - rw [this] - calc |rtrace (P.hat T (P.Gp1 T - P.GpC T (F.c T))) + rtrace (P.hat T (Z.Gz P T - P.Gp1 T))| - ≤ |rtrace (P.hat T (P.Gp1 T - P.GpC T (F.c T)))| + |rtrace (P.hat T (Z.Gz P T - P.Gp1 T))| := - abs_add_le _ _ - _ ≤ δ / 2 * (Z.N T (2 * T) : ℝ) + δ / 2 * (Z.N T (2 * T) : ℝ) := add_le_add hDT.1 hET.1 - _ = δ * (Z.N T (2 * T) : ℝ) := by ring - · intro δ hδ - set η : ℝ := min (δ / 4) (1 / 4) with hη - have hη0 : 0 < η := lt_min (by positivity) (by norm_num) - have hηδ : η ≤ δ / 4 := min_le_left _ _ - have hη1 : η ≤ 1 / 4 := min_le_right _ _ - filter_upwards [hE η hη0, hD η hη0] with T hET hDT - set P := Pf T - have hdec : P.hat T (Z.Gz P T) = P.hat T (P.GpC T (F.c T)) - + P.hat T (P.Gp1 T - P.GpC T (F.c T)) + P.hat T (Z.Gz P T - P.Gp1 T) := by - rw [hat_sub', hat_sub']; abel - have hN : (0:ℝ) ≤ (Z.N T (2 * T) : ℝ) := Nat.cast_nonneg _ - have h := Transfer.frobSq_le_of_decomp hdec hN hη0.le hη0.le hDT.2 hET.2 - have hm : 0 ≤ frobSq (P.hat T (P.GpC T (F.c T))) := Assembly.frobSq_nonneg _ - have h1 : 1 + (η + η) ≤ 1 + δ := by linarith - have h2 : (η + η) + (η + η) ^ 2 ≤ δ := by nlinarith - calc frobSq (P.hat T (Z.Gz P T)) - ≤ (1 + (η + η)) * frobSq (P.hat T (P.GpC T (F.c T))) + ((η + η) + (η + η) ^ 2) * (Z.N T (2 * T) : ℝ) := h - _ ≤ (1 + δ) * frobSq (P.hat T (P.GpC T (F.c T))) + δ * (Z.N T (2 * T) : ℝ) := by - gcongr + XiTraceTransfer Z Pf F := + xiTraceTransfer_of_negligible₁ Z Pf F ((hE.add hD).congr fun _ => by abel) /-! ## §2. [XF′ Lemma 5.1]: the entry errors E = G¹ − M are HatNegligible -/ @@ -205,14 +171,6 @@ variable {Pf : ℝ → Params} {P : Params} /-- scalars of the family that depend only on (λ, T) agree with those of P. -/ lemma fam_L (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) (T : ℝ) : (Pf T).L T = P.L T := by simp [Params.L, (hPf T).1] -lemma fam_d (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) (T : ℝ) : (Pf T).d T = P.d T := by - simp [Params.d, fam_L hPf] -lemma fam_hgrid (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) (T : ℝ) : - (Pf T).hgrid T = P.hgrid T := by - simp [Params.hgrid, fam_L hPf] -lemma fam_tau (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) (T : ℝ) (k : ℤ) : - (Pf T).tau T k = P.tau T k := by - simp [Params.tau, fam_hgrid hPf] lemma fam_X (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) (T : ℝ) : (Pf T).X T = P.X T := by simp [Params.X, fam_L hPf] @@ -293,7 +251,31 @@ lemma frobSq_hat' (P : Params) (T : ℝ) {m : Type*} [Fintype m] (M : Matrix m m frobSq (P.hat T M) = ((P.a T * P.L T ^ 2)⁻¹) ^ 2 * frobSq M := by rw [Assembly.hat_eq, Assembly.frobSq_smul_ofReal] -set_option maxHeartbeats 400000 in +/-- Shared eventual environment for transfer theorems (`hatNegligible_of_entryBound` / `hatNegligible_of_geom`). -/ +private lemma eventually_transferEnv (Z : ZeroConfig) (Pf : ℝ → Params) (P : Params) (hP : P.Valid) + (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) + {a₀ : ℝ} (ha₀ : 0 < a₀) (ha : ∀ᶠ T in atTop, a₀ ≤ (Pf T).a T) + (hR : RiemannVonMangoldt Z) (Lmin : ℝ) (hLmin : 0 < Lmin) : + ∀ᶠ T in atTop, + 1 ≤ T ∧ 1 ≤ l T ∧ Lmin ≤ P.L T ∧ a₀ ≤ (Pf T).a T ∧ + T * l T / (4 * π) ≤ (Z.N T (2 * T) : ℝ) ∧ + 0 < (Pf T).a T * (Pf T).L T ^ 2 ∧ + ((Pf T).a T * (Pf T).L T ^ 2)⁻¹ ≤ (a₀ * P.L T ^ 2)⁻¹ := by + filter_upwards [eventually_ge_atTop (1:ℝ), Assembly.eventually_one_le_l, + (Assembly.tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop Lmin, ha, + Assembly.eventually_N_ge Z hR] with T hT1 hl hL haT hN + have hLf : (Pf T).L T = P.L T := fam_L hPf T + have hL0 : 0 < P.L T := hLmin.trans_le hL + have haT0 : 0 < (Pf T).a T := ha₀.trans_le haT + refine ⟨hT1, hl, hL, haT, hN, by rw [hLf]; positivity, ?_⟩ + rw [hLf]; exact inv_anti₀ (by positivity) (by gcongr) + +private lemma X_le_T_of_valid {P : Params} (hP : P.Valid) {T : ℝ} (hT : 0 < T) (hl : 0 ≤ l T) : + P.X T ≤ T := by + have h1 : P.X T ≤ Real.exp (l T) := Real.exp_le_exp.2 (by unfold Params.L; nlinarith [hP.lam_le_one]) + rw [l, Real.exp_log (by positivity)] at h1 + exact h1.trans (div_le_self hT.le (by linarith [Real.pi_gt_three])) + /-- **[XF′ Lemma 5.1], for any entrywise main term** M_T with the XiEF/WEF error shape: ‖G_{kl} − M_{kl}‖ ≤ C T^{−δ}(1/max(1,Δ²_{kl}) + 1/T) for T ≥ T₀ ⇒ G − M is HatNegligible. -/ theorem hatNegligible_of_entryBound (Z : ZeroConfig) (Pf : ℝ → Params) (P : Params) (hP : P.Valid) @@ -307,121 +289,78 @@ theorem hatNegligible_of_entryBound (Z : ZeroConfig) (Pf : ℝ → Params) (P : HatNegligible Z Pf (fun T => Z.Gz (Pf T) T - M T) := by obtain ⟨C₀, δ, T₀, hδ, hEF⟩ := hEF obtain ⟨a₀, ha₀, ha⟩ := ha - set C := max C₀ 1 with hCdef + set C := max C₀ 1 have hC : 0 < C := lt_of_lt_of_le one_pos (le_max_right _ _) intro η hη - have hπ2 : 9 < π ^ 2 := by have := Real.pi_gt_three; nlinarith - have h13 : 4 * π ≤ 13 := by have := Real.pi_lt_d2; norm_num at this ⊢; linarith - have c1 : 4 / π ^ 2 ≤ (1:ℝ) / 2 := by - rw [div_le_div_iff₀ (by positivity) two_pos]; linarith only [hπ2] - have c2 : 1 / (4 * π ^ 2) ≤ (1:ℝ) / 2 := by - rw [div_le_div_iff₀ (by positivity) two_pos]; linarith only [hπ2] - -- smallness: T^{-δ} ≤ ε - set ε : ℝ := min 1 (min (η * a₀ / (4 * C)) (η ^ 2 * a₀ ^ 2 / (26 * C ^ 2))) with hεdef + have hπ2 : 9 < π ^ 2 := by nlinarith [Real.pi_gt_three] + have h13 : 4 * π ≤ 13 := by linarith [Real.pi_lt_d2] + set ε : ℝ := min 1 (min (η * a₀ / (4 * C)) (η ^ 2 * a₀ ^ 2 / (26 * C ^ 2))) have hε0 : 0 < ε := by positivity have hsmall : ∀ᶠ T : ℝ in atTop, T ^ (-δ) ≤ ε := - ((tendsto_rpow_neg_atTop hδ).eventually (eventually_le_nhds hε0)) - have hLtop := Assembly.tendsto_L_atTop P hP.lam_pos - filter_upwards [eventually_ge_atTop T₀, eventually_ge_atTop (1:ℝ), ha, Assembly.eventually_N_ge Z hR, - Assembly.eventually_one_le_l, hLtop.eventually_ge_atTop (2 * π), hsmall] - with T hT₀ hT1 haT hN hl hL hTδ + (tendsto_rpow_neg_atTop hδ).eventually (eventually_le_nhds hε0) + filter_upwards [eventually_ge_atTop T₀, + eventually_transferEnv Z Pf P hP hPf ha₀ ha hR (2 * π) (by positivity), hsmall] + with T hT₀ ⟨hT1, hl, hL, _, hN, haL, hinv⟩ hTδ have hT : 0 < T := by linarith - have hπ := Real.pi_pos have hLf : (Pf T).L T = P.L T := fam_L hPf T - have hL0 : 0 < P.L T := by nlinarith [Real.pi_gt_three] - have hh : (Pf T).hgrid T = 2 * π / P.L T := by simp [Params.hgrid, hLf] - have hhpos : 0 < (Pf T).hgrid T := by rw [hh]; positivity - have hinvh : 1 / (Pf T).hgrid T = P.L T / (2 * π) := by rw [hh]; field_simp + have hL0 : 0 < P.L T := by linarith [Real.pi_gt_three] + have hhpos : 0 < (Pf T).hgrid T := by unfold Params.hgrid; rw [hLf]; positivity have hdle : ((Pf T).d T : ℝ) ≤ P.L T * T / (2 * π) := by have := d_le (Pf T) T (by rw [hLf]; positivity); rwa [hLf] at this - have hd0 : (0:ℝ) ≤ ((Pf T).d T : ℝ) := Nat.cast_nonneg _ have hTδ0 : 0 ≤ T ^ (-δ) := Real.rpow_nonneg hT.le _ - have hε1 : ε ≤ 1 := min_le_left _ _ - have hε2 : ε ≤ η * a₀ / (4 * C) := (min_le_right _ _).trans (min_le_left _ _) - have hε3 : ε ≤ η ^ 2 * a₀ ^ 2 / (26 * C ^ 2) := (min_le_right _ _).trans (min_le_right _ _) - -- the entrywise bound with C in place of C₀ have hEF' : ∀ k l : Fin ((Pf T).d T), ‖Z.Gz (Pf T) T k l - M T k l‖ - ≤ C * T ^ (-δ) * (1 / max 1 (((Pf T).tau T k - (Pf T).tau T l) ^ 2) + 1 / T) := by - intro k l - refine (hEF T hT₀ k l).trans ?_ - have h0 : 0 ≤ T ^ (-δ) * (1 / max 1 (((Pf T).tau T k - (Pf T).tau T l) ^ 2) + 1 / T) := by - positivity - have := mul_le_mul_of_nonneg_right (le_max_left C₀ 1) h0 - simpa only [mul_assoc] using this + ≤ C * T ^ (-δ) * (1 / max 1 (((Pf T).tau T k - (Pf T).tau T l) ^ 2) + 1 / T) := fun k l => + (hEF T hT₀ k l).trans (by gcongr; exact le_max_left _ _) obtain ⟨htr, hfr⟩ := entryError_bounds Z (Pf T) T (M T) hC.le hT hhpos hEF' - have haT0 : 0 < (Pf T).a T := ha₀.trans_le haT - have haL : 0 < (Pf T).a T * (Pf T).L T ^ 2 := by rw [hLf]; positivity - have ha₀L : 0 < a₀ * P.L T ^ 2 := by positivity - have hinv : ((Pf T).a T * (Pf T).L T ^ 2)⁻¹ ≤ (a₀ * P.L T ^ 2)⁻¹ := by - rw [hLf]; exact inv_anti₀ ha₀L (by gcongr) constructor · rw [rtrace_hat', abs_mul, abs_of_pos (inv_pos.2 haL)] - have hT1' : 1 + 1 / T ≤ 2 := by - have : 1 / T ≤ 1 := by rw [div_le_one hT]; exact hT1 - linarith + have hT1' : 1 + 1 / T ≤ 2 := by have : 1 / T ≤ 1 := (div_le_one hT).mpr hT1; linarith + have hCε : C * ε ≤ η * a₀ / 4 := + (mul_le_mul_of_nonneg_left ((min_le_right _ _).trans (min_le_left _ _)) hC.le).trans_eq (by field_simp) calc ((Pf T).a T * (Pf T).L T ^ 2)⁻¹ * |rtrace (Z.Gz (Pf T) T - M T)| - ≤ (a₀ * P.L T ^ 2)⁻¹ * (((Pf T).d T : ℝ) * (C * T ^ (-δ) * (1 + 1 / T))) := - mul_le_mul hinv htr (abs_nonneg _) (inv_nonneg.2 ha₀L.le) - _ ≤ (a₀ * P.L T ^ 2)⁻¹ * ((P.L T * T / (2 * π)) * (C * T ^ (-δ) * 2)) := by gcongr + ≤ (a₀ * P.L T ^ 2)⁻¹ * ((P.L T * T / (2 * π)) * (C * T ^ (-δ) * 2)) := + mul_le_mul hinv (htr.trans (by gcongr)) (abs_nonneg _) (by positivity) _ = (C * T ^ (-δ)) * T / (π * a₀ * P.L T) := by field_simp - _ ≤ (C * ε) * T / (π * a₀ * P.L T) := by gcongr - _ ≤ (η * a₀ / 4) * T / (π * a₀ * P.L T) := by - gcongr - calc C * ε ≤ C * (η * a₀ / (4 * C)) := by gcongr - _ = η * a₀ / 4 := by field_simp + _ ≤ (η * a₀ / 4) * T / (π * a₀ * P.L T) := by gcongr; exact (mul_le_mul_of_nonneg_left hTδ hC.le).trans hCε _ = η * (T / (4 * π)) * (1 / P.L T) := by field_simp _ ≤ η * (T / (4 * π)) * l T := by - gcongr - calc 1 / P.L T ≤ 1 := by rw [div_le_one hL0]; linarith [Real.pi_gt_three] - _ ≤ l T := hl - _ = η * (T * l T / (4 * π)) := by ring - _ ≤ η * (Z.N T (2 * T) : ℝ) := by gcongr + gcongr; exact ((div_le_one hL0).mpr (by linarith [Real.pi_gt_three])).trans hl + _ ≤ η * (Z.N T (2 * T) : ℝ) := by rw [show η * (T / (4 * π)) * l T = η * (T * l T / (4 * π)) by ring]; gcongr · rw [frobSq_hat'] have hbr : ((Pf T).d T : ℝ) * (8 * (1 + 1 / (Pf T).hgrid T)) + ((Pf T).d T : ℝ) ^ 2 / T ^ 2 ≤ P.L T ^ 2 * T := by + have hinvh : 1 / (Pf T).hgrid T = P.L T / (2 * π) := by simp [Params.hgrid, hLf] rw [hinvh] - have hL2π : 1 ≤ P.L T / (2 * π) := by rw [le_div_iff₀ (by positivity)]; linarith - have h1 : ((Pf T).d T : ℝ) * (8 * (1 + P.L T / (2 * π))) - ≤ (P.L T * T / (2 * π)) * (8 * (P.L T / π)) := by - gcongr - calc 1 + P.L T / (2 * π) ≤ P.L T / (2 * π) + P.L T / (2 * π) := by linarith - _ = P.L T / π := by ring - have h2 : ((Pf T).d T : ℝ) ^ 2 / T ^ 2 ≤ (P.L T * T / (2 * π)) ^ 2 / T ^ 2 := by gcongr - have e1 : (P.L T * T / (2 * π)) * (8 * (P.L T / π)) = (4 / π ^ 2) * (P.L T ^ 2 * T) := by - (field_simp; ring) - have e2 : (P.L T * T / (2 * π)) ^ 2 / T ^ 2 = (1 / (4 * π ^ 2)) * P.L T ^ 2 := by - (field_simp; ring) - have hLT0 : 0 ≤ P.L T ^ 2 * T := by positivity - have hLT : P.L T ^ 2 ≤ P.L T ^ 2 * T := le_mul_of_one_le_right (sq_nonneg _) hT1 - have i1 : (4 / π ^ 2) * (P.L T ^ 2 * T) ≤ (1 / 2) * (P.L T ^ 2 * T) := - mul_le_mul_of_nonneg_right c1 hLT0 - have i2 : (1 / (4 * π ^ 2)) * P.L T ^ 2 ≤ (1 / 2) * (P.L T ^ 2 * T) := - mul_le_mul c2 hLT (sq_nonneg _) (by norm_num) - linarith only [h1, h2, e1, e2, i1, i2] - have hfr' : frobSq (Z.Gz (Pf T) T - M T) ≤ 2 * (C * T ^ (-δ)) ^ 2 * (P.L T ^ 2 * T) := - hfr.trans (mul_le_mul_of_nonneg_left hbr (by positivity)) - have hinv2 : (((Pf T).a T * (Pf T).L T ^ 2)⁻¹) ^ 2 ≤ ((a₀ * P.L T ^ 2)⁻¹) ^ 2 := - pow_le_pow_left₀ (inv_nonneg.2 haL.le) hinv 2 - have hTδ2 : (T ^ (-δ)) ^ 2 ≤ ε := by - calc (T ^ (-δ)) ^ 2 = T ^ (-δ) * T ^ (-δ) := sq _ - _ ≤ ε * 1 := mul_le_mul hTδ (hTδ.trans hε1) hTδ0 hε0.le - _ = ε := mul_one _ + have h1 : ((Pf T).d T : ℝ) * (8 * (1 + P.L T / (2 * π))) ≤ (4 / π ^ 2) * (P.L T ^ 2 * T) := by + have hL2π : 1 ≤ P.L T / (2 * π) := (le_div_iff₀ (by positivity)).mpr (by linarith) + calc _ ≤ (P.L T * T / (2 * π)) * (8 * (P.L T / π)) := by + gcongr; linarith [show P.L T / (2 * π) + P.L T / (2 * π) = P.L T / π by ring] + _ = (4 / π ^ 2) * (P.L T ^ 2 * T) := by field_simp; ring + have h2 : ((Pf T).d T : ℝ) ^ 2 / T ^ 2 ≤ (1 / (4 * π ^ 2)) * (P.L T ^ 2 * T) := by + calc _ ≤ (P.L T * T / (2 * π)) ^ 2 / T ^ 2 := by gcongr + _ = (1 / (4 * π ^ 2)) * P.L T ^ 2 := by field_simp; ring + _ ≤ (1 / (4 * π ^ 2)) * (P.L T ^ 2 * T) := by gcongr; exact le_mul_of_one_le_right (sq_nonneg _) hT1 + have c1 : 4 / π ^ 2 ≤ 1 / 2 := (div_le_div_iff₀ (by positivity) two_pos).mpr (by linarith) + have c2 : 1 / (4 * π ^ 2) ≤ 1 / 2 := (div_le_div_iff₀ (by positivity) two_pos).mpr (by linarith) + nlinarith [show 0 ≤ P.L T ^ 2 * T by positivity] + have hTδ2 : (T ^ (-δ)) ^ 2 ≤ η ^ 2 * a₀ ^ 2 / (26 * C ^ 2) := by + have : (T ^ (-δ)) ^ 2 ≤ ε := by + rw [sq]; exact (mul_le_mul hTδ (hTδ.trans (min_le_left _ _)) hTδ0 hε0.le).trans_eq (mul_one _) + exact this.trans ((min_le_right _ _).trans (min_le_right _ _)) calc (((Pf T).a T * (Pf T).L T ^ 2)⁻¹) ^ 2 * frobSq (Z.Gz (Pf T) T - M T) ≤ ((a₀ * P.L T ^ 2)⁻¹) ^ 2 * (2 * (C * T ^ (-δ)) ^ 2 * (P.L T ^ 2 * T)) := - mul_le_mul hinv2 hfr' (Assembly.frobSq_nonneg _) (sq_nonneg _) + mul_le_mul (pow_le_pow_left₀ (inv_nonneg.2 haL.le) hinv 2) + (hfr.trans (mul_le_mul_of_nonneg_left hbr (by positivity))) (Assembly.frobSq_nonneg _) (sq_nonneg _) _ = 2 * C ^ 2 * (T ^ (-δ)) ^ 2 * T / (a₀ ^ 2 * P.L T ^ 2) := by field_simp - _ ≤ 2 * C ^ 2 * ε * T / (a₀ ^ 2 * P.L T ^ 2) := by gcongr _ ≤ 2 * C ^ 2 * (η ^ 2 * a₀ ^ 2 / (26 * C ^ 2)) * T / (a₀ ^ 2 * P.L T ^ 2) := by gcongr - _ = η ^ 2 * (T / 13) * (1 / P.L T ^ 2) := by (field_simp; ring) - _ ≤ η ^ 2 * (T / 13) * 1 := by - gcongr - rw [div_le_one (by positivity)]; nlinarith [Real.pi_gt_three] + _ = η ^ 2 * (T / 13) * (1 / P.L T ^ 2) := by field_simp; ring _ ≤ η ^ 2 * (T * l T / (4 * π)) := by - rw [mul_one] - gcongr η ^ 2 * ?_ - calc T / 13 ≤ T / (4 * π) := div_le_div_of_nonneg_left hT.le (by positivity) h13 - _ ≤ T * l T / (4 * π) := - div_le_div_of_nonneg_right (le_mul_of_one_le_right hT.le hl) (by positivity) + have hL2 : 1 / P.L T ^ 2 ≤ 1 := (div_le_one (by positivity)).mpr (by nlinarith [Real.pi_gt_three]) + have hT13 : T / 13 ≤ T * l T / (4 * π) := + (div_le_div_of_nonneg_left hT.le (by positivity) h13).trans + (div_le_div_of_nonneg_right (le_mul_of_one_le_right hT.le hl) (by positivity)) + calc _ ≤ η ^ 2 * (T / 13) * 1 := by gcongr + _ ≤ η ^ 2 * (T * l T / (4 * π)) := by rw [mul_one]; gcongr _ ≤ η ^ 2 * (Z.N T (2 * T) : ℝ) := by gcongr /-- **[XF′ Lemma 5.1]**: from XiEF, E = G¹ − M is HatNegligible. -/ @@ -582,7 +521,6 @@ lemma Gp1_sub_GpC_apply (P : Params) (T : ℝ) {cϱ : ℝ} (hΓ : GammaFacts) rw [← Complex.ofReal_sub, Params.GentryC_eq_GentryW, Params.GentryC_eq_GentryW, Transfer.gentryW_one_sub hΓ hF hX _ _ hk hl] -set_option maxHeartbeats 800000 in /-- **[XF′ Lemma 6.1], base-generic engine**: a matrix family D whose entries are the P-part entries of the coefficient differences C(·; Λ₀(T)+δ_{kl}) − c(T) is HatNegligible, given the geometric re-expansion input at Λ₀. -/ theorem hatNegligible_of_geom (Z : ZeroConfig) (Pf : ℝ → Params) @@ -602,185 +540,104 @@ theorem hatNegligible_of_geom (Z : ZeroConfig) (Pf : ℝ → Params) obtain ⟨a₀, ha₀, ha⟩ := ha intro η hη have hlog2 : 0 < Real.log 2 := Real.log_pos one_lt_two - have hπ3 := Real.pi_gt_three - -- thresholds - set κtr : ℝ := 2 / Real.log 2 * A * ρ₀ / a₀ with hκtr -- |tr D̂| ≤ κtr √X - have hκtr0 : 0 ≤ κtr := by positivity - set ε : ℝ := a₀ ^ 2 * η ^ 2 / (32 * π * (A + 1)) with hεdef + set κtr : ℝ := 2 / Real.log 2 * A * ρ₀ / a₀ + set ε : ℝ := a₀ ^ 2 * η ^ 2 / (32 * π * (A + 1)) have hε : 0 < ε := by positivity have hsmallX : ∀ᶠ T : ℝ in atTop, l T ^ 4 * P.X T / T ≤ ε := (tendsto_lpow_mul_X_div P hlam1 4).eventually (eventually_le_nhds hε) - have hsmall0 : ∀ᶠ T : ℝ in atTop, l T ^ 4 * 1 / T ≤ ε := by - have : Tendsto (fun T => l T ^ 4 * 1 / T) atTop (𝓝 0) := by - refine squeeze_zero' ?_ ?_ (tendsto_lpow_mul_X_div P hlam1 4) - · filter_upwards [Assembly.eventually_l_pos, eventually_gt_atTop (0:ℝ)] with T hl hT - positivity - · filter_upwards [Assembly.eventually_l_pos, eventually_gt_atTop (0:ℝ)] with T hl hT - have hX1 : 1 ≤ P.X T := by - unfold Params.X; exact Real.one_le_exp (by unfold Params.L; nlinarith [hP.lam_pos]) - gcongr - exact this.eventually (eventually_le_nhds hε) - have hLtop := Assembly.tendsto_L_atTop P hP.lam_pos - filter_upwards [eventually_ge_atTop T₀, eventually_ge_atTop T₁, eventually_gt_atTop (0:ℝ), ha, - Assembly.eventually_N_ge Z hR, Assembly.eventually_one_le_l, hLtop.eventually_ge_atTop 1, + have hsmall0 : ∀ᶠ T : ℝ in atTop, l T ^ 4 / T ≤ ε := by + filter_upwards [hsmallX, Assembly.eventually_l_pos, eventually_gt_atTop (0:ℝ)] with T hX hl hT + have hX1 : 1 ≤ P.X T := Real.one_le_exp (by unfold Params.L; nlinarith [hP.lam_pos]) + exact (div_le_div_of_nonneg_right (le_mul_of_one_le_right (by positivity) hX1) hT.le).trans hX + filter_upwards [eventually_ge_atTop T₀, eventually_ge_atTop T₁, + eventually_transferEnv Z Pf P hP hPf ha₀ ha hR 1 one_pos, hsmallX, hsmall0, eventually_ge_atTop ((4 * π * κtr / η) ^ 2), Assembly.tendsto_l_atTop.eventually_ge_atTop (ρ₀ + 32 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2))] - with T hT₀ hT₁ hT haT hN hl1 hL1 hsX hs0 hTbig hlbig - set P' := Pf T with hP' - set p := P'.toSetting T with hp - set Fn := P'.localFun T with hFn + with T hT₀ hT₁ ⟨hT1, hl1, hL1, _, hN, haL, hinv⟩ hsX hs0 hTbig hlbig + set P' := Pf T; set p := P'.toSetting T; set Fn := P'.localFun T + have hT : 0 < T := by linarith have hF : LocalHypsCore cϱ p Fn := hcore T hT₁ have hLf : P'.L T = P.L T := fam_L hPf T have hXf : P'.X T = P.X T := fam_X hPf T - have hL0 : 0 < P.L T := by linarith - have hX0 : 0 < P.X T := by unfold Params.X; exact Real.exp_pos _ have hh0 : 0 ≤ P'.hgrid T := by unfold Params.hgrid; rw [hLf]; positivity - have hl0 : 0 < l T := by linarith - have hbig0 : (0:ℝ) ≤ 32 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2) := by positivity - set ρ : ℝ := ρ₀ / l T with hρ - have hρ0 : 0 ≤ ρ := by positivity - have hρ1 : ρ ≤ 1 := by rw [hρ, div_le_one hl0]; linarith - set g : ℕ → ℕ → ℕ → ℂ := fun k l' N => xiCoeff (Λ₀ T + ((P'.deltaKL T k l' : ℝ) : ℂ)) N - c T N with hg - -- δ ≥ 0 for all indices; capped weights - have hδnn : ∀ k l' : ℕ, 0 ≤ P'.deltaKL T k l' := by - intro k l' - have := tau_ge_T P' T (k := k) hh0 - have := tau_ge_T P' T (k := l') hh0 + set ρ : ℝ := ρ₀ / l T + have hρ1 : ρ ≤ 1 := (div_le_one (by linarith)).mpr (by linarith [show 0 ≤ 32 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2) by positivity]) + set g : ℕ → ℕ → ℕ → ℂ := fun k l' N => xiCoeff (Λ₀ T + ((P'.deltaKL T k l' : ℝ) : ℂ)) N - c T N + have hδnn : ∀ k l' : ℕ, 0 ≤ P'.deltaKL T k l' := fun k l' => by simp only [Params.deltaKL, Params.tauStar] - have : 1 ≤ (P'.tau T k + P'.tau T l') / 2 / T := by rw [le_div_iff₀ hT]; linarith - have := Real.log_nonneg this - linarith - set δm : ℕ → ℕ → ℝ := fun k l' => min (P'.deltaKL T k l') (1 / 2) with hδm - have hδm0 : ∀ k l', 0 ≤ δm k l' := fun k l' => le_min (hδnn k l') (by norm_num) - have hδm1 : ∀ k l', δm k l' ≤ 1 / 2 := fun k l' => min_le_right _ _ - have hδm_eq : ∀ k, k < P'.d T → ∀ l', l' < P'.d T → δm k l' = P'.deltaKL T k l' := by - intro k hk l' hl' - exact min_eq_left (deltaKL_mem P' T hk hl' (by rw [hLf]; exact hL0) hT).2 - have hδv_mono : Monotone (fun k : ℕ => δm k k) := - fun a b hab => min_le_min_right _ (deltaKL_diag_monotone P' T hT hh0 hab) - -- entries of D - have hDeq : D T = fun (k l' : Fin (P'.d T)) => ((GentryNu (Pc p.X (g k l')) p Fn k l' : ℝ) : ℂ) := - hD T hT hF - -- expansions at the entries + have h1 : 1 ≤ (P'.tau T k + P'.tau T l') / 2 / T := + (le_div_iff₀ hT).mpr (by linarith [tau_ge_T P' T (k := k) hh0, tau_ge_T P' T (k := l') hh0]) + linarith [Real.log_nonneg h1] + set δm : ℕ → ℕ → ℝ := fun k l' => min (P'.deltaKL T k l') (1 / 2) have hexp2 : ∀ k, k < p.d → ∀ l', l' < p.d → ∀ N ∈ Finset.Ioc 0 ⌊p.X⌋₊, - HasSum (fun r : ℕ => e T (r + 1) N * (δm k l' : ℂ) ^ (r + 1)) (g k l' N) := by - intro k hk l' hl' N hN - have hmem := deltaKL_mem P' T hk hl' (by rw [hLf]; exact hL0) hT - have := hG.expand T hT₀ _ hmem N hN - rw [hδm_eq k hk l' hl', hg] - exact this - -- S1 and sumSq inputs - set σ : ℝ := A * (Real.sqrt (P.X T) * l T) with hσ - have hσ0 : 0 ≤ σ := by positivity - have hS1 : ∀ r : ℕ, 1 ≤ r → S1 (e T r) p.X ≤ σ * ρ ^ r := by - intro r hr - calc S1 (e T r) p.X = S1 (e T r) (P'.X T) := rfl - _ ≤ A * (ρ₀ / l T) ^ r * (Real.sqrt (P'.X T) * l T) := hG.S1_le T hT₀ r hr - _ = σ * ρ ^ r := by rw [hXf, hσ, hρ]; ring - set K₁ : ℝ := A * (P.L T ^ 4 * T * l T ^ 2) with hK₁ - set K₀ : ℝ := A * (P.L T ^ 3 * l T ^ 4 * (1 + P.X T)) with hK₀ - have hK₁0 : 0 ≤ K₁ := by positivity - have hK₀0 : 0 ≤ K₀ := by positivity - have hQ : ∀ r : ℕ, 1 ≤ r → (∑ k ∈ Finset.range p.d, ∑ l' ∈ Finset.range p.d, - GentryNu (Pc p.X (e T r)) p Fn k l' ^ 2) ≤ K₁ * ρ ^ (2 * r) + K₀ := by - intro r hr - calc _ = (∑ k ∈ Finset.range (P'.d T), ∑ l' ∈ Finset.range (P'.d T), - GentryNu (Pc (P'.X T) (e T r)) (P'.toSetting T) (P'.localFun T) k l' ^ 2) := rfl - _ ≤ A * (ρ₀ / l T) ^ (2 * r) * (P'.L T ^ 4 * T * l T ^ 2) - + A * (P'.L T ^ 3 * l T ^ 4 * (1 + P'.X T)) := hG.sumSq_le T hT₀ r hr - _ = K₁ * ρ ^ (2 * r) + K₀ := by rw [hLf, hXf, hK₁, hK₀, hρ]; ring - -- the two fixed-T conclusions + HasSum (fun r : ℕ => e T (r + 1) N * (δm k l' : ℂ) ^ (r + 1)) (g k l' N) := fun k hk l' hl' N hNm => by + have hmem := deltaKL_mem P' T hk hl' (by rw [hLf]; linarith) hT + simpa only [δm, min_eq_left hmem.2, g] using hG.expand T hT₀ (P'.deltaKL T k l') hmem N hNm + have hX0 : 0 ≤ P.X T := (Real.exp_pos _).le + set σ : ℝ := A * (Real.sqrt (P.X T) * l T) + set K₁ : ℝ := A * (P.L T ^ 4 * T * l T ^ 2) + set K₀ : ℝ := A * (P.L T ^ 3 * l T ^ 4 * (1 + P.X T)) have hfrob := Transfer.dependence_frob hF (e := e T) (g := g) (δm := δm) - hδm0 hδm1 hexp2 hK₁0 hK₀0 hρ0 hρ1 hQ + (fun k l' => le_min (hδnn k l') (by norm_num)) (fun _ _ => min_le_right _ _) hexp2 + (K₁ := K₁) (K₀ := K₀) (ρ := ρ) + (by dsimp only [K₁]; positivity) (by dsimp only [K₀]; positivity) (by dsimp only [ρ]; positivity) + hρ1 fun r hr => by + refine (hG.sumSq_le T hT₀ r hr).trans_eq ?_ + rw [hLf, hXf]; dsimp only [K₁, K₀, ρ]; ring have htrace := Transfer.dependence_trace hF (e := e T) (hG.e_one T) (g := fun k => g k k) - (δv := fun k => δm k k) (fun k => hδm0 k k) (fun k => hδm1 k k) hδv_mono - (fun k hk => hexp2 k hk k hk) hσ0 hρ0 hρ1 hS1 - -- hat units - have haT0 : 0 < P'.a T := ha₀.trans_le haT - have haL : 0 < P'.a T * P'.L T ^ 2 := by rw [hLf]; positivity - have ha₀L : 0 < a₀ * P.L T ^ 2 := by positivity - have hinv : (P'.a T * P'.L T ^ 2)⁻¹ ≤ (a₀ * P.L T ^ 2)⁻¹ := by - rw [hLf]; exact inv_anti₀ ha₀L (by gcongr) - have hXT : P.X T ≤ T := by - have h1 : P.X T ≤ Real.exp (l T) := by - unfold Params.X Params.L - exact Real.exp_le_exp.2 (by nlinarith [hP.lam_le_one]) - rw [l, Real.exp_log (by positivity)] at h1 - have : T / (2 * π) ≤ T := div_le_self hT.le (by linarith) - linarith + (δv := fun k => δm k k) (fun k => le_min (hδnn k k) (by norm_num)) (fun _ => min_le_right _ _) + (fun _ _ hab => min_le_min_right _ (deltaKL_diag_monotone P' T hT hh0 hab)) + (fun k hk => hexp2 k hk k hk) (σ := σ) (ρ := ρ) (by dsimp only [σ]; positivity) (by dsimp only [ρ]; positivity) + hρ1 fun r hr => by + have h := hG.S1_le T hT₀ r hr + change S1 (e T r) (P'.X T) ≤ σ * ρ ^ r + rw [hXf] at h ⊢ + exact h.trans_eq (by dsimp only [σ, ρ]; ring) + have hDeq : D T = fun (k l' : Fin (P'.d T)) => ((GentryNu (Pc p.X (g k l')) p Fn k l' : ℝ) : ℂ) := hD T hT hF constructor - · -- trace - rw [rtrace_hat', abs_mul, abs_of_pos (inv_pos.2 haL)] - have htrD : rtrace (D T) - = ∑ k ∈ Finset.range p.d, GentryNu (Pc p.X (g k k)) p Fn k k := by - rw [hDeq] - unfold rtrace - simp only [Matrix.trace, Matrix.diag_apply, map_sum, RCLike.re_to_complex, Complex.ofReal_re] + · rw [rtrace_hat', abs_mul, abs_of_pos (inv_pos.2 haL)] + have htrD : rtrace (D T) = ∑ k ∈ Finset.range p.d, GentryNu (Pc p.X (g k k)) p Fn k k := by + rw [hDeq]; unfold rtrace; simp only [Matrix.trace, map_sum, RCLike.re_to_complex] exact Fin.sum_univ_eq_sum_range (fun k => GentryNu (Pc p.X (g k k)) p Fn k k) _ rw [htrD] - have hsqT : 4 * π * κtr / η ≤ Real.sqrt T := by - calc 4 * π * κtr / η = Real.sqrt ((4 * π * κtr / η) ^ 2) := (Real.sqrt_sq (by positivity)).symm - _ ≤ Real.sqrt T := Real.sqrt_le_sqrt hTbig + have hsqT : 4 * π * κtr / η ≤ Real.sqrt T := + (Real.sqrt_sq (by positivity)).symm.trans_le (Real.sqrt_le_sqrt hTbig) calc (P'.a T * P'.L T ^ 2)⁻¹ * |∑ k ∈ Finset.range p.d, GentryNu (Pc p.X (g k k)) p Fn k k| ≤ (a₀ * P.L T ^ 2)⁻¹ * (2 / Real.log 2 * p.L ^ 2 * σ * ρ) := - mul_le_mul hinv htrace (abs_nonneg _) (inv_nonneg.2 ha₀L.le) + mul_le_mul hinv htrace (abs_nonneg _) (by positivity) _ = κtr * Real.sqrt (P.X T) := by - rw [show p.L = P'.L T from rfl, hLf, hκtr, hσ, hρ]; field_simp - _ ≤ κtr * Real.sqrt T := by gcongr + rw [show p.L = P'.L T from rfl, hLf] + dsimp only [κtr, σ, ρ]; field_simp + _ ≤ κtr * Real.sqrt T := by gcongr; exact X_le_T_of_valid hP hT (by linarith) _ = η / (4 * π) * (4 * π * κtr / η) * Real.sqrt T := by field_simp _ ≤ η / (4 * π) * Real.sqrt T * Real.sqrt T := by gcongr _ = η * (T / (4 * π)) := by rw [mul_assoc, Real.mul_self_sqrt hT.le]; ring - _ ≤ η * (T * l T / (4 * π)) := by - gcongr - exact le_mul_of_one_le_right hT.le hl1 + _ ≤ η * (T * l T / (4 * π)) := by gcongr; exact le_mul_of_one_le_right hT.le hl1 _ ≤ η * (Z.N T (2 * T) : ℝ) := by gcongr - · -- Frobenius - rw [frobSq_hat'] - have hfrD : frobSq (D T) - = ∑ k ∈ Finset.range p.d, ∑ l' ∈ Finset.range p.d, GentryNu (Pc p.X (g k l')) p Fn k l' ^ 2 := by - rw [hDeq] - exact Transfer.frobSq_ofReal_fin _ (fun k l' => GentryNu (Pc p.X (g k l')) p Fn k l') - rw [hfrD] - have hinv2 : ((P'.a T * P'.L T ^ 2)⁻¹) ^ 2 ≤ ((a₀ * P.L T ^ 2)⁻¹) ^ 2 := - pow_le_pow_left₀ (inv_nonneg.2 haL.le) hinv 2 - -- the two smallness facts - have hsX' : l T ^ 4 * P.X T ≤ ε * T := by - have := (div_le_iff₀ hT).1 hsX; linarith - have hs0' : l T ^ 4 ≤ ε * T := by - have := (div_le_iff₀ hT).1 hs0; linarith + · rw [frobSq_hat', hDeq, Transfer.frobSq_ofReal_fin (M := fun k l' => GentryNu (Pc p.X (g k l')) p Fn k l')] have i1 : 2 * A * ρ₀ ^ 2 / a₀ ^ 2 * T ≤ η ^ 2 / (8 * π) * (T * l T) := by - -- l ≥ 16πAρ₀²/(a₀²η²) have hl' : 16 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2) ≤ l T := by - have : 16 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2) ≤ 32 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2) := by - gcongr; norm_num + have : 16 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2) ≤ 32 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2) := by gcongr; norm_num linarith - have h2 : 2 * A * ρ₀ ^ 2 / a₀ ^ 2 = η ^ 2 / (8 * π) * (16 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2)) := by - field_simp; ring - rw [h2, mul_assoc] - gcongr η ^ 2 / (8 * π) * ?_ - rw [mul_comm] + rw [show 2 * A * ρ₀ ^ 2 / a₀ ^ 2 * T = η ^ 2 / (8 * π) * (T * (16 * π * A * ρ₀ ^ 2 / (a₀ ^ 2 * η ^ 2))) by field_simp; ring] gcongr have i2 : 2 * A / a₀ ^ 2 * (l T ^ 4 * (1 + P.X T) / P.L T) ≤ η ^ 2 / (8 * π) * (T * l T) := by - have h1 : l T ^ 4 * (1 + P.X T) / P.L T ≤ l T ^ 4 * (1 + P.X T) := - div_le_self (by positivity) hL1 - have h2 : l T ^ 4 * (1 + P.X T) ≤ 2 * ε * T := by nlinarith - have h3 : 2 * A / a₀ ^ 2 * (2 * ε * T) = A / (A + 1) * (η ^ 2 / (8 * π) * T) := by - rw [hεdef]; field_simp; ring - have h4 : A / (A + 1) ≤ 1 := by rw [div_le_one (by positivity)]; linarith - calc 2 * A / a₀ ^ 2 * (l T ^ 4 * (1 + P.X T) / P.L T) - ≤ 2 * A / a₀ ^ 2 * (2 * ε * T) := by gcongr; exact h1.trans h2 - _ = A / (A + 1) * (η ^ 2 / (8 * π) * T) := h3 - _ ≤ 1 * (η ^ 2 / (8 * π) * T) := by gcongr - _ = η ^ 2 / (8 * π) * (T * 1) := by ring - _ ≤ η ^ 2 / (8 * π) * (T * l T) := by gcongr + have h2 : l T ^ 4 * (1 + P.X T) / P.L T ≤ 2 * ε * T := by + refine (div_le_self (by positivity) hL1).trans ?_ + linarith [(div_le_iff₀ hT).1 hsX, (div_le_iff₀ hT).1 hs0] + calc _ ≤ 2 * A / a₀ ^ 2 * (2 * ε * T) := by gcongr + _ = A / (A + 1) * (η ^ 2 / (8 * π) * T) := by dsimp only [ε]; field_simp; ring + _ ≤ 1 * (η ^ 2 / (8 * π) * T) := by gcongr; exact (div_le_one (by positivity)).mpr (by linarith) + _ ≤ η ^ 2 / (8 * π) * (T * l T) := by rw [one_mul]; gcongr; exact le_mul_of_one_le_right hT.le hl1 calc ((P'.a T * P'.L T ^ 2)⁻¹) ^ 2 * ∑ k ∈ Finset.range p.d, ∑ l' ∈ Finset.range p.d, GentryNu (Pc p.X (g k l')) p Fn k l' ^ 2 ≤ ((a₀ * P.L T ^ 2)⁻¹) ^ 2 * (2 * (K₁ * ρ ^ 2 + K₀)) := - mul_le_mul hinv2 hfrob (by positivity) (sq_nonneg _) + mul_le_mul (pow_le_pow_left₀ (inv_nonneg.2 haL.le) hinv 2) hfrob (by positivity) (sq_nonneg _) _ = 2 * A * ρ₀ ^ 2 / a₀ ^ 2 * T + 2 * A / a₀ ^ 2 * (l T ^ 4 * (1 + P.X T) / P.L T) := by - rw [hK₁, hK₀, hρ]; field_simp - _ ≤ η ^ 2 / (8 * π) * (T * l T) + η ^ 2 / (8 * π) * (T * l T) := add_le_add i1 i2 - _ = η ^ 2 * (T * l T / (4 * π)) := by ring + dsimp only [K₁, K₀, ρ]; field_simp + _ ≤ η ^ 2 * (T * l T / (4 * π)) := by + linarith [add_le_add i1 i2, + show η ^ 2 / (8 * π) * (T * l T) + η ^ 2 / (8 * π) * (T * l T) = η ^ 2 * (T * l T / (4 * π)) by ring] _ ≤ η ^ 2 * (Z.N T (2 * T) : ℝ) := by gcongr /-- **[XF′ Lemma 6.1]** for ξ′: D = M − Mᵀ (Gp1 vs GpC, base L_T) is HatNegligible. -/ @@ -816,7 +673,55 @@ lemma sum_fin_fin_eq (d : ℕ) (f : ℕ → ℕ → ℝ) : _ = ∑ k ∈ Finset.range d, ∑ l ∈ Finset.range d, f k l := Fin.sum_univ_eq_sum_range (fun k => ∑ l ∈ Finset.range d, f k l) d -set_option maxHeartbeats 800000 in +/-- Pure-algebra step for `reexpansionGeom_of`: combines `PPUpper` with `H1/H2/H3` bounds. -/ +private lemma ppUpper_poly_bound {C C' A₁ T Lr lr Xr ρr S Ssq Sdiv : ℝ} + (hCC' : C ≤ C') (hC'1 : 1 ≤ C') (hA₁1 : 1 ≤ A₁) (hT : 0 < T) (hL1 : 1 ≤ Lr) (hl1 : 1 ≤ lr) + (hX0 : 0 ≤ Xr) (hXT : Xr ≤ T) (hρ0 : 0 ≤ ρr) (hρ1 : ρr ≤ 1) + (hS0 : 0 ≤ S) (hSsq0 : 0 ≤ Ssq) (hSdiv0 : 0 ≤ Sdiv) + (hH1 : S ≤ A₁ * ρr * Real.sqrt Xr * lr) (hH2 : Ssq ≤ A₁ * ρr ^ 2 * Xr * lr ^ 2) + (hH3 : Sdiv ≤ A₁ * ρr ^ 2 * lr ^ 2 * (1 + Lr)) : + C * Lr ^ 2 * (T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2) + ≤ (4 * C' * A₁ ^ 2) * ρr ^ 2 * (Lr ^ 4 * T * lr ^ 2) + + (4 * C' * A₁ ^ 2) * (Lr ^ 3 * lr ^ 4 * (1 + Xr)) := by + have hsX : Real.sqrt Xr ^ 2 = Xr := Real.sq_sqrt hX0 + have hSsq' : S ^ 2 ≤ A₁ ^ 2 * ρr ^ 2 * Xr * lr ^ 2 := by + calc S ^ 2 ≤ (A₁ * ρr * Real.sqrt Xr * lr) ^ 2 := pow_le_pow_left₀ hS0 hH1 2 + _ = A₁ ^ 2 * ρr ^ 2 * Real.sqrt Xr ^ 2 * lr ^ 2 := by ring + _ = A₁ ^ 2 * ρr ^ 2 * Xr * lr ^ 2 := by rw [hsX] + have hend : (lr + S) ^ 2 ≤ 2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr) := by + have hSle : S ^ 2 ≤ A₁ ^ 2 * Xr * lr ^ 2 := + hSsq'.trans (by nlinarith [show ρr ^ 2 ≤ 1 by nlinarith, show 0 ≤ A₁ ^ 2 * Xr * lr ^ 2 by positivity]) + nlinarith [sq_nonneg (lr - S), show 1 ≤ A₁ ^ 2 by nlinarith, sq_nonneg lr] + have hlogl : Real.log lr ≤ lr := by linarith [Real.log_le_sub_one_of_pos (by linarith : 0 < lr)] + have hlogl0 : 0 ≤ Real.log lr := Real.log_nonneg hl1 + have hstep : C * Lr ^ 2 * (T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2) + ≤ C' * Lr ^ 2 * (T * Lr * (A₁ * ρr ^ 2 * lr ^ 2 * (1 + Lr)) + Lr * (A₁ * ρr ^ 2 * Xr * lr ^ 2) + + Lr * (A₁ ^ 2 * ρr ^ 2 * Xr * lr ^ 2)) + + C' * Lr ^ 2 * (Lr * lr * lr * (2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr))) := by + have h1 : C * Lr ^ 2 * (T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2) + ≤ C' * Lr ^ 2 * (T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2) := by + gcongr + refine h1.trans ?_ + rw [← mul_add] + gcongr + refine hstep.trans (add_le_add ?_ ?_) + · have i3 : A₁ * (T * (1 + Lr)) + (A₁ + A₁ ^ 2) * Xr ≤ 4 * A₁ ^ 2 * (Lr * T) := by + have hA2 : A₁ ≤ A₁ ^ 2 := by nlinarith + have hXle : Xr ≤ Lr * T := by nlinarith + have h1 : A₁ * (T * (1 + Lr)) ≤ 2 * A₁ ^ 2 * (Lr * T) := by + have : T * (1 + Lr) ≤ 2 * (Lr * T) := by nlinarith + nlinarith [show 0 ≤ Lr * T by positivity] + have h2 : (A₁ + A₁ ^ 2) * Xr ≤ 2 * A₁ ^ 2 * (Lr * T) := by + nlinarith [show 0 ≤ Lr * T by positivity] + linarith + calc C' * Lr ^ 2 * (T * Lr * (A₁ * ρr ^ 2 * lr ^ 2 * (1 + Lr)) + Lr * (A₁ * ρr ^ 2 * Xr * lr ^ 2) + + Lr * (A₁ ^ 2 * ρr ^ 2 * Xr * lr ^ 2)) + = C' * ρr ^ 2 * lr ^ 2 * Lr ^ 3 * (A₁ * (T * (1 + Lr)) + (A₁ + A₁ ^ 2) * Xr) := by ring + _ ≤ C' * ρr ^ 2 * lr ^ 2 * Lr ^ 3 * (4 * A₁ ^ 2 * (Lr * T)) := + mul_le_mul_of_nonneg_left i3 (by positivity) + _ = 4 * C' * A₁ ^ 2 * ρr ^ 2 * (Lr ^ 4 * T * lr ^ 2) := by ring + · nlinarith [show 0 ≤ C' * A₁ ^ 2 * (Lr ^ 3 * lr ^ 4 * (1 + Xr)) by positivity] + /-- Reexpansion + PPUpper ⇒ the geometric form, with A' = 4·max(C,1)·max(A,1)² and T₀' large (L ≥ 1, l ≥ max(1,ρ₀), 2 ≤ X ≤ T, T past all thresholds). -/ theorem reexpansionGeom_of (Pf : ℝ → Params) (P : Params) (hP : P.Valid) @@ -827,178 +732,61 @@ theorem reexpansionGeom_of (Pf : ℝ → Params) (P : Params) (hP : P.Valid) ∃ A' T₀' : ℝ, 0 ≤ A' ∧ ReexpansionGeom Pf Λ₀ c e ρ₀ A' T₀' := by obtain ⟨T₁, hcore⟩ := hcore obtain ⟨C, T₂, hPP⟩ := hPP - set C' := max C 1 with hC' - set A₁ := max A 1 with hA₁ + set C' := max C 1 + set A₁ := max A 1 have hC'1 : 1 ≤ C' := le_max_right _ _ have hA₁1 : 1 ≤ A₁ := le_max_right _ _ - have hCC' : C ≤ C' := le_max_left _ _ - have hAA₁ : A ≤ A₁ := le_max_left _ _ - have hC'0 : 0 ≤ C' := by linarith - have hA₁0 : 0 ≤ A₁ := by linarith - have hA₁sq : A₁ ≤ A₁ ^ 2 := by nlinarith - set A' := 4 * C' * A₁ ^ 2 with hA' - have hA'0 : 0 ≤ A' := by positivity - have hA₁A' : A₁ ≤ A' := by - rw [hA']; nlinarith [mul_nonneg hC'0 (sq_nonneg A₁)] - have hAA' : A ≤ A' := hAA₁.trans hA₁A' + set A' := 4 * C' * A₁ ^ 2 have hLtop := Assembly.tendsto_L_atTop P hP.lam_pos - have hXtop : Tendsto (fun T => P.X T) atTop atTop := Real.tendsto_exp_atTop.comp hLtop have hev : ∀ᶠ T in atTop, T₀ ≤ T ∧ T₁ ≤ T ∧ T₂ ≤ T ∧ 0 < T ∧ 1 ≤ l T ∧ ρ₀ ≤ l T ∧ 1 ≤ P.L T ∧ 2 ≤ P.X T := by filter_upwards [eventually_ge_atTop T₀, eventually_ge_atTop T₁, eventually_ge_atTop T₂, eventually_gt_atTop (0:ℝ), Assembly.eventually_one_le_l, Assembly.tendsto_l_atTop.eventually_ge_atTop ρ₀, hLtop.eventually_ge_atTop 1, - hXtop.eventually_ge_atTop 2] with T h0 h1 h2 h3 h4 h5 h6 h7 + (Real.tendsto_exp_atTop.comp hLtop).eventually_ge_atTop 2] with T h0 h1 h2 h3 h4 h5 h6 h7 exact ⟨h0, h1, h2, h3, h4, h5, h6, h7⟩ obtain ⟨T₀', hT₀'⟩ := Filter.eventually_atTop.1 hev - refine ⟨A', T₀', hA'0, ?_⟩ - have hXexp : ∀ T, 0 ≤ l T → P.X T ≤ Real.exp (l T) := by - intro T hl - unfold Params.X Params.L - exact Real.exp_le_exp.2 (by nlinarith [hP.lam_le_one, hl]) + refine ⟨A', T₀', by positivity, ?_⟩ + have hXexp : ∀ T, 0 ≤ l T → P.X T ≤ Real.exp (l T) := fun T hl => + Real.exp_le_exp.2 (by unfold Params.L; nlinarith [hP.lam_le_one]) constructor - · intro T hT δ hδ N _ - exact hE.expand T (hT₀' T hT).1 δ hδ N + · intro T hT δ hδ N _; exact hE.expand T (hT₀' T hT).1 δ hδ N · exact hE.e_one · intro T hT r hr - obtain ⟨h0, -, -, hTpos, hl1, hρl, hL1, hX2⟩ := hT₀' T hT - have hXf : (Pf T).X T = P.X T := fam_X hPf T - rw [hXf] - have H1 := hE.H1 T h0 r hr (P.X T) hX2 (hXexp T (by linarith)) - have hρr : 0 ≤ (ρ₀ / l T) ^ r := by positivity - calc S1 (e T r) (P.X T) ≤ A * (ρ₀ / l T) ^ r * Real.sqrt (P.X T) * l T := H1 - _ ≤ A' * (ρ₀ / l T) ^ r * Real.sqrt (P.X T) * l T := by gcongr - _ = A' * (ρ₀ / l T) ^ r * (Real.sqrt (P.X T) * l T) := by ring + obtain ⟨h0, -, -, -, hl1, -, -, hX2⟩ := hT₀' T hT + rw [fam_X hPf T] + have hAA' : A ≤ A' := (le_max_left A 1).trans (by nlinarith [mul_nonneg (show 0 ≤ C' by linarith) (sq_nonneg A₁)]) + exact (hE.H1 T h0 r hr (P.X T) hX2 (hXexp T (by linarith))).trans + (by rw [mul_assoc]; gcongr) · intro T hT r hr obtain ⟨h0, h1, h2, hTpos, hl1, hρl, hL1, hX2⟩ := hT₀' T hT have hXe := hXexp T (by linarith) - have hXT : P.X T ≤ T := by - have := hXe - rw [l, Real.exp_log (by positivity)] at this - have : T / (2 * π) ≤ T := div_le_self hTpos.le (by linarith [Real.pi_gt_three]) - linarith have hLf : (Pf T).L T = P.L T := fam_L hPf T have hXf : (Pf T).X T = P.X T := fam_X hPf T - have hF := hcore T h1 - have hpp0 := hPP ((Pf T).toSetting T) ((Pf T).localFun T) (e T r) (hPf T).1 h2 hF (hE.e_one T r) have hpp := (sum_fin_fin_eq ((Pf T).toSetting T).d (fun k l => GentryNu (Pc ((Pf T).toSetting T).X (e T r)) ((Pf T).toSetting T) ((Pf T).localFun T) k l ^ 2)).symm.trans_le - hpp0 - have H3 := hE.H3 T h0 r hr (P.X T) hX2 hXe - have H2 := hE.H2 T h0 r hr (P.X T) hX2 hXe - have H1 := hE.H1 T h0 r hr (P.X T) hX2 hXe - have hlogX : Real.log (P.X T) = P.L T := by unfold Params.X; exact Real.log_exp _ - rw [hlogX] at H3 - -- abstract scalars → concrete - have eL : ((Pf T).toSetting T).L = P.L T := hLf - have eX : ((Pf T).toSetting T).X = P.X T := hXf - have el : ((Pf T).toSetting T).l = l T := rfl - have eT : ((Pf T).toSetting T).T = T := rfl - have ed : ((Pf T).toSetting T).d = (Pf T).d T := rfl - rw [eL, eX, el, eT, ed] at hpp - rw [hLf, hXf] + (hPP ((Pf T).toSetting T) ((Pf T).localFun T) (e T r) (hPf T).1 h2 (hcore T h1) (hE.e_one T r)) + have hρ1 : (ρ₀ / l T) ^ r ≤ 1 := pow_le_one₀ (by positivity) ((div_le_one (by linarith)).mpr hρl) + have hρsq : ((ρ₀ / l T) ^ r) ^ 2 = (ρ₀ / l T) ^ (2 * r) := by rw [← pow_mul, mul_comm] + have H1' : S1 (e T r) (P.X T) ≤ A₁ * (ρ₀ / l T) ^ r * Real.sqrt (P.X T) * l T := + (hE.H1 T h0 r hr (P.X T) hX2 hXe).trans (by gcongr; exact le_max_left _ _) + have H2' : (∑ N ∈ Finset.Ioc 0 ⌊P.X T⌋₊, ‖e T r N‖ ^ 2) ≤ A₁ * ((ρ₀ / l T) ^ r) ^ 2 * P.X T * l T ^ 2 := by + rw [hρsq]; exact (hE.H2 T h0 r hr (P.X T) hX2 hXe).trans (by gcongr; exact le_max_left _ _) + have H3' : (∑ N ∈ Finset.Ioc 0 ⌊P.X T⌋₊, ‖e T r N‖ ^ 2 / N) ≤ A₁ * ((ρ₀ / l T) ^ r) ^ 2 * l T ^ 2 * (1 + P.L T) := by + have := hE.H3 T h0 r hr (P.X T) hX2 hXe + rw [show Real.log (P.X T) = P.L T from Real.log_exp _, ← hρsq] at this + exact this.trans (by gcongr; exact le_max_left _ _) + have hpoly := ppUpper_poly_bound (le_max_left C 1) hC'1 hA₁1 hTpos hL1 hl1 (by linarith) + (X_le_T_of_valid hP hTpos (by linarith)) (by positivity) hρ1 + (S1_nonneg _ _) (Finset.sum_nonneg fun _ _ => by positivity) (Finset.sum_nonneg fun _ _ => by positivity) + H1' H2' H3' + rw [hρsq] at hpoly + have hsetT : ((Pf T).toSetting T).T = T := rfl + have hsetL : ((Pf T).toSetting T).L = P.L T := hLf + have hsetX : ((Pf T).toSetting T).X = P.X T := hXf + have hsetl : ((Pf T).toSetting T).l = l T := rfl refine hpp.trans ?_ - set Xr := P.X T with hXr - set Lr := P.L T with hLr - set lr := l T with hlr - set ρ' : ℝ := (ρ₀ / lr) ^ (2 * r) with hρ' - set S := S1 (e T r) Xr with hS - set Ssq := ∑ N ∈ Finset.Ioc 0 ⌊Xr⌋₊, ‖e T r N‖ ^ 2 with hSsq - set Sdiv := ∑ N ∈ Finset.Ioc 0 ⌊Xr⌋₊, ‖e T r N‖ ^ 2 / N with hSdiv - have hρ'0 : 0 ≤ ρ' := by positivity - have hlr0 : 0 < lr := by linarith - have hρle : ρ₀ / lr ≤ 1 := by rw [div_le_one hlr0]; exact hρl - have hρq0 : 0 ≤ ρ₀ / lr := by positivity - have hρr1 : (ρ₀ / lr) ^ r ≤ 1 := pow_le_one₀ hρq0 hρle - have hρ'eq : ((ρ₀ / lr) ^ r) ^ 2 = ρ' := by rw [hρ', ← pow_mul, mul_comm] - have hS0 : 0 ≤ S := S1_nonneg _ _ - have hSsq0 : 0 ≤ Ssq := Finset.sum_nonneg fun _ _ => by positivity - have hSdiv0 : 0 ≤ Sdiv := Finset.sum_nonneg fun _ _ => by positivity - have hX0 : 0 ≤ Xr := by linarith - have hsX : Real.sqrt Xr ^ 2 = Xr := Real.sq_sqrt hX0 - have hlogl : Real.log lr ≤ lr := by - have := Real.log_le_sub_one_of_pos hlr0; linarith - have hlogl0 : 0 ≤ Real.log lr := Real.log_nonneg hl1 - -- the four coefficient inputs with A ↦ A₁ - have H2' : Ssq ≤ A₁ * ρ' * Xr * lr ^ 2 := - calc Ssq ≤ A * ρ' * Xr * lr ^ 2 := H2 - _ ≤ A₁ * ρ' * Xr * lr ^ 2 := by gcongr - have H3' : Sdiv ≤ A₁ * ρ' * lr ^ 2 * (1 + Lr) := - calc Sdiv ≤ A * ρ' * lr ^ 2 * (1 + Lr) := H3 - _ ≤ A₁ * ρ' * lr ^ 2 * (1 + Lr) := by gcongr - have hS1' : S ≤ A₁ * (ρ₀ / lr) ^ r * Real.sqrt Xr * lr := - calc S ≤ A * (ρ₀ / lr) ^ r * Real.sqrt Xr * lr := H1 - _ ≤ A₁ * (ρ₀ / lr) ^ r * Real.sqrt Xr * lr := by gcongr - have hSsq' : S ^ 2 ≤ A₁ ^ 2 * ρ' * Xr * lr ^ 2 := - calc S ^ 2 ≤ (A₁ * (ρ₀ / lr) ^ r * Real.sqrt Xr * lr) ^ 2 := pow_le_pow_left₀ hS0 hS1' 2 - _ = A₁ ^ 2 * ((ρ₀ / lr) ^ r) ^ 2 * Real.sqrt Xr ^ 2 * lr ^ 2 := by ring - _ = A₁ ^ 2 * ρ' * Xr * lr ^ 2 := by rw [hρ'eq, hsX] - have hSle : S ≤ A₁ * Real.sqrt Xr * lr := - calc S ≤ A₁ * (ρ₀ / lr) ^ r * Real.sqrt Xr * lr := hS1' - _ ≤ A₁ * 1 * Real.sqrt Xr * lr := by gcongr - _ = A₁ * Real.sqrt Xr * lr := by ring - have hend : (lr + S) ^ 2 ≤ 2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr) := by - have h1 : (lr + S) ^ 2 ≤ 2 * lr ^ 2 + 2 * S ^ 2 := by nlinarith only [sq_nonneg (lr - S)] - have h2 : S ^ 2 ≤ A₁ ^ 2 * Xr * lr ^ 2 := - calc S ^ 2 ≤ (A₁ * Real.sqrt Xr * lr) ^ 2 := pow_le_pow_left₀ hS0 hSle 2 - _ = A₁ ^ 2 * Xr * lr ^ 2 := by rw [mul_pow, mul_pow, hsX] - have h3 : lr ^ 2 ≤ A₁ ^ 2 * lr ^ 2 := by - have : 1 ≤ A₁ ^ 2 := by nlinarith only [hA₁1] - nlinarith only [this, sq_nonneg lr] - have e : 2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr) = 2 * (A₁ ^ 2 * lr ^ 2) + 2 * (A₁ ^ 2 * Xr * lr ^ 2) := by - ring - linarith only [h1, h2, h3, e] - -- C ↦ C' - have hbr0 : 0 ≤ T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2 := by - positivity - have step1 : C * Lr ^ 2 * (T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2) - ≤ C' * Lr ^ 2 * (T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2) := by - gcongr - refine step1.trans ?_ - -- the four terms - have b1 : T * Lr * Sdiv ≤ T * Lr * (A₁ * ρ' * lr ^ 2 * (1 + Lr)) := by gcongr - have b2 : Lr * Ssq ≤ Lr * (A₁ * ρ' * Xr * lr ^ 2) := by gcongr - have b3 : Lr * S ^ 2 ≤ Lr * (A₁ ^ 2 * ρ' * Xr * lr ^ 2) := by gcongr - have b4 : Lr * lr * Real.log lr * (lr + S) ^ 2 ≤ Lr * lr * lr * (2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr)) := by - gcongr - have hsum : T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2 - ≤ T * Lr * (A₁ * ρ' * lr ^ 2 * (1 + Lr)) + Lr * (A₁ * ρ' * Xr * lr ^ 2) - + Lr * (A₁ ^ 2 * ρ' * Xr * lr ^ 2) + Lr * lr * lr * (2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr)) := by - linarith only [b1, b2, b3, b4] - -- main ≤ A' ρ' L⁴ T l², end ≤ A' L³ l⁴ (1+X) - have hXLT : Xr ≤ Lr * T := by nlinarith only [hXT, hL1, hTpos] - have i1 : A₁ * (T * (1 + Lr)) ≤ A₁ * (T * (2 * Lr)) := by gcongr; linarith - have i2 : (A₁ + A₁ ^ 2) * Xr ≤ (A₁ + A₁ ^ 2) * (Lr * T) := by gcongr - have i3 : A₁ * (T * (1 + Lr)) + (A₁ + A₁ ^ 2) * Xr ≤ 4 * A₁ ^ 2 * (Lr * T) := - calc A₁ * (T * (1 + Lr)) + (A₁ + A₁ ^ 2) * Xr - ≤ A₁ * (T * (2 * Lr)) + (A₁ + A₁ ^ 2) * (Lr * T) := add_le_add i1 i2 - _ = (3 * A₁ + A₁ ^ 2) * (Lr * T) := by ring - _ ≤ (3 * A₁ ^ 2 + A₁ ^ 2) * (Lr * T) := by gcongr - _ = 4 * A₁ ^ 2 * (Lr * T) := by ring - have hpre : 0 ≤ C' * ρ' * lr ^ 2 * Lr ^ 3 := by positivity - have main : C' * Lr ^ 2 * (T * Lr * (A₁ * ρ' * lr ^ 2 * (1 + Lr)) + Lr * (A₁ * ρ' * Xr * lr ^ 2) - + Lr * (A₁ ^ 2 * ρ' * Xr * lr ^ 2)) ≤ A' * ρ' * (Lr ^ 4 * T * lr ^ 2) := - calc C' * Lr ^ 2 * (T * Lr * (A₁ * ρ' * lr ^ 2 * (1 + Lr)) + Lr * (A₁ * ρ' * Xr * lr ^ 2) - + Lr * (A₁ ^ 2 * ρ' * Xr * lr ^ 2)) - = C' * ρ' * lr ^ 2 * Lr ^ 3 * (A₁ * (T * (1 + Lr)) + (A₁ + A₁ ^ 2) * Xr) := by ring - _ ≤ C' * ρ' * lr ^ 2 * Lr ^ 3 * (4 * A₁ ^ 2 * (Lr * T)) := mul_le_mul_of_nonneg_left i3 hpre - _ = A' * ρ' * (Lr ^ 4 * T * lr ^ 2) := by rw [hA']; ring - have hpre2 : 0 ≤ C' * A₁ ^ 2 * (Lr ^ 3 * lr ^ 4 * (1 + Xr)) := by positivity - have endt : C' * Lr ^ 2 * (Lr * lr * lr * (2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr))) - ≤ A' * (Lr ^ 3 * lr ^ 4 * (1 + Xr)) := - calc C' * Lr ^ 2 * (Lr * lr * lr * (2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr))) - = 2 * (C' * A₁ ^ 2 * (Lr ^ 3 * lr ^ 4 * (1 + Xr))) := by ring - _ ≤ 4 * (C' * A₁ ^ 2 * (Lr ^ 3 * lr ^ 4 * (1 + Xr))) := by linarith only [hpre2] - _ = A' * (Lr ^ 3 * lr ^ 4 * (1 + Xr)) := by rw [hA']; ring - have hCL : 0 ≤ C' * Lr ^ 2 := by positivity - calc C' * Lr ^ 2 * (T * Lr * Sdiv + Lr * Ssq + Lr * S ^ 2 + Lr * lr * Real.log lr * (lr + S) ^ 2) - ≤ C' * Lr ^ 2 * (T * Lr * (A₁ * ρ' * lr ^ 2 * (1 + Lr)) + Lr * (A₁ * ρ' * Xr * lr ^ 2) - + Lr * (A₁ ^ 2 * ρ' * Xr * lr ^ 2) + Lr * lr * lr * (2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr))) := - mul_le_mul_of_nonneg_left hsum hCL - _ = C' * Lr ^ 2 * (T * Lr * (A₁ * ρ' * lr ^ 2 * (1 + Lr)) + Lr * (A₁ * ρ' * Xr * lr ^ 2) - + Lr * (A₁ ^ 2 * ρ' * Xr * lr ^ 2)) - + C' * Lr ^ 2 * (Lr * lr * lr * (2 * A₁ ^ 2 * lr ^ 2 * (1 + Xr))) := by ring - _ ≤ A' * ρ' * (Lr ^ 4 * T * lr ^ 2) + A' * (Lr ^ 3 * lr ^ 4 * (1 + Xr)) := add_le_add main endt + simpa only [hsetT, hsetL, hsetX, hsetl, hLf, hXf, A', C'] using hpoly /-! ## §5. The main theorem of this file -/ @@ -1019,19 +807,5 @@ theorem xiTraceTransfer_of (Z : ZeroConfig) (Pf : ℝ → Params) (F : CoeffFami /-! ## §6. The flat-window instance (Pf := fun _ => P): the family hypotheses discharged from the tree -/ -/-- **XiTraceTransfer for the flat window family** Pf = fun _ => P: the taper facts (PrimeSide.localHypsEventually -+ LocalHyps.toCore) and a ≥ 1/2 (Params.half_le_a) come from the tree, so only the genuine inputs remain. -/ -theorem xiTraceTransfer_of_flat (Z : ZeroConfig) (P : Params) (F : CoeffFamily) (hP : P.Valid) - (hlam1 : P.lam < 1) (hΓ : GammaFacts) (hR : RiemannVonMangoldt Z) (hEF : XiEF Z (fun _ => P)) - {e : ℝ → ℕ → ℕ → ℂ} {ρ₀ A T₀ : ℝ} (hρ₀ : 0 ≤ ρ₀) (hE : Reexpansion F e ρ₀ A T₀) - (hPP : PPUpper P.crho P.lam) : - XiTraceTransfer Z (fun _ => P) F := by - obtain ⟨T₁, hT₁⟩ := PrimeSide.localHypsEventually hP - refine xiTraceTransfer_of Z (fun _ => P) F P hP hlam1 (fun _ => ⟨rfl, rfl⟩) - ⟨T₁, fun T hT => (hT₁ T hT).toCore⟩ hΓ ?_ hR hEF hρ₀ hE hPP - refine ⟨1 / 2, by norm_num, ?_⟩ - filter_upwards [(Assembly.tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop (8 * P.w)] with T hwL - exact Params.half_le_a hP hwL - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Transfer/Abstract.lean b/zeta23/Zeta23/XiPrime/Transfer/Abstract.lean index 5a42f917d6..48e54e9c22 100644 --- a/zeta23/Zeta23/XiPrime/Transfer/Abstract.lean +++ b/zeta23/Zeta23/XiPrime/Transfer/Abstract.lean @@ -21,6 +21,7 @@ Contents (all over `Matrix n n ℂ`, `n` a Fintype, with RHLinalg.rtrace / frobS explicit losses. -/ import Zeta23.Assembly +import Zeta23.Tail.Basic import Mathlib.Algebra.BigOperators.Module noncomputable section @@ -63,15 +64,6 @@ lemma frobSq_hadamard_le (Δ : n → n → ℝ) (Q : Matrix n n ℂ) {θ : ℝ} have h0 : 0 ≤ |Δ i j| := abs_nonneg _ gcongr -lemma sqrt_frobSq_hadamard_le (Δ : n → n → ℝ) (Q : Matrix n n ℂ) {θ : ℝ} (hθ : 0 ≤ θ) - (hΔ : ∀ i j, |Δ i j| ≤ θ) : - Real.sqrt (frobSq (fun i j => (Δ i j : ℂ) * Q i j)) ≤ θ * Real.sqrt (frobSq Q) := by - have h := frobSq_hadamard_le Δ Q hΔ - calc Real.sqrt (frobSq (fun i j => (Δ i j : ℂ) * Q i j)) - ≤ Real.sqrt (θ ^ 2 * frobSq Q) := Real.sqrt_le_sqrt h - _ = θ * Real.sqrt (frobSq Q) := by - rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq hθ] - /-! ### B. Minkowski for a series of matrices, via partial sums -/ section Frob @@ -97,7 +89,7 @@ theorem frobSq_le_of_tendsto_partialSums (D : Matrix n n ℂ) (S : ℕ → Matri have e : ∀ M : Matrix n n ℂ, frobSq M = ∑ i, ∑ j, ‖M i j‖ ^ 2 := fun M => Assembly.frobSq_eq_sum_norm_sq M simp only [e] - refine tendsto_finset_sum _ fun i _ => tendsto_finset_sum _ fun j _ => ?_ + refine tendsto_finsetSum _ fun i _ => tendsto_finsetSum _ fun j _ => ?_ have : Tendsto (fun R => (∑ r ∈ range R, S r) i j) atTop (𝓝 (D i j)) := by simp only [Matrix.sum_apply]; exact hlim i j exact (this.norm).pow 2 @@ -107,76 +99,21 @@ end Frob /-! ### C. Abel summation with monotone bounded weights -/ -/-- If 0 ≤ w_k ≤ W is monotone and every partial sum |Σ_{k simp - | succ R ih => - rw [Finset.sum_range_succ] - have hR0 : (0:ℝ) ≤ R := Nat.cast_nonneg R - have hA : 0 < (R:ℝ) * h + 1 := by positivity - have hB : 0 < ((R:ℝ) + 1) * h + 1 := by positivity - have step : 1 / (((R:ℝ) + 1) * h + 1) ^ 2 - ≤ 1 / (h * ((R:ℝ) * h + 1)) - 1 / (h * ((((R + 1 : ℕ) : ℝ)) * h + 1)) := by - push_cast - rw [div_sub_div _ _ (by positivity) (by positivity), div_le_div_iff₀ (by positivity) - (by positivity)] - ring_nf - nlinarith [mul_pos hh hA, mul_pos hh hB, sq_nonneg h, mul_nonneg (mul_pos hh hh).le hR0] - push_cast at step ⊢ - linarith - have hR : 0 ≤ 1 / (h * ((R:ℝ) * h + 1)) := by positivity - linarith [key R] - -/-- Σ_{m simp; positivity - | succ R => - rw [Finset.sum_range_succ'] - simp only [Nat.cast_add, Nat.cast_one, Nat.cast_zero, zero_mul, zero_add, one_pow, div_one] - linarith [sum_inv_affine_sq_le hh R] + have h1 := sum_inv_affine_sq_le' hh (R + 1) + rw [Finset.sum_range_succ'] at h1 + simp only [Nat.cast_add, Nat.cast_one, Nat.cast_zero, zero_mul, zero_add, one_pow, div_one] at h1 + linarith /-- pointwise: 1/max(1, x²) ≤ 4/(|x|+1)². -/ lemma inv_max_one_sq_le (x : ℝ) : 1 / max 1 (x ^ 2) ≤ 4 / (|x| + 1) ^ 2 := by diff --git a/zeta23/Zeta23/XiPrime/Transfer/Dependence.lean b/zeta23/Zeta23/XiPrime/Transfer/Dependence.lean index 192647ee4b..97be6a0bc6 100644 --- a/zeta23/Zeta23/XiPrime/Transfer/Dependence.lean +++ b/zeta23/Zeta23/XiPrime/Transfer/Dependence.lean @@ -118,19 +118,6 @@ lemma gentryW_one_sub (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p Fn) (h GentryW 1 c₁ p Fn k l - GentryW 1 c₂ p Fn k l = GentryNu (Pc p.X (c₁ - c₂)) p Fn k l := gentryW_sub hΓ hF hX 1 c₁ c₂ hk hl -/-- **the pole-weight difference**: GentryW ϖ₁ c − GentryW ϖ₂ c = (ϖ₁ − ϖ₂)·(Π-part entry). -/ -lemma gentryW_weight_sub (hΓ : Zeta23.GammaFacts) (hF : LocalHypsCore cϱ p Fn) (hX : 0 < p.X) - (cPi₁ cPi₂ : ℝ) (c : ℕ → ℂ) {k l : ℤ} (hk : 0 < p.tau k) (hl : 0 < p.tau l) : - GentryW cPi₁ c p Fn k l - GentryW cPi₂ c p Fn k l - = (cPi₁ - cPi₂) * GentryNu (Zeta23.PiX p.X) p Fn k l := by - simp only [GentryW, GentryNu] - rw [← integral_sub (integrable_gentryW_integrand hΓ hF hX cPi₁ c hk hl) - (integrable_gentryW_integrand hΓ hF hX cPi₂ c hk hl), ← integral_const_mul] - congr 1 - funext τ - simp only [nucW] - ring - section Qsum variable (p Fn) @@ -168,7 +155,7 @@ lemma gentryNu_Pc_eq_sum (hF : LocalHypsCore cϱ p Fn) (e : ℕ → ℂ) (k l : rw [Finset.mul_sum, Finset.mul_sum] refine Finset.sum_congr rfl fun N _ => ?_ field_simp - rw [h1, integral_finset_sum] + rw [h1, MeasureTheory.integral_finsetSum] · refine Finset.sum_congr rfl fun N _ => ?_ have ic : Integrable (fun τ => Fn.phiHat (τ - p.tau k) * Fn.phiHat (τ - p.tau l) * (Real.cos (τ * Real.log N) / (Real.pi * Real.sqrt N))) := @@ -221,76 +208,12 @@ theorem hasSum_gentryNu_Pc (hF : LocalHypsCore cϱ p Fn) {g : ℕ → ℂ} {e : /-! ### B. The Dirichlet kernel for every K, and Abel summation with complex summands -/ -/-- A_φ(y)·‖Σ_{k ?_ - rw [← Complex.exp_add] - congr 1 - simp only [Setting.tau] - push_cast - ring - have hnorm : ‖∑ k ∈ Finset.range K, Complex.exp ((-(p.tau k * y) : ℝ) * Complex.I)‖ - = ‖∑ k ∈ Finset.range K, Complex.exp (((k : ℝ) * (-(p.h * y)) : ℝ) * Complex.I)‖ := by - rw [hfac, norm_mul, Complex.norm_exp_ofReal_mul_I, one_mul] - have hdir := ThmE.abs_sin_mul_norm_geom_le (-(p.h * y)) K - have hsin_eq : |Real.sin (-(p.h * y) / 2)| = Real.sin (π * y / p.L) := by - have hθ : p.h * y / 2 = π * y / p.L := by - simp only [Setting.h] - field_simp - rw [show -(p.h * y) / 2 = -(p.h * y / 2) by ring, Real.sin_neg, abs_neg, hθ] - rw [abs_of_nonneg] - apply Real.sin_nonneg_of_nonneg_of_le_pi - · positivity - · rw [div_le_iff₀ hL] - nlinarith [Real.pi_pos] - have hsin : 2 * m / p.L ≤ Real.sin (π * y / p.L) := two_min_div_le_sin hL hy0.le hyL.le - rw [hnorm] - set S := ‖∑ k ∈ Finset.range K, Complex.exp (((k : ℝ) * (-(p.h * y)) : ℝ) * Complex.I)‖ - with hS - have hS0 : 0 ≤ S := norm_nonneg _ - rw [hsin_eq] at hdir - have hS1 : 2 * m / p.L * S ≤ 1 := - (mul_le_mul_of_nonneg_right hsin hS0).trans hdir - have hS2 : 2 * m * S ≤ p.L := by - have h4 := mul_le_mul_of_nonneg_left hS1 hL.le - rw [mul_one, ← mul_assoc, mul_div_cancel₀ _ hL.ne'] at h4 - linarith - have hA1 : Fn.Aphi y ≤ p.L - y := (hF.Aphi_le y).trans (by simp [hyabs, hyL.le]) - have key : (p.L - y) * Real.log 2 ≤ p.L * m := by - rcases le_total y (p.L - y) with h | h - · rw [hm, min_eq_left h] - nlinarith - · rw [hm, min_eq_right h] - nlinarith - rw [le_div_iff₀ (by positivity)] - calc Fn.Aphi y * S * (2 * Real.log 2) = (Fn.Aphi y * Real.log 2) * (2 * S) := by ring - _ ≤ ((p.L - y) * Real.log 2) * (2 * S) := by gcongr - _ ≤ (p.L * m) * (2 * S) := by gcongr - _ = p.L * (2 * m * S) := by ring - _ ≤ p.L * p.L := by gcongr - _ = p.L ^ 2 := (sq _).symm + ≤ p.L ^ 2 / (2 * Real.log 2) := + PrimeSide.Aphi_mul_norm_tauKernel_le_of hF hy K /-- Abel summation with monotone bounded real weights and vector summands: ‖Σ_{k x ^ (r + 1)) (x * (1 - x)⁻¹) := by have := (hasSum_geometric_of_lt_one hx0 hx1).mul_left x diff --git a/zeta23/Zeta23/XiPrime/Transfer/Inputs.lean b/zeta23/Zeta23/XiPrime/Transfer/Inputs.lean index 9ccd29e1f0..6aac89770b 100644 --- a/zeta23/Zeta23/XiPrime/Transfer/Inputs.lean +++ b/zeta23/Zeta23/XiPrime/Transfer/Inputs.lean @@ -17,25 +17,9 @@ namespace Zeta23 namespace Params variable (P : Params) (T : ℝ) -/-- Q_{kl}(e) := ∫ φ̂(τ−τ_k) φ̂(τ−τ_l) P_e(X; τ) dτ — the P-part Gram entry for an arbitrary coefficient -sequence e : ℕ → ℂ ([XF′ Lemma 6.1]: "Q^{(r)} = the PP-part of the paper's Gram matrix for -coefficients e_r"). ONE parenthesised product under the binder. Equals -PrimeSide.GentryNu (XiPrime.Pc p.X e) p F k l at p = P.toSetting T, F = P.localFun T, by rfl -(QpEntry_eq_GentryNu below). -/ -def QpEntry (e : ℕ → ℂ) (k l : ℤ) : ℝ := - ∫ τ : ℝ, (P.phiHatR T (τ - P.tau T k) * P.phiHatR T (τ - P.tau T l) * XiPrime.Pc (P.X T) e τ) - -/-- the d×d matrix (Q_{kl}(e))_{0≤k,l (P.QpEntry T e (k : ℤ) (l : ℤ) : ℂ) - /-- δ_{kl} := ½ log(τ⋆_{kl}/T) [XF′ Lemma 6.1]: L⋆^{kl} = L_T + δ_{kl}, δ_{kl} ∈ [0, ½ log 2]. -/ def deltaKL (k l : ℤ) : ℝ := Real.log (P.tauStar T k l / T) / 2 -lemma QpEntry_eq_GentryNu (e : ℕ → ℂ) (k l : ℤ) : - P.QpEntry T e k l - = PrimeSide.GentryNu (XiPrime.Pc (P.toSetting T).X e) (P.toSetting T) (P.localFun T) k l := rfl - lemma GentryC_eq_GentryW (c : ℕ → ℂ) (k l : ℤ) : P.GentryC T c k l = XiPrime.GentryW 1 c (P.toSetting T) (P.localFun T) k l := rfl diff --git a/zeta23/Zeta23/XiPrime/Transfer/InputsW.lean b/zeta23/Zeta23/XiPrime/Transfer/InputsW.lean deleted file mode 100644 index 5eb3ce2127..0000000000 --- a/zeta23/Zeta23/XiPrime/Transfer/InputsW.lean +++ /dev/null @@ -1,50 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Part of the Zeta23 formalization. - -Z′ (Hardy W) analogue, TRACE TRANSFER: the coefficient INPUT proposition of -the W analogue of [XF′ Lemma 6.1] (produced by theorem wReexpansion). - -`Reexpansion` with ONE change, in the field `expand`: the base point is the REAL -parameter ½ l(T) (= Defs.L2star at τ⋆ = T; [XF′ §9.3(ii)]: "C(N; ½ l) (REAL parameter, no phase)") instead of -L_T = ½l + iπ/4. With L_{2⋆}(τ⋆_{kl}) = ½ log(τ⋆/2π) = ½ l + δ_{kl}, δ_{kl} = ½ log(τ⋆_{kl}/T) ∈ [0, ½ log 2] ⊆ [0, 1/2] -exactly as for ξ′, the expansion is on δ ∈ Icc 0 (1/2). This is the right -sentence for F = wCoeffFamily (F.c T N = xiCoeff ((l T / 2 : ℝ) : ℂ) N by rfl). --/ -import Zeta23.XiPrime.Transfer.Inputs - -noncomputable section - -open Finset Filter Real -open scoped BigOperators - -namespace Zeta23 -namespace XiPrime - -/-- **The re-expansion input for the Z′ coefficients** [XF′ §6 at the real base ½l; §9.3(ii)]. -Provided by the theorem `wReexpansion : ∃ e ρ₀ A T₀, 0 ≤ ρ₀ ∧ ReexpansionW wCoeffFamily e ρ₀ A T₀`, -with e T r N = Σ_{j<Ω(N)} binom(−(j+1), r) (½l)^{−(j+1)−r} [(Λ·log)∗Λ^{∗j}](N). Constants are T-uniform; sums over -N ∈ Finset.Ioc 0 ⌊x⌋₊ for 2 ≤ x ≤ e^{l(T)}; 0 ≤ A is not carried (derivable from H3). -/ -structure ReexpansionW (F : CoeffFamily) (e : ℝ → ℕ → ℕ → ℂ) (ρ₀ A T₀ : ℝ) : Prop where - /-- C(N; ½l + δ) − c^{(T)}_N = Σ_{r≥1} e_r(N) δ^r on δ ∈ [0, 1/2] (absolutely convergent: |δ| < ½l once l > 1). -/ - expand : ∀ T : ℝ, T₀ ≤ T → ∀ δ : ℝ, δ ∈ Set.Icc (0:ℝ) (1 / 2) → ∀ N : ℕ, - HasSum (fun r : ℕ => e T (r + 1) N * (δ : ℂ) ^ (r + 1)) - (xiCoeff (((l T / 2 : ℝ) : ℂ) + δ) N - F.c T N) - /-- e_r(1) = 0. -/ - e_one : ∀ T : ℝ, ∀ r : ℕ, e T r 1 = 0 - /-- (H1)_r: Σ_{N≤x} |e_r(N)| N^{−1/2} ≤ A (ρ₀/l)^r √x · l. -/ - H1 : ∀ T : ℝ, T₀ ≤ T → ∀ r : ℕ, 1 ≤ r → ∀ x : ℝ, 2 ≤ x → x ≤ Real.exp (l T) → - (∑ N ∈ Finset.Ioc 0 ⌊x⌋₊, ‖e T r N‖ / Real.sqrt N) ≤ A * (ρ₀ / l T) ^ r * Real.sqrt x * l T - /-- (H2)_r: Σ_{N≤x} |e_r(N)|² ≤ A (ρ₀/l)^{2r} x l². -/ - H2 : ∀ T : ℝ, T₀ ≤ T → ∀ r : ℕ, 1 ≤ r → ∀ x : ℝ, 2 ≤ x → x ≤ Real.exp (l T) → - (∑ N ∈ Finset.Ioc 0 ⌊x⌋₊, ‖e T r N‖ ^ 2) ≤ A * (ρ₀ / l T) ^ (2 * r) * x * l T ^ 2 - /-- (H3)_r: Σ_{N≤x} |e_r(N)|²/N ≤ A (ρ₀/l)^{2r} l² (1 + log x). -/ - H3 : ∀ T : ℝ, T₀ ≤ T → ∀ r : ℕ, 1 ≤ r → ∀ x : ℝ, 2 ≤ x → x ≤ Real.exp (l T) → - (∑ N ∈ Finset.Ioc 0 ⌊x⌋₊, ‖e T r N‖ ^ 2 / N) ≤ A * (ρ₀ / l T) ^ (2 * r) * l T ^ 2 * (1 + Real.log x) - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Transfer/W.lean b/zeta23/Zeta23/XiPrime/Transfer/W.lean deleted file mode 100644 index 812c26bf4f..0000000000 --- a/zeta23/Zeta23/XiPrime/Transfer/W.lean +++ /dev/null @@ -1,361 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Part of the Zeta23 formalization. - -Zeta23/XiPrime/Transfer/W.lean — Z′ (Hardy W) case: **the W trace transfer**. -Target (StatementW.lean §W3): XiTraceTransfer Z Pf wCoeffFamily at Z = wZeros hZ hs, i.e. the SAME Prop as -for ξ′ — comparison matrix GpC (F.c T), pole weight 1 — starting from the W explicit formula WEF (main term GpW1: -coefficients C(N; L_{2⋆}(τ⋆_{kl})), L_{2⋆} REAL, pole weight 2). - -ROUTE. G − Mᵀ = (G − M^𝒵) + (M^𝒵 − M^{c,2}) + (M^{c,2} − M^{c,1}), each HatNegligible: - • G − M^𝒵: [XF′ 5.1] engine hatNegligible_of_entryBound fed by WEF; - • M^𝒵 − M^{c,2}: [XF′ 6.1] engine hatNegligible_of_geom at the REAL base ½l (L_{2⋆}(τ⋆) = ½l + δ_{kl}, the same - δ_{kl} = ½log(τ⋆/T) ∈ [0, ½log 2]), input ReexpansionW (Transfer/InputsW.lean); - • M^{c,2} − M^{c,1} = the Π-part Gram matrix (∫ φ̂_k φ̂_l Π_X)_{kl} ([XF′ §9.3(i)]): by |Π_X(t+r)| ≤ 6√X/t + 12√X r²/t² - (PrimeSide.PiX_shift_bound) every entry is ≤ 6√X·2πaL/T + 12√X(8+2(cϱ/w)²)/T², so the hat-trace - is ≪ √X = o(N) and the hat-Frobenius² is ≪ X = o(N) (X ≤ T, l → ∞; no λ < 1 needed here). --/ -import Zeta23.XiPrime.Transfer -import Zeta23.XiPrime.Transfer.InputsW -import Zeta23.XiPrime.StatementW -import Zeta23.XiPrime.PrimeSide.Moments - -noncomputable section - -open Finset Filter Topology RHLinalg MeasureTheory Real -open scoped BigOperators - -namespace Zeta23 - -namespace Params -variable (P : Params) (T : ℝ) - -lemma GentryCW_eq_GentryW (cPi : ℝ) (c : ℕ → ℂ) (k l : ℤ) : - P.GentryCW T cPi c k l = XiPrime.GentryW cPi c (P.toSetting T) (P.localFun T) k l := rfl - -end Params - -namespace XiPrime -open PrimeSide - -/-- the Z′ base point ½ l(T) ∈ ℂ (real; = Defs.L2star at τ⋆ = T). -/ -def L2T (T : ℝ) : ℂ := ((l T / 2 : ℝ) : ℂ) - -theorem ReexpansionW.toAt {F : CoeffFamily} {e : ℝ → ℕ → ℕ → ℂ} {ρ₀ A T₀ : ℝ} - (h : ReexpansionW F e ρ₀ A T₀) : ReexpansionAt L2T F.c e ρ₀ A T₀ := - ⟨h.expand, h.e_one, h.H1, h.H2, h.H3⟩ - -/-- L_{2⋆}(τ⋆) = ½l + ½log(τ⋆/T). -/ -lemma L2star_eq_L2T_add (T : ℝ) {τs : ℝ} (hT : 0 < T) (hτ : 0 < τs) : - ((L2star τs : ℝ) : ℂ) = L2T T + ((Real.log (τs / T) / 2 : ℝ) : ℂ) := by - unfold L2star L2T l - have h2π : (0:ℝ) < 2 * Real.pi := by positivity - rw [Real.log_div hτ.ne' h2π.ne', Real.log_div hT.ne' h2π.ne', Real.log_div hτ.ne' hT.ne'] - push_cast - ring - -/-- the entries of M^𝒵 − M^{c,2}: P-part entries of the coefficient differences (μ, 2Π_X cancel). -/ -lemma GpW1_sub_GpCW_apply (P : Params) (T : ℝ) {cϱ : ℝ} (hΓ : GammaFacts) - (hF : LocalHypsCore cϱ (P.toSetting T) (P.localFun T)) (hX : 0 < P.X T) (hT : 0 < T) - (hh : 0 ≤ P.hgrid T) (c : ℕ → ℂ) (k l : Fin (P.d T)) : - (P.GpW1 T - P.GpCW T 2 c) k l - = ((GentryNu (Pc (P.toSetting T).X (xiCoeff ((L2star (P.tauStar T k l) : ℝ) : ℂ) - c)) - (P.toSetting T) (P.localFun T) k l : ℝ) : ℂ) := by - have hk := tau_pos P T (k := k) hT hh - have hl := tau_pos P T (k := l) hT hh - rw [Matrix.sub_apply] - simp only [Params.GpW1, Params.GpCW, Params.GentryW1] - rw [← Complex.ofReal_sub, Params.GentryCW_eq_GentryW, Params.GentryCW_eq_GentryW, - Transfer.gentryW_sub hΓ hF hX 2 _ _ hk hl] - -/-- the entries of M^{c,2} − M^{c,1}: the Π-part Gram matrix. -/ -lemma GpCW_two_sub_GpC_apply (P : Params) (T : ℝ) {cϱ : ℝ} (hΓ : GammaFacts) - (hF : LocalHypsCore cϱ (P.toSetting T) (P.localFun T)) (hX : 0 < P.X T) (hT : 0 < T) - (hh : 0 ≤ P.hgrid T) (c : ℕ → ℂ) (k l : Fin (P.d T)) : - (P.GpCW T 2 c - P.GpC T c) k l - = ((GentryNu (Zeta23.PiX (P.toSetting T).X) (P.toSetting T) (P.localFun T) k l : ℝ) : ℂ) := by - have hk := tau_pos P T (k := k) hT hh - have hl := tau_pos P T (k := l) hT hh - rw [XiPrime.GpC_eq_GpCW, Matrix.sub_apply] - simp only [Params.GpCW] - rw [← Complex.ofReal_sub, Params.GentryCW_eq_GentryW, Params.GentryCW_eq_GentryW, - Transfer.gentryW_weight_sub hΓ hF hX 2 1 c hk hl] - norm_num - -/-! ### The Π-part entries are uniformly small -/ - -section PiPart -variable {cϱ : ℝ} {p : Setting} {Fn : LocalFun} - -/-- ∫ φ̂(τ−t)² |Π_X(τ)| dτ ≤ 6√X·2πaL/t + 12√X(8+2(cϱ/w)²)/t² for t ≥ 2. -/ -lemma integral_phiHat_sq_abs_PiX_le (hF : LocalHypsCore cϱ p Fn) {t : ℝ} (ht : 2 ≤ t) : - ∫ τ, Fn.phiHat (τ - t) ^ 2 * |Zeta23.PiX p.X τ| - ≤ 6 * Real.sqrt p.X / t * (2 * π * Fn.a * p.L) - + 12 * Real.sqrt p.X / t ^ 2 * (8 + 2 * (cϱ / p.w) ^ 2) := by - have htr : (∫ τ, Fn.phiHat (τ - t) ^ 2 * |Zeta23.PiX p.X τ|) - = ∫ r, Fn.phiHat r ^ 2 * |Zeta23.PiX p.X (t + r)| := by - rw [← integral_add_right_eq_self (fun τ => Fn.phiHat (τ - t) ^ 2 * |Zeta23.PiX p.X τ|) t] - congr 1; funext r - rw [show r + t - t = r by ring, add_comm r t] - rw [htr] - have hgi : Integrable (fun r => (6 * Real.sqrt p.X / t) * Fn.phiHat r ^ 2 - + (12 * Real.sqrt p.X / t ^ 2) * (Fn.phiHat r ^ 2 * r ^ 2)) := - (hF.phiHat_sq_integrable.const_mul _).add (hF.phiHat_sq_mul_sq_integrable.const_mul _) - calc ∫ r, Fn.phiHat r ^ 2 * |Zeta23.PiX p.X (t + r)| - ≤ ∫ r, (6 * Real.sqrt p.X / t) * Fn.phiHat r ^ 2 - + (12 * Real.sqrt p.X / t ^ 2) * (Fn.phiHat r ^ 2 * r ^ 2) := by - refine integral_mono_of_nonneg (Eventually.of_forall fun r => by positivity) hgi - (Eventually.of_forall fun r => ?_) - calc Fn.phiHat r ^ 2 * |Zeta23.PiX p.X (t + r)| - ≤ Fn.phiHat r ^ 2 * (6 * Real.sqrt p.X / t + 12 * Real.sqrt p.X * r ^ 2 / t ^ 2) := by - gcongr; exact PiX_shift_bound hF ht r - _ = _ := by ring - _ = (6 * Real.sqrt p.X / t) * (2 * π * Fn.a * p.L) - + (12 * Real.sqrt p.X / t ^ 2) * ∫ r, Fn.phiHat r ^ 2 * r ^ 2 := by - rw [integral_add (hF.phiHat_sq_integrable.const_mul _) - (hF.phiHat_sq_mul_sq_integrable.const_mul _), integral_const_mul, integral_const_mul, - hF.phiHat_sq_integral] - _ ≤ _ := by - have ht0 : 0 < t := by linarith - gcongr - exact hF.integral_phiHat_sq_mul_sq_le - -/-- the Π-part Gram entry is bounded by the same quantity, for τ_k, τ_l ≥ t ≥ 2 (2|ab| ≤ a² + b²). -/ -lemma abs_gentryNu_PiX_le (hF : LocalHypsCore cϱ p Fn) {t : ℝ} (ht : 2 ≤ t) {k l : ℤ} - (hk : t ≤ p.tau k) (hl : t ≤ p.tau l) : - |GentryNu (Zeta23.PiX p.X) p Fn k l| - ≤ 6 * Real.sqrt p.X / t * (2 * π * Fn.a * p.L) - + 12 * Real.sqrt p.X / t ^ 2 * (8 + 2 * (cϱ / p.w) ^ 2) := by - set B : ℝ → ℝ := fun s => 6 * Real.sqrt p.X / s * (2 * π * Fn.a * p.L) - + 12 * Real.sqrt p.X / s ^ 2 * (8 + 2 * (cϱ / p.w) ^ 2) with hB - have ht0 : 0 < t := by linarith - have ha0 : 0 ≤ Fn.a := by - have h := hF.phiHat_sq_integral - have hi : 0 ≤ ∫ r, Fn.phiHat r ^ 2 := integral_nonneg fun r => sq_nonneg _ - have hL := hF.L_pos - nlinarith [Real.pi_pos, mul_pos Real.pi_pos hL] - -- B is antitone in s ≥ t > 0 - have hLp := hF.L_pos - have hBmono : ∀ s, t ≤ s → B s ≤ B t := by - intro s hs - have hs0 : 0 < s := by linarith - have : 0 ≤ 2 * π * Fn.a * p.L := by positivity - simp only [hB] - gcongr - -- the two diagonal-type integrals - have hIk := (integral_phiHat_sq_abs_PiX_le hF (ht.trans hk)).trans (hBmono _ hk) - have hIl := (integral_phiHat_sq_abs_PiX_le hF (ht.trans hl)).trans (hBmono _ hl) - -- integrability of the majorant - have hint : ∀ s : ℝ, Integrable (fun τ => Fn.phiHat (τ - s) ^ 2 * |Zeta23.PiX p.X τ|) := by - intro s - have h := (Pi_part_integrable hF s).norm.comp_sub_right s - refine h.congr (Eventually.of_forall fun τ => ?_) - simp [Real.norm_eq_abs, add_sub_cancel] - unfold GentryNu - rw [← Real.norm_eq_abs] - calc ‖∫ τ, Fn.phiHat (τ - p.tau k) * Fn.phiHat (τ - p.tau l) * Zeta23.PiX p.X τ‖ - ≤ ∫ τ, ‖Fn.phiHat (τ - p.tau k) * Fn.phiHat (τ - p.tau l) * Zeta23.PiX p.X τ‖ := - norm_integral_le_integral_norm _ - _ ≤ ∫ τ, (Fn.phiHat (τ - p.tau k) ^ 2 * |Zeta23.PiX p.X τ| - + Fn.phiHat (τ - p.tau l) ^ 2 * |Zeta23.PiX p.X τ|) / 2 := by - refine integral_mono_of_nonneg (Eventually.of_forall fun τ => norm_nonneg _) - (((hint _).add (hint _)).div_const 2) (Eventually.of_forall fun τ => ?_) - simp only [Real.norm_eq_abs, abs_mul] - set a := Fn.phiHat (τ - p.tau k) - set b := Fn.phiHat (τ - p.tau l) - have hab : |a| * |b| ≤ (a ^ 2 + b ^ 2) / 2 := by - nlinarith [sq_abs a, sq_abs b, sq_nonneg (|a| - |b|)] - have hv := abs_nonneg (Zeta23.PiX p.X τ) - calc |a| * |b| * |Zeta23.PiX p.X τ| ≤ (a ^ 2 + b ^ 2) / 2 * |Zeta23.PiX p.X τ| := - mul_le_mul_of_nonneg_right hab hv - _ = _ := by ring - _ = ((∫ τ, Fn.phiHat (τ - p.tau k) ^ 2 * |Zeta23.PiX p.X τ|) - + ∫ τ, Fn.phiHat (τ - p.tau l) ^ 2 * |Zeta23.PiX p.X τ|) / 2 := by - rw [integral_div, integral_add (hint _) (hint _)] - _ ≤ (B t + B t) / 2 := by gcongr - _ = B t := by ring - -end PiPart - -/-! ### The three HatNegligible pieces and the main W theorem -/ - -/-- **M^𝒵 − M^{c,2} is HatNegligible** ([XF′ 6.1] at the real base ½l). -/ -theorem hatNegligible_entryDependenceW (Z : ZeroConfig) (Pf : ℝ → Params) (F : CoeffFamily) - (P : Params) (hP : P.Valid) (hlam1 : P.lam < 1) (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) - {cϱ : ℝ} (hcore : ∃ T₁ : ℝ, ∀ T : ℝ, T₁ ≤ T → LocalHypsCore cϱ ((Pf T).toSetting T) ((Pf T).localFun T)) - (hΓ : GammaFacts) - (ha : ∃ a₀ : ℝ, 0 < a₀ ∧ ∀ᶠ T in atTop, a₀ ≤ (Pf T).a T) - (hR : RiemannVonMangoldt Z) - {e : ℝ → ℕ → ℕ → ℂ} {ρ₀ A T₀ : ℝ} (hρ₀ : 0 ≤ ρ₀) (hA : 0 ≤ A) - (hG : ReexpansionGeom Pf L2T F.c e ρ₀ A T₀) : - HatNegligible Z Pf (fun T => (Pf T).GpW1 T - (Pf T).GpCW T 2 (F.c T)) := by - refine hatNegligible_of_geom Z Pf P hP hlam1 hPf hcore ha hR hρ₀ hA hG _ (fun T hT hF => ?_) - have hLf : (Pf T).L T = P.L T := fam_L hPf T - have hL0 : 0 < (Pf T).L T := by - rw [hLf]; unfold Params.L - have : 1 ≤ l T := by - have h := hF.one_le_l; simpa using h - nlinarith [hP.lam_pos] - have hh0 : 0 ≤ (Pf T).hgrid T := by unfold Params.hgrid; positivity - have hX0 : 0 < (Pf T).X T := by unfold Params.X; exact Real.exp_pos _ - ext k l' - rw [GpW1_sub_GpCW_apply (Pf T) T hΓ hF hX0 hT hh0 (F.c T) k l', - L2star_eq_L2T_add T hT (tauStar_pos (Pf T) T hT hh0)] - rfl - -set_option maxHeartbeats 400000 in -/-- **the Π-part matrix M^{c,2} − M^{c,1} is HatNegligible** ([XF′ §9.3(i)]). -/ -theorem hatNegligible_piPart (Z : ZeroConfig) (Pf : ℝ → Params) (c : ℝ → ℕ → ℂ) - (P : Params) (hP : P.Valid) (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) - {cϱ : ℝ} (hcore : ∃ T₁ : ℝ, ∀ T : ℝ, T₁ ≤ T → LocalHypsCore cϱ ((Pf T).toSetting T) ((Pf T).localFun T)) - (hΓ : GammaFacts) - (ha : ∃ a₀ : ℝ, 0 < a₀ ∧ ∀ᶠ T in atTop, a₀ ≤ (Pf T).a T) - (hR : RiemannVonMangoldt Z) : - HatNegligible Z Pf (fun T => (Pf T).GpCW T 2 (c T) - (Pf T).GpC T (c T)) := by - obtain ⟨T₁, hcore⟩ := hcore - obtain ⟨a₀, ha₀, ha⟩ := ha - intro η hη - have hπ := Real.pi_pos - set K : ℝ := 8 + 2 * (cϱ / P.w) ^ 2 with hK - have hK0 : 0 < K := by positivity - -- the two constants: |tr D̂| ≤ κ₁ √X, frobSq D̂ ≤ κ₂² X - set κ₁ : ℝ := 6 + 12 * K / (2 * π * a₀) with hκ₁ - set κ₂ : ℝ := 6 + 12 * K / (2 * π * a₀) with hκ₂ - have hκ0 : 0 < κ₁ := by positivity - have hLtop := Assembly.tendsto_L_atTop P hP.lam_pos - filter_upwards [eventually_ge_atTop T₁, eventually_ge_atTop (2:ℝ), ha, Assembly.eventually_N_ge Z hR, - Assembly.eventually_one_le_l, hLtop.eventually_ge_atTop 1, - eventually_ge_atTop ((4 * π * κ₁ / η) ^ 2), - Assembly.tendsto_l_atTop.eventually_ge_atTop (4 * π * κ₂ ^ 2 / η ^ 2)] - with T hT₁ hT2 haT hN hl1 hL1 hTbig hlbig - set P' := Pf T with hP' - set p := P'.toSetting T with hp - set Fn := P'.localFun T with hFn - have hF : LocalHypsCore cϱ p Fn := hcore T hT₁ - have hT : 0 < T := by linarith - have hLf : P'.L T = P.L T := fam_L hPf T - have hXf : P'.X T = P.X T := fam_X hPf T - have hwf : P'.w = P.w := (hPf T).2 - have hL0 : 0 < P.L T := by linarith - have hh0 : 0 ≤ P'.hgrid T := by unfold Params.hgrid; rw [hLf]; positivity - have hX0 : 0 < P.X T := by unfold Params.X; exact Real.exp_pos _ - have hXT : P.X T ≤ T := by - have h1 : P.X T ≤ Real.exp (l T) := by - unfold Params.X Params.L - exact Real.exp_le_exp.2 (by nlinarith [hP.lam_le_one]) - rw [l, Real.exp_log (by positivity)] at h1 - have : T / (2 * π) ≤ T := div_le_self hT.le (by linarith [Real.pi_gt_three]) - linarith - have haT0 : 0 < P'.a T := ha₀.trans_le haT - have haL : 0 < P'.a T * P'.L T ^ 2 := by rw [hLf]; positivity - -- entry bound (in the abstract scalars p.X = X, p.L = L, Fn.a = a, p.w = w) - have eX : p.X = P.X T := hXf - have eL : p.L = P.L T := hLf - have ew : p.w = P.w := hwf - set Bπ : ℝ := 6 * Real.sqrt p.X / T * (2 * π * Fn.a * p.L) - + 12 * Real.sqrt p.X / T ^ 2 * (8 + 2 * (cϱ / p.w) ^ 2) with hBπ - have hBπ0 : 0 ≤ Bπ := by - have : 0 ≤ Fn.a := haT0.le - have : 0 < p.L := by rw [eL]; exact hL0 - positivity - have hentry : ∀ k l' : Fin (P'.d T), ‖(P'.GpCW T 2 (c T) - P'.GpC T (c T)) k l'‖ ≤ Bπ := by - intro k l' - rw [GpCW_two_sub_GpC_apply P' T hΓ hF (by rw [hXf]; exact hX0) hT hh0 (c T) k l', - Complex.norm_real, Real.norm_eq_abs] - have hk : T ≤ p.tau k := tau_ge_T P' T hh0 - have hl : T ≤ p.tau l' := tau_ge_T P' T hh0 - exact abs_gentryNu_PiX_le hF hT2 hk hl - have hBπ_eval : (P'.a T * P'.L T ^ 2)⁻¹ * ((P.L T * T / (2 * π)) * Bπ) - = 6 * Real.sqrt (P.X T) + 12 * K * Real.sqrt (P.X T) / (2 * π * P'.a T * (P.L T * T)) := by - rw [hBπ, eX, eL, ew, ← hK, hLf] - have : Fn.a = P'.a T := rfl - rw [this] - field_simp - constructor - · -- trace: (aL²)⁻¹ · d · Bπ ≤ κ₁ √X ≤ η N - rw [rtrace_hat', abs_mul, abs_of_pos (inv_pos.2 haL)] - have htr : |rtrace (P'.GpCW T 2 (c T) - P'.GpC T (c T))| ≤ (P'.d T : ℝ) * Bπ := by - refine (Transfer.abs_rtrace_le_sum_norm_diag _).trans ?_ - calc ∑ k : Fin (P'.d T), ‖(P'.GpCW T 2 (c T) - P'.GpC T (c T)) k k‖ - ≤ ∑ _k : Fin (P'.d T), Bπ := Finset.sum_le_sum fun k _ => hentry k k - _ = (P'.d T : ℝ) * Bπ := by simp - have hdle : (P'.d T : ℝ) ≤ P.L T * T / (2 * π) := by - have := d_le P' T (by rw [hLf]; positivity); rwa [hLf] at this - have hsqT : 4 * π * κ₁ / η ≤ Real.sqrt T := by - calc 4 * π * κ₁ / η = Real.sqrt ((4 * π * κ₁ / η) ^ 2) := (Real.sqrt_sq (by positivity)).symm - _ ≤ Real.sqrt T := Real.sqrt_le_sqrt hTbig - calc (P'.a T * P'.L T ^ 2)⁻¹ * |rtrace (P'.GpCW T 2 (c T) - P'.GpC T (c T))| - ≤ (P'.a T * P'.L T ^ 2)⁻¹ * ((P.L T * T / (2 * π)) * Bπ) := by - refine mul_le_mul_of_nonneg_left (htr.trans ?_) (inv_nonneg.2 haL.le) - exact mul_le_mul_of_nonneg_right hdle hBπ0 - _ = 6 * Real.sqrt (P.X T) + 12 * K * Real.sqrt (P.X T) / (2 * π * P'.a T * (P.L T * T)) := hBπ_eval - _ ≤ 6 * Real.sqrt (P.X T) + 12 * K * Real.sqrt (P.X T) / (2 * π * a₀ * (1 * 1)) := by - gcongr - · linarith - _ = κ₁ * Real.sqrt (P.X T) := by rw [hκ₁]; ring - _ ≤ κ₁ * Real.sqrt T := by gcongr - _ = η / (4 * π) * (4 * π * κ₁ / η) * Real.sqrt T := by field_simp - _ ≤ η / (4 * π) * Real.sqrt T * Real.sqrt T := by gcongr - _ = η * (T / (4 * π)) := by rw [mul_assoc, Real.mul_self_sqrt hT.le]; ring - _ ≤ η * (T * l T / (4 * π)) := by - gcongr; exact le_mul_of_one_le_right hT.le hl1 - _ ≤ η * (Z.N T (2 * T) : ℝ) := by gcongr - · -- Frobenius: (aL²)⁻² d² Bπ² ≤ κ₂² X ≤ η² N - rw [frobSq_hat'] - have hfr : frobSq (P'.GpCW T 2 (c T) - P'.GpC T (c T)) ≤ (P'.d T : ℝ) ^ 2 * Bπ ^ 2 := by - refine (Transfer.frobSq_le_of_norm_le _ (fun _ _ => Bπ) hentry).trans ?_ - simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] - exact le_of_eq (by ring) - have hdle : (P'.d T : ℝ) ≤ P.L T * T / (2 * π) := by - have := d_le P' T (by rw [hLf]; positivity); rwa [hLf] at this - have hd0 : (0:ℝ) ≤ (P'.d T : ℝ) := Nat.cast_nonneg _ - have key : (P'.a T * P'.L T ^ 2)⁻¹ * ((P'.d T : ℝ) * Bπ) ≤ κ₂ * Real.sqrt (P.X T) := by - calc (P'.a T * P'.L T ^ 2)⁻¹ * ((P'.d T : ℝ) * Bπ) - ≤ (P'.a T * P'.L T ^ 2)⁻¹ * ((P.L T * T / (2 * π)) * Bπ) := by - refine mul_le_mul_of_nonneg_left ?_ (inv_nonneg.2 haL.le) - exact mul_le_mul_of_nonneg_right hdle hBπ0 - _ = 6 * Real.sqrt (P.X T) + 12 * K * Real.sqrt (P.X T) / (2 * π * P'.a T * (P.L T * T)) := hBπ_eval - _ ≤ 6 * Real.sqrt (P.X T) + 12 * K * Real.sqrt (P.X T) / (2 * π * a₀ * (1 * 1)) := by - gcongr - · linarith - _ = κ₂ * Real.sqrt (P.X T) := by rw [hκ₂]; ring - have key0 : 0 ≤ (P'.a T * P'.L T ^ 2)⁻¹ * ((P'.d T : ℝ) * Bπ) := by positivity - calc ((P'.a T * P'.L T ^ 2)⁻¹) ^ 2 * frobSq (P'.GpCW T 2 (c T) - P'.GpC T (c T)) - ≤ ((P'.a T * P'.L T ^ 2)⁻¹) ^ 2 * ((P'.d T : ℝ) ^ 2 * Bπ ^ 2) := - mul_le_mul_of_nonneg_left hfr (sq_nonneg _) - _ = ((P'.a T * P'.L T ^ 2)⁻¹ * ((P'.d T : ℝ) * Bπ)) ^ 2 := by ring - _ ≤ (κ₂ * Real.sqrt (P.X T)) ^ 2 := pow_le_pow_left₀ key0 key 2 - _ = κ₂ ^ 2 * P.X T := by rw [mul_pow, Real.sq_sqrt hX0.le] - _ ≤ κ₂ ^ 2 * T := by gcongr - _ = η ^ 2 / (4 * π) * (4 * π * κ₂ ^ 2 / η ^ 2) * T := by field_simp - _ ≤ η ^ 2 / (4 * π) * l T * T := by gcongr - _ = η ^ 2 * (T * l T / (4 * π)) := by ring - _ ≤ η ^ 2 * (Z.N T (2 * T) : ℝ) := by gcongr - -/-- XiTraceTransfer Z Pf F from the W explicit formula WEF (main term M^𝒵, pole weight 2, -real base) + the Z′ re-expansion + the PP bound. Instantiate at Z := wZeros hZ hs, F := wCoeffFamily. -/ -theorem wTraceTransfer_of (Z : ZeroConfig) (Pf : ℝ → Params) (F : CoeffFamily) - (P : Params) (hP : P.Valid) (hlam1 : P.lam < 1) (hPf : ∀ T, (Pf T).lam = P.lam ∧ (Pf T).w = P.w) - {cϱ : ℝ} (hcore : ∃ T₁ : ℝ, ∀ T : ℝ, T₁ ≤ T → LocalHypsCore cϱ ((Pf T).toSetting T) ((Pf T).localFun T)) - (hΓ : GammaFacts) - (ha : ∃ a₀ : ℝ, 0 < a₀ ∧ ∀ᶠ T in atTop, a₀ ≤ (Pf T).a T) - (hR : RiemannVonMangoldt Z) (hEF : WEF Z Pf) - {e : ℝ → ℕ → ℕ → ℂ} {ρ₀ A T₀ : ℝ} (hρ₀ : 0 ≤ ρ₀) (hE : ReexpansionW F e ρ₀ A T₀) - (hPP : PPUpper cϱ P.lam) : - XiTraceTransfer Z Pf F := by - obtain ⟨A', T₀', hA', hG⟩ := reexpansionGeom_of Pf P hP hPf hcore hρ₀ hE.toAt hPP - have h1 : HatNegligible Z Pf (fun T => Z.Gz (Pf T) T - (Pf T).GpW1 T) := by - obtain ⟨C, δ, T₀, hδ, h⟩ := hEF - exact hatNegligible_of_entryBound Z Pf P hP hPf ha hR (fun T => (Pf T).GpW1 T) - ⟨C, δ, T₀, hδ, fun T hT k l => (h T hT k l).2⟩ - have h2 := hatNegligible_entryDependenceW Z Pf F P hP hlam1 hPf hcore hΓ ha hR hρ₀ hA' hG - have h3 := hatNegligible_piPart Z Pf F.c P hP hPf hcore hΓ ha hR - refine xiTraceTransfer_of_negligible₁ Z Pf F (((h1.add h2).add h3).congr fun T => ?_) - abel - -end XiPrime -end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Window.lean b/zeta23/Zeta23/XiPrime/Window.lean index 335299492d..3fb0be4747 100644 --- a/zeta23/Zeta23/XiPrime/Window.lean +++ b/zeta23/Zeta23/XiPrime/Window.lean @@ -40,15 +40,6 @@ namespace XiPrime section Algebra variable {D v : ℝ → ℝ} {lam : ℝ} -/-- the tree's ratio constant at J := 𝒥_D(λ;v)/λ IS c_λ(v;D). -/ -theorem cRatio_eq_cWin (D v : ℝ → ℝ) (hlam : lam ≠ 0) : - ThmD.cRatio lam (∫ s in (-(1:ℝ)/2)..(1/2), v s) (∫ s in (-(1:ℝ)/2)..(1/2), v s ^ 2) - (jWin D lam v / lam) = cWin D lam v := by - unfold ThmD.cRatio cWin - have : lam ^ 2 * (jWin D lam v / lam) = lam * jWin D lam v := by - field_simp - rw [this] - /-- (v⋆v) ≥ 0 on [0,1] when v ≥ 0 on the window. -/ theorem vConv_nonneg (hv : ∀ s ∈ Icc (-(1:ℝ)/2) (1/2), 0 ≤ v s) {r : ℝ} (hr : r ∈ Icc (0:ℝ) 1) : 0 ≤ vConv v r := by @@ -211,18 +202,6 @@ end Limit section Flat variable {P : Params} -theorem jWin_vFlat (D : ℝ → ℝ) (lam : ℝ) : - jWin D lam vFlat = 2 * ∫ r in (0:ℝ)..1, (D (lam * r) * (1 - r)) := by - unfold jWin; simp_rw [vConv_vFlat] - -theorem cWin_vFlat (D : ℝ → ℝ) (lam : ℝ) : cWin D lam vFlat = lam / (1 + lam * jWin D lam vFlat) := by - unfold cWin; rw [integral_vFlat, integral_vFlat_sq]; ring - -/-- κ₁(λ, flat) = 1/λ + 2∫₀¹ D₁(λr)(1−r) dr (the ζ analogue is Zeta23.kfun λ = 1/λ + λ/3). -/ -theorem kappaXi_vFlat {lam : ℝ} (h0 : lam ≠ 0) : - kappaXi lam vFlat = 1 / lam + jWin D1 lam vFlat := by - unfold kappaXi; rw [cWin_vFlat]; field_simp - theorem eventually_w8 (hP : P.Valid) : ∀ᶠ T in atTop, 8 * P.w ≤ P.L T := (Assembly.tendsto_L_atTop P hP.lam_pos).eventually_ge_atTop _ @@ -358,29 +337,10 @@ theorem exists_lt_one_pos {f : ℝ → ℝ} (hf : ContinuousOn f (Icc (1/2) 1)) rw [Real.dist_eq] at h linarith [abs_lt.mp h] -/-- the λ → 1⁻ ε-step (ξ′ analogue of ThmD.Limit.eps_form_cStar, continuity in place of Lipschitz): -if a rate g is continuous on [1/2,1] and the ε-statement holds with constant g λ at every λ ∈ [1/2,1), -it holds with constant g 1. -/ -theorem eps_form_of_continuousOn {g N lower : ℝ → ℝ} (hg : ContinuousOn g (Icc (1/2) 1)) - (hN : ∀ T, 0 ≤ N T) - (h : ∀ lam : ℝ, 1/2 ≤ lam → lam < 1 → ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (g lam - ε) * N T ≤ lower T) : - ∀ ε > 0, ∃ T₀, ∀ T ≥ T₀, (g 1 - ε) * N T ≤ lower T := by - apply ThmD.eps_form_of_approx _ hN h - intro δ hδ - obtain ⟨lam, h1, h2, h3⟩ := exists_lt_one_pos (f := fun lam => g lam - (g 1 - δ)) - (hg.sub continuousOn_const) (by simp [hδ]) - exact ⟨lam, h1, h2, by linarith⟩ - end Continuity /-! ## (W5) the two profiles are admissible WindowProfiles -/ -theorem windowProfile_vFlat : WindowProfile vFlat where - even := fun _ => rfl - contDiff := contDiff_const - pos := fun _ _ => by simp [vFlat] - le_one := fun _ => by simp [vFlat] - theorem windowProfile_vQuartic : WindowProfile vQuartic where even := vQuartic_even contDiff := by unfold vQuartic; fun_prop @@ -403,11 +363,5 @@ theorem cWin_D1_vQuartic_pos {lam : ℝ} (h0 : 0 < lam) (h1 : lam ≤ 1) : 0 < c cWin_pos (by rw [integral_vQuartic]; norm_num) (by rw [integral_vQuartic_sq]; norm_num) (jWin_nonneg (fun _ hx => D1_nonneg hx.1) (fun _ hs => vQuartic_nonneg_on hs) h0.le h1) h0 -theorem kappaXi_pos_vFlat {lam : ℝ} (h0 : 0 < lam) (h1 : lam ≤ 1) : 0 < kappaXi lam vFlat := by - unfold kappaXi; exact one_div_pos.mpr (cWin_D1_vFlat_pos h0 h1) - -theorem kappaXi_pos_vQuartic {lam : ℝ} (h0 : 0 < lam) (h1 : lam ≤ 1) : 0 < kappaXi lam vQuartic := by - unfold kappaXi; exact one_div_pos.mpr (cWin_D1_vQuartic_pos h0 h1) - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/Window/FlatAdm.lean b/zeta23/Zeta23/XiPrime/Window/FlatAdm.lean index 55f571e40a..a9759eee0e 100644 --- a/zeta23/Zeta23/XiPrime/Window/FlatAdm.lean +++ b/zeta23/Zeta23/XiPrime/Window/FlatAdm.lean @@ -15,7 +15,6 @@ Also: 1/2 ≤ bv (indeed 3/4 ≤ b, Zeta23/Taper/Params.lean three_quarters_le_b AdmWindow.localFun (P.phi T) (P.L T) = P.localFun T is Zeta23/ThmD/ParamsD.lean's localFun_eq_admWindow. -/ import Zeta23.ThmD.WindowCore -import Zeta23.Taper import Zeta23.Assembly open Set Filter @@ -52,10 +51,7 @@ theorem admWindow_taper {P : Params} (hP : P.Valid) {T : ℝ} (hwL : 8 * P.w ≤ /- the abstract local data of the taper ARE P's, field by field: Zeta23/ThmD/ParamsD.lean `localFun_eq_admWindow (Q : Params) (T) : Q.localFun T = AdmWindow.localFun (Q.phi T) (Q.L T) := rfl`. -/ -theorem av_taper (P : Params) (T : ℝ) : AdmWindow.av (P.phi T) (P.L T) = P.a T := rfl theorem bv_taper (P : Params) (T : ℝ) : AdmWindow.bv (P.phi T) (P.L T) = P.b T := rfl -theorem gv_taper (P : Params) (T : ℝ) : AdmWindow.gv (P.phi T) = P.g T := rfl - /-- 1/2 ≤ bv for the taper (in fact 3/4 ≤ b). -/ theorem half_le_bv_taper {P : Params} (hP : P.Valid) {T : ℝ} (hwL : 8 * P.w ≤ P.L T) : 1 / 2 ≤ AdmWindow.bv (P.phi T) (P.L T) := by diff --git a/zeta23/Zeta23/XiPrime/Window/Quartic.lean b/zeta23/Zeta23/XiPrime/Window/Quartic.lean index 282effa9c3..624dcf290b 100644 --- a/zeta23/Zeta23/XiPrime/Window/Quartic.lean +++ b/zeta23/Zeta23/XiPrime/Window/Quartic.lean @@ -19,7 +19,6 @@ coeffMoments_atV consumes. -/ import Zeta23.XiPrime.Window import Zeta23.XiPrime.QuarticWindow.Moments -import Zeta23.XiPrime.QuarticWindow.Params open Set Filter Topology @@ -49,12 +48,6 @@ theorem tendsto_cRatio_quartic_of {P : Params} (hP : P.Valid) {D : ℝ → ℝ} exact cWin_denom_pos (by rw [integral_vQuartic_sq]; norm_num) (jWin_nonneg hD0 (fun _ hs => vQuartic_nonneg_on hs) hP.lam_pos.le hP.lam_le_one) hP.lam_pos.le -/-- positivity of the limit constant (Endgame/CoeffMoments' hc0) for any D ≥ 0 on [0,1]. -/ -theorem cWin_vQuartic_pos {D : ℝ → ℝ} (hD0 : ∀ x ∈ Icc (0:ℝ) 1, 0 ≤ D x) {lam : ℝ} (h0 : 0 < lam) - (h1 : lam ≤ 1) : 0 < cWin D lam vQuartic := - cWin_pos (by rw [integral_vQuartic]; norm_num) (by rw [integral_vQuartic_sq]; norm_num) - (jWin_nonneg hD0 (fun _ hs => vQuartic_nonneg_on hs) h0.le h1) h0 - /-! ## instantiation with the window-moment estimates (see Zeta23/XiPrime/QuarticWindow/{Moments,Params}.lean) -/ section K3 diff --git a/zeta23/Zeta23/XiPrime/ZeroCount.lean b/zeta23/Zeta23/XiPrime/ZeroCount.lean index 9fa8e4703d..93bac79497 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount.lean @@ -19,10 +19,7 @@ is O(log T) (ZeroCount/Sides.lean: horizontals by Landau's partial fraction, ver pieces). (F2) enters only through the ZeroConfig (window geometry / no zeros on Re s = −1, 2). -/ import Zeta23.XiPrime.ZeroCount.Sides -import Zeta23.XiPrime.ZeroCount.Contour import Zeta23.XiPrime.ZeroCount.GenericRvM -import Zeta23.RvM.GammaSide -import Zeta23.GammaFacts.Complete open Complex Set Filter Topology MeasureTheory intervalIntegral Metric open scoped ComplexConjugate @@ -165,10 +162,5 @@ both the main count N_{ξ′}(T,2T) = (T/2π)ℓ₁(T) + O(log T) and the two-si theorem xiDeriv_riemannVonMangoldt (hF2 : XiDerivZerosInStrip) (hs : XiDerivSeam) : XiDerivRvM hF2 hs := ⟨ZeroCount.xiDeriv_rvM_main hF2 hs, ZeroCount.xiDeriv_local_count hF2 hs⟩ -/-- the same, with the seam discharged: only (F2) remains as a hypothesis. -/ -theorem xiDeriv_riemannVonMangoldt' (hF2 : XiDerivZerosInStrip) : - RiemannVonMangoldt (xiDerivZeros hF2 (xiDerivSeam_of_strip hF2)) := - xiDeriv_riemannVonMangoldt hF2 (xiDerivSeam_of_strip hF2) - end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/ZeroCount/ArgBound.lean b/zeta23/Zeta23/XiPrime/ZeroCount/ArgBound.lean index d423497ad4..7cbb86600c 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount/ArgBound.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount/ArgBound.lean @@ -64,11 +64,6 @@ lemma hasDerivAt_vertical (σ t : ℝ) : HasDerivAt (fun t : ℝ => (σ : ℂ) + have h1 : HasDerivAt (fun t : ℝ => (t : ℂ)) 1 t := Complex.ofRealCLM.hasDerivAt simpa using (h1.mul_const I).const_add (σ : ℂ) -/-- the horizontal path σ ↦ σ + iT and its derivative 1. -/ -lemma hasDerivAt_horizontal (T σ : ℝ) : HasDerivAt (fun σ : ℝ => (σ : ℂ) + T * I) 1 σ := by - have h1 : HasDerivAt (fun t : ℝ => (t : ℂ)) 1 σ := Complex.ofRealCLM.hasDerivAt - simpa using h1.add_const ((T : ℂ) * I) - /-- **(A), vertical segment**: f analytic with Re f > 0 along σ + i[T₁,T₂] ⇒ |Im ∫ f′/f(σ+it)·i dt| ≤ π. -/ theorem abs_im_integral_logDeriv_vertical_le_pi {f : ℂ → ℂ} {σ T₁ T₂ : ℝ} (h12 : T₁ ≤ T₂) (hf : ∀ t ∈ Icc T₁ T₂, AnalyticAt ℂ f (σ + t * I)) @@ -91,28 +86,6 @@ theorem abs_im_integral_logDeriv_vertical_le_pi {f : ℂ → ℂ} {σ T₁ T₂ rw [e] at key exact key -/-- **(A), horizontal segment**: f analytic with Re f > 0 along [a,b] + iT ⇒ |Im ∫ f′/f(σ+iT) dσ| ≤ π. -/ -theorem abs_im_integral_logDeriv_horizontal_le_pi {f : ℂ → ℂ} {T a b : ℝ} (hab : a ≤ b) - (hf : ∀ σ ∈ Icc a b, AnalyticAt ℂ f (σ + T * I)) - (hre : ∀ σ ∈ Icc a b, 0 < (f (σ + T * I)).re) : - |(∫ σ in a..b, logDeriv f (σ + T * I)).im| ≤ Real.pi := by - set g : ℝ → ℂ := fun σ => f (σ + T * I) with hg - set g' : ℝ → ℂ := fun σ => deriv f (σ + T * I) with hg' - have hderiv : ∀ σ ∈ Icc a b, HasDerivAt g (g' σ) σ := fun σ hσ => by - have := ((hf σ hσ).differentiableAt.hasDerivAt).comp σ (hasDerivAt_horizontal T σ) - exact this.congr_deriv (mul_one _) - have hcont : ContinuousOn g' (Icc a b) := by - intro σ hσ - have hd : ContinuousAt (deriv f) (σ + T * I) := (hf σ hσ).deriv.continuousAt - have hp : ContinuousAt (fun σ : ℝ => (σ : ℂ) + T * I) σ := by fun_prop - exact (hd.comp (f := fun σ : ℝ => (σ : ℂ) + T * I) hp).continuousWithinAt - have key := abs_im_integral_logDeriv_le_pi hab hderiv hcont hre - have e : (fun σ => g' σ / g σ) = fun σ : ℝ => logDeriv f (σ + T * I) := by - funext σ - simp only [hg, hg', logDeriv_apply] - rw [e] at key - exact key - /-! ### (B) one partial-fraction term -/ lemma continuousOn_inv_sub {a b T : ℝ} {ρ : ℂ} (hρ : ∀ σ ∈ uIcc a b, (σ : ℂ) + T * I ≠ ρ) : diff --git a/zeta23/Zeta23/XiPrime/ZeroCount/Basic.lean b/zeta23/Zeta23/XiPrime/ZeroCount/Basic.lean index 40c1d93d03..c5c13f605e 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount/Basic.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount/Basic.lean @@ -10,8 +10,7 @@ continuity of a logarithmic derivative at an analytic nonvanishing point. Colle ZeroCount/Generic.lean does not need to import the Y := ξ′/Γℝ instances. -/ import Zeta23.XiPrime.Seam -import Zeta23.Defs.Counting -import Zeta23.RvM.Halving +import Zeta23.RvM.Generic open Complex Set Filter Topology @@ -19,71 +18,17 @@ noncomputable section namespace Zeta23 -/-! ### window arithmetic for an abstract ZeroConfig -/ -namespace ZeroConfig - -variable (Z : ZeroConfig) - -lemma window_union {a b c : ℝ} (h1 : a ≤ b) (h2 : b ≤ c) : - Z.window a c = Z.window a b ∪ Z.window b c := by - ext ρ - simp only [ZeroConfig.window, mem_inter_iff, mem_setOf_eq, mem_union] - constructor - · rintro ⟨hρ, ha, hc⟩ - rcases le_or_gt ρ.im b with hle | hgt - · exact Or.inl ⟨hρ, ha, hle⟩ - · exact Or.inr ⟨hρ, hgt, hc⟩ - · rintro (⟨hρ, ha, hb⟩ | ⟨hρ, hb, hc⟩) - · exact ⟨hρ, ha, le_trans hb h2⟩ - · exact ⟨hρ, lt_of_le_of_lt h1 hb, hc⟩ - -lemma N_add {a b c : ℝ} (h1 : a ≤ b) (h2 : b ≤ c) : Z.N a c = Z.N a b + Z.N b c := by - unfold ZeroConfig.N - rw [Z.window_union h1 h2] - refine finsum_mem_union ?_ (Z.window_finite a b) (Z.window_finite b c) - rw [Set.disjoint_left] - rintro ρ ⟨_, _, hb⟩ ⟨_, hb', _⟩ - exact absurd hb (not_le.2 hb') - -lemma N_mono {a b c d : ℝ} (hca : c ≤ a) (hbd : b ≤ d) : Z.N a b ≤ Z.N c d := by - refine Z.finsum_mult_mono c d ?_ subset_rfl - rintro ρ ⟨hρ, ha, hb⟩ - exact ⟨hρ, lt_of_le_of_lt hca ha, le_trans hb hbd⟩ - -end ZeroConfig - namespace XiPrime namespace ZeroCount lemma one_le_log_add_three (t : ℝ) : 1 ≤ Real.log (|t| + 3) := by - rw [← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9 - linarith [abs_nonneg t] + simpa [one_mul] using RvM.one_le_log_scale_add_three (scale := 1) le_rfl t lemma continuousAt_logDeriv_of_analyticAt {f : ℂ → ℂ} {s : ℂ} (ha : AnalyticAt ℂ f s) (hne : f s ≠ 0) : ContinuousAt (logDeriv f) s := by have := (ha.deriv.continuousAt).div ha.continuousAt hne simpa only [logDeriv] using this -/-- unit windows: N(a, a+k) ≤ Σ_{i - simp only [Nat.cast_zero, add_zero, Finset.range_zero, Finset.sum_empty] - unfold ZeroConfig.N - have : Z.window a a = ∅ := by - ext ρ - simp only [ZeroConfig.window, mem_inter_iff, mem_setOf_eq, mem_empty_iff_false, iff_false] - rintro ⟨_, h1, h2⟩ - linarith - rw [this, finsum_mem_empty] - | succ k ih => - rw [Finset.sum_range_succ, ← ih, Z.N_add (by simp : a ≤ a + k) (by push_cast; linarith)] - push_cast - ring_nf - end ZeroCount end XiPrime end Zeta23 diff --git a/zeta23/Zeta23/XiPrime/ZeroCount/Contour.lean b/zeta23/Zeta23/XiPrime/ZeroCount/Contour.lean index 81548e1e7a..4e31ce5340 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount/Contour.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount/Contour.lean @@ -11,9 +11,6 @@ everywhere, so logDeriv ξ′(1−s̄) = −conj logDeriv ξ′(s) at every s (S N_{ξ′}(T₁,T₂) = (1/π)·Im ∫_L ξ″/ξ′, L = [½+iT₁ → 2+iT₁ → 2+iT₂ → ½+iT₂] (good heights T₁ < T₂). -/ import Zeta23.XiPrime.Seam -import Zeta23.RvM.Defs -import Zeta23.Analytic.RectangleLogDeriv -import Zeta23.XiPrime.ZeroCount.GenericRvM open Complex Set Filter Topology MeasureTheory intervalIntegral open scoped ComplexConjugate @@ -32,7 +29,7 @@ theorem exists_goodHeight (hs : XiDerivSeam) (a : ℝ) : ∃ T ∈ Icc a (a + 1) have hfin : ((fun ρ : ℂ => ρ.im) '' ({ρ | IsXiDerivZero ρ} ∩ {ρ | a < ρ.im ∧ ρ.im ≤ a + 1})).Finite := (hs.finite_window a (a + 1)).image _ have hinf : (Ioo a (a + 1)).Infinite := Ioo_infinite (by linarith) - obtain ⟨T, hT, hTnot⟩ := (hinf.diff hfin).nonempty + obtain ⟨T, hT, hTnot⟩ := (hinf.sdiff hfin).nonempty refine ⟨T, ⟨hT.1.le, hT.2.le⟩, ?_⟩ intro ρ hρ him apply hTnot @@ -47,59 +44,11 @@ heights T₁ ≤ T₂ (all zeros have 0 < Re < 1 by (F2), so none sit on the ver theorem rectangleIntegral'_logDeriv_xiDeriv_eq_Ncount (hF2 : XiDerivZerosInStrip) (hs : XiDerivSeam) {T₁ T₂ : ℝ} (hT : T₁ ≤ T₂) (hg₁ : GoodHeight T₁) (hg₂ : GoodHeight T₂) : RectangleIntegral' (logDeriv xiDeriv) (-1 + T₁ * I) (2 + T₂ * I) = (Ncount T₁ T₂ : ℂ) := by - classical - set z : ℂ := -1 + T₁ * I with hzdef - set w : ℂ := 2 + T₂ * I with hwdef - have hzre : z.re = -1 := by simp [z] - have hzim : z.im = T₁ := by simp [z] - have hwre : w.re = 2 := by simp [w] - have hwim : w.im = T₂ := by simp [w] - have hre : z.re ≤ w.re := by rw [hzre, hwre]; norm_num - have him : z.im ≤ w.im := by rw [hzim, hwim]; exact hT - have hmem : ∀ s : ℂ, s ∈ Rectangle z w ↔ - (-1 ≤ s.re ∧ s.re ≤ 2) ∧ (T₁ ≤ s.im ∧ s.im ≤ T₂) := by - intro s - simp only [Rectangle, mem_reProdIm, hzre, hzim, hwre, hwim, - uIcc_of_le (show (-1 : ℝ) ≤ 2 by norm_num), uIcc_of_le hT, mem_Icc] - have hf : AnalyticOnNhd ℂ xiDeriv (Rectangle z w) := xiDeriv_analyticOnNhd _ - have hg : AnalyticOnNhd ℂ (fun _ : ℂ => (1 : ℂ)) (Rectangle z w) := fun _ _ => analyticAt_const - have hfin := hs.finite_window T₁ T₂ - have hZ : ∀ s ∈ Rectangle z w, xiDeriv s = 0 ↔ s ∈ hfin.toFinset := by - intro s hsR - rw [Set.Finite.mem_toFinset] - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp hsR - constructor - · intro h0 - exact ⟨h0, lt_of_le_of_ne hi1 (fun h' => hg₁ s h0 h'.symm), hi2⟩ - · rintro ⟨h0, _⟩ - exact h0 - have hZsub : ((hfin.toFinset : Finset ℂ) : Set ℂ) ⊆ Rectangle z w := by - intro s hsZ - rw [Finset.mem_coe, Set.Finite.mem_toFinset] at hsZ - obtain ⟨h0, hi1, hi2⟩ := hsZ - obtain ⟨ha, hb⟩ := hF2 s h0 - exact (hmem s).mpr ⟨⟨by linarith, by linarith⟩, hi1.le, hi2⟩ - have hborder : ∀ s ∈ RectangleBorder z w, xiDeriv s ≠ 0 := by - intro s hsB h0 - obtain ⟨⟨hr1, hr2⟩, ⟨hi1, hi2⟩⟩ := (hmem s).mp (rectangleBorder_subset_rectangle z w hsB) - obtain ⟨ha, hb⟩ := hF2 s h0 - simp only [RectangleBorder, mem_union, mem_reProdIm, mem_singleton_iff, hzre, hzim, hwre, - hwim] at hsB - rcases hsB with ((⟨_, h'⟩ | ⟨h', _⟩) | ⟨_, h'⟩) | ⟨h', _⟩ - · exact hg₁ s h0 h' - · linarith - · exact hg₂ s h0 h' - · linarith - have key := Zeta23.Analytic.rectangleIntegral'_mul_logDeriv hre him hf hg hborder - hfin.toFinset hZ hZsub - simp only [one_mul, mul_one] at key - rw [show (fun s => logDeriv xiDeriv s) = logDeriv xiDeriv from rfl] at key - rw [key] - unfold Ncount have hset : zerosIn T₁ T₂ = {ρ | IsXiDerivZero ρ} ∩ {ρ | T₁ < ρ.im ∧ ρ.im ≤ T₂} := by ext ρ; simp [zerosIn] - rw [hset, finsum_mem_eq_finite_toFinset_sum _ hfin, Nat.cast_sum] - rfl + rw [Ncount, hset] + exact Zeta23.Analytic.rectangleIntegral'_logDeriv_strip_eq_finsum hT (xiDeriv_analyticOnNhd _) + (hs.finite_window T₁ T₂) (fun _ => Iff.rfl) hF2 hg₁ hg₂ (fun _ _ => rfl) /-! ### the fold -/ @@ -118,14 +67,14 @@ lemma continuous_logDeriv_xiDeriv_horizontal {T : ℝ} (hg : GoodHeight T) : lemma horizontal_fold {T : ℝ} (hgood : GoodHeight T) : ∫ σ in (-1 : ℝ)..2, logDeriv xiDeriv (σ + T * I) = 2 * I * ((∫ σ in (1 / 2 : ℝ)..2, logDeriv xiDeriv (σ + T * I)).im : ℂ) := - GenericRvM.horizontal_fold_of T (continuous_logDeriv_xiDeriv_horizontal hgood) + Zeta23.RvM.horizontal_fold_of T (continuous_logDeriv_xiDeriv_horizontal hgood) fun _ _ => logDeriv_xiDeriv_one_sub_conj _ /-- vertical fold: ∫_{T₁}^{T₂} F(−1+it)dt = −conj ∫_{T₁}^{T₂} F(2+it)dt. -/ lemma vertical_fold (T₁ T₂ : ℝ) : ∫ t in T₁..T₂, logDeriv xiDeriv (-1 + t * I) = -starRingEnd ℂ (∫ t in T₁..T₂, logDeriv xiDeriv (2 + t * I)) := - GenericRvM.vertical_fold_of fun _ _ => logDeriv_xiDeriv_one_sub_conj _ + Zeta23.RvM.vertical_fold_of fun _ _ => logDeriv_xiDeriv_one_sub_conj _ /-- **the fold**: for good heights T₁ ≤ T₂, ∮_{∂([−1,2]×[T₁,T₂])} ξ″/ξ′ = 2i · Im(halfContour (ξ″/ξ′) T₁ T₂). -/ @@ -133,7 +82,7 @@ theorem rectangleIntegral_logDeriv_xiDeriv_eq_halfContour {T₁ T₂ : ℝ} (hg₁ : GoodHeight T₁) (hg₂ : GoodHeight T₂) : RectangleIntegral (logDeriv xiDeriv) (-1 + T₁ * I) (2 + T₂ * I) = 2 * I * ((Zeta23.RvM.halfContour (logDeriv xiDeriv) T₁ T₂).im : ℂ) := - GenericRvM.rectangleIntegral_eq_halfContour_of_fold + Zeta23.RvM.rectangleIntegral_eq_halfContour_of_fold (continuous_logDeriv_xiDeriv_horizontal hg₁) (continuous_logDeriv_xiDeriv_horizontal hg₂) (fun _ _ => logDeriv_xiDeriv_one_sub_conj _) (fun _ _ => logDeriv_xiDeriv_one_sub_conj _) (fun _ _ => logDeriv_xiDeriv_one_sub_conj _) @@ -143,7 +92,7 @@ theorem Ncount_eq_im_halfContour (hF2 : XiDerivZerosInStrip) (hs : XiDerivSeam) (h12 : T₁ ≤ T₂) (hg₁ : GoodHeight T₁) (hg₂ : GoodHeight T₂) : (Ncount T₁ T₂ : ℝ) = (1 / Real.pi) * (Zeta23.RvM.halfContour (logDeriv xiDeriv) T₁ T₂).im := - GenericRvM.natCast_eq_im_halfContour (rectangleIntegral'_logDeriv_xiDeriv_eq_Ncount hF2 hs h12 hg₁ hg₂) + Zeta23.RvM.natCast_eq_im_halfContour (rectangleIntegral'_logDeriv_xiDeriv_eq_Ncount hF2 hs h12 hg₁ hg₂) (rectangleIntegral_logDeriv_xiDeriv_eq_halfContour hg₁ hg₂) end ZeroCount diff --git a/zeta23/Zeta23/XiPrime/ZeroCount/Generic.lean b/zeta23/Zeta23/XiPrime/ZeroCount/Generic.lean index 58012f4585..d712c50fd0 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount/Generic.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount/Generic.lean @@ -24,7 +24,6 @@ OUTPUTS: -/ import Zeta23.XiPrime.ZeroCount.Basic import Zeta23.XiPrime.ZeroCount.ArgBound -import Zeta23.WeilEF.Landau import Zeta23.WeilEF.GoodHeights open Complex Set Filter Topology MeasureTheory intervalIntegral Metric @@ -51,95 +50,41 @@ theorem logDeriv_partial_fraction_two_line {f : ℂ → ℂ} {Cf t₀ : ℝ} {k ∀ s ∈ closedBall (2 + t * I) (3 / 2), f s ≠ 0 → ‖logDeriv f s - ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ ≤ C * Real.log (|t| + 3) := by - set CY := Cf with hCYdef - have hCY : 0 < CY := hCf - set C' : ℝ := CY + 2 with hC' - have hC'2 : 2 ≤ C' := by rw [hC']; linarith - have hlogC' : 0 ≤ Real.log C' := Real.log_nonneg (by linarith) - set C : ℝ := (44795000 * 50 / 91) * (Real.log C' + k) with hC - have hCpos : 0 < C := by - rw [hC] - have : 0 < Real.log C' + k := by - have : 0 < Real.log C' := Real.log_pos (by linarith) - positivity - positivity - refine ⟨C, max t₀ 4, hCpos, le_max_right _ _, le_max_left _ _, fun t ht => ?_⟩ - have ht₁ : t₀ ≤ |t| := le_trans (le_max_left _ _) ht - have ht4 : 4 ≤ |t| := le_trans (le_max_right _ _) ht - set s₀ : ℂ := 2 + t * I with hs₀ - have hY0 : 1 ≤ ‖f s₀‖ := hlow' t ht₁ - have hne : f s₀ ≠ 0 := by - intro h; rw [h, norm_zero] at hY0; linarith - have hfa : AnalyticOnNhd ℂ f (closedBall s₀ (91 / 50)) := hfa t ht₁ - set B : ℝ := C' * (|t| + 2) ^ k with hB - have hpow1 : (1 : ℝ) ≤ (|t| + 2) ^ k := one_le_pow₀ (by linarith [abs_nonneg t]) - have hB2 : 2 ≤ B := by - rw [hB]; nlinarith - have hfB : ∀ w ∈ closedBall s₀ (24 / 25 * (91 / 50)), ‖f w‖ ≤ B * ‖f s₀‖ := by - intro w hw - rw [mem_closedBall, Complex.dist_eq] at hw - have hwre : |w.re - 2| ≤ 24 / 25 * (91 / 50) := by - have := Complex.abs_re_le_norm (w - s₀) - have hre : (w - s₀).re = w.re - 2 := by simp [hs₀] - rw [hre] at this; linarith - have hwim : |w.im - t| ≤ 24 / 25 * (91 / 50) := by - have := Complex.abs_im_le_norm (w - s₀) - have him : (w - s₀).im = w.im - t := by simp [hs₀] - rw [him] at this; linarith - rw [abs_le] at hwre hwim - have h1 : (1 / 8 : ℝ) ≤ w.re := by linarith [hwre.1] - have h2 : w.re ≤ 4 := by linarith [hwre.2] - have h3 : 2 ≤ |w.im| := by - rcases le_abs'.mp ht4 with h | h - · rw [abs_of_neg (by linarith [hwim.2])]; linarith [hwim.2] - · rw [abs_of_pos (by linarith [hwim.1])]; linarith [hwim.1] - have h4 : |w.im| ≤ |t| + 2 := by - have := abs_sub_abs_le_abs_sub w.im t - have h5 : |w.im - t| ≤ 2 := abs_le.mpr ⟨by linarith [hwim.1], by linarith [hwim.2]⟩ - linarith - calc ‖f w‖ ≤ CY * |w.im| ^ k := hgrow w h1 h2 h3 - _ ≤ CY * (|t| + 2) ^ k := by gcongr - _ ≤ C' * (|t| + 2) ^ k := by gcongr; linarith - _ = B * 1 := by rw [hB]; ring - _ ≤ B * ‖f s₀‖ := by gcongr - obtain ⟨Z, hZset, hZcount, hZpf⟩ := Zeta23.WeilEF.logDeriv_partial_fraction_disk (f := f) - (by norm_num : (0:ℝ) < 91 / 50) hfa hne hB2 hfB - have hlog3 := one_le_log_add_three t - have hlogB : Real.log B ≤ (Real.log C' + k) * Real.log (|t| + 3) := by - rw [hB, Real.log_mul (by positivity) (by positivity), Real.log_pow] - have h1 : Real.log (|t| + 2) ≤ Real.log (|t| + 3) := - Real.log_le_log (by linarith [abs_nonneg t]) (by linarith) - have h0 : 0 ≤ Real.log (|t| + 2) := Real.log_nonneg (by linarith [abs_nonneg t]) - have h2 : Real.log C' ≤ Real.log C' * Real.log (|t| + 3) := le_mul_of_one_le_right hlogC' hlog3 - have h3 : (k : ℝ) * Real.log (|t| + 2) ≤ (k : ℝ) * Real.log (|t| + 3) := - mul_le_mul_of_nonneg_left h1 (Nat.cast_nonneg k) - linarith - have hlogBnn : 0 ≤ Real.log B := Real.log_nonneg (by linarith) - refine ⟨hne, Z, hZset, ?_, ?_⟩ - · refine hZcount.trans ?_ - have hratio : ((24 / 25 : ℝ)) / (22 / 25) = 12 / 11 := by norm_num - have hlogpos : (0:ℝ) < Real.log ((24 / 25) / (22 / 25)) := by - rw [hratio]; exact Real.log_pos (by norm_num) - have hlog1211 : (1:ℝ) / 12 ≤ Real.log ((24 / 25) / (22 / 25)) := by - rw [hratio] - have h := Real.log_le_sub_one_of_pos (show (0:ℝ) < 11 / 12 by norm_num) - rw [show (11 / 12 : ℝ) = (12 / 11)⁻¹ by norm_num, Real.log_inv] at h - linarith - calc 1 / Real.log ((24 / 25) / (22 / 25)) * Real.log B ≤ 12 * Real.log B := by - refine mul_le_mul_of_nonneg_right ?_ hlogBnn - rw [div_le_iff₀ hlogpos]; linarith - _ ≤ 12 * ((Real.log C' + k) * Real.log (|t| + 3)) := by gcongr - _ ≤ C * Real.log (|t| + 3) := by - rw [hC] - have : (0:ℝ) ≤ (Real.log C' + k) * Real.log (|t| + 3) := by positivity - nlinarith - · intro s hs hYs - have hs' : s ∈ closedBall s₀ (83 / 100 * (91 / 50)) := - closedBall_subset_closedBall (by norm_num) hs - refine (hZpf s hs' hYs).trans ?_ - calc 44795000 / (91 / 50) * Real.log B - ≤ 44795000 / (91 / 50) * ((Real.log C' + k) * Real.log (|t| + 3)) := by gcongr - _ = C * Real.log (|t| + 3) := by rw [hC]; ring + let D : Zeta23.WeilEF.TwoLineLandauData := + { f := f + scale := 1 + t₀ := max t₀ 4 + c₀ := 1 + C₀ := Cf + A := (k : ℝ) + hscale := le_rfl + hc₀ := zero_lt_one + hC₀ := hCf + hA := Nat.cast_nonneg k + hfa := fun t ht => hfa t (le_trans (le_max_left _ _) ht) + hlow := fun t ht => hlow' t (le_trans (le_max_left _ _) ht) + hgrow := fun t ht w hw => by + have ht4 : 4 ≤ |t| := le_trans (le_max_right _ _) ht + rw [mem_closedBall, Complex.dist_eq] at hw + have hwre : |w.re - 2| ≤ 24 / 25 * (91 / 50) := by + have := Complex.abs_re_le_norm (w - (2 + t * I)); simp at this; linarith + have hwim : |w.im - t| ≤ 24 / 25 * (91 / 50) := by + have := Complex.abs_im_le_norm (w - (2 + t * I)); simp at this; linarith + rw [abs_le] at hwre hwim + have h3 : 2 ≤ |w.im| := by + rcases le_abs'.mp ht4 with h | h + · rw [abs_of_neg (by linarith [hwim.2])]; linarith [hwim.2] + · rw [abs_of_pos (by linarith [hwim.1])]; linarith [hwim.1] + have h4 : |w.im| ≤ |t| + 3 := by + have := abs_sub_abs_le_abs_sub w.im t + have h5 : |w.im - t| ≤ 2 := abs_le.mpr ⟨by linarith [hwim.1], by linarith [hwim.2]⟩ + linarith + rw [one_mul, Real.rpow_natCast] + calc ‖f w‖ ≤ Cf * |w.im| ^ k := hgrow w (by linarith [hwre.1]) (by linarith [hwre.2]) h3 + _ ≤ Cf * (|t| + 3) ^ k := by gcongr } + obtain ⟨C, hC, hpf⟩ := D.logDeriv_partial_fraction_of + exact ⟨C, max t₀ 4, hC, le_max_right _ _, le_max_left _ _, fun t ht => by + simpa [D, one_mul] using hpf t ht⟩ /-- **Horizontal sides, generic**: with the data of `logDeriv_partial_fraction_two_line`, for every T with @@ -231,7 +176,7 @@ theorem horizontal_bound_two_line {f : ℂ → ℂ} {Cf t₀ : ℝ} {k : ℕ} have hPFint : (∫ σ in (1 / 2 : ℝ)..2, PF σ) = ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) * ∫ σ in (1 / 2 : ℝ)..2, ((σ : ℂ) + T * I - ρ)⁻¹ := by simp only [hPF] - rw [integral_finset_sum hintTerm] + rw [intervalIntegral.integral_finsetSum hintTerm] refine Finset.sum_congr rfl (fun ρ _ => ?_) simp only [div_eq_mul_inv] exact intervalIntegral.integral_const_mul _ _ @@ -368,7 +313,6 @@ theorem local_count_two_line {f : ℂ → ℂ} {Cf t₀ : ℝ} {k : ℕ} /-! ### good heights -/ -set_option maxHeartbeats 1600000 in /-- **Good heights, generic**: with the two-line data for f and a ZeroConfig Zc whose β ≥ 1/2 points are zeros of f with the same order (hlink) and which contains every right-half-plane zero of f with |Im ρ| ≥ t₀ (hlink'): for j ≥ j₀ there is R ∈ [j, j+1] with f ≠ 0 and ‖f′/f‖ ≤ C log²(j+3) on Im s = ±R, 1/2 ≤ Re s ≤ 2. -/ @@ -384,186 +328,26 @@ theorem good_heights_two_line {f : ℂ → ℂ} {Cf t₀ : ℝ} {k : ℕ} ∃ R : ℝ, (j : ℝ) ≤ R ∧ R ≤ (j : ℝ) + 1 ∧ ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → f s ≠ 0 ∧ ‖logDeriv f s‖ ≤ C * (Real.log ((j : ℝ) + 3)) ^ 2 := by - classical - obtain ⟨C, t₁, hC, ht₁4, ht₀, hpf⟩ := logDeriv_partial_fraction_two_line hfa hCf hgrow hlow' + obtain ⟨C, t₁, hC, _, ht₀, hpf⟩ := logDeriv_partial_fraction_two_line hfa hCf hgrow hlow' obtain ⟨A₀, hA₀1, hloc⟩ := local_count_two_line hfa hCf hgrow hlow' Zc hlink - have hA₀ : 0 ≤ A₀ := by linarith - -- the constant and the threshold - refine ⟨2 * C * (48 * A₀ + 3), by positivity, ⌈t₁⌉₊ + 4, fun j hj => ?_⟩ - have hjt4 : t₁ + 4 ≤ j := by - have h1 : t₁ ≤ ⌈t₁⌉₊ := Nat.le_ceil t₁ - have h2 : ((⌈t₁⌉₊ + 4 : ℕ) : ℝ) ≤ j := by exact_mod_cast hj - push_cast at h2; linarith - have hjt : t₁ ≤ j := by - have h1 : t₁ ≤ ⌈t₁⌉₊ := Nat.le_ceil t₁ - have h2 : ((⌈t₁⌉₊ + 4 : ℕ) : ℝ) ≤ j := by exact_mod_cast hj - push_cast at h2; linarith - have hj4 : (4 : ℝ) ≤ j := by - have h2 : ((⌈t₁⌉₊ + 4 : ℕ) : ℝ) ≤ j := by exact_mod_cast hj - push_cast at h2; linarith [Nat.cast_nonneg (α := ℝ) ⌈t₁⌉₊] - set Lg : ℝ := Real.log ((j : ℝ) + 3) with hLg - have hLg1 : 1 ≤ Lg := by - rw [hLg, ← Real.log_exp 1] - apply Real.log_le_log (Real.exp_pos 1) - have := Real.exp_one_lt_d9; linarith - have hlog2 : Real.log 2 ≤ Lg := by rw [hLg]; exact Real.log_le_log (by norm_num) (by linarith) - -- the two finite families of zeros near height ±j (as sets of ℂ) - set Wp : Set ℂ := Zc.window ((j : ℝ) - 3) ((j : ℝ) - 3 + (6 : ℕ)) with hWp - set Wm : Set ℂ := Zc.window (-(j : ℝ) - 4) (-(j : ℝ) - 4 + (6 : ℕ)) with hWm - have hWpfin : Wp.Finite := Zc.window_finite _ _ - have hWmfin : Wm.Finite := Zc.window_finite _ _ - set S : Finset ℝ := hWpfin.toFinset.image (fun ρ : ℂ => ρ.im) - ∪ hWmfin.toFinset.image (fun ρ : ℂ => -ρ.im) with hS - -- counts - have hwin6 : ∀ a : ℝ, |a| ≤ (j : ℝ) + 4 → (Zc.N a (a + (6 : ℕ)) : ℝ) ≤ 6 * (A₀ * (2 * Lg)) := by - intro a ha - rw [N_unit_windows Zc a 6, Nat.cast_sum] - have hterm : ∀ i ∈ Finset.range 6, (Zc.N (a + i) (a + i + 1) : ℝ) ≤ A₀ * (2 * Lg) := by - intro i hi - have hi6 : (i : ℝ) < 6 := by exact_mod_cast Finset.mem_range.mp hi - refine (hloc (a + i)).trans (mul_le_mul_of_nonneg_left ?_ hA₀) - have h1 : |a + i| + 3 ≤ ((j : ℝ) + 3) ^ 2 := by - have := abs_add_le a (i : ℝ) - rw [Nat.abs_cast] at this - nlinarith - calc Real.log (|a + ↑i| + 3) ≤ Real.log (((j : ℝ) + 3) ^ 2) := - Real.log_le_log (by positivity) h1 - _ = 2 * Lg := by rw [hLg, Real.log_pow]; push_cast; ring - calc ∑ i ∈ Finset.range 6, (Zc.N (a + i) (a + i + 1) : ℝ) - ≤ ∑ i ∈ Finset.range 6, A₀ * (2 * Lg) := Finset.sum_le_sum hterm - _ = 6 * (A₀ * (2 * Lg)) := by - rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul]; push_cast; ring - have hcardW : ∀ {W : Set ℂ} (hW : W.Finite) (a : ℝ), W = Zc.window a (a + (6 : ℕ)) → - |a| ≤ (j : ℝ) + 4 → (hW.toFinset.card : ℝ) ≤ 6 * (A₀ * (2 * Lg)) := by - intro W hW a hWa ha - have h1 : hW.toFinset.card = W.ncard := (Set.ncard_eq_toFinset_card W hW).symm - have h2 : W.ncard ≤ Zc.N a (a + (6 : ℕ)) := by - rw [hWa]; exact Zc.ncard_le_finsum_mult a (a + (6 : ℕ)) subset_rfl - calc (hW.toFinset.card : ℝ) = (W.ncard : ℝ) := by rw [h1] - _ ≤ (Zc.N a (a + (6 : ℕ)) : ℝ) := by exact_mod_cast h2 - _ ≤ 6 * (A₀ * (2 * Lg)) := hwin6 a ha - have hcard : (S.card : ℝ) ≤ 24 * A₀ * Lg := by - have h1 : S.card ≤ hWpfin.toFinset.card + hWmfin.toFinset.card := - (Finset.card_union_le _ _).trans (Nat.add_le_add Finset.card_image_le Finset.card_image_le) - have h1' : (S.card : ℝ) ≤ hWpfin.toFinset.card + hWmfin.toFinset.card := by exact_mod_cast h1 - have hp := hcardW hWpfin ((j : ℝ) - 3) hWp (by rw [abs_of_nonneg (by linarith)]; linarith) - have hm := hcardW hWmfin (-(j : ℝ) - 4) hWm (by rw [abs_of_nonpos (by linarith)]; linarith) - linarith - -- the good height - obtain ⟨R, hR1, hR2, hfar⟩ := Zeta23.WeilEF.exists_far_point S j - set δ : ℝ := 1 / (2 * ((S.card : ℝ) + 1)) with hδ - have hδpos : 0 < δ := by rw [hδ]; positivity - have hδinv : 1 / δ = 2 * ((S.card : ℝ) + 1) := by rw [hδ, one_div_one_div] - refine ⟨R, hR1, hR2, ?_⟩ - have hlogR : Real.log (|R| + 3) ≤ 2 * Lg := by - rw [abs_of_nonneg (by linarith)] - calc Real.log (R + 3) ≤ Real.log (2 * ((j:ℝ) + 3)) := Real.log_le_log (by linarith) (by linarith) - _ = Real.log 2 + Lg := by rw [Real.log_mul (by norm_num) (by linarith)] - _ ≤ 2 * Lg := by linarith - -- the right half 1/2 ≤ Re s ≤ 2 - have right_half : ∀ s : ℂ, (s.im = R ∨ s.im = -R) → 1 / 2 ≤ s.re → s.re ≤ 2 → - f s ≠ 0 ∧ ‖logDeriv f s‖ ≤ (2 * C * (48 * A₀ + 3)) * Lg ^ 2 := by - intro s hsR hσ1 hσ2 - have hsre : 0 < s.re := by linarith - have habs : |s.im| = R := by - rcases hsR with h | h - · rw [h, abs_of_nonneg (by linarith)] - · rw [h, abs_neg, abs_of_nonneg (by linarith)] - have ht : t₁ ≤ |s.im| := by rw [habs]; linarith - obtain ⟨_, Z, hZset, hZsum, hZpf⟩ := hpf s.im ht - have hsball : s ∈ closedBall (2 + s.im * I) (3 / 2) := by - rw [mem_closedBall, dist_eq_norm] - have : s - (2 + s.im * I) = ((s.re - 2 : ℝ) : ℂ) := by apply Complex.ext <;> simp - rw [this, Complex.norm_real, Real.norm_eq_abs, abs_sub_comm, abs_of_nonneg (by linarith)] - linarith - -- every zero of Y in the pf ball has its signed ordinate in S, hence is δ-far from s - have hordS : ∀ ρ : ℂ, ρ ∈ closedBall (2 + s.im * I) (22 / 25 * (91 / 50)) → - f ρ = 0 → δ ≤ ‖s - ρ‖ := by - intro ρ hρ hz + let j₀ : ℕ := ⌈t₁⌉₊ + 4 + have hj₀_ge : t₁ + 4 ≤ (j₀ : ℝ) := by + have : t₁ ≤ (⌈t₁⌉₊ : ℝ) := Nat.le_ceil t₁ + push_cast [j₀]; linarith + obtain ⟨C', hC', hgh⟩ := Zeta23.WeilEF.good_heights_of_threshold Zc f 1 le_rfl + (t₁ := t₁) (j₀ := j₀) (by omega) (by linarith) hC + (fun t ht => by simpa [one_mul] using (hpf t ht).2) hA₀1 hloc + (fun {t ρ} ht hρ hz => by have him := Zeta23.WeilEF.im_mem_of_mem_closedBall hρ rw [mem_closedBall, dist_eq_norm] at hρ have hρre : 0 < ρ.re := by - have := Complex.abs_re_le_norm (ρ - (2 + s.im * I)) + have := Complex.abs_re_le_norm (ρ - (2 + t * I)) simp at this; rw [abs_le] at this; linarith [this.1] have hρim : t₀ ≤ |ρ.im| := by - have h1 : |ρ.im - s.im| ≤ 22 / 25 * (91 / 50) := him - have h2 := abs_sub_abs_le_abs_sub s.im ρ.im - rw [abs_sub_comm] at h2 - rw [habs] at h2 - linarith - have hρc : ρ ∈ Zc.carrier := hlink' ρ hρre hρim hz - rw [abs_le] at him - refine le_trans ?_ (Zeta23.WeilEF.abs_im_sub_le_norm_sub s ρ) - rcases hsR with hsR | hsR - · have hmem : ρ ∈ hWpfin.toFinset := by - rw [Set.Finite.mem_toFinset, hWp] - rw [hsR] at him - refine ⟨hρc, ?_, ?_⟩ - · show (j : ℝ) - 3 < ρ.im - linarith [him.1] - · show ρ.im ≤ (j : ℝ) - 3 + ((6 : ℕ) : ℝ) - push_cast; linarith [him.2] - have : ρ.im ∈ S := by - rw [hS, Finset.mem_union]; left - exact Finset.mem_image.mpr ⟨ρ, hmem, rfl⟩ - have := hfar _ this - rwa [hsR] - · have hmem : ρ ∈ hWmfin.toFinset := by - rw [Set.Finite.mem_toFinset, hWm] - rw [hsR] at him - refine ⟨hρc, ?_, ?_⟩ - · show -(j : ℝ) - 4 < ρ.im - linarith [him.1] - · show ρ.im ≤ -(j : ℝ) - 4 + ((6 : ℕ) : ℝ) - push_cast; linarith [him.2] - have : -ρ.im ∈ S := by - rw [hS, Finset.mem_union]; right - exact Finset.mem_image.mpr ⟨ρ, hmem, rfl⟩ - have := hfar _ this - rw [hsR, show |(-R) - ρ.im| = |R - (-ρ.im)| by rw [← abs_neg]; ring_nf] - exact this - have hY : f s ≠ 0 := by - intro hz - have h0 := hordS s (closedBall_subset_closedBall (by norm_num) hsball) hz - simp at h0; linarith - refine ⟨hY, ?_⟩ - have hZpf' := hZpf s hsball hY - have hlogt : Real.log (|s.im| + 3) ≤ 2 * Lg := by rw [habs]; rw [abs_of_nonneg (by linarith)] at hlogR; exact hlogR - have hZmem : ∀ ρ ∈ Z, ρ ∈ closedBall (2 + s.im * I) (22 / 25 * (91 / 50)) ∧ f ρ = 0 := by - intro ρ hρ - have : ρ ∈ (↑Z : Set ℂ) := hρ - rw [hZset] at this - exact this - have hsumZ : ‖∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ ≤ (C * (2 * Lg)) * (1 / δ) := by - calc ‖∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ - ≤ ∑ ρ ∈ Z, ‖(analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ := norm_sum_le _ _ - _ ≤ ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℝ) * (1 / δ) := by - refine Finset.sum_le_sum fun ρ hρ => ?_ - obtain ⟨hρb, hρz⟩ := hZmem ρ hρ - have hd := hordS ρ hρb hρz - rw [norm_div, Complex.norm_natCast, div_eq_mul_one_div] - refine mul_le_mul_of_nonneg_left ?_ (Nat.cast_nonneg _) - exact one_div_le_one_div_of_le hδpos hd - _ = (∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℝ)) * (1 / δ) := by rw [Finset.sum_mul] - _ ≤ (C * (2 * Lg)) * (1 / δ) := by - refine mul_le_mul_of_nonneg_right (hZsum.trans ?_) (div_nonneg zero_le_one hδpos.le) - exact mul_le_mul_of_nonneg_left hlogt hC.le - have hYld : ‖logDeriv f s‖ ≤ C * (2 * Lg) + (C * (2 * Lg)) * (1 / δ) := by - have h1 : ‖logDeriv f s‖ - ≤ ‖logDeriv f s - ∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ - + ‖∑ ρ ∈ Z, (analyticOrderNatAt f ρ : ℂ) / (s - ρ)‖ := norm_le_norm_sub_add _ _ - have h2 := hZpf'.trans (mul_le_mul_of_nonneg_left hlogt hC.le) - linarith [hsumZ] - refine hYld.trans ?_ - rw [hδinv] - have : C * (2 * Lg) + C * (2 * Lg) * (2 * ((S.card : ℝ) + 1)) - = 2 * C * Lg * (2 * (S.card : ℝ) + 3) := by ring - rw [this] - have hn : 2 * (S.card : ℝ) + 3 ≤ (48 * A₀ + 3) * Lg := by nlinarith - calc 2 * C * Lg * (2 * (S.card : ℝ) + 3) ≤ 2 * C * Lg * ((48 * A₀ + 3) * Lg) := - mul_le_mul_of_nonneg_left hn (by positivity) - _ = 2 * C * (48 * A₀ + 3) * Lg ^ 2 := by ring - exact right_half + have h2 := abs_sub_abs_le_abs_sub t ρ.im + rw [abs_sub_comm] at h2; linarith + exact hlink' ρ hρre hρim hz) + exact ⟨C', hC', j₀, fun j hj => by simpa [one_mul] using hgh j hj⟩ end Generic diff --git a/zeta23/Zeta23/XiPrime/ZeroCount/GenericRvM.lean b/zeta23/Zeta23/XiPrime/ZeroCount/GenericRvM.lean index 29a5022721..4dae40304b 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount/GenericRvM.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount/GenericRvM.lean @@ -4,23 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ /- -Zeta23/XiPrime/ZeroCount/GenericRvM.lean — the GENERIC half-contour fold and Riemann–von Mangoldt main-term assembly. +Zeta23/XiPrime/ZeroCount/GenericRvM.lean — generic Riemann–von Mangoldt main-term assembly. -Two facts abstracted over the function (instantiated both for ξ′ and for Ω = Γℝ·W): - (A) `rectangleIntegral_eq_halfContour_of_fold`: if F(1 − s̄) = −conj F(s) along the right half of ∂([−1,2]×[T₁,T₂]) and F is - continuous along the two horizontal lines, then ∮_{∂([−1,2]×[T₁,T₂])} F = 2i·Im(halfContour F T₁ T₂); - `natCast_eq_im_halfContour`: so a count N with (1/2πi)∮F = N satisfies N = (1/π)·Im halfContour F. - (B) `rvM_main_of`: for a ZeroConfig Zc, a good-height predicate with one good height per unit interval above a₀, the - identity Zc.N T₁ T₂ = (1/π)Im halfContour(logDeriv Λ) at good heights, a residual bound - |Im halfContour(logDeriv Λ) − Im halfContour(Γℝ′/Γℝ)| ≤ C log(|T₁|+3) + K + C log(|T₂|+3), and a local count, one gets - |Zc.N(T,2T) − (T/2π)ℓ₁(T)| ≤ C′ log T — the μ-bookkeeping against Zeta23.RvM.gamma_side, done once. -Instances: Hardy/Contour.lean + Hardy/Count.lean (W); the ξ′ versions in ZeroCount.lean can be re-derived from these. +Thin instantiation of `Zeta23.RvM.rvM_main_scaled` at `scale = 1`, `μ = Zeta23.mu`, `ell = ell1`. -/ import Zeta23.XiPrime.ZeroCount.Basic -import Zeta23.RvM.Defs -import Zeta23.RvM.GammaSide -import Zeta23.GammaFacts.Complete -import Zeta23.Analytic.RectangleLogDeriv +import Zeta23.RvM.Generic open Complex Set Filter Topology MeasureTheory intervalIntegral open scoped ComplexConjugate @@ -34,87 +23,7 @@ namespace GenericRvM open Zeta23.RvM (halfContour) -/-! ### (A) the fold -/ - -section fold - -variable {F : ℂ → ℂ} {T₁ T₂ : ℝ} - -/-- horizontal fold at height T: ∫_{−1}^{2} F(σ+iT)dσ = 2i·Im ∫_{1/2}^{2} F(σ+iT)dσ, given continuity along the line and -F(1 − s̄) = −conj F(s) at s = x + iT, x ∈ [1/2, 2]. -/ -lemma horizontal_fold_of (T : ℝ) (hcont : Continuous fun σ : ℝ => F (σ + T * I)) - (hfold : ∀ x ∈ uIcc (1 / 2 : ℝ) 2, F (1 - conj ((x : ℂ) + T * I)) = -conj (F ((x : ℂ) + T * I))) : - ∫ σ in (-1 : ℝ)..2, F (σ + T * I) = 2 * I * ((∫ σ in (1 / 2 : ℝ)..2, F (σ + T * I)).im : ℂ) := by - have hsplit := integral_add_adjacent_intervals - (hcont.intervalIntegrable (μ := volume) (-1) (1 / 2)) (hcont.intervalIntegrable (μ := volume) (1 / 2) 2) - rw [← hsplit] - set A := ∫ σ in (1 / 2 : ℝ)..2, F (σ + T * I) with hA - have hleft : ∫ σ in (-1 : ℝ)..(1 / 2), F (σ + T * I) = -starRingEnd ℂ A := by - have hsub := intervalIntegral.integral_comp_sub_left (f := fun x : ℝ => F (x + T * I)) (a := (1 / 2 : ℝ)) (b := 2) (1 : ℝ) - norm_num at hsub - rw [← hsub, hA, ← intervalIntegral_conj, ← intervalIntegral.integral_neg] - apply intervalIntegral.integral_congr - intro x hx - have key := hfold x hx - have e : (1 : ℂ) - starRingEnd ℂ ((x : ℂ) + T * I) = 1 - (x : ℂ) + T * I := by simp [Complex.ext_iff] - simp only - rw [← e, key] - rw [hleft, neg_add_eq_sub, Complex.sub_conj] - push_cast - ring - -/-- vertical fold: ∫_{T₁}^{T₂} F(−1+it)dt = −conj ∫_{T₁}^{T₂} F(2+it)dt. -/ -lemma vertical_fold_of (hfold : ∀ t ∈ uIcc T₁ T₂, F (1 - conj ((2 : ℂ) + t * I)) = -conj (F ((2 : ℂ) + t * I))) : - ∫ t in T₁..T₂, F (-1 + t * I) = -starRingEnd ℂ (∫ t in T₁..T₂, F (2 + t * I)) := by - rw [← intervalIntegral_conj, ← intervalIntegral.integral_neg] - apply intervalIntegral.integral_congr - intro t ht - have e : (1 : ℂ) - starRingEnd ℂ (2 + t * I) = -1 + t * I := by simp [Complex.ext_iff]; norm_num - show F (-1 + t * I) = -starRingEnd ℂ (F (2 + t * I)) - rw [← e, hfold t ht] - -/-- **(A) the fold**: ∮_{∂([−1,2]×[T₁,T₂])} F = 2i·Im(halfContour F T₁ T₂). -/ -theorem rectangleIntegral_eq_halfContour_of_fold - (hc₁ : Continuous fun σ : ℝ => F (σ + T₁ * I)) (hc₂ : Continuous fun σ : ℝ => F (σ + T₂ * I)) - (hf₁ : ∀ x ∈ uIcc (1 / 2 : ℝ) 2, F (1 - conj ((x : ℂ) + T₁ * I)) = -conj (F ((x : ℂ) + T₁ * I))) - (hf₂ : ∀ x ∈ uIcc (1 / 2 : ℝ) 2, F (1 - conj ((x : ℂ) + T₂ * I)) = -conj (F ((x : ℂ) + T₂ * I))) - (hfv : ∀ t ∈ uIcc T₁ T₂, F (1 - conj ((2 : ℂ) + t * I)) = -conj (F ((2 : ℂ) + t * I))) : - RectangleIntegral F (-1 + T₁ * I) (2 + T₂ * I) = 2 * I * ((halfContour F T₁ T₂).im : ℂ) := by - have hre1 : (-1 + T₁ * I).re = -1 := by simp - have him1 : (-1 + T₁ * I).im = T₁ := by simp - have hre2 : (2 + T₂ * I : ℂ).re = 2 := by simp - have him2 : (2 + T₂ * I : ℂ).im = T₂ := by simp - simp only [RectangleIntegral, HIntegral, VIntegral, hre1, him1, hre2, him2, smul_eq_mul, - Complex.ofReal_neg, Complex.ofReal_one, Complex.ofReal_ofNat] - rw [horizontal_fold_of T₁ hc₁ hf₁, horizontal_fold_of T₂ hc₂ hf₂, vertical_fold_of hfv] - simp only [Zeta23.RvM.halfContour, Complex.add_im, Complex.sub_im, Complex.mul_I_im] - generalize (∫ σ in (1 / 2 : ℝ)..2, F (σ + T₁ * I)) = A₁ - generalize (∫ σ in (1 / 2 : ℝ)..2, F (σ + T₂ * I)) = A₂ - generalize (∫ t in T₁..T₂, F (2 + t * I)) = B - have e1 : 2 * I * (A₁.im : ℂ) - 2 * I * (A₂.im : ℂ) + I * B - I * -starRingEnd ℂ B - = 2 * I * (A₁.im : ℂ) - 2 * I * (A₂.im : ℂ) + I * (B + starRingEnd ℂ B) := by ring - rw [e1, Complex.add_conj] - push_cast - ring - -/-- from (1/2πi)∮F = N and the fold: N = (1/π)·Im halfContour F. -/ -theorem natCast_eq_im_halfContour {N : ℕ} - (hN : RectangleIntegral' F (-1 + T₁ * I) (2 + T₂ * I) = (N : ℂ)) - (hfold : RectangleIntegral F (-1 + T₁ * I) (2 + T₂ * I) = 2 * I * ((halfContour F T₁ T₂).im : ℂ)) : - (N : ℝ) = (1 / Real.pi) * (halfContour F T₁ T₂).im := by - have h := hN - change (1 / (2 * Real.pi * I)) • RectangleIntegral _ _ _ = _ at h - rw [hfold, smul_eq_mul] at h - have h' : ((N : ℝ) : ℂ) = (((1 / Real.pi) * (halfContour F T₁ T₂).im : ℝ) : ℂ) := by - push_cast; rw [← h]; field_simp - exact_mod_cast h' - -end fold - -/-! ### (B) the main-term assembly -/ - -set_option maxHeartbeats 1000000 in -/-- **(B) Riemann–von Mangoldt main term, generic**. -/ +/-- **(B) Riemann–von Mangoldt main term, generic** (delegates to `Zeta23.RvM.rvM_main_scaled`). -/ theorem rvM_main_of (Zc : ZeroConfig) (Good : ℝ → Prop) (Λ : ℂ → ℂ) {a₀ : ℝ} (ha₀ : 0 ≤ a₀) (hgood : ∀ a : ℝ, a₀ ≤ a → ∃ T ∈ Icc a (a + 1), Good T) (hcount : ∀ T₁ T₂ : ℝ, a₀ ≤ T₁ → T₁ ≤ T₂ → Good T₁ → Good T₂ → @@ -129,163 +38,33 @@ theorem rvM_main_of (Zc : ZeroConfig) (Good : ℝ → Prop) (Λ : ℂ → ℂ) { have hΓ : GammaFacts := Zeta23.gammaFacts obtain ⟨Cμ, Tμ, hCμ⟩ := hΓ.int_mu obtain ⟨CM, hCM0, hCM⟩ := Zeta23.RvM.mu_le_log hΓ - have hμc : Continuous mu := Zeta23.RvM.mu_continuous hΓ - have hA₀0 : 0 ≤ A₀ := by linarith - refine ⟨4 * CY + KY + 1 + 4 * A₀ + 4 * CM + |Cμ|, max (max (max (TY + 1) (Tμ + 1)) 4) (a₀ + 1), fun T hT' => ?_⟩ - have hT : max (max (TY + 1) (Tμ + 1)) 4 ≤ T := le_trans (le_max_left _ _) hT' - have hTa₀ : a₀ + 1 ≤ T := le_trans (le_max_right _ _) hT' - have hT4 : 4 ≤ T := le_trans (le_max_right _ _) hT - have hTY : TY + 1 ≤ T := le_trans (le_trans (le_max_left _ _) (le_max_left _ _)) hT - have hTμ : Tμ + 1 ≤ T := le_trans (le_trans (le_max_right _ _) (le_max_left _ _)) hT - have hlogT : 1 ≤ Real.log T := by - rw [← Real.log_exp 1] - exact Real.log_le_log (Real.exp_pos 1) (le_trans (by linarith [Real.exp_one_lt_d9]) le_rfl) - have hlogT0 : 0 < Real.log T := by linarith - obtain ⟨T₁, hT₁mem, hg1⟩ := hgood (T - 1) (by linarith) - obtain ⟨T₂, hT₂mem, hg2⟩ := hgood (2 * T) (by linarith) - have hT₁a : T - 1 ≤ T₁ := hT₁mem.1 - have hT₁b : T₁ ≤ T := by have := hT₁mem.2; linarith - have hT₂a : 2 * T ≤ T₂ := hT₂mem.1 - have hT₂b : T₂ ≤ 2 * T + 1 := hT₂mem.2 - have h1T₁ : 1 ≤ T₁ := by linarith - have h12 : T₁ ≤ T₂ := by linarith - have hN := hcount T₁ T₂ (by linarith) h12 hg1 hg2 - have hgam := Zeta23.RvM.gamma_side (T₁ := T₁) (T₂ := T₂) (by linarith) (by linarith) - have hYpart := hYb T₁ T₂ (by linarith) h12 hg1 hg2 - have hadd : (Zc.N T₁ T₂ : ℝ) = (Zc.N T₁ T : ℝ) + (Zc.N T (2 * T) : ℝ) + (Zc.N (2 * T) T₂ : ℝ) := by - rw [Zc.N_add hT₁b (by linarith : T ≤ T₂), Zc.N_add (by linarith : T ≤ 2 * T) hT₂a] - push_cast; ring - have hlogsq : ∀ x : ℝ, 0 < x → x + 3 ≤ T ^ 2 → Real.log (x + 3) ≤ 2 * Real.log T := by - intro x hx hxT - calc Real.log (x + 3) ≤ Real.log (T ^ 2) := Real.log_le_log (by linarith) hxT + refine ⟨2 * (4 * CY + KY + 4 * A₀ + 4 * CM + |Cμ|), + max (max (max (TY + 1) (Tμ + 1)) 4) (a₀ + 1), fun T hT => ?_⟩ + have hT4 : 4 ≤ T := le_trans (le_max_right _ _) (le_trans (le_max_left _ _) hT) + have hmain := Zeta23.RvM.rvM_main_scaled Zc Good Λ mu ell1 + (scale := 1) (a₀ := a₀) (CY := CY) (KY := KY) (TY := TY) (A₀ := A₀) (CM := CM) + (Cμ := Cμ) (Tμ := Tμ) le_rfl ha₀ hCY.le hKY (by linarith) hCM0.le hgood + (fun T₁ T₂ h1 h12 hg1 hg2 => hcount T₁ T₂ (le_trans (le_max_left _ _) h1) h12.le hg1 hg2) + (fun T₁ T₂ h1 h12 hg1 hg2 => by + have h1T₁ : 1 ≤ T₁ := le_trans (le_max_right _ _) (le_trans (le_max_left _ _) h1) + have hgam := Zeta23.RvM.gamma_side (T₁ := T₁) (T₂ := T₂) (by linarith) (by linarith) + have hpi : Real.pi * ∫ t in T₁..T₂, mu t = (halfContour (logDeriv Complex.Gammaℝ) T₁ T₂).im := by + rw [← hgam]; field_simp [Real.pi_ne_zero] + rw [hpi, one_mul, one_mul] + exact hYb T₁ T₂ (le_trans (le_max_right _ _) h1) h12.le hg1 hg2) + (fun t => by rw [one_mul]; exact hA₀ t) + (Zeta23.RvM.mu_continuous hΓ) + (fun τ hτ => by rw [one_mul]; exact hCM τ hτ) hCμ T hT + rw [one_mul] at hmain + have hlog : Real.log (T + 2) ≤ 2 * Real.log T := by + calc Real.log (T + 2) ≤ Real.log (T ^ 2) := Real.log_le_log (by linarith) (by nlinarith) _ = 2 * Real.log T := by rw [Real.log_pow]; push_cast; ring - have hw1 : (Zc.N T₁ T : ℝ) ≤ 2 * A₀ * Real.log T := by - have hsub : Zc.N T₁ T ≤ Zc.N T₁ (T₁ + 1) := Zc.N_mono le_rfl (by linarith) - calc (Zc.N T₁ T : ℝ) ≤ (Zc.N T₁ (T₁ + 1) : ℝ) := by exact_mod_cast hsub - _ ≤ A₀ * Real.log (|T₁| + 3) := hA₀ T₁ - _ ≤ A₀ * (2 * Real.log T) := by - refine mul_le_mul_of_nonneg_left ?_ hA₀0 - rw [abs_of_pos (by linarith : 0 < T₁)] - exact hlogsq T₁ (by linarith) (by nlinarith) - _ = 2 * A₀ * Real.log T := by ring - have hw2 : (Zc.N (2 * T) T₂ : ℝ) ≤ 2 * A₀ * Real.log T := by - have hsub : Zc.N (2 * T) T₂ ≤ Zc.N (2 * T) (2 * T + 1) := Zc.N_mono le_rfl hT₂b - calc (Zc.N (2 * T) T₂ : ℝ) ≤ (Zc.N (2 * T) (2 * T + 1) : ℝ) := by exact_mod_cast hsub - _ ≤ A₀ * Real.log (|2 * T| + 3) := hA₀ (2 * T) - _ ≤ A₀ * (2 * Real.log T) := by - refine mul_le_mul_of_nonneg_left ?_ hA₀0 - rw [abs_of_pos (by linarith : 0 < 2 * T)] - exact hlogsq (2 * T) (by linarith) (by nlinarith) - _ = 2 * A₀ * Real.log T := by ring - -- the residual is O(log T) - set Rres : ℝ := (halfContour (logDeriv Λ) T₁ T₂).im - (halfContour (logDeriv Complex.Gammaℝ) T₁ T₂).im with hRres - have hYlog : |Rres| ≤ 4 * CY * Real.log T + KY := by - have e1 : Real.log (|T₁| + 3) ≤ 2 * Real.log T := by - rw [abs_of_pos (by linarith : 0 < T₁)]; exact hlogsq T₁ (by linarith) (by nlinarith) - have e2 : Real.log (|T₂| + 3) ≤ 2 * Real.log T := by - rw [abs_of_pos (by linarith : 0 < T₂)]; exact hlogsq T₂ (by linarith) (by nlinarith) - have := mul_le_mul_of_nonneg_left e1 hCY.le - have := mul_le_mul_of_nonneg_left e2 hCY.le - linarith - -- μ-integral bookkeeping - have hμint : ∀ a b : ℝ, IntervalIntegrable mu volume a b := fun a b => hμc.intervalIntegrable a b - have hμsplit : (∫ t in T₁..T₂, mu t) - = (∫ t in T₁..T, mu t) + (∫ t in T..(2 * T), mu t) + ∫ t in (2 * T)..T₂, mu t := by - have e1 : (∫ t in T₁..(2 * T), mu t) = (∫ t in T₁..T, mu t) + ∫ t in T..(2 * T), mu t := - (integral_add_adjacent_intervals (hμint T₁ T) (hμint T (2 * T))).symm - have e2 : (∫ t in T₁..T₂, mu t) = (∫ t in T₁..(2 * T), mu t) + ∫ t in (2 * T)..T₂, mu t := - (integral_add_adjacent_intervals (hμint T₁ (2 * T)) (hμint (2 * T) T₂)).symm - rw [e2, e1] - have hμwin : ∀ a b : ℝ, 1 ≤ a → a ≤ b → b ≤ 2 * T + 1 → |b - a| ≤ 1 → - |∫ t in a..b, mu t| ≤ 2 * CM * Real.log T := by - intro a b ha hab hb hba - have hbound : ∀ t ∈ Set.uIoc a b, ‖mu t‖ ≤ CM * Real.log (2 * T + 4) := by - intro t ht - rw [Set.uIoc_of_le hab] at ht - have ht1 : 1 ≤ t := le_trans ha ht.1.le - have ht2 : t ≤ 2 * T + 1 := le_trans ht.2 hb - rw [Real.norm_eq_abs] - refine (hCM t ht1).trans ?_ - refine mul_le_mul_of_nonneg_left ?_ hCM0.le - exact Real.log_le_log (by linarith) (by linarith) - have := intervalIntegral.norm_integral_le_of_norm_le_const hbound - rw [Real.norm_eq_abs] at this - have hlog24 : Real.log (2 * T + 4) ≤ 2 * Real.log T := by - calc Real.log (2 * T + 4) ≤ Real.log (T ^ 2) := Real.log_le_log (by linarith) (by nlinarith) - _ = 2 * Real.log T := by rw [Real.log_pow]; push_cast; ring - calc |∫ t in a..b, mu t| ≤ CM * Real.log (2 * T + 4) * |b - a| := this - _ ≤ CM * (2 * Real.log T) * 1 := by - refine mul_le_mul ?_ hba (abs_nonneg _) (by positivity) - exact mul_le_mul_of_nonneg_left hlog24 hCM0.le - _ = 2 * CM * Real.log T := by ring - have hμ1 : |∫ t in T₁..T, mu t| ≤ 2 * CM * Real.log T := - hμwin T₁ T h1T₁ hT₁b (by linarith) (by rw [abs_of_nonneg (by linarith)]; linarith) - have hμ2 : |∫ t in (2 * T)..T₂, mu t| ≤ 2 * CM * Real.log T := - hμwin (2 * T) T₂ (by linarith) hT₂a (by linarith) (by rw [abs_of_nonneg (by linarith)]; linarith) - have hintmu := hCμ T (by linarith) - have hT0 : (0:ℝ) < T := by linarith - have hCμT : Cμ / T ≤ |Cμ| := by - calc Cμ / T ≤ |Cμ| / T := by gcongr; exact le_abs_self _ - _ ≤ |Cμ| / 1 := by - apply div_le_div_of_nonneg_left (abs_nonneg _) one_pos; linarith - _ = |Cμ| := div_one _ - have hπ : (0:ℝ) < Real.pi := Real.pi_pos - have hπ3 : (3:ℝ) ≤ Real.pi := Real.pi_gt_three.le - -- the key identity: N(T₁,T₂) = ∫μ + (1/π)·Rres - have h5 : (Zc.N T₁ T₂ : ℝ) = (∫ t in T₁..T₂, mu t) + (1 / Real.pi) * Rres := by - rw [hN, hRres, mul_sub, hgam]; ring - have hkey : (Zc.N T (2 * T) : ℝ) - T * ell1 T / (2 * Real.pi) - = (1 / Real.pi) * Rres - + ((∫ t in T₁..T, mu t) + (∫ t in (2 * T)..T₂, mu t) - + ((∫ t in T..(2 * T), mu t) - T * ell1 T / (2 * Real.pi))) - - ((Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ)) := by - rw [hμsplit] at h5 - have h6 := hadd - linarith - have hA : |(1 / Real.pi) * Rres| ≤ 4 * CY * Real.log T + KY := by - rw [abs_mul, abs_of_pos (by positivity : (0:ℝ) < 1 / Real.pi)] - have hfrac : (1:ℝ) / Real.pi ≤ 1 := by rw [div_le_one hπ]; linarith - have hnn : 0 ≤ 4 * CY * Real.log T + KY := by positivity - calc 1 / Real.pi * |Rres| ≤ 1 / Real.pi * (4 * CY * Real.log T + KY) := - mul_le_mul_of_nonneg_left hYlog (by positivity) - _ ≤ 1 * (4 * CY * Real.log T + KY) := mul_le_mul_of_nonneg_right hfrac hnn - _ = 4 * CY * Real.log T + KY := one_mul _ - have hD : |(∫ t in T..(2 * T), mu t) - T * ell1 T / (2 * Real.pi)| ≤ |Cμ| * Real.log T := by - calc |(∫ t in T..(2 * T), mu t) - T * ell1 T / (2 * Real.pi)| ≤ Cμ / T := hintmu - _ ≤ |Cμ| := hCμT - _ = |Cμ| * 1 := (mul_one _).symm - _ ≤ |Cμ| * Real.log T := mul_le_mul_of_nonneg_left hlogT (abs_nonneg _) - rw [show T / (2 * Real.pi) * ell1 T = T * ell1 T / (2 * Real.pi) by ring, hkey] - have hNc1 : (0:ℝ) ≤ (Zc.N T₁ T : ℝ) := Nat.cast_nonneg _ - have hNc2 : (0:ℝ) ≤ (Zc.N (2 * T) T₂ : ℝ) := Nat.cast_nonneg _ - have htri : |(1 / Real.pi) * Rres - + ((∫ t in T₁..T, mu t) + (∫ t in (2 * T)..T₂, mu t) - + ((∫ t in T..(2 * T), mu t) - T * ell1 T / (2 * Real.pi))) - - ((Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ))| - ≤ |(1 / Real.pi) * Rres| - + (|∫ t in T₁..T, mu t| + |∫ t in (2 * T)..T₂, mu t| - + |(∫ t in T..(2 * T), mu t) - T * ell1 T / (2 * Real.pi)|) - + ((Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ)) := by - have t1 := abs_sub ((1 / Real.pi) * Rres - + ((∫ t in T₁..T, mu t) + (∫ t in (2 * T)..T₂, mu t) - + ((∫ t in T..(2 * T), mu t) - T * ell1 T / (2 * Real.pi)))) - ((Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ)) - have t2 := abs_add_le ((1 / Real.pi) * Rres) - ((∫ t in T₁..T, mu t) + (∫ t in (2 * T)..T₂, mu t) - + ((∫ t in T..(2 * T), mu t) - T * ell1 T / (2 * Real.pi))) - have t3 := abs_add_le ((∫ t in T₁..T, mu t) + (∫ t in (2 * T)..T₂, mu t)) - ((∫ t in T..(2 * T), mu t) - T * ell1 T / (2 * Real.pi)) - have t4 := abs_add_le (∫ t in T₁..T, mu t) (∫ t in (2 * T)..T₂, mu t) - have t5 : |(Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ)| = (Zc.N T₁ T : ℝ) + (Zc.N (2 * T) T₂ : ℝ) := - abs_of_nonneg (by positivity) - linarith - refine htri.trans ?_ - have hKY1 : KY ≤ KY * Real.log T := by nlinarith - nlinarith [hA, hμ1, hμ2, hD, hw1, hw2, hCY.le, abs_nonneg Cμ, hCM0.le, hKY1] + have hC0 : 0 ≤ 4 * CY + KY + 4 * A₀ + 4 * CM + |Cμ| := by positivity + exact hmain.trans (by calc _ ≤ (4 * CY + KY + 4 * A₀ + 4 * CM + |Cμ|) * (2 * Real.log T) := + mul_le_mul_of_nonneg_left hlog hC0 + _ = _ := by ring) end GenericRvM end ZeroCount end XiPrime end Zeta23 - -end diff --git a/zeta23/Zeta23/XiPrime/ZeroCount/Landau.lean b/zeta23/Zeta23/XiPrime/ZeroCount/Landau.lean index adba6ba7d0..7e5499f442 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount/Landau.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount/Landau.lean @@ -38,19 +38,6 @@ theorem Yfn_generic_inputs : ∃ (Cf t₀ : ℝ), 0 < Cf ∧ 2 ≤ t₀ ∧ exact ⟨Cf, t₁, hCf, ht₁, fun t _ => Yfn_analyticOnNhd_disc t (by norm_num), hgrow, fun t ht => (hlow t ht).2⟩ -/-- **Landau partial fraction for Y′/Y around 2+it** (|t| ≥ t₁). -/ -theorem Yfn_logDeriv_partial_fraction : ∃ C t₁ : ℝ, 0 < C ∧ 4 ≤ t₁ ∧ ∀ t : ℝ, t₁ ≤ |t| → - Yfn (2 + t * I) ≠ 0 ∧ - ∃ Z : Finset ℂ, - (↑Z = {ρ ∈ closedBall (2 + t * I) (22 / 25 * (91 / 50)) | Yfn ρ = 0}) ∧ - ((∑ ρ ∈ Z, (analyticOrderNatAt Yfn ρ : ℝ)) ≤ C * Real.log (|t| + 3)) ∧ - ∀ s ∈ closedBall (2 + t * I) (3 / 2), Yfn s ≠ 0 → - ‖logDeriv Yfn s - ∑ ρ ∈ Z, (analyticOrderNatAt Yfn ρ : ℂ) / (s - ρ)‖ - ≤ C * Real.log (|t| + 3) := by - obtain ⟨Cf, t₀, hCf, -, hfa, hgrow, hlow⟩ := Yfn_generic_inputs - obtain ⟨C, t₁, hC, ht₁4, -, h⟩ := Generic.logDeriv_partial_fraction_two_line hfa hCf hgrow hlow - exact ⟨C, t₁, hC, ht₁4, h⟩ - /-! ### the local count -/ section LocalCount diff --git a/zeta23/Zeta23/XiPrime/ZeroCount/Sides.lean b/zeta23/Zeta23/XiPrime/ZeroCount/Sides.lean index c6befe86b1..4632b69684 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount/Sides.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount/Sides.lean @@ -14,7 +14,6 @@ Zeta23/XiPrime/ZeroCount/Sides.lean — the Y′/Y pieces of the half-contour ar (up to the sign of the first), so each log moves by ≤ π (ArgBound (A); RvM.vertical_two for ζ). -/ import Zeta23.XiPrime.ZeroCount.Landau -import Zeta23.XiPrime.ZeroCount.ArgBound import Zeta23.XiPrime.ZeroCount.Contour import Zeta23.RvM.Backlund diff --git a/zeta23/Zeta23/XiPrime/ZeroCount/Y.lean b/zeta23/Zeta23/XiPrime/ZeroCount/Y.lean index fe197cb5f0..5015802613 100644 --- a/zeta23/Zeta23/XiPrime/ZeroCount/Y.lean +++ b/zeta23/Zeta23/XiPrime/ZeroCount/Y.lean @@ -16,9 +16,6 @@ These are exactly the two inputs (growth on a disc inside Re s > 0, lower bound Jensen/Landau need; cf. Zeta23/RvM/LocalCount.lean and Zeta23/WeilEF/Landau.lean for ζ. -/ import Zeta23.XiPrime.Seam -import Zeta23.RvM.ZetaGrowth -import Zeta23.GammaFacts.StirlingVert -import Zeta23.FromPNTPlus.ZetaBounds import Mathlib.Analysis.Complex.Liouville open Complex Set Filter Topology Metric @@ -250,12 +247,8 @@ theorem Yfn_analyticOnNhd_disc (t : ℝ) {r : ℝ} (hr : r < 2) : /-! ### the line Re s = 2 -/ -lemma two_line_re (t : ℝ) : ((2 : ℂ) + t * I).re = 2 := by simp -lemma two_line_im (t : ℝ) : ((2 : ℂ) + t * I).im = t := by simp lemma two_line_ne_one (t : ℝ) : (2 : ℂ) + t * I ≠ 1 := fun h => by have := congrArg Complex.re h; simp at this -lemma two_line_ne_zero (t : ℝ) : (2 : ℂ) + t * I ≠ 0 := fun h => by - have := congrArg Complex.re h; simp at this lemma zeta_two_line_ne_zero (t : ℝ) : riemannZeta (2 + t * I) ≠ 0 := riemannZeta_ne_zero_of_one_lt_re (by simp) diff --git a/zeta23/Zeta23/ZeroSide.lean b/zeta23/Zeta23/ZeroSide.lean index 6314b10374..c2da82b091 100644 --- a/zeta23/Zeta23/ZeroSide.lean +++ b/zeta23/Zeta23/ZeroSide.lean @@ -18,8 +18,6 @@ the involution σ = (ρ ↦ 1 − conj ρ) with m ∘ σ = m, and evaluation vec v (σ z) = conj ∘ v z). Section 3 instantiates from Defs.lean's ZeroConfig, φ̂, τ_k, a, L and lem:poisson. -/ -import Zeta23.LinAlg -import Zeta23.Defs import Zeta23.Assembly.Inputs import Zeta23.Hypotheses.GzGp import Mathlib.Analysis.SpecialFunctions.Log.Basic @@ -210,20 +208,6 @@ variable {D} /-- p := #𝒫, the number of off-line pairs. -/ def PairReps.p (P : D.PairReps) : ℕ := #P.R -/-- Representatives always exist (pick the smaller member of each pair in any linear order). -/ -def pairRepsOfLinearOrder [LinearOrder ι] (D : ZeroBlockData ι d) : D.PairReps where - R := {z | z < D.σ z} - off z hz := by - simp only [mem_filter, mem_univ, true_and] at hz; exact fun h => by rw [h] at hz; exact lt_irrefl _ hz - σ_not_mem z hz := by - simp only [mem_filter, mem_univ, true_and] at hz ⊢ - rw [D.σ_invol z]; exact not_lt.mpr hz.le - cover z hz := by - simp only [mem_filter, mem_univ, true_and] - rcases lt_or_gt_of_ne hz with h | h - · right; rwa [D.σ_invol z] - · left; exact h - variable (D) (P : D.PairReps) lemma mem_onLine {z : ι} : z ∈ D.onLine ↔ D.σ z = z := by simp [onLine] @@ -330,19 +314,6 @@ theorem blockA_isHermitian : D.blockA.IsHermitian := by simp only [star_natCast] exact Fintype.sum_equiv D.σ_invol.toPerm _ _ fun z => by simp [D.m_σ] -lemma blockA_transpose : D.blockAᵀ = D.blockA := by - unfold blockA - rw [transpose_sum] - simp_rw [transpose_smul, transpose_vecMulVec] - -/-- Every entry of A is real. -/ -lemma star_blockA_apply (k l : d) : star (D.blockA k l) = D.blockA k l := by - have h1 := congrFun (congrFun D.blockA_isHermitian l) k - have h2 := congrFun (congrFun D.blockA_transpose l) k - rw [conjTranspose_apply] at h1 - rw [transpose_apply] at h2 - rw [h1, ← h2] - /-- real part vector x_ρ := Re u_ρ (as a complex vector) -/ def xv (z : ι) : d → ℂ := fun k => ((D.v z k).re : ℂ) /-- imaginary part vector y_ρ := Im u_ρ (as a complex vector) -/ @@ -474,16 +445,6 @@ lemma blockQ_eq (c : ℝ) : D.blockQ c = ((c⁻¹ : ℝ) : ℂ) • (D.rePart P theorem blockP_posSemidef {c : ℝ} (hc : 0 < c) : (D.blockP c).PosSemidef := D.onPart_posSemidef.smul (Complex.zero_le_real.mpr (inv_nonneg.mpr hc.le)) -/-- "P is real symmetric": Hermitian with real entries. -/ -theorem star_blockP_apply (c : ℝ) (k l : d) : star (D.blockP c k l) = D.blockP c k l := by - simp only [blockP, onPart, Matrix.smul_apply, Matrix.sum_apply, vecMulVec_apply, smul_eq_mul, - star_mul', star_sum, RCLike.star_def, Complex.conj_ofReal, map_natCast] - congr 1 - refine sum_congr rfl fun z hz => ?_ - have h := congrFun (D.star_v_of_onLine ((D.mem_onLine).mp hz)) - simp only [Pi.star_apply, RCLike.star_def] at h - rw [h, h] - /-- "of rank ≤ s₁ + s₂". -/ theorem rank_blockP_le {c : ℝ} (hc : 0 < c) : (D.blockP c).rank ≤ D.s₁ + D.s₂ := by unfold blockP @@ -533,14 +494,6 @@ lemma isHermitian_real_smul {A : Matrix d d ℂ} (hA : A.IsHermitian) (r : ℝ) theorem blockQ_isHermitian (c : ℝ) : (D.blockQ c).IsHermitian := isHermitian_real_smul (D.blockA_isHermitian.sub D.onPart_posSemidef.isHermitian) _ -/-- Every entry of Q is real. -/ -theorem star_blockQ_apply (c : ℝ) (k l : d) : star (D.blockQ c k l) = D.blockQ c k l := by - have hA := D.star_blockA_apply k l - have hP := D.star_blockP_apply c k l - have : D.blockQ c k l = ((c⁻¹ : ℝ) : ℂ) * D.blockA k l - D.blockP c k l := by - simp [blockQ, blockP, Matrix.sub_apply, Matrix.smul_apply, smul_eq_mul, mul_sub] - rw [this, star_sub, star_mul', hA, hP, RCLike.star_def, Complex.conj_ofReal] - /-- **prop:block (ii)**: "n₊(Q) ≤ p" — "The form c ↦ c*Qc is the pull-back under 𝒜 of the direct sum of the p hyperbolic blocks alone, so n₊(Q) ≤ p by Lemma [lem:inertia]". -/ theorem posIndex_blockQ_le {c : ℝ} (hc : 0 < c) : @@ -698,18 +651,18 @@ lemma sum_filter_coe {M : Type*} [AddCommMonoid M] (s : Finset ℂ) (p : ℂ → lemma S1_eq : Z.S1 T = ↑((ZI Z T).filter (fun ρ => ρ.re = 1 / 2 ∧ Z.mult ρ = 1)) := by ext ρ simp only [ZeroConfig.S1, ZeroConfig.onLine, ZeroConfig.simple, Set.mem_inter_iff, - Set.mem_setOf_eq, Finset.coe_filter, mem_ZI] + Set.mem_ofPred_eq, Finset.coe_filter, mem_ZI] tauto lemma S2_eq : Z.S2 T = ↑((ZI Z T).filter (fun ρ => ρ.re = 1 / 2 ∧ 2 ≤ Z.mult ρ)) := by ext ρ - simp only [ZeroConfig.S2, ZeroConfig.onLine, Set.mem_inter_iff, Set.mem_setOf_eq, + simp only [ZeroConfig.S2, ZeroConfig.onLine, Set.mem_inter_iff, Set.mem_ofPred_eq, Finset.coe_filter, mem_ZI] tauto lemma offLine_eq : Z.offLine T = ↑((ZI Z T).filter (fun ρ => ¬ ρ.re = 1 / 2)) := by ext ρ - simp only [ZeroConfig.offLine, Set.mem_inter_iff, Set.mem_setOf_eq, Finset.coe_filter, mem_ZI, ne_eq] + simp only [ZeroConfig.offLine, Set.mem_inter_iff, Set.mem_ofPred_eq, Finset.coe_filter, mem_ZI, ne_eq] lemma s1_eq_mk : Z.s1 T = (mkData Z T v hv).s₁ := by rw [ZeroConfig.s1, S1_eq, Set.ncard_coe_finset, ZeroBlockData.s₁, ZeroBlockData.S₁] @@ -752,7 +705,7 @@ lemma NonIprime_eq_mk : Z.NonIprime T = (mkData Z T v hv).Non := by have hset : Z.window (T - D0 T) (2 * T + D0 T) ∩ ZeroConfig.onLine = ↑((ZI Z T).filter fun ρ => ρ.re = 1 / 2) := by ext ρ - simp only [ZeroConfig.onLine, Set.mem_inter_iff, Set.mem_setOf_eq, Finset.coe_filter, mem_ZI, + simp only [ZeroConfig.onLine, Set.mem_inter_iff, Set.mem_ofPred_eq, Finset.coe_filter, mem_ZI, ZeroConfig.ZIprime] rw [hset, finsum_mem_coe_finset] convert (sum_filter_coe (ZI Z T) (fun ρ => ρ.re = 1 / 2) (fun z => (mkData Z T v hv).σ z = z) @@ -774,11 +727,6 @@ theorem ncard_ZIprime_eq : (Z.ZIprime T).ncard = Z.s1 T + Z.s2 T + 2 * Z.p T := rw [← coe_ZI, Set.ncard_coe_finset, s1_eq_mk Z T _ hv, s2_eq_mk Z T _ hv, p_eq_mk Z T _ hv, ← ZeroBlockData.card_eq _ (mkPairReps Z T _ hv), Fintype.card_coe] -/-- #offLine(I') = 2p: Defs' p := ncard(offLine)/2 loses nothing. -/ -theorem ncard_offLine_eq : (Z.offLine T).ncard = 2 * Z.p T := by - have hv := zeroVec_reflect Z T - rw [p_eq_mk Z T _ hv, card_offLine_eq_mk Z T _ hv] - /-- **[eq:Ncount]** "N(I') = Σ_{𝒮₁}1 + Σ_{𝒮₂}m_ρ + Σ_{𝒫}2m_ρ ≥ s₁ + 2s₂ + 2p". -/ theorem s1_add_two_s2_add_two_p_le_NIprime : Z.s1 T + 2 * Z.s2 T + 2 * Z.p T ≤ Z.NIprime T := by have hv := zeroVec_reflect Z T @@ -837,11 +785,6 @@ theorem Az_eq_blockA (hconj : PhiHatConj T P) : Z.Az P T = (blockData Z T P hcon theorem Az_isHermitian (hconj : PhiHatConj T P) : (Z.Az P T).IsHermitian := by rw [Az_eq_blockA Z T P hconj]; exact ZeroBlockData.blockA_isHermitian _ -/-- Every entry of A is real. -/ -theorem star_Az_apply (hconj : PhiHatConj T P) (k l : Fin (P.d T)) : - star (Z.Az P T k l) = Z.Az P T k l := by - rw [Az_eq_blockA Z T P hconj]; exact ZeroBlockData.star_blockA_apply _ k l - omit Z in lemma tilde_eq {n : Type*} (M : Matrix n n ℂ) : P.tilde T M = (((P.L T)⁻¹ : ℝ) : ℂ) • M := by unfold Params.tilde; push_cast; rfl @@ -854,9 +797,6 @@ lemma hat_eq {n : Type*} (M : Matrix n n ℂ) : theorem tilde_Az_isHermitian (hconj : PhiHatConj T P) : (P.tilde T (Z.Az P T)).IsHermitian := by rw [tilde_eq]; exact ZeroBlockData.isHermitian_real_smul (Az_isHermitian Z T P hconj) _ -theorem hat_Az_isHermitian (hconj : PhiHatConj T P) : (P.hat T (Z.Az P T)).IsHermitian := by - rw [hat_eq]; exact ZeroBlockData.isHermitian_real_smul (Az_isHermitian Z T P hconj) _ - /-- **prop:block (i)**: "n₊(Ã) ≤ s₁ + s₂ + p" (Ã := A/L; any Hermitian-ness witness h). -/ theorem posIndex_tilde_Az_le (hconj : PhiHatConj T P) (hL : 0 < P.L T) (h : (P.tilde T (Z.Az P T)).IsHermitian) : @@ -893,11 +833,6 @@ theorem hatP_posSemidef (hconj : PhiHatConj T P) (hc : 0 < P.a T * P.L T ^ 2) : (hatP Z T P hconj).PosSemidef := ZeroBlockData.blockP_posSemidef _ hc -/-- **prop:block (ii)**: P "real symmetric" — real entries (Hermitian from hatP_posSemidef). -/ -theorem star_hatP_apply (hconj : PhiHatConj T P) (k l : Fin (P.d T)) : - star (hatP Z T P hconj k l) = hatP Z T P hconj k l := - ZeroBlockData.star_blockP_apply _ _ k l - /-- **prop:block (ii)**: "rank P ≤ s₁ + s₂". -/ theorem rank_hatP_le (hconj : PhiHatConj T P) (hc : 0 < P.a T * P.L T ^ 2) : (hatP Z T P hconj).rank ≤ Z.s1 T + Z.s2 T := by @@ -936,11 +871,6 @@ theorem rtrace_hatP_le (hconj : PhiHatConj T P) (hreal : PhiHatReal T P) (hPois theorem hatQ_isHermitian (hconj : PhiHatConj T P) : (hatQ Z T P hconj).IsHermitian := ZeroBlockData.blockQ_isHermitian _ _ -/-- **prop:block (ii)**: Q "real symmetric" — real entries. -/ -theorem star_hatQ_apply (hconj : PhiHatConj T P) (k l : Fin (P.d T)) : - star (hatQ Z T P hconj k l) = hatQ Z T P hconj k l := - ZeroBlockData.star_blockQ_apply _ _ k l - /-- **prop:block (ii)**: "n₊(Q) ≤ p" (by lem:inertia), for any Hermitian-ness witness h. -/ theorem posIndex_hatQ_le (hconj : PhiHatConj T P) (hc : 0 < P.a T * P.L T ^ 2) (h : (hatQ Z T P hconj).IsHermitian) : posIndex h ≤ Z.p T := by diff --git a/zeta23/Zeta23/ZeroSide/Final.lean b/zeta23/Zeta23/ZeroSide/Final.lean index 1c18086f00..59873b7f6e 100644 --- a/zeta23/Zeta23/ZeroSide/Final.lean +++ b/zeta23/Zeta23/ZeroSide/Final.lean @@ -14,7 +14,6 @@ Zeta23.Poisson (Params.hasSum_phiHatR_sq = lem:poisson), leaving only the standi thmA_abstract consumes (hwL holds eventually since L = λ log(T/2π) → ∞). -/ import Zeta23.ZeroSide -import Zeta23.Hypotheses.GzGp import Zeta23.Taper import Zeta23.Poisson import Mathlib.Analysis.SpecialFunctions.Log.Basic @@ -67,37 +66,4 @@ theorem eventually_blockInputs (Z : ZeroConfig) (P : Params) (hP : P.Valid) : /-! ### The individual statements with hypotheses discharged (convenience re-exports) -/ variable (Z : ZeroConfig) (hP : P.Valid) (hwL : 8 * P.w ≤ P.L T) -include hP hwL - -/-- **[prop:block] (i)** "n₊(Ã) ≤ s₁ + s₂ + p". -/ -theorem prop_block_i_posIndex (h : (P.tilde T (Z.Az P T)).IsHermitian) : - posIndex h ≤ Z.s1 T + Z.s2 T + Z.p T := - posIndex_tilde_Az_le Z T P phiHatConj (L_pos hP hwL) h - -/-- **[prop:block] (i)** "rank(Ã) ≤ s₁ + s₂ + 2p = #𝒵(I')". -/ -theorem prop_block_i_rank : (P.tilde T (Z.Az P T)).rank ≤ Z.s1 T + Z.s2 T + 2 * Z.p T := - rank_tilde_Az_le Z T P phiHatConj (L_pos hP hwL) - -omit hP hwL in -/-- **[prop:block] (ii)** "Â = P + Q" (Â := A/(aL²) [eq:hatunits] = P.hat T (Z.Az P T)). -/ -theorem prop_block_ii_decomp : - P.hat T (Z.Az P T) = hatP Z T P phiHatConj + hatQ Z T P phiHatConj := - hat_Az_eq_hatP_add_hatQ Z T P phiHatConj - -/-- **[prop:block] (ii)** "P ⪰ 0". -/ -theorem prop_block_ii_P_posSemidef : (hatP Z T P phiHatConj).PosSemidef := - hatP_posSemidef Z T P phiHatConj (aLsq_pos hP hwL) - -/-- **[prop:block] (ii)** "rank P ≤ s₁ + s₂". -/ -theorem prop_block_ii_rank_P : (hatP Z T P phiHatConj).rank ≤ Z.s1 T + Z.s2 T := - rank_hatP_le Z T P phiHatConj (aLsq_pos hP hwL) - -/-- **[prop:block] (ii)** "tr P ≤ N_on(I')" (by lem:poisson). -/ -theorem prop_block_ii_trace_P : rtrace (hatP Z T P phiHatConj) ≤ (Z.NonIprime T : ℝ) := - rtrace_hatP_le Z T P phiHatConj phiHatReal (poissonSq hP hwL) (aLsq_pos hP hwL) - -/-- **[prop:block] (ii)** "n₊(Q) ≤ p" (by lem:inertia). -/ -theorem prop_block_ii_posIndex_Q (h : (hatQ Z T P phiHatConj).IsHermitian) : posIndex h ≤ Z.p T := - posIndex_hatQ_le Z T P phiHatConj (aLsq_pos hP hwL) h - end Zeta23.ZeroSide diff --git a/zeta23/Zeta23/ZeroSide/RankTraceMult.lean b/zeta23/Zeta23/ZeroSide/RankTraceMult.lean index 56727106c5..884eac4886 100644 --- a/zeta23/Zeta23/ZeroSide/RankTraceMult.lean +++ b/zeta23/Zeta23/ZeroSide/RankTraceMult.lean @@ -38,22 +38,15 @@ lemma gc_of_ge {c x : ℝ} (h : c ≤ x) : gc c x = c * x - c ^ 2 := by @[simp] lemma gc_zero {c : ℝ} (hc : 0 ≤ c) : gc c 0 = 0 := by rw [gc_of_le hc]; ring -lemma gc_ge {c x : ℝ} (hc : 0 ≤ c) : -(c ^ 2 / 4) ≤ gc c x := by - rcases le_or_gt x c with h | h - · rw [gc_of_le h]; nlinarith [sq_nonneg (x - c / 2)] - · rw [gc_of_ge h.le] - have : c * c ≤ c * x := mul_le_mul_of_nonneg_left h.le hc - nlinarith - /-- the affine minorants: for t ∈ [0,c] and x ≥ 0, (2t − c)x − t² ≤ g_c(x). -/ -lemma affine_le_gc {c t x : ℝ} (ht0 : 0 ≤ t) (htc : t ≤ c) (hx : 0 ≤ x) : +lemma affine_le_gc {c t x : ℝ} (_ht0 : 0 ≤ t) (htc : t ≤ c) (_hx : 0 ≤ x) : (2 * t - c) * x - t ^ 2 ≤ gc c x := by rcases le_or_gt x c with h | h · rw [gc_of_le h]; nlinarith [sq_nonneg (x - t)] · rw [gc_of_ge h.le]; nlinarith [sq_nonneg (c - t)] /-- … with equality at t = min(x, c). -/ -lemma affine_eq_gc {c x : ℝ} (hc : 0 ≤ c) (hx : 0 ≤ x) : +lemma affine_eq_gc {c x : ℝ} (_hc : 0 ≤ c) (_hx : 0 ≤ x) : (2 * min x c - c) * x - (min x c) ^ 2 = gc c x := by rcases le_or_gt x c with h | h · rw [min_eq_left h, gc_of_le h]; ring @@ -78,7 +71,7 @@ theorem gc_sum_le {ι : Type*} (s : Finset ι) {c : ℝ} (hc : 0 ≤ c) (w μ : Finset.sum_le_sum fun i hi => mul_le_mul_of_nonneg_left (affine_le_gc ht0 htc (hμ i hi)) (hw i hi) /-- the termwise step replacing the rank count: (p − n)² ≥ c·p + g_c(p) − 2c·n for p, n ≥ 0. -/ -lemma sq_sub_ge_gc {c p n : ℝ} (hp : 0 ≤ p) (hn : 0 ≤ n) (hc : 0 ≤ c) : +lemma sq_sub_ge_gc {c p n : ℝ} (_hp : 0 ≤ p) (hn : 0 ≤ n) (_hc : 0 ≤ c) : c * p + gc c p - 2 * c * n ≤ (p - n) ^ 2 := by rcases le_or_gt p c with h | h · rw [gc_of_le h]; nlinarith [mul_nonneg hn (sub_nonneg.mpr h)] @@ -161,7 +154,7 @@ lemma trace_pow_succ_comm (W : Matrix n ι 𝕜) (k : ℕ) : have key : ∀ k : ℕ, (W * Wᴴ) ^ (k + 1) = W * (Wᴴ * W) ^ k * Wᴴ := by intro k induction k with - | zero => simp [Matrix.mul_assoc] + | zero => simp | succ k ih => rw [pow_succ, ih, pow_succ]; simp only [Matrix.mul_assoc] rw [key, Matrix.mul_assoc, trace_mul_comm, Matrix.mul_assoc, ← pow_succ] @@ -356,7 +349,7 @@ lemma kc_eq (c p : ℝ) : kc c p = c * p - gc c p := by · rw [max_eq_left (by linarith), max_eq_right (by linarith)]; ring · rw [max_eq_right (by linarith), max_eq_left (by linarith)]; ring -lemma kc_mono {c p p' : ℝ} (hc : 0 ≤ c) (hpp : p ≤ p') : kc c p ≤ kc c p' := by +lemma kc_mono {c p p' : ℝ} (_hc : 0 ≤ c) (hpp : p ≤ p') : kc c p ≤ kc c p' := by unfold kc have h1 : max (c - p') 0 ≤ max (c - p) 0 := max_le_max (by linarith) le_rfl have h2 : 0 ≤ max (c - p') 0 := le_max_right _ _ diff --git a/zeta23/Zeta23/ZeroSide/TightMult.lean b/zeta23/Zeta23/ZeroSide/TightMult.lean deleted file mode 100644 index 78d32636c7..0000000000 --- a/zeta23/Zeta23/ZeroSide/TightMult.lean +++ /dev/null @@ -1,123 +0,0 @@ -/- -Copyright (c) 2026 Anthropic, PBC. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -SPDX-License-Identifier: Apache-2.0 --/ -/- -Zeta23/ZeroSide/TightMult.lean — Lemma R (Zeta23/ZeroSide/RankTraceMult.lean) is TIGHT, for every c > 0, on the configurations -"on-line atoms with integer multiplicities m_j ≤ c on orthonormal vectors ⊕ b pair-blocks Q = c·Π_b": - 2c·tr(P+Q) − ‖P+Q‖_F² = Σ_j k_c(m_j) + c²·b (equality in rank_trace_mult_k / _k_le). -At c = 2 this says: simple zeros (m=1, k₂=3), DOUBLE zeros (m=2, k₂=4) and TIGHT PAIRS (a Q-block of eigenvalue 2, priced c²=4 per -pair) are all extremal simultaneously — the certificate (tr Ĝ, ‖Ĝ‖_F², integer atoms m_j on vectors of norm ≤ 1, n₊(Q) ≤ p) provably -cannot separate an on-line double zero from an off-line pair at depth → 0, and cannot be improved by any further inequality consuming -only these quantities. --/ -import Zeta23.ZeroSide.RankTraceMult -import Mathlib.LinearAlgebra.Matrix.Diagonal - -noncomputable section -set_option linter.unusedSectionVars false - -open Matrix RHLinalg Finset -open scoped ComplexOrder BigOperators - -namespace Zeta23.ZeroSide.TightMult - -open RankTraceMult - -variable (r b : ℕ) (m : Fin r → ℕ) (c : ℝ) - -abbrev idx := Fin r ⊕ Fin b - -/-- orthonormal on-line vectors: the standard basis vectors of the first r slots. -/ -def v : Fin r → idx r b → ℝ := fun j => Pi.single (Sum.inl j) 1 - -/-- real multiplicities. -/ -def mR : Fin r → ℝ := fun j => (m j : ℝ) - -/-- the pair blocks: c × (projection onto the last b slots). -/ -def Q : Matrix (idx r b) (idx r b) ℝ := diagonal (Sum.elim (fun _ => 0) (fun _ => c)) - -lemma xsq_v (j : Fin r) : xsq (v r b) j = 1 := by - unfold xsq v - rw [Finset.sum_eq_single (Sum.inl j)] - · simp - · intro a _ ha; simp [Pi.single_apply, ha] - · simp - -lemma Pmat_eq_diagonal : Pmat (𝕜 := ℝ) (mR r m) (v r b) = diagonal (Sum.elim (fun j => (m j : ℝ)) (fun _ => 0)) := by - ext a a' - rw [Pmat_apply (fun j => by unfold mR; positivity), diagonal_apply] - simp only [mR, v, RCLike.ofReal_real_eq_id, id_eq, starRingEnd_apply, star_trivial] - rcases a with j | i - · by_cases h : (Sum.inl j : idx r b) = a' - · subst h - rw [if_pos rfl, Finset.sum_eq_single j] - · simp - · intro k _ hk; simp [Pi.single_apply, Sum.inl_injective.eq_iff, Ne.symm hk] - · simp - · rw [if_neg h] - refine Finset.sum_eq_zero fun k _ => ?_ - by_cases hk : (Sum.inl k : idx r b) = a' - · subst hk - have : k ≠ j := fun e => h (by rw [e]) - simp [Pi.single_apply, Sum.inl_injective.eq_iff, Ne.symm this] - · simp [Pi.single_apply, hk] - · have : ∀ k : Fin r, (Pi.single (Sum.inl k) (1:ℝ) : idx r b → ℝ) (Sum.inr i) = 0 := fun k => by - simp [Pi.single_apply] - simp only [this, zero_mul, mul_zero, Finset.sum_const_zero, Sum.elim_inr] - split_ifs <;> simp - -lemma Q_posSemidef (hc : 0 ≤ c) : (Q r b c).PosSemidef := by - rw [Q, posSemidef_diagonal_iff] - rintro (i | i) <;> simp [hc] - -lemma Q_isHermitian (hc : 0 ≤ c) : (Q r b c).IsHermitian := (Q_posSemidef r b c hc).1 - -lemma posIndex_Q (hc : 0 < c) : posIndex (Q_isHermitian r b c hc.le) = b := by - rw [posIndex_eq_rank_of_posSemidef (Q_posSemidef r b c hc.le), Q, rank_diagonal, Fintype.card_subtype] - have : (Finset.univ.filter fun i : idx r b => Sum.elim (fun _ => (0:ℝ)) (fun _ => c) i ≠ 0) = Finset.univ.image Sum.inr := by - ext i; rcases i with i | i <;> simp [hc.ne'] - rw [this, Finset.card_image_of_injective _ Sum.inr_injective]; simp - -lemma rtrace_PQ : rtrace (Pmat (𝕜 := ℝ) (mR r m) (v r b) + Q r b c) = (∑ j, (m j : ℝ)) + c * b := by - rw [Pmat_eq_diagonal, Q, diagonal_add] - simp [rtrace, trace_diagonal, Fintype.sum_sum_type]; ring - -lemma frobSq_PQ : frobSq (Pmat (𝕜 := ℝ) (mR r m) (v r b) + Q r b c) = (∑ j, (m j : ℝ) ^ 2) + c ^ 2 * b := by - rw [Pmat_eq_diagonal, Q, diagonal_add] - simp [frobSq, diagonal_mul_diagonal, trace_diagonal, Fintype.sum_sum_type, sq]; ring - -/-- **Lemma R is tight**: for on-line multiplicities 1 ≤ m_j ≤ c on orthonormal vectors and b pair-blocks of eigenvalue c, - 2c·tr(P+Q) − ‖P+Q‖² = Σ_j k_c(m_j) + c²b — equality in rank_trace_mult_k. -/ -theorem lemmaR_tight (hc : 0 < c) (hm : ∀ j, (m j : ℝ) ≤ c) : - 2 * c * rtrace (Pmat (𝕜 := ℝ) (mR r m) (v r b) + Q r b c) - frobSq (Pmat (𝕜 := ℝ) (mR r m) (v r b) + Q r b c) - = (∑ j, kc c (mR r m j * xsq (v r b) j)) + c ^ 2 * b := by - rw [rtrace_PQ, frobSq_PQ] - have : ∀ j, kc c (mR r m j * xsq (v r b) j) = 2 * c * m j - (m j : ℝ) ^ 2 := by - intro j; rw [xsq_v, mul_one]; unfold mR; rw [kc_of_le (hm j)] - simp_rw [this] - rw [Finset.sum_sub_distrib, ← Finset.mul_sum] - ring - -/-- … with the hypotheses of Lemma R all met exactly (m_j ≥ 0, ‖v_j‖² = 1 ≤ 1, n₊(Q) = b). -/ -theorem lemmaR_tight' (hc : 0 < c) (hm : ∀ j, (m j : ℝ) ≤ c) : - (∀ j, 0 ≤ mR r m j) ∧ (∀ j, xsq (v r b) j ≤ 1) ∧ posIndex (Q_isHermitian r b c hc.le) = b ∧ - 2 * c * rtrace (Pmat (𝕜 := ℝ) (mR r m) (v r b) + Q r b c) - frobSq (Pmat (𝕜 := ℝ) (mR r m) (v r b) + Q r b c) - = (∑ j, kc c (mR r m j)) + c ^ 2 * b := by - refine ⟨fun j => by unfold mR; positivity, fun j => by rw [xsq_v], posIndex_Q r b c hc, ?_⟩ - rw [lemmaR_tight r b m c hc hm] - simp_rw [xsq_v, mul_one] - -/-- c = 2: simples (m=1), doubles (m=2) and tight pairs are simultaneously extremal: - 4·tr − ‖·‖² = 3·#{m=1} + 4·#{m=2} + 4·b. -/ -theorem lemmaR_tight_two (hm1 : ∀ j, 1 ≤ m j) (hm2 : ∀ j, m j ≤ 2) : - 2 * 2 * rtrace (Pmat (𝕜 := ℝ) (mR r m) (v r b) + Q r b 2) - frobSq (Pmat (𝕜 := ℝ) (mR r m) (v r b) + Q r b 2) - = 3 * ((Finset.univ.filter (fun j => m j = 1)).card : ℝ) + 4 * ((Finset.univ.filter (fun j => 2 ≤ m j)).card : ℝ) - + 2 ^ 2 * b := by - rw [lemmaR_tight r b m 2 (by norm_num) (fun j => by exact_mod_cast hm2 j)] - simp_rw [xsq_v, mul_one] - unfold mR - rw [sum_kc_two_nat m hm1] - -end Zeta23.ZeroSide.TightMult diff --git a/zeta23/Zeta23/ZetaReflect.lean b/zeta23/Zeta23/ZetaReflect.lean index 5e279fcf45..38e8cb2193 100644 --- a/zeta23/Zeta23/ZetaReflect.lean +++ b/zeta23/Zeta23/ZetaReflect.lean @@ -88,7 +88,7 @@ theorem riemannZeta_conj {s : ℂ} (hs : s ≠ 1) : have hagree : (fun z => conj (riemannZeta (conj z))) =ᶠ[nhds (2 : ℂ)] riemannZeta := by have hopen : IsOpen {z : ℂ | 1 < z.re} := isOpen_lt continuous_const Complex.continuous_re have h2 : (2 : ℂ) ∈ {z : ℂ | 1 < z.re} := by - simp only [Set.mem_setOf_eq] + simp only [Set.mem_ofPred_eq] norm_num filter_upwards [hopen.mem_nhds h2] with z hz exact zeta_conj_of_one_lt_re hz diff --git a/zeta23/alsadi-simplification.md b/zeta23/alsadi-simplification.md new file mode 100644 index 0000000000..00e10d8763 --- /dev/null +++ b/zeta23/alsadi-simplification.md @@ -0,0 +1,120 @@ +# Zeta23 Simplification Report + +## Summary + +We measure all `.lean` files in `zeta23/` (excluding `.lake/` and `docbuild/`). +We report two numbers for each snapshot: + +- **Total lines**: every line in every `.lean` file. +- **Code LOC**: source lines only, with blank lines and comments (`--` and `/- ... -/`) removed. + +| Snapshot | Files | Total lines | Code LOC | Total lines saved | Code LOC saved | +| --- | ---: | ---: | ---: | ---: | ---: | +| Baseline (`main`) | 326 | 103,032 | 80,949 | — | — | +| Current | 291 | 66,941 | 49,928 | **36,091 (35.0%)** | **31,021 (38.3%)** | + +From baseline to current, we removed **31,021 Code LOC (38.3%)** and **36,091 total lines (35.0%)**. + +All three headline theorem groups stay complete, with no new `sorry` and no new axioms: + +1. `Solution.lean`: 17 Palomar theorems. +2. `Solution/XiPrime.lean`: 6 XiPrime theorems. +3. `Zeta23/PairCeiling/`: 11 PairCeiling theorems. + +--- + +## Where the Savings Came From + +From baseline to current, the net **31,021 Code LOC** reduction splits into three parts: + +| Category | Files | Code LOC change | Total lines change | +| --- | ---: | ---: | ---: | +| Deleted files | 44 | -11,838 | -14,703 | +| Kept files (net) | 282 | -22,465 | -25,521 | +| Added shared / split files | 9 | +3,282 | +4,133 | +| **Net total saved** | **-35** | **-31,021** | **-36,091** | + +--- + +## Deleted Files (44 files, 11,838 Code LOC saved) + +We deleted files that no headline theorem used, or files replaced by a shared module. + +| Deleted file or folder | Files | Code LOC saved | Total lines saved | Reason | +| --- | ---: | ---: | ---: | --- | +| `Zeta23/XiPrime/Hardy/` | 22 | 4,830 | 6,228 | Unused Hardy-Z development | +| `Zeta23/FromPNTPlus/MediumPNT.lean` | 1 | 3,334 | 3,731 | Unused upstream file | +| `Zeta23/FromPNTPlus/MellinCalculus.lean` | 1 | 943 | 1,048 | Unused upstream file | +| `Zeta23/ThmD/PsiC.lean` | 1 | 503 | 573 | Merged into `Zeta23/Taper/PsiC.lean` | +| `Zeta23/XiPrime/QuarticWindow/ModWindow.lean` | 1 | 411 | 503 | Promoted to `Zeta23/ThmD/ModWindow.lean` | +| `Zeta23/XiPrime/Transfer/W.lean`, `InputsW.lean` | 2 | 320 | 411 | Unused transfer variants | +| `Zeta23/FromPNTPlus/Sobolev.lean` | 1 | 282 | 371 | Unused after PNT+ trim | +| Remaining 15 deleted files | 15 | 1,215 | 1,838 | Unused helpers, `TightMult`, `CertificateC3`, `PPOffDiag`, empty `Log/Basic.lean` shim, and collapsed interface wrappers (`TracesBoundsE`, `ThmE/TracesHypChi`, `ThmDE/{TracesHyp,Endgame}`) | +| **Total deleted** | **44** | **11,838** | **14,703** | | + +--- + +## Top Shrunk Files (282 kept files, 22,465 net Code LOC saved) + +| File | Before (Code LOC) | Now (Code LOC) | Code LOC saved | How it shrank | +| --- | ---: | ---: | ---: | --- | +| `Zeta23/FromPNTPlus/ZetaBounds.lean` | 2,694 | 538 | 2,156 | Kept only declarations used by `Zeta23` | +| `Zeta23/ThmD/Window.lean` | 1,629 | 309 | 1,320 | Replaced custom proofs with shared `ThmD/ModWindow.lean` | +| `Zeta23/Assembly.lean` | 1,178 | 1 | 1,177 | Split into `Assembly/{Endgame,Growth,Matrix,Windows}.lean` | +| `Zeta23/WeilEF/Effective.lean` | 844 | 52 | 792 | Removed unused declarations | +| `Zeta23/FromPNTPlus/ResidueCalcOnRectangles.lean` | 984 | 208 | 776 | Kept only declarations used by `Zeta23` | +| `Zeta23/XiPrime/ExplicitFormula/TestWeight.lean` | 903 | 399 | 504 | Removed unused declarations | +| `Zeta23/ThmE/PPChi.lean` | 873 | 429 | 444 | Shared prime-pair kernel in `PrimeSideB/PPKernel.lean` | +| `Zeta23/Taper/Decay.lean` | 836 | 395 | 441 | Called shared `Taper/PsiC.lean` | +| `Zeta23/XiPrime/QuarticWindow/Moments.lean` | 473 | 83 | 390 | Used generic moments and autocorrelation in `ThmD/ModWindow.lean` | +| `Zeta23/ThmE/IntMuChi.lean` | 600 | 236 | 364 | Shared integral bounds and removed duplicates | +| `Zeta23/ThmDE/Mult.lean` | 372 | 48 | 324 | Unified `c = 2` and `c = 3` multiplicity endgames | +| `Zeta23/ThmDE/Endgame.lean` | 353 | 41 | 312 | Used shared `ThmD` endgame and pruned unused wrappers | +| `Zeta23/XiPrime/PrimeSide/PP.lean` | 529 | 234 | 295 | Shared prime-pair kernel in `PrimeSideB/PPKernel.lean` | +| `Zeta23/ThmE/MainTermChi.lean` | 480 | 208 | 272 | Used generic `rvM_main_scaled` in `RvM/Generic.lean` | +| `Zeta23/ThmD/Mult.lean` | 382 | 122 | 260 | Unified `c = 2` and `c = 3` multiplicity endgames | +| Remaining 267 kept files (net) | — | — | 12,638 | Unused declarations, shared helpers, and smaller merges (net of files that grew, such as `PrimeSideB/PPKernel.lean` +377) | +| **Total kept files (net)** | | | **22,465** | | + +--- + +## Added Shared and Split Files (9 files, +3,274 Code LOC) + +To replace duplicated proofs, we added 9 shared or split files: + +| Added file | Code LOC | Purpose | +| --- | ---: | --- | +| `Zeta23/Assembly/{Endgame,Growth,Matrix,Windows}.lean` (4 files) | +1,267 | Split `Assembly.lean` and unified `c`-generic matrix and endgame proofs | +| `Zeta23/ThmD/ModWindow.lean` | +726 | Shared modulated-window engine for `ThmD` and `XiPrime/QuarticWindow` | +| `Zeta23/RvM/Generic.lean` | +501 | Shared zero-counting and Riemann–von Mangoldt engine for ζ, χ, and ξ′ | +| `Zeta23/WeilEF/GenericEF.lean` | +354 | Shared contour, horizontal-vanishing, and full-line explicit-formula engine for ζ, χ, and ξ′ | +| `Zeta23/Taper/PsiC.lean` | +340 | Shared taper decay engine for `Taper/Decay.lean` and `ThmD` | +| `Zeta23/Analytic/BacklundInduction.lean` | +86 | Shared Backlund induction helper for `RvM` and `ThmE` | +| **Total added** | **+3,274** | | + +--- + +## What We Merged and Generalized + +1. **Modulated windows (`ThmD/ModWindow.lean`, `ThmD/WindowCore.lean`, `Taper/PsiC.lean`)**: + We combined the `phiD` window (`ThmD/Window.lean`) and the quartic window (`XiPrime/QuarticWindow/Moments.lean`) onto one `ModFactor` engine. We unified `v` and `v²` Fourier bounds in `WindowCore.lean` under `RealWindow`, and merged the repeated `psi` decay proofs into `Taper/PsiC.lean`. +2. **Zero counting and Landau bounds (`RvM/Generic.lean`, `WeilEF/Landau.lean`, `WeilEF/GoodHeights.lean`, `Defs/Counting.lean`)**: + We replaced parallel zero-counting, Gamma-side, and Riemann–von Mangoldt proofs across `RvM/`, `ThmE/`, and `XiPrime/ZeroCount/` with `DiscCountData` and `rvM_main_scaled`. We unified the Landau partial-fraction and good-heights proofs under `TwoLineLandauData`, and moved shared `ZeroConfig` window lemmas into `Defs/Counting.lean`. +3. **Assembly, certificates, and endgames (`Assembly/Matrix.lean`, `Assembly/Certificate.lean`, `ThmD/`, `ThmE/`, `ThmDE/`, `XiPrime/Assembly.lean`)**: + We unified the `c = 2` (simple zeros) and `c = 3` (distinct zeros) perturbation, moment, certificate, and endgame proofs into `c`-generic lemmas, and deleted `Assembly/CertificateC3.lean` along with unused Cauchy–Schwarz wrappers. +4. **Prime-pair kernels and explicit-formula helpers (`PrimeSideB/PPKernel.lean`, `Analytic/RectangleLogDeriv.lean`)**: + We generalized the prime-pair kernel for `PrimeSideB`, `ThmE/PPChi.lean`, and `XiPrime/PrimeSide/PP.lean`, and shared contour-rectangle and Backlund helpers across ζ, χ, and ξ′. +5. **Unused code removal**: + We deleted unused modules (`XiPrime/Hardy/`, `MediumPNT.lean`, `MellinCalculus.lean`, `Sobolev.lean`) and trimmed unused declarations from `FromPNTPlus/` and over 100 internal files. + +--- + +## Next Target + +Phase 1 (**≤ 50,000 Code LOC**) is complete at **49,928 Code LOC** (`-38.3%` vs. baseline) with `lean-max-heartbeats` reduced from `14 → 3`. +Phase 2 targets **≤ 40,000 Code LOC** (`≥ 50.6%` cumulative reduction) and **`lean-max-heartbeats = 0`** through higher-level subsystem unifications: + +- `Zeta23/RvM/` ↔ `Zeta23/ThmE/` ↔ `Zeta23/XiPrime/ZeroCount/` (unified completed L-function & RvM engine) +- `Zeta23/WeilEF/` ↔ `Zeta23/XiPrime/ExplicitFormula/` (shared contour, vertical-line, and full-line explicit-formula engine) +- `Zeta23/PrimeSideA/`, `Zeta23/PrimeSideB/`, and `Zeta23/XiPrime/PrimeSide/` (shared weighted-ends and kernel engine) +- `Zeta23/XiPrime/Coeff/` and `Zeta23/Taper/` ↔ `Zeta23/ThmD/` (eliminating the final 3 `maxHeartbeats` overrides and unifying smooth-window/multiplicity combinators) diff --git a/zeta23/scripts/PrintAxioms/PairCeiling.lean b/zeta23/scripts/PrintAxioms/PairCeiling.lean index 88a2fe976b..383ebf91b2 100644 --- a/zeta23/scripts/PrintAxioms/PairCeiling.lean +++ b/zeta23/scripts/PrintAxioms/PairCeiling.lean @@ -3,7 +3,6 @@ Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ -import Zeta23.PairCeiling.CeilingLaw256 import Zeta23.PairCeiling.Signed -- the bandwidth-one ceiling (no trusted statement file: every theorem below except the two kernel checks carries the