Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions RealRooted.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2431,3 +2431,16 @@ public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta
public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Hadamard
public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen
public import RealRooted.RiemannHypothesis
public import RealRooted.Hermite.GeneratingFunction
public import RealRooted.Hermite.Jensen
public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.MulPow
public import RealRooted.Mathlib.Analysis.MellinTransform.LogMoments
public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Kernel
public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Mellin
public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Moments
public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity
public import RealRooted.MultiplierSequence.JensenDerivative
public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Hermite
public import RealRooted.RiemannHypothesis.Hermite
public import RealRooted.RiemannHypothesis.Inequalities
public import RealRooted.RiemannHypothesis.MultiplierSequence
64 changes: 64 additions & 0 deletions RealRooted/Hermite/GeneratingFunction.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
module

public import RealRooted.Hermite.Homogeneous
public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
public import Mathlib.Analysis.Complex.Exponential
public import Mathlib.Analysis.Complex.Basic
import RealRooted.Hermite.Gaussian
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.Analysis.Calculus.Deriv.Pow

/-!
# Derivatives of quadratic exponentials

The homogeneous Hermite normalization is the exponential generating function
`exp (x z + s z²)`. In particular, `s = -1` and `x = 2 X` give the
physicists' Hermite polynomials used by O'Sullivan.
-/

public section

open Polynomial Complex

namespace RealRooted

private theorem hasDerivAt_hermiteHomogeneous_affine (x s z : ℂ) (n : ℕ) :
HasDerivAt (fun w => hermiteHomogeneous (x + 2 * s * w) s (n + 1))
((n + 1 : ℂ) * hermiteHomogeneous (x + 2 * s * z) s n * (2 * s)) z := by
have h := ((hermiteHomogeneousPoly s (n + 1)).hasDerivAt (x + 2 * s * z)).comp z
(((hasDerivAt_id z).const_mul (2 * s)).const_add x)
rw [derivative_hermiteHomogeneousPoly] at h
simpa only [Function.comp_def, hermiteHomogeneousPoly, eval_hermiteHomogeneous,
eval_mul, eval_natCast, Nat.cast_add, Nat.cast_one, eval_add, eval_one,
id_eq, mul_one] using h

/-- Iterated derivatives of a quadratic exponential are homogeneous Hermite polynomials. -/
theorem iteratedDeriv_exp_quadratic (x s : ℂ) (n : ℕ) (z : ℂ) :
iteratedDeriv n (fun w : ℂ => exp (x * w + s * w ^ 2)) z =
hermiteHomogeneous (x + 2 * s * z) s n * exp (x * z + s * z ^ 2) := by
have he (z : ℂ) : HasDerivAt (fun w : ℂ => exp (x * w + s * w ^ 2))
((x + 2 * s * z) * exp (x * z + s * z ^ 2)) z := by
convert (((hasDerivAt_id' z).const_mul x).add
((hasDerivAt_pow 2 z).const_mul s)).cexp using 1
dsimp
ring
induction n generalizing z with
| zero => simp
| succ n ih =>
rw [iteratedDeriv_succ, funext ih]
cases n with
| zero => simpa using (he z).deriv
| succ n =>
rw [((hasDerivAt_hermiteHomogeneous_affine x s z n).fun_mul (he z)).deriv,
hermiteHomogeneous_add_two]
push_cast
ring

/-- The homogeneous Hermite polynomial is the Taylor data of a quadratic exponential. -/
theorem iteratedDeriv_exp_quadratic_zero (x s : ℂ) (n : ℕ) :
iteratedDeriv n (fun w : ℂ => exp (x * w + s * w ^ 2)) 0 =
hermiteHomogeneous x s n := by
simp [iteratedDeriv_exp_quadratic]

end RealRooted
106 changes: 106 additions & 0 deletions RealRooted/Hermite/Jensen.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
module

public import RealRooted.Hermite.Homogeneous
public import RealRooted.MultiplierSequence
public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Complex.Basic
public import Mathlib.Analysis.CStarAlgebra.Classes
public import Mathlib.Analysis.Complex.Exponential
import Mathlib.Algebra.Polynomial.Reverse
import RealRooted.Hermite.GeneratingFunction
import RealRooted.Mathlib.Algebra.Polynomial.Chow
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas
import Mathlib.Analysis.Complex.CauchyIntegral

/-!
# Hermite versions of Jensen polynomials

The physicists' Hermite polynomials have generating function `exp (2 X z - z²)`.
Their binomial convolution with the Taylor data of `f` is a reversed Jensen
polynomial of `f(z) exp(-z²)`, evaluated at `2 X`.
-/

@[expose] public section

open Polynomial Complex

namespace RealRooted

/-- The physicists' Hermite normalization, `H₀ = 1` and `H₁ = 2 X`. -/
noncomputable def hermitePhysicists (d : ℕ) : ℝ[X] :=
hermiteHomogeneous (2 * X) (-1) d

/-- A Hermite polynomial with binomially weighted Taylor coefficients. -/
noncomputable def hermiteJensenPolynomial (d : ℕ) (gamma : ℕ → ℝ) : ℝ[X] :=
∑ k ∈ Finset.range (d + 1), C ((d.choose k : ℝ) * gamma k) * hermitePhysicists (d - k)

@[simp] theorem hermitePhysicists_zero : hermitePhysicists 0 = 1 := rfl

@[simp] theorem hermitePhysicists_one : hermitePhysicists 1 = 2 * X := rfl

/-- The classical three-term recurrence in the physicists' normalization. -/
theorem hermitePhysicists_add_two (d : ℕ) :
hermitePhysicists (d + 2) = 2 * X * hermitePhysicists (d + 1) -
C (2 * (d + 1 : ℝ)) * hermitePhysicists d := by
simp only [hermitePhysicists, hermiteHomogeneous_add_two, map_mul, map_ofNat,
map_add, map_natCast, map_one]
push_cast
ring

private theorem eval₂_hermitePhysicists (d : ℕ) (x : ℂ) :
(hermitePhysicists d).eval₂ ofRealHom x = hermiteHomogeneous (2 * x) (-1) d := by
change (eval₂RingHom ofRealHom x) (hermiteHomogeneous (2 * X) (-1) d) = _
rw [map_hermiteHomogeneous, map_mul, map_ofNat]
simp

private theorem eval₂_reflect_jensenPolynomial (d : ℕ) (gamma : ℕ → ℝ) (x : ℂ) :
(reflect d (jensenPolynomial d gamma)).eval₂ ofRealHom x =
∑ k ∈ Finset.range (d + 1), (d.choose k : ℂ) * (gamma k : ℂ) * x ^ (d - k) := by
simp only [jensenPolynomial, ← C_mul_X_pow_eq_monomial, reflect_finset_sum_C_mul,
reflect_monomial, eval₂_finsetSum, eval₂_mul, eval₂_C, eval₂_pow, eval₂_X,
ofRealHom_eq_coe, ofReal_mul, ofReal_natCast]
apply Finset.sum_congr rfl
intro k hk
rw [revAt_le (by simpa using hk)]

private theorem eval₂_reflect_jensenPolynomial_eq_iteratedDeriv
{f : ℂ → ℂ} {gamma : ℕ → ℝ} (hf : Differentiable ℂ f)
(hgamma : ∀ k, iteratedDeriv k f 0 = (gamma k : ℂ)) (d : ℕ) (x : ℂ) :
(reflect d (jensenPolynomial d gamma)).eval₂ ofRealHom x =
iteratedDeriv d (fun z => f z * exp (x * z)) 0 := by
rw [eval₂_reflect_jensenPolynomial, iteratedDeriv_fun_mul
(hf.contDiff.contDiffAt) (by fun_prop)]
simp only [hgamma, iteratedDeriv_cexp_const_mul, mul_zero, exp_zero, mul_one]

/-- The Hermite convolution is a reversed Jensen polynomial of the product
with a Gaussian. This identity fixes both the coefficient and Hermite normalizations. -/
theorem hermiteJensenPolynomial_eq_reflect_jensenPolynomial
{f : ℂ → ℂ} {gamma beta : ℕ → ℝ} (hf : Differentiable ℂ f)
(hgamma : ∀ k, iteratedDeriv k f 0 = (gamma k : ℂ))
(hbeta : ∀ k, iteratedDeriv k (fun z => f z * exp (-z ^ 2)) 0 = (beta k : ℂ))
(d : ℕ) :
hermiteJensenPolynomial d gamma =
(reflect d (jensenPolynomial d beta)).comp (C 2 * X) := by
apply Polynomial.funext
intro x
apply ofReal_injective
have heval (p : ℝ[X]) : ((p.eval x : ℝ) : ℂ) = p.eval₂ ofRealHom (x : ℂ) := by
exact (eval₂_at_apply ofRealHom x).symm
rw [heval, heval, eval₂_comp]
simp only [eval₂_mul, eval₂_C, eval₂_X, ofRealHom_eq_coe, ofReal_ofNat]
rw [eval₂_reflect_jensenPolynomial_eq_iteratedDeriv
(hf.mul (by fun_prop)) hbeta]
simp only [Pi.mul_def]
have heq : (fun z => (f z * exp (-z ^ 2)) * exp (2 * (x : ℂ) * z)) =
fun z => f z * exp (2 * (x : ℂ) * z + (-1) * z ^ 2) := by
funext z
rw [mul_assoc, ← exp_add]
congr 2
ring
rw [heq, iteratedDeriv_fun_mul (hf.contDiff.contDiffAt) (by fun_prop)]
simp only [hermiteJensenPolynomial, eval₂_finsetSum, eval₂_mul, eval₂_C,
ofRealHom_eq_coe, ofReal_mul, ofReal_natCast, eval₂_hermitePhysicists,
hgamma, iteratedDeriv_exp_quadratic_zero]

end RealRooted
26 changes: 26 additions & 0 deletions RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/MulPow.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/-
Copyright (c) 2026 The RealRooted contributors. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: The RealRooted contributors
-/
module

public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas

/-!
# Taylor data after multiplication by a monomial
-/

public section

/-- Multiplication by a monomial shifts Taylor coefficients at zero. -/
theorem iteratedDeriv_pow_mul_zero {𝕜 : Type*} [NontriviallyNormedField 𝕜]
{f : 𝕜 → 𝕜} {n : ℕ} (hf : ContDiffAt 𝕜 n f 0) (m : ℕ) :
iteratedDeriv n (fun z => z ^ m * f z) 0 =
(n.choose m : 𝕜) * m.factorial * iteratedDeriv (n - m) f 0 := by
rw [iteratedDeriv_fun_mul (by fun_prop) hf]
simp only [iteratedDeriv_fun_pow_zero]
by_cases hm : m ≤ n
· simp [Finset.sum_ite_eq', hm]
· simp [Finset.sum_ite_eq', hm, Nat.choose_eq_zero_of_lt (lt_of_not_ge hm)]
112 changes: 112 additions & 0 deletions RealRooted/Mathlib/Analysis/MellinTransform/LogMoments.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/-
Copyright (c) 2026 The RealRooted contributors. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: The RealRooted contributors
-/
module

import Mathlib.Analysis.MellinTransform
public import Mathlib.MeasureTheory.Measure.Haar.OfBasis
public import Mathlib.MeasureTheory.Integral.Bochner.Basic
public import Mathlib.MeasureTheory.Integral.IntegrableOn
public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import TauCeti.Analysis.MellinTransform.UpperTail
import Mathlib.Analysis.Complex.Asymptotics
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics
import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas

/-!
# Logarithmic moments of rapidly decreasing Mellin kernels

Every derivative of an upper Mellin integral is obtained by multiplying its
kernel by the corresponding power of the logarithm.
-/

public section

open Complex Set Filter MeasureTheory Asymptotics
open scoped Topology

private theorem isBigO_mul_log_pow {f : ℝ → ℂ}
(hf : ∀ r : ℝ, f =O[atTop] fun t => t ^ r) (n : ℕ) (r : ℝ) :
(fun t => f t * (Real.log t : ℂ) ^ n) =O[atTop] fun t => t ^ r := by
have hl : (fun t : ℝ => (Real.log t : ℂ) ^ n) =O[atTop] fun t => t ^ (1 : ℝ) := by
simpa only [← ofReal_pow, isBigO_ofReal_left, Real.rpow_natCast] using
(isLittleO_log_rpow_rpow_atTop (n : ℝ) (by norm_num : (0 : ℝ) < 1)).isBigO
refine ((hf (r - 1)).mul hl).congr' EventuallyEq.rfl ?_
filter_upwards [eventually_gt_atTop (0 : ℝ)] with t ht
rw [← Real.rpow_add ht]
congr 1
ring

private theorem continuousOn_mul_log_pow {f : ℝ → ℂ}
(hf : ContinuousOn f (Ici 1)) (n : ℕ) :
ContinuousOn (fun t => f t * (Real.log t : ℂ) ^ n) (Ici 1) :=
hf.mul ((continuous_ofReal.comp_continuousOn
(Real.continuousOn_log.mono (fun _ ht => ne_of_gt (zero_lt_one.trans_le ht)))).pow n)

/-- All logarithmic moments of a rapidly decreasing continuous kernel are integrable. -/
theorem integrableOn_mul_log_pow_cpow {f : ℝ → ℂ}
(hc : ContinuousOn f (Ici 1)) (hO : ∀ r : ℝ, f =O[atTop] fun t => t ^ r)
(n : ℕ) (s : ℂ) :
IntegrableOn (fun t : ℝ => f t * (Real.log t : ℂ) ^ n * (t : ℂ) ^ (s - 1))
(Ioi 1) := by
have h := TauCeti.integrableOn_mul_cpow_of_isBigO
((continuousOn_mul_log_pow hc n).locallyIntegrableOn measurableSet_Ici)
(isBigO_mul_log_pow hO n ((-s).re - 1)) (s := -s) (sub_one_lt _)
simpa only [neg_add_rev, neg_neg, sub_eq_add_neg, add_comm] using h

/-- Differentiation adds one logarithmic factor to an upper Mellin integral. -/
theorem hasDerivAt_integral_mul_log_pow_cpow {f : ℝ → ℂ}
(hc : ContinuousOn f (Ici 1)) (hO : ∀ r : ℝ, f =O[atTop] fun t => t ^ r)
(n : ℕ) (s : ℂ) :
HasDerivAt (fun z : ℂ => ∫ t in Ioi (1 : ℝ),
f t * (Real.log t : ℂ) ^ n * (t : ℂ) ^ (z - 1))
(∫ t in Ioi (1 : ℝ), f t * (Real.log t : ℂ) ^ (n + 1) * (t : ℂ) ^ (s - 1)) s := by
have h := (TauCeti.hasDerivAt_integral_mul_cpow_of_isBigO
((continuousOn_mul_log_pow hc n).locallyIntegrableOn measurableSet_Ici)
(isBigO_mul_log_pow hO n ((-s).re - 1)) (s := -s) (sub_one_lt _)).comp s
(hasDerivAt_id' s).neg
simpa only [Function.comp_def, neg_add_rev, neg_neg, neg_mul, mul_neg,
mul_one, neg_neg, sub_eq_add_neg, add_comm, pow_succ, mul_assoc] using h

/-- Iterated differentiation under a rapidly decreasing upper Mellin integral. -/
theorem iteratedDeriv_integral_mul_cpow {f : ℝ → ℂ}
(hc : ContinuousOn f (Ici 1)) (hO : ∀ r : ℝ, f =O[atTop] fun t => t ^ r)
(n : ℕ) (s : ℂ) :
iteratedDeriv n (fun z : ℂ => ∫ t in Ioi (1 : ℝ), f t * (t : ℂ) ^ (z - 1)) s =
∫ t in Ioi (1 : ℝ), f t * (Real.log t : ℂ) ^ n * (t : ℂ) ^ (s - 1) := by
induction n generalizing s with
| zero => simp
| succ n ih =>
rw [iteratedDeriv_succ, funext ih]
exact (hasDerivAt_integral_mul_log_pow_cpow hc hO n s).deriv

/-- Real logarithmic moments with arbitrary real power weights are integrable. -/
theorem integrableOn_mul_log_pow_rpow {f : ℝ → ℝ}
(hc : ContinuousOn f (Ici 1)) (hO : ∀ r : ℝ, f =O[atTop] fun t => t ^ r)
(n : ℕ) (r : ℝ) :
IntegrableOn (fun t : ℝ => f t * Real.log t ^ n * t ^ r) (Ioi 1) := by
have h := (integrableOn_mul_log_pow_cpow
(continuous_ofReal.comp_continuousOn hc)
(fun r => isBigO_ofReal_left.mpr (hO r)) n ((r : ℂ) + 1)).re
refine h.congr_fun (fun t ht => ?_) measurableSet_Ioi
simp only [Function.comp_apply, add_sub_cancel_right, ← ofReal_pow,
← ofReal_cpow (zero_lt_one.trans ht).le, ← ofReal_mul]
rfl

/-- Multiplication by logarithmic and power weights preserves vanishing at infinity
for a rapidly decreasing function. -/
theorem tendsto_mul_log_pow_rpow_zero {f : ℝ → ℝ}
(hO : ∀ r : ℝ, f =O[atTop] fun t => t ^ r) (n : ℕ) (r : ℝ) :
Tendsto (fun t : ℝ => f t * Real.log t ^ n * t ^ r) atTop (𝓝 0) := by
have hlog : (fun t => f t * Real.log t ^ n) =O[atTop] fun t => t ^ (-r - 1) := by
have h := isBigO_mul_log_pow (fun r => isBigO_ofReal_left.mpr (hO r)) n (-r - 1)
simpa only [← ofReal_pow, ← ofReal_mul, isBigO_ofReal_left] using h
have hprod := hlog.mul (isBigO_refl (fun t : ℝ => t ^ r) atTop)
have hpow : (fun t : ℝ => t ^ (-r - 1) * t ^ r) =ᶠ[atTop] fun t => t ^ (-1 : ℝ) := by
filter_upwards [eventually_gt_atTop (0 : ℝ)] with t ht
rw [← Real.rpow_add ht]
congr 1
ring
exact (hprod.congr' EventuallyEq.rfl hpow).trans_tendsto (tendsto_rpow_neg_atTop one_pos)
Loading
Loading