diff --git a/KakeyaLeanGate.lean b/KakeyaLeanGate.lean index 531e1563..a3c3195f 100644 --- a/KakeyaLeanGate.lean +++ b/KakeyaLeanGate.lean @@ -1,2 +1,5 @@ import KakeyaLeanGate.Prelude import KakeyaLeanGate.RiemannHypothesisRoot +import KakeyaLeanGate.RHJensen +import KakeyaLeanGate.LiCriterion +import KakeyaLeanGate.WeilPositivity diff --git a/KakeyaLeanGate/LiCriterion.lean b/KakeyaLeanGate/LiCriterion.lean new file mode 100644 index 00000000..a041a05f --- /dev/null +++ b/KakeyaLeanGate/LiCriterion.lean @@ -0,0 +1,7904 @@ +import KakeyaLeanGate.RiemannHypothesisRoot +import Mathlib.Algebra.Order.Chebyshev +import Mathlib.Analysis.SpecialFunctions.Complex.LogBounds +import Mathlib.Analysis.Analytic.Order +import Mathlib.Analysis.Calculus.Deriv.ZPow +import Mathlib.Analysis.Calculus.LogDeriv +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Complex.LocallyUniformLimit +import Mathlib.Analysis.Complex.CanonicalDecomposition +import Mathlib.Analysis.Complex.BranchLogRoot +import Mathlib.Analysis.Complex.BorelCaratheodory +import Mathlib.Analysis.Complex.ValueDistribution.LogCounting.Basic +import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn +import Mathlib.Analysis.SpecialFunctions.Complex.Analytic +import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup +import Mathlib.MeasureTheory.Integral.Bochner.Set +import Mathlib.NumberTheory.LSeries.ZetaZeros +import Mathlib.NumberTheory.LSeries.HurwitzZetaValues +import Mathlib.Analysis.Real.Pi.Bounds + +/-! +# A typed Li-coefficient route to the Riemann Hypothesis + +This file separates definitions and elementary consequences from the two +substantial bridges that are not yet in Mathlib: + +* identification of the derivative coefficients with the height-symmetric + sum over non-trivial zeta zeros, counted with multiplicity; +* Li's theorem identifying non-negativity of every positive-index + coefficient with `RiemannHypothesis`. + +Neither bridge is assumed or asserted as a theorem here. +-/ + +open Complex Filter Finset MeasureTheory +open scoped Topology MeasureTheory + +noncomputable section + +/-- Li's normalization of the Riemann xi function. + +Mathlib's `completedRiemannZeta` has assigned values at its poles, so the +pointwise expression `s * (s - 1) * completedRiemannZeta s` has the wrong +values at `0` and `1`. The expression below uses the entire pole-subtracted +completion and is equal to that product away from the two poles. It is +normalized by `riemannXiLi 0 = riemannXiLi 1 = 1`. +-/ +def riemannXiLi (s : ℂ) : ℂ := + 1 + s * (s - 1) * completedRiemannZeta₀ s + +@[simp] theorem riemannXiLi_zero : riemannXiLi 0 = 1 := by + simp [riemannXiLi] + +@[simp] theorem riemannXiLi_one : riemannXiLi 1 = 1 := by + simp [riemannXiLi] + +theorem differentiable_riemannXiLi : Differentiable ℂ riemannXiLi := by + unfold riemannXiLi + exact (differentiable_const 1).add + ((differentiable_id.mul (differentiable_id.sub (differentiable_const 1))).mul + differentiable_completedZeta₀) + +theorem riemannXiLi_one_sub (s : ℂ) : + riemannXiLi (1 - s) = riemannXiLi s := by + rw [riemannXiLi, riemannXiLi, completedRiemannZeta₀_one_sub] + ring + +theorem riemannXiLi_eq_mul_completedRiemannZeta + {s : ℂ} (hs0 : s ≠ 0) (hs1 : s ≠ 1) : + riemannXiLi s = s * (s - 1) * completedRiemannZeta s := by + rw [riemannXiLi, completedRiemannZeta_eq] + field_simp + ring + +/-- Intrinsic zero order of the normalized completed xi function. -/ +def riemannXiZeroOrder (rho : ℂ) : ℕ∞ := + analyticOrderAt riemannXiLi rho + +/-- Xi is entire and nonzero at `0`, so every local zero order is finite. -/ +theorem riemannXiZeroOrder_ne_top (rho : ℂ) : + riemannXiZeroOrder rho ≠ ⊤ := by + unfold riemannXiZeroOrder + have hxi : AnalyticOnNhd ℂ riemannXiLi Set.univ := + fun z _ ↦ differentiable_riemannXiLi.analyticAt z + apply hxi.analyticOrderAt_ne_top_of_isPreconnected + (x := (0 : ℂ)) (y := rho) + · exact isPreconnected_univ + · simp + · simp + · rw [(differentiable_riemannXiLi.analyticAt 0).analyticOrderAt_eq_zero.mpr + (by simp)] + exact ENat.zero_ne_top + +/-- Natural-valued multiplicity of an xi zero. -/ +def riemannXiZeroMultiplicity (rho : ℂ) : ℕ := + analyticOrderNatAt riemannXiLi rho + +theorem riemannXiZeroMultiplicity_cast (rho : ℂ) : + (riemannXiZeroMultiplicity rho : ℕ∞) = riemannXiZeroOrder rho := + Nat.cast_analyticOrderNatAt (riemannXiZeroOrder_ne_top rho) + +/-- The functional equation preserves xi-zero multiplicity exactly. -/ +theorem riemannXiZeroOrder_one_sub (rho : ℂ) : + riemannXiZeroOrder (1 - rho) = riemannXiZeroOrder rho := by + let g : ℂ → ℂ := fun z ↦ 1 - z + have hg : AnalyticAt ℂ g rho := by + dsimp [g] + fun_prop + have hgd : deriv g rho ≠ 0 := by + dsimp [g] + simp + have hcomp := analyticOrderAt_comp_of_deriv_ne_zero + (f := riemannXiLi) hg hgd + have heq : riemannXiLi ∘ g = riemannXiLi := by + funext z + exact riemannXiLi_one_sub z + unfold riemannXiZeroOrder + rw [heq] at hcomp + exact hcomp.symm + +theorem riemannXiZeroMultiplicity_one_sub (rho : ℂ) : + riemannXiZeroMultiplicity (1 - rho) = + riemannXiZeroMultiplicity rho := by + rw [← ENat.coe_inj, riemannXiZeroMultiplicity_cast, + riemannXiZeroMultiplicity_cast, riemannXiZeroOrder_one_sub] + +/-- Mathlib's global meromorphic divisor is a canonical multiplicity carrier +for xi's zeros. -/ +noncomputable def riemannXiZeroDivisor := + MeromorphicOn.divisor riemannXiLi Set.univ + +theorem riemannXiZeroDivisor_support : + Function.support riemannXiZeroDivisor = riemannXiLi ⁻¹' {0} := by + have hxi : AnalyticOnNhd ℂ riemannXiLi Set.univ := + fun z _ ↦ differentiable_riemannXiLi.analyticAt z + have hfinite : ∀ u : Set.univ, + meromorphicOrderAt riemannXiLi u.1 ≠ ⊤ := by + intro u + rw [(differentiable_riemannXiLi.analyticAt u.1).meromorphicOrderAt_eq] + simpa [riemannXiZeroOrder] using riemannXiZeroOrder_ne_top u.1 + have h := hxi.meromorphicNFOn.zero_set_eq_divisor_support hfinite + simpa [riemannXiZeroDivisor] using h.symm + +theorem riemannXiZeroDivisor_finite_on_compact + {K : Set ℂ} (hK : IsCompact K) : + (K ∩ Function.support riemannXiZeroDivisor).Finite := by + have hlocal : LocallyFiniteSupport + (fun z ↦ riemannXiZeroDivisor z) := + fun z ↦ + riemannXiZeroDivisor.supportLocallyFiniteWithinDomain z (by trivial) + exact hlocal.finite_inter_support_of_isCompact hK + +/-- The global xi-zero support is countable: its locally finite divisor +support is discrete, while `ℂ` is hereditarily Lindelöf. -/ +theorem riemannXiZeroDivisor_support_countable : + (Function.support riemannXiZeroDivisor).Countable := by + letI : DiscreteTopology + (Function.support riemannXiZeroDivisor) := + riemannXiZeroDivisor.discreteSupport.to_subtype + exact (HereditarilyLindelofSpace.isLindelof + (Function.support riemannXiZeroDivisor)).countable inferInstance + +/-- Canonical countable index type for all xi zeros with multiplicity. +The sigma type handles the zero-free, finite, and infinite cases uniformly. -/ +def RiemannXiZeroIndex := + Σ rho : {z : ℂ // riemannXiLi z = 0}, + Fin (riemannXiZeroMultiplicity rho) + +/-- Root represented by a multiplicity index. -/ +def riemannXiZeroRoot (i : RiemannXiZeroIndex) : ℂ := i.1 + +noncomputable instance : Encodable RiemannXiZeroIndex := by + classical + have hs : (riemannXiLi ⁻¹' {0}).Countable := by + rw [← riemannXiZeroDivisor_support] + exact riemannXiZeroDivisor_support_countable + letI : Encodable {z : ℂ // riemannXiLi z = 0} := hs.toEncodable + unfold RiemannXiZeroIndex + infer_instance + +/-- The finite fiber over `z`, with one index for each unit of analytic +multiplicity. -/ +noncomputable def riemannXiZeroFiber + (z : ℂ) : Finset RiemannXiZeroIndex := by + classical + by_cases hz : riemannXiLi z = 0 + · exact Finset.univ.map + ⟨fun k ↦ ⟨⟨z, hz⟩, k⟩, by + intro a b h + exact Fin.ext + (congrArg (fun x : RiemannXiZeroIndex ↦ x.2.val) h)⟩ + · exact ∅ + +theorem mem_riemannXiZeroFiber (z : ℂ) (i : RiemannXiZeroIndex) : + i ∈ riemannXiZeroFiber z ↔ riemannXiZeroRoot i = z := by + classical + unfold riemannXiZeroFiber + split_ifs with hz + · constructor + · intro hi + simp only [Finset.mem_map, Finset.mem_univ, true_and] at hi + obtain ⟨k, rfl⟩ := hi + rfl + · intro hi + subst z + simp only [Finset.mem_map, Finset.mem_univ, true_and] + refine ⟨i.2, ?_⟩ + apply Sigma.ext (Subtype.ext rfl) + simp + · simp only [Finset.notMem_empty, false_iff] + intro hi + apply hz + rw [← hi] + exact i.1.property + +theorem card_riemannXiZeroFiber (z : ℂ) : + (riemannXiZeroFiber z).card = + riemannXiZeroMultiplicity z := by + classical + unfold riemannXiZeroFiber + split_ifs with hz + · rw [Finset.card_map, Finset.card_univ, Fintype.card_fin] + · have hm : riemannXiZeroMultiplicity z = 0 := by + rw [← Nat.cast_inj (R := ℕ∞), + riemannXiZeroMultiplicity_cast] + unfold riemannXiZeroOrder + simp only [Nat.cast_zero] + rw [(differentiable_riemannXiLi.analyticAt z).analyticOrderAt_eq_zero] + exact hz + simp [hm] + +theorem analyticOrderAt_riemannXiLi_eq_zeroFiber_card (z : ℂ) : + analyticOrderAt riemannXiLi z = + ((riemannXiZeroFiber z).card : ℕ∞) := by + rw [card_riemannXiZeroFiber, riemannXiZeroMultiplicity_cast] + rfl + +/-- The xi divisor value is exactly the natural analytic multiplicity, +embedded in the integer-valued divisor. -/ +theorem riemannXiZeroDivisor_apply (z : ℂ) : + riemannXiZeroDivisor z = + (riemannXiZeroMultiplicity z : ℤ) := by + unfold riemannXiZeroDivisor + have hA : AnalyticAt ℂ riemannXiLi z := + differentiable_riemannXiLi.analyticAt z + have hM : MeromorphicOn riemannXiLi Set.univ := + fun w _ ↦ + differentiable_riemannXiLi.analyticAt w |>.meromorphicAt + rw [MeromorphicOn.divisor_apply hM (Set.mem_univ z), + hA.meromorphicOrderAt_eq] + have ho : analyticOrderAt riemannXiLi z = + (riemannXiZeroMultiplicity z : ℕ∞) := by + simpa [riemannXiZeroOrder] using + (riemannXiZeroMultiplicity_cast z).symm + rw [ho] + simp + +theorem riemannXiZeroRoot_ne_zero (i : RiemannXiZeroIndex) : + riemannXiZeroRoot i ≠ 0 := by + intro h + have hi := i.1.property + rw [show (i.1 : ℂ) = 0 from h, riemannXiLi_zero] at hi + exact one_ne_zero hi + +/-- Multiplicity-preserving reflection of the canonical xi-zero index. -/ +noncomputable def riemannXiZeroReflection + (i : RiemannXiZeroIndex) : RiemannXiZeroIndex := + ⟨⟨1 - riemannXiZeroRoot i, by + rw [riemannXiLi_one_sub] + exact i.1.property⟩, + Fin.cast (riemannXiZeroMultiplicity_one_sub + (riemannXiZeroRoot i)).symm i.2⟩ + +@[simp] theorem riemannXiZeroRoot_reflection (i : RiemannXiZeroIndex) : + riemannXiZeroRoot (riemannXiZeroReflection i) = + 1 - riemannXiZeroRoot i := rfl + +@[simp] theorem riemannXiZeroReflection_val (i : RiemannXiZeroIndex) : + (riemannXiZeroReflection i).2.val = i.2.val := by + simp [riemannXiZeroReflection] + +theorem riemannXiZeroReflection_injective : + Function.Injective riemannXiZeroReflection := by + intro i j h + have hr' := congrArg riemannXiZeroRoot h + simp only [riemannXiZeroRoot_reflection] at hr' + have hr : riemannXiZeroRoot i = riemannXiZeroRoot j := by + linear_combination -hr' + have e : i.1 = j.1 := Subtype.ext hr + have hv' := congrArg (fun x : RiemannXiZeroIndex ↦ x.2.val) h + simp only [riemannXiZeroReflection_val] at hv' + exact Sigma.ext e <| (Fin.heq_ext_iff (by rw [e])).mpr hv' + +noncomputable def riemannXiZeroReflectionEmbedding : + RiemannXiZeroIndex ↪ RiemannXiZeroIndex := + ⟨riemannXiZeroReflection, riemannXiZeroReflection_injective⟩ + +/-- Every multiplicity occurrence has an explicit reflected occurrence with +the same ordinal in the reflected fiber. -/ +theorem exists_riemannXiZeroReflectedMultiplicityIndex + (i : RiemannXiZeroIndex) : + ∃ j : RiemannXiZeroIndex, + riemannXiZeroRoot j = 1 - riemannXiZeroRoot i ∧ + j.2.val = i.2.val := + ⟨riemannXiZeroReflection i, riemannXiZeroRoot_reflection i, + riemannXiZeroReflection_val i⟩ + +/-- The reflected inverse-root pair is an inverse-quadratic term. -/ +theorem riemannXiZeroRoot_inv_add_reflection (i : RiemannXiZeroIndex) : + (riemannXiZeroRoot i)⁻¹ + + (riemannXiZeroRoot (riemannXiZeroReflection i))⁻¹ = + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹ := by + rw [riemannXiZeroRoot_reflection] + have h0 := riemannXiZeroRoot_ne_zero i + have h1 : 1 - riemannXiZeroRoot i ≠ 0 := by + rw [← riemannXiZeroRoot_reflection] + exact riemannXiZeroRoot_ne_zero (riemannXiZeroReflection i) + field_simp + ring + +theorem riemannXiZeroMultiplicity_pos_iff (z : ℂ) : + 0 < riemannXiZeroMultiplicity z ↔ riemannXiLi z = 0 := by + rw [Nat.pos_iff_ne_zero] + constructor + · intro hm + apply (differentiable_riemannXiLi.analyticAt z).analyticOrderAt_ne_zero.mp + intro ho + apply hm + rw [← Nat.cast_inj (R := ℕ∞), + riemannXiZeroMultiplicity_cast] + simpa [riemannXiZeroOrder] using ho + · intro hz hm + have ho := + (differentiable_riemannXiLi.analyticAt z).analyticOrderAt_ne_zero.mpr hz + apply ho + change riemannXiZeroOrder z = 0 + rw [← riemannXiZeroMultiplicity_cast] + simp [hm] + +/-- Completeness of the countable enumeration, including both directions: +an index gives a zero, and every zero has at least one multiplicity index. -/ +theorem exists_riemannXiZeroRoot_iff (z : ℂ) : + (∃ i : RiemannXiZeroIndex, riemannXiZeroRoot i = z) ↔ + riemannXiLi z = 0 := by + constructor + · rintro ⟨i, rfl⟩ + exact i.1.property + · intro hz + have hcard : 0 < (riemannXiZeroFiber z).card := by + rw [card_riemannXiZeroFiber, + riemannXiZeroMultiplicity_pos_iff] + exact hz + obtain ⟨i, hi⟩ := Finset.card_pos.mp hcard + exact ⟨i, (mem_riemannXiZeroFiber z i).mp hi⟩ + +/-- Only finitely many multiplicity indices lie over a bounded xi-zero +window. -/ +theorem riemannXiZeroIndex_finite_norm_le (R : ℝ) : + {i : RiemannXiZeroIndex | + ‖riemannXiZeroRoot i‖ ≤ R}.Finite := by + let Z : Set ℂ := + Metric.closedBall 0 R ∩ Function.support riemannXiZeroDivisor + have hZ : Z.Finite := + riemannXiZeroDivisor_finite_on_compact + (ProperSpace.isCompact_closedBall 0 R) + have hU : (⋃ z ∈ Z, (↑(riemannXiZeroFiber z) : + Set RiemannXiZeroIndex)).Finite := by + apply hZ.biUnion + intro z hz + exact Finset.finite_toSet _ + apply hU.subset + intro i hi + simp only [Set.mem_setOf_eq] at hi + have hzball : + riemannXiZeroRoot i ∈ Metric.closedBall 0 R := by + simpa [Metric.mem_closedBall, dist_zero_right] using hi + have hzsupport : + riemannXiZeroRoot i ∈ + Function.support riemannXiZeroDivisor := by + rw [riemannXiZeroDivisor_support] + exact i.1.property + apply Set.mem_iUnion_of_mem (riemannXiZeroRoot i) + apply Set.mem_iUnion_of_mem ⟨hzball, hzsupport⟩ + exact (mem_riemannXiZeroFiber _ _).mpr rfl + +/-- The finite multiplicity-indexed xi-zero window of radius `r`. -/ +noncomputable def riemannXiZeroIndexWindow + (r : ℝ) : Finset RiemannXiZeroIndex := + (riemannXiZeroIndex_finite_norm_le r).toFinset + +@[simp] +theorem mem_riemannXiZeroIndexWindow + (r : ℝ) (i : RiemannXiZeroIndex) : + i ∈ riemannXiZeroIndexWindow r ↔ + ‖riemannXiZeroRoot i‖ ≤ r := by + simp [riemannXiZeroIndexWindow] + +/-- Radial windows are only reflection-stable after enlarging the radius by +one. This boundary shift is why inverse-square summability alone does not +justify unpaired radial inverse-root sums. -/ +theorem riemannXiZeroReflection_mem_window_add_one + {R : ℝ} {i : RiemannXiZeroIndex} + (hi : i ∈ riemannXiZeroIndexWindow R) : + riemannXiZeroReflection i ∈ + riemannXiZeroIndexWindow (R + 1) := by + rw [mem_riemannXiZeroIndexWindow] at hi ⊢ + rw [riemannXiZeroRoot_reflection] + calc + ‖1 - riemannXiZeroRoot i‖ + ≤ ‖(1 : ℂ)‖ + ‖riemannXiZeroRoot i‖ := norm_sub_le _ _ + _ ≤ 1 + R := by simpa using add_le_add_left hi 1 + _ = R + 1 := by ring + +/-- The finite divisor obtained by placing one unit at every multiplicity +index in the bounded xi-zero window. -/ +noncomputable def riemannXiZeroIndexWindowDivisor + (r : ℝ) : Function.locallyFinsupp ℂ ℤ := + ∑ i ∈ riemannXiZeroIndexWindow r, + Function.locallyFinsuppWithin.single + (riemannXiZeroRoot i) 1 + +/-- The bounded multiplicity-index divisor is pointwise dominated by xi's +full analytic divisor. -/ +theorem riemannXiZeroIndexWindowDivisor_le (r : ℝ) : + riemannXiZeroIndexWindowDivisor r ≤ + riemannXiZeroDivisor := by + classical + intro z + rw [riemannXiZeroDivisor_apply] + unfold riemannXiZeroIndexWindowDivisor + have heval := congrFun + (Function.locallyFinsuppWithin.coe_sum + (s := riemannXiZeroIndexWindow r) + (F := fun i ↦ Function.locallyFinsuppWithin.single + (riemannXiZeroRoot i) (1 : ℤ))) z + rw [heval, Finset.sum_apply] + simp only [Function.locallyFinsuppWithin.single_apply, + sum_ite, sum_const_zero, add_zero] + simp only [Finset.sum_const, nsmul_eq_mul, mul_one] + norm_cast + calc + {i ∈ riemannXiZeroIndexWindow r | + z = riemannXiZeroRoot i}.card + ≤ (riemannXiZeroFiber z).card := by + apply Finset.card_le_card + intro i hi + simp only [Finset.mem_filter] at hi + exact (mem_riemannXiZeroFiber z i).mpr hi.2.symm + _ = riemannXiZeroMultiplicity z := + card_riemannXiZeroFiber z + +/-- The canonical multiplicity enumeration escapes every bounded set, +including automatically in the zero-free and finite cases. -/ +theorem riemannXiZeroRoot_escape : + Tendsto (fun i : RiemannXiZeroIndex ↦ ‖riemannXiZeroRoot i‖) + cofinite atTop := by + apply Filter.tendsto_atTop.mpr + intro R + change {i : RiemannXiZeroIndex | + R ≤ ‖riemannXiZeroRoot i‖} ∈ cofinite + rw [Filter.mem_cofinite] + apply (riemannXiZeroIndex_finite_norm_le R).subset + intro i hi + simp only [Set.mem_compl_iff, Set.mem_setOf_eq] at hi ⊢ + exact le_of_lt (lt_of_not_ge hi) + +/-- Xi's logarithmic zero-counting function is exactly the positive divisor +count from Mathlib's value-distribution API. -/ +theorem riemannXiZeroDivisor_logCounting : + Function.locallyFinsuppWithin.logCounting riemannXiZeroDivisor = + ValueDistribution.logCounting riemannXiLi 0 := by + rw [ValueDistribution.logCounting_zero] + have hxi : AnalyticOnNhd ℂ riemannXiLi Set.univ := + fun z _ ↦ differentiable_riemannXiLi.analyticAt z + have hnonneg : 0 ≤ MeromorphicOn.divisor riemannXiLi Set.univ := + MeromorphicOn.AnalyticOnNhd.divisor_nonneg hxi + unfold riemannXiZeroDivisor + rw [posPart_eq_self.mpr hnonneg] + +/-- Jensen's formula specialized to normalized xi: the trailing-coefficient +constant vanishes because `xi(0)=1`. Any future global norm bound can feed +directly into this identity to control the zero divisor. -/ +theorem riemannXiZeroDivisor_logCounting_eq_circleAverage + {R : ℝ} (hR : R ≠ 0) : + Function.locallyFinsuppWithin.logCounting riemannXiZeroDivisor R = + Real.circleAverage (Real.log ‖riemannXiLi ·‖) 0 R := by + unfold riemannXiZeroDivisor + have hmer : Meromorphic riemannXiLi := + fun z ↦ (differentiable_riemannXiLi.analyticAt z).meromorphicAt + rw [Function.locallyFinsuppWithin.logCounting_divisor_eq_circleAverage_sub_const + hmer hR] + rw [(differentiable_riemannXiLi.analyticAt 0).meromorphicTrailingCoeffAt_of_ne_zero + (by simp)] + simp + +/-- Exact conversion from the multiplicity-index window cardinality to +Mathlib's weighted divisor count. Every root of norm at most `r` +contributes at least `log 2` when the logarithmic count is evaluated at +radius `2r`. -/ +theorem riemannXiZeroIndexWindow_card_mul_log_two_le_logCounting + {r : ℝ} (hr : 1 ≤ r) : + ((riemannXiZeroIndexWindow r).card : ℝ) * Real.log 2 ≤ + Function.locallyFinsuppWithin.logCounting + riemannXiZeroDivisor (2 * r) := by + calc + ((riemannXiZeroIndexWindow r).card : ℝ) * Real.log 2 = + ∑ _i ∈ riemannXiZeroIndexWindow r, Real.log 2 := by + simp + _ ≤ ∑ i ∈ riemannXiZeroIndexWindow r, + Function.locallyFinsuppWithin.logCounting + (Function.locallyFinsuppWithin.single + (riemannXiZeroRoot i) 1) (2 * r) := by + apply Finset.sum_le_sum + intro i hi + have hir : ‖riemannXiZeroRoot i‖ ≤ r := + (mem_riemannXiZeroIndexWindow r i).mp hi + rw [Function.locallyFinsuppWithin.logCounting_single_eq_log_sub_const + (hir.trans (by linarith))] + norm_num + rw [← Real.log_div (by positivity) + (norm_ne_zero_iff.mpr (riemannXiZeroRoot_ne_zero i))] + apply Real.log_le_log (by norm_num) + rw [le_div_iff₀ + (norm_pos_iff.mpr (riemannXiZeroRoot_ne_zero i))] + nlinarith + _ = Function.locallyFinsuppWithin.logCounting + (riemannXiZeroIndexWindowDivisor r) (2 * r) := by + unfold riemannXiZeroIndexWindowDivisor + rw [map_sum, Finset.sum_apply] + _ ≤ Function.locallyFinsuppWithin.logCounting + riemannXiZeroDivisor (2 * r) := by + exact Function.locallyFinsuppWithin.logCounting_le + (riemannXiZeroIndexWindowDivisor_le r) (by linarith) + +/-- The strongest unconditional growth statement currently supplied by +pinned Mathlib: xi is bounded on each compact set. This is local and is not +a finite-order estimate as the bound has no uniform dependence on `K`. -/ +theorem riemannXiLi_bounded_on_compact + {K : Set ℂ} (hK : IsCompact K) : + ∃ C : ℝ, ∀ s ∈ K, ‖riemannXiLi s‖ ≤ C := + hK.exists_bound_of_continuousOn differentiable_riemannXiLi.continuous.continuousOn + +/-- The source-standard global estimate `|xi(s)| ≤ exp(C |s| log(|s|+2))` +that implies order at most one. -/ +def RiemannXiOrderOneGrowthBound : Prop := + ∃ C R : ℝ, 0 ≤ C ∧ 2 ≤ R ∧ ∀ s : ℂ, R ≤ ‖s‖ → + ‖riemannXiLi s‖ ≤ + Real.exp (C * ‖s‖ * Real.log (‖s‖ + 2)) + +/-- The functional equation patches any right-half-plane bound whose +majorant is symmetric in `s` and `1-s` to the whole plane. -/ +theorem riemannXiLi_global_norm_bound_of_rightHalfPlane + (M : ℝ → ℝ) + (hbound : ∀ s : ℂ, 1 / 2 ≤ s.re → + ‖riemannXiLi s‖ ≤ M (max ‖s‖ ‖1 - s‖)) : + ∀ s : ℂ, ‖riemannXiLi s‖ ≤ M (max ‖s‖ ‖1 - s‖) := by + intro s + by_cases hs : 1 / 2 ≤ s.re + · exact hbound s hs + · rw [← riemannXiLi_one_sub s] + have hreflect : 1 / 2 ≤ (1 - s).re := by + simp only [sub_re, one_re] + linarith + simpa [max_comm] using hbound (1 - s) hreflect + +/-- An actual zeta growth estimate available from the pinned Dirichlet +series API: zeta is uniformly bounded on `re s ≥ 2` by the real +`p = 2` series. This closes the elementary far-right region, but does +not provide the critical-strip bound needed for xi's order. -/ +theorem norm_riemannZeta_le_tsum_inv_sq_of_two_le_re + {s : ℂ} (hs : 2 ≤ s.re) : + ‖riemannZeta s‖ ≤ ∑' n : ℕ, 1 / (n : ℝ) ^ 2 := by + rw [zeta_eq_tsum_one_div_nat_cpow + (lt_of_lt_of_le (by norm_num) hs)] + calc + ‖∑' n : ℕ, 1 / (n : ℂ) ^ s‖ ≤ + ∑' n : ℕ, ‖1 / (n : ℂ) ^ s‖ := + norm_tsum_le_tsum_norm + (Complex.summable_one_div_nat_cpow.mpr + (lt_of_lt_of_le (by norm_num) hs)).norm + _ ≤ ∑' n : ℕ, 1 / (n : ℝ) ^ 2 := by + apply Summable.tsum_le_tsum + · intro n + rcases n with _ | n + · have hs0 : s ≠ 0 := by + intro h + subst s + norm_num at hs + simp [Complex.zero_cpow hs0] + · simp only [norm_div, norm_one, ← Complex.ofReal_natCast, + Complex.norm_cpow_eq_rpow_re_of_pos + (Nat.cast_pos.mpr (Nat.succ_pos n))] + rw [div_le_div_iff_of_pos_left (by norm_num) + (Real.rpow_pos_of_pos + (Nat.cast_pos.mpr (Nat.succ_pos n)) _) + (pow_pos (Nat.cast_pos.mpr (Nat.succ_pos n)) _)] + rw [← Real.rpow_natCast] + exact Real.rpow_le_rpow_of_exponent_le + (by norm_num : (1 : ℝ) ≤ (n + 1 : ℕ)) hs + · exact (Complex.summable_one_div_nat_cpow.mpr + (lt_of_lt_of_le (by norm_num) hs)).norm + · exact Real.summable_one_div_nat_pow.mpr (by norm_num) + +/-- Euler's integral gives the classical vertical-line Gamma estimate +`|Γ(σ+it)| ≤ Γ(σ)` for `σ > 0`. -/ +theorem norm_complexGamma_le_realGamma (s : ℂ) (hs : 0 < s.re) : + ‖Complex.Gamma s‖ ≤ Real.Gamma s.re := by + rw [Complex.Gamma_eq_integral hs, Complex.GammaIntegral] + calc + ‖∫ x in Set.Ioi (0 : ℝ), ((-x).exp : ℂ) * (x : ℂ) ^ (s - 1)‖ ≤ + ∫ x in Set.Ioi (0 : ℝ), + ‖((-x).exp : ℂ) * (x : ℂ) ^ (s - 1)‖ := + MeasureTheory.norm_integral_le_integral_norm _ + _ = ∫ x in Set.Ioi (0 : ℝ), + Real.exp (-x) * x ^ (s.re - 1) := by + apply MeasureTheory.setIntegral_congr_fun measurableSet_Ioi + intro x hx + dsimp only + rw [norm_mul, Complex.norm_of_nonneg (Real.exp_pos _).le, + Complex.norm_cpow_eq_rpow_re_of_pos hx] + simp + _ = Real.Gamma s.re := by + rw [Real.Gamma_eq_integral hs] + +/-- A fully explicit (coarse) real Gamma growth estimate from monotonicity +and `n! ≤ n^n`. -/ +theorem realGamma_le_ceil_pow_self (x : ℝ) (hx : 2 ≤ x) : + Real.Gamma x ≤ (Nat.ceil x : ℝ) ^ Nat.ceil x := by + let N := Nat.ceil x + have hxN : x ≤ (N : ℝ) := Nat.le_ceil x + have hN2 : 2 ≤ (N : ℝ) := hx.trans hxN + have hmono : Real.Gamma x ≤ Real.Gamma ((N : ℝ) + 1) := by + apply Real.Gamma_strictMonoOn_Ici.monotoneOn + · exact hx + · exact hN2.trans (le_add_of_nonneg_right zero_le_one) + · exact hxN.trans (le_add_of_nonneg_right zero_le_one) + rw [Real.Gamma_nat_eq_factorial] at hmono + exact hmono.trans (by exact_mod_cast Nat.factorial_le_pow N) + +theorem norm_complexGamma_le_ceil_pow_re (s : ℂ) (hs : 2 ≤ s.re) : + ‖Complex.Gamma s‖ ≤ (Nat.ceil s.re : ℝ) ^ Nat.ceil s.re := + (norm_complexGamma_le_realGamma s (by linarith)).trans + (realGamma_le_ceil_pow_self s.re hs) + +/-- Explicit completed-xi growth in the far-right half-plane. The only +non-polynomial term is the transparent ceiling power coming from Gamma. -/ +theorem norm_riemannXiLi_le_farRight {s : ℂ} (hs : 4 ≤ s.re) : + ‖riemannXiLi s‖ ≤ + ‖s‖ * ‖s - 1‖ * + ((Nat.ceil (s.re / 2) : ℝ) ^ Nat.ceil (s.re / 2)) * + (∑' n : ℕ, 1 / (n : ℝ) ^ 2) := by + have hs0 : s ≠ 0 := by + intro h + subst s + norm_num at hs + have hs1 : s ≠ 1 := by + intro h + subst s + norm_num at hs + have hsone : 1 < s.re := lt_of_lt_of_le (by norm_num) hs + rw [riemannXiLi_eq_mul_completedRiemannZeta hs0 hs1, + completedZeta_eq_tsum_of_one_lt_re hsone, + ← zeta_eq_tsum_one_div_nat_cpow hsone] + simp only [norm_mul] + have hpi : ‖(Real.pi : ℂ) ^ (-s / 2)‖ ≤ 1 := by + rw [Complex.norm_cpow_eq_rpow_re_of_pos Real.pi_pos] + apply Real.rpow_le_one_of_one_le_of_nonpos + · linarith [Real.two_le_pi] + · norm_num [div_re] + linarith + have hgamma : ‖Complex.Gamma (s / 2)‖ ≤ + (Nat.ceil (s.re / 2) : ℝ) ^ Nat.ceil (s.re / 2) := by + convert norm_complexGamma_le_ceil_pow_re (s / 2) + (by norm_num [div_re]; linarith) using 1 + all_goals norm_num [div_re] + have hzeta := norm_riemannZeta_le_tsum_inv_sq_of_two_le_re + (show 2 ≤ s.re by linarith) + calc + ‖s‖ * ‖s - 1‖ * + (‖(Real.pi : ℂ) ^ (-s / 2)‖ * ‖Complex.Gamma (s / 2)‖ * + ‖riemannZeta s‖) + ≤ ‖s‖ * ‖s - 1‖ * (1 * + ((Nat.ceil (s.re / 2) : ℝ) ^ Nat.ceil (s.re / 2)) * + (∑' n : ℕ, 1 / (n : ℝ) ^ 2)) := by gcongr + _ = _ := by ring + +/-- The functional equation reflects the explicit far-right estimate to +the far-left half-plane. -/ +theorem norm_riemannXiLi_le_farLeft {s : ℂ} (hs : s.re ≤ -3) : + ‖riemannXiLi s‖ ≤ + ‖1 - s‖ * ‖s‖ * + ((Nat.ceil ((1 - s).re / 2) : ℝ) ^ + Nat.ceil ((1 - s).re / 2)) * + (∑' n : ℕ, 1 / (n : ℝ) ^ 2) := by + rw [← riemannXiLi_one_sub s] + have hreflect : 4 ≤ (1 - s).re := by + simp only [sub_re, one_re] + linarith + simpa [norm_neg] using + (norm_riemannXiLi_le_farRight (s := 1 - s) hreflect) + +/-- A Mellin transform is uniformly bounded on a closed vertical strip +by the sum of its endpoint norm integrals, provided it converges at every +complex exponent. -/ +theorem norm_mellin_le_endpointMajorant + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + (f : ℝ → E) (hconv : ∀ s : ℂ, MellinConvergent f s) + {a b : ℝ} (s : ℂ) (ha : a ≤ s.re) (hb : s.re ≤ b) : + ‖mellin f s‖ ≤ + ∫ t in Set.Ioi (0 : ℝ), + (‖(t : ℂ) ^ ((a : ℂ) - 1) • f t‖ + + ‖(t : ℂ) ^ ((b : ℂ) - 1) • f t‖) := by + rw [mellin] + calc + ‖∫ t in Set.Ioi (0 : ℝ), (t : ℂ) ^ (s - 1) • f t‖ ≤ + ∫ t in Set.Ioi (0 : ℝ), ‖(t : ℂ) ^ (s - 1) • f t‖ := + MeasureTheory.norm_integral_le_integral_norm _ + _ ≤ ∫ t in Set.Ioi (0 : ℝ), + (‖(t : ℂ) ^ ((a : ℂ) - 1) • f t‖ + + ‖(t : ℂ) ^ ((b : ℂ) - 1) • f t‖) := by + apply MeasureTheory.setIntegral_mono_on + · exact (hconv s).norm + · exact ((hconv (a : ℂ)).norm.add (hconv (b : ℂ)).norm) + · exact measurableSet_Ioi + · intro t ht + simp only [norm_smul] + have ht0 : 0 < t := ht + simp only [Complex.norm_cpow_eq_rpow_re_of_pos ht0] + have hpow : t ^ (s.re - 1) ≤ + t ^ (a - 1) + t ^ (b - 1) := by + by_cases ht1 : t ≤ 1 + · exact (Real.rpow_le_rpow_of_exponent_ge ht0 ht1 + (by linarith)).trans + (le_add_of_nonneg_right (Real.rpow_nonneg ht0.le _)) + · have h1t : 1 ≤ t := le_of_not_ge ht1 + exact (Real.rpow_le_rpow_of_exponent_le h1t + (by linarith)).trans + (le_add_of_nonneg_left (Real.rpow_nonneg ht0.le _)) + simpa [sub_re, add_mul] using + mul_le_mul_of_nonneg_right hpow (norm_nonneg (f t)) + +/-- The pole-subtracted completion is uniformly bounded on every closed +vertical strip, directly from Mathlib's all-exponent Mellin representation. -/ +theorem exists_norm_completedRiemannZeta₀_le_on_verticalStrip + (a b : ℝ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ s : ℂ, a ≤ s.re → s.re ≤ b → + ‖completedRiemannZeta₀ s‖ ≤ C := by + let P := HurwitzZeta.hurwitzEvenFEPair 0 + let C0 : ℝ := + ∫ t in Set.Ioi (0 : ℝ), + (‖(t : ℂ) ^ (((a / 2 : ℝ) : ℂ) - 1) • P.f_modif t‖ + + ‖(t : ℂ) ^ (((b / 2 : ℝ) : ℂ) - 1) • P.f_modif t‖) + refine ⟨|C0| / 2, by positivity, ?_⟩ + intro s ha hb + have hconv : ∀ u : ℂ, MellinConvergent P.f_modif u := + fun u ↦ (P.toStrongFEPair.hasMellin u).1 + have hm := norm_mellin_le_endpointMajorant P.f_modif hconv (s / 2) + (a := a / 2) (b := b / 2) + (by norm_num [div_re]; linarith) (by norm_num [div_re]; linarith) + change ‖P.Λ₀ (s / 2) / 2‖ ≤ |C0| / 2 + rw [norm_div] + norm_num + exact div_le_div_of_nonneg_right (hm.trans (le_abs_self C0)) (by norm_num) + +/-- Consequently normalized xi has only quadratic growth on every fixed +closed vertical strip. -/ +theorem exists_norm_riemannXiLi_le_on_verticalStrip (a b : ℝ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ s : ℂ, a ≤ s.re → s.re ≤ b → + ‖riemannXiLi s‖ ≤ 1 + ‖s‖ * ‖s - 1‖ * C := by + obtain ⟨C, hC0, hC⟩ := + exists_norm_completedRiemannZeta₀_le_on_verticalStrip a b + refine ⟨C, hC0, fun s ha hb ↦ ?_⟩ + rw [riemannXiLi] + calc + ‖1 + s * (s - 1) * completedRiemannZeta₀ s‖ + ≤ ‖(1 : ℂ)‖ + ‖s * (s - 1) * completedRiemannZeta₀ s‖ := + norm_add_le _ _ + _ = 1 + ‖s‖ * ‖s - 1‖ * ‖completedRiemannZeta₀ s‖ := by + simp only [norm_one, norm_mul] + _ ≤ 1 + ‖s‖ * ‖s - 1‖ * C := by + gcongr + exact hC s ha hb + +/-- The ceiling-power Gamma majorant has the standard order-one +`exp(r log(r+2))` form. -/ +theorem ceilPow_le_exp_orderMajorant {x r : ℝ} (hx : 2 ≤ x) + (hxr : x ≤ r / 2) (_hr : 4 ≤ r) : + (Nat.ceil x : ℝ) ^ Nat.ceil x ≤ + Real.exp (r * Real.log (r + 2)) := by + let N := Nat.ceil x + have hNpos : 0 < (N : ℝ) := by + exact_mod_cast (Nat.ceil_pos.mpr (by linarith : 0 < x)) + have hNr : (N : ℝ) ≤ r := by + have hceil : (N : ℝ) < x + 1 := + Nat.ceil_lt_add_one (by linarith) + linarith + have hlog : Real.log (N : ℝ) ≤ Real.log (r + 2) := + Real.log_le_log hNpos (by linarith) + have hlog0 : 0 ≤ Real.log (r + 2) := + Real.log_nonneg (by linarith) + rw [← Real.rpow_natCast, Real.rpow_def_of_pos hNpos] + apply Real.exp_le_exp.mpr + calc + Real.log (N : ℝ) * (N : ℝ) + ≤ Real.log (r + 2) * (N : ℝ) := + mul_le_mul_of_nonneg_right hlog hNpos.le + _ ≤ Real.log (r + 2) * r := + mul_le_mul_of_nonneg_left hNr hlog0 + _ = r * Real.log (r + 2) := by ring + +/-- The explicit far-right estimate has order-one exponential growth. -/ +theorem exists_riemannXiLi_orderBound_farRight : + ∃ C : ℝ, 0 ≤ C ∧ ∀ s : ℂ, 4 ≤ s.re → + ‖riemannXiLi s‖ ≤ + Real.exp (C * ‖s‖ * Real.log (‖s‖ + 2)) := by + let Z : ℝ := ∑' n : ℕ, 1 / (n : ℝ) ^ 2 + have hZ0 : 0 ≤ Z := by + apply tsum_nonneg + intro n + positivity + let L := Real.log 2 + have hL : 0 < L := Real.log_pos (by norm_num) + let D := Real.log (Z + 1) / L + have hlogZ0 : 0 ≤ Real.log (Z + 1) := + Real.log_nonneg (by linarith) + have hD0 : 0 ≤ D := div_nonneg hlogZ0 hL.le + refine ⟨D + 4, by positivity, ?_⟩ + intro s hs + let r := ‖s‖ + let A := r * Real.log (r + 2) + have hreNorm : s.re ≤ r := + (le_abs_self s.re).trans (Complex.abs_re_le_norm s) + have hr : 4 ≤ r := hs.trans hreNorm + have hrpos : 0 < r := by linarith + have hlog0 : 0 ≤ Real.log (r + 2) := + Real.log_nonneg (by linarith) + have hlogr : Real.log r ≤ A := by + have hle : Real.log r ≤ Real.log (r + 2) := + Real.log_le_log hrpos (by linarith) + exact hle.trans (by + calc + Real.log (r + 2) ≤ r * Real.log (r + 2) := by + nlinarith + _ = A := rfl) + have hrExp : r ≤ Real.exp A := by + rw [← Real.exp_log hrpos] + exact Real.exp_le_exp.mpr hlogr + have hr1 : r + 1 ≤ r ^ 2 := by nlinarith + have hpoly : r * (r + 1) ≤ Real.exp (3 * A) := by + calc + r * (r + 1) ≤ Real.exp A * (Real.exp A) ^ 2 := by + gcongr + exact hr1.trans + ((sq_le_sq₀ hrpos.le (Real.exp_pos A).le).mpr hrExp) + _ = Real.exp (3 * A) := by + rw [pow_two, ← Real.exp_add, ← Real.exp_add] + ring_nf + have hLA : L ≤ A := by + have hlog2 : L ≤ Real.log (r + 2) := by + exact Real.log_le_log (by norm_num) (by linarith) + exact hlog2.trans (by + calc + Real.log (r + 2) ≤ r * Real.log (r + 2) := by + nlinarith + _ = A := rfl) + have hlogZA : Real.log (Z + 1) ≤ D * A := by + calc + Real.log (Z + 1) = D * L := by + dsimp [D] + field_simp + _ ≤ D * A := mul_le_mul_of_nonneg_left hLA hD0 + have hZexp : Z ≤ Real.exp (D * A) := by + calc + Z ≤ Z + 1 := by linarith + _ = Real.exp (Real.log (Z + 1)) := by + rw [Real.exp_log (by linarith)] + _ ≤ Real.exp (D * A) := Real.exp_le_exp.mpr hlogZA + have hgamma : + (Nat.ceil (s.re / 2) : ℝ) ^ Nat.ceil (s.re / 2) ≤ + Real.exp A := by + exact ceilPow_le_exp_orderMajorant (x := s.re / 2) (r := r) + (by linarith) (by + dsimp [r] + linarith) hr + calc + ‖riemannXiLi s‖ ≤ + r * (r + 1) * + ((Nat.ceil (s.re / 2) : ℝ) ^ Nat.ceil (s.re / 2)) * Z := by + apply (norm_riemannXiLi_le_farRight hs).trans + dsimp [r, Z] + gcongr + exact norm_sub_le s 1 |>.trans_eq (by simp) + _ ≤ Real.exp (3 * A) * Real.exp A * Real.exp (D * A) := by + gcongr + _ = Real.exp ((D + 4) * r * Real.log (r + 2)) := by + rw [← Real.exp_add, ← Real.exp_add] + dsimp [A] + ring_nf + +/-- Any nonnegative quadratic strip estimate is absorbed by an +order-one exponential majorant outside a fixed disk. -/ +theorem exists_exp_orderBound_of_quadratic (C : ℝ) (hC : 0 ≤ C) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ r : ℝ, 4 ≤ r → + 1 + r * (r + 1) * C ≤ + Real.exp (D * r * Real.log (r + 2)) := by + let L := Real.log 2 + have hL : 0 < L := Real.log_pos (by norm_num) + let E := Real.log (C + 1) / L + have hlogC0 : 0 ≤ Real.log (C + 1) := + Real.log_nonneg (by linarith) + have hE0 : 0 ≤ E := div_nonneg hlogC0 hL.le + refine ⟨E + 4, by positivity, ?_⟩ + intro r hr + let A := r * Real.log (r + 2) + have hrpos : 0 < r := by linarith + have hlog0 : 0 ≤ Real.log (r + 2) := + Real.log_nonneg (by linarith) + have hlogr : Real.log r ≤ A := by + have hle := Real.log_le_log hrpos (show r ≤ r + 2 by linarith) + exact hle.trans (by + calc + Real.log (r + 2) ≤ r * Real.log (r + 2) := by nlinarith + _ = A := rfl) + have hrExp : r ≤ Real.exp A := by + rw [← Real.exp_log hrpos] + exact Real.exp_le_exp.mpr hlogr + have hr1 : r + 1 ≤ r ^ 2 := by nlinarith + have hr1pow : (r + 1) ^ 2 ≤ Real.exp (4 * A) := by + calc + (r + 1) ^ 2 ≤ (r ^ 2) ^ 2 := + (sq_le_sq₀ (by linarith) (sq_nonneg r)).mpr hr1 + _ ≤ ((Real.exp A) ^ 2) ^ 2 := by + gcongr + _ = Real.exp (4 * A) := by + rw [pow_two, pow_two, ← Real.exp_add, ← Real.exp_add] + ring_nf + have hLA : L ≤ A := by + have hlog2 : L ≤ Real.log (r + 2) := + Real.log_le_log (by norm_num) (by linarith) + exact hlog2.trans (by + calc + Real.log (r + 2) ≤ r * Real.log (r + 2) := by nlinarith + _ = A := rfl) + have hlogCA : Real.log (C + 1) ≤ E * A := by + calc + Real.log (C + 1) = E * L := by + dsimp [E] + field_simp + _ ≤ E * A := mul_le_mul_of_nonneg_left hLA hE0 + have hCexp : C + 1 ≤ Real.exp (E * A) := by + rw [← Real.exp_log (by linarith : 0 < C + 1)] + exact Real.exp_le_exp.mpr hlogCA + calc + 1 + r * (r + 1) * C ≤ (C + 1) * (r + 1) ^ 2 := by + nlinarith [sq_nonneg (r + 1)] + _ ≤ Real.exp (E * A) * Real.exp (4 * A) := by gcongr + _ = Real.exp ((E + 4) * r * Real.log (r + 2)) := by + rw [← Real.exp_add] + dsimp [A] + ring_nf + +/-- The regional estimates give an order-one bound on the right half-plane, +including the transition through the central strip. -/ +theorem exists_riemannXiLi_orderBound_rightHalfPlane : + ∃ C : ℝ, 0 ≤ C ∧ ∀ s : ℂ, 1 / 2 ≤ s.re → 4 ≤ ‖s‖ → + ‖riemannXiLi s‖ ≤ + Real.exp (C * ‖s‖ * Real.log (‖s‖ + 2)) := by + obtain ⟨Cf, hCf0, hfar⟩ := exists_riemannXiLi_orderBound_farRight + obtain ⟨Cs, hCs0, hstrip⟩ := + exists_norm_riemannXiLi_le_on_verticalStrip (1 / 2) 4 + obtain ⟨D, hD0, hquad⟩ := + exists_exp_orderBound_of_quadratic Cs hCs0 + let C := max Cf D + refine ⟨C, hCf0.trans (le_max_left _ _), ?_⟩ + intro s hre hr + let A := ‖s‖ * Real.log (‖s‖ + 2) + have hA0 : 0 ≤ A := mul_nonneg (norm_nonneg _) + (Real.log_nonneg (by linarith [norm_nonneg s])) + by_cases hs4 : 4 ≤ s.re + · exact (hfar s hs4).trans (Real.exp_le_exp.mpr <| by + calc + Cf * ‖s‖ * Real.log (‖s‖ + 2) = Cf * A := by + dsimp [A] + ring + _ ≤ C * A := mul_le_mul_of_nonneg_right (le_max_left _ _) hA0 + _ = C * ‖s‖ * Real.log (‖s‖ + 2) := by + dsimp [A] + ring) + · have hraw := hstrip s hre (le_of_not_ge hs4) + have hnormsub : ‖s - 1‖ ≤ ‖s‖ + 1 := by + simpa using norm_sub_le s 1 + have hadjust : + 1 + ‖s‖ * ‖s - 1‖ * Cs ≤ + 1 + ‖s‖ * (‖s‖ + 1) * Cs := by gcongr + exact hraw.trans <| hadjust.trans <| (hquad ‖s‖ hr).trans <| + Real.exp_le_exp.mpr (by + calc + D * ‖s‖ * Real.log (‖s‖ + 2) = D * A := by + dsimp [A] + ring + _ ≤ C * A := mul_le_mul_of_nonneg_right (le_max_right _ _) hA0 + _ = C * ‖s‖ * Real.log (‖s‖ + 2) := by + dsimp [A] + ring) + +/-- The normalized xi function satisfies the source-standard global +order-at-most-one growth bound. -/ +theorem riemannXi_orderOneGrowthBound : + RiemannXiOrderOneGrowthBound := by + obtain ⟨C, hC0, hright⟩ := + exists_riemannXiLi_orderBound_rightHalfPlane + refine ⟨3 * C, 5, by positivity, by norm_num, ?_⟩ + intro s hs + let r := ‖s‖ + let A := r * Real.log (r + 2) + have hr : 5 ≤ r := hs + have hlog0 : 0 ≤ Real.log (r + 2) := + Real.log_nonneg (by linarith) + have hA0 : 0 ≤ A := mul_nonneg (norm_nonneg _) hlog0 + by_cases hre : 1 / 2 ≤ s.re + · exact (hright s hre (by linarith)).trans (Real.exp_le_exp.mpr <| by + have hbase : 0 ≤ C * ‖s‖ * Real.log (‖s‖ + 2) := + mul_nonneg (mul_nonneg hC0 (norm_nonneg s)) + (Real.log_nonneg (by linarith [norm_nonneg s])) + nlinarith) + · let t := 1 - s + have htRe : 1 / 2 ≤ t.re := by + change 1 / 2 ≤ (1 - s).re + simp only [sub_re, one_re] + linarith + have htrLower : r - 1 ≤ ‖t‖ := by + have h := norm_sub_le t 1 + have hts : t - 1 = -s := by dsimp [t]; ring + rw [hts, norm_neg] at h + norm_num at h + linarith + have ht4 : 4 ≤ ‖t‖ := by linarith + have htUpper : ‖t‖ ≤ r + 1 := by + dsimp [t, r] + simpa [norm_neg, sub_eq_add_neg, add_comm] using norm_sub_le 1 s + have htpos : 0 < ‖t‖ + 2 := by positivity + have harg : ‖t‖ + 2 ≤ (r + 2) ^ 2 := by + nlinarith [sq_nonneg (r + 2)] + have hlogt : Real.log (‖t‖ + 2) ≤ 2 * Real.log (r + 2) := by + calc + Real.log (‖t‖ + 2) ≤ Real.log ((r + 2) ^ 2) := + Real.log_le_log htpos harg + _ = 2 * Real.log (r + 2) := by + rw [Real.log_pow] + norm_num + have htA : + ‖t‖ * Real.log (‖t‖ + 2) ≤ 3 * A := by + have hlogt0 : 0 ≤ Real.log (‖t‖ + 2) := + Real.log_nonneg (by linarith [norm_nonneg t]) + calc + ‖t‖ * Real.log (‖t‖ + 2) + ≤ (r + 1) * (2 * Real.log (r + 2)) := by gcongr + _ ≤ 3 * A := by + dsimp [A] + nlinarith + rw [← riemannXiLi_one_sub s] + exact (hright t htRe ht4).trans (Real.exp_le_exp.mpr <| by + calc + C * ‖t‖ * Real.log (‖t‖ + 2) + = C * (‖t‖ * Real.log (‖t‖ + 2)) := by ring + _ ≤ C * (3 * A) := mul_le_mul_of_nonneg_left htA hC0 + _ = 3 * C * r * Real.log (r + 2) := by + dsimp [A] + ring) + +/-- Jensen's formula and the global order-one bound give the expected +`O(r log r)` logarithmic zero count, with analytic multiplicities. This +is weaker than the `O(log r)` count in a unit-height shell supplied by +Riemann--von Mangoldt, but is sufficient after dyadic grouping. -/ +theorem exists_riemannXiZeroDivisor_logCounting_le_orderOne : + ∃ C R : ℝ, 0 ≤ C ∧ 2 ≤ R ∧ ∀ r : ℝ, R ≤ r → + Function.locallyFinsuppWithin.logCounting + riemannXiZeroDivisor r ≤ + C * r * Real.log (r + 2) := by + obtain ⟨C, R, hC, hR, hbound⟩ := + riemannXi_orderOneGrowthBound + refine ⟨C, R, hC, hR, ?_⟩ + intro r hr + rw [riemannXiZeroDivisor_logCounting_eq_circleAverage (by linarith)] + apply Real.circleAverage_mono_on_of_le_circle + · have hm : MeromorphicOn riemannXiLi + (Metric.sphere 0 |r|) := + fun z _ ↦ + (differentiable_riemannXiLi.analyticAt z).meromorphicAt + exact hm.circleIntegrable_log_norm + · intro z hz + have hr0 : 0 ≤ r := by linarith + have hzr : ‖z‖ = r := by + simpa [Metric.mem_sphere, dist_zero_right, + abs_of_nonneg hr0] using hz + have hnorm := hbound z (by rw [hzr]; exact hr) + rw [hzr] at hnorm + by_cases hzero : riemannXiLi z = 0 + · simp [hzero] + exact mul_nonneg (mul_nonneg hC (by linarith)) + (Real.log_nonneg (by linarith)) + · exact + (Real.log_le_iff_le_exp (norm_pos_iff.mpr hzero)).mpr hnorm + +/-- Jensen's weighted divisor estimate gives an explicit cumulative bound +for the canonical multiplicity index. The factor `1 / log 2` is the exact +cost of comparing the radius-`r` window with the logarithmic count at +radius `2r`. -/ +theorem exists_riemannXiZeroIndexWindow_card_le_orderOne : + ∃ A R : ℝ, 0 ≤ A ∧ 1 ≤ R ∧ ∀ r : ℝ, R ≤ r → + ((riemannXiZeroIndexWindow r).card : ℝ) ≤ + A * r * Real.log (2 * r + 2) := by + obtain ⟨C, R, hC, hR, hcount⟩ := + exists_riemannXiZeroDivisor_logCounting_le_orderOne + let R' := max 1 (R / 2) + let A := 2 * C / Real.log 2 + refine ⟨A, R', ?_, le_max_left _ _, ?_⟩ + · exact div_nonneg (mul_nonneg (by norm_num) hC) + (Real.log_nonneg (by norm_num)) + · intro r hr + have hr1 : 1 ≤ r := (le_max_left _ _).trans hr + have hR2r : R ≤ 2 * r := by + have := (le_max_right 1 (R / 2)).trans hr + linarith + have hweighted := + riemannXiZeroIndexWindow_card_mul_log_two_le_logCounting hr1 + have hupper := hcount (2 * r) hR2r + have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) + dsimp [A] + rw [show 2 * C / Real.log 2 * r * Real.log (2 * r + 2) = + (C * (2 * r) * Real.log (2 * r + 2)) / Real.log 2 by + field_simp] + exact (le_div_iff₀ hlog2).mpr (hweighted.trans hupper) + +/-- Actual pinned-Mathlib finite canonical decomposition instantiated for xi +on every disk. This is a finite Blaschke-style decomposition, not the +missing whole-plane genus-one Hadamard factorization. -/ +theorem riemannXiLi_exists_canonicalDecomp (R : ℝ) : + ∃ g : ℂ → ℂ, Complex.CanonicalDecomp riemannXiLi g R := by + have hxi : AnalyticOnNhd ℂ riemannXiLi Set.univ := + fun z _ ↦ differentiable_riemannXiLi.analyticAt z + apply MeromorphicOn.exists_canonicalDecomp + · exact fun z hz ↦ hxi.meromorphicOn z (Set.mem_univ z) + · intro u + rw [(differentiable_riemannXiLi.analyticAt u).meromorphicOrderAt_eq] + simpa [riemannXiZeroOrder] using riemannXiZeroOrder_ne_top u + +/-- A radius-cofinal family of Mathlib finite canonical decompositions. +No compatibility or normal convergence between the chosen remainders is +asserted. -/ +structure RiemannXiCanonicalDiskExhaustion where + remainder : ℕ → ℂ → ℂ + decomp : ∀ N, + Complex.CanonicalDecomp riemannXiLi (remainder N) (N + 1) + +theorem exists_riemannXiCanonicalDiskExhaustion : + Nonempty RiemannXiCanonicalDiskExhaustion := by + choose g hg using fun N : ℕ ↦ + riemannXiLi_exists_canonicalDecomp (N + 1) + exact ⟨⟨g, hg⟩⟩ + +/-- In the positive-real half-plane away from `0,1`, xi and zeta have the +same zeros. -/ +theorem riemannXiLi_eq_zero_iff_riemannZeta_eq_zero {rho : ℂ} + (h0 : rho ≠ 0) (h1 : rho ≠ 1) (hre : 0 < rho.re) : + riemannXiLi rho = 0 ↔ riemannZeta rho = 0 := by + rw [riemannXiLi_eq_mul_completedRiemannZeta h0 h1, + riemannZeta_def_of_ne_zero h0] + have hgamma : Gammaℝ rho ≠ 0 := Gammaℝ_ne_zero_of_re_pos hre + constructor + · intro h + have hcomp : completedRiemannZeta rho = 0 := by + rcases mul_eq_zero.mp h with hpre | hcomp + · exact False.elim ((mul_ne_zero h0 (sub_ne_zero.mpr h1)) hpre) + · exact hcomp + simp [hcomp] + · intro h + have hcomp : completedRiemannZeta rho = 0 := + (div_eq_zero_iff.mp h).resolve_right hgamma + simp [hcomp] + +/-- Every xi zero lies in the open critical strip. The right boundary uses +Mathlib's zeta nonvanishing theorem on `re s ≥ 1`; the left boundary follows +by the xi functional equation. -/ +theorem riemannXiLi_zero_re_lt_one {rho : ℂ} + (hzero : riemannXiLi rho = 0) : rho.re < 1 := by + by_contra h + have hre : 1 ≤ rho.re := le_of_not_gt h + have h0 : rho ≠ 0 := by + intro hr + subst rho + simp at hzero + have h1 : rho ≠ 1 := by + intro hr + subst rho + simp at hzero + have hzeta : riemannZeta rho = 0 := + (riemannXiLi_eq_zero_iff_riemannZeta_eq_zero h0 h1 + (lt_of_lt_of_le (by norm_num) hre)).mp hzero + exact riemannZeta_ne_zero_of_one_le_re hre hzeta + +theorem riemannXiLi_zero_re_pos {rho : ℂ} + (hzero : riemannXiLi rho = 0) : 0 < rho.re := by + by_contra h + have hre : rho.re ≤ 0 := le_of_not_gt h + have hrefzero : riemannXiLi (1 - rho) = 0 := by + rw [riemannXiLi_one_sub] + exact hzero + have href := riemannXiLi_zero_re_lt_one hrefzero + simp only [sub_re, one_re] at href + linarith + +theorem riemannXiZeroRoot_mem_openCriticalStrip + (i : RiemannXiZeroIndex) : + 0 < (riemannXiZeroRoot i).re ∧ + (riemannXiZeroRoot i).re < 1 := + ⟨riemannXiLi_zero_re_pos i.1.property, + riemannXiLi_zero_re_lt_one i.1.property⟩ + +theorem riemannXiZeroRoot_norm_le_one_add_abs_im + (i : RiemannXiZeroIndex) : + ‖riemannXiZeroRoot i‖ ≤ + 1 + |(riemannXiZeroRoot i).im| := by + calc + ‖riemannXiZeroRoot i‖ ≤ + |(riemannXiZeroRoot i).re| + + |(riemannXiZeroRoot i).im| := + Complex.norm_le_abs_re_add_abs_im _ + _ ≤ 1 + |(riemannXiZeroRoot i).im| := by + gcongr + rw [abs_of_pos (riemannXiZeroRoot_mem_openCriticalStrip i).1] + exact (riemannXiZeroRoot_mem_openCriticalStrip i).2.le + +/-- Finite xi windows cut out by imaginary height. The critical-strip bound +embeds this set in a finite radial window. -/ +noncomputable def riemannXiZeroHeightWindow + (T : ℝ) : Finset RiemannXiZeroIndex := + (riemannXiZeroIndexWindow (|T| + 1)).filter + fun i ↦ |(riemannXiZeroRoot i).im| ≤ T + +@[simp] theorem mem_riemannXiZeroHeightWindow + (T : ℝ) (i : RiemannXiZeroIndex) : + i ∈ riemannXiZeroHeightWindow T ↔ + |(riemannXiZeroRoot i).im| ≤ T := by + constructor + · intro hi + exact (Finset.mem_filter.mp hi).2 + · intro hi + apply Finset.mem_filter.mpr + refine ⟨?_, hi⟩ + rw [mem_riemannXiZeroIndexWindow] + have hT : 0 ≤ T := (abs_nonneg _).trans hi + calc + ‖riemannXiZeroRoot i‖ ≤ + 1 + |(riemannXiZeroRoot i).im| := + riemannXiZeroRoot_norm_le_one_add_abs_im i + _ ≤ 1 + T := by linarith + _ = |T| + 1 := by rw [abs_of_nonneg hT]; ring + +theorem mem_riemannXiZeroHeightWindow_reflection + (T : ℝ) (i : RiemannXiZeroIndex) : + riemannXiZeroReflection i ∈ riemannXiZeroHeightWindow T ↔ + i ∈ riemannXiZeroHeightWindow T := by + simp only [mem_riemannXiZeroHeightWindow, + riemannXiZeroRoot_reflection, sub_im, one_im, zero_sub, abs_neg] + +/-- Reflection permutes each finite height window exactly, including every +multiplicity occurrence. -/ +theorem riemannXiZeroHeightWindow_map_reflection (T : ℝ) : + (riemannXiZeroHeightWindow T).map + riemannXiZeroReflectionEmbedding = + riemannXiZeroHeightWindow T := by + apply Finset.eq_of_subset_of_card_le + · intro j hj + simp only [Finset.mem_map] at hj + obtain ⟨i, hi, rfl⟩ := hj + exact (mem_riemannXiZeroHeightWindow_reflection T i).mpr hi + · simp [riemannXiZeroReflectionEmbedding] + +/-- Exact finite paired inverse-root identity on every height window. -/ +theorem two_mul_sum_inv_riemannXiZeroHeightWindow (T : ℝ) : + 2 * (∑ i ∈ riemannXiZeroHeightWindow T, + (riemannXiZeroRoot i)⁻¹) = + ∑ i ∈ riemannXiZeroHeightWindow T, + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹ := by + have href : + (∑ i ∈ riemannXiZeroHeightWindow T, + (riemannXiZeroRoot (riemannXiZeroReflection i))⁻¹) = + ∑ i ∈ riemannXiZeroHeightWindow T, + (riemannXiZeroRoot i)⁻¹ := by + calc + _ = ∑ j ∈ (riemannXiZeroHeightWindow T).map + riemannXiZeroReflectionEmbedding, + (riemannXiZeroRoot j)⁻¹ := by + rw [Finset.sum_map] + rfl + _ = _ := by rw [riemannXiZeroHeightWindow_map_reflection] + rw [show (2 : ℂ) * (∑ i ∈ riemannXiZeroHeightWindow T, + (riemannXiZeroRoot i)⁻¹) = + (∑ i ∈ riemannXiZeroHeightWindow T, + (riemannXiZeroRoot i)⁻¹) + + ∑ i ∈ riemannXiZeroHeightWindow T, + (riemannXiZeroRoot (riemannXiZeroReflection i))⁻¹ by + rw [href]; ring] + rw [← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro i hi + exact riemannXiZeroRoot_inv_add_reflection i + +theorem riemannXiZeroIndexWindow_subset_heightWindow (R : ℝ) : + riemannXiZeroIndexWindow R ⊆ riemannXiZeroHeightWindow R := by + intro i hi + rw [mem_riemannXiZeroHeightWindow] + exact (abs_im_le_norm _).trans + ((mem_riemannXiZeroIndexWindow R i).mp hi) + +theorem riemannXiZeroHeightWindow_subset_indexWindow (T : ℝ) : + riemannXiZeroHeightWindow T ⊆ + riemannXiZeroIndexWindow (T + 1) := by + intro i hi + rw [mem_riemannXiZeroIndexWindow] + exact (riemannXiZeroRoot_norm_le_one_add_abs_im i).trans + (by linarith [(mem_riemannXiZeroHeightWindow T i).mp hi]) + +theorem riemannXiZeroHeightWindow_nat_tendsto_atTop : + Tendsto (fun N : ℕ ↦ riemannXiZeroHeightWindow (N : ℝ)) + atTop atTop := by + apply tendsto_atTop.2 + intro F + let T : ℝ := ∑ i ∈ F, |(riemannXiZeroRoot i).im| + obtain ⟨n, hn⟩ := exists_nat_ge T + filter_upwards [eventually_ge_atTop n] with N hN + intro i hi + rw [mem_riemannXiZeroHeightWindow] + calc + |(riemannXiZeroRoot i).im| ≤ T := by + dsimp [T] + exact Finset.single_le_sum + (s := F) (f := fun j ↦ |(riemannXiZeroRoot j).im|) + (fun j _ ↦ abs_nonneg _) hi + _ ≤ n := hn + _ ≤ N := by exact_mod_cast hN + +theorem analyticAt_log_riemannXiLi_one : + AnalyticAt ℂ (fun s ↦ Complex.log (riemannXiLi s)) 1 := + (differentiable_riemannXiLi.analyticAt 1).clog (by simp) + +/-- The source-standard derivative expression for the `n`th Li coefficient. + +The standard sequence starts at `n = 1`. We totalize it at `0` by setting +that value to zero. For positive `n` this is +`1 / (n - 1)! * d^n/ds^n (s^(n-1) log(xi(s)))` at `s = 1`. +-/ +def liDerivativeCoefficient (xi : ℂ → ℂ) (n : ℕ) : ℂ := + if n = 0 then 0 + else + iteratedDeriv n (fun s ↦ s ^ (n - 1) * Complex.log (xi s)) 1 / + ((n - 1).factorial : ℂ) + +/-- The concrete real sequence extracted from the derivative formula. + +Taking the real part makes the target type appropriate for positivity. +The obligation that the complex derivative is actually real is kept explicit +below rather than silently assumed. +-/ +def riemannLiCoefficient (n : ℕ) : ℝ := + (liDerivativeCoefficient riemannXiLi n).re + +@[simp] theorem liDerivativeCoefficient_zero (xi : ℂ → ℂ) : + liDerivativeCoefficient xi 0 = 0 := by + simp [liDerivativeCoefficient] + +@[simp] theorem riemannLiCoefficient_zero : riemannLiCoefficient 0 = 0 := by + simp [riemannLiCoefficient] + +theorem liDerivativeCoefficient_one (xi : ℂ → ℂ) : + liDerivativeCoefficient xi 1 = + deriv (fun s ↦ Complex.log (xi s)) 1 := by + simp [liDerivativeCoefficient] + +/-- The Möbius change of variables whose logarithmic derivative generates +Li coefficients. -/ +def liMobiusArgument (z : ℂ) : ℂ := (1 - z)⁻¹ + +def liChangeOfVariables (xi : ℂ → ℂ) (z : ℂ) : ℂ := + xi ((1 - z)⁻¹) + +/-- Closed all-order derivative formula for the Möbius map used in Li's +change of variables, valid at every point (with totalized inverse powers). -/ +theorem iteratedDeriv_one_sub_inv (k : ℕ) (z : ℂ) : + iteratedDeriv k (fun w : ℂ ↦ (1 - w)⁻¹) z = + (k.factorial : ℂ) * (1 - z) ^ (-(k + 1 : ℤ)) := by + have h : (fun w : ℂ ↦ (1 - w)⁻¹) = + fun w ↦ ((-1 : ℂ) * w + 1)⁻¹ := by + funext w + congr 1 + ring + rw [h, iteratedDeriv_eq_iterate, iter_deriv_inv_linear] + rw [neg_pow] + ring_nf + simp [show k * 2 = 2 * k by omega, pow_mul] + +@[simp] theorem iteratedDeriv_one_sub_inv_zero (k : ℕ) : + iteratedDeriv k (fun z : ℂ ↦ (1 - z)⁻¹) 0 = + (k.factorial : ℂ) := by + rw [iteratedDeriv_one_sub_inv] + simp + +/-- Scalar iterated derivatives of a complex analytic germ remain +differentiable. This bridges Mathlib's analytic `iteratedFDeriv` API to the +one-variable recurrence needed by the Li composition formula. -/ +theorem AnalyticAt.differentiableAt_iteratedDeriv + {L : ℂ → ℂ} {x : ℂ} (hL : AnalyticAt ℂ L x) (m : ℕ) : + DifferentiableAt ℂ (iteratedDeriv m L) x := by + have hF : AnalyticAt ℂ (iteratedFDeriv ℂ m L) x := by + have hN : AnalyticOnNhd ℂ L {x} := fun y hy ↦ by + simp only [Set.mem_singleton_iff] at hy + subst y + exact hL + exact hN.iteratedFDeriv m x (by simp) + rw [iteratedDeriv_eq_equiv_comp] + fun_prop + +/-- Exact product/chain-rule step for one term in the specialized Möbius +Faà di Bruno sum. The first term raises the Möbius power by one; the +second raises it by two and advances the outer derivative. -/ +theorem hasDerivAt_mobiusFaaDiBrunoSummand + {L : ℂ → ℂ} {z : ℂ} (hz : z ≠ 1) + (hL : AnalyticAt ℂ L ((1 - z)⁻¹)) (p m : ℕ) : + HasDerivAt + (fun w ↦ (1 - w)⁻¹ ^ p * + iteratedDeriv m L ((1 - w)⁻¹)) + (p * ((1 - z)⁻¹ ^ (p + 1) * + iteratedDeriv m L ((1 - z)⁻¹)) + + (1 - z)⁻¹ ^ (p + 2) * + iteratedDeriv (m + 1) L ((1 - z)⁻¹)) z := by + let φ : ℂ → ℂ := fun w ↦ (1 - w)⁻¹ + change HasDerivAt + (fun w ↦ φ w ^ p * iteratedDeriv m L (φ w)) + (p * (φ z ^ (p + 1) * iteratedDeriv m L (φ z)) + + φ z ^ (p + 2) * iteratedDeriv (m + 1) L (φ z)) z + have hφ : HasDerivAt φ (φ z ^ 2) z := by + have hbase : HasDerivAt (fun w : ℂ ↦ 1 - w) (-1) z := by + simpa [sub_eq_add_neg] using (hasDerivAt_id z).neg.const_add 1 + have hne : 1 - z ≠ 0 := sub_ne_zero.mpr hz.symm + dsimp only [φ] + exact (hbase.fun_inv hne).congr_deriv (by + rw [pow_two] + field_simp) + have hm : HasDerivAt (iteratedDeriv m L) + (iteratedDeriv (m + 1) L (φ z)) (φ z) := by + rw [iteratedDeriv_succ] + exact (hL.differentiableAt_iteratedDeriv m).hasDerivAt + have h := (hφ.pow p).mul (hm.comp z hφ) + change HasDerivAt + (fun w ↦ φ w ^ p * iteratedDeriv m L (φ w)) + (↑p * φ z ^ (p - 1) * φ z ^ 2 * iteratedDeriv m L (φ z) + + φ z ^ p * (iteratedDeriv (m + 1) L (φ z) * φ z ^ 2)) z at h + exact h.congr_deriv (by + cases p with + | zero => simp; ring + | succ p => + simp only [Nat.cast_add, Nat.cast_one, Nat.succ_sub_one, pow_succ] + ring) + +/-- Differentiating the complete finite specialized sum is termwise valid. +The two displayed summands are exactly the unshifted chain contribution and +the shifted product contribution that must be reindexed in the triangular +recurrence. -/ +theorem hasDerivAt_mobiusFaaDiBrunoSum + {L : ℂ → ℂ} {z : ℂ} (hz : z ≠ 1) + (hL : AnalyticAt ℂ L ((1 - z)⁻¹)) (c : ℕ → ℂ) (k : ℕ) : + HasDerivAt + (∑ i ∈ Finset.range (k + 2), fun w ↦ + c i * ((1 - w)⁻¹ ^ (2 * k + 2 - i) * + iteratedDeriv (k + 1 - i) L ((1 - w)⁻¹))) + (∑ i ∈ Finset.range (k + 2), + c i * (((2 * k + 2 - i : ℕ) : ℂ) * + ((1 - z)⁻¹ ^ (2 * k + 3 - i) * + iteratedDeriv (k + 1 - i) L ((1 - z)⁻¹)) + + (1 - z)⁻¹ ^ (2 * k + 4 - i) * + iteratedDeriv (k + 2 - i) L ((1 - z)⁻¹))) z := by + apply HasDerivAt.sum + intro i hi + have hi' : i < k + 2 := Finset.mem_range.mp hi + have hterm := (hasDerivAt_mobiusFaaDiBrunoSummand hz hL + (2 * k + 2 - i) (k + 1 - i)).const_mul (c i) + apply hterm.congr_deriv + congr 4 <;> grind + +/-- Exact finite index shift for the two differentiated contributions. +The support assumption removes both artificial top-boundary terms. The +right side displays the triangular coefficient update before specializing +to the closed Möbius coefficients. -/ +theorem mobiusFaaDiBrunoSum_reindex + (k : ℕ) (c : ℕ → ℂ) (B : ℕ → ℂ) + (hc : ∀ i, k < i → c i = 0) : + (∑ i ∈ Finset.range (k + 2), + c i * (((2 * k + 2 - i : ℕ) : ℂ) * B (i + 1) + B i)) = + ∑ j ∈ Finset.range (k + 3), + (c j + if j = 0 then 0 else + ((2 * k + 3 - j : ℕ) : ℂ) * c (j - 1)) * B j := by + have hfirst : + (∑ i ∈ Finset.range (k + 2), + c i * (((2 * k + 2 - i : ℕ) : ℂ) * B (i + 1))) = + ∑ i ∈ Finset.range (k + 2), + (((2 * k + 2 - i : ℕ) : ℂ) * c i) * B (i + 1) := by + apply Finset.sum_congr rfl + intro i hi + ring + have hsecond : + (∑ i ∈ Finset.range (k + 2), c i * B i) = + (∑ i ∈ Finset.range (k + 2), c (i + 1) * B (i + 1)) + + c 0 * B 0 := by + rw [Finset.sum_range_succ'] + congr 1 + symm + rw [Finset.sum_range_succ] + simp [hc (k + 2) (by omega)] + have hq : + (∑ i ∈ Finset.range (k + 2), + (((2 * k + 2 - i : ℕ) : ℂ) * c i) * B (i + 1)) = + ∑ i ∈ Finset.range (k + 2), + (if i + 1 = 0 then 0 else + ((2 * k + 3 - (i + 1) : ℕ) : ℂ) * c (i + 1 - 1)) * + B (i + 1) := by + apply Finset.sum_congr rfl + intro i hi + have hi' : i < k + 2 := Finset.mem_range.mp hi + simp only [Nat.add_eq_zero_iff, one_ne_zero, and_false, if_false, + Nat.add_sub_cancel] + have he : 2 * k + 3 - (i + 1) = 2 * k + 2 - i := by grind + rw [he] + conv_rhs => rw [Finset.sum_range_succ'] + simp_rw [add_mul] + rw [Finset.sum_add_distrib] + simp_rw [mul_add] + rw [Finset.sum_add_distrib, hfirst, hsecond] + simp only [Nat.add_one] + rw [hq] + simp + ring + +/-- The exact all-order xi coefficient obligation. Its first coefficient is +proved below; higher orders require the source-standard Möbius +change-of-variables/Faà di Bruno identity. -/ +def LiChangeOfVariablesCoefficientIdentity (xi : ℂ → ℂ) : Prop := + ∀ k : ℕ, + iteratedDeriv k (logDeriv (liChangeOfVariables xi)) 0 / + (k.factorial : ℂ) = liDerivativeCoefficient xi (k + 1) + +/-- Exact all-order Leibniz expansion of Li's derivative definition. This +removes all ambiguity from the `s^(n-1) log xi(s)` side of the remaining +Möbius/Faà di Bruno identity. -/ +theorem liDerivativeCoefficient_eq_leibnizSum + (xi : ℂ → ℂ) (n : ℕ) (hn : 0 < n) + (hL : ContDiffAt ℂ n (fun s ↦ Complex.log (xi s)) 1) : + liDerivativeCoefficient xi n = + (∑ i ∈ Finset.range (n + 1), + (n.choose i : ℂ) * + ((n - 1).descFactorial i : ℂ) * + iteratedDeriv (n - i) (fun s ↦ Complex.log (xi s)) 1) / + ((n - 1).factorial : ℂ) := by + rw [liDerivativeCoefficient, if_neg hn.ne'] + change iteratedDeriv n + ((fun s : ℂ ↦ s ^ (n - 1)) * + (fun s ↦ Complex.log (xi s))) 1 / + ((n - 1).factorial : ℂ) = _ + rw [iteratedDeriv_mul (by fun_prop) hL] + simp_rw [iteratedDeriv_pow] + simp only [one_pow, mul_one] + +/-- The remaining pure all-order composition formula, displayed as an +explicit finite descending-factorial sum rather than hidden behind the Li +coefficient definition. -/ +def MobiusFaaDiBrunoCoefficientIdentity (xi : ℂ → ℂ) : Prop := + ∀ k : ℕ, + iteratedDeriv k (logDeriv (liChangeOfVariables xi)) 0 / + (k.factorial : ℂ) = + (∑ i ∈ Finset.range (k + 2), + ((k + 1).choose i : ℂ) * + (k.descFactorial i : ℂ) * + iteratedDeriv (k + 1 - i) + (fun s ↦ Complex.log (xi s)) 1) / + (k.factorial : ℂ) + +/-- Closed specialized Faà di Bruno coefficient for the Möbius map. -/ +def mobiusFaaDiBrunoCoefficient (k i : ℕ) : ℕ := + (k + 1).choose i * k.descFactorial i + +/-- Pascal's identity and the adjacent-binomial identity give the exact +two-term recurrence produced by differentiating the specialized composition. +The `i=0` branch records the boundary term explicitly. -/ +theorem mobiusFaaDiBrunoCoefficient_succ (k i : ℕ) (hi : i ≤ k + 1) : + mobiusFaaDiBrunoCoefficient (k + 1) i = + mobiusFaaDiBrunoCoefficient k i + + (if i = 0 then 0 else + (2 * k + 3 - i) * mobiusFaaDiBrunoCoefficient k (i - 1)) := by + unfold mobiusFaaDiBrunoCoefficient + cases i with + | zero => simp + | succ i => + simp only [Nat.succ_ne_zero, ↓reduceIte, Nat.succ_sub_one] + rw [Nat.choose, Nat.succ_descFactorial_succ, + Nat.descFactorial_succ] + have hi' : i ≤ k := by omega + have hadj := Nat.choose_succ_right_eq (k + 1) i + have hsub1 : k + 1 - i = k - i + 1 := by omega + have hsub2 : 2 * k + 3 - (i + 1) = 2 * k + 2 - i := by omega + rw [hsub1] at hadj + rw [hsub2] + let A := (k + 1).choose i + let B := (k + 1).choose (i + 1) + let D := k.descFactorial i + change (A + B) * ((k + 1) * D) = + B * ((k - i) * D) + (2 * k + 2 - i) * (A * D) + change B * (i + 1) = A * (k - i + 1) at hadj + have hk : k + 1 = (k - i) + (i + 1) := by omega + have hc : 2 * k + 2 - i = (k + 1) + (k - i + 1) := by omega + rw [hc, hk] + have hadjD := congrArg (fun x : ℕ ↦ x * D) hadj + ring_nf at hadjD ⊢ + omega + +/-- Specializing the generic index shift to the closed Möbius coefficients +collects the differentiated sum into the next row exactly. The apparent +top index is zero by falling-factorial support. -/ +theorem mobiusFaaDiBrunoCoefficientSum_reindex + (k : ℕ) (B : ℕ → ℂ) : + (∑ i ∈ Finset.range (k + 2), + (mobiusFaaDiBrunoCoefficient k i : ℂ) * + (((2 * k + 2 - i : ℕ) : ℂ) * B (i + 1) + B i)) = + ∑ j ∈ Finset.range (k + 3), + (mobiusFaaDiBrunoCoefficient (k + 1) j : ℂ) * B j := by + rw [mobiusFaaDiBrunoSum_reindex k + (fun i ↦ (mobiusFaaDiBrunoCoefficient k i : ℂ)) B + (by + intro i hi + simp [mobiusFaaDiBrunoCoefficient, + Nat.descFactorial_eq_zero_iff_lt.mpr hi])] + apply Finset.sum_congr rfl + intro j hj + have hjlt : j < k + 3 := Finset.mem_range.mp hj + by_cases hjle : j ≤ k + 1 + · have hr := mobiusFaaDiBrunoCoefficient_succ k j hjle + congr 1 + exact_mod_cast hr.symm + · have hj : j = k + 2 := by omega + subst j + simp [mobiusFaaDiBrunoCoefficient] + +/-- The `k`th specialized Möbius composition row as an actual function on +the local analytic domain. -/ +def mobiusFaaDiBrunoRow (L : ℂ → ℂ) (k : ℕ) : ℂ → ℂ := + ∑ i ∈ Finset.range (k + 2), fun z ↦ + (mobiusFaaDiBrunoCoefficient k i : ℂ) * + (liMobiusArgument z ^ (2 * k + 2 - i) * + iteratedDeriv (k + 1 - i) L (liMobiusArgument z)) + +/-- Local analytic induction for every specialized Möbius/Faà di Bruno row. +Analyticity is pulled back to a neighborhood at each step, so the induction +hypothesis may be differentiated rather than used only pointwise. -/ +theorem iteratedDeriv_mobiusComposition_eq_row + {L : ℂ → ℂ} {z : ℂ} (hz : z ≠ 1) + (hL : AnalyticAt ℂ L (liMobiusArgument z)) (k : ℕ) : + iteratedDeriv k + (fun w ↦ liMobiusArgument w ^ 2 * + iteratedDeriv 1 L (liMobiusArgument w)) z = + mobiusFaaDiBrunoRow L k z := by + induction k generalizing z with + | zero => + simp [mobiusFaaDiBrunoRow, mobiusFaaDiBrunoCoefficient, + Finset.sum_range_succ, iteratedDeriv_one] + | succ k ih => + have hφc : ContinuousAt liMobiusArgument z := by + unfold liMobiusArgument + exact (continuousAt_const.sub continuousAt_id).inv₀ + (sub_ne_zero.mpr hz.symm) + have hA : ∀ᶠ w in 𝓝 z, + AnalyticAt ℂ L (liMobiusArgument w) := + hφc.tendsto.eventually hL.eventually_analyticAt + have hne : ∀ᶠ w in 𝓝 z, w ≠ 1 := eventually_ne_nhds hz + have heq : iteratedDeriv k + (fun w ↦ liMobiusArgument w ^ 2 * + iteratedDeriv 1 L (liMobiusArgument w)) =ᶠ[𝓝 z] + mobiusFaaDiBrunoRow L k := by + filter_upwards [hne, hA] with w hw hAw + exact ih hw hAw + rw [iteratedDeriv_succ, heq.deriv_eq] + have hd := hasDerivAt_mobiusFaaDiBrunoSum hz hL + (fun i ↦ (mobiusFaaDiBrunoCoefficient k i : ℂ)) k + change HasDerivAt (mobiusFaaDiBrunoRow L k) + (∑ i ∈ Finset.range (k + 2), + (mobiusFaaDiBrunoCoefficient k i : ℂ) * + (((2 * k + 2 - i : ℕ) : ℂ) * + (liMobiusArgument z ^ (2 * k + 3 - i) * + iteratedDeriv (k + 1 - i) L (liMobiusArgument z)) + + liMobiusArgument z ^ (2 * k + 4 - i) * + iteratedDeriv (k + 2 - i) L + (liMobiusArgument z))) z at hd + change deriv (mobiusFaaDiBrunoRow L k) z = + mobiusFaaDiBrunoRow L (k + 1) z + rw [hd.deriv] + let B : ℕ → ℂ := fun j ↦ + liMobiusArgument z ^ (2 * k + 4 - j) * + iteratedDeriv (k + 2 - j) L (liMobiusArgument z) + rw [show mobiusFaaDiBrunoRow L (k + 1) z = + ∑ j ∈ Finset.range (k + 3), + (mobiusFaaDiBrunoCoefficient (k + 1) j : ℂ) * B j by + unfold mobiusFaaDiBrunoRow + simp only [Finset.sum_apply] + apply Finset.sum_congr rfl + intro j hj + dsimp only [B] + congr 4 <;> omega] + convert mobiusFaaDiBrunoCoefficientSum_reindex k B using 1 <;> + apply Finset.sum_congr rfl <;> intro i hi <;> + have hi' := Finset.mem_range.mp hi <;> + simp only [B] <;> congr 4 <;> grind + +/-- At the origin all Möbius powers become one, leaving exactly the finite +descending-factorial derivative sum used in the Li coefficient identity. -/ +theorem iteratedDeriv_mobiusComposition_zero + {L : ℂ → ℂ} (hL : AnalyticAt ℂ L 1) (k : ℕ) : + iteratedDeriv k + (fun w ↦ liMobiusArgument w ^ 2 * + iteratedDeriv 1 L (liMobiusArgument w)) 0 = + ∑ i ∈ Finset.range (k + 2), + (mobiusFaaDiBrunoCoefficient k i : ℂ) * + iteratedDeriv (k + 1 - i) L 1 := by + rw [iteratedDeriv_mobiusComposition_eq_row (by norm_num) (by simpa + [liMobiusArgument] using hL)] + unfold mobiusFaaDiBrunoRow + simp [liMobiusArgument, Finset.sum_apply] + +/-- Branch-compatible pointwise logarithmic chain rule for the Möbius +change of variables. Membership in the slit plane is the exact hypothesis +needed by Mathlib's principal `Complex.log`; it in particular implies local +nonvanishing. -/ +theorem logDeriv_liChangeOfVariables_eq_mobiusLogDerivative + {xi : ℂ → ℂ} {z : ℂ} (hz : z ≠ 1) + (hxi : DifferentiableAt ℂ xi (liMobiusArgument z)) + (hslit : xi (liMobiusArgument z) ∈ Complex.slitPlane) : + logDeriv (liChangeOfVariables xi) z = + liMobiusArgument z ^ 2 * + iteratedDeriv 1 (fun s ↦ Complex.log (xi s)) + (liMobiusArgument z) := by + have hbase : HasDerivAt (fun w : ℂ ↦ 1 - w) (-1) z := by + simpa [sub_eq_add_neg] using (hasDerivAt_id z).neg.const_add 1 + have hne : 1 - z ≠ 0 := sub_ne_zero.mpr hz.symm + have hφ : HasDerivAt liMobiusArgument + (liMobiusArgument z ^ 2) z := by + unfold liMobiusArgument + exact (hbase.fun_inv hne).congr_deriv (by + rw [pow_two] + field_simp) + have hcomp := hxi.hasDerivAt.comp z hφ + change HasDerivAt (liChangeOfVariables xi) + (deriv xi (liMobiusArgument z) * liMobiusArgument z ^ 2) z at hcomp + have hlog := hxi.hasDerivAt.clog hslit + have hlog' : iteratedDeriv 1 (fun s ↦ Complex.log (xi s)) + (liMobiusArgument z) = + deriv xi (liMobiusArgument z) / xi (liMobiusArgument z) := by + rw [iteratedDeriv_one] + exact hlog.deriv + rw [logDeriv_apply, hcomp.deriv, hlog'] + unfold liChangeOfVariables liMobiusArgument + ring + +/-- Since `xi(1)=1` lies in the principal logarithm domain, continuity gives +an entire neighborhood of the transformed origin on which xi is nonzero and +the logarithmic chain rule is branch-compatible. -/ +theorem eventually_logDeriv_liChangeOfVariables_riemannXiLi : + logDeriv (liChangeOfVariables riemannXiLi) =ᶠ[𝓝 0] + fun w ↦ liMobiusArgument w ^ 2 * + iteratedDeriv 1 (fun s ↦ Complex.log (riemannXiLi s)) + (liMobiusArgument w) := by + have hφc : ContinuousAt liMobiusArgument 0 := by + unfold liMobiusArgument + exact (continuousAt_const.sub continuousAt_id).inv₀ (by norm_num) + have hxic : ContinuousAt + (fun w ↦ riemannXiLi (liMobiusArgument w)) 0 := + differentiable_riemannXiLi.continuous.continuousAt.comp hφc + have hslit : ∀ᶠ w in 𝓝 0, + riemannXiLi (liMobiusArgument w) ∈ Complex.slitPlane := + hxic.tendsto.eventually (Complex.isOpen_slitPlane.mem_nhds (by + simp [liMobiusArgument])) + have hne : ∀ᶠ w in 𝓝 (0 : ℂ), w ≠ 1 := + eventually_ne_nhds (by norm_num) + filter_upwards [hne, hslit] with w hw hsw + exact logDeriv_liChangeOfVariables_eq_mobiusLogDerivative hw + (differentiable_riemannXiLi.differentiableAt) hsw + +/-- Unconditional all-order numerator identity for normalized xi. -/ +theorem iteratedDeriv_logDeriv_liChangeOfVariables_riemannXiLi + (k : ℕ) : + iteratedDeriv k (logDeriv (liChangeOfVariables riemannXiLi)) 0 = + ∑ i ∈ Finset.range (k + 2), + (mobiusFaaDiBrunoCoefficient k i : ℂ) * + iteratedDeriv (k + 1 - i) + (fun s ↦ Complex.log (riemannXiLi s)) 1 := by + rw [eventually_logDeriv_liChangeOfVariables_riemannXiLi.iteratedDeriv_eq k] + exact iteratedDeriv_mobiusComposition_zero + analyticAt_log_riemannXiLi_one k + +theorem riemannXiLi_mobiusFaaDiBrunoCoefficientIdentity : + MobiusFaaDiBrunoCoefficientIdentity riemannXiLi := by + intro k + rw [iteratedDeriv_logDeriv_liChangeOfVariables_riemannXiLi k] + simp only [mobiusFaaDiBrunoCoefficient, Nat.cast_mul] + +/-- The specialized coefficient recurrence, including base and support +conditions so that it characterizes the triangular coefficient array +uniquely. -/ +def IsMobiusFaaDiBrunoCoefficientRecurrence (c : ℕ → ℕ → ℕ) : Prop := + (∀ i, c 0 i = if i = 0 then 1 else 0) ∧ + (∀ k i, k < i → c k i = 0) ∧ + ∀ k i, i ≤ k + 1 → + c (k + 1) i = c k i + + (if i = 0 then 0 else (2 * k + 3 - i) * c k (i - 1)) + +theorem mobiusFaaDiBrunoCoefficient_recurrence : + IsMobiusFaaDiBrunoCoefficientRecurrence + mobiusFaaDiBrunoCoefficient := by + refine ⟨?_, ?_, mobiusFaaDiBrunoCoefficient_succ⟩ + · intro i + cases i <;> simp [mobiusFaaDiBrunoCoefficient] + · intro k i hki + simp [mobiusFaaDiBrunoCoefficient, + Nat.descFactorial_eq_zero_iff_lt.mpr hki] + +/-- The recurrence has at most one triangular coefficient array. Together +with `mobiusFaaDiBrunoCoefficient_recurrence`, this proves that any +coefficient construction obtained by iterating the chain/product rule equals +`choose(k+1,i) * descFactorial(k,i)` at every index and boundary. -/ +theorem IsMobiusFaaDiBrunoCoefficientRecurrence.eq + {c d : ℕ → ℕ → ℕ} + (hc : IsMobiusFaaDiBrunoCoefficientRecurrence c) + (hd : IsMobiusFaaDiBrunoCoefficientRecurrence d) : + c = d := by + funext k i + induction k generalizing i with + | zero => + rw [hc.1 i, hd.1 i] + | succ k ih => + by_cases hi : i ≤ k + 1 + · rw [hc.2.2 k i hi, hd.2.2 k i hi, ih i, ih (i - 1)] + · have hik : k + 1 < i := lt_of_not_ge hi + rw [hc.2.1 (k + 1) i hik, hd.2.1 (k + 1) i hik] + +/-- For normalized xi, the formerly opaque coefficient obligation is exactly +the displayed finite Möbius/Faà di Bruno sum. -/ +theorem riemannXiLi_changeOfVariablesCoefficientIdentity_iff_faaDiBruno : + LiChangeOfVariablesCoefficientIdentity riemannXiLi ↔ + MobiusFaaDiBrunoCoefficientIdentity riemannXiLi := by + constructor + · intro h k + rw [h k] + exact liDerivativeCoefficient_eq_leibnizSum + riemannXiLi (k + 1) (by omega) + analyticAt_log_riemannXiLi_one.contDiffAt + · intro h k + rw [h k] + exact (liDerivativeCoefficient_eq_leibnizSum + riemannXiLi (k + 1) (by omega) + analyticAt_log_riemannXiLi_one.contDiffAt).symm + +/-- The all-order xi Möbius coefficient transfer is unconditional. -/ +theorem riemannXiLi_changeOfVariablesCoefficientIdentity : + LiChangeOfVariablesCoefficientIdentity riemannXiLi := + riemannXiLi_changeOfVariablesCoefficientIdentity_iff_faaDiBruno.mpr + riemannXiLi_mobiusFaaDiBrunoCoefficientIdentity + +/-- The first xi change-of-variables coefficient is unconditional once xi is +differentiable and normalized to `xi 1 = 1`. -/ +theorem logDeriv_liChangeOfVariables_zero + (xi : ℂ → ℂ) (hxi : DifferentiableAt ℂ xi 1) (hxi1 : xi 1 = 1) : + logDeriv (liChangeOfVariables xi) 0 = + liDerivativeCoefficient xi 1 := by + rw [liDerivativeCoefficient_one, logDeriv_apply] + unfold liChangeOfVariables + have hinv : HasDerivAt (fun z : ℂ ↦ (1 - z)⁻¹) 1 0 := by + have hbase : HasDerivAt (fun z : ℂ ↦ 1 - z) (-1) 0 := by + simpa [sub_eq_add_neg] using + (hasDerivAt_id (x := (0 : ℂ))).neg.const_add 1 + simpa using hbase.fun_inv (by norm_num) + have hcomp : HasDerivAt + (fun z : ℂ ↦ xi ((1 - z)⁻¹)) (deriv xi 1) 0 := by + have hxi' : HasDerivAt xi (deriv xi 1) ((1 - (0 : ℂ))⁻¹) := by + simpa using hxi.hasDerivAt + simpa [Function.comp_def] using hxi'.comp (𝕜 := ℂ) 0 hinv + rw [hcomp.deriv] + rw [show (1 - (0 : ℂ))⁻¹ = 1 by norm_num, hxi1] + rw [(hxi.hasDerivAt.clog (by simp [hxi1])).deriv] + simp [hxi1] + +theorem LiChangeOfVariablesCoefficientIdentity.zero + {xi : ℂ → ℂ} (h : LiChangeOfVariablesCoefficientIdentity xi) : + logDeriv (liChangeOfVariables xi) 0 = + liDerivativeCoefficient xi 1 := by + simpa [LiChangeOfVariablesCoefficientIdentity] using h 0 + +/-- Mathlib's analytic order gives the intrinsic multiplicity of a zeta zero. + +The value lies in `ℕ∞`: finiteness still requires ruling out local identically +zero behavior. This definition does not enumerate the zeros and therefore +does not by itself provide the multiset needed by the symmetric Li sum. -/ +def riemannZetaZeroOrder (rho : ℂ) : ℕ∞ := + analyticOrderAt riemannZeta rho + +/-- Away from zeta's pole, nonzero analytic order is exactly membership in +Mathlib's set of zeta zeros. -/ +theorem riemannZetaZeroOrder_ne_zero_iff {rho : ℂ} (hρ : rho ≠ 1) : + riemannZetaZeroOrder rho ≠ 0 ↔ rho ∈ riemannZetaZeros := by + rw [riemannZetaZeroOrder, analyticOrderAt_ne_zero] + simp only [mem_riemannZetaZeros] + exact and_iff_right (analyticOn_riemannZeta rho hρ) + +/-- Zeta has finite analytic order at every point away from its pole. + +This closes the local multiplicity-finiteness part of zero enumeration. The +proof propagates finite order from `2`, where zeta is nonzero, through the +connected punctured plane using Mathlib's analytic-order identity theorem. -/ +theorem riemannZetaZeroOrder_ne_top {rho : ℂ} (hρ : rho ≠ 1) : + riemannZetaZeroOrder rho ≠ ⊤ := by + unfold riemannZetaZeroOrder + apply analyticOn_riemannZeta.analyticOrderAt_ne_top_of_isPreconnected + (x := (2 : ℂ)) (y := rho) + · exact (isConnected_compl_singleton_of_one_lt_rank (by simp) 1).isPreconnected + · simp + · simpa + · have h2 : riemannZeta (2 : ℂ) ≠ 0 := + riemannZeta_ne_zero_of_one_le_re (by norm_num) + rw [(analyticOn_riemannZeta (2 : ℂ) (by norm_num)).analyticOrderAt_eq_zero.mpr h2] + exact ENat.zero_ne_top + +/-- The finite natural multiplicity represented by zeta's analytic order. -/ +def riemannZetaZeroMultiplicity (rho : ℂ) : ℕ := + analyticOrderNatAt riemannZeta rho + +theorem riemannZetaZeroMultiplicity_cast {rho : ℂ} (hρ : rho ≠ 1) : + (riemannZetaZeroMultiplicity rho : ℕ∞) = riemannZetaZeroOrder rho := by + exact Nat.cast_analyticOrderNatAt (riemannZetaZeroOrder_ne_top hρ) + +/-- Xi and zeta zero multiplicities agree in the positive-real half-plane. +This covers the nontrivial critical strip and avoids Gamma's exceptional +totalized values. -/ +theorem riemannXiZeroOrder_eq_riemannZetaZeroOrder {rho : ℂ} + (h0 : rho ≠ 0) (h1 : rho ≠ 1) (hre : 0 < rho.re) : + riemannXiZeroOrder rho = riemannZetaZeroOrder rho := by + let p : ℂ → ℂ := fun s ↦ s * (s - 1) + let c : ℂ → ℂ := completedRiemannZeta + let gi : ℂ → ℂ := fun s ↦ (Gammaℝ s)⁻¹ + have hp : AnalyticAt ℂ p rho := by + dsimp [p] + fun_prop + have hc : AnalyticAt ℂ c rho := by + let U : Set ℂ := ({0} : Set ℂ)ᶜ ∩ ({1} : Set ℂ)ᶜ + have hUopen : IsOpen U := + isOpen_compl_singleton.inter isOpen_compl_singleton + have hrho : rho ∈ U := by simp [U, h0, h1] + apply DifferentiableOn.analyticAt (s := U) _ (hUopen.mem_nhds hrho) + intro z hz + apply (differentiableAt_completedZeta + (by simpa [U] using hz.1) + (by simpa [U] using hz.2)).differentiableWithinAt + have hgi : AnalyticAt ℂ gi rho := + differentiable_Gammaℝ_inv.analyticAt rho + have hp0 : p rho ≠ 0 := mul_ne_zero h0 (sub_ne_zero.mpr h1) + have hgi0 : gi rho ≠ 0 := inv_ne_zero (Gammaℝ_ne_zero_of_re_pos hre) + have hxieq : riemannXiLi =ᶠ[𝓝 rho] p * c := by + filter_upwards [ + isOpen_compl_singleton.mem_nhds h0, + isOpen_compl_singleton.mem_nhds h1] with s hs0 hs1 + simpa [p, c, Pi.mul_apply] using + riemannXiLi_eq_mul_completedRiemannZeta hs0 hs1 + have hzeq : riemannZeta =ᶠ[𝓝 rho] c * gi := by + filter_upwards [isOpen_compl_singleton.mem_nhds h0] with s hs0 + simpa [c, gi, Pi.mul_apply, div_eq_mul_inv] using + riemannZeta_def_of_ne_zero hs0 + unfold riemannXiZeroOrder riemannZetaZeroOrder + rw [analyticOrderAt_congr hxieq, analyticOrderAt_congr hzeq, + analyticOrderAt_mul hp hc, analyticOrderAt_mul hc hgi, + hp.analyticOrderAt_eq_zero.mpr hp0, + hgi.analyticOrderAt_eq_zero.mpr hgi0, zero_add, add_zero] + +theorem riemannXiZeroMultiplicity_eq_riemannZetaZeroMultiplicity + {rho : ℂ} (h0 : rho ≠ 0) (h1 : rho ≠ 1) (hre : 0 < rho.re) : + riemannXiZeroMultiplicity rho = + riemannZetaZeroMultiplicity rho := by + rw [← ENat.coe_inj, riemannXiZeroMultiplicity_cast, + riemannZetaZeroMultiplicity_cast h1, + riemannXiZeroOrder_eq_riemannZetaZeroOrder h0 h1 hre] + +/-- All zeta zeros in the closed norm ball of radius `R`. + +Mathlib proves that a compact set meets `riemannZetaZeros` in a finite set, +so this is an actual `Finset`, not an assumed enumeration. -/ +def riemannZetaZeroBall (R : ℝ) : Finset ℂ := + ((isCompact_closedBall (0 : ℂ) R).inter_riemannZetaZeros_finite).toFinset + +theorem mem_riemannZetaZeroBall {R : ℝ} {rho : ℂ} : + rho ∈ riemannZetaZeroBall R ↔ ‖rho‖ ≤ R ∧ riemannZeta rho = 0 := by + simp [riemannZetaZeroBall, Set.Finite.mem_toFinset, + Metric.mem_closedBall, mem_riemannZetaZeros] + +/-- A zeta zero is nontrivial when it is not one of the explicit negative +even zeros. The impossible pole value `rho = 1` is ruled out separately by +the zero equation whenever needed. -/ +def IsNontrivialRiemannZetaZero (rho : ℂ) : Prop := + riemannZeta rho = 0 ∧ ¬ ∃ n : ℕ, rho = -2 * (n + 1) + +/-- The finite bounded window of nontrivial zeta zeros, without multiplicity. -/ +noncomputable def nontrivialRiemannZetaZeroWindow (R : ℝ) : Finset ℂ := by + classical + exact (riemannZetaZeroBall R).filter IsNontrivialRiemannZetaZero + +theorem mem_nontrivialRiemannZetaZeroWindow {R : ℝ} {rho : ℂ} : + rho ∈ nontrivialRiemannZetaZeroWindow R ↔ + ‖rho‖ ≤ R ∧ IsNontrivialRiemannZetaZero rho := by + classical + rw [nontrivialRiemannZetaZeroWindow, Finset.mem_filter, + mem_riemannZetaZeroBall] + simp only [IsNontrivialRiemannZetaZero] + tauto + +theorem nontrivialRiemannZetaZeroWindow_mono {R S : ℝ} (hRS : R ≤ S) : + nontrivialRiemannZetaZeroWindow R ⊆ + nontrivialRiemannZetaZeroWindow S := by + intro rho hρ + rw [mem_nontrivialRiemannZetaZeroWindow] at hρ ⊢ + exact ⟨hρ.1.trans hRS, hρ.2⟩ + +theorem mem_nontrivialRiemannZetaZeroWindow_self {rho : ℂ} + (hρ : IsNontrivialRiemannZetaZero rho) : + rho ∈ nontrivialRiemannZetaZeroWindow ‖rho‖ := + mem_nontrivialRiemannZetaZeroWindow.mpr ⟨le_rfl, hρ⟩ + +/-- A genuinely finite symmetric-height window with an explicit real bound. +Both inequalities are closed, so zeros on either boundary are retained. -/ +noncomputable def symmetricHeightRiemannZetaZeroWindow + (realBound height : ℝ) : Finset ℂ := by + classical + exact (nontrivialRiemannZetaZeroWindow (realBound + height)).filter + (fun rho ↦ |rho.re| ≤ realBound ∧ |rho.im| ≤ height) + +theorem mem_symmetricHeightRiemannZetaZeroWindow + {realBound height : ℝ} {rho : ℂ} : + rho ∈ symmetricHeightRiemannZetaZeroWindow realBound height ↔ + IsNontrivialRiemannZetaZero rho ∧ + |rho.re| ≤ realBound ∧ |rho.im| ≤ height := by + classical + rw [symmetricHeightRiemannZetaZeroWindow, Finset.mem_filter, + mem_nontrivialRiemannZetaZeroWindow] + constructor + · rintro ⟨⟨_, hzero⟩, hre, him⟩ + exact ⟨hzero, hre, him⟩ + · rintro ⟨hzero, hre, him⟩ + exact ⟨⟨(Complex.norm_le_abs_re_add_abs_im rho).trans + (add_le_add hre him), hzero⟩, hre, him⟩ + +theorem symmetricHeightRiemannZetaZeroWindow_mono + {A B T U : ℝ} (hAB : A ≤ B) (hTU : T ≤ U) : + symmetricHeightRiemannZetaZeroWindow A T ⊆ + symmetricHeightRiemannZetaZeroWindow B U := by + intro rho hρ + rw [mem_symmetricHeightRiemannZetaZeroWindow] at hρ ⊢ + exact ⟨hρ.1, hρ.2.1.trans hAB, hρ.2.2.trans hTU⟩ + +/-- Multiplicity-aware indices in a compact symmetric-height rectangle. -/ +def RiemannZetaSymmetricHeightIndex (realBound height : ℝ) := + Σ rho : {rho : ℂ // + rho ∈ symmetricHeightRiemannZetaZeroWindow realBound height}, + Fin (riemannZetaZeroMultiplicity rho) + +noncomputable instance (realBound height : ℝ) : + Fintype (RiemannZetaSymmetricHeightIndex realBound height) := by + unfold RiemannZetaSymmetricHeightIndex + infer_instance + +/-- Increasing the height gives an injective multiplicity-preserving +reindexing; no boundary zero is lost. -/ +noncomputable def riemannZetaSymmetricHeightReindex + {realBound T U : ℝ} (hTU : T ≤ U) : + RiemannZetaSymmetricHeightIndex realBound T ↪ + RiemannZetaSymmetricHeightIndex realBound U where + toFun i := ⟨⟨i.1.1, + symmetricHeightRiemannZetaZeroWindow_mono le_rfl hTU i.1.2⟩, i.2⟩ + inj' := by + intro i j hij + cases i with + | mk ir im => + cases j with + | mk jr jm => + have hir : ir = jr := + Subtype.ext (congrArg (fun x ↦ x.1.1) hij) + subst jr + have him : im = jm := by + apply Fin.ext + simpa using congrArg (fun x ↦ x.2.val) hij + subst jm + rfl + +@[simp] theorem riemannZetaSymmetricHeightReindex_root + {realBound T U : ℝ} (hTU : T ≤ U) + (i : RiemannZetaSymmetricHeightIndex realBound T) : + (riemannZetaSymmetricHeightReindex hTU i).1.1 = i.1.1 := + rfl + +/-- An explicit real-strip hypothesis turns the compact rectangles into +pure symmetric-height windows. This hypothesis is deliberately separate: +pinned Mathlib does not supply the unconditional nontrivial-zero strip +classification needed to instantiate it. -/ +def NontrivialZetaZerosInRealStrip (realBound : ℝ) : Prop := + ∀ rho, IsNontrivialRiemannZetaZero rho → |rho.re| ≤ realBound + +theorem mem_symmetricHeightWindow_iff_of_realStrip + {realBound height : ℝ} + (hstrip : NontrivialZetaZerosInRealStrip realBound) {rho : ℂ} : + rho ∈ symmetricHeightRiemannZetaZeroWindow realBound height ↔ + IsNontrivialRiemannZetaZero rho ∧ |rho.im| ≤ height := by + rw [mem_symmetricHeightRiemannZetaZeroWindow] + exact and_congr_right fun hρ ↦ + and_iff_right (hstrip rho hρ) + +theorem nontrivialZetaZerosInRealStrip_one_of_rh + (hRH : KakeyaRiemannHypothesisRoot) : + NontrivialZetaZerosInRealStrip 1 := by + intro rho hρ + have hre : rho.re = 1 / 2 := hRH rho hρ.1 hρ.2 + (fun h1 ↦ riemannZeta_one_ne_zero (h1 ▸ hρ.1)) + rw [hre] + norm_num + +theorem mem_symmetricHeightWindow_one_iff_of_rh + (hRH : KakeyaRiemannHypothesisRoot) {height : ℝ} {rho : ℂ} : + rho ∈ symmetricHeightRiemannZetaZeroWindow 1 height ↔ + IsNontrivialRiemannZetaZero rho ∧ |rho.im| ≤ height := + mem_symmetricHeightWindow_iff_of_realStrip + (nontrivialZetaZerosInRealStrip_one_of_rh hRH) + +/-- Exact reality obligation for the derivative formula. -/ +def LiDerivativeIsReal (xi : ℂ → ℂ) : Prop := + ∀ n : ℕ, 0 < n → (liDerivativeCoefficient xi n).im = 0 + +theorem riemannLiCoefficient_cast_eq + (hreal : LiDerivativeIsReal riemannXiLi) {n : ℕ} (hn : 0 < n) : + (riemannLiCoefficient n : ℂ) = + liDerivativeCoefficient riemannXiLi n := by + apply Complex.ext + · simp [riemannLiCoefficient] + · simp [riemannLiCoefficient, hreal n hn] + +/-- Non-negativity at every source-relevant (positive) index. -/ +def LiPositive (a : ℕ → ℝ) : Prop := + ∀ n : ℕ, 0 < n → 0 ≤ a n + +/-- Finite-prefix evidence through index `N`; this is not an RH statement. -/ +def LiPositiveThrough (a : ℕ → ℝ) (N : ℕ) : Prop := + ∀ n : ℕ, 0 < n → n ≤ N → 0 ≤ a n + +theorem LiPositive.through {a : ℕ → ℝ} (h : LiPositive a) (N : ℕ) : + LiPositiveThrough a N := + fun n hn _ ↦ h n hn + +theorem liPositive_iff_all_prefixes (a : ℕ → ℝ) : + LiPositive a ↔ ∀ N : ℕ, LiPositiveThrough a N := by + constructor + · exact fun h N ↦ h.through N + · intro h n hn + exact h n n hn le_rfl + +theorem LiPositiveThrough.mono {a : ℕ → ℝ} {M N : ℕ} + (h : LiPositiveThrough a N) (hMN : M ≤ N) : + LiPositiveThrough a M := + fun n hn hnM ↦ h n hn (hnM.trans hMN) + +@[simp] theorem liPositiveThrough_zero (a : ℕ → ℝ) : + LiPositiveThrough a 0 := by + intro n hn hn0 + omega + +/-- A concrete counterexample to the invalid inference from any fixed finite +positive prefix to all-index positivity. -/ +def finitePrefixSpoof (N n : ℕ) : ℝ := + if n ≤ N then 1 else -1 + +theorem finitePrefixSpoof_positiveThrough (N : ℕ) : + LiPositiveThrough (finitePrefixSpoof N) N := by + intro n _ hn + simp [finitePrefixSpoof, hn] + +theorem finitePrefixSpoof_not_positive (N : ℕ) : + ¬ LiPositive (finitePrefixSpoof N) := by + intro h + have := h (N + 1) (by omega) + have hbad : (0 : ℝ) ≤ -1 := by + simpa [finitePrefixSpoof, show ¬N + 1 ≤ N by omega] using this + norm_num at hbad + +/-- The all-index Li criterion, deliberately a proposition rather than a +theorem. Proving this proposition is the source theorem bridge. -/ +def RiemannLiCriterionStatement : Prop := + KakeyaRiemannHypothesisRoot ↔ LiPositive riemannLiCoefficient + +/-- One term in the zero-sum formulation. -/ +def liZeroSummand (n : ℕ) (rho : ℂ) : ℂ := + 1 - (1 - rho⁻¹) ^ n + +@[simp] theorem liZeroSummand_zero (rho : ℂ) : + liZeroSummand 0 rho = 0 := by + simp [liZeroSummand] + +@[simp] theorem liZeroSummand_one (rho : ℂ) : + liZeroSummand 1 rho = rho⁻¹ := by + simp [liZeroSummand] + +theorem liZeroSummand_conj (n : ℕ) (rho : ℂ) : + liZeroSummand n (star rho) = star (liZeroSummand n rho) := by + simp [liZeroSummand] + +/-- A finite truncation of an indexed multiset of zeros. Indices, rather +than a `Finset ℂ`, preserve repeated roots when multiplicities are supplied. -/ +def liZeroPartialSum {ι : Type*} (root : ι → ℂ) + (cutoff : Finset ι) (n : ℕ) : ℂ := + ∑ i ∈ cutoff, liZeroSummand n (root i) + +@[simp] theorem liZeroPartialSum_zero {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : Finset ι) : + liZeroPartialSum root cutoff 0 = 0 := by + simp [liZeroPartialSum] + +/-- A finite, multiplicity-aware family of nonzero zeros. + +Repeated values at distinct `Fin` indices are retained, so this is an +indexed multiset rather than a set. It is concrete data, not an assumption +about the zeros of zeta. -/ +structure FiniteZeroMultiset where + card : ℕ + root : Fin card → ℂ + root_ne_zero : ∀ i, root i ≠ 0 + +/-- Multiplicity-aware indices for one bounded nontrivial-zeta-zero window. +The second component repeats each root exactly its natural analytic order. -/ +def RiemannZetaZeroWindowIndex (R : ℝ) := + Σ rho : {rho : ℂ // rho ∈ nontrivialRiemannZetaZeroWindow R}, + Fin (riemannZetaZeroMultiplicity rho) + +noncomputable instance (R : ℝ) : + Fintype (RiemannZetaZeroWindowIndex R) := by + unfold RiemannZetaZeroWindowIndex + infer_instance + +def riemannZetaZeroWindowRoot {R : ℝ} + (i : RiemannZetaZeroWindowIndex R) : ℂ := + i.1.1 + +theorem riemannZetaZeroWindowRoot_mem {R : ℝ} + (i : RiemannZetaZeroWindowIndex R) : + riemannZetaZeroWindowRoot i ∈ nontrivialRiemannZetaZeroWindow R := + i.1.2 + +theorem riemannZetaZeroWindowRoot_ne_zero {R : ℝ} + (i : RiemannZetaZeroWindowIndex R) : + riemannZetaZeroWindowRoot i ≠ 0 := by + change i.1.1 ≠ 0 + intro hi + have hz := (mem_nontrivialRiemannZetaZeroWindow.mp i.1.2).2.1 + rw [hi, riemannZeta_zero] at hz + norm_num at hz + +/-- Adapter from the sigma-type enumeration to the route's concrete finite +multiset. The `Fintype.equivFin` reindexing changes no roots or +multiplicities. -/ +noncomputable def riemannZetaZeroWindowMultiset (R : ℝ) : + FiniteZeroMultiset where + card := Fintype.card (RiemannZetaZeroWindowIndex R) + root := fun i ↦ riemannZetaZeroWindowRoot + ((Fintype.equivFin (RiemannZetaZeroWindowIndex R)).symm i) + root_ne_zero := fun _ ↦ riemannZetaZeroWindowRoot_ne_zero _ + +theorem riemannZetaZeroWindowMultiset_root_spec (R : ℝ) + (i : Fin (riemannZetaZeroWindowMultiset R).card) : + ‖(riemannZetaZeroWindowMultiset R).root i‖ ≤ R ∧ + IsNontrivialRiemannZetaZero + ((riemannZetaZeroWindowMultiset R).root i) := by + let j := (Fintype.equivFin (RiemannZetaZeroWindowIndex R)).symm i + change ‖riemannZetaZeroWindowRoot j‖ ≤ R ∧ + IsNontrivialRiemannZetaZero (riemannZetaZeroWindowRoot j) + exact mem_nontrivialRiemannZetaZeroWindow.mp j.1.2 + +/-- RH places every root in every concrete bounded multiplicity window on +the critical line. This is a finite-window consequence, not the missing +infinite Li equivalence. -/ +theorem riemannZetaZeroWindowMultiset_on_criticalLine + (hRH : KakeyaRiemannHypothesisRoot) (R : ℝ) : + ∀ i, ((riemannZetaZeroWindowMultiset R).root i).re = 1 / 2 := by + intro i + have hi := riemannZetaZeroWindowMultiset_root_spec R i + exact hRH _ hi.2.1 hi.2.2 (fun h1 ↦ + riemannZeta_one_ne_zero (h1 ▸ hi.2.1)) + +/-- One zero repeated with a prescribed positive analytic multiplicity. -/ +def FiniteZeroMultiset.replicate (multiplicity : ℕ) (rho : ℂ) + (hρ : rho ≠ 0) : FiniteZeroMultiset where + card := multiplicity + root := fun _ ↦ rho + root_ne_zero := fun _ ↦ hρ + +/-- The exact Li sum of a finite indexed multiset. -/ +def FiniteZeroMultiset.liSum (zeros : FiniteZeroMultiset) (n : ℕ) : ℂ := + ∑ i, liZeroSummand n (zeros.root i) + +@[simp] theorem FiniteZeroMultiset.liSum_replicate + (multiplicity n : ℕ) (rho : ℂ) (hρ : rho ≠ 0) : + (FiniteZeroMultiset.replicate multiplicity rho hρ).liSum n = + multiplicity * liZeroSummand n rho := by + change (∑ _ : Fin multiplicity, liZeroSummand n rho) = + multiplicity * liZeroSummand n rho + rw [Finset.sum_const, Finset.card_univ] + norm_num [Fintype.card_fin, nsmul_eq_mul] + +@[simp] theorem FiniteZeroMultiset.liSum_zero (zeros : FiniteZeroMultiset) : + zeros.liSum 0 = 0 := by + simp [FiniteZeroMultiset.liSum] + +theorem FiniteZeroMultiset.liSum_one (zeros : FiniteZeroMultiset) : + zeros.liSum 1 = ∑ i, (zeros.root i)⁻¹ := by + simp [FiniteZeroMultiset.liSum] + +/-- One zero contributes a nonnegative real part whenever its Li transform +`1 - 1 / rho` lies in the closed unit disk. -/ +theorem liZeroSummand_re_nonneg_of_norm_le_one + (n : ℕ) (rho : ℂ) (hρ : ‖1 - rho⁻¹‖ ≤ 1) : + 0 ≤ (liZeroSummand n rho).re := by + have hp : ((1 - rho⁻¹) ^ n).re ≤ 1 := calc + ((1 - rho⁻¹) ^ n).re + ≤ |((1 - rho⁻¹) ^ n).re| := le_abs_self _ + _ ≤ ‖(1 - rho⁻¹) ^ n‖ := abs_re_le_norm _ + _ = ‖1 - rho⁻¹‖ ^ n := norm_pow _ _ + _ ≤ 1 := pow_le_one₀ (norm_nonneg _) hρ + simpa [liZeroSummand] using sub_nonneg.mpr hp + +/-- Exact finite positivity: no convergence or zero-enumeration theorem is +needed for a finite multiplicity-aware family. -/ +theorem FiniteZeroMultiset.liSum_re_nonneg + (zeros : FiniteZeroMultiset) + (hunit : ∀ i, ‖1 - (zeros.root i)⁻¹‖ ≤ 1) + (n : ℕ) : + 0 ≤ (zeros.liSum n).re := by + change 0 ≤ Complex.reCLM (∑ i, liZeroSummand n (zeros.root i)) + rw [map_sum] + exact Finset.sum_nonneg fun i _ ↦ + liZeroSummand_re_nonneg_of_norm_le_one n (zeros.root i) (hunit i) + +/-- On the critical line, the Li transform has norm exactly one. -/ +theorem norm_one_sub_inv_eq_one_of_re_eq_half + {rho : ℂ} (hρ0 : rho ≠ 0) (hline : rho.re = 1 / 2) : + ‖1 - rho⁻¹‖ = 1 := by + have hnormSq : ‖rho - 1‖ ^ 2 = ‖rho‖ ^ 2 := by + rw [Complex.sq_norm, Complex.sq_norm, Complex.normSq_apply, Complex.normSq_apply] + simp only [sub_re, one_re, sub_im, one_im, sub_zero] + rw [hline] + ring + have hnorm : ‖rho - 1‖ = ‖rho‖ := by + nlinarith [norm_nonneg (rho - 1), norm_nonneg rho] + have hid : 1 - rho⁻¹ = (rho - 1) / rho := by + field_simp + rw [hid, norm_div, hnorm, div_self] + exact norm_ne_zero_iff.mpr hρ0 + +/-- The Li transform is in the closed unit disk exactly when the root is in +the closed right half-plane bounded by the critical line. -/ +theorem norm_one_sub_inv_le_one_iff_re_ge_half + {rho : ℂ} (hρ : rho ≠ 0) : + ‖1 - rho⁻¹‖ ≤ 1 ↔ 1 / 2 ≤ rho.re := by + have hid : 1 - rho⁻¹ = (rho - 1) / rho := by + field_simp + rw [hid, norm_div] + have hnorm : 0 < ‖rho‖ := norm_pos_iff.mpr hρ + rw [div_le_one hnorm] + have hsquares : + ‖rho - 1‖ ^ 2 ≤ ‖rho‖ ^ 2 ↔ 1 / 2 ≤ rho.re := by + rw [Complex.sq_norm, Complex.sq_norm, + Complex.normSq_apply, Complex.normSq_apply] + simp only [sub_re, one_re, sub_im, one_im, sub_zero] + constructor <;> intro h <;> nlinarith + rw [← hsquares] + exact (sq_le_sq₀ (norm_nonneg (rho - 1)) (norm_nonneg rho)).symm + +theorem re_eq_half_of_reflected_liTransforms_le_one + {rho : ℂ} (hρ : rho ≠ 0) (h1ρ : 1 - rho ≠ 0) + (hr : ‖1 - rho⁻¹‖ ≤ 1) + (hreflect : ‖1 - (1 - rho)⁻¹‖ ≤ 1) : + rho.re = 1 / 2 := by + have hright := (norm_one_sub_inv_le_one_iff_re_ge_half hρ).mp hr + have hleft := (norm_one_sub_inv_le_one_iff_re_ge_half h1ρ).mp hreflect + simp only [sub_re, one_re] at hleft + linarith + +/-- Finite reflection symmetry, including multiplicities through an +equivalence of indices. -/ +structure FiniteZeroMultiset.ReflectionSymmetric + (zeros : FiniteZeroMultiset) where + partner : Fin zeros.card ≃ Fin zeros.card + root_partner : ∀ i, zeros.root (partner i) = 1 - zeros.root i + +/-- The exact finite spectral converse needed to recover a unit-disk bound +from all-index aggregate Li positivity. This is named, not assumed. -/ +def FiniteLiSpectralConverseStatement + (zeros : FiniteZeroMultiset) : Prop := + (∀ n : ℕ, 0 < n → 0 ≤ (zeros.liSum n).re) → + ∀ i, ‖1 - (zeros.root i)⁻¹‖ ≤ 1 + +/-- For a reflection-symmetric finite multiset, the spectral converse would +force every root onto the critical line. -/ +theorem FiniteZeroMultiset.on_criticalLine_of_spectralConverse + (zeros : FiniteZeroMultiset) + (hsym : zeros.ReflectionSymmetric) + (hconverse : FiniteLiSpectralConverseStatement zeros) + (hpositive : ∀ n : ℕ, 0 < n → 0 ≤ (zeros.liSum n).re) : + ∀ i, (zeros.root i).re = 1 / 2 := by + have hunit := hconverse hpositive + intro i + apply re_eq_half_of_reflected_liTransforms_le_one + (zeros.root_ne_zero i) + · rw [← hsym.root_partner i] + exact zeros.root_ne_zero (hsym.partner i) + · exact hunit i + · rw [← hsym.root_partner i] + exact hunit (hsym.partner i) + +/-- Reflection symmetry for an arbitrary multiplicity-indexed spectrum. -/ +structure ReflectionSymmetricSpectrum {ι : Type*} (root : ι → ℂ) where + partner : ι ≃ ι + root_partner : ∀ i, root (partner i) = 1 - root i + +def LiUnitDiskBound {ι : Type*} (root : ι → ℂ) : Prop := + ∀ i, ‖1 - (root i)⁻¹‖ ≤ 1 + +theorem re_ge_half_of_liUnitDiskBound + {ι : Type*} {root : ι → ℂ} + (hroot0 : ∀ i, root i ≠ 0) + (hunit : LiUnitDiskBound root) : + ∀ i, 1 / 2 ≤ (root i).re := + fun i ↦ (norm_one_sub_inv_le_one_iff_re_ge_half (hroot0 i)).mp (hunit i) + +/-- The algebraic half of the infinite Bombieri--Lagarias reduction: +reflection symmetry turns individual unit-disk bounds into critical-line +location. No convergence or positivity converse is hidden here. -/ +theorem on_criticalLine_of_reflection_of_liUnitDiskBound + {ι : Type*} {root : ι → ℂ} + (hroot0 : ∀ i, root i ≠ 0) + (hsym : ReflectionSymmetricSpectrum root) + (hunit : LiUnitDiskBound root) : + ∀ i, (root i).re = 1 / 2 := by + intro i + apply re_eq_half_of_reflected_liTransforms_le_one (hroot0 i) + · rw [← hsym.root_partner i] + exact hroot0 (hsym.partner i) + · exact hunit i + · rw [← hsym.root_partner i] + exact hunit (hsym.partner i) + +/-- Reflection symmetry plus positivity of an unrelated coefficient sequence +does not locate roots. This counterexample records why the zero-sum/product +identity cannot be omitted from an infinite converse. -/ +theorem reflection_and_abstract_positivity_insufficient : + ∃ (root : Bool → ℂ) (coefficient : ℕ → ℂ) + (_ : ReflectionSymmetricSpectrum root), + (∀ i, root i ≠ 0) ∧ + (∀ n : ℕ, 0 < n → 0 ≤ (coefficient n).re) ∧ + ∃ i, (root i).re ≠ 1 / 2 := by + let root : Bool → ℂ := fun b ↦ if b then -1 else 2 + let partner : Bool ≃ Bool := { + toFun := (!·) + invFun := (!·) + left_inv := fun b ↦ by cases b <;> rfl + right_inv := fun b ↦ by cases b <;> rfl } + refine ⟨root, fun _ ↦ 0, + ⟨partner, fun i ↦ by cases i <;> norm_num [root, partner]⟩, + ?_, ?_, false, ?_⟩ + · intro i + cases i <;> simp [root] + · intro n hn + norm_num + · norm_num [root] + +theorem FiniteZeroMultiset.liSum_re_nonneg_of_on_criticalLine + (zeros : FiniteZeroMultiset) + (hline : ∀ i, (zeros.root i).re = 1 / 2) + (n : ℕ) : + 0 ≤ (zeros.liSum n).re := + zeros.liSum_re_nonneg + (fun i ↦ (norm_one_sub_inv_eq_one_of_re_eq_half + (zeros.root_ne_zero i) (hline i)).le) n + +/-- RH implies nonnegativity of every finite, multiplicity-aware bounded +window. No limit or finite-to-infinite extrapolation occurs here. -/ +theorem riemannZetaZeroWindow_liSum_re_nonneg_of_rh + (hRH : KakeyaRiemannHypothesisRoot) (R : ℝ) (n : ℕ) : + 0 ≤ ((riemannZetaZeroWindowMultiset R).liSum n).re := + (riemannZetaZeroWindowMultiset R).liSum_re_nonneg_of_on_criticalLine + (riemannZetaZeroWindowMultiset_on_criticalLine hRH R) n + +/-- The exact derivative/zero-window formula still required by the Li route. +It asserts convergence at every positive index; no finite prefix is used. -/ +def RiemannLiZeroWindowFormula : Prop := + ∀ n : ℕ, 0 < n → + Tendsto (fun N : ℕ ↦ + (riemannZetaZeroWindowMultiset (N : ℝ)).liSum n) atTop + (𝓝 (liDerivativeCoefficient riemannXiLi n)) + +/-- The RH-to-Li-positive direction follows once the all-index zero-window +formula is supplied. This separates finite RH positivity from the missing +global convergence/coefficient theorem. -/ +theorem liPositive_of_rh_of_zeroWindowFormula + (hRH : KakeyaRiemannHypothesisRoot) + (hformula : RiemannLiZeroWindowFormula) : + LiPositive riemannLiCoefficient := by + intro n hn + change 0 ≤ (liDerivativeCoefficient riemannXiLi n).re + have hre : Tendsto (fun N : ℕ ↦ + ((riemannZetaZeroWindowMultiset (N : ℝ)).liSum n).re) atTop + (𝓝 (liDerivativeCoefficient riemannXiLi n).re) := + Complex.continuous_re.continuousAt.tendsto.comp (hformula n hn) + exact le_of_tendsto_of_tendsto tendsto_const_nhds hre + (Eventually.of_forall fun N ↦ + riemannZetaZeroWindow_liSum_re_nonneg_of_rh hRH (N : ℝ) n) + +theorem riemannLiCriterion_forward_of_zeroWindowFormula + (hformula : RiemannLiZeroWindowFormula) : + KakeyaRiemannHypothesisRoot → + LiPositive riemannLiCoefficient := + fun hRH ↦ liPositive_of_rh_of_zeroWindowFormula hRH hformula + +/-- The converse all-index theorem remains a distinct source bridge. -/ +def RiemannLiConverseStatement : Prop := + LiPositive riemannLiCoefficient → KakeyaRiemannHypothesisRoot + +theorem riemannLiCriterion_of_bridges + (hformula : RiemannLiZeroWindowFormula) + (hconverse : RiemannLiConverseStatement) : + RiemannLiCriterionStatement := + ⟨riemannLiCriterion_forward_of_zeroWindowFormula hformula, hconverse⟩ + +/-- The analytic convergence part of the height-symmetric zero formula. +Completeness and multiplicity-correctness of `root` are separate obligations, +because pinned Mathlib exposes analytic orders and a zero set, but not one +global multiplicity-indexed symmetric-height enumeration. -/ +def HeightSymmetricLiLimit {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (height : ℕ → ℝ) + (coefficient : ℕ → ℂ) : Prop := + Tendsto height atTop atTop ∧ + (∀ N i, i ∈ cutoff N ↔ |(root i).im| ≤ height N) ∧ + ∀ n : ℕ, Tendsto (fun N ↦ liZeroPartialSum root (cutoff N) n) + atTop (𝓝 (coefficient n)) + +/-- Source-standard summability hypothesis for the Bombieri--Lagarias +multiset theorem. -/ +def BombieriLagariasSummability {ι : Type*} (root : ι → ℂ) : Prop := + Summable (fun i ↦ + (1 + |(root i).re|) / (1 + ‖root i‖) ^ 2) + +/-- Reflection symmetry and source summability alone do not imply +critical-line location. -/ +theorem reflection_and_summability_insufficient : + ∃ (root : Bool → ℂ) (_ : ReflectionSymmetricSpectrum root), + (∀ i, root i ≠ 0) ∧ BombieriLagariasSummability root ∧ + ∃ i, (root i).re ≠ 1 / 2 := by + let root : Bool → ℂ := fun b ↦ if b then -1 else 2 + let partner : Bool ≃ Bool := { + toFun := (!·) + invFun := (!·) + left_inv := fun b ↦ by cases b <;> rfl + right_inv := fun b ↦ by cases b <;> rfl } + refine ⟨root, + ⟨partner, fun i ↦ by cases i <;> norm_num [root, partner]⟩, + ?_, ?_, false, ?_⟩ + · intro i + cases i <;> simp [root] + · apply summable_of_hasFiniteSupport + exact Set.toFinite _ + · norm_num [root] + +/-- Away from the origin, the source-standard Bombieri--Lagarias weight +implies the inverse-square summability required by genus-one products. -/ +theorem BombieriLagariasSummability.summable_norm_inv_sq + {ι : Type*} {root : ι → ℂ} + (hsum : BombieriLagariasSummability root) + (hlarge : ∀ i, 1 ≤ ‖root i‖) : + Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2) := by + apply (hsum.mul_left 4).of_nonneg_of_le + · intro i + positivity + · intro i + rw [norm_inv] + let r := ‖root i‖ + have hr : 0 < r := lt_of_lt_of_le zero_lt_one (hlarge i) + have hden : 0 < (1 + r) ^ 2 := by positivity + calc + r⁻¹ ^ 2 = 1 / r ^ 2 := by rw [inv_pow, one_div] + _ ≤ 4 / (1 + r) ^ 2 := by + rw [div_le_div_iff₀ (by positivity) hden] + nlinarith [hlarge i] + _ ≤ 4 * ((1 + |(root i).re|) / (1 + r) ^ 2) := by + rw [← mul_div_assoc] + have hnum : (4 : ℝ) ≤ 4 * (1 + |(root i).re|) := by + nlinarith [abs_nonneg (root i).re] + exact div_le_div_of_nonneg_right hnum hden.le + +/-- Exact infinite spectral implication supplied by the Bombieri--Lagarias +converse after its multiset summability hypothesis is instantiated. Growth +enters separately when proving `HeightSymmetricLiLimit`. -/ +def HeightSymmetricLiSpectralConverseStatement + {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (height : ℕ → ℝ) + (coefficient : ℕ → ℂ) : Prop := + BombieriLagariasSummability root → + HeightSymmetricLiLimit root cutoff height coefficient → + (∀ n : ℕ, 0 < n → 0 ≤ (coefficient n).re) → + LiUnitDiskBound root + +/-- Source-shaped half-plane form of the Bombieri--Lagarias implication. +For nonzero roots this is exactly the unit-disk formulation above, not an +additional assumption. -/ +def BombieriLagariasPositivityHalfPlaneStatement + {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (height : ℕ → ℝ) + (coefficient : ℕ → ℂ) : Prop := + BombieriLagariasSummability root → + HeightSymmetricLiLimit root cutoff height coefficient → + (∀ n : ℕ, 0 < n → 0 ≤ (coefficient n).re) → + ∀ i, 1 / 2 ≤ (root i).re + +theorem heightSymmetricLiSpectralConverse_iff_halfPlane + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + {coefficient : ℕ → ℂ} + (hroot0 : ∀ i, root i ≠ 0) : + HeightSymmetricLiSpectralConverseStatement + root cutoff height coefficient ↔ + BombieriLagariasPositivityHalfPlaneStatement + root cutoff height coefficient := by + constructor + · intro h hsum hlimit hpositive i + exact (norm_one_sub_inv_le_one_iff_re_ge_half (hroot0 i)).mp + (h hsum hlimit hpositive i) + · intro h hsum hlimit hpositive i + exact (norm_one_sub_inv_le_one_iff_re_ge_half (hroot0 i)).mpr + (h hsum hlimit hpositive i) + +/-- Once the analytic symmetric limit and the infinite spectral implication +are available, reflection symmetry completes the converse algebraically. -/ +theorem on_criticalLine_of_heightSymmetric_spectralConverse + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + {coefficient : ℕ → ℂ} + (hroot0 : ∀ i, root i ≠ 0) + (hsym : ReflectionSymmetricSpectrum root) + (hsum : BombieriLagariasSummability root) + (hlimit : HeightSymmetricLiLimit root cutoff height coefficient) + (hpositive : ∀ n : ℕ, 0 < n → 0 ≤ (coefficient n).re) + (hconverse : HeightSymmetricLiSpectralConverseStatement + root cutoff height coefficient) : + ∀ i, (root i).re = 1 / 2 := + on_criticalLine_of_reflection_of_liUnitDiskBound + hroot0 hsym (hconverse hsum hlimit hpositive) + +/-- Complete spectral data needed to specialize the abstract +Bombieri--Lagarias implication to the normalized Riemann xi spectrum. -/ +structure RiemannLiSpectralModel (ι : Type*) [DecidableEq ι] where + root : ι → ℂ + cutoff : ℕ → Finset ι + height : ℕ → ℝ + root_ne_zero : ∀ i, root i ≠ 0 + reflection : ReflectionSymmetricSpectrum root + summability : BombieriLagariasSummability root + liLimit : HeightSymmetricLiLimit root cutoff height + (fun n ↦ liDerivativeCoefficient riemannXiLi n) + complete : ∀ rho, IsNontrivialRiemannZetaZero rho → + ∃ i, root i = rho + +/-- Once a complete xi spectral model and the genuine Bombieri--Lagarias +positivity implication are available, reflection derives RH. No RH +assumption occurs in this reduction. -/ +theorem riemannHypothesis_of_bombieriLagarias + {ι : Type*} [DecidableEq ι] + (model : RiemannLiSpectralModel ι) + (hpositive : LiPositive riemannLiCoefficient) + (hBL : BombieriLagariasPositivityHalfPlaneStatement + model.root model.cutoff model.height + (fun n ↦ liDerivativeCoefficient riemannXiLi n)) : + KakeyaRiemannHypothesisRoot := by + have hcoeff : ∀ n : ℕ, 0 < n → + 0 ≤ (liDerivativeCoefficient riemannXiLi n).re := by + intro n hn + exact hpositive n hn + have hright := hBL model.summability model.liLimit hcoeff + have hunit : LiUnitDiskBound model.root := fun i ↦ + (norm_one_sub_inv_le_one_iff_re_ge_half + (model.root_ne_zero i)).mpr (hright i) + have hline := on_criticalLine_of_reflection_of_liUnitDiskBound + model.root_ne_zero model.reflection hunit + intro rho hz hnontrivial h1 + obtain ⟨i, hi⟩ := model.complete rho ⟨hz, hnontrivial⟩ + rw [← hi] + exact hline i + +/-- Cauchy form of the analytic convergence obligation. This does not assert +that zeta zeros satisfy it. -/ +def HeightSymmetricLiCauchy {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) : Prop := + ∀ n : ℕ, CauchySeq (fun N ↦ liZeroPartialSum root (cutoff N) n) + +/-- Exact cofinal exhaustion by symmetric heights, separated from any +coefficient limit. -/ +def SymmetricHeightExhaustion {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (height : ℕ → ℝ) : Prop := + Tendsto height atTop atTop ∧ + ∀ N i, i ∈ cutoff N ↔ |(root i).im| ≤ height N + +theorem SymmetricHeightExhaustion.eventually_subset + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + (h : SymmetricHeightExhaustion root cutoff height) + (F : Finset ι) : + ∀ᶠ N in atTop, F ⊆ cutoff N := by + change ∀ᶠ N in atTop, ∀ i ∈ F, i ∈ cutoff N + apply (Finset.eventually_all F).2 + intro i _ + filter_upwards [h.1.eventually (eventually_ge_atTop |(root i).im|)] with N hN + exact (h.2 N i).2 hN + +/-- Exact symmetric windows are cofinal in the directed set of all finite +subsets. -/ +theorem SymmetricHeightExhaustion.tendsto_cutoff + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + (h : SymmetricHeightExhaustion root cutoff height) : + Tendsto cutoff atTop atTop := by + apply tendsto_atTop.2 + intro F + exact h.eventually_subset F + +/-- Unconditional summability is sufficient to identify every exact +symmetric-height limit with the corresponding `tsum`. -/ +theorem SymmetricHeightExhaustion.tendsto_liZeroPartialSum + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + (h : SymmetricHeightExhaustion root cutoff height) + (n : ℕ) (hsum : Summable (fun i ↦ liZeroSummand n (root i))) : + Tendsto (fun N ↦ liZeroPartialSum root (cutoff N) n) atTop + (𝓝 (∑' i, liZeroSummand n (root i))) := + hsum.hasSum.comp h.tendsto_cutoff + +theorem heightSymmetricLiLimit_tsum_of_summable + {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (height : ℕ → ℝ) + (hexhaust : SymmetricHeightExhaustion root cutoff height) + (hsum : ∀ n, Summable (fun i ↦ liZeroSummand n (root i))) : + HeightSymmetricLiLimit root cutoff height + (fun n ↦ ∑' i, liZeroSummand n (root i)) := + ⟨hexhaust.1, hexhaust.2, + fun n ↦ hexhaust.tendsto_liZeroPartialSum n (hsum n)⟩ + +/-- A summable bound on successive height shells gives the Cauchy estimate +needed for conditional symmetric sums. Zero-counting and growth estimates +enter only through `d` and `hbound`. -/ +theorem cauchySeq_liZeroPartialSum_of_shell_majorant + {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (n : ℕ) + (d : ℕ → ℝ) (hd : Summable d) + (hbound : ∀ N, dist (liZeroPartialSum root (cutoff N) n) + (liZeroPartialSum root (cutoff (N + 1)) n) ≤ d N) : + CauchySeq (fun N ↦ liZeroPartialSum root (cutoff N) n) := by + apply cauchySeq_of_summable_dist + apply hd.of_norm_bounded + intro N + simpa [Real.norm_eq_abs, abs_of_nonneg dist_nonneg] using hbound N + +theorem heightSymmetricLiCauchy_of_shell_majorants + {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) + (d : ℕ → ℕ → ℝ) + (hd : ∀ n, Summable (d n)) + (hbound : ∀ n N, dist (liZeroPartialSum root (cutoff N) n) + (liZeroPartialSum root (cutoff (N + 1)) n) ≤ d n N) : + HeightSymmetricLiCauchy root cutoff := + fun n ↦ cauchySeq_liZeroPartialSum_of_shell_majorant + root cutoff n (d n) (hd n) (hbound n) + +/-- The quantitative shell estimate sufficient for symmetric Li convergence. +The exponent `3/2` is deliberately weaker than the source combination +`O(log T)` zero count times `O(T⁻²)` conjugate-pair cancellation. -/ +def ThreeHalvesLiShellBound {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (C : ℕ → ℝ) : Prop := + ∀ n N, dist (liZeroPartialSum root (cutoff N) n) + (liZeroPartialSum root (cutoff (N + 1)) n) ≤ + C n * ((N + 1 : ℕ) : ℝ) ^ (-(3 / 2 : ℝ)) + +theorem summable_threeHalves_shell_majorant (C : ℝ) : + Summable + (fun N : ℕ ↦ C * ((N + 1 : ℕ) : ℝ) ^ (-(3 / 2 : ℝ))) := by + apply Summable.mul_left + exact (summable_nat_add_iff 1).2 + (Real.summable_nat_rpow.mpr (by norm_num)) + +theorem heightSymmetricLiCauchy_of_threeHalvesShellBound + {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (C : ℕ → ℝ) + (hbound : ThreeHalvesLiShellBound root cutoff C) : + HeightSymmetricLiCauchy root cutoff := by + apply heightSymmetricLiCauchy_of_shell_majorants root cutoff + (fun n N ↦ C n * ((N + 1 : ℕ) : ℝ) ^ (-(3 / 2 : ℝ))) + · exact fun n ↦ summable_threeHalves_shell_majorant (C n) + · exact hbound + +/-- Source-shaped unit-height zero count. Riemann--von Mangoldt gives this +with `O(log T)`, counting multiplicity; it is a theorem statement here +because pinned Mathlib has no quantitative zeta zero-count theorem. -/ +def LogarithmicZeroShellCount {ι : Type*} [DecidableEq ι] + (cutoff : ℕ → Finset ι) : Prop := + ∃ A : ℝ, 0 ≤ A ∧ ∀ N, + (((cutoff (N + 1) \ cutoff N).card : ℕ) : ℝ) ≤ + A * Real.log (N + 2) + +/-- The second estimate needed after zero counting: conjugate/reflected +pairing must improve each unit shell from first-order `O(T⁻¹)` behavior to +quadratic `O(T⁻²)` behavior. -/ +def QuadraticPairedLiShellCancellation {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) : Prop := + ∀ n, ∃ B : ℝ, 0 ≤ B ∧ ∀ N, + dist (liZeroPartialSum root (cutoff N) n) + (liZeroPartialSum root (cutoff (N + 1)) n) ≤ + B * Real.log (N + 2) / (((N + 2 : ℕ) : ℝ) ^ 2) + +theorem summable_log_div_square_shell_majorant + (B : ℝ) (hB : 0 ≤ B) : + Summable (fun N : ℕ ↦ + B * Real.log (N + 2) / (((N + 2 : ℕ) : ℝ) ^ 2)) := by + have hbase : Summable + (fun N : ℕ ↦ 2 * B * + (((N + 2 : ℕ) : ℝ) ^ (-(3 / 2 : ℝ)))) := by + apply Summable.mul_left + exact (summable_nat_add_iff 2).2 + (Real.summable_nat_rpow.mpr (by norm_num)) + apply hbase.of_nonneg_of_le + · intro N + exact div_nonneg + (mul_nonneg hB (Real.log_nonneg (by norm_cast; omega))) + (sq_nonneg _) + · intro N + norm_num [Nat.cast_add] + let x : ℝ := (N : ℝ) + 2 + have hx : 0 < x := by + dsimp [x] + positivity + change B * Real.log x / x ^ 2 ≤ _ + calc + B * Real.log x / x ^ 2 ≤ + B * (x ^ (1 / 2 : ℝ) / (1 / 2)) / x ^ 2 := by + exact div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_left + (Real.log_le_rpow_div (x := x) (ε := (1 / 2 : ℝ)) + hx.le (by norm_num)) hB) + (sq_nonneg x) + _ = 2 * B * x ^ (-(3 / 2 : ℝ)) := by + rw [div_eq_iff (pow_ne_zero 2 hx.ne')] + rw [mul_assoc, ← Real.rpow_natCast, ← Real.rpow_add hx] + norm_num + ring + +theorem summable_log_add_two_div_add_one_square + (A : ℝ) (hA : 0 ≤ A) : + Summable (fun N : ℕ ↦ + A * Real.log (N + 2) / (((N + 1 : ℕ) : ℝ) ^ 2)) := by + have hbase := + summable_log_div_square_shell_majorant (4 * A) (by positivity) + apply hbase.of_nonneg_of_le + · intro N + exact div_nonneg + (mul_nonneg hA (Real.log_nonneg (by norm_cast; omega))) + (sq_nonneg _) + · intro N + have hN1 : 0 < ((N + 1 : ℕ) : ℝ) := by positivity + have hN2 : 0 < ((N + 2 : ℕ) : ℝ) := by positivity + have hlog : 0 ≤ Real.log ((N + 2 : ℕ) : ℝ) := + Real.log_nonneg (by norm_cast; omega) + norm_num [Nat.cast_add] at * + rw [div_le_div_iff₀ (sq_pos_of_pos hN1) (sq_pos_of_pos hN2)] + have hsquare : ((N + 2 : ℕ) : ℝ) ^ 2 ≤ + 4 * ((N + 1 : ℕ) : ℝ) ^ 2 := by + norm_num [Nat.cast_add] + nlinarith + have hK : 0 ≤ A * Real.log ((N : ℝ) + 2) := + mul_nonneg hA hlog + calc + A * Real.log ((N : ℝ) + 2) * ((N : ℝ) + 2) ^ 2 + ≤ A * Real.log ((N : ℝ) + 2) * + (4 * ((N : ℝ) + 1) ^ 2) := by + apply mul_le_mul_of_nonneg_left _ hK + simpa [Nat.cast_add] using hsquare + _ = 4 * A * Real.log ((N : ℝ) + 2) * + ((N : ℝ) + 1) ^ 2 := by ring + +/-- A sourced `O(log N)` unit-shell zero count implies inverse-square +summability. Multiplicity is represented by shell membership, not erased. -/ +theorem summable_norm_inv_sq_of_logarithmic_shell_count + {ι : Type*} [DecidableEq ι] (root : ι → ℂ) + (shell : ℕ → Finset ι) + (hpartition : ∀ i, ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + ((N + 1 : ℕ) : ℝ) ≤ ‖root i‖) + (A : ℝ) (hA : 0 ≤ A) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * Real.log (N + 2)) : + Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2) := by + rw [summable_partition (f := fun i ↦ ‖(root i)⁻¹‖ ^ 2) + (fun i ↦ sq_nonneg _) (s := fun N ↦ ↑(shell N)) + (by simpa using hpartition)] + constructor + · intro N + apply summable_of_hasFiniteSupport + exact Set.toFinite _ + · apply (summable_log_add_two_div_add_one_square A hA).of_nonneg_of_le + · intro N + exact tsum_nonneg fun _ ↦ sq_nonneg _ + · intro N + rw [tsum_fintype] + calc + ∑ i : ↥(↑(shell N) : Set ι), ‖(root i)⁻¹‖ ^ 2 + ≤ ∑ _i : ↥(↑(shell N) : Set ι), + 1 / (((N + 1 : ℕ) : ℝ) ^ 2) := by + apply Finset.sum_le_sum + intro i hi + rw [norm_inv, inv_pow] + have hsquareRoot : + (((N + 1 : ℕ) : ℝ) ^ 2) ≤ ‖root i‖ ^ 2 := + (sq_le_sq₀ (by positivity) (norm_nonneg _)).mpr + (hlower N i i.property) + simpa [one_div] using + (inv_anti₀ (by positivity) hsquareRoot) + _ = ((shell N).card : ℝ) / + (((N + 1 : ℕ) : ℝ) ^ 2) := by + simp [div_eq_mul_inv] + _ ≤ A * Real.log (N + 2) / + (((N + 1 : ℕ) : ℝ) ^ 2) := by + exact div_le_div_of_nonneg_right (hcount N) (sq_nonneg _) + +/-- Finitely many low zeros never affect inverse-square summability. -/ +theorem summable_norm_inv_sq_of_finite_low_and_logarithmic_shell_count + {ι : Type*} [DecidableEq ι] (root : ι → ℂ) + (low : Finset ι) + (shell : ℕ → Finset {i : ι // i ∉ low}) + (hpartition : ∀ i : {i : ι // i ∉ low}, + ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + ((N + 1 : ℕ) : ℝ) ≤ ‖root i‖) + (A : ℝ) (hA : 0 ≤ A) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * Real.log (N + 2)) : + Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2) := by + have hc : Summable (fun i : {i : ι // i ∉ low} ↦ + ‖(root i)⁻¹‖ ^ 2) := + summable_norm_inv_sq_of_logarithmic_shell_count + (fun i : {i : ι // i ∉ low} ↦ root i) + shell hpartition hlower A hA hcount + exact (low.summable_compl_iff).mp hc + +/-- The dyadic majorant arising from an order-one cumulative zero count. -/ +theorem summable_dyadic_linear_majorant (A : ℝ) : + Summable (fun N : ℕ ↦ + A * (N + 1 : ℝ) * (1 / 2 : ℝ) ^ N) := by + have hnat : Summable (fun N : ℕ ↦ + (N : ℝ) * (1 / 2 : ℝ) ^ N) := by + simpa using + (summable_pow_mul_geometric_of_norm_lt_one (R := ℝ) 1 + (r := (1 / 2 : ℝ)) (by norm_num)) + have hone : Summable (fun N : ℕ ↦ (1 / 2 : ℝ) ^ N) := + summable_geometric_of_norm_lt_one (by norm_num) + apply ((hnat.add hone).mul_left A).congr + intro N + ring + +theorem tsum_nat_add_one_mul_half_pow : + (∑' m : ℕ, (m + 1 : ℝ) * (1 / 2 : ℝ) ^ m) = 4 := by + rw [show (fun m : ℕ ↦ (m + 1 : ℝ) * (1 / 2 : ℝ) ^ m) = + (fun m : ℕ ↦ (m : ℝ) * (1 / 2 : ℝ) ^ m + + (1 / 2 : ℝ) ^ m) by + funext m + ring] + have h1 : Summable (fun m : ℕ ↦ + (m : ℝ) * (1 / 2 : ℝ) ^ m) := by + simpa using + (summable_pow_mul_geometric_of_norm_lt_one (R := ℝ) 1 + (r := (1 / 2 : ℝ)) (by norm_num)) + have h2 : Summable (fun m : ℕ ↦ (1 / 2 : ℝ) ^ m) := + summable_geometric_of_norm_lt_one + (x := (1 / 2 : ℝ)) (by norm_num) + rw [h1.tsum_add h2] + rw [tsum_coe_mul_geometric_of_norm_lt_one (by norm_num), + tsum_geometric_two] + norm_num + +/-- Explicit tail bound for the weighted dyadic majorant. -/ +theorem tsum_shifted_dyadic_linear_le (N : ℕ) : + (∑' m : ℕ, + (N + m + 1 : ℝ) / (2 : ℝ) ^ (N + m)) ≤ + 4 * (N + 1 : ℝ) / (2 : ℝ) ^ N := by + have hsum : Summable (fun m : ℕ ↦ + ((N + 1 : ℝ) / (2 : ℝ) ^ N) * + ((m + 1 : ℝ) * (1 / 2 : ℝ) ^ m)) := + ((summable_dyadic_linear_majorant 1).congr + (fun m ↦ by ring)).mul_left + ((N + 1 : ℝ) / (2 : ℝ) ^ N) + have hle : ∀ m : ℕ, + (N + m + 1 : ℝ) / (2 : ℝ) ^ (N + m) ≤ + ((N + 1 : ℝ) / (2 : ℝ) ^ N) * + ((m + 1 : ℝ) * (1 / 2 : ℝ) ^ m) := by + intro m + rw [show ((N + 1 : ℝ) / (2 : ℝ) ^ N) * + ((m + 1 : ℝ) * (1 / 2 : ℝ) ^ m) = + ((N + 1 : ℝ) * (m + 1 : ℝ)) / + (2 : ℝ) ^ (N + m) by + rw [pow_add, one_div, inv_pow] + field_simp] + apply div_le_div_of_nonneg_right + · nlinarith + · positivity + have hleft : Summable (fun m : ℕ ↦ + (N + m + 1 : ℝ) / (2 : ℝ) ^ (N + m)) := + hsum.of_nonneg_of_le + (fun m ↦ div_nonneg (by positivity) (by positivity)) hle + calc + (∑' m : ℕ, (N + m + 1 : ℝ) / (2 : ℝ) ^ (N + m)) + ≤ ∑' m : ℕ, ((N + 1 : ℝ) / (2 : ℝ) ^ N) * + ((m + 1 : ℝ) * (1 / 2 : ℝ) ^ m) := + Summable.tsum_le_tsum hle hleft hsum + _ = ((N + 1 : ℝ) / (2 : ℝ) ^ N) * 4 := by + rw [tsum_mul_left, tsum_nat_add_one_mul_half_pow] + _ = 4 * (N + 1 : ℝ) / (2 : ℝ) ^ N := by ring + +/-- Quantitative inverse-square tail estimate from a dyadic +`O(2^k(k+1))` shell count. -/ +theorem tsum_norm_inv_sq_dyadic_shell_tail_le + {ι : Type*} [DecidableEq ι] (root : ι → ℂ) + (shell : ℕ → Finset ι) + (hlower : ∀ k i, i ∈ shell k → + (2 : ℝ) ^ k ≤ ‖root i‖) + (A : ℝ) (hA : 0 ≤ A) + (hcount : ∀ k, ((shell k).card : ℝ) ≤ + A * (2 : ℝ) ^ k * (k + 1 : ℝ)) + (N : ℕ) : + (∑' m : ℕ, ∑ i ∈ shell (N + m), + ‖(root i)⁻¹‖ ^ 2) ≤ + 4 * A * (N + 1 : ℝ) / (2 : ℝ) ^ N := by + have hterm : ∀ m : ℕ, + (∑ i ∈ shell (N + m), ‖(root i)⁻¹‖ ^ 2) ≤ + A * ((N + m + 1 : ℝ) / (2 : ℝ) ^ (N + m)) := by + intro m + let k := N + m + have hpow : 0 < (2 : ℝ) ^ k := by positivity + calc + (∑ i ∈ shell k, ‖(root i)⁻¹‖ ^ 2) + ≤ ∑ _i ∈ shell k, + 1 / ((2 : ℝ) ^ k) ^ 2 := by + apply Finset.sum_le_sum + intro i hi + rw [norm_inv, inv_pow] + have hsquare : + ((2 : ℝ) ^ k) ^ 2 ≤ ‖root i‖ ^ 2 := + (sq_le_sq₀ hpow.le (norm_nonneg _)).mpr + (hlower k i hi) + simpa [one_div] using + inv_anti₀ (sq_pos_of_pos hpow) hsquare + _ = ((shell k).card : ℝ) / + ((2 : ℝ) ^ k) ^ 2 := by + simp [div_eq_mul_inv] + _ ≤ (A * (2 : ℝ) ^ k * (k + 1 : ℝ)) / + ((2 : ℝ) ^ k) ^ 2 := + div_le_div_of_nonneg_right (hcount k) (sq_nonneg _) + _ = A * ((k + 1 : ℝ) / (2 : ℝ) ^ k) := by + field_simp + _ = A * ((N + m + 1 : ℝ) / + (2 : ℝ) ^ (N + m)) := by + simp [k, Nat.cast_add] + have hbase : Summable (fun m : ℕ ↦ + (N + m + 1 : ℝ) / (2 : ℝ) ^ (N + m)) := by + have hmajor : Summable (fun m : ℕ ↦ + ((N + 1 : ℝ) / (2 : ℝ) ^ N) * + ((m + 1 : ℝ) * (1 / 2 : ℝ) ^ m)) := + ((summable_dyadic_linear_majorant 1).congr + (fun m ↦ by ring)).mul_left + ((N + 1 : ℝ) / (2 : ℝ) ^ N) + apply hmajor.of_nonneg_of_le + · intro m + positivity + · intro m + rw [show ((N + 1 : ℝ) / (2 : ℝ) ^ N) * + ((m + 1 : ℝ) * (1 / 2 : ℝ) ^ m) = + ((N + 1 : ℝ) * (m + 1 : ℝ)) / + (2 : ℝ) ^ (N + m) by + rw [pow_add, one_div, inv_pow] + field_simp] + apply div_le_div_of_nonneg_right + · nlinarith + · positivity + have hright : Summable (fun m : ℕ ↦ + A * ((N + m + 1 : ℝ) / + (2 : ℝ) ^ (N + m))) := + hbase.mul_left A + have hleft : Summable (fun m : ℕ ↦ + ∑ i ∈ shell (N + m), ‖(root i)⁻¹‖ ^ 2) := + hright.of_nonneg_of_le + (fun m ↦ Finset.sum_nonneg fun _ _ ↦ sq_nonneg _) hterm + calc + (∑' m : ℕ, ∑ i ∈ shell (N + m), + ‖(root i)⁻¹‖ ^ 2) + ≤ ∑' m : ℕ, + A * ((N + m + 1 : ℝ) / + (2 : ℝ) ^ (N + m)) := + Summable.tsum_le_tsum hterm hleft hright + _ = A * (∑' m : ℕ, + (N + m + 1 : ℝ) / (2 : ℝ) ^ (N + m)) := by + rw [tsum_mul_left] + _ ≤ A * (4 * (N + 1 : ℝ) / (2 : ℝ) ^ N) := by + gcongr + exact tsum_shifted_dyadic_linear_le N + _ = 4 * A * (N + 1 : ℝ) / (2 : ℝ) ^ N := by + ring + +/-- Every real radius at least one belongs to a unique half-open dyadic +interval. This is the bookkeeping fact needed to turn a cumulative Jensen +count into disjoint shells without making a false unit-shell estimate. -/ +theorem existsUnique_dyadic_interval (x : ℝ) (hx : 1 ≤ x) : + ∃! N : ℕ, + (2 : ℝ) ^ N ≤ x ∧ x < (2 : ℝ) ^ (N + 1) := by + let p : ℕ → Prop := fun N ↦ x < (2 : ℝ) ^ (N + 1) + have hp : ∃ N, p N := by + obtain ⟨n, hn⟩ := + pow_unbounded_of_one_lt x (by norm_num : (1 : ℝ) < 2) + exact ⟨n, hn.trans_le + (pow_le_pow_right₀ (by norm_num) (Nat.le_succ n))⟩ + let N := Nat.find hp + have hupper : x < (2 : ℝ) ^ (N + 1) := + Nat.find_spec hp + have hlower : (2 : ℝ) ^ N ≤ x := by + by_contra h + have hxlt : x < (2 : ℝ) ^ N := lt_of_not_ge h + by_cases hN : N = 0 + · rw [hN] at hxlt + norm_num at hxlt + linarith + · obtain ⟨k, hk⟩ := Nat.exists_eq_succ_of_ne_zero hN + have hpk : p k := by + dsimp [p] + rw [hk] at hxlt + simpa [Nat.succ_eq_add_one] using hxlt + exact (Nat.find_min hp (by omega)) hpk + refine ⟨N, ⟨hlower, hupper⟩, ?_⟩ + intro M hM + apply le_antisymm + · by_contra hle + have hMN : N < M := lt_of_not_ge hle + have hpowers : (2 : ℝ) ^ (N + 1) ≤ (2 : ℝ) ^ M := + pow_le_pow_right₀ (by norm_num) (by omega) + linarith [hupper, hM.1] + · by_contra hle + have hNM : M < N := lt_of_not_ge hle + have hpowers : (2 : ℝ) ^ (M + 1) ≤ (2 : ℝ) ^ N := + pow_le_pow_right₀ (by norm_num) (by omega) + linarith [hM.2, hlower] + +/-- Jensen's order-one cumulative bound need not imply an `O(log N)` +unit-shell count. The correct dyadic consequence still suffices: +`O(2^N (N+1))` roots above radius `2^N` give a summable +`O((N+1)/2^N)` inverse-square contribution. -/ +theorem summable_norm_inv_sq_of_dyadic_linear_log_shell_count + {ι : Type*} [DecidableEq ι] (root : ι → ℂ) + (shell : ℕ → Finset ι) + (hpartition : ∀ i, ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + (2 : ℝ) ^ N ≤ ‖root i‖) + (A : ℝ) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * (2 : ℝ) ^ N * (N + 1 : ℝ)) : + Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2) := by + rw [summable_partition (f := fun i ↦ ‖(root i)⁻¹‖ ^ 2) + (fun i ↦ sq_nonneg _) (s := fun N ↦ ↑(shell N)) + (by simpa using hpartition)] + constructor + · intro N + apply summable_of_hasFiniteSupport + exact Set.toFinite _ + · apply (summable_dyadic_linear_majorant A).of_nonneg_of_le + · intro N + exact tsum_nonneg fun _ ↦ sq_nonneg _ + · intro N + rw [tsum_fintype] + have hpow : 0 < (2 : ℝ) ^ N := pow_pos (by norm_num) _ + calc + ∑ i : ↥(↑(shell N) : Set ι), ‖(root i)⁻¹‖ ^ 2 + ≤ ∑ _i : ↥(↑(shell N) : Set ι), + 1 / ((2 : ℝ) ^ N) ^ 2 := by + apply Finset.sum_le_sum + intro i hi + rw [norm_inv, inv_pow] + have hsquareRoot : + ((2 : ℝ) ^ N) ^ 2 ≤ ‖root i‖ ^ 2 := + (sq_le_sq₀ hpow.le (norm_nonneg _)).mpr + (hlower N i i.property) + simpa [one_div] using + inv_anti₀ (sq_pos_of_pos hpow) hsquareRoot + _ = ((shell N).card : ℝ) / + ((2 : ℝ) ^ N) ^ 2 := by + simp [div_eq_mul_inv] + _ ≤ (A * (2 : ℝ) ^ N * (N + 1 : ℝ)) / + ((2 : ℝ) ^ N) ^ 2 := by + exact div_le_div_of_nonneg_right (hcount N) (sq_nonneg _) + _ = A * (N + 1 : ℝ) * (1 / 2 : ℝ) ^ N := by + field_simp + rw [div_pow] + norm_num + +/-- Finite low roots can be removed before applying the Jensen-compatible +dyadic shell estimate and restored afterward. -/ +theorem summable_norm_inv_sq_of_finite_low_and_dyadic_linear_log_shell_count + {ι : Type*} [DecidableEq ι] (root : ι → ℂ) + (low : Finset ι) + (shell : ℕ → Finset {i : ι // i ∉ low}) + (hpartition : ∀ i : {i : ι // i ∉ low}, + ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + (2 : ℝ) ^ N ≤ ‖root i‖) + (A : ℝ) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * (2 : ℝ) ^ N * (N + 1 : ℝ)) : + Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2) := by + have hc : Summable (fun i : {i : ι // i ∉ low} ↦ + ‖(root i)⁻¹‖ ^ 2) := + summable_norm_inv_sq_of_dyadic_linear_log_shell_count + (fun i : {i : ι // i ∉ low} ↦ root i) + shell hpartition hlower A hcount + exact (low.summable_compl_iff).mp hc + +/-- The half-open dyadic shell of xi multiplicity indices, after removing +an arbitrary finite low set. -/ +noncomputable def riemannXiDyadicZeroShell + (low : Finset RiemannXiZeroIndex) (N : ℕ) : + Finset {i : RiemannXiZeroIndex // i ∉ low} := by + classical + exact Finset.subtype (fun i ↦ i ∉ low) + ((riemannXiZeroIndexWindow ((2 : ℝ) ^ (N + 1))).filter + fun i ↦ (2 : ℝ) ^ N ≤ ‖riemannXiZeroRoot i‖ ∧ + ‖riemannXiZeroRoot i‖ < (2 : ℝ) ^ (N + 1)) + +@[simp] +theorem mem_riemannXiDyadicZeroShell + (low : Finset RiemannXiZeroIndex) (N : ℕ) + (i : {i : RiemannXiZeroIndex // i ∉ low}) : + i ∈ riemannXiDyadicZeroShell low N ↔ + (2 : ℝ) ^ N ≤ ‖riemannXiZeroRoot i‖ ∧ + ‖riemannXiZeroRoot i‖ < (2 : ℝ) ^ (N + 1) := by + classical + simp [riemannXiDyadicZeroShell] + intro _ h + exact h.le + +/-- Removing the radius-`R` window leaves a genuine disjoint dyadic +partition, including all multiplicity indices exactly once. -/ +theorem riemannXiDyadicZeroShell_partition + (R : ℝ) (hR : 1 ≤ R) : + ∀ i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow R}, + ∃! N, i ∈ + riemannXiDyadicZeroShell (riemannXiZeroIndexWindow R) N := by + intro i + have hiR : R < ‖riemannXiZeroRoot i‖ := by + simpa using i.property + obtain ⟨N, hN, huniq⟩ := + existsUnique_dyadic_interval ‖riemannXiZeroRoot i‖ + (hR.trans hiR.le) + refine ⟨N, (mem_riemannXiDyadicZeroShell _ _ _).mpr hN, ?_⟩ + intro M hM + exact huniq M ((mem_riemannXiDyadicZeroShell _ _ _).mp hM) + +theorem riemannXiDyadicZeroShell_card_le_window + (low : Finset RiemannXiZeroIndex) (N : ℕ) : + (riemannXiDyadicZeroShell low N).card ≤ + (riemannXiZeroIndexWindow ((2 : ℝ) ^ (N + 1))).card := by + classical + unfold riemannXiDyadicZeroShell + rw [Finset.card_subtype] + exact (Finset.card_filter_le _ _).trans + (Finset.card_filter_le _ _) + +/-- Exact dyadic cardinality consequence of a cumulative +`A₀ r log(2r+2)` multiplicity count. -/ +theorem riemannXiDyadicZeroShell_card_le_of_cumulative + {A₀ R : ℝ} (hA₀ : 0 ≤ A₀) + (hcum : ∀ r : ℝ, R ≤ r → + ((riemannXiZeroIndexWindow r).card : ℝ) ≤ + A₀ * r * Real.log (2 * r + 2)) : + ∀ N, + ((riemannXiDyadicZeroShell + (riemannXiZeroIndexWindow R) N).card : ℝ) ≤ + (6 * A₀ * Real.log 2) * (2 : ℝ) ^ N * + (N + 1 : ℝ) := by + intro N + let r : ℝ := (2 : ℝ) ^ (N + 1) + by_cases hr : R ≤ r + · have hcard : + ((riemannXiDyadicZeroShell + (riemannXiZeroIndexWindow R) N).card : ℝ) ≤ + ((riemannXiZeroIndexWindow r).card : ℝ) := by + dsimp [r] + exact_mod_cast riemannXiDyadicZeroShell_card_le_window + (riemannXiZeroIndexWindow R) N + have hcum' := hcard.trans (hcum r hr) + have hargpos : 0 < 2 * r + 2 := by positivity + have harg : 2 * r + 2 ≤ (2 : ℝ) ^ (N + 3) := by + dsimp [r] + rw [pow_add, pow_add] + norm_num + have hpow : 1 ≤ (2 : ℝ) ^ N := + one_le_pow₀ (by norm_num) + nlinarith + have hlog : Real.log (2 * r + 2) ≤ + 3 * (N + 1 : ℝ) * Real.log 2 := by + calc + Real.log (2 * r + 2) ≤ + Real.log ((2 : ℝ) ^ (N + 3)) := + Real.log_le_log hargpos harg + _ = (N + 3 : ℕ) * Real.log 2 := by + rw [Real.log_pow] + _ ≤ 3 * (N + 1 : ℝ) * Real.log 2 := by + have hlog2 : 0 ≤ Real.log 2 := + Real.log_nonneg (by norm_num) + norm_num [Nat.cast_add] + nlinarith + calc + ((riemannXiDyadicZeroShell + (riemannXiZeroIndexWindow R) N).card : ℝ) + ≤ A₀ * r * Real.log (2 * r + 2) := hcum' + _ ≤ A₀ * r * (3 * (N + 1 : ℝ) * Real.log 2) := by + gcongr + _ = (6 * A₀ * Real.log 2) * (2 : ℝ) ^ N * + (N + 1 : ℝ) := by + dsimp [r] + rw [pow_succ] + ring + · have hempty : + riemannXiDyadicZeroShell + (riemannXiZeroIndexWindow R) N = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro i hi + have hiShell := + (mem_riemannXiDyadicZeroShell _ _ _).mp hi + have hiR : R < ‖riemannXiZeroRoot i‖ := by + simpa using i.property + exact hr (hiR.le.trans hiShell.2.le) + rw [hempty] + simp + positivity + +/-- The xi dyadic shell tail has the quantitative source-standard +`O((N+1)/2^N)` inverse-square bound, with multiplicities and a finite low +window handled explicitly. -/ +theorem exists_riemannXiDyadicZeroShell_inv_sq_tail_bound : + ∃ A R : ℝ, 0 ≤ A ∧ 1 ≤ R ∧ ∀ N : ℕ, + (∑' m : ℕ, + ∑ i ∈ riemannXiDyadicZeroShell + (riemannXiZeroIndexWindow R) (N + m), + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) ≤ + A * (N + 1 : ℝ) / (2 : ℝ) ^ N := by + classical + obtain ⟨A₀, R, hA₀, hR, hcum⟩ := + exists_riemannXiZeroIndexWindow_card_le_orderOne + let low := riemannXiZeroIndexWindow R + let shell := riemannXiDyadicZeroShell low + let A := 24 * A₀ * Real.log 2 + refine ⟨A, R, ?_, hR, ?_⟩ + · exact mul_nonneg + (mul_nonneg (by norm_num) hA₀) + (Real.log_nonneg (by norm_num)) + · intro N + have htail := + tsum_norm_inv_sq_dyadic_shell_tail_le + (fun i : {i : RiemannXiZeroIndex // i ∉ low} ↦ + riemannXiZeroRoot i) + shell + (fun k i hi ↦ + ((mem_riemannXiDyadicZeroShell low k i).mp hi).1) + (6 * A₀ * Real.log 2) + (mul_nonneg + (mul_nonneg (by norm_num) hA₀) + (Real.log_nonneg (by norm_num))) + (fun k ↦ by + dsimp [shell, low] + exact riemannXiDyadicZeroShell_card_le_of_cumulative + hA₀ hcum k) + N + dsimp [shell, low, A] at * + convert htail using 1 + ring + +/-- Boundary-safe dyadic decomposition of the complement of the closed +radius-`2^N` xi-zero window. The strict first inequality excludes roots on +the truncation boundary, while the dyadic intervals remain half-open. -/ +noncomputable def riemannXiDyadicZeroTailShell (N m : ℕ) : + Finset RiemannXiZeroIndex := by + classical + exact + (riemannXiZeroIndexWindow ((2 : ℝ) ^ (N + m + 1))).filter + fun i ↦ (2 : ℝ) ^ N < ‖riemannXiZeroRoot i‖ ∧ + (2 : ℝ) ^ (N + m) ≤ ‖riemannXiZeroRoot i‖ ∧ + ‖riemannXiZeroRoot i‖ < (2 : ℝ) ^ (N + m + 1) + +@[simp] +theorem mem_riemannXiDyadicZeroTailShell + (N m : ℕ) (i : RiemannXiZeroIndex) : + i ∈ riemannXiDyadicZeroTailShell N m ↔ + (2 : ℝ) ^ N < ‖riemannXiZeroRoot i‖ ∧ + (2 : ℝ) ^ (N + m) ≤ ‖riemannXiZeroRoot i‖ ∧ + ‖riemannXiZeroRoot i‖ < (2 : ℝ) ^ (N + m + 1) := by + classical + simp [riemannXiDyadicZeroTailShell] + intro _ _ h + exact h.le + +/-- The complement of the closed radius-`2^N` window is exactly the union +of the boundary-safe shifted dyadic shells. -/ +theorem riemannXiZeroIndexWindow_compl_eq_iUnion_tailShell (N : ℕ) : + {i : RiemannXiZeroIndex | + i ∉ riemannXiZeroIndexWindow ((2 : ℝ) ^ N)} = + ⋃ m : ℕ, + (↑(riemannXiDyadicZeroTailShell N m) : + Set RiemannXiZeroIndex) := by + ext i + simp only [Set.mem_setOf_eq, Set.mem_iUnion, Finset.mem_coe, + mem_riemannXiDyadicZeroTailShell] + constructor + · intro hi + have hiN : (2 : ℝ) ^ N < ‖riemannXiZeroRoot i‖ := by + simpa using hi + obtain ⟨k, hk, huniq⟩ := + existsUnique_dyadic_interval ‖riemannXiZeroRoot i‖ + ((one_le_pow₀ (by norm_num)).trans hiN.le) + have hNk : N ≤ k := by + by_contra h + have hkN : k + 1 ≤ N := by omega + have hp : (2 : ℝ) ^ (k + 1) ≤ (2 : ℝ) ^ N := + pow_le_pow_right₀ (by norm_num) hkN + linarith [hk.2] + refine ⟨k - N, hiN, ?_, ?_⟩ + · simpa [Nat.add_sub_of_le hNk] using hk.1 + · simpa [Nat.add_sub_of_le hNk] using hk.2 + · rintro ⟨m, hiN, _⟩ + simpa using hiN + +/-- Distinct boundary-safe shifted dyadic shells are disjoint. -/ +theorem riemannXiDyadicZeroTailShell_disjoint (N : ℕ) + {m n : ℕ} (hmn : m ≠ n) : + Disjoint + (↑(riemannXiDyadicZeroTailShell N m) : + Set RiemannXiZeroIndex) + (↑(riemannXiDyadicZeroTailShell N n) : + Set RiemannXiZeroIndex) := by + rw [Set.disjoint_left] + intro i him hin + have hm := (mem_riemannXiDyadicZeroTailShell N m i).mp him + have hn := (mem_riemannXiDyadicZeroTailShell N n i).mp hin + by_cases hmn' : m < n + · have hp : + (2 : ℝ) ^ (N + m + 1) ≤ (2 : ℝ) ^ (N + n) := + pow_le_pow_right₀ (by norm_num) (by omega) + linarith + · have hnm : n < m := by omega + have hp : + (2 : ℝ) ^ (N + n + 1) ≤ (2 : ℝ) ^ (N + m) := + pow_le_pow_right₀ (by norm_num) (by omega) + linarith + +/-- Exact multiplicity-preserving reindexing of a summable xi-zero tail by +the boundary-safe shifted dyadic shells. -/ +theorem tsum_riemannXiZeroIndexWindow_compl_eq_tailShells + (N : ℕ) (f : RiemannXiZeroIndex → ℝ) (hf : Summable f) : + (∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow ((2 : ℝ) ^ N)}, f i) = + ∑' m : ℕ, + ∑ i ∈ riemannXiDyadicZeroTailShell N m, f i := by + let Tail := {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow ((2 : ℝ) ^ N)} + let t : ℕ → Set Tail := + fun m ↦ {i | i.1 ∈ riemannXiDyadicZeroTailShell N m} + have hpart : ∀ i : Tail, ∃! m, i ∈ t m := by + intro i + have hi : i.1 ∈ ⋃ m : ℕ, + (↑(riemannXiDyadicZeroTailShell N m) : + Set RiemannXiZeroIndex) := by + rw [← riemannXiZeroIndexWindow_compl_eq_iUnion_tailShell N] + exact i.property + simp only [Set.mem_iUnion, Finset.mem_coe] at hi + obtain ⟨m, hm⟩ := hi + refine ⟨m, hm, ?_⟩ + intro n hn + by_contra hmn + have hd := riemannXiDyadicZeroTailShell_disjoint N + (m := m) (n := n) (fun h ↦ hmn h.symm) + change i.1 ∈ riemannXiDyadicZeroTailShell N m at hm + change i.1 ∈ riemannXiDyadicZeroTailShell N n at hn + have hm' : i.1 ∈ + (↑(riemannXiDyadicZeroTailShell N m) : + Set RiemannXiZeroIndex) := hm + have hn' : i.1 ∈ + (↑(riemannXiDyadicZeroTailShell N n) : + Set RiemannXiZeroIndex) := hn + exact (Set.disjoint_left.mp hd hm') hn' + let e := Set.sigmaEquiv t hpart + have hsigma : + Summable (fun p : (m : ℕ) × t m ↦ f p.2) := by + change Summable ((fun i : Tail ↦ f i) ∘ e) + rw [e.summable_iff] + exact hf.subtype _ + calc + (∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow ((2 : ℝ) ^ N)}, f i) + = ∑' p : (m : ℕ) × t m, f p.2 := by + symm + exact e.tsum_eq (fun i : Tail ↦ f i) + _ = ∑' m : ℕ, ∑' i : t m, f i := hsigma.tsum_sigma + _ = ∑' m : ℕ, + ∑ i ∈ riemannXiDyadicZeroTailShell N m, f i := by + apply tsum_congr + intro m + let em : t m ≃ + {i // i ∈ riemannXiDyadicZeroTailShell N m} := { + toFun i := ⟨i.1.1, i.2⟩ + invFun i := ⟨⟨i.1, by + have hi := + (mem_riemannXiDyadicZeroTailShell N m i).mp i.2 + simpa using hi.1⟩, i.2⟩ + left_inv i := by + apply Subtype.ext + apply Subtype.ext + rfl + right_inv i := by + apply Subtype.ext + rfl } + calc + (∑' i : t m, f i) = + ∑' i : + {i // i ∈ riemannXiDyadicZeroTailShell N m}, + f i := by + exact em.tsum_eq + (fun i : + {i // i ∈ riemannXiDyadicZeroTailShell N m} ↦ f i) + _ = ∑ i ∈ riemannXiDyadicZeroTailShell N m, f i := + Finset.tsum_subtype _ _ + +/-- The explicit compatible scale `R_j = 2^j`, `N_j = 4j` makes the +radius-squared dyadic tail majorant tend to zero. This is the quantitative +choice required by the uniform canonical-tail estimate on the selected +Cartan circles. -/ +theorem tendsto_radius_sq_mul_four_mul_truncation_tail : + Tendsto (fun j : ℕ ↦ + ((2 : ℝ) ^ j) ^ 2 * + ((4 * j + 1 : ℝ) / (2 : ℝ) ^ (4 * j))) + atTop (𝓝 0) := by + have hself : + Tendsto (fun j : ℕ ↦ (j : ℝ) * (1 / 4 : ℝ) ^ j) + atTop (𝓝 0) := + tendsto_self_mul_const_pow_of_abs_lt_one (by norm_num) + have hgeom : + Tendsto (fun j : ℕ ↦ (1 / 4 : ℝ) ^ j) + atTop (𝓝 0) := + tendsto_pow_atTop_nhds_zero_of_lt_one + (by norm_num) (by norm_num) + convert (hself.const_mul 4).add hgeom using 1 + · funext j + rw [show (4 * j + 1 : ℝ) = 4 * (j : ℝ) + 1 by + norm_num] + rw [show ((2 : ℝ) ^ j) ^ 2 = (4 : ℝ) ^ j by + rw [← pow_mul] + rw [mul_comm j 2, pow_mul] + norm_num] + rw [show ((2 : ℝ) ^ (4 * j)) = (16 : ℝ) ^ j by + rw [pow_mul] + norm_num] + rw [show (4 : ℝ) ^ j * ((4 * (j : ℝ) + 1) / + (16 : ℝ) ^ j) = + (4 * (j : ℝ) + 1) * + ((4 : ℝ) ^ j / (16 : ℝ) ^ j) by ring] + rw [show (4 : ℝ) ^ j / (16 : ℝ) ^ j = + (1 / 4 : ℝ) ^ j by + rw [← div_pow] + norm_num] + ring + · norm_num + +/-- Once the Jensen low window lies inside radius `2^N`, each boundary-safe +tail shell injects into the sourced multiplicity shell at index `N+m`. -/ +theorem sum_riemannXiDyadicZeroTailShell_le_sourcedShell + {R : ℝ} {N m : ℕ} (hRN : R ≤ (2 : ℝ) ^ N) : + (∑ i ∈ riemannXiDyadicZeroTailShell N m, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) ≤ + ∑ i ∈ riemannXiDyadicZeroShell + (riemannXiZeroIndexWindow R) (N + m), + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 := by + classical + let low := riemannXiZeroIndexWindow R + let tail := riemannXiDyadicZeroTailShell N m + let st : Finset {i : RiemannXiZeroIndex // i ∉ low} := + Finset.subtype (fun i ↦ i ∉ low) tail + have hall : ∀ i ∈ tail, i ∉ low := by + intro i hi + have hit := + (mem_riemannXiDyadicZeroTailShell N m i).mp hi + rw [mem_riemannXiZeroIndexWindow] + exact not_le.mpr (hRN.trans_lt hit.1) + have hst : + st ⊆ riemannXiDyadicZeroShell low (N + m) := by + intro i hi + rw [mem_riemannXiDyadicZeroShell] + have hi : i.1 ∈ tail := by + simpa [st, Finset.mem_subtype] using hi + have hit := + (mem_riemannXiDyadicZeroTailShell N m i).mp hi + simpa [Nat.add_assoc] using hit.2 + have hsum : + (∑ i ∈ tail, ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) = + ∑ i ∈ st, ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 := by + apply Finset.sum_bij + (fun i hi ↦ (⟨i, hall i hi⟩ : + {i : RiemannXiZeroIndex // i ∉ low})) + · intro i hi + simp [st, hi] + · intro a ha b hb hab + exact congrArg Subtype.val hab + · intro b hb + have hb' : b.val ∈ tail := by + simpa [st, Finset.mem_subtype] using hb + exact ⟨b.val, hb', Subtype.ext rfl⟩ + · intro i hi + rfl + rw [hsum] + exact Finset.sum_le_sum_of_subset_of_nonneg hst + (fun _ _ _ ↦ sq_nonneg _) + +/-- Source-backed multiplicity-aware inverse-square estimate for the actual +complement of the closed radius-`2^N` xi window. -/ +theorem exists_riemannXiZeroRoot_inv_sq_radial_tail_bound : + ∃ A R : ℝ, 0 ≤ A ∧ 1 ≤ R ∧ ∀ N : ℕ, + R ≤ (2 : ℝ) ^ N → + (∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow ((2 : ℝ) ^ N)}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) ≤ + A * (N + 1 : ℝ) / (2 : ℝ) ^ N := by + classical + obtain ⟨A₀, R, hA₀, hR, hcum⟩ := + exists_riemannXiZeroIndexWindow_card_le_orderOne + let low := riemannXiZeroIndexWindow R + let shell := riemannXiDyadicZeroShell low + let A := 24 * A₀ * Real.log 2 + refine ⟨A, R, ?_, hR, ?_⟩ + · exact mul_nonneg + (mul_nonneg (by norm_num) hA₀) + (Real.log_nonneg (by norm_num)) + · intro N hRN + have hglobal : Summable (fun i : RiemannXiZeroIndex ↦ + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) := by + apply + summable_norm_inv_sq_of_finite_low_and_dyadic_linear_log_shell_count + riemannXiZeroRoot low shell + (A := 6 * A₀ * Real.log 2) + · dsimp [low, shell] + exact riemannXiDyadicZeroShell_partition R hR + · intro k i hi + exact ((mem_riemannXiDyadicZeroShell low k i).mp hi).1 + · intro k + dsimp [shell, low] + exact riemannXiDyadicZeroShell_card_le_of_cumulative + hA₀ hcum k + have hterm : ∀ m : ℕ, + (∑ i ∈ riemannXiDyadicZeroTailShell N m, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) ≤ + ∑ i ∈ shell (N + m), + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 := by + intro m + dsimp [shell, low] + exact sum_riemannXiDyadicZeroTailShell_le_sourcedShell hRN + have hshellSeries : Summable (fun k : ℕ ↦ + ∑ i ∈ shell k, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) := by + have hsub := + hglobal.subtype + (fun i : RiemannXiZeroIndex ↦ i ∉ low) + have hp := (summable_partition + (f := fun i : + {i : RiemannXiZeroIndex // i ∉ low} ↦ + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) + (fun i ↦ sq_nonneg _) + (s := fun k ↦ ↑(shell k)) + (by + dsimp [shell, low] + simpa using + riemannXiDyadicZeroShell_partition R hR)).mp hsub + convert hp.2 using 1 + funext k + exact (Finset.tsum_subtype (shell k) + (fun i : {i : RiemannXiZeroIndex // i ∉ low} ↦ + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2)).symm + have hright : Summable (fun m : ℕ ↦ + ∑ i ∈ shell (N + m), + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) := + hshellSeries.comp_injective (fun _ _ h ↦ by omega) + have hleft : Summable (fun m : ℕ ↦ + ∑ i ∈ riemannXiDyadicZeroTailShell N m, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) := + hright.of_nonneg_of_le + (fun m ↦ Finset.sum_nonneg fun _ _ ↦ sq_nonneg _) hterm + rw [tsum_riemannXiZeroIndexWindow_compl_eq_tailShells + N (fun i ↦ ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) + hglobal] + apply (Summable.tsum_le_tsum hterm hleft hright).trans + have hbound := + tsum_norm_inv_sq_dyadic_shell_tail_le + (fun i : {i : RiemannXiZeroIndex // i ∉ low} ↦ + riemannXiZeroRoot i) + shell + (fun k i hi ↦ + ((mem_riemannXiDyadicZeroShell low k i).mp hi).1) + (6 * A₀ * Real.log 2) + (mul_nonneg + (mul_nonneg (by norm_num) hA₀) + (Real.log_nonneg (by norm_num))) + (fun k ↦ by + dsimp [shell, low] + exact riemannXiDyadicZeroShell_card_le_of_cumulative + hA₀ hcum k) + N + exact hbound.trans_eq (by + dsimp [A] + ring) + +/-- The finite-head logarithmic loss at the compatible truncation +`T_j = 2^j` is subquadratic relative to circles of radius `2^j`. -/ +theorem tendsto_add_one_sq_div_two_pow : + Tendsto (fun j : ℕ ↦ + (j + 1 : ℝ) ^ 2 / (2 : ℝ) ^ j) atTop (𝓝 0) := by + have h2 := tendsto_pow_const_div_const_pow_of_one_lt 2 + (by norm_num : (1 : ℝ) < 2) + have h1 := tendsto_pow_const_div_const_pow_of_one_lt 1 + (by norm_num : (1 : ℝ) < 2) + have h0 := tendsto_pow_const_div_const_pow_of_one_lt 0 + (by norm_num : (1 : ℝ) < 2) + convert (h2.add (h1.const_mul 2)).add h0 using 1 + · funext j + norm_num + ring + · norm_num + +theorem tendsto_add_one_div_two_pow : + Tendsto (fun j : ℕ ↦ + (j + 1 : ℝ) / (2 : ℝ) ^ j) atTop (𝓝 0) := by + have h1 := tendsto_pow_const_div_const_pow_of_one_lt 1 + (by norm_num : (1 : ℝ) < 2) + have h0 := tendsto_pow_const_div_const_pow_of_one_lt 0 + (by norm_num : (1 : ℝ) < 2) + convert h1.add h0 using 1 + · funext j + norm_num + ring + · norm_num + +/-- Square-root form used by the Cauchy--Schwarz finite-head loss. -/ +theorem tendsto_sqrt_const_mul_add_one_div_two_pow (K : ℝ) : + Tendsto (fun j : ℕ ↦ + Real.sqrt (K * ((j + 1 : ℝ) / (2 : ℝ) ^ j))) + atTop (𝓝 0) := by + have h := tendsto_add_one_div_two_pow.const_mul K + have hs := Real.continuous_sqrt.continuousAt.tendsto.comp h + simpa [Function.comp_def] using hs + +theorem tendsto_const_mul_add_one_sq_div_two_pow (K : ℝ) : + Tendsto (fun j : ℕ ↦ + K * ((j + 1 : ℝ) ^ 2 / (2 : ℝ) ^ j)) + atTop (𝓝 0) := by + simpa using tendsto_add_one_sq_div_two_pow.const_mul K + +/-- Common normalized majorant for all selected-circle losses: root-log and +cardinality-log terms are quadratic-polynomial/geometric, inverse-root loss +is square-root geometric, and xi/tail terms are linear-geometric. -/ +def DyadicCartanLossMajorant + (Ksq Ksqrt Klin : ℝ) (j : ℕ) : ℝ := + Ksq * ((j + 1 : ℝ) ^ 2 / (2 : ℝ) ^ j) + + Real.sqrt (Ksqrt * ((j + 1 : ℝ) / (2 : ℝ) ^ j)) + + Klin * ((j + 1 : ℝ) / (2 : ℝ) ^ j) + +theorem tendsto_dyadicCartanLossMajorant + (Ksq Ksqrt Klin : ℝ) : + Tendsto (DyadicCartanLossMajorant Ksq Ksqrt Klin) + atTop (𝓝 0) := by + have hsq := + tendsto_const_mul_add_one_sq_div_two_pow Ksq + have hsqrt := + tendsto_sqrt_const_mul_add_one_div_two_pow Ksqrt + have hlin := tendsto_add_one_div_two_pow.const_mul Klin + change Tendsto (fun j : ℕ ↦ + Ksq * ((j + 1 : ℝ) ^ 2 / (2 : ℝ) ^ j) + + Real.sqrt (Ksqrt * ((j + 1 : ℝ) / (2 : ℝ) ^ j)) + + Klin * ((j + 1 : ℝ) / (2 : ℝ) ^ j)) atTop (𝓝 0) + convert (hsq.add hsqrt).add hlin using 1 + norm_num + +/-- Epsilon form consumed by the boundary-growth interface. -/ +theorem eventually_dyadicCartanLossMajorant_lt + (Ksq Ksqrt Klin ε : ℝ) (hε : 0 < ε) : + ∀ᶠ j : ℕ in atTop, + DyadicCartanLossMajorant Ksq Ksqrt Klin j < ε := by + exact (tendsto_order.1 + (tendsto_dyadicCartanLossMajorant Ksq Ksqrt Klin)).2 ε hε + +/-- A crude `log x ≤ x` estimate is enough for the Cartan cardinality loss; +it avoids inserting any hidden local zero-count hypothesis. -/ +theorem card_mul_log_three_mul_div_sq_le + {n B H u : ℝ} + (hn : 0 < n) (hB : 0 ≤ B) (hH : 0 < H) + (hu : 0 ≤ u) (hnB : n ≤ B * H * u) : + n * Real.log (3 * n / H) / H ^ 2 ≤ + 3 * B ^ 2 * u ^ 2 / H := by + have hx : 0 ≤ 3 * n / H := by positivity + have hlog := Real.log_le_self hx + have hn2 : n ^ 2 ≤ (B * H * u) ^ 2 := + (sq_le_sq₀ hn.le + (mul_nonneg (mul_nonneg hB hH.le) hu)).mpr hnB + calc + n * Real.log (3 * n / H) / H ^ 2 + ≤ n * (3 * n / H) / H ^ 2 := by gcongr + _ = 3 * n ^ 2 / H ^ 3 := by field_simp + _ ≤ 3 * (B * H * u) ^ 2 / H ^ 3 := by + gcongr + _ = 3 * B ^ 2 * u ^ 2 / H := by + field_simp + +/-- Jensen's cumulative multiplicity count at the compatible cutoff +`2^(j+2)` has the explicit `O(2^j(j+1))` form. -/ +theorem exists_riemannXiZeroIndexWindow_card_le_dyadic : + ∃ B R : ℝ, 0 ≤ B ∧ 1 ≤ R ∧ ∀ j : ℕ, + R ≤ (2 : ℝ) ^ (j + 2) → + ((riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) ≤ + B * (2 : ℝ) ^ j * (j + 1 : ℝ) := by + obtain ⟨A, R, hA, hR, hcount⟩ := + exists_riemannXiZeroIndexWindow_card_le_orderOne + let B := 16 * A * Real.log 2 + refine ⟨B, R, by positivity, hR, ?_⟩ + intro j hj + have hc := hcount ((2 : ℝ) ^ (j + 2)) hj + have hj2 : (2 : ℝ) ^ (j + 2) = + 4 * (2 : ℝ) ^ j := by + rw [pow_add] + norm_num + ring + have hj4 : (2 : ℝ) ^ (j + 4) = + 16 * (2 : ℝ) ^ j := by + rw [pow_add] + norm_num + ring + have harg : 2 * (2 : ℝ) ^ (j + 2) + 2 ≤ + (2 : ℝ) ^ (j + 4) := by + rw [hj2, hj4] + have hp : 1 ≤ (2 : ℝ) ^ j := + one_le_pow₀ (by norm_num) + nlinarith + have hlog : + Real.log (2 * (2 : ℝ) ^ (j + 2) + 2) ≤ + 4 * (j + 1 : ℝ) * Real.log 2 := by + calc + _ ≤ Real.log ((2 : ℝ) ^ (j + 4)) := + Real.log_le_log (by positivity) harg + _ = (j + 4 : ℕ) * Real.log 2 := by + rw [Real.log_pow] + _ ≤ 4 * (j + 1 : ℝ) * Real.log 2 := by + have hl : 0 ≤ Real.log 2 := + Real.log_nonneg (by norm_num) + norm_num [Nat.cast_add] + nlinarith + calc + ((riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) + ≤ A * (2 : ℝ) ^ (j + 2) * + Real.log (2 * (2 : ℝ) ^ (j + 2) + 2) := hc + _ ≤ A * (2 : ℝ) ^ (j + 2) * + (4 * (j + 1 : ℝ) * Real.log 2) := by + gcongr + _ = B * (2 : ℝ) ^ j * (j + 1 : ℝ) := by + dsimp [B] + rw [hj2] + ring + +/-- Unconditional inverse-square summability of the canonical +multiplicity enumeration of xi zeros, derived from Jensen's formula and +the proved global order-one estimate. -/ +theorem summable_norm_inv_sq_riemannXiZeroRoot : + Summable (fun i : RiemannXiZeroIndex ↦ + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) := by + classical + obtain ⟨A₀, R, hA₀, hR, hcum⟩ := + exists_riemannXiZeroIndexWindow_card_le_orderOne + let low := riemannXiZeroIndexWindow R + let shell := riemannXiDyadicZeroShell low + apply + summable_norm_inv_sq_of_finite_low_and_dyadic_linear_log_shell_count + riemannXiZeroRoot low shell + (A := 6 * A₀ * Real.log 2) + · dsimp [low, shell] + exact riemannXiDyadicZeroShell_partition R hR + · intro N i hi + exact ((mem_riemannXiDyadicZeroShell low N i).mp hi).1 + · intro N + dsimp [shell, low] + exact riemannXiDyadicZeroShell_card_le_of_cumulative + hA₀ hcum N + +/-- Reflection turns the paired inverse-root term into an absolutely +summable inverse-quadratic term. -/ +theorem summable_riemannXiZeroRoot_inv_mul_reflection : + Summable (fun i : RiemannXiZeroIndex ↦ + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹) := by + rw [← summable_norm_iff] + apply Summable.of_nonneg_of_le (fun i ↦ norm_nonneg _) ?_ + ((summable_norm_inv_sq_riemannXiZeroRoot.add + (summable_norm_inv_sq_riemannXiZeroRoot.comp_injective + riemannXiZeroReflection_injective)).mul_left (1 / 2)) + intro i + simp only [Function.comp_apply] + rw [← riemannXiZeroRoot_reflection, mul_inv, norm_mul, one_div] + nlinarith [sq_nonneg + (‖(riemannXiZeroRoot i)⁻¹‖ - + ‖(riemannXiZeroRoot (riemannXiZeroReflection i))⁻¹‖)] + +theorem riemannXiPairedInverseRootHeightSums_tendsto : + Tendsto + (fun N : ℕ ↦ ∑ i ∈ riemannXiZeroHeightWindow (N : ℝ), + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹) + atTop (𝓝 (∑' i : RiemannXiZeroIndex, + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹)) := + summable_riemannXiZeroRoot_inv_mul_reflection.hasSum.comp + riemannXiZeroHeightWindow_nat_tendsto_atTop + +/-- The conditionally ordered inverse-root sum along exact symmetric-height +windows therefore has an unconditional limit. -/ +theorem riemannXiInverseRootHeightSums_tendsto : + Tendsto + (fun N : ℕ ↦ ∑ i ∈ riemannXiZeroHeightWindow (N : ℝ), + (riemannXiZeroRoot i)⁻¹) + atTop (𝓝 ((1 / 2 : ℂ) * ∑' i : RiemannXiZeroIndex, + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹)) := by + convert (tendsto_const_nhds.mul + riemannXiPairedInverseRootHeightSums_tendsto) using 1 + funext N + rw [← two_mul_sum_inv_riemannXiZeroHeightWindow] + ring + +theorem heightSymmetricLiCauchy_of_quadraticPairedCancellation + {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) + (hcancel : QuadraticPairedLiShellCancellation root cutoff) : + HeightSymmetricLiCauchy root cutoff := by + choose B hB hbound using hcancel + apply heightSymmetricLiCauchy_of_shell_majorants root cutoff + (fun n N ↦ B n * Real.log (N + 2) / + (((N + 2 : ℕ) : ℝ) ^ 2)) + · exact fun n ↦ summable_log_div_square_shell_majorant (B n) (hB n) + · exact hbound + +/-- Completeness of `ℂ` transfers explicit Cauchy estimates into a coefficient +sequence and the corresponding symmetric-limit interface. -/ +theorem exists_heightSymmetricLiLimit_of_cauchy + {ι : Type*} [DecidableEq ι] + (root : ι → ℂ) (cutoff : ℕ → Finset ι) (height : ℕ → ℝ) + (hheight : Tendsto height atTop atTop) + (hcutoff : ∀ N i, i ∈ cutoff N ↔ |(root i).im| ≤ height N) + (hcauchy : HeightSymmetricLiCauchy root cutoff) : + ∃ coefficient : ℕ → ℂ, + HeightSymmetricLiLimit root cutoff height coefficient := by + choose coefficient hcoefficient using + fun n ↦ cauchySeq_tendsto_of_complete (hcauchy n) + exact ⟨coefficient, hheight, hcutoff, hcoefficient⟩ + +/-- Every fixed indexed zero eventually enters an exact symmetric-height +exhaustion. -/ +theorem HeightSymmetricLiLimit.eventually_mem + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + {coefficient : ℕ → ℂ} + (hlimit : HeightSymmetricLiLimit root cutoff height coefficient) + (i : ι) : + ∀ᶠ N in atTop, i ∈ cutoff N := by + filter_upwards [hlimit.1.eventually (eventually_ge_atTop |(root i).im|)] with N hN + exact (hlimit.2.1 N i).2 hN + +/-- Every fixed finite family is eventually contained in a symmetric-height +window. This is the finite-window stabilization interface used before any +infinite product theorem is invoked. -/ +theorem HeightSymmetricLiLimit.eventually_subset + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + {coefficient : ℕ → ℂ} + (hlimit : HeightSymmetricLiLimit root cutoff height coefficient) + (F : Finset ι) : + ∀ᶠ N in atTop, F ⊆ cutoff N := by + change ∀ᶠ N in atTop, ∀ i ∈ F, i ∈ cutoff N + exact (Finset.eventually_all F).2 fun i _ ↦ hlimit.eventually_mem i + +/-- For a finite indexed family, an exact symmetric exhaustion eventually +stabilizes at the full finite Li sum, so its declared limit is forced to be +that sum. -/ +theorem HeightSymmetricLiLimit.coefficient_eq_finite_sum + {ι : Type*} [Fintype ι] [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + {coefficient : ℕ → ℂ} + (hlimit : HeightSymmetricLiLimit root cutoff height coefficient) + (n : ℕ) : + coefficient n = ∑ i, liZeroSummand n (root i) := by + have hfull : ∀ᶠ N in atTop, cutoff N = Finset.univ := by + filter_upwards [hlimit.eventually_subset Finset.univ] with N hN + exact Finset.Subset.antisymm (Finset.subset_univ _) hN + have hconst : (fun N ↦ liZeroPartialSum root (cutoff N) n) =ᶠ[atTop] + fun _ ↦ ∑ i, liZeroSummand n (root i) := by + filter_upwards [hfull] with N hN + simp [liZeroPartialSum, hN] + apply tendsto_nhds_unique (hlimit.2.2 n) + exact tendsto_const_nhds.congr' hconst.symm + +/-- Transfer a symmetric zero-sum limit through exact finite approximants. +This isolates the derivative/zero-sum bridge: for xi, one must construct +`approximation` and prove both hypotheses below. -/ +theorem HeightSymmetricLiLimit.coefficient_eq_of_approximation + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + {coefficient : ℕ → ℂ} + (hlimit : HeightSymmetricLiLimit root cutoff height coefficient) + (approximation : ℕ → ℕ → ℂ) (target : ℕ → ℂ) + (hexact : ∀ N n, approximation N n = + liZeroPartialSum root (cutoff N) n) + (htarget : ∀ n, Tendsto (fun N ↦ approximation N n) + atTop (𝓝 (target n))) : + coefficient = target := by + funext n + apply tendsto_nhds_unique (hlimit.2.2 n) + simpa only [hexact] using htarget n + +/-- Locally uniform convergence of holomorphic functions propagates through +every iterated derivative on an open complex domain. + +This is the all-order form of Mathlib's +`TendstoLocallyUniformlyOn.deriv`; the holomorphy needed at later induction +steps follows from complex analyticity. -/ +theorem tendstoLocallyUniformlyOn_iteratedDeriv + {ι : Type*} {p : Filter ι} {f : ι → ℂ → ℂ} {g : ℂ → ℂ} + {s : Set ℂ} (hs : IsOpen s) + (hconv : TendstoLocallyUniformlyOn f g p s) + (hhol : ∀ᶠ i in p, DifferentiableOn ℂ (f i) s) + (k : ℕ) : + TendstoLocallyUniformlyOn + (fun i ↦ iteratedDeriv k (f i)) (iteratedDeriv k g) p s := by + induction k with + | zero => + simpa only [iteratedDeriv_zero] using hconv + | succ k ih => + rw [iteratedDeriv_succ] + convert ih.deriv (by + filter_upwards [hhol] with i hi + rw [iteratedDeriv_eq_iterate] + exact ((hi.analyticOnNhd hs).iterated_deriv k).differentiableOn) hs using 1 + ext i z + simp [Function.comp_apply, iteratedDeriv_succ] + +/-- Explicit nonvanishing-neighborhood transfer for logarithmic derivatives. + +The denominator is required to be nonzero throughout `s`, not merely at the +coefficient center. This stronger condition is what permits a locally +uniform quotient, which can then be differentiated to arbitrary order. -/ +theorem tendstoLocallyUniformlyOn_logDeriv + {ι : Type*} {p : Filter ι} [p.NeBot] + {f : ι → ℂ → ℂ} {g : ℂ → ℂ} + {s : Set ℂ} (hs : IsOpen s) + (hconv : TendstoLocallyUniformlyOn f g p s) + (hhol : ∀ᶠ i in p, DifferentiableOn ℂ (f i) s) + (hg0 : ∀ z ∈ s, g z ≠ 0) : + TendstoLocallyUniformlyOn + (fun i z ↦ logDeriv (f i) z) (fun z ↦ logDeriv g z) p s := by + have hgDiff : DifferentiableOn ℂ g s := + hconv.differentiableOn hhol hs + have hderiv := hconv.deriv hhol hs + simp only [logDeriv, Pi.div_apply] + convert hderiv.div₀ hconv (hgDiff.deriv hs).continuousOn + hgDiff.continuousOn hg0 using 1 + · ext i z + rfl + · ext z + rfl + +/-- All Taylor coefficients of logarithmic derivatives converge under local +uniform convergence, holomorphy, and explicit nonvanishing on a common open +neighborhood. -/ +theorem iteratedDeriv_logDeriv_tendsto + {ι : Type*} {p : Filter ι} [p.NeBot] + {f : ι → ℂ → ℂ} {g : ℂ → ℂ} {s : Set ℂ} {x : ℂ} + (hs : IsOpen s) (hx : x ∈ s) + (hconv : TendstoLocallyUniformlyOn f g p s) + (hhol : ∀ᶠ i in p, DifferentiableOn ℂ (f i) s) + (hf0 : ∀ᶠ i in p, ∀ z ∈ s, f i z ≠ 0) + (hg0 : ∀ z ∈ s, g z ≠ 0) (k : ℕ) : + Tendsto (fun i ↦ iteratedDeriv k (logDeriv (f i)) x) p + (𝓝 (iteratedDeriv k (logDeriv g) x)) := by + have hlog := tendstoLocallyUniformlyOn_logDeriv hs hconv hhol hg0 + have hlogHol : ∀ᶠ i in p, DifferentiableOn ℂ (logDeriv (f i)) s := by + filter_upwards [hhol, hf0] with i hi hi0 + change DifferentiableOn ℂ (deriv (f i) / f i) s + exact (hi.deriv hs).div hi hi0 + exact (tendstoLocallyUniformlyOn_iteratedDeriv + hs hlog hlogHol k).tendsto_at hx + +/-- The genus-one Weierstrass primary factor `E₁(w)`. -/ +def genusOnePrimaryFactor (w : ℂ) : ℂ := + (1 - w) * Complex.exp w + +/-- Quadratic cancellation in the genus-one factor. This is the local +estimate that turns inverse-square zero summability into normal convergence. -/ +theorem norm_genusOnePrimaryFactor_sub_one_le + (w : ℂ) (hw : ‖w‖ ≤ 1) : + ‖genusOnePrimaryFactor w - 1‖ ≤ 3 * ‖w‖ ^ 2 := by + have hrem : ‖Complex.exp w - 1 - w‖ ≤ ‖w‖ ^ 2 := by + simpa using Complex.norm_exp_sub_one_sub_id_le hw + have hexp : ‖Complex.exp w - 1‖ ≤ 2 * ‖w‖ := + Complex.norm_exp_sub_one_le hw + rw [show genusOnePrimaryFactor w - 1 = + (Complex.exp w - 1 - w) - w * (Complex.exp w - 1) by + unfold genusOnePrimaryFactor + ring] + calc + _ ≤ ‖Complex.exp w - 1 - w‖ + ‖w * (Complex.exp w - 1)‖ := + norm_sub_le _ _ + _ ≤ ‖w‖ ^ 2 + ‖w‖ * (2 * ‖w‖) := by + gcongr + rw [norm_mul] + gcongr + _ = 3 * ‖w‖ ^ 2 := by ring + +def genusOneCanonicalFactor {ι : Type*} + (root : ι → ℂ) (i : ι) (s : ℂ) : ℂ := + genusOnePrimaryFactor (s / root i) + +set_option maxHeartbeats 800000 in +/-- Strong normal-convergence theorem for genus-one canonical products. +Multiplicity is represented by the index type, so repeated roots contribute +repeated factors. -/ +theorem hasProdLocallyUniformlyOn_genusOneCanonicalFactor + {ι : Type*} (root : ι → ℂ) + (hinv : Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2)) + (hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i in cofinite, ∀ s ∈ K, ‖s / root i‖ ≤ 1) : + HasProdLocallyUniformlyOn (genusOneCanonicalFactor root) + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ := by + apply hasProdLocallyUniformlyOn_of_forall_compact isOpen_univ + intro K hKu hK + obtain ⟨R, hR⟩ := hK.isBounded.exists_norm_le + have hu : Summable (fun i ↦ 3 * R ^ 2 * ‖(root i)⁻¹‖ ^ 2) := + hinv.mul_left (3 * R ^ 2) + have hp := hu.hasProdUniformlyOn_one_add + (f := fun i s ↦ genusOneCanonicalFactor root i s - 1) hK + (by + filter_upwards [hsmall K hK] with i hi s hs + have hfactor := + norm_genusOnePrimaryFactor_sub_one_le (s / root i) (hi s hs) + apply hfactor.trans + rw [norm_div, norm_inv, div_eq_mul_inv, mul_pow] + have hsquare : ‖s‖ ^ 2 ≤ R ^ 2 := + (sq_le_sq₀ (norm_nonneg s) + ((norm_nonneg s).trans (hR s hs))).2 (hR s hs) + calc + 3 * (‖s‖ ^ 2 * ‖root i‖⁻¹ ^ 2) ≤ + 3 * (R ^ 2 * ‖root i‖⁻¹ ^ 2) := by + gcongr + _ = 3 * R ^ 2 * ‖root i‖⁻¹ ^ 2 := by ring) + (by + intro i + unfold genusOneCanonicalFactor genusOnePrimaryFactor + fun_prop) + simpa [sub_eq_add_neg, add_assoc] using hp + +theorem genusOneCanonicalFactor_ne_zero_iff + {ι : Type*} {root : ι → ℂ} + (hroot0 : ∀ i, root i ≠ 0) (i : ι) (s : ℂ) : + genusOneCanonicalFactor root i s ≠ 0 ↔ s ≠ root i := by + constructor + · intro hf hs + subst s + apply hf + unfold genusOneCanonicalFactor genusOnePrimaryFactor + simp [hroot0 i] + · intro hs + unfold genusOneCanonicalFactor genusOnePrimaryFactor + apply mul_ne_zero + · rw [sub_ne_zero] + intro hone + apply hs + exact (div_eq_one_iff_eq (hroot0 i)).mp hone.symm + · exact Complex.exp_ne_zero _ + +theorem logDeriv_genusOneCanonicalFactor_riemannXi_one + (i : RiemannXiZeroIndex) : + logDeriv (genusOneCanonicalFactor riemannXiZeroRoot i) 1 = + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹ := by + have hroot := riemannXiZeroRoot_ne_zero i + have hone : (1 : ℂ) ≠ riemannXiZeroRoot i := by + intro h + have := (riemannXiZeroRoot_mem_openCriticalStrip i).2 + rw [← h] at this + norm_num at this + unfold genusOneCanonicalFactor genusOnePrimaryFactor + rw [logDeriv_mul] + · have hsub : HasDerivAt + (fun s : ℂ ↦ 1 - s / riemannXiZeroRoot i) + (-(riemannXiZeroRoot i)⁻¹) 1 := by + simpa [id_eq] using + ((hasDerivAt_id (𝕜 := ℂ) (1 : ℂ)).div_const + (riemannXiZeroRoot i)).const_sub 1 + have hexp : HasDerivAt + (fun s : ℂ ↦ Complex.exp (s / riemannXiZeroRoot i)) + (Complex.exp (1 / riemannXiZeroRoot i) / + riemannXiZeroRoot i) 1 := by + simpa [id_eq, div_eq_mul_inv] using + ((hasDerivAt_id (𝕜 := ℂ) (1 : ℂ)).div_const + (riemannXiZeroRoot i)).cexp + simp only [logDeriv_apply] + rw [hsub.deriv, hexp.deriv] + field_simp + ring + · simpa [sub_ne_zero] using hone.symm + · exact Complex.exp_ne_zero _ + · fun_prop + · fun_prop + +theorem logDeriv_riemannXiHeightGenusOneProduct_one (T : ℝ) : + logDeriv + (fun s ↦ ∏ i ∈ riemannXiZeroHeightWindow T, + genusOneCanonicalFactor riemannXiZeroRoot i s) 1 = + ∑ i ∈ riemannXiZeroHeightWindow T, + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹ := by + rw [logDeriv_prod] + · apply Finset.sum_congr rfl + intro i hi + exact logDeriv_genusOneCanonicalFactor_riemannXi_one i + · intro i hi + exact (genusOneCanonicalFactor_ne_zero_iff + riemannXiZeroRoot_ne_zero i 1).mpr (by + intro h + have := (riemannXiZeroRoot_mem_openCriticalStrip i).2 + rw [← h] at this + norm_num at this) + · intro i hi + unfold genusOneCanonicalFactor genusOnePrimaryFactor + fun_prop + +/-- The quadratic factor estimate is summable at every point. -/ +theorem summable_norm_genusOneCanonicalFactor_sub_one + {ι : Type*} (root : ι → ℂ) + (hinv : Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2)) + (hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i in cofinite, ∀ s ∈ K, ‖s / root i‖ ≤ 1) + (s : ℂ) : + Summable (fun i ↦ ‖genusOneCanonicalFactor root i s - 1‖) := by + have hu : Summable + (fun i ↦ 3 * ‖s‖ ^ 2 * ‖(root i)⁻¹‖ ^ 2) := + hinv.mul_left (3 * ‖s‖ ^ 2) + apply Summable.of_norm_bounded_eventually hu + filter_upwards [hsmall {s} isCompact_singleton] with i hi + have hfactor := + norm_genusOnePrimaryFactor_sub_one_le (s / root i) + (hi s (Set.mem_singleton s)) + rw [Real.norm_eq_abs, abs_of_nonneg (norm_nonneg _)] + apply hfactor.trans + rw [norm_div, norm_inv, div_eq_mul_inv, mul_pow] + ring_nf + exact le_rfl + +/-- The normally convergent genus-one product has no zeros other than its +listed roots. -/ +theorem genusOneCanonicalProduct_ne_zero_iff + {ι : Type*} (root : ι → ℂ) + (hroot0 : ∀ i, root i ≠ 0) + (hinv : Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2)) + (hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i in cofinite, ∀ s ∈ K, ‖s / root i‖ ≤ 1) + (s : ℂ) : + (∏' i, genusOneCanonicalFactor root i s) ≠ 0 ↔ + ∀ i, s ≠ root i := by + constructor + · intro h i hi + apply h + have hz : genusOneCanonicalFactor root i s = 0 := + not_ne_iff.mp + ((genusOneCanonicalFactor_ne_zero_iff hroot0 i s).not.mpr + (not_ne_iff.mpr hi)) + exact (hasProd_zero_of_exists_eq_zero ⟨i, hz⟩).tprod_eq + · intro hs + have hsum := + summable_norm_genusOneCanonicalFactor_sub_one + root hinv hsmall s + have hne : ∀ i, + 1 + (genusOneCanonicalFactor root i s - 1) ≠ 0 := by + intro i + simpa using + (genusOneCanonicalFactor_ne_zero_iff hroot0 i s).mpr + (hs i) + simpa using tprod_one_add_ne_zero_of_summable hne hsum + +/-- Normal convergence makes the whole canonical product entire. -/ +theorem analyticOnNhd_genusOneCanonicalProduct + {ι : Type*} {root : ι → ℂ} + (hprod : HasProdLocallyUniformlyOn + (genusOneCanonicalFactor root) + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ) : + AnalyticOnNhd ℂ + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ := by + apply (hprod.differentiableOn (by + filter_upwards [] with t + have hd : DifferentiableOn ℂ + (∏ i ∈ t, genusOneCanonicalFactor root i) Set.univ := by + apply DifferentiableOn.finsetProd + intro i hi + have hdiff : Differentiable ℂ + (genusOneCanonicalFactor root i) := by + unfold genusOneCanonicalFactor genusOnePrimaryFactor + fun_prop + exact hdiff.differentiableOn + exact hd.congr (fun z hz ↦ by simp)) + isOpen_univ).analyticOnNhd isOpen_univ + +/-- Every individual genus-one factor has a simple zero at its root. -/ +theorem analyticOrderAt_genusOneCanonicalFactor_root + {ι : Type*} {root : ι → ℂ} + (hroot0 : ∀ i, root i ≠ 0) (i : ι) : + analyticOrderAt (genusOneCanonicalFactor root i) (root i) = 1 := by + let f : ℂ → ℂ := fun z ↦ 1 - z / root i + let g : ℂ → ℂ := fun z ↦ Complex.exp (z / root i) + have hf : AnalyticAt ℂ f (root i) := by + dsimp [f] + fun_prop + have hg : AnalyticAt ℂ g (root i) := by + dsimp [g] + fun_prop + have hf0 : f (root i) = 0 := by + dsimp [f] + rw [div_self (hroot0 i), sub_self] + have hfd : deriv f (root i) ≠ 0 := by + have heq : deriv f (root i) = -(root i)⁻¹ := by + dsimp [f] + simp [deriv_div_const] + rw [heq] + exact neg_ne_zero.mpr (inv_ne_zero (hroot0 i)) + have hfo : analyticOrderAt f (root i) = 1 := + hf.analyticOrderAt_eq_one_of_zero_deriv_ne_zero hf0 hfd + have hgo : analyticOrderAt g (root i) = 0 := + hg.analyticOrderAt_eq_zero.mpr (Complex.exp_ne_zero _) + change analyticOrderAt (f * g) (root i) = 1 + rw [analyticOrderAt_mul hf hg, hfo, hgo, add_zero] + +set_option maxHeartbeats 800000 in +private theorem analyticOrderAt_genusOneCanonicalProduct_of_nonempty_fiber + {ι : Type*} [DecidableEq ι] {root : ι → ℂ} + (hroot0 : ∀ i, root i ≠ 0) + (hinv : Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2)) + (hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i in cofinite, ∀ s ∈ K, ‖s / root i‖ ≤ 1) + (J : Finset ι) (z : ℂ) + (hJ : ∀ i, i ∈ J ↔ root i = z) + (i0 : ι) (hi0 : i0 ∈ J) : + analyticOrderAt + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) z = + J.card := by + let κ := {i : ι // i ∉ J} + let rootC : κ → ℂ := fun i ↦ root i + let Q : ℂ → ℂ := + fun s ↦ ∏' i : κ, genusOneCanonicalFactor rootC i s + have hrootC0 : ∀ i, rootC i ≠ 0 := fun i ↦ hroot0 i + have hinvC : Summable (fun i ↦ ‖(rootC i)⁻¹‖ ^ 2) := by + simpa [rootC, κ, Function.comp_def] using + hinv.subtype (fun i ↦ i ∉ J) + have hsmallC : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i in cofinite, ∀ s ∈ K, ‖s / rootC i‖ ≤ 1 := by + intro K hK + exact Subtype.coe_injective.tendsto_cofinite.eventually + (hsmall K hK) + have hprodC : HasProdLocallyUniformlyOn + (genusOneCanonicalFactor rootC) Q Set.univ := + hasProdLocallyUniformlyOn_genusOneCanonicalFactor + rootC hinvC hsmallC + have hQA : AnalyticOnNhd ℂ Q Set.univ := + analyticOnNhd_genusOneCanonicalProduct hprodC + have hQz : Q z ≠ 0 := by + apply (genusOneCanonicalProduct_ne_zero_iff + rootC hrootC0 hinvC hsmallC z).mpr + intro i hiz + apply i.property + exact (hJ i).mpr hiz.symm + let B : ℂ → ℂ := fun s ↦ genusOnePrimaryFactor (s / z) + have hz0 : z ≠ 0 := by + rw [← (hJ i0).mp hi0] + exact hroot0 i0 + have hfinite : (fun s ↦ ∏ i ∈ J, + genusOneCanonicalFactor root i s) = B ^ J.card := by + funext s + rw [Pi.pow_apply] + change (∏ i ∈ J, genusOnePrimaryFactor (s / root i)) = + genusOnePrimaryFactor (s / z) ^ J.card + rw [← Finset.prod_const] + apply Finset.prod_congr rfl + intro i hi + rw [(hJ i).mp hi] + have hfull : (fun s ↦ ∏' i, + genusOneCanonicalFactor root i s) = + (fun s ↦ ∏ i ∈ J, genusOneCanonicalFactor root i s) * Q := by + funext s + have hs := + (J.hasProd (fun i ↦ genusOneCanonicalFactor root i s)).mul_compl + (hprodC.hasProd (Set.mem_univ s)) + exact hs.tprod_eq + have hBA : AnalyticAt ℂ B z := by + dsimp [B, genusOnePrimaryFactor] + fun_prop + have hBorder : analyticOrderAt B z = 1 := by + have hfun : B = genusOneCanonicalFactor root i0 := by + funext s + unfold B genusOneCanonicalFactor + rw [(hJ i0).mp hi0] + rw [hfun, ← (hJ i0).mp hi0] + exact analyticOrderAt_genusOneCanonicalFactor_root hroot0 i0 + rw [hfull, hfinite, analyticOrderAt_mul + (hBA.pow J.card) (hQA z (Set.mem_univ z)), + analyticOrderAt_pow hBA, hBorder, + (hQA z (Set.mem_univ z)).analyticOrderAt_eq_zero.mpr hQz] + simp + +set_option maxHeartbeats 800000 in +/-- Exact multiplicity theorem for the infinite canonical product. The +finite fibers explicitly encode repeated roots. -/ +theorem analyticOrderAt_genusOneCanonicalProduct + {ι : Type*} [DecidableEq ι] {root : ι → ℂ} + (hroot0 : ∀ i, root i ≠ 0) + (hinv : Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2)) + (hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i in cofinite, ∀ s ∈ K, ‖s / root i‖ ≤ 1) + (fiber : ℂ → Finset ι) + (hfiber : ∀ z i, i ∈ fiber z ↔ root i = z) + (z : ℂ) : + analyticOrderAt + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) z = + (fiber z).card := by + by_cases hempty : fiber z = ∅ + · have hprod := + hasProdLocallyUniformlyOn_genusOneCanonicalFactor + root hinv hsmall + have hA := analyticOnNhd_genusOneCanonicalProduct hprod + rw [hempty] + simp only [Finset.card_empty, Nat.cast_zero] + rw [(hA z (Set.mem_univ z)).analyticOrderAt_eq_zero] + apply (genusOneCanonicalProduct_ne_zero_iff + root hroot0 hinv hsmall z).mpr + intro i hiz + have hi : i ∈ fiber z := (hfiber z i).mpr hiz.symm + simp [hempty] at hi + · obtain ⟨i0, hi0⟩ := Finset.nonempty_iff_ne_empty.mpr hempty + exact analyticOrderAt_genusOneCanonicalProduct_of_nonempty_fiber + hroot0 hinv hsmall (fiber z) z (hfiber z) i0 hi0 + +/-- If the indexing fibers enumerate the zeros of an entire function with +their analytic orders, then the infinite genus-one product has exactly the +same global divisor. -/ +theorem genusOneCanonicalProduct_divisor_eq + {ι : Type*} [DecidableEq ι] {root : ι → ℂ} {xi : ℂ → ℂ} + (hroot0 : ∀ i, root i ≠ 0) + (hinv : Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2)) + (hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i in cofinite, ∀ s ∈ K, ‖s / root i‖ ≤ 1) + (fiber : ℂ → Finset ι) + (hfiber : ∀ z i, i ∈ fiber z ↔ root i = z) + (hxi : AnalyticOnNhd ℂ xi Set.univ) + (hxiOrder : ∀ z, analyticOrderAt xi z = (fiber z).card) : + MeromorphicOn.divisor + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ = + MeromorphicOn.divisor xi Set.univ := by + have hprod := + hasProdLocallyUniformlyOn_genusOneCanonicalFactor + root hinv hsmall + have hPA := analyticOnNhd_genusOneCanonicalProduct hprod + have hPM : MeromorphicOn + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ := + fun z hz ↦ (hPA z hz).meromorphicAt + have hxiM : MeromorphicOn xi Set.univ := + fun z hz ↦ (hxi z hz).meromorphicAt + ext z + rw [MeromorphicOn.divisor_apply hPM (Set.mem_univ z), + MeromorphicOn.divisor_apply hxiM (Set.mem_univ z), + (hPA z (Set.mem_univ z)).meromorphicOrderAt_eq, + (hxi z (Set.mem_univ z)).meromorphicOrderAt_eq, + analyticOrderAt_genusOneCanonicalProduct + hroot0 hinv hsmall fiber hfiber z, + hxiOrder z] + +/-- Xi-specific divisor matching for the canonical countable multiplicity +enumeration. Only the quantitative convergence hypotheses remain. -/ +theorem riemannXiGenusOneCanonicalProduct_divisor_eq + (hinv : Summable + (fun i : RiemannXiZeroIndex ↦ ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2)) + (hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i : RiemannXiZeroIndex in cofinite, + ∀ s ∈ K, ‖s / riemannXiZeroRoot i‖ ≤ 1) : + MeromorphicOn.divisor + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ = + MeromorphicOn.divisor riemannXiLi Set.univ := by + classical + exact genusOneCanonicalProduct_divisor_eq + riemannXiZeroRoot_ne_zero hinv hsmall riemannXiZeroFiber + mem_riemannXiZeroFiber + (fun z _ ↦ differentiable_riemannXiLi.analyticAt z) + analyticOrderAt_riemannXiLi_eq_zeroFiber_card + +/-- For the canonical xi enumeration, inverse-square summability is the only +remaining hypothesis needed for normal convergence and exact divisor +matching; escape follows from local finiteness. -/ +theorem riemannXiGenusOneCanonicalProduct_divisor_eq_of_summable + (hinv : Summable + (fun i : RiemannXiZeroIndex ↦ + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2)) : + MeromorphicOn.divisor + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ = + MeromorphicOn.divisor riemannXiLi Set.univ := by + apply riemannXiGenusOneCanonicalProduct_divisor_eq hinv + intro K hK + obtain ⟨R, hR⟩ := hK.isBounded.exists_norm_le + filter_upwards [riemannXiZeroRoot_escape.eventually + (eventually_ge_atTop R)] with i hi s hs + rw [norm_div] + exact (div_le_one + (norm_pos_iff.mpr (riemannXiZeroRoot_ne_zero i))).2 + ((hR s hs).trans hi) + +/-- The genus-one canonical product over the canonical multiplicity +enumeration has exactly xi's global divisor, unconditionally. -/ +theorem riemannXiGenusOneCanonicalProduct_divisor_eq_unconditional : + MeromorphicOn.divisor + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ = + MeromorphicOn.divisor riemannXiLi Set.univ := + riemannXiGenusOneCanonicalProduct_divisor_eq_of_summable + summable_norm_inv_sq_riemannXiZeroRoot + +/-- Xi divisor matching from the source-standard `O(log N)` shell count, +with an arbitrary finite low-zero set handled separately. -/ +theorem riemannXiGenusOneCanonicalProduct_divisor_eq_of_logarithmicShellCount + (low : Finset RiemannXiZeroIndex) + (shell : ℕ → Finset + {i : RiemannXiZeroIndex // i ∉ low}) + (hpartition : ∀ i : {i : RiemannXiZeroIndex // i ∉ low}, + ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + ((N + 1 : ℕ) : ℝ) ≤ ‖riemannXiZeroRoot i‖) + (A : ℝ) (hA : 0 ≤ A) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * Real.log (N + 2)) : + MeromorphicOn.divisor + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ = + MeromorphicOn.divisor riemannXiLi Set.univ := by + classical + apply riemannXiGenusOneCanonicalProduct_divisor_eq_of_summable + exact summable_norm_inv_sq_of_finite_low_and_logarithmic_shell_count + riemannXiZeroRoot low shell hpartition hlower A hA hcount + +/-- Xi divisor matching from the weaker dyadic shell count produced by +an order-one Jensen estimate, again allowing arbitrary finite low zeros. -/ +theorem riemannXiGenusOneCanonicalProduct_divisor_eq_of_dyadicShellCount + (low : Finset RiemannXiZeroIndex) + (shell : ℕ → Finset + {i : RiemannXiZeroIndex // i ∉ low}) + (hpartition : ∀ i : {i : RiemannXiZeroIndex // i ∉ low}, + ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + (2 : ℝ) ^ N ≤ ‖riemannXiZeroRoot i‖) + (A : ℝ) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * (2 : ℝ) ^ N * (N + 1 : ℝ)) : + MeromorphicOn.divisor + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ = + MeromorphicOn.divisor riemannXiLi Set.univ := by + classical + apply riemannXiGenusOneCanonicalProduct_divisor_eq_of_summable + exact + summable_norm_inv_sq_of_finite_low_and_dyadic_linear_log_shell_count + riemannXiZeroRoot low shell hpartition hlower A hcount + +set_option maxHeartbeats 800000 in +/-- For an escaping zero family, inverse-square summability alone gives the +compact smallness required by the genus-one normal-convergence theorem. -/ +theorem hasProdLocallyUniformlyOn_genusOneCanonicalFactor_of_escape + {ι : Type*} (root : ι → ℂ) + (hroot0 : ∀ i, root i ≠ 0) + (hinv : Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2)) + (hescape : Tendsto (fun i ↦ ‖root i‖) cofinite atTop) : + HasProdLocallyUniformlyOn (genusOneCanonicalFactor root) + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ := by + apply hasProdLocallyUniformlyOn_genusOneCanonicalFactor root hinv + intro K hK + obtain ⟨R, hR⟩ := hK.isBounded.exists_norm_le + filter_upwards [hescape.eventually (eventually_ge_atTop R)] with i hi s hs + rw [norm_div] + exact (div_le_one (norm_pos_iff.mpr (hroot0 i))).2 ((hR s hs).trans hi) + +/-- The canonical genus-one xi product converges locally uniformly on the +whole plane, with no remaining zero-count hypothesis. -/ +theorem riemannXiGenusOneCanonicalProduct_hasProdLocallyUniformly : + HasProdLocallyUniformlyOn + (genusOneCanonicalFactor riemannXiZeroRoot) + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ := + hasProdLocallyUniformlyOn_genusOneCanonicalFactor_of_escape + riemannXiZeroRoot riemannXiZeroRoot_ne_zero + summable_norm_inv_sq_riemannXiZeroRoot + riemannXiZeroRoot_escape + +theorem analyticOnNhd_riemannXiGenusOneCanonicalProduct : + AnalyticOnNhd ℂ + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ := + analyticOnNhd_genusOneCanonicalProduct + riemannXiGenusOneCanonicalProduct_hasProdLocallyUniformly + +/-- Source-shaped canonical-product convergence: Bombieri--Lagarias +summability, separation from zero, and escape of the roots imply normal +convergence of the multiplicity-indexed genus-one product on `ℂ`. -/ +theorem hasProdLocallyUniformlyOn_genusOneCanonicalFactor_of_bombieriLagarias + {ι : Type*} (root : ι → ℂ) + (hroot0 : ∀ i, root i ≠ 0) + (hlarge : ∀ i, 1 ≤ ‖root i‖) + (hsum : BombieriLagariasSummability root) + (hescape : Tendsto (fun i ↦ ‖root i‖) cofinite atTop) : + HasProdLocallyUniformlyOn (genusOneCanonicalFactor root) + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ := + hasProdLocallyUniformlyOn_genusOneCanonicalFactor_of_escape + root hroot0 (hsum.summable_norm_inv_sq hlarge) hescape + +/-- Any exact symmetric-height exhaustion of the index set converges locally +uniformly to the genus-one canonical product. -/ +theorem SymmetricHeightExhaustion.tendstoLocallyUniformlyOn_genusOneProduct + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + (hexhaust : SymmetricHeightExhaustion root cutoff height) + (hprod : HasProdLocallyUniformlyOn (genusOneCanonicalFactor root) + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ) : + TendstoLocallyUniformlyOn + (fun N s ↦ ∏ i ∈ cutoff N, genusOneCanonicalFactor root i s) + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) + atTop Set.univ := by + intro u hu x hx + obtain ⟨t, ht, hevent⟩ := hprod u hu x hx + exact ⟨t, ht, hexhaust.tendsto_cutoff.eventually hevent⟩ + +/-- Closed radial xi windows are cofinal among all finite subsets of the +multiplicity index. -/ +theorem riemannXiZeroIndexWindow_nat_tendsto_atTop : + Tendsto (fun N : ℕ ↦ riemannXiZeroIndexWindow (N : ℝ)) + atTop atTop := by + apply tendsto_atTop.2 + intro F + let R : ℝ := ∑ i ∈ F, ‖riemannXiZeroRoot i‖ + obtain ⟨n, hn⟩ := exists_nat_ge R + filter_upwards [eventually_ge_atTop n] with N hN + intro i hi + rw [mem_riemannXiZeroIndexWindow] + calc + ‖riemannXiZeroRoot i‖ ≤ R := by + dsimp [R] + exact Finset.single_le_sum (fun j _ ↦ norm_nonneg _) hi + _ ≤ n := hn + _ ≤ N := by exact_mod_cast hN + +/-- Therefore radial finite genus-one products converge locally uniformly to +the unconditional infinite xi canonical product. -/ +theorem riemannXiRadialGenusOneProducts_tendstoLocallyUniformly : + TendstoLocallyUniformlyOn + (fun (N : ℕ) s ↦ + ∏ i ∈ riemannXiZeroIndexWindow (N : ℝ), + genusOneCanonicalFactor riemannXiZeroRoot i s) + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) + atTop Set.univ := by + intro u hu x hx + obtain ⟨t, ht, hevent⟩ := + riemannXiGenusOneCanonicalProduct_hasProdLocallyUniformly u hu x hx + exact ⟨t, ht, + riemannXiZeroIndexWindow_nat_tendsto_atTop.eventually hevent⟩ + +/-- Exact reflection-stable height windows give a second concrete normal +exhaustion of the xi genus-one product. -/ +theorem riemannXiHeightGenusOneProducts_tendstoLocallyUniformly : + TendstoLocallyUniformlyOn + (fun (N : ℕ) s ↦ + ∏ i ∈ riemannXiZeroHeightWindow (N : ℝ), + genusOneCanonicalFactor riemannXiZeroRoot i s) + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) + atTop Set.univ := by + intro u hu x hx + obtain ⟨t, ht, hevent⟩ := + riemannXiGenusOneCanonicalProduct_hasProdLocallyUniformly u hu x hx + exact ⟨t, ht, + riemannXiZeroHeightWindow_nat_tendsto_atTop.eventually hevent⟩ + +/-- Hadamard's remaining zeta-specific identification: xi is the normally +convergent genus-one product times an exponential affine prefactor. -/ +def GenusOneHadamardRepresentation {ι : Type*} + (root : ι → ℂ) (xi : ℂ → ℂ) : Prop := + ∃ a b : ℂ, ∀ s, + xi s = Complex.exp (a + b * s) * + ∏' i, genusOneCanonicalFactor root i s + +/-- The simply-connected-domain component of Hadamard factorization: +every continuous zero-free function on the complex plane has a global +continuous logarithm. Upgrading this lift to an entire logarithm and proving +it affine requires the missing analytic growth theorem. -/ +theorem exists_continuous_log_of_continuous_ne_zero + {g : ℂ → ℂ} (hg : Continuous g) (hne : ∀ z, g z ≠ 0) : + ∃ f : ℂ → ℂ, Continuous f ∧ + ∀ z, Complex.exp (f z) = g z := by + have hUc : IsSimplyConnected (Set.univ : Set ℂ) := by + change SimplyConnectedSpace (Set.univ : Set ℂ) + exact (Homeomorph.Set.univ ℂ).toHomotopyEquiv.simplyConnectedSpace + have hnon : 0 ∉ g '' (Set.univ : Set ℂ) := by + rintro ⟨z, hz, hzero⟩ + exact hne z hzero + obtain ⟨f, hfcont, hf⟩ := + Complex.exists_continuousOn_eqOn_exp_comp hUc isOpen_univ + hg.continuousOn hnon + refine ⟨f, continuousOn_univ.mp hfcont, ?_⟩ + intro z + simpa [Function.comp_apply] using hf (Set.mem_univ z) + +/-- A continuous exponential lift of an entire zero-free function is itself +entire. Locally it is the principal logarithm of `g(w) / g(z)`, translated +by the chosen lift value. -/ +theorem analyticOnNhd_log_of_continuous_exp + {g f : ℂ → ℂ} + (hg : AnalyticOnNhd ℂ g Set.univ) + (hf : Continuous f) + (hexp : ∀ z, Complex.exp (f z) = g z) : + AnalyticOnNhd ℂ f Set.univ := by + intro z hz + have hgz : g z ≠ 0 := by + rw [← hexp] + exact Complex.exp_ne_zero _ + have hratio : AnalyticAt ℂ (fun w ↦ g w / g z) z := + (hg z (Set.mem_univ z)).div_const + have hratio1 : g z / g z = 1 := div_self hgz + have hrhs : AnalyticAt ℂ + (fun w ↦ f z + Complex.log (g w / g z)) z := + analyticAt_const.add (hratio.clog (by simp [hratio1])) + have hclose : ∀ᶠ w in 𝓝 z, + dist (f w) (f z) < Real.pi / 2 := + hf.continuousAt.tendsto.eventually + (Metric.ball_mem_nhds _ (half_pos Real.pi_pos)) + have heq : f =ᶠ[𝓝 z] + fun w ↦ f z + Complex.log (g w / g z) := by + filter_upwards [hclose] with w hw + have hnorm : ‖f w - f z‖ < Real.pi / 2 := by + simpa [dist_eq_norm] using hw + have him : |(f w - f z).im| < Real.pi / 2 := + (abs_im_le_norm (f w - f z)).trans_lt hnorm + have hlower : -(Real.pi) < (f w - f z).im := by + linarith [neg_lt_of_abs_lt him, Real.pi_pos] + have hupper : (f w - f z).im ≤ Real.pi := by + linarith [lt_of_abs_lt him, Real.pi_pos] + have hexpdiff : + Complex.exp (f w - f z) = g w / g z := by + rw [Complex.exp_sub, hexp, hexp] + calc + f w = f z + (f w - f z) := by ring + _ = f z + Complex.log (Complex.exp (f w - f z)) := by + rw [Complex.log_exp hlower hupper] + _ = f z + Complex.log (g w / g z) := by rw [hexpdiff] + exact hrhs.congr heq.symm + +theorem exists_analytic_log_of_analytic_ne_zero + {g : ℂ → ℂ} (hg : AnalyticOnNhd ℂ g Set.univ) + (hne : ∀ z, g z ≠ 0) : + ∃ f : ℂ → ℂ, AnalyticOnNhd ℂ f Set.univ ∧ + ∀ z, Complex.exp (f z) = g z := by + have hgcont : Continuous g := + continuousOn_univ.mp hg.continuousOn + obtain ⟨f, hfcont, hfexp⟩ := + exists_continuous_log_of_continuous_ne_zero hgcont hne + exact ⟨f, analyticOnNhd_log_of_continuous_exp hg hfcont hfexp, hfexp⟩ + +theorem deriv_analytic_log_eq_logDeriv + {g f : ℂ → ℂ} + (hf : AnalyticOnNhd ℂ f Set.univ) + (hexp : ∀ z, Complex.exp (f z) = g z) (z : ℂ) : + deriv f z = logDeriv g z := by + have hcomp : HasDerivAt (Complex.exp ∘ f) + (Complex.exp (f z) * deriv f z) z := + (Complex.hasDerivAt_exp (f z)).comp z + (hf z (Set.mem_univ z)).differentiableAt.hasDerivAt + have heq : Complex.exp ∘ f = g := by + funext w + exact hexp w + have hd : deriv g z = Complex.exp (f z) * deriv f z := by + rw [← heq] + exact hcomp.deriv + rw [logDeriv_apply, hd, ← hexp] + exact (mul_div_cancel_left₀ _ (Complex.exp_ne_zero (f z))).symm + +/-- The removable extension of `xi / P`, obtained by putting the meromorphic +quotient into normal form. This changes only the values at a discrete set, +precisely allowing common zeros to cancel. -/ +noncomputable def cancelledEntireQuotient + (xi P : ℂ → ℂ) : ℂ → ℂ := + toMeromorphicNFOn (xi * P⁻¹) Set.univ + +/-- Away from a zero of the denominator, the removable cancelled quotient +agrees pointwise with the ordinary quotient. -/ +theorem cancelledEntireQuotient_eq_div_of_ne + {xi P : ℂ → ℂ} {z : ℂ} + (hxiM : MeromorphicOn xi Set.univ) + (hPM : MeromorphicOn P Set.univ) + (hxi : AnalyticAt ℂ xi z) (hP : AnalyticAt ℂ P z) + (hPz : P z ≠ 0) : + cancelledEntireQuotient xi P z = xi z / P z := by + have hqM : MeromorphicOn (xi * P⁻¹) Set.univ := + hxiM.mul hPM.inv + have hrawA : AnalyticAt ℂ (xi * P⁻¹) z := + hxi.mul (hP.inv hPz) + have hev : + cancelledEntireQuotient xi P =ᶠ[𝓝 z] xi * P⁻¹ := by + exact (toMeromorphicNFOn_eq_toMeromorphicNFAt_on_nhds + hqM (Set.mem_univ z)).trans + (Filter.Eventually.of_forall (fun w ↦ by + rw [toMeromorphicNFAt_eq_self.2 hrawA.meromorphicNFAt])) + simpa [div_eq_mul_inv] using hev.self_of_nhds + +/-- An exponential upper bound for the numerator and exponential lower +bound for the denominator transfer additively to the cancelled quotient. -/ +theorem norm_cancelledEntireQuotient_le_exp_add + {xi P : ℂ → ℂ} {z : ℂ} {U L : ℝ} + (hxiM : MeromorphicOn xi Set.univ) + (hPM : MeromorphicOn P Set.univ) + (hxi : AnalyticAt ℂ xi z) (hP : AnalyticAt ℂ P z) + (hxiUpper : ‖xi z‖ ≤ Real.exp U) + (hPLower : Real.exp (-L) ≤ ‖P z‖) : + ‖cancelledEntireQuotient xi P z‖ ≤ Real.exp (U + L) := by + have hPnorm : 0 < ‖P z‖ := + (Real.exp_pos (-L)).trans_le hPLower + have hPz : P z ≠ 0 := norm_pos_iff.mp hPnorm + rw [cancelledEntireQuotient_eq_div_of_ne + hxiM hPM hxi hP hPz, norm_div] + calc + ‖xi z‖ / ‖P z‖ ≤ Real.exp U / Real.exp (-L) := + div_le_div₀ (Real.exp_pos _).le hxiUpper + (Real.exp_pos _) hPLower + _ = Real.exp (U + L) := by + rw [div_eq_mul_inv, ← Real.exp_neg, neg_neg, ← Real.exp_add] + +/-- Equal finite divisors make the normal-form quotient entire and zero-free. +This is the cancellation step that a pointwise reciprocal estimate cannot +replace near common zeros. -/ +theorem cancelledEntireQuotient_analytic_ne_zero + {xi P : ℂ → ℂ} + (hxi : MeromorphicOn xi Set.univ) + (hP : MeromorphicOn P Set.univ) + (hxiFinite : ∀ z, meromorphicOrderAt xi z ≠ ⊤) + (hPFinite : ∀ z, meromorphicOrderAt P z ≠ ⊤) + (hdiv : MeromorphicOn.divisor xi Set.univ = + MeromorphicOn.divisor P Set.univ) : + AnalyticOnNhd ℂ (cancelledEntireQuotient xi P) Set.univ ∧ + ∀ z, cancelledEntireQuotient xi P z ≠ 0 := by + let q := xi * P⁻¹ + have hq : MeromorphicOn q Set.univ := hxi.mul hP.inv + have hqdiv : MeromorphicOn.divisor q Set.univ = 0 := by + dsimp [q] + rw [hxi.divisor_mul hP.inv + (fun z _ ↦ hxiFinite z) + (fun z _ ↦ by simpa [meromorphicOrderAt_inv] using hPFinite z), + MeromorphicOn.divisor_inv, hdiv] + abel + have hnf : MeromorphicNFOn + (cancelledEntireQuotient xi P) Set.univ := + meromorphicNFOn_toMeromorphicNFOn q Set.univ + have hqdiv' : + MeromorphicOn.divisor (cancelledEntireQuotient xi P) Set.univ = 0 := by + change MeromorphicOn.divisor + (toMeromorphicNFOn q Set.univ) Set.univ = 0 + rw [hq.divisor_of_toMeromorphicNFOn, hqdiv] + have han : AnalyticOnNhd ℂ + (cancelledEntireQuotient xi P) Set.univ := by + rw [← hnf.divisor_nonneg_iff_analyticOnNhd, hqdiv'] + refine ⟨han, ?_⟩ + intro z + rw [← (hnf (Set.mem_univ z)).meromorphicOrderAt_eq_zero_iff] + have happ := MeromorphicOn.divisor_apply hnf.meromorphicOn + (Set.mem_univ z) + rw [hqdiv'] at happ + have hor : + meromorphicOrderAt (cancelledEntireQuotient xi P) z = 0 ∨ + meromorphicOrderAt (cancelledEntireQuotient xi P) z = ⊤ := by + simpa using happ.symm + apply hor.resolve_right + rw [show cancelledEntireQuotient xi P = + toMeromorphicNFOn q Set.univ by rfl, + meromorphicOrderAt_toMeromorphicNFOn hq (Set.mem_univ z), + meromorphicOrderAt_mul (hxi z (Set.mem_univ z)) + (hP.inv z (Set.mem_univ z)), meromorphicOrderAt_inv] + exact WithTop.add_ne_top.mpr + ⟨hxiFinite z, by simpa using hPFinite z⟩ + +/-- Little-`o(‖z‖²)` growth, stated without asymptotic notation so it can +feed directly into Cauchy's derivative estimate. -/ +def SubquadraticNormGrowth (h : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ R : ℝ, 0 ≤ R ∧ + ∀ z : ℂ, R ≤ ‖z‖ → ‖h z‖ ≤ ε * ‖z‖ ^ 2 + +/-- A real-part version of subquadratic growth. The bound is uniform on +the disk of radius `r`; this is the exact form used by +Borel--Carathéodory below. -/ +def SubquadraticRealPartGrowth (h : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ R : ℝ, 0 ≤ R ∧ + ∀ r : ℝ, R ≤ r → ∀ z ∈ Metric.ball (0 : ℂ) r, + (h z).re ≤ ε * r ^ 2 + +/-- Cauchy-estimate rigidity: an entire function of norm growth +`o(‖z‖²)` has zero second derivative. -/ +theorem iteratedDeriv_two_eq_zero_of_subquadraticNormGrowth + (h : ℂ → ℂ) (hh : AnalyticOnNhd ℂ h Set.univ) + (hgrowth : SubquadraticNormGrowth h) : + ∀ c, iteratedDeriv 2 h c = 0 := by + intro c + by_contra hc + have hdpos : 0 < ‖iteratedDeriv 2 h c‖ := norm_pos_iff.mpr hc + let ε : ℝ := ‖iteratedDeriv 2 h c‖ / 16 + have hε : 0 < ε := div_pos hdpos (by norm_num) + obtain ⟨R, hR0, hbound⟩ := hgrowth ε hε + let r : ℝ := R + ‖c‖ + 1 + have hr : 0 < r := by dsimp [r]; positivity + have hC : ∀ z ∈ Metric.sphere c r, + ‖h z‖ ≤ 4 * ε * r ^ 2 := by + intro z hz + have hzdist : ‖z - c‖ = r := by + simpa [Metric.mem_sphere, dist_eq_norm] using hz + have hzlower : R ≤ ‖z‖ := by + have htri : ‖z - c‖ ≤ ‖z‖ + ‖c‖ := norm_sub_le z c + rw [hzdist] at htri + dsimp [r] at htri + linarith + have hzupper : ‖z‖ ≤ 2 * r := by + have htri : ‖z‖ ≤ ‖z - c‖ + ‖c‖ := by + calc + ‖z‖ = ‖(z - c) + c‖ := by ring_nf + _ ≤ ‖z - c‖ + ‖c‖ := norm_add_le _ _ + rw [hzdist] at htri + have hcr : ‖c‖ ≤ r := by dsimp [r]; linarith + linarith + calc + ‖h z‖ ≤ ε * ‖z‖ ^ 2 := hbound z hzlower + _ ≤ ε * (2 * r) ^ 2 := by gcongr + _ = 4 * ε * r ^ 2 := by ring + have hdif : Differentiable ℂ h := + differentiableOn_univ.mp hh.differentiableOn + have hcauchy := Complex.norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le + 2 hr hdif.diffContOnCl hC + have hle : ‖iteratedDeriv 2 h c‖ ≤ 8 * ε := by + calc + ‖iteratedDeriv 2 h c‖ ≤ + (2 : ℕ).factorial * (4 * ε * r ^ 2) / r ^ 2 := hcauchy + _ = 8 * ε := by + norm_num [Nat.factorial] + field_simp + norm_num + dsimp [ε] at hle + linarith + +/-- Borel--Carathéodory plus Cauchy's estimate: a uniform disk bound +`sup_{‖z‖ linarith + +/-- Explicit finite exceptional-disk circle selection. -/ +theorem exists_circle_avoiding_exceptionalDisks + {ι : Type*} (s : Finset ι) (center : ι → ℂ) + (radius : ι → ℝ) + (hradius : ∀ i ∈ s, 0 ≤ radius i) + {a b : ℝ} + (hwidth : 2 * ∑ i ∈ s, radius i < b - a) : + ∃ R ∈ Set.Icc a b, ∀ i ∈ s, + Disjoint (Metric.sphere (0 : ℂ) R) + (Metric.closedBall (center i) (radius i)) := by + obtain ⟨R, hR, havoid⟩ := + exists_radius_avoiding_exceptionalIntervals + s center radius hradius hwidth + refine ⟨R, hR, ?_⟩ + intro i hi + exact sphere_disjoint_closedBall_of_radius_not_mem + (havoid i hi) + +/-- Finite genus-one minimum modulus on a selected circle. This combines +the equal-radius lower-product lemma with the exact exceptional-circle +selection theorem. -/ +theorem exists_circle_norm_finsetProd_genusOneCanonicalFactor_lower + {ι : Type*} (s : Finset ι) (root : ι → ℂ) + (hroot0 : ∀ i, root i ≠ 0) + (hs : s.Nonempty) {H a b : ℝ} (hH : 0 < H) + (hwidth : H ≤ b - a) : + ∃ R ∈ Set.Icc a b, ∀ z ∈ Metric.sphere (0 : ℂ) R, + (∏ i ∈ s, + ((H / (3 * s.card)) / ‖root i‖) * + Real.exp (-‖z‖ * ‖(root i)⁻¹‖)) ≤ + ‖∏ i ∈ s, + genusOneCanonicalFactor root i z‖ := by + obtain ⟨radius, hrad, hsum, hlower⟩ := + exists_equalRadius_exceptionalDisks_genusOne + s root hroot0 hs hH + obtain ⟨R, hR, havoid⟩ := + exists_circle_avoiding_exceptionalDisks + s root radius hrad (a := a) (b := b) + (hsum.trans_le hwidth) + refine ⟨R, hR, ?_⟩ + intro z hz + apply hlower z + intro i hi hiBall + exact Set.disjoint_left.mp (havoid i hi) hz hiBall + +/-- Xi-window specialization of the finite selected-circle minimum-modulus +theorem, with analytic multiplicities represented by the canonical index +window. -/ +theorem exists_circle_norm_riemannXiWindowProduct_lower + (T : ℝ) + (hwindow : (riemannXiZeroIndexWindow T).Nonempty) + {H a b : ℝ} (hH : 0 < H) (hwidth : H ≤ b - a) : + ∃ R ∈ Set.Icc a b, ∀ z ∈ Metric.sphere (0 : ℂ) R, + (∏ i ∈ riemannXiZeroIndexWindow T, + ((H / (3 * (riemannXiZeroIndexWindow T).card)) / + ‖riemannXiZeroRoot i‖) * + Real.exp (-‖z‖ * ‖(riemannXiZeroRoot i)⁻¹‖)) ≤ + ‖∏ i ∈ riemannXiZeroIndexWindow T, + genusOneCanonicalFactor riemannXiZeroRoot i z‖ := + exists_circle_norm_finsetProd_genusOneCanonicalFactor_lower + (riemannXiZeroIndexWindow T) riemannXiZeroRoot + riemannXiZeroRoot_ne_zero hwindow hH hwidth + +/-- Cartan circle selection at the compatible head scale +`T_j = R_j = 2^j`. The available annulus `[R_j, 2R_j]` has exactly the +width used as the exceptional-disk budget. -/ +theorem exists_circle_norm_riemannXiCompatibleWindowProduct_lower + (j : ℕ) + (hwindow : + (riemannXiZeroIndexWindow ((2 : ℝ) ^ j)).Nonempty) : + ∃ R ∈ Set.Icc ((2 : ℝ) ^ j) ((2 : ℝ) ^ (j + 1)), + ∀ z ∈ Metric.sphere (0 : ℂ) R, + (∏ i ∈ riemannXiZeroIndexWindow ((2 : ℝ) ^ j), + ((((2 : ℝ) ^ j) / + (3 * (riemannXiZeroIndexWindow + ((2 : ℝ) ^ j)).card)) / + ‖riemannXiZeroRoot i‖) * + Real.exp (-‖z‖ * + ‖(riemannXiZeroRoot i)⁻¹‖)) ≤ + ‖∏ i ∈ riemannXiZeroIndexWindow ((2 : ℝ) ^ j), + genusOneCanonicalFactor riemannXiZeroRoot i z‖ := by + apply exists_circle_norm_riemannXiWindowProduct_lower + ((2 : ℝ) ^ j) hwindow (H := (2 : ℝ) ^ j) + · positivity + · rw [pow_succ] + ring_nf + exact le_rfl + +/-- Exact logarithmic loss of the finite genus-one Cartan head. -/ +def riemannXiFiniteHeadLogLoss (T H : ℝ) (z : ℂ) : ℝ := + (∑ i ∈ riemannXiZeroIndexWindow T, + Real.log ‖riemannXiZeroRoot i‖) + + ‖z‖ * (∑ i ∈ riemannXiZeroIndexWindow T, + ‖(riemannXiZeroRoot i)⁻¹‖) - + ((riemannXiZeroIndexWindow T).card : ℝ) * + Real.log (H / (3 * (riemannXiZeroIndexWindow T).card)) + +/-- The finite-head lower-bound expression is exactly the exponential of +the negative aggregate head loss; all logarithm branches and signs are +explicit. -/ +theorem riemannXiCartanHeadLower_eq_exp_neg_logLoss + (T H : ℝ) (hH : 0 < H) + (hwindow : (riemannXiZeroIndexWindow T).Nonempty) + (z : ℂ) : + (∏ i ∈ riemannXiZeroIndexWindow T, + ((H / (3 * (riemannXiZeroIndexWindow T).card)) / + ‖riemannXiZeroRoot i‖) * + Real.exp (-‖z‖ * + ‖(riemannXiZeroRoot i)⁻¹‖)) = + Real.exp (-riemannXiFiniteHeadLogLoss T H z) := by + let s := riemannXiZeroIndexWindow T + have hcard : (0 : ℝ) < s.card := by + exact_mod_cast hwindow.card_pos + have hδ : 0 < H / (3 * (s.card : ℝ)) := by positivity + rw [show (∏ i ∈ riemannXiZeroIndexWindow T, + ((H / (3 * (riemannXiZeroIndexWindow T).card)) / + ‖riemannXiZeroRoot i‖) * + Real.exp (-‖z‖ * ‖(riemannXiZeroRoot i)⁻¹‖)) = + ∏ i ∈ riemannXiZeroIndexWindow T, + Real.exp (Real.log + (H / (3 * (riemannXiZeroIndexWindow T).card)) - + Real.log ‖riemannXiZeroRoot i‖ - + ‖z‖ * ‖(riemannXiZeroRoot i)⁻¹‖) by + apply Finset.prod_congr rfl + intro i hi + rw [show -‖z‖ * ‖(riemannXiZeroRoot i)⁻¹‖ = + -(‖z‖ * ‖(riemannXiZeroRoot i)⁻¹‖) by ring, + Real.exp_neg] + rw [Real.exp_sub, Real.exp_sub, Real.exp_log hδ, + Real.exp_log + (norm_pos_iff.mpr (riemannXiZeroRoot_ne_zero i))] + ring] + rw [← Real.exp_sum] + congr 1 + simp only [riemannXiFiniteHeadLogLoss] + rw [Finset.sum_sub_distrib, Finset.sum_sub_distrib, + Finset.sum_const, nsmul_eq_mul, Finset.mul_sum] + ring + +/-- The logarithmic root-size loss in a finite xi window is bounded by its +cardinality times the endpoint logarithm. -/ +theorem sum_log_norm_riemannXiZeroRoot_window_le (T : ℝ) : + ∑ i ∈ riemannXiZeroIndexWindow T, + Real.log ‖riemannXiZeroRoot i‖ ≤ + (riemannXiZeroIndexWindow T).card * Real.log T := by + simpa using Finset.sum_le_card_nsmul + (riemannXiZeroIndexWindow T) + (fun i ↦ Real.log ‖riemannXiZeroRoot i‖) + (Real.log T) (by + intro i hi + apply Real.log_le_log + · exact norm_pos_iff.mpr (riemannXiZeroRoot_ne_zero i) + · exact (mem_riemannXiZeroIndexWindow T i).mp hi) + +/-- Cauchy--Schwarz controls the finite inverse-root sum by window +cardinality and the already proved global inverse-square mass. -/ +theorem sum_norm_inv_riemannXiZeroRoot_window_sq_le (T : ℝ) : + (∑ i ∈ riemannXiZeroIndexWindow T, + ‖(riemannXiZeroRoot i)⁻¹‖) ^ 2 ≤ + (riemannXiZeroIndexWindow T).card * + ∑' i : RiemannXiZeroIndex, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 := by + calc + (∑ i ∈ riemannXiZeroIndexWindow T, + ‖(riemannXiZeroRoot i)⁻¹‖) ^ 2 + ≤ (riemannXiZeroIndexWindow T).card * + ∑ i ∈ riemannXiZeroIndexWindow T, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 := + sq_sum_le_card_mul_sum_sq + _ ≤ (riemannXiZeroIndexWindow T).card * + ∑' i : RiemannXiZeroIndex, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 := by + gcongr + exact summable_norm_inv_sq_riemannXiZeroRoot.sum_le_tsum _ + (fun _ _ ↦ sq_nonneg _) + +/-- Explicit cardinality/root-size/inverse-root upper bound for the finite +Cartan head logarithmic loss. -/ +theorem riemannXiFiniteHeadLogLoss_le (T H : ℝ) (z : ℂ) : + riemannXiFiniteHeadLogLoss T H z ≤ + ((riemannXiZeroIndexWindow T).card : ℝ) * Real.log T + + ‖z‖ * Real.sqrt + (((riemannXiZeroIndexWindow T).card : ℝ) * + ∑' i : RiemannXiZeroIndex, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) - + ((riemannXiZeroIndexWindow T).card : ℝ) * + Real.log (H / + (3 * (riemannXiZeroIndexWindow T).card)) := by + have hmass : 0 ≤ + ((riemannXiZeroIndexWindow T).card : ℝ) * + ∑' i : RiemannXiZeroIndex, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 := + mul_nonneg (Nat.cast_nonneg _) + (tsum_nonneg fun _ ↦ sq_nonneg _) + have hinv : + (∑ i ∈ riemannXiZeroIndexWindow T, + ‖(riemannXiZeroRoot i)⁻¹‖) ≤ + Real.sqrt + (((riemannXiZeroIndexWindow T).card : ℝ) * + ∑' i : RiemannXiZeroIndex, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) := by + rw [Real.le_sqrt + (Finset.sum_nonneg fun _ _ ↦ norm_nonneg _) hmass] + exact sum_norm_inv_riemannXiZeroRoot_window_sq_le T + unfold riemannXiFiniteHeadLogLoss + gcongr + · exact sum_log_norm_riemannXiZeroRoot_window_le T + +/-- Multiplicity-index windows are cofinal among all finite index sets. -/ +theorem riemannXiZeroIndexWindow_tendsto_atTop : + Tendsto riemannXiZeroIndexWindow atTop atTop := by + rw [tendsto_atTop] + intro s + let R : ℝ := ∑ i ∈ s, ‖riemannXiZeroRoot i‖ + filter_upwards [eventually_ge_atTop R] with r hr + intro i hi + rw [mem_riemannXiZeroIndexWindow] + exact (Finset.single_le_sum (fun j _ ↦ norm_nonneg _) + hi).trans hr + +/-- The inverse-square mass outside a growing xi window tends to zero. -/ +theorem riemannXiZeroRoot_inv_sq_tail_tendsto_zero : + Tendsto (fun R : ℝ ↦ + ∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow R}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) + atTop (𝓝 0) := by + exact (tendsto_tsum_compl_atTop_zero + (fun i : RiemannXiZeroIndex ↦ + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2)).comp + riemannXiZeroIndexWindow_tendsto_atTop + +/-- At every point, the norms of the genus-one factor deviations are +summable over the complete xi multiplicity enumeration. -/ +theorem summable_norm_riemannXiGenusOneCanonicalFactor_sub_one + (z : ℂ) : + Summable (fun i : RiemannXiZeroIndex ↦ + ‖genusOneCanonicalFactor riemannXiZeroRoot i z - 1‖) := by + apply summable_norm_genusOneCanonicalFactor_sub_one + riemannXiZeroRoot summable_norm_inv_sq_riemannXiZeroRoot + intro K hK + obtain ⟨B, hB⟩ := hK.isBounded.exists_norm_le + filter_upwards [riemannXiZeroRoot_escape.eventually + (eventually_ge_atTop B)] with i hi s hs + rw [norm_div] + exact (div_le_one + (norm_pos_iff.mpr (riemannXiZeroRoot_ne_zero i))).2 + ((hB s hs).trans hi) + +/-- Quantitative infinite-tail estimate. This is the limit of the finite +tail estimate and makes the dependence on the remaining inverse-square mass +explicit. -/ +theorem norm_riemannXiGenusOneCanonicalProduct_tail_sub_one_le + {R : ℝ} {z : ℂ} (hz : ‖z‖ ≤ R) : + ‖(∏' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow R}, + genusOneCanonicalFactor riemannXiZeroRoot i z) - 1‖ ≤ + Real.exp (3 * ‖z‖ ^ 2 * + ∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow R}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) - 1 := by + let κ := {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow R} + let f : κ → ℂ := fun i ↦ + genusOneCanonicalFactor riemannXiZeroRoot i z + have hdev : Summable (fun i : κ ↦ ‖f i - 1‖) := by + exact + (summable_norm_riemannXiGenusOneCanonicalFactor_sub_one z).subtype + (fun i : RiemannXiZeroIndex ↦ + i ∉ riemannXiZeroIndexWindow R) + have hm : Multipliable f := by + have h := multipliable_one_add_of_summable + (f := fun i : κ ↦ f i - 1) hdev + simpa [f] using h + have hlim : Tendsto (fun s : Finset κ ↦ + ‖(∏ i ∈ s, f i) - 1‖) atTop + (𝓝 ‖(∏' i : κ, f i) - 1‖) := by + have hc : ContinuousAt (fun w : ℂ ↦ ‖w - 1‖) + (∏' i : κ, f i) := by fun_prop + exact hc.tendsto.comp hm.hasProd + apply le_of_tendsto hlim + filter_upwards [] with s + have hsmall : + ∀ i ∈ s, ‖z / riemannXiZeroRoot i‖ ≤ 1 := by + intro i hi + rw [norm_div] + apply (div_le_one + (norm_pos_iff.mpr (riemannXiZeroRoot_ne_zero i))).2 + have hiR : R < ‖riemannXiZeroRoot i‖ := by + simpa using i.property + exact hz.trans hiR.le + have hfinite := + norm_finsetProd_genusOneCanonicalFactor_sub_one_le + s (fun i : κ ↦ riemannXiZeroRoot i) z hsmall + dsimp [f] at * + apply hfinite.trans + gcongr + exact (summable_norm_inv_sq_riemannXiZeroRoot.subtype + (fun i : RiemannXiZeroIndex ↦ + i ∉ riemannXiZeroIndexWindow R)).sum_le_tsum _ + (fun _ _ ↦ sq_nonneg _) + +/-- Uniform-on-the-window form of the infinite-tail estimate. -/ +theorem norm_riemannXiGenusOneCanonicalProduct_tail_sub_one_le_uniform + {R : ℝ} {z : ℂ} (hz : ‖z‖ ≤ R) : + ‖(∏' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow R}, + genusOneCanonicalFactor riemannXiZeroRoot i z) - 1‖ ≤ + Real.exp (3 * R ^ 2 * + ∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow R}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) - 1 := by + apply + (norm_riemannXiGenusOneCanonicalProduct_tail_sub_one_le hz).trans + gcongr + +/-- Multiplicative lower bound for the complete genus-one tail. The +half-radius separation selects the principal logarithm safely and gives the +correct negative quadratic exponent, rather than a useless large additive +deviation from `1`. -/ +theorem norm_riemannXiGenusOneCanonicalProduct_tail_lower + {T : ℝ} {z : ℂ} (hz : ‖z‖ ≤ T / 2) : + Real.exp (-‖z‖ ^ 2 * + ∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) ≤ + ‖∏' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T}, + genusOneCanonicalFactor riemannXiZeroRoot i z‖ := by + let κ := {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T} + let f : κ → ℂ := fun i ↦ + genusOneCanonicalFactor riemannXiZeroRoot i z + have hdev : Summable (fun i : κ ↦ ‖f i - 1‖) := + (summable_norm_riemannXiGenusOneCanonicalFactor_sub_one z).subtype _ + have hm : Multipliable f := by + have h := multipliable_one_add_of_summable + (f := fun i : κ ↦ f i - 1) hdev + simpa [f] using h + have hlim : Tendsto (fun s : Finset κ ↦ + ‖∏ i ∈ s, f i‖) atTop (𝓝 ‖∏' i : κ, f i‖) := by + have hc : ContinuousAt (fun w : ℂ ↦ ‖w‖) + (∏' i : κ, f i) := by fun_prop + exact hc.tendsto.comp hm.hasProd + apply ge_of_tendsto hlim + filter_upwards [] with s + have hsmall : ∀ i : κ, + ‖z / riemannXiZeroRoot i‖ ≤ 1 / 2 := by + intro i + have hiT : T < ‖riemannXiZeroRoot i‖ := by + simpa using i.property + rw [norm_div] + apply (div_le_iff₀ (norm_pos_iff.mpr + (riemannXiZeroRoot_ne_zero i))).2 + nlinarith + rw [norm_prod] + calc + Real.exp (-‖z‖ ^ 2 * + ∑' i : κ, ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) + ≤ Real.exp (-‖z‖ ^ 2 * + ∑ i ∈ s, ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) := by + apply Real.exp_le_exp.mpr + have hsum := + (summable_norm_inv_sq_riemannXiZeroRoot.subtype + (fun i : RiemannXiZeroIndex ↦ + i ∉ riemannXiZeroIndexWindow T)).sum_le_tsum s + (fun _ _ ↦ sq_nonneg _) + nlinarith [sq_nonneg ‖z‖] + _ = ∏ i ∈ s, + Real.exp (-‖z / riemannXiZeroRoot i‖ ^ 2) := by + rw [← Real.exp_sum] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + rw [norm_div, norm_inv] + field_simp [riemannXiZeroRoot_ne_zero i] + _ ≤ ∏ i ∈ s, ‖f i‖ := by + apply Finset.prod_le_prod + · intro i hi + positivity + · intro i hi + exact norm_genusOnePrimaryFactor_lower_of_norm_le_half + (hsmall i) + +/-- Exact finite-head/complement-tail split of the canonical xi product. +The two pieces are proved multipliable separately because `ℂ` is a +commutative monoid with zero, not a commutative group. -/ +theorem riemannXiGenusOneCanonicalProduct_split_window + (T : ℝ) (z : ℂ) : + (∏ i ∈ riemannXiZeroIndexWindow T, + genusOneCanonicalFactor riemannXiZeroRoot i z) * + (∏' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T}, + genusOneCanonicalFactor riemannXiZeroRoot i z) = + ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i z := by + let f : RiemannXiZeroIndex → ℂ := fun i ↦ + genusOneCanonicalFactor riemannXiZeroRoot i z + let S : Set RiemannXiZeroIndex := + ↑(riemannXiZeroIndexWindow T) + let A : Set RiemannXiZeroIndex := + {i | i ∉ riemannXiZeroIndexWindow T} + have hAS : A = Sᶜ := by + ext i + simp [A, S] + let e : A ≃ (Sᶜ : Set RiemannXiZeroIndex) := + Equiv.setCongr hAS + have hs : Multipliable (f ∘ (↑) : S → ℂ) := + (hasProd_fintype _).multipliable + have hdev : Summable (fun i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T} ↦ ‖f i - 1‖) := + (summable_norm_riemannXiGenusOneCanonicalFactor_sub_one z).subtype _ + have hsc0 : Multipliable (fun i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T} ↦ f i) := by + have h := multipliable_one_add_of_summable + (f := fun i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T} ↦ f i - 1) hdev + simpa using h + change Multipliable (f ∘ (↑) : A → ℂ) at hsc0 + have hsc : Multipliable + (f ∘ (↑) : (Sᶜ : Set RiemannXiZeroIndex) → ℂ) := + (e.multipliable_iff).mp hsc0 + have hsplit : + (∏' i : S, f i) * + (∏' i : (Sᶜ : Set RiemannXiZeroIndex), f i) = + ∏' i : RiemannXiZeroIndex, f i := + Multipliable.tprod_mul_tprod_compl (f := f) hs hsc + have hhead : + (∏' i : (↑(riemannXiZeroIndexWindow T) : + Set RiemannXiZeroIndex), f i) = + ∏ i ∈ riemannXiZeroIndexWindow T, f i := + Finset.tprod_subtype _ _ + have htail : + (∏' i : A, f i) = + ∏' i : (Sᶜ : Set RiemannXiZeroIndex), f i := + e.tprod_eq (fun i : (Sᶜ : Set RiemannXiZeroIndex) ↦ f i) + rw [hhead] at hsplit + rw [← htail] at hsplit + simpa [f, A, S] using hsplit + +/-- Multiplication of any finite-head lower bound with the branch-safe +infinite-tail estimate gives a lower bound for the full canonical product. -/ +theorem norm_riemannXiGenusOneCanonicalProduct_lower_of_head + {T L : ℝ} {z : ℂ} + (hhead : L ≤ ‖∏ i ∈ riemannXiZeroIndexWindow T, + genusOneCanonicalFactor riemannXiZeroRoot i z‖) + (hz : ‖z‖ ≤ T / 2) : + L * Real.exp (-‖z‖ ^ 2 * + ∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) ≤ + ‖∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i z‖ := by + have htail := + norm_riemannXiGenusOneCanonicalProduct_tail_lower hz + rw [← riemannXiGenusOneCanonicalProduct_split_window T z, + norm_mul] + exact mul_le_mul hhead htail (Real.exp_pos _).le (norm_nonneg _) + +/-- Full canonical-product minimum modulus on a selected dyadic Cartan +circle. The head cutoff is four times the inner circle scale, so every tail +factor lies in the half-unit logarithm disk. -/ +theorem exists_circle_norm_riemannXiGenusOneCanonicalProduct_lower + (j : ℕ) + (hwindow : + (riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).Nonempty) : + ∃ R ∈ Set.Icc ((2 : ℝ) ^ j) ((2 : ℝ) ^ (j + 1)), + ∀ z ∈ Metric.sphere (0 : ℂ) R, + (∏ i ∈ + riemannXiZeroIndexWindow ((2 : ℝ) ^ (j + 2)), + ((((2 : ℝ) ^ j) / + (3 * (riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).card)) / + ‖riemannXiZeroRoot i‖) * + Real.exp (-‖z‖ * + ‖(riemannXiZeroRoot i)⁻¹‖)) * + Real.exp (-‖z‖ ^ 2 * + ∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) ≤ + ‖∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i z‖ := by + obtain ⟨R, hR, hhead⟩ := + exists_circle_norm_riemannXiWindowProduct_lower + ((2 : ℝ) ^ (j + 2)) hwindow + (H := (2 : ℝ) ^ j) (a := (2 : ℝ) ^ j) + (b := (2 : ℝ) ^ (j + 1)) (by positivity) (by + rw [pow_succ] + ring_nf + exact le_rfl) + refine ⟨R, hR, ?_⟩ + intro z hz + apply norm_riemannXiGenusOneCanonicalProduct_lower_of_head + (hhead z hz) + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + rw [hzNorm] + have hpow : (2 : ℝ) ^ (j + 2) / 2 = + (2 : ℝ) ^ (j + 1) := by + rw [show j + 2 = (j + 1) + 1 by omega, pow_succ] + ring + rw [hpow] + exact hR.2 + +/-- Total explicit logarithmic loss of the selected-circle canonical-product +lower bound. -/ +def riemannXiCanonicalCircleLogLoss (T H : ℝ) (z : ℂ) : ℝ := + riemannXiFiniteHeadLogLoss T H z + + ‖z‖ ^ 2 * + ∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 + +/-- Logarithmic form of the full selected-circle minimum modulus. -/ +theorem exists_circle_exp_neg_logLoss_le_norm_riemannXiCanonicalProduct + (j : ℕ) + (hwindow : + (riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).Nonempty) : + ∃ R ∈ Set.Icc ((2 : ℝ) ^ j) ((2 : ℝ) ^ (j + 1)), + ∀ z ∈ Metric.sphere (0 : ℂ) R, + Real.exp (-riemannXiCanonicalCircleLogLoss + ((2 : ℝ) ^ (j + 2)) ((2 : ℝ) ^ j) z) ≤ + ‖∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i z‖ := by + obtain ⟨R, hR, hbound⟩ := + exists_circle_norm_riemannXiGenusOneCanonicalProduct_lower + j hwindow + refine ⟨R, hR, ?_⟩ + intro z hz + have h := hbound z hz + rw [riemannXiCartanHeadLower_eq_exp_neg_logLoss + ((2 : ℝ) ^ (j + 2)) ((2 : ℝ) ^ j) (by positivity) + hwindow z] at h + rw [← Real.exp_add] at h + unfold riemannXiCanonicalCircleLogLoss + convert h using 1 + ring_nf + +/-- Xi's global order-one upper bound and the canonical-product minimum +modulus give an explicit selected-circle upper bound for the cancelled +quotient. -/ +theorem exists_circle_norm_cancelledRiemannXiQuotient_le_exp : + ∃ C R0 : ℝ, 0 ≤ C ∧ 0 ≤ R0 ∧ + ∀ j : ℕ, R0 ≤ (2 : ℝ) ^ j → + (riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).Nonempty → + ∃ R ∈ Set.Icc ((2 : ℝ) ^ j) ((2 : ℝ) ^ (j + 1)), + ∀ z ∈ Metric.sphere (0 : ℂ) R, + ‖cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) z‖ ≤ + Real.exp ( + C * ‖z‖ * Real.log (‖z‖ + 2) + + riemannXiCanonicalCircleLogLoss + ((2 : ℝ) ^ (j + 2)) ((2 : ℝ) ^ j) z) := by + obtain ⟨C, R0, hC, hR0, hxiBound⟩ := + riemannXi_orderOneGrowthBound + refine ⟨C, R0, hC, by linarith, ?_⟩ + intro j hj hwindow + obtain ⟨R, hR, hPBound⟩ := + exists_circle_exp_neg_logLoss_le_norm_riemannXiCanonicalProduct + j hwindow + refine ⟨R, hR, ?_⟩ + intro z hz + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + have hzLarge : R0 ≤ ‖z‖ := by + rw [hzNorm] + exact hj.trans hR.1 + let P : ℂ → ℂ := fun s ↦ + ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s + have hPA : AnalyticOnNhd ℂ P Set.univ := by + dsimp [P] + exact analyticOnNhd_riemannXiGenusOneCanonicalProduct + apply norm_cancelledEntireQuotient_le_exp_add + (xi := riemannXiLi) (P := P) + (U := C * ‖z‖ * Real.log (‖z‖ + 2)) + (L := riemannXiCanonicalCircleLogLoss + ((2 : ℝ) ^ (j + 2)) ((2 : ℝ) ^ j) z) + · exact fun w hw ↦ + (differentiable_riemannXiLi.analyticAt w).meromorphicAt + · exact fun w hw ↦ (hPA w hw).meromorphicAt + · exact differentiable_riemannXiLi.analyticAt z + · exact hPA z (Set.mem_univ z) + · exact hxiBound z hzLarge + · exact hPBound z hz + +set_option maxHeartbeats 2000000 in +/-- Every term in the selected-circle quotient estimate is bounded by one +fixed dyadic Cartan majorant. The constants respectively collect the +root/cardinality losses, Cauchy--Schwarz inverse-root loss, and xi/tail +losses. -/ +theorem riemannXiCanonicalCircleExponent_le_dyadicMajorant + (A B C : ℝ) (hA : 0 ≤ A) (hB : 0 ≤ B) (hC : 0 ≤ C) + (j : ℕ) + (hcard : ((riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) ≤ + B * (2 : ℝ) ^ j * (j + 1 : ℝ)) + (htail : (∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow ((2 : ℝ) ^ (j + 2))}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2) ≤ + A * (j + 3 : ℝ) / (2 : ℝ) ^ (j + 2)) + (hwindow : (riemannXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).Nonempty) + (z : ℂ) (hzlo : (2 : ℝ) ^ j ≤ ‖z‖) + (hzhi : ‖z‖ ≤ (2 : ℝ) ^ (j + 1)) : + C * ‖z‖ * Real.log (‖z‖ + 2) + + riemannXiCanonicalCircleLogLoss + ((2 : ℝ) ^ (j + 2)) ((2 : ℝ) ^ j) z ≤ + DyadicCartanLossMajorant + (2 * B + 3 * B ^ 2) + (4 * B * (∑' i : RiemannXiZeroIndex, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2)) + (4 * C + 3 * A) j * ((2 : ℝ) ^ j) ^ 2 := by + let H : ℝ := (2 : ℝ) ^ j + let T : ℝ := (2 : ℝ) ^ (j + 2) + let n : ℝ := (riemannXiZeroIndexWindow T).card + let M : ℝ := ∑' i : RiemannXiZeroIndex, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 + let tail : ℝ := ∑' i : {i : RiemannXiZeroIndex // + i ∉ riemannXiZeroIndexWindow T}, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 + have hH : 0 < H := by positivity + have hn : 0 < n := by + dsimp [n, T] + exact_mod_cast hwindow.card_pos + have hM : 0 ≤ M := tsum_nonneg fun _ ↦ sq_nonneg _ + have htail0 : 0 ≤ tail := tsum_nonneg fun _ ↦ sq_nonneg _ + have hT : T = 4 * H := by + dsimp [T, H] + rw [pow_add] + norm_num + ring + have hz2 : ‖z‖ ≤ 2 * H := by + dsimp [H] + rw [pow_succ] at hzhi + nlinarith + have hcard' : n ≤ B * H * (j + 1 : ℝ) := by + simpa [n, T, H] using hcard + have htail' : tail ≤ A * (j + 3 : ℝ) / (4 * H) := by + calc + tail ≤ A * (j + 3 : ℝ) / (2 : ℝ) ^ (j + 2) := by + simpa [tail, T] using htail + _ = A * (j + 3 : ℝ) / (4 * H) := by + rw [show (2 : ℝ) ^ (j + 2) = 4 * H by exact hT] + have hlogT : Real.log T ≤ 2 * (j + 1 : ℝ) := by + have hlog2 : Real.log (2 : ℝ) ≤ 1 := by + have hh := Real.log_le_sub_one_of_pos (x := 2) (by norm_num) + norm_num at hh ⊢ + exact hh + calc + Real.log T = (j + 2 : ℕ) * Real.log 2 := by + dsimp [T] + rw [Real.log_pow] + _ ≤ (j + 2 : ℝ) := by + have hjnon : 0 ≤ (j + 2 : ℝ) := by positivity + have hh := mul_le_mul_of_nonneg_left hlog2 hjnon + norm_num [Nat.cast_add] at hh ⊢ + exact hh + _ ≤ 2 * (j + 1 : ℝ) := by + nlinarith [Nat.cast_nonneg (α := ℝ) j] + have hlogz : Real.log (‖z‖ + 2) ≤ 2 * (j + 1 : ℝ) := by + have harg : ‖z‖ + 2 ≤ 4 * H := by + have hH1 : 1 ≤ H := one_le_pow₀ (by norm_num) + nlinarith [hz2] + exact (Real.log_le_log (by positivity) harg).trans + (by simpa [hT] using hlogT) + have hhead := riemannXiFiniteHeadLogLoss_le T H z + have hlogInv : + -(n * Real.log (H / (3 * n))) = + n * Real.log (3 * n / H) := by + calc + _ = n * (-Real.log (H / (3 * n))) := by ring + _ = n * Real.log ((H / (3 * n))⁻¹) := by rw [Real.log_inv] + _ = n * Real.log (3 * n / H) := by + congr 2 + field_simp + have hhead' : + riemannXiFiniteHeadLogLoss T H z ≤ + n * Real.log T + ‖z‖ * Real.sqrt (n * M) + + n * Real.log (3 * n / H) := by + change riemannXiFiniteHeadLogLoss T H z ≤ + n * Real.log T + ‖z‖ * Real.sqrt (n * M) - + n * Real.log (H / (3 * n)) at hhead + rw [show n * Real.log T + ‖z‖ * Real.sqrt (n * M) - + n * Real.log (H / (3 * n)) = + n * Real.log T + ‖z‖ * Real.sqrt (n * M) + + (-(n * Real.log (H / (3 * n)))) by ring, hlogInv] at hhead + exact hhead + have hroot : n * Real.log T / H ^ 2 ≤ + 2 * B * ((j + 1 : ℝ) ^ 2 / H) := by + have hlogT0 : 0 ≤ Real.log T := + Real.log_nonneg (by dsimp [T]; exact one_le_pow₀ (by norm_num)) + rw [div_le_iff₀ (sq_pos_of_pos hH)] + calc + n * Real.log T ≤ (B * H * (j + 1 : ℝ)) * + (2 * (j + 1 : ℝ)) := by gcongr + _ = (2 * B * ((j + 1 : ℝ) ^ 2 / H)) * H ^ 2 := by + field_simp + have hcardlog : n * Real.log (3 * n / H) / H ^ 2 ≤ + 3 * B ^ 2 * (j + 1 : ℝ) ^ 2 / H := + card_mul_log_three_mul_div_sq_le hn hB hH (by positivity) hcard' + have hsqrt : ‖z‖ * Real.sqrt (n * M) / H ^ 2 ≤ + Real.sqrt (4 * B * M * ((j + 1 : ℝ) / H)) := by + rw [Real.le_sqrt (by positivity) (by positivity)] + have hzsq : ‖z‖ ^ 2 ≤ (2 * H) ^ 2 := + (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr hz2 + have hnm : n * M ≤ (B * H * (j + 1 : ℝ)) * M := by gcongr + rw [div_pow, mul_pow, Real.sq_sqrt (mul_nonneg hn.le hM)] + calc + ‖z‖ ^ 2 * (n * M) / (H ^ 2) ^ 2 + ≤ (2 * H) ^ 2 * ((B * H * (j + 1 : ℝ)) * M) / + (H ^ 2) ^ 2 := by gcongr + _ = 4 * B * M * ((j + 1 : ℝ) / H) := by + field_simp + ring + have hxi : C * ‖z‖ * Real.log (‖z‖ + 2) / H ^ 2 ≤ + 4 * C * ((j + 1 : ℝ) / H) := by + have hlogz0 : 0 ≤ Real.log (‖z‖ + 2) := + Real.log_nonneg (by linarith [norm_nonneg z]) + rw [div_le_iff₀ (sq_pos_of_pos hH)] + calc + C * ‖z‖ * Real.log (‖z‖ + 2) ≤ + C * (2 * H) * (2 * (j + 1 : ℝ)) := by gcongr + _ = (4 * C * ((j + 1 : ℝ) / H)) * H ^ 2 := by + field_simp + ring + have htailLoss : ‖z‖ ^ 2 * tail / H ^ 2 ≤ + 3 * A * ((j + 1 : ℝ) / H) := by + calc + ‖z‖ ^ 2 * tail / H ^ 2 ≤ + (2 * H) ^ 2 * (A * (j + 3 : ℝ) / (4 * H)) / + H ^ 2 := by gcongr + _ = A * (j + 3 : ℝ) / H := by + field_simp + ring + _ ≤ 3 * A * ((j + 1 : ℝ) / H) := by + rw [show 3 * A * ((j + 1 : ℝ) / H) = + (3 * A * (j + 1 : ℝ)) / H by ring] + apply div_le_div_of_nonneg_right _ hH.le + nlinarith [Nat.cast_nonneg (α := ℝ) j] + have hnorm : + (C * ‖z‖ * Real.log (‖z‖ + 2) + + riemannXiCanonicalCircleLogLoss T H z) / H ^ 2 ≤ + DyadicCartanLossMajorant + (2 * B + 3 * B ^ 2) (4 * B * M) (4 * C + 3 * A) j := by + calc + _ ≤ (C * ‖z‖ * Real.log (‖z‖ + 2) + + (n * Real.log T + ‖z‖ * Real.sqrt (n * M) + + n * Real.log (3 * n / H)) + + ‖z‖ ^ 2 * tail) / H ^ 2 := by + unfold riemannXiCanonicalCircleLogLoss + dsimp [tail] + apply div_le_div_of_nonneg_right _ (sq_nonneg H) + linarith + _ = C * ‖z‖ * Real.log (‖z‖ + 2) / H ^ 2 + + n * Real.log T / H ^ 2 + + ‖z‖ * Real.sqrt (n * M) / H ^ 2 + + n * Real.log (3 * n / H) / H ^ 2 + + ‖z‖ ^ 2 * tail / H ^ 2 := by ring + _ ≤ 4 * C * ((j + 1 : ℝ) / H) + + 2 * B * ((j + 1 : ℝ) ^ 2 / H) + + Real.sqrt (4 * B * M * ((j + 1 : ℝ) / H)) + + 3 * B ^ 2 * (j + 1 : ℝ) ^ 2 / H + + 3 * A * ((j + 1 : ℝ) / H) := by gcongr + _ = DyadicCartanLossMajorant + (2 * B + 3 * B ^ 2) (4 * B * M) (4 * C + 3 * A) j := by + unfold DyadicCartanLossMajorant + dsimp [H] + ring + change C * ‖z‖ * Real.log (‖z‖ + 2) + + riemannXiCanonicalCircleLogLoss T H z ≤ + DyadicCartanLossMajorant + (2 * B + 3 * B ^ 2) (4 * B * M) (4 * C + 3 * A) j * H ^ 2 + exact (div_le_iff₀ (sq_pos_of_pos hH)).mp hnorm + +/-- Once the xi-zero index is inhabited, the sourced count, radial-tail, xi +growth, and selected-circle estimates combine with fixed constants uniformly +for all sufficiently large dyadic scales. -/ +theorem exists_eventually_circle_norm_cancelledRiemannXiQuotient_le_majorant + [Nonempty RiemannXiZeroIndex] : + ∃ Ksq Ksqrt Klin : ℝ, + ∀ᶠ j : ℕ in atTop, + ∃ R : ℝ, (2 : ℝ) ^ j ≤ R ∧ 0 < R ∧ + ∀ z ∈ Metric.sphere (0 : ℂ) R, + ‖cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) z‖ ≤ + Real.exp (DyadicCartanLossMajorant Ksq Ksqrt Klin j * + ((2 : ℝ) ^ j) ^ 2) := by + obtain ⟨A, RA, hA, hRA, htail⟩ := + exists_riemannXiZeroRoot_inv_sq_radial_tail_bound + obtain ⟨B, RB, hB, hRB, hcard⟩ := + exists_riemannXiZeroIndexWindow_card_le_dyadic + obtain ⟨C, RC, hC, hRC, hcircle⟩ := + exists_circle_norm_cancelledRiemannXiQuotient_le_exp + let M : ℝ := ∑' i : RiemannXiZeroIndex, + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2 + refine ⟨2 * B + 3 * B ^ 2, 4 * B * M, 4 * C + 3 * A, ?_⟩ + let i : RiemannXiZeroIndex := Classical.choice inferInstance + have hp : Tendsto (fun j : ℕ ↦ (2 : ℝ) ^ j) atTop atTop := + tendsto_pow_atTop_atTop_of_one_lt (by norm_num) + have hlarge : ∀ᶠ j : ℕ in atTop, + max (max RA RB) (max RC ‖riemannXiZeroRoot i‖) ≤ + (2 : ℝ) ^ j := hp.eventually + (eventually_ge_atTop + (max (max RA RB) (max RC ‖riemannXiZeroRoot i‖))) + filter_upwards [hlarge] with j hj + have hjRA : RA ≤ (2 : ℝ) ^ (j + 2) := by + calc + RA ≤ (2 : ℝ) ^ j := + (le_max_left _ _).trans ((le_max_left _ _).trans hj) + _ ≤ (2 : ℝ) ^ (j + 2) := + pow_le_pow_right₀ (by norm_num) (by omega) + have hjRB : RB ≤ (2 : ℝ) ^ (j + 2) := by + calc + RB ≤ (2 : ℝ) ^ j := + (le_max_right RA RB).trans ((le_max_left _ _).trans hj) + _ ≤ (2 : ℝ) ^ (j + 2) := + pow_le_pow_right₀ (by norm_num) (by omega) + have hjRC : RC ≤ (2 : ℝ) ^ j := + (le_max_left RC ‖riemannXiZeroRoot i‖).trans + ((le_max_right _ _).trans hj) + have hiNorm : ‖riemannXiZeroRoot i‖ ≤ (2 : ℝ) ^ (j + 2) := by + calc + _ ≤ (2 : ℝ) ^ j := + (le_max_right RC _).trans ((le_max_right _ _).trans hj) + _ ≤ (2 : ℝ) ^ (j + 2) := + pow_le_pow_right₀ (by norm_num) (by omega) + have hwindow : + (riemannXiZeroIndexWindow ((2 : ℝ) ^ (j + 2))).Nonempty := + ⟨i, (mem_riemannXiZeroIndexWindow _ _).mpr hiNorm⟩ + have htailj : + (∑' k : {k : RiemannXiZeroIndex // + k ∉ riemannXiZeroIndexWindow ((2 : ℝ) ^ (j + 2))}, + ‖(riemannXiZeroRoot k)⁻¹‖ ^ 2) ≤ + A * (j + 3 : ℝ) / (2 : ℝ) ^ (j + 2) := by + have ht := htail (j + 2) hjRA + have heq : ((j + 2 : ℕ) : ℝ) + 1 = (j + 3 : ℝ) := by + push_cast + ring + rw [heq] at ht + exact ht + obtain ⟨R, hR, hq⟩ := hcircle j hjRC hwindow + refine ⟨R, hR.1, + (show 0 < (2 : ℝ) ^ j by positivity).trans_le hR.1, ?_⟩ + intro z hz + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + have hdom := riemannXiCanonicalCircleExponent_le_dyadicMajorant + A B C hA hB hC j (hcard j hjRB) htailj hwindow z + (by rw [hzNorm]; exact hR.1) + (by rw [hzNorm]; exact hR.2) + exact (hq z hz).trans (Real.exp_le_exp.mpr hdom) + +/-- The explicit fixed-constant estimate discharges the dyadic boundary +hypothesis whenever the canonical xi-zero enumeration is inhabited. -/ +theorem riemannXiCancelledQuotient_dyadicBoundary + [Nonempty RiemannXiZeroIndex] : + DyadicSubquadraticBoundaryLogNormGrowth + (cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s)) := by + obtain ⟨Ksq, Ksqrt, Klin, hcircle⟩ := + exists_eventually_circle_norm_cancelledRiemannXiQuotient_le_majorant + intro ε hε + filter_upwards [hcircle, + eventually_dyadicCartanLossMajorant_lt Ksq Ksqrt Klin ε hε] + with j hj hmajor + obtain ⟨R, hHR, hR, hbound⟩ := hj + refine ⟨R, hHR, hR, ?_⟩ + intro z hz + by_cases hzero : + cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) z = 0 + · simp [hzero] + positivity + · calc + Real.log ‖cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) z‖ + ≤ Real.log (Real.exp + (DyadicCartanLossMajorant Ksq Ksqrt Klin j * + ((2 : ℝ) ^ j) ^ 2)) := + Real.log_le_log (norm_pos_iff.mpr hzero) (hbound z hz) + _ = DyadicCartanLossMajorant Ksq Ksqrt Klin j * + ((2 : ℝ) ^ j) ^ 2 := Real.log_exp _ + _ ≤ ε * ((2 : ℝ) ^ j) ^ 2 := by gcongr + +/-- The weakest Cartan exceptional-disk estimate needed by the xi route. +At each large scale the bad set is covered by finitely many disks whose +total diameters are smaller than the available radial interval; outside the +disks the desired subquadratic logarithmic estimate already holds. -/ +def CartanExceptionalDiskLogBound (g : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ r0 : ℝ, 0 ≤ r0 ∧ + ∀ r : ℝ, r0 ≤ r → ∃ n : ℕ, ∃ center : Fin n → ℂ, + ∃ radius : Fin n → ℝ, + (∀ i, 0 ≤ radius i) ∧ + 2 * ∑ i, radius i < r ∧ + ∀ z : ℂ, r ≤ ‖z‖ → ‖z‖ ≤ 2 * r → + (∀ i, z ∉ Metric.closedBall (center i) (radius i)) → + Real.log ‖g z‖ ≤ ε * r ^ 2 + +/-- The exceptional-disk estimate implies the exact cofinal-circle boundary +condition consumed by maximum modulus. -/ +theorem subquadraticBoundaryLogNormGrowth_of_cartanExceptionalDisks + {g : ℂ → ℂ} (hcartan : CartanExceptionalDiskLogBound g) : + SubquadraticBoundaryLogNormGrowth g := by + intro ε hε + obtain ⟨r0, hr0, hdata⟩ := hcartan ε hε + let r1 := max r0 1 + refine ⟨r1, hr0.trans (le_max_left _ _), ?_⟩ + intro r hr + have hr0' : r0 ≤ r := (le_max_left _ _).trans hr + have hr1 : 1 ≤ r := (le_max_right _ _).trans hr + obtain ⟨n, center, radius, hrad, hsum, hbound⟩ := + hdata r hr0' + obtain ⟨R, hR, havoid⟩ := + exists_circle_avoiding_exceptionalDisks + Finset.univ center radius (fun i _ ↦ hrad i) + (a := r) (b := 2 * r) (by linarith) + refine ⟨R, hR.1, by linarith [hR.1], ?_⟩ + intro z hz + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + apply hbound z + · rw [hzNorm] + exact hR.1 + · rw [hzNorm] + exact hR.2 + · intro i hiBall + exact Set.disjoint_left.mp + (havoid i (Finset.mem_univ i)) hz hiBall + +/-- Maximum modulus upgrades subquadratic logarithmic bounds on a cofinal +family of circles to the required bounds on every large disk. -/ +theorem subquadraticLogNormGrowth_of_boundary + {g : ℂ → ℂ} (hgA : AnalyticOnNhd ℂ g Set.univ) + (hg0 : ∀ z, g z ≠ 0) + (hboundary : SubquadraticBoundaryLogNormGrowth g) : + SubquadraticLogNormGrowth g := by + intro ε hε + obtain ⟨r0, hr0, hbound⟩ := hboundary ε hε + refine ⟨r0, hr0, ?_⟩ + intro r hr z hz + obtain ⟨R, hrR, hR, hsphere⟩ := hbound r hr + have hboundaryNorm : + ∀ w ∈ frontier (Metric.ball (0 : ℂ) R), + ‖g w‖ ≤ Real.exp (ε * r ^ 2) := by + intro w hw + have hws : w ∈ Metric.sphere (0 : ℂ) R := + Metric.frontier_ball_subset_sphere hw + rw [← Real.exp_log (norm_pos_iff.mpr (hg0 w))] + exact Real.exp_le_exp.mpr (hsphere w hws) + have hzClosure : z ∈ closure (Metric.ball (0 : ℂ) R) := by + rw [closure_ball _ hR.ne'] + have hzNorm : ‖z‖ < R := by + have hz' := hz + simp only [Metric.mem_ball, dist_zero_right] at hz' + exact hz'.trans_le hrR + simpa [Metric.mem_closedBall, dist_zero_right] using hzNorm.le + have hnorm : ‖g z‖ ≤ Real.exp (ε * r ^ 2) := + Complex.norm_le_of_forall_mem_frontier_norm_le + Metric.isBounded_ball + ((hgA.differentiableOn.mono (Set.subset_univ _)).diffContOnCl) + hboundaryNorm hzClosure + calc + Real.log ‖g z‖ ≤ Real.log (Real.exp (ε * r ^ 2)) := + Real.log_le_log (norm_pos_iff.mpr (hg0 z)) hnorm + _ = ε * r ^ 2 := Real.log_exp _ + +theorem subquadraticLogNormGrowth_of_dyadicBoundary + {g : ℂ → ℂ} (hgA : AnalyticOnNhd ℂ g Set.univ) + (hg0 : ∀ z, g z ≠ 0) + (hboundary : DyadicSubquadraticBoundaryLogNormGrowth g) : + SubquadraticLogNormGrowth g := + subquadraticLogNormGrowth_of_boundary hgA hg0 + (subquadraticBoundaryLogNormGrowth_of_dyadic hboundary) + +theorem subquadraticRealPartGrowth_of_exp_eq + {g h : ℂ → ℂ} (hexp : ∀ z, Complex.exp (h z) = g z) + (hgrowth : SubquadraticLogNormGrowth g) : + SubquadraticRealPartGrowth h := by + intro ε hε + obtain ⟨R, hR, hbound⟩ := hgrowth ε hε + refine ⟨R, hR, fun r hr z hz ↦ ?_⟩ + rw [re_eq_log_norm_of_exp_eq hexp z] + exact hbound r hr z hz + +/-- The final algebraic/analytic component of Hadamard rigidity: an entire +function with vanishing second derivative is affine. -/ +theorem eq_affine_of_iteratedDeriv_two_eq_zero + (h : ℂ → ℂ) (hh : AnalyticOnNhd ℂ h Set.univ) + (hsecond : ∀ z, iteratedDeriv 2 h z = 0) : + ∃ a b : ℂ, h = fun z ↦ a + b * z := by + let a := h 0 + let b := deriv h 0 + have hderiv : ∀ z, deriv h z = b := by + intro z + apply isOpen_univ.is_const_of_deriv_eq_zero isPreconnected_univ + hh.deriv.differentiableOn + (fun w hw ↦ ?_) (Set.mem_univ z) (Set.mem_univ 0) + simpa [iteratedDeriv_succ, iteratedDeriv_one] using hsecond w + refine ⟨a, b, ?_⟩ + funext z + apply isOpen_univ.eqOn_of_deriv_eq isPreconnected_univ + hh.differentiableOn (by fun_prop) (fun w hw ↦ ?_) + (Set.mem_univ 0) (by simp [a]) (Set.mem_univ z) + simpa using hderiv w + +theorem eq_exp_affine_of_analytic_log_second_deriv_zero + {g h : ℂ → ℂ} + (hh : AnalyticOnNhd ℂ h Set.univ) + (hexp : ∀ z, Complex.exp (h z) = g z) + (hsecond : ∀ z, iteratedDeriv 2 h z = 0) : + ∃ a b : ℂ, ∀ z, g z = Complex.exp (a + b * z) := by + obtain ⟨a, b, hab⟩ := + eq_affine_of_iteratedDeriv_two_eq_zero h hh hsecond + exact ⟨a, b, fun z ↦ by rw [← hexp, hab]⟩ + +/-- Hadamard rigidity from the precise remaining growth estimate: +an entire exponential lift of a quotient whose log norm is uniformly +subquadratic on disks is exponential-affine. -/ +theorem eq_exp_affine_of_analytic_log_subquadraticLogNormGrowth + {g h : ℂ → ℂ} + (hh : AnalyticOnNhd ℂ h Set.univ) + (hexp : ∀ z, Complex.exp (h z) = g z) + (hgrowth : SubquadraticLogNormGrowth g) : + ∃ a b : ℂ, ∀ z, g z = Complex.exp (a + b * z) := by + apply eq_exp_affine_of_analytic_log_second_deriv_zero hh hexp + exact iteratedDeriv_two_eq_zero_of_subquadraticRealPartGrowth h hh + (subquadraticRealPartGrowth_of_exp_eq hexp hgrowth) + +/-- Conditional whole-plane Hadamard identification after the two exact +zeta-specific obligations are supplied: equality of the global divisors and +subquadratic log growth of their cancelled quotient. -/ +theorem hadamardRepresentation_of_cancelledQuotientGrowth + {xi P : ℂ → ℂ} + (hxi : AnalyticOnNhd ℂ xi Set.univ) + (hP : AnalyticOnNhd ℂ P Set.univ) + (hxiFinite : ∀ z, meromorphicOrderAt xi z ≠ ⊤) + (hPFinite : ∀ z, meromorphicOrderAt P z ≠ ⊤) + (hdiv : MeromorphicOn.divisor xi Set.univ = + MeromorphicOn.divisor P Set.univ) + (hP0 : P 0 ≠ 0) + (hgrowth : SubquadraticLogNormGrowth + (cancelledEntireQuotient xi P)) : + ∃ a b : ℂ, ∀ z, xi z = + Complex.exp (a + b * z) * P z := by + have hxiM : MeromorphicOn xi Set.univ := + fun z hz ↦ (hxi z hz).meromorphicAt + have hPM : MeromorphicOn P Set.univ := + fun z hz ↦ (hP z hz).meromorphicAt + obtain ⟨hqA, hq0⟩ := + cancelledEntireQuotient_analytic_ne_zero + hxiM hPM hxiFinite hPFinite hdiv + obtain ⟨h, hh, hhexp⟩ := + exists_analytic_log_of_analytic_ne_zero hqA hq0 + obtain ⟨a, b, hab⟩ := + eq_exp_affine_of_analytic_log_subquadraticLogNormGrowth + hh hhexp hgrowth + refine ⟨a, b, ?_⟩ + have hqrawA : AnalyticAt ℂ (xi * P⁻¹) 0 := + (hxi 0 (Set.mem_univ 0)).mul + ((hP 0 (Set.mem_univ 0)).inv hP0) + have hqrawM : MeromorphicOn (xi * P⁻¹) Set.univ := + hxiM.mul hPM.inv + have hcancel_eq : + cancelledEntireQuotient xi P =ᶠ[𝓝 0] xi * P⁻¹ := by + exact (toMeromorphicNFOn_eq_toMeromorphicNFAt_on_nhds + hqrawM (Set.mem_univ 0)).trans + (Filter.Eventually.of_forall (fun z ↦ by + rw [toMeromorphicNFAt_eq_self.2 hqrawA.meromorphicNFAt])) + have hlocal : xi =ᶠ[𝓝 0] + fun z ↦ Complex.exp (a + b * z) * P z := by + filter_upwards [hcancel_eq, + (hP 0 (Set.mem_univ 0)).continuousAt.eventually_ne hP0] + with z hz hPz + have hqaff : cancelledEntireQuotient xi P z = + Complex.exp (a + b * z) := by rw [hab] + rw [hz, Pi.mul_apply, Pi.inv_apply] at hqaff + rw [← div_eq_mul_inv] at hqaff + exact (div_eq_iff hPz).mp hqaff + have hrhs : AnalyticOnNhd ℂ + (fun z ↦ Complex.exp (a + b * z) * P z) Set.univ := by + intro z hz + exact ((analyticAt_const.add + (analyticAt_const.mul analyticAt_id)).cexp).mul (hP z hz) + exact fun z ↦ congrFun (hxi.eq_of_eventuallyEq hrhs hlocal) z + +/-- Normalization and the functional equation determine the optimal +constraints on the affine factor. The raw constant remains defined only +modulo `2πiℤ`, so the valid conclusion is `exp a = 1`. -/ +theorem normalized_hadamardRepresentation_of_cancelledQuotientGrowth + {xi P : ℂ → ℂ} + (hxi : AnalyticOnNhd ℂ xi Set.univ) + (hP : AnalyticOnNhd ℂ P Set.univ) + (hxiFinite : ∀ z, meromorphicOrderAt xi z ≠ ⊤) + (hPFinite : ∀ z, meromorphicOrderAt P z ≠ ⊤) + (hdiv : MeromorphicOn.divisor xi Set.univ = + MeromorphicOn.divisor P Set.univ) + (hxi0 : xi 0 = 1) (hP0 : P 0 = 1) + (hfe : ∀ z, xi (1 - z) = xi z) + (hgrowth : SubquadraticLogNormGrowth + (cancelledEntireQuotient xi P)) : + ∃ a b : ℂ, + (∀ z, xi z = Complex.exp (a + b * z) * P z) ∧ + Complex.exp a = 1 ∧ + ∀ z, Complex.exp (a + b * (1 - z)) * P (1 - z) = + Complex.exp (a + b * z) * P z := by + obtain ⟨a, b, hrep⟩ := + hadamardRepresentation_of_cancelledQuotientGrowth + hxi hP hxiFinite hPFinite hdiv (hP0.symm ▸ one_ne_zero) + hgrowth + refine ⟨a, b, hrep, ?_, ?_⟩ + · have h := hrep 0 + rw [hxi0, hP0] at h + simpa using h.symm + · intro z + rw [← hrep, ← hrep] + exact hfe z + +set_option maxHeartbeats 800000 in +/-- Complete abstract Hadamard pipeline for a multiplicity-indexed root +enumeration. The sole remaining global analytic input is now the explicit +boundary estimate on the already-cancelled quotient. -/ +theorem genusOneHadamardRepresentation_of_boundaryGrowth + {ι : Type*} [DecidableEq ι] {root : ι → ℂ} {xi : ℂ → ℂ} + (hroot0 : ∀ i, root i ≠ 0) + (hinv : Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2)) + (hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i in cofinite, ∀ s ∈ K, ‖s / root i‖ ≤ 1) + (fiber : ℂ → Finset ι) + (hfiber : ∀ z i, i ∈ fiber z ↔ root i = z) + (hxi : AnalyticOnNhd ℂ xi Set.univ) + (hxiOrder : ∀ z, analyticOrderAt xi z = (fiber z).card) + (hboundary : SubquadraticBoundaryLogNormGrowth + (cancelledEntireQuotient xi + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s))) : + GenusOneHadamardRepresentation root xi := by + let P : ℂ → ℂ := + fun s ↦ ∏' i, genusOneCanonicalFactor root i s + have hprod := + hasProdLocallyUniformlyOn_genusOneCanonicalFactor + root hinv hsmall + have hPA : AnalyticOnNhd ℂ P Set.univ := + analyticOnNhd_genusOneCanonicalProduct hprod + have hdiv : MeromorphicOn.divisor P Set.univ = + MeromorphicOn.divisor xi Set.univ := + genusOneCanonicalProduct_divisor_eq + hroot0 hinv hsmall fiber hfiber hxi hxiOrder + have hxiFinite : ∀ z, meromorphicOrderAt xi z ≠ ⊤ := by + intro z + rw [(hxi z (Set.mem_univ z)).meromorphicOrderAt_eq, + hxiOrder z] + simp + have hPFinite : ∀ z, meromorphicOrderAt P z ≠ ⊤ := by + intro z + rw [(hPA z (Set.mem_univ z)).meromorphicOrderAt_eq, + analyticOrderAt_genusOneCanonicalProduct + hroot0 hinv hsmall fiber hfiber z] + simp + have hP0 : P 0 ≠ 0 := by + dsimp [P] + simp [genusOneCanonicalFactor, genusOnePrimaryFactor] + have hxiM : MeromorphicOn xi Set.univ := + fun z hz ↦ (hxi z hz).meromorphicAt + have hPM : MeromorphicOn P Set.univ := + fun z hz ↦ (hPA z hz).meromorphicAt + obtain ⟨hqA, hq0⟩ := + cancelledEntireQuotient_analytic_ne_zero + hxiM hPM hxiFinite hPFinite hdiv.symm + have hgrowth : SubquadraticLogNormGrowth + (cancelledEntireQuotient xi P) := + subquadraticLogNormGrowth_of_boundary hqA hq0 hboundary + simpa [GenusOneHadamardRepresentation, P] using + hadamardRepresentation_of_cancelledQuotientGrowth + hxi hPA hxiFinite hPFinite hdiv.symm hP0 hgrowth + +/-- Xi specialization: local finiteness already supplies root escape, so +inverse-square summability plus the explicit Cartan boundary estimate close +the whole-plane genus-one Hadamard representation. -/ +theorem riemannXiGenusOneHadamardRepresentation_of_boundaryGrowth + (hinv : Summable + (fun i : RiemannXiZeroIndex ↦ + ‖(riemannXiZeroRoot i)⁻¹‖ ^ 2)) + (hboundary : SubquadraticBoundaryLogNormGrowth + (cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s))) : + GenusOneHadamardRepresentation riemannXiZeroRoot riemannXiLi := by + classical + have hsmall : ∀ K : Set ℂ, IsCompact K → + ∀ᶠ i : RiemannXiZeroIndex in cofinite, + ∀ s ∈ K, ‖s / riemannXiZeroRoot i‖ ≤ 1 := by + intro K hK + obtain ⟨R, hR⟩ := hK.isBounded.exists_norm_le + filter_upwards [riemannXiZeroRoot_escape.eventually + (eventually_ge_atTop R)] with i hi s hs + rw [norm_div] + exact (div_le_one + (norm_pos_iff.mpr (riemannXiZeroRoot_ne_zero i))).2 + ((hR s hs).trans hi) + exact genusOneHadamardRepresentation_of_boundaryGrowth + riemannXiZeroRoot_ne_zero hinv hsmall riemannXiZeroFiber + mem_riemannXiZeroFiber + (fun z _ ↦ differentiable_riemannXiLi.analyticAt z) + analyticOrderAt_riemannXiLi_eq_zeroFiber_card hboundary + +/-- After the Jensen argument, the Cartan/minimum-modulus boundary estimate +is the sole remaining hypothesis in the xi Hadamard pipeline. -/ +theorem riemannXiGenusOneHadamardRepresentation_of_cartanBoundary + (hboundary : SubquadraticBoundaryLogNormGrowth + (cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s))) : + GenusOneHadamardRepresentation riemannXiZeroRoot riemannXiLi := + riemannXiGenusOneHadamardRepresentation_of_boundaryGrowth + summable_norm_inv_sq_riemannXiZeroRoot hboundary + +theorem riemannXiGenusOneHadamardRepresentation_of_dyadicBoundary + (hboundary : DyadicSubquadraticBoundaryLogNormGrowth + (cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s))) : + GenusOneHadamardRepresentation riemannXiZeroRoot riemannXiLi := + riemannXiGenusOneHadamardRepresentation_of_cartanBoundary + (subquadraticBoundaryLogNormGrowth_of_dyadic hboundary) + +/-- Fixed-constant Cartan dominance closes the xi Hadamard representation +when the multiplicity enumeration is inhabited. -/ +theorem riemannXiGenusOneHadamardRepresentation_of_nonempty + [Nonempty RiemannXiZeroIndex] : + GenusOneHadamardRepresentation riemannXiZeroRoot riemannXiLi := + riemannXiGenusOneHadamardRepresentation_of_dyadicBoundary + riemannXiCancelledQuotient_dyadicBoundary + +/-- Xi normalization determines the exponential constant and transports the +functional equation to the affine/product representation. It does not by +itself identify a unique logarithm `a` or eliminate the slope `b`. -/ +theorem riemannXiGenusOneHadamardRepresentation_normalized_of_nonempty + [Nonempty RiemannXiZeroIndex] : + ∃ a b : ℂ, + (∀ z, riemannXiLi z = Complex.exp (a + b * z) * + ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i z) ∧ + Complex.exp a = 1 ∧ + ∀ z, + Complex.exp (a + b * (1 - z)) * + (∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i (1 - z)) = + Complex.exp (a + b * z) * + ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i z := by + obtain ⟨a, b, hrep⟩ := riemannXiGenusOneHadamardRepresentation_of_nonempty + refine ⟨a, b, hrep, ?_, ?_⟩ + · have h := hrep 0 + simp [genusOneCanonicalFactor, genusOnePrimaryFactor] at h + exact h.symm + · intro z + rw [← hrep, ← hrep] + exact riemannXiLi_one_sub z + +/-- An explicit nonconstant value used to eliminate the zero-free branch. -/ +theorem riemannXiLi_two : + riemannXiLi 2 = (Real.pi : ℂ) / 3 := by + rw [riemannXiLi_eq_mul_completedRiemannZeta (by norm_num) (by norm_num)] + rw [show completedRiemannZeta (2 : ℂ) = + (Real.pi : ℂ)⁻¹ * riemannZeta 2 by + have h := riemannZeta_def_of_ne_zero (s := (2 : ℂ)) (by norm_num) + norm_num [Complex.Gammaℝ_def, Complex.cpow_neg, Complex.cpow_one, + Complex.Gamma_one] at h ⊢ + field_simp [Real.pi_ne_zero] at h ⊢ + exact h.symm] + rw [riemannZeta_two] + field_simp [Real.pi_ne_zero] + ring + +theorem riemannXiLi_two_ne_one : riemannXiLi 2 ≠ 1 := by + rw [riemannXiLi_two] + intro h + have hre := congrArg Complex.re h + norm_num at hre + linarith [Real.pi_gt_three] + +theorem riemannXiLi_ne_zero_of_isEmpty [IsEmpty RiemannXiZeroIndex] + (z : ℂ) : riemannXiLi z ≠ 0 := by + intro hz + obtain ⟨i, hi⟩ := (exists_riemannXiZeroRoot_iff z).mpr hz + exact isEmptyElim i + +theorem cancelledRiemannXiQuotient_eq_of_isEmpty + [IsEmpty RiemannXiZeroIndex] (z : ℂ) : + cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) z = riemannXiLi z := by + let P : ℂ → ℂ := fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s + have hP : P = fun _ ↦ 1 := by + funext s + simp [P] + have hz := cancelledEntireQuotient_eq_div_of_ne + (fun w hw ↦ (differentiable_riemannXiLi.analyticAt w).meromorphicAt) + (show MeromorphicOn P Set.univ by + rw [hP] + exact fun w hw ↦ analyticAt_const.meromorphicAt) + (differentiable_riemannXiLi.analyticAt z) + (show AnalyticAt ℂ P z by rw [hP]; fun_prop) + (show P z ≠ 0 by rw [hP]; simp) + change cancelledEntireQuotient riemannXiLi P z = riemannXiLi z + simpa [hP] using hz + +/-- If the xi divisor were empty, the global xi order bound alone supplies +the dyadic boundary estimate: the canonical product is the empty product. -/ +theorem riemannXiCancelledQuotient_dyadicBoundary_of_isEmpty + [IsEmpty RiemannXiZeroIndex] : + DyadicSubquadraticBoundaryLogNormGrowth + (cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s)) := by + obtain ⟨C, R0, hC, hR0, hxi⟩ := riemannXi_orderOneGrowthBound + intro ε hε + have hp : Tendsto (fun j : ℕ ↦ (2 : ℝ) ^ j) atTop atTop := + tendsto_pow_atTop_atTop_of_one_lt (by norm_num) + have hlarge : ∀ᶠ j : ℕ in atTop, max R0 1 ≤ (2 : ℝ) ^ j := + hp.eventually (eventually_ge_atTop (max R0 1)) + filter_upwards [hlarge, + eventually_dyadicCartanLossMajorant_lt 0 0 (4 * C) ε hε] + with j hj hmajor + let H : ℝ := (2 : ℝ) ^ j + refine ⟨H, le_rfl, by positivity, ?_⟩ + intro z hz + have hzNorm : ‖z‖ = H := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + have hlog2 : Real.log (2 : ℝ) ≤ 1 := by + have hh := Real.log_le_sub_one_of_pos (x := 2) (by norm_num) + norm_num at hh ⊢ + exact hh + have hlog : Real.log (H + 2) ≤ 2 * (j + 1 : ℝ) := by + have hH1 : 1 ≤ H := (le_max_right R0 1).trans hj + have harg : H + 2 ≤ 4 * H := by linarith + calc + Real.log (H + 2) ≤ Real.log (4 * H) := + Real.log_le_log (by positivity) harg + _ = (j + 2 : ℕ) * Real.log 2 := by + dsimp [H] + rw [show 4 * (2 : ℝ) ^ j = (2 : ℝ) ^ (j + 2) by + rw [pow_add]; norm_num; ring, Real.log_pow] + _ ≤ (j + 2 : ℝ) := by + have hjnon : 0 ≤ (j + 2 : ℝ) := by positivity + have hh := mul_le_mul_of_nonneg_left hlog2 hjnon + norm_num [Nat.cast_add] at hh ⊢ + exact hh + _ ≤ 2 * (j + 1 : ℝ) := by + nlinarith [Nat.cast_nonneg (α := ℝ) j] + rw [cancelledRiemannXiQuotient_eq_of_isEmpty] + calc + Real.log ‖riemannXiLi z‖ ≤ + Real.log (Real.exp (C * H * Real.log (H + 2))) := by + apply Real.log_le_log + (norm_pos_iff.mpr (riemannXiLi_ne_zero_of_isEmpty z)) + rw [← hzNorm] + apply hxi z + rw [hzNorm] + exact (le_max_left R0 1).trans hj + _ = C * H * Real.log (H + 2) := Real.log_exp _ + _ ≤ 4 * C * ((j + 1 : ℝ) / H) * H ^ 2 := by + calc + C * H * Real.log (H + 2) ≤ + C * H * (2 * (j + 1 : ℝ)) := by gcongr + _ ≤ 4 * C * ((j + 1 : ℝ) / H) * H ^ 2 := by + have hH : 0 < H := by positivity + have heq : 4 * C * ((j + 1 : ℝ) / H) * H ^ 2 = + 4 * C * (j + 1 : ℝ) * H := by field_simp + rw [heq] + have hu : 0 ≤ (j + 1 : ℝ) := by positivity + nlinarith [mul_nonneg (mul_nonneg hC hH.le) hu] + _ = DyadicCartanLossMajorant 0 0 (4 * C) j * H ^ 2 := by + simp [DyadicCartanLossMajorant, H] + _ ≤ ε * H ^ 2 := by gcongr + +/-- Xi has a nontrivial zero, proved without RH. If its divisor were empty, +the empty-product Hadamard theorem and functional equation would make xi +constant; the explicit value `xi(2)=π/3≠1` contradicts normalization. -/ +theorem riemannXiZeroIndex_nonempty : Nonempty RiemannXiZeroIndex := by + classical + cases isEmpty_or_nonempty RiemannXiZeroIndex with + | inr h => exact h + | inl h => + letI : IsEmpty RiemannXiZeroIndex := h + obtain ⟨a, b, hab⟩ := + riemannXiGenusOneHadamardRepresentation_of_dyadicBoundary + riemannXiCancelledQuotient_dyadicBoundary_of_isEmpty + have hab' : ∀ z, riemannXiLi z = Complex.exp (a + b * z) := by + intro z + simpa using hab z + have hfun : (fun z : ℂ ↦ Complex.exp (a + b * (1 - z))) = + fun z ↦ Complex.exp (a + b * z) := by + funext z + rw [← hab', ← hab'] + exact riemannXiLi_one_sub z + let c : ℂ := 1 / 2 + have hl : HasDerivAt + (fun z : ℂ ↦ Complex.exp (a + b * (1 - z))) + ((-b) * Complex.exp (a + b * (1 - c))) c := by + have hi := (((hasDerivAt_const c 1).sub + (hasDerivAt_id c)).const_mul b).const_add a + simpa [mul_comm] using hi.cexp + have hr : HasDerivAt + (fun z : ℂ ↦ Complex.exp (a + b * z)) + (b * Complex.exp (a + b * c)) c := by + have hi := ((hasDerivAt_id c).const_mul b).const_add a + simpa [mul_comm] using hi.cexp + have hd := congrArg (fun f : ℂ → ℂ ↦ deriv f c) hfun + rw [hl.deriv, hr.deriv] at hd + have heq : Complex.exp (a + b * (1 - c)) = + Complex.exp (a + b * c) := by + dsimp [c] + congr 1 + ring + rw [heq] at hd + have hb : b = 0 := by + have hsame : -(b * Complex.exp (a + b * c)) = + b * Complex.exp (a + b * c) := by simpa using hd + have hmul : 2 * (b * Complex.exp (a + b * c)) = 0 := by + linear_combination -hsame + have hbe : b * Complex.exp (a + b * c) = 0 := + (mul_eq_zero.mp hmul).resolve_left (by norm_num) + exact (mul_eq_zero.mp hbe).resolve_right (Complex.exp_ne_zero _) + have ha : Complex.exp a = 1 := by + have h0 := hab' 0 + simpa using h0.symm + apply False.elim + apply riemannXiLi_two_ne_one + rw [hab', hb] + simpa using ha + +/-- The genus-one Hadamard representation is unconditional across the +empty, finite, and infinite zero-divisor cases. -/ +theorem riemannXiGenusOneHadamardRepresentation : + GenusOneHadamardRepresentation riemannXiZeroRoot riemannXiLi := by + letI : Nonempty RiemannXiZeroIndex := riemannXiZeroIndex_nonempty + exact riemannXiGenusOneHadamardRepresentation_of_nonempty + +/-- The unconditional Hadamard representation is realized by the concrete +closed radial multiplicity windows, locally uniformly on the whole plane. -/ +theorem exists_riemannXiRadialHadamardApproximants_tendstoLocallyUniformly : + ∃ a b : ℂ, TendstoLocallyUniformlyOn + (fun (N : ℕ) s ↦ Complex.exp (a + b * s) * + ∏ i ∈ riemannXiZeroIndexWindow (N : ℝ), + genusOneCanonicalFactor riemannXiZeroRoot i s) + riemannXiLi atTop Set.univ := by + obtain ⟨a, b, hrep⟩ := riemannXiGenusOneHadamardRepresentation + refine ⟨a, b, ?_⟩ + have hpref : TendstoLocallyUniformlyOn + (fun _ : ℕ ↦ fun s ↦ Complex.exp (a + b * s)) + (fun s ↦ Complex.exp (a + b * s)) atTop Set.univ := by + intro u hu x hx + exact ⟨Set.univ, Filter.univ_mem, Filter.Eventually.of_forall + (fun _ y hy ↦ refl_mem_uniformity hu)⟩ + have hcanon := riemannXiRadialGenusOneProducts_tendstoLocallyUniformly + have hcanon_cont : ContinuousOn + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ := + analyticOnNhd_riemannXiGenusOneCanonicalProduct.continuousOn + have hmul := hpref.mul₀ hcanon (by fun_prop) hcanon_cont + have heq : (fun s ↦ Complex.exp (a + b * s)) * + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) = riemannXiLi := by + funext s + simpa only [Pi.mul_apply] using (hrep s).symm + rw [heq] at hmul + exact hmul + +theorem exists_riemannXiHeightHadamardApproximants_tendstoLocallyUniformly : + ∃ a b : ℂ, TendstoLocallyUniformlyOn + (fun (N : ℕ) s ↦ Complex.exp (a + b * s) * + ∏ i ∈ riemannXiZeroHeightWindow (N : ℝ), + genusOneCanonicalFactor riemannXiZeroRoot i s) + riemannXiLi atTop Set.univ := by + obtain ⟨a, b, hrep⟩ := riemannXiGenusOneHadamardRepresentation + refine ⟨a, b, ?_⟩ + have hpref : TendstoLocallyUniformlyOn + (fun _ : ℕ ↦ fun s ↦ Complex.exp (a + b * s)) + (fun s ↦ Complex.exp (a + b * s)) atTop Set.univ := by + intro u hu x hx + exact ⟨Set.univ, Filter.univ_mem, Filter.Eventually.of_forall + (fun _ y hy ↦ refl_mem_uniformity hu)⟩ + have hcanon := riemannXiHeightGenusOneProducts_tendstoLocallyUniformly + have hcanon_cont : ContinuousOn + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) Set.univ := + analyticOnNhd_riemannXiGenusOneCanonicalProduct.continuousOn + have hmul := hpref.mul₀ hcanon (by fun_prop) hcanon_cont + have heq : (fun s ↦ Complex.exp (a + b * s)) * + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s) = riemannXiLi := by + funext s + simpa only [Pi.mul_apply] using (hrep s).symm + rw [heq] at hmul + exact hmul + +theorem riemannXiGenusOneHadamardRepresentation_normalized : + ∃ a b : ℂ, + (∀ z, riemannXiLi z = Complex.exp (a + b * z) * + ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i z) ∧ + Complex.exp a = 1 ∧ + ∀ z, + Complex.exp (a + b * (1 - z)) * + (∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i (1 - z)) = + Complex.exp (a + b * z) * + ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i z := by + letI : Nonempty RiemannXiZeroIndex := riemannXiZeroIndex_nonempty + exact riemannXiGenusOneHadamardRepresentation_normalized_of_nonempty + +noncomputable def riemannXiHeightGenusOneProduct + (N : ℕ) (s : ℂ) : ℂ := + ∏ i ∈ riemannXiZeroHeightWindow (N : ℝ), + genusOneCanonicalFactor riemannXiZeroRoot i s + +noncomputable def riemannXiGenusOneCanonicalProduct (s : ℂ) : ℂ := + ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s + +theorem deriv_riemannXiHeightGenusOneProduct_zero (N : ℕ) : + deriv (riemannXiHeightGenusOneProduct N) 0 = 0 := by + classical + unfold riemannXiHeightGenusOneProduct + have heq : (fun s ↦ ∏ i ∈ riemannXiZeroHeightWindow (N : ℝ), + genusOneCanonicalFactor riemannXiZeroRoot i s) = + ∏ i ∈ riemannXiZeroHeightWindow (N : ℝ), + genusOneCanonicalFactor riemannXiZeroRoot i := by + funext s + simp + rw [heq, deriv_finsetProd (by + intro i hi + unfold genusOneCanonicalFactor genusOnePrimaryFactor + fun_prop)] + apply Finset.sum_eq_zero + intro i hi + have hfactor : HasDerivAt + (genusOneCanonicalFactor riemannXiZeroRoot i) 0 0 := by + unfold genusOneCanonicalFactor genusOnePrimaryFactor + convert (((hasDerivAt_const (x := (0 : ℂ)) (c := (1 : ℂ))).sub + ((hasDerivAt_id (𝕜 := ℂ) (0 : ℂ)).div_const + (riemannXiZeroRoot i))).mul + (((hasDerivAt_id (𝕜 := ℂ) (0 : ℂ)).div_const + (riemannXiZeroRoot i)).cexp)) using 1 <;> + first | rfl | (simp [id_eq]) + rw [hfactor.deriv] + simp + +theorem deriv_riemannXiGenusOneCanonicalProduct_zero : + deriv riemannXiGenusOneCanonicalProduct 0 = 0 := by + have hd : Tendsto + (fun N ↦ deriv (riemannXiHeightGenusOneProduct N) 0) + atTop (𝓝 (deriv riemannXiGenusOneCanonicalProduct 0)) := by + exact (riemannXiHeightGenusOneProducts_tendstoLocallyUniformly.deriv + (Filter.Eventually.of_forall (fun N ↦ by + unfold genusOneCanonicalFactor genusOnePrimaryFactor + fun_prop)) + isOpen_univ).tendsto_at (Set.mem_univ 0) + rw [funext deriv_riemannXiHeightGenusOneProduct_zero] at hd + exact tendsto_nhds_unique hd tendsto_const_nhds + +theorem logDeriv_riemannXiGenusOneCanonicalProduct_one : + logDeriv riemannXiGenusOneCanonicalProduct 1 = + ∑' i : RiemannXiZeroIndex, + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹ := by + have hder : Tendsto + (fun N ↦ deriv (riemannXiHeightGenusOneProduct N) 1) + atTop (𝓝 (deriv riemannXiGenusOneCanonicalProduct 1)) := by + exact (riemannXiHeightGenusOneProducts_tendstoLocallyUniformly.deriv + (Filter.Eventually.of_forall (fun N ↦ by + unfold genusOneCanonicalFactor genusOnePrimaryFactor + fun_prop)) + isOpen_univ).tendsto_at (Set.mem_univ 1) + have hval : Tendsto + (fun N ↦ riemannXiHeightGenusOneProduct N 1) + atTop (𝓝 (riemannXiGenusOneCanonicalProduct 1)) := + riemannXiHeightGenusOneProducts_tendstoLocallyUniformly.tendsto_at + (Set.mem_univ 1) + obtain ⟨a, b, hrep⟩ := riemannXiGenusOneHadamardRepresentation + have hP1 : riemannXiGenusOneCanonicalProduct 1 ≠ 0 := by + intro hp + have h := hrep 1 + rw [show (∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i 1) = + riemannXiGenusOneCanonicalProduct 1 from rfl, hp] at h + simp at h + have hlog : Tendsto + (fun N ↦ logDeriv (riemannXiHeightGenusOneProduct N) 1) + atTop (𝓝 (logDeriv riemannXiGenusOneCanonicalProduct 1)) := by + unfold logDeriv + apply (hder.div hval hP1).congr' + exact Filter.Eventually.of_forall (fun N ↦ rfl) + have heq : + (fun N : ℕ ↦ logDeriv (riemannXiHeightGenusOneProduct N) 1) = + fun N : ℕ ↦ ∑ i ∈ riemannXiZeroHeightWindow (N : ℝ), + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹ := by + funext N + exact logDeriv_riemannXiHeightGenusOneProduct_one (N : ℝ) + rw [heq] at hlog + exact tendsto_nhds_unique hlog + riemannXiPairedInverseRootHeightSums_tendsto + +/-- The reflection-paired inverse-root `tsum` is exactly minus twice the +affine Hadamard slope. -/ +theorem exists_riemannXiHadamardSlope_eq_pairedInverseRootSum : + ∃ a b : ℂ, + (∀ z, riemannXiLi z = Complex.exp (a + b * z) * + riemannXiGenusOneCanonicalProduct z) ∧ + Complex.exp a = 1 ∧ + (∑' i : RiemannXiZeroIndex, + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹) = -2 * b := by + obtain ⟨a, b, hrep, ha, hsymm⟩ := + riemannXiGenusOneHadamardRepresentation_normalized + refine ⟨a, b, ?_, ha, ?_⟩ + · exact hrep + have hP0 : riemannXiGenusOneCanonicalProduct 0 = 1 := by + unfold riemannXiGenusOneCanonicalProduct + simp [genusOneCanonicalFactor, genusOnePrimaryFactor] + have hP0ne : riemannXiGenusOneCanonicalProduct 0 ≠ 0 := by + rw [hP0] + norm_num + have hP1ne : riemannXiGenusOneCanonicalProduct 1 ≠ 0 := by + intro hp + have h := hrep 1 + rw [show (∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i 1) = + riemannXiGenusOneCanonicalProduct 1 from rfl, hp] at h + simp at h + have hxi0 : logDeriv riemannXiLi 0 = b := by + have hfun : riemannXiLi = + fun z ↦ Complex.exp (a + b * z) * + riemannXiGenusOneCanonicalProduct z := by + funext z + exact hrep z + rw [hfun, logDeriv_mul] + · rw [show logDeriv riemannXiGenusOneCanonicalProduct 0 = 0 by + rw [logDeriv_apply, + deriv_riemannXiGenusOneCanonicalProduct_zero] + simp] + simp only [logDeriv_apply] + have he : HasDerivAt + (fun z : ℂ ↦ Complex.exp (a + b * z)) + (Complex.exp (a + b * 0) * b) 0 := by + simpa [id_eq, add_comm] using + (((hasDerivAt_id (𝕜 := ℂ) (0 : ℂ)).const_mul b).const_add a).cexp + rw [he.deriv] + simp + · exact Complex.exp_ne_zero _ + · exact hP0ne + · fun_prop + · exact (analyticOnNhd_riemannXiGenusOneCanonicalProduct + 0 (Set.mem_univ 0)).differentiableAt + have hxi1 : logDeriv riemannXiLi 1 = + b + ∑' i : RiemannXiZeroIndex, + (riemannXiZeroRoot i * + (1 - riemannXiZeroRoot i))⁻¹ := by + have hfun : riemannXiLi = + fun z ↦ Complex.exp (a + b * z) * + riemannXiGenusOneCanonicalProduct z := by + funext z + exact hrep z + rw [hfun, logDeriv_mul] + · rw [logDeriv_riemannXiGenusOneCanonicalProduct_one] + simp only [logDeriv_apply] + have he : HasDerivAt + (fun z : ℂ ↦ Complex.exp (a + b * z)) + (Complex.exp (a + b * 1) * b) 1 := by + simpa [id_eq, add_comm] using + (((hasDerivAt_id (𝕜 := ℂ) (1 : ℂ)).const_mul b).const_add a).cexp + rw [he.deriv] + simp + · exact Complex.exp_ne_zero _ + · exact hP1ne + · fun_prop + · exact (analyticOnNhd_riemannXiGenusOneCanonicalProduct + 1 (Set.mem_univ 1)).differentiableAt + have hderivsymm : deriv riemannXiLi 0 = -deriv riemannXiLi 1 := by + have hbase : HasDerivAt (fun z : ℂ ↦ 1 - z) (-1) 0 := by + simpa [sub_eq_add_neg] using + (hasDerivAt_id (𝕜 := ℂ) (0 : ℂ)).neg.const_add 1 + have hcomp : HasDerivAt + (fun z : ℂ ↦ riemannXiLi (1 - z)) + (-deriv riemannXiLi 1) 0 := by + have houter : HasDerivAt riemannXiLi + (deriv riemannXiLi 1) 1 := + (differentiable_riemannXiLi 1).hasDerivAt + have houter' : HasDerivAt riemannXiLi + (deriv riemannXiLi 1) (1 - (0 : ℂ)) := by + simpa using houter + convert houter'.comp (𝕜 := ℂ) 0 hbase using 1 <;> + first | rfl | simp + have heq : (fun z : ℂ ↦ riemannXiLi (1 - z)) = riemannXiLi := by + funext z + exact riemannXiLi_one_sub z + rw [heq] at hcomp + exact hcomp.deriv + have hlogsymm : + logDeriv riemannXiLi 1 = -logDeriv riemannXiLi 0 := by + rw [logDeriv_apply, logDeriv_apply] + simp only [riemannXiLi_one, riemannXiLi_zero, div_one] + rw [hderivsymm] + ring + rw [hxi0, hxi1] at hlogsymm + linear_combination hlogsymm + +theorem exists_riemannXiInverseRootHeightSums_tendsto_neg_slope : + ∃ a b : ℂ, + (∀ z, riemannXiLi z = Complex.exp (a + b * z) * + riemannXiGenusOneCanonicalProduct z) ∧ + Complex.exp a = 1 ∧ + Tendsto + (fun N : ℕ ↦ ∑ i ∈ riemannXiZeroHeightWindow (N : ℝ), + (riemannXiZeroRoot i)⁻¹) + atTop (𝓝 (-b)) := by + obtain ⟨a, b, hrep, ha, hslope⟩ := + exists_riemannXiHadamardSlope_eq_pairedInverseRootSum + refine ⟨a, b, hrep, ha, ?_⟩ + convert riemannXiInverseRootHeightSums_tendsto using 1 + rw [hslope] + ring + +/-- A Cartan exceptional-disk estimate for the cancelled xi/product +quotient now closes every remaining geometric, maximum-modulus, logarithm, +rigidity, and analytic-continuation step of the Hadamard argument. -/ +theorem riemannXiGenusOneHadamardRepresentation_of_cartanExceptionalDisks + (hcartan : CartanExceptionalDiskLogBound + (cancelledEntireQuotient riemannXiLi + (fun s ↦ ∏' i : RiemannXiZeroIndex, + genusOneCanonicalFactor riemannXiZeroRoot i s))) : + GenusOneHadamardRepresentation riemannXiZeroRoot riemannXiLi := + riemannXiGenusOneHadamardRepresentation_of_cartanBoundary + (subquadraticBoundaryLogNormGrowth_of_cartanExceptionalDisks + hcartan) + +/-- The affine slope in a Hadamard representation is unique. The constant +is unique at the level of its exponential, which is optimal without choosing +a logarithm branch. -/ +theorem hadamardAffineFactor_unique + {P xi : ℂ → ℂ} {a b a' b' : ℂ} + (hPcont : ContinuousAt P 0) (hP0 : P 0 ≠ 0) + (hrep : ∀ s, xi s = Complex.exp (a + b * s) * P s) + (hrep' : ∀ s, xi s = Complex.exp (a' + b' * s) * P s) : + Complex.exp a = Complex.exp a' ∧ b = b' := by + have heq : (fun s ↦ Complex.exp (a + b * s)) =ᶠ[𝓝 0] + fun s ↦ Complex.exp (a' + b' * s) := by + filter_upwards [hPcont.eventually_ne hP0] with s hs + apply mul_right_cancel₀ hs + exact (hrep s).symm.trans (hrep' s) + have hval : Complex.exp a = Complex.exp a' := by + simpa using heq.self_of_nhds + have hd : b * Complex.exp a = b' * Complex.exp a' := by + have hd1 : HasDerivAt (fun s ↦ Complex.exp (a + b * s)) + (b * Complex.exp a) 0 := by + have hin : HasDerivAt (fun s : ℂ ↦ a + b * s) b 0 := by + simpa using ((hasDerivAt_id (x := (0 : ℂ))).const_mul b).const_add a + simpa [Function.comp_def, mul_comm] using + (Complex.hasDerivAt_exp (a + b * 0)).comp 0 hin + have hd2 : HasDerivAt (fun s ↦ Complex.exp (a' + b' * s)) + (b' * Complex.exp a') 0 := by + have hin : HasDerivAt (fun s : ℂ ↦ a' + b' * s) b' 0 := by + simpa using ((hasDerivAt_id (x := (0 : ℂ))).const_mul b').const_add a' + simpa [Function.comp_def, mul_comm] using + (Complex.hasDerivAt_exp (a' + b' * 0)).comp 0 hin + rw [← hd1.deriv, ← hd2.deriv] + exact heq.deriv_eq + refine ⟨hval, ?_⟩ + rw [hval] at hd + exact mul_right_cancel₀ (Complex.exp_ne_zero a') hd + +/-- Full log-branch statement for affine-factor uniqueness: slopes agree and +constants differ by an integral period of the complex exponential. -/ +theorem hadamardAffineFactor_unique_mod_period + {P xi : ℂ → ℂ} {a b a' b' : ℂ} + (hPcont : ContinuousAt P 0) (hP0 : P 0 ≠ 0) + (hrep : ∀ s, xi s = Complex.exp (a + b * s) * P s) + (hrep' : ∀ s, xi s = Complex.exp (a' + b' * s) * P s) : + b = b' ∧ ∃ n : ℤ, + a = a' + n * (2 * (Real.pi : ℂ) * Complex.I) := by + have h := hadamardAffineFactor_unique hPcont hP0 hrep hrep' + exact ⟨h.2, Complex.exp_eq_exp_iff_exists_int.mp h.1⟩ + +theorem genusOneHadamard_normalization_zero + {ι : Type*} {root : ι → ℂ} {xi : ℂ → ℂ} {a b : ℂ} + (hrep : ∀ s, xi s = + Complex.exp (a + b * s) * + ∏' i, genusOneCanonicalFactor root i s) + (hxi0 : xi 0 = 1) : + Complex.exp a = 1 := by + have h := hrep 0 + rw [hxi0] at h + simpa [genusOneCanonicalFactor, genusOnePrimaryFactor] using h.symm + +theorem genusOneHadamard_normalization_zero_period + {ι : Type*} {root : ι → ℂ} {xi : ℂ → ℂ} {a b : ℂ} + (hrep : ∀ s, xi s = + Complex.exp (a + b * s) * + ∏' i, genusOneCanonicalFactor root i s) + (hxi0 : xi 0 = 1) : + ∃ n : ℤ, a = n * (2 * (Real.pi : ℂ) * Complex.I) := + Complex.exp_eq_one_iff.mp + (genusOneHadamard_normalization_zero hrep hxi0) + +theorem genusOneHadamard_functionalEquation_constraint + {ι : Type*} {root : ι → ℂ} {xi : ℂ → ℂ} {a b : ℂ} + (hrep : ∀ s, xi s = + Complex.exp (a + b * s) * + ∏' i, genusOneCanonicalFactor root i s) + (hfe : ∀ s, xi (1 - s) = xi s) (s : ℂ) : + Complex.exp (a + b * (1 - s)) * + ∏' i, genusOneCanonicalFactor root i (1 - s) = + Complex.exp (a + b * s) * + ∏' i, genusOneCanonicalFactor root i s := by + rw [← hrep, ← hrep] + exact hfe s + +theorem tendstoLocallyUniformlyOn_const_index + {ι : Type*} (f : ℂ → ℂ) (l : Filter ι) (s : Set ℂ) : + TendstoLocallyUniformlyOn (fun _ ↦ f) f l s := by + intro u hu x hx + exact ⟨Set.univ, Filter.univ_mem, Filter.Eventually.of_forall + (fun _ y hy ↦ refl_mem_uniformity hu)⟩ + +/-- A Hadamard representation upgrades the symmetric genus-one product +approximants to locally uniform approximants of xi itself. -/ +theorem GenusOneHadamardRepresentation.exists_tendsto_symmetricApproximants + {ι : Type*} [DecidableEq ι] + {root : ι → ℂ} {cutoff : ℕ → Finset ι} {height : ℕ → ℝ} + {xi : ℂ → ℂ} + (hexhaust : SymmetricHeightExhaustion root cutoff height) + (hprod : HasProdLocallyUniformlyOn (genusOneCanonicalFactor root) + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ) + (hrep : GenusOneHadamardRepresentation root xi) : + ∃ a b : ℂ, TendstoLocallyUniformlyOn + (fun N s ↦ Complex.exp (a + b * s) * + ∏ i ∈ cutoff N, genusOneCanonicalFactor root i s) + xi atTop Set.univ := by + rcases hrep with ⟨a, b, hrepr⟩ + refine ⟨a, b, ?_⟩ + have hcanon := + hexhaust.tendstoLocallyUniformlyOn_genusOneProduct hprod + have hpref : TendstoLocallyUniformlyOn + (fun _ : ℕ ↦ fun s ↦ Complex.exp (a + b * s)) + (fun s ↦ Complex.exp (a + b * s)) atTop Set.univ := + tendstoLocallyUniformlyOn_const_index _ _ _ + have hcanon_cont : ContinuousOn + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) Set.univ := by + apply hcanon.continuousOn + exact Filter.Frequently.of_forall fun N ↦ by + apply Continuous.continuousOn + apply continuous_finsetProd + intro i hi + unfold genusOneCanonicalFactor genusOnePrimaryFactor + fun_prop + have hmul := hpref.mul₀ hcanon (by fun_prop) hcanon_cont + have hlimit : (fun s ↦ Complex.exp (a + b * s)) * + (fun s ↦ ∏' i, genusOneCanonicalFactor root i s) = xi := by + funext s + simpa only [Pi.mul_apply] using (hrepr s).symm + rw [hlimit] at hmul + exact hmul + +/-- The finite factor whose logarithmic derivative generates one zero's Li +summands. -/ +def liFiniteProductFactor (rho z : ℂ) : ℂ := + (1 - (1 - rho⁻¹) * z) / (1 - z) + +/-- A finite product retaining every indexed occurrence of a repeated zero. -/ +def FiniteZeroMultiset.generatingProduct + (zeros : FiniteZeroMultiset) (z : ℂ) : ℂ := + ∏ i, liFiniteProductFactor (zeros.root i) z + +/-- The finite canonical product centered at `s = 1`. Repeated roots remain +separate factors through the `Fin` index. -/ +def FiniteZeroMultiset.canonicalProductAtOne + (zeros : FiniteZeroMultiset) (s : ℂ) : ℂ := + ∏ i, (1 + (s - 1) / zeros.root i) + +def FiniteZeroMultiset.genusOneCenteringConstant + (zeros : FiniteZeroMultiset) : ℂ := + ∏ i, (-(1 - zeros.root i) / zeros.root i) + +def FiniteZeroMultiset.genusOneInverseSum + (zeros : FiniteZeroMultiset) : ℂ := + ∑ i, (zeros.root i)⁻¹ + +def FiniteZeroMultiset.genusOneHadamardApproximation + (zeros : FiniteZeroMultiset) (a b s : ℂ) : ℂ := + Complex.exp (a + b * s) * + ∏ i, genusOnePrimaryFactor (s / zeros.root i) + +theorem genusOnePrimaryFactor_eq_centered_reflection + {rho s : ℂ} (hρ : rho ≠ 0) (h1ρ : 1 - rho ≠ 0) : + genusOnePrimaryFactor (s / rho) = + (-(1 - rho) / rho) * + (1 + (s - 1) / (1 - rho)) * Complex.exp (s / rho) := by + unfold genusOnePrimaryFactor + congr 1 + field_simp + ring + +/-- Exact multiplicity-aware comparison of the zero-centered genus-one +product with the one-centered Li product. Reflection symmetry reindexes the +linear factors; the remaining discrepancy is explicit constant and +exponential data. -/ +theorem FiniteZeroMultiset.genusOneProduct_eq_centered + (zeros : FiniteZeroMultiset) + (hsym : zeros.ReflectionSymmetric) (s : ℂ) : + (∏ i, genusOnePrimaryFactor (s / zeros.root i)) = + zeros.genusOneCenteringConstant * + Complex.exp (s * zeros.genusOneInverseSum) * + zeros.canonicalProductAtOne s := by + rw [show (∏ i, genusOnePrimaryFactor (s / zeros.root i)) = + ∏ i, ((-(1 - zeros.root i) / zeros.root i) * + (1 + (s - 1) / (1 - zeros.root i)) * + Complex.exp (s / zeros.root i)) by + apply Finset.prod_congr rfl + intro i hi + apply genusOnePrimaryFactor_eq_centered_reflection + (zeros.root_ne_zero i) + rw [← hsym.root_partner i] + exact zeros.root_ne_zero (hsym.partner i)] + simp only [Finset.prod_mul_distrib] + have hreflect : + (∏ i, (1 + (s - 1) / (1 - zeros.root i))) = + zeros.canonicalProductAtOne s := by + unfold FiniteZeroMultiset.canonicalProductAtOne + rw [← hsym.partner.prod_comp] + apply Finset.prod_congr rfl + intro i hi + rw [hsym.root_partner] + congr 2 + ring + have hexp : + (∏ i, Complex.exp (s / zeros.root i)) = + Complex.exp (s * ∑ i, (zeros.root i)⁻¹) := by + rw [← Complex.exp_sum, Finset.mul_sum] + apply congrArg Complex.exp + apply Finset.sum_congr rfl + intro i hi + rw [div_eq_mul_inv] + rw [hexp, hreflect] + unfold FiniteZeroMultiset.genusOneCenteringConstant + FiniteZeroMultiset.genusOneInverseSum + ring + +theorem FiniteZeroMultiset.genusOneCenteringConstant_ne_zero + (zeros : FiniteZeroMultiset) + (hsym : zeros.ReflectionSymmetric) : + zeros.genusOneCenteringConstant ≠ 0 := by + unfold FiniteZeroMultiset.genusOneCenteringConstant + apply Finset.prod_ne_zero_iff.mpr + intro i hi + apply div_ne_zero + · simp only [neg_ne_zero] + rw [← hsym.root_partner i] + exact zeros.root_ne_zero (hsym.partner i) + · exact zeros.root_ne_zero i + +/-- The affine Hadamard prefactor is balanced exactly when its slope cancels +the finite inverse-root sum. -/ +def FiniteZeroMultiset.HadamardBalanced + (zeros : FiniteZeroMultiset) (b : ℂ) : Prop := + b + zeros.genusOneInverseSum = 0 + +theorem FiniteZeroMultiset.genusOneHadamardApproximation_eq_centered + (zeros : FiniteZeroMultiset) + (hsym : zeros.ReflectionSymmetric) (a b s : ℂ) + (hbalance : zeros.HadamardBalanced b) : + zeros.genusOneHadamardApproximation a b s = + (Complex.exp a * zeros.genusOneCenteringConstant) * + zeros.canonicalProductAtOne s := by + unfold FiniteZeroMultiset.genusOneHadamardApproximation + rw [zeros.genusOneProduct_eq_centered hsym] + have hexp : Complex.exp (a + b * s) * + Complex.exp (s * zeros.genusOneInverseSum) = Complex.exp a := by + rw [← Complex.exp_add] + congr 1 + rw [show a + b * s + s * zeros.genusOneInverseSum = + a + (b + zeros.genusOneInverseSum) * s by ring, hbalance] + ring + calc + _ = (Complex.exp (a + b * s) * + Complex.exp (s * zeros.genusOneInverseSum)) * + zeros.genusOneCenteringConstant * + zeros.canonicalProductAtOne s := by ring + _ = _ := by rw [hexp] + +theorem liFiniteProductFactor_eq_canonical_mobius + (rho z : ℂ) (hρ : rho ≠ 0) (hz : z ≠ 1) : + liFiniteProductFactor rho z = + 1 + ((1 - z)⁻¹ - 1) / rho := by + unfold liFiniteProductFactor + field_simp + ring + +/-- Exact finite Möbius identity, with multiplicity preserved factor by +factor. -/ +theorem FiniteZeroMultiset.generatingProduct_eq_canonical_mobius + (zeros : FiniteZeroMultiset) (z : ℂ) (hz : z ≠ 1) : + zeros.generatingProduct z = + zeros.canonicalProductAtOne ((1 - z)⁻¹) := by + unfold FiniteZeroMultiset.generatingProduct + FiniteZeroMultiset.canonicalProductAtOne + apply Finset.prod_congr rfl + intro i _ + exact liFiniteProductFactor_eq_canonical_mobius + (zeros.root i) z (zeros.root_ne_zero i) hz + +theorem FiniteZeroMultiset.generatingProduct_eventuallyEq_canonical_mobius + (zeros : FiniteZeroMultiset) : + zeros.generatingProduct =ᶠ[𝓝 0] + fun z ↦ zeros.canonicalProductAtOne ((1 - z)⁻¹) := by + filter_upwards [ + isOpen_compl_singleton.mem_nhds (by norm_num : (0 : ℂ) ≠ 1)] with z hz + exact zeros.generatingProduct_eq_canonical_mobius z hz + +theorem FiniteZeroMultiset.logDeriv_generatingProduct_eventuallyEq_canonical_mobius + (zeros : FiniteZeroMultiset) : + logDeriv zeros.generatingProduct =ᶠ[𝓝 0] + logDeriv (fun z ↦ zeros.canonicalProductAtOne ((1 - z)⁻¹)) := by + filter_upwards [ + isOpen_compl_singleton.mem_nhds (by norm_num : (0 : ℂ) ≠ 1)] with z hz + have hlocal : zeros.generatingProduct =ᶠ[𝓝 z] + fun w ↦ zeros.canonicalProductAtOne ((1 - w)⁻¹) := by + filter_upwards [isOpen_compl_singleton.mem_nhds hz] with w hw + exact zeros.generatingProduct_eq_canonical_mobius w hw + simp only [logDeriv, Pi.div_apply, + zeros.generatingProduct_eq_canonical_mobius z hz, hlocal.deriv_eq] + +/-- The rational generating term for one zero. Its formal power-series +coefficients are `liZeroSummand (n + 1) rho`. -/ +def liZeroGeneratingTerm (rho z : ℂ) : ℂ := + 1 / (1 - z) - (1 - rho⁻¹) / (1 - (1 - rho⁻¹) * z) + +theorem logDeriv_liFiniteProductFactor + (rho z : ℂ) (hz : 1 - z ≠ 0) + (hρz : 1 - (1 - rho⁻¹) * z ≠ 0) : + logDeriv (liFiniteProductFactor rho) z = + liZeroGeneratingTerm rho z := by + rw [logDeriv_apply] + unfold liFiniteProductFactor liZeroGeneratingTerm + have hnum : HasDerivAt + (fun w : ℂ ↦ 1 - (1 - rho⁻¹) * w) (-(1 - rho⁻¹)) z := by + simpa [sub_eq_add_neg] using + ((hasDerivAt_id z).const_mul (1 - rho⁻¹)).neg.const_add 1 + have hden : HasDerivAt (fun w : ℂ ↦ 1 - w) (-1) z := by + simpa [sub_eq_add_neg] using (hasDerivAt_id z).neg.const_add 1 + have hρz' : 1 + rho⁻¹ * z - z ≠ 0 := by + convert hρz using 1 + ring + rw [(hnum.fun_div hden hz).deriv] + field_simp [hz, hρz, hρz'] + ring + +/-- Exact finite-product logarithmic-derivative identity. The hypotheses +simply say that the displayed rational factors are defined and nonzero at +`z`; near `z = 0` they hold automatically. -/ +theorem FiniteZeroMultiset.logDeriv_generatingProduct + (zeros : FiniteZeroMultiset) (z : ℂ) + (hz : 1 - z ≠ 0) + (hfactor : ∀ i, 1 - (1 - (zeros.root i)⁻¹) * z ≠ 0) : + logDeriv zeros.generatingProduct z = + ∑ i, liZeroGeneratingTerm (zeros.root i) z := by + unfold FiniteZeroMultiset.generatingProduct + rw [logDeriv_prod] + · apply Finset.sum_congr rfl + intro i _ + exact logDeriv_liFiniteProductFactor (zeros.root i) z hz (hfactor i) + · intro i _ + exact div_ne_zero (hfactor i) hz + · intro i _ + unfold liFiniteProductFactor + fun_prop + +@[simp] theorem liZeroGeneratingTerm_zero (rho : ℂ) : + liZeroGeneratingTerm rho 0 = liZeroSummand 1 rho := by + simp [liZeroGeneratingTerm] + +theorem FiniteZeroMultiset.logDeriv_generatingProduct_zero + (zeros : FiniteZeroMultiset) : + logDeriv zeros.generatingProduct 0 = zeros.liSum 1 := by + rw [zeros.logDeriv_generatingProduct 0 (by norm_num) (by simp)] + simp [FiniteZeroMultiset.liSum] + +/-- The normalized Taylor coefficient of the finite product's logarithmic +derivative at the origin. -/ +def FiniteZeroMultiset.logDerivCoefficient + (zeros : FiniteZeroMultiset) (k : ℕ) : ℂ := + iteratedDeriv k (logDeriv zeros.generatingProduct) 0 / + (k.factorial : ℂ) + +/-- The exact finite all-order coefficient identity needed by the limit +transfer. Keeping it named makes clear that this is a finite algebraic +obligation, distinct from every convergence assumption. -/ +def FiniteLiTaylorIdentity (zeros : FiniteZeroMultiset) : Prop := + ∀ k : ℕ, zeros.logDerivCoefficient k = zeros.liSum (k + 1) + +/-- The first finite Taylor coefficient is already unconditional. -/ +theorem FiniteZeroMultiset.logDerivCoefficient_zero + (zeros : FiniteZeroMultiset) : + zeros.logDerivCoefficient 0 = zeros.liSum 1 := by + simp [FiniteZeroMultiset.logDerivCoefficient, + zeros.logDeriv_generatingProduct_zero] + +/-- Every Taylor coefficient of one rational generating term is the +corresponding Li zero summand. -/ +theorem iteratedDeriv_liZeroGeneratingTerm_zero (rho : ℂ) (k : ℕ) : + iteratedDeriv k (liZeroGeneratingTerm rho) 0 = + (k.factorial : ℂ) * liZeroSummand (k + 1) rho := by + let a : ℂ := 1 - rho⁻¹ + unfold liZeroGeneratingTerm liZeroSummand + simp only [div_eq_mul_inv, one_mul] + change iteratedDeriv k + (fun z : ℂ ↦ (1 - z)⁻¹ - a * (1 - a * z)⁻¹) 0 = + (k.factorial : ℂ) * (1 - a ^ (k + 1)) + rw [iteratedDeriv_fun_sub + ((contDiffAt_const.sub contDiffAt_id).inv (by norm_num)) + (contDiffAt_const.mul + ((contDiffAt_const.sub (contDiffAt_const.mul contDiffAt_id)).inv (by simp)))] + rw [iteratedDeriv_const_mul_field] + have h₁ : (fun z : ℂ ↦ (1 - z)⁻¹) = + fun z ↦ ((-1 : ℂ) * z + 1)⁻¹ := by + funext z + congr 1 + ring + have h₂ : (fun z : ℂ ↦ (1 - a * z)⁻¹) = + fun z ↦ (-a * z + 1)⁻¹ := by + funext z + congr 1 + ring + rw [h₁, h₂, iteratedDeriv_eq_iterate, iter_deriv_inv_linear, + iteratedDeriv_eq_iterate, iter_deriv_inv_linear] + simp only [mul_zero, zero_add, one_zpow, mul_one] + rw [neg_pow] + ring_nf + simp [show k * 2 = 2 * k by omega, pow_mul] + ring + +/-- The all-order finite Taylor identity is unconditional; it follows from +the exact finite logarithmic-derivative formula and Mathlib's closed formula +for iterated derivatives of inverse-linear functions. -/ +theorem FiniteZeroMultiset.finiteLiTaylorIdentity + (zeros : FiniteZeroMultiset) : + FiniteLiTaylorIdentity zeros := by + intro k + have hz : ∀ᶠ z : ℂ in 𝓝 0, 1 - z ≠ 0 := + (by fun_prop : ContinuousAt (fun z : ℂ ↦ 1 - z) 0).eventually_ne (by norm_num) + have hfactor : ∀ᶠ z : ℂ in 𝓝 0, + ∀ i, 1 - (1 - (zeros.root i)⁻¹) * z ≠ 0 := by + simpa only [Finset.mem_univ, forall_const] using + (Finset.eventually_all Finset.univ).2 (fun i _ ↦ + (by fun_prop : ContinuousAt + (fun z : ℂ ↦ 1 - (1 - (zeros.root i)⁻¹) * z) 0).eventually_ne (by simp)) + have hlog : logDeriv zeros.generatingProduct =ᶠ[𝓝 0] + fun z ↦ ∑ i, liZeroGeneratingTerm (zeros.root i) z := by + filter_upwards [hz, hfactor] with z hz' hfactor' + exact zeros.logDeriv_generatingProduct z hz' hfactor' + unfold FiniteZeroMultiset.logDerivCoefficient + rw [hlog.iteratedDeriv_eq k] + rw [iteratedDeriv_fun_sum] + · simp_rw [show ∀ i, iteratedDeriv k (liZeroGeneratingTerm (zeros.root i)) 0 = + (k.factorial : ℂ) * liZeroSummand (k + 1) (zeros.root i) by + intro i + exact iteratedDeriv_liZeroGeneratingTerm_zero (zeros.root i) k] + unfold FiniteZeroMultiset.liSum + rw [← Finset.mul_sum] + exact mul_div_cancel_left₀ _ (by exact_mod_cast Nat.factorial_ne_zero k) + · intro i _ + unfold liZeroGeneratingTerm + fun_prop (disch := simp) + +/-- All-order finite Möbius/binomial coefficient identity. The normalized +Taylor coefficients of the logarithmic derivative of the transformed +canonical product are exactly the finite Li sums, with every repeated root +counted separately. -/ +theorem FiniteZeroMultiset.logDeriv_canonicalMobius_coefficient + (zeros : FiniteZeroMultiset) (k : ℕ) : + iteratedDeriv k + (logDeriv + (fun z ↦ zeros.canonicalProductAtOne ((1 - z)⁻¹))) 0 / + (k.factorial : ℂ) = + zeros.liSum (k + 1) := by + rw [← zeros.logDeriv_generatingProduct_eventuallyEq_canonical_mobius.iteratedDeriv_eq k] + exact zeros.finiteLiTaylorIdentity k + +/-- All-order coefficient correspondence for a balanced finite genus-one +Hadamard product. This closes the finite prefactor/reflection bookkeeping: +after the Möbius substitution, its logarithmic-derivative coefficients are +the multiplicity-aware finite Li sums. -/ +theorem FiniteZeroMultiset.logDeriv_genusOneHadamardMobius_coefficient + (zeros : FiniteZeroMultiset) + (hsym : zeros.ReflectionSymmetric) (a b : ℂ) + (hbalance : zeros.HadamardBalanced b) (k : ℕ) : + iteratedDeriv k + (logDeriv (fun z ↦ + zeros.genusOneHadamardApproximation a b ((1 - z)⁻¹))) 0 / + (k.factorial : ℂ) = + zeros.liSum (k + 1) := by + have hscale : Complex.exp a * zeros.genusOneCenteringConstant ≠ 0 := + mul_ne_zero (Complex.exp_ne_zero a) + (zeros.genusOneCenteringConstant_ne_zero hsym) + have hfun : (fun z ↦ + zeros.genusOneHadamardApproximation a b ((1 - z)⁻¹)) = + fun z ↦ (Complex.exp a * zeros.genusOneCenteringConstant) * + zeros.canonicalProductAtOne ((1 - z)⁻¹) := by + funext z + exact zeros.genusOneHadamardApproximation_eq_centered + hsym a b _ hbalance + have hlog : logDeriv (fun z ↦ + zeros.genusOneHadamardApproximation a b ((1 - z)⁻¹)) = + logDeriv (fun z ↦ + zeros.canonicalProductAtOne ((1 - z)⁻¹)) := by + rw [hfun] + funext z + exact logDeriv_const_mul z _ hscale + rw [hlog] + exact zeros.logDeriv_canonicalMobius_coefficient k + +/-- Rigorous all-index transfer from finite multiplicity-aware zero sums to +the Taylor coefficients of a locally uniform nonvanishing product limit. + +The hypotheses separate the four independent obligations: + +* local uniform convergence of the finite products; +* holomorphy on one common open neighborhood of `0`; +* nonvanishing of every approximant and the limit there; +* the finite all-order coefficient identity. + +No zeta-specific product or convergence claim is hidden in this theorem. -/ +theorem finiteZeroLiSums_tendsto_of_generatingProducts + (zeros : ℕ → FiniteZeroMultiset) (g : ℂ → ℂ) (s : Set ℂ) + (hs : IsOpen s) (h0 : (0 : ℂ) ∈ s) + (hconv : TendstoLocallyUniformlyOn + (fun N ↦ (zeros N).generatingProduct) g atTop s) + (hhol : ∀ᶠ N in atTop, + DifferentiableOn ℂ (zeros N).generatingProduct s) + (happrox0 : ∀ᶠ N in atTop, ∀ z ∈ s, + (zeros N).generatingProduct z ≠ 0) + (hlimit0 : ∀ z ∈ s, g z ≠ 0) + (hexact : ∀ N, FiniteLiTaylorIdentity (zeros N)) + (k : ℕ) : + Tendsto (fun N ↦ (zeros N).liSum (k + 1)) atTop + (𝓝 (iteratedDeriv k (logDeriv g) 0 / (k.factorial : ℂ))) := by + have hderiv := iteratedDeriv_logDeriv_tendsto + hs h0 hconv hhol happrox0 hlimit0 k + have hnormalized := hderiv.div_const (k.factorial : ℂ) + simpa only [FiniteLiTaylorIdentity, + FiniteZeroMultiset.logDerivCoefficient] using + hnormalized.congr' (Filter.Eventually.of_forall fun N ↦ hexact N k) + +/-- All-index coefficient transfer with the finite algebraic identity +discharged. The remaining assumptions are exactly the analytic normal +convergence, holomorphy, and common nonvanishing obligations. -/ +theorem finiteZeroLiSums_tendsto_of_generatingProducts' + (zeros : ℕ → FiniteZeroMultiset) (g : ℂ → ℂ) (s : Set ℂ) + (hs : IsOpen s) (h0 : (0 : ℂ) ∈ s) + (hconv : TendstoLocallyUniformlyOn + (fun N ↦ (zeros N).generatingProduct) g atTop s) + (hhol : ∀ᶠ N in atTop, + DifferentiableOn ℂ (zeros N).generatingProduct s) + (happrox0 : ∀ᶠ N in atTop, ∀ z ∈ s, + (zeros N).generatingProduct z ≠ 0) + (hlimit0 : ∀ z ∈ s, g z ≠ 0) + (k : ℕ) : + Tendsto (fun N ↦ (zeros N).liSum (k + 1)) atTop + (𝓝 (iteratedDeriv k (logDeriv g) 0 / (k.factorial : ℂ))) := + finiteZeroLiSums_tendsto_of_generatingProducts + zeros g s hs h0 hconv hhol happrox0 hlimit0 + (fun N ↦ (zeros N).finiteLiTaylorIdentity) k + +/-- Direct all-order transfer from finite canonical Möbius products through +locally uniform normal convergence. -/ +theorem finiteZeroLiSums_tendsto_of_canonicalMobiusProducts + (zeros : ℕ → FiniteZeroMultiset) (g : ℂ → ℂ) (s : Set ℂ) + (hs : IsOpen s) (h0 : (0 : ℂ) ∈ s) + (hconv : TendstoLocallyUniformlyOn + (fun N z ↦ (zeros N).canonicalProductAtOne ((1 - z)⁻¹)) + g atTop s) + (hhol : ∀ᶠ N in atTop, + DifferentiableOn ℂ + (fun z ↦ (zeros N).canonicalProductAtOne ((1 - z)⁻¹)) s) + (happrox0 : ∀ᶠ N in atTop, ∀ z ∈ s, + (zeros N).canonicalProductAtOne ((1 - z)⁻¹) ≠ 0) + (hlimit0 : ∀ z ∈ s, g z ≠ 0) + (k : ℕ) : + Tendsto (fun N ↦ (zeros N).liSum (k + 1)) atTop + (𝓝 (iteratedDeriv k (logDeriv g) 0 / (k.factorial : ℂ))) := by + have hderiv := iteratedDeriv_logDeriv_tendsto + hs h0 hconv hhol happrox0 hlimit0 k + have hnormalized := hderiv.div_const (k.factorial : ℂ) + simpa only using hnormalized.congr' + (Filter.Eventually.of_forall fun N ↦ + (zeros N).logDeriv_canonicalMobius_coefficient k) + +/-- The single zeta-product analytic package needed for finite canonical +products to approximate the Möbius transform of xi. -/ +def XiCanonicalProductApproximation + (zeros : ℕ → FiniteZeroMultiset) (xi : ℂ → ℂ) (s : Set ℂ) : Prop := + IsOpen s ∧ (0 : ℂ) ∈ s ∧ + TendstoLocallyUniformlyOn + (fun N z ↦ (zeros N).canonicalProductAtOne ((1 - z)⁻¹)) + (liChangeOfVariables xi) atTop s ∧ + (∀ᶠ N in atTop, + DifferentiableOn ℂ + (fun z ↦ (zeros N).canonicalProductAtOne ((1 - z)⁻¹)) s) ∧ + (∀ᶠ N in atTop, ∀ z ∈ s, + (zeros N).canonicalProductAtOne ((1 - z)⁻¹) ≠ 0) ∧ + ∀ z ∈ s, liChangeOfVariables xi z ≠ 0 + +/-- All-order xi transfer from exactly two named obligations: the +zeta-specific canonical-product approximation package and the general +Möbius/derivative coefficient identity. -/ +theorem finiteZeroLiSums_tendsto_liDerivativeCoefficient_of_canonicalProduct + (zeros : ℕ → FiniteZeroMultiset) (xi : ℂ → ℂ) (s : Set ℂ) + (hproduct : XiCanonicalProductApproximation zeros xi s) + (hcoeff : LiChangeOfVariablesCoefficientIdentity xi) + (k : ℕ) : + Tendsto (fun N ↦ (zeros N).liSum (k + 1)) atTop + (𝓝 (liDerivativeCoefficient xi (k + 1))) := by + rcases hproduct with ⟨hs, h0, hconv, hhol, happrox0, hlimit0⟩ + simpa only [hcoeff k] using + finiteZeroLiSums_tendsto_of_canonicalMobiusProducts + zeros (liChangeOfVariables xi) s hs h0 hconv hhol + happrox0 hlimit0 k + +/-- Instantiation of the all-order product transfer for the normalized +Riemann xi function. -/ +theorem riemannXiLi_finiteZeroLiSums_tendsto + (zeros : ℕ → FiniteZeroMultiset) (s : Set ℂ) + (hproduct : XiCanonicalProductApproximation zeros riemannXiLi s) + (hcoeff : LiChangeOfVariablesCoefficientIdentity riemannXiLi) + (k : ℕ) : + Tendsto (fun N ↦ (zeros N).liSum (k + 1)) atTop + (𝓝 (liDerivativeCoefficient riemannXiLi (k + 1))) := + finiteZeroLiSums_tendsto_liDerivativeCoefficient_of_canonicalProduct + zeros riemannXiLi s hproduct hcoeff k + +/-- The xi canonical-product package plus the all-order Möbius identity imply +the route's exact multiplicity-aware zeta-window formula. -/ +theorem riemannLiZeroWindowFormula_of_canonicalProduct + (s : Set ℂ) + (hproduct : XiCanonicalProductApproximation + (fun N ↦ riemannZetaZeroWindowMultiset (N : ℝ)) + riemannXiLi s) + (hcoeff : LiChangeOfVariablesCoefficientIdentity riemannXiLi) : + RiemannLiZeroWindowFormula := by + intro n hn + obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (Nat.ne_of_gt hn) + simpa [Nat.add_comm] using + riemannXiLi_finiteZeroLiSums_tendsto + (fun N ↦ riemannZetaZeroWindowMultiset (N : ℝ)) + s hproduct hcoeff k + +/-- Product-limit transfer all the way to Li's derivative coefficients, +conditional only on the explicit all-order Möbius coefficient identity. +The finite algebraic identity is already discharged. -/ +theorem finiteZeroLiSums_tendsto_liDerivativeCoefficient + (zeros : ℕ → FiniteZeroMultiset) (xi : ℂ → ℂ) (s : Set ℂ) + (hs : IsOpen s) (h0 : (0 : ℂ) ∈ s) + (hconv : TendstoLocallyUniformlyOn + (fun N ↦ (zeros N).generatingProduct) + (liChangeOfVariables xi) atTop s) + (hhol : ∀ᶠ N in atTop, + DifferentiableOn ℂ (zeros N).generatingProduct s) + (happrox0 : ∀ᶠ N in atTop, ∀ z ∈ s, + (zeros N).generatingProduct z ≠ 0) + (hlimit0 : ∀ z ∈ s, liChangeOfVariables xi z ≠ 0) + (hcoeff : LiChangeOfVariablesCoefficientIdentity xi) + (k : ℕ) : + Tendsto (fun N ↦ (zeros N).liSum (k + 1)) atTop + (𝓝 (liDerivativeCoefficient xi (k + 1))) := by + simpa only [hcoeff k] using + finiteZeroLiSums_tendsto_of_generatingProducts' + zeros (liChangeOfVariables xi) s hs h0 hconv hhol + happrox0 hlimit0 k + +/-- Truncated generating polynomial for any coefficient sequence. -/ +def liGeneratingPolynomial (a : ℕ → ℝ) (N : ℕ) (x : ℝ) : ℝ := + ∑ n ∈ range N, a n * x ^ n + +@[simp] theorem liGeneratingPolynomial_zero (a : ℕ → ℝ) (x : ℝ) : + liGeneratingPolynomial a 0 x = 0 := by + simp [liGeneratingPolynomial] + +theorem liGeneratingPolynomial_succ (a : ℕ → ℝ) (N : ℕ) (x : ℝ) : + liGeneratingPolynomial a (N + 1) x = + liGeneratingPolynomial a N x + a N * x ^ N := by + simp [liGeneratingPolynomial, sum_range_succ] + +end diff --git a/KakeyaLeanGate/RHJensen.lean b/KakeyaLeanGate/RHJensen.lean index f9c61433..0606c9f8 100644 --- a/KakeyaLeanGate/RHJensen.lean +++ b/KakeyaLeanGate/RHJensen.lean @@ -1,17 +1,3480 @@ -import Mathlib +import KakeyaLeanGate.LiCriterion +import Mathlib.Analysis.Complex.TaylorSeries +import Mathlib.Analysis.Complex.Polynomial.GaussLucas +import Mathlib.Analysis.Analytic.IsolatedZeros +import Mathlib.Analysis.Analytic.OfScalars +import Mathlib.Analysis.Calculus.Deriv.Star +import Mathlib.Analysis.Calculus.Deriv.Shift +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Complex.LocallyUniformLimit +import Mathlib.Analysis.Complex.JensenFormula +import Mathlib.Analysis.Complex.BranchLogRoot +import Mathlib.Analysis.Complex.BorelCaratheodory +import Mathlib.Analysis.Complex.AbsMax +import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn +import Mathlib.Analysis.Real.Pi.Bounds +import Mathlib.Analysis.SpecialFunctions.Exp +import Mathlib.Analysis.SpecialFunctions.Log.Summable +import Mathlib.Analysis.SpecialFunctions.Complex.Analytic +import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Probability.Moments.IntegrableExpMul +import Mathlib.Probability.Moments.ComplexMGF +import Mathlib.Probability.Distributions.Poisson.PoissonLimitThm +import Mathlib.Analysis.Normed.Group.Tannery +import Mathlib.Analysis.Normed.Group.FunctionSeries +import Mathlib.LinearAlgebra.Matrix.Determinant.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Topology.Algebra.Polynomial /-! -A small, target-supporting Jensen-polynomial lemma. +# The Jensen-polynomial / Laguerre--Pólya route -This file does not define the Riemann xi function and does not claim any -finite computation proves the Riemann Hypothesis. It only validates the -quadratic formula for the degree-two Jensen polynomial attached to an -arbitrary real coefficient sequence. +This module formalizes only the unconditional beginning of the route. +In particular, `AllJensenHyperbolic xiGamma` is **not** proved here and no +equivalence with `RiemannHypothesis` is asserted. + +The normalization follows Griffin--Ono--Rolen--Zagier, PNAS 116 (2019), +11103--11110, equations (1) and (2): their generating entire function is +`8 * ξ (1/2 + z)`, and +`J_a^{d,n}(X) = ∑_{j=0}^d choose(d,j) a(n+j) X^j`. + +Mathlib does not currently expose a polynomial real-rootedness predicate, so +`Hyperbolic` below is a small standard project-local interface: every complex +root of the scalar-extended real polynomial is real. -/ +noncomputable section + +open Complex Polynomial MeasureTheory Filter +open scoped ComplexConjugate Topology + +namespace Kakeya.RHJensen + +attribute [local fun_prop] differentiable_completedZeta₀ + +/-- The entire continuation of the classical +`ξ(s) = s(s-1) Λ(s) / 2`. + +Mathlib's `completedRiemannZeta₀` is the entire function satisfying +`Λ(s) = Λ₀(s) - 1/s - 1/(1-s)`. Multiplication by `s(s-1)` gives the +pole-free expression below. -/ +def riemannXi (s : ℂ) : ℂ := + (1 + s * (s - 1) * completedRiemannZeta₀ s) / 2 + +theorem differentiable_riemannXi : Differentiable ℂ riemannXi := by + unfold riemannXi + fun_prop + +attribute [local fun_prop] differentiable_riemannXi + +/-- The actual modified Jacobi-theta kernel used by pinned Mathlib to define +the pole-removed completed Riemann zeta through a Mellin transform. -/ +def completedZetaMellinKernel : ℝ → ℂ := + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif + +/-- Pinned Mathlib's exact integral normalization: +`Λ₀(s) = Mellin(completedZetaMellinKernel)(s/2) / 2`. + +This representation is unconditional. Its kernel is the *modified* weak +functional-equation kernel; coefficient positivity requires a further +integration-by-parts identity with Riemann's positive `Φ` kernel, which is not +present in the pinned library. -/ +theorem completedRiemannZeta₀_eq_mellin (s : ℂ) : + completedRiemannZeta₀ s = + mellin completedZetaMellinKernel (s / 2) / 2 := by + rfl + +/-- The `n`-th summand of Riemann's classical even Fourier kernel `Φ`. +We use `n + 1` to index the source sum from `1`, and `|u|` to make the +authoritative positive-half-line formula even by definition. The factored +form is algebraically + +`(4 π² m⁴ exp(9|u|/2) - 6 π m² exp(5|u|/2)) + exp(-π m² exp(2|u|))`, where `m = n+1`. -/ +def riemannPhiTerm (n : ℕ) (u : ℝ) : ℝ := + let m : ℝ := n + 1 + let v := |u| + 2 * Real.pi * m ^ 2 * Real.exp (5 * v / 2) * + (2 * Real.pi * m ^ 2 * Real.exp (2 * v) - 3) * + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) + +theorem riemannPhiTerm_eq_source_formula (n : ℕ) (u : ℝ) : + riemannPhiTerm n u = + (4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4 * + Real.exp (9 * |u| / 2) - + 6 * Real.pi * (n + 1 : ℝ) ^ 2 * + Real.exp (5 * |u| / 2)) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * + Real.exp (2 * |u|)) := by + rw [riemannPhiTerm] + rw [show Real.exp (9 * |u| / 2) = + Real.exp (5 * |u| / 2) * Real.exp (2 * |u|) by + rw [← Real.exp_add] + congr 1 + ring] + ring + +/-- Positive-half-line theta summand whose shifted second derivative is the +corresponding Riemann `Φ` summand. -/ +def riemannThetaTerm (n : ℕ) (u : ℝ) : ℝ := + Real.exp (u / 2) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) + +theorem hasDerivAt_riemannThetaTerm_raw (n : ℕ) (u : ℝ) : + HasDerivAt (riemannThetaTerm n) + (Real.exp (u / 2) / 2 * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) + + Real.exp (u / 2) * + (Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + (-2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)))) u := by + have hleft : + HasDerivAt (fun x : ℝ ↦ Real.exp (x / 2)) + (Real.exp (u / 2) / 2) u := + by simpa only [id_eq, div_eq_mul_inv, one_mul] using + ((hasDerivAt_id' u).div_const 2).exp + have hinner := (((hasDerivAt_id' u).const_mul 2).exp.const_mul + (-Real.pi * (n + 1 : ℝ) ^ 2)) + have hraw := hleft.mul hinner.exp + rw [show + Real.exp (u / 2) / 2 * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) + + Real.exp (u / 2) * + (Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + (-Real.pi * (n + 1 : ℝ) ^ 2 * + (Real.exp (2 * u) * (2 * 1)))) = + Real.exp (u / 2) / 2 * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) + + Real.exp (u / 2) * + (Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + (-2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u))) by ring] at hraw + change HasDerivAt + ((fun x : ℝ ↦ Real.exp (x / 2)) * + fun x : ℝ ↦ + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * x))) _ u + exact hraw + +theorem hasDerivAt_riemannThetaTerm (n : ℕ) (u : ℝ) : + HasDerivAt (riemannThetaTerm n) + ((1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + riemannThetaTerm n u) u := by + have h := hasDerivAt_riemannThetaTerm_raw n u + rw [show + Real.exp (u / 2) / 2 * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) + + Real.exp (u / 2) * + (Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + (-2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u))) = + (1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + riemannThetaTerm n u by + unfold riemannThetaTerm + ring] at h + exact h + +theorem deriv_riemannThetaTerm (n : ℕ) (u : ℝ) : + deriv (riemannThetaTerm n) u = + (1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + riemannThetaTerm n u := by + exact (hasDerivAt_riemannThetaTerm n u).deriv + +theorem hasDerivAt_deriv_riemannThetaTerm_raw (n : ℕ) (u : ℝ) : + HasDerivAt (deriv (riemannThetaTerm n)) + (-4 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u) * + riemannThetaTerm n u + + (1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + ((1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + riemannThetaTerm n u)) u := by + have hfun : + deriv (riemannThetaTerm n) = fun x ↦ + (1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * x)) * + riemannThetaTerm n x := by + funext x + exact deriv_riemannThetaTerm n x + rw [hfun] + have hcoeff := (hasDerivAt_const u (1 / 2 : ℝ)).sub + (((hasDerivAt_id' u).const_mul 2).exp.const_mul + (2 * Real.pi * (n + 1 : ℝ) ^ 2)) + have hraw := hcoeff.mul (hasDerivAt_riemannThetaTerm n u) + rw [show + (0 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * + (Real.exp (2 * u) * (2 * 1))) * riemannThetaTerm n u = + -4 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u) * + riemannThetaTerm n u by ring] at hraw + change HasDerivAt + ((fun x : ℝ ↦ + 1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * x)) * + riemannThetaTerm n) _ u + exact hraw + +theorem deriv_deriv_riemannThetaTerm (n : ℕ) (u : ℝ) : + deriv (deriv (riemannThetaTerm n)) u = + (1 / 4 - + 6 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u) + + 4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4 * Real.exp (4 * u)) * + riemannThetaTerm n u := by + rw [(hasDerivAt_deriv_riemannThetaTerm_raw n u).deriv] + rw [show Real.exp (4 * u) = Real.exp (2 * u) ^ 2 by + rw [pow_two, ← Real.exp_add] + congr 1 + ring] + ring + +/-- Summable coefficient in a uniform exponential majorant for `Φ`. -/ +def riemannPhiMajorantCoefficient (n : ℕ) : ℝ := + 4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4 * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2) + +theorem riemannPhiMajorantCoefficient_pos (n : ℕ) : + 0 < riemannPhiMajorantCoefficient n := by + unfold riemannPhiMajorantCoefficient + positivity + +set_option maxHeartbeats 400000 in +theorem summable_riemannPhiMajorantCoefficient : + Summable riemannPhiMajorantCoefficient := by + have hbase : + Summable (fun n : ℕ ↦ + (n : ℝ) ^ 4 * Real.exp (-Real.pi * n)) := + Real.summable_pow_mul_exp_neg_nat_mul 4 Real.pi_pos + have hshift : + Summable (fun n : ℕ ↦ + 4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4 * + Real.exp (-Real.pi * (n + 1 : ℝ))) := by + have hs := ((summable_nat_add_iff 1).2 hbase).mul_left (4 * Real.pi ^ 2) + refine hs.congr ?_ + intro n + push_cast + ring + apply hshift.of_nonneg_of_le + · exact fun n ↦ (riemannPhiMajorantCoefficient_pos n).le + · intro n + unfold riemannPhiMajorantCoefficient + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply Real.exp_le_exp.mpr + have hm : (n + 1 : ℝ) ≤ (n + 1 : ℝ) ^ 2 := by + have hn : 0 ≤ (n : ℝ) := Nat.cast_nonneg n + nlinarith + nlinarith [Real.pi_pos] + +/-- One summable coefficient controls the theta summands and their first two +derivatives on every bounded positive interval. -/ +def riemannThetaC2Majorant (R : ℝ) (n : ℕ) : ℝ := + Real.exp (R / 2) * + (1 + Real.exp (2 * R) + Real.exp (4 * R)) * + riemannPhiMajorantCoefficient n + +theorem summable_riemannThetaC2Majorant (R : ℝ) : + Summable (riemannThetaC2Majorant R) := by + exact summable_riemannPhiMajorantCoefficient.mul_left + (Real.exp (R / 2) * (1 + Real.exp (2 * R) + Real.exp (4 * R))) + +/-- A summable derivative majorant on the two-sided neighborhood `(-1,1)`. +This is only needed to identify the exact derivative at the modular boundary +`u = 0`; positive-half estimates alone do not justify that derivative. -/ +def riemannThetaLocalDerivMajorant (n : ℕ) : ℝ := + Real.exp (1 / 2 : ℝ) * + (1 + 2 * Real.pi * Real.exp 2) * + (n + 1 : ℝ) ^ 4 * + Real.exp (-(Real.pi * Real.exp (-2)) * (n + 1 : ℝ) ^ 2) + +theorem summable_riemannThetaLocalDerivMajorant : + Summable riemannThetaLocalDerivMajorant := by + let c := Real.pi * Real.exp (-2) + let K := Real.exp (1 / 2 : ℝ) * (1 + 2 * Real.pi * Real.exp 2) + have hc : 0 < c := by + dsimp only [c] + positivity + have hbase : + Summable (fun n : ℕ ↦ + (n : ℝ) ^ 4 * Real.exp (-c * n)) := + Real.summable_pow_mul_exp_neg_nat_mul 4 hc + have hshift : + Summable (fun n : ℕ ↦ + K * (n + 1 : ℝ) ^ 4 * Real.exp (-c * (n + 1 : ℝ))) := by + have hs := ((summable_nat_add_iff 1).2 hbase).mul_left K + refine hs.congr ?_ + intro n + push_cast + ring + apply hshift.of_nonneg_of_le + · intro n + unfold riemannThetaLocalDerivMajorant + positivity + · intro n + have hm : (n + 1 : ℝ) ≤ (n + 1 : ℝ) ^ 2 := by + have hn : 0 ≤ (n : ℝ) := Nat.cast_nonneg n + nlinarith + have hexp : + Real.exp (-c * (n + 1 : ℝ) ^ 2) ≤ + Real.exp (-c * (n + 1 : ℝ)) := by + apply Real.exp_le_exp.mpr + nlinarith + dsimp only [riemannThetaLocalDerivMajorant, K, c] + gcongr + +theorem norm_deriv_riemannThetaTerm_le_localMajorant + (n : ℕ) {u : ℝ} (hu : u ∈ Set.Ioo (-1 : ℝ) 1) : + ‖deriv (riemannThetaTerm n) u‖ ≤ + riemannThetaLocalDerivMajorant n := by + let m : ℝ := n + 1 + let c := Real.pi * Real.exp (-2) + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + have hm2 : 1 ≤ m ^ 2 := by nlinarith [sq_nonneg m] + have hm24 : m ^ 2 ≤ m ^ 4 := by nlinarith [sq_nonneg (m ^ 2 - m)] + have huL := hu.1 + have huU := hu.2 + have hhalf : Real.exp (u / 2) ≤ Real.exp (1 / 2 : ℝ) := by + apply Real.exp_le_exp.mpr + linarith + have hEupper : Real.exp (2 * u) ≤ Real.exp 2 := by + apply Real.exp_le_exp.mpr + linarith + have hElower : Real.exp (-2) ≤ Real.exp (2 * u) := by + apply Real.exp_le_exp.mpr + linarith + have hdamp : + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * u)) ≤ + Real.exp (-c * m ^ 2) := by + apply Real.exp_le_exp.mpr + dsimp only [c] + have hp := mul_le_mul_of_nonneg_left hElower + (mul_nonneg Real.pi_pos.le (sq_nonneg m)) + nlinarith + have hcoef : + |1 / 2 - 2 * Real.pi * m ^ 2 * Real.exp (2 * u)| ≤ + (1 + 2 * Real.pi * Real.exp 2) * m ^ 4 := by + calc + |1 / 2 - 2 * Real.pi * m ^ 2 * Real.exp (2 * u)| ≤ + 1 / 2 + 2 * Real.pi * m ^ 2 * Real.exp (2 * u) := by + calc + _ ≤ |(1 / 2 : ℝ)| + + |2 * Real.pi * m ^ 2 * Real.exp (2 * u)| := abs_sub _ _ + _ = _ := by + rw [abs_of_nonneg (by norm_num), + abs_of_nonneg (by positivity)] + _ ≤ 1 + 2 * Real.pi * m ^ 4 * Real.exp 2 := by + gcongr + norm_num + _ ≤ (1 + 2 * Real.pi * Real.exp 2) * m ^ 4 := by + nlinarith [Real.pi_pos, Real.exp_pos 2] + rw [deriv_riemannThetaTerm, Real.norm_eq_abs, abs_mul] + have hthetaPos : 0 < riemannThetaTerm n u := by + unfold riemannThetaTerm + positivity + rw [show |riemannThetaTerm n u| = riemannThetaTerm n u from + abs_of_pos hthetaPos] + calc + |1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)| * + riemannThetaTerm n u ≤ + ((1 + 2 * Real.pi * Real.exp 2) * m ^ 4) * + (Real.exp (1 / 2 : ℝ) * Real.exp (-c * m ^ 2)) := by + dsimp only [riemannThetaTerm, m] + gcongr + _ = riemannThetaLocalDerivMajorant n := by + dsimp only [riemannThetaLocalDerivMajorant, m, c] + ring + +theorem norm_riemannThetaTerm_le_basicMajorant + (n : ℕ) {u R : ℝ} (hu : 0 ≤ u) (huR : u ≤ R) : + ‖riemannThetaTerm n u‖ ≤ + Real.exp (R / 2) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2) := by + let m : ℝ := n + 1 + have hE : 1 ≤ Real.exp (2 * u) := + Real.one_le_exp (mul_nonneg (by norm_num) hu) + have hneg : + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * u)) ≤ + Real.exp (-Real.pi * m ^ 2) := by + apply Real.exp_le_exp.mpr + have hp : Real.pi * m ^ 2 ≤ + Real.pi * m ^ 2 * Real.exp (2 * u) := by + exact le_mul_of_one_le_right (mul_nonneg Real.pi_pos.le (sq_nonneg m)) hE + linarith + have hhalf : Real.exp (u / 2) ≤ Real.exp (R / 2) := by + apply Real.exp_le_exp.mpr + linarith + rw [Real.norm_eq_abs, abs_of_pos (by unfold riemannThetaTerm; positivity)] + unfold riemannThetaTerm + exact mul_le_mul hhalf hneg (by positivity) (by positivity) + +theorem norm_riemannThetaTerm_le_C2Majorant + (n : ℕ) {u R : ℝ} (hu : 0 ≤ u) (huR : u ≤ R) : + ‖riemannThetaTerm n u‖ ≤ riemannThetaC2Majorant R n := by + have hbasic := norm_riemannThetaTerm_le_basicMajorant n hu huR + let m : ℝ := n + 1 + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + unfold riemannThetaC2Majorant riemannPhiMajorantCoefficient + have hm4 : 1 ≤ m ^ 4 := by + exact one_le_pow₀ hm + have hpi : 1 ≤ 4 * Real.pi ^ 2 := by + nlinarith [Real.pi_gt_three, sq_nonneg Real.pi] + have hA : 1 ≤ 4 * Real.pi ^ 2 * m ^ 4 := by + calc + (1 : ℝ) = 1 * 1 := by ring + _ ≤ (4 * Real.pi ^ 2) * m ^ 4 := + mul_le_mul hpi hm4 zero_le_one (by positivity) + have hfac : + 1 ≤ (1 + Real.exp (2 * R) + Real.exp (4 * R)) * + (4 * Real.pi ^ 2 * m ^ 4) := by + calc + (1 : ℝ) ≤ 1 + Real.exp (2 * R) + Real.exp (4 * R) := by + nlinarith [Real.exp_pos (2 * R), Real.exp_pos (4 * R)] + _ ≤ (1 + Real.exp (2 * R) + Real.exp (4 * R)) * + (4 * Real.pi ^ 2 * m ^ 4) := by + exact le_mul_of_one_le_right + (by nlinarith [Real.exp_pos (2 * R), Real.exp_pos (4 * R)]) hA + calc + ‖riemannThetaTerm n u‖ ≤ + Real.exp (R / 2) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2) := hbasic + _ ≤ Real.exp (R / 2) * + ((1 + Real.exp (2 * R) + Real.exp (4 * R)) * + (4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4)) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2) := by + apply mul_le_mul_of_nonneg_right _ (Real.exp_pos _).le + simpa [m] using + (mul_le_mul_of_nonneg_left hfac (Real.exp_pos (R / 2)).le) + _ = _ := by ring + +theorem norm_deriv_riemannThetaTerm_le_C2Majorant + (n : ℕ) {u R : ℝ} (hu : 0 ≤ u) (huR : u ≤ R) : + ‖deriv (riemannThetaTerm n) u‖ ≤ riemannThetaC2Majorant R n := by + rw [deriv_riemannThetaTerm, Real.norm_eq_abs, abs_mul] + have htheta := norm_riemannThetaTerm_le_basicMajorant n hu huR + rw [Real.norm_eq_abs] at htheta + have hcoef : + |1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)| ≤ + 1 / 2 + 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * R) := by + calc + |1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)| ≤ + |(1 / 2 : ℝ)| + + |2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)| := abs_sub _ _ + _ = 1 / 2 + 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u) := by + rw [abs_of_nonneg (by norm_num), abs_of_nonneg (by positivity)] + _ ≤ 1 / 2 + 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * R) := by + gcongr + let m : ℝ := n + 1 + let A := 4 * Real.pi ^ 2 * m ^ 4 + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + have hA0 : 0 ≤ A := by dsimp only [A]; positivity + have hAhalf : (1 / 2 : ℝ) ≤ A := by + dsimp only [A] + have hm4 : 1 ≤ m ^ 4 := one_le_pow₀ hm + have hpi : (1 / 2 : ℝ) ≤ 4 * Real.pi ^ 2 := by + nlinarith [Real.pi_gt_three, sq_nonneg Real.pi] + calc + (1 / 2 : ℝ) = (1 / 2) * 1 := by ring + _ ≤ (4 * Real.pi ^ 2) * m ^ 4 := + mul_le_mul hpi hm4 (by norm_num) (by positivity) + have hAlin : 2 * Real.pi * m ^ 2 ≤ A := by + dsimp only [A] + have hone : 1 ≤ 2 * Real.pi * m ^ 2 := by + have hm2 : 1 ≤ m ^ 2 := one_le_pow₀ hm + nlinarith [Real.pi_gt_three] + calc + 2 * Real.pi * m ^ 2 = + (2 * Real.pi * m ^ 2) * 1 := by ring + _ ≤ (2 * Real.pi * m ^ 2) * (2 * Real.pi * m ^ 2) := by gcongr + _ = 4 * Real.pi ^ 2 * m ^ 4 := by ring + have hfactor : + 1 / 2 + 2 * Real.pi * m ^ 2 * Real.exp (2 * R) ≤ + (1 + Real.exp (2 * R) + Real.exp (4 * R)) * A := by + nlinarith [mul_le_mul_of_nonneg_right hAlin (Real.exp_pos (2 * R)).le, + mul_nonneg hA0 (Real.exp_pos (4 * R)).le] + unfold riemannThetaC2Majorant riemannPhiMajorantCoefficient + dsimp only [m, A] at hcoef hfactor ⊢ + calc + |1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)| * + |riemannThetaTerm n u| ≤ + (1 / 2 + 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * R)) * + |riemannThetaTerm n u| := by gcongr + _ ≤ (1 / 2 + 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * R)) * + (Real.exp (R / 2) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2)) := by + gcongr + _ ≤ ((1 + Real.exp (2 * R) + Real.exp (4 * R)) * + (4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4)) * + (Real.exp (R / 2) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2)) := by + gcongr + _ = _ := by ring + +theorem norm_deriv_deriv_riemannThetaTerm_le_C2Majorant + (n : ℕ) {u R : ℝ} (hu : 0 ≤ u) (huR : u ≤ R) : + ‖deriv (deriv (riemannThetaTerm n)) u‖ ≤ + riemannThetaC2Majorant R n := by + rw [deriv_deriv_riemannThetaTerm, Real.norm_eq_abs, abs_mul] + have htheta := norm_riemannThetaTerm_le_basicMajorant n hu huR + rw [Real.norm_eq_abs] at htheta + let m : ℝ := n + 1 + let A := 4 * Real.pi ^ 2 * m ^ 4 + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + have hcoef : + |1 / 4 - 6 * Real.pi * m ^ 2 * Real.exp (2 * u) + + 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (4 * u)| ≤ + 1 / 4 + 6 * Real.pi * m ^ 2 * Real.exp (2 * R) + + 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (4 * R) := by + have he2 : Real.exp (2 * u) ≤ Real.exp (2 * R) := + Real.exp_le_exp.mpr (by linarith) + have he4 : Real.exp (4 * u) ≤ Real.exp (4 * R) := + Real.exp_le_exp.mpr (by linarith) + have hy : 6 * Real.pi * m ^ 2 * Real.exp (2 * u) ≤ + 6 * Real.pi * m ^ 2 * Real.exp (2 * R) := by gcongr + have hz : 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (4 * u) ≤ + 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (4 * R) := by gcongr + have hyu0 : 0 ≤ 6 * Real.pi * m ^ 2 * Real.exp (2 * u) := by positivity + have hyR0 : 0 ≤ 6 * Real.pi * m ^ 2 * Real.exp (2 * R) := by positivity + have hzu0 : 0 ≤ 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (4 * u) := by positivity + have hzR0 : 0 ≤ 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (4 * R) := by positivity + rw [abs_le] + constructor <;> nlinarith + have hA0 : 0 ≤ A := by dsimp only [A]; positivity + have hAquarter : (1 / 4 : ℝ) ≤ A := by + dsimp only [A] + have hm4 : 1 ≤ m ^ 4 := one_le_pow₀ hm + have hpi : (1 / 4 : ℝ) ≤ 4 * Real.pi ^ 2 := by + nlinarith [Real.pi_gt_three, sq_nonneg Real.pi] + calc + (1 / 4 : ℝ) = (1 / 4) * 1 := by ring + _ ≤ (4 * Real.pi ^ 2) * m ^ 4 := + mul_le_mul hpi hm4 (by norm_num) (by positivity) + have hAsix : 6 * Real.pi * m ^ 2 ≤ A := by + dsimp only [A] + have hm2 : 1 ≤ m ^ 2 := one_le_pow₀ hm + have hratio : 6 ≤ 4 * Real.pi * m ^ 2 := by + nlinarith [Real.pi_gt_three] + calc + 6 * Real.pi * m ^ 2 ≤ + (4 * Real.pi * m ^ 2) * (Real.pi * m ^ 2) := by + simpa only [mul_assoc] using + (mul_le_mul_of_nonneg_right hratio + (mul_nonneg Real.pi_pos.le (sq_nonneg m))) + _ = 4 * Real.pi ^ 2 * m ^ 4 := by ring + have hfactor : + 1 / 4 + 6 * Real.pi * m ^ 2 * Real.exp (2 * R) + + 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (4 * R) ≤ + (1 + Real.exp (2 * R) + Real.exp (4 * R)) * A := by + nlinarith [mul_le_mul_of_nonneg_right hAsix (Real.exp_pos (2 * R)).le] + unfold riemannThetaC2Majorant riemannPhiMajorantCoefficient + dsimp only [m, A] at hcoef hfactor ⊢ + calc + |1 / 4 - 6 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u) + + 4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4 * Real.exp (4 * u)| * + |riemannThetaTerm n u| ≤ + (1 / 4 + 6 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * R) + + 4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4 * Real.exp (4 * R)) * + |riemannThetaTerm n u| := by gcongr + _ ≤ (1 / 4 + 6 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * R) + + 4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4 * Real.exp (4 * R)) * + (Real.exp (R / 2) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2)) := by + gcongr + _ ≤ ((1 + Real.exp (2 * R) + Real.exp (4 * R)) * + (4 * Real.pi ^ 2 * (n + 1 : ℝ) ^ 4)) * + (Real.exp (R / 2) * + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2)) := by + gcongr + _ = _ := by ring + +theorem tendstoUniformlyOn_riemannThetaTerm_Icc (R : ℝ) : + TendstoUniformlyOn + (fun N u ↦ ∑ n ∈ Finset.range N, riemannThetaTerm n u) + (fun u ↦ ∑' n : ℕ, riemannThetaTerm n u) + Filter.atTop (Set.Icc 0 R) := by + apply tendstoUniformlyOn_tsum_nat (summable_riemannThetaC2Majorant R) + intro n u hu + exact norm_riemannThetaTerm_le_C2Majorant n hu.1 hu.2 + +theorem tendstoUniformlyOn_deriv_riemannThetaTerm_Icc (R : ℝ) : + TendstoUniformlyOn + (fun N u ↦ ∑ n ∈ Finset.range N, deriv (riemannThetaTerm n) u) + (fun u ↦ ∑' n : ℕ, deriv (riemannThetaTerm n) u) + Filter.atTop (Set.Icc 0 R) := by + apply tendstoUniformlyOn_tsum_nat (summable_riemannThetaC2Majorant R) + intro n u hu + exact norm_deriv_riemannThetaTerm_le_C2Majorant n hu.1 hu.2 + +theorem tendstoUniformlyOn_deriv_deriv_riemannThetaTerm_Icc (R : ℝ) : + TendstoUniformlyOn + (fun N u ↦ ∑ n ∈ Finset.range N, + deriv (deriv (riemannThetaTerm n)) u) + (fun u ↦ ∑' n : ℕ, deriv (deriv (riemannThetaTerm n)) u) + Filter.atTop (Set.Icc 0 R) := by + apply tendstoUniformlyOn_tsum_nat (summable_riemannThetaC2Majorant R) + intro n u hu + exact norm_deriv_deriv_riemannThetaTerm_le_C2Majorant n hu.1 hu.2 + +/-- The source kernel is termwise the shifted second derivative of the theta +tail on the positive half-line. -/ +theorem riemannPhiTerm_eq_theta_shifted_second_deriv + (n : ℕ) {u : ℝ} (hu : 0 ≤ u) : + riemannPhiTerm n u = + deriv (deriv (riemannThetaTerm n)) u - + (1 / 4 : ℝ) * riemannThetaTerm n u := by + rw [deriv_deriv_riemannThetaTerm] + simp only [riemannPhiTerm, riemannThetaTerm, abs_of_nonneg hu] + rw [show Real.exp (5 * u / 2) = + Real.exp (2 * u) * Real.exp (u / 2) by + rw [← Real.exp_add]; congr 1; ring] + rw [show Real.exp (4 * u) = + Real.exp (2 * u) * Real.exp (2 * u) by + rw [← Real.exp_add]; congr 1; ring] + ring + +/-- Positive-half-line theta tail underlying the modified Mellin kernel. -/ +def riemannThetaTail (u : ℝ) : ℝ := + ∑' n : ℕ, riemannThetaTerm n u + +theorem continuousOn_riemannThetaTail_Icc (R : ℝ) : + ContinuousOn riemannThetaTail (Set.Icc 0 R) := by + apply (tendstoUniformlyOn_riemannThetaTerm_Icc R).continuousOn + exact Filter.Frequently.of_forall fun N ↦ by + apply Continuous.continuousOn + apply continuous_finsetSum + intro n _ + exact continuous_iff_continuousAt.mpr fun u ↦ + (hasDerivAt_riemannThetaTerm n u).continuousAt + +theorem evenKernel_zero_sub_one_eq_two_mul_thetaSeries + {x : ℝ} (hx : 0 < x) : + HurwitzZeta.evenKernel 0 x - 1 = + 2 * ∑' n : ℕ, + Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * x) := by + let f : ℤ → ℝ := fun n ↦ + if (n : ℝ) = 0 then 0 else Real.exp (-Real.pi * (n : ℝ) ^ 2 * x) + have hs : HasSum f (HurwitzZeta.evenKernel 0 x - 1) := by + simpa [f] using + (HurwitzZeta.hasSum_int_evenKernel₀ (a := 0) hx) + have heven : Function.Even f := by + intro n + simp only [f, Int.cast_neg, neg_eq_zero, neg_sq] + rw [← hs.tsum_eq, tsum_int_eq_zero_add_two_mul_tsum_pnat heven hs.summable] + simp only [f, Int.cast_zero, if_pos, zero_add, nsmul_eq_mul, Nat.cast_ofNat] + change 2 * (∑' n : ℕ+, f (n : ℤ)) = + 2 * ∑' n : ℕ, Real.exp (-Real.pi * (n + 1 : ℝ) ^ 2 * x) + rw [← Equiv.pnatEquivNat.symm.tsum_eq] + congr 2 + funext n + have hne : (n : ℤ) + 1 ≠ 0 := by omega + simp [f, Equiv.pnatEquivNat, Nat.succPNat] + exact fun h ↦ (hne h).elim + +theorem two_mul_riemannThetaTail_eq_evenKernel (u : ℝ) : + 2 * riemannThetaTail u = + Real.exp (u / 2) * + (HurwitzZeta.evenKernel 0 (Real.exp (2 * u)) - 1) := by + rw [evenKernel_zero_sub_one_eq_two_mul_thetaSeries (Real.exp_pos (2 * u))] + unfold riemannThetaTail riemannThetaTerm + rw [tsum_mul_left] + ring + +theorem cosKernel_zero_eq_evenKernel_zero (x : ℝ) : + HurwitzZeta.cosKernel 0 x = HurwitzZeta.evenKernel 0 x := by + rw [← Complex.ofReal_inj] + change + (HurwitzZeta.cosKernel ((0 : ℝ) : UnitAddCircle) x : ℂ) = + (HurwitzZeta.evenKernel ((0 : ℝ) : UnitAddCircle) x : ℂ) + rw [HurwitzZeta.cosKernel_def (0 : ℝ) x, + HurwitzZeta.evenKernel_def (0 : ℝ) x] + simp + +theorem evenKernel_zero_exp_neg_two (u : ℝ) : + HurwitzZeta.evenKernel 0 (Real.exp (-2 * u)) = + Real.exp u * HurwitzZeta.evenKernel 0 (Real.exp (2 * u)) := by + have hfe := HurwitzZeta.evenKernel_functional_equation + (0 : UnitAddCircle) (Real.exp (-2 * u)) + rw [cosKernel_zero_eq_evenKernel_zero] at hfe + have hrpow : + Real.exp (-2 * u) ^ (1 / 2 : ℝ) = Real.exp (-u) := by + rw [← Real.exp_mul] + congr 1 + ring + have hinv : + 1 / Real.exp (-2 * u) = Real.exp (2 * u) := by + rw [one_div, ← Real.exp_neg] + congr 1 + ring + rw [hrpow, hinv] at hfe + calc + HurwitzZeta.evenKernel 0 (Real.exp (-2 * u)) = + 1 / Real.exp (-u) * + HurwitzZeta.evenKernel 0 (Real.exp (2 * u)) := hfe + _ = Real.exp u * + HurwitzZeta.evenKernel 0 (Real.exp (2 * u)) := by + rw [one_div, ← Real.exp_neg] + congr 2 + ring + +theorem riemannThetaTail_neg (u : ℝ) : + riemannThetaTail (-u) = + riemannThetaTail u + + (Real.exp (u / 2) - Real.exp (-u / 2)) / 2 := by + have hneg := two_mul_riemannThetaTail_eq_evenKernel (-u) + have hpos := two_mul_riemannThetaTail_eq_evenKernel u + have hfe := evenKernel_zero_exp_neg_two u + have hexp : + Real.exp (-u / 2) * Real.exp u = Real.exp (u / 2) := by + rw [← Real.exp_add] + congr 1 + ring + have htwo : + 2 * riemannThetaTail (-u) = + 2 * riemannThetaTail u + + Real.exp (u / 2) - Real.exp (-u / 2) := by + calc + 2 * riemannThetaTail (-u) = + Real.exp (-u / 2) * + (HurwitzZeta.evenKernel 0 (Real.exp (-2 * u)) - 1) := by + convert hneg using 1 <;> ring + _ = Real.exp (-u / 2) * + (Real.exp u * + HurwitzZeta.evenKernel 0 (Real.exp (2 * u)) - 1) := by + rw [hfe] + _ = Real.exp (u / 2) * + (HurwitzZeta.evenKernel 0 (Real.exp (2 * u)) - 1) + + Real.exp (u / 2) - Real.exp (-u / 2) := by + rw [← hexp] + ring + _ = 2 * riemannThetaTail u + + Real.exp (u / 2) - Real.exp (-u / 2) := by + rw [← hpos] + linarith + +theorem hurwitzEvenFEPair_zero_f_modif_of_one_lt + {x : ℝ} (hx : 1 < x) : + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x = + (HurwitzZeta.evenKernel 0 x - 1 : ℝ) := by + simp [WeakFEPair.f_modif, HurwitzZeta.hurwitzEvenFEPair, + Set.mem_Ioi.mpr hx, Set.notMem_Ioo_of_ge hx.le] + +theorem hurwitzEvenFEPair_zero_f_modif_of_mem_Ioo + {x : ℝ} (hx : x ∈ Set.Ioo (0 : ℝ) 1) : + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x = + (HurwitzZeta.evenKernel 0 x - x ^ (-(1 / 2 : ℝ)) : ℝ) := by + simp [WeakFEPair.f_modif, HurwitzZeta.hurwitzEvenFEPair, + Set.notMem_Ioi.mpr hx.2.le, hx] + +theorem hurwitzEvenFEPair_zero_f_modif_one : + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif 1 = 0 := by + simp [WeakFEPair.f_modif] + +theorem riemannThetaTail_eq_f_modif {u : ℝ} (hu : 0 < u) : + (riemannThetaTail u : ℂ) = + (Real.exp (u / 2) / 2 : ℝ) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u)) := by + have hx : 1 < Real.exp (2 * u) := + Real.one_lt_exp_iff.mpr (by linarith) + rw [hurwitzEvenFEPair_zero_f_modif_of_one_lt hx] + push_cast + have h := congrArg ((↑) : ℝ → ℂ) + (two_mul_riemannThetaTail_eq_evenKernel u) + push_cast at h + calc + (riemannThetaTail u : ℂ) = + (1 / 2 : ℂ) * (2 * (riemannThetaTail u : ℂ)) := by ring + _ = (1 / 2 : ℂ) * + (Complex.exp (u / 2) * + ((HurwitzZeta.evenKernel 0 (Real.exp (2 * u)) : ℂ) - 1)) := by + rw [h] + _ = _ := by ring + +theorem hurwitzEvenFEPair_zero_f_modif_exp_two_of_neg + {u : ℝ} (hu : u < 0) : + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u)) = + (Real.exp (-u) : ℝ) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (-2 * u)) := by + have hxlow : Real.exp (2 * u) ∈ Set.Ioo (0 : ℝ) 1 := by + exact ⟨Real.exp_pos _, Real.exp_lt_one_iff.mpr (by linarith)⟩ + have hxhigh : 1 < Real.exp (-2 * u) := + Real.one_lt_exp_iff.mpr (by linarith) + rw [hurwitzEvenFEPair_zero_f_modif_of_mem_Ioo hxlow, + hurwitzEvenFEPair_zero_f_modif_of_one_lt hxhigh] + have hkernel := evenKernel_zero_exp_neg_two (-u) + have hrpow : + Real.exp (2 * u) ^ (-(1 / 2 : ℝ)) = Real.exp (-u) := by + rw [Real.rpow_def_of_pos (Real.exp_pos _), Real.log_exp] + congr 1 + ring + rw [hrpow] + push_cast + rw [show -2 * -u = 2 * u by ring, + show 2 * -u = -2 * u by ring] at hkernel + rw [hkernel] + push_cast + ring + +theorem completedRiemannZeta₀_eq_mellin_f_modif (s : ℂ) : + completedRiemannZeta₀ s = + mellin (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (s / 2) / 2 := by + rfl + +theorem mellinConvergent_hurwitzEvenFEPair_zero_f_modif (q : ℂ) : + MellinConvergent (HurwitzZeta.hurwitzEvenFEPair 0).f_modif q := + ((HurwitzZeta.hurwitzEvenFEPair 0).toStrongFEPair.hasMellin q).1 + +/-- Finite-interval form of the Mellin substitution `x = exp (2u)`. +This theorem deliberately uses Mathlib's monotone substitution API, which +requires no continuity of the piecewise `f_modif` integrand at `x = 1`. -/ +theorem intervalIntegral_mellin_exp_two_substitution + (q : ℂ) (a b : ℝ) : + (∫ u in a..b, (2 * Real.exp (2 * u)) • + (((Real.exp (2 * u) : ℂ) ^ q) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u)))) = + ∫ x in Real.exp (2 * a)..Real.exp (2 * b), + (x : ℂ) ^ q * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x := by + simpa only [Function.comp_apply] using + (intervalIntegral.integral_deriv_smul_comp_of_deriv_nonneg + (f := fun u : ℝ ↦ Real.exp (2 * u)) + (f' := fun u : ℝ ↦ 2 * Real.exp (2 * u)) + (g := fun x : ℝ ↦ (x : ℂ) ^ q * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x) + (a := a) (b := b) + (by fun_prop) + (fun u _ ↦ by + simpa only [id_eq, one_mul, mul_comm] using + ((hasDerivAt_id u).const_mul 2).exp) + (fun u _ ↦ by positivity)) + +theorem mellin_exp_two_integrand_eq_theta + (s : ℂ) {u : ℝ} (hu : 0 < u) : + (2 * Real.exp (2 * u)) • + (((Real.exp (2 * u) : ℂ) ^ (s / 2 - 1)) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u))) = + 4 * Complex.exp ((s - 1 / 2) * u) * riemannThetaTail u := by + have hpow : + (Real.exp (2 * u) : ℂ) ^ (s / 2 - 1) = + Complex.exp ((s - 2) * u) := by + rw [Complex.cpow_def_of_ne_zero + (Complex.ofReal_ne_zero.mpr (Real.exp_ne_zero (2 * u)))] + rw [← Complex.ofReal_log (Real.exp_pos (2 * u)).le, Real.log_exp] + congr 1 + push_cast + ring + rw [hpow, Complex.real_smul] + have htheta := riemannThetaTail_eq_f_modif hu + have hexp₁ : + Complex.exp (2 * u) * Complex.exp ((s - 2) * u) = + Complex.exp (s * u) := by + rw [← Complex.exp_add] + congr 1 + ring + have hexp₂ : + Complex.exp ((s - 1 / 2) * u) * Complex.exp (u / 2) = + Complex.exp (s * u) := by + rw [← Complex.exp_add] + congr 1 + ring + calc + (2 * Real.exp (2 * u) : ℝ) * + (Complex.exp ((s - 2) * u) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u))) = + 2 * (Complex.exp (2 * u) * Complex.exp ((s - 2) * u)) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u)) := by + push_cast + ring + _ = 2 * Complex.exp (s * u) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u)) := by + rw [hexp₁] + _ = 4 * Complex.exp ((s - 1 / 2) * u) * + ((Real.exp (u / 2) / 2 : ℝ) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u))) := by + push_cast + rw [← hexp₂] + ring + _ = 4 * Complex.exp ((s - 1 / 2) * u) * riemannThetaTail u := by + rw [← htheta] + +theorem mellin_exp_two_integrand_eq_theta_neg + (s : ℂ) {u : ℝ} (hu : u < 0) : + (2 * Real.exp (2 * u)) • + (((Real.exp (2 * u) : ℂ) ^ (s / 2 - 1)) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u))) = + 4 * Complex.exp ((s - 1 / 2) * u) * riemannThetaTail (-u) := by + have hpow : + (Real.exp (2 * u) : ℂ) ^ (s / 2 - 1) = + Complex.exp ((s - 2) * u) := by + rw [Complex.cpow_def_of_ne_zero + (Complex.ofReal_ne_zero.mpr (Real.exp_ne_zero (2 * u)))] + rw [← Complex.ofReal_log (Real.exp_pos (2 * u)).le, Real.log_exp] + congr 1 + push_cast + ring + rw [hpow, Complex.real_smul, + hurwitzEvenFEPair_zero_f_modif_exp_two_of_neg hu] + have htheta := riemannThetaTail_eq_f_modif (u := -u) (by linarith) + have htheta' : + (riemannThetaTail (-u) : ℂ) = + (Real.exp (-u / 2) / 2 : ℝ) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (-2 * u)) := by + convert htheta using 1 <;> ring + have hexp : + Complex.exp (2 * u) * Complex.exp ((s - 2) * u) * + Complex.exp (-u) = + Complex.exp ((s - 1) * u) := by + rw [← Complex.exp_add, ← Complex.exp_add] + congr 1 + ring + have hexpTheta : + Complex.exp ((s - 1 / 2) * u) * + Complex.exp (-u / 2) = + Complex.exp ((s - 1) * u) := by + rw [← Complex.exp_add] + congr 1 + ring + calc + (2 * Real.exp (2 * u) : ℝ) * + (Complex.exp ((s - 2) * u) * + ((Real.exp (-u) : ℝ) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (-2 * u)))) = + 2 * (Complex.exp (2 * u) * Complex.exp ((s - 2) * u) * + Complex.exp (-u)) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (-2 * u)) := by + push_cast + ring + _ = 2 * Complex.exp ((s - 1) * u) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (-2 * u)) := by + rw [hexp] + _ = 4 * Complex.exp ((s - 1 / 2) * u) * + ((Real.exp (-u / 2) / 2 : ℝ) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (-2 * u))) := by + push_cast + rw [← hexpTheta] + ring + _ = 4 * Complex.exp ((s - 1 / 2) * u) * riemannThetaTail (-u) := by + rw [← htheta'] + +theorem intervalIntegral_mellin_f_modif_eq_theta + (s : ℂ) {R : ℝ} (hR : 0 ≤ R) : + (∫ x in (1 : ℝ)..Real.exp (2 * R), + (x : ℂ) ^ (s / 2 - 1) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x) = + ∫ u in (0 : ℝ)..R, + 4 * Complex.exp ((s - 1 / 2) * u) * riemannThetaTail u := by + have hsub := intervalIntegral_mellin_exp_two_substitution + (q := s / 2 - 1) 0 R + simp only [mul_zero, Real.exp_zero] at hsub + rw [← hsub] + apply intervalIntegral.integral_congr_uIoo + intro u hu + change min 0 R < u ∧ u < max 0 R at hu + rw [min_eq_left hR, max_eq_right hR] at hu + simpa only using mellin_exp_two_integrand_eq_theta s hu.1 + +theorem intervalIntegral_mellin_f_modif_eq_cosh_theta + (s : ℂ) {R : ℝ} (hR : 0 ≤ R) : + (∫ x in Real.exp (-2 * R)..Real.exp (2 * R), + (x : ℂ) ^ (s / 2 - 1) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x) = + ∫ u in (0 : ℝ)..R, + 8 * Complex.cosh ((s - 1 / 2) * u) * riemannThetaTail u := by + let M : ℝ → ℂ := fun u ↦ + (2 * Real.exp (2 * u)) • + (((Real.exp (2 * u) : ℂ) ^ (s / 2 - 1)) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif (Real.exp (2 * u))) + let L : ℝ → ℂ := fun u ↦ + 4 * Complex.exp (-(s - 1 / 2) * u) * riemannThetaTail u + let U : ℝ → ℂ := fun u ↦ + 4 * Complex.exp ((s - 1 / 2) * u) * riemannThetaTail u + have hsub := intervalIntegral_mellin_exp_two_substitution + (q := s / 2 - 1) (-R) R + have hsub' : + (∫ u in -R..R, M u) = + ∫ x in Real.exp (-2 * R)..Real.exp (2 * R), + (x : ℂ) ^ (s / 2 - 1) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x := by + dsimp only [M] + convert hsub using 1 <;> ring + have hlower_raw : + (∫ u in -R..0, M u) = + ∫ u in -R..0, + 4 * Complex.exp ((s - 1 / 2) * u) * + riemannThetaTail (-u) := by + apply intervalIntegral.integral_congr_uIoo + intro u hu + change min (-R) 0 < u ∧ u < max (-R) 0 at hu + rw [min_eq_left (by linarith), max_eq_right (by linarith)] at hu + dsimp only [M] + exact mellin_exp_two_integrand_eq_theta_neg s hu.2 + have hlower : + (∫ u in -R..0, M u) = ∫ u in 0..R, L u := by + rw [hlower_raw] + have hneg := intervalIntegral.integral_comp_neg + (f := L) (a := -R) (b := 0) + dsimp only [L] at hneg ⊢ + rw [neg_zero, neg_neg] at hneg + convert hneg using 1 + · apply intervalIntegral.integral_congr + intro u _ + simp only + have he : + -(s - 1 / 2) * (-u : ℂ) = (s - 1 / 2) * (u : ℂ) := by + push_cast + ring + push_cast + rw [he] + have hupper : + (∫ u in 0..R, M u) = ∫ u in 0..R, U u := by + apply intervalIntegral.integral_congr_uIoo + intro u hu + change min 0 R < u ∧ u < max 0 R at hu + rw [min_eq_left hR, max_eq_right hR] at hu + dsimp only [M, U] + exact mellin_exp_two_integrand_eq_theta s hu.1 + have hLint : IntervalIntegrable L MeasureTheory.volume 0 R := by + apply ContinuousOn.intervalIntegrable + have hthetaCont : ContinuousOn riemannThetaTail (Set.uIcc 0 R) := by + simpa [Set.uIcc_of_le hR] using continuousOn_riemannThetaTail_Icc R + exact ((by fun_prop : Continuous fun u : ℝ ↦ + 4 * Complex.exp (-(s - 1 / 2) * u)).continuousOn).mul + (Complex.continuous_ofReal.comp_continuousOn + hthetaCont) + have hUint : IntervalIntegrable U MeasureTheory.volume 0 R := by + apply ContinuousOn.intervalIntegrable + have hthetaCont : ContinuousOn riemannThetaTail (Set.uIcc 0 R) := by + simpa [Set.uIcc_of_le hR] using continuousOn_riemannThetaTail_Icc R + exact ((by fun_prop : Continuous fun u : ℝ ↦ + 4 * Complex.exp ((s - 1 / 2) * u)).continuousOn).mul + (Complex.continuous_ofReal.comp_continuousOn + hthetaCont) + have hMlower : IntervalIntegrable M MeasureTheory.volume (-R) 0 := by + have hN : IntervalIntegrable + (fun u : ℝ ↦ 4 * Complex.exp ((s - 1 / 2) * u) * + riemannThetaTail (-u)) MeasureTheory.volume (-R) 0 := by + rw [IntervalIntegrable.iff_comp_neg] + simp only [neg_neg, neg_zero] + apply hLint.symm.congr_uIoo + intro u hu + dsimp only [L, Function.comp_apply] + push_cast + congr 2 <;> ring + apply hN.congr_uIoo + intro u hu + change min (-R) 0 < u ∧ u < max (-R) 0 at hu + rw [min_eq_left (by linarith), max_eq_right (by linarith)] at hu + exact (mellin_exp_two_integrand_eq_theta_neg s hu.2).symm + have hMupper : IntervalIntegrable M MeasureTheory.volume 0 R := by + apply hUint.congr_uIoo + intro u hu + change min 0 R < u ∧ u < max 0 R at hu + rw [min_eq_left hR, max_eq_right hR] at hu + exact (mellin_exp_two_integrand_eq_theta s hu.1).symm + rw [← hsub', ← intervalIntegral.integral_add_adjacent_intervals + (a := -R) (b := 0) (c := R) hMlower hMupper, hlower, hupper, + ← intervalIntegral.integral_add hLint hUint] + apply intervalIntegral.integral_congr + intro u _ + dsimp only [L, U] + rw [Complex.cosh] + ring + +theorem tendsto_intervalIntegral_mellin_truncation + {f : ℝ → ℂ} {q : ℂ} (hconv : MellinConvergent f q) : + Filter.Tendsto + (fun R : ℝ ↦ + ∫ x in Real.exp (-2 * R)..Real.exp (2 * R), + (x : ℂ) ^ (q - 1) * f x) + Filter.atTop (𝓝 (mellin f q)) := by + let I : ℝ → ℂ := fun x ↦ (x : ℂ) ^ (q - 1) * f x + let φ : ℝ → Set ℝ := fun R ↦ + Set.Ioc (Real.exp (-2 * R)) (Real.exp (2 * R)) + have hcover : + MeasureTheory.AECover + (MeasureTheory.volume.restrict (Set.Ioi 0)) Filter.atTop φ := by + refine ⟨?_, fun R ↦ measurableSet_Ioc⟩ + filter_upwards [ae_restrict_mem measurableSet_Ioi] with x hx + filter_upwards [Filter.eventually_gt_atTop (|Real.log x| + 1)] with R hR + dsimp only [φ] + rw [← Real.exp_log hx] + constructor + · apply Real.exp_lt_exp.mpr + nlinarith [neg_le_abs (Real.log x), abs_nonneg (Real.log x)] + · exact (Real.exp_lt_exp.mpr (by + nlinarith [le_abs_self (Real.log x), abs_nonneg (Real.log x)])).le + have hlim := + hcover.integral_tendsto_of_countably_generated (show + MeasureTheory.Integrable I + (MeasureTheory.volume.restrict (Set.Ioi 0)) from hconv) + have hevent : + (fun R ↦ ∫ x in φ R, I x ∂ + (MeasureTheory.volume.restrict (Set.Ioi 0))) =ᶠ[Filter.atTop] + fun R ↦ ∫ x in Real.exp (-2 * R)..Real.exp (2 * R), I x := by + filter_upwards [Filter.eventually_ge_atTop (0 : ℝ)] with R hR + have hle : Real.exp (-2 * R) ≤ Real.exp (2 * R) := + Real.exp_le_exp.mpr (by linarith) + have hsub : Set.Ioc (Real.exp (-2 * R)) (Real.exp (2 * R)) ⊆ + Set.Ioi 0 := by + intro x hx + exact (Real.exp_pos _).trans hx.1 + dsimp only [φ, I] + rw [Measure.restrict_restrict measurableSet_Ioc, + Set.inter_eq_left.mpr hsub] + exact (intervalIntegral.integral_of_le hle).symm + simpa only [mellin, I, smul_eq_mul] using hlim.congr' hevent + +/-- Explicit positive-endpoint decay for every theta summand. Unlike the +compact `C²` majorant, this estimate decays uniformly as `u → +∞`. -/ +theorem norm_riemannThetaTerm_le_decay + (n : ℕ) {u : ℝ} (hu : 0 ≤ u) : + ‖riemannThetaTerm n u‖ ≤ + riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) := by + let m : ℝ := n + 1 + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + have hm2 : 1 ≤ m ^ 2 := by nlinarith [sq_nonneg m] + have hpm : 3 ≤ Real.pi * m ^ 2 := by + nlinarith [Real.pi_gt_three, Real.pi_pos] + have hexpLower : 1 + 2 * u ≤ Real.exp (2 * u) := by + simpa [add_comm] using Real.add_one_le_exp (2 * u) + have hmul : + Real.pi * m ^ 2 * (1 + 2 * u) ≤ + Real.pi * m ^ 2 * Real.exp (2 * u) := + mul_le_mul_of_nonneg_left hexpLower (by positivity) + have harg : + u / 2 - Real.pi * m ^ 2 * Real.exp (2 * u) ≤ + -Real.pi * m ^ 2 - (3 / 2 : ℝ) * u := by + nlinarith + have hcoeff : 1 ≤ 4 * Real.pi ^ 2 * m ^ 4 := by + have hpi : 3 < Real.pi := Real.pi_gt_three + nlinarith [sq_nonneg (Real.pi * m ^ 2)] + calc + ‖riemannThetaTerm n u‖ = + Real.exp (u / 2 - Real.pi * m ^ 2 * Real.exp (2 * u)) := by + rw [show u / 2 - Real.pi * m ^ 2 * Real.exp (2 * u) = + u / 2 + (-Real.pi * m ^ 2 * Real.exp (2 * u)) by ring, + Real.exp_add] + dsimp only [riemannThetaTerm, m] + rw [Real.norm_eq_abs, abs_of_pos (by positivity)] + _ ≤ Real.exp (-Real.pi * m ^ 2 - (3 / 2 : ℝ) * u) := + Real.exp_le_exp.mpr harg + _ = Real.exp (-Real.pi * m ^ 2) * + Real.exp (-(3 / 2 : ℝ) * u) := by + rw [show -Real.pi * m ^ 2 - (3 / 2 : ℝ) * u = + -Real.pi * m ^ 2 + (-(3 / 2 : ℝ) * u) by ring, + Real.exp_add] + _ ≤ (4 * Real.pi ^ 2 * m ^ 4 * Real.exp (-Real.pi * m ^ 2)) * + Real.exp (-(3 / 2 : ℝ) * u) := by + apply mul_le_mul_of_nonneg_right + · have hc := mul_le_mul_of_nonneg_right hcoeff + (Real.exp_nonneg (-Real.pi * m ^ 2)) + convert hc using 1 + all_goals ring + · positivity + _ = riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) := by + rfl + +theorem norm_deriv_riemannThetaTerm_le_decay + (n : ℕ) {u : ℝ} (hu : 0 ≤ u) : + ‖deriv (riemannThetaTerm n) u‖ ≤ + riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) := by + let m : ℝ := n + 1 + let q := Real.pi * m ^ 2 + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + have hm2 : 1 ≤ m ^ 2 := by nlinarith [sq_nonneg m] + have hq : 3 ≤ q := by + dsimp only [q] + nlinarith [Real.pi_gt_three, Real.pi_pos] + have hE : 1 ≤ Real.exp (2 * u) := + Real.one_le_exp (by positivity) + have hexpLower : 1 + 2 * u ≤ Real.exp (2 * u) := by + simpa [add_comm] using Real.add_one_le_exp (2 * u) + have hmul : + q * (1 + 2 * u) ≤ q * Real.exp (2 * u) := + mul_le_mul_of_nonneg_left hexpLower (by positivity) + have harg : + 5 * u / 2 - q * Real.exp (2 * u) ≤ + -q - (3 / 2 : ℝ) * u := by + nlinarith + have hcoef : + |1 / 2 - 2 * q * Real.exp (2 * u)| ≤ + (1 / 2 + 2 * q) * Real.exp (2 * u) := by + rw [abs_le] + constructor <;> nlinarith [Real.exp_pos (2 * u)] + have hcoeffMajor : 1 / 2 + 2 * q ≤ 4 * Real.pi ^ 2 * m ^ 4 := by + have hq_sq : q ^ 2 = Real.pi ^ 2 * m ^ 4 := by + dsimp only [q] + ring + calc + 1 / 2 + 2 * q ≤ 4 * q ^ 2 := by + nlinarith [sq_nonneg q] + _ = 4 * Real.pi ^ 2 * m ^ 4 := by rw [hq_sq]; ring + rw [deriv_riemannThetaTerm, Real.norm_eq_abs, abs_mul] + have hthetaPos : 0 < riemannThetaTerm n u := by + unfold riemannThetaTerm + positivity + rw [show |riemannThetaTerm n u| = riemannThetaTerm n u from + abs_of_pos hthetaPos] + calc + |1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)| * + riemannThetaTerm n u = + |1 / 2 - 2 * q * Real.exp (2 * u)| * + (Real.exp (u / 2) * + Real.exp (-q * Real.exp (2 * u))) := by + dsimp only [riemannThetaTerm, m, q] + congr 3 <;> ring + _ ≤ ((1 / 2 + 2 * q) * Real.exp (2 * u)) * + (Real.exp (u / 2) * Real.exp (-q * Real.exp (2 * u))) := by + gcongr + _ = (1 / 2 + 2 * q) * + Real.exp (5 * u / 2 - q * Real.exp (2 * u)) := by + rw [show 5 * u / 2 - q * Real.exp (2 * u) = + 2 * u + u / 2 + (-q * Real.exp (2 * u)) by ring, + Real.exp_add, Real.exp_add] + ring + _ ≤ (1 / 2 + 2 * q) * + Real.exp (-q - (3 / 2 : ℝ) * u) := by + gcongr + _ ≤ (4 * Real.pi ^ 2 * m ^ 4) * + Real.exp (-q - (3 / 2 : ℝ) * u) := by + gcongr + _ = riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) := by + rw [show -q - (3 / 2 : ℝ) * u = + -q + (-(3 / 2 : ℝ) * u) by ring, Real.exp_add] + dsimp only [riemannPhiMajorantCoefficient, m, q] + ring + +theorem summable_riemannThetaTerm_of_nonneg {u : ℝ} (hu : 0 ≤ u) : + Summable (fun n ↦ riemannThetaTerm n u) := by + apply (summable_riemannThetaC2Majorant u).of_norm_bounded + intro n + exact norm_riemannThetaTerm_le_C2Majorant n hu le_rfl + +theorem norm_riemannThetaTail_le_decay {u : ℝ} (hu : 0 ≤ u) : + ‖riemannThetaTail u‖ ≤ + (∑' n : ℕ, riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * u) := by + have hnorm : + Summable (fun n : ℕ ↦ ‖riemannThetaTerm n u‖) := + (summable_riemannThetaTerm_of_nonneg hu).norm + have hmajor : + Summable (fun n : ℕ ↦ + riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u)) := + summable_riemannPhiMajorantCoefficient.mul_right _ + calc + ‖riemannThetaTail u‖ ≤ + ∑' n : ℕ, ‖riemannThetaTerm n u‖ := + norm_tsum_le_tsum_norm hnorm + _ ≤ ∑' n : ℕ, riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) := + hnorm.tsum_le_tsum + (fun n ↦ norm_riemannThetaTerm_le_decay n hu) hmajor + _ = (∑' n : ℕ, riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * u) := + tsum_mul_right + +theorem tendsto_riemannThetaTail_atTop_zero : + Filter.Tendsto riemannThetaTail Filter.atTop (𝓝 0) := by + let C := ∑' n : ℕ, riemannPhiMajorantCoefficient n + have hlin : + Filter.Tendsto (fun u : ℝ ↦ (3 / 2 : ℝ) * u) + Filter.atTop Filter.atTop := + Filter.tendsto_id.const_mul_atTop (by norm_num) + have hexp : + Filter.Tendsto (fun u : ℝ ↦ Real.exp (-((3 / 2 : ℝ) * u))) + Filter.atTop (𝓝 0) := + Real.tendsto_exp_neg_atTop_nhds_zero.comp hlin + have hupper : + Filter.Tendsto (fun u : ℝ ↦ C * Real.exp (-(3 / 2 : ℝ) * u)) + Filter.atTop (𝓝 0) := by + have hraw := hexp.const_mul C + convert hraw using 1 + · funext u + congr 2 + ring + · simp + have hC : 0 ≤ C := by + dsimp only [C] + exact tsum_nonneg fun n ↦ by + unfold riemannPhiMajorantCoefficient + positivity + rw [Metric.tendsto_nhds] at hupper ⊢ + intro ε hε + filter_upwards [hupper ε hε, Filter.eventually_ge_atTop (0 : ℝ)] with u huε hu + rw [dist_zero_right, Real.norm_eq_abs, + abs_of_nonneg (mul_nonneg hC (Real.exp_nonneg _))] at huε + rw [dist_zero_right] + exact (norm_riemannThetaTail_le_decay hu).trans_lt (by simpa [C] using huε) + +theorem summable_deriv_riemannThetaTerm_of_nonneg {u : ℝ} (hu : 0 ≤ u) : + Summable (fun n ↦ deriv (riemannThetaTerm n) u) := by + apply (summable_riemannThetaC2Majorant u).of_norm_bounded + intro n + exact norm_deriv_riemannThetaTerm_le_C2Majorant n hu le_rfl + +theorem summable_deriv_deriv_riemannThetaTerm_of_nonneg {u : ℝ} (hu : 0 ≤ u) : + Summable (fun n ↦ deriv (deriv (riemannThetaTerm n)) u) := by + apply (summable_riemannThetaC2Majorant u).of_norm_bounded + intro n + exact norm_deriv_deriv_riemannThetaTerm_le_C2Majorant n hu le_rfl + +theorem hasDerivAt_riemannThetaTail_zero : + HasDerivAt riemannThetaTail + (∑' n : ℕ, deriv (riemannThetaTerm n) 0) 0 := by + have h := + hasDerivAt_tsum_of_isPreconnected + (g := fun n y ↦ riemannThetaTerm n y) + (g' := fun n y ↦ deriv (riemannThetaTerm n) y) + (y₀ := 0) (y := 0) + summable_riemannThetaLocalDerivMajorant + isOpen_Ioo isPreconnected_Ioo + (fun n y _ ↦ by + simpa only [deriv_riemannThetaTerm] using + (hasDerivAt_riemannThetaTerm n y)) + (fun n y hy ↦ norm_deriv_riemannThetaTerm_le_localMajorant n hy) + (by norm_num) + (summable_riemannThetaTerm_of_nonneg (le_refl 0)) + (by norm_num) + change HasDerivAt (fun z ↦ ∑' n : ℕ, riemannThetaTerm n z) + (∑' n : ℕ, deriv (riemannThetaTerm n) 0) 0 + exact h + +theorem riemannThetaTailDerivSum_zero : + (∑' n : ℕ, deriv (riemannThetaTerm n) 0) = -(1 / 4 : ℝ) := by + let d := ∑' n : ℕ, deriv (riemannThetaTerm n) 0 + have htheta : HasDerivAt riemannThetaTail d 0 := + hasDerivAt_riemannThetaTail_zero + have hthetaNeg : HasDerivAt riemannThetaTail d (-0) := by + simpa using htheta + have hleft := hthetaNeg.comp 0 (hasDerivAt_neg 0) + have hg : + HasDerivAt + (fun u : ℝ ↦ + (Real.exp (u / 2) - Real.exp (-u / 2)) / 2) + (1 / 2 : ℝ) 0 := by + have hp : + HasDerivAt (fun u : ℝ ↦ Real.exp (u / 2)) (1 / 2) 0 := by + convert ((hasDerivAt_id (0 : ℝ)).div_const 2).exp using 1 <;> norm_num + have hn : + HasDerivAt (fun u : ℝ ↦ Real.exp (-u / 2)) (-(1 / 2)) 0 := by + convert ((hasDerivAt_id (0 : ℝ)).neg.div_const 2).exp using 1 <;> norm_num + have hmul := (hp.sub hn).const_mul (1 / 2 : ℝ) + norm_num at hmul + simpa [div_eq_mul_inv, mul_comm] using hmul + have hright : + HasDerivAt + (fun u : ℝ ↦ riemannThetaTail u + + (Real.exp (u / 2) - Real.exp (-u / 2)) / 2) + (d + 1 / 2) 0 := + htheta.add hg + have heq : + riemannThetaTail ∘ Neg.neg = + fun u : ℝ ↦ riemannThetaTail u + + (Real.exp (u / 2) - Real.exp (-u / 2)) / 2 := by + funext u + exact riemannThetaTail_neg u + have hd := congrArg (fun F : ℝ → ℝ ↦ deriv F 0) heq + rw [hleft.deriv, hright.deriv] at hd + change d = -(1 / 4 : ℝ) + linarith + +theorem deriv_riemannThetaTail_zero : + deriv riemannThetaTail 0 = -(1 / 4 : ℝ) := by + rw [hasDerivAt_riemannThetaTail_zero.deriv] + exact riemannThetaTailDerivSum_zero + +theorem hasDerivAt_riemannThetaTail {u : ℝ} (hu : 0 < u) : + HasDerivAt riemannThetaTail + (∑' n : ℕ, deriv (riemannThetaTerm n) u) u := by + let R := u + 1 + have huR : u < R := by dsimp only [R]; linarith + have h := + hasDerivAt_tsum_of_isPreconnected + (u := riemannThetaC2Majorant R) + (t := Set.Ioo (0 : ℝ) R) + (g := fun n ↦ riemannThetaTerm n) + (g' := fun n y ↦ deriv (riemannThetaTerm n) y) + (y₀ := u) (y := u) + (summable_riemannThetaC2Majorant R) + isOpen_Ioo isPreconnected_Ioo + (fun n y _ ↦ by + simpa only [deriv_riemannThetaTerm] using + (hasDerivAt_riemannThetaTerm n y)) + (fun n y hy ↦ norm_deriv_riemannThetaTerm_le_C2Majorant n hy.1.le hy.2.le) + ⟨hu, huR⟩ + (summable_riemannThetaTerm_of_nonneg hu.le) + ⟨hu, huR⟩ + change HasDerivAt (fun z ↦ ∑' n : ℕ, riemannThetaTerm n z) + (∑' n : ℕ, deriv (riemannThetaTerm n) u) u + exact h + +theorem deriv_riemannThetaTail {u : ℝ} (hu : 0 < u) : + deriv riemannThetaTail u = + ∑' n : ℕ, deriv (riemannThetaTerm n) u := + (hasDerivAt_riemannThetaTail hu).deriv + +def riemannThetaTailDeriv (u : ℝ) : ℝ := + ∑' n : ℕ, deriv (riemannThetaTerm n) u + +theorem riemannThetaTailDeriv_zero : + riemannThetaTailDeriv 0 = -(1 / 4 : ℝ) := + riemannThetaTailDerivSum_zero + +theorem deriv_riemannThetaTail_eq_tailDeriv_of_nonneg + {u : ℝ} (hu : 0 ≤ u) : + deriv riemannThetaTail u = riemannThetaTailDeriv u := by + rcases hu.eq_or_lt with rfl | hu + · rw [deriv_riemannThetaTail_zero, riemannThetaTailDeriv_zero] + · exact deriv_riemannThetaTail hu + +theorem continuousOn_riemannThetaTailDeriv_Icc (R : ℝ) : + ContinuousOn riemannThetaTailDeriv (Set.Icc 0 R) := by + apply (tendstoUniformlyOn_deriv_riemannThetaTerm_Icc R).continuousOn + exact Filter.Frequently.of_forall fun N ↦ by + apply Continuous.continuousOn + apply continuous_finsetSum + intro n _ + rw [show deriv (riemannThetaTerm n) = fun u ↦ + (1 / 2 - 2 * Real.pi * (n + 1 : ℝ) ^ 2 * Real.exp (2 * u)) * + riemannThetaTerm n u by + funext u + exact deriv_riemannThetaTerm n u] + apply Continuous.mul (by fun_prop) + exact continuous_iff_continuousAt.mpr fun u ↦ + (hasDerivAt_riemannThetaTerm n u).continuousAt + +theorem continuousOn_deriv_riemannThetaTail_Icc (R : ℝ) : + ContinuousOn (deriv riemannThetaTail) (Set.Icc 0 R) := by + apply (continuousOn_riemannThetaTailDeriv_Icc R).congr + intro u hu + exact deriv_riemannThetaTail_eq_tailDeriv_of_nonneg hu.1 + +theorem hasDerivAt_riemannThetaTailDeriv {u : ℝ} (hu : 0 < u) : + HasDerivAt riemannThetaTailDeriv + (∑' n : ℕ, deriv (deriv (riemannThetaTerm n)) u) u := by + let R := u + 1 + have huR : u < R := by dsimp only [R]; linarith + have h := + hasDerivAt_tsum_of_isPreconnected + (u := riemannThetaC2Majorant R) + (t := Set.Ioo (0 : ℝ) R) + (g := fun n ↦ deriv (riemannThetaTerm n)) + (g' := fun n y ↦ deriv (deriv (riemannThetaTerm n)) y) + (y₀ := u) (y := u) + (summable_riemannThetaC2Majorant R) + isOpen_Ioo isPreconnected_Ioo + (fun n y _ ↦ + (hasDerivAt_deriv_riemannThetaTerm_raw n y).differentiableAt.hasDerivAt) + (fun n y hy ↦ + norm_deriv_deriv_riemannThetaTerm_le_C2Majorant n hy.1.le hy.2.le) + ⟨hu, huR⟩ + (summable_deriv_riemannThetaTerm_of_nonneg hu.le) + ⟨hu, huR⟩ + change HasDerivAt + (fun z ↦ ∑' n : ℕ, deriv (riemannThetaTerm n) z) + (∑' n : ℕ, deriv (deriv (riemannThetaTerm n)) u) u + exact h + +theorem deriv_deriv_riemannThetaTail {u : ℝ} (hu : 0 < u) : + deriv (deriv riemannThetaTail) u = + ∑' n : ℕ, deriv (deriv (riemannThetaTerm n)) u := by + have heq : + deriv riemannThetaTail =ᶠ[nhds u] riemannThetaTailDeriv := by + filter_upwards [Ioi_mem_nhds hu] with y hy + exact deriv_riemannThetaTail hy + rw [heq.deriv_eq] + exact (hasDerivAt_riemannThetaTailDeriv hu).deriv + +theorem hasDerivAt_deriv_riemannThetaTail {u : ℝ} (hu : 0 < u) : + HasDerivAt (deriv riemannThetaTail) + (deriv (deriv riemannThetaTail) u) u := by + have heq : + deriv riemannThetaTail =ᶠ[nhds u] riemannThetaTailDeriv := by + filter_upwards [Ioi_mem_nhds hu] with y hy + exact deriv_riemannThetaTail hy + rw [heq.deriv_eq] + exact (hasDerivAt_riemannThetaTailDeriv hu).differentiableAt.hasDerivAt + |>.congr_of_eventuallyEq heq + +theorem riemannPhiTerm_pos (n : ℕ) (u : ℝ) : + 0 < riemannPhiTerm n u := by + let m : ℝ := n + 1 + let v := |u| + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + have hv : 0 ≤ v := abs_nonneg u + have hE : 1 ≤ Real.exp (2 * v) := + Real.one_le_exp (mul_nonneg (by norm_num) hv) + have hfactor : 0 < 2 * Real.pi * m ^ 2 * Real.exp (2 * v) - 3 := by + have hpi : 3 < 2 * Real.pi := by nlinarith [Real.pi_gt_three] + have hm2 : 1 ≤ m ^ 2 := by nlinarith [sq_nonneg m] + have hprod : + 2 * Real.pi ≤ 2 * Real.pi * m ^ 2 * Real.exp (2 * v) := by + calc + 2 * Real.pi = 2 * Real.pi * 1 * 1 := by ring + _ ≤ 2 * Real.pi * m ^ 2 * Real.exp (2 * v) := by gcongr + linarith + dsimp only [riemannPhiTerm, m, v] + positivity + +/-- Quantitative source-kernel decay, uniform in the summation index. -/ +theorem riemannPhiTerm_le_majorant (n : ℕ) (u : ℝ) : + riemannPhiTerm n u ≤ + riemannPhiMajorantCoefficient n * Real.exp (-(3 / 2 : ℝ) * |u|) := by + let m : ℝ := n + 1 + let v := |u| + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + have hv : 0 ≤ v := abs_nonneg u + have hm2 : 1 ≤ m ^ 2 := by nlinarith [sq_nonneg m] + have hpm : 3 ≤ Real.pi * m ^ 2 := by + nlinarith [Real.pi_gt_three, Real.pi_pos] + have hexpLower : 1 + 2 * v ≤ Real.exp (2 * v) := by + simpa [add_comm] using Real.add_one_le_exp (2 * v) + have harg : + 9 * v / 2 - Real.pi * m ^ 2 * Real.exp (2 * v) ≤ + -Real.pi * m ^ 2 - (3 / 2 : ℝ) * v := by + have hsix : 6 * v ≤ 2 * Real.pi * m ^ 2 * v := by + nlinarith + nlinarith + have hfactor : + riemannPhiTerm n u ≤ + 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (9 * v / 2) * + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) := by + have hbracket : + 2 * Real.pi * m ^ 2 * Real.exp (2 * v) - 3 ≤ + 2 * Real.pi * m ^ 2 * Real.exp (2 * v) := by + linarith + calc + riemannPhiTerm n u = + 2 * Real.pi * m ^ 2 * Real.exp (5 * v / 2) * + (2 * Real.pi * m ^ 2 * Real.exp (2 * v) - 3) * + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) := by + rfl + _ ≤ 2 * Real.pi * m ^ 2 * Real.exp (5 * v / 2) * + (2 * Real.pi * m ^ 2 * Real.exp (2 * v)) * + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) := by + gcongr + _ = 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (9 * v / 2) * + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) := by + rw [show Real.exp (9 * v / 2) = + Real.exp (5 * v / 2) * Real.exp (2 * v) by + rw [← Real.exp_add] + congr 1 + ring] + ring + calc + riemannPhiTerm n u ≤ + 4 * Real.pi ^ 2 * m ^ 4 * Real.exp (9 * v / 2) * + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) := hfactor + _ = 4 * Real.pi ^ 2 * m ^ 4 * + Real.exp (9 * v / 2 - + Real.pi * m ^ 2 * Real.exp (2 * v)) := by + rw [show 9 * v / 2 - Real.pi * m ^ 2 * Real.exp (2 * v) = + 9 * v / 2 + (-Real.pi * m ^ 2 * Real.exp (2 * v)) by ring, + Real.exp_add] + ring + _ ≤ 4 * Real.pi ^ 2 * m ^ 4 * + Real.exp (-Real.pi * m ^ 2 - (3 / 2 : ℝ) * v) := by + gcongr + _ = riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * |u|) := by + rw [show -Real.pi * m ^ 2 - (3 / 2 : ℝ) * v = + -Real.pi * m ^ 2 + (-(3 / 2 : ℝ) * v) by ring, + Real.exp_add] + dsimp only [riemannPhiMajorantCoefficient, m, v] + ring + +theorem norm_deriv_deriv_riemannThetaTerm_le_decay + (n : ℕ) {u : ℝ} (hu : 0 ≤ u) : + ‖deriv (deriv (riemannThetaTerm n)) u‖ ≤ + 2 * riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) := by + have hidentity := + riemannPhiTerm_eq_theta_shifted_second_deriv n hu + have hdd : + deriv (deriv (riemannThetaTerm n)) u = + riemannPhiTerm n u + (1 / 4 : ℝ) * riemannThetaTerm n u := by + linarith + rw [hdd] + calc + ‖riemannPhiTerm n u + (1 / 4 : ℝ) * riemannThetaTerm n u‖ ≤ + ‖riemannPhiTerm n u‖ + + ‖(1 / 4 : ℝ) * riemannThetaTerm n u‖ := + norm_add_le _ _ + _ = riemannPhiTerm n u + + (1 / 4 : ℝ) * ‖riemannThetaTerm n u‖ := by + rw [Real.norm_eq_abs, abs_of_pos (riemannPhiTerm_pos n u), + norm_mul, Real.norm_eq_abs, abs_of_nonneg (by norm_num)] + _ ≤ riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) + + (1 / 4 : ℝ) * (riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u)) := by + gcongr + · simpa [abs_of_nonneg hu] using riemannPhiTerm_le_majorant n u + · exact norm_riemannThetaTerm_le_decay n hu + _ ≤ 2 * riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) := by + have hc : 0 ≤ riemannPhiMajorantCoefficient n := by + unfold riemannPhiMajorantCoefficient + positivity + have he : 0 ≤ Real.exp (-(3 / 2 : ℝ) * u) := Real.exp_nonneg _ + nlinarith + +def riemannThetaTailSecondDerivSum (u : ℝ) : ℝ := + ∑' n : ℕ, deriv (deriv (riemannThetaTerm n)) u + +theorem norm_riemannThetaTailDeriv_le_decay {u : ℝ} (hu : 0 ≤ u) : + ‖riemannThetaTailDeriv u‖ ≤ + (∑' n : ℕ, riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * u) := by + have hnorm : + Summable (fun n : ℕ ↦ ‖deriv (riemannThetaTerm n) u‖) := + (summable_deriv_riemannThetaTerm_of_nonneg hu).norm + have hmajor : + Summable (fun n : ℕ ↦ + riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u)) := + summable_riemannPhiMajorantCoefficient.mul_right _ + calc + ‖riemannThetaTailDeriv u‖ ≤ + ∑' n : ℕ, ‖deriv (riemannThetaTerm n) u‖ := + norm_tsum_le_tsum_norm hnorm + _ ≤ ∑' n : ℕ, riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * u) := + hnorm.tsum_le_tsum + (fun n ↦ norm_deriv_riemannThetaTerm_le_decay n hu) hmajor + _ = (∑' n : ℕ, riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * u) := + tsum_mul_right + +theorem norm_riemannThetaTailSecondDerivSum_le_decay + {u : ℝ} (hu : 0 ≤ u) : + ‖riemannThetaTailSecondDerivSum u‖ ≤ + 2 * (∑' n : ℕ, riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * u) := by + have hnorm : + Summable (fun n : ℕ ↦ + ‖deriv (deriv (riemannThetaTerm n)) u‖) := + (summable_deriv_deriv_riemannThetaTerm_of_nonneg hu).norm + have hmajor : + Summable (fun n : ℕ ↦ + (2 * riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * u)) := + (summable_riemannPhiMajorantCoefficient.mul_left 2).mul_right _ + calc + ‖riemannThetaTailSecondDerivSum u‖ ≤ + ∑' n : ℕ, ‖deriv (deriv (riemannThetaTerm n)) u‖ := + norm_tsum_le_tsum_norm hnorm + _ ≤ ∑' n : ℕ, (2 * riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * u) := + hnorm.tsum_le_tsum + (fun n ↦ norm_deriv_deriv_riemannThetaTerm_le_decay n hu) hmajor + _ = 2 * (∑' n : ℕ, riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * u) := by + rw [tsum_mul_right, ← tsum_mul_left] + +theorem tendsto_zero_of_norm_le_exp_decay + {f : ℝ → ℝ} {C : ℝ} (hC : 0 ≤ C) + (hbound : ∀ u, 0 ≤ u → + ‖f u‖ ≤ C * Real.exp (-(3 / 2 : ℝ) * u)) : + Filter.Tendsto f Filter.atTop (𝓝 0) := by + have hlin : + Filter.Tendsto (fun u : ℝ ↦ (3 / 2 : ℝ) * u) + Filter.atTop Filter.atTop := + Filter.tendsto_id.const_mul_atTop (by norm_num) + have hexp : + Filter.Tendsto (fun u : ℝ ↦ Real.exp (-((3 / 2 : ℝ) * u))) + Filter.atTop (𝓝 0) := + Real.tendsto_exp_neg_atTop_nhds_zero.comp hlin + have hupper : + Filter.Tendsto (fun u : ℝ ↦ C * Real.exp (-(3 / 2 : ℝ) * u)) + Filter.atTop (𝓝 0) := by + have hraw := hexp.const_mul C + convert hraw using 1 + · funext u + congr 2 + ring + · simp + rw [Metric.tendsto_nhds] at hupper ⊢ + intro ε hε + filter_upwards [hupper ε hε, Filter.eventually_ge_atTop (0 : ℝ)] with u huε hu + rw [dist_zero_right, Real.norm_eq_abs, + abs_of_nonneg (mul_nonneg hC (Real.exp_nonneg _))] at huε + rw [dist_zero_right] + exact (hbound u hu).trans_lt huε + +theorem tendsto_exp_mul_zero_of_norm_le_exp_decay + {f : ℝ → ℝ} {C r : ℝ} (hC : 0 ≤ C) (hr : r < 3 / 2) + (hbound : ∀ u, 0 ≤ u → + ‖f u‖ ≤ C * Real.exp (-(3 / 2 : ℝ) * u)) : + Filter.Tendsto (fun u ↦ Real.exp (r * u) * f u) + Filter.atTop (𝓝 0) := by + let δ := 3 / 2 - r + have hδ : 0 < δ := by + dsimp only [δ] + linarith + have hlin : + Filter.Tendsto (fun u : ℝ ↦ δ * u) + Filter.atTop Filter.atTop := + Filter.tendsto_id.const_mul_atTop hδ + have hexp : + Filter.Tendsto (fun u : ℝ ↦ Real.exp (-(δ * u))) + Filter.atTop (𝓝 0) := + Real.tendsto_exp_neg_atTop_nhds_zero.comp hlin + have hupper : + Filter.Tendsto (fun u : ℝ ↦ C * Real.exp (-(δ * u))) + Filter.atTop (𝓝 0) := by + simpa using hexp.const_mul C + rw [Metric.tendsto_nhds] at hupper ⊢ + intro ε hε + filter_upwards [hupper ε hε, Filter.eventually_ge_atTop (0 : ℝ)] with u huε hu + rw [dist_zero_right, Real.norm_eq_abs, + abs_of_nonneg (mul_nonneg hC (Real.exp_nonneg _))] at huε + rw [dist_zero_right, norm_mul, Real.norm_eq_abs, + abs_of_pos (Real.exp_pos _)] + calc + Real.exp (r * u) * ‖f u‖ ≤ + Real.exp (r * u) * + (C * Real.exp (-(3 / 2 : ℝ) * u)) := by + gcongr + exact hbound u hu + _ = C * (Real.exp (r * u) * + Real.exp (-(3 / 2 : ℝ) * u)) := by ring + _ = C * Real.exp (-(δ * u)) := by + rw [← Real.exp_add] + dsimp only [δ] + congr 2 + ring + _ < ε := huε + +theorem integrableOn_cosh_mul_of_norm_le_exp_decay + {f : ℝ → ℝ} {C r : ℝ} (hr : |r| < 3 / 2) + (hcont : ContinuousOn f (Set.Ioi 0)) + (hbound : ∀ u, 0 < u → + ‖f u‖ ≤ C * Real.exp (-(3 / 2 : ℝ) * u)) : + MeasureTheory.IntegrableOn + (fun u ↦ Real.cosh (r * u) * f u) (Set.Ioi 0) := by + let g : ℝ → ℝ := fun u ↦ + (C / 2) * (Real.exp ((r - 3 / 2) * u) + + Real.exp ((-r - 3 / 2) * u)) + have hrp : r - 3 / 2 < 0 := by linarith [(abs_lt.mp hr).2] + have hrn : -r - 3 / 2 < 0 := by linarith [(abs_lt.mp hr).1] + have hg : MeasureTheory.IntegrableOn g (Set.Ioi 0) := by + exact ((integrableOn_exp_mul_Ioi hrp 0).add + (integrableOn_exp_mul_Ioi hrn 0)).const_mul (C / 2) + apply hg.mono' + · exact + (((by fun_prop : Continuous fun u : ℝ ↦ Real.cosh (r * u)).continuousOn.mul + hcont).aestronglyMeasurable measurableSet_Ioi) + · filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu + rw [norm_mul, Real.norm_eq_abs, abs_of_pos (Real.cosh_pos _)] + calc + Real.cosh (r * u) * ‖f u‖ ≤ + Real.cosh (r * u) * + (C * Real.exp (-(3 / 2 : ℝ) * u)) := by + gcongr + exact hbound u hu + _ = g u := by + rw [Real.cosh_eq] + dsimp only [g] + rw [show Real.exp ((r - 3 / 2) * u) = + Real.exp (r * u) * Real.exp (-(3 / 2 : ℝ) * u) by + rw [← Real.exp_add] + congr 1 + ring] + rw [show Real.exp ((-r - 3 / 2) * u) = + Real.exp (-(r * u)) * Real.exp (-(3 / 2 : ℝ) * u) by + rw [← Real.exp_add] + congr 1 + ring] + ring + +theorem tendsto_riemannThetaTailDeriv_atTop_zero : + Filter.Tendsto riemannThetaTailDeriv Filter.atTop (𝓝 0) := by + apply tendsto_zero_of_norm_le_exp_decay + (f := riemannThetaTailDeriv) + (C := ∑' n : ℕ, riemannPhiMajorantCoefficient n) + · exact tsum_nonneg fun n ↦ by + unfold riemannPhiMajorantCoefficient + positivity + · exact fun u hu ↦ norm_riemannThetaTailDeriv_le_decay hu + +theorem tendsto_riemannThetaTailSecondDerivSum_atTop_zero : + Filter.Tendsto riemannThetaTailSecondDerivSum Filter.atTop (𝓝 0) := by + apply tendsto_zero_of_norm_le_exp_decay + (f := riemannThetaTailSecondDerivSum) + (C := 2 * (∑' n : ℕ, riemannPhiMajorantCoefficient n)) + · exact mul_nonneg (by norm_num) (tsum_nonneg fun n ↦ by + unfold riemannPhiMajorantCoefficient + positivity) + · exact fun u hu ↦ norm_riemannThetaTailSecondDerivSum_le_decay hu + +theorem tendsto_deriv_riemannThetaTail_atTop_zero : + Filter.Tendsto (deriv riemannThetaTail) Filter.atTop (𝓝 0) := by + apply tendsto_riemannThetaTailDeriv_atTop_zero.congr' + filter_upwards [Filter.eventually_gt_atTop (0 : ℝ)] with u hu + exact (deriv_riemannThetaTail hu).symm + +theorem tendsto_deriv_deriv_riemannThetaTail_atTop_zero : + Filter.Tendsto (deriv (deriv riemannThetaTail)) Filter.atTop (𝓝 0) := by + apply tendsto_riemannThetaTailSecondDerivSum_atTop_zero.congr' + filter_upwards [Filter.eventually_gt_atTop (0 : ℝ)] with u hu + exact (deriv_deriv_riemannThetaTail hu).symm + +theorem summable_riemannPhiTerm (u : ℝ) : + Summable (fun n ↦ riemannPhiTerm n u) := by + let C : ℝ := 4 * Real.pi ^ 2 * Real.exp (9 * |u| / 2) + have hbase : + Summable (fun n : ℕ ↦ + (n : ℝ) ^ 4 * Real.exp (-Real.pi * n)) := + Real.summable_pow_mul_exp_neg_nat_mul 4 Real.pi_pos + have hmajor : + Summable (fun n : ℕ ↦ + C * (n + 1 : ℝ) ^ 4 * + Real.exp (-Real.pi * (n + 1 : ℝ))) := by + simpa [Nat.cast_add, Nat.cast_one, mul_assoc] using + ((summable_nat_add_iff 1).2 hbase).mul_left C + apply hmajor.of_norm_bounded + intro n + let m : ℝ := n + 1 + let v := |u| + have hm : 1 ≤ m := by + dsimp only [m] + exact_mod_cast Nat.succ_pos n + have hv : 0 ≤ v := abs_nonneg u + have hE : 1 ≤ Real.exp (2 * v) := + Real.one_le_exp (mul_nonneg (by norm_num) hv) + have hm2E : m ≤ m ^ 2 * Real.exp (2 * v) := by + nlinarith [sq_nonneg (m - 1), Real.exp_pos (2 * v)] + have hexp : + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) ≤ + Real.exp (-Real.pi * m) := by + apply Real.exp_le_exp.mpr + nlinarith [Real.pi_pos] + have hterm := (riemannPhiTerm_pos n u).le + have hbracket : + 2 * Real.pi * m ^ 2 * Real.exp (2 * v) - 3 ≤ + 2 * Real.pi * m ^ 2 * Real.exp (2 * v) := by + linarith + rw [Real.norm_eq_abs, abs_of_nonneg hterm] + calc + riemannPhiTerm n u ≤ + 2 * Real.pi * m ^ 2 * Real.exp (5 * v / 2) * + (2 * Real.pi * m ^ 2 * Real.exp (2 * v)) * + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) := by + dsimp only [riemannPhiTerm, m, v] + gcongr + _ = C * m ^ 4 * + Real.exp (-Real.pi * m ^ 2 * Real.exp (2 * v)) := by + dsimp only [C] + rw [show Real.exp (9 * |u| / 2) = + Real.exp (5 * v / 2) * Real.exp (2 * v) by + rw [← Real.exp_add] + congr 1 + dsimp only [v] + ring] + ring + _ ≤ C * m ^ 4 * Real.exp (-Real.pi * m) := by + gcongr + +/-- Riemann's explicit Fourier kernel. -/ +def riemannPhi (u : ℝ) : ℝ := + ∑' n : ℕ, riemannPhiTerm n u + +theorem riemannPhi_eq_thetaSeries_shifted_second_deriv + {u : ℝ} (hu : 0 ≤ u) : + riemannPhi u = + (∑' n : ℕ, deriv (deriv (riemannThetaTerm n)) u) - + (1 / 4 : ℝ) * riemannThetaTail u := by + rw [riemannPhi] + unfold riemannThetaTail + calc + (∑' n : ℕ, riemannPhiTerm n u) = + ∑' n : ℕ, (deriv (deriv (riemannThetaTerm n)) u - + (1 / 4 : ℝ) * riemannThetaTerm n u) := by + apply tsum_congr + intro n + exact riemannPhiTerm_eq_theta_shifted_second_deriv n hu + _ = (∑' n : ℕ, deriv (deriv (riemannThetaTerm n)) u) - + ∑' n : ℕ, (1 / 4 : ℝ) * riemannThetaTerm n u := by + exact Summable.tsum_sub + (summable_deriv_deriv_riemannThetaTerm_of_nonneg hu) + ((summable_riemannThetaTerm_of_nonneg hu).mul_left (1 / 4 : ℝ)) + _ = _ := by rw [tsum_mul_left] + +theorem riemannPhi_eq_thetaTail_shifted_second_deriv + {u : ℝ} (hu : 0 < u) : + riemannPhi u = + deriv (deriv riemannThetaTail) u - (1 / 4 : ℝ) * riemannThetaTail u := by + rw [riemannPhi_eq_thetaSeries_shifted_second_deriv hu.le, + deriv_deriv_riemannThetaTail hu] + +theorem riemannPhi_even (u : ℝ) : + riemannPhi (-u) = riemannPhi u := by + apply tsum_congr + intro n + simp only [riemannPhiTerm, abs_neg] + +theorem riemannPhi_pos (u : ℝ) : + 0 < riemannPhi u := by + exact (summable_riemannPhiTerm u).tsum_pos + (fun n ↦ (riemannPhiTerm_pos n u).le) 0 + (riemannPhiTerm_pos 0 u) + +theorem continuous_riemannPhiTerm (n : ℕ) : + Continuous (riemannPhiTerm n) := by + unfold riemannPhiTerm + fun_prop + +/-- The explicit kernel is continuous, by a global Weierstrass majorant. -/ +theorem continuous_riemannPhi : Continuous riemannPhi := by + unfold riemannPhi + apply continuous_tsum continuous_riemannPhiTerm + summable_riemannPhiMajorantCoefficient + intro n u + rw [Real.norm_eq_abs, abs_of_pos (riemannPhiTerm_pos n u)] + calc + riemannPhiTerm n u ≤ + riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * |u|) := + riemannPhiTerm_le_majorant n u + _ ≤ riemannPhiMajorantCoefficient n * 1 := by + apply mul_le_mul_of_nonneg_left _ + (riemannPhiMajorantCoefficient_pos n).le + apply Real.exp_le_one_iff.mpr + exact mul_nonpos_of_nonpos_of_nonneg (by norm_num) (abs_nonneg u) + _ = riemannPhiMajorantCoefficient n := mul_one _ + +def thetaCoshBoundary (r u : ℝ) : ℝ := + Real.cosh (r * u) * deriv riemannThetaTail u - + r * Real.sinh (r * u) * riemannThetaTail u + +theorem thetaCoshBoundary_zero (r : ℝ) : + thetaCoshBoundary r 0 = -(1 / 4 : ℝ) := by + rw [thetaCoshBoundary, deriv_riemannThetaTail_zero] + simp + +theorem hasDerivAt_thetaCoshBoundary + (r : ℝ) {u : ℝ} (hu : 0 < u) : + HasDerivAt (thetaCoshBoundary r) + (Real.cosh (r * u) * + (riemannPhi u + (1 / 4 - r ^ 2) * riemannThetaTail u)) u := by + have ht := hasDerivAt_riemannThetaTail hu + have hdt := hasDerivAt_deriv_riemannThetaTail hu + have hc : + HasDerivAt (fun x : ℝ ↦ Real.cosh (r * x)) + (r * Real.sinh (r * u)) u := by + simpa [id_eq, mul_comm] using ((hasDerivAt_id u).const_mul r).cosh + have hs : + HasDerivAt (fun x : ℝ ↦ Real.sinh (r * x)) + (r * Real.cosh (r * u)) u := by + simpa [id_eq, mul_comm] using ((hasDerivAt_id u).const_mul r).sinh + have hraw := (hc.mul hdt).sub ((hs.const_mul r).mul ht) + rw [show deriv (deriv riemannThetaTail) u = + riemannPhi u + (1 / 4 : ℝ) * riemannThetaTail u by + rw [riemannPhi_eq_thetaTail_shifted_second_deriv hu] + ring] at hraw + rw [← deriv_riemannThetaTail hu] at hraw + unfold thetaCoshBoundary + change HasDerivAt + (fun x : ℝ ↦ Real.cosh (r * x) * deriv riemannThetaTail x - + r * Real.sinh (r * x) * riemannThetaTail x) _ u at hraw + convert hraw using 1 + ring + +theorem continuousOn_thetaCoshBoundary_Icc (r R : ℝ) : + ContinuousOn (thetaCoshBoundary r) (Set.Icc 0 R) := by + unfold thetaCoshBoundary + exact + ((by fun_prop : Continuous fun u : ℝ ↦ Real.cosh (r * u)).continuousOn.mul + (continuousOn_deriv_riemannThetaTail_Icc R)).sub + (((by fun_prop : Continuous fun u : ℝ ↦ r * Real.sinh (r * u)).continuousOn).mul + (continuousOn_riemannThetaTail_Icc R)) + +theorem intervalIntegral_cosh_mul_riemannPhi_double_ibp + (r : ℝ) {R : ℝ} (hR : 0 ≤ R) : + (∫ u in (0 : ℝ)..R, Real.cosh (r * u) * riemannPhi u) = + thetaCoshBoundary r R + 1 / 4 + + (r ^ 2 - 1 / 4) * + ∫ u in (0 : ℝ)..R, + Real.cosh (r * u) * riemannThetaTail u := by + let A : ℝ → ℝ := fun u ↦ Real.cosh (r * u) * riemannPhi u + let T : ℝ → ℝ := fun u ↦ Real.cosh (r * u) * riemannThetaTail u + let F : ℝ → ℝ := fun u ↦ + Real.cosh (r * u) * + (riemannPhi u + (1 / 4 - r ^ 2) * riemannThetaTail u) + have hAcont : ContinuousOn A (Set.Icc 0 R) := + ((by fun_prop : Continuous fun u : ℝ ↦ Real.cosh (r * u)).continuousOn).mul + continuous_riemannPhi.continuousOn + have hTcont : ContinuousOn T (Set.Icc 0 R) := + ((by fun_prop : Continuous fun u : ℝ ↦ Real.cosh (r * u)).continuousOn).mul + (continuousOn_riemannThetaTail_Icc R) + have hFcont : ContinuousOn F (Set.Icc 0 R) := by + have hsum := hAcont.add (hTcont.const_mul (1 / 4 - r ^ 2)) + apply hsum.congr + intro u hu + simp only [Pi.add_apply] + dsimp only [F, A, T] + ring + have hAcont' : ContinuousOn A (Set.uIcc 0 R) := by + simpa [Set.uIcc_of_le hR] using hAcont + have hTcont' : ContinuousOn T (Set.uIcc 0 R) := by + simpa [Set.uIcc_of_le hR] using hTcont + have hFcont' : ContinuousOn F (Set.uIcc 0 R) := by + simpa [Set.uIcc_of_le hR] using hFcont + have hAint : IntervalIntegrable A MeasureTheory.volume 0 R := + hAcont'.intervalIntegrable + have hTint : IntervalIntegrable T MeasureTheory.volume 0 R := + hTcont'.intervalIntegrable + have hFint : IntervalIntegrable F MeasureTheory.volume 0 R := + hFcont'.intervalIntegrable + have hfund : + (∫ u in (0 : ℝ)..R, F u) = + thetaCoshBoundary r R - thetaCoshBoundary r 0 := + intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hR + (continuousOn_thetaCoshBoundary_Icc r R) + (fun u hu ↦ hasDerivAt_thetaCoshBoundary r hu.1) + hFint + have hsplit : + (∫ u in (0 : ℝ)..R, F u) = + (∫ u in (0 : ℝ)..R, A u) + + (1 / 4 - r ^ 2) * ∫ u in (0 : ℝ)..R, T u := by + have heq : F = fun u ↦ A u + (1 / 4 - r ^ 2) * T u := by + funext u + dsimp only [F, A, T] + ring + rw [heq, intervalIntegral.integral_add hAint + (hTint.const_mul (1 / 4 - r ^ 2)), + intervalIntegral.integral_const_mul] + rw [hsplit, thetaCoshBoundary_zero] at hfund + dsimp only [A, T] at hfund ⊢ + linarith + +theorem tendsto_thetaCoshBoundary_atTop_zero + {r : ℝ} (hr : |r| < 3 / 2) : + Filter.Tendsto (thetaCoshBoundary r) Filter.atTop (𝓝 0) := by + let C := ∑' n : ℕ, riemannPhiMajorantCoefficient n + have hC : 0 ≤ C := by + dsimp only [C] + exact tsum_nonneg fun n ↦ (riemannPhiMajorantCoefficient_pos n).le + have hrp : r < 3 / 2 := (abs_lt.mp hr).2 + have hrn : -r < 3 / 2 := by linarith [(abs_lt.mp hr).1] + have hdpos : + Filter.Tendsto + (fun u ↦ Real.exp (r * u) * deriv riemannThetaTail u) + Filter.atTop (𝓝 0) := + tendsto_exp_mul_zero_of_norm_le_exp_decay hC hrp + (fun u hu ↦ by + rw [deriv_riemannThetaTail_eq_tailDeriv_of_nonneg hu] + exact norm_riemannThetaTailDeriv_le_decay hu) + have hdneg : + Filter.Tendsto + (fun u ↦ Real.exp (-r * u) * deriv riemannThetaTail u) + Filter.atTop (𝓝 0) := + tendsto_exp_mul_zero_of_norm_le_exp_decay hC hrn + (fun u hu ↦ by + rw [deriv_riemannThetaTail_eq_tailDeriv_of_nonneg hu] + exact norm_riemannThetaTailDeriv_le_decay hu) + have htpos : + Filter.Tendsto + (fun u ↦ Real.exp (r * u) * riemannThetaTail u) + Filter.atTop (𝓝 0) := + tendsto_exp_mul_zero_of_norm_le_exp_decay hC hrp + (fun u hu ↦ norm_riemannThetaTail_le_decay hu) + have htneg : + Filter.Tendsto + (fun u ↦ Real.exp (-r * u) * riemannThetaTail u) + Filter.atTop (𝓝 0) := + tendsto_exp_mul_zero_of_norm_le_exp_decay hC hrn + (fun u hu ↦ norm_riemannThetaTail_le_decay hu) + have hcosh : + Filter.Tendsto + (fun u ↦ Real.cosh (r * u) * deriv riemannThetaTail u) + Filter.atTop (𝓝 0) := by + have h := (hdpos.add hdneg).const_mul (1 / 2 : ℝ) + convert h using 1 + · funext u + rw [Real.cosh_eq] + ring + · ring + have hsinh : + Filter.Tendsto + (fun u ↦ r * Real.sinh (r * u) * riemannThetaTail u) + Filter.atTop (𝓝 0) := by + have h := (htpos.sub htneg).const_mul (r / 2) + convert h using 1 + · funext u + rw [Real.sinh_eq] + ring + · ring + have h := hcosh.sub hsinh + change Filter.Tendsto + (fun u ↦ Real.cosh (r * u) * deriv riemannThetaTail u - + r * Real.sinh (r * u) * riemannThetaTail u) + Filter.atTop (𝓝 0) + simpa using h + +theorem integral_Ioi_cosh_mul_riemannPhi_double_ibp_of_integrable + {r : ℝ} (hr : |r| < 3 / 2) + (hPhi : MeasureTheory.IntegrableOn + (fun u : ℝ ↦ Real.cosh (r * u) * riemannPhi u) (Set.Ioi 0)) + (hTheta : MeasureTheory.IntegrableOn + (fun u : ℝ ↦ Real.cosh (r * u) * riemannThetaTail u) (Set.Ioi 0)) : + (∫ u : ℝ in Set.Ioi 0, Real.cosh (r * u) * riemannPhi u) = + 1 / 4 + (r ^ 2 - 1 / 4) * + ∫ u : ℝ in Set.Ioi 0, + Real.cosh (r * u) * riemannThetaTail u := by + let A : ℝ → ℝ := fun u ↦ Real.cosh (r * u) * riemannPhi u + let T : ℝ → ℝ := fun u ↦ Real.cosh (r * u) * riemannThetaTail u + have hAlim : + Filter.Tendsto (fun R ↦ ∫ u in (0 : ℝ)..R, A u) + Filter.atTop (𝓝 (∫ u : ℝ in Set.Ioi 0, A u)) := + intervalIntegral_tendsto_integral_Ioi 0 hPhi Filter.tendsto_id + have hTlim : + Filter.Tendsto (fun R ↦ ∫ u in (0 : ℝ)..R, T u) + Filter.atTop (𝓝 (∫ u : ℝ in Set.Ioi 0, T u)) := + intervalIntegral_tendsto_integral_Ioi 0 hTheta Filter.tendsto_id + have hBlim := tendsto_thetaCoshBoundary_atTop_zero hr + have hright : + Filter.Tendsto + (fun R ↦ thetaCoshBoundary r R + 1 / 4 + + (r ^ 2 - 1 / 4) * ∫ u in (0 : ℝ)..R, T u) + Filter.atTop + (𝓝 (1 / 4 + (r ^ 2 - 1 / 4) * + ∫ u : ℝ in Set.Ioi 0, T u)) := by + convert (hBlim.add_const (1 / 4)).add + (hTlim.const_mul (r ^ 2 - 1 / 4)) using 1 <;> ring + have heq : + (fun R ↦ ∫ u in (0 : ℝ)..R, A u) =ᶠ[Filter.atTop] + fun R ↦ thetaCoshBoundary r R + 1 / 4 + + (r ^ 2 - 1 / 4) * ∫ u in (0 : ℝ)..R, T u := by + filter_upwards [Filter.eventually_ge_atTop (0 : ℝ)] with R hR + exact intervalIntegral_cosh_mul_riemannPhi_double_ibp r hR + have hright' : + Filter.Tendsto (fun R ↦ ∫ u in (0 : ℝ)..R, A u) + Filter.atTop + (𝓝 (1 / 4 + (r ^ 2 - 1 / 4) * + ∫ u : ℝ in Set.Ioi 0, T u)) := + hright.congr' heq.symm + have hunique := tendsto_nhds_unique hAlim hright' + simpa only [A, T] using hunique + +theorem continuousOn_riemannThetaTail_Ioi : + ContinuousOn riemannThetaTail (Set.Ioi 0) := by + intro u hu + exact (hasDerivAt_riemannThetaTail hu).continuousAt.continuousWithinAt + +/-- Global exponential decay of Riemann's `Φ`, with an explicit finite constant. -/ +theorem riemannPhi_le_exponential_majorant (u : ℝ) : + riemannPhi u ≤ + (∑' n : ℕ, riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * |u|) := by + unfold riemannPhi + calc + (∑' n : ℕ, riemannPhiTerm n u) ≤ + ∑' n : ℕ, riemannPhiMajorantCoefficient n * + Real.exp (-(3 / 2 : ℝ) * |u|) := + (summable_riemannPhiTerm u).tsum_le_tsum + (fun n ↦ riemannPhiTerm_le_majorant n u) + (summable_riemannPhiMajorantCoefficient.mul_right _) + _ = (∑' n : ℕ, riemannPhiMajorantCoefficient n) * + Real.exp (-(3 / 2 : ℝ) * |u|) := tsum_mul_right + +theorem integral_Ioi_cosh_mul_riemannPhi_double_ibp + {r : ℝ} (hr : |r| < 3 / 2) : + (∫ u : ℝ in Set.Ioi 0, Real.cosh (r * u) * riemannPhi u) = + 1 / 4 + (r ^ 2 - 1 / 4) * + ∫ u : ℝ in Set.Ioi 0, + Real.cosh (r * u) * riemannThetaTail u := by + let C := ∑' n : ℕ, riemannPhiMajorantCoefficient n + apply integral_Ioi_cosh_mul_riemannPhi_double_ibp_of_integrable hr + · apply integrableOn_cosh_mul_of_norm_le_exp_decay hr + continuous_riemannPhi.continuousOn + intro u hu + rw [Real.norm_eq_abs, abs_of_pos (riemannPhi_pos u)] + simpa [C, abs_of_pos hu] using riemannPhi_le_exponential_majorant u + · apply integrableOn_cosh_mul_of_norm_le_exp_decay hr + continuousOn_riemannThetaTail_Ioi + intro u hu + exact norm_riemannThetaTail_le_decay hu.le + +theorem completedRiemannZeta₀_real_eq_cosh_theta + {r : ℝ} (hr : |r| < 3 / 2) : + completedRiemannZeta₀ (1 / 2 + r : ℝ) = + (4 * ∫ u : ℝ in Set.Ioi 0, + Real.cosh (r * u) * riemannThetaTail u : ℝ) := by + let G : ℝ → ℝ := fun u ↦ Real.cosh (r * u) * riemannThetaTail u + let GC : ℝ → ℂ := fun u ↦ (8 : ℂ) * (G u : ℂ) + have hGint : MeasureTheory.IntegrableOn G (Set.Ioi 0) := by + apply integrableOn_cosh_mul_of_norm_le_exp_decay hr + continuousOn_riemannThetaTail_Ioi + intro u hu + exact norm_riemannThetaTail_le_decay hu.le + have hGCint : MeasureTheory.IntegrableOn GC (Set.Ioi 0) := by + apply MeasureTheory.Integrable.const_mul + exact hGint.norm.mono' + (Complex.continuous_ofReal.comp_aestronglyMeasurable hGint.1) + (Filter.Eventually.of_forall fun u ↦ by simp) + have hMellin := + tendsto_intervalIntegral_mellin_truncation + (mellinConvergent_hurwitzEvenFEPair_zero_f_modif + (((1 / 2 + r : ℝ) : ℂ) / 2)) + have hGlim : + Filter.Tendsto (fun R ↦ ∫ u in (0 : ℝ)..R, GC u) + Filter.atTop (𝓝 (∫ u : ℝ in Set.Ioi 0, GC u)) := + intervalIntegral_tendsto_integral_Ioi 0 hGCint Filter.tendsto_id + have hevent : + (fun R ↦ ∫ x in Real.exp (-2 * R)..Real.exp (2 * R), + (x : ℂ) ^ ((((1 / 2 + r : ℝ) : ℂ) / 2) - 1) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x) =ᶠ[Filter.atTop] + fun R ↦ ∫ u in (0 : ℝ)..R, GC u := by + filter_upwards [Filter.eventually_ge_atTop (0 : ℝ)] with R hR + rw [intervalIntegral_mellin_f_modif_eq_cosh_theta + ((1 / 2 + r : ℝ) : ℂ) hR] + apply intervalIntegral.integral_congr + intro u _ + dsimp only [GC, G] + push_cast + have harg : + (1 / 2 + (r : ℂ) - 1 / 2) * (u : ℂ) = + (r : ℂ) * (u : ℂ) := by ring + rw [harg] + ring + have hMellin' : + Filter.Tendsto + (fun R ↦ ∫ x in Real.exp (-2 * R)..Real.exp (2 * R), + (x : ℂ) ^ ((((1 / 2 + r : ℝ) : ℂ) / 2) - 1) * + (HurwitzZeta.hurwitzEvenFEPair 0).f_modif x) + Filter.atTop (𝓝 (∫ u : ℝ in Set.Ioi 0, GC u)) := + hGlim.congr' hevent.symm + have hunique := tendsto_nhds_unique hMellin hMellin' + rw [completedRiemannZeta₀_eq_mellin_f_modif, hunique] + dsimp only [GC, G] + rw [MeasureTheory.integral_const_mul] + rw [show + (∫ a : ℝ in Set.Ioi 0, + ((Real.cosh (r * a) * riemannThetaTail a : ℝ) : ℂ)) = + ((∫ a : ℝ in Set.Ioi 0, + Real.cosh (r * a) * riemannThetaTail a : ℝ) : ℂ) from + integral_ofReal] + push_cast + ring + +theorem integrable_exp_neg_mul_abs {c : ℝ} (hc : 0 < c) : + Integrable (fun u : ℝ ↦ Real.exp (-c * |u|)) := by + rw [← integrableOn_univ, ← Set.Iic_union_Ioi (a := 0)] + apply IntegrableOn.union + · refine (integrableOn_exp_mul_Iic hc 0).congr_fun ?_ measurableSet_Iic + intro u hu + change u ≤ 0 at hu + change Real.exp (c * u) = Real.exp (-c * |u|) + rw [abs_of_nonpos hu] + congr 1 + ring + · refine (integrableOn_exp_mul_Ioi (neg_neg_of_pos hc) 0).congr_fun ?_ + measurableSet_Ioi + intro u hu + change 0 < u at hu + change Real.exp (-c * u) = Real.exp (-c * |u|) + rw [abs_of_pos hu] + +/-- Every polynomial moment of the common exponential majorant is integrable. -/ +theorem integrable_abs_pow_mul_exp_majorant (k : ℕ) : + Integrable (fun u : ℝ ↦ |u| ^ k * Real.exp (-(3 / 2 : ℝ) * |u|)) := by + have hslow : Integrable (fun u : ℝ ↦ Real.exp (-(1 / 2 : ℝ) * |u|)) := + integrable_exp_neg_mul_abs (by norm_num) + have hfast : Integrable (fun u : ℝ ↦ Real.exp (-(5 / 2 : ℝ) * |u|)) := + integrable_exp_neg_mul_abs (by norm_num) + have hpos : + Integrable (fun u : ℝ ↦ + Real.exp ((-(3 / 2 : ℝ) + 1) * |u|)) := by + convert hslow using 1 + funext u + congr 1 + ring + have hneg : + Integrable (fun u : ℝ ↦ + Real.exp ((-(3 / 2 : ℝ) - 1) * |u|)) := by + convert hfast using 1 + funext u + congr 1 + ring + have h := ProbabilityTheory.integrable_pow_abs_mul_exp_of_integrable_exp_mul + (μ := volume) (X := fun u : ℝ ↦ |u|) (v := -(3 / 2 : ℝ)) + (t := 1) one_ne_zero + hpos hneg k + simpa [abs_abs] using h + +/-- All moments of the concrete Riemann `Φ` kernel are Lebesgue integrable. -/ +theorem integrable_riemannPhi_mul_pow (k : ℕ) : + Integrable (fun u : ℝ ↦ riemannPhi u * u ^ k) := by + let C := ∑' n : ℕ, riemannPhiMajorantCoefficient n + have hC : 0 ≤ C := + tsum_nonneg fun n ↦ (riemannPhiMajorantCoefficient_pos n).le + have hmajor : + Integrable (fun u : ℝ ↦ C * + (|u| ^ k * Real.exp (-(3 / 2 : ℝ) * |u|))) := + (integrable_abs_pow_mul_exp_majorant k).const_mul C + apply hmajor.mono' + · exact (continuous_riemannPhi.mul (continuous_id.pow k)).aestronglyMeasurable + · filter_upwards with u + rw [Real.norm_eq_abs, abs_mul, abs_of_pos (riemannPhi_pos u), abs_pow] + have hdecay : + riemannPhi u ≤ C * Real.exp (-(3 / 2 : ℝ) * |u|) := by + simpa only [C] using riemannPhi_le_exponential_majorant u + calc + riemannPhi u * |u| ^ k ≤ + (C * Real.exp (-(3 / 2 : ℝ) * |u|)) * |u| ^ k := by + gcongr + _ = C * (|u| ^ k * Real.exp (-(3 / 2 : ℝ) * |u|)) := by ring + +theorem integrable_riemannPhi_mul_exp_of_abs_lt_one + {r : ℝ} (hr : |r| < 1) : + Integrable (fun u : ℝ ↦ riemannPhi u * Real.exp (r * u)) := by + let C := ∑' n : ℕ, riemannPhiMajorantCoefficient n + have hC : 0 ≤ C := + tsum_nonneg fun n ↦ (riemannPhiMajorantCoefficient_pos n).le + have hmajor : + Integrable (fun u : ℝ ↦ C * Real.exp (-(1 / 2 : ℝ) * |u|)) := + (integrable_exp_neg_mul_abs (by norm_num)).const_mul C + apply hmajor.mono' + · exact (continuous_riemannPhi.mul (by fun_prop)).aestronglyMeasurable + · filter_upwards with u + rw [Real.norm_eq_abs, abs_mul, + abs_of_pos (riemannPhi_pos u), abs_of_pos (Real.exp_pos _)] + have hru : r * u ≤ |u| := by + calc + r * u ≤ |r| * |u| := (le_abs_self (r * u)).trans_eq (abs_mul r u) + _ ≤ 1 * |u| := by + gcongr + _ = |u| := one_mul _ + have hdecay : + riemannPhi u ≤ C * Real.exp (-(3 / 2 : ℝ) * |u|) := by + simpa only [C] using riemannPhi_le_exponential_majorant u + calc + riemannPhi u * Real.exp (r * u) ≤ + (C * Real.exp (-(3 / 2 : ℝ) * |u|)) * + Real.exp (r * u) := by gcongr + _ ≤ (C * Real.exp (-(3 / 2 : ℝ) * |u|)) * + Real.exp |u| := by gcongr + _ = C * Real.exp (-(1 / 2 : ℝ) * |u|) := by + rw [mul_assoc, ← Real.exp_add] + congr 2 + ring + +theorem riemannXi_one_sub (s : ℂ) : riemannXi (1 - s) = riemannXi s := by + rw [riemannXi, riemannXi, completedRiemannZeta₀_one_sub] + ring_nf + +/-- The entire function in equation (1) of Griffin--Ono--Rolen--Zagier: +the entire continuation of +`(-1 + 4 z^2) Λ(1/2 + z) = 8 ξ(1/2 + z)`. -/ +def xiJensenEntire (z : ℂ) : ℂ := + 8 * riemannXi (1 / 2 + z) + +theorem xiJensenEntire_eq_four_mul_riemannXiLi (z : ℂ) : + xiJensenEntire z = 4 * riemannXiLi (1 / 2 + z) := by + simp only [xiJensenEntire, riemannXi, riemannXiLi] + ring + +theorem differentiable_xiJensenEntire : Differentiable ℂ xiJensenEntire := by + unfold xiJensenEntire + fun_prop + +/-- The centered xi function inherits the proved global order-one estimate +from the Li normalization. -/ +theorem exists_xiJensenEntire_orderOneGrowthBound : + ∃ C R : ℝ, 0 ≤ C ∧ 2 ≤ R ∧ ∀ z : ℂ, R ≤ ‖z‖ → + ‖xiJensenEntire z‖ ≤ + Real.exp (C * ‖z‖ * Real.log (‖z‖ + 2)) := by + obtain ⟨C, R, hC, hR, hbound⟩ := riemannXi_orderOneGrowthBound + let D := 4 * C + 2 + let R' : ℝ := max 5 (R + 1) + refine ⟨D, R', by dsimp [D]; positivity, + (by dsimp [R']; linarith [le_max_left (5 : ℝ) (R + 1)]), ?_⟩ + intro z hz + let r := ‖z‖ + let w : ℂ := 1 / 2 + z + have hr5 : 5 ≤ r := (le_max_left _ _).trans hz + have hRw : R ≤ ‖w‖ := by + have hlower : r - 1 ≤ ‖w‖ := by + have h := norm_sub_le w (1 / 2) + have hw : w - 1 / 2 = z := by dsimp [w]; ring + rw [hw] at h + have hhalf : ‖(1 / 2 : ℂ)‖ = 1 / 2 := by norm_num + rw [hhalf] at h + linarith + have hRr : R + 1 ≤ r := (le_max_right 5 (R + 1)).trans hz + linarith + have hwUpper : ‖w‖ ≤ 2 * r := by + have h := norm_add_le (1 / 2 : ℂ) z + have hhalf : ‖(1 / 2 : ℂ)‖ = 1 / 2 := by norm_num + rw [hhalf] at h + linarith + have hlog0 : 0 ≤ Real.log (r + 2) := + Real.log_nonneg (by linarith) + have hlogw : Real.log (‖w‖ + 2) ≤ 2 * Real.log (r + 2) := by + have harg : ‖w‖ + 2 ≤ (r + 2) ^ 2 := by + nlinarith [sq_nonneg (r + 2)] + calc + Real.log (‖w‖ + 2) ≤ Real.log ((r + 2) ^ 2) := + Real.log_le_log (by positivity) harg + _ = 2 * Real.log (r + 2) := by + rw [Real.log_pow] + norm_num + have hlogw0 : 0 ≤ Real.log (‖w‖ + 2) := + Real.log_nonneg (by linarith [norm_nonneg w]) + have hbase := hbound w hRw + rw [xiJensenEntire_eq_four_mul_riemannXiLi, norm_mul] + norm_num + calc + 4 * ‖riemannXiLi w‖ ≤ + 4 * Real.exp (C * ‖w‖ * Real.log (‖w‖ + 2)) := by gcongr + _ ≤ 4 * Real.exp (4 * C * r * Real.log (r + 2)) := by + apply mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr ?_) (by norm_num) + calc + C * ‖w‖ * Real.log (‖w‖ + 2) + ≤ C * (2 * r) * Real.log (‖w‖ + 2) := by + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hwUpper hC) hlogw0 + _ ≤ C * (2 * r) * (2 * Real.log (r + 2)) := by + exact mul_le_mul_of_nonneg_left hlogw + (mul_nonneg hC (by positivity)) + _ = 4 * C * r * Real.log (r + 2) := by ring + _ ≤ Real.exp (D * r * Real.log (r + 2)) := by + rw [show D * r * Real.log (r + 2) = + 4 * C * r * Real.log (r + 2) + + 2 * r * Real.log (r + 2) by dsimp [D]; ring, + Real.exp_add] + have hlog2 : Real.log 2 ≤ Real.log (r + 2) := + Real.log_le_log (by norm_num) (by linarith) + have hexp : 4 ≤ Real.exp (2 * r * Real.log (r + 2)) := by + rw [← Real.exp_log (by norm_num : (0 : ℝ) < 4)] + apply Real.exp_le_exp.mpr + rw [show Real.log 4 = 2 * Real.log 2 by + rw [show (4 : ℝ) = 2 ^ 2 by norm_num, Real.log_pow]; norm_num] + nlinarith + rw [show 4 * Real.exp (4 * C * r * Real.log (r + 2)) = + Real.exp (4 * C * r * Real.log (r + 2)) * 4 by ring] + exact mul_le_mul_of_nonneg_left hexp (Real.exp_pos _).le + +theorem xiJensenEntire_real_eq_riemannPhi_cosh + {r : ℝ} (hr : |r| < 3 / 2) : + xiJensenEntire r = + (16 * ∫ u : ℝ in Set.Ioi 0, + riemannPhi u * Real.cosh (r * u) : ℝ) := by + have hcompleted : + completedRiemannZeta₀ (1 / 2 + (r : ℂ)) = + (4 * ∫ u : ℝ in Set.Ioi 0, + Real.cosh (r * u) * riemannThetaTail u : ℝ) := by + convert completedRiemannZeta₀_real_eq_cosh_theta hr using 1 <;> + push_cast <;> ring + rw [xiJensenEntire, riemannXi, hcompleted] + have hibp := integral_Ioi_cosh_mul_riemannPhi_double_ibp hr + have hcomm : + (∫ u : ℝ in Set.Ioi 0, + riemannPhi u * Real.cosh (r * u)) = + ∫ u : ℝ in Set.Ioi 0, + Real.cosh (r * u) * riemannPhi u := by + apply MeasureTheory.integral_congr_ae + filter_upwards with u + ring + rw [hcomm, hibp] + push_cast + ring + +noncomputable def riemannPhiDensity (u : ℝ) : ENNReal := + ENNReal.ofReal (riemannPhi u) + +noncomputable def riemannPhiMeasure : Measure ℝ := + MeasureTheory.volume.withDensity riemannPhiDensity + +theorem measurable_riemannPhiDensity : Measurable riemannPhiDensity := by + unfold riemannPhiDensity + exact ENNReal.measurable_ofReal.comp continuous_riemannPhi.measurable + +theorem riemannPhiDensity_lt_top : + ∀ᵐ u ∂(MeasureTheory.volume : Measure ℝ), + riemannPhiDensity u < (⊤ : ENNReal) := by + filter_upwards with u + simp [riemannPhiDensity] + +theorem Ioo_subset_interior_integrableExpSet_riemannPhiMeasure : + Set.Ioo (-1 : ℝ) 1 ⊆ interior + (ProbabilityTheory.integrableExpSet id riemannPhiMeasure) := by + apply interior_maximal ?_ isOpen_Ioo + intro r hr + change Integrable (fun u : ℝ ↦ Real.exp (r * id u)) riemannPhiMeasure + rw [riemannPhiMeasure, + MeasureTheory.integrable_withDensity_iff_integrable_smul' + measurable_riemannPhiDensity riemannPhiDensity_lt_top] + have htoReal : + ∀ u : ℝ, (riemannPhiDensity u).toReal = riemannPhi u := by + intro u + simp [riemannPhiDensity, (riemannPhi_pos u).le] + simp_rw [id_eq, htoReal, smul_eq_mul, mul_comm] + simpa only [mul_comm] using + integrable_riemannPhi_mul_exp_of_abs_lt_one (abs_lt.mpr hr) + +theorem zero_mem_interior_integrableExpSet_riemannPhiMeasure : + (0 : ℝ) ∈ interior + (ProbabilityTheory.integrableExpSet id riemannPhiMeasure) := + Ioo_subset_interior_integrableExpSet_riemannPhiMeasure (by norm_num) + +theorem complexMGF_riemannPhiMeasure (z : ℂ) : + ProbabilityTheory.complexMGF id riemannPhiMeasure z = + ∫ u : ℝ, riemannPhi u * Complex.exp (z * u) := by + rw [ProbabilityTheory.complexMGF, riemannPhiMeasure, + integral_withDensity_eq_integral_toReal_smul + measurable_riemannPhiDensity riemannPhiDensity_lt_top] + apply MeasureTheory.integral_congr_ae + filter_upwards with u + simp [riemannPhiDensity, (riemannPhi_pos u).le] + +theorem complexMGF_riemannPhiMeasure_real + {r : ℝ} (hr : |r| < 1) : + ProbabilityTheory.complexMGF id riemannPhiMeasure r = + (2 * ∫ u : ℝ in Set.Ioi 0, + riemannPhi u * Real.cosh (r * u) : ℝ) := by + rw [complexMGF_riemannPhiMeasure] + let fp : ℝ → ℂ := fun u ↦ + riemannPhi u * Complex.exp ((r : ℂ) * u) + let fm : ℝ → ℂ := fun u ↦ + riemannPhi u * Complex.exp (-(r : ℂ) * u) + have hfpReal := integrable_riemannPhi_mul_exp_of_abs_lt_one hr + have hfmReal := integrable_riemannPhi_mul_exp_of_abs_lt_one + (by simpa using hr : |-r| < 1) + have hfp : Integrable fp := by + apply hfpReal.mono' + · dsimp only [fp] + exact ((Complex.continuous_ofReal.comp continuous_riemannPhi).mul + (Complex.continuous_exp.comp (by fun_prop))).aestronglyMeasurable + · filter_upwards with u + dsimp only [fp] + rw [norm_mul, Complex.norm_real, Complex.norm_exp] + simp only [mul_re, ofReal_re, ofReal_im, mul_zero, sub_zero] + rw [Real.norm_eq_abs, abs_of_pos (riemannPhi_pos u)] + have hfm : Integrable fm := by + apply hfmReal.mono' + · dsimp only [fm] + exact ((Complex.continuous_ofReal.comp continuous_riemannPhi).mul + (Complex.continuous_exp.comp (by fun_prop))).aestronglyMeasurable + · filter_upwards with u + dsimp only [fm] + rw [norm_mul, Complex.norm_real, Complex.norm_exp] + simp only [neg_re, mul_re, ofReal_re, ofReal_im, mul_zero, sub_zero] + rw [Real.norm_eq_abs, abs_of_pos (riemannPhi_pos u)] + have hlower : + (∫ u : ℝ in Set.Iic 0, fp u) = + ∫ u : ℝ in Set.Ioi 0, fm u := by + calc + (∫ u : ℝ in Set.Iic 0, fp u) = + ∫ u : ℝ in Set.Ioi 0, fp (-u) := by + simpa using (integral_comp_neg_Ioi 0 fp).symm + _ = ∫ u : ℝ in Set.Ioi 0, fm u := by + apply MeasureTheory.integral_congr_ae + filter_upwards with u + dsimp only [fp, fm] + rw [riemannPhi_even] + push_cast + congr 2 + ring + have hsplit := intervalIntegral.integral_Iic_add_Ioi + (b := 0) hfp.integrableOn hfp.integrableOn + rw [← hsplit, hlower, ← MeasureTheory.integral_add + hfm.integrableOn hfp.integrableOn] + rw [show (∫ u : ℝ in Set.Ioi 0, fm u + fp u) = + ∫ u : ℝ in Set.Ioi 0, + ((2 * riemannPhi u * Real.cosh (r * u) : ℝ) : ℂ) by + apply MeasureTheory.integral_congr_ae + filter_upwards with u + dsimp only [fp, fm] + push_cast + rw [Complex.cosh] + ring] + rw [show + (∫ u : ℝ in Set.Ioi 0, + ((2 * riemannPhi u * Real.cosh (r * u) : ℝ) : ℂ)) = + ((∫ u : ℝ in Set.Ioi 0, + 2 * riemannPhi u * Real.cosh (r * u) : ℝ) : ℂ) from integral_ofReal] + rw [show + (∫ u : ℝ in Set.Ioi 0, + 2 * riemannPhi u * Real.cosh (r * u)) = + 2 * ∫ u : ℝ in Set.Ioi 0, + riemannPhi u * Real.cosh (r * u) by + rw [← MeasureTheory.integral_const_mul] + apply MeasureTheory.integral_congr_ae + filter_upwards with u + ring] + +theorem xiJensenEntire_eq_complexMGF_on_strip : + Set.EqOn xiJensenEntire + (fun z ↦ 8 * ProbabilityTheory.complexMGF id riemannPhiMeasure z) + {z : ℂ | z.re ∈ Set.Ioo (-1 : ℝ) 1} := by + let U : Set ℂ := {z : ℂ | z.re ∈ Set.Ioo (-1 : ℝ) 1} + let H : ℂ → ℂ := fun z ↦ + 8 * ProbabilityTheory.complexMGF id riemannPhiMeasure z + have hUopen : IsOpen U := by + exact isOpen_Ioo.preimage continuous_re + have hUconvex : Convex ℝ U := by + intro x hx y hy a b ha hb hab + change -1 < (a • x + b • y).re ∧ + (a • x + b • y).re < 1 + simp only [Complex.add_re, Complex.smul_re, smul_eq_mul] + change (-1 < x.re ∧ x.re < 1) at hx + change (-1 < y.re ∧ y.re < 1) at hy + by_cases ha0 : a = 0 + · subst a + have hb1 : b = 1 := by linarith + subst b + simpa using hy + · have haPos : 0 < a := lt_of_le_of_ne ha (Ne.symm ha0) + have haxL : a * (-1) < a * x.re := + mul_lt_mul_of_pos_left hx.1 haPos + have haxU : a * x.re < a * 1 := + mul_lt_mul_of_pos_left hx.2 haPos + have hbyL : b * (-1) ≤ b * y.re := + mul_le_mul_of_nonneg_left hy.1.le hb + have hbyU : b * y.re ≤ b * 1 := + mul_le_mul_of_nonneg_left hy.2.le hb + constructor <;> nlinarith + have hXi : AnalyticOnNhd ℂ xiJensenEntire U := + ((analyticOnNhd_univ_iff_differentiable.mpr + differentiable_xiJensenEntire).mono (Set.subset_univ U)) + have hMdiff : + DifferentiableOn ℂ + (ProbabilityTheory.complexMGF id riemannPhiMeasure) U := by + apply ProbabilityTheory.differentiableOn_complexMGF.mono + intro z hz + exact Ioo_subset_interior_integrableExpSet_riemannPhiMeasure hz + have hH : AnalyticOnNhd ℂ H U := by + rw [analyticOnNhd_iff_differentiableOn hUopen] + dsimp only [H] + fun_prop + have hclosure : + (0 : ℂ) ∈ closure + ({z : ℂ | xiJensenEntire z = H z} \ {(0 : ℂ)}) := by + apply mem_closure_of_tendsto + (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℂ)) + filter_upwards [Filter.eventually_ge_atTop 1] with n hn + have hrpos : 0 < (1 : ℝ) / (n + 1) := by positivity + have hrlt : (1 : ℝ) / (n + 1) < 1 := by + rw [div_lt_one (by positivity)] + exact_mod_cast Nat.lt_add_one_iff.mpr hn + constructor + · change xiJensenEntire ((1 : ℂ) / (n + 1)) = + 8 * ProbabilityTheory.complexMGF id riemannPhiMeasure + ((1 : ℂ) / (n + 1)) + have hcast : + ((1 : ℂ) / (n + 1)) = + (((1 : ℝ) / (n + 1) : ℝ) : ℂ) := by + push_cast + rfl + rw [hcast, + xiJensenEntire_real_eq_riemannPhi_cosh + (by rw [abs_of_pos hrpos]; linarith), + complexMGF_riemannPhiMeasure_real + (by rw [abs_of_pos hrpos]; exact hrlt)] + push_cast + ring + · simp only [Set.mem_singleton_iff] + exact div_ne_zero one_ne_zero (by + exact_mod_cast Nat.add_one_ne_zero n) + have heq := hXi.eqOn_of_preconnected_of_mem_closure hH + hUconvex.isPreconnected (show (0 : ℂ) ∈ U by + dsimp only [U] + norm_num) hclosure + simpa only [U, H] using heq + +theorem xiJensenEntire_neg (z : ℂ) : + xiJensenEntire (-z) = xiJensenEntire z := by + have harg : (1 / 2 : ℂ) + -z = 1 - (1 / 2 + z) := by ring + rw [xiJensenEntire, xiJensenEntire, harg, riemannXi_one_sub] + +/-- The exact source-level conjugation proposition for pinned Mathlib's +pole-removed completed zeta. -/ +def CompletedZetaConjugation : Prop := + ∀ s : ℂ, completedRiemannZeta₀ (conj s) = conj (completedRiemannZeta₀ s) + +/-- On the half-plane of absolute convergence, the Dirichlet series for +`riemannZeta` commutes with complex conjugation. -/ +theorem riemannZeta_conj_of_one_lt_re (s : ℂ) (hs : 1 < s.re) : + riemannZeta (conj s) = conj (riemannZeta s) := by + rw [zeta_eq_tsum_one_div_nat_add_one_cpow (by simpa using hs), + zeta_eq_tsum_one_div_nat_add_one_cpow hs, Complex.conj_tsum] + congr 1 + funext n + simp only [map_div₀, map_one] + rw [Complex.cpow_conj] + · simp + · rw [show (n : ℂ) + 1 = ((n + 1 : ℕ) : ℂ) by norm_num, + Complex.natCast_arg] + exact Real.pi_ne_zero.symm + +/-- The completed pole-removed zeta commutes with conjugation on `Re(s) > 1`. +The proof uses Mathlib's exact normalization +`Λ₀(s) = π^(-s/2) Γ(s/2) ζ(s) + 1/s + 1/(1-s)`. -/ +theorem completedRiemannZeta₀_conj_of_one_lt_re (s : ℂ) (hs : 1 < s.re) : + completedRiemannZeta₀ (conj s) = + conj (completedRiemannZeta₀ s) := by + have hs0 : s ≠ 0 := by + intro h + subst s + norm_num at hs + have hcs0 : conj s ≠ 0 := by + intro h + apply hs0 + have := congrArg conj h + simpa using this + have hzeta := riemannZeta_conj_of_one_lt_re s hs + let D : ℂ → ℂ := fun z ↦ + (Real.pi : ℂ) ^ (-z / 2) * Gamma (z / 2) + have hD (z : ℂ) (hz : 0 < z.re) : D z ≠ 0 := by + apply mul_ne_zero + · rw [Complex.cpow_ne_zero_iff] + exact Or.inl (Complex.ofReal_ne_zero.mpr Real.pi_ne_zero) + · exact Gamma_ne_zero_of_re_pos + (by simpa [D] using div_pos hz zero_lt_two) + have hDconj : D (conj s) = conj (D s) := by + dsimp only [D] + rw [map_mul] + congr 1 + · rw [show -(conj s) / 2 = conj (-s / 2) by + simp only [map_div₀, map_neg, Complex.conj_ofNat], + Complex.cpow_conj] + · simp + · rw [Complex.arg_ofReal_of_nonneg Real.pi_nonneg] + exact Real.pi_ne_zero.symm + · rw [← Complex.Gamma_conj] + congr 1 + simp only [map_div₀, Complex.conj_ofNat] + have hformula := + riemannZeta_eq_completedRiemannZeta₀ (s := s) hs0 + have hcformula := + riemannZeta_eq_completedRiemannZeta₀ (s := conj s) hcs0 + have hsolve : + completedRiemannZeta₀ s = + riemannZeta s * D s + 1 / s + 1 / (1 - s) := by + have hmul := (eq_div_iff (hD s (lt_trans zero_lt_one hs))).mp hformula + dsimp only [D] at hmul + linear_combination -hmul + have hcsolve : + completedRiemannZeta₀ (conj s) = + riemannZeta (conj s) * D (conj s) + + 1 / conj s + 1 / (1 - conj s) := by + have hmul := + (eq_div_iff + (hD (conj s) (by simpa using lt_trans zero_lt_one hs))).mp hcformula + dsimp only [D] at hmul + linear_combination -hmul + rw [hcsolve, hsolve, hzeta, hDconj] + simp + +/-- Global conjugation symmetry for pinned Mathlib's +`completedRiemannZeta₀`. Both sides are entire; equality on the open +half-plane `Re(s) > 1` therefore extends by the analytic identity theorem. -/ +theorem completedRiemannZeta₀_conj (s : ℂ) : + completedRiemannZeta₀ (conj s) = + conj (completedRiemannZeta₀ s) := by + let f : ℂ → ℂ := completedRiemannZeta₀ + let g : ℂ → ℂ := conj ∘ f ∘ conj + have hf : Differentiable ℂ f := differentiable_completedZeta₀ + have hg : Differentiable ℂ g := by + intro z + simpa [g] using (hf (conj z)).conj_conj + have hlocal : ∀ z : ℂ, 1 < z.re → f z = g z := by + intro z hz + dsimp only [f, g, Function.comp_apply] + rw [completedRiemannZeta₀_conj_of_one_lt_re z hz, conj_conj] + have hfg : f = g := by + apply AnalyticOnNhd.eq_of_eventuallyEq + ((analyticOnNhd_univ_iff_differentiable).2 hf) + ((analyticOnNhd_univ_iff_differentiable).2 hg) + filter_upwards [ + (isOpen_lt continuous_const continuous_re).mem_nhds + (show (2 : ℂ) ∈ {z : ℂ | 1 < z.re} by norm_num)] with z hz + exact hlocal z hz + simpa only [f, g, Function.comp_apply, conj_conj] using + congrFun hfg (conj s) + +/-- The previously explicit completed-zeta conjugation obligation is +unconditional in the pinned Mathlib environment. -/ +theorem completedZetaConjugation : CompletedZetaConjugation := + completedRiemannZeta₀_conj + +theorem riemannXi_conj_of_completedZetaConjugation + (hconj : CompletedZetaConjugation) (s : ℂ) : + riemannXi (conj s) = conj (riemannXi s) := by + rw [riemannXi, riemannXi, hconj] + simp only [map_div₀, map_add, map_one, map_mul, map_sub, Complex.conj_ofNat] + +theorem xiJensenEntire_conj_of_completedZetaConjugation + (hconj : CompletedZetaConjugation) (z : ℂ) : + xiJensenEntire (conj z) = conj (xiJensenEntire z) := by + rw [xiJensenEntire, xiJensenEntire] + simp only [map_mul, Complex.conj_ofNat] + rw [show (1 / 2 : ℂ) + conj z = conj (1 / 2 + z) by simp [Complex.conj_ofNat], + riemannXi_conj_of_completedZetaConjugation hconj] + +/-- Conjugation symmetry of a complex function forces every derivative at +zero to be real. The proof uses Mathlib's exact derivative rule for +`conj ∘ f ∘ conj` and therefore does not assume a power-series uniqueness +principle. -/ +theorem iteratedDeriv_im_zero_of_conj_symmetry + (f : ℂ → ℂ) (hf : ∀ z, f (conj z) = conj (f z)) (n : ℕ) : + (iteratedDeriv n f 0).im = 0 := by + have hsym : conj ∘ f ∘ conj = f := by + funext z + simp only [Function.comp_apply] + rw [hf] + simp + have hiter : + conj ∘ iteratedDeriv n f ∘ conj = iteratedDeriv n f := by + induction n with + | zero => simpa using hsym + | succ n ih => + have hderiv := congrArg deriv ih + simpa [Nat.succ_eq_add_one, iteratedDeriv_succ] using hderiv + apply Complex.conj_eq_iff_im.mp + simpa [Function.comp_apply] using congrFun hiter 0 + +/-- The complex derivative normalization underlying the classical real +coefficient `γ(n)`: `n! ξ_J^(2n)(0) / (2n)!`. -/ +def xiGammaComplex (n : ℕ) : ℂ := + (n.factorial : ℂ) / ((2 * n).factorial : ℂ) * + iteratedDeriv (2 * n) xiJensenEntire 0 + +theorem iteratedDeriv_xiJensenEntire_eq_riemannPhi_moment (n : ℕ) : + iteratedDeriv n xiJensenEntire 0 = + (8 * ∫ u : ℝ, riemannPhi u * u ^ n : ℝ) := by + let U : Set ℂ := {z : ℂ | z.re ∈ Set.Ioo (-1 : ℝ) 1} + let M : ℂ → ℂ := fun z ↦ + ProbabilityTheory.complexMGF id riemannPhiMeasure z + have heqOn : + Set.EqOn xiJensenEntire (fun z ↦ 8 * M z) U := by + simpa only [U, M] using xiJensenEntire_eq_complexMGF_on_strip + have hUopen : IsOpen U := isOpen_Ioo.preimage continuous_re + have hzero : (0 : ℂ) ∈ U := by + dsimp only [U] + norm_num + have hevent : xiJensenEntire =ᶠ[𝓝 (0 : ℂ)] fun z ↦ 8 * M z := by + filter_upwards [hUopen.mem_nhds hzero] with z hz + exact heqOn hz + have hiter := hevent.iteratedDeriv_eq n + rw [iteratedDeriv_const_mul_field] at hiter + have hmgf := ProbabilityTheory.iteratedDeriv_complexMGF + (X := id) (μ := riemannPhiMeasure) (z := (0 : ℂ)) + zero_mem_interior_integrableExpSet_riemannPhiMeasure n + dsimp only [M] at hiter + rw [hmgf] at hiter + simp only [id_eq, zero_mul, Complex.exp_zero, mul_one] at hiter + rw [riemannPhiMeasure, + integral_withDensity_eq_integral_toReal_smul + measurable_riemannPhiDensity riemannPhiDensity_lt_top] at hiter + have hdensity : + ∀ u : ℝ, (riemannPhiDensity u).toReal = riemannPhi u := by + intro u + simp [riemannPhiDensity, (riemannPhi_pos u).le] + change iteratedDeriv n xiJensenEntire 0 = + 8 * ∫ u : ℝ, ((riemannPhiDensity u).toReal : ℂ) * (u : ℂ) ^ n at hiter + simp_rw [hdensity] at hiter + rw [show + (∫ u : ℝ, (riemannPhi u : ℂ) * (u : ℂ) ^ n) = + ((∫ u : ℝ, riemannPhi u * u ^ n : ℝ) : ℂ) by + calc + (∫ u : ℝ, (riemannPhi u : ℂ) * (u : ℂ) ^ n) = + ∫ u : ℝ, ((riemannPhi u * u ^ n : ℝ) : ℂ) := by + apply MeasureTheory.integral_congr_ae + filter_upwards with u + push_cast + rfl + _ = ((∫ u : ℝ, riemannPhi u * u ^ n : ℝ) : ℂ) := + integral_ofReal] at hiter + push_cast + exact hiter + +/-- Conjugation symmetry implies reality of every normalized xi coefficient. -/ +theorem xiGammaComplex_im_zero_of_completedZetaConjugation + (hconj : CompletedZetaConjugation) (n : ℕ) : + (xiGammaComplex n).im = 0 := by + have hderiv := + iteratedDeriv_im_zero_of_conj_symmetry xiJensenEntire + (xiJensenEntire_conj_of_completedZetaConjugation hconj) (2 * n) + simp [xiGammaComplex, Complex.mul_im, hderiv] + +/-- Every normalized centered xi derivative is real, unconditionally. -/ +theorem xiGammaComplex_im_zero (n : ℕ) : + (xiGammaComplex n).im = 0 := + xiGammaComplex_im_zero_of_completedZetaConjugation + completedZetaConjugation n + +/-- Real xi coefficient sequence, initially defined by taking the real part; +`xiGammaComplex_eq_ofReal` below proves this loses no information. -/ +def xiGamma (n : ℕ) : ℝ := + (xiGammaComplex n).re + +/-- The complex normalized derivative is exactly the scalar extension of the +real xi coefficient sequence. -/ +theorem xiGammaComplex_eq_ofReal (n : ℕ) : + xiGammaComplex n = (xiGamma n : ℂ) := by + apply Complex.ext + · rfl + · simpa using xiGammaComplex_im_zero n + +/-- Evenness of the centered xi function kills every odd derivative at the +center. -/ +theorem iteratedDeriv_xiJensenEntire_odd_zero (n : ℕ) : + iteratedDeriv (2 * n + 1) xiJensenEntire 0 = 0 := by + have hfun : (fun z : ℂ ↦ xiJensenEntire (-z)) = xiJensenEntire := by + funext z + exact xiJensenEntire_neg z + have hder := + congrArg (fun f : ℂ → ℂ ↦ iteratedDeriv (2 * n + 1) f 0) hfun + rw [iteratedDeriv_comp_neg] at hder + norm_num [pow_succ, pow_mul] at hder + simpa only [CharZero.neg_eq_self_iff] using hder + +/-- The even Taylor term at index `2n` is precisely the sourced +`xiGamma n / n!` coefficient. -/ +theorem xiJensenEntire_even_taylor_term (n : ℕ) (z : ℂ) : + ((2 * n).factorial : ℂ)⁻¹ * + iteratedDeriv (2 * n) xiJensenEntire 0 * z ^ (2 * n) = + ((xiGamma n / n.factorial : ℝ) : ℂ) * z ^ (2 * n) := by + push_cast + rw [← xiGammaComplex_eq_ofReal] + unfold xiGammaComplex + have hn : (n.factorial : ℂ) ≠ 0 := by + exact_mod_cast Nat.factorial_ne_zero n + have h2n : ((2 * n).factorial : ℂ) ≠ 0 := by + exact_mod_cast Nat.factorial_ne_zero (2 * n) + field_simp [hn, h2n] + +theorem xiJensenEntire_taylor (z : ℂ) : + ∑' n : ℕ, (n.factorial : ℂ)⁻¹ * + iteratedDeriv n xiJensenEntire 0 * z ^ n = + xiJensenEntire z := by + simpa using + Complex.taylorSeries_eq_of_entire' + differentiable_xiJensenEntire (c := 0) (z := z) + +/-- The centered xi function has the real, even Taylor expansion used in the +Jensen-polynomial literature. -/ +theorem xiJensenEntire_hasSum_xiGamma (z : ℂ) : + HasSum (fun n : ℕ ↦ + ((xiGamma n / n.factorial : ℝ) : ℂ) * z ^ (2 * n)) + (xiJensenEntire z) := by + let F : ℕ → ℂ := fun n ↦ + (n.factorial : ℂ)⁻¹ * + iteratedDeriv n xiJensenEntire 0 * z ^ n + have hfull₀ := + Complex.hasSum_taylorSeries_of_entire + differentiable_xiJensenEntire 0 z + have hfull : HasSum F (xiJensenEntire z) := by + apply hfull₀.congr_fun + intro n + simp only [F, sub_zero, smul_eq_mul] + ring + have heven : Summable (fun n ↦ F (2 * n)) := + hfull.summable.comp_injective + (mul_right_injective₀ (two_ne_zero' ℕ)) + have hodd : HasSum (fun n ↦ F (2 * n + 1)) 0 := by + convert (hasSum_zero : HasSum (fun _ : ℕ ↦ (0 : ℂ)) 0) using 1 + simp [F, iteratedDeriv_xiJensenEntire_odd_zero] + have hall := + heven.hasSum.even_add_odd hodd + have hvalue : ∑' n, F (2 * n) = xiJensenEntire z := by + simpa using (hfull.unique hall).symm + have hgamma : + HasSum (fun n : ℕ ↦ + ((xiGamma n / n.factorial : ℝ) : ℂ) * z ^ (2 * n)) + (∑' n, F (2 * n)) := by + apply heven.hasSum.congr_fun + intro n + simpa [F] using (xiJensenEntire_even_taylor_term n z).symm + rwa [hvalue] at hgamma + +/-- Strict coefficient positivity. -/ +def StrictlyPositive (a : ℕ → ℝ) : Prop := + ∀ n, 0 < a n + +/-- The classical positive-kernel route to coefficient positivity, with the +normalization forced by +`xiJensenEntire z = ∑ gamma(n) z^(2n) / n!`. + +For the standard even extension of Riemann's Fourier kernel `Φ`, the integral +over `ℝ` is twice the usual integral over `[0, ∞)`. Pinned Mathlib defines +`Λ₀` by a modified-theta Mellin kernel (`completedRiemannZeta₀_eq_mellin`) but +does not supply this differentiated-kernel identity, so it remains explicit. -/ +def XiGammaMomentRepresentation : Prop := + ∀ n : ℕ, + xiGamma n = + (8 * n.factorial : ℝ) / (2 * n).factorial * + ∫ t : ℝ, riemannPhi t * t ^ (2 * n) + +theorem xiGamma_momentRepresentation : + XiGammaMomentRepresentation := by + intro n + have hcomplex : + xiGammaComplex n = + (((8 * n.factorial : ℝ) / (2 * n).factorial * + ∫ t : ℝ, riemannPhi t * t ^ (2 * n) : ℝ) : ℂ) := by + rw [xiGammaComplex, + iteratedDeriv_xiJensenEntire_eq_riemannPhi_moment (2 * n)] + push_cast + ring + rw [xiGamma] + have hre := congrArg Complex.re hcomplex + simpa using hre + +/-- The actual positive-moment representation would prove strict positivity, +not merely nonvanishing. -/ +theorem xiGamma_strictlyPositive_of_momentRepresentation + (h : XiGammaMomentRepresentation) : + StrictlyPositive xiGamma := by + intro n + have hint := integrable_riemannPhi_mul_pow (2 * n) + have hformula := h n + have hnonneg : 0 ≤ fun t : ℝ ↦ riemannPhi t * t ^ (2 * n) := by + intro t + exact mul_nonneg (riemannPhi_pos t).le (Even.pow_nonneg (by simp) t) + have hsupp : + Set.Ioo (1 : ℝ) 2 ⊆ + Function.support (fun t : ℝ ↦ riemannPhi t * t ^ (2 * n)) := by + intro t ht + exact mul_ne_zero (ne_of_gt (riemannPhi_pos t)) + (pow_ne_zero _ (ne_of_gt (lt_trans zero_lt_one ht.1))) + have hintegral : + 0 < ∫ t : ℝ, riemannPhi t * t ^ (2 * n) := by + apply (MeasureTheory.integral_pos_iff_support_of_nonneg hnonneg hint).2 + exact ((Measure.measure_Ioo_pos volume).mpr one_lt_two).trans_le + (measure_mono hsupp) + rw [hformula] + exact mul_pos (div_pos (by positivity) (by positivity)) hintegral + +/-- The degree-`d`, shift-`n` Jensen polynomial of a real sequence. -/ +def jensenPolynomial (a : ℕ → ℝ) (d n : ℕ) : ℝ[X] := + ∑ j ∈ Finset.range (d + 1), + Polynomial.monomial j ((d.choose j : ℝ) * a (n + j)) + +theorem coeff_jensenPolynomial (a : ℕ → ℝ) (d n j : ℕ) : + (jensenPolynomial a d n).coeff j = + if j ≤ d then (d.choose j : ℝ) * a (n + j) else 0 := by + classical + rw [jensenPolynomial, Polynomial.finsetSum_coeff] + simp [Polynomial.coeff_monomial, Finset.sum_ite_eq, eq_comm] + +theorem jensenPolynomial_degree_zero (a : ℕ → ℝ) (n : ℕ) : + jensenPolynomial a 0 n = Polynomial.C (a n) := by + classical + norm_num [jensenPolynomial] + +theorem jensenPolynomial_degree_one (a : ℕ → ℝ) (n : ℕ) : + jensenPolynomial a 1 n = + Polynomial.C (a n) + Polynomial.C (a (n + 1)) * Polynomial.X := by + classical + norm_num [jensenPolynomial, Finset.sum_range_succ] + rw [← Polynomial.C_mul_X_eq_monomial] + +theorem jensenPolynomial_degree_two (a : ℕ → ℝ) (n : ℕ) : + jensenPolynomial a 2 n = + Polynomial.C (a n) + + Polynomial.C (2 * a (n + 1)) * Polynomial.X + + Polynomial.C (a (n + 2)) * Polynomial.X ^ 2 := by + classical + norm_num [jensenPolynomial, Finset.sum_range_succ, pow_two] + simp_rw [← Polynomial.C_mul_X_pow_eq_monomial] + rw [Polynomial.C_mul] + ring + +/-- The explicit cubic, useful for coefficient-side checks beyond Turán's +quadratic inequality. -/ +theorem jensenPolynomial_degree_three (a : ℕ → ℝ) (n : ℕ) : + jensenPolynomial a 3 n = + Polynomial.C (a n) + + Polynomial.C (3 * a (n + 1)) * Polynomial.X + + Polynomial.C (3 * a (n + 2)) * Polynomial.X ^ 2 + + Polynomial.C (a (n + 3)) * Polynomial.X ^ 3 := by + classical + norm_num [jensenPolynomial, Finset.sum_range_succ, pow_two] + simp_rw [← Polynomial.C_mul_X_pow_eq_monomial] + simp [pow_two, Polynomial.C_mul, mul_assoc] + +/-- O'Sullivan (2021), equation (3.1), in the shifted Jensen convention: +formal differentiation lowers the degree and raises the shift. -/ +theorem derivative_jensenPolynomial (a : ℕ → ℝ) (d n : ℕ) : + (jensenPolynomial a (d + 1) n).derivative = + Polynomial.C (d + 1 : ℝ) * jensenPolynomial a d (n + 1) := by + ext j + rw [Polynomial.coeff_derivative, coeff_jensenPolynomial] + simp only [Polynomial.coeff_C_mul, coeff_jensenPolynomial] + by_cases hj : j ≤ d + · rw [if_pos hj, if_pos (Nat.succ_le_succ hj)] + rw [show n + (j + 1) = n + 1 + j by omega] + have hchoose : + ((d + 1).choose (j + 1) : ℝ) * (j + 1) = + (d + 1 : ℝ) * d.choose j := by + exact_mod_cast (Nat.add_one_mul_choose_eq d j).symm + calc + ((d + 1).choose (j + 1) : ℝ) * a (n + 1 + j) * (j + 1) = + (((d + 1).choose (j + 1) : ℝ) * (j + 1)) * a (n + 1 + j) := by ring + _ = ((d + 1 : ℝ) * d.choose j) * a (n + 1 + j) := by rw [hchoose] + _ = (d + 1 : ℝ) * ((d.choose j : ℝ) * a (n + 1 + j)) := by ring + · rw [if_neg hj, if_neg (by omega)] + simp + +/-- A real polynomial is hyperbolic when all roots of its complex scalar +extension are real. -/ +def Hyperbolic (p : ℝ[X]) : Prop := + ∀ z : ℂ, (p.map (algebraMap ℝ ℂ)).IsRoot z → + ∃ x : ℝ, z = (x : ℂ) + +theorem hyperbolic_mul {p q : ℝ[X]} + (hp : Hyperbolic p) (hq : Hyperbolic q) : + Hyperbolic (p * q) := by + intro z hz + simp only [Polynomial.IsRoot.def, Polynomial.map_mul, + Polynomial.eval_mul] at hz + exact (mul_eq_zero.mp hz).elim (hp z) (hq z) + +theorem hyperbolic_C_add_C_mul_X (a b : ℝ) (hb : b ≠ 0) : + Hyperbolic (Polynomial.C a + Polynomial.C b * Polynomial.X) := by + intro z hz + simp only [Polynomial.IsRoot.def] at hz + have hz' : (a : ℂ) + (b : ℂ) * z = 0 := by + simpa using hz + have hbc : (b : ℂ) ≠ 0 := by exact_mod_cast hb + have hz_eq : z = -(a : ℂ) / (b : ℂ) := by + apply (eq_div_iff hbc).2 + linear_combination hz' + refine ⟨-a / b, hz_eq.trans ?_⟩ + push_cast + rfl + +/-- The standard discriminant of `A X³ + B X² + C X + D`. -/ +def cubicDiscriminant (A B C D : ℝ) : ℝ := + B ^ 2 * C ^ 2 - 4 * A * C ^ 3 - 4 * B ^ 3 * D - + 27 * A ^ 2 * D ^ 2 + 18 * A * B * C * D + +/-- A real cubic with nonzero leading coefficient and nonnegative standard +discriminant is hyperbolic. If `x + iy` were a nonreal root, direct +elimination gives + +`Δ = -4 y² ((B + 3Ax)² + A²y²)² < 0`, + +contradicting the discriminant hypothesis. -/ +theorem cubic_hyperbolic_of_discriminant_nonnegative + (A B C D : ℝ) (hA : A ≠ 0) + (hdisc : 0 ≤ cubicDiscriminant A B C D) : + Hyperbolic + (Polynomial.C D + Polynomial.C C * Polynomial.X + + Polynomial.C B * Polynomial.X ^ 2 + + Polynomial.C A * Polynomial.X ^ 3) := by + intro z hz + simp only [Polynomial.IsRoot, Polynomial.map_add, Polynomial.map_mul, + Polynomial.map_C, Polynomial.map_X, Polynomial.map_pow, + Polynomial.eval_add, Polynomial.eval_mul, Polynomial.eval_C, + Polynomial.eval_X, Polynomial.eval_pow] at hz + have hre := congrArg Complex.re hz + have him := congrArg Complex.im hz + norm_num [Complex.mul_re, Complex.mul_im, pow_succ, pow_two] at hre him + have hy : z.im = 0 := by + by_contra hy + have himfac : + A * (3 * z.re ^ 2 - z.im ^ 2) + 2 * B * z.re + C = 0 := by + have hfactor : + z.im * + (A * (3 * z.re ^ 2 - z.im ^ 2) + 2 * B * z.re + C) = 0 := by + nlinarith + exact (mul_eq_zero.mp hfactor).resolve_left hy + have hC : + C = -2 * B * z.re - 3 * A * z.re ^ 2 + A * z.im ^ 2 := by + nlinarith + have hD : + D = B * z.re ^ 2 + B * z.im ^ 2 + + 2 * A * z.re ^ 3 + 2 * A * z.re * z.im ^ 2 := by + linear_combination hre - z.re * himfac + let Q : ℝ := + (B + 3 * A * z.re) ^ 2 + A ^ 2 * z.im ^ 2 + have hidentity : + cubicDiscriminant A B C D = -4 * z.im ^ 2 * Q ^ 2 := by + rw [hC, hD] + simp only [cubicDiscriminant, Q] + ring + have hy2 : 0 < z.im ^ 2 := sq_pos_of_ne_zero hy + have hAy2 : 0 < A ^ 2 * z.im ^ 2 := + mul_pos (sq_pos_of_ne_zero hA) hy2 + have hQ : 0 < Q := by + dsimp only [Q] + nlinarith [sq_nonneg (B + 3 * A * z.re)] + have hneg : cubicDiscriminant A B C D < 0 := by + rw [hidentity] + nlinarith [sq_pos_of_pos hQ] + exact (not_lt_of_ge hdisc hneg).elim + exact ⟨z.re, Complex.ext (by simp) (by simpa using hy)⟩ + +/-- The standard cubic discriminant specialized to the degree-three Jensen +polynomial coefficients. -/ +def jensenCubicDiscriminant (a : ℕ → ℝ) (n : ℕ) : ℝ := + cubicDiscriminant + (a (n + 3)) (3 * a (n + 2)) (3 * a (n + 1)) (a n) + +/-- Nonnegative cubic discriminant proves hyperbolicity of the degree-three +Jensen polynomial in the nondegenerate case. -/ +theorem jensenPolynomial_degree_three_hyperbolic + (a : ℕ → ℝ) (n : ℕ) + (hc : a (n + 3) ≠ 0) + (hdisc : 0 ≤ jensenCubicDiscriminant a n) : + Hyperbolic (jensenPolynomial a 3 n) := by + rw [jensenPolynomial_degree_three] + exact cubic_hyperbolic_of_discriminant_nonnegative + (a (n + 3)) (3 * a (n + 2)) (3 * a (n + 1)) (a n) + hc hdisc + +/-- The all-degree/all-shift statement occurring in the sourced +Pólya--Jensen criterion. It is an explicit proof obligation, not a theorem. -/ +def AllJensenHyperbolic (a : ℕ → ℝ) : Prop := + ∀ d n : ℕ, 1 ≤ d → Hyperbolic (jensenPolynomial a d n) + +/-- A finite square of Jensen obligations. The family is nested in `k`, and +each member asks only about positive degrees and shifts at most `k`. -/ +def JensenSquare (a : ℕ → ℝ) (k : ℕ) : Prop := + ∀ d, 1 ≤ d → d ≤ k → ∀ n ≤ k, Hyperbolic (jensenPolynomial a d n) + +/-- All-Jensen hyperbolicity is exactly a nested family of finite square +obligations. This is an unconditional reduction of the infinite quantifier +shape; it does not claim that any square is decidable computationally. -/ +theorem allJensenHyperbolic_iff_jensenSquares (a : ℕ → ℝ) : + AllJensenHyperbolic a ↔ ∀ k, JensenSquare a k := by + constructor + · intro h k d hd _ n _ + exact h d n hd + · intro h d n hd + exact h (max d n) d hd (le_max_left _ _) n (le_max_right _ _) + +theorem jensenSquare_mono (a : ℕ → ℝ) {k l : ℕ} + (hkl : k ≤ l) (h : JensenSquare a l) : + JensenSquare a k := by + intro d hdpos hd n hn + exact h d hdpos (hd.trans hkl) n (hn.trans hkl) + +/-- Removing a constant polynomial factor cannot introduce a nonreal root. -/ +theorem hyperbolic_of_C_mul {c : ℝ} {p : ℝ[X]} + (h : Hyperbolic (Polynomial.C c * p)) : + Hyperbolic p := by + intro z hz + apply h z + simp only [Polynomial.map_mul, Polynomial.map_C, IsRoot.def, + Polynomial.eval_mul, Polynomial.eval_C] + rw [show (p.map (algebraMap ℝ ℂ)).eval z = 0 from hz] + simp + +/-- The zero polynomial is not hyperbolic under the project's root predicate. -/ +theorem zero_not_hyperbolic : ¬ Hyperbolic (0 : ℝ[X]) := by + intro h + obtain ⟨x, hx⟩ := h Complex.I (by simp [Polynomial.IsRoot]) + have him := congrArg Complex.im hx + norm_num at him + +/-- Consequently, derivative closure without a nonzero-derivative hypothesis +is formally false: the constant polynomial `1` is a counterexample. -/ +theorem not_hyperbolicity_preserved_by_every_derivative : + ¬ (∀ p : ℝ[X], Hyperbolic p → Hyperbolic p.derivative) := by + intro h + have hone : Hyperbolic (1 : ℝ[X]) := by + intro z hz + simp [Polynomial.IsRoot] at hz + exact zero_not_hyperbolic (by simpa using h 1 hone) + +/-- The current `Hyperbolic` predicate deliberately excludes the zero +polynomial: every complex number is a root of zero. Thus derivative closure +requires the derivative to be nonzero (the constant polynomial `1` is the +basic counterexample without this hypothesis). + +Pinned Mathlib's Gauss--Lucas theorem gives exactly the required closure for a +nonzero derivative, including repeated roots and arbitrary degree drop. -/ +theorem hyperbolic_derivative {p : ℝ[X]} (hp : Hyperbolic p) + (hp' : p.derivative ≠ 0) : + Hyperbolic p.derivative := by + intro z hz + let P : ℂ[X] := p.map (algebraMap ℝ ℂ) + have hP' : P.derivative ≠ 0 := by + change (p.map (algebraMap ℝ ℂ)).derivative ≠ 0 + rw [Polynomial.derivative_map, + Polynomial.map_ne_zero_iff (FaithfulSMul.algebraMap_injective ℝ ℂ)] + exact hp' + have hPdeg : 0 < P.degree := by + rw [← not_le] + intro hdeg + apply hP' + rw [Polynomial.eq_C_of_degree_le_zero hdeg, Polynomial.derivative_C] + have hzroot : P.derivative.IsRoot z := by + simpa only [P, Polynomial.derivative_map] using hz + have hzset : z ∈ P.derivative.rootSet ℂ := by + rw [Polynomial.mem_rootSet] + exact ⟨hP', by simpa [Polynomial.IsRoot, Polynomial.coe_aeval_eq_eval] using hzroot⟩ + have hroots : P.rootSet ℂ ⊆ {w : ℂ | w.im = 0} := by + intro w hw + rw [Polynomial.mem_rootSet] at hw + have hwroot : (p.map (algebraMap ℝ ℂ)).IsRoot w := by + simpa [P, Polynomial.IsRoot, Polynomial.coe_aeval_eq_eval] using hw.2 + obtain ⟨x, rfl⟩ := hp w hwroot + simp + have hreal : Convex ℝ {w : ℂ | w.im = 0} := by + have h := + (convex_halfSpace_im_le 0).inter (convex_halfSpace_im_ge 0) + convert h using 1 + ext w + simp [le_antisymm_iff] + have hzreal : z ∈ {w : ℂ | w.im = 0} := + convexHull_min hroots hreal + (P.rootSet_derivative_subset_convexHull_rootSet hPdeg hzset) + exact ⟨z.re, Complex.ext (by simp) (by simpa using hzreal)⟩ + +/-- A simple coefficient hypothesis ensuring that no positive-degree Jensen +polynomial degenerates to the zero polynomial. -/ +def PointwiseNonzero (a : ℕ → ℝ) : Prop := + ∀ n, a n ≠ 0 + +/-- The exact nondegeneracy needed by shift propagation. -/ +def NonzeroJensenFamily (a : ℕ → ℝ) : Prop := + ∀ d n : ℕ, 1 ≤ d → jensenPolynomial a d n ≠ 0 + +/-- Exact coefficient-side form of Jensen-family nondegeneracy: every +positive-length coefficient window contains a nonzero entry. -/ +def JensenWindowNonzero (a : ℕ → ℝ) : Prop := + ∀ d n : ℕ, 1 ≤ d → ∃ j ≤ d, a (n + j) ≠ 0 + +/-- A Jensen polynomial is nonzero exactly when its coefficient window is not +identically zero. -/ +theorem nonzeroJensenFamily_iff_windowNonzero (a : ℕ → ℝ) : + NonzeroJensenFamily a ↔ JensenWindowNonzero a := by + constructor + · intro h d n hd + by_contra hwindow + push Not at hwindow + apply h d n hd + ext j + rw [coeff_jensenPolynomial] + by_cases hj : j ≤ d + · rw [if_pos hj, hwindow j hj, mul_zero, Polynomial.coeff_zero] + · rw [if_neg hj, Polynomial.coeff_zero] + · intro h d n hd hzero + obtain ⟨j, hj, haj⟩ := h d n hd + have hcoeff := congrArg (fun p : ℝ[X] ↦ p.coeff j) hzero + rw [coeff_jensenPolynomial, if_pos hj, Polynomial.coeff_zero] at hcoeff + exact haj (by + apply (mul_eq_zero.mp hcoeff).resolve_left + exact_mod_cast (Nat.choose_pos hj).ne') + +/-- The exact window condition has a much simpler equivalent form: two +consecutive coefficients may not both vanish. Thus isolated zero +coefficients do not obstruct Jensen shift propagation. -/ +def NoAdjacentZeros (a : ℕ → ℝ) : Prop := + ∀ n, a n ≠ 0 ∨ a (n + 1) ≠ 0 + +theorem jensenWindowNonzero_iff_noAdjacentZeros (a : ℕ → ℝ) : + JensenWindowNonzero a ↔ NoAdjacentZeros a := by + constructor + · intro h n + obtain ⟨j, hj, haj⟩ := h 1 n (by omega) + interval_cases j + · exact Or.inl (by simpa using haj) + · exact Or.inr (by simpa using haj) + · intro h d n hd + rcases h n with hn | hn + · exact ⟨0, by omega, by simpa using hn⟩ + · exact ⟨1, hd, by simpa using hn⟩ + +/-- Jensen-family nondegeneracy permits isolated zeros and is equivalent to +the absence of adjacent zeros. -/ +theorem nonzeroJensenFamily_iff_noAdjacentZeros (a : ℕ → ℝ) : + NonzeroJensenFamily a ↔ NoAdjacentZeros a := + (nonzeroJensenFamily_iff_windowNonzero a).trans + (jensenWindowNonzero_iff_noAdjacentZeros a) + +theorem jensenPolynomial_ne_zero_of_pointwiseNonzero + {a : ℕ → ℝ} (ha : PointwiseNonzero a) (d n : ℕ) : + jensenPolynomial a d n ≠ 0 := by + intro hzero + have hcoeff := congrArg (fun p : ℝ[X] ↦ p.coeff d) hzero + rw [coeff_jensenPolynomial, if_pos le_rfl, Polynomial.coeff_zero] at hcoeff + simpa using (mul_ne_zero (by simp) (ha (n + d))) hcoeff + +/-- Under the exact Jensen nondegeneracy hypothesis, every shift follows from +the unshifted Jensen family. -/ +theorem allJensenHyperbolic_iff_unshifted_of_nonzeroJensen + (a : ℕ → ℝ) (ha : NonzeroJensenFamily a) : + AllJensenHyperbolic a ↔ + ∀ d : ℕ, 1 ≤ d → Hyperbolic (jensenPolynomial a d 0) := by + constructor + · intro h d hd + exact h d 0 hd + · intro hzero d n hd + induction n generalizing d with + | zero => exact hzero d hd + | succ n ih => + apply hyperbolic_of_C_mul + rw [← derivative_jensenPolynomial] + apply hyperbolic_derivative (ih (d + 1) (by omega)) + rw [derivative_jensenPolynomial] + have hc : Polynomial.C (d + 1 : ℝ) ≠ 0 := + Polynomial.C_ne_zero.mpr (by positivity) + exact mul_ne_zero + hc + (ha d (n + 1) hd) + +/-- Pointwise coefficient nonvanishing is a convenient sufficient condition +for the exact Jensen nondegeneracy hypothesis. -/ +theorem allJensenHyperbolic_iff_unshifted + (a : ℕ → ℝ) (ha : PointwiseNonzero a) : + AllJensenHyperbolic a ↔ + ∀ d : ℕ, 1 ≤ d → Hyperbolic (jensenPolynomial a d 0) := + allJensenHyperbolic_iff_unshifted_of_nonzeroJensen a fun d n _ ↦ + jensenPolynomial_ne_zero_of_pointwiseNonzero ha d n + +/-- The unshifted reduction needs only exact window nondegeneracy, not +pointwise nonvanishing of every coefficient. -/ +theorem allJensenHyperbolic_iff_unshifted_of_windowNonzero + (a : ℕ → ℝ) (ha : JensenWindowNonzero a) : + AllJensenHyperbolic a ↔ + ∀ d : ℕ, 1 ≤ d → Hyperbolic (jensenPolynomial a d 0) := + allJensenHyperbolic_iff_unshifted_of_nonzeroJensen a + ((nonzeroJensenFamily_iff_windowNonzero a).2 ha) + +theorem jensenPolynomial_degree_one_hyperbolic + (a : ℕ → ℝ) (n : ℕ) (h : a (n + 1) ≠ 0) : + Hyperbolic (jensenPolynomial a 1 n) := by + intro z hz + rw [jensenPolynomial_degree_one] at hz + simp only [IsRoot.def] at hz + simp at hz + refine ⟨-a n / a (n + 1), ?_⟩ + have hc : (a (n + 1) : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr h + have hz' : z = -(a n : ℂ) / (a (n + 1) : ℂ) := by + apply (eq_div_iff hc).2 + simpa [mul_comm] using eq_neg_of_add_eq_zero_right hz + rw [hz'] + norm_num + +/-- Evaluation form of the degree-two Jensen polynomial. -/ def jensenQuadratic (a : ℕ → ℝ) (n : ℕ) (x : ℝ) : ℝ := a n + 2 * a (n + 1) * x + a (n + 2) * x ^ 2 +theorem eval_jensenPolynomial_degree_two (a : ℕ → ℝ) (n : ℕ) (x : ℝ) : + (jensenPolynomial a 2 n).eval x = jensenQuadratic a n x := by + rw [jensenPolynomial_degree_two] + simp [jensenQuadratic] + +/-- The Jensen quadratic has the two quadratic-formula roots whenever its +Turán discriminant is nonnegative. This is supporting finite algebra only. -/ theorem jensenQuadratic_has_two_real_roots (a : ℕ → ℝ) (n : ℕ) (hc : a (n + 2) ≠ 0) @@ -30,3 +3493,6226 @@ theorem jensenQuadratic_has_two_real_roots simp only [jensenQuadratic] <;> field_simp <;> nlinarith + +/-- The precise degree-two condition in the nondegenerate case: existence of +two (not necessarily distinct) real roots is equivalent to the Turán +inequality. -/ +theorem jensenQuadratic_has_real_roots_iff + (a : ℕ → ℝ) (n : ℕ) (hc : a (n + 2) ≠ 0) : + (∃ r₁ r₂ : ℝ, + jensenQuadratic a n r₁ = 0 ∧ jensenQuadratic a n r₂ = 0) ↔ + 0 ≤ a (n + 1) ^ 2 - a n * a (n + 2) := by + constructor + · rintro ⟨r, -, hr, -⟩ + by_contra hneg + have hlt : a (n + 1) ^ 2 - a n * a (n + 2) < 0 := lt_of_not_ge hneg + have hsquare : 0 ≤ (a (n + 2) * r + a (n + 1)) ^ 2 := sq_nonneg _ + have hid : + (a (n + 2) * r + a (n + 1)) ^ 2 = + a (n + 1) ^ 2 - a n * a (n + 2) := by + calc + (a (n + 2) * r + a (n + 1)) ^ 2 = + a (n + 2) * jensenQuadratic a n r + + (a (n + 1) ^ 2 - a n * a (n + 2)) := by + simp only [jensenQuadratic] + ring + _ = a (n + 1) ^ 2 - a n * a (n + 2) := by rw [hr]; ring + rw [hid] at hsquare + exact (not_lt_of_ge hsquare hlt).elim + · intro hdisc + obtain ⟨h₁, h₂⟩ := jensenQuadratic_has_two_real_roots a n hc hdisc + exact ⟨_, _, h₁, h₂⟩ + +/-- The nonnegative Turán discriminant makes the degree-two Jensen polynomial +hyperbolic (all of its complex roots are real). -/ +theorem jensenPolynomial_degree_two_hyperbolic + (a : ℕ → ℝ) (n : ℕ) + (hc : a (n + 2) ≠ 0) + (hdisc : 0 ≤ a (n + 1) ^ 2 - a n * a (n + 2)) : + Hyperbolic (jensenPolynomial a 2 n) := by + intro z hz + rw [jensenPolynomial_degree_two] at hz + simp only [IsRoot.def] at hz + simp at hz + have hre := congrArg Complex.re hz + have him := congrArg Complex.im hz + norm_num [Complex.mul_re, Complex.mul_im, pow_two] at hre him + have hy : z.im = 0 := by + by_contra hy + have hy2 : 0 < z.im ^ 2 := sq_pos_of_ne_zero hy + have hx : a (n + 2) * z.re + a (n + 1) = 0 := by + have hfactor : + 2 * z.im * (a (n + 2) * z.re + a (n + 1)) = 0 := by + nlinarith + exact (mul_eq_zero.mp hfactor).resolve_left (mul_ne_zero (by norm_num) hy) + have hxsq : (a (n + 2) * z.re + a (n + 1)) ^ 2 = 0 := by rw [hx]; norm_num + have hscaled : + a (n + 2) * + (a n + 2 * a (n + 1) * z.re + + a (n + 2) * (z.re * z.re - z.im * z.im)) = 0 := by + rw [hre, mul_zero] + nlinarith [hxsq, sq_pos_of_ne_zero hc] + exact ⟨z.re, Complex.ext (by simp) (by simpa using hy)⟩ + +/-- The coefficient-side order-two condition: strict positivity supplies the +nondegenerate leading coefficient, while log-concavity is exactly Turán's +inequality. -/ +def LogConcave (a : ℕ → ℝ) : Prop := + ∀ n, a n * a (n + 2) ≤ a (n + 1) ^ 2 + +/-- The lower-triangular Toeplitz matrix attached to a one-sided sequence. +This is the convention used for Pólya-frequency sequences. -/ +def toeplitzMatrix (a : ℕ → ℝ) : Matrix ℕ ℕ ℝ := + fun i j ↦ if j ≤ i then a (i - j) else 0 + +/-- All finite minors of the one-sided Toeplitz matrix are nonnegative. +Injectivity makes `f` and `g` honest choices of rows and columns. -/ +def ToeplitzTotallyNonnegative (a : ℕ → ℝ) : Prop := + ∀ k : ℕ, ∀ f g : Fin k → ℕ, Function.Injective f → + Function.Injective g → + 0 ≤ ((toeplitzMatrix a).submatrix f g).det + +/-- Pólya-frequency condition in its all-minor form. -/ +abbrev PolyaFrequency := ToeplitzTotallyNonnegative + +/-- Order-one Toeplitz minors show that every Pólya-frequency sequence is +coefficientwise nonnegative. -/ +theorem toeplitzTotallyNonnegative_nonnegative + {a : ℕ → ℝ} (h : ToeplitzTotallyNonnegative a) : + ∀ n, 0 ≤ a n := by + intro n + have hn := h 1 (fun _ ↦ n) (fun _ ↦ 0) + (fun _ _ _ ↦ Subsingleton.elim _ _) + (fun _ _ _ ↦ Subsingleton.elim _ _) + simpa [toeplitzMatrix, Matrix.det_fin_one] using hn + +/-- Contiguous order-two Toeplitz minors give ordinary log-concavity. +This is only the first nontrivial layer of the all-minor PF condition. -/ +theorem toeplitzTotallyNonnegative_logConcave + {a : ℕ → ℝ} (h : ToeplitzTotallyNonnegative a) : + LogConcave a := by + intro n + let f : Fin 2 → ℕ := fun i ↦ n + 1 + i + let g : Fin 2 → ℕ := fun i ↦ i + have hf : Function.Injective f := by + intro i j hij + apply Fin.ext + exact Nat.add_left_cancel hij + have hg : Function.Injective g := fun _ _ hfg ↦ Fin.ext hfg + have hminor := h 2 f g hf hg + simpa [toeplitzMatrix, Matrix.det_fin_two, f, g, pow_two] using hminor + +/-- Strict positivity alone does not imply even the first nontrivial +Toeplitz/PF condition. -/ +def positiveNonPFSequence (n : ℕ) : ℝ := + if n = 2 then 2 else 1 + +theorem positiveNonPFSequence_strictlyPositive : + StrictlyPositive positiveNonPFSequence := by + intro n + simp only [positiveNonPFSequence] + split_ifs <;> norm_num + +theorem positiveNonPFSequence_not_logConcave : + ¬ LogConcave positiveNonPFSequence := by + intro h + have h0 := h 0 + norm_num [positiveNonPFSequence] at h0 + +theorem positiveNonPFSequence_not_polyaFrequency : + ¬ PolyaFrequency positiveNonPFSequence := by + intro h + exact positiveNonPFSequence_not_logConcave + (toeplitzTotallyNonnegative_logConcave h) + +/-- Extend the coefficient list of a Jensen polynomial by zeros. -/ +def jensenCoefficientSequence (a : ℕ → ℝ) (d n j : ℕ) : ℝ := + if j ≤ d then (d.choose j : ℝ) * a (n + j) else 0 + +/-- A finite coefficient list viewed as a polynomial. -/ +def finiteCoefficientPolynomial (b : ℕ → ℝ) (d : ℕ) : ℝ[X] := + ∑ j ∈ Finset.range (d + 1), Polynomial.monomial j (b j) + +theorem finiteCoefficientPolynomial_jensenCoefficientSequence + (a : ℕ → ℝ) (d n : ℕ) : + finiteCoefficientPolynomial (jensenCoefficientSequence a d n) d = + jensenPolynomial a d n := by + classical + rw [finiteCoefficientPolynomial, jensenPolynomial] + apply Finset.sum_congr rfl + intro j hj + rw [jensenCoefficientSequence, if_pos] + exact Nat.le_of_lt_succ (Finset.mem_range.mp hj) + +/-- PF/all-minor condition for one Jensen coefficient row. -/ +def JensenPolyaFrequency (a : ℕ → ℝ) (d n : ℕ) : Prop := + PolyaFrequency (jensenCoefficientSequence a d n) + +def AllJensenPolyaFrequency (a : ℕ → ℝ) : Prop := + ∀ d n : ℕ, 1 ≤ d → JensenPolyaFrequency a d n + +/-- Exact finite Aissen--Schoenberg--Whitney bridge needed by the PF route. +It is intentionally an explicit proposition: pinned Mathlib has determinants +and polynomial roots, but no theorem identifying finite PF sequences with +polynomials whose roots are all real and nonpositive. -/ +def FinitePolyaFrequencyHyperbolicity : Prop := + ∀ (b : ℕ → ℝ) (d : ℕ), + (∀ j, d < j → b j = 0) → + PolyaFrequency b → + finiteCoefficientPolynomial b d ≠ 0 → + Hyperbolic (finiteCoefficientPolynomial b d) + +/-- Stronger finite-ASW conclusion: every complex root is represented by a +nonpositive real number. -/ +def NonpositiveRooted (p : ℝ[X]) : Prop := + ∀ z : ℂ, (p.map (algebraMap ℝ ℂ)).IsRoot z → + ∃ x : ℝ, x ≤ 0 ∧ z = (x : ℂ) + +theorem nonpositiveRooted_hyperbolic {p : ℝ[X]} + (h : NonpositiveRooted p) : + Hyperbolic p := by + intro z hz + obtain ⟨x, -, hx⟩ := h z hz + exact ⟨x, hx⟩ + +theorem nonpositiveRooted_C {c : ℝ} (hc : c ≠ 0) : + NonpositiveRooted (Polynomial.C c) := by + intro z hz + simp [Polynomial.IsRoot, hc] at hz + +theorem nonpositiveRooted_X : + NonpositiveRooted (Polynomial.X : ℝ[X]) := by + intro z hz + simp [Polynomial.IsRoot] at hz + exact ⟨0, le_rfl, hz⟩ + +theorem nonpositiveRooted_mul {p q : ℝ[X]} + (hp : NonpositiveRooted p) (hq : NonpositiveRooted q) : + NonpositiveRooted (p * q) := by + intro z hz + simp only [Polynomial.IsRoot, Polynomial.map_mul, + Polynomial.eval_mul] at hz + rcases mul_eq_zero.mp hz with hz | hz + · exact hp z (by simpa [Polynomial.IsRoot] using hz) + · exact hq z (by simpa [Polynomial.IsRoot] using hz) + +theorem nonpositiveRooted_one_add_inv_mul_X + {r : ℝ} (hr : 0 < r) : + NonpositiveRooted + (Polynomial.C 1 + Polynomial.C r⁻¹ * Polynomial.X) := by + intro z hz + simp only [Polynomial.IsRoot, Polynomial.map_add, Polynomial.map_mul, + Polynomial.map_C, Polynomial.map_X, Polynomial.eval_add, + Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_X] at hz + refine ⟨-r, by linarith, ?_⟩ + norm_num at hz + have hmul : + (r : ℂ)⁻¹ * z = -(1 : ℂ) := by + exact eq_neg_of_add_eq_zero_right hz + calc + z = (r : ℂ) * ((r : ℂ)⁻¹ * z) := by + rw [← mul_assoc] + norm_num [hr.ne'] + _ = (r : ℂ) * (-(1 : ℂ)) := by rw [hmul] + _ = ((-r : ℝ) : ℂ) := by push_cast; ring + +/-- Exact finite Aissen--Schoenberg--Whitney statement, including internal and +endpoint zero cases through finite support and an explicit nonzero-polynomial +hypothesis. The reverse direction is total nonnegativity, not merely +coefficient log-concavity. -/ +def FiniteAissenSchoenbergWhitney : Prop := + ∀ (b : ℕ → ℝ) (d : ℕ), + (∀ j, d < j → b j = 0) → + finiteCoefficientPolynomial b d ≠ 0 → + (PolyaFrequency b ↔ + NonpositiveRooted (finiteCoefficientPolynomial b d)) + +theorem FiniteAissenSchoenbergWhitney.toHyperbolicity + (hASW : FiniteAissenSchoenbergWhitney) : + FinitePolyaFrequencyHyperbolicity := by + intro b d hsupport hpf hne + exact nonpositiveRooted_hyperbolic + ((hASW b d hsupport hne).mp hpf) + +theorem finiteCoefficientPolynomial_degree_zero (b : ℕ → ℝ) : + finiteCoefficientPolynomial b 0 = Polynomial.C (b 0) := by + classical + norm_num [finiteCoefficientPolynomial] + +theorem finiteCoefficientPolynomial_degree_one (b : ℕ → ℝ) : + finiteCoefficientPolynomial b 1 = + Polynomial.C (b 0) + Polynomial.C (b 1) * Polynomial.X := by + classical + norm_num [finiteCoefficientPolynomial, Finset.sum_range_succ] + rw [← Polynomial.C_mul_X_eq_monomial] + +theorem finiteCoefficientPolynomial_degree_two (b : ℕ → ℝ) : + finiteCoefficientPolynomial b 2 = + Polynomial.C (b 0) + Polynomial.C (b 1) * Polynomial.X + + Polynomial.C (b 2) * Polynomial.X ^ 2 := by + classical + norm_num [finiteCoefficientPolynomial, Finset.sum_range_succ] + rw [← Polynomial.C_mul_X_eq_monomial] + rw [Polynomial.C_mul_X_pow_eq_monomial] + +theorem finiteCoefficientPolynomial_degree_three (b : ℕ → ℝ) : + finiteCoefficientPolynomial b 3 = + Polynomial.C (b 0) + Polynomial.C (b 1) * Polynomial.X + + Polynomial.C (b 2) * Polynomial.X ^ 2 + + Polynomial.C (b 3) * Polynomial.X ^ 3 := by + classical + norm_num [finiteCoefficientPolynomial, Finset.sum_range_succ] + rw [← Polynomial.C_mul_X_eq_monomial] + rw [Polynomial.C_mul_X_pow_eq_monomial] + rw [Polynomial.C_mul_X_pow_eq_monomial] + +/-- The sharp quadratic coefficient condition; the factor `4`, rather than +ordinary log-concavity's factor `1`, is exactly the discriminant threshold. -/ +def QuadraticASWCertificate (b : ℕ → ℝ) : Prop := + 0 < b 0 ∧ 0 ≤ b 1 ∧ 0 < b 2 ∧ 4 * b 0 * b 2 ≤ b 1 ^ 2 + +/-- The coefficient signs, contiguous order-two minor, and leading +order-three Toeplitz minor commonly checked before the full ASW condition. -/ +def SelectedQuadraticToeplitzMinorConditions (b : ℕ → ℝ) : Prop := + 0 ≤ b 0 ∧ 0 ≤ b 1 ∧ 0 ≤ b 2 ∧ + b 0 * b 2 ≤ b 1 ^ 2 ∧ + 0 ≤ b 1 ^ 3 - 2 * b 0 * b 1 * b 2 + +/-- A finite-support sequence satisfying the selected minors but missing the +sharp factor-four discriminant bound. -/ +def selectedMinorCounterexample (n : ℕ) : ℝ := + if n = 0 then 1 else if n = 1 then 3 / 2 else if n = 2 then 1 else 0 + +theorem selectedMinorCounterexample_conditions : + SelectedQuadraticToeplitzMinorConditions selectedMinorCounterexample := by + norm_num [SelectedQuadraticToeplitzMinorConditions, + selectedMinorCounterexample] + +theorem selectedMinorCounterexample_not_sharp : + ¬ 4 * selectedMinorCounterexample 0 * selectedMinorCounterexample 2 ≤ + selectedMinorCounterexample 1 ^ 2 := by + norm_num [selectedMinorCounterexample] + +theorem selected_quadratic_minors_do_not_imply_factor_four : + ¬ (∀ b : ℕ → ℝ, SelectedQuadraticToeplitzMinorConditions b → + 4 * b 0 * b 2 ≤ b 1 ^ 2) := by + intro h + exact selectedMinorCounterexample_not_sharp + (h selectedMinorCounterexample selectedMinorCounterexample_conditions) + +/-- Constant-diagonal tridiagonal matrix whose determinant is the normalized +continuant attached to a quadratic Toeplitz sequence. -/ +def toeplitzContinuantMatrix (a p q : ℝ) (k : ℕ) : + Matrix (Fin k) (Fin k) ℝ := + fun i j ↦ + if i = j then a + else if (i : ℕ) + 1 = j then p + else if (j : ℕ) + 1 = i then q + else 0 + +theorem toeplitzContinuantMatrix_drop_first + (a p q : ℝ) (k : ℕ) : + (toeplitzContinuantMatrix a p q (k + 1)).submatrix + Fin.succ Fin.succ = + toeplitzContinuantMatrix a p q k := by + ext i j + simp [toeplitzContinuantMatrix, Fin.ext_iff] + +theorem toeplitzContinuantMatrix_skip_second_drop_first + (a p q : ℝ) (k : ℕ) : + (toeplitzContinuantMatrix a p q (k + 2)).submatrix + (Fin.succ ∘ Fin.succ) (Fin.succAbove 1 ∘ Fin.succ) = + toeplitzContinuantMatrix a p q k := by + ext i j + simp [toeplitzContinuantMatrix, Fin.ext_iff, Function.comp_apply] + +theorem toeplitzContinuantMatrix_skip_second_det + (a p q : ℝ) (k : ℕ) : + ((toeplitzContinuantMatrix a p q (k + 2)).submatrix + Fin.succ (Fin.succAbove 1)).det = + q * (toeplitzContinuantMatrix a p q k).det := by + rw [Matrix.det_succ_column_zero, Fin.sum_univ_succ] + simp [toeplitzContinuantMatrix, Fin.ext_iff, + toeplitzContinuantMatrix_skip_second_drop_first] + +theorem toeplitzContinuantMatrix_det_recurrence + (a p q : ℝ) (k : ℕ) : + (toeplitzContinuantMatrix a p q (k + 2)).det = + a * (toeplitzContinuantMatrix a p q (k + 1)).det - + p * q * (toeplitzContinuantMatrix a p q k).det := by + rw [Matrix.det_succ_row_zero, Fin.sum_univ_succ, Fin.sum_univ_succ] + simp [toeplitzContinuantMatrix, toeplitzContinuantMatrix_drop_first, + toeplitzContinuantMatrix_skip_second_det, Fin.ext_iff] + ring + +/-- The contiguous Toeplitz minor whose determinant is the quadratic +continuant: rows `1, ..., k` and columns `0, ..., k - 1`. -/ +def quadraticToeplitzShiftMinor (b : ℕ → ℝ) (k : ℕ) : ℝ := + ((toeplitzMatrix b).submatrix + (fun i : Fin k ↦ (i : ℕ) + 1) + (fun j : Fin k ↦ (j : ℕ))).det + +theorem quadraticToeplitzShiftMinor_eq_continuantMatrix_det + (b : ℕ → ℝ) (hsupport : ∀ n, 3 ≤ n → b n = 0) (k : ℕ) : + quadraticToeplitzShiftMinor b k = + (toeplitzContinuantMatrix (b 1) (b 0) (b 2) k).det := by + apply congrArg Matrix.det + ext i j + simp only [Matrix.submatrix_apply, toeplitzMatrix, + toeplitzContinuantMatrix] + by_cases hle : (j : ℕ) ≤ (i : ℕ) + 1 + · rw [if_pos hle] + by_cases heq : i = j + · rw [if_pos heq] + congr 1 + omega + · rw [if_neg heq] + by_cases hsup : (i : ℕ) + 1 = (j : ℕ) + · rw [if_pos hsup] + congr 1 + omega + · rw [if_neg hsup] + by_cases hsub : (j : ℕ) + 1 = (i : ℕ) + · rw [if_pos hsub] + congr 1 + omega + · rw [if_neg hsub] + exact hsupport _ (by omega) + · rw [if_neg hle] + rw [if_neg (by intro h; subst j; omega)] + rw [if_neg (by omega), if_neg (by omega)] + +theorem quadraticToeplitzShiftMinor_nonnegative_of_all_minors + {b : ℕ → ℝ} (hpf : PolyaFrequency b) (k : ℕ) : + 0 ≤ quadraticToeplitzShiftMinor b k := by + apply hpf k + · intro i j hij + apply Fin.ext + exact Nat.add_right_cancel hij + · intro i j hij + apply Fin.ext + exact hij + +theorem quadraticToeplitzShiftMinor_zero (b : ℕ → ℝ) : + quadraticToeplitzShiftMinor b 0 = 1 := by + simp [quadraticToeplitzShiftMinor] + +theorem quadraticToeplitzShiftMinor_one (b : ℕ → ℝ) : + quadraticToeplitzShiftMinor b 1 = b 1 := by + simp [quadraticToeplitzShiftMinor, toeplitzMatrix] + +theorem quadraticToeplitzShiftMinor_two (b : ℕ → ℝ) : + quadraticToeplitzShiftMinor b 2 = b 1 ^ 2 - b 0 * b 2 := by + simp [quadraticToeplitzShiftMinor, toeplitzMatrix, Matrix.det_fin_two] + ring + +theorem quadraticToeplitzShiftMinor_three + (b : ℕ → ℝ) (hsupport : ∀ n, 3 ≤ n → b n = 0) : + quadraticToeplitzShiftMinor b 3 = + b 1 ^ 3 - 2 * b 0 * b 1 * b 2 := by + rw [quadraticToeplitzShiftMinor, Matrix.det_fin_three] + simp [toeplitzMatrix, hsupport 3 (le_refl 3)] + ring + +/-- Exact determinant principle still needed for degree-two ASW. Under +quadratic support, nonnegativity of the whole unbounded family of shifted +Toeplitz continuants must force the discriminant's factor `4`. The previous +counterexample shows that no replacement by the displayed minors of orders +at most three is valid. -/ +def QuadraticToeplitzDeterminantPrinciple : Prop := + ∀ b : ℕ → ℝ, + (∀ n, 3 ≤ n → b n = 0) → + (∀ k, 0 ≤ quadraticToeplitzShiftMinor b k) → + 4 * b 0 * b 2 ≤ b 1 ^ 2 + +/-- Exact algebraic determinant recurrence needed to turn the unbounded +Toeplitz-minor family into a second-order continuant. Mathlib currently has +row/column Laplace expansion, but no packaged tridiagonal determinant theorem. -/ +def QuadraticToeplitzContinuantRecurrence : Prop := + ∀ (b : ℕ → ℝ), (∀ n, 3 ≤ n → b n = 0) → ∀ k, + quadraticToeplitzShiftMinor b (k + 2) = + b 1 * quadraticToeplitzShiftMinor b (k + 1) - + b 0 * b 2 * quadraticToeplitzShiftMinor b k + +theorem quadraticToeplitzContinuantRecurrence : + QuadraticToeplitzContinuantRecurrence := by + intro b hsupport k + rw [quadraticToeplitzShiftMinor_eq_continuantMatrix_det b hsupport, + quadraticToeplitzShiftMinor_eq_continuantMatrix_det b hsupport, + quadraticToeplitzShiftMinor_eq_continuantMatrix_det b hsupport] + exact toeplitzContinuantMatrix_det_recurrence (b 1) (b 0) (b 2) k + +/-- Exact oscillation lemma needed after the determinant recurrence: a +nonnegative solution of the continuant recurrence cannot remain nonnegative +when its characteristic roots are nonreal. -/ +def QuadraticContinuantOscillationPrinciple : Prop := + ∀ (a c : ℝ) (D : ℕ → ℝ), + 0 < c → + D 0 = 1 → + D 1 = a → + (∀ k, D (k + 2) = a * D (k + 1) - c * D k) → + (∀ k, 0 ≤ D k) → + 4 * c ≤ a ^ 2 + +theorem quadraticContinuantOscillationPrinciple : + QuadraticContinuantOscillationPrinciple := by + intro a c D hc hD0 hD1 hrec hnonneg + have hD2 : D 2 = a ^ 2 - c := by + rw [show 2 = 0 + 2 by omega, hrec 0, hD0, hD1] + ring + have ha0 : 0 ≤ a := by simpa [hD1] using hnonneg 1 + have ha : 0 < a := by + have : c ≤ a ^ 2 := by + have := hnonneg 2 + rw [hD2] at this + linarith + nlinarith + have hDpos : ∀ n, 0 < D n := by + intro n + induction n using Nat.twoStepInduction with + | zero => simpa [hD0] + | one => simpa [hD1] + | more n hn hn1 => + have hn2 := hnonneg (n + 2) + rcases hn2.eq_or_lt with hz | hp + · have hn3 := hnonneg (n + 3) + have hr := hrec (n + 1) + rw [show n + 1 + 2 = n + 3 by omega, + show n + 1 + 1 = n + 2 by omega, ← hz] at hr + nlinarith + · exact hp + let r : ℕ → ℝ := fun n ↦ D (n + 1) / D n + have hrpos (n : ℕ) : 0 < r n := + div_pos (hDpos (n + 1)) (hDpos n) + have hrzero : r 0 = a := by + dsimp only [r] + rw [hD0, hD1, div_one] + have hrrec (n : ℕ) : r (n + 1) = a - c / r n := by + dsimp only [r] + rw [hrec n] + field_simp [ne_of_gt (hDpos n), ne_of_gt (hDpos (n + 1))] + have hrle (n : ℕ) : r n ≤ a := by + cases n with + | zero => rw [hrzero] + | succ n => + rw [hrrec n] + exact sub_le_self _ (div_nonneg hc.le (hrpos n).le) + by_contra hsharp + have hbad : a ^ 2 < 4 * c := lt_of_not_ge hsharp + let δ : ℝ := c - a ^ 2 / 4 + have hδ : 0 < δ := by + dsimp only [δ] + nlinarith + have hdecrease (n : ℕ) : r (n + 1) ≤ r n - δ / a := by + have hquad : δ ≤ r n ^ 2 - a * r n + c := by + dsimp only [δ] + nlinarith [sq_nonneg (r n - a / 2)] + have hratio : δ / a ≤ + (r n ^ 2 - a * r n + c) / r n := by + apply (div_le_div_iff₀ ha (hrpos n)).mpr + nlinarith [hrle n] + rw [hrrec n] + have hid : + a - c / r n = + r n - (r n ^ 2 - a * r n + c) / r n := by + field_simp [ne_of_gt (hrpos n)] + ring + rw [hid] + linarith + have hlinear (n : ℕ) : r n ≤ a - n * (δ / a) := by + induction n with + | zero => + simp only [Nat.cast_zero, zero_mul, sub_zero] + exact hrle 0 + | succ n ih => + rw [Nat.cast_add, Nat.cast_one, add_mul] + have := hdecrease n + linarith + obtain ⟨n, hn⟩ := exists_nat_gt (a / (δ / a)) + have hδa : 0 < δ / a := div_pos hδ ha + have hn' : a < n * (δ / a) := by + apply (div_lt_iff₀ hδa).mp + simpa [div_div] using hn + have := hlinear n + nlinarith [hrpos n] + +theorem quadraticToeplitzDeterminantPrinciple_of_recurrence_oscillation + (hrec : QuadraticToeplitzContinuantRecurrence) + (hosc : QuadraticContinuantOscillationPrinciple) : + QuadraticToeplitzDeterminantPrinciple := by + intro b hsupport hnonneg + by_cases hc : 0 < b 0 * b 2 + · have hbound := hosc (b 1) (b 0 * b 2) + (quadraticToeplitzShiftMinor b) hc + (quadraticToeplitzShiftMinor_zero b) + (quadraticToeplitzShiftMinor_one b) + (hrec b hsupport) hnonneg + nlinarith + · have hc' : b 0 * b 2 ≤ 0 := le_of_not_gt hc + nlinarith [sq_nonneg (b 1)] + +theorem quadraticToeplitzDeterminantPrinciple : + QuadraticToeplitzDeterminantPrinciple := + quadraticToeplitzDeterminantPrinciple_of_recurrence_oscillation + quadraticToeplitzContinuantRecurrence + quadraticContinuantOscillationPrinciple + +/-- Degree-two ASW's root conclusion from its sharp coefficient certificate. +Deriving the factor-four inequality from all Toeplitz minors is the remaining +infinite-minor step; no fixed minor order implies it. -/ +theorem finiteASW_degree_two_of_certificate + (b : ℕ → ℝ) (hcert : QuadraticASWCertificate b) : + NonpositiveRooted (finiteCoefficientPolynomial b 2) := by + let a : ℕ → ℝ := fun n ↦ + if n = 0 then b 0 else if n = 1 then b 1 / 2 else b 2 + have ha0 : a 0 = b 0 := by simp [a] + have ha1 : a 1 = b 1 / 2 := by simp [a] + have ha2 : a 2 = b 2 := by simp [a] + have hpoly : + finiteCoefficientPolynomial b 2 = jensenPolynomial a 2 0 := by + rw [finiteCoefficientPolynomial_degree_two, jensenPolynomial_degree_two] + simp only [ha0, ha1, ha2] + ring_nf + have hdisc : 0 ≤ a 1 ^ 2 - a 0 * a 2 := by + rw [ha0, ha1, ha2] + nlinarith [hcert.2.2.2] + have hhyp : Hyperbolic (finiteCoefficientPolynomial b 2) := by + rw [hpoly] + exact jensenPolynomial_degree_two_hyperbolic a 0 + (by simpa [ha2] using hcert.2.2.1.ne') hdisc + intro z hz + obtain ⟨r, hr⟩ := hhyp z hz + refine ⟨r, ?_, hr⟩ + have heval : + (b 0 : ℂ) + b 1 * (r : ℂ) + b 2 * (r : ℂ) ^ 2 = 0 := by + rw [finiteCoefficientPolynomial_degree_two] at hz + simpa [Polynomial.IsRoot, hr] using hz + have hre : b 0 + b 1 * r + b 2 * r ^ 2 = 0 := by + exact_mod_cast heval + by_contra hrpos + have hr0 : 0 < r := lt_of_not_ge hrpos + have ht1 : 0 ≤ b 1 * r := mul_nonneg hcert.2.1 hr0.le + have ht2 : 0 ≤ b 2 * r ^ 2 := + mul_nonneg hcert.2.2.1.le (sq_nonneg r) + nlinarith [hcert.1] + +/-- PF supplies the sign conditions in the degree-two certificate. The only +additional obligation is the sharp discriminant bound. -/ +theorem finiteASW_degree_two_of_sharp_bound + (b : ℕ → ℝ) (hpf : PolyaFrequency b) + (hb0 : 0 < b 0) (hb2 : 0 < b 2) + (hsharp : 4 * b 0 * b 2 ≤ b 1 ^ 2) : + NonpositiveRooted (finiteCoefficientPolynomial b 2) := by + apply finiteASW_degree_two_of_certificate b + exact ⟨hb0, toeplitzTotallyNonnegative_nonnegative hpf 1, hb2, hsharp⟩ + +/-- Full all-minor degree-two ASW, reduced to the exact unbounded continuant +determinant principle rather than to any insufficient finite list of minors. -/ +theorem finiteASW_degree_two_of_all_minors + (hdet : QuadraticToeplitzDeterminantPrinciple) + (b : ℕ → ℝ) (hsupport : ∀ n, 3 ≤ n → b n = 0) + (hpf : PolyaFrequency b) (hb0 : 0 < b 0) (hb2 : 0 < b 2) : + NonpositiveRooted (finiteCoefficientPolynomial b 2) := by + apply finiteASW_degree_two_of_sharp_bound b hpf hb0 hb2 + exact hdet b hsupport + (quadraticToeplitzShiftMinor_nonnegative_of_all_minors hpf) + +theorem finiteASW_degree_two + (b : ℕ → ℝ) (hsupport : ∀ n, 3 ≤ n → b n = 0) + (hpf : PolyaFrequency b) (hb0 : 0 < b 0) (hb2 : 0 < b 2) : + NonpositiveRooted (finiteCoefficientPolynomial b 2) := + finiteASW_degree_two_of_all_minors + quadraticToeplitzDeterminantPrinciple b hsupport hpf hb0 hb2 + +/-- Exact cubic all-minor consequence still missing from pinned Mathlib. +Unlike degree two, one shifted continuant family is not enough: complete +Toeplitz total nonnegativity must force the full cubic discriminant. -/ +def CubicToeplitzDiscriminantPrinciple : Prop := + ∀ b : ℕ → ℝ, + (∀ n, 4 ≤ n → b n = 0) → + PolyaFrequency b → + 0 ≤ cubicDiscriminant (b 3) (b 2) (b 1) (b 0) + +theorem finiteASW_degree_three_of_discriminant + (b : ℕ → ℝ) (hpf : PolyaFrequency b) + (hb0 : 0 < b 0) (hb3 : 0 < b 3) + (hdisc : 0 ≤ cubicDiscriminant (b 3) (b 2) (b 1) (b 0)) : + NonpositiveRooted (finiteCoefficientPolynomial b 3) := by + have hhyp : Hyperbolic (finiteCoefficientPolynomial b 3) := by + rw [finiteCoefficientPolynomial_degree_three] + exact cubic_hyperbolic_of_discriminant_nonnegative + (b 3) (b 2) (b 1) (b 0) hb3.ne' hdisc + have hb := toeplitzTotallyNonnegative_nonnegative hpf + intro z hz + obtain ⟨r, hr⟩ := hhyp z hz + refine ⟨r, ?_, hr⟩ + have heval : + (b 0 : ℂ) + b 1 * (r : ℂ) + b 2 * (r : ℂ) ^ 2 + + b 3 * (r : ℂ) ^ 3 = 0 := by + rw [finiteCoefficientPolynomial_degree_three] at hz + simpa [Polynomial.IsRoot, hr] using hz + have hre : + b 0 + b 1 * r + b 2 * r ^ 2 + b 3 * r ^ 3 = 0 := by + exact_mod_cast heval + by_contra hrnonpos + have hrpos : 0 < r := lt_of_not_ge hrnonpos + have h1 : 0 ≤ b 1 * r := mul_nonneg (hb 1) hrpos.le + have h2 : 0 ≤ b 2 * r ^ 2 := + mul_nonneg (hb 2) (sq_nonneg r) + have h3 : 0 ≤ b 3 * r ^ 3 := + mul_nonneg (hb 3) (by positivity) + nlinarith + +theorem finiteASW_degree_three + (hcubic : CubicToeplitzDiscriminantPrinciple) + (b : ℕ → ℝ) (hsupport : ∀ n, 4 ≤ n → b n = 0) + (hpf : PolyaFrequency b) (hb0 : 0 < b 0) (hb3 : 0 < b 3) : + NonpositiveRooted (finiteCoefficientPolynomial b 3) := + finiteASW_degree_three_of_discriminant b hpf hb0 hb3 + (hcubic b hsupport hpf) + +/-- A fully formal finite Aissen--Schoenberg--Whitney theorem in degree one: +all Toeplitz minors force nonnegative coefficients, hence the unique root is +real and nonpositive. The constant degeneration is handled using the exact +nonzero-polynomial assumption. -/ +theorem finiteASW_degree_one + (b : ℕ → ℝ) + (hpf : PolyaFrequency b) + (hne : finiteCoefficientPolynomial b 1 ≠ 0) : + NonpositiveRooted (finiteCoefficientPolynomial b 1) := by + have hb := toeplitzTotallyNonnegative_nonnegative hpf + intro z hz + by_cases hb1 : b 1 = 0 + · have hb0 : b 0 ≠ 0 := by + intro hb0 + apply hne + rw [finiteCoefficientPolynomial_degree_one, hb0, hb1] + simp + rw [finiteCoefficientPolynomial_degree_one] at hz + simp [Polynomial.IsRoot, hb0, hb1] at hz + · rw [finiteCoefficientPolynomial_degree_one] at hz + simp only [Polynomial.IsRoot, Polynomial.map_add, Polynomial.map_mul, + Polynomial.map_C, Polynomial.map_X, Polynomial.eval_add, + Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_X] at hz + refine ⟨-b 0 / b 1, + div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr (hb 0)) (hb 1), ?_⟩ + have hb1c : (b 1 : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hb1 + have hz' : z = -(b 0 : ℂ) / (b 1 : ℂ) := by + apply (eq_div_iff hb1c).2 + simpa [mul_comm] using eq_neg_of_add_eq_zero_right hz + simpa using hz' + +/-- The finite ASW hyperbolicity implication is now unconditional through +degree one. -/ +theorem finitePolyaFrequencyHyperbolicity_through_one : + ∀ (b : ℕ → ℝ) (d : ℕ), d ≤ 1 → + (∀ j, d < j → b j = 0) → + PolyaFrequency b → + finiteCoefficientPolynomial b d ≠ 0 → + Hyperbolic (finiteCoefficientPolynomial b d) := by + intro b d hd _hsupport hpf hne + interval_cases d + · rw [finiteCoefficientPolynomial_degree_zero] + intro z hz + simp only [Polynomial.IsRoot, Polynomial.map_C, Polynomial.eval_C] at hz + have hb0 : b 0 ≠ 0 := by + simpa [finiteCoefficientPolynomial_degree_zero] using hne + exact (hb0 (Complex.ofReal_eq_zero.mp hz)).elim + · exact nonpositiveRooted_hyperbolic (finiteASW_degree_one b hpf hne) + +/-- Bounded-degree finite ASW statement. This makes explicit that increasing +the Jensen degree requires a corresponding increase in the proved PF/root +theorem; no fixed minor order is silently extrapolated. -/ +def FinitePolyaFrequencyHyperbolicityThrough (k : ℕ) : Prop := + ∀ (b : ℕ → ℝ) (d : ℕ), d ≤ k → + (∀ j, d < j → b j = 0) → + PolyaFrequency b → + finiteCoefficientPolynomial b d ≠ 0 → + Hyperbolic (finiteCoefficientPolynomial b d) + +theorem finitePolyaFrequencyHyperbolicityThrough_one : + FinitePolyaFrequencyHyperbolicityThrough 1 := + finitePolyaFrequencyHyperbolicity_through_one + +def JensenHyperbolicThrough (a : ℕ → ℝ) (k : ℕ) : Prop := + ∀ d n : ℕ, 1 ≤ d → d ≤ k → + Hyperbolic (jensenPolynomial a d n) + +/-- A bounded ASW theorem plus PF for the corresponding Jensen rows proves +all shifts through that degree bound. -/ +theorem jensenHyperbolicThrough_of_polyaFrequency + {a : ℕ → ℝ} {k : ℕ} + (hASW : FinitePolyaFrequencyHyperbolicityThrough k) + (hpf : AllJensenPolyaFrequency a) + (hne : NonzeroJensenFamily a) : + JensenHyperbolicThrough a k := by + intro d n hd hdk + rw [← finiteCoefficientPolynomial_jensenCoefficientSequence] + apply hASW (jensenCoefficientSequence a d n) d hdk + · intro j hj + simp [jensenCoefficientSequence, Nat.not_le.mpr hj] + · exact hpf d n hd + · rw [finiteCoefficientPolynomial_jensenCoefficientSequence] + exact hne d n hd + +/-- Bounded ASW theorems for every degree are exactly enough for the PF route +to recover the full all-Jensen target. -/ +theorem allJensenHyperbolic_of_polyaFrequencyThrough + {a : ℕ → ℝ} + (hASW : ∀ k, FinitePolyaFrequencyHyperbolicityThrough k) + (hpf : AllJensenPolyaFrequency a) + (hne : NonzeroJensenFamily a) : + AllJensenHyperbolic a := by + intro d n hd + exact jensenHyperbolicThrough_of_polyaFrequency + (hASW d) hpf hne d n hd le_rfl + +/-- Assuming precisely the finite ASW theorem, all-minor positivity of every +Jensen coefficient row implies all Jensen hyperbolicity. -/ +theorem allJensenHyperbolic_of_polyaFrequency + {a : ℕ → ℝ} + (hASW : FinitePolyaFrequencyHyperbolicity) + (hpf : AllJensenPolyaFrequency a) + (hne : NonzeroJensenFamily a) : + AllJensenHyperbolic a := by + intro d n hd + rw [← finiteCoefficientPolynomial_jensenCoefficientSequence] + apply hASW (jensenCoefficientSequence a d n) d + · intro j hj + simp [jensenCoefficientSequence, Nat.not_le.mpr hj] + · exact hpf d n hd + · rw [finiteCoefficientPolynomial_jensenCoefficientSequence] + exact hne d n hd + +theorem degree_two_hyperbolic_of_positive_logConcave + (a : ℕ → ℝ) (hpos : StrictlyPositive a) (hlc : LogConcave a) : + ∀ n, Hyperbolic (jensenPolynomial a 2 n) := by + intro n + apply jensenPolynomial_degree_two_hyperbolic + · exact ne_of_gt (hpos (n + 2)) + · exact sub_nonneg.mpr (hlc n) + +/-- A positive log-concave sequence witnessing that all quadratic Jensen +polynomials can be hyperbolic while a cubic Jensen polynomial is not. -/ +def turanOnlySequence (n : ℕ) : ℝ := + if n = 0 then 7 else 8 + +theorem turanOnlySequence_strictlyPositive : + StrictlyPositive turanOnlySequence := by + intro n + simp only [turanOnlySequence] + split_ifs <;> norm_num + +theorem turanOnlySequence_logConcave : + LogConcave turanOnlySequence := by + intro n + rcases n with _ | n + · norm_num [turanOnlySequence] + · simp [turanOnlySequence] + norm_num + +theorem turanOnlySequence_degree_two_hyperbolic : + ∀ n, Hyperbolic (jensenPolynomial turanOnlySequence 2 n) := + degree_two_hyperbolic_of_positive_logConcave turanOnlySequence + turanOnlySequence_strictlyPositive turanOnlySequence_logConcave + +/-- Ordinary Turán/log-concavity conditions do not propagate to degree +three. Here `J^{3,0}(X) = 8(X+1)^3 - 1`; a nonreal cube root of unity gives +an explicit nonreal root. -/ +theorem turanOnlySequence_degree_three_not_hyperbolic : + ¬ Hyperbolic (jensenPolynomial turanOnlySequence 3 0) := by + intro h + let ω : ℂ := -(1 : ℂ) / 2 + (Real.sqrt 3 : ℂ) / 2 * Complex.I + let z : ℂ := ω / 2 - 1 + have hsqrt : (Real.sqrt 3) ^ 2 = 3 := + Real.sq_sqrt (by norm_num) + have hsqrt3 : (Real.sqrt 3) ^ 3 = 3 * Real.sqrt 3 := by + calc + (Real.sqrt 3) ^ 3 = Real.sqrt 3 * (Real.sqrt 3) ^ 2 := by ring + _ = Real.sqrt 3 * 3 := by rw [hsqrt] + _ = 3 * Real.sqrt 3 := by ring + have hω : ω ^ 3 = 1 := by + apply Complex.ext + · norm_num [ω, Complex.mul_re, Complex.mul_im, pow_succ, pow_two] + nlinarith + · norm_num [ω, Complex.mul_re, Complex.mul_im, pow_succ, pow_two] + ring_nf at * + rw [hsqrt3] + nlinarith + have hzroot : + ((jensenPolynomial turanOnlySequence 3 0).map + (algebraMap ℝ ℂ)).IsRoot z := by + rw [jensenPolynomial_degree_three] + simp only [Polynomial.IsRoot, Polynomial.map_add, Polynomial.map_mul, + Polynomial.map_C, Polynomial.map_X, Polynomial.map_pow, + Polynomial.eval_add, Polynomial.eval_mul, Polynomial.eval_C, + Polynomial.eval_X, Polynomial.eval_pow] + norm_num [turanOnlySequence] + calc + (7 : ℂ) + 24 * z + 24 * z ^ 2 + 8 * z ^ 3 = + 8 * (z + 1) ^ 3 - 1 := by ring + _ = 8 * (ω / 2) ^ 3 - 1 := by simp [z] + _ = 0 := by rw [div_pow, hω]; norm_num + obtain ⟨x, hx⟩ := h z hzroot + have him := congrArg Complex.im hx + have hsqrtpos : 0 < Real.sqrt 3 := + Real.sqrt_pos.2 (by norm_num) + norm_num [z, ω, Complex.mul_im] at him + +/-- The ordinary exponential generating function to which the classical +Pólya--Jensen theorem applies. The already proved Taylor identity says +`xiJensenEntire z` is this function evaluated at `z²`; proving that relation +globally in this variable and its analyticity is part of the analytic bridge, +not folded into RH. -/ +def xiJensenGeneratingFunction (z : ℂ) : ℂ := + ∑' n : ℕ, ((xiGamma n / n.factorial : ℝ) : ℂ) * z ^ n + +theorem exists_complex_square_root (w : ℂ) : + ∃ z : ℂ, z ^ 2 = w := by + let p : ℂ[X] := Polynomial.X ^ 2 - Polynomial.C w + have hp : p.degree ≠ 0 := by + change (Polynomial.X ^ 2 - Polynomial.C w).degree ≠ 0 + rw [Polynomial.degree_sub_eq_left_of_degree_lt] + · simp + · exact lt_of_le_of_lt Polynomial.degree_C_le (by norm_num) + obtain ⟨z, hz⟩ := IsAlgClosed.exists_root p hp + refine ⟨z, ?_⟩ + have hz' : z ^ 2 - w = 0 := by + simpa [p, Polynomial.IsRoot] using hz + exact sub_eq_zero.mp hz' + +/-- The ordinary xi generating series converges at every complex argument. +This follows from the already proved entire even Taylor series after choosing +a complex square root; it does not use RH or coefficient positivity. -/ +theorem xiJensenGeneratingFunction_hasSum (w : ℂ) : + HasSum (fun n : ℕ ↦ + ((xiGamma n / n.factorial : ℝ) : ℂ) * w ^ n) + (xiJensenGeneratingFunction w) := by + obtain ⟨z, rfl⟩ := exists_complex_square_root w + have hs := xiJensenEntire_hasSum_xiGamma z + have hsummable : + Summable (fun n : ℕ ↦ + ((xiGamma n / n.factorial : ℝ) : ℂ) * (z ^ 2) ^ n) := by + apply hs.summable.congr + intro n + rw [← pow_mul] + simpa [xiJensenGeneratingFunction] using hsummable.hasSum + +/-- Exact relation between the even centered xi function and the ordinary +exponential generating function used by Pólya--Jensen. -/ +theorem xiJensenGeneratingFunction_sq (z : ℂ) : + xiJensenGeneratingFunction (z ^ 2) = xiJensenEntire z := by + exact (xiJensenGeneratingFunction_hasSum (z ^ 2)).unique + (by + convert xiJensenEntire_hasSum_xiGamma z using 1 + ext n + rw [← pow_mul]) + +/-- Exact change of variables from the ordinary Jensen generating function +back to the classical completed xi function. This is the root-identification +map needed in the final LP-to-RH step. -/ +theorem xiJensenGeneratingFunction_centered_square (s : ℂ) : + xiJensenGeneratingFunction ((s - 1 / 2) ^ 2) = 8 * riemannXi s := by + rw [xiJensenGeneratingFunction_sq, xiJensenEntire] + congr 2 + ring + +/-- Scalar formal power series underlying the ordinary xi generating +function. -/ +def xiJensenGeneratingPowerSeries : FormalMultilinearSeries ℂ ℂ ℂ := + FormalMultilinearSeries.ofScalars ℂ + (fun n ↦ ((xiGamma n / n.factorial : ℝ) : ℂ)) + +theorem xiJensenGeneratingPowerSeries_sum : + xiJensenGeneratingPowerSeries.sum = + xiJensenGeneratingFunction := by + funext z + change FormalMultilinearSeries.ofScalarsSum + (fun n ↦ ((xiGamma n / n.factorial : ℝ) : ℂ)) z = + xiJensenGeneratingFunction z + rw [FormalMultilinearSeries.ofScalars_sum_eq] + rfl + +/-- The ordinary xi generating power series has infinite convergence radius. +The proof transfers convergence from the even entire xi Taylor series via +complex square roots. -/ +theorem xiJensenGeneratingPowerSeries_radius : + xiJensenGeneratingPowerSeries.radius = ⊤ := by + apply FormalMultilinearSeries.radius_eq_top_of_summable_norm + intro r + have hs := (xiJensenGeneratingFunction_hasSum (r : ℂ)).summable + rw [← summable_norm_iff] at hs + simpa [xiJensenGeneratingPowerSeries, + FormalMultilinearSeries.ofScalars_norm, norm_mul, norm_pow, + abs_of_nonneg r.2] using hs + +/-- The ordinary xi generating function is entire, proved without RH. -/ +theorem differentiable_xiJensenGeneratingFunction : + Differentiable ℂ xiJensenGeneratingFunction := by + rw [← xiJensenGeneratingPowerSeries_sum] + have hseries := + xiJensenGeneratingPowerSeries.hasFPowerSeriesOnBall + (by rw [xiJensenGeneratingPowerSeries_radius]; simp) + have hd := hseries.differentiableOn + apply differentiableOn_univ.mp + simpa [xiJensenGeneratingPowerSeries_radius] using hd + +/-- The ordinary xi generating function is locally uniformly approximated by +its genuine power-series polynomials. This closes the analytic convergence +part of the Laguerre--Pólya interface; proving these or alternative +approximants hyperbolic remains the Pólya--Jensen content. -/ +theorem xiJensenGeneratingFunction_tendstoLocallyUniformly : + TendstoLocallyUniformlyOn + (fun n z ↦ xiJensenGeneratingPowerSeries.partialSum n z) + xiJensenGeneratingFunction Filter.atTop Set.univ := by + have hseries := + xiJensenGeneratingPowerSeries.hasFPowerSeriesOnBall + (by rw [xiJensenGeneratingPowerSeries_radius]; simp) + have hlim := hseries.tendstoLocallyUniformlyOn' + rw [xiJensenGeneratingPowerSeries_radius] at hlim + simpa [xiJensenGeneratingPowerSeries_sum] using hlim + +/-- Evaluate a real polynomial after scalar extension to `ℂ`. -/ +def complexPolynomialEval (p : ℝ[X]) (z : ℂ) : ℂ := + (p.map (algebraMap ℝ ℂ)).eval z + +/-- A finite power sum converges locally uniformly when each coefficient +converges. This is the coefficient-to-function closure needed by the reverse +Jensen argument. -/ +theorem tendstoLocallyUniformlyOn_finset_powerSum + {b : ℕ → ℕ → ℂ} {a : ℕ → ℂ} (s : Finset ℕ) + (hcoeff : ∀ j ∈ s, Tendsto (fun N ↦ b N j) atTop (𝓝 (a j))) : + TendstoLocallyUniformlyOn + (fun N z ↦ ∑ j ∈ s, b N j * z ^ j) + (fun z ↦ ∑ j ∈ s, a j * z ^ j) + atTop Set.univ := by + classical + induction s using Finset.induction_on with + | empty => + simp only [Finset.sum_empty] + intro u hu x hx + exact ⟨Set.univ, Filter.univ_mem, + Filter.Eventually.of_forall fun N z hz ↦ refl_mem_uniformity hu⟩ + | @insert j s hj ih => + have hjcoeff := hcoeff j (Finset.mem_insert_self j s) + have hjconst : TendstoLocallyUniformlyOn + (fun N (_z : ℂ) ↦ b N j) (fun _z : ℂ ↦ a j) + atTop Set.univ := by + intro u hu x hx + exact ⟨Set.univ, Filter.univ_mem, + (hjcoeff.tendstoUniformlyOn_const Set.univ) u hu⟩ + have hjpow : TendstoLocallyUniformlyOn + (fun (_N : ℕ) (_z : ℂ) ↦ (_z : ℂ) ^ j) + (fun z : ℂ ↦ z ^ j) + atTop Set.univ := by + intro u hu x hx + exact ⟨Set.univ, Filter.univ_mem, + Filter.Eventually.of_forall fun N z hz ↦ refl_mem_uniformity hu⟩ + have hjterm : TendstoLocallyUniformlyOn + (fun N z ↦ b N j * z ^ j) (fun z ↦ a j * z ^ j) + atTop Set.univ := by + convert hjconst.mul₀ hjpow (by fun_prop) (by fun_prop) using 1 <;> + rfl + have hrest := ih fun k hk ↦ hcoeff k (Finset.mem_insert_of_mem hk) + simp only [Finset.sum_insert hj] + convert hjterm.add hrest using 1 <;> rfl + +theorem hyperbolic_comp_scale {p : ℝ[X]} (hp : Hyperbolic p) + {c : ℝ} (hc : c ≠ 0) : + Hyperbolic (p.comp (Polynomial.C c * Polynomial.X)) := by + intro z hz + have hz' : + (p.map (algebraMap ℝ ℂ)).IsRoot ((c : ℂ) * z) := by + simpa [Polynomial.IsRoot, Polynomial.map_comp, + Polynomial.eval_comp] using hz + obtain ⟨x, hx⟩ := hp _ hz' + refine ⟨x / c, ?_⟩ + apply (mul_left_cancel₀ (Complex.ofReal_ne_zero.mpr hc)) + push_cast + rw [hx] + rw [div_eq_mul_inv] + calc + (x : ℂ) = ((c : ℂ) * (c : ℂ)⁻¹) * (x : ℂ) := by + rw [mul_inv_cancel₀ (Complex.ofReal_ne_zero.mpr hc), one_mul] + _ = (c : ℂ) * ((x : ℂ) * (c : ℂ)⁻¹) := by ring + +theorem tendsto_choose_mul_inv_pow (j : ℕ) : + Filter.Tendsto + (fun d : ℕ ↦ + (((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j)) + Filter.atTop (𝓝 ((j.factorial : ℝ)⁻¹)) := by + have hbase : + Filter.Tendsto (fun n : ℕ ↦ (n : ℝ) * (n : ℝ)⁻¹) + Filter.atTop (𝓝 1) := by + apply tendsto_const_nhds.congr' + filter_upwards [Filter.eventually_ge_atTop 1] with n hn + rw [mul_inv_cancel₀ (by exact_mod_cast (Nat.ne_zero_of_lt hn))] + have h := ProbabilityTheory.tendsto_choose_mul_pow_atTop j hbase + have hshift := h.comp (Filter.tendsto_add_atTop_nat 1) + change Filter.Tendsto + (fun d : ℕ ↦ + (((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j)) + Filter.atTop (𝓝 (1 ^ j / (j.factorial : ℝ))) at hshift + simpa [div_eq_mul_inv] using hshift + +theorem choose_mul_inv_pow_le_factorial_inv (d j : ℕ) : + (((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j) ≤ + (j.factorial : ℝ)⁻¹ := by + have hchoose := Nat.choose_le_pow_div (α := ℝ) j (d + 1) + have hd : 0 < ((d + 1 : ℕ) : ℝ) := by positivity + have hinv : 0 ≤ (((d + 1 : ℕ) : ℝ)⁻¹) ^ j := by positivity + have hmul := mul_le_mul_of_nonneg_right hchoose hinv + rw [div_eq_mul_inv] at hmul + calc + (((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j) ≤ + (((d + 1 : ℕ) : ℝ) ^ j * (j.factorial : ℝ)⁻¹) * + (((d + 1 : ℕ) : ℝ)⁻¹) ^ j := hmul + _ = (j.factorial : ℝ)⁻¹ := by + calc + ((d + 1 : ℕ) : ℝ) ^ j * (j.factorial : ℝ)⁻¹ * + (((d + 1 : ℕ) : ℝ)⁻¹) ^ j = + (j.factorial : ℝ)⁻¹ * (((d + 1 : ℕ) : ℝ) ^ j * + (((d + 1 : ℕ) : ℝ)⁻¹) ^ j) := by ring + _ = (j.factorial : ℝ)⁻¹ := by + rw [← mul_pow, mul_inv_cancel₀ hd.ne', one_pow, mul_one] + +/-- Rescaled Jensen polynomials used in the classical Pólya--Jensen +approximation. -/ +def xiRescaledJensenPolynomial (d : ℕ) : ℝ[X] := + (jensenPolynomial xiGamma (d + 1) 0).comp + (Polynomial.C (((d + 1 : ℕ) : ℝ)⁻¹) * Polynomial.X) + +theorem complexPolynomialEval_xiRescaledJensenPolynomial + (d : ℕ) (z : ℂ) : + complexPolynomialEval (xiRescaledJensenPolynomial d) z = + ∑ j ∈ Finset.range (d + 2), + (((((d + 1).choose j : ℝ) * + (((d + 1 : ℕ) : ℝ)⁻¹) ^ j * xiGamma j : ℝ) : ℂ) * z ^ j) := by + classical + simp only [xiRescaledJensenPolynomial, complexPolynomialEval, + Polynomial.map_comp, Polynomial.eval_comp, Polynomial.map_mul, + Polynomial.map_C, Polynomial.map_X, Polynomial.eval_mul, + Polynomial.eval_C, Polynomial.eval_X, jensenPolynomial, + Polynomial.map_sum, Polynomial.map_monomial, map_mul, + Polynomial.eval_finset_sum, Polynomial.eval_monomial, zero_add] + apply Finset.sum_congr rfl + intro j hj + push_cast + rw [show algebraMap ℝ ℂ (xiGamma j) = (xiGamma j : ℂ) by rfl] + ring + +theorem xiRescaledJensenPolynomial_tendsto_pointwise (z : ℂ) : + Filter.Tendsto + (fun d ↦ complexPolynomialEval (xiRescaledJensenPolynomial d) z) + Filter.atTop (𝓝 (xiJensenGeneratingFunction z)) := by + let f : ℕ → ℕ → ℂ := fun d j ↦ + ((((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j : ℝ) : ℂ) * + (xiGamma j : ℂ) * z ^ j + let g : ℕ → ℂ := fun j ↦ + ((((j.factorial : ℝ)⁻¹ : ℝ) : ℂ) * (xiGamma j : ℂ) * z ^ j) + let bound : ℕ → ℝ := fun j ↦ + (xiGamma j / j.factorial) * ‖z‖ ^ j + have hpos : StrictlyPositive xiGamma := + xiGamma_strictlyPositive_of_momentRepresentation xiGamma_momentRepresentation + have hsum : Summable bound := by + have hs := (xiJensenGeneratingFunction_hasSum z).summable.norm + convert hs using 1 + funext j + simp [bound, norm_mul, norm_pow, Real.norm_eq_abs, + abs_of_pos (hpos j), abs_of_pos (by positivity : 0 < (j.factorial : ℝ))] + have hterm (j : ℕ) : + Filter.Tendsto (fun d ↦ f d j) Filter.atTop (𝓝 (g j)) := by + have hr := tendsto_choose_mul_inv_pow j + have hc : + Filter.Tendsto + (fun d : ℕ ↦ + ((((d + 1).choose j : ℝ) * + (((d + 1 : ℕ) : ℝ)⁻¹) ^ j : ℝ) : ℂ)) + Filter.atTop (𝓝 (((j.factorial : ℝ)⁻¹ : ℝ) : ℂ)) := + Complex.continuous_ofReal.continuousAt.tendsto.comp hr + convert (hc.mul_const ((xiGamma j : ℝ) : ℂ)).mul_const (z ^ j) using 1 <;> + simp only [f, g] + have hbound : ∀ᶠ d in Filter.atTop, ∀ j, ‖f d j‖ ≤ bound j := by + filter_upwards with d + intro j + have hscale := choose_mul_inv_pow_le_factorial_inv d j + have hgamma : 0 ≤ xiGamma j := (hpos j).le + have hz : 0 ≤ ‖z‖ ^ j := by positivity + have hscale0 : 0 ≤ + ((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j := by + positivity + have h := + mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hscale hgamma) hz + have hnorm : ‖f d j‖ = + (((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j) * + xiGamma j * ‖z‖ ^ j := by + dsimp only [f] + rw [norm_mul, norm_mul, norm_pow] + rw [Complex.norm_real, Real.norm_of_nonneg hscale0] + rw [Complex.norm_real, Real.norm_of_nonneg hgamma] + rw [hnorm] + dsimp only [bound] + calc + _ ≤ (j.factorial : ℝ)⁻¹ * xiGamma j * ‖z‖ ^ j := h + _ = xiGamma j / (j.factorial : ℝ) * ‖z‖ ^ j := by + rw [div_eq_mul_inv] + ring + have ht := tendsto_tsum_of_dominated_convergence hsum hterm hbound + have hf (d : ℕ) : ∑' j, f d j = + complexPolynomialEval (xiRescaledJensenPolynomial d) z := by + calc + ∑' j, f d j = ∑ j ∈ Finset.range (d + 2), f d j := by + apply tsum_eq_sum + intro j hj + have hj' : d + 1 < j := by + simp only [Finset.mem_range, not_lt] at hj + omega + dsimp only [f] + rw [Nat.choose_eq_zero_of_lt hj'] + norm_num + _ = complexPolynomialEval (xiRescaledJensenPolynomial d) z := by + rw [complexPolynomialEval_xiRescaledJensenPolynomial] + apply Finset.sum_congr rfl + intro j hj + simp only [f] + push_cast + ring + have hg : ∑' j, g j = xiJensenGeneratingFunction z := by + rw [← (xiJensenGeneratingFunction_hasSum z).tsum_eq] + apply tsum_congr + intro j + simp only [g, div_eq_mul_inv] + push_cast + ring + simpa only [hf, hg] using ht + +/-- Locally uniform convergence of the explicit rescaled Jensen sequence. -/ +def XiJensenScalingConvergence : Prop := + TendstoLocallyUniformlyOn + (fun d z ↦ complexPolynomialEval (xiRescaledJensenPolynomial d) z) + xiJensenGeneratingFunction Filter.atTop Set.univ + +theorem xiJensenScalingConvergence : + XiJensenScalingConvergence := by + rw [XiJensenScalingConvergence, + tendstoLocallyUniformlyOn_iff_forall_isCompact isOpen_univ] + intro K hKuniv hK + letI : CompactSpace K := isCompact_iff_compactSpace.mp hK + let Z : C(K, ℂ) := + ⟨fun z ↦ z.1, continuous_subtype_val⟩ + let F : ℕ → ℕ → C(K, ℂ) := fun d j ↦ + (ContinuousMap.const K + ((((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j : ℝ) : ℂ)) * + (ContinuousMap.const K (xiGamma j : ℂ)) * Z ^ j + let G : ℕ → C(K, ℂ) := fun j ↦ + (ContinuousMap.const K ((((j.factorial : ℝ)⁻¹ : ℝ) : ℂ))) * + (ContinuousMap.const K (xiGamma j : ℂ)) * Z ^ j + let bound : ℕ → ℝ := fun j ↦ + (xiGamma j / j.factorial) * ‖Z‖ ^ j + have hpos : StrictlyPositive xiGamma := + xiGamma_strictlyPositive_of_momentRepresentation xiGamma_momentRepresentation + have hsum : Summable bound := by + have hs := + (xiJensenGeneratingFunction_hasSum ((‖Z‖ : ℝ) : ℂ)).summable.norm + convert hs using 1 + funext j + simp [bound, norm_mul, norm_pow, Real.norm_eq_abs, + abs_of_pos (hpos j), abs_of_nonneg (norm_nonneg Z)] + have hconst {c : ℕ → ℂ} {a : ℂ} + (hc : Filter.Tendsto c Filter.atTop (𝓝 a)) : + Filter.Tendsto (fun d ↦ ContinuousMap.const K (c d)) + Filter.atTop (𝓝 (ContinuousMap.const K a)) := by + rw [Metric.tendsto_nhds] at hc ⊢ + intro ε hε + filter_upwards [hc ε hε] with d hd + apply lt_of_le_of_lt + ((ContinuousMap.dist_le dist_nonneg).2 fun x ↦ ?_) hd + simp + have hterm (j : ℕ) : + Filter.Tendsto (fun d ↦ F d j) Filter.atTop (𝓝 (G j)) := by + have hr := tendsto_choose_mul_inv_pow j + have hc : + Filter.Tendsto + (fun d : ℕ ↦ + ((((d + 1).choose j : ℝ) * + (((d + 1 : ℕ) : ℝ)⁻¹) ^ j : ℝ) : ℂ)) + Filter.atTop (𝓝 (((j.factorial : ℝ)⁻¹ : ℝ) : ℂ)) := + Complex.continuous_ofReal.continuousAt.tendsto.comp hr + simpa only [F, G] using + ((hconst hc).mul_const (ContinuousMap.const K (xiGamma j : ℂ))).mul_const + (Z ^ j) + have hbound (d j : ℕ) : ‖F d j‖ ≤ bound j := by + have hgamma : 0 ≤ xiGamma j := (hpos j).le + apply (ContinuousMap.norm_le _ + (mul_nonneg (div_nonneg hgamma (by positivity)) (by positivity))).2 + intro z + have hscale := choose_mul_inv_pow_le_factorial_inv d j + have hzpow : + ‖(Z z)‖ ^ j ≤ ‖Z‖ ^ j := + pow_le_pow_left₀ (norm_nonneg _) (Z.norm_coe_le_norm z) j + have hscale0 : 0 ≤ + ((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j := by + positivity + have hcoeff : + (((d + 1).choose j : ℝ) * (((d + 1 : ℕ) : ℝ)⁻¹) ^ j) * + xiGamma j ≤ + (j.factorial : ℝ)⁻¹ * xiGamma j := + mul_le_mul_of_nonneg_right hscale hgamma + have h := + (mul_le_mul_of_nonneg_right hcoeff (by positivity : 0 ≤ ‖Z z‖ ^ j)).trans + (mul_le_mul_of_nonneg_left hzpow + (mul_nonneg (by positivity) hgamma)) + dsimp only [F, bound] + simp only [ContinuousMap.mul_apply, ContinuousMap.const_apply, + ContinuousMap.pow_apply] + rw [norm_mul, norm_mul, norm_pow] + rw [Complex.norm_real, Real.norm_of_nonneg hscale0] + rw [Complex.norm_real, Real.norm_of_nonneg hgamma] + calc + _ ≤ (j.factorial : ℝ)⁻¹ * xiGamma j * ‖Z‖ ^ j := h + _ = xiGamma j / (j.factorial : ℝ) * ‖Z‖ ^ j := by + rw [div_eq_mul_inv] + ring + have ht := tendsto_tsum_of_dominated_convergence hsum hterm + (Filter.Eventually.of_forall hbound) + have hFsummable (d : ℕ) : Summable (F d) := + hsum.of_norm_bounded (hbound d) + have hGsummable : Summable G := + hsum.of_norm_bounded fun j ↦ by + have hgamma : 0 ≤ xiGamma j := (hpos j).le + apply (ContinuousMap.norm_le _ + (mul_nonneg (div_nonneg hgamma (by positivity)) (by positivity))).2 + intro z + have hzpow : ‖Z z‖ ^ j ≤ ‖Z‖ ^ j := + pow_le_pow_left₀ (norm_nonneg _) (Z.norm_coe_le_norm z) j + have hnonneg : 0 ≤ (j.factorial : ℝ)⁻¹ * xiGamma j := by positivity + dsimp only [G, bound] + simp only [ContinuousMap.mul_apply, ContinuousMap.const_apply, + ContinuousMap.pow_apply] + rw [norm_mul, norm_mul, norm_pow] + rw [Complex.norm_real, Real.norm_of_nonneg (by positivity : + 0 ≤ (j.factorial : ℝ)⁻¹)] + rw [Complex.norm_real, Real.norm_of_nonneg hgamma] + calc + _ ≤ (j.factorial : ℝ)⁻¹ * xiGamma j * ‖Z‖ ^ j := + mul_le_mul_of_nonneg_left hzpow hnonneg + _ = xiGamma j / (j.factorial : ℝ) * ‖Z‖ ^ j := by + rw [div_eq_mul_inv] + ring + have hF (d : ℕ) : + ∑' j, F d j = + ⟨fun z : K ↦ + complexPolynomialEval (xiRescaledJensenPolynomial d) z.1, + by + unfold complexPolynomialEval + fun_prop⟩ := by + ext z + rw [← ContinuousMap.tsum_apply (hFsummable d) z] + change ∑' i, (F d i) z = + complexPolynomialEval (xiRescaledJensenPolynomial d) z.1 + rw [complexPolynomialEval_xiRescaledJensenPolynomial] + apply (tsum_eq_sum (s := Finset.range (d + 2)) ?_).trans + (Finset.sum_congr rfl fun j hj ↦ ?_) + · intro j hj + have hj' : d + 1 < j := by + simp only [Finset.mem_range, not_lt] at hj + omega + simp [F, Nat.choose_eq_zero_of_lt hj'] + · simp only [F, ContinuousMap.mul_apply, ContinuousMap.const_apply, + ContinuousMap.pow_apply] + rw [show Z z = z.1 by rfl] + push_cast + ring + have hG : + ∑' j, G j = + ⟨fun z : K ↦ xiJensenGeneratingFunction z.1, + differentiable_xiJensenGeneratingFunction.continuous.comp + continuous_subtype_val⟩ := by + ext z + rw [← ContinuousMap.tsum_apply hGsummable z] + change ∑' i, (G i) z = xiJensenGeneratingFunction z.1 + rw [← (xiJensenGeneratingFunction_hasSum z.1).tsum_eq] + apply tsum_congr + intro j + simp only [G, ContinuousMap.mul_apply, ContinuousMap.const_apply, + ContinuousMap.pow_apply, div_eq_mul_inv] + rw [show Z z = z.1 by rfl] + push_cast + ring + rw [Metric.tendstoUniformlyOn_iff] + intro ε hε + have ht' := (Metric.tendsto_nhds.1 ht) ε hε + filter_upwards [ht'] with d hd + intro z hz + rw [hF, hG] at hd + simpa only [ContinuousMap.coe_mk, dist_comm] using + (ContinuousMap.dist_apply_le_dist (⟨z, hz⟩ : ↥K)).trans_lt hd + +theorem xiRescaledJensenPolynomial_hyperbolic + (hJ : AllJensenHyperbolic xiGamma) (d : ℕ) : + Hyperbolic (xiRescaledJensenPolynomial d) := by + apply hyperbolic_comp_scale (hJ (d + 1) 0 (by omega)) + positivity + +theorem complexPolynomialEval_conj (p : ℝ[X]) (z : ℂ) : + complexPolynomialEval p (conj z) = conj (complexPolynomialEval p z) := by + induction p using Polynomial.induction_on' with + | add p q hp hq => + calc + complexPolynomialEval (p + q) (conj z) = + complexPolynomialEval p (conj z) + + complexPolynomialEval q (conj z) := by + simp [complexPolynomialEval] + _ = conj (complexPolynomialEval p z) + + conj (complexPolynomialEval q z) := by rw [hp, hq] + _ = conj (complexPolynomialEval p z + + complexPolynomialEval q z) := (map_add conj _ _).symm + _ = conj (complexPolynomialEval (p + q) z) := by + simp [complexPolynomialEval] + | monomial n a => + simp [complexPolynomialEval, map_monomial] + +/-- A concrete Laguerre--Pólya-style interface: local uniform convergence on +the entire complex plane of real hyperbolic polynomials. -/ +def LocallyUniformHyperbolicLimit (f : ℂ → ℂ) : Prop := + ∃ p : ℕ → ℝ[X], + (∀ n, Hyperbolic (p n)) ∧ + TendstoLocallyUniformlyOn + (fun n z ↦ complexPolynomialEval (p n) z) f Filter.atTop Set.univ + +/-- The locally-uniform-limit interface really does force an entire limit; +this is Mathlib's Weierstrass theorem, not an extra bridge assumption. -/ +theorem differentiable_of_locallyUniformHyperbolicLimit + {f : ℂ → ℂ} (h : LocallyUniformHyperbolicLimit f) : + Differentiable ℂ f := by + obtain ⟨p, -, hlim⟩ := h + rw [← differentiableOn_univ] + apply hlim.differentiableOn + · exact Filter.Eventually.of_forall fun n ↦ + ((p n).map (algebraMap ℝ ℂ)).differentiable.differentiableOn + · exact isOpen_univ + +/-- A locally uniform limit of real polynomials retains conjugation symmetry. +This is a genuine closure consequence independent of root preservation. -/ +theorem conj_symmetry_of_locallyUniformHyperbolicLimit + {f : ℂ → ℂ} (h : LocallyUniformHyperbolicLimit f) (z : ℂ) : + f (conj z) = conj (f z) := by + obtain ⟨p, -, hlim⟩ := h + have hz := hlim.tendsto_at (Set.mem_univ z) + have hcz := hlim.tendsto_at (Set.mem_univ (conj z)) + have hconj : + Filter.Tendsto (fun n ↦ conj (complexPolynomialEval (p n) z)) + Filter.atTop (nhds (conj (f z))) := + (continuous_conj.tendsto (f z)).comp hz + apply tendsto_nhds_unique hcz + convert hconj using 1 + funext n + exact complexPolynomialEval_conj (p n) z + +/-- A quantitative project-local Rouché/Hurwitz lemma proved from Mathlib's +Jensen circle-average theorem. If `f` has a zero at the center and is bounded +away from zero on the boundary circle, then an analytic function uniformly +closer than half that boundary gap must have a zero in the closed disk. -/ +theorem exists_zero_closedBall_of_uniform_close + {f g : ℂ → ℂ} {c : ℂ} {r m : ℝ} + (hr : 0 < r) (hm : 0 < m) + (hfc : f c = 0) + (hboundary : ∀ z ∈ Metric.sphere c r, m ≤ ‖f z‖) + (hg : AnalyticOnNhd ℂ g (Metric.closedBall c r)) + (hclose : ∀ z ∈ Metric.closedBall c r, ‖g z - f z‖ < m / 2) : + ∃ z ∈ Metric.closedBall c r, g z = 0 := by + by_contra! hzero + have hcircle : + CircleIntegrable (fun z ↦ Real.log ‖g z‖) c r := + by + have hg' : MeromorphicOn g (Metric.sphere c |r|) := by + simpa [abs_of_pos hr] using + (hg.mono Metric.sphere_subset_closedBall).meromorphicOn + exact hg'.circleIntegrable_log_norm + have hgap : ∀ z ∈ Metric.sphere c r, m / 2 < ‖g z‖ := by + intro z hz + have htri := norm_le_norm_add_norm_sub' (f z) (g z) + have hc := hclose z (Metric.sphere_subset_closedBall hz) + rw [norm_sub_rev] at hc + nlinarith [hboundary z hz] + have havg : + Real.log (m / 2) ≤ + Real.circleAverage (fun z ↦ Real.log ‖g z‖) c r := by + rw [← Real.circleAverage_const (Real.log (m / 2)) c r] + apply Real.circleAverage_mono (circleIntegrable_const _ _ _) hcircle + intro z hz + exact Real.log_le_log (half_pos hm) + (hgap z (by simpa [abs_of_pos hr] using hz)).le + have hgabs : AnalyticOnNhd ℂ g (Metric.closedBall c |r|) := by + simpa [abs_of_pos hr] using hg + have hzeroabs : ∀ z ∈ Metric.closedBall c |r|, g z ≠ 0 := by + intro z hz + exact hzero z (by simpa [abs_of_pos hr] using hz) + rw [hgabs.circleAverage_log_norm_of_ne_zero hzeroabs] at havg + have hgc : g c ≠ 0 := hzero c (Metric.mem_closedBall_self hr.le) + have hnorm_lower : m / 2 ≤ ‖g c‖ := + (Real.log_le_log_iff (half_pos hm) (norm_pos_iff.mpr hgc)).mp havg + have hcenter := hclose c (Metric.mem_closedBall_self hr.le) + rw [hfc, sub_zero] at hcenter + exact (not_lt_of_ge hnorm_lower) hcenter + +/-- Project-local Hurwitz theorem on an arbitrary open preconnected domain. +It is proved from the quantitative disk lemma above, compact-uniform +convergence, and Mathlib's isolated-zero theorem. -/ +theorem hurwitz_nonvanishing_or_eq_zero_on + {F : ℕ → ℂ → ℂ} {f : ℂ → ℂ} {U : Set ℂ} + (hUopen : IsOpen U) (hUpre : IsPreconnected U) + (hF : ∀ n, Differentiable ℂ (F n)) + (hlim : TendstoLocallyUniformlyOn F f Filter.atTop U) + (hnonzero : ∀ n z, z ∈ U → F n z ≠ 0) : + (∀ z, z ∈ U → f z ≠ 0) ∨ Set.EqOn f 0 U := by + by_cases hn : ∀ z, z ∈ U → f z ≠ 0 + · exact Or.inl hn + right + push Not at hn + obtain ⟨c, hcU, hfc⟩ := hn + have hfdiff : DifferentiableOn ℂ f U := + hlim.differentiableOn + (Filter.Eventually.of_forall fun n ↦ (hF n).differentiableOn) hUopen + have hfan : AnalyticOnNhd ℂ f U := hfdiff.analyticOnNhd hUopen + rcases (hfan c hcU).eventually_eq_zero_or_eventually_ne_zero with hlocal | hiso + · exact hfan.eqOn_zero_of_preconnected_of_eventuallyEq_zero + hUpre hcU hlocal + exfalso + rcases Metric.mem_nhdsWithin_iff.mp hiso with ⟨ε, hε, hεsub⟩ + rcases (Metric.isOpen_iff.mp hUopen c hcU) with ⟨δ, hδ, hδsub⟩ + let r := min ε δ / 2 + have hr : 0 < r := by + dsimp only [r] + positivity + have hrε : r < ε := by + dsimp only [r] + nlinarith [min_le_left ε δ] + have hrδ : r < δ := by + dsimp only [r] + nlinarith [min_le_right ε δ] + have hclosedU : Metric.closedBall c r ⊆ U := by + intro z hz + apply hδsub + rw [Metric.mem_ball] + exact hz.trans_lt hrδ + have hsphere_ne : ∀ z ∈ Metric.sphere c r, f z ≠ 0 := by + intro z hz + apply hεsub + constructor + · rw [Metric.mem_ball, Metric.mem_sphere.mp hz] + exact hrε + · intro hzc + subst z + have hzero_r : (0 : ℝ) = r := by + simpa [Metric.mem_sphere] using hz + exact hr.ne' hzero_r.symm + have hsphere : (Metric.sphere c r).Nonempty := + NormedSpace.sphere_nonempty.mpr hr.le + have hcont : + ContinuousOn (fun z ↦ ‖f z‖) (Metric.sphere c r) := + (hfdiff.continuousOn.mono + (Metric.sphere_subset_closedBall.trans hclosedU)).norm + obtain ⟨w, hw, hwmin⟩ := + (isCompact_sphere c r).exists_isMinOn hsphere hcont + let m := ‖f w‖ + have hm : 0 < m := by + dsimp only [m] + exact norm_pos_iff.mpr (hsphere_ne w hw) + have hboundary : ∀ z ∈ Metric.sphere c r, m ≤ ‖f z‖ := + fun _ hz ↦ hwmin hz + have hcompact : IsCompact (Metric.closedBall c r) := + isCompact_closedBall c r + have hunif : TendstoUniformlyOn F f Filter.atTop (Metric.closedBall c r) := + (tendstoLocallyUniformlyOn_iff_forall_isCompact hUopen).mp hlim + (Metric.closedBall c r) hclosedU hcompact + rw [Metric.tendstoUniformlyOn_iff] at hunif + have hevent := hunif (m / 2) (half_pos hm) + obtain ⟨n, hnclose⟩ := Filter.Eventually.exists hevent + have hFn_an : AnalyticOnNhd ℂ (F n) (Metric.closedBall c r) := + ((hF n).differentiableOn.analyticOnNhd isOpen_univ).mono + (Set.subset_univ _) + have hclose : + ∀ z ∈ Metric.closedBall c r, ‖F n z - f z‖ < m / 2 := by + intro z hz + simpa only [dist_eq_norm, norm_sub_rev] using hnclose z hz + obtain ⟨z, hzball, hzero⟩ := + exists_zero_closedBall_of_uniform_close hr hm hfc hboundary hFn_an hclose + exact hnonzero n z (hclosedU hzball) hzero + +/-- The exact Hurwitz theorem needed for root-location closure, specialized to +the two connected half-planes. Pinned Mathlib does not package this +zero-free-limit dichotomy; `hurwitzHalfPlaneNonvanishingClosure` below +discharges the interface project-locally. -/ +def HurwitzHalfPlaneNonvanishingClosure : Prop := + ∀ (F : ℕ → ℂ → ℂ) (f : ℂ → ℂ), + (∀ n, Differentiable ℂ (F n)) → + TendstoLocallyUniformlyOn F f Filter.atTop Set.univ → + (∀ n z, z.im ≠ 0 → F n z ≠ 0) → + ((∀ z, 0 < z.im → f z ≠ 0) ∨ (∀ z, 0 < z.im → f z = 0)) ∧ + ((∀ z, z.im < 0 → f z ≠ 0) ∨ (∀ z, z.im < 0 → f z = 0)) + +/-- The required half-plane Hurwitz principle, now proved project-locally from +Jensen's formula rather than retained as an analytic bridge assumption. -/ +theorem hurwitzHalfPlaneNonvanishingClosure : + HurwitzHalfPlaneNonvanishingClosure := by + intro F f hF hlim hnonzero + have hu := hurwitz_nonvanishing_or_eq_zero_on + (F := F) (f := f) (U := {z : ℂ | 0 < z.im}) + (isOpen_lt continuous_const continuous_im) + (convex_halfSpace_im_gt 0).isPreconnected hF + (hlim.mono (Set.subset_univ _)) + (fun n z hz ↦ hnonzero n z (ne_of_gt hz)) + have hl := hurwitz_nonvanishing_or_eq_zero_on + (F := F) (f := f) (U := {z : ℂ | z.im < 0}) + (isOpen_lt continuous_im continuous_const) + (convex_halfSpace_im_lt 0).isPreconnected hF + (hlim.mono (Set.subset_univ _)) + (fun n z hz ↦ hnonzero n z (ne_of_lt hz)) + constructor + · rcases hu with hu | hu + · exact Or.inl hu + · exact Or.inr fun z hz ↦ hu hz + · rcases hl with hl | hl + · exact Or.inl hl + · exact Or.inr fun z hz ↦ hl hz + +/-- Under the precise Hurwitz principle, one nonreal zero forces the limit to +vanish on its entire open half-plane. -/ +theorem nonreal_zero_forces_halfPlane_zero + (hHurwitz : HurwitzHalfPlaneNonvanishingClosure) + {f : ℂ → ℂ} (h : LocallyUniformHyperbolicLimit f) : + (∀ {z : ℂ}, 0 < z.im → f z = 0 → ∀ w, 0 < w.im → f w = 0) ∧ + (∀ {z : ℂ}, z.im < 0 → f z = 0 → ∀ w, w.im < 0 → f w = 0) := by + obtain ⟨p, hp, hlim⟩ := h + have hdiff : + ∀ n, Differentiable ℂ (fun z ↦ complexPolynomialEval (p n) z) := + fun n ↦ ((p n).map (algebraMap ℝ ℂ)).differentiable + have hnonreal : + ∀ n z, z.im ≠ 0 → complexPolynomialEval (p n) z ≠ 0 := by + intro n z hz hzero + have hroot : + ((p n).map (algebraMap ℝ ℂ)).IsRoot z := by + simpa [complexPolynomialEval, Polynomial.IsRoot] using hzero + obtain ⟨x, hx⟩ := hp n z hroot + have him := congrArg Complex.im hx + simp at him + exact hz him + have hcases := hHurwitz + (fun n z ↦ complexPolynomialEval (p n) z) f hdiff hlim hnonreal + constructor + · intro z hz hzero + rcases hcases.1 with hnonzero | hallzero + · exact (hnonzero z hz hzero).elim + · exact hallzero + · intro z hz hzero + rcases hcases.2 with hnonzero | hallzero + · exact (hnonzero z hz hzero).elim + · exact hallzero + +/-- If an entire locally uniform polynomial limit vanishes on either open +half-plane, Mathlib's analytic identity theorem propagates that vanishing to +the whole plane. Thus the identically-zero branch in Hurwitz is global, not +an independent branch for each half-plane. -/ +theorem eq_zero_of_locallyUniformHyperbolicLimit_of_halfPlane_zero + {f : ℂ → ℂ} (h : LocallyUniformHyperbolicLimit f) + (hall : (∀ z, 0 < z.im → f z = 0) ∨ + (∀ z, z.im < 0 → f z = 0)) : + ∀ z, f z = 0 := by + have han : AnalyticOnNhd ℂ f Set.univ := + (differentiable_of_locallyUniformHyperbolicLimit h).differentiableOn + |>.analyticOnNhd isOpen_univ + rcases hall with hu | hl + · have hopen : IsOpen {z : ℂ | 0 < z.im} := + isOpen_lt continuous_const continuous_im + have hI : Complex.I ∈ {z : ℂ | 0 < z.im} := by simp + have hev : f =ᶠ[nhds Complex.I] 0 := by + filter_upwards [hopen.mem_nhds hI] with z hz + exact hu z hz + intro z + exact han.eqOn_zero_of_preconnected_of_eventuallyEq_zero + isPreconnected_univ (Set.mem_univ Complex.I) hev (Set.mem_univ z) + · have hopen : IsOpen {z : ℂ | z.im < 0} := + isOpen_lt continuous_im continuous_const + have hI : -Complex.I ∈ {z : ℂ | z.im < 0} := by simp + have hev : f =ᶠ[nhds (-Complex.I)] 0 := by + filter_upwards [hopen.mem_nhds hI] with z hz + exact hl z hz + intro z + exact han.eqOn_zero_of_preconnected_of_eventuallyEq_zero + isPreconnected_univ (Set.mem_univ (-Complex.I)) hev (Set.mem_univ z) + +/-- Hurwitz plus one nonzero witness in each half-plane forces every zero of +the locally uniform hyperbolic limit to be real. -/ +theorem zero_reality_of_locallyUniformHyperbolicLimit + (hHurwitz : HurwitzHalfPlaneNonvanishingClosure) + {f : ℂ → ℂ} (h : LocallyUniformHyperbolicLimit f) + (hupper : ∃ w : ℂ, 0 < w.im ∧ f w ≠ 0) + (hlower : ∃ w : ℂ, w.im < 0 ∧ f w ≠ 0) + {z : ℂ} (hz : f z = 0) : + z.im = 0 := by + obtain ⟨hup, hlow⟩ := nonreal_zero_forces_halfPlane_zero hHurwitz h + rcases lt_trichotomy z.im 0 with hneg | hzero | hpos + · obtain ⟨w, hw, hnz⟩ := hlower + exact (hnz (hlow hneg hz w hw)).elim + · exact hzero + · obtain ⟨w, hw, hnz⟩ := hupper + exact (hnz (hup hpos hz w hw)).elim + +/-- After the analytic identity-theorem step, only one nonzero witness +anywhere in the plane is needed to exclude Hurwitz's identically-zero branch. -/ +theorem zero_reality_of_locallyUniformHyperbolicLimit_of_nonzero + (hHurwitz : HurwitzHalfPlaneNonvanishingClosure) + {f : ℂ → ℂ} (h : LocallyUniformHyperbolicLimit f) + (hnonzero : ∃ w : ℂ, f w ≠ 0) + {z : ℂ} (hz : f z = 0) : + z.im = 0 := by + obtain ⟨hup, hlow⟩ := nonreal_zero_forces_halfPlane_zero hHurwitz h + rcases lt_trichotomy z.im 0 with hneg | hzero | hpos + · obtain ⟨w, hw⟩ := hnonzero + exact (hw (eq_zero_of_locallyUniformHyperbolicLimit_of_halfPlane_zero h + (Or.inr (hlow hneg hz)) w)).elim + · exact hzero + · obtain ⟨w, hw⟩ := hnonzero + exact (hw (eq_zero_of_locallyUniformHyperbolicLimit_of_halfPlane_zero h + (Or.inl (hup hpos hz)) w)).elim + +/-- Unconditional zero-reality closure for a nonzero locally uniform limit of +real hyperbolic polynomials. This discharges the Hurwitz side of the +project-local Laguerre--Pólya limit interface. -/ +theorem zero_reality_of_locallyUniformHyperbolicLimit_unconditional + {f : ℂ → ℂ} (h : LocallyUniformHyperbolicLimit f) + (hnonzero : ∃ w : ℂ, f w ≠ 0) + {z : ℂ} (hz : f z = 0) : + z.im = 0 := + zero_reality_of_locallyUniformHyperbolicLimit_of_nonzero + hurwitzHalfPlaneNonvanishingClosure h hnonzero hz + +/-- Repeated complex derivatives preserve locally uniform convergence. This +is the analytic coefficient-extraction mechanism for reverse Jensen limits. -/ +theorem tendstoLocallyUniformlyOn_iteratedDeriv + {F : ℕ → ℂ → ℂ} {f : ℂ → ℂ} + (hlim : TendstoLocallyUniformlyOn F f atTop Set.univ) + (hF : ∀ N n, Differentiable ℂ ((deriv^[n]) (F N))) + (n : ℕ) : + TendstoLocallyUniformlyOn + (fun N ↦ (deriv^[n]) (F N)) ((deriv^[n]) f) + atTop Set.univ := by + induction n with + | zero => simpa using hlim + | succ n ih => + have hd := ih.deriv + (Filter.Eventually.of_forall fun N ↦ (hF N n).differentiableOn) + isOpen_univ + convert hd using 1 + · funext N + rw [Function.iterate_succ_apply'] + rfl + · rw [Function.iterate_succ_apply'] + +theorem tendsto_iteratedDeriv_apply_of_locallyUniform + {F : ℕ → ℂ → ℂ} {f : ℂ → ℂ} + (hlim : TendstoLocallyUniformlyOn F f atTop Set.univ) + (hF : ∀ N n, Differentiable ℂ ((deriv^[n]) (F N))) + (n : ℕ) (z : ℂ) : + Tendsto (fun N ↦ (deriv^[n]) (F N) z) atTop + (𝓝 ((deriv^[n]) f z)) := + (tendstoLocallyUniformlyOn_iteratedDeriv hlim hF n).tendsto_at + (Set.mem_univ z) + +/-- Hyperbolicity is closed under locally uniform limits of real polynomial +evaluations as soon as the limiting polynomial is visibly nonzero. -/ +theorem hyperbolic_of_tendstoLocallyUniformly + {p : ℝ[X]} {P : ℕ → ℝ[X]} + (hP : ∀ N, Hyperbolic (P N)) + (hlim : TendstoLocallyUniformlyOn + (fun N ↦ complexPolynomialEval (P N)) + (complexPolynomialEval p) atTop Set.univ) + (hp0 : p.coeff 0 ≠ 0) : + Hyperbolic p := by + have hLP : LocallyUniformHyperbolicLimit (complexPolynomialEval p) := + ⟨P, hP, hlim⟩ + have hnonzero : ∃ w : ℂ, complexPolynomialEval p w ≠ 0 := by + refine ⟨0, ?_⟩ + change (p.map (algebraMap ℝ ℂ)).eval 0 ≠ 0 + rw [Polynomial.eval_zero_map, ← Polynomial.coeff_zero_eq_eval_zero] + exact + Complex.ofReal_ne_zero.mpr hp0 + intro z hz + have hzfun : complexPolynomialEval p z = 0 := by + simpa [complexPolynomialEval, Polynomial.IsRoot] using hz + have him := + zero_reality_of_locallyUniformHyperbolicLimit_unconditional + hLP hnonzero hzfun + exact ⟨z.re, Complex.ext (by simp) (by simpa using him)⟩ + +/-- Exact approximation datum sufficient for reverse Pólya--Jensen. The +finite rows already have the current project's binomial/shift-zero +normalization; only coefficientwise convergence is required. -/ +def JensenCoefficientwiseHyperbolicApproximation (a : ℕ → ℝ) : Prop := + ∃ b : ℕ → ℕ → ℝ, + (∀ N d : ℕ, 1 ≤ d → Hyperbolic (jensenPolynomial (b N) d 0)) ∧ + ∀ j : ℕ, Tendsto (fun N ↦ b N j) atTop (𝓝 (a j)) + +/-- Coefficientwise limits of hyperbolic Jensen rows remain hyperbolic. -/ +theorem unshiftedJensenHyperbolic_of_coefficientwiseApproximation + {a : ℕ → ℝ} (ha0 : a 0 ≠ 0) + (happrox : JensenCoefficientwiseHyperbolicApproximation a) : + ∀ d : ℕ, 1 ≤ d → Hyperbolic (jensenPolynomial a d 0) := by + rcases happrox with ⟨b, hbhyper, hbconv⟩ + intro d hd + let P : ℕ → ℝ[X] := fun N ↦ jensenPolynomial (b N) d 0 + have hcoeff : ∀ j ∈ Finset.range (d + 1), + Tendsto (fun N ↦ + (((P N).coeff j : ℝ) : ℂ)) atTop + (𝓝 ((((jensenPolynomial a d 0).coeff j : ℝ) : ℂ))) := by + intro j hj + have hjd : j ≤ d := Nat.le_of_lt_succ (Finset.mem_range.mp hj) + have hr := (hbconv j).const_mul (d.choose j : ℝ) + have hc := Complex.continuous_ofReal.continuousAt.tendsto.comp hr + convert hc using 1 + · funext N + simp [P, coeff_jensenPolynomial, hjd] + · simp [coeff_jensenPolynomial, hjd] + have hsum := tendstoLocallyUniformlyOn_finset_powerSum + (Finset.range (d + 1)) hcoeff + have hlim : TendstoLocallyUniformlyOn + (fun N ↦ complexPolynomialEval (P N)) + (complexPolynomialEval (jensenPolynomial a d 0)) + atTop Set.univ := by + convert hsum using 1 + · funext N z + have hdeg_le : (P N).natDegree ≤ d := by + rw [Polynomial.natDegree_le_iff_coeff_eq_zero] + intro m hm + rw [coeff_jensenPolynomial, if_neg (not_le_of_gt hm)] + have hdeg : + (P N).natDegree < d + 1 := + hdeg_le.trans_lt (Nat.lt_succ_self d) + rw [complexPolynomialEval, ← Polynomial.eval₂_eq_eval_map, + Polynomial.eval₂_eq_sum_range' _ hdeg] + norm_num + · funext z + have hdeg_le : (jensenPolynomial a d 0).natDegree ≤ d := by + rw [Polynomial.natDegree_le_iff_coeff_eq_zero] + intro m hm + rw [coeff_jensenPolynomial, if_neg (not_le_of_gt hm)] + have hdeg : + (jensenPolynomial a d 0).natDegree < d + 1 := + hdeg_le.trans_lt (Nat.lt_succ_self d) + rw [complexPolynomialEval, ← Polynomial.eval₂_eq_eval_map, + Polynomial.eval₂_eq_sum_range' _ hdeg] + norm_num + apply hyperbolic_of_tendstoLocallyUniformly (fun N ↦ hbhyper N d hd) hlim + simpa [coeff_jensenPolynomial] using ha0 + +theorem allJensenHyperbolic_of_coefficientwiseApproximation + {a : ℕ → ℝ} (ha : NonzeroJensenFamily a) (ha0 : a 0 ≠ 0) + (happrox : JensenCoefficientwiseHyperbolicApproximation a) : + AllJensenHyperbolic a := + (allJensenHyperbolic_iff_unshifted_of_nonzeroJensen a ha).2 + (unshiftedJensenHyperbolic_of_coefficientwiseApproximation ha0 happrox) + +def XiLaguerrePolyaMembership : Prop := + LocallyUniformHyperbolicLimit xiJensenGeneratingFunction + +theorem xiLaguerrePolyaMembership_of_allJensenHyperbolic + (hconv : XiJensenScalingConvergence) + (hJ : AllJensenHyperbolic xiGamma) : + XiLaguerrePolyaMembership := + ⟨xiRescaledJensenPolynomial, + xiRescaledJensenPolynomial_hyperbolic hJ, hconv⟩ + +theorem xiLaguerrePolyaMembership_of_allJensenHyperbolic_unconditional + (hJ : AllJensenHyperbolic xiGamma) : + XiLaguerrePolyaMembership := + xiLaguerrePolyaMembership_of_allJensenHyperbolic + xiJensenScalingConvergence hJ + +/-- Finite genus-zero product with negative real zeros `-root i`. This is the +product obtained by pairing the centered xi zeros `± i sqrt(root i)`. -/ +def positiveGenusZeroPolynomial + (c : ℝ) (root : ℕ → ℝ) (N : ℕ) : ℝ[X] := + Polynomial.C c * + ∏ i ∈ Finset.range N, + (Polynomial.C 1 + Polynomial.C (root i)⁻¹ * Polynomial.X) + +/-- Genus-one Weierstrass primary factor, recreated locally from the Li route. -/ +def centeredGenusOnePrimaryFactor (w : ℂ) : ℂ := + (1 - w) * Complex.exp w + +/-- Pairing the centered conjugate roots `±iγ` cancels both genus-one +exponentials and leaves the genus-zero factor in the squared variable. -/ +theorem centeredGenusOnePrimaryFactor_pair + (z : ℂ) {γ : ℝ} (hγ : γ ≠ 0) : + centeredGenusOnePrimaryFactor (z / (Complex.I * γ)) * + centeredGenusOnePrimaryFactor (z / (-Complex.I * γ)) = + 1 + z ^ 2 / (γ : ℂ) ^ 2 := by + have hIγ : Complex.I * (γ : ℂ) ≠ 0 := + mul_ne_zero Complex.I_ne_zero (by exact_mod_cast hγ) + have hnIγ : -Complex.I * (γ : ℂ) ≠ 0 := + mul_ne_zero (neg_ne_zero.mpr Complex.I_ne_zero) (by exact_mod_cast hγ) + unfold centeredGenusOnePrimaryFactor + rw [show + (1 - z / (Complex.I * γ)) * Complex.exp (z / (Complex.I * γ)) * + ((1 - z / (-Complex.I * γ)) * + Complex.exp (z / (-Complex.I * γ))) = + ((1 - z / (Complex.I * γ)) * + (1 - z / (-Complex.I * γ))) * + (Complex.exp (z / (Complex.I * γ)) * + Complex.exp (z / (-Complex.I * γ))) by ring] + rw [← Complex.exp_add] + have hexp : + z / (Complex.I * γ) + z / (-Complex.I * γ) = 0 := by + rw [show -Complex.I * (γ : ℂ) = -(Complex.I * γ) by ring, + div_neg, add_neg_cancel] + rw [hexp, Complex.exp_zero, mul_one] + have hneg : + z / (-Complex.I * γ) = -(z / (Complex.I * γ)) := by + rw [show -Complex.I * (γ : ℂ) = -(Complex.I * γ) by ring, div_neg] + rw [hneg] + have hsquare : + (z / (Complex.I * γ)) ^ 2 = -z ^ 2 / (γ : ℂ) ^ 2 := by + rw [div_pow, mul_pow, Complex.I_sq] + field_simp [hγ] + rw [show + (1 - z / (Complex.I * γ)) * + (1 - -(z / (Complex.I * γ))) = + 1 - (z / (Complex.I * γ)) ^ 2 by ring, hsquare] + ring + +theorem deriv_zero_of_even + {f : ℂ → ℂ} (_hf : Differentiable ℂ f) + (heven : ∀ z, f (-z) = f z) : + deriv f 0 = 0 := by + have hfun : (fun z ↦ f (-z)) = f := funext heven + have hderiv := congrArg (fun g : ℂ → ℂ ↦ deriv g 0) hfun + rw [deriv_comp_neg, neg_zero] at hderiv + have htwo : (2 : ℂ) * deriv f 0 = 0 := by + linear_combination -hderiv + exact (mul_eq_zero.mp htwo).resolve_left (by norm_num) + +/-- Once Hadamard quotient rigidity gives an exponential-affine prefactor, +centered evenness removes its linear term. This is the final normalization +step needed after divisor equality and order-one growth. -/ +theorem exp_affine_prefactor_eq_const_of_even + {f P : ℂ → ℂ} (a b : ℂ) + (hf : Differentiable ℂ f) (hP : Differentiable ℂ P) + (hfeven : ∀ z, f (-z) = f z) + (hPeven : ∀ z, P (-z) = P z) + (hP0 : P 0 ≠ 0) + (hrep : ∀ z, f z = Complex.exp (a + b * z) * P z) : + ∀ z, f z = Complex.exp a * P z := by + have hdf : deriv f 0 = 0 := deriv_zero_of_even hf hfeven + have hdP : deriv P 0 = 0 := deriv_zero_of_even hP hPeven + have hfun : + f = (fun z ↦ Complex.exp (a + b * z)) * P := by + funext z + exact hrep z + have hderiv := congrArg (fun g : ℂ → ℂ ↦ deriv g 0) hfun + have haff : HasDerivAt (fun z : ℂ ↦ a + b * z) b 0 := by + simpa only [Function.id_def, one_mul, mul_one, mul_comm] using + ((hasDerivAt_id (𝕜 := ℂ) (0 : ℂ)).mul_const b).const_add a + have hexp : HasDerivAt (fun z : ℂ ↦ Complex.exp (a + b * z)) + (Complex.exp a * b) 0 := by + simpa only [mul_zero, add_zero] using haff.cexp + rw [hdf] at hderiv + have hmulderiv : + deriv ((fun z : ℂ ↦ Complex.exp (a + b * z)) * P) 0 = + (Complex.exp a * b) * P 0 + Complex.exp a * deriv P 0 := by + simpa only [mul_zero, add_zero] using + (hexp.mul (hP.differentiableAt.hasDerivAt)).deriv + rw [hmulderiv, hdP, mul_zero, add_zero] at hderiv + have hb : b = 0 := by + have hprod : Complex.exp a * (b * P 0) = 0 := by + linear_combination -hderiv + have hbp : b * P 0 = 0 := + (mul_eq_zero.mp hprod).resolve_left (Complex.exp_ne_zero a) + exact (mul_eq_zero.mp hbp).resolve_right hP0 + intro z + simpa [hb] using hrep z + +/-- Normal convergence of positive genus-zero factors over any countable +index type. -/ +theorem hasProdLocallyUniformlyOn_positiveGenusZeroFactors_indexed + {ι : Type*} [Countable ι] (root : ι → ℝ) + (hsum : Summable (fun i ↦ |(root i)⁻¹|)) : + HasProdLocallyUniformlyOn + (fun (i : ι) (z : ℂ) ↦ 1 + ((root i)⁻¹ : ℝ) * z) + (fun z : ℂ ↦ ∏' i : ι, (1 + ((root i)⁻¹ : ℝ) * z)) + Set.univ := by + apply hasProdLocallyUniformlyOn_of_forall_compact isOpen_univ + intro K hKu hK + obtain ⟨R, hR⟩ := hK.isBounded.exists_norm_le + have hu : Summable (fun i ↦ R * |(root i)⁻¹|) := + hsum.mul_left R + apply hu.hasProdUniformlyOn_one_add hK + · filter_upwards [] with i z hz + rw [norm_mul, Complex.norm_real, Real.norm_eq_abs] + simpa [mul_comm] using + mul_le_mul_of_nonneg_right (hR z hz) (abs_nonneg (root i)⁻¹) + · intro i + fun_prop + +/-- Inverse-square summability of paired centered zeros becomes the exact +inverse-first-power summability needed for the genus-zero product in `z²`. -/ +theorem hasProdLocallyUniformlyOn_positiveGenusZeroFactors + (root : ℕ → ℝ) + (hsum : Summable (fun i ↦ |(root i)⁻¹|)) : + HasProdLocallyUniformlyOn + (fun (i : ℕ) (z : ℂ) ↦ 1 + ((root i)⁻¹ : ℝ) * z) + (fun z : ℂ ↦ ∏' i : ℕ, (1 + ((root i)⁻¹ : ℝ) * z)) + Set.univ := + hasProdLocallyUniformlyOn_positiveGenusZeroFactors_indexed root hsum + +theorem positiveGenusZeroPolynomial_tendstoLocallyUniformly + (c : ℝ) (root : ℕ → ℝ) + (hsum : Summable (fun i ↦ |(root i)⁻¹|)) : + TendstoLocallyUniformlyOn + (fun N z ↦ complexPolynomialEval + (positiveGenusZeroPolynomial c root N) z) + (fun z : ℂ ↦ (c : ℂ) * + ∏' i : ℕ, (1 + ((root i)⁻¹ : ℝ) * z)) + Filter.atTop Set.univ := by + have hprod : TendstoLocallyUniformlyOn + (fun (N : ℕ) (z : ℂ) ↦ ∏ i ∈ Finset.range N, + (1 + ((root i)⁻¹ : ℝ) * z)) + (fun z : ℂ ↦ ∏' i : ℕ, + (1 + ((root i)⁻¹ : ℝ) * z)) + Filter.atTop Set.univ := by + intro u hu x hx + obtain ⟨t, ht, hevent⟩ := + hasProdLocallyUniformlyOn_positiveGenusZeroFactors root hsum + u hu x hx + exact ⟨t, ht, Filter.tendsto_finset_range.eventually hevent⟩ + have hconst : TendstoLocallyUniformlyOn + (fun _ : ℕ ↦ fun _ : ℂ ↦ (c : ℂ)) + (fun _ : ℂ ↦ (c : ℂ)) Filter.atTop Set.univ := by + intro u hu x hx + exact ⟨Set.univ, Filter.univ_mem, + Filter.Eventually.of_forall (fun _ y hy ↦ refl_mem_uniformity hu)⟩ + have hprodcont : ContinuousOn + (fun z : ℂ ↦ ∏' i : ℕ, + (1 + ((root i)⁻¹ : ℝ) * z)) Set.univ := by + apply hprod.continuousOn + exact Filter.Frequently.of_forall fun N ↦ by + apply Continuous.continuousOn + apply continuous_finsetProd + intro i hi + fun_prop + have hmul := hconst.mul₀ hprod (by fun_prop) hprodcont + convert hmul using 1 + · funext N z + simp [positiveGenusZeroPolynomial, complexPolynomialEval] + · funext z + rfl + +theorem hyperbolic_C {c : ℝ} (hc : c ≠ 0) : + Hyperbolic (Polynomial.C c) := by + intro z hz + simp [Polynomial.IsRoot.def, hc] at hz + +theorem positiveGenusZeroPolynomial_hyperbolic + {c : ℝ} (hc : c ≠ 0) {root : ℕ → ℝ} + (hroot : ∀ i, root i ≠ 0) (N : ℕ) : + Hyperbolic (positiveGenusZeroPolynomial c root N) := by + induction N with + | zero => + simpa [positiveGenusZeroPolynomial] using hyperbolic_C hc + | succ N ih => + rw [positiveGenusZeroPolynomial, Finset.prod_range_succ, ← mul_assoc] + exact hyperbolic_mul ih + (hyperbolic_C_add_C_mul_X 1 (root N)⁻¹ + (inv_ne_zero (hroot N))) + +theorem positiveGenusZeroPolynomial_nonpositiveRooted + {c : ℝ} (hc : c ≠ 0) {root : ℕ → ℝ} + (hroot : ∀ i, 0 < root i) (N : ℕ) : + NonpositiveRooted (positiveGenusZeroPolynomial c root N) := by + unfold positiveGenusZeroPolynomial + apply nonpositiveRooted_mul (nonpositiveRooted_C hc) + induction N with + | zero => + simpa using (nonpositiveRooted_C (c := 1) (by norm_num)) + | succ N ih => + rw [Finset.prod_range_succ] + exact nonpositiveRooted_mul ih + (nonpositiveRooted_one_add_inv_mul_X (hroot N)) + +/-- Exponential Taylor coefficients of a finite positive genus-zero product. +This is the coefficient normalization used by `jensenPolynomial`. -/ +noncomputable def positiveGenusZeroExponentialCoefficient + (c : ℝ) (root : ℕ → ℝ) (N n : ℕ) : ℝ := + n.factorial * (positiveGenusZeroPolynomial c root N).coeff n + +/-- Degree-`n` Schur--Szegő composition in binomial coordinates: +if `p = ∑ binom(n,j) a_j X^j` and +`q = ∑ binom(n,j) b_j X^j`, this is +`∑ binom(n,j) a_j b_j X^j`. -/ +noncomputable def schurSzegoComposition + (n : ℕ) (p q : ℝ[X]) : ℝ[X] := + ∑ j ∈ Finset.range (n + 1), + Polynomial.monomial j + (p.coeff j * q.coeff j / (n.choose j : ℝ)) + +theorem coeff_schurSzegoComposition + (n : ℕ) (p q : ℝ[X]) (j : ℕ) : + (schurSzegoComposition n p q).coeff j = + if j ≤ n then p.coeff j * q.coeff j / (n.choose j : ℝ) + else 0 := by + classical + unfold schurSzegoComposition + rw [Polynomial.finsetSum_coeff] + by_cases hj : j ≤ n + · rw [if_pos hj] + rw [Finset.sum_eq_single_of_mem j (by simpa)] + · simp + · intro b hb hbj + rw [Polynomial.coeff_monomial, if_neg hbj] + · rw [if_neg hj] + apply Finset.sum_eq_zero + intro b hb + rw [Polynomial.coeff_monomial, if_neg] + intro hbj + subst b + exact hj (by simpa using hb) + +/-- The second Schur--Szegő factor required by degree-`d` Jensen weighting. -/ +noncomputable def schurSzegoJensenKernel (N d : ℕ) : ℝ[X] := + ∑ j ∈ Finset.range (N + 1), + Polynomial.monomial j + ((N.choose j : ℝ) * (d.descFactorial j : ℝ)) + +theorem coeff_schurSzegoJensenKernel (N d j : ℕ) : + (schurSzegoJensenKernel N d).coeff j = + if j ≤ N then + (N.choose j : ℝ) * (d.descFactorial j : ℝ) + else 0 := by + classical + unfold schurSzegoJensenKernel + rw [Polynomial.finsetSum_coeff] + by_cases hj : j ≤ N + · rw [if_pos hj] + rw [Finset.sum_eq_single_of_mem j (by simpa)] + · simp + · intro b hb hbj + rw [Polynomial.coeff_monomial, if_neg hbj] + · rw [if_neg hj] + apply Finset.sum_eq_zero + intro b hb + rw [Polynomial.coeff_monomial, if_neg] + intro hbj + subst b + exact hj (by simpa using hb) + +theorem schurSzegoJensenKernel_zero_left (d : ℕ) : + schurSzegoJensenKernel 0 d = 1 := by + ext j + rw [coeff_schurSzegoJensenKernel] + cases j with + | zero => norm_num + | succ j => + rw [if_neg (by omega)] + rw [Polynomial.coeff_one] + simp + +theorem schurSzegoJensenKernel_zero_right (N : ℕ) : + schurSzegoJensenKernel N 0 = 1 := by + ext j + rw [coeff_schurSzegoJensenKernel] + cases j with + | zero => norm_num + | succ j => + by_cases hj : j + 1 ≤ N + · rw [if_pos hj, + Nat.descFactorial_eq_zero_iff_lt.mpr (by omega)] + rw [Polynomial.coeff_one] + simp + · rw [if_neg hj] + rw [Polynomial.coeff_one] + simp + +theorem schurSzegoJensenKernel_nonpositiveRooted_zero_left (d : ℕ) : + NonpositiveRooted (schurSzegoJensenKernel 0 d) := by + rw [schurSzegoJensenKernel_zero_left] + exact nonpositiveRooted_C (by norm_num) + +theorem schurSzegoJensenKernel_nonpositiveRooted_zero_right (N : ℕ) : + NonpositiveRooted (schurSzegoJensenKernel N 0) := by + rw [schurSzegoJensenKernel_zero_right] + exact nonpositiveRooted_C (by norm_num) + +theorem schurSzegoJensenKernel_one_right (N : ℕ) : + schurSzegoJensenKernel N 1 = + 1 + Polynomial.C (N : ℝ) * Polynomial.X := by + ext j + rw [coeff_schurSzegoJensenKernel] + cases j with + | zero => norm_num + | succ j => + cases j with + | zero => + rw [Polynomial.coeff_add, Polynomial.coeff_one, + Polynomial.coeff_C_mul_X] + by_cases hN : N = 0 + · subst N + norm_num + · rw [if_pos (Nat.one_le_iff_ne_zero.mpr hN)] + norm_num + | succ j => + rw [Nat.descFactorial_eq_zero_iff_lt.mpr (by omega)] + rw [Polynomial.coeff_add, Polynomial.coeff_one, + Polynomial.coeff_C_mul_X] + simp + +theorem schurSzegoJensenKernel_nonpositiveRooted_one_right (N : ℕ) : + NonpositiveRooted (schurSzegoJensenKernel N 1) := by + rw [schurSzegoJensenKernel_one_right] + by_cases hN : N = 0 + · subst N + simpa using (nonpositiveRooted_C (c := 1) (by norm_num)) + · simpa using + (nonpositiveRooted_one_add_inv_mul_X + (r := ((N : ℝ)⁻¹)) + (inv_pos.mpr (by exact_mod_cast (Nat.pos_of_ne_zero hN)))) + +theorem positiveGenusZeroPolynomial_natDegree_le + (c : ℝ) (root : ℕ → ℝ) (N : ℕ) : + (positiveGenusZeroPolynomial c root N).natDegree ≤ N := by + unfold positiveGenusZeroPolynomial + calc + (Polynomial.C c * + ∏ i ∈ Finset.range N, + (Polynomial.C 1 + Polynomial.C (root i)⁻¹ * + Polynomial.X)).natDegree + ≤ (Polynomial.C c).natDegree + + (∏ i ∈ Finset.range N, + (Polynomial.C 1 + Polynomial.C (root i)⁻¹ * + Polynomial.X)).natDegree := + Polynomial.natDegree_mul_le + _ ≤ 0 + ∑ _i ∈ Finset.range N, 1 := by + gcongr + · simp + · exact (Polynomial.natDegree_prod_le (Finset.range N) + (fun i ↦ Polynomial.C 1 + Polynomial.C (root i)⁻¹ * + Polynomial.X)).trans (Finset.sum_le_sum fun i hi ↦ + (Polynomial.natDegree_add_le _ _).trans + (max_le (by simp) + (Polynomial.natDegree_mul_le.trans (by simp)))) + _ = N := by simp + +theorem positiveGenusZeroPolynomial_ne_zero + {c : ℝ} (hc : c ≠ 0) (root : ℕ → ℝ) (N : ℕ) : + positiveGenusZeroPolynomial c root N ≠ 0 := by + unfold positiveGenusZeroPolynomial + apply mul_ne_zero (Polynomial.C_ne_zero.mpr hc) + rw [Finset.prod_ne_zero_iff] + intro i hi hfactor + have hcoeff := congrArg (fun p : ℝ[X] ↦ p.coeff 0) hfactor + norm_num at hcoeff + +/-- The normalization check behind the reverse route: composing a finite +genus-zero product with the Jensen kernel gives exactly the current +`binom(d,j) * gamma(j)` polynomial, including `N < d`, `d < N`, and zero +coefficient boundary cases. -/ +theorem schurSzegoComposition_positiveGenusZero_eq_jensenPolynomial + (c : ℝ) (root : ℕ → ℝ) (N d : ℕ) : + schurSzegoComposition N (positiveGenusZeroPolynomial c root N) + (schurSzegoJensenKernel N d) = + jensenPolynomial + (positiveGenusZeroExponentialCoefficient c root N) d 0 := by + ext j + rw [coeff_schurSzegoComposition, coeff_jensenPolynomial] + by_cases hjN : j ≤ N + · rw [if_pos hjN, coeff_schurSzegoJensenKernel, if_pos hjN] + by_cases hjd : j ≤ d + · rw [if_pos hjd] + have hchoose : (N.choose j : ℝ) ≠ 0 := by + exact_mod_cast (Nat.choose_pos hjN).ne' + field_simp [hchoose] + unfold positiveGenusZeroExponentialCoefficient + rw [Nat.descFactorial_eq_factorial_mul_choose] + push_cast + ring + · rw [if_neg hjd, + Nat.descFactorial_eq_zero_iff_lt.mpr (lt_of_not_ge hjd)] + norm_num + · rw [if_neg hjN] + have hcoeff : (positiveGenusZeroPolynomial c root N).coeff j = 0 := by + apply Polynomial.coeff_eq_zero_of_natDegree_lt + exact (positiveGenusZeroPolynomial_natDegree_le c root N).trans_lt + (lt_of_not_ge hjN) + by_cases hjd : j ≤ d + · rw [if_pos hjd] + simp [positiveGenusZeroExponentialCoefficient, hcoeff] + · rw [if_neg hjd] + +/-- The superficially natural strict Schur--Szegő statement is false at +boundary supports: two nonzero rooted inputs can have zero composition. -/ +def StrictFiniteSchurSzegoNonpositiveRootedness : Prop := + ∀ (n : ℕ) (p q : ℝ[X]), + p ≠ 0 → p.natDegree ≤ n → q ≠ 0 → q.natDegree ≤ n → + NonpositiveRooted p → NonpositiveRooted q → + NonpositiveRooted (schurSzegoComposition n p q) + +theorem not_strictFiniteSchurSzegoNonpositiveRootedness : + ¬ StrictFiniteSchurSzegoNonpositiveRootedness := by + intro h + have hroot := h 1 (Polynomial.X : ℝ[X]) 1 + (by simp) (by simp) (by norm_num) (by simp) + nonpositiveRooted_X (nonpositiveRooted_C (by norm_num)) + have hzero : + schurSzegoComposition 1 (Polynomial.X : ℝ[X]) 1 = 0 := by + ext j + rw [coeff_schurSzegoComposition] + by_cases hj : j ≤ 1 + · interval_cases j + · norm_num + · norm_num [Polynomial.coeff_one] + · rw [if_neg hj] + rfl + rw [hzero] at hroot + exact zero_not_hyperbolic (nonpositiveRooted_hyperbolic hroot) + +/-- Precise finite Schur--Szegő theorem with the necessary zero-output +alternative. This handles missing endpoint coefficients and disjoint supports; +the Jensen specialization below separately proves that its output is nonzero. -/ +def FiniteSchurSzegoNonpositiveRootedness : Prop := + ∀ (n : ℕ) (p q : ℝ[X]), + p ≠ 0 → p.natDegree ≤ n → q ≠ 0 → q.natDegree ≤ n → + NonpositiveRooted p → NonpositiveRooted q → + schurSzegoComposition n p q = 0 ∨ + NonpositiveRooted (schurSzegoComposition n p q) + +/-- The remaining special-function input: these reversed generalized +Laguerre kernels have only real nonpositive zeros, with multiplicities and +the `N < d`/`d < N` degree drops included. -/ +def SchurSzegoJensenKernelNonpositiveRootedness : Prop := + ∀ N d : ℕ, NonpositiveRooted (schurSzegoJensenKernel N d) + +/-- Exact finite real-rootedness theorem still needed in the reverse direction. +In classical language these are weighted matching/Jensen polynomials; proving +this is equivalent to the relevant Schur--Szegő multiplier-sequence step. -/ +def FinitePositiveGenusZeroJensenHyperbolicity : Prop := + ∀ (c : ℝ) (root : ℕ → ℝ) (N d : ℕ), + c ≠ 0 → (∀ i, 0 < root i) → 1 ≤ d → + Hyperbolic (jensenPolynomial + (positiveGenusZeroExponentialCoefficient c root N) d 0) + +theorem finitePositiveGenusZeroJensenHyperbolicity_of_schurSzego + (hschur : FiniteSchurSzegoNonpositiveRootedness) + (hkernel : SchurSzegoJensenKernelNonpositiveRootedness) : + FinitePositiveGenusZeroJensenHyperbolicity := by + intro c root N d hc hroot hd + rw [← schurSzegoComposition_positiveGenusZero_eq_jensenPolynomial] + apply nonpositiveRooted_hyperbolic + rcases hschur N + (positiveGenusZeroPolynomial c root N) + (schurSzegoJensenKernel N d) + (positiveGenusZeroPolynomial_ne_zero hc root N) + (positiveGenusZeroPolynomial_natDegree_le c root N) + (by + intro hq + have hcoeff := congrArg (fun p : ℝ[X] ↦ p.coeff 0) hq + rw [coeff_schurSzegoJensenKernel] at hcoeff + norm_num at hcoeff) + (by + rw [Polynomial.natDegree_le_iff_coeff_eq_zero] + intro j hj + rw [coeff_schurSzegoJensenKernel, if_neg (not_le_of_gt hj)]) + (positiveGenusZeroPolynomial_nonpositiveRooted hc hroot N) + (hkernel N d) with hzero | hrooted + · have hcoeff := congrArg (fun p : ℝ[X] ↦ p.coeff 0) hzero + rw [coeff_schurSzegoComposition, if_pos (Nat.zero_le N), + coeff_schurSzegoJensenKernel, if_pos (Nat.zero_le N)] at hcoeff + have hprod : + (∏ i ∈ Finset.range N, + (Polynomial.C 1 + Polynomial.C (root i)⁻¹ * + Polynomial.X)).coeff 0 = 1 := by + rw [Polynomial.coeff_zero_eq_eval_zero] + change Polynomial.evalRingHom 0 + (∏ i ∈ Finset.range N, + (Polynomial.C 1 + Polynomial.C (root i)⁻¹ * + Polynomial.X)) = 1 + rw [map_prod] + simp + have hsource : + (positiveGenusZeroPolynomial c root N).coeff 0 = c := by + unfold positiveGenusZeroPolynomial + rw [Polynomial.coeff_zero_eq_eval_zero] + have hprodEval : + Polynomial.eval 0 + (∏ i ∈ Finset.range N, + (Polynomial.C 1 + Polynomial.C (root i)⁻¹ * + Polynomial.X)) = 1 := by + rwa [← Polynomial.coeff_zero_eq_eval_zero] + rw [Polynomial.eval_mul, Polynomial.eval_C, hprodEval, mul_one] + rw [hsource] at hcoeff + norm_num at hcoeff + exact (hc hcoeff).elim + · exact hrooted + +/-- Coefficient-extraction half of the positive-product reverse theorem. +Local uniform convergence should imply this by repeated derivative +convergence; it is stated separately from finite real-rootedness. -/ +def XiPositiveGenusZeroCoefficientConvergence : Prop := + ∀ (c : ℝ) (root : ℕ → ℝ), + c ≠ 0 → (∀ i, 0 < root i) → + TendstoLocallyUniformlyOn + (fun N z ↦ complexPolynomialEval + (positiveGenusZeroPolynomial c root N) z) + xiJensenGeneratingFunction atTop Set.univ → + ∀ j : ℕ, Tendsto + (fun N ↦ positiveGenusZeroExponentialCoefficient c root N j) + atTop (𝓝 (xiGamma j)) + +/-- Source-shaped genus-zero Hadamard representation in the squared centered +variable. Li's multiplicity-indexed genus-one product supplies the raw zero +product; even pairing and order `< 1` must identify this normalized form. -/ +def PositiveGenusZeroProductRepresentation (f : ℂ → ℂ) : Prop := + ∃ c : ℝ, ∃ root : ℕ → ℝ, + c ≠ 0 ∧ (∀ i, 0 < root i) ∧ + TendstoLocallyUniformlyOn + (fun N z ↦ complexPolynomialEval + (positiveGenusZeroPolynomial c root N) z) + f Filter.atTop Set.univ + +/-- The exact normalized product identity left after pairing the Li-route +genus-one divisor. The constant is fixed at the already proved positive +center value `xiGamma 0`. -/ +def XiNormalizedGenusZeroProductIdentification : Prop := + xiGamma 0 ≠ 0 ∧ ∃ root : ℕ → ℝ, + (∀ i, 0 < root i) ∧ + Summable (fun i ↦ |(root i)⁻¹|) ∧ + ∀ z : ℂ, xiJensenGeneratingFunction z = + (xiGamma 0 : ℂ) * + ∏' i : ℕ, (1 + ((root i)⁻¹ : ℝ) * z) + +theorem positiveGenusZeroProductRepresentation_of_identification + (h : XiNormalizedGenusZeroProductIdentification) : + PositiveGenusZeroProductRepresentation xiJensenGeneratingFunction := by + rcases h with ⟨hgamma0, root, hroot, hsum, hid⟩ + refine ⟨xiGamma 0, root, hgamma0, hroot, ?_⟩ + have hconv := + positiveGenusZeroPolynomial_tendstoLocallyUniformly + (xiGamma 0) root hsum + convert hconv using 1 + funext z + exact hid z + +theorem locallyUniformHyperbolicLimit_of_positiveGenusZeroProduct + {f : ℂ → ℂ} (h : PositiveGenusZeroProductRepresentation f) : + LocallyUniformHyperbolicLimit f := by + rcases h with ⟨c, root, hc, hroot, hlim⟩ + refine ⟨positiveGenusZeroPolynomial c root, + fun N ↦ positiveGenusZeroPolynomial_hyperbolic hc + (fun i ↦ (hroot i).ne') N, hlim⟩ + +theorem xiLaguerrePolyaMembership_of_positiveGenusZeroProduct + (h : PositiveGenusZeroProductRepresentation + xiJensenGeneratingFunction) : + XiLaguerrePolyaMembership := + locallyUniformHyperbolicLimit_of_positiveGenusZeroProduct h + +theorem xiLaguerrePolyaMembership_of_normalizedProductIdentification + (h : XiNormalizedGenusZeroProductIdentification) : + XiLaguerrePolyaMembership := + xiLaguerrePolyaMembership_of_positiveGenusZeroProduct + (positiveGenusZeroProductRepresentation_of_identification h) + +theorem xiJensenGeneratingFunction_zero : + xiJensenGeneratingFunction 0 = (xiGamma 0 : ℂ) := by + unfold xiJensenGeneratingFunction + rw [tsum_eq_single 0] + · simp + · intro n hn + simp [zero_pow hn] + +/-- A centered Hadamard conclusion before evenness removes the affine +exponential factor. This is the exact output supplied by divisor equality +and order-one quotient rigidity. -/ +def XiCenteredAffinePairedProductIdentification : Prop := + xiGamma 0 ≠ 0 ∧ ∃ root : ℕ → ℝ, + (∀ i, 0 < root i) ∧ + Summable (fun i ↦ |(root i)⁻¹|) ∧ + Differentiable ℂ (fun z : ℂ ↦ + ∏' i : ℕ, (1 + ((root i)⁻¹ : ℝ) * z ^ 2)) ∧ + ∃ a b : ℂ, ∀ z : ℂ, xiJensenEntire z = + Complex.exp (a + b * z) * + ∏' i : ℕ, (1 + ((root i)⁻¹ : ℝ) * z ^ 2) + +/-- The affine centered Hadamard representation automatically has no linear +exponential term, and evaluation at zero fixes its constant to `xiGamma 0`. -/ +theorem normalizedProductIdentification_of_centeredAffine + (h : XiCenteredAffinePairedProductIdentification) : + XiNormalizedGenusZeroProductIdentification := by + rcases h with ⟨hgamma0, root, hroot, hsum, hPdiff, a, b, hrep⟩ + let P : ℂ → ℂ := fun z ↦ + ∏' i : ℕ, (1 + ((root i)⁻¹ : ℝ) * z ^ 2) + have hPeven : ∀ z, P (-z) = P z := by + intro z + simp only [P, neg_sq] + have hP0 : P 0 ≠ 0 := by + simp [P] + have hconst : ∀ z, xiJensenEntire z = Complex.exp a * P z := + exp_affine_prefactor_eq_const_of_even a b + differentiable_xiJensenEntire hPdiff xiJensenEntire_neg hPeven hP0 hrep + have hcenter0 : xiJensenEntire 0 = (xiGamma 0 : ℂ) := by + rw [← xiJensenGeneratingFunction_sq 0] + simpa using xiJensenGeneratingFunction_zero + have hexpa : Complex.exp a = (xiGamma 0 : ℂ) := by + have h0 := hconst 0 + rw [hcenter0] at h0 + simpa [P] using h0.symm + refine ⟨hgamma0, root, hroot, hsum, ?_⟩ + intro w + by_cases hw : w = 0 + · subst w + rw [xiJensenGeneratingFunction_zero] + simp + · let z := Complex.sqrt w + have hzsq : z ^ 2 = w := by + rw [pow_two] + dsimp only [z] + rw [sqrt_eq_exp hw, ← Complex.exp_add] + convert Complex.exp_log hw using 1 + ring + rw [← hzsq, xiJensenGeneratingFunction_sq, hconst, hexpa] + +theorem xiLaguerrePolya_zero_reality_of_momentRepresentation + (hLP : XiLaguerrePolyaMembership) + (hmoment : XiGammaMomentRepresentation) + {z : ℂ} (hz : xiJensenGeneratingFunction z = 0) : + z.im = 0 := by + apply zero_reality_of_locallyUniformHyperbolicLimit_unconditional hLP + · refine ⟨0, ?_⟩ + rw [xiJensenGeneratingFunction_zero] + exact Complex.ofReal_ne_zero.mpr + (ne_of_gt (xiGamma_strictlyPositive_of_momentRepresentation hmoment 0)) + · exact hz + +/-- Exact remaining coefficient nondegeneracy needed to reduce all shifts to +the unshifted xi Jensen family. -/ +def XiCoefficientNondegeneracy : Prop := + JensenWindowNonzero xiGamma + +theorem xiCoefficientNondegeneracy_iff_noAdjacentZeros : + XiCoefficientNondegeneracy ↔ NoAdjacentZeros xiGamma := + jensenWindowNonzero_iff_noAdjacentZeros xiGamma + +/-- The source-backed positive-moment identity would close coefficient +nondegeneracy, while allowing the formal route to state that missing analytic +identity separately from the weaker no-adjacent-zero target. -/ +theorem xiCoefficientNondegeneracy_of_momentRepresentation + (h : XiGammaMomentRepresentation) : + XiCoefficientNondegeneracy := by + rw [xiCoefficientNondegeneracy_iff_noAdjacentZeros] + have hpos := xiGamma_strictlyPositive_of_momentRepresentation h + intro n + exact Or.inl (ne_of_gt (hpos n)) + +/-- The Mellin/Phi calculation closes coefficient positivity and +nondegeneracy without any zero-location or RH hypothesis. -/ +theorem xiGamma_strictlyPositive : StrictlyPositive xiGamma := + xiGamma_strictlyPositive_of_momentRepresentation + xiGamma_momentRepresentation + +theorem xiCoefficientNondegeneracy_unconditional : + XiCoefficientNondegeneracy := + xiCoefficientNondegeneracy_of_momentRepresentation + xiGamma_momentRepresentation + +theorem xiNonzeroJensenFamily : NonzeroJensenFamily xiGamma := + (nonzeroJensenFamily_iff_windowNonzero xiGamma).2 + xiCoefficientNondegeneracy_unconditional + +/-- Once the coefficient identity is discharged, Laguerre--Pólya membership +is the only hypothesis left in this zero-reality direction. -/ +theorem xiLaguerrePolya_zero_reality + (hLP : XiLaguerrePolyaMembership) + {z : ℂ} (hz : xiJensenGeneratingFunction z = 0) : + z.im = 0 := + xiLaguerrePolya_zero_reality_of_momentRepresentation + hLP xiGamma_momentRepresentation hz + +theorem xiJensenGeneratingFunction_ofReal_pos {r : ℝ} (hr : 0 ≤ r) : + 0 < (xiJensenGeneratingFunction (r : ℂ)).re := by + have hs := Complex.hasSum_re (xiJensenGeneratingFunction_hasSum (r : ℂ)) + rw [← hs.tsum_eq] + refine hs.summable.tsum_pos ?_ 0 ?_ + · intro n + have hpow : (r : ℂ) ^ n = ((r ^ n : ℝ) : ℂ) := + (Complex.ofReal_pow r n).symm + have hre := congrArg Complex.re hpow + have him := congrArg Complex.im hpow + simp only [Complex.ofReal_re] at hre + simp only [Complex.ofReal_im] at him + rw [Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, + zero_mul, sub_zero, hre] + exact mul_nonneg + (div_nonneg (xiGamma_strictlyPositive n).le (by positivity)) + (pow_nonneg hr n) + · simpa using xiGamma_strictlyPositive 0 + +theorem xiJensenEntire_ofReal_ne_zero (r : ℝ) : + xiJensenEntire (r : ℂ) ≠ 0 := by + intro hz + have hpos := xiJensenGeneratingFunction_ofReal_pos (sq_nonneg r) + rw [Complex.ofReal_pow] at hpos + rw [xiJensenGeneratingFunction_sq, hz] at hpos + norm_num at hpos + +theorem xiJensenEntire_zero_im_ne_zero {z : ℂ} + (hz : xiJensenEntire z = 0) : + z.im ≠ 0 := by + intro hzim + have hzreal : z = (z.re : ℂ) := by + apply Complex.ext + · simp + · simpa using hzim + exact xiJensenEntire_ofReal_ne_zero z.re (hzreal ▸ hz) + +theorem xiJensenEntire_zero_re_on_critical_axis + (hJ : AllJensenHyperbolic xiGamma) {z : ℂ} + (hz : xiJensenEntire z = 0) : + z.re = 0 := by + have hgf : xiJensenGeneratingFunction (z ^ 2) = 0 := by + rw [xiJensenGeneratingFunction_sq, hz] + have hreal : (z ^ 2).im = 0 := + xiLaguerrePolya_zero_reality + (xiLaguerrePolyaMembership_of_allJensenHyperbolic_unconditional hJ) hgf + by_contra hzre + have hzim : z.im = 0 := by + rw [pow_two, Complex.mul_im] at hreal + rcases lt_or_gt_of_ne hzre with hzneg | hzpos <;> nlinarith + have hsq : z ^ 2 = ((z.re ^ 2 : ℝ) : ℂ) := by + apply Complex.ext + · simp [pow_two, Complex.mul_re, hzim] + · simp [pow_two, Complex.mul_im, hzim] + have hpos := + xiJensenGeneratingFunction_ofReal_pos (sq_nonneg z.re) + rw [← hsq, hgf] at hpos + norm_num at hpos + +theorem riemannXi_eq_zero_of_nontrivial_riemannZeta_zero + {s : ℂ} (hzeta : riemannZeta s = 0) + (htrivial : ¬ ∃ n : ℕ, s = -2 * (n + 1)) + (hs1 : s ≠ 1) : + riemannXi s = 0 := by + have hs0 : s ≠ 0 := by + intro hs + subst s + rw [riemannZeta_zero] at hzeta + norm_num at hzeta + have hgamma : Complex.Gamma (s / 2) ≠ 0 := by + apply Complex.Gamma_ne_zero + intro m hm + cases m with + | zero => + simp only [Nat.cast_zero, neg_zero] at hm + exact hs0 ((div_eq_zero_iff.mp hm).resolve_right (by norm_num)) + | succ n => + apply htrivial + refine ⟨n, ?_⟩ + calc + s = 2 * (s / 2) := by ring + _ = -2 * ((n : ℂ) + 1) := by rw [hm]; push_cast; ring + have hpow : (Real.pi : ℂ) ^ (-s / 2) ≠ 0 := + Complex.cpow_ne_zero_iff.mpr + (Or.inl (Complex.ofReal_ne_zero.mpr (ne_of_gt Real.pi_pos))) + rw [riemannZeta_eq_completedRiemannZeta₀ hs0] at hzeta + have hnum : + completedRiemannZeta₀ s - 1 / s - 1 / (1 - s) = 0 := + (div_eq_zero_iff.mp hzeta).resolve_right (mul_ne_zero hpow hgamma) + unfold riemannXi + apply (div_eq_zero_iff.mpr (Or.inl ?_)) + field_simp [hs0, sub_ne_zero.mpr hs1] at hnum + linear_combination -hnum + +theorem riemannHypothesis_of_allJensenHyperbolic + (hJ : AllJensenHyperbolic xiGamma) : + KakeyaRiemannHypothesisRoot := by + rw [← kakeya_rh_expanded_iff_canonical] + intro s hzeta htrivial hs1 + have hxi := + riemannXi_eq_zero_of_nontrivial_riemannZeta_zero + hzeta htrivial hs1 + have hcenter : xiJensenEntire (s - 1 / 2) = 0 := by + rw [xiJensenEntire] + convert mul_eq_zero_of_right (8 : ℂ) hxi using 1 + congr 2 + ring + have haxis := + xiJensenEntire_zero_re_on_critical_axis hJ hcenter + norm_num [Complex.sub_re] at haxis + linarith + +theorem xiJensenEntire_zero_re_on_critical_axis_of_riemannHypothesis + (hRH : KakeyaRiemannHypothesisRoot) {z : ℂ} + (hz : xiJensenEntire z = 0) : + z.re = 0 := by + let s : ℂ := 1 / 2 + z + have hxi : riemannXi s = 0 := by + rw [xiJensenEntire] at hz + exact (mul_eq_zero.mp hz).resolve_left (by norm_num) + have hzim : z.im ≠ 0 := xiJensenEntire_zero_im_ne_zero hz + have hs_im : s.im = z.im := by simp [s] + have hs0 : s ≠ 0 := by + intro hs + have : s.im = 0 := congrArg Complex.im hs + exact hzim (hs_im ▸ this) + have hs1 : s ≠ 1 := by + intro hs + have : s.im = 0 := congrArg Complex.im hs + exact hzim (hs_im ▸ this) + have hxinumerator : + 1 + s * (s - 1) * completedRiemannZeta₀ s = 0 := by + unfold riemannXi at hxi + exact (div_eq_zero_iff.mp hxi).resolve_right (by norm_num) + have hmellin : + completedRiemannZeta₀ s - 1 / s - 1 / (1 - s) = 0 := by + field_simp [hs0, sub_ne_zero.mpr hs1] + linear_combination -hxinumerator + have hzeta : riemannZeta s = 0 := by + rw [riemannZeta_eq_completedRiemannZeta₀ hs0, hmellin, zero_div] + have htrivial : ¬ ∃ n : ℕ, s = -2 * (n + 1) := by + rintro ⟨n, hn⟩ + have hsreal : s.im = 0 := by rw [hn]; norm_num + exact hzim (hs_im ▸ hsreal) + have hExpanded : KakeyaRiemannHypothesisExpanded := + kakeya_rh_expanded_iff_canonical.mpr hRH + have hsre := hExpanded s hzeta htrivial hs1 + dsimp only [s] at hsre + norm_num [Complex.add_re] at hsre + linarith + +/-- Exact centered-xi zero statement equivalent to RH in this normalization: +zeros of `z ↦ ξ(1/2+z)` lie on the imaginary axis. -/ +def XiCenteredCriticalZeroReality : Prop := + ∀ z : ℂ, xiJensenEntire z = 0 → z.re = 0 + +theorem xiCenteredCriticalZeroReality_of_riemannHypothesis + (hRH : KakeyaRiemannHypothesisRoot) : + XiCenteredCriticalZeroReality := + fun _ hz ↦ xiJensenEntire_zero_re_on_critical_axis_of_riemannHypothesis hRH hz + +theorem riemannHypothesis_of_xiCenteredCriticalZeroReality + (hzero : XiCenteredCriticalZeroReality) : + KakeyaRiemannHypothesisRoot := by + rw [← kakeya_rh_expanded_iff_canonical] + intro s hzeta htrivial hs1 + have hxi := + riemannXi_eq_zero_of_nontrivial_riemannZeta_zero + hzeta htrivial hs1 + have hcenter : xiJensenEntire (s - 1 / 2) = 0 := by + rw [xiJensenEntire] + convert mul_eq_zero_of_right (8 : ℂ) hxi using 1 + congr 2 + ring + have haxis := hzero (s - 1 / 2) hcenter + norm_num [Complex.sub_re] at haxis + linarith + +theorem xiCenteredCriticalZeroReality_iff_riemannHypothesis : + XiCenteredCriticalZeroReality ↔ KakeyaRiemannHypothesisRoot := + ⟨riemannHypothesis_of_xiCenteredCriticalZeroReality, + xiCenteredCriticalZeroReality_of_riemannHypothesis⟩ + +/-! ### Multiplicity-correct centered-xi zero enumeration -/ + +def centeredXiZeroOrder (z : ℂ) : ℕ∞ := + analyticOrderAt xiJensenEntire z + +theorem centeredXiZeroOrder_ne_top (z : ℂ) : + centeredXiZeroOrder z ≠ ⊤ := by + unfold centeredXiZeroOrder + have hxi : AnalyticOnNhd ℂ xiJensenEntire Set.univ := + fun w _ ↦ differentiable_xiJensenEntire.analyticAt w + apply hxi.analyticOrderAt_ne_top_of_isPreconnected + (x := (0 : ℂ)) (y := z) + · exact isPreconnected_univ + · simp + · simp + · rw [(differentiable_xiJensenEntire.analyticAt 0).analyticOrderAt_eq_zero.mpr] + · exact ENat.zero_ne_top + · rw [← xiJensenGeneratingFunction_sq 0] + simp only [zero_pow two_ne_zero] + rw [xiJensenGeneratingFunction_zero] + exact Complex.ofReal_ne_zero.mpr + (ne_of_gt (xiGamma_strictlyPositive 0)) + +def centeredXiZeroMultiplicity (z : ℂ) : ℕ := + analyticOrderNatAt xiJensenEntire z + +theorem centeredXiZeroMultiplicity_cast (z : ℂ) : + (centeredXiZeroMultiplicity z : ℕ∞) = centeredXiZeroOrder z := + Nat.cast_analyticOrderNatAt (centeredXiZeroOrder_ne_top z) + +noncomputable def centeredXiZeroDivisor := + MeromorphicOn.divisor xiJensenEntire Set.univ + +theorem centeredXiZeroDivisor_support : + Function.support centeredXiZeroDivisor = + xiJensenEntire ⁻¹' {0} := by + have hxi : AnalyticOnNhd ℂ xiJensenEntire Set.univ := + fun z _ ↦ differentiable_xiJensenEntire.analyticAt z + have hfinite : ∀ u : Set.univ, + meromorphicOrderAt xiJensenEntire u.1 ≠ ⊤ := by + intro u + rw [(differentiable_xiJensenEntire.analyticAt u.1).meromorphicOrderAt_eq] + simpa [centeredXiZeroOrder] using centeredXiZeroOrder_ne_top u.1 + have h := hxi.meromorphicNFOn.zero_set_eq_divisor_support hfinite + simpa [centeredXiZeroDivisor] using h.symm + +theorem centeredXiZeroDivisor_finite_on_compact + {K : Set ℂ} (hK : IsCompact K) : + (K ∩ Function.support centeredXiZeroDivisor).Finite := by + have hlocal : LocallyFiniteSupport + (fun z ↦ centeredXiZeroDivisor z) := + fun z ↦ centeredXiZeroDivisor.supportLocallyFiniteWithinDomain z + (by trivial) + exact hlocal.finite_inter_support_of_isCompact hK + +theorem centeredXiZeroDivisor_support_countable : + (Function.support centeredXiZeroDivisor).Countable := by + letI : DiscreteTopology + (Function.support centeredXiZeroDivisor) := + centeredXiZeroDivisor.discreteSupport.to_subtype + exact (HereditarilyLindelofSpace.isLindelof + (Function.support centeredXiZeroDivisor)).countable inferInstance + +/-- Every centered-xi zero is repeated exactly its analytic multiplicity. -/ +def CenteredXiZeroIndex := + Σ z : {w : ℂ // xiJensenEntire w = 0}, + Fin (centeredXiZeroMultiplicity z) + +def centeredXiZeroRoot (i : CenteredXiZeroIndex) : ℂ := i.1 + +noncomputable instance : Encodable CenteredXiZeroIndex := by + classical + have hs : (xiJensenEntire ⁻¹' {0}).Countable := by + rw [← centeredXiZeroDivisor_support] + exact centeredXiZeroDivisor_support_countable + letI : Encodable {z : ℂ // xiJensenEntire z = 0} := hs.toEncodable + unfold CenteredXiZeroIndex + infer_instance + +noncomputable def centeredXiZeroFiber + (z : ℂ) : Finset CenteredXiZeroIndex := by + classical + by_cases hz : xiJensenEntire z = 0 + · exact Finset.univ.map + ⟨fun k ↦ ⟨⟨z, hz⟩, k⟩, by + intro a b h + exact Fin.ext + (congrArg (fun x : CenteredXiZeroIndex ↦ x.2.val) h)⟩ + · exact ∅ + +theorem mem_centeredXiZeroFiber (z : ℂ) (i : CenteredXiZeroIndex) : + i ∈ centeredXiZeroFiber z ↔ centeredXiZeroRoot i = z := by + classical + unfold centeredXiZeroFiber + split_ifs with hz + · constructor + · intro hi + simp only [Finset.mem_map, Finset.mem_univ, true_and] at hi + obtain ⟨k, rfl⟩ := hi + rfl + · intro hi + subst z + simp only [Finset.mem_map, Finset.mem_univ, true_and] + refine ⟨i.2, ?_⟩ + apply Sigma.ext (Subtype.ext rfl) + simp + · simp only [Finset.notMem_empty, false_iff] + intro hi + apply hz + rw [← hi] + exact i.1.property + +theorem card_centeredXiZeroFiber (z : ℂ) : + (centeredXiZeroFiber z).card = centeredXiZeroMultiplicity z := by + classical + unfold centeredXiZeroFiber + split_ifs with hz + · rw [Finset.card_map, Finset.card_univ, Fintype.card_fin] + · have hm : centeredXiZeroMultiplicity z = 0 := by + rw [← Nat.cast_inj (R := ℕ∞), centeredXiZeroMultiplicity_cast] + unfold centeredXiZeroOrder + simp only [Nat.cast_zero] + rw [(differentiable_xiJensenEntire.analyticAt z).analyticOrderAt_eq_zero] + exact hz + simp [hm] + +theorem centeredXiZeroDivisor_apply (z : ℂ) : + centeredXiZeroDivisor z = + (centeredXiZeroMultiplicity z : ℤ) := by + unfold centeredXiZeroDivisor + have hA : AnalyticAt ℂ xiJensenEntire z := + differentiable_xiJensenEntire.analyticAt z + have hM : MeromorphicOn xiJensenEntire Set.univ := + fun w _ ↦ differentiable_xiJensenEntire.analyticAt w |>.meromorphicAt + rw [MeromorphicOn.divisor_apply hM (Set.mem_univ z), + hA.meromorphicOrderAt_eq] + have ho : analyticOrderAt xiJensenEntire z = + (centeredXiZeroMultiplicity z : ℕ∞) := by + simpa [centeredXiZeroOrder] using + (centeredXiZeroMultiplicity_cast z).symm + rw [ho] + simp + +theorem centeredXiZeroMultiplicity_pos_iff (z : ℂ) : + 0 < centeredXiZeroMultiplicity z ↔ xiJensenEntire z = 0 := by + rw [Nat.pos_iff_ne_zero] + constructor + · intro hm + apply (differentiable_xiJensenEntire.analyticAt z).analyticOrderAt_ne_zero.mp + intro ho + apply hm + rw [← Nat.cast_inj (R := ℕ∞), centeredXiZeroMultiplicity_cast] + simpa [centeredXiZeroOrder] using ho + · intro hz hm + have ho := + (differentiable_xiJensenEntire.analyticAt z).analyticOrderAt_ne_zero.mpr hz + apply ho + change centeredXiZeroOrder z = 0 + rw [← centeredXiZeroMultiplicity_cast] + simp [hm] + +theorem exists_centeredXiZeroRoot_iff (z : ℂ) : + (∃ i : CenteredXiZeroIndex, centeredXiZeroRoot i = z) ↔ + xiJensenEntire z = 0 := by + constructor + · rintro ⟨i, rfl⟩ + exact i.1.property + · intro hz + have hcard : 0 < (centeredXiZeroFiber z).card := by + rw [card_centeredXiZeroFiber, centeredXiZeroMultiplicity_pos_iff] + exact hz + obtain ⟨i, hi⟩ := Finset.card_pos.mp hcard + exact ⟨i, (mem_centeredXiZeroFiber z i).mp hi⟩ + +theorem centeredXiZeroRoot_ne_zero (i : CenteredXiZeroIndex) : + centeredXiZeroRoot i ≠ 0 := by + intro hi + have hzero : xiJensenEntire (centeredXiZeroRoot i) = 0 := by + simpa only [centeredXiZeroRoot] using i.1.property + rw [hi, ← xiJensenGeneratingFunction_sq 0] at hzero + simp only [zero_pow two_ne_zero] at hzero + rw [xiJensenGeneratingFunction_zero] at hzero + exact Complex.ofReal_ne_zero.mpr + (ne_of_gt (xiGamma_strictlyPositive 0)) hzero + +theorem centeredXiZeroIndex_finite_norm_le (R : ℝ) : + {i : CenteredXiZeroIndex | ‖centeredXiZeroRoot i‖ ≤ R}.Finite := by + let Z : Set ℂ := + Metric.closedBall 0 R ∩ Function.support centeredXiZeroDivisor + have hZ : Z.Finite := + centeredXiZeroDivisor_finite_on_compact + (ProperSpace.isCompact_closedBall 0 R) + have hU : (⋃ z ∈ Z, (↑(centeredXiZeroFiber z) : + Set CenteredXiZeroIndex)).Finite := by + apply hZ.biUnion + intro z hz + exact Finset.finite_toSet _ + apply hU.subset + intro i hi + simp only [Set.mem_setOf_eq] at hi + have hzball : centeredXiZeroRoot i ∈ Metric.closedBall 0 R := by + simpa [Metric.mem_closedBall, dist_zero_right] using hi + have hzsupport : centeredXiZeroRoot i ∈ + Function.support centeredXiZeroDivisor := by + rw [centeredXiZeroDivisor_support] + exact i.1.property + apply Set.mem_iUnion_of_mem (centeredXiZeroRoot i) + apply Set.mem_iUnion_of_mem ⟨hzball, hzsupport⟩ + exact (mem_centeredXiZeroFiber _ _).mpr rfl + +theorem centeredXiZeroRoot_escape : + Filter.Tendsto (fun i : CenteredXiZeroIndex ↦ ‖centeredXiZeroRoot i‖) + Filter.cofinite Filter.atTop := by + apply Filter.tendsto_atTop.mpr + intro R + change {i : CenteredXiZeroIndex | + R ≤ ‖centeredXiZeroRoot i‖} ∈ Filter.cofinite + rw [Filter.mem_cofinite] + apply (centeredXiZeroIndex_finite_norm_le R).subset + intro i hi + simp only [Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hi ⊢ + exact hi.le + +theorem centeredXiZeroRoot_re_eq_zero + (hzero : XiCenteredCriticalZeroReality) (i : CenteredXiZeroIndex) : + (centeredXiZeroRoot i).re = 0 := + hzero _ i.1.property + +theorem centeredXiZeroOrder_neg (z : ℂ) : + centeredXiZeroOrder (-z) = centeredXiZeroOrder z := by + let g : ℂ → ℂ := fun w ↦ -w + have hg : AnalyticAt ℂ g z := by + dsimp only [g] + fun_prop + have hgd : deriv g z ≠ 0 := by + dsimp only [g] + simp + have hcomp := analyticOrderAt_comp_of_deriv_ne_zero + (f := xiJensenEntire) hg hgd + have heq : xiJensenEntire ∘ g = xiJensenEntire := by + funext w + exact xiJensenEntire_neg w + unfold centeredXiZeroOrder + rw [heq] at hcomp + exact hcomp.symm + +theorem centeredXiZeroMultiplicity_neg (z : ℂ) : + centeredXiZeroMultiplicity (-z) = centeredXiZeroMultiplicity z := by + rw [← ENat.coe_inj, centeredXiZeroMultiplicity_cast, + centeredXiZeroMultiplicity_cast, centeredXiZeroOrder_neg] + +/-- The fixed-point-free negation involution on the multiplicity enumeration. -/ +noncomputable def centeredXiZeroIndexNeg + (i : CenteredXiZeroIndex) : CenteredXiZeroIndex := + ⟨⟨-centeredXiZeroRoot i, by + rw [xiJensenEntire_neg] + exact i.1.property⟩, + Fin.cast (centeredXiZeroMultiplicity_neg + (centeredXiZeroRoot i)).symm i.2⟩ + +@[simp] +theorem centeredXiZeroRoot_indexNeg (i : CenteredXiZeroIndex) : + centeredXiZeroRoot (centeredXiZeroIndexNeg i) = + -centeredXiZeroRoot i := + rfl + +theorem centeredXiZeroRoot_im_ne_zero + (hzero : XiCenteredCriticalZeroReality) (i : CenteredXiZeroIndex) : + (centeredXiZeroRoot i).im ≠ 0 := by + intro him + apply centeredXiZeroRoot_ne_zero i + apply Complex.ext + · exact centeredXiZeroRoot_re_eq_zero hzero i + · exact him + +/-- One representative from each `±` pair, retaining every unit of analytic +multiplicity on the positive-imaginary side. -/ +abbrev CenteredXiPositiveZeroIndex := + {i : CenteredXiZeroIndex // 0 < (centeredXiZeroRoot i).im} + +noncomputable instance : Encodable CenteredXiPositiveZeroIndex := + (Set.to_countable + {i : CenteredXiZeroIndex | 0 < (centeredXiZeroRoot i).im}).toEncodable + +def centeredXiPositiveSquaredOrdinate + (i : CenteredXiPositiveZeroIndex) : ℝ := + (centeredXiZeroRoot i.1).im ^ 2 + +theorem centeredXiPositiveSquaredOrdinate_pos + (i : CenteredXiPositiveZeroIndex) : + 0 < centeredXiPositiveSquaredOrdinate i := by + unfold centeredXiPositiveSquaredOrdinate + exact sq_pos_of_pos i.property + +theorem centeredXiZeroIndex_positive_or_neg_positive + (hzero : XiCenteredCriticalZeroReality) (i : CenteredXiZeroIndex) : + 0 < (centeredXiZeroRoot i).im ∨ + 0 < (centeredXiZeroRoot (centeredXiZeroIndexNeg i)).im := by + rcases lt_or_gt_of_ne (centeredXiZeroRoot_im_ne_zero hzero i) with h | h + · right + simpa using neg_pos.mpr h + · exact Or.inl h + +/-- The quantitative zero-counting input required to turn the paired RH +enumeration into a normally convergent genus-zero product. -/ +def XiCenteredZeroInverseSquareSummability : Prop := + Summable (fun i : CenteredXiZeroIndex ↦ + ‖(centeredXiZeroRoot i)⁻¹‖ ^ 2) + +theorem summable_dyadic_linear_majorant_jensen (A : ℝ) : + Summable (fun N : ℕ ↦ + A * (N + 1 : ℝ) * (1 / 2 : ℝ) ^ N) := by + have hnat : Summable (fun N : ℕ ↦ + (N : ℝ) * (1 / 2 : ℝ) ^ N) := by + simpa using + (summable_pow_mul_geometric_of_norm_lt_one (R := ℝ) 1 + (r := (1 / 2 : ℝ)) (by norm_num)) + have hone : Summable (fun N : ℕ ↦ (1 / 2 : ℝ) ^ N) := + summable_geometric_of_norm_lt_one (by norm_num) + apply ((hnat.add hone).mul_left A).congr + intro N + ring + +/-- An order-one `O(R log R)` dyadic multiplicity count implies +inverse-square summability. -/ +theorem summable_norm_inv_sq_of_dyadic_count_jensen + {ι : Type*} [DecidableEq ι] (root : ι → ℂ) + (shell : ℕ → Finset ι) + (hpartition : ∀ i, ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + (2 : ℝ) ^ N ≤ ‖root i‖) + (A : ℝ) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * (2 : ℝ) ^ N * (N + 1 : ℝ)) : + Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2) := by + rw [summable_partition (f := fun i ↦ ‖(root i)⁻¹‖ ^ 2) + (fun i ↦ sq_nonneg _) (s := fun N ↦ ↑(shell N)) + (by simpa using hpartition)] + constructor + · intro N + apply summable_of_hasFiniteSupport + exact Set.toFinite _ + · apply (summable_dyadic_linear_majorant_jensen A).of_nonneg_of_le + · intro N + exact tsum_nonneg fun _ ↦ sq_nonneg _ + · intro N + rw [tsum_fintype] + have hpow : 0 < (2 : ℝ) ^ N := pow_pos (by norm_num) _ + calc + ∑ i : ↥(↑(shell N) : Set ι), ‖(root i)⁻¹‖ ^ 2 + ≤ ∑ _i : ↥(↑(shell N) : Set ι), + 1 / ((2 : ℝ) ^ N) ^ 2 := by + apply Finset.sum_le_sum + intro i hi + rw [norm_inv, inv_pow] + have hsquareRoot : + ((2 : ℝ) ^ N) ^ 2 ≤ ‖root i‖ ^ 2 := + (sq_le_sq₀ hpow.le (norm_nonneg _)).mpr + (hlower N i i.property) + simpa [one_div] using + inv_anti₀ (sq_pos_of_pos hpow) hsquareRoot + _ = ((shell N).card : ℝ) / + ((2 : ℝ) ^ N) ^ 2 := by + simp [div_eq_mul_inv] + _ ≤ (A * (2 : ℝ) ^ N * (N + 1 : ℝ)) / + ((2 : ℝ) ^ N) ^ 2 := by + exact div_le_div_of_nonneg_right (hcount N) (sq_nonneg _) + _ = A * (N + 1 : ℝ) * (1 / 2 : ℝ) ^ N := by + field_simp + rw [div_pow] + norm_num + +theorem summable_norm_inv_sq_of_finite_low_dyadic_count_jensen + {ι : Type*} [DecidableEq ι] (root : ι → ℂ) + (low : Finset ι) + (shell : ℕ → Finset {i : ι // i ∉ low}) + (hpartition : ∀ i : {i : ι // i ∉ low}, + ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + (2 : ℝ) ^ N ≤ ‖root i‖) + (A : ℝ) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * (2 : ℝ) ^ N * (N + 1 : ℝ)) : + Summable (fun i ↦ ‖(root i)⁻¹‖ ^ 2) := by + have hc : Summable (fun i : {i : ι // i ∉ low} ↦ + ‖(root i)⁻¹‖ ^ 2) := + summable_norm_inv_sq_of_dyadic_count_jensen + (fun i : {i : ι // i ∉ low} ↦ root i) + shell hpartition hlower A hcount + exact (low.summable_compl_iff).mp hc + +theorem centeredXi_inverseSquareSummability_of_dyadicZeroCount + (low : Finset CenteredXiZeroIndex) + (shell : ℕ → Finset {i : CenteredXiZeroIndex // i ∉ low}) + (hpartition : ∀ i : {i : CenteredXiZeroIndex // i ∉ low}, + ∃! N, i ∈ shell N) + (hlower : ∀ N i, i ∈ shell N → + (2 : ℝ) ^ N ≤ ‖centeredXiZeroRoot i‖) + (A : ℝ) + (hcount : ∀ N, ((shell N).card : ℝ) ≤ + A * (2 : ℝ) ^ N * (N + 1 : ℝ)) : + XiCenteredZeroInverseSquareSummability := by + classical + exact summable_norm_inv_sq_of_finite_low_dyadic_count_jensen + centeredXiZeroRoot low shell hpartition hlower A hcount + +noncomputable def centeredXiZeroIndexWindow + (r : ℝ) : Finset CenteredXiZeroIndex := + (centeredXiZeroIndex_finite_norm_le r).toFinset + +@[simp] +theorem mem_centeredXiZeroIndexWindow + (r : ℝ) (i : CenteredXiZeroIndex) : + i ∈ centeredXiZeroIndexWindow r ↔ + ‖centeredXiZeroRoot i‖ ≤ r := by + simp [centeredXiZeroIndexWindow] + +theorem existsUnique_dyadic_interval_jensen (x : ℝ) (hx : 1 ≤ x) : + ∃! N : ℕ, + (2 : ℝ) ^ N ≤ x ∧ x < (2 : ℝ) ^ (N + 1) := by + let p : ℕ → Prop := fun N ↦ x < (2 : ℝ) ^ (N + 1) + have hp : ∃ N, p N := by + obtain ⟨n, hn⟩ := + pow_unbounded_of_one_lt x (by norm_num : (1 : ℝ) < 2) + exact ⟨n, hn.trans_le + (pow_le_pow_right₀ (by norm_num) (Nat.le_succ n))⟩ + let N := Nat.find hp + have hupper : x < (2 : ℝ) ^ (N + 1) := + Nat.find_spec hp + have hlower : (2 : ℝ) ^ N ≤ x := by + by_contra h + have hxlt : x < (2 : ℝ) ^ N := lt_of_not_ge h + by_cases hN : N = 0 + · rw [hN] at hxlt + norm_num at hxlt + linarith + · obtain ⟨k, hk⟩ := Nat.exists_eq_succ_of_ne_zero hN + have hpk : p k := by + dsimp [p] + rw [hk] at hxlt + simpa [Nat.succ_eq_add_one] using hxlt + exact (Nat.find_min hp (by omega)) hpk + refine ⟨N, ⟨hlower, hupper⟩, ?_⟩ + intro M hM + apply le_antisymm + · by_contra hle + have hMN : N < M := lt_of_not_ge hle + have hpowers : (2 : ℝ) ^ (N + 1) ≤ (2 : ℝ) ^ M := + pow_le_pow_right₀ (by norm_num) (by omega) + linarith [hupper, hM.1] + · by_contra hle + have hNM : M < N := lt_of_not_ge hle + have hpowers : (2 : ℝ) ^ (M + 1) ≤ (2 : ℝ) ^ N := + pow_le_pow_right₀ (by norm_num) (by omega) + linarith [hM.2, hlower] + +noncomputable def centeredXiDyadicZeroShell + (low : Finset CenteredXiZeroIndex) (N : ℕ) : + Finset {i : CenteredXiZeroIndex // i ∉ low} := by + classical + exact Finset.subtype (fun i ↦ i ∉ low) + ((centeredXiZeroIndexWindow ((2 : ℝ) ^ (N + 1))).filter + fun i ↦ (2 : ℝ) ^ N ≤ ‖centeredXiZeroRoot i‖ ∧ + ‖centeredXiZeroRoot i‖ < (2 : ℝ) ^ (N + 1)) + +@[simp] +theorem mem_centeredXiDyadicZeroShell + (low : Finset CenteredXiZeroIndex) (N : ℕ) + (i : {i : CenteredXiZeroIndex // i ∉ low}) : + i ∈ centeredXiDyadicZeroShell low N ↔ + (2 : ℝ) ^ N ≤ ‖centeredXiZeroRoot i‖ ∧ + ‖centeredXiZeroRoot i‖ < (2 : ℝ) ^ (N + 1) := by + classical + simp [centeredXiDyadicZeroShell] + intro _ h + exact h.le + +theorem centeredXiDyadicZeroShell_partition + (R : ℝ) (hR : 1 ≤ R) : + ∀ i : {i : CenteredXiZeroIndex // + i ∉ centeredXiZeroIndexWindow R}, + ∃! N, i ∈ + centeredXiDyadicZeroShell (centeredXiZeroIndexWindow R) N := by + intro i + have hiR : R < ‖centeredXiZeroRoot i‖ := by + simpa using i.property + obtain ⟨N, hN, huniq⟩ := + existsUnique_dyadic_interval_jensen ‖centeredXiZeroRoot i‖ + (hR.trans hiR.le) + refine ⟨N, (mem_centeredXiDyadicZeroShell _ _ _).mpr hN, ?_⟩ + intro M hM + exact huniq M ((mem_centeredXiDyadicZeroShell _ _ _).mp hM) + +theorem centeredXiDyadicZeroShell_card_le_window + (low : Finset CenteredXiZeroIndex) (N : ℕ) : + (centeredXiDyadicZeroShell low N).card ≤ + (centeredXiZeroIndexWindow ((2 : ℝ) ^ (N + 1))).card := by + classical + unfold centeredXiDyadicZeroShell + rw [Finset.card_subtype] + exact (Finset.card_filter_le _ _).trans + (Finset.card_filter_le _ _) + +/-- Exact multiplicity-counting consequence required from Jensen's formula +and order-one growth. Pinned Mathlib has no Riemann--von Mangoldt zero-count +theorem from which to derive this bound. -/ +def XiCenteredDyadicOrderOneZeroCount : Prop := + ∃ R A : ℝ, 1 ≤ R ∧ + ∀ N, ((centeredXiDyadicZeroShell + (centeredXiZeroIndexWindow R) N).card : ℝ) ≤ + A * (2 : ℝ) ^ N * (N + 1 : ℝ) + +/-- A standard Riemann--von Mangoldt/Jensen cumulative upper bound, counting +the canonical centered-xi multiplicity indices. -/ +def XiCenteredCumulativeZeroCount : Prop := + ∃ A R : ℝ, 0 ≤ A ∧ 1 ≤ R ∧ + ∀ r : ℝ, R ≤ r → + ((centeredXiZeroIndexWindow r).card : ℝ) ≤ + A * r * Real.log (2 * r + 2) + +/-- Finite divisor contributed by the multiplicity indices in one centered +xi radial window. -/ +noncomputable def centeredXiZeroIndexWindowDivisor (r : ℝ) := + ∑ i ∈ centeredXiZeroIndexWindow r, + Function.locallyFinsuppWithin.single (centeredXiZeroRoot i) (1 : ℤ) + +theorem centeredXiZeroIndexWindowDivisor_le (r : ℝ) : + centeredXiZeroIndexWindowDivisor r ≤ centeredXiZeroDivisor := by + classical + intro z + rw [centeredXiZeroDivisor_apply] + unfold centeredXiZeroIndexWindowDivisor + have heval := congrFun + (Function.locallyFinsuppWithin.coe_sum + (s := centeredXiZeroIndexWindow r) + (F := fun i ↦ Function.locallyFinsuppWithin.single + (centeredXiZeroRoot i) (1 : ℤ))) z + rw [heval, Finset.sum_apply] + simp only [Function.locallyFinsuppWithin.single_apply, + Finset.sum_ite, Finset.sum_const_zero, add_zero, Finset.sum_const, + nsmul_eq_mul, mul_one] + norm_cast + calc + {i ∈ centeredXiZeroIndexWindow r | + z = centeredXiZeroRoot i}.card + ≤ (centeredXiZeroFiber z).card := by + apply Finset.card_le_card + intro i hi + simp only [Finset.mem_filter] at hi + exact (mem_centeredXiZeroFiber z i).mpr hi.2.symm + _ = centeredXiZeroMultiplicity z := card_centeredXiZeroFiber z + +theorem centeredXiZeroDivisor_logCounting : + Function.locallyFinsuppWithin.logCounting centeredXiZeroDivisor = + ValueDistribution.logCounting xiJensenEntire 0 := by + rw [ValueDistribution.logCounting_zero] + have hxi : AnalyticOnNhd ℂ xiJensenEntire Set.univ := + fun z _ ↦ differentiable_xiJensenEntire.analyticAt z + have hnonneg : 0 ≤ MeromorphicOn.divisor xiJensenEntire Set.univ := + MeromorphicOn.AnalyticOnNhd.divisor_nonneg hxi + unfold centeredXiZeroDivisor + rw [posPart_eq_self.mpr hnonneg] + +theorem xiJensenEntire_zero_ne : xiJensenEntire 0 ≠ 0 := by + rw [← xiJensenGeneratingFunction_sq 0] + simp only [zero_pow two_ne_zero] + rw [xiJensenGeneratingFunction_zero] + exact Complex.ofReal_ne_zero.mpr + (ne_of_gt (xiGamma_strictlyPositive 0)) + +theorem centeredXiZeroDivisor_logCounting_eq_circleAverage + {R : ℝ} (hR : R ≠ 0) : + Function.locallyFinsuppWithin.logCounting centeredXiZeroDivisor R = + Real.circleAverage (Real.log ‖xiJensenEntire ·‖) 0 R - + Real.log ‖xiJensenEntire 0‖ := by + unfold centeredXiZeroDivisor + have hmer : Meromorphic xiJensenEntire := + fun z ↦ (differentiable_xiJensenEntire.analyticAt z).meromorphicAt + rw [Function.locallyFinsuppWithin.logCounting_divisor_eq_circleAverage_sub_const + hmer hR] + rw [(differentiable_xiJensenEntire.analyticAt 0).meromorphicTrailingCoeffAt_of_ne_zero + xiJensenEntire_zero_ne] + +theorem centeredXiZeroIndexWindow_card_mul_log_two_le_logCounting + {r : ℝ} (hr : 1 ≤ r) : + ((centeredXiZeroIndexWindow r).card : ℝ) * Real.log 2 ≤ + Function.locallyFinsuppWithin.logCounting + centeredXiZeroDivisor (2 * r) := by + calc + ((centeredXiZeroIndexWindow r).card : ℝ) * Real.log 2 = + ∑ _i ∈ centeredXiZeroIndexWindow r, Real.log 2 := by simp + _ ≤ ∑ i ∈ centeredXiZeroIndexWindow r, + Function.locallyFinsuppWithin.logCounting + (Function.locallyFinsuppWithin.single + (centeredXiZeroRoot i) 1) (2 * r) := by + apply Finset.sum_le_sum + intro i hi + have hir : ‖centeredXiZeroRoot i‖ ≤ r := + (mem_centeredXiZeroIndexWindow r i).mp hi + rw [Function.locallyFinsuppWithin.logCounting_single_eq_log_sub_const + (hir.trans (by linarith))] + norm_num + rw [← Real.log_div (by positivity) + (norm_ne_zero_iff.mpr (centeredXiZeroRoot_ne_zero i))] + apply Real.log_le_log (by norm_num) + rw [le_div_iff₀ + (norm_pos_iff.mpr (centeredXiZeroRoot_ne_zero i))] + nlinarith + _ = Function.locallyFinsuppWithin.logCounting + (centeredXiZeroIndexWindowDivisor r) (2 * r) := by + unfold centeredXiZeroIndexWindowDivisor + rw [map_sum, Finset.sum_apply] + _ ≤ Function.locallyFinsuppWithin.logCounting + centeredXiZeroDivisor (2 * r) := + Function.locallyFinsuppWithin.logCounting_le + (centeredXiZeroIndexWindowDivisor_le r) (by linarith) + +/-- Actual centered-xi cumulative multiplicity bound, reconstructed from the +proved Gamma/Mellin-strip order-one estimate and Jensen's formula. -/ +theorem xiCenteredCumulativeZeroCount_actual : + XiCenteredCumulativeZeroCount := by + obtain ⟨C, R, hC, hR, hbound⟩ := + exists_xiJensenEntire_orderOneGrowthBound + let K := |Real.log ‖xiJensenEntire 0‖| + let A := (2 * C + K / Real.log 2) / Real.log 2 + let R' := max 1 (max (R / 2) 2) + refine ⟨A, R', ?_, le_max_left _ _, ?_⟩ + · exact div_nonneg + (add_nonneg (mul_nonneg (by norm_num) hC) + (div_nonneg (abs_nonneg _) (Real.log_nonneg (by norm_num)))) + (Real.log_nonneg (by norm_num)) + intro r hr + have hr1 : 1 ≤ r := (le_max_left _ _).trans hr + have hr2 : 2 ≤ r := + (le_max_right 1 (max (R / 2) 2)).trans hr |> + (le_max_right (R / 2) 2).trans + have hR2r : R ≤ 2 * r := by + have h : R / 2 ≤ r := (le_max_left (R / 2) 2).trans + ((le_max_right 1 (max (R / 2) 2)).trans hr) + linarith + have hweighted := + centeredXiZeroIndexWindow_card_mul_log_two_le_logCounting hr1 + have hcount : + Function.locallyFinsuppWithin.logCounting + centeredXiZeroDivisor (2 * r) ≤ + (2 * C + K / Real.log 2) * r * Real.log (2 * r + 2) := by + rw [centeredXiZeroDivisor_logCounting_eq_circleAverage (by linarith)] + have havg : + Real.circleAverage (Real.log ‖xiJensenEntire ·‖) 0 (2 * r) ≤ + C * (2 * r) * Real.log (2 * r + 2) := by + apply Real.circleAverage_mono_on_of_le_circle + · have hm : MeromorphicOn xiJensenEntire + (Metric.sphere 0 |2 * r|) := + fun z _ ↦ + (differentiable_xiJensenEntire.analyticAt z).meromorphicAt + exact hm.circleIntegrable_log_norm + intro z hz + have hzr : ‖z‖ = 2 * r := by + simpa [Metric.mem_sphere, dist_zero_right, + abs_of_nonneg (by linarith : 0 ≤ 2 * r)] using hz + have hn := hbound z (by rw [hzr]; exact hR2r) + rw [hzr] at hn + by_cases hzero : xiJensenEntire z = 0 + · simp [hzero] + exact mul_nonneg (mul_nonneg hC (by linarith)) + (Real.log_nonneg (by linarith)) + · exact (Real.log_le_iff_le_exp + (norm_pos_iff.mpr hzero)).mpr hn + have hK : -Real.log ‖xiJensenEntire 0‖ ≤ K := by + exact neg_le_abs _ + calc + Real.circleAverage (Real.log ‖xiJensenEntire ·‖) 0 (2 * r) - + Real.log ‖xiJensenEntire 0‖ + ≤ C * (2 * r) * Real.log (2 * r + 2) + K := by linarith + _ ≤ (2 * C + K / Real.log 2) * r * Real.log (2 * r + 2) := by + have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) + have hlog : + Real.log 2 ≤ r * Real.log (2 * r + 2) := by + have hmono : Real.log 2 ≤ Real.log (2 * r + 2) := + Real.log_le_log (by norm_num) (by linarith) + have hnon : 0 ≤ Real.log (2 * r + 2) := + Real.log_nonneg (by linarith) + calc + Real.log 2 ≤ Real.log (2 * r + 2) := hmono + _ ≤ r * Real.log (2 * r + 2) := by nlinarith + have hK0 : 0 ≤ K := abs_nonneg _ + have hKscale : + K ≤ (K / Real.log 2) * + (r * Real.log (2 * r + 2)) := by + calc + K = (K / Real.log 2) * Real.log 2 := by field_simp + _ ≤ (K / Real.log 2) * + (r * Real.log (2 * r + 2)) := + mul_le_mul_of_nonneg_left hlog + (div_nonneg hK0 hlog2.le) + nlinarith + have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) + dsimp [A] + rw [show (2 * C + K / Real.log 2) / Real.log 2 * r * + Real.log (2 * r + 2) = + ((2 * C + K / Real.log 2) * r * + Real.log (2 * r + 2)) / Real.log 2 by ring] + exact (le_div_iff₀ hlog2).mpr (hweighted.trans hcount) + +theorem centeredXiDyadicZeroShell_card_le_of_cumulative + {A R : ℝ} (hA : 0 ≤ A) + (hcum : ∀ r : ℝ, R ≤ r → + ((centeredXiZeroIndexWindow r).card : ℝ) ≤ + A * r * Real.log (2 * r + 2)) : + ∀ N, + ((centeredXiDyadicZeroShell + (centeredXiZeroIndexWindow R) N).card : ℝ) ≤ + (6 * A * Real.log 2) * (2 : ℝ) ^ N * + (N + 1 : ℝ) := by + intro N + let r : ℝ := (2 : ℝ) ^ (N + 1) + by_cases hr : R ≤ r + · have hcard : + ((centeredXiDyadicZeroShell + (centeredXiZeroIndexWindow R) N).card : ℝ) ≤ + ((centeredXiZeroIndexWindow r).card : ℝ) := by + dsimp [r] + exact_mod_cast centeredXiDyadicZeroShell_card_le_window + (centeredXiZeroIndexWindow R) N + have hcum' := hcard.trans (hcum r hr) + have hargpos : 0 < 2 * r + 2 := by positivity + have harg : 2 * r + 2 ≤ (2 : ℝ) ^ (N + 3) := by + dsimp [r] + rw [pow_add, pow_add] + norm_num + have hpow : 1 ≤ (2 : ℝ) ^ N := + one_le_pow₀ (by norm_num) + nlinarith + have hlog : Real.log (2 * r + 2) ≤ + 3 * (N + 1 : ℝ) * Real.log 2 := by + calc + Real.log (2 * r + 2) ≤ + Real.log ((2 : ℝ) ^ (N + 3)) := + Real.log_le_log hargpos harg + _ = (N + 3 : ℕ) * Real.log 2 := by + rw [Real.log_pow] + _ ≤ 3 * (N + 1 : ℝ) * Real.log 2 := by + have hlog2 : 0 ≤ Real.log 2 := + Real.log_nonneg (by norm_num) + norm_num [Nat.cast_add] + nlinarith + calc + ((centeredXiDyadicZeroShell + (centeredXiZeroIndexWindow R) N).card : ℝ) + ≤ A * r * Real.log (2 * r + 2) := hcum' + _ ≤ A * r * (3 * (N + 1 : ℝ) * Real.log 2) := by + gcongr + _ = (6 * A * Real.log 2) * (2 : ℝ) ^ N * + (N + 1 : ℝ) := by + dsimp [r] + rw [pow_succ] + ring + · have hempty : + centeredXiDyadicZeroShell + (centeredXiZeroIndexWindow R) N = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro i hi + have hiShell := + (mem_centeredXiDyadicZeroShell _ _ _).mp hi + have hiR : R < ‖centeredXiZeroRoot i‖ := by + simpa using i.property + exact hr (hiR.le.trans hiShell.2.le) + rw [hempty] + simp + positivity + +theorem xiCenteredDyadicOrderOneZeroCount_of_cumulative + (h : XiCenteredCumulativeZeroCount) : + XiCenteredDyadicOrderOneZeroCount := by + rcases h with ⟨A, R, hA, hR, hcum⟩ + exact ⟨R, 6 * A * Real.log 2, hR, + centeredXiDyadicZeroShell_card_le_of_cumulative hA hcum⟩ + +theorem centeredXi_inverseSquareSummability_of_orderOneZeroCount + (hcount : XiCenteredDyadicOrderOneZeroCount) : + XiCenteredZeroInverseSquareSummability := by + classical + rcases hcount with ⟨R, A, hR, hcount⟩ + apply centeredXi_inverseSquareSummability_of_dyadicZeroCount + (centeredXiZeroIndexWindow R) + (centeredXiDyadicZeroShell (centeredXiZeroIndexWindow R)) + (centeredXiDyadicZeroShell_partition R hR) + (A := A) + · intro N i hi + exact (mem_centeredXiDyadicZeroShell _ _ _).mp hi |>.1 + · exact hcount + +theorem centeredXi_inverseSquareSummability_of_cumulativeZeroCount + (h : XiCenteredCumulativeZeroCount) : + XiCenteredZeroInverseSquareSummability := + centeredXi_inverseSquareSummability_of_orderOneZeroCount + (xiCenteredDyadicOrderOneZeroCount_of_cumulative h) + +theorem centeredXi_inverseSquareSummability_actual : + XiCenteredZeroInverseSquareSummability := + centeredXi_inverseSquareSummability_of_cumulativeZeroCount + xiCenteredCumulativeZeroCount_actual + +theorem summable_positiveSquaredOrdinate_inv + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + Summable (fun i : CenteredXiPositiveZeroIndex ↦ + |(centeredXiPositiveSquaredOrdinate i)⁻¹|) := by + have hsub := hsum.subtype + (p := fun i : CenteredXiZeroIndex ↦ + 0 < (centeredXiZeroRoot i).im) + apply hsub.congr + intro i + have hre : (centeredXiZeroRoot i.1).re = 0 := + centeredXiZeroRoot_re_eq_zero hzero i.1 + have hz : centeredXiZeroRoot i.1 = + ((centeredXiZeroRoot i.1).im : ℂ) * Complex.I := by + apply Complex.ext + · simp [hre] + · simp + change ‖(centeredXiZeroRoot i.1)⁻¹‖ ^ 2 = + |(centeredXiPositiveSquaredOrdinate i)⁻¹| + rw [hz] + simp only [centeredXiPositiveSquaredOrdinate, norm_inv, norm_mul, + Complex.norm_real, Complex.norm_I, mul_one, Real.norm_eq_abs, + abs_of_pos i.property, inv_pow] + rw [abs_inv, abs_pow, abs_of_pos i.property] + +theorem log_norm_one_add_lower_of_norm_le_half_jensen + {w : ℂ} (hw : ‖w‖ ≤ 1 / 2) : + -(3 / 2 : ℝ) * ‖w‖ ≤ Real.log ‖1 + w‖ := by + rw [← Complex.log_re] + have hlog := Complex.norm_log_one_add_half_le_self hw + have hre : + -‖Complex.log (1 + w)‖ ≤ (Complex.log (1 + w)).re := + (abs_le.mp (abs_re_le_norm (Complex.log (1 + w)))).1 + simpa only [neg_mul] using (neg_le_neg hlog).trans hre + +theorem norm_tprod_one_add_lower_of_norm_le_half_jensen + {ι : Type*} {f : ι → ℂ} + (hsum : Summable (fun i ↦ ‖f i‖)) + (hhalf : ∀ i, ‖f i‖ ≤ 1 / 2) : + Real.exp (-(3 / 2 : ℝ) * ∑' i, ‖f i‖) ≤ + ‖∏' i, (1 + f i)‖ := by + have hne : ∀ i, 1 + f i ≠ 0 := by + intro i hi + have hfi : f i = -1 := by linear_combination hi + have hh := hhalf i + rw [hfi] at hh + norm_num at hh + have hmult : Multipliable (fun i ↦ 1 + f i) := + multipliable_one_add_of_summable hsum + have hlogsum : Summable (fun i ↦ Real.log ‖1 + f i‖) := + hsum.summable_log_norm_one_add + rw [hmult.norm_tprod, + ← Real.rexp_tsum_eq_tprod + (fun i ↦ norm_pos_iff.mpr (hne i)) hlogsum] + apply Real.exp_le_exp.mpr + calc + -(3 / 2 : ℝ) * ∑' i, ‖f i‖ = + ∑' i, -(3 / 2 : ℝ) * ‖f i‖ := by + rw [← tsum_mul_left] + _ ≤ ∑' i, Real.log ‖1 + f i‖ := + (hsum.mul_left _).tsum_le_tsum + (fun i ↦ log_norm_one_add_lower_of_norm_le_half_jensen (hhalf i)) + hlogsum + +theorem hasProdLocallyUniformlyOn_centeredXiPositiveFactors + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + HasProdLocallyUniformlyOn + (fun (i : CenteredXiPositiveZeroIndex) (w : ℂ) ↦ + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * w) + (fun w : ℂ ↦ ∏' i : CenteredXiPositiveZeroIndex, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * w)) + Set.univ := + hasProdLocallyUniformlyOn_positiveGenusZeroFactors_indexed + centeredXiPositiveSquaredOrdinate + (summable_positiveSquaredOrdinate_inv hzero hsum) + +noncomputable def centeredXiPairedProduct (z : ℂ) : ℂ := + ∏' i : CenteredXiPositiveZeroIndex, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2) + +noncomputable def centeredXiPositiveZeroWindow (T : ℝ) : + Finset CenteredXiPositiveZeroIndex := by + classical + exact Finset.subtype + (fun i : CenteredXiZeroIndex ↦ 0 < (centeredXiZeroRoot i).im) + (centeredXiZeroIndexWindow T) + +@[simp] +theorem mem_centeredXiPositiveZeroWindow + (T : ℝ) (i : CenteredXiPositiveZeroIndex) : + i ∈ centeredXiPositiveZeroWindow T ↔ + ‖centeredXiZeroRoot i.1‖ ≤ T := by + classical + simp [centeredXiPositiveZeroWindow] + +/-- Restricting to positive-imaginary representatives cannot increase the +multiplicity count in a centered radial window. -/ +theorem centeredXiPositiveZeroWindow_card_le (T : ℝ) : + (centeredXiPositiveZeroWindow T).card ≤ + (centeredXiZeroIndexWindow T).card := by + classical + unfold centeredXiPositiveZeroWindow + rw [Finset.card_subtype] + exact Finset.card_filter_le _ _ + +/-- A cumulative `O(r log r)` multiplicity bound gives the explicit dyadic +`O(2^j(j+1))` positive-window count used by the Cartan head estimate. -/ +theorem exists_centeredXiPositiveZeroWindow_card_le_dyadic + (hcount : XiCenteredCumulativeZeroCount) : + ∃ B R : ℝ, 0 ≤ B ∧ 1 ≤ R ∧ ∀ j : ℕ, + R ≤ (2 : ℝ) ^ (j + 2) → + ((centeredXiPositiveZeroWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) ≤ + B * (2 : ℝ) ^ j * (j + 1 : ℝ) := by + obtain ⟨A, R, hA, hR, hcum⟩ := hcount + let B := 16 * A * Real.log 2 + refine ⟨B, R, by positivity, hR, ?_⟩ + intro j hj + have hc := hcum ((2 : ℝ) ^ (j + 2)) hj + have hpositive : + ((centeredXiPositiveZeroWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) ≤ + ((centeredXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) := by + exact_mod_cast centeredXiPositiveZeroWindow_card_le + ((2 : ℝ) ^ (j + 2)) + have hj2 : (2 : ℝ) ^ (j + 2) = + 4 * (2 : ℝ) ^ j := by + rw [pow_add] + norm_num + ring + have hj4 : (2 : ℝ) ^ (j + 4) = + 16 * (2 : ℝ) ^ j := by + rw [pow_add] + norm_num + ring + have harg : 2 * (2 : ℝ) ^ (j + 2) + 2 ≤ + (2 : ℝ) ^ (j + 4) := by + rw [hj2, hj4] + have hp : 1 ≤ (2 : ℝ) ^ j := + one_le_pow₀ (by norm_num) + nlinarith + have hlog : + Real.log (2 * (2 : ℝ) ^ (j + 2) + 2) ≤ + 4 * (j + 1 : ℝ) * Real.log 2 := by + calc + _ ≤ Real.log ((2 : ℝ) ^ (j + 4)) := + Real.log_le_log (by positivity) harg + _ = (j + 4 : ℕ) * Real.log 2 := by + rw [Real.log_pow] + _ ≤ 4 * (j + 1 : ℝ) * Real.log 2 := by + have hl : 0 ≤ Real.log 2 := + Real.log_nonneg (by norm_num) + norm_num [Nat.cast_add] + nlinarith + calc + ((centeredXiPositiveZeroWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) + ≤ ((centeredXiZeroIndexWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) := hpositive + _ ≤ A * (2 : ℝ) ^ (j + 2) * + Real.log (2 * (2 : ℝ) ^ (j + 2) + 2) := hc + _ ≤ A * (2 : ℝ) ^ (j + 2) * + (4 * (j + 1 : ℝ) * Real.log 2) := by + gcongr + _ = B * (2 : ℝ) ^ j * (j + 1 : ℝ) := by + dsimp [B] + rw [hj2] + ring + +theorem exists_centeredXiPositiveZeroWindow_card_le_dyadic_actual : + ∃ B R : ℝ, 0 ≤ B ∧ 1 ≤ R ∧ ∀ j : ℕ, + R ≤ (2 : ℝ) ^ (j + 2) → + ((centeredXiPositiveZeroWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) ≤ + B * (2 : ℝ) ^ j * (j + 1 : ℝ) := + exists_centeredXiPositiveZeroWindow_card_le_dyadic + xiCenteredCumulativeZeroCount_actual + +/-- Positive-zero windows increase with the radial cutoff. -/ +theorem centeredXiPositiveZeroWindow_mono : + Monotone centeredXiPositiveZeroWindow := by + intro T U hTU + intro i hi + rw [mem_centeredXiPositiveZeroWindow] at hi ⊢ + exact hi.trans hTU + +/-- Dyadic positive-zero windows exhaust the multiplicity index. This is the +precise cofinality fact needed to turn inverse-square summability into a +vanishing radial tail, without assuming a quantitative local zero count. -/ +theorem tendsto_centeredXiPositiveZeroWindow_dyadic : + Tendsto (fun j : ℕ ↦ + centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)) atTop atTop := by + apply (centeredXiPositiveZeroWindow_mono.comp + (monotone_nat_of_le_succ fun j ↦ by + rw [pow_succ] + nlinarith [pow_nonneg (by norm_num : (0 : ℝ) ≤ 2) j])).tendsto_atTop_finset + intro i + have hpow := tendsto_pow_atTop_atTop_of_one_lt + (by norm_num : (1 : ℝ) < 2) + obtain ⟨j, hj⟩ := (hpow.eventually_ge_atTop + ‖centeredXiZeroRoot i.1‖).exists + exact ⟨j, (mem_centeredXiPositiveZeroWindow _ i).mpr hj⟩ + +/-- The finite-head and cardinality logarithmic losses have the common +quadratic-polynomial/geometric scale used below. -/ +theorem tendsto_add_one_sq_div_two_pow_jensen : + Tendsto (fun j : ℕ ↦ + (j + 1 : ℝ) ^ 2 / (2 : ℝ) ^ j) atTop (𝓝 0) := by + have h2 := tendsto_pow_const_div_const_pow_of_one_lt 2 + (by norm_num : (1 : ℝ) < 2) + have h1 := tendsto_pow_const_div_const_pow_of_one_lt 1 + (by norm_num : (1 : ℝ) < 2) + have h0 := tendsto_pow_const_div_const_pow_of_one_lt 0 + (by norm_num : (1 : ℝ) < 2) + convert (h2.add (h1.const_mul 2)).add h0 using 1 + · funext j + norm_num + ring + · norm_num + +theorem tendsto_add_one_div_two_pow_jensen : + Tendsto (fun j : ℕ ↦ + (j + 1 : ℝ) / (2 : ℝ) ^ j) atTop (𝓝 0) := by + have h1 := tendsto_pow_const_div_const_pow_of_one_lt 1 + (by norm_num : (1 : ℝ) < 2) + have h0 := tendsto_pow_const_div_const_pow_of_one_lt 0 + (by norm_num : (1 : ℝ) < 2) + convert h1.add h0 using 1 + · funext j + norm_num + ring + · norm_num + +/-- Crude but sufficient control of the Cartan cardinality logarithm. The +bound only uses a cumulative cardinality majorant, so no hidden unit-shell +Riemann--von Mangoldt estimate enters the proof. -/ +theorem card_mul_log_three_mul_div_sq_le_jensen + {n B H u : ℝ} + (hn : 0 < n) (hB : 0 ≤ B) (hH : 0 < H) + (hu : 0 ≤ u) (hnB : n ≤ B * H * u) : + n * Real.log (3 * n / H) / H ^ 2 ≤ + 3 * B ^ 2 * u ^ 2 / H := by + have hx : 0 ≤ 3 * n / H := by positivity + have hlog := Real.log_le_self hx + have hn2 : n ^ 2 ≤ (B * H * u) ^ 2 := + (sq_le_sq₀ hn.le + (mul_nonneg (mul_nonneg hB hH.le) hu)).mpr hnB + calc + n * Real.log (3 * n / H) / H ^ 2 + ≤ n * (3 * n / H) / H ^ 2 := by gcongr + _ = 3 * n ^ 2 / H ^ 3 := by field_simp + _ ≤ 3 * (B * H * u) ^ 2 / H ^ 3 := by + gcongr + _ = 3 * B ^ 2 * u ^ 2 / H := by + field_simp + +/-- Explicit normalized selected-circle loss. The first term covers the +finite-head root and cardinality logarithms, the second covers xi's +order-one `r log r` upper bound, and the third is the paired-product tail. -/ +noncomputable def CenteredXiDyadicNormalizedLoss + (Ksq Klin : ℝ) + (tail : ℕ → ℝ) (j : ℕ) : ℝ := + Ksq * ((j + 1 : ℝ) ^ 2 / (2 : ℝ) ^ j) + + Klin * ((j + 1 : ℝ) / (2 : ℝ) ^ j) + 6 * tail j + +/-- All explicit normalized head/card-log, xi-growth, and tail losses are +`o(r²)` on dyadic scales once the inverse-square tail vanishes. -/ +theorem tendsto_centeredXiDyadicNormalizedLoss + (Ksq Klin : ℝ) {tail : ℕ → ℝ} + (htail : Tendsto tail atTop (𝓝 0)) : + Tendsto (CenteredXiDyadicNormalizedLoss Ksq Klin tail) + atTop (𝓝 0) := by + have hsq := tendsto_add_one_sq_div_two_pow_jensen.const_mul Ksq + have hlin := tendsto_add_one_div_two_pow_jensen.const_mul Klin + have ht := htail.const_mul 6 + change Tendsto (fun j : ℕ ↦ + Ksq * ((j + 1 : ℝ) ^ 2 / (2 : ℝ) ^ j) + + Klin * ((j + 1 : ℝ) / (2 : ℝ) ^ j) + 6 * tail j) + atTop (𝓝 0) + convert (hsq.add hlin).add ht using 1 + norm_num + +theorem norm_positiveSquaredOrdinate_inv_eq_root_inv_sq + (hzero : XiCenteredCriticalZeroReality) + (i : CenteredXiPositiveZeroIndex) : + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖ = + ‖(centeredXiZeroRoot i.1)⁻¹‖ ^ 2 := by + have hre : (centeredXiZeroRoot i.1).re = 0 := + centeredXiZeroRoot_re_eq_zero hzero i.1 + have hz : centeredXiZeroRoot i.1 = + ((centeredXiZeroRoot i.1).im : ℂ) * Complex.I := by + apply Complex.ext + · simp [hre] + · simp + rw [hz] + simp only [centeredXiPositiveSquaredOrdinate, norm_inv, norm_mul, + Complex.norm_real, Complex.norm_I, mul_one, Real.norm_eq_abs, + abs_of_pos i.property, inv_pow] + rw [abs_of_nonneg (sq_nonneg _)] + +/-- The inverse-square contribution outside a dyadic positive-zero window +tends to zero. This is the exact normalized infinite-tail loss appearing in +the paired-product minimum-modulus estimate. -/ +theorem tendsto_centeredXiPositiveZeroWindow_invSq_tail_zero + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + Tendsto (fun j : ℕ ↦ + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖) + atTop (𝓝 0) := by + let f : CenteredXiPositiveZeroIndex → ℝ := fun i ↦ + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖ + have hf : Summable f := by + simpa only [f, Complex.norm_real, Real.norm_eq_abs] using + summable_positiveSquaredOrdinate_inv hzero hsum + exact (tendsto_tsum_compl_atTop_zero f).comp + tendsto_centeredXiPositiveZeroWindow_dyadic + +/-- Xi-specific instantiation of the complete normalized loss. -/ +theorem tendsto_centeredXiPairedProduct_normalizedLoss + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (Ksq Klin : ℝ) : + Tendsto + (CenteredXiDyadicNormalizedLoss Ksq Klin fun j ↦ + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖) + atTop (𝓝 0) := + tendsto_centeredXiDyadicNormalizedLoss Ksq Klin + (tendsto_centeredXiPositiveZeroWindow_invSq_tail_zero hzero hsum) + +theorem centeredXiPairedProduct_split_window + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (T : ℝ) (z : ℂ) : + (∏ i ∈ centeredXiPositiveZeroWindow T, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2)) * + (∏' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2)) = + centeredXiPairedProduct z := by + let f : CenteredXiPositiveZeroIndex → ℂ := fun i ↦ + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2 + let S : Set CenteredXiPositiveZeroIndex := + ↑(centeredXiPositiveZeroWindow T) + let A : Set CenteredXiPositiveZeroIndex := + {i | i ∉ centeredXiPositiveZeroWindow T} + have hAS : A = Sᶜ := by + ext i + simp [A, S] + let e : A ≃ (Sᶜ : Set CenteredXiPositiveZeroIndex) := + Equiv.setCongr hAS + have hs : Multipliable (f ∘ (↑) : S → ℂ) := + (hasProd_fintype _).multipliable + have hdev : Summable (fun i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T} ↦ ‖f i - 1‖) := by + have hbase := + (summable_positiveSquaredOrdinate_inv hzero hsum).subtype + (fun i ↦ i ∉ centeredXiPositiveZeroWindow T) + apply (hbase.mul_right ‖z ^ 2‖).congr + intro i + simp [f, norm_mul, Complex.norm_real, Real.norm_eq_abs] + have hsc0 : Multipliable (fun i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T} ↦ f i) := by + have h := multipliable_one_add_of_summable + (f := fun i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T} ↦ f i - 1) hdev + simpa using h + change Multipliable (f ∘ (↑) : A → ℂ) at hsc0 + have hsc : Multipliable + (f ∘ (↑) : (Sᶜ : Set CenteredXiPositiveZeroIndex) → ℂ) := + (e.multipliable_iff).mp hsc0 + have hsplit : + (∏' i : S, f i) * + (∏' i : (Sᶜ : Set CenteredXiPositiveZeroIndex), f i) = + ∏' i : CenteredXiPositiveZeroIndex, f i := + Multipliable.tprod_mul_tprod_compl (f := f) hs hsc + have hhead : + (∏' i : (↑(centeredXiPositiveZeroWindow T) : + Set CenteredXiPositiveZeroIndex), f i) = + ∏ i ∈ centeredXiPositiveZeroWindow T, f i := + Finset.tprod_subtype _ _ + have htail : + (∏' i : A, f i) = + ∏' i : (Sᶜ : Set CenteredXiPositiveZeroIndex), f i := + e.tprod_eq (fun i : (Sᶜ : Set CenteredXiPositiveZeroIndex) ↦ f i) + rw [hhead] at hsplit + rw [← htail] at hsplit + simpa [f, A, S, centeredXiPairedProduct] using hsplit + +theorem norm_centeredXiPairedProduct_tail_lower + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + {T : ℝ} (hT : 0 < T) {z : ℂ} + (hz : ‖z‖ ^ 2 ≤ T ^ 2 / 2) : + Real.exp (-(3 / 2 : ℝ) * ‖z ^ 2‖ * + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + |(centeredXiPositiveSquaredOrdinate i)⁻¹|) ≤ + ‖∏' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2)‖ := by + let f : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T} → ℂ := fun i ↦ + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2 + have hbase : Summable (fun i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T} ↦ + |(centeredXiPositiveSquaredOrdinate i)⁻¹|) := + (summable_positiveSquaredOrdinate_inv hzero hsum).subtype _ + have hsumf : Summable (fun i ↦ ‖f i‖) := by + apply (hbase.mul_right ‖z ^ 2‖).congr + intro i + simp [f, norm_mul, Complex.norm_real, Real.norm_eq_abs] + have hhalf : ∀ i, ‖f i‖ ≤ 1 / 2 := by + intro i + have hiT : T < ‖centeredXiZeroRoot i.1.1‖ := by + simpa using i.property + have hroot : 0 < ‖centeredXiZeroRoot i.1.1‖ := + norm_pos_iff.mpr (centeredXiZeroRoot_ne_zero i.1.1) + rw [show ‖f i‖ = + ‖(centeredXiZeroRoot i.1.1)⁻¹‖ ^ 2 * ‖z‖ ^ 2 by + simp only [f, norm_mul, norm_pow] + rw [norm_positiveSquaredOrdinate_inv_eq_root_inv_sq hzero i.1]] + rw [norm_inv, inv_pow] + rw [show (‖centeredXiZeroRoot i.1.1‖ ^ 2)⁻¹ * ‖z‖ ^ 2 = + ‖z‖ ^ 2 / ‖centeredXiZeroRoot i.1.1‖ ^ 2 by + rw [div_eq_mul_inv] + ring] + rw [div_le_iff₀ (sq_pos_of_pos hroot)] + have hTsq : + T ^ 2 < ‖centeredXiZeroRoot i.1.1‖ ^ 2 := + (sq_lt_sq₀ hT.le hroot.le).mpr hiT + nlinarith + have hlower := + norm_tprod_one_add_lower_of_norm_le_half_jensen hsumf hhalf + have htsum : (∑' i, ‖f i‖) = + (∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + |(centeredXiPositiveSquaredOrdinate i)⁻¹|) * ‖z ^ 2‖ := by + rw [← tsum_mul_right] + apply tsum_congr + intro i + simp [f, norm_mul, Complex.norm_real, Real.norm_eq_abs] + rw [htsum] at hlower + simpa only [f, mul_assoc, mul_left_comm, mul_comm] using hlower + +theorem centeredXiPairedProduct_eq_zero_iff + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) (z : ℂ) : + centeredXiPairedProduct z = 0 ↔ + ∃ i : CenteredXiPositiveZeroIndex, + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2 = 0 := by + let f : CenteredXiPositiveZeroIndex → ℂ := fun i ↦ + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2 + have hu : Summable (fun i ↦ ‖f i‖) := by + have hs := summable_positiveSquaredOrdinate_inv hzero hsum + apply (hs.mul_right ‖z ^ 2‖).congr + intro i + simp [f, norm_mul, Complex.norm_real, Real.norm_eq_abs] + constructor + · intro hp + by_contra hall + push Not at hall + have hne : ∏' i : CenteredXiPositiveZeroIndex, (1 + f i) ≠ 0 := + tprod_one_add_ne_zero_of_summable hall hu + exact hne (by simpa [centeredXiPairedProduct, f] using hp) + · rintro ⟨i, hi⟩ + unfold centeredXiPairedProduct + apply tprod_of_exists_eq_zero + exact ⟨i, hi⟩ + +theorem centeredXiPositiveFactor_eq_zero_iff + (hzero : XiCenteredCriticalZeroReality) + (i : CenteredXiPositiveZeroIndex) (z : ℂ) : + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2 = 0 ↔ + z = centeredXiZeroRoot i.1 ∨ z = -centeredXiZeroRoot i.1 := by + let γ : ℝ := (centeredXiZeroRoot i.1).im + have hγ : γ ≠ 0 := ne_of_gt i.property + have hroot : centeredXiZeroRoot i.1 = (γ : ℂ) * Complex.I := by + apply Complex.ext + · simp [γ, centeredXiZeroRoot_re_eq_zero hzero i.1] + · simp [γ] + rw [hroot] + change 1 + (((γ ^ 2)⁻¹ : ℝ) : ℂ) * z ^ 2 = 0 ↔ + z = (γ : ℂ) * Complex.I ∨ z = -((γ : ℂ) * Complex.I) + push_cast + constructor + · intro hz + have hquad : z ^ 2 + (γ : ℂ) ^ 2 = 0 := by + field_simp [hγ] at hz + linear_combination hz + have hfac : + (z - (γ : ℂ) * Complex.I) * + (z + (γ : ℂ) * Complex.I) = 0 := by + rw [show + (z - (γ : ℂ) * Complex.I) * (z + (γ : ℂ) * Complex.I) = + z ^ 2 + (γ : ℂ) ^ 2 by + calc + _ = z ^ 2 - ((γ : ℂ) * Complex.I) ^ 2 := by ring + _ = z ^ 2 + (γ : ℂ) ^ 2 := by + rw [mul_pow, Complex.I_sq] + ring] + exact hquad + rcases mul_eq_zero.mp hfac with h | h + · left + exact sub_eq_zero.mp h + · right + exact eq_neg_of_add_eq_zero_left h + · rintro (rfl | rfl) <;> field_simp [hγ] <;> + rw [Complex.I_sq] <;> ring + +theorem analyticOrderAt_centeredXiPositiveFactor_of_eq_zero + (i : CenteredXiPositiveZeroIndex) (z : ℂ) + (hz : 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * + z ^ 2 = 0) : + analyticOrderAt + (fun s : ℂ ↦ + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * s ^ 2) z = 1 := by + let a : ℂ := ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) + let f : ℂ → ℂ := fun s ↦ 1 + a * s ^ 2 + have ha : a ≠ 0 := by + dsimp [a] + exact Complex.ofReal_ne_zero.mpr + (inv_ne_zero (ne_of_gt (centeredXiPositiveSquaredOrdinate_pos i))) + have hz0 : z ≠ 0 := by + intro h + rw [h] at hz + norm_num at hz + have hf : AnalyticAt ℂ f z := by + dsimp [f] + fun_prop + have hfz : f z = 0 := by + simpa [f, a] using hz + have hderiv : deriv f z = 2 * a * z := by + dsimp [f] + convert HasDerivAt.deriv + (((hasDerivAt_id z).pow 2).const_mul a |>.const_add 1) using 1 <;> + simp [Function.id_def] <;> ring + have hderiv0 : deriv f z ≠ 0 := by + rw [hderiv] + exact mul_ne_zero (mul_ne_zero (by norm_num) ha) hz0 + change analyticOrderAt f z = 1 + exact hf.analyticOrderAt_eq_one_of_zero_deriv_ne_zero hfz hderiv0 + +theorem centeredXiPairedProduct_zero_set_eq + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) (z : ℂ) : + centeredXiPairedProduct z = 0 ↔ xiJensenEntire z = 0 := by + rw [centeredXiPairedProduct_eq_zero_iff hzero hsum] + constructor + · rintro ⟨i, hi⟩ + rcases (centeredXiPositiveFactor_eq_zero_iff hzero i z).mp hi with h | h + · rw [h] + exact i.1.1.property + · rw [h, xiJensenEntire_neg] + exact i.1.1.property + · intro hz + obtain ⟨j, hj⟩ := (exists_centeredXiZeroRoot_iff z).mpr hz + rcases centeredXiZeroIndex_positive_or_neg_positive hzero j with hjpos | hjneg + · let i : CenteredXiPositiveZeroIndex := ⟨j, hjpos⟩ + refine ⟨i, (centeredXiPositiveFactor_eq_zero_iff hzero i z).mpr ?_⟩ + exact Or.inl hj.symm + · let i : CenteredXiPositiveZeroIndex := + ⟨centeredXiZeroIndexNeg j, hjneg⟩ + refine ⟨i, (centeredXiPositiveFactor_eq_zero_iff hzero i z).mpr ?_⟩ + right + simp only [i, centeredXiZeroRoot_indexNeg, neg_neg] + exact hj.symm + +noncomputable def centeredXiPairedFiber + (z : ℂ) : Finset CenteredXiPositiveZeroIndex := by + classical + exact Finset.subtype + (fun i : CenteredXiZeroIndex ↦ 0 < (centeredXiZeroRoot i).im) + (centeredXiZeroFiber z ∪ centeredXiZeroFiber (-z)) + +@[simp] +theorem mem_centeredXiPairedFiber + (z : ℂ) (i : CenteredXiPositiveZeroIndex) : + i ∈ centeredXiPairedFiber z ↔ + centeredXiZeroRoot i.1 = z ∨ + centeredXiZeroRoot i.1 = -z := by + classical + simp [centeredXiPairedFiber, mem_centeredXiZeroFiber] + +theorem card_centeredXiPairedFiber + (hzero : XiCenteredCriticalZeroReality) (z : ℂ) : + (centeredXiPairedFiber z).card = + centeredXiZeroMultiplicity z := by + classical + by_cases hz : xiJensenEntire z = 0 + · have hzre : z.re = 0 := hzero z hz + have hzim : z.im ≠ 0 := xiJensenEntire_zero_im_ne_zero hz + rcases lt_or_gt_of_ne hzim with hneg | hpos + · have heq : centeredXiPairedFiber z = + Finset.subtype + (fun i : CenteredXiZeroIndex ↦ + 0 < (centeredXiZeroRoot i).im) + (centeredXiZeroFiber (-z)) := by + ext i + simp only [mem_centeredXiPairedFiber, Finset.mem_subtype, + mem_centeredXiZeroFiber] + constructor + · rintro (hi | hi) + · exfalso + have := i.property + rw [hi] at this + linarith + · exact hi + · exact Or.inr + rw [heq, Finset.card_subtype] + have hfilter : (centeredXiZeroFiber (-z)).filter + (fun i ↦ 0 < (centeredXiZeroRoot i).im) = + centeredXiZeroFiber (-z) := by + apply Finset.filter_eq_self.mpr + intro i hi + have hir := (mem_centeredXiZeroFiber (-z) i).mp hi + rw [hir] + simp only [map_neg, Complex.neg_im] + linarith + rw [hfilter, card_centeredXiZeroFiber, + centeredXiZeroMultiplicity_neg] + · have heq : centeredXiPairedFiber z = + Finset.subtype + (fun i : CenteredXiZeroIndex ↦ + 0 < (centeredXiZeroRoot i).im) + (centeredXiZeroFiber z) := by + ext i + simp only [mem_centeredXiPairedFiber, Finset.mem_subtype, + mem_centeredXiZeroFiber] + constructor + · rintro (hi | hi) + · exact hi + · exfalso + have := i.property + rw [hi] at this + simp only [map_neg, Complex.neg_im] at this + linarith + · exact Or.inl + rw [heq, Finset.card_subtype] + have hfilter : (centeredXiZeroFiber z).filter + (fun i ↦ 0 < (centeredXiZeroRoot i).im) = + centeredXiZeroFiber z := by + apply Finset.filter_eq_self.mpr + intro i hi + have hir := (mem_centeredXiZeroFiber z i).mp hi + rw [hir] + exact hpos + rw [hfilter, card_centeredXiZeroFiber] + · have hmult : centeredXiZeroMultiplicity z = 0 := + Nat.eq_zero_of_not_pos (by + intro hp + exact hz ((centeredXiZeroMultiplicity_pos_iff z).mp hp)) + rw [hmult] + apply Finset.card_eq_zero.mpr + rw [Finset.eq_empty_iff_forall_notMem] + intro i hi + rcases (mem_centeredXiPairedFiber z i).mp hi with hir | hir + · apply hz + rw [← hir] + exact i.1.1.property + · apply hz + have hp := i.1.1.property + change xiJensenEntire (centeredXiZeroRoot i.1) = 0 at hp + rw [hir, xiJensenEntire_neg] at hp + exact hp + +set_option maxHeartbeats 800000 in +theorem analyticOrderAt_centeredXiPairedProduct + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) (z : ℂ) : + analyticOrderAt centeredXiPairedProduct z = + (centeredXiPairedFiber z).card := by + classical + have hPdiff : Differentiable ℂ centeredXiPairedProduct := by + let L : ℂ → ℂ := fun w ↦ + ∏' i : CenteredXiPositiveZeroIndex, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * w) + have hLprod : + HasProdLocallyUniformlyOn + (fun (i : CenteredXiPositiveZeroIndex) (w : ℂ) ↦ + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * w) + L Set.univ := + hasProdLocallyUniformlyOn_centeredXiPositiveFactors hzero hsum + have hLdiff : Differentiable ℂ L := by + apply differentiableOn_univ.mp + apply hLprod.differentiableOn + · filter_upwards [] with t + apply Differentiable.differentiableOn + fun_prop + · exact isOpen_univ + have hcomp : Differentiable ℂ (fun z : ℂ ↦ L (z ^ 2)) := by + fun_prop + unfold centeredXiPairedProduct + exact hcomp + let J := centeredXiPairedFiber z + change analyticOrderAt centeredXiPairedProduct z = J.card + by_cases hJ : J = ∅ + · rw [hJ] + simp only [Finset.card_empty, Nat.cast_zero] + rw [(hPdiff.analyticAt z).analyticOrderAt_eq_zero] + intro hp + have hz := (centeredXiPairedProduct_eq_zero_iff hzero hsum z).mp hp + rcases hz with ⟨i, hi⟩ + have : i ∈ J := by + rw [mem_centeredXiPairedFiber] + rcases (centeredXiPositiveFactor_eq_zero_iff hzero i z).mp hi with h | h + · exact Or.inl h.symm + · exact Or.inr (by rw [h]; simp) + simpa [hJ] using this + · obtain ⟨i0, hi0⟩ := Finset.nonempty_iff_ne_empty.mpr hJ + let κ := {i : CenteredXiPositiveZeroIndex // i ∉ J} + let rootC : κ → ℝ := fun i ↦ centeredXiPositiveSquaredOrdinate i + let L : ℂ → ℂ := fun w ↦ + ∏' i : κ, (1 + ((rootC i)⁻¹ : ℝ) * w) + let Q : ℂ → ℂ := fun s ↦ L (s ^ 2) + have hsC : Summable (fun i : κ ↦ |(rootC i)⁻¹|) := by + simpa [rootC, κ, Function.comp_def] using + (summable_positiveSquaredOrdinate_inv hzero hsum).subtype + (fun i ↦ i ∉ J) + have hLprod : HasProdLocallyUniformlyOn + (fun (i : κ) (w : ℂ) ↦ 1 + ((rootC i)⁻¹ : ℝ) * w) + L Set.univ := + hasProdLocallyUniformlyOn_positiveGenusZeroFactors_indexed rootC hsC + have hLdiff : Differentiable ℂ L := by + apply differentiableOn_univ.mp + apply hLprod.differentiableOn + · filter_upwards [] with t + apply Differentiable.differentiableOn + fun_prop + · exact isOpen_univ + have hQdiff : Differentiable ℂ Q := by + dsimp [Q] + fun_prop + have hQA : AnalyticOnNhd ℂ Q Set.univ := + fun s _ ↦ hQdiff.analyticAt s + have hQz : Q z ≠ 0 := by + let f : κ → ℂ := fun i ↦ ((rootC i)⁻¹ : ℝ) * z ^ 2 + have hu : Summable (fun i ↦ ‖f i‖) := by + apply (hsC.mul_right ‖z ^ 2‖).congr + intro i + simp [f, norm_mul, Complex.norm_real, Real.norm_eq_abs] + have hf : ∀ i, 1 + f i ≠ 0 := by + intro i hiz + apply i.property + rw [mem_centeredXiPairedFiber] + rcases (centeredXiPositiveFactor_eq_zero_iff hzero i.1 z).mp + (by simpa [f, rootC] using hiz) with h | h + · exact Or.inl h.symm + · exact Or.inr (by rw [h]; simp) + exact tprod_one_add_ne_zero_of_summable hf hu + let B : ℂ → ℂ := fun s ↦ + 1 + ((centeredXiPositiveSquaredOrdinate i0)⁻¹ : ℝ) * s ^ 2 + have hi0z : B z = 0 := by + apply (centeredXiPositiveFactor_eq_zero_iff hzero i0 z).mpr + rcases (mem_centeredXiPairedFiber z i0).mp hi0 with h | h + · exact Or.inl h.symm + · exact Or.inr (by rw [h]; simp) + have hz0 : z ≠ 0 := by + intro hz + rw [hz] at hi0z + norm_num [B] at hi0z + have hfactor : ∀ i ∈ J, (fun s : ℂ ↦ + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * s ^ 2) = B := by + intro i hi + have hiz : + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2 = 0 := + (centeredXiPositiveFactor_eq_zero_iff hzero i z).mpr (by + rcases (mem_centeredXiPairedFiber z i).mp hi with h | h + · exact Or.inl h.symm + · exact Or.inr (by rw [h]; simp)) + have hcoef : + (((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ) = + (((centeredXiPositiveSquaredOrdinate i0)⁻¹ : ℝ) : ℂ) := by + have hzsq : z ^ 2 ≠ 0 := pow_ne_zero 2 hz0 + apply (mul_right_cancel₀ hzsq) + linear_combination hiz - hi0z + funext s + simp only [B] + rw [hcoef] + have hfinite : (fun s : ℂ ↦ ∏ i ∈ J, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * s ^ 2)) = + B ^ J.card := by + funext s + rw [Pi.pow_apply, ← Finset.prod_const] + apply Finset.prod_congr rfl + intro i hi + exact congrFun (hfactor i hi) s + have hfull : centeredXiPairedProduct = + (fun s : ℂ ↦ ∏ i ∈ J, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * s ^ 2)) * Q := by + funext s + have hsprod := (J.hasProd (fun i ↦ + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * s ^ 2)).mul_compl + (hLprod.hasProd (Set.mem_univ (s ^ 2))) + exact hsprod.tprod_eq + have hBA : AnalyticAt ℂ B z := by + dsimp [B] + fun_prop + have hBorder : analyticOrderAt B z = 1 := by + exact analyticOrderAt_centeredXiPositiveFactor_of_eq_zero i0 z hi0z + rw [hfull, hfinite, analyticOrderAt_mul + (hBA.pow J.card) (hQA z (Set.mem_univ z)), + analyticOrderAt_pow hBA, hBorder, + (hQA z (Set.mem_univ z)).analyticOrderAt_eq_zero.mpr hQz] + simp [J] + +/-- Exact divisor statement still required from the infinite-product +multiplicity theorem. -/ +def XiCenteredPairedProductDivisorEquality : Prop := + MeromorphicOn.divisor centeredXiPairedProduct Set.univ = + centeredXiZeroDivisor + +/-- Exact order-one/minimum-modulus conclusion for the cancelled canonical +quotient. -/ +def XiCenteredPairedProductAffineRigidity : Prop := + ∃ a b : ℂ, ∀ z : ℂ, xiJensenEntire z = + Complex.exp (a + b * z) * centeredXiPairedProduct z + +/-- The sole remaining Hadamard/minimum-modulus step after exact divisor +matching. -/ +def XiCenteredDivisorQuotientRigidity : Prop := + XiCenteredPairedProductDivisorEquality → + XiCenteredPairedProductAffineRigidity + +theorem differentiable_centeredXiPairedProduct + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + Differentiable ℂ centeredXiPairedProduct := by + let Q : ℂ → ℂ := fun w ↦ + ∏' i : CenteredXiPositiveZeroIndex, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * w) + have hQprod : + HasProdLocallyUniformlyOn + (fun (i : CenteredXiPositiveZeroIndex) (w : ℂ) ↦ + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * w) + Q Set.univ := + hasProdLocallyUniformlyOn_centeredXiPositiveFactors hzero hsum + have hQdiffOn : DifferentiableOn ℂ Q Set.univ := by + apply hQprod.differentiableOn + · filter_upwards [] with s + apply Differentiable.differentiableOn + fun_prop + · exact isOpen_univ + have hQdiff : Differentiable ℂ Q := + differentiableOn_univ.mp hQdiffOn + have hcomp : Differentiable ℂ (fun z : ℂ ↦ Q (z ^ 2)) := by + fun_prop + unfold centeredXiPairedProduct + exact hcomp + +theorem centeredXiPairedProduct_divisor_eq + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + MeromorphicOn.divisor centeredXiPairedProduct Set.univ = + centeredXiZeroDivisor := by + have hPdiff := differentiable_centeredXiPairedProduct hzero hsum + have hPM : MeromorphicOn centeredXiPairedProduct Set.univ := + fun z _ ↦ (hPdiff.analyticAt z).meromorphicAt + ext z + rw [MeromorphicOn.divisor_apply hPM (Set.mem_univ z), + (hPdiff.analyticAt z).meromorphicOrderAt_eq, + analyticOrderAt_centeredXiPairedProduct hzero hsum z, + card_centeredXiPairedFiber hzero z, + centeredXiZeroDivisor_apply] + simp + +theorem xiCenteredPairedProductDivisorEquality + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + XiCenteredPairedProductDivisorEquality := + centeredXiPairedProduct_divisor_eq hzero hsum + +noncomputable def centeredXiCancelledQuotient : ℂ → ℂ := + toMeromorphicNFOn + (xiJensenEntire * centeredXiPairedProduct⁻¹) Set.univ + +theorem centeredXiCancelledQuotient_analytic_ne_zero + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + AnalyticOnNhd ℂ centeredXiCancelledQuotient Set.univ ∧ + ∀ z, centeredXiCancelledQuotient z ≠ 0 := by + let xi := xiJensenEntire + let P := centeredXiPairedProduct + let q := xi * P⁻¹ + have hxiA : AnalyticOnNhd ℂ xi Set.univ := + fun z _ ↦ differentiable_xiJensenEntire.analyticAt z + have hPA : AnalyticOnNhd ℂ P Set.univ := + fun z _ ↦ (differentiable_centeredXiPairedProduct hzero hsum).analyticAt z + have hxiM : MeromorphicOn xi Set.univ := + fun z hz ↦ (hxiA z hz).meromorphicAt + have hPM : MeromorphicOn P Set.univ := + fun z hz ↦ (hPA z hz).meromorphicAt + have hxiFinite : ∀ z, meromorphicOrderAt xi z ≠ ⊤ := by + intro z + rw [(hxiA z (Set.mem_univ z)).meromorphicOrderAt_eq] + have ho : analyticOrderAt xi z ≠ ⊤ := by + change analyticOrderAt xiJensenEntire z ≠ ⊤ + simpa [centeredXiZeroOrder] using centeredXiZeroOrder_ne_top z + simpa using ho + have hP0 : P 0 ≠ 0 := by + simp [P, centeredXiPairedProduct] + have hPFinite : ∀ z, meromorphicOrderAt P z ≠ ⊤ := by + intro z + rw [(hPA z (Set.mem_univ z)).meromorphicOrderAt_eq] + have ho := hPA.analyticOrderAt_ne_top_of_isPreconnected + (x := (0 : ℂ)) (y := z) isPreconnected_univ + (Set.mem_univ 0) (Set.mem_univ z) (by + rw [(hPA 0 (Set.mem_univ 0)).analyticOrderAt_eq_zero.mpr hP0] + exact ENat.zero_ne_top) + simpa using ho + have hq : MeromorphicOn q Set.univ := hxiM.mul hPM.inv + have hqdiv : MeromorphicOn.divisor q Set.univ = 0 := by + dsimp [q] + rw [hxiM.divisor_mul hPM.inv + (fun z _ ↦ hxiFinite z) + (fun z _ ↦ by simpa [meromorphicOrderAt_inv] using hPFinite z), + MeromorphicOn.divisor_inv] + change MeromorphicOn.divisor xiJensenEntire Set.univ - + MeromorphicOn.divisor centeredXiPairedProduct Set.univ = 0 + rw [centeredXiPairedProduct_divisor_eq hzero hsum] + change centeredXiZeroDivisor - centeredXiZeroDivisor = 0 + abel + have hnf : MeromorphicNFOn centeredXiCancelledQuotient Set.univ := by + change MeromorphicNFOn (toMeromorphicNFOn q Set.univ) Set.univ + exact meromorphicNFOn_toMeromorphicNFOn q Set.univ + have hqdiv' : + MeromorphicOn.divisor centeredXiCancelledQuotient Set.univ = 0 := by + change MeromorphicOn.divisor + (toMeromorphicNFOn q Set.univ) Set.univ = 0 + rw [hq.divisor_of_toMeromorphicNFOn, hqdiv] + have han : AnalyticOnNhd ℂ centeredXiCancelledQuotient Set.univ := by + rw [← hnf.divisor_nonneg_iff_analyticOnNhd, hqdiv'] + refine ⟨han, ?_⟩ + intro z + rw [← (hnf (Set.mem_univ z)).meromorphicOrderAt_eq_zero_iff] + have happ := MeromorphicOn.divisor_apply hnf.meromorphicOn + (Set.mem_univ z) + rw [hqdiv'] at happ + have hor : + meromorphicOrderAt centeredXiCancelledQuotient z = 0 ∨ + meromorphicOrderAt centeredXiCancelledQuotient z = ⊤ := by + simpa using happ.symm + apply hor.resolve_right + change meromorphicOrderAt (toMeromorphicNFOn q Set.univ) z ≠ ⊤ + rw [meromorphicOrderAt_toMeromorphicNFOn hq (Set.mem_univ z), + meromorphicOrderAt_mul (hxiM z (Set.mem_univ z)) + (hPM.inv z (Set.mem_univ z)), meromorphicOrderAt_inv] + exact WithTop.add_ne_top.mpr + ⟨hxiFinite z, by simpa using hPFinite z⟩ + +theorem centeredXiCancelledQuotient_eq_div_of_product_ne + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + {z : ℂ} (hPz : centeredXiPairedProduct z ≠ 0) : + centeredXiCancelledQuotient z = + xiJensenEntire z / centeredXiPairedProduct z := by + have hxiA := differentiable_xiJensenEntire.analyticAt z + have hPA := + (differentiable_centeredXiPairedProduct hzero hsum).analyticAt z + have hxiM : MeromorphicOn xiJensenEntire Set.univ := + fun w _ ↦ differentiable_xiJensenEntire.analyticAt w |>.meromorphicAt + have hPM : MeromorphicOn centeredXiPairedProduct Set.univ := + fun w _ ↦ + (differentiable_centeredXiPairedProduct hzero hsum).analyticAt w + |>.meromorphicAt + have hqM : MeromorphicOn + (xiJensenEntire * centeredXiPairedProduct⁻¹) Set.univ := + hxiM.mul hPM.inv + have hrawA : AnalyticAt ℂ + (xiJensenEntire * centeredXiPairedProduct⁻¹) z := + hxiA.mul (hPA.inv hPz) + have hev : centeredXiCancelledQuotient =ᶠ[𝓝 z] + xiJensenEntire * centeredXiPairedProduct⁻¹ := by + exact (toMeromorphicNFOn_eq_toMeromorphicNFAt_on_nhds + hqM (Set.mem_univ z)).trans + (Filter.Eventually.of_forall (fun w ↦ by + rw [toMeromorphicNFAt_eq_self.2 hrawA.meromorphicNFAt])) + simpa [div_eq_mul_inv] using hev.self_of_nhds + +theorem norm_centeredXiCancelledQuotient_le_div_of_product_lower + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + {z : ℂ} {L : ℝ} (hL : 0 < L) + (hlower : L ≤ ‖centeredXiPairedProduct z‖) : + ‖centeredXiCancelledQuotient z‖ ≤ ‖xiJensenEntire z‖ / L := by + have hPz : centeredXiPairedProduct z ≠ 0 := by + intro hp + rw [hp, norm_zero] at hlower + linarith + rw [centeredXiCancelledQuotient_eq_div_of_product_ne + hzero hsum hPz, norm_div] + exact div_le_div_of_nonneg_left (norm_nonneg _) + hL hlower + +theorem exists_analytic_log_jensen + {g : ℂ → ℂ} (hg : AnalyticOnNhd ℂ g Set.univ) + (hne : ∀ z, g z ≠ 0) : + ∃ f : ℂ → ℂ, AnalyticOnNhd ℂ f Set.univ ∧ + ∀ z, Complex.exp (f z) = g z := by + have hUc : IsSimplyConnected (Set.univ : Set ℂ) := by + change SimplyConnectedSpace (Set.univ : Set ℂ) + exact (Homeomorph.Set.univ ℂ).toHomotopyEquiv.simplyConnectedSpace + have hnon : 0 ∉ g '' (Set.univ : Set ℂ) := by + rintro ⟨z, hz, hzero⟩ + exact hne z hzero + obtain ⟨f, hfcont, hf⟩ := + Complex.exists_continuousOn_eqOn_exp_comp hUc isOpen_univ + hg.continuousOn hnon + have hfcont' : Continuous f := continuousOn_univ.mp hfcont + have hfexp : ∀ z, Complex.exp (f z) = g z := by + intro z + simpa [Function.comp_apply] using hf (Set.mem_univ z) + refine ⟨f, ?_, hfexp⟩ + intro z hz + have hgz : g z ≠ 0 := by + rw [← hfexp] + exact Complex.exp_ne_zero _ + have hratio : AnalyticAt ℂ (fun w ↦ g w / g z) z := + (hg z (Set.mem_univ z)).div_const + have hratio1 : g z / g z = 1 := div_self hgz + have hrhs : AnalyticAt ℂ + (fun w ↦ f z + Complex.log (g w / g z)) z := + analyticAt_const.add (hratio.clog (by simp [hratio1])) + have hclose : ∀ᶠ w in 𝓝 z, + dist (f w) (f z) < Real.pi / 2 := + hfcont'.continuousAt.tendsto.eventually + (Metric.ball_mem_nhds _ (half_pos Real.pi_pos)) + have heq : f =ᶠ[𝓝 z] + fun w ↦ f z + Complex.log (g w / g z) := by + filter_upwards [hclose] with w hw + have hnorm : ‖f w - f z‖ < Real.pi / 2 := by + simpa [dist_eq_norm] using hw + have him : |(f w - f z).im| < Real.pi / 2 := + (abs_im_le_norm (f w - f z)).trans_lt hnorm + have hlower : -(Real.pi) < (f w - f z).im := by + linarith [neg_lt_of_abs_lt him, Real.pi_pos] + have hupper : (f w - f z).im ≤ Real.pi := by + linarith [lt_of_abs_lt him, Real.pi_pos] + have hexpdiff : + Complex.exp (f w - f z) = g w / g z := by + rw [Complex.exp_sub, hfexp, hfexp] + calc + f w = f z + (f w - f z) := by ring + _ = f z + Complex.log (Complex.exp (f w - f z)) := by + rw [Complex.log_exp hlower hupper] + _ = f z + Complex.log (g w / g z) := by rw [hexpdiff] + exact hrhs.congr heq.symm + +def SubquadraticNormGrowthJensen (h : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ R : ℝ, 0 ≤ R ∧ + ∀ z : ℂ, R ≤ ‖z‖ → ‖h z‖ ≤ ε * ‖z‖ ^ 2 + +def SubquadraticRealPartGrowthJensen (h : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ R : ℝ, 0 ≤ R ∧ + ∀ r : ℝ, R ≤ r → ∀ z ∈ Metric.ball (0 : ℂ) r, + (h z).re ≤ ε * r ^ 2 + +def SubquadraticLogNormGrowthJensen (g : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ R : ℝ, 0 ≤ R ∧ + ∀ r : ℝ, R ≤ r → ∀ z ∈ Metric.ball (0 : ℂ) r, + Real.log ‖g z‖ ≤ ε * r ^ 2 + +def SubquadraticBoundaryLogNormGrowthJensen (g : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ r0 : ℝ, 0 ≤ r0 ∧ + ∀ r : ℝ, r0 ≤ r → ∃ R : ℝ, r ≤ R ∧ 0 < R ∧ + ∀ z ∈ Metric.sphere (0 : ℂ) R, + Real.log ‖g z‖ ≤ ε * r ^ 2 + +/-- Dyadic selected-circle form naturally produced by the explicit paired +product head/tail decomposition. -/ +def DyadicSubquadraticBoundaryLogNormGrowthJensen (g : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∀ᶠ j : ℕ in atTop, + ∃ R : ℝ, (2 : ℝ) ^ j ≤ R ∧ 0 < R ∧ + ∀ z ∈ Metric.sphere (0 : ℂ) R, + Real.log ‖g z‖ ≤ ε * ((2 : ℝ) ^ j) ^ 2 + +/-- The next dyadic scale is at most twice an arbitrary large radius, so +dyadic selected circles imply the every-radius boundary condition. -/ +theorem subquadraticBoundaryLogNormGrowth_of_dyadic_jensen + {g : ℂ → ℂ} + (h : DyadicSubquadraticBoundaryLogNormGrowthJensen g) : + SubquadraticBoundaryLogNormGrowthJensen g := by + intro ε hε + have he4 : 0 < ε / 4 := by positivity + have hev := h (ε / 4) he4 + rw [Filter.eventually_atTop] at hev + obtain ⟨N, hN⟩ := hev + let r0 : ℝ := (2 : ℝ) ^ N + refine ⟨r0, by positivity, ?_⟩ + intro r hr + have hr1 : 1 ≤ r := + (one_le_pow₀ (by norm_num)).trans hr + obtain ⟨k, hk, _huniq⟩ := + existsUnique_dyadic_interval_jensen r hr1 + let j := k + 1 + have hNj : N ≤ j := by + by_contra hnot + have hjN : j < N := lt_of_not_ge hnot + have hp : (2 : ℝ) ^ j ≤ (2 : ℝ) ^ N := + pow_le_pow_right₀ (by norm_num) hjN.le + have hu := hk.2 + dsimp [j] at hp ⊢ + linarith + obtain ⟨R, hHR, hR, hsphere⟩ := hN j hNj + refine ⟨R, hk.2.le.trans hHR, hR, ?_⟩ + intro z hz + have hH2r : (2 : ℝ) ^ j ≤ 2 * r := by + dsimp [j] + rw [pow_succ] + nlinarith [hk.1] + exact (hsphere z hz).trans (by + have hsq : ((2 : ℝ) ^ j) ^ 2 ≤ (2 * r) ^ 2 := + (sq_le_sq₀ (by positivity) (by positivity)).mpr hH2r + nlinarith) + +/-- Any selected-circle quotient norm estimate controlled by the explicit +normalized head/card-log, xi-growth, and paired-tail loss yields dyadic +subquadratic boundary growth. -/ +theorem dyadicSubquadraticBoundaryLogNormGrowth_of_centeredXiLoss + {g : ℂ → ℂ} (hg0 : ∀ z, g z ≠ 0) + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (Ksq Klin : ℝ) + (hcircle : ∀ᶠ j : ℕ in atTop, + ∃ R : ℝ, (2 : ℝ) ^ j ≤ R ∧ 0 < R ∧ + ∀ z ∈ Metric.sphere (0 : ℂ) R, + ‖g z‖ ≤ Real.exp ( + CenteredXiDyadicNormalizedLoss Ksq Klin + (fun j ↦ + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖) + j * ((2 : ℝ) ^ j) ^ 2)) : + DyadicSubquadraticBoundaryLogNormGrowthJensen g := by + intro ε hε + have hloss := + tendsto_centeredXiPairedProduct_normalizedLoss hzero hsum Ksq Klin + have hevent : ∀ᶠ j : ℕ in atTop, + CenteredXiDyadicNormalizedLoss Ksq Klin + (fun j ↦ + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖) + j < ε := + (tendsto_order.1 hloss).2 ε hε + filter_upwards [hcircle, hevent] with j hj hmajor + obtain ⟨R, hHR, hR, hbound⟩ := hj + refine ⟨R, hHR, hR, ?_⟩ + intro z hz + calc + Real.log ‖g z‖ ≤ Real.log (Real.exp ( + CenteredXiDyadicNormalizedLoss Ksq Klin + (fun j ↦ + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖) + j * ((2 : ℝ) ^ j) ^ 2)) := + Real.log_le_log (norm_pos_iff.mpr (hg0 z)) (hbound z hz) + _ = CenteredXiDyadicNormalizedLoss Ksq Klin + (fun j ↦ + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖) + j * ((2 : ℝ) ^ j) ^ 2 := Real.log_exp _ + _ ≤ ε * ((2 : ℝ) ^ j) ^ 2 := by + gcongr + +theorem subquadraticLogNormGrowth_of_boundary_jensen + {g : ℂ → ℂ} (hgA : AnalyticOnNhd ℂ g Set.univ) + (hg0 : ∀ z, g z ≠ 0) + (hboundary : SubquadraticBoundaryLogNormGrowthJensen g) : + SubquadraticLogNormGrowthJensen g := by + intro ε hε + obtain ⟨r0, hr0, hbound⟩ := hboundary ε hε + refine ⟨r0, hr0, ?_⟩ + intro r hr z hz + obtain ⟨R, hrR, hR, hsphere⟩ := hbound r hr + have hboundaryNorm : + ∀ w ∈ frontier (Metric.ball (0 : ℂ) R), + ‖g w‖ ≤ Real.exp (ε * r ^ 2) := by + intro w hw + have hws : w ∈ Metric.sphere (0 : ℂ) R := + Metric.frontier_ball_subset_sphere hw + rw [← Real.exp_log (norm_pos_iff.mpr (hg0 w))] + exact Real.exp_le_exp.mpr (hsphere w hws) + have hzClosure : z ∈ closure (Metric.ball (0 : ℂ) R) := by + rw [closure_ball _ hR.ne'] + have hzNorm : ‖z‖ < R := by + have hz' := hz + simp only [Metric.mem_ball, dist_zero_right] at hz' + exact hz'.trans_le hrR + simpa [Metric.mem_closedBall, dist_zero_right] using hzNorm.le + have hnorm : ‖g z‖ ≤ Real.exp (ε * r ^ 2) := + Complex.norm_le_of_forall_mem_frontier_norm_le + Metric.isBounded_ball + ((hgA.differentiableOn.mono (Set.subset_univ _)).diffContOnCl) + hboundaryNorm hzClosure + calc + Real.log ‖g z‖ ≤ Real.log (Real.exp (ε * r ^ 2)) := + Real.log_le_log (norm_pos_iff.mpr (hg0 z)) hnorm + _ = ε * r ^ 2 := Real.log_exp _ + +/-- Finite exceptional disks whose total radial width leaves room for a +centered circle, together with the quotient bound off those disks. -/ +def CartanExceptionalDiskLogBoundJensen (g : ℂ → ℂ) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ r0 : ℝ, 0 ≤ r0 ∧ + ∀ r : ℝ, r0 ≤ r → ∃ n : ℕ, ∃ center : Fin n → ℂ, + ∃ radius : Fin n → ℝ, + (∀ i, 0 ≤ radius i) ∧ + 2 * ∑ i, radius i < r ∧ + ∀ z : ℂ, r ≤ ‖z‖ → ‖z‖ ≤ 2 * r → + (∀ i, z ∉ Metric.closedBall (center i) (radius i)) → + Real.log ‖g z‖ ≤ ε * r ^ 2 + +theorem exists_radius_avoiding_exceptionalIntervals_jensen + {ι : Type*} (s : Finset ι) (center : ι → ℂ) + (radius : ι → ℝ) + (hradius : ∀ i ∈ s, 0 ≤ radius i) + {a b : ℝ} + (hwidth : 2 * ∑ i ∈ s, radius i < b - a) : + ∃ R ∈ Set.Icc a b, + ∀ i ∈ s, R ∉ Set.Icc (‖center i‖ - radius i) + (‖center i‖ + radius i) := by + classical + let U : Set ℝ := ⋃ i ∈ s, + Set.Icc (‖center i‖ - radius i) + (‖center i‖ + radius i) + have hmeasureU : volume U ≤ + ENNReal.ofReal (2 * ∑ i ∈ s, radius i) := by + calc + volume U ≤ ∑ i ∈ s, + volume (Set.Icc (‖center i‖ - radius i) + (‖center i‖ + radius i)) := + measure_biUnion_finset_le s _ + _ = ∑ i ∈ s, ENNReal.ofReal (2 * radius i) := by + apply Finset.sum_congr rfl + intro i hi + rw [Real.volume_Icc] + congr 1 + ring + _ = ENNReal.ofReal (2 * ∑ i ∈ s, radius i) := by + rw [← ENNReal.ofReal_sum_of_nonneg + (f := fun i ↦ 2 * radius i)] + · congr 1 + rw [Finset.mul_sum] + · intro i hi + exact mul_nonneg (by norm_num) (hradius i hi) + have hnot : ¬ Set.Icc a b ⊆ U := by + intro hsubset + have hvol : ENNReal.ofReal (b - a) ≤ + ENNReal.ofReal (2 * ∑ i ∈ s, radius i) := by + rw [← Real.volume_Icc] + exact (measure_mono hsubset).trans hmeasureU + have hnonneg : 0 ≤ 2 * ∑ i ∈ s, radius i := + mul_nonneg (by norm_num) + (Finset.sum_nonneg fun i hi ↦ hradius i hi) + have := (ENNReal.ofReal_le_ofReal_iff hnonneg).mp hvol + linarith + obtain ⟨R, hR, hRU⟩ := Set.not_subset.mp hnot + refine ⟨R, hR, ?_⟩ + intro i hi hRi + apply hRU + exact Set.mem_iUnion_of_mem i (Set.mem_iUnion_of_mem hi hRi) + +theorem norm_centeredXiPositiveFactor_lower_of_radius_not_mem + (hzero : XiCenteredCriticalZeroReality) + (i : CenteredXiPositiveZeroIndex) + {δ R : ℝ} (hδ : 0 ≤ δ) {z : ℂ} + (hz : z ∈ Metric.sphere (0 : ℂ) R) + (havoid : R ∉ Set.Icc + (‖centeredXiZeroRoot i.1‖ - δ) + (‖centeredXiZeroRoot i.1‖ + δ)) : + (δ / ‖centeredXiZeroRoot i.1‖) ^ 2 ≤ + ‖1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2‖ := by + let root := centeredXiZeroRoot i.1 + let γ := root.im + have hγ : 0 < γ := i.property + have hroot : root = (γ : ℂ) * Complex.I := by + apply Complex.ext + · simp [root, γ, centeredXiZeroRoot_re_eq_zero hzero i.1] + · simp [γ] + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + have hrad : δ ≤ |R - ‖root‖| := by + simp only [Set.mem_Icc, not_and_or, not_le] at havoid + rcases havoid with hleft | hright + · rw [abs_of_neg (by linarith)] + linarith + · rw [abs_of_pos (by linarith)] + linarith + have hd₁ : δ ≤ ‖z - root‖ := by + exact hrad.trans (by + simpa [hzNorm] using abs_norm_sub_norm_le z root) + have hd₂ : δ ≤ ‖z + root‖ := by + exact hrad.trans (by + simpa [hzNorm] using abs_norm_sub_norm_le z (-root)) + have hfactor : + 1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2 = + (z - root) * (z + root) / (γ : ℂ) ^ 2 := by + rw [hroot] + change 1 + (((γ ^ 2)⁻¹ : ℝ) : ℂ) * z ^ 2 = + (z - (γ : ℂ) * Complex.I) * + (z + (γ : ℂ) * Complex.I) / (γ : ℂ) ^ 2 + push_cast + field_simp [ne_of_gt hγ] + calc + (γ : ℂ) ^ 2 + z ^ 2 = z ^ 2 + (γ : ℂ) ^ 2 := by ring + _ = (z - (γ : ℂ) * Complex.I) * + (z + (γ : ℂ) * Complex.I) := by + rw [show + (z - (γ : ℂ) * Complex.I) * + (z + (γ : ℂ) * Complex.I) = + z ^ 2 - ((γ : ℂ) * Complex.I) ^ 2 by ring, + mul_pow, Complex.I_sq] + ring + rw [hfactor, norm_div, norm_mul, norm_pow, Complex.norm_real, + Real.norm_eq_abs, abs_of_pos hγ, div_pow] + have hrootNorm : ‖root‖ = γ := by + rw [hroot, norm_mul, Complex.norm_real, Complex.norm_I, + Real.norm_eq_abs, abs_of_pos hγ, mul_one] + change δ ^ 2 / ‖root‖ ^ 2 ≤ + ‖z - root‖ * ‖z + root‖ / γ ^ 2 + rw [hrootNorm] + rw [div_le_div_iff_of_pos_right (sq_pos_of_pos hγ)] + rw [sq] + calc + δ * δ ≤ ‖z - root‖ * δ := + mul_le_mul_of_nonneg_right hd₁ hδ + _ ≤ ‖z - root‖ * ‖z + root‖ := + mul_le_mul_of_nonneg_left hd₂ (norm_nonneg _) + +theorem exists_circle_norm_centeredXiPairedProduct_head_lower + (hzero : XiCenteredCriticalZeroReality) + {T H a b : ℝ} + (hs : (centeredXiPositiveZeroWindow T).Nonempty) + (hH : 0 < H) (hwidth : H ≤ b - a) : + ∃ R ∈ Set.Icc a b, ∀ z ∈ Metric.sphere (0 : ℂ) R, + (∏ i ∈ centeredXiPositiveZeroWindow T, + ((H / (3 * (centeredXiPositiveZeroWindow T).card)) / + ‖centeredXiZeroRoot i.1‖) ^ 2) ≤ + ‖∏ i ∈ centeredXiPositiveZeroWindow T, + (1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2)‖ := by + let s := centeredXiPositiveZeroWindow T + let δ : ℝ := H / (3 * s.card) + have hδ : 0 ≤ δ := div_nonneg hH.le (by positivity) + have hsum : 2 * ∑ _i ∈ s, δ < H := by + simp only [Finset.sum_const, nsmul_eq_mul] + have hcard : (0 : ℝ) < s.card := by + exact_mod_cast hs.card_pos + dsimp [δ] + field_simp + nlinarith + obtain ⟨R, hR, havoid⟩ := + exists_radius_avoiding_exceptionalIntervals_jensen + s (fun i ↦ centeredXiZeroRoot i.1) (fun _ ↦ δ) + (fun _ _ ↦ hδ) (a := a) (b := b) + (hsum.trans_le hwidth) + refine ⟨R, hR, ?_⟩ + intro z hz + rw [norm_prod] + apply Finset.prod_le_prod + · intro i hi + positivity + · intro i hi + change (δ / ‖centeredXiZeroRoot i.1‖) ^ 2 ≤ + ‖1 + ((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) * z ^ 2‖ + exact norm_centeredXiPositiveFactor_lower_of_radius_not_mem + hzero i hδ hz (havoid i hi) + +theorem exists_circle_norm_centeredXiPairedProduct_lower + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + {T H a b : ℝ} + (hs : (centeredXiPositiveZeroWindow T).Nonempty) + (hT : 0 < T) (hH : 0 < H) (ha : 0 ≤ a) + (hwidth : H ≤ b - a) (hbT : b ^ 2 ≤ T ^ 2 / 2) : + ∃ R ∈ Set.Icc a b, ∀ z ∈ Metric.sphere (0 : ℂ) R, + (∏ i ∈ centeredXiPositiveZeroWindow T, + ((H / (3 * (centeredXiPositiveZeroWindow T).card)) / + ‖centeredXiZeroRoot i.1‖) ^ 2) * + Real.exp (-(3 / 2 : ℝ) * ‖z ^ 2‖ * + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + |(centeredXiPositiveSquaredOrdinate i)⁻¹|) ≤ + ‖centeredXiPairedProduct z‖ := by + obtain ⟨R, hR, hhead⟩ := + exists_circle_norm_centeredXiPairedProduct_head_lower + hzero hs hH hwidth + refine ⟨R, hR, ?_⟩ + intro z hz + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + have hR0 : 0 ≤ R := ha.trans hR.1 + have hzT : ‖z‖ ^ 2 ≤ T ^ 2 / 2 := by + rw [hzNorm] + have hb0 : 0 ≤ b := hR0.trans hR.2 + exact ((sq_le_sq₀ hR0 hb0).mpr hR.2).trans hbT + have htail := + norm_centeredXiPairedProduct_tail_lower hzero hsum hT hzT + rw [← centeredXiPairedProduct_split_window hzero hsum T z, norm_mul] + exact mul_le_mul (hhead z hz) htail + (Real.exp_pos _).le (norm_nonneg _) + +theorem exists_circle_norm_centeredXiPairedProduct_lower_of_cumulative + (hzero : XiCenteredCriticalZeroReality) + (hcount : XiCenteredCumulativeZeroCount) + {T H a b : ℝ} + (hs : (centeredXiPositiveZeroWindow T).Nonempty) + (hT : 0 < T) (hH : 0 < H) (ha : 0 ≤ a) + (hwidth : H ≤ b - a) (hbT : b ^ 2 ≤ T ^ 2 / 2) : + ∃ R ∈ Set.Icc a b, ∀ z ∈ Metric.sphere (0 : ℂ) R, + (∏ i ∈ centeredXiPositiveZeroWindow T, + ((H / (3 * (centeredXiPositiveZeroWindow T).card)) / + ‖centeredXiZeroRoot i.1‖) ^ 2) * + Real.exp (-(3 / 2 : ℝ) * ‖z ^ 2‖ * + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + |(centeredXiPositiveSquaredOrdinate i)⁻¹|) ≤ + ‖centeredXiPairedProduct z‖ := + exists_circle_norm_centeredXiPairedProduct_lower hzero + (centeredXi_inverseSquareSummability_of_cumulativeZeroCount hcount) + hs hT hH ha hwidth hbT + +theorem exists_circle_norm_centeredXiPairedProduct_lower_actual + (hzero : XiCenteredCriticalZeroReality) + {T H a b : ℝ} + (hs : (centeredXiPositiveZeroWindow T).Nonempty) + (hT : 0 < T) (hH : 0 < H) (ha : 0 ≤ a) + (hwidth : H ≤ b - a) (hbT : b ^ 2 ≤ T ^ 2 / 2) : + ∃ R ∈ Set.Icc a b, ∀ z ∈ Metric.sphere (0 : ℂ) R, + (∏ i ∈ centeredXiPositiveZeroWindow T, + ((H / (3 * (centeredXiPositiveZeroWindow T).card)) / + ‖centeredXiZeroRoot i.1‖) ^ 2) * + Real.exp (-(3 / 2 : ℝ) * ‖z ^ 2‖ * + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + |(centeredXiPositiveSquaredOrdinate i)⁻¹|) ≤ + ‖centeredXiPairedProduct z‖ := + exists_circle_norm_centeredXiPairedProduct_lower_of_cumulative + hzero xiCenteredCumulativeZeroCount_actual + hs hT hH ha hwidth hbT + +/-- Uniform version of the finite-head factor in the selected-circle bound. +It is weaker than the root-by-root product but has an exactly computable +logarithm. -/ +theorem centeredXiPositiveZeroWindow_uniform_head_le + {T H : ℝ} (hT : 0 < T) (hH : 0 < H) + (hs : (centeredXiPositiveZeroWindow T).Nonempty) : + (H / (3 * (centeredXiPositiveZeroWindow T).card * T)) ^ + (2 * (centeredXiPositiveZeroWindow T).card) ≤ + ∏ i ∈ centeredXiPositiveZeroWindow T, + ((H / (3 * (centeredXiPositiveZeroWindow T).card)) / + ‖centeredXiZeroRoot i.1‖) ^ 2 := by + let s := centeredXiPositiveZeroWindow T + have hn : (0 : ℝ) < s.card := by exact_mod_cast hs.card_pos + have hterm : ∀ i ∈ s, + (H / (3 * s.card * T)) ^ 2 ≤ + ((H / (3 * s.card)) / ‖centeredXiZeroRoot i.1‖) ^ 2 := by + intro i hi + have hroot0 : 0 < ‖centeredXiZeroRoot i.1‖ := + norm_pos_iff.mpr (centeredXiZeroRoot_ne_zero i.1) + have hrootT : ‖centeredXiZeroRoot i.1‖ ≤ T := + (mem_centeredXiPositiveZeroWindow T i).mp hi + apply pow_le_pow_left₀ (by positivity) + rw [div_div] + apply div_le_div_of_nonneg_left hH.le + (mul_pos (mul_pos (by norm_num) hn) hroot0) + exact mul_le_mul_of_nonneg_left hrootT + (mul_nonneg (by norm_num) hn.le) + calc + (H / (3 * s.card * T)) ^ (2 * s.card) = + ∏ _i ∈ s, (H / (3 * s.card * T)) ^ 2 := by + simp only [Finset.prod_const, nsmul_eq_mul] + rw [← pow_mul] + _ ≤ ∏ i ∈ s, + ((H / (3 * s.card)) / + ‖centeredXiZeroRoot i.1‖) ^ 2 := + Finset.prod_le_prod (fun _ _ ↦ by positivity) hterm + +/-- Explicit quotient exponent on a selected circle. -/ +noncomputable def centeredXiQuotientCircleExponent + (C T H : ℝ) (z : ℂ) : ℝ := + C * ‖z‖ * Real.log (‖z‖ + 2) + + 2 * (centeredXiPositiveZeroWindow T).card * Real.log T + + 2 * (centeredXiPositiveZeroWindow T).card * + Real.log (3 * (centeredXiPositiveZeroWindow T).card / H) + + (3 / 2 : ℝ) * ‖z ^ 2‖ * + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + |(centeredXiPositiveSquaredOrdinate i)⁻¹| + +/-- Global xi growth plus the paired-product minimum modulus gives the +concrete cancelled-quotient estimate with every head, cardinality-log, and +tail loss displayed. -/ +theorem exists_circle_norm_centeredXiCancelledQuotient_le_explicit + (hzero : XiCenteredCriticalZeroReality) + {C R0 T H a b : ℝ} + (hxi : ∀ z : ℂ, R0 ≤ ‖z‖ → + ‖xiJensenEntire z‖ ≤ + Real.exp (C * ‖z‖ * Real.log (‖z‖ + 2))) + (hs : (centeredXiPositiveZeroWindow T).Nonempty) + (hT : 0 < T) (hH : 0 < H) (ha : 0 ≤ a) + (hR0 : R0 ≤ a) (hwidth : H ≤ b - a) + (hbT : b ^ 2 ≤ T ^ 2 / 2) : + ∃ R ∈ Set.Icc a b, ∀ z ∈ Metric.sphere (0 : ℂ) R, + ‖centeredXiCancelledQuotient z‖ ≤ + Real.exp (centeredXiQuotientCircleExponent C T H z) := by + obtain ⟨R, hR, hproduct⟩ := + exists_circle_norm_centeredXiPairedProduct_lower_actual + hzero hs hT hH ha hwidth hbT + refine ⟨R, hR, ?_⟩ + intro z hz + let n : ℕ := (centeredXiPositiveZeroWindow T).card + let x : ℝ := H / (3 * n * T) + let tail : ℝ := ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + |(centeredXiPositiveSquaredOrdinate i)⁻¹| + have hn : 0 < n := hs.card_pos + have hx : 0 < x := by dsimp [x, n]; positivity + have htail0 : 0 ≤ tail := tsum_nonneg fun _ ↦ abs_nonneg _ + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + have hzR0 : R0 ≤ ‖z‖ := by + rw [hzNorm] + exact hR0.trans hR.1 + have hhead := + centeredXiPositiveZeroWindow_uniform_head_le hT hH hs + have hlower : + x ^ (2 * n) * + Real.exp (-(3 / 2 : ℝ) * ‖z ^ 2‖ * tail) ≤ + ‖centeredXiPairedProduct z‖ := by + apply le_trans ?_ (hproduct z hz) + apply mul_le_mul_of_nonneg_right + · simpa [x, n] using hhead + · positivity + have hL : 0 < x ^ (2 * n) * + Real.exp (-(3 / 2 : ℝ) * ‖z ^ 2‖ * tail) := by positivity + have hq := norm_centeredXiCancelledQuotient_le_div_of_product_lower + hzero centeredXi_inverseSquareSummability_actual hL hlower + have hupper := hxi z hzR0 + apply hq.trans + calc + ‖xiJensenEntire z‖ / + (x ^ (2 * n) * + Real.exp (-(3 / 2 : ℝ) * ‖z ^ 2‖ * tail)) + ≤ Real.exp (C * ‖z‖ * Real.log (‖z‖ + 2)) / + (x ^ (2 * n) * + Real.exp (-(3 / 2 : ℝ) * ‖z ^ 2‖ * tail)) := by + exact div_le_div_of_nonneg_right hupper hL.le + _ = Real.exp (centeredXiQuotientCircleExponent C T H z) := by + have hlogx : + Real.log x = -Real.log T - + Real.log (3 * n / H) := by + rw [show x = (T * (3 * n / H))⁻¹ by + dsimp [x] + field_simp + <;> ring] + rw [Real.log_inv, Real.log_mul (ne_of_gt hT) (by positivity)] + ring + rw [div_eq_iff hL.ne'] + rw [← Real.exp_log hx, ← Real.exp_nat_mul, + ← Real.exp_add, ← Real.exp_add] + dsimp [centeredXiQuotientCircleExponent, n, tail] + rw [hlogx] + congr 1 + push_cast + ring + +/-- The explicit circle exponent is dominated by the normalized loss already +proved to vanish. -/ +noncomputable def CenteredXiDyadicShiftedLoss + (Ksq Klin : ℝ) (j : ℕ) : ℝ := + Ksq * ((j + 1 : ℝ) ^ 2 / (2 : ℝ) ^ j) + + Klin * ((j + 1 : ℝ) / (2 : ℝ) ^ j) + + 6 * ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ (j + 2))}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖ + +theorem tendsto_centeredXiDyadicShiftedLoss + (hzero : XiCenteredCriticalZeroReality) (Ksq Klin : ℝ) : + Tendsto (CenteredXiDyadicShiftedLoss Ksq Klin) atTop (𝓝 0) := by + have htail := + (tendsto_centeredXiPositiveZeroWindow_invSq_tail_zero + hzero centeredXi_inverseSquareSummability_actual).comp + (tendsto_add_atTop_nat 2) + have h := + tendsto_centeredXiDyadicNormalizedLoss Ksq Klin htail + convert h using 1 + funext j + simp [CenteredXiDyadicShiftedLoss, + CenteredXiDyadicNormalizedLoss, Function.comp_apply, + Complex.norm_real, Real.norm_eq_abs] + +theorem centeredXiQuotientCircleExponent_le_dyadicLoss + {B C : ℝ} (hB : 0 ≤ B) (hC : 0 ≤ C) (j : ℕ) + (hcard : + ((centeredXiPositiveZeroWindow + ((2 : ℝ) ^ (j + 2))).card : ℝ) ≤ + B * (2 : ℝ) ^ j * (j + 1 : ℝ)) + (hwindow : (centeredXiPositiveZeroWindow + ((2 : ℝ) ^ (j + 2))).Nonempty) + (z : ℂ) (hzlo : (2 : ℝ) ^ j ≤ ‖z‖) + (hzhi : ‖z‖ ≤ (2 : ℝ) ^ (j + 1)) : + centeredXiQuotientCircleExponent C + ((2 : ℝ) ^ (j + 2)) ((2 : ℝ) ^ j) z ≤ + CenteredXiDyadicShiftedLoss + (4 * B + 6 * B ^ 2) (4 * C) j * + ((2 : ℝ) ^ j) ^ 2 := by + let H : ℝ := (2 : ℝ) ^ j + let T : ℝ := (2 : ℝ) ^ (j + 2) + let n : ℝ := (centeredXiPositiveZeroWindow T).card + let tail : ℝ := ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow T}, + |(centeredXiPositiveSquaredOrdinate i)⁻¹| + have hH : 0 < H := by positivity + have hn : 0 < n := by + dsimp [n, T] + exact_mod_cast hwindow.card_pos + have htail0 : 0 ≤ tail := tsum_nonneg fun _ ↦ abs_nonneg _ + have hT : T = 4 * H := by + dsimp [T, H] + rw [pow_add] + norm_num + ring + have hz2 : ‖z‖ ≤ 2 * H := by + dsimp [H] + rw [pow_succ] at hzhi + nlinarith + have hcard' : n ≤ B * H * (j + 1 : ℝ) := by + simpa [n, T, H] using hcard + have hlogT : Real.log T ≤ 2 * (j + 1 : ℝ) := by + have hlog2 : Real.log (2 : ℝ) ≤ 1 := by + have hh := Real.log_le_sub_one_of_pos (x := 2) (by norm_num) + norm_num at hh ⊢ + exact hh + calc + Real.log T = (j + 2 : ℕ) * Real.log 2 := by + dsimp [T] + rw [Real.log_pow] + _ ≤ (j + 2 : ℝ) := by + have hjnon : 0 ≤ (j + 2 : ℝ) := by positivity + have hh := mul_le_mul_of_nonneg_left hlog2 hjnon + norm_num [Nat.cast_add] at hh ⊢ + exact hh + _ ≤ 2 * (j + 1 : ℝ) := by + nlinarith [Nat.cast_nonneg (α := ℝ) j] + have hlogz : Real.log (‖z‖ + 2) ≤ 2 * (j + 1 : ℝ) := by + have harg : ‖z‖ + 2 ≤ 4 * H := by + have hH1 : 1 ≤ H := one_le_pow₀ (by norm_num) + nlinarith [hz2] + exact (Real.log_le_log (by positivity) harg).trans + (by simpa [hT] using hlogT) + have hroot : 2 * n * Real.log T / H ^ 2 ≤ + 4 * B * ((j + 1 : ℝ) ^ 2 / H) := by + have hlogT0 : 0 ≤ Real.log T := + Real.log_nonneg (by dsimp [T]; exact one_le_pow₀ (by norm_num)) + rw [div_le_iff₀ (sq_pos_of_pos hH)] + calc + 2 * n * Real.log T ≤ + 2 * (B * H * (j + 1 : ℝ)) * + (2 * (j + 1 : ℝ)) := by gcongr + _ = (4 * B * ((j + 1 : ℝ) ^ 2 / H)) * H ^ 2 := by + field_simp + ring + have hcardlog : + 2 * n * Real.log (3 * n / H) / H ^ 2 ≤ + 6 * B ^ 2 * (j + 1 : ℝ) ^ 2 / H := by + have h := card_mul_log_three_mul_div_sq_le_jensen + hn hB hH (by positivity) hcard' + calc + 2 * n * Real.log (3 * n / H) / H ^ 2 = + 2 * (n * Real.log (3 * n / H) / H ^ 2) := by ring + _ ≤ 2 * (3 * B ^ 2 * (j + 1 : ℝ) ^ 2 / H) := + mul_le_mul_of_nonneg_left h (by norm_num) + _ = 6 * B ^ 2 * (j + 1 : ℝ) ^ 2 / H := by ring + have hxi : C * ‖z‖ * Real.log (‖z‖ + 2) / H ^ 2 ≤ + 4 * C * ((j + 1 : ℝ) / H) := by + have hlogz0 : 0 ≤ Real.log (‖z‖ + 2) := + Real.log_nonneg (by linarith [norm_nonneg z]) + rw [div_le_iff₀ (sq_pos_of_pos hH)] + calc + C * ‖z‖ * Real.log (‖z‖ + 2) ≤ + C * (2 * H) * Real.log (‖z‖ + 2) := by + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hz2 hC) hlogz0 + _ ≤ C * (2 * H) * (2 * (j + 1 : ℝ)) := by + exact mul_le_mul_of_nonneg_left hlogz + (mul_nonneg hC (by positivity)) + _ = (4 * C * ((j + 1 : ℝ) / H)) * H ^ 2 := by + field_simp + ring + have htail : (3 / 2 : ℝ) * ‖z ^ 2‖ * tail / H ^ 2 ≤ + 6 * tail := by + rw [norm_pow] + have hzsq : ‖z‖ ^ 2 ≤ (2 * H) ^ 2 := + (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr hz2 + calc + (3 / 2 : ℝ) * ‖z‖ ^ 2 * tail / H ^ 2 + ≤ (3 / 2 : ℝ) * (2 * H) ^ 2 * tail / H ^ 2 := by gcongr + _ = 6 * tail := by field_simp; ring + have hnorm : + centeredXiQuotientCircleExponent C T H z / H ^ 2 ≤ + CenteredXiDyadicShiftedLoss + (4 * B + 6 * B ^ 2) (4 * C) j := by + dsimp [centeredXiQuotientCircleExponent] + change (C * ‖z‖ * Real.log (‖z‖ + 2) + + 2 * n * Real.log T + 2 * n * Real.log (3 * n / H) + + (3 / 2 : ℝ) * ‖z ^ 2‖ * tail) / H ^ 2 ≤ _ + calc + _ = C * ‖z‖ * Real.log (‖z‖ + 2) / H ^ 2 + + 2 * n * Real.log T / H ^ 2 + + 2 * n * Real.log (3 * n / H) / H ^ 2 + + (3 / 2 : ℝ) * ‖z ^ 2‖ * tail / H ^ 2 := by ring + _ ≤ 4 * C * ((j + 1 : ℝ) / H) + + 4 * B * ((j + 1 : ℝ) ^ 2 / H) + + 6 * B ^ 2 * ((j + 1 : ℝ) ^ 2 / H) + + 6 * tail := by + ring_nf at hxi hroot hcardlog htail ⊢ + linarith + _ = CenteredXiDyadicShiftedLoss + (4 * B + 6 * B ^ 2) (4 * C) j := by + unfold CenteredXiDyadicShiftedLoss + dsimp [H, T, tail] + simp only [Complex.norm_real, Real.norm_eq_abs] + ring + change centeredXiQuotientCircleExponent C T H z ≤ + _ * H ^ 2 + exact (div_le_iff₀ (sq_pos_of_pos hH)).mp hnorm + +/-- With at least one positive representative, the actual xi growth and count +estimates instantiate the concrete dyadic quotient-circle bound. -/ +theorem exists_eventually_circle_norm_centeredXiCancelledQuotient_le_shiftedLoss + (hzero : XiCenteredCriticalZeroReality) + [Nonempty CenteredXiPositiveZeroIndex] : + ∃ Ksq Klin : ℝ, ∀ᶠ j : ℕ in atTop, + ∃ R : ℝ, (2 : ℝ) ^ j ≤ R ∧ 0 < R ∧ + ∀ z ∈ Metric.sphere (0 : ℂ) R, + ‖centeredXiCancelledQuotient z‖ ≤ + Real.exp (CenteredXiDyadicShiftedLoss Ksq Klin j * + ((2 : ℝ) ^ j) ^ 2) := by + obtain ⟨C, R0, hC, _hR0, hxi⟩ := + exists_xiJensenEntire_orderOneGrowthBound + obtain ⟨B, RB, hB, _hRB, hcard⟩ := + exists_centeredXiPositiveZeroWindow_card_le_dyadic_actual + let i : CenteredXiPositiveZeroIndex := Classical.choice inferInstance + refine ⟨4 * B + 6 * B ^ 2, 4 * C, ?_⟩ + have hp := tendsto_pow_atTop_atTop_of_one_lt + (by norm_num : (1 : ℝ) < 2) + have hlarge : ∀ᶠ j : ℕ in atTop, + max (max R0 RB) ‖centeredXiZeroRoot i.1‖ ≤ (2 : ℝ) ^ j := + hp.eventually (eventually_ge_atTop _) + filter_upwards [hlarge] with j hj + let H : ℝ := (2 : ℝ) ^ j + let T : ℝ := (2 : ℝ) ^ (j + 2) + have hH : 0 < H := by positivity + have hR0H : R0 ≤ H := + (le_max_left R0 RB).trans (le_max_left (max R0 RB) _ |>.trans hj) + have hRBH : RB ≤ H := + (le_max_right R0 RB).trans (le_max_left (max R0 RB) _ |>.trans hj) + have hHT : H ≤ T := by + dsimp [H, T] + exact pow_le_pow_right₀ (by norm_num) (by omega) + have hwindow : (centeredXiPositiveZeroWindow T).Nonempty := by + refine ⟨i, (mem_centeredXiPositiveZeroWindow T i).mpr ?_⟩ + exact (le_max_right (max R0 RB) _).trans hj |>.trans hHT + have hcardj : + ((centeredXiPositiveZeroWindow T).card : ℝ) ≤ + B * H * (j + 1 : ℝ) := by + simpa [T, H] using hcard j (hRBH.trans hHT) + have hbT : (2 * H) ^ 2 ≤ T ^ 2 / 2 := by + have hT : T = 4 * H := by + dsimp [T, H] + rw [pow_add] + norm_num + ring + rw [hT] + nlinarith [sq_nonneg H] + obtain ⟨R, hR, hq⟩ := + exists_circle_norm_centeredXiCancelledQuotient_le_explicit + hzero hxi hwindow (by positivity) hH hH.le hR0H + (by linarith) hbT + refine ⟨R, hR.1, hH.trans_le hR.1, ?_⟩ + intro z hz + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + have hzlo : H ≤ ‖z‖ := by rw [hzNorm]; exact hR.1 + have hzhi : ‖z‖ ≤ (2 : ℝ) ^ (j + 1) := by + rw [hzNorm] + simpa [H, pow_succ, mul_comm] using hR.2 + exact (hq z hz).trans (Real.exp_le_exp.mpr + (centeredXiQuotientCircleExponent_le_dyadicLoss + hB hC j hcardj hwindow z hzlo hzhi)) + +theorem centeredXiCancelledQuotient_dyadicBoundary_actual_of_nonempty + (hzero : XiCenteredCriticalZeroReality) + [Nonempty CenteredXiPositiveZeroIndex] : + DyadicSubquadraticBoundaryLogNormGrowthJensen + centeredXiCancelledQuotient := by + obtain ⟨Ksq, Klin, hcircle⟩ := + exists_eventually_circle_norm_centeredXiCancelledQuotient_le_shiftedLoss + hzero + obtain ⟨_hqA, hq0⟩ := + centeredXiCancelledQuotient_analytic_ne_zero + hzero centeredXi_inverseSquareSummability_actual + intro ε hε + have hloss := tendsto_centeredXiDyadicShiftedLoss hzero Ksq Klin + have hevent : ∀ᶠ j : ℕ in atTop, + CenteredXiDyadicShiftedLoss Ksq Klin j < ε := + (tendsto_order.1 hloss).2 ε hε + filter_upwards [hcircle, hevent] with j hj hmajor + obtain ⟨R, hHR, hR, hbound⟩ := hj + refine ⟨R, hHR, hR, ?_⟩ + intro z hz + calc + Real.log ‖centeredXiCancelledQuotient z‖ ≤ + Real.log (Real.exp + (CenteredXiDyadicShiftedLoss Ksq Klin j * + ((2 : ℝ) ^ j) ^ 2)) := + Real.log_le_log (norm_pos_iff.mpr (hq0 z)) (hbound z hz) + _ = CenteredXiDyadicShiftedLoss Ksq Klin j * + ((2 : ℝ) ^ j) ^ 2 := Real.log_exp _ + _ ≤ ε * ((2 : ℝ) ^ j) ^ 2 := by gcongr + +theorem centeredXiCancelledQuotient_dyadicBoundary_actual_of_isEmpty + (hzero : XiCenteredCriticalZeroReality) + [IsEmpty CenteredXiPositiveZeroIndex] : + DyadicSubquadraticBoundaryLogNormGrowthJensen + centeredXiCancelledQuotient := by + obtain ⟨C, R0, hC, _hR0, hxi⟩ := + exists_xiJensenEntire_orderOneGrowthBound + obtain ⟨_hqA, hq0⟩ := + centeredXiCancelledQuotient_analytic_ne_zero + hzero centeredXi_inverseSquareSummability_actual + have hqeq : ∀ z : ℂ, + centeredXiCancelledQuotient z = xiJensenEntire z := by + intro z + rw [centeredXiCancelledQuotient_eq_div_of_product_ne + hzero centeredXi_inverseSquareSummability_actual + (by simp [centeredXiPairedProduct])] + simp [centeredXiPairedProduct] + intro ε hε + have hloss := tendsto_centeredXiDyadicShiftedLoss hzero 0 (4 * C) + have hevent : ∀ᶠ j : ℕ in atTop, + CenteredXiDyadicShiftedLoss 0 (4 * C) j < ε := + (tendsto_order.1 hloss).2 ε hε + have hp := tendsto_pow_atTop_atTop_of_one_lt + (by norm_num : (1 : ℝ) < 2) + have hlarge : ∀ᶠ j : ℕ in atTop, R0 ≤ (2 : ℝ) ^ j := + hp.eventually (eventually_ge_atTop R0) + filter_upwards [hevent, hlarge] with j hj hR0 + let H : ℝ := (2 : ℝ) ^ j + have hH : 0 < H := by positivity + refine ⟨H, le_rfl, hH, ?_⟩ + intro z hz + have hzNorm : ‖z‖ = H := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + have hlogT : Real.log (4 * H) ≤ 2 * (j + 1 : ℝ) := by + rw [show 4 * H = (2 : ℝ) ^ (j + 2) by + dsimp [H] + rw [pow_add] + norm_num + ring, Real.log_pow] + have hlog2 : Real.log (2 : ℝ) ≤ 1 := by + have hh := Real.log_le_sub_one_of_pos (x := 2) (by norm_num) + norm_num at hh ⊢ + exact hh + calc + (j + 2 : ℕ) * Real.log 2 ≤ (j + 2 : ℝ) := by + have hh := mul_le_mul_of_nonneg_left hlog2 + (show 0 ≤ (j + 2 : ℝ) by positivity) + norm_num [Nat.cast_add] at hh ⊢ + exact hh + _ ≤ 2 * (j + 1 : ℝ) := by + nlinarith [Nat.cast_nonneg (α := ℝ) j] + have harg : ‖z‖ + 2 ≤ 4 * H := by + rw [hzNorm] + have hH1 : 1 ≤ H := one_le_pow₀ (by norm_num) + linarith + have hlogz : Real.log (‖z‖ + 2) ≤ 2 * (j + 1 : ℝ) := + (Real.log_le_log (by positivity) harg).trans hlogT + have hexp : + C * ‖z‖ * Real.log (‖z‖ + 2) ≤ + CenteredXiDyadicShiftedLoss 0 (4 * C) j * H ^ 2 := by + rw [hzNorm] + have hlogH : Real.log (H + 2) ≤ 2 * (j + 1 : ℝ) := by + simpa [hzNorm] using hlogz + have hmain : + C * H * Real.log (H + 2) ≤ + C * H * (2 * (j + 1 : ℝ)) := by + exact mul_le_mul_of_nonneg_left hlogH + (mul_nonneg hC hH.le) + calc + C * H * Real.log (H + 2) ≤ + C * H * (2 * (j + 1 : ℝ)) := hmain + _ ≤ CenteredXiDyadicShiftedLoss 0 (4 * C) j * H ^ 2 := by + unfold CenteredXiDyadicShiftedLoss + simp [H] + field_simp + nlinarith [Nat.cast_nonneg (α := ℝ) j] + rw [hqeq] + calc + Real.log ‖xiJensenEntire z‖ ≤ + Real.log (Real.exp + (C * ‖z‖ * Real.log (‖z‖ + 2))) := + Real.log_le_log + (by simpa [← hqeq] using norm_pos_iff.mpr (hq0 z)) + (hxi z (by simpa [hzNorm, H] using hR0)) + _ = C * ‖z‖ * Real.log (‖z‖ + 2) := Real.log_exp _ + _ ≤ CenteredXiDyadicShiftedLoss 0 (4 * C) j * H ^ 2 := hexp + _ ≤ ε * H ^ 2 := by gcongr + +theorem centeredXiCancelledQuotient_dyadicBoundary_actual + (hzero : XiCenteredCriticalZeroReality) : + DyadicSubquadraticBoundaryLogNormGrowthJensen + centeredXiCancelledQuotient := by + cases isEmpty_or_nonempty CenteredXiPositiveZeroIndex + · exact centeredXiCancelledQuotient_dyadicBoundary_actual_of_isEmpty hzero + · exact centeredXiCancelledQuotient_dyadicBoundary_actual_of_nonempty hzero + +theorem sphere_disjoint_closedBall_of_radius_not_mem_jensen + {c : ℂ} {r R : ℝ} + (havoid : R ∉ Set.Icc (‖c‖ - r) (‖c‖ + r)) : + Disjoint (Metric.sphere (0 : ℂ) R) + (Metric.closedBall c r) := by + rw [Set.disjoint_left] + intro z hzSphere hzBall + apply havoid + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hzSphere + have hzDist : ‖z - c‖ ≤ r := by + simpa [Metric.mem_closedBall, dist_eq_norm] using hzBall + have habs := abs_norm_sub_norm_le z c + rw [hzNorm] at habs + have hdiff₁ : R - ‖c‖ ≤ r := + (le_abs_self _).trans (habs.trans hzDist) + have hdiff₂ : ‖c‖ - R ≤ r := by + simpa using + (neg_le_abs (R - ‖c‖)).trans (habs.trans hzDist) + constructor <;> linarith + +theorem subquadraticBoundaryLogNormGrowth_of_cartanExceptionalDisks_jensen + {g : ℂ → ℂ} (hcartan : CartanExceptionalDiskLogBoundJensen g) : + SubquadraticBoundaryLogNormGrowthJensen g := by + intro ε hε + obtain ⟨r0, hr0, hdata⟩ := hcartan ε hε + let r1 := max r0 1 + refine ⟨r1, hr0.trans (le_max_left _ _), ?_⟩ + intro r hr + have hr0' : r0 ≤ r := (le_max_left _ _).trans hr + obtain ⟨n, center, radius, hrad, hsum, hbound⟩ := + hdata r hr0' + obtain ⟨R, hR, havoid⟩ := + exists_radius_avoiding_exceptionalIntervals_jensen + Finset.univ center radius (fun i _ ↦ hrad i) + (a := r) (b := 2 * r) (by + have hw : 2 * ∑ i, radius i < 2 * r - r := by + linarith + simpa using hw) + refine ⟨R, hR.1, by + have hr1 : 1 ≤ r := (le_max_right _ _).trans hr + exact lt_of_lt_of_le zero_lt_one (hr1.trans hR.1), ?_⟩ + intro z hz + have hzNorm : ‖z‖ = R := by + simpa [Metric.mem_sphere, dist_zero_right] using hz + apply hbound z + · rw [hzNorm] + exact hR.1 + · rw [hzNorm] + exact hR.2 + · intro i hiBall + have hdisjoint := + sphere_disjoint_closedBall_of_radius_not_mem_jensen + (havoid i (Finset.mem_univ i)) + exact Set.disjoint_left.mp hdisjoint hz hiBall + +theorem subquadraticRealPartGrowth_of_exp_eq_jensen + {g h : ℂ → ℂ} (hexp : ∀ z, Complex.exp (h z) = g z) + (hgrowth : SubquadraticLogNormGrowthJensen g) : + SubquadraticRealPartGrowthJensen h := by + intro ε hε + obtain ⟨R, hR, hbound⟩ := hgrowth ε hε + refine ⟨R, hR, fun r hr z hz ↦ ?_⟩ + rw [show (h z).re = Real.log ‖g z‖ by + rw [← hexp, Complex.norm_exp, Real.log_exp]] + exact hbound r hr z hz + +theorem iteratedDeriv_two_eq_zero_of_subquadraticRealPartGrowth_jensen + (h : ℂ → ℂ) (hh : AnalyticOnNhd ℂ h Set.univ) + (hgrowth : SubquadraticRealPartGrowthJensen h) : + ∀ c, iteratedDeriv 2 h c = 0 := by + intro c + by_contra hc + let d := ‖iteratedDeriv 2 h c‖ + have hd : 0 < d := norm_pos_iff.mpr hc + let ε := d / 256 + have hε : 0 < ε := div_pos hd (by norm_num) + obtain ⟨R, hR0, hbound⟩ := hgrowth ε hε + let A := 256 * (‖h 0‖ + 1) / d + have hA : 0 < A := by dsimp [A]; positivity + let S := 4 * (R + ‖c‖ + A + 1) + have hS : 0 < S := by dsimp [S]; positivity + have hRS : R ≤ S := by dsimp [S]; nlinarith [norm_nonneg c] + have hcS : ‖c‖ < S / 4 := by dsimp [S]; nlinarith + have hAS : A < S := by dsimp [S]; nlinarith [norm_nonneg c] + let q := S / 2 + have hq : 0 < q := half_pos hS + have hdiff : Differentiable ℂ h := + differentiableOn_univ.mp hh.differentiableOn + have hmaps : Set.MapsTo h (Metric.ball 0 S) + {z : ℂ | z.re ≤ ε * S ^ 2} := by + intro z hz + exact hbound S hRS z hz + have hM : 0 < ε * S ^ 2 := mul_pos hε (sq_pos_of_pos hS) + have hsphere : ∀ z ∈ Metric.sphere c q, + ‖h z‖ ≤ 8 * (ε * S ^ 2) + 8 * ‖h 0‖ := by + intro z hz + have hzdist : ‖z - c‖ = q := by + simpa [Metric.mem_sphere, dist_eq_norm] using hz + have hznorm : ‖z‖ ≤ q + ‖c‖ := by + calc + ‖z‖ = ‖(z - c) + c‖ := by ring_nf + _ ≤ ‖z - c‖ + ‖c‖ := norm_add_le _ _ + _ = q + ‖c‖ := by rw [hzdist] + have hzS : ‖z‖ < S := by + dsimp [q] at hznorm + linarith + have hzball : z ∈ Metric.ball (0 : ℂ) S := by + simpa [Metric.mem_ball] using hzS + have hBC := Complex.borelCaratheodory hM + hdiff.differentiableOn hmaps hS hzball + have hden : S / 4 ≤ S - ‖z‖ := by + dsimp [q] at hznorm + linarith + have hzleS : ‖z‖ ≤ S := hzS.le + calc + ‖h z‖ ≤ 2 * (ε * S ^ 2) * ‖z‖ / (S - ‖z‖) + + ‖h 0‖ * (S + ‖z‖) / (S - ‖z‖) := hBC + _ ≤ 2 * (ε * S ^ 2) * S / (S / 4) + + ‖h 0‖ * (2 * S) / (S / 4) := by + apply add_le_add + · exact div_le_div₀ + (by positivity) (by gcongr) (by positivity) hden + · exact div_le_div₀ + (by positivity) (by gcongr; linarith) (by positivity) hden + _ = 8 * (ε * S ^ 2) + 8 * ‖h 0‖ := by + field_simp + ring + have hcauchy := Complex.norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le + 2 hq hdiff.diffContOnCl hsphere + have hSsq : 256 * ‖h 0‖ / d ≤ S ^ 2 := by + have hAle : 256 * ‖h 0‖ / d ≤ A := by + dsimp [A] + apply div_le_div_of_nonneg_right _ hd.le + nlinarith + have hSone : 1 < S := by + dsimp [S] + nlinarith [hR0, norm_nonneg c, hA] + calc + 256 * ‖h 0‖ / d ≤ A := hAle + _ ≤ S := hAS.le + _ ≤ S ^ 2 := by nlinarith + have hle : d ≤ 64 * ε + 64 * ‖h 0‖ / S ^ 2 := by + dsimp [d] + calc + ‖iteratedDeriv 2 h c‖ ≤ + (2 : ℕ).factorial * + (8 * (ε * S ^ 2) + 8 * ‖h 0‖) / q ^ 2 := hcauchy + _ = 64 * ε + 64 * ‖h 0‖ / S ^ 2 := by + dsimp [q] + field_simp + ring + have hconst : 64 * ‖h 0‖ / S ^ 2 ≤ d / 4 := by + have hmul : 256 * ‖h 0‖ ≤ S ^ 2 * d := + (div_le_iff₀ hd).mp hSsq + rw [div_le_iff₀ (sq_pos_of_pos hS)] + nlinarith + dsimp [ε] at hle + linarith + +theorem eq_affine_of_subquadraticRealPartGrowth_jensen + (h : ℂ → ℂ) (hh : AnalyticOnNhd ℂ h Set.univ) + (hgrowth : SubquadraticRealPartGrowthJensen h) : + ∃ a b : ℂ, h = fun z ↦ a + b * z := by + let a := h 0 + let b := deriv h 0 + have hsecond := + iteratedDeriv_two_eq_zero_of_subquadraticRealPartGrowth_jensen h hh hgrowth + have hderiv : ∀ z, deriv h z = b := by + intro z + apply isOpen_univ.is_const_of_deriv_eq_zero isPreconnected_univ + hh.deriv.differentiableOn + (fun w hw ↦ ?_) (Set.mem_univ z) (Set.mem_univ 0) + simpa [iteratedDeriv_succ, iteratedDeriv_one] using hsecond w + refine ⟨a, b, ?_⟩ + funext z + apply isOpen_univ.eqOn_of_deriv_eq isPreconnected_univ + hh.differentiableOn (by fun_prop) (fun w hw ↦ ?_) + (Set.mem_univ 0) (by simp [a]) (Set.mem_univ z) + simpa using hderiv w + +theorem iteratedDeriv_two_eq_zero_of_subquadraticNormGrowth_jensen + (h : ℂ → ℂ) (hh : AnalyticOnNhd ℂ h Set.univ) + (hgrowth : SubquadraticNormGrowthJensen h) : + ∀ c, iteratedDeriv 2 h c = 0 := by + intro c + by_contra hc + have hdpos : 0 < ‖iteratedDeriv 2 h c‖ := norm_pos_iff.mpr hc + let ε : ℝ := ‖iteratedDeriv 2 h c‖ / 16 + have hε : 0 < ε := div_pos hdpos (by norm_num) + obtain ⟨R, hR0, hbound⟩ := hgrowth ε hε + let r : ℝ := R + ‖c‖ + 1 + have hr : 0 < r := by dsimp [r]; positivity + have hC : ∀ z ∈ Metric.sphere c r, + ‖h z‖ ≤ 4 * ε * r ^ 2 := by + intro z hz + have hzdist : ‖z - c‖ = r := by + simpa [Metric.mem_sphere, dist_eq_norm] using hz + have hzlower : R ≤ ‖z‖ := by + have htri : ‖z - c‖ ≤ ‖z‖ + ‖c‖ := norm_sub_le z c + rw [hzdist] at htri + dsimp [r] at htri + linarith + have hzupper : ‖z‖ ≤ 2 * r := by + have htri : ‖z‖ ≤ ‖z - c‖ + ‖c‖ := by + calc + ‖z‖ = ‖(z - c) + c‖ := by ring_nf + _ ≤ ‖z - c‖ + ‖c‖ := norm_add_le _ _ + rw [hzdist] at htri + have hcr : ‖c‖ ≤ r := by dsimp [r]; linarith + linarith + calc + ‖h z‖ ≤ ε * ‖z‖ ^ 2 := hbound z hzlower + _ ≤ ε * (2 * r) ^ 2 := by gcongr + _ = 4 * ε * r ^ 2 := by ring + have hdif : Differentiable ℂ h := + differentiableOn_univ.mp hh.differentiableOn + have hcauchy := Complex.norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le + 2 hr hdif.diffContOnCl hC + have hle : ‖iteratedDeriv 2 h c‖ ≤ 8 * ε := by + calc + ‖iteratedDeriv 2 h c‖ ≤ + (2 : ℕ).factorial * (4 * ε * r ^ 2) / r ^ 2 := hcauchy + _ = 8 * ε := by + norm_num [Nat.factorial] + field_simp + norm_num + dsimp [ε] at hle + linarith + +theorem eq_affine_of_subquadraticNormGrowth_jensen + (h : ℂ → ℂ) (hh : AnalyticOnNhd ℂ h Set.univ) + (hgrowth : SubquadraticNormGrowthJensen h) : + ∃ a b : ℂ, h = fun z ↦ a + b * z := by + let a := h 0 + let b := deriv h 0 + have hsecond := + iteratedDeriv_two_eq_zero_of_subquadraticNormGrowth_jensen h hh hgrowth + have hderiv : ∀ z, deriv h z = b := by + intro z + apply isOpen_univ.is_const_of_deriv_eq_zero isPreconnected_univ + hh.deriv.differentiableOn + (fun w hw ↦ ?_) (Set.mem_univ z) (Set.mem_univ 0) + simpa [iteratedDeriv_succ, iteratedDeriv_one] using hsecond w + refine ⟨a, b, ?_⟩ + funext z + apply isOpen_univ.eqOn_of_deriv_eq isPreconnected_univ + hh.differentiableOn (by fun_prop) (fun w hw ↦ ?_) + (Set.mem_univ 0) (by simp [a]) (Set.mem_univ z) + simpa using hderiv w + +def XiCenteredCancelledQuotientLogGrowth : Prop := + ∃ h : ℂ → ℂ, + AnalyticOnNhd ℂ h Set.univ ∧ + (∀ z, Complex.exp (h z) = centeredXiCancelledQuotient z) ∧ + SubquadraticNormGrowthJensen h + +/-- Natural Cartan/Hadamard growth condition on the quotient itself. Unlike +`XiCenteredCancelledQuotientLogGrowth`, this only controls the real part of +an analytic logarithm and is therefore the estimate produced by quotient +norm bounds. -/ +def XiCenteredCancelledQuotientLogNormGrowth : Prop := + SubquadraticLogNormGrowthJensen centeredXiCancelledQuotient + +/-- Selected-circle form of the remaining minimum-modulus obligation. -/ +def XiCenteredCancelledQuotientSelectedCircleGrowth : Prop := + SubquadraticBoundaryLogNormGrowthJensen centeredXiCancelledQuotient + +def XiCenteredCancelledQuotientCartanDiskGrowth : Prop := + CartanExceptionalDiskLogBoundJensen centeredXiCancelledQuotient + +theorem exists_centeredXiCancelledQuotient_analyticLog + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + ∃ h : ℂ → ℂ, AnalyticOnNhd ℂ h Set.univ ∧ + ∀ z, Complex.exp (h z) = centeredXiCancelledQuotient z := by + obtain ⟨hqA, hq0⟩ := + centeredXiCancelledQuotient_analytic_ne_zero hzero hsum + exact exists_analytic_log_jensen hqA hq0 + +theorem xiCenteredCancelledQuotientLogNormGrowth_of_selectedCircle + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (hcircle : XiCenteredCancelledQuotientSelectedCircleGrowth) : + XiCenteredCancelledQuotientLogNormGrowth := by + obtain ⟨hqA, hq0⟩ := + centeredXiCancelledQuotient_analytic_ne_zero hzero hsum + exact subquadraticLogNormGrowth_of_boundary_jensen hqA hq0 hcircle + +theorem xiCenteredCancelledQuotientSelectedCircleGrowth_of_cartan + (hcartan : XiCenteredCancelledQuotientCartanDiskGrowth) : + XiCenteredCancelledQuotientSelectedCircleGrowth := + subquadraticBoundaryLogNormGrowth_of_cartanExceptionalDisks_jensen hcartan + +/-- The explicit normalized-loss estimate is sufficient for the exact +selected-circle growth premise consumed by quotient rigidity. -/ +theorem xiCenteredCancelledQuotientSelectedCircleGrowth_of_dyadicLoss + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (Ksq Klin : ℝ) + (hcircle : ∀ᶠ j : ℕ in atTop, + ∃ R : ℝ, (2 : ℝ) ^ j ≤ R ∧ 0 < R ∧ + ∀ z ∈ Metric.sphere (0 : ℂ) R, + ‖centeredXiCancelledQuotient z‖ ≤ Real.exp ( + CenteredXiDyadicNormalizedLoss Ksq Klin + (fun j ↦ + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖) + j * ((2 : ℝ) ^ j) ^ 2)) : + XiCenteredCancelledQuotientSelectedCircleGrowth := by + obtain ⟨_hqA, hq0⟩ := + centeredXiCancelledQuotient_analytic_ne_zero hzero hsum + exact subquadraticBoundaryLogNormGrowth_of_dyadic_jensen + (dyadicSubquadraticBoundaryLogNormGrowth_of_centeredXiLoss + hq0 hzero hsum Ksq Klin hcircle) + +theorem centeredXiPairedProductAffineRigidity_of_logGrowth + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (hgrowth : XiCenteredCancelledQuotientLogGrowth) : + XiCenteredPairedProductAffineRigidity := by + rcases hgrowth with ⟨h, hh, hexp, hgrowth⟩ + obtain ⟨a, b, hab⟩ := + eq_affine_of_subquadraticNormGrowth_jensen h hh hgrowth + refine ⟨a, b, ?_⟩ + have hPdiff := + differentiable_centeredXiPairedProduct hzero hsum + have hP0 : centeredXiPairedProduct 0 ≠ 0 := by + simp [centeredXiPairedProduct] + have hlocal : xiJensenEntire =ᶠ[𝓝 0] + fun z ↦ Complex.exp (a + b * z) * centeredXiPairedProduct z := by + filter_upwards [(hPdiff 0).continuousAt.eventually_ne hP0] with z hPz + have hq := + centeredXiCancelledQuotient_eq_div_of_product_ne hzero hsum hPz + have he := hexp z + rw [hq, hab] at he + exact (div_eq_iff hPz).mp he.symm + have hxiA : AnalyticOnNhd ℂ xiJensenEntire Set.univ := + fun z _ ↦ differentiable_xiJensenEntire.analyticAt z + have hrhsA : AnalyticOnNhd ℂ + (fun z ↦ Complex.exp (a + b * z) * centeredXiPairedProduct z) + Set.univ := by + intro z hz + exact ((analyticAt_const.add + (analyticAt_const.mul analyticAt_id)).cexp).mul + (hPdiff.analyticAt z) + exact fun z ↦ congrFun (hxiA.eq_of_eventuallyEq hrhsA hlocal) z + +theorem centeredXiPairedProductAffineRigidity_of_logNormGrowth + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (hgrowth : XiCenteredCancelledQuotientLogNormGrowth) : + XiCenteredPairedProductAffineRigidity := by + obtain ⟨h, hh, hexp⟩ := + exists_centeredXiCancelledQuotient_analyticLog hzero hsum + have hreal : SubquadraticRealPartGrowthJensen h := + subquadraticRealPartGrowth_of_exp_eq_jensen hexp hgrowth + obtain ⟨a, b, hab⟩ := + eq_affine_of_subquadraticRealPartGrowth_jensen h hh hreal + refine ⟨a, b, ?_⟩ + have hPdiff := + differentiable_centeredXiPairedProduct hzero hsum + have hP0 : centeredXiPairedProduct 0 ≠ 0 := by + simp [centeredXiPairedProduct] + have hlocal : xiJensenEntire =ᶠ[𝓝 0] + fun z ↦ Complex.exp (a + b * z) * centeredXiPairedProduct z := by + filter_upwards [(hPdiff 0).continuousAt.eventually_ne hP0] with z hPz + have hq := + centeredXiCancelledQuotient_eq_div_of_product_ne hzero hsum hPz + have he := hexp z + rw [hq, hab] at he + exact (div_eq_iff hPz).mp he.symm + have hxiA : AnalyticOnNhd ℂ xiJensenEntire Set.univ := + fun z _ ↦ differentiable_xiJensenEntire.analyticAt z + have hrhsA : AnalyticOnNhd ℂ + (fun z ↦ Complex.exp (a + b * z) * centeredXiPairedProduct z) + Set.univ := by + intro z hz + exact ((analyticAt_const.add + (analyticAt_const.mul analyticAt_id)).cexp).mul + (hPdiff.analyticAt z) + exact fun z ↦ congrFun (hxiA.eq_of_eventuallyEq hrhsA hlocal) z + +theorem centeredXiPairedProduct_divisor_support_eq + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) : + Function.support + (MeromorphicOn.divisor centeredXiPairedProduct Set.univ) = + Function.support centeredXiZeroDivisor := by + have hPdiff := differentiable_centeredXiPairedProduct hzero hsum + have hPA : AnalyticOnNhd ℂ centeredXiPairedProduct Set.univ := + fun z _ ↦ hPdiff.analyticAt z + have hP0 : centeredXiPairedProduct 0 ≠ 0 := by + simp [centeredXiPairedProduct] + have hPfinite : ∀ u : Set.univ, + meromorphicOrderAt centeredXiPairedProduct u.1 ≠ ⊤ := by + intro u + rw [(hPdiff.analyticAt u.1).meromorphicOrderAt_eq] + have ho := hPA.analyticOrderAt_ne_top_of_isPreconnected + (x := (0 : ℂ)) (y := u.1) isPreconnected_univ + (Set.mem_univ 0) (Set.mem_univ u.1) (by + rw [(hPdiff.analyticAt 0).analyticOrderAt_eq_zero.mpr hP0] + exact ENat.zero_ne_top) + simpa using ho + have hPsupport := + hPA.meromorphicNFOn.zero_set_eq_divisor_support hPfinite + rw [centeredXiZeroDivisor_support] + have hp : + Function.support + (MeromorphicOn.divisor centeredXiPairedProduct Set.univ) = + centeredXiPairedProduct ⁻¹' {0} := by + simpa only [Set.univ_inter] using hPsupport.symm + rw [hp] + ext z + exact centeredXiPairedProduct_zero_set_eq hzero hsum z + +/-- Once divisor/minimum-modulus work has produced the affine representation, +the canonical indexed product is normalized without any further assumptions. -/ +theorem centeredXi_eq_normalizedPairedProduct_of_affine + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (haffine : XiCenteredPairedProductAffineRigidity) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := by + rcases haffine with ⟨a, b, hrep⟩ + have hPeven : ∀ z, centeredXiPairedProduct (-z) = + centeredXiPairedProduct z := by + intro z + simp only [centeredXiPairedProduct, neg_sq] + have hP0 : centeredXiPairedProduct 0 ≠ 0 := by + simp [centeredXiPairedProduct] + have hconst := exp_affine_prefactor_eq_const_of_even a b + differentiable_xiJensenEntire + (differentiable_centeredXiPairedProduct hzero hsum) + xiJensenEntire_neg hPeven hP0 hrep + have hcenter0 : xiJensenEntire 0 = (xiGamma 0 : ℂ) := by + rw [← xiJensenGeneratingFunction_sq 0] + simpa using xiJensenGeneratingFunction_zero + have hexpa : Complex.exp a = (xiGamma 0 : ℂ) := by + have h0 := hconst 0 + rw [hcenter0] at h0 + simpa [centeredXiPairedProduct] using h0.symm + intro z + rw [hconst, hexpa] + +theorem centeredXi_eq_normalizedPairedProduct_of_logGrowth + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (hgrowth : XiCenteredCancelledQuotientLogGrowth) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := + centeredXi_eq_normalizedPairedProduct_of_affine hzero hsum + (centeredXiPairedProductAffineRigidity_of_logGrowth hzero hsum hgrowth) + +theorem centeredXi_eq_normalizedPairedProduct_of_logNormGrowth + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (hgrowth : XiCenteredCancelledQuotientLogNormGrowth) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := + centeredXi_eq_normalizedPairedProduct_of_affine hzero hsum + (centeredXiPairedProductAffineRigidity_of_logNormGrowth + hzero hsum hgrowth) + +theorem centeredXi_eq_normalizedPairedProduct_of_selectedCircle + (hzero : XiCenteredCriticalZeroReality) + (hsum : XiCenteredZeroInverseSquareSummability) + (hcircle : XiCenteredCancelledQuotientSelectedCircleGrowth) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := + centeredXi_eq_normalizedPairedProduct_of_logNormGrowth hzero hsum + (xiCenteredCancelledQuotientLogNormGrowth_of_selectedCircle + hzero hsum hcircle) + +theorem centeredXi_eq_normalizedPairedProduct_of_count_and_logGrowth + (hzero : XiCenteredCriticalZeroReality) + (hcount : XiCenteredCumulativeZeroCount) + (hgrowth : XiCenteredCancelledQuotientLogGrowth) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := by + exact centeredXi_eq_normalizedPairedProduct_of_logGrowth hzero + (centeredXi_inverseSquareSummability_of_cumulativeZeroCount hcount) + hgrowth + +theorem centeredXi_eq_normalizedPairedProduct_of_count_and_selectedCircle + (hzero : XiCenteredCriticalZeroReality) + (hcount : XiCenteredCumulativeZeroCount) + (hcircle : XiCenteredCancelledQuotientSelectedCircleGrowth) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := by + exact centeredXi_eq_normalizedPairedProduct_of_selectedCircle hzero + (centeredXi_inverseSquareSummability_of_cumulativeZeroCount hcount) + hcircle + +/-- End-to-end Hadamard identification from the cumulative multiplicity count +and the explicit dyadic quotient estimate. All normalized losses in this +statement are now proved to vanish; the remaining analytic task is to supply +the displayed circle norm inequality from xi's order-one bound and the +paired-product minimum modulus. -/ +theorem centeredXi_eq_normalizedPairedProduct_of_count_and_dyadicLoss + (hzero : XiCenteredCriticalZeroReality) + (hcount : XiCenteredCumulativeZeroCount) + (Ksq Klin : ℝ) + (hcircle : ∀ᶠ j : ℕ in atTop, + ∃ R : ℝ, (2 : ℝ) ^ j ≤ R ∧ 0 < R ∧ + ∀ z ∈ Metric.sphere (0 : ℂ) R, + ‖centeredXiCancelledQuotient z‖ ≤ Real.exp ( + CenteredXiDyadicNormalizedLoss Ksq Klin + (fun j ↦ + ∑' i : {i : CenteredXiPositiveZeroIndex // + i ∉ centeredXiPositiveZeroWindow ((2 : ℝ) ^ j)}, + ‖(((centeredXiPositiveSquaredOrdinate i)⁻¹ : ℝ) : ℂ)‖) + j * ((2 : ℝ) ^ j) ^ 2)) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := by + have hsum := + centeredXi_inverseSquareSummability_of_cumulativeZeroCount hcount + exact centeredXi_eq_normalizedPairedProduct_of_count_and_selectedCircle + hzero hcount + (xiCenteredCancelledQuotientSelectedCircleGrowth_of_dyadicLoss + hzero hsum Ksq Klin hcircle) + +/-- Concrete Hadamard identification under RH. The only analytic inputs are +the unconditional xi count and order-one growth estimates above. -/ +theorem centeredXi_eq_normalizedPairedProduct_actual + (hzero : XiCenteredCriticalZeroReality) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := by + exact centeredXi_eq_normalizedPairedProduct_of_selectedCircle + hzero centeredXi_inverseSquareSummability_actual + (subquadraticBoundaryLogNormGrowth_of_dyadic_jensen + (centeredXiCancelledQuotient_dyadicBoundary_actual hzero)) + +theorem centeredXi_eq_normalizedPairedProduct_of_count_and_cartan + (hzero : XiCenteredCriticalZeroReality) + (hcount : XiCenteredCumulativeZeroCount) + (hcartan : XiCenteredCancelledQuotientCartanDiskGrowth) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := + centeredXi_eq_normalizedPairedProduct_of_count_and_selectedCircle + hzero hcount + (xiCenteredCancelledQuotientSelectedCircleGrowth_of_cartan hcartan) + +theorem centeredXi_eq_normalizedPairedProduct_of_cumulativeCount + (hzero : XiCenteredCriticalZeroReality) + (hcount : XiCenteredCumulativeZeroCount) + (hrigid : XiCenteredDivisorQuotientRigidity) : + ∀ z : ℂ, xiJensenEntire z = + (xiGamma 0 : ℂ) * centeredXiPairedProduct z := by + have hsum := + centeredXi_inverseSquareSummability_of_cumulativeZeroCount hcount + exact centeredXi_eq_normalizedPairedProduct_of_affine hzero hsum + (hrigid (xiCenteredPairedProductDivisorEquality hzero hsum)) + +/-- The sole remaining classical Pólya--Jensen/Hadamard-product converse: +critical-axis zeros of the centered xi function force hyperbolicity of every +finite Jensen polynomial. -/ +def XiRealZeroToJensenHyperbolicity : Prop := + XiCenteredCriticalZeroReality → AllJensenHyperbolic xiGamma + +/-- Canonical-product half of the remaining converse. This is exactly where +the Li-branch genus-one divisor/product must be paired under centered evenness +and identified with a genus-zero product in the squared variable. -/ +def XiCriticalZerosToPositiveGenusZeroProduct : Prop := + XiCenteredCriticalZeroReality → + PositiveGenusZeroProductRepresentation xiJensenGeneratingFunction + +/-- Divisor/order/normalization form of the Hadamard obligation. -/ +def XiCriticalZerosToNormalizedProductIdentification : Prop := + XiCenteredCriticalZeroReality → + XiNormalizedGenusZeroProductIdentification + +/-- Sharpened Hadamard obligation: construct the paired centered product only +up to the affine exponential factor delivered by order-one rigidity. The +normalization theorem above removes that factor automatically. -/ +def XiCriticalZerosToCenteredAffineProductIdentification : Prop := + XiCenteredCriticalZeroReality → + XiCenteredAffinePairedProductIdentification + +/-- Pólya--Jensen half of the remaining converse, in terms of the project's +concrete locally-uniform hyperbolic-limit definition. -/ +def XiLaguerrePolyaToAllJensen : Prop := + XiLaguerrePolyaMembership → AllJensenHyperbolic xiGamma + +/-- Sharp finite-approximation form of the reverse Jensen obligation. The +approximating rows use exactly `binom(d,j) * gamma(j)`; all positive shifts +then follow from the already proved derivative identity and unconditional +xi coefficient nondegeneracy. -/ +def XiReverseJensenApproximation : Prop := + XiCenteredCriticalZeroReality → + JensenCoefficientwiseHyperbolicApproximation xiGamma + +theorem xiReverseJensenApproximation_of_positiveGenusZero + (hproduct : XiCriticalZerosToPositiveGenusZeroProduct) + (hfinite : FinitePositiveGenusZeroJensenHyperbolicity) + (hcoeff : XiPositiveGenusZeroCoefficientConvergence) : + XiReverseJensenApproximation := by + intro hzero + rcases hproduct hzero with ⟨c, root, hc, hroot, hlim⟩ + refine ⟨fun N ↦ + positiveGenusZeroExponentialCoefficient c root N, ?_, ?_⟩ + · intro N d hd + exact hfinite c root N d hc hroot hd + · exact hcoeff c root hc hroot hlim + +theorem xiRealZeroToJensenHyperbolicity_of_reverseJensenApproximation + (hreverse : XiReverseJensenApproximation) : + XiRealZeroToJensenHyperbolicity := by + intro hzero + exact allJensenHyperbolic_of_coefficientwiseApproximation + xiNonzeroJensenFamily (ne_of_gt (xiGamma_strictlyPositive 0)) + (hreverse hzero) + +theorem xiRealZeroToJensenHyperbolicity_of_canonicalProduct + (hproduct : XiCriticalZerosToPositiveGenusZeroProduct) + (hJensen : XiLaguerrePolyaToAllJensen) : + XiRealZeroToJensenHyperbolicity := by + intro hzero + exact hJensen + (xiLaguerrePolyaMembership_of_positiveGenusZeroProduct + (hproduct hzero)) + +theorem xiCriticalZerosToPositiveGenusZeroProduct_of_identification + (hHadamard : XiCriticalZerosToNormalizedProductIdentification) : + XiCriticalZerosToPositiveGenusZeroProduct := by + intro hzero + exact positiveGenusZeroProductRepresentation_of_identification + (hHadamard hzero) + +theorem xiCriticalZerosToNormalizedProduct_of_centeredAffine + (hHadamard : XiCriticalZerosToCenteredAffineProductIdentification) : + XiCriticalZerosToNormalizedProductIdentification := by + intro hzero + exact normalizedProductIdentification_of_centeredAffine + (hHadamard hzero) + +theorem allJensenHyperbolic_iff_riemannHypothesis + (hconverse : XiRealZeroToJensenHyperbolicity) : + AllJensenHyperbolic xiGamma ↔ KakeyaRiemannHypothesisRoot := by + constructor + · exact riemannHypothesis_of_allJensenHyperbolic + · intro hRH + exact hconverse + (xiCenteredCriticalZeroReality_of_riemannHypothesis hRH) + +theorem allJensenHyperbolic_iff_riemannHypothesis_of_reverseJensenApproximation + (hreverse : XiReverseJensenApproximation) : + AllJensenHyperbolic xiGamma ↔ KakeyaRiemannHypothesisRoot := + allJensenHyperbolic_iff_riemannHypothesis + (xiRealZeroToJensenHyperbolicity_of_reverseJensenApproximation hreverse) + +theorem allJensenHyperbolic_iff_riemannHypothesis_of_canonicalProduct + (hproduct : XiCriticalZerosToPositiveGenusZeroProduct) + (hJensen : XiLaguerrePolyaToAllJensen) : + AllJensenHyperbolic xiGamma ↔ KakeyaRiemannHypothesisRoot := + allJensenHyperbolic_iff_riemannHypothesis + (xiRealZeroToJensenHyperbolicity_of_canonicalProduct + hproduct hJensen) + +theorem allJensenHyperbolic_iff_riemannHypothesis_of_identification + (hHadamard : XiCriticalZerosToNormalizedProductIdentification) + (hJensen : XiLaguerrePolyaToAllJensen) : + AllJensenHyperbolic xiGamma ↔ KakeyaRiemannHypothesisRoot := + allJensenHyperbolic_iff_riemannHypothesis_of_canonicalProduct + (xiCriticalZerosToPositiveGenusZeroProduct_of_identification hHadamard) + hJensen + +theorem allJensenHyperbolic_iff_riemannHypothesis_of_centeredAffine + (hHadamard : XiCriticalZerosToCenteredAffineProductIdentification) + (hJensen : XiLaguerrePolyaToAllJensen) : + AllJensenHyperbolic xiGamma ↔ KakeyaRiemannHypothesisRoot := + allJensenHyperbolic_iff_riemannHypothesis_of_identification + (xiCriticalZerosToNormalizedProduct_of_centeredAffine hHadamard) + hJensen + +theorem xiJensenPolynomial_degree_two_hyperbolic_of_polyaFrequency + (hpf : AllJensenPolyaFrequency xiGamma) (n : ℕ) : + Hyperbolic (jensenPolynomial xiGamma 2 n) := by + let b := jensenCoefficientSequence xiGamma 2 n + rw [← finiteCoefficientPolynomial_jensenCoefficientSequence] + apply nonpositiveRooted_hyperbolic + apply finiteASW_degree_two b + · intro j hj + simp [b, jensenCoefficientSequence, Nat.not_le.mpr (by omega : 2 < j)] + · exact hpf 2 n (by norm_num) + · dsimp only [b, jensenCoefficientSequence] + norm_num + exact xiGamma_strictlyPositive n + · dsimp only [b, jensenCoefficientSequence] + norm_num + exact xiGamma_strictlyPositive (n + 2) + +theorem xiJensenHyperbolicThrough_two_of_polyaFrequency + (hpf : AllJensenPolyaFrequency xiGamma) : + JensenHyperbolicThrough xiGamma 2 := by + intro d n hd hd2 + interval_cases d + · exact jensenPolynomial_degree_one_hyperbolic xiGamma n + (ne_of_gt (xiGamma_strictlyPositive (n + 1))) + · exact xiJensenPolynomial_degree_two_hyperbolic_of_polyaFrequency hpf n + +theorem allJensenHyperbolic_xiGamma_of_polyaFrequency + (hASW : FinitePolyaFrequencyHyperbolicity) + (hpf : AllJensenPolyaFrequency xiGamma) : + AllJensenHyperbolic xiGamma := + allJensenHyperbolic_of_polyaFrequency hASW hpf xiNonzeroJensenFamily + +theorem allJensenHyperbolic_xiGamma_of_finiteASW + (hASW : FiniteAissenSchoenbergWhitney) + (hpf : AllJensenPolyaFrequency xiGamma) : + AllJensenHyperbolic xiGamma := + allJensenHyperbolic_xiGamma_of_polyaFrequency + hASW.toHyperbolicity hpf + +theorem riemannHypothesis_of_finiteASW_polyaFrequency + (hASW : FiniteAissenSchoenbergWhitney) + (hpf : AllJensenPolyaFrequency xiGamma) : + KakeyaRiemannHypothesisRoot := + riemannHypothesis_of_allJensenHyperbolic + (allJensenHyperbolic_xiGamma_of_finiteASW hASW hpf) + +theorem allJensenHyperbolic_xiGamma_of_polyaFrequencyThrough + (hASW : ∀ k, FinitePolyaFrequencyHyperbolicityThrough k) + (hpf : AllJensenPolyaFrequency xiGamma) : + AllJensenHyperbolic xiGamma := + allJensenHyperbolic_of_polyaFrequencyThrough + hASW hpf xiNonzeroJensenFamily + +/-- The all-degree unshifted xi obligation left after derivative closure. -/ +def XiUnshiftedHyperbolicity : Prop := + ∀ d : ℕ, 1 ≤ d → Hyperbolic (jensenPolynomial xiGamma d 0) + +theorem allJensenHyperbolic_xiGamma_iff_unshifted + (h : XiCoefficientNondegeneracy) : + AllJensenHyperbolic xiGamma ↔ XiUnshiftedHyperbolicity := + allJensenHyperbolic_iff_unshifted_of_windowNonzero xiGamma h + +theorem allJensenHyperbolic_xiGamma_iff_unshifted_unconditional : + AllJensenHyperbolic xiGamma ↔ XiUnshiftedHyperbolicity := + allJensenHyperbolic_xiGamma_iff_unshifted + xiCoefficientNondegeneracy_unconditional + +/-- The only remaining bridge interfaces separating the formalized xi Taylor +data and finite Jensen algebra from RH are the two Pólya--Jensen directions. -/ +structure BridgeObligations : Prop where + polyaJensenForward : + KakeyaRiemannHypothesisRoot → AllJensenHyperbolic xiGamma + polyaJensenReverse : + AllJensenHyperbolic xiGamma → KakeyaRiemannHypothesisRoot + +/-- The same two bridge directions factored through an actual +local-uniform-limit definition. This separates the coefficient/Jensen +theorem from the zero-location/RH theorem and prevents either direction from +silently assuming RH. -/ +structure AnalyticBridgeObligations : Prop where + polyaJensenLimit : + AllJensenHyperbolic xiGamma ↔ XiLaguerrePolyaMembership + laguerrePolyaRH : + XiLaguerrePolyaMembership ↔ KakeyaRiemannHypothesisRoot + +theorem AnalyticBridgeObligations.toBridgeObligations + (h : AnalyticBridgeObligations) : + BridgeObligations where + polyaJensenForward hRH := + h.polyaJensenLimit.mpr (h.laguerrePolyaRH.mpr hRH) + polyaJensenReverse hJ := + h.laguerrePolyaRH.mp (h.polyaJensenLimit.mp hJ) + +end Kakeya.RHJensen diff --git a/KakeyaLeanGate/WeilPositivity.lean b/KakeyaLeanGate/WeilPositivity.lean new file mode 100644 index 00000000..7139aa49 --- /dev/null +++ b/KakeyaLeanGate/WeilPositivity.lean @@ -0,0 +1,6322 @@ +import Mathlib.Analysis.Calculus.ContDiff.Convolution +import Mathlib.Analysis.Calculus.BumpFunction.Normed +import Mathlib.Analysis.Distribution.TestFunction +import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Calculus.Deriv.Star +import Mathlib.Analysis.Complex.JensenFormula +import Mathlib.Analysis.Fourier.Convolution +import Mathlib.Analysis.InnerProductSpace.GramMatrix +import Mathlib.Analysis.MellinTransform +import Mathlib.Analysis.Meromorphic.Divisor +import Mathlib.Analysis.Normed.Group.Tannery +import Mathlib.Analysis.PSeries +import Mathlib.Analysis.Real.Pi.Bounds +import Mathlib.Analysis.SpecialFunctions.Gamma.Deligne +import Mathlib.Analysis.SpecialFunctions.Gamma.Digamma +import Mathlib.Analysis.Analytic.Uniqueness +import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +import Mathlib.LinearAlgebra.Vandermonde +import Mathlib.Logic.Encodable.Basic +import Mathlib.NumberTheory.LSeries.Dirichlet +import Mathlib.NumberTheory.LSeries.RiemannZeta +import Mathlib.NumberTheory.LSeries.ZetaZeros +import Mathlib.Topology.Algebra.InfiniteSum.Real +import Mathlib.Topology.Order.MonotoneConvergence +import Mathlib.Topology.UniformSpace.UniformConvergence + +/-! +# The Weil-positivity route: unconditional interface and finite lemmas + +This file deliberately stops before the Riemann-zeta explicit formula. Mathlib +`v4.32.0-rc1` has Mellin transforms and the completed zeta function, but no +enumeration of nontrivial zeros and no Guinand--Weil explicit formula. + +We use the critical-line-centred logarithmic normalization. A multiplicative +test `g` on `(0, ∞)` corresponds to a test `f` on `ℝ` by `x = exp t`; its +centred Mellin transform is the bilateral Laplace transform + +`F(z) = ∫ t, f(t) * exp(z*t) dt`, where `z = s - 1/2`. + +Thus RH is the assertion that the spectral parameters `z` are purely +imaginary. The involution is `f⋆(t) = conj (f(-t))`. +-/ + +open Complex Filter MeasureTheory Set TopologicalSpace +open scoped ComplexConjugate ComplexOrder Convolution ContDiff Distributions FourierTransform + Pointwise SchwartzMap Topology + +noncomputable section + +namespace WeilPositivity + +/-- Smooth compactly-supported complex tests on the logarithmic line. -/ +abbrev Test := 𝓓((⊤ : Opens ℝ), ℂ) + +/-- The ambient Schwartz space containing every logarithmic test. Mathlib's +Fourier theory is formulated on this space. -/ +abbrev SchwartzTest := 𝓢(ℝ, ℂ) + +/-- The canonical inclusion `C_c^∞(ℝ) ↪ 𝓢(ℝ)`, assembled from Mathlib's +`HasCompactSupport.toSchwartzMap`. -/ +def toSchwartz (f : Test) : SchwartzTest := + f.hasCompactSupport.toSchwartzMap f.contDiff + +@[simp] +theorem toSchwartz_apply (f : Test) (x : ℝ) : toSchwartz f x = f x := + rfl + +/-! ## Pinned zeta and prime-side declarations -/ + +/-- A compact disk contains only finitely many zeta zeros. This is a genuine +Mathlib theorem about the zero set, but it does not record zero multiplicity. -/ +def zetaZeroWindow (R : ℝ) : Set ℂ := + Metric.closedBall 0 R ∩ riemannZetaZeros + +theorem zetaZeroWindow_finite (R : ℝ) : (zetaZeroWindow R).Finite := + (isCompact_closedBall (0 : ℂ) R).inter_riemannZetaZeros_finite + +/-- The corresponding finite set of distinct zeros. It is useful for local +restricted statements, but cannot be substituted for a multiplicity-aware +Guinand--Weil zero sum. -/ +def zetaZeroWindowFinset (R : ℝ) : Finset ℂ := + (zetaZeroWindow_finite R).toFinset + +@[simp] +theorem mem_zetaZeroWindowFinset {R : ℝ} {s : ℂ} : + s ∈ zetaZeroWindowFinset R ↔ s ∈ Metric.closedBall 0 R ∧ riemannZeta s = 0 := by + simp [zetaZeroWindowFinset, zetaZeroWindow, mem_riemannZetaZeros] + +/-- Positive-height nontrivial zeta zeros up to height `T`. -/ +def positiveNontrivialZetaZeroWindow (T : ℝ) : Set ℂ := + {z | riemannZeta z = 0 ∧ 0 < z.im ∧ z.im ≤ T ∧ 0 < z.re ∧ z.re < 1} + +/-- Every bounded positive-height nontrivial-zero window is finite. This uses +Mathlib's actual discreteness theorem for `riemannZetaZeros`. -/ +theorem positiveNontrivialZetaZeroWindow_finite (T : ℝ) : + (positiveNontrivialZetaZeroWindow T).Finite := by + apply (zetaZeroWindow_finite (|T| + 2)).subset + intro z hz + rcases hz with ⟨hzeta, himpos, himT, hrepos, hreone⟩ + constructor + · rw [Metric.mem_closedBall, dist_zero_right] + calc + ‖z‖ ≤ |z.re| + |z.im| := Complex.norm_le_abs_re_add_abs_im z + _ ≤ 1 + |T| := by + rw [abs_of_pos hrepos, abs_of_pos himpos] + gcongr + exact himT.trans (le_abs_self T) + _ ≤ |T| + 2 := by linarith + · exact hzeta + +def positiveNontrivialZetaZeroWindowFinset (T : ℝ) : Finset ℂ := + (positiveNontrivialZetaZeroWindow_finite T).toFinset + +@[simp] +theorem mem_positiveNontrivialZetaZeroWindowFinset {T : ℝ} {z : ℂ} : + z ∈ positiveNontrivialZetaZeroWindowFinset T ↔ + riemannZeta z = 0 ∧ 0 < z.im ∧ z.im ≤ T ∧ 0 < z.re ∧ z.re < 1 := by + simp [positiveNontrivialZetaZeroWindowFinset, positiveNontrivialZetaZeroWindow] + +/-- In the open critical strip, zeta and completed zeta have exactly the same +zero locations because the real Gamma factor is nonvanishing. -/ +theorem riemannZeta_eq_zero_iff_completedRiemannZeta_eq_zero_of_strip + {ρ : ℂ} (hρ0 : 0 < ρ.re) : + riemannZeta ρ = 0 ↔ completedRiemannZeta ρ = 0 := by + have hρne : ρ ≠ 0 := by + intro h + subst ρ + norm_num at hρ0 + have hGamma : Complex.Gammaℝ ρ ≠ 0 := + Complex.Gammaℝ_ne_zero_of_re_pos hρ0 + rw [riemannZeta_def_of_ne_zero hρne] + simp [hGamma] + +/-- Functional-equation reflection preserves every nontrivial zeta zero +location. -/ +theorem riemannZeta_one_sub_eq_zero_of_strip + {ρ : ℂ} (hzero : riemannZeta ρ = 0) + (hρ0 : 0 < ρ.re) (hρ1 : ρ.re < 1) : + riemannZeta (1 - ρ) = 0 := by + have hcomp : + completedRiemannZeta ρ = 0 := + (riemannZeta_eq_zero_iff_completedRiemannZeta_eq_zero_of_strip hρ0).mp hzero + have hreflect : completedRiemannZeta (1 - ρ) = 0 := by + rw [completedRiemannZeta_one_sub] + exact hcomp + have hre : 0 < (1 - ρ).re := by + norm_num + linarith + exact + (riemannZeta_eq_zero_iff_completedRiemannZeta_eq_zero_of_strip hre).mpr + hreflect + +/-- In centered coordinates, the holomorphic functional equation is the +reflection `z ↦ -z`. -/ +theorem centeredRiemannZeta_neg_eq_zero + {z : ℂ} (hzero : riemannZeta ((1 / 2 : ℂ) + z) = 0) + (hz0 : -1 / 2 < z.re) (hz1 : z.re < 1 / 2) : + riemannZeta ((1 / 2 : ℂ) - z) = 0 := by + have hρ0 : 0 < ((1 / 2 : ℂ) + z).re := by + norm_num + linarith + have hρ1 : ((1 / 2 : ℂ) + z).re < 1 := by + norm_num + linarith + have h := riemannZeta_one_sub_eq_zero_of_strip hzero hρ0 hρ1 + convert h using 1 <;> ring + +/-- Complex conjugation commutes with zeta in its absolutely convergent +half-plane. -/ +theorem riemannZeta_conj_of_one_lt_re + {s : ℂ} (hs : 1 < s.re) : + riemannZeta (star s) = star (riemannZeta s) := by + have hstars : 1 < (star s).re := by simpa using hs + rw [zeta_eq_tsum_one_div_nat_add_one_cpow hstars, + zeta_eq_tsum_one_div_nat_add_one_cpow hs] + change (∑' n : ℕ, 1 / (n + 1 : ℂ) ^ star s) = + Complex.conjLIE.toContinuousLinearEquiv + (∑' n : ℕ, 1 / (n + 1 : ℂ) ^ s) + rw [Complex.conjLIE.toContinuousLinearEquiv.map_tsum] + apply tsum_congr + intro n + change 1 / (n + 1 : ℂ) ^ conj s = + conj (1 / (n + 1 : ℂ) ^ s) + rw [map_div₀, map_one] + rw [Complex.cpow_conj] + · simp + · norm_num [Complex.arg] + exact ⟨by positivity, ne_of_lt Real.pi_pos⟩ + +/-- The holomorphic conjugate reflection of zeta. -/ +def conjugateReflectedRiemannZeta (s : ℂ) : ℂ := + (starRingEnd ℂ) (riemannZeta ((starRingEnd ℂ) s)) + +/-- Complex conjugation commutes with the meromorphic continuation of zeta +away from its pole. The proof analytically continues the absolutely +convergent Dirichlet-series identity. -/ +theorem riemannZeta_conj {s : ℂ} (hs : s ≠ 1) : + riemannZeta (star s) = star (riemannZeta s) := by + let U : Set ℂ := ({1} : Set ℂ)ᶜ + have hUopen : IsOpen U := isOpen_compl_singleton + have hUpre : IsPreconnected U := + (isConnected_compl_singleton_of_one_lt_rank (by simp) (1 : ℂ)).isPreconnected + have hgdiff : DifferentiableOn ℂ conjugateReflectedRiemannZeta U := by + intro z hz + have hzstar : star z ≠ 1 := by + intro h + apply hz + simp only [U, Set.mem_compl_iff, Set.mem_singleton_iff] + calc + z = star (star z) := by simp + _ = star (1 : ℂ) := congrArg star h + _ = 1 := by simp + have h0 : + DifferentiableAt ℂ (conj ∘ riemannZeta ∘ conj) (conj (conj z)) := + (differentiableAt_riemannZeta hzstar).conj_conj + have h1 : + DifferentiableWithinAt ℂ (conj ∘ riemannZeta ∘ conj) U (conj (conj z)) := + h0.differentiableWithinAt + change DifferentiableWithinAt ℂ + (fun x ↦ (starRingEnd ℂ) (riemannZeta ((starRingEnd ℂ) x))) U z + simpa [Function.comp_def] using h1 + have hg : AnalyticOnNhd ℂ conjugateReflectedRiemannZeta U := + hgdiff.analyticOnNhd hUopen + have htwo : (2 : ℂ) ∈ U := by simp [U] + have hevent : + conjugateReflectedRiemannZeta =ᶠ[𝓝 (2 : ℂ)] riemannZeta := by + have hhalf : {z : ℂ | 1 < z.re} ∈ 𝓝 (2 : ℂ) := by + exact (isOpen_lt continuous_const continuous_re).mem_nhds (by norm_num) + filter_upwards [hhalf] with z hz + have h := congrArg star (riemannZeta_conj_of_one_lt_re hz) + simpa [conjugateReflectedRiemannZeta] using h + have heq : + Set.EqOn conjugateReflectedRiemannZeta riemannZeta U := + hg.eqOn_of_preconnected_of_eventuallyEq analyticOn_riemannZeta hUpre htwo hevent + have hpoint := heq (show s ∈ U by simpa [U]) + have hstar := congrArg star hpoint + simpa [conjugateReflectedRiemannZeta] using hstar + +/-- Iterated complex derivatives commute with holomorphic conjugate +reflection. -/ +theorem iteratedDeriv_conj_conj (f : ℂ → ℂ) (n : ℕ) : + iteratedDeriv n (conj ∘ f ∘ conj) = + conj ∘ iteratedDeriv n f ∘ conj := by + induction n with + | zero => rfl + | succ n ih => + rw [iteratedDeriv_succ, iteratedDeriv_succ, ih, deriv_conj_conj] + +/-- Conjugation preserves every zeta zero away from the pole. -/ +theorem riemannZeta_star_eq_zero_iff {s : ℂ} (hs : s ≠ 1) : + riemannZeta (star s) = 0 ↔ riemannZeta s = 0 := by + rw [riemannZeta_conj hs] + simp + +/-- Completed zeta is analytic away from its two poles. -/ +theorem analyticAt_completedRiemannZeta {s : ℂ} (hs0 : s ≠ 0) (hs1 : s ≠ 1) : + AnalyticAt ℂ completedRiemannZeta s := by + let U : Set ℂ := ({0} : Set ℂ)ᶜ ∩ ({1} : Set ℂ)ᶜ + apply DifferentiableOn.analyticAt (s := U) + · intro z hz + exact (differentiableAt_completedZeta + (by simpa [U] using hz.1) (by simpa [U] using hz.2)).differentiableWithinAt + · exact (isOpen_compl_singleton.inter isOpen_compl_singleton).mem_nhds + ⟨by simpa [U], by simpa [U]⟩ + +/-- Actual nontrivial zeta zeros in the open critical strip. -/ +def nontrivialRiemannZetaZeros : Set ℂ := + {ρ | riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ ρ.re < 1} + +theorem nontrivialRiemannZetaZeros_countable : + nontrivialRiemannZetaZeros.Countable := by + have hzeta : riemannZetaZeros.Countable := + isClosed_riemannZetaZeros.isLindelof.countable_of_isDiscrete + isDiscrete_riemannZetaZeros + exact hzeta.mono fun ρ hρ ↦ hρ.1 + +/-- The exact actual zero-location type, before choosing symmetry-orbit +representatives. -/ +def ActualNontrivialZetaZero := ↥nontrivialRiemannZetaZeros + +noncomputable instance : Countable ActualNontrivialZetaZero := + nontrivialRiemannZetaZeros_countable + +/-- The same actual zero set in coordinates centered at `1 / 2`. -/ +def actualCenteredNontrivialZetaZeros : Set ℂ := + {z | riemannZeta ((1 / 2 : ℂ) + z) = 0 ∧ + -1 / 2 < z.re ∧ z.re < 1 / 2} + +/-- Centering at `1 / 2` is an exact equivalence of actual nontrivial zeta +zero locations; this does not choose orbit representatives or discard +multiplicity. -/ +def actualZetaZeroCenteringEquiv : + ActualNontrivialZetaZero ≃ ↥actualCenteredNontrivialZetaZeros where + toFun ρ := ⟨ρ.val - (1 / 2 : ℂ), by + rcases ρ.property with ⟨hzero, hρ0, hρ1⟩ + constructor + · convert hzero using 1 <;> ring + constructor <;> norm_num <;> linarith⟩ + invFun z := ⟨(1 / 2 : ℂ) + z.val, by + rcases z.property with ⟨hzero, hz0, hz1⟩ + exact ⟨hzero, by norm_num; linarith, by norm_num; linarith⟩⟩ + left_inv ρ := by + apply Subtype.ext + change (1 / 2 : ℂ) + (ρ.val - 1 / 2) = ρ.val + ring + right_inv z := by + apply Subtype.ext + change (1 / 2 : ℂ) + z.val - 1 / 2 = z.val + ring + +noncomputable instance : Countable ↥actualCenteredNontrivialZetaZeros := + Countable.of_equiv ActualNontrivialZetaZero actualZetaZeroCenteringEquiv + +/-- Actual finite centered zero window, forgetting multiplicity only for the +purpose of constructing one zero factor per distinct location. -/ +def centeredZetaZeroWindowFinset (T : ℝ) : Finset ℂ := + (positiveNontrivialZetaZeroWindowFinset T).image + (fun ρ ↦ ρ - (1 / 2 : ℂ)) + +/-- All actual centered locations in a finite window except the selected +target and its reflection partner. -/ +def localCenteredZetaNeighbors (T : ℝ) (z : ℂ) : List ℂ := + (((centeredZetaZeroWindowFinset T).erase z).erase (-star z)).toList + +theorem localCenteredZetaNeighbors_nodup + (T : ℝ) {z : ℂ} (hoff : z ≠ -star z) : + (z :: -star z :: localCenteredZetaNeighbors T z).Nodup := by + simp [localCenteredZetaNeighbors] + exact ⟨hoff, Finset.nodup_toList _⟩ + +theorem mem_localCenteredZetaNeighbors + {T : ℝ} {z w : ℂ} (hw : w ∈ centeredZetaZeroWindowFinset T) + (hwz : w ≠ z) (hwp : w ≠ -star z) : + w ∈ localCenteredZetaNeighbors T z := by + simp [localCenteredZetaNeighbors, hw, hwz] + exact hwp + +/-- Actual analytic multiplicity of a zeta zero, defined by Mathlib's local +analytic order. -/ +def zetaZeroMultiplicity (z : ℂ) : ℕ := + analyticOrderNatAt riemannZeta z + +/-- Actual analytic multiplicity is invariant under complex conjugation. -/ +theorem zetaZeroMultiplicity_star {s : ℂ} (hs : s ≠ 1) : + zetaZeroMultiplicity (star s) = zetaZeroMultiplicity s := by + have hsstar : star s ≠ 1 := by + intro h + apply hs + calc + s = star (star s) := by simp + _ = star (1 : ℂ) := congrArg star h + _ = 1 := by simp + have han_s : AnalyticAt ℂ riemannZeta s := + analyticOn_riemannZeta s (by simpa) + have han_star : AnalyticAt ℂ riemannZeta (star s) := + analyticOn_riemannZeta (star s) (by simpa) + let g : ℂ → ℂ := conj ∘ riemannZeta ∘ conj + have hevent : g =ᶠ[𝓝 (star s)] riemannZeta := by + have hU : ({1} : Set ℂ)ᶜ ∈ 𝓝 (star s) := + isOpen_compl_singleton.mem_nhds (by simpa) + filter_upwards [hU] with z hz + have hz1 : z ≠ 1 := by simpa using hz + have h := congrArg star (riemannZeta_conj hz1) + simpa [g, Function.comp_def] using h + have hang : AnalyticAt ℂ g (star s) := + han_star.congr hevent.symm + have horder_g : + analyticOrderAt g (star s) = analyticOrderAt riemannZeta (star s) := + analyticOrderAt_congr hevent + have horders : + analyticOrderAt g (star s) = analyticOrderAt riemannZeta s := by + apply ENat.eq_of_forall_natCast_le_iff + intro n + rw [natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero hang, + natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero han_s] + constructor + · intro h k hk + have hk0 := h k hk + rw [iteratedDeriv_conj_conj] at hk0 + simpa [g, Function.comp_def] using congrArg star hk0 + · intro h k hk + rw [iteratedDeriv_conj_conj] + simp [g, Function.comp_def, h k hk] + unfold zetaZeroMultiplicity analyticOrderNatAt + rw [← horder_g, horders] + +/-- Analytic multiplicity for the completed zeta function. -/ +def completedZetaZeroMultiplicity (z : ℂ) : ℕ := + analyticOrderNatAt completedRiemannZeta z + +/-- In the open right half-plane, the nonvanishing inverse Gamma factor +shows that zeta and completed zeta have identical analytic multiplicities. -/ +theorem zetaZeroMultiplicity_eq_completed + {s : ℂ} (hs0 : 0 < s.re) (hs1 : s.re < 1) : + zetaZeroMultiplicity s = completedZetaZeroMultiplicity s := by + have hsne0 : s ≠ 0 := by + intro h + subst s + norm_num at hs0 + have hsne1 : s ≠ 1 := by + intro h + subst s + norm_num at hs1 + have hcomp := analyticAt_completedRiemannZeta hsne0 hsne1 + have hinv : AnalyticAt ℂ (fun z ↦ (Complex.Gammaℝ z)⁻¹) s := + Complex.differentiable_Gammaℝ_inv.analyticAt s + have hinvne : (Complex.Gammaℝ s)⁻¹ ≠ 0 := + inv_ne_zero (Complex.Gammaℝ_ne_zero_of_re_pos hs0) + have horderInv : + analyticOrderAt (fun z ↦ (Complex.Gammaℝ z)⁻¹) s = 0 := + hinv.analyticOrderAt_eq_zero.mpr hinvne + have hevent : + riemannZeta =ᶠ[𝓝 s] + completedRiemannZeta * fun z ↦ (Complex.Gammaℝ z)⁻¹ := by + filter_upwards [eventually_ne_nhds hsne0] with z hz + rw [riemannZeta_def_of_ne_zero hz] + rfl + have horder : + analyticOrderAt riemannZeta s = + analyticOrderAt completedRiemannZeta s := by + rw [analyticOrderAt_congr hevent] + rw [analyticOrderAt_mul hcomp hinv, horderInv, add_zero] + unfold zetaZeroMultiplicity completedZetaZeroMultiplicity analyticOrderNatAt + rw [horder] + +/-- Functional-equation reflection preserves completed-zeta multiplicity. -/ +theorem completedZetaZeroMultiplicity_one_sub + {s : ℂ} (hs0 : 0 < s.re) (hs1 : s.re < 1) : + completedZetaZeroMultiplicity (1 - s) = + completedZetaZeroMultiplicity s := by + let r : ℂ → ℂ := fun z ↦ 1 - z + have hran : 0 < (1 - s).re := by + norm_num + linarith + have hr0 : AnalyticAt ℂ r s := by fun_prop + have hrderiv : deriv r s ≠ 0 := by + simp [r] + have hcomp : + analyticOrderAt (completedRiemannZeta ∘ r) s = + analyticOrderAt completedRiemannZeta (1 - s) := by + simpa [r] using + (analyticOrderAt_comp_of_deriv_ne_zero + (f := completedRiemannZeta) (g := r) (z₀ := s) hr0 hrderiv) + have hfun : + completedRiemannZeta ∘ r =ᶠ[𝓝 s] completedRiemannZeta := + Eventually.of_forall fun z ↦ by + simpa [r, Function.comp_def] using completedRiemannZeta_one_sub z + have horder : + analyticOrderAt completedRiemannZeta (1 - s) = + analyticOrderAt completedRiemannZeta s := by + rw [← hcomp, analyticOrderAt_congr hfun] + unfold completedZetaZeroMultiplicity analyticOrderNatAt + rw [horder] + +/-- Functional-equation reflection preserves actual zeta multiplicity in the +open critical strip. -/ +theorem zetaZeroMultiplicity_one_sub + {s : ℂ} (hs0 : 0 < s.re) (hs1 : s.re < 1) : + zetaZeroMultiplicity (1 - s) = zetaZeroMultiplicity s := by + have hran0 : 0 < (1 - s).re := by + norm_num + linarith + have hran1 : (1 - s).re < 1 := by + norm_num + linarith + rw [zetaZeroMultiplicity_eq_completed hran0 hran1, + completedZetaZeroMultiplicity_one_sub hs0 hs1, + zetaZeroMultiplicity_eq_completed hs0 hs1] + +/-- Complex conjugation preserves completed-zeta zero locations in the open +critical strip. -/ +theorem completedRiemannZeta_star_eq_zero_iff + {s : ℂ} (hs0 : 0 < s.re) (hs1 : s.re < 1) : + completedRiemannZeta (star s) = 0 ↔ + completedRiemannZeta s = 0 := by + have hstar0 : 0 < (star s).re := by simpa using hs0 + have hsne1 : s ≠ 1 := by + intro h + subst s + norm_num at hs1 + rw [← riemannZeta_eq_zero_iff_completedRiemannZeta_eq_zero_of_strip hstar0, + ← riemannZeta_eq_zero_iff_completedRiemannZeta_eq_zero_of_strip hs0, + riemannZeta_star_eq_zero_iff hsne1] + +/-- Complex conjugation preserves completed-zeta analytic multiplicity in +the open critical strip. -/ +theorem completedZetaZeroMultiplicity_star + {s : ℂ} (hs0 : 0 < s.re) (hs1 : s.re < 1) : + completedZetaZeroMultiplicity (star s) = + completedZetaZeroMultiplicity s := by + have hstar0 : 0 < (star s).re := by simpa using hs0 + have hstar1 : (star s).re < 1 := by simpa using hs1 + have hsne1 : s ≠ 1 := by + intro h + subst s + norm_num at hs1 + rw [← zetaZeroMultiplicity_eq_completed hstar0 hstar1, + zetaZeroMultiplicity_star hsne1, + zetaZeroMultiplicity_eq_completed hs0 hs1] + +/-- Riemann's entire xi function, without the inessential factor `1 / 2`. +This pole-cancelled definition uses Mathlib's entire `Λ₀`. -/ +def riemannXi (s : ℂ) : ℂ := + s * (s - 1) * completedRiemannZeta₀ s + 1 + +theorem differentiable_riemannXi : Differentiable ℂ riemannXi := by + unfold riemannXi + exact ((differentiable_id.mul + (differentiable_id.sub (differentiable_const _))).mul + differentiable_completedZeta₀).add (differentiable_const _) + +theorem analyticOnNhd_riemannXi : + AnalyticOnNhd ℂ riemannXi Set.univ := + differentiable_riemannXi.differentiableOn.analyticOnNhd isOpen_univ + +/-- Xi inherits the completed-zeta functional equation. -/ +theorem riemannXi_one_sub (s : ℂ) : + riemannXi (1 - s) = riemannXi s := by + rw [riemannXi, riemannXi, completedRiemannZeta₀_one_sub] + ring + +/-- Away from the two removed poles, xi is the usual polynomial multiple of +the completed zeta function. -/ +theorem riemannXi_eq_mul_completedRiemannZeta + {s : ℂ} (hs0 : s ≠ 0) (hs1 : s ≠ 1) : + riemannXi s = s * (s - 1) * completedRiemannZeta s := by + rw [riemannXi, completedRiemannZeta_eq] + field_simp + ring + +/-- In the open critical strip, xi and zeta have exactly the same zeros. -/ +theorem riemannXi_eq_zero_iff_riemannZeta_eq_zero_of_strip + {s : ℂ} (hs0 : 0 < s.re) (hs1 : s.re < 1) : + riemannXi s = 0 ↔ riemannZeta s = 0 := by + have hsne0 : s ≠ 0 := by + intro h + subst s + norm_num at hs0 + have hsne1 : s ≠ 1 := by + intro h + subst s + norm_num at hs1 + rw [riemannXi_eq_mul_completedRiemannZeta hsne0 hsne1, + mul_eq_zero, mul_eq_zero, + riemannZeta_eq_zero_iff_completedRiemannZeta_eq_zero_of_strip hs0] + simp [hsne0, sub_ne_zero.mpr hsne1] + +/-- Analytic multiplicity for the entire xi function. -/ +def riemannXiZeroMultiplicity (s : ℂ) : ℕ := + analyticOrderNatAt riemannXi s + +/-- In the open strip, pole cancellation does not change zero +multiplicities. -/ +theorem riemannXiZeroMultiplicity_eq_zeta + {s : ℂ} (hs0 : 0 < s.re) (hs1 : s.re < 1) : + riemannXiZeroMultiplicity s = zetaZeroMultiplicity s := by + have hsne0 : s ≠ 0 := by + intro h + subst s + norm_num at hs0 + have hsne1 : s ≠ 1 := by + intro h + subst s + norm_num at hs1 + let p : ℂ → ℂ := fun z ↦ z * (z - 1) + have hp : AnalyticAt ℂ p s := by + dsimp [p] + fun_prop + have hpne : p s ≠ 0 := by + exact mul_ne_zero hsne0 (sub_ne_zero.mpr hsne1) + have hporder : analyticOrderAt p s = 0 := + hp.analyticOrderAt_eq_zero.mpr hpne + have hcomp : AnalyticAt ℂ completedRiemannZeta s := + analyticAt_completedRiemannZeta hsne0 hsne1 + have hevent : + riemannXi =ᶠ[𝓝 s] p * completedRiemannZeta := by + filter_upwards [eventually_ne_nhds hsne0, + eventually_ne_nhds hsne1] with z hz0 hz1 + exact riemannXi_eq_mul_completedRiemannZeta hz0 hz1 + have horder : + analyticOrderAt riemannXi s = + analyticOrderAt completedRiemannZeta s := by + rw [analyticOrderAt_congr hevent, + analyticOrderAt_mul hp hcomp, hporder, zero_add] + unfold riemannXiZeroMultiplicity analyticOrderNatAt + rw [horder] + exact (zetaZeroMultiplicity_eq_completed hs0 hs1).symm + +/-- Local logarithmic-derivative form of the argument principle: an analytic +zero of finite order contributes exactly `n / (z - ρ)`, while the remaining +factor is analytic and nonvanishing. This is the residue computation needed +at each xi zero; summing it over a rectangle still requires a global residue +theorem. -/ +theorem analytic_logDeriv_local_normalForm + {f : ℂ → ℂ} {ρ : ℂ} (hf : AnalyticAt ℂ f ρ) + (hfinite : analyticOrderAt f ρ ≠ ⊤) : + ∃ g : ℂ → ℂ, AnalyticAt ℂ g ρ ∧ g ρ ≠ 0 ∧ + ∀ᶠ z in 𝓝[≠] ρ, + deriv f z / f z = + (analyticOrderNatAt f ρ : ℂ) / (z - ρ) + deriv g z / g z := by + obtain ⟨g, hg, hg0, hfg⟩ := + hf.analyticOrderAt_ne_top.mp hfinite + simp only [smul_eq_mul] at hfg + refine ⟨g, hg, hg0, ?_⟩ + have hg_ne : ∀ᶠ z in 𝓝 ρ, g z ≠ 0 := + hg.continuousAt.preimage_mem_nhds + (isOpen_compl_singleton.mem_nhds hg0) + have hderiv := hfg.deriv + filter_upwards [hfg.filter_mono nhdsWithin_le_nhds, + hderiv.filter_mono nhdsWithin_le_nhds, + hg.eventually_analyticAt.filter_mono nhdsWithin_le_nhds, + hg_ne.filter_mono nhdsWithin_le_nhds, + self_mem_nhdsWithin] with z hfz hdz hgz hgz0 hz + have hz0 : z - ρ ≠ 0 := sub_ne_zero.mpr hz + generalize hn : analyticOrderNatAt f ρ = n + rw [hn] at hfz hdz + rw [hfz, hdz] + rw [deriv_fun_mul (by fun_prop) hgz.differentiableAt, + deriv_fun_pow (by fun_prop), deriv_sub_const] + simp only [deriv_id'', one_mul] + cases n with + | zero => simp + | succ n => + simp only [Nat.cast_succ, Nat.succ_sub_one] + field_simp + rw [pow_succ] + ring + +/-- Xi is not the zero entire function. -/ +theorem riemannXi_two_ne_zero : riemannXi 2 ≠ 0 := by + have hzeta : riemannZeta 2 ≠ 0 := + riemannZeta_ne_zero_of_one_le_re (by norm_num) + have hcomp : completedRiemannZeta 2 ≠ 0 := by + intro hc + apply hzeta + rw [riemannZeta_def_of_ne_zero (by norm_num)] + simp [hc] + rw [riemannXi_eq_mul_completedRiemannZeta + (by norm_num) (by norm_num)] + exact mul_ne_zero (mul_ne_zero (by norm_num) (by norm_num)) hcomp + +/-- Every xi zero has finite analytic order, by analytic uniqueness and +nonvanishing at `s = 2`. -/ +theorem riemannXi_analyticOrderAt_ne_top (ρ : ℂ) : + analyticOrderAt riemannXi ρ ≠ ⊤ := by + intro htop + have hevent : riemannXi =ᶠ[𝓝 ρ] (fun _z : ℂ ↦ (0 : ℂ)) := + analyticOrderAt_eq_top.mp htop + have hzero : AnalyticOnNhd ℂ (fun _z : ℂ ↦ (0 : ℂ)) Set.univ := + analyticOnNhd_const + have heq : Set.EqOn riemannXi (fun _z : ℂ ↦ (0 : ℂ)) Set.univ := + analyticOnNhd_riemannXi.eqOn_of_preconnected_of_eventuallyEq + hzero isPreconnected_univ (Set.mem_univ ρ) hevent + exact riemannXi_two_ne_zero (by simpa using heq (Set.mem_univ (2 : ℂ))) + +/-- Xi's local log-derivative has residue equal to its analytic +multiplicity at every finite-order point. -/ +theorem riemannXi_logDeriv_local_normalForm + {ρ : ℂ} (hfinite : analyticOrderAt riemannXi ρ ≠ ⊤) : + ∃ g : ℂ → ℂ, AnalyticAt ℂ g ρ ∧ g ρ ≠ 0 ∧ + ∀ᶠ z in 𝓝[≠] ρ, + deriv riemannXi z / riemannXi z = + (riemannXiZeroMultiplicity ρ : ℂ) / (z - ρ) + + deriv g z / g z := by + exact analytic_logDeriv_local_normalForm + (differentiable_riemannXi.analyticAt ρ) hfinite + +/-- Unconditional local residue normal form for xi. -/ +theorem riemannXi_logDeriv_local + (ρ : ℂ) : + ∃ g : ℂ → ℂ, AnalyticAt ℂ g ρ ∧ g ρ ≠ 0 ∧ + ∀ᶠ z in 𝓝[≠] ρ, + deriv riemannXi z / riemannXi z = + (riemannXiZeroMultiplicity ρ : ℂ) / (z - ρ) + + deriv g z / g z := + riemannXi_logDeriv_local_normalForm + (riemannXi_analyticOrderAt_ne_top ρ) + +/-- Uniform data on a closed puncture disk around one xi zero. -/ +structure XiPunctureData (ρ : ℂ) where + radius : ℝ + radius_pos : 0 < radius + factor : ℂ → ℂ + factor_analytic : + ∀ z ∈ Metric.closedBall ρ radius, AnalyticAt ℂ factor z + factor_ne_zero : + ∀ z ∈ Metric.closedBall ρ radius, factor z ≠ 0 + xi_ne_zero : + ∀ z ∈ Metric.closedBall ρ radius, z ≠ ρ → riemannXi z ≠ 0 + logDeriv_eq : + ∀ z ∈ Metric.closedBall ρ radius, z ≠ ρ → + deriv riemannXi z / riemannXi z = + (riemannXiZeroMultiplicity ρ : ℂ) / (z - ρ) + + deriv factor z / factor z + +/-- Every xi point admits a positive-radius puncture disk on which its local +residue decomposition is uniform, including the boundary circle. -/ +theorem exists_riemannXiPunctureData (ρ : ℂ) : + Nonempty (XiPunctureData ρ) := by + obtain ⟨g, hg, hg0, heq⟩ := riemannXi_logDeriv_local ρ + have hg_ne : ∀ᶠ z in 𝓝 ρ, g z ≠ 0 := + hg.continuousAt.preimage_mem_nhds + (isOpen_compl_singleton.mem_nhds hg0) + have heq' : ∀ᶠ z in 𝓝 ρ, z ≠ ρ → + deriv riemannXi z / riemannXi z = + (riemannXiZeroMultiplicity ρ : ℂ) / (z - ρ) + + deriv g z / g z := + eventually_nhdsWithin_iff.mp heq + have hxi_ne : ∀ᶠ z in 𝓝[≠] ρ, riemannXi z ≠ 0 := + (differentiable_riemannXi.analyticAt ρ).eventually_eq_zero_or_eventually_ne_zero.resolve_left + (fun hzero ↦ riemannXi_analyticOrderAt_ne_top ρ + (analyticOrderAt_eq_top.mpr hzero)) + have hxi_ne' : ∀ᶠ z in 𝓝 ρ, z ≠ ρ → riemannXi z ≠ 0 := + eventually_nhdsWithin_iff.mp hxi_ne + obtain ⟨r, hr, hall⟩ := + Metric.nhds_basis_closedBall.mem_iff.mp + (hg.eventually_analyticAt.and (hg_ne.and (hxi_ne'.and heq'))) + exact ⟨{ + radius := r + radius_pos := hr + factor := g + factor_analytic := fun _z hz ↦ (hall hz).1 + factor_ne_zero := fun _z hz ↦ (hall hz).2.1 + xi_ne_zero := fun _z hz hzρ ↦ (hall hz).2.2.1 hzρ + logDeriv_eq := fun _z hz hzρ ↦ (hall hz).2.2.2 hzρ + }⟩ + +/-- A fixed noncomputable choice of valid puncture data at every xi point. -/ +noncomputable def riemannXiPunctureData (ρ : ℂ) : XiPunctureData ρ := + Classical.choice (exists_riemannXiPunctureData ρ) + +/-- Every smaller positive boundary circle lies inside the uniform puncture +disk, contains no xi zeros, and carries the exact residue decomposition. -/ +theorem XiPunctureData.on_sphere + {ρ : ℂ} (D : XiPunctureData ρ) {r : ℝ} + (hr : 0 < r) (hrD : r ≤ D.radius) {z : ℂ} + (hz : z ∈ Metric.sphere ρ r) : + riemannXi z ≠ 0 ∧ + deriv riemannXi z / riemannXi z = + (riemannXiZeroMultiplicity ρ : ℂ) / (z - ρ) + + deriv D.factor z / D.factor z := by + have hnorm : ‖z - ρ‖ = r := by + simpa [Metric.mem_sphere] using hz + have hzball : z ∈ Metric.closedBall ρ D.radius := by + rw [Metric.mem_closedBall, dist_eq_norm'] + simpa only [norm_sub_rev] using hnorm.le.trans hrD + have hzρ : z ≠ ρ := by + intro h + subst z + simp at hnorm + linarith + exact ⟨D.xi_ne_zero z hzball hzρ, D.logDeriv_eq z hzball hzρ⟩ + +/-- The unweighted logarithmic-derivative integral around every sufficiently +small xi puncture is exactly `2πi` times the analytic multiplicity. -/ +theorem XiPunctureData.circleIntegral_logDeriv_eq + {ρ : ℂ} (D : XiPunctureData ρ) {r : ℝ} + (hr : 0 < r) (hrD : r ≤ D.radius) : + (∮ z in C(ρ, r), deriv riemannXi z / riemannXi z) = + 2 * Real.pi * I * (riemannXiZeroMultiplicity ρ : ℂ) := by + let p : ℂ → ℂ := + fun z ↦ (riemannXiZeroMultiplicity ρ : ℂ) / (z - ρ) + let q : ℂ → ℂ := fun z ↦ deriv D.factor z / D.factor z + have hpcont : ContinuousOn p (Metric.sphere ρ r) := by + apply continuousOn_const.div + (continuousOn_id.sub continuousOn_const) + intro z hz + have hzρ : z ≠ ρ := by + intro h + subst z + simp [Metric.mem_sphere] at hz + linarith + exact sub_ne_zero.mpr hzρ + have hqan : AnalyticOnNhd ℂ q (Metric.closedBall ρ r) := by + intro z hz + have hzD : z ∈ Metric.closedBall ρ D.radius := + Metric.closedBall_subset_closedBall hrD hz + exact (D.factor_analytic z hzD).deriv.div + (D.factor_analytic z hzD) (D.factor_ne_zero z hzD) + have hqdiff : DiffContOnCl ℂ q (Metric.ball ρ r) := by + exact ⟨hqan.differentiableOn.mono Metric.ball_subset_closedBall, + by simpa only [Metric.closedBall, closure_ball ρ hr.ne'] using hqan.continuousOn⟩ + have hpint : CircleIntegrable p ρ r := + hpcont.circleIntegrable hr.le + have hqint : CircleIntegrable q ρ r := + (hqan.mono Metric.sphere_subset_closedBall).continuousOn.circleIntegrable hr.le + calc + (∮ z in C(ρ, r), deriv riemannXi z / riemannXi z) = + ∮ z in C(ρ, r), p z + q z := by + apply circleIntegral.integral_congr hr.le + intro z hz + exact (D.on_sphere hr hrD hz).2 + _ = (∮ z in C(ρ, r), p z) + ∮ z in C(ρ, r), q z := + circleIntegral.integral_add hpint hqint + _ = (∮ z in C(ρ, r), (z - ρ)⁻¹) * + (riemannXiZeroMultiplicity ρ : ℂ) + 0 := by + rw [show (∮ z in C(ρ, r), q z) = 0 from + hqdiff.circleIntegral_eq_zero hr.le] + congr 1 + simpa [p, div_eq_inv_mul] using + (circleIntegral.integral_smul_const + (fun z : ℂ ↦ (z - ρ)⁻¹) + (riemannXiZeroMultiplicity ρ : ℂ) ρ r) + _ = _ := by + rw [circleIntegral.integral_sub_inv_of_mem_ball + (show ρ ∈ Metric.ball ρ r by simpa using hr)] + ring + +/-- Summing the exact small-circle identities gives the full finite sum of +local xi residues, with multiplicity, for independently chosen puncture +radii. -/ +theorem riemannXi_finset_sum_puncture_integrals + (s : Finset ℂ) (r : ℂ → ℝ) + (hr : ∀ ρ ∈ s, 0 < r ρ) + (hrD : ∀ ρ ∈ s, r ρ ≤ (riemannXiPunctureData ρ).radius) : + ∑ ρ ∈ s, (∮ z in C(ρ, r ρ), deriv riemannXi z / riemannXi z) = + 2 * Real.pi * I * + ∑ ρ ∈ s, (riemannXiZeroMultiplicity ρ : ℂ) := by + calc + ∑ ρ ∈ s, (∮ z in C(ρ, r ρ), deriv riemannXi z / riemannXi z) = + ∑ ρ ∈ s, (2 * Real.pi * I * + (riemannXiZeroMultiplicity ρ : ℂ)) := by + apply Finset.sum_congr rfl + intro ρ hρ + exact (riemannXiPunctureData ρ).circleIntegral_logDeriv_eq + (hr ρ hρ) (hrD ρ hρ) + _ = _ := by + rw [Finset.mul_sum] + +/-- Weighted local residue identity. This is the puncture contribution +needed after inserting an analytic admissible transform. -/ +theorem XiPunctureData.circleIntegral_mul_logDeriv_eq + {ρ : ℂ} (D : XiPunctureData ρ) {r : ℝ} + (hr : 0 < r) (hrD : r ≤ D.radius) + {h : ℂ → ℂ} (hh : AnalyticOnNhd ℂ h (Metric.closedBall ρ r)) : + (∮ z in C(ρ, r), h z * (deriv riemannXi z / riemannXi z)) = + 2 * Real.pi * I * (riemannXiZeroMultiplicity ρ : ℂ) * h ρ := by + let p : ℂ → ℂ := + fun z ↦ (riemannXiZeroMultiplicity ρ : ℂ) / (z - ρ) + let q : ℂ → ℂ := fun z ↦ deriv D.factor z / D.factor z + have hqan : AnalyticOnNhd ℂ q (Metric.closedBall ρ r) := by + intro z hz + have hzD : z ∈ Metric.closedBall ρ D.radius := + Metric.closedBall_subset_closedBall hrD hz + exact (D.factor_analytic z hzD).deriv.div + (D.factor_analytic z hzD) (D.factor_ne_zero z hzD) + have hrem : DiffContOnCl ℂ (fun z ↦ h z * q z) (Metric.ball ρ r) := by + have han := hh.mul hqan + exact ⟨han.differentiableOn.mono Metric.ball_subset_closedBall, + by simpa only [Metric.closedBall, closure_ball ρ hr.ne'] using han.continuousOn⟩ + have hres : DiffContOnCl ℂ + (fun z ↦ (riemannXiZeroMultiplicity ρ : ℂ) * h z) + (Metric.ball ρ r) := by + have han : AnalyticOnNhd ℂ + (fun z ↦ (riemannXiZeroMultiplicity ρ : ℂ) * h z) + (Metric.closedBall ρ r) := by + intro z hz + exact analyticAt_const.mul (hh z hz) + exact ⟨han.differentiableOn.mono Metric.ball_subset_closedBall, + by simpa only [Metric.closedBall, closure_ball ρ hr.ne'] using han.continuousOn⟩ + have hpcont : ContinuousOn (fun z ↦ h z * p z) (Metric.sphere ρ r) := by + apply (hh.mono Metric.sphere_subset_closedBall).continuousOn.mul + apply continuousOn_const.div + (continuousOn_id.sub continuousOn_const) + intro z hz + have hzρ : z ≠ ρ := by + intro hzr + subst z + simp at hz + linarith + exact sub_ne_zero.mpr hzρ + have hpint : CircleIntegrable (fun z ↦ h z * p z) ρ r := + hpcont.circleIntegrable hr.le + have hqint : CircleIntegrable (fun z ↦ h z * q z) ρ r := + (hh.mul hqan).continuousOn.mono + Metric.sphere_subset_closedBall |>.circleIntegrable hr.le + have hpformula : + (∮ z in C(ρ, r), h z * p z) = + (2 * Real.pi * I) * + ((riemannXiZeroMultiplicity ρ : ℂ) * h ρ) := by + calc + (∮ z in C(ρ, r), h z * p z) = + ∮ z in C(ρ, r), (z - ρ)⁻¹ * + ((riemannXiZeroMultiplicity ρ : ℂ) * h z) := by + apply circleIntegral.integral_congr hr.le + intro z _hz + simp [p, div_eq_inv_mul] + ring + _ = _ := hres.circleIntegral_sub_inv_smul + (show ρ ∈ Metric.ball ρ r by simpa using hr) + calc + (∮ z in C(ρ, r), h z * (deriv riemannXi z / riemannXi z)) = + ∮ z in C(ρ, r), h z * p z + h z * q z := by + apply circleIntegral.integral_congr hr.le + intro z hz + change h z * (deriv riemannXi z / riemannXi z) = + h z * p z + h z * q z + rw [(D.on_sphere hr hrD hz).2] + simp only [p, q] + ring + _ = (∮ z in C(ρ, r), h z * p z) + + ∮ z in C(ρ, r), h z * q z := + circleIntegral.integral_add hpint hqint + _ = (2 * Real.pi * I) * + ((riemannXiZeroMultiplicity ρ : ℂ) * h ρ) + 0 := by + rw [show (∮ z in C(ρ, r), h z * q z) = 0 from + hrem.circleIntegral_eq_zero hr.le] + rw [hpformula] + _ = _ := by ring + +/-- Finite weighted residue sum after inserting one analytic transform. -/ +theorem riemannXi_finset_sum_puncture_integrals_mul + (s : Finset ℂ) (r : ℂ → ℝ) (h : ℂ → ℂ) + (hr : ∀ ρ ∈ s, 0 < r ρ) + (hrD : ∀ ρ ∈ s, r ρ ≤ (riemannXiPunctureData ρ).radius) + (hh : ∀ ρ ∈ s, + AnalyticOnNhd ℂ h (Metric.closedBall ρ (r ρ))) : + ∑ ρ ∈ s, (∮ z in C(ρ, r ρ), + h z * (deriv riemannXi z / riemannXi z)) = + 2 * Real.pi * I * + ∑ ρ ∈ s, (riemannXiZeroMultiplicity ρ : ℂ) * h ρ := by + calc + ∑ ρ ∈ s, (∮ z in C(ρ, r ρ), + h z * (deriv riemannXi z / riemannXi z)) = + ∑ ρ ∈ s, (2 * Real.pi * I * + (riemannXiZeroMultiplicity ρ : ℂ) * h ρ) := by + apply Finset.sum_congr rfl + intro ρ hρ + exact (riemannXiPunctureData ρ).circleIntegral_mul_logDeriv_eq + (hr ρ hρ) (hrD ρ hρ) (hh ρ hρ) + _ = _ := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro ρ _hρ + ring + +/-- Exact Jensen zero-count identity for xi on a circle. This replaces the +local residue sum by Mathlib's divisor formalism; obtaining RvM still requires +a quantitative bound for the boundary average. -/ +theorem riemannXi_circleAverage_log_norm_eq_divisor_sum + (c : ℂ) {R : ℝ} (hR : R ≠ 0) : + Real.circleAverage (fun z ↦ Real.log ‖riemannXi z‖) c R = + ∑ᶠ u, MeromorphicOn.divisor riemannXi (Metric.closedBall c |R|) u * + Real.log (R * ‖c - u‖⁻¹) + + MeromorphicOn.divisor riemannXi (Metric.closedBall c |R|) c * + Real.log R + + Real.log ‖meromorphicTrailingCoeffAt riemannXi c‖ := by + apply MeromorphicOn.circleAverage_log_norm hR + exact (analyticOnNhd_riemannXi.mono (Set.subset_univ _)).meromorphicOn + +/-- Quantitative Jensen bound for xi. Any explicit bound `M` on the outer +circle immediately bounds the multiplicity-weighted number of zeros in the +inner circle. -/ +theorem riemannXi_sum_divisor_le + {c : ℂ} {r R M : ℝ} (hr : 0 < |r|) (hrR : |r| < |R|) + (hM : 1 ≤ M) (hc : riemannXi c ≠ 0) + (hbound : ∀ z ∈ Metric.sphere c |R|, ‖riemannXi z‖ ≤ M) : + ∑ᶠ u, MeromorphicOn.divisor riemannXi + (Metric.closedBall c |r|) u ≤ + Real.log (M / ‖riemannXi c‖) / Real.log (R / r) := by + exact AnalyticOnNhd.sum_divisor_le hr hrR hM + (analyticOnNhd_riemannXi.mono (Set.subset_univ _)) hc hbound + +/-- Xi's divisor coefficient is exactly its natural analytic multiplicity; +there is no pole or infinite-order exceptional case. -/ +theorem riemannXi_divisor_apply + {U : Set ℂ} {z : ℂ} (hz : z ∈ U) : + MeromorphicOn.divisor riemannXi U z = + (riemannXiZeroMultiplicity z : ℤ) := by + rw [MeromorphicOn.AnalyticOnNhd.divisor_apply + (analyticOnNhd_riemannXi.mono (Set.subset_univ _)) hz] + have hfinite := riemannXi_analyticOrderAt_ne_top z + generalize ho : analyticOrderAt riemannXi z = o at hfinite ⊢ + cases o with + | top => exact (hfinite rfl).elim + | coe n => simp [riemannXiZeroMultiplicity, analyticOrderNatAt, ho] + +/-- On any finite zero window, the xi divisor sum is literally the sum of +analytic multiplicities. -/ +theorem riemannXi_finset_divisor_sum_eq_multiplicity + {U : Set ℂ} (s : Finset ℂ) (hs : ∀ z ∈ s, z ∈ U) : + ∑ z ∈ s, MeromorphicOn.divisor riemannXi U z = + ∑ z ∈ s, (riemannXiZeroMultiplicity z : ℤ) := by + apply Finset.sum_congr rfl + intro z hz + exact riemannXi_divisor_apply (hs z hz) + +/-- Actual analytic multiplicity expressed in centered coordinates. -/ +def actualCenteredZetaMultiplicity (z : ℂ) : ℕ := + zetaZeroMultiplicity ((1 / 2 : ℂ) + z) + +/-- Centering preserves multiplicity definitionally once the spectral point +is transported by `actualZetaZeroCenteringEquiv`. -/ +theorem actualCenteredZetaMultiplicity_centering + (ρ : ActualNontrivialZetaZero) : + actualCenteredZetaMultiplicity (actualZetaZeroCenteringEquiv ρ) = + zetaZeroMultiplicity ρ.val := by + simp [actualCenteredZetaMultiplicity, actualZetaZeroCenteringEquiv] + +/-- The actual centered nontrivial zero set is closed under the full +functional-equation/conjugation partner `z ↦ -conj z`. -/ +theorem actualCenteredNontrivialZetaZeros_neg_star + {z : ℂ} (hz : z ∈ actualCenteredNontrivialZetaZeros) : + -star z ∈ actualCenteredNontrivialZetaZeros := by + rcases hz with ⟨hzero, hz0, hz1⟩ + have hρne : (1 / 2 : ℂ) + z ≠ 1 := by + intro h + have hre := congrArg Complex.re h + norm_num at hre + linarith + have hconj0 : + riemannZeta ((1 / 2 : ℂ) + star z) = 0 := by + have hc := + (riemannZeta_star_eq_zero_iff hρne).mpr hzero + convert hc using 1 <;> simp + refine ⟨centeredRiemannZeta_neg_eq_zero hconj0 ?_ ?_, ?_, ?_⟩ + · simpa using hz0 + · simpa using hz1 + · simp + linarith + · simp + linarith + +/-- The full centered partner preserves actual analytic multiplicity. -/ +theorem actualCenteredZetaMultiplicity_neg_star + {z : ℂ} (hz : z ∈ actualCenteredNontrivialZetaZeros) : + actualCenteredZetaMultiplicity (-star z) = + actualCenteredZetaMultiplicity z := by + rcases hz with ⟨_hzero, hz0, hz1⟩ + let ρ : ℂ := (1 / 2 : ℂ) + z + have hρ0 : 0 < ρ.re := by + dsimp [ρ] + norm_num + linarith + have hρ1 : ρ.re < 1 := by + dsimp [ρ] + norm_num + linarith + have hρne : ρ ≠ 1 := by + intro h + have hre := congrArg Complex.re h + dsimp [ρ] at hre + norm_num at hre + linarith + have hstar0 : 0 < (star ρ).re := by simpa using hρ0 + have hstar1 : (star ρ).re < 1 := by simpa using hρ1 + calc + actualCenteredZetaMultiplicity (-star z) = + zetaZeroMultiplicity (1 - star ρ) := by + unfold actualCenteredZetaMultiplicity + congr 1 + dsimp [ρ] + rw [map_add] + rw [map_div₀, map_one, map_ofNat] + ring + _ = zetaZeroMultiplicity (star ρ) := + zetaZeroMultiplicity_one_sub hstar0 hstar1 + _ = zetaZeroMultiplicity ρ := zetaZeroMultiplicity_star hρne + _ = actualCenteredZetaMultiplicity z := rfl + +/-- Positive-height centered zeros. Quotienting this set by +`z ↦ -conj z` gives one index for a critical-line pair or an off-line +quartet. -/ +def actualPositiveCenteredZetaZeros : Set ℂ := + {z | z ∈ actualCenteredNontrivialZetaZeros ∧ 0 < z.im} + +def ActualPositiveCenteredZetaZero := ↥actualPositiveCenteredZetaZeros + +theorem actualPositiveCenteredZetaZeros_countable : + actualPositiveCenteredZetaZeros.Countable := + nontrivialRiemannZetaZeros_countable.image + (fun ρ ↦ ρ - (1 / 2 : ℂ)) |>.mono <| by + intro z hz + exact ⟨z + (1 / 2 : ℂ), by + refine ⟨?_, ?_⟩ + · rcases hz.1 with ⟨hzero, hz0, hz1⟩ + exact ⟨by simpa [add_comm] using hzero, + by norm_num; linarith, by norm_num; linarith⟩ + · ring⟩ + +noncomputable instance : Countable ActualPositiveCenteredZetaZero := + actualPositiveCenteredZetaZeros_countable + +/-- The actual positive-height partner involution. -/ +def actualPositiveCenteredPartner : + ActualPositiveCenteredZetaZero ≃ ActualPositiveCenteredZetaZero where + toFun z := ⟨-star z.val, by + exact ⟨actualCenteredNontrivialZetaZeros_neg_star z.property.1, + by simpa using z.property.2⟩⟩ + invFun z := ⟨-star z.val, by + exact ⟨actualCenteredNontrivialZetaZeros_neg_star z.property.1, + by simpa using z.property.2⟩⟩ + left_inv z := by + apply Subtype.ext + simp + right_inv z := by + apply Subtype.ext + simp + +@[simp] +theorem actualPositiveCenteredPartner_apply + (z : ActualPositiveCenteredZetaZero) : + (actualPositiveCenteredPartner z).val = -star z.val := rfl + +/-- Critical-line positive zeros are exactly the fixed points of the partner +involution. -/ +theorem actualPositiveCenteredPartner_fixed_iff + (z : ActualPositiveCenteredZetaZero) : + actualPositiveCenteredPartner z = z ↔ z.val.re = 0 := by + constructor + · intro h + have hre := congrArg (fun w : ActualPositiveCenteredZetaZero ↦ w.val.re) h + simp at hre + linarith + · intro hre + apply Subtype.ext + apply Complex.ext + · simp [hre] + · simp + +/-- Off-critical positive zeros form two-element partner pairs, corresponding +to four-element zero quartets after adjoining complex conjugates. -/ +theorem actualPositiveCenteredPartner_ne_iff + (z : ActualPositiveCenteredZetaZero) : + actualPositiveCenteredPartner z ≠ z ↔ z.val.re ≠ 0 := + (actualPositiveCenteredPartner_fixed_iff z).not + +/-- Two positive-height zeros represent the same quartet exactly when they +are equal or are functional-equation partners. -/ +instance actualPositiveCenteredOrbitSetoid : + Setoid ActualPositiveCenteredZetaZero where + r a b := b = a ∨ b = actualPositiveCenteredPartner a + iseqv := ⟨ + fun a ↦ Or.inl rfl, + fun {a b} h ↦ by + rcases h with rfl | h + · exact Or.inl rfl + · right + rw [h] + apply Subtype.ext + simp, + fun {a b c} hab hbc ↦ by + rcases hab with rfl | hab + · exact hbc + · rcases hbc with hbc | hbc + · exact Or.inr (hbc.trans hab) + · left + rw [hbc, hab] + apply Subtype.ext + simp⟩ + +/-- The exact countable type of positive-height zeta quartet orbits. -/ +def ActualZetaZeroOrbit := + Quotient actualPositiveCenteredOrbitSetoid + +noncomputable instance : Countable ActualZetaZeroOrbit := + (Quotient.mk'_surjective : + Function.Surjective + (Quotient.mk' : ActualPositiveCenteredZetaZero → ActualZetaZeroOrbit)).countable + +theorem actualZetaZeroOrbit_mk_eq_iff + (a b : ActualPositiveCenteredZetaZero) : + (Quotient.mk' a : ActualZetaZeroOrbit) = Quotient.mk' b ↔ + b = a ∨ b = actualPositiveCenteredPartner a := by + rw [Quotient.eq'] + rfl + +/-- Canonical partial natural-number enumeration obtained from countability. +`none` marks unused codes, avoiding duplicate dummy orbits when the orbit +type is finite. -/ +noncomputable def actualZetaZeroOrbitDecode : + ℕ → Option ActualZetaZeroOrbit := + letI := Encodable.ofCountable ActualZetaZeroOrbit + fun n ↦ Encodable.decode₂ ActualZetaZeroOrbit n + +noncomputable def actualZetaZeroOrbitCode + (q : ActualZetaZeroOrbit) : ℕ := + letI := Encodable.ofCountable ActualZetaZeroOrbit + Encodable.encode q + +/-- Every exact quartet orbit occurs in the partial natural enumeration. -/ +theorem actualZetaZeroOrbitDecode_complete (q : ActualZetaZeroOrbit) : + actualZetaZeroOrbitDecode (actualZetaZeroOrbitCode q) = some q := by + simp [actualZetaZeroOrbitDecode, actualZetaZeroOrbitCode, + Encodable.encodek₂] + +/-- The partial enumeration never assigns two natural codes to the same +orbit. -/ +theorem actualZetaZeroOrbitDecode_injective + {m n : ℕ} {q : ActualZetaZeroOrbit} + (hm : actualZetaZeroOrbitDecode m = some q) + (hn : actualZetaZeroOrbitDecode n = some q) : + m = n := by + letI := Encodable.ofCountable ActualZetaZeroOrbit + rw [show actualZetaZeroOrbitDecode m = + Encodable.decode₂ ActualZetaZeroOrbit m by + rfl, Encodable.decode₂_eq_some] at hm + rw [show actualZetaZeroOrbitDecode n = + Encodable.decode₂ ActualZetaZeroOrbit n by + rfl, Encodable.decode₂_eq_some] at hn + exact hm.symm.trans hn + +/-- Multiplicity descends to quartet orbits because partner multiplicities +are equal. -/ +def actualZetaZeroOrbitMultiplicity : ActualZetaZeroOrbit → ℕ := + Quotient.lift + (fun z : ActualPositiveCenteredZetaZero ↦ + actualCenteredZetaMultiplicity z.val) + (by + intro a b hab + rcases hab with rfl | h + · rfl + · rw [h] + simpa using + (actualCenteredZetaMultiplicity_neg_star a.property.1).symm) + +/-- A bounded positive-height portion of the exact zero type. -/ +def actualPositiveCenteredZeroWindow (T : ℝ) : + Set ActualPositiveCenteredZetaZero := + {z | z.val.im ≤ T} + +theorem actualPositiveCenteredZeroWindow_finite (T : ℝ) : + (actualPositiveCenteredZeroWindow T).Finite := by + let u : ActualPositiveCenteredZetaZero → ℂ := + fun z ↦ (1 / 2 : ℂ) + z.val + apply Set.Finite.of_finite_image (f := u) + · apply (positiveNontrivialZetaZeroWindow_finite T).subset + rintro ρ ⟨z, hz, rfl⟩ + rcases z.property with ⟨⟨hzero, hz0, hz1⟩, hzim⟩ + have hzT : z.val.im ≤ T := hz + exact ⟨hzero, by simpa [u] using hzim, by simpa [u] using hzT, + by norm_num [u]; linarith, by norm_num [u]; linarith⟩ + · exact (fun _ _ _ _ h ↦ Subtype.ext <| by + have := congrArg (fun w : ℂ ↦ w - 1 / 2) h + simpa [u] using this) + +/-- The bounded orbit window is finite, giving local finiteness of the exact +countable quartet enumeration. -/ +def actualZetaZeroOrbitWindow (T : ℝ) : Set ActualZetaZeroOrbit := + Quotient.mk' '' actualPositiveCenteredZeroWindow T + +theorem actualZetaZeroOrbitWindow_finite (T : ℝ) : + (actualZetaZeroOrbitWindow T).Finite := + (actualPositiveCenteredZeroWindow_finite T).image Quotient.mk' + +/-- Every actual positive-height zero belongs to its exact quartet class. -/ +theorem actualZetaZeroOrbit_complete + (z : ActualPositiveCenteredZetaZero) : + Quotient.mk' z ∈ actualZetaZeroOrbitWindow z.val.im := + ⟨z, by simp [actualPositiveCenteredZeroWindow], rfl⟩ + +/-- Actual multiplicity-aware bounded zero count. -/ +def positiveNontrivialZetaZeroCount (T : ℝ) : ℕ := + ∑ z ∈ positiveNontrivialZetaZeroWindowFinset T, zetaZeroMultiplicity z + +/-- Monotonicity of the actual bounded multiplicity count. -/ +theorem positiveNontrivialZetaZeroCount_mono {T U : ℝ} (hTU : T ≤ U) : + positiveNontrivialZetaZeroCount T ≤ positiveNontrivialZetaZeroCount U := by + apply Finset.sum_le_sum_of_subset_of_nonneg + · intro z hz + rw [mem_positiveNontrivialZetaZeroWindowFinset] at hz ⊢ + exact ⟨hz.1, hz.2.1, hz.2.2.1.trans hTU, hz.2.2.2⟩ + · intro z hzU hzT + exact Nat.zero_le _ + +/-- The multiplicity mass in a unit height shell is bounded by the actual +cumulative multiplicity count at its upper endpoint. -/ +theorem positiveNontrivialZetaZeroShellCount_le (k : ℕ) : + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 1), + if (k : ℝ) < z.im then zetaZeroMultiplicity z else 0) ≤ + positiveNontrivialZetaZeroCount (k + 1) := by + apply Finset.sum_le_sum + intro z hz + split_ifs + · exact le_rfl + · exact Nat.zero_le _ + +/-- Main term in the sourced Riemann--von Mangoldt estimate. -/ +def riemannVonMangoldtMain (T : ℝ) : ℝ := + T / (2 * Real.pi) * Real.log (T / (2 * Real.pi * Real.exp 1)) + +/-- Explicit error envelope from Hasanalizade--Shen--Wong (2021). Decimal +constants are represented as exact rationals. -/ +def riemannVonMangoldtError (T : ℝ) : ℝ := + (1038 / 10000 : ℝ) * Real.log T + + (2573 / 10000 : ℝ) * Real.log (Real.log T) + + (93675 / 10000 : ℝ) + +/-- Elementary quadratic envelope for the published main-plus-error terms. +The source gives the much sharper `O(T log T)` expression; this coarse bound +is convenient for summable transform tails. -/ +theorem riemannVonMangoldtMain_add_error_le_quadratic + {T : ℝ} (hT : 3 ≤ T) : + riemannVonMangoldtMain T + riemannVonMangoldtError T ≤ 3 * T ^ 2 := by + have hT0 : 0 ≤ T := by linarith + have hT1 : 1 ≤ T := by linarith + have hd : 1 ≤ 2 * Real.pi := by + nlinarith [Real.pi_gt_three] + have he : 1 ≤ Real.exp 1 := Real.one_le_exp (by norm_num) + have hde : 1 ≤ 2 * Real.pi * Real.exp 1 := + one_le_mul_of_one_le_of_one_le hd he + have hx0 : 0 ≤ T / (2 * Real.pi * Real.exp 1) := by positivity + have hxT : T / (2 * Real.pi * Real.exp 1) ≤ T := + div_le_self hT0 hde + have hlogx : + Real.log (T / (2 * Real.pi * Real.exp 1)) ≤ T := + (Real.log_le_self hx0).trans hxT + have hTd0 : 0 ≤ T / (2 * Real.pi) := by positivity + have hTdT : T / (2 * Real.pi) ≤ T := div_le_self hT0 hd + have hmain : riemannVonMangoldtMain T ≤ T ^ 2 := by + rw [riemannVonMangoldtMain] + calc + T / (2 * Real.pi) * + Real.log (T / (2 * Real.pi * Real.exp 1)) ≤ + (T / (2 * Real.pi)) * T := + mul_le_mul_of_nonneg_left hlogx hTd0 + _ ≤ T * T := mul_le_mul_of_nonneg_right hTdT hT0 + _ = T ^ 2 := by ring + have hlogT0 : 0 ≤ Real.log T := Real.log_nonneg hT1 + have hlogT : Real.log T ≤ T := Real.log_le_self hT0 + have hloglog : Real.log (Real.log T) ≤ T := + (Real.log_le_self hlogT0).trans hlogT + have herror : riemannVonMangoldtError T ≤ 2 * T ^ 2 := by + rw [riemannVonMangoldtError] + calc + (1038 / 10000 : ℝ) * Real.log T + + (2573 / 10000 : ℝ) * Real.log (Real.log T) + + (93675 / 10000 : ℝ) ≤ + (1038 / 10000 : ℝ) * T + + (2573 / 10000 : ℝ) * T + + (93675 / 10000 : ℝ) := by + gcongr + _ ≤ 2 * T ^ 2 := by nlinarith + linarith + +/-- The sourced Riemann--von Mangoldt estimate specialized to Mathlib's +actual analytic-order multiplicity count. This is the sole remaining +number-theoretic obligation for bounded counts. -/ +structure ActualRiemannVonMangoldtBound where + explicit_bound : ∀ N : ℕ, 3 ≤ N → + |(positiveNontrivialZetaZeroCount N : ℝ) - + riemannVonMangoldtMain N| ≤ riemannVonMangoldtError N + +/-- The actual multiplicity mass in `(k+2, k+3]` satisfies the exact sourced +main-plus-error shell bound. -/ +theorem ActualRiemannVonMangoldtBound.shell_count_le + (H : ActualRiemannVonMangoldtBound) (k : ℕ) : + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im then zetaZeroMultiplicity z else 0 : ℕ) ≤ + riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3) := by + have hs : + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im then zetaZeroMultiplicity z else 0 : ℕ) ≤ + positiveNontrivialZetaZeroCount (k + 3) := by + apply Finset.sum_le_sum + intro z hz + split_ifs + · exact le_rfl + · exact Nat.zero_le _ + have hb := H.explicit_bound (k + 3) (by omega) + have hb' : + |(positiveNontrivialZetaZeroCount (k + 3) : ℝ) - + riemannVonMangoldtMain ((k : ℝ) + 3)| ≤ + riemannVonMangoldtError ((k : ℝ) + 3) := by + simpa [Nat.cast_add] using hb + calc + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im then zetaZeroMultiplicity z else 0 : ℕ) ≤ + (positiveNontrivialZetaZeroCount (k + 3) : ℝ) := by exact_mod_cast hs + _ = ((positiveNontrivialZetaZeroCount (k + 3) : ℝ) - + riemannVonMangoldtMain (k + 3)) + + riemannVonMangoldtMain (k + 3) := by ring + _ ≤ riemannVonMangoldtError (k + 3) + + riemannVonMangoldtMain (k + 3) := by + gcongr + exact (le_abs_self _).trans hb' + _ = riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3) := add_comm _ _ + +/-- Coarse actual shell-count consequence used by polynomial transform +decay. -/ +theorem ActualRiemannVonMangoldtBound.shell_count_le_quadratic + (H : ActualRiemannVonMangoldtBound) (k : ℕ) : + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im then zetaZeroMultiplicity z else 0 : ℕ) ≤ + 3 * ((k : ℝ) + 3) ^ 2 := + (H.shell_count_le k).trans <| by + simpa [Nat.cast_add] using + (riemannVonMangoldtMain_add_error_le_quadratic + (T := (k : ℝ) + 3) (by + have hk : (0 : ℝ) ≤ k := Nat.cast_nonneg k + linarith)) + +/-- Mathlib's source-backed prime-side identity in the absolutely convergent +half-plane. This is a useful restricted explicit-formula ingredient, not a +Guinand--Weil formula and not an RH statement. -/ +theorem vonMangoldt_lseries_eq_neg_logDeriv {s : ℂ} (hs : 1 < s.re) : + LSeries (fun n ↦ (ArithmeticFunction.vonMangoldt n : ℂ)) s = + -deriv riemannZeta s / riemannZeta s := by + simpa using ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs + +theorem vonMangoldt_lseries_summable {s : ℂ} (hs : 1 < s.re) : + LSeriesSummable (fun n ↦ (ArithmeticFunction.vonMangoldt n : ℂ)) s := by + simpa using ArithmeticFunction.LSeriesSummable_vonMangoldt hs + +/-- The exact `n`th prime-power term used by Mathlib's von Mangoldt +L-series. In particular the term at `n = 0` is definitionally zero, and the +terms for `n > 0` have normalization `Λ(n) / n^s`. -/ +def vonMangoldtTerm (s : ℂ) (n : ℕ) : ℂ := + LSeries.term (fun m ↦ (ArithmeticFunction.vonMangoldt m : ℂ)) s n + +theorem vonMangoldtTerm_zero (s : ℂ) : vonMangoldtTerm s 0 = 0 := by + simp [vonMangoldtTerm, LSeries.term] + +theorem vonMangoldtTerm_of_ne_zero (s : ℂ) {n : ℕ} (hn : n ≠ 0) : + vonMangoldtTerm s n = + (ArithmeticFunction.vonMangoldt n : ℂ) / (n : ℂ) ^ s := by + simp [vonMangoldtTerm, LSeries.term, hn] + +/-- Finite prime-power truncation in the exact Mathlib L-series +normalization. This is a bounded right-half-plane explicit-formula piece, +not the prime side of a Guinand--Weil formula. -/ +def vonMangoldtPartialSum (s : ℂ) (N : ℕ) : ℂ := + ∑ n ∈ Finset.range N, vonMangoldtTerm s n + +/-- The actual von Mangoldt truncations converge to the zeta logarithmic +derivative throughout the half-plane `re s > 1`. -/ +theorem vonMangoldtPartialSum_tendsto_logDeriv {s : ℂ} (hs : 1 < s.re) : + Tendsto (vonMangoldtPartialSum s) atTop + (𝓝 (-deriv riemannZeta s / riemannZeta s)) := by + have hsum : + Summable (fun n ↦ vonMangoldtTerm s n) := by + exact vonMangoldt_lseries_summable hs + have hlim : + Tendsto (vonMangoldtPartialSum s) atTop + (𝓝 (LSeries (fun n ↦ (ArithmeticFunction.vonMangoldt n : ℂ)) s)) := by + change Tendsto + (fun N ↦ ∑ n ∈ Finset.range N, + LSeries.term (fun m ↦ (ArithmeticFunction.vonMangoldt m : ℂ)) s n) + atTop + (𝓝 (∑' n, LSeries.term + (fun m ↦ (ArithmeticFunction.vonMangoldt m : ℂ)) s n)) + exact hsum.hasSum.tendsto_sum_nat + simpa [vonMangoldt_lseries_eq_neg_logDeriv hs] using hlim + +/-- Exact remainder after a finite von Mangoldt truncation. -/ +def vonMangoldtTail (s : ℂ) (N : ℕ) : ℂ := + ∑' n, vonMangoldtTerm s (n + N) + +/-- Genuine finite-plus-tail identity in the absolutely convergent +half-plane. -/ +theorem vonMangoldtPartialSum_add_tail {s : ℂ} (hs : 1 < s.re) (N : ℕ) : + vonMangoldtPartialSum s N + vonMangoldtTail s N = + -deriv riemannZeta s / riemannZeta s := by + have hsum : Summable (vonMangoldtTerm s) := + vonMangoldt_lseries_summable hs + rw [← vonMangoldt_lseries_eq_neg_logDeriv hs] + exact hsum.sum_add_tsum_nat_add N + +/-- A bounded arithmetic smoothing weight. The unit norm bound is chosen so +that Mathlib's absolute convergence theorem is itself a dominating series. -/ +structure PrimeSmoothingWeight where + coeff : ℕ → ℂ + norm_le_one : ∀ n, ‖coeff n‖ ≤ 1 + +def smoothedVonMangoldtTerm (s : ℂ) (w : PrimeSmoothingWeight) (n : ℕ) : ℂ := + w.coeff n * vonMangoldtTerm s n + +def smoothedVonMangoldtSeries (s : ℂ) (w : PrimeSmoothingWeight) : ℂ := + ∑' n, smoothedVonMangoldtTerm s w n + +theorem smoothedVonMangoldt_summable + {s : ℂ} (hs : 1 < s.re) (w : PrimeSmoothingWeight) : + Summable (smoothedVonMangoldtTerm s w) := by + rw [← summable_norm_iff] + exact (vonMangoldt_lseries_summable hs).norm.of_nonneg_of_le + (fun n ↦ norm_nonneg _) fun n ↦ by + rw [smoothedVonMangoldtTerm, norm_mul] + exact mul_le_of_le_one_left (norm_nonneg _) (w.norm_le_one n) + +/-- Dominated convergence for bounded arithmetic smoothing weights. The +limit is the exact negative logarithmic derivative, with no continuation +across `re s = 1` claimed. -/ +theorem smoothedVonMangoldtSeries_tendsto_logDeriv + {s : ℂ} (hs : 1 < s.re) (w : ℕ → PrimeSmoothingWeight) + (hw : ∀ n, Tendsto (fun k ↦ (w k).coeff n) atTop (𝓝 1)) : + Tendsto (fun k ↦ smoothedVonMangoldtSeries s (w k)) atTop + (𝓝 (-deriv riemannZeta s / riemannZeta s)) := by + have hdom : Summable (fun n ↦ ‖vonMangoldtTerm s n‖) := + (vonMangoldt_lseries_summable hs).norm + have hterm (n : ℕ) : + Tendsto (fun k ↦ smoothedVonMangoldtTerm s (w k) n) atTop + (𝓝 (vonMangoldtTerm s n)) := by + simpa [smoothedVonMangoldtTerm] using (hw n).mul_const (vonMangoldtTerm s n) + have hbound : + ∀ᶠ k in atTop, ∀ n, ‖smoothedVonMangoldtTerm s (w k) n‖ ≤ + ‖vonMangoldtTerm s n‖ := by + exact Eventually.of_forall fun k n ↦ by + rw [smoothedVonMangoldtTerm, norm_mul] + exact mul_le_of_le_one_left (norm_nonneg _) ((w k).norm_le_one n) + have hlim := tendsto_tsum_of_dominated_convergence hdom hterm hbound + rw [show (∑' n, vonMangoldtTerm s n) = + LSeries (fun n ↦ (ArithmeticFunction.vonMangoldt n : ℂ)) s by + rfl] at hlim + simpa [smoothedVonMangoldtSeries, vonMangoldt_lseries_eq_neg_logDeriv hs] using hlim + +/-! ## The actual archimedean Gamma factor -/ + +/-- The archimedean logarithmic derivative in the completed-zeta +normalization used by Mathlib: +`Γℝ(s) = π^(-s/2) Γ(s/2)`. -/ +def archimedeanLogDeriv (s : ℂ) : ℂ := + logDeriv Complex.Gammaℝ s + +/-- Exact Gamma/digamma normalization on the right half-plane. -/ +theorem archimedeanLogDeriv_eq_digamma {s : ℂ} (hs : 0 < s.re) : + archimedeanLogDeriv s = + -(Complex.log Real.pi) / 2 + Complex.digamma (s / 2) / 2 := by + have hhalf : 0 < (s / 2).re := by + simpa using div_pos hs (by norm_num : (0 : ℝ) < 2) + have hnotpole : ∀ n : ℕ, s / 2 ≠ -(n : ℂ) := by + intro n h + have hre := congrArg Complex.re h + simp at hre + linarith + have hGamma : Complex.Gamma (s / 2) ≠ 0 := + Complex.Gamma_ne_zero_of_re_pos hhalf + have hpow : (Real.pi : ℂ) ^ (-s / 2) ≠ 0 := + by simp [Real.pi_ne_zero] + have hpowDiff : DifferentiableAt ℂ (fun z : ℂ ↦ (Real.pi : ℂ) ^ (-z / 2)) s := + (by fun_prop : DifferentiableAt ℂ (fun z : ℂ ↦ -z / 2) s).const_cpow <| + Or.inl (ofReal_ne_zero.mpr Real.pi_ne_zero) + have hGammaDiff : DifferentiableAt ℂ (fun z : ℂ ↦ Complex.Gamma (z / 2)) s := + (Complex.differentiableAt_Gamma (s / 2) hnotpole).comp s (by fun_prop) + have hexponent : HasDerivAt (fun z : ℂ ↦ -z / 2) (-1 / 2) s := by + simpa only [Pi.neg_apply, id_eq] using (hasDerivAt_id s).neg.div_const (2 : ℂ) + have hcomp : + logDeriv (fun z : ℂ ↦ Complex.Gamma (z / 2)) s = + Complex.digamma (s / 2) / 2 := by + change logDeriv (Complex.Gamma ∘ fun z : ℂ ↦ z / 2) s = _ + rw [logDeriv_comp (f := Complex.Gamma) (g := fun z : ℂ ↦ z / 2) + (Complex.differentiableAt_Gamma (s / 2) hnotpole) + (show DifferentiableAt ℂ (fun z : ℂ ↦ z / 2) s by fun_prop), Complex.digamma_def] + simp only [deriv_div_const, deriv_id''] + ring + rw [archimedeanLogDeriv] + change logDeriv + (fun z : ℂ ↦ (Real.pi : ℂ) ^ (-z / 2) * Complex.Gamma (z / 2)) s = _ + rw [logDeriv_mul s hpow hGamma hpowDiff hGammaDiff, hcomp] + rw [logDeriv_apply, Complex.deriv_const_cpow (by fun_prop), hexponent.deriv] + field_simp [hpow] + +/-- At the central normalization point `s = 1`, Mathlib's derivative theorem +gives the exact Euler--Mascheroni and `log(4π)` constant. -/ +theorem archimedeanLogDeriv_one : + archimedeanLogDeriv 1 = + -(Real.eulerMascheroniConstant + Complex.log (4 * Real.pi)) / 2 := by + rw [archimedeanLogDeriv, logDeriv_apply, + Complex.hasDerivAt_Gammaℝ_one.deriv, Complex.Gammaℝ_one, div_one] + +/-- Mathlib's exact complex digamma value at positive integers. -/ +theorem digamma_nat_add_one (n : ℕ) : + Complex.digamma (n + 1) = + -Real.eulerMascheroniConstant + (harmonic n : ℂ) := by + rw [Complex.digamma_def, logDeriv_apply, Complex.deriv_Gamma_nat, + Complex.Gamma_nat_eq_factorial] + field_simp + +/-- The positive-integer digamma asymptotic error from Mathlib's harmonic +number construction of the Euler--Mascheroni constant. -/ +def digammaNatError (n : ℕ) : ℝ := + (harmonic n : ℝ) - Real.log n - Real.eulerMascheroniConstant + +theorem digammaNatError_nonneg {n : ℕ} (hn : n ≠ 0) : + 0 ≤ digammaNatError n := by + have h := Real.eulerMascheroniConstant_lt_eulerMascheroniSeq' n + rw [Real.eulerMascheroniSeq', if_neg hn] at h + exact sub_nonneg.mpr h.le + +/-- Explicit source-backed error bound: +`0 ≤ Hₙ - log n - γ ≤ log(n+1) - log n`. -/ +theorem digammaNatError_le_log_succ_sub_log (n : ℕ) : + digammaNatError n ≤ Real.log (n + 1) - Real.log n := by + have h := Real.eulerMascheroniSeq_lt_eulerMascheroniConstant n + rw [Real.eulerMascheroniSeq] at h + dsimp only [digammaNatError] + linarith + +theorem digammaNatError_tendsto_zero : + Tendsto digammaNatError atTop (𝓝 0) := by + change Tendsto + (fun n : ℕ ↦ (harmonic n : ℝ) - Real.log n - + Real.eulerMascheroniConstant) atTop (𝓝 0) + simpa only [sub_self] using Real.tendsto_harmonic_sub_log.sub + (show Tendsto (fun _ : ℕ ↦ Real.eulerMascheroniConstant) atTop + (𝓝 Real.eulerMascheroniConstant) from tendsto_const_nhds) + +/-- Norm error for the positive-integer digamma asymptotic. -/ +theorem norm_digamma_nat_add_one_sub_log_le {n : ℕ} (hn : n ≠ 0) : + ‖Complex.digamma (n + 1) - (Real.log n : ℂ)‖ ≤ + Real.log (n + 1) - Real.log n := by + rw [digamma_nat_add_one] + have hnonneg := digammaNatError_nonneg hn + have hbound := digammaNatError_le_log_succ_sub_log n + have heq : + (-Real.eulerMascheroniConstant : ℂ) + (harmonic n : ℂ) - + (Real.log n : ℂ) = (digammaNatError n : ℂ) := by + rw [digammaNatError] + push_cast + ring + rw [heq, norm_real, Real.norm_eq_abs, abs_of_nonneg hnonneg] + exact hbound + +/-- A genuine finite harmonic/digamma expression for the archimedean +logarithmic derivative at `s = 2`. -/ +def archimedeanAtTwoStage (n : ℕ) : ℂ := + -(Complex.log Real.pi) / 2 + + (Complex.digamma (n + 1) - (harmonic n : ℂ)) / 2 + +theorem archimedeanAtTwoStage_eq (n : ℕ) : + archimedeanAtTwoStage n = archimedeanLogDeriv 2 := by + rw [archimedeanLogDeriv_eq_digamma (s := 2) (by norm_num), + archimedeanAtTwoStage, digamma_nat_add_one] + norm_num + exact Complex.digamma_one.symm + +/-- A genuine finite restricted completed-log-derivative identity at `s = 2`. +It combines the actual finite von Mangoldt sum, its convergent tail, and the +actual finite harmonic/Gamma stage. It is not a zero-sum explicit formula. -/ +theorem finiteCompletedLogDerivAtTwo (N : ℕ) : + vonMangoldtPartialSum 2 N + vonMangoldtTail 2 N + + archimedeanAtTwoStage N = + (-deriv riemannZeta 2 / riemannZeta 2) + + archimedeanLogDeriv 2 := by + rw [vonMangoldtPartialSum_add_tail (s := 2) (by norm_num), + archimedeanAtTwoStage_eq] + +/-- A quantitative approximation package for the actual Gamma-factor +logarithmic derivative. Constructing such a package from a truncated +digamma integral/series is the remaining analytic task. -/ +structure ArchimedeanGammaApproximation (s : ℂ) where + stage : ℕ → ℂ + error : ℕ → ℝ + error_tendsto : Tendsto error atTop (𝓝 0) + norm_sub_le : ∀ n, ‖stage n - archimedeanLogDeriv s‖ ≤ error n + +theorem ArchimedeanGammaApproximation.tendsto + {s : ℂ} (A : ArchimedeanGammaApproximation s) : + Tendsto A.stage atTop (𝓝 (archimedeanLogDeriv s)) := by + rw [tendsto_iff_norm_sub_tendsto_zero] + exact squeeze_zero (fun n ↦ norm_nonneg (A.stage n - archimedeanLogDeriv s)) + A.norm_sub_le A.error_tendsto + +/-- The positive-integer Gamma recurrence gives an exact finite +archimedean approximation at `s = 2`. -/ +def archimedeanGammaApproximationAtTwo : ArchimedeanGammaApproximation 2 where + stage := archimedeanAtTwoStage + error := 0 + error_tendsto := tendsto_const_nhds + norm_sub_le n := by simp [archimedeanAtTwoStage_eq n] + +/-- The critical-line-centred Mellin transform in logarithmic coordinates. -/ +def transform (f : Test) (z : ℂ) : ℂ := + ∫ t : ℝ, f t * exp (z * t) + +/-- Transform evaluation as a continuous complex-linear functional on the LF +test space. -/ +noncomputable def transformCLM (z : ℂ) : Test →L[ℂ] ℂ := + TestFunction.integralAgainstBilinCLM + (ContinuousLinearMap.mul ℂ ℂ) volume (fun t : ℝ ↦ exp (z * t)) + +@[simp] +theorem transformCLM_apply (z : ℂ) (f : Test) : + transformCLM z f = transform f z := by + rw [transformCLM, + TestFunction.integralAgainstBilinCLM_eq_integral] + · rfl + · have hc : Continuous (fun t : ℝ ↦ exp (z * t)) := + Complex.continuous_exp.comp + (continuous_const.mul (Complex.continuous_ofReal.comp continuous_id)) + exact (hc.locallyIntegrable (μ := (volume : Measure ℝ))).locallyIntegrableOn univ + +/-- Complex exponential modulation preserves compact support and shifts the +spectral transform. -/ +def spectralShiftTest (f : Test) (z : ℂ) : Test where + toFun t := f t * exp (-z * t) + contDiff' := f.contDiff.mul <| Complex.contDiff_exp.comp <| + contDiff_const.mul (Complex.ofRealCLM.contDiff.comp contDiff_id) + hasCompactSupport' := f.hasCompactSupport.mul_right + tsupport_subset' := tsupport_mul_subset_left.trans f.tsupport_subset + +@[simp] +theorem spectralShiftTest_apply (f : Test) (z : ℂ) (t : ℝ) : + spectralShiftTest f z t = f t * exp (-z * t) := + rfl + +/-- Exact transform translation under complex exponential modulation. -/ +theorem transform_spectralShiftTest (f : Test) (z w : ℂ) : + transform (spectralShiftTest f z) w = transform f (w - z) := by + rw [transform, transform] + apply integral_congr_ae + filter_upwards with t + simp only [spectralShiftTest_apply] + calc + f t * exp (-z * t) * exp (w * t) = + f t * (exp (-z * t) * exp (w * t)) := by ring + _ = f t * exp ((-z * t) + (w * t)) := by rw [exp_add] + _ = f t * exp ((w - z) * t) := by + congr 2 + ring + +theorem transform_spectralShiftTest_self (f : Test) (z : ℂ) : + transform (spectralShiftTest f z) z = transform f 0 := by + simpa using transform_spectralShiftTest f z z + +/-- A fixed source-backed real smooth compactly supported test of integral +one. -/ +def normalizedRealBumpTest : 𝓓((⊤ : Opens ℝ), ℝ) := + let b : ContDiffBump (0 : ℝ) := default + { toFun := b.normed volume + contDiff' := b.contDiff_normed + hasCompactSupport' := b.hasCompactSupport_normed + tsupport_subset' := Set.subset_univ _ } + +/-- The corresponding complex test, obtained through Mathlib's continuous +postcomposition map. -/ +def normalizedBumpTest : Test := + TestFunction.postcompCLM Complex.ofRealCLM normalizedRealBumpTest + +theorem transform_normalizedBumpTest_zero : + transform normalizedBumpTest 0 = 1 := by + let b : ContDiffBump (0 : ℝ) := default + rw [transform] + simp only [zero_mul, exp_zero, mul_one, normalizedBumpTest, + TestFunction.postcompCLM_apply, Function.comp_apply, normalizedRealBumpTest] + change (∫ t : ℝ, (b.normed volume t : ℂ)) = 1 + rw [integral_complex_ofReal, b.integral_normed] + norm_num + +/-- Every complex spectral point admits an explicit compactly supported smooth +test whose transform is exactly one there. -/ +def pointNormalizedTest (z : ℂ) : Test := + spectralShiftTest normalizedBumpTest z + +theorem transform_pointNormalizedTest_self (z : ℂ) : + transform (pointNormalizedTest z) z = 1 := by + rw [pointNormalizedTest, transform_spectralShiftTest_self, + transform_normalizedBumpTest_zero] + +/-- Translation on the logarithmic line preserves the test class. -/ +def translateTest (f : Test) (a : ℝ) : Test where + toFun t := f (t - a) + contDiff' := f.contDiff.comp (contDiff_id.sub contDiff_const) + hasCompactSupport' := + f.hasCompactSupport.comp_homeomorph (Homeomorph.addRight (-a)) + tsupport_subset' := Set.subset_univ _ + +@[simp] +theorem translateTest_apply (f : Test) (a t : ℝ) : + translateTest f a t = f (t - a) := + rfl + +/-- Translation becomes multiplication by an exponential under the centered +transform. -/ +theorem transform_translateTest (f : Test) (a : ℝ) (z : ℂ) : + transform (translateTest f a) z = exp (z * a) * transform f z := by + rw [transform, transform] + simp only [translateTest_apply] + rw [← integral_add_right_eq_self + (fun t : ℝ ↦ f (t - a) * exp (z * t)) a] + have hf : Integrable fun t : ℝ ↦ f t * exp (z * t) := by + apply Continuous.integrable_of_hasCompactSupport + · exact f.continuous.mul <| Complex.continuous_exp.comp + (continuous_const.mul (Complex.continuous_ofReal.comp continuous_id)) + · exact f.hasCompactSupport.mul_right + rw [← integral_const_mul] + apply integral_congr_ae + filter_upwards with t + rw [show t + a - a = t by ring] + rw [show (z * (↑(t + a) : ℂ)) = z * t + z * a by push_cast; ring, exp_add] + ring + +/-- A finite-difference test whose transform has a prescribed zero. This is +the elementary compact-support Paley--Wiener separator factor +`1 - exp (a (z-q))`; it uses no interpolation matrix. -/ +def spectralZeroFactor (f : Test) (a : ℝ) (q : ℂ) : Test := + f - exp (-q * a) • translateTest f a + +theorem transform_spectralZeroFactor + (f : Test) (a : ℝ) (q z : ℂ) : + transform (spectralZeroFactor f a q) z = + (1 - exp ((z - q) * a)) * transform f z := by + rw [← transformCLM_apply] + simp only [spectralZeroFactor, map_sub, map_smul, transformCLM_apply, + transform_translateTest] + change transform f z - exp (-q * a) * + (exp (z * a) * transform f z) = + (1 - exp ((z - q) * a)) * transform f z + have hexp : + exp (-q * a) * exp (z * a) = exp ((z - q) * a) := by + rw [← exp_add] + congr 1 + ring + rw [← mul_assoc, hexp] + ring + +/-- Iterating finite differences inserts any finite list of exact spectral +zeros while preserving compact support and smoothness. -/ +def spectralZeroProduct (f : Test) (a : ℝ) : List ℂ → Test + | [] => f + | q :: roots => spectralZeroProduct (spectralZeroFactor f a q) a roots + +theorem transform_spectralZeroProduct + (f : Test) (a : ℝ) (roots : List ℂ) (z : ℂ) : + transform (spectralZeroProduct f a roots) z = + (roots.map fun q ↦ (1 - exp ((z - q) * a))).prod * transform f z := by + induction roots generalizing f with + | nil => simp [spectralZeroProduct] + | cons q roots ih => + rw [spectralZeroProduct, ih, transform_spectralZeroFactor] + simp only [List.map_cons, List.prod_cons] + ring + +/-- A local separator normalized to one at `target` and forced to vanish on +the finite list `roots`. Its only denominator is the product of local gap +factors, making near-collision dependence explicit. -/ +noncomputable def localSpectralSeparator + (a : ℝ) (target : ℂ) (roots : List ℂ) : Test := + ((roots.map fun q ↦ (1 - exp ((target - q) * a))).prod)⁻¹ • + spectralZeroProduct (pointNormalizedTest target) a roots + +theorem transform_localSpectralSeparator + (a : ℝ) (target : ℂ) (roots : List ℂ) (z : ℂ) : + transform (localSpectralSeparator a target roots) z = + ((roots.map fun q ↦ (1 - exp ((target - q) * a))).prod)⁻¹ * + ((roots.map fun q ↦ (1 - exp ((z - q) * a))).prod * + transform (pointNormalizedTest target) z) := by + rw [← transformCLM_apply] + simp [localSpectralSeparator, transform_spectralZeroProduct] + +theorem transform_localSpectralSeparator_self + (a : ℝ) (target : ℂ) (roots : List ℂ) + (hgap : (roots.map fun q ↦ + (1 - exp ((target - q) * a))).prod ≠ 0) : + transform (localSpectralSeparator a target roots) target = 1 := by + rw [transform_localSpectralSeparator, + transform_pointNormalizedTest_self] + simpa using inv_mul_cancel₀ hgap + +theorem transform_localSpectralSeparator_eq_zero + (a : ℝ) (target : ℂ) (roots : List ℂ) {q : ℂ} (hq : q ∈ roots) : + transform (localSpectralSeparator a target roots) q = 0 := by + rw [transform_localSpectralSeparator] + have hprod : + (roots.map fun w ↦ (1 - exp ((q - w) * a))).prod = 0 := by + apply List.prod_eq_zero + exact List.mem_map.mpr ⟨q, hq, by simp⟩ + rw [hprod] + ring + +/-- Exact local noncollision condition. Unlike a global zero-spacing bound, +this concerns only one target and one finite neighboring list. -/ +def LocalSeparatorGap (a : ℝ) (target : ℂ) (roots : List ℂ) : Prop := + ∀ q ∈ roots, 1 - exp ((target - q) * a) ≠ 0 + +theorem LocalSeparatorGap.prod_ne_zero + {a : ℝ} {target : ℂ} {roots : List ℂ} + (h : LocalSeparatorGap a target roots) : + (roots.map fun q ↦ (1 - exp ((target - q) * a))).prod ≠ 0 := by + apply List.prod_ne_zero + intro hzero + rcases List.mem_map.mp hzero with ⟨q, hq, hqzero⟩ + exact h q hq hqzero + +/-- Two local finite-difference kernels, each annihilating the reflected +target and the prescribed nearby points. -/ +noncomputable def localPairSeparator + (a : ℝ) (z : ℂ) (nearby : List ℂ) : Test := + localSpectralSeparator a z (-star z :: nearby) - + localSpectralSeparator a (-star z) (z :: nearby) + +theorem transform_localPairSeparator_target + (a : ℝ) (z : ℂ) (nearby : List ℂ) + (hz : LocalSeparatorGap a z (-star z :: nearby)) : + transform (localPairSeparator a z nearby) z = 1 := by + rw [← transformCLM_apply] + simp only [localPairSeparator, map_sub, transformCLM_apply] + rw [transform_localSpectralSeparator_self _ _ _ hz.prod_ne_zero, + transform_localSpectralSeparator_eq_zero _ _ _ (by simp)] + ring + +theorem transform_localPairSeparator_partner + (a : ℝ) (z : ℂ) (nearby : List ℂ) + (hpartner : LocalSeparatorGap a (-star z) (z :: nearby)) : + transform (localPairSeparator a z nearby) (-star z) = -1 := by + rw [← transformCLM_apply] + simp only [localPairSeparator, map_sub, transformCLM_apply] + rw [transform_localSpectralSeparator_eq_zero _ _ _ (by simp), + transform_localSpectralSeparator_self _ _ _ hpartner.prod_ne_zero] + ring + +theorem transform_localPairSeparator_nearby_eq_zero + (a : ℝ) (z : ℂ) (nearby : List ℂ) {q : ℂ} (hq : q ∈ nearby) : + transform (localPairSeparator a z nearby) q = 0 := by + rw [← transformCLM_apply] + simp only [localPairSeparator, map_sub, transformCLM_apply] + rw [transform_localSpectralSeparator_eq_zero _ _ _ + (List.mem_cons_of_mem _ hq), + transform_localSpectralSeparator_eq_zero _ _ _ + (List.mem_cons_of_mem _ hq)] + ring + +/-- A finite family of transform evaluations has one common test at which +none of them vanish. The proof avoids a finite set of bad coefficients at +each induction step; no determinant or analytic zero-set theorem is needed. -/ +theorem exists_test_transform_ne_zero_on_finset (points : Finset ℂ) : + ∃ base : Test, ∀ z ∈ points, transform base z ≠ 0 := by + classical + induction points using Finset.induction_on with + | empty => + exact ⟨0, by simp⟩ + | @insert z s hz ih => + rcases ih with ⟨f, hf⟩ + let g : Test := pointNormalizedTest z + let bad : Finset ℂ := + insert (-transform f z) + (s.image fun w ↦ -transform f w / transform g w) + obtain ⟨c, hc⟩ := bad.finite_toSet.exists_notMem + refine ⟨f + c • g, ?_⟩ + intro w hw + have heval : + transform (f + c • g) w = + transform f w + c * transform g w := by + rw [← transformCLM_apply w (f + c • g), + ← transformCLM_apply w f, ← transformCLM_apply w g] + rw [map_add, map_smul] + rfl + rw [heval] + rw [Finset.mem_insert] at hw + rcases hw with rfl | hw + · have hg : transform g w = 1 := by + exact transform_pointNormalizedTest_self w + rw [hg, mul_one] + have hc0 : c ≠ -transform f w := by + intro h + apply hc + change c ∈ bad + exact Finset.mem_insert.mpr (Or.inl h) + intro h + apply hc0 + linear_combination h + · have hfw : transform f w ≠ 0 := hf w hw + by_cases hgw : transform g w = 0 + · simpa [hgw] using hfw + · have hcbad : + c ≠ -transform f w / transform g w := by + intro h + apply hc + change c ∈ bad + exact Finset.mem_insert.mpr <| Or.inr <| + Finset.mem_image.mpr ⟨w, hw, h.symm⟩ + intro hsum + apply hcbad + apply (eq_div_iff hgw).2 + linear_combination hsum + +/-- Complex exponential is injective between two points whose imaginary +coordinates differ by less than one full period. -/ +theorem exp_eq_exp_of_abs_im_sub_lt_two_pi + {x y : ℂ} (hxy : |x.im - y.im| < 2 * Real.pi) + (hexp : exp x = exp y) : x = y := by + rcases Complex.exp_eq_exp_iff_exists_int.mp hexp with ⟨m, hm⟩ + have him := congrArg Complex.im hm + have him' : x.im - y.im = (m : ℝ) * (2 * Real.pi) := by + norm_num [mul_re, mul_im] at him + linarith + have hm0 : m = 0 := by + by_contra hm0 + have habsm : (1 : ℝ) ≤ |(m : ℝ)| := by + exact_mod_cast Int.one_le_abs hm0 + have hperiod : 2 * Real.pi ≤ |(m : ℝ) * (2 * Real.pi)| := by + rw [abs_mul, abs_of_pos Real.two_pi_pos] + nlinarith [Real.two_pi_pos] + rw [him'] at hxy + linarith + subst m + simpa using hm + +/-- A concrete positive translation step whose exponential nodes are +collision-free for every injective finite complex point family. -/ +def collisionFreeTranslationStep {n : ℕ} (points : Fin n → ℂ) : ℝ := + 1 / (2 * (∑ i, |(points i).im|) + 1) + +theorem collisionFreeTranslationStep_pos + {n : ℕ} (points : Fin n → ℂ) : + 0 < collisionFreeTranslationStep points := by + apply one_div_pos.mpr + have hsum : 0 ≤ ∑ i, |(points i).im| := + Finset.sum_nonneg fun _ _ ↦ abs_nonneg _ + linarith + +theorem collisionFreeTranslationStep_nodes_injective + {n : ℕ} (points : Fin n → ℂ) (hpoints : Function.Injective points) : + Function.Injective + (fun i ↦ exp (points i * collisionFreeTranslationStep points)) := by + intro i j hij + let R : ℝ := ∑ k, |(points k).im| + let a : ℝ := collisionFreeTranslationStep points + have hR : 0 ≤ R := Finset.sum_nonneg fun _ _ ↦ abs_nonneg _ + have hiR : |(points i).im| ≤ R := by + exact Finset.single_le_sum (s := Finset.univ) + (f := fun k ↦ |(points k).im|) + (fun _ _ ↦ abs_nonneg _) (Finset.mem_univ i) + have hjR : |(points j).im| ≤ R := by + exact Finset.single_le_sum (s := Finset.univ) + (f := fun k ↦ |(points k).im|) + (fun _ _ ↦ abs_nonneg _) (Finset.mem_univ j) + have ha : 0 < a := collisionFreeTranslationStep_pos points + have haR : a * (2 * R + 1) = 1 := by + dsimp [a, collisionFreeTranslationStep, R] + field_simp + have him : + |(points i * a).im - (points j * a).im| < 2 * Real.pi := by + have hdiff : + |(points i).im - (points j).im| ≤ 2 * R := by + calc + |(points i).im - (points j).im| ≤ + |(points i).im| + |(points j).im| := abs_sub _ _ + _ ≤ 2 * R := by linarith + have hone : a * (2 * R) < 1 := by nlinarith + have hpi : (1 : ℝ) < 2 * Real.pi := by + nlinarith [Real.pi_gt_three] + simp only [mul_im, ofReal_re, ofReal_im, mul_zero, zero_add] + rw [← sub_mul, abs_mul, abs_of_pos ha] + calc + |(points i).im - (points j).im| * a ≤ (2 * R) * a := + mul_le_mul_of_nonneg_right hdiff ha.le + _ < 1 := by nlinarith + _ < 2 * Real.pi := hpi + apply hpoints + have hscaled := exp_eq_exp_of_abs_im_sub_lt_two_pi + (x := points i * (a : ℂ)) (y := points j * (a : ℂ)) him hij + exact mul_right_cancel₀ (Complex.ofReal_ne_zero.mpr ha.ne') hscaled + +/-- A finite locally discrete target, partner, and neighbor family admits one +common positive translation scale satisfying both local gap conditions. -/ +theorem exists_pairLocalSeparatorGap + (z : ℂ) (nearby : List ℂ) + (hnodup : (z :: -star z :: nearby).Nodup) : + ∃ a > 0, + LocalSeparatorGap a z (-star z :: nearby) ∧ + LocalSeparatorGap a (-star z) (z :: nearby) := by + let all := z :: -star z :: nearby + let points : Fin all.length → ℂ := all.get + let a := collisionFreeTranslationStep points + have hpoints : Function.Injective points := by + exact hnodup.injective_get + have hnodes : Function.Injective fun i ↦ exp (points i * a) := + collisionFreeTranslationStep_nodes_injective points hpoints + have hnode_ne {x y : ℂ} (hx : x ∈ all) (hy : y ∈ all) (hxy : x ≠ y) : + exp (x * a) ≠ exp (y * a) := by + obtain ⟨ix, hix⟩ := List.get_of_mem hx + obtain ⟨iy, hiy⟩ := List.get_of_mem hy + intro heq + apply hxy + have hnodeIndices : + exp (points ix * a) = exp (points iy * a) := by + change exp (all.get ix * a) = exp (all.get iy * a) + rw [hix, hiy] + exact heq + have hindices : ix = iy := hnodes hnodeIndices + rw [← hix, ← hiy, hindices] + have hgap {target q : ℂ} (htarget : target ∈ all) + (hq : q ∈ all) (hne : target ≠ q) : + 1 - exp ((target - q) * a) ≠ 0 := by + intro hzero + have hexp : exp ((target - q) * a) = 1 := by + exact (sub_eq_zero.mp hzero).symm + apply hnode_ne htarget hq hne + calc + exp (target * a) = + exp (((target - q) * a) + q * a) := by + congr 1 + ring + _ = exp ((target - q) * a) * exp (q * a) := exp_add _ _ + _ = exp (q * a) := by rw [hexp, one_mul] + have hzall : z ∈ all := by simp [all] + have hpall : -star z ∈ all := by simp [all] + have hznot : z ∉ -star z :: nearby := (List.nodup_cons.mp hnodup).1 + have hpnotnear : -star z ∉ nearby := + (List.nodup_cons.mp (List.nodup_cons.mp hnodup).2).1 + have hpnez : -star z ≠ z := by + intro h + apply hznot + exact List.mem_cons.mpr (Or.inl h.symm) + have hpnot : -star z ∉ z :: nearby := by + simpa only [List.mem_cons, not_or] using And.intro hpnez hpnotnear + refine ⟨a, collisionFreeTranslationStep_pos points, ?_, ?_⟩ + · intro q hq + exact hgap hzall (by + dsimp [all] + exact List.mem_cons.mpr (Or.inr hq)) + (fun h ↦ hznot (by simpa [h] using hq)) + · intro q hq + have hne : -star z ≠ q := by + intro h + apply hpnot + rw [h] + exact hq + have hqall : q ∈ all := by + rcases List.mem_cons.mp hq with rfl | hq + · exact hzall + · dsimp [all] + exact List.mem_cons.mpr <| Or.inr <| + List.mem_cons.mpr <| Or.inr hq + exact hgap hpall hqall hne + +/-- Evaluation matrix of translates of one base test. This basis exposes the +only two finite interpolation degeneracies: a zero base transform, or +colliding exponential nodes. -/ +def translatedBasisMatrix (n : ℕ) (base : Test) (a : ℝ) + (points : Fin n → ℂ) : Matrix (Fin n) (Fin n) ℂ := + fun i j ↦ transform (translateTest base (a * (j : ℝ))) (points i) + +theorem translatedBasisMatrix_eq_diagonal_mul_vandermonde + (n : ℕ) (base : Test) (a : ℝ) (points : Fin n → ℂ) : + translatedBasisMatrix n base a points = + Matrix.diagonal (fun i ↦ transform base (points i)) * + Matrix.vandermonde (fun i ↦ exp (points i * a)) := by + ext i j + rw [translatedBasisMatrix, transform_translateTest, + Matrix.diagonal_mul, Matrix.vandermonde_apply] + have hexp : + exp (points i * ((a * (j : ℝ) : ℝ) : ℂ)) = + exp (points i * a) ^ (j : ℕ) := by + rw [← Complex.exp_nat_mul] + congr 1 + push_cast + ring + rw [hexp] + ring + +theorem translatedBasisMatrix_det_ne_zero + (n : ℕ) (base : Test) (a : ℝ) (points : Fin n → ℂ) + (hbase : ∀ i, transform base (points i) ≠ 0) + (hnodes : Function.Injective fun i ↦ exp (points i * a)) : + (translatedBasisMatrix n base a points).det ≠ 0 := by + rw [translatedBasisMatrix_eq_diagonal_mul_vandermonde, + Matrix.det_mul, Matrix.det_diagonal] + exact mul_ne_zero (Finset.prod_ne_zero_iff.mpr fun i _ ↦ hbase i) + (Matrix.det_vandermonde_ne_zero_iff.mpr hnodes) + +theorem translatedBasisMatrix_det_ne_zero_iff + (n : ℕ) (base : Test) (a : ℝ) (points : Fin n → ℂ) : + (translatedBasisMatrix n base a points).det ≠ 0 ↔ + (∀ i, transform base (points i) ≠ 0) ∧ + Function.Injective (fun i ↦ exp (points i * a)) := by + rw [translatedBasisMatrix_eq_diagonal_mul_vandermonde, + Matrix.det_mul, Matrix.det_diagonal, mul_ne_zero_iff, + Finset.prod_ne_zero_iff, Matrix.det_vandermonde_ne_zero_iff] + simp + +/-- Exact two-point determinant, exposing the node-separation factor. -/ +theorem translatedBasisMatrix_finTwo_det + (base : Test) (a : ℝ) (z₀ z₁ : ℂ) : + (translatedBasisMatrix 2 base a ![z₀, z₁]).det = + transform base z₀ * transform base z₁ * + (exp (z₁ * a) - exp (z₀ * a)) := by + rw [Matrix.det_fin_two] + simp [translatedBasisMatrix, transform_translateTest] + ring + +theorem translatedBasisMatrix_det_isUnit + (n : ℕ) (base : Test) (a : ℝ) (points : Fin n → ℂ) + (hbase : ∀ i, transform base (points i) ≠ 0) + (hnodes : Function.Injective fun i ↦ exp (points i * a)) : + IsUnit (translatedBasisMatrix n base a points).det := + (isUnit_iff_ne_zero.mpr + (translatedBasisMatrix_det_ne_zero n base a points hbase hnodes)) + +/-- Arbitrary finite transform data, interpolated by translates of one test. +The explicit hypotheses are exactly the degeneracies in the determinant +factorization above. -/ +def translatedInterpolatingTest (n : ℕ) (base : Test) (a : ℝ) + (points values : Fin n → ℂ) : Test := + ∑ j, ((translatedBasisMatrix n base a points)⁻¹).mulVec values j • + translateTest base (a * (j : ℝ)) + +/-- Coefficients of the translated Vandermonde interpolator. -/ +def translatedInterpolationCoefficients (n : ℕ) (base : Test) (a : ℝ) + (points values : Fin n → ℂ) : Fin n → ℂ := + ((translatedBasisMatrix n base a points)⁻¹).mulVec values + +/-- Explicit coefficient/translation amplification on the centered strip. -/ +def translatedInterpolationWeight (n : ℕ) (base : Test) (a : ℝ) + (points values : Fin n → ℂ) : ℝ := + ∑ j, ‖translatedInterpolationCoefficients n base a points values j‖ * + Real.exp (|a * (j : ℝ)| / 2) + +/-- Exact transform expansion of the translated interpolator at every +complex point. -/ +theorem transform_translatedInterpolatingTest_eq_sum + (n : ℕ) (base : Test) (a : ℝ) (points values : Fin n → ℂ) (z : ℂ) : + transform (translatedInterpolatingTest n base a points values) z = + ∑ j, translatedInterpolationCoefficients n base a points values j * + (exp (z * (a * (j : ℝ))) * transform base z) := by + rw [← transformCLM_apply] + simp [translatedInterpolatingTest, translatedInterpolationCoefficients, + transformCLM_apply, transform_translateTest] + +theorem transform_translatedInterpolatingTest + (n : ℕ) (base : Test) (a : ℝ) (points values : Fin n → ℂ) + (hbase : ∀ i, transform base (points i) ≠ 0) + (hnodes : Function.Injective fun i ↦ exp (points i * a)) + (i : Fin n) : + transform (translatedInterpolatingTest n base a points values) (points i) = + values i := by + let A : Matrix (Fin n) (Fin n) ℂ := translatedBasisMatrix n base a points + let c : Fin n → ℂ := (A⁻¹).mulVec values + have hA : IsUnit A.det := + translatedBasisMatrix_det_isUnit n base a points hbase hnodes + calc + transform (translatedInterpolatingTest n base a points values) (points i) = + ∑ j, c j * A i j := by + rw [← transformCLM_apply] + simp [translatedInterpolatingTest, c, A, translatedBasisMatrix] + _ = A.mulVec c i := by + rw [Matrix.mulVec, dotProduct] + apply Finset.sum_congr rfl + intro j hj + exact mul_comm _ _ + _ = values i := by + dsimp [c] + rw [Matrix.mulVec_mulVec, Matrix.mul_nonsing_inv A hA, + Matrix.one_mulVec] + +/-- Distinct finite spectral points always have a common nonvanishing base, +a collision-free translated Vandermonde basis, and arbitrary interpolation. -/ +theorem exists_translatedInterpolatingTest + (n : ℕ) (points values : Fin n → ℂ) + (hpoints : Function.Injective points) : + ∃ base : Test, + ∀ i : Fin n, + transform + (translatedInterpolatingTest n base + (collisionFreeTranslationStep points) points values) + (points i) = values i := by + classical + let spectralSet : Finset ℂ := Finset.univ.image points + rcases exists_test_transform_ne_zero_on_finset spectralSet with + ⟨base, hbaseSet⟩ + have hbase : ∀ i, transform base (points i) ≠ 0 := by + intro i + apply hbaseSet (points i) + exact Finset.mem_image.mpr ⟨i, Finset.mem_univ i, rfl⟩ + refine ⟨base, fun i ↦ ?_⟩ + exact transform_translatedInterpolatingTest n base + (collisionFreeTranslationStep points) points values hbase + (collisionFreeTranslationStep_nodes_injective points hpoints) i + +/-- Finite closure under the functional-equation reflection +`z ↦ -conj z`. -/ +def spectralSymmetryClosure (points : Finset ℂ) : Finset ℂ := + points ∪ points.image (fun z ↦ -star z) + +theorem mem_spectralSymmetryClosure (points : Finset ℂ) {z : ℂ} + (hz : z ∈ points) : + z ∈ spectralSymmetryClosure points ∧ + -star z ∈ spectralSymmetryClosure points := by + constructor + · exact Finset.mem_union_left _ hz + · exact Finset.mem_union_right _ <| + Finset.mem_image.mpr ⟨z, hz, rfl⟩ + +theorem exists_test_transform_ne_zero_on_symmetryClosure + (points : Finset ℂ) : + ∃ base : Test, ∀ z ∈ spectralSymmetryClosure points, + transform base z ≠ 0 := + exists_test_transform_ne_zero_on_finset (spectralSymmetryClosure points) + +/-- Evaluation matrix of the explicit point-normalized tests at a finite +family of spectral points. -/ +def pointInterpolationMatrix + {ι : Type*} [Fintype ι] (points : ι → ℂ) : Matrix ι ι ℂ := + fun i j ↦ transform (pointNormalizedTest (points j)) (points i) + +/-- Explicit finite simultaneous interpolant obtained by inverting the +point-normalized evaluation matrix. -/ +def simultaneousInterpolatingTest + {ι : Type*} [Fintype ι] [DecidableEq ι] + (points values : ι → ℂ) : Test := + ∑ j, ((pointInterpolationMatrix points)⁻¹).mulVec values j • + pointNormalizedTest (points j) + +/-- Whenever the explicit evaluation matrix is nonsingular, the constructed +compactly supported smooth test takes all prescribed transform values +simultaneously. -/ +theorem transform_simultaneousInterpolatingTest + {ι : Type*} [Fintype ι] [DecidableEq ι] + (points values : ι → ℂ) + (hA : IsUnit (pointInterpolationMatrix points).det) (i : ι) : + transform (simultaneousInterpolatingTest points values) (points i) = + values i := by + let A : Matrix ι ι ℂ := pointInterpolationMatrix points + let c : ι → ℂ := (A⁻¹).mulVec values + calc + transform (simultaneousInterpolatingTest points values) (points i) = + ∑ j, c j * transform (pointNormalizedTest (points j)) (points i) := by + rw [← transformCLM_apply] + simp [simultaneousInterpolatingTest, c, A] + _ = A.mulVec c i := by + rw [Matrix.mulVec, dotProduct] + change ∑ j, c j * A i j = ∑ j, A i j * c j + apply Finset.sum_congr rfl + intro j hj + exact mul_comm _ _ + _ = values i := by + dsimp [c] + rw [Matrix.mulVec_mulVec, Matrix.mul_nonsing_inv A hA, + Matrix.one_mulVec] + +theorem pointInterpolationMatrix_finOne_isUnit (z : ℂ) : + IsUnit (pointInterpolationMatrix (fun _ : Fin 1 ↦ z)).det := by + have hmatrix : + pointInterpolationMatrix (fun _ : Fin 1 ↦ z) = 1 := by + ext i j + have hi : i = 0 := Fin.eq_zero i + have hj : j = 0 := Fin.eq_zero j + subst i + subst j + simp [pointInterpolationMatrix, transform_pointNormalizedTest_self] + rw [hmatrix] + simp + +/-- On the critical line the centred transform is exactly Mathlib's Fourier +transform, after accounting for Mathlib's `2π` convention. -/ +theorem transform_imaginary_eq_fourier (f : Test) (ξ : ℝ) : + transform f (-2 * Real.pi * ξ * I) = 𝓕 (toSchwartz f) ξ := by + rw [transform, SchwartzMap.fourier_coe, Real.fourier_eq'] + apply integral_congr_ae + filter_upwards with t + simp only [toSchwartz_apply, smul_eq_mul] + rw [mul_comm] + congr 1 + congr 1 + push_cast + simp + ring + +/-- Exponentially weight a compactly supported smooth logarithmic test. +This remains a test function with the same support bound. -/ +def exponentiallyWeightedTest (f : Test) (a : ℝ) : Test where + toFun t := f t * (Real.exp (a * t) : ℂ) + contDiff' := f.contDiff.mul <| + Complex.ofRealCLM.contDiff.comp <| + Real.contDiff_exp.comp (contDiff_const.mul contDiff_id) + hasCompactSupport' := f.hasCompactSupport.mul_right + tsupport_subset' := tsupport_mul_subset_left.trans f.tsupport_subset + +/-- Explicit pointwise majorant for derivatives of `e^{a x} f(x)`, uniform +for `|a| ≤ 1/2`. -/ +def stripDerivativeMajorant (f : Test) (n : ℕ) (x : ℝ) : ℝ := + ∑ i ∈ Finset.range (n + 1), + n.choose i * (1 / 2 : ℝ) ^ i * Real.exp (|x| / 2) * + ‖iteratedDeriv (n - i) f x‖ + +theorem hasCompactSupport_iteratedDeriv (f : Test) (n : ℕ) : + HasCompactSupport (iteratedDeriv n f) := by + induction n with + | zero => simpa [iteratedDeriv_zero] using f.hasCompactSupport + | succ n ih => + rw [iteratedDeriv_succ] + exact ih.deriv + +theorem integrable_stripDerivativeMajorant (f : Test) (n : ℕ) : + Integrable (stripDerivativeMajorant f n) := by + change Integrable fun x ↦ ∑ i ∈ Finset.range (n + 1), + n.choose i * (1 / 2 : ℝ) ^ i * Real.exp (|x| / 2) * + ‖iteratedDeriv (n - i) f x‖ + apply integrable_finsetSum + intro i hi + apply Continuous.integrable_of_hasCompactSupport + · have hle : ((n - i : ℕ) : ℕ∞ω) ≤ (∞ : ℕ∞ω) := + WithTop.coe_le_coe.mpr (ENat.coe_lt_top (n - i)).le + have hd : Continuous (iteratedDeriv (n - i) (f : ℝ → ℂ)) := + (f.contDiff.of_le hle).continuous_iteratedDeriv' _ + fun_prop + · exact (hasCompactSupport_iteratedDeriv f (n - i)).norm.mul_left + +theorem norm_iteratedDeriv_exponentiallyWeightedTest_le + (f : Test) (n : ℕ) {a : ℝ} + (ha : a ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) (x : ℝ) : + ‖iteratedDeriv n (exponentiallyWeightedTest f a) x‖ ≤ + stripDerivativeMajorant f n x := by + have hfun : + (exponentiallyWeightedTest f a : ℝ → ℂ) = + (Real.exp ∘ fun y ↦ a * id y) • (f : ℝ → ℂ) := by + ext y + simp [exponentiallyWeightedTest, Algebra.smul_def, mul_comm] + rw [hfun] + rw [show iteratedDeriv n + ((Real.exp ∘ fun y ↦ a * id y) • (f : ℝ → ℂ)) x = + ∑ i ∈ Finset.range (n + 1), + n.choose i • iteratedDeriv i (Real.exp ∘ fun y ↦ a * id y) x • + iteratedDeriv (n - i) f x by + simpa only [iteratedDerivWithin_univ] using + (iteratedDerivWithin_smul (x := x) (s := Set.univ) (n := n) + (Set.mem_univ x) uniqueDiffOn_univ + ((Real.contDiff_exp.comp + (contDiff_const.mul contDiff_id)).contDiffAt.of_le + (mod_cast le_top)).contDiffWithinAt + (f.contDiff.contDiffAt.of_le (mod_cast le_top)).contDiffWithinAt)] + have hderiv (i : ℕ) : + iteratedDeriv i (Real.exp ∘ fun y ↦ a * id y) x = + a ^ i * Real.exp (a * x) := by + simpa [Function.comp_def] using + congrFun (iteratedDeriv_exp_const_mul i a) x + simp_rw [hderiv] + apply (norm_sum_le _ _).trans + rw [stripDerivativeMajorant] + apply Finset.sum_le_sum + intro i hi + simp [Real.norm_eq_abs, Complex.norm_exp] + have haabs : |a| ≤ 1 / 2 := by + rw [abs_le] + constructor <;> linarith [ha.1, ha.2] + have haexp : Real.exp (a * x) ≤ Real.exp (|x| / 2) := by + apply Real.exp_le_exp.mpr + calc + a * x ≤ |a * x| := le_abs_self _ + _ = |a| * |x| := abs_mul a x + _ ≤ (1 / 2) * |x| := mul_le_mul_of_nonneg_right haabs (abs_nonneg x) + _ = |x| / 2 := by ring + have hpow : |a| ^ i ≤ (1 / 2 : ℝ) ^ i := + pow_le_pow_left₀ (abs_nonneg a) haabs i + have hprod : + |a| ^ i * Real.exp (a * x) ≤ + (1 / 2 : ℝ) ^ i * Real.exp (|x| / 2) := + mul_le_mul hpow haexp (Real.exp_nonneg _) (pow_nonneg (by norm_num) _) + have hchoose := mul_le_mul_of_nonneg_left hprod + (show 0 ≤ (n.choose i : ℝ) from Nat.cast_nonneg _) + have hnorm := mul_le_mul_of_nonneg_right hchoose + (norm_nonneg (iteratedDeriv (n - i) f x)) + simpa [mul_assoc] using hnorm + +theorem integral_norm_iteratedDeriv_exponentiallyWeightedTest_le + (f : Test) (n : ℕ) {a : ℝ} + (ha : a ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) : + (∫ x : ℝ, ‖iteratedDeriv n (exponentiallyWeightedTest f a) x‖) ≤ + ∫ x : ℝ, stripDerivativeMajorant f n x := by + apply integral_mono + · have hcont : Continuous + (iteratedDeriv n (exponentiallyWeightedTest f a : ℝ → ℂ)) := + (exponentiallyWeightedTest f a).contDiff.continuous_iteratedDeriv n + (WithTop.coe_le_coe.mpr (ENat.coe_lt_top n).le) + exact hcont.norm.integrable_of_hasCompactSupport + (hasCompactSupport_iteratedDeriv (exponentiallyWeightedTest f a) n).norm + · exact integrable_stripDerivativeMajorant f n + · exact norm_iteratedDeriv_exponentiallyWeightedTest_le f n ha + +@[simp] +theorem exponentiallyWeightedTest_apply (f : Test) (a t : ℝ) : + exponentiallyWeightedTest f a t = f t * (Real.exp (a * t) : ℂ) := + rfl + +/-- Every vertical line is a Fourier transform after exponential weighting. +This is the exact bridge from compactly supported tests to Mathlib's +Schwartz-space rapid decay API. -/ +theorem transform_vertical_eq_fourier (f : Test) (a ξ : ℝ) : + transform f ((a : ℂ) - 2 * Real.pi * ξ * I) = + 𝓕 (toSchwartz (exponentiallyWeightedTest f a)) ξ := by + rw [transform, SchwartzMap.fourier_coe, Real.fourier_eq'] + apply integral_congr_ae + filter_upwards with t + simp only [toSchwartz_apply, exponentiallyWeightedTest_apply, smul_eq_mul] + simp only [RCLike.inner_apply, conj_trivial] + rw [Complex.ofReal_exp] + push_cast + have himag : + exp ((-2 * Real.pi * ξ * I) * (t : ℂ)) = + exp ((-2 * Real.pi * (t * ξ) : ℝ) * I) := by + congr 1 + push_cast + ring_nf + have himag' : + exp ((-2 * Real.pi * (t * ξ) : ℝ) * I) = + exp (-2 * (Real.pi : ℂ) * (ξ : ℂ) * (t : ℂ) * I) := by + congr 1 + push_cast + ring_nf + have hsplit : + exp (((a : ℂ) - 2 * Real.pi * ξ * I) * t) = + exp ((a : ℂ) * t) * exp ((-2 * Real.pi * ξ * I) * t) := by + rw [← exp_add] + congr 2 + ring_nf + rw [hsplit, himag, himag'] + ring_nf + +/-- Quantitative rapid decay on every fixed vertical line, with the bound +given by an actual Schwartz seminorm of the Fourier transform. -/ +theorem norm_transform_vertical_pow_le (f : Test) (a ξ : ℝ) (k : ℕ) : + |ξ| ^ k * ‖transform f ((a : ℂ) - 2 * Real.pi * ξ * I)‖ ≤ + (SchwartzMap.seminorm ℂ k 0) + (𝓕 (toSchwartz (exponentiallyWeightedTest f a))) := by + rw [transform_vertical_eq_fourier] + simpa [Real.norm_eq_abs] using + SchwartzMap.norm_pow_mul_le_seminorm ℂ + (𝓕 (toSchwartz (exponentiallyWeightedTest f a))) k ξ + +/-- Explicit strip-decay constant obtained from the uniform derivative +majorant. -/ +def stripTransformDecayConstant (f : Test) (n : ℕ) : ℝ := + ∫ x : ℝ, stripDerivativeMajorant f n x + +/-- Non-vacuous strip-uniform rapid decay for every compactly supported smooth +test. The constant is an explicit integral of finitely many derivatives of +`f`; no parameter-to-Schwartz boundedness assumption is used. -/ +theorem norm_transform_strip_derivative_le + (f : Test) (n : ℕ) {a : ℝ} + (ha : a ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) (ξ : ℝ) : + (2 * Real.pi * |ξ|) ^ n * + ‖transform f ((a : ℂ) - 2 * Real.pi * ξ * I)‖ ≤ + stripTransformDecayConstant f n := by + let g := exponentiallyWeightedTest f a + have hdegree : ((n : ℕ) : ℕ∞ω) ≤ (∞ : ℕ∞ω) := + WithTop.coe_le_coe.mpr (ENat.coe_lt_top n).le + have hgcont : ContDiff ℝ (n : ℕ∞) (g : ℝ → ℂ) := + g.contDiff.of_le hdegree + have hgint : ∀ j : ℕ, j ≤ (n : ℕ∞) → + Integrable (iteratedDeriv j (g : ℝ → ℂ)) := by + intro j hj + have hjdegree : ((j : ℕ) : ℕ∞ω) ≤ (∞ : ℕ∞ω) := + WithTop.coe_le_coe.mpr (ENat.coe_lt_top j).le + exact (g.contDiff.continuous_iteratedDeriv j hjdegree).integrable_of_hasCompactSupport + (hasCompactSupport_iteratedDeriv g j) + have hfour := congrFun + (Real.fourier_iteratedDeriv hgcont hgint (show n ≤ (n : ℕ∞) by simp)) ξ + have hto : + (toSchwartz (exponentiallyWeightedTest f a) : ℝ → ℂ) = + (g : ℝ → ℂ) := by rfl + calc + (2 * Real.pi * |ξ|) ^ n * + ‖transform f ((a : ℂ) - 2 * Real.pi * ξ * I)‖ = + ‖𝓕 (iteratedDeriv n (g : ℝ → ℂ)) ξ‖ := by + rw [transform_vertical_eq_fourier, SchwartzMap.fourier_coe, hto, hfour] + simp only [norm_smul, norm_pow, Complex.norm_mul, + norm_real, Real.norm_eq_abs, abs_of_pos (Real.pi_pos), norm_I, mul_one, + norm_ofNat] + _ ≤ ∫ x : ℝ, ‖iteratedDeriv n (g : ℝ → ℂ) x‖ := + VectorFourier.norm_fourierIntegral_le_integral_norm + 𝐞 volume (innerₗ ℝ) _ ξ + _ ≤ stripTransformDecayConstant f n := by + exact integral_norm_iteratedDeriv_exponentiallyWeightedTest_le f n ha + +theorem norm_transform_strip_pow_le_explicit + (f : Test) (n : ℕ) {a : ℝ} + (ha : a ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) (ξ : ℝ) : + |ξ| ^ n * ‖transform f ((a : ℂ) - 2 * Real.pi * ξ * I)‖ ≤ + stripTransformDecayConstant f n := by + calc + |ξ| ^ n * ‖transform f ((a : ℂ) - 2 * Real.pi * ξ * I)‖ ≤ + (2 * Real.pi * |ξ|) ^ n * + ‖transform f ((a : ℂ) - 2 * Real.pi * ξ * I)‖ := by + gcongr + nlinarith [Real.pi_gt_three, abs_nonneg ξ] + _ ≤ stripTransformDecayConstant f n := + norm_transform_strip_derivative_le f n ha ξ + +theorem norm_transform_centered_strip_im_pow_le_explicit + (f : Test) (n : ℕ) {z : ℂ} + (hz : z.re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) : + |z.im| ^ n * ‖transform f z‖ ≤ stripTransformDecayConstant f n := by + let ξ : ℝ := -z.im / (2 * Real.pi) + have h := norm_transform_strip_derivative_le f n hz ξ + have hscale : + 2 * Real.pi * |ξ| = |z.im| := by + dsimp [ξ] + rw [abs_div, abs_neg, abs_of_pos (by positivity : 0 < 2 * Real.pi)] + field_simp [Real.pi_ne_zero] + have hξ : -(2 * Real.pi * ξ) = z.im := by + dsimp [ξ] + field_simp [Real.pi_ne_zero] + have harg : + (z.re : ℂ) - + 2 * Real.pi * (ξ : ℂ) * I = z := by + apply Complex.ext + · simp + · simpa using hξ + rwa [hscale, harg] at h + +/-- Explicit condition-number-sensitive strip decay for the translated +Vandermonde interpolator. All growth is isolated in +`translatedInterpolationWeight`. -/ +theorem norm_transform_translatedInterpolatingTest_strip_pow_le + (m n : ℕ) (base : Test) (a : ℝ) + (points values : Fin m → ℂ) {z : ℂ} + (hz : z.re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) : + |z.im| ^ n * + ‖transform (translatedInterpolatingTest m base a points values) z‖ ≤ + stripTransformDecayConstant base n * + translatedInterpolationWeight m base a points values := by + let c := translatedInterpolationCoefficients m base a points values + let W := translatedInterpolationWeight m base a points values + have hW : 0 ≤ W := by + dsimp [W, translatedInterpolationWeight] + exact Finset.sum_nonneg fun _ _ ↦ + mul_nonneg (norm_nonneg _) (Real.exp_pos _).le + have hterm (j : Fin m) : + ‖c j * (exp (z * (a * (j : ℝ))) * transform base z)‖ ≤ + (‖c j‖ * Real.exp (|a * (j : ℝ)| / 2)) * + ‖transform base z‖ := by + let b : ℝ := a * (j : ℝ) + have harg : + z * (a * (j : ℝ)) = z * (b : ℂ) := by + congr 1 + dsimp [b] + push_cast + rfl + rw [harg] + have hre : + (z * (b : ℂ)).re ≤ |a * (j : ℝ)| / 2 := by + rw [mul_re] + simp only [ofReal_re, ofReal_im, mul_zero, sub_zero] + dsimp [b] + calc + z.re * (a * (j : ℝ)) ≤ |z.re * (a * (j : ℝ))| := + le_abs_self _ + _ = |z.re| * |a * (j : ℝ)| := abs_mul _ _ + _ ≤ (1 / 2 : ℝ) * |a * (j : ℝ)| := by + gcongr + rw [abs_le] + constructor <;> linarith [hz.1, hz.2] + _ = |a * (j : ℝ)| / 2 := by ring + rw [norm_mul, norm_mul, Complex.norm_exp] + have hexp := Real.exp_le_exp.mpr hre + calc + ‖c j‖ * (Real.exp (z * (b : ℂ)).re * + ‖transform base z‖) ≤ + ‖c j‖ * (Real.exp (|a * (j : ℝ)| / 2) * + ‖transform base z‖) := by + gcongr + _ = (‖c j‖ * Real.exp (|a * (j : ℝ)| / 2)) * + ‖transform base z‖ := by ring + have hsum : + ‖transform (translatedInterpolatingTest m base a points values) z‖ ≤ + W * ‖transform base z‖ := by + rw [transform_translatedInterpolatingTest_eq_sum] + calc + ‖∑ j, c j * (exp (z * (a * (j : ℝ))) * transform base z)‖ ≤ + ∑ j, ‖c j * + (exp (z * (a * (j : ℝ))) * transform base z)‖ := + norm_sum_le _ _ + _ ≤ ∑ j, (‖c j‖ * Real.exp (|a * (j : ℝ)| / 2)) * + ‖transform base z‖ := + Finset.sum_le_sum fun j _ ↦ hterm j + _ = W * ‖transform base z‖ := by + rw [← Finset.sum_mul] + rfl + have hbase := + norm_transform_centered_strip_im_pow_le_explicit base n hz + calc + |z.im| ^ n * + ‖transform (translatedInterpolatingTest m base a points values) z‖ ≤ + |z.im| ^ n * (W * ‖transform base z‖) := + mul_le_mul_of_nonneg_left hsum (pow_nonneg (abs_nonneg _) _) + _ = W * (|z.im| ^ n * ‖transform base z‖) := by ring + _ ≤ W * stripTransformDecayConstant base n := + mul_le_mul_of_nonneg_left hbase hW + _ = stripTransformDecayConstant base n * W := mul_comm _ _ + +/-- Two distinct points approaching each other on the critical line. -/ +def nearCollisionSpectralPair (N : ℕ) : Fin 2 → ℂ := + ![0, I / (N + 1 : ℝ)] + +theorem nearCollisionSpectralPair_injective (N : ℕ) : + Function.Injective (nearCollisionSpectralPair N) := by + have hden : (((N + 1 : ℝ) : ℂ)) ≠ 0 := + Complex.ofReal_ne_zero.mpr (by positivity) + have hne : I / (((N + 1 : ℝ) : ℂ)) ≠ 0 := + div_ne_zero I_ne_zero hden + intro i j hij + fin_cases i <;> fin_cases j + · rfl + · exact False.elim <| hne <| by + simpa [nearCollisionSpectralPair] using hij.symm + · exact False.elim <| hne <| by + simpa [nearCollisionSpectralPair] using hij + · rfl + +/-- Even for two distinct critical-line points, the translated Vandermonde +determinant can be arbitrarily ill-conditioned as the points coalesce. This +quantitative upper bound shows why RvM counts and distinctness alone cannot +provide a uniform interpolation bound. -/ +theorem norm_translatedBasisMatrix_nearCollision_det_le + (base : Test) (a : ℝ) (N : ℕ) (ha : |a| ≤ (N + 1 : ℝ)) : + ‖(translatedBasisMatrix 2 base a + (nearCollisionSpectralPair N)).det‖ ≤ + (stripTransformDecayConstant base 0) ^ 2 * + (2 * |a| / (N + 1 : ℝ)) := by + let C := stripTransformDecayConstant base 0 + let z : ℂ := I / (N + 1 : ℝ) + have hzre : z.re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2) := by + dsimp [z] + norm_num [div_re] + have hzero : + ‖transform base 0‖ ≤ C := by + have h := norm_transform_centered_strip_im_pow_le_explicit + base 0 (z := (0 : ℂ)) (by norm_num) + simpa [C] using h + have hz : + ‖transform base z‖ ≤ C := by + have h := norm_transform_centered_strip_im_pow_le_explicit + base 0 hzre + simpa [C] using h + have hC : 0 ≤ C := (norm_nonneg (transform base 0)).trans hzero + have hza_norm : ‖z * (a : ℂ)‖ = |a| / (N + 1 : ℝ) := by + dsimp [z] + rw [norm_mul, norm_div, norm_I] + have hden : + ‖(((N + 1 : ℝ) : ℂ))‖ = (N + 1 : ℝ) := by + rw [Complex.norm_real, Real.norm_of_nonneg] + positivity + rw [hden] + simp only [norm_real, Real.norm_eq_abs] + rw [div_eq_mul_inv] + ring + have hza_le : ‖z * (a : ℂ)‖ ≤ 1 := by + rw [hza_norm] + exact (div_le_one (by positivity : (0 : ℝ) < N + 1)).mpr ha + have hexp : + ‖exp (z * (a : ℂ)) - 1‖ ≤ 2 * |a| / (N + 1 : ℝ) := by + calc + ‖exp (z * (a : ℂ)) - 1‖ ≤ 2 * ‖z * (a : ℂ)‖ := + Complex.norm_exp_sub_one_le hza_le + _ = 2 * |a| / (N + 1 : ℝ) := by rw [hza_norm]; ring + rw [show nearCollisionSpectralPair N = ![(0 : ℂ), z] by + ext i; fin_cases i <;> rfl] + rw [translatedBasisMatrix_finTwo_det] + simp only [zero_mul, exp_zero] + rw [norm_mul, norm_mul] + have hprod : + ‖transform base 0‖ * ‖transform base z‖ ≤ C ^ 2 := by + nlinarith [hzero, hz, norm_nonneg (transform base 0), + norm_nonneg (transform base z)] + calc + ‖transform base 0‖ * ‖transform base z‖ * + ‖exp (z * (a : ℂ)) - 1‖ ≤ + C ^ 2 * ‖exp (z * (a : ℂ)) - 1‖ := + mul_le_mul_of_nonneg_right hprod (norm_nonneg _) + _ ≤ C ^ 2 * (2 * |a| / (N + 1 : ℝ)) := + mul_le_mul_of_nonneg_left hexp (sq_nonneg C) + +/-- Concrete admissibility condition for strip-uniform decay: one explicit +Schwartz seminorm bound for all exponential weights in the centered critical +strip. -/ +def StripUniformSchwartzSeminormBound + (f : Test) (k : ℕ) (C : ℝ) : Prop := + 0 ≤ C ∧ ∀ a ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2), + (SchwartzMap.seminorm ℂ k 0) + (𝓕 (toSchwartz (exponentiallyWeightedTest f a))) ≤ C + +/-- The admissible seminorm condition gives a strip-uniform polynomial decay +estimate with the same explicit constant. -/ +theorem norm_transform_strip_pow_le + {f : Test} {k : ℕ} {C : ℝ} + (hC : StripUniformSchwartzSeminormBound f k C) + {a : ℝ} (ha : a ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) (ξ : ℝ) : + |ξ| ^ k * ‖transform f ((a : ℂ) - 2 * Real.pi * ξ * I)‖ ≤ C := + (norm_transform_vertical_pow_le f a ξ k).trans (hC.2 a ha) + +theorem zero_stripUniformSchwartzSeminormBound (k : ℕ) : + StripUniformSchwartzSeminormBound (0 : Test) k 0 := by + constructor + · exact le_rfl + · intro a ha + have hz : exponentiallyWeightedTest (0 : Test) a = 0 := by + ext x + simp [exponentiallyWeightedTest] + have hsz : toSchwartz (exponentiallyWeightedTest (0 : Test) a) = 0 := by + ext x + simp [hz] + rw [hsz] + simp + +/-- The multiplicative representative corresponding to a logarithmic test: +`g(x) = x⁻¹/² f(log x)` for `x > 0`, extended by zero. This is the input to +Mathlib's `mellin`; proving the change-of-variables identity is kept as an +explicit bridge obligation below. -/ +def multiplicativeRepresentative (f : Test) (x : ℝ) : ℂ := + if 0 < x then (Real.sqrt x : ℂ)⁻¹ * f (Real.log x) else 0 + +/-- The actual Mathlib Mellin expression in the source normalization. -/ +def mathlibMellin (f : Test) (s : ℂ) : ℂ := + mellin (multiplicativeRepresentative f) s + +/-- Exact normalization needed to identify Mathlib's one-sided Mellin +integral with the centred bilateral transform. -/ +def MellinNormalizationObligation : Prop := + ∀ (f : Test) (z : ℂ), + MellinConvergent (multiplicativeRepresentative f) (1 / 2 + z) ∧ + mathlibMellin f (1 / 2 + z) = transform f z + +/-- Hermitian reflection on logarithmic test functions: `f⋆(t) = conj (f(-t))`. -/ +def involution (f : Test) : Test where + toFun t := star (f (-t)) + contDiff' := + Complex.conjCLE.contDiff.comp (f.contDiff.comp contDiff_neg) + hasCompactSupport' := + (f.hasCompactSupport.comp_homeomorph (Homeomorph.neg ℝ)).comp_left + (map_zero Complex.conjCLE) + tsupport_subset' := by simp + +@[simp] +theorem involution_apply (f : Test) (t : ℝ) : + involution f t = star (f (-t)) := + rfl + +@[simp] +theorem involution_involution (f : Test) : involution (involution f) = f := by + ext t + simp [involution] + +@[simp] +theorem involution_zero : involution (0 : Test) = 0 := by + ext t + simp + +theorem involution_add (f g : Test) : + involution (f + g) = involution f + involution g := by + ext t + simp + +theorem involution_smul (c : ℂ) (f : Test) : + involution (c • f) = star c • involution f := by + ext t + simp + +/-- Hermitian reflection at an arbitrary complex spectral parameter. -/ +theorem transform_involution (f : Test) (z : ℂ) : + transform (involution f) z = + star (transform f (-star z)) := by + rw [transform, transform] + change _ = conj (∫ t : ℝ, f t * exp ((-conj z) * t)) + rw [← integral_conj, ← integral_neg_eq_self] + apply integral_congr_ae + filter_upwards with t + simp only [involution_apply, map_mul, ← exp_conj, map_neg, + conj_ofReal, neg_neg] + congr 2 + simp [mul_comm] + +/-- On the critical line, Hermitian reflection conjugates the centered +transform. -/ +theorem transform_involution_imaginary (f : Test) (ξ : ℝ) : + transform (involution f) (-2 * Real.pi * ξ * I) = + star (transform f (-2 * Real.pi * ξ * I)) := by + rw [transform, transform] + change _ = conj (∫ t : ℝ, f t * exp ((-2 * Real.pi * ξ * I) * t)) + rw [← integral_conj, ← integral_neg_eq_self] + apply integral_congr_ae + filter_upwards with t + simp only [involution_apply, map_mul, ← exp_conj, map_neg, map_ofNat, + conj_ofReal, conj_I, neg_mul, neg_neg] + congr 2 + push_cast + ring_nf + +/-- Additive convolution on the logarithmic line. It corresponds to +multiplicative convolution with Haar measure `dx/x` on `(0, ∞)`. -/ +def convolution (f g : Test) : Test where + toFun := MeasureTheory.convolution f g (ContinuousLinearMap.mul ℝ ℂ) volume + contDiff' := + g.hasCompactSupport.contDiff_convolution_right + (ContinuousLinearMap.mul ℝ ℂ) f.continuous.locallyIntegrable g.contDiff + hasCompactSupport' := + f.hasCompactSupport.convolution (ContinuousLinearMap.mul ℝ ℂ) g.hasCompactSupport + tsupport_subset' := by simp + +@[simp] +theorem convolution_apply (f g : Test) (x : ℝ) : + convolution f g x = ∫ t : ℝ, f t * g (x - t) := by + rfl + +/-- The bilateral Laplace transform converts additive convolution into +multiplication at every complex spectral parameter. -/ +theorem transform_convolution (f g : Test) (z : ℂ) : + transform (convolution f g) z = transform f z * transform g z := by + let F : ℝ → ℂ := fun t ↦ f t * exp (z * t) + let G : ℝ → ℂ := fun t ↦ g t * exp (z * t) + have hF : Integrable F := by + apply Continuous.integrable_of_hasCompactSupport + · exact f.continuous.mul <| Complex.continuous_exp.comp + (continuous_const.mul (Complex.continuous_ofReal.comp continuous_id)) + · exact f.hasCompactSupport.mul_right + have hG : Integrable G := by + apply Continuous.integrable_of_hasCompactSupport + · exact g.continuous.mul <| Complex.continuous_exp.comp + (continuous_const.mul (Complex.continuous_ofReal.comp continuous_id)) + · exact g.hasCompactSupport.mul_right + rw [transform, transform, transform] + change (∫ x : ℝ, convolution f g x * exp (z * x)) = + (∫ t : ℝ, F t) * ∫ t : ℝ, G t + have hprod : + (∫ t : ℝ, F t) * (∫ t : ℝ, G t) = + ∫ x : ℝ, MeasureTheory.convolution F G + (ContinuousLinearMap.mul ℝ ℂ) volume x := by + symm + simpa using MeasureTheory.integral_convolution + (L := ContinuousLinearMap.mul ℝ ℂ) hF hG + rw [hprod] + apply integral_congr_ae + filter_upwards with x + change (∫ t : ℝ, f t * g (x - t)) * exp (z * x) = + ∫ t : ℝ, F t * G (x - t) + rw [← integral_mul_const] + apply integral_congr_ae + filter_upwards with t + dsimp [F, G] + have hexp : + z * (t : ℂ) + z * ((x - t : ℝ) : ℂ) = z * (x : ℂ) := by + push_cast + ring + have hsplit : + exp (z * (t : ℂ)) * exp (z * ((x - t : ℝ) : ℂ)) = + exp (z * (x : ℂ)) := by + rw [← exp_add, hexp] + rw [← hsplit] + ring + +/-- Exact off-critical convolution-square factorization. -/ +theorem transform_convolution_involution (f : Test) (z : ℂ) : + transform (convolution f (involution f)) z = + transform f z * star (transform f (-star z)) := by + rw [transform_convolution, transform_involution] + +/-- The matrix-free local separator has the exact negative convolution-square +value at the selected off-line target. -/ +theorem transform_localPairSeparator_square_target + (a : ℝ) (z : ℂ) (nearby : List ℂ) + (hz : LocalSeparatorGap a z (-star z :: nearby)) + (hpartner : LocalSeparatorGap a (-star z) (z :: nearby)) : + transform + (convolution (localPairSeparator a z nearby) + (involution (localPairSeparator a z nearby))) z = -1 := by + rw [transform_convolution_involution, + transform_localPairSeparator_target _ _ _ hz, + transform_localPairSeparator_partner _ _ _ hpartner] + norm_num + +theorem transform_localPairSeparator_square_partner + (a : ℝ) (z : ℂ) (nearby : List ℂ) + (hz : LocalSeparatorGap a z (-star z :: nearby)) + (hpartner : LocalSeparatorGap a (-star z) (z :: nearby)) : + transform + (convolution (localPairSeparator a z nearby) + (involution (localPairSeparator a z nearby))) (-star z) = -1 := by + rw [transform_convolution_involution, + transform_localPairSeparator_partner _ _ _ hpartner] + rw [show -star (-star z) = z by simp] + rw [transform_localPairSeparator_target _ _ _ hz] + norm_num + +theorem transform_localPairSeparator_square_nearby_eq_zero + (a : ℝ) (z : ℂ) (nearby : List ℂ) {q : ℂ} (hq : q ∈ nearby) : + transform + (convolution (localPairSeparator a z nearby) + (involution (localPairSeparator a z nearby))) q = 0 := by + rw [transform_convolution_involution, + transform_localPairSeparator_nearby_eq_zero _ _ _ hq] + ring + +/-- Strip-uniform rapid decay is preserved quantitatively by convolution +squares, with doubled power and squared decay constant. -/ +theorem norm_transform_convolution_involution_strip_pow_le + (f : Test) (n : ℕ) {z : ℂ} + (hz : z.re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) : + |z.im| ^ (2 * n) * + ‖transform (convolution f (involution f)) z‖ ≤ + (stripTransformDecayConstant f n) ^ 2 := by + have hzpartner : + (-star z).re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2) := by + have hre : (-star z).re = -z.re := by simp + rw [hre] + constructor <;> linarith [hz.1, hz.2] + have h₁ := norm_transform_centered_strip_im_pow_le_explicit f n hz + have h₂ := + norm_transform_centered_strip_im_pow_le_explicit f n hzpartner + have him : (-star z).im = z.im := by simp + rw [him] at h₂ + have hC : 0 ≤ stripTransformDecayConstant f n := + (mul_nonneg (pow_nonneg (abs_nonneg z.im) n) + (norm_nonneg (transform f z))).trans h₁ + have hmul : + (|z.im| ^ n * ‖transform f z‖) * + (|z.im| ^ n * ‖transform f (-star z)‖) ≤ + stripTransformDecayConstant f n * + stripTransformDecayConstant f n := + mul_le_mul h₁ h₂ + (mul_nonneg (pow_nonneg (abs_nonneg z.im) n) + (norm_nonneg (transform f (-star z)))) hC + rw [transform_convolution_involution, norm_mul, norm_star] + calc + |z.im| ^ (2 * n) * + (‖transform f z‖ * ‖transform f (-star z)‖) = + (|z.im| ^ n * ‖transform f z‖) * + (|z.im| ^ n * ‖transform f (-star z)‖) := by + rw [show 2 * n = n + n by omega, pow_add] + ring + _ ≤ _ := hmul + _ = (stripTransformDecayConstant f n) ^ 2 := by ring + +/-- Distant spectral contributions of the local separator retain arbitrary +strip-uniform polynomial decay. -/ +theorem norm_transform_localPairSeparator_square_strip_pow_le + (a : ℝ) (target : ℂ) (nearby : List ℂ) (n : ℕ) {z : ℂ} + (hz : z.re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) : + |z.im| ^ (2 * n) * + ‖transform + (convolution (localPairSeparator a target nearby) + (involution (localPairSeparator a target nearby))) z‖ ≤ + (stripTransformDecayConstant + (localPairSeparator a target nearby) n) ^ 2 := + norm_transform_convolution_involution_strip_pow_le + (localPairSeparator a target nearby) n hz + +/-- Fully explicit condition-number-sensitive decay bound for a translated +interpolator's convolution square. -/ +theorem norm_transform_translatedInterpolatorSquare_strip_pow_le + (m n : ℕ) (base : Test) (a : ℝ) + (points values : Fin m → ℂ) {z : ℂ} + (hz : z.re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2)) : + |z.im| ^ (2 * n) * + ‖transform + (convolution + (translatedInterpolatingTest m base a points values) + (involution + (translatedInterpolatingTest m base a points values))) z‖ ≤ + (stripTransformDecayConstant base n * + translatedInterpolationWeight m base a points values) ^ 2 := by + let f := translatedInterpolatingTest m base a points values + let C := stripTransformDecayConstant base n * + translatedInterpolationWeight m base a points values + have hzpartner : + (-star z).re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2) := by + have hre : (-star z).re = -z.re := by simp + rw [hre] + constructor <;> linarith [hz.1, hz.2] + have h₁ : + |z.im| ^ n * ‖transform f z‖ ≤ C := + norm_transform_translatedInterpolatingTest_strip_pow_le + m n base a points values hz + have h₂ : + |z.im| ^ n * ‖transform f (-star z)‖ ≤ C := by + have h := norm_transform_translatedInterpolatingTest_strip_pow_le + m n base a points values hzpartner + simpa using h + have hC : 0 ≤ C := + (mul_nonneg (pow_nonneg (abs_nonneg z.im) n) + (norm_nonneg (transform f z))).trans h₁ + have hmul : + (|z.im| ^ n * ‖transform f z‖) * + (|z.im| ^ n * ‖transform f (-star z)‖) ≤ C * C := + mul_le_mul h₁ h₂ + (mul_nonneg (pow_nonneg (abs_nonneg z.im) n) + (norm_nonneg (transform f (-star z)))) hC + change |z.im| ^ (2 * n) * + ‖transform (convolution f (involution f)) z‖ ≤ C ^ 2 + rw [transform_convolution_involution, norm_mul, norm_star] + calc + |z.im| ^ (2 * n) * + (‖transform f z‖ * ‖transform f (-star z)‖) = + (|z.im| ^ n * ‖transform f z‖) * + (|z.im| ^ n * ‖transform f (-star z)‖) := by + rw [show 2 * n = n + n by omega, pow_add] + ring + _ ≤ C * C := hmul + _ = C ^ 2 := by ring + +/-- Finite interpolation closed under functional-equation reflection passes +exactly to convolution-square transform values. -/ +theorem exists_convolutionSquare_transform_eq + (n : ℕ) (points values : Fin n → ℂ) (partner : Fin n → Fin n) + (hpoints : Function.Injective points) + (hpartner : ∀ i, points (partner i) = -star (points i)) : + ∃ f : Test, ∀ i, + transform (convolution f (involution f)) (points i) = + values i * star (values (partner i)) := by + rcases exists_translatedInterpolatingTest n points values hpoints with + ⟨base, hbase⟩ + let f : Test := + translatedInterpolatingTest n base + (collisionFreeTranslationStep points) points values + refine ⟨f, fun i ↦ ?_⟩ + rw [transform_convolution_involution, hbase i, ← hpartner i, + hbase (partner i)] + +/-- Every non-fixed symmetry pair admits a genuine convolution square whose +transform is `-1` at both members of the pair. -/ +theorem exists_convolutionSquare_negative_on_offCritical_pair + (z : ℂ) (hz : z ≠ -star z) : + ∃ f : Test, + transform (convolution f (involution f)) z = -1 ∧ + transform (convolution f (involution f)) (-star z) = -1 := by + let points : Fin 2 → ℂ := ![z, -star z] + let values : Fin 2 → ℂ := ![1, -1] + let partner : Fin 2 → Fin 2 := ![1, 0] + have hpoints : Function.Injective points := by + intro i j hij + fin_cases i <;> fin_cases j <;> simp_all [points] + have hpartner : ∀ i, points (partner i) = -star (points i) := by + intro i + fin_cases i <;> simp [points, partner] + rcases exists_convolutionSquare_transform_eq + 2 points values partner hpoints hpartner with ⟨f, hf⟩ + refine ⟨f, ?_, ?_⟩ + · simpa [points, values, partner] using hf 0 + · simpa [points, values, partner] using hf 1 + +theorem convolution_comm (f g : Test) : + convolution f g = convolution g f := by + ext x + change MeasureTheory.convolution f g (ContinuousLinearMap.mul ℝ ℂ) volume x = + MeasureTheory.convolution g f (ContinuousLinearMap.mul ℝ ℂ) volume x + rw [MeasureTheory.convolution_eq_swap] + apply integral_congr_ae + filter_upwards with t + exact mul_comm _ _ + +theorem iteratedDeriv_convolution_right (f g : Test) (n : ℕ) : + iteratedDeriv n (convolution f g) = + MeasureTheory.convolution f (iteratedDeriv n g) + (ContinuousLinearMap.mul ℝ ℂ) volume := by + induction n with + | zero => + ext x + rfl + | succ n ih => + rw [iteratedDeriv_succ, ih] + ext x + have hg : ContDiff ℝ (n + 1 : ℕ) (g : ℝ → ℂ) := + g.contDiff.of_le + (WithTop.coe_le_coe.mpr (ENat.coe_lt_top (n + 1)).le) + have hd : ContDiff ℝ 1 (iteratedDeriv n (g : ℝ → ℂ)) := + (contDiff_nat_succ_iff_contDiff_one_iteratedDeriv.mp hg).2 + simpa only [iteratedDeriv_succ] using + ((hasCompactSupport_iteratedDeriv g n).hasDerivAt_convolution_right + (μ := volume) + (ContinuousLinearMap.mul ℝ ℂ) f.continuous.locallyIntegrable + hd x).deriv + +theorem integral_norm_supported_le_measure_mul_seminorm + (K : Compacts ℝ) (f : 𝓓^{⊤}_{K}(ℝ, ℂ)) : + (∫ x : ℝ, ‖f x‖) ≤ volume.real (K : Set ℝ) * N[ℝ]_{K, 0} f := by + have heq : + (∫ x : ℝ, ‖f x‖) = ∫ x : ℝ in (K : Set ℝ), ‖f x‖ := by + symm + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro x hx + simp [f.zero_on_compl hx] + rw [heq, ← Real.norm_of_nonneg (setIntegral_nonneg + K.isCompact.measurableSet fun _ _ ↦ norm_nonneg _)] + calc + |∫ x : ℝ in (K : Set ℝ), ‖f x‖| ≤ + N[ℝ]_{K, 0} f * volume.real (K : Set ℝ) := + norm_setIntegral_le_of_norm_le_const + (μ := volume) (f := fun x : ℝ ↦ ‖f x‖) + K.isCompact.measure_lt_top fun x _ ↦ by + simpa [norm_iteratedFDeriv_eq_norm_iteratedDeriv] using + (ContDiffMapSupportedIn.norm_iteratedFDeriv_apply_le_seminorm_top + (𝕜 := ℝ) (f := f) (x := x) (i := 0)) + _ = volume.real (K : Set ℝ) * N[ℝ]_{K, 0} f := mul_comm _ _ + +theorem norm_iteratedDeriv_supported_convolution_le + (K L : Compacts ℝ) (f : 𝓓^{⊤}_{K}(ℝ, ℂ)) (g : 𝓓^{⊤}_{L}(ℝ, ℂ)) + (n : ℕ) (x : ℝ) : + ‖iteratedDeriv n + (convolution + (TestFunction.ofSupportedIn (Set.subset_univ _) f) + (TestFunction.ofSupportedIn (Set.subset_univ _) g)) x‖ ≤ + volume.real (K : Set ℝ) * N[ℝ]_{K, 0} f * N[ℝ]_{L, n} g := by + let F : Test := TestFunction.ofSupportedIn (Set.subset_univ _) f + let G : Test := TestFunction.ofSupportedIn (Set.subset_univ _) g + have hgcont : Continuous (iteratedDeriv n (g : ℝ → ℂ)) := + (g.contDiff.continuous_iteratedDeriv n + (WithTop.coe_le_coe.mpr (ENat.coe_lt_top n).le)) + have hint : + Integrable fun t : ℝ ↦ ‖f t * iteratedDeriv n (g : ℝ → ℂ) (x - t)‖ := by + apply Continuous.integrable_of_hasCompactSupport + · exact (f.continuous.mul + (hgcont.comp (continuous_const.sub continuous_id))).norm + · have hs : HasCompactSupport + (fun t : ℝ ↦ f t * iteratedDeriv n (g : ℝ → ℂ) (x - t)) := + f.hasCompactSupport.mul_right + exact hs.norm + have hmajor : + Integrable fun t : ℝ ↦ ‖f t‖ * N[ℝ]_{L, n} g := + f.continuous.norm.integrable_of_hasCompactSupport f.hasCompactSupport.norm + |>.mul_const _ + have hderiv (y : ℝ) : + ‖iteratedDeriv n (g : ℝ → ℂ) y‖ ≤ N[ℝ]_{L, n} g := by + rw [← norm_iteratedFDeriv_eq_norm_iteratedDeriv] + exact ContDiffMapSupportedIn.norm_iteratedFDeriv_apply_le_seminorm_top ℝ + rw [show + (convolution F G : ℝ → ℂ) = + convolution + (TestFunction.ofSupportedIn (Set.subset_univ _) f) + (TestFunction.ofSupportedIn (Set.subset_univ _) g) by rfl] + rw [iteratedDeriv_convolution_right F G n] + change ‖∫ t : ℝ, f t * iteratedDeriv n (g : ℝ → ℂ) (x - t)‖ ≤ _ + calc + ‖∫ t : ℝ, f t * iteratedDeriv n (g : ℝ → ℂ) (x - t)‖ ≤ + ∫ t : ℝ, ‖f t * iteratedDeriv n (g : ℝ → ℂ) (x - t)‖ := + norm_integral_le_integral_norm _ + _ ≤ ∫ t : ℝ, ‖f t‖ * N[ℝ]_{L, n} g := by + apply integral_mono hint hmajor + intro t + dsimp only + rw [norm_mul] + exact mul_le_mul_of_nonneg_left (hderiv (x - t)) (norm_nonneg _) + _ = N[ℝ]_{L, n} g * ∫ t : ℝ, ‖f t‖ := by + rw [← integral_const_mul] + apply integral_congr_ae + filter_upwards with t + ring + _ ≤ N[ℝ]_{L, n} g * + (volume.real (K : Set ℝ) * N[ℝ]_{K, 0} f) := by + gcongr + exact integral_norm_supported_le_measure_mul_seminorm K f + _ = volume.real (K : Set ℝ) * N[ℝ]_{K, 0} f * N[ℝ]_{L, n} g := by + ring + +/-- Minkowski sum of two compact supports. -/ +def convolutionCompact (K L : Compacts ℝ) : Compacts ℝ := + ⟨(K : Set ℝ) + (L : Set ℝ), K.isCompact.add L.isCompact⟩ + +/-- Fixed-stage convolution with its sharp support target bundled in +`𝓓_{K+L}`. -/ +noncomputable def supportedConvolution + (K L : Compacts ℝ) : + 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ) → + 𝓓^{⊤}_{convolutionCompact K L}(ℝ, ℂ) := + fun p ↦ ContDiffMapSupportedIn.of_support_subset + ((p.1.hasCompactSupport.contDiff_convolution_left + (ContinuousLinearMap.mul ℝ ℂ) p.1.contDiff + p.2.continuous.locallyIntegrable)) + ((MeasureTheory.support_convolution_subset + (μ := volume) (ContinuousLinearMap.mul ℝ ℂ)).trans + (Set.add_subset_add p.1.support_subset p.2.support_subset)) + +@[simp] +theorem supportedConvolution_apply + (K L : Compacts ℝ) + (p : 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ)) (x : ℝ) : + supportedConvolution K L p x = + MeasureTheory.convolution p.1 p.2 + (ContinuousLinearMap.mul ℝ ℂ) volume x := rfl + +/-- The pointwise estimate upgrades to every defining seminorm of the exact +fixed support target. -/ +theorem supportedConvolution_seminorm_le + (K L : Compacts ℝ) + (p : 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ)) (n : ℕ) : + N[ℝ]_{convolutionCompact K L, n} (supportedConvolution K L p) ≤ + volume.real (K : Set ℝ) * N[ℝ]_{K, 0} p.1 * N[ℝ]_{L, n} p.2 := by + apply (ContDiffMapSupportedIn.seminorm_top_le_iff + (𝕜 := ℝ) (K := convolutionCompact K L) (by positivity) + n (supportedConvolution K L p)).2 + intro x hx + rw [norm_iteratedFDeriv_eq_norm_iteratedDeriv] + have hfun : + (supportedConvolution K L p : ℝ → ℂ) = + (convolution + (TestFunction.ofSupportedIn (Set.subset_univ _) p.1) + (TestFunction.ofSupportedIn (Set.subset_univ _) p.2) : ℝ → ℂ) := by + ext y + rfl + rw [hfun] + exact norm_iteratedDeriv_supported_convolution_le K L p.1 p.2 n x + +/-- On a fixed compact-support stage, von Neumann boundedness is exactly +uniform boundedness for every defining derivative seminorm. -/ +theorem supportedIn_isVonNBounded_iff_seminorm_bounded + (K : Compacts ℝ) (B : Set 𝓓^{⊤}_{K}(ℝ, ℂ)) : + Bornology.IsVonNBounded ℝ B ↔ + ∀ n : ℕ, ∃ r > 0, ∀ f ∈ B, N[ℝ]_{K, n} f < r := + WithSeminorms.isVonNBounded_iff_seminorm_bounded + (ContDiffMapSupportedIn.withSeminorms ℝ ℝ ℂ ⊤ K) + +/-- Uniform left-variable estimate on a bounded subset of a fixed support +stage. This is the concrete hypocontinuity estimate used below. -/ +theorem supportedConvolution_uniform_left_of_isVonNBounded + (K L : Compacts ℝ) (B : Set 𝓓^{⊤}_{K}(ℝ, ℂ)) + (hB : Bornology.IsVonNBounded ℝ B) (n : ℕ) : + ∃ C ≥ 0, ∀ f ∈ B, ∀ g : 𝓓^{⊤}_{L}(ℝ, ℂ), + N[ℝ]_{convolutionCompact K L, n} (supportedConvolution K L (f, g)) ≤ + C * N[ℝ]_{L, n} g := by + rcases (supportedIn_isVonNBounded_iff_seminorm_bounded K B).mp hB 0 with + ⟨r, hr, hBr⟩ + refine ⟨volume.real (K : Set ℝ) * r, mul_nonneg measureReal_nonneg hr.le, + fun f hf g ↦ ?_⟩ + calc + N[ℝ]_{convolutionCompact K L, n} (supportedConvolution K L (f, g)) ≤ + volume.real (K : Set ℝ) * N[ℝ]_{K, 0} f * N[ℝ]_{L, n} g := + supportedConvolution_seminorm_le K L (f, g) n + _ ≤ (volume.real (K : Set ℝ) * r) * N[ℝ]_{L, n} g := by + gcongr + exact (hBr f hf).le + +/-- Uniform right-variable estimate on a bounded subset of a fixed support +stage. Together with the preceding theorem, this is fixed-stage +hypocontinuity of convolution. -/ +theorem supportedConvolution_uniform_right_of_isVonNBounded + (K L : Compacts ℝ) (B : Set 𝓓^{⊤}_{L}(ℝ, ℂ)) + (hB : Bornology.IsVonNBounded ℝ B) (n : ℕ) : + ∃ C ≥ 0, ∀ g ∈ B, ∀ f : 𝓓^{⊤}_{K}(ℝ, ℂ), + N[ℝ]_{convolutionCompact K L, n} (supportedConvolution K L (f, g)) ≤ + C * N[ℝ]_{K, 0} f := by + rcases (supportedIn_isVonNBounded_iff_seminorm_bounded L B).mp hB n with + ⟨r, hr, hBr⟩ + refine ⟨volume.real (K : Set ℝ) * r, mul_nonneg measureReal_nonneg hr.le, + fun g hg f ↦ ?_⟩ + calc + N[ℝ]_{convolutionCompact K L, n} (supportedConvolution K L (f, g)) ≤ + volume.real (K : Set ℝ) * N[ℝ]_{K, 0} f * N[ℝ]_{L, n} g := + supportedConvolution_seminorm_le K L (f, g) n + _ ≤ volume.real (K : Set ℝ) * N[ℝ]_{K, 0} f * r := by + gcongr + exact (hBr g hg).le + _ = (volume.real (K : Set ℝ) * r) * N[ℝ]_{K, 0} f := by + ring + +/-- A subset of the LF test-function space is stage-bounded if it is carried +by a von Neumann bounded subset of one fixed compact-support stage. -/ +def TestFunction.IsStageVonNBounded (B : Set Test) : Prop := + ∃ K : Compacts ℝ, ∃ S : Set 𝓓^{⊤}_{K}(ℝ, ℂ), + Bornology.IsVonNBounded ℝ S ∧ + B ⊆ TestFunction.ofSupportedIn (Set.subset_univ _) '' S + +/-- Every stage-bounded family is von Neumann bounded in the LF topology. +The converse is the regularity theorem for this strict LF limit; that theorem +is not presently supplied by Mathlib's test-function API. -/ +theorem TestFunction.IsStageVonNBounded.isVonNBounded + {B : Set Test} (hB : TestFunction.IsStageVonNBounded B) : + Bornology.IsVonNBounded ℝ B := by + rcases hB with ⟨K, S, hS, hsub⟩ + exact Bornology.IsVonNBounded.subset hsub + (hS.image (TestFunction.ofSupportedInCLM ℝ (Set.subset_univ _))) + +/-- Every individual test is bounded in its own compact-support stage. -/ +theorem TestFunction.isStageVonNBounded_singleton (f : Test) : + TestFunction.IsStageVonNBounded ({f} : Set Test) := by + let K : Compacts ℝ := ⟨tsupport f, f.hasCompactSupport⟩ + let fK : 𝓓^{⊤}_{K}(ℝ, ℂ) := + ContDiffMapSupportedIn.of_support_subset f.contDiff subset_closure + refine ⟨K, {fK}, Bornology.isVonNBounded_singleton fK, ?_⟩ + intro g hg + rw [Set.mem_singleton_iff] at hg + subst g + refine ⟨fK, Set.mem_singleton fK, ?_⟩ + ext x + rfl + +/-- Pointwise convolution image of two test-function families. -/ +def convolutionSet (B C : Set Test) : Set Test := + (fun p : Test × Test ↦ convolution p.1 p.2) '' (B ×ˢ C) + +/-- The unconditional bornological substitute available from fixed-stage +seminorm estimates: convolution maps two stage-bounded families into one +stage-bounded family. -/ +theorem TestFunction.IsStageVonNBounded.convolutionSet + {B C : Set Test} (hB : TestFunction.IsStageVonNBounded B) + (hC : TestFunction.IsStageVonNBounded C) : + TestFunction.IsStageVonNBounded (convolutionSet B C) := by + classical + rcases hB with ⟨K, S, hS, hBS⟩ + rcases hC with ⟨L, T, hT, hCT⟩ + let U : Set 𝓓^{⊤}_{convolutionCompact K L}(ℝ, ℂ) := + supportedConvolution K L '' (S ×ˢ T) + have hU : Bornology.IsVonNBounded ℝ U := by + rw [supportedIn_isVonNBounded_iff_seminorm_bounded] + intro n + rcases (supportedIn_isVonNBounded_iff_seminorm_bounded K S).mp hS 0 with + ⟨r, hr, hSr⟩ + rcases (supportedIn_isVonNBounded_iff_seminorm_bounded L T).mp hT n with + ⟨q, hq, hTq⟩ + refine ⟨volume.real (K : Set ℝ) * r * q + 1, by positivity, ?_⟩ + intro u hu + rcases hu with ⟨p, hp, rfl⟩ + calc + N[ℝ]_{convolutionCompact K L, n} (supportedConvolution K L p) ≤ + volume.real (K : Set ℝ) * N[ℝ]_{K, 0} p.1 * + N[ℝ]_{L, n} p.2 := + supportedConvolution_seminorm_le K L p n + _ ≤ volume.real (K : Set ℝ) * r * q := by + gcongr + · exact (hSr p.1 hp.1).le + · exact (hTq p.2 hp.2).le + _ < volume.real (K : Set ℝ) * r * q + 1 := by linarith + refine ⟨convolutionCompact K L, U, hU, ?_⟩ + intro h hh + rcases hh with ⟨p, hp, rfl⟩ + rcases hBS hp.1 with ⟨f, hf, hpf⟩ + rcases hCT hp.2 with ⟨g, hg, hpg⟩ + change convolution p.1 p.2 ∈ + TestFunction.ofSupportedIn (Set.subset_univ _) '' U + rw [← hpf, ← hpg] + refine ⟨supportedConvolution K L (f, g), ⟨(f, g), ⟨hf, hg⟩, rfl⟩, ?_⟩ + ext x + rfl + +/-- In particular, every convolution square used by Weil positivity is an +element of a concrete bounded compact-support stage; strict-LF regularity is +not needed for individual-test admissibility. -/ +theorem convolutionSquare_isStageVonNBounded (f : Test) : + TestFunction.IsStageVonNBounded + ({convolution f (involution f)} : Set Test) := + TestFunction.isStageVonNBounded_singleton _ + +/-- The finite-difference separator square is unconditionally admissible in +one concrete compact-support stage; global strict-LF regularity is irrelevant +for this individual Weil test. -/ +theorem localPairSeparatorSquare_isStageVonNBounded + (a : ℝ) (z : ℂ) (nearby : List ℂ) : + TestFunction.IsStageVonNBounded + ({convolution (localPairSeparator a z nearby) + (involution (localPairSeparator a z nearby))} : Set Test) := + convolutionSquare_isStageVonNBounded _ + +/-- Exact regularity statement missing from the pinned strict-LF API: every +LF-bounded family is already bounded in one compact-support stage. -/ +def TestFunction.StrictLFBoundedRegularity : Prop := + ∀ B : Set Test, Bornology.IsVonNBounded ℝ B → + TestFunction.IsStageVonNBounded B + +theorem TestFunction.strictLFBoundedRegularity_iff : + TestFunction.StrictLFBoundedRegularity ↔ + ∀ B : Set Test, + Bornology.IsVonNBounded ℝ B ↔ TestFunction.IsStageVonNBounded B := by + constructor + · intro h B + exact ⟨h B, TestFunction.IsStageVonNBounded.isVonNBounded⟩ + · intro h B hB + exact (h B).mp hB + +/-- Under the missing strict-LF regularity theorem, the preceding unconditional +stage statement upgrades to all von Neumann bounded families. -/ +theorem convolutionSet_isVonNBounded_of_strictLF + (hregular : TestFunction.StrictLFBoundedRegularity) + {B C : Set Test} (hB : Bornology.IsVonNBounded ℝ B) + (hC : Bornology.IsVonNBounded ℝ C) : + Bornology.IsVonNBounded ℝ (convolutionSet B C) := + ((hregular B hB).convolutionSet (hregular C hC)).isVonNBounded + +theorem convolutionCompact_mono + {K K' L L' : Compacts ℝ} (hK : K ≤ K') (hL : L ≤ L') : + convolutionCompact K L ≤ convolutionCompact K' L' := + Set.add_subset_add hK hL + +/-- Fixed-stage convolution commutes with all compact-support inclusions. +This is the exact inductive-system compatibility required before any LF +bilinear lifting theorem can be applied. -/ +theorem supportedConvolution_mono + {K K' L L' : Compacts ℝ} (hK : K ≤ K') (hL : L ≤ L') + (f : 𝓓^{⊤}_{K}(ℝ, ℂ)) (g : 𝓓^{⊤}_{L}(ℝ, ℂ)) : + ContDiffMapSupportedIn.monoCLM ℝ + (supportedConvolution K L (f, g)) = + supportedConvolution K' L' + (ContDiffMapSupportedIn.monoCLM ℝ f, + ContDiffMapSupportedIn.monoCLM ℝ g) := by + ext x + have hKL := convolutionCompact_mono hK hL + simp only [ContDiffMapSupportedIn.monoCLM_apply, le_refl, and_self, + hKL, if_true] + rw [supportedConvolution_apply, supportedConvolution_apply] + have hf : + ((ContDiffMapSupportedIn.monoCLM ℝ f : + 𝓓^{⊤}_{K'}(ℝ, ℂ)) : ℝ → ℂ) = f := by + simpa [hK] using + (ContDiffMapSupportedIn.monoCLM_apply + (𝕜 := ℝ) (n₁ := ⊤) (n₂ := ⊤) (K₁ := K) (K₂ := K') f) + have hg : + ((ContDiffMapSupportedIn.monoCLM ℝ g : + 𝓓^{⊤}_{L'}(ℝ, ℂ)) : ℝ → ℂ) = g := by + simpa [hL] using + (ContDiffMapSupportedIn.monoCLM_apply + (𝕜 := ℝ) (n₁ := ⊤) (n₂ := ⊤) (K₁ := L) (K₂ := L') g) + change MeasureTheory.convolution f g + (ContinuousLinearMap.mul ℝ ℂ) volume x = + MeasureTheory.convolution + (ContDiffMapSupportedIn.monoCLM ℝ f) + (ContDiffMapSupportedIn.monoCLM ℝ g) + (ContinuousLinearMap.mul ℝ ℂ) volume x + rw [hf, hg] + +/-- A candidate explicit-formula distribution. The actual zeta distribution +is not constructed here; this structure records only its typed domain. -/ +structure Distribution where + /-- Value of the distribution on a test function. -/ + eval : Test → ℂ + /-- The zeta distribution is complex-linear on its test space. -/ + map_add : ∀ f g, eval (f + g) = eval f + eval g + /-- The zeta distribution is complex-linear on its test space. -/ + map_smul : ∀ (c : ℂ) f, eval (c • f) = c * eval f + +/-- The algebraic linear map underlying a candidate distribution. -/ +def Distribution.toLinearMap (W : Distribution) : Test →ₗ[ℂ] ℂ where + toFun := W.eval + map_add' := W.map_add + map_smul' c f := by simpa [smul_eq_mul] using W.map_smul c f + +/-- A candidate distribution whose LF continuity is part of its type. -/ +structure ContinuousDistribution where + evalCLM : Test →L[ℂ] ℂ + +def ContinuousDistribution.toDistribution (W : ContinuousDistribution) : Distribution where + eval := W.evalCLM + map_add := W.evalCLM.map_add + map_smul c f := by simp + +theorem ContinuousDistribution.evalContinuous (W : ContinuousDistribution) : + Continuous W.toDistribution.toLinearMap := + W.evalCLM.continuous + +/-- Weil's Hermitian quadratic functional on convolution squares. -/ +def quadratic (W : Distribution) (f : Test) : ℝ := + (W.eval (convolution f (involution f))).re + +/-- Positive type of a distribution on every admissible convolution square. -/ +def IsPositive (W : Distribution) : Prop := + ∀ f : Test, 0 ≤ quadratic W f + +/-- The precise final theorem obligation for the zeta distribution. + +No inhabitant is supplied: proving this requires constructing the +Guinand--Weil distribution, proving the explicit formula with the chosen +normalization, and proving its positivity criterion. -/ +def BridgeObligation (W : Distribution) : Prop := + IsPositive W ↔ RiemannHypothesis + +/-- The two logical directions of the universal Weil criterion are kept +separate because neither follows from the explicit formula alone. -/ +def PositivityImpliesRH (W : Distribution) : Prop := + IsPositive W → RiemannHypothesis + +def RHImpliesPositivity (W : Distribution) : Prop := + RiemannHypothesis → IsPositive W + +theorem bridgeObligation_iff_directions (W : Distribution) : + BridgeObligation W ↔ PositivityImpliesRH W ∧ RHImpliesPositivity W := by + constructor + · intro h + exact ⟨h.mp, h.mpr⟩ + · rintro ⟨hforward, hbackward⟩ + exact ⟨hforward, hbackward⟩ + +/-- Pullback of a distribution along a linear map of test spaces. -/ +def Distribution.pullback (W : Distribution) (T : Test →ₗ[ℂ] Test) : Distribution where + eval f := W.eval (T f) + map_add f g := by simp [W.map_add] + map_smul c f := by simp [W.map_smul] + +/-! ## Finite explicit-formula approximants -/ + +/-- A finite spectral sum. The index type carries multiplicity by repetition. -/ +def finiteZeroSum {ι : Type*} [Fintype ι] (zeros : ι → ℂ) (f : Test) : ℂ := + ∑ i, transform f (zeros i) + +/-- A finite prime-power sample in logarithmic coordinates. The caller +supplies the source-normalized complex weights and signed log locations. -/ +def finitePrimePowerSum {κ : Type*} [Fintype κ] + (weight : κ → ℂ) (logLocation : κ → ℝ) (f : Test) : ℂ := + ∑ k, weight k * f (logLocation k) + +/-- A multiplicity-aware enumeration of symmetry orbits in centred +coordinates. If `z = ρ - 1/2`, its functional-equation partner is +`-conj z`. Fixed orbits are marked explicitly so zeros on the critical line +are not counted twice. This structure does not assert that its entries +enumerate the zeta zeros. -/ +structure MultiplicityAwareSymmetricZeros where + representative : ℕ → ℂ + multiplicity : ℕ → ℕ + fixedBySymmetry : ℕ → Bool + fixed_spec : ∀ n, fixedBySymmetry n = true → + representative n = -star (representative n) + +/-- Exact specification saying that a modeled list is the quotient of the +actual centered nontrivial zeta zeros by `z ↦ -conj z`, with analytic +multiplicity. `orbit_complete_unique` excludes duplicate modeled orbits. + +The structure is intentionally not inhabited below: Mathlib currently proves +the holomorphic `z ↦ -z` symmetry, but has no conjugation or analytic-order +transport theorem for `riemannZeta`, so those facts cannot be manufactured +without an unsupported assumption. -/ +structure ExactActualZetaOrbitModel (Z : MultiplicityAwareSymmetricZeros) : Prop where + representative_mem : ∀ i, + Z.representative i ∈ actualCenteredNontrivialZetaZeros + multiplicity_eq : ∀ i, + Z.multiplicity i = + actualCenteredZetaMultiplicity (Z.representative i) + fixed_iff : ∀ i, + Z.fixedBySymmetry i = true ↔ + Z.representative i = -star (Z.representative i) + orbit_complete_unique : ∀ z ∈ actualCenteredNontrivialZetaZeros, + ∃! i, z = Z.representative i ∨ z = -star (Z.representative i) + +/-- An exact actual-orbit model supplies both actual zero identities required +by the earlier shell-count bridge. -/ +theorem ExactActualZetaOrbitModel.isZetaZero + {Z : MultiplicityAwareSymmetricZeros} + (H : ExactActualZetaOrbitModel Z) (i : ℕ) : + riemannZeta ((1 / 2 : ℂ) + Z.representative i) = 0 := + (H.representative_mem i).1 + +/-- Partner membership is now a theorem, not an orbit-model assumption. -/ +theorem ExactActualZetaOrbitModel.partner_mem + {Z : MultiplicityAwareSymmetricZeros} + (H : ExactActualZetaOrbitModel Z) (i : ℕ) : + -star (Z.representative i) ∈ actualCenteredNontrivialZetaZeros := + actualCenteredNontrivialZetaZeros_neg_star (H.representative_mem i) + +/-- Partner multiplicity equality is likewise forced by actual zeta +symmetry. -/ +theorem ExactActualZetaOrbitModel.partner_multiplicity_eq + {Z : MultiplicityAwareSymmetricZeros} + (H : ExactActualZetaOrbitModel Z) (i : ℕ) : + actualCenteredZetaMultiplicity (-star (Z.representative i)) = + Z.multiplicity i := + (actualCenteredZetaMultiplicity_neg_star (H.representative_mem i)).trans + (H.multiplicity_eq i).symm + +theorem ExactActualZetaOrbitModel.partnerIsZetaZero + {Z : MultiplicityAwareSymmetricZeros} + (H : ExactActualZetaOrbitModel Z) (i : ℕ) : + riemannZeta ((1 / 2 : ℂ) - star (Z.representative i)) = 0 := by + simpa only [sub_eq_add_neg] using (H.partner_mem i).1 + +/-- Standard zero-location input needed to turn a critical-strip orbit model +into Mathlib's global `RiemannHypothesis`: every nontrivial zero is in the +open critical strip. This follows classically from the functional equation +and the classification of Gamma/cosine zeros, but that classification is not +currently exposed by the pinned zeta API. -/ +def NontrivialZetaZerosInCriticalStrip : Prop := + ∀ s : ℂ, riemannZeta s = 0 → + (¬∃ n : ℕ, s = -2 * (n + 1)) → s ≠ 1 → + 0 < s.re ∧ s.re < 1 + +/-- The standard global strip classification, proved from Mathlib's +closed-right-half-plane nonvanishing, the completed functional equation, and +the exact zero set of `GammaR`. -/ +theorem nontrivialZetaZerosInCriticalStrip : + NontrivialZetaZerosInCriticalStrip := by + intro s hzero hnontrivial hs1 + have hs0 : s ≠ 0 := by + intro h + subst s + norm_num [riemannZeta_zero] at hzero + constructor + · by_contra hnot + have hsre : s.re ≤ 0 := le_of_not_gt hnot + let t : ℂ := 1 - s + have htre : 1 ≤ t.re := by + dsimp [t] + norm_num + linarith + have ht0 : t ≠ 0 := by + intro h + have hre := congrArg Complex.re h + dsimp [t] at hre + norm_num at hre + linarith + have htzeta : riemannZeta t ≠ 0 := + riemannZeta_ne_zero_of_one_le_re htre + have htcomp : completedRiemannZeta t ≠ 0 := by + intro hcomp + apply htzeta + rw [riemannZeta_def_of_ne_zero ht0, hcomp, zero_div] + have hscomp : completedRiemannZeta s ≠ 0 := by + intro hcomp + apply htcomp + dsimp [t] + rw [completedRiemannZeta_one_sub] + exact hcomp + have hsGamma : Complex.Gammaℝ s = 0 := by + by_contra hGamma + have hzeta_ne : riemannZeta s ≠ 0 := by + rw [riemannZeta_def_of_ne_zero hs0] + exact div_ne_zero hscomp hGamma + exact hzeta_ne hzero + obtain ⟨k, hk⟩ := Complex.Gammaℝ_eq_zero_iff.mp hsGamma + cases k with + | zero => + apply hs0 + simpa using hk + | succ k => + apply hnontrivial + refine ⟨k, ?_⟩ + convert hk using 1 <;> push_cast <;> ring + · by_contra hnot + have hsre : 1 ≤ s.re := le_of_not_gt hnot + exact (riemannZeta_ne_zero_of_one_le_re hsre) hzero + +/-- Exact orbit completeness plus critical-line representatives gives the +actual RH, once the standard global zero-location lemma is supplied. -/ +theorem ExactActualZetaOrbitModel.riemannHypothesis_of_representatives + {Z : MultiplicityAwareSymmetricZeros} + (H : ExactActualZetaOrbitModel Z) + (hloc : NontrivialZetaZerosInCriticalStrip) + (hre : ∀ i, (Z.representative i).re = 0) : + RiemannHypothesis := by + intro s hzero hnontrivial hs1 + have hstrip := hloc s hzero hnontrivial hs1 + let z : ℂ := s - 1 / 2 + have hzmem : z ∈ actualCenteredNontrivialZetaZeros := by + refine ⟨?_, ?_, ?_⟩ + · change riemannZeta ((1 / 2 : ℂ) + (s - 1 / 2)) = 0 + convert hzero using 1 <;> ring + · dsimp [z] + norm_num + linarith [hstrip.1] + · dsimp [z] + norm_num + linarith [hstrip.2] + obtain ⟨i, hi, -⟩ := H.orbit_complete_unique z hzmem + have hzre : z.re = 0 := by + rcases hi with hi | hi + · rw [hi] + exact hre i + · rw [hi] + simp [hre i] + dsimp [z] at hzre + norm_num at hzre ⊢ + linarith + +/-- With the global strip theorem now proved, exact orbit completeness and +critical-line representatives imply RH without a separate location input. -/ +theorem ExactActualZetaOrbitModel.riemannHypothesis + {Z : MultiplicityAwareSymmetricZeros} + (H : ExactActualZetaOrbitModel Z) + (hre : ∀ i, (Z.representative i).re = 0) : + RiemannHypothesis := + H.riemannHypothesis_of_representatives + nontrivialZetaZerosInCriticalStrip hre + +/-- Contribution of one multiplicity-weighted symmetry orbit. Fixed points +contribute once; non-fixed representatives contribute together with their +functional-equation partner. -/ +def symmetricZeroPairTerm + (Z : MultiplicityAwareSymmetricZeros) (f : Test) (n : ℕ) : ℂ := + if Z.fixedBySymmetry n then + (Z.multiplicity n : ℂ) * transform f (Z.representative n) + else + (Z.multiplicity n : ℂ) * + (transform f (Z.representative n) + + transform f (-star (Z.representative n))) + +/-- A positive-multiplicity non-fixed off-critical orbit has a genuine +convolution square with strictly negative selected pair contribution. -/ +theorem exists_convolutionSquare_selectedPairTerm_neg + (Z : MultiplicityAwareSymmetricZeros) (i : ℕ) + (hfixed : Z.fixedBySymmetry i = false) + (hoff : Z.representative i ≠ -star (Z.representative i)) + (hmult : 0 < Z.multiplicity i) : + ∃ f : Test, + (symmetricZeroPairTerm Z (convolution f (involution f)) i).re < 0 := by + rcases exists_convolutionSquare_negative_on_offCritical_pair + (Z.representative i) hoff with ⟨f, hzi, hpartner⟩ + refine ⟨f, ?_⟩ + rw [symmetricZeroPairTerm, if_neg (by simpa using hfixed), hzi, hpartner] + norm_num + exact_mod_cast hmult + +/-- The local finite-difference construction gives the selected pair exactly, +with no global interpolation system. Near collisions enter only through the +two explicit finite `LocalSeparatorGap` hypotheses. -/ +theorem localPairSeparator_selectedPairTerm + (Z : MultiplicityAwareSymmetricZeros) (i : ℕ) + (a : ℝ) (nearby : List ℂ) + (hfixed : Z.fixedBySymmetry i = false) + (hz : LocalSeparatorGap a (Z.representative i) + (-star (Z.representative i) :: nearby)) + (hpartner : LocalSeparatorGap a (-star (Z.representative i)) + (Z.representative i :: nearby)) : + symmetricZeroPairTerm Z + (convolution (localPairSeparator a (Z.representative i) nearby) + (involution (localPairSeparator a (Z.representative i) nearby))) i = + -(2 * Z.multiplicity i : ℕ) := by + rw [symmetricZeroPairTerm, if_neg (by simpa using hfixed), + transform_localPairSeparator_square_target _ _ _ hz hpartner, + transform_localPairSeparator_square_partner _ _ _ hz hpartner] + norm_num + ring + +/-- Every listed neighboring orbit is annihilated exactly, independently of +its multiplicity. Both members are listed for a non-fixed symmetry orbit. -/ +theorem localPairSeparator_nearbyPairTerm_eq_zero + (Z : MultiplicityAwareSymmetricZeros) (j : ℕ) + (a : ℝ) (z : ℂ) (nearby : List ℂ) + (hrep : Z.representative j ∈ nearby) + (hpartner : -star (Z.representative j) ∈ nearby) : + symmetricZeroPairTerm Z + (convolution (localPairSeparator a z nearby) + (involution (localPairSeparator a z nearby))) j = 0 := by + rw [symmetricZeroPairTerm] + split_ifs + · rw [transform_localPairSeparator_square_nearby_eq_zero _ _ _ hrep] + ring + · rw [transform_localPairSeparator_square_nearby_eq_zero _ _ _ hrep, + transform_localPairSeparator_square_nearby_eq_zero _ _ _ hpartner] + ring + +/-- Symmetric finite truncation for a fixed multiplicity-aware enumeration. -/ +def symmetricZeroPartialSum + (Z : MultiplicityAwareSymmetricZeros) (f : Test) (N : ℕ) : ℂ := + ∑ n ∈ Finset.range N, symmetricZeroPairTerm Z f n + +/-- A finite, not necessarily initial, collection of symmetry-orbit +contributions. -/ +def symmetricZeroFinsetSum + (Z : MultiplicityAwareSymmetricZeros) (f : Test) (S : Finset ℕ) : ℂ := + ∑ n ∈ S, symmetricZeroPairTerm Z f n + +/-- Quantitative robust finite separation criterion. -/ +theorem symmetricZeroFinsetSum_re_lt_of_target + (Z : MultiplicityAwareSymmetricZeros) (f : Test) + (S : Finset ℕ) {i : ℕ} (hi : i ∈ S) {R q : ℝ} + (hrest : ‖∑ j ∈ S.erase i, symmetricZeroPairTerm Z f j‖ ≤ R) + (htarget : (symmetricZeroPairTerm Z f i).re < q - R) : + (symmetricZeroFinsetSum Z f S).re < q := by + let rest : ℂ := ∑ j ∈ S.erase i, symmetricZeroPairTerm Z f j + have hrestRe : rest.re ≤ R := + (Complex.re_le_norm rest).trans hrest + have hsplit : + rest + symmetricZeroPairTerm Z f i = + symmetricZeroFinsetSum Z f S := by + exact S.sum_erase_add (fun j ↦ symmetricZeroPairTerm Z f j) hi + rw [← hsplit] + rw [Complex.add_re] + linarith + +/-- If one selected orbit is more negative than a norm bound for all remaining +selected orbits, then the whole finite spectral sum is negative. -/ +theorem symmetricZeroFinsetSum_re_neg_of_target + (Z : MultiplicityAwareSymmetricZeros) (f : Test) + (S : Finset ℕ) {i : ℕ} (hi : i ∈ S) {R : ℝ} + (hrest : ‖∑ j ∈ S.erase i, symmetricZeroPairTerm Z f j‖ ≤ R) + (htarget : (symmetricZeroPairTerm Z f i).re < -R) : + (symmetricZeroFinsetSum Z f S).re < 0 := by + apply symmetricZeroFinsetSum_re_lt_of_target Z f S hi hrest + simpa using htarget + +/-- The unconditional regularized value selected by absolute summability. -/ +def symmetricZeroRegularized + (Z : MultiplicityAwareSymmetricZeros) (f : Test) : ℂ := + ∑' n, symmetricZeroPairTerm Z f n + +/-- Under the explicit summability hypothesis, symmetric finite truncations +converge to the selected multiplicity-aware regularization. -/ +theorem symmetricZeroPartialSum_tendsto + (Z : MultiplicityAwareSymmetricZeros) (f : Test) + (hsum : Summable (symmetricZeroPairTerm Z f)) : + Tendsto (symmetricZeroPartialSum Z f) atTop + (𝓝 (symmetricZeroRegularized Z f)) := by + exact hsum.hasSum.tendsto_sum_nat + +/-- Limiting separation from a uniform residual-spectrum bound. A fixed +negative margin survives passage from finite symmetric truncations to the +normally summed spectral value. -/ +theorem symmetricZeroRegularized_re_neg_of_tail_domination + (Z : MultiplicityAwareSymmetricZeros) (f : Test) (i : ℕ) + {R ε : ℝ} (hε : 0 < ε) + (hsum : Summable (symmetricZeroPairTerm Z f)) + (htarget : (symmetricZeroPairTerm Z f i).re < -ε - R) + (hrest : ∀ᶠ N in atTop, + i ∈ Finset.range N ∧ + ‖∑ j ∈ (Finset.range N).erase i, + symmetricZeroPairTerm Z f j‖ ≤ R) : + (symmetricZeroRegularized Z f).re < 0 := by + have hfinite : ∀ᶠ N in atTop, + (symmetricZeroPartialSum Z f N).re < -ε := by + filter_upwards [hrest] with N hN + change (symmetricZeroFinsetSum Z f (Finset.range N)).re < -ε + apply symmetricZeroFinsetSum_re_lt_of_target Z f (Finset.range N) + hN.1 hN.2 + linarith + have hlim : + Tendsto (fun N ↦ (symmetricZeroPartialSum Z f N).re) atTop + (𝓝 (symmetricZeroRegularized Z f).re) := + Complex.continuous_re.tendsto + (symmetricZeroRegularized Z f) |>.comp + (symmetricZeroPartialSum_tendsto Z f hsum) + have hle : (symmetricZeroRegularized Z f).re ≤ -ε := + le_of_tendsto hlim (hfinite.mono fun _ h ↦ h.le) + linarith + +/-- Absolute summability makes the regularized zero value invariant under +every bijective re-enumeration. This does not manufacture an enumeration of +zeta zeros or prove the required summability. -/ +theorem symmetricZeroRegularized_reindex + (Z : MultiplicityAwareSymmetricZeros) (f : Test) + (hsum : Summable (symmetricZeroPairTerm Z f)) (e : ℕ ≃ ℕ) : + ∑' n, symmetricZeroPairTerm Z f (e n) = + symmetricZeroRegularized Z f := by + have hreindexed : Summable (fun n ↦ symmetricZeroPairTerm Z f (e n)) := + e.summable_iff.mpr hsum + exact hreindexed.hasSum.tsum_eq.trans <| + (e.hasSum_iff.mpr hsum.hasSum).tsum_eq.trans <| by + rfl + +/-- Normal convergence of the multiplicity-aware orbit series. This is +strictly stronger than the classical conditionally regularized zero sum. -/ +def ZeroOrbitNormallyConvergent + (Z : MultiplicityAwareSymmetricZeros) (f : Test) : Prop := + Summable (fun n ↦ ‖symmetricZeroPairTerm Z f n‖) + +/-- Total norm mass of all spectral orbits except one selected index. -/ +def residualOrbitNormMass + (Z : MultiplicityAwareSymmetricZeros) (f : Test) (i : ℕ) : ℝ := + ∑' j, if j = i then 0 else ‖symmetricZeroPairTerm Z f j‖ + +theorem ZeroOrbitNormallyConvergent.summable + {Z : MultiplicityAwareSymmetricZeros} {f : Test} + (h : ZeroOrbitNormallyConvergent Z f) : + Summable (symmetricZeroPairTerm Z f) := + summable_norm_iff.mp h + +theorem ZeroOrbitNormallyConvergent.residual_summable + {Z : MultiplicityAwareSymmetricZeros} {f : Test} + (h : ZeroOrbitNormallyConvergent Z f) (i : ℕ) : + Summable (fun j ↦ if j = i then 0 else + ‖symmetricZeroPairTerm Z f j‖) := by + apply h.of_nonneg_of_le + · intro j + split_ifs <;> positivity + · intro j + split_ifs <;> simp + +/-- Normal convergence gives a truncation-independent residual bound after +removing one selected orbit. -/ +theorem ZeroOrbitNormallyConvergent.norm_sum_erase_le_residual + {Z : MultiplicityAwareSymmetricZeros} {f : Test} + (h : ZeroOrbitNormallyConvergent Z f) (i N : ℕ) : + ‖∑ j ∈ (Finset.range N).erase i, symmetricZeroPairTerm Z f j‖ ≤ + residualOrbitNormMass Z f i := by + let r : ℕ → ℝ := fun j ↦ if j = i then 0 else + ‖symmetricZeroPairTerm Z f j‖ + have hrsum : Summable r := h.residual_summable i + calc + ‖∑ j ∈ (Finset.range N).erase i, symmetricZeroPairTerm Z f j‖ ≤ + ∑ j ∈ (Finset.range N).erase i, + ‖symmetricZeroPairTerm Z f j‖ := norm_sum_le _ _ + _ = ∑ j ∈ (Finset.range N).erase i, r j := by + apply Finset.sum_congr rfl + intro j hj + dsimp [r] + rw [if_neg (Finset.ne_of_mem_erase hj)] + _ ≤ ∑' j, r j := + hrsum.sum_le_tsum _ fun j hj ↦ by positivity + _ = residualOrbitNormMass Z f i := rfl + +/-- A summable count-times-decay majorant bounds the complete residual norm +mass away from a selected orbit. -/ +theorem ZeroOrbitNormallyConvergent.residualOrbitNormMass_le + {Z : MultiplicityAwareSymmetricZeros} {f : Test} + (h : ZeroOrbitNormallyConvergent Z f) (i : ℕ) + (majorant : ℕ → ℝ) (hmajorant : Summable majorant) + (hnonneg : ∀ j, 0 ≤ majorant j) + (hbound : ∀ j, j ≠ i → + ‖symmetricZeroPairTerm Z f j‖ ≤ majorant j) : + residualOrbitNormMass Z f i ≤ ∑' j, majorant j := by + apply (h.residual_summable i).tsum_le_tsum + · intro j + split_ifs with hj + · exact hnonneg j + · exact hbound j hj + · exact hmajorant + +/-- A selected orbit whose negative real contribution strictly dominates the +total norm mass of every other orbit separates the full normally convergent +spectrum. -/ +theorem symmetricZeroRegularized_re_neg_of_selected_dominates + (Z : MultiplicityAwareSymmetricZeros) (f : Test) (i : ℕ) + (hnormal : ZeroOrbitNormallyConvergent Z f) + (htarget : (symmetricZeroPairTerm Z f i).re < + -residualOrbitNormMass Z f i) : + (symmetricZeroRegularized Z f).re < 0 := by + let R : ℝ := residualOrbitNormMass Z f i + let ε : ℝ := (-R - (symmetricZeroPairTerm Z f i).re) / 2 + have hε : 0 < ε := by + dsimp [ε, R] + linarith + apply symmetricZeroRegularized_re_neg_of_tail_domination + Z f i (R := R) (ε := ε) hε hnormal.summable + · dsimp [ε, R] + linarith + · filter_upwards [eventually_gt_atTop i] with N hN + exact ⟨Finset.mem_range.mpr hN, + hnormal.norm_sum_erase_le_residual i N⟩ + +theorem symmetricZeroRegularized_re_neg_of_selected_dominates_majorant + (Z : MultiplicityAwareSymmetricZeros) (f : Test) (i : ℕ) + (hnormal : ZeroOrbitNormallyConvergent Z f) + (majorant : ℕ → ℝ) (hmajorant : Summable majorant) + (hnonneg : ∀ j, 0 ≤ majorant j) + (hbound : ∀ j, j ≠ i → + ‖symmetricZeroPairTerm Z f j‖ ≤ majorant j) + (htarget : (symmetricZeroPairTerm Z f i).re < -(∑' j, majorant j)) : + (symmetricZeroRegularized Z f).re < 0 := by + apply symmetricZeroRegularized_re_neg_of_selected_dominates Z f i hnormal + exact htarget.trans_le (neg_le_neg + (hnormal.residualOrbitNormMass_le i majorant hmajorant hnonneg hbound)) + +/-- A summable radial/counting majorant is sufficient for normal zero-orbit +convergence. Instantiating this requires zero-count and transform-decay +bounds absent from the pinned zeta API. -/ +theorem ZeroOrbitNormallyConvergent.of_bound + {Z : MultiplicityAwareSymmetricZeros} {f : Test} + (majorant : ℕ → ℝ) (hmajorant : Summable majorant) + (hbound : ∀ n, ‖symmetricZeroPairTerm Z f n‖ ≤ majorant n) : + ZeroOrbitNormallyConvergent Z f := + hmajorant.of_nonneg_of_le (fun _ ↦ norm_nonneg _) hbound + +/-- A partition of multiplicity-aware zero orbits into finite height shells. -/ +structure ZeroOrbitShells where + shell : ℕ → Finset ℕ + unique_shell : ∀ i, ∃! k, i ∈ shell k + +/-- The weakest shell-count/transform-decay summability theorem used by this +route. A summable product of shell cardinality and a per-zero decay bound +implies normal convergence of the full orbit series. -/ +theorem ZeroOrbitNormallyConvergent.of_shell_count_decay + {Z : MultiplicityAwareSymmetricZeros} {f : Test} + (S : ZeroOrbitShells) (decay : ℕ → ℝ) + (hcountDecay : Summable fun k ↦ (S.shell k).card * decay k) + (hterm : ∀ k i, i ∈ S.shell k → + ‖symmetricZeroPairTerm Z f i‖ ≤ decay k) : + ZeroOrbitNormallyConvergent Z f := by + classical + rw [ZeroOrbitNormallyConvergent] + rw [summable_partition (fun i ↦ norm_nonneg (symmetricZeroPairTerm Z f i)) + S.unique_shell] + constructor + · intro k + exact Summable.of_finite + · apply hcountDecay.of_nonneg_of_le + · intro k + exact tsum_nonneg fun _ ↦ norm_nonneg _ + · intro k + rw [tsum_fintype] + calc + ∑ i : {i // i ∈ S.shell k}, ‖symmetricZeroPairTerm Z f i‖ + ≤ ∑ _i : {i // i ∈ S.shell k}, decay k := + Finset.sum_le_sum fun i _ ↦ hterm k i i.property + _ = (S.shell k).card * decay k := by simp + +/-- Multiplicity-weighted version of shell-count decay. This is the form +compatible with Riemann--von Mangoldt, which counts zeros with multiplicity. -/ +theorem ZeroOrbitNormallyConvergent.of_shell_mass_decay + {Z : MultiplicityAwareSymmetricZeros} {f : Test} + (S : ZeroOrbitShells) (mass : ℕ → ℕ) (decay : ℕ → ℝ) + (hmassDecay : Summable fun k ↦ + (∑ i ∈ S.shell k, mass i : ℕ) * decay k) + (hterm : ∀ k i, i ∈ S.shell k → + ‖symmetricZeroPairTerm Z f i‖ ≤ mass i * decay k) : + ZeroOrbitNormallyConvergent Z f := by + classical + rw [ZeroOrbitNormallyConvergent] + rw [summable_partition (fun i ↦ norm_nonneg (symmetricZeroPairTerm Z f i)) + S.unique_shell] + constructor + · intro k + exact Summable.of_finite + · apply hmassDecay.of_nonneg_of_le + · intro k + exact tsum_nonneg fun _ ↦ norm_nonneg _ + · intro k + rw [tsum_fintype] + calc + ∑ i : {i // i ∈ S.shell k}, ‖symmetricZeroPairTerm Z f i‖ + ≤ ∑ i : {i // i ∈ S.shell k}, mass i * decay k := + Finset.sum_le_sum fun i _ ↦ hterm k i i.property + _ = (∑ i ∈ S.shell k, mass i : ℕ) * decay k := by + push_cast + rw [Finset.sum_mul] + simpa using + (Finset.sum_attach (S.shell k) + (fun i ↦ (mass i : ℝ) * decay k)) + +/-- Exact quantitative zeta-zero input requested from Riemann--von Mangoldt. +The statement is deliberately packaged as an obligation: pinned Mathlib does +not prove it. Spectral points are centered by `ρ = 1/2 + z`, shells are unit +height intervals, and the shell count includes multiplicity. The quadratic +bound is a convenient weakening of the sourced `O(T log T)` estimate. -/ +structure ZetaZeroShellCountObligation + (Z : MultiplicityAwareSymmetricZeros) (S : ZeroOrbitShells) where + isZetaZero : ∀ i, riemannZeta ((1 / 2 : ℂ) + Z.representative i) = 0 + partnerIsZetaZero : ∀ i, + riemannZeta ((1 / 2 : ℂ) - star (Z.representative i)) = 0 + coversNontrivialZeros : ∀ ρ, + riemannZeta ρ = 0 → 0 < ρ.re → ρ.re < 1 → + ∃ i, ρ = (1 / 2 : ℂ) + Z.representative i ∨ + ρ = (1 / 2 : ℂ) - star (Z.representative i) + shell_by_height : ∀ k i, + i ∈ S.shell k ↔ + (k : ℝ) ≤ |(Z.representative i).im| ∧ + |(Z.representative i).im| < (k : ℝ) + 1 + constant : ℝ + constant_nonneg : 0 ≤ constant + multiplicity_count_le : ∀ k, + (∑ i ∈ S.shell k, Z.multiplicity i : ℕ) ≤ + constant * (k + 2 : ℝ) ^ 2 + +/-- Under RH, the two zeta-zero equations in the shell obligation force every +centered representative onto the imaginary axis. The partner equation rules +out trivial negative-even zeros without adding a separate nontriviality +field. -/ +theorem ZetaZeroShellCountObligation.representative_re_zero_of_rh + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) (hRH : RiemannHypothesis) (i : ℕ) : + (Z.representative i).re = 0 := by + let ρ : ℂ := (1 / 2 : ℂ) + Z.representative i + have hρzero : riemannZeta ρ = 0 := H.isZetaZero i + have hρtrivial : ¬∃ n : ℕ, ρ = -2 * (n + 1) := by + rintro ⟨n, hn⟩ + have hρre : ρ.re = -2 * ((n : ℝ) + 1) := by + simpa [ρ] using congrArg Complex.re hn + have hpartnerRe : + 1 ≤ ((1 / 2 : ℂ) - star (Z.representative i)).re := by + dsimp [ρ] at hρre + norm_num at hρre ⊢ + nlinarith [show 0 ≤ (n : ℝ) from Nat.cast_nonneg n] + exact + (riemannZeta_ne_zero_of_one_le_re hpartnerRe) + (H.partnerIsZetaZero i) + have hρone : ρ ≠ 1 := by + intro h + rw [h] at hρzero + exact riemannZeta_one_ne_zero hρzero + have hline := hRH ρ hρzero hρtrivial hρone + dsimp [ρ] at hline + norm_num at hline + linarith + +/-- Exact multiplicity-aware Riemann--von Mangoldt theorem statement needed by +the route. This is an obligation, not an asserted theorem: `zeroCount N` +counts the modeled positive-height nontrivial zeros with multiplicity, and +the shell relation connects that count to the formal orbit enumeration. -/ +structure RiemannVonMangoldtExplicitObligation + (Z : MultiplicityAwareSymmetricZeros) (S : ZeroOrbitShells) where + zeroCount : ℕ → ℕ + shell_le_zeroCount : ∀ k N, k < N → + (∑ i ∈ S.shell k, Z.multiplicity i : ℕ) ≤ zeroCount N + explicit_bound : ∀ N : ℕ, 3 ≤ N → + |(zeroCount N : ℝ) - riemannVonMangoldtMain N| ≤ + riemannVonMangoldtError N + +/-- The exact Riemann--von Mangoldt obligation gives a unit-shell upper bound +with no asymptotic simplification. -/ +theorem RiemannVonMangoldtExplicitObligation.shell_count_le + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : RiemannVonMangoldtExplicitObligation Z S) (k : ℕ) : + (∑ i ∈ S.shell k, Z.multiplicity i : ℕ) ≤ + riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3) := by + have hs : (∑ i ∈ S.shell k, Z.multiplicity i : ℕ) ≤ H.zeroCount (k + 3) := + H.shell_le_zeroCount k (k + 3) (by omega) + have hb := H.explicit_bound (k + 3) (by omega) + have hb' : + |(H.zeroCount (k + 3) : ℝ) - + riemannVonMangoldtMain ((k : ℝ) + 3)| ≤ + riemannVonMangoldtError ((k : ℝ) + 3) := by + simpa [Nat.cast_add] using hb + calc + (∑ i ∈ S.shell k, Z.multiplicity i : ℕ) ≤ (H.zeroCount (k + 3) : ℝ) := by + exact_mod_cast hs + _ = ((H.zeroCount (k + 3) : ℝ) - + riemannVonMangoldtMain (k + 3)) + + riemannVonMangoldtMain (k + 3) := by ring + _ ≤ riemannVonMangoldtError (k + 3) + + riemannVonMangoldtMain (k + 3) := by + gcongr + exact (le_abs_self _).trans hb' + _ = riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3) := add_comm _ _ + +/-- Exact-source version of the normal-convergence reduction. The only +remaining analytic input is summability of the explicit count envelope times +the chosen strip-uniform transform decay. -/ +theorem RiemannVonMangoldtExplicitObligation.normalConvergence + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : RiemannVonMangoldtExplicitObligation Z S) {f : Test} + (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + (riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3)) * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k i, i ∈ S.shell k → + ‖symmetricZeroPairTerm Z f i‖ ≤ Z.multiplicity i * decay k) : + ZeroOrbitNormallyConvergent Z f := by + apply ZeroOrbitNormallyConvergent.of_shell_mass_decay + S Z.multiplicity decay + · apply hseries.of_nonneg_of_le + · intro k + exact mul_nonneg (Nat.cast_nonneg _) (hdecay k) + · intro k + exact mul_le_mul_of_nonneg_right (H.shell_count_le k) (hdecay k) + · exact hterm + +/-- A sourced multiplicity shell count plus any summable shell-uniform +transform envelope yields convergence of the actual multiplicity-weighted +orbit terms. -/ +theorem ZetaZeroShellCountObligation.normalConvergence + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) {f : Test} (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k i, i ∈ S.shell k → + ‖symmetricZeroPairTerm Z f i‖ ≤ Z.multiplicity i * decay k) : + ZeroOrbitNormallyConvergent Z f := by + apply ZeroOrbitNormallyConvergent.of_shell_mass_decay + S Z.multiplicity decay + · apply hseries.of_nonneg_of_le + · intro k + exact mul_nonneg (Nat.cast_nonneg _) (hdecay k) + · intro k + exact mul_le_mul_of_nonneg_right (H.multiplicity_count_le k) (hdecay k) + · exact hterm + +/-- Every convergent real series has an arbitrarily small shifted tail. This +is the quantitative finite-to-limit step used after annihilating finitely many +zero orbits. -/ +theorem exists_tsum_nat_add_lt_of_summable + {u : ℕ → ℝ} (hu : Summable u) {ε : ℝ} (hε : 0 < ε) : + ∃ N, ∑' k, u (k + N) < ε := by + have hnhds : + Set.Ioo ((∑' k, u k) - ε) ((∑' k, u k) + ε) ∈ + 𝓝 (∑' k, u k) := + Ioo_mem_nhds (by linarith) (by linarith) + rcases (hu.hasSum.tendsto_sum_nat.eventually hnhds).exists with ⟨N, hN⟩ + refine ⟨N, ?_⟩ + have hsplit := hu.sum_add_tsum_nat_add N + linarith + +/-- The published explicit Riemann--von Mangoldt envelope, once supplied for +the actual Mathlib zero count, has an arbitrarily small count-times-decay +tail. -/ +theorem ActualRiemannVonMangoldtBound.exists_envelope_tail_lt + (H : ActualRiemannVonMangoldtBound) (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + (riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3)) * decay k) + {ε : ℝ} (hε : 0 < ε) : + ∃ N, ∑' k : ℕ, + (riemannVonMangoldtMain ((k + N + 3 : ℕ) : ℝ) + + riemannVonMangoldtError ((k + N + 3 : ℕ) : ℝ)) * + decay (k + N) < ε := by + simpa [Nat.cast_add] using + exists_tsum_nat_add_lt_of_summable hseries hε + +/-- Actual multiplicity-weighted unit-shell decay is bounded by the published +main-plus-error envelope. -/ +theorem ActualRiemannVonMangoldtBound.shell_weighted_decay_le + (H : ActualRiemannVonMangoldtBound) (decay : ℕ → ℝ) + (hdecay : ∀ k, 0 ≤ decay k) (k : ℕ) : + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im + then (zetaZeroMultiplicity z : ℝ) * decay k else 0) ≤ + (riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3)) * decay k := by + have heq : + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im + then (zetaZeroMultiplicity z : ℝ) * decay k else 0) = + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im + then (zetaZeroMultiplicity z : ℝ) else 0) * decay k := by + rw [Finset.sum_mul] + apply Finset.sum_congr rfl + intro z hz + split_ifs <;> simp + rw [heq] + have hcast : + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im + then (zetaZeroMultiplicity z : ℝ) else 0) ≤ + riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3) := by + exact_mod_cast H.shell_count_le k + exact mul_le_mul_of_nonneg_right hcast (hdecay k) + +/-- The exact sourced RvM envelope is summable against fourth-power vertical +decay, with no extra summability hypothesis. -/ +theorem ActualRiemannVonMangoldtBound.summable_fourthPower_envelope + (H : ActualRiemannVonMangoldtBound) (C : ℝ) (hC : 0 ≤ C) : + Summable fun k : ℕ ↦ + (riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3)) * + (C / ((k : ℝ) + 2) ^ 4) := by + have hp : Summable fun k : ℕ ↦ 1 / (k : ℝ) ^ 2 := + (Real.summable_one_div_nat_pow (p := 2)).2 (by norm_num) + have hp' : Summable fun k : ℕ ↦ 1 / ((k + 2 : ℕ) : ℝ) ^ 2 := + (summable_nat_add_iff 2).2 hp + have hmajor : Summable fun k : ℕ ↦ + 12 * C * (1 / ((k : ℝ) + 2) ^ 2) := by + simpa [Nat.cast_add] using hp'.mul_left (12 * C) + apply hmajor.of_nonneg_of_le + · intro k + have henv0 : 0 ≤ riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3) := by + exact (Nat.cast_nonneg + (∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im then zetaZeroMultiplicity z else 0)).trans + (H.shell_count_le k) + exact mul_nonneg henv0 (div_nonneg hC (by positivity)) + · intro k + have henv := riemannVonMangoldtMain_add_error_le_quadratic + (T := (k : ℝ) + 3) (by + have hk : (0 : ℝ) ≤ k := Nat.cast_nonneg k + linarith) + have hk : (0 : ℝ) < (k : ℝ) + 2 := by positivity + have hratio : + 3 * ((k : ℝ) + 3) ^ 2 * + (C / ((k : ℝ) + 2) ^ 4) ≤ + 12 * C * (1 / ((k : ℝ) + 2) ^ 2) := by + have hsq : ((k : ℝ) + 3) ^ 2 ≤ + 4 * ((k : ℝ) + 2) ^ 2 := by nlinarith + rw [div_eq_mul_inv] + field_simp + nlinarith + exact (mul_le_mul_of_nonneg_right henv + (div_nonneg hC (by positivity))).trans hratio + +/-- Published RvM plus fourth-power transform decay gives a tail below any +positive fraction, in particular below a selected multiplicity. -/ +theorem ActualRiemannVonMangoldtBound.exists_fourthPower_tail_lt + (H : ActualRiemannVonMangoldtBound) (C : ℝ) (hC : 0 ≤ C) + {ε : ℝ} (hε : 0 < ε) : + ∃ N, ∑' k : ℕ, + (riemannVonMangoldtMain ((k + N + 3 : ℕ) : ℝ) + + riemannVonMangoldtError ((k + N + 3 : ℕ) : ℝ)) * + (C / (((k + N : ℕ) : ℝ) + 2) ^ 4) < ε := + H.exists_envelope_tail_lt + (fun k ↦ C / ((k : ℝ) + 2) ^ 4) + (H.summable_fourthPower_envelope C hC) hε + +/-- Actual multiplicity-weighted mass in the positive-height unit shell +`(k+2,k+3]`, for a prescribed per-zero decay envelope. -/ +def actualZetaZeroShellWeightedMass (decay : ℕ → ℝ) (k : ℕ) : ℝ := + ∑ z ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < z.im + then (zetaZeroMultiplicity z : ℝ) * decay k else 0 + +/-- The sourced RvM estimate reduces the complete actual-zero tail to the +main-plus-error envelope. This is the quantitative count-to-tail bridge; it +does not supply the separate interpolation-conditioning estimate. -/ +theorem ActualRiemannVonMangoldtBound.exists_actual_shell_tail_lt + (H : ActualRiemannVonMangoldtBound) (decay : ℕ → ℝ) + (hdecay : ∀ k, 0 ≤ decay k) + (hseries : Summable fun k : ℕ ↦ + (riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3)) * decay k) + {ε : ℝ} (hε : 0 < ε) : + ∃ N, Summable (fun k : ℕ ↦ + actualZetaZeroShellWeightedMass decay (k + N)) ∧ + ∑' k : ℕ, actualZetaZeroShellWeightedMass decay (k + N) < ε := by + rcases H.exists_envelope_tail_lt decay hseries hε with ⟨N, hN⟩ + let A : ℕ → ℝ := actualZetaZeroShellWeightedMass decay + let E : ℕ → ℝ := fun k ↦ + (riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3)) * decay k + have hA_nonneg : ∀ k, 0 ≤ A k := by + intro k + dsimp [A, actualZetaZeroShellWeightedMass] + exact Finset.sum_nonneg fun _ _ ↦ by + split_ifs + · exact mul_nonneg (Nat.cast_nonneg _) (hdecay k) + · exact le_rfl + have hAE : ∀ k, A k ≤ E k := by + intro k + exact H.shell_weighted_decay_le decay hdecay k + have hEshift : Summable fun k : ℕ ↦ E (k + N) := + (summable_nat_add_iff N).mpr hseries + have hAshift : Summable fun k : ℕ ↦ A (k + N) := + hEshift.of_nonneg_of_le (fun k ↦ hA_nonneg (k + N)) + (fun k ↦ hAE (k + N)) + refine ⟨N, hAshift, ?_⟩ + calc + ∑' k : ℕ, A (k + N) ≤ ∑' k : ℕ, E (k + N) := + hAshift.tsum_le_tsum (fun k ↦ hAE (k + N)) hEshift + _ < ε := by simpa [E, Nat.cast_add] using hN + +/-- Actual analytic-multiplicity mass of a test transform in one +positive-height zeta shell, centered at `ρ - 1/2`. -/ +def actualZetaZeroTransformShellMass (f : Test) (k : ℕ) : ℝ := + ∑ ρ ∈ positiveNontrivialZetaZeroWindowFinset (k + 3), + if (k + 2 : ℝ) < ρ.im then + (zetaZeroMultiplicity ρ : ℝ) * + ‖transform f (ρ - (1 / 2 : ℂ))‖ + else 0 + +/-- Fourth-power strip decay bounds every actual zeta-zero transform shell by +the corresponding multiplicity-weighted decay mass. -/ +theorem actualZetaZeroTransformShellMass_le + (f : Test) (k : ℕ) : + actualZetaZeroTransformShellMass f k ≤ + actualZetaZeroShellWeightedMass + (fun j ↦ stripTransformDecayConstant f 4 / + ((j : ℝ) + 2) ^ 4) k := by + dsimp [actualZetaZeroTransformShellMass, + actualZetaZeroShellWeightedMass] + apply Finset.sum_le_sum + intro ρ hρ + split_ifs with hk + · have hρdata := + (mem_positiveNontrivialZetaZeroWindowFinset.mp hρ) + have hstrip : + (ρ - (1 / 2 : ℂ)).re ∈ Set.Icc (-1 / 2 : ℝ) (1 / 2) := by + norm_num + constructor <;> linarith [hρdata.2.2.2.1, hρdata.2.2.2.2] + have hdecay := + norm_transform_centered_strip_im_pow_le_explicit f 4 hstrip + have him : (ρ - (1 / 2 : ℂ)).im = ρ.im := by norm_num + rw [him, abs_of_pos hρdata.2.1] at hdecay + have hk0 : (0 : ℝ) ≤ (k : ℝ) + 2 := by positivity + have hpow : + ((k : ℝ) + 2) ^ 4 ≤ ρ.im ^ 4 := + pow_le_pow_left₀ hk0 hk.le 4 + have hscaled : + ((k : ℝ) + 2) ^ 4 * + ‖transform f (ρ - (1 / 2 : ℂ))‖ ≤ + stripTransformDecayConstant f 4 := + (mul_le_mul_of_nonneg_right hpow (norm_nonneg _)).trans hdecay + have htransform : + ‖transform f (ρ - (1 / 2 : ℂ))‖ ≤ + stripTransformDecayConstant f 4 / ((k : ℝ) + 2) ^ 4 := + (le_div_iff₀ (pow_pos (by positivity) 4)).2 <| by + simpa [mul_comm] using hscaled + exact mul_le_mul_of_nonneg_left htransform (Nat.cast_nonneg _) + · exact le_rfl + +/-- For every fixed compactly supported smooth test, actual RvM makes its +complete positive-height transform tail smaller than any prescribed positive +margin. Multiplicity is included in the finite shell sums. -/ +theorem ActualRiemannVonMangoldtBound.exists_actual_transform_tail_lt + (H : ActualRiemannVonMangoldtBound) (f : Test) + {ε : ℝ} (hε : 0 < ε) : + ∃ N, Summable (fun k : ℕ ↦ + actualZetaZeroTransformShellMass f (k + N)) ∧ + ∑' k : ℕ, actualZetaZeroTransformShellMass f (k + N) < ε := by + let C := stripTransformDecayConstant f 4 + let decay : ℕ → ℝ := fun k ↦ C / ((k : ℝ) + 2) ^ 4 + have hC : 0 ≤ C := by + have h := norm_transform_centered_strip_im_pow_le_explicit + f 4 (z := (0 : ℂ)) (by norm_num) + simpa [C] using h + have hseries : Summable fun k : ℕ ↦ + (riemannVonMangoldtMain (k + 3) + + riemannVonMangoldtError (k + 3)) * decay k := + H.summable_fourthPower_envelope C hC + rcases H.exists_actual_shell_tail_lt decay + (fun k ↦ div_nonneg hC (by positivity)) hseries hε with + ⟨N, hweighted, hweightedTail⟩ + have hmass_nonneg : ∀ k, 0 ≤ actualZetaZeroTransformShellMass f k := by + intro k + dsimp [actualZetaZeroTransformShellMass] + exact Finset.sum_nonneg fun _ _ ↦ by + split_ifs <;> positivity + have hmass_le : ∀ k, + actualZetaZeroTransformShellMass f k ≤ + actualZetaZeroShellWeightedMass decay k := by + intro k + exact actualZetaZeroTransformShellMass_le f k + have hmass : Summable fun k : ℕ ↦ + actualZetaZeroTransformShellMass f (k + N) := + hweighted.of_nonneg_of_le (fun k ↦ hmass_nonneg (k + N)) + (fun k ↦ hmass_le (k + N)) + refine ⟨N, hmass, ?_⟩ + exact (hmass.tsum_le_tsum (fun k ↦ hmass_le (k + N)) hweighted).trans_lt + hweightedTail + +/-- In particular, the actual multiplicity-aware distant tail can be made +strictly smaller than any positive selected multiplicity. -/ +theorem ActualRiemannVonMangoldtBound.exists_actual_transform_tail_lt_multiplicity + (H : ActualRiemannVonMangoldtBound) (f : Test) + (m : ℕ) (hm : 0 < m) : + ∃ N, Summable (fun k : ℕ ↦ + actualZetaZeroTransformShellMass f (k + N)) ∧ + ∑' k : ℕ, actualZetaZeroTransformShellMass f (k + N) < m := + H.exists_actual_transform_tail_lt f (by exact_mod_cast hm) + +/-- Riemann--von Mangoldt shell counts turn a pointwise transform envelope +into a quantitative bound for the norm mass of one complete shell. -/ +theorem ZetaZeroShellCountObligation.shell_norm_sum_le + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) {f : Test} + (decay : ℕ → ℝ) (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k i, i ∈ S.shell k → + ‖symmetricZeroPairTerm Z f i‖ ≤ Z.multiplicity i * decay k) + (k : ℕ) : + ∑ i ∈ S.shell k, ‖symmetricZeroPairTerm Z f i‖ ≤ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k := by + calc + ∑ i ∈ S.shell k, ‖symmetricZeroPairTerm Z f i‖ ≤ + ∑ i ∈ S.shell k, Z.multiplicity i * decay k := + Finset.sum_le_sum fun i hi ↦ hterm k i hi + _ = (∑ i ∈ S.shell k, Z.multiplicity i : ℕ) * decay k := by + push_cast + rw [Finset.sum_mul] + _ ≤ H.constant * ((k : ℝ) + 2) ^ 2 * decay k := + mul_le_mul_of_nonneg_right (H.multiplicity_count_le k) (hdecay k) + +/-- The sourced quadratic shell count and a summable transform envelope give +an explicit height cutoff beyond which the total envelope is below any +prescribed positive margin. -/ +theorem ZetaZeroShellCountObligation.exists_envelope_tail_lt + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + {ε : ℝ} (hε : 0 < ε) : + ∃ N, ∑' k : ℕ, + H.constant * (((k + N : ℕ) : ℝ) + 2) ^ 2 * decay (k + N) < ε := by + simpa [Nat.cast_add] using + exists_tsum_nat_add_lt_of_summable hseries hε + +set_option maxHeartbeats 800000 in +/-- The complete residual orbit mass is bounded directly by the sourced +count-times-decay shell envelope. -/ +theorem ZetaZeroShellCountObligation.residualOrbitNormMass_le + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) {f : Test} (i : ℕ) + (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k j, j ∈ S.shell k → + ‖symmetricZeroPairTerm Z f j‖ ≤ Z.multiplicity j * decay k) : + residualOrbitNormMass Z f i ≤ + ∑' k : ℕ, H.constant * ((k : ℝ) + 2) ^ 2 * decay k := by + let g : ℕ → ℝ := fun j ↦ if j = i then 0 else + ‖symmetricZeroPairTerm Z f j‖ + let e := Set.sigmaEquiv (fun k ↦ (S.shell k : Set ℕ)) S.unique_shell + have hnormal : ZeroOrbitNormallyConvergent Z f := + H.normalConvergence decay hseries hdecay hterm + have hg : Summable g := hnormal.residual_summable i + have hge : Summable (fun p ↦ g (e p)) := + e.summable_iff.mpr hg + calc + residualOrbitNormMass Z f i = ∑' j, g j := rfl + _ = ∑' p, g (e p) := (e.tsum_eq g).symm + _ = ∑' k, ∑' j : {j // j ∈ S.shell k}, g j := + hge.tsum_sigma + _ ≤ ∑' k : ℕ, H.constant * ((k : ℝ) + 2) ^ 2 * decay k := by + apply hge.sigma.tsum_le_tsum + · intro k + rw [tsum_fintype] + calc + ∑ j : {j // j ∈ S.shell k}, g j ≤ + ∑ j : {j // j ∈ S.shell k}, + ‖symmetricZeroPairTerm Z f j‖ := by + apply Finset.sum_le_sum + intro j hj + dsimp [g] + split_ifs <;> simp + _ = ∑ j ∈ S.shell k, ‖symmetricZeroPairTerm Z f j‖ := by + simpa using (Finset.sum_attach (S.shell k) + (fun j ↦ ‖symmetricZeroPairTerm Z f j‖)) + _ ≤ H.constant * ((k : ℝ) + 2) ^ 2 * decay k := + H.shell_norm_sum_le decay hdecay hterm k + · exact hseries + +set_option maxHeartbeats 800000 in +/-- Residual-only shell estimate. The selected orbit is excluded from the +pointwise envelope, avoiding the impossible requirement that a negative term +dominate a majorant which already contains its own norm. -/ +theorem ZetaZeroShellCountObligation.residualOrbitNormMass_le_excluding + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) {f : Test} (i : ℕ) + (hnormal : ZeroOrbitNormallyConvergent Z f) + (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k j, j ∈ S.shell k → j ≠ i → + ‖symmetricZeroPairTerm Z f j‖ ≤ Z.multiplicity j * decay k) : + residualOrbitNormMass Z f i ≤ + ∑' k : ℕ, H.constant * ((k : ℝ) + 2) ^ 2 * decay k := by + let g : ℕ → ℝ := fun j ↦ if j = i then 0 else + ‖symmetricZeroPairTerm Z f j‖ + let e := Set.sigmaEquiv (fun k ↦ (S.shell k : Set ℕ)) S.unique_shell + have hg : Summable g := hnormal.residual_summable i + have hge : Summable (fun p ↦ g (e p)) := + e.summable_iff.mpr hg + calc + residualOrbitNormMass Z f i = ∑' j, g j := rfl + _ = ∑' p, g (e p) := (e.tsum_eq g).symm + _ = ∑' k, ∑' j : {j // j ∈ S.shell k}, g j := + hge.tsum_sigma + _ ≤ ∑' k : ℕ, H.constant * ((k : ℝ) + 2) ^ 2 * decay k := by + apply hge.sigma.tsum_le_tsum + · intro k + rw [tsum_fintype] + calc + ∑ j : {j // j ∈ S.shell k}, g j ≤ + ∑ j : {j // j ∈ S.shell k}, + Z.multiplicity j * decay k := by + apply Finset.sum_le_sum + intro j hj + dsimp [g] + split_ifs with hji + · exact mul_nonneg (Nat.cast_nonneg _) (hdecay k) + · exact hterm k j j.property hji + _ = (∑ j : {j // j ∈ S.shell k}, + (Z.multiplicity j : ℝ)) * decay k := by + rw [Finset.sum_mul] + _ = (∑ j ∈ S.shell k, Z.multiplicity j : ℕ) * decay k := by + push_cast + congr 1 + simpa using (Finset.sum_attach (S.shell k) + (fun j ↦ (Z.multiplicity j : ℝ))) + _ ≤ H.constant * ((k : ℝ) + 2) ^ 2 * decay k := + mul_le_mul_of_nonneg_right (H.multiplicity_count_le k) (hdecay k) + · exact hseries + +/-- Corrected infinite separation criterion with a residual-only envelope. -/ +theorem ZetaZeroShellCountObligation.symmetricZeroRegularized_re_neg_excluding + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) (f : Test) (i : ℕ) + (hnormal : ZeroOrbitNormallyConvergent Z f) + (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k j, j ∈ S.shell k → j ≠ i → + ‖symmetricZeroPairTerm Z f j‖ ≤ Z.multiplicity j * decay k) + (htarget : (symmetricZeroPairTerm Z f i).re < + -(∑' k : ℕ, H.constant * ((k : ℝ) + 2) ^ 2 * decay k)) : + (symmetricZeroRegularized Z f).re < 0 := by + apply symmetricZeroRegularized_re_neg_of_selected_dominates Z f i hnormal + exact htarget.trans_le (neg_le_neg + (H.residualOrbitNormMass_le_excluding i hnormal decay + hseries hdecay hterm)) + +/-- Infinite matrix-free separator theorem. Local neighbors are removed by +finite-difference zero factors; only the residual shell envelope must be +smaller than the exact selected mass `2 * multiplicity`. -/ +theorem ZetaZeroShellCountObligation.localPairSeparator_regularized_re_neg + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) (i : ℕ) + (a : ℝ) (nearby : List ℂ) + (hfixed : Z.fixedBySymmetry i = false) + (hz : LocalSeparatorGap a (Z.representative i) + (-star (Z.representative i) :: nearby)) + (hpartner : LocalSeparatorGap a (-star (Z.representative i)) + (Z.representative i :: nearby)) + (hnormal : ZeroOrbitNormallyConvergent Z + (convolution (localPairSeparator a (Z.representative i) nearby) + (involution (localPairSeparator a (Z.representative i) nearby)))) + (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k j, j ∈ S.shell k → j ≠ i → + ‖symmetricZeroPairTerm Z + (convolution (localPairSeparator a (Z.representative i) nearby) + (involution (localPairSeparator a (Z.representative i) nearby))) j‖ ≤ + Z.multiplicity j * decay k) + (htail : (∑' k : ℕ, + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) < + 2 * (Z.multiplicity i : ℝ)) : + (symmetricZeroRegularized Z + (convolution (localPairSeparator a (Z.representative i) nearby) + (involution (localPairSeparator a (Z.representative i) nearby)))).re < 0 := by + apply H.symmetricZeroRegularized_re_neg_excluding + _ i hnormal decay hseries hdecay hterm + rw [localPairSeparator_selectedPairTerm Z i a nearby hfixed hz hpartner] + norm_num + exact htail + +/-- Conditional contradiction with a genuine Guinand--Weil identity and +nonnegative arithmetic side, specialized to the constructed local square. -/ +theorem ZetaZeroShellCountObligation.localPairSeparator_contradicts_formula + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) (i : ℕ) + (a : ℝ) (nearby : List ℂ) + (hfixed : Z.fixedBySymmetry i = false) + (hz : LocalSeparatorGap a (Z.representative i) + (-star (Z.representative i) :: nearby)) + (hpartner : LocalSeparatorGap a (-star (Z.representative i)) + (Z.representative i :: nearby)) + (hnormal : ZeroOrbitNormallyConvergent Z + (convolution (localPairSeparator a (Z.representative i) nearby) + (involution (localPairSeparator a (Z.representative i) nearby)))) + (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k j, j ∈ S.shell k → j ≠ i → + ‖symmetricZeroPairTerm Z + (convolution (localPairSeparator a (Z.representative i) nearby) + (involution (localPairSeparator a (Z.representative i) nearby))) j‖ ≤ + Z.multiplicity j * decay k) + (htail : (∑' k : ℕ, + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) < + 2 * (Z.multiplicity i : ℝ)) + (arithmeticSide : ℂ) + (hformula : symmetricZeroRegularized Z + (convolution (localPairSeparator a (Z.representative i) nearby) + (involution (localPairSeparator a (Z.representative i) nearby))) = + arithmeticSide) + (harithmetic : 0 ≤ arithmeticSide.re) : + False := by + have hneg := H.localPairSeparator_regularized_re_neg i a nearby + hfixed hz hpartner hnormal decay hseries hdecay hterm htail + rw [hformula] at hneg + linarith + +/-- Actual finite-to-limit off-critical separation criterion: a sourced shell +count, a summable rapid-decay envelope, and one selected negative orbit imply +negative total regularized spectral value. Finite interpolation is used to +make the envelope small on the finitely many unselected low shells. -/ +theorem ZetaZeroShellCountObligation.symmetricZeroRegularized_re_neg + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) (f : Test) (i : ℕ) + (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k j, j ∈ S.shell k → + ‖symmetricZeroPairTerm Z f j‖ ≤ Z.multiplicity j * decay k) + (htarget : (symmetricZeroPairTerm Z f i).re < + -(∑' k : ℕ, H.constant * ((k : ℝ) + 2) ^ 2 * decay k)) : + (symmetricZeroRegularized Z f).re < 0 := by + have hnormal : ZeroOrbitNormallyConvergent Z f := + H.normalConvergence decay hseries hdecay hterm + apply symmetricZeroRegularized_re_neg_of_selected_dominates Z f i hnormal + exact htarget.trans_le (neg_le_neg + (H.residualOrbitNormMass_le i decay hseries hdecay hterm)) + +/-- A fourth-power transform envelope is summable against the quadratic shell +count weakening of Riemann--von Mangoldt. -/ +theorem summable_quadratic_shell_fourth_power_decay (C : ℝ) : + Summable fun k : ℕ ↦ + C * ((k : ℝ) + 2) ^ 2 * (1 / ((k : ℝ) + 2) ^ 4) := by + have hp : Summable fun k : ℕ ↦ 1 / (k : ℝ) ^ 2 := + (Real.summable_one_div_nat_pow (p := 2)).2 (by norm_num) + have hp' : Summable fun k : ℕ ↦ 1 / ((k + 2 : ℕ) : ℝ) ^ 2 := + (summable_nat_add_iff 2).2 hp + apply (hp'.mul_left C).congr + intro k + norm_num [Nat.cast_add] + field_simp + +/-- The sourced quadratic shell bound reduces zeta-zero normal convergence to +a uniform fourth-power vertical transform estimate on each shell. -/ +theorem ZetaZeroShellCountObligation.normalConvergence_of_fourthPower + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) {f : Test} + (hterm : ∀ k i, i ∈ S.shell k → + ‖symmetricZeroPairTerm Z f i‖ ≤ + Z.multiplicity i * (1 / ((k : ℝ) + 2) ^ 4)) : + ZeroOrbitNormallyConvergent Z f := by + apply H.normalConvergence (fun k ↦ 1 / ((k : ℝ) + 2) ^ 4) + · exact summable_quadratic_shell_fourth_power_decay H.constant + · intro k + positivity + · exact hterm + +/-- An arbitrary sequence of finite orbit windows exhausting all indices. +Because indices already represent complete symmetry orbits, no extra +partner-closure condition is required. -/ +structure SymmetricZeroWindows where + window : ℕ → Finset ℕ + exhausts : Tendsto window atTop atTop + +def symmetricZeroWindowSum + (Z : MultiplicityAwareSymmetricZeros) (W : SymmetricZeroWindows) + (f : Test) (N : ℕ) : ℂ := + ∑ n ∈ W.window N, symmetricZeroPairTerm Z f n + +/-- Every exhausting finite-window scheme has the same limit under normal +convergence. -/ +theorem symmetricZeroWindowSum_tendsto + (Z : MultiplicityAwareSymmetricZeros) (W : SymmetricZeroWindows) + (f : Test) (hnormal : ZeroOrbitNormallyConvergent Z f) : + Tendsto (symmetricZeroWindowSum Z W f) atTop + (𝓝 (symmetricZeroRegularized Z f)) := by + exact hnormal.summable.hasSum.comp W.exhausts + +/-- Concrete zeta-zero regularization consequence under the sourced +multiplicity shell-count obligation and an explicit shell-uniform transform +envelope. The zero-count field is not asserted by this theorem. -/ +theorem symmetricZeroWindowSum_tendsto_of_zetaShellCount + (Z : MultiplicityAwareSymmetricZeros) (S : ZeroOrbitShells) + (H : ZetaZeroShellCountObligation Z S) (W : SymmetricZeroWindows) + (f : Test) (decay : ℕ → ℝ) + (hseries : Summable fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + (hdecay : ∀ k, 0 ≤ decay k) + (hterm : ∀ k i, i ∈ S.shell k → + ‖symmetricZeroPairTerm Z f i‖ ≤ Z.multiplicity i * decay k) : + Tendsto (symmetricZeroWindowSum Z W f) atTop + (𝓝 (symmetricZeroRegularized Z f)) := by + exact symmetricZeroWindowSum_tendsto Z W f <| + H.normalConvergence decay hseries hdecay hterm + +/-- Two arbitrary exhausting symmetric-window schemes become asymptotically +independent under normal convergence. -/ +theorem symmetricZeroWindows_difference_tendsto_zero + (Z : MultiplicityAwareSymmetricZeros) (W V : SymmetricZeroWindows) + (f : Test) (hnormal : ZeroOrbitNormallyConvergent Z f) : + Tendsto + (fun N ↦ symmetricZeroWindowSum Z W f N - + symmetricZeroWindowSum Z V f N) + atTop (𝓝 0) := by + simpa using + (symmetricZeroWindowSum_tendsto Z W f hnormal).sub + (symmetricZeroWindowSum_tendsto Z V f hnormal) + +/-- Concrete data for a finite-zero/finite-prime explicit-formula stage. +`IsExactAt` below records the analytic equality; no convergence is built in. -/ +structure FiniteFormulaData (ι κ : Type*) [Fintype ι] [Fintype κ] where + zeros : ι → ℂ + primeWeight : κ → ℂ + primeLogLocation : κ → ℝ + poleTerm : Test → ℂ + archimedeanTerm : Test → ℂ + +def FiniteFormulaData.arithmeticSide + {ι κ : Type*} [Fintype ι] [Fintype κ] (D : FiniteFormulaData ι κ) (f : Test) : ℂ := + D.poleTerm f - finitePrimePowerSum D.primeWeight D.primeLogLocation f - + D.archimedeanTerm f + +/-- The exact, deliberately local finite explicit-formula hypothesis. -/ +def FiniteFormulaData.IsExactAt + {ι κ : Type*} [Fintype ι] [Fintype κ] (D : FiniteFormulaData ι κ) (f : Test) : Prop := + finiteZeroSum D.zeros f = D.arithmeticSide f + +/-- An exact finite Guinand--Weil stage transfers a negative separating +spectral value to the complete finite arithmetic side, including its +prime-power, pole, and archimedean terms. -/ +theorem FiniteFormulaData.arithmeticSide_re_neg_of_exact + {ι κ : Type*} [Fintype ι] [Fintype κ] + (D : FiniteFormulaData ι κ) (f : Test) + (hexact : D.IsExactAt f) (hneg : (finiteZeroSum D.zeros f).re < 0) : + (D.arithmeticSide f).re < 0 := by + rw [← hexact] + exact hneg + +/-- A restricted admissible datum in the honest half-plane `re s > 1`. +The prime side is the actual Mathlib-normalized smoothed von Mangoldt series. +The zero, pole, and archimedean series carry explicit summability hypotheses, +and `stageFormula` records the finite identity to be established by analysis +for a concrete subclass. -/ +structure RestrictedExplicitFormulaData + (Z : MultiplicityAwareSymmetricZeros) (s : ℂ) where + test : Test + primeWeight : PrimeSmoothingWeight + poleTerm : ℕ → ℂ + archimedeanTerm : ℕ → ℂ + zeroSummable : Summable (symmetricZeroPairTerm Z test) + poleSummable : Summable poleTerm + archimedeanSummable : Summable archimedeanTerm + stageFormula : ∀ N, + symmetricZeroPartialSum Z test N = + (∑ n ∈ Finset.range N, poleTerm n) - + (∑ n ∈ Finset.range N, smoothedVonMangoldtTerm s primeWeight n) - + (∑ n ∈ Finset.range N, archimedeanTerm n) + +/-- On the restricted admissible subclass, the finite formula and the stated +summability obligations imply the limiting explicit formula. No universal +test-space criterion or continuation to the critical strip is inferred. -/ +theorem RestrictedExplicitFormulaData.explicitFormula + {Z : MultiplicityAwareSymmetricZeros} {s : ℂ} + (D : RestrictedExplicitFormulaData Z s) (hs : 1 < s.re) : + symmetricZeroRegularized Z D.test = + (∑' n, D.poleTerm n) - + smoothedVonMangoldtSeries s D.primeWeight - + (∑' n, D.archimedeanTerm n) := by + apply tendsto_nhds_unique (symmetricZeroPartialSum_tendsto Z D.test D.zeroSummable) + have hpole := D.poleSummable.hasSum.tendsto_sum_nat + have hprime := (smoothedVonMangoldt_summable hs D.primeWeight).hasSum.tendsto_sum_nat + have harch := D.archimedeanSummable.hasSum.tendsto_sum_nat + exact ((hpole.sub hprime).sub harch).congr' <| + Eventually.of_forall fun N ↦ (D.stageFormula N).symm + +/-- Sharper restricted Guinand--Weil limit package. Its prime target is the +actual negative zeta logarithmic derivative, its archimedean target is the +actual `Γℝ` logarithmic derivative, and its zero windows are +multiplicity-aware. Only the finite stage formula and analytic convergence +inputs remain fields. -/ +structure RestrictedGuinandWeilLimitData + (Z : MultiplicityAwareSymmetricZeros) (s : ℂ) where + test : Test + zeroWindows : SymmetricZeroWindows + zeroNormal : ZeroOrbitNormallyConvergent Z test + primeSmoothing : ℕ → PrimeSmoothingWeight + primeSmoothing_tendsto : + ∀ n, Tendsto (fun k ↦ (primeSmoothing k).coeff n) atTop (𝓝 1) + poleStage : ℕ → ℂ + poleLimit : ℂ + pole_tendsto : Tendsto poleStage atTop (𝓝 poleLimit) + archimedean : ArchimedeanGammaApproximation s + stageFormula : ∀ N, + symmetricZeroWindowSum Z zeroWindows test N = + poleStage N - + smoothedVonMangoldtSeries s (primeSmoothing N) - + archimedean.stage N + +/-- All algebraic and limit-combination parts of the restricted +Guinand--Weil formula. This theorem does not provide the finite-stage +identity, normal convergence of zeta zeros, or a Gamma approximation. -/ +theorem RestrictedGuinandWeilLimitData.explicitFormula + {Z : MultiplicityAwareSymmetricZeros} {s : ℂ} + (D : RestrictedGuinandWeilLimitData Z s) (hs : 1 < s.re) : + symmetricZeroRegularized Z D.test = + D.poleLimit - + (-deriv riemannZeta s / riemannZeta s) - + archimedeanLogDeriv s := by + apply tendsto_nhds_unique + (symmetricZeroWindowSum_tendsto Z D.zeroWindows D.test D.zeroNormal) + exact + ((D.pole_tendsto.sub + (smoothedVonMangoldtSeries_tendsto_logDeriv hs D.primeSmoothing + D.primeSmoothing_tendsto)).sub D.archimedean.tendsto).congr' <| + Eventually.of_forall fun N ↦ (D.stageFormula N).symm + +/-- A sharper restricted package replacing abstract zero normal convergence by +finite shell counts and a summable count-times-decay majorant. -/ +structure RestrictedGuinandWeilShellData + (Z : MultiplicityAwareSymmetricZeros) (s : ℂ) where + test : Test + zeroWindows : SymmetricZeroWindows + zeroShells : ZeroOrbitShells + zeroDecay : ℕ → ℝ + zeroCountDecaySummable : + Summable fun k ↦ (zeroShells.shell k).card * zeroDecay k + zeroTermBound : ∀ k i, i ∈ zeroShells.shell k → + ‖symmetricZeroPairTerm Z test i‖ ≤ zeroDecay k + primeSmoothing : ℕ → PrimeSmoothingWeight + primeSmoothing_tendsto : + ∀ n, Tendsto (fun k ↦ (primeSmoothing k).coeff n) atTop (𝓝 1) + poleStage : ℕ → ℂ + poleLimit : ℂ + pole_tendsto : Tendsto poleStage atTop (𝓝 poleLimit) + archimedean : ArchimedeanGammaApproximation s + stageFormula : ∀ N, + symmetricZeroWindowSum Z zeroWindows test N = + poleStage N - + smoothedVonMangoldtSeries s (primeSmoothing N) - + archimedean.stage N + +/-- Strongest restricted explicit formula currently obtained: shell-count and +transform-decay hypotheses discharge zero regularization, while the existing +prime, pole, and archimedean limits discharge every limit-combination step. -/ +theorem RestrictedGuinandWeilShellData.explicitFormula + {Z : MultiplicityAwareSymmetricZeros} {s : ℂ} + (D : RestrictedGuinandWeilShellData Z s) (hs : 1 < s.re) : + symmetricZeroRegularized Z D.test = + D.poleLimit - + (-deriv riemannZeta s / riemannZeta s) - + archimedeanLogDeriv s := by + let L : RestrictedGuinandWeilLimitData Z s := + { test := D.test + zeroWindows := D.zeroWindows + zeroNormal := ZeroOrbitNormallyConvergent.of_shell_count_decay + D.zeroShells D.zeroDecay D.zeroCountDecaySummable D.zeroTermBound + primeSmoothing := D.primeSmoothing + primeSmoothing_tendsto := D.primeSmoothing_tendsto + poleStage := D.poleStage + poleLimit := D.poleLimit + pole_tendsto := D.pole_tendsto + archimedean := D.archimedean + stageFormula := D.stageFormula } + exact L.explicitFormula hs + +/-- Spectral energy of finitely many ordinates on the critical line. -/ +def finiteCriticalEnergy {ι : Type*} [Fintype ι] (ordinate : ι → ℝ) (f : Test) : ℝ := + ∑ i, normSq (transform f (ordinate i * I)) + +theorem finiteCriticalEnergy_nonneg + {ι : Type*} [Fintype ι] (ordinate : ι → ℝ) (f : Test) : + 0 ≤ finiteCriticalEnergy ordinate f := by + exact Finset.sum_nonneg fun i _ ↦ normSq_nonneg _ + +/-- The critical-line convolution-square transform factorization is fully +proved from Mathlib's Fourier convolution theorem. -/ +theorem transform_convolution_involution_imaginary + (f : Test) (ξ : ℝ) : + transform (convolution f (involution f)) (-2 * Real.pi * ξ * I) = + (normSq (transform f (-2 * Real.pi * ξ * I)) : ℂ) := by + rw [transform_imaginary_eq_fourier] + change 𝓕 (fun x : ℝ ↦ convolution f (involution f) x) ξ = _ + have hf : Integrable (f : ℝ → ℂ) := + f.continuous.integrable_of_hasCompactSupport f.hasCompactSupport + have hi : Integrable (involution f : ℝ → ℂ) := + (involution f).continuous.integrable_of_hasCompactSupport + (involution f).hasCompactSupport + have hconv : + (fun x : ℝ ↦ convolution f (involution f) x) = + MeasureTheory.convolution f (involution f) + (ContinuousLinearMap.mul ℂ ℂ) volume := by + funext x + apply integral_congr_ae + filter_upwards with t + rfl + rw [hconv, Real.fourier_mul_convolution_eq hf hi f.continuous + (involution f).continuous] + have htf : + 𝓕 (f : ℝ → ℂ) ξ = transform f (-2 * Real.pi * ξ * I) := by + calc + _ = 𝓕 (toSchwartz f) ξ := by congr 2 + _ = _ := (transform_imaginary_eq_fourier f ξ).symm + have hti : + 𝓕 (involution f : ℝ → ℂ) ξ = + transform (involution f) (-2 * Real.pi * ξ * I) := by + calc + _ = 𝓕 (toSchwartz (involution f)) ξ := by congr 2 + _ = _ := (transform_imaginary_eq_fourier (involution f) ξ).symm + rw [htf, hti, transform_involution_imaginary] + simpa only [starRingEnd_apply] using + Complex.mul_conj (transform f (-2 * Real.pi * ξ * I)) + +/-- Equivalent pure-imaginary parametrization of the proved +convolution-square factorization. -/ +theorem transform_convolution_involution_pureImaginary + (f : Test) (y : ℝ) : + transform (convolution f (involution f)) (y * I) = + (normSq (transform f (y * I)) : ℂ) := by + have h := transform_convolution_involution_imaginary + f (-y / (2 * Real.pi)) + have hz : + -2 * (Real.pi : ℂ) * ((-y / (2 * Real.pi) : ℝ) : ℂ) * I = + (y : ℂ) * I := by + push_cast + field_simp [Real.pi_ne_zero] + rwa [hz] at h + +/-- Exact finite positivity identity under the local convolution-transform +factorization hypothesis. This isolates the analytic theorem still needed +to derive the hypothesis from Fubini and the chosen normalization. -/ +theorem finiteZeroSum_convolution_eq_energy + {ι : Type*} [Fintype ι] (ordinate : ι → ℝ) (f : Test) + (hfactor : ∀ i, + transform (convolution f (involution f)) (ordinate i * I) = + (normSq (transform f (ordinate i * I)) : ℂ)) : + (finiteZeroSum (fun i ↦ ordinate i * I) (convolution f (involution f))).re = + finiteCriticalEnergy ordinate f := by + simp only [finiteZeroSum, finiteCriticalEnergy] + rw [Complex.re_sum] + apply Finset.sum_congr rfl + intro i _ + rw [hfactor i] + simp + +theorem finiteZeroSum_convolution_nonneg + {ι : Type*} [Fintype ι] (ordinate : ι → ℝ) (f : Test) + (hfactor : ∀ i, + transform (convolution f (involution f)) (ordinate i * I) = + (normSq (transform f (ordinate i * I)) : ℂ)) : + 0 ≤ (finiteZeroSum (fun i ↦ ordinate i * I) + (convolution f (involution f))).re := by + rw [finiteZeroSum_convolution_eq_energy ordinate f hfactor] + exact finiteCriticalEnergy_nonneg ordinate f + +/-- The finite critical-line energy identity no longer needs a factorization +hypothesis: it follows from the proved Fourier theorem. -/ +theorem finiteZeroSum_convolution_eq_energy_exact + {ι : Type*} [Fintype ι] (ordinate : ι → ℝ) (f : Test) : + (finiteZeroSum (fun i ↦ ordinate i * I) + (convolution f (involution f))).re = + finiteCriticalEnergy ordinate f := + finiteZeroSum_convolution_eq_energy ordinate f fun i ↦ + transform_convolution_involution_pureImaginary f (ordinate i) + +theorem finiteZeroSum_convolution_nonneg_exact + {ι : Type*} [Fintype ι] (ordinate : ι → ℝ) (f : Test) : + 0 ≤ (finiteZeroSum (fun i ↦ ordinate i * I) + (convolution f (involution f))).re := by + rw [finiteZeroSum_convolution_eq_energy_exact] + exact finiteCriticalEnergy_nonneg ordinate f + +/-- Restricted infinite positivity criterion: if every modeled symmetry orbit +is fixed (hence lies on the centered critical line) and the convolution-square +zero series is normally convergent, then its regularized real part is +nonnegative. This is one direction only and does not assert RH. -/ +theorem symmetricZeroRegularized_convolution_nonneg + (Z : MultiplicityAwareSymmetricZeros) (f : Test) + (hfixed : ∀ n, Z.fixedBySymmetry n = true) + (hnormal : ZeroOrbitNormallyConvergent Z (convolution f (involution f))) : + 0 ≤ (symmetricZeroRegularized Z (convolution f (involution f))).re := by + rw [symmetricZeroRegularized, Complex.re_tsum hnormal.summable] + apply tsum_nonneg + intro n + have hzfixed := Z.fixed_spec n (hfixed n) + have hzre : (Z.representative n).re = 0 := by + have : (Z.representative n).re = -(Z.representative n).re := by + simpa using congrArg Complex.re hzfixed + linarith + have hz : Z.representative n = (Z.representative n).im * I := by + apply Complex.ext + · simp [hzre] + · simp + rw [symmetricZeroPairTerm, if_pos (hfixed n), hz, + transform_convolution_involution_pureImaginary] + simpa using + (mul_nonneg (show 0 ≤ (Z.multiplicity n : ℝ) from Nat.cast_nonneg _) + (normSq_nonneg (transform f ((Z.representative n).im * I)))) + +/-- The orbit metadata need not mark critical-line points as fixed: +if every representative is purely imaginary, both the fixed and paired +branches are nonnegative (the paired branch is twice the same energy). -/ +theorem symmetricZeroRegularized_convolution_nonneg_of_re_zero + (Z : MultiplicityAwareSymmetricZeros) (f : Test) + (hre : ∀ n, (Z.representative n).re = 0) + (hnormal : ZeroOrbitNormallyConvergent Z (convolution f (involution f))) : + 0 ≤ (symmetricZeroRegularized Z (convolution f (involution f))).re := by + rw [symmetricZeroRegularized, Complex.re_tsum hnormal.summable] + apply tsum_nonneg + intro n + have hz : Z.representative n = (Z.representative n).im * I := by + apply Complex.ext + · simp [hre n] + · simp + have hpartner : -star (Z.representative n) = Z.representative n := by + rw [hz] + apply Complex.ext <;> simp + rw [symmetricZeroPairTerm] + split_ifs + · rw [hz, transform_convolution_involution_pureImaginary] + simpa using + (mul_nonneg (show 0 ≤ (Z.multiplicity n : ℝ) from Nat.cast_nonneg _) + (normSq_nonneg (transform f ((Z.representative n).im * I)))) + · rw [hpartner, hz, transform_convolution_involution_pureImaginary] + have hm : 0 ≤ (Z.multiplicity n : ℝ) := Nat.cast_nonneg _ + have he : 0 ≤ normSq (transform f ((Z.representative n).im * I)) := + normSq_nonneg _ + simpa using mul_nonneg hm (add_nonneg he he) + +/-- Positivity of the normally convergent zero-orbit functional on every +convolution square. This isolates the spectral part of the converse Weil +criterion from the prime/pole/Gamma identity. -/ +def ZeroOrbitConvolutionSquarePositive + (Z : MultiplicityAwareSymmetricZeros) : Prop := + ∀ f : Test, ZeroOrbitNormallyConvergent Z (convolution f (involution f)) → + 0 ≤ (symmetricZeroRegularized Z (convolution f (involution f))).re + +/-- Exact all-test separation input needed for the converse: every modeled +off-critical orbit must be detectable by a normally convergent convolution +square with negative total spectral value. This is deliberately stronger +than point-separation of transforms, because all other zero orbits remain in +the regularized sum. -/ +def ConvolutionSquaresSeparateOffCriticalOrbits + (Z : MultiplicityAwareSymmetricZeros) : Prop := + ∀ i : ℕ, (Z.representative i).re ≠ 0 → + ∃ f : Test, + ZeroOrbitNormallyConvergent Z (convolution f (involution f)) ∧ + (symmetricZeroRegularized Z (convolution f (involution f))).re < 0 + +/-- The nondegenerate separation condition only asks to detect orbits carrying +positive multiplicity. -/ +def ConvolutionSquaresSeparatePositiveOffCriticalOrbits + (Z : MultiplicityAwareSymmetricZeros) : Prop := + ∀ i : ℕ, 0 < Z.multiplicity i → (Z.representative i).re ≠ 0 → + ∃ f : Test, + ZeroOrbitNormallyConvergent Z (convolution f (involution f)) ∧ + (symmetricZeroRegularized Z (convolution f (involution f))).re < 0 + +/-- Exact quantitative diagonal-selection condition remaining after finite +interpolation: the selected negative square must dominate one sourced +summable shell envelope. -/ +def RVMEnvelopeSeparatesPositiveOffCriticalOrbits + (Z : MultiplicityAwareSymmetricZeros) (S : ZeroOrbitShells) + (H : ZetaZeroShellCountObligation Z S) : Prop := + ∀ i : ℕ, 0 < Z.multiplicity i → (Z.representative i).re ≠ 0 → + ∃ f : Test, ∃ decay : ℕ → ℝ, + Summable (fun k : ℕ ↦ + H.constant * ((k : ℝ) + 2) ^ 2 * decay k) ∧ + (∀ k, 0 ≤ decay k) ∧ + (∀ k j, j ∈ S.shell k → + ‖symmetricZeroPairTerm Z (convolution f (involution f)) j‖ ≤ + Z.multiplicity j * decay k) ∧ + (symmetricZeroPairTerm Z (convolution f (involution f)) i).re < + -(∑' k : ℕ, H.constant * ((k : ℝ) + 2) ^ 2 * decay k) + +/-- The quantitative RvM envelope condition produces actual infinite +off-critical convolution-square separators. -/ +theorem ZetaZeroShellCountObligation.convolutionSquaresSeparate + {Z : MultiplicityAwareSymmetricZeros} {S : ZeroOrbitShells} + (H : ZetaZeroShellCountObligation Z S) + (hsep : RVMEnvelopeSeparatesPositiveOffCriticalOrbits Z S H) : + ConvolutionSquaresSeparatePositiveOffCriticalOrbits Z := by + intro i hmult hoff + rcases hsep i hmult hoff with + ⟨f, decay, hseries, hdecay, hterm, htarget⟩ + refine ⟨f, H.normalConvergence decay hseries hdecay hterm, ?_⟩ + exact H.symmetricZeroRegularized_re_neg + (convolution f (involution f)) i decay hseries hdecay hterm htarget + +/-- The converse spectral implication, with its separation hypothesis made +explicit: positivity forces every modeled representative onto the centered +critical line. -/ +theorem representative_re_zero_of_convolutionSquarePositive + (Z : MultiplicityAwareSymmetricZeros) + (hpositive : ZeroOrbitConvolutionSquarePositive Z) + (hseparate : ConvolutionSquaresSeparateOffCriticalOrbits Z) : + ∀ i, (Z.representative i).re = 0 := by + intro i + by_contra hi + rcases hseparate i hi with ⟨f, hnormal, hneg⟩ + exact (not_lt_of_ge (hpositive f hnormal)) hneg + +theorem representative_re_zero_of_positiveMultiplicity_separation + (Z : MultiplicityAwareSymmetricZeros) + (hmult : ∀ i, 0 < Z.multiplicity i) + (hpositive : ZeroOrbitConvolutionSquarePositive Z) + (hseparate : ConvolutionSquaresSeparatePositiveOffCriticalOrbits Z) : + ∀ i, (Z.representative i).re = 0 := by + intro i + by_contra hi + rcases hseparate i (hmult i) hi with ⟨f, hnormal, hneg⟩ + exact (not_lt_of_ge (hpositive f hnormal)) hneg + +/-- Exact converse assembly from a genuine Guinand--Weil identity, arithmetic +positivity, and the quantitative RvM envelope separator. The theorem adds no +formula or zero-count assumption silently. -/ +theorem representative_re_zero_of_explicitFormula_and_rvmEnvelope + (Z : MultiplicityAwareSymmetricZeros) (S : ZeroOrbitShells) + (H : ZetaZeroShellCountObligation Z S) + (hmult : ∀ i, 0 < Z.multiplicity i) + (arithmeticSide : Test → ℂ) + (hformula : ∀ f : Test, + ZeroOrbitNormallyConvergent Z (convolution f (involution f)) → + symmetricZeroRegularized Z (convolution f (involution f)) = + arithmeticSide f) + (harithmetic : ∀ f : Test, 0 ≤ (arithmeticSide f).re) + (hsep : RVMEnvelopeSeparatesPositiveOffCriticalOrbits Z S H) : + ∀ i, (Z.representative i).re = 0 := by + apply representative_re_zero_of_positiveMultiplicity_separation Z hmult + · intro f hnormal + rw [hformula f hnormal] + exact harithmetic f + · exact H.convolutionSquaresSeparate hsep + +/-- Exact conditional converse theorem for the actual zeta function. The +formula/positivity and quantitative separator hypotheses first force every +modeled representative onto the centered critical line; exact orbit +completeness then turns this into Mathlib's global `RiemannHypothesis`. -/ +theorem riemannHypothesis_of_exactActualOrbits_explicitFormula_and_rvmEnvelope + (Z : MultiplicityAwareSymmetricZeros) (S : ZeroOrbitShells) + (Hexact : ExactActualZetaOrbitModel Z) + (hloc : NontrivialZetaZerosInCriticalStrip) + (H : ZetaZeroShellCountObligation Z S) + (hmult : ∀ i, 0 < Z.multiplicity i) + (arithmeticSide : Test → ℂ) + (hformula : ∀ f : Test, + ZeroOrbitNormallyConvergent Z (convolution f (involution f)) → + symmetricZeroRegularized Z (convolution f (involution f)) = + arithmeticSide f) + (harithmetic : ∀ f : Test, 0 ≤ (arithmeticSide f).re) + (hsep : RVMEnvelopeSeparatesPositiveOffCriticalOrbits Z S H) : + RiemannHypothesis := + Hexact.riemannHypothesis_of_representatives hloc + (representative_re_zero_of_explicitFormula_and_rvmEnvelope + Z S H hmult arithmeticSide hformula harithmetic hsep) + +/-- The same exact converse with the former strip-classification hypothesis +discharged by `nontrivialZetaZerosInCriticalStrip`. -/ +theorem riemannHypothesis_of_exactActualOrbits_formula_rvm + (Z : MultiplicityAwareSymmetricZeros) (S : ZeroOrbitShells) + (Hexact : ExactActualZetaOrbitModel Z) + (H : ZetaZeroShellCountObligation Z S) + (hmult : ∀ i, 0 < Z.multiplicity i) + (arithmeticSide : Test → ℂ) + (hformula : ∀ f : Test, + ZeroOrbitNormallyConvergent Z (convolution f (involution f)) → + symmetricZeroRegularized Z (convolution f (involution f)) = + arithmeticSide f) + (harithmetic : ∀ f : Test, 0 ≤ (arithmeticSide f).re) + (hsep : RVMEnvelopeSeparatesPositiveOffCriticalOrbits Z S H) : + RiemannHypothesis := + riemannHypothesis_of_exactActualOrbits_explicitFormula_and_rvmEnvelope + Z S Hexact nontrivialZetaZerosInCriticalStrip H hmult arithmeticSide + hformula harithmetic hsep + +/-- A deliberately degenerate orbit model showing that pointwise transform +normalization is not by itself a separation theorem. The existing orbit +interface permits zero multiplicities. -/ +def zeroMultiplicityOffCriticalModel : MultiplicityAwareSymmetricZeros where + representative _ := 1 + multiplicity _ := 0 + fixedBySymmetry _ := false + fixed_spec n h := by simp at h + +theorem pointNormalization_without_positiveMultiplicity_counterexample : + (zeroMultiplicityOffCriticalModel.representative 0).re ≠ 0 ∧ + transform + (pointNormalizedTest (zeroMultiplicityOffCriticalModel.representative 0)) + (zeroMultiplicityOffCriticalModel.representative 0) = 1 ∧ + ¬ ConvolutionSquaresSeparateOffCriticalOrbits + zeroMultiplicityOffCriticalModel := by + constructor + · norm_num [zeroMultiplicityOffCriticalModel] + constructor + · exact transform_pointNormalizedTest_self _ + · intro h + rcases h 0 (by norm_num [zeroMultiplicityOffCriticalModel]) with + ⟨f, _hnormal, hneg⟩ + have hzero : + symmetricZeroRegularized zeroMultiplicityOffCriticalModel + (convolution f (involution f)) = 0 := by + rw [symmetricZeroRegularized] + have hterm : + (fun n ↦ symmetricZeroPairTerm zeroMultiplicityOffCriticalModel + (convolution f (involution f)) n) = 0 := by + funext n + simp [symmetricZeroPairTerm, zeroMultiplicityOffCriticalModel] + rw [hterm] + exact hasSum_zero.tsum_eq + rw [hzero] at hneg + norm_num at hneg + +/-- Restricted infinite-formula positivity: shell count-times-decay +summability and the finite stage formula are combined by +`RestrictedGuinandWeilShellData`; if every modeled orbit is on the critical +line and the selected test is a convolution square, the resulting arithmetic +side has nonnegative real part. -/ +theorem RestrictedGuinandWeilShellData.explicitFormula_re_nonneg + {Z : MultiplicityAwareSymmetricZeros} {s : ℂ} + (D : RestrictedGuinandWeilShellData Z s) (hs : 1 < s.re) + (f : Test) (htest : D.test = convolution f (involution f)) + (hfixed : ∀ n, Z.fixedBySymmetry n = true) : + 0 ≤ (D.poleLimit - + (-deriv riemannZeta s / riemannZeta s) - + archimedeanLogDeriv s).re := by + rw [← D.explicitFormula hs] + rw [htest] + apply symmetricZeroRegularized_convolution_nonneg Z f hfixed + have hn : ZeroOrbitNormallyConvergent Z D.test := + ZeroOrbitNormallyConvergent.of_shell_count_decay + D.zeroShells D.zeroDecay D.zeroCountDecaySummable D.zeroTermBound + simpa [htest] using hn + +/-- Stronger restricted positivity theorem needing only the actual +critical-line equation for representatives, not consistency of the auxiliary +fixed-orbit Boolean metadata. -/ +theorem RestrictedGuinandWeilShellData.explicitFormula_re_nonneg_of_re_zero + {Z : MultiplicityAwareSymmetricZeros} {s : ℂ} + (D : RestrictedGuinandWeilShellData Z s) (hs : 1 < s.re) + (f : Test) (htest : D.test = convolution f (involution f)) + (hre : ∀ n, (Z.representative n).re = 0) : + 0 ≤ (D.poleLimit - + (-deriv riemannZeta s / riemannZeta s) - + archimedeanLogDeriv s).re := by + rw [← D.explicitFormula hs] + rw [htest] + apply symmetricZeroRegularized_convolution_nonneg_of_re_zero Z f hre + have hn : ZeroOrbitNormallyConvergent Z D.test := + ZeroOrbitNormallyConvergent.of_shell_count_decay + D.zeroShells D.zeroDecay D.zeroCountDecaySummable D.zeroTermBound + simpa [htest] using hn + +/-- RH supplies the centered critical-line hypothesis in the strengthened +restricted formula theorem when the shell model carries the actual pair of +zeta-zero equations. -/ +theorem RestrictedGuinandWeilShellData.explicitFormula_re_nonneg_of_rh + {Z : MultiplicityAwareSymmetricZeros} {s : ℂ} + (D : RestrictedGuinandWeilShellData Z s) + (H : ZetaZeroShellCountObligation Z D.zeroShells) + (hs : 1 < s.re) (hRH : RiemannHypothesis) + (f : Test) (htest : D.test = convolution f (involution f)) : + 0 ≤ (D.poleLimit - + (-deriv riemannZeta s / riemannZeta s) - + archimedeanLogDeriv s).re := + D.explicitFormula_re_nonneg_of_re_zero hs f htest + (H.representative_re_zero_of_rh hRH) + +/-- A stage-wise explicit formula packaged entirely in the typed +distribution interface. -/ +structure FiniteExplicitStage where + spectral : Distribution + pole : Distribution + primePower : Distribution + archimedean : Distribution + formula : ∀ f, spectral.eval f = + pole.eval f - primePower.eval f - archimedean.eval f + +/-- Pointwise convergence is the topology needed for passing positivity and +the linear explicit-formula identity to a limiting distribution. -/ +def Distribution.TendsTo (Wn : ℕ → Distribution) (W : Distribution) : Prop := + ∀ f : Test, Tendsto (fun n ↦ (Wn n).eval f) atTop (𝓝 (W.eval f)) + +/-- Pointwise convergence of distributions gives pointwise convergence of +their real quadratic functionals, by continuity of `Complex.re`. -/ +theorem Distribution.TendsTo.quadratic + {Wn : ℕ → Distribution} {W : Distribution} (h : Distribution.TendsTo Wn W) + (f : Test) : + Tendsto (fun n ↦ quadratic (Wn n) f) atTop (𝓝 (quadratic W f)) := by + exact Complex.continuous_re.continuousAt.tendsto.comp + (h (convolution f (involution f))) + +theorem explicitFormula_passes_to_limit + (stage : ℕ → FiniteExplicitStage) + (spectral pole primePower archimedean : Distribution) + (hspectral : Distribution.TendsTo (fun n ↦ (stage n).spectral) spectral) + (hpole : Distribution.TendsTo (fun n ↦ (stage n).pole) pole) + (hprime : Distribution.TendsTo (fun n ↦ (stage n).primePower) primePower) + (harch : Distribution.TendsTo (fun n ↦ (stage n).archimedean) archimedean) : + ∀ f, spectral.eval f = + pole.eval f - primePower.eval f - archimedean.eval f := by + intro f + apply tendsto_nhds_unique (hspectral f) + exact ((hpole f).sub (hprime f)).sub (harch f) |>.congr' <| + Eventually.of_forall fun n ↦ ((stage n).formula f).symm + +/-! ## Positivity and monotone/pointwise limits -/ + +/-- Nonnegativity is closed under ordinary real limits. -/ +theorem nonneg_of_tendsto + (q : ℕ → ℝ) (qLimit : ℝ) + (hlimit : Tendsto q atTop (𝓝 qLimit)) (hpos : ∀ n, 0 ≤ q n) : + 0 ≤ qLimit := by + exact isClosed_Ici.mem_of_tendsto hlimit (Eventually.of_forall hpos) + +/-- Pointwise convergence of quadratic forms is enough to pass universal +positivity to the limit; uniform convergence is not required. -/ +theorem positivity_passes_to_pointwise_limit + (Q : ℕ → Test → ℝ) (Qlimit : Test → ℝ) + (hlimit : ∀ f, Tendsto (fun n ↦ Q n f) atTop (𝓝 (Qlimit f))) + (hpos : ∀ n f, 0 ≤ Q n f) : + ∀ f, 0 ≤ Qlimit f := by + intro f + exact nonneg_of_tendsto (fun n ↦ Q n f) (Qlimit f) (hlimit f) fun n ↦ hpos n f + +/-- Eventual stage positivity for each fixed test is sufficient. The cutoff +may depend on the test; neither one common cutoff nor uniform convergence on +the full test space is needed. -/ +theorem positivity_passes_to_eventual_pointwise_limit + (Q : ℕ → Test → ℝ) (Qlimit : Test → ℝ) + (hlimit : ∀ f, Tendsto (fun n ↦ Q n f) atTop (𝓝 (Qlimit f))) + (hpos : ∀ f, ∀ᶠ n in atTop, 0 ≤ Q n f) : + ∀ f, 0 ≤ Qlimit f := by + intro f + exact isClosed_Ici.mem_of_tendsto (hlimit f) (hpos f) + +/-- Uniform convergence on a selected admissible subclass implies pointwise +convergence there and hence preserves positivity on that subclass. -/ +theorem positivity_passes_to_uniform_limit_on + (Q : ℕ → Test → ℝ) (Qlimit : Test → ℝ) (S : Set Test) + (hlimit : TendstoUniformlyOn Q Qlimit atTop S) + (hpos : ∀ n f, f ∈ S → 0 ≤ Q n f) : + ∀ f ∈ S, 0 ≤ Qlimit f := by + intro f hf + exact nonneg_of_tendsto (fun n ↦ Q n f) (Qlimit f) + (hlimit.tendsto_at hf) fun n ↦ hpos n f hf + +/-- Nonnegativity of a continuous functional extends from a set to its +closure. This is the exact topological lemma needed for any dense-subclass +Weil argument. -/ +theorem nonnegative_on_closure + {α : Type*} [TopologicalSpace α] (Q : α → ℝ) (S : Set α) + (hQ : ContinuousOn Q (closure S)) + (hpos : ∀ x ∈ S, 0 ≤ Q x) : + ∀ x ∈ closure S, 0 ≤ Q x := by + intro x hx + exact le_on_closure (f := fun _ ↦ (0 : ℝ)) (g := Q) + hpos continuousOn_const hQ hx + +/-- Positivity on a dense subclass extends universally only when the target +functional is continuous in the chosen ambient topology. -/ +theorem nonnegative_of_dense + {α : Type*} [TopologicalSpace α] (Q : α → ℝ) (S : Set α) + (hS : Dense S) (hQ : Continuous Q) + (hpos : ∀ x ∈ S, 0 ≤ Q x) : + ∀ x, 0 ≤ Q x := by + intro x + apply nonnegative_on_closure Q S hQ.continuousOn hpos + rw [hS.closure_eq] + exact mem_univ x + +/-- Density alone is insufficient: a discontinuous functional may be +nonnegative on a dense subclass and negative at the omitted point. -/ +theorem dense_nonnegative_counterexample_without_continuity : + ∃ (Q : ℝ → ℝ) (S : Set ℝ), + Dense S ∧ (∀ x ∈ S, 0 ≤ Q x) ∧ ¬ 0 ≤ Q 0 := by + refine ⟨fun x ↦ if x = 0 then -1 else 0, ({0}ᶜ : Set ℝ), ?_, ?_, ?_⟩ + · exact dense_compl_singleton 0 + · intro x hx + simp only [Set.mem_compl_iff, Set.mem_singleton_iff] at hx + simp [hx] + · norm_num + +/-- Sequential form of the same closure argument, useful when density is +supplied by an explicit approximating sequence. -/ +theorem nonnegative_of_tendsto_from + {α : Type*} [TopologicalSpace α] (Q : α → ℝ) (S : Set α) + {u : ℕ → α} {x : α} + (hu : ∀ n, u n ∈ S) (hux : Tendsto u atTop (𝓝 x)) + (hQ : ContinuousAt Q x) (hpos : ∀ y ∈ S, 0 ≤ Q y) : + 0 ≤ Q x := by + exact nonneg_of_tendsto (fun n ↦ Q (u n)) (Q x) + (hQ.tendsto.comp hux) fun n ↦ hpos (u n) (hu n) + +/-- Continuity obligation for a Weil quadratic functional in Mathlib's LF +topology on test functions. Linearity of `Distribution.eval` alone does not +imply this property. -/ +def Distribution.QuadraticContinuous (W : Distribution) : Prop := + Continuous (quadratic W) + +/-- Continuity of the linear evaluation map in Mathlib's canonical LF +topology. -/ +def Distribution.EvalContinuous (W : Distribution) : Prop := + Continuous W.toLinearMap + +theorem ContinuousDistribution.toDistribution_evalContinuous + (W : ContinuousDistribution) : + W.toDistribution.EvalContinuous := + W.evalContinuous + +/-- Mathlib's source-backed LF universal property, specialized to candidate +Weil distributions: evaluation is continuous exactly when every restriction +to a fixed compact support is continuous. -/ +theorem Distribution.evalContinuous_iff_supported + (W : Distribution) : + W.EvalContinuous ↔ + ∀ (K : Compacts ℝ) (hK : (K : Set ℝ) ⊆ (⊤ : Opens ℝ)), + Continuous (W.toLinearMap ∘ TestFunction.ofSupportedIn hK) := by + exact TestFunction.continuous_iff_continuous_comp W.toLinearMap + +/-- The other exact LF-continuity obligation: continuity of the nonlinear +convolution-square map. Mathlib currently proves smoothness and compact +support of convolution, but exposes no theorem proving this LF continuity. -/ +def ConvolutionSquareContinuous : Prop := + Continuous fun f : Test ↦ convolution f (involution f) + +/-- Separate LF continuity obligation for Hermitian reflection. -/ +def InvolutionContinuous : Prop := + Continuous involution + +/-- Separate joint LF continuity obligation for test-function convolution. -/ +def ConvolutionContinuous : Prop := + Continuous fun p : Test × Test ↦ convolution p.1 p.2 + +/-- Reflection of a compact support set through the origin. -/ +def reflectedCompact (K : Compacts ℝ) : Compacts ℝ := + K.map (-·) continuous_neg + +/-- Precomposition by reflection on one fixed-support Fréchet stage. -/ +noncomputable def supportedReflectionPrecompLM (K : Compacts ℝ) : + 𝓓^{⊤}_{K}(ℝ, ℂ) →ₗ[ℝ] 𝓓^{⊤}_{reflectedCompact K}(ℝ, ℂ) where + toFun f := + { toFun := fun x ↦ f (-x) + contDiff' := f.contDiff.comp contDiff_neg + zero_on_compl' := by + intro x hx + apply f.zero_on_compl + intro hneg + apply hx + exact ⟨-x, hneg, by simp⟩ } + map_add' f g := by ext x; rfl + map_smul' r f := by ext x; rfl + +/-- The only missing fixed-stage estimate for reflection, stated directly in +the seminorms defining `𝓓_K`. The derivative identity under `x ↦ -x` is +available in Mathlib; packaging this estimate as a continuous map is the next +local topology step. -/ +def SupportedReflectionSeminormBound : Prop := + ∀ (K : Compacts ℝ) (i : ℕ) (f : 𝓓^{⊤}_{K}(ℝ, ℂ)), + N[ℝ]_{reflectedCompact K, i} (supportedReflectionPrecompLM K f) ≤ + N[ℝ]_{K, i} f + +theorem supportedReflectionSeminormBound : + SupportedReflectionSeminormBound := by + intro K i f + rw [ContDiffMapSupportedIn.seminorm_top_le_iff + (𝕜 := ℝ) (E := ℝ) (F := ℂ) (K := reflectedCompact K) + (apply_nonneg (ContDiffMapSupportedIn.seminorm ℝ ℝ ℂ ⊤ K i) f)] + intro x hx + rcases hx with ⟨y, hy, rfl⟩ + change ‖iteratedFDeriv ℝ i (fun x : ℝ ↦ f (-x)) (-y)‖ ≤ + N[ℝ]_{K, i} f + rw [show (fun x : ℝ ↦ f (-x)) = fun x ↦ f ((-1 : ℝ) • x) by + ext x + simp] + rw [iteratedFDeriv_comp_const_smul (-1 : ℝ) (f.contDiff.of_le (mod_cast le_top))] + simp only [norm_smul, norm_pow, norm_neg, norm_one, one_pow, one_mul, + neg_smul, one_smul, neg_neg] + exact (ContDiffMapSupportedIn.seminorm_top_le_iff + (𝕜 := ℝ) (E := ℝ) (F := ℂ) (K := K) + (apply_nonneg (ContDiffMapSupportedIn.seminorm ℝ ℝ ℂ ⊤ K i) f) i f).1 le_rfl y hy + +/-- Reflection precomposition is continuous on every fixed-support Fréchet +stage, proved from the defining seminorms. -/ +noncomputable def supportedReflectionPrecompCLM (K : Compacts ℝ) : + 𝓓^{⊤}_{K}(ℝ, ℂ) →L[ℝ] 𝓓^{⊤}_{reflectedCompact K}(ℝ, ℂ) where + toLinearMap := supportedReflectionPrecompLM K + cont := by + refine WithSeminorms.continuous_of_isBounded + (ContDiffMapSupportedIn.withSeminorms ℝ ℝ ℂ ⊤ K) + (ContDiffMapSupportedIn.withSeminorms ℝ ℝ ℂ ⊤ (reflectedCompact K)) + _ (fun i ↦ ⟨{i}, 1, fun f ↦ ?_⟩) + simpa using supportedReflectionSeminormBound K i f + +/-- The algebraic reflection map on one fixed-support Fréchet stage. Mathlib's +test-function LF universal property reduces global reflection continuity to +continuity of these maps. -/ +noncomputable def supportedInvolutionLM (K : Compacts ℝ) : + 𝓓^{⊤}_{K}(ℝ, ℂ) →ₗ[ℝ] Test where + toFun f := involution (TestFunction.ofSupportedIn (Set.subset_univ _) f) + map_add' f g := by + ext x + simp [involution] + map_smul' r f := by + ext x + simp [involution] + +/-- Fixed-support Hermitian reflection as an actual continuous real-linear +map: reflection precomposition, followed by complex conjugation and LF +inclusion. -/ +noncomputable def supportedInvolutionCLM (K : Compacts ℝ) : + 𝓓^{⊤}_{K}(ℝ, ℂ) →L[ℝ] Test := + TestFunction.ofSupportedInCLM ℝ (Set.subset_univ _) ∘L + (ContDiffMapSupportedIn.postcompCLM Complex.conjCLE ∘L + supportedReflectionPrecompCLM K) + +theorem supportedInvolutionCLM_toLinearMap (K : Compacts ℝ) : + (supportedInvolutionCLM K).toLinearMap = supportedInvolutionLM K := by + ext f x + rfl + +/-- Exact fixed-support prerequisite absent from the pinned Mathlib API: +reflection must be continuous on each `𝓓_K` stage. -/ +def SupportedInvolutionContinuous : Prop := + ∀ K : Compacts ℝ, Continuous (supportedInvolutionLM K) + +theorem supportedInvolutionContinuous : SupportedInvolutionContinuous := by + intro K + rw [← supportedInvolutionCLM_toLinearMap K] + exact (supportedInvolutionCLM K).continuous + +/-- The LF universal property proves global Hermitian-reflection continuity +once fixed-support reflection continuity is supplied. -/ +theorem involutionContinuous_of_supported + (h : SupportedInvolutionContinuous) : InvolutionContinuous := by + let T : Test →L[ℝ] Test := + TestFunction.limitCLM ℝ involution + (fun K _ ↦ ⟨supportedInvolutionLM K, h K⟩) + (fun _ _ _ ↦ rfl) + exact T.continuous + +/-- Hermitian reflection is continuous in Mathlib's canonical LF test-space +topology. -/ +theorem involutionContinuous : InvolutionContinuous := + involutionContinuous_of_supported supportedInvolutionContinuous + +/-- Fixed-support joint continuity is the analytic prerequisite for +convolution. The available LF universal property applies only to linear maps, +so this condition alone does not currently yield joint continuity on +`Test × Test` in Mathlib. -/ +def SupportedConvolutionContinuous : Prop := + ∀ K L : Compacts ℝ, Continuous fun p : 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ) ↦ + convolution + (TestFunction.ofSupportedIn (Set.subset_univ _) p.1) + (TestFunction.ofSupportedIn (Set.subset_univ _) p.2) + +/-- Convolution by a fixed left test function is real-linear. -/ +noncomputable def convolutionLeftLM (f : Test) : Test →ₗ[ℝ] Test where + toFun g := convolution f g + map_add' g h := by + ext x + change MeasureTheory.convolution f (g + h) (ContinuousLinearMap.mul ℝ ℂ) volume x = + MeasureTheory.convolution f g (ContinuousLinearMap.mul ℝ ℂ) volume x + + MeasureTheory.convolution f h (ContinuousLinearMap.mul ℝ ℂ) volume x + exact congrArg (fun q : ℝ → ℂ ↦ q x) <| + (f.hasCompactSupport.convolutionExists_left + (ContinuousLinearMap.mul ℝ ℂ) f.continuous g.continuous.locallyIntegrable).distrib_add + (f.hasCompactSupport.convolutionExists_left + (ContinuousLinearMap.mul ℝ ℂ) f.continuous h.continuous.locallyIntegrable) + map_smul' r g := by + ext x + change MeasureTheory.convolution f (r • g) (ContinuousLinearMap.mul ℝ ℂ) volume x = + r • MeasureTheory.convolution f g (ContinuousLinearMap.mul ℝ ℂ) volume x + exact congrFun MeasureTheory.convolution_smul x + +/-- Fixed-left convolution is globally continuous once fixed-support joint +estimates are available. This uses only Mathlib's one-variable LF universal +property. -/ +noncomputable def convolutionLeftCLM + (hlocal : SupportedConvolutionContinuous) (f : Test) : Test →L[ℝ] Test := by + let K : Compacts ℝ := ⟨tsupport f, f.hasCompactSupport⟩ + let fK : 𝓓^{⊤}_{K}(ℝ, ℂ) := + .of_support_subset f.contDiff subset_closure + refine TestFunction.limitCLM ℝ (convolution f) + (fun L _ ↦ ⟨convolutionLeftLM f ∘ₗ + (TestFunction.ofSupportedInCLM ℝ (Set.subset_univ _)).toLinearMap, ?_⟩) ?_ + · have hpair : Continuous fun g : 𝓓^{⊤}_{L}(ℝ, ℂ) ↦ (fK, g) := + continuous_const.prodMk continuous_id + have h := (hlocal K L).comp hpair + apply h.congr + intro g + rfl + · intro L hL g + rfl + +theorem convolution_separatelyContinuous_left + (hlocal : SupportedConvolutionContinuous) (f : Test) : + Continuous fun g : Test ↦ convolution f g := + (convolutionLeftCLM hlocal f).continuous.congr fun _ ↦ rfl + +theorem convolution_separatelyContinuous_right + (hlocal : SupportedConvolutionContinuous) (g : Test) : + Continuous fun f : Test ↦ convolution f g := + (convolution_separatelyContinuous_left hlocal g).congr fun f ↦ + convolution_comm g f + +/-- Convolution bundled as an algebraic real-bilinear map. -/ +noncomputable def convolutionBilinearLM : + Test →ₗ[ℝ] Test →ₗ[ℝ] Test where + toFun := convolutionLeftLM + map_add' f g := by + apply LinearMap.ext + intro h + calc + convolution (f + g) h = convolution h (f + g) := convolution_comm _ _ + _ = convolution h f + convolution h g := + (convolutionLeftLM h).map_add f g + _ = convolution f h + convolution g h := by + rw [convolution_comm h f, convolution_comm h g] + map_smul' r f := by + apply LinearMap.ext + intro g + calc + convolution (r • f) g = convolution g (r • f) := convolution_comm _ _ + _ = r • convolution g f := (convolutionLeftLM g).map_smul r f + _ = r • convolution f g := by rw [convolution_comm g f] + +theorem convolution_sub_sub (a b c d : Test) : + convolution a b - convolution c d = + convolution a (b - d) + convolution (a - c) d := by + change convolutionBilinearLM a b - convolutionBilinearLM c d = + convolutionBilinearLM a (b - d) + convolutionBilinearLM (a - c) d + simp only [map_sub, LinearMap.sub_apply] + abel + +theorem supportedConvolution_sub_sub + (K L : Compacts ℝ) + (a c : 𝓓^{⊤}_{K}(ℝ, ℂ)) (b d : 𝓓^{⊤}_{L}(ℝ, ℂ)) : + supportedConvolution K L (a, b) - supportedConvolution K L (c, d) = + supportedConvolution K L (a, b - d) + + supportedConvolution K L (a - c, d) := by + let A : Test := TestFunction.ofSupportedIn (Set.subset_univ _) a + let B : Test := TestFunction.ofSupportedIn (Set.subset_univ _) b + let C : Test := TestFunction.ofSupportedIn (Set.subset_univ _) c + let D : Test := TestFunction.ofSupportedIn (Set.subset_univ _) d + ext x + change (convolution A B - convolution C D) x = + (convolution A (B - D) + convolution (A - C) D) x + exact congrArg (fun f : Test ↦ f x) (convolution_sub_sub A B C D) + +/-- The explicit seminorm estimate proves genuine joint continuity on every +fixed compact-support stage. -/ +theorem supportedConvolution_continuous (K L : Compacts ℝ) : + Continuous (supportedConvolution K L) := by + rw [ContDiffMapSupportedIn.continuous_iff_comp] + intro n + rw [continuous_iff_continuousAt] + intro x + change Tendsto + (fun e ↦ (ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e)) (𝓝 x) + (𝓝 ((ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L x))) + rw [tendsto_iff_dist_tendsto_zero] + let C : ℝ := volume.real (K : Set ℝ) + let pK : Seminorm ℝ 𝓓^{⊤}_{K}(ℝ, ℂ) := + ContDiffMapSupportedIn.seminorm ℝ ℝ ℂ ⊤ K 0 + let pL : Seminorm ℝ 𝓓^{⊤}_{L}(ℝ, ℂ) := + ContDiffMapSupportedIn.seminorm ℝ ℝ ℂ ⊤ L n + have hpK : Continuous pK := by + exact (ContDiffMapSupportedIn.withSeminorms ℝ ℝ ℂ ⊤ K).continuous_seminorm 0 + have hpL : Continuous pL := by + exact (ContDiffMapSupportedIn.withSeminorms ℝ ℝ ℂ ⊤ L).continuous_seminorm n + have hle (e : 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ)) : + ‖(ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e) - + (ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L x)‖ ≤ + C * pK e.1 * pL (e.2 - x.2) + + C * pK (e.1 - x.1) * pL x.2 := by + calc + ‖(ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e) - + (ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L x)‖ = + N[ℝ]_{convolutionCompact K L, n} + (supportedConvolution K L e - supportedConvolution K L x) := by + change + ‖(ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e) - + (ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L x)‖ = + ‖(ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e - supportedConvolution K L x)‖ + exact congrArg norm <| + (map_sub (ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e) + (supportedConvolution K L x)).symm + _ = N[ℝ]_{convolutionCompact K L, n} + (supportedConvolution K L (e.1, e.2 - x.2) + + supportedConvolution K L (e.1 - x.1, x.2)) := by + rw [supportedConvolution_sub_sub] + _ ≤ N[ℝ]_{convolutionCompact K L, n} + (supportedConvolution K L (e.1, e.2 - x.2)) + + N[ℝ]_{convolutionCompact K L, n} + (supportedConvolution K L (e.1 - x.1, x.2)) := + map_add_le_add _ _ _ + _ ≤ C * pK e.1 * pL (e.2 - x.2) + + C * pK (e.1 - x.1) * pL x.2 := by + exact add_le_add + (supportedConvolution_seminorm_le K L (e.1, e.2 - x.2) n) + (supportedConvolution_seminorm_le K L (e.1 - x.1, x.2) n) + refine squeeze_zero + (g := fun e ↦ + C * pK e.1 * pL (e.2 - x.2) + + C * pK (e.1 - x.1) * pL x.2) + (fun e ↦ dist_nonneg) (fun e ↦ ?_) ?_ + · have hupper : + 0 ≤ C * pK e.1 * pL (e.2 - x.2) + + C * pK (e.1 - x.1) * pL x.2 := + (norm_nonneg + ((ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e) - + (ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L x))).trans (hle e) + apply (BoundedContinuousFunction.dist_le hupper).2 + intro y + calc + dist + ((ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e) y) + ((ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L x) y) = + ‖((ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e) - + (ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L x)) y‖ := by + rw [dist_eq_norm] + rfl + _ ≤ ‖(ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L e) - + (ContDiffMapSupportedIn.structureMapCLM ℝ ⊤ n) + (supportedConvolution K L x)‖ := + BoundedContinuousFunction.norm_coe_le_norm _ _ + _ ≤ C * pK e.1 * pL (e.2 - x.2) + + C * pK (e.1 - x.1) * pL x.2 := hle e + · have hu : Continuous fun e : + 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ) ↦ + C * pK e.1 * pL (e.2 - x.2) + + C * pK (e.1 - x.1) * pL x.2 := by + fun_prop + simpa [C, pK, pL] using hu.tendsto x + +/-- Fixed-stage joint convolution continuity is unconditional. -/ +theorem supportedConvolutionContinuous : SupportedConvolutionContinuous := by + intro K L + have hinc : Continuous + (TestFunction.ofSupportedIn (Set.subset_univ _) : + 𝓓^{⊤}_{convolutionCompact K L}(ℝ, ℂ) → Test) := + TestFunction.continuous_ofSupportedIn (Set.subset_univ _) + exact (hinc.comp (supportedConvolution_continuous K L)).congr fun p ↦ by + ext x + rfl + +theorem convolution_separatelyContinuous_left_unconditional (f : Test) : + Continuous fun g : Test ↦ convolution f g := + convolution_separatelyContinuous_left supportedConvolutionContinuous f + +theorem convolution_separatelyContinuous_right_unconditional (g : Test) : + Continuous fun f : Test ↦ convolution f g := + convolution_separatelyContinuous_right supportedConvolutionContinuous g + +/-- Pair of canonical fixed-support inclusions into the LF test space. -/ +def TestFunction.stagePairInclusion (K L : Compacts ℝ) : + 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ) → Test × Test := + fun p ↦ + (TestFunction.ofSupportedIn (Set.subset_univ _) p.1, + TestFunction.ofSupportedIn (Set.subset_univ _) p.2) + +theorem TestFunction.continuous_stagePairInclusion (K L : Compacts ℝ) : + Continuous (TestFunction.stagePairInclusion K L) := + (TestFunction.continuous_ofSupportedIn (Set.subset_univ _)).comp continuous_fst + |>.prodMk + ((TestFunction.continuous_ofSupportedIn (Set.subset_univ _)).comp continuous_snd) + +/-- Final topology generated by all pairs of fixed-support stages. -/ +@[reducible] noncomputable def TestFunction.LFPairFinalTopology : + TopologicalSpace (Test × Test) := + ⨆ K : Compacts ℝ, ⨆ L : Compacts ℝ, + TopologicalSpace.coinduced + (TestFunction.stagePairInclusion K L) + (inferInstance : TopologicalSpace + (𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ))) + +/-- The pair-stage final topology is always no finer than the ordinary +product of the two LF topologies. -/ +theorem TestFunction.lfPairFinalTopology_le_product : + TestFunction.LFPairFinalTopology ≤ + (inferInstance : TopologicalSpace (Test × Test)) := by + apply iSup_le + intro K + apply iSup_le + intro L + exact continuous_iff_coinduced_le.mp + (TestFunction.continuous_stagePairInclusion K L) + +/-- The exact remaining product-topology obligation. Only the reverse +inequality is unknown; the forward inequality is proved above. -/ +def TestFunction.LFPairProductTopologyObligation : Prop := + (inferInstance : TopologicalSpace (Test × Test)) ≤ + TestFunction.LFPairFinalTopology + +/-- The reverse inequality is exactly continuity of the identity from the +ordinary LF product into the pair-stage final topology. -/ +theorem TestFunction.lfPairProductTopologyObligation_iff : + TestFunction.LFPairProductTopologyObligation ↔ + @Continuous (Test × Test) (Test × Test) + (inferInstance : TopologicalSpace (Test × Test)) + TestFunction.LFPairFinalTopology id := by + exact continuous_id_iff_le.symm + +/-- First-principles neighborhood form of the product comparison: every +pair-stage-final neighborhood must contain a rectangle of ordinary LF +neighborhoods. -/ +def TestFunction.LFPairProductNeighborhoodCriterion : Prop := + ∀ p : Test × Test, ∀ U : Set (Test × Test), + U ∈ @nhds (Test × Test) TestFunction.LFPairFinalTopology p → + ∃ V ∈ 𝓝 p.1, ∃ W ∈ 𝓝 p.2, V ×ˢ W ⊆ U + +theorem TestFunction.lfPairProductTopologyObligation_iff_neighborhoods : + TestFunction.LFPairProductTopologyObligation ↔ + TestFunction.LFPairProductNeighborhoodCriterion := by + constructor + · intro h p U hU + have hmem : U ∈ 𝓝 p := + (le_iff_nhds + (inferInstance : TopologicalSpace (Test × Test)) + TestFunction.LFPairFinalTopology).mp h p hU + exact mem_nhds_prod_iff.mp hmem + · intro h + apply (le_iff_nhds + (inferInstance : TopologicalSpace (Test × Test)) + TestFunction.LFPairFinalTopology).2 + intro p U hU + rcases h p U hU with ⟨V, hV, W, hW, hVW⟩ + exact mem_of_superset (prod_mem_nhds hV hW) hVW + +/-- Universal property of the explicitly defined pair-stage final topology. -/ +theorem TestFunction.continuous_lfPairFinal + {Y : Type*} [TopologicalSpace Y] (F : Test × Test → Y) + (hstage : ∀ K L : Compacts ℝ, + Continuous (F ∘ TestFunction.stagePairInclusion K L)) : + @Continuous (Test × Test) Y TestFunction.LFPairFinalTopology + inferInstance F := by + rw [TestFunction.LFPairFinalTopology, continuous_iSup_dom] + intro K + rw [continuous_iSup_dom] + intro L + rw [continuous_coinduced_dom] + exact hstage K L + +/-- The reverse product-topology inequality upgrades all compatible +fixed-stage continuity statements to ordinary product continuity. -/ +theorem TestFunction.continuous_of_lfPairProductTopology + (hproduct : TestFunction.LFPairProductTopologyObligation) + {Y : Type*} [TopologicalSpace Y] (F : Test × Test → Y) + (hstage : ∀ K L : Compacts ℝ, + Continuous (F ∘ TestFunction.stagePairInclusion K L)) : + Continuous F := by + exact continuous_le_dom hproduct + (TestFunction.continuous_lfPairFinal F hstage) + +/-- Convolution is unconditionally continuous when its domain carries the +actual pair-stage final topology. -/ +theorem convolutionContinuous_lfPairFinal : + @Continuous (Test × Test) Test + TestFunction.LFPairFinalTopology inferInstance + (fun p ↦ convolution p.1 p.2) := by + apply TestFunction.continuous_lfPairFinal + intro K L + exact supportedConvolutionContinuous K L + +/-- Global joint convolution continuity now depends only on the explicit +reverse topology inequality, not on any analytic estimate. -/ +theorem convolutionContinuous_of_lfPairProductTopology + (hproduct : TestFunction.LFPairProductTopologyObligation) : + ConvolutionContinuous := by + apply TestFunction.continuous_of_lfPairProductTopology hproduct + intro K L + exact supportedConvolutionContinuous K L + +/-- Exact bilinear product-lifting statement needed for convolution. Unlike +`LFProductUniversalProperty`, this asks only for bilinear maps and is the +appropriate locally-convex categorical obligation. -/ +def TestFunction.LFBilinearProductUniversalProperty : Prop := + ∀ B : Test →ₗ[ℝ] Test →ₗ[ℝ] Test, + (∀ K L : Compacts ℝ, Continuous fun + p : 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ) ↦ + B + (TestFunction.ofSupportedIn (Set.subset_univ _) p.1) + (TestFunction.ofSupportedIn (Set.subset_univ _) p.2)) → + Continuous fun p : Test × Test ↦ B p.1 p.2 + +theorem TestFunction.lfBilinearProductUniversalProperty_of_topology + (hproduct : TestFunction.LFPairProductTopologyObligation) : + TestFunction.LFBilinearProductUniversalProperty := by + intro B hstage + apply TestFunction.continuous_of_lfPairProductTopology hproduct + intro K L + exact hstage K L + +theorem convolutionContinuous_of_lfBilinearProduct + (hproduct : TestFunction.LFBilinearProductUniversalProperty) + (hlocal : SupportedConvolutionContinuous) : + ConvolutionContinuous := by + exact (hproduct convolutionBilinearLM hlocal).congr fun _ ↦ rfl + +/-- Exact product/inductive-limit universal property missing from the pinned +API. The existing `TestFunction.continuous_iff_continuous_comp` handles +linear maps from one LF factor; joint convolution needs this two-factor +lifting theorem (or an equivalent bounded-bilinear theorem). -/ +def TestFunction.LFProductUniversalProperty : Prop := + ∀ F : Test × Test → Test, + (∀ K L : Compacts ℝ, Continuous fun + p : 𝓓^{⊤}_{K}(ℝ, ℂ) × 𝓓^{⊤}_{L}(ℝ, ℂ) ↦ + F + (TestFunction.ofSupportedIn (Set.subset_univ _) p.1, + TestFunction.ofSupportedIn (Set.subset_univ _) p.2)) → + Continuous F + +/-- Fixed-stage joint convolution plus the missing LF-product universal +property yields global joint continuity. -/ +theorem convolutionContinuous_of_lfProduct + (hproduct : TestFunction.LFProductUniversalProperty) + (hlocal : SupportedConvolutionContinuous) : + ConvolutionContinuous := + hproduct (fun p ↦ convolution p.1 p.2) hlocal + +/-- Joint continuity of convolution and continuity of reflection imply +continuity of convolution squares. -/ +theorem convolutionSquareContinuous_of_components + (hconv : ConvolutionContinuous) (hinv : InvolutionContinuous) : + ConvolutionSquareContinuous := by + exact hconv.comp (continuous_id.prodMk hinv) + +/-- Since reflection continuity is now proved, joint LF continuity of +convolution is the only remaining topological input for convolution-square +continuity. -/ +theorem convolutionSquareContinuous_of_convolution + (hconv : ConvolutionContinuous) : ConvolutionSquareContinuous := + convolutionSquareContinuous_of_components hconv involutionContinuous + +/-- The explicit LF product-topology obligation is sufficient for global +convolution-square continuity. -/ +theorem convolutionSquareContinuous_of_lfPairProductTopology + (hproduct : TestFunction.LFPairProductTopologyObligation) : + ConvolutionSquareContinuous := + convolutionSquareContinuous_of_convolution + (convolutionContinuous_of_lfPairProductTopology hproduct) + +/-- Continuous distribution evaluation plus continuity of convolution +squares implies continuity of the Weil quadratic functional. -/ +theorem Distribution.quadraticContinuous_of_eval_of_convolutionSquare + (W : Distribution) (hW : W.EvalContinuous) + (hsquare : ConvolutionSquareContinuous) : + W.QuadraticContinuous := by + exact Complex.continuous_re.comp (hW.comp hsquare) + +/-- Exact dense-subclass closure theorem for Weil positivity. Applications +must separately prove both LF-density of the subclass and continuity of the +quadratic functional. -/ +theorem Distribution.IsPositive.of_dense + (W : Distribution) (S : Set Test) (hS : Dense S) + (hcontinuous : W.QuadraticContinuous) + (hpos : ∀ f ∈ S, 0 ≤ quadratic W f) : + IsPositive W := + nonnegative_of_dense (quadratic W) S hS hcontinuous hpos + +/-- A convergent error envelope is a convenient quantitative sufficient +condition for the pointwise convergence needed by positivity transfer. -/ +theorem positivity_of_error_bound + (q : ℕ → ℝ) (qLimit : ℝ) (ε : ℕ → ℝ) + (hε : Tendsto ε atTop (𝓝 0)) + (herror : ∀ n, |q n - qLimit| ≤ ε n) + (hpos : ∀ n, 0 ≤ q n) : + 0 ≤ qLimit := by + apply nonneg_of_tendsto q qLimit + · rw [tendsto_iff_norm_sub_tendsto_zero] + simpa only [Real.norm_eq_abs] using + squeeze_zero (fun n ↦ abs_nonneg (q n - qLimit)) herror hε + · exact hpos + +/-- The distribution-level form used by the Weil route. -/ +theorem Distribution.IsPositive.of_tendsTo + {Wn : ℕ → Distribution} {W : Distribution} + (hlimit : Distribution.TendsTo Wn W) + (hpos : ∀ n, IsPositive (Wn n)) : + IsPositive W := by + intro f + exact nonneg_of_tendsto _ _ (hlimit.quadratic f) fun n ↦ hpos n f + +/-- A bounded monotone family has the canonical pointwise supremum limit, +using Mathlib's conditionally-complete monotone convergence theorem. -/ +theorem monotoneQuadratic_tendsto_ciSup + (Q : ℕ → Test → ℝ) (f : Test) + (hmono : Monotone fun n ↦ Q n f) + (hbdd : BddAbove (range fun n ↦ Q n f)) : + Tendsto (fun n ↦ Q n f) atTop (𝓝 (⨆ n, Q n f)) := + tendsto_atTop_ciSup hmono hbdd + +theorem monotoneQuadratic_limit_nonneg + (Q : ℕ → Test → ℝ) + (hmono : ∀ f, Monotone fun n ↦ Q n f) + (hbdd : ∀ f, BddAbove (range fun n ↦ Q n f)) + (hpos : ∀ n f, 0 ≤ Q n f) : + ∀ f, 0 ≤ ⨆ n, Q n f := by + intro f + exact nonneg_of_tendsto (fun n ↦ Q n f) (⨆ n, Q n f) + (monotoneQuadratic_tendsto_ciSup Q f (hmono f) (hbdd f)) fun n ↦ hpos n f + +/-- Finite-stage positivity does not constrain a separately declared value +unless a convergence/regularization theorem connects them. -/ +theorem finitePositivity_without_convergence_counterexample : + (∀ _ : ℕ, 0 ≤ (0 : ℝ)) ∧ + ¬ Tendsto (fun _ : ℕ ↦ (0 : ℝ)) atTop (𝓝 (-1 : ℝ)) := by + constructor + · intro _ + positivity + · intro h + have hzero : Tendsto (fun _ : ℕ ↦ (0 : ℝ)) atTop (𝓝 (0 : ℝ)) := + tendsto_const_nhds + have : (0 : ℝ) = -1 := tendsto_nhds_unique hzero h + norm_num at this + +/-! ## Named terminal bridge obligations -/ + +/-- The archimedean truncations must converge on every admissible test. -/ +def ArchimedeanLimitObligation + (stage : ℕ → Distribution) (limit : Distribution) : Prop := + Distribution.TendsTo stage limit + +/-- Compact support should make a correctly enumerated prime-power +truncation eventually exact on each test. -/ +def PrimePowerStabilizationObligation + (stage : ℕ → Distribution) (limit : Distribution) : Prop := + ∀ f : Test, ∃ N, ∀ n ≥ N, (stage n).eval f = limit.eval f + +theorem primePowerStabilization_tendsTo + (stage : ℕ → Distribution) (limit : Distribution) + (h : PrimePowerStabilizationObligation stage limit) : + Distribution.TendsTo stage limit := by + intro f + rcases h f with ⟨N, hN⟩ + exact tendsto_const_nhds.congr' <| + eventually_atTop.2 ⟨N, fun n hn ↦ (hN n hn).symm⟩ + +/-- Symmetric zero truncations must converge to the selected regularized +zero distribution, with multiplicities and ordering fixed by the caller. -/ +def ZeroRegularizationObligation + (stage : ℕ → Distribution) (regularized : Distribution) : Prop := + Distribution.TendsTo stage regularized + +/-! ## Separately typed analytic approximants -/ + +/-- Symmetric zero truncations. `symmetric` records the selected +regularization symmetry at distribution level; convergence and multiplicity +remain separate obligations. -/ +structure SymmetricZeroApproximants where + stage : ℕ → Distribution + symmetric : ∀ n f, + (stage n).eval (involution f) = star ((stage n).eval f) + +structure ArchimedeanApproximants where + stage : ℕ → Distribution + +structure PrimePowerApproximants where + stage : ℕ → Distribution + +structure PoleApproximants where + stage : ℕ → Distribution + +def SymmetricZeroApproximants.ConvergesTo + (A : SymmetricZeroApproximants) (limit : Distribution) : Prop := + ZeroRegularizationObligation A.stage limit + +def ArchimedeanApproximants.ConvergesTo + (A : ArchimedeanApproximants) (limit : Distribution) : Prop := + ArchimedeanLimitObligation A.stage limit + +def PrimePowerApproximants.StabilizesTo + (A : PrimePowerApproximants) (limit : Distribution) : Prop := + PrimePowerStabilizationObligation A.stage limit + +def PoleApproximants.ConvergesTo + (A : PoleApproximants) (limit : Distribution) : Prop := + Distribution.TendsTo A.stage limit + +/-- A typed four-component approximation package. The stage formula is an +obligation rather than an assumed zeta theorem. -/ +structure TypedExplicitApproximants where + zeros : SymmetricZeroApproximants + pole : PoleApproximants + primePower : PrimePowerApproximants + archimedean : ArchimedeanApproximants + formula : ∀ n f, (zeros.stage n).eval f = + (pole.stage n).eval f - (primePower.stage n).eval f - + (archimedean.stage n).eval f + +def TypedExplicitApproximants.toFiniteStage + (A : TypedExplicitApproximants) (n : ℕ) : FiniteExplicitStage where + spectral := A.zeros.stage n + pole := A.pole.stage n + primePower := A.primePower.stage n + archimedean := A.archimedean.stage n + formula := A.formula n + +/-- Algebraic combination theorem for the separately typed limits. -/ +theorem TypedExplicitApproximants.explicitFormula + (A : TypedExplicitApproximants) + (zeros pole primePower archimedean : Distribution) + (hzero : A.zeros.ConvergesTo zeros) + (hpole : A.pole.ConvergesTo pole) + (hprime : A.primePower.StabilizesTo primePower) + (harch : A.archimedean.ConvergesTo archimedean) : + ∀ f, zeros.eval f = + pole.eval f - primePower.eval f - archimedean.eval f := by + apply explicitFormula_passes_to_limit A.toFiniteStage + · exact hzero + · exact hpole + · exact primePowerStabilization_tendsTo _ _ hprime + · exact harch + +/-- The finite identities and all component limits form the analytic +explicit-formula package. It still does not assert either RH direction. -/ +structure AnalyticBridgeObligations + (stage : ℕ → FiniteExplicitStage) + (spectral pole primePower archimedean : Distribution) : Prop where + spectralRegularization : + Distribution.TendsTo (fun n ↦ (stage n).spectral) spectral + poleLimit : Distribution.TendsTo (fun n ↦ (stage n).pole) pole + primePowerStabilization : + PrimePowerStabilizationObligation (fun n ↦ (stage n).primePower) primePower + archimedeanLimit : + ArchimedeanLimitObligation (fun n ↦ (stage n).archimedean) archimedean + +theorem AnalyticBridgeObligations.explicitFormula + {stage : ℕ → FiniteExplicitStage} + {spectral pole primePower archimedean : Distribution} + (h : AnalyticBridgeObligations stage spectral pole primePower archimedean) : + ∀ f, spectral.eval f = + pole.eval f - primePower.eval f - archimedean.eval f := + explicitFormula_passes_to_limit stage spectral pole primePower archimedean + h.spectralRegularization h.poleLimit + (primePowerStabilization_tendsTo _ _ h.primePowerStabilization) + h.archimedeanLimit + +/-- The remaining all-test criterion is exactly the conjunction of the two +logical directions; finite-stage formulae and limits do not supply it. -/ +def AllTestPositivityObligation (W : Distribution) : Prop := + PositivityImpliesRH W ∧ RHImpliesPositivity W + +/-- A finite Gram kernel is the basic exact certificate behind every +finite-dimensional positive-semidefinite restriction. -/ +def gramKernel {ι E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℂ E] (v : ι → E) : + Matrix ι ι ℂ := + Matrix.gram ℂ v + +/-- Every finite Gram kernel is positive semidefinite. -/ +theorem gramKernel_posSemidef + {ι E : Type*} [Finite ι] [NormedAddCommGroup E] [InnerProductSpace ℂ E] (v : ι → E) : + (gramKernel v).PosSemidef := + Matrix.posSemidef_gram ℂ v + +/-- Positive semidefiniteness survives every finite reindexing/restriction. -/ +theorem gramKernel_restrict_posSemidef + {ι κ E : Type*} [Finite ι] [NormedAddCommGroup E] [InnerProductSpace ℂ E] + (v : ι → E) (e : κ → ι) : + ((gramKernel v).submatrix e e).PosSemidef := + (gramKernel_posSemidef v).submatrix e + +/-- Exact rank-one quadratic certificate over the reals. -/ +theorem rankOne_quadratic_nonneg + {ι : Type*} [Fintype ι] (u x : ι → ℝ) : + 0 ≤ (∑ i, u i * x i) ^ 2 := + sq_nonneg _ + +/-- A concrete Hermitian kernel can still have a negative direction. +This rules out replacing the exact Weil functional by a generic +"find a Hermitian kernel" plan. -/ +def badKernel : Matrix (Fin 2) (Fin 2) ℝ := + !![1, 2; 2, 1] + +def badDirection : Fin 2 → ℝ := + ![1, -1] + +theorem badKernel_negative_direction : + (∑ i, ∑ j, badDirection i * badKernel i j * badDirection j) = -2 := by + norm_num [Fin.sum_univ_two, badDirection, badKernel] + +theorem badKernel_not_posSemidef : ¬ badKernel.PosSemidef := by + intro h + have hnonneg := h.dotProduct_mulVec_nonneg badDirection + change 0 ≤ ∑ i, badDirection i * (∑ j, badKernel i j * badDirection j) at hnonneg + have heq : + (∑ i, badDirection i * (∑ j, badKernel i j * badDirection j)) = -2 := by + simpa only [Finset.mul_sum, mul_assoc] using badKernel_negative_direction + rw [heq] at hnonneg + norm_num at hnonneg + +end WeilPositivity diff --git a/autoresearch/prefill/rh_strategy_seed.py b/autoresearch/prefill/rh_strategy_seed.py index 53540982..a58191a6 100644 --- a/autoresearch/prefill/rh_strategy_seed.py +++ b/autoresearch/prefill/rh_strategy_seed.py @@ -75,32 +75,47 @@ def rh_strategy_specs() -> tuple[RHStrategySpec, ...]: "approximation distinct from zero-product approximation." ), definitions=( - "jensenQuadratic", "Real.sqrt", - "completedRiemannZeta", "completedRiemannZeta₀", + "Kakeya.RHJensen.riemannXi", + "Kakeya.RHJensen.xiJensenEntire", + "Kakeya.RHJensen.xiGamma", + "Kakeya.RHJensen.jensenPolynomial", + "Kakeya.RHJensen.Hyperbolic", + "Kakeya.RHJensen.AllJensenHyperbolic", ), first_subgoal=( - "For arbitrary real coefficients, validate the two explicit " - "real roots of the degree-two Jensen polynomial under the " - "nonnegative Turán discriminant condition." + "For arbitrary real coefficients, prove the exact " + "nondegenerate degree-two Jensen real-root/Turán " + "discriminant equivalence; retain it as finite support only." + ), + first_subgoal_theorem=( + "Kakeya.RHJensen.jensenQuadratic_has_real_roots_iff" + ), + theorem_cards=( + "gorz-2019-jensen", + "osullivan-2021-xi-lp", + "mathlib-4.32.0-rc1-riemann", + ), + dependencies=( + "KakeyaLeanGate/RHJensen.lean", + "docs/research/rh-jensen-source-cards.json", ), - first_subgoal_theorem="jensenQuadratic_has_two_real_roots", - theorem_cards=("rh-jensen-quadratic-two-roots",), - dependencies=("KakeyaLeanGate/RHJensen.lean",), mathlib_support=( "completedRiemannZeta", "completedRiemannZeta₀", "differentiable_completedZeta₀", "Real.sq_sqrt", - "Polynomial.IsRoot", "Polynomial.discr", + "Complex.taylorSeries_eq_of_entire'", + "Polynomial.IsRoot", "Polynomial.Splits", + "TendstoLocallyUniformlyOn", ), missing_interfaces=( - "RIEMANN_XI_NORMALIZATION", - "XI_CENTERED_TAYLOR_COEFFICIENTS", + "XI_COEFFICIENT_REALITY_AND_IDENTIFICATION", "JENSEN_HYPERBOLIC_ALL_DEGREES_SHIFTS", "LAGUERRE_POLYA_CLASS_AND_LIMIT_BRIDGE", "JENSEN_CRITERION_IFF_MATHLIB_RH", ), success_criterion=( - "Lean accepts the generic quadratic root theorem; later work " - "must separately discharge every xi/Jensen/RH bridge." + "Lean accepts the sourced xi/Jensen definitions, finite " + "degree formulas and Turán criterion; all xi/Jensen/RH " + "bridges remain explicit proof obligations." ), falsification_criterion=( "Lean rejects the coefficient convention or root formula, or " diff --git a/docs/research/li-coefficients-route.md b/docs/research/li-coefficients-route.md new file mode 100644 index 00000000..daedc447 --- /dev/null +++ b/docs/research/li-coefficients-route.md @@ -0,0 +1,667 @@ +# Li-coefficient route status + +## Implemented definitions + +`KakeyaLeanGate/LiCriterion.lean` defines: + +- `riemannXiLi s = 1 + s * (s - 1) * completedRiemannZeta₀ s`; +- the source-indexed derivative coefficient, totalized by `λ₀ = 0`; +- the real coefficient sequence and its explicit reality obligation; +- all-index non-negativity and finite-prefix non-negativity; +- the Li zero summand and indexed finite truncations; +- a concrete finite indexed multiset with nonzero roots and retained + multiplicities; +- finite norm-ball windows of nontrivial zeta zeros, repeated according to + their intrinsic analytic multiplicities; +- finite closed symmetric-height rectangles with exact boundary membership, + multiplicity-aware indices, and injective height reindexing; +- the symmetric-height convergence obligation; +- the corresponding Cauchy interface and completeness transfer; +- unconditional-summability and shell-majorant criteria that discharge the + symmetric-height Cauchy/limit interfaces; +- the source-shaped logarithmic shell count and quadratic paired-cancellation + obligations, plus the weaker `O((N+1)^(-3/2))` shell bound sufficient for + convergence; +- a finite rational product whose logarithmic derivative generates the + finite zero contributions; +- the finite canonical product centered at `s = 1` and its exact Möbius + transform, factor by factor and hence with multiplicity; +- the intrinsic zeta zero order `riemannZetaZeroOrder : ℂ → ℕ∞`; +- locally uniform all-order derivative and logarithmic-derivative transfer; +- normalized logarithmic-derivative Taylor coefficients of finite products; +- an all-index finite-zero-sum transfer theorem with every analytic + hypothesis stated explicitly; +- truncated generating polynomials; +- `RiemannLiCriterionStatement`, the unproved source bridge to the canonical + Mathlib RH root. +- the Möbius xi transform, its all-order coefficient-identity obligation, + and the exact zero-window formula/converse decomposition of Li's criterion. +- the finite spectral converse obligation and reflection-symmetry interface + that isolate the corresponding critical-line implication. +- the infinite reflection-symmetric spectral reduction with the explicit + Bombieri--Lagarias multiset summability hypothesis; +- a two-obligation xi endpoint: canonical-product approximation and the + all-order xi Möbius/derivative identity. +- genus-one primary factors, their quadratic remainder estimate, and normal + convergence of multiplicity-indexed canonical products from inverse-square + root summability; +- the Hadamard representation obligation and normalization/functional- + equation constraints on its affine exponential prefactor. +- exact finite comparison between zero-centered genus-one factors and + one-centered Li factors under multiplicity-preserving reflection symmetry. +- xi's global Mathlib divisor, finite natural zero multiplicities, exact + reflection invariance, and compatibility with zeta multiplicity throughout + the positive-real half-plane. +- Mathlib's finite disk canonical decomposition instantiated for xi. +- compact-local finiteness/boundedness and a radius-cofinal sequence of + finite-disk xi decompositions. +- Jensen/logarithmic-counting identification for xi's divisor and a global + entire logarithm for every zero-free entire complex-plane quotient. + +The `completedRiemannZeta₀` definition is necessary. Mathlib assigns junk +values to `completedRiemannZeta` at its poles, so direct pointwise +multiplication by `s * (s - 1)` would incorrectly give zero at `s = 1`. + +## Lean-proved facts + +The route proves without `sorry`, `admit`, or `axiom`: + +- `riemannXiLi 0 = riemannXiLi 1 = 1`; +- xi is entire and satisfies `xi(1-s) = xi(s)`; +- away from `0` and `1`, xi equals + `s * (s - 1) * completedRiemannZeta s`; +- the principal complex logarithm of xi is analytic at `1`; +- the zeroth totalized coefficient is zero and the first coefficient reduces + to the derivative of `log xi` at `1`; +- all-index positivity implies every finite prefix; +- all-index positivity is equivalent to positivity of every finite prefix + (an actual universal quantifier, not one chosen computation); +- finite-prefix positivity is monotone under shortening; +- every fixed finite prefix can be positive while the next term is negative; +- zero-summand identities at indices zero and one, compatibility with complex + conjugation, and the zero partial sum; +- exact finite-multiset identities at indices zero and one; +- non-negativity of every finite sum when each transform + `1 - rho⁻¹` lies in the closed unit disk; +- the algebraic critical-line implication + `rho.re = 1/2 -> ‖1 - rho⁻¹‖ = 1`, and therefore finite Li-sum + non-negativity for every multiplicity-aware family on the critical line; +- every explicit Cauchy family of symmetric truncations converges in `ℂ`, + producing a `HeightSymmetricLiLimit`; +- uniqueness/transfer of that limit through exact finite approximants; +- the exact finite-product logarithmic-derivative identity + `logDeriv (prod_i ((1-a_i z)/(1-z))) = + sum_i (1/(1-z) - a_i/(1-a_i z))`, with + `a_i = 1 - rho_i⁻¹`; +- at `z = 0`, the finite-product logarithmic derivative is exactly the first + finite Li sum; +- away from `s = 1`, nonzero `analyticOrderAt` for `riemannZeta` is + equivalent to membership in Mathlib's `riemannZetaZeros`; +- away from `s = 1`, every zeta analytic order is finite; this follows by + propagating finite order from `s = 2` across the connected punctured plane; +- every compact norm ball yields a finite `Finset` of nontrivial zeros, and + the sigma index + `Σ rho in window, Fin (riemannZetaZeroMultiplicity rho)` repeats each root + exactly according to that finite order; +- the bounded windows are monotone and exhaust each fixed nontrivial zero; +- compact symmetric-height rectangles are finite with multiplicity, retain + boundary zeros, and reindex injectively under increasing height; +- under an explicit real-strip hypothesis, rectangle membership is exactly + nontrivial-zero membership plus `|im rho| ≤ T`; +- RH itself supplies the real bound `|re rho| ≤ 1`, yielding genuine finite + pure height windows conditionally on RH; +- RH puts every root in every bounded multiplicity window on the critical + line and hence makes every finite-window Li sum nonnegative; +- locally uniform limits of holomorphic functions transfer every + `iteratedDeriv`, by iterating Mathlib's complex Weierstrass theorem; +- on a common open nonvanishing neighborhood, logarithmic derivatives + converge locally uniformly, and all their normalized Taylor coefficients + converge; +- every finite product satisfies the all-order Taylor identity + unconditionally: the normalized `k`th logarithmic-derivative coefficient + is the finite Li sum at index `k + 1`; +- the finite rational generating product is exactly + `prod (1 + (s - 1) / rho)` after `s = (1-z)⁻¹`; consequently the transformed + canonical product has the all-order normalized logarithmic-derivative + coefficient identity, with repeated roots retained as separate factors; +- therefore normal convergence plus holomorphy and common nonvanishing alone + transfers multiplicity-aware finite Li sums coefficientwise to the + logarithmic-derivative Taylor coefficients of the product limit; +- this transfer is also proved directly for finite canonical products after + the Möbius substitution, at every derivative order; +- exact symmetric-height exhaustions eventually contain every fixed finite + family, and for finite index types their declared coefficients stabilize + to the full finite sums; +- exact symmetric-height exhaustions are cofinal in all finite subsets, so + unconditional summability identifies their limit with the `tsum`; +- a summable majorant for successive height shells proves the required + Cauchy property, exposing the precise target for zero-count/growth bounds; +- an `O((N+1)^(-3/2))` successive-shell estimate is summable and therefore + proves every symmetric Li partial-sum sequence Cauchy; +- more sharply, the source-shaped `O(log(N+2)/(N+2)^2)` paired-shell estimate + is proved summable and directly yields the same Cauchy conclusion; +- the genus-one factor satisfies + `‖E₁(w)-1‖ ≤ 3‖w‖²` for `‖w‖ ≤ 1`; +- inverse-square summability and root escape imply locally uniform convergence + of the genus-one canonical product on all of `ℂ`; the + Bombieri--Lagarias summability weight implies inverse-square summability + when roots are uniformly separated from zero; +- every exact symmetric-height exhaustion converges locally uniformly to + this product, preserving multiplicity through its index type; +- if xi has the genus-one Hadamard representation + `exp(a+b*s) * product E₁(s/rho)`, the affine-normalized symmetric finite + products converge locally uniformly to xi; +- `xi(0)=1` forces `exp(a)=1`, and the functional equation gives the exact + reflected-product constraint on `a`, `b`, and the canonical product; +- for a fixed nonzero product germ, two affine Hadamard prefactors have the + same slope and the same exponential constant; the latter cannot be + strengthened to `a=a'` without selecting a logarithm branch; +- finite reflection symmetry gives the exact identity + `prod E₁(s/rho) = C * exp(s * sum rho⁻¹) * centeredProduct(s)`; +- when the affine slope balances the finite inverse-root sum, the transformed + genus-one Hadamard approximation has every normalized + logarithmic-derivative coefficient equal to the finite Li sum; +- every xi zero has finite analytic order, the functional equation preserves + that order, and xi/zeta analytic orders agree in the nontrivial strip; +- on every closed disk, xi admits Mathlib's finite canonical decomposition + into divisor-prescribed disk factors and a nonvanishing remainder; +- affine constants are unique modulo `2πiℤ`, while their slopes are literally + unique; +- the global xi divisor meets every compact set in a finite set, and finite + disk decompositions can be chosen along radii `N+1`; +- equal finite divisors of xi and a candidate product produce, via Mathlib's + meromorphic normal form, an entire zero-free cancelled quotient; +- normal convergence of the infinite genus-one product now proves that its + only zeros are the indexed roots and that each finite root fiber contributes + exactly its cardinality to the analytic order; an order-matching zero + enumeration therefore gives equality with xi's global divisor; +- xi's locally finite divisor now yields a canonical countable sigma-type + enumeration with one index per unit of analytic multiplicity; it is complete, + has exact finite fibers, and escapes every bounded set in the zero-free, + finite, and infinite cases; +- an `O(log N)` multiplicity-counted shell partition now implies + inverse-square root summability, with an arbitrary finite set of low zeros + removed and restored rigorously; +- subquadratic log growth of that quotient now conditionally yields the exact + whole-plane exponential-affine Hadamard identity; +- `xi(0)=P(0)=1` and `xi(1-s)=xi(s)` then force `exp(a)=1` and the exact + reflected-product constraint, without choosing an invalid logarithm branch; +- the xi canonical-product approximation and all-order Möbius identity now + directly imply `RiemannLiZeroWindowFormula`; +- xi's divisor log-count equals the circle average of `log ‖xi‖` exactly, + since the normalization removes Jensen's trailing-coefficient constant; +- every continuous zero-free whole-plane quotient has a global continuous + logarithm by Mathlib's simply-connected branch-log theorem; +- when the quotient is entire, its continuous logarithm is proved entire and + its derivative is the quotient's logarithmic derivative; +- an entire logarithm with zero second derivative is affine, including the + resulting exponential-affine quotient identity; +- Cauchy's estimate proves zero second derivative from `o(‖z‖²)` norm + growth; Borel--Carathéodory proves the log-relevant version from + `sup_{‖z‖ 0`, while + real-Gamma monotonicity and `n! ≤ n^n` give the explicit ceiling-power + growth bound; +- combining those estimates gives an explicit far-right xi bound on + `re s ≥ 4`; +- the all-exponent Mellin representation of `completedRiemannZeta₀` is + uniformly bounded on every fixed vertical strip by its two endpoint + norm integrals, hence xi has only quadratic growth there; +- the ceiling-power, quadratic-strip, and reflected estimates combine into + the global theorem `RiemannXiOrderOneGrowthBound`; +- the first Möbius xi coefficient satisfies + `logDeriv (xi ∘ (1-z)⁻¹) 0 = λ₁`; +- normal convergence and common nonvanishing transfer all finite Li sums to + xi derivative coefficients once the named all-order Möbius coefficient + identity is supplied; +- RH implies all-index Li positivity once the named all-index zero-window + formula is supplied; adding the separately named converse recovers the + full criterion statement; +- `‖1-rho⁻¹‖ ≤ 1` is equivalent to `re rho ≥ 1/2`; for a finite + reflection-symmetric multiset, the explicitly named spectral converse + (aggregate all-index positivity implies every transform lies in the unit + disk) therefore forces every root onto `re rho = 1/2`; +- the same unit-disk/reflection argument works for arbitrary infinite index + types; the remaining spectral implication is typed with the source + summability condition + `sum (1 + |re rho|) / (1 + |rho|)^2 < infinity`; +- reflection symmetry and positivity of an unrelated coefficient sequence + admit an explicit two-root off-line counterexample, proving that the + zero-sum/product identity cannot be dropped; +- canonical xi product approximation plus the general all-order xi + change-of-variables identity imply convergence to every Li derivative + coefficient, isolating exactly those two obligations; +- the one-step recurrence for truncated generating polynomials. + +No numerical Li value is asserted, because no interval certificate was +introduced. + +## Counterexample/Critic result + +`finitePrefixSpoof N` equals `1` through `N` and `-1` afterward. Lean proves +both `LiPositiveThrough (finitePrefixSpoof N) N` and failure of +`LiPositive (finitePrefixSpoof N)`. Therefore no persisted lemma treats a +computed finite prefix, monotonic-looking data, or a generating polynomial +pattern as evidence sufficient for RH. + +Positivity alone also gives no recurrence or monotonicity law; such laws +would require additional analytic identities. The route persists only the +tautologically valid truncation recurrence. + +## Exact remaining bridge + +There are two nested blockers. The new finite and convergence-transfer +theorems show precisely where the first one begins: + +1. Analytic infrastructure: finite order, bounded multiplicity enumeration, + and compact height rectangles are closed. A pure vertical window follows + from the explicit real-strip hypothesis, but pinned Mathlib does not yet + supply that zeta classification. The remaining global work is to derive a + summable successive-shell majorant from zero counting/growth and identify + the resulting normally convergent genus-one product with xi, including its + affine exponential prefactor and a common nonvanishing neighborhood. + Generic genus-one normal convergence is now closed. Pinned Mathlib's + zeta-zero API stops at + discreteness, compact finiteness, and escape to the cocompact filter; no + zero-counting asymptotic or strip-growth estimate was found. The all-order + finite canonical-product Möbius identity is closed. The remaining xi + coefficient bridge is the general all-order change-of-variables identity + relating `log xi((1-z)⁻¹)` to the source derivative definition. + Authoritative Riemann--von Mangoldt estimates give `O(log T)` zeros in a + unit-height shell. Combined with conjugate/reflection cancellation of the + first-order term, the desired shell size is `O(log T / T^2)`, which is + stronger than the formal sufficient `O(T^(-3/2))` interface. The + quantitative cancellation estimate itself remains zeta-specific. The + single product-identification theorem still missing is the zeta Hadamard + factorization `GenusOneHadamardRepresentation` for a complete + multiplicity-indexed nontrivial-zero family. +2. Mathematical criterion: formalize Li's theorem that all + `λ_n ≥ 0` for `n ≥ 1` is equivalent to every non-trivial zeta zero lying + on `re(s)=1/2`, then identify that statement with Mathlib's canonical + `RiemannHypothesis` (including its explicit exclusions of trivial zeros + and `s = 1`). The finite formalization isolates its hard spectral step: + infer the individual unit-disk bounds from aggregate positivity for every + positive index. Reflection symmetry then gives the critical line + algebraically. The infinite statement now carries the + Bombieri--Lagarias summability hypothesis and the symmetric zero-sum limit + explicitly; proving its spectral implication remains the source theorem, + not a consequence of abstract positivity alone. + +The all-order finite Li identity, normal derivative transfer, and finite +genus-one/centered-factor comparison are closed. The remaining infinite step +is to prove that the Hadamard affine slopes of the symmetric zeta +approximants balance their inverse-root sums in the limit, with enough local +nonvanishing to pass logarithmic derivatives. This is now the precise +prefactor theorem needed before the general xi coefficient identity can be +discharged. + +The finite disk decomposition is not a substitute for Hadamard +factorization: its canonical factors depend on the disk radius and equality +is codiscrete within that disk. Pinned Mathlib still has no packaged +finite-order Hadamard theorem and no theorem passing these disk +decompositions to a whole-plane genus-one product. +The elementary zeta Dirichlet-series region is closed by a uniform bound on +`re s ≥ 2`. A complex Gamma estimate is now proved directly from Mathlib's +Euler integral, and an explicit ceiling-power real-Gamma estimate replaces +the absent packaged complex Stirling theorem. Rather than bounding zeta +through its pole inside the critical strip, the route uses Mathlib's entire +Mellin representation to prove that `completedRiemannZeta₀` is uniformly +bounded on every fixed vertical strip. Lean now packages the central strip, +far-right estimate, and functional-equation reflection into +`RiemannXiOrderOneGrowthBound`: +`‖xi(s)‖ ≤ exp(C ‖s‖ log(‖s‖+2))` outside a fixed disk. Thus xi's +source-standard order-at-most-one estimate is closed, and Jensen's formula +can consume it directly. The complex-analysis rigidity step is also closed: +Borel--Carathéodory and Cauchy's estimate turn +`SubquadraticLogNormGrowth` into an exponential-affine quotient. The +remaining obligation is the xi/product quotient-growth estimate itself. +The cancellation mechanism itself is now formalized: equality of the two +finite global divisors makes the normal-form extension of `xi * P⁻¹` entire +and zero-free, and `SubquadraticLogNormGrowth` then proves the exact affine +Hadamard representation by analytic continuation from a nonzero product +germ. +The product-side divisor calculation and xi enumeration are now closed. +Local finiteness supplies root escape automatically, so inverse-square +summability alone gives normal convergence and exact xi/product divisor +matching. +Jensen's formula is now combined with the global xi growth theorem to prove +the multiplicity-aware logarithmic counting bound +`N_log(r) ≤ C r log(r+2)`. This does **not** imply an `O(log N)` unit-shell +count; that stronger local statement needs Riemann--von Mangoldt (or an +equivalent local zero-count theorem). The order-one Jensen bound does give +`O(2^N(N+1))` roots in dyadic shells. The new dyadic comparison theorem +turns exactly that bound into a summable `O((N+1)/2^N)` inverse-square +contribution and immediately closes xi/product divisor matching through +`riemannXiGenusOneCanonicalProduct_divisor_eq_of_dyadicShellCount`. +That final bookkeeping is now closed: the finite index-window divisor is +proved pointwise below xi's analytic divisor, evaluating the weighted count +at radius `2r` gives `card(window r) log 2 ≤ N_log(2r)`, and half-open +dyadic shells partition every index outside a finite low window exactly +once. Consequently `summable_norm_inv_sq_riemannXiZeroRoot`, unconditional +normal convergence, and exact xi/product divisor matching are proved. +Separate upper bounds for xi and the canonical product do not control their +quotient near common zeros: a reciprocal-product estimate necessarily blows +up there, while the analytic quotient remains regular by cancellation. The +genuine remaining Hadamard input is therefore a minimum-modulus/cancelled- +quotient estimate, or an equivalent finite-order Hadamard factorization +theorem, sufficient to prove `SubquadraticLogNormGrowth` globally. +The geometric Cartan step is now formalized with exact constants: finitely +many exceptional disks with `2 * sum radii < b-a` leave a radius in `[a,b]` +whose centered circle avoids every disk. The project packages the weakest +remaining analytic statement as `CartanExceptionalDiskLogBound`: outside +such disks the quotient has the required annular log bound. +A finite minimum-modulus theorem is now also proved constructively: put an +equal disk of radius `H/(3n)` around each of `n` indexed roots. Outside these +disks, a monic root product is at least `(H/(3n))^n`, while a finite genus-one +product has the explicit lower bound obtained by multiplying +`(H/(3n))/‖ρ‖ * exp(-‖z‖/‖ρ‖)`. Combining this with circle selection gives +the same bound on a selected circle, and the theorem is instantiated for +canonical xi multiplicity windows. Far finite tails are quantitatively +controlled by +`exp(3‖z‖² * sum ‖ρ⁻¹‖²)-1`. +The finite-to-infinite tail passage is now proved: xi windows are cofinal, +inverse-square mass outside the window tends to zero, factor deviations are +summable, and the infinite tail obeys the same estimate uniformly on +`‖z‖≤R`. Finite head losses are bounded by +`card(window T) log T`, while Cauchy--Schwarz controls the inverse-root sum +by window cardinality and the global inverse-square mass. +Circle selection +proves `SubquadraticBoundaryLogNormGrowth`, and maximum modulus proves the +global disk estimate. Thus the genuine gap is now only the source-standard +passage from these finite head/tail estimates to a uniform subquadratic +outside-disk bound for the infinite cancelled quotient: specifically, a +quantitative dyadic rate such as `tailMass(R)=O(log R/R)` and a compatible +joint choice of truncation and selected radius. The dyadic series estimate is +now proved with constants: +`sum_{k≥N} shellMass(k) ≤ A(N+1)/2^N`, including xi multiplicities and the +finite low window. The remaining bookkeeping is to identify the radial +complementary-product tail with this shifted shell sum and then coordinate +the selected radius with that truncation. The first part is now exact: +boundary-safe half-open tail shells form a disjoint union of the complement +of the closed radius window, and the corresponding summable series reindexes +with multiplicities preserved. The explicit compatible scales +`R_j=2^j`, `N_j=4j` also satisfy +`R_j² (N_j+1)/2^N_j → 0`. What remains is to compare these boundary-safe +shells to the sourced xi shell bound inside the Cartan circle construction +and preserve its finite-head constants. That comparison is now proved, so +the actual closed-window complement satisfies +`tailMass(2^N) ≤ A(N+1)/2^N`. Tracking the finite-head bound exposes an +important scale correction: `N_j=4j` is unnecessarily aggressive and makes +the available head-count loss grow like `2^(4j)`, far beyond the circle +scale. The compatible choice is `N_j=j`: its tail exponent is +`O(j·2^j)=o(2^(2j))`, while the head root-log loss is +`O(2^j(j+1)^2)=o(2^(2j))`. The latter limit and Cartan circle selection on +`[2^j,2^(j+1)]` with disk budget `2^j` are formalized. Remaining work is the +single combined lower bound that multiplies this finite-head estimate by +the infinite complementary product estimate. The crucial signed/branch +piece is now closed: for `‖w‖≤1/2`, +`exp(-‖w‖²)≤‖E₁(w)‖`, proved through the principal complex logarithm, and +hence for `‖z‖≤T/2` the full complementary product is bounded below by +`exp(-‖z‖² tailMass(T))`. Thus the combined construction should use head +cutoff `T=2^(j+2)` on circles in `[2^j,2^(j+1)]`; this constant shift leaves +all subquadratic rates unchanged. The previous formal blocker was the +finite-head/complementary-tail `tprod` split and its multiplication with +the selected-circle lower bound. That split is now exact: the finite head is +multipliable by finiteness, the complement by summable factor deviations, +and `HasProd.mul_compl` gives the whole product without incorrectly requiring +a `CommGroup ℂ` instance. Multiplying both lower bounds yields an explicit +full-product minimum modulus on a circle in `[2^j,2^(j+1)]` with head cutoff +`2^(j+2)`. The remaining blocker is logarithmic aggregation of its head +cardinality/root-log/inverse-root terms with the xi upper-growth estimate, +then transfer to the cancelled quotient on those circles. The aggregation is +now exact: `riemannXiFiniteHeadLogLoss` records the three signed head terms, +the finite Cartan expression equals its negative exponential, and +`riemannXiFiniteHeadLogLoss_le` bounds it by the Jensen cardinality, +root-log, and Cauchy--Schwarz square-root majorants. Adding the tail loss +gives `riemannXiCanonicalCircleLogLoss`; xi's global order-one bound and the +pointwise normal-form quotient identity now yield a selected-circle bound +`‖q(z)‖ ≤ exp(C‖z‖log(‖z‖+2)+circleLoss(z))`. +The remaining genuine step is proving this explicit majorant is +`o(2^(2j))`, including the square-root term and the +`card·log(3 card/H)` contribution, before invoking maximum modulus. +The source count is now in exactly the needed multiplicity-aware form: +`card(window(2^(j+2))) ≤ B·2^j·(j+1)`. No unit-shell estimate is used. +Moreover, `log x≤x` gives +`card·log(3card/H)/H² ≤ 3B²(j+1)²/2^j`, and both this polynomial/geometric +majorant and the Cauchy--Schwarz square-root majorant +`sqrt(K(j+1)/2^j)` are proved to tend to zero. The remaining formal work is +assembling these estimates with the root-log and radial-tail terms into one +eventual epsilon inequality for `riemannXiCanonicalCircleLogLoss`; that +epsilon statement is the final input needed by the existing +maximum-modulus/rigidity pipeline. The three normalized shapes are now +combined into `DyadicCartanLossMajorant`, with a proved +`∀ ε>0, ∀ᶠ j, majorant j<ε` theorem. The remaining dominance proof must +reparameterize an arbitrary real scale `r` by a dyadic `j`. An initially +proposed refinement selected circles directly in `[r,2r]` with cutoff +`2^(j+3)`, but inspection of the maximum-modulus proof shows this is +unnecessary: the boundary interface only requires a circle radius +`R≥r`, with the logarithmic bound measured against `r²`. A new minimal +`DyadicSubquadraticBoundaryLogNormGrowth` interface is now formalized. +Choosing the next dyadic scale costs at most a factor four in the square, +absorbed by `ε/4`; this proves the original boundary interface, global disk +growth, and the complete xi Hadamard pipeline from dyadic boundary data. +`dyadicSubquadraticBoundaryLogNormGrowth_of_majorant` also converts any +eventual exponential circle estimate dominated by +`DyadicCartanLossMajorant` directly into that interface. The sole remaining +step is the concrete inequality placing the already-derived xi quotient +circle bound below one fixed choice of the three majorant constants. This +inequality is now proved explicitly: +`Ksq=2B+3B²`, `Ksqrt=4BM`, and `Klin=4C+3A`, where `A` is the radial-tail +constant, `B` the Jensen count constant, `C` the global xi-growth constant, +and `M` the total inverse-square zero mass. It discharges dyadic boundary +growth and proves the affine genus-one Hadamard representation whenever +`RiemannXiZeroIndex` is inhabited. The normalization gives exactly +`exp a=1` and the product form of the xi functional equation; it does not +canonically select `a` modulo `2πiℤ` or separately eliminate `b`. + +The zero-free branch is now eliminated internally, without RH or an imported +zero-existence theorem. For an empty divisor the canonical product is `1`; +the global order-one bound still gives dyadic boundary growth, hence xi is +exponential-affine. Differentiating its functional equation at `1/2` forces +the slope to vanish. The explicit sourced evaluation +`riemannXiLi 2 = π/3 ≠ 1` (from `ζ(2)=π²/6` and `π>3`) then contradicts +normalization. Thus `riemannXiZeroIndex_nonempty`, the affine genus-one +Hadamard representation, and its normalized form are unconditional across +empty/finite/infinite cases. + +The all-order finite product identity is proved, but the xi-level +`LiChangeOfVariablesCoefficientIdentity` remains the genuine blocker. It is +the analytic/combinatorial Möbius/Faà di Bruno identity between the derivative +definition at `s=1` and the logarithmic-derivative Taylor coefficients at +`z=0`; Hadamard convergence alone does not identify those two expressions. +The derivative-definition side is now fully expanded for every `n` by +`liDerivativeCoefficient_eq_leibnizSum`, using Mathlib's all-order Leibniz +rule and the closed derivative formula for `s^(n-1)`. The resulting explicit +finite sum has coefficients +`choose(n,i) * descFactorial(n-1,i)` and derivatives +`D^(n-i) log xi(1)`. `MobiusFaaDiBrunoCoefficientIdentity` states exactly +that the transformed logarithmic derivative has these coefficients, and is +proved equivalent to the old xi coefficient obligation. Thus no analytic +interchange remains hidden in the derivative definition; the blocker is the +pure all-order composition formula for `s=(1-z)⁻¹`. +The inner map itself is now completely discharged: +`iteratedDeriv_one_sub_inv` proves +`D^k(1-z)⁻¹ = k! (1-z)^(-(k+1))` at every point, and in particular the +derivative at zero is exactly `k!`. Expanding the outer composition leads to +the specialized recurrence +`D[(1-z)^(-p) D^m L((1-z)⁻¹)] = +p(1-z)^(-(p+1))D^m L + (1-z)^(-(p+2))D^(m+1)L`. +The remaining formal blocker is summing this recurrence and proving its +closed coefficients agree with the already-derived +`choose(k+1,i) * descFactorial(k,i)` expression. This is a pure finite +combinatorial Faà di Bruno step; no zeta estimate or infinite interchange is +left in it. +That finite combinatorial step is now closed. The triangular recurrence is +packaged as `IsMobiusFaaDiBrunoCoefficientRecurrence`, including its base, +support, and boundary cases. Pascal plus +`Nat.choose_succ_right_eq` proves that +`mobiusFaaDiBrunoCoefficient k i = choose(k+1,i) * descFactorial(k,i)` +satisfies the recurrence, and a two-index induction proves uniqueness. + +The remaining blocker has consequently moved to the analytic realization of +the recurrence: formalizing, on one neighborhood of zero, repeated +differentiation of +`(1-z)^(-p) D^m(log xi)((1-z)⁻¹)`. Mathlib contains a general +`HasFTaylorSeriesUpToOn.comp` Faà di Bruno theorem, but connecting its ordered +finite partitions to this specialized scalar recurrence (or proving the +local recurrence directly for iterated derivatives of an analytic germ) is +still required. Until that bridge is formalized, +`MobiusFaaDiBrunoCoefficientIdentity`, the all-order zero-sum formula, and +the positivity implications remain conditional. +One important Mathlib API gap in that bridge is now closed project-locally: +`AnalyticAt.differentiableAt_iteratedDeriv` transports analyticity through +Mathlib's `iteratedFDeriv` theorem and the scalar evaluation equivalence, +showing every one-variable `iteratedDeriv m` is differentiable at the germ. +This supplies the outer-derivative step needed in the recurrence. What +remains is reindexing the two finite contributions at each induction step. +The analytic differentiation itself is now explicit: +`hasDerivAt_mobiusFaaDiBrunoSummand` proves the exact product/chain rule for +one basis term, including the Möbius power shifts, and +`hasDerivAt_mobiusFaaDiBrunoSum` differentiates the complete finite sum +termwise with all truncated-subtraction boundaries checked. The remaining +finite algebra is to shift the product contribution from `i` to `i+1` and +identify the resulting coefficients with the proved triangular recurrence. +That finite algebra is now closed: +`mobiusFaaDiBrunoSum_reindex` proves the support-aware generic shift, and +`mobiusFaaDiBrunoCoefficientSum_reindex` specializes it to the closed +choose/falling-factorial array, including the zero top boundary. The +remaining coefficient-transfer obligation is no longer combinatorial: it is +the local analytic induction glue establishing the finite-sum formula as a +neighborhood identity before taking its next derivative. +That neighborhood induction is now formalized by +`iteratedDeriv_mobiusComposition_eq_row`: analyticity is pulled back through +the Möbius map to an eventual neighborhood, the prior row is replaced by an +eventually equal function, and its derivative is the collected next row. +`iteratedDeriv_mobiusComposition_zero` then gives the exact closed finite sum +at zero. The final xi-specific bridge still required is an eventual equality +between `logDeriv (liChangeOfVariables xi)` and the derivative of +`log xi ∘ liMobiusArgument` on the zero neighborhood; this needs explicit +nonvanishing and logarithm-chain bookkeeping. +That xi-specific bridge is now closed. Continuity of +`riemannXiLi ∘ liMobiusArgument` at zero and `xi(1)=1` give an eventual +neighborhood inside `Complex.slitPlane`, hence in particular a zero-free +neighborhood. `logDeriv_liChangeOfVariables_eq_mobiusLogDerivative` proves +the branch-compatible chain rule there, and eventual equality transfers all +iterated derivatives. Consequently +`riemannXiLi_mobiusFaaDiBrunoCoefficientIdentity` and +`riemannXiLi_changeOfVariablesCoefficientIdentity` are unconditional at +every order. + +The remaining zero-sum/RH-forward step is downstream rather than +combinatorial: the existing theorem +`riemannXiLi_finiteZeroLiSums_tendsto` now needs only an instantiated +`XiCanonicalProductApproximation` for the concrete zero windows. The +whole-plane Hadamard representation is proved, but that exact approximation +interface has not yet been derived from it. Bombieri--Lagarias +positivity-to-location remains a separate converse theorem. +The first half of that derivation is now concrete. The radial multiplicity +windows are proved cofinal by +`riemannXiZeroIndexWindow_nat_tendsto_atTop`; their finite genus-one products +converge locally uniformly to the infinite product; and +`exists_riemannXiRadialHadamardApproximants_tendstoLocallyUniformly` combines +them with the unconditional affine Hadamard prefactor to converge locally +uniformly to xi on the whole plane. + +The remaining mismatch with `XiCanonicalProductApproximation` is exact and +cannot be suppressed: that interface uses unscaled products centered at +`s=1`, while the proved approximants are zero-centered genus-one products +with the fixed affine factor. Passing between them requires proving that the +radial inverse-root correction converges to the negative Hadamard slope and +that the centering constants normalize to one. In addition, the criterion's +current windows are zeta-divisor multisets, whereas the Hadamard approximants +use the canonical xi multiplicity enumeration; their finite-window +multiplicity-preserving identification is not yet formalized. +The reflection algebra and multiplicity transport are now explicit: +`riemannXiZeroReflection` sends every canonical multiplicity occurrence to +the corresponding occurrence over `1-rho`, preserving its fiber ordinal, +and `riemannXiZeroRoot_inv_add_reflection` proves +`rho⁻¹ + (1-rho)⁻¹ = (rho(1-rho))⁻¹`. Thus paired inverse-root corrections +have the desired inverse-quadratic form. + +This also exposes why the current radial route cannot yet prove the slope +limit. `riemannXiZeroReflection_mem_window_add_one` only maps the radius-`R` +window into radius `R+1`; radial windows are not exactly reflection +invariant. The available Jensen bound is cumulative `O(R log R)` and gives no +small enough unit-shell boundary count to discard that imbalance. A valid +closure therefore needs either a sourced Riemann--von Mangoldt/unit-shell +estimate, or finite symmetric-height windows. The latter additionally needs +the currently absent unconditional theorem placing every xi zero in a fixed +real strip. Assuming radial symmetry here would be false. +The fixed-strip branch is now closed without RH: +`riemannXiLi_zero_re_pos` and `riemannXiLi_zero_re_lt_one` combine zeta +nonvanishing on `Re s ≥ 1` with xi's functional equation to place every xi +zero in `0 < Re rho < 1`. Consequently +`riemannXiZeroHeightWindow` is finite, radial and height windows contain each +other with the sharp additive-one comparison, and both exhaustions are +cofinal. + +Height windows are exactly reflection-stable with multiplicity: +`riemannXiZeroHeightWindow_map_reflection` proves reflection permutes each +finite index set, and `two_mul_sum_inv_riemannXiZeroHeightWindow` proves the +finite paired identity +`2 ∑ rho⁻¹ = ∑ (rho(1-rho))⁻¹`. Their genus-one Hadamard approximants now +also converge locally uniformly to xi after the affine prefactor is restored. +The remaining slope step is to pass this paired finite identity to the limit +and identify it with the Hadamard slope. Conjugation stability is also still +missing because pinned Mathlib exposes no completed-zeta conjugation theorem. +The limit half is now closed: +`summable_riemannXiZeroRoot_inv_mul_reflection` proves absolute summability +of `1/(rho(1-rho))` by AM--GM from the established inverse-square sum, and +`riemannXiInverseRootHeightSums_tendsto` identifies the symmetric-height +inverse-root limit with half that `tsum`. Moreover, +`logDeriv_riemannXiHeightGenusOneProduct_one` identifies every finite paired +sum as the logarithmic derivative at `1` of the corresponding genus-one +product. The exact remaining slope obligation is therefore derivative +passage through the locally uniform product limit, combined with the +functional equation and normalized affine representation. +That derivative obligation is now closed. Locally uniform convergence of the +height-window genus-one products is passed through Mathlib's Weierstrass +derivative theorem at `0` and `1`. The infinite canonical product has +derivative zero at `0`, while its logarithmic derivative at `1` is exactly +the paired inverse-root `tsum`. Differentiating xi's functional equation then +proves +`exists_riemannXiHadamardSlope_eq_pairedInverseRootSum`, namely +`∑ 1/(rho(1-rho)) = -2b`, and hence the symmetric-height sums +`∑ 1/rho` converge to the negative Hadamard slope `-b`. + +The remaining route is no longer blocked on slope. It is blocked on +conjugation (Mathlib has `Gamma_conj` and `conj_tsum`, but no packaged +Riemann-zeta/completed-zeta conjugation theorem) and on the global +classification of the definition's nontrivial zeta zeros into the critical +strip. Those are required before the multiplicity-exact xi/zeta height-window +bijection and concrete `XiCanonicalProductApproximation` can be completed. +No all-index Li criterion or Bombieri--Lagarias converse is overclaimed. +Plain tail convergence is +insufficient after multiplication by `R²`. It is not circle selection or any +subsequent quotient, logarithm, rigidity, or continuation step. The +xi-specific pipeline states: +`CartanExceptionalDiskLogBound` alone implies +`GenusOneHadamardRepresentation riemannXiZeroRoot riemannXiLi`. + +Reflection symmetry plus Bombieri--Lagarias summability still admits an +explicit finite off-line spectrum. Thus those hypotheses alone do not prove +the critical line; the exact remaining spectral result is the +Bombieri--Lagarias theorem that positivity of the genuine convergent Li sums +forces the individual unit-disk bounds. +The project now records the equivalent source-shaped conclusion +`1/2 ≤ re ρ`; reflection symmetry then supplies the opposite inequality. +It also packages complete spectral enumeration, summability, symmetric Li +limits, and reflection into `RiemannLiSpectralModel`; positivity plus the +actual Bombieri--Lagarias half-plane implication then derives RH without +assuming RH. + +After infrastructure (1), proving all coefficients nonnegative directly +would itself prove RH via (2); it is not a finite or computational next step. +The development therefore stops at the first genuine missing theorem rather +than assuming either bridge. + +The finite logarithmic-derivative formula is not a recurrence in `n`. +Coefficient positivity supplies no relation determining a later coefficient +from earlier ones, and the existing `finitePrefixSpoof` theorem continues to +rule out extrapolation from any fixed prefix. diff --git a/docs/research/rh-formal-routes-index.md b/docs/research/rh-formal-routes-index.md new file mode 100644 index 00000000..6d8cf6b1 --- /dev/null +++ b/docs/research/rh-formal-routes-index.md @@ -0,0 +1,287 @@ +# Formal RH route index + +This integration is a common, non-runtime base for three independent formal +research routes. It remains stacked on PR #236; its base branch was fetched at +`dc44e199e45f2abea1e7b4f5f7c168e0309b4a1a` during third-stage integration. +The route history forked from the earlier base head +`d4042140f10e0fd231bdfbcf814d068487b15f82`. None of the routes proves the +Riemann Hypothesis, and no finite calculation is promoted to an all-degree, +all-index, or all-test theorem. + +## Integrated source snapshots + +The first-stage source worktrees were uncommitted on the earlier +`d4042140f10e0fd231bdfbcf814d068487b15f82` base. The bundle hash is SHA-256 +over the sorted intentional route paths, with each relative path and file +content separated by a NUL byte. + +| Route | Source branch | Bundle SHA-256 | +| --- | --- | --- | +| Jensen / Laguerre--Pólya | `agent/rh-jensen-laguerre-polya-0730` | `cb9fa16ba89397fdbc2e269bceb7b6fe6559b871ffa36118a9a307ad316fded3` | +| Li criterion | `agent/li-criterion-route-0730` | `ef486b9b9dd69ff3e330bb08cb75a46c16dad1ce5c8686a71f1c3283ac6b7528` | +| Weil positivity | `agent/weil-positivity-rh-0730` | `5ad75565ea9b4f4a25b932ae9f1efadd5283a2693b73e1ce62352f97c7ac21c9` | + +The second-stage route commits were then cherry-picked without conflicts: + +| Route | Source branch | Source commit | +| --- | --- | --- | +| Jensen / Laguerre--Pólya | `agent/rh-jensen-laguerre-polya-0730-v2` | `b82952e87b05d8e0b77ed0124ca9b9503bd48a7c` | +| Li criterion | `agent/li-zero-multiset-0730` | `9220843f7961b97915dcb86392fe88944bb004a2` | +| Weil positivity | `AgentMemory/rh-weil-approximants-0730` | `d91b02f611b62560b83fb80c79fc3fa005d07db3` | + +The third-stage route commits were also cherry-picked without conflicts: + +| Route | Source branch | Source commit | +| --- | --- | --- | +| Jensen / Laguerre--Pólya | `agent/rh-jensen-lp-stage3-0731` | `cd47e5727cc4aa1faafdf8bc7c4667212045f20f` | +| Li criterion | `AgentMemory/rh-formal-routes-stage3-0731` | `f8db4fee054ba71e3f106500a7ffd8c69b39eda1` | +| Weil positivity | `agent/weil-positivity-stage3-0731` | `542ce60a773548ee38a62dca119727ca2130b601` | + +Exact bibliographic citations, normalizations, source locations, and pinned +Mathlib revision are preserved in: + +- `docs/research/rh-jensen-source-cards.json` +- `docs/source-cards/li-criterion.md` +- `docs/weil-positivity-sources.yaml` + +## Proven finite support and open bridges + +### Jensen / Laguerre--Pólya + +Proved: the project xi normalization is entire and symmetric; the centered +generating function is entire and even; global completed-zeta conjugation from +the pinned Dirichlet-series/Gamma/cpow declarations and analytic uniqueness; +real normalized xi coefficients and the sourced even `HasSum` Taylor +expansion; exact +degree-zero through degree-three Jensen formulas; the coefficientwise +derivative identity relating degree `d + 1`, shift `n` to degree `d`, shift +`n + 1`; the equivalence between all Jensen obligations and all nested finite +`JensenSquare` obligations; monotonicity of those squares; the conditional +reduction from all shifts to the unshifted family; Gauss--Lucas derivative +closure whenever the derivative is nonzero; pointwise coefficient +nonvanishing as a sufficient condition for every Jensen polynomial to be +nonzero; exact window nondegeneracy and its equivalence to no adjacent zero +coefficients; the pinned modified-theta Mellin representation; the explicit +Riemann `Phi` summand formula, strict positivity, pointwise summability, +continuity, explicit exponential decay, kernel symmetry/positivity, and +integrability of every polynomial moment; a normalized concrete-`Phi` moment interface +proving strict xi coefficient positivity and nondegeneracy; project-local +termwise theta identity expressing each positive-half-line `Phi` summand as a +shifted second derivative, an explicit common summable majorant through two +derivatives, the summed identity, and its exact identification with +`WeakFEPair.f_modif (exp(2u))` including the two pieces and zero boundary; the +finite Mellin substitution `x = exp(2u)`, lower-half modular transform, +symmetric complex-cosh formula, improper truncation limit, and exact +completed-zeta cosh representation; explicit decay of the theta tail and its first two derivatives, +the modular reflection formula and exact derivative `-1/4` at zero, and +finite/improper cosh-transform double integration by parts on `|r| < 3/2`; +all-minor Toeplitz/PF definitions, their +coefficient-nonnegativity and log-concavity consequences, and the exact +finite-ASW-to-all-Jensen reduction; finite ASW through nondegenerate degree two +with nonpositive root location, an explicit selected-minor insufficiency +counterexample, an all-order tridiagonal determinant recurrence with exact +Toeplitz-minor normalization, and a proved ratio-oscillation theorem yielding +the sharp factor-four bound, plus bounded-degree PF/Jensen reductions; an actual +finite-ASW iff interface with explicit support/nonzero/zero cases, and a +degree-three reduction from all minors to the exact cubic discriminant +principle; an actual +locally-uniform hyperbolic-limit interface whose limits are proved entire and +conjugation-symmetric; a project-local Jensen-formula proof of quantitative +disk zero preservation, the Hurwitz dichotomy on every open preconnected +domain, and the required half-plane closure; unconditional zero reality for +every nonzero locally uniform hyperbolic limit; the +ordinary xi generating function's everywhere-convergent series, squared +relation to centered xi, infinite radius, entirety, and locally uniform Taylor +approximation; degree-one hyperbolicity; the +nondegenerate degree-two Turán/root, hyperbolicity, and positive-log-concave +lemmas; and the nondegenerate cubic discriminant criterion. The unconditional +derivative closure statement is refuted by the constant-polynomial case, and +an explicit positive log-concave sequence refutes propagation from all +quadratics to the cubic. +The explicit rescaled Jensen sequence is proved hyperbolic whenever all Jensen +polynomials are, and its locally uniform convergence is isolated as the exact +remaining Pólya--Jensen approximation theorem. + +The exact `xiGamma` moment representation is now proved through a weighted +Phi measure, complex-MGF differentiation, and analytic uniqueness. Coefficient +positivity/nondegeneracy and the reduction from all shifts to the unshifted +family are unconditional. + +Open: the cubic all-minor discriminant principle and finite ASW in arbitrary +degree; the isolated real-zero-to-Jensen-hyperbolicity canonical-product +theorem; actual xi-window total positivity; and the all-degree +unshifted family (equivalently, under nondegeneracy, +`AllJensenHyperbolic xiGamma`). Known eventual hyperbolicity, bounded-degree +results, and ordinary Turán inequalities do not prove this all-degree target. + +The reverse bridge is closed: compact-uniform convergence of the rescaled +Jensen triangular array, Laguerre--Pólya/Hurwitz zero transfer, exact +completed-zeta factor handling, and positivity on the nonnegative generating +axis now prove `AllJensenHyperbolic xiGamma → RiemannHypothesis`. +Conversely, RH is now proved equivalent to the exact centered-xi +critical-axis zero statement; only the classical canonical-product step from +that zero statement to every Jensen polynomial remains. +That step is now factored into a positive genus-zero product representation +and the reverse Pólya--Jensen criterion. Finite paired products are formally +hyperbolic and their local-uniform limit gives the concrete LP membership. +The exact genus-one pair cancellation and normal convergence of the resulting +genus-zero product from inverse-square zero summability are also formalized. +An exact normalized product identity now automatically constructs the +project's LP membership; the remaining Hadamard obligation is only the global +divisor-to-function equality. +The final affine quotient ambiguity is also discharged: centered evenness +forces the `exp(a+bz)` factor's linear coefficient to vanish, evaluation at +zero fixes the constant, and complex square-root surjectivity transfers the +centered paired product to the generating variable. What remains is the +multiplicity-correct divisor construction and order-one quotient rigidity, +followed independently by reverse Pólya--Jensen (or general finite ASW). +Centered xi now also has a canonical countable zero index carrying exact +analytic multiplicity, a negation pairing, positive-imaginary orbit +representatives under RH, and a normally convergent paired product conditional +only on inverse-square zero summability. Product divisor equality and +exponential-affine quotient rigidity remain the precise Hadamard blockers. +Canonical dyadic shells now prove inverse-square summability from the exact +order-one `O(2^N(N+1))` multiplicity count expected from Jensen/Riemann--von +Mangoldt; that quantitative count is absent from pinned Mathlib. Under RH the +paired product has exactly the centered-xi zero set and matching divisor +support, so only local multiplicity equality—not extra-zero control—remains +before quotient rigidity. +The finite paired fiber is now isolated from its analytic nonvanishing +complement, proving exact local orders and full paired-product divisor equality +under RH plus inverse-square summability. The cumulative +`O(r log(2r+2))` multiplicity count now implies the dyadic premise directly. +The remaining Hadamard blocker is therefore the actual quantitative xi count +and the minimum-modulus/subquadratic quotient-rigidity theorem, not local +multiplicity bookkeeping. +Exact divisor cancellation now yields an entire zero-free quotient with a +global analytic logarithm. Subquadratic norm growth of that logarithm is proved +to force an affine exponential quotient, after which evenness and the center +value normalize the product exactly. The remaining quotient theorem is the +Cartan/minimum-modulus estimate establishing this explicit subquadratic growth +condition. +The quotient route is now sharpened to the natural Cartan output: +finite exceptional disks of sufficiently small total diameter give a selected +centered circle, maximum modulus gives disk bounds for `log ‖quotient‖`, and +Borel--Carathéodory forces its analytic logarithm affine. Thus the normalized +product follows from the cumulative xi count plus one xi-specific +exceptional-disk estimate. Pinned Mathlib contains neither the quantitative +Riemann--von Mangoldt count nor that infinite-product minimum-modulus estimate. +The paired-product estimate itself is now explicit: a finite positive-zero +window is separated from its inverse-square tail, radial interval avoidance +selects a circle with a finite-head lower bound, and summable logarithms give +the infinite-tail lower bound. Their product bounds the full paired product, +and hence the cancelled quotient. The normalized loss analysis is also closed: +cofinal positive-zero windows make the inverse-square tail vanish, and the +head/cardinality and order-one terms are respectively +`O((j+1)^2/2^j)` and `O((j+1)/2^j)`. A dyadic quotient estimate with this +majorant now implies selected-circle growth, global subquadratic log-norm +growth, affine rigidity, and the normalized product. The remaining analytic +gap is to derive that concrete quotient circle estimate from the global xi +upper bound and the explicit product lower bound. +The actual cumulative centered-xi count is now proved: the Li route's +Gamma/Mellin-strip order-one estimate is transferred to the centered +normalization, and Jensen's circle-average formula bounds the +multiplicity-index window by `O(r log(2r+2))`. This unconditionally supplies +the inverse-square and dyadic cardinality premises used above. +The remaining quotient-circle gap is also closed. The explicit product lower +bound and xi upper bound give a selected-circle quotient estimate whose +head/root-log, cardinality-log, and shifted tail losses are all `o(r²)`. +Dyadic-to-cofinal growth, affine rigidity, and normalization therefore prove +the exact centered-xi paired-product identity under RH zero reality. The +remaining converse is reverse Pólya--Jensen (or general finite ASW), not +Hadamard product identification. +The analytic closure portion of reverse Pólya--Jensen is now proved: +coefficientwise limits of hyperbolic Jensen rows converge locally uniformly, +Hurwitz preserves their real zeros, and nondegeneracy propagates the +unshifted result through all shifts. Iterated-derivative convergence supplies +the coefficient-extraction mechanism. The exact residual finite theorem is +the real-rootedness of the weighted Jensen rows of finite positive genus-zero +products, equivalently the needed Schur--Szegő/weighted-matching step; full +finite ASW would also discharge it. + +The exact binomial-coordinate composition and Jensen kernel are now +formalized, including a proof that their composition is precisely the +finite-product Jensen row for every relative choice of the product length and +Jensen degree. The remaining implication is split cleanly into finite +Schur--Szegő preservation for nonpositive roots and nonpositive-rootedness of +the reversed generalized-Laguerre kernel; these finite root-location theorems, +not normalization or limit passage, are the current blocker. + +Boundary handling is now exact: `X` and `1` at ambient binomial degree one +give a formal counterexample to the strict nonzero-output formulation, so the +Schur--Szegő interface now concludes “zero or nonpositive-rooted.” The +genus-zero application excludes zero using its constant coefficient. +Generalized-Laguerre kernel rootedness is proved for either zero parameter and +for Jensen degree one, leaving the genuine all-degree oscillation result. + +### Li criterion + +Proved: the Li-normalized xi endpoint values, entirety and functional +equation; elementary coefficient identities; finite-prefix positivity +properties; zero-summand and multiplicity-aware finite-multiset identities; +finite Li-sum nonnegativity for roots on the critical line; a +symmetric-height Cauchy/limit interface with uniqueness and approximation +transfer; exact logarithmic-derivative identities for finite zero products; +the intrinsic `analyticOrderAt`-based zeta-zero order and its zero-set +characterization away from the pole; locally uniform transfer of every +derivative and, on a common nonvanishing neighborhood, logarithmic +derivatives; normalized Taylor-coefficient convergence; an abstract +all-index transfer from finite multiplicity-aware Li sums to the limiting +logarithmic derivative; the truncated generating-polynomial recurrence; and a +formal `finitePrefixSpoof` counterexample showing that any fixed positive +prefix need not imply all-index positivity. + +Open: construct the actual nontrivial-zeta-zero multiset with analytic +multiplicity; prove the symmetric-height truncations Cauchy; construct +finite xi/Hadamard approximants; prove their locally uniform convergence and +a common nonvanishing neighborhood after the Li change of variables; discharge +the finite all-order Taylor identity needed by the abstract transfer theorem; +thereby identify the analytic coefficients with the multiplicity-aware zero +sums and prove their reality; then formalize Li's all-`n` nonnegativity +equivalence with Mathlib's RH proposition. +`RiemannLiCriterionStatement` remains an unproved proposition. + +### Weil positivity + +Proved: the smooth compactly supported test interface, involution laws, +convolution closure, the critical-line Fourier normalization, typed finite +zero/prime sums and exact finite-formula stages, nonnegative finite +critical-line energies, transfer of exact explicit-formula identities and +positivity through pointwise, eventual-pointwise, uniform-on-subclass, and +quantified-error limits; bounded-monotone supremum limits; separately typed +zero, prime-power, archimedean, and pole approximants with an algebraic limit +combination theorem; finite distinct-zeta-zero windows from Mathlib's +discreteness theorem; the von Mangoldt \(-\zeta'/\zeta\) identity on +\(\Re s>1\); a counterexample showing finite positivity without convergence +does not control an independently declared limit; finite Gram +positive-semidefinite certificates and their restrictions; and an explicit +Hermitian kernel with a negative direction. + +Open: discharge the named `MellinNormalizationObligation`, +`ZeroRegularizationObligation`, `PrimePowerStabilizationObligation`, and +`ArchimedeanLimitObligation`; combine them in `AnalyticBridgeObligations` to +obtain the actual normalized Guinand--Weil formula; and separately prove both +directions in `AllTestPositivityObligation`. `BridgeObligation` is only the +unproved interface; finite stages, finite PSD certificates, and limit-transfer +lemmas without the actual zeta convergence hypotheses cannot discharge it. +Mathlib's zero set has no multiplicities, and its right-half-plane logarithmic +derivative theorem does not supply symmetric zero regularization or the +archimedean explicit-formula term. + +## Research priority + +1. Build shared multiplicity-aware nontrivial-zero indexing and + symmetric-height regularization without asserting a criterion. +2. Discharge one named analytic bridge at a time: Jensen actual-family + nondegeneracy and all-degree unshifted hyperbolicity, the zeta-specific hypotheses of the + Li/Hadamard coefficient-transfer theorem, or the four finite-to-limit + Guinand--Weil obligations. +3. Formalize the corresponding source criterion only behind the existing + explicit propositions: Pólya--Jensen, Li, or all-test Weil positivity. +4. Keep finite computations as falsifiable support tests only. Do not infer an + all-degree, all-index, or all-test statement from a finite restriction. + +The route-specific status documents contain the detailed next obligations: +`docs/research/rh-jensen-route.md`, +`docs/research/li-coefficients-route.md`, and +`docs/weil-positivity-route.md`. diff --git a/docs/research/rh-jensen-route.md b/docs/research/rh-jensen-route.md new file mode 100644 index 00000000..67b987c5 --- /dev/null +++ b/docs/research/rh-jensen-route.md @@ -0,0 +1,574 @@ +# Jensen polynomial / Laguerre–Pólya route + +## Scope and normalization + +The Lean route uses the normalization in Griffin–Ono–Rolen–Zagier (2019), +equations (1)–(2). Mathlib supplies the entire pole-removed completed zeta +`completedRiemannZeta₀`, not a declaration named `riemannXi`. The project-local +definition + +`riemannXi(s) = (1 + s(s-1) completedRiemannZeta₀(s)) / 2` + +is the entire continuation of the classical +`ξ(s) = s(s-1) Λ(s)/2`. Consequently `xiJensenEntire(z) = 8 ξ(1/2+z)` +matches the left side of GORZ equation (1). `xiGammaComplex(n)` uses the +derivative normalization `n!/(2n)!`; `xiGamma(n)` is its real part. Lean now +proves that `xiGammaComplex(n)` is exactly the complex scalar extension of +`xiGamma(n)` and proves the sourced even Taylor expansion as a `HasSum`. + +## Formal chain and status + +1. **Pinned RH root** — `KakeyaRiemannHypothesisRoot` is definitionally + Mathlib's `RiemannHypothesis`. Proved in + `KakeyaLeanGate/RiemannHypothesisRoot.lean`. +2. **Entire xi normalization** — `riemannXi`, + `differentiable_riemannXi`, and `riemannXi_one_sub`. Proved. +3. **Centered generating function and Taylor data** — + `xiJensenEntire`, its entirety/evenness, `xiGammaComplex`, `xiGamma`, and + the full Mathlib Taylor expansion. `completedRiemannZeta₀_conj` proves + global completed-zeta conjugation from the Dirichlet series on `Re(s)>1`, + `Gamma_conj`, `cpow_conj`, and analytic uniqueness. Consequently + `xiGammaComplex_im_zero`, `xiGammaComplex_eq_ofReal`, odd-derivative + vanishing, and `xiJensenEntire_hasSum_xiGamma` are proved. The pinned + defining integral is now exposed exactly by + `completedRiemannZeta₀_eq_mellin` and `completedZetaMellinKernel`. + `riemannPhiTerm` is the authoritative explicit Riemann `Φ` summand from + Lagarias--Montague, in a factored form. Lean proves its equality to the + published formula, strict positivity, summability over the positive integer + index, and the resulting `riemannPhi` kernel's strict positivity and + symmetry. A summable Weierstrass majorant gives continuity and the global + bound `Phi(u) <= C exp(-3|u|/2)`; consequently + `integrable_riemannPhi_mul_pow` proves every polynomial moment integrable. + A second explicit summable majorant now controls the theta summands and + their first two derivatives on every bounded positive interval. + `riemannPhi_eq_thetaTail_shifted_second_deriv` is the resulting summed + identity. `evenKernel_zero_sub_one_eq_two_mul_thetaSeries` and + `riemannThetaTail_eq_f_modif` identify that tail with pinned Mathlib's + `WeakFEPair.f_modif (exp(2u))`; both open pieces and the deliberately zero + boundary value at `x = 1` are formalized. The finite Mellin substitution + `x = exp(2u)`, lower-half modular reflection, symmetric truncation, and exact + complex cosh representation are proved. An `AECover` argument passes these + truncations to the pinned improper Mellin integral. + A separate summable estimate proves + exponential decay of the tail and its first two derivatives. The modular + theta equation gives the exact reflection formula and forces + `thetaTail'(0) = -1/4`. The finite and improper cosh-transform double + integration-by-parts identities are now unconditional on `|r| < 3/2`, + including weighted integrability and every endpoint term. + The weighted `riemannPhiMeasure` has a nontrivial exponential-moment strip. + Mathlib's complex-MGF differentiation theorem, analytic uniqueness, and the + cosh identity prove every centered derivative moment with exact factor `8`. + Thus `xiGamma_momentRepresentation`, strict positivity, and coefficient + nondegeneracy are now unconditional. +4. **Jensen family** — `jensenPolynomial`, its coefficient formula, and exact + degree-zero/one/two/three formulas. Proved. +5. **Hyperbolicity interface** — `Hyperbolic` means every complex root of the + scalar extension is real; `AllJensenHyperbolic` quantifies over every degree + `d >= 1` and every shift `n >= 0`, exactly as in the cited criterion. + Definitions elaborate. +6. **Finite RH-relevant algebra** — every nonconstant degree-one Jensen + polynomial is hyperbolic. For degree two, the explicit roots exist exactly + when `a(n+1)^2 - a(n)a(n+2) >= 0` (assuming the quadratic coefficient is + nonzero), and that condition proves hyperbolicity in the project predicate. + Strict positivity plus sequence log-concavity therefore proves every + degree-two Jensen polynomial hyperbolic. For degree three, + `cubic_hyperbolic_of_discriminant_nonnegative` proves the standard + nonnegative-discriminant criterion, specialized by + `jensenPolynomial_degree_three_hyperbolic`. These statements do not imply + RH. +7. **Differentiation identity** — O’Sullivan equation (3.1) specializes to + + `derivative (J(a,d+1,n)) = C(d+1) * J(a,d,n+1)`. + + This identity is proved coefficientwise in Lean. Pinned Mathlib's + `Polynomial.rootSet_derivative_subset_convexHull_rootSet` (Gauss–Lucas) now + proves `hyperbolic_derivative` whenever the derivative is nonzero. Lean also + proves that unconditional derivative closure is false for the current + predicate: `1` is hyperbolic while its zero derivative is not. + Consequently, under the exact `NonzeroJensenFamily` hypothesis, + all-degree/all-shift hyperbolicity is equivalent to hyperbolicity of + `J(a,d,0)` for every degree `d`. `PointwiseNonzero a` is a proved sufficient + condition. The sharper theorem + `nonzeroJensenFamily_iff_windowNonzero` identifies the exact coefficient + condition: every positive-length coefficient window contains a nonzero + entry. This is now sharpened by + `jensenWindowNonzero_iff_noAdjacentZeros`: the exact condition is simply + that no two consecutive coefficients vanish. Isolated zeros are allowed. +8. **Nested finite obligations** — `JensenSquare a k` asks for hyperbolicity + only when positive degree and shift are both at most `k`. Lean proves + + `AllJensenHyperbolic a ↔ ∀ k, JensenSquare a k` + + and proves these squares are nested under decreasing `k`. This is a genuine + finite-obligation reduction, not a decision procedure. +9. **False degree propagation rejected** — `turanOnlySequence` is strictly + positive and log-concave, so all its quadratic Jensen polynomials are + hyperbolic, but Lean exhibits an explicit nonreal root of its unshifted + cubic. Thus ordinary Turán inequalities cannot seed induction in degree. +10. **Classical analytic bridge** — `xiJensenGeneratingFunction` is the + ordinary exponential generating function in the squared variable, and + Lean now proves its series converges everywhere, + `xiJensenGeneratingFunction(z²) = xiJensenEntire(z)`, its formal power + series has infinite radius, and the function is entire. Its genuine power + series partial sums converge locally uniformly on all of `ℂ`. + `LocallyUniformHyperbolicLimit` now gives a literal local-uniform limit of + real hyperbolic polynomials on `ℂ`. Lean proves such a limit is entire via + Mathlib's Weierstrass theorem. `AnalyticBridgeObligations` factors the + remaining theorem into Jensen-to-limit and limit-to-RH equivalences and + formally composes them into the original `BridgeObligations`. + The source says the xi generating function + is in the Laguerre–Pólya class iff all its Jensen polynomials are + hyperbolic, and this is equivalent to RH. No theorem asserts those source + bridges. + +## Exact source-backed criterion + +O’Sullivan (2021), Theorem 3.1, states the Pólya–Schur theorem with no hidden +analytic hypothesis on the formal series: for real `c_j`, the formal +exponential generating series `Φ(z)=Σ c_j z^j/j!` converges compact-uniformly +to a Laguerre–Pólya entire function iff every Jensen polynomial +`g_d(Φ;x)=Σ choose(d,j)c_j x^j` is hyperbolic, for every `d >= 1`. + +For `Θ(z)=ξ(1/2+sqrt(z))=Σ γ(m)z^m/m!`, equation (3.2) identifies +`J^{d,n}=g_d(Θ^(n))`. Corollary 3.2 gives +`Θ^(n) hyperbolic ↔ ∀ d>=1, J^{d,n} hyperbolic`, and Theorem 1.1 gives +`RH ↔ ∀ d>=1 ∀ n>=0, J^{d,n} hyperbolic`. These are the exact obligations; +eventual hyperbolicity is not substituted for either direction. + +## Pinned Mathlib audit + +Pinned revision: Mathlib `v4.32.0-rc1`, +`360da6fa66c1273b76b6b2d8c5666fd5ac2e3b56`. + +Available and used: + +- `RiemannHypothesis`, `riemannZeta`, `completedRiemannZeta`, + `completedRiemannZeta₀`, `differentiable_completedZeta₀`, + `completedRiemannZeta₀_one_sub`; +- `iteratedDeriv`, `iteratedDeriv_comp_neg`, + `Complex.taylorSeries_eq_of_entire'`, + `Differentiable.hasFPowerSeriesOnBall`; +- `Polynomial`, `Polynomial.IsRoot`, `Polynomial.Splits`, + `Polynomial.finsetSum_coeff`, `Polynomial.coeff_derivative`; +- `Polynomial.rootSet_derivative_subset_convexHull_rootSet` (Gauss–Lucas), + used to prove nonzero-derivative preservation for the route's exact + `Hyperbolic` predicate; +- `deriv_conj_conj`, used to prove that conjugation symmetry forces all + iterated derivatives at zero to be real; +- `zeta_eq_tsum_one_div_nat_add_one_cpow`, `Complex.conj_tsum`, + `Complex.cpow_conj`, `Complex.Gamma_conj`, and + `AnalyticOnNhd.eq_of_eventuallyEq`, combined to prove global + `completedRiemannZeta₀_conj`; +- `TendstoLocallyUniformlyOn`, + `TendstoLocallyUniformlyOn.differentiableOn`, + `TendstoLocallyUniformlyOn.deriv`, and power-series partial-sum local + uniform convergence. +- `AnalyticOnNhd.eqOn_zero_of_preconnected_of_eventuallyEq_zero`, used to + propagate Hurwitz's half-plane identically-zero alternative to all of `ℂ`; + consequently one global nonzero witness suffices for zero reality. +- `WeakFEPair.Λ₀`, `WeakFEPair.f_modif`, and `mellin`, which unfold pinned + `completedRiemannZeta₀` to its exact modified Jacobi-theta Mellin integral; +- finite matrices, submatrices and determinants, used for the project-local + all-minor Toeplitz/Pólya-frequency predicate. + +Not found in the pinned library: + +- a Riemann xi declaration or theorem identifying its zeros with nontrivial + zeta zeros; +- a polynomial `IsRealRooted`/hyperbolicity predicate; +- a Laguerre–Pólya class definition; +- Jensen polynomials or the Pólya–Jensen criterion; +- a compact-uniform closure theorem specialized to real-rooted polynomials; +- the integration-by-parts/change-of-variables theorem identifying the pinned + modified-theta Mellin integral with moments of the now-formalized explicit + positive Riemann `Φ` kernel (moment integrability is now proved); +- the finite Aissen–Schoenberg–Whitney theorem beyond degree one (degree one, + including nonpositive root location, is now proved project-locally); +- a prepackaged conjugation theorem for `completedRiemannZeta₀` (the route now + derives it from the declarations listed above). + +The project-local definitions cover only the standard typed interfaces. +The missing analytic theorems have not been replaced by assumptions. + +## Exact blocker + +The eventual theorem has quantifier order + +`forall d, exists N(d), forall n >= N(d), Hyperbolic(J(d,n))`. + +RH requires (equivalently, according to the cited criterion) + +`forall d, forall n, Hyperbolic(J(d,n))`. + +The first statement leaves a finite but degree-dependent set of shifts +`n < N(d)` for every degree. Even the all-shifts results for any fixed finite +degree range leave every larger degree untreated. Neither result implies the +required all-degree/all-shift statement, and compact-uniform convergence to a +Hermite polynomial for fixed degree does not reverse this quantifier gap. + +The completed-zeta conjugation, coefficient-reality, and sourced even Taylor +expansion gaps are now closed. The unconditional formal reduction gives the +nested family: + +`forall k, JensenSquare xiGamma k`. + +Under the exact `XiCoefficientNondegeneracy`, equivalently no two consecutive +`xiGamma` coefficients vanishing, the same target reduces further to +`XiUnshiftedHyperbolicity`: + +`forall d >= 1, Hyperbolic (jensenPolynomial xiGamma d 0)`. + +`XiGammaMomentRepresentation` is now proved. The lower Mellin half is reflected, +the symmetric finite identity is passed to the improper integral, and the +resulting xi/Phi transform is differentiated to every order through a weighted +measure whose exponential-moment strip contains zero. Analytic uniqueness +identifies this transform with `xiJensenEntire`, yielding exact factor `8`. +Consequently `xiGamma` is strictly positive, coefficient nondegeneracy is +unconditional, and all shifts reduce to `XiUnshiftedHyperbolicity`. The +all-degree unshifted family—not Mellin analysis or differentiation—is now the +exact coefficient-side mathematical blocker. Strict positivity +and log-concavity settle only degree two. The Lean theorem +`turanOnlySequence_degree_three_not_hyperbolic` proves this failure +constructively, even while every degree-two member is hyperbolic. + +For degree-two ASW, `quadraticToeplitzShiftMinor` is the actual unbounded +family of contiguous Toeplitz continuants supplied by total nonnegativity. +The determinants are now computed formally in orders zero through three: +`D₀=1`, `D₁=b₁`, `D₂=b₁²-b₀b₂`, and under quadratic support +`D₃=b₁³-2b₀b₁b₂`. +`toeplitzContinuantMatrix` is the normalized tridiagonal matrix with diagonal +`b₁`, superdiagonal `b₀`, and subdiagonal `b₂`. Repeated Laplace expansion now +proves its determinant recurrence at every order and an entrywise theorem +identifies it with the shifted Toeplitz minor, including the sign +`D_{k+2}=b₁D_{k+1}-b₀b₂D_k`. The oscillation theorem is also proved: if every +`D_k` is nonnegative and `b₀b₂>0`, positivity of consecutive determinants gives +ratios `r_{k+1}=b₁-b₀b₂/r_k`; a uniform descent under +`b₁²<4b₀b₂` contradicts Archimedean boundedness. Thus the sharp factor-four +bound and degree-two finite ASW from all minors are unconditional. + +Pinned Mathlib has no packaged Hurwitz/Rouché theorem, so the project now +proves one from Jensen's circle-average formula. +`exists_zero_closedBall_of_uniform_close` is the quantitative disk theorem, +`hurwitz_nonvanishing_or_eq_zero_on` lifts it to every open preconnected +domain, and `hurwitzHalfPlaneNonvanishingClosure` discharges the former +interface. Thus +`zero_reality_of_locallyUniformHyperbolicLimit_unconditional` needs only one +global nonzero witness; boundary zeros remain allowed and become precisely +the real-axis conclusion. + +## Total positivity / PF audit + +The Aissen–Schoenberg–Whitney theorem says that a finite nonnegative sequence +`b₀,…,b_d` is a Pólya-frequency sequence—its semi-infinite Toeplitz matrix +`(b_{i-j})` has every minor nonnegative—iff +`Σ b_j X^j` has only real zeros (necessarily nonpositive). Applied with +`b_j = choose(d,j) * xiGamma(j)`, all-order Toeplitz-minor nonnegativity would +be a valid sufficient criterion for each unshifted Jensen polynomial. + +Lean now defines `toeplitzMatrix`, `ToeplitzTotallyNonnegative`, +`JensenPolyaFrequency`, and `AllJensenPolyaFrequency`. It proves from actual +one-by-one and two-by-two minors that PF implies coefficient nonnegativity and +ordinary log-concavity. `FinitePolyaFrequencyHyperbolicity` records the exact +missing forward finite ASW theorem, while +`FiniteAissenSchoenbergWhitney` states the exact iff with finite support, +nonzero polynomial, endpoint zeros, and internal zeros handled without hidden +positivity assumptions. Its forward direction implies the former interface. +The theorem +`allJensenHyperbolic_of_polyaFrequency` proves the general Jensen implication +from ASW, all Jensen-row PF conditions, and exact nondegeneracy. +`finiteASW_degree_one` proves the complete forward ASW conclusion in degree +one, including that its root is nonpositive. `finiteASW_degree_two` now proves +the complete nondegenerate degree-two conclusion directly from all minors. +`QuadraticASWCertificate` records the exact sharp factor-four discriminant +condition, and the all-order continuant argument proves that PF supplies it. +Ordinary two-by-two log-concavity alone still supplies only factor one. +`selectedMinorCounterexample` proves that coefficient signs, the contiguous +order-two minor, and the leading order-three Toeplitz minor still do not imply +the factor-four bound. +`positiveNonPFSequence` is a Lean counterexample showing strict positivity +alone does not imply log-concavity or the PF all-minor condition. +`FinitePolyaFrequencyHyperbolicityThrough k` and +`jensenHyperbolicThrough_of_polyaFrequency` make the growing-degree +requirement explicit; proving these bounded statements for every `k` recovers +all Jensen hyperbolicity. For the actual positive xi coefficients, +`xiJensenHyperbolicThrough_two_of_polyaFrequency` closes all shifts through +degree two from PF alone, and unconditional nondegeneracy removes the separate +`NonzeroJensenFamily` assumption from the all-degree PF reduction. + +For degree three, `finiteCoefficientPolynomial_degree_three` and +`finiteASW_degree_three_of_discriminant` close every step after the cubic +discriminant inequality, including nonpositive root location. The exact new +blocker is `CubicToeplitzDiscriminantPrinciple`: complete Toeplitz total +nonnegativity must force the full five-term cubic discriminant. A single +Hessenberg continuant family does not encode all minors, so the quadratic ratio +argument cannot be extrapolated without a variation-diminishing or oscillation +matrix theorem. + +This does not currently shorten the RH route. It replaces each all-degree +hyperbolicity obligation by all minors of a degree-dependent Toeplitz matrix; +the order-two minors recover log-concavity/Turán, while the cubic +counterexample shows that order two alone is insufficient. No theorem in the +pinned Mathlib snapshot packages the Aissen–Schoenberg–Whitney equivalence. +The project now also proves that locally uniform limits of real hyperbolic +polynomials remain entire and conjugation-symmetric. Although root-location +closure is absent from pinned Mathlib, the project-local Jensen-formula proof +establishes the required half-plane Hurwitz dichotomy. Every zero of a nonzero +locally uniform hyperbolic limit is therefore real. + +The Pólya--Jensen forward direction is now reduced to one explicit convergence +statement. `xiRescaledJensenPolynomial d` is +`J^{d+1,0}(X/(d+1))`; scaling is proved to preserve hyperbolicity, and +`XiJensenScalingConvergence` is exactly its locally uniform convergence to the +xi exponential generating function. This statement plus all Jensen +hyperbolicity constructs `XiLaguerrePolyaMembership` directly. The project now +proves the exact coefficient limit +`choose (d+1) j * (d+1)^(-j) -> 1/j!`, the sharp uniform coefficient bound by +`1/j!`, the finite-sum evaluation formula, and pointwise convergence of the +whole triangular array by Tannery dominated convergence. The compact-uniform +upgrade is now also proved: on each compact set the terms are interpreted in +the Banach space of continuous maps, bounded by +`xiGamma j / j! * ‖Z‖^j`, and Tannery's theorem gives uniform convergence. +Thus `XiJensenScalingConvergence` is unconditional. + +The final change of variables is also explicit: +`xiJensenGeneratingFunction ((s - 1/2)^2) = 8 * riemannXi s`. Thus the +remaining LP-to-RH work is no longer an unspecified normalization issue; it is +now formalized. Gamma has no zero away from the excluded trivial-zero +parameters, the completed-zeta numerator gives a zero of `riemannXi`, and +positivity of the xi generating series on the nonnegative real axis removes +the spurious real-centered branch. Consequently +`riemannHypothesis_of_allJensenHyperbolic` proves the full reverse implication +`AllJensenHyperbolic xiGamma → KakeyaRiemannHypothesisRoot`. + +The centered zero statement itself is now proved equivalent to Mathlib's RH: +`XiCenteredCriticalZeroReality ↔ KakeyaRiemannHypothesisRoot`. The remaining +Jensen/RH direction is isolated as `XiRealZeroToJensenHyperbolicity`, the +classical Hadamard-product/Pólya--Jensen theorem that critical-axis centered-xi +zeros imply hyperbolicity of every finite Jensen polynomial. It is not a +consequence of known eventual hyperbolicity, and pinned Mathlib has no +Laguerre--Pólya canonical-product theorem supplying it. + +On the coefficient side, +`riemannHypothesis_of_finiteASW_polyaFrequency` now chains the exact finite ASW +interface and all-window xi PF condition directly to RH. Neither premise is +assumed: cubic complete-minor ASW and actual xi total positivity remain open. + +The canonical-product converse is now split into two source-exact obligations. +`PositiveGenusZeroProductRepresentation` is the paired product +`c ∏(1+X/rho_n)` in the squared centered variable, with positive `rho_n` and +local-uniform convergence. Lean proves every finite product hyperbolic and +therefore proves this representation implies `XiLaguerrePolyaMembership`. +`XiCriticalZerosToPositiveGenusZeroProduct` is the remaining Hadamard +identification; `XiLaguerrePolyaToAllJensen` is precisely O'Sullivan's +Pólya--Jensen criterion in the reverse direction. Together they prove the +exact all-Jensen/RH equivalence. + +The Li branch's canonical-product work conceptually supplies normal convergence +and exact divisor matching for a multiplicity-indexed genus-one product. +It does not yet supply, in this worktree, the required centered even pairing, +sub-order-one rigidity in the squared variable, or the formal Pólya--Jensen +coefficient theorem. No declarations were copied across worktrees. + +The Li-to-Jensen pairing algebra is now formal rather than only conceptual: +`centeredGenusOnePrimaryFactor_pair` proves +`E₁(z/(iγ)) E₁(z/(-iγ)) = 1 + z²/γ²`, including exact cancellation of the +genus-one exponentials. Moreover, +`hasProdLocallyUniformlyOn_positiveGenusZeroFactors` proves normal convergence +of `∏(1+X/rho_n)` from `Σ |rho_n⁻¹| < ∞`; this is exactly the inverse-square +summability of the unpaired centered zeros after `rho_n = γ_n²`. +Consequently, the Hadamard blocker is narrowed to enumerating/pairing every xi +zero with multiplicity and proving the normalized product equals the centered +xi function. Reverse Pólya--Jensen remains independently open. + +The normalization/convergence plumbing is now closed once that identity is +known. `XiNormalizedGenusZeroProductIdentification` records the exact formula +with constant `xiGamma 0`, positive paired squared ordinates, and summable +inverse ordinates. Lean proves its partial products converge locally uniformly +as the explicit real hyperbolic polynomials +`positiveGenusZeroPolynomial`, hence the identity implies concrete +`XiLaguerrePolyaMembership`. Thus the Hadamard side no longer includes an +implicit convergence or normalization step: only the global divisor-to-function +equality remains. Exact RH equivalence still additionally requires +`XiLaguerrePolyaToAllJensen`. + +The affine-factor normalization at the end of that global equality is now +formalized too. `exp_affine_prefactor_eq_const_of_even` proves that if quotient +rigidity supplies `f(z)=exp(a+bz)P(z)`, with `f` and the paired product `P` +entire/even and `P(0)≠0`, then `b=0`. +`XiCenteredAffinePairedProductIdentification` records exactly this raw +Hadamard output, and +`normalizedProductIdentification_of_centeredAffine` fixes `exp(a)` by the +center value and transfers from `z²` to every complex generating variable. +Therefore the genuine Hadamard blocker is now before normalization: construct +the multiplicity-correct paired divisor and prove that its cancelled quotient +is exponential-affine from order-one growth. The reverse Pólya--Jensen theorem +and general finite ASW remain independently open. + +The centered divisor carrier is now concrete and multiplicity-correct. +`CenteredXiZeroIndex` repeats every zero by `analyticOrderNatAt`; +`centeredXiZeroDivisor_apply`, `exists_centeredXiZeroRoot_iff`, bounded-window +finiteness, and `centeredXiZeroRoot_escape` prove exact enumeration behavior. +Negation preserves multiplicity, and under `XiCenteredCriticalZeroReality` the +positive-imaginary subtype selects one representative from each `±` pair. +Assuming the isolated inverse-square summability input, Lean transfers it to +summability of inverse squared ordinates and proves locally uniform convergence +of the canonical paired genus-zero product. The remaining analytic blockers +are now exact: prove inverse-square summability from xi growth, prove this +product has `centeredXiZeroDivisor`, and prove the cancelled quotient is +exponential-affine. Reverse Pólya--Jensen/general ASW remain open. + +The inverse-square step is now reduced to the correct order-one quantitative +statement rather than an unjustified unit-shell estimate. Canonical dyadic +shells partition all multiplicity indices outside a finite window, and +`centeredXi_inverseSquareSummability_of_orderOneZeroCount` proves that an +`O(2^N(N+1))` dyadic count implies inverse-square summability. This is the +precise consequence expected from Jensen/Riemann--von Mangoldt growth; pinned +Mathlib still lacks that quantitative xi zero-count theorem. For the resulting +product, `centeredXiPairedProduct_eq_zero_iff` excludes accidental infinite +product zeros, `centeredXiPairedProduct_zero_set_eq` matches centered xi's zero +set under RH, and `centeredXiPairedProduct_divisor_support_eq` matches divisor +supports. Exact divisor equality still requires proving local multiplicities +of the infinite product; quotient rigidity and reverse Pólya--Jensen remain +open. + +The local multiplicity blocker is now closed. `centeredXiPairedFiber` records +the positive representative whose quadratic factor vanishes at either `z` or +`-z`; under critical-axis zero reality its cardinality is exactly +`centeredXiZeroMultiplicity z`. Isolating this finite fiber from the normally +convergent product proves +`analyticOrderAt_centeredXiPairedProduct`, hence +`centeredXiPairedProduct_divisor_eq` gives full divisor equality, not merely +support equality. On the counting side, the source-standard cumulative +`O(r log(2r+2))` multiplicity bound is formalized as +`XiCenteredCumulativeZeroCount` and proved sufficient for dyadic counting and +inverse-square summability. Pinned Mathlib still provides no quantitative +argument-principle/Riemann--von Mangoldt theorem establishing this premise. +After divisor equality, the remaining product-identification input is exactly +`XiCenteredDivisorQuotientRigidity`: the minimum-modulus/subquadratic-growth +step forcing the cancelled quotient to be exponential-affine. Reverse +Pólya--Jensen and general ASW remain independent blockers. + +The quotient-cancellation and algebraic rigidity layers are now formalized. +`centeredXiCancelledQuotient` is the global meromorphic normal-form extension +of xi divided by the paired product. Exact divisor equality proves that it is +entire and zero-free, and `exists_centeredXiCancelledQuotient_analyticLog` +constructs a whole-plane analytic logarithm. A Cauchy estimate proves that +subquadratic norm growth of this logarithm forces it to be affine; +`centeredXiPairedProductAffineRigidity_of_logGrowth` then recovers the global +xi product identity by analytic continuation, and centered evenness fixes its +normalization exactly. Thus quotient rigidity is reduced to the explicit +`XiCenteredCancelledQuotientLogGrowth` estimate. Establishing that estimate +from order-one xi growth still requires the missing Cartan/minimum-modulus +argument. The actual cumulative RvM premise and reverse Pólya--Jensen/ASW +remain open. + +The Cartan-to-rigidity pipeline now uses the natural quantity produced by +minimum-modulus estimates rather than assuming a norm estimate for a chosen +logarithm. `CartanExceptionalDiskLogBoundJensen` records finitely many bad +disks of total diameter smaller than the radial annulus. A measure argument +selects a whole centered circle avoiding them; maximum modulus fills the +enclosed disk; and Borel--Carathéodory turns the resulting +`o(r²)` bound on `log ‖quotient‖` into an `o(r²)` bound strong enough to force +the global analytic logarithm affine. Consequently +`centeredXi_eq_normalizedPairedProduct_of_count_and_cartan` closes the +normalized xi product from exactly two remaining quantitative premises: +`XiCenteredCumulativeZeroCount` and +`XiCenteredCancelledQuotientCartanDiskGrowth`. The geometric +exceptional-disk/selected-circle/maximum-modulus/Borel--Carathéodory chain is +proved; deriving the exceptional-disk estimate for this specific infinite +paired product and proving the actual Riemann--von Mangoldt count remain open. + +The xi-specific paired-product minimum-modulus layer is now substantially +formalized. `centeredXiPositiveZeroWindow` gives the finite-head/tail split. +For tail factors with norm at most `1/2`, the complex logarithm estimate +`‖log(1+w)‖ <= 3‖w‖/2` gives an explicit infinite-product lower bound by the +tail inverse-square sum. For the finite head, radial exceptional intervals of +equal total width select one circle on which every quadratic paired factor is +bounded below. `exists_circle_norm_centeredXiPairedProduct_lower` combines +both pieces into a full selected-circle lower bound, and its cumulative-count +corollary instantiates inverse-square convergence automatically. +`norm_centeredXiCancelledQuotient_le_div_of_product_lower` transfers any such +positive product lower bound to the cancelled quotient. + +The normalized asymptotic bookkeeping is now formalized. Positive-zero +windows are cofinal, so inverse-square summability makes the complementary +tail tend to zero without a hidden local count. The finite-head root and +cardinality-log losses are bounded by +`O((j+1)^2/2^j)`, while xi's order-one contribution has scale +`O((j+1)/2^j)`. `CenteredXiDyadicNormalizedLoss` packages these terms and +`tendsto_centeredXiPairedProduct_normalizedLoss` proves that their sum tends +to zero. The cumulative multiplicity count also gives the explicit +`O(2^j(j+1))` positive-window cardinality bound. + +The dyadic-to-cofinal-circle conversion and the entire +selected-circle/log-norm/affine/normalized-product chain are now instantiated. +`exists_circle_norm_centeredXiCancelledQuotient_le_explicit` combines global +xi growth with the selected-circle product lower bound, displaying separately +the finite-head root log, cardinality log, and inverse-square tail. +`CenteredXiDyadicShiftedLoss` packages the resulting shifted truncation scale +and tends to zero. The empty and nonempty positive-divisor cases are handled +separately, yielding unconditional +`centeredXiCancelledQuotient_dyadicBoundary_actual` under the RH zero-reality +premise. + +The actual centered-xi cumulative multiplicity count is now closed. +The clean Li-route Gamma/Mellin-strip machinery has been integrated as a +dependency and gives the global order-one bound for `riemannXiLi`; +`xiJensenEntire_eq_four_mul_riemannXiLi` transfers it through the centered +shift. A centered finite-window divisor is dominated by the full analytic +divisor, and Jensen's circle-average formula then proves +`xiCenteredCumulativeZeroCount_actual`. Consequently inverse-square +summability, dyadic positive-window cardinality, and the previously proved +paired-product selected-circle lower bound are all unconditional (the latter +still assumes RH only for the zero pairing). Combining these results proves +`centeredXi_eq_normalizedPairedProduct_actual`: under RH zero reality, +centered xi equals its exactly normalized multiplicity-correct paired product. +The remaining exact-equivalence blocker is now the independent reverse +Pólya--Jensen step converting this concrete LP/product approximation into +hyperbolicity of every shifted Jensen polynomial; general finite ASW remains +an alternative open route. + +The reverse-limit closure has now been formalized without assuming the +finite real-rootedness theorem. Finite coefficient convergence gives locally +uniform convergence of the corresponding Jensen rows, the project-local +Hurwitz theorem preserves hyperbolicity in the nonzero limit, and the existing +derivative identity propagates unshifted hyperbolicity to every shift. +`JensenCoefficientwiseHyperbolicApproximation` is the resulting sharp premise, +and `allJensenHyperbolic_of_coefficientwiseApproximation` proves its +all-degree/all-shift conclusion. Repeated derivatives are also proved to +preserve locally uniform convergence, providing the required coefficient +extraction mechanism. For positive genus-zero approximants the remaining +finite statement is isolated as +`FinitePositiveGenusZeroJensenHyperbolicity`: the weighted polynomials with +coefficients `binom(d,j) * j! * [X^j] P_N` must be real-rooted. This is exactly +the missing Schur--Szegő/weighted-matching theorem (or a consequence of full +finite ASW), rather than a further analytic limit or scaling issue. + +The finite normalization has now been formalized exactly. In binomial +coordinates `schurSzegoComposition N p q` has coefficient +`p_j q_j / binom(N,j)`, and the required second factor is +`schurSzegoJensenKernel N d`, with coefficient +`binom(N,j) * d.descFactorial j`. Lean proves, without side conditions, +that composing this kernel with a finite positive genus-zero product is +definitionally the current Jensen polynomial. It also proves that the +standard nonpositive-root Schur--Szegő preservation theorem together with +nonpositive-rootedness of these reversed generalized-Laguerre kernels implies +`FinitePositiveGenusZeroJensenHyperbolicity`, including `N=0`, `d>N`, +`N>d`, repeated roots, and coefficient truncation. Neither classical root +preservation theorem is currently available in Mathlib; they remain the +genuine finite blocker, so the conditional RH equivalence cannot yet be made +unconditional. + +The endpoint audit exposed and fixed one necessary qualification. The strict +claim that two nonzero nonpositive-rooted inputs always have a nonpositive- +rooted composition is false: at binomial degree one, `X` and `1` have disjoint +coefficient support and compose to the zero polynomial. Lean now proves this +counterexample and states the exact theorem with the classical alternative +“the composition is zero or has only real nonpositive roots.” The +positive-genus-zero specialization has nonzero constant coefficient `c`, so +the zero branch is formally excluded there. Kernel rootedness is also closed +for `N=0`, `d=0`, and all `d=1`; the all-degree generalized-Laguerre +oscillation theorem remains open. + +Source metadata and exact locations are in +`docs/research/rh-jensen-source-cards.json`. diff --git a/docs/research/rh-jensen-source-cards.json b/docs/research/rh-jensen-source-cards.json new file mode 100644 index 00000000..c4f1a377 --- /dev/null +++ b/docs/research/rh-jensen-source-cards.json @@ -0,0 +1,229 @@ +{ + "schema_version": 1, + "route_id": "JENSEN_LAGUERRE_POLYA", + "normalization": "GORZ_2019_EQUATIONS_1_2", + "cards": [ + { + "id": "gorz-2019-jensen", + "type": "peer_reviewed_primary", + "citation": "Michael Griffin, Ken Ono, Larry Rolen, and Don Zagier, “Jensen polynomials for the Riemann zeta function and other sequences”, Proceedings of the National Academy of Sciences 116(23) (2019), 11103–11110.", + "doi": "10.1073/pnas.1902572116", + "url": "https://doi.org/10.1073/pnas.1902572116", + "locations": [ + "Equation (1): (-1 + 4 z^2) Lambda(1/2 + z) = sum_{n>=0} gamma(n) z^(2n)/n!", + "Equation (2): J_alpha^{d,n}(X) = sum_{j=0}^d binom(d,j) alpha(n+j) X^j", + "Introduction, pp. 11103–11104: RH is equivalent to hyperbolicity for every degree and shift", + "Theorem 1: for each fixed d >= 1, J_gamma^{d,n} is hyperbolic for all sufficiently large n", + "Theorem 2: J_gamma^{d,n} is hyperbolic for 1 <= d <= 8 and every n >= 0" + ], + "claims": [ + "XI_TAYLOR_NORMALIZATION", + "JENSEN_POLYNOMIAL_DEFINITION", + "RESCALED_JENSEN_COEFFICIENT_LIMIT_DOMINATION_AND_POINTWISE_CONVERGENCE_FORMALIZED", + "RESCALED_JENSEN_COMPACT_UNIFORM_CONVERGENCE_FORMALIZED", + "ALL_JENSEN_HYPERBOLIC_IMPLIES_RH_FORMALIZED", + "CENTERED_XI_CRITICAL_AXIS_ZEROS_IFF_RH_FORMALIZED", + "REAL_ZERO_TO_ALL_JENSEN_CANONICAL_PRODUCT_PRINCIPLE_ISOLATED", + "POSITIVE_GENUS_ZERO_FINITE_PRODUCTS_AND_LP_LIMIT_FORMALIZED", + "CANONICAL_PRODUCT_AND_REVERSE_POLYA_JENSEN_OBLIGATIONS_SEPARATED", + "CENTERED_GENUS_ONE_PAIR_CANCELLATION_FORMALIZED", + "GENUS_ZERO_NORMAL_CONVERGENCE_FROM_INVERSE_SQUARE_ZEROS_FORMALIZED", + "NORMALIZED_GENUS_ZERO_IDENTITY_IMPLIES_LP_MEMBERSHIP_FORMALIZED", + "CENTERED_EVENNESS_REMOVES_AFFINE_HADAMARD_FACTOR_FORMALIZED", + "CENTERED_AFFINE_PRODUCT_NORMALIZES_TO_GENERATING_PRODUCT_FORMALIZED", + "CENTERED_XI_MULTIPLICITY_ZERO_ENUMERATION_FORMALIZED", + "RH_POSITIVE_ZERO_PAIRING_AND_CONDITIONAL_PRODUCT_CONVERGENCE_FORMALIZED", + "ORDER_ONE_DYADIC_ZERO_COUNT_IMPLIES_INVERSE_SQUARE_SUMMABILITY_FORMALIZED", + "PAIRED_PRODUCT_ZERO_SET_AND_DIVISOR_SUPPORT_MATCH_XI_FORMALIZED", + "CUMULATIVE_RVM_BOUND_IMPLIES_DYADIC_SUMMABILITY_FORMALIZED", + "PAIRED_PRODUCT_LOCAL_MULTIPLICITY_AND_FULL_DIVISOR_EQUALITY_FORMALIZED", + "CANCELLED_QUOTIENT_ENTIRE_ZERO_FREE_AND_ANALYTIC_LOG_FORMALIZED", + "SUBQUADRATIC_LOG_GROWTH_IMPLIES_NORMALIZED_XI_PRODUCT_FORMALIZED", + "CARTAN_EXCEPTIONAL_DISKS_TO_SELECTED_CIRCLE_FORMALIZED", + "BOUNDARY_LOG_NORM_TO_AFFINE_QUOTIENT_VIA_MAXIMUM_MODULUS_AND_BOREL_CARATHEODORY_FORMALIZED", + "CUMULATIVE_COUNT_AND_XI_CARTAN_BOUND_IMPLY_NORMALIZED_PRODUCT_FORMALIZED", + "PAIRED_PRODUCT_FINITE_HEAD_TAIL_SPLIT_FORMALIZED", + "INVERSE_SQUARE_TAIL_MINIMUM_MODULUS_FORMALIZED", + "XI_PAIRED_PRODUCT_SELECTED_CIRCLE_LOWER_BOUND_FORMALIZED", + "POSITIVE_ZERO_WINDOW_DYADIC_CARDINALITY_BOUND_FORMALIZED", + "NORMALIZED_HEAD_CARD_LOG_AND_TAIL_LOSSES_ARE_O_R_SQUARED_FORMALIZED", + "DYADIC_QUOTIENT_BOUND_TO_NORMALIZED_XI_PRODUCT_PIPELINE_FORMALIZED", + "CENTERED_XI_ORDER_ONE_GROWTH_FROM_GAMMA_MELLIN_BOUND_FORMALIZED", + "ACTUAL_CENTERED_XI_CUMULATIVE_MULTIPLICITY_COUNT_FORMALIZED", + "ACTUAL_CENTERED_XI_INVERSE_SQUARE_AND_DYADIC_CARDINALITY_FORMALIZED", + "CONCRETE_XI_QUOTIENT_SELECTED_CIRCLE_BOUND_FORMALIZED", + "ACTUAL_CENTERED_XI_NORMALIZED_PAIRED_PRODUCT_IDENTITY_FORMALIZED", + "COEFFICIENTWISE_HYPERBOLIC_JENSEN_LIMIT_CLOSURE_FORMALIZED", + "REVERSE_JENSEN_REDUCED_TO_FINITE_WEIGHTED_MATCHING_ROOTEDNESS", + "RH_IFF_ALL_DEGREES_ALL_SHIFTS_HYPERBOLIC", + "EVENTUAL_HYPERBOLICITY_FIXED_DEGREE", + "ALL_SHIFTS_DEGREE_AT_MOST_8" + ], + "status": "SOURCE_VERIFIED_REVERSE_JENSEN_ANALYTIC_LIMIT_CLOSED_FINITE_SCHUR_SZEGO_WEIGHTED_MATCHING_AND_GENERAL_ASW_OPEN" + }, + { + "id": "osullivan-2021-xi-lp", + "type": "peer_reviewed_primary", + "citation": "Cormac O’Sullivan, “Zeros of Jensen polynomials and asymptotics for the Riemann xi function”, Research in the Mathematical Sciences 8 (2021), article 46.", + "doi": "10.1007/s40687-020-00240-5", + "url": "https://doi.org/10.1007/s40687-020-00240-5", + "locations": [ + "Equations (1.1)–(1.3): xi is entire of order 1, the centered even Taylor coefficients gamma(m), and shifted Jensen polynomials", + "Theorem 1.1: RH iff J^{d,n} is hyperbolic for every d >= 1 and n >= 0", + "Section 3.1, Theorem 3.1: for a formal exponential generating series with real coefficients, compact-uniform convergence to a Laguerre–Pólya entire function iff g_d is hyperbolic for every d >= 1", + "Equation (3.1): d/dx g_d(Phi;x) = d g_{d-1}(Phi';x), and d/dx g_d^*(Phi;x) = d g_{d-1}^*(Phi;x)", + "Equation (3.2) and Corollary 3.2: J^{d,n}=g_d(Theta^(n)); Theta^(n) is hyperbolic iff every associated J^{d,n}, d >= 1, is hyperbolic", + "Corollary 3.3: hyperbolicity of Theta^(n) propagates to every higher derivative", + "Equation (1.5): degree-two hyperbolicity is the Turán inequality gamma(n+1)^2 >= gamma(n) gamma(n+2)" + ], + "claims": [ + "XI_ENTIRE_AND_EVEN_TAYLOR_SERIES", + "LAGUERRE_POLYA_COMPACT_UNIFORM_CRITERION", + "LAGUERRE_POLYA_TO_RH_DIRECTION_FORMALIZED", + "RH_IFF_ALL_JENSEN_HYPERBOLIC", + "JENSEN_DERIVATIVE_SHIFT_IDENTITY", + "DERIVATIVE_HYPERBOLICITY_PROPAGATION", + "DEGREE_TWO_TURAN_CONDITION" + ], + "status": "SOURCE_VERIFIED_FORMAL_BRIDGE_OPEN" + }, + { + "id": "griffin-et-al-2022-effective", + "type": "peer_reviewed_primary", + "citation": "Michael J. Griffin, Ken Ono, Larry Rolen, Jesse Thorner, Zachary Tripp, and Ian Wagner, “Jensen polynomials for the Riemann xi-function”, Advances in Mathematics 397 (2022), 108186.", + "doi": "10.1016/j.aim.2022.108186", + "url": "https://doi.org/10.1016/j.aim.2022.108186", + "locations": [ + "Equations (1.1)–(1.2): centered xi Taylor coefficients and Jensen polynomial convention", + "Theorem 1.1: an absolute c > 0 exists such that J^{d,n} is hyperbolic for d >= 1 and n >= c exp(d/2)", + "Remark (3) after Theorem 1.2: partial ranges do not give a converse without every n and every d" + ], + "claims": [ + "EFFECTIVE_EVENTUAL_HYPERBOLICITY", + "PARTIAL_HYPERBOLICITY_NOT_A_CONVERSE_TO_RH" + ], + "status": "SOURCE_VERIFIED_NOT_FORMALIZED" + }, + { + "id": "aissen-edrei-schoenberg-whitney-1951", + "type": "peer_reviewed_primary", + "citation": "Michael Aissen, Albert Edrei, I. J. Schoenberg, and Anne Whitney, “On the Generating Functions of Totally Positive Sequences”, Proceedings of the National Academy of Sciences 37(5) (1951), 303–307.", + "doi": "10.1073/pnas.37.5.303", + "url": "https://doi.org/10.1073/pnas.37.5.303", + "locations": [ + "Theorem 4: characterization by total positivity of the Toeplitz matrix", + "Theorem 6: a finite nonnegative sequence is totally positive iff its generating polynomial has only real negative zeros", + "Theorem 7: arithmetic subsequences preserve the totally-positive generating-function form" + ], + "claims": [ + "FINITE_PF_IFF_REAL_NONPOSITIVE_ROOTED_GENERATING_POLYNOMIAL", + "ALL_ORDER_TOEPLITZ_MINORS_ARE_STRONGER_THAN_LOG_CONCAVITY", + "PF_CRITERION_IS_A_VALID_JENSEN_SUFFICIENT_CONDITION", + "FINITE_ASW_FORWARD_THROUGH_NONDEGENERATE_DEGREE_TWO_FORMALIZED", + "DEGREE_TWO_SHARP_DISCRIMINANT_DERIVED_FROM_ALL_TOEPLITZ_MINORS", + "SELECTED_ORDER_TWO_AND_THREE_MINORS_PROVED_INSUFFICIENT_FOR_FACTOR_FOUR", + "ALL_ORDER_SHIFTED_TOEPLITZ_CONTINUANT_RECURRENCE_AND_OSCILLATION_FORMALIZED", + "EXACT_FINITE_ASW_IFF_WITH_SUPPORT_AND_ZERO_CASES_STATED", + "DEGREE_THREE_ASW_REDUCED_TO_COMPLETE_MINOR_CUBIC_DISCRIMINANT_PRINCIPLE" + ], + "status": "SOURCE_VERIFIED_DEGREE_THREE_DISCRIMINANT_REDUCTION_FORMALIZED_COMPLETE_ALL_MINOR_DERIVATION_OPEN" + }, + { + "id": "lagarias-montague-2011-xi-integral", + "type": "peer_reviewed_primary", + "citation": "Jeffrey C. Lagarias and David Montague, “The Integral of the Riemann xi-Function”, Commentarii Mathematici Universitatis Sancti Pauli 60(1–2) (2011), 143–169.", + "url": "https://arxiv.org/abs/1106.4348", + "locations": [ + "Equation (1.2): Xi(z) = 2 integral_0^infinity Phi(u) cos(zu) du", + "Displayed definition after equation (1.2): the explicit rapidly decaying Riemann Phi kernel", + "Introduction after equation (1.8): centered even Taylor coefficients are real and positive", + "Lemma 3.1, equations (3.1)–(3.3): Fourier representation, explicit theta-series kernel, evenness, rapid decay, and strict decrease" + ], + "claims": [ + "RIEMANN_PHI_FOURIER_REPRESENTATION", + "XI_EVEN_DERIVATIVES_ARE_POSITIVE_MOMENTS", + "XI_CENTERED_TAYLOR_COEFFICIENTS_POSITIVE", + "EXPLICIT_PHI_SUMMAND_POSITIVITY_SUMMABILITY_AND_SYMMETRY_FORMALIZED", + "PHI_EXPONENTIAL_DECAY_CONTINUITY_AND_ALL_POLYNOMIAL_MOMENTS_FORMALIZED", + "PHI_SUMMAND_SHIFTED_SECOND_DERIVATIVE_THETA_IDENTITY_FORMALIZED", + "THETA_SERIES_TWICE_TERMWISE_DIFFERENTIATION_AND_SUMMED_PHI_IDENTITY_FORMALIZED", + "THETA_TAIL_TO_WEAK_FE_PAIR_F_MODIF_PIECEWISE_IDENTITY_FORMALIZED", + "FINITE_MELLIN_EXPONENTIAL_SUBSTITUTION_AND_POSITIVE_HALF_THETA_INTEGRAL_FORMALIZED", + "THETA_TAIL_EXPONENTIAL_DECAY_AND_POSITIVE_INFINITY_BOUNDARY_VANISHING_FORMALIZED", + "THETA_FIRST_AND_SECOND_DERIVATIVE_ENDPOINT_DECAY_FORMALIZED", + "THETA_MODULAR_REFLECTION_AND_EXACT_ZERO_DERIVATIVE_FORMALIZED", + "FINITE_AND_IMPROPER_COSH_DOUBLE_INTEGRATION_BY_PARTS_FORMALIZED", + "LOWER_MELLIN_MODULAR_REFLECTION_AND_SYMMETRIC_COSH_REPRESENTATION_FORMALIZED", + "WEIGHTED_PHI_MGF_ANALYTIC_IDENTITY_AND_ALL_ORDER_DIFFERENTIATION_FORMALIZED", + "XI_GAMMA_POSITIVE_MOMENT_REPRESENTATION_FORMALIZED" + ], + "status": "SOURCE_VERIFIED_MELLIN_COSH_AND_ALL_ORDER_COEFFICIENT_MOMENTS_FORMALIZED" + }, + { + "id": "mathlib-4.32.0-rc1-riemann", + "type": "pinned_formal_library", + "citation": "Mathlib v4.32.0-rc1, commit 360da6fa66c1273b76b6b2d8c5666fd5ac2e3b56, Mathlib/NumberTheory/LSeries/RiemannZeta.lean.", + "url": "https://github.com/leanprover-community/mathlib4/blob/360da6fa66c1273b76b6b2d8c5666fd5ac2e3b56/Mathlib/NumberTheory/LSeries/RiemannZeta.lean", + "locations": [ + "completedRiemannZeta₀", + "completedRiemannZeta", + "differentiable_completedZeta₀", + "completedRiemannZeta₀_one_sub", + "riemannZeta_eq_completedRiemannZeta₀", + "RiemannHypothesis", + "HurwitzZeta.hurwitzEvenFEPair and WeakFEPair.Lambda₀: completedRiemannZeta₀ unfolds to the Mellin transform of the modified theta kernel" + ], + "claims": [ + "PINNED_COMPLETED_ZETA_ENTIRE", + "PINNED_FUNCTIONAL_EQUATION", + "PINNED_RH_ROOT", + "PINNED_DECLARATIONS_SUFFICE_FOR_DERIVED_COMPLETED_ZETA_CONJUGATION", + "PINNED_COMPLETED_ZETA_MODIFIED_THETA_MELLIN_REPRESENTATION" + ], + "status": "FORMAL_LIBRARY_VERIFIED_AND_PROJECT_DERIVATION_PROVED" + }, + { + "id": "mathlib-4.32.0-rc1-analysis", + "type": "pinned_formal_library", + "citation": "Mathlib v4.32.0-rc1, commit 360da6fa66c1273b76b6b2d8c5666fd5ac2e3b56, complex Taylor-series and locally-uniform-limit modules.", + "url": "https://github.com/leanprover-community/mathlib4/tree/360da6fa66c1273b76b6b2d8c5666fd5ac2e3b56/Mathlib/Analysis/Complex", + "locations": [ + "Complex.taylorSeries_eq_of_entire'", + "Differentiable.hasFPowerSeriesOnBall", + "TendstoLocallyUniformlyOn.differentiableOn", + "TendstoLocallyUniformlyOn.deriv", + "AnalyticOnNhd.eqOn_zero_of_preconnected_of_eventuallyEq_zero", + "HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'", + "FormalMultilinearSeries.ofScalars and radius_eq_top_of_summable_norm", + "Matrix.submatrix and Matrix.det", + "Polynomial.Splits", + "Polynomial.IsRoot", + "Polynomial.finsetSum_coeff", + "Polynomial.coeff_derivative", + "AnalyticOnNhd.circleAverage_log_norm_of_ne_zero (Jensen circle-average theorem)", + "Mathlib/Analysis/Complex/Polynomial/GaussLucas.lean: Polynomial.rootSet_derivative_subset_convexHull_rootSet", + "Mathlib/Analysis/Calculus/Deriv/Star.lean: deriv_conj_conj", + "No prepackaged conjugation theorem for completedRiemannZeta₀ was found; project theorem completedRiemannZeta₀_conj derives it from the Dirichlet series, cpow/Gamma conjugation, and analytic uniqueness" + ], + "claims": [ + "PINNED_TAYLOR_EXPANSION", + "PINNED_LOCAL_UNIFORM_CONVERGENCE", + "PROJECT_XI_GENERATING_FUNCTION_ENTIRE_AND_LOCALLY_UNIFORM_TAYLOR_LIMIT", + "PINNED_POLYNOMIAL_ROOT_INFRASTRUCTURE", + "NO_PINNED_REAL_ROOTEDNESS_OR_LAGUERRE_POLYA_PREDICATE_FOUND", + "PINNED_GAUSS_LUCAS_DERIVATIVE_CLOSURE_FORMALIZED", + "NO_PREPACKAGED_PINNED_COMPLETED_ZETA_CONJUGATION_FOUND", + "PROJECT_COMPLETED_ZETA_CONJUGATION_PROVED_FROM_PINNED_DECLARATIONS", + "NO_PINNED_POLYA_FREQUENCY_OR_AISSEN_SCHOENBERG_WHITNEY_THEOREM_FOUND", + "NO_PINNED_SCHUR_SZEGO_OR_GENERALIZED_LAGUERRE_ROOT_LOCATION_THEOREM_FOUND", + "PROJECT_STRICT_SCHUR_SZEGO_ZERO_OUTPUT_COUNTEREXAMPLE_FORMALIZED", + "PROJECT_JENSEN_KERNEL_ZERO_AND_DEGREE_ONE_BOUNDARIES_FORMALIZED", + "NO_PINNED_HURWITZ_OR_ROUCHE_ZERO_PRESERVATION_THEOREM_FOUND", + "PROJECT_IDENTICALLY_ZERO_HALF_PLANE_BRANCH_PROPAGATES_GLOBALLY", + "PROJECT_JENSEN_FORMULA_ZERO_PRESERVATION_AND_CONNECTED_DOMAIN_HURWITZ_DICHOTOMY_PROVED", + "PROJECT_HALF_PLANE_HURWITZ_CLOSURE_AND_NONZERO_LIMIT_ZERO_REALITY_PROVED" + ], + "status": "FORMAL_LIBRARY_AUDITED_PROJECT_HURWITZ_CLOSURE_PROVED" + } + ] +} diff --git a/docs/source-cards/li-criterion.md b/docs/source-cards/li-criterion.md new file mode 100644 index 00000000..09735428 --- /dev/null +++ b/docs/source-cards/li-criterion.md @@ -0,0 +1,731 @@ +# Source card: Li coefficients and RH + +## Primary criterion + +- Xian-Jin Li, “The Positivity of a Sequence of Numbers and the Riemann + Hypothesis,” *Journal of Number Theory* 65 (1997), 325–333. + DOI: https://doi.org/10.1006/jnth.1997.2137 +- Publisher record: + https://www.sciencedirect.com/science/article/pii/S0022314X97921375 + +The source-standard normalization used by this route is + +\[ +\xi(s)=2(s-1)\pi^{-s/2}\Gamma(1+s/2)\zeta(s) + =s(s-1)\pi^{-s/2}\Gamma(s/2)\zeta(s). +\] + +Thus \(\xi(0)=\xi(1)=1\). For each integer \(n\geq 1\), + +\[ +\lambda_n=\frac1{(n-1)!} + \left.\frac{d^n}{ds^n}\left(s^{n-1}\log\xi(s)\right)\right|_{s=1}. +\] + +Li's criterion is the equivalence between RH and +\(\lambda_n\geq0\) for every integer \(n\geq1\). The Lean route uses +non-negativity, not finite verification and not an inferred all-index claim. +Some summaries state strict positivity; this route does not silently replace +the source theorem by that stronger wording. + +## Zero-sum formulation and convergence + +- Enrico Bombieri and Jeffrey C. Lagarias, “Complements to Li's Criterion + for the Riemann Hypothesis,” *Journal of Number Theory* 77 (1999), + 274–287. Institutional abstract: + https://www.nokia.com/bell-labs/publications-and-media/publications/complements-to-lis-criterion-for-the-riemann-hypothesis/ +- Jeffrey C. Lagarias, “Li coefficients for automorphic L-functions,” + *Annales de l'Institut Fourier* 57 (2007), 1689–1740: + https://www.numdam.org/item/10.5802/aif.2311.pdf + +With non-trivial zeros counted with multiplicity, + +\[ +\lambda_n=\sum_\rho\left[1-\left(1-\frac1\rho\right)^n\right]. +\] + +This is not an arbitrary enumeration sum. It is conditionally convergent and +uses the symmetric-height convention + +\[ +\lim_{T\to\infty}\sum_{|\operatorname{Im}\rho|\leq T} + \left[1-\left(1-\frac1\rho\right)^n\right]. +\] + +Bombieri–Lagarias' more general multiset theorem imposes summability +conditions (in one standard formulation, +\(\sum_\rho (1+|\operatorname{Re}\rho|)/(1+|\rho|)^2<\infty\)) and excludes +exceptional points required by the chosen transform. Those hypotheses must +be instantiated, not omitted, before applying the generalized theorem to +zeta zeros. + +Lagarias (2007), §1, records a useful two-sided refinement. Under the stated +multiset summability hypotheses, positivity for positive indices controls one +half-plane, positivity for negative indices controls the opposite half-plane, +and invariance under \(\rho\mapsto1-\rho\) identifies the two real parts. This +explains why positive indices suffice for zeta only after the functional +symmetry and convergence hypotheses have been established. It is an +all-index theorem, not a recurrence or a finite-prefix extrapolation. + +## Quantitative zero growth + +- Jeffrey C. Lagarias, “Li coefficients for automorphic L-functions,” + Theorem 2.1(4), gives + \(N^\pm(T)=\frac{N}{2\pi}T\log T+\frac12 C_0T+O(\log T)\). + For zeta this specializes to the Riemann--von Mangoldt estimate and implies + `O(log T)` zeros, counted with multiplicity, in `[T,T+1]`. +- H. Montgomery and R. Vaughan, *Multiplicative Number Theory I*, + Cambridge Studies in Advanced Mathematics 97 (2010), Chapter 12, + Lemma 12.1 and the surrounding explicit-formula discussion: + https://doi.org/10.1017/CBO9780511618314.014 +- K. Kedlaya, *Notes on Analytic Number Theory*, Lemma 9.4, states directly + that the number of zeta zeros in `[T,T+1]` is `O(log T)`: + https://kskedlaya.org/ant/chap-von-mangoldt.html + +Zero counting alone is insufficient for the raw Li summands: their +first-order size is `O(1/T)`, and `sum log(T)/T` diverges. Pairing conjugate +or reflected roots cancels that first-order imaginary contribution when real +parts stay in a bounded strip, leaving the source target +`O(log(T)/T^2)`. This is summable. Lean now uses the weaker sufficient +interface `O(T^(-3/2))`; Mathlib proves its summability and the resulting +Cauchy convergence. Establishing the paired quadratic estimate for actual +zeta windows remains an analytic obligation. + +The formal decomposition therefore remains: + +1. RH implies each nontrivial zero is on the critical line; +2. on that line, `|1 - 1/rho| = 1`, so every finite multiplicity-aware Li + sum has nonnegative real part; +3. symmetric convergence identifies the infinite zero sum; +4. the Hadamard/change-of-variables theorem identifies that sum with the + derivative coefficient; +5. the Bombieri–Lagarias/Li all-index theorem supplies the converse. + +Only steps 1–2 are finite. Omitting steps 3–5 is precisely the invalid +finite-to-infinite extrapolation rejected by the Lean counterexample. + +## Finite-product generating identity + +For a finite multiplicity-aware family, set +\(a_\rho=1-\rho^{-1}\). The elementary product + +\[ +P_F(z)=\prod_{\rho\in F}\frac{1-a_\rho z}{1-z} +\] + +satisfies the exact rational identity + +\[ +\frac{P_F'(z)}{P_F(z)} +=\sum_{\rho\in F}\left( + \frac1{1-z}-\frac{a_\rho}{1-a_\rho z}\right). +\] + +The coefficient of \(z^{n-1}\) in each summand is +\(1-a_\rho^n\). The Lean route proves this finite-product logarithmic +derivative identity at every Taylor order without any convergence +assumption. It also proves the exact factorwise Möbius identity + +\[ +P_F(z)=\prod_{\rho\in F} +\left(1+\frac{(1-z)^{-1}-1}{\rho}\right), +\] + +so multiplicities are preserved literally as repeated factors. Local normal +convergence, holomorphy, and common nonvanishing then transfer all these +coefficients to the product limit. Passing from these finite products to xi +still requires the +zeta-specific symmetric Hadamard product and locally strong convergence +sufficient to interchange the limit with logarithmic differentiation/Taylor +coefficient extraction. + +For the Hadamard direction, the route now uses the genus-one primary factor +\[ +E_1(w)=(1-w)e^w. +\] +Lean proves the explicit local estimate +\(\lVert E_1(w)-1\rVert\leq3\lVert w\rVert^2\) for +\(\lVert w\rVert\leq1\). Consequently, for any multiplicity-indexed root +family that escapes compact sets and satisfies +\(\sum_\rho |\rho^{-1}|^2<\infty\), the product +\(\prod_\rho E_1(s/\rho)\) converges locally uniformly on all of +\(\mathbb C\). The Bombieri--Lagarias summability weight implies this +inverse-square condition once the roots are uniformly separated from zero. +Every exact symmetric-height exhaustion then converges to the same product. + +The zeta-specific identification is now isolated as +`GenusOneHadamardRepresentation`: +\[ +\xi(s)=e^{a+bs}\prod_\rho E_1(s/\rho). +\] +Given it, Lean proves locally uniform convergence of the affine-normalized +symmetric finite products to xi. The normalization `xi(0)=1` forces +`exp(a)=1`, and the functional equation yields the corresponding exact +reflection constraint. The existence of this representation for the +formalized complete zeta-zero multiset is not asserted. + +Pinned Mathlib provides `differentiable_completedZeta₀` and +`completedRiemannZeta₀_one_sub`, but the source tree contains no packaged +finite-order theorem, no Hadamard factorization theorem specialized to it, +and no Bombieri--Lagarias theorem. The project now derives the needed +order-one estimate from lower-level Mathlib Gamma, Mellin, and zeta APIs. +The exact zeta-specific missing result is therefore a genus-one product for +normalized xi over the full multiplicity-indexed nontrivial-zero spectrum, +including convergence of symmetric finite products and their affine slopes. + +Pinned Mathlib does contain a different, genuinely useful theorem: +`MeromorphicOn.exists_canonicalDecomp` in +`Analysis.Complex.CanonicalDecomposition`. It has now been instantiated for +`riemannXiLi` on every disk. The resulting factors are finite +Blaschke/canonical disk factors, depend on the radius, and provide +codiscrete-within-disk equality. They do not imply finite entire-function +order or the whole-plane genus-one Hadamard product. + +Xi's zero data is now tied directly to Mathlib's divisor API: +`riemannXiZeroDivisor` has support exactly `riemannXiLi ⁻¹' {0}`; all local +orders are finite; reflection `ρ ↦ 1-ρ` preserves multiplicity; and in +`0 < re ρ`, away from `0,1`, xi and zeta have equal analytic order. Thus the +remaining divisor issue is global enumeration/exhaustion of this locally +finite divisor, not ambiguity about individual multiplicities. + +The global divisor is now proved finite on every compact, and the finite +canonical decompositions are chosen along the cofinal radii `N+1`. This is an +actual exhaustion of available disk theorems, but no compatibility between +the chosen zero-free remainders follows from `CanonicalDecomp`; normal +convergence to a whole-plane genus-one product remains a separate theorem. + +The Dirichlet-series API gives the genuine uniform bound +`‖ζ(s)‖ ≤ ∑ n⁻²` on `re s ≥ 2`. The classical Euler-integral estimate +\[ + |\Gamma(\sigma+it)|\leq\Gamma(\sigma)\qquad(\sigma>0) +\] +is now proved directly from Mathlib's `Complex.Gamma_eq_integral`; see +Otto Forster, *Analytic Number Theory*, §9.1, +. +Mathlib's real-Gamma monotonicity and `Nat.factorial_le_pow` then give +`Γ(x) ≤ ⌈x⌉^⌈x⌉` for `x ≥ 2`. Together these produce an explicit far-right +xi estimate on `re s ≥ 4`, without asserting an unavailable Stirling API. + +For the central strip, bounding zeta itself is the wrong global statement +because of its pole at `s=1`. The route instead proves a generic Mellin +endpoint-majorant theorem and applies Mathlib's all-exponent Mellin +representation of `completedRiemannZeta₀`. The completion is uniformly +bounded on every closed vertical strip, and normalized xi consequently has +quadratic growth there. + +The standard quantitative input is now represented by +`RiemannXiOrderOneGrowthBound`: +\[ + |\xi(s)|\le \exp(C|s|\log(|s|+2)) +\] +outside a fixed disk. This estimate and the conclusion that xi has order at +most one are stated in K. Kedlaya, *18.785: Order of an entire function and +zeroes of the Riemann zeta function*, pp. 1–2, and the Encyclopedia of +Mathematics entry *Riemann xi-function* records that xi is entire of order +one and gives its Hadamard product. The proposition is not asserted in Lean +upstream, but it is now proved project-locally as +`riemannXi_orderOneGrowthBound`. The proof packages the ceiling-power +far-right estimate, quadratic central-strip bound, and functional-equation +reflection into the exact `exp(C r log(r+2))` interface. + +Mathlib's Jensen/value-distribution API is now instantiated unconditionally: +the logarithmic count of `riemannXiZeroDivisor` equals the circle average of +`log ‖riemannXiLi‖`, with no additive normalization term because `xi(0)=1`. +Thus the formal zero-count side of the sourced growth argument is available. + +Lean also proves optimal uniqueness for the prefactor over a fixed canonical +product: its slope `b` is unique and `exp(a)` is unique. Equality of the raw +constants `a` is not valid without fixing a logarithm branch; precisely, two +such constants differ by an element of `2πiℤ`. + +This is the classical factorization in E. C. Titchmarsh, +*The Theory of the Riemann Zeta-function*, 2nd ed., revised by +D. R. Heath-Brown (1986), §2.12, especially (2.12.5). The Encyclopedia of +Mathematics records the same formula and references Titchmarsh: +https://encyclopediaofmath.org/wiki/Riemann_xi-function + +## Normalization warning + +The often-used Riemann function +\(\xi_{\mathrm{std}}(s)=\tfrac12s(s-1)\Lambda(s)\) differs from Li's +normalization above by the nonzero constant \(1/2\). Positive-order +derivatives of `log` are locally unchanged by this constant, after a +compatible logarithm branch is established. The Lean development avoids +needing that normalization bridge by defining Li's normalization directly. + +## Formalization status + +Pinned Mathlib v4.32.0-rc1 provides: + +- `completedRiemannZeta`, the entire pole-subtracted + `completedRiemannZeta₀`, and the functional equation; +- `iteratedDeriv` and complex analytic/logarithm machinery; +- `analyticOrderAt : (ℂ → ℂ) → ℂ → ℕ∞`, including the characterization + `analyticOrderAt_ne_zero` of analytic zeros with intrinsic order; +- `TendstoLocallyUniformlyOn.differentiableOn` and + `TendstoLocallyUniformlyOn.deriv` for Weierstrass convergence; +- `logDeriv_tendsto` and `logDeriv_tprod_eq_tsum` for logarithmic + derivatives of locally uniform limits/products; +- `HasProdLocallyUniformlyOn` and `MultipliableLocallyUniformlyOn`; +- `riemannZetaZeros`, discreteness, and finiteness in compact sets; +- escape of the zero subtype to the cocompact filter; +- the canonical `RiemannHypothesis`. + +It does not currently provide: + +- a single global zeta-zero enumeration ordered by symmetric height; +- a symmetric Hadamard/canonical product for xi with locally uniform + convergence on the neighborhood needed for coefficient extraction; +- convergence of the symmetric-height Li zero sum; +- a Riemann--von Mangoldt zero-counting asymptotic or quantitative + strip/shell-growth bound suitable for a summable majorant; +- the derivative/zero-sum identity; +- Li's all-index positivity equivalence. + +Accordingly, `RiemannLiCriterionStatement` is a typed unproved proposition, +and `HeightSymmetricLiLimit` is only the exact convergence shape for an +already supplied indexed multiset. Neither is inhabited by an axiom. + +The route defines `riemannZetaZeroOrder` directly from `analyticOrderAt`, +proves away from the pole that nonzero order is exactly membership in +`riemannZetaZeros`, and proves every such order is finite by analytic +continuation from the nonzero value at `s = 2`. Compact-zero finiteness then +produces concrete bounded norm windows, indexed by +`Σ rho, Fin multiplicity`, with exact repetition. It also proves that locally +uniform convergence of +holomorphic, nonvanishing approximants transfers every iterated derivative +of their logarithmic derivatives. The finite Taylor identity is now proved +at every order, so normal convergence transfers every multiplicity-aware +finite Li sum to the corresponding limit coefficient without a separate +finite algebra hypothesis. + +The route now also constructs finite closed rectangles +`|Re rho| ≤ A, |Im rho| ≤ T`, including boundary zeros and analytic +multiplicity, and injectively reindexes them as `T` grows. Under the explicit +hypothesis that all nontrivial zeros satisfy `|Re rho| ≤ A`, these are exactly +the source-standard symmetric-height windows. This hypothesis is not silently +asserted: pinned Mathlib does not provide the required unconditional +nontrivial-zero strip classification. + +For convergence, the route proves two precise interfaces: + +- unconditional summability plus cofinal exact height exhaustion identifies + the limit with the `tsum`; +- a summable majorant for distances between successive height shells gives + the required Cauchy sequence. Concretely, `ThreeHalvesLiShellBound` assumes + `dist(S_N,S_(N+1)) ≤ C_n (N+1)^(-3/2)`; Lean proves this majorant summable + and obtains `HeightSymmetricLiCauchy`. + +`LogarithmicZeroShellCount` records the Riemann--von Mangoldt `O(log T)` +input, while `QuadraticPairedLiShellCancellation` records the combined +`O(log T/T^2)` target. Lean proves this latter majorant summable and derives +`HeightSymmetricLiCauchy`; it is not asserted for zeta without a proof. + +The latter is where a zeta zero-count/growth estimate must enter. The route +does not claim such a majorant for zeta. A search of the pinned +`Mathlib/NumberTheory/LSeries` zeta API found only discreteness, compact +finiteness, and cocompact escape for zeros, not the quantitative estimate +needed to discharge it. + +Finally, `liChangeOfVariables xi z = xi ((1-z)⁻¹)` is explicit. Lean proves +its zeroth logarithmic-derivative coefficient equals `λ₁` and transfers all +orders from normally convergent nonvanishing finite canonical Möbius +products. The finite all-order Möbius identity is closed; the distinct +general identity equating those limit coefficients with Li's derivative +definition remains named `LiChangeOfVariablesCoefficientIdentity`. + +For the converse, Lean proves +`‖1-rho⁻¹‖ ≤ 1 ↔ Re rho ≥ 1/2`. It then isolates the finite Bombieri--Lagarias +step as `FiniteLiSpectralConverseStatement`: aggregate positivity at every +positive index must imply each individual transform lies in the unit disk. +Given this statement and multiplicity-preserving reflection symmetry, +critical-line location follows formally. Proving that spectral implication +under the source summability hypotheses, the zeta-specific symmetric +product, the all-index zero-window formula, and the infinite Li converse +remain genuine source bridges rather than assumptions. + +Generic normal convergence is no longer part of that blocker: it follows +from the proved genus-one estimate and inverse-square summability. The +remaining product theorem is specifically the Hadamard identification of +that product with xi (including the affine exponential prefactor), together +with the comparison of those genus-one approximants to the centered finite +Li factors. This comparison is also where reflection reindexing and the +prefactor contribution to the all-order coefficient identity must be +resolved globally. + +The finite comparison is now closed exactly. For a reflection-symmetric +multiplicity-indexed finite family, +\[ +\prod_\rho E_1(s/\rho) +=C_F\,e^{s\sum_\rho\rho^{-1}} + \prod_\rho\left(1+\frac{s-1}{\rho}\right). +\] +If the affine Hadamard slope cancels the finite inverse-root sum, the +remaining factor is a nonzero constant, so every Möbius-transformed +logarithmic-derivative coefficient equals the corresponding finite Li sum. +The infinite missing statement is therefore the convergence/balancing of +these affine slopes and inverse-root sums for the zeta exhaustion, not any +further finite binomial algebra. + +Mathlib's simply-connected branch-log theorem also supplies a global +continuous logarithm for every continuous zero-free whole-plane quotient. +The project now proves that, for an entire quotient, this lift is entire and +that its derivative equals the quotient's logarithmic derivative. It also +proves that vanishing second derivative makes the logarithm affine and the +quotient exponential-affine. + +The remaining Hadamard rigidity theorem is now closed in the exact form +needed. Cauchy's estimate proves rigidity from `o(‖z‖²)` norm growth. +Borel--Carathéodory strengthens this to the disk-real-part condition +`sup_{‖z‖. +The standard finite-order Hadamard proof controls the cancelled quotient, +not the raw reciprocal product. Mathlib's +`Analysis.Complex.ValueDistribution.Cartan` explicitly notes that Cartan's +formula is future work, and the current value-distribution API contains no +replacement minimum-modulus theorem. +The exceptional-disk geometry is now proved. If finite disks have +`2 * sum radii < b-a`, Lebesgue measure supplies a radius in `[a,b]` whose +centered circle is disjoint from every disk; the factor `2` comes from the +exact radial interval width. `CartanExceptionalDiskLogBound` packages only +the still-missing infinite-product analytic lower bound outside these disks. +The finite lower bound is no longer missing: the elementary equal-radius +cover with radius `H/(3n)` has total diameter `2H/3`, gives +`|prod(z-ρ)| ≥ (H/(3n))^n`, and gives the genus-one factorwise bound +`(H/(3n))/|ρ| * exp(-|z|/|ρ|)`. The selected-circle version and its canonical +xi-window specialization are proved. A separate finite-tail estimate bounds +the product's distance from one by +`exp(3|z|² sum |ρ|⁻²)-1`. +This estimate now passes to the actual infinite complementary product: +window cofinality and summability prove that the inverse-square tail mass +tends to zero, and the same exponential bound holds uniformly on +`|z|≤R`. The head terms satisfy +`sum log|ρ| ≤ card(window T) log T`, and Cauchy--Schwarz bounds +`(sum |ρ|⁻¹)²` by cardinality times the global inverse-square mass. +`subquadraticBoundaryLogNormGrowth_of_cartanExceptionalDisks` performs the +cofinal circle selection, and the existing maximum-modulus proof upgrades it +to `SubquadraticLogNormGrowth`. Since inverse-square summability and divisor +matching are unconditional, +`riemannXiGenusOneHadamardRepresentation_of_cartanExceptionalDisks` closes +the analytic log, affine rigidity, and whole-plane identity from that sole +minimum-modulus hypothesis. No minimum-modulus claim is inferred from +separate upper bounds for xi and its product. + +A source-level target is Cartan's polynomial lemma: for a monic degree-`n` +polynomial and `h>0`, at most `n` exceptional disks with total radius at most +`2eh` suffice to ensure `|P(z)|>h^n` outside them. See Levin, +*Distribution of Zeros of Entire Functions*, Chapter I, §7, and the statement +reproduced in +, Lemma 3.1. The sharper disk-merging +constant from that lemma is not yet formalized, but the elementary +equal-radius variant is sufficient in shape for the order-one application. +What remains is a quantitative dyadic decay theorem for the complementary +inverse-square mass (classically `O(log R/R)`) and a joint truncation/circle +choice that preserves the finite-head constants. The weighted geometric +series and xi shell estimate are now formalized: +`sum_{k≥N} shellMass(k) ≤ A(N+1)/2^N`. Exact reindexing from the complement +of the radius-`2^N` window to shifted dyadic shells is now proved using a +strict lower boundary at the truncation +radius and half-open dyadic shells, so boundary roots occur exactly once or +remain in the closed head window. The compatible choice +`R_j=2^j`, `N_j=4j` is also proved to make +`R_j²(N_j+1)/2^N_j` tend to zero. The sourced shell majorant is now +transported through the boundary-safe partition, giving the explicit radial +estimate +`tailMass(2^N) ≤ A(N+1)/2^N`. Constant tracking corrects the truncation +choice to `N_j=j`: the earlier `4j` choice controls the tail but makes the +available finite-head loss too large. At `N_j=j`, both the tail contribution +`O(j·2^j)` and head root-log contribution `O(2^j j²)` are subquadratic +relative to `R_j²=2^(2j)`. Circle selection with radius in +`[2^j,2^(j+1)]` is formalized. The remaining obligation is to combine the +finite head and infinite tail into one canonical-product lower bound. The +tail side is now multiplicative rather than additive: the principal-log +estimate on `‖w‖≤1/2` proves +`exp(-‖w‖²)≤‖(1-w)exp(w)‖`, and normal convergence gives +`exp(-‖z‖² tailMass(T))≤‖tailProduct(z)‖` whenever `‖z‖≤T/2`. +Consequently the head cutoff must be a fixed factor beyond the selected +circle, e.g. `T=2^(j+2)` for circles in `[2^j,2^(j+1)]`; this does not alter +the asymptotic estimates. The previous formal obligation was the +head/complement `tprod` split and multiplication of the two lower bounds. +This is now proved by establishing convergence on the finite and +complementary subtypes separately and applying the commutative-monoid +`HasProd.mul_compl` identity. The resulting selected-circle theorem bounds +the full canonical product below using cutoff `2^(j+2)`. The remaining +obligation is to aggregate the explicit head and tail logarithmic losses and +combine them with xi's order-one upper bound to control the cancelled +quotient. This bridge is now formalized: the finite head is exactly +`exp(-riemannXiFiniteHeadLogLoss)`, its three terms have explicit +cardinality/root-log/Cauchy--Schwarz bounds, and the tail contributes +`‖z‖² tailMass(T)`. Away from product zeros, the normal-form cancelled +quotient equals `xi/P`; hence the selected-circle estimate is +`‖q(z)‖≤exp(C‖z‖log(‖z‖+2)+circleLoss(z))`. +The remaining obligation is the real-asymptotic proof that the displayed +loss is `o(2^(2j))`, especially its square-root and +`card·log(3 card/H)` terms. Jensen's count is now specialized without +strengthening it: +`card(window(2^(j+2)))≤B·2^j(j+1)`. The inequality `log x≤x` reduces the +normalized Cartan cardinal-log loss to +`3B²(j+1)²/2^j`, while Cauchy--Schwarz reduces the normalized inverse-root +loss to a constant multiple of `sqrt((j+1)/2^j)`; both convergence statements +are formalized. What remains is their simultaneous epsilon-level assembly +with the already quantitative root-log and tail terms. The common +polynomial/geometric + square-root + linear/geometric expression is now +packaged as `DyadicCartanLossMajorant`, and its eventual epsilon bound is +proved. The apparent every-real-annulus mismatch is now removed: +`DyadicSubquadraticBoundaryLogNormGrowth` is enough. The next dyadic scale is +at most twice the requested scale, so requesting `ε/4` absorbs the squared +loss; maximum modulus then fills every disk. The corresponding conversion to +global `SubquadraticLogNormGrowth` and the xi Hadamard pipeline are proved. +It remains only to dominate the explicit selected-circle xi quotient bound +by one fixed instance of `DyadicCartanLossMajorant`. This is now formalized +with fixed constants `2B+3B²`, `4BM`, and `4C+3A`; every numerator, +finite-head, inverse-root, cardinal-log, and radial-tail term is matched. +Consequently the dyadic boundary and affine xi Hadamard representation are +proved under `Nonempty RiemannXiZeroIndex`, with normalization `exp a=1`. +The inhabitation is now proved rather than imported: an empty product makes +xi exponential-affine, reflection forces zero slope, and the sourced formulas +`ζ(2)=π²/6` and `π>3` give `xi(2)=π/3≠1`, contradicting constancy. +Accordingly the Hadamard and normalized representations are unconditional. +The separate all-order xi Möbius/Faà di Bruno coefficient identity remains +explicitly open; this is now the exact coefficient-transfer blocker. The +Li-derivative side is nevertheless closed at all orders: +`liDerivativeCoefficient_eq_leibnizSum` expands it into the exact finite +`choose * descFactorial * iteratedDeriv(log xi)` sum. +`MobiusFaaDiBrunoCoefficientIdentity` exposes the matching composition formula +for `(1-z)⁻¹`, and its equivalence to the previous coefficient interface is +proved. The remaining step is therefore purely the all-order composition +identity, not normal-convergence or zero-multiplicity interchange. +The inner Möbius derivatives are now source-free algebra: +`D^k(1-z)⁻¹ = k!(1-z)^(-(k+1))`, globally and hence at zero. The outstanding +Faà di Bruno work is reduced to iterating the two-term product/chain +recurrence and identifying its finite coefficients with +`choose(k+1,i) * descFactorial(k,i)`. This is the genuine remaining +combinatorial blocker. The combinatorial part is now proved: +`IsMobiusFaaDiBrunoCoefficientRecurrence` records base/support/step data, +the closed choose/falling-factorial coefficients satisfy it, and the +recurrence is unique. The remaining obligation is the local analytic bridge +from repeated product/chain differentiation (or Mathlib's ordered-partition +`HasFTaylorSeriesUpToOn.comp`) to that recurrence. Mere +convergence of the tail mass to zero does not control `R² * tailMass(R)`. +The scalar regularity component of this bridge is now proved: +`AnalyticAt.differentiableAt_iteratedDeriv` derives differentiability of +every scalar `iteratedDeriv m` from Mathlib's analytic `iteratedFDeriv` +closure and scalar evaluation equivalence. The exact remaining step is the +finite-sum product/chain-rule reindexing that realizes the triangular +recurrence for the composition. +The analytic side has now advanced further: +`hasDerivAt_mobiusFaaDiBrunoSummand` proves the exact two-contribution +derivative of each specialized basis term, while +`hasDerivAt_mobiusFaaDiBrunoSum` sums those derivatives over the finite +triangle and verifies every natural-subtraction boundary. Only the finite +index shift and coefficient collection remain before recurrence uniqueness +can discharge `MobiusFaaDiBrunoCoefficientIdentity`. Those finite steps are +now proved by `mobiusFaaDiBrunoSum_reindex` and +`mobiusFaaDiBrunoCoefficientSum_reindex`, including support at both endpoints +and the artificial zero top index. The remaining gap is local analytic +induction: upgrading the pointwise row formula to an eventual neighborhood +identity so its derivative can be replaced by the next collected row. +This local induction gap is now closed generically: +`iteratedDeriv_mobiusComposition_eq_row` preserves an eventual neighborhood +through every differentiation step, and +`iteratedDeriv_mobiusComposition_zero` specializes the result to the exact +closed coefficient sum at zero. The remaining xi-specific obligation is to +identify its transformed logarithmic derivative with this generic +composition germ using local nonvanishing and `Complex.log` differentiation. +This final germ identification is now proved. The normalized value +`riemannXiLi 1 = 1`, continuity, and openness of `Complex.slitPlane` yield a +zero-free transformed neighborhood. The exact principal-log chain rule is +`logDeriv_liChangeOfVariables_eq_mobiusLogDerivative`; its eventual xi +specialization transfers all iterated derivatives. Thus both +`riemannXiLi_mobiusFaaDiBrunoCoefficientIdentity` and the original +`riemannXiLi_changeOfVariablesCoefficientIdentity` are unconditional. + +The exact remaining forward-criterion obligation is to instantiate +`XiCanonicalProductApproximation` for the concrete xi zero-window +approximants from the proved whole-plane Hadamard representation. Once this +is supplied, the existing zero-window convergence theorem gives +`RiemannLiZeroWindowFormula` and hence RH-to-positivity. The +Bombieri--Lagarias converse remains unproved and is not inferred from the +coefficient identity. +Concrete radial Hadamard approximation is now proved: +`riemannXiZeroIndexWindow_nat_tendsto_atTop` gives cofinality of the +multiplicity windows, +`riemannXiRadialGenusOneProducts_tendstoLocallyUniformly` gives normal +convergence of their genus-one products, and +`exists_riemannXiRadialHadamardApproximants_tendstoLocallyUniformly` restores +the affine factor and converges to xi globally. + +This still does not instantiate `XiCanonicalProductApproximation`, whose +finite factors are centered at one and carry no affine prefactor. The precise +missing estimate/identity is convergence of +`b + ∑_{rho in window} rho⁻¹` to zero (with the corresponding centering +constant normalization), plus a multiplicity-preserving comparison between +the canonical xi enumeration windows and the current zeta-divisor windows. +Without these, removing the exponential correction would be an invalid +finite-to-infinite extrapolation. +Multiplicity-exact functional-equation pairing is now available internally: +`riemannXiZeroReflection` transports each finite-fiber ordinal to the +reflected zero, and `riemannXiZeroRoot_inv_add_reflection` reduces the paired +inverse-root term to `(rho(1-rho))⁻¹`. This is precisely the +inverse-quadratic cancellation needed by a symmetric exhaustion. + +However, `riemannXiZeroReflection_mem_window_add_one` proves that radial +windows are reflection-compatible only after a radius-one enlargement, not +exactly invariant. The pinned cumulative Jensen estimate `O(R log R)` does +not control this unit boundary shell. Closing the slope correction requires +either a sourced Riemann--von Mangoldt/local shell estimate or symmetric +height windows together with a fixed-real-strip theorem for all xi zeros. +Pinned Mathlib supplies neither latter zeta-specific result, so no slope +limit, `XiCanonicalProductApproximation`, zero-sum formula, or RH positivity +is claimed from the present hypotheses. +The real-strip alternative is now discharged internally. Mathlib's +`riemannZeta_ne_zero_of_one_le_re`, xi/zeta zero compatibility, and the xi +functional equation prove every xi zero lies in `0 < Re rho < 1`. This makes +the new `riemannXiZeroHeightWindow` finite and proves additive-one comparison +with radial windows and cofinality of both exhaustions. + +Reflection acts as an exact multiplicity permutation on every height window. +The resulting theorem +`two_mul_sum_inv_riemannXiZeroHeightWindow` converts each finite inverse-root +sum into the inverse-quadratic paired sum. What remains is the analytic +limit/slope identification (and a completed-zeta conjugation theorem for the +requested conjugation symmetry), followed by the multiplicity-exact +xi-window/zeta-divisor comparison. Until those are proved, +`XiCanonicalProductApproximation` and the all-index positivity consequences +remain open. + +The paired-limit analytic obstruction has since narrowed further. The paired +terms `1/(rho(1-rho))` are absolutely summable, the exact symmetric-height +inverse-root sums converge to half their `tsum`, and each finite paired sum +is the logarithmic derivative at `1` of its genus-one product. What is not +yet packaged is the derivative/logarithmic-derivative passage through the +locally uniform infinite-product limit needed to identify this value with +the negative affine Hadamard slope. Conjugation and the classification of +all nontrivial zeta zeros into the critical strip also remain unavailable +from pinned Mathlib. + +The derivative/slope passage is now formalized. Weierstrass derivative +convergence for the locally uniform height products identifies the infinite +product's logarithmic derivative at `1` with the paired inverse-root `tsum`; +the derivative at `0` vanishes. Combining these facts with the normalized +Hadamard representation and xi functional equation proves that this `tsum` +is `-2b`, so symmetric-height inverse-root sums converge to `-b`. + +Pinned Mathlib does contain `Complex.Gamma_conj`, `Complex.conj_tsum`, and +the zeta Dirichlet-series identity on `Re s > 1`, but no packaged analytic +continuation theorem asserting zeta or completed-zeta conjugation. It also +does not classify every zero excluded by `IsNontrivialRiemannZetaZero` into +the open critical strip. These are now the genuine blockers for +conjugation-equivariant multiplicity indices, xi/zeta height-window +identification, and the unconditional canonical-product package. + +The functional-equation patch is also closed: a norm estimate on +`re s ≥ 1/2` with a majorant symmetric in `s` and `1-s` automatically extends +globally. Hence the missing sourced estimate can be developed solely in the +right half-plane; no separate left-half-plane Gamma/zeta analysis is needed. + +At the theorem-interface level, those two obligations now instantiate the +all-order xi limit directly and imply `RiemannLiZeroWindowFormula` for the +concrete multiplicity-aware zeta windows. + +The infinite interface now records the source summability condition as +`BombieriLagariasSummability` and separates the steps: + +1. symmetric zero-sum convergence; +2. the Bombieri--Lagarias spectral implication from all-index positivity to + individual unit-disk bounds; +3. reflection symmetry, which Lean proves converts those bounds to + `Re rho = 1/2`. + +An explicit reflected pair away from the critical line together with the +unrelated zero coefficient sequence is Lean-checked as a counterexample to +omitting step 1/its product identity. It is not a counterexample to the +Bombieri--Lagarias theorem because the coefficients are deliberately not the +multiset's Li sums. + +A second Lean counterexample shows that reflection symmetry plus the +Bombieri--Lagarias summability weight alone still permits off-line roots. +Hence the unresolved source theorem is precisely the positivity-to-location +implication for the genuine convergent Li sums; summability and symmetry +cannot replace positivity. + +The source-shaped half-plane conclusion has now been separated explicitly: +under the Bombieri--Lagarias summability and genuine symmetric Li limits, +all-index positivity must prove `1/2 ≤ re ρ`. For nonzero roots this is +Lean-equivalent to the existing individual Li-transform unit-disk bound. +Reflection then forces equality. The positivity-to-half-plane implication +itself remains absent from pinned Mathlib. + +`RiemannLiSpectralModel` now packages a complete nontrivial-zero enumeration, +reflection, source summability, and the genuine symmetric Li limits. Lean +proves that positivity plus the Bombieri--Lagarias half-plane implication for +such a model yields `KakeyaRiemannHypothesisRoot`. The only unproved spectral +step in that theorem is exactly positivity-to-half-plane location. diff --git a/docs/weil-positivity-route.md b/docs/weil-positivity-route.md new file mode 100644 index 00000000..6ac71b12 --- /dev/null +++ b/docs/weil-positivity-route.md @@ -0,0 +1,1163 @@ +# Weil positivity / energy route to RH + +Status: **partial, unconditional finite/limit infrastructure**. Nothing in +this route asserts the full explicit formula or RH. + +## Exact classical criterion (multiplicative normalization) + +Let + +* \(D=C_c^\infty((0,\infty),\mathbb C)\); +* \(\widehat f(s)=\int_0^\infty f(x)x^{s-1}\,dx\); +* \((f*g)(x)=\int_0^\infty f(x/y)g(y)\,dy/y\); +* \(f^\ast(x)=x^{-1}\overline{f(x^{-1})}\). + +Then +\[ + \widehat{f^\ast}(s) + =\overline{\widehat f(1-\overline s)},\qquad + \widehat{f*f^\ast}(s) + =\widehat f(s)\overline{\widehat f(1-\overline s)}. +\] + +For the Riemann zeta function, with nontrivial zeros counted with +multiplicity in the symmetric explicit-formula limit, Weil's criterion is +\[ + \mathrm{RH}\quad\Longleftrightarrow\quad + \sum_\rho \widehat{f*f^\ast}(\rho)\ge 0 + \quad\text{for every }f\in D. +\] + +Bombieri's refinement states strict positivity for every nonzero complex +\(f\in D\). The commonly printed real-test version suppresses conjugation: +for real \(f\), the summand is written +\(\widehat f(\rho)\widehat f(1-\rho)\). These are not different +normalizations. + +The associated Guinand--Weil formula in Bombieri's normalization is +\[ +\begin{aligned} +\sum_\rho \widehat h(\rho) +={}&\widehat h(1)+\widehat h(0) +-\sum_{n\ge1}\Lambda(n)(h(n)+h^\tau(n))\\ +&-(\log(4\pi)+\gamma)h(1) +-\int_1^\infty + \left(h(x)+h^\tau(x)-\frac{2h(1)}x\right) + \frac{x\,dx}{x^2-1}, +\end{aligned} +\] +where \(h^\tau(x)=x^{-1}h(x^{-1})\). For the quadratic criterion, +\(h=f*f^\ast\). Compact support makes the prime-power sum finite, while +smoothness gives rapid vertical decay of the Mellin transform. + +## Logarithmic, critical-line-centred normalization + +Putting \(x=e^t\), centring \(s=1/2+z\), and setting +\(\phi(t)=e^{t/2}f(e^t)\) identifies the test space with +\(C_c^\infty(\mathbb R,\mathbb C)\). Exactly, +\[ + \widehat f(1/2+z)=\int_{\mathbb R}\phi(t)e^{zt}\,dt. +\] +The transform and involution used in `KakeyaLeanGate.WeilPositivity` are +\[ + F(z)=\int_\mathbb R f(t)e^{zt}\,dt,\qquad + f^\star(t)=\overline{f(-t)}. +\] +Additive convolution in \(t\) is multiplicative convolution for \(dx/x\). +RH says exactly that all spectral parameters \(z=\rho-1/2\) are imaginary. +This is also Burnol's shifted-distribution formulation +\(C(f*f^\star)\ge0\). + +## Variant and scope distinctions + +* **Weil/Bombieri, zeta:** the statements above are equivalent to RH for + \(\zeta(s)\), not GRH. +* **Nice-test variant (Lagarias):** piecewise \(C^2\), compact support, with + midpoint values at jumps. Its spectral functional is + \(W^{(1)}(h)=\sum_\rho M[h](\rho)\), and RH is equivalent to + \(W^{(1)}(f*\widetilde{\bar f})\ge0\) for every nice \(f\). + The smooth compactly-supported class is a sufficient subspace for the + criterion and is the class formalized here. +* **Barner class:** a broader decay/bounded-variation class used for + Weil--Barner explicit formulae. It is useful for numerical zero + certification, but is not the domain selected for this Lean interface. +* **Number fields / Hecke characters:** Weil's adelic criterion gives the + corresponding generalized RH only when positivity is required for the + relevant completed \(L\)-functions. It must not be described as a proof of + GRH from the zeta-only functional. +* **Even real additive tests:** positivity only on an improperly weakened + symmetry class can miss real exceptional zeros; this is why the formal + domain is complex and the involution includes conjugation. + +## Pinned Mathlib audit (`v4.32.0-rc1`) + +Available and used: + +* `TestFunction`: bundled \(C_c^\infty\) functions, including linear + operations and compact support; +* `HasCompactSupport.toSchwartzMap`, giving the canonical map + \(C_c^\infty(\mathbb R)\to\mathcal S(\mathbb R)\); +* Bochner convolution, compact-support closure, and smoothness of + convolution; +* `mellin`, `MellinConvergent`, and Mellin inversion infrastructure; +* `Real.fourier_eq'`, Schwartz Fourier transforms, Fourier convolution, and + Plancherel infrastructure (with Mathlib's \(e^{-2\pi i x\xi}\) + normalization); +* `Matrix.PosSemidef`, Gram matrices, and positive-semidefinite submatrices; +* closed-order limits and `tendsto_atTop_ciSup` for bounded monotone real + families; +* `riemannZeta`, `completedRiemannZeta`, the functional equation, and the + proposition `RiemannHypothesis`; +* `riemannZetaZeros`, `isDiscrete_riemannZetaZeros`, and + `IsCompact.inter_riemannZetaZeros_finite`, giving finite compact windows of + distinct zeros (without multiplicity); +* `ArithmeticFunction.LSeriesSummable_vonMangoldt` and + `ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div`, giving + absolute convergence and + \(\sum_n\Lambda(n)n^{-s}=-\zeta'(s)/\zeta(s)\) for \(\Re s>1\); +* `tendsto_integral_of_dominated_convergence` and its filter variant; +* `TendstoUniformlyOn.tendsto_at`, reducing uniform convergence on a selected + test subclass to the pointwise convergence positivity needs. + +Absent after repository-wide API search: + +* a type enumerating nontrivial zeta zeros with multiplicity (the pinned + library does have the zero set and compact-window finiteness); +* the symmetric/regularized sum over zeros; +* the von-Mangoldt plus archimedean Guinand--Weil explicit formula; +* a completed-zeta zero distribution; +* any theorem connecting distribution positivity to `RiemannHypothesis`. + +The Lean file therefore defines the admissible domain, its actual inclusion +into Mathlib's Schwartz space, a multiplicative representative, the actual +`mellin` expression, centred transform, involution, convolution, a typed +distribution interface, its exact quadratic functional and positivity +predicate, and the proposition +`BridgeObligation W := IsPositive W ↔ RiemannHypothesis`. The multiplicative +change of variables is named `MellinNormalizationObligation`; it is not +silently assumed. The route supplies no inhabitant of either obligation. +The critical-line Fourier normalization is proved: +\[ + F_f(-2\pi i\xi)=\mathcal F_{\rm Mathlib}(f)(\xi). +\] + +The module also exposes `zetaZeroWindowFinset R`, the finite set of distinct +zeta zeros in a closed disk. This is a source-backed restricted finite object, +not the spectral explicit-formula sum: a `Finset` forgets analytic +multiplicity, and disk truncation does not choose the classical symmetric +regularization. + +On the prime side, `vonMangoldt_lseries_eq_neg_logDeriv` and +`vonMangoldt_lseries_summable` wrap Mathlib's checked theorems on \(\Re s>1\). +They are genuine smaller explicit-formula ingredients, but they do not cross +the critical strip or supply zero and archimedean terms. + +### Stage-four right-half-plane fragment + +The formalization now exposes Mathlib's exact individual term +\[ + a_n(s)= + \begin{cases} + 0,&n=0,\\ + \Lambda(n)n^{-s},&n>0, + \end{cases} +\] +as `vonMangoldtTerm`. For \(\Re s>1\), Lean proves +`vonMangoldtPartialSum_tendsto_logDeriv`: +\[ + \sum_{n1\); it is not a +Guinand--Weil formula or analytic continuation. + +### Actual archimedean factor + +The archimedean term is now pinned to Mathlib's Deligne factor +\[ + \Gamma_{\mathbb R}(s)=\pi^{-s/2}\Gamma(s/2). +\] +Lean proves directly from `Complex.Gammaℝ`, `Complex.digamma`, and their +derivative APIs that, for \(\Re s>0\), +\[ + \frac{\Gamma_{\mathbb R}'(s)}{\Gamma_{\mathbb R}(s)} + =-\frac{\log\pi}{2}+\frac12\psi(s/2). +\] +At \(s=1\), `archimedeanLogDeriv_one` pins the constant to +\[ + -\frac{\gamma+\log(4\pi)}2. +\] +`ArchimedeanGammaApproximation` packages a quantitative truncation and proves +its convergence from an error envelope. Mathlib's digamma file explicitly +lists Gauss's integral representation as TODO, so the construction of the +classical truncated archimedean integral remains an analytic obligation +rather than an invented identity. + +There is nevertheless a genuine source-backed positive-integer +approximation. Mathlib proves +\[ + \psi(n+1)=-\gamma+H_n +\] +and constructs \(\gamma\) between the harmonic--log sequences. Lean now +derives the explicit error estimate +\[ + 0\le H_n-\log n-\gamma + \le\log(n+1)-\log n\longrightarrow0 + \qquad(n>0). +\] +This gives `norm_digamma_nat_add_one_sub_log_le`. At \(s=2\), Gamma +recurrence yields the exact finite `archimedeanAtTwoStage`; its error is zero. + +`vonMangoldtPartialSum_add_tail` also splits the actual absolutely convergent +prime series into a finite sum and exact tail. Combining these gives the +non-circular theorem `finiteCompletedLogDerivAtTwo`: +\[ + \sum_{n