diff --git a/RealRooted.lean b/RealRooted.lean index d47ad32af..9a79d339c 100644 --- a/RealRooted.lean +++ b/RealRooted.lean @@ -2436,3 +2436,666 @@ 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 +public import RealRooted.MultiplierSequence.JensenProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Product +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivity +public import RealRooted.RiemannHypothesis.DifferentialOperator +public import RealRooted.RiemannHypothesis.JensenProduct +public import RealRooted.RiemannHypothesis.TotalPositivity +public import RealRooted.Laguerre.NegativeParameters +public import RealRooted.MultiplierSequence.JensenConvolution +public import RealRooted.MultiplierSequence.JensenLaguerre +public import RealRooted.MultiplierSequence.JensenLaguerreBasis +public import RealRooted.MultiplierSequence.JensenLaguerreLimit +public import RealRooted.RiemannHypothesis.Laguerre +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivityConverse +public import RealRooted.RiemannHypothesis.TotalPositivityCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIClosure +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivityZeroPrefix +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.LaguerreInequalities.DerivativeFormula +public import RealRooted.LaguerreInequalities.GeneratingPolynomial +public import RealRooted.LaguerreInequalities.RealZeros +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +public import RealRooted.RiemannHypothesis.GeneralizedLaguerre +public import RealRooted.MultiplierSequence.JensenProductExpansion +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +public import RealRooted.RiemannHypothesis.DerivativeCriteria +public import RealRooted.BasisTransform.Hermite +public import RealRooted.Hermite.FiniteTransfer +public import RealRooted.RiemannHypothesis.HermiteSimple +public import RealRooted.BrandenLC.Sequence +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogConcavity +public import RealRooted.RiemannHypothesis.LogConcavity +public import RealRooted.Hermite.Companions +public import RealRooted.Hermite.Appell +public import RealRooted.RiemannHypothesis.HermiteCompanions +public import RealRooted.RiemannHypothesis.HermiteInterlacing +public import RealRooted.Hermite.PoulainSimple +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.CompPowCoefficient +public import RealRooted.LaguerreInequalities.AuxiliaryQuartic +public import RealRooted.LaguerreInequalities.AuxiliaryCounterexample +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PolynomialFactors +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenSimple +public import RealRooted.RiemannHypothesis.JensenSimple +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Star +public import RealRooted.Mathlib.Analysis.Complex.Pick.Support +public import RealRooted.LaguerreInequalities.LogDerivative +public import RealRooted.LaguerreInequalities.Nevanlinna +public import RealRooted.LaguerreInequalities.MeasureSupport +public import RealRooted.Mathlib.Analysis.Complex.Pick.Atoms +public import RealRooted.LaguerreInequalities.Turan +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Turan +public import RealRooted.RiemannHypothesis.Turan +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeICriterion +public import RealRooted.LaguerreInequalities.AtomMultiplicity +public import RealRooted.LaguerreInequalities.AtomicRepresentation +public import RealRooted.LaguerreInequalities.InverseSquare +public import RealRooted.Mathlib.Analysis.Analytic.CountableZeros +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Residue +public import RealRooted.Mathlib.Analysis.Normed.Field.WeightedInverse +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.Countable +public import RealRooted.Hermite.PoulainJensenSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteZeros +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RootDivision +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.StrictOperator +public import RealRooted.SimpleRoots.Reflection +public import RealRooted.Hermite.GaussianOperator +public import RealRooted.Hermite.PolynomialGaussian +public import RealRooted.LaguerreInequalities.CanonicalLogDerivative +public import RealRooted.LaguerreInequalities.CanonicalProduct +public import RealRooted.LaguerreInequalities.CanonicalRepresentation +public import RealRooted.LaguerreInequalities.Characterization +public import RealRooted.LaguerreInequalities.Translation +public import RealRooted.LaguerreInequalities.ZeroFree +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Identity +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AppellMoments +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FiniteGaussian +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FiniteZeros +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorLinear +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Strictness +public import RealRooted.RiemannHypothesis.IntegerSamples +public import RealRooted.RiemannHypothesis.Moments +public import RealRooted.Hermite.ExponentialJensenFactor +public import RealRooted.Hermite.ExponentialJensenMultiplicity +public import RealRooted.Hermite.PoulainExponential +public import RealRooted.LaguerreInequalities.Strict +public import RealRooted.Mathlib.Analysis.Analytic.TaylorSeries +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOne +public import RealRooted.Mathlib.Analysis.Complex.ForwardDifference +public import RealRooted.Mathlib.Topology.Algebra.IsUniformGroup.FiniteSum +public import RealRooted.MultiplierSequence.JensenPositiveInterlacing +public import RealRooted.MultiplierSequence.JensenSeparation +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DerivativeMultiplicity +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialApply +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialMultiplicity +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.ForwardDifference +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusOne +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusOneProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenSignBoundary +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMoments +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIFactorization +public import RealRooted.RiemannHypothesis.ForwardDifference +public import RealRooted.RiemannHypothesis.JensenInterlacing +public import RealRooted.MultiplierSequence.JensenLimit +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CoefficientLimit +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FormalJensen +public import RealRooted.EulerOperator.RootCounting +public import RealRooted.Mathlib.Algebra.Polynomial.Expand.PositiveRoots +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialRange +public import RealRooted.Mathlib.Analysis.Calculus.LocalExtr.PolynomialEuler +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Subquadratic +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Bounds +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Derivative +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Nonzero +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.TimeDerivative +public import RealRooted.Mathlib.Analysis.Complex.LinearProduct +public import RealRooted.Mathlib.Analysis.SpecificLimits.DescFactorialWeights +public import RealRooted.Mathlib.Analysis.SpecificLimits.WeightedSum +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.PowerSum +public import RealRooted.MultiplierSequence.JensenDifferential +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlowStrict +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialCoefficients +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IteratedDerivative +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PowerSumMoments +public import RealRooted.RiemannHypothesis.MomentMeasure +public import RealRooted.EulerOperator.ArithmeticSections +public import RealRooted.Mathlib.Algebra.Polynomial.Expand.Contract +public import RealRooted.Hermite.GaussianCoefficients +public import RealRooted.Hermite.GaussianHeatOperator +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Star +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperator +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperatorSimple +public import RealRooted.RiemannHypothesis.HeatOperator +public import RealRooted.EulerOperator.ArithmeticNormalization +public import RealRooted.EulerOperator.ArithmeticProduct +public import RealRooted.LaguerreInequalities.LocalNonzeroLimit +public import RealRooted.LaguerreInequalities.LocalProductLimit +public import RealRooted.LaguerreInequalities.LocalZeroLimit +public import RealRooted.LaguerreInequalities.ModulusBound +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Composition +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.TimeLimit +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Bounds +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Derivative +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Star +public import RealRooted.Mathlib.Analysis.Complex.LineIdentity +public import RealRooted.Mathlib.Analysis.Complex.LocallyUniformIteratedDeriv +public import RealRooted.Mathlib.Analysis.Complex.Polynomial.CoefficientMajorant +public import RealRooted.Mathlib.Data.Nat.Factorial.ArithmeticProduct +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentDeterminacy +public import RealRooted.Mathlib.Topology.UniformSpace.LocallyUniformAvoidance +public import RealRooted.MultiplierSequence.Arithmetic +public import RealRooted.MultiplierSequence.ArithmeticSection +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperatorCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferential +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LocalLimit +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasureUnique +public import RealRooted.RiemannHypothesis.Arithmetic +public import RealRooted.RiemannHypothesis.HeatOperatorCriterion +public import RealRooted.RiemannHypothesis.InfiniteDifferential +public import RealRooted.RiemannHypothesis.MomentMeasureUnique +public import RealRooted.BorceaBranden.Transcendental.RealCoefficientBounds +public import RealRooted.LaguerreInequalities.LocalDerivativeBounds +public import RealRooted.LaguerreInequalities.LogConcavity +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.CauchyBound +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.ExponentialPowerBound +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.OfBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderConvergence +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderDerivative +public import RealRooted.Mathlib.Analysis.Convex.LogDerivative +public import RealRooted.Mathlib.Analysis.Normed.Group.LocallyBoundedMajorant +public import RealRooted.Mathlib.MeasureTheory.Integral.Hankel +public import RealRooted.Mathlib.RingTheory.Polynomial.Pochhammer.ReciprocalConvolution +public import RealRooted.MultiplierSequence.BinomialConvolution +public import RealRooted.MultiplierSequence.FactorialRatio +public import RealRooted.MultiplierSequence.GammaConvolution +public import RealRooted.MultiplierSequence.PochhammerConvolution +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GrowthOrder +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialEntire +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialLocal +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialOrder +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PointwiseLimit +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.UniformDerivativeBounds +public import RealRooted.RiemannHypothesis.EntireDifferential +public import RealRooted.RiemannHypothesis.LocalDifferentialSeries +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.PolynomialFactor +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Constant +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GrowthOrder +public import RealRooted.Mathlib.Analysis.Complex.TaylorGrowth +public import RealRooted.Mathlib.Analysis.SpecificLimits.PowerSequence +public import RealRooted.MultiplierSequence.GammaSampling +public import RealRooted.MultiplierSequence.Geometric +public import RealRooted.MultiplierSequence.PolyaSchur.GeometricGrowth +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteZerosOrder +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeStrict +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIGrowth +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIInfiniteDifferential +public import RealRooted.RiemannHypothesis.StrictMoments +public import RealRooted.RiemannHypothesis.TypeIInfiniteDifferential +public import RealRooted.Mathlib.NumberTheory.Chebyshev.Riesz +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Bounds +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.LocalLogDeriv +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroCount +public import RealRooted.Mathlib.NumberTheory.LSeries.Riesz +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroWindow +public import RealRooted.Mathlib.Topology.Instances.Real.FiniteSeparation +public import RealRooted.Mathlib.Analysis.Complex.PartialFractions +public import RealRooted.Mathlib.Analysis.MellinInversion.Decay +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.GoodHeight +public import RealRooted.Mathlib.Analysis.Contour.Residue.LogDeriv +public import RealRooted.Mathlib.Analysis.Contour.Residue.Rectangle +public import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifference +public import RealRooted.Mathlib.Analysis.MellinInversion.HorizontalDecay +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Log.Weights +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Contour +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.HorizontalDecay +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Order +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Residues +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroKernel +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSum +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberMajorant +public import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifferenceIntegral +public import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifferenceInterpolation +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Log.BandBounds +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Pow.Interpolation +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.MonotoneBounds +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.PrimitiveBounds +public import RealRooted.Mathlib.NumberTheory.Chebyshev.Unsmoothing +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.LogGrowth +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ResidualDifference +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RieszContour +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RieszExplicitFormula +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroDifference +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroDifferenceSqrt +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSumBounds +public import RealRooted.Mathlib.NumberTheory.Chebyshev.RiemannHypothesis +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ErrorDifference +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Perturbation +public import RealRooted.Mathlib.Analysis.Asymptotics.IncrementBounds +public import RealRooted.Mathlib.Analysis.Polynomial.OrderedRootPerturbation +public import RealRooted.Mathlib.Analysis.Polynomial.SimpleRootMatching +public import RealRooted.Mathlib.Analysis.Polynomial.SimpleRootSeparation +public import RealRooted.Mathlib.LinearAlgebra.Matrix.LinearSystemPerturbation +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeMoments +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindow +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowMoments +public import RealRooted.Mathlib.NumberTheory.Chebyshev.ShortIntervals +public import RealRooted.Jacobi.MomentPolynomial +public import RealRooted.Mathlib.Algebra.Polynomial.Moment.FiniteAtoms +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.ContinuousTests +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowContinuous +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowOrthogonal +public import RealRooted.RiemannHypothesis.PrimeWindowJacobi +public import RealRooted.RiemannHypothesis.PrimeWindowPolynomial +public import RealRooted.RiemannHypothesis.PrimeWindowRoots +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.GaussianQuadrature +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadratureMoments +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadraturePerturbation +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PerturbationLimits +public import RealRooted.Jacobi.GaussianQuadrature +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Gaussian +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowQuadrature +public import RealRooted.RiemannHypothesis.PrimeWindowQuadrature +public import RealRooted.Interlacing.RootPerturbation +public import RealRooted.Interlacing.SimplePencil +public import RealRooted.Jacobi.MomentStability +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal +public import RealRooted.RiemannHypothesis.PrimeWindowInterlacing +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomial +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Gamma.BetaVariation +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeBeta +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeDerivative +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeIntegral +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiBounds +public import RealRooted.Jacobi.RootRates +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.CoefficientRates +public import RealRooted.Mathlib.Analysis.Polynomial.OrderedRootRates +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomialBounds +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiRoots +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.GaussianLimits +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedQuadrature +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiQuadrature +public import RealRooted.Mathlib.MeasureTheory.Measure.AnalyticMomentSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.CompactMomentTransform +public import RealRooted.Mathlib.MeasureTheory.Measure.LocalMomentTransform +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.MomentContinuation +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.SlitPlaneContinuation +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.ZeroFree +public import RealRooted.Mathlib.MeasureTheory.Measure.FiniteMomentStieltjes +public import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeMomentTransform +public import RealRooted.RiemannHypothesis.MomentCriterion +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.NormalizedConjugation +public import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.CountableSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentNevanlinna +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentNevanlinnaRepresentation +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AtomicMomentSum +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentResidues +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIIndexedProduct +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicity +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentTypeI +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeILinearProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIMomentCriterion +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.EulerRodrigues +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalDerivatives +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalMixtures +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalSeriesDerivatives +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventHierarchy +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventRodrigues +public import RealRooted.Mathlib.Analysis.Complex.LinearProductLogDerivative +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeCompletelyMonotone +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHierarchy +public import RealRooted.RiemannHypothesis.LogDerivativeCompletelyMonotone +public import RealRooted.RiemannHypothesis.LogDerivativeHierarchy +public import RealRooted.Mathlib.MeasureTheory.Measure.AtomicRange +public import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeAtomicMap +public import RealRooted.Mathlib.MeasureTheory.Measure.SortedAtomicMeasure +public import RealRooted.Mathlib.MeasureTheory.Measure.SortedAtomicSequence +public import RealRooted.Mathlib.Order.Monotone.PositiveExtension +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicityProduct +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.SortedEnumeration +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SortedMomentAtoms +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SortedMomentCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SortedProduct +public import RealRooted.MultiplierSequence.JensenBessel +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Bessel +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.QuarticInequality +public import RealRooted.Mathlib.Analysis.Complex.IteratedRealDeriv +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSum +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumLaplace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroHeatTrace +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHeatTrace +public import RealRooted.RiemannHypothesis.HeatTrace +public import RealRooted.Mathlib.Analysis.Complex.LinearProductLowerBound +public import RealRooted.Mathlib.Analysis.Complex.SubexponentialLowerBound +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativePureHeatTrace +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIPureProduct +public import RealRooted.RiemannHypothesis.PureHeatTrace +public import RealRooted.Mathlib.Analysis.Complex.LinearProductDivisor +public import RealRooted.Mathlib.Analysis.Complex.LinearProductInverseMoments +public import RealRooted.Mathlib.Analysis.Complex.PositiveSlopeRoots +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberCardinality +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeHeatTrace +public import RealRooted.RiemannHypothesis.NativeHeatTrace +public import RealRooted.Mathlib.Analysis.Complex.AbsoluteZeroHeatTrace +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Zero.Nonempty +public import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralIndex +public import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralNonempty +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.AbsoluteHeatTrace +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.AbsoluteHeatTracePositive +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ReciprocalHierarchy +public import RealRooted.Mathlib.Analysis.Complex.LogDerivPowMul +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTraceOrigin +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.LaplaceConstant +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginHeatTrace +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginLogDerivativeHierarchy +public import RealRooted.Mathlib.Analysis.Complex.OriginFactor +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeILogDerivativeOrigin +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIOriginFactor +public import RealRooted.Mathlib.Analysis.Complex.RealLogDeriv +public import RealRooted.Mathlib.Analysis.Complex.RealSeries +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RealLogHierarchy +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignLogDerivativeHierarchy +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignSeriesLogHierarchy +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignTypeI +public import RealRooted.RiemannHypothesis.RealLogHierarchy +public import RealRooted.Mathlib.Analysis.Complex.ZeroWeightedHeatTrace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.LaguerreHeatLaplace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeWeightedHeat +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.WeightedHeatLaplace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.WeightedMixtureLaplace +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.LaplaceKernel +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Rodrigues +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeWeightedHeatHierarchy +public import RealRooted.RiemannHypothesis.NativeWeightedHeatHierarchy +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTraceScale +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignNativeWeightedHeat +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignSeriesNativeWeightedHeat +public import RealRooted.Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric.Derivatives +public import RealRooted.MultiplierSequence.JensenBesselObstruction +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselClassification +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselInteger +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselTaylor +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +public import RealRooted.LaguerreInequalities.PowerGenerating +public import RealRooted.Mathlib.Algebra.Polynomial.PowerRootsProduct +public import RealRooted.Mathlib.Topology.MetricSpace.Algebra.FiniteProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryPowers +public import RealRooted.RiemannHypothesis.AuxiliaryPowers +public import RealRooted.LaguerreInequalities.AuxiliaryGenerating +public import RealRooted.LaguerreInequalities.AuxiliaryRealZeros +public import RealRooted.LaguerreInequalities.AuxiliarySymmetry +public import RealRooted.LaguerreInequalities.AuxiliaryZeroFactors +public import RealRooted.Mathlib.Algebra.Polynomial.EvenCoefficients +public import RealRooted.Mathlib.Algebra.Polynomial.MobiusTransform.Map +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PartialContinuity +public import RealRooted.Mathlib.Analysis.Complex.RealIdentity +public import RealRooted.Mathlib.Analysis.Complex.TranslateProductContinuity +public import RealRooted.Mathlib.Analysis.Complex.TranslateProductNonzero +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryInequality +public import RealRooted.RiemannHypothesis.AuxiliaryCriterion +public import RealRooted.Mathlib.Analysis.Complex.CompactJets +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialComposition +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolAlgebra +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CompactDifferentialSimple +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.ExponentialCoefficients +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GenusZeroTail +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialCommute +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SmallTypeBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SmallTypeLimit +public import RealRooted.Mathlib.Analysis.Complex.SimpleLimit +public import RealRooted.Mathlib.Algebra.Polynomial.LinearProductDegree +public import RealRooted.Mathlib.Analysis.Complex.LinearProductPrefix +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialTailSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroDifferentialSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LinearProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIDifferentialSimple +public import RealRooted.RiemannHypothesis.XiDifferentialSimple +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianConvergence +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianDerivative +public import RealRooted.Mathlib.Analysis.SpecialFunctions.FactorialExponential +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialGaussian +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialSummable +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianImageGrowth +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSymbolLimit +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianUniformBound +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GaussianProductBound +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.MinimalType +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalDifferential +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialGaussianType +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianJets +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianPolynomialBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianPolynomialComposition +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSpatialDerivative +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSymbolAlgebra +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolSummable +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianApproxComposition +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GenusZeroComposition +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialSymbol +public import RealRooted.Mathlib.Analysis.Complex.LinearPrefixGaussian +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroFactorSimple +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.CanonicalSupport +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOneSplit +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianMargin +public import RealRooted.Mathlib.Analysis.Complex.LinearProductNonpolynomial +public import RealRooted.Mathlib.Analysis.Normed.Group.SparseSubfamily +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalDifferentialSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalMultiplicitySimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalSparseFactor +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Contraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Convergents +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Step +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Uniqueness +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GaussianCoefficient +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.ImaginaryAxisBound +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalRepresentation +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GaussianBoundSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginFactor +public import RealRooted.Mathlib.Analysis.Matrix.CoordinateSpectralMeasure +public import RealRooted.Mathlib.MeasureTheory.Measure.FirstMomentTight +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentLimit +public import RealRooted.Mathlib.MeasureTheory.Measure.WeakMomentLimits +public import RealRooted.Mathlib.LinearAlgebra.Matrix.BidiagonalGram +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.FinSchur +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Reindex +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Resolvent +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Schur +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.StieltjesConvergence +public import RealRooted.Mathlib.LinearAlgebra.Matrix.StieltjesGram +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.TailOffset +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffel +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffelLocal +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentHankelFactorization +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentRecurrence +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentShift +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerGauss +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeries +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesLocal +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesRecurrence +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerPaired +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.StrictMoment +public import RealRooted.RiemannHypothesis.StieltjesFraction +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.FiniteAtomicNorms +public import RealRooted.Mathlib.MeasureTheory.Integral.HankelSupport +public import RealRooted.Mathlib.MeasureTheory.Integral.PolynomialMoment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerTermination +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.InfiniteMoment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteAtomicFraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteMeasureFraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteMoment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.MomentCriterion +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentDeterminantRatios +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.StieltjesFraction +public import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslation +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentParity +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentTranslation +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentParity +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentTranslation +public import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslationSucc +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Translation +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActivePrefix +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform.Inverse +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActiveSupportCriterion +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportConstruction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportCriterion +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.AdmissibleParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.BoundedParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.InitialParameterCriterion +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.TerminatingBoundary +public import RealRooted.Mathlib.MeasureTheory.Measure.AeratedMoments +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtMoments +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSymmetrization +public import RealRooted.Mathlib.MeasureTheory.Measure.AeratedSeries +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.ActiveCoefficients +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Aeration +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Coefficients +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CatalanBound +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.MeasureBound +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.TranslatedAeration +public import RealRooted.Mathlib.MeasureTheory.Measure.ChainMomentSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeMoments +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtTranslation +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainAeration +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentsChain +public import RealRooted.Mathlib.MeasureTheory.Measure.BoundedChainSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.ExactMomentSupport +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainCoefficientBound +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentCriterion +public import RealRooted.RiemannHypothesis.CompactStieltjesFraction +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Const +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CompactStieltjesFraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Complementary +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ComplementaryChain +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ComplementaryCoefficients +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.SquareDescent +public import RealRooted.Mathlib.Analysis.Complex.ImaginarySquareDescent +public import RealRooted.Mathlib.Analysis.Complex.LinearProductFinite +public import RealRooted.Mathlib.MeasureTheory.Measure.AtomicGap +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LinearProductMomentMeasure +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentGapCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentGapPolynomial +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentMassNearZero +public import RealRooted.PFPolynomial.FiniteProduct +public import RealRooted.PFPolynomial.LogMomentGap +public import RealRooted.RiemannHypothesis.LogMomentGap +public import RealRooted.Hermite.FormalDifferential.Basic +public import RealRooted.Hermite.FormalDifferential.Composition +public import RealRooted.Hermite.FormalDifferential.QuadraticObstruction +public import RealRooted.Hermite.FormalDifferential.Taylor +public import RealRooted.Mathlib.RingTheory.PowerSeries.LowDegree +public import RealRooted.Mathlib.Algebra.Polynomial.TaylorEvaluation +public import RealRooted.Mathlib.Analysis.Analytic.TaylorInverse +public import RealRooted.Mathlib.MeasureTheory.Integral.PolynomialTranslation +public import RealRooted.Mathlib.Probability.Moments.MGFTaylor +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MGFPolynomialOperator +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.ReciprocalPolynomialOperator +public import RealRooted.Hermite.FormalDifferential.CenteredLimit +public import RealRooted.Hermite.FormalDifferential.OperatorLimits +public import RealRooted.Mathlib.Analysis.SpecialFunctions.ChooseRpow +public import RealRooted.Mathlib.RingTheory.PowerSeries.PowerCoefficient +public import RealRooted.Mathlib.RingTheory.PowerSeries.RescaledPowerLimit +public import RealRooted.Hermite.FormalDifferential.Covariance +public import RealRooted.Hermite.FormalDifferential.Exponential +public import RealRooted.Hermite.FormalDifferential.NegativeVariance +public import RealRooted.Hermite.FormalDifferential.PolynomialCriterion +public import RealRooted.Hermite.FormalDifferential.QuadraticLimit +public import RealRooted.Hermite.FormalDifferential.Structure +public import RealRooted.Hermite.FormalDifferential.Translation +public import RealRooted.Mathlib.RingTheory.PowerSeries.Centering +public import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient +public import RealRooted.SimpleRoots.Affine +public import RealRooted.Hermite.FormalDifferential.LocallyUniformIterates +public import RealRooted.Hermite.FormalDifferential.RescaledIterates +public import RealRooted.Hermite.FormalDifferential.RootClustering +public import RealRooted.Mathlib.Analysis.Polynomial.LocallyUniformLimit +public import RealRooted.Mathlib.Analysis.Polynomial.RootMatchingLimit +public import RealRooted.Mathlib.RingTheory.PowerSeries.ExponentialJet +public import RealRooted.Hermite.FormalDifferential.Derivative +public import RealRooted.Hermite.FormalDifferential.ExponentialMonomial +public import RealRooted.Hermite.FormalDifferential.NonnegativeVariance +public import RealRooted.Hermite.FormalDifferential.NonrealExponential +public import RealRooted.Hermite.FormalDifferential.NonrealIterates +public import RealRooted.Mathlib.Analysis.Polynomial.NonrealPersistence +public import RealRooted.Mathlib.RingTheory.PowerSeries.FirstDiscrepancy +public import RealRooted.RiemannHypothesis.PolynomialIteration +public import RealRooted.RiemannHypothesis.StrictCoefficient +public import RealRooted.SimpleRoots.QuadraticDiscriminant +public import RealRooted.MittagLeffler.Basic +public import RealRooted.MittagLeffler.Growth +public import RealRooted.MittagLeffler.Jensen +public import RealRooted.MultiplierSequence.Veronese +public import RealRooted.RiemannHypothesis.Veronese +public import RealRooted.Hermite.Generalized.Basic +public import RealRooted.Hermite.Generalized.JensenIdentity +public import RealRooted.Hermite.Generalized.Monic +public import RealRooted.Hermite.Generalized.PositiveFactor +public import RealRooted.Hermite.Generalized.Product +public import RealRooted.Hermite.Generalized.Roots +public import RealRooted.Mathlib.Algebra.Polynomial.Expand.PowerRoots +public import RealRooted.Hermite.FormalDifferential.ExpandOperator +public import RealRooted.Hermite.Generalized.ComplexScaling +public import RealRooted.Hermite.Generalized.DifferentialIdentity +public import RealRooted.Hermite.Generalized.ExponentialRoots +public import RealRooted.Hermite.Generalized.Separability +public import RealRooted.Mathlib.Analysis.Polynomial.SeparableLimit +public import RealRooted.Hermite.FormalDifferential.SeparableIteration +public import RealRooted.Hermite.Generalized.Degree +public import RealRooted.Hermite.FormalDifferential.SeparableNormalization +public import RealRooted.Mathlib.RingTheory.Polynomial.ScaleRoots.Separable +public import RealRooted.Hermite.FormalDifferential.SeparableResidues +public import RealRooted.Mathlib.Analysis.Convex.LogSqrtSlope +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.EvenMoments +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.LogConcaveMoments +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.StrictWeightedCovariance +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.WeightedCovariance +public import RealRooted.Mathlib.MeasureTheory.Integral.IntegralEqImproper.Power +public import RealRooted.Mathlib.Analysis.Polynomial.GaussianMajorant +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianTail +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Gaussian.ParameterDerivative +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierMajorant +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierPolynomial +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierSeries +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierSummand +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.ThetaSecondDerivative diff --git a/RealRooted/BasisTransform/Hermite.lean b/RealRooted/BasisTransform/Hermite.lean new file mode 100644 index 000000000..84b99b5ea --- /dev/null +++ b/RealRooted/BasisTransform/Hermite.lean @@ -0,0 +1,106 @@ +module + +public import RealRooted.SimpleRoots +public import RealRooted.Mathlib.Algebra.Polynomial.BasisTransform +import RealRooted.MaWang.StrictStep +import RealRooted.Mathlib.Algebra.Polynomial.Derivative + +/-! +# Simple roots under Hermite basis transforms + +A basis whose raising operator is an affine multiplier minus a positive +constant times differentiation sends every nonzero real-rooted polynomial to +a polynomial with simple real roots. Repeated roots of the input are allowed. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- A negative constant derivative coefficient makes each affine factor step strict. -/ +private theorem affine_derivative_step {f : ℝ[X]} {a b c : ℝ} + (ha : 0 < a) (hc : 0 < c) (hf : IsSimpleRealRooted f) + (hpos : HasPosLeadingCoeff f) : + IsSimpleRealRooted ((C a * X + C b) * f + C (-c) * f.derivative) ∧ + HasPosLeadingCoeff ((C a * X + C b) * f + C (-c) * f.derivative) := by + let F := (C a * X + C b) * f + C (-c) * f.derivative + have htop : a * f.leadingCoeff ≠ 0 := ne_of_gt (mul_pos ha hpos) + have hdeg := natDegree_and_leadingCoeff_quadratic_derivative_add_linear_mul_add + f (C (-c) * f.derivative) 0 0 b a + ((natDegree_C_mul_le _ _).trans ((natDegree_derivative_le f).trans (Nat.sub_le _ _))) + (by simpa using htop) + have hdegree : F.natDegree = f.natDegree + 1 := by + simpa [F, add_comm] using hdeg.1 + have hFpos : HasPosLeadingCoeff F := by + have hlead : F.leadingCoeff = a * f.leadingCoeff := by + simpa [F, add_comm] using hdeg.2 + change 0 < F.leadingCoeff + rw [hlead] + exact mul_pos ha hpos + refine ⟨?_, hFpos⟩ + by_cases hzero : f.natDegree = 0 + · have hsmall : F.natDegree ≤ 1 := by lia + have hFne : F ≠ 0 := leadingCoeff_ne_zero.mp (ne_of_gt hFpos) + exact ⟨hFne, Splits.of_natDegree_le_one hsmall, + hasSimpleRoots_of_natDegree_le_one hFne hsmall⟩ + · have hstep := MaWang.strictInterl_and_hasSimpleRoots_of_eval_neg + hf.2.1 hpos hFpos hzero hdegree hf.2.2 (show F = _ by rfl) + (fun r _ => by simpa using neg_neg_of_pos hc) + exact ⟨hstep.2.ne_zero, hstep.1.2.1.2, hstep.2⟩ + +/-- Induction over the real linear factors preserves positive leading coefficient. -/ +private theorem basisTransform_prod_simple {B : ℕ → ℝ[X]} {a b c : ℝ} + (hzero : B 0 = 1) (ha : 0 < a) (hc : 0 < c) + (hrec : ∀ n, B (n + 1) = (C a * X + C b) * B n + C (-c) * (B n).derivative) + (s : Multiset ℝ) : + IsSimpleRealRooted (basisTransform B (s.map (fun r => X - C r)).prod) ∧ + HasPosLeadingCoeff (basisTransform B (s.map (fun r => X - C r)).prod) := by + induction s using Multiset.induction_on with + | empty => + simp only [Multiset.map_zero, Multiset.prod_zero] + have heq : basisTransform B 1 = 1 := by + simpa [hzero] using basisTransform_C B 1 + rw [heq] + exact ⟨⟨one_ne_zero, Splits.one, + hasSimpleRoots_of_natDegree_le_one one_ne_zero (by simp)⟩, by simp [HasPosLeadingCoeff]⟩ + | @cons r s ih => + simp only [Multiset.map_cons, Multiset.prod_cons] + have heq := basisTransform_mul_X_add_C_of_succ_derivative B + (C a * X + C b) (C (-c)) hrec (-r) (s.map (fun r => X - C r)).prod + rw [map_neg, ← sub_eq_add_neg] at heq + rw [heq] + have hlinear : C a * X + C b + -C r = C a * X + C (b - r) := by + simp [sub_eq_add_neg, add_assoc] + rw [hlinear] + exact affine_derivative_step ha hc ih.1 ih.2 + +/-- A positive affine raising operator with a negative derivative term makes +the roots of every nonzero split input simple. -/ +theorem isSimpleRealRooted_basisTransform_of_raising + {B : ℕ → ℝ[X]} {a b c : ℝ} (hzero : B 0 = 1) (ha : 0 < a) (hc : 0 < c) + (hrec : ∀ n, B (n + 1) = (C a * X + C b) * B n + C (-c) * (B n).derivative) + {p : ℝ[X]} (hp : p.Splits) (hp0 : p ≠ 0) : + IsSimpleRealRooted (basisTransform B p) := by + have hprod := (basisTransform_prod_simple hzero ha hc hrec p.roots).1 + have hlc : p.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.mpr hp0 + have heq : basisTransform B p = + C p.leadingCoeff * basisTransform B (p.roots.map (fun r => X - C r)).prod := by + conv_lhs => rw [hp.eq_prod_roots] + exact linearMap_C_mul (basisTransformₗ B) _ _ + rw [heq] + exact ⟨mul_ne_zero (C_ne_zero.mpr hlc) hprod.1, hprod.2.1.C_mul _, + hprod.2.2.C_mul hlc⟩ + +/-- The same raising operator preserves splitting, including the zero input. -/ +theorem splits_basisTransform_of_raising + {B : ℕ → ℝ[X]} {a b c : ℝ} (hzero : B 0 = 1) (ha : 0 < a) (hc : 0 < c) + (hrec : ∀ n, B (n + 1) = (C a * X + C b) * B n + C (-c) * (B n).derivative) + {p : ℝ[X]} (hp : p.Splits) : + (basisTransform B p).Splits := by + by_cases hp0 : p = 0 + · simp [hp0] + · exact (isSimpleRealRooted_basisTransform_of_raising hzero ha hc hrec hp hp0).2.1 + +end RealRooted diff --git a/RealRooted/BorceaBranden/Transcendental/JensenMultiplier.lean b/RealRooted/BorceaBranden/Transcendental/JensenMultiplier.lean index e8e3c91fa..4c83b1d62 100644 --- a/RealRooted/BorceaBranden/Transcendental/JensenMultiplier.lean +++ b/RealRooted/BorceaBranden/Transcendental/JensenMultiplier.lean @@ -2,6 +2,7 @@ module public import RealRooted.Mathlib.Analysis.Complex.Polynomial.SzaszMultivariate import RealRooted.BorceaBranden.Applications.CoordinatePFMultiplier +import RealRooted.MultiplierSequence.Geometric public import RealRooted.MultivariateStability /-! @@ -23,20 +24,6 @@ noncomputable section open Polynomial -private theorem isPFMultiplierSequence_pow {c : ℝ} (hc : 0 < c) : - IsPFMultiplierSequence (fun k => c ^ k) := by - rw [isPFMultiplierSequence_iff_preserves] - intro p hp - have hscaled := hp.comp_C_mul_X_add_C hc le_rfl - have heq : diagonalOperator (fun k => c ^ k) p = - p.comp (C c * X + C 0) := by - ext k - rw [coeff_diagonalOperator] - simp only [C_0, add_zero, Polynomial.comp_C_mul_X_coeff] - ring - rw [heq] - exact hscaled - private theorem isPFMultiplierSequence_normalizedDescFactorial (n : ℕ) : IsPFMultiplierSequence (fun k => (n.descFactorial k : ℝ) / (n : ℝ) ^ k) := by diff --git a/RealRooted/BorceaBranden/Transcendental/RealCoefficientBounds.lean b/RealRooted/BorceaBranden/Transcendental/RealCoefficientBounds.lean new file mode 100644 index 000000000..905017041 --- /dev/null +++ b/RealRooted/BorceaBranden/Transcendental/RealCoefficientBounds.lean @@ -0,0 +1,79 @@ +module + +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Algebra.Polynomial.Splits +import RealRooted.BorceaBranden.Transcendental.JensenMultiplier +import RealRooted.HermiteBiehler.Basic + +/-! +# Uniform bounds from the first real polynomial coefficients + +The multivariate Szász estimate gives a uniform Gaussian majorant for +normalized real-rooted univariate polynomials when their linear and quadratic +coefficients are bounded. The degree is unrestricted. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- A uniform bound on the first two nonconstant coefficients of normalized +real-rooted polynomials gives a degree-independent Gaussian bound. -/ +theorem exists_norm_eval_le_exp_of_coeff_bounds {K : ℝ} (hK : 0 ≤ K) : + ∃ B > 0, ∃ C ≥ 0, ∀ p : ℝ[X], p.Splits → p.coeff 0 = 1 → + ‖p.coeff 1‖ ≤ K → ‖p.coeff 2‖ ≤ K → ∀ z : ℂ, + ‖(p.map ofRealHom).eval z‖ ≤ B * Real.exp (C * ‖z‖ ^ 2) := by + let B := 2 * (Real.sqrt (2 * Real.exp 1 ^ 2 - Real.exp 1) / (Real.exp 1 - 1)) + let C := 6 * Real.exp 1 ^ 2 * K ^ 2 + 4 * Real.exp 1 ^ 2 * K + have he : 1 < Real.exp 1 := by linarith [Real.add_one_le_exp (1 : ℝ)] + have hB : 0 < B := by + dsimp [B] + apply mul_pos (by norm_num) + apply div_pos (Real.sqrt_pos.mpr _) (by linarith) + nlinarith + refine ⟨B, hB, C, by dsimp [C]; positivity, ?_⟩ + intro p hp hp0 hp1 hp2 z + let f : MvPolynomial Unit ℂ := (MvPolynomial.uniqueAlgEquiv ℂ Unit).symm (p.map ofRealHom) + have hf0 : f.coeff 0 = 1 := by + dsimp only [f] + rw [MvPolynomial.coeff_uniqueAlgEquiv_symm] + simp [hp0] + have hpne : p ≠ 0 := by intro h; simp [h] at hp0 + have hstable : MvUpperHalfPlaneStable f := by + intro w hw + change MvPolynomial.eval₂ (RingHom.id ℂ) w f ≠ 0 + rw [show f = (MvPolynomial.uniqueAlgEquiv ℂ Unit).symm (p.map ofRealHom) from rfl, + MvPolynomial.eval₂_uniqueAlgEquiv_symm] + exact isUpperHalfPlaneStable_complexify_of_splits hp hpne (w ()) (hw ()) + have hJ (β : Unit →₀ ℕ) : MvUpperHalfPlaneStable (MvPolynomial.jensenOp β f) := + (BorceaBranden.jensenOp_stableOrZero β hstable).resolve_left (fun h => by + have hc := congrArg (fun q => q.coeff 0) h + simp [MvPolynomial.coeff_jensenOp, MvPolynomial.jensen, hf0] at hc) + have h1 : ‖f.coeff (Finsupp.single () 1)‖ ≤ K := by + dsimp only [f] + rw [MvPolynomial.coeff_uniqueAlgEquiv_symm] + simpa using hp1 + have h2 : ‖f.coeff (Finsupp.single () 1 + Finsupp.single () 1)‖ ≤ K := by + dsimp only [f] + rw [MvPolynomial.coeff_uniqueAlgEquiv_symm] + simpa using hp2 + have hC : MvPolynomial.szaszC f ≤ C := by + simp only [MvPolynomial.szaszC, Finset.univ_unique, Finset.sum_singleton] + dsimp [C] + gcongr + have hs := MvPolynomial.norm_eval_le_of_forall_jensenOp_stable f hf0 hJ + (norm_nonneg z) (fun _ : Unit => z) (fun _ => le_rfl) + have heval : MvPolynomial.eval (fun _ : Unit => z) f = (p.map ofRealHom).eval z := by + change MvPolynomial.eval₂ (RingHom.id ℂ) (fun _ : Unit => z) f = _ + rw [show f = (MvPolynomial.uniqueAlgEquiv ℂ Unit).symm (p.map ofRealHom) from rfl, + MvPolynomial.eval₂_uniqueAlgEquiv_symm] + rfl + rw [heval] at hs + have hs' : ‖(p.map ofRealHom).eval z‖ ≤ B * Real.exp (MvPolynomial.szaszC f * ‖z‖ ^ 2) := by + simpa [B] using hs + exact hs'.trans (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr + (mul_le_mul_of_nonneg_right hC (sq_nonneg _))) hB.le) + +end RealRooted diff --git a/RealRooted/BrandenLC/Sequence.lean b/RealRooted/BrandenLC/Sequence.lean new file mode 100644 index 000000000..16ff489a9 --- /dev/null +++ b/RealRooted/BrandenLC/Sequence.lean @@ -0,0 +1,165 @@ +module + +public import RealRooted.BrandenLC +import RealRooted.PFPolynomial.Closure +import RealRooted.CoefficientShape + +/-! +# Iterated log-concavity for limits of PF polynomials + +Brändén's polynomial transform extends to coefficientwise limits of PF +polynomials. Every finite iterate remains a Pólya-frequency sequence. +The approximation hypothesis matters: an arbitrary infinite PF sequence is +not assumed to admit PF polynomial approximants. + +The finite preservation theorem is from P. Brändén, *Iterated sequences and the +geometry of zeros*, https://arxiv.org/abs/0909.1927. +-/ + +@[expose] public section + +open Polynomial Filter Topology + +namespace RealRooted + +/-- The log-concavity transform of a sequence, with the preceding entry at +index zero set to zero. -/ +def logConcavitySequence {R : Type*} [Ring R] (a : ℕ → R) (k : ℕ) : R := + a k ^ 2 - (if k = 0 then 0 else a (k - 1)) * a (k + 1) + +/-- The polynomial and sequence log-concavity transforms have identical +coefficients, including indices above the polynomial degree. -/ +theorem coeff_logConcavityTransform_eq (p : ℝ[X]) (k : ℕ) : + (Branden.logConcavityTransform p).coeff k = logConcavitySequence p.coeff k := by + rw [Branden.coeff_logConcavityTransform] + by_cases hk : k ≤ p.natDegree + · rw [ite_eq_left hk] + rfl + · rw [ite_eq_right hk] + have hzero := coeff_eq_zero_of_natDegree_lt (p := p) (Nat.lt_of_not_ge hk) + have hnext := coeff_eq_zero_of_natDegree_lt (p := p) + (lt_trans (Nat.lt_of_not_ge hk) (Nat.lt_succ_self k)) + simp [logConcavitySequence, hzero, hnext] + +/-- Polynomial iteration agrees coefficientwise with sequence iteration. -/ +theorem coeff_iterate_logConcavityTransform (p : ℝ[X]) (m k : ℕ) : + ((Branden.logConcavityTransform^[m]) p).coeff k = + ((logConcavitySequence^[m]) p.coeff) k := by + induction m generalizing k with + | zero => rfl + | succ m ih => + rw [Function.iterate_succ_apply', Function.iterate_succ_apply', + coeff_logConcavityTransform_eq] + simp only [logConcavitySequence, ih] + +/-- The log-concavity transform is continuous for coefficientwise convergence. -/ +theorem tendsto_logConcavitySequence {a : ℕ → ℕ → ℝ} {b : ℕ → ℝ} + (h : ∀ k, Tendsto (fun n => a n k) atTop (𝓝 (b k))) (k : ℕ) : + Tendsto (fun n => logConcavitySequence (a n) k) atTop + (𝓝 (logConcavitySequence b k)) := by + by_cases hk : k = 0 + · simpa only [logConcavitySequence, ite_eq_left hk, zero_mul, sub_zero] using (h k).pow 2 + · simpa only [logConcavitySequence, ite_eq_right hk] using + ((h k).pow 2).sub ((h (k - 1)).mul (h (k + 1))) + +/-- Every finite log-concavity iterate respects coefficientwise convergence. -/ +theorem tendsto_iterate_logConcavitySequence {a : ℕ → ℕ → ℝ} {b : ℕ → ℝ} + (h : ∀ k, Tendsto (fun n => a n k) atTop (𝓝 (b k))) (m k : ℕ) : + Tendsto (fun n => ((logConcavitySequence^[m]) (a n)) k) atTop + (𝓝 (((logConcavitySequence^[m]) b) k)) := by + induction m generalizing k with + | zero => exact h k + | succ m ih => + simp only [Function.iterate_succ_apply'] + exact tendsto_logConcavitySequence ih k + +/-- Every finite polynomial log-concavity iterate preserves the PF cone. -/ +theorem IsPFPolynomial.iterate_logConcavityTransform {p : ℝ[X]} + (hp : IsPFPolynomial p) (m : ℕ) : + IsPFPolynomial ((Branden.logConcavityTransform^[m]) p) := by + induction m with + | zero => exact hp + | succ m ih => + rw [Function.iterate_succ_apply'] + exact Branden.IsPFPolynomial.logConcavityTransform ih + +/-- All iterated log-concavity transforms of a coefficientwise PF polynomial +limit are PF sequences, so every Toeplitz minor of every iterate is nonnegative. -/ +theorem isPolyaFreqSeq_iterate_logConcavitySequence_of_limit + {p : ℕ → ℝ[X]} {a : ℕ → ℝ} (hp : ∀ n, IsPFPolynomial (p n)) + (hlim : ∀ k, Tendsto (fun n => (p n).coeff k) atTop (𝓝 (a k))) (m : ℕ) : + IsPolyaFreqSeq ((logConcavitySequence^[m]) a) := by + apply IsPolyaFreqSeq.of_tendsto (fun n => ((hp n).iterate_logConcavityTransform m).to_sequence) + intro k + simpa only [coeff_iterate_logConcavityTransform] using + tendsto_iterate_logConcavitySequence hlim m k + +/-- Newton's inequalities give a degree-independent lower bound for the +log-concavity transform of a PF polynomial. -/ +theorem logConcavitySequence_coeff_lower_bound {p : ℝ[X]} + (hp : IsPFPolynomial p) (k : ℕ) : + p.coeff k ^ 2 ≤ (k + 1 : ℝ) * logConcavitySequence p.coeff k := by + by_cases hk0 : k = 0 + · subst k + simp [logConcavitySequence] + have hkpos : 0 < k := Nat.pos_of_ne_zero hk0 + by_cases hkd : k < p.natDegree + · have hn := hasUltraLogConcaveCoeffs_of_eq_zero_or_splits (Or.inr hp.splits) k hkpos hkd + have hB : 0 ≤ p.coeff (k - 1) * p.coeff (k + 1) := + mul_nonneg (hp.hasNonnegCoeffs _) (hp.hasNonnegCoeffs _) + have hD : (0 : ℝ) < ((p.natDegree - k : ℕ) : ℝ) := by + exact_mod_cast Nat.sub_pos_of_lt hkd + have hdrop : p.coeff (k - 1) * p.coeff (k + 1) * + ((k + 1 : ℝ) * ((p.natDegree - k : ℕ) : ℝ)) ≤ + p.coeff k ^ 2 * ((k : ℝ) * ((p.natDegree - k : ℕ) : ℝ)) := by + calc + _ ≤ p.coeff (k - 1) * p.coeff (k + 1) * + ((k + 1 : ℝ) * (((p.natDegree - k : ℕ) : ℝ) + 1)) := by + gcongr + linarith + _ ≤ _ := by simpa only [Nat.cast_add, Nat.cast_one] using hn + have hbase : p.coeff (k - 1) * p.coeff (k + 1) * (k + 1 : ℝ) ≤ + p.coeff k ^ 2 * k := + (mul_le_mul_iff_left₀ hD).mp (by simpa only [mul_assoc] using hdrop) + simp only [logConcavitySequence, ite_eq_right hk0] + nlinarith + · have hnext : p.coeff (k + 1) = 0 := coeff_eq_zero_of_natDegree_lt (by lia) + simp only [logConcavitySequence, hnext, mul_zero, sub_zero] + nlinarith [sq_nonneg (p.coeff k), Nat.cast_nonneg (α := ℝ) k] + +/-- The degree-independent Newton lower bound passes to PF polynomial limits. -/ +theorem logConcavitySequence_lower_bound_of_limit + {p : ℕ → ℝ[X]} {a : ℕ → ℝ} (hp : ∀ n, IsPFPolynomial (p n)) + (hlim : ∀ k, Tendsto (fun n => (p n).coeff k) atTop (𝓝 (a k))) (k : ℕ) : + a k ^ 2 ≤ (k + 1 : ℝ) * logConcavitySequence a k := + le_of_tendsto_of_tendsto ((hlim k).pow 2) + ((tendsto_logConcavitySequence hlim k).const_mul (k + 1 : ℝ)) + (Filter.Eventually.of_forall fun n => logConcavitySequence_coeff_lower_bound (hp n) k) + +/-- A positive entry in a PF polynomial limit remains positive after the +log-concavity transform. -/ +theorem logConcavitySequence_pos_of_limit + {p : ℕ → ℝ[X]} {a : ℕ → ℝ} (hp : ∀ n, IsPFPolynomial (p n)) + (hlim : ∀ k, Tendsto (fun n => (p n).coeff k) atTop (𝓝 (a k))) {k : ℕ} + (ha : 0 < a k) : 0 < logConcavitySequence a k := by + have h := logConcavitySequence_lower_bound_of_limit hp hlim k + have hk : (0 : ℝ) < k + 1 := by positivity + nlinarith [sq_pos_of_pos ha] + +/-- A positive entry remains positive under every log-concavity iterate +for coefficientwise PF polynomial limits. -/ +theorem iterate_logConcavitySequence_pos_of_limit + {p : ℕ → ℝ[X]} {a : ℕ → ℝ} (hp : ∀ n, IsPFPolynomial (p n)) + (hlim : ∀ k, Tendsto (fun n => (p n).coeff k) atTop (𝓝 (a k))) + (m k : ℕ) (ha : 0 < a k) : 0 < ((logConcavitySequence^[m]) a) k := by + induction m with + | zero => exact ha + | succ m ih => + rw [Function.iterate_succ_apply'] + apply logConcavitySequence_pos_of_limit + (fun n => (hp n).iterate_logConcavityTransform m) ?_ ih + intro j + simpa only [coeff_iterate_logConcavityTransform] using + tendsto_iterate_logConcavitySequence hlim m j + +end RealRooted diff --git a/RealRooted/EdreiThoma/AffineExponent.lean b/RealRooted/EdreiThoma/AffineExponent.lean index 4cbb4291b..41edb6a33 100644 --- a/RealRooted/EdreiThoma/AffineExponent.lean +++ b/RealRooted/EdreiThoma/AffineExponent.lean @@ -1,5 +1,6 @@ module +import RealRooted.Mathlib.Analysis.Complex.LinearProductLowerBound import RealRooted.Mathlib.Analysis.Complex.EntireExponentialType import Mathlib.Analysis.Real.Pi.Bounds import Mathlib.Analysis.SpecialFunctions.Log.Summable @@ -67,21 +68,6 @@ private lemma nonneg_series_norm_le {p : ℕ → ℝ} (hp : ∀ n, 0 ≤ p n) {F intro n simp [norm_pow, abs_of_nonneg (hp n)] -/-- Lower bound for the product on the closed right half-plane. -/ -private lemma one_le_norm_tprod {α : ℕ → ℝ} (hα : ∀ i, 0 ≤ α i) {z : ℂ} - (hz : 0 ≤ z.re) : - 1 ≤ ‖∏' i, (1 + (α i : ℂ) * z)‖ := by - by_cases hm : Multipliable (fun i => (1 + (α i : ℂ) * z)) - · have ht := hm.hasProd.norm - refine ge_of_tendsto' ht (fun s => ?_) - calc (1 : ℝ) = ∏ i ∈ s, (1 : ℝ) := by simp - _ ≤ ∏ i ∈ s, ‖1 + (α i : ℂ) * z‖ := - Finset.prod_le_prod₀ (fun _ _ => zero_le_one) (fun i _ => ?_) - refine le_trans ?_ (Complex.re_le_norm _) - simp only [add_re, one_re, re_ofReal_mul] - nlinarith [hα i] - · rw [tprod_eq_one_of_not_multipliable hm]; simp - /-- Subexponential growth of the product on the positive real axis. -/ private lemma norm_tprod_le {α : ℕ → ℝ} (hα : ∀ i, 0 ≤ α i) (sα : Summable α) {δ : ℝ} (hδ : 0 < δ) : @@ -286,7 +272,7 @@ private lemma re_le_of_series {h : ℂ → ℂ} {c : ℂ} have h2 := hpos ‖z‖ (norm_nonneg _) have h3 : Real.exp ((h z).re + z.re) ≤ ‖F1 z‖ := by simp only [F1, norm_mul, Complex.norm_exp] - have := one_le_norm_tprod hα hz + have := Complex.one_le_norm_tprod_one_add_ofReal_mul hα hz simp only [add_re, Complex.ofReal_one, one_mul] nlinarith [Real.exp_pos ((h z).re + z.re)] have h4 : Real.exp ((h z).re + z.re) ≤ Real.exp (L + (2 * ‖c‖ + 4) * ‖z‖) := by @@ -321,7 +307,7 @@ private lemma im_eq_zero_of_affine {h : ℂ → ℂ} {a : ℂ} set r : ℝ := 1 / (|a.im| + 1) with hr have hrpos : 0 < r := by positivity have hP : (∏' i, (1 + α i * r) : ℝ) ≠ 0 := by - have := one_le_norm_tprod hα (z := (r : ℂ)) + have := Complex.one_le_norm_tprod_one_add_ofReal_mul hα (z := (r : ℂ)) (by simpa only [Complex.ofReal_re] using hrpos.le) rw [tprod_ofReal_eq sα r] at this intro h' @@ -446,4 +432,3 @@ theorem exists_nonneg_eq_affine_of_series {h : ℂ → ℂ} (hh : Differentiable exact ⟨a.re, nonneg_of_affine ha hα hβ sα sβ h1 h2, ha⟩ end RealRooted.EdreiThoma - diff --git a/RealRooted/EulerOperator/ArithmeticNormalization.lean b/RealRooted/EulerOperator/ArithmeticNormalization.lean new file mode 100644 index 000000000..6fd6e9b54 --- /dev/null +++ b/RealRooted/EulerOperator/ArithmeticNormalization.lean @@ -0,0 +1,93 @@ +module + +public import RealRooted.EulerOperator.ArithmeticProduct +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import RealRooted.Mathlib.Analysis.SpecialFunctions.Choose + +/-! +# Normalized arithmetic polar multipliers + +The scale `r^r M^(r-1)` removes the falling-factorial attenuation in the +finite arithmetic polar approximants. The resulting coefficients converge +to the factorial ratio needed for exponential generating sections. +-/ + +public section + +open Filter Topology + +namespace RealRooted + +/-- The scaling used in arithmetic sections has the required power identity. -/ +private theorem arithmetic_scale_pow {r : ℕ} (hr : r ≠ 0) (M k : ℕ) : + ((r : ℝ) ^ r * (M : ℝ) ^ (r - 1)) ^ k * (M : ℝ) ^ k = + ((r * M : ℕ) : ℝ) ^ (r * k) := by + have he : (r - 1) * k + k = r * k := by + calc + _ = (r - 1 + 1) * k := by ring + _ = _ := by rw [Nat.sub_add_cancel (Nat.pos_of_ne_zero hr)] + rw [mul_pow, ← pow_mul, ← pow_mul, mul_assoc, ← pow_add, he, Nat.cast_mul, mul_pow] + +/-- The two reflections in the arithmetic approximation cancel the signs +of its finite multiplier. -/ +private theorem arithmetic_sign_cancel {r : ℕ} (hr : r ≠ 0) (k : ℕ) : + (-1 : ℝ) ^ (r * k + k) * (-1) ^ (r * k - k) = 1 := by + have hk : k ≤ r * k := Nat.le_mul_of_pos_left k (Nat.pos_of_ne_zero hr) + rw [← pow_add, show r * k + k + (r * k - k) = r * k + r * k by lia, + pow_add, ← mul_pow] + norm_num + +/-- After reflection and scaling, the arithmetic multiplier is a ratio of +normalized descending factorials. -/ +theorem arithmeticPolarMultiplier_normalized {r M k : ℕ} + (hr : r ≠ 0) (hM : M ≠ 0) (hk : k ≤ M) : + (-1 : ℝ) ^ (r * k + k) * + (arithmeticPolarMultiplier r (r * M) (r * k) / + arithmeticPolarMultiplier r (r * M) 0) * + ((r : ℝ) ^ r * (M : ℝ) ^ (r - 1)) ^ k = + ((r * k).factorial : ℝ) / k.factorial * + (((M.descFactorial k : ℝ) / (M : ℝ) ^ k) / + (((r * M).descFactorial (r * k) : ℝ) / ((r * M : ℕ) : ℝ) ^ (r * k))) := by + rw [arithmeticPolarMultiplier_ratio hr hk] + have hsign := arithmetic_sign_cancel hr k + have hscale := arithmetic_scale_pow hr M k + have hrM : ((r * M : ℕ) : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr (Nat.mul_ne_zero hr hM) + have hMR : (M : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr hM + have hdesc : ((r * M).descFactorial (r * k) : ℝ) ≠ 0 := by + exact_mod_cast (Nat.descFactorial_pos.mpr (Nat.mul_le_mul_left r hk)).ne' + have hkfac : (k.factorial : ℝ) ≠ 0 := by positivity + calc + _ = ((r * k).factorial : ℝ) / k.factorial * + M.descFactorial k / (r * M).descFactorial (r * k) * + ((r : ℝ) ^ r * (M : ℝ) ^ (r - 1)) ^ k := by + calc + _ = ((-1 : ℝ) ^ (r * k + k) * (-1) ^ (r * k - k)) * + (((r * k).factorial : ℝ) / k.factorial * + M.descFactorial k / (r * M).descFactorial (r * k) * + ((r : ℝ) ^ r * (M : ℝ) ^ (r - 1)) ^ k) := by ring + _ = _ := by rw [hsign, one_mul] + _ = _ := by + field_simp + rw [← hscale] + ring + +/-- For a fixed stride and coefficient index, the normalized arithmetic +multiplier tends to the exponential-section factorial ratio. -/ +theorem tendsto_arithmeticPolarMultiplier_normalized {r : ℕ} (hr : r ≠ 0) (k : ℕ) : + Tendsto (fun M : ℕ => (-1 : ℝ) ^ (r * k + k) * + (arithmeticPolarMultiplier r (r * M) (r * k) / + arithmeticPolarMultiplier r (r * M) 0) * + ((r : ℝ) ^ r * (M : ℝ) ^ (r - 1)) ^ k) + atTop (𝓝 (((r * k).factorial : ℝ) / k.factorial)) := by + have hm : Tendsto (fun M : ℕ => r * M) atTop atTop := + tendsto_atTop.mpr fun n => (eventually_ge_atTop n).mono fun M hM => + hM.trans (Nat.le_mul_of_pos_left M (Nat.pos_of_ne_zero hr)) + have hratio := (Nat.tendsto_descFactorial_div_pow_atTop k).div + ((Nat.tendsto_descFactorial_div_pow_atTop (r * k)).comp hm) (by norm_num) + have hlim := hratio.const_mul (((r * k).factorial : ℝ) / k.factorial) + simp only [div_self (by norm_num : (1 : ℝ) ≠ 0), mul_one] at hlim + apply hlim.congr' + filter_upwards [eventually_ge_atTop k, eventually_ge_atTop 1] with M hk hM + exact (arithmeticPolarMultiplier_normalized hr (by lia) hk).symm + +end RealRooted diff --git a/RealRooted/EulerOperator/ArithmeticProduct.lean b/RealRooted/EulerOperator/ArithmeticProduct.lean new file mode 100644 index 000000000..e3b6d10d3 --- /dev/null +++ b/RealRooted/EulerOperator/ArithmeticProduct.lean @@ -0,0 +1,156 @@ +module + +public import RealRooted.EulerOperator.ArithmeticSections +import RealRooted.Mathlib.Data.Nat.Factorial.ArithmeticProduct + +/-! +# Arithmetic polar multipliers without Gamma functions + +Finite products over integers not divisible by the stride describe the +arithmetic polar approximants. Reflection and translation evaluate these +products at multiples of the stride, without using Gamma functions at poles. +-/ + +@[expose] public section + +open Polynomial Finset + +namespace RealRooted + +/-- The multiplier obtained from the arithmetic polar parameters. -/ +noncomputable def arithmeticPolarMultiplier (r N k : ℕ) : ℝ := + ∏ a ∈ (Ioc 0 N).filter (fun a => ¬r ∣ a), ((a : ℝ) - k) + +theorem coeff_arithmetic_polarThetaProduct (r N k : ℕ) (p : ℝ[X]) : + (polarThetaProduct (arithmeticPolarParameters r N) p).coeff k = + arithmeticPolarMultiplier r N k * p.coeff k := by + rw [coeff_polarThetaProduct] + rfl + +/-- The constant multiplier is the factorial with the stride multiples removed. -/ +theorem arithmeticPolarMultiplier_zero_mul (r N : ℕ) : + arithmeticPolarMultiplier r N 0 * (r : ℝ) ^ (N / r) * (N / r).factorial = + N.factorial := by + simpa only [arithmeticPolarMultiplier, Nat.cast_zero, sub_zero, Nat.cast_mul, + Nat.cast_prod, Nat.cast_pow] using + congrArg (fun n : ℕ => (n : ℝ)) (Nat.prod_Ioc_not_dvd_mul_pow_mul_factorial r N) + +/-- The constant multiplier is positive, including at zero stride or cutoff. -/ +theorem arithmeticPolarMultiplier_zero_pos (r N : ℕ) : + 0 < arithmeticPolarMultiplier r N 0 := by + simp only [arithmeticPolarMultiplier, Nat.cast_zero, sub_zero] + exact prod_pos fun a ha => Nat.cast_pos.mpr (mem_Ioc.mp (mem_filter.mp ha).1).1 + +/-- Reflection in a multiple of the stride preserves its nonmultiple indices. -/ +private theorem sub_mem_nonmultiples {r L a : ℕ} (hL : r ∣ L) + (ha : a ∈ (Ioc 0 L).filter (fun a => ¬r ∣ a)) : + L - a ∈ (Ioc 0 L).filter (fun a => ¬r ∣ a) := by + obtain ⟨hai, had⟩ := mem_filter.mp ha + obtain ⟨ha0, haL⟩ := mem_Ioc.mp hai + have halt : a < L := lt_of_le_of_ne haL (fun h => had (h ▸ hL)) + exact mem_filter.mpr ⟨mem_Ioc.mpr ⟨Nat.sub_pos_of_lt halt, Nat.sub_le _ _⟩, + fun h => had ((Nat.dvd_sub_iff_right haL hL).mp h)⟩ + +/-- The multiplier at a multiple endpoint is its reflected constant value, +with one minus sign for each parameter. -/ +theorem arithmeticPolarMultiplier_self {r L : ℕ} (hL : r ∣ L) : + arithmeticPolarMultiplier r L L = + (-1 : ℝ) ^ (L - L / r) * arithmeticPolarMultiplier r L 0 := by + let s := (Ioc 0 L).filter (fun a => ¬r ∣ a) + have hprod : (∏ a ∈ s, ((L - a : ℕ) : ℝ)) = ∏ a ∈ s, (a : ℝ) := by + apply prod_bij (fun a _ => L - a) (fun _ ha => sub_mem_nonmultiples hL ha) + · intro a ha b hb he + have haL := (mem_Ioc.mp (mem_filter.mp ha).1).2 + have hbL := (mem_Ioc.mp (mem_filter.mp hb).1).2 + lia + · intro b hb + exact ⟨L - b, sub_mem_nonmultiples hL hb, + Nat.sub_sub_self (mem_Ioc.mp (mem_filter.mp hb).1).2⟩ + · intro a _ + rfl + have hcard : s.card = L - L / r := card_arithmeticPolarParameters r L + change (∏ a ∈ s, ((a : ℝ) - L)) = _ + calc + _ = ∏ a ∈ s, -((L - a : ℕ) : ℝ) := by + apply prod_congr rfl + intro a ha + rw [Nat.cast_sub (mem_Ioc.mp (mem_filter.mp ha).1).2] + ring + _ = (-1 : ℝ) ^ s.card * ∏ a ∈ s, ((L - a : ℕ) : ℝ) := prod_neg _ + _ = _ := by rw [hcard, hprod]; simp [arithmeticPolarMultiplier, s] + +/-- Translation by a multiple of the stride preserves the product on the +remaining interval. -/ +private theorem prod_nonmultiples_sub {r L N : ℕ} (hL : r ∣ L) : + (∏ a ∈ (Ioc L N).filter (fun a => ¬r ∣ a), ((a : ℝ) - L)) = + arithmeticPolarMultiplier r (N - L) 0 := by + simp only [arithmeticPolarMultiplier, Nat.cast_zero, sub_zero] + apply prod_bij (fun a _ => a - L) + · intro a ha + obtain ⟨hai, had⟩ := mem_filter.mp ha + obtain ⟨haL, haN⟩ := mem_Ioc.mp hai + exact mem_filter.mpr ⟨mem_Ioc.mpr ⟨Nat.sub_pos_of_lt haL, Nat.sub_le_sub_right haN L⟩, + fun h => had ((Nat.dvd_sub_iff_left haL.le hL).mp h)⟩ + · intro a ha b hb he + have haL := (mem_Ioc.mp (mem_filter.mp ha).1).1 + have hbL := (mem_Ioc.mp (mem_filter.mp hb).1).1 + lia + · intro b hb + obtain ⟨hbi, hbd⟩ := mem_filter.mp hb + obtain ⟨hb0, hbN⟩ := mem_Ioc.mp hbi + refine ⟨b + L, mem_filter.mpr ⟨mem_Ioc.mpr ⟨by lia, by lia⟩, ?_⟩, by lia⟩ + exact fun h => hbd ((Nat.dvd_add_iff_left hL).mpr h) + · intro a ha + rw [Nat.cast_sub (mem_Ioc.mp (mem_filter.mp ha).1).1.le] + +/-- Splitting a finite product at a multiple of the stride gives its exact +Gamma-free value there. -/ +theorem arithmeticPolarMultiplier_of_dvd {r L N : ℕ} (hL : r ∣ L) (hLN : L ≤ N) : + arithmeticPolarMultiplier r N L = (-1 : ℝ) ^ (L - L / r) * + arithmeticPolarMultiplier r L 0 * arithmeticPolarMultiplier r (N - L) 0 := by + unfold arithmeticPolarMultiplier + rw [prod_filter, ← prod_Ioc_consecutive _ (Nat.zero_le L) hLN, + ← prod_filter, ← prod_filter] + change arithmeticPolarMultiplier r L L * _ = _ + rw [arithmeticPolarMultiplier_self hL, prod_nonmultiples_sub hL] + rfl + +/-- At a stride-multiple cutoff, the constant multiplier has a factorial ratio +with nonzero denominator. -/ +theorem arithmeticPolarMultiplier_zero_mul_eq {r : ℕ} (hr : r ≠ 0) (M : ℕ) : + arithmeticPolarMultiplier r (r * M) 0 = + ((r * M).factorial : ℝ) / ((r : ℝ) ^ M * M.factorial) := by + have hrR : (r : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr hr + rw [eq_div_iff (mul_ne_zero (pow_ne_zero _ hrR) (by positivity))] + simpa only [Nat.mul_div_cancel_left _ (Nat.pos_of_ne_zero hr), mul_assoc] using + arithmeticPolarMultiplier_zero_mul r (r * M) + +/-- The exact finite arithmetic multiplier ratio. Every factorial and +descending factorial in the denominator is nonzero under the stated bounds. -/ +theorem arithmeticPolarMultiplier_ratio {r M k : ℕ} (hr : r ≠ 0) (hk : k ≤ M) : + arithmeticPolarMultiplier r (r * M) (r * k) / arithmeticPolarMultiplier r (r * M) 0 = + (-1 : ℝ) ^ (r * k - k) * ((r * k).factorial : ℝ) / k.factorial * + M.descFactorial k / (r * M).descFactorial (r * k) := by + have hmul : r * k ≤ r * M := Nat.mul_le_mul_left r hk + rw [arithmeticPolarMultiplier_of_dvd (dvd_mul_right r k) hmul, + Nat.mul_div_cancel_left _ (Nat.pos_of_ne_zero hr), ← Nat.mul_sub_left_distrib, + arithmeticPolarMultiplier_zero_mul_eq hr, arithmeticPolarMultiplier_zero_mul_eq hr, + arithmeticPolarMultiplier_zero_mul_eq hr] + have hp : (r : ℝ) ^ M = (r : ℝ) ^ k * (r : ℝ) ^ (M - k) := by + rw [← pow_add, Nat.add_sub_of_le hk] + have hM : (M.factorial : ℝ) = ((M - k).factorial : ℝ) * M.descFactorial k := by + exact_mod_cast (Nat.factorial_mul_descFactorial hk).symm + have hRM : ((r * M).factorial : ℝ) = + ((r * (M - k)).factorial : ℝ) * (r * M).descFactorial (r * k) := by + rw [Nat.mul_sub_left_distrib] + exact_mod_cast (Nat.factorial_mul_descFactorial hmul).symm + have hrR : (r : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr hr + have hdR : ((r * M).descFactorial (r * k) : ℝ) ≠ 0 := by + exact_mod_cast (Nat.descFactorial_pos.mpr hmul).ne' + have hkR : (k.factorial : ℝ) ≠ 0 := by positivity + have hsubR : ((M - k).factorial : ℝ) ≠ 0 := by positivity + have hrsubR : ((r * (M - k)).factorial : ℝ) ≠ 0 := by positivity + rw [hp, hM, hRM] + field_simp + +end RealRooted diff --git a/RealRooted/EulerOperator/ArithmeticSections.lean b/RealRooted/EulerOperator/ArithmeticSections.lean new file mode 100644 index 000000000..4bf1b3329 --- /dev/null +++ b/RealRooted/EulerOperator/ArithmeticSections.lean @@ -0,0 +1,103 @@ +module + +public import RealRooted.EulerOperator.RootCounting +public import Mathlib.Algebra.Polynomial.Expand +import RealRooted.Mathlib.Algebra.Polynomial.Expand.PositiveRoots +import RealRooted.Mathlib.Algebra.Polynomial.Expand.Contract +import RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas + +/-! +# Finite arithmetic-section approximants + +Applying polar Euler factors at the positive integers not divisible by a +stride annihilates the unwanted coefficients. The positive-root estimate +then proves that the compressed polynomial splits. This is the finite +root-counting stage of Pólya's arithmetic-section argument. +-/ + +@[expose] public section + +open Polynomial Finset + +namespace RealRooted + +/-- Positive integers through `N` which are not divisible by the stride. -/ +def arithmeticPolarParameters (r N : ℕ) : Multiset ℕ := + ((Ioc 0 N).filter fun a => ¬r ∣ a).val + +@[simp] theorem mem_arithmeticPolarParameters (r N a : ℕ) : + a ∈ arithmeticPolarParameters r N ↔ 0 < a ∧ a ≤ N ∧ ¬r ∣ a := by + simp [arithmeticPolarParameters, and_assoc] + +theorem zero_notMem_arithmeticPolarParameters (r N : ℕ) : + 0 ∉ arithmeticPolarParameters r N := by simp + +/-- Among the first `N` positive integers, precisely `N - N / r` are not +multiples of `r`. This also covers `r = 0`. -/ +theorem card_arithmeticPolarParameters (r N : ℕ) : + (arithmeticPolarParameters r N).card = N - N / r := by + have h := (Ioc 0 N).card_filter_add_card_filter_not (fun a => r ∣ a) + rw [Nat.Ioc_filter_dvd_card_eq_div] at h + simp only [Nat.card_Ioc, Nat.sub_zero] at h + change ((Ioc 0 N).filter fun a => ¬r ∣ a).card = N - N / r + lia + +/-- Truncating the arithmetic parameter multiset truncates its upper bound. -/ +theorem filter_arithmeticPolarParameters_le (r : ℕ) {m N : ℕ} (hm : m ≤ N) : + (arithmeticPolarParameters r N).filter (· ≤ m) = arithmeticPolarParameters r m := by + change (((Ioc 0 N).filter (fun a => ¬r ∣ a)).filter (· ≤ m)).val = + ((Ioc 0 m).filter (fun a => ¬r ∣ a)).val + congr 1 + ext a + simp only [mem_filter, mem_Ioc] + exact ⟨fun h => ⟨⟨h.1.1.1, h.2⟩, h.1.2⟩, + fun h => ⟨⟨⟨h.1.1, h.1.2.trans hm⟩, h.2⟩, h.1.2⟩⟩ + +/-- A parameter equal to the coefficient index annihilates that coefficient. -/ +theorem coeff_polarThetaProduct_eq_zero_of_mem {s : Multiset ℕ} {p : ℝ[X]} {k : ℕ} + (hk : k ∈ s) : (polarThetaProduct s p).coeff k = 0 := by + rw [coeff_polarThetaProduct] + have hz : (s.map fun a : ℕ => (a : ℝ) - k).prod = 0 := by + rw [Multiset.prod_eq_zero_iff, Multiset.mem_map] + exact ⟨k, hk, sub_self _⟩ + rw [hz, zero_mul] + +/-- Enough arithmetic polar factors leave only coefficient indices divisible +by the stride. -/ +theorem coeff_arithmetic_polarThetaProduct_eq_zero {p : ℝ[X]} (r : ℕ) {N : ℕ} + (hp : p.natDegree ≤ N) (k : ℕ) (hk : ¬r ∣ k) : + (polarThetaProduct (arithmeticPolarParameters r N) p).coeff k = 0 := by + by_cases hkn : k ≤ N + · apply coeff_polarThetaProduct_eq_zero_of_mem + exact (mem_arithmeticPolarParameters r N k).mpr + ⟨Nat.pos_of_ne_zero (fun h => hk (h ▸ dvd_zero r)), hkn, hk⟩ + · apply coeff_eq_zero_of_natDegree_lt + exact (natDegree_polarThetaProduct_le _ _).trans_lt (hp.trans_lt (Nat.lt_of_not_ge hkn)) + +/-- Compressing a reflected PF polynomial after applying the arithmetic +polar factors gives a polynomial which splits over the reals. -/ +theorem IsPFPolynomial.contract_arithmetic_polarThetaProduct_splits + {p : ℝ[X]} (hp : IsPFPolynomial p) (h0 : p.coeff 0 ≠ 0) + {r N : ℕ} (hr : r ≠ 0) (hN : p.natDegree ≤ N) : + (contract r (RealRooted.polarThetaProduct + (arithmeticPolarParameters r N) (p.comp (-X)))).Splits := by + let q := RealRooted.polarThetaProduct (arithmeticPolarParameters r N) (p.comp (-X)) + have he : expand ℝ r (contract r q) = q := + expand_contract_of_coeff_eq_zero hr + (coeff_arithmetic_polarThetaProduct_eq_zero r (by simpa using hN)) + have hbound := hp.natDegree_le_card_pos_roots_polarThetaProduct h0 + (zero_notMem_arithmeticPolarParameters r N) + rw [filter_arithmeticPolarParameters_le r hN, card_arithmeticPolarParameters] at hbound + have hdiv : p.natDegree / r ≤ p.natDegree := Nat.div_le_self _ _ + have hcount : p.natDegree / r ≤ (q.roots.filter (0 < ·)).card := by + change p.natDegree ≤ (q.roots.filter (0 < ·)).card + + (p.natDegree - p.natDegree / r) at hbound + lia + apply splits_of_natDegree_le_card_pos_roots_expand hr + rw [he] + exact (natDegree_contract_le_div q hr).trans + ((Nat.div_le_div_right (by + simpa [q] using natDegree_polarThetaProduct_le (arithmeticPolarParameters r N) + (p.comp (-X)))).trans hcount) + +end RealRooted diff --git a/RealRooted/EulerOperator/RootCounting.lean b/RealRooted/EulerOperator/RootCounting.lean new file mode 100644 index 000000000..649b8cb77 --- /dev/null +++ b/RealRooted/EulerOperator/RootCounting.lean @@ -0,0 +1,165 @@ +module + +public import RealRooted.EulerOperator +public import RealRooted.MultiplierSequence +import RealRooted.EulerOperator.Polar.RealParameter +import RealRooted.Mathlib.Analysis.Calculus.LocalExtr.PolynomialEuler +import RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas + +/-! +# Products of polar Euler operators + +A finite product of the operators `a - X D` can lose at most one positive +root for each factor. On a reflected PF polynomial, factors whose parameter +exceeds the original degree lose no positive roots. This is the root-count +step in Pólya's arithmetic-section argument. +-/ + +@[expose] public section + +open Polynomial + +namespace RealRooted + +/-- The commuting product of the polar Euler operators with natural parameters +listed in a multiset. Repeated parameters are retained. -/ +noncomputable def polarThetaProduct (s : Multiset ℕ) (p : ℝ[X]) : ℝ[X] := + diagonalOperator (fun k => (s.map fun a : ℕ => (a : ℝ) - k).prod) p + +@[simp] theorem coeff_polarThetaProduct (s : Multiset ℕ) (p : ℝ[X]) (k : ℕ) : + (polarThetaProduct s p).coeff k = (s.map fun a : ℕ => (a : ℝ) - k).prod * p.coeff k := + coeff_diagonalOperator _ _ _ + +@[simp] theorem polarThetaProduct_zero (p : ℝ[X]) : polarThetaProduct 0 p = p := by + ext k + simp + +@[simp] theorem polarThetaProduct_cons (a : ℕ) (s : Multiset ℕ) (p : ℝ[X]) : + polarThetaProduct (a ::ₘ s) p = polarTheta a (polarThetaProduct s p) := by + ext k + simp [polarTheta, sub_mul, mul_assoc] + +theorem polarThetaProduct_add (s t : Multiset ℕ) (p : ℝ[X]) : + polarThetaProduct (s + t) p = polarThetaProduct s (polarThetaProduct t p) := by + ext k + simp [mul_assoc] + +theorem natDegree_polarThetaProduct_le (s : Multiset ℕ) (p : ℝ[X]) : + (polarThetaProduct s p).natDegree ≤ p.natDegree := + natDegree_diagonalOperator_le _ _ + +/-- A product of polar Euler operators preserves every coefficient whose +index is absent from its parameter multiset. -/ +theorem coeff_polarThetaProduct_ne_zero {s : Multiset ℕ} {p : ℝ[X]} {k : ℕ} + (hk : k ∉ s) (hp : p.coeff k ≠ 0) : (polarThetaProduct s p).coeff k ≠ 0 := by + classical + induction s using Multiset.induction with + | empty => simpa using hp + | cons a s ih => + rw [polarThetaProduct_cons] + simp only [polarTheta, coeff_sub, coeff_C_mul, coeff_theta, ← sub_mul] + apply mul_ne_zero _ (ih fun h => hk (Multiset.mem_cons_of_mem h)) + exact sub_ne_zero.mpr (by + intro h + have he : a = k := Nat.cast_inj.mp h + exact hk (he ▸ Multiset.mem_cons_self a s)) + +/-- When the leading index is not a parameter, no degree is lost. -/ +theorem natDegree_polarThetaProduct {s : Multiset ℕ} {p : ℝ[X]} + (hs : p.natDegree ∉ s) : (polarThetaProduct s p).natDegree = p.natDegree := by + by_cases hp : p = 0 + · simp [hp, polarThetaProduct] + apply natDegree_eq_of_le_of_coeff_ne_zero (natDegree_polarThetaProduct_le s p) + exact coeff_polarThetaProduct_ne_zero hs (leadingCoeff_ne_zero.mpr hp) + +/-- Parameters strictly beyond the degree preserve the PF property. -/ +theorem IsPFPolynomial.polarThetaProduct {p : ℝ[X]} (hp : IsPFPolynomial p) + {s : Multiset ℕ} (hs : ∀ a ∈ s, p.natDegree < a) : + IsPFPolynomial (polarThetaProduct s p) := by + induction s using Multiset.induction with + | empty => simpa using hp + | cons a s ih => + rw [polarThetaProduct_cons] + apply isPFPolynomial_C_mul_sub_theta + (n := p.natDegree) (by exact_mod_cast hs a (Multiset.mem_cons_self _ _)) + (ih fun b hb => hs b (Multiset.mem_cons_of_mem hb)) + (natDegree_polarThetaProduct_le s p) + +/-- Products with nonzero natural parameters lose at most their number of +positive roots. A nonzero constant coefficient rules out zero intermediate outputs. -/ +theorem card_pos_roots_le_polarThetaProduct_add_card {p : ℝ[X]} + (hp : p.coeff 0 ≠ 0) {s : Multiset ℕ} (hs : 0 ∉ s) : + (p.roots.filter (0 < ·)).card ≤ + ((polarThetaProduct s p).roots.filter (0 < ·)).card + s.card := by + classical + induction s using Multiset.induction with + | empty => simp + | cons a s ih => + have hs0 : 0 ∉ s := fun h => hs (Multiset.mem_cons_of_mem h) + have hq : polarThetaProduct (a ::ₘ s) p ≠ 0 := by + intro h + exact coeff_polarThetaProduct_ne_zero hs hp (by rw [h, coeff_zero]) + have heuler : X * (polarThetaProduct s p).derivative - + C (a : ℝ) * polarThetaProduct s p = -polarThetaProduct (a ::ₘ s) p := by + rw [polarThetaProduct_cons] + simp only [polarTheta, theta, neg_sub] + have hb := (polarThetaProduct s p).card_pos_roots_le_euler_sub_add_one a + (by rw [heuler]; exact neg_ne_zero.mpr hq) + rw [heuler, roots_neg] at hb + have hi := ih hs0 + simpa only [Multiset.card_cons, Nat.add_assoc, Nat.add_comm 1 s.card] + using hi.trans (Nat.add_le_add_right hb s.card) + +/-- Reflecting a PF polynomial with nonzero constant coefficient puts every +root strictly on the positive real axis. -/ +theorem IsPFPolynomial.card_pos_roots_comp_neg_X {p : ℝ[X]} (hp : IsPFPolynomial p) + (h0 : p.coeff 0 ≠ 0) : ((p.comp (-X)).roots.filter (0 < ·)).card = p.natDegree := by + classical + rw [roots_comp_neg_X, Multiset.filter_map] + have hf : p.roots.filter (fun x => 0 < -x) = p.roots := by + apply Multiset.filter_eq_self.mpr + intro x hx + have hx0 : x ≠ 0 := by + rintro rfl + exact h0 (by simpa only [← coeff_zero_eq_eval_zero] using (isRoot_of_mem_roots hx).eq_zero) + exact neg_pos.mpr (lt_of_le_of_ne (hp.roots_nonpos x hx) hx0) + simp only [Function.comp_def] at * + rw [hf, Multiset.card_map] + exact splits_iff_card_roots.mp hp.splits + +/-- Polar Euler products commute with reflection of their polynomial input. -/ +theorem polarThetaProduct_comp_neg_X (s : Multiset ℕ) (p : ℝ[X]) : + polarThetaProduct s (p.comp (-X)) = (polarThetaProduct s p).comp (-X) := by + ext k + simp only [coeff_polarThetaProduct, coeff_comp_neg_X] + ring + +/-- Only parameters at or below the original degree can reduce the positive +root count of a reflected PF polynomial. -/ +theorem IsPFPolynomial.natDegree_le_card_pos_roots_polarThetaProduct + {p : ℝ[X]} (hp : IsPFPolynomial p) (h0 : p.coeff 0 ≠ 0) + {s : Multiset ℕ} (hs : 0 ∉ s) : + p.natDegree ≤ ((RealRooted.polarThetaProduct s (p.comp (-X))).roots.filter (0 < ·)).card + + (s.filter (· ≤ p.natDegree)).card := by + classical + let small := s.filter (· ≤ p.natDegree) + let large := s.filter (fun a => ¬a ≤ p.natDegree) + have hsplit : s = small + large := (Multiset.filter_add_not _ s).symm + have hlarge : ∀ a ∈ large, p.natDegree < a := by + intro a ha + exact Nat.lt_of_not_ge (Multiset.mem_filter.mp ha).2 + have hl0 : 0 ∉ large := fun h => hs (Multiset.mem_filter.mp h).1 + have hp0 := coeff_polarThetaProduct_ne_zero hl0 h0 + have hpdegree : (RealRooted.polarThetaProduct large p).natDegree = p.natDegree := + natDegree_polarThetaProduct (fun h => (hlarge _ h).false) + have hcount := (hp.polarThetaProduct hlarge).card_pos_roots_comp_neg_X hp0 + have hbound := card_pos_roots_le_polarThetaProduct_add_card + (p := (RealRooted.polarThetaProduct large p).comp (-X)) + (by simpa only [coeff_comp_neg_X, pow_zero, mul_one] using hp0) + (s := small) (fun h => hs (Multiset.mem_filter.mp h).1) + rw [hcount, hpdegree] at hbound + nth_rw 1 [hsplit] + rw [polarThetaProduct_add, polarThetaProduct_comp_neg_X] + exact hbound + +end RealRooted diff --git a/RealRooted/Hermite/Appell.lean b/RealRooted/Hermite/Appell.lean new file mode 100644 index 000000000..801477c5c --- /dev/null +++ b/RealRooted/Hermite/Appell.lean @@ -0,0 +1,82 @@ +module + +public import RealRooted.Hermite.Jensen +public import RealRooted.SimpleRoots +import RealRooted.Hermite.FiniteTransfer +import RealRooted.Derivative.Interlacing + +/-! +# The Hermite Jensen Appell family + +For a fixed coefficient sequence, differentiation lowers the degree index +without shifting the coefficient sequence. This gives consecutive-degree +interlacing, and simple roots exclude shared roots between adjacent rows. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Hermite Jensen polynomials form an Appell family with derivative factor `2d`. -/ +theorem derivative_hermiteJensenPolynomial (d : ℕ) (gamma : ℕ → ℝ) : + (hermiteJensenPolynomial (d + 1) gamma).derivative = + C (2 * (d + 1 : ℝ)) * hermiteJensenPolynomial d gamma := by + classical + rw [hermiteJensenPolynomial, map_sum, Finset.sum_range_succ] + simp only [derivative_mul, derivative_C, zero_mul, zero_add, Nat.sub_self, + hermitePhysicists_zero, derivative_one, mul_zero, add_zero] + rw [hermiteJensenPolynomial, Finset.mul_sum] + apply Finset.sum_congr rfl + intro k hk + have hkd : k ≤ d := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) + have hsub : d + 1 - k = d - k + 1 := by lia + rw [hsub, derivative_hermitePhysicists] + have hchoose : ((d + 1).choose k : ℝ) * (d - k + 1 : ℕ) = + (d + 1 : ℝ) * (d.choose k : ℝ) := by + rw [← hsub] + exact_mod_cast (Nat.choose_mul_succ_eq d k).symm.trans (Nat.mul_comm _ _) + simp only [← mul_assoc, ← C_mul] + congr 2 + push_cast at hchoose + linear_combination 2 * gamma k * hchoose + +/-- Splitting of the upper Hermite row gives zero-aware interlacing with the preceding row. -/ +theorem hermiteJensenPolynomial_interl {d : ℕ} {gamma : ℕ → ℝ} + (hp : (hermiteJensenPolynomial (d + 1) gamma).Splits) : + Interl (hermiteJensenPolynomial d gamma) (hermiteJensenPolynomial (d + 1) gamma) := by + have hi : Interl (hermiteJensenPolynomial (d + 1) gamma).derivative + (hermiteJensenPolynomial (d + 1) gamma) := by + by_cases hd : (hermiteJensenPolynomial (d + 1) gamma).natDegree = 0 + · rw [derivative_eq_zero.mpr hd] + exact interl_zero_left _ + · exact (derivative_interlaces_of_natDegree_ne_zero hp hd).toStrictInterl.toInterl + have hscaled := hi.C_mul_left_of_nonneg (a := (2 * (d + 1 : ℝ))⁻¹) (by positivity) + simpa only [derivative_hermiteJensenPolynomial, ← mul_assoc, ← C_mul, + inv_mul_cancel₀ (by positivity : (2 * (d + 1 : ℝ)) ≠ 0), C_1, one_mul] using hscaled + +/-- Nonzero zeroth coefficient gives nonzero, consecutive-degree interlacing. -/ +theorem hermiteJensenPolynomial_strictInterl {d : ℕ} {gamma : ℕ → ℝ} + (hp : (hermiteJensenPolynomial (d + 1) gamma).Splits) (hgamma : gamma 0 ≠ 0) : + StrictInterl (hermiteJensenPolynomial d gamma) + (hermiteJensenPolynomial (d + 1) gamma) := by + have hdegree : (hermiteJensenPolynomial (d + 1) gamma).natDegree ≠ 0 := by + rw [natDegree_hermiteJensenPolynomial hgamma] + lia + have hi := (derivative_interlaces_of_natDegree_ne_zero hp hdegree).toStrictInterl + have hscaled := hi.C_mul_left (a := (2 * (d + 1 : ℝ))⁻¹) (by positivity) + simpa only [derivative_hermiteJensenPolynomial, ← mul_assoc, ← C_mul, + inv_mul_cancel₀ (by positivity : (2 * (d + 1 : ℝ)) ≠ 0), C_1, one_mul] using hscaled + +/-- A simple upper Hermite row shares no real root with its predecessor. -/ +theorem hermiteJensenPolynomial_no_common_root {d : ℕ} {gamma : ℕ → ℝ} + (hp : HasSimpleRoots (hermiteJensenPolynomial (d + 1) gamma)) (r : ℝ) : + ¬ ((hermiteJensenPolynomial d gamma).IsRoot r ∧ + (hermiteJensenPolynomial (d + 1) gamma).IsRoot r) := by + intro hr + apply hp.eval_derivative_ne_zero hr.2 + rw [derivative_hermiteJensenPolynomial, eval_mul] + rw [show (hermiteJensenPolynomial d gamma).eval r = 0 from hr.1, mul_zero] + +end RealRooted diff --git a/RealRooted/Hermite/Companions.lean b/RealRooted/Hermite/Companions.lean new file mode 100644 index 000000000..e445f95e3 --- /dev/null +++ b/RealRooted/Hermite/Companions.lean @@ -0,0 +1,183 @@ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.BasisTransform +public import RealRooted.Hermite.Jensen +public import RealRooted.SimpleRoots +public import Mathlib.RingTheory.Polynomial.Pochhammer +import RealRooted.Hermite.FiniteTransfer +import RealRooted.MultiplierSequence.InvPochhammer +import RealRooted.MultiplierSequence.PolyaSchur +import RealRooted.Mathlib.Algebra.Polynomial.Reverse + +/-! +# Weighted Hermite companions + +A finite multiplier sequence can be applied to the reflected Jensen input +before the Hermite transform. This includes the reciprocal-factorial companion +following Corollary 3.8 of Cormac O'Sullivan, *Zeros of Jensen polynomials and +asymptotics for the Riemann xi function*, https://arxiv.org/abs/2007.13582. +Reciprocal rising factorials give a further parameterized family. +-/ + +@[expose] public section + +open Polynomial + +namespace RealRooted + +/-- A Hermite Jensen polynomial with a weight on the Hermite index. -/ +noncomputable def hermiteCompanion (d : ℕ) (gamma weight : ℕ → ℝ) : ℝ[X] := + hermiteJensenPolynomial d (fun k => gamma k * weight (d - k)) + +/-- The reciprocal-factorial Hermite companion. -/ +noncomputable def hermiteFactorialPolynomial (d : ℕ) (gamma : ℕ → ℝ) : ℝ[X] := + hermiteCompanion d gamma (fun k => (k.factorial : ℝ)⁻¹) + +/-- The reciprocal rising-factorial Hermite companion with parameter `a`. -/ +noncomputable def hermitePochhammerPolynomial (d : ℕ) (gamma : ℕ → ℝ) (a : ℝ) : ℝ[X] := + hermiteCompanion d gamma (fun k => ((ascPochhammer ℝ k).eval a)⁻¹) + +/-- The degree-zero companion is the product of the initial coefficients. -/ +@[simp] theorem hermiteCompanion_zero (gamma weight : ℕ → ℝ) : + hermiteCompanion 0 gamma weight = C (gamma 0 * weight 0) := by + simp [hermiteCompanion, hermiteJensenPolynomial] + +/-- Reflection turns a weight on the Hermite index into an ordinary diagonal operator. -/ +theorem reflect_jensenPolynomial_weight (d : ℕ) (gamma weight : ℕ → ℝ) : + reflect d (jensenPolynomial d (fun k => gamma k * weight (d - k))) = + diagonalOperator weight (reflect d (jensenPolynomial d gamma)) := by + ext k + simp only [coeff_diagonalOperator, coeff_reflect] + by_cases hk : k ≤ d + · rw [revAt_le hk] + simp [coeff_jensenPolynomial, Nat.sub_sub_self hk] + ring + · rw [revAt_eq_self_of_lt (lt_of_not_ge hk)] + simp [coeff_jensenPolynomial, hk] + +/-- A weighted companion is a diagonal operator followed by the Hermite transform. -/ +theorem hermiteCompanion_eq_basisTransform (d : ℕ) (gamma weight : ℕ → ℝ) : + hermiteCompanion d gamma weight = + basisTransform hermitePhysicists + (diagonalOperator weight (reflect d (jensenPolynomial d gamma))) := by + rw [hermiteCompanion, hermiteJensenPolynomial_eq_basisTransform, + reflect_jensenPolynomial_weight] + +/-- Finite multiplier weights preserve splitting of the Hermite companion, +including zero inputs and weights with zero entries. -/ +theorem hermiteCompanion_splits {d : ℕ} {gamma weight : ℕ → ℝ} + (hweight : IsFiniteMultiplierSequence d weight) + (hp : (jensenPolynomial d gamma).Splits) : + (hermiteCompanion d gamma weight).Splits := by + rw [hermiteCompanion_eq_basisTransform] + apply splits_hermiteBasisTransform + have hdeg : (reflect d (jensenPolynomial d gamma)).natDegree ≤ d := + natDegree_reflect_le.trans (max_eq_left (natDegree_jensenPolynomial_le d gamma)).le + rcases hweight hdeg (hp.reflect (natDegree_jensenPolynomial_le d gamma)) with hz | hs + · simp [hz] + · exact hs + +/-- A weighted companion is simple-real-rooted whenever its transformed +input is nonzero and the finite multiplier hypothesis holds. -/ +theorem isSimpleRealRooted_hermiteCompanion {d : ℕ} {gamma weight : ℕ → ℝ} + (hweight : IsFiniteMultiplierSequence d weight) + (hp : (jensenPolynomial d gamma).Splits) + (hne : diagonalOperator weight (reflect d (jensenPolynomial d gamma)) ≠ 0) : + IsSimpleRealRooted (hermiteCompanion d gamma weight) := by + rw [hermiteCompanion_eq_basisTransform] + apply isSimpleRealRooted_hermiteBasisTransform _ hne + have hdeg : (reflect d (jensenPolynomial d gamma)).natDegree ≤ d := + natDegree_reflect_le.trans (max_eq_left (natDegree_jensenPolynomial_le d gamma)).le + exact (hweight hdeg (hp.reflect (natDegree_jensenPolynomial_le d gamma))).resolve_left hne + +/-- Weights nonzero through the relevant degree cannot annihilate a nonzero input. -/ +theorem isSimpleRealRooted_hermiteCompanion_of_nonzero + {d : ℕ} {gamma weight : ℕ → ℝ} (hweight : IsFiniteMultiplierSequence d weight) + (hp : (jensenPolynomial d gamma).Splits) (hp0 : jensenPolynomial d gamma ≠ 0) + (hw0 : ∀ k ≤ d, weight k ≠ 0) : + IsSimpleRealRooted (hermiteCompanion d gamma weight) := by + apply isSimpleRealRooted_hermiteCompanion hweight hp + intro hz + apply hp0 + apply (reflect_eq_zero_iff (N := d)).mp + ext k + by_cases hk : k ≤ d + · have h := congrArg (fun p : ℝ[X] => p.coeff k) hz + simpa only [coeff_diagonalOperator, coeff_zero, mul_eq_zero, + hw0 k hk, false_or] using h + · have hdeg : (reflect d (jensenPolynomial d gamma)).natDegree ≤ d := + natDegree_reflect_le.trans (max_eq_left (natDegree_jensenPolynomial_le d gamma)).le + rw [coeff_eq_zero_of_natDegree_lt (hdeg.trans_lt (lt_of_not_ge hk)), coeff_zero] + +/-- Nonzero top weight and initial coefficient suffice for simple real roots; +other entries of the finite multiplier sequence may vanish. -/ +theorem isSimpleRealRooted_hermiteCompanion_of_coeff_zero + {d : ℕ} {gamma weight : ℕ → ℝ} (hweight : IsFiniteMultiplierSequence d weight) + (hp : (jensenPolynomial d gamma).Splits) (hgamma : gamma 0 ≠ 0) + (hw : weight d ≠ 0) : IsSimpleRealRooted (hermiteCompanion d gamma weight) := by + apply isSimpleRealRooted_hermiteCompanion hweight hp + intro hz + have h := congrArg (fun p : ℝ[X] => p.coeff d) hz + simp only [coeff_diagonalOperator, coeff_reflect, revAt_le le_rfl, Nat.sub_self, + coeff_jensenPolynomial, Nat.zero_le, ite_true, Nat.choose_zero_right, + Nat.cast_one, one_mul, coeff_zero] at h + exact mul_ne_zero hw hgamma h + +/-- Nonvanishing of the leading weighted coefficient makes the degree exact. -/ +theorem natDegree_hermiteCompanion {d : ℕ} {gamma weight : ℕ → ℝ} + (hgamma : gamma 0 ≠ 0) (hweight : weight d ≠ 0) : + (hermiteCompanion d gamma weight).natDegree = d := + natDegree_hermiteJensenPolynomial (by simpa using mul_ne_zero hgamma hweight) + +/-- The leading coefficient of a degree-exact weighted companion. -/ +theorem leadingCoeff_hermiteCompanion {d : ℕ} {gamma weight : ℕ → ℝ} + (hgamma : gamma 0 ≠ 0) (hweight : weight d ≠ 0) : + (hermiteCompanion d gamma weight).leadingCoeff = gamma 0 * weight d * 2 ^ d := by + simpa [hermiteCompanion] using leadingCoeff_hermiteJensenPolynomial (d := d) + (gamma := fun k => gamma k * weight (d - k)) (by simpa using mul_ne_zero hgamma hweight) + +/-- The factorial companion is exactly the finite sum with denominator `(d-k)!`. -/ +theorem hermiteFactorialPolynomial_eq_sum (d : ℕ) (gamma : ℕ → ℝ) : + hermiteFactorialPolynomial d gamma = + ∑ k ∈ Finset.range (d + 1), + C ((d.choose k : ℝ) * gamma k / (d - k).factorial) * hermitePhysicists (d - k) := by + simp only [hermiteFactorialPolynomial, hermiteCompanion, hermiteJensenPolynomial, + div_eq_mul_inv, mul_assoc] + +/-- Parameter one recovers the reciprocal-factorial companion. -/ +@[simp] theorem hermitePochhammerPolynomial_one (d : ℕ) (gamma : ℕ → ℝ) : + hermitePochhammerPolynomial d gamma 1 = hermiteFactorialPolynomial d gamma := by + simp [hermitePochhammerPolynomial, hermiteFactorialPolynomial, ascPochhammer_eval_one] + +/-- The reciprocal-factorial companion preserves splitting at a fixed degree. -/ +theorem hermiteFactorialPolynomial_splits {d : ℕ} {gamma : ℕ → ℝ} + (hp : (jensenPolynomial d gamma).Splits) : + (hermiteFactorialPolynomial d gamma).Splits := + hermiteCompanion_splits (isMultiplierSequence_inv_factorial.finite d) hp + +/-- A nonzero split Jensen input gives a factorial companion with simple real roots. -/ +theorem isSimpleRealRooted_hermiteFactorialPolynomial {d : ℕ} {gamma : ℕ → ℝ} + (hp : (jensenPolynomial d gamma).Splits) (hp0 : jensenPolynomial d gamma ≠ 0) : + IsSimpleRealRooted (hermiteFactorialPolynomial d gamma) := + isSimpleRealRooted_hermiteCompanion_of_nonzero + (isMultiplierSequence_inv_factorial.finite d) hp hp0 (fun k _ => by positivity) + +/-- Positive rising-factorial parameters give a finite splitting-preserving companion. -/ +theorem hermitePochhammerPolynomial_splits {d : ℕ} {gamma : ℕ → ℝ} {a : ℝ} + (ha : 0 < a) (hp : (jensenPolynomial d gamma).Splits) : + (hermitePochhammerPolynomial d gamma a).Splits := + hermiteCompanion_splits + ((isPFMultiplierSequence_iff_multiplierSequence_and_nonneg.mp + (isPFMultiplierSequence_inv_ascPochhammer ha)).1.finite d) hp + +/-- Positive rising-factorial parameters give simple roots for every nonzero split input. -/ +theorem isSimpleRealRooted_hermitePochhammerPolynomial {d : ℕ} {gamma : ℕ → ℝ} {a : ℝ} + (ha : 0 < a) (hp : (jensenPolynomial d gamma).Splits) + (hp0 : jensenPolynomial d gamma ≠ 0) : + IsSimpleRealRooted (hermitePochhammerPolynomial d gamma a) := + isSimpleRealRooted_hermiteCompanion_of_nonzero + ((isPFMultiplierSequence_iff_multiplierSequence_and_nonneg.mp + (isPFMultiplierSequence_inv_ascPochhammer ha)).1.finite d) hp hp0 + (fun k _ => inv_ne_zero (ascPochhammer_pos k a ha).ne') + +end RealRooted diff --git a/RealRooted/Hermite/ExponentialJensenFactor.lean b/RealRooted/Hermite/ExponentialJensenFactor.lean new file mode 100644 index 000000000..465d01188 --- /dev/null +++ b/RealRooted/Hermite/ExponentialJensenFactor.lean @@ -0,0 +1,103 @@ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs + +public import Mathlib.Analysis.CStarAlgebra.Classes + +public import RealRooted.MultiplierSequence + +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.Hermite.PoulainExponential + +/-! +# The exceptional exponential factor of Jensen polynomials + +For a polynomial symbol times `exp(a z)`, the Jensen polynomial of degree +bound `d ≥ deg q` has the factor `(1 + a X)^(d-deg q)` and an explicit residual +sum. The identity is algebraic: no real-rootedness or nonzero constant term +is needed. It is the factor formula in Craven–Csordas (1994), Proposition 4.1(2). +-/ + +public section + +open Polynomial Complex RealRooted.HermitePoulain + +namespace RealRooted + +/-- Translation commutes with every iterated formal derivative. -/ +private theorem iterate_derivative_comp_translate (p : ℝ[X]) (a : ℝ) (k : ℕ) : + (derivative^[k]) (p.comp (X + C a)) = ((derivative^[k]) p).comp (X + C a) := by + induction k with + | zero => rfl + | succ k ih => + rw [Function.iterate_succ_apply', ih, derivative_comp, derivative_X_add_C, + one_mul, Function.iterate_succ_apply'] + +/-- Reflection distributes over finite polynomial sums. -/ +private theorem reflect_finset_sum {ι : Type*} (s : Finset ι) (p : ι → ℝ[X]) (d : ℕ) : + reflect d (∑ k ∈ s, p k) = ∑ k ∈ s, reflect d (p k) := by + classical + induction s using Finset.induction_on with + | empty => simp + | @insert k s hk ih => simp only [Finset.sum_insert hk, reflect_add, ih] + +/-- Exact-degree reflection reverses each translated linear factor. -/ +private theorem reflect_translate_power (a : ℝ) (m : ℕ) : + reflect m ((X + C a) ^ m) = (1 + C a * X) ^ m := by + induction m with + | zero => simp + | succ m ih => + rw [pow_succ, reflect_mul _ _ (by simp) (by simp), ih] + simp [pow_succ] + +/-- A larger reflection bound contributes the extra power of the variable. -/ +private theorem reflect_translate_power_of_le (a : ℝ) {m d : ℕ} (hm : m ≤ d) : + reflect d ((X + C a) ^ m) = X ^ (d - m) * (1 + C a * X) ^ m := by + have he : d = (d - m) + m := by lia + rw [he] + conv_lhs => rw [← one_mul ((X + C a) ^ m)] + rw [reflect_mul _ _ (by simp) (by simp), reflect_one, reflect_translate_power] + congr 2 + lia + +/-- Reflecting the finite differential sum gives the unfactored Jensen expansion. -/ +private theorem jensen_polynomial_exp_sum (q : ℝ[X]) (a : ℝ) (d : ℕ) + (hd : q.natDegree ≤ d) : + jensenPolynomial d (fun k => + (iteratedDeriv k (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) 0).re) = + ∑ k ∈ Finset.range (q.natDegree + 1), + C (q.coeff k * (d.descFactorial k : ℝ)) * (X ^ k * (1 + C a * X) ^ (d - k)) := by + have h := taylor_polynomial_exp_eq_operator q (X ^ d) a + rw [taylorDifferentialOperator_X_pow] at h + have heq := congrArg (reflect d) h + rw [reflect_reflect, applyAsDifferentialOperator, reflect_finset_sum] at heq + rw [heq] + apply Finset.sum_congr rfl + intro k hk + have hkd : k ≤ d := (Nat.le_of_lt_succ (Finset.mem_range.mp hk)).trans hd + rw [iterate_derivative_comp_translate, iterate_derivative_X_pow_eq_C_mul, + mul_comp, C_comp, pow_comp, X_comp, ← mul_assoc, ← C_mul, + reflect_C_mul, reflect_translate_power_of_le a (Nat.sub_le _ _), + Nat.sub_sub_self hkd] + +/-- Exact exceptional factor formula for polynomial–exponential Jensen +polynomials. The descending factorial is `d! / (d-k)!` in this degree range. -/ +theorem jensen_polynomial_exp_factor (q : ℝ[X]) (a : ℝ) (d : ℕ) + (hd : q.natDegree ≤ d) : + jensenPolynomial d (fun k => + (iteratedDeriv k (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) 0).re) = + (1 + C a * X) ^ (d - q.natDegree) * + ∑ k ∈ Finset.range (q.natDegree + 1), + C (q.coeff k * (d.descFactorial k : ℝ)) * + (X ^ k * (1 + C a * X) ^ (q.natDegree - k)) := by + rw [jensen_polynomial_exp_sum q a d hd, Finset.mul_sum] + apply Finset.sum_congr rfl + intro k hk + have hkm : k ≤ q.natDegree := Nat.le_of_lt_succ (Finset.mem_range.mp hk) + have he : d - k = (d - q.natDegree) + (q.natDegree - k) := by lia + rw [he, pow_add] + ring + +end RealRooted diff --git a/RealRooted/Hermite/ExponentialJensenMultiplicity.lean b/RealRooted/Hermite/ExponentialJensenMultiplicity.lean new file mode 100644 index 000000000..f18b52f50 --- /dev/null +++ b/RealRooted/Hermite/ExponentialJensenMultiplicity.lean @@ -0,0 +1,95 @@ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs + +public import Mathlib.Analysis.CStarAlgebra.Classes + +public import RealRooted.MultiplierSequence + +public import RealRooted.SimpleRoots +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.Hermite.ExponentialJensenFactor +import RealRooted.Hermite.PoulainExponential + +/-! +# Exact multiplicity of the exceptional Jensen zero + +The explicit exponential factor has exactly the predicted multiplicity: +the residual sum does not vanish at `-1/a`. For a real-rooted polynomial +symbol nonzero at zero, this gives the exact simple-root degree range, +including the endpoint one degree beyond the symbol degree. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- At the exceptional point, only the leading-coefficient summand survives. -/ +private theorem eval_exponential_jensen_residual (q : ℝ[X]) {a : ℝ} (ha : a ≠ 0) (d : ℕ) : + (∑ k ∈ Finset.range (q.natDegree + 1), + C (q.coeff k * (d.descFactorial k : ℝ)) * + (X ^ k * (1 + C a * X) ^ (q.natDegree - k))).eval (-a⁻¹) = + q.leadingCoeff * (d.descFactorial q.natDegree : ℝ) * (-a⁻¹) ^ q.natDegree := by + have hz : 1 + a * (-a⁻¹) = 0 := by simp [ha] + rw [eval_finsetSum, Finset.sum_eq_single q.natDegree] + · simp only [eval_mul, eval_C, eval_pow, eval_X, + Nat.sub_self, pow_zero, mul_one, coeff_natDegree] + · intro k hk hkm + have hlt : k < q.natDegree := by + have := Finset.mem_range.mp hk + lia + have hn : q.natDegree - k ≠ 0 := by lia + simp only [eval_mul, eval_C, eval_pow, eval_X, eval_add, eval_one, + hz, zero_pow hn, mul_zero] + · simp + +/-- The exceptional Jensen zero has exactly multiplicity `d - deg q`. +Neither real-rootedness nor a nonzero constant coefficient is required here. -/ +theorem rootMultiplicity_jensen_polynomial_exp {q : ℝ[X]} (hq0 : q ≠ 0) + {a : ℝ} (ha : a ≠ 0) (d : ℕ) (hd : q.natDegree ≤ d) : + (jensenPolynomial d (fun k => + (iteratedDeriv k + (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) 0).re)).rootMultiplicity + (-a⁻¹) = d - q.natDegree := by + let R : ℝ[X] := ∑ k ∈ Finset.range (q.natDegree + 1), + C (q.coeff k * (d.descFactorial k : ℝ)) * + (X ^ k * (1 + C a * X) ^ (q.natDegree - k)) + have hRval : R.eval (-a⁻¹) ≠ 0 := by + rw [show R.eval (-a⁻¹) = _ from eval_exponential_jensen_residual q ha d] + exact mul_ne_zero (mul_ne_zero (leadingCoeff_ne_zero.mpr hq0) + (by exact_mod_cast (Nat.descFactorial_pos.mpr hd).ne')) + (pow_ne_zero _ (neg_ne_zero.mpr (inv_ne_zero ha))) + have hR : R ≠ 0 := by intro hz; exact hRval (by simp [hz]) + have hlinear : (1 + C a * X : ℝ[X]) = C a * (X - C (-a⁻¹)) := by + rw [mul_sub, ← C_mul] + simp [ha, add_comm] + rw [jensen_polynomial_exp_factor q a d hd] + change ((1 + C a * X) ^ (d - q.natDegree) * R).rootMultiplicity (-a⁻¹) = _ + rw [hlinear, mul_pow, ← C_pow, mul_assoc, + rootMultiplicity_C_mul (pow_ne_zero _ ha), mul_comm _ R, + rootMultiplicity_mul_X_sub_C_pow hR, rootMultiplicity_eq_zero hRval, zero_add] + +/-- For a nonzero real exponential slope, the simple-root degree range is +exactly `d ≤ deg q + 1`, strengthening the range stated in Proposition 4.1(2). -/ +theorem simple_jensen_polynomial_exp_iff_degree {q : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) {a : ℝ} (ha : a ≠ 0) (d : ℕ) : + IsSimpleRealRooted (jensenPolynomial d (fun k => + (iteratedDeriv k (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) 0).re)) ↔ + d ≤ q.natDegree + 1 := by + constructor + · intro hs + by_contra hnot + have hd : q.natDegree ≤ d := by lia + have hqne : q ≠ 0 := by intro hz; simp [hz] at hq0 + have hm := rootMultiplicity_jensen_polynomial_exp hqne ha d hd + have hroot : (jensenPolynomial d (fun k => + (iteratedDeriv k (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) 0).re)).IsRoot + (-a⁻¹) := (rootMultiplicity_pos hs.1).mp (by rw [hm]; lia) + have hsimp := hs.2.2 _ hroot + lia + · intro hd + exact simple_jensen_polynomial_exp_of_degree hq hq0 a d (by lia) + +end RealRooted diff --git a/RealRooted/Hermite/FiniteTransfer.lean b/RealRooted/Hermite/FiniteTransfer.lean new file mode 100644 index 000000000..1ea67c11a --- /dev/null +++ b/RealRooted/Hermite/FiniteTransfer.lean @@ -0,0 +1,187 @@ +module + +public import RealRooted.Hermite.Jensen +public import RealRooted.SimpleRoots +public import RealRooted.Mathlib.Algebra.Polynomial.BasisTransform +import RealRooted.BasisTransform.Hermite +import RealRooted.Mathlib.Algebra.Polynomial.Reverse +import RealRooted.Mathlib.Algebra.Polynomial.Chow +import RealRooted.Mathlib.Algebra.Polynomial.Derivative + +/-! +# Finite Jensen-to-Hermite transfer + +At each fixed degree, splitting of a Jensen polynomial implies splitting of +its Hermite version. A nonzero input gives simple real roots, even if the +Jensen polynomial has repeated roots. No entire-function hypothesis is needed. +The splitting implications are Corollaries 3.7 and 3.8 of Cormac O'Sullivan, +*Zeros of Jensen polynomials and asymptotics for the Riemann xi function*, +https://arxiv.org/abs/2007.13582. The simple-root statements strengthen them. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Differentiation lowers the physicists' Hermite index with factor `2n`. -/ +theorem derivative_hermitePhysicists (n : ℕ) : + (hermitePhysicists (n + 1)).derivative = C (2 * (n + 1 : ℝ)) * hermitePhysicists n := by + induction n using Nat.twoStepInduction with + | zero => simp [map_ofNat] + | one => simp [hermitePhysicists_add_two, map_ofNat]; ring + | more n ih ih' => + rw [show n + 2 + 1 = (n + 1) + 2 by lia, hermitePhysicists_add_two] + simp only [derivative_sub, derivative_mul, derivative_ofNat, derivative_X, + derivative_C, zero_mul, mul_one, zero_add] + rw [show n + 1 + 1 = n + 2 by lia, ih', ih] + rw [hermitePhysicists_add_two] + simp only [map_mul, map_add, map_natCast, map_ofNat, map_one] + push_cast + ring + +/-- The physicists' Hermite raising operator is `2X - d/dX`. -/ +theorem hermitePhysicists_succ_derivative (n : ℕ) : + hermitePhysicists (n + 1) = + (C 2 * X + C 0) * hermitePhysicists n + C (-1) * (hermitePhysicists n).derivative := by + cases n with + | zero => simp [map_ofNat] + | succ n => + rw [derivative_hermitePhysicists, hermitePhysicists_add_two] + simp [map_ofNat, sub_eq_add_neg] + +/-- The raising recurrence determines both degree and leading coefficient. -/ +private theorem hermitePhysicists_degree_and_leadingCoeff (n : ℕ) : + (hermitePhysicists n).natDegree = n ∧ (hermitePhysicists n).leadingCoeff = 2 ^ n := by + induction n with + | zero => simp + | succ n ih => + have h := natDegree_and_leadingCoeff_quadratic_derivative_add_linear_mul_add + (hermitePhysicists n) (C (-1) * (hermitePhysicists n).derivative) 0 0 0 2 + ((natDegree_C_mul_le _ _).trans + ((natDegree_derivative_le _).trans (Nat.sub_le _ _))) + (by simp [ih.2]) + have heq : C 2 * X * hermitePhysicists n + + C (-1) * (hermitePhysicists n).derivative = hermitePhysicists (n + 1) := by + rw [hermitePhysicists_succ_derivative] + simp + simp only [map_zero, zero_mul, zero_add, heq] at h + simpa [ih.1, ih.2, pow_succ, mul_comm] using h + +/-- The physicists' Hermite polynomial has its index as degree. -/ +theorem natDegree_hermitePhysicists (n : ℕ) : + (hermitePhysicists n).natDegree = n := + (hermitePhysicists_degree_and_leadingCoeff n).1 + +/-- The physicists' Hermite normalization has leading coefficient `2^n`. -/ +theorem leadingCoeff_hermitePhysicists (n : ℕ) : + (hermitePhysicists n).leadingCoeff = 2 ^ n := + (hermitePhysicists_degree_and_leadingCoeff n).2 + +/-- The Hermite convolution never exceeds its specified degree. -/ +theorem natDegree_hermiteJensenPolynomial_le (d : ℕ) (gamma : ℕ → ℝ) : + (hermiteJensenPolynomial d gamma).natDegree ≤ d := by + apply natDegree_sum_le_of_forall_le + intro k _ + exact (natDegree_C_mul_le _ _).trans + ((natDegree_hermitePhysicists (d - k)).le.trans (Nat.sub_le _ _)) + +/-- The top coefficient depends on `gamma 0`, rather than on `gamma d`. -/ +theorem coeff_hermiteJensenPolynomial_self (d : ℕ) (gamma : ℕ → ℝ) : + (hermiteJensenPolynomial d gamma).coeff d = gamma 0 * 2 ^ d := by + classical + rw [hermiteJensenPolynomial, finsetSum_coeff, Finset.sum_eq_single 0] + · simp only [coeff_C_mul, Nat.choose_zero_right, Nat.cast_one, one_mul, Nat.sub_zero] + have hcoeff := coeff_natDegree (p := hermitePhysicists d) + rw [natDegree_hermitePhysicists, leadingCoeff_hermitePhysicists] at hcoeff + rw [hcoeff] + · intro k hmem hk + have hkd : k ≤ d := Nat.lt_succ_iff.mp (Finset.mem_range.mp hmem) + rw [coeff_C_mul, coeff_eq_zero_of_natDegree_lt, mul_zero] + rw [natDegree_hermitePhysicists] + lia + · simp + +/-- A nonzero zeroth coefficient makes the Hermite convolution degree exact. -/ +theorem natDegree_hermiteJensenPolynomial {d : ℕ} {gamma : ℕ → ℝ} + (hgamma : gamma 0 ≠ 0) : (hermiteJensenPolynomial d gamma).natDegree = d := + natDegree_eq_of_le_of_coeff_ne_zero (natDegree_hermiteJensenPolynomial_le d gamma) + (by rw [coeff_hermiteJensenPolynomial_self]; exact mul_ne_zero hgamma (by positivity)) + +/-- The leading coefficient of a degree-exact Hermite convolution. -/ +theorem leadingCoeff_hermiteJensenPolynomial {d : ℕ} {gamma : ℕ → ℝ} + (hgamma : gamma 0 ≠ 0) : + (hermiteJensenPolynomial d gamma).leadingCoeff = gamma 0 * 2 ^ d := by + rw [← coeff_natDegree, natDegree_hermiteJensenPolynomial hgamma, + coeff_hermiteJensenPolynomial_self] + +/-- Replacing monomials by physicists' Hermite polynomials strictly +regularizes every nonzero real-rooted polynomial. -/ +theorem isSimpleRealRooted_hermiteBasisTransform {p : ℝ[X]} + (hp : p.Splits) (hp0 : p ≠ 0) : + IsSimpleRealRooted (basisTransform hermitePhysicists p) := + isSimpleRealRooted_basisTransform_of_raising hermitePhysicists_zero + (by norm_num) (by norm_num) hermitePhysicists_succ_derivative hp hp0 + +/-- Replacing monomials by physicists' Hermite polynomials preserves +real-rootedness, including zero. -/ +theorem splits_hermiteBasisTransform {p : ℝ[X]} (hp : p.Splits) : + (basisTransform hermitePhysicists p).Splits := + splits_basisTransform_of_raising hermitePhysicists_zero + (by norm_num) (by norm_num) hermitePhysicists_succ_derivative hp + +/-- The Hermite basis transform preserves the degree of every nonzero input, +without a real-rootedness assumption. -/ +theorem natDegree_hermiteBasisTransform {p : ℝ[X]} (hp : p ≠ 0) : + (basisTransform hermitePhysicists p).natDegree = p.natDegree := + basisTransform_natDegree_eq natDegree_hermitePhysicists + (fun n => leadingCoeff_ne_zero.mp (by rw [leadingCoeff_hermitePhysicists]; positivity)) hp + +/-- The finite Hermite convolution is the Hermite basis transform of the +degree-reflected Jensen polynomial. -/ +theorem hermiteJensenPolynomial_eq_basisTransform (d : ℕ) (gamma : ℕ → ℝ) : + hermiteJensenPolynomial d gamma = + basisTransform hermitePhysicists (reflect d (jensenPolynomial d gamma)) := by + classical + simp only [jensenPolynomial, ← C_mul_X_pow_eq_monomial, reflect_finset_sum_C_mul, + reflect_monomial, basisTransform_finset_sum, basisTransform_C_mul_X_pow, + hermiteJensenPolynomial] + apply Finset.sum_congr rfl + intro k hk + rw [revAt_le (by simpa using hk)] + +/-- O'Sullivan's finite-degree implication requires only the corresponding +Jensen polynomial to split. -/ +theorem hermiteJensenPolynomial_splits_of_jensenPolynomial_splits + {d : ℕ} {gamma : ℕ → ℝ} (hp : (jensenPolynomial d gamma).Splits) : + (hermiteJensenPolynomial d gamma).Splits := by + rw [hermiteJensenPolynomial_eq_basisTransform] + exact splits_hermiteBasisTransform + ((splits_reflect_iff (natDegree_jensenPolynomial_le d gamma)).mpr hp) + +/-- A nonzero split Jensen polynomial yields a Hermite polynomial with simple +real roots. No simplicity hypothesis is imposed on the Jensen polynomial. -/ +theorem isSimpleRealRooted_hermiteJensenPolynomial + {d : ℕ} {gamma : ℕ → ℝ} (hp : (jensenPolynomial d gamma).Splits) + (hp0 : jensenPolynomial d gamma ≠ 0) : + IsSimpleRealRooted (hermiteJensenPolynomial d gamma) := by + rw [hermiteJensenPolynomial_eq_basisTransform] + exact isSimpleRealRooted_hermiteBasisTransform + ((splits_reflect_iff (natDegree_jensenPolynomial_le d gamma)).mpr hp) + (fun h => hp0 (reflect_eq_zero_iff.mp h)) + +/-- Nonvanishing of the zeroth Taylor coefficient supplies the nonzero +hypothesis in the finite Hermite simplicity theorem. -/ +theorem isSimpleRealRooted_hermiteJensenPolynomial_of_coeff_zero + {d : ℕ} {gamma : ℕ → ℝ} (hp : (jensenPolynomial d gamma).Splits) + (hgamma : gamma 0 ≠ 0) : + IsSimpleRealRooted (hermiteJensenPolynomial d gamma) := by + apply isSimpleRealRooted_hermiteJensenPolynomial hp + intro hz + have h := congrArg (fun p : ℝ[X] => p.coeff 0) hz + simp only [coeff_jensenPolynomial, Nat.zero_le, ite_true, Nat.choose_zero_right, + Nat.cast_one, one_mul, coeff_zero] at h + exact hgamma h + +end RealRooted diff --git a/RealRooted/Hermite/FormalDifferential/Basic.lean b/RealRooted/Hermite/FormalDifferential/Basic.lean new file mode 100644 index 000000000..02f8bdbef --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/Basic.lean @@ -0,0 +1,78 @@ +module + +public import RealRooted.Hermite.Poulain +public import Mathlib.RingTheory.PowerSeries.Trunc + +/-! +# Formal differential symbols on real polynomials + +Only finitely many coefficients of a formal symbol act on any polynomial. +This interface includes symbols with zero radius of convergence, as in +Kim--Kim (2015), without using totalized analytic derivative series. +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- The finite action of a real formal power series on a polynomial. -/ +@[expose] noncomputable def formalDifferentialOperator + (φ : PowerSeries ℝ) (P : ℝ[X]) : ℝ[X] := + applyAsDifferentialOperator (φ.trunc (P.natDegree + 1)) P + +/-- The action is the finite sum of ordinary symbol coefficients times derivatives. -/ +theorem formalDifferentialOperator_eq_sum (φ : PowerSeries ℝ) (P : ℝ[X]) : + formalDifferentialOperator φ P = + ∑ k ∈ Finset.range (P.natDegree + 1), + C (PowerSeries.coeff k φ) * (derivative^[k]) P := by + rw [formalDifferentialOperator, applyAsDifferentialOperator_eq_sum_range_right] + apply Finset.sum_congr rfl + intro k hk + rw [PowerSeries.coeff_trunc, ite_eq_left (Finset.mem_range.mp hk)] + +/-- Any polynomial symbol with the required initial coefficients gives the same action. -/ +theorem formalDifferentialOperator_eq_applyAsDifferentialOperator + (φ : PowerSeries ℝ) (f P : ℝ[X]) + (h : ∀ k ≤ P.natDegree, PowerSeries.coeff k φ = f.coeff k) : + formalDifferentialOperator φ P = applyAsDifferentialOperator f P := by + rw [formalDifferentialOperator_eq_sum, applyAsDifferentialOperator_eq_sum_range_right] + apply Finset.sum_congr rfl + intro k hk + rw [h k (Nat.lt_succ_iff.mp (Finset.mem_range.mp hk))] + +/-- A formal symbol coming from a polynomial agrees with the finite operator. -/ +theorem formalDifferentialOperator_coe (f P : ℝ[X]) : + formalDifferentialOperator (f : PowerSeries ℝ) P = applyAsDifferentialOperator f P := by + apply formalDifferentialOperator_eq_applyAsDifferentialOperator + intro k _ + exact Polynomial.coeff_coe f k + +/-- Truncating beyond the input degree does not change the formal differential action. -/ +theorem formalDifferentialOperator_eq_trunc (φ : PowerSeries ℝ) (P : ℝ[X]) + {N : ℕ} (hN : P.natDegree < N) : + formalDifferentialOperator φ P = applyAsDifferentialOperator (φ.trunc N) P := by + apply formalDifferentialOperator_eq_applyAsDifferentialOperator + intro k hk + rw [PowerSeries.coeff_trunc, ite_eq_left (hk.trans_lt hN)] + +/-- A formal differential symbol never raises polynomial degree. -/ +theorem natDegree_formalDifferentialOperator_le (φ : PowerSeries ℝ) (P : ℝ[X]) : + (formalDifferentialOperator φ P).natDegree ≤ P.natDegree := + natDegree_applyAsDifferentialOperator_le _ _ + +/-- A scalar factor in the formal symbol multiplies its output by that scalar. -/ +theorem formalDifferentialOperator_C_mul (a : ℝ) (φ : PowerSeries ℝ) (P : ℝ[X]) : + formalDifferentialOperator (PowerSeries.C a * φ) P = + C a * formalDifferentialOperator φ P := by + rw [formalDifferentialOperator, PowerSeries.trunc_C_mul, + applyAsDifferentialOperator_C_mul] + rfl + +/-- The constant formal symbol one is the identity operator. -/ +@[simp] theorem formalDifferentialOperator_one (P : ℝ[X]) : + formalDifferentialOperator 1 P = P := by + simpa using formalDifferentialOperator_coe 1 P + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/CenteredLimit.lean b/RealRooted/Hermite/FormalDifferential/CenteredLimit.lean new file mode 100644 index 000000000..731517d89 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/CenteredLimit.lean @@ -0,0 +1,49 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Hermite.FormalDifferential.OperatorLimits +import RealRooted.Mathlib.RingTheory.PowerSeries.RescaledPowerLimit +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics + +/-! +# The centered finite-input limit + +After rescaling a centered symbol and the roots of a fixed polynomial, the +iterated differential action tends coefficientwise to the exponential of +the first possible differential term acting on the leading monomial. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted.HermitePoulain + +/-- Shrinking input roots and rescaling a centered formal symbol give the +generalized exponential differential limit. The input may be zero or constant. -/ +theorem tendsto_coeff_centered_formalDifferentialOperator + (ψ : PowerSeries ℝ) {p : ℕ} (hp : 0 < p) (P : ℝ[X]) (j : ℕ) : + Tendsto (fun m : ℕ ↦ (formalDifferentialOperator + ((PowerSeries.rescale ((m : ℝ) ^ (-(p : ℝ)⁻¹)) + (1 + PowerSeries.X ^ p * ψ)) ^ m) + (P.scaleRoots ((m : ℝ) ^ (-(p : ℝ)⁻¹)))).coeff j) atTop + (𝓝 ((formalDifferentialOperator + (PowerSeries.expand p hp.ne' + (PowerSeries.rescale (PowerSeries.constantCoeff ψ) (PowerSeries.exp ℝ))) + (P.scaleRoots 0)).coeff j)) := by + have hpR : 0 < (p : ℝ) := by exact_mod_cast hp + have hr : Tendsto (fun m : ℕ ↦ (m : ℝ) ^ (-(p : ℝ)⁻¹)) atTop (𝓝 0) := + (tendsto_rpow_neg_atTop (inv_pos.mpr hpR)).comp tendsto_natCast_atTop_atTop + apply tendsto_coeff_formalDifferentialOperator (N := P.natDegree) + · intro m + exact le_of_eq (natDegree_scaleRoots P _) + · exact le_of_eq (natDegree_scaleRoots P 0) + · exact PowerSeries.tendsto_coeff_rescale_pow_exp ψ hp + · intro k + simpa only [coeff_scaleRoots] using + (tendsto_const_nhds.mul (hr.pow (P.natDegree - k))) + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/Composition.lean b/RealRooted/Hermite/FormalDifferential/Composition.lean new file mode 100644 index 000000000..779edf5fe --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/Composition.lean @@ -0,0 +1,66 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic + +/-! +# Composition and iteration of formal differential symbols + +Finite input degree permits exact multiplication of formal symbols. In +particular a zero constant coefficient annihilates every polynomial after +more iterations than its degree, including symbols with no analytic sum. +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- Formal differential symbols compose by multiplication on polynomial inputs. -/ +theorem formalDifferentialOperator_mul (φ ψ : PowerSeries ℝ) (P : ℝ[X]) : + formalDifferentialOperator (φ * ψ) P = + formalDifferentialOperator φ (formalDifferentialOperator ψ P) := by + let N := P.natDegree + 1 + have hN : P.natDegree < N := Nat.lt_succ_self _ + have hD : (formalDifferentialOperator ψ P).natDegree < N := + (natDegree_formalDifferentialOperator_le ψ P).trans_lt hN + calc + formalDifferentialOperator (φ * ψ) P = + applyAsDifferentialOperator (φ.trunc N * ψ.trunc N) P := by + apply formalDifferentialOperator_eq_applyAsDifferentialOperator + intro k hk + have h := PowerSeries.coeff_mul_eq_coeff_trunc_mul_trunc φ ψ (hk.trans_lt hN) + simpa only [← Polynomial.coe_mul, Polynomial.coeff_coe] using h + _ = applyAsDifferentialOperator (φ.trunc N) + (applyAsDifferentialOperator (ψ.trunc N) P) := + applyAsDifferentialOperator_mul _ _ _ + _ = formalDifferentialOperator φ (formalDifferentialOperator ψ P) := by + rw [formalDifferentialOperator_eq_trunc φ _ hD, + formalDifferentialOperator_eq_trunc ψ P hN] + +/-- Powers of a formal symbol are the corresponding iterated operators. -/ +theorem formalDifferentialOperator_pow (φ : PowerSeries ℝ) (m : ℕ) (P : ℝ[X]) : + formalDifferentialOperator (φ ^ m) P = (formalDifferentialOperator φ)^[m] P := by + induction m with + | zero => simp + | succ m ih => + rw [pow_succ', formalDifferentialOperator_mul, ih, Function.iterate_succ_apply'] + +/-- A zero constant symbol annihilates every polynomial after more than its degree +many iterates. This includes the identically zero symbol and input. -/ +theorem iterate_formalDifferentialOperator_eq_zero + {φ : PowerSeries ℝ} (h0 : PowerSeries.constantCoeff φ = 0) + (P : ℝ[X]) {m : ℕ} (hm : P.natDegree < m) : + (formalDifferentialOperator φ)^[m] P = 0 := by + have hdiv : (PowerSeries.X : PowerSeries ℝ) ^ m ∣ φ ^ m := + pow_dvd_pow_of_dvd ((PowerSeries.X_dvd_iff).mpr h0) m + have hcoeff := PowerSeries.X_pow_dvd_iff.mp hdiv + rw [← formalDifferentialOperator_pow] + calc + formalDifferentialOperator (φ ^ m) P = applyAsDifferentialOperator 0 P := by + apply formalDifferentialOperator_eq_applyAsDifferentialOperator + intro k hk + simpa using hcoeff k (hk.trans_lt hm) + _ = 0 := by simp [applyAsDifferentialOperator] + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/Covariance.lean b/RealRooted/Hermite/FormalDifferential/Covariance.lean new file mode 100644 index 000000000..b2beea209 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/Covariance.lean @@ -0,0 +1,46 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.Polynomial.ScaleRoots +import RealRooted.Hermite.FormalDifferential.OperatorLimits +import RealRooted.Hermite.FormalDifferential.Structure +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Root scaling covariance of formal differential operators + +The constant coefficient hypothesis prevents a change of degree. The root +scale itself may be zero; this endpoint records leading coefficient preservation. +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- Rescaling the roots of a differential image rescales the formal symbol +by the same factor. The scale zero is included. -/ +theorem scaleRoots_formalDifferentialOperator {φ : PowerSeries ℝ} + (hφ : PowerSeries.constantCoeff φ ≠ 0) (P : ℝ[X]) (r : ℝ) : + (formalDifferentialOperator φ P).scaleRoots r = + formalDifferentialOperator (PowerSeries.rescale r φ) (P.scaleRoots r) := by + by_cases hP : P = 0 + · simp [hP] + ext j + rw [coeff_scaleRoots, natDegree_formalDifferentialOperator hφ hP, + coeff_formalDifferentialOperator_of_natDegree_le φ le_rfl, + coeff_formalDifferentialOperator_of_natDegree_le _ + (le_of_eq (natDegree_scaleRoots P r)), Finset.sum_mul] + apply Finset.sum_congr rfl + intro k _ + rw [PowerSeries.coeff_rescale, coeff_scaleRoots] + by_cases hjk : j + k ≤ P.natDegree + · have hexp : k + (P.natDegree - (j + k)) = P.natDegree - j := by lia + rw [← hexp, pow_add] + ring + · rw [coeff_eq_zero_of_natDegree_lt (Nat.lt_of_not_ge hjk)] + ring + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/Derivative.lean b/RealRooted/Hermite/FormalDifferential/Derivative.lean new file mode 100644 index 000000000..05bdab87b --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/Derivative.lean @@ -0,0 +1,34 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +import RealRooted.Hermite.FormalDifferential.Composition + +/-! +# Derivative commutation for formal polynomial operators +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- A monomial formal symbol acts by the corresponding iterated derivative. -/ +theorem formalDifferentialOperator_X_pow (n : ℕ) (P : ℝ[X]) : + formalDifferentialOperator (PowerSeries.X ^ n) P = (derivative^[n]) P := by + have hcoe : (PowerSeries.X ^ n : PowerSeries ℝ) = ((X ^ n : ℝ[X]) : PowerSeries ℝ) := by + simp + rw [hcoe, formalDifferentialOperator_coe] + simpa only [mul_one, applyAsDifferentialOperator_one] using + applyAsDifferentialOperator_X_pow_mul n 1 P + +/-- All iterated polynomial derivatives commute with a formal differential operator. -/ +theorem iterate_derivative_formalDifferentialOperator + (φ : PowerSeries ℝ) (P : ℝ[X]) (n : ℕ) : + (derivative^[n]) (formalDifferentialOperator φ P) = + formalDifferentialOperator φ ((derivative^[n]) P) := by + rw [← formalDifferentialOperator_X_pow, ← formalDifferentialOperator_mul, + mul_comm (PowerSeries.X ^ n) φ, formalDifferentialOperator_mul, + formalDifferentialOperator_X_pow] + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/ExpandOperator.lean b/RealRooted/Hermite/FormalDifferential/ExpandOperator.lean new file mode 100644 index 000000000..2a843319e --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/ExpandOperator.lean @@ -0,0 +1,43 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand + +/-! +# Expanded formal symbols and derivative strides +-/ + +public section + +open Polynomial Finset + +namespace RealRooted.HermitePoulain + +/-- Expanding a formal symbol by `X^p` restricts its polynomial action to +derivatives of orders divisible by the positive stride. -/ +theorem formalDifferentialOperator_expand_eq_sum + (φ : PowerSeries ℝ) {p : ℕ} (hp : 0 < p) (P : ℝ[X]) : + formalDifferentialOperator (PowerSeries.expand p hp.ne' φ) P = + ∑ k ∈ range (P.natDegree / p + 1), + C (PowerSeries.coeff k φ) * (derivative^[p * k]) P := by + rw [formalDifferentialOperator_eq_sum] + simp_rw [PowerSeries.coeff_expand, apply_ite, map_zero, ite_mul, zero_mul] + rw [← sum_filter] + symm + apply sum_bij (fun k _ ↦ p * k) + · intro k hk + simp only [mem_filter, mem_range] + refine ⟨?_, dvd_mul_right p k⟩ + have hk' : k ≤ P.natDegree / p := Nat.le_of_lt_succ (mem_range.mp hk) + exact Nat.lt_succ_of_le ((Nat.mul_le_mul_left p hk').trans + (Nat.mul_div_le P.natDegree p)) + · intro k hk j hj hkj + exact Nat.eq_of_mul_eq_mul_left hp hkj + · intro j hj + obtain ⟨hjr, hjd⟩ := mem_filter.mp hj + refine ⟨j / p, mem_range.mpr ?_, Nat.mul_div_cancel' hjd⟩ + exact Nat.lt_succ_of_le (Nat.div_le_div_right (Nat.le_of_lt_succ (mem_range.mp hjr))) + · intro k _ + rw [Nat.mul_div_cancel_left k hp] + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/Exponential.lean b/RealRooted/Hermite/FormalDifferential/Exponential.lean new file mode 100644 index 000000000..09c227928 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/Exponential.lean @@ -0,0 +1,71 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.Hermite.FormalDifferential.Taylor +import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient +import RealRooted.Hermite.GaussianOperator +import RealRooted.Hermite.GaussianCoefficients +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.Algebra.Ring.Parity +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Formal exponential symbols and the checked Taylor operators + +The linear formal exponential translates polynomial inputs. The quadratic +formal exponential agrees exactly with the Gaussian Taylor operator. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted.HermitePoulain + +/-- A linear formal exponential acts by translation. -/ +theorem formalDifferentialOperator_exp_linear (a : ℝ) (P : ℝ[X]) : + formalDifferentialOperator (PowerSeries.rescale a (PowerSeries.exp ℝ)) P = + P.comp (X + C a) := by + rw [formalDifferentialOperator_eq_taylor _ (fun z ↦ Complex.exp ((a : ℂ) * z))] + · exact taylor_exp_linear_eq_comp a P + · intro k + rw [PowerSeries.coeff_rescale_exp] + simp only [iteratedDeriv_cexp_const_mul, mul_zero, exp_zero, mul_one, + ← ofReal_pow, ← ofReal_natCast, ← ofReal_div, ofReal_re] + +/-- The Gaussian formal coefficient is the actual ordinary Taylor coefficient. -/ +private theorem coeff_exp_quadratic (s : ℝ) (k : ℕ) : + PowerSeries.coeff k (PowerSeries.expand 2 (by decide) + (PowerSeries.rescale s (PowerSeries.exp ℝ))) = + (iteratedDeriv k (fun z : ℂ ↦ Complex.exp ((s : ℂ) * z ^ 2)) 0 / k.factorial).re := by + obtain ⟨n, rfl | rfl⟩ := Nat.even_or_odd' k + · rw [PowerSeries.coeff_expand_mul, PowerSeries.coeff_rescale_exp, + iteratedDeriv_exp_mul_sq_zero_even] + have hfac : ((2 * n).factorial : ℂ) ≠ 0 := by exact_mod_cast (2 * n).factorial_ne_zero + have heq : (((2 * n).factorial : ℂ) * (s : ℂ) ^ n / n.factorial) / + (2 * n).factorial = ((s : ℂ) ^ n / n.factorial) := by + field_simp [hfac] + rw [heq] + simp only [← ofReal_pow, ← ofReal_natCast, ← ofReal_div, ofReal_re] + · have hn : ¬ 2 ∣ 2 * n + 1 := by + rintro ⟨j, hj⟩ + lia + rw [PowerSeries.coeff_expand_of_not_dvd _ _ _ hn, + iteratedDeriv_exp_mul_sq_zero_odd] + simp + +/-- The quadratic formal exponential agrees with the actual Gaussian Taylor operator. -/ +theorem formalDifferentialOperator_exp_quadratic (s : ℝ) (P : ℝ[X]) : + formalDifferentialOperator (PowerSeries.expand 2 (by decide) + (PowerSeries.rescale s (PowerSeries.exp ℝ))) P = + taylorDifferentialOperator (fun z ↦ Complex.exp ((s : ℂ) * z ^ 2)) P := + formalDifferentialOperator_eq_taylor _ _ (coeff_exp_quadratic s) P + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/ExponentialMonomial.lean b/RealRooted/Hermite/FormalDifferential/ExponentialMonomial.lean new file mode 100644 index 000000000..27d91fbab --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/ExponentialMonomial.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum + +/-! +# The first nontrivial monomial image of an expanded exponential +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- In input degree equal to the stride, only the constant and first +nonconstant coefficients of the expanded exponential act. -/ +theorem formalDifferentialOperator_exp_stride_X_pow + (β : ℝ) {p : ℕ} (hp : 0 < p) : + formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) (X ^ p) = + X ^ p + C (β * (p.factorial : ℝ)) := by + have hcoeff : ∀ k ≤ (X ^ p : ℝ[X]).natDegree, + PowerSeries.coeff k + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) = + (1 + C β * X ^ p : ℝ[X]).coeff k := by + intro k hk + rw [natDegree_X_pow] at hk + by_cases hk0 : k = 0 + · subst k + simp [PowerSeries.coeff_expand, hp.ne] + · by_cases hkp : k = p + · subst k + simp [PowerSeries.coeff_expand, Nat.div_self hp, coeff_one, hp.ne'] + · have hnd : ¬ p ∣ k := by + intro h + have hpk := Nat.le_of_dvd (Nat.pos_of_ne_zero hk0) h + lia + rw [PowerSeries.coeff_expand_of_not_dvd _ _ _ hnd] + simp [coeff_C_mul, coeff_X_pow, coeff_one, hk0, hkp] + rw [formalDifferentialOperator_eq_applyAsDifferentialOperator _ _ _ hcoeff, + applyAsDifferentialOperator_add, applyAsDifferentialOperator_one, + applyAsDifferentialOperator_C_mul] + have hpower : applyAsDifferentialOperator (X ^ p) (X ^ p) = C (p.factorial : ℝ) := by + have h := applyAsDifferentialOperator_X_pow_mul p 1 (X ^ p) + simpa only [mul_one, applyAsDifferentialOperator_one, + iterate_derivative_X_pow_eq_C_mul, Nat.descFactorial_self, Nat.sub_self, + pow_zero, mul_one] using h + rw [hpower, ← C_mul] + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/LocallyUniformIterates.lean b/RealRooted/Hermite/FormalDifferential/LocallyUniformIterates.lean new file mode 100644 index 000000000..e6764f216 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/LocallyUniformIterates.lean @@ -0,0 +1,53 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Hermite.FormalDifferential.RescaledIterates +import RealRooted.Mathlib.Analysis.Polynomial.LocallyUniformLimit +import RealRooted.Hermite.FormalDifferential.Composition +import Mathlib.Analysis.Complex.Polynomial.Basic + +/-! +# Locally uniform centered limits of formal polynomial iterates + +The finite polynomial limit in Kim--Kim (2015), Theorem 2.1, is locally +uniform on the whole complex plane. This is a finite-degree statement; +the original formal symbol need not define an analytic function. +-/ + +public section + +open Polynomial Filter + +namespace RealRooted.HermitePoulain + +/-- Centered root-scaled iterates converge locally uniformly to the finite +exponential differential image of the input's leading monomial. -/ +theorem tendstoLocallyUniformly_rescaled_iterate + {φ : PowerSeries ℝ} (a : ℝ) {p : ℕ} (hp : 0 < p) + (hjet : ∀ k < p, PowerSeries.coeff k φ = a ^ k / (k.factorial : ℝ)) + (P : ℝ[X]) : + TendstoLocallyUniformly + (fun m : ℕ ↦ fun z : ℂ ↦ + (((((formalDifferentialOperator φ)^[m] P).comp (X + C (-(m : ℝ) * a))).scaleRoots + ((m : ℝ) ^ (-(p : ℝ)⁻¹))).map Complex.ofRealHom).eval z) + (fun z : ℂ ↦ ((formalDifferentialOperator + (PowerSeries.expand p hp.ne' + (PowerSeries.rescale (PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) + (PowerSeries.exp ℝ))) (P.scaleRoots 0)).map Complex.ofRealHom).eval z) atTop := by + apply tendstoLocallyUniformly_eval_of_coeff_tendsto (N := P.natDegree) + · intro m + rw [natDegree_map, natDegree_scaleRoots, natDegree_comp, + natDegree_X_add_C, mul_one, ← formalDifferentialOperator_pow] + exact natDegree_formalDifferentialOperator_le _ _ + · rw [natDegree_map] + exact (natDegree_formalDifferentialOperator_le _ _).trans + (le_of_eq (natDegree_scaleRoots P 0)) + · intro j _ + simpa only [coeff_map, Complex.ofRealHom_eq_coe, Function.comp_def] using + (Complex.continuous_ofReal.tendsto _).comp + (tendsto_coeff_rescaled_iterate_of_exponential_jet a hp hjet P j) + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/NegativeVariance.lean b/RealRooted/Hermite/FormalDifferential/NegativeVariance.lean new file mode 100644 index 000000000..7298c2fc0 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/NegativeVariance.lean @@ -0,0 +1,89 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import RealRooted.SimpleRoots +import RealRooted.Hermite.FormalDifferential.QuadraticLimit +import RealRooted.Hermite.FormalDifferential.Structure +import RealRooted.Hermite.FormalDifferential.Translation +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Mathlib.RingTheory.PowerSeries.Centering +import RealRooted.SimpleRoots.Affine +import RealRooted.Interlacing.SimplePencil +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Negative variance and eventual simple roots of formal iterates + +This is the polynomial sufficiency direction of Kim--Kim (2015), Theorem 1.1, +in ordinary formal coefficient normalization. No analytic convergence of the +symbol or real-rootedness of the nonzero polynomial input is required. +-/ + +public section + +open Polynomial Filter + +namespace RealRooted.HermitePoulain + +/-- Removing the linear exponential reduces the normalized negative-variance +case to the centered quadratic limit. -/ +private theorem eventually_simple_normalized_monic {φ : PowerSeries ℝ} + (h0 : PowerSeries.constantCoeff φ = 1) + (hv : 2 * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2 < 0) + {P : ℝ[X]} (hP : P.Monic) : + ∀ᶠ m : ℕ in atTop, IsSimpleRealRooted (formalDifferentialOperator (φ ^ m) P) := by + obtain ⟨ψ, hfactor, hψ⟩ := PowerSeries.exists_centered_quadratic_factor h0 + have hψneg : PowerSeries.constantCoeff ψ < 0 := by rw [hψ]; linarith + filter_upwards [eventually_simple_centered_formalDifferentialOperator hψneg hP] + with m hm + rw [← hfactor, formalDifferentialOperator_linear_exp_mul_pow] at hm + exact (isSimpleRealRooted_comp_X_add_C_iff _ _).mp hm + +/-- Multiplying the input by its inverse leading coefficient reduces to monic input. -/ +private theorem eventually_simple_normalized {φ : PowerSeries ℝ} + (h0 : PowerSeries.constantCoeff φ = 1) + (hv : 2 * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2 < 0) + {P : ℝ[X]} (hP : P ≠ 0) : + ∀ᶠ m : ℕ in atTop, IsSimpleRealRooted (formalDifferentialOperator (φ ^ m) P) := by + have hlc : P.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.mpr hP + have hmonic : (C P.leadingCoeff⁻¹ * P).Monic := + monic_C_mul_of_mul_leadingCoeff_eq_one (inv_mul_cancel₀ hlc) + filter_upwards [eventually_simple_normalized_monic h0 hv hmonic] with m hm + rw [formalDifferentialOperator_mul_input] at hm + have h := hm.C_mul hlc + simpa only [← mul_assoc, ← map_mul, mul_inv_cancel₀ hlc, C_1, one_mul] using h + +/-- Every nonzero polynomial eventually has simple real roots under iteration +of a real formal symbol with nonzero constant term and negative second cumulant. +Constants and symbols with zero radius of convergence are included. -/ +theorem eventually_simple_iterate_formalDifferentialOperator + {φ : PowerSeries ℝ} (h0 : PowerSeries.constantCoeff φ ≠ 0) + (hv : 2 * PowerSeries.constantCoeff φ * PowerSeries.coeff 2 φ - + PowerSeries.coeff 1 φ ^ 2 < 0) {P : ℝ[X]} (hP : P ≠ 0) : + ∀ᶠ m : ℕ in atTop, IsSimpleRealRooted ((formalDifferentialOperator φ)^[m] P) := by + let a := PowerSeries.constantCoeff φ + let ψ : PowerSeries ℝ := PowerSeries.C a⁻¹ * φ + have ha : a ≠ 0 := h0 + have hψ0 : PowerSeries.constantCoeff ψ = 1 := by simp [ψ, a, h0] + have hcoeff (k : ℕ) : PowerSeries.coeff k ψ = a⁻¹ * PowerSeries.coeff k φ := by + simp [ψ] + have hψv : 2 * PowerSeries.coeff 2 ψ - PowerSeries.coeff 1 ψ ^ 2 < 0 := by + rw [hcoeff, hcoeff] + have heq : 2 * (a⁻¹ * PowerSeries.coeff 2 φ) - + (a⁻¹ * PowerSeries.coeff 1 φ) ^ 2 = + (2 * a * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2) / a ^ 2 := by + field_simp [ha] + rw [heq] + exact div_neg_of_neg_of_pos hv (sq_pos_of_ne_zero ha) + filter_upwards [eventually_simple_normalized hψ0 hψv hP] with m hm + have hpower : ψ ^ m = PowerSeries.C (a⁻¹ ^ m) * φ ^ m := by + simp only [ψ, mul_pow, map_pow] + rw [hpower, formalDifferentialOperator_C_mul] at hm + have h := hm.C_mul (pow_ne_zero m ha) + rw [← mul_assoc, ← map_mul, ← mul_pow, mul_inv_cancel₀ ha, one_pow, C_1, one_mul, + formalDifferentialOperator_pow] at h + exact h + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/NonnegativeVariance.lean b/RealRooted/Hermite/FormalDifferential/NonnegativeVariance.lean new file mode 100644 index 000000000..d4c63dc8c --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/NonnegativeVariance.lean @@ -0,0 +1,110 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Algebra.Algebra.Rat +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +import RealRooted.Hermite.FormalDifferential.NonrealIterates +import RealRooted.Hermite.FormalDifferential.Structure +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Mathlib.RingTheory.PowerSeries.FirstDiscrepancy +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +/-! +# The nonnegative-variance complement for polynomial iterates + +Kim--Kim (2015), Theorem 1.2: a nonexponential formal symbol with nonzero +constant term and nonnegative second cumulant eventually produces nonreal +roots on every polynomial above a finite degree threshold. +-/ + +public section + +open Polynomial Filter + +namespace RealRooted.HermitePoulain + +/-- The first normalized exponential discrepancy supplies a common degree +threshold; the iteration threshold may still depend on the input polynomial. -/ +private theorem exists_eventually_not_splits_normalized {φ : PowerSeries ℝ} + (h0 : PowerSeries.constantCoeff φ = 1) + (hv : 0 ≤ 2 * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2) + (hne : φ ≠ PowerSeries.rescale (PowerSeries.coeff 1 φ) (PowerSeries.exp ℝ)) : + ∃ p : ℕ, 2 ≤ p ∧ ∀ P : ℝ[X], p ≤ P.natDegree → + ∀ᶠ m : ℕ in atTop, ¬ ((formalDifferentialOperator φ)^[m] P).Splits := by + obtain ⟨p, hp, hjet, hdiff⟩ := PowerSeries.exists_first_exponential_discrepancy h0 hne + have hbad : (p = 2 ∧ 0 < PowerSeries.coeff p φ - + PowerSeries.coeff 1 φ ^ p / (p.factorial : ℝ)) ∨ + (3 ≤ p ∧ PowerSeries.coeff p φ - + PowerSeries.coeff 1 φ ^ p / (p.factorial : ℝ) ≠ 0) := by + by_cases hp2 : p = 2 + · left + refine ⟨hp2, ?_⟩ + rw [hp2] at hdiff ⊢ + norm_num at hdiff ⊢ + have hn : 0 ≤ PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2 / 2 := by + linarith + exact lt_of_le_of_ne (sub_nonneg.mp hn) (Ne.symm hdiff) + · exact Or.inr ⟨by lia, sub_ne_zero.mpr hdiff⟩ + refine ⟨p, hp, fun P hP ↦ ?_⟩ + apply eventually_not_splits_iterate_of_exponential_jet (PowerSeries.coeff 1 φ) + (by lia) hjet hbad _ hP + intro hz + rw [hz, natDegree_zero] at hP + lia + +/-- Above a finite degree threshold, every real polynomial has nonreal roots +after all sufficiently many iterates of a nonexponential formal symbol with +nonnegative second cumulant. The formal symbol need not converge anywhere. -/ +theorem exists_eventually_not_splits_iterate + {φ : PowerSeries ℝ} (h0 : PowerSeries.constantCoeff φ ≠ 0) + (hv : 0 ≤ 2 * PowerSeries.constantCoeff φ * PowerSeries.coeff 2 φ - + PowerSeries.coeff 1 φ ^ 2) + (hne : φ ≠ PowerSeries.C (PowerSeries.constantCoeff φ) * + PowerSeries.rescale (PowerSeries.coeff 1 φ / PowerSeries.constantCoeff φ) + (PowerSeries.exp ℝ)) : + ∃ p : ℕ, 2 ≤ p ∧ ∀ P : ℝ[X], p ≤ P.natDegree → + ∀ᶠ m : ℕ in atTop, ¬ ((formalDifferentialOperator φ)^[m] P).Splits := by + let a := PowerSeries.constantCoeff φ + let ψ : PowerSeries ℝ := PowerSeries.C a⁻¹ * φ + have ha : a ≠ 0 := h0 + have hψ0 : PowerSeries.constantCoeff ψ = 1 := by simp [ψ, a, h0] + have hcoeff (k : ℕ) : PowerSeries.coeff k ψ = a⁻¹ * PowerSeries.coeff k φ := by + simp [ψ] + have hψv : 0 ≤ 2 * PowerSeries.coeff 2 ψ - PowerSeries.coeff 1 ψ ^ 2 := by + rw [hcoeff, hcoeff] + have heq : 2 * (a⁻¹ * PowerSeries.coeff 2 φ) - + (a⁻¹ * PowerSeries.coeff 1 φ) ^ 2 = + (2 * a * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2) / a ^ 2 := by + field_simp [ha] + rw [heq] + exact div_nonneg hv (sq_nonneg a) + have hψne : ψ ≠ PowerSeries.rescale (PowerSeries.coeff 1 ψ) (PowerSeries.exp ℝ) := by + intro heq + apply hne + have hrestore : PowerSeries.C a * ψ = φ := by + simp only [ψ, ← mul_assoc, ← map_mul, mul_inv_cancel₀ ha, map_one, one_mul] + calc + φ = PowerSeries.C a * ψ := hrestore.symm + _ = PowerSeries.C a * PowerSeries.rescale (PowerSeries.coeff 1 ψ) + (PowerSeries.exp ℝ) := + congrArg (fun χ : PowerSeries ℝ ↦ PowerSeries.C a * χ) heq + _ = PowerSeries.C (PowerSeries.constantCoeff φ) * + PowerSeries.rescale (PowerSeries.coeff 1 φ / PowerSeries.constantCoeff φ) + (PowerSeries.exp ℝ) := by + rw [hcoeff] + simp only [a, div_eq_mul_inv, mul_comm] + obtain ⟨p, hp, hbad⟩ := exists_eventually_not_splits_normalized hψ0 hψv hψne + refine ⟨p, hp, fun P hP ↦ ?_⟩ + filter_upwards [hbad P hP] with m hm hsplit + apply hm + have hpower : ψ ^ m = PowerSeries.C (a⁻¹ ^ m) * φ ^ m := by + simp only [ψ, mul_pow, map_pow] + rw [← formalDifferentialOperator_pow, hpower, formalDifferentialOperator_C_mul] + rw [← formalDifferentialOperator_pow] at hsplit + exact hsplit.C_mul _ + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/NonrealExponential.lean b/RealRooted/Hermite/FormalDifferential/NonrealExponential.lean new file mode 100644 index 000000000..ee5906438 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/NonrealExponential.lean @@ -0,0 +1,84 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +import RealRooted.Hermite.FormalDifferential.ExponentialMonomial +import RealRooted.Hermite.FormalDifferential.Derivative +import RealRooted.Hermite.FormalDifferential.Structure +import RealRooted.BasisTransform.EventuallyGeometric +import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity + +/-! +# Nonreal roots of higher differential exponentials + +Differentiation reduces the obstruction to `X^p+c`. For `p>=3`, a multiple +zero of its derivative would force an impossible root at zero if it split. +For `p=2` and positive `c`, it is strictly positive on the real line. +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- A nontrivial binomial of degree at least three cannot split over the reals. -/ +private theorem not_splits_X_pow_add_C {p : ℕ} (hp : 3 ≤ p) + {c : ℝ} (hc : c ≠ 0) : ¬ (X ^ p + C c : ℝ[X]).Splits := by + have hp0 : p ≠ 0 := by lia + have hpR : (p : ℝ) ≠ 0 := by exact_mod_cast hp0 + have hm : ((X ^ p + C c : ℝ[X]).derivative).rootMultiplicity 0 = p - 1 := by + rw [derivative_add, derivative_C, add_zero, derivative_X_pow, + rootMultiplicity_C_mul hpR] + simpa only [map_zero, sub_zero] using + rootMultiplicity_X_sub_C_pow (0 : ℝ) (p - 1) + have hz : (X ^ p + C c : ℝ[X]).rootMultiplicity 0 = 0 := + rootMultiplicity_eq_zero (by simp [IsRoot.def, hp0, hc]) + intro hsplit + have h := rootMultiplicity_eq_add_one_of_derivative_ge_two hsplit + (a := 0) (by rw [hm]; lia) + rw [hz, hm] at h + lia + +/-- A positive constant added to `X^2` leaves no real root. -/ +private theorem not_splits_X_sq_add_C {c : ℝ} (hc : 0 < c) : + ¬ (X ^ 2 + C c : ℝ[X]).Splits := by + have hP : IsMonicOfDegree (X ^ 2 + C c : ℝ[X]) 2 := + (isMonicOfDegree_X_pow ℝ 2).add_right (by simp) + intro hsplit + obtain ⟨x, hx⟩ := hsplit.exists_eval_eq_zero (by + rw [degree_eq_natDegree hP.monic.ne_zero, hP.natDegree_eq] + norm_num) + have hx' : x ^ 2 + c = 0 := by simpa only [eval_add, eval_pow, eval_X, eval_C] using hx + nlinarith [sq_nonneg x] + +/-- A higher differential exponential has a nonreal root in every input +degree at least its stride, except for the negative quadratic case. -/ +theorem not_splits_formalDifferentialOperator_exp_stride + {β : ℝ} {p d : ℕ} (hp : 0 < p) (hpd : p ≤ d) + (hbad : (p = 2 ∧ 0 < β) ∨ (3 ≤ p ∧ β ≠ 0)) : + ¬ (formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ d)).Splits := by + let σ := PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ)) + have hdesc : (d.descFactorial (d - p) : ℝ) ≠ 0 := by + exact_mod_cast (Nat.descFactorial_pos.mpr (Nat.sub_le d p)).ne' + have hd : d - (d - p) = p := Nat.sub_sub_self hpd + have heq : (derivative^[d - p]) (formalDifferentialOperator σ (X ^ d)) = + C (d.descFactorial (d - p) : ℝ) * (X ^ p + C (β * (p.factorial : ℝ))) := by + rw [iterate_derivative_formalDifferentialOperator, iterate_derivative_X_pow_eq_C_mul, + hd, formalDifferentialOperator_mul_input, formalDifferentialOperator_exp_stride_X_pow β hp] + intro hsplit + have hlow := (hsplit.iterate_derivative (d - p)).C_mul + ((d.descFactorial (d - p) : ℝ)⁻¹) + rw [heq, ← mul_assoc, ← C_mul, inv_mul_cancel₀ hdesc, C_1, one_mul] at hlow + rcases hbad with ⟨rfl, hβ⟩ | ⟨hp3, hβ⟩ + · exact not_splits_X_sq_add_C (mul_pos hβ (by positivity)) hlow + · exact not_splits_X_pow_add_C hp3 (mul_ne_zero hβ (by positivity)) hlow + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/NonrealIterates.lean b/RealRooted/Hermite/FormalDifferential/NonrealIterates.lean new file mode 100644 index 000000000..4a0b57066 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/NonrealIterates.lean @@ -0,0 +1,64 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +import RealRooted.Hermite.FormalDifferential.RootClustering +import RealRooted.Hermite.FormalDifferential.NonrealExponential +import RealRooted.Hermite.FormalDifferential.Structure +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Mathlib.Analysis.Polynomial.NonrealPersistence +import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient + +/-! +# Eventual nonreal roots from the first nonexponential formal term +-/ + +public section + +open Polynomial Filter + +namespace RealRooted.HermitePoulain + +/-- A nonreal limiting root persists in the original unscaled iterates. -/ +private theorem eventually_not_splits_monic_of_exponential_jet + {φ : PowerSeries ℝ} (a : ℝ) {p : ℕ} (hp : 0 < p) + (hjet : ∀ k < p, PowerSeries.coeff k φ = a ^ k / (k.factorial : ℝ)) + (hbad : (p = 2 ∧ 0 < PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) ∨ + (3 ≤ p ∧ PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ) ≠ 0)) + {P : ℝ[X]} (hP : P.Monic) (hpd : p ≤ P.natDegree) : + ∀ᶠ m : ℕ in atTop, ¬ ((formalDifferentialOperator φ)^[m] P).Splits := by + let σ := PowerSeries.expand p hp.ne' + (PowerSeries.rescale (PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) + (PowerSeries.exp ℝ)) + let H := formalDifferentialOperator σ (X ^ P.natDegree) + have hσ : PowerSeries.constantCoeff σ = 1 := by + rw [PowerSeries.constantCoeff_expand, ← PowerSeries.coeff_zero_eq_constantCoeff] + simp + have hH0 : H ≠ 0 := (formalDifferentialOperator_monic hσ + (monic_X.pow P.natDegree)).ne_zero + have hHbad : ¬ H.Splits := not_splits_formalDifferentialOperator_exp_stride hp hpd hbad + have hev := eventually_not_splits_of_eventually_rel_roots hH0 hHbad + (fun ε hε ↦ eventually_rel_roots_rescaled_iterate a hp hjet hP hε) + filter_upwards [hev] with m hm hsplit + exact hm ((hsplit.comp_X_add_C _).scaleRoots _) + +/-- A positive quadratic or nonzero higher first centered term forces +nonreal roots in every sufficiently high iterate of each input of adequate degree. -/ +theorem eventually_not_splits_iterate_of_exponential_jet + {φ : PowerSeries ℝ} (a : ℝ) {p : ℕ} (hp : 0 < p) + (hjet : ∀ k < p, PowerSeries.coeff k φ = a ^ k / (k.factorial : ℝ)) + (hbad : (p = 2 ∧ 0 < PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) ∨ + (3 ≤ p ∧ PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ) ≠ 0)) + {P : ℝ[X]} (hP : P ≠ 0) (hpd : p ≤ P.natDegree) : + ∀ᶠ m : ℕ in atTop, ¬ ((formalDifferentialOperator φ)^[m] P).Splits := by + have hlc : P.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.mpr hP + let Q := C P.leadingCoeff⁻¹ * P + have hQ : Q.Monic := monic_C_mul_of_mul_leadingCoeff_eq_one (inv_mul_cancel₀ hlc) + have hQd : p ≤ Q.natDegree := by rwa [natDegree_C_mul (inv_ne_zero hlc)] + filter_upwards [eventually_not_splits_monic_of_exponential_jet a hp hjet hbad hQ hQd] + with m hm hsplit + apply hm + rw [← formalDifferentialOperator_pow, formalDifferentialOperator_mul_input] + rw [← formalDifferentialOperator_pow] at hsplit + exact hsplit.C_mul _ + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/OperatorLimits.lean b/RealRooted/Hermite/FormalDifferential/OperatorLimits.lean new file mode 100644 index 000000000..b459c3377 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/OperatorLimits.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Tactic.TypeStar + +/-! +# Joint coefficient limits for formal symbols and polynomial inputs + +A common finite degree bound on the inputs reduces the action to a fixed +finite sum, even when the formal symbols vary and have no analytic sum. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted.HermitePoulain + +/-- Any upper degree bound may be used for the finite differential sum. -/ +theorem formalDifferentialOperator_eq_sum_of_natDegree_le + (φ : PowerSeries ℝ) {P : ℝ[X]} {N : ℕ} (hP : P.natDegree ≤ N) : + formalDifferentialOperator φ P = ∑ k ∈ Finset.range (N + 1), + C (PowerSeries.coeff k φ) * (derivative^[k]) P := by + rw [formalDifferentialOperator_eq_sum] + apply Finset.sum_subset (Finset.range_subset_range.mpr (by lia)) + intro k _ hk + have hPk : P.natDegree < k := by simpa using hk + rw [iterate_derivative_eq_zero hPk, mul_zero] + +/-- The coefficient of a formal differential image is a fixed finite convolution. -/ +theorem coeff_formalDifferentialOperator_of_natDegree_le + (φ : PowerSeries ℝ) {P : ℝ[X]} {N : ℕ} (hP : P.natDegree ≤ N) (j : ℕ) : + (formalDifferentialOperator φ P).coeff j = + ∑ k ∈ Finset.range (N + 1), PowerSeries.coeff k φ * + ((j + k).descFactorial k : ℝ) * P.coeff (j + k) := by + rw [formalDifferentialOperator_eq_sum_of_natDegree_le φ hP, finsetSum_coeff] + simp only [coeff_C_mul, coeff_iterate_derivative, nsmul_eq_mul, mul_assoc] + +/-- Coefficientwise limits pass through varying formal differential symbols +on a common finite degree range of polynomial inputs. -/ +theorem tendsto_coeff_formalDifferentialOperator {ι : Type*} {l : Filter ι} + {φ : ι → PowerSeries ℝ} {ψ : PowerSeries ℝ} {P : ι → ℝ[X]} {Q : ℝ[X]} {N : ℕ} + (hP : ∀ i, (P i).natDegree ≤ N) (hQ : Q.natDegree ≤ N) + (hφ : ∀ k, Tendsto (fun i ↦ PowerSeries.coeff k (φ i)) l (𝓝 (PowerSeries.coeff k ψ))) + (hcoeff : ∀ k, Tendsto (fun i ↦ (P i).coeff k) l (𝓝 (Q.coeff k))) (j : ℕ) : + Tendsto (fun i ↦ (formalDifferentialOperator (φ i) (P i)).coeff j) l + (𝓝 ((formalDifferentialOperator ψ Q).coeff j)) := by + have hleft : (fun i ↦ (formalDifferentialOperator (φ i) (P i)).coeff j) = + (fun i ↦ ∑ k ∈ Finset.range (N + 1), PowerSeries.coeff k (φ i) * + ((j + k).descFactorial k : ℝ) * (P i).coeff (j + k)) := + funext fun i ↦ coeff_formalDifferentialOperator_of_natDegree_le (φ i) (hP i) j + rw [hleft, coeff_formalDifferentialOperator_of_natDegree_le ψ hQ j] + exact tendsto_finsetSum _ fun k _ ↦ ((hφ k).mul_const _).mul (hcoeff (j + k)) + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/PolynomialCriterion.lean b/RealRooted/Hermite/FormalDifferential/PolynomialCriterion.lean new file mode 100644 index 000000000..8a2a5afa9 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/PolynomialCriterion.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +import RealRooted.Hermite.FormalDifferential.NegativeVariance +import RealRooted.Hermite.FormalDifferential.QuadraticObstruction +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Hermite.FormalDifferential.Structure + +/-! +# The polynomial criterion for eventual splitting of formal iterates + +The zero constant term branch is finite annihilation. With nonzero constant +term, the exact condition is strict negativity of the second cumulant. +The nonzero-input sufficiency is stronger: the eventual roots are simple. +-/ + +public section + +open Polynomial Filter + +namespace RealRooted.HermitePoulain + +/-- Every real polynomial eventually splits under iteration exactly when the +formal symbol has zero constant coefficient or negative second cumulant. +The iteration threshold may depend on the polynomial. -/ +theorem forall_eventually_splits_iterate_iff (φ : PowerSeries ℝ) : + (∀ P : ℝ[X], ∀ᶠ m : ℕ in atTop, ((formalDifferentialOperator φ)^[m] P).Splits) ↔ + PowerSeries.constantCoeff φ = 0 ∨ + 2 * PowerSeries.constantCoeff φ * PowerSeries.coeff 2 φ - + PowerSeries.coeff 1 φ ^ 2 < 0 := by + constructor + · intro h + by_cases h0 : PowerSeries.constantCoeff φ = 0 + · exact Or.inl h0 + · right + by_contra hv + obtain ⟨m, hm⟩ := (h (X ^ 2 + 1)).exists + exact not_splits_iterate_formalDifferentialOperator_X_sq_add_one + h0 (le_of_not_gt hv) m hm + · rintro (h0 | hv) P + · filter_upwards [eventually_gt_atTop P.natDegree] with m hm + rw [iterate_formalDifferentialOperator_eq_zero h0 P hm] + exact Splits.zero + · by_cases h0 : PowerSeries.constantCoeff φ = 0 + · filter_upwards [eventually_gt_atTop P.natDegree] with m hm + rw [iterate_formalDifferentialOperator_eq_zero h0 P hm] + exact Splits.zero + · by_cases hP : P = 0 + · subst P + exact Eventually.of_forall fun m ↦ by + rw [← formalDifferentialOperator_pow, formalDifferentialOperator_zero] + exact Splits.zero + · exact (eventually_simple_iterate_formalDifferentialOperator h0 hv hP).mono + fun _ hm ↦ hm.2.1 + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/QuadraticLimit.lean b/RealRooted/Hermite/FormalDifferential/QuadraticLimit.lean new file mode 100644 index 000000000..d31a90256 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/QuadraticLimit.lean @@ -0,0 +1,87 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import RealRooted.SimpleRoots +import RealRooted.Hermite.FormalDifferential.CenteredLimit +import RealRooted.Hermite.FormalDifferential.Covariance +import RealRooted.Hermite.FormalDifferential.Exponential +import RealRooted.Hermite.FormalDifferential.Structure +import RealRooted.SimpleRoots.Affine +import RealRooted.Hermite.GaussianOperator +import RealRooted.Mathlib.Analysis.Polynomial.SimpleRootMatching +import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient +import Mathlib.Tactic.NormNum + +/-! +# Eventual simple real roots for centered negative quadratic symbols + +The fixed-degree coefficient limit is a simple Hermite polynomial. Openness +of simple real roots and invertible root scaling then give the unscaled conclusion. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted.HermitePoulain + +/-- A negative quadratic formal exponential sends a monic leading monomial +to a simple real-rooted monic polynomial of the same degree. -/ +private theorem quadratic_limit_isMonicOfDegree_simple {s : ℝ} (hs : s < 0) (d : ℕ) : + let σ := PowerSeries.expand 2 (by decide) + (PowerSeries.rescale s (PowerSeries.exp ℝ)) + let H := formalDifferentialOperator σ (X ^ d) + IsMonicOfDegree H d ∧ IsSimpleRealRooted H := by + dsimp only + have hσ : PowerSeries.constantCoeff (PowerSeries.expand 2 (by decide) + (PowerSeries.rescale s (PowerSeries.exp ℝ))) = 1 := by + rw [PowerSeries.constantCoeff_expand, ← PowerSeries.coeff_zero_eq_constantCoeff] + simp + refine ⟨⟨?_, formalDifferentialOperator_monic hσ (monic_X.pow d)⟩, ?_⟩ + · rw [natDegree_formalDifferentialOperator (by rw [hσ]; exact one_ne_zero) + (pow_ne_zero d X_ne_zero), natDegree_X_pow] + · rw [formalDifferentialOperator_exp_quadratic] + simpa only [Complex.ofReal_zero, zero_mul, zero_add] using + simple_taylor_exp_quadratic 0 hs (pow_ne_zero d X_ne_zero) (Splits.X_pow d) + +/-- A centered formal symbol with negative quadratic coefficient eventually +sends every monic polynomial to a polynomial with simple real roots. -/ +theorem eventually_simple_centered_formalDifferentialOperator + {ψ : PowerSeries ℝ} (hψ : PowerSeries.constantCoeff ψ < 0) + {P : ℝ[X]} (hP : P.Monic) : + ∀ᶠ m : ℕ in atTop, + IsSimpleRealRooted (formalDifferentialOperator ((1 + PowerSeries.X ^ 2 * ψ) ^ m) P) := by + let χ : PowerSeries ℝ := 1 + PowerSeries.X ^ 2 * ψ + let r : ℕ → ℝ := fun m ↦ (m : ℝ) ^ (-(2 : ℝ)⁻¹) + let Q : ℕ → ℝ[X] := fun m ↦ + formalDifferentialOperator ((PowerSeries.rescale (r m) χ) ^ m) (P.scaleRoots (r m)) + let σ := PowerSeries.expand 2 (by decide) + (PowerSeries.rescale (PowerSeries.constantCoeff ψ) (PowerSeries.exp ℝ)) + let H : ℝ[X] := formalDifferentialOperator σ (X ^ P.natDegree) + obtain ⟨hH, hHs⟩ := quadratic_limit_isMonicOfDegree_simple hψ P.natDegree + have hPzero : P.scaleRoots 0 = X ^ P.natDegree := by + rw [scaleRoots_zero, hP, one_smul] + have hlim (j : ℕ) : Tendsto (fun m ↦ (Q m).coeff j) atTop (𝓝 (H.coeff j)) := by + change Tendsto (fun m ↦ (Q m).coeff j) atTop + (𝓝 ((formalDifferentialOperator σ (X ^ P.natDegree)).coeff j)) + rw [← hPzero] + exact tendsto_coeff_centered_formalDifferentialOperator ψ (by decide : 0 < 2) P j + have hdeg : ∀ᶠ m in atTop, (Q m).natDegree ≤ P.natDegree := + Eventually.of_forall fun m ↦ (natDegree_formalDifferentialOperator_le _ _).trans + (le_of_eq (natDegree_scaleRoots P (r m))) + have hevent := eventually_roots_bijection_of_coeff_tendsto hH hHs.2.1 + hHs.2.2.roots_nodup hdeg (fun j _ ↦ hlim j) (by norm_num : (0 : ℝ) < 1) + filter_upwards [hevent, eventually_gt_atTop (0 : ℕ)] with m hm hmpos + have hr : r m ≠ 0 := (Real.rpow_pos_of_pos (by exact_mod_cast hmpos) _).ne' + have hQ0 : Q m ≠ 0 := by + apply degree_ne_bot.mp + rw [hm.1] + exact WithBot.coe_ne_bot + have hQs : IsSimpleRealRooted (Q m) := + ⟨hQ0, hm.2.1, HasSimpleRoots.of_roots_nodup hQ0 hm.2.2.1⟩ + have hχ : PowerSeries.constantCoeff (χ ^ m) ≠ 0 := by simp [χ] + apply (isSimpleRealRooted_scaleRoots_iff hr).mp + rw [scaleRoots_formalDifferentialOperator hχ, map_pow] + exact hQs + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/QuadraticObstruction.lean b/RealRooted/Hermite/FormalDifferential/QuadraticObstruction.lean new file mode 100644 index 000000000..b876389da --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/QuadraticObstruction.lean @@ -0,0 +1,97 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Mathlib.RingTheory.PowerSeries.LowDegree +import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree + +/-! +# A quadratic obstruction to eventual real-rootedness + +A formal real symbol with constant coefficient one and nonnegative second +cumulant fails to make `X^2 + 1` real-rooted at every iterate. This is the +necessity mechanism in the polynomial classification of Kim--Kim (2015). +The zero-constant branch is handled separately by finite annihilation. +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- Exact completed-square evaluation of all iterates on `X^2 + 1`. -/ +theorem eval_iterate_formalDifferentialOperator_X_sq_add_one + {φ : PowerSeries ℝ} (h0 : PowerSeries.constantCoeff φ = 1) (m : ℕ) (x : ℝ) : + ((formalDifferentialOperator φ)^[m] (X ^ 2 + 1)).eval x = + (x + (m : ℝ) * PowerSeries.coeff 1 φ) ^ 2 + 1 + + (m : ℝ) * (2 * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2) := by + have hP : IsMonicOfDegree (X ^ 2 + 1 : ℝ[X]) 2 := + (isMonicOfDegree_X_pow ℝ 2).add_right (by simp) + rw [← formalDifferentialOperator_pow, formalDifferentialOperator_eq_sum, + hP.natDegree_eq] + norm_num [Finset.sum_range_succ, Function.iterate_succ_apply', + PowerSeries.coeff_zero_eq_constantCoeff, PowerSeries.coeff_one_pow, + PowerSeries.coeff_two_pow_of_constantCoeff_eq_one h0, h0, Nat.cast_choose_two] + ring + +/-- The normalized obstruction also retains degree two at every iterate. -/ +private theorem not_splits_normalized_iterates + {φ : PowerSeries ℝ} (h0 : PowerSeries.constantCoeff φ = 1) + (hvariance : 0 ≤ 2 * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2) + (m : ℕ) : + ¬ ((formalDifferentialOperator φ)^[m] (X ^ 2 + 1)).Splits := by + let P : ℝ[X] := X ^ 2 + 1 + have hP : IsMonicOfDegree P 2 := + (isMonicOfDegree_X_pow ℝ 2).add_right (by simp) + have hc : ((φ ^ m).trunc (P.natDegree + 1)).coeff 0 = 1 := by + simp [PowerSeries.coeff_trunc, PowerSeries.coeff_zero_eq_constantCoeff, h0] + have hmonic : (formalDifferentialOperator (φ ^ m) P).Monic := + applyAsDifferentialOperator_monic hc hP.monic + have hdegree : (formalDifferentialOperator (φ ^ m) P).degree ≠ 0 := by + rw [degree_eq_natDegree hmonic.ne_zero] + change ((applyAsDifferentialOperator _ P).natDegree : WithBot ℕ) ≠ 0 + rw [natDegree_applyAsDifferentialOperator hc hP.monic, hP.natDegree_eq] + norm_num + intro hsplit + rw [← formalDifferentialOperator_pow] at hsplit + obtain ⟨x, hx⟩ := hsplit.exists_eval_eq_zero hdegree + have heval := eval_iterate_formalDifferentialOperator_X_sq_add_one h0 m x + rw [← formalDifferentialOperator_pow] at heval + have hnonneg : 0 ≤ (m : ℝ) * + (2 * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2) := + mul_nonneg (Nat.cast_nonneg m) hvariance + have hsquare := sq_nonneg (x + (m : ℝ) * PowerSeries.coeff 1 φ) + change (formalDifferentialOperator (φ ^ m) (X ^ 2 + 1)).eval x = 0 at hx + linarith + +/-- A nonzero constant coefficient and nonnegative second cumulant prevent +every iterate of `X^2 + 1` from splitting. No convergence of the symbol is assumed. -/ +theorem not_splits_iterate_formalDifferentialOperator_X_sq_add_one + {φ : PowerSeries ℝ} (h0 : PowerSeries.constantCoeff φ ≠ 0) + (hvariance : 0 ≤ 2 * PowerSeries.constantCoeff φ * PowerSeries.coeff 2 φ - + PowerSeries.coeff 1 φ ^ 2) (m : ℕ) : + ¬ ((formalDifferentialOperator φ)^[m] (X ^ 2 + 1)).Splits := by + let a : ℝ := PowerSeries.constantCoeff φ + let ψ : PowerSeries ℝ := PowerSeries.C a⁻¹ * φ + have ha : a ≠ 0 := h0 + have hψ0 : PowerSeries.constantCoeff ψ = 1 := by simp [ψ, a, h0] + have hcoeff (k : ℕ) : PowerSeries.coeff k ψ = a⁻¹ * PowerSeries.coeff k φ := by + simp [ψ] + have hψvar : 0 ≤ 2 * PowerSeries.coeff 2 ψ - PowerSeries.coeff 1 ψ ^ 2 := by + rw [hcoeff, hcoeff] + have heq : 2 * (a⁻¹ * PowerSeries.coeff 2 φ) - + (a⁻¹ * PowerSeries.coeff 1 φ) ^ 2 = + (2 * a * PowerSeries.coeff 2 φ - PowerSeries.coeff 1 φ ^ 2) / a ^ 2 := by + field_simp [ha] + rw [heq] + exact div_nonneg hvariance (sq_nonneg a) + have hpower : ψ ^ m = PowerSeries.C (a⁻¹ ^ m) * φ ^ m := by + simp only [ψ, mul_pow, map_pow] + intro hsplit + apply not_splits_normalized_iterates hψ0 hψvar m + rw [← formalDifferentialOperator_pow, hpower, formalDifferentialOperator_C_mul] + rw [← formalDifferentialOperator_pow] at hsplit + exact hsplit.C_mul _ + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/RescaledIterates.lean b/RealRooted/Hermite/FormalDifferential/RescaledIterates.lean new file mode 100644 index 000000000..1686da0f4 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/RescaledIterates.lean @@ -0,0 +1,58 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Hermite.FormalDifferential.CenteredLimit +import RealRooted.Hermite.FormalDifferential.Covariance +import RealRooted.Hermite.FormalDifferential.Translation +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Mathlib.RingTheory.PowerSeries.ExponentialJet + +/-! +# Centered root-scaled limits of actual formal iterates + +The symbol need only agree with an exponential to a finite order. The +normalization is root scaling by `m^(-1/p)` after translation by `-m*a`. +For a monic degree-`d` input this equals the usual +`m^(-d/p) phi(D)^m P(m^(1/p) X-m*a)` for positive `m`. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted.HermitePoulain + +/-- The literal iterated output, translated and root-scaled, has the +exponential differential limit determined by its first possible centered term. +Zero inputs, constants and a zero discrepancy are allowed. -/ +theorem tendsto_coeff_rescaled_iterate_of_exponential_jet + {φ : PowerSeries ℝ} (a : ℝ) {p : ℕ} (hp : 0 < p) + (hjet : ∀ k < p, PowerSeries.coeff k φ = a ^ k / (k.factorial : ℝ)) + (P : ℝ[X]) (j : ℕ) : + Tendsto (fun m : ℕ ↦ + ((((formalDifferentialOperator φ)^[m] P).comp (X + C (-(m : ℝ) * a))).scaleRoots + ((m : ℝ) ^ (-(p : ℝ)⁻¹))).coeff j) atTop + (𝓝 ((formalDifferentialOperator + (PowerSeries.expand p hp.ne' + (PowerSeries.rescale (PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) + (PowerSeries.exp ℝ))) (P.scaleRoots 0)).coeff j)) := by + obtain ⟨ψ, hfactor, hψ⟩ := + PowerSeries.exists_centered_factor_of_exponential_jet a p hjet + have hχ : PowerSeries.constantCoeff (1 + PowerSeries.X ^ p * ψ) = 1 := by + simp [hp.ne'] + have heq (m : ℕ) (r : ℝ) : + formalDifferentialOperator + ((PowerSeries.rescale r (1 + PowerSeries.X ^ p * ψ)) ^ m) (P.scaleRoots r) = + (((formalDifferentialOperator φ)^[m] P).comp + (X + C (-(m : ℝ) * a))).scaleRoots r := by + rw [← map_pow, ← scaleRoots_formalDifferentialOperator + (by rw [map_pow, hχ, one_pow]; exact one_ne_zero), ← hfactor, + formalDifferentialOperator_linear_exp_mul_pow, formalDifferentialOperator_pow] + simp only [mul_neg, neg_mul] + have hlim := tendsto_coeff_centered_formalDifferentialOperator ψ hp P j + simpa only [heq, hψ] using hlim + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/RootClustering.lean b/RealRooted/Hermite/FormalDifferential/RootClustering.lean new file mode 100644 index 000000000..1d1de6953 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/RootClustering.lean @@ -0,0 +1,80 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Hermite.Generalized.Degree +import RealRooted.Hermite.FormalDifferential.RescaledIterates +import RealRooted.Hermite.FormalDifferential.Structure +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Mathlib.Analysis.Polynomial.RootMatchingLimit +import Mathlib.Analysis.Complex.Polynomial.Basic + +/-! +# Multiplicity-sensitive clustering of centered formal iterates + +All roots of the centered and rescaled iterates match the roots of the +limiting exponential differential polynomial, counting multiplicity. +No simplicity or reality assumption on the limiting roots is required. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted.HermitePoulain + +/-- Every complex root of the rescaled iterates is matched with a limiting +root, with multiplicity. This includes repeated roots at zero, degree zero, +and vanishing first discrepancy. -/ +theorem eventually_rel_roots_rescaled_iterate + {φ : PowerSeries ℝ} (a : ℝ) {p : ℕ} (hp : 0 < p) + (hjet : ∀ k < p, PowerSeries.coeff k φ = a ^ k / (k.factorial : ℝ)) + {P : ℝ[X]} (hP : P.Monic) {ε : ℝ} (hε : 0 < ε) : + let H := formalDifferentialOperator + (PowerSeries.expand p hp.ne' + (PowerSeries.rescale (PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) + (PowerSeries.exp ℝ))) (X ^ P.natDegree) + ∀ᶠ m : ℕ in atTop, + (H.map Complex.ofRealHom).roots.Rel (fun z w ↦ ‖z - w‖ < ε) + (((((formalDifferentialOperator φ)^[m] P).comp (X + C (-(m : ℝ) * a))).scaleRoots + ((m : ℝ) ^ (-(p : ℝ)⁻¹))).map Complex.ofRealHom).roots := by + intro H + let Q : ℕ → ℝ[X] := fun m ↦ + (((formalDifferentialOperator φ)^[m] P).comp (X + C (-(m : ℝ) * a))).scaleRoots + ((m : ℝ) ^ (-(p : ℝ)⁻¹)) + have h0 : PowerSeries.constantCoeff φ = 1 := by + simpa only [PowerSeries.coeff_zero_eq_constantCoeff, pow_zero, + Nat.factorial_zero, Nat.cast_one, div_one] using hjet 0 hp + have hdata := isMonicOfDegree_formal_exp_stride + (PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) hp P.natDegree + have hH := hdata.monic + have hHd := hdata.natDegree_eq + have hQ (m : ℕ) : (Q m).Monic ∧ (Q m).natDegree = H.natDegree := by + have hφm : PowerSeries.constantCoeff (φ ^ m) = 1 := by simp [h0] + constructor + · apply (monic_scaleRoots_iff _).mpr + rw [← formalDifferentialOperator_pow] + exact (formalDifferentialOperator_monic hφm hP).comp_X_add_C _ + · dsimp only [Q] + rw [natDegree_scaleRoots, natDegree_comp, natDegree_X_add_C, mul_one, + ← formalDifferentialOperator_pow, + natDegree_formalDifferentialOperator (by rw [hφm]; exact one_ne_zero) hP.ne_zero, + hHd] + have hPzero : P.scaleRoots 0 = X ^ P.natDegree := by + rw [scaleRoots_zero, hP, one_smul] + have hlim (j : ℕ) : Tendsto (fun m ↦ (Q m).coeff j) atTop (𝓝 (H.coeff j)) := by + have h := tendsto_coeff_rescaled_iterate_of_exponential_jet a hp hjet P j + rw [hPzero] at h + exact h + apply eventually_rel_roots_of_coeff_tendsto (hH.map Complex.ofRealHom) + · exact Eventually.of_forall fun m ↦ + ⟨(hQ m).1.map Complex.ofRealHom, by simpa only [natDegree_map] using (hQ m).2⟩ + · intro j _ + simp only [coeff_map, Complex.ofRealHom_eq_coe] + change Tendsto (fun m ↦ ((Q m).coeff j : ℂ)) atTop (𝓝 (H.coeff j : ℂ)) + exact (Complex.continuous_ofReal.tendsto _).comp (hlim j) + · exact hε + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/SeparableIteration.lean b/RealRooted/Hermite/FormalDifferential/SeparableIteration.lean new file mode 100644 index 000000000..3a6277992 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/SeparableIteration.lean @@ -0,0 +1,107 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.FieldTheory.Separable +import Mathlib.Algebra.Order.Archimedean.Real.Basic +import RealRooted.Hermite.Generalized.Degree +import RealRooted.Hermite.Generalized.Separability +import RealRooted.Hermite.FormalDifferential.RescaledIterates +import RealRooted.Hermite.FormalDifferential.Structure +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Mathlib.Analysis.Polynomial.SeparableLimit +import RealRooted.Mathlib.RingTheory.Polynomial.ScaleRoots.Separable +import TauCeti.RingTheory.Polynomial.Roots +import Mathlib.Analysis.Complex.Polynomial.Basic + +/-! +# Eventual separability of formal differential iterates + +If the first departure from an exponential has order p and is nonzero, +the generalized Hermite limit is separable in degrees congruent to zero +or one modulo p. Fixed-degree root continuity transfers this to the actual +iterates. No real-rootedness of the input is assumed. This is the real-symbol +case of the eventual-simplicity conclusion in Kim--Kim (2015), Section 4. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted.HermitePoulain + +/-- For monic input, coefficient convergence to the separable stride limit +and invertible affine root transformations give eventual separability. -/ +private theorem eventually_separable_monic_iterates + {φ : PowerSeries ℝ} (a : ℝ) {p : ℕ} (hp : 2 ≤ p) + (hjet : ∀ k < p, PowerSeries.coeff k φ = a ^ k / (k.factorial : ℝ)) + (hβ : PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ) ≠ 0) + {P : ℝ[X]} (hP : P.Monic) (hrem : P.natDegree % p ≤ 1) : + ∀ᶠ m : ℕ in atTop, ((formalDifferentialOperator φ)^[m] P).Separable := by + have hp0 : 0 < p := by lia + let H := formalDifferentialOperator + (PowerSeries.expand p hp0.ne' + (PowerSeries.rescale (PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) + (PowerSeries.exp ℝ))) (X ^ P.natDegree) + let Q : ℕ → ℝ[X] := fun m ↦ + (((formalDifferentialOperator φ)^[m] P).comp (X + C (-(m : ℝ) * a))).scaleRoots + ((m : ℝ) ^ (-(p : ℝ)⁻¹)) + have h0 : PowerSeries.constantCoeff φ = 1 := by + simpa only [PowerSeries.coeff_zero_eq_constantCoeff, pow_zero, + Nat.factorial_zero, Nat.cast_one, div_one] using hjet 0 hp0 + have hdata := isMonicOfDegree_formal_exp_stride + (PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ)) hp0 P.natDegree + have hH := hdata.monic + have hHd := hdata.natDegree_eq + have hQ (m : ℕ) : (Q m).Monic ∧ (Q m).natDegree = H.natDegree := by + have hφm : PowerSeries.constantCoeff (φ ^ m) = 1 := by simp [h0] + constructor + · apply (monic_scaleRoots_iff _).mpr + rw [← formalDifferentialOperator_pow] + exact (formalDifferentialOperator_monic hφm hP).comp_X_add_C _ + · dsimp only [Q] + rw [natDegree_scaleRoots, natDegree_comp, natDegree_X_add_C, mul_one, + ← formalDifferentialOperator_pow, + natDegree_formalDifferentialOperator (by rw [hφm]; exact one_ne_zero) hP.ne_zero, + hHd] + have hPzero : P.scaleRoots 0 = X ^ P.natDegree := by + rw [scaleRoots_zero, hP, one_smul] + have hlim (j : ℕ) : Tendsto (fun m ↦ (Q m).coeff j) atTop (𝓝 (H.coeff j)) := by + have h := tendsto_coeff_rescaled_iterate_of_exponential_jet a hp0 hjet P j + rw [hPzero] at h + exact h + have hsep : H.Separable := + (separable_formal_exp_stride_iff hp P.natDegree hβ).mpr hrem + have hev : ∀ᶠ m : ℕ in atTop, ((Q m).map Complex.ofRealHom).Separable := by + apply eventually_separable_of_coeff_tendsto (hH.map Complex.ofRealHom) hsep.map + · exact Eventually.of_forall fun m ↦ + ⟨(hQ m).1.map Complex.ofRealHom, by simpa only [natDegree_map] using (hQ m).2⟩ + · intro j _ + simp only [coeff_map, Complex.ofRealHom_eq_coe] + change Tendsto (fun m ↦ ((Q m).coeff j : ℂ)) atTop (𝓝 (H.coeff j : ℂ)) + exact (Complex.continuous_ofReal.tendsto _).comp (hlim j) + filter_upwards [hev, eventually_gt_atTop 0] with m hm hm0 + have hr : (m : ℝ) ^ (-(p : ℝ)⁻¹) ≠ 0 := + (Real.rpow_pos_of_pos (Nat.cast_pos.mpr hm0) _).ne' + have hreal : (Q m).Separable := (separable_map Complex.ofRealHom).mp hm + exact separable_comp_X_add_C_iff.mp ((separable_scaleRoots_iff _ hr).mp hreal) + +/-- A normalized real formal symbol eventually gives separable iterates of +every nonzero input whose degree remainder is zero or one. The time may +depend on the input, and the roots need not all be real. -/ +theorem eventually_separable_iterate_of_exponential_jet + {φ : PowerSeries ℝ} (a : ℝ) {p : ℕ} (hp : 2 ≤ p) + (hjet : ∀ k < p, PowerSeries.coeff k φ = a ^ k / (k.factorial : ℝ)) + (hβ : PowerSeries.coeff p φ - a ^ p / (p.factorial : ℝ) ≠ 0) + {P : ℝ[X]} (hP : P ≠ 0) (hrem : P.natDegree % p ≤ 1) : + ∀ᶠ m : ℕ in atTop, ((formalDifferentialOperator φ)^[m] P).Separable := by + have hlc : P.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.mpr hP + have hmonic : (C P.leadingCoeff⁻¹ * P).Monic := + monic_C_mul_of_mul_leadingCoeff_eq_one (inv_mul_cancel₀ hlc) + have hd : (C P.leadingCoeff⁻¹ * P).natDegree % p ≤ 1 := by + simpa only [natDegree_C_mul (inv_ne_zero hlc)] using hrem + filter_upwards [eventually_separable_monic_iterates a hp hjet hβ hmonic hd] with m hm + rw [← formalDifferentialOperator_pow, formalDifferentialOperator_mul_input, + formalDifferentialOperator_pow] at hm + exact hm.of_mul_right + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/SeparableNormalization.lean b/RealRooted/Hermite/FormalDifferential/SeparableNormalization.lean new file mode 100644 index 000000000..8c2a0e641 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/SeparableNormalization.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.FieldTheory.Separable +import Mathlib.Algebra.Order.Archimedean.Real.Basic +import RealRooted.Hermite.FormalDifferential.SeparableIteration +import RealRooted.Hermite.FormalDifferential.Composition + +/-! +# Eventual separability without a symbol normalization +-/ + +public section + +open Polynomial Filter + +namespace RealRooted.HermitePoulain + +/-- A nonzero constant term may be normalized away: every nonzero input +of degree congruent to zero or one modulo the first exponential discrepancy +order eventually has simple complex roots under the literal operator iterates. -/ +theorem eventually_separable_iterate_of_scaled_exponential_jet + {φ : PowerSeries ℝ} (h0 : PowerSeries.constantCoeff φ ≠ 0) + (a : ℝ) {p : ℕ} (hp : 2 ≤ p) + (hjet : ∀ k < p, PowerSeries.coeff k φ = + PowerSeries.constantCoeff φ * a ^ k / (k.factorial : ℝ)) + (hβ : PowerSeries.coeff p φ - + PowerSeries.constantCoeff φ * a ^ p / (p.factorial : ℝ) ≠ 0) + {P : ℝ[X]} (hP : P ≠ 0) (hrem : P.natDegree % p ≤ 1) : + ∀ᶠ m : ℕ in atTop, ((formalDifferentialOperator φ)^[m] P).Separable := by + let c := PowerSeries.constantCoeff φ + let ψ : PowerSeries ℝ := PowerSeries.C c⁻¹ * φ + have hc : c ≠ 0 := h0 + have hcoeff (k : ℕ) : PowerSeries.coeff k ψ = c⁻¹ * PowerSeries.coeff k φ := by + simp [ψ] + have hψjet (k : ℕ) (hk : k < p) : + PowerSeries.coeff k ψ = a ^ k / (k.factorial : ℝ) := by + rw [hcoeff, hjet k hk] + change c⁻¹ * (c * a ^ k / (k.factorial : ℝ)) = a ^ k / (k.factorial : ℝ) + simp only [← mul_div_assoc, ← mul_assoc, inv_mul_cancel₀ hc, one_mul] + have hψβ : PowerSeries.coeff p ψ - a ^ p / (p.factorial : ℝ) ≠ 0 := by + intro heq + apply hβ + rw [hcoeff] at heq + have h := congrArg (fun x : ℝ ↦ c * x) (sub_eq_zero.mp heq) + apply sub_eq_zero.mpr + simpa only [← mul_assoc, mul_inv_cancel₀ hc, one_mul, mul_div_assoc] using h + filter_upwards [eventually_separable_iterate_of_exponential_jet + a hp hψjet hψβ hP hrem] with m hm + have hpower : ψ ^ m = PowerSeries.C (c⁻¹ ^ m) * φ ^ m := by + simp only [ψ, mul_pow, map_pow] + rw [← formalDifferentialOperator_pow, hpower, formalDifferentialOperator_C_mul, + formalDifferentialOperator_pow] at hm + exact hm.of_mul_right + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/SeparableResidues.lean b/RealRooted/Hermite/FormalDifferential/SeparableResidues.lean new file mode 100644 index 000000000..bb799fc64 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/SeparableResidues.lean @@ -0,0 +1,42 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +public import Mathlib.FieldTheory.Separable +import RealRooted.Hermite.FormalDifferential.SeparableNormalization +import RealRooted.Mathlib.RingTheory.PowerSeries.FirstDiscrepancy + +/-! +# Degree classes with eventually simple complex roots + +For every nonexponential real formal symbol with nonzero constant term, +one common discrepancy order selects two degree residue classes on which +all nonzero polynomial inputs eventually acquire simple complex roots. +This is the real-symbol case of Kim--Kim (2015), Section 4. +-/ + +public section + +open Polynomial Filter + +namespace RealRooted.HermitePoulain + +/-- A nonexponential symbol determines an order `p >= 2` such that every +nonzero input of degree congruent to zero or one modulo `p` eventually has +simple complex roots. The iteration time can depend on the input. -/ +theorem exists_eventually_separable_iterate + {φ : PowerSeries ℝ} (h0 : PowerSeries.constantCoeff φ ≠ 0) + (hne : φ ≠ PowerSeries.C (PowerSeries.constantCoeff φ) * + PowerSeries.rescale (PowerSeries.coeff 1 φ / PowerSeries.constantCoeff φ) + (PowerSeries.exp ℝ)) : + ∃ p : ℕ, 2 ≤ p ∧ ∀ P : ℝ[X], P ≠ 0 → P.natDegree % p ≤ 1 → + ∀ᶠ m : ℕ in atTop, ((formalDifferentialOperator φ)^[m] P).Separable := by + obtain ⟨p, hp, hjet, hdiff⟩ := + PowerSeries.exists_first_scaled_exponential_discrepancy h0 hne + refine ⟨p, hp, fun P hP hrem ↦ ?_⟩ + exact eventually_separable_iterate_of_scaled_exponential_jet h0 + (PowerSeries.coeff 1 φ / PowerSeries.constantCoeff φ) hp hjet + (sub_ne_zero.mpr hdiff) hP hrem + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/Structure.lean b/RealRooted/Hermite/FormalDifferential/Structure.lean new file mode 100644 index 000000000..580911c85 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/Structure.lean @@ -0,0 +1,49 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +import RealRooted.Hermite.FormalDifferential.OperatorLimits +import RealRooted.Hermite.PoulainSymbolInterlacing +import Mathlib.Tactic.Linarith + +/-! +# Degree and scalar behavior of formal differential operators +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- The zero polynomial is annihilated by every formal differential symbol. -/ +@[simp] theorem formalDifferentialOperator_zero (φ : PowerSeries ℝ) : + formalDifferentialOperator φ 0 = 0 := by + simp [formalDifferentialOperator] + +/-- A nonzero constant term preserves the degree of a nonzero polynomial input. -/ +theorem natDegree_formalDifferentialOperator {φ : PowerSeries ℝ} + (hφ : PowerSeries.constantCoeff φ ≠ 0) {P : ℝ[X]} (hP : P ≠ 0) : + (formalDifferentialOperator φ P).natDegree = P.natDegree := by + apply natDegree_applyAsDifferentialOperator_of_coeff_zero_ne_zero _ hP + simpa only [PowerSeries.coeff_trunc, ite_eq_left (Nat.zero_lt_succ _), + PowerSeries.coeff_zero_eq_constantCoeff] using hφ + +/-- A constant-one formal differential symbol preserves monicity. -/ +theorem formalDifferentialOperator_monic {φ : PowerSeries ℝ} + (hφ : PowerSeries.constantCoeff φ = 1) {P : ℝ[X]} (hP : P.Monic) : + (formalDifferentialOperator φ P).Monic := by + apply applyAsDifferentialOperator_monic _ hP + simpa only [PowerSeries.coeff_trunc, ite_eq_left (Nat.zero_lt_succ _), + PowerSeries.coeff_zero_eq_constantCoeff] using hφ + +/-- Scalars in the input commute with the formal differential action. -/ +theorem formalDifferentialOperator_mul_input (φ : PowerSeries ℝ) (a : ℝ) (P : ℝ[X]) : + formalDifferentialOperator φ (C a * P) = C a * formalDifferentialOperator φ P := by + rw [formalDifferentialOperator_eq_sum_of_natDegree_le φ (natDegree_C_mul_le a P), + formalDifferentialOperator_eq_sum, Finset.mul_sum] + apply Finset.sum_congr rfl + intro k _ + rw [iterate_derivative_C_mul] + exact mul_left_comm _ _ _ + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/Taylor.lean b/RealRooted/Hermite/FormalDifferential/Taylor.lean new file mode 100644 index 000000000..60a6ee078 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/Taylor.lean @@ -0,0 +1,25 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator + +/-! +# Formal symbols and finite Taylor differential operators +-/ + +public section + +open Polynomial Complex + +namespace RealRooted.HermitePoulain + +/-- Matching ordinary coefficients identifies formal and Taylor differential operators. -/ +theorem formalDifferentialOperator_eq_taylor (φ : PowerSeries ℝ) (f : ℂ → ℂ) + (hcoeff : ∀ k, PowerSeries.coeff k φ = (iteratedDeriv k f 0 / k.factorial).re) + (P : ℝ[X]) : formalDifferentialOperator φ P = taylorDifferentialOperator f P := by + rw [formalDifferentialOperator_eq_sum, taylorDifferentialOperator] + apply Finset.sum_congr rfl + intro k _ + rw [hcoeff] + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/FormalDifferential/Translation.lean b/RealRooted/Hermite/FormalDifferential/Translation.lean new file mode 100644 index 000000000..737bde826 --- /dev/null +++ b/RealRooted/Hermite/FormalDifferential/Translation.lean @@ -0,0 +1,30 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +public import Mathlib.Algebra.Algebra.Rat +import RealRooted.Hermite.FormalDifferential.Exponential +import RealRooted.Hermite.FormalDifferential.Composition + +/-! +# Linear exponential factors in iterated formal symbols +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- A linear exponential factor translates the iterated polynomial output +by the iteration count times its parameter. -/ +theorem formalDifferentialOperator_linear_exp_mul_pow + (φ : PowerSeries ℝ) (a : ℝ) (m : ℕ) (P : ℝ[X]) : + formalDifferentialOperator ((PowerSeries.rescale a (PowerSeries.exp ℝ) * φ) ^ m) P = + (formalDifferentialOperator (φ ^ m) P).comp (X + C ((m : ℝ) * a)) := by + rw [mul_pow, ← map_pow, PowerSeries.exp_pow_eq_rescale_exp, + PowerSeries.rescale_rescale, formalDifferentialOperator_mul, + formalDifferentialOperator_exp_linear] + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/GaussianCoefficients.lean b/RealRooted/Hermite/GaussianCoefficients.lean new file mode 100644 index 000000000..c62861e8c --- /dev/null +++ b/RealRooted/Hermite/GaussianCoefficients.lean @@ -0,0 +1,65 @@ +module + +public import Mathlib.Analysis.Complex.Basic + +public import Mathlib.Analysis.Complex.Exponential + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs + +public import RealRooted.Hermite.Homogeneous + +import RealRooted.Hermite.GeneratingFunction +import Mathlib.Data.Nat.Factorial.Basic + +/-! +# Even and odd Taylor coefficients of a Gaussian + +At the origin, quadratic exponentials have zero odd derivatives and even +Taylor coefficients `s^n/n!`. The homogeneous Hermite recurrence proves the +identities directly, including the zero quadratic parameter. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Odd homogeneous Hermite values vanish at the origin. -/ +theorem hermiteHomogeneous_zero_odd {R : Type*} [CommRing R] (s : R) (n : ℕ) : + hermiteHomogeneous 0 s (2 * n + 1) = 0 := by + induction n with + | zero => simp + | succ n ih => + rw [show 2 * (n + 1) + 1 = (2 * n + 1) + 2 by lia, + hermiteHomogeneous_add_two, ih] + simp + +/-- Even homogeneous Hermite values at the origin have the Gaussian factorial normalization. -/ +theorem hermiteHomogeneous_zero_even (s : ℂ) (n : ℕ) : + hermiteHomogeneous 0 s (2 * n) = (2 * n).factorial * s ^ n / n.factorial := by + induction n with + | zero => simp + | succ n ih => + rw [show 2 * (n + 1) = 2 * n + 2 by lia, hermiteHomogeneous_add_two, ih] + simp only [zero_mul, zero_add, Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, + Nat.cast_one, pow_succ] + have hn : (n.factorial : ℂ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + have hs : (n : ℂ) + 1 ≠ 0 := by exact_mod_cast n.succ_ne_zero + field_simp + ring + +/-- Odd Taylor derivatives of a quadratic exponential vanish at zero. -/ +theorem iteratedDeriv_exp_mul_sq_zero_odd (s : ℂ) (n : ℕ) : + iteratedDeriv (2 * n + 1) (fun z => exp (s * z ^ 2)) 0 = 0 := by + simpa only [zero_mul, zero_add, hermiteHomogeneous_zero_odd] using + iteratedDeriv_exp_quadratic_zero 0 s (2 * n + 1) + +/-- The even Taylor derivatives of a quadratic exponential have the heat-series normalization. -/ +theorem iteratedDeriv_exp_mul_sq_zero_even (s : ℂ) (n : ℕ) : + iteratedDeriv (2 * n) (fun z => exp (s * z ^ 2)) 0 = + (2 * n).factorial * s ^ n / n.factorial := by + simpa only [zero_mul, zero_add, hermiteHomogeneous_zero_even] using + iteratedDeriv_exp_quadratic_zero 0 s (2 * n) + +end RealRooted diff --git a/RealRooted/Hermite/GaussianHeatOperator.lean b/RealRooted/Hermite/GaussianHeatOperator.lean new file mode 100644 index 000000000..806fb4bf1 --- /dev/null +++ b/RealRooted/Hermite/GaussianHeatOperator.lean @@ -0,0 +1,55 @@ +module + +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic + +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Derivative +import RealRooted.Hermite.GaussianCoefficients +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import Mathlib.Topology.Algebra.InfiniteSum.NatInt + +/-! +# Gaussian differential symbols and the heat sum + +The full differential-symbol coefficient series of `exp (-t z²)` is exactly +the even-derivative heat series, including after every spatial derivative. +This fixes the parity and factorial normalizations needed for infinite-symbol +Laguerre--Pólya preservation. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- The ordinary Gaussian differential-symbol series sums to the corresponding +Taylor derivative of the entire heat image. -/ +theorem hasSum_gaussian_differential {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (t : ℂ) (k : ℕ) : + HasSum (fun j : ℕ => iteratedDeriv j (fun z => exp (-t * z ^ 2)) 0 * + iteratedDeriv (k + j) f 0 / (j.factorial : ℂ)) + (iteratedDeriv k (heatOperator t f) 0) := by + let A : ℕ → ℂ := fun j => iteratedDeriv j (fun z => exp (-t * z ^ 2)) 0 * + iteratedDeriv (k + j) f 0 / (j.factorial : ℂ) + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv k (WithTop.coe_lt_top _) + have he : HasSum (fun n : ℕ => (-t) ^ n / (n.factorial : ℂ) * + iteratedDeriv (2 * n) (iteratedDeriv k f) 0) (heatOperator t (iteratedDeriv k f) 0) := + (summable_norm_heatOperator hdf (horder.iteratedDeriv hf k) hρ t 0).of_norm.hasSum + have heven : HasSum (fun n => A (2 * n)) (heatOperator t (iteratedDeriv k f) 0) := by + apply he.congr + intro S + apply Finset.sum_congr rfl + intro n _ + dsimp only [A] + rw [iteratedDeriv_exp_mul_sq_zero_even] + simp only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm k] + have hfac : ((2 * n).factorial : ℂ) ≠ 0 := Nat.cast_ne_zero.mpr (2 * n).factorial_ne_zero + field_simp + have hodd : HasSum (fun n => A (2 * n + 1)) 0 := by + simp only [A, iteratedDeriv_exp_mul_sq_zero_odd, zero_mul, zero_div] + exact hasSum_zero + have h := heven.even_add_odd hodd + rw [add_zero, ← congrFun (iteratedDeriv_heatOperator hf horder hρ t k) 0] at h + exact h + +end RealRooted diff --git a/RealRooted/Hermite/GaussianOperator.lean b/RealRooted/Hermite/GaussianOperator.lean new file mode 100644 index 000000000..fdd33bf24 --- /dev/null +++ b/RealRooted/Hermite/GaussianOperator.lean @@ -0,0 +1,152 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +public import RealRooted.Hermite.Homogeneous +public import RealRooted.SimpleRoots +public import RealRooted.Mathlib.Algebra.Polynomial.BasisTransform +import RealRooted.Hermite.GeneratingFunction +import RealRooted.BasisTransform.Hermite +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorLinear +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +/-! +# Strict Gaussian differential operators on polynomials + +The symbol `exp(a z + s z²)` acts through the homogeneous Hermite basis +`Hₙ(X+a,s)`. For `s < 0`, its affine raising operator has a strictly negative +derivative term, so every nonzero real-rooted polynomial input acquires simple +real roots. This is a finite-input theorem; no infinite heat series is used. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Differentiating the translated homogeneous Hermite basis lowers its index. -/ +theorem derivative_hermiteHomogeneous_affine (a s : ℝ) (n : ℕ) : + (hermiteHomogeneous (X + C a) (C s) (n + 1)).derivative = + C (n + 1 : ℝ) * hermiteHomogeneous (X + C a) (C s) n := by + induction n using Nat.twoStepInduction with + | zero => simp + | one => simp [hermiteHomogeneous_add_two]; ring + | more n ih ih' => + rw [hermiteHomogeneous_add_two] + simp only [derivative_add, derivative_mul, derivative_X, derivative_C, add_zero, + one_mul, derivative_ofNat, derivative_natCast, zero_mul, mul_zero, + zero_add, ih, ih'] + rw [hermiteHomogeneous_add_two] + push_cast + simp only [map_add, map_natCast, map_ofNat, map_one] + ring + +/-- Coefficients of translated homogeneous Hermite polynomials are binomial +multiples of their values at the translation parameter. -/ +theorem coeff_hermiteHomogeneous_affine (a s : ℝ) (n k : ℕ) : + (hermiteHomogeneous (X + C a) (C s) n).coeff k = + (n.choose k : ℝ) * hermiteHomogeneous a s (n - k) := by + induction n generalizing k with + | zero => cases k <;> simp [coeff_one] + | succ n ih => + cases k with + | zero => + rw [Nat.choose_zero_right, Nat.cast_one, one_mul, Nat.sub_zero, + coeff_zero_eq_eval_zero] + have hm := map_hermiteHomogeneous (evalRingHom (0 : ℝ)) + (X + C a) (C s) (n + 1) + change (hermiteHomogeneous (X + C a) (C s) (n + 1)).eval 0 = + hermiteHomogeneous ((X + C a).eval 0) ((C s).eval 0) (n + 1) at hm + simpa only [eval_add, eval_X, eval_C, zero_add] using hm + | succ k => + have hd := congrArg (fun p : ℝ[X] => p.coeff k) + (derivative_hermiteHomogeneous_affine a s n) + simp only [coeff_derivative, coeff_C_mul, ih] at hd + have hc : (n + 1 : ℝ) * (n.choose k : ℝ) = + ((n + 1).choose (k + 1) : ℝ) * (k + 1 : ℝ) := by + exact_mod_cast Nat.add_one_mul_choose_eq n k + have hk : (k + 1 : ℝ) ≠ 0 := by positivity + simp only [Nat.succ_sub_succ_eq_sub] + apply mul_right_cancel₀ hk + linear_combination hd + hermiteHomogeneous a s (n - k) * hc + +/-- The translated homogeneous Hermite basis satisfies the Gaussian raising relation. -/ +theorem hermiteHomogeneous_affine_raising (a s : ℝ) (n : ℕ) : + hermiteHomogeneous (X + C a) (C s) (n + 1) = + (X + C a) * hermiteHomogeneous (X + C a) (C s) n + + C (2 * s) * (hermiteHomogeneous (X + C a) (C s) n).derivative := by + cases n with + | zero => simp + | succ n => + rw [derivative_hermiteHomogeneous_affine, hermiteHomogeneous_add_two] + push_cast + simp only [map_add, map_mul, map_natCast, map_ofNat, map_one] + ring + +/-- A quadratic exponential sends a power of the variable to the corresponding +translated homogeneous Hermite polynomial. -/ +theorem taylor_exp_quadratic_X_pow (a s : ℝ) (n : ℕ) : + taylorDifferentialOperator (fun z => exp ((a : ℂ) * z + (s : ℂ) * z ^ 2)) (X ^ n) = + hermiteHomogeneous (X + C a) (C s) n := by + rw [taylorDifferentialOperator_X_pow] + have hdata (k : ℕ) : + (iteratedDeriv k (fun z => exp ((a : ℂ) * z + (s : ℂ) * z ^ 2)) 0).re = + hermiteHomogeneous a s k := by + rw [iteratedDeriv_exp_quadratic_zero] + have hm : ((hermiteHomogeneous a s k : ℝ) : ℂ) = + hermiteHomogeneous (a : ℂ) (s : ℂ) k := + map_hermiteHomogeneous ofRealHom a s k + rw [← hm] + rfl + ext k + rw [coeff_reflect, coeff_hermiteHomogeneous_affine] + by_cases hk : k ≤ n + · rw [revAt_le hk, coeff_jensenPolynomial, ite_eq_left (Nat.sub_le _ _), hdata, + Nat.choose_symm hk] + · rw [revAt_eq_self_of_lt (lt_of_not_ge hk), coeff_jensenPolynomial, + ite_eq_right hk, Nat.choose_eq_zero_of_lt (lt_of_not_ge hk), Nat.cast_zero, zero_mul] + +/-- The finite Taylor operator of a quadratic exponential is its Hermite basis transform. -/ +theorem taylor_exp_quadratic_eq_basisTransform (a s : ℝ) (p : ℝ[X]) : + taylorDifferentialOperator (fun z => exp ((a : ℂ) * z + (s : ℂ) * z ^ 2)) p = + basisTransform (fun n => hermiteHomogeneous (X + C a) (C s) n) p := by + rw [taylorDifferentialOperator_eq_basisTransform] + simp only [taylor_exp_quadratic_X_pow] + +/-- A linear exponential symbol acts by real translation of the input. -/ +theorem taylor_exp_linear_eq_comp (a : ℝ) (p : ℝ[X]) : + taylorDifferentialOperator (fun z => exp ((a : ℂ) * z)) p = p.comp (X + C a) := by + have heq := taylor_exp_quadratic_eq_basisTransform a 0 p + simp only [ofReal_zero, zero_mul, add_zero, map_zero, + hermiteHomogeneous_zero_right] at heq + rw [heq] + clear heq + induction p using Polynomial.induction_on' with + | add p q hp hq => rw [basisTransform_add, add_comp, hp, hq] + | monomial n c => simp [basisTransform_monomial, monomial_comp] + +/-- A strictly negative Gaussian parameter makes every nonzero real-rooted +polynomial input simple-real-rooted. -/ +theorem simple_taylor_exp_quadratic (a : ℝ) {s : ℝ} (hs : s < 0) + {p : ℝ[X]} (hp0 : p ≠ 0) (hp : p.Splits) : + IsSimpleRealRooted + (taylorDifferentialOperator (fun z => exp ((a : ℂ) * z + (s : ℂ) * z ^ 2)) p) := by + rw [taylor_exp_quadratic_eq_basisTransform] + apply isSimpleRealRooted_basisTransform_of_raising (a := 1) (b := a) (c := -2 * s) + (by simp) (by norm_num) (by nlinarith) _ hp hp0 + intro n + simpa using hermiteHomogeneous_affine_raising a s n + +/-- Nonpositive Gaussian parameters preserve splitting, including zero +inputs and the translation boundary at parameter zero. -/ +theorem splits_taylor_exp_quadratic (a : ℝ) {s : ℝ} (hs : s ≤ 0) + {p : ℝ[X]} (hp : p.Splits) : + (taylorDifferentialOperator (fun z => exp ((a : ℂ) * z + (s : ℂ) * z ^ 2)) p).Splits := by + rcases hs.lt_or_eq with hs | rfl + · by_cases hp0 : p = 0 + · simp [hp0, taylorDifferentialOperator] + · exact (simple_taylor_exp_quadratic a hs hp0 hp).2.1 + · simpa only [ofReal_zero, zero_mul, add_zero, taylor_exp_linear_eq_comp] + using hp.comp_X_add_C a + +end RealRooted diff --git a/RealRooted/Hermite/Generalized/Basic.lean b/RealRooted/Hermite/Generalized/Basic.lean new file mode 100644 index 000000000..a0320e785 --- /dev/null +++ b/RealRooted/Hermite/Generalized/Basic.lean @@ -0,0 +1,53 @@ +module + +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.FieldSimp + +/-! +# Generalized Hermite polynomials as finite differential sums + +For positive `p`, `generalizedHermite p d` is the finite action +`exp (-D^p) X^d`. Its definition uses polynomial derivatives, so no analytic +convergence convention is needed. At `p = 0` the finite definition is retained +without identifying it with an exponential operator. +-/ + +public section + +open Polynomial Finset + +namespace RealRooted + +/-- The finite exponential of a power of differentiation, evaluated on `X^d`. +The interpretation as `exp (-D^p) X^d` is for positive `p`. -/ +@[expose] noncomputable def generalizedHermite (p d : ℕ) : ℝ[X] := + ∑ k ∈ range (d / p + 1), + C ((-1 : ℝ) ^ k / k.factorial) * (derivative^[p * k]) (X ^ d) + +/-- The finite derivative definition has the usual factorial expansion. -/ +theorem generalizedHermite_eq_sum (p d : ℕ) : + generalizedHermite p d = + ∑ k ∈ range (d / p + 1), + C ((-1 : ℝ) ^ k * d.factorial / + (k.factorial * (d - p * k).factorial)) * X ^ (d - p * k) := by + unfold generalizedHermite + apply Finset.sum_congr rfl + intro k hk + have hk' : k ≤ d / p := Nat.lt_succ_iff.mp (mem_range.mp hk) + have hpk : p * k ≤ d := + (Nat.mul_le_mul_left p hk').trans (Nat.mul_div_le d p) + have hdesc : (d.descFactorial (p * k) : ℝ) = + d.factorial / (d - p * k).factorial := by + apply (eq_div_iff (by positivity)).mpr + exact_mod_cast (by simpa only [Nat.mul_comm] using Nat.factorial_mul_descFactorial hpk) + rw [iterate_derivative_X_pow_eq_C_mul, ← mul_assoc, ← C_mul, hdesc] + congr 1 + field_simp + +/-- Below the derivative stride, the generalized Hermite polynomial is unchanged. -/ +theorem generalizedHermite_eq_X_pow {p d : ℕ} (h : d < p) : + generalizedHermite p d = X ^ d := by + simp [generalizedHermite, Nat.div_eq_of_lt h] + +end RealRooted diff --git a/RealRooted/Hermite/Generalized/ComplexScaling.lean b/RealRooted/Hermite/Generalized/ComplexScaling.lean new file mode 100644 index 000000000..a1c454bf7 --- /dev/null +++ b/RealRooted/Hermite/Generalized/ComplexScaling.lean @@ -0,0 +1,82 @@ +module + +public import Mathlib.Algebra.Order.Archimedean.Real.Basic + +public import Mathlib.RingTheory.PowerSeries.Exp + +public import Mathlib.RingTheory.PowerSeries.Expand + +public import RealRooted.Hermite.FormalDifferential.Basic + +public import RealRooted.Hermite.Generalized.Basic + +import RealRooted.Hermite.Generalized.DifferentialIdentity +import Mathlib.RingTheory.Polynomial.ScaleRoots +public import Mathlib.Basic.Complex.Basic +import RealRooted.Hermite.Generalized.Monic + +/-! +# Complex scaling of generalized Hermite limits + +If `r^p=-beta`, multiplication of every root by `r` takes the normalized +generalized Hermite polynomial to the limiting polynomial `exp(beta D^p) X^d`. +The polynomial equality includes `r=0`; root multiplicity transfer requires `r!=0`. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted.HermitePoulain + +/-- Every real exponential-stride limit is a complex root scaling of the +normalized generalized Hermite polynomial, with no simplicity assumption. -/ +theorem map_formal_exp_stride_eq_scaleRoots + {p : ℕ} (hp : 0 < p) (d : ℕ) {β : ℝ} {r : ℂ} (hr : (β : ℂ) = -r ^ p) : + (formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ d)).map ofRealHom = ((generalizedHermite p d).map ofRealHom).scaleRoots r := by + ext j + rw [coeff_scaleRoots, natDegree_map, + (generalizedHermite_isMonicOfDegree p d).natDegree_eq] + simp only [coeff_map, formalDifferentialOperator_exp_stride_eq_sum _ hp, natDegree_X_pow, + generalizedHermite, finsetSum_coeff, iterate_derivative_X_pow_eq_C_mul, + coeff_C_mul, map_sum, map_mul, map_div₀, map_pow, map_neg, + map_one, map_natCast, ofRealHom_eq_coe] + rw [Finset.sum_mul] + apply Finset.sum_congr rfl + intro k hk + have hpk : p * k ≤ d := (Nat.mul_le_mul_left p + (Nat.le_of_lt_succ (Finset.mem_range.mp hk))).trans (Nat.mul_div_le d p) + by_cases hj : j = d - p * k + · have hexp : d - j = p * k := by lia + have hrpow : (β : ℂ) ^ k = (-1 : ℂ) ^ k * r ^ (p * k) := by + rw [hr, neg_pow, pow_mul] + simp only [hexp, hrpow] + ring + · simp [coeff_natCast_mul, coeff_X_pow, hj] + +/-- The full root multiset of a nondegenerate exponential-stride limit is +obtained by multiplying the generalized Hermite roots by a chosen complex scale. -/ +theorem roots_formal_exp_stride_eq_map + {p : ℕ} (hp : 0 < p) (d : ℕ) {β : ℝ} {r : ℂ} + (hr : (β : ℂ) = -r ^ p) (hr0 : r ≠ 0) : + ((formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ d)).map ofRealHom).roots = + ((generalizedHermite p d).map ofRealHom).roots.map (r * ·) := by + rw [map_formal_exp_stride_eq_scaleRoots hp d hr, + roots_scaleRoots _ (isUnit_iff_ne_zero.mpr hr0)] + +/-- Nonzero complex root scaling preserves each generalized Hermite multiplicity. -/ +theorem rootMultiplicity_formal_exp_stride + {p : ℕ} (hp : 0 < p) (d : ℕ) {β : ℝ} {r : ℂ} + (hr : (β : ℂ) = -r ^ p) (hr0 : r ≠ 0) (z : ℂ) : + ((formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ d)).map ofRealHom).rootMultiplicity (r * z) = + ((generalizedHermite p d).map ofRealHom).rootMultiplicity z := by + rw [map_formal_exp_stride_eq_scaleRoots hp d hr, + rootMultiplicity_scaleRoots _ (isUnit_iff_ne_zero.mpr hr0).isRegular.left] + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/Generalized/Degree.lean b/RealRooted/Hermite/Generalized/Degree.lean new file mode 100644 index 000000000..69e222ff3 --- /dev/null +++ b/RealRooted/Hermite/Generalized/Degree.lean @@ -0,0 +1,34 @@ +module + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +import RealRooted.Hermite.FormalDifferential.Structure + +/-! +# Exact degree of exponential-stride differential images +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- An expanded formal exponential sends a monomial to a monic polynomial +of the same degree, for every real parameter and positive stride. -/ +theorem isMonicOfDegree_formal_exp_stride (β : ℝ) {p : ℕ} (hp : 0 < p) (d : ℕ) : + IsMonicOfDegree (formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ d)) d := by + have h0 : PowerSeries.constantCoeff (PowerSeries.expand p hp.ne' + (PowerSeries.rescale β (PowerSeries.exp ℝ))) = 1 := by + rw [PowerSeries.constantCoeff_expand, ← PowerSeries.coeff_zero_eq_constantCoeff] + simp + refine ⟨?_, formalDifferentialOperator_monic h0 (monic_X.pow d)⟩ + rw [natDegree_formalDifferentialOperator (by rw [h0]; exact one_ne_zero) + (pow_ne_zero d X_ne_zero), natDegree_X_pow] + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/Generalized/DifferentialIdentity.lean b/RealRooted/Hermite/Generalized/DifferentialIdentity.lean new file mode 100644 index 000000000..ee40aaf27 --- /dev/null +++ b/RealRooted/Hermite/Generalized/DifferentialIdentity.lean @@ -0,0 +1,41 @@ +module + +public import Mathlib.Algebra.Order.Archimedean.Real.Basic + +public import RealRooted.Hermite.Generalized.Basic +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +import RealRooted.Hermite.FormalDifferential.ExpandOperator +import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient + +/-! +# Generalized Hermite polynomials as actual formal differential images +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- Expanded formal exponentials act by the finite exponential derivative sum. -/ +theorem formalDifferentialOperator_exp_stride_eq_sum + (β : ℝ) {p : ℕ} (hp : 0 < p) (P : ℝ[X]) : + formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) P = + ∑ k ∈ Finset.range (P.natDegree / p + 1), + C (β ^ k / (k.factorial : ℝ)) * (derivative^[p * k]) P := by + rw [formalDifferentialOperator_expand_eq_sum _ hp] + simp only [PowerSeries.coeff_rescale_exp] + +/-- The normalized negative exponential limit is exactly the generalized Hermite family. -/ +theorem formalDifferentialOperator_exp_neg_stride_X_pow + {p : ℕ} (hp : 0 < p) (d : ℕ) : + formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale (-1) (PowerSeries.exp ℝ))) (X ^ d) = + generalizedHermite p d := by + rw [formalDifferentialOperator_exp_stride_eq_sum _ hp, natDegree_X_pow] + rfl + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/Generalized/ExponentialRoots.lean b/RealRooted/Hermite/Generalized/ExponentialRoots.lean new file mode 100644 index 000000000..7fe022257 --- /dev/null +++ b/RealRooted/Hermite/Generalized/ExponentialRoots.lean @@ -0,0 +1,84 @@ +module + +public import Mathlib.Algebra.Order.Archimedean.Real.Basic + +public import Mathlib.Basic.Complex.Basic + +public import Mathlib.RingTheory.PowerSeries.Exp + +public import Mathlib.RingTheory.PowerSeries.Expand + +public import RealRooted.Hermite.FormalDifferential.Basic + +public import RealRooted.Hermite.Generalized.Basic + +import RealRooted.Hermite.Generalized.ComplexScaling +import RealRooted.Hermite.Generalized.Roots +import Mathlib.Analysis.Complex.Polynomial.Basic + +/-! +# Multiplicities of arbitrary nondegenerate exponential-stride limits +-/ + +public section + +open Polynomial Complex + +namespace RealRooted.HermitePoulain + +/-- Any nonzero real parameter admits a nonzero complex root scale. -/ +private theorem exists_complex_root_scale {p : ℕ} (hp : 0 < p) + {β : ℝ} (hβ : β ≠ 0) : ∃ r : ℂ, r ≠ 0 ∧ (β : ℂ) = -r ^ p := by + obtain ⟨r, hr⟩ := IsAlgClosed.exists_pow_nat_eq (-(β : ℂ)) hp + refine ⟨r, ?_, ?_⟩ + · intro hr0 + rw [hr0, zero_pow hp.ne'] at hr + exact (ofReal_ne_zero.mpr hβ) (neg_eq_zero.mp hr.symm) + · rw [hr, neg_neg] + +/-- Every nondegenerate limit root multiset is a rotated and scaled copy +of the generalized Hermite root multiset. -/ +theorem exists_roots_formal_exp_stride_eq_map + {p : ℕ} (hp : 0 < p) (d : ℕ) {β : ℝ} (hβ : β ≠ 0) : + ∃ r : ℂ, r ≠ 0 ∧ (β : ℂ) = -r ^ p ∧ + ((formalDifferentialOperator + (PowerSeries.expand p hp.ne' (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ d)).map ofRealHom).roots = + ((generalizedHermite p d).map ofRealHom).roots.map (r * ·) := by + obtain ⟨r, hr0, hr⟩ := exists_complex_root_scale hp hβ + exact ⟨r, hr0, hr, roots_formal_exp_stride_eq_map hp d hr hr0⟩ + +/-- The exact zero multiplicity of a nondegenerate stride limit is the +remainder of the input degree modulo the stride. -/ +theorem rootMultiplicity_zero_formal_exp_stride {p s : ℕ} + (hp : 2 ≤ p) (hs : s < p) (q : ℕ) {β : ℝ} (hβ : β ≠ 0) : + ((formalDifferentialOperator + (PowerSeries.expand p (by lia) (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ (s + p * q))).map ofRealHom).rootMultiplicity 0 = s := by + obtain ⟨r, hr0, hr⟩ := exists_complex_root_scale (by lia : 0 < p) hβ + have hscale := rootMultiplicity_formal_exp_stride (by lia : 0 < p) (s + p * q) hr hr0 0 + have hmap := eq_rootMultiplicity_map (p := generalizedHermite p (s + p * q)) + ofRealHom.injective 0 + simp only [mul_zero, map_zero] at hscale hmap + exact hscale.trans (hmap.symm.trans (rootMultiplicity_zero_generalizedHermite hp hs q)) + +/-- Every nonzero complex root of a nondegenerate stride limit is simple. -/ +theorem rootMultiplicity_formal_exp_stride_of_ne_zero {p s : ℕ} + (hp : 2 ≤ p) (hs : s < p) (q : ℕ) {β : ℝ} (hβ : β ≠ 0) {z : ℂ} (hz : z ≠ 0) + (hroot : ((formalDifferentialOperator + (PowerSeries.expand p (by lia) (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ (s + p * q))).map ofRealHom).IsRoot z) : + ((formalDifferentialOperator + (PowerSeries.expand p (by lia) (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ (s + p * q))).map ofRealHom).rootMultiplicity z = 1 := by + obtain ⟨r, hr0, hr⟩ := exists_complex_root_scale (by lia : 0 < p) hβ + have hzscale : r * (z / r) = z := mul_div_cancel₀ z hr0 + have hscaled := hroot + rw [map_formal_exp_stride_eq_scaleRoots (by lia : 0 < p) _ hr, IsRoot.def, + ← hzscale, scaleRoots_eval_mul] at hscaled + have hbase : ((generalizedHermite p (s + p * q)).map ofRealHom).IsRoot (z / r) := + (mul_eq_zero.mp hscaled).resolve_left (pow_ne_zero _ hr0) + rw [← hzscale, rootMultiplicity_formal_exp_stride (by lia : 0 < p) _ hr hr0] + exact rootMultiplicity_generalizedHermite_of_ne_zero hp hs q (div_ne_zero hz hr0) hbase + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/Generalized/JensenIdentity.lean b/RealRooted/Hermite/Generalized/JensenIdentity.lean new file mode 100644 index 000000000..2e896ad6d --- /dev/null +++ b/RealRooted/Hermite/Generalized/JensenIdentity.lean @@ -0,0 +1,68 @@ +module + +public import RealRooted.Hermite.Generalized.Basic +public import RealRooted.MultiplierSequence + +/-! +# A Jensen factorization of generalized Hermite polynomials + +Reversing the finite exponential sum identifies its compressed polynomial +with the Jensen polynomial of an integer-stride Mittag--Leffler function. +All factorials refer to ordinary Taylor coefficients before the Jensen +binomial factors are inserted. +-/ + +public section + +open Polynomial Finset + +namespace RealRooted + +/-- The two reversed parity factors coincide. -/ +private theorem neg_one_pow_sub {q k : ℕ} (hk : k ≤ q) : + (-1 : ℝ) ^ (q - k) = (-1 : ℝ) ^ q * (-1 : ℝ) ^ k := by + have hq : (-1 : ℝ) ^ q = (-1 : ℝ) ^ (q - k) * (-1 : ℝ) ^ k := by + rw [← pow_add, Nat.sub_add_cancel hk] + rw [hq, mul_assoc, ← mul_pow] + norm_num + +/-- The scalar coefficients agree after reversing the summation index. -/ +private theorem generalizedHermite_jensen_scalar (p s q : ℕ) {k : ℕ} (hk : k ≤ q) : + (-1 : ℝ) ^ (q - k) * (s + p * q).factorial / + ((q - k).factorial * (s + p * k).factorial) = + ((-1 : ℝ) ^ q * (s + p * q).factorial / q.factorial) * + ((q.choose k : ℝ) * ((k.factorial : ℝ) / (s + p * k).factorial)) * + (-1 : ℝ) ^ k := by + rw [neg_one_pow_sub hk, Nat.cast_choose ℝ hk] + field_simp + +/-- Exact Jensen normalization, including degree zero and residue zero. -/ +theorem generalizedHermite_eq_jensenPolynomial {p s : ℕ} (hs : s < p) (q : ℕ) : + generalizedHermite p (s + p * q) = + C ((-1 : ℝ) ^ q * (s + p * q).factorial / q.factorial) * X ^ s * + (jensenPolynomial q (fun k ↦ + (k.factorial : ℝ) / (s + p * k).factorial)).comp (-X ^ p) := by + have hp : 0 < p := lt_of_le_of_lt (Nat.zero_le s) hs + have hdiv : (s + p * q) / p = q := by + rw [Nat.add_mul_div_left _ _ hp, Nat.div_eq_of_lt hs, zero_add] + rw [generalizedHermite_eq_sum, hdiv] + conv_lhs => rw [← Finset.sum_range_reflect] + simp only [Nat.add_sub_cancel] + simp only [jensenPolynomial, Polynomial.sum_comp, monomial_comp, Finset.mul_sum] + apply Finset.sum_congr rfl + intro k hk + have hk' : k ≤ q := Nat.lt_succ_iff.mp (mem_range.mp hk) + have hsub : s + p * q - p * (q - k) = s + p * k := by + have heq : p * q = p * (q - k) + p * k := by + rw [← Nat.mul_add, Nat.sub_add_cancel hk'] + lia + rw [hsub, generalizedHermite_jensen_scalar p s q hk'] + have hneg : (-X ^ p : ℝ[X]) ^ k = C ((-1 : ℝ) ^ k) * X ^ (p * k) := by + simp only [map_pow, map_neg, map_one, pow_mul] + rw [← mul_pow] + simp only [neg_one_mul] + rw [hneg] + simp only [map_mul, pow_add] + ring + +end RealRooted diff --git a/RealRooted/Hermite/Generalized/Monic.lean b/RealRooted/Hermite/Generalized/Monic.lean new file mode 100644 index 000000000..cf22c2f6e --- /dev/null +++ b/RealRooted/Hermite/Generalized/Monic.lean @@ -0,0 +1,45 @@ +module + +public import RealRooted.Hermite.Generalized.Basic +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree +import Mathlib.Algebra.Polynomial.BigOperators + +/-! +# Exact degree of generalized Hermite polynomials + +The term with zero derivatives supplies the leading monomial; all other +terms have smaller degree. The finite stride-zero convention is also monic. +-/ + +public section + +open Polynomial Finset + +namespace RealRooted + +/-- Generalized Hermite polynomials are monic of the specified degree. -/ +theorem generalizedHermite_isMonicOfDegree (p d : ℕ) : + IsMonicOfDegree (generalizedHermite p d) d := by + by_cases hp : p = 0 + · simpa [generalizedHermite, hp] using isMonicOfDegree_X_pow ℝ d + apply (isMonicOfDegree_iff _ _).mpr + constructor + · unfold generalizedHermite + apply natDegree_sum_le_of_forall_le + intro k _ + exact (natDegree_C_mul_le _ _).trans + ((natDegree_iterate_derivative (X ^ d : ℝ[X]) (p * k)).trans + (by simp only [natDegree_X_pow]; exact Nat.sub_le _ _)) + · rw [generalizedHermite_eq_sum, finsetSum_coeff, Finset.sum_eq_single 0] + · simp [Nat.factorial_ne_zero] + · intro k hk hk0 + have hk' : k ≤ d / p := Nat.lt_succ_iff.mp (mem_range.mp hk) + have hpk : p * k ≤ d := + (Nat.mul_le_mul_left p hk').trans (Nat.mul_div_le d p) + have hpk0 : 0 < p * k := Nat.mul_pos (Nat.pos_of_ne_zero hp) + (Nat.pos_of_ne_zero hk0) + have hlt : d - p * k < d := Nat.sub_lt (hpk0.trans_le hpk) hpk0 + simp only [coeff_C_mul, coeff_X_pow, ite_eq_right (ne_of_gt hlt), mul_zero] + · simp + +end RealRooted diff --git a/RealRooted/Hermite/Generalized/PositiveFactor.lean b/RealRooted/Hermite/Generalized/PositiveFactor.lean new file mode 100644 index 000000000..328781fb6 --- /dev/null +++ b/RealRooted/Hermite/Generalized/PositiveFactor.lean @@ -0,0 +1,58 @@ +module + +public import RealRooted.Hermite.Generalized.Basic +public import RealRooted.SimpleRoots +import RealRooted.Hermite.Generalized.JensenIdentity +import RealRooted.MittagLeffler.Jensen +import RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas + +/-! +# The positive compressed factor of a generalized Hermite polynomial + +The factorial Jensen polynomial has simple negative roots. Reflection gives +the positive factor in the generalized Hermite power substitution. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- The reflected factorial Jensen polynomial has simple positive roots. -/ +private theorem factorialJensen_neg_data {p s : ℕ} (hp : 2 ≤ p) (hs : s < p) + (q : ℕ) : + let Q := (jensenPolynomial q + (fun k ↦ (k.factorial : ℝ) / (s + p * k).factorial)).comp (-X) + IsSimpleRealRooted Q ∧ Q.natDegree = q ∧ ∀ a ∈ Q.roots, 0 < a := by + let J := jensenPolynomial q (fun k ↦ (k.factorial : ℝ) / (s + p * k).factorial) + have hJ := isSimpleRealRooted_jensenPolynomial_factorial_veronese hp hs q + obtain ⟨hdeg, hneg⟩ := jensenPolynomial_factorial_veronese_degree_roots hs q + have hsimple : HasSimpleRoots (J.comp (-X)) := by + simpa using hJ.2.2.comp_C_mul_X_add_C (a := -1) (b := 0) (by norm_num) + refine ⟨⟨hsimple.ne_zero, hJ.2.1.comp_neg_X, hsimple⟩, ?_, ?_⟩ + · simpa using hdeg + · intro a ha + have hroot : J.IsRoot (-a) := by + simpa only [IsRoot.def, eval_comp, eval_neg, eval_X] using isRoot_of_mem_roots ha + have hlt := hneg (-a) ((mem_roots hJ.1).mpr hroot) + linarith + +/-- A generalized Hermite polynomial has a simple positive-root factor of +the exact quotient degree. The constant and zero-degree cases are included. -/ +theorem generalizedHermite_eq_C_mul_X_pow_comp {p s : ℕ} + (hp : 2 ≤ p) (hs : s < p) (q : ℕ) : + ∃ (c : ℝ) (Q : ℝ[X]), c ≠ 0 ∧ + generalizedHermite p (s + p * q) = C c * (X ^ s * Q.comp (X ^ p)) ∧ + IsSimpleRealRooted Q ∧ Q.natDegree = q ∧ ∀ a ∈ Q.roots, 0 < a := by + let c : ℝ := (-1 : ℝ) ^ q * (s + p * q).factorial / q.factorial + let Q := (jensenPolynomial q + (fun k ↦ (k.factorial : ℝ) / (s + p * k).factorial)).comp (-X) + refine ⟨c, Q, ?_, ?_, factorialJensen_neg_data hp hs q⟩ + · exact div_ne_zero (mul_ne_zero (pow_ne_zero q (by norm_num)) (by positivity)) + (by positivity) + · rw [generalizedHermite_eq_jensenPolynomial hs q] + simp only [Q, comp_assoc, neg_comp, X_comp] + ring + +end RealRooted diff --git a/RealRooted/Hermite/Generalized/Product.lean b/RealRooted/Hermite/Generalized/Product.lean new file mode 100644 index 000000000..e3934141a --- /dev/null +++ b/RealRooted/Hermite/Generalized/Product.lean @@ -0,0 +1,98 @@ +module + +public import RealRooted.Hermite.Generalized.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import RealRooted.Hermite.Generalized.Monic +import RealRooted.Hermite.Generalized.PositiveFactor +import Mathlib.FieldTheory.KummerExtension + +/-! +# Root-of-unity products for generalized Hermite polynomials + +Kim--Kim (2015), Theorem 2.2: the nonzero roots occur in full root-of-unity +orbits generated by distinct positive real numbers. The empty product also +covers degrees smaller than the derivative stride. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Monicity cancels the scalar in a split compressed factorization. -/ +private theorem monic_power_factor_product {P Q : ℝ[X]} {c : ℝ} {p s : ℕ} + (hp : p ≠ 0) (hP : P.Monic) (hQ : Q.Splits) + (hfactor : P = C c * (X ^ s * Q.comp (X ^ p))) : + P = X ^ s * (Q.roots.map (fun a ↦ X ^ p - C a)).prod := by + have hdeg : (X ^ p : ℝ[X]).natDegree ≠ 0 := by simpa using hp + have hlc : c * Q.leadingCoeff = 1 := by + have h := congrArg leadingCoeff hfactor + simpa only [hP.leadingCoeff, leadingCoeff_mul, leadingCoeff_C, + leadingCoeff_pow, leadingCoeff_X, one_pow, one_mul, + leadingCoeff_comp hdeg, mul_one] using h.symm + calc + P = C c * (X ^ s * + (C Q.leadingCoeff * (Q.roots.map (X - C ·)).prod).comp (X ^ p)) := by + rw [← hQ.eq_prod_roots] + exact hfactor + _ = C (c * Q.leadingCoeff) * + (X ^ s * (Q.roots.map (fun a ↦ X ^ p - C a)).prod) := by + simp only [mul_comp, C_comp, multiset_prod_comp, Multiset.map_map, + Function.comp_def, sub_comp, X_comp, C_comp, map_mul] + ring + _ = X ^ s * (Q.roots.map (fun a ↦ X ^ p - C a)).prod := by + rw [hlc, map_one, one_mul] + +/-- The real binomial product has distinct positive radii and no scalar factor. -/ +theorem generalizedHermite_eq_prod_X_pow_sub_pow {p s : ℕ} + (hp : 2 ≤ p) (hs : s < p) (q : ℕ) : + ∃ R : Multiset ℝ, R.Nodup ∧ R.card = q ∧ (∀ r ∈ R, 0 < r) ∧ + generalizedHermite p (s + p * q) = + X ^ s * (R.map (fun r ↦ X ^ p - C (r ^ p))).prod := by + obtain ⟨c, Q, _, hfactor, hQ, hdeg, hpos⟩ := + generalizedHermite_eq_C_mul_X_pow_comp hp hs q + have hp0 : p ≠ 0 := by lia + have heq := monic_power_factor_product hp0 + (generalizedHermite_isMonicOfDegree p (s + p * q)).monic hQ.2.1 hfactor + let R := Q.roots.map (fun a ↦ a ^ (p : ℝ)⁻¹) + have hpow (a : ℝ) (ha : a ∈ Q.roots) : (a ^ (p : ℝ)⁻¹) ^ p = a := + Real.rpow_inv_natCast_pow (hpos a ha).le hp0 + refine ⟨R, ?_, ?_, ?_, ?_⟩ + · apply Multiset.Nodup.map_on _ hQ.2.2.roots_nodup + intro a ha b hb hab + have h := congrArg (fun x : ℝ ↦ x ^ p) hab + simpa only [hpow a ha, hpow b hb] using h + · exact (Multiset.card_map _ _).trans (hQ.2.1.natDegree_eq_card_roots.symm.trans hdeg) + · intro r hr + obtain ⟨a, ha, rfl⟩ := Multiset.mem_map.mp hr + exact Real.rpow_pos_of_pos (hpos a ha) _ + · rw [heq] + congr 1 + dsimp only [R] + rw [Multiset.map_map] + apply congrArg Multiset.prod + exact Multiset.map_congr rfl (fun a ha ↦ by simp only [Function.comp_def, hpow a ha]) + +/-- Each positive radius contributes its complete orbit under the primitive +`p`th root of unity. Distinct positive radii and the empty product are explicit. -/ +theorem generalizedHermite_eq_rootOfUnity_product {p s : ℕ} + (hp : 2 ≤ p) (hs : s < p) (q : ℕ) : + ∃ R : Multiset ℝ, R.Nodup ∧ R.card = q ∧ (∀ r ∈ R, 0 < r) ∧ + (generalizedHermite p (s + p * q)).map ofRealHom = X ^ s * + (R.map (fun r : ℝ ↦ ∏ k ∈ Finset.range p, + (X - C (exp (2 * Real.pi * I / p) ^ k * (r : ℂ))))).prod := by + obtain ⟨R, hR, hcard, hpos, heq⟩ := + generalizedHermite_eq_prod_X_pow_sub_pow hp hs q + refine ⟨R, hR, hcard, hpos, ?_⟩ + rw [heq, Polynomial.map_mul, Polynomial.map_pow, map_X, Polynomial.map_multiset_prod, + Multiset.map_map] + congr 1 + apply congrArg Multiset.prod + apply Multiset.map_congr rfl + intro r _ + simp only [Function.comp_def, Polynomial.map_sub, Polynomial.map_pow, + map_X, map_C, ofRealHom_eq_coe, ofReal_pow] + exact X_pow_sub_C_eq_prod (isPrimitiveRoot_exp p (by lia)) (by lia) rfl + +end RealRooted diff --git a/RealRooted/Hermite/Generalized/Roots.lean b/RealRooted/Hermite/Generalized/Roots.lean new file mode 100644 index 000000000..c49d24560 --- /dev/null +++ b/RealRooted/Hermite/Generalized/Roots.lean @@ -0,0 +1,79 @@ +module + +public import RealRooted.Hermite.Generalized.Basic +public import Mathlib.Algebra.Polynomial.Roots +public import Mathlib.Basic.Complex.Basic +import RealRooted.Hermite.Generalized.PositiveFactor +import RealRooted.Mathlib.Algebra.Polynomial.Expand.PowerRoots + +/-! +# Root counts and multiplicities for generalized Hermite polynomials + +For `d = s + p*q`, `p >= 2` and `s < p`, the origin has multiplicity `s`. +There are exactly `q` distinct positive roots. Every nonzero complex root +is simple. These are the multiplicity assertions in Kim--Kim (2015), Theorem 2.2. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- A positive-root polynomial does not vanish at zero. -/ +private theorem eval_zero_ne_zero_of_roots_pos {Q : ℝ[X]} (hQ : Q ≠ 0) + (hpos : ∀ a ∈ Q.roots, 0 < a) : Q.eval 0 ≠ 0 := by + intro h + exact (lt_irrefl (0 : ℝ)) (hpos 0 ((mem_roots hQ).mpr h)) + +/-- The origin multiplicity is the remainder modulo the derivative stride. -/ +theorem rootMultiplicity_zero_generalizedHermite {p s : ℕ} + (hp : 2 ≤ p) (hs : s < p) (q : ℕ) : + (generalizedHermite p (s + p * q)).rootMultiplicity 0 = s := by + obtain ⟨c, Q, hc, hfactor, hQ, _, hpos⟩ := + generalizedHermite_eq_C_mul_X_pow_comp hp hs q + rw [hfactor, rootMultiplicity_C_mul hc] + exact rootMultiplicity_zero_X_pow_mul_comp + (eval_zero_ne_zero_of_roots_pos hQ.1 hpos) (by lia) s + +/-- The number of distinct positive roots is the quotient by the derivative stride. -/ +theorem card_pos_roots_generalizedHermite {p s : ℕ} + (hp : 2 ≤ p) (hs : s < p) (q : ℕ) : + ((generalizedHermite p (s + p * q)).roots.toFinset.filter (0 < ·)).card = q := by + obtain ⟨c, Q, hc, hfactor, hQ, hdeg, hpos⟩ := + generalizedHermite_eq_C_mul_X_pow_comp hp hs q + rw [hfactor, roots_C_mul _ hc, + card_pos_roots_X_pow_mul_comp hQ.1 hpos (by lia) s, + Multiset.toFinset_card_of_nodup hQ.2.2.roots_nodup, + hQ.2.1.natDegree_eq_card_roots.symm, hdeg] + +/-- The complexification of a simple real-rooted polynomial has no multiple root. -/ +private theorem map_eval_derivative_ne_zero {Q : ℝ[X]} (hQ : IsSimpleRealRooted Q) + {z : ℂ} (hz : (Q.map ofRealHom).IsRoot z) : + (Q.map ofRealHom).derivative.eval z ≠ 0 := by + obtain ⟨a, ha⟩ := hQ.2.1.mem_range_of_isRoot hQ.1 hz + have hreal : Q.IsRoot a := by + apply ofRealHom.injective + simpa only [← ha, IsRoot.def, eval_map_apply, map_zero] using hz + have hder := hQ.2.2.eval_derivative_ne_zero hreal + rw [← ha, derivative_map, eval_map_apply] + exact ofReal_ne_zero.mpr hder + +/-- Every nonzero complex root is simple, even when the stride exceeds two. -/ +theorem rootMultiplicity_generalizedHermite_of_ne_zero {p s : ℕ} + (hp : 2 ≤ p) (hs : s < p) (q : ℕ) {z : ℂ} (hz : z ≠ 0) + (hroot : ((generalizedHermite p (s + p * q)).map ofRealHom).IsRoot z) : + ((generalizedHermite p (s + p * q)).map ofRealHom).rootMultiplicity z = 1 := by + obtain ⟨c, Q, hc, hfactor, hQ, _, _⟩ := + generalizedHermite_eq_C_mul_X_pow_comp hp hs q + have hcC : ofRealHom c ≠ 0 := (_root_.map_ne_zero ofRealHom).mpr hc + have hpower : (Q.map ofRealHom).IsRoot (z ^ p) := by + simpa only [hfactor, IsRoot.def, Polynomial.map_mul, map_C, Polynomial.map_pow, + map_X, map_comp, eval_mul, eval_C, eval_pow, eval_X, eval_comp, + mul_eq_zero, hcC, pow_ne_zero s hz, false_or] using hroot + rw [hfactor, Polynomial.map_mul, map_C, Polynomial.map_mul, Polynomial.map_pow, + map_X, map_comp, Polynomial.map_pow, map_X, rootMultiplicity_C_mul hcC] + exact rootMultiplicity_X_pow_mul_comp_of_simple (by lia) s hz hpower + (map_eval_derivative_ne_zero hQ hpower) + +end RealRooted diff --git a/RealRooted/Hermite/Generalized/Separability.lean b/RealRooted/Hermite/Generalized/Separability.lean new file mode 100644 index 000000000..27b4d98c4 --- /dev/null +++ b/RealRooted/Hermite/Generalized/Separability.lean @@ -0,0 +1,71 @@ +module + +public import Mathlib.Algebra.Order.Archimedean.Real.Basic + +public import RealRooted.Hermite.FormalDifferential.Basic +public import Mathlib.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +import Mathlib.FieldTheory.Separable +import RealRooted.Hermite.Generalized.ExponentialRoots +import RealRooted.Hermite.FormalDifferential.Structure +import Mathlib.Analysis.Complex.Polynomial.Basic + +/-! +# Separability of exponential-stride limits + +For a nonzero exponential parameter, the only possible multiple root is at +zero. Its multiplicity is exactly the degree remainder modulo the stride. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted.HermitePoulain + +/-- A nondegenerate exponential-stride limit is separable exactly when +the degree remainder is zero or one. This includes constant inputs. -/ +theorem separable_formal_exp_stride_iff {p : ℕ} (hp : 2 ≤ p) + (d : ℕ) {β : ℝ} (hβ : β ≠ 0) : + (formalDifferentialOperator + (PowerSeries.expand p (by lia) (PowerSeries.rescale β (PowerSeries.exp ℝ))) + (X ^ d)).Separable ↔ d % p ≤ 1 := by + classical + let φ := PowerSeries.expand p (by lia : p ≠ 0) + (PowerSeries.rescale β (PowerSeries.exp ℝ)) + let H := formalDifferentialOperator φ (X ^ d) + have h0 : PowerSeries.constantCoeff φ = 1 := by + dsimp only [φ] + rw [PowerSeries.constantCoeff_expand, ← PowerSeries.coeff_zero_eq_constantCoeff] + simp + have hH : H.Monic := formalDifferentialOperator_monic h0 (monic_X.pow d) + have hs : d % p < p := Nat.mod_lt d (by lia) + have hd : d % p + p * (d / p) = d := Nat.mod_add_div d p + have hzero : (H.map ofRealHom).rootMultiplicity 0 = d % p := by + simpa only [hd] using rootMultiplicity_zero_formal_exp_stride hp hs (d / p) hβ + change H.Separable ↔ d % p ≤ 1 + constructor + · intro h + rw [← hzero] + exact rootMultiplicity_le_one_of_separable h.map 0 + · intro hrem + have hnodup : (H.map ofRealHom).roots.Nodup := by + classical + apply Multiset.nodup_iff_count_le_one.mpr + intro z + rw [count_roots] + by_cases hz : z = 0 + · simpa only [hz, hzero] using hrem + · by_cases hroot : (H.map ofRealHom).IsRoot z + · have hm : (H.map ofRealHom).rootMultiplicity z = 1 := by + simpa only [hd] using + rootMultiplicity_formal_exp_stride_of_ne_zero hp hs (d / p) hβ hz + (by simpa only [hd] using hroot) + exact hm.le + · rw [rootMultiplicity_eq_zero hroot] + exact Nat.zero_le _ + have hc := (nodup_roots_iff_of_splits (hH.map ofRealHom).ne_zero + (IsAlgClosed.splits _)).mp hnodup + exact (separable_map ofRealHom).mp hc + +end RealRooted.HermitePoulain diff --git a/RealRooted/Hermite/GeneratingFunction.lean b/RealRooted/Hermite/GeneratingFunction.lean new file mode 100644 index 000000000..e0a86217f --- /dev/null +++ b/RealRooted/Hermite/GeneratingFunction.lean @@ -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 diff --git a/RealRooted/Hermite/Jensen.lean b/RealRooted/Hermite/Jensen.lean new file mode 100644 index 000000000..4670621f3 --- /dev/null +++ b/RealRooted/Hermite/Jensen.lean @@ -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 diff --git a/RealRooted/Hermite/PolynomialGaussian.lean b/RealRooted/Hermite/PolynomialGaussian.lean new file mode 100644 index 000000000..2b40a50bc --- /dev/null +++ b/RealRooted/Hermite/PolynomialGaussian.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.Hermite.Poulain +public import RealRooted.SimpleRoots +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.Hermite.PoulainSimple +import RealRooted.Hermite.GaussianOperator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorProduct + +/-! +# Strict polynomial–Gaussian differential symbols + +A finite real-rooted differential symbol nonzero at zero preserves simple +real roots. Combining this with strict Gaussian regularization handles +symbols `q(z) exp(a z + s z²)` with `s < 0` and `q(0) ≠ 0`. +-/ + +public section + +open Polynomial Complex RealRooted.HermitePoulain + +namespace RealRooted + +/-- Finite real-rooted differential factors nonzero at zero preserve simple +real-rootedness, regardless of their degree. -/ +theorem simple_operator_of_simple_input {q p : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (hp : IsSimpleRealRooted p) : + IsSimpleRealRooted (applyAsDifferentialOperator q p) := by + have hqne : q ≠ 0 := by intro hz; simp [hz] at hq0 + have hF0 : applyAsDifferentialOperator q p ≠ 0 := by + intro hz + have htop := congrArg (fun u : ℝ[X] => u.coeff p.natDegree) hz + rw [coeff_applyAsDifferentialOperator_natDegree, coeff_zero, coeff_natDegree] at htop + exact mul_ne_zero hq0 (leadingCoeff_ne_zero.mpr hp.1) htop + refine ⟨hF0, (applyAsDifferentialOperator_eq_zero_or_splits + ⟨hqne, hq⟩ ⟨hp.1, hp.2.1⟩).resolve_left hF0, ?_⟩ + intro r hr + have hpos := (rootMultiplicity_pos hF0).mpr hr + by_contra hnot + have hm : 2 ≤ (applyAsDifferentialOperator q p).rootMultiplicity r := by lia + have hback := rootMultiplicity_operator_eq_add_natDegree hq hq0 hp.1 hp.2.1 hm + have hroot : p.IsRoot r := (rootMultiplicity_pos hp.1).mp (by lia) + rw [hp.2.2 r hroot] at hback + lia + +/-- A real-rooted polynomial times a strictly negative Gaussian symbol +strictly regularizes every nonzero real-rooted polynomial input. -/ +theorem simple_taylor_polynomial_gaussian {q p : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (a : ℝ) {s : ℝ} (hs : s < 0) + (hp0 : p ≠ 0) (hp : p.Splits) : + IsSimpleRealRooted (taylorDifferentialOperator + (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z + (s : ℂ) * z ^ 2)) p) := by + rw [taylorDifferentialOperator_polynomial_mul (by fun_prop)] + exact simple_operator_of_simple_input hq hq0 (simple_taylor_exp_quadratic a hs hp0 hp) + +end RealRooted diff --git a/RealRooted/Hermite/PoulainExponential.lean b/RealRooted/Hermite/PoulainExponential.lean new file mode 100644 index 000000000..1b745fc6a --- /dev/null +++ b/RealRooted/Hermite/PoulainExponential.lean @@ -0,0 +1,75 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator + +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +public import RealRooted.Hermite.Poulain +public import RealRooted.SimpleRoots +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.Hermite.PoulainSimple +import RealRooted.Hermite.GaussianOperator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorProduct +import RealRooted.SimpleRoots.Reflection +import RealRooted.Mathlib.Algebra.Polynomial.Reverse + +/-! +# Exponential–polynomial differential symbols + +Multiplication by a real exponential translates the polynomial input before +applying the finite symbol. This gives the simple-root degree range for the +exceptional symbols in Craven–Csordas (1994), Proposition 4.1(2). In fact the +finite multiplicity theorem also includes degree `deg q + 1`. +-/ + +public section + +open Polynomial Complex RealRooted.HermitePoulain + +namespace RealRooted + +/-- An exponential factor translates the input to a finite differential operator. -/ +theorem taylor_polynomial_exp_eq_operator (q p : ℝ[X]) (a : ℝ) : + taylorDifferentialOperator + (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) p = + applyAsDifferentialOperator q (p.comp (X + C a)) := by + rw [taylorDifferentialOperator_polynomial_mul (by fun_prop), taylor_exp_linear_eq_comp] + +/-- In the finite degree range, a polynomial–exponential symbol strictly +regularizes every nonzero split polynomial input. -/ +theorem simple_taylor_polynomial_exp_of_degree {q p : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (a : ℝ) + (hp0 : p ≠ 0) (hp : p.Splits) (hd : p.natDegree - 1 ≤ q.natDegree) : + IsSimpleRealRooted (taylorDifferentialOperator + (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) p) := by + rw [taylor_polynomial_exp_eq_operator] + have hpcomp : p.comp (X + C a) ≠ 0 := by + intro hz + have h := congrArg (fun v : ℝ[X] => v.comp (X - C a)) hz + exact hp0 (by simpa [comp_assoc] using h) + apply isSimpleRealRooted_applyAsDifferentialOperator hq hq0 hpcomp (hp.comp_X_add_C a) + simpa [natDegree_comp] using hd + +/-- The Jensen polynomials of a real-rooted polynomial times a real +exponential have simple roots through degree `deg q + 1`. This contains the +degree range stated in Craven–Csordas Proposition 4.1(2). -/ +theorem simple_jensen_polynomial_exp_of_degree {q : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (a : ℝ) (d : ℕ) + (hd : d - 1 ≤ q.natDegree) : + IsSimpleRealRooted (jensenPolynomial d (fun k => + (iteratedDeriv k (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) 0).re)) := by + have hsimple := simple_taylor_polynomial_exp_of_degree hq hq0 a + (pow_ne_zero d X_ne_zero) (Splits.X.pow d) (by simpa using hd) + rw [taylorDifferentialOperator_X_pow] at hsimple + have hsplit := (splits_reflect_iff (natDegree_jensenPolynomial_le d _)).mp hsimple.2.1 + have hconst : (jensenPolynomial d (fun k => + (iteratedDeriv k (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) 0).re)).coeff 0 + ≠ 0 := by + simp only [coeff_jensenPolynomial, Nat.zero_le, ite_true, Nat.choose_zero_right, + Nat.cast_one, one_mul, iteratedDeriv_zero] + simpa [← coeff_zero_eq_eval_zero] using hq0 + refine ⟨?_, hsplit, hsimple.2.2.of_reflect hconst hsplit (natDegree_jensenPolynomial_le d _)⟩ + intro hz + exact hconst (by simp [hz]) + +end RealRooted diff --git a/RealRooted/Hermite/PoulainJensenSimple.lean b/RealRooted/Hermite/PoulainJensenSimple.lean new file mode 100644 index 000000000..e96c3409b --- /dev/null +++ b/RealRooted/Hermite/PoulainJensenSimple.lean @@ -0,0 +1,85 @@ +module + +public import RealRooted.Hermite.Poulain +public import RealRooted.SimpleRoots +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.Hermite.PoulainSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Closure +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorProduct +import RealRooted.SimpleRoots.Reflection +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Simple Jensen roots for polynomial symbols + +A real-rooted polynomial symbol nonzero at zero has simple Jensen roots in +every degree, including bounds exceeding its own degree. The reflected +differential image may have a multiple zero at the origin; reflection removes +it. This is the polynomial case of Craven–Csordas (1994), Proposition 4.1(1). +It does not assert strictness for arbitrary polynomial inputs. +-/ + +public section + +open Polynomial Complex RealRooted.HermitePoulain + +namespace RealRooted + +/-- The Taylor differential operator of a polynomial symbol agrees with the +finite Hermite–Poulain operator. -/ +theorem taylorDifferentialOperator_polynomial (q p : ℝ[X]) : + taylorDifferentialOperator (fun z => (q.map ofRealHom).eval z) p = + applyAsDifferentialOperator q p := by + rw [taylorDifferentialOperator, applyAsDifferentialOperator_eq_sum_range_right] + apply Finset.sum_congr rfl + intro k _ + have hk : (k.factorial : ℂ) ≠ 0 := by exact_mod_cast k.factorial_ne_zero + simp [iteratedDeriv_fun_eval, eval_zero_iterate_derivative, + mul_div_cancel_left₀ _ hk] + +/-- The differential image of a pure power has no multiple nonzero root +when the real-rooted symbol is nonzero at zero. -/ +theorem simpleExcept_zero_operator_X_pow {q : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (d : ℕ) : + HasSimpleRootsExcept (applyAsDifferentialOperator q (X ^ d)) 0 := by + have hF0 : applyAsDifferentialOperator q (X ^ d) ≠ 0 := by + rw [← taylorDifferentialOperator_polynomial] + apply taylorDifferentialOperator_ne_zero _ (pow_ne_zero d X_ne_zero) + simpa [coeff_zero_eq_eval_zero] using hq0 + intro r hr0 hr + have hpos := (rootMultiplicity_pos hF0).mpr hr + by_contra hnot + have hm : 2 ≤ (applyAsDifferentialOperator q (X ^ d)).rootMultiplicity r := by lia + have hback := rootMultiplicity_operator_eq_add_natDegree hq hq0 + (pow_ne_zero d X_ne_zero) (Splits.X.pow d) hm + have hmult : (X ^ d : ℝ[X]).rootMultiplicity r = 0 := by + apply rootMultiplicity_eq_zero + simpa only [IsRoot.def, eval_pow, eval_X] using pow_ne_zero d hr0 + lia + +/-- Every Jensen polynomial of a real-rooted polynomial symbol with nonzero +constant coefficient has simple real roots, without a degree restriction. -/ +theorem simple_jensenPolynomial_polynomial {q : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (d : ℕ) : + IsSimpleRealRooted (jensenPolynomial d (fun k => (k.factorial : ℝ) * q.coeff k)) := by + have hLP : IsLaguerrePolya (fun z => (q.map ofRealHom).eval z) := by + apply IsLaguerrePolya.of_forall_approx + intro R ε hε + exact ⟨q, Or.inr hq, fun _ _ => by simpa using hε⟩ + have hgamma : (fun k => (iteratedDeriv k (fun z => (q.map ofRealHom).eval z) 0).re) = + (fun k => (k.factorial : ℝ) * q.coeff k) := by + funext k + simp [iteratedDeriv_fun_eval, eval_zero_iterate_derivative] + have hsplit := hLP.jensenPolynomial_splits d + rw [hgamma] at hsplit + have hsimple := simpleExcept_zero_operator_X_pow hq hq0 d + rw [← taylorDifferentialOperator_polynomial, taylorDifferentialOperator_X_pow, + hgamma] at hsimple + have hconst : (jensenPolynomial d (fun k => (k.factorial : ℝ) * q.coeff k)).coeff 0 ≠ 0 := by + simpa [coeff_jensenPolynomial] using hq0 + refine ⟨?_, hsplit, hsimple.of_reflect hconst hsplit (natDegree_jensenPolynomial_le d _)⟩ + intro hz + exact hconst (by simp [hz]) + +end RealRooted diff --git a/RealRooted/Hermite/PoulainSimple.lean b/RealRooted/Hermite/PoulainSimple.lean new file mode 100644 index 000000000..462b165c3 --- /dev/null +++ b/RealRooted/Hermite/PoulainSimple.lean @@ -0,0 +1,107 @@ +module + +public import RealRooted.Hermite.Poulain +import RealRooted.SimpleRoots +public import RealRooted.IteratedDerivativeShift +import RealRooted.Hermite.PoulainSymbolInterlacing + +/-! +# Multiplicity descent for finite differential symbols + +A real-rooted symbol with nonzero constant coefficient preserves degree. +Every multiple output root gains one unit of multiplicity in the input for +each linear symbol factor. Consequently a symbol of degree at least `d - 1` +makes every nonzero real-rooted degree-`d` input simple-real-rooted. + +This is the finite-polynomial multiplicity argument underlying Lemma 4.2 of +Craven and Csordas, *Differential operators of infinite order and the +distribution of zeros of entire functions* (1994). The nonzero constant term +excludes annihilation and is explicit here. +-/ + +public section + +open Polynomial + +namespace RealRooted.HermitePoulain + +/-- A nonzero real symbol root gives an invertible scalar times a derivative shift. -/ +theorem applyAsDifferentialOperator_X_sub_C {r : ℝ} (hr : r ≠ 0) (p : ℝ[X]) : + applyAsDifferentialOperator (X - C r) p = C (-r) * tDeriv r⁻¹ p := by + rw [sub_eq_add_neg, ← map_neg, applyAsDifferentialOperator_X_add_C, tDeriv] + rw [mul_sub, ← mul_assoc, ← C_mul] + simp [hr] + ring + +/-- Products of nonzero real symbol factors preserve splitting and trace +multiple roots backward through every factor. -/ +private theorem root_product_operator_data (s : Multiset ℝ) + (hs : ∀ r ∈ s, r ≠ 0) {p : ℝ[X]} (hp0 : p ≠ 0) (hp : p.Splits) : + let F := applyAsDifferentialOperator (s.map (fun r => X - C r)).prod p + F ≠ 0 ∧ F.Splits ∧ ∀ x, 2 ≤ F.rootMultiplicity x → + p.rootMultiplicity x = F.rootMultiplicity x + s.card := by + induction s using Multiset.induction_on with + | empty => simp [hp0, hp] + | @cons r s ih => + have hr : r ≠ 0 := hs r (by simp) + have htail : ∀ u ∈ s, u ≠ 0 := fun u hu => hs u (Multiset.mem_cons_of_mem hu) + obtain ⟨hF0, hFs, hFm⟩ := ih htail + simp only [Multiset.map_cons, Multiset.prod_cons, applyAsDifferentialOperator_mul, + applyAsDifferentialOperator_X_sub_C hr] + refine ⟨mul_ne_zero (C_ne_zero.mpr (neg_ne_zero.mpr hr)) (tDeriv_ne_zero hF0), + (splits_tDeriv_all hFs).C_mul _, ?_⟩ + intro x hm + rw [rootMultiplicity_C_mul (neg_ne_zero.mpr hr)] at hm ⊢ + have hback := rootMultiplicity_eq_succ_of_tDeriv_ge_two_of_ne (inv_ne_zero hr) hFs hm + have hlarge : 2 ≤ + (applyAsDifferentialOperator (s.map (fun r => X - C r)).prod p).rootMultiplicity x := by + lia + have hprev := hFm x hlarge + simp only [Multiset.card_cons] + lia + +/-- A multiple root of a differential image gains the symbol degree in +multiplicity when traced back to the splitting input. -/ +theorem rootMultiplicity_operator_eq_add_natDegree {q p : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (hp0 : p ≠ 0) (hp : p.Splits) + {x : ℝ} (hm : 2 ≤ (applyAsDifferentialOperator q p).rootMultiplicity x) : + p.rootMultiplicity x = (applyAsDifferentialOperator q p).rootMultiplicity x + q.natDegree := by + have hqne : q ≠ 0 := by intro hz; simp [hz] at hq0 + have hlc : q.leadingCoeff ≠ 0 := leadingCoeff_ne_zero.mpr hqne + have hroots : ∀ r ∈ q.roots, r ≠ 0 := by + intro r hr hz + subst r + apply hq0 + rw [coeff_zero_eq_eval_zero] + exact (mem_roots hqne).mp hr + have heq : applyAsDifferentialOperator q p = + C q.leadingCoeff * + applyAsDifferentialOperator (q.roots.map (fun r => X - C r)).prod p := by + conv_lhs => rw [hq.eq_prod_roots] + exact applyAsDifferentialOperator_C_mul _ _ _ + rw [heq, rootMultiplicity_C_mul hlc] at hm ⊢ + rw [hq.natDegree_eq_card_roots] + exact (root_product_operator_data q.roots hroots hp0 hp).2.2 x hm + +/-- A real-rooted symbol with nonzero constant term and sufficiently many +roots makes every nonzero split input simple-real-rooted. -/ +theorem isSimpleRealRooted_applyAsDifferentialOperator {q p : ℝ[X]} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (hp0 : p ≠ 0) (hp : p.Splits) + (hdegree : p.natDegree - 1 ≤ q.natDegree) : + IsSimpleRealRooted (applyAsDifferentialOperator q p) := by + have hqne : q ≠ 0 := by intro hz; simp [hz] at hq0 + have hF0 : applyAsDifferentialOperator q p ≠ 0 := by + apply leadingCoeff_ne_zero.mp + rw [leadingCoeff_applyAsDifferentialOperator hq0 hp0] + exact mul_ne_zero hq0 (leadingCoeff_ne_zero.mpr hp0) + refine ⟨hF0, (applyAsDifferentialOperator_eq_zero_or_splits + ⟨hqne, hq⟩ ⟨hp0, hp⟩).resolve_left hF0, ?_⟩ + intro x hx + have hpos := (rootMultiplicity_pos hF0).mpr hx + by_contra hnot + have hm : 2 ≤ (applyAsDifferentialOperator q p).rootMultiplicity x := by lia + have hback := rootMultiplicity_operator_eq_add_natDegree hq hq0 hp0 hp hm + have hbound := rootMultiplicity_le_natDegree p x + lia + +end RealRooted.HermitePoulain diff --git a/RealRooted/Interlacing/RootPerturbation.lean b/RealRooted/Interlacing/RootPerturbation.lean new file mode 100644 index 000000000..fd8e0b61d --- /dev/null +++ b/RealRooted/Interlacing/RootPerturbation.lean @@ -0,0 +1,245 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Topology.MetricSpace.Pseudo.Defs + +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree + +public import RealRooted.Basic.ProperPosition +import RealRooted.Mathlib.Analysis.Polynomial.SimpleRootMatching +import RealRooted.SimpleRoots +import RealRooted.Bezoutian.RootEvaluation +import RealRooted.Wronskian.Forward +import TauCeti.Topology.MetricSpace.SeparatedBalls +import Mathlib.Tactic.Linarith + +/-! +# Stability of strict root interlacing + +Coefficient perturbations of a simple adjacent-degree pair preserve its strict +root inequalities. The two perturbations are independent. A common separation +radius for both reference root sets excludes collisions between the two families. +-/ + +public section + +open Polynomial Filter Topology + +noncomputable section + +namespace RealRooted + +/-- Adjacent-degree interlacing without a common root gives strict inequalities +between any increasing enumerations of the roots. -/ +theorem StrictInterl.interlacing_fin_succ {p q : ℝ[X]} {n : ℕ} + (h : StrictInterl p q) (hpdeg : p.natDegree = n) (hqdeg : q.natDegree = n + 1) + (hno : ∀ x, p.IsRoot x → ¬ q.IsRoot x) + (r : Fin n → ℝ) (hr : StrictMono r) (hrroot : ∀ i, p.IsRoot (r i)) + (s : Fin (n + 1) → ℝ) (hs : StrictMono s) (hsroot : ∀ i, q.IsRoot (s i)) : + ∀ i : Fin n, s i.castSucc < r i ∧ r i < s i.succ := by + obtain ⟨_, _, _, ss, rs, hss, hrs, hsseq, hrseq, hinter⟩ := + h.toInterlaces (by lia) + have hsorteq : ss = List.ofFn s := by + have hperm : List.Perm ss (q.roots.sort (· ≤ ·)) := + Multiset.coe_eq_coe.mp (by rw [hsseq, Multiset.sort_eq]) + have hsorted : (q.roots.sort (· ≤ ·)).Pairwise (· ≤ ·) := Multiset.pairwise_sort .. + rw [List.Perm.eq_of_sortedLE hss.sortedLE hsorted.sortedLE hperm] + simpa only [List.ofFn_eq_map] using + Polynomial.roots_sort_eq_of_isRoot h.2.1.1 hqdeg s hsroot hs + have hrorteq : rs = List.ofFn r := by + have hperm : List.Perm rs (p.roots.sort (· ≤ ·)) := + Multiset.coe_eq_coe.mp (by rw [hrseq, Multiset.sort_eq]) + have hsorted : (p.roots.sort (· ≤ ·)).Pairwise (· ≤ ·) := Multiset.pairwise_sort .. + rw [List.Perm.eq_of_sortedLE hrs.sortedLE hsorted.sortedLE hperm] + simpa only [List.ofFn_eq_map] using + Polynomial.roots_sort_eq_of_isRoot h.1.1 hpdeg r hrroot hr + rw [hsorteq, hrorteq] at hinter + intro i + obtain ⟨hleft, hright⟩ := listInterlaces_getElem_le hinter (by simp) i.val (by + simp) + have hleft' : s i.castSucc ≤ r i := by + cases i + simpa only [List.getElem_ofFn, Fin.castSucc_mk] using hleft + have hright' : r i ≤ s i.succ := by + simpa only [List.getElem_ofFn, Fin.eta, Fin.succ] using hright + refine ⟨lt_of_le_of_ne hleft' ?_, lt_of_le_of_ne hright' ?_⟩ + · intro he + exact hno _ (hrroot i) (he ▸ hsroot i.castSucc) + · intro he + exact hno _ (hrroot i) (he.symm ▸ hsroot i.succ) + +/-- Strict inequalities between complete increasing root enumerations give +adjacent-degree interlacing. The degree-zero left endpoint is included. -/ +theorem interlaces_of_interlacing_fin_succ {p q : ℝ[X]} {n : ℕ} + (hp : p ≠ 0) (hps : p.Splits) (hpdeg : p.natDegree = n) + (hq : q ≠ 0) (hqs : q.Splits) (hqdeg : q.natDegree = n + 1) + (r : Fin n → ℝ) (hr : StrictMono r) (hrroot : ∀ i, p.IsRoot (r i)) + (s : Fin (n + 1) → ℝ) (hs : StrictMono s) (hsroot : ∀ i, q.IsRoot (s i)) + (hchain : ∀ i : Fin n, s i.castSucc < r i ∧ r i < s i.succ) : + Interlaces p q := by + have hrseq : p.roots.sort (· ≤ ·) = List.ofFn r := by + simpa only [List.ofFn_eq_map] using + Polynomial.roots_sort_eq_of_isRoot hp hpdeg r hrroot hr + have hsseq : q.roots.sort (· ≤ ·) = List.ofFn s := by + simpa only [List.ofFn_eq_map] using + Polynomial.roots_sort_eq_of_isRoot hq hqdeg s hsroot hs + refine ⟨⟨hq, hqs⟩, ⟨hp, hps⟩, by lia, + q.roots.sort (· ≤ ·), p.roots.sort (· ≤ ·), + Multiset.pairwise_sort .., Multiset.pairwise_sort .., + Multiset.sort_eq .., Multiset.sort_eq .., ?_⟩ + rw [hrseq, hsseq] + apply listInterlaces_of_interleaves_of_length (by simp) + exact List.interleaves_ofFn_odd.mpr + ⟨fun i => (hchain i).2.le, fun i => (hchain i).1.le⟩ + +/-- Perturbing separated real points by less than their common radius preserves order. -/ +private theorem lt_of_close_of_separated {T : Finset ℝ} {ε : ℝ} + (hsep : ∀ a ∈ T, ∀ b ∈ T, a ≠ b → 2 * ε < dist a b) + {a b a' b' : ℝ} (ha : a ∈ T) (hb : b ∈ T) + (hab : a < b) (ha' : |a' - a| < ε) (hb' : |b' - b| < ε) : a' < b' := by + have hgap := hsep a ha b hb hab.ne + rw [Real.dist_eq, abs_of_neg (sub_neg.mpr hab)] at hgap + obtain ⟨ha₁, ha₂⟩ := abs_lt.mp ha' + obtain ⟨hb₁, hb₂⟩ := abs_lt.mp hb' + linarith + +/-- Separated reference root sets remain disjoint under two small root matchings. -/ +private theorem no_common_root_of_close_matchings {p q P Q : ℝ[X]} + {e d : ℝ → ℝ} {ε : ℝ} (hPne : P ≠ 0) (hQne : Q ≠ 0) + (hno : ∀ x, p.IsRoot x → ¬ q.IsRoot x) + (hsep : ∀ a ∈ p.roots, ∀ b ∈ q.roots, a ≠ b → 2 * ε < dist a b) + (he : Set.SurjOn e p.roots.toFinset P.roots.toFinset) + (hd : Set.SurjOn d q.roots.toFinset Q.roots.toFinset) + (heclose : ∀ a ∈ p.roots, |e a - a| < ε) + (hdclose : ∀ b ∈ q.roots, |d b - b| < ε) : + ∀ x, P.IsRoot x → ¬ Q.IsRoot x := by + intro x hxP hxQ + obtain ⟨a, ha, hax⟩ := he + (Multiset.mem_toFinset.mpr ((mem_roots hPne).mpr hxP)) + obtain ⟨b, hb, hbx⟩ := hd + (Multiset.mem_toFinset.mpr ((mem_roots hQne).mpr hxQ)) + have hap : a ∈ p.roots := Multiset.mem_toFinset.mp ha + have hbq : b ∈ q.roots := Multiset.mem_toFinset.mp hb + have hab : a ≠ b := by + intro hab + exact hno a (isRoot_of_mem_roots hap) (hab.symm ▸ isRoot_of_mem_roots hbq) + have hgap := hsep a hap b hbq hab + have haclose := heclose a hap + have hbclose := hdclose b hbq + rw [hax] at haclose + rw [hbx] at hbclose + rw [Real.dist_eq] at hgap + have htri := abs_sub_le a x b + rw [abs_sub_comm a x] at htri + linarith + +/-- A common coefficient neighborhood preserves genuine strict interlacing of a +monic adjacent-degree reference pair. Neither perturbed polynomial is assumed +to split. The no-common-root conclusion records strictness beyond `Interlaces`. +The empty lower root list, hence `n = 0`, is included. -/ +theorem exists_coeff_radius_interlaces {p q : ℝ[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) (hq : IsMonicOfDegree q (n + 1)) + (h : StrictInterl p q) (hno : ∀ x, p.IsRoot x → ¬ q.IsRoot x) : + ∃ δ > 0, ∀ P Q : ℝ[X], P.natDegree ≤ n → Q.natDegree ≤ n + 1 → + (∀ k ≤ n, |P.coeff k - p.coeff k| < δ) → + (∀ k ≤ n + 1, |Q.coeff k - q.coeff k| < δ) → + P.natDegree = n ∧ Q.natDegree = n + 1 ∧ + Interlaces P Q ∧ ∀ x, P.IsRoot x → ¬ Q.IsRoot x := by + classical + have hsimple := h.hasSimpleRoots_of_no_common_root fun x hx => hno x hx.1 hx.2 + obtain ⟨r, hr, hrroot⟩ := Polynomial.exists_strictMono_roots h.1.2 hp.natDegree_eq + hsimple.1.roots_nodup + obtain ⟨s, hs, hsroot⟩ := Polynomial.exists_strictMono_roots h.2.1.2 hq.natDegree_eq + hsimple.2.roots_nodup + have hchain := h.interlacing_fin_succ hp.natDegree_eq hq.natDegree_eq hno + r hr hrroot s hs hsroot + let T := p.roots.toFinset ∪ q.roots.toFinset + obtain ⟨ε, hε, _, hsep⟩ := TauCeti.exists_pos_closedBall_subset_and_lt_dist + (T := T) (U := fun _ => Set.univ) (fun _ _ => Filter.univ_mem) + have hpT {x : ℝ} (hx : x ∈ p.roots) : x ∈ T := + Finset.mem_union.mpr (Or.inl (Multiset.mem_toFinset.mpr hx)) + have hqT {x : ℝ} (hx : x ∈ q.roots) : x ∈ T := + Finset.mem_union.mpr (Or.inr (Multiset.mem_toFinset.mpr hx)) + have hrmem (i : Fin n) : r i ∈ p.roots := (mem_roots hp.monic.ne_zero).mpr (hrroot i) + have hsmem (i : Fin (n + 1)) : s i ∈ q.roots := + (mem_roots hq.monic.ne_zero).mpr (hsroot i) + obtain ⟨δp, hδp, hmatchp⟩ := _root_.Polynomial.exists_coeff_radius_roots_bijection + hp h.1.2 hsimple.1.roots_nodup hε + obtain ⟨δq, hδq, hmatchq⟩ := _root_.Polynomial.exists_coeff_radius_roots_bijection + hq h.2.1.2 hsimple.2.roots_nodup hε + refine ⟨min δp δq, lt_min hδp hδq, ?_⟩ + intro P Q hP hQ hPc hQc + obtain ⟨hPdegree, hPs, _, e, he, heclose⟩ := hmatchp P hP + (fun k hk => (hPc k hk).trans_le (min_le_left _ _)) + obtain ⟨hQdegree, hQs, _, d, hd, hdclose⟩ := hmatchq Q hQ + (fun k hk => (hQc k hk).trans_le (min_le_right _ _)) + have hPne : P ≠ 0 := degree_ne_bot.mp (by rw [hPdegree]; exact WithBot.coe_ne_bot) + have hQne : Q ≠ 0 := degree_ne_bot.mp (by rw [hQdegree]; exact WithBot.coe_ne_bot) + have hPn : P.natDegree = n := natDegree_eq_of_degree_eq_some hPdegree + have hQn : Q.natDegree = n + 1 := natDegree_eq_of_degree_eq_some hQdegree + have heroot (i : Fin n) : P.IsRoot (e (r i)) := + isRoot_of_mem_roots (Multiset.mem_toFinset.mp + (he.mapsTo (Multiset.mem_toFinset.mpr (hrmem i)))) + have hdroot (i : Fin (n + 1)) : Q.IsRoot (d (s i)) := + isRoot_of_mem_roots (Multiset.mem_toFinset.mp + (hd.mapsTo (Multiset.mem_toFinset.mpr (hsmem i)))) + have hemono : StrictMono (fun i => e (r i)) := by + intro i j hij + exact lt_of_close_of_separated hsep (hpT (hrmem i)) (hpT (hrmem j)) (hr hij) + (heclose _ (hrmem i)).1 (heclose _ (hrmem j)).1 + have hdmono : StrictMono (fun i => d (s i)) := by + intro i j hij + exact lt_of_close_of_separated hsep (hqT (hsmem i)) (hqT (hsmem j)) (hs hij) + (hdclose _ (hsmem i)).1 (hdclose _ (hsmem j)).1 + have hchain' (i : Fin n) : d (s i.castSucc) < e (r i) ∧ e (r i) < d (s i.succ) := by + exact ⟨lt_of_close_of_separated hsep (hqT (hsmem i.castSucc)) (hpT (hrmem i)) + (hchain i).1 + (hdclose _ (hsmem i.castSucc)).1 (heclose _ (hrmem i)).1, + lt_of_close_of_separated hsep (hpT (hrmem i)) (hqT (hsmem i.succ)) (hchain i).2 + (heclose _ (hrmem i)).1 (hdclose _ (hsmem i.succ)).1⟩ + refine ⟨hPn, hQn, interlaces_of_interlacing_fin_succ hPne hPs hPn hQne hQs hQn + (fun i => e (r i)) hemono heroot (fun i => d (s i)) hdmono hdroot hchain', ?_⟩ + exact no_common_root_of_close_matchings hPne hQne hno + (fun a ha b hb hab => hsep a (hpT ha) b (hqT hb) hab) + he.surjOn hd.surjOn (fun a ha => (heclose a ha).1) (fun b hb => (hdclose b hb).1) + +/-- Two independent finite coefficient limits to a strict adjacent-degree pair +eventually interlace without common roots. This applies equally to two different +windows indexed by one filter. -/ +theorem eventually_interlaces_of_coeff_tendsto + {ι : Type*} {l : Filter ι} {P Q : ι → ℝ[X]} {p q : ℝ[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) (hq : IsMonicOfDegree q (n + 1)) + (h : StrictInterl p q) (hno : ∀ x, p.IsRoot x → ¬ q.IsRoot x) + (hPdeg : ∀ᶠ t in l, (P t).natDegree ≤ n) + (hQdeg : ∀ᶠ t in l, (Q t).natDegree ≤ n + 1) + (hPc : ∀ k ≤ n, Tendsto (fun t => (P t).coeff k) l (𝓝 (p.coeff k))) + (hQc : ∀ k ≤ n + 1, Tendsto (fun t => (Q t).coeff k) l (𝓝 (q.coeff k))) : + ∀ᶠ t in l, (P t).natDegree = n ∧ (Q t).natDegree = n + 1 ∧ + Interlaces (P t) (Q t) ∧ ∀ x, (P t).IsRoot x → ¬ (Q t).IsRoot x := by + obtain ⟨δ, hδ, hclose⟩ := exists_coeff_radius_interlaces hp hq h hno + have hPe : ∀ᶠ t in l, ∀ i : Fin (n + 1), + |(P t).coeff i.val - p.coeff i.val| < δ := by + apply eventually_all.mpr + intro i + have hi : Tendsto (fun t => |(P t).coeff i.val - p.coeff i.val|) l (𝓝 0) := by + simpa only [sub_self, abs_zero] using + ((hPc i.val (Nat.le_of_lt_succ i.is_lt)).sub + (tendsto_const_nhds (x := p.coeff i.val))).abs + exact hi.eventually_lt tendsto_const_nhds hδ + have hQe : ∀ᶠ t in l, ∀ i : Fin (n + 2), + |(Q t).coeff i.val - q.coeff i.val| < δ := by + apply eventually_all.mpr + intro i + have hi : Tendsto (fun t => |(Q t).coeff i.val - q.coeff i.val|) l (𝓝 0) := by + simpa only [sub_self, abs_zero] using + ((hQc i.val (by lia)).sub (tendsto_const_nhds (x := q.coeff i.val))).abs + exact hi.eventually_lt tendsto_const_nhds hδ + filter_upwards [hPdeg, hQdeg, hPe, hQe] with t htP htQ hcP hcQ + exact hclose (P t) (Q t) htP htQ + (fun k hk => hcP ⟨k, by lia⟩) (fun k hk => hcQ ⟨k, by lia⟩) + +end RealRooted diff --git a/RealRooted/Interlacing/SimplePencil.lean b/RealRooted/Interlacing/SimplePencil.lean new file mode 100644 index 000000000..33ec6d0a1 --- /dev/null +++ b/RealRooted/Interlacing/SimplePencil.lean @@ -0,0 +1,127 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Topology.MetricSpace.Pseudo.Defs + +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree + +import RealRooted.Interlacing.RootPerturbation +public import RealRooted.SimpleRoots +public import RealRooted.Basic.Coefficients +import RealRooted.Wronskian.Forward +import RealRooted.Bezoutian.WronskianConverse +import RealRooted.ObreschkoffConverse.Forward +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Simple pencils from strict interlacing + +A coprime adjacent-degree pair has a strictly signed Wronskian. Adding any +multiple of the lower polynomial preserves that Wronskian and therefore excludes +multiple roots of every pencil member. Coefficient perturbations yield uniform +pencil conclusions for all real parameters at once. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted + +/-- A nonzero scalar preserves simple real-rootedness. -/ +theorem IsSimpleRealRooted.C_mul {p : ℝ[X]} (hp : IsSimpleRealRooted p) + {c : ℝ} (hc : c ≠ 0) : IsSimpleRealRooted (C c * p) := + ⟨mul_ne_zero (C_ne_zero.mpr hc) hp.1, hp.2.1.C_mul c, hp.2.2.C_mul hc⟩ + +/-- Every right pencil member of a genuinely strict adjacent-degree pair is +simple and real-rooted. The lower polynomial may be constant. -/ +theorem StrictInterl.isSimpleRealRooted_add_C_mul {p q : ℝ[X]} + (h : StrictInterl p q) (hp : HasPosLeadingCoeff p) (hq : HasPosLeadingCoeff q) + (hdeg : q.natDegree = p.natDegree + 1) + (hno : ∀ x, p.IsRoot x → ¬ q.IsRoot x) (c : ℝ) : + IsSimpleRealRooted (q + C c * p) := by + have hsimple := h.hasSimpleRoots_of_no_common_root fun x hx => hno x hx.1 hx.2 + have hW := wronskian_pos_of_strictInterl_succ hq hp hdeg h + hsimple.2.roots_nodup hsimple.1.roots_nodup (fun x hxq hxp => hno x hxp hxq) + have hsmall : (C c * p).natDegree < q.natDegree := by + have hle := natDegree_C_mul_le c p + lia + have hdegree : (q + C c * p).natDegree = q.natDegree := + natDegree_add_eq_left_of_natDegree_lt hsmall + have hne : q + C c * p ≠ 0 := by + intro hzero + rw [hzero, natDegree_zero] at hdegree + lia + have hsplit : (q + C c * p).Splits := by + simpa only [C_1, one_mul, add_comm] using (allComboRealRooted_of_strictInterl h) c 1 + have hW' (x : ℝ) : + 0 < (q + C c * p).derivative.eval x * p.eval x - + (q + C c * p).eval x * p.derivative.eval x := by + convert hW x using 1 + simp only [derivative_add, derivative_C_mul, eval_add, eval_mul, eval_C] + ring + exact ⟨hne, hsplit, + HasSimpleRoots.of_roots_nodup hne (Polynomial.roots_nodup_of_wronskian_pos hW').2⟩ + +/-- Every nontrivial real linear combination of a genuinely strict adjacent-degree +pair has simple real roots, including the constant endpoint in degree zero. -/ +theorem StrictInterl.isSimpleRealRooted_C_mul_add_C_mul {p q : ℝ[X]} + (h : StrictInterl p q) (hp : HasPosLeadingCoeff p) (hq : HasPosLeadingCoeff q) + (hdeg : q.natDegree = p.natDegree + 1) + (hno : ∀ x, p.IsRoot x → ¬ q.IsRoot x) + (a b : ℝ) (hab : a ≠ 0 ∨ b ≠ 0) : + IsSimpleRealRooted (C a * p + C b * q) := by + by_cases hb : b = 0 + · have ha : a ≠ 0 := hab.resolve_right (fun h => h hb) + have hsimple := h.hasSimpleRoots_of_no_common_root fun x hx => hno x hx.1 hx.2 + simpa only [hb, C_0, zero_mul, add_zero] using + (show IsSimpleRealRooted p from ⟨h.1.1, h.1.2, hsimple.1⟩).C_mul ha + · have hf := (h.isSimpleRealRooted_add_C_mul hp hq hdeg hno (a / b)).C_mul hb + have heq : C b * (q + C (a / b) * p) = C a * p + C b * q := by + rw [mul_add, ← mul_assoc, ← C_mul] + have hscalar : b * (a / b) = a := by + rw [div_eq_mul_inv, mul_left_comm, mul_inv_cancel₀ hb, mul_one] + rw [hscalar, add_comm] + rwa [heq] at hf + +/-- Independent coefficient perturbations of a genuinely strict monic reference +pair eventually yield simple pencils for every nontrivial real parameter pair. -/ +theorem eventually_isSimpleRealRooted_pencil_of_coeff_tendsto + {ι : Type*} {l : Filter ι} {P Q : ι → ℝ[X]} {p q : ℝ[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) (hq : IsMonicOfDegree q (n + 1)) + (h : StrictInterl p q) (hno : ∀ x, p.IsRoot x → ¬ q.IsRoot x) + (hPdeg : ∀ᶠ t in l, (P t).natDegree ≤ n) + (hQdeg : ∀ᶠ t in l, (Q t).natDegree ≤ n + 1) + (hPc : ∀ k ≤ n, Tendsto (fun t => (P t).coeff k) l (𝓝 (p.coeff k))) + (hQc : ∀ k ≤ n + 1, Tendsto (fun t => (Q t).coeff k) l (𝓝 (q.coeff k))) : + ∀ᶠ t in l, ∀ a b : ℝ, a ≠ 0 ∨ b ≠ 0 → + IsSimpleRealRooted (C a * P t + C b * Q t) := by + have hinter := eventually_interlaces_of_coeff_tendsto hp hq h hno hPdeg hQdeg hPc hQc + have hpcoeff : p.coeff n = 1 := by rw [← hp.natDegree_eq, hp.monic.coeff_natDegree] + have hqcoeff : q.coeff (n + 1) = 1 := by rw [← hq.natDegree_eq, hq.monic.coeff_natDegree] + have hPpos : ∀ᶠ t in l, 0 < (P t).coeff n := by + apply tendsto_const_nhds.eventually_lt (hPc n le_rfl) + rw [hpcoeff] + exact zero_lt_one + have hQpos : ∀ᶠ t in l, 0 < (Q t).coeff (n + 1) := by + apply tendsto_const_nhds.eventually_lt (hQc (n + 1) le_rfl) + rw [hqcoeff] + exact zero_lt_one + filter_upwards [hinter, hPpos, hQpos] with t ht hp' hq' + have hPle : HasPosLeadingCoeff (P t) := by + change 0 < (P t).leadingCoeff + rw [leadingCoeff, ht.1] + exact hp' + have hQle : HasPosLeadingCoeff (Q t) := by + change 0 < (Q t).leadingCoeff + rw [leadingCoeff, ht.2.1] + exact hq' + exact ht.2.2.1.toStrictInterl.isSimpleRealRooted_C_mul_add_C_mul hPle hQle + (by rw [ht.1, ht.2.1]) ht.2.2.2 + +end RealRooted diff --git a/RealRooted/Jacobi/GaussianQuadrature.lean b/RealRooted/Jacobi/GaussianQuadrature.lean new file mode 100644 index 000000000..456c6bb72 --- /dev/null +++ b/RealRooted/Jacobi/GaussianQuadrature.lean @@ -0,0 +1,67 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Jacobi.Orthogonality.Integral +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature +import RealRooted.Jacobi.MomentPolynomial +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Gaussian + +/-! +# Gaussian quadrature for shifted Jacobi moments + +The existing monic shifted Jacobi polynomials give positive Gaussian rules +through degree `2 * n - 1` throughout the integrable parameter range. +The empty and one-node boundaries are included. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Distinct shifted Jacobi roots give Gaussian exactness for the native beta +moment functional, without any mass renormalization. -/ +theorem shiftedJacobiMonic_quadrature_exact {n : ℕ} {α β : ℝ} + (hα : -1 < α) (hβ : -1 < β) (x : Fin n → ℝ) (hx : Function.Injective x) + (hroots : ∀ i, (shiftedJacobiMonic n α β).IsRoot (x i)) + {p : ℝ[X]} (hp : p.degree < (2 * n : ℕ)) : + shiftedJacobiFunctional α β p = ∑ i : Fin n, + Lagrange.quadratureWeight (momentFunctionalLinearMap (shiftedJacobiMoment α β)) x i * + p.eval (x i) := by + apply Lagrange.quadrature_exact_monicMomentPolynomial + (shiftedJacobiMoment α β) + (isUnit_iff_ne_zero.mpr (shiftedJacobiMoment_hankel_posDef n hα hβ).det_pos.ne') x hx + · intro i + simpa only [shiftedJacobiMonic_eq_monicMomentPolynomial n hα hβ] using hroots i + · exact hp + +/-- The shifted Jacobi Gaussian rule is exact for the actual beta-weighted +integral on `[0, 1]`. -/ +theorem shiftedJacobiMonic_quadrature_integral {n : ℕ} {α β : ℝ} + (hα : -1 < α) (hβ : -1 < β) (x : Fin n → ℝ) (hx : Function.Injective x) + (hroots : ∀ i, (shiftedJacobiMonic n α β).IsRoot (x i)) + {p : ℝ[X]} (hp : p.degree < (2 * n : ℕ)) : + (∫ t : ℝ in 0..1, shiftedJacobiIntegrand α β p t) = ∑ i : Fin n, + Lagrange.quadratureWeight (momentFunctionalLinearMap (shiftedJacobiMoment α β)) x i * + p.eval (x i) := by + rw [← shiftedJacobiFunctional_eq_integral hα hβ] + exact shiftedJacobiMonic_quadrature_exact hα hβ x hx hroots hp + +/-- Every weight of the shifted Jacobi Gaussian rule is positive, including +the single-node case. -/ +theorem shiftedJacobiMonic_quadratureWeight_pos {n : ℕ} {α β : ℝ} + (hα : -1 < α) (hβ : -1 < β) (x : Fin n → ℝ) (hx : Function.Injective x) + (hroots : ∀ i, (shiftedJacobiMonic n α β).IsRoot (x i)) (i : Fin n) : + 0 < Lagrange.quadratureWeight + (momentFunctionalLinearMap (shiftedJacobiMoment α β)) x i := by + apply Lagrange.quadratureWeight_pos_monicMomentPolynomial + (shiftedJacobiMoment α β) (shiftedJacobiMoment_hankel_posDef n hα hβ) x hx + intro j + simpa only [shiftedJacobiMonic_eq_monicMomentPolynomial n hα hβ] using hroots j + +end RealRooted diff --git a/RealRooted/Jacobi/MomentPolynomial.lean b/RealRooted/Jacobi/MomentPolynomial.lean new file mode 100644 index 000000000..47773cfd6 --- /dev/null +++ b/RealRooted/Jacobi/MomentPolynomial.lean @@ -0,0 +1,82 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment + +public import RealRooted.Jacobi.Orthogonality +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Perturbation +import RealRooted.Favard +import Mathlib.Tactic.Linarith + +/-! +# Jacobi reference polynomials for moment perturbations + +The finite Hankel construction gives exactly the classical monic shifted Jacobi +polynomial. Its positive pairing supplies invertibility throughout the full +integrable parameter range. The reference identification preserves the native, +unnormalized beta moments. +-/ + +public section + +open Polynomial Filter Topology + +noncomputable section + +namespace RealRooted + +/-- With zero Jacobi exponents, the native moments are the uniform moments on `[0, 1]`. -/ +theorem shiftedJacobiMoment_zero_zero (k : ℕ) : + shiftedJacobiMoment 0 0 k = 1 / ((k : ℝ) + 1) := by + simpa only [zero_add, one_div] using + shiftedJacobiMoment_beta_zero (by norm_num : (-1 : ℝ) < 0) k + +/-- Every finite Hankel matrix of shifted Jacobi moments is positive definite +when both exponents exceed `-1`. The empty matrix is included. -/ +theorem shiftedJacobiMoment_hankel_posDef (n : ℕ) {α β : ℝ} + (hα : -1 < α) (hβ : -1 < β) : + (momentHankelMatrix (shiftedJacobiMoment α β) n).PosDef := + momentHankelMatrix_posDef (shiftedJacobiMoment α β) + (shiftedJacobiMomentPairingBilinForm_posDef hα hβ) n + +/-- The monic finite-moment construction agrees with the classical shifted +Jacobi normalization, including degree zero. -/ +theorem shiftedJacobiMonic_eq_monicMomentPolynomial (n : ℕ) {α β : ℝ} + (hα : -1 < α) (hβ : -1 < β) : + shiftedJacobiMonic n α β = monicMomentPolynomial (shiftedJacobiMoment α β) n := by + apply eq_monicMomentPolynomial (shiftedJacobiMoment α β) + (isUnit_iff_ne_zero.mpr (shiftedJacobiMoment_hankel_posDef n hα hβ).det_pos.ne') + ⟨natDegree_shiftedJacobiMonic n hα hβ, monic_shiftedJacobiMonic n hα hβ⟩ + intro i + change shiftedJacobiInner α β (X ^ i.val) (shiftedJacobiMonic n α β) = 0 + rw [shiftedJacobiInner_comm, shiftedJacobiMonic, shiftedJacobiInner_C_mul_left, + shiftedJacobiInner_X_pow_eq_zero hα hβ i.is_lt, mul_zero] + +/-- Adjacent monic shifted Jacobi polynomials have no common real root. -/ +theorem shiftedJacobiMonic_no_common_root_succ (n : ℕ) {α β : ℝ} + (hα : -1 < α) (hβ : -1 < β) (x : ℝ) : + (shiftedJacobiMonic n α β).IsRoot x → + ¬ (shiftedJacobiMonic (n + 1) α β).IsRoot x := by + apply noCommonRoot_succ_of_favard + (shiftedJacobiMonic_satisfiesFavardRecurrence α β hα hβ) + intro k + exact shiftedJacobiSubdiag_pos (k + 1) (by lia) hα hβ + +/-- Convergence of the first `2n` moments to shifted Jacobi moments gives every +coefficient of the monic shifted Jacobi reference polynomial as the limit. -/ +theorem tendsto_coeff_monicMomentPolynomial_shiftedJacobi + {ι : Type*} {l : Filter ι} {μ : ι → ℕ → ℝ} {α β : ℝ} {n : ℕ} + (hα : -1 < α) (hβ : -1 < β) + (hμ : ∀ k < 2 * n, Tendsto (fun t => μ t k) l (𝓝 (shiftedJacobiMoment α β k))) + (k : ℕ) : + Tendsto (fun t => (monicMomentPolynomial (μ t) n).coeff k) l + (𝓝 ((shiftedJacobiMonic n α β).coeff k)) := by + rw [shiftedJacobiMonic_eq_monicMomentPolynomial n hα hβ] + exact tendsto_coeff_monicMomentPolynomial hμ + (isUnit_iff_ne_zero.mpr (shiftedJacobiMoment_hankel_posDef n hα hβ).det_pos.ne') k + +end RealRooted diff --git a/RealRooted/Jacobi/MomentStability.lean b/RealRooted/Jacobi/MomentStability.lean new file mode 100644 index 000000000..135b8a4c7 --- /dev/null +++ b/RealRooted/Jacobi/MomentStability.lean @@ -0,0 +1,84 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import RealRooted.Interlacing.RootPerturbation + +public import RealRooted.SimpleRoots + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment + +public import RealRooted.Jacobi.Orthogonality + +import RealRooted.Jacobi.MomentPolynomial +import RealRooted.Interlacing.SimplePencil +import RealRooted.Jacobi + +/-! +# Cross-family stability at a Jacobi moment limit + +Two independently perturbed moment functionals approaching the same Jacobi +weight give genuine strict interlacing and simple pencils eventually. +-/ + +public section + +open Polynomial Filter Topology + +noncomputable section + +namespace RealRooted + +/-- Moment functionals approaching the same Jacobi weight independently yield +strict adjacent-degree cross-family interlacing. No positivity or splitting of +the approximating moment polynomials is assumed. -/ +theorem eventually_interlaces_jacobi_moment_polynomials + {ι : Type*} {l : Filter ι} {μ ν : ι → ℕ → ℝ} {α β : ℝ} {n : ℕ} + (hα : -1 < α) (hβ : -1 < β) + (hμ : ∀ k < 2 * n, Tendsto (fun t => μ t k) l (𝓝 (shiftedJacobiMoment α β k))) + (hν : ∀ k < 2 * (n + 1), + Tendsto (fun t => ν t k) l (𝓝 (shiftedJacobiMoment α β k))) : + ∀ᶠ t in l, Interlaces (monicMomentPolynomial (μ t) n) + (monicMomentPolynomial (ν t) (n + 1)) ∧ + ∀ x, (monicMomentPolynomial (μ t) n).IsRoot x → + ¬ (monicMomentPolynomial (ν t) (n + 1)).IsRoot x := by + have h := eventually_interlaces_of_coeff_tendsto + (p := shiftedJacobiMonic n α β) (q := shiftedJacobiMonic (n + 1) α β) + ⟨natDegree_shiftedJacobiMonic n hα hβ, monic_shiftedJacobiMonic n hα hβ⟩ + ⟨natDegree_shiftedJacobiMonic (n + 1) hα hβ, + monic_shiftedJacobiMonic (n + 1) hα hβ⟩ + (shiftedJacobiMonic_strictInterl_succ n hα hβ) + (shiftedJacobiMonic_no_common_root_succ n hα hβ) + (P := fun t => monicMomentPolynomial (μ t) n) + (Q := fun t => monicMomentPolynomial (ν t) (n + 1)) + (Filter.Eventually.of_forall fun t => + (isMonicOfDegree_monicMomentPolynomial (μ t) n).natDegree_eq.le) + (Filter.Eventually.of_forall fun t => + (isMonicOfDegree_monicMomentPolynomial (ν t) (n + 1)).natDegree_eq.le) + (fun k _ => tendsto_coeff_monicMomentPolynomial_shiftedJacobi hα hβ hμ k) + (fun k _ => tendsto_coeff_monicMomentPolynomial_shiftedJacobi hα hβ hν k) + exact h.mono fun _ ht => ht.2.2 + +/-- The same cross-family moment limits give simple real-rootedness of every +nontrivial real pencil combination, with one common eventual threshold. -/ +theorem eventually_isSimpleRealRooted_jacobi_moment_pencil + {ι : Type*} {l : Filter ι} {μ ν : ι → ℕ → ℝ} {α β : ℝ} {n : ℕ} + (hα : -1 < α) (hβ : -1 < β) + (hμ : ∀ k < 2 * n, Tendsto (fun t => μ t k) l (𝓝 (shiftedJacobiMoment α β k))) + (hν : ∀ k < 2 * (n + 1), + Tendsto (fun t => ν t k) l (𝓝 (shiftedJacobiMoment α β k))) : + ∀ᶠ t in l, ∀ a b : ℝ, a ≠ 0 ∨ b ≠ 0 → + IsSimpleRealRooted (C a * monicMomentPolynomial (μ t) n + + C b * monicMomentPolynomial (ν t) (n + 1)) := by + filter_upwards [eventually_interlaces_jacobi_moment_polynomials hα hβ hμ hν] + with t ht + have hp := isMonicOfDegree_monicMomentPolynomial (μ t) n + have hq := isMonicOfDegree_monicMomentPolynomial (ν t) (n + 1) + exact ht.1.toStrictInterl.isSimpleRealRooted_C_mul_add_C_mul + (hasPosLeadingCoeff_of_monic hp.monic) (hasPosLeadingCoeff_of_monic hq.monic) + (by rw [hp.natDegree_eq, hq.natDegree_eq]) ht.2 + +end RealRooted diff --git a/RealRooted/Jacobi/Orthogonality/Integral.lean b/RealRooted/Jacobi/Orthogonality/Integral.lean index 84450f467..77dffe5a5 100644 --- a/RealRooted/Jacobi/Orthogonality/Integral.lean +++ b/RealRooted/Jacobi/Orthogonality/Integral.lean @@ -31,6 +31,11 @@ namespace RealRooted def shiftedJacobiWeight (α β x : ℝ) : ℝ := x ^ α * (1 - x) ^ β +/-- Zero Jacobi exponents give the constant unit weight. -/ +@[simp] theorem shiftedJacobiWeight_zero_zero : shiftedJacobiWeight 0 0 = fun _ ↦ 1 := by + funext x + simp only [shiftedJacobiWeight, Real.rpow_zero, mul_one] + /-- A polynomial multiplied by the shifted Jacobi weight. -/ def shiftedJacobiIntegrand (α β : ℝ) (p : ℝ[X]) (x : ℝ) : ℝ := p.eval x * shiftedJacobiWeight α β x diff --git a/RealRooted/Jacobi/RootRates.lean b/RealRooted/Jacobi/RootRates.lean new file mode 100644 index 000000000..ee2df60e1 --- /dev/null +++ b/RealRooted/Jacobi/RootRates.lean @@ -0,0 +1,73 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.Polynomial.Jacobi +public import Mathlib.Algebra.Polynomial.Splits +import RealRooted.Mathlib.Analysis.Polynomial.OrderedRootRates +import RealRooted.Bezoutian.RootEvaluation +import RealRooted.Jacobi + +/-! +# Quantitative ordered-root convergence at a Jacobi reference + +The actual shifted Jacobi family supplies the distinct ordered real reference +roots throughout the integrable parameter range. Any polynomial family with +convergent coefficients and a vanishing coefficient error bound inherits the +same root error rate. +-/ + +public section + +open Filter Topology Polynomial + +namespace RealRooted + +/-- Every monic shifted Jacobi polynomial has an increasing factorization into +its actual real roots. The degree-zero factorization is the empty product. -/ +theorem exists_shiftedJacobiMonic_ordered_factorization (n : ℕ) {α β : ℝ} + (hα : -1 < α) (hβ : -1 < β) : + ∃ r : Fin n → ℝ, StrictMono r ∧ + (∀ i, (shiftedJacobiMonic n α β).IsRoot (r i)) ∧ + shiftedJacobiMonic n α β = ∏ i : Fin n, (Polynomial.X - C (r i)) := by + have hp : IsMonicOfDegree (shiftedJacobiMonic n α β) n := + ⟨natDegree_shiftedJacobiMonic n hα hβ, monic_shiftedJacobiMonic n hα hβ⟩ + obtain ⟨r, hr, hroots⟩ := Polynomial.exists_strictMono_roots + (shiftedJacobiMonic_splits n hα hβ) hp.natDegree_eq + (shiftedJacobiMonic_roots_nodup n hα hβ) + refine ⟨r, hr, hroots, ?_⟩ + simpa only [hp.leadingCoeff_eq, map_one, one_mul] using + Polynomial.splits_eq_C_mul_prod hp.monic.ne_zero hp.natDegree_eq r hroots hr.injective + +/-- A coefficient error rate at an actual shifted Jacobi reference transfers +to one convergent family of ordered simple real roots. -/ +theorem exists_ordered_roots_tendsto_shiftedJacobi + {ι : Type*} {l : Filter ι} {Q : ι → ℝ[X]} {n : ℕ} {α β : ℝ} + (hα : -1 < α) (hβ : -1 < β) + (hdegree : ∀ᶠ t in l, (Q t).natDegree ≤ n) + (hcoeff : ∀ k ≤ n, + Tendsto (fun t ↦ (Q t).coeff k) l (𝓝 ((shiftedJacobiMonic n α β).coeff k))) + {δ : ι → ℝ} (hδ : ∀ᶠ t in l, 0 ≤ δ t) + (hbound : ∀ᶠ t in l, ∀ k ≤ n, + |(Q t).coeff k - (shiftedJacobiMonic n α β).coeff k| ≤ δ t) + (hδlim : Tendsto δ l (𝓝 0)) : + ∃ (r : Fin n → ℝ) (s : ι → Fin n → ℝ) (C : ℝ), 0 < C ∧ StrictMono r ∧ + (∀ i, (shiftedJacobiMonic n α β).IsRoot (r i)) ∧ + (∀ᶠ t in l, (Q t).degree = n ∧ (Q t).Splits ∧ (Q t).roots.Nodup ∧ + StrictMono (s t) ∧ (∀ i, (Q t).IsRoot (s t i)) ∧ + ∀ i, |s t i - r i| ≤ C * δ t) ∧ + ∀ i, Tendsto (fun t ↦ s t i) l (𝓝 (r i)) := by + obtain ⟨r, hr, href, hfactor⟩ := + exists_shiftedJacobiMonic_ordered_factorization n hα hβ + have hp : IsMonicOfDegree (shiftedJacobiMonic n α β) n := + ⟨natDegree_shiftedJacobiMonic n hα hβ, monic_shiftedJacobiMonic n hα hβ⟩ + obtain ⟨s, C, hC, hevent, hslim⟩ := + _root_.Polynomial.exists_ordered_roots_tendsto_of_coeff_bound hp + (shiftedJacobiMonic_splits n hα hβ) (shiftedJacobiMonic_roots_nodup n hα hβ) + r hr hfactor hdegree hcoeff hδ hbound hδlim + exact ⟨r, s, C, hC, hr, href, hevent, hslim⟩ + +end RealRooted diff --git a/RealRooted/Laguerre/NegativeParameters.lean b/RealRooted/Laguerre/NegativeParameters.lean new file mode 100644 index 000000000..164e810bf --- /dev/null +++ b/RealRooted/Laguerre/NegativeParameters.lean @@ -0,0 +1,38 @@ +module + +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +public import Mathlib.Basic.Real.Basic +public import Mathlib.Algebra.Polynomial.Splits +import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Differential +import RealRooted.Laguerre.Roots +import RealRooted.ObreschkoffConverse.Forward + +/-! +# Real Laguerre roots beyond the orthogonality range + +Every generalized Laguerre polynomial splits for parameters at least `-2`. +The parameter-shift identity expresses it as a linear combination of an +interlacing pair in the classical range. This includes both endpoints and +allows mixed-sign roots when the parameter lies strictly between `-2` and `-1`. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Generalized Laguerre polynomials split throughout the extended range +`-2 ≤ α`, including the degenerate parameter endpoints. -/ +theorem generalizedLaguerre_splits_of_neg_two_le (n : ℕ) {α : ℝ} + (hα : -2 ≤ α) : (generalizedLaguerre n α).Splits := by + cases n with + | zero => simp + | succ n => + rw [generalizedLaguerre_succ_eq_sub] + have hpair := generalizedLaguerre_strictInterl_succ n + (show -1 ≤ α + 1 by linarith) + simpa only [map_neg, map_one, one_mul, neg_mul, sub_eq_add_neg, add_comm] using + (allComboRealRooted_of_strictInterl hpair) (-(n + 1 : ℝ)) 1 + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/Analytic.lean b/RealRooted/LaguerreInequalities/Analytic.lean new file mode 100644 index 000000000..b6571a9aa --- /dev/null +++ b/RealRooted/LaguerreInequalities/Analytic.lean @@ -0,0 +1,59 @@ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.Complex.TaylorSeries +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Analytic generalized Laguerre coefficients + +The coefficient of `t^(2n)` in `f(x + i t) f(x - i t)` is the generalized +Laguerre coefficient of order `n`. For a real entire function the product is +even and agrees with the squared modulus on the real axis. +-/ + +@[expose] public section + +open Complex +open scoped ComplexConjugate + +noncomputable section + +namespace RealRooted + +/-- The product of the two opposite imaginary translates of `f` at `x`. -/ +def laguerreProduct (f : ℂ → ℂ) (x : ℝ) (z : ℂ) : ℂ := + f (x + z * I) * f (x - z * I) + +/-- The generalized Laguerre coefficient: the coefficient of `z^(2n)` in the +Taylor expansion of `laguerreProduct f x` at zero. -/ +def laguerreCoefficient (f : ℂ → ℂ) (x : ℝ) (n : ℕ) : ℝ := + (iteratedDeriv (2 * n) (laguerreProduct f x) 0).re / (2 * n).factorial + +/-- The Laguerre product of an entire function is entire. -/ +theorem differentiable_laguerreProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) (x : ℝ) : + Differentiable ℂ (laguerreProduct f x) := by + exact (hf.comp (by fun_prop)).mul (hf.comp (by fun_prop)) + +/-- The Laguerre product is even. -/ +@[simp] +theorem laguerreProduct_neg (f : ℂ → ℂ) (x : ℝ) (z : ℂ) : + laguerreProduct f x (-z) = laguerreProduct f x z := by + simp [laguerreProduct, sub_eq_add_neg, mul_comm] + +/-- Conjugation symmetry is inherited by the Laguerre product. -/ +theorem laguerreProduct_conj {f : ℂ → ℂ} + (hf : ∀ z, f (conj z) = conj (f z)) (x : ℝ) (z : ℂ) : + laguerreProduct f x (conj z) = conj (laguerreProduct f x z) := by + rw [laguerreProduct, laguerreProduct, map_mul, ← hf, ← hf] + simp [mul_comm, sub_eq_add_neg] + +/-- On the real axis the Laguerre product is the squared modulus. -/ +theorem laguerreProduct_ofReal {f : ℂ → ℂ} + (hf : ∀ z, f (conj z) = conj (f z)) (x y : ℝ) : + laguerreProduct f x y = (‖f (x + (y : ℂ) * I)‖ ^ 2 : ℝ) := by + have h : (x : ℂ) - y * I = conj ((x : ℂ) + y * I) := by simp [sub_eq_add_neg] + rw [laguerreProduct, h, hf, mul_conj, normSq_eq_norm_sq] + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AtomMultiplicity.lean b/RealRooted/LaguerreInequalities/AtomMultiplicity.lean new file mode 100644 index 000000000..ef0205c2e --- /dev/null +++ b/RealRooted/LaguerreInequalities/AtomMultiplicity.lean @@ -0,0 +1,58 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import TauCeti.Analysis.Complex.Pick.Nevanlinna +public import Mathlib.Analysis.Analytic.Order +import RealRooted.LaguerreInequalities.AtomicRepresentation +import RealRooted.LaguerreInequalities.MeasureSupport +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Residue +import RealRooted.Mathlib.Analysis.Complex.Pick.Atoms + +/-! +# Nevanlinna atom masses are zero multiplicities + +The residue limit of the logarithmic derivative and the boundary limit of the +Nevanlinna integral identify every atom with the analytic zero multiplicity +divided by `1 + r^2`. In particular, the finite measure gives a summable weighted +sequence of zero multiplicities, without assuming an entire growth bound. +-/ + +public section + +open Complex Filter MeasureTheory Set Topology +open scoped ComplexConjugate + +namespace RealRooted + +/-- Every singleton mass of a finite Nevanlinna measure representing a nonzero +entire function's negative logarithmic derivative is its zero multiplicity +divided by `1 + r^2`. The formula also holds at points that are not zeros. -/ +theorem measureReal_singleton_eq_analyticOrderNatAt_div {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hne : f ≠ 0) {ρ : Measure ℝ} [IsFiniteMeasure ρ] + {b c : ℝ} (hrep : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + -logDeriv f z = (b : ℂ) * z + ∫ x, TauCeti.nevanlinnaKernel z x ∂ρ + c) + (r : ℝ) : ρ.real {r} = (analyticOrderNatAt f (r : ℂ) : ℝ) / (1 + r ^ 2) := by + obtain ⟨w, hw⟩ := Function.ne_iff.mp hne + have ha : AnalyticOnNhd ℂ f univ := fun z _ => hf.analyticAt z + have hfin := ha.analyticOrderAt_ne_top_of_isPreconnected isPreconnected_univ + (x := w) (y := (r : ℂ)) (mem_univ _) (mem_univ _) + (by rw [(hf.analyticAt w).analyticOrderAt_eq_zero.mpr hw]; simp) + have heq := tendsto_nhds_unique + (TauCeti.tendsto_mul_im_of_eq_nevanlinnaKernel_add ρ b c r hrep) + ((hf.analyticAt r).tendsto_mul_im_neg_logDeriv hfin) + apply (eq_div_iff (by positivity : (1 + r ^ 2 : ℝ) ≠ 0)).mpr + simpa only [mul_comm] using heq + +/-- Generalized Laguerre inequalities imply summability of the zero multiplicities +weighted by `1 / (1 + r^2)`, with every real zero counted to its actual order. -/ +theorem summable_analyticOrderNatAt_div_one_add_sq {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (hne : f ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + Summable (fun r : {x : ℝ | f x = 0} => + (analyticOrderNatAt f (r : ℂ) : ℝ) / (1 + (r : ℝ) ^ 2)) := by + obtain ⟨ρ, b, hρ, _, hrep, hs, _⟩ := exists_nevanlinna_supported_on_zeros hf hc h + let _ := hρ + have heq := measureReal_singleton_eq_analyticOrderNatAt_div hf hne hrep + simpa only [heq] using (hasSum_measureReal_real_zeros hf hne hs).summable + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AtomicRepresentation.lean b/RealRooted/LaguerreInequalities/AtomicRepresentation.lean new file mode 100644 index 000000000..59bed99de --- /dev/null +++ b/RealRooted/LaguerreInequalities/AtomicRepresentation.lean @@ -0,0 +1,89 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import TauCeti.Analysis.Complex.Pick.Nevanlinna +public import Mathlib.MeasureTheory.Measure.Support +import RealRooted.LaguerreInequalities.MeasureSupport +import RealRooted.Mathlib.Analysis.Analytic.CountableZeros +import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.Countable + +/-! +# Atomic Nevanlinna sums over real zeros + +A nonzero entire function has countably many real zeros. A finite measure carried +by those zeros is therefore atomic, and its Nevanlinna integral is an absolutely +convergent sum. These statements do not yet identify atom masses with zero +multiplicities. +-/ + +public section + +open Complex MeasureTheory Set +open scoped ComplexConjugate + +namespace RealRooted + +/-- The masses of a finite measure supported on the real zeros of a nonzero +entire function sum to its total mass. -/ +theorem hasSum_measureReal_real_zeros {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hne : f ≠ 0) {ρ : Measure ℝ} [IsFiniteMeasure ρ] + (hs : ρ.support ⊆ {x : ℝ | f x = 0}) : + HasSum (fun r : {x : ℝ | f x = 0} => ρ.real {(r : ℝ)}) (ρ.real univ) := by + have hμ : ∀ᵐ (x : ℝ) ∂ρ, x ∈ {r : ℝ | f r = 0} := + Filter.mem_of_superset ρ.support_mem_ae hs + simpa only [smul_eq_mul, mul_one, integral_const] using + hasSum_integral_of_ae_mem_countable (hf.countable_real_zeroSet hne) hμ + (integrable_const (1 : ℝ)) + +/-- The Nevanlinna integral of a measure supported on a nonzero entire function's +real zeros is its convergent atomic sum over those zeros. -/ +theorem hasSum_nevanlinnaKernel_real_zeros {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hne : f ≠ 0) {ρ : Measure ℝ} [IsFiniteMeasure ρ] + (hs : ρ.support ⊆ {x : ℝ | f x = 0}) {z : ℂ} + (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) : + HasSum (fun r : {x : ℝ | f x = 0} => + (ρ.real {(r : ℝ)} : ℂ) * TauCeti.nevanlinnaKernel z r) + (∫ x, TauCeti.nevanlinnaKernel z x ∂ρ) := by + have hμ : ∀ᵐ (x : ℝ) ∂ρ, x ∈ {r : ℝ | f r = 0} := + Filter.mem_of_superset ρ.support_mem_ae hs + simpa only [Complex.real_smul] using + hasSum_integral_of_ae_mem_countable (hf.countable_real_zeroSet hne) hμ + (TauCeti.integrable_nevanlinnaKernel hz ρ) + +/-- The atomic Nevanlinna sum over real zeros converges absolutely. -/ +theorem summable_norm_nevanlinnaKernel_real_zeros {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hne : f ≠ 0) {ρ : Measure ℝ} [IsFiniteMeasure ρ] + (hs : ρ.support ⊆ {x : ℝ | f x = 0}) {z : ℂ} + (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) : + Summable (fun r : {x : ℝ | f x = 0} => + ρ.real {(r : ℝ)} * ‖TauCeti.nevanlinnaKernel z r‖) := by + have hμ : ∀ᵐ (x : ℝ) ∂ρ, x ∈ {r : ℝ | f r = 0} := + Filter.mem_of_superset ρ.support_mem_ae hs + simpa only [smul_eq_mul] using + (hasSum_integral_of_ae_mem_countable (hf.countable_real_zeroSet hne) hμ + (TauCeti.integrable_nevanlinnaKernel hz ρ).norm).summable + +/-- All generalized Laguerre inequalities give an absolutely convergent atomic +Nevanlinna representation over the actual real zeros, without a growth assumption. -/ +theorem exists_atomic_nevanlinna_neg_logDeriv {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (hne : f ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + ∃ (ρ : Measure ℝ) (b : ℝ), IsFiniteMeasure ρ ∧ 0 ≤ b ∧ + ρ.support ⊆ {x : ℝ | f x = 0} ∧ + HasSum (fun r : {x : ℝ | f x = 0} => ρ.real {(r : ℝ)}) (ρ.real univ) ∧ + ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + HasSum (fun r : {x : ℝ | f x = 0} => + (ρ.real {(r : ℝ)} : ℂ) * TauCeti.nevanlinnaKernel z r) + (-logDeriv f z - (b : ℂ) * z - (-logDeriv f I).re) ∧ + Summable (fun r : {x : ℝ | f x = 0} => + ρ.real {(r : ℝ)} * ‖TauCeti.nevanlinnaKernel z r‖) := by + obtain ⟨ρ, b, hρ, hb, hrep, hs, _⟩ := exists_nevanlinna_supported_on_zeros hf hc h + let _ := hρ + refine ⟨ρ, b, hρ, hb, hs, hasSum_measureReal_real_zeros hf hne hs, ?_⟩ + intro z hz + refine ⟨?_, summable_norm_nevanlinnaKernel_real_zeros hf hne hs hz⟩ + convert hasSum_nevanlinnaKernel_real_zeros hf hne hs hz using 1 + rw [hrep z hz] + ring + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AuxiliaryCounterexample.lean b/RealRooted/LaguerreInequalities/AuxiliaryCounterexample.lean new file mode 100644 index 000000000..1fa2a21b1 --- /dev/null +++ b/RealRooted/LaguerreInequalities/AuxiliaryCounterexample.lean @@ -0,0 +1,126 @@ +module + +public import RealRooted.LaguerreInequalities.AuxiliaryQuartic +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.CompPowCoefficient +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# A counterexample to the fixed-auxiliary converse without a growth hypothesis + +For `p = X^4 + 4` and `f(z) = exp (-z^4)`, every Taylor coefficient of +`∏ j, f(x + α_j t)` is nonnegative at every real `x`, although `f` is not +Laguerre--Pólya. The actual coefficients are calculated by complex differentiation. + +This is a newly derived counterexample to the fixed-auxiliary formulation of +Csordas--Vishnyakova, *The generalized Laguerre inequalities and functions in the +Laguerre--Pólya class* (2013), Conjecture 3.6, p.1649, +https://doi.org/10.2478/s11533-013-0269-x. +It does not contradict their Theorem 3.5 or Cardon's original Theorem 2.1: +those statements impose an additional genus/growth restriction. Nor does it +address a condition requiring positivity for every admissible auxiliary. +-/ + +@[expose] public section + +open Complex Polynomial +open scoped ComplexConjugate + +noncomputable section + +namespace RealRooted + +/-- The explicit real Taylor coefficients of the translated quartic product. -/ +def quarticTranslateCoefficient (x : ℝ) (n : ℕ) : ℝ := + if 4 ∣ n then Real.exp (-4 * x ^ 4) * 16 ^ (n / 4) / (n / 4).factorial else 0 + +private theorem iteratedDeriv_exp_quartic_zero (c : ℂ) (n : ℕ) : + iteratedDeriv n (fun z : ℂ => exp (c * z ^ 4)) 0 = + if 4 ∣ n then (n.factorial : ℂ) * (c ^ (n / 4) / (n / 4).factorial) else 0 := by + have ha : AnalyticAt ℂ (fun z : ℂ => exp (c * z)) 0 := by fun_prop + simpa only [iteratedDeriv_cexp_const_mul, mul_zero, exp_zero, mul_one] using + iteratedDeriv_comp_pow_zero_eq ha (by norm_num : 0 < 4) n + +/-- The explicit coefficients are the actual Taylor coefficients of the entire +translated product, including its zero coefficients. -/ +theorem iteratedDeriv_quarticTranslateProduct_zero (x : ℝ) (n : ℕ) : + iteratedDeriv n (quarticTranslateProduct x) 0 / (n.factorial : ℂ) = + (quarticTranslateCoefficient x n : ℂ) := by + have hp : quarticTranslateProduct x = fun t => exp (-4 * (x : ℂ) ^ 4) * + exp (16 * t ^ 4) := funext (quarticTranslateProduct_eq x) + have hx : exp (-4 * (x : ℂ) ^ 4) = (Real.exp (-4 * x ^ 4) : ℂ) := by + simp only [Complex.ofReal_exp, ofReal_mul, ofReal_neg, ofReal_ofNat, ofReal_pow] + rw [hp, iteratedDeriv_const_mul_field, iteratedDeriv_exp_quartic_zero, hx] + have hn : (n.factorial : ℂ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + by_cases h : 4 ∣ n + · simp only [h, ite_eq_left, quarticTranslateCoefficient, ofReal_div, ofReal_mul, + ofReal_pow, ofReal_ofNat, ofReal_natCast] + field_simp + · simp [h, quarticTranslateCoefficient] + +/-- Every coefficient of the translated quartic product is nonnegative for every +real center, exactly as required by the fixed-auxiliary converse. -/ +theorem quarticTranslateCoefficient_nonneg (x : ℝ) (n : ℕ) : + 0 ≤ quarticTranslateCoefficient x n := by + unfold quarticTranslateCoefficient + split_ifs <;> positivity + +/-- The nonnegative coefficients give a convergent Taylor expansion at every +complex value of the translation parameter. -/ +theorem hasSum_quarticTranslateCoefficient (x : ℝ) (t : ℂ) : + HasSum (fun n => (quarticTranslateCoefficient x n : ℂ) * t ^ n) + (quarticTranslateProduct x t) := by + convert Complex.hasSum_taylorSeries_of_entire + (differentiable_quarticTranslateProduct x) 0 t using 1 + ext n + rw [← iteratedDeriv_quarticTranslateProduct_zero] + simp only [sub_zero, smul_eq_mul, div_eq_mul_inv] + ring + +/-- The standard second generalized Laguerre coefficient of `exp (-z^4)` +is negative at the origin. -/ +theorem laguerreCoefficient_quarticDecay_two : laguerreCoefficient quarticDecay 0 2 = -2 := by + have hp : laguerreProduct quarticDecay 0 = fun z : ℂ => exp (-2 * z ^ 4) := by + funext z + simp only [laguerreProduct, quarticDecay, ofReal_zero, zero_add, zero_sub, + ← Complex.exp_add] + congr 1 + calc + _ = -2 * z ^ 4 * I ^ 4 := by ring + _ = _ := by rw [Complex.I_pow_four]; ring + rw [laguerreCoefficient, hp, iteratedDeriv_exp_quartic_zero] + norm_num + +/-- The quartic exponential is outside the Laguerre--Pólya class, even though +it is real entire, zero-free, and passes every quartic-auxiliary inequality. -/ +theorem not_isLaguerrePolya_quarticDecay : ¬ IsLaguerrePolya quarticDecay := by + intro h + have hn := h.laguerreCoefficient_nonneg 0 2 + rw [laguerreCoefficient_quarticDecay_two] at hn + norm_num at hn + +/-- A fully quantified counterexample to the fixed-auxiliary converse for an +arbitrary nonzero real entire function. The auxiliary is monic, even, has +nonnegative real coefficients and a nonreal zero; every actual Taylor coefficient +of its translated product is a nonnegative real number. -/ +theorem exists_auxiliary_nonneg_not_isLaguerrePolya : + ∃ (p : ℝ[X]) (α : Fin 4 → ℂ) (f : ℂ → ℂ), + p.Monic ∧ HasNonnegCoeffs p ∧ p.comp (-X) = p ∧ + p.map ofRealHom = ∏ j : Fin 4, (X + C (α j)) ∧ + (∃ z : ℂ, (p.map ofRealHom).eval z = 0 ∧ z.im ≠ 0) ∧ + Differentiable ℂ f ∧ (∀ z, f (conj z) = conj (f z)) ∧ (∀ z, f z ≠ 0) ∧ + (∀ (x : ℝ) (k : ℕ), ∃ a : ℝ, 0 ≤ a ∧ + iteratedDeriv k (fun t : ℂ => ∏ j : Fin 4, f (x + α j * t)) 0 / + (k.factorial : ℂ) = (a : ℂ)) ∧ ¬ IsLaguerrePolya f := by + refine ⟨quarticAuxiliary, quarticSlope, quarticDecay, monic_quarticAuxiliary, + hasNonnegCoeffs_quarticAuxiliary, quarticAuxiliary_comp_neg_X, + map_quarticAuxiliary, ⟨1 + I, quarticAuxiliary_nonreal_zero⟩, + differentiable_quarticDecay, quarticDecay_conj, quarticDecay_ne_zero, ?_, + not_isLaguerrePolya_quarticDecay⟩ + intro x k + exact ⟨quarticTranslateCoefficient x k, quarticTranslateCoefficient_nonneg x k, + iteratedDeriv_quarticTranslateProduct_zero x k⟩ + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AuxiliaryGenerating.lean b/RealRooted/LaguerreInequalities/AuxiliaryGenerating.lean new file mode 100644 index 000000000..021c07563 --- /dev/null +++ b/RealRooted/LaguerreInequalities/AuxiliaryGenerating.lean @@ -0,0 +1,109 @@ +module + +public import RealRooted.Basic.Coefficients +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +public import RealRooted.Mathlib.Algebra.Polynomial.MobiusTransform +import RealRooted.Mathlib.Algebra.Polynomial.MobiusTransform.Map +import Mathlib.Tactic.Ring +import Mathlib.Analysis.Complex.Polynomial.Basic + +/-! +# Generating polynomials for an even nonnegative auxiliary + +The homogeneous Möbius transform computes the translated root product without +reciprocals. This is the finite-polynomial step in Cardon's Theorem 2.1. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +private theorem even_natDegree_of_monic {g : ℝ[X]} (hg : g.Monic) + (he : ∀ k, Odd k → g.coeff k = 0) : Even g.natDegree := by + rcases Nat.even_or_odd g.natDegree with h | h + · exact h + · have hz := he _ h + rw [coeff_natDegree, hg.leadingCoeff] at hz + exact (one_ne_zero hz).elim + +private theorem hasNonnegCoeffs_auxiliaryFactor {g : ℝ[X]} + (he : ∀ k, Odd k → g.coeff k = 0) (hc : HasNonnegCoeffs g) (u : ℝ) : + HasNonnegCoeffs (mobiusTransform g.natDegree 0 u 1 0 g) := by + rw [mobiusTransform_eq_sum _ _ _ _ _ le_rfl] + simp only [map_zero, zero_mul, zero_add, map_one, one_mul, add_zero] + apply hasNonnegCoeffs_finsetSum + intro k _ + rcases Nat.even_or_odd k with hk | hk + · rw [← map_pow] + exact (hasNonnegCoeffs_C (hc k)).mul + ((hasNonnegCoeffs_C (hk.pow_nonneg u)).mul + (hasNonnegCoeffs_X.pow (g.natDegree - k))) + · rw [he k hk, map_zero, zero_mul] + exact hasNonnegCoeffs_zero + +/-- The auxiliary translated-product polynomial of a splitting input, +written using the real roots of the input and homogeneous auxiliary factors. -/ +@[expose] noncomputable def auxiliaryGeneratingPolynomial + (g p : ℝ[X]) (x : ℝ) : ℝ[X] := + C (p.leadingCoeff ^ g.natDegree) * + (p.roots.map fun r : ℝ ↦ mobiusTransform g.natDegree 0 (x - r) 1 0 g).prod + +/-- A monic even auxiliary with nonnegative coefficients gives a polynomial +with nonnegative coefficients, including zero inputs and vanishing centers. -/ +theorem hasNonnegCoeffs_auxiliaryGeneratingPolynomial {g : ℝ[X]} (hg : g.Monic) + (he : ∀ k, Odd k → g.coeff k = 0) (hc : HasNonnegCoeffs g) (p : ℝ[X]) (x : ℝ) : + HasNonnegCoeffs (auxiliaryGeneratingPolynomial g p x) := by + apply (hasNonnegCoeffs_C ((even_natDegree_of_monic hg he).pow_nonneg p.leadingCoeff)).mul + induction p.roots using Multiset.induction_on with + | empty => simpa using hasNonnegCoeffs_one + | cons r s ih => + simpa using (hasNonnegCoeffs_auxiliaryFactor he hc (x - r)).mul ih + +private theorem eval_auxiliaryFactor {g : ℝ[X]} (hg : g.Monic) (u : ℝ) (z : ℂ) : + ((mobiusTransform g.natDegree 0 u 1 0 g).map ofRealHom).eval z = + ((g.map ofRealHom).roots.map fun a ↦ (u : ℂ) - a * z).prod := by + rw [map_mobiusTransform] + rw [mobiusTransform_eq_rootFactorProduct g.natDegree _ _ _ _ + (IsAlgClosed.splits (g.map ofRealHom)) (by simp)] + simp only [(hg.map ofRealHom).leadingCoeff, ofRealHom_eq_coe, ofReal_zero, + map_one, one_mul, zero_sub, mul_one, mul_zero, sub_zero, + eval_multiset_prod, Multiset.map_map, Function.comp_apply, eval_add, + eval_mul, eval_C, eval_X] + apply congrArg Multiset.prod + apply Multiset.map_congr rfl + intro a _ + ring + +/-- The homogeneous generating polynomial is exactly the auxiliary +translated product of the input polynomial. -/ +theorem eval_auxiliaryGeneratingPolynomial {g p : ℝ[X]} (hg : g.Monic) + (hp : p.Splits) (x : ℝ) (z : ℂ) : + ((auxiliaryGeneratingPolynomial g p x).map ofRealHom).eval z = + auxiliaryProduct g (fun w ↦ (p.map ofRealHom).eval w) x z := by + have hcard : (g.map ofRealHom).roots.card = g.natDegree := by + rw [← (IsAlgClosed.splits (g.map ofRealHom)).natDegree_eq_card_roots] + simp + have heval (w : ℂ) : (p.map ofRealHom).eval w = + (p.leadingCoeff : ℂ) * (p.roots.map fun r : ℝ ↦ w - (r : ℂ)).prod := by + simpa only [leadingCoeff_map, hp.roots_map, Multiset.map_map, Function.comp_def, + ofRealHom_eq_coe] using (hp.map ofRealHom).eval_eq_prod_roots w + simp only [auxiliaryGeneratingPolynomial, Polynomial.map_mul, map_C, eval_mul, + eval_C, ofRealHom_eq_coe, ofReal_pow, Polynomial.map_multiset_prod, + eval_multiset_prod, Multiset.map_map, Function.comp_apply, eval_auxiliaryFactor hg, + auxiliaryProduct] + simp_rw [heval] + rw [Multiset.prod_map_mul, Multiset.map_const', Multiset.prod_replicate, hcard, + Multiset.prod_map_prod_map] + apply congrArg ((p.leadingCoeff : ℂ) ^ g.natDegree * ·) + apply congrArg Multiset.prod + apply Multiset.map_congr rfl + intro r _ + apply congrArg Multiset.prod + apply Multiset.map_congr rfl + intro a _ + rw [ofReal_sub] + ring + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AuxiliaryProduct.lean b/RealRooted/LaguerreInequalities/AuxiliaryProduct.lean new file mode 100644 index 000000000..5ec9bc27d --- /dev/null +++ b/RealRooted/LaguerreInequalities/AuxiliaryProduct.lean @@ -0,0 +1,54 @@ +module + +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Algebra.Polynomial.Roots +import Mathlib.Analysis.Complex.Polynomial.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.Mathlib.Topology.MetricSpace.Algebra.FiniteProduct +import Mathlib.Analysis.Calculus.Deriv.Mul +import RealRooted.Mathlib.Analysis.Complex.TranslateProductNonzero + +/-! +# Translated products attached to a real auxiliary polynomial + +If `g = product (X + alpha_j)` is monic, its complex roots are `-alpha_j`. +The product below is therefore Cardon's `product f(x + alpha_j*t)`, with every +root counted with multiplicity. The coefficients use ordinary Taylor normalization. +-/ + +public section + +open Complex Filter Polynomial + +namespace RealRooted + +/-- The translated product attached to all complex roots of an auxiliary +polynomial, with multiplicity. Monicity is unnecessary for this definition. -/ +@[expose] noncomputable def auxiliaryProduct (g : ℝ[X]) (f : ℂ → ℂ) + (x : ℝ) (z : ℂ) : ℂ := + ((g.map ofRealHom).roots.map fun r ↦ f ((x : ℂ) - r * z)).prod + +/-- The ordinary Taylor coefficient of the auxiliary translated product. +Structural reality is established separately when using real inequalities. -/ +@[expose] noncomputable def auxiliaryCoefficient (g : ℝ[X]) (f : ℂ → ℂ) + (x : ℝ) (k : ℕ) : ℝ := + (iteratedDeriv k (auxiliaryProduct g f x) 0).re / k.factorial + +/-- Finite auxiliary products of an entire function are entire. -/ +theorem differentiable_auxiliaryProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (g : ℝ[X]) (x : ℝ) : Differentiable ℂ (auxiliaryProduct g f x) := by + exact Complex.differentiable_translateProduct hf _ _ + +/-- Locally uniform limits pass through finite auxiliary products. -/ +theorem tendstoLocallyUniformly_auxiliaryProduct {ι : Type*} {F : ι → ℂ → ℂ} + {f : ℂ → ℂ} {l : Filter ι} (hF : TendstoLocallyUniformly F f l) + (hf : Continuous f) (g : ℝ[X]) (x : ℝ) : + TendstoLocallyUniformly (fun i ↦ auxiliaryProduct g (F i) x) + (auxiliaryProduct g f x) l := by + apply TendstoLocallyUniformly.multiset_prod (s := (g.map ofRealHom).roots) + · intro r _ + exact hF.comp (fun z : ℂ ↦ (x : ℂ) - r * z) (by fun_prop) + · intro r _ + exact hf.comp (by fun_prop) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AuxiliaryQuartic.lean b/RealRooted/LaguerreInequalities/AuxiliaryQuartic.lean new file mode 100644 index 000000000..0333940e7 --- /dev/null +++ b/RealRooted/LaguerreInequalities/AuxiliaryQuartic.lean @@ -0,0 +1,114 @@ +module + +public import RealRooted.Basic.Coefficients +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.FDeriv.Defs +import Mathlib.Analysis.SpecialFunctions.ExpDeriv + +/-! +# A quartic auxiliary polynomial and its translated exponential product + +The even monic polynomial `X^4 + 4` has nonnegative coefficients and nonreal +zeros. Its four slopes cancel the first three mixed powers in the translated +product of `exp (-z^4)`. These are the algebraic ingredients of the counterexample +in `LaguerreInequalities.AuxiliaryCounterexample`. +-/ + +@[expose] public section + +open Complex Polynomial +open scoped ComplexConjugate + +noncomputable section + +namespace RealRooted + +/-- The even quartic auxiliary polynomial `X^4 + 4`. -/ +def quarticAuxiliary : ℝ[X] := X ^ 4 + C 4 + +/-- The four slopes in the factorization of `X^4 + 4`. -/ +def quarticSlope : Fin 4 → ℂ := ![1 + I, 1 - I, -1 + I, -1 - I] + +/-- A real entire zero-free function outside the Laguerre--Pólya class. -/ +def quarticDecay (z : ℂ) : ℂ := exp (-(z ^ 4)) + +/-- The translated product associated to the four quartic slopes. -/ +def quarticTranslateProduct (x t : ℂ) : ℂ := + ∏ j : Fin 4, quarticDecay (x + quarticSlope j * t) + +/-- All coefficients of the quartic auxiliary polynomial are nonnegative. -/ +theorem hasNonnegCoeffs_quarticAuxiliary : HasNonnegCoeffs quarticAuxiliary := + (hasNonnegCoeffs_X.pow 4).add (hasNonnegCoeffs_C (by norm_num)) + +/-- The quartic auxiliary is even as a polynomial, not merely on the real axis. -/ +theorem quarticAuxiliary_comp_neg_X : quarticAuxiliary.comp (-X) = quarticAuxiliary := by + simp only [quarticAuxiliary, add_comp, pow_comp, X_comp, C_comp] + ring + +/-- The quartic auxiliary is monic. -/ +theorem monic_quarticAuxiliary : quarticAuxiliary.Monic := by + exact monic_X_pow_add_C 4 (by norm_num) + +private theorem four_linear_factors {R : Type*} [CommRing R] (z i : R) + (hi : i ^ 2 = -1) : + (z + (1 + i)) * (z + (1 - i)) * (z + (-1 + i)) * (z + (-1 - i)) = + z ^ 4 + 4 := by + calc + _ = z ^ 4 - 2 * z ^ 2 * i ^ 2 - 2 * z ^ 2 + (i ^ 2) ^ 2 - 2 * i ^ 2 + 1 := by + ring + _ = _ := by rw [hi]; ring + +/-- The displayed slopes give the complete monic factorization over the complex numbers. -/ +theorem map_quarticAuxiliary : + quarticAuxiliary.map ofRealHom = ∏ j : Fin 4, (X + C (quarticSlope j)) := by + rw [Fin.prod_univ_four] + simp only [quarticAuxiliary, Polynomial.map_add, Polynomial.map_pow, map_X, + quarticSlope, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val, + map_ofNat] + convert (four_linear_factors (X : ℂ[X]) (C I) ?_).symm using 1 <;> + simp [map_add, map_sub, map_neg, map_one, ← map_pow] + +/-- The auxiliary polynomial has a nonreal zero, as required in Cardon's criterion. -/ +theorem quarticAuxiliary_nonreal_zero : + (quarticAuxiliary.map ofRealHom).eval (1 + I) = 0 ∧ (1 + I).im ≠ 0 := by + constructor + · rw [map_quarticAuxiliary, Fin.prod_univ_four] + simp only [eval_mul, eval_add, eval_X, eval_C, quarticSlope, + Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val] + ring + · simp + +/-- The quartic exponential is entire. -/ +theorem differentiable_quarticDecay : Differentiable ℂ quarticDecay := by + unfold quarticDecay + fun_prop + +/-- The quartic exponential is real entire, expressed by conjugation symmetry. -/ +theorem quarticDecay_conj (z : ℂ) : quarticDecay (conj z) = conj (quarticDecay z) := by + simp [quarticDecay, ← Complex.exp_conj] + +/-- The quartic exponential has no zeros, so in particular is not the zero function. -/ +theorem quarticDecay_ne_zero (z : ℂ) : quarticDecay z ≠ 0 := Complex.exp_ne_zero _ + +/-- The four translated quartic exponentials have a particularly simple product. -/ +theorem quarticTranslateProduct_eq (x t : ℂ) : + quarticTranslateProduct x t = exp (-4 * x ^ 4) * exp (16 * t ^ 4) := by + simp only [quarticTranslateProduct, Fin.prod_univ_four, quarticSlope, + Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val, + quarticDecay, ← Complex.exp_add] + congr 1 + calc + _ = -4 * x ^ 4 - 24 * x ^ 2 * t ^ 2 * (1 + I ^ 2) - + 4 * t ^ 4 * (1 + 6 * I ^ 2 + (I ^ 2) ^ 2) := by ring + _ = _ := by rw [Complex.I_sq]; ring + +/-- The translated quartic product is entire in the translation parameter. -/ +theorem differentiable_quarticTranslateProduct (x : ℂ) : + Differentiable ℂ (quarticTranslateProduct x) := by + have h : quarticTranslateProduct x = fun t => + exp (-4 * x ^ 4) * exp (16 * t ^ 4) := funext (quarticTranslateProduct_eq x) + rw [h] + fun_prop + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AuxiliaryRealZeros.lean b/RealRooted/LaguerreInequalities/AuxiliaryRealZeros.lean new file mode 100644 index 000000000..1291a583c --- /dev/null +++ b/RealRooted/LaguerreInequalities/AuxiliaryRealZeros.lean @@ -0,0 +1,99 @@ +module + +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +import RealRooted.LaguerreInequalities.AuxiliarySymmetry +import RealRooted.Mathlib.Analysis.Complex.TranslateProductNonzero +import Mathlib.Analysis.Complex.TaylorSeries +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# Real zeros detected by an auxiliary with nonzero roots + +This is the analytic core of Cardon's converse. Removing zero auxiliary +roots is a separate step: they are not excluded from the final criterion. +-/ + +public section + +open Complex Polynomial +open scoped ComplexConjugate + +namespace RealRooted + +private theorem hasSum_auxiliaryProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (g : ℝ[X]) (x y : ℝ) : + HasSum (fun n ↦ auxiliaryCoefficient g f x n * y ^ n) + (auxiliaryProduct g f x y).re := by + have h := Complex.hasSum_re + (Complex.hasSum_taylorSeries_of_entire (differentiable_auxiliaryProduct hf g x) 0 + (y : ℂ)) + convert h using 1 + ext n + simp only [auxiliaryCoefficient, sub_zero, smul_eq_mul] + rw [← Complex.div_natCast_re, ← Complex.re_mul_ofReal] + congr 1 + push_cast + ring + +private theorem auxiliaryProduct_eq_zero_of_pos_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) + (g : ℝ[X]) (x : ℝ) (h : ∀ k, 0 ≤ auxiliaryCoefficient g f x k) + {r : ℝ} (hr : 0 < r) (hz : auxiliaryProduct g f x r = 0) : + auxiliaryProduct g f x = 0 := by + have hs := hasSum_auxiliaryProduct hf g x r + rw [hz, zero_re] at hs + have hderiv (k : ℕ) : iteratedDeriv k (auxiliaryProduct g f x) 0 = 0 := by + have hle := le_hasSum hs k (fun j _ ↦ mul_nonneg (h j) (pow_nonneg hr.le j)) + have heq := le_antisymm hle (mul_nonneg (h k) (pow_nonneg hr.le k)) + have ha := (mul_eq_zero.mp heq).resolve_right (pow_ne_zero k hr.ne') + have hd : iteratedDeriv k (auxiliaryProduct g f x) 0 / (k.factorial : ℂ) = 0 := by + rw [← ofReal_auxiliaryCoefficient hc g x k, ha, ofReal_zero] + exact (div_eq_zero_iff.mp hd).resolve_right (by exact_mod_cast k.factorial_ne_zero) + funext z + rw [← Complex.taylorSeries_eq_of_entire' 0 z (differentiable_auxiliaryProduct hf g x)] + simp [hderiv] + +/-- An even auxiliary with a nonreal root and nonzero constant coefficient +detects every nonreal zero of a nonzero real entire function. -/ +theorem im_eq_zero_of_auxiliary_nonneg_of_coeff_zero_ne_zero + {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (hne : f ≠ 0) {g : ℝ[X]} + (he : ∀ k, Odd k → g.coeff k = 0) (h0 : g.coeff 0 ≠ 0) + (ha : ∃ a ∈ (g.map ofRealHom).roots, a.im ≠ 0) + (h : ∀ x k, 0 ≤ auxiliaryCoefficient g f x k) {z : ℂ} (hz : f z = 0) : + z.im = 0 := by + by_contra him + obtain ⟨a, ha, haim⟩ := ha + let t : ℝ := -z.im / a.im + let x : ℝ := z.re + a.re * t + have ht : t ≠ 0 := div_ne_zero (neg_ne_zero.mpr him) haim + have heq : (x : ℂ) - a * (t : ℂ) = z := by + apply Complex.ext + · simp only [sub_re, ofReal_re, mul_re, ofReal_im, mul_zero, sub_zero] + dsimp only [x] + ring + · simp only [sub_im, ofReal_im, mul_im, ofReal_re, mul_zero, zero_add] + dsimp only [t] + field_simp [haim] + ring + have hzero : auxiliaryProduct g f x t = 0 := by + apply Multiset.prod_eq_zero + exact Multiset.mem_map.mpr ⟨a, ha, by rw [heq, hz]⟩ + have habs : auxiliaryProduct g f x (|t| : ℝ) = 0 := by + rcases le_total 0 t with hpos | hneg + · simpa only [abs_of_nonneg hpos] using hzero + · simpa only [abs_of_nonpos hneg, ofReal_neg, auxiliaryProduct_neg he] using hzero + have hs : ∀ r ∈ (g.map ofRealHom).roots, r ≠ 0 := by + intro r hr hr0 + have hg0 : g.map ofRealHom ≠ 0 := ne_zero_of_mem_roots hr + have hv := (mem_roots hg0).mp hr + rw [hr0] at hv + have hz0 : (g.coeff 0 : ℂ) = 0 := by + simpa [IsRoot, coeff_map, ← coeff_zero_eq_eval_zero] using hv + exact h0 (ofReal_eq_zero.mp hz0) + exact (translateProduct_ne_zero hf hne (g.map ofRealHom).roots hs x) + (auxiliaryProduct_eq_zero_of_pos_zero hf hc g x (h x) (abs_pos.mpr ht) habs) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AuxiliarySymmetry.lean b/RealRooted/LaguerreInequalities/AuxiliarySymmetry.lean new file mode 100644 index 000000000..4c505a3e9 --- /dev/null +++ b/RealRooted/LaguerreInequalities/AuxiliarySymmetry.lean @@ -0,0 +1,71 @@ +module + +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +import RealRooted.Mathlib.Algebra.Polynomial.EvenCoefficients +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.Mathlib.Analysis.Complex.TranslateProductContinuity +import Mathlib.Algebra.Polynomial.Splits +import Mathlib.Analysis.Complex.Polynomial.Basic +import RealRooted.Mathlib.Analysis.Complex.Polynomial.JensenDisks + +/-! +# Reality, symmetry and continuity of auxiliary coefficients +-/ + +public section + +open Complex Polynomial +open scoped ComplexConjugate + +namespace RealRooted + +/-- A real auxiliary preserves conjugation compatibility of its translated product. -/ +theorem auxiliaryProduct_conj {f : ℂ → ℂ} + (hf : ∀ z, f (conj z) = conj (f z)) (g : ℝ[X]) (x : ℝ) (z : ℂ) : + auxiliaryProduct g f x (conj z) = conj (auxiliaryProduct g f x z) := by + have h := congrArg + (fun s : Multiset ℂ ↦ (s.map fun r ↦ f ((x : ℂ) - r * conj z)).prod) + (map_conj_roots_map_ofReal g) + have hm : algebraMap ℝ ℂ = ofRealHom := by + ext r + simp + rw [hm] at h + have harg (r : ℂ) : (x : ℂ) - conj r * conj z = conj ((x : ℂ) - r * z) := by simp + simp only [Multiset.map_map, Function.comp_apply] at h + simp_rw [harg, hf] at h + simpa only [auxiliaryProduct, map_multiset_prod, Multiset.map_map, + Function.comp_apply] using h.symm + +/-- An even auxiliary gives an even translated product. -/ +theorem auxiliaryProduct_neg {g : ℝ[X]} + (he : ∀ k, Odd k → g.coeff k = 0) (f : ℂ → ℂ) (x : ℝ) (z : ℂ) : + auxiliaryProduct g f x (-z) = auxiliaryProduct g f x z := by + have hm : (g.map ofRealHom).comp (-X) = g.map ofRealHom := by + simpa only [Polynomial.map_comp, Polynomial.map_neg, map_X] using + congrArg (fun p : ℝ[X] ↦ p.map ofRealHom) + (comp_neg_X_eq_self_of_odd_coeff_eq_zero he) + have hr : (g.map ofRealHom).roots.map (fun r ↦ -r) = (g.map ofRealHom).roots := by + rw [← roots_comp_neg_X, hm] + have h := congrArg + (fun s : Multiset ℂ ↦ (s.map fun r ↦ f ((x : ℂ) - r * z)).prod) hr + simpa only [auxiliaryProduct, Multiset.map_map, Function.comp_apply, neg_mul, + mul_neg, sub_neg_eq_add] using h + +/-- Every Taylor coefficient of a conjugation-compatible auxiliary product is real. -/ +theorem ofReal_auxiliaryCoefficient {f : ℂ → ℂ} + (hf : ∀ z, f (conj z) = conj (f z)) (g : ℝ[X]) (x : ℝ) (k : ℕ) : + (auxiliaryCoefficient g f x k : ℂ) = + iteratedDeriv k (auxiliaryProduct g f x) 0 / k.factorial := by + rw [auxiliaryCoefficient, ofReal_div, ofReal_natCast, + ofReal_re_iteratedDeriv_zero (auxiliaryProduct_conj hf g x)] + +/-- Auxiliary Taylor coefficients of an entire function are continuous in +the real center, including at zeros of the function. -/ +theorem continuous_auxiliaryCoefficient {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (g : ℝ[X]) (k : ℕ) : + Continuous (fun x : ℝ ↦ auxiliaryCoefficient g f x k) := by + exact (continuous_re.comp + ((continuous_iteratedDeriv_translateProduct hf (g.map ofRealHom).roots k).comp + continuous_ofReal)).div_const _ + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/AuxiliaryZeroFactors.lean b/RealRooted/LaguerreInequalities/AuxiliaryZeroFactors.lean new file mode 100644 index 000000000..9a9639ef4 --- /dev/null +++ b/RealRooted/LaguerreInequalities/AuxiliaryZeroFactors.lean @@ -0,0 +1,74 @@ +module + +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +import RealRooted.LaguerreInequalities.AuxiliarySymmetry +import RealRooted.Mathlib.Analysis.Complex.RealIdentity +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Topology.Order.OrderClosed + +/-! +# Removing zero auxiliary roots + +Zero roots contribute a constant factor `f(x)^m` to the auxiliary product. +For even `m`, positivity descends wherever `f(x)` is nonzero and then extends +by continuity through every zero of `f` on the real axis. +-/ + +public section + +open Complex Filter Polynomial Topology +open scoped ComplexConjugate + +namespace RealRooted + +/-- An origin factor of the auxiliary contributes the corresponding power +of the central function value to its translated product. -/ +theorem auxiliaryProduct_X_pow_mul {q : ℝ[X]} (hq : q.Monic) + (m : ℕ) (f : ℂ → ℂ) (x : ℝ) (z : ℂ) : + auxiliaryProduct (X ^ m * q) f x z = f x ^ m * auxiliaryProduct q f x z := by + have hq0 : q.map ofRealHom ≠ 0 := (hq.map ofRealHom).ne_zero + simp only [auxiliaryProduct, Polynomial.map_mul, Polynomial.map_pow, map_X, + roots_mul (mul_ne_zero (pow_ne_zero m X_ne_zero) hq0), roots_X_pow, + Multiset.map_add, Multiset.prod_add, Multiset.map_nsmul, Multiset.map_singleton, + Multiset.prod_nsmul, Multiset.prod_singleton, zero_mul, sub_zero] + +/-- At a real center the zero auxiliary factors scale each coefficient by +a power of the real central value. -/ +theorem auxiliaryCoefficient_X_pow_mul {f : ℂ → ℂ} + (hc : ∀ z, f (conj z) = conj (f z)) {q : ℝ[X]} (hq : q.Monic) + (m : ℕ) (x : ℝ) (k : ℕ) : + auxiliaryCoefficient (X ^ m * q) f x k = (f x).re ^ m * auxiliaryCoefficient q f x k := by + have hr : ((f x).re : ℂ) = f x := by + apply conj_eq_iff_re.mp + simpa only [conj_ofReal] using (hc x).symm + have heq : auxiliaryProduct (X ^ m * q) f x = + (fun z ↦ f x ^ m * auxiliaryProduct q f x z) := by + funext z + exact auxiliaryProduct_X_pow_mul hq m f x z + rw [auxiliaryCoefficient, heq, iteratedDeriv_const_mul_field, ← hr, ← ofReal_pow, + re_ofReal_mul] + simp only [auxiliaryCoefficient, mul_div_assoc, ofReal_re] + +/-- Removing an even origin factor preserves the full auxiliary +inequalities, including at centers where the entire function vanishes. -/ +theorem auxiliaryCoefficient_nonneg_of_X_pow_mul {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (hne : f ≠ 0) + {q : ℝ[X]} (hq : q.Monic) {m : ℕ} (hm : Even m) + (h : ∀ x k, 0 ≤ auxiliaryCoefficient (X ^ m * q) f x k) (x : ℝ) (k : ℕ) : + 0 ≤ auxiliaryCoefficient q f x k := by + have hgood (y : ℝ) (hy : f y ≠ 0) : 0 ≤ auxiliaryCoefficient q f y k := by + have hr : (f y).re ≠ 0 := by + intro hr0 + have hr : ((f y).re : ℂ) = f y := + conj_eq_iff_re.mp (by simpa only [conj_ofReal] using (hc y).symm) + exact hy (by rw [← hr, hr0, ofReal_zero]) + have hh := h y k + rw [auxiliaryCoefficient_X_pow_mul hc hq] at hh + exact nonneg_of_mul_nonneg_right hh (hm.pow_pos hr) + have he := (hf.eventually_ofReal_ne_zero hne x).mono fun y hy ↦ hgood y hy + have ht : Tendsto (fun y : ℝ ↦ auxiliaryCoefficient q f y k) (𝓝[≠] x) + (𝓝 (auxiliaryCoefficient q f x k)) := + (continuous_auxiliaryCoefficient hf q k).continuousAt.tendsto.mono_left nhdsWithin_le_nhds + exact ge_of_tendsto ht he + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/CanonicalLogDerivative.lean b/RealRooted/LaguerreInequalities/CanonicalLogDerivative.lean new file mode 100644 index 000000000..16535e9fb --- /dev/null +++ b/RealRooted/LaguerreInequalities/CanonicalLogDerivative.lean @@ -0,0 +1,78 @@ +module + +public import RealRooted.LaguerreInequalities.CanonicalProduct +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import RealRooted.LaguerreInequalities.AtomMultiplicity +import RealRooted.LaguerreInequalities.AtomicRepresentation +import RealRooted.LaguerreInequalities.MeasureSupport +import RealRooted.LaguerreInequalities.InverseSquare +import TauCeti.Analysis.Complex.CanonicalProduct.LogDeriv + +/-! +# Reconstructing the logarithmic derivative from real zeros + +The atomic Nevanlinna integral is the logarithmic derivative of the genus-one +product, up to its convergent real linear correction. The remaining term is +affine, with a nonpositive real slope. +-/ + +public section + +open Complex MeasureTheory +open scoped ComplexConjugate + +namespace RealRooted + +private theorem weighted_nevanlinnaKernel_eq {r : ℝ} (hr : r ≠ 0) {z : ℂ} + (hz : z ≠ (r : ℂ)) (m : ℕ) : + (((m : ℝ) / (1 + r ^ 2) : ℝ) : ℂ) * TauCeti.nevanlinnaKernel z r = + -(m : ℂ) * logDerivWeierstrassFactorOneMul (r : ℂ)⁻¹ z + + (((m : ℝ) / (r * (1 + r ^ 2)) : ℝ) : ℂ) := by + have hrC : (r : ℂ) ≠ 0 := ofReal_ne_zero.mpr hr + have hden : (1 + (r : ℂ) ^ 2) ≠ 0 := by + exact_mod_cast (show 1 + r ^ 2 ≠ 0 by positivity) + rw [TauCeti.nevanlinnaKernel_def, logDerivWeierstrassFactorOneMul_inv hrC hz] + push_cast + field_simp [hrC, hden, sub_ne_zero.mpr hz, sub_ne_zero.mpr hz.symm] + ring + +/-- All generalized Laguerre inequalities determine the logarithmic derivative +from its real-zero canonical product and an affine term with nonpositive slope. -/ +theorem exists_logDeriv_eq_realZeroProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + ∃ a b : ℝ, 0 ≤ b ∧ ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = (a : ℂ) - (b : ℂ) * z + logDeriv (realZeroProduct f) z := by + have hne : f ≠ 0 := fun hzero => hf0 (congrFun hzero 0) + obtain ⟨ρ, b, hρ, hb, hrep, hs, _⟩ := exists_nevanlinna_supported_on_zeros hf hc h + let _ := hρ + let t : ℝ := ∑' r : {x : ℝ | f x = 0}, + (analyticOrderNatAt f (r : ℂ) : ℝ) / ((r : ℝ) * (1 + (r : ℝ) ^ 2)) + have ht : HasSum (fun r : {x : ℝ | f x = 0} => + (((analyticOrderNatAt f (r : ℂ) : ℝ) / + ((r : ℝ) * (1 + (r : ℝ) ^ 2)) : ℝ) : ℂ)) (t : ℂ) := + Complex.hasSum_ofReal.mpr + (summable_analyticOrderNatAt_div_mul_one_add_sq hf hc hf0 h).hasSum + refine ⟨-t - (-logDeriv f I).re, b, hb, fun z hz => ?_⟩ + have hzpos : 0 < z.im := hz + have hp := (summable_norm_natCast_mul_logDerivWeierstrassFactorOneMul _ _ + (summable_analyticOrderNatAt_mul_norm_inv_sq hf hc hf0 h) z).of_norm.hasSum + rw [← logDeriv_realZeroProduct hf hc hf0 h hzpos] at hp + have hsum := hp.neg.add ht + have hkernel := hasSum_nevanlinnaKernel_real_zeros hf hne hs hz + have hatom := measureReal_singleton_eq_analyticOrderNatAt_div hf hne hrep + have heq : (∫ x, TauCeti.nevanlinnaKernel z x ∂ρ) = + -logDeriv (realZeroProduct f) z + (t : ℂ) := by + apply HasSum.unique hkernel + convert hsum using 1 + ext r + rw [hatom] + have hr : (r : ℝ) ≠ 0 := fun hzero => hf0 (by simpa [hzero] using r.property) + have hzr : z ≠ (r : ℂ) := fun heq => by simp [heq] at hzpos + simpa only [neg_mul] using weighted_nevanlinnaKernel_eq hr hzr (analyticOrderNatAt f r) + have hre := hrep z hz + rw [heq] at hre + push_cast + linear_combination -hre + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/CanonicalProduct.lean b/RealRooted/LaguerreInequalities/CanonicalProduct.lean new file mode 100644 index 000000000..eb4c55424 --- /dev/null +++ b/RealRooted/LaguerreInequalities/CanonicalProduct.lean @@ -0,0 +1,85 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import RealRooted.LaguerreInequalities.InverseSquare +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct +import TauCeti.Analysis.Complex.CanonicalProduct.LogDeriv + +/-! +# The genus-one product over actual real zeros + +The generalized Laguerre inequalities supply the convergence hypothesis for the +canonical product, with the actual analytic multiplicity at each real zero. +When the origin is not a zero, the product has exactly those real zeros. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- The genus-one product over the real zeros away from the origin, counted with +analytic multiplicity. A zero at the origin contributes the constant factor one. -/ +@[expose] noncomputable def realZeroProduct (f : ℂ → ℂ) (z : ℂ) : ℂ := + ∏' r : {x : ℝ | f x = 0}, weierstrassFactor 1 ((r : ℂ)⁻¹ * z) ^ + analyticOrderNatAt f (r : ℂ) + +/-- The canonical product has value one at the origin. -/ +@[simp] theorem realZeroProduct_zero (f : ℂ → ℂ) : realZeroProduct f 0 = 1 := by + simp [realZeroProduct] + +/-- All generalized Laguerre inequalities make the real-zero product an entire function. -/ +theorem differentiable_realZeroProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + Differentiable ℂ (realZeroProduct f) := + differentiable_tprod_weierstrassFactor_one_pow _ _ + (summable_analyticOrderNatAt_mul_norm_inv_sq hf hc hf0 h) + +/-- The real-zero product has no zeros in the upper half-plane. -/ +theorem realZeroProduct_ne_zero_of_im_pos {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) {z : ℂ} (hz : 0 < z.im) : + realZeroProduct f z ≠ 0 := by + rw [realZeroProduct, ne_eq, tprod_weierstrassFactor_one_pow_eq_zero_iff _ _ + (summable_analyticOrderNatAt_mul_norm_inv_sq hf hc hf0 h)] + rintro ⟨r, _, hr⟩ + have hr0 : (r : ℂ) ≠ 0 := fun hzero => + hf0 (by simpa only [hzero] using (show f (r : ℂ) = 0 from r.property)) + have heq : z = (r : ℂ) := ((inv_mul_eq_one₀ hr0).mp hr).symm + simp only [heq, ofReal_im, lt_self_iff_false] at hz + +/-- The logarithmic derivative of the real-zero product is its paired rational series. -/ +theorem logDeriv_realZeroProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) {z : ℂ} (hz : 0 < z.im) : + logDeriv (realZeroProduct f) z = ∑' r : {x : ℝ | f x = 0}, + (analyticOrderNatAt f (r : ℂ) : ℂ) * + logDerivWeierstrassFactorOneMul (r : ℂ)⁻¹ z := by + apply logDeriv_tprod_weierstrassFactor_one_pow _ _ + (summable_analyticOrderNatAt_mul_norm_inv_sq hf hc hf0 h) + intro r _ heq + have hr0 : (r : ℂ) ≠ 0 := fun hzero => + hf0 (by simpa only [hzero] using (show f (r : ℂ) = 0 from r.property)) + have hzr : z = (r : ℂ) := ((inv_mul_eq_one₀ hr0).mp heq).symm + simp only [hzr, ofReal_im, lt_self_iff_false] at hz + +/-- The real-zero canonical product is in the Laguerre--Pólya class, without an +order hypothesis on the original function. -/ +theorem isLaguerrePolya_realZeroProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + IsLaguerrePolya (realZeroProduct f) := by + have hs : Summable (fun r : {x : ℝ | f x = 0} => + (analyticOrderNatAt f (r : ℂ) : ℝ) * ((r : ℝ)⁻¹) ^ 2) := by + simpa only [inv_pow, div_eq_mul_inv] using + summable_analyticOrderNatAt_div_sq hf hc hf0 h + unfold realZeroProduct + simpa only [ofReal_inv] using + isLaguerrePolya_tprod_weierstrassFactor_one_pow _ _ hs + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/CanonicalRepresentation.lean b/RealRooted/LaguerreInequalities/CanonicalRepresentation.lean new file mode 100644 index 000000000..75ed08fae --- /dev/null +++ b/RealRooted/LaguerreInequalities/CanonicalRepresentation.lean @@ -0,0 +1,83 @@ +module + +public import RealRooted.LaguerreInequalities.CanonicalProduct +import RealRooted.LaguerreInequalities.CanonicalLogDerivative +import RealRooted.LaguerreInequalities.RealZeros +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Identity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlow +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Examples +import TauCeti.Analysis.SpecialFunctions.Complex.Exp.LogDeriv + +/-! +# Canonical representation from generalized Laguerre inequalities + +At a nonzero origin value, all generalized Laguerre inequalities reconstruct the +entire function as its actual real-zero genus-one product times a real Gaussian +exponential. In particular, they imply membership in the Laguerre--Pólya class +without an order or genus hypothesis. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- All generalized Laguerre inequalities give the real genus-one canonical +representation, with a nonnegative Gaussian coefficient, when zero is not a root. -/ +theorem exists_eq_exp_mul_realZeroProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + ∃ a b : ℝ, 0 ≤ b ∧ ∀ z : ℂ, + f z = f 0 * exp ((a : ℂ) * z - (b : ℂ) * z ^ 2 / 2) * realZeroProduct f z := by + obtain ⟨a, b, hb, hlog⟩ := exists_logDeriv_eq_realZeroProduct hf hc hf0 h + have hP := differentiable_realZeroProduct hf hc hf0 h + let g : ℂ → ℂ := fun z => exp ((a : ℂ) * z - (b : ℂ) * z ^ 2 / 2) * + realZeroProduct f z + have hg : Differentiable ℂ g := by + exact (Differentiable.cexp (by fun_prop)).mul hP + have hgn (z : ℂ) (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) : g z ≠ 0 := + mul_ne_zero (exp_ne_zero _) (realZeroProduct_ne_zero_of_im_pos hf hc hf0 h hz) + have hfn (z : ℂ) (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) : f z ≠ 0 := by + intro hzero + have him := im_eq_zero_of_laguerreCoefficient_nonneg hf hc + (fun heq => hf0 (congrFun heq 0)) h hzero + exact (ne_of_gt hz) him + have hglog (z : ℂ) (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) : + logDeriv g z = (a : ℂ) - (b : ℂ) * z + logDeriv (realZeroProduct f) z := by + rw [show g = _ from rfl, TauCeti.logDeriv_cexp_mul + (realZeroProduct_ne_zero_of_im_pos hf hc hf0 h hz) (hP z) (by fun_prop)] + congr 1 + rw [deriv_fun_sub (by fun_prop) (by fun_prop), deriv_div_const, + deriv_const_mul_id, deriv_const_mul _ (by fun_prop), deriv_pow_field] + norm_num + ring + have heq := hf.eq_mul_of_logDeriv_eqOn hg UpperHalfPlane.isOpen_upperHalfPlaneSet + (convex_halfSpace_im_gt 0).isPreconnected ⟨I, by simp⟩ hfn hgn + (fun z hz => (hlog z hz).trans (hglog z hz).symm) + (by simp [g]) + exact ⟨a, b, hb, fun z => by simpa only [g, ← mul_assoc] using heq z⟩ + +/-- At a nonzero origin value, all generalized Laguerre inequalities imply +membership in the Laguerre--Pólya class without a growth assumption. -/ +theorem isLaguerrePolya_of_laguerreCoefficient_nonneg_of_ne_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : IsLaguerrePolya f := by + obtain ⟨a, b, hb, heq⟩ := exists_eq_exp_mul_realZeroProduct hf hc hf0 h + have hzero : ((f 0).re : ℂ) = f 0 := by + apply conj_eq_iff_re.mp + simpa using (hc 0).symm + have hlin : IsLaguerrePolya (fun z : ℂ => exp ((a : ℂ) * z)) := by + simpa using isLaguerrePolya_exp.comp_affine_real a 0 + have hgauss := isLaguerrePolya_exp_neg_mul_sq (div_nonneg hb (by norm_num : (0 : ℝ) ≤ 2)) + have hp := ((hlin.mul hgauss).const_mul_real (f 0).re).mul + (isLaguerrePolya_realZeroProduct hf hc hf0 h) + convert hp using 1 + funext z + rw [heq z] + simp only [Pi.mul_apply, hzero, ← exp_add, ofReal_div, ofReal_ofNat] + congr 3 + ring + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/Characterization.lean b/RealRooted/LaguerreInequalities/Characterization.lean new file mode 100644 index 000000000..bcc26e1cc --- /dev/null +++ b/RealRooted/LaguerreInequalities/Characterization.lean @@ -0,0 +1,63 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.LaguerreInequalities.CanonicalRepresentation +import RealRooted.LaguerreInequalities.Translation +import RealRooted.Mathlib.Analysis.Analytic.CountableZeros +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality + +/-! +# The unrestricted generalized Laguerre criterion + +For a real entire function, nonnegativity of every generalized Laguerre +coefficient at every real point is equivalent to membership in the +Laguerre--Pólya class. No growth, order, or genus hypothesis is imposed, and the +identically zero function is included. + +This is the zero-aware form of Csordas--Vishnyakova (2013), Theorem 2.3. The +converse uses a finite Nevanlinna measure and its atomic canonical product. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- All generalized Laguerre inequalities characterize the Laguerre--Pólya +class among real entire functions, including the identically zero function. +This is the converse in Csordas--Vishnyakova (2013), Theorem 2.3, without a +growth or genus assumption. -/ +theorem isLaguerrePolya_of_laguerreCoefficient_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : IsLaguerrePolya f := by + by_cases hne : f = 0 + · rw [hne] + exact IsLaguerrePolya.zero + have hpoint : ∃ a : ℝ, f a ≠ 0 := by + by_contra! hzero + have heq : {x : ℝ | f x = 0} = Set.univ := Set.eq_univ_of_forall hzero + exact Set.not_countable_univ (heq ▸ hf.countable_real_zeroSet hne) + obtain ⟨a, ha⟩ := hpoint + have hshift : IsLaguerrePolya (fun z : ℂ => f (z + a)) := by + apply isLaguerrePolya_of_laguerreCoefficient_nonneg_of_ne_zero + (f := fun z => f (z + a)) (hf.comp (by fun_prop)) + · intro z + simpa only [map_add, conj_ofReal] using hc (z + a) + · simpa only [zero_add] using ha + · intro x n + rw [laguerreCoefficient_comp_add_real] + exact h (x + a) n + simpa only [ofReal_one, one_mul, ofReal_neg, neg_add_cancel_right] using + hshift.comp_affine_real 1 (-a) + +/-- A real entire function is Laguerre--Pólya if and only if every generalized +Laguerre coefficient is nonnegative, with no order or genus restriction. -/ +theorem isLaguerrePolya_iff_laguerreCoefficient_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) : + IsLaguerrePolya f ↔ ∀ x n, 0 ≤ laguerreCoefficient f x n := + ⟨fun h => h.laguerreCoefficient_nonneg, isLaguerrePolya_of_laguerreCoefficient_nonneg hf hc⟩ + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/DerivativeFormula.lean b/RealRooted/LaguerreInequalities/DerivativeFormula.lean new file mode 100644 index 000000000..0c263a23c --- /dev/null +++ b/RealRooted/LaguerreInequalities/DerivativeFormula.lean @@ -0,0 +1,120 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# Derivative formula for generalized Laguerre coefficients + +The even Taylor coefficient of the opposite imaginary translates is the +alternating binomial sum of derivatives in the generalized Laguerre inequalities. +See Cardon, *Extended Laguerre inequalities and a criterion for real zeros*, +Theorem 1.1, https://arxiv.org/abs/0911.1122. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +private theorem iteratedDeriv_affine_zero {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (a b : ℂ) (n : ℕ) : + iteratedDeriv n (fun z => f (a + z * b)) 0 = b ^ n * iteratedDeriv n f a := by + have h := congrFun (iteratedDeriv_comp_const_mul + ((hf.comp (by fun_prop)).contDiff : ContDiff ℂ n (fun z => f (a + z))) b) 0 + change iteratedDeriv n (fun z => f (a + b * z)) 0 = + b ^ n * iteratedDeriv n (fun z => f (a + z)) (b * 0) at h + rw [iteratedDeriv_comp_const_add] at h + simpa only [mul_zero, add_zero, mul_comm] using h + +private theorem imaginary_phase {n j : ℕ} (hj : j ≤ 2 * n) : + I ^ j * (-I) ^ (2 * n - j) = (-1 : ℂ) ^ (j + n) := by + have h : I ^ j = (-1 : ℂ) ^ j * (-I) ^ j := by + rw [← mul_pow] + simp + rw [h, mul_assoc, ← pow_add, Nat.add_sub_of_le hj] + simp [pow_mul, pow_add] + +private theorem iteratedDeriv_laguerreProduct_even {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (x : ℝ) (n : ℕ) : + iteratedDeriv (2 * n) (laguerreProduct f x) 0 = + ∑ j ∈ Finset.range (2 * n + 1), + (-1 : ℂ) ^ (j + n) * (2 * n).choose j * + iteratedDeriv j f x * iteratedDeriv (2 * n - j) f x := by + have hminus : (fun z : ℂ => f ((x : ℂ) - z * I)) = + (fun z => f ((x : ℂ) + z * (-I))) := by + ext z + congr 1 + ring + change iteratedDeriv (2 * n) (fun z => f ((x : ℂ) + z * I) * + f ((x : ℂ) - z * I)) 0 = _ + have hp : ContDiffAt ℂ (2 * n) (fun z => f ((x : ℂ) + z * I)) 0 := + (hf.comp (by fun_prop)).contDiff.contDiffAt + have hm : ContDiffAt ℂ (2 * n) (fun z => f ((x : ℂ) - z * I)) 0 := + (hf.comp (by fun_prop)).contDiff.contDiffAt + rw [iteratedDeriv_fun_mul hp hm] + apply Finset.sum_congr rfl + intro j hj + rw [hminus, iteratedDeriv_affine_zero hf, iteratedDeriv_affine_zero hf] + have hphase := imaginary_phase (Nat.le_of_lt_succ (Finset.mem_range.mp hj)) + calc + _ = (I ^ j * (-I) ^ (2 * n - j)) * (2 * n).choose j * + iteratedDeriv j f x * iteratedDeriv (2 * n - j) f x := by ring + _ = _ := by rw [hphase] + +/-- The alternating binomial derivative formula for the generalized Laguerre +coefficient of a real entire function. -/ +theorem laguerreCoefficient_eq_sum {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (x : ℝ) (n : ℕ) : + laguerreCoefficient f x n = + (∑ j ∈ Finset.range (2 * n + 1), + (-1 : ℝ) ^ (j + n) * (2 * n).choose j * + (iteratedDeriv j f x).re * (iteratedDeriv (2 * n - j) f x).re) / + (2 * n).factorial := by + have hreal (k : ℕ) : ((iteratedDeriv k f x).re : ℂ) = iteratedDeriv k f x := by + apply conj_eq_iff_re.mp + simpa using (iteratedDeriv_conj hc k (x : ℂ)).symm + rw [laguerreCoefficient, iteratedDeriv_laguerreProduct_even hf] + congr 1 + change Complex.reCLM (∑ j ∈ Finset.range (2 * n + 1), _) = _ + rw [map_sum] + apply Finset.sum_congr rfl + intro j _ + rw [← hreal j, ← hreal (2 * n - j)] + norm_cast + +/-- The order-zero generalized Laguerre coefficient is the square of the +value on the real axis. -/ +theorem laguerreCoefficient_zero {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (x : ℝ) : + laguerreCoefficient f x 0 = (f x).re ^ 2 := by + rw [laguerreCoefficient_eq_sum hf hc] + simp [pow_two] + +/-- The order-one generalized coefficient has the classical Laguerre +normalization `f'² - f f''`. -/ +theorem laguerreCoefficient_one {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (x : ℝ) : + laguerreCoefficient f x 1 = + (iteratedDeriv 1 f x).re ^ 2 - (f x).re * (iteratedDeriv 2 f x).re := by + rw [laguerreCoefficient_eq_sum hf hc] + norm_num [Finset.sum_range_succ, iteratedDeriv_zero] + ring + +/-- The order-two generalized coefficient agrees with the second Laguerre +form, including its factor `1 / 12`. -/ +theorem laguerreCoefficient_two {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (x : ℝ) : + laguerreCoefficient f x 2 = + (3 * (iteratedDeriv 2 f x).re ^ 2 - + 4 * (iteratedDeriv 1 f x).re * (iteratedDeriv 3 f x).re + + (f x).re * (iteratedDeriv 4 f x).re) / 12 := by + rw [laguerreCoefficient_eq_sum hf hc] + norm_num [Finset.sum_range_succ, iteratedDeriv_zero, Nat.choose_succ_succ] + ring + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/GeneratingPolynomial.lean b/RealRooted/LaguerreInequalities/GeneratingPolynomial.lean new file mode 100644 index 000000000..255789905 --- /dev/null +++ b/RealRooted/LaguerreInequalities/GeneratingPolynomial.lean @@ -0,0 +1,64 @@ +module + +public import RealRooted.PFPolynomial +import Mathlib.Analysis.Complex.Polynomial.Basic +import Mathlib.Algebra.Polynomial.Expand + +/-! +# The generating polynomial of the generalized Laguerre forms + +For a real splitting polynomial `p`, the product `p(x + i t) p(x - i t)` is an +even polynomial in `t`. Its polynomial in `t²` has roots `-(x - r)²`, where `r` +ranges over the roots of `p`, with multiplicity. In particular it is a PF polynomial. +-/ + +@[expose] public section + +open Polynomial Complex + +noncomputable section + +namespace RealRooted + +/-- The polynomial whose coefficients are the generalized Laguerre forms of a +real splitting polynomial at `x`. -/ +def laguerreGeneratingPolynomial (p : ℝ[X]) (x : ℝ) : ℝ[X] := + C (p.leadingCoeff ^ 2) * + (p.roots.map fun r => X + C ((x - r) ^ 2)).prod + +/-- The generating polynomial of the generalized Laguerre forms is PF, including +the zero-polynomial case. -/ +theorem isPFPolynomial_laguerreGeneratingPolynomial (p : ℝ[X]) (x : ℝ) : + IsPFPolynomial (laguerreGeneratingPolynomial p x) := by + apply (IsPFPolynomial.of_C_nonneg (sq_nonneg p.leadingCoeff)).mul + induction p.roots using Multiset.induction_on with + | empty => simpa using IsPFPolynomial.one + | cons r s ih => + simpa using (isPFPolynomial_X_add_C (sq_nonneg (x - r))).mul ih + +private theorem eval_prod_squared_factors (s : Multiset ℝ) (x : ℝ) (z : ℂ) : + (((s.map fun r => (X + C ((x - r) ^ 2) : ℝ[X])).prod).map ofRealHom).eval (z ^ 2) = + (((s.map fun r => (X - C r : ℝ[X])).prod).map ofRealHom).eval (x + z * I) * + (((s.map fun r => (X - C r : ℝ[X])).prod).map ofRealHom).eval (x - z * I) := by + induction s using Multiset.induction_on with + | empty => simp + | cons r s ih => + simp only [Multiset.map_cons, Multiset.prod_cons, Polynomial.map_mul, eval_mul, + Polynomial.map_add, Polynomial.map_sub, map_X, map_C, eval_add, eval_sub, eval_X, + eval_C, ofRealHom_eq_coe] + rw [ih] + push_cast + ring_nf + simp [I_sq] + +/-- The square substitution of the generating polynomial is the product along +the two imaginary directions. -/ +theorem eval_laguerreGeneratingPolynomial {p : ℝ[X]} (hp : p.Splits) (x : ℝ) (z : ℂ) : + ((laguerreGeneratingPolynomial p x).map ofRealHom).eval (z ^ 2) = + (p.map ofRealHom).eval (x + z * I) * (p.map ofRealHom).eval (x - z * I) := by + conv_rhs => rw [hp.eq_prod_roots] + simp only [laguerreGeneratingPolynomial, Polynomial.map_mul, map_C, eval_mul, eval_C, + ofRealHom_eq_coe, ofReal_pow, eval_prod_squared_factors] + ring + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/InverseSquare.lean b/RealRooted/LaguerreInequalities/InverseSquare.lean new file mode 100644 index 000000000..995e0daf0 --- /dev/null +++ b/RealRooted/LaguerreInequalities/InverseSquare.lean @@ -0,0 +1,66 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import Mathlib.Analysis.Analytic.Order +import RealRooted.LaguerreInequalities.AtomMultiplicity +import RealRooted.Mathlib.Analysis.Normed.Field.WeightedInverse + +/-! +# Inverse-square summability from generalized Laguerre inequalities + +A nonzero value at the origin separates every real zero from zero. The finite +Nevanlinna measure then supplies the inverse-square summability needed for the +genus-one canonical product, as well as its convergent real linear correction. +-/ + +public section + +open Complex Filter Metric Set Topology +open scoped ComplexConjugate + +namespace RealRooted + +private theorem exists_pos_le_abs_real_zero {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hf0 : f 0 ≠ 0) : ∃ δ : ℝ, 0 < δ ∧ ∀ r : ℝ, f r = 0 → δ ≤ |r| := by + obtain ⟨δ, hδ, hs⟩ := Metric.mem_nhds_iff.mp + (hf.continuous.continuousAt.eventually_ne hf0) + refine ⟨δ, hδ, fun r hr => le_of_not_gt fun hlt => ?_⟩ + have hmem : (r : ℂ) ∈ ball 0 δ := by + simpa only [mem_ball, dist_zero_right, Complex.norm_real, Real.norm_eq_abs] using hlt + exact hs hmem hr + +/-- Every real zero has inverse-square summable multiplicity when all generalized +Laguerre inequalities hold and the origin is not a zero. -/ +theorem summable_analyticOrderNatAt_div_sq {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + Summable (fun r : {x : ℝ | f x = 0} => + (analyticOrderNatAt f (r : ℂ) : ℝ) / (r : ℝ) ^ 2) := by + have hne : f ≠ 0 := fun hzero => hf0 (congrFun hzero 0) + obtain ⟨δ, hδ, hr⟩ := exists_pos_le_abs_real_zero hf hf0 + exact (summable_analyticOrderNatAt_div_one_add_sq hf hc hne h).div_sq_of_abs_ge + (fun _ => Nat.cast_nonneg _) hδ (fun r => hr r r.property) + +/-- The natural-multiplicity canonical product satisfies the exact complex norm +summability hypothesis of the genus-one convergence theorems. -/ +theorem summable_analyticOrderNatAt_mul_norm_inv_sq {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + Summable (fun r : {x : ℝ | f x = 0} => + (analyticOrderNatAt f (r : ℂ) : ℝ) * ‖(r : ℂ)⁻¹‖ ^ 2) := by + simpa only [norm_inv, Complex.norm_real, Real.norm_eq_abs, ← abs_inv, sq_abs, ← inv_pow, + div_eq_mul_inv] using summable_analyticOrderNatAt_div_sq hf hc hf0 h + +/-- The real linear correction in the genus-one Nevanlinna normalization is an +absolutely convergent series. -/ +theorem summable_analyticOrderNatAt_div_mul_one_add_sq {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (hf0 : f 0 ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + Summable (fun r : {x : ℝ | f x = 0} => + (analyticOrderNatAt f (r : ℂ) : ℝ) / ((r : ℝ) * (1 + (r : ℝ) ^ 2))) := by + have hne : f ≠ 0 := fun hzero => hf0 (congrFun hzero 0) + obtain ⟨δ, hδ, hr⟩ := exists_pos_le_abs_real_zero hf hf0 + exact (summable_analyticOrderNatAt_div_one_add_sq hf hc hne h).div_mul_one_add_sq_of_abs_ge + (fun _ => Nat.cast_nonneg _) hδ (fun r => hr r r.property) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/LocalDerivativeBounds.lean b/RealRooted/LaguerreInequalities/LocalDerivativeBounds.lean new file mode 100644 index 000000000..500e68c47 --- /dev/null +++ b/RealRooted/LaguerreInequalities/LocalDerivativeBounds.lean @@ -0,0 +1,173 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.Deriv.Basic +import RealRooted.LaguerreInequalities.LocalNonzeroLimit +import RealRooted.LaguerreInequalities.LocalProductLimit +import RealRooted.LaguerreInequalities.LogConcavity +import RealRooted.LaguerreInequalities.DerivativeFormula +import RealRooted.Mathlib.Analysis.Complex.LocallyUniformIteratedDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import Mathlib.Analysis.Convex.Deriv + +/-! +# Derivative bounds from pointwise Laguerre--Pólya limits + +Real logarithmic concavity controls the otherwise unconstrained exponential +slope of a Laguerre--Pólya function. Together with the common zero-free disk, +three convergent real values bound its first derivative. +-/ + +public section + +open Complex Filter Topology +open scoped ComplexConjugate + +namespace RealRooted + +private theorem re_ne_zero_of_real_limit {F : ℕ → ℂ → ℂ} {w : ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) (x : ℝ) + (ht : Tendsto (fun n => F n x) atTop (𝓝 w)) (hw : w ≠ 0) : w.re ≠ 0 := by + have hreal (n : ℕ) : ((F n x).re : ℂ) = F n x := by + apply conj_eq_iff_re.mp + simpa using ((hF n).conj x).symm + have heq : (w.re : ℂ) = w := tendsto_nhds_unique + (((continuous_re.tendsto w).comp ht).ofReal.congr hreal) ht + intro hr + exact hw (by rw [← heq, hr, ofReal_zero]) + +private theorem exists_eventually_logDeriv_bound {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) {a x b : ℝ} (hax : a < x) (hxb : x < b) + (hpoint : ∀ y ∈ ({a, x, b} : Set ℝ), + Tendsto (fun n => F n y) atTop (𝓝 (g y))) + (hg : ∀ y ∈ ({a, x, b} : Set ℝ), g y ≠ 0) + (hne : ∀ᶠ n in atTop, ∀ y ∈ Set.Icc a b, F n y ≠ 0) : + ∃ C > 0, ∀ᶠ n in atTop, |(deriv (F n) x).re / (F n x).re| ≤ C := by + let L (n : ℕ) (y : ℝ) := Real.log (F n y).re + let l (y : ℝ) := Real.log (g y).re + have hlog (y : ℝ) (hy : y ∈ ({a, x, b} : Set ℝ)) : + Tendsto (fun n => L n y) atTop (𝓝 (l y)) := + ((continuous_re.tendsto _).comp (hpoint y hy)).log + (re_ne_zero_of_real_limit hF y (hpoint y hy) (hg y hy)) + have hleft : Tendsto (fun n => slope (L n) a x) atTop (𝓝 (slope l a x)) := by + simpa only [slope_def_field] using + ((hlog x (by simp)).sub (hlog a (by simp))).div_const (x - a) + have hright : Tendsto (fun n => slope (L n) x b) atTop (𝓝 (slope l x b)) := by + simpa only [slope_def_field] using + ((hlog b (by simp)).sub (hlog x (by simp))).div_const (b - x) + obtain ⟨A, hA, hAb⟩ := (Metric.isBounded_range_of_tendsto _ hleft).exists_pos_norm_le + obtain ⟨B, hB, hBb⟩ := (Metric.isBounded_range_of_tendsto _ hright).exists_pos_norm_le + refine ⟨A + B, add_pos hA hB, ?_⟩ + filter_upwards [hne] with n hn + have hx : x ∈ Set.Icc a b := ⟨hax.le, hxb.le⟩ + have hreal : ((F n x).re : ℂ) = F n x := by + apply conj_eq_iff_re.mp + simpa using ((hF n).conj x).symm + have hrex : (F n x).re ≠ 0 := by + intro hz + exact hn x hx (by rw [← hreal, hz, ofReal_zero]) + have hd := ((hF n).differentiable x).hasDerivAt.real_of_complex.log hrex + have hc := (hF n).concaveOn_log_re (convex_Icc a b) hn + have hu := hc.le_slope_of_hasDerivAt (Set.left_mem_Icc.mpr (hax.trans hxb).le) hx hax hd + have hl := hc.slope_le_of_hasDerivAt hx (Set.right_mem_Icc.mpr (hax.trans hxb).le) hxb hd + have hA' : |slope (L n) a x| ≤ A := by simpa using hAb _ ⟨n, rfl⟩ + have hB' : |slope (L n) x b| ≤ B := by simpa using hBb _ ⟨n, rfl⟩ + dsimp only [L] at hA' hB' + rw [abs_le] at hA' hB' ⊢ + constructor <;> linarith + +/-- Pointwise convergence of Laguerre--Pólya functions on a disk, with a +nonzero limiting value at its real center, bounds the first derivatives there. -/ +theorem exists_eventually_norm_deriv_le_of_tendsto {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) (x : ℝ) {r : ℝ} (hr : 0 < r) + (hpoint : ∀ z ∈ Metric.ball (x : ℂ) r, + Tendsto (fun n => F n z) atTop (𝓝 (g z))) (hg : g x ≠ 0) : + ∃ C > 0, ∀ᶠ n in atTop, ‖deriv (F n) x‖ ≤ C := by + obtain ⟨δ, hδ, hgnz, hFnz⟩ := exists_ball_ne_zero_of_tendsto hF x hr hpoint hg + let ε := min δ r / 2 + have hε : 0 < ε := by dsimp [ε]; positivity + have hmem {y : ℝ} (hy : y ∈ Set.Icc (x - ε) (x + ε)) : + (y : ℂ) ∈ Metric.ball (x : ℂ) (min δ r) := by + have habs : |y - x| ≤ ε := abs_le.mpr ⟨by linarith [hy.1], by linarith [hy.2]⟩ + have : |y - x| < min δ r := by dsimp [ε] at hε habs; linarith + simpa [Metric.mem_ball, dist_eq_norm, ← ofReal_sub] using this + have hthree {y : ℝ} (hy : y ∈ ({x - ε, x, x + ε} : Set ℝ)) : + y ∈ Set.Icc (x - ε) (x + ε) := by + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hy + rcases hy with rfl | rfl | rfl <;> constructor <;> linarith + obtain ⟨A, hA, hAb⟩ := exists_eventually_logDeriv_bound hF + (show x - ε < x by linarith) (show x < x + ε by linarith) + (fun y hy => hpoint y (Metric.ball_subset_ball (min_le_right δ r) (hmem (hthree hy)))) + (fun y hy => hgnz y (Metric.ball_subset_ball (min_le_left δ r) (hmem (hthree hy)))) + (hFnz.mono fun n hn y hy => hn y (Metric.ball_subset_ball (min_le_left δ r) (hmem hy))) + obtain ⟨B, hB, hBb⟩ := (Metric.isBounded_range_of_tendsto _ + (hpoint x (by simpa using hr))).exists_pos_norm_le + refine ⟨A * B, mul_pos hA hB, ?_⟩ + filter_upwards [hAb, hFnz] with n hn hnonzero + have hne : F n x ≠ 0 := hnonzero x (by simpa using hδ) + have hreal : ((F n x).re : ℂ) = F n x := by + apply conj_eq_iff_re.mp + simpa using ((hF n).conj x).symm + have hdreal : ((deriv (F n) x).re : ℂ) = deriv (F n) x := by + apply conj_eq_iff_re.mp + simpa using ((hF n).deriv.conj x).symm + have hrex : (F n x).re ≠ 0 := by + intro hz + exact hne (by rw [← hreal, hz, ofReal_zero]) + calc + ‖deriv (F n) x‖ = |(deriv (F n) x).re / (F n x).re| * ‖F n x‖ := by + rw [← hdreal, ← hreal, norm_real, Real.norm_eq_abs, norm_real, Real.norm_eq_abs, + ofReal_re, ofReal_re, abs_div, div_mul_cancel₀ _ (abs_ne_zero.mpr hrex)] + _ ≤ A * B := mul_le_mul hn (hBb _ ⟨n, rfl⟩) (norm_nonneg _) hA.le + +/-- Under pointwise convergence with a nonzero real limiting value, the +second derivatives of Laguerre--Pólya functions are eventually bounded too. -/ +theorem exists_eventually_norm_deriv_deriv_le_of_tendsto {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) (x : ℝ) {r : ℝ} (hr : 0 < r) + (hpoint : ∀ z ∈ Metric.ball (x : ℂ) r, + Tendsto (fun n => F n z) atTop (𝓝 (g z))) (hg : g x ≠ 0) : + ∃ C > 0, ∀ᶠ n in atTop, ‖deriv (deriv (F n)) x‖ ≤ C := by + obtain ⟨A, hA, hAb⟩ := exists_eventually_norm_deriv_le_of_tendsto hF x hr hpoint hg + have hlim := tendstoLocallyUniformlyOn_laguerreProduct hF x hr hpoint + have hjlim := hlim.iteratedDeriv_of_entire (Eventually.of_forall fun n => + differentiable_laguerreProduct (hF n).differentiable x) Metric.isOpen_ball 2 + have hjet := hjlim.tendsto_at (show (0 : ℂ) ∈ Metric.ball 0 r by simpa using hr) + have hL : Tendsto (fun n => laguerreCoefficient (F n) x 1) atTop + (𝓝 (laguerreCoefficient g x 1)) := by + exact ((continuous_re.tendsto _).comp hjet).div_const (2 : ℝ) + obtain ⟨B, hB, hBb⟩ := (Metric.isBounded_range_of_tendsto _ hL).exists_pos_norm_le + have hx := hpoint x (by simpa using hr) + obtain ⟨C, hC, hCb⟩ := (Metric.isBounded_range_of_tendsto _ (hx.inv₀ hg)).exists_pos_norm_le + refine ⟨(A ^ 2 + B) * C, mul_pos (by positivity) hC, ?_⟩ + filter_upwards [hAb, hx.eventually_ne hg] with n hn hne + have hreal : ((F n x).re : ℂ) = F n x := by + apply conj_eq_iff_re.mp + simpa using ((hF n).conj x).symm + have hdreal : ((deriv (deriv (F n)) x).re : ℂ) = deriv (deriv (F n)) x := by + apply conj_eq_iff_re.mp + simpa using ((hF n).deriv.deriv.conj x).symm + have hrex : (F n x).re ≠ 0 := by + intro hz + exact hne (by rw [← hreal, hz, ofReal_zero]) + have hformula := laguerreCoefficient_one (hF n).differentiable (hF n).conj x + simp only [iteratedDeriv_succ, iteratedDeriv_zero] at hformula + have heq : (deriv (deriv (F n)) x).re = + ((deriv (F n) x).re ^ 2 - laguerreCoefficient (F n) x 1) / (F n x).re := by + apply (eq_div_iff hrex).mpr + nlinarith [hformula] + have hbound : |(deriv (F n) x).re ^ 2 - laguerreCoefficient (F n) x 1| ≤ A ^ 2 + B := by + calc + _ ≤ |(deriv (F n) x).re ^ 2| + |laguerreCoefficient (F n) x 1| := abs_sub _ _ + _ ≤ A ^ 2 + B := by + apply add_le_add _ (show |laguerreCoefficient (F n) x 1| ≤ B by + simpa using hBb _ ⟨n, rfl⟩) + rw [abs_pow] + exact pow_le_pow_left₀ (abs_nonneg _) ((abs_re_le_norm _).trans hn) 2 + have hnorm : ‖deriv (deriv (F n)) x‖ = + |(deriv (F n) x).re ^ 2 - laguerreCoefficient (F n) x 1| * ‖(F n x)⁻¹‖ := by + conv_lhs => rw [← hdreal, norm_real, Real.norm_eq_abs, heq, abs_div] + rw [norm_inv, ← hreal, norm_real, Real.norm_eq_abs, ofReal_re, div_eq_mul_inv] + rw [hnorm] + exact mul_le_mul hbound (hCb _ ⟨n, rfl⟩) (norm_nonneg _) (by positivity) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/LocalNonzeroLimit.lean b/RealRooted/LaguerreInequalities/LocalNonzeroLimit.lean new file mode 100644 index 000000000..276bc85e4 --- /dev/null +++ b/RealRooted/LaguerreInequalities/LocalNonzeroLimit.lean @@ -0,0 +1,58 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.LaguerreInequalities.LocalProductLimit +import RealRooted.Mathlib.Topology.UniformSpace.LocallyUniformAvoidance +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import Mathlib.Analysis.Complex.LocallyUniformLimit + +/-! +# Nonzero local limits of Laguerre--Pólya functions + +A nonzero real value of a pointwise limit yields a common zero-free disk for +the approximants. Only their symmetric products are known to converge normally +at this stage. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +private theorem ne_zero_of_laguerreProduct_ne_zero {f : ℂ → ℂ} {x : ℝ} {z : ℂ} + (h : laguerreProduct f x ((z - (x : ℂ)) * (-I)) ≠ 0) : f z ≠ 0 := by + have heq : (x : ℂ) + ((z - (x : ℂ)) * (-I)) * I = z := by + rw [mul_assoc] + simp + rw [laguerreProduct, heq] at h + exact (mul_ne_zero_iff.mp h).1 + +/-- A pointwise limit of Laguerre--Pólya functions with a nonzero value at a +real center gives a zero-free disk for both the limit and every sufficiently +late approximant. -/ +theorem exists_ball_ne_zero_of_tendsto {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) (x : ℝ) {r : ℝ} (hr : 0 < r) + (hpoint : ∀ z ∈ Metric.ball (x : ℂ) r, + Tendsto (fun n => F n z) atTop (𝓝 (g z))) (hg : g x ≠ 0) : + ∃ δ > 0, (∀ z ∈ Metric.ball (x : ℂ) δ, g z ≠ 0) ∧ + ∀ᶠ n in atTop, ∀ z ∈ Metric.ball (x : ℂ) δ, F n z ≠ 0 := by + have hlim := tendstoLocallyUniformlyOn_laguerreProduct hF x hr hpoint + have hd := hlim.differentiableOn (Eventually.of_forall fun n => + (differentiable_laguerreProduct (hF n).differentiable x).differentiableOn) + Metric.isOpen_ball + have hz : (0 : ℂ) ∈ Metric.ball 0 r := by simpa using hr + have hc := (hd.differentiableAt (Metric.isOpen_ball.mem_nhds hz)).continuousAt + have hgprod : laguerreProduct g x 0 ≠ 0 := by simpa [laguerreProduct] using mul_ne_zero hg hg + obtain ⟨V, hV, havoid⟩ := hlim.exists_eventually_ne + (Metric.ball_mem_nhds (0 : ℂ) hr) hc hgprod + have hgood : {z | laguerreProduct g x z ≠ 0} ∈ 𝓝 (0 : ℂ) := hc.eventually_ne hgprod + obtain ⟨δ, hδ, hball⟩ := Metric.mem_nhds_iff.mp (inter_mem hV hgood) + have hmem {z : ℂ} (hzδ : z ∈ Metric.ball (x : ℂ) δ) : + (z - (x : ℂ)) * (-I) ∈ Metric.ball (0 : ℂ) δ := by + simpa [Metric.mem_ball, dist_eq_norm, norm_mul] using hzδ + refine ⟨δ, hδ, (fun z hzδ => ne_zero_of_laguerreProduct_ne_zero (hball (hmem hzδ)).2), ?_⟩ + filter_upwards [havoid] with n hn z hzδ + exact ne_zero_of_laguerreProduct_ne_zero (hn _ (hball (hmem hzδ)).1) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/LocalProductLimit.lean b/RealRooted/LaguerreInequalities/LocalProductLimit.lean new file mode 100644 index 000000000..d64f4b967 --- /dev/null +++ b/RealRooted/LaguerreInequalities/LocalProductLimit.lean @@ -0,0 +1,67 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.LaguerreInequalities.Analytic +public import TauCeti.Analysis.Normed.Group.LocallyBounded +import RealRooted.LaguerreInequalities.ModulusBound +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import TauCeti.Analysis.Complex.Conformal.Vitali +import Mathlib.Topology.MetricSpace.ProperSpace.Lemmas + +/-! +# Local normality of symmetric products + +Convergence of a Laguerre--Pólya sequence at one point above the real axis +bounds its symmetric products on a whole disk. Pointwise convergence on a +disk therefore gives locally uniform convergence of the symmetric products. +This assertion does not assume locally uniform convergence of the original +functions. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- Convergence at a single vertical endpoint locally bounds every symmetric +product centered at the corresponding real point. -/ +theorem isLocallyBoundedOn_laguerreProduct_of_tendsto {F : ℕ → ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) (x R : ℝ) {w : ℂ} + (hw : Tendsto (fun n => F n (x + (R : ℂ) * I)) atTop (𝓝 w)) : + TauCeti.IsLocallyBoundedOn (fun n => laguerreProduct (F n) x) (Metric.ball 0 R) := by + obtain ⟨C, _, hC⟩ := (Metric.isBounded_range_of_tendsto _ hw).exists_pos_norm_le + apply TauCeti.isLocallyBoundedOn_of_forall_norm_le (C := C ^ 2) + intro n z hz + have hzR : ‖z‖ < R := by simpa only [Metric.mem_ball, dist_zero_right] using hz + exact ((hF n).norm_laguerreProduct_le x hzR.le).trans + (pow_le_pow_left₀ (norm_nonneg _) (hC _ ⟨n, rfl⟩) 2) + +/-- Pointwise convergence of Laguerre--Pólya functions on a disk centered on +the real axis implies locally uniform convergence of their symmetric products. -/ +theorem tendstoLocallyUniformlyOn_laguerreProduct {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) (x : ℝ) {r : ℝ} (hr : 0 < r) + (hpoint : ∀ z ∈ Metric.ball (x : ℂ) r, + Tendsto (fun n => F n z) atTop (𝓝 (g z))) : + TendstoLocallyUniformlyOn (fun n => laguerreProduct (F n) x) + (laguerreProduct g x) atTop (Metric.ball 0 r) := by + have hb : TauCeti.IsLocallyBoundedOn (fun n => laguerreProduct (F n) x) + (Metric.ball 0 r) := by + rw [TauCeti.isLocallyBoundedOn_def] + intro K hKr hK + obtain ⟨R, hR, hKR⟩ := exists_pos_lt_subset_ball hr hK.isClosed hKr + have hend : (x : ℂ) + (R : ℂ) * I ∈ Metric.ball (x : ℂ) r := by + simpa [Metric.mem_ball, dist_eq_norm, norm_mul, abs_of_pos hR.1] using hR.2 + exact (TauCeti.isLocallyBoundedOn_def.mp + (isLocallyBoundedOn_laguerreProduct_of_tendsto hF x R (hpoint _ hend))) K hKR hK + apply TauCeti.tendstoLocallyUniformlyOn_of_isLocallyBoundedOn_of_forall_tendsto + Metric.isOpen_ball + (fun n => (differentiable_laguerreProduct (hF n).differentiable x).differentiableOn) hb + intro z hz + have hplus : (x : ℂ) + z * I ∈ Metric.ball (x : ℂ) r := by + simpa [Metric.mem_ball, dist_eq_norm, norm_mul] using hz + have hminus : (x : ℂ) - z * I ∈ Metric.ball (x : ℂ) r := by + simpa [Metric.mem_ball, dist_eq_norm, norm_mul, sub_eq_add_neg] using hz + exact (hpoint _ hplus).mul (hpoint _ hminus) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/LocalZeroLimit.lean b/RealRooted/LaguerreInequalities/LocalZeroLimit.lean new file mode 100644 index 000000000..227828705 --- /dev/null +++ b/RealRooted/LaguerreInequalities/LocalZeroLimit.lean @@ -0,0 +1,129 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.LaguerreInequalities.Analytic +import RealRooted.LaguerreInequalities.LocalProductLimit +import RealRooted.Mathlib.Analysis.Complex.LineIdentity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import TauCeti.Analysis.Complex.Conformal.Vitali + +/-! +# Vanishing local limits of Laguerre--Pólya functions + +The zero case of the local limit problem can be detected on the real line. +Symmetric products allow analytic continuation of this vanishing even when +normal convergence of the original functions has not been established. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- If a pointwise disk limit of Laguerre--Pólya functions vanishes on the +real diameter, its symmetric products converge locally uniformly to zero. -/ +theorem tendstoLocallyUniformlyOn_laguerreProduct_zero {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) (x : ℝ) {r : ℝ} (hr : 0 < r) + (hpoint : ∀ z ∈ Metric.ball (x : ℂ) r, + Tendsto (fun n => F n z) atTop (𝓝 (g z))) + (hzero : ∀ y : ℝ, (y : ℂ) ∈ Metric.ball (x : ℂ) r → g y = 0) : + TendstoLocallyUniformlyOn (fun n => laguerreProduct (F n) x) + (fun _ => 0) atTop (Metric.ball 0 r) := by + have hlim := tendstoLocallyUniformlyOn_laguerreProduct hF x hr hpoint + have hd := hlim.differentiableOn (Eventually.of_forall fun n => + (differentiable_laguerreProduct (hF n).differentiable x).differentiableOn) + Metric.isOpen_ball + have hz : (0 : ℂ) ∈ Metric.ball 0 r := by simpa using hr + have heq := (hd.analyticOnNhd Metric.isOpen_ball).eqOn_zero_of_line_eq_zero + (convex_ball (0 : ℂ) r).isPreconnected hz I_ne_zero + (show ∀ᶠ t : ℝ in 𝓝 0, laguerreProduct g x (0 + (t : ℂ) * I) = 0 from by + have ht : ∀ᶠ t : ℝ in 𝓝 0, ((x - t : ℝ) : ℂ) ∈ Metric.ball (x : ℂ) r := + (show Continuous (fun t : ℝ => ((x - t : ℝ) : ℂ)) from by fun_prop).tendsto 0 + |>.eventually (Metric.isOpen_ball.mem_nhds (by simpa using hr)) + filter_upwards [ht] with t ht + simp only [laguerreProduct, zero_add, mul_assoc, I_mul_I, mul_neg_one] + rw [show (x : ℂ) + -(t : ℂ) = ((x - t : ℝ) : ℂ) by push_cast; ring, + hzero _ ht, zero_mul]) + exact hlim.congr_right heq + +/-- A convergent vertical endpoint propagates vanishing symmetric products +from a smaller disk to the full disk bounded by that endpoint. -/ +theorem tendstoLocallyUniformlyOn_laguerreProduct_zero_of_endpoint + {F : ℕ → ℂ → ℂ} (hF : ∀ n, IsLaguerrePolya (F n)) (x : ℝ) + {R δ : ℝ} (hδ : 0 < δ) (hδR : δ ≤ R) {w : ℂ} + (hw : Tendsto (fun n => F n (x + (R : ℂ) * I)) atTop (𝓝 w)) + (hlocal : TendstoLocallyUniformlyOn (fun n => laguerreProduct (F n) x) + (fun _ => 0) atTop (Metric.ball 0 δ)) : + TendstoLocallyUniformlyOn (fun n => laguerreProduct (F n) x) + (fun _ => 0) atTop (Metric.ball 0 R) := by + have hR : 0 < R := hδ.trans_le hδR + have hzδ : (0 : ℂ) ∈ Metric.ball 0 δ := by simpa using hδ + have hzR : (0 : ℂ) ∈ Metric.ball 0 R := by simpa using hR + obtain ⟨q, hq, hqzero, hlim⟩ := TauCeti.vitali_of_tendsto Metric.isOpen_ball + (convex_ball (0 : ℂ) R).isPreconnected + (fun n => (differentiable_laguerreProduct (hF n).differentiable x).differentiableOn) + (isLocallyBoundedOn_laguerreProduct_of_tendsto hF x R hw) + (Metric.ball_subset_ball hδR) hzR (Metric.isOpen_ball.preperfect _ hzδ) + (fun z hz => hlocal.tendsto_at hz) + have heq := (hq.analyticOnNhd Metric.isOpen_ball).eqOn_zero_of_preconnected_of_eventuallyEq_zero + (convex_ball (0 : ℂ) R).isPreconnected hzR + (Filter.eventually_of_mem (Metric.ball_mem_nhds (0 : ℂ) hδ) fun z hz => hqzero hz) + exact hlim.congr_right heq + +/-- A pointwise disk limit of Laguerre--Pólya functions which vanishes on the +real diameter vanishes on the whole disk. No local uniform convergence of +the original functions is assumed. -/ +theorem eqOn_zero_of_tendsto_of_real_eq_zero {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) {r : ℝ} + (hpoint : ∀ z ∈ Metric.ball (0 : ℂ) r, + Tendsto (fun n => F n z) atTop (𝓝 (g z))) + (hzero : ∀ y : ℝ, (y : ℂ) ∈ Metric.ball (0 : ℂ) r → g y = 0) : + Set.EqOn g 0 (Metric.ball 0 r) := by + intro z hz + have hzr : ‖z‖ < r := by simpa using hz + let δ := (r - ‖z‖) / 4 + let R := |z.im| + δ + have hδ : 0 < δ := by dsimp [δ]; linarith + have hδR : δ ≤ R := by dsimp [R]; linarith [abs_nonneg z.im] + have hnormx : ‖(z.re : ℂ)‖ ≤ ‖z‖ := by simpa using abs_re_le_norm z + have hsub : Metric.ball (z.re : ℂ) δ ⊆ Metric.ball (0 : ℂ) r := by + intro u hu + have huδ : ‖u - (z.re : ℂ)‖ < δ := by simpa [dist_eq_norm] using hu + have huNorm := norm_add_le (u - (z.re : ℂ)) (z.re : ℂ) + rw [sub_add_cancel] at huNorm + have : ‖u‖ < r := by dsimp [δ] at huδ; linarith + simpa using this + have hlocal := tendstoLocallyUniformlyOn_laguerreProduct_zero hF z.re hδ + (fun u hu => hpoint u (hsub hu)) (fun y hy => hzero y (hsub hy)) + have hnormabs : ‖(z.re : ℂ) + ((|z.im| : ℝ) : ℂ) * I‖ = ‖z‖ := by + rw [norm_eq_sqrt_sq_add_sq, norm_eq_sqrt_sq_add_sq z] + simp + have hend : (z.re : ℂ) + (R : ℂ) * I ∈ Metric.ball (0 : ℂ) r := by + have heq : (z.re : ℂ) + (R : ℂ) * I = + ((z.re : ℂ) + ((|z.im| : ℝ) : ℂ) * I) + (δ : ℂ) * I := by + dsimp [R] + push_cast + ring + have hn := norm_add_le ((z.re : ℂ) + ((|z.im| : ℝ) : ℂ) * I) ((δ : ℂ) * I) + rw [hnormabs] at hn + have hnδ : ‖(δ : ℂ) * I‖ = δ := by simp [abs_of_pos hδ] + rw [hnδ] at hn + rw [Metric.mem_ball, dist_zero_right, heq] + dsimp [δ] at hn + linarith + have hlim := tendstoLocallyUniformlyOn_laguerreProduct_zero_of_endpoint + hF z.re hδ hδR (hpoint _ hend) hlocal + have hymem : (z.im : ℂ) ∈ Metric.ball (0 : ℂ) R := by + simp only [Metric.mem_ball, dist_zero_right, norm_real, Real.norm_eq_abs] + dsimp [R] + linarith + have hnorm := ((hpoint z hz).norm.pow 2).ofReal + have hprod : Tendsto (fun n => laguerreProduct (F n) z.re z.im) atTop + (𝓝 ((‖g z‖ ^ 2 : ℝ) : ℂ)) := hnorm.congr fun n => by + rw [laguerreProduct_ofReal (hF n).conj, re_add_im] + have hnzero : ‖g z‖ ^ 2 = 0 := by + exact_mod_cast tendsto_nhds_unique hprod (hlim.tendsto_at hymem) + simpa using (sq_eq_zero_iff.mp hnzero) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/LogConcavity.lean b/RealRooted/LaguerreInequalities/LogConcavity.lean new file mode 100644 index 000000000..6e2ac047b --- /dev/null +++ b/RealRooted/LaguerreInequalities/LogConcavity.lean @@ -0,0 +1,47 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import RealRooted.Mathlib.Analysis.Convex.LogDerivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.LaguerreInequalities.DerivativeFormula + +/-! +# Logarithmic concavity between real zeros + +A Laguerre--Pólya function has concave logarithmic absolute value on every +convex set of real points where it does not vanish. This gives bounds for its +logarithmic derivative from real secant slopes. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- A Laguerre--Pólya function has concave logarithmic absolute value on any +convex zero-free part of the real line. The real logarithm handles either sign. -/ +theorem IsLaguerrePolya.concaveOn_log_re {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + {S : Set ℝ} (hS : Convex ℝ S) (hne : ∀ x ∈ S, f x ≠ 0) : + ConcaveOn ℝ S (fun x : ℝ => Real.log (f x).re) := by + have hreal (x : ℝ) : ((f x).re : ℂ) = f x := by + apply conj_eq_iff_re.mp + simpa using (hf.conj x).symm + apply concaveOn_log_of_deriv_sq_sub_nonneg hS + (f' := fun x : ℝ => (_root_.deriv f x).re) + (f'' := fun x : ℝ => (_root_.deriv (_root_.deriv f) x).re) + · intro x _ + exact (hf.differentiable x).hasDerivAt.real_of_complex + · intro x _ + exact (hf.differentiable.deriv x).hasDerivAt.real_of_complex + · intro x hx hzero + exact hne x hx (by rw [← hreal x, hzero, ofReal_zero]) + · intro x _ + have hL := hf.laguerreCoefficient_nonneg x 1 + rw [laguerreCoefficient_one hf.differentiable hf.conj] at hL + simpa [iteratedDeriv_succ] using hL + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/LogDerivative.lean b/RealRooted/LaguerreInequalities/LogDerivative.lean new file mode 100644 index 000000000..4463ed65b --- /dev/null +++ b/RealRooted/LaguerreInequalities/LogDerivative.lean @@ -0,0 +1,113 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import RealRooted.LaguerreInequalities.RealZeros +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# The Pick property from generalized Laguerre inequalities + +Nonnegative generalized Laguerre coefficients force the squared vertical modulus +to have nonnegative derivative in the upper half-plane. Consequently the negative +logarithmic derivative has nonnegative imaginary part. For a nonzero real entire +function it is holomorphic there, since the inequalities also force all zeros to +be real. No growth restriction is imposed. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- Every ordinary Taylor derivative of the Laguerre product has nonnegative real +part when all generalized Laguerre coefficients are nonnegative. Odd derivatives +vanish, and even derivatives are positive factorial multiples of those coefficients. -/ +theorem iteratedDeriv_laguerreProduct_re_nonneg {f : ℂ → ℂ} (x : ℝ) + (h : ∀ n, 0 ≤ laguerreCoefficient f x n) (n : ℕ) : + 0 ≤ (iteratedDeriv n (laguerreProduct f x) 0).re := by + rcases Nat.even_or_odd n with hn | hn + · obtain ⟨k, rfl⟩ := hn + have hk := h k + rw [laguerreCoefficient, two_mul] at hk + simpa only [zero_mul] using (le_div_iff₀ (by positivity)).mp hk + · rw [iteratedDeriv_laguerreProduct_odd f x hn] + simp + +/-- The vertical Laguerre product has nonnegative real derivative on the +nonnegative real axis, by its entire Taylor expansion. -/ +theorem re_deriv_laguerreProduct_nonneg {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (x : ℝ) (h : ∀ n, 0 ≤ laguerreCoefficient f x n) {y : ℝ} (hy : 0 ≤ y) : + 0 ≤ (deriv (laguerreProduct f x) y).re := by + have hd := (differentiable_laguerreProduct hf x).deriv + have hs := Complex.hasSum_re (Complex.hasSum_taylorSeries_of_entire hd 0 (y : ℂ)) + rw [← hs.tsum_eq] + apply tsum_nonneg + intro n + have hn := iteratedDeriv_laguerreProduct_re_nonneg x h (n + 1) + rw [iteratedDeriv_succ'] at hn + simp only [sub_zero, smul_eq_mul] + simp only [← Complex.ofReal_natCast, ← ofReal_inv, ← ofReal_pow, mul_re, + ofReal_re, ofReal_im, zero_mul, sub_zero] + exact mul_nonneg (inv_nonneg.mpr (Nat.cast_nonneg _)) (mul_nonneg (pow_nonneg hy n) hn) + +/-- The derivative of the vertical squared modulus is minus twice the imaginary +part of the derivative times the conjugate value. -/ +theorem re_deriv_laguerreProduct_eq {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) (x y : ℝ) : + (deriv (laguerreProduct f x) y).re = + -2 * (deriv f ((x : ℂ) + y * I) * conj (f ((x : ℂ) + y * I))).im := by + have hp : HasDerivAt (fun z : ℂ => (x : ℂ) + z * I) I (y : ℂ) := by + simpa using ((hasDerivAt_id (y : ℂ)).mul_const I).const_add (x : ℂ) + have hm : HasDerivAt (fun z : ℂ => (x : ℂ) - z * I) (-I) (y : ℂ) := by + simpa using ((hasDerivAt_id (y : ℂ)).mul_const I).const_sub (x : ℂ) + have hd := ((hf _).hasDerivAt.comp (y : ℂ) hp).mul + ((hf _).hasDerivAt.comp (y : ℂ) hm) + have heq : (x : ℂ) - y * I = conj ((x : ℂ) + y * I) := by + simp [sub_eq_add_neg] + have hc' : deriv f (conj ((x : ℂ) + y * I)) = + conj (deriv f ((x : ℂ) + y * I)) := by + simpa only [iteratedDeriv_one] using iteratedDeriv_conj hc 1 ((x : ℂ) + y * I) + rw [show deriv (laguerreProduct f x) (y : ℂ) = _ from hd.deriv] + simp only [Function.comp_apply] + rw [heq, hc, hc'] + simp only [add_re, mul_re, mul_im, conj_re, conj_im, I_re, I_im, neg_re, neg_im] + ring + +/-- All generalized Laguerre inequalities imply the closed Pick inequality for +the negative logarithmic derivative. This includes real-axis zeros because the +logarithmic derivative uses totalized division there. -/ +theorem im_neg_logDeriv_nonneg_of_laguerreCoefficient_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) {z : ℂ} (hz : 0 ≤ z.im) : + 0 ≤ (-logDeriv f z).im := by + have hd := re_deriv_laguerreProduct_nonneg hf z.re (h z.re) hz + rw [re_deriv_laguerreProduct_eq hf hc, re_add_im] at hd + rw [logDeriv_apply, neg_im, div_im, ← sub_div, ← neg_div] + apply div_nonneg _ (normSq_nonneg _) + simp only [mul_im, conj_re, conj_im] at hd + linarith + +/-- Under the generalized Laguerre inequalities, the negative logarithmic +derivative of a real entire function is holomorphic on the upper half-plane. +For the zero function the totalized logarithmic derivative is identically zero. -/ +theorem differentiableOn_neg_logDeriv_of_laguerreCoefficient_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + DifferentiableOn ℂ (fun z => -logDeriv f z) UpperHalfPlane.upperHalfPlaneSet := by + by_cases hne : f = 0 + · subst f + simpa only [logDeriv_apply, deriv_zero, Pi.zero_apply, zero_div, neg_zero] using + (differentiable_const (0 : ℂ)).differentiableOn + intro z hz + have hfz : f z ≠ 0 := by + intro heq + have him := im_eq_zero_of_laguerreCoefficient_nonneg hf hc hne h heq + exact (ne_of_gt hz) him + exact ((hf.deriv z).div (hf z) hfz).neg.differentiableWithinAt + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/MeasureSupport.lean b/RealRooted/LaguerreInequalities/MeasureSupport.lean new file mode 100644 index 000000000..7aead91d4 --- /dev/null +++ b/RealRooted/LaguerreInequalities/MeasureSupport.lean @@ -0,0 +1,55 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import TauCeti.Analysis.Complex.Pick.Nevanlinna +public import Mathlib.MeasureTheory.Measure.Support +import RealRooted.LaguerreInequalities.Nevanlinna +import RealRooted.Mathlib.Analysis.Complex.Pick.Support +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Star + +/-! +# Nevanlinna measures carried by real zeros + +The measure representing a real entire function's negative logarithmic derivative +is supported on its real zeros. In particular, all generalized Laguerre +inequalities provide such a finite measure without assuming a growth bound. +-/ + +public section + +open Complex MeasureTheory +open scoped ComplexConjugate + +namespace RealRooted + +/-- A finite Nevanlinna measure for the negative logarithmic derivative of a real +entire function is supported on its real zeros. -/ +theorem support_nevanlinna_neg_logDeriv_subset_zeros {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) + {ρ : Measure ℝ} [IsFiniteMeasure ρ] {b c : ℝ} + (hrep : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + -logDeriv f z = (b : ℂ) * z + ∫ x, TauCeti.nevanlinnaKernel z x ∂ρ + c) : + ρ.support ⊆ {x : ℝ | f x = 0} := by + apply TauCeti.support_subset_of_nevanlinna_of_analyticAt hrep + · intro r hr + exact ((hf.deriv.analyticAt r).div (hf.analyticAt r) hr).neg + · intro x + simp only [neg_im, logDeriv_ofReal_im hc, neg_zero] + +/-- Generalized Laguerre inequalities give a finite Nevanlinna representation +whose measure is carried by the actual real zero set of the function. -/ +theorem exists_nevanlinna_supported_on_zeros {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + ∃ (ρ : Measure ℝ) (b : ℝ), IsFiniteMeasure ρ ∧ 0 ≤ b ∧ + (∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + -logDeriv f z = (b : ℂ) * z + ∫ x, TauCeti.nevanlinnaKernel z x ∂ρ + + (-logDeriv f I).re) ∧ ρ.support ⊆ {x : ℝ | f x = 0} ∧ + ∀ᵐ (x : ℝ) ∂ρ, f x = 0 := by + obtain ⟨ρ, b, hρ, hb, hrep⟩ := + exists_nevanlinna_neg_logDeriv_of_laguerreCoefficient_nonneg hf hc h + let _ := hρ + have hs := support_nevanlinna_neg_logDeriv_subset_zeros hf hc hrep + exact ⟨ρ, b, hρ, hb, hrep, hs, Filter.mem_of_superset ρ.support_mem_ae hs⟩ + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/ModulusBound.lean b/RealRooted/LaguerreInequalities/ModulusBound.lean new file mode 100644 index 000000000..ae53ee456 --- /dev/null +++ b/RealRooted/LaguerreInequalities/ModulusBound.lean @@ -0,0 +1,67 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.LaguerreInequalities.Analytic +import RealRooted.LaguerreInequalities.GeneratingPolynomial +import RealRooted.Mathlib.Analysis.Complex.Polynomial.CoefficientMajorant +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct + +/-! +# Modulus bounds for symmetric products + +The product of opposite translates of a Laguerre--Pólya function is bounded on +a complex disk by its value at the imaginary endpoints of the diameter. +This follows from the nonnegative coefficients of the generalized Laguerre +generating polynomial and passage to locally uniform polynomial limits. +-/ + +public section + +open Complex Polynomial Filter Topology + +namespace RealRooted + +private theorem norm_laguerreProduct_polynomial_le {p : ℝ[X]} (hp : p.Splits) + (x : ℝ) {z : ℂ} {R : ℝ} (hz : ‖z‖ ≤ R) : + ‖laguerreProduct (fun w => (p.map ofRealHom).eval w) x z‖ ≤ + ‖(p.map ofRealHom).eval (x + (R : ℂ) * I)‖ ^ 2 := by + let q := laguerreGeneratingPolynomial p x + have hq : ∀ k, 0 ≤ q.coeff k := + (isPFPolynomial_laguerreGeneratingPolynomial p x).hasNonnegCoeffs + have hbound := Polynomial.norm_eval_map_le_of_coeff_nonneg hq + (z := z ^ 2) (R := R ^ 2) + (by simpa only [norm_pow] using pow_le_pow_left₀ (norm_nonneg z) hz 2) + have hqR : q.eval (R ^ 2) = ‖(p.map ofRealHom).eval (x + (R : ℂ) * I)‖ ^ 2 := by + apply ofReal_injective + rw [← ofRealHom_eq_coe, ← Polynomial.eval_map_apply] + change ((laguerreGeneratingPolynomial p x).map ofRealHom).eval (ofRealHom (R ^ 2)) = _ + rw [ofRealHom_eq_coe, ofReal_pow, eval_laguerreGeneratingPolynomial hp] + exact laguerreProduct_ofReal (f := fun w => (p.map ofRealHom).eval w) + (isLaguerrePolya_eval_map hp).conj x R + rw [hqR] at hbound + simpa only [q, eval_laguerreGeneratingPolynomial hp, laguerreProduct] using hbound + +/-- Symmetric products of Laguerre--Pólya functions have a radial majorant +provided by their squared modulus above the real axis. -/ +theorem IsLaguerrePolya.norm_laguerreProduct_le {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (x : ℝ) {z : ℂ} {R : ℝ} (hz : ‖z‖ ≤ R) : + ‖laguerreProduct f x z‖ ≤ ‖f (x + (R : ℂ) * I)‖ ^ 2 := by + obtain ⟨p, hp, ht⟩ := hf + have hpoint (w : ℂ) := ht.tendstoLocallyUniformlyOn.tendsto_at (Set.mem_univ w) + apply le_of_tendsto_of_tendsto' + (((hpoint (x + z * I)).mul (hpoint (x - z * I))).norm) + ((hpoint (x + (R : ℂ) * I)).norm.pow 2) + intro n + exact norm_laguerreProduct_polynomial_le + ((hp n).elim (fun h => h ▸ Splits.zero) id) x hz + +/-- The opposite-translate product is bounded on a disk by the value on its +imaginary diameter. The zero function is included. -/ +theorem IsLaguerrePolya.norm_mul_add_sub_le {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + (x : ℝ) {z : ℂ} {R : ℝ} (hz : ‖z‖ ≤ R) : + ‖f (x + z) * f (x - z)‖ ≤ ‖f (x + (R : ℂ) * I)‖ ^ 2 := by + have h := hf.norm_laguerreProduct_le x (z := z * (-I)) (by simpa using hz) + have hi : z * (-I) * I = z := by simp [mul_assoc, neg_mul] + simpa only [laguerreProduct, hi] using h + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/Nevanlinna.lean b/RealRooted/LaguerreInequalities/Nevanlinna.lean new file mode 100644 index 000000000..1b136f856 --- /dev/null +++ b/RealRooted/LaguerreInequalities/Nevanlinna.lean @@ -0,0 +1,38 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import TauCeti.Analysis.Complex.Pick.Nevanlinna +import RealRooted.LaguerreInequalities.LogDerivative + +/-! +# Nevanlinna representation from generalized Laguerre inequalities + +Every real entire function satisfying all generalized Laguerre inequalities has +a negative logarithmic derivative with a finite Nevanlinna representing measure. +This is an intermediate step toward the unrestricted converse in +Csordas--Vishnyakova (2013), Theorem 2.3. No order, genus, strict Pick inequality, +or nonvanishing value at the origin is assumed. +-/ + +public section + +open Complex MeasureTheory +open scoped ComplexConjugate + +namespace RealRooted + +/-- All generalized Laguerre inequalities give a finite Nevanlinna representation +of the negative logarithmic derivative. The closed Pick inequality allows zero +measure and zero linear coefficient, including constant and exponential cases. -/ +theorem exists_nevanlinna_neg_logDeriv_of_laguerreCoefficient_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) : + ∃ (ρ : Measure ℝ) (b : ℝ), IsFiniteMeasure ρ ∧ 0 ≤ b ∧ + ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + -logDeriv f z = (b : ℂ) * z + ∫ x, TauCeti.nevanlinnaKernel z x ∂ρ + + (-logDeriv f I).re := + TauCeti.exists_isFiniteMeasure_eq_nevanlinnaKernel_add + (differentiableOn_neg_logDeriv_of_laguerreCoefficient_nonneg hf hc h) + (fun _ hz => im_neg_logDeriv_nonneg_of_laguerreCoefficient_nonneg hf hc h hz.le) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/PowerGenerating.lean b/RealRooted/LaguerreInequalities/PowerGenerating.lean new file mode 100644 index 000000000..f9b94b9fa --- /dev/null +++ b/RealRooted/LaguerreInequalities/PowerGenerating.lean @@ -0,0 +1,85 @@ +module + +public import RealRooted.PFPolynomial +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +import RealRooted.Mathlib.Algebra.Polynomial.PowerRootsProduct +import Mathlib.Analysis.Complex.Polynomial.Basic +import Mathlib.Tactic.Ring + +/-! +# Generating polynomials for higher-even auxiliary inequalities + +For `g = X^n + 1`, the translated product of a splitting polynomial is a +polynomial in `t^n`. Its compressed polynomial has roots `-(x-r)^n`. +For even `n` these roots are nonpositive, with all coefficients nonnegative. +This is the denominator-free form of Cardon's Example 2. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- The polynomial in the compressed translation variable for the auxiliary +`X^n + 1`. The product keeps every real root of the input with multiplicity. -/ +@[expose] noncomputable def powerGeneratingPolynomial (n : ℕ) (p : ℝ[X]) (x : ℝ) : ℝ[X] := + C (p.leadingCoeff ^ n) * (p.roots.map fun r : ℝ ↦ X + C ((x - r) ^ n)).prod + +/-- Even powers give a PF generating polynomial, including zero inputs and +real centers equal to an input root. -/ +theorem isPFPolynomial_powerGeneratingPolynomial {n : ℕ} (hn : Even n) + (p : ℝ[X]) (x : ℝ) : IsPFPolynomial (powerGeneratingPolynomial n p x) := by + apply (IsPFPolynomial.of_C_nonneg (hn.pow_nonneg p.leadingCoeff)).mul + induction p.roots using Multiset.induction_on with + | empty => simpa using IsPFPolynomial.one + | cons r s ih => + simpa using (isPFPolynomial_X_add_C (hn.pow_nonneg (x - r))).mul ih + +private theorem eval_powerGeneratingPolynomial (n : ℕ) (p : ℝ[X]) (x : ℝ) (z : ℂ) : + ((powerGeneratingPolynomial n p x).map ofRealHom).eval z = + (p.leadingCoeff : ℂ) ^ n * + (p.roots.map fun r : ℝ ↦ z + ((x : ℂ) - (r : ℂ)) ^ n).prod := by + simp only [powerGeneratingPolynomial, Polynomial.map_mul, map_C, eval_mul, eval_C, + ofRealHom_eq_coe, ofReal_pow, Polynomial.map_multiset_prod, eval_multiset_prod, + Multiset.map_map, Function.comp_apply, Polynomial.map_add, map_X, eval_add, eval_X, + ofReal_sub] + +private theorem auxiliaryProduct_eval_eq {n : ℕ} (hn : n ≠ 0) {p : ℝ[X]} + (hp : p.Splits) (x : ℝ) (z : ℂ) : + auxiliaryProduct (X ^ n + 1) (fun w ↦ (p.map ofRealHom).eval w) x z = + (p.leadingCoeff : ℂ) ^ n * + (p.roots.map fun r : ℝ ↦ ((x : ℂ) - (r : ℂ)) ^ n + z ^ n).prod := by + let g : ℂ[X] := X ^ n + 1 + have hcard : g.roots.card = n := by + rw [← (IsAlgClosed.splits g).natDegree_eq_card_roots] + simpa only [g, C_1] using + (natDegree_X_pow_add_C (n := n) (r := (1 : ℂ))) + have heval (w : ℂ) : (p.map ofRealHom).eval w = + (p.leadingCoeff : ℂ) * (p.roots.map fun r : ℝ ↦ w - (r : ℂ)).prod := by + simpa only [leadingCoeff_map, hp.roots_map, Multiset.map_map, Function.comp_def, + ofRealHom_eq_coe] using (hp.map ofRealHom).eval_eq_prod_roots w + simp only [auxiliaryProduct, Polynomial.map_add, Polynomial.map_pow, map_X, Polynomial.map_one] + change (g.roots.map fun a ↦ (p.map ofRealHom).eval ((x : ℂ) - a * z)).prod = _ + simp_rw [heval] + rw [Multiset.prod_map_mul, Multiset.map_const', Multiset.prod_replicate, hcard, + Multiset.prod_map_prod_map] + apply congrArg ((p.leadingCoeff : ℂ) ^ n * ·) + apply congrArg Multiset.prod + apply Multiset.map_congr rfl + intro r _ + have harg (a : ℂ) : (x : ℂ) - a * z - (r : ℂ) = + ((x : ℂ) - (r : ℂ)) - a * z := by ring + simp_rw [harg] + exact Polynomial.prod_roots_X_pow_add_one_sub_mul hn _ _ + +/-- The full translated product is obtained by substituting `t^n` into the +compressed generating polynomial. No division by `p(x)` is used. -/ +theorem eval_powerGeneratingPolynomial_pow {n : ℕ} (hn : n ≠ 0) {p : ℝ[X]} + (hp : p.Splits) (x : ℝ) (z : ℂ) : + ((powerGeneratingPolynomial n p x).map ofRealHom).eval (z ^ n) = + auxiliaryProduct (X ^ n + 1) (fun w ↦ (p.map ofRealHom).eval w) x z := by + rw [eval_powerGeneratingPolynomial, auxiliaryProduct_eval_eq hn hp] + simp only [add_comm] + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/RealZeros.lean b/RealRooted/LaguerreInequalities/RealZeros.lean new file mode 100644 index 000000000..bb1ad6092 --- /dev/null +++ b/RealRooted/LaguerreInequalities/RealZeros.lean @@ -0,0 +1,117 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Complex.TaylorSeries +import Mathlib.Analysis.Analytic.IsolatedZeros +import Mathlib.Topology.Algebra.InfiniteSum.Order + +/-! +# Real zeros from generalized Laguerre inequalities + +For a nonzero real entire function, nonnegative generalized Laguerre coefficients +at every real point force every zero to be real. The argument uses the entire +Taylor series of the product of opposite imaginary translates. It does not +require a growth assumption. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- Odd derivatives of the even Laguerre product vanish at the origin. -/ +theorem iteratedDeriv_laguerreProduct_odd (f : ℂ → ℂ) (x : ℝ) {n : ℕ} (hn : Odd n) : + iteratedDeriv n (laguerreProduct f x) 0 = 0 := by + have heven : (fun z => laguerreProduct f x (-z)) = laguerreProduct f x := by + ext z + exact laguerreProduct_neg f x z + have h := iteratedDeriv_comp_neg n (laguerreProduct f x) 0 + rw [heven, neg_zero, hn.neg_one_pow, neg_one_smul] at h + linear_combination h / 2 + +private theorem laguerre_taylor_nonneg {f : ℂ → ℂ} (x : ℝ) + (h : ∀ n, 0 ≤ laguerreCoefficient f x n) (n : ℕ) : + 0 ≤ (iteratedDeriv n (laguerreProduct f x) 0).re / n.factorial := by + rcases Nat.even_or_odd n with hn | hn + · obtain ⟨k, rfl⟩ := hn + simpa only [laguerreCoefficient, two_mul] using h k + · rw [iteratedDeriv_laguerreProduct_odd f x hn] + simp + +private theorem hasSum_laguerreProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (x y : ℝ) : + HasSum (fun n => (iteratedDeriv n (laguerreProduct f x) 0).re / n.factorial * y ^ n) + (laguerreProduct f x y).re := by + have h := Complex.hasSum_re + (Complex.hasSum_taylorSeries_of_entire (differentiable_laguerreProduct hf x) 0 (y : ℂ)) + convert h using 1 + ext n + simp only [sub_zero, smul_eq_mul] + rw [← Complex.div_natCast_re, ← Complex.re_mul_ofReal] + congr 1 + push_cast + ring + +private theorem laguerreProduct_eq_zero_of_pos_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (x : ℝ) + (h : ∀ n, 0 ≤ laguerreCoefficient f x n) {r : ℝ} (hr : 0 < r) + (hz : laguerreProduct f x r = 0) (z : ℂ) : laguerreProduct f x z = 0 := by + have hs := hasSum_laguerreProduct hf x r + rw [hz, zero_re] at hs + have hderiv (n : ℕ) : iteratedDeriv n (laguerreProduct f x) 0 = 0 := by + have hn : 0 ≤ (iteratedDeriv n (laguerreProduct f x) 0).re / n.factorial := + laguerre_taylor_nonneg x h n + have hle := le_hasSum hs n (fun j _ => + mul_nonneg (laguerre_taylor_nonneg x h j) (pow_nonneg hr.le j)) + have heq := le_antisymm hle (mul_nonneg hn (pow_nonneg hr.le n)) + have hcoeff := (mul_eq_zero.mp heq).resolve_right (pow_ne_zero n hr.ne') + have hre := (div_eq_zero_iff.mp hcoeff).resolve_right + (show (n.factorial : ℝ) ≠ 0 by positivity) + rw [← ofReal_re_iteratedDeriv_zero (laguerreProduct_conj hc x) n, hre, ofReal_zero] + rw [← Complex.taylorSeries_eq_of_entire' 0 z (differentiable_laguerreProduct hf x)] + simp [hderiv] + +private theorem eq_zero_of_laguerreProduct_eq_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (x : ℝ) (h : ∀ z, laguerreProduct f x z = 0) : f = 0 := by + have hplus : Differentiable ℂ (fun z => f ((x : ℂ) + z * I)) := hf.comp (by fun_prop) + have hminus : Differentiable ℂ (fun z => f ((x : ℂ) - z * I)) := hf.comp (by fun_prop) + have hp : AnalyticOnNhd ℂ (fun z => f ((x : ℂ) + z * I)) Set.univ := + fun z _ => hplus.analyticAt z + have hm : AnalyticOnNhd ℂ (fun z => f ((x : ℂ) - z * I)) Set.univ := + fun z _ => hminus.analyticAt z + rcases hp.eq_zero_or_eq_zero_of_mul_eq_zero hm (fun z _ => h z) + isPreconnected_univ with hp | hm + · funext z + change f z = 0 + have heq : (x : ℂ) + ((z - x) * (-I)) * I = z := by + ring_nf + simp [I_sq] + simpa only [heq] using hp ((z - x) * (-I)) (Set.mem_univ _) + · funext z + change f z = 0 + have heq : (x : ℂ) - ((z - x) * I) * I = z := by + ring_nf + simp [I_sq] + simpa only [heq] using hm ((z - x) * I) (Set.mem_univ _) + +/-- Generalized Laguerre inequalities at all real points force all zeros of a +nonzero real entire function to be real, without a growth hypothesis. -/ +theorem im_eq_zero_of_laguerreCoefficient_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (hne : f ≠ 0) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) {z : ℂ} (hz : f z = 0) : z.im = 0 := by + by_contra him + have hzero : laguerreProduct f z.re (z.im : ℂ) = 0 := by + rw [laguerreProduct, re_add_im, hz, zero_mul] + have habs : laguerreProduct f z.re (|z.im| : ℝ) = 0 := by + rcases le_total 0 z.im with hpos | hneg + · simpa only [abs_of_nonneg hpos] using hzero + · simpa only [abs_of_nonpos hneg, ofReal_neg, laguerreProduct_neg] using hzero + apply hne + exact eq_zero_of_laguerreProduct_eq_zero hf z.re + (laguerreProduct_eq_zero_of_pos_zero hf hc z.re (h z.re) (abs_pos.mpr him) habs) + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/Strict.lean b/RealRooted/LaguerreInequalities/Strict.lean new file mode 100644 index 000000000..15f08fe6d --- /dev/null +++ b/RealRooted/LaguerreInequalities/Strict.lean @@ -0,0 +1,203 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.LaguerreInequalities.DerivativeFormula +import RealRooted.LaguerreInequalities.ZeroFree +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RootDivision +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.Hermite.GeneratingFunction + +/-! +# Equality in the first Laguerre inequality + +Removing an actual real zero contributes a positive square to the first +Laguerre form. Consequently equality at a nonzero value excludes all zeros. +The zero-free LP classification then identifies the remaining exponential +exception in the Craven–Csordas multiplicity argument. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- A real linear factor contributes the square of the cofactor value to +the first Laguerre coefficient. -/ +theorem laguerreCoefficient_one_linear_mul {g : ℂ → ℂ} (hg : IsLaguerrePolya g) + (r x : ℝ) : + laguerreCoefficient (fun z => (z - r) * g z) x 1 = + (g x).re ^ 2 + (x - r) ^ 2 * laguerreCoefficient g x 1 := by + let f := fun z : ℂ => (z - r) * g z + have hd (z : ℂ) : HasDerivAt f (g z + (z - r) * _root_.deriv g z) z := by + simpa only [one_mul] using ((hasDerivAt_id' z).sub_const (r : ℂ)).fun_mul + (hg.differentiable z).hasDerivAt + have hder : _root_.deriv f = fun z => g z + (z - r) * _root_.deriv g z := + funext fun z => (hd z).deriv + have hder2 (z : ℂ) : _root_.deriv (_root_.deriv f) z = + 2 * _root_.deriv g z + (z - r) * _root_.deriv (_root_.deriv g) z := by + rw [hder] + rw [((hg.differentiable z).hasDerivAt.fun_add + (((hasDerivAt_id' z).sub_const (r : ℂ)).fun_mul + (hg.deriv.differentiable z).hasDerivAt)).deriv] + ring + have hfd : Differentiable ℂ f := fun z => (hd z).differentiableAt + have hfc : ∀ z, f (conj z) = conj (f z) := by + intro z + change (conj z - r) * g (conj z) = conj ((z - r) * g z) + rw [show g (conj z) = conj (g z) from hg.conj z, map_mul, map_sub, conj_ofReal] + have h1 : (iteratedDeriv 1 f x).re = (g x).re + (x - r) * (_root_.deriv g x).re := by + rw [iteratedDeriv_one, hder] + simp + have h2 : (iteratedDeriv 2 f x).re = + 2 * (_root_.deriv g x).re + (x - r) * (_root_.deriv (_root_.deriv g) x).re := by + rw [show (2 : ℕ) = 1 + 1 from rfl, iteratedDeriv_succ, iteratedDeriv_one, hder2] + simp + change laguerreCoefficient f x 1 = _ + rw [laguerreCoefficient_one hfd hfc, h1, h2, + laguerreCoefficient_one hg.differentiable hg.conj] + simp only [f, mul_re, sub_re, ofReal_re, sub_im, ofReal_im, sub_self, zero_mul, + sub_zero, show (2 : ℕ) = 1 + 1 from rfl, iteratedDeriv_succ, iteratedDeriv_zero] + ring + +/-- Equality in the first Laguerre inequality at a nonzero value forces +an LP function to be zero-free. -/ +theorem IsLaguerrePolya.zero_free_of_laguerre_one_eq_zero {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {x : ℝ} (hfx : f x ≠ 0) + (heq : laguerreCoefficient f x 1 = 0) : ∀ z, f z ≠ 0 := by + intro z hz + have hfn : f ≠ 0 := fun h => hfx (by simp [h]) + have him := hf.im_eq_zero_of_eq_zero hfn hz + have hreal : (z.re : ℂ) = z := by apply Complex.ext <;> simp [him] + have hr : f (z.re : ℂ) = 0 := by rwa [hreal] + let g := dslope f (z.re : ℂ) + have hg : IsLaguerrePolya g := hf.dslope_of_eq_zero hr + have hfactor (w : ℂ) : f w = (w - z.re) * g w := by + simpa only [smul_eq_mul] using (sub_smul_dslope_of_zero hr w).symm + have hgx : g x ≠ 0 := by + intro hzero + exact hfx (by rw [hfactor, hzero, mul_zero]) + have hgre : (g x).re ≠ 0 := by + intro hzero + have hc : ((g x).re : ℂ) = g x := by + apply conj_eq_iff_re.mp + simpa using (hg.conj (x : ℂ)).symm + exact hgx (by rw [← hc, hzero, ofReal_zero]) + rw [show f = (fun w => (w - z.re) * g w) from funext hfactor, + laguerreCoefficient_one_linear_mul hg] at heq + have hnonneg := mul_nonneg (sq_nonneg (x - z.re)) (hg.laguerreCoefficient_nonneg x 1) + have hpos := sq_pos_of_ne_zero hgre + linarith + +/-- The first Laguerre coefficient of a real quadratic exponential is the +negative doubled quadratic parameter times the square of its value. -/ +theorem laguerreCoefficient_one_exp_quadratic (c a s x : ℝ) : + laguerreCoefficient (fun z => (c : ℂ) * exp ((a : ℂ) * z + (s : ℂ) * z ^ 2)) x 1 = + -2 * s * (((c : ℂ) * exp ((a : ℂ) * x + (s : ℂ) * (x : ℂ) ^ 2)).re) ^ 2 := by + let f := fun z : ℂ => (c : ℂ) * exp ((a : ℂ) * z + (s : ℂ) * z ^ 2) + have hfd : Differentiable ℂ f := by dsimp [f]; fun_prop + have hfc : ∀ z, f (conj z) = conj (f z) := by + intro z + simp only [f, map_mul, map_add, map_pow, conj_ofReal, ← exp_conj] + have he : (a : ℂ) + 2 * (s : ℂ) * (x : ℂ) = ((a + 2 * s * x : ℝ) : ℂ) := by + push_cast + ring + have hraw (n : ℕ) : iteratedDeriv n f x = + f x * ((hermiteHomogeneous (a + 2 * s * x) s n : ℝ) : ℂ) := by + dsimp [f] + rw [iteratedDeriv_const_mul_field, iteratedDeriv_exp_quadratic, he] + have hmap : ((hermiteHomogeneous (a + 2 * s * x) s n : ℝ) : ℂ) = + hermiteHomogeneous ((a + 2 * s * x : ℝ) : ℂ) (s : ℂ) n := + map_hermiteHomogeneous ofRealHom (a + 2 * s * x) s n + rw [hmap] + ring + have hre (n : ℕ) : (iteratedDeriv n f x).re = + (f x).re * hermiteHomogeneous (a + 2 * s * x) s n := by + simpa using congrArg Complex.re (hraw n) + change laguerreCoefficient f x 1 = -2 * s * (f x).re ^ 2 + rw [laguerreCoefficient_one hfd hfc, hre 1, hre 2] + norm_num [hermiteHomogeneous_add_two] + ring + +/-- Equality in the first Laguerre form away from a zero characterizes the +ordinary exponential exception among LP functions. -/ +theorem IsLaguerrePolya.eq_exp_of_laguerre_one_eq_zero {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {x : ℝ} (hfx : f x ≠ 0) + (heq : laguerreCoefficient f x 1 = 0) : + ∃ a : ℝ, ∀ z, f z = f 0 * exp ((a : ℂ) * z) := by + obtain ⟨a, b, hb, hfactor⟩ := hf.exists_exp_quadratic_of_forall_ne_zero + (hf.zero_free_of_laguerre_one_eq_zero hfx heq) + have hf0real : ((f 0).re : ℂ) = f 0 := by + simpa only [iteratedDeriv_zero] using ofReal_re_iteratedDeriv_zero hf.conj 0 + have hfre : (f x).re ≠ 0 := by + intro hz + have hreal : ((f x).re : ℂ) = f x := by + apply conj_eq_iff_re.mp + simpa using (hf.conj (x : ℂ)).symm + exact hfx (by rw [← hreal, hz, ofReal_zero]) + have hexfun : f = fun z => ((f 0).re : ℂ) * + exp ((a : ℂ) * z + ((-b / 2 : ℝ) : ℂ) * z ^ 2) := by + funext z + rw [hfactor, hf0real] + congr 2 + push_cast + ring + have hl : laguerreCoefficient f x 1 = b * (f x).re ^ 2 := by + conv_lhs => rw [hexfun, laguerreCoefficient_one_exp_quadratic] + have hx := congrFun hexfun (x : ℂ) + rw [← hx] + ring + have hb0 : b = 0 := by + rw [hl] at heq + exact (mul_eq_zero.mp heq).resolve_right (pow_ne_zero _ hfre) + refine ⟨a, fun z => ?_⟩ + simpa [hb0] using hfactor z + +/-- A nonexponential LP function has strictly positive first Laguerre +coefficient wherever its value is nonzero. -/ +theorem IsLaguerrePolya.laguerre_one_pos_of_ne_exp {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) + (hne : ∀ a : ℝ, f ≠ fun z => f 0 * exp ((a : ℂ) * z)) + {x : ℝ} (hfx : f x ≠ 0) : 0 < laguerreCoefficient f x 1 := by + apply lt_of_le_of_ne (hf.laguerreCoefficient_nonneg x 1) + intro heq + obtain ⟨a, ha⟩ := hf.eq_exp_of_laguerre_one_eq_zero hfx heq.symm + exact hne a (funext ha) + +/-- Equality in the first Laguerre inequality occurs exactly at a multiple +zero, or for an ordinary real exponential. This includes the zero function. -/ +theorem IsLaguerrePolya.laguerre_one_eq_zero_iff {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (x : ℝ) : + laguerreCoefficient f x 1 = 0 ↔ + (f x = 0 ∧ _root_.deriv f x = 0) ∨ ∃ a : ℝ, ∀ z, f z = f 0 * exp ((a : ℂ) * z) := by + constructor + · intro heq + by_cases hfx : f x = 0 + · left + refine ⟨hfx, ?_⟩ + rw [laguerreCoefficient_one hf.differentiable hf.conj, hfx] at heq + have hre : (_root_.deriv f x).re = 0 := by simpa using heq + have hc : ((_root_.deriv f x).re : ℂ) = _root_.deriv f x := by + apply conj_eq_iff_re.mp + simpa using (hf.deriv.conj (x : ℂ)).symm + rw [← hc, hre, ofReal_zero] + · exact Or.inr (hf.eq_exp_of_laguerre_one_eq_zero hfx heq) + · rintro (⟨hfx, hdf⟩ | ⟨a, ha⟩) + · rw [laguerreCoefficient_one hf.differentiable hf.conj] + simp [hfx, hdf] + · have hc : ((f 0).re : ℂ) = f 0 := by + simpa only [iteratedDeriv_zero] using ofReal_re_iteratedDeriv_zero hf.conj 0 + have heq : f = fun z => ((f 0).re : ℂ) * + exp ((a : ℂ) * z + ((0 : ℝ) : ℂ) * z ^ 2) := by + funext z + simpa only [hc, ofReal_zero, zero_mul, add_zero] using ha z + rw [heq, laguerreCoefficient_one_exp_quadratic] + simp + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/Translation.lean b/RealRooted/LaguerreInequalities/Translation.lean new file mode 100644 index 000000000..3efdee5e4 --- /dev/null +++ b/RealRooted/LaguerreInequalities/Translation.lean @@ -0,0 +1,32 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic + +/-! +# Real translations of generalized Laguerre inequalities + +Translation of the entire function by a real number simply translates the real +point at which its generalized Laguerre coefficient is evaluated. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Translating a function by a real number translates its Laguerre product's base point. -/ +theorem laguerreProduct_comp_add_real (f : ℂ → ℂ) (a x : ℝ) (z : ℂ) : + laguerreProduct (fun w => f (w + a)) x z = laguerreProduct f (x + a) z := by + unfold laguerreProduct + push_cast + congr 2 <;> ring + +/-- Translating a function by a real number translates each generalized Laguerre coefficient. -/ +theorem laguerreCoefficient_comp_add_real (f : ℂ → ℂ) (a x : ℝ) (n : ℕ) : + laguerreCoefficient (fun w => f (w + a)) x n = laguerreCoefficient f (x + a) n := by + have heq : laguerreProduct (fun w => f (w + a)) x = laguerreProduct f (x + a) := + funext (laguerreProduct_comp_add_real f a x) + simp only [laguerreCoefficient, heq] + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/Turan.lean b/RealRooted/LaguerreInequalities/Turan.lean new file mode 100644 index 000000000..c001387f6 --- /dev/null +++ b/RealRooted/LaguerreInequalities/Turan.lean @@ -0,0 +1,100 @@ +module + +public import RealRooted.Wronskian.PolarLaguerre +import RealRooted.LaguerreInequalities.Forms + +/-! +# Cubic and second iterated Turán inequalities + +The raw derivative inequalities of Craven and Csordas, *Iterated Laguerre +and Turán inequalities*, Proposition 3.4 and Corollary 3.6 of the author +manuscript, https://math.hawaii.edu/~tom/mathfiles/iteratedLT.pdf. +Division-free factor recurrences include roots and constant polynomials. +-/ + +@[expose] public section + +open Polynomial + +namespace RealRooted + +/-- The numerator of the second derivative of the logarithmic derivative. -/ +noncomputable def cubicDerivativeForm (p : ℝ[X]) : ℝ[X] := + 2 * p.derivative ^ 3 - 3 * p * p.derivative * p.derivative.derivative + + p ^ 2 * p.derivative.derivative.derivative + +/-- The second Turán iterate of the raw polynomial derivative sequence at index two. -/ +noncomputable def secondTuranForm (p : ℝ[X]) : ℝ[X] := + laguerreForm p.derivative ^ 2 - + laguerreForm p * laguerreForm p.derivative.derivative + +/-- The negative third Hankel determinant of five successive derivatives. -/ +private noncomputable def turanQuotient (p : ℝ[X]) : ℝ[X] := + p.derivative.derivative ^ 3 - + 2 * p.derivative * p.derivative.derivative * p.derivative.derivative.derivative + + p * p.derivative.derivative.derivative ^ 2 + + p.derivative ^ 2 * p.derivative.derivative.derivative.derivative - + p * p.derivative.derivative * p.derivative.derivative.derivative.derivative + +/-- Adjoining a linear factor gives a positive recurrence for the cubic form. -/ +theorem cubicDerivativeForm_X_sub_C_mul (r : ℝ) (p : ℝ[X]) : + cubicDerivativeForm ((X - C r) * p) = + (X - C r) ^ 3 * cubicDerivativeForm p + 2 * p ^ 3 := by + simp only [cubicDerivativeForm, map_add, map_sub, derivative_mul, derivative_X, + derivative_C, map_zero, derivative_one] + ring + +/-- The quotient recurrence involves only the cubic and second Laguerre forms. -/ +private theorem turanQuotient_X_sub_C_mul (r : ℝ) (p : ℝ[X]) : + turanQuotient ((X - C r) * p) = (X - C r) ^ 3 * turanQuotient p + + 12 * (X - C r) * p * secondLaguerreForm p + 4 * cubicDerivativeForm p := by + simp only [turanQuotient, cubicDerivativeForm, secondLaguerreForm, map_add, map_sub, + derivative_mul, derivative_X, derivative_C, map_zero, derivative_one] + have h12 : (C (1 / 12 : ℝ)) * 12 = 1 := by + rw [← C_ofNat, ← C_mul] + simp + linear_combination -(X - C r) * p * + (3 * p.derivative.derivative ^ 2 - + 4 * p.derivative * p.derivative.derivative.derivative + + p * p.derivative.derivative.derivative.derivative) * h12 + +/-- The second Turán iterate factors without division, including when `p''` vanishes. -/ +private theorem secondTuranForm_eq_mul (p : ℝ[X]) : + secondTuranForm p = p.derivative.derivative * turanQuotient p := by + simp only [secondTuranForm, laguerreForm, turanQuotient] + ring + +/-- Simultaneous positivity of the cubic form and the third Hankel expression. -/ +private theorem forms_nonneg {p : ℝ[X]} (hp : IsPFPolynomial p) {x : ℝ} (hx : 0 ≤ x) : + 0 ≤ (cubicDerivativeForm p).eval x ∧ 0 ≤ (turanQuotient p).eval x := by + induction hdegree : p.natDegree using Nat.strong_induction_on generalizing p with + | ind degree ih => + by_cases hz : degree = 0 + · have hC : p = C (p.coeff 0) := + Polynomial.eq_C_of_natDegree_eq_zero (by simpa [hdegree] using hz) + rw [hC] + simp [cubicDerivativeForm, turanQuotient] + · have hd : 0 < p.natDegree := by rw [hdegree]; exact Nat.pos_of_ne_zero hz + obtain ⟨r, q, hr, hpq, hq, hqd⟩ := hp.exists_X_sub_C_factor_of_pos_natDegree hd + obtain ⟨hc, ht⟩ := ih q.natDegree (by simpa [hdegree] using hqd) hq rfl + have hval := hq.hasNonnegCoeffs.eval_nonneg hx + have hshift : 0 ≤ x - r := sub_nonneg.mpr (hr.trans hx) + have hL := secondLaguerreForm_eval_nonneg hq.splits x + rw [hpq, cubicDerivativeForm_X_sub_C_mul, turanQuotient_X_sub_C_mul] + simp only [eval_add, eval_mul, eval_pow, eval_sub, eval_X, eval_C, eval_ofNat] + constructor <;> positivity + +/-- The cubic derivative form of a PF polynomial is nonnegative on the nonnegative axis. -/ +theorem IsPFPolynomial.cubicDerivativeForm_eval_nonneg {p : ℝ[X]} + (hp : IsPFPolynomial p) {x : ℝ} (hx : 0 ≤ x) : + 0 ≤ (cubicDerivativeForm p).eval x := (forms_nonneg hp hx).1 + +/-- Every PF polynomial satisfies the second raw derivative Turán inequality. -/ +theorem IsPFPolynomial.secondTuranForm_eval_nonneg {p : ℝ[X]} + (hp : IsPFPolynomial p) {x : ℝ} (hx : 0 ≤ x) : + 0 ≤ (secondTuranForm p).eval x := by + rw [secondTuranForm_eq_mul, eval_mul] + exact mul_nonneg (hp.derivative.derivative.hasNonnegCoeffs.eval_nonneg hx) + (forms_nonneg hp hx).2 + +end RealRooted diff --git a/RealRooted/LaguerreInequalities/ZeroFree.lean b/RealRooted/LaguerreInequalities/ZeroFree.lean new file mode 100644 index 000000000..11679d347 --- /dev/null +++ b/RealRooted/LaguerreInequalities/ZeroFree.lean @@ -0,0 +1,77 @@ +module + +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.LaguerreInequalities.MeasureSupport +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Identity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import Mathlib.Analysis.Complex.Convex + +/-! +# Zero-free functions satisfying all generalized Laguerre inequalities + +The supported Nevanlinna measure vanishes when the entire function has no zeros. +Its negative logarithmic derivative is then affine, and the function is a real +exponential times a Gaussian, including constant and ordinary exponential cases. +No order or genus hypothesis is needed. +-/ + +public section + +open Complex MeasureTheory Set +open scoped ComplexConjugate + +namespace RealRooted + +/-- A zero-free real entire function satisfying all generalized Laguerre +inequalities is a constant times a real exponential and a nonnegative Gaussian. -/ +theorem exists_exp_quadratic_of_laguerreCoefficient_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) + (h : ∀ x n, 0 ≤ laguerreCoefficient f x n) (hn : ∀ z, f z ≠ 0) : + ∃ a b : ℝ, 0 ≤ b ∧ ∀ z : ℂ, + f z = f 0 * exp ((a : ℂ) * z - (b : ℂ) * z ^ 2 / 2) := by + obtain ⟨ρ, b, hρ, hb, hrep, hs, _⟩ := exists_nevanlinna_supported_on_zeros hf hc h + let _ := hρ + have hempty : ρ.support = ∅ := by + ext r + exact ⟨fun hr => (hn r (hs hr)).elim, fun hr => hr.elim⟩ + have hρzero : ρ = 0 := Measure.support_eq_empty_iff.mp hempty + let a : ℝ := -(-logDeriv f I).re + let g : ℂ → ℂ := fun z => exp ((a : ℂ) * z - (b : ℂ) * z ^ 2 / 2) + have hg : Differentiable ℂ g := by dsimp [g]; fun_prop + have hglog (z : ℂ) : logDeriv g z = (a : ℂ) - (b : ℂ) * z := by + have hp : HasDerivAt (fun w : ℂ => (a : ℂ) * w - (b : ℂ) * w ^ 2 / 2) + ((a : ℂ) - (b : ℂ) * z) z := by + convert ((hasDerivAt_id z).const_mul (a : ℂ)).sub + ((((hasDerivAt_id z).pow 2).const_mul (b : ℂ)).div_const 2) using 1 + · ext w + simp only [Pi.sub_apply, Pi.pow_apply, id_eq] + · simp only [id_eq, mul_one] + ring + rw [logDeriv_apply, show deriv g z = _ from hp.cexp.deriv] + exact mul_div_cancel_left₀ _ (exp_ne_zero _) + refine ⟨a, b, hb, ?_⟩ + apply hf.eq_mul_of_logDeriv_eqOn hg UpperHalfPlane.isOpen_upperHalfPlaneSet + (convex_halfSpace_im_gt 0).isPreconnected ⟨I, by simp⟩ + (fun z _ => hn z) (fun z _ => exp_ne_zero _) + · intro z hz + rw [hglog] + have hzrep := hrep z hz + rw [hρzero, integral_zero_measure, add_zero] at hzrep + dsimp only [a] + push_cast + linear_combination -hzrep + · simp only [g, mul_zero, zero_pow (by norm_num : 2 ≠ 0), zero_div, sub_zero, exp_zero] + +/-- Every zero-free Laguerre--Pólya function is a constant times a real +exponential and a Gaussian with nonnegative coefficient. -/ +theorem IsLaguerrePolya.exists_exp_quadratic_of_forall_ne_zero {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hn : ∀ z, f z ≠ 0) : + ∃ a b : ℝ, 0 ≤ b ∧ ∀ z : ℂ, + f z = f 0 * exp ((a : ℂ) * z - (b : ℂ) * z ^ 2 / 2) := + exists_exp_quadratic_of_laguerreCoefficient_nonneg hf.differentiable hf.conj + hf.laguerreCoefficient_nonneg hn + +end RealRooted diff --git a/RealRooted/LiuOppositeSigns/DerivativeShiftSequenceRegularization.lean b/RealRooted/LiuOppositeSigns/DerivativeShiftSequenceRegularization.lean index 7f2ae14e3..4208c1751 100644 --- a/RealRooted/LiuOppositeSigns/DerivativeShiftSequenceRegularization.lean +++ b/RealRooted/LiuOppositeSigns/DerivativeShiftSequenceRegularization.lean @@ -97,7 +97,7 @@ theorem NoCommonRoots.exists_applyTDerivList_roots_rel hf_tail, hg_tail⟩ := ih hcomp_shift hno_shift (tDeriv_ne_zero hf_ne) (tDeriv_ne_zero hg_ne) (splits_tDeriv heps hf) (splits_tDeriv heps hg) hhalf - have hf_final := Multiset.Rel.comp + have hf_final := Multiset.Rel.comp_of_imp (fun a b c hab hbc => by calc |c - a| = |(c - b) + (b - a)| := by ring_nf @@ -105,7 +105,7 @@ theorem NoCommonRoots.exists_applyTDerivList_roots_rel _ < ρ / 2 + ρ / 2 := add_lt_add hbc hab _ = ρ := by ring) hf_step hf_tail - have hg_final := Multiset.Rel.comp + have hg_final := Multiset.Rel.comp_of_imp (fun a b c hab hbc => by calc |c - a| = |(c - b) + (b - a)| := by ring_nf diff --git a/RealRooted/Mathlib/Algebra/Polynomial/EvenCoefficients.lean b/RealRooted/Mathlib/Algebra/Polynomial/EvenCoefficients.lean new file mode 100644 index 000000000..1310cf5a2 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/EvenCoefficients.lean @@ -0,0 +1,60 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Algebra.Polynomial.Degree.Defs +import Mathlib.Algebra.Polynomial.Degree.Support +import Mathlib.Algebra.Polynomial.Monic +import Mathlib.Algebra.Polynomial.Div +import Mathlib.Algebra.Polynomial.Degree.TrailingDegree +public import Mathlib.Algebra.Polynomial.Eval.Defs +import Mathlib.Algebra.Ring.Parity + +/-! +# Reflection of polynomials supported in even degrees +-/ + +public section + +namespace Polynomial + +/-- A polynomial whose odd coefficients vanish is unchanged by negating +its variable. This direction works over every commutative ring. -/ +theorem comp_neg_X_eq_self_of_odd_coeff_eq_zero {R : Type*} [CommRing R] + {p : R[X]} (h : ∀ k, Odd k → p.coeff k = 0) : p.comp (-X) = p := by + conv_lhs => rw [p.as_sum_range_C_mul_X_pow] + conv_rhs => rw [p.as_sum_range_C_mul_X_pow] + rw [sum_comp] + apply Finset.sum_congr rfl + intro k _ + simp only [mul_comp, C_comp, X_pow_comp] + rcases Nat.even_or_odd k with hk | hk + · rw [hk.neg_pow] + · rw [h k hk, map_zero, zero_mul, zero_mul] + +/-- Removing all powers of `X` from a monic polynomial supported in even +degrees removes an even power and leaves the same support parity. -/ +theorem Monic.exists_even_X_pow_mul {R : Type*} [CommRing R] [IsDomain R] + {p : R[X]} (hp : p.Monic) (he : ∀ k, Odd k → p.coeff k = 0) : + ∃ (m : ℕ) (q : R[X]), Even m ∧ q.Monic ∧ q.coeff 0 ≠ 0 ∧ + (∀ k, Odd k → q.coeff k = 0) ∧ p = X ^ m * q := by + let m := p.natTrailingDegree + have hmc : p.coeff m ≠ 0 := trailingCoeff_ne_zero.mpr hp.ne_zero + have hm : Even m := by + rcases Nat.even_or_odd m with h | h + · exact h + · exact (hmc (he m h)).elim + have hdiv : X ^ m ∣ p := X_pow_dvd_iff.mpr fun k hk ↦ + coeff_eq_zero_of_lt_natTrailingDegree hk + obtain ⟨q, hq⟩ := hdiv + have hc (k : ℕ) : q.coeff k = p.coeff (k + m) := by + rw [hq, coeff_X_pow_mul] + refine ⟨m, q, hm, (monic_X_pow m).of_mul_monic_left (hq ▸ hp), ?_, ?_, hq⟩ + · simpa only [hc, zero_add] using hmc + · intro k hk + rw [hc, he (k + m) (hk.add_even hm)] + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Expand/Contract.lean b/RealRooted/Mathlib/Algebra/Polynomial/Expand/Contract.lean new file mode 100644 index 000000000..e0d4da98a --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Expand/Contract.lean @@ -0,0 +1,42 @@ +/- +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.Algebra.Polynomial.Expand +import Mathlib.Tactic.TypeStar + +/-! +# Polynomial contraction and support + +Contraction by a positive integer divides the degree bound by that integer. +It is inverse to expansion on polynomials supported at multiples of the stride. +-/ + +public section + +namespace Polynomial + +variable {R : Type*} [CommSemiring R] + +/-- Contraction by a nonzero stride divides the degree bound. -/ +theorem natDegree_contract_le_div (p : R[X]) {r : ℕ} (hr : r ≠ 0) : + (contract r p).natDegree ≤ p.natDegree / r := by + apply natDegree_le_iff_coeff_eq_zero.mpr + intro n hn + rw [coeff_contract hr] + exact coeff_eq_zero_of_natDegree_lt ((Nat.div_lt_iff_lt_mul (Nat.pos_of_ne_zero hr)).mp hn) + +/-- Expansion undoes contraction when all nonzero coefficients occur at +indices divisible by the stride. -/ +theorem expand_contract_of_coeff_eq_zero {p : R[X]} {r : ℕ} (hr : r ≠ 0) + (hp : ∀ n, ¬r ∣ n → p.coeff n = 0) : expand R r (contract r p) = p := by + ext n + rw [coeff_expand (Nat.pos_of_ne_zero hr)] + by_cases hn : r ∣ n + · simp only [hn, ↓reduceIte, coeff_contract hr, Nat.div_mul_cancel hn] + · simp [hn, hp n hn] + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Expand/PositiveRoots.lean b/RealRooted/Mathlib/Algebra/Polynomial/Expand/PositiveRoots.lean new file mode 100644 index 000000000..f0b71a0ca --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Expand/PositiveRoots.lean @@ -0,0 +1,93 @@ +/- +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.Algebra.Polynomial.Expand +public import Mathlib.Algebra.Polynomial.Splits +public import Mathlib.Basic.Real.Basic +import RealRooted.Mathlib.Analysis.Calculus.LocalExtr.PolynomialEuler +import RealRooted.Mathlib.Algebra.Polynomial.Derivative + +/-! +# Positive roots under power substitution + +Every real root of `p` contributes at most one positive root to `p(X^r)` +when `r` is positive, including multiplicities. Consequently, a sufficiently +large number of positive roots of a power substitution forces the source +polynomial to split. +-/ + +public section + +namespace Polynomial + +/-- A nonconstant binomial has at most one positive root, with multiplicity. -/ +theorem card_pos_roots_X_pow_sub_C_le_one (r : ℕ) (hr : r ≠ 0) (a : ℝ) : + (((X : ℝ[X]) ^ r - C a).roots.filter (0 < ·)).card ≤ 1 := by + classical + let p : ℝ[X] := X ^ r - C a + have hq : X * p.derivative - C ((0 : ℕ) : ℝ) * p ≠ 0 := by + intro h + have := congrArg (fun q : ℝ[X] => q.coeff r) h + simp [p, coeff_X_mul_derivative, hr] at this + have hnone : ((X * p.derivative - C ((0 : ℕ) : ℝ) * p).roots.filter (0 < ·)) = 0 := by + apply Multiset.eq_zero_of_forall_notMem + intro x hx + obtain ⟨hx, hpos⟩ := Multiset.mem_filter.mp hx + have he := (mem_roots hq).mp hx + have hn : (r : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr hr + simp [p, IsRoot, derivative_pow, hpos.ne', hn] at he + have hbound := p.card_pos_roots_le_euler_sub_add_one 0 hq + simpa only [hnone, Multiset.card_zero, zero_add] using hbound + +/-- The roots of a power substitution which lie on the positive real axis +are at most as numerous as all real roots of its source polynomial. -/ +theorem card_pos_roots_expand_le_card_roots (p : ℝ[X]) {r : ℕ} (hr : r ≠ 0) : + ((expand ℝ r p).roots.filter (0 < ·)).card ≤ p.roots.card := by + classical + by_cases hp : p = 0 + · simp [hp] + obtain ⟨q, hfactor, _, hqroots⟩ := exists_prod_multiset_X_sub_C_mul p + have hq : q ≠ 0 := by + intro hzero + simp [hzero] at hfactor + exact hp hfactor.symm + have hcomp : expand ℝ r p ≠ 0 := (expand_ne_zero (Nat.pos_of_ne_zero hr)).mpr hp + have hqcomp : (expand ℝ r q).roots = 0 := by + apply Multiset.eq_zero_of_forall_notMem + intro x hx + have hroot : q.IsRoot (x ^ r) := by + simpa only [IsRoot, expand_eq_comp_X_pow, eval_comp, eval_pow, eval_X] + using isRoot_of_mem_roots hx + have hmem := (mem_roots hq).mpr hroot + simp only [hqroots, Multiset.notMem_zero] at hmem + have hfactorcomp : expand ℝ r p = + (p.roots.map fun a => X ^ r - C a).prod * expand ℝ r q := by + conv_lhs => rw [← hfactor] + rw [map_mul, map_multiset_prod, Multiset.map_map] + simp only [Function.comp_def, map_sub, expand_X, expand_C] + rw [hfactorcomp] at hcomp ⊢ + rw [roots_mul hcomp, hqcomp, add_zero, roots_multiset_prod] + · rw [Multiset.bind_map, Multiset.filter_bind] + generalize p.roots = s + induction s using Multiset.induction with + | empty => simp + | cons a s ih => + simpa only [Multiset.cons_bind, Multiset.card_add, Multiset.card_cons, + Function.comp_def, Nat.add_comm] using + Nat.add_le_add (card_pos_roots_X_pow_sub_C_le_one r hr a) ih + · simpa only [← Multiset.prod_eq_zero_iff] using left_ne_zero_of_mul hcomp + +/-- Positive roots of a power substitution force the source to split if +their number reaches the source degree. -/ +theorem splits_of_natDegree_le_card_pos_roots_expand {p : ℝ[X]} {r : ℕ} + (hr : r ≠ 0) + (h : p.natDegree ≤ ((expand ℝ r p).roots.filter (0 < ·)).card) : p.Splits := by + apply splits_iff_card_roots.mpr + exact Nat.le_antisymm (card_roots' p) + (h.trans (card_pos_roots_expand_le_card_roots p hr)) + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Expand/PowerRoots.lean b/RealRooted/Mathlib/Algebra/Polynomial/Expand/PowerRoots.lean new file mode 100644 index 000000000..66d5b4c31 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Expand/PowerRoots.lean @@ -0,0 +1,102 @@ +/- +Copyright (c) 2026 Per Alexandersson. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Per Alexandersson +-/ +module + +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Algebra.Polynomial.Roots +public import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.Polynomial.FieldDivision +import Mathlib.Analysis.SpecialFunctions.Pow.Real + +/-! +# Roots under power substitution + +Power substitution preserves simple roots away from zero in characteristic +zero. On the positive real axis it induces a bijection of distinct roots. +An additional monomial factor contributes exactly its exponent at zero. +-/ + +public section + +namespace Polynomial + +/-- A nonvanishing constant term leaves precisely the displayed origin factor. -/ +theorem rootMultiplicity_zero_X_pow_mul_comp {K : Type*} [Field K] + {q : K[X]} (hq : q.eval 0 ≠ 0) {p : ℕ} (hp : p ≠ 0) (s : ℕ) : + (X ^ s * q.comp (X ^ p)).rootMultiplicity 0 = s := by + have hcomp : (q.comp (X ^ p)).eval 0 ≠ 0 := by simpa [hp] using hq + have hne : q.comp (X ^ p) ≠ 0 := by + intro h + exact hcomp (by simp [h]) + have h := rootMultiplicity_mul_X_sub_C_pow (a := (0 : K)) (n := s) hne + simpa only [map_zero, sub_zero, rootMultiplicity_eq_zero hcomp, zero_add, mul_comm] + using h + +/-- A simple source root stays simple under a power substitution away from zero. -/ +theorem rootMultiplicity_X_pow_mul_comp_of_simple {K : Type*} [Field K] [CharZero K] + {q : K[X]} {p : ℕ} (hp : p ≠ 0) (s : ℕ) {z : K} (hz : z ≠ 0) + (hq : q.eval (z ^ p) = 0) (hder : q.derivative.eval (z ^ p) ≠ 0) : + (X ^ s * q.comp (X ^ p)).rootMultiplicity z = 1 := by + let P : K[X] := X ^ s * q.comp (X ^ p) + have hd : P.derivative.eval z = + z ^ s * (q.derivative.eval (z ^ p) * (p : K) * z ^ (p - 1)) := by + simp only [P, derivative_mul, derivative_comp, derivative_pow, + derivative_X, eval_add, eval_mul, eval_comp, eval_pow, eval_X, eval_C, + mul_one, hq, mul_zero, zero_add] + ring + have hdne : P.derivative.eval z ≠ 0 := by + rw [hd] + exact mul_ne_zero (pow_ne_zero s hz) + (mul_ne_zero (mul_ne_zero hder (Nat.cast_ne_zero.mpr hp)) (pow_ne_zero _ hz)) + have hP : P ≠ 0 := by + intro h + exact hdne (by simp [h]) + have hroot : P.IsRoot z := by simp [P, IsRoot.def, hq] + have hm : 0 < P.rootMultiplicity z := (rootMultiplicity_pos hP).mpr hroot + have hn : ¬ 1 < P.rootMultiplicity z := by + intro h + exact hdne ((one_lt_rootMultiplicity_iff_isRoot hP).mp h).2 + lia + +/-- Positive distinct roots are in bijection under a positive power substitution. +The source need not split and may have multiple roots. -/ +theorem card_pos_roots_X_pow_mul_comp {q : ℝ[X]} (hq : q ≠ 0) + (hpos : ∀ a ∈ q.roots, 0 < a) {p : ℕ} (hp : p ≠ 0) (s : ℕ) : + ((X ^ s * q.comp (X ^ p)).roots.toFinset.filter (0 < ·)).card = + q.roots.toFinset.card := by + classical + have hq0 : q.eval 0 ≠ 0 := by + intro h + exact (lt_irrefl (0 : ℝ)) (hpos 0 ((mem_roots hq).mpr h)) + have hcomp : q.comp (X ^ p) ≠ 0 := by + intro h + have heval := congrArg (fun P : ℝ[X] ↦ P.eval 0) h + simp only [eval_comp, eval_pow, eval_X, zero_pow hp, eval_zero] at heval + exact hq0 heval + let P : ℝ[X] := X ^ s * q.comp (X ^ p) + have hP : P ≠ 0 := mul_ne_zero (pow_ne_zero _ X_ne_zero) hcomp + have hroot (x : ℝ) (hx : 0 < x) : x ∈ P.roots ↔ x ^ p ∈ q.roots := by + rw [mem_roots hP, mem_roots hq] + simp only [P, IsRoot.def, eval_mul, eval_pow, eval_X, eval_comp, + mul_eq_zero, pow_ne_zero s hx.ne', false_or] + change (P.roots.toFinset.filter (0 < ·)).card = q.roots.toFinset.card + refine Finset.card_bij (fun x _ ↦ x ^ p) ?_ ?_ ?_ + · intro x hx + obtain ⟨hx, hxp⟩ := Finset.mem_filter.mp hx + exact Multiset.mem_toFinset.mpr ((hroot x hxp).mp (Multiset.mem_toFinset.mp hx)) + · intro x hx y hy hxy + exact (pow_left_inj₀ (Finset.mem_filter.mp hx).2.le + (Finset.mem_filter.mp hy).2.le hp).mp hxy + · intro a ha + have hap : 0 < a := hpos a (Multiset.mem_toFinset.mp ha) + let x : ℝ := a ^ (p : ℝ)⁻¹ + have hx : 0 < x := Real.rpow_pos_of_pos hap _ + have hpow : x ^ p = a := Real.rpow_inv_natCast_pow hap.le hp + refine ⟨x, Finset.mem_filter.mpr ⟨?_, hx⟩, hpow⟩ + apply Multiset.mem_toFinset.mpr + exact (hroot x hx).mpr (by simpa only [hpow] using Multiset.mem_toFinset.mp ha) + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/LinearProductDegree.lean b/RealRooted/Mathlib/Algebra/Polynomial/LinearProductDegree.lean new file mode 100644 index 000000000..d35cfc3ea --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/LinearProductDegree.lean @@ -0,0 +1,66 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Algebra.Polynomial.Splits +public import Mathlib.Basic.Real.Basic + +/-! +# Degree growth of products of nonconstant linear factors + +Zero slopes contribute constant factors. Infinite nonzero-slope support is +therefore enough for the prefix degrees to tend to infinity. +-/ + +public section + +open Filter + +namespace Polynomial + +/-- Every real linear factor `1 + aX` splits, including the constant case. -/ +theorem splits_one_add_C_mul_X (a : ℝ) : (1 + C a * X : ℝ[X]).Splits := + Splits.of_natDegree_le_one ((natDegree_add_le _ _).trans + (max_le (by simp) ((natDegree_C_mul_le _ _).trans (by simp)))) + +/-- Every factor `1 + aX` is nonzero, including `a = 0`. -/ +theorem one_add_C_mul_X_ne_zero (a : ℝ) : (1 + C a * X : ℝ[X]) ≠ 0 := by + intro h + have h0 := congrArg (fun p : ℝ[X] => p.eval 0) h + simp at h0 + +/-- Any subset of nonzero slopes supplies a lower bound on the product degree. -/ +theorem card_le_natDegree_prod_one_add {s t : Finset ℕ} {a : ℕ → ℝ} + (ht : t ⊆ s) (ha : ∀ j ∈ t, a j ≠ 0) : + t.card ≤ (∏ j ∈ s, (1 + C (a j) * X : ℝ[X])).natDegree := by + rw [natDegree_prod s (fun j => (1 + C (a j) * X : ℝ[X])) + (fun j _ => one_add_C_mul_X_ne_zero (a j))] + calc + _ = ∑ j ∈ t, (1 + C (a j) * X : ℝ[X]).natDegree := by + symm + calc + _ = ∑ _j ∈ t, 1 := Finset.sum_congr rfl fun j hj => by + simpa only [add_comm, C_1] using natDegree_linear (b := (1 : ℝ)) (ha j hj) + _ = _ := by simp + _ ≤ _ := Finset.sum_le_sum_of_subset ht + +/-- Infinite nonzero-slope support forces the finite product degrees to diverge. -/ +theorem tendsto_natDegree_prod_one_add {a : ℕ → ℝ} + (ha : (Function.support a).Infinite) : + Tendsto (fun n => (∏ j ∈ Finset.range n, + (1 + C (a j) * X : ℝ[X])).natDegree) atTop atTop := by + refine tendsto_atTop.mpr fun N => ?_ + obtain ⟨s, hs, hcard⟩ := ha.exists_subset_card_eq N + filter_upwards [eventually_ge_atTop (s.sup id + 1)] with n hn + rw [← hcard] + apply card_le_natDegree_prod_one_add + · intro j hj + apply Finset.mem_range.mpr + exact (Nat.lt_succ_of_le (Finset.le_sup (f := id) hj)).trans_le hn + · intro j hj + exact hs hj + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/MobiusTransform/Map.lean b/RealRooted/Mathlib/Algebra/Polynomial/MobiusTransform/Map.lean new file mode 100644 index 000000000..62449d3f0 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/MobiusTransform/Map.lean @@ -0,0 +1,39 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.MobiusTransform +import Mathlib.Tactic.FinCases + +/-! +# Coefficient maps and homogeneous Möbius transforms +-/ + +public section + +namespace Polynomial + +/-- Changing coefficients commutes with the homogeneous Möbius transform. -/ +theorem map_mobiusTransform {R S : Type*} [CommRing R] [CommRing S] + (f : R →+* S) (n : ℕ) (a b c d : R) (p : R[X]) : + (mobiusTransform n a b c d p).map f = + mobiusTransform n (f a) (f b) (f c) (f d) (p.map f) := by + have h := MvPolynomial.map_eval₂Hom + (Polynomial.C : R →+* R[X]) + (![C a * X + C b, C c * X + C d] : Fin 2 → R[X]) + (Polynomial.mapRingHom f) (p.homogenize n) + rw [mobiusTransform, mobiusTransform, Polynomial.homogenize_map] + simp only [MvPolynomial.aeval_def] + rw [MvPolynomial.eval₂_map] + convert h using 1 + · simp + · congr 1 + · ext r + simp + · funext i + fin_cases i <;> simp + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Moment/FiniteAtoms.lean b/RealRooted/Mathlib/Algebra/Polynomial/Moment/FiniteAtoms.lean new file mode 100644 index 000000000..860b2e1f4 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Moment/FiniteAtoms.lean @@ -0,0 +1,83 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment + +/-! +# Finite atomic moment functionals + +Moments obtained from a finite weighted set evaluate polynomials by the same +weighted sum. Nonnegative real weights give positive semidefinite finite +Hankel matrices, including empty supports and zero weights. +-/ + +public section + +namespace Polynomial + +section CommSemiring + +variable {R ι : Type*} [CommSemiring R] + +/-- A finite atomic moment functional is the original weighted evaluation sum. -/ +theorem momentFunctional_finset_sum (s : Finset ι) (x w : ι → R) (p : R[X]) : + momentFunctional (fun k ↦ ∑ i ∈ s, w i * x i ^ k) p = + ∑ i ∈ s, w i * p.eval (x i) := by + classical + induction p using Polynomial.induction_on' with + | add p q hp hq => + simp only [momentFunctional_add, hp, hq, eval_add, mul_add, Finset.sum_add_distrib] + | monomial k a => + rw [momentFunctional_monomial, Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [eval_monomial] + ring + +/-- The pairing of finite atomic moments is the weighted evaluation pairing. -/ +theorem momentPairing_finset_sum (s : Finset ι) (x w : ι → R) (p q : R[X]) : + momentPairing (fun k ↦ ∑ i ∈ s, w i * x i ^ k) p q = + ∑ i ∈ s, w i * p.eval (x i) * q.eval (x i) := by + rw [momentPairing, momentFunctional_finset_sum] + simp only [eval_mul, mul_assoc] + +end CommSemiring + +/-- A finite atomic moment pairing is nonnegative on squares when all its +weights are nonnegative. -/ +theorem momentPairing_finset_sum_self_nonneg {ι : Type*} + (s : Finset ι) (x w : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (p : ℝ[X]) : + 0 ≤ momentPairing (fun k ↦ ∑ i ∈ s, w i * x i ^ k) p p := by + rw [momentPairing_finset_sum] + apply Finset.sum_nonneg + intro i hi + simpa only [pow_two, mul_assoc] using mul_nonneg (hw i hi) (sq_nonneg (p.eval (x i))) + +/-- Nonnegativity on the finite polynomial space gives a positive semidefinite +Hankel matrix. -/ +theorem momentHankelMatrix_posSemidef_of_nonneg (μ : ℕ → ℝ) (n : ℕ) + (hpos : ∀ p : ℝ[X], p.degree < n → 0 ≤ momentPairing μ p p) : + (momentHankelMatrix μ n).PosSemidef := by + apply Matrix.PosSemidef.of_dotProduct_mulVec_nonneg + · apply Matrix.IsHermitian.ext + intro i j + simp [momentHankelMatrix, Nat.add_comm] + · intro v + have h := hpos (ofFn n v) (ofFn_degree_lt v) + rw [momentPairing_ofFn_ofFn] at h + simpa only [Pi.star_apply, star_trivial] using h + +/-- Nonnegative finite atomic weights give positive semidefinite Hankel +matrices of every size. -/ +theorem momentHankelMatrix_finset_sum_posSemidef {ι : Type*} + (s : Finset ι) (x w : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (n : ℕ) : + (momentHankelMatrix (fun k ↦ ∑ i ∈ s, w i * x i ^ k) n).PosSemidef := by + apply momentHankelMatrix_posSemidef_of_nonneg + intro p _ + exact momentPairing_finset_sum_self_nonneg s x w hw p + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/MomentTranslation.lean b/RealRooted/Mathlib/Algebra/Polynomial/MomentTranslation.lean new file mode 100644 index 000000000..20a5fe711 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/MomentTranslation.lean @@ -0,0 +1,111 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Moment +public import Mathlib.Algebra.Polynomial.Taylor + +/-! +# Translation of polynomial moments + +Translation of the variable acts on moment sequences by the binomial +transform. The functional identity makes composition and inverse translation +independent of a measure representation. + +See Sokal and Walrad, arXiv:2404.12131v1, equation (7). +-/ + +public section + +namespace Polynomial + +section CommSemiring + +variable {R : Type*} [CommSemiring R] + +/-- The moments obtained by translating the underlying variable by `c`. -/ +@[expose] noncomputable def momentTranslate (c : R) (m : ℕ → R) (n : ℕ) : R := + momentFunctional m (taylor c (X ^ n)) + +/-- Translation preserves the zeroth moment. -/ +@[simp] theorem momentTranslate_zero (c : R) (m : ℕ → R) : + momentTranslate c m 0 = m 0 := by + simp [momentTranslate] + +/-- Translating by zero fixes every moment sequence. -/ +@[simp] theorem momentTranslate_zero_left (m : ℕ → R) : + momentTranslate 0 m = m := by + funext n + simp [momentTranslate] + +/-- The zero moment sequence remains zero under translation. -/ +@[simp] theorem momentTranslate_zero_right (c : R) : + momentTranslate c (0 : ℕ → R) = 0 := by + funext n + simp [momentTranslate, momentFunctional, Polynomial.sum] + +/-- Translating moments is dual to Taylor substitution on polynomials. -/ +theorem momentFunctional_momentTranslate (c : R) (m : ℕ → R) (p : R[X]) : + momentFunctional (momentTranslate c m) p = + momentFunctional m (taylor c p) := by + induction p using Polynomial.induction_on' with + | add p q hp hq => simp only [momentFunctional_add, map_add, hp, hq] + | monomial n a => + simp only [momentFunctional_monomial, taylor_monomial, + momentFunctional_C_mul, momentTranslate, taylor_X_pow] + +/-- Both inputs of a moment pairing transform by the same Taylor substitution. -/ +theorem momentPairing_momentTranslate (c : R) (m : ℕ → R) (p q : R[X]) : + momentPairing (momentTranslate c m) p q = + momentPairing m (taylor c p) (taylor c q) := by + simp only [momentPairing, momentFunctional_momentTranslate, taylor_mul] + +/-- Successive translations add their parameters. -/ +theorem momentTranslate_momentTranslate (b c : R) (m : ℕ → R) : + momentTranslate b (momentTranslate c m) = momentTranslate (b + c) m := by + funext n + change momentFunctional (momentTranslate c m) (taylor b (X ^ n)) = _ + rw [momentFunctional_momentTranslate, taylor_taylor] + simp only [momentTranslate, add_comm c b] + +/-- The explicit binomial formula for translated moments. -/ +theorem momentTranslate_eq_sum (c : R) (m : ℕ → R) (n : ℕ) : + momentTranslate c m n = + ∑ k ∈ Finset.range (n + 1), (n.choose k : R) * m k * c ^ (n - k) := by + rw [momentTranslate, taylor_X_pow, add_pow, momentFunctional_sum] + apply Finset.sum_congr rfl + intro k _ + have hpoly : (X : R[X]) ^ k * C c ^ (n - k) * (n.choose k : R[X]) = + C ((n.choose k : R) * c ^ (n - k)) * X ^ k := by + simp only [map_mul, map_pow, map_natCast] + ring + rw [hpoly, momentFunctional_C_mul, momentFunctional_X_pow] + ring + +end CommSemiring + +section CommRing + +variable {R : Type*} [CommRing R] + +/-- Translation by the negative parameter is a left inverse. -/ +@[simp] theorem momentTranslate_neg_cancel (c : R) (m : ℕ → R) : + momentTranslate (-c) (momentTranslate c m) = m := by + rw [momentTranslate_momentTranslate, neg_add_cancel, momentTranslate_zero_left] + +/-- Translation by the negative parameter is a right inverse. -/ +@[simp] theorem momentTranslate_neg_cancel_right (c : R) (m : ℕ → R) : + momentTranslate c (momentTranslate (-c) m) = m := by + rw [momentTranslate_momentTranslate, add_neg_cancel, momentTranslate_zero_left] + +/-- A fixed translation is injective on moment sequences. -/ +theorem momentTranslate_injective (c : R) : Function.Injective (momentTranslate c) := by + intro m n h + simpa using congrArg (momentTranslate (-c)) h + +end CommRing + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/MomentTranslationSucc.lean b/RealRooted/Mathlib/Algebra/Polynomial/MomentTranslationSucc.lean new file mode 100644 index 000000000..a76aea9a1 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/MomentTranslationSucc.lean @@ -0,0 +1,29 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslation +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentShift + +/-! +# The shift recurrence for translated moments +-/ + +public section + +namespace Polynomial + +variable {R : Type*} [CommRing R] + +/-- Multiplication by the translated variable gives the next translated moment. -/ +theorem momentTranslate_succ (c : R) (m : ℕ → R) (n : ℕ) : + momentTranslate c m (n + 1) = + c * momentTranslate c m n + momentTranslate c (fun k => m (k + 1)) n := by + simp only [momentTranslate, taylor_X_pow] + rw [momentFunctional_shift, pow_succ', add_mul, momentFunctional_add, + momentFunctional_C_mul, add_comm] + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/CoefficientRates.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/CoefficientRates.lean new file mode 100644 index 000000000..fc50774d3 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/CoefficientRates.lean @@ -0,0 +1,47 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Perturbation + +/-! +# Error rates for all coefficients of a monic moment polynomial + +A common error bound for the finite moment prefix gives a common error bound +for every polynomial coefficient near a nonsingular reference moment system. +Coefficients at or above the fixed monic degree agree identically. +-/ + +public section + +open Filter Topology + +namespace Polynomial + +/-- A finite moment error rate controls every coefficient of the monic moment +polynomial. The constants depend on the fixed reference system and degree. -/ +theorem eventually_coeff_monicMomentPolynomial_sub_le + {ι : Type*} {l : Filter ι} {μ : ι → ℕ → ℝ} {μ₀ : ℕ → ℝ} {n : ℕ} + (hμ : ∀ k < 2 * n, Tendsto (fun t ↦ μ t k) l (𝓝 (μ₀ k))) + (hdet : IsUnit (momentHankelMatrix μ₀ n).det) + {δ : ι → ℝ} (hδ : ∀ᶠ t in l, 0 ≤ δ t) + (herror : ∀ᶠ t in l, ∀ k < 2 * n, |μ t k - μ₀ k| ≤ δ t) : + ∃ C > 0, ∀ᶠ t in l, ∀ k : ℕ, + |(monicMomentPolynomial (μ t) n).coeff k - + (monicMomentPolynomial μ₀ n).coeff k| ≤ C * δ t := by + obtain ⟨C, hC, hcoeff⟩ := eventually_abs_coeff_sub_monicMomentPolynomial_le hμ hdet + refine ⟨C, hC, ?_⟩ + filter_upwards [hcoeff, hδ, herror] with t ht hδt herr k + by_cases hk : k < n + · exact ht.2 (δ t) hδt herr ⟨k, hk⟩ + · have heq := (isMonicOfDegree_monicMomentPolynomial (μ t) n).coeff_eq + (isMonicOfDegree_monicMomentPolynomial μ₀ n) (Nat.le_of_not_gt hk) + rw [heq, sub_self, abs_zero] + exact mul_nonneg hC.le hδt + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/FiniteAtomicNorms.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/FiniteAtomicNorms.lean new file mode 100644 index 000000000..0e2fecb46 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/FiniteAtomicNorms.lean @@ -0,0 +1,96 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Moment.FiniteAtoms +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra +public import Mathlib.LinearAlgebra.Lagrange + +/-! +# Exact norm boundary for finitely supported moments + +Distinct nodes with positive weights give positive definite moment matrices +up to the support size. At that size the monic orthogonal polynomial is the +nodal polynomial, so its norm and all its pairings vanish. These are the +finite-rank boundaries needed for terminating Stieltjes fractions. +-/ + +public section + +namespace Polynomial + +variable {ι : Type*} + +/-- Positive weights on distinct nodes make the finite moment matrix positive +definite at every size no larger than the number of nodes. -/ +theorem momentHankelMatrix_finset_sum_posDef + (s : Finset ι) (x w : ι → ℝ) (hx : Set.InjOn x s) + (hw : ∀ i ∈ s, 0 < w i) (n : ℕ) (hn : n ≤ s.card) : + (momentHankelMatrix (fun k => ∑ i ∈ s, w i * x i ^ k) n).PosDef := by + classical + apply momentHankelMatrix_posDef_of_pos + intro p hp hdeg + have hex : ∃ i ∈ s, p.eval (x i) ≠ 0 := by + by_contra h + push Not at h + apply hp + apply eq_zero_of_degree_lt_of_eval_index_eq_zero s hx + (lt_of_lt_of_le hdeg (by exact_mod_cast hn)) h + obtain ⟨i, hi, hpi⟩ := hex + rw [momentPairing_finset_sum] + apply Finset.sum_pos' + · intro j hj + simpa only [pow_two, mul_assoc] using + mul_nonneg (hw j hj).le (sq_nonneg (p.eval (x j))) + · refine ⟨i, hi, ?_⟩ + simpa only [pow_two, mul_assoc] using mul_pos (hw i hi) (sq_pos_of_ne_zero hpi) + +/-- At the full support size, the monic moment polynomial is exactly the nodal polynomial. -/ +theorem monicMomentPolynomial_finset_sum_card + (s : Finset ι) (x w : ι → ℝ) (hx : Set.InjOn x s) + (hw : ∀ i ∈ s, 0 < w i) : + monicMomentPolynomial (fun k => ∑ i ∈ s, w i * x i ^ k) s.card = + Lagrange.nodal s x := by + classical + have hpd := momentHankelMatrix_finset_sum_posDef s x w hx hw s.card le_rfl + symm + apply eq_monicMomentPolynomial _ (isUnit_iff_ne_zero.mpr hpd.det_pos.ne') + · exact ⟨Lagrange.natDegree_nodal, Lagrange.nodal_monic⟩ + · intro i + rw [momentPairing_finset_sum] + apply Finset.sum_eq_zero + intro j hj + rw [Lagrange.eval_nodal_at_node hj, mul_zero] + +/-- The full-support monic moment polynomial has zero pairing against every polynomial. -/ +theorem momentPairing_finset_sum_card_eq_zero + (s : Finset ι) (x w : ι → ℝ) (hx : Set.InjOn x s) + (hw : ∀ i ∈ s, 0 < w i) (p : ℝ[X]) : + momentPairing (fun k => ∑ i ∈ s, w i * x i ^ k) p + (monicMomentPolynomial (fun k => ∑ i ∈ s, w i * x i ^ k) s.card) = 0 := by + classical + rw [monicMomentPolynomial_finset_sum_card s x w hx hw, momentPairing_finset_sum] + apply Finset.sum_eq_zero + intro i hi + rw [Lagrange.eval_nodal_at_node hi, mul_zero] + +/-- The first vanishing norm occurs at the number of distinct positively +weighted nodes, including the empty-support boundary. -/ +theorem momentNormSq_finset_sum_card_eq_zero + (s : Finset ι) (x w : ι → ℝ) (hx : Set.InjOn x s) + (hw : ∀ i ∈ s, 0 < w i) : + momentNormSq (fun k => ∑ i ∈ s, w i * x i ^ k) s.card = 0 := + momentPairing_finset_sum_card_eq_zero s x w hx hw _ + +/-- Every norm strictly below the support size is positive. -/ +theorem momentNormSq_finset_sum_pos + (s : Finset ι) (x w : ι → ℝ) (hx : Set.InjOn x s) + (hw : ∀ i ∈ s, 0 < w i) {n : ℕ} (hn : n < s.card) : + 0 < momentNormSq (fun k => ∑ i ∈ s, w i * x i ^ k) n := + momentNormSq_pos _ n + (momentHankelMatrix_finset_sum_posDef s x w hx hw (n + 1) (by lia)) + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Gaussian.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Gaussian.lean new file mode 100644 index 000000000..eeffeff18 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Gaussian.lean @@ -0,0 +1,96 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature +import RealRooted.Mathlib.LinearAlgebra.Lagrange.GaussianQuadrature + +/-! +# Gaussian rules from a nonsingular finite moment system + +The roots of the monic moment polynomial provide Gaussian nodes. Orthogonality +proves exactness below degree `2 * n`; positive definiteness of the finite +moment matrix proves positivity of the existing Lagrange quadrature weights. +-/ + +public section + +open Polynomial Finset + +namespace Polynomial + +/-- A monic degree-`n` polynomial is the nodal polynomial of any `n` distinct roots. -/ +theorem IsMonicOfDegree.eq_nodal {R : Type*} [CommRing R] [IsDomain R] + {n : ℕ} {p : R[X]} (hp : IsMonicOfDegree p n) + {x : Fin n → R} (hx : Function.Injective x) (hroots : ∀ i, p.IsRoot (x i)) : + p = Lagrange.nodal univ x := by + apply eq_of_degree_le_of_eval_index_eq univ hx.injOn + · simp only [degree_eq_natDegree hp.monic.ne_zero, hp.natDegree_eq, + card_univ, Fintype.card_fin, le_refl] + · simp only [degree_eq_natDegree hp.monic.ne_zero, hp.natDegree_eq, + Lagrange.degree_nodal, card_univ, Fintype.card_fin] + · rw [hp.leadingCoeff_eq, + show (Lagrange.nodal univ x).leadingCoeff = 1 from Lagrange.nodal_monic] + · intro i _ + rw [show p.eval (x i) = 0 from hroots i, + Lagrange.eval_nodal_at_node (mem_univ i)] + +/-- Positive definiteness of the finite Hankel matrix gives strict positivity +on every nonzero square of degree below its size. -/ +theorem momentPairing_self_pos_of_hankel_posDef (μ : ℕ → ℝ) {n : ℕ} + (hpos : (momentHankelMatrix μ n).PosDef) {p : ℝ[X]} + (hp : p ≠ 0) (hdeg : p.degree < n) : 0 < momentPairing μ p p := by + have hpdeg : p.natDegree < n := (natDegree_lt_iff_degree_lt hp).mpr hdeg + have hpfn : ofFn n (toFn n p) = p := ofFn_comp_toFn_eq_id_of_natDegree_lt hpdeg + have hv : toFn n p ≠ 0 := by + intro hz + apply hp + rw [← hpfn, hz] + simp + have h : 0 < momentPairing μ (ofFn n (toFn n p)) (ofFn n (toFn n p)) := by + rw [momentPairing_ofFn_ofFn] + simpa only [Pi.star_apply, star_trivial] using hpos.dotProduct_mulVec_pos hv + simpa only [hpfn] using h + +/-- Orthogonality of the moment construction transfers to its actual nodal polynomial. -/ +theorem momentFunctional_nodal_mul_eq_zero (μ : ℕ → ℝ) {n : ℕ} + (hdet : IsUnit (momentHankelMatrix μ n).det) (x : Fin n → ℝ) + (hx : Function.Injective x) (hroots : ∀ i, (monicMomentPolynomial μ n).IsRoot (x i)) + {g : ℝ[X]} (hg : g.degree < n) : + momentFunctional μ (Lagrange.nodal univ x * g) = 0 := by + rw [← (isMonicOfDegree_monicMomentPolynomial μ n).eq_nodal hx hroots] + change momentPairing μ (monicMomentPolynomial μ n) g = 0 + rw [momentPairing_comm] + exact momentPairing_monicMomentPolynomial μ n hdet hg + +end Polynomial + +namespace Lagrange + +/-- Roots of the monic moment polynomial yield Gaussian exactness below +degree `2 * n`, without assuming a Gaussian rule in advance. -/ +theorem quadrature_exact_monicMomentPolynomial (μ : ℕ → ℝ) {n : ℕ} + (hdet : IsUnit (momentHankelMatrix μ n).det) (x : Fin n → ℝ) + (hx : Function.Injective x) (hroots : ∀ i, (monicMomentPolynomial μ n).IsRoot (x i)) + {p : ℝ[X]} (hp : p.degree < (2 * n : ℕ)) : + momentFunctional μ p = + ∑ i : Fin n, quadratureWeight (momentFunctionalLinearMap μ) x i * p.eval (x i) := by + exact quadrature_exact_of_orthogonal_nodal (momentFunctionalLinearMap μ) x hx + (fun g hg ↦ momentFunctional_nodal_mul_eq_zero μ hdet x hx hroots hg) hp + +/-- A positive definite finite moment system gives positive Gaussian weights +at the distinct roots of its monic orthogonal polynomial. -/ +theorem quadratureWeight_pos_monicMomentPolynomial (μ : ℕ → ℝ) {n : ℕ} + (hpos : (momentHankelMatrix μ n).PosDef) (x : Fin n → ℝ) + (hx : Function.Injective x) (hroots : ∀ i, (monicMomentPolynomial μ n).IsRoot (x i)) + (i : Fin n) : 0 < quadratureWeight (momentFunctionalLinearMap μ) x i := by + have hdet : IsUnit (momentHankelMatrix μ n).det := isUnit_iff_ne_zero.mpr hpos.det_pos.ne' + exact quadratureWeight_pos_of_orthogonal_nodal (momentFunctionalLinearMap μ) x hx + (fun g hg ↦ momentFunctional_nodal_mul_eq_zero μ hdet x hx hroots hg) + (fun p hp hdeg ↦ momentPairing_self_pos_of_hankel_posDef μ hpos hp hdeg) i + +end Lagrange diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/GaussianLimits.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/GaussianLimits.lean new file mode 100644 index 000000000..9ee1e5feb --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/GaussianLimits.lean @@ -0,0 +1,96 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Gaussian +import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadraturePerturbation + +/-! +# Quantitative convergence of Gaussian rules from finite moments + +Positive finite moment systems and their actual ordered orthogonal roots give +positive Gaussian rules. A common error bound for nodes and the first moments +gives one common bound for nodes and weights. This result does not assume +quadrature exactness or positivity of the weights. +-/ + +public section + +open Filter Topology Polynomial + +namespace Lagrange + +/-- Moment and node convergence, eventual positive definiteness, and a common +moment/node error bound give convergent positive Gaussian rules with one common +error constant for nodes and weights. -/ +theorem eventually_gaussian_quadrature_of_moment_bounds + {ι : Type*} {l : Filter ι} {n : ℕ} {μ : ι → ℕ → ℝ} {μ₀ : ℕ → ℝ} + {r : Fin n → ℝ} {s : ι → Fin n → ℝ} + (hμ : ∀ k < n, Tendsto (fun t ↦ μ t k) l (𝓝 (μ₀ k))) + (hpos₀ : (momentHankelMatrix μ₀ n).PosDef) + (hpos : ∀ᶠ t in l, (momentHankelMatrix (μ t) n).PosDef) + (hr : Function.Injective r) (href : ∀ i, (monicMomentPolynomial μ₀ n).IsRoot (r i)) + (hroots : ∀ᶠ t in l, StrictMono (s t) ∧ + ∀ i, (monicMomentPolynomial (μ t) n).IsRoot (s t i)) + (hslim : ∀ i, Tendsto (fun t ↦ s t i) l (𝓝 (r i))) + {δ : ι → ℝ} (hδ : ∀ᶠ t in l, 0 ≤ δ t) + (hnode : ∀ᶠ t in l, ∀ i, |s t i - r i| ≤ δ t) + (hmoment : ∀ᶠ t in l, ∀ k < n, |μ t k - μ₀ k| ≤ δ t) : + ∃ C : ℝ, 0 < C ∧ + (∀ i, 0 < quadratureWeight (momentFunctionalLinearMap μ₀) r i) ∧ + (∀ p : ℝ[X], p.degree < (2 * n : ℕ) → momentFunctional μ₀ p = + ∑ i : Fin n, quadratureWeight (momentFunctionalLinearMap μ₀) r i * p.eval (r i)) ∧ + (∀ᶠ t in l, StrictMono (s t) ∧ + (∀ i, (monicMomentPolynomial (μ t) n).IsRoot (s t i)) ∧ + (∀ i, 0 < quadratureWeight (momentFunctionalLinearMap (μ t)) (s t) i) ∧ + (∀ p : ℝ[X], p.degree < (2 * n : ℕ) → momentFunctional (μ t) p = + ∑ i : Fin n, quadratureWeight (momentFunctionalLinearMap (μ t)) (s t) i * + p.eval (s t i)) ∧ + (∀ i, |s t i - r i| ≤ C * δ t) ∧ + ∀ i, |quadratureWeight (momentFunctionalLinearMap (μ t)) (s t) i - + quadratureWeight (momentFunctionalLinearMap μ₀) r i| ≤ C * δ t) ∧ + ∀ i, Tendsto (fun t ↦ quadratureWeight (momentFunctionalLinearMap (μ t)) (s t) i) + l (𝓝 (quadratureWeight (momentFunctionalLinearMap μ₀) r i)) := by + obtain ⟨M, hM, hweights⟩ := + eventually_abs_quadratureWeight_sub_le (momentFunctionalLinearMap μ₀) hr hslim + have hLm : ∀ i : Fin n, + Tendsto (fun t ↦ momentFunctionalLinearMap (μ t) (Polynomial.X ^ i.val)) l + (𝓝 (momentFunctionalLinearMap μ₀ (Polynomial.X ^ i.val))) := by + intro i + simpa only [momentFunctionalLinearMap_apply, momentFunctional_X_pow] using hμ i.val i.is_lt + have hwlim : Tendsto + (fun t ↦ quadratureWeight (momentFunctionalLinearMap (μ t)) (s t)) l + (𝓝 (quadratureWeight (momentFunctionalLinearMap μ₀) r)) := + tendsto_quadratureWeight hr hslim hLm + refine ⟨M + 1, by linarith, ?_, ?_, ?_, ?_⟩ + · exact quadratureWeight_pos_monicMomentPolynomial μ₀ hpos₀ r hr href + · intro p hp + exact quadrature_exact_monicMomentPolynomial μ₀ + (isUnit_iff_ne_zero.mpr hpos₀.det_pos.ne') r hr href hp + · filter_upwards [hpos, hroots, hweights, hδ, hnode, hmoment] + with t hpt hrt hwt hδt hnt hmt + have hm : ∀ i : Fin n, + |momentFunctionalLinearMap (μ t) (Polynomial.X ^ i.val) - + momentFunctionalLinearMap μ₀ (Polynomial.X ^ i.val)| ≤ δ t := by + intro i + simpa only [momentFunctionalLinearMap_apply, momentFunctional_X_pow] using hmt i.val i.is_lt + have hweight := hwt.2 (momentFunctionalLinearMap (μ t)) (δ t) hδt hnt hm + refine ⟨hrt.1, hrt.2, ?_, ?_, ?_, ?_⟩ + · exact quadratureWeight_pos_monicMomentPolynomial (μ t) hpt (s t) hrt.1.injective hrt.2 + · intro p hp + exact quadrature_exact_monicMomentPolynomial (μ t) + (isUnit_iff_ne_zero.mpr hpt.det_pos.ne') (s t) hrt.1.injective hrt.2 hp + · intro i + exact (hnt i).trans (by simpa only [one_mul] using + mul_le_mul_of_nonneg_right (by linarith : 1 ≤ M + 1) hδt) + · intro i + exact (hweight i).trans (mul_le_mul_of_nonneg_right (by linarith : M ≤ M + 1) hδt) + · intro i + exact tendsto_pi_nhds.mp hwlim i + +end Lagrange diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Moment.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Moment.lean new file mode 100644 index 000000000..d2b477484 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Moment.lean @@ -0,0 +1,239 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Moment +public import Mathlib.Algebra.Polynomial.OfFn +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree +import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +public import Mathlib.LinearAlgebra.Matrix.PosDef +import Mathlib.Tactic.Linarith + +/-! +# Monic orthogonal polynomials from a finite moment matrix + + +The finite Hankel matrix determines the lower coefficients of the monic polynomial +orthogonal to all lower powers. Invertibility, rather than positivity, is the exact +algebraic hypothesis. Positivity of the moment pairing is a sufficient condition. +-/ + +@[expose] public section + +open Matrix + +noncomputable section + +namespace Polynomial + +section CommSemiring + +variable {R : Type*} [CommSemiring R] [DecidableEq R] + +/-- The finite Hankel matrix formed by the first moments. -/ +def momentHankelMatrix (μ : ℕ → R) (n : ℕ) : Matrix (Fin n) (Fin n) R := + fun i j => μ (i.val + j.val) + +/-- The moments of a finite coefficient vector are a finite scalar product. -/ +theorem momentPairing_X_pow_ofFn (μ : ℕ → R) {n : ℕ} + (i : ℕ) (v : Fin n → R) : + momentPairing μ (X ^ i) (ofFn n v) = + ∑ j : Fin n, μ (i + j.val) * v j := by + rw [ofFn_eq_sum_monomial, momentPairing_sum_right] + simp only [X_pow_eq_monomial, momentPairing_monomial, mul_one, mul_comm] + +/-- The finite Hankel matrix is the matrix of the moment pairing in monomial +coordinates. -/ +theorem momentPairing_ofFn_ofFn (μ : ℕ → R) {n : ℕ} + (v w : Fin n → R) : + momentPairing μ (ofFn n v) (ofFn n w) = + dotProduct v (momentHankelMatrix μ n *ᵥ w) := by + rw [ofFn_eq_sum_monomial v, momentPairing_comm, momentPairing_sum_right] + change (∑ i : Fin n, momentPairing μ (ofFn n w) (monomial i.val (v i))) = + ∑ i : Fin n, v i * (momentHankelMatrix μ n *ᵥ w) i + apply Finset.sum_congr rfl + intro i _ + rw [← C_mul_X_pow_eq_monomial, momentPairing_C_mul_right, + momentPairing_comm, momentPairing_X_pow_ofFn] + rfl + +end CommSemiring + +section CommRing + +variable {R : Type*} [CommRing R] [Nontrivial R] [DecidableEq R] + +/-- The lower coefficients obtained by solving the finite moment equations. -/ +def momentOrthogonalCoefficients (μ : ℕ → R) (n : ℕ) : Fin n → R := + (momentHankelMatrix μ n)⁻¹ *ᵥ (fun i => -μ (n + i.val)) + +/-- The monic polynomial obtained from the finite moment solve. Its orthogonality +requires the determinant of the moment matrix to be a unit. -/ +def monicMomentPolynomial (μ : ℕ → R) (n : ℕ) : R[X] := + X ^ n + ofFn n (momentOrthogonalCoefficients μ n) + +/-- A finite vector of lower coefficients gives a monic polynomial of the +prescribed degree, including degree zero. -/ +theorem isMonicOfDegree_X_pow_add_ofFn {n : ℕ} (v : Fin n → R) : + IsMonicOfDegree (X ^ n + ofFn n v) n := by + have hsmall : (ofFn n v).degree < ((X : R[X]) ^ n).degree := by + simpa only [degree_X_pow] using ofFn_degree_lt v + refine ⟨?_, ?_⟩ + · rw [natDegree_add_eq_left_of_degree_lt hsmall, natDegree_X_pow] + · change (X ^ n + ofFn n v).leadingCoeff = 1 + rw [leadingCoeff_add_of_degree_lt' hsmall] + exact monic_X_pow n + +/-- A monic polynomial is reconstructed from its lower coefficients. -/ +theorem IsMonicOfDegree.eq_X_pow_add_ofFn {p : R[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) : + p = X ^ n + ofFn n (fun i : Fin n => p.coeff i.val) := by + ext k + by_cases hk : k < n + · simp only [coeff_add, coeff_X_pow, ite_eq_right (ne_of_lt hk), + ofFn_coeff_eq_val_of_lt _ hk, zero_add] + · exact hp.coeff_eq (isMonicOfDegree_X_pow_add_ofFn _) (Nat.le_of_not_gt hk) + +/-- The finite moment construction is always monic of the requested degree. -/ +theorem isMonicOfDegree_monicMomentPolynomial (μ : ℕ → R) (n : ℕ) : + IsMonicOfDegree (monicMomentPolynomial μ n) n := + isMonicOfDegree_X_pow_add_ofFn _ + +omit [Nontrivial R] in +@[simp] theorem monicMomentPolynomial_zero (μ : ℕ → R) : + monicMomentPolynomial μ 0 = 1 := by + simp [monicMomentPolynomial] + +omit [Nontrivial R] in +/-- The lower coefficients of the constructed polynomial are the solved vector. -/ +theorem coeff_monicMomentPolynomial (μ : ℕ → R) {n : ℕ} (i : Fin n) : + (monicMomentPolynomial μ n).coeff i.val = momentOrthogonalCoefficients μ n i := by + simp only [monicMomentPolynomial, coeff_add, coeff_X_pow, + ite_eq_right (ne_of_lt i.is_lt), ofFn_coeff_eq_val_of_lt _ i.is_lt, zero_add] + +omit [Nontrivial R] [DecidableEq R] in +/-- The coefficient vector solves the finite Hankel system when its determinant +is a unit. -/ +theorem momentHankelMatrix_mulVec_coefficients (μ : ℕ → R) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix μ n).det) : + momentHankelMatrix μ n *ᵥ momentOrthogonalCoefficients μ n = + fun i => -μ (n + i.val) := by + rw [momentOrthogonalCoefficients, Matrix.mulVec_mulVec, + Matrix.mul_nonsing_inv _ hdet, Matrix.one_mulVec] + +omit [Nontrivial R] in +/-- The lower orthogonality equations are exactly the finite Hankel equations. -/ +theorem momentPairing_X_pow_add_ofFn (μ : ℕ → R) {n : ℕ} + (v : Fin n → R) (i : Fin n) : + momentPairing μ (X ^ i.val) (X ^ n + ofFn n v) = + μ (n + i.val) + (momentHankelMatrix μ n *ᵥ v) i := by + rw [momentPairing_add_right, momentPairing_X_pow_ofFn] + change momentFunctional μ (X ^ i.val * X ^ n) + _ = _ + rw [← pow_add, momentFunctional_X_pow] + simp only [momentHankelMatrix, Matrix.mulVec, dotProduct, Nat.add_comm] + +omit [Nontrivial R] in +/-- The constructed polynomial is orthogonal to each lower power. -/ +theorem momentPairing_X_pow_monicMomentPolynomial (μ : ℕ → R) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix μ n).det) (i : Fin n) : + momentPairing μ (X ^ i.val) (monicMomentPolynomial μ n) = 0 := by + rw [monicMomentPolynomial, momentPairing_X_pow_add_ofFn, + momentHankelMatrix_mulVec_coefficients μ n hdet] + simp + +/-- Orthogonality to the lower powers characterizes the monic moment polynomial. -/ +theorem eq_monicMomentPolynomial (μ : ℕ → R) {n : ℕ} + (hdet : IsUnit (momentHankelMatrix μ n).det) {p : R[X]} + (hp : IsMonicOfDegree p n) + (horth : ∀ i : Fin n, momentPairing μ (X ^ i.val) p = 0) : + p = monicMomentPolynomial μ n := by + let v : Fin n → R := fun i => p.coeff i.val + have hpv : p = X ^ n + ofFn n v := hp.eq_X_pow_add_ofFn + have hv : momentHankelMatrix μ n *ᵥ v = fun i => -μ (n + i.val) := by + funext i + have hi := horth i + rw [hpv, momentPairing_X_pow_add_ofFn] at hi + exact eq_neg_of_add_eq_zero_right hi + have hcoeff : v = momentOrthogonalCoefficients μ n := by + calc + v = (momentHankelMatrix μ n)⁻¹ *ᵥ (momentHankelMatrix μ n *ᵥ v) := by + rw [Matrix.mulVec_mulVec, Matrix.nonsing_inv_mul _ hdet, Matrix.one_mulVec] + _ = momentOrthogonalCoefficients μ n := by rw [hv]; rfl + rw [hpv, hcoeff] + rfl + +omit [DecidableEq R] in +/-- A nondegenerate finite moment system has exactly one monic polynomial +orthogonal to all lower powers. -/ +theorem existsUnique_monic_moment_orthogonal (μ : ℕ → R) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix μ n).det) : + ∃! p : R[X], IsMonicOfDegree p n ∧ + ∀ i : Fin n, momentPairing μ (X ^ i.val) p = 0 := by + classical + refine ⟨monicMomentPolynomial μ n, + ⟨isMonicOfDegree_monicMomentPolynomial μ n, + momentPairing_X_pow_monicMomentPolynomial μ n hdet⟩, ?_⟩ + intro p hp + exact eq_monicMomentPolynomial μ hdet hp.1 hp.2 + +omit [Nontrivial R] in +/-- The constructed polynomial is orthogonal to every lower-degree polynomial. -/ +theorem momentPairing_monicMomentPolynomial (μ : ℕ → R) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix μ n).det) {p : R[X]} + (hp : p.degree < n) : + momentPairing μ p (monicMomentPolynomial μ n) = 0 := by + by_cases hp0 : p = 0 + · simp [hp0] + have hpdeg : p.natDegree < n := (natDegree_lt_iff_degree_lt hp0).mpr hp + have hpfn : p = ofFn n (toFn n p) := + (ofFn_comp_toFn_eq_id_of_natDegree_lt hpdeg).symm + rw [momentPairing_comm, hpfn, ofFn_eq_sum_monomial, momentPairing_sum_right] + apply Finset.sum_eq_zero + intro i _ + rw [← C_mul_X_pow_eq_monomial, momentPairing_C_mul_right, momentPairing_comm, + momentPairing_X_pow_monicMomentPolynomial μ n hdet] + simp + +end CommRing + +/-- Positivity on squares of degree below `n` makes the finite moment matrix +positive definite. This applies to finite measures as well as continuous ones. -/ +theorem momentHankelMatrix_posDef_of_pos (μ : ℕ → ℝ) (n : ℕ) + (hpos : ∀ p : ℝ[X], p ≠ 0 → p.degree < n → 0 < momentPairing μ p p) : + (momentHankelMatrix μ n).PosDef := by + apply Matrix.PosDef.of_dotProduct_mulVec_pos + · apply Matrix.IsHermitian.ext + intro i j + simp [momentHankelMatrix, Nat.add_comm] + · intro v hv + have hp : ofFn n v ≠ 0 := by + intro hz + apply hv + apply injective_ofFn n + simpa only [map_zero] using hz + have hstrict := hpos (ofFn n v) hp (ofFn_degree_lt v) + rw [momentPairing_ofFn_ofFn] at hstrict + simpa only [Pi.star_apply, star_trivial] using hstrict + +/-- A positive definite polynomial moment pairing gives positive definite +Hankel matrices of every finite size. -/ +theorem momentHankelMatrix_posDef (μ : ℕ → ℝ) + (hpos : (momentPairingBilinForm μ).toQuadraticMap.PosDef) (n : ℕ) : + (momentHankelMatrix μ n).PosDef := by + apply momentHankelMatrix_posDef_of_pos μ n + intro p hp _ + exact hpos p hp + +/-- Positive definiteness of the finite Gram matrix supplies the algebraic +nondegeneracy premise of the monic orthogonal construction. -/ +theorem existsUnique_monic_moment_orthogonal_of_posDef (μ : ℕ → ℝ) (n : ℕ) + (hpos : (momentHankelMatrix μ n).PosDef) : + ∃! p : ℝ[X], IsMonicOfDegree p n ∧ + ∀ i : Fin n, momentPairing μ (X ^ i.val) p = 0 := by + apply existsUnique_monic_moment_orthogonal μ n + exact isUnit_iff_ne_zero.mpr hpos.det_pos.ne' + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentAlgebra.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentAlgebra.lean new file mode 100644 index 000000000..3dd0dbc1c --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentAlgebra.lean @@ -0,0 +1,91 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Gaussian + +/-! +# Norms and multiplication symmetry for moment polynomials + +These algebraic identities are the input for deriving the three-term +recurrence from the finite Hankel construction. Positive definiteness is +used only for positivity of the squared norms. +-/ + +public section + +namespace Polynomial + +variable {R : Type*} [CommRing R] + +/-- Multiplication by `X` is symmetric for every polynomial moment pairing. -/ +theorem momentPairing_X_mul_left (μ : ℕ → R) (p q : R[X]) : + momentPairing μ (X * p) q = momentPairing μ p (X * q) := by + simp only [momentPairing, mul_assoc, mul_left_comm] + +/-- Orthogonality to the lower monomials gives orthogonality to every polynomial +of degree below the same cutoff. -/ +theorem momentPairing_eq_zero_of_X_pow (μ : ℕ → R) {n : ℕ} {p q : R[X]} + (hp : p.degree < n) + (horth : ∀ i : Fin n, momentPairing μ (X ^ i.val) q = 0) : + momentPairing μ p q = 0 := by + classical + by_cases hp0 : p = 0 + · simp [hp0] + have hpdeg : p.natDegree < n := (natDegree_lt_iff_degree_lt hp0).mpr hp + have hpfn : p = ofFn n (toFn n p) := + (ofFn_comp_toFn_eq_id_of_natDegree_lt hpdeg).symm + rw [momentPairing_comm, hpfn, ofFn_eq_sum_monomial, momentPairing_sum_right] + apply Finset.sum_eq_zero + intro i _ + rw [← C_mul_X_pow_eq_monomial, momentPairing_C_mul_right, + momentPairing_comm, horth i, mul_zero] + +section Nontrivial + +variable [Nontrivial R] [DecidableEq R] + +/-- The squared norm of a monic polynomial constructed from the moment matrix. -/ +@[expose] noncomputable def momentNormSq (μ : ℕ → R) (n : ℕ) : R := + momentPairing μ (monicMomentPolynomial μ n) (monicMomentPolynomial μ n) + +omit [Nontrivial R] in +/-- The degree-zero norm is the total mass. -/ +@[simp] theorem momentNormSq_zero (μ : ℕ → R) : momentNormSq μ 0 = μ 0 := by + simp [momentNormSq, momentPairing] + +/-- Pairing a monic orthogonal polynomial with its leading monomial gives its +squared norm; all lower coefficients disappear by orthogonality. -/ +theorem momentPairing_X_pow_monicMomentPolynomial_eq_norm + (μ : ℕ → R) (n : ℕ) (hdet : IsUnit (momentHankelMatrix μ n).det) : + momentPairing μ (X ^ n) (monicMomentPolynomial μ n) = momentNormSq μ n := by + classical + cases n with + | zero => simp [momentNormSq, momentPairing] + | succ n => + have hsmall := (isMonicOfDegree_monicMomentPolynomial μ + (n + 1)).natDegree_sub_X_pow (by lia : n + 1 ≠ 0) + have hdegree : (monicMomentPolynomial μ (n + 1) - X ^ (n + 1)).degree < + (n + 1 : WithBot ℕ) := + lt_of_le_of_lt degree_le_natDegree (by exact_mod_cast hsmall) + have h := momentPairing_monicMomentPolynomial μ (n + 1) hdet hdegree + rw [momentPairing_sub_left] at h + exact (sub_eq_zero.mp h).symm + +end Nontrivial + +/-- Positive definiteness of the next finite Hankel matrix gives a strictly +positive norm for the degree-`n` monic moment polynomial. -/ +theorem momentNormSq_pos (μ : ℕ → ℝ) (n : ℕ) + (hpos : (momentHankelMatrix μ (n + 1)).PosDef) : 0 < momentNormSq μ n := by + apply momentPairing_self_pos_of_hankel_posDef μ hpos + (isMonicOfDegree_monicMomentPolynomial μ n).ne_zero + apply lt_of_le_of_lt degree_le_natDegree + rw [(isMonicOfDegree_monicMomentPolynomial μ n).natDegree_eq] + exact_mod_cast Nat.lt_succ_self n + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentChristoffel.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentChristoffel.lean new file mode 100644 index 000000000..af490cddd --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentChristoffel.lean @@ -0,0 +1,77 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffelLocal + +/-! +# Paired orthogonal recurrences for Stieltjes moments + +The monic orthogonal families for `μ k` and `μ (k+1)` satisfy two coupled +Christoffel identities. Their positive norm ratios are the even and odd +formal Stieltjes numerators. This derives those ratios from moment matrices; +it does not assume a continued-fraction representation. +-/ + +public section + +namespace Polynomial + +/-- The even Stieltjes numerator, indexed from zero, is the shifted norm ratio. -/ +@[expose] noncomputable def momentStieltjesEven (μ : ℕ → ℝ) (n : ℕ) : ℝ := + momentNormSq (fun k => μ (k + 1)) n / momentNormSq μ n + +/-- The odd Stieltjes numerator is the next unshifted norm divided by the shifted norm. -/ +@[expose] noncomputable def momentStieltjesOdd (μ : ℕ → ℝ) (n : ℕ) : ℝ := + momentNormSq μ (n + 1) / momentNormSq (fun k => μ (k + 1)) n + +/-- Positive unshifted and shifted Hankel forms give positive even numerators. -/ +theorem momentStieltjesEven_pos (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) (n : ℕ) : + 0 < momentStieltjesEven μ n := + div_pos (momentNormSq_pos _ n (hshift (n + 1))) + (momentNormSq_pos μ n (hpos (n + 1))) + +/-- The corresponding odd numerators are also positive. -/ +theorem momentStieltjesOdd_pos (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) (n : ℕ) : + 0 < momentStieltjesOdd μ n := + div_pos (momentNormSq_pos μ (n + 1) (hpos (n + 2))) + (momentNormSq_pos _ n (hshift (n + 1))) + +/-- The shifted degree-`n` polynomial, multiplied by `X`, lies in the span of +the unshifted degree-`n+1` and degree-`n` polynomials, with the even norm ratio. -/ +theorem X_mul_monicMomentPolynomial_shift (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) (n : ℕ) : + X * monicMomentPolynomial (fun k => μ (k + 1)) n = + monicMomentPolynomial μ (n + 1) + + C (momentStieltjesEven μ n) * monicMomentPolynomial μ n := by + exact X_mul_monicMomentPolynomial_shift_of_isUnit μ n + (isUnit_iff_ne_zero.mpr (hpos n).det_pos.ne') + (isUnit_iff_ne_zero.mpr (hpos (n + 1)).det_pos.ne') + (isUnit_iff_ne_zero.mpr (hshift n).det_pos.ne') + (momentNormSq_pos μ n (hpos (n + 1))).ne' + +/-- The unshifted degree-`n+1` polynomial lies in the span of the shifted +degree-`n+1` and degree-`n` polynomials, with the odd norm ratio. -/ +theorem monicMomentPolynomial_eq_shift_add (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) (n : ℕ) : + monicMomentPolynomial μ (n + 1) = + monicMomentPolynomial (fun k => μ (k + 1)) (n + 1) + + C (momentStieltjesOdd μ n) * + monicMomentPolynomial (fun k => μ (k + 1)) n := by + exact monicMomentPolynomial_eq_shift_add_of_isUnit μ n + (isUnit_iff_ne_zero.mpr (hpos (n + 1)).det_pos.ne') + (isUnit_iff_ne_zero.mpr (hshift n).det_pos.ne') + (isUnit_iff_ne_zero.mpr (hshift (n + 1)).det_pos.ne') + (momentNormSq_pos _ n (hshift (n + 1))).ne' + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentChristoffelLocal.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentChristoffelLocal.lean new file mode 100644 index 000000000..c3ed59560 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentChristoffelLocal.lean @@ -0,0 +1,96 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentShift + +/-! +# Christoffel identities with finite nondegeneracy hypotheses + +Only the displayed finite Hankel determinants and denominator norm are +required. The numerator norm may vanish. These identities therefore include +the final step of a finite-support Stieltjes fraction. +-/ + +public section + +namespace Polynomial + +variable {K : Type*} [Field K] [DecidableEq K] + +/-- A finite Christoffel identity valid even when the shifted numerator norm +vanishes at the end of the support. -/ +theorem X_mul_monicMomentPolynomial_shift_of_isUnit + (μ : ℕ → K) (n : ℕ) + (hd : IsUnit (momentHankelMatrix μ n).det) + (hdnext : IsUnit (momentHankelMatrix μ (n + 1)).det) + (hs : IsUnit (momentHankelMatrix (fun k => μ (k + 1)) n).det) + (hnorm : momentNormSq μ n ≠ 0) : + X * monicMomentPolynomial (fun k => μ (k + 1)) n = + monicMomentPolynomial μ (n + 1) + + C (momentNormSq (fun k => μ (k + 1)) n / momentNormSq μ n) * + monicMomentPolynomial μ n := by + have heq : + X * monicMomentPolynomial (fun k => μ (k + 1)) n - + C (momentNormSq (fun k => μ (k + 1)) n / momentNormSq μ n) * + monicMomentPolynomial μ n = monicMomentPolynomial μ (n + 1) := by + apply eq_monicMomentPolynomial μ hdnext + · apply IsMonicOfDegree.sub + · simpa only [Nat.one_add] using (isMonicOfDegree_X K).mul + (isMonicOfDegree_monicMomentPolynomial (fun k => μ (k + 1)) n) + · calc + _ ≤ (monicMomentPolynomial μ n).natDegree := natDegree_C_mul_le _ _ + _ = n := (isMonicOfDegree_monicMomentPolynomial μ n).natDegree_eq + _ < n + 1 := by lia + · intro i + rw [momentPairing_sub_right, momentPairing_C_mul_right, ← momentPairing_shift] + by_cases hi : i.val < n + · rw [momentPairing_X_pow_monicMomentPolynomial _ n hs ⟨i.val, hi⟩, + momentPairing_X_pow_monicMomentPolynomial μ n hd ⟨i.val, hi⟩] + simp + · have hi' : i.val = n := by lia + rw [hi', momentPairing_X_pow_monicMomentPolynomial_eq_norm _ n hs, + momentPairing_X_pow_monicMomentPolynomial_eq_norm μ n hd, + div_mul_cancel₀ _ hnorm, sub_self] + exact sub_eq_iff_eq_add.mp heq + +/-- The second finite Christoffel identity permits a vanishing next unshifted +norm. Thus the last odd Stieltjes numerator may be zero. -/ +theorem monicMomentPolynomial_eq_shift_add_of_isUnit + (μ : ℕ → K) (n : ℕ) + (hdnext : IsUnit (momentHankelMatrix μ (n + 1)).det) + (hs : IsUnit (momentHankelMatrix (fun k => μ (k + 1)) n).det) + (hsnext : IsUnit (momentHankelMatrix (fun k => μ (k + 1)) (n + 1)).det) + (hnorm : momentNormSq (fun k => μ (k + 1)) n ≠ 0) : + monicMomentPolynomial μ (n + 1) = + monicMomentPolynomial (fun k => μ (k + 1)) (n + 1) + + C (momentNormSq μ (n + 1) / momentNormSq (fun k => μ (k + 1)) n) * + monicMomentPolynomial (fun k => μ (k + 1)) n := by + have heq : monicMomentPolynomial μ (n + 1) - + C (momentNormSq μ (n + 1) / momentNormSq (fun k => μ (k + 1)) n) * + monicMomentPolynomial (fun k => μ (k + 1)) n = + monicMomentPolynomial (fun k => μ (k + 1)) (n + 1) := by + apply eq_monicMomentPolynomial _ hsnext + · apply (isMonicOfDegree_monicMomentPolynomial μ (n + 1)).sub + calc + _ ≤ (monicMomentPolynomial (fun k => μ (k + 1)) n).natDegree := + natDegree_C_mul_le _ _ + _ = n := (isMonicOfDegree_monicMomentPolynomial _ n).natDegree_eq + _ < n + 1 := by lia + · intro i + rw [momentPairing_sub_right, momentPairing_C_mul_right, momentPairing_shift_X_pow] + by_cases hi : i.val < n + · rw [momentPairing_X_pow_monicMomentPolynomial μ (n + 1) hdnext + ⟨i.val + 1, by lia⟩, momentPairing_X_pow_monicMomentPolynomial _ n hs ⟨i.val, hi⟩] + simp + · have hi' : i.val = n := by lia + rw [hi', momentPairing_X_pow_monicMomentPolynomial_eq_norm μ (n + 1) hdnext, + momentPairing_X_pow_monicMomentPolynomial_eq_norm _ n hs, + div_mul_cancel₀ _ hnorm, sub_self] + exact sub_eq_iff_eq_add.mp heq + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentDeterminantRatios.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentDeterminantRatios.lean new file mode 100644 index 000000000..460f244dc --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentDeterminantRatios.lean @@ -0,0 +1,91 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffel +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentHankelFactorization + +/-! +# Hankel determinant ratios for orthogonal norms and Stieltjes numerators + +The unitriangular Hankel factorization identifies each squared norm with a +quotient of consecutive determinants. Substituting this into the paired +Christoffel ratios gives the classical even and odd Stieltjes numerators. +Invertibility is the algebraic hypothesis; positive definite moment matrices +supply it in applications. +-/ + +public section + +namespace Polynomial + +/-- A finite nondegenerate prefix gives the next norm as a determinant quotient. +The numerator determinant and the norm may vanish. -/ +theorem momentNormSq_eq_det_div_of_isUnit {K : Type*} [Field K] [DecidableEq K] + (μ : ℕ → K) (n : ℕ) (hdet : ∀ i ≤ n, IsUnit (momentHankelMatrix μ i).det) : + momentNormSq μ n = (momentHankelMatrix μ (n + 1)).det / + (momentHankelMatrix μ n).det := by + rw [det_momentHankelMatrix_succ_of_isUnit μ n hdet, mul_comm, + mul_div_cancel_right₀ _ (hdet n le_rfl).ne_zero] + +/-- An orthogonal norm is the quotient of consecutive Hankel determinants. -/ +theorem momentNormSq_eq_det_div {K : Type*} [Field K] [DecidableEq K] + (μ : ℕ → K) (hdet : ∀ n, IsUnit (momentHankelMatrix μ n).det) (n : ℕ) : + momentNormSq μ n = (momentHankelMatrix μ (n + 1)).det / + (momentHankelMatrix μ n).det := + momentNormSq_eq_det_div_of_isUnit μ n (fun i _ => hdet i) + +/-- The even numerator uses only finite shifted and unshifted nondegenerate +prefixes. The two next determinants need not be nonzero. -/ +theorem momentStieltjesEven_eq_det_ratio_of_isUnit (μ : ℕ → ℝ) (n : ℕ) + (hdet : ∀ i ≤ n, IsUnit (momentHankelMatrix μ i).det) + (hshift : ∀ i ≤ n, IsUnit (momentHankelMatrix (fun k => μ (k + 1)) i).det) : + momentStieltjesEven μ n = + (momentHankelMatrix (fun k => μ (k + 1)) (n + 1)).det * + (momentHankelMatrix μ n).det / + ((momentHankelMatrix (fun k => μ (k + 1)) n).det * + (momentHankelMatrix μ (n + 1)).det) := by + rw [momentStieltjesEven, momentNormSq_eq_det_div_of_isUnit _ n hshift, + momentNormSq_eq_det_div_of_isUnit μ n hdet, div_div_div_eq] + +/-- The even Stieltjes numerator is a ratio of shifted and unshifted Hankel determinants. -/ +theorem momentStieltjesEven_eq_det_ratio (μ : ℕ → ℝ) + (hdet : ∀ n, IsUnit (momentHankelMatrix μ n).det) + (hshift : ∀ n, IsUnit (momentHankelMatrix (fun k => μ (k + 1)) n).det) (n : ℕ) : + momentStieltjesEven μ n = + (momentHankelMatrix (fun k => μ (k + 1)) (n + 1)).det * + (momentHankelMatrix μ n).det / + ((momentHankelMatrix (fun k => μ (k + 1)) n).det * + (momentHankelMatrix μ (n + 1)).det) := + momentStieltjesEven_eq_det_ratio_of_isUnit μ n (fun i _ => hdet i) + (fun i _ => hshift i) + +/-- The odd numerator also admits a finite-prefix determinant formula. No +nonvanishing condition is imposed on either next determinant. -/ +theorem momentStieltjesOdd_eq_det_ratio_of_isUnit (μ : ℕ → ℝ) (n : ℕ) + (hdet : ∀ i ≤ n + 1, IsUnit (momentHankelMatrix μ i).det) + (hshift : ∀ i ≤ n, IsUnit (momentHankelMatrix (fun k => μ (k + 1)) i).det) : + momentStieltjesOdd μ n = + (momentHankelMatrix μ (n + 2)).det * + (momentHankelMatrix (fun k => μ (k + 1)) n).det / + ((momentHankelMatrix μ (n + 1)).det * + (momentHankelMatrix (fun k => μ (k + 1)) (n + 1)).det) := by + rw [momentStieltjesOdd, momentNormSq_eq_det_div_of_isUnit μ (n + 1) hdet, + momentNormSq_eq_det_div_of_isUnit _ n hshift, div_div_div_eq] + +/-- The odd Stieltjes numerator uses the next unshifted Hankel determinant. -/ +theorem momentStieltjesOdd_eq_det_ratio (μ : ℕ → ℝ) + (hdet : ∀ n, IsUnit (momentHankelMatrix μ n).det) + (hshift : ∀ n, IsUnit (momentHankelMatrix (fun k => μ (k + 1)) n).det) (n : ℕ) : + momentStieltjesOdd μ n = + (momentHankelMatrix μ (n + 2)).det * + (momentHankelMatrix (fun k => μ (k + 1)) n).det / + ((momentHankelMatrix μ (n + 1)).det * + (momentHankelMatrix (fun k => μ (k + 1)) (n + 1)).det) := + momentStieltjesOdd_eq_det_ratio_of_isUnit μ n (fun i _ => hdet i) + (fun i _ => hshift i) + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentHankelFactorization.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentHankelFactorization.lean new file mode 100644 index 000000000..d88c66159 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentHankelFactorization.lean @@ -0,0 +1,162 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra +public import Mathlib.LinearAlgebra.Matrix.Block + +/-! +# Hankel factorization by monic orthogonal coefficients + +The lower unitriangular matrix of the monic orthogonal polynomial +coefficients diagonalizes the finite Hankel moment matrix. Its diagonal +entries are the squared norms. Taking determinants gives the norm-product +formula, and therefore the determinant ratio for each successive norm. +-/ + +public section + +open Matrix +open scoped BigOperators + +namespace Polynomial + +variable {R : Type*} [CommRing R] [Nontrivial R] [DecidableEq R] + +/-- Lower unitriangular coefficient matrix of the first monic moment polynomials. -/ +@[expose] noncomputable def momentOrthogonalMatrix (μ : ℕ → R) (n : ℕ) : + Matrix (Fin n) (Fin n) R := + fun i j => (monicMomentPolynomial μ i.val).coeff j.val + +/-- Monicity places one on the diagonal of the orthogonal coefficient matrix. -/ +@[simp] theorem momentOrthogonalMatrix_diag (μ : ℕ → R) (n : ℕ) (i : Fin n) : + momentOrthogonalMatrix μ n i i = 1 := by + change (monicMomentPolynomial μ i.val).coeff i.val = 1 + simpa only [(isMonicOfDegree_monicMomentPolynomial μ i.val).natDegree_eq] using + (isMonicOfDegree_monicMomentPolynomial μ i.val).monic.coeff_natDegree + +/-- The degree bound makes the orthogonal coefficient matrix lower triangular. -/ +theorem isLowerTriangular_momentOrthogonalMatrix (μ : ℕ → R) (n : ℕ) : + (momentOrthogonalMatrix μ n).IsLowerTriangular := by + intro i j hij + apply coeff_eq_zero_of_natDegree_lt + rw [(isMonicOfDegree_monicMomentPolynomial μ i.val).natDegree_eq] + exact hij + +/-- The change of basis to monic orthogonal coefficients has determinant one. -/ +@[simp] theorem det_momentOrthogonalMatrix (μ : ℕ → R) (n : ℕ) : + (momentOrthogonalMatrix μ n).det = 1 := by + rw [Matrix.det_of_isLowerTriangular _ (isLowerTriangular_momentOrthogonalMatrix μ n)] + simp + +/-- Orthogonality of two monic moment polynomials needs only their defining +Hankel matrices to be invertible. -/ +theorem momentPairing_monicMomentPolynomial_eq_ite_of_isUnit (μ : ℕ → R) + (i j : ℕ) (hi : IsUnit (momentHankelMatrix μ i).det) + (hj : IsUnit (momentHankelMatrix μ j).det) : + momentPairing μ (monicMomentPolynomial μ i) (monicMomentPolynomial μ j) = + if i = j then momentNormSq μ i else 0 := by + by_cases hij : i = j + · subst j + simp only [ite_true, momentNormSq] + · rw [ite_eq_right hij] + rcases lt_or_gt_of_ne hij with hlt | hgt + · apply momentPairing_monicMomentPolynomial μ j hj + apply lt_of_le_of_lt degree_le_natDegree + rw [(isMonicOfDegree_monicMomentPolynomial μ i).natDegree_eq] + exact_mod_cast hlt + · rw [momentPairing_comm] + apply momentPairing_monicMomentPolynomial μ i hi + apply lt_of_le_of_lt degree_le_natDegree + rw [(isMonicOfDegree_monicMomentPolynomial μ j).natDegree_eq] + exact_mod_cast hgt + +/-- Orthogonality diagonalizes the pairings between monic moment polynomials. -/ +theorem momentPairing_monicMomentPolynomial_eq_ite (μ : ℕ → R) + (hdet : ∀ n, IsUnit (momentHankelMatrix μ n).det) (i j : ℕ) : + momentPairing μ (monicMomentPolynomial μ i) (monicMomentPolynomial μ j) = + if i = j then momentNormSq μ i else 0 := + momentPairing_monicMomentPolynomial_eq_ite_of_isUnit μ i j (hdet i) (hdet j) + +/-- Each coefficient row reconstructs its monic orthogonal polynomial. -/ +private theorem ofFn_momentOrthogonalMatrix_row (μ : ℕ → R) (n : ℕ) (i : Fin n) : + ofFn n (momentOrthogonalMatrix μ n i) = monicMomentPolynomial μ i.val := by + change ofFn n (toFn n (monicMomentPolynomial μ i.val)) = _ + apply ofFn_comp_toFn_eq_id_of_natDegree_lt + rw [(isMonicOfDegree_monicMomentPolynomial μ i.val).natDegree_eq] + exact i.is_lt + +/-- A finite nondegenerate prefix suffices to diagonalize the next Hankel matrix. +The matrix being diagonalized may itself be singular. -/ +theorem momentOrthogonalMatrix_mul_hankel_mul_transpose_of_isUnit (μ : ℕ → R) + (n : ℕ) (hdet : ∀ i < n, IsUnit (momentHankelMatrix μ i).det) : + momentOrthogonalMatrix μ n * momentHankelMatrix μ n * + (momentOrthogonalMatrix μ n)ᵀ = + Matrix.diagonal (fun i : Fin n => momentNormSq μ i.val) := by + ext i j + have hpair : + (momentOrthogonalMatrix μ n * momentHankelMatrix μ n * + (momentOrthogonalMatrix μ n)ᵀ) i j = + momentPairing μ (monicMomentPolynomial μ i.val) + (monicMomentPolynomial μ j.val) := by + rw [← ofFn_momentOrthogonalMatrix_row μ n i, + ← ofFn_momentOrthogonalMatrix_row μ n j, momentPairing_ofFn_ofFn, + Matrix.dotProduct_mulVec] + rfl + rw [hpair, momentPairing_monicMomentPolynomial_eq_ite_of_isUnit μ i.val j.val + (hdet i.val i.is_lt) (hdet j.val j.is_lt)] + by_cases hij : i = j + · subst j + simp + · have hv : i.val ≠ j.val := fun h => hij (Fin.ext h) + simp [hij, hv] + +/-- The coefficient change of basis diagonalizes each finite Hankel matrix. -/ +theorem momentOrthogonalMatrix_mul_hankel_mul_transpose (μ : ℕ → R) + (hdet : ∀ n, IsUnit (momentHankelMatrix μ n).det) (n : ℕ) : + momentOrthogonalMatrix μ n * momentHankelMatrix μ n * + (momentOrthogonalMatrix μ n)ᵀ = + Matrix.diagonal (fun i : Fin n => momentNormSq μ i.val) := + momentOrthogonalMatrix_mul_hankel_mul_transpose_of_isUnit μ n (fun i _ => hdet i) + +/-- A finite Hankel determinant is the product of the squared norms of the +preceding monic moment polynomials, assuming only the preceding determinants +are units. The determinant in the conclusion may vanish. -/ +theorem det_momentHankelMatrix_eq_prod_norm_of_isUnit (μ : ℕ → R) + (n : ℕ) (hdet : ∀ i < n, IsUnit (momentHankelMatrix μ i).det) : + (momentHankelMatrix μ n).det = ∏ i : Fin n, momentNormSq μ i.val := by + have h := congrArg Matrix.det + (momentOrthogonalMatrix_mul_hankel_mul_transpose_of_isUnit μ n hdet) + simpa only [Matrix.det_mul, Matrix.det_transpose, det_momentOrthogonalMatrix, + one_mul, mul_one, Matrix.det_diagonal] using h + +/-- A finite Hankel determinant is the product of the squared norms of the +preceding monic moment polynomials. -/ +theorem det_momentHankelMatrix_eq_prod_norm (μ : ℕ → R) + (hdet : ∀ n, IsUnit (momentHankelMatrix μ n).det) (n : ℕ) : + (momentHankelMatrix μ n).det = ∏ i : Fin n, momentNormSq μ i.val := + det_momentHankelMatrix_eq_prod_norm_of_isUnit μ n (fun i _ => hdet i) + +/-- Consecutive Hankel determinants differ by the next squared norm, including +the first vanishing norm after a nondegenerate prefix. -/ +theorem det_momentHankelMatrix_succ_of_isUnit (μ : ℕ → R) + (n : ℕ) (hdet : ∀ i ≤ n, IsUnit (momentHankelMatrix μ i).det) : + (momentHankelMatrix μ (n + 1)).det = + (momentHankelMatrix μ n).det * momentNormSq μ n := by + rw [det_momentHankelMatrix_eq_prod_norm_of_isUnit μ (n + 1) + (fun i hi => hdet i (by lia)), Fin.prod_univ_castSucc, + det_momentHankelMatrix_eq_prod_norm_of_isUnit μ n + (fun i hi => hdet i (by lia))] + rfl + +/-- Consecutive Hankel determinants differ by the next squared norm. -/ +theorem det_momentHankelMatrix_succ (μ : ℕ → R) + (hdet : ∀ n, IsUnit (momentHankelMatrix μ n).det) (n : ℕ) : + (momentHankelMatrix μ (n + 1)).det = + (momentHankelMatrix μ n).det * momentNormSq μ n := + det_momentHankelMatrix_succ_of_isUnit μ n (fun i _ => hdet i) + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentParity.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentParity.lean new file mode 100644 index 000000000..74b9234dc --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentParity.lean @@ -0,0 +1,123 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import Mathlib.Algebra.Group.EvenFunction + +/-! +# Parity of monic orthogonal polynomials + +Vanishing odd moments make the polynomial moment functional invariant under +reflection. Uniqueness in a nonsingular degree-`n` moment system then gives +parity `n` for its monic orthogonal polynomial. Positivity is not needed. +-/ + +public section + +namespace Polynomial + +section CommRing + +variable {R : Type*} [CommRing R] + +/-- Vanishing odd moments make the moment functional invariant under reflection. -/ +theorem momentFunctional_comp_neg_X (m : ℕ → R) + (hodd : ∀ k : ℕ, Odd k → m k = 0) (p : R[X]) : + momentFunctional m (p.comp (-X)) = momentFunctional m p := by + induction p using Polynomial.induction_on' with + | add p q hp hq => simp only [add_comp, momentFunctional_add, hp, hq] + | monomial n a => + have hsign : (-1 : R) ^ n * m n = m n := by + rcases Nat.even_or_odd n with hn | hn + · rw [hn.neg_one_pow, one_mul] + · rw [hodd n hn, mul_zero] + have hpoly : (monomial n a).comp (-X) = + C (a * (-1 : R) ^ n) * X ^ n := by + rw [monomial_comp, neg_pow] + simp only [map_mul, map_pow, map_neg, map_one] + ring + rw [hpoly, momentFunctional_C_mul, momentFunctional_X_pow, + momentFunctional_monomial, mul_assoc, hsign] + +/-- Reflecting both arguments preserves a moment pairing with vanishing odd moments. -/ +theorem momentPairing_comp_neg_X (m : ℕ → R) + (hodd : ∀ k : ℕ, Odd k → m k = 0) (p q : R[X]) : + momentPairing m (p.comp (-X)) (q.comp (-X)) = momentPairing m p q := by + change momentFunctional m (p.comp (-X) * q.comp (-X)) = _ + rw [← mul_comp, momentFunctional_comp_neg_X m hodd] + rfl + +/-- Reflection can be transferred between the two arguments of a symmetric moment pairing. -/ +theorem momentPairing_comp_neg_X_right (m : ℕ → R) + (hodd : ∀ k : ℕ, Odd k → m k = 0) (p q : R[X]) : + momentPairing m p (q.comp (-X)) = momentPairing m (p.comp (-X)) q := by + simpa only [comp_neg_X_comp_neg_X] using + momentPairing_comp_neg_X m hodd (p.comp (-X)) q + +end CommRing + +section NontrivialCommRing + +variable {R : Type*} [CommRing R] [Nontrivial R] [DecidableEq R] + +/-- The monic orthogonal polynomial of degree `n` has parity `n` when odd moments vanish. -/ +theorem monicMomentPolynomial_comp_neg_X (m : ℕ → R) + (hodd : ∀ k : ℕ, Odd k → m k = 0) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix m n).det) : + (monicMomentPolynomial m n).comp (-X) = + C ((-1 : R) ^ n) * monicMomentPolynomial m n := by + have hp := isMonicOfDegree_monicMomentPolynomial m n + have hsign : (-1 : R) ^ n * (-1 : R) ^ n = 1 := by + rw [← mul_pow] + simp + have hnorm : C ((-1 : R) ^ n) * (monicMomentPolynomial m n).comp (-X) = + monicMomentPolynomial m n := by + apply eq_monicMomentPolynomial m hdet + · refine ⟨?_, ?_⟩ + · rw [natDegree_C_mul_eq_of_mul_eq_one hsign, + natDegree_eq_of_degree_eq (degree_comp_neg_X), hp.natDegree_eq] + · simpa only [hp.natDegree_eq, map_pow, map_neg, map_one] using + hp.monic.neg_one_pow_natDegree_mul_comp_neg_X + · intro i + rw [momentPairing_C_mul_right, momentPairing_comp_neg_X_right m hodd] + have hz : momentPairing m ((X ^ i.val).comp (-X)) + (monicMomentPolynomial m n) = 0 := by + apply momentPairing_monicMomentPolynomial m n hdet + rw [degree_comp_neg_X, degree_X_pow] + exact WithBot.coe_lt_coe.mpr i.is_lt + rw [hz, mul_zero] + have h := congrArg (fun q : R[X] => C ((-1 : R) ^ n) * q) hnorm + simpa only [← mul_assoc, ← map_mul, hsign, map_one, one_mul] using h + +/-- Evaluation form of the parity identity for the actual monic moment polynomial. -/ +theorem monicMomentPolynomial_eval_neg (m : ℕ → R) + (hodd : ∀ k : ℕ, Odd k → m k = 0) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix m n).det) (x : R) : + (monicMomentPolynomial m n).eval (-x) = + (-1 : R) ^ n * (monicMomentPolynomial m n).eval x := by + simpa only [eval_comp, eval_neg, eval_X, eval_mul, eval_C] using + congrArg (fun p : R[X] => p.eval x) (monicMomentPolynomial_comp_neg_X m hodd n hdet) + +/-- Even degree gives an even monic orthogonal polynomial for symmetric moments. -/ +theorem even_monicMomentPolynomial (m : ℕ → R) + (hodd : ∀ k : ℕ, Odd k → m k = 0) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix m n).det) (hn : Even n) : + Function.Even (monicMomentPolynomial m n).eval := by + intro x + simpa only [hn.neg_one_pow, one_mul] using monicMomentPolynomial_eval_neg m hodd n hdet x + +/-- Odd degree gives an odd monic orthogonal polynomial for symmetric moments. -/ +theorem odd_monicMomentPolynomial (m : ℕ → R) + (hodd : ∀ k : ℕ, Odd k → m k = 0) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix m n).det) (hn : Odd n) : + Function.Odd (monicMomentPolynomial m n).eval := by + intro x + simpa only [hn.neg_one_pow, neg_one_mul] using monicMomentPolynomial_eval_neg m hodd n hdet x + +end NontrivialCommRing + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentRecurrence.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentRecurrence.lean new file mode 100644 index 000000000..a0b56d422 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentRecurrence.lean @@ -0,0 +1,154 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra + +/-! +# Three-term recurrence from a positive moment functional + +The monic polynomials obtained from the finite Hankel solve satisfy the +three-term recurrence. The subdiagonal coefficient is the quotient of +successive squared norms and is strictly positive. This is unconditional +infrastructure; a particular arithmetic moment sequence supplies the +positive-definiteness hypotheses separately. +-/ + +public section + +namespace Polynomial + +/-- The diagonal coefficient of the monic moment-polynomial recurrence. -/ +@[expose] noncomputable def momentJacobiDiagonal (μ : ℕ → ℝ) (n : ℕ) : ℝ := + momentPairing μ (X * monicMomentPolynomial μ n) (monicMomentPolynomial μ n) / + momentNormSq μ n + +/-- The outgoing Jacobi numerator is the ratio of consecutive squared norms. -/ +@[expose] noncomputable def momentJacobiNumerator (μ : ℕ → ℝ) (n : ℕ) : ℝ := + momentNormSq μ (n + 1) / momentNormSq μ n + +/-- Strictly positive Hankel matrices give positive outgoing Jacobi numerators. -/ +theorem momentJacobiNumerator_pos (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) (n : ℕ) : + 0 < momentJacobiNumerator μ n := + div_pos (momentNormSq_pos μ (n + 1) (hpos (n + 2))) + (momentNormSq_pos μ n (hpos (n + 1))) + +/-- Positive Hankel forms have invertible determinants. -/ +private theorem det_isUnit (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) (n : ℕ) : + IsUnit (momentHankelMatrix μ n).det := + isUnit_iff_ne_zero.mpr (hpos n).det_pos.ne' + +/-- The first monic moment polynomial has the mean as its sole root. -/ +theorem monicMomentPolynomial_one_eq (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) : + monicMomentPolynomial μ 1 = X - C (momentJacobiDiagonal μ 0) := by + have hm : μ 0 ≠ 0 := by + simpa only [momentNormSq_zero] using (momentNormSq_pos μ 0 (hpos 1)).ne' + have hx : momentFunctional μ X = μ 1 := by + simpa only [pow_one] using momentFunctional_X_pow μ 1 + have hc (c : ℝ) : momentFunctional μ (C c) = c * μ 0 := by + simpa only [mul_one, momentFunctional_one] using momentFunctional_C_mul μ c 1 + have hd : momentJacobiDiagonal μ 0 = μ 1 / μ 0 := by + simp only [momentJacobiDiagonal, monicMomentPolynomial_zero, momentNormSq_zero, + momentPairing, mul_one, hx] + symm + apply eq_monicMomentPolynomial μ (det_isUnit μ hpos 1) + (isMonicOfDegree_X_sub_one _) + intro i + have hi : i = 0 := Subsingleton.elim _ _ + subst i + simp only [Fin.val_zero, pow_zero, momentPairing, one_mul, momentFunctional_sub, + hx, hc, hd, div_mul_cancel₀ _ hm, sub_self] + +/-- Moving multiplication by X increases the monomial exponent. -/ +private theorem pairing_X_pow_X_mul_eq (μ : ℕ → ℝ) (n i : ℕ) : + momentPairing μ (X ^ i) (X * monicMomentPolynomial μ n) = + momentPairing μ (X ^ (i + 1)) (monicMomentPolynomial μ n) := by + rw [← momentPairing_X_mul_left, ← pow_succ'] + +/-- The recurrence candidate is orthogonal to all lower monomials. -/ +private theorem recurrence_lower_orthogonal (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) (n : ℕ) (i : Fin (n + 1)) : + momentPairing μ (X ^ i.val) + ((X - C (momentJacobiDiagonal μ (n + 1))) * monicMomentPolynomial μ (n + 1) - + C (momentJacobiNumerator μ n) * monicMomentPolynomial μ n) = 0 := by + have horth : momentPairing μ (X ^ i.val) (monicMomentPolynomial μ (n + 1)) = 0 := + momentPairing_X_pow_monicMomentPolynomial μ (n + 1) (det_isUnit μ hpos _) i + rw [sub_mul, momentPairing_sub_right, momentPairing_sub_right, + momentPairing_C_mul_right, momentPairing_C_mul_right, horth, mul_zero, sub_zero, + pairing_X_pow_X_mul_eq] + by_cases hi : i.val < n + · rw [momentPairing_X_pow_monicMomentPolynomial μ (n + 1) + (det_isUnit μ hpos _) ⟨i.val + 1, by lia⟩, + momentPairing_X_pow_monicMomentPolynomial μ n (det_isUnit μ hpos _) ⟨i.val, hi⟩] + simp + · have hi' : i.val = n := by lia + rw [hi', momentPairing_X_pow_monicMomentPolynomial_eq_norm μ (n + 1) + (det_isUnit μ hpos _), momentPairing_X_pow_monicMomentPolynomial_eq_norm μ n + (det_isUnit μ hpos _), momentJacobiNumerator, + div_mul_cancel₀ _ (momentNormSq_pos μ n (hpos (n + 1))).ne', sub_self] + +/-- The diagonal recurrence coefficient removes the self pairing. -/ +private theorem recurrence_self_orthogonal (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) (n : ℕ) : + momentPairing μ (monicMomentPolynomial μ (n + 1)) + ((X - C (momentJacobiDiagonal μ (n + 1))) * monicMomentPolynomial μ (n + 1) - + C (momentJacobiNumerator μ n) * monicMomentPolynomial μ n) = 0 := by + have hdegree : (monicMomentPolynomial μ n).degree < (n + 1 : WithBot ℕ) := + lt_of_le_of_lt degree_le_natDegree (by + rw [(isMonicOfDegree_monicMomentPolynomial μ n).natDegree_eq] + exact_mod_cast Nat.lt_succ_self n) + have horth := momentPairing_monicMomentPolynomial μ (n + 1) + (det_isUnit μ hpos _) hdegree + rw [momentPairing_comm] at horth + rw [sub_mul, momentPairing_sub_right, momentPairing_sub_right, + momentPairing_C_mul_right, momentPairing_C_mul_right, horth, mul_zero, sub_zero, + momentPairing_comm μ (monicMomentPolynomial μ (n + 1)) + (X * monicMomentPolynomial μ (n + 1))] + change _ - momentJacobiDiagonal μ (n + 1) * momentNormSq μ (n + 1) = 0 + rw [momentJacobiDiagonal, + div_mul_cancel₀ _ (momentNormSq_pos μ (n + 1) (hpos (n + 2))).ne', sub_self] + +/-- Positive Hankel forms force the monic three-term recurrence, with coefficients +defined by the moment pairing and successive squared norms. -/ +theorem monicMomentPolynomial_add_two (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) (n : ℕ) : + monicMomentPolynomial μ (n + 2) = + (X - C (momentJacobiDiagonal μ (n + 1))) * monicMomentPolynomial μ (n + 1) - + C (momentJacobiNumerator μ n) * monicMomentPolynomial μ n := by + let q := (X - C (momentJacobiDiagonal μ (n + 1))) * monicMomentPolynomial μ (n + 1) - + C (momentJacobiNumerator μ n) * monicMomentPolynomial μ n + have hmonic : IsMonicOfDegree q (n + 2) := by + apply IsMonicOfDegree.sub + · simpa only [Nat.one_add] using + (isMonicOfDegree_X_sub_one (momentJacobiDiagonal μ (n + 1))).mul + (isMonicOfDegree_monicMomentPolynomial μ (n + 1)) + · calc + _ ≤ (monicMomentPolynomial μ n).natDegree := natDegree_C_mul_le _ _ + _ = n := (isMonicOfDegree_monicMomentPolynomial μ n).natDegree_eq + _ < n + 2 := by lia + have hlow (i : Fin (n + 1)) : momentPairing μ (X ^ i.val) q = 0 := + recurrence_lower_orthogonal μ hpos n i + have htop : momentPairing μ (X ^ (n + 1)) q = 0 := by + have hsmall := (isMonicOfDegree_monicMomentPolynomial μ + (n + 1)).natDegree_sub_X_pow (by lia : n + 1 ≠ 0) + have hdegree : (monicMomentPolynomial μ (n + 1) - X ^ (n + 1)).degree < + (n + 1 : WithBot ℕ) := + lt_of_le_of_lt degree_le_natDegree (by exact_mod_cast hsmall) + have h := momentPairing_eq_zero_of_X_pow μ hdegree hlow + rw [momentPairing_sub_left, recurrence_self_orthogonal μ hpos n] at h + exact neg_eq_zero.mp (by simpa only [zero_sub] using h) + symm + apply eq_monicMomentPolynomial μ (det_isUnit μ hpos _) hmonic + intro i + by_cases hi : i.val < n + 1 + · exact hlow ⟨i.val, hi⟩ + · have hi' : i.val = n + 1 := by lia + simpa only [hi'] using htop + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeries.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeries.lean new file mode 100644 index 000000000..2df01eb2a --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeries.lean @@ -0,0 +1,48 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra +public import Mathlib.RingTheory.PowerSeries.Basic + +/-! +# Formal series of normalized orthogonal moments +-/ + +public section + +open scoped PowerSeries + +namespace Polynomial + +/-- The normalized moment-pairing series starting at the degree of the monic +orthogonal polynomial. Under positive Hankel forms its constant term is one. -/ +@[expose] noncomputable def momentOrthogonalSeries (μ : ℕ → ℝ) (n : ℕ) : ℝ⟦X⟧ := + PowerSeries.mk fun k => + momentPairing μ (X ^ (n + k)) (monicMomentPolynomial μ n) / momentNormSq μ n + +/-- The coefficients of the normalized orthogonal-moment series. -/ +@[simp] theorem coeff_momentOrthogonalSeries (μ : ℕ → ℝ) (n k : ℕ) : + PowerSeries.coeff k (momentOrthogonalSeries μ n) = + momentPairing μ (X ^ (n + k)) (monicMomentPolynomial μ n) / momentNormSq μ n := by + simp only [momentOrthogonalSeries, PowerSeries.coeff_mk] + +/-- Positive Hankel forms normalize each orthogonal-moment series to constant one. -/ +theorem coeff_zero_momentOrthogonalSeries (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) (n : ℕ) : + PowerSeries.coeff 0 (momentOrthogonalSeries μ n) = 1 := by + rw [coeff_momentOrthogonalSeries, Nat.add_zero, + momentPairing_X_pow_monicMomentPolynomial_eq_norm μ n + (isUnit_iff_ne_zero.mpr (hpos n).det_pos.ne'), + div_self (momentNormSq_pos μ n (hpos (n + 1))).ne'] + +/-- The degree-zero member is the original moment series divided by its mass. -/ +theorem coeff_momentOrthogonalSeries_zero (μ : ℕ → ℝ) (k : ℕ) : + PowerSeries.coeff k (momentOrthogonalSeries μ 0) = μ k / μ 0 := by + simp only [coeff_momentOrthogonalSeries, Nat.zero_add, monicMomentPolynomial_zero, + momentNormSq_zero, momentPairing, mul_one, momentFunctional_X_pow] + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeriesLocal.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeriesLocal.lean new file mode 100644 index 000000000..468311254 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeriesLocal.lean @@ -0,0 +1,159 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeries +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffel +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentShift + +/-! +# Finite Euler–Gauss steps and their termination + +These identities use only one Christoffel polynomial identity and its +displayed nonzero denominator norms. At the boundary, a vanishing polynomial +pairing gives equality of the last two formal series instead of requiring +division by the zero next norm. +-/ + +public section + +namespace Polynomial + +/-- Initial Euler–Gauss equation, requiring only the first two nonzero moments. -/ +theorem momentOrthogonalSeries_zero_sub_one_of_ne_zero + (μ : ℕ → ℝ) (hm0 : μ 0 ≠ 0) (hm1 : μ 1 ≠ 0) : + momentOrthogonalSeries μ 0 - 1 = + PowerSeries.C (momentStieltjesEven μ 0) * PowerSeries.X * + momentOrthogonalSeries (fun k => μ (k + 1)) 0 := by + ext k + cases k with + | zero => + simp only [map_sub, coeff_momentOrthogonalSeries_zero, PowerSeries.coeff_zero_one, + div_self hm0, sub_self, mul_assoc, PowerSeries.coeff_C_mul, + PowerSeries.coeff_zero_X_mul, mul_zero] + | succ k => + simp only [map_sub, PowerSeries.coeff_one, Nat.add_one_ne_zero, ite_false, + sub_zero, mul_assoc, PowerSeries.coeff_C_mul, PowerSeries.coeff_succ_X_mul, + coeff_momentOrthogonalSeries_zero, momentStieltjesEven, momentNormSq_zero, + Nat.zero_add] + field_simp [hm0, hm1] + +/-- An odd Euler–Gauss step from one Christoffel identity and finite nondegeneracy. -/ +theorem momentOrthogonalSeries_shift_sub_of_identity (μ : ℕ → ℝ) (n : ℕ) + (hpoly : X * monicMomentPolynomial (fun k => μ (k + 1)) n = + monicMomentPolynomial μ (n + 1) + + C (momentStieltjesEven μ n) * monicMomentPolynomial μ n) + (hdet : IsUnit (momentHankelMatrix μ (n + 1)).det) + (hA : momentNormSq μ n ≠ 0) + (hB : momentNormSq (fun k => μ (k + 1)) n ≠ 0) + (hC : momentNormSq μ (n + 1) ≠ 0) : + momentOrthogonalSeries (fun k => μ (k + 1)) n - momentOrthogonalSeries μ n = + PowerSeries.C (momentStieltjesOdd μ n) * PowerSeries.X * + momentOrthogonalSeries μ (n + 1) := by + have hp (k : ℕ) := congrArg (momentPairing μ (X ^ (n + k))) hpoly + simp only [momentPairing_add_right, momentPairing_C_mul_right, + ← momentPairing_shift] at hp + ext k + cases k with + | zero => + have hz : momentPairing μ (X ^ n) (monicMomentPolynomial μ (n + 1)) = 0 := + momentPairing_X_pow_monicMomentPolynomial μ (n + 1) hdet ⟨n, by lia⟩ + simp only [map_sub, mul_assoc, PowerSeries.coeff_C_mul, + PowerSeries.coeff_zero_X_mul, mul_zero, coeff_momentOrthogonalSeries] + rw [hp 0] + simp only [Nat.add_zero, hz, zero_add, momentStieltjesEven] + field_simp [hA, hB] + ring + | succ k => + simp only [map_sub, mul_assoc, PowerSeries.coeff_C_mul, + PowerSeries.coeff_succ_X_mul, coeff_momentOrthogonalSeries] + rw [show n + 1 + k = n + (k + 1) by lia, hp (k + 1), + momentStieltjesEven, momentStieltjesOdd] + field_simp [hA, hB, hC] + ring + +/-- An even Euler–Gauss step from the second Christoffel identity. -/ +theorem momentOrthogonalSeries_succ_sub_of_identity (μ : ℕ → ℝ) (n : ℕ) + (hpoly : monicMomentPolynomial μ (n + 1) = + monicMomentPolynomial (fun k => μ (k + 1)) (n + 1) + + C (momentStieltjesOdd μ n) * monicMomentPolynomial (fun k => μ (k + 1)) n) + (hdet : IsUnit (momentHankelMatrix (fun k => μ (k + 1)) (n + 1)).det) + (hA : momentNormSq μ (n + 1) ≠ 0) + (hB : momentNormSq (fun k => μ (k + 1)) n ≠ 0) + (hC : momentNormSq (fun k => μ (k + 1)) (n + 1) ≠ 0) : + momentOrthogonalSeries μ (n + 1) - momentOrthogonalSeries (fun k => μ (k + 1)) n = + PowerSeries.C (momentStieltjesEven μ (n + 1)) * PowerSeries.X * + momentOrthogonalSeries (fun k => μ (k + 1)) (n + 1) := by + have hp (k : ℕ) : + momentPairing μ (X ^ ((n + 1) + k)) (monicMomentPolynomial μ (n + 1)) = + momentPairing (fun j => μ (j + 1)) (X ^ (n + k)) + (monicMomentPolynomial (fun j => μ (j + 1)) (n + 1)) + + momentStieltjesOdd μ n * + momentPairing (fun j => μ (j + 1)) (X ^ (n + k)) + (monicMomentPolynomial (fun j => μ (j + 1)) n) := by + have h := congrArg (momentPairing (fun j => μ (j + 1)) (X ^ (n + k))) hpoly + rw [momentPairing_add_right, momentPairing_C_mul_right, + momentPairing_shift_X_pow] at h + simpa only [Nat.add_assoc, Nat.add_comm, Nat.add_left_comm] using h + ext k + cases k with + | zero => + have hz : momentPairing (fun j => μ (j + 1)) (X ^ n) + (monicMomentPolynomial (fun j => μ (j + 1)) (n + 1)) = 0 := + momentPairing_X_pow_monicMomentPolynomial _ (n + 1) hdet ⟨n, by lia⟩ + simp only [map_sub, mul_assoc, PowerSeries.coeff_C_mul, + PowerSeries.coeff_zero_X_mul, mul_zero, coeff_momentOrthogonalSeries] + rw [hp 0] + simp only [Nat.add_zero, hz, zero_add, momentStieltjesOdd] + field_simp [hA, hB] + ring + | succ k => + simp only [map_sub, mul_assoc, PowerSeries.coeff_C_mul, + PowerSeries.coeff_succ_X_mul, coeff_momentOrthogonalSeries] + rw [hp (k + 1), momentStieltjesOdd, momentStieltjesEven, + show n + 1 + k = n + (k + 1) by lia] + field_simp [hA, hB, hC] + ring + +/-- At the odd terminating position, vanishing of every pairing with the next +unshifted polynomial makes the two normalized moment series equal. -/ +theorem momentOrthogonalSeries_shift_eq_of_pairing_zero (μ : ℕ → ℝ) (n : ℕ) + (hpoly : X * monicMomentPolynomial (fun k => μ (k + 1)) n = + monicMomentPolynomial μ (n + 1) + + C (momentStieltjesEven μ n) * monicMomentPolynomial μ n) + (hzero : ∀ p : ℝ[X], momentPairing μ p (monicMomentPolynomial μ (n + 1)) = 0) + (hA : momentNormSq μ n ≠ 0) + (hB : momentNormSq (fun k => μ (k + 1)) n ≠ 0) : + momentOrthogonalSeries (fun k => μ (k + 1)) n = momentOrthogonalSeries μ n := by + ext k + have h := congrArg (momentPairing μ (X ^ (n + k))) hpoly + rw [momentPairing_add_right, momentPairing_C_mul_right, + ← momentPairing_shift, hzero, zero_add] at h + rw [coeff_momentOrthogonalSeries, coeff_momentOrthogonalSeries, h, + momentStieltjesEven] + field_simp [hA, hB] + +/-- At the even terminating position, vanishing of every shifted pairing with +the next shifted polynomial makes the last two series equal. -/ +theorem momentOrthogonalSeries_succ_eq_of_pairing_zero (μ : ℕ → ℝ) (n : ℕ) + (hpoly : monicMomentPolynomial μ (n + 1) = + monicMomentPolynomial (fun k => μ (k + 1)) (n + 1) + + C (momentStieltjesOdd μ n) * monicMomentPolynomial (fun k => μ (k + 1)) n) + (hzero : ∀ p : ℝ[X], momentPairing (fun k => μ (k + 1)) p + (monicMomentPolynomial (fun k => μ (k + 1)) (n + 1)) = 0) + (hA : momentNormSq μ (n + 1) ≠ 0) + (hB : momentNormSq (fun k => μ (k + 1)) n ≠ 0) : + momentOrthogonalSeries μ (n + 1) = + momentOrthogonalSeries (fun k => μ (k + 1)) n := by + ext k + have h := congrArg (momentPairing (fun j => μ (j + 1)) (X ^ (n + k))) hpoly + rw [momentPairing_add_right, momentPairing_C_mul_right, hzero, zero_add, + momentPairing_shift_X_pow] at h + rw [coeff_momentOrthogonalSeries, coeff_momentOrthogonalSeries, + show n + 1 + k = n + k + 1 by lia, h, momentStieltjesOdd] + field_simp [hA, hB] + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeriesRecurrence.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeriesRecurrence.lean new file mode 100644 index 000000000..ebc901463 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeriesRecurrence.lean @@ -0,0 +1,65 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeries +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffel +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesLocal + +/-! +# Euler–Gauss equations for orthogonal moments + +The paired Christoffel polynomial identities imply the alternating formal +series recurrence, including the initial mass-normalized moment series. +Every coefficient identity follows from finite polynomial moment pairings. +-/ + +public section + +namespace Polynomial + +/-- The first normalized moment series starts the Euler–Gauss recurrence. -/ +theorem momentOrthogonalSeries_zero_sub_one (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) : + momentOrthogonalSeries μ 0 - 1 = + PowerSeries.C (momentStieltjesEven μ 0) * PowerSeries.X * + momentOrthogonalSeries (fun k => μ (k + 1)) 0 := by + apply momentOrthogonalSeries_zero_sub_one_of_ne_zero + · simpa only [momentNormSq_zero] using (momentNormSq_pos μ 0 (hpos 1)).ne' + · simpa only [momentNormSq_zero, Nat.zero_add] using + (momentNormSq_pos (fun k => μ (k + 1)) 0 (hshift 1)).ne' + +/-- The first Christoffel identity gives the odd Euler–Gauss step. -/ +theorem momentOrthogonalSeries_shift_sub (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) (n : ℕ) : + momentOrthogonalSeries (fun k => μ (k + 1)) n - momentOrthogonalSeries μ n = + PowerSeries.C (momentStieltjesOdd μ n) * PowerSeries.X * + momentOrthogonalSeries μ (n + 1) := by + exact momentOrthogonalSeries_shift_sub_of_identity μ n + (X_mul_monicMomentPolynomial_shift μ hpos hshift n) + (isUnit_iff_ne_zero.mpr (hpos (n + 1)).det_pos.ne') + (momentNormSq_pos μ n (hpos (n + 1))).ne' + (momentNormSq_pos (fun k => μ (k + 1)) n (hshift (n + 1))).ne' + (momentNormSq_pos μ (n + 1) (hpos (n + 2))).ne' + +/-- The second Christoffel identity gives the next even Euler–Gauss step. -/ +theorem momentOrthogonalSeries_succ_sub_shift (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) (n : ℕ) : + momentOrthogonalSeries μ (n + 1) - + momentOrthogonalSeries (fun k => μ (k + 1)) n = + PowerSeries.C (momentStieltjesEven μ (n + 1)) * PowerSeries.X * + momentOrthogonalSeries (fun k => μ (k + 1)) (n + 1) := by + exact momentOrthogonalSeries_succ_sub_of_identity μ n + (monicMomentPolynomial_eq_shift_add μ hpos hshift n) + (isUnit_iff_ne_zero.mpr (hshift (n + 1)).det_pos.ne') + (momentNormSq_pos μ (n + 1) (hpos (n + 2))).ne' + (momentNormSq_pos (fun k => μ (k + 1)) n (hshift (n + 1))).ne' + (momentNormSq_pos (fun k => μ (k + 1)) (n + 1) (hshift (n + 2))).ne' + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentShift.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentShift.lean new file mode 100644 index 000000000..51f79fdcb --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentShift.lean @@ -0,0 +1,40 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Moment +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra + +/-! +# Multiplication and shifted polynomial moments +-/ + +public section + +namespace Polynomial + +variable {R : Type*} [CommRing R] + +/-- Shifting a moment sequence by one corresponds to multiplying the polynomial by `X`. -/ +theorem momentFunctional_shift (μ : ℕ → R) (p : R[X]) : + momentFunctional (fun k => μ (k + 1)) p = momentFunctional μ (X * p) := by + induction p using Polynomial.induction_on' with + | add p q hp hq => simp only [mul_add, momentFunctional_add, hp, hq] + | monomial n a => simp only [X_mul_monomial, momentFunctional_monomial] + +/-- A shifted pairing inserts one factor of `X` on its right input. -/ +theorem momentPairing_shift (μ : ℕ → R) (p q : R[X]) : + momentPairing (fun k => μ (k + 1)) p q = momentPairing μ p (X * q) := by + rw [momentPairing, momentFunctional_shift] + simp only [momentPairing, mul_left_comm] + +/-- A shifted monomial pairing increases the monomial exponent by one. -/ +theorem momentPairing_shift_X_pow (μ : ℕ → R) (i : ℕ) (q : R[X]) : + momentPairing (fun k => μ (k + 1)) (X ^ i) q = + momentPairing μ (X ^ (i + 1)) q := by + rw [momentPairing_shift, ← momentPairing_X_mul_left, ← pow_succ'] + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentTranslation.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentTranslation.lean new file mode 100644 index 000000000..2d527d88d --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentTranslation.lean @@ -0,0 +1,125 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslation +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import Mathlib.LinearAlgebra.Matrix.Block + +/-! +# Translation of Hankel matrices and monic orthogonal polynomials + +The coefficient matrix of translated monomials is lower triangular with +diagonal one. Its Gram identity preserves every finite Hankel determinant. +For a nondegenerate moment system, the monic orthogonal polynomial therefore +translates with the opposite sign. Degree zero is included. +-/ + +public section + +open Matrix + +namespace Polynomial + +variable {R : Type*} [CommRing R] [Nontrivial R] + +/-- Rows of coefficients of the translated monomial basis below degree `n`. -/ +@[expose] noncomputable def momentTranslationMatrix (c : R) (n : ℕ) : + Matrix (Fin n) (Fin n) R := + fun i j => (taylor c (X ^ i.val)).coeff j.val + +/-- Translation of a monomial preserves its leading coefficient. -/ +@[simp] theorem momentTranslationMatrix_diag (c : R) (n : ℕ) (i : Fin n) : + momentTranslationMatrix c n i i = 1 := by + change (taylor c ((X : R[X]) ^ i.val)).coeff i.val = 1 + simpa using coeff_taylor_natDegree c ((X : R[X]) ^ i.val) + +/-- The translated monomial coefficient matrix is lower triangular. -/ +theorem isLowerTriangular_momentTranslationMatrix (c : R) (n : ℕ) : + (momentTranslationMatrix c n).IsLowerTriangular := by + intro i j hij + apply coeff_eq_zero_of_natDegree_lt + rw [natDegree_taylor, natDegree_X_pow] + exact hij + +/-- Translation is a change of basis with determinant one. -/ +@[simp] theorem det_momentTranslationMatrix (c : R) (n : ℕ) : + (momentTranslationMatrix c n).det = 1 := by + rw [Matrix.det_of_isLowerTriangular _ (isLowerTriangular_momentTranslationMatrix c n)] + simp + +/-- A coefficient row recovers the corresponding translated monomial. -/ +private theorem ofFn_momentTranslationMatrix_row [DecidableEq R] + (c : R) (n : ℕ) (i : Fin n) : + ofFn n (momentTranslationMatrix c n i) = taylor c (X ^ i.val) := by + change ofFn n (toFn n (taylor c ((X : R[X]) ^ i.val))) = _ + apply ofFn_comp_toFn_eq_id_of_natDegree_lt + simpa only [natDegree_taylor, natDegree_X_pow] using i.is_lt + +/-- The Hankel matrix of translated moments is the corresponding Gram congruence. -/ +theorem momentTranslationMatrix_mul_hankel_mul_transpose + (c : R) (m : ℕ → R) (n : ℕ) : + momentTranslationMatrix c n * momentHankelMatrix m n * + (momentTranslationMatrix c n)ᵀ = + momentHankelMatrix (momentTranslate c m) n := by + classical + ext i j + have hpair : + (momentTranslationMatrix c n * momentHankelMatrix m n * + (momentTranslationMatrix c n)ᵀ) i j = + momentPairing m (taylor c (X ^ i.val)) (taylor c (X ^ j.val)) := by + rw [← ofFn_momentTranslationMatrix_row c n i, + ← ofFn_momentTranslationMatrix_row c n j, momentPairing_ofFn_ofFn, + Matrix.dotProduct_mulVec] + rfl + rw [hpair, ← momentPairing_momentTranslate] + change momentFunctional (momentTranslate c m) (X ^ i.val * X ^ j.val) = _ + rw [← pow_add, momentFunctional_X_pow] + rfl + +/-- Every finite Hankel determinant is invariant under moment translation. -/ +@[simp] theorem det_momentHankelMatrix_momentTranslate (c : R) (m : ℕ → R) (n : ℕ) : + (momentHankelMatrix (momentTranslate c m) n).det = + (momentHankelMatrix m n).det := by + have h := congrArg Matrix.det + (momentTranslationMatrix_mul_hankel_mul_transpose c m n) + simpa only [Matrix.det_mul, Matrix.det_transpose, det_momentTranslationMatrix, + one_mul, mul_one] using h.symm + +variable [DecidableEq R] + +/-- For a nondegenerate moment system, the monic orthogonal polynomial +translates by the negative of the moment translation parameter. -/ +theorem monicMomentPolynomial_momentTranslate (c : R) (m : ℕ → R) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix m n).det) : + monicMomentPolynomial (momentTranslate c m) n = + taylor (-c) (monicMomentPolynomial m n) := by + have hdet' : IsUnit (momentHankelMatrix (momentTranslate c m) n).det := by + simpa only [det_momentHankelMatrix_momentTranslate] using hdet + have hp := isMonicOfDegree_monicMomentPolynomial m n + symm + apply eq_monicMomentPolynomial (momentTranslate c m) hdet' + · refine ⟨?_, ?_⟩ + · simpa only [natDegree_taylor] using hp.natDegree_eq + · simpa only [Monic, leadingCoeff_taylor] using hp.monic + · intro i + rw [momentPairing_momentTranslate, taylor_taylor, add_neg_cancel, taylor_zero] + apply momentPairing_monicMomentPolynomial m n hdet + rw [degree_taylor, degree_X_pow] + exact WithBot.coe_lt_coe.mpr i.is_lt + +/-- The squared norm of the monic orthogonal polynomial is unchanged by translation. -/ +theorem momentPairing_monicMomentPolynomial_momentTranslate + (c : R) (m : ℕ → R) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix m n).det) : + momentPairing (momentTranslate c m) + (monicMomentPolynomial (momentTranslate c m) n) + (monicMomentPolynomial (momentTranslate c m) n) = + momentPairing m (monicMomentPolynomial m n) (monicMomentPolynomial m n) := by + rw [monicMomentPolynomial_momentTranslate c m n hdet, momentPairing_momentTranslate] + simp only [taylor_taylor, add_neg_cancel, taylor_zero] + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Perturbation.lean b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Perturbation.lean new file mode 100644 index 000000000..5c1ee32a2 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Perturbation.lean @@ -0,0 +1,152 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Topology.MetricSpace.Pseudo.Defs + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +import RealRooted.Mathlib.LinearAlgebra.Matrix.LinearSystemPerturbation +import RealRooted.Mathlib.LinearAlgebra.Matrix.PerturbationLimits +import Mathlib.Topology.Instances.Real.Lemmas +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity + +/-! +# Perturbing finitely many moments + + +Convergence of the first `2n` moments to a nondegenerate reference system gives +coefficient convergence and an eventual linear bound in the moment discrepancy. +-/ + +public section + +open Filter Topology Matrix + +noncomputable section + +namespace Polynomial + +/-- A bound on inverse entries turns a finite moment discrepancy into a bound on +each lower coefficient of the monic orthogonal polynomial. -/ +theorem abs_coeff_sub_monicMomentPolynomial_le {μ ν : ℕ → ℝ} {n : ℕ} + (hμ : IsUnit (momentHankelMatrix μ n).det) + (hν : IsUnit (momentHankelMatrix ν n).det) + {M δ : ℝ} (hM : 0 ≤ M) + (hinv : ∀ i j : Fin n, |(momentHankelMatrix ν n)⁻¹ i j| ≤ M) + (hδ : ∀ k < 2 * n, |ν k - μ k| ≤ δ) (i : Fin n) : + |(monicMomentPolynomial ν n).coeff i.val - + (monicMomentPolynomial μ n).coeff i.val| ≤ + (n : ℝ) * M * (1 + ∑ j : Fin n, |momentOrthogonalCoefficients μ n j|) * δ := by + rw [coeff_monicMomentPolynomial, coeff_monicMomentPolynomial] + have hA : ∀ j k : Fin n, + |momentHankelMatrix ν n j k - momentHankelMatrix μ n j k| ≤ δ := by + intro j k + apply hδ + have hj := j.is_lt + have hk := k.is_lt + lia + have hb : ∀ j : Fin n, |-ν (n + j.val) - -μ (n + j.val)| ≤ δ := by + intro j + have hj := j.is_lt + simpa only [neg_sub_neg, abs_sub_comm] using hδ (n + j.val) (by lia) + simpa only [Fintype.card_fin] using Matrix.abs_sub_le_of_mulVec_eq hν + (momentHankelMatrix_mulVec_coefficients μ n hμ) + (momentHankelMatrix_mulVec_coefficients ν n hν) hM hinv hA hb i + +section Limits + +variable {ι : Type*} {l : Filter ι} {μ : ι → ℕ → ℝ} {μ₀ : ℕ → ℝ} {n : ℕ} + +/-- Only the finite prefix of moments appearing in the Gram matrix is needed +for convergence of that matrix. -/ +private theorem tendsto_momentHankelMatrix + (hμ : ∀ k < 2 * n, Tendsto (fun t => μ t k) l (𝓝 (μ₀ k))) : + Tendsto (fun t => momentHankelMatrix (μ t) n) l + (𝓝 (momentHankelMatrix μ₀ n)) := by + apply tendsto_pi_nhds.mpr + intro i + apply tendsto_pi_nhds.mpr + intro j + apply hμ + have hi := i.is_lt + have hj := j.is_lt + lia + +/-- The lower orthogonal coefficient vector varies continuously with the first +`2n` moments at every nondegenerate reference system. -/ +theorem tendsto_momentOrthogonalCoefficients + (hμ : ∀ k < 2 * n, Tendsto (fun t => μ t k) l (𝓝 (μ₀ k))) + (hdet : IsUnit (momentHankelMatrix μ₀ n).det) : + Tendsto (fun t => momentOrthogonalCoefficients (μ t) n) l + (𝓝 (momentOrthogonalCoefficients μ₀ n)) := by + have hinv := Matrix.tendsto_nonsing_inv_of_isUnit_det (tendsto_momentHankelMatrix hμ) hdet + have hb : Tendsto (fun t => fun i : Fin n => -μ t (n + i.val)) l + (𝓝 (fun i : Fin n => -μ₀ (n + i.val))) := by + apply tendsto_pi_nhds.mpr + intro i + apply Tendsto.neg + apply hμ + have hi := i.is_lt + lia + have hmul : Continuous (fun p : Matrix (Fin n) (Fin n) ℝ × (Fin n → ℝ) => + p.1 *ᵥ p.2) := continuous_fst.matrix_mulVec continuous_snd + exact (hmul.tendsto _).comp (hinv.prodMk_nhds hb) + +/-- Every polynomial coefficient converges when the finite moment system +converges to a nondegenerate reference system. -/ +theorem tendsto_coeff_monicMomentPolynomial + (hμ : ∀ k < 2 * n, Tendsto (fun t => μ t k) l (𝓝 (μ₀ k))) + (hdet : IsUnit (momentHankelMatrix μ₀ n).det) (k : ℕ) : + Tendsto (fun t => (monicMomentPolynomial (μ t) n).coeff k) l + (𝓝 ((monicMomentPolynomial μ₀ n).coeff k)) := by + by_cases hk : k < n + · have hc (ν : ℕ → ℝ) : (monicMomentPolynomial ν n).coeff k = + momentOrthogonalCoefficients ν n ⟨k, hk⟩ := coeff_monicMomentPolynomial ν ⟨k, hk⟩ + simp_rw [hc] + exact tendsto_pi_nhds.mp (tendsto_momentOrthogonalCoefficients hμ hdet) ⟨k, hk⟩ + · have hnk : n ≤ k := Nat.le_of_not_gt hk + simp only [monicMomentPolynomial, coeff_add, ofFn_coeff_eq_zero_of_ge _ hnk, + add_zero] + exact tendsto_const_nhds + +/-- Near a nondegenerate finite moment limit, all Gram matrices are invertible +and their inverse entries admit one uniform bound. -/ +theorem eventually_isUnit_momentHankelMatrix_det_and_inv_bound + (hμ : ∀ k < 2 * n, Tendsto (fun t => μ t k) l (𝓝 (μ₀ k))) + (hdet : IsUnit (momentHankelMatrix μ₀ n).det) : + ∃ M > 0, ∀ᶠ t in l, IsUnit (momentHankelMatrix (μ t) n).det ∧ + ∀ i j : Fin n, |(momentHankelMatrix (μ t) n)⁻¹ i j| ≤ M := by + exact Matrix.eventually_isUnit_det_and_inv_bound (tendsto_momentHankelMatrix hμ) hdet + +/-- Near a nondegenerate finite moment limit, lower coefficient error is bounded +linearly by any nonnegative bound on the finite moment error. -/ +theorem eventually_abs_coeff_sub_monicMomentPolynomial_le + (hμ : ∀ k < 2 * n, Tendsto (fun t => μ t k) l (𝓝 (μ₀ k))) + (hdet : IsUnit (momentHankelMatrix μ₀ n).det) : + ∃ C > 0, ∀ᶠ t in l, IsUnit (momentHankelMatrix (μ t) n).det ∧ + ∀ δ : ℝ, 0 ≤ δ → (∀ k < 2 * n, |μ t k - μ₀ k| ≤ δ) → + ∀ i : Fin n, + |(monicMomentPolynomial (μ t) n).coeff i.val - + (monicMomentPolynomial μ₀ n).coeff i.val| ≤ C * δ := by + obtain ⟨M, hM, hbound⟩ := + eventually_isUnit_momentHankelMatrix_det_and_inv_bound hμ hdet + let C : ℝ := (n : ℝ) * M * + (1 + ∑ j : Fin n, |momentOrthogonalCoefficients μ₀ n j|) + 1 + have hC : 0 < C := by dsimp [C]; positivity + refine ⟨C, hC, ?_⟩ + filter_upwards [hbound] with t ht + refine ⟨ht.1, ?_⟩ + intro δ hδ herror i + have h := abs_coeff_sub_monicMomentPolynomial_le hdet ht.1 hM.le ht.2 herror i + apply h.trans + apply mul_le_mul_of_nonneg_right _ hδ + dsimp only [C] + linarith + +end Limits + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/PowerRootsProduct.lean b/RealRooted/Mathlib/Algebra/Polynomial/PowerRootsProduct.lean new file mode 100644 index 000000000..1894334a4 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/PowerRootsProduct.lean @@ -0,0 +1,56 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.FieldTheory.IsAlgClosed.Basic +import Mathlib.Algebra.Polynomial.Splits +import Mathlib.Algebra.Polynomial.Degree.Operations +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# Homogeneous products over roots of `X^n + 1` + +Roots are counted with multiplicity. The product identity includes a zero +scaling parameter, so it needs no division by the evaluation argument. +-/ + +public section + +open Polynomial + +namespace Polynomial + +/-- Homogenizing the monic factorization of `X^n + 1` gives `u^n + t^n`. +This holds over any algebraically closed field, including multiple roots. -/ +theorem prod_roots_X_pow_add_one_sub_mul {K : Type*} [Field K] [IsAlgClosed K] + {n : ℕ} (hn : n ≠ 0) (u t : K) : + (((X ^ n + 1 : K[X]).roots).map fun r ↦ u - r * t).prod = u ^ n + t ^ n := by + let p : K[X] := X ^ n + 1 + have hm : p.Monic := by simpa only [p, C_1] using monic_X_pow_add_C (1 : K) hn + have hc : p.roots.card = n := by + rw [← (IsAlgClosed.splits p).natDegree_eq_card_roots] + simpa only [p, C_1] using (natDegree_X_pow_add_C (n := n) (r := (1 : K))) + have heval (w : K) : (p.roots.map fun r ↦ w - r).prod = w ^ n + 1 := by + rw [← (IsAlgClosed.splits p).eval_eq_prod_roots_of_monic hm] + simp only [p, eval_add, eval_pow, eval_X, eval_one] + change (p.roots.map fun r ↦ u - r * t).prod = u ^ n + t ^ n + by_cases ht : t = 0 + · simp only [ht, mul_zero, sub_zero, Multiset.map_const', Multiset.prod_replicate, + hc, zero_pow hn, add_zero] + · calc + _ = (p.roots.map fun r ↦ t * (u / t - r)).prod := by + congr 1 + apply Multiset.map_congr rfl + intro r _ + field_simp [ht] + _ = t ^ n * ((u / t) ^ n + 1) := by + rw [Multiset.prod_map_mul, Multiset.map_const', Multiset.prod_replicate, hc, heval] + _ = u ^ n + t ^ n := by + rw [div_pow] + field_simp [ht] + +end Polynomial diff --git a/RealRooted/Mathlib/Algebra/Polynomial/TaylorEvaluation.lean b/RealRooted/Mathlib/Algebra/Polynomial/TaylorEvaluation.lean new file mode 100644 index 000000000..c6d9a88e1 --- /dev/null +++ b/RealRooted/Mathlib/Algebra/Polynomial/TaylorEvaluation.lean @@ -0,0 +1,40 @@ +/- +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.Algebra.Polynomial.Eval.SMul +import Mathlib.Algebra.Polynomial.Taylor +public import Mathlib.Algebra.Polynomial.HasseDeriv +import Mathlib.Tactic.TypeStar + +/-! +# Finite Taylor evaluation in Hasse and ordinary derivatives +-/ + +public section + +namespace Polynomial + +/-- Taylor evaluation as a finite sum of Hasse derivative values. -/ +theorem eval_add_eq_sum_hasseDeriv {R : Type*} [CommSemiring R] + (p : R[X]) (x y : R) : + p.eval (x + y) = ∑ k ∈ Finset.range (p.natDegree + 1), + (hasseDeriv k p).eval x * y ^ k := by + rw [add_comm x y, ← taylor_eval x p y, eval_eq_sum_range] + simp only [natDegree_taylor, taylor_coeff] + +/-- Over a characteristic-zero field, a Hasse derivative value is the ordinary +iterated derivative value divided by the corresponding factorial. -/ +theorem eval_hasseDeriv_eq_div_factorial {K : Type*} [Field K] [CharZero K] + (p : K[X]) (x : K) (k : ℕ) : + (hasseDeriv k p).eval x = (derivative^[k] p).eval x / k.factorial := by + have hpoly : derivative^[k] p = k.factorial • hasseDeriv k p := by + rw [← factorial_smul_hasseDeriv] + rfl + rw [hpoly, eval_smul, nsmul_eq_mul] + exact (mul_div_cancel_left₀ _ (Nat.cast_ne_zero.mpr k.factorial_ne_zero)).symm + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Analytic/CountableZeros.lean b/RealRooted/Mathlib/Analysis/Analytic/CountableZeros.lean new file mode 100644 index 000000000..44cef3dd1 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Analytic/CountableZeros.lean @@ -0,0 +1,45 @@ +/- +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.Analytic.Basic +public import Mathlib.Analysis.Calculus.FDeriv.Defs +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Countability of analytic zero sets + +The isolated-zero principle and the Lindelöf property show that the zeros of a +nonzero analytic function on a preconnected set are countable. +-/ + +public section + +open Set + +/-- The zeros of a function analytic on a preconnected set are countable unless +the function vanishes throughout that set. -/ +theorem AnalyticOnNhd.countable_zeroSet {𝕜 E : Type*} [NontriviallyNormedField 𝕜] + [HereditarilyLindelofSpace 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 E] + {f : 𝕜 → E} {U : Set 𝕜} (hf : AnalyticOnNhd 𝕜 f U) (hU : IsPreconnected U) + (hne : ¬ EqOn f 0 U) : {z ∈ U | f z = 0}.Countable := by + have hz := (hf.eqOn_zero_or_eventually_ne_zero_of_preconnected hU).resolve_left hne + have hd : IsDiscrete ({z | f z = 0} ∩ U) := isDiscrete_of_codiscreteWithin hz + have hc := (HereditarilyLindelofSpace.isLindelof _).countable_of_isDiscrete hd + simpa only [inter_def, mem_ofPred_eq, and_comm] using hc + +/-- A nonzero entire complex function has a countable zero set. -/ +theorem Differentiable.countable_zeroSet {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hne : f ≠ 0) : {z | f z = 0}.Countable := by + have ha : AnalyticOnNhd ℂ f univ := fun z _ => hf.analyticAt z + have hn : ¬ EqOn f 0 univ := fun h => hne (funext fun z => h (mem_univ z)) + simpa only [mem_univ, true_and] using ha.countable_zeroSet isPreconnected_univ hn + +/-- The real zeros of a nonzero entire complex function form a countable set. -/ +theorem Differentiable.countable_real_zeroSet {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hne : f ≠ 0) : {x : ℝ | f x = 0}.Countable := + (hf.countable_zeroSet hne).preimage Complex.ofReal_injective diff --git a/RealRooted/Mathlib/Analysis/Analytic/TaylorInverse.lean b/RealRooted/Mathlib/Analysis/Analytic/TaylorInverse.lean new file mode 100644 index 000000000..3c9712898 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Analytic/TaylorInverse.lean @@ -0,0 +1,53 @@ +/- +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 TauCeti.Analysis.Analytic.TaylorSeries +import Mathlib.RingTheory.PowerSeries.Inverse +public import Mathlib.RingTheory.MvPowerSeries.Inverse +import Mathlib.Tactic.TypeStar + +/-! +# Taylor inverses descend along coefficient maps +-/ + +public section + +open Filter Topology + +/-- If one analytic germ has a Taylor series over a coefficient field and its +product with another germ is one, the reciprocal Taylor series is the mapped +formal inverse. The reciprocal's coefficient-field property is a conclusion, +not an additional reality hypothesis. -/ +theorem AnalyticAt.taylorSeries_eq_map_inv_of_mul_eq_one + {R 𝕜 : Type*} [Field R] [NontriviallyNormedField 𝕜] + {f g : 𝕜 → 𝕜} {z : 𝕜} (hf : AnalyticAt 𝕜 f z) (hg : AnalyticAt 𝕜 g z) + (i : R →+* 𝕜) (A : PowerSeries R) + (hA : TauCeti.taylorSeries g z = PowerSeries.map i A) + (hfg : (fun w => f w * g w) =ᶠ[𝓝 z] fun _ => 1) : + PowerSeries.constantCoeff A ≠ 0 ∧ + TauCeti.taylorSeries f z = PowerSeries.map i A⁻¹ := by + have hmul : TauCeti.taylorSeries f z * PowerSeries.map i A = 1 := by + rw [← hA, ← TauCeti.taylorSeries_mul hf hg] + have hfg' : f * g =ᶠ[𝓝 z] fun _ => 1 := hfg + simpa only [TauCeti.taylorSeries_const, map_one] using TauCeti.taylorSeries_congr hfg' + have hconst : PowerSeries.constantCoeff (PowerSeries.map i A) = + i (PowerSeries.constantCoeff A) := by + rw [← PowerSeries.coeff_zero_eq_constantCoeff_apply, PowerSeries.coeff_map, + PowerSeries.coeff_zero_eq_constantCoeff_apply] + have hA0 : PowerSeries.constantCoeff A ≠ 0 := by + intro hzero + have h := congrArg PowerSeries.constantCoeff hmul + simp only [map_mul, map_one, hconst, hzero, map_zero, mul_zero] at h + exact zero_ne_one h + have hne : PowerSeries.map i A ≠ 0 := by + intro hzero + rw [hzero, mul_zero] at hmul + exact zero_ne_one hmul + have hinv : PowerSeries.map i A⁻¹ * PowerSeries.map i A = 1 := by + simpa only [map_mul, map_one] using + congrArg (PowerSeries.map i) (PowerSeries.inv_mul_cancel A hA0) + exact ⟨hA0, mul_right_cancel₀ hne (hmul.trans hinv.symm)⟩ diff --git a/RealRooted/Mathlib/Analysis/Analytic/TaylorSeries.lean b/RealRooted/Mathlib/Analysis/Analytic/TaylorSeries.lean new file mode 100644 index 000000000..ec9a5ad48 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Analytic/TaylorSeries.lean @@ -0,0 +1,133 @@ +/- +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 TauCeti.Analysis.Analytic.TaylorSeries +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.RingTheory.PowerSeries.Log +import RealRooted.Mathlib.RingTheory.PowerSeries.LogarithmMul + +/-! +# Taylor series and logarithmic derivatives + +The one-variable Taylor series from Tau Ceti has coefficients given by normalized +iterated derivatives. It commutes with differentiation and sends an analytic +logarithmic derivative to the derivative of the normalized formal logarithm. +The function needs to be analytic only at the chosen point, where it is nonzero. +-/ + +public section + +open Filter Topology + +variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [CompleteSpace 𝕜] [CharZero 𝕜] + {f : 𝕜 → 𝕜} {a : 𝕜} + +/-- Taylor coefficients of an analytic function are normalized derivatives. -/ +theorem AnalyticAt.coeff_taylorSeries_eq_iteratedDeriv (hf : AnalyticAt 𝕜 f a) (n : ℕ) : + PowerSeries.coeff n (TauCeti.taylorSeries f a) = iteratedDeriv n f a / n.factorial := by + rw [hf.hasFPowerSeriesAt.coeff_taylorSeries] + exact FormalMultilinearSeries.coeff_ofScalars + +/-- Taylor series commute with differentiation at analytic points. -/ +theorem AnalyticAt.taylorSeries_deriv (hf : AnalyticAt 𝕜 f a) : + TauCeti.taylorSeries (deriv f) a = PowerSeries.derivative (TauCeti.taylorSeries f a) := by + ext n + rw [hf.deriv.coeff_taylorSeries_eq_iteratedDeriv, + PowerSeries.coeff_derivative, hf.coeff_taylorSeries_eq_iteratedDeriv, + ← iteratedDeriv_succ', Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one] + have hfac : (n.factorial : 𝕜) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + have hn : (n + 1 : 𝕜) ≠ 0 := Nat.cast_add_one_ne_zero n + field_simp + +/-- The analytic logarithmic derivative satisfies the formal product identity. -/ +theorem AnalyticAt.taylorSeries_mul_logDeriv (hf : AnalyticAt 𝕜 f a) (h0 : f a ≠ 0) : + TauCeti.taylorSeries f a * TauCeti.taylorSeries (logDeriv f) a = + PowerSeries.derivative (TauCeti.taylorSeries f a) := by + have hg : AnalyticAt 𝕜 (logDeriv f) a := hf.deriv.div hf h0 + have heq : f * logDeriv f =ᶠ[𝓝 a] deriv f := by + filter_upwards [hf.continuousAt.eventually_ne h0] with z hz + simp only [Pi.mul_apply, logDeriv_apply] + exact mul_div_cancel₀ _ hz + have h := TauCeti.taylorSeries_congr heq + rwa [TauCeti.taylorSeries_mul hf hg, hf.taylorSeries_deriv] at h + +/-- At a normalized analytic point, the derivative of the formal logarithm +is the Taylor series of the analytic logarithmic derivative. -/ +theorem AnalyticAt.derivative_logOf_taylorSeries [Algebra ℚ 𝕜] + (hf : AnalyticAt 𝕜 f a) (h0 : f a = 1) : + PowerSeries.derivative (PowerSeries.logOf (TauCeti.taylorSeries f a)) = + TauCeti.taylorSeries (logDeriv f) a := by + have hc : PowerSeries.constantCoeff (TauCeti.taylorSeries f a) = 1 := by + rw [← PowerSeries.coeff_zero_eq_constantCoeff_apply, + hf.coeff_taylorSeries_eq_iteratedDeriv] + simp [h0] + apply (PowerSeries.isUnit_iff_constantCoeff.mpr (show + IsUnit (PowerSeries.constantCoeff (TauCeti.taylorSeries f a)) by + rw [hc] + exact isUnit_one)).mul_left_cancel + rw [PowerSeries.mul_derivative_logOf _ hc] + exact (hf.taylorSeries_mul_logDeriv (by simp [h0])).symm + +/-- Normalizing an analytic function by its nonzero constant value does not +change its logarithmic derivative series. -/ +theorem AnalyticAt.derivative_logOf_normalized_taylorSeries [Algebra ℚ 𝕜] + (hf : AnalyticAt 𝕜 f a) (h0 : f a ≠ 0) : + PowerSeries.derivative (PowerSeries.logOf + (PowerSeries.C (f a)⁻¹ * TauCeti.taylorSeries f a)) = + TauCeti.taylorSeries (logDeriv f) a := by + have hg : AnalyticAt 𝕜 (fun z => (f a)⁻¹ * f z) a := analyticAt_const.mul hf + have h := hg.derivative_logOf_taylorSeries (by simp [h0]) + have heq : (fun z => (f a)⁻¹ * f z) = (fun _ => (f a)⁻¹) * f := rfl + rw [heq, TauCeti.taylorSeries_mul analyticAt_const hf, TauCeti.taylorSeries_const] at h + have hlog : logDeriv ((fun _ => (f a)⁻¹) * f) = logDeriv f := by + funext z + exact logDeriv_const_mul (f := f) z _ (inv_ne_zero h0) + rwa [hlog] at h + +/-- Taylor coefficients of an analytic logarithmic derivative equal the +coefficients obtained by differentiating the normalized formal logarithm. -/ +theorem AnalyticAt.iteratedDeriv_logDeriv_eq_coeff_logOf [Algebra ℚ 𝕜] + (hf : AnalyticAt 𝕜 f a) (h0 : f a ≠ 0) (n : ℕ) : + iteratedDeriv n (logDeriv f) a / n.factorial = + PowerSeries.coeff (n + 1) (PowerSeries.logOf + (PowerSeries.C (f a)⁻¹ * TauCeti.taylorSeries f a)) * (n + 1) := by + have hg : AnalyticAt 𝕜 (logDeriv f) a := hf.deriv.div hf h0 + have h := congrArg (PowerSeries.coeff n) (hf.derivative_logOf_normalized_taylorSeries h0) + rw [PowerSeries.coeff_derivative, hg.coeff_taylorSeries_eq_iteratedDeriv] at h + exact h.symm + +/-- For real Taylor data, the real analytic logarithmic derivative coefficients +are the coefficients of the normalized real formal logarithm's derivative. -/ +theorem AnalyticAt.re_iteratedDeriv_logDeriv_eq_coeff_logOf + {f : ℂ → ℂ} (hf : AnalyticAt ℂ f 0) (h0 : f 0 ≠ 0) + (hreal : ∀ k, Complex.ofReal (iteratedDeriv k f 0).re = iteratedDeriv k f 0) (n : ℕ) : + (iteratedDeriv n (logDeriv f) 0).re / n.factorial = + PowerSeries.coeff (n + 1) (PowerSeries.logOf (PowerSeries.mk + (fun k => (iteratedDeriv k f 0).re / (k.factorial * (f 0).re)))) * (n + 1) := by + have hreal0 : Complex.ofReal (f 0).re = f 0 := by simpa using hreal 0 + have h0re : (f 0).re ≠ 0 := by + intro hz + exact h0 (by rw [← hreal0, hz, Complex.ofReal_zero]) + let d : ℕ → ℝ := fun k => (iteratedDeriv k f 0).re / (k.factorial * (f 0).re) + have hd : PowerSeries.constantCoeff (PowerSeries.mk d) = 1 := by simp [d, h0re] + have hmap : PowerSeries.map Complex.ofRealHom (PowerSeries.mk d) = + PowerSeries.C (f 0)⁻¹ * TauCeti.taylorSeries f 0 := by + ext k + rw [PowerSeries.coeff_map, PowerSeries.coeff_mk, PowerSeries.coeff_C_mul, + hf.coeff_taylorSeries_eq_iteratedDeriv] + simp only [Complex.ofRealHom_eq_coe, d, Complex.ofReal_div, Complex.ofReal_mul, + Complex.ofReal_natCast, hreal, hreal0] + ring + have h := hf.iteratedDeriv_logDeriv_eq_coeff_logOf h0 n + rw [← hmap, ← PowerSeries.map_logOf Complex.ofRealHom _ hd, PowerSeries.coeff_map] at h + have hre := congrArg Complex.re h + simpa only [Complex.div_natCast_re, Complex.ofRealHom_eq_coe, Complex.mul_re, + Complex.ofReal_re, Complex.ofReal_im, Complex.add_re, Complex.natCast_re, + Complex.one_re, Complex.add_im, Complex.natCast_im, Complex.one_im, add_zero, + mul_zero, sub_zero] using hre diff --git a/RealRooted/Mathlib/Analysis/Asymptotics/IncrementBounds.lean b/RealRooted/Mathlib/Analysis/Asymptotics/IncrementBounds.lean new file mode 100644 index 000000000..94348b6f1 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Asymptotics/IncrementBounds.lean @@ -0,0 +1,150 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import Mathlib.Analysis.Real.Sqrt +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Topology.UniformSpace.UniformConvergence +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.Topology.MetricSpace.Pseudo.Basic + +/-! +# Normalized increments from square-root logarithmic error bounds + +A bound for `f x - x` gives a uniform bound for normalized increments of `f` +on `[X, X + H]`. For `H = sqrt X * log X ^ 3`, a square-root logarithmic-square +error becomes `O(1 / log X)`. The admissibility condition `H ≤ X` is eventual. +-/ + +public section + +open Filter Set +open scoped Topology + +namespace Real + +/-- Errors at the two endpoints control a normalized increment. -/ +theorem abs_increment_div_sub_le {f : ℝ → ℝ} {X H u E₀ E₁ : ℝ} + (hH : 0 < H) (h₀ : |f X - X| ≤ E₀) + (h₁ : |f (X + H * u) - (X + H * u)| ≤ E₁) : + |(f (X + H * u) - f X) / H - u| ≤ (E₁ + E₀) / H := by + have heq : (f (X + H * u) - f X) / H - u = + ((f (X + H * u) - (X + H * u)) - (f X - X)) / H := by + field_simp [hH.ne']; ring + rw [heq, abs_div, abs_of_pos hH] + apply div_le_div_of_nonneg_right _ hH.le + have htri : |(f (X + H * u) - (X + H * u)) - (f X - X)| ≤ + |f (X + H * u) - (X + H * u)| + |f X - X| := by + simpa only [sub_eq_add_neg, abs_neg] using + abs_add_le (f (X + H * u) - (X + H * u)) (-(f X - X)) + exact htri.trans (add_le_add h₁ h₀) + +/-- The square-root logarithmic-square weight increases by at most a factor +of eight between `X` and `2 * X`, for `X ≥ 2`. -/ +theorem sqrt_mul_log_sq_le_of_le_two_mul {X Y : ℝ} + (hX : 2 ≤ X) (hXY : X ≤ Y) (hY : Y ≤ 2 * X) : + sqrt Y * log Y ^ 2 ≤ 8 * (sqrt X * log X ^ 2) := by + have hX0 : 0 < X := by linarith + have hY0 : 0 < Y := hX0.trans_le hXY + have hlogY : 0 ≤ log Y := log_nonneg (by linarith) + have hlogs : log Y ≤ 2 * log X := by + calc + log Y ≤ log (2 * X) := log_le_log hY0 hY + _ = log 2 + log X := log_mul (by norm_num) hX0.ne' + _ ≤ 2 * log X := by linarith [log_le_log (by norm_num : (0 : ℝ) < 2) hX] + have hsqrt : sqrt Y ≤ 2 * sqrt X := by + calc + sqrt Y ≤ sqrt (4 * X) := sqrt_le_sqrt (by linarith) + _ = 2 * sqrt X := by + rw [sqrt_mul (by norm_num : (0 : ℝ) ≤ 4)] + congr 1 + exact (sqrt_eq_iff_mul_self_eq (by norm_num) (by norm_num)).mpr (by norm_num) + have hsquare : log Y ^ 2 ≤ (2 * log X) ^ 2 := + pow_le_pow_left₀ hlogY hlogs 2 + calc + sqrt Y * log Y ^ 2 ≤ (2 * sqrt X) * (2 * log X) ^ 2 := + mul_le_mul hsqrt hsquare (sq_nonneg _) (by positivity) + _ = 8 * (sqrt X * log X ^ 2) := by ring + +/-- A square-root logarithmic-square error controls all increments in a window +of length at most `X`, uniformly over the normalized endpoint `u ∈ [0, 1]`. -/ +theorem abs_increment_div_sub_le_of_sqrt_log_sq + {f : ℝ → ℝ} {A K X H u : ℝ} (hK : 0 ≤ K) + (herr : ∀ y : ℝ, A ≤ y → |f y - y| ≤ K * (sqrt y * log y ^ 2)) + (hAX : A ≤ X) (hX : 2 ≤ X) (hH : 0 < H) (hHX : H ≤ X) + (hu : u ∈ Icc (0 : ℝ) 1) : + |(f (X + H * u) - f X) / H - u| ≤ + 9 * K * (sqrt X * log X ^ 2) / H := by + have hXY : X ≤ X + H * u := by nlinarith [hu.1] + have hY : X + H * u ≤ 2 * X := by nlinarith [hu.2] + have hright : |f (X + H * u) - (X + H * u)| ≤ + 8 * K * (sqrt X * log X ^ 2) := by + calc + _ ≤ K * (sqrt (X + H * u) * log (X + H * u) ^ 2) := + herr _ (hAX.trans hXY) + _ ≤ K * (8 * (sqrt X * log X ^ 2)) := + mul_le_mul_of_nonneg_left (sqrt_mul_log_sq_le_of_le_two_mul hX hXY hY) hK + _ = 8 * K * (sqrt X * log X ^ 2) := by ring + calc + _ ≤ (8 * K * (sqrt X * log X ^ 2) + K * (sqrt X * log X ^ 2)) / H := + abs_increment_div_sub_le hH (herr X hAX) hright + _ = 9 * K * (sqrt X * log X ^ 2) / H := by ring + +/-- The interval length `sqrt X * log X ^ 3` is eventually positive and at most `X`. -/ +theorem eventually_sqrt_mul_log_cube_pos_le : + ∀ᶠ X : ℝ in atTop, 0 < sqrt X * log X ^ 3 ∧ sqrt X * log X ^ 3 ≤ X := by + have hlim : Tendsto (fun X : ℝ ↦ log X ^ 3 / sqrt X) atTop (𝓝 0) := by + simpa only [rpow_ofNat, ← sqrt_eq_rpow] using + (isLittleO_log_rpow_rpow_atTop (s := (1 / 2 : ℝ)) 3 (by norm_num)).tendsto_div_nhds_zero + filter_upwards [eventually_gt_atTop (1 : ℝ), hlim.eventually (gt_mem_nhds one_pos)] + with X hX hratio + have hX0 : 0 < X := by linarith + have hsqrt : 0 < sqrt X := sqrt_pos.mpr hX0 + have hlog : 0 < log X := log_pos hX + have hlog_le : log X ^ 3 ≤ sqrt X := (div_le_one hsqrt).mp hratio.le + refine ⟨by positivity, ?_⟩ + calc + sqrt X * log X ^ 3 ≤ sqrt X * sqrt X := + mul_le_mul_of_nonneg_left hlog_le hsqrt.le + _ = X := mul_self_sqrt hX0.le + +/-- With window length `sqrt X * log X ^ 3`, a square-root logarithmic-square +error gives the uniform discrepancy bound `9 * K / log X`. -/ +theorem eventually_increment_div_sqrt_log_cube_le + {f : ℝ → ℝ} {A K : ℝ} (hK : 0 ≤ K) + (herr : ∀ y : ℝ, A ≤ y → |f y - y| ≤ K * (sqrt y * log y ^ 2)) : + ∀ᶠ X : ℝ in atTop, ∀ u ∈ Icc (0 : ℝ) 1, + |(f (X + (sqrt X * log X ^ 3) * u) - f X) / (sqrt X * log X ^ 3) - u| ≤ + 9 * K / log X := by + filter_upwards [eventually_ge_atTop A, eventually_ge_atTop (2 : ℝ), + eventually_sqrt_mul_log_cube_pos_le] with X hAX hX hH u hu + have hX0 : 0 < X := by linarith + have hsqrt : sqrt X ≠ 0 := (sqrt_pos.mpr hX0).ne' + have hlog : log X ≠ 0 := (log_pos (by linarith : 1 < X)).ne' + calc + _ ≤ 9 * K * (sqrt X * log X ^ 2) / (sqrt X * log X ^ 3) := + abs_increment_div_sub_le_of_sqrt_log_sq hK herr hAX hX hH.1 hH.2 hu + _ = 9 * K / log X := by field_simp [hsqrt, hlog] + +/-- The normalized increments converge uniformly to the identity on `[0, 1]` +when the initial error is bounded by a square-root logarithmic-square weight. -/ +theorem tendstoUniformlyOn_increment_div_sqrt_log_cube + {f : ℝ → ℝ} {A K : ℝ} (hK : 0 ≤ K) + (herr : ∀ y : ℝ, A ≤ y → |f y - y| ≤ K * (sqrt y * log y ^ 2)) : + TendstoUniformlyOn + (fun X u : ℝ ↦ + (f (X + (sqrt X * log X ^ 3) * u) - f X) / (sqrt X * log X ^ 3)) + (fun u ↦ u) atTop (Icc (0 : ℝ) 1) := by + have hlim : Tendsto (fun X : ℝ ↦ 9 * K / log X) atTop (𝓝 0) := + tendsto_log_atTop.const_div_atTop _ + rw [Metric.tendstoUniformlyOn_iff] + intro ε hε + filter_upwards [eventually_increment_div_sqrt_log_cube_le hK herr, + hlim.eventually (gt_mem_nhds hε)] with X hbound hsmall u hu + rw [Real.dist_eq, abs_sub_comm] + exact (hbound u hu).trans_lt hsmall + +end Real diff --git a/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/CompPowCoefficient.lean b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/CompPowCoefficient.lean new file mode 100644 index 000000000..0817fdb2a --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/CompPowCoefficient.lean @@ -0,0 +1,36 @@ +/- +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 TauCeti.Analysis.Analytic.OfScalars + +/-! +# All Taylor coefficients after a power substitution + +Substitution of `z ^ m` inserts zero coefficients outside the multiples of `m`. +-/ + +public section + +/-- The complete Taylor coefficient formula for substitution of a positive power, +including the coefficients whose indices are not divisible by that power. -/ +theorem iteratedDeriv_comp_pow_zero_eq {𝕜 : Type*} [NontriviallyNormedField 𝕜] + [CompleteSpace 𝕜] [CharZero 𝕜] {f : 𝕜 → 𝕜} (hf : AnalyticAt 𝕜 f 0) + {m : ℕ} (hm : 0 < m) (n : ℕ) : + iteratedDeriv n (fun z => f (z ^ m)) 0 = + if m ∣ n then (n.factorial : 𝕜) * + (iteratedDeriv (n / m) f 0 / (n / m).factorial) else 0 := by + obtain ⟨r, hr⟩ := hf.hasFPowerSeriesAt + have hc := (hr.mono (lt_min hr.r_pos zero_lt_one) (min_le_left r 1)).comp_pow_ofScalars + (min_le_right r 1) hm + have h := hc.factorial_smul (1 : 𝕜) n + simp only [FormalMultilinearSeries.apply_eq_prod_smul_coeff, Finset.prod_const, + Finset.card_univ, Fintype.card_fin, one_pow, one_smul, + FormalMultilinearSeries.coeff_ofScalars, nsmul_eq_mul] at h + rw [← iteratedDeriv_eq_iteratedFDeriv] at h + rw [← h] + split_ifs <;> simp diff --git a/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/EulerRodrigues.lean b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/EulerRodrigues.lean new file mode 100644 index 000000000..79fb0dcb0 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/EulerRodrigues.lean @@ -0,0 +1,115 @@ +/- +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 +import Mathlib.Analysis.Calculus.Deriv.Inv +import Mathlib.Analysis.Calculus.Deriv.Pow +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.FunProp +import Mathlib.Tactic.Ring + +/-! +# An Euler recurrence for Rodrigues derivatives + +Differentiating a monomial times a function gives an Euler recurrence for +`x⁻ᵐ Dᵏ(xᵐ⁺ᵏ g)`. The pointwise recurrence only needs finite differentiability +near a nonzero point. A smooth positive-half-line specialization is included. +-/ + +public section + +open scoped ContDiff + +/-- Finite smoothness implies differentiability of every lower iterated derivative. -/ +theorem ContDiffAt.differentiableAt_iteratedDeriv {𝕜 F : Type*} + [NontriviallyNormedField 𝕜] [NormedAddCommGroup F] [NormedSpace 𝕜 F] + {f : 𝕜 → F} {n : ℕ∞ω} {k : ℕ} {x : 𝕜} + (hf : ContDiffAt 𝕜 n f x) (hk : (k : ℕ∞ω) < n) : + DifferentiableAt 𝕜 (iteratedDeriv k f) x := by + simpa only [iteratedFDeriv_eq_equiv_comp, + LinearIsometryEquiv.comp_differentiableAt_iff] using + hf.differentiableAt_iteratedFDeriv hk + +/-- Multiplication by the variable has only two terms in the iterated product rule. -/ +theorem iteratedDeriv_succ_id_mul {𝕜 : Type*} [NontriviallyNormedField 𝕜] + {f : 𝕜 → 𝕜} {k : ℕ} {x : 𝕜} (hf : ContDiffAt 𝕜 (k + 1 : ℕ) f x) : + iteratedDeriv (k + 1) (fun y => y * f y) x = + x * iteratedDeriv (k + 1) f x + (k + 1 : 𝕜) * iteratedDeriv k f x := by + rw [iteratedDeriv_fun_mul (by fun_prop) hf] + have hsum := Finset.sum_eq_add_of_mem + (s := Finset.range (k + 1 + 1)) + (f := fun i : ℕ => ((k + 1).choose i : 𝕜) * + iteratedDeriv i (fun y : 𝕜 => y) x * iteratedDeriv (k + 1 - i) f x) + 0 1 (by simp) (by simp) (by decide) + (fun i _ hi => by simp [iteratedDeriv_fun_id, hi.1, hi.2]) + rw [hsum] + simp [iteratedDeriv_fun_id] + +namespace Real + +/-- The monomial-normalized iterated derivative used in Euler recurrences. -/ +@[expose] noncomputable def eulerRodrigues (g : ℝ → ℝ) (m k : ℕ) (x : ℝ) : ℝ := + iteratedDeriv k (fun y => y ^ (m + k) * g y) x / x ^ m + +/-- At order zero the normalized Rodrigues derivative is the original function. -/ +theorem eulerRodrigues_zero (g : ℝ → ℝ) (m : ℕ) {x : ℝ} (hx : x ≠ 0) : + eulerRodrigues g m 0 x = g x := by + simp [eulerRodrigues, mul_div_cancel_left₀, pow_ne_zero m hx] + +/-- The quotient rule, after multiplication by the independent variable. -/ +private theorem quotient_euler_identity (a b x : ℝ) (m k : ℕ) (hx : x ≠ 0) : + (x * b + (k + 1 : ℝ) * a) / x ^ m = + (m + k + 1 : ℝ) * (a / x ^ m) + + x * ((b * x ^ m - a * ((m : ℝ) * x ^ (m - 1))) / (x ^ m) ^ 2) := by + cases m with + | zero => simp; ring + | succ m => + simp only [Nat.cast_add, Nat.cast_one, + Nat.add_sub_cancel, pow_succ] + field_simp [hx] + ring + +/-- Finite local smoothness gives the Euler recurrence at every nonzero point. -/ +theorem eulerRodrigues_succ_of_contDiffAt {g : ℝ → ℝ} {m k : ℕ} {x : ℝ} + (hg : ContDiffAt ℝ (k + 1 : ℕ) g x) (hx : x ≠ 0) : + eulerRodrigues g m (k + 1) x = + (m + k + 1 : ℝ) * eulerRodrigues g m k x + + x * deriv (eulerRodrigues g m k) x := by + let F : ℝ → ℝ := fun y => y ^ (m + k) * g y + have hF : ContDiffAt ℝ (k + 1 : ℕ) F x := + (contDiffAt_id.pow (m + k)).mul hg + have hA : DifferentiableAt ℝ (iteratedDeriv k F) x := + hF.differentiableAt_iteratedDeriv (Nat.cast_lt.mpr k.lt_succ_self) + have hfun : (fun y : ℝ => y ^ (m + (k + 1)) * g y) = fun y => y * F y := by + funext y + dsimp [F] + rw [← Nat.add_assoc, pow_succ] + ring + have hrec : eulerRodrigues g m (k + 1) x = + (x * iteratedDeriv (k + 1) F x + (k + 1 : ℝ) * iteratedDeriv k F x) / x ^ m := by + rw [eulerRodrigues, hfun, iteratedDeriv_succ_id_mul hF] + have hderiv : deriv (eulerRodrigues g m k) x = + (iteratedDeriv (k + 1) F x * x ^ m - + iteratedDeriv k F x * ((m : ℝ) * x ^ (m - 1))) / (x ^ m) ^ 2 := by + change deriv (fun y => iteratedDeriv k F y / y ^ m) x = _ + simpa only [Pi.div_def, ← iteratedDeriv_succ] using + (hA.hasDerivAt.div (hasDerivAt_pow m x) (pow_ne_zero m hx)).deriv + rw [hrec, hderiv] + exact quotient_euler_identity (iteratedDeriv k F x) (iteratedDeriv (k + 1) F x) x m k hx + +/-- A smooth function on the positive half-line satisfies the Euler recurrence there. -/ +theorem eulerRodrigues_succ {g : ℝ → ℝ} + (hg : ContDiffOn ℝ ∞ g (Set.Ioi 0)) (m k : ℕ) {x : ℝ} (hx : 0 < x) : + eulerRodrigues g m (k + 1) x = + (m + k + 1 : ℝ) * eulerRodrigues g m k x + + x * deriv (eulerRodrigues g m k) x := by + apply eulerRodrigues_succ_of_contDiffAt + · exact (hg.contDiffAt (isOpen_Ioi.mem_nhds hx)).of_le (by simp) + · exact ne_of_gt hx + +end Real diff --git a/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/MulPow.lean b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/MulPow.lean new file mode 100644 index 000000000..503ec6b73 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/MulPow.lean @@ -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)] diff --git a/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PartialContinuity.lean b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PartialContinuity.lean new file mode 100644 index 000000000..3d21953a9 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PartialContinuity.lean @@ -0,0 +1,30 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import TauCeti.Analysis.Calculus.Taylor.Integral + +/-! +# Continuity of iterated derivatives in a parameter +-/ + +public section + +/-- The iterated derivative in the second scalar coordinate of a jointly +smooth function varies continuously with its first coordinate. -/ +theorem ContDiff.continuous_iteratedDeriv_snd_zero {𝕜 E : Type*} + [NontriviallyNormedField 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 E] + {n : ℕ} {F : 𝕜 × 𝕜 → E} (hF : ContDiff 𝕜 n F) : + Continuous (fun x : 𝕜 ↦ iteratedDeriv n (fun z ↦ F (x, z)) 0) := by + have heq (x : 𝕜) : iteratedDeriv n (fun z ↦ F (x, z)) 0 = + iteratedFDeriv 𝕜 n F (x, 0) (fun _ ↦ (0, 1)) := by + have h := hF.contDiffAt.iteratedDeriv_comp_add_smul + (x := (x, 0)) (y := ((0, 1) : 𝕜 × 𝕜)) (t := 0) + simpa [Prod.mk_add_mk, smul_eq_mul] using h + simp_rw [heq] + exact (continuous_eval_const (fun _ : Fin n ↦ ((0, 1) : 𝕜 × 𝕜))).comp + (hF.continuous_iteratedFDeriv'.comp (continuous_id.prodMk continuous_const)) diff --git a/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/Polynomial.lean b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/Polynomial.lean new file mode 100644 index 000000000..c777647f4 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/Polynomial.lean @@ -0,0 +1,54 @@ +/- +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 +public import Mathlib.Algebra.Polynomial.Degree.Defs +public import Mathlib.Analysis.Complex.Basic +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import RealRooted.Mathlib.Topology.Algebra.IsUniformGroup.FiniteSum + +/-! +# Polynomial differential symbols on functions + +A polynomial acts on a function by the finite linear combination of its +iterated derivatives. For entire complex functions this operation commutes with +locally uniform limits. +-/ + +public section + +open Filter Topology + +namespace Polynomial + +/-- The finite differential operator with polynomial symbol `p`, applied to `f`. -/ +@[expose] noncomputable def differentialApply {𝕜 E : Type*} [NontriviallyNormedField 𝕜] + [NormedAddCommGroup E] [NormedSpace 𝕜 E] (p : 𝕜[X]) (f : 𝕜 → E) : 𝕜 → E := + fun z => ∑ k ∈ Finset.range (p.natDegree + 1), p.coeff k • iteratedDeriv k f z + +/-- The zero differential symbol acts as zero on every function. -/ +@[simp] theorem differentialApply_zero {𝕜 E : Type*} [NontriviallyNormedField 𝕜] + [NormedAddCommGroup E] [NormedSpace 𝕜 E] (f : 𝕜 → E) : + (0 : 𝕜[X]).differentialApply f = 0 := by + ext z + simp [differentialApply] + +/-- A polynomial differential operator commutes with locally uniform limits +of entire complex functions. -/ +theorem tendstoLocallyUniformly_differentialApply {F : ℕ → ℂ → ℂ} {f : ℂ → ℂ} + (p : ℂ[X]) (hF : TendstoLocallyUniformly F f atTop) + (hd : ∀ n, Differentiable ℂ (F n)) : + TendstoLocallyUniformly (fun n => p.differentialApply (F n)) + (p.differentialApply f) atTop := by + unfold differentialApply + apply TendstoLocallyUniformly.finset_sum + intro k _ + simpa only [Function.comp_def] using + (uniformContinuous_const_smul (p.coeff k : ℂ)).comp_tendstoLocallyUniformly + (hF.iteratedDeriv hd k) + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PolynomialAlgebra.lean b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PolynomialAlgebra.lean new file mode 100644 index 000000000..1827427cb --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PolynomialAlgebra.lean @@ -0,0 +1,127 @@ +/- +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 RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Algebra of polynomial differential operators + +Polynomial symbols compose by multiplication on entire complex functions. +Linear factors act as derivative shifts, and every finite differential symbol +commutes with every iterated derivative. +-/ + +public section + +namespace Polynomial + +/-- A finite differential operator may be summed over the support of its symbol. -/ +theorem differentialApply_eq_sum (p : ℂ[X]) (f : ℂ → ℂ) (z : ℂ) : + p.differentialApply f z = p.sum (fun k a => a * iteratedDeriv k f z) := by + rw [sum_over_range _ (fun _ => zero_mul _)] + simp only [differentialApply, smul_eq_mul] + +/-- Differential symbols add pointwise. -/ +theorem differentialApply_add (p q : ℂ[X]) (f : ℂ → ℂ) : + (p + q).differentialApply f = p.differentialApply f + q.differentialApply f := by + ext z + simp only [Pi.add_apply, differentialApply_eq_sum] + exact sum_add_index p q _ (fun _ => zero_mul _) (fun _ _ _ => add_mul _ _ _) + +/-- A monomial symbol is a scalar multiple of one iterated derivative. -/ +@[simp] theorem differentialApply_monomial (n : ℕ) (a : ℂ) (f : ℂ → ℂ) : + (monomial n a).differentialApply f = fun z => a * iteratedDeriv n f z := by + ext z + rw [differentialApply_eq_sum] + exact sum_monomial_index a (fun k b => b * iteratedDeriv k f z) (zero_mul _) + +/-- A constant symbol acts by multiplication by that constant. -/ +@[simp] theorem differentialApply_C (a : ℂ) (f : ℂ → ℂ) : + (C a).differentialApply f = fun z => a * f z := by + simpa only [monomial_zero_left, iteratedDeriv_zero] using + differentialApply_monomial 0 a f + +/-- The variable symbol acts by differentiation. -/ +@[simp] theorem differentialApply_X (f : ℂ → ℂ) : + (X : ℂ[X]).differentialApply f = deriv f := by + simpa only [monomial_one_one_eq_X, iteratedDeriv_one, one_mul] using + differentialApply_monomial 1 1 f + +/-- The unit symbol acts as the identity. -/ +@[simp] theorem differentialApply_one (f : ℂ → ℂ) : + (1 : ℂ[X]).differentialApply f = f := by + simpa only [C_1, one_mul] using differentialApply_C 1 f + +/-- A finite differential operator sends the zero function to zero. -/ +@[simp] theorem differentialApply_zero_input (p : ℂ[X]) : + p.differentialApply (0 : ℂ → ℂ) = 0 := by + ext z + simp [differentialApply] + +/-- A polynomial differential operator sends entire functions to entire functions. -/ +theorem differentiable_differentialApply (p : ℂ[X]) {f : ℂ → ℂ} + (hf : Differentiable ℂ f) : Differentiable ℂ (p.differentialApply f) := by + unfold differentialApply + apply Differentiable.fun_sum + intro k _ + exact ((hf.contDiff (n := ⊤)).differentiable_iteratedDeriv k + (WithTop.coe_lt_top _)).const_smul (p.coeff k) + +/-- Multiplication of symbols composes their actions on entire functions. -/ +theorem differentialApply_mul (p q : ℂ[X]) {f : ℂ → ℂ} + (hf : Differentiable ℂ f) : + (p * q).differentialApply f = p.differentialApply (q.differentialApply f) := by + induction p using Polynomial.induction_on' with + | add p r hp hr => + rw [add_mul, differentialApply_add, hp, hr, differentialApply_add] + | monomial n a => + induction q using Polynomial.induction_on' with + | add q r hq hr => + rw [mul_add, differentialApply_add, hq, hr, differentialApply_add, + differentialApply_monomial, differentialApply_monomial, + differentialApply_monomial] + ext z + rw [iteratedDeriv_add + ((q.differentiable_differentialApply hf).contDiff.contDiffAt) + ((r.differentiable_differentialApply hf).contDiff.contDiffAt)] + simp only [Pi.add_apply, mul_add] + | monomial m b => + rw [monomial_mul_monomial, differentialApply_monomial, + differentialApply_monomial, differentialApply_monomial] + ext z + rw [iteratedDeriv_const_mul_field] + simp only [iteratedDeriv_eq_iterate, Function.iterate_add_apply, mul_assoc] + +/-- Multiplying the symbol by `X + C a` takes a derivative shift of its output. -/ +theorem differentialApply_mul_X_add_C (p : ℂ[X]) (a : ℂ) {f : ℂ → ℂ} + (hf : Differentiable ℂ f) : + (p * (X + C a)).differentialApply f = + fun z => deriv (p.differentialApply f) z + a * p.differentialApply f z := by + rw [mul_comm, differentialApply_mul _ _ hf, differentialApply_add, + differentialApply_X, differentialApply_C] + rfl + +/-- Every finite differential symbol commutes with every iterated derivative. -/ +theorem iteratedDeriv_differentialApply (p : ℂ[X]) {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (n : ℕ) : + iteratedDeriv n (p.differentialApply f) = p.differentialApply (iteratedDeriv n f) := by + have hleft := differentialApply_mul (monomial n 1) p hf + have hright := differentialApply_mul p (monomial n 1) hf + rw [mul_comm] at hleft + simpa only [differentialApply_monomial, one_mul] using hleft.symm.trans hright + +/-- A derivative shift commutes with all iterated derivatives. -/ +theorem iteratedDeriv_linear_differential {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (a : ℂ) (n : ℕ) : + iteratedDeriv n (fun z => deriv f z + a * f z) = + fun z => iteratedDeriv (n + 1) f z + a * iteratedDeriv n f z := by + have h := iteratedDeriv_differentialApply (X + C a) hf n + simpa only [differentialApply_add, differentialApply_X, differentialApply_C, + ← iteratedDeriv_succ, Pi.add_def] using h + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PolynomialRange.lean b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PolynomialRange.lean new file mode 100644 index 000000000..608f0b4d2 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PolynomialRange.lean @@ -0,0 +1,32 @@ +/- +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 RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import Mathlib.Algebra.Polynomial.Degree.Operations + +/-! +# Padding finite differential operators to a larger degree +-/ + +public section + +namespace Polynomial + +/-- A polynomial differential operator may be summed up to any degree bound +for its symbol. No differentiability hypothesis on the input is needed. -/ +theorem differentialApply_eq_sum_range {𝕜 E : Type*} [NontriviallyNormedField 𝕜] + [NormedAddCommGroup E] [NormedSpace 𝕜 E] (p : 𝕜[X]) (f : 𝕜 → E) {N : ℕ} + (hN : p.natDegree ≤ N) (z : 𝕜) : + p.differentialApply f z = + ∑ k ∈ Finset.range (N + 1), p.coeff k • iteratedDeriv k f z := by + unfold differentialApply + apply Finset.sum_subset (Finset.range_mono (Nat.add_le_add_right hN 1)) + intro k _ hk + rw [Finset.mem_range, not_lt] at hk + rw [coeff_eq_zero_of_natDegree_lt (by lia), zero_smul] + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Calculus/LocalExtr/PolynomialEuler.lean b/RealRooted/Mathlib/Analysis/Calculus/LocalExtr/PolynomialEuler.lean new file mode 100644 index 000000000..a068f7f48 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LocalExtr/PolynomialEuler.lean @@ -0,0 +1,131 @@ +/- +Copyright (c) 2026 The RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Benjamin Davidson, Yury Kudryashov, The RealRooted contributors +-/ +module + +public import Mathlib.Algebra.Polynomial.Roots +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Basic.Real.Basic +import Mathlib.Analysis.Calculus.LocalExtr.Rolle +import Mathlib.Analysis.Calculus.Deriv.Polynomial +import Mathlib.Analysis.Calculus.Deriv.Inv +import Mathlib.Topology.Algebra.Polynomial +import Mathlib.Tactic.TypeStar + +/-! +# Positive roots of an Euler differential operator + +The operator `p ↦ X * p.derivative - a * p` decreases the multiplicity of +each root by at most one. For a natural parameter, Rolle's theorem applied +to `p(x) / x^a` supplies a new positive root between two positive roots of +`p`. Together these facts show that at most one positive root is lost, +counting multiplicities, provided the output is nonzero. + +The counting argument follows Mathlib's proof of +`Polynomial.card_roots_le_derivative`. +-/ + +public section + +open Set + +namespace Polynomial + +/-- An Euler differential operator lowers root multiplicities by at most one +whenever its output is nonzero. -/ +theorem rootMultiplicity_sub_one_le_euler_sub + {R : Type*} [CommRing R] (p : R[X]) (a x : R) + (hq : X * p.derivative - C a * p ≠ 0) : + p.rootMultiplicity x - 1 ≤ (X * p.derivative - C a * p).rootMultiplicity x := by + rw [le_rootMultiplicity_iff hq] + have hp := p.pow_rootMultiplicity_dvd x + exact (dvd_mul_of_dvd_right (pow_sub_one_dvd_derivative_of_pow_dvd hp) X).sub + (dvd_mul_of_dvd_right ((pow_dvd_pow _ (Nat.sub_le _ _)).trans hp) (C a)) + +/-- Two positive roots enclose a root of the natural-parameter Euler operator. -/ +theorem exists_euler_sub_isRoot_between {p : ℝ[X]} (a : ℕ) {s t : ℝ} + (hspos : 0 < s) (hst : s < t) (hs : p.IsRoot s) (ht : p.IsRoot t) : + ∃ x ∈ Ioo s t, (X * p.derivative - C (a : ℝ) * p).IsRoot x := by + cases a with + | zero => + obtain ⟨x, hx, hd⟩ := exists_deriv_eq_zero hst p.continuousOn + (hs.eq_zero.trans ht.eq_zero.symm) + refine ⟨x, hx, ?_⟩ + simp [IsRoot, ← p.deriv, hd] + | succ a => + have hne (x : ℝ) (hx : x ∈ Icc s t) : x ≠ 0 := ne_of_gt (hspos.trans_le hx.1) + have hc : ContinuousOn (fun x => p.eval x / x ^ (a + 1)) (Icc s t) := + p.continuous.continuousOn.div (continuous_id.pow _).continuousOn + (fun x hx => pow_ne_zero _ (hne x hx)) + have he : p.eval s / s ^ (a + 1) = p.eval t / t ^ (a + 1) := by + rw [hs.eq_zero, ht.eq_zero, zero_div, zero_div] + obtain ⟨x, hx, hd⟩ := exists_hasDerivAt_eq_zero hst hc he + (fun x hx => (p.hasDerivAt x).div ((hasDerivAt_id x).pow (a + 1)) + (pow_ne_zero _ (hne x ⟨hx.1.le, hx.2.le⟩))) + have hx0 : x ≠ 0 := hne x ⟨hx.1.le, hx.2.le⟩ + have hnum : p.derivative.eval x * x ^ (a + 1) - + p.eval x * ((a + 1 : ℝ) * x ^ a) = 0 := by + simpa [pow_ne_zero _ hx0] using hd + have hmul : x ^ a * (x * p.derivative.eval x - (a + 1 : ℝ) * p.eval x) = 0 := by + rw [pow_succ] at hnum + linear_combination hnum + refine ⟨x, hx, ?_⟩ + simpa [IsRoot] using (mul_eq_zero.mp hmul).resolve_left (pow_ne_zero _ hx0) + +/-- Distinct positive roots of `p` require almost as many new positive roots +of a nonzero natural-parameter Euler differential operator. -/ +theorem card_pos_roots_toFinset_le_euler_sub_sdiff_add_one (p : ℝ[X]) (a : ℕ) + (hq : X * p.derivative - C (a : ℝ) * p ≠ 0) : + (p.roots.filter (0 < ·)).toFinset.card ≤ + (((X * p.derivative - C (a : ℝ) * p).roots.filter (0 < ·)).toFinset \ + (p.roots.filter (0 < ·)).toFinset).card + 1 := by + classical + have hp : p ≠ 0 := by rintro rfl; simp at hq + refine Finset.card_le_sdiff_of_interleaved fun s hs t ht hst _ => ?_ + simp only [Multiset.mem_toFinset, Multiset.mem_filter, mem_roots hp] at hs ht + obtain ⟨x, hx, hroot⟩ := exists_euler_sub_isRoot_between a hs.2 hst hs.1 ht.1 + refine ⟨x, ?_, hx⟩ + simp only [Multiset.mem_toFinset, Multiset.mem_filter, mem_roots hq] + exact ⟨hroot, hs.2.trans hx.1⟩ + +/-- A nonzero natural-parameter Euler differential operator loses at most one +positive root, with roots counted according to multiplicity. -/ +theorem card_pos_roots_le_euler_sub_add_one (p : ℝ[X]) (a : ℕ) + (hq : X * p.derivative - C (a : ℝ) * p ≠ 0) : + (p.roots.filter (0 < ·)).card ≤ + ((X * p.derivative - C (a : ℝ) * p).roots.filter (0 < ·)).card + 1 := by + classical + let s := p.roots.filter (0 < ·) + let t := (X * p.derivative - C (a : ℝ) * p).roots.filter (0 < ·) + have hcount (x : ℝ) : s.count x - 1 ≤ t.count x := by + by_cases hx : 0 < x + · simpa [s, t, hx] using p.rootMultiplicity_sub_one_le_euler_sub (a : ℝ) x hq + · simp [s, t, hx] + have hcard : s.toFinset.card ≤ (t.toFinset \ s.toFinset).card + 1 := + p.card_pos_roots_toFinset_le_euler_sub_sdiff_add_one a hq + change s.card ≤ t.card + 1 + calc + s.card = ∑ x ∈ s.toFinset, s.count x := (Multiset.toFinset_sum_count_eq _).symm + _ = ∑ x ∈ s.toFinset, (s.count x - 1 + 1) := + (Eq.symm <| Finset.sum_congr rfl fun _ hx => tsub_add_cancel_of_le <| + Nat.succ_le_iff.2 <| Multiset.count_pos.2 <| Multiset.mem_toFinset.1 hx) + _ = (∑ x ∈ s.toFinset, (s.count x - 1)) + s.toFinset.card := by + simp only [Finset.sum_add_distrib, Finset.sum_const, smul_eq_mul, mul_one] + _ ≤ (∑ x ∈ s.toFinset, t.count x) + ((t.toFinset \ s.toFinset).card + 1) := + add_le_add (Finset.sum_le_sum fun x _ => hcount x) hcard + _ ≤ (∑ x ∈ s.toFinset, t.count x) + ((∑ x ∈ t.toFinset \ s.toFinset, + t.count x) + 1) := by + simp only [Finset.card_eq_sum_ones] + gcongr with x hx + rw [Nat.succ_le_iff, Multiset.count_pos, ← Multiset.mem_toFinset] + exact (Finset.mem_sdiff.1 hx).1 + _ = t.card + 1 := by + rw [← add_assoc, ← Finset.sum_union Finset.disjoint_sdiff, + Finset.union_sdiff_self_eq_union, ← Multiset.toFinset_sum_count_eq, + ← Finset.sum_subset Finset.subset_union_right] + intro x _ hx + simpa only [Multiset.mem_toFinset, Multiset.count_eq_zero] using hx + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Const.lean b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Const.lean new file mode 100644 index 000000000..09798b38d --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Const.lean @@ -0,0 +1,23 @@ +/- +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.LogDeriv + +/-! +# Constant division in logarithmic derivatives +-/ + +public section + +variable {𝕜 𝕜' : Type*} [NontriviallyNormedField 𝕜] [NontriviallyNormedField 𝕜'] + [NormedAlgebra 𝕜 𝕜'] + +/-- Dividing a function by a nonzero constant preserves its logarithmic +derivative, including totalized values at zeros and nondifferentiable points. -/ +theorem logDeriv_div_const {f : 𝕜 → 𝕜'} (x : 𝕜) (a : 𝕜') (ha : a ≠ 0) : + logDeriv (fun z => f z / a) x = logDeriv f x := by + simpa only [div_eq_mul_inv] using logDeriv_mul_const (f := f) x a⁻¹ (inv_ne_zero ha) diff --git a/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Identity.lean b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Identity.lean new file mode 100644 index 000000000..5a958ecbf --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Identity.lean @@ -0,0 +1,44 @@ +/- +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.LogDeriv +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Entire functions determined by a logarithmic derivative + +Equality of logarithmic derivatives on one nonempty open connected region fixes +an entire function up to a constant. Normalization at zero fixes that constant. +-/ + +public section + +open Filter Set Topology + +/-- Two entire functions with equal logarithmic derivatives on a nonempty open +preconnected set, and nonzero values on that set, differ globally by a constant. +If the second function is one at zero, that constant is the first function's value at zero. -/ +theorem Differentiable.eq_mul_of_logDeriv_eqOn {f g : ℂ → ℂ} + (hf : Differentiable ℂ f) (hg : Differentiable ℂ g) {s : Set ℂ} + (hs : IsOpen s) (hconn : IsPreconnected s) (hne : s.Nonempty) + (hfn : ∀ z ∈ s, f z ≠ 0) (hgn : ∀ z ∈ s, g z ≠ 0) + (hlog : EqOn (_root_.logDeriv f) (_root_.logDeriv g) s) (hg0 : g 0 = 1) : + ∀ z, f z = f 0 * g z := by + obtain ⟨a, _, heq⟩ := (logDeriv_eqOn_iff hf.differentiableOn hg.differentiableOn + hs hconn hgn hfn).mp hlog + obtain ⟨w, hw⟩ := hne + have hfa : AnalyticOnNhd ℂ f univ := fun z _ => hf.analyticAt z + have hga : AnalyticOnNhd ℂ (fun z => a * g z) univ := + fun z _ => ((differentiable_const a).mul hg).analyticAt z + have he : f = fun z => a * g z := by + apply hfa.eq_of_eventuallyEq hga + filter_upwards [hs.mem_nhds hw] with z hz + simpa only [Pi.smul_apply, smul_eq_mul] using heq hz + have ha : a = f 0 := by simpa only [hg0, mul_one] using (congrFun he 0).symm + intro z + simpa only [ha] using congrFun he z diff --git a/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/MomentContinuation.lean b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/MomentContinuation.lean new file mode 100644 index 000000000..f157122d2 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/MomentContinuation.lean @@ -0,0 +1,83 @@ +/- +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.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import TauCeti.Analysis.CompletelyMonotone.Stieltjes.Basic +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.SlitPlaneContinuation +import RealRooted.Mathlib.MeasureTheory.Measure.LocalMomentTransform +import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeMomentTransform +import Mathlib.Analysis.Complex.CauchyIntegral +import TauCeti.Analysis.Complex.SlitPlane + +/-! +# Global continuation from logarithmic-derivative moments + +For an entire function nonzero at zero, genuine nonnegative moment data for +the actual complex logarithmic-derivative coefficients give a global Stieltjes +transform on the slit plane. Its zeros are consequently nonpositive real. + +The unrestricted normalized Type-I conclusion still requires canonical-product +reconstruction. It is not asserted here merely from this zero-location result. +-/ + +public section + +open Complex Filter MeasureTheory Set Topology + +/-- Local signed logarithmic-derivative moments give the actual transform +identity throughout the slit plane and exclude zeros there. Compact support, +positive-axis nonvanishing and conjugation symmetry are not input hypotheses. -/ +theorem Differentiable.eqOn_logDeriv_integral_inv_of_moments + {f : ℂ → ℂ} {mu : Measure ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + EqOn (logDeriv f) (fun z ↦ ∫ x : ℝ, (1 + z * (x : ℂ))⁻¹ ∂mu) slitPlane ∧ + ∀ z ∈ slitPlane, f z ≠ 0 := by + have : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hint 0) + exact hf.eqOn_logDeriv_of_eventuallyEq h0 + (Measure.analyticOnNhd_integral_inv_one_add_mul_of_ae_nonneg hpos) + ((hf.analyticAt 0).eventuallyEq_logDeriv_integral_inv_of_moments h0 hint hmom) + +/-- Genuine nonnegative moments of the actual complex logarithmic-derivative +coefficients force all zeros of the entire function to be nonpositive real. -/ +theorem Differentiable.zeros_nonpos_of_logDeriv_moments + {f : ℂ → ℂ} {mu : Measure ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + ∀ z : ℂ, f z = 0 → z.im = 0 ∧ z.re ≤ 0 := by + have hne := (hf.eqOn_logDeriv_integral_inv_of_moments h0 hpos hint hmom).2 + intro z hz + have hnot : z ∉ slitPlane := fun hmem ↦ hne z hmem hz + exact ⟨im_eq_zero_of_notMem_slitPlane hnot, + le_of_not_gt fun hre ↦ hnot (mem_slitPlane_iff.mpr (Or.inl hre))⟩ + +/-- The logarithmic derivative on the positive axis is a Stieltjes function +under the local moment hypotheses. This derives the global condition from +local complex coefficients, rather than assuming it. -/ +theorem Differentiable.isStieltjesFunction_logDeriv_of_moments + {f : ℂ → ℂ} {mu : Measure ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + TauCeti.IsStieltjesFunction (fun t : ℝ ↦ (logDeriv f t).re) := by + have : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hint 0) + have heq := (hf.eqOn_logDeriv_integral_inv_of_moments h0 hpos hint hmom).1 + apply (Measure.isStieltjesFunction_integral_inv_one_add_mul_of_ae_nonneg hpos).congr + intro t ht + exact congrArg Complex.re (heq (ofReal_mem_slitPlane.mpr ht)) + +end diff --git a/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/NormalizedConjugation.lean b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/NormalizedConjugation.lean new file mode 100644 index 000000000..dbf2fc9eb --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/NormalizedConjugation.lean @@ -0,0 +1,62 @@ +/- +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.LogDeriv +public import Mathlib.Analysis.Complex.Basic +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Identity +import Mathlib.Analysis.Calculus.Deriv.Star +import Mathlib.Analysis.Complex.Convex + +/-! +# Real normalization from a real logarithmic derivative + +Conjugating both argument and value commutes with logarithmic differentiation. +For an entire function normalized to one at zero, conjugation symmetry of its +logarithmic derivative on the slit plane recovers symmetry of the function. +-/ + +public section + +open Complex Set +open scoped ComplexConjugate + +/-- Reflection across the real axis commutes with the totalized logarithmic +derivative, including zeros and points where differentiability fails. -/ +theorem Complex.logDeriv_conj_conj (f : ℂ → ℂ) : + logDeriv (conj ∘ f ∘ conj) = conj ∘ logDeriv f ∘ conj := by + funext z + simp only [logDeriv_apply, deriv_conj_conj, Function.comp_apply, map_div₀] + +/-- Normalization removes the complex scalar ambiguity when the logarithmic +derivative respects conjugation on the slit plane. -/ +theorem Differentiable.conj_of_eqOn_logDeriv_conj + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 = 1) + (hne : ∀ z ∈ slitPlane, f z ≠ 0) + (hlog : EqOn (conj ∘ logDeriv f ∘ conj) (logDeriv f) slitPlane) : + ∀ z, f (conj z) = conj (f z) := by + let g := conj ∘ f ∘ conj + have hg : Differentiable ℂ g := by + intro z + simpa only [g, conj_conj] using (hf (conj z)).conj_conj + have hgn : ∀ z ∈ slitPlane, g z ≠ 0 := by + intro z hz hg0 + have hzc : conj z ∈ slitPlane := by + simpa only [mem_slitPlane_iff, conj_re, conj_im, neg_ne_zero] using hz + apply hne (conj z) hzc + simpa only [g, Function.comp_apply, map_zero, conj_conj] using congrArg conj hg0 + have hconn := + (starConvex_one_slitPlane.isPathConnected one_mem_slitPlane).isConnected.isPreconnected + have heq := hf.eq_mul_of_logDeriv_eqOn hg isOpen_slitPlane hconn + ⟨1, one_mem_slitPlane⟩ hne hgn + (fun z hz ↦ by + rw [show logDeriv g = conj ∘ logDeriv f ∘ conj from logDeriv_conj_conj f] + exact (hlog hz).symm) + (by simp [g, Function.comp_apply, h0]) + intro z + simpa only [h0, one_mul, g, Function.comp_apply, conj_conj] using heq (conj z) + +end diff --git a/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Residue.lean b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Residue.lean new file mode 100644 index 000000000..72925ac9a --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Residue.lean @@ -0,0 +1,78 @@ +/- +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.Meromorphic.Order +public import Mathlib.Analysis.Complex.Basic +import TauCeti.Analysis.Contour.Argument.Principle + +/-! +# Logarithmic derivative limits at zeros and poles + +The residue of the logarithmic derivative is the meromorphic order. Along a +vertical approach to a real zero, the scaled imaginary part of the negative +logarithmic derivative tends to the zero multiplicity. +-/ + +public section + +open Complex Filter Set Topology + +/-- Multiplying the logarithmic derivative by the displacement removes its simple +pole and gives the meromorphic order as the limiting value. -/ +theorem MeromorphicAt.tendsto_sub_mul_logDeriv {f : ℂ → ℂ} {c : ℂ} {n : ℤ} + (hf : MeromorphicAt f c) (hn : meromorphicOrderAt f c = (n : WithTop ℤ)) : + Tendsto (fun z => (z - c) * _root_.logDeriv f z) (𝓝[≠] c) (𝓝 (n : ℂ)) := by + obtain ⟨g, hg, hgn, heq⟩ := TauCeti.Contour.logDeriv_eventuallyEq_principalPart hf hn + have hcont := (hg.logDeriv hgn).continuousAt + have hlim : Tendsto (fun z => (n : ℂ) + (z - c) * _root_.logDeriv g z) + (𝓝[≠] c) (𝓝 (n : ℂ)) := by + simpa only [id_eq, sub_self, zero_mul, add_zero] using tendsto_const_nhds.add + (((tendsto_id.sub_const c).mono_left nhdsWithin_le_nhds).mul + (hcont.tendsto.mono_left nhdsWithin_le_nhds)) + apply hlim.congr' + filter_upwards [heq, self_mem_nhdsWithin] with z hz hzc + rw [hz] + have hne : z - c ≠ 0 := sub_ne_zero.mpr hzc + field_simp + +/-- At a real point of finite meromorphic order, the scaled imaginary part of the +negative logarithmic derivative along the upper vertical ray tends to that order. -/ +theorem MeromorphicAt.tendsto_mul_im_neg_logDeriv {f : ℂ → ℂ} {r : ℝ} {n : ℤ} + (hf : MeromorphicAt f (r : ℂ)) + (hn : meromorphicOrderAt f (r : ℂ) = (n : WithTop ℤ)) : + Tendsto (fun y : ℝ => y * (-_root_.logDeriv f ((r : ℂ) + (y : ℂ) * I)).im) + (𝓝[>] (0 : ℝ)) (𝓝 (n : ℝ)) := by + have hp : Tendsto (fun y : ℝ => (r : ℂ) + (y : ℂ) * I) + (𝓝[>] (0 : ℝ)) (𝓝[≠] (r : ℂ)) := by + refine tendsto_nhdsWithin_iff.mpr ⟨?_, ?_⟩ + · have hcont : Continuous (fun y : ℝ => (r : ℂ) + (y : ℂ) * I) := by fun_prop + simpa using (hcont.tendsto 0).mono_left nhdsWithin_le_nhds + · filter_upwards [self_mem_nhdsWithin] with y hy + intro heq + have him := congrArg Complex.im heq + simp only [add_im, ofReal_im, mul_im, ofReal_re, I_im, I_re, + mul_one, mul_zero, zero_add, add_zero] at him + exact (ne_of_gt hy) him + have h := (hf.tendsto_sub_mul_logDeriv hn).comp hp + have hr := Complex.continuous_re.continuousAt.tendsto.comp h + convert hr using 1 + · ext y + simp only [Function.comp_apply, add_sub_cancel_left, mul_re, mul_im, + ofReal_re, ofReal_im, I_re, I_im, neg_im] + ring + +/-- The upper vertical logarithmic-derivative limit at an analytic point of +finite vanishing order is its natural zero multiplicity, including multiplicity zero. -/ +theorem AnalyticAt.tendsto_mul_im_neg_logDeriv {f : ℂ → ℂ} {r : ℝ} + (hf : AnalyticAt ℂ f (r : ℂ)) (hfin : analyticOrderAt f (r : ℂ) ≠ ⊤) : + Tendsto (fun y : ℝ => y * (-_root_.logDeriv f ((r : ℂ) + (y : ℂ) * I)).im) + (𝓝[>] (0 : ℝ)) (𝓝 (analyticOrderNatAt f (r : ℂ) : ℝ)) := by + have hn : meromorphicOrderAt f (r : ℂ) = + ((analyticOrderNatAt f (r : ℂ) : ℤ) : WithTop ℤ) := by + rw [hf.meromorphicOrderAt_eq, ← Nat.cast_analyticOrderNatAt hfin] + simp + simpa only [Int.cast_natCast] using hf.meromorphicAt.tendsto_mul_im_neg_logDeriv hn diff --git a/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/SlitPlaneContinuation.lean b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/SlitPlaneContinuation.lean new file mode 100644 index 000000000..7acfde506 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/SlitPlaneContinuation.lean @@ -0,0 +1,64 @@ +/- +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.LogDeriv +public import Mathlib.Analysis.Complex.Basic +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.ZeroFree +import Mathlib.Analysis.Analytic.Uniqueness +import Mathlib.Analysis.Complex.Convex +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Continuing a logarithmic derivative from the origin to the slit plane + +An entire function nonzero at the origin has no zeros in the slit plane if +its local logarithmic derivative agrees with a function holomorphic there. +Continue the equation `f' = g f`, which stays analytic at possible zeros, +then use analytic orders to exclude them. No positive-axis nonvanishing or +conjugation hypothesis is assumed. +-/ + +public section + +open Complex Filter Set Topology + +/-- A local logarithmic derivative with a holomorphic slit-plane continuation +agrees with it globally on that plane, and the original entire function is +nowhere zero there. The origin belongs to the local germ, not to the slit plane. -/ +theorem Differentiable.eqOn_logDeriv_of_eventuallyEq + {f g : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hg : AnalyticOnNhd ℂ g slitPlane) (hlocal : logDeriv f =ᶠ[𝓝 0] g) : + EqOn (logDeriv f) g slitPlane ∧ ∀ z ∈ slitPlane, f z ≠ 0 := by + have heq : ∀ᶠ z in 𝓝 0, _root_.deriv f z = g z * f z ∧ f z ≠ 0 := by + filter_upwards [hlocal, (hf.analyticAt 0).continuousAt.eventually_ne h0] + with z hz hzn + refine ⟨?_, hzn⟩ + rw [← hz, logDeriv_apply, div_mul_cancel₀ _ hzn] + obtain ⟨s, hs, hso, h0s⟩ := eventually_nhds_iff.mp heq + obtain ⟨r, hr, hrs⟩ := Metric.mem_nhds_iff.mp (hso.mem_nhds h0s) + have has : ((r / 2 : ℝ) : ℂ) ∈ s := by + apply hrs + simpa only [Metric.mem_ball, dist_zero_right, Complex.norm_real, + Real.norm_eq_abs, abs_of_pos (half_pos hr)] using half_lt_self hr + have ha : ((r / 2 : ℝ) : ℂ) ∈ slitPlane := + ofReal_mem_slitPlane.mpr (half_pos hr) + have hfa : AnalyticOnNhd ℂ f slitPlane := fun z _ ↦ hf.analyticAt z + have hda : AnalyticOnNhd ℂ (_root_.deriv f) slitPlane := fun z _ ↦ hf.deriv.analyticAt z + have hga : AnalyticOnNhd ℂ (fun z ↦ g z * f z) slitPlane := + fun z hz ↦ (hg z hz).mul (hfa z hz) + have hconn := + (starConvex_one_slitPlane.isPathConnected one_mem_slitPlane).isConnected.isPreconnected + have hode : EqOn (_root_.deriv f) (fun z ↦ g z * f z) slitPlane := + hda.eqOn_of_preconnected_of_eventuallyEq hga hconn ha + (Filter.Eventually.mono (hso.mem_nhds has) fun z hz ↦ (hs z hz).1) + have hne := hfa.ne_zero_of_deriv_eq_mul hg isOpen_slitPlane hconn ha + (hs _ has).2 hode + refine ⟨?_, hne⟩ + intro z hz + rw [logDeriv_apply, hode hz, mul_div_cancel_right₀ _ (hne z hz)] + +end diff --git a/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Star.lean b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Star.lean new file mode 100644 index 000000000..201dc843e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Star.lean @@ -0,0 +1,37 @@ +/- +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.LogDeriv +public import Mathlib.Analysis.Complex.Basic +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Conjugation of logarithmic derivatives +-/ + +public section + +open scoped ComplexConjugate + +namespace Complex + +/-- The logarithmic derivative of a conjugation-compatible function respects +conjugation, including points where the value or derivative is zero. -/ +theorem logDeriv_conj {f : ℂ → ℂ} (hf : ∀ z, f (conj z) = conj (f z)) (z : ℂ) : + logDeriv f (conj z) = conj (logDeriv f z) := by + rw [logDeriv_apply, logDeriv_apply, map_div₀, hf] + congr 1 + simpa only [iteratedDeriv_one] using iteratedDeriv_conj hf 1 z + +/-- The logarithmic derivative of a conjugation-compatible function is real +on the real axis, with totalized division at zeros. -/ +theorem logDeriv_ofReal_im {f : ℂ → ℂ} (hf : ∀ z, f (conj z) = conj (f z)) (x : ℝ) : + (logDeriv f x).im = 0 := by + apply conj_eq_iff_im.mp + simpa using (logDeriv_conj hf (x : ℂ)).symm + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/ZeroFree.lean b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/ZeroFree.lean new file mode 100644 index 000000000..d8f2188a2 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Calculus/LogDeriv/ZeroFree.lean @@ -0,0 +1,64 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.Analysis.Complex.Basic + +/-! +# Zero exclusion for analytic first-order equations + +At a zero of finite order, differentiation lowers the order by one, whereas +multiplication by an analytic function cannot lower it. Thus a nonzero analytic +solution of `f' = g f` has no zeros on its connected domain. +-/ + +public section + +open Filter Set Topology + +/-- A nonzero analytic germ satisfying a homogeneous first-order differential +equation with analytic coefficient cannot vanish at its center. -/ +theorem AnalyticAt.ne_zero_of_eventually_deriv_eq_mul {f g : ℂ → ℂ} {z : ℂ} + (hf : AnalyticAt ℂ f z) (hg : AnalyticAt ℂ g z) + (hfinite : analyticOrderAt f z ≠ ⊤) + (hode : deriv f =ᶠ[𝓝 z] fun w ↦ g w * f w) : f z ≠ 0 := by + intro hz + have hderiv : analyticOrderAt (deriv f) z + 1 = analyticOrderAt f z := by + simpa only [hz, sub_zero] using hf.analyticOrderAt_deriv_add_one + have hmul : analyticOrderAt (deriv f) z = + analyticOrderAt g z + analyticOrderAt f z := by + rw [analyticOrderAt_congr hode] + exact analyticOrderAt_fun_mul hg hf + have hle : analyticOrderAt f z ≤ analyticOrderAt (deriv f) z := by + calc + _ = 0 + analyticOrderAt f z := (zero_add _).symm + _ ≤ analyticOrderAt g z + analyticOrderAt f z := + add_le_add (zero_le : 0 ≤ analyticOrderAt g z) le_rfl + _ = _ := hmul.symm + have hbad : analyticOrderAt f z + 1 ≤ analyticOrderAt f z := + (add_le_add hle le_rfl).trans_eq hderiv + obtain ⟨n, hn⟩ := ENat.ne_top_iff_exists.mp hfinite + rw [← hn] at hbad + have hnat : n + 1 ≤ n := ENat.natCast_le_natCast.mp (by + simpa only [ENat.natCast_add, Nat.cast_one] using hbad) + exact Nat.not_succ_le_self n hnat + +/-- A solution of `f' = g f` on a connected open domain is nowhere zero if it +is nonzero at one point. All analyticity and domain assumptions are explicit. -/ +theorem AnalyticOnNhd.ne_zero_of_deriv_eq_mul {f g : ℂ → ℂ} {U : Set ℂ} {a : ℂ} + (hf : AnalyticOnNhd ℂ f U) (hg : AnalyticOnNhd ℂ g U) + (hU : IsOpen U) (hconn : IsPreconnected U) (ha : a ∈ U) (hfa : f a ≠ 0) + (hode : EqOn (deriv f) (fun z ↦ g z * f z) U) : + ∀ z ∈ U, f z ≠ 0 := by + intro z hz + have hfinite : analyticOrderAt f z ≠ ⊤ := + hf.analyticOrderAt_ne_top_of_isPreconnected hconn ha hz + (by simp [analyticOrderAt_eq_zero.mpr (Or.inr hfa)]) + exact (hf z hz).ne_zero_of_eventually_deriv_eq_mul (hg z hz) hfinite + (Filter.Eventually.mono (hU.mem_nhds hz) fun w hw ↦ hode hw) + +end diff --git a/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalDerivatives.lean b/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalDerivatives.lean new file mode 100644 index 000000000..772893d49 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalDerivatives.lean @@ -0,0 +1,76 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Calculus.Deriv.Pow +import Mathlib.Analysis.Calculus.Deriv.Inv +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# Derivative identities for positive affine resolvents + +The elementary derivative and Euler-step identities below are the algebraic +part of the two-index logarithmic-derivative hierarchy. They hold wherever +the denominator is nonzero; positivity is not needed for these identities. +-/ + +public section + +open Filter Topology + +namespace Real + +/-- The derivative of a constant multiple of a positive natural reciprocal +power of an affine function. -/ +theorem hasDerivAt_const_div_one_add_mul_pow (a b : ℝ) (q : ℕ) + {x : ℝ} (hx : 1 + a * x ≠ 0) : + HasDerivAt (fun y : ℝ ↦ b / (1 + a * y) ^ (q + 1)) + (-((q + 1 : ℕ) : ℝ) * a * b / (1 + a * x) ^ (q + 2)) x := by + have hd : HasDerivAt (fun y : ℝ ↦ 1 + a * y) a x := + (hasDerivAt_const_mul a).const_add 1 + have h := (hasDerivAt_const x b).div (hd.pow (q + 1)) (pow_ne_zero _ hx) + convert h using 1 + simp only [Pi.pow_apply, Nat.add_sub_cancel] + field_simp [hx, pow_succ] + ring + +/-- Multiplication by the reciprocal exponent plus the Euler derivative +increases that exponent by one. This is the kernel cancellation underlying +Zhang's recurrence, equation (1.7). -/ +theorem mul_const_div_add_mul_deriv_eq (a b : ℝ) (q : ℕ) + {x : ℝ} (hx : 1 + a * x ≠ 0) : + ((q + 1 : ℕ) : ℝ) * (b / (1 + a * x) ^ (q + 1)) + + x * deriv (fun y : ℝ ↦ b / (1 + a * y) ^ (q + 1)) x = + ((q + 1 : ℕ) : ℝ) * b / (1 + a * x) ^ (q + 2) := by + rw [(hasDerivAt_const_div_one_add_mul_pow a b q hx).deriv] + field_simp [hx, pow_succ] + ring + +/-- Every iterated derivative of a linear resolvent has its expected +factorial, slope power and alternating sign, away from its pole. -/ +theorem iteratedDeriv_const_div_one_add_mul (a : ℝ) (m : ℕ) + {x : ℝ} (hx : 1 + a * x ≠ 0) : + iteratedDeriv m (fun y : ℝ ↦ a / (1 + a * y)) x = + (-1 : ℝ) ^ m * (m.factorial : ℝ) * a ^ (m + 1) / + (1 + a * x) ^ (m + 1) := by + induction m generalizing x with + | zero => simp + | succ m ih => + have hne : ∀ᶠ y : ℝ in 𝓝 x, 1 + a * y ≠ 0 := + (by fun_prop : ContinuousAt (fun y : ℝ ↦ 1 + a * y) x).eventually_ne hx + have heq : iteratedDeriv m (fun y : ℝ ↦ a / (1 + a * y)) =ᶠ[𝓝 x] + (fun y : ℝ ↦ (-1 : ℝ) ^ m * (m.factorial : ℝ) * a ^ (m + 1) / + (1 + a * y) ^ (m + 1)) := hne.mono fun y hy ↦ ih hy + rw [iteratedDeriv_succ, heq.deriv_eq, + (hasDerivAt_const_div_one_add_mul_pow a + ((-1 : ℝ) ^ m * (m.factorial : ℝ) * a ^ (m + 1)) m hx).deriv] + simp only [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, pow_succ] + ring + +end Real diff --git a/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalMixtures.lean b/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalMixtures.lean new file mode 100644 index 000000000..e16a0011c --- /dev/null +++ b/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalMixtures.lean @@ -0,0 +1,104 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.CompletelyMonotone.Basic +import TauCeti.Analysis.CompletelyMonotone.Closure +import TauCeti.Analysis.CompletelyMonotone.Reciprocal +import TauCeti.Analysis.CompletelyMonotone.Reparametrization +import TauCeti.Analysis.CompletelyMonotone.Limits +import Mathlib.Analysis.Asymptotics.Lemmas + +/-! +# Positive mixtures of affine reciprocal powers + +Summable nonnegative masses give completely monotone mixtures of the kernels +`(1 + a * x)⁻ʳ`, with arbitrary nonnegative slopes. The slope powers occurring +in logarithmic derivatives of convergent linear products are a specialization. +No order or zero-enumeration assumption is needed for this kernel statement. +-/ + +public section + +open Filter Topology + +/-- Every positive natural power of a summable real family is summable. -/ +theorem Summable.pow_succ {ι : Type*} {a : ι → ℝ} (hs : Summable a) (m : ℕ) : + Summable (fun i ↦ a i ^ (m + 1)) := by + convert hs.norm.mul_tendsto_const (hs.tendsto_cofinite_zero.pow m) using 1 + funext i + ring + +namespace TauCeti + +/-- Every nonnegative multiple of a natural reciprocal power of a positive +affine function is completely monotone on the closed nonnegative half-line. -/ +theorem isCompletelyMonotone_const_div_one_add_mul_pow + {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (r : ℕ) : + IsCompletelyMonotone (fun x : ℝ ↦ b / (1 + a * x) ^ r) := by + have h := ((isCompletelyMonotone_one_div_one_add.comp_const_mul ha).pow r).smul hb + apply h.congr + intro x _ + simp only [Pi.smul_apply, smul_eq_mul, Pi.pow_apply, inv_pow, + div_eq_mul_inv, one_mul] + +/-- Summable nonnegative masses dominate their affine reciprocal mixtures +at every nonnegative argument, including the endpoint zero. -/ +theorem summable_const_div_one_add_mul_pow {ι : Type*} {a b : ι → ℝ} + (ha : ∀ i, 0 ≤ a i) (hb : ∀ i, 0 ≤ b i) (hs : Summable b) + (r : ℕ) {x : ℝ} (hx : 0 ≤ x) : + Summable (fun i ↦ b i / (1 + a i * x) ^ r) := by + apply Summable.of_nonneg_of_le + (fun i ↦ div_nonneg (hb i) + (pow_nonneg (add_nonneg zero_le_one (mul_nonneg (ha i) hx)) _)) ?_ hs + intro i + apply div_le_self (hb i) + exact one_le_pow₀ (le_add_of_nonneg_right (mul_nonneg (ha i) hx)) + +/-- Arbitrary positive summable mixtures of natural reciprocal powers are +completely monotone on the open half-line. Zero slopes and repeated slopes +are allowed, and the exponent may be zero. -/ +theorem isCompletelyMonotoneOnIoi_tsum_const_div_one_add_mul_pow + {a b : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hb : ∀ i, 0 ≤ b i) + (hs : Summable b) (r : ℕ) : + IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ ∑' i, b i / (1 + a i * x) ^ r) := by + apply isCompletelyMonotoneOnIoi_of_tendsto (L := atTop) + (F := fun n x ↦ ∑ i ∈ Finset.range n, b i / (1 + a i * x) ^ r) + · exact Filter.Eventually.of_forall fun n ↦ + (IsCompletelyMonotone.sum (s := Finset.range n) fun i _ ↦ + isCompletelyMonotone_const_div_one_add_mul_pow (ha i) (hb i) r).isCompletelyMonotoneOnIoi + · intro x hx + exact (summable_const_div_one_add_mul_pow ha hb hs r hx.le).hasSum.tendsto_sum_nat + +/-- Every positive-index slope-power mixture of a summable nonnegative +linear product is completely monotone. -/ +theorem isCompletelyMonotoneOnIoi_tsum_pow_div_one_add_mul_pow + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (m r : ℕ) : + IsCompletelyMonotoneOnIoi + (fun x : ℝ ↦ ∑' i, a i ^ (m + 1) / (1 + a i * x) ^ r) := by + exact isCompletelyMonotoneOnIoi_tsum_const_div_one_add_mul_pow + ha (fun i ↦ pow_nonneg (ha i) _) (hs.pow_succ m) r + +/-- The rational-kernel side of the two-index logarithmic-derivative +hierarchy is completely monotone. The constant term retains the exponential +factor, including the `m = 0` boundary. -/ +theorem isCompletelyMonotoneOnIoi_factorial_resolvent_sum + {a : ℕ → ℝ} {gamma : ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (hg : 0 ≤ gamma) (k m : ℕ) : + IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (k.factorial : ℝ) * gamma * 0 ^ m + + ((k + m).factorial : ℝ) * + ∑' i, a i ^ (m + 1) / (1 + a i * x) ^ (k + m + 1)) := by + have hc := (isCompletelyMonotone_const + (mul_nonneg (mul_nonneg (Nat.cast_nonneg k.factorial) hg) + (pow_nonneg (show (0 : ℝ) ≤ 0 from le_rfl) m))).isCompletelyMonotoneOnIoi + have hp := (isCompletelyMonotoneOnIoi_tsum_pow_div_one_add_mul_pow ha hs m + (k + m + 1)).smul (Nat.cast_nonneg (k + m).factorial : (0 : ℝ) ≤ _) + apply (hc.add hp).congr + intro x _ + simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul] + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalSeriesDerivatives.lean b/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalSeriesDerivatives.lean new file mode 100644 index 000000000..f4a70d427 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalSeriesDerivatives.lean @@ -0,0 +1,102 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalMixtures +import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalDerivatives +import Mathlib.Analysis.Calculus.SmoothSeries +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Tactic.Ring + +/-! +# Differentiation of positive resolvent series + +Summability of the nonnegative slopes controls every positive slope power. +The reciprocal denominator is at least one on the nonnegative axis. These +two facts justify termwise differentiation on the open positive half-line. +-/ + +public section + +open Filter Topology + +namespace Real + +/-- Positive slope-power resolvent series can be differentiated termwise +on the positive half-line, with an explicit summable derivative bound. -/ +theorem hasDerivAt_tsum_pow_div_one_add_mul_pow + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (m q : ℕ) + {x : ℝ} (hx : 0 < x) : + HasDerivAt (fun y : ℝ ↦ ∑' i, a i ^ (m + 1) / (1 + a i * y) ^ (q + 1)) + (-((q + 1 : ℕ) : ℝ) * + ∑' i, a i ^ (m + 2) / (1 + a i * x) ^ (q + 2)) x := by + have hderiv (i : ℕ) (y : ℝ) (hy : y ∈ Set.Ioi (0 : ℝ)) : + HasDerivAt (fun z : ℝ ↦ a i ^ (m + 1) / (1 + a i * z) ^ (q + 1)) + (-((q + 1 : ℕ) : ℝ) * + (a i ^ (m + 2) / (1 + a i * y) ^ (q + 2))) y := by + have hne : 1 + a i * y ≠ 0 := + (lt_of_lt_of_le zero_lt_one (le_add_of_nonneg_right (mul_nonneg (ha i) hy.le))).ne' + convert hasDerivAt_const_div_one_add_mul_pow (a i) (a i ^ (m + 1)) q hne using 1 + rw [show m + 2 = (m + 1) + 1 by lia, pow_succ] + ring + have hbound (i : ℕ) (y : ℝ) (hy : y ∈ Set.Ioi (0 : ℝ)) : + ‖-((q + 1 : ℕ) : ℝ) * + (a i ^ (m + 2) / (1 + a i * y) ^ (q + 2))‖ ≤ + ((q + 1 : ℕ) : ℝ) * a i ^ (m + 2) := by + have hden : 1 ≤ (1 + a i * y) ^ (q + 2) := + one_le_pow₀ (le_add_of_nonneg_right (mul_nonneg (ha i) hy.le)) + have hkernel : 0 ≤ a i ^ (m + 2) / (1 + a i * y) ^ (q + 2) := + div_nonneg (pow_nonneg (ha i) _) (zero_le_one.trans hden) + rw [Real.norm_eq_abs, abs_mul, abs_neg, + abs_of_nonneg (Nat.cast_nonneg (q + 1)), abs_of_nonneg hkernel] + exact mul_le_mul_of_nonneg_left (div_le_self (pow_nonneg (ha i) _) hden) + (Nat.cast_nonneg _) + have hsum : Summable (fun i ↦ ((q + 1 : ℕ) : ℝ) * a i ^ (m + 2)) := by + simpa only [Nat.add_assoc] using (hs.pow_succ (m + 1)).mul_left ((q + 1 : ℕ) : ℝ) + have h := hasDerivAt_tsum_of_isPreconnected hsum isOpen_Ioi isPreconnected_Ioi + hderiv hbound (show (1 : ℝ) ∈ Set.Ioi 0 by norm_num) + (TauCeti.summable_const_div_one_add_mul_pow ha (fun i ↦ pow_nonneg (ha i) _) + (hs.pow_succ m) (q + 1) zero_le_one) hx + simpa only [tsum_mul_left] using h + +/-- Derivatives of a constant plus a positive resolvent sum have the +factorial slope-power representation at every positive argument. -/ +theorem iteratedDeriv_const_add_tsum_resolvent + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (gamma : ℝ) (m : ℕ) + {x : ℝ} (hx : 0 < x) : + iteratedDeriv m (fun y : ℝ ↦ gamma + ∑' i, a i / (1 + a i * y)) x = + (-1 : ℝ) ^ m * (gamma * 0 ^ m + (m.factorial : ℝ) * + ∑' i, a i ^ (m + 1) / (1 + a i * x) ^ (m + 1)) := by + induction m generalizing x with + | zero => simp + | succ m ih => + have heq : iteratedDeriv m (fun y : ℝ ↦ gamma + ∑' i, a i / (1 + a i * y)) + =ᶠ[𝓝 x] (fun y : ℝ ↦ (-1 : ℝ) ^ m * (gamma * 0 ^ m + + (m.factorial : ℝ) * ∑' i, a i ^ (m + 1) / (1 + a i * y) ^ (m + 1))) := + Filter.Eventually.mono + (isOpen_Ioi.mem_nhds (show x ∈ Set.Ioi (0 : ℝ) from hx)) fun y hy ↦ ih hy + have hd0 := hasDerivAt_tsum_pow_div_one_add_mul_pow ha hs m m hx + have hd := HasDerivAt.const_mul ((-1 : ℝ) ^ m) + ((hd0.const_mul (m.factorial : ℝ)).const_add (gamma * 0 ^ m)) + rw [iteratedDeriv_succ, heq.deriv_eq, hd.deriv] + simp only [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, + zero_pow (Nat.succ_ne_zero m), mul_zero, zero_add, pow_succ] + ring + +/-- Alternating signs cancel in the derivative representation, leaving a +nonnegative constant and a positive resolvent series when the data are nonnegative. -/ +theorem neg_one_pow_mul_iteratedDeriv_const_add_tsum_resolvent + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (gamma : ℝ) (m : ℕ) + {x : ℝ} (hx : 0 < x) : + (-1 : ℝ) ^ m * + iteratedDeriv m (fun y : ℝ ↦ gamma + ∑' i, a i / (1 + a i * y)) x = + gamma * 0 ^ m + (m.factorial : ℝ) * + ∑' i, a i ^ (m + 1) / (1 + a i * x) ^ (m + 1) := by + rw [iteratedDeriv_const_add_tsum_resolvent ha hs gamma m hx, ← mul_assoc, ← mul_pow] + norm_num + +end Real diff --git a/RealRooted/Mathlib/Analysis/CompletelyMonotone/ReciprocalHierarchy.lean b/RealRooted/Mathlib/Analysis/CompletelyMonotone/ReciprocalHierarchy.lean new file mode 100644 index 000000000..e653fef0e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/CompletelyMonotone/ReciprocalHierarchy.lean @@ -0,0 +1,142 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.EulerRodrigues +public import TauCeti.Analysis.CompletelyMonotone.Basic +import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventRodrigues +import TauCeti.Analysis.CompletelyMonotone.OpenClosure +import TauCeti.Analysis.CompletelyMonotone.Power +import TauCeti.Analysis.Calculus.IteratedFDeriv.Reciprocal +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# The reciprocal contribution to Rodrigues hierarchies + +Adding `c / x` to a logarithmic derivative adds `c m! / x^(m+1)` +to row zero of its signed Rodrigues hierarchy and adds zero to every +positive row. This is the contribution of a zero at the origin. +All analytic conclusions concern the open positive half-line. +-/ + +public section + +open Filter Topology +open scoped ContDiff + +namespace Real + +/-- Rodrigues differentiation respects local equality of the input. -/ +theorem eulerRodrigues_eq_of_eventuallyEq {g h : ℝ → ℝ} {x : ℝ} + (heq : g =ᶠ[𝓝 x] h) (m k : ℕ) : + eulerRodrigues g m k x = eulerRodrigues h m k x := by + have hmul : (fun y ↦ y ^ (m + k) * g y) =ᶠ[𝓝 x] + (fun y ↦ y ^ (m + k) * h y) := heq.mono fun _ hy ↦ congrArg (_ * ·) hy + rw [eulerRodrigues, eulerRodrigues, hmul.iteratedDeriv_eq k] + +/-- Rodrigues differentiation is additive under finite local smoothness. -/ +theorem eulerRodrigues_add {g h : ℝ → ℝ} {x : ℝ} (m k : ℕ) + (hg : ContDiffAt ℝ k g x) (hh : ContDiffAt ℝ k h x) : + eulerRodrigues (g + h) m k x = + eulerRodrigues g m k x + eulerRodrigues h m k x := by + have heq : (fun y ↦ y ^ (m + k) * (g + h) y) = + (fun y ↦ y ^ (m + k) * g y) + (fun y ↦ y ^ (m + k) * h y) := by + funext y + simp only [Pi.add_apply, mul_add] + simp only [eulerRodrigues, heq] + have hg' : ContDiffAt ℝ k (fun y ↦ y ^ (m + k) * g y) x := + (contDiffAt_id.pow (m + k)).mul hg + have hh' : ContDiffAt ℝ k (fun y ↦ y ^ (m + k) * h y) x := + (contDiffAt_id.pow (m + k)).mul hh + rw [iteratedDeriv_add hg' hh', add_div] + +/-- The reciprocal power matched to the normalization survives only in +row zero of the Rodrigues hierarchy. -/ +theorem eulerRodrigues_const_div_pow (c : ℝ) (m k : ℕ) {x : ℝ} (hx : x ≠ 0) : + eulerRodrigues (fun y : ℝ ↦ c / y ^ (m + 1)) m k x = + if k = 0 then c / x ^ (m + 1) else 0 := by + cases k with + | zero => simp only [eulerRodrigues_zero _ _ hx, ite_true] + | succ k => + have heq : (fun y : ℝ ↦ y ^ (m + (k + 1)) * (c / y ^ (m + 1))) =ᶠ[𝓝 x] + (fun y ↦ c * y ^ k) := by + filter_upwards [eventually_ne_nhds hx] with y hy + have he : m + (k + 1) = (m + 1) + k := by lia + rw [he, pow_add] + field_simp [hy] + rw [eulerRodrigues, heq.iteratedDeriv_eq (k + 1), iteratedDeriv_const_mul_field, + iteratedDeriv_pow, Nat.descFactorial_eq_zero_iff_lt.mpr k.lt_succ_self] + simp + +/-- A reciprocal power with nonnegative numerator is completely monotone +on the open positive half-line. -/ +theorem isCompletelyMonotoneOnIoi_const_div_pow {c : ℝ} (hc : 0 ≤ c) (m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ c / x ^ m) := by + apply ((TauCeti.isCompletelyMonotoneOnIoi_rpow_neg + (show 0 ≤ (m : ℝ) by positivity)).smul hc).congr + intro x hx + simp only [Pi.smul_apply, smul_eq_mul, Real.rpow_neg hx.le, Real.rpow_natCast, + div_eq_mul_inv] + +/-- Alternating differentiation of `c / x` produces the positive +factorial reciprocal power. -/ +theorem signed_iteratedDeriv_const_div (c : ℝ) (m : ℕ) (x : ℝ) : + (-1 : ℝ) ^ m * iteratedDeriv m (fun y : ℝ ↦ c / y) x = + c * (m.factorial : ℝ) / x ^ (m + 1) := by + rw [TauCeti.iteratedDeriv_const_div] + have hs : (-1 : ℝ) ^ m * (-1 : ℝ) ^ m = 1 := by + rw [← mul_pow] + simp + calc + _ = ((-1 : ℝ) ^ m * (-1 : ℝ) ^ m) * + (c * (m.factorial : ℝ) / x ^ (m + 1)) := by ring + _ = _ := by rw [hs, one_mul] + +/-- Adding a reciprocal kernel has an explicit effect on every signed +derivative of a smooth function on the positive half-line. -/ +theorem signed_iteratedDeriv_const_div_add {g : ℝ → ℝ} + (hg : ContDiffOn ℝ ∞ g (Set.Ioi 0)) (c : ℝ) (m : ℕ) {x : ℝ} (hx : 0 < x) : + (-1 : ℝ) ^ m * iteratedDeriv m (fun y : ℝ ↦ c / y + g y) x = + c * (m.factorial : ℝ) / x ^ (m + 1) + (-1 : ℝ) ^ m * iteratedDeriv m g x := by + have hc : ContDiffAt ℝ m (fun y : ℝ ↦ c / y) x := + contDiffAt_const.div contDiffAt_id hx.ne' + have hgm : ContDiffAt ℝ m g x := + (hg.contDiffAt (isOpen_Ioi.mem_nhds hx)).of_le (by simp) + change (-1 : ℝ) ^ m * iteratedDeriv m ((fun y : ℝ ↦ c / y) + g) x = _ + rw [iteratedDeriv_add hc hgm, mul_add, signed_iteratedDeriv_const_div] + +/-- A reciprocal addition to a completely monotone function contributes +only to row zero of the full signed Rodrigues hierarchy. -/ +theorem weighted_iteratedDeriv_const_div_add {g : ℝ → ℝ} + (hg : TauCeti.IsCompletelyMonotoneOnIoi g) (c : ℝ) (m k : ℕ) + {x : ℝ} (hx : 0 < x) : + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ c / z + g z) y) x = + (if k = 0 then c * (m.factorial : ℝ) / x ^ (m + 1) else 0) + + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ + y ^ (k + m) * iteratedDeriv m g y) x := by + let K : ℝ → ℝ := fun y ↦ c * (m.factorial : ℝ) / y ^ (m + 1) + let G : ℝ → ℝ := fun y ↦ (-1 : ℝ) ^ m * iteratedDeriv m g y + have heq : (fun y : ℝ ↦ (-1 : ℝ) ^ m * + iteratedDeriv m (fun z : ℝ ↦ c / z + g z) y) =ᶠ[𝓝 x] K + G := by + filter_upwards [isOpen_Ioi.mem_nhds hx] with y hy + exact signed_iteratedDeriv_const_div_add hg.contDiffOn c m hy + have hK : ContDiffAt ℝ k K x := + contDiffAt_const.div (contDiffAt_id.pow _) (pow_ne_zero _ hx.ne') + have hG : ContDiffAt ℝ k G x := + ((hg.neg_one_pow_mul_iteratedDeriv m).contDiffOn.contDiffAt + (isOpen_Ioi.mem_nhds hx)).of_le (by simp) + rw [← eulerRodrigues_signed_iteratedDeriv, eulerRodrigues_eq_of_eventuallyEq heq, + eulerRodrigues_add m k hK hG] + rw [show eulerRodrigues K m k x = + if k = 0 then c * (m.factorial : ℝ) / x ^ (m + 1) else 0 from + eulerRodrigues_const_div_pow _ m k hx.ne'] + rw [show G = fun y : ℝ ↦ (-1 : ℝ) ^ m * iteratedDeriv m g y from rfl, + eulerRodrigues_signed_iteratedDeriv] + +end Real diff --git a/RealRooted/Mathlib/Analysis/CompletelyMonotone/ResolventHierarchy.lean b/RealRooted/Mathlib/Analysis/CompletelyMonotone/ResolventHierarchy.lean new file mode 100644 index 000000000..bae9d8434 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/CompletelyMonotone/ResolventHierarchy.lean @@ -0,0 +1,133 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.CompletelyMonotone.Basic +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalMixtures +import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalSeriesDerivatives +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# The positive resolvent hierarchy + +The factorial resolvent kernels satisfy both ordinary derivative and Euler +recurrences. These identities connect the positive-series representation to +Zhang's two-index differential family, including its exponential boundary. +-/ + +public section + +namespace Real + +/-- The factorial resolvent family associated with summable linear slopes +and a constant logarithmic derivative. The parameters are not assumed positive +in the definition; positivity is required by its complete-monotonicity theorem. -/ +@[expose] noncomputable def weightedResolventSum + (a : ℕ → ℝ) (gamma : ℝ) (k m : ℕ) (x : ℝ) : ℝ := + (k.factorial : ℝ) * gamma * 0 ^ m + + ((k + m).factorial : ℝ) * + ∑' i, a i ^ (m + 1) / (1 + a i * x) ^ (k + m + 1) + +/-- Every member of the positive resolvent hierarchy is completely monotone. -/ +theorem isCompletelyMonotoneOnIoi_weightedResolventSum + {a : ℕ → ℝ} {gamma : ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (hg : 0 ≤ gamma) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (weightedResolventSum a gamma k m) := + TauCeti.isCompletelyMonotoneOnIoi_factorial_resolvent_sum ha hs hg k m + +/-- Differentiation increases the second index of the resolvent hierarchy +and changes its sign. -/ +theorem hasDerivAt_weightedResolventSum + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (gamma : ℝ) (k m : ℕ) {x : ℝ} (hx : 0 < x) : + HasDerivAt (weightedResolventSum a gamma k m) + (-weightedResolventSum a gamma k (m + 1) x) x := by + have hd0 := hasDerivAt_tsum_pow_div_one_add_mul_pow ha hs m (k + m) hx + have hd := (hd0.const_mul ((k + m).factorial : ℝ)).const_add + ((k.factorial : ℝ) * gamma * 0 ^ m) + dsimp only [weightedResolventSum] + apply hd.congr_deriv + rw [show k + (m + 1) = k + m + 1 by lia, Nat.factorial_succ, Nat.cast_mul] + simp only [Nat.add_assoc, zero_pow (Nat.succ_ne_zero m), mul_zero, zero_add] + ring + +/-- The denominator cancellation for positive resolvent series. -/ +private theorem tsum_resolvent_sub_mul_tsum + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (m q : ℕ) {x : ℝ} (hx : 0 ≤ x) : + (∑' i, a i ^ (m + 1) / (1 + a i * x) ^ (q + 1)) - + x * (∑' i, a i ^ (m + 2) / (1 + a i * x) ^ (q + 2)) = + ∑' i, a i ^ (m + 1) / (1 + a i * x) ^ (q + 2) := by + have h₁ := TauCeti.summable_const_div_one_add_mul_pow + ha (fun i ↦ pow_nonneg (ha i) _) (hs.pow_succ m) (q + 1) hx + have h₂ : Summable (fun i ↦ a i ^ (m + 2) / (1 + a i * x) ^ (q + 2)) := by + simpa only [Nat.add_assoc] using TauCeti.summable_const_div_one_add_mul_pow + ha (fun i ↦ pow_nonneg (ha i) _) (hs.pow_succ (m + 1)) (q + 2) hx + calc + _ = ∑' i, (a i ^ (m + 1) / (1 + a i * x) ^ (q + 1) - + x * (a i ^ (m + 2) / (1 + a i * x) ^ (q + 2))) := by + rw [h₁.tsum_sub (h₂.mul_left x), tsum_mul_left] + _ = _ := by + apply tsum_congr + intro i + have hne : 1 + a i * x ≠ 0 := + (lt_of_lt_of_le zero_lt_one + (le_add_of_nonneg_right (mul_nonneg (ha i) hx))).ne' + field_simp [hne, pow_succ] + ring + +/-- The Euler recurrence for the resolvent hierarchy. Its constant term +also satisfies the recurrence, including when the first index is zero. -/ +theorem mul_weightedResolventSum_add_mul_deriv + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (gamma : ℝ) (k m : ℕ) {x : ℝ} (hx : 0 < x) : + ((m + k + 1 : ℕ) : ℝ) * weightedResolventSum a gamma k m x + + x * deriv (weightedResolventSum a gamma k m) x = + weightedResolventSum a gamma (k + 1) m x := by + rw [(hasDerivAt_weightedResolventSum ha hs gamma k m hx).deriv] + let S : ℕ → ℕ → ℝ := fun p q ↦ + ∑' i, a i ^ (p + 1) / (1 + a i * x) ^ (q + 1) + have hsum : S m (k + m) - x * S (m + 1) (k + m + 1) = S m (k + m + 1) := by + simpa only [S, Nat.add_assoc] using tsum_resolvent_sub_mul_tsum ha hs m (k + m) hx.le + have hconstant : + ((m + k + 1 : ℕ) : ℝ) * ((k.factorial : ℝ) * gamma * 0 ^ m) = + ((k + 1).factorial : ℝ) * gamma * 0 ^ m := by + cases m with + | zero => simp [Nat.factorial_succ, mul_assoc] + | succ m => simp + have hfactorial : ((k + m + 1).factorial : ℝ) = + ((m + k + 1 : ℕ) : ℝ) * ((k + m).factorial : ℝ) := by + rw [Nat.factorial_succ, Nat.cast_mul] + congr 1 + exact_mod_cast (show k + m + 1 = m + k + 1 by lia) + simp only [weightedResolventSum, zero_pow (Nat.succ_ne_zero m), mul_zero, zero_add] + rw [show k + (m + 1) = k + m + 1 by lia, + show (k + 1) + m = k + m + 1 by lia] + change ((m + k + 1 : ℕ) : ℝ) * + ((k.factorial : ℝ) * gamma * 0 ^ m + ((k + m).factorial : ℝ) * S m (k + m)) + + x * (-(((k + m + 1).factorial : ℝ) * S (m + 1) (k + m + 1))) = + ((k + 1).factorial : ℝ) * gamma * 0 ^ m + + ((k + m + 1).factorial : ℝ) * S m (k + m + 1) + calc + _ = ((m + k + 1 : ℕ) : ℝ) * ((k.factorial : ℝ) * gamma * 0 ^ m) + + ((k + m + 1).factorial : ℝ) * + (S m (k + m) - x * S (m + 1) (k + m + 1)) := by rw [hfactorial]; ring + _ = _ := by rw [hconstant, hsum] + +/-- The zeroth Euler row is the alternating derivative of the associated +constant-plus-resolvent logarithmic derivative. -/ +theorem weightedResolventSum_zero_eq_signed_deriv + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (gamma : ℝ) (m : ℕ) {x : ℝ} (hx : 0 < x) : + weightedResolventSum a gamma 0 m x = + (-1 : ℝ) ^ m * + iteratedDeriv m (fun y : ℝ ↦ gamma + ∑' i, a i / (1 + a i * y)) x := by + simpa only [weightedResolventSum, Nat.factorial_zero, Nat.cast_one, one_mul, zero_add] + using (neg_one_pow_mul_iteratedDeriv_const_add_tsum_resolvent ha hs gamma m hx).symm + +end Real diff --git a/RealRooted/Mathlib/Analysis/CompletelyMonotone/ResolventRodrigues.lean b/RealRooted/Mathlib/Analysis/CompletelyMonotone/ResolventRodrigues.lean new file mode 100644 index 000000000..fa73d1151 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/CompletelyMonotone/ResolventRodrigues.lean @@ -0,0 +1,62 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.EulerRodrigues +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventHierarchy +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Tactic.Ring + +/-! +# Rodrigues derivatives of positive resolvent sums + +The Euler recurrence identifies monomial-normalized derivatives with the +positive factorial resolvent hierarchy. A separate algebraic identity puts +the result in the original signed weighted-derivative form. +-/ + +public section + +open Filter Topology +open scoped ContDiff + +namespace Real + +/-- A smooth function agreeing with the zeroth resolvent row has the whole +resolvent hierarchy as its normalized Rodrigues derivatives. -/ +theorem eulerRodrigues_eq_weightedResolventSum + {a : ℕ → ℝ} {gamma : ℝ} {g : ℝ → ℝ} {m : ℕ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (hg : ContDiffOn ℝ ∞ g (Set.Ioi 0)) + (hbase : Set.EqOn g (weightedResolventSum a gamma 0 m) (Set.Ioi 0)) + (k : ℕ) {x : ℝ} (hx : 0 < x) : + eulerRodrigues g m k x = weightedResolventSum a gamma k m x := by + induction k generalizing x with + | zero => rw [eulerRodrigues_zero g m hx.ne']; exact hbase hx + | succ k ih => + have heq : eulerRodrigues g m k =ᶠ[𝓝 x] weightedResolventSum a gamma k m := + Filter.Eventually.mono + (isOpen_Ioi.mem_nhds (show x ∈ Set.Ioi (0 : ℝ) from hx)) fun y hy ↦ ih hy + rw [eulerRodrigues_succ hg m k hx, ih hx, heq.deriv_eq] + simpa only [Nat.cast_add, Nat.cast_one] using + mul_weightedResolventSum_add_mul_deriv ha hs gamma k m hx + +/-- Moving the constant alternating sign through Rodrigues differentiation +gives the original weighted-derivative expression. This algebraic identity +also holds at zero with Lean's usual totalized division convention. -/ +theorem eulerRodrigues_signed_iteratedDeriv (L : ℝ → ℝ) (m k : ℕ) (x : ℝ) : + eulerRodrigues (fun y : ℝ ↦ (-1 : ℝ) ^ m * iteratedDeriv m L y) m k x = + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ + y ^ (k + m) * iteratedDeriv m L y) x := by + have heq : (fun y : ℝ ↦ y ^ (m + k) * ((-1 : ℝ) ^ m * iteratedDeriv m L y)) = + (fun y : ℝ ↦ (-1 : ℝ) ^ m * (y ^ (k + m) * iteratedDeriv m L y)) := by + funext y + rw [Nat.add_comm m k] + ring + rw [eulerRodrigues, heq, iteratedDeriv_const_mul_field, div_pow] + ring + +end Real diff --git a/RealRooted/Mathlib/Analysis/Complex/AbsoluteZeroHeatTrace.lean b/RealRooted/Mathlib/Analysis/Complex/AbsoluteZeroHeatTrace.lean new file mode 100644 index 000000000..7d359fbe6 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/AbsoluteZeroHeatTrace.lean @@ -0,0 +1,152 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumLaplace +import Mathlib.Analysis.Complex.CauchyIntegral +public import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralIndex +import TauCeti.Analysis.Meromorphic.Divisor +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas + +/-! +# Unconditional heat estimates from absolute zero moduli + +The trace based on absolute zero moduli is completely monotone for every +finite-order entire function nonzero at the origin. These spectral facts +do not require real zeros or RH. The conditional content of the xi results +is the identification of these Laplace moments with its actual logarithmic +derivatives, which additionally uses the negative-real-zero structure. +-/ + +public section + +open Filter MeasureTheory Topology + +namespace Complex + +/-- Ordinary real derivatives of the native absolute-zero trace equal +the signed spectral moment sums. -/ +theorem iteratedDeriv_zeroHeatTrace_of_order {f : ℂ → ℂ} {rho p t : ℝ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) (horder : TauCeti.OrderLE f rho) + (hp : rho < p) (hp0 : 0 ≤ p) (k : ℕ) (ht : 0 < t) : + iteratedDeriv k (zeroHeatTrace f) t = + (-1 : ℝ) ^ k * Real.exponentialMomentSum (zeroSpectralRate f) k t := by + have heq : zeroHeatTrace f =ᶠ[𝓝 t] + Real.exponentialMomentSum (zeroSpectralRate f) 0 := + Filter.Eventually.mono (isOpen_Ioi.mem_nhds ht) fun _ hy ↦ + zeroHeatTrace_eq_exponentialMomentSum hf h0 horder hp hp0 hy + rw [heq.iteratedDeriv_eq k] + exact Real.iteratedDeriv_exponentialMomentSum_zero (zeroSpectralRate_pos hf h0) hp0 + (summable_zeroSpectralRate_rpow_neg hf horder hp) k ht + +/-- A nonempty native spectrum makes every alternating heat derivative +strictly positive, without any assumption on the arguments of the zeros. -/ +theorem signed_iteratedDeriv_zeroHeatTrace_pos_of_order + {f : ℂ → ℂ} {rho : ℝ} [Nonempty (zeroSpectralIndex f)] + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) (horder : TauCeti.OrderLE f rho) + (k : ℕ) {t : ℝ} (ht : 0 < t) : + 0 < (-1 : ℝ) ^ k * iteratedDeriv k (zeroHeatTrace f) t := by + let p : ℝ := max rho 0 + 1 + have hp : rho < p := by dsimp [p]; linarith [le_max_left rho 0] + have hp0 : 0 ≤ p := by dsimp [p]; linarith [le_max_right rho 0] + rw [iteratedDeriv_zeroHeatTrace_of_order hf h0 horder hp hp0 k ht, + ← mul_assoc, ← mul_pow] + simp only [neg_mul_neg, one_mul, one_pow] + exact Real.exponentialMomentSum_pos (zeroSpectralRate_pos hf h0) hp0 + (summable_zeroSpectralRate_rpow_neg hf horder hp) k ht + +/-- Complete monotonicity of the absolute-zero heat trace is unconditional +for finite-order entire functions nonzero at zero. -/ +theorem isCompletelyMonotoneOnIoi_zeroHeatTrace_of_order + {f : ℂ → ℂ} {rho : ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (horder : TauCeti.OrderLE f rho) : + TauCeti.IsCompletelyMonotoneOnIoi (zeroHeatTrace f) := by + let p : ℝ := max rho 0 + 1 + have hp : rho < p := by dsimp [p]; linarith [le_max_left rho 0] + have hp0 : 0 ≤ p := by dsimp [p]; linarith [le_max_right rho 0] + apply (Real.isCompletelyMonotoneOnIoi_exponentialMomentSum + (zeroSpectralRate_pos hf h0) hp0 + (summable_zeroSpectralRate_rpow_neg hf horder hp) 0).congr + intro t ht + exact zeroHeatTrace_eq_exponentialMomentSum hf h0 horder hp hp0 ht + +/-- Every exponent above the actual order controls the absolute-zero +heat trace near zero, without a real-zero hypothesis. -/ +theorem isBigO_iteratedDeriv_zeroHeatTrace_nhdsWithin_of_order + {f : ℂ → ℂ} {rho p : ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (horder : TauCeti.OrderLE f rho) (hp : rho < p) (hp0 : 0 ≤ p) (k : ℕ) : + (iteratedDeriv k (zeroHeatTrace f)) =O[𝓝[>] (0 : ℝ)] + (fun t ↦ t ^ (-(p + (k : ℝ)))) := by + have hb := Real.isBigO_iteratedDeriv_exponentialMomentSum_zero_nhdsWithin + (zeroSpectralRate_pos hf h0) hp0 + (summable_zeroSpectralRate_rpow_neg hf horder hp) k + apply hb.congr' _ (Filter.Eventually.of_forall fun _ ↦ rfl) + filter_upwards [self_mem_nhdsWithin] with t (ht : 0 < t) + rw [iteratedDeriv_zeroHeatTrace_of_order hf h0 horder hp hp0 k ht, + Real.iteratedDeriv_exponentialMomentSum_zero (zeroSpectralRate_pos hf h0) hp0 + (summable_zeroSpectralRate_rpow_neg hf horder hp) k ht] + +/-- Nonvanishing at the origin supplies a common positive lower bound for +all absolute zero moduli, by continuity alone. -/ +theorem exists_pos_le_zeroSpectralRate {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) : + ∃ b : ℝ, 0 < b ∧ ∀ i : zeroSpectralIndex f, b ≤ zeroSpectralRate f i := by + obtain ⟨b, hb, hball⟩ := Metric.eventually_nhds_iff.mp + (hf.continuous.continuousAt.eventually_ne h0) + refine ⟨b, hb, fun i ↦ ?_⟩ + by_contra hn + have hzero : f (i.1 : ℂ) = 0 := + (hf.analyticAt _).apply_eq_zero_of_divisor_ne_zero i.1.property + exact (hball (by + simpa only [dist_zero_right, zeroSpectralRate] using lt_of_not_ge hn)) hzero + +/-- A common positive exponential rate controls every absolute-zero heat +derivative at large time, independently of the locations' arguments. -/ +theorem exists_isBigO_iteratedDeriv_zeroHeatTrace_atTop_of_order + {f : ℂ → ℂ} {rho : ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (horder : TauCeti.OrderLE f rho) : + ∃ b : ℝ, 0 < b ∧ ∀ k : ℕ, + (iteratedDeriv k (zeroHeatTrace f)) =O[atTop] (fun t ↦ Real.exp (-b * t)) := by + obtain ⟨b, hb, hbound⟩ := exists_pos_le_zeroSpectralRate hf h0 + let p : ℝ := max rho 0 + 1 + have hp : rho < p := by dsimp [p]; linarith [le_max_left rho 0] + have hp0 : 0 ≤ p := by dsimp [p]; linarith [le_max_right rho 0] + refine ⟨b, hb, fun k ↦ ?_⟩ + have hg := Real.isBigO_iteratedDeriv_exponentialMomentSum_zero_atTop + (zeroSpectralRate_pos hf h0) hp0 + (summable_zeroSpectralRate_rpow_neg hf horder hp) hbound k + apply hg.congr' _ (Filter.Eventually.of_forall fun _ ↦ rfl) + filter_upwards [eventually_gt_atTop (0 : ℝ)] with t ht + rw [iteratedDeriv_zeroHeatTrace_of_order hf h0 horder hp hp0 k ht, + Real.iteratedDeriv_exponentialMomentSum_zero (zeroSpectralRate_pos hf h0) hp0 + (summable_zeroSpectralRate_rpow_neg hf horder hp) k ht] + +/-- Below order one, absolute-zero heat traces have integrable Laplace +moments even at the parameter zero; the value is the repeated inverse sum. -/ +theorem laplace_zeroHeatTrace_of_order_lt_one {f : ℂ → ℂ} {rho x : ℝ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) (horder : TauCeti.OrderLE f rho) + (hrho : rho < 1) (k : ℕ) (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * zeroHeatTrace f t) (Set.Ioi 0) ∧ + (∫ t : ℝ in Set.Ioi 0, Real.exp (-x * t) * t ^ k * zeroHeatTrace f t) = + ∑' i : zeroSpectralIndex f, (k.factorial : ℝ) / (x + zeroSpectralRate f i) ^ (k + 1) := by + have := countable_zeroSpectralIndex hf h0 horder + let p : ℝ := (max rho 0 + 1) / 2 + have hm : max rho 0 < 1 := max_lt hrho zero_lt_one + have hp : rho < p := by dsimp [p]; linarith [le_max_left rho 0] + have hp0 : 0 ≤ p := by dsimp [p]; linarith [le_max_right rho 0] + have hp1 : p ≤ 1 := by dsimp [p]; linarith + have hspec := Real.laplace_exponentialMomentSum_of_inverse_moment + (zeroSpectralRate_pos hf h0) hp0 hp1 + (summable_zeroSpectralRate_rpow_neg hf horder hp) k hx + have heq : (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * zeroHeatTrace f t) =ᵐ[ + volume.restrict (Set.Ioi 0)] + (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Real.exponentialMomentSum (zeroSpectralRate f) 0 t) := by + filter_upwards [ae_restrict_mem measurableSet_Ioi] with t (ht : 0 < t) + rw [zeroHeatTrace_eq_exponentialMomentSum hf h0 horder hp hp0 ht] + exact ⟨hspec.1.congr heq.symm, (integral_congr_ae heq).trans hspec.2⟩ + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/CanonicalSupport.lean b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/CanonicalSupport.lean new file mode 100644 index 000000000..1d6f8d387 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/CanonicalSupport.lean @@ -0,0 +1,50 @@ +/- +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 TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import TauCeti.Analysis.Complex.CanonicalProduct.Convergence + +/-! +# Infinite zero sets require infinitely many active canonical factors +-/ + +public section + +namespace Complex + +/-- For a nonzero scalar prefactor, infinitely many real zeros of a +canonical expression force infinite support of its real slopes. Origin +factors contribute only the single possible zero at the origin. -/ +theorem infinite_support_of_canonical_real_zeros {ι : Type*} {a : ι → ℝ} + (ha : Summable (fun i ↦ a i ^ 2)) {f : ℂ → ℂ} {c b : ℂ} (hc : c ≠ 0) + (k : ℕ) (α : ℝ) + (heq : ∀ z, f z = c * z ^ k * exp (-(α : ℂ) * z ^ 2 + b * z) * + ∏' i, weierstrassFactor 1 ((a i : ℂ) * z)) + (hinf : Set.Infinite {x : ℝ | f x = 0}) : (Function.support a).Infinite := by + have hs : Summable (fun i ↦ ‖(a i : ℂ)‖ ^ 2) := by + simpa only [norm_real, Real.norm_eq_abs, sq_abs] using ha + intro hfin + apply hinf + apply ((hfin.image (fun i ↦ (a i)⁻¹)).insert 0).subset + intro x hx + by_cases hx0 : x = 0 + · exact Set.mem_insert_iff.mpr (Or.inl hx0) + · apply Set.mem_insert_of_mem + have hxC : (x : ℂ) ≠ 0 := ofReal_ne_zero.mpr hx0 + have hz : (∏' i, weierstrassFactor 1 ((a i : ℂ) * (x : ℂ))) = 0 := by + have h := (heq x).symm.trans hx + exact (mul_eq_zero.mp h).resolve_left + (mul_ne_zero (mul_ne_zero hc (pow_ne_zero k hxC)) (exp_ne_zero _)) + obtain ⟨i, hi⟩ := (tprod_weierstrassFactor_one_eq_zero_iff + (fun i ↦ (a i : ℂ)) hs (x : ℂ)).mp hz + have hix : a i * x = 1 := by exact_mod_cast hi + have hi0 : a i ≠ 0 := by intro h; simp [h] at hix + refine ⟨i, hi0, ?_⟩ + field_simp [hi0] + nlinarith + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GaussianCoefficient.lean b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GaussianCoefficient.lean new file mode 100644 index 000000000..7531609e2 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GaussianCoefficient.lean @@ -0,0 +1,61 @@ +/- +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 TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.ImaginaryAxisBound + +/-! +# Sharp Gaussian bounds control the native canonical Gaussian coefficient +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- A positive quadratic exponential cannot eventually be bounded by a +constant multiple of a strictly slower quadratic exponential. -/ +private theorem le_of_exp_sq_le {A B c C : ℝ} (hc : 0 < c) + (h : ∀ y : ℝ, 1 ≤ y → c * Real.exp (A * y ^ 2) ≤ C * Real.exp (B * y ^ 2)) : + A ≤ B := by + by_contra hnot + have hAB : 0 < A - B := sub_pos.mpr (lt_of_not_ge hnot) + have hlim : Tendsto (fun y : ℝ ↦ Real.exp ((A - B) * y ^ 2)) atTop atTop := + Real.tendsto_exp_atTop.comp + ((tendsto_pow_atTop (by decide : (2 : ℕ) ≠ 0)).const_mul_atTop hAB) + obtain ⟨y, hy, hlarge⟩ := + ((eventually_ge_atTop (1 : ℝ)).and (hlim.eventually_gt_atTop (C / c))).exists + have hsmall : Real.exp ((A - B) * y ^ 2) ≤ C / c := by + rw [sub_mul, Real.exp_sub, div_le_div_iff₀ (Real.exp_pos _) hc] + simpa only [mul_comm c] using h y hy + exact (not_le_of_gt hlarge) hsmall + +/-- For a nonzero real canonical expression, every sharp Gaussian majorant +bounds its native Gaussian coefficient. The canonical sum may be finite or +empty, and the expression may have any origin multiplicity. -/ +theorem gaussian_le_of_canonical_norm_bound {ι : Type*} {f : ℂ → ℂ} + (a : ι → ℝ) (m : ι → ℕ) + (hm : Summable (fun i ↦ (m i : ℝ) * a i ^ 2)) + {c : ℝ} (hc : c ≠ 0) (b A : ℝ) (k : ℕ) {α : ℝ} + (heq : ∀ z, f z = (c : ℂ) * z ^ k * exp (-(A : ℂ) * z ^ 2 + (b : ℂ) * z) * + ∏' i, weierstrassFactor 1 ((a i : ℂ) * z) ^ m i) + (hbound : ∀ ε > 0, ∃ C > 0, ∀ z, + ‖f z‖ ≤ C * Real.exp ((α + ε) * ‖z‖ ^ 2)) : A ≤ α := by + by_contra hnot + have hA : α < A := lt_of_not_ge hnot + obtain ⟨C, _, hC⟩ := hbound ((A - α) / 2) (half_pos (sub_pos.mpr hA)) + have hle : A ≤ α + (A - α) / 2 := by + apply le_of_exp_sq_le (abs_pos.mpr hc) (C := C) + intro y hy + have hlower := exp_sq_le_norm_canonical_on_imaginary a m hm c b A k hy + rw [← heq ((y : ℂ) * I)] at hlower + have h := hlower.trans (hC ((y : ℂ) * I)) + simpa only [norm_mul, norm_I, mul_one, norm_real, Real.norm_eq_abs, sq_abs] using h + linarith + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GaussianProductBound.lean b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GaussianProductBound.lean new file mode 100644 index 000000000..0a677d56c --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GaussianProductBound.lean @@ -0,0 +1,88 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.MinimalType +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Subquadratic + +/-! +# Gaussian type bounds for canonical products + +The genus-one part and every subquadratic prefactor use arbitrarily small +quadratic allowances. The actual Gaussian coefficient is retained, including +the coefficient-zero boundary, origin factors, and zero scalar factors. +-/ + +public section + +namespace Complex + +/-- A subquadratic prefactor times a real Gaussian and a genus-one product +has a global norm bound with any coefficient above the Gaussian coefficient. -/ +theorem exists_norm_gaussian_tprod_le_exp_sq {ι : Type*} + (a : ι → ℂ) (m : ι → ℕ) + (hm : Summable (fun i => (m i : ℝ) * ‖a i‖ ^ 2)) + {g : ℂ → ℂ} (hg : Continuous g) {ρ : ℝ} + (horder : TauCeti.OrderLE g ρ) (hρ : ρ < 2) + {α : ℝ} (hα : 0 ≤ α) {ε : ℝ} (hε : 0 < ε) : + ∃ C > 0, ∀ z : ℂ, + ‖g z * exp (-(α : ℂ) * z ^ 2) * + ∏' i, weierstrassFactor 1 (a i * z) ^ m i‖ ≤ + C * Real.exp ((α + ε) * ‖z‖ ^ 2) := by + obtain ⟨A, hA, hAbound⟩ := horder.exists_norm_le_mul_exp_sq hg hρ (half_pos hε) + obtain ⟨B, hB, hBbound⟩ := exists_norm_tprod_weierstrass_le_exp_sq + a m hm (half_pos hε) + refine ⟨A * B, mul_pos hA hB, fun z => ?_⟩ + have hgauss : ‖exp (-(α : ℂ) * z ^ 2)‖ ≤ Real.exp (α * ‖z‖ ^ 2) := by + calc + _ ≤ Real.exp ‖-(α : ℂ) * z ^ 2‖ := norm_exp_le_exp_norm _ + _ = _ := by + rw [Complex.norm_mul, norm_neg, norm_pow, norm_real, Real.norm_eq_abs, + abs_of_nonneg hα] + calc + _ = ‖g z‖ * ‖exp (-(α : ℂ) * z ^ 2)‖ * + ‖∏' i, weierstrassFactor 1 (a i * z) ^ m i‖ := by rw [norm_mul, norm_mul] + _ ≤ (A * Real.exp (ε / 2 * ‖z‖ ^ 2)) * Real.exp (α * ‖z‖ ^ 2) * + (B * Real.exp (ε / 2 * ‖z‖ ^ 2)) := by + gcongr + · exact hAbound z + · exact hBbound z + _ = _ := by + rw [show (α + ε) * ‖z‖ ^ 2 = + ε / 2 * ‖z‖ ^ 2 + α * ‖z‖ ^ 2 + ε / 2 * ‖z‖ ^ 2 by ring, + Real.exp_add, Real.exp_add] + ring + +/-- The literal canonical expression, with arbitrary origin order and scalar, +has arbitrarily sharp Gaussian type. Complex slopes and linear parameters are +allowed; LP membership is not needed for this analytic estimate. -/ +theorem exists_norm_canonicalProduct_le_exp_sq {ι : Type*} + (a : ι → ℂ) (m : ι → ℕ) + (hm : Summable (fun i => (m i : ℝ) * ‖a i‖ ^ 2)) + (c b : ℂ) (k : ℕ) {α : ℝ} (hα : 0 ≤ α) {ε : ℝ} (hε : 0 < ε) : + ∃ C > 0, ∀ z : ℂ, + ‖c * z ^ k * exp (-(α : ℂ) * z ^ 2 + b * z) * + ∏' i, weierstrassFactor 1 (a i * z) ^ m i‖ ≤ + C * Real.exp ((α + ε) * ‖z‖ ^ 2) := by + let g : ℂ → ℂ := fun z => c * z ^ k * exp (b * z) + have hg : Continuous g := by fun_prop + have ho : TauCeti.OrderLE g 1 := by + have hp := (Polynomial.orderLE_eval (Polynomial.C c * Polynomial.X ^ k)).mono + (by norm_num : (0 : ℝ) ≤ 1) + simpa only [g, Pi.mul_def, Polynomial.eval_mul, Polynomial.eval_C, + Polynomial.eval_pow, Polynomial.eval_X] using hp.mul (TauCeti.orderLE_cexp_mul b) + obtain ⟨C, hC, hbound⟩ := exists_norm_gaussian_tprod_le_exp_sq + a m hm hg ho (by norm_num) hα hε + refine ⟨C, hC, fun z => ?_⟩ + convert hbound z using 1 + congr 1 + dsimp only [g] + rw [exp_add] + ring + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GenusOne.lean b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GenusOne.lean new file mode 100644 index 000000000..52d199773 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GenusOne.lean @@ -0,0 +1,98 @@ +/- +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 TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import TauCeti.Analysis.Complex.CanonicalProduct.Convergence + +/-! +# Entire functions of genus one star + +Pólya's genus `1*` consists of a nonnegative Gaussian times an entire function of +genus at most one. The canonical-product definition below allows arbitrary +complex zeros and a complex linear exponential; it does not impose real zeros +or membership in the Laguerre--Pólya class. Repeated slopes encode multiplicities, +and zero slopes allow finite products. The origin multiplicity is recorded +separately. As in the classical definition of genus, the zero function is excluded. + +This class includes genus-one functions of order strictly between one and two. +-/ + +public section + +open Set +open scoped ComplexConjugate + +namespace Complex + +/-- A Gaussian times an entire canonical product of genus at most one, with a +nonnegative real Gaussian parameter. This is Pólya's genus `1*`. -/ +@[expose] def HasGenusOneStar (f : ℂ → ℂ) : Prop := + ∃ (c b : ℂ) (a : ℝ) (m : ℕ) (u : ℕ → ℂ), c ≠ 0 ∧ 0 ≤ a ∧ + Summable (fun n => ‖u n‖ ^ 2) ∧ ∀ z, + f z = c * z ^ m * exp (-(a : ℂ) * z ^ 2 + b * z) * + ∏' n, weierstrassFactor 1 (u n * z) + +/-- Functions of genus one star are entire. -/ +theorem HasGenusOneStar.differentiable {f : ℂ → ℂ} (hf : HasGenusOneStar f) : + Differentiable ℂ f := by + obtain ⟨c, b, a, m, u, _, _, hu, heq⟩ := hf + have hP := differentiable_tprod_weierstrassFactor_one u hu + rw [show f = _ from funext heq] + exact ((Differentiable.mul (by fun_prop) (by fun_prop)).mul hP) + +/-- A genus-one-star function is not identically zero, even when it vanishes at the origin. -/ +theorem HasGenusOneStar.ne_zero {f : ℂ → ℂ} (hf : HasGenusOneStar f) : f ≠ 0 := by + obtain ⟨c, b, a, m, u, hc, _, hu, heq⟩ := hf + let g : ℂ → ℂ := fun z => c * exp (-(a : ℂ) * z ^ 2 + b * z) * + ∏' n, weierstrassFactor 1 (u n * z) + have hg : Differentiable ℂ g := + (Differentiable.mul (by fun_prop) (by fun_prop)).mul + (differentiable_tprod_weierstrassFactor_one u hu) + have hp : AnalyticOnNhd ℂ (fun z : ℂ => z ^ m) univ := by fun_prop + intro hzero + have hprod (z : ℂ) (_ : z ∈ univ) : z ^ m * g z = 0 := by + have hz := heq z + rw [hzero, Pi.zero_apply] at hz + dsimp only [g] + linear_combination -hz + rcases hp.eq_zero_or_eq_zero_of_mul_eq_zero (fun z _ => hg.analyticAt z) + hprod isPreconnected_univ with hp0 | hg0 + · simpa using hp0 1 (mem_univ _) + · apply hc + simpa [g] using hg0 0 (mem_univ _) + +/-- Multiplication by a nonnegative Gaussian preserves genus one star. -/ +theorem HasGenusOneStar.mul_exp_neg_mul_sq {f : ℂ → ℂ} (hf : HasGenusOneStar f) + {d : ℝ} (hd : 0 ≤ d) : HasGenusOneStar (fun z => f z * exp (-(d : ℂ) * z ^ 2)) := by + obtain ⟨c, b, a, m, u, hc, ha, hu, heq⟩ := hf + refine ⟨c, b, a + d, m, u, hc, add_nonneg ha hd, hu, fun z => ?_⟩ + dsimp only + rw [heq] + have hexp : exp (-(a : ℂ) * z ^ 2 + b * z) * exp (-(d : ℂ) * z ^ 2) = + exp (-(↑(a + d) : ℂ) * z ^ 2 + b * z) := by + rw [← exp_add] + congr 1 + push_cast + ring + linear_combination c * z ^ m * (∏' n, weierstrassFactor 1 (u n * z)) * hexp + +/-- Conjugation symmetry descends through any power of the variable in a continuous cofactor. -/ +theorem conj_of_pow_mul {g : ℂ → ℂ} (hg : Continuous g) (m : ℕ) + (hc : ∀ z, (conj z) ^ m * g (conj z) = conj (z ^ m * g z)) : + ∀ z, g (conj z) = conj (g z) := by + have heq : (fun z => g (conj z)) = fun z => conj (g z) := by + apply Continuous.ext_on (dense_compl_singleton (0 : ℂ)) + (hg.comp continuous_conj) (continuous_conj.comp hg) + intro z hz + have hz0 : z ≠ 0 := by simpa using hz + have hcz : conj z ≠ 0 := by simpa using hz0 + have h := hc z + rw [map_mul, map_pow] at h + exact mul_left_cancel₀ (pow_ne_zero m hcz) h + exact fun z => congrFun heq z + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GenusOneSplit.lean b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GenusOneSplit.lean new file mode 100644 index 000000000..694ba07b8 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GenusOneSplit.lean @@ -0,0 +1,73 @@ +/- +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 TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import TauCeti.Analysis.Complex.CanonicalProduct.Convergence +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicityProduct + +/-! +# Extracting summable linear factors from genus-one canonical products + +Removing `E₁(a z)` as a pure factor `1 - a z` contributes `exp(a z)` +to the cofactor. The quadratic Gaussian coefficient is unchanged. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- A summable real genus-one family equals its pure linear product times +the exponential of its slope sum, including points where factors vanish. -/ +theorem hasProd_weierstrassFactor_one_of_summable {ι : Type*} {a : ι → ℝ} + (ha : Summable a) (z : ℂ) : + HasProd (fun i ↦ weierstrassFactor 1 ((a i : ℂ) * z)) + ((∏' i, (1 - (a i : ℂ) * z)) * exp ((∑' i, a i : ℝ) * z)) := by + have hlin : HasProd (fun i ↦ 1 - (a i : ℂ) * z) + (∏' i, (1 - (a i : ℂ) * z)) := by + simpa only [ofReal_neg, neg_mul, sub_eq_add_neg] using + (hasProdLocallyUniformlyOn_one_add_ofReal_mul ha.neg).hasProd (Set.mem_univ z) + have hexp := ((Complex.hasSum_ofReal.mpr ha.hasSum).mul_right z).cexp + simpa only [Function.comp_def, weierstrassFactor_one_left] using hlin.mul hexp + +/-- An injectively indexed summable subfamily factors from a square-summable +genus-one product as a pure linear product and an explicit linear exponential. -/ +theorem tprod_weierstrassFactor_one_eq_linear_mul_compl {ι : Type*} + {a : ι → ℝ} (ha : Summable (fun i ↦ a i ^ 2)) (e : ℕ ↪ ι) + (he : Summable (fun n ↦ a (e n))) (z : ℂ) : + (∏' i, weierstrassFactor 1 ((a i : ℂ) * z)) = + ((∏' n, (1 - (a (e n) : ℂ) * z)) * exp ((∑' n, a (e n) : ℝ) * z)) * + ∏' i : {i // i ∉ Set.range e}, weierstrassFactor 1 ((a i : ℂ) * z) := by + have hselected := hasProd_weierstrassFactor_one_of_summable he z + have hselected' : HasProd + (fun i : Set.range e ↦ weierstrassFactor 1 ((a i : ℂ) * z)) + ((∏' n, (1 - (a (e n) : ℂ) * z)) * exp ((∑' n, a (e n) : ℝ) * z)) := + (e.injective.hasProd_range_iff + (f := fun i ↦ weierstrassFactor 1 ((a i : ℂ) * z))).mpr hselected + have hs : Summable (fun i : {i // i ∉ Set.range e} ↦ ‖(a i : ℂ)‖ ^ 2) := by + simpa only [norm_real, Real.norm_eq_abs, sq_abs, Function.comp_def] using ha.subtype + (fun i ↦ i ∉ Set.range e) + have hcompl := (hasProdLocallyUniformlyOn_weierstrassFactor_one + (fun i : {i // i ∉ Set.range e} ↦ (a i : ℂ)) hs).hasProd (Set.mem_univ z) + exact (hselected'.mul_compl hcompl).tprod_eq + +/-- Weighted genus-one products can be indexed by individual copies of +their factors. The equality is valid at zeros as well as nonzero points. -/ +theorem tprod_weierstrassFactor_one_pow_eq_fin_copies {ι : Type*} + (a : ι → ℂ) (m : ι → ℕ) + (hm : Summable (fun i ↦ (m i : ℝ) * ‖a i‖ ^ 2)) (z : ℂ) : + (∏' i, weierstrassFactor 1 (a i * z) ^ m i) = + ∏' j : Σ i, Fin (m i), weierstrassFactor 1 (a j.1 * z) := by + have hs : Summable (fun j : Σ i, Fin (m i) ↦ ‖a j.1‖ ^ 2) := + (TauCeti.summable_sigma_fin_iff (fun i ↦ sq_nonneg ‖a i‖) m).mpr hm + exact (HasProd.sigma_fin_const + ((hasProdLocallyUniformlyOn_weierstrassFactor_one + (fun j : Σ i, Fin (m i) ↦ a j.1) hs).hasProd (Set.mem_univ z))).tprod_eq + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/ImaginaryAxisBound.lean b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/ImaginaryAxisBound.lean new file mode 100644 index 000000000..7140b03c4 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/ImaginaryAxisBound.lean @@ -0,0 +1,70 @@ +/- +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 TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import TauCeti.Analysis.Complex.CanonicalProduct.Convergence +import Mathlib.Topology.Algebra.InfiniteSum.Field + +/-! +# Lower bounds for real canonical products on the imaginary axis +-/ + +public section + +namespace Complex + +/-- Every real genus-one factor has norm at least one on the imaginary axis. -/ +theorem one_le_norm_weierstrassFactor_one_mul_I (a y : ℝ) : + 1 ≤ ‖weierstrassFactor 1 ((a : ℂ) * ((y : ℂ) * I))‖ := by + rw [weierstrassFactor_one_left, norm_mul, norm_exp] + have hre : ((a : ℂ) * ((y : ℂ) * I)).re = 0 := by simp + rw [hre, Real.exp_zero, mul_one] + simpa only [sub_re, one_re, hre, sub_zero, abs_one] using + abs_re_le_norm (1 - (a : ℂ) * ((y : ℂ) * I)) + +/-- A convergent real genus-one product, including repeated factors, has +norm at least one at every point of the imaginary axis. -/ +theorem one_le_norm_tprod_weierstrassFactor_one_mul_I {ι : Type*} + (a : ι → ℝ) (m : ι → ℕ) + (hm : Summable (fun i ↦ (m i : ℝ) * a i ^ 2)) (y : ℝ) : + 1 ≤ ‖∏' i, weierstrassFactor 1 ((a i : ℂ) * ((y : ℂ) * I)) ^ m i‖ := by + have hs : Summable (fun i ↦ (m i : ℝ) * ‖(a i : ℂ)‖ ^ 2) := by + simpa only [norm_real, Real.norm_eq_abs, sq_abs] using hm + have hp := (hasProdLocallyUniformlyOn_weierstrassFactor_one_pow + (fun i ↦ (a i : ℂ)) m hs).hasProd (Set.mem_univ ((y : ℂ) * I)) + refine ge_of_tendsto hp.norm (Filter.Eventually.of_forall fun s ↦ ?_) + apply Finset.one_le_prod₀ + intro i _ + rw [norm_pow] + exact one_le_pow₀ (one_le_norm_weierstrassFactor_one_mul_I (a i) y) + +/-- The real Gaussian coefficient gives a lower bound for the complete +canonical expression on the imaginary axis outside the unit disk. -/ +theorem exp_sq_le_norm_canonical_on_imaginary {ι : Type*} + (a : ι → ℝ) (m : ι → ℕ) + (hm : Summable (fun i ↦ (m i : ℝ) * a i ^ 2)) + (c b A : ℝ) (k : ℕ) {y : ℝ} (hy : 1 ≤ y) : + |c| * Real.exp (A * y ^ 2) ≤ + ‖(c : ℂ) * ((y : ℂ) * I) ^ k * + exp (-(A : ℂ) * ((y : ℂ) * I) ^ 2 + (b : ℂ) * ((y : ℂ) * I)) * + ∏' i, weierstrassFactor 1 ((a i : ℂ) * ((y : ℂ) * I)) ^ m i‖ := by + have hre : (-(A : ℂ) * ((y : ℂ) * I) ^ 2 + + (b : ℂ) * ((y : ℂ) * I)).re = A * y ^ 2 := by + norm_num [pow_two, mul_re, mul_im] + have hn : ‖(y : ℂ) * I‖ = y := by + rw [norm_mul, norm_I, mul_one, norm_real, Real.norm_eq_abs, abs_of_nonneg] + linarith + rw [norm_mul, norm_mul, norm_mul, norm_pow, norm_exp, hre, hn, + norm_real, Real.norm_eq_abs] + calc + _ = |c| * 1 * Real.exp (A * y ^ 2) * 1 := by ring + _ ≤ _ := by + gcongr + · exact one_le_pow₀ hy + · exact one_le_norm_tprod_weierstrassFactor_one_mul_I a m hm y + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/MinimalType.lean b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/MinimalType.lean new file mode 100644 index 000000000..e8b24a8c1 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/MinimalType.lean @@ -0,0 +1,119 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import TauCeti.Analysis.Normed.Ring.InfiniteProd + +/-! +# Minimal quadratic type of genus-one canonical products + +A finite set of factors has an exponential linear bound. Square summability +makes the remaining quadratic bound arbitrarily small. The index type and +the natural multiplicities are unrestricted, including zero multiplicities. +-/ + +public section + +open Finset + +namespace Complex + +/-- Taking a natural power multiplies an exponential norm-bound exponent. -/ +private theorem norm_pow_le_exp_mul {w : ℂ} {B : ℝ} + (h : ‖w‖ ≤ Real.exp B) (m : ℕ) : ‖w ^ m‖ ≤ Real.exp ((m : ℝ) * B) := by + rw [norm_pow, Real.exp_nat_mul] + exact pow_le_pow_left₀ (norm_nonneg _) h m + +/-- A finite exceptional set is bounded linearly; every other factor is +bounded quadratically, with its actual natural multiplicity. -/ +private theorem norm_factor_le_piecewise_exp {ι : Type*} [DecidableEq ι] (a : ι → ℂ) (m : ι → ℕ) + (s : Finset ι) (z : ℂ) (i : ι) : + ‖weierstrassFactor 1 (a i * z) ^ m i‖ ≤ Real.exp + (if i ∈ s then 2 * ((m i : ℝ) * ‖a i‖) * ‖z‖ + else 3 * ((m i : ℝ) * ‖a i‖ ^ 2) * ‖z‖ ^ 2) := by + classical + by_cases hi : i ∈ s + · rw [ite_eq_left hi] + have h := norm_pow_le_exp_mul (norm_weierstrassFactor_one_le_exp (a i * z)) (m i) + convert h using 1 + congr 1 + rw [norm_mul] + ring + · rw [ite_eq_right hi] + have h := norm_pow_le_exp_mul (norm_weierstrassFactor_one_le_exp_sq (a i * z)) (m i) + convert h using 1 + congr 1 + rw [norm_mul, mul_pow] + ring + +/-- A small finite-sum tail gives a uniform linear-plus-quadratic bound for +the whole product. The totalized product inequality is valid also at zeros. -/ +private theorem norm_product_le_exp_of_small_tail {ι : Type*} + (a : ι → ℂ) (m : ι → ℕ) (s : Finset ι) {ε : ℝ} + (htail : ∀ t : Finset ι, Disjoint t s → + (∑ i ∈ t, (m i : ℝ) * ‖a i‖ ^ 2) ≤ ε / 6) (z : ℂ) : + ‖∏' i, weierstrassFactor 1 (a i * z) ^ m i‖ ≤ + Real.exp ((2 * ∑ i ∈ s, (m i : ℝ) * ‖a i‖) * ‖z‖ + ε / 2 * ‖z‖ ^ 2) := by + classical + apply TauCeti.norm_tprod_le_exp_of_sum_le (norm_factor_le_piecewise_exp a m s z) + intro t + have hhead : (∑ i ∈ t.filter (fun i => i ∈ s), (m i : ℝ) * ‖a i‖) ≤ + ∑ i ∈ s, (m i : ℝ) * ‖a i‖ := by + apply sum_le_sum_of_subset_of_nonneg + · intro i hi + exact (mem_filter.mp hi).2 + · intro i _ _ + positivity + have hdisjoint : Disjoint (t.filter (fun i => i ∉ s)) s := by + rw [disjoint_left] + intro i hi his + exact (mem_filter.mp hi).2 his + have ht := htail (t.filter (fun i => i ∉ s)) hdisjoint + rw [sum_ite] + simp only [← sum_mul, ← mul_sum] + calc + _ ≤ (2 * ∑ i ∈ s, (m i : ℝ) * ‖a i‖) * ‖z‖ + + (3 * (ε / 6)) * ‖z‖ ^ 2 := by gcongr + _ = _ := by ring + +/-- Absorb the linear exponent into half of a positive quadratic allowance. -/ +private theorem linear_le_half_quadratic_add {c t ε : ℝ} (hε : 0 < ε) : + c * t ≤ ε / 2 * t ^ 2 + c ^ 2 / (2 * ε) := by + apply (mul_le_mul_iff_right₀ (show 0 < 2 * ε by positivity)).mp + calc + (2 * ε) * (c * t) ≤ ε ^ 2 * t ^ 2 + c ^ 2 := by + nlinarith [sq_nonneg (ε * t - c)] + _ = (2 * ε) * (ε / 2 * t ^ 2 + c ^ 2 / (2 * ε)) := by + field_simp [hε.ne'] + +/-- A genus-one canonical product with square-summable slopes and natural +multiplicities has arbitrarily small positive quadratic type. No countability +or enumeration hypothesis is needed. -/ +theorem exists_norm_tprod_weierstrass_le_exp_sq {ι : Type*} + (a : ι → ℂ) (m : ι → ℕ) + (hm : Summable (fun i => (m i : ℝ) * ‖a i‖ ^ 2)) + {ε : ℝ} (hε : 0 < ε) : + ∃ C > 0, ∀ z : ℂ, + ‖∏' i, weierstrassFactor 1 (a i * z) ^ m i‖ ≤ C * Real.exp (ε * ‖z‖ ^ 2) := by + classical + obtain ⟨s, hs⟩ := summable_iff_vanishing_norm.mp hm (ε / 6) (by positivity) + have htail (t : Finset ι) (ht : Disjoint t s) : + (∑ i ∈ t, (m i : ℝ) * ‖a i‖ ^ 2) ≤ ε / 6 := by + have hnonneg : 0 ≤ ∑ i ∈ t, (m i : ℝ) * ‖a i‖ ^ 2 := by positivity + simpa only [Real.norm_eq_abs, abs_of_nonneg hnonneg] using (hs t ht).le + let c : ℝ := 2 * ∑ i ∈ s, (m i : ℝ) * ‖a i‖ + refine ⟨Real.exp (c ^ 2 / (2 * ε)), Real.exp_pos _, fun z => ?_⟩ + calc + _ ≤ Real.exp (c * ‖z‖ + ε / 2 * ‖z‖ ^ 2) := + norm_product_le_exp_of_small_tail a m s htail z + _ ≤ Real.exp (c ^ 2 / (2 * ε) + ε * ‖z‖ ^ 2) := by + apply Real.exp_le_exp.mpr + have h := linear_le_half_quadratic_add (c := c) (t := ‖z‖) hε + linarith + _ = _ := Real.exp_add _ _ + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/CompactJets.lean b/RealRooted/Mathlib/Analysis/Complex/CompactJets.lean new file mode 100644 index 000000000..07d3f9c29 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/CompactJets.lean @@ -0,0 +1,54 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Analytic.Order +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Uniform finite nonvanishing jets of entire functions + +A nonzero entire function has a nonvanishing derivative at every point. +Compactness gives one finite jet length that works throughout a compact set. +-/ + +public section + +namespace Complex + +/-- A nonzero entire function has a finite nonvanishing Taylor jet at every point. -/ +theorem exists_iteratedDeriv_ne_zero {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hf0 : f ≠ 0) (z : ℂ) : ∃ k : ℕ, iteratedDeriv k f z ≠ 0 := by + have hfinite : analyticOrderAt f z ≠ ⊤ := by + exact (AnalyticOnNhd.analyticOrderAt_eq_top_iff_eq_zero z + (fun w => hf.analyticAt w)).not.mpr hf0 + obtain ⟨k, hk⟩ := ENat.ne_top_iff_exists.mp hfinite + exact ⟨k, ((analyticOrderAt_eq_nat_iff_iteratedDeriv_eq_zero + (hf.analyticAt z)).mp hk.symm).2⟩ + +/-- A compact set admits a uniform bound on the index of a nonvanishing +Taylor derivative of a nonzero entire function. The compact set may be empty. -/ +theorem exists_uniform_iteratedDeriv_ne_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hf0 : f ≠ 0) {K : Set ℂ} (hK : IsCompact K) : + ∃ N : ℕ, ∀ z ∈ K, ∃ k < N, iteratedDeriv k f z ≠ 0 := by + have hopen (k : ℕ) : IsOpen {z | iteratedDeriv k f z ≠ 0} := + isOpen_ne_fun (((hf.contDiff (n := ⊤)).differentiable_iteratedDeriv k + (WithTop.coe_lt_top _)).continuous) continuous_const + have hcover : K ⊆ ⋃ k : ℕ, {z | iteratedDeriv k f z ≠ 0} := by + intro z _ + obtain ⟨k, hk⟩ := exists_iteratedDeriv_ne_zero hf hf0 z + exact Set.mem_iUnion.mpr ⟨k, hk⟩ + obtain ⟨s, hs⟩ := hK.elim_finite_subcover + (fun k : ℕ => {z | iteratedDeriv k f z ≠ 0}) hopen hcover + refine ⟨s.sup id + 1, ?_⟩ + intro z hz + obtain ⟨k, hk, hne⟩ : ∃ k, k ∈ s ∧ iteratedDeriv k f z ≠ 0 := by + simpa only [Set.mem_iUnion, Set.mem_ofPred_eq, exists_prop] using hs hz + exact ⟨k, Nat.lt_succ_of_le (Finset.le_sup (f := id) hk), hne⟩ + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/EdreiUniqueness.lean b/RealRooted/Mathlib/Analysis/Complex/EdreiUniqueness.lean index 8b25ca6a9..f66a72c21 100644 --- a/RealRooted/Mathlib/Analysis/Complex/EdreiUniqueness.lean +++ b/RealRooted/Mathlib/Analysis/Complex/EdreiUniqueness.lean @@ -12,6 +12,7 @@ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.Analytic.Uniqueness import Mathlib.Analysis.Normed.Group.Tannery +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberCardinality /-! # Uniqueness of Edrei–Thoma parameters @@ -74,18 +75,7 @@ private lemma encard_eq_cnt {u : ℕ → ℝ} (su : Summable u) {t : ℝ} (ht : /-- Fiberwise regrouping of a sum. -/ private lemma hasSum_cnt {u : ℕ → ℝ} (g : ℝ → ℝ) (hs : Summable (fun i => g (u i))) : HasSum (fun t => (cnt u t : ℝ) * g t) (∑' i, g (u i)) := by - set e := Equiv.sigmaFiberEquiv u - have hF : Summable (fun x : (Σ t, {i // u i = t}) => g (u (e x))) := - (e.summable_iff (f := fun i => g (u i))).mpr hs - have hF' : HasSum (fun x : (Σ t, {i // u i = t}) => g (u (e x))) (∑' i, g (u i)) := by - rw [← e.tsum_eq (fun i => g (u i))]; exact hF.hasSum - refine hF'.sigma (fun t => ?_) - have h1 := (hF.sigma_factor t).hasSum - convert h1 using 1 - have : ∀ c : {i // u i = t}, g (u (e ⟨t, c⟩)) = g t := by - intro c; simp [e, Equiv.sigmaFiberEquiv, c.2] - simp only [this, tsum_const, nsmul_eq_mul, cnt] - rfl + simpa only [cnt, Set.coe_ofPred] using hs.hasSum_natCard_fiber_mul (u := u) (g := g) /-- Equal power sums make the signed fiber-count moment sum vanish. -/ private lemma hasSum_cnt_diff {u₁ u₂ v₁ v₂ : ℕ → ℝ} @@ -569,4 +559,3 @@ theorem params_eq_of_edreiFunction_eq {C₁ C₂ γ₁ γ₂ : ℝ} {k₁ k₂ : · rw [encard_eq_cnt sβ₁ ht, encard_eq_cnt sβ₂ ht, (hcnt t ht).2] end Complex.EdreiThoma - diff --git a/RealRooted/Mathlib/Analysis/Complex/ForwardDifference.lean b/RealRooted/Mathlib/Analysis/Complex/ForwardDifference.lean new file mode 100644 index 000000000..8c7e30ea3 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/ForwardDifference.lean @@ -0,0 +1,105 @@ +/- +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.Algebra.Group.ForwardDiff +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Complex.Exponential +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# Forward differences of Taylor derivatives + +Multiplication by `exp(-z)` takes the Taylor derivatives at zero to their +forward differences. A negative real zero of an entire function with positive +real part at zero forces a negative signed forward difference of some positive +order. This conclusion uses no growth or zero-location hypothesis elsewhere. +-/ + +public section + +open Complex Finset + +namespace Complex + +/-- Multiplication by the negative exponential takes Taylor derivatives to +forward differences with unit step. -/ +theorem iteratedDeriv_mul_exp_neg_zero {f : ℂ → ℂ} (hf : Differentiable ℂ f) (n : ℕ) : + iteratedDeriv n (fun z => f z * exp (-z)) 0 = + ((fwdDiff 1)^[n] (fun k => iteratedDeriv k f 0)) 0 := by + rw [iteratedDeriv_fun_mul hf.contDiff.contDiffAt (by fun_prop), + fwdDiff_iter_eq_sum_shift] + apply sum_congr rfl + intro k hk + have he : (fun z : ℂ => exp (-z)) = fun z => exp ((-1 : ℂ) * z) := by + simp + rw [he, iteratedDeriv_cexp_const_mul] + simp only [mul_zero, exp_zero, mul_one, nsmul_eq_mul, mul_one, zero_add, zsmul_eq_mul, + Int.cast_mul, Int.cast_pow, Int.cast_neg, Int.cast_one, Int.cast_natCast, Nat.cast_id] + ring + +/-- The real parts of Taylor derivatives obey the same forward-difference formula. -/ +theorem re_iteratedDeriv_mul_exp_neg_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (n : ℕ) : + (iteratedDeriv n (fun z => f z * exp (-z)) 0).re = + ((fwdDiff 1)^[n] (fun k => (iteratedDeriv k f 0).re)) 0 := by + rw [iteratedDeriv_mul_exp_neg_zero hf, fwdDiff_iter_eq_sum_shift, + fwdDiff_iter_eq_sum_shift] + simp only [Complex.re_sum] + apply sum_congr rfl + intro k hk + exact map_zsmul reAddGroupHom _ _ + +end Complex + +/-- Nonnegative real parts of the nonconstant Taylor derivatives bound an +entire function's real part below along the nonnegative real axis. -/ +theorem Differentiable.re_apply_le_of_iteratedDeriv_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (h : ∀ n ≠ 0, 0 ≤ (iteratedDeriv n f 0).re) + {x : ℝ} (hx : 0 ≤ x) : (f 0).re ≤ (f x).re := by + have hs : HasSum (fun n : ℕ => (n.factorial : ℝ)⁻¹ * x ^ n * + (iteratedDeriv n f 0).re) (f x).re := by + convert Complex.hasSum_re (hasSum_taylorSeries_of_entire hf 0 (x : ℂ)) using 1 + funext n + simp only [sub_zero, smul_eq_mul] + rw [← ofReal_natCast, ← ofReal_inv, ← ofReal_pow, ← mul_assoc, ← ofReal_mul] + simp only [mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero] + have hb := sum_le_hasSum ({0} : Finset ℕ) (fun n hn => + mul_nonneg (mul_nonneg (by positivity) (pow_nonneg hx n)) + (h n (by simpa using hn))) hs + simpa using hb + +namespace Complex + +/-- A negative real zero forces a negative signed forward difference of some +positive order in the Taylor derivatives at zero. No growth bound is required. -/ +theorem exists_signed_fwdDiff_iter_neg_of_neg_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (h0 : 0 < (f 0).re) {x : ℝ} + (hx : x < 0) (hzero : f x = 0) : + ∃ n : ℕ, n ≠ 0 ∧ + (-1 : ℝ) ^ n * ((fwdDiff 1)^[n] (fun k => (iteratedDeriv k f 0).re)) 0 < 0 := by + by_contra! hn + let g : ℂ → ℂ := fun z => f (-z) * exp z + have hg : Differentiable ℂ g := (hf.comp differentiable_neg).mul differentiable_exp + have hderiv (n : ℕ) (hne : n ≠ 0) : 0 ≤ (iteratedDeriv n g 0).re := by + have heq : g = fun z => (fun w => f w * exp (-w)) (-z) := by + funext z + simp [g] + rw [heq] + rw [iteratedDeriv_comp_neg n (fun w => f w * exp (-w)) 0] + simp only [neg_zero, smul_eq_mul] + rw [show (-1 : ℂ) ^ n = (((-1 : ℝ) ^ n : ℝ) : ℂ) by simp, + mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero, + re_iteratedDeriv_mul_exp_neg_zero hf] + exact hn n hne + have hb := hg.re_apply_le_of_iteratedDeriv_nonneg hderiv (neg_nonneg.mpr hx.le) + have hz : g (-x) = 0 := by simp [g, hzero] + have hc : g 0 = f 0 := by simp [g] + rw [ofReal_neg, hz, hc, zero_re] at hb + exact (not_le_of_gt h0) hb + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/CauchyBound.lean b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/CauchyBound.lean new file mode 100644 index 000000000..f5d09eced --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/CauchyBound.lean @@ -0,0 +1,99 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.ExponentialPowerBound + +/-! +# Cauchy derivative estimates above the growth order + +A circle of radius `(n+1)^(1/p)` bounds the nth derivative when the entire +function has growth order strictly below the positive exponent `p`. +The estimate is uniform on each spatial disk. +-/ + +public section + +open Metric + +namespace Complex + +/-- A nonnegative real power of a sum is bounded by a convenient multiple of +the sum of the powers, including exponents below one. -/ +private theorem add_rpow_le_two_mul {a b p : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hp : 0 ≤ p) : + (a + b) ^ p ≤ (2 : ℝ) ^ p * (a ^ p + b ^ p) := by + calc + _ ≤ (2 * max a b) ^ p := + Real.rpow_le_rpow (add_nonneg ha hb) (by linarith [le_max_left a b, le_max_right a b]) hp + _ = (2 : ℝ) ^ p * max (a ^ p) (b ^ p) := by + rw [Real.mul_rpow (by positivity) (ha.trans (le_max_left _ _)), Real.rpow_max ha hb hp] + _ ≤ _ := mul_le_mul_of_nonneg_left + (max_le (le_add_of_nonneg_right (Real.rpow_nonneg hb _)) + (le_add_of_nonneg_left (Real.rpow_nonneg ha _))) (by positivity) + +/-- Above a positive growth exponent, every derivative has a bound whose +spatial dependence is an explicit exponential power. -/ +theorem exists_iteratedDeriv_global_bound_of_orderLE {f : ℂ → ℂ} {ρ p : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) + (hp : 0 < p) (hρ : ρ < p) : + ∃ C > 0, ∀ n : ℕ, ∀ z : ℂ, + ‖iteratedDeriv n f z‖ ≤ n.factorial * C * Real.exp (‖z‖ ^ p) * + (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹) ^ n := by + let ε := ((2 : ℝ) ^ p)⁻¹ + have hε : 0 < ε := by dsimp [ε]; positivity + obtain ⟨C, hC, hbound⟩ := horder.exists_norm_le_mul_exp_rpow hf.continuous hp hρ hε + refine ⟨C * Real.exp 1, by positivity, fun n z => ?_⟩ + let r : ℝ := ((n : ℝ) + 1) ^ p⁻¹ + have hr : 0 < r := Real.rpow_pos_of_pos (by positivity) _ + have hrp : r ^ p = (n : ℝ) + 1 := Real.rpow_inv_rpow (by positivity) hp.ne' + have hcircle : ∀ w ∈ sphere z r, + ‖f w‖ ≤ C * Real.exp (‖z‖ ^ p + 1 + (n : ℝ)) := by + intro w hw + have hwz : ‖w - z‖ = r := mem_sphere_iff_norm.mp hw + have htri := norm_add_le (w - z) z + rw [sub_add_cancel, hwz] at htri + have hwbound : ‖w‖ ^ p ≤ (2 : ℝ) ^ p * (‖z‖ ^ p + ((n : ℝ) + 1)) := by + calc + _ ≤ (‖z‖ + r) ^ p := Real.rpow_le_rpow (norm_nonneg _) (by linarith) hp.le + _ ≤ (2 : ℝ) ^ p * (‖z‖ ^ p + r ^ p) := + add_rpow_le_two_mul (norm_nonneg _) hr.le hp.le + _ = _ := by rw [hrp] + apply (hbound w).trans + apply mul_le_mul_of_nonneg_left _ hC.le + apply Real.exp_le_exp.mpr + calc + _ ≤ ε * ((2 : ℝ) ^ p * (‖z‖ ^ p + ((n : ℝ) + 1))) := + mul_le_mul_of_nonneg_left hwbound hε.le + _ = _ := by dsimp [ε]; field_simp; ring + have hcauchy := norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le n hr hf.diffContOnCl hcircle + convert hcauchy using 1 + rw [Real.exp_add (‖z‖ ^ p + 1) (n : ℝ), Real.exp_add (‖z‖ ^ p) 1, + ← Real.exp_one_pow, div_pow] + dsimp only [r] + ring + +/-- Above a positive growth exponent, Cauchy's estimate gives a common +factorial and reciprocal-power bound for every derivative on a spatial disk. -/ +theorem exists_iteratedDeriv_bound_of_orderLE {f : ℂ → ℂ} {ρ p R : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) + (hp : 0 < p) (hρ : ρ < p) : + ∃ C > 0, ∀ n : ℕ, ∀ z : ℂ, ‖z‖ ≤ R → + ‖iteratedDeriv n f z‖ ≤ n.factorial * C * + (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹) ^ n := by + obtain ⟨C, hC, hbound⟩ := exists_iteratedDeriv_global_bound_of_orderLE hf horder hp hρ + refine ⟨C * Real.exp (R ^ p), by positivity, fun n z hz => ?_⟩ + calc + _ ≤ n.factorial * C * Real.exp (‖z‖ ^ p) * + (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹) ^ n := hbound n z + _ ≤ n.factorial * C * Real.exp (R ^ p) * + (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹) ^ n := + mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr + (Real.rpow_le_rpow (norm_nonneg _) hz hp.le)) (by positivity)) (by positivity) + _ = _ := by ring + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Derivative.lean b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Derivative.lean new file mode 100644 index 000000000..86bb1598d --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Derivative.lean @@ -0,0 +1,75 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder + +/-! +# Growth order of derivatives + +Every iterated derivative of an entire function has at most the same growth order. +Cauchy's estimate on a unit circle transfers an exponential power bound to the +derivative. A slight increase in the exponent absorbs the change of radius. +-/ + +public section + +open Complex Filter Asymptotics Bornology Metric Topology + +namespace TauCeti.OrderLE + +/-- Iterated differentiation does not increase the growth order of an entire function. -/ +theorem iteratedDeriv {f : ℂ → ℂ} {A : ℝ} (h : TauCeti.OrderLE f A) + (hf : Differentiable ℂ f) (n : ℕ) : TauCeti.OrderLE (iteratedDeriv n f) A := by + rcases lt_or_ge A 0 with hA | hA + · have heq : f = fun _ => f 0 := funext fun z => h.isConst hf hA z 0 + rw [heq] + convert TauCeti.orderLE_const (if n = 0 then f 0 else 0) A using 1 + funext z + exact iteratedDeriv_const + · rw [TauCeti.orderLE_def] + intro B hB + let q : ℝ := (A + B) / 2 + have hAq : A < q := by dsimp [q]; linarith + have hqB : q < B := by dsimp [q]; linarith + have hq : 0 ≤ q := hA.trans hAq.le + obtain ⟨C, hC, hbound⟩ := (h.isBigO hAq).exists_pos + obtain ⟨R, -, hR⟩ := Filter.hasBasis_cobounded_norm.eventually_iff.mp hbound.bound + refine (IsBigO.of_bound ((n.factorial : ℝ) * C) ?_).trans + (TauCeti.isBigO_exp_mul_norm_rpow ((2 : ℝ) ^ q) hqB) + filter_upwards [eventually_cobounded_le_norm (max 1 (R + 1))] with z hz + have hz1 : 1 ≤ ‖z‖ := (le_max_left _ _).trans hz + have hzR : R + 1 ≤ ‖z‖ := (le_max_right _ _).trans hz + have hcircle : ∀ w ∈ sphere z 1, + ‖f w‖ ≤ C * Real.exp ((2 : ℝ) ^ q * ‖z‖ ^ q) := by + intro w hw + have hwz : ‖w - z‖ = 1 := mem_sphere_iff_norm.mp hw + have hupper : ‖w‖ ≤ 2 * ‖z‖ := by + have htri := norm_add_le (w - z) z + rw [sub_add_cancel, hwz] at htri + linarith + have hlower : R ≤ ‖w‖ := by + have htri := norm_add_le (z - w) w + rw [sub_add_cancel, norm_sub_rev, hwz] at htri + linarith + calc + ‖f w‖ ≤ C * Real.exp (‖w‖ ^ q) := by + simpa only [Real.norm_eq_abs, Real.abs_exp] using hR hlower + _ ≤ C * Real.exp ((2 : ℝ) ^ q * ‖z‖ ^ q) := by + apply mul_le_mul_of_nonneg_left _ hC.le + apply Real.exp_le_exp.mpr + calc + ‖w‖ ^ q ≤ (2 * ‖z‖) ^ q := Real.rpow_le_rpow (norm_nonneg _) hupper hq + _ = (2 : ℝ) ^ q * ‖z‖ ^ q := Real.mul_rpow (by positivity) (norm_nonneg _) + simpa only [Real.norm_eq_abs, Real.abs_exp, one_pow, div_one, mul_assoc] using + norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le n zero_lt_one hf.diffContOnCl hcircle + +/-- Differentiation does not increase the growth order of an entire function. -/ +theorem deriv {f : ℂ → ℂ} {A : ℝ} (h : TauCeti.OrderLE f A) + (hf : Differentiable ℂ f) : TauCeti.OrderLE (deriv f) A := by + simpa using h.iteratedDeriv hf 1 + +end TauCeti.OrderLE diff --git a/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/ExponentialPowerBound.lean b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/ExponentialPowerBound.lean new file mode 100644 index 000000000..29351cc55 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/ExponentialPowerBound.lean @@ -0,0 +1,63 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder + +/-! +# Global exponential power bounds above the growth order + +Every positive exponent strictly above a continuous function's growth order +gives a global exponential power bound, with any prescribed positive constant +in the exponent. Compactness removes the exceptional bounded region. +-/ + +public section + +open Complex Filter Asymptotics Bornology Metric Topology + +namespace TauCeti + +/-- An eventual exponential power bound can be made global for continuous functions. -/ +private theorem exists_global_exponential_power_bound {f : ℂ → ℂ} (hf : Continuous f) + (p : ℝ) (h : f =O[cobounded ℂ] fun z => Real.exp (‖z‖ ^ p)) : + ∃ C > 0, ∀ z, ‖f z‖ ≤ C * Real.exp (‖z‖ ^ p) := by + obtain ⟨C, hC, hbound⟩ := h.exists_pos + obtain ⟨R, -, hR⟩ := Filter.hasBasis_cobounded_norm.eventually_iff.mp hbound.bound + obtain ⟨B, hB⟩ := (isCompact_closedBall (0 : ℂ) R).exists_bound_of_continuousOn hf.continuousOn + refine ⟨max C B, lt_of_lt_of_le hC (le_max_left _ _), fun z => ?_⟩ + by_cases hz : R ≤ ‖z‖ + · have hzbound : ‖f z‖ ≤ C * Real.exp (‖z‖ ^ p) := by + simpa only [Real.norm_eq_abs, Real.abs_exp] using hR hz + exact hzbound.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) (Real.exp_pos _).le) + · have hsmall : ‖f z‖ ≤ B := hB z (by simpa using (le_of_not_ge hz)) + exact hsmall.trans ((le_max_right C B).trans + (le_mul_of_one_le_right (le_max_left C B |>.trans' hC.le) + (Real.one_le_exp (Real.rpow_nonneg (norm_nonneg _) _)))) + +/-- Above its growth order, a continuous function admits a global exponential +power bound with an arbitrarily small positive coefficient. -/ +theorem OrderLE.exists_norm_le_mul_exp_rpow {f : ℂ → ℂ} {ρ p : ℝ} + (h : OrderLE f ρ) (hf : Continuous f) (hp : 0 < p) (hρ : ρ < p) + {ε : ℝ} (hε : 0 < ε) : + ∃ C > 0, ∀ z, ‖f z‖ ≤ C * Real.exp (ε * ‖z‖ ^ p) := by + let a : ℂ := (ε ^ p⁻¹ : ℝ) + have ha : a ≠ 0 := ofReal_ne_zero.mpr (Real.rpow_pos_of_pos hε _).ne' + have hg : Continuous (fun z : ℂ => f (a⁻¹ * z)) := hf.comp (by fun_prop) + have ho : OrderLE (fun z : ℂ => f (a⁻¹ * z)) ρ := by + simpa only [add_zero] using h.comp_mul_add a⁻¹ 0 + obtain ⟨C, hC, hbound⟩ := exists_global_exponential_power_bound hg p (ho.isBigO hρ) + refine ⟨C, hC, fun z => ?_⟩ + have hz := hbound (a * z) + rw [← mul_assoc, inv_mul_cancel₀ ha, one_mul, norm_mul, + Real.mul_rpow (norm_nonneg _) (norm_nonneg _)] at hz + have hnorm : ‖a‖ ^ p = ε := by + simp only [a, norm_real, Real.norm_eq_abs, + abs_of_nonneg (Real.rpow_nonneg hε.le _)] + exact Real.rpow_inv_rpow hε.le hp.ne' + simpa only [hnorm] using hz + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/OfBound.lean b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/OfBound.lean new file mode 100644 index 000000000..d73a5ae71 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/OfBound.lean @@ -0,0 +1,34 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder + +/-! +# Growth order from global exponential bounds + +A global bound by a constant times an exponential power gives the corresponding +growth-order bound. No analyticity is required for this implication. +-/ + +public section + +open Filter Asymptotics Bornology + +namespace TauCeti + +/-- A global exponential-power bound implies the corresponding order bound. -/ +theorem orderLE_of_norm_le_mul_exp_rpow {f : ℂ → ℂ} {B C p : ℝ} + (hbound : ∀ z, ‖f z‖ ≤ B * Real.exp (C * ‖z‖ ^ p)) : OrderLE f p := by + rw [orderLE_def] + intro q hpq + apply (show f =O[cobounded ℂ] (fun z => Real.exp (C * ‖z‖ ^ p)) from ?_).trans + (isBigO_exp_mul_norm_rpow C hpq) + apply IsBigO.of_bound B + exact Eventually.of_forall fun z => by + simpa only [Real.norm_eq_abs, Real.abs_exp] using hbound z + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/PolynomialFactor.lean b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/PolynomialFactor.lean new file mode 100644 index 000000000..44e7214f6 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/PolynomialFactor.lean @@ -0,0 +1,32 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder + +/-! +# Growth order after polynomial factor removal + +Outside a bounded set, the inverse of a nonzero polynomial is bounded. +Removing that factor therefore preserves every upper growth-order bound. +-/ + +public section + +open Complex Polynomial Filter Asymptotics Bornology + +namespace TauCeti + +/-- Removing a nonzero polynomial factor does not increase growth order. -/ +theorem OrderLE.of_polynomial_mul {f : ℂ → ℂ} {p : ℂ[X]} {rho : ℝ} + (h : OrderLE (fun z => p.eval z * f z) rho) (hp : p ≠ 0) : OrderLE f rho := by + have hpoly : (fun _ : ℂ => (1 : ℂ)) =O[cobounded ℂ] p.eval := by + simpa only [eval_one] using + (Polynomial.isBigO_cobounded_of_degree_le (P := (1 : ℂ[X])) (Q := p) + (by simpa only [degree_one] using (zero_le_degree_iff.mpr hp))) + simpa only [one_mul] using (hpoly.mul (isBigO_refl f (cobounded ℂ))).orderLE h + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/SquareDescent.lean b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/SquareDescent.lean new file mode 100644 index 000000000..dd6422336 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/SquareDescent.lean @@ -0,0 +1,57 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +public import TauCeti.Analysis.Complex.RootsOfUnity.Descent + +/-! +# Growth order under square descent + +The principal square-root substitution divides a complex growth-order bound +by two. No analyticity or evenness assumption is needed for this estimate; +evenness is what makes the resulting descent entire in its applications. +-/ + +public section + +open Complex Filter Bornology Asymptotics + +namespace TauCeti + +/-- Square descent halves any real growth-order bound. -/ +theorem OrderLE.descendPow_two {f : ℂ → ℂ} {rho : ℝ} (hf : OrderLE f rho) : + OrderLE (descendPow 2 f) (rho / 2) := by + let root : ℂ → ℂ := fun z ↦ z ^ (2⁻¹ : ℂ) + have hsq (z : ℂ) : ‖root z‖ ^ 2 = ‖z‖ := by + rw [← norm_pow] + exact congrArg norm (Complex.cpow_nat_inv_pow z (by norm_num : 2 ≠ 0)) + have ht : Tendsto root (cobounded ℂ) (cobounded ℂ) := by + rw [← tendsto_norm_atTop_iff_cobounded] + apply tendsto_atTop.mpr + intro R + filter_upwards [eventually_cobounded_le_norm ((max R 0) ^ 2)] with z hz + have := hsq z + have := norm_nonneg (root z) + have := le_max_left R 0 + have := le_max_right R 0 + nlinarith + rw [orderLE_def] + intro A hA + have h := (hf.isBigO (show rho < 2 * A by linarith)).comp_tendsto ht + change (fun z ↦ descendPow 2 f z) =O[cobounded ℂ] (fun z ↦ Real.exp (‖z‖ ^ A)) + have heq : (fun z ↦ descendPow 2 f z) = f ∘ root := by + funext z + exact descendPow_apply f z + rw [heq] + refine h.trans (IsBigO.of_bound 1 ?_) + apply Eventually.of_forall + intro z + have hpow : ‖root z‖ ^ (2 * A) = ‖z‖ ^ A := by + rw [Real.rpow_mul (norm_nonneg _), Real.rpow_two, hsq] + simp only [Function.comp_apply, Real.norm_eq_abs, Real.abs_exp, one_mul, hpow, le_refl] + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Subquadratic.lean b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Subquadratic.lean new file mode 100644 index 000000000..1d2cb9d80 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Subquadratic.lean @@ -0,0 +1,65 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder +import Mathlib.Analysis.Normed.Group.Bounded + +/-! +# Arbitrarily small quadratic exponential bounds + +A continuous function of growth order strictly below two admits a global bound +by a constant times `exp (ε ‖z‖²)` for every positive `ε`. This is the quantitative +growth input for entire heat-operator convergence. +-/ + +public section + +open Complex Filter Asymptotics Bornology Metric Topology + +namespace TauCeti + +/-- An eventual Gaussian exponential bound for a continuous function can be +made global by increasing its constant. -/ +private theorem exists_global_quadratic_bound {f : ℂ → ℂ} (hf : Continuous f) + (h : f =O[cobounded ℂ] fun z => Real.exp (‖z‖ ^ 2)) : + ∃ C > 0, ∀ z, ‖f z‖ ≤ C * Real.exp (‖z‖ ^ 2) := by + obtain ⟨C, hC, hbound⟩ := h.exists_pos + obtain ⟨R, -, hR⟩ := Filter.hasBasis_cobounded_norm.eventually_iff.mp hbound.bound + obtain ⟨B, hB⟩ := (isCompact_closedBall (0 : ℂ) R).exists_bound_of_continuousOn hf.continuousOn + refine ⟨max C B, lt_of_lt_of_le hC (le_max_left _ _), fun z => ?_⟩ + by_cases hz : R ≤ ‖z‖ + · have hzbound : ‖f z‖ ≤ C * Real.exp (‖z‖ ^ 2) := by + simpa only [Real.norm_eq_abs, Real.abs_exp] using hR hz + exact hzbound.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) (Real.exp_pos _).le) + · have hsmall : ‖f z‖ ≤ B := hB z (by simpa using (le_of_not_ge hz)) + exact hsmall.trans ((le_max_right C B).trans + (le_mul_of_one_le_right (le_max_left C B |>.trans' hC.le) + (Real.one_le_exp (sq_nonneg _)))) + +/-- Every continuous function of order below two has a global quadratic +exponential bound with arbitrarily small positive quadratic coefficient. -/ +theorem OrderLE.exists_norm_le_mul_exp_sq {f : ℂ → ℂ} {ρ : ℝ} + (h : OrderLE f ρ) (hf : Continuous f) (hρ : ρ < 2) {ε : ℝ} (hε : 0 < ε) : + ∃ C > 0, ∀ z, ‖f z‖ ≤ C * Real.exp (ε * ‖z‖ ^ 2) := by + let a : ℂ := (Real.sqrt ε : ℂ) + have ha : a ≠ 0 := ofReal_ne_zero.mpr (Real.sqrt_pos.mpr hε).ne' + have hg : Continuous (fun z : ℂ => f (a⁻¹ * z)) := hf.comp (by fun_prop) + have ho : OrderLE (fun z : ℂ => f (a⁻¹ * z)) ρ := by + simpa only [add_zero] using h.comp_mul_add a⁻¹ 0 + have hb : (fun z : ℂ => f (a⁻¹ * z)) =O[cobounded ℂ] + fun z => Real.exp (‖z‖ ^ 2) := by + simpa only [Real.rpow_two] using ho.isBigO hρ + obtain ⟨C, hC, hbound⟩ := exists_global_quadratic_bound hg hb + refine ⟨C, hC, fun z => ?_⟩ + have hz := hbound (a * z) + rw [← mul_assoc, inv_mul_cancel₀ ha, one_mul, norm_mul, mul_pow] at hz + have hnorm : ‖a‖ ^ 2 = ε := by + simp only [a, norm_real, Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _)] + exact Real.sq_sqrt hε.le + simpa only [hnorm] using hz + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Zero/Nonempty.lean b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Zero/Nonempty.lean new file mode 100644 index 000000000..0967cfc15 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Zero/Nonempty.lean @@ -0,0 +1,39 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +import TauCeti.Analysis.Complex.GrowthOrder.Exponential + +/-! +# A zero of a nonconstant entire function below order one + +The zero-free finite-order factorization writes the function as the +exponential of a polynomial of degree at most the natural floor of its +order. Below order one that polynomial is constant. No reality or +real-zero assumption enters this argument. +-/ + +public section + +namespace TauCeti + +/-- A nonconstant entire function of order below one has a zero. -/ +theorem OrderLE.exists_zero_of_nonconstant {f : ℂ → ℂ} {rho : ℝ} + (horder : OrderLE f rho) (hrho : rho < 1) (hf : Differentiable ℂ f) + (hnc : f ≠ fun _ : ℂ ↦ f 0) : ∃ z : ℂ, f z = 0 := by + by_contra hno + have hnz : ∀ z : ℂ, f z ≠ 0 := by simpa using hno + obtain ⟨p, hp, heq⟩ := horder.exists_eq_cexp_polynomial_eval_of_forall_ne_zero hf hnz + have hd : p.natDegree = 0 := by + rw [Nat.floor_eq_zero.mpr hrho] at hp + exact Nat.eq_zero_of_le_zero hp + apply hnc + funext z + rw [heq z, heq 0, Polynomial.eq_C_of_natDegree_eq_zero hd] + simp only [Polynomial.eval_C] + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Basic.lean b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Basic.lean new file mode 100644 index 000000000..be685bf7c --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Basic.lean @@ -0,0 +1,93 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder + +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Bounds +import Mathlib.Analysis.Normed.Group.FunctionSeries +import Mathlib.Topology.UniformSpace.UniformApproximation +import Mathlib.Analysis.Normed.Group.Constructions + +/-! +# Entire backward heat series + +For an entire function of growth order strictly below two, the series defining +`exp (-t D²)` converges absolutely for every complex time and spatial point, +and locally uniformly jointly in both variables. +-/ + +@[expose] public section + +open Filter Topology + +namespace Complex + +/-- The backward heat operator defined by its even-derivative series. -/ +noncomputable def heatOperator (t : ℂ) (f : ℂ → ℂ) (z : ℂ) : ℂ := + ∑' n : ℕ, (-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z + +/-- The entire heat series converges absolutely at every complex time and point. -/ +theorem summable_norm_heatOperator {f : ℂ → ℂ} {ρ : ℝ} (hf : Differentiable ℂ f) + (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (t z : ℂ) : + Summable (fun n : ℕ => ‖(-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z‖) := by + obtain ⟨M, _, hM⟩ := exists_heat_term_bound hf horder hρ (norm_nonneg t) (norm_nonneg z) + exact Summable.of_nonneg_of_le (fun _ => norm_nonneg _) + (fun n => hM n (-t) z (by simp) le_rfl) + ((summable_geometric_of_abs_lt_one (by norm_num : |(1 / 2 : ℝ)| < 1)).mul_left M) + +/-- Partial heat sums converge uniformly whenever complex time and space +are each restricted to a bounded disk. -/ +theorem tendstoUniformlyOn_heatOperator {f : ℂ → ℂ} {ρ : ℝ} (hf : Differentiable ℂ f) + (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) {T R : ℝ} (hT : 0 ≤ T) (hR : 0 ≤ R) : + TendstoUniformlyOn + (fun N (tz : ℂ × ℂ) => ∑ n ∈ Finset.range N, + (-tz.1) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f tz.2) + (fun tz => heatOperator tz.1 f tz.2) atTop {tz | ‖tz.1‖ ≤ T ∧ ‖tz.2‖ ≤ R} := by + obtain ⟨M, _, hM⟩ := exists_heat_term_bound hf horder hρ hT hR + exact tendstoUniformlyOn_tsum_nat + ((summable_geometric_of_abs_lt_one (by norm_num : |(1 / 2 : ℝ)| < 1)).mul_left M) + (fun n tz htz => hM n (-tz.1) tz.2 (by simpa using htz.1) htz.2) + +/-- The heat series converges locally uniformly jointly in complex time and space. -/ +theorem tendstoLocallyUniformly_heatOperator {f : ℂ → ℂ} {ρ : ℝ} (hf : Differentiable ℂ f) + (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) : + TendstoLocallyUniformly + (fun N (tz : ℂ × ℂ) => ∑ n ∈ Finset.range N, + (-tz.1) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f tz.2) + (fun tz => heatOperator tz.1 f tz.2) atTop := by + rw [tendstoLocallyUniformly_iff_forall_isCompact] + intro K hK + obtain ⟨B, hB, hbound⟩ := hK.isBounded.exists_pos_norm_le + apply (tendstoUniformlyOn_heatOperator hf horder hρ hB.le hB.le).mono + intro tz htz + exact ⟨(norm_fst_le tz).trans (hbound tz htz), (norm_snd_le tz).trans (hbound tz htz)⟩ + +/-- The heat sum is jointly continuous in complex time and space. -/ +theorem continuous_heatOperator {f : ℂ → ℂ} {ρ : ℝ} (hf : Differentiable ℂ f) + (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) : + Continuous (fun tz : ℂ × ℂ => heatOperator tz.1 f tz.2) := by + apply (tendstoLocallyUniformly_heatOperator hf horder hρ).continuous + apply Filter.Frequently.of_forall + intro N + apply continuous_finsetSum + intro n _ + have hd : Continuous (iteratedDeriv (2 * n) f) := + ((hf.contDiff (n := ⊤)).differentiable_iteratedDeriv _ (WithTop.coe_lt_top _)).continuous + exact ((continuous_fst.neg.pow n).div_const _).mul (hd.comp continuous_snd) + +/-- At time zero, the heat series recovers its input, with no growth assumption. -/ +@[simp] theorem heatOperator_zero (f : ℂ → ℂ) : heatOperator 0 f = f := by + ext z + rw [heatOperator, tsum_eq_single 0 (fun n hn => by simp [zero_pow hn])] + simp + +/-- The zero input has zero heat image at every time. -/ +@[simp] theorem heatOperator_zero_input (t : ℂ) : heatOperator t (0 : ℂ → ℂ) = 0 := by + ext z + simp [heatOperator] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Bounds.lean b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Bounds.lean new file mode 100644 index 000000000..ae747a8e1 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Bounds.lean @@ -0,0 +1,122 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder + +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Subquadratic +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.Complex.Liouville +import Mathlib.Data.Nat.Factorial.Basic + +/-! +# Bounds for entire heat-operator coefficients + +Cauchy's estimate on a circle of radius `sqrt ((n+1)/ε)` turns a small quadratic +exponential bound into a geometric bound for the even derivative divided by +`n!`. The constants are uniform on spatial disks. +-/ + +public section + +open Complex Metric + +namespace Complex + +/-- Even derivatives of an entire function with quadratic exponential growth +have a factorial-geometric bound suitable for the heat series. -/ +theorem norm_iteratedDeriv_even_le_of_exp_sq {f : ℂ → ℂ} (hf : Differentiable ℂ f) + {C ε : ℝ} (hC : 0 ≤ C) (hε : 0 < ε) + (hbound : ∀ z, ‖f z‖ ≤ C * Real.exp (ε * ‖z‖ ^ 2)) (n : ℕ) (z : ℂ) : + ‖iteratedDeriv (2 * n) f z‖ ≤ + n.factorial * (C * Real.exp (2 * ε * ‖z‖ ^ 2 + 2)) * (2 * ε * Real.exp 2) ^ n := by + let r := Real.sqrt (((n : ℝ) + 1) / ε) + have hr : 0 < r := Real.sqrt_pos.mpr (by positivity) + have hr2 : r ^ 2 = ((n : ℝ) + 1) / ε := Real.sq_sqrt (by positivity) + have hcircle : ∀ w ∈ sphere z r, + ‖f w‖ ≤ C * Real.exp (2 * ε * ‖z‖ ^ 2 + 2 * ((n : ℝ) + 1)) := by + intro w hw + have hwz : ‖w - z‖ = r := mem_sphere_iff_norm.mp hw + have htri := norm_add_le (w - z) z + rw [sub_add_cancel, hwz] at htri + have hsq : ‖w‖ ^ 2 ≤ 2 * ‖z‖ ^ 2 + 2 * r ^ 2 := by + nlinarith [sq_nonneg (r - ‖z‖), norm_nonneg w, norm_nonneg z, hr.le] + apply (hbound w).trans + apply mul_le_mul_of_nonneg_left _ hC + apply Real.exp_le_exp.mpr + have heq : ε * r ^ 2 = (n : ℝ) + 1 := by rw [hr2]; field_simp + nlinarith + have hcauchy := norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le + (2 * n) hr hf.diffContOnCl hcircle + have hfac : ((2 * n).factorial : ℝ) ≤ n.factorial * (2 * ((n : ℝ) + 1)) ^ n := by + have hn := Nat.factorial_mul_descFactorial (n := 2 * n) (k := n) (by lia) + have hdesc := (Nat.descFactorial_le_pow (2 * n) n).trans + (Nat.pow_le_pow_left (by lia : 2 * n ≤ 2 * (n + 1)) n) + have hnat : (2 * n).factorial ≤ n.factorial * (2 * (n + 1)) ^ n := by + rw [← hn, show 2 * n - n = n by lia] + exact Nat.mul_le_mul_left n.factorial hdesc + exact_mod_cast hnat + have hrpow : r ^ (2 * n) = (((n : ℝ) + 1) / ε) ^ n := by rw [pow_mul, hr2] + have hratio : ((2 * n).factorial : ℝ) / r ^ (2 * n) ≤ n.factorial * (2 * ε) ^ n := by + calc + _ ≤ (n.factorial * (2 * ((n : ℝ) + 1)) ^ n) / r ^ (2 * n) := + div_le_div_of_nonneg_right hfac (by positivity) + _ = n.factorial * (2 * ε) ^ n := by + rw [hrpow, mul_div_assoc, ← div_pow] + congr 2 + field_simp + calc + _ ≤ ((2 * n).factorial : ℝ) / r ^ (2 * n) * + (C * Real.exp (2 * ε * ‖z‖ ^ 2 + 2 * ((n : ℝ) + 1))) := by + convert hcauchy using 1 + ring + _ ≤ (n.factorial * (2 * ε) ^ n) * + (C * Real.exp (2 * ε * ‖z‖ ^ 2 + 2 * ((n : ℝ) + 1))) := + mul_le_mul_of_nonneg_right hratio (mul_nonneg hC (Real.exp_pos _).le) + _ = _ := by + rw [show 2 * ε * ‖z‖ ^ 2 + 2 * ((n : ℝ) + 1) = + (2 * ε * ‖z‖ ^ 2 + 2) + (n : ℝ) * 2 by ring, + Real.exp_add, Real.exp_nat_mul, mul_pow] + ring + +/-- On every bounded set of complex time and space, the even derivative heat +series of an entire function of order below two has a common geometric majorant. -/ +theorem exists_heat_term_bound {f : ℂ → ℂ} {ρ : ℝ} (hf : Differentiable ℂ f) + (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) {T R : ℝ} (hT : 0 ≤ T) (hR : 0 ≤ R) : + ∃ M > 0, ∀ n : ℕ, ∀ t z : ℂ, ‖t‖ ≤ T → ‖z‖ ≤ R → + ‖t ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z‖ ≤ M * (1 / 2 : ℝ) ^ n := by + let ε := 1 / (4 * Real.exp 2 * (T + 1)) + have hε : 0 < ε := by dsimp [ε]; positivity + obtain ⟨C, hC, hbound⟩ := horder.exists_norm_le_mul_exp_sq hf.continuous hρ hε + let M := C * Real.exp (2 * ε * R ^ 2 + 2) + have hM : 0 < M := mul_pos hC (Real.exp_pos _) + refine ⟨M, hM, fun n t z ht hz => ?_⟩ + have hspatial : C * Real.exp (2 * ε * ‖z‖ ^ 2 + 2) ≤ M := by + dsimp [M] + apply mul_le_mul_of_nonneg_left _ hC.le + apply Real.exp_le_exp.mpr + have hsq : ‖z‖ ^ 2 ≤ R ^ 2 := by nlinarith [norm_nonneg z] + nlinarith + have hd := norm_iteratedDeriv_even_le_of_exp_sq hf hC.le hε hbound n z + have hdb : ‖iteratedDeriv (2 * n) f z‖ ≤ n.factorial * M * (2 * ε * Real.exp 2) ^ n := + hd.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hspatial (by positivity)) (by positivity)) + have hratio : ‖t‖ * (2 * ε * Real.exp 2) ≤ 1 / 2 := by + calc + _ ≤ T * (2 * ε * Real.exp 2) := mul_le_mul_of_nonneg_right ht (by positivity) + _ = T / (2 * (T + 1)) := by dsimp [ε]; field_simp; ring + _ ≤ 1 / 2 := (div_le_iff₀ (by positivity)).mpr (by linarith) + have hn : (n.factorial : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + simp only [norm_mul, norm_div, norm_pow, norm_natCast] + calc + _ ≤ ‖t‖ ^ n / n.factorial * + (n.factorial * M * (2 * ε * Real.exp 2) ^ n) := + mul_le_mul_of_nonneg_left hdb (by positivity) + _ = M * (‖t‖ * (2 * ε * Real.exp 2)) ^ n := by rw [mul_pow]; field_simp; ring + _ ≤ M * (1 / 2 : ℝ) ^ n := + mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by positivity) hratio n) hM.le + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Composition.lean b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Composition.lean new file mode 100644 index 000000000..27540fe8a --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Composition.lean @@ -0,0 +1,70 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Nonzero +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Derivative +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# Composition of entire heat operators + +The Taylor expansion in the time variable proves the heat composition law for +every pair of complex times. It also proves convergence of the outer heat +series without a separate growth estimate for the intermediate heat image. +Opposite times give inverse operators on entire inputs of order below two. +-/ + +public section + +namespace Complex + +/-- The heat series of an intermediate heat image sums to the heat image at +the sum of the two complex times. -/ +theorem hasSum_heatOperator_heatOperator {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) + (s t z : ℂ) : + HasSum (fun n : ℕ => (-s) ^ n / (n.factorial : ℂ) * + iteratedDeriv (2 * n) (heatOperator t f) z) (heatOperator (s + t) f z) := by + have h := hasSum_taylorSeries_of_entire + (differentiable_heatOperator_time hf horder hρ z) t (s + t) + convert h using 1 + ext n + rw [iteratedDeriv_heatOperator_time hf horder hρ, + iteratedDeriv_heatOperator hf horder hρ] + simp only [add_sub_cancel_right, smul_eq_mul] + rw [neg_eq_neg_one_mul, mul_pow] + ring + +/-- Complex heat times add under composition. -/ +theorem heatOperator_heatOperator {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) + (s t : ℂ) : heatOperator s (heatOperator t f) = heatOperator (s + t) f := by + ext z + exact (hasSum_heatOperator_heatOperator hf horder hρ s t z).tsum_eq + +/-- The heat image can be recovered at the opposite complex time. -/ +theorem heatOperator_neg_heatOperator {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) + (t : ℂ) : heatOperator (-t) (heatOperator t f) = f := by + rw [heatOperator_heatOperator hf horder hρ, neg_add_cancel, heatOperator_zero] + +/-- At any fixed complex time the heat operator distinguishes entire inputs +of order below two. The two order bounds may be different. -/ +theorem heatOperator_eq_iff {f g : ℂ → ℂ} {ρ σ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) + (hg : Differentiable ℂ g) (horderg : TauCeti.OrderLE g σ) (hσ : σ < 2) + (t : ℂ) : heatOperator t f = heatOperator t g ↔ f = g := by + constructor + · intro h + have heq := congrArg (heatOperator (-t)) h + simpa only [heatOperator_neg_heatOperator hf horder hρ, + heatOperator_neg_heatOperator hg horderg hσ] using heq + · rintro rfl + rfl + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Derivative.lean b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Derivative.lean new file mode 100644 index 000000000..e2af1fd7e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Derivative.lean @@ -0,0 +1,110 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import Mathlib.Analysis.Complex.LocallyUniformLimit + +/-! +# Holomorphic heat sums and spatial derivatives + +For an entire input of order below two, the heat sum is entire separately in +time and space. Every spatial derivative commutes with the heat operator. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- At fixed complex time, the heat series converges locally uniformly in space. -/ +theorem tendstoLocallyUniformly_heatOperator_space {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (t : ℂ) : + TendstoLocallyUniformly + (fun N z => ∑ n ∈ Finset.range N, + (-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z) + (heatOperator t f) atTop := by + simpa only [Function.comp_def] using + (tendstoLocallyUniformly_heatOperator hf horder hρ).comp (fun z => (t, z)) (by fun_prop) + +/-- At fixed spatial point, the heat series converges locally uniformly in time. -/ +theorem tendstoLocallyUniformly_heatOperator_time {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (z : ℂ) : + TendstoLocallyUniformly + (fun N t => ∑ n ∈ Finset.range N, + (-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z) + (fun t => heatOperator t f z) atTop := by + simpa only [Function.comp_def] using + (tendstoLocallyUniformly_heatOperator hf horder hρ).comp (fun t => (t, z)) (by fun_prop) + +/-- Every finite heat sum is entire in space. -/ +private theorem differentiable_partial_heat {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (t : ℂ) (N : ℕ) : Differentiable ℂ + (fun z => ∑ n ∈ Finset.range N, + (-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z) := by + apply Differentiable.fun_sum + intro n _ + exact ((hf.contDiff (n := ⊤)).differentiable_iteratedDeriv _ + (WithTop.coe_lt_top _)).const_mul _ + +/-- Every complex-time heat image is entire in space. -/ +theorem differentiable_heatOperator {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (t : ℂ) : + Differentiable ℂ (heatOperator t f) := by + apply differentiableOn_univ.mp + apply (tendstoLocallyUniformlyOn_univ.mpr + (tendstoLocallyUniformly_heatOperator_space hf horder hρ t)).differentiableOn + (Eventually.of_forall fun N => (differentiable_partial_heat hf t N).differentiableOn) + isOpen_univ + +/-- At every spatial point, the heat image is entire in complex time. -/ +theorem differentiable_heatOperator_time {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (z : ℂ) : + Differentiable ℂ (fun t => heatOperator t f z) := by + apply differentiableOn_univ.mp + apply (tendstoLocallyUniformlyOn_univ.mpr + (tendstoLocallyUniformly_heatOperator_time hf horder hρ z)).differentiableOn + (Eventually.of_forall fun N => ?_) isOpen_univ + apply Differentiable.differentiableOn + apply Differentiable.fun_sum + intro n _ + exact ((differentiable_id.neg.pow n).div_const _).mul_const _ + +/-- Spatial derivatives commute with finite heat sums. -/ +private theorem iteratedDeriv_partial_heat {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (t : ℂ) (N k : ℕ) : + iteratedDeriv k (fun z => ∑ n ∈ Finset.range N, + (-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z) = + fun z => ∑ n ∈ Finset.range N, + (-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) (iteratedDeriv k f) z := by + ext z + rw [iteratedDeriv_fun_sum (fun n _ => + (((hf.contDiff (n := ⊤)).differentiable_iteratedDeriv _ + (WithTop.coe_lt_top _)).const_mul _).contDiff.contDiffAt)] + apply Finset.sum_congr rfl + intro n _ + simp only [iteratedDeriv_const_mul_field, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm k] + +/-- Every spatial derivative commutes with the entire heat operator. -/ +theorem iteratedDeriv_heatOperator {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (t : ℂ) (k : ℕ) : + iteratedDeriv k (heatOperator t f) = heatOperator t (iteratedDeriv k f) := by + have hleft := (tendstoLocallyUniformly_heatOperator_space hf horder hρ t).iteratedDeriv + (differentiable_partial_heat hf t) k + simp only [iteratedDeriv_partial_heat hf] at hleft + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv k (WithTop.coe_lt_top _) + have hright := tendstoLocallyUniformly_heatOperator_space hdf + (horder.iteratedDeriv hf k) hρ t + ext z + exact tendsto_nhds_unique + ((tendstoLocallyUniformlyOn_univ.mpr hleft).tendsto_at (Set.mem_univ z)) + ((tendstoLocallyUniformlyOn_univ.mpr hright).tendsto_at (Set.mem_univ z)) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Nonzero.lean b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Nonzero.lean new file mode 100644 index 000000000..273e01a61 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Nonzero.lean @@ -0,0 +1,91 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.HeatOperator.Derivative + +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic + +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.TimeDerivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import Mathlib.Analysis.Analytic.Order + +/-! +# Nonvanishing of entire heat images + +Iterating the time heat equation identifies every time derivative with an even +spatial derivative. An identically zero time slice would therefore make all +time jets vanish. Entire dependence on time, together with the initial value, +excludes this for every nonzero entire input of order below two. +-/ + +public section + +namespace Complex + +/-- Iterated time differentiation of the heat sum is a signed even spatial + derivative of its input followed by the same heat operator. -/ +theorem iteratedDeriv_heatOperator_time {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (z : ℂ) (k : ℕ) : + iteratedDeriv k (fun t => heatOperator t f z) = + fun t => (-1 : ℂ) ^ k * heatOperator t (iteratedDeriv (2 * k) f) z := by + induction k with + | zero => simp + | succ k ih => + rw [iteratedDeriv_succ, ih] + ext t + rw [iteratedDeriv_one.symm, iteratedDeriv_const_mul_field, iteratedDeriv_one] + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv (2 * k) + (WithTop.coe_lt_top _) + have ho := horder.iteratedDeriv hf (2 * k) + rw [(hasDerivAt_heatOperator_time hdf ho hρ t z).deriv, + iteratedDeriv_heatOperator hdf ho hρ] + have heq : iteratedDeriv 2 (iteratedDeriv (2 * k) f) = + iteratedDeriv (2 * (k + 1)) f := by + simp only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, + Nat.mul_add, Nat.mul_one, Nat.add_comm 2] + rw [heq, pow_succ] + ring + +/-- A complex-time heat image of a nonzero entire function of order below two +cannot vanish identically. -/ +theorem heatOperator_ne_zero {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) + (hne : f ≠ 0) (t : ℂ) : heatOperator t f ≠ 0 := by + intro hzero + obtain ⟨z, hz⟩ := Function.ne_iff.mp hne + have ha : AnalyticOnNhd ℂ (fun s => heatOperator s f z) Set.univ := + fun s _ => (differentiable_heatOperator_time hf horder hρ z).analyticAt s + have hall (k : ℕ) : iteratedDeriv k (fun s => heatOperator s f z) t = 0 := by + rw [iteratedDeriv_heatOperator_time hf horder hρ] + dsimp only + rw [← congrFun (iteratedDeriv_heatOperator hf horder hρ t (2 * k)) z, hzero] + simp + have htop : analyticOrderAt (fun s => heatOperator s f z) t = ⊤ := by + apply ENat.eq_top_iff_forall_ge.mpr + intro n + exact (natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero (ha t trivial)).mpr + (fun j _ => hall j) + have hstart : heatOperator 0 f z ≠ 0 := by simpa using hz + have hbase : analyticOrderAt (fun s => heatOperator s f z) 0 = 0 := + analyticOrderAt_eq_zero.mpr (.inr hstart) + have hfinite := ha.analyticOrderAt_ne_top_of_isPreconnected isPreconnected_univ + (Set.mem_univ (0 : ℂ)) (Set.mem_univ t) (by simp [hbase]) + exact hfinite htop + +/-- The entire heat operator vanishes identically exactly for the zero input +on the class of entire functions of order below two. -/ +theorem heatOperator_eq_zero_iff {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (t : ℂ) : + heatOperator t f = 0 ↔ f = 0 := by + constructor + · intro h + by_contra hf0 + exact heatOperator_ne_zero hf horder hρ hf0 t h + · intro h + simp [h] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Star.lean b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Star.lean new file mode 100644 index 000000000..6a22714ae --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/Star.lean @@ -0,0 +1,36 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Conjugation symmetry of the heat operator + +A function respecting complex conjugation retains that symmetry after real-time +heat evolution. The simultaneous time/space conjugation formula is valid even +without a convergence hypothesis, since conjugation commutes with total sums. +-/ + +public section + +open scoped ComplexConjugate + +namespace Complex + +/-- Simultaneous conjugation of time and space commutes with the heat operator +on a function that respects conjugation. -/ +theorem heatOperator_conj {f : ℂ → ℂ} (hf : ∀ z, f (conj z) = conj (f z)) (t z : ℂ) : + heatOperator (conj t) f (conj z) = conj (heatOperator t f z) := by + unfold heatOperator + rw [conj_tsum] + apply tsum_congr + intro n + rw [iteratedDeriv_conj hf] + simp only [map_mul, map_div₀, map_pow, map_neg, map_natCast] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/HeatOperator/TimeDerivative.lean b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/TimeDerivative.lean new file mode 100644 index 000000000..1b7fb4aaf --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/TimeDerivative.lean @@ -0,0 +1,98 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic + +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Derivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import Mathlib.Analysis.Complex.RealDeriv + +/-! +# The backward heat equation for entire heat sums + +The entire even-derivative series satisfies the backward heat equation. +All spatial derivatives satisfy the same equation, including after restriction +to real time and taking real parts. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Differentiating a finite heat sum in time removes its constant term and +shifts the spatial derivative order by two. -/ +private theorem hasDerivAt_partial_heat_succ (f : ℂ → ℂ) (z t : ℂ) (N : ℕ) : + HasDerivAt (fun s => ∑ n ∈ Finset.range (N + 1), + (-s) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z) + (-(∑ n ∈ Finset.range N, + (-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) (iteratedDeriv 2 f) z)) t := by + have hterm (n : ℕ) : HasDerivAt + (fun s => (-s) ^ (n + 1) / ((n + 1).factorial : ℂ) * iteratedDeriv (2 * (n + 1)) f z) + (-((-t) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) (iteratedDeriv 2 f) z)) t := by + have hb : HasDerivAt (fun s : ℂ => -s) (-1) t := by + simpa only [Pi.neg_def, id_eq] using (hasDerivAt_id t).neg + have h := ((hb.fun_pow (n + 1)).div_const + ((n + 1).factorial : ℂ)).mul_const (iteratedDeriv (2 * (n + 1)) f z) + have heq : iteratedDeriv (2 * n) (iteratedDeriv 2 f) z = + iteratedDeriv (2 * (n + 1)) f z := by + simp only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.mul_add, Nat.mul_one] + convert h using 1 + rw [heq, Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, Nat.add_sub_cancel] + have hn : (n.factorial : ℂ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + have hs : (n : ℂ) + 1 ≠ 0 := by exact_mod_cast n.succ_ne_zero + field_simp + have hs := (HasDerivAt.fun_sum (u := Finset.range N) (fun n _ => hterm n)).add_const (f z) + convert hs using 1 + · ext s + rw [Finset.sum_range_succ'] + simp only [pow_zero, Nat.factorial_zero, Nat.cast_one, div_one, Nat.mul_zero, + iteratedDeriv_zero, one_mul] + · simp only [Finset.sum_neg_distrib] + +/-- The entire heat operator satisfies the backward heat equation at every +complex time and spatial point. -/ +theorem hasDerivAt_heatOperator_time {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (t z : ℂ) : + HasDerivAt (fun s => heatOperator s f z) (-(iteratedDeriv 2 (heatOperator t f) z)) t := by + have hd (N : ℕ) : Differentiable ℂ (fun s => ∑ n ∈ Finset.range N, + (-s) ^ n / (n.factorial : ℂ) * iteratedDeriv (2 * n) f z) := by + apply Differentiable.fun_sum + intro n _ + exact ((differentiable_id.neg.pow n).div_const _).mul_const _ + have hconv := (tendstoLocallyUniformly_heatOperator_time hf horder hρ z).iteratedDeriv hd 1 + have hleft := ((tendstoLocallyUniformlyOn_univ.mpr hconv).tendsto_at + (Set.mem_univ t)).comp (tendsto_add_atTop_nat 1) + simp only [Function.comp_def, iteratedDeriv_one, + (hasDerivAt_partial_heat_succ f z t _).deriv] at hleft + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv 2 (WithTop.coe_lt_top _) + have hright := ((tendstoLocallyUniformlyOn_univ.mpr + (tendstoLocallyUniformly_heatOperator_time hdf (horder.iteratedDeriv hf 2) hρ z)).tendsto_at + (Set.mem_univ t)).neg + have heq := tendsto_nhds_unique hleft hright + convert (differentiable_heatOperator_time hf horder hρ z t).hasDerivAt using 1 + rw [heq, iteratedDeriv_heatOperator hf horder hρ] + +/-- Every real spatial Taylor jet of the entire heat flow satisfies the +backward heat equation in real time. -/ +theorem hasDerivAt_re_iteratedDeriv_heatOperator {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) + (t x : ℝ) (n : ℕ) : + HasDerivAt (fun s : ℝ => (iteratedDeriv n (heatOperator (s : ℂ) f) (x : ℂ)).re) + (-(iteratedDeriv (n + 2) (heatOperator (t : ℂ) f) (x : ℂ)).re) t := by + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv n (WithTop.coe_lt_top _) + have h := hasDerivAt_heatOperator_time hdf (horder.iteratedDeriv hf n) hρ (t : ℂ) (x : ℂ) + have hr := h.real_of_complex + have heq (s : ℂ) : heatOperator s (iteratedDeriv n f) = iteratedDeriv n (heatOperator s f) := + (iteratedDeriv_heatOperator hf horder hρ s n).symm + simp only [heq] at hr + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, + Nat.add_comm 2, neg_re] using hr + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/HeatOperator/TimeLimit.lean b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/TimeLimit.lean new file mode 100644 index 000000000..452a710e4 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/HeatOperator/TimeLimit.lean @@ -0,0 +1,40 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic + +/-! +# Locally uniform continuity of heat images in time + +Convergence of complex times gives locally uniform convergence of the +corresponding spatial heat images. This follows from joint continuity and +compactness of each bounded spatial set. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Convergent complex heat times give locally uniform convergence in space. -/ +theorem tendstoLocallyUniformly_heatOperator_of_tendsto {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) + {ι : Type*} {l : Filter ι} {t : ι → ℂ} {s : ℂ} (ht : Tendsto t l (𝓝 s)) : + TendstoLocallyUniformly (fun i => heatOperator (t i) f) (heatOperator s f) l := by + rw [tendstoLocallyUniformly_iff_forall_isCompact] + intro K hK + let : CompactSpace K := isCompact_iff_compactSpace.mp hK + rw [tendstoUniformlyOn_iff_tendstoUniformly_comp_coe] + have hc : Continuous (fun p : ℂ × K => heatOperator p.1 f p.2) := + (continuous_heatOperator hf horder hρ).comp + (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd)) + intro u hu + exact ht.eventually + (Continuous.tendstoUniformly (fun t (z : K) => heatOperator t f z) hc s u hu) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/ImaginarySquareDescent.lean b/RealRooted/Mathlib/Analysis/Complex/ImaginarySquareDescent.lean new file mode 100644 index 000000000..74cd90e3e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/ImaginarySquareDescent.lean @@ -0,0 +1,132 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.RootsOfUnity.Descent +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.SquareDescent + +/-! +# Even functions and the imaginary square-variable transformation + +For an even function `f`, its imaginary square descent is the branch-independent +function satisfying `D(-z^2) = f(z)`. If `f` is entire then so is `D`. +Real zeros of `f` become strictly negative zeros of `D` when `f(0) != 0`. +This is Zhang, arXiv:1506.07012v13, equation (1.5), with explicit hypotheses. +-/ + +public section + +open Set +open scoped ComplexConjugate + +namespace Complex + +/-- The imaginary square-variable descent of a complex function. +Evenness makes the choice of square root invisible. -/ +@[expose] noncomputable def imaginarySquareDescent (f : ℂ → ℂ) : ℂ → ℂ := + TauCeti.descendPow 2 (fun z ↦ f (I * z)) + +/-- Evenness makes the imaginary pullback invariant under square roots of unity. -/ +private theorem imaginarySquare_invariant {f : ℂ → ℂ} + (heven : ∀ z, f (-z) = f z) (z : ℂ) (ζ : rootsOfUnity 2 ℂ) : + f (I * (ζ • z)) = f (I * z) := by + have h : (ζ • z) ^ 2 = z ^ 2 := rootsOfUnity.smul_pow ζ z + rcases (sq_eq_sq_iff_eq_or_eq_neg).mp h with h | h + · rw [h] + · rw [h, mul_neg, heven] + +/-- The defining square-variable identity, valid on all of the complex plane. -/ +theorem imaginarySquareDescent_sq {f : ℂ → ℂ} + (heven : ∀ z, f (-z) = f z) (z : ℂ) : + imaginarySquareDescent f (z ^ 2) = f (I * z) := + TauCeti.descendPow_pow (imaginarySquare_invariant heven z) + +/-- Negative-square pullback recovers the original even function. -/ +theorem imaginarySquareDescent_neg_sq {f : ℂ → ℂ} + (heven : ∀ z, f (-z) = f z) (z : ℂ) : + imaginarySquareDescent f (-(z ^ 2)) = f z := by + have hsq : (I * z) ^ 2 = -(z ^ 2) := by rw [mul_pow, I_sq]; ring + rw [← hsq, imaginarySquareDescent_sq heven, ← mul_assoc, I_mul_I, neg_one_mul, heven] + +/-- The value at the origin is unchanged. -/ +@[simp] theorem imaginarySquareDescent_zero {f : ℂ → ℂ} : + imaginarySquareDescent f 0 = f 0 := by + simp [imaginarySquareDescent, TauCeti.descendPow_apply] + +/-- Imaginary square descent preserves entire analyticity of an even function. -/ +theorem differentiable_imaginarySquareDescent {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (heven : ∀ z, f (-z) = f z) : + Differentiable ℂ (imaginarySquareDescent f) := by + have h := TauCeti.differentiableOn_descendPow (m := 2) isOpen_univ + ((hf.comp ((differentiable_const I).mul differentiable_id)).differentiableOn) + (fun z _ ↦ imaginarySquare_invariant heven z) + rw [Set.image_univ_of_surjective (Complex.isOpenQuotientMap_pow 2).surjective] at h + exact differentiableOn_univ.mp h + +/-- Evenness and real Taylor data give real Taylor data after imaginary descent. -/ +theorem imaginarySquareDescent_conj {f : ℂ → ℂ} + (heven : ∀ z, f (-z) = f z) + (hconj : ∀ z, f (conj z) = conj (f z)) (z : ℂ) : + imaginarySquareDescent f (conj z) = conj (imaginarySquareDescent f z) := by + obtain ⟨w, rfl⟩ := (Complex.isOpenQuotientMap_pow 2).surjective z + rw [map_pow, imaginarySquareDescent_sq heven, imaginarySquareDescent_sq heven, + ← hconj, map_mul, conj_I, neg_mul, heven] + +/-- Every growth-order bound is halved by the imaginary square descent. -/ +theorem orderLE_imaginarySquareDescent {f : ℂ → ℂ} {rho : ℝ} + (hf : TauCeti.OrderLE f rho) : + TauCeti.OrderLE (imaginarySquareDescent f) (rho / 2) := by + have h : TauCeti.OrderLE (fun z ↦ f (I * z)) rho := by + simpa only [add_zero] using hf.comp_mul_add I 0 + exact h.descendPow_two + +/-- At nonnegative real arguments the entire descent agrees with the +literal imaginary-square-root expression used in Zhang's formula. -/ +theorem imaginarySquareDescent_ofReal {f : ℂ → ℂ} + (heven : ∀ z, f (-z) = f z) {x : ℝ} (hx : 0 ≤ x) : + imaginarySquareDescent f (x : ℂ) = f (I * (Real.sqrt x : ℂ)) := by + have hsq : (Real.sqrt x : ℂ) ^ 2 = (x : ℂ) := by exact_mod_cast Real.sq_sqrt hx + rw [← hsq, imaginarySquareDescent_sq heven] + +/-- For a nonzero origin value, real zeros of an even function correspond +exactly to strictly negative zeros of its imaginary square descent. -/ +theorem imaginarySquareDescent_negZeros_iff {f : ℂ → ℂ} + (heven : ∀ z, f (-z) = f z) (h0 : f 0 ≠ 0) : + (∀ z, imaginarySquareDescent f z = 0 → z.im = 0 ∧ z.re < 0) ↔ + (∀ z, f z = 0 → z.im = 0) := by + constructor + · intro hd z hz + have h := hd (-(z ^ 2)) (by rw [imaginarySquareDescent_neg_sq heven, hz]) + have him : z.re * z.im = 0 := by + have he := h.1 + simp only [neg_im, pow_two, mul_im] at he + nlinarith + rcases mul_eq_zero.mp him with hr | hi + · have he := h.2 + simp only [neg_re, pow_two, mul_re, hr, zero_mul, zero_sub, neg_neg] at he + nlinarith [sq_nonneg z.im] + · exact hi + · intro hf z hz + obtain ⟨w, hw⟩ := (Complex.isOpenQuotientMap_pow 2).surjective (-z) + change w ^ 2 = -z at hw + have hwz : -(w ^ 2) = z := by rw [hw, neg_neg] + have hfw : f w = 0 := by rw [← imaginarySquareDescent_neg_sq heven, hwz, hz] + have hi : w.im = 0 := hf w hfw + have hw0 : w ≠ 0 := by + intro he + exact h0 (by simpa only [he] using hfw) + have hr : w.re ≠ 0 := by + intro he + apply hw0 + exact Complex.ext he hi + rw [← hwz] + constructor + · simp only [neg_im, pow_two, mul_im, hi, mul_zero, zero_mul, add_zero, neg_zero] + · simpa only [neg_re, pow_two, mul_re, hi, mul_zero, sub_zero] using neg_lt_zero.mpr + (mul_self_pos.mpr hr) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Basic.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Basic.lean new file mode 100644 index 000000000..669815f75 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Basic.lean @@ -0,0 +1,66 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder + +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Bounds + +/-! +# Entire infinite differential operators + +If an entire symbol and target each have growth order below two, their +differential series converges absolutely and locally uniformly in space. +The symbol uses exponential Taylor coefficients: its nth derivative at zero +is divided by n factorial before acting on the nth derivative of the target. +-/ + +@[expose] public section + +open Filter Topology + +namespace Complex + +/-- The infinite differential operator associated with an entire symbol. -/ +noncomputable def infiniteDifferentialApply (φ f : ℂ → ℂ) (z : ℂ) : ℂ := + ∑' n : ℕ, iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ) + +/-- The differential series is absolutely convergent when both entire inputs +have order strictly below two. -/ +theorem summable_norm_infiniteDifferentialApply {φ f : ℂ → ℂ} {ρ σ : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hσ : σ < 2) (z : ℂ) : + Summable (fun n : ℕ => + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖) := by + obtain ⟨M, _, hM⟩ := exists_infinite_differential_term_bound hφ hoφ hρ hf hof hσ (norm_nonneg z) + exact Summable.of_nonneg_of_le (fun _ => norm_nonneg _) (fun n => hM n z le_rfl) + ((summable_geometric_of_abs_lt_one (by norm_num : |(1 / 2 : ℝ)| < 1)).mul_left M) + +/-- Infinite differential partial sums converge uniformly on every spatial disk. -/ +theorem tendstoUniformlyOn_infiniteDifferentialApply {φ f : ℂ → ℂ} {ρ σ : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hσ : σ < 2) + {R : ℝ} (hR : 0 ≤ R) : + TendstoUniformlyOn (fun N z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)) + (infiniteDifferentialApply φ f) atTop {z | ‖z‖ ≤ R} := by + obtain ⟨M, _, hM⟩ := exists_infinite_differential_term_bound hφ hoφ hρ hf hof hσ hR + exact tendstoUniformlyOn_tsum_nat + ((summable_geometric_of_abs_lt_one (by norm_num : |(1 / 2 : ℝ)| < 1)).mul_left M) hM + +/-- Infinite differential partial sums converge locally uniformly in space. -/ +theorem tendstoLocallyUniformly_infiniteDifferentialApply {φ f : ℂ → ℂ} {ρ σ : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hσ : σ < 2) : + TendstoLocallyUniformly (fun N z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)) + (infiniteDifferentialApply φ f) atTop := by + rw [tendstoLocallyUniformly_iff_forall_isCompact] + intro K hK + obtain ⟨R, hR, hbound⟩ := hK.isBounded.exists_pos_norm_le + exact (tendstoUniformlyOn_infiniteDifferentialApply hφ hoφ hρ hf hof hσ hR.le).mono hbound + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Bounds.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Bounds.lean new file mode 100644 index 000000000..4b21ab86a --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Bounds.lean @@ -0,0 +1,93 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder + +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Bounds +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative + +/-! +# Bounds for infinite differential symbols below order two + +The even-derivative heat estimate gives a geometric bound for the product of +two derivative sequences divided by a factorial. Applying the same estimate +to the first derivatives also controls the odd terms. +-/ + +public section + +namespace Complex + +/-- Even derivative products admit a common geometric bound on spatial disks. -/ +private theorem exists_even_differential_bound {φ f : ℂ → ℂ} {ρ σ : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hσ : σ < 2) + {R : ℝ} (hR : 0 ≤ R) : + ∃ M > 0, ∀ n N : ℕ, 2 * n ≤ N → ∀ z : ℂ, ‖z‖ ≤ R → + ‖iteratedDeriv (2 * n) φ 0 * iteratedDeriv (2 * n) f z / (N.factorial : ℂ)‖ ≤ + M * (1 / 2 : ℝ) ^ (2 * n) := by + obtain ⟨A, hA, hφb⟩ := exists_heat_term_bound hφ hoφ hρ + (T := 1) (R := 0) (by positivity) le_rfl + obtain ⟨B, hB, hfb⟩ := exists_heat_term_bound hf hof hσ (T := 1) (by positivity) hR + refine ⟨A * B, mul_pos hA hB, fun n N hN z hz => ?_⟩ + have ha : ‖iteratedDeriv (2 * n) φ 0‖ / n.factorial ≤ A * (1 / 2 : ℝ) ^ n := by + simpa only [one_pow, one_div, norm_mul, norm_inv, norm_natCast, inv_mul_eq_div, norm_div] + using hφb n 1 0 (by simp) (by simp) + have hb : ‖iteratedDeriv (2 * n) f z‖ / n.factorial ≤ B * (1 / 2 : ℝ) ^ n := by + simpa only [one_pow, one_div, norm_mul, norm_inv, norm_natCast, inv_mul_eq_div, norm_div] + using hfb n 1 z (by simp) hz + have hfac : (n.factorial : ℝ) ^ 2 ≤ N.factorial := by + have hnat : n.factorial * n.factorial ≤ N.factorial := + (Nat.le_of_dvd (Nat.factorial_pos _) + (Nat.factorial_mul_factorial_dvd_factorial_add n n)).trans + (Nat.factorial_le (by lia : n + n ≤ N)) + simpa only [pow_two, Nat.cast_mul] using (Nat.cast_le (α := ℝ)).mpr hnat + have hratio : (n.factorial : ℝ) ^ 2 / N.factorial ≤ 1 := + (div_le_one (by positivity)).mpr hfac + have hn : (n.factorial : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + simp only [norm_div, norm_mul, norm_natCast] + calc + _ = (‖iteratedDeriv (2 * n) φ 0‖ / n.factorial * + (‖iteratedDeriv (2 * n) f z‖ / n.factorial)) * + ((n.factorial : ℝ) ^ 2 / N.factorial) := by field_simp + _ ≤ (A * (1 / 2 : ℝ) ^ n * (B * (1 / 2 : ℝ) ^ n)) * 1 := + mul_le_mul (mul_le_mul ha hb (by positivity) (by positivity)) hratio + (by positivity) (by positivity) + _ = _ := by rw [show 2 * n = n + n by lia, pow_add]; ring + +/-- On every spatial disk, an infinite differential series whose symbol and +target both have order below two has a geometric majorant. -/ +theorem exists_infinite_differential_term_bound {φ f : ℂ → ℂ} {ρ σ : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hσ : σ < 2) + {R : ℝ} (hR : 0 ≤ R) : + ∃ M > 0, ∀ n : ℕ, ∀ z : ℂ, ‖z‖ ≤ R → + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ ≤ + M * (1 / 2 : ℝ) ^ n := by + obtain ⟨A, hA, ha⟩ := exists_even_differential_bound hφ hoφ hρ hf hof hσ hR + have hφ' := (hφ.contDiff (n := ⊤)).differentiable_iteratedDeriv 1 (WithTop.coe_lt_top _) + have hf' := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv 1 (WithTop.coe_lt_top _) + obtain ⟨B, hB, hb⟩ := exists_even_differential_bound + hφ' (hoφ.iteratedDeriv hφ 1) hρ hf' (hof.iteratedDeriv hf 1) hσ hR + refine ⟨A + 2 * B, by positivity, fun n z hz => ?_⟩ + obtain ⟨k, hk | hk⟩ := n.even_or_odd' + · subst n + exact (ha k (2 * k) le_rfl z hz).trans + (mul_le_mul_of_nonneg_right (by linarith) (by positivity)) + · subst n + have hb' : ‖iteratedDeriv (2 * k + 1) φ 0 * + iteratedDeriv (2 * k + 1) f z / ((2 * k + 1).factorial : ℂ)‖ ≤ + B * (1 / 2 : ℝ) ^ (2 * k) := by + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply] using + hb k (2 * k + 1) (by lia) z hz + calc + _ ≤ B * (1 / 2 : ℝ) ^ (2 * k) := hb' + _ = (2 * B) * (1 / 2 : ℝ) ^ (2 * k + 1) := by rw [pow_succ]; ring + _ ≤ (A + 2 * B) * (1 / 2 : ℝ) ^ (2 * k + 1) := + mul_le_mul_of_nonneg_right (by linarith) (by positivity) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Constant.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Constant.lean new file mode 100644 index 000000000..584077aa3 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Constant.lean @@ -0,0 +1,37 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic + +/-! +# Constant symbols and targets + +For a constant input on either side, the differential series has only its +zeroth term. No growth or differentiability assumptions are necessary. +-/ + +public section + +namespace Complex + +/-- A constant target is multiplied by the symbol's value at zero. -/ +@[simp] theorem infiniteDifferentialApply_const (φ : ℂ → ℂ) (c : ℂ) : + infiniteDifferentialApply φ (fun _ => c) = fun _ => φ 0 * c := by + ext z + rw [infiniteDifferentialApply, tsum_eq_single 0 (fun n hn => by + simp [iteratedDeriv_const, hn])] + simp + +/-- A constant differential symbol acts by scalar multiplication. -/ +@[simp] theorem infiniteDifferentialApply_const_symbol (c : ℂ) (f : ℂ → ℂ) : + infiniteDifferentialApply (fun _ => c) f = fun z => c * f z := by + ext z + rw [infiniteDifferentialApply, tsum_eq_single 0 (fun n hn => by + simp [iteratedDeriv_const, hn])] + simp + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Derivative.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Derivative.lean new file mode 100644 index 000000000..0e6b46004 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Derivative.lean @@ -0,0 +1,81 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import Mathlib.Analysis.Complex.LocallyUniformLimit + +/-! +# Entire differential sums and spatial differentiation + +For entire inputs of order below two, the normally convergent differential +series defines an entire function and commutes with every spatial derivative. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Each finite differential partial sum is entire. -/ +theorem differentiable_partial_infiniteDifferentialApply {φ f : ℂ → ℂ} + (hf : Differentiable ℂ f) (N : ℕ) : Differentiable ℂ + (fun z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)) := by + apply Differentiable.fun_sum + intro n _ + exact (((hf.contDiff (n := ⊤)).differentiable_iteratedDeriv _ + (WithTop.coe_lt_top _)).const_mul _).div_const _ + +/-- The infinite differential image of entire inputs of order below two is entire. -/ +theorem differentiable_infiniteDifferentialApply {φ f : ℂ → ℂ} {ρ σ : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hσ : σ < 2) : + Differentiable ℂ (infiniteDifferentialApply φ f) := by + apply differentiableOn_univ.mp + apply (tendstoLocallyUniformlyOn_univ.mpr + (tendstoLocallyUniformly_infiniteDifferentialApply hφ hoφ hρ hf hof hσ)).differentiableOn + (Eventually.of_forall fun N => + (differentiable_partial_infiniteDifferentialApply hf N).differentiableOn) isOpen_univ + +/-- Spatial derivatives commute with finite differential partial sums. -/ +theorem iteratedDeriv_partial_infiniteDifferentialApply {φ f : ℂ → ℂ} + (hf : Differentiable ℂ f) (N k : ℕ) : + iteratedDeriv k (fun z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)) = + fun z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n (iteratedDeriv k f) z / (n.factorial : ℂ) := by + ext z + rw [iteratedDeriv_fun_sum (fun n _ => + ((((hf.contDiff (n := ⊤)).differentiable_iteratedDeriv _ + (WithTop.coe_lt_top _)).const_mul _).div_const _).contDiff.contDiffAt)] + apply Finset.sum_congr rfl + intro n _ + simp only [iteratedDeriv_div_const, iteratedDeriv_const_mul_field, + iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm k] + +/-- Every spatial derivative commutes with a convergent infinite differential operator. -/ +theorem iteratedDeriv_infiniteDifferentialApply {φ f : ℂ → ℂ} {ρ σ : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hσ : σ < 2) (k : ℕ) : + iteratedDeriv k (infiniteDifferentialApply φ f) = + infiniteDifferentialApply φ (iteratedDeriv k f) := by + have hleft := + (tendstoLocallyUniformly_infiniteDifferentialApply hφ hoφ hρ hf hof hσ).iteratedDeriv + (differentiable_partial_infiniteDifferentialApply hf) k + simp only [iteratedDeriv_partial_infiniteDifferentialApply hf] at hleft + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv k (WithTop.coe_lt_top _) + have hright := tendstoLocallyUniformly_infiniteDifferentialApply hφ hoφ hρ hdf + (hof.iteratedDeriv hf k) hσ + ext z + exact tendsto_nhds_unique + ((tendstoLocallyUniformlyOn_univ.mpr hleft).tendsto_at (Set.mem_univ z)) + ((tendstoLocallyUniformlyOn_univ.mpr hright).tendsto_at (Set.mem_univ z)) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/ExponentialCoefficients.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/ExponentialCoefficients.lean new file mode 100644 index 000000000..2543d538b --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/ExponentialCoefficients.lean @@ -0,0 +1,50 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.Liouville + +/-! +# Taylor bounds for entire functions of small exponential type + +Cauchy's circle is centered at zero, with radius `(n+1)/B`. The bound therefore +retains the small exponential type `B` in every positive Taylor coefficient. +-/ + +public section + +open Metric + +namespace Complex + +/-- An exponential norm bound controls every derivative at the origin, retaining +the exponential type. The prefactor also handles derivative order zero. -/ +theorem norm_iteratedDeriv_zero_le_of_exp_norm_bound {φ : ℂ → ℂ} + (hφ : Differentiable ℂ φ) {B : ℝ} (hB : 0 < B) + (hbound : ∀ z, ‖φ z‖ ≤ Real.exp (B * ‖z‖)) (n : ℕ) : + ‖iteratedDeriv n φ 0‖ ≤ + n.factorial * Real.exp 1 * (Real.exp 1 * B / ((n : ℝ) + 1)) ^ n := by + let r : ℝ := ((n : ℝ) + 1) / B + have hr : 0 < r := div_pos (by positivity) hB + have hBr : B * r = (n : ℝ) + 1 := by dsimp [r]; field_simp [hB.ne'] + have hc : ∀ z ∈ sphere (0 : ℂ) r, + ‖φ z‖ ≤ Real.exp ((n : ℝ) + 1) := by + intro z hz + have hz' : ‖z‖ = r := by simpa only [mem_sphere_iff_norm, sub_zero] using hz + simpa only [hz', hBr] using hbound z + calc + _ ≤ n.factorial * Real.exp ((n : ℝ) + 1) / r ^ n := + norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le n hr hφ.diffContOnCl hc + _ = _ := by + rw [Real.exp_add, ← Real.exp_one_pow] + dsimp only [r] + simp only [div_pow, mul_pow] + field_simp [hB.ne'] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianApproxComposition.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianApproxComposition.lean new file mode 100644 index 000000000..d7e7e5ccd --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianApproxComposition.lean @@ -0,0 +1,97 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSymbolLimit +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianImageGrowth +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianConvergence +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianPolynomialComposition +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialSymbol +import RealRooted.Mathlib.Topology.Algebra.IsUniformGroup.FiniteSum +import Mathlib.Topology.Algebra.Polynomial +import Mathlib.Analysis.Calculus.Deriv.Polynomial + +/-! +# Infinite factor composition from controlled polynomial approximation + +An extra symbol whose polynomial approximants admit common arbitrarily small +Gaussian bounds can be passed through a Gaussian-convergent operator. Both +limits are the actual derivative-normalized differential series. +-/ + +public section + +open Filter Polynomial Topology + +namespace Complex + +/-- A small symbol coefficient preserves both strict Gaussian thresholds. -/ +private theorem exists_gaussian_composition_margin {a b E : ℝ} + (hb : 0 < b) (hE : 0 < E) (hab : 4 * a * b < 1) : + ∃ ε > 0, 4 * (a + ε) * b < 1 ∧ 4 * ε * E < 1 := by + have haU : a < 1 / (4 * b) := + (lt_div_iff₀ (by positivity)).mpr (by nlinarith) + have hU : 0 < 1 / (4 * b) - a := sub_pos.mpr haU + have hV : 0 < 1 / (4 * E) := by positivity + obtain ⟨ε, hε, hεUV⟩ := exists_between (lt_min hU hV) + have hεU := hεUV.trans_le (min_le_left _ _) + have hεV := hεUV.trans_le (min_le_right _ _) + refine ⟨ε, hε, ?_, ?_⟩ + · have h := (lt_div_iff₀ (by positivity : 0 < 4 * b)).mp + (show a + ε < 1 / (4 * b) by linarith) + nlinarith + · have h := (lt_div_iff₀ (by positivity : 0 < 4 * E)).mp hεV + nlinarith + +/-- A symbol with uniformly minimal-Gaussian polynomial approximants +composes with a Gaussian differential operator. The conclusion includes zero +outputs and supplies the genuine infinite-factor composition identity. -/ +theorem infiniteDifferentialApply_mul_of_polynomial_approx + {P : ℕ → ℂ[X]} {ψ φ f : ℂ → ℂ} + (hP : TendstoLocallyUniformly (fun n z ↦ (P n).eval z) ψ atTop) + (hPbound : ∀ ε > 0, ∃ C > 0, ∀ n z, ‖(P n).eval z‖ ≤ C * Real.exp (ε * ‖z‖ ^ 2)) + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + infiniteDifferentialApply (fun z ↦ ψ z * φ z) f = + infiniteDifferentialApply ψ (infiniteDifferentialApply φ f) := by + let g := infiniteDifferentialApply φ f + have hg : Differentiable ℂ g := differentiable_infiniteDifferentialApply_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound + obtain ⟨M, hM, E, hE, hgBound⟩ := exists_norm_infiniteDifferentialApply_le_exp_sq + hφ hf hMφ hMf ha hb hab hφbound hfbound + obtain ⟨ε, hε, hsum, hεE⟩ := exists_gaussian_composition_margin hb hE hab + obtain ⟨C, hC, hCbound⟩ := hPbound ε hε + have hprodlim : TendstoLocallyUniformly + (fun n z ↦ (P n).eval z * φ z) (fun z ↦ ψ z * φ z) atTop := by + simpa only [Pi.mul_def] using hP.mul₀ (tendstoLocallyUniformly_const_family φ atTop) + (hP.continuous (Frequently.of_forall fun n ↦ (P n).continuous)) hφ.continuous + have hprodBound (n : ℕ) (z : ℂ) : + ‖(P n).eval z * φ z‖ ≤ (C * Mφ) * Real.exp ((a + ε) * ‖z‖ ^ 2) := by + calc + _ = ‖(P n).eval z‖ * ‖φ z‖ := norm_mul _ _ + _ ≤ (C * Real.exp (ε * ‖z‖ ^ 2)) * (Mφ * Real.exp (a * ‖z‖ ^ 2)) := by + gcongr + · exact hCbound n z + · exact hφbound z + _ = _ := by rw [add_mul, Real.exp_add]; ring + ext z + have hleft := tendsto_infiniteDifferentialApply_of_gaussian + (fun n ↦ by fun_prop) hprodlim hf (mul_nonneg hC.le hMφ) hMf + (add_pos ha hε) hb hsum hprodBound hfbound z + have hright := tendsto_infiniteDifferentialApply_of_gaussian + (fun n ↦ (P n).differentiable) hP hg hC.le hM.le hε hE hεE hCbound hgBound z + have heq (n : ℕ) : + infiniteDifferentialApply (fun w ↦ (P n).eval w * φ w) f z = + infiniteDifferentialApply (fun w ↦ (P n).eval w) g z := by + rw [infiniteDifferentialApply_polynomial_mul_of_gaussian (P n) + hφ hf hMφ hMf ha hb hab hφbound hfbound, infiniteDifferentialApply_polynomial] + exact tendsto_nhds_unique (hleft.congr' (Eventually.of_forall heq)) hright + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianBound.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianBound.lean new file mode 100644 index 000000000..1c3443606 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianBound.lean @@ -0,0 +1,90 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianDerivative +import RealRooted.Mathlib.Analysis.SpecialFunctions.FactorialExponential +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.NormNum.RealSqrt + +/-! +# Differential-series bounds retaining the Gaussian threshold + +Optimized Cauchy radii and the exponential-scale factorial bound leave a +polynomial factor times `(2*sqrt(a*b))^n`. This retains the sharp threshold +`a*b < 1/4` instead of losing an extra exponential constant. +-/ + +public section + +namespace Complex + +/-- The product of the two optimized positive Cauchy radii. -/ +private theorem mul_gaussian_radius {a b : ℝ} (ha : 0 ≤ a) (n : ℕ) : + Real.sqrt (((n : ℝ) + 1) / (2 * a)) * + Real.sqrt (((n : ℝ) + 1) / (2 * b)) = + ((n : ℝ) + 1) / (2 * Real.sqrt (a * b)) := by + rw [Real.sqrt_div (by positivity), Real.sqrt_div (by positivity), + div_mul_div_comm, Real.mul_self_sqrt (by positivity), + ← Real.sqrt_mul (by positivity)] + rw [show (2 * a) * (2 * b) = 4 * (a * b) by ring, + Real.sqrt_mul (by norm_num)] + norm_num + +/-- A Gaussian bound on the symbol at zero and on the target at the spatial +point gives a sharp geometric factor for every actual differential-series term. -/ +theorem norm_differential_term_le_of_gaussian_center {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) (z : ℂ) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w - z‖ ^ 2)) (n : ℕ) : + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ ≤ + (2 * Real.exp 2 * Mφ * Mf) * ((n : ℝ) + 1) * + (2 * Real.sqrt (a * b)) ^ n := by + let r : ℝ := Real.sqrt (((n : ℝ) + 1) / (2 * a)) + let s : ℝ := Real.sqrt (((n : ℝ) + 1) / (2 * b)) + have hr : 0 < r := Real.sqrt_pos.mpr (by positivity) + have hs : 0 < s := Real.sqrt_pos.mpr (by positivity) + have hrad : r * s = ((n : ℝ) + 1) / (2 * Real.sqrt (a * b)) := + mul_gaussian_radius ha.le n + have hφn := norm_iteratedDeriv_le_of_gaussian_center hφ ha 0 + (by simpa only [sub_zero] using hφbound) n + have hfn := norm_iteratedDeriv_le_of_gaussian_center hf hb z hfbound n + have hfac : (n.factorial : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + have hexp : Real.exp (((n : ℝ) + 1) / 2) * Real.exp (((n : ℝ) + 1) / 2) = + Real.exp 1 ^ n * Real.exp 1 := by + rw [← Real.exp_add, show ((n : ℝ) + 1) / 2 + ((n : ℝ) + 1) / 2 = + (n : ℝ) + 1 by ring, Real.exp_add, ← Real.exp_one_pow] + simp only [norm_div, norm_mul, norm_natCast] + calc + _ ≤ ((n.factorial * (Mφ * Real.exp (((n : ℝ) + 1) / 2)) / r ^ n) * + (n.factorial * (Mf * Real.exp (((n : ℝ) + 1) / 2)) / s ^ n)) / n.factorial := + div_le_div_of_nonneg_right + (mul_le_mul hφn hfn (norm_nonneg _) (by positivity)) (by positivity) + _ = n.factorial * (Mφ * Mf) * + (Real.exp (((n : ℝ) + 1) / 2) * Real.exp (((n : ℝ) + 1) / 2)) / + (r * s) ^ n := by + rw [mul_pow] + field_simp [hfac, hr.ne', hs.ne'] + _ = (Mφ * Mf * Real.exp 1) * + (n.factorial * (Real.exp 1 / ((n : ℝ) + 1)) ^ n) * + (2 * Real.sqrt (a * b)) ^ n := by + rw [hrad, hexp] + simp only [div_pow, mul_pow] + field_simp + _ ≤ (Mφ * Mf * Real.exp 1) * (2 * Real.exp 1 * ((n : ℝ) + 1)) * + (2 * Real.sqrt (a * b)) ^ n := by + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (Real.factorial_mul_exp_div_pow_le n) (by positivity)) + (by positivity) + _ = _ := by + rw [show Real.exp 2 = Real.exp 1 * Real.exp 1 by rw [← Real.exp_add]; norm_num] + ring + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianConvergence.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianConvergence.lean new file mode 100644 index 000000000..39af3f4c5 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianConvergence.lean @@ -0,0 +1,109 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianUniformBound +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Derivative +import Mathlib.Analysis.Complex.LocallyUniformLimit + +/-! +# Sharp Gaussian convergence for infinite differential operators + +For global bounds `M exp(a norm(z)^2)` and `N exp(b norm(z)^2)`, the actual +differential series converges absolutely and locally uniformly if `4*a*b<1`. +Both Gaussian coefficients are positive here; minimal-type boundary cases +can be supplied by arbitrarily small positive bounds. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- The sharp Gaussian condition supplies a summable scalar bound for the +differential terms on each spatial disk. -/ +theorem exists_summable_differential_bound_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) (R : ℝ) : + ∃ B : ℕ → ℝ, Summable B ∧ ∀ n z, ‖z‖ ≤ R → + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ ≤ B n := by + obtain ⟨E, hE, B, hB0, hs, hB⟩ := exists_gaussian_differential_majorant + hf hMφ hMf ha hb hab hfbound + refine ⟨fun n ↦ B n * Real.exp (E * R ^ 2), + hs.mul_right _, fun n z hz ↦ (hB φ hφ hφbound n z).trans ?_⟩ + apply mul_le_mul_of_nonneg_left _ (hB0 n) + apply Real.exp_le_exp.mpr + gcongr + +/-- Under the strict Gaussian threshold, the actual differential series is +absolutely convergent at every complex point. -/ +theorem summable_norm_infiniteDifferentialApply_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) (z : ℂ) : + Summable (fun n : ℕ => + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖) := by + obtain ⟨B, hs, hB⟩ := exists_summable_differential_bound_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound ‖z‖ + exact Summable.of_nonneg_of_le (fun _ => norm_nonneg _) + (fun n => hB n z le_rfl) hs + +/-- Under the strict Gaussian threshold, the differential partial sums +converge uniformly on every disk. -/ +theorem tendstoUniformlyOn_infiniteDifferentialApply_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) (R : ℝ) : + TendstoUniformlyOn (fun N z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)) + (infiniteDifferentialApply φ f) atTop {z | ‖z‖ ≤ R} := by + obtain ⟨B, hs, hB⟩ := exists_summable_differential_bound_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound R + exact tendstoUniformlyOn_tsum_nat hs hB + +/-- The sharp Gaussian condition gives locally uniform convergence of the +actual differential series on the entire complex plane. -/ +theorem tendstoLocallyUniformly_infiniteDifferentialApply_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + TendstoLocallyUniformly (fun N z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)) + (infiniteDifferentialApply φ f) atTop := by + rw [tendstoLocallyUniformly_iff_forall_isCompact] + intro K hK + obtain ⟨R, _, hR⟩ := hK.isBounded.exists_pos_norm_le + exact (tendstoUniformlyOn_infiniteDifferentialApply_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound R).mono hR + +/-- The actual differential image is entire under the strict Gaussian +threshold, without any reality hypothesis on the inputs. -/ +theorem differentiable_infiniteDifferentialApply_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + Differentiable ℂ (infiniteDifferentialApply φ f) := by + apply differentiableOn_univ.mp + apply (tendstoLocallyUniformlyOn_univ.mpr + (tendstoLocallyUniformly_infiniteDifferentialApply_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound)).differentiableOn + (Eventually.of_forall fun N => + (differentiable_partial_infiniteDifferentialApply hf N).differentiableOn) isOpen_univ + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianDerivative.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianDerivative.lean new file mode 100644 index 000000000..eb6652cc5 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianDerivative.lean @@ -0,0 +1,84 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.Liouville + +/-! +# Gaussian bounds at arbitrary Cauchy centers + +Changing the center increases the quadratic coefficient by an arbitrarily +small positive amount. The Cauchy radius uses `n+1` and is never zero. +-/ + +public section + +namespace Real + +/-- Young's inequality with the coefficient arranged for recentering a +Gaussian norm bound. -/ +theorem mul_add_sq_le_of_lt {b d r t : ℝ} (hbd : b < d) : + b * (r + t) ^ 2 ≤ d * r ^ 2 + (b + b ^ 2 / (d - b)) * t ^ 2 := by + have hdelta : 0 < d - b := sub_pos.mpr hbd + have hsq := sq_nonneg ((d - b) * r - b * t) + have heq : (d - b) * + (d * r ^ 2 + (b + b ^ 2 / (d - b)) * t ^ 2 - b * (r + t) ^ 2) = + ((d - b) * r - b * t) ^ 2 := by + field_simp [hdelta.ne'] + ring + have hnonneg : 0 ≤ d * r ^ 2 + (b + b ^ 2 / (d - b)) * t ^ 2 - + b * (r + t) ^ 2 := by + exact (mul_nonneg_iff_of_pos_left hdelta).mp (heq.symm ▸ hsq) + linarith + +end Real + +namespace Complex + +/-- Recenter a global Gaussian norm bound, retaining any strictly larger +quadratic coefficient. The spatial constant is explicit. -/ +theorem norm_le_gaussian_center {f : ℂ → ℂ} {M b d : ℝ} + (hM : 0 ≤ M) (hb : 0 ≤ b) (hbd : b < d) + (hbound : ∀ w, ‖f w‖ ≤ M * Real.exp (b * ‖w‖ ^ 2)) (z w : ℂ) : + ‖f w‖ ≤ (M * Real.exp ((b + b ^ 2 / (d - b)) * ‖z‖ ^ 2)) * + Real.exp (d * ‖w - z‖ ^ 2) := by + have htri : ‖w‖ ≤ ‖w - z‖ + ‖z‖ := by + simpa only [sub_add_cancel] using norm_add_le (w - z) z + have hsq : b * ‖w‖ ^ 2 ≤ + d * ‖w - z‖ ^ 2 + (b + b ^ 2 / (d - b)) * ‖z‖ ^ 2 := by + calc + _ ≤ b * (‖w - z‖ + ‖z‖) ^ 2 := by gcongr + _ ≤ _ := Real.mul_add_sq_le_of_lt hbd + calc + _ ≤ M * Real.exp (b * ‖w‖ ^ 2) := hbound w + _ ≤ M * Real.exp + (d * ‖w - z‖ ^ 2 + (b + b ^ 2 / (d - b)) * ‖z‖ ^ 2) := + mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hsq) hM + _ = _ := by rw [Real.exp_add]; ring + +/-- An optimized positive Cauchy radius bounds all derivatives under a +Gaussian norm bound around the differentiation point. -/ +theorem norm_iteratedDeriv_le_of_gaussian_center {f : ℂ → ℂ} + (hf : Differentiable ℂ f) {M a : ℝ} (ha : 0 < a) (z : ℂ) + (hbound : ∀ w, ‖f w‖ ≤ M * Real.exp (a * ‖w - z‖ ^ 2)) (n : ℕ) : + ‖iteratedDeriv n f z‖ ≤ + n.factorial * (M * Real.exp (((n : ℝ) + 1) / 2)) / + (Real.sqrt (((n : ℝ) + 1) / (2 * a))) ^ n := by + let r : ℝ := Real.sqrt (((n : ℝ) + 1) / (2 * a)) + have hr : 0 < r := Real.sqrt_pos.mpr (by positivity) + have hr2 : a * r ^ 2 = ((n : ℝ) + 1) / 2 := by + dsimp only [r] + rw [Real.sq_sqrt (by positivity)] + field_simp [ha.ne'] + apply norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le n hr hf.diffContOnCl + intro w hw + have hw' : ‖w - z‖ = r := mem_sphere_iff_norm.mp hw + simpa only [hw', hr2] using hbound w + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianImageGrowth.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianImageGrowth.lean new file mode 100644 index 000000000..d7e1a9663 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianImageGrowth.lean @@ -0,0 +1,61 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianUniformBound +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.OfBound + +/-! +# Gaussian growth of the actual infinite differential image +-/ + +public section + +namespace Complex + +/-- Under the strict Gaussian threshold, the actual differential image has +a global Gaussian bound. Its Gaussian coefficient need not equal that of the input. -/ +theorem exists_norm_infiniteDifferentialApply_le_exp_sq {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + ∃ M > 0, ∃ E > 0, ∀ z, + ‖infiniteDifferentialApply φ f z‖ ≤ M * Real.exp (E * ‖z‖ ^ 2) := by + obtain ⟨E, hE, B, _, hs, hB⟩ := exists_gaussian_differential_majorant + hf hMφ hMf ha hb hab hfbound + refine ⟨max 1 (∑' n, B n), lt_of_lt_of_le zero_lt_one (le_max_left _ _), E, hE, ?_⟩ + intro z + have hsum := hs.mul_right (Real.exp (E * ‖z‖ ^ 2)) + have hnorm : Summable (fun n : ℕ ↦ + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖) := + Summable.of_nonneg_of_le (fun _ ↦ norm_nonneg _) (hB φ hφ hφbound · z) hsum + calc + _ ≤ ∑' n : ℕ, ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / + (n.factorial : ℂ)‖ := norm_tsum_le_tsum_norm hnorm + _ ≤ ∑' n, B n * Real.exp (E * ‖z‖ ^ 2) := + hnorm.tsum_le_tsum (hB φ hφ hφbound · z) hsum + _ = (∑' n, B n) * Real.exp (E * ‖z‖ ^ 2) := tsum_mul_right + _ ≤ _ := mul_le_mul_of_nonneg_right (le_max_right _ _) (Real.exp_pos _).le + +/-- The strict Gaussian threshold gives order at most two for the actual +differential image, including zero output. -/ +theorem orderLE_infiniteDifferentialApply_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + TauCeti.OrderLE (infiniteDifferentialApply φ f) 2 := by + obtain ⟨M, _, E, _, hbound⟩ := exists_norm_infiniteDifferentialApply_le_exp_sq + hφ hf hMφ hMf ha hb hab hφbound hfbound + apply TauCeti.orderLE_of_norm_le_mul_exp_rpow (B := M) (C := E) + intro z + simpa only [Real.rpow_two] using hbound z + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianJets.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianJets.lean new file mode 100644 index 000000000..0f831a4fe --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianJets.lean @@ -0,0 +1,58 @@ +/- +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 +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Analysis.Complex.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianDerivative +import Mathlib.Analysis.Complex.Liouville + +/-! +# Gaussian bounds for all spatial derivatives +-/ + +public section + +namespace Complex + +/-- Every derivative retains any strictly larger Gaussian coefficient. +A fixed positive Cauchy radius gives an explicit derivative-dependent constant. -/ +theorem norm_iteratedDeriv_le_exp_sq {f : ℂ → ℂ} (hf : Differentiable ℂ f) + {M b d : ℝ} (hM : 0 ≤ M) (hb : 0 ≤ b) (hbd : b < d) + (hbound : ∀ w, ‖f w‖ ≤ M * Real.exp (b * ‖w‖ ^ 2)) (n : ℕ) (z : ℂ) : + ‖iteratedDeriv n f z‖ ≤ + (n.factorial * M * Real.exp (b + b ^ 2 / (d - b))) * + Real.exp (d * ‖z‖ ^ 2) := by + let E : ℝ := b + b ^ 2 / (d - b) + have hcircle : ∀ w ∈ Metric.sphere z 1, + ‖f w‖ ≤ M * Real.exp E * Real.exp (d * ‖z‖ ^ 2) := by + intro w hw + have hwz : ‖w - z‖ = 1 := mem_sphere_iff_norm.mp hw + have htri : ‖w‖ ≤ ‖z‖ + 1 := by + calc + _ ≤ ‖w - z‖ + ‖z‖ := by + simpa only [sub_add_cancel] using norm_add_le (w - z) z + _ = _ := by rw [hwz, add_comm] + have he : b * ‖w‖ ^ 2 ≤ d * ‖z‖ ^ 2 + E := by + calc + _ ≤ b * (‖z‖ + 1) ^ 2 := by gcongr + _ ≤ _ := by + simpa only [one_pow, mul_one] using + (Real.mul_add_sq_le_of_lt (r := ‖z‖) (t := 1) hbd) + calc + _ ≤ M * Real.exp (b * ‖w‖ ^ 2) := hbound w + _ ≤ M * Real.exp (d * ‖z‖ ^ 2 + E) := + mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr he) hM + _ = _ := by rw [Real.exp_add]; ring + have h := norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le n + (show (0 : ℝ) < 1 from zero_lt_one) hf.diffContOnCl hcircle + calc + _ ≤ n.factorial * (M * Real.exp E * Real.exp (d * ‖z‖ ^ 2)) := by + simpa only [one_pow, div_one] using h + _ = _ := by dsimp only [E]; ring + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianMargin.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianMargin.lean new file mode 100644 index 000000000..97a2cebc5 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianMargin.lean @@ -0,0 +1,35 @@ +/- +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.Basic.Real.Basic +import Mathlib.Topology.Algebra.Ring.Real + +/-! +# Positive Gaussian bounds within the strict product threshold +-/ + +public section + +namespace Real + +/-- The strict product condition survives a small simultaneous increase, +including when one or both original coefficients vanish. -/ +theorem exists_pos_gaussian_coefficients {α β : ℝ} + (hα : 0 ≤ α) (hβ : 0 ≤ β) (hab : 4 * α * β < 1) : + ∃ a b : ℝ, α < a ∧ β < b ∧ 0 < a ∧ 0 < b ∧ 4 * a * b < 1 := by + have hopen : IsOpen {t : ℝ | 4 * (α + t) * (β + t) < 1} := + isOpen_lt (by fun_prop) continuous_const + have hzero : (0 : ℝ) ∈ {t : ℝ | 4 * (α + t) * (β + t) < 1} := by + simpa only [Set.mem_ofPred_eq, add_zero] using hab + obtain ⟨r, hr, hball⟩ := Metric.mem_nhds_iff.mp (hopen.mem_nhds hzero) + have hh : r / 2 ∈ Metric.ball (0 : ℝ) r := by + rw [Metric.mem_ball, Real.dist_eq, sub_zero, abs_of_pos (half_pos hr)] + linarith + exact ⟨α + r / 2, β + r / 2, by linarith, by linarith, + by linarith, by linarith, hball hh⟩ + +end Real diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianPolynomialBound.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianPolynomialBound.lean new file mode 100644 index 000000000..289cefd6e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianPolynomialBound.lean @@ -0,0 +1,45 @@ +/- +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.Algebra.Polynomial.Eval.Defs +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Subquadratic +import Mathlib.Topology.Algebra.Polynomial + +/-! +# Polynomial factors retain arbitrarily close Gaussian bounds +-/ + +public section + +open Polynomial + +namespace Complex + +/-- Multiplying by a polynomial retains any strictly larger quadratic +coefficient. Neither analyticity nor nonvanishing of the input is needed. -/ +theorem exists_norm_polynomial_mul_le_exp_sq (P : ℂ[X]) {φ : ℂ → ℂ} + {M a d : ℝ} (hM : 0 ≤ M) (had : a < d) + (hbound : ∀ z, ‖φ z‖ ≤ M * Real.exp (a * ‖z‖ ^ 2)) : + ∃ C > 0, ∀ z, + ‖P.eval z * φ z‖ ≤ C * Real.exp (d * ‖z‖ ^ 2) := by + obtain ⟨A, hA, hAbound⟩ := P.orderLE_eval.exists_norm_le_mul_exp_sq + P.continuous (by norm_num) (sub_pos.mpr had) + refine ⟨A * (M + 1), by positivity, fun z ↦ ?_⟩ + calc + _ = ‖P.eval z‖ * ‖φ z‖ := norm_mul _ _ + _ ≤ (A * Real.exp ((d - a) * ‖z‖ ^ 2)) * (M * Real.exp (a * ‖z‖ ^ 2)) := by + gcongr + · exact hAbound z + · exact hbound z + _ = A * M * Real.exp (d * ‖z‖ ^ 2) := by + rw [show d * ‖z‖ ^ 2 = (d - a) * ‖z‖ ^ 2 + a * ‖z‖ ^ 2 by ring, + Real.exp_add] + ring + _ ≤ _ := by gcongr; exact le_add_of_nonneg_right zero_le_one + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianPolynomialComposition.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianPolynomialComposition.lean new file mode 100644 index 000000000..fb101d26e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianPolynomialComposition.lean @@ -0,0 +1,96 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import Mathlib.Analysis.Calculus.Deriv.Polynomial +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianPolynomialBound +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSymbolAlgebra +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolAlgebra +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra + +/-! +# Finite polynomial factors of Gaussian differential symbols + +The strict Gaussian margin absorbs every fixed polynomial factor. The +result concerns the actual convergent differential sums, including zero output. +-/ + +public section + +open Polynomial + +namespace Complex + +/-- The strict product bound permits a larger symbol coefficient. -/ +private theorem exists_left_gaussian_margin {a b : ℝ} (hb : 0 < b) + (hab : 4 * a * b < 1) : ∃ d, a < d ∧ 4 * d * b < 1 := by + have haU : a < 1 / (4 * b) := + (lt_div_iff₀ (by positivity)).mpr (by nlinarith) + obtain ⟨d, had, hdU⟩ := exists_between haU + refine ⟨d, had, ?_⟩ + have h := (lt_div_iff₀ (by positivity : 0 < 4 * b)).mp hdU + nlinarith + +/-- A monomial factor differentiates the actual image in the sharp +Gaussian convergence range. -/ +theorem infiniteDifferentialApply_pow_mul_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) (n : ℕ) : + infiniteDifferentialApply (fun z ↦ z ^ n * φ z) f = + iteratedDeriv n (infiniteDifferentialApply φ f) := by + induction n with + | zero => simp only [pow_zero, one_mul, iteratedDeriv_zero] + | succ n ih => + obtain ⟨d, had, hdb⟩ := exists_left_gaussian_margin hb hab + obtain ⟨M, hM, hbound⟩ := exists_norm_polynomial_mul_le_exp_sq + (X ^ n) hMφ had hφbound + simp only [eval_pow, eval_X] at hbound + have heq : (fun z : ℂ ↦ z ^ (n + 1) * φ z) = + (fun z ↦ z * (z ^ n * φ z)) := by + ext z + rw [pow_succ] + ring + rw [heq, infiniteDifferentialApply_id_mul_eq_deriv_of_gaussian + (by fun_prop) hf hM.le hMf (ha.trans had) hb hdb hbound hfbound, + ih, iteratedDeriv_succ] + +/-- Multiplying an entire symbol by a polynomial composes its Gaussian +differential image with the corresponding finite differential operator. -/ +theorem infiniteDifferentialApply_polynomial_mul_of_gaussian (P : ℂ[X]) + {φ f : ℂ → ℂ} (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + infiniteDifferentialApply (fun z ↦ P.eval z * φ z) f = + P.differentialApply (infiniteDifferentialApply φ f) := by + induction P using Polynomial.induction_on' with + | add P Q hP hQ => + obtain ⟨d, had, hdb⟩ := exists_left_gaussian_margin hb hab + obtain ⟨MP, hMP, hPbound⟩ := exists_norm_polynomial_mul_le_exp_sq P hMφ had hφbound + obtain ⟨MQ, hMQ, hQbound⟩ := exists_norm_polynomial_mul_le_exp_sq Q hMφ had hφbound + have heq : (fun z ↦ (P + Q).eval z * φ z) = + (fun z ↦ P.eval z * φ z + Q.eval z * φ z) := by + ext z + simp only [eval_add, add_mul] + rw [heq, infiniteDifferentialApply_add_symbol_of_gaussian + (by fun_prop) (by fun_prop) hf hMP.le hMQ.le hMf (ha.trans had) hb hdb + hPbound hQbound hfbound, hP, hQ, differentialApply_add] + | monomial n c => + have heq : (fun z ↦ (monomial n c).eval z * φ z) = + (fun z ↦ c * (z ^ n * φ z)) := by + ext z + simp only [eval_monomial, mul_assoc] + rw [heq, infiniteDifferentialApply_const_mul_symbol, + infiniteDifferentialApply_pow_mul_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound, differentialApply_monomial] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSpatialDerivative.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSpatialDerivative.lean new file mode 100644 index 000000000..9b2682115 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSpatialDerivative.lean @@ -0,0 +1,57 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianConvergence +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianJets +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Spatial derivatives commute with Gaussian differential operators +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Under the strict Gaussian threshold, every spatial derivative commutes +with the actual infinite differential action. -/ +theorem iteratedDeriv_infiniteDifferentialApply_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) (k : ℕ) : + iteratedDeriv k (infiniteDifferentialApply φ f) = + infiniteDifferentialApply φ (iteratedDeriv k f) := by + have hbU : b < 1 / (4 * a) := + (lt_div_iff₀ (by positivity)).mpr (by nlinarith) + obtain ⟨d, hbd, hdU⟩ := exists_between hbU + have hd : 0 < d := hb.trans hbd + have had : 4 * a * d < 1 := by + have h := (lt_div_iff₀ (by positivity : 0 < 4 * a)).mp hdU + nlinarith + let N : ℝ := k.factorial * Mf * Real.exp (b + b ^ 2 / (d - b)) + have hN : 0 ≤ N := by dsimp only [N]; positivity + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv k + (WithTop.coe_lt_top _) + have hleft := (tendstoLocallyUniformly_infiniteDifferentialApply_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound).iteratedDeriv + (differentiable_partial_infiniteDifferentialApply hf) k + simp only [iteratedDeriv_partial_infiniteDifferentialApply hf] at hleft + have hright := tendstoLocallyUniformly_infiniteDifferentialApply_of_gaussian + hφ hdf hMφ hN ha hd had hφbound + (norm_iteratedDeriv_le_exp_sq hf hMf hb.le hbd hfbound k) + ext z + exact tendsto_nhds_unique + ((tendstoLocallyUniformlyOn_univ.mpr hleft).tendsto_at (Set.mem_univ z)) + ((tendstoLocallyUniformlyOn_univ.mpr hright).tendsto_at (Set.mem_univ z)) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSymbolAlgebra.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSymbolAlgebra.lean new file mode 100644 index 000000000..2de6d3c32 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSymbolAlgebra.lean @@ -0,0 +1,79 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolSummable +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianConvergence +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSpatialDerivative +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianJets + +/-! +# Algebra of Gaussian infinite differential symbols +-/ + +public section + +namespace Complex + +/-- Gaussian-convergent differential images are linear in the symbol. -/ +theorem infiniteDifferentialApply_add_symbol_of_gaussian {φ ψ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hψ : Differentiable ℂ ψ) (hf : Differentiable ℂ f) + {Mφ Mψ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMψ : 0 ≤ Mψ) (hMf : 0 ≤ Mf) + (ha : 0 < a) (hb : 0 < b) (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hψbound : ∀ w, ‖ψ w‖ ≤ Mψ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + infiniteDifferentialApply (fun z ↦ φ z + ψ z) f = + infiniteDifferentialApply φ f + infiniteDifferentialApply ψ f := by + exact infiniteDifferentialApply_add_symbol_of_summable hφ hψ + (fun z ↦ (summable_norm_infiniteDifferentialApply_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound z).of_norm) + (fun z ↦ (summable_norm_infiniteDifferentialApply_of_gaussian + hψ hf hMψ hMf ha hb hab hψbound hfbound z).of_norm) + +/-- A variable factor differentiates the target in the Gaussian range. -/ +theorem infiniteDifferentialApply_id_mul_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + infiniteDifferentialApply (fun z ↦ z * φ z) f = + infiniteDifferentialApply φ (deriv f) := by + have hbU : b < 1 / (4 * a) := + (lt_div_iff₀ (by positivity)).mpr (by nlinarith) + obtain ⟨d, hbd, hdU⟩ := exists_between hbU + have hd : 0 < d := hb.trans hbd + have had : 4 * a * d < 1 := by + have h := (lt_div_iff₀ (by positivity : 0 < 4 * a)).mp hdU + nlinarith + let N : ℝ := Mf * Real.exp (b + b ^ 2 / (d - b)) + have hN : 0 ≤ N := by dsimp only [N]; positivity + have hdfbound (w : ℂ) : ‖deriv f w‖ ≤ N * Real.exp (d * ‖w‖ ^ 2) := by + simpa only [iteratedDeriv_one, Nat.factorial_one, Nat.cast_one, one_mul] using + norm_iteratedDeriv_le_exp_sq hf hMf hb.le hbd hfbound 1 w + apply infiniteDifferentialApply_id_mul_of_summable hφ + intro z + exact (summable_norm_infiniteDifferentialApply_of_gaussian + hφ hf.deriv hMφ hN ha hd had hφbound hdfbound z).of_norm + +/-- A variable factor differentiates the actual Gaussian differential image. -/ +theorem infiniteDifferentialApply_id_mul_eq_deriv_of_gaussian {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + infiniteDifferentialApply (fun z ↦ z * φ z) f = + deriv (infiniteDifferentialApply φ f) := by + rw [infiniteDifferentialApply_id_mul_of_gaussian hφ hf hMφ hMf ha hb hab + hφbound hfbound] + simpa only [iteratedDeriv_one] using + (iteratedDeriv_infiniteDifferentialApply_of_gaussian + hφ hf hMφ hMf ha hb hab hφbound hfbound 1).symm + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSymbolLimit.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSymbolLimit.lean new file mode 100644 index 000000000..f2d75512c --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSymbolLimit.lean @@ -0,0 +1,51 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianUniformBound +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import Mathlib.Analysis.Normed.Group.Tannery + +/-! +# Continuity of Gaussian differential operators in the symbol + +A common Gaussian envelope is essential. Locally uniform convergence of +symbols alone does not justify passing a limit through an infinite operator. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Locally uniform symbol convergence with a common Gaussian envelope +passes through the actual infinite differential action at every point. -/ +theorem tendsto_infiniteDifferentialApply_of_gaussian {Φ : ℕ → ℂ → ℂ} {φ f : ℂ → ℂ} + (hΦ : ∀ i, Differentiable ℂ (Φ i)) + (hlim : TendstoLocallyUniformly Φ φ atTop) (hf : Differentiable ℂ f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hΦbound : ∀ i w, ‖Φ i w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) (z : ℂ) : + Tendsto (fun i ↦ infiniteDifferentialApply (Φ i) f z) atTop + (𝓝 (infiniteDifferentialApply φ f z)) := by + obtain ⟨E, _, B, _, hs, hB⟩ := exists_gaussian_differential_majorant + hf hMφ hMf ha hb hab hfbound + have hd (n : ℕ) : Tendsto (fun i ↦ iteratedDeriv n (Φ i) 0) atTop + (𝓝 (iteratedDeriv n φ 0)) := + (tendstoLocallyUniformlyOn_univ.mpr (hlim.iteratedDeriv hΦ n)).tendsto_at + (Set.mem_univ 0) + have hterm (n : ℕ) : Tendsto + (fun i ↦ iteratedDeriv n (Φ i) 0 * iteratedDeriv n f z / (n.factorial : ℂ)) atTop + (𝓝 (iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ))) := + ((hd n).mul_const _).div_const _ + exact tendsto_tsum_of_dominated_convergence + (hs.mul_right (Real.exp (E * ‖z‖ ^ 2))) hterm + (Eventually.of_forall fun i n ↦ hB (Φ i) (hΦ i) (hΦbound i) n z) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianUniformBound.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianUniformBound.lean new file mode 100644 index 000000000..1d6a44f54 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianUniformBound.lean @@ -0,0 +1,71 @@ +/- +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.Complex.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianBound +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianDerivative + +/-! +# A common Gaussian majorant for families of differential symbols + +The spatial Gaussian factor is separated from a summable sequence. The same +majorant works for every entire symbol satisfying the fixed norm bound. +-/ + +public section + +namespace Complex + +/-- The strict Gaussian threshold gives a common summable differential +majorant for all symbols satisfying the same global Gaussian bound. -/ +theorem exists_gaussian_differential_majorant {f : ℂ → ℂ} + (hf : Differentiable ℂ f) {Mφ Mf a b : ℝ} + (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + ∃ E > 0, ∃ B : ℕ → ℝ, (∀ n, 0 ≤ B n) ∧ Summable B ∧ + ∀ φ : ℂ → ℂ, Differentiable ℂ φ → + (∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) → ∀ n z, + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ ≤ + B n * Real.exp (E * ‖z‖ ^ 2) := by + have hbU : b < 1 / (4 * a) := + (lt_div_iff₀ (by positivity)).mpr (by nlinarith) + obtain ⟨d, hbd, hdU⟩ := exists_between hbU + have hd : 0 < d := hb.trans hbd + have had : 4 * a * d < 1 := by + have h := (lt_div_iff₀ (by positivity : 0 < 4 * a)).mp hdU + nlinarith + let E : ℝ := b + b ^ 2 / (d - b) + let q : ℝ := 2 * Real.sqrt (a * d) + let C : ℝ := 2 * Real.exp 2 * Mφ * Mf + have hE : 0 < E := by dsimp only [E]; positivity + have hC : 0 ≤ C := by dsimp only [C]; positivity + have hq0 : 0 ≤ q := by dsimp only [q]; positivity + have hq : q < 1 := by + have hs := Real.sq_sqrt (mul_nonneg ha.le hd.le) + dsimp only [q] + nlinarith [Real.sqrt_nonneg (a * d)] + have hqnorm : ‖q‖ < 1 := by simpa only [Real.norm_eq_abs, abs_of_nonneg hq0] using hq + have hg : Summable (fun n : ℕ ↦ q ^ n) := summable_geometric_of_lt_one hq0 hq + have hng : Summable (fun n : ℕ ↦ (n : ℝ) * q ^ n) := by + simpa only [pow_one] using summable_pow_mul_geometric_of_norm_lt_one 1 hqnorm + have hsum : Summable (fun n : ℕ ↦ ((n : ℝ) + 1) * q ^ n) := by + simpa only [add_mul, one_mul] using hng.add hg + refine ⟨E, hE, fun n ↦ C * (((n : ℝ) + 1) * q ^ n), + fun n ↦ by positivity, hsum.mul_left C, ?_⟩ + intro φ hφ hφbound n z + have hcenter := norm_le_gaussian_center hMf hb.le hbd hfbound z + have hterm := norm_differential_term_le_of_gaussian_center hφ hf hMφ + (mul_nonneg hMf (Real.exp_pos _).le) ha hd hφbound z hcenter n + calc + _ ≤ (2 * Real.exp 2 * Mφ * (Mf * Real.exp (E * ‖z‖ ^ 2))) * + ((n : ℝ) + 1) * q ^ n := hterm + _ = _ := by dsimp only [C]; ring + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GenusZeroComposition.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GenusZeroComposition.lean new file mode 100644 index 000000000..2585e4142 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GenusZeroComposition.lean @@ -0,0 +1,47 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianApproxComposition +import RealRooted.Mathlib.Analysis.Complex.LinearPrefixGaussian +import RealRooted.Mathlib.Analysis.Complex.LinearProduct + +/-! +# Summable linear factors compose with Gaussian differential symbols +-/ + +public section + +open Complex Filter Polynomial Topology + +namespace Complex + +/-- A summable real genus-zero factor composes with a Gaussian-convergent +symbol. This is an identity of the actual infinite differential images. -/ +theorem infiniteDifferentialApply_linearProduct_mul {a : ℕ → ℝ} (ha : Summable a) + {φ f : ℂ → ℂ} (hφ : Differentiable ℂ φ) (hf : Differentiable ℂ f) + {Mφ Mf A B : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (hA : 0 < A) (hB : 0 < B) + (hAB : 4 * A * B < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (A * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (B * ‖w‖ ^ 2)) : + infiniteDifferentialApply (fun z ↦ (∏' j, (1 + (a j : ℂ) * z)) * φ z) f = + infiniteDifferentialApply (fun z ↦ ∏' j, (1 + (a j : ℂ) * z)) + (infiniteDifferentialApply φ f) := by + let P : ℕ → ℂ[X] := fun n ↦ ∏ j ∈ Finset.range n, (1 + C (a j : ℂ) * X) + have heval (n : ℕ) (z : ℂ) : + (P n).eval z = ∏ j ∈ Finset.range n, (1 + (a j : ℂ) * z) := by + simp only [P, eval_prod, eval_add, eval_one, eval_mul, eval_C, eval_X] + have hP : TendstoLocallyUniformly (fun n z ↦ (P n).eval z) + (fun z ↦ ∏' j, (1 + (a j : ℂ) * z)) atTop := by + simpa only [heval] using tendstoLocallyUniformly_prod_one_add a ha + apply infiniteDifferentialApply_mul_of_polynomial_approx hP _ hφ hf hMφ hMf hA hB hAB + hφbound hfbound + intro ε hε + obtain ⟨C, hC, hbound⟩ := exists_norm_prod_one_add_le_exp_sq ha hε + exact ⟨C, hC, fun n z ↦ by simpa only [heval] using hbound n z⟩ + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GenusZeroTail.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GenusZeroTail.lean new file mode 100644 index 000000000..4b47f9c81 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GenusZeroTail.lean @@ -0,0 +1,66 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SmallTypeLimit +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import TauCeti.Analysis.Normed.Ring.InfiniteProd + +/-! +# Genus-zero canonical tails act like the identity + +Summable real slopes may have either sign, may repeat, and may vanish. +The tail index is `k+n`, so the `n`th tail removes exactly the first `n` factors. +The target is any entire function of finite order. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Canonical genus-zero tail operators converge locally uniformly to the +identity on every finite-order entire target. Finite and empty products are +included by allowing zero slopes. This extends the scope of Cardon--de Gaston +(2005), Lemma 9, from LP targets to arbitrary finite-order entire targets. -/ +theorem tendstoLocallyUniformly_infiniteDifferentialApply_linear_tail + {a : ℕ → ℝ} (ha : Summable a) {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f ρ) : + TendstoLocallyUniformly + (fun n => infiniteDifferentialApply + (fun z => ∏' k : ℕ, (1 + (a (k + n) : ℂ) * z)) f) f atTop := by + let B : ℕ → ℝ := fun n => (∑' k : ℕ, ‖a (k + n)‖) + ((n : ℝ) + 1)⁻¹ + have hB (n : ℕ) : 0 < B n := by + exact add_pos_of_nonneg_of_pos (tsum_nonneg fun _ => norm_nonneg _) (by positivity) + have hlim : Tendsto B atTop (𝓝 0) := by + have hinv : Tendsto (fun n : ℕ => ((n : ℝ) + 1)⁻¹) atTop (𝓝 0) := + tendsto_inv_atTop_zero.comp + (tendsto_atTop_add_const_right atTop 1 (tendsto_natCast_atTop_atTop (R := ℝ))) + simpa only [B, add_zero] using (tendsto_sum_nat_add (fun k => ‖a k‖)).add hinv + apply tendstoLocallyUniformly_infiniteDifferentialApply_of_type_tendsto_zero + (B := B) _ _ hB hlim _ hf hof + · intro n + exact differentiable_tprod_one_add_ofReal_mul ((summable_nat_add_iff n).mpr ha) + · intro n + simp + · intro n z + have hs : Summable (fun k : ℕ => ‖(a (k + n) : ℂ) * z‖) := by + simpa only [norm_mul, norm_real] using + (((summable_nat_add_iff n).mpr ha).norm.mul_right ‖z‖) + calc + _ ≤ Real.exp (∑' k : ℕ, ‖(a (k + n) : ℂ) * z‖) := + TauCeti.norm_tprod_one_add_le_exp_tsum hs + _ = Real.exp ((∑' k : ℕ, ‖a (k + n)‖) * ‖z‖) := by + simp only [norm_mul, norm_real, tsum_mul_right] + _ ≤ Real.exp (B n * ‖z‖) := by + apply Real.exp_le_exp.mpr + apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) + dsimp only [B] + exact le_add_of_nonneg_right (by positivity) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GrowthOrder.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GrowthOrder.lean new file mode 100644 index 000000000..d98970e70 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GrowthOrder.lean @@ -0,0 +1,87 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderBound +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderConvergence +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Constant +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.OfBound +import RealRooted.Mathlib.Analysis.SpecificLimits.PowerSequence + +/-! +# Growth bounds for entire differential images + +The reciprocal-order estimate keeps its exponential dependence on the spatial +point. Summing its scalar majorant therefore controls the growth of the entire +differential image. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- The differential image has a global exponential bound at any admissible +positive target growth exponent. -/ +theorem exists_norm_infiniteDifferentialApply_le_exp_rpow {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + ∃ C > 0, ∀ z, ‖infiniteDifferentialApply φ f z‖ ≤ C * Real.exp (‖z‖ ^ q) := by + obtain ⟨C, hC, hbound⟩ := exists_infiniteDifferentialApply_term_bound_of_order + hφ hoφ hp hρ hf hof hq hσ + let u : ℕ → ℝ := fun n => (Real.exp 2 / ((n : ℝ) + 1) ^ (p⁻¹ + q⁻¹ - 1)) ^ n + have hu : Summable u := Real.summable_const_div_rpow_pow (by linarith) _ + have hun : 0 ≤ ∑' n, u n := tsum_nonneg fun n => by dsimp [u]; positivity + refine ⟨C * ((∑' n, u n) + 1), by positivity, fun z => ?_⟩ + have hs := summable_norm_infiniteDifferentialApply_of_order + hφ hoφ hp hρ hf hof hq hσ hsum z + calc + _ ≤ ∑' n : ℕ, + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ := + norm_tsum_le_tsum_norm hs + _ ≤ ∑' n : ℕ, C * Real.exp (‖z‖ ^ q) * u n := + hs.tsum_le_tsum (fun n => hbound n z) (hu.mul_left _) + _ = C * Real.exp (‖z‖ ^ q) * (∑' n, u n) := tsum_mul_left + _ ≤ _ := by nlinarith [Real.exp_pos (‖z‖ ^ q)] + +end Complex + +namespace TauCeti + +/-- Under the reciprocal growth condition, an infinite differential operator +does not increase the target's growth order. Negative orders are included: +their entire functions are constant. -/ +theorem OrderLE.infiniteDifferentialApply {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hof : OrderLE f σ) (hf : Differentiable ℂ f) + (hφ : Differentiable ℂ φ) (hoφ : OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hσ : σ < q) (hsum : 1 < p⁻¹ + q⁻¹) : + OrderLE (Complex.infiniteDifferentialApply φ f) σ := by + by_cases hσ0 : 0 ≤ σ + · rw [orderLE_def] + intro r hr + let q' := (σ + min q r) / 2 + have hm : σ < min q r := lt_min hσ hr + have hq' : 0 < q' := by dsimp [q']; linarith + have hσ' : σ < q' := by dsimp [q']; linarith + have hq'q : q' < q := by dsimp [q']; linarith [min_le_left q r] + have hq'r : q' < r := by dsimp [q']; linarith [min_le_right q r] + have hi : q⁻¹ ≤ q'⁻¹ := by + simpa only [one_div] using one_div_le_one_div_of_le hq' hq'q.le + have hsum' : 1 < p⁻¹ + q'⁻¹ := hsum.trans_le (add_le_add le_rfl hi) + obtain ⟨C, _, hbound⟩ := Complex.exists_norm_infiniteDifferentialApply_le_exp_rpow + hφ hoφ hp hρ hf hof hq' hσ' hsum' + have ho : OrderLE (Complex.infiniteDifferentialApply φ f) q' := + orderLE_of_norm_le_mul_exp_rpow (C := 1) (by simpa only [one_mul] using hbound) + exact ho.isBigO hq'r + · have hconst := hof.isConst hf (lt_of_not_ge hσ0) + have heq : f = fun _ => f 0 := funext fun z => hconst z 0 + rw [heq, Complex.infiniteDifferentialApply_const] + exact orderLE_const _ σ + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderBound.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderBound.lean new file mode 100644 index 000000000..a9718a216 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderBound.lean @@ -0,0 +1,98 @@ +/- +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 TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.CauchyBound +import RealRooted.Mathlib.Analysis.SpecificLimits.PowerSequence + +/-! +# Reciprocal-order bounds for infinite differential series + +If positive exponents above the two growth orders have reciprocal sum greater +than one, the differential series admits a summable majorant on every spatial +disk. This includes asymmetric order pairs, beyond the case where both orders +are below two. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- The differential terms have a reciprocal-power majorant with explicit +exponential dependence on the spatial point. -/ +theorem exists_infiniteDifferentialApply_term_bound_of_order {φ f : ℂ → ℂ} + {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) : + ∃ C > 0, ∀ n : ℕ, ∀ z : ℂ, + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ ≤ + C * Real.exp (‖z‖ ^ q) * (Real.exp 2 / ((n : ℝ) + 1) ^ (p⁻¹ + q⁻¹ - 1)) ^ n := by + obtain ⟨A, hA, ha⟩ := exists_iteratedDeriv_global_bound_of_orderLE hφ hoφ hp hρ + obtain ⟨B, hB, hb⟩ := exists_iteratedDeriv_global_bound_of_orderLE hf hof hq hσ + refine ⟨A * B, mul_pos hA hB, fun n z => ?_⟩ + have ha' : ‖iteratedDeriv n φ 0‖ ≤ n.factorial * A * + (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹) ^ n := by + simpa only [norm_zero, Real.zero_rpow hp.ne', Real.exp_zero, mul_one] using ha n 0 + have hb' := hb n z + have hn : (n.factorial : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + have hfac : (n.factorial : ℝ) ≤ ((n : ℝ) + 1) ^ n := by + exact_mod_cast (Nat.factorial_le_pow n).trans + (Nat.pow_le_pow_left (Nat.le_succ n) n) + have hbase : ((n : ℝ) + 1) * + (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹ * + (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹)) = + Real.exp 2 / ((n : ℝ) + 1) ^ (p⁻¹ + q⁻¹ - 1) := by + rw [Real.rpow_sub (by positivity), Real.rpow_one, Real.rpow_add (by positivity), + show Real.exp 2 = Real.exp 1 * Real.exp 1 by rw [← Real.exp_add]; norm_num] + field_simp + simp only [norm_div, norm_mul, norm_natCast] + calc + _ ≤ ((n.factorial * A * (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹) ^ n) * + (n.factorial * B * Real.exp (‖z‖ ^ q) * + (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹) ^ n)) / n.factorial := + div_le_div_of_nonneg_right (mul_le_mul ha' hb' (by positivity) (by positivity)) + (by positivity) + _ = n.factorial * (A * B * Real.exp (‖z‖ ^ q)) * + (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹ * + (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹)) ^ n := by rw [mul_pow]; field_simp + _ ≤ ((n : ℝ) + 1) ^ n * (A * B * Real.exp (‖z‖ ^ q)) * + (Real.exp 1 / ((n : ℝ) + 1) ^ p⁻¹ * + (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹)) ^ n := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hfac (by positivity)) + (by positivity) + _ = _ := by rw [mul_right_comm, ← mul_pow, hbase, mul_comm] + +/-- Restricting the global majorant to a disk gives a fixed spatial constant. -/ +private theorem exists_differential_rpow_bound {φ f : ℂ → ℂ} {ρ σ p q R : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) : + ∃ C > 0, ∀ n : ℕ, ∀ z : ℂ, ‖z‖ ≤ R → + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ ≤ + C * (Real.exp 2 / ((n : ℝ) + 1) ^ (p⁻¹ + q⁻¹ - 1)) ^ n := by + obtain ⟨C, hC, hbound⟩ := exists_infiniteDifferentialApply_term_bound_of_order + hφ hoφ hp hρ hf hof hq hσ + refine ⟨C * Real.exp (R ^ q), by positivity, fun n z hz => (hbound n z).trans ?_⟩ + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr + (Real.rpow_le_rpow (norm_nonneg _) hz hq.le)) hC.le) (by positivity) + +/-- Positive powers dominating the input orders with reciprocal sum greater +than one give a summable bound for the differential terms on every disk. -/ +theorem exists_summable_infiniteDifferentialApply_bound {φ f : ℂ → ℂ} {ρ σ p q R : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + ∃ B : ℕ → ℝ, Summable B ∧ ∀ n : ℕ, ∀ z : ℂ, ‖z‖ ≤ R → + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ ≤ B n := by + obtain ⟨C, hC, hbound⟩ := exists_differential_rpow_bound hφ hoφ hp hρ hf hof hq hσ + refine ⟨fun n => C * (Real.exp 2 / ((n : ℝ) + 1) ^ (p⁻¹ + q⁻¹ - 1)) ^ n, ?_, hbound⟩ + exact (Real.summable_const_div_rpow_pow (by linarith : 0 < p⁻¹ + q⁻¹ - 1) + (Real.exp 2)).mul_left C + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderConvergence.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderConvergence.lean new file mode 100644 index 000000000..1fecd6b30 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderConvergence.lean @@ -0,0 +1,64 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderBound + +/-! +# Differential-series convergence under reciprocal growth bounds + +Positive upper growth exponents `p` and `q` with `1/p + 1/q > 1` suffice for +absolute and locally uniform convergence of the entire differential series. +Neither exponent is individually required to be below two. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- The reciprocal growth condition gives absolute convergence of the +infinite differential series. -/ +theorem summable_norm_infiniteDifferentialApply_of_order {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) (z : ℂ) : + Summable (fun n : ℕ => + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖) := by + obtain ⟨B, hB, hbound⟩ := exists_summable_infiniteDifferentialApply_bound + (R := ‖z‖) hφ hoφ hp hρ hf hof hq hσ hsum + exact Summable.of_nonneg_of_le (fun _ => norm_nonneg _) (fun n => hbound n z le_rfl) hB + +/-- The reciprocal growth condition gives uniform convergence on every disk. -/ +theorem tendstoUniformlyOn_infiniteDifferentialApply_of_order {φ f : ℂ → ℂ} {ρ σ p q R : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + TendstoUniformlyOn (fun N z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)) + (infiniteDifferentialApply φ f) atTop {z | ‖z‖ ≤ R} := by + obtain ⟨B, hB, hbound⟩ := exists_summable_infiniteDifferentialApply_bound + hφ hoφ hp hρ hf hof hq hσ hsum + exact tendstoUniformlyOn_tsum_nat hB hbound + +/-- The reciprocal growth condition gives locally uniform convergence in space. -/ +theorem tendstoLocallyUniformly_infiniteDifferentialApply_of_order {φ f : ℂ → ℂ} + {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + TendstoLocallyUniformly (fun N z => ∑ n ∈ Finset.range N, + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)) + (infiniteDifferentialApply φ f) atTop := by + rw [tendstoLocallyUniformly_iff_forall_isCompact] + intro K hK + obtain ⟨R, _, hbound⟩ := hK.isBounded.exists_pos_norm_le + exact (tendstoUniformlyOn_infiniteDifferentialApply_of_order (R := R) + hφ hoφ hp hρ hf hof hq hσ hsum).mono hbound + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderDerivative.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderDerivative.lean new file mode 100644 index 000000000..c5dcff51e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderDerivative.lean @@ -0,0 +1,60 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderConvergence +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Derivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import Mathlib.Analysis.Complex.LocallyUniformLimit + +/-! +# Entire differential images under reciprocal growth bounds + +The reciprocal-order condition gives entireness and commutation with all +spatial derivatives, using the same finite-sum identities as the subquadratic case. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- The reciprocal growth condition makes the differential image entire. -/ +theorem differentiable_infiniteDifferentialApply_of_order {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : Differentiable ℂ (infiniteDifferentialApply φ f) := by + apply differentiableOn_univ.mp + apply (tendstoLocallyUniformlyOn_univ.mpr + (tendstoLocallyUniformly_infiniteDifferentialApply_of_order + hφ hoφ hp hρ hf hof hq hσ hsum)).differentiableOn + (Eventually.of_forall fun N => + (differentiable_partial_infiniteDifferentialApply hf N).differentiableOn) isOpen_univ + +/-- Under the reciprocal growth condition every spatial derivative commutes +with the infinite differential operator. -/ +theorem iteratedDeriv_infiniteDifferentialApply_of_order {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) (k : ℕ) : + iteratedDeriv k (infiniteDifferentialApply φ f) = + infiniteDifferentialApply φ (iteratedDeriv k f) := by + have hleft := (tendstoLocallyUniformly_infiniteDifferentialApply_of_order + hφ hoφ hp hρ hf hof hq hσ hsum).iteratedDeriv + (differentiable_partial_infiniteDifferentialApply hf) k + simp only [iteratedDeriv_partial_infiniteDifferentialApply hf] at hleft + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv k (WithTop.coe_lt_top _) + have hright := tendstoLocallyUniformly_infiniteDifferentialApply_of_order hφ hoφ hp hρ hdf + (hof.iteratedDeriv hf k) hq hσ hsum + ext z + exact tendsto_nhds_unique + ((tendstoLocallyUniformlyOn_univ.mpr hleft).tendsto_at (Set.mem_univ z)) + ((tendstoLocallyUniformlyOn_univ.mpr hright).tendsto_at (Set.mem_univ z)) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialCommute.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialCommute.lean new file mode 100644 index 000000000..1589ece41 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialCommute.lean @@ -0,0 +1,73 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderDerivative +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderConvergence +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra + +/-! +# Finite differential operators commute with infinite differential operators + +Only a finite sum is moved past the convergent infinite series. In particular, +annihilation by a finite symbol is preserved by the infinite differential action. +-/ + +public section + +open Polynomial + +namespace Complex + +/-- A finite polynomial differential operator commutes with an infinite +operator under the reciprocal-order convergence criterion. -/ +theorem infiniteDifferentialApply_differentialApply (P : ℂ[X]) + {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + infiniteDifferentialApply φ (P.differentialApply f) = + P.differentialApply (infiniteDifferentialApply φ f) := by + ext z + have hs (k : ℕ) : HasSum + (fun n => P.coeff k * + (iteratedDeriv n φ 0 * iteratedDeriv n (iteratedDeriv k f) z / + (n.factorial : ℂ))) + (P.coeff k * infiniteDifferentialApply φ (iteratedDeriv k f) z) := by + have hdf := (hf.contDiff (n := ⊤)).differentiable_iteratedDeriv k + (WithTop.coe_lt_top _) + exact ((summable_norm_infiniteDifferentialApply_of_order + hφ hoφ hp hρ hdf (hof.iteratedDeriv hf k) hq hσ hsum z).of_norm.hasSum).mul_left _ + have hsum' := hasSum_sum (s := Finset.range (P.natDegree + 1)) (fun k _ => hs k) + have hterm (n : ℕ) : + (∑ k ∈ Finset.range (P.natDegree + 1), P.coeff k * + (iteratedDeriv n φ 0 * iteratedDeriv n (iteratedDeriv k f) z / + (n.factorial : ℂ))) = + iteratedDeriv n φ 0 * iteratedDeriv n (P.differentialApply f) z / + (n.factorial : ℂ) := by + rw [iteratedDeriv_differentialApply P hf] + simp only [differentialApply, smul_eq_mul, Finset.mul_sum, Finset.sum_div] + apply Finset.sum_congr rfl + intro k _ + simp only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm n] + ring + have himage : + (∑ k ∈ Finset.range (P.natDegree + 1), + P.coeff k * infiniteDifferentialApply φ (iteratedDeriv k f) z) = + P.differentialApply (infiniteDifferentialApply φ f) z := by + simp only [differentialApply, smul_eq_mul, + iteratedDeriv_infiniteDifferentialApply_of_order hφ hoφ hp hρ hf hof hq hσ hsum] + have hactual : HasSum + (fun n => iteratedDeriv n φ 0 * iteratedDeriv n (P.differentialApply f) z / + (n.factorial : ℂ)) + (P.differentialApply (infiniteDifferentialApply φ f) z) := by + simpa only [hterm, himage] using hsum' + exact hactual.tsum_eq + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialComposition.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialComposition.lean new file mode 100644 index 000000000..e0381acdc --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialComposition.lean @@ -0,0 +1,83 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolAlgebra +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra +import Mathlib.Analysis.Calculus.Deriv.Polynomial + +/-! +# Polynomial factors of infinite differential symbols + +A finite polynomial factor composes with a convergent infinite differential +operator. Polynomial multiplication does not change the reciprocal-order +condition, even when the original symbol has a negative order bound. +-/ + +public section + +open Polynomial + +namespace Complex + +/-- Multiplying a symbol by a fixed polynomial retains the same nonnegative +upper growth bound. -/ +private theorem orderLE_polynomial_mul {φ : ℂ → ℂ} {ρ : ℝ} + (hφ : TauCeti.OrderLE φ ρ) (P : ℂ[X]) : + TauCeti.OrderLE (fun z => P.eval z * φ z) (max ρ 0) := + (P.orderLE_eval.mono (le_max_right _ _)).mul (hφ.mono (le_max_left _ _)) + +/-- A monomial factor applies the corresponding iterated derivative to the output. -/ +theorem infiniteDifferentialApply_pow_mul {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) (n : ℕ) : + infiniteDifferentialApply (fun z => z ^ n * φ z) f = + iteratedDeriv n (infiniteDifferentialApply φ f) := by + induction n with + | zero => simp only [pow_zero, one_mul, iteratedDeriv_zero] + | succ n ih => + have ho : TauCeti.OrderLE (fun z => z ^ n * φ z) (max ρ 0) := by + simpa only [eval_pow, eval_X] using orderLE_polynomial_mul hoφ (X ^ n) + have heq : (fun z : ℂ => z ^ (n + 1) * φ z) = + (fun z => z * (z ^ n * φ z)) := by + ext z + rw [pow_succ] + ring + rw [heq, infiniteDifferentialApply_id_mul_eq_deriv (by fun_prop) ho hp + (max_lt hρ hp) hf hof hq hσ hsum, ih, iteratedDeriv_succ] + +/-- A polynomial factor of an entire infinite symbol acts by the finite +polynomial differential operator on the infinite image. Both zero symbols and +zero outputs are included. -/ +theorem infiniteDifferentialApply_polynomial_mul (P : ℂ[X]) + {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + infiniteDifferentialApply (fun z => P.eval z * φ z) f = + P.differentialApply (infiniteDifferentialApply φ f) := by + induction P using Polynomial.induction_on' with + | add P Q hP hQ => + have heq : (fun z => (P + Q).eval z * φ z) = + (fun z => P.eval z * φ z + Q.eval z * φ z) := by + ext z + simp only [eval_add, add_mul] + rw [heq, infiniteDifferentialApply_add_symbol (by fun_prop) + (orderLE_polynomial_mul hoφ P) (by fun_prop) (orderLE_polynomial_mul hoφ Q) + hp (max_lt hρ hp) hf hof hq hσ hsum, hP, hQ, differentialApply_add] + | monomial n c => + have heq : (fun z => (monomial n c).eval z * φ z) = + (fun z => c * (z ^ n * φ z)) := by + ext z + simp only [eval_monomial, mul_assoc] + rw [heq, infiniteDifferentialApply_const_mul_symbol, + infiniteDifferentialApply_pow_mul hφ hoφ hp hρ hf hof hq hσ hsum, + differentialApply_monomial] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialSymbol.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialSymbol.lean new file mode 100644 index 000000000..41291f1e9 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialSymbol.lean @@ -0,0 +1,41 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Polynomial symbols are finite differential operators +-/ + +public section + +open Polynomial + +namespace Complex + +/-- A polynomial symbol has a finite differential series for every target, +without any differentiability or growth assumptions on the target. -/ +theorem infiniteDifferentialApply_polynomial (P : ℂ[X]) (f : ℂ → ℂ) : + infiniteDifferentialApply (fun z ↦ P.eval z) f = P.differentialApply f := by + ext z + simp only [infiniteDifferentialApply, Polynomial.iteratedDeriv_fun_eval, + Polynomial.eval_zero_iterate_derivative] + have hterm (n : ℕ) : + ((n.factorial : ℂ) * P.coeff n) * iteratedDeriv n f z / n.factorial = + P.coeff n * iteratedDeriv n f z := by + have hn : (n.factorial : ℂ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + field_simp [hn] + simp_rw [hterm] + rw [tsum_eq_sum (s := Finset.range (P.natDegree + 1)) (fun n hn ↦ ?_)] + · rfl + · have hd : P.natDegree < n := Nat.lt_of_not_ge (by + simpa only [Finset.mem_range, Nat.lt_succ_iff] using hn) + rw [coeff_eq_zero_of_natDegree_lt hd, zero_mul] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SmallTypeBound.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SmallTypeBound.lean new file mode 100644 index 000000000..0f6725b01 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SmallTypeBound.lean @@ -0,0 +1,123 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.ExponentialCoefficients +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.CauchyBound +import RealRooted.Mathlib.Analysis.SpecificLimits.PowerSequence + +/-! +# Small exponential-type symbols act close to the identity + +A symbol normalized at zero and bounded by `exp (B * norm z)` differs from +the identity operator by at most a constant times `B` on a fixed spatial disk. +The target can be any entire function of finite order, not only an LP function. +-/ + +public section + +namespace Complex + +/-- Combine the exponential-type coefficient bound with a finite-order target +jet bound, cancelling only the nonzero factorial denominator. -/ +private theorem norm_differential_term_le {φ f : ℂ → ℂ} {B C q : ℝ} + (hφ : Differentiable ℂ φ) (hB : 0 < B) (hC : 0 < C) + (hbound : ∀ z, ‖φ z‖ ≤ Real.exp (B * ‖z‖)) (n : ℕ) (z : ℂ) + (hf : ‖iteratedDeriv n f z‖ ≤ n.factorial * C * + (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹) ^ n) : + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖ ≤ + Real.exp 1 * C * (B * (Real.exp 2 / ((n : ℝ) + 1) ^ q⁻¹)) ^ n := by + have hφn := norm_iteratedDeriv_zero_le_of_exp_norm_bound hφ hB hbound n + have hn : (n.factorial : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr n.factorial_ne_zero + have hfac : (n.factorial : ℝ) ≤ ((n : ℝ) + 1) ^ n := by + exact_mod_cast (Nat.factorial_le_pow n).trans + (Nat.pow_le_pow_left (Nat.le_succ n) n) + have hbase : ((n : ℝ) + 1) * + (Real.exp 1 * B / ((n : ℝ) + 1) * + (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹)) = + B * (Real.exp 2 / ((n : ℝ) + 1) ^ q⁻¹) := by + rw [show Real.exp 2 = Real.exp 1 * Real.exp 1 by rw [← Real.exp_add]; norm_num] + field_simp + simp only [norm_div, norm_mul, norm_natCast] + calc + _ ≤ ((n.factorial * Real.exp 1 * + (Real.exp 1 * B / ((n : ℝ) + 1)) ^ n) * + (n.factorial * C * (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹) ^ n)) / + n.factorial := + div_le_div_of_nonneg_right + (mul_le_mul hφn hf (norm_nonneg _) (by positivity)) (by positivity) + _ = n.factorial * (Real.exp 1 * C) * + (Real.exp 1 * B / ((n : ℝ) + 1) * + (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹)) ^ n := by + rw [mul_pow] + field_simp + _ ≤ ((n : ℝ) + 1) ^ n * (Real.exp 1 * C) * + (Real.exp 1 * B / ((n : ℝ) + 1) * + (Real.exp 1 / ((n : ℝ) + 1) ^ q⁻¹)) ^ n := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hfac (by positivity)) + (by positivity) + _ = _ := by rw [mul_right_comm, ← mul_pow, hbase, mul_comm] + +/-- Every entire target of finite order admits a diskwise linear bound for +the error made by a normalized symbol of exponential type `0 < B ≤ 1`. +Absolute convergence is proved along with the estimate. -/ +theorem exists_infiniteDifferentialApply_sub_bound {f : ℂ → ℂ} {ρ R : ℝ} + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f ρ) : + ∃ K > 0, ∀ φ : ℂ → ℂ, Differentiable ℂ φ → φ 0 = 1 → + ∀ B : ℝ, 0 < B → B ≤ 1 → + (∀ w, ‖φ w‖ ≤ Real.exp (B * ‖w‖)) → + ∀ z, ‖z‖ ≤ R → + Summable (fun n : ℕ => + ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖) ∧ + ‖infiniteDifferentialApply φ f z - f z‖ ≤ K * B := by + let q : ℝ := max ρ 0 + 1 + have hq : 0 < q := by dsimp [q]; linarith [le_max_right ρ 0] + have hρ : ρ < q := by dsimp [q]; linarith [le_max_left ρ 0] + obtain ⟨C, hC, hc⟩ := exists_iteratedDeriv_bound_of_orderLE + (R := R) hf hof hq hρ + let u : ℕ → ℝ := fun n => (Real.exp 2 / ((n : ℝ) + 1) ^ q⁻¹) ^ n + have hu : Summable u := Real.summable_const_div_rpow_pow (inv_pos.mpr hq) _ + have ht : Summable (fun n => u (n + 1)) := (summable_nat_add_iff 1).mpr hu + have hun : 0 ≤ ∑' n, u (n + 1) := tsum_nonneg fun n => by dsimp [u]; positivity + refine ⟨Real.exp 1 * C * ((∑' n, u (n + 1)) + 1), by positivity, ?_⟩ + intro φ hφ hφ0 B hB hB1 hb z hz + let a : ℕ → ℂ := fun n => + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ) + have ha (n : ℕ) : ‖a (n + 1)‖ ≤ Real.exp 1 * C * B * u (n + 1) := by + have h := norm_differential_term_le hφ hB hC hb (n + 1) z (hc _ z hz) + have hpow : B ^ (n + 1) ≤ B := by + calc + _ = B ^ n * B := pow_succ _ _ + _ ≤ 1 * B := mul_le_mul_of_nonneg_right (pow_le_one₀ hB.le hB1) hB.le + _ = B := one_mul _ + apply h.trans + rw [mul_pow] + change Real.exp 1 * C * (B ^ (n + 1) * u (n + 1)) ≤ + Real.exp 1 * C * B * u (n + 1) + rw [← mul_assoc] + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hpow (by positivity)) (by dsimp [u]; positivity) + have htail : Summable (fun n => ‖a (n + 1)‖) := + Summable.of_nonneg_of_le (fun _ => norm_nonneg _) ha (ht.mul_left _) + have hall : Summable (fun n => ‖a n‖) := (summable_nat_add_iff 1).mp htail + refine ⟨hall, ?_⟩ + have heq : infiniteDifferentialApply φ f z - f z = ∑' n, a (n + 1) := by + change (∑' n, a n) - f z = _ + rw [hall.of_norm.tsum_eq_zero_add] + simp only [a, iteratedDeriv_zero, hφ0, one_mul, Nat.factorial_zero, + Nat.cast_one, div_one, add_sub_cancel_left] + rw [heq] + calc + _ ≤ ∑' n, ‖a (n + 1)‖ := norm_tsum_le_tsum_norm htail + _ ≤ ∑' n, Real.exp 1 * C * B * u (n + 1) := + htail.tsum_le_tsum ha (ht.mul_left _) + _ = Real.exp 1 * C * B * (∑' n, u (n + 1)) := tsum_mul_left + _ = Real.exp 1 * C * (∑' n, u (n + 1)) * B := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (by linarith) (by positivity)) hB.le + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SmallTypeLimit.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SmallTypeLimit.lean new file mode 100644 index 000000000..024a4e535 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SmallTypeLimit.lean @@ -0,0 +1,46 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SmallTypeBound + +/-! +# Vanishing exponential type gives convergence to the identity operator + +The symbol family may be indexed by any filter. A strictly positive upper +bound for the type is harmless for zero-type symbols and finite product tails. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Normalized entire symbols with exponential-type bounds tending to zero act +locally uniformly like the identity on every entire target of finite order. -/ +theorem tendstoLocallyUniformly_infiniteDifferentialApply_of_type_tendsto_zero + {ι : Type*} {l : Filter ι} {φ : ι → ℂ → ℂ} {B : ι → ℝ} + (hφ : ∀ i, Differentiable ℂ (φ i)) (hφ0 : ∀ i, φ i 0 = 1) + (hB : ∀ i, 0 < B i) (hlim : Tendsto B l (𝓝 0)) + (hbound : ∀ i z, ‖φ i z‖ ≤ Real.exp (B i * ‖z‖)) + {f : ℂ → ℂ} {ρ : ℝ} (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f ρ) : + TendstoLocallyUniformly (fun i => infiniteDifferentialApply (φ i) f) f l := by + rw [tendstoLocallyUniformly_iff_forall_isCompact] + intro S hS + obtain ⟨R, _, hR⟩ := hS.isBounded.exists_pos_norm_le + obtain ⟨K, hK, hk⟩ := exists_infiniteDifferentialApply_sub_bound (R := R) hf hof + rw [Metric.tendstoUniformlyOn_iff] + intro ε hε + have hεK : 0 < ε / K := div_pos hε hK + filter_upwards [hlim.eventually (eventually_lt_nhds hεK), + hlim.eventually (eventually_lt_nhds zero_lt_one)] with i hi hi1 z hz + rw [dist_eq_norm, norm_sub_rev] + apply ((hk (φ i) (hφ i) (hφ0 i) (B i) (hB i) hi1.le (hbound i) z (hR z hz)).2).trans_lt + exact (mul_lt_mul_of_pos_left hi hK).trans_eq (mul_div_cancel₀ _ hK.ne') + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Star.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Star.lean new file mode 100644 index 000000000..af79e1617 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Star.lean @@ -0,0 +1,38 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Conjugation symmetry of infinite differential sums + +Real entire symbols act on real entire targets by real entire differential +sums whenever those sums converge. The conjugation identity itself also +holds for the total sum without a convergence assumption. +-/ + +public section + +open scoped ComplexConjugate + +namespace Complex + +/-- Infinite differential sums respect conjugation when both inputs do. -/ +theorem infiniteDifferentialApply_conj {φ f : ℂ → ℂ} + (hφ : ∀ z, φ (conj z) = conj (φ z)) (hf : ∀ z, f (conj z) = conj (f z)) (z : ℂ) : + infiniteDifferentialApply φ f (conj z) = conj (infiniteDifferentialApply φ f z) := by + unfold infiniteDifferentialApply + rw [conj_tsum] + apply tsum_congr + intro n + rw [iteratedDeriv_conj hf] + have hφn : conj (iteratedDeriv n φ 0) = iteratedDeriv n φ 0 := by + simpa only [map_zero] using (iteratedDeriv_conj hφ n 0).symm + simp only [map_div₀, map_mul, map_natCast, hφn] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SymbolAlgebra.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SymbolAlgebra.lean new file mode 100644 index 000000000..534a587b3 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SymbolAlgebra.lean @@ -0,0 +1,75 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderConvergence +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderDerivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolSummable + +/-! +# Scalar and linear factors of infinite differential symbols + +Multiplying an entire symbol by the variable differentiates its differential +image. The proof shifts an actually convergent series, so zero coefficients +and zero outputs cause no exception. +-/ + +public section + +namespace Complex + +/-- Scalar multiplication of an infinite differential symbol acts by the same +scalar on its output. This identity holds even for the totalized series. -/ +theorem infiniteDifferentialApply_const_mul_symbol (c : ℂ) (φ f : ℂ → ℂ) : + infiniteDifferentialApply (fun z => c * φ z) f = + fun z => c * infiniteDifferentialApply φ f z := by + ext z + simp only [infiniteDifferentialApply, iteratedDeriv_const_mul_field] + simp_rw [mul_assoc, mul_div_assoc] + exact tsum_mul_left + +/-- Addition of entire symbols is linear when both differential series satisfy +the reciprocal growth-order criterion. -/ +theorem infiniteDifferentialApply_add_symbol {φ ψ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) + (hψ : Differentiable ℂ ψ) (hoψ : TauCeti.OrderLE ψ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + infiniteDifferentialApply (fun z => φ z + ψ z) f = + infiniteDifferentialApply φ f + infiniteDifferentialApply ψ f := by + exact infiniteDifferentialApply_add_symbol_of_summable hφ hψ + (fun z ↦ (summable_norm_infiniteDifferentialApply_of_order + hφ hoφ hp hρ hf hof hq hσ hsum z).of_norm) + (fun z ↦ (summable_norm_infiniteDifferentialApply_of_order + hψ hoψ hp hρ hf hof hq hσ hsum z).of_norm) + +/-- Multiplying an entire symbol by the variable applies one more derivative +to the target. Only the unmultiplied symbol's growth bound is required. -/ +theorem infiniteDifferentialApply_id_mul {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + infiniteDifferentialApply (fun z => z * φ z) f = + infiniteDifferentialApply φ (deriv f) := by + exact infiniteDifferentialApply_id_mul_of_summable hφ + (fun z ↦ (summable_norm_infiniteDifferentialApply_of_order + hφ hoφ hp hρ hf.deriv (hof.deriv hf) hq hσ hsum z).of_norm) + +/-- A variable factor in the symbol differentiates the actual entire output. -/ +theorem infiniteDifferentialApply_id_mul_eq_deriv {φ f : ℂ → ℂ} {ρ σ p q : ℝ} + (hφ : Differentiable ℂ φ) (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hf : Differentiable ℂ f) (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) + (hsum : 1 < p⁻¹ + q⁻¹) : + infiniteDifferentialApply (fun z => z * φ z) f = + deriv (infiniteDifferentialApply φ f) := by + rw [infiniteDifferentialApply_id_mul hφ hoφ hp hρ hf hof hq hσ hsum] + simpa only [iteratedDeriv_one] using + (iteratedDeriv_infiniteDifferentialApply_of_order + hφ hoφ hp hρ hf hof hq hσ hsum 1).symm + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SymbolSummable.lean b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SymbolSummable.lean new file mode 100644 index 000000000..354c93359 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SymbolSummable.lean @@ -0,0 +1,61 @@ +/- +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 RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.EulerRodrigues + +/-! +# Algebra of summable infinite differential symbols +-/ + +public section + +namespace Complex + +/-- Addition of entire symbols is linear whenever both actual differential +series are summable. The target need not be analytic for this identity. -/ +theorem infiniteDifferentialApply_add_symbol_of_summable {φ ψ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) (hψ : Differentiable ℂ ψ) + (hsφ : ∀ z, Summable (fun n : ℕ ↦ + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ))) + (hsψ : ∀ z, Summable (fun n : ℕ ↦ + iteratedDeriv n ψ 0 * iteratedDeriv n f z / (n.factorial : ℂ))) : + infiniteDifferentialApply (fun z ↦ φ z + ψ z) f = + infiniteDifferentialApply φ f + infiniteDifferentialApply ψ f := by + ext z + simp only [infiniteDifferentialApply, Pi.add_apply, + iteratedDeriv_fun_add hφ.contDiff.contDiffAt hψ.contDiff.contDiffAt, add_mul, add_div] + exact (hsφ z).tsum_add (hsψ z) + +/-- A variable factor shifts an actually summable differential series. +Only the shifted target's series is required to be summable. -/ +theorem infiniteDifferentialApply_id_mul_of_summable {φ f : ℂ → ℂ} + (hφ : Differentiable ℂ φ) + (hs : ∀ z, Summable (fun n : ℕ ↦ + iteratedDeriv n φ 0 * iteratedDeriv n (deriv f) z / (n.factorial : ℂ))) : + infiniteDifferentialApply (fun z ↦ z * φ z) f = + infiniteDifferentialApply φ (deriv f) := by + ext z + let u : ℕ → ℂ := fun n ↦ + iteratedDeriv n (fun w ↦ w * φ w) 0 * iteratedDeriv n f z / (n.factorial : ℂ) + have hterm (n : ℕ) : u (n + 1) = + iteratedDeriv n φ 0 * iteratedDeriv n (deriv f) z / (n.factorial : ℂ) := by + dsimp only [u] + rw [iteratedDeriv_succ_id_mul hφ.contDiff.contDiffAt] + simp only [zero_mul, zero_add, Nat.factorial_succ, Nat.cast_mul, + Nat.cast_add, Nat.cast_one, ← iteratedDeriv_succ'] + have hn : (n : ℂ) + 1 ≠ 0 := by exact_mod_cast Nat.succ_ne_zero n + have hnf : (n.factorial : ℂ) ≠ 0 := by exact_mod_cast n.factorial_ne_zero + field_simp [hn, hnf] + have htail : HasSum (fun n ↦ u (n + 1)) + (infiniteDifferentialApply φ (deriv f) z) := by + simpa only [hterm, infiniteDifferentialApply] using (hs z).hasSum + have hall := htail.zero_add + simpa only [u, iteratedDeriv_zero, zero_mul, zero_div, zero_add, + infiniteDifferentialApply] using hall.tsum_eq + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/IteratedRealDeriv.lean b/RealRooted/Mathlib/Analysis/Complex/IteratedRealDeriv.lean new file mode 100644 index 000000000..2417243b5 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/IteratedRealDeriv.lean @@ -0,0 +1,42 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.RealDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.Analytic.Basic +import Mathlib.Analysis.Analytic.ChangeOrigin +import Mathlib.Analysis.Calculus.FDeriv.Analytic +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas + +/-! +# Real iterated derivatives of locally holomorphic functions + +The real part of a holomorphic function restricted to the real axis has +iterated derivatives given by the real parts of the complex derivatives. +The local hypothesis applies at endpoints of subsequently restricted domains. +-/ + +public section + +open Filter Topology + +/-- Taking real parts and restricting to the real axis commutes with every +iterated derivative of a function holomorphic near the point. -/ +theorem AnalyticAt.iteratedDeriv_real_of_complex {f : ℂ → ℂ} {x : ℝ} + (hf : AnalyticAt ℂ f (x : ℂ)) (k : ℕ) : + iteratedDeriv k (fun y : ℝ ↦ (f (y : ℂ)).re) x = + (iteratedDeriv k f (x : ℂ)).re := by + induction k generalizing f with + | zero => rfl + | succ k ih => + have heq : deriv (fun y : ℝ ↦ (f (y : ℂ)).re) =ᶠ[𝓝 x] + (fun y : ℝ ↦ (deriv f (y : ℂ)).re) := by + filter_upwards [Complex.continuous_ofReal.continuousAt.tendsto.eventually + hf.eventually_analyticAt] with y hy + exact hy.differentiableAt.hasDerivAt.real_of_complex.deriv + rw [iteratedDeriv_succ', heq.iteratedDeriv_eq k, ih hf.deriv, iteratedDeriv_succ'] diff --git a/RealRooted/Mathlib/Analysis/Complex/LineIdentity.lean b/RealRooted/Mathlib/Analysis/Complex/LineIdentity.lean new file mode 100644 index 000000000..ed19c7a21 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LineIdentity.lean @@ -0,0 +1,38 @@ +/- +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.Analytic.Basic +import Mathlib.Analysis.Analytic.IsolatedZeros +public import Mathlib.Analysis.Complex.Basic + +/-! +# The identity principle along a line + +Vanishing on a real line segment through an interior point determines an +analytic function on a connected domain. +-/ + +public section + +open Complex Filter Topology + +/-- An analytic function on a connected domain which vanishes along a line +near one point vanishes throughout the domain. -/ +theorem AnalyticOnNhd.eqOn_zero_of_line_eq_zero {E : Type*} + [NormedAddCommGroup E] [NormedSpace ℂ E] + {f : ℂ → E} {U : Set ℂ} {z₀ v : ℂ} + (hf : AnalyticOnNhd ℂ f U) (hU : IsPreconnected U) (hz₀ : z₀ ∈ U) + (hv : v ≠ 0) (hzero : ∀ᶠ t : ℝ in 𝓝 0, f (z₀ + (t : ℂ) * v) = 0) : + Set.EqOn f 0 U := by + have ht : Tendsto (fun t : ℝ => z₀ + (t : ℂ) * v) + (𝓝[≠] 0) (𝓝[≠] z₀) := by + have hcont : Continuous (fun t : ℝ => z₀ + (t : ℂ) * v) := by fun_prop + simpa only [ofReal_zero, zero_mul, add_zero] using + hcont.continuousWithinAt.tendsto_nhdsWithin (x := 0) (fun t ht => by + simpa [hv] using ht) + exact hf.eqOn_zero_of_preconnected_of_frequently_eq_zero hU hz₀ + (ht.frequently (hzero.filter_mono nhdsWithin_le_nhds).frequently) diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearPrefixGaussian.lean b/RealRooted/Mathlib/Analysis/Complex/LinearPrefixGaussian.lean new file mode 100644 index 000000000..13bea1a8f --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearPrefixGaussian.lean @@ -0,0 +1,54 @@ +/- +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.Complex.Exponential +import RealRooted.Mathlib.Analysis.Complex.Polynomial.Szasz +import Mathlib.Analysis.Normed.Module.FiniteDimension + +/-! +# Common Gaussian envelopes for summable linear-product prefixes +-/ + +public section + +namespace Complex + +/-- Completing the square bounds a linear term by any positive quadratic term. -/ +private theorem mul_le_sq_add_div {ε S r : ℝ} (hε : 0 < ε) : + S * r ≤ ε * r ^ 2 + S ^ 2 / (4 * ε) := by + have hsq := mul_nonneg hε.le (sq_nonneg (r - S / (2 * ε))) + have heq : ε * (r - S / (2 * ε)) ^ 2 = + ε * r ^ 2 - S * r + S ^ 2 / (4 * ε) := by + field_simp [hε.ne'] + ring + rw [heq] at hsq + linarith + +/-- Every finite prefix of a summable real linear product admits the same +global bound with any positive quadratic coefficient. -/ +theorem exists_norm_prod_one_add_le_exp_sq {a : ℕ → ℝ} (ha : Summable a) + {ε : ℝ} (hε : 0 < ε) : + ∃ C > 0, ∀ n z, + ‖∏ j ∈ Finset.range n, (1 + (a j : ℂ) * z)‖ ≤ C * Real.exp (ε * ‖z‖ ^ 2) := by + let S : ℝ := ∑' j, ‖a j‖ + refine ⟨Real.exp (S ^ 2 / (4 * ε)), Real.exp_pos _, fun n z ↦ ?_⟩ + have hprefix : ‖∏ j ∈ Finset.range n, (1 + (a j : ℂ) * z)‖ ≤ + Real.exp (‖z‖ * ∑ j ∈ Finset.range n, ‖a j‖) := by + simpa only [Fin.prod_univ_eq_prod_range (fun j ↦ (1 + (a j : ℂ) * z)) n, + norm_real, Fin.sum_univ_eq_sum_range (fun j ↦ ‖a j‖) n] using + norm_prod_one_add_le_exp (fun j : Fin n ↦ (a j : ℂ)) z + have hsum : (∑ j ∈ Finset.range n, ‖a j‖) ≤ S := + ha.norm.sum_le_tsum _ (fun j _ ↦ norm_nonneg _) + calc + _ ≤ Real.exp (‖z‖ * ∑ j ∈ Finset.range n, ‖a j‖) := hprefix + _ ≤ Real.exp (‖z‖ * S) := by gcongr + _ ≤ Real.exp (ε * ‖z‖ ^ 2 + S ^ 2 / (4 * ε)) := + Real.exp_le_exp.mpr (by simpa only [mul_comm] using + (mul_le_sq_add_div (S := S) (r := ‖z‖) hε)) + _ = _ := by rw [Real.exp_add, mul_comm] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProduct.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProduct.lean new file mode 100644 index 000000000..3e9ded4a1 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProduct.lean @@ -0,0 +1,47 @@ +/- +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.Complex.Basic +import Mathlib.Topology.UniformSpace.LocallyUniformConvergence +import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn +import Mathlib.Analysis.Normed.Module.FiniteDimension + +/-! +# Locally uniform convergence of linear products + +Summable real slopes define locally uniformly convergent products of linear +factors on the complex plane. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Uniform convergence on every closed ball centred at `0` gives local uniform convergence. -/ +theorem tendstoLocallyUniformly_of_closedBall {F : ℕ → ℂ → ℂ} {f : ℂ → ℂ} + (h : ∀ R : ℝ, TendstoUniformlyOn F f atTop (Metric.closedBall 0 R)) : + TendstoLocallyUniformly F f atTop := by + intro u hu x + refine ⟨Metric.closedBall 0 (‖x‖ + 1), ?_, h (‖x‖ + 1) u hu⟩ + apply Metric.closedBall_mem_nhds_of_mem + simp + +/-- The partial products of `∏ₖ (1 + yₖ z)` converge locally uniformly when `∑ |yₖ| < ∞`. -/ +theorem tendstoLocallyUniformly_prod_one_add (y : ℕ → ℝ) (hy : Summable y) : + TendstoLocallyUniformly (fun n (z : ℂ) => ∏ k ∈ Finset.range n, (1 + (y k : ℂ) * z)) + (fun z => ∏' k, (1 + (y k : ℂ) * z)) atTop := by + refine tendstoLocallyUniformly_of_closedBall fun R => ?_ + refine (Summable.hasProdUniformlyOn_nat_one_add (f := fun k (z : ℂ) => (y k : ℂ) * z) + (isCompact_closedBall 0 R) (hy.norm.mul_right R) ?_ + (fun n => by fun_prop)).tendstoUniformlyOn_finsetRange + refine Eventually.of_forall fun n z hz => ?_ + rw [norm_mul, Complex.norm_real] + exact mul_le_mul_of_nonneg_left (by simpa using hz) (norm_nonneg _) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProductAnalytic.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProductAnalytic.lean new file mode 100644 index 000000000..ad0ccba25 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProductAnalytic.lean @@ -0,0 +1,94 @@ +/- +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 TauCeti.Analysis.Normed.Ring.InfiniteProd +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Topology.Algebra.InfiniteSum.UniformOn +public import Mathlib.Analysis.Calculus.LogDeriv +import TauCeti.Analysis.Complex.InfiniteProd +import Mathlib.Analysis.Normed.Group.FunctionSeries + +/-! +# Arbitrarily indexed summable linear products + +Summable real slopes give an entire genus-zero product. Its logarithmic +derivative is the convergent sum of the factor logarithmic derivatives wherever +the factors do not vanish. The index type may be finite or empty. +-/ + +public section + +open Filter Set Topology + +namespace Complex + +/-- Norms of linear perturbations with summable slopes are uniformly summable +on every compact subset of the complex plane. -/ +theorem summableUniformlyOn_norm_ofReal_mul {ι : Type*} {a : ι → ℝ} + (ha : Summable a) {K : Set ℂ} (hK : IsCompact K) : + SummableUniformlyOn (fun i z ↦ ‖(a i : ℂ) * z‖) K := by + obtain ⟨R, hR⟩ := hK.isBounded.subset_closedBall 0 + apply HasSumUniformlyOn.summableUniformlyOn + (g := fun z ↦ ∑' i, ‖(a i : ℂ) * z‖) + apply hasSumUniformlyOn_iff_tendstoUniformlyOn.mpr + apply tendstoUniformlyOn_tsum (ha.norm.mul_right R) + intro i z hz + rw [norm_norm, norm_mul, norm_real] + exact mul_le_mul_of_nonneg_left + (mem_closedBall_zero_iff.mp (hR hz)) (norm_nonneg _) + +/-- The product of summable real linear factors converges locally uniformly. -/ +theorem hasProdLocallyUniformlyOn_one_add_ofReal_mul + {ι : Type*} {a : ι → ℝ} (ha : Summable a) : + HasProdLocallyUniformlyOn (fun i (z : ℂ) ↦ 1 + (a i : ℂ) * z) + (fun z ↦ ∏' i, (1 + (a i : ℂ) * z)) univ := by + exact TauCeti.hasProdLocallyUniformlyOn_one_add_of_forall_isCompact isOpen_univ + (fun _ _ hK ↦ summableUniformlyOn_norm_ofReal_mul ha hK) (fun _ ↦ by fun_prop) + +/-- The product of summable real linear factors is entire. -/ +theorem differentiable_tprod_one_add_ofReal_mul {ι : Type*} {a : ι → ℝ} + (ha : Summable a) : Differentiable ℂ (fun z ↦ ∏' i, (1 + (a i : ℂ) * z)) := by + apply differentiableOn_univ.mp + exact TauCeti.differentiableOn_tprod_one_add isOpen_univ (fun _ ↦ by fun_prop) + (fun _ _ hK ↦ summableUniformlyOn_norm_ofReal_mul ha hK) + +/-- Real linear factors have no zeros in the open upper half-plane. -/ +theorem one_add_ofReal_mul_ne_zero_of_im_pos (a : ℝ) {z : ℂ} (hz : 0 < z.im) : + 1 + (a : ℂ) * z ≠ 0 := by + by_cases ha : a = 0 + · simp [ha] + intro heq + have hi := congrArg Complex.im heq + simp only [add_im, one_im, mul_im, ofReal_re, ofReal_im, zero_mul, add_zero, + zero_add, zero_im] at hi + exact (mul_ne_zero ha (ne_of_gt hz)) hi + +/-- The entire linear product is nonzero in the upper half-plane. -/ +theorem tprod_one_add_ofReal_mul_ne_zero_of_im_pos {ι : Type*} {a : ι → ℝ} + (ha : Summable a) {z : ℂ} (hz : 0 < z.im) : + (∏' i, (1 + (a i : ℂ) * z)) ≠ 0 := by + have hs : Summable (fun i ↦ ‖(a i : ℂ) * z‖) := by + simpa only [norm_mul, norm_real] using ha.norm.mul_right ‖z‖ + intro heq + obtain ⟨i, hi⟩ := (TauCeti.tprod_one_add_eq_zero_iff hs).mp heq + exact one_add_ofReal_mul_ne_zero_of_im_pos (a i) hz hi + +/-- The logarithmic derivative of an arbitrary summable linear product is a +convergent sum of resolvents in the upper half-plane. -/ +theorem hasSum_logDeriv_tprod_one_add_ofReal_mul {ι : Type*} {a : ι → ℝ} + (ha : Summable a) {z : ℂ} (hz : 0 < z.im) : + HasSum (fun i ↦ (a i : ℂ) / (1 + (a i : ℂ) * z)) + (logDeriv (fun w ↦ ∏' i, (1 + (a i : ℂ) * w)) z) := by + have h := TauCeti.hasSumLocallyUniformlyOn_logDeriv_one_add + (u := fun i w ↦ (a i : ℂ) * w) isOpen_univ (fun _ ↦ by fun_prop) + (fun _ _ hK ↦ summableUniformlyOn_norm_ofReal_mul ha hK) + (V := UpperHalfPlane.upperHalfPlaneSet) (subset_univ _) + (fun i w hw ↦ one_add_ofReal_mul_ne_zero_of_im_pos (a i) hw) + simpa only [deriv_const_mul_id] using h.hasSum hz + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProductDivisor.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProductDivisor.lean new file mode 100644 index 000000000..edf748045 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProductDivisor.lean @@ -0,0 +1,126 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Meromorphic.Divisor +import Mathlib.Topology.Algebra.InfiniteSum.Real +public import Mathlib.Analysis.Complex.Basic +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import TauCeti.Analysis.Complex.InfiniteProd +import TauCeti.Analysis.Meromorphic.Divisor +import Mathlib.SetTheory.Cardinal.Finite + +/-! +# Native divisor multiplicities of convergent linear products + +At each point, the analytic order of a product of summable real linear +factors is exactly the number of factors vanishing there. That fiber is +finite. Thus repeated slopes retain their full native-divisor multiplicity; +zero slopes never contribute a zero. No sign hypothesis is needed here. +-/ + +public section + +open Set + +namespace Complex + +/-- A nonconstant affine factor has a simple zero; otherwise its order is +zero. The constant factor obtained from slope zero is included. -/ +theorem analyticOrderAt_one_add_mul (a z : ℂ) : + analyticOrderAt (fun w : ℂ ↦ 1 + a * w) z = if 1 + a * z = 0 then 1 else 0 := by + classical + have hf : AnalyticAt ℂ (fun w : ℂ ↦ 1 + a * w) z := by fun_prop + by_cases hz : 1 + a * z = 0 + · rw [ite_eq_left hz] + have ha : a ≠ 0 := by + intro h + simp only [h, zero_mul, add_zero] at hz + exact one_ne_zero hz + apply hf.analyticOrderAt_eq_one_of_zero_deriv_ne_zero hz + simpa only [deriv_const_add, deriv_const_mul_id] using ha + · rw [ite_eq_right hz] + exact hf.analyticOrderAt_eq_zero.mpr hz + +/-- Summability of the real slopes makes every vanishing-factor fiber +finite, including when the same nonzero slope occurs repeatedly. -/ +theorem finite_linearProduct_zero_fiber {ι : Type*} {a : ι → ℝ} + (hs : Summable a) (z : ℂ) : {i | 1 + (a i : ℂ) * z = 0}.Finite := by + have hfin := TauCeti.finite_analyticOrderAt_one_add_ne_zero + (u := fun i (w : ℂ) ↦ (a i : ℂ) * w) isOpen_univ (fun _ ↦ by fun_prop) + (fun _ _ hK ↦ summableUniformlyOn_norm_ofReal_mul hs hK) (Set.mem_univ z) + apply hfin.subset + intro i hi + change 1 + (a i : ℂ) * z = 0 at hi + change analyticOrderAt (fun w : ℂ ↦ 1 + (a i : ℂ) * w) z ≠ 0 + rw [analyticOrderAt_one_add_mul, ite_eq_left hi] + exact one_ne_zero + +/-- The natural analytic order of a convergent linear product is exactly +the finite cardinality of its vanishing-factor fiber. -/ +theorem analyticOrderNatAt_tprod_one_add_ofReal_mul {ι : Type*} {a : ι → ℝ} + (hs : Summable a) (z : ℂ) : + analyticOrderNatAt (fun w : ℂ ↦ ∏' i, (1 + (a i : ℂ) * w)) z = + Nat.card {i // 1 + (a i : ℂ) * z = 0} := by + classical + have htop (i : ι) : analyticOrderAt (fun w : ℂ ↦ 1 + (a i : ℂ) * w) z ≠ ⊤ := by + rw [analyticOrderAt_one_add_mul] + split <;> simp + rw [TauCeti.analyticOrderNatAt_tprod_one_add isOpen_univ (fun _ ↦ by fun_prop) + (fun _ _ hK ↦ summableUniformlyOn_norm_ofReal_mul hs hK) (Set.mem_univ z) htop] + have hfactor (i : ι) : analyticOrderNatAt (fun w : ℂ ↦ 1 + (a i : ℂ) * w) z = + if 1 + (a i : ℂ) * z = 0 then 1 else 0 := by + rw [analyticOrderNatAt, analyticOrderAt_one_add_mul] + split <;> simp + simp_rw [hfactor] + have hfin := finite_linearProduct_zero_fiber hs z + let : Fintype {i // 1 + (a i : ℂ) * z = 0} := hfin.fintype + calc (∑' i, if 1 + (a i : ℂ) * z = 0 then (1 : ℕ) else 0) + = ∑' i : {i // 1 + (a i : ℂ) * z = 0}, (1 : ℕ) := by + rw [← tsum_subtype_eq_of_support_subset + (f := fun i ↦ if 1 + (a i : ℂ) * z = 0 then (1 : ℕ) else 0) + (s := {i | 1 + (a i : ℂ) * z = 0}) (by + intro i hi + by_contra hn + exact hi (ite_eq_right hn))] + apply tsum_congr + intro i + exact ite_eq_left i.property + _ = _ := by + simp only [tsum_fintype, Finset.sum_const, Finset.card_univ, + nsmul_eq_mul, mul_one, Nat.card_eq_fintype_card] + rfl + +/-- The native divisor of a convergent linear product counts its repeated +vanishing factors exactly. -/ +theorem divisor_tprod_one_add_ofReal_mul_apply {ι : Type*} {a : ι → ℝ} + (hs : Summable a) (z : ℂ) : + MeromorphicOn.divisor (fun w : ℂ ↦ ∏' i, (1 + (a i : ℂ) * w)) Set.univ z = + (Nat.card {i // 1 + (a i : ℂ) * z = 0} : ℤ) := by + have hf := differentiable_tprod_one_add_ofReal_mul hs + have hfa : AnalyticOnNhd ℂ (fun w : ℂ ↦ ∏' i, (1 + (a i : ℂ) * w)) Set.univ := + fun w _ ↦ hf.analyticAt w + rw [hfa.meromorphicOn.divisor_eq_analyticOrderNatAt + (hf.analyticAt z) (Set.mem_univ z), analyticOrderNatAt_tprod_one_add_ofReal_mul hs z] + +/-- Multiplication by a nonzero scalar preserves all native zero +multiplicities of the linear product. -/ +theorem divisor_const_mul_tprod_one_add_ofReal_mul_apply {ι : Type*} {a : ι → ℝ} + {c : ℂ} (hc : c ≠ 0) (hs : Summable a) (z : ℂ) : + MeromorphicOn.divisor (fun w : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * w)) Set.univ z = + (Nat.card {i // 1 + (a i : ℂ) * z = 0} : ℤ) := by + have hP := differentiable_tprod_one_add_ofReal_mul hs + have hf : Differentiable ℂ (fun w : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * w)) := + (differentiable_const c).mul hP + have hfa : AnalyticOnNhd ℂ + (fun w : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * w)) Set.univ := + fun w _ ↦ hf.analyticAt w + rw [hfa.meromorphicOn.divisor_eq_analyticOrderNatAt + (hf.analyticAt z) (Set.mem_univ z)] + rw [analyticOrderNatAt_fun_const_mul (hP.analyticAt z) hc, + analyticOrderNatAt_tprod_one_add_ofReal_mul hs z] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProductFinite.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProductFinite.lean new file mode 100644 index 000000000..2e6113222 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProductFinite.lean @@ -0,0 +1,50 @@ +/- +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.Complex.Basic +import Mathlib.Tactic.TypeStar + +/-! +# Finite linear products as finitely supported natural sequences +-/ + +public section + +open Function + +namespace Complex + +/-- A finite family of nonnegative slopes can be padded with zeros to a natural +sequence, preserving the exact complex product. Empty families are included. -/ +theorem exists_finite_support_tprod_eq_prod {ι : Type*} [Fintype ι] + (a : ι → ℝ) (ha : ∀ i, 0 ≤ a i) : + ∃ b : ℕ → ℝ, (∀ n, 0 ≤ b n) ∧ (support b).Finite ∧ + ∀ z : ℂ, (∏' n, (1 + (b n : ℂ) * z)) = ∏ i, (1 + (a i : ℂ) * z) := by + classical + obtain ⟨e, he⟩ := Countable.exists_injective_nat ι + let b : ℕ → ℝ := extend e a 0 + have hbe (i : ι) : b (e i) = a i := he.extend_apply a 0 i + have hbzero (n : ℕ) (hn : n ∉ Set.range e) : b n = 0 := + extend_apply' (f := e) a (0 : ℕ → ℝ) n hn + have hb (n : ℕ) : 0 ≤ b n := by + by_cases hn : n ∈ Set.range e + · obtain ⟨i, rfl⟩ := hn + rw [hbe] + exact ha i + · rw [hbzero n hn] + have hfin : (support b).Finite := (Set.finite_range e).subset (by + intro n hn + by_contra he' + exact hn (hbzero n he')) + refine ⟨b, hb, hfin, fun z => ?_⟩ + have hprod := he.tprod_eq (f := fun n => (1 + (b n : ℂ) * z)) (by + intro n hn + by_contra he' + exact hn (by simp only [hbzero n he', ofReal_zero, zero_mul, add_zero])) + simpa only [hbe, tprod_fintype] using hprod.symm + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProductInverseMoments.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProductInverseMoments.lean new file mode 100644 index 000000000..0d740c0bc --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProductInverseMoments.lean @@ -0,0 +1,77 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Mathlib.Analysis.Complex.PositiveSlopeRoots +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberCardinality +import TauCeti.Analysis.Complex.GrowthOrder.Zero.Summability + +/-! +# Inverse spectral moments of linear products from growth order + +The native divisor growth theorem counts repeated zeros. Identifying its +multiplicities with the finite slope fibers transfers the theorem to the +actual positive rates of a linear product. Thus order below one supplies +the stronger inverse moments required by Zhang's heat estimates. +-/ + +public section + +namespace Complex + +/-- Every positive slope power above the actual order is summable, with +repetitions counted, for a summable nonnegative linear product. -/ +theorem summable_rpow_positive_slopes_of_order {ι : Type*} {a : ι → ℝ} + {c : ℂ} {rho p : ℝ} (hc : c ≠ 0) (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (horder : TauCeti.OrderLE (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) rho) + (hp : rho < p) : Summable (fun i : {i // 0 < a i} ↦ a i ^ p) := by + let F : ℂ → ℂ := fun z ↦ c * ∏' i, (1 + (a i : ℂ) * z) + let d := MeromorphicOn.divisor F Set.univ + have hF : Differentiable ℂ F := + (differentiable_const c).mul (differentiable_tprod_one_add_ofReal_mul hs) + have hsupport : Function.support (fun z : ℂ ↦ (d z : ℝ) * ‖z‖ ^ (-p)) ⊆ + d.support := by + intro z hz + by_contra hn + have hd : d z = 0 := Function.notMem_support.mp hn + exact hz (by simp only [hd, Int.cast_zero, zero_mul]) + have hsfull : Summable (fun z : ℂ ↦ (d z : ℝ) * ‖z‖ ^ (-p)) := + ((hasSum_subtype_iff_of_support_subset hsupport).mp + (horder.summable_divisor_mul_norm_rpow hF hp).hasSum).summable + have hscard : Summable (fun z : ℂ ↦ + (Nat.card {i : {i // 0 < a i} // positiveSlopeRoot a i = z} : ℝ) * + ‖z‖ ^ (-p)) := by + apply hsfull.congr + intro z + rw [show d z = + (Nat.card {i : {i // 0 < a i} // positiveSlopeRoot a i = z} : ℤ) from + divisor_const_mul_linearProduct_eq_natCard_root_fiber hc ha hs z] + simp only [Int.cast_natCast] + have hsroots : Summable (fun i : {i // 0 < a i} ↦ ‖positiveSlopeRoot a i‖ ^ (-p)) := + summable_of_natCard_fiber_mul (fun z ↦ Real.rpow_nonneg (norm_nonneg z) _) + (finite_positiveSlopeRoot_fiber ha hs) hscard + apply hsroots.congr + intro i + simp only [positiveSlopeRoot, norm_neg, norm_inv, Complex.norm_real, + Real.norm_eq_abs, abs_of_pos i.property] + rw [Real.inv_rpow i.property.le, Real.rpow_neg i.property.le, inv_inv] + +/-- In rate notation, every inverse moment above the actual order is +summable. Zero slopes remain excluded before taking reciprocals. -/ +theorem summable_inverse_moment_positiveSlopeRates_of_order + {ι : Type*} {a : ι → ℝ} {c : ℂ} {rho p : ℝ} + (hc : c ≠ 0) (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (horder : TauCeti.OrderLE (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) rho) + (hp : rho < p) : + Summable (fun i : {i // 0 < a i} ↦ ((a i)⁻¹) ^ (-p)) := by + apply (summable_rpow_positive_slopes_of_order hc ha hs horder hp).congr + intro i + rw [Real.inv_rpow i.property.le, Real.rpow_neg i.property.le, inv_inv] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProductLogDerivative.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProductLogDerivative.lean new file mode 100644 index 000000000..a9ee5d84f --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProductLogDerivative.lean @@ -0,0 +1,107 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import TauCeti.Analysis.SpecialFunctions.Complex.Exp.LogDeriv +import RealRooted.Mathlib.Analysis.Complex.LinearProduct +import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalMixtures +import TauCeti.Analysis.Calculus.LogDerivUniformlyOn +import TauCeti.Analysis.Normed.Ring.InfiniteProd + +/-! +# Logarithmic derivatives of positive linear products on the positive axis + +The logarithmic derivative of a convergent product of nonnegative linear +factors is its sum of positive resolvent kernels. The equality holds at every +nonnegative real point, including zero, with repeated slopes counted. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- A nonnegative linear slope cannot give a zero factor at a nonnegative +real argument. -/ +theorem one_add_ofReal_mul_ne_zero {a x : ℝ} (ha : 0 ≤ a) (hx : 0 ≤ x) : + 1 + (a : ℂ) * (x : ℂ) ≠ 0 := by + have h : 0 < 1 + a * x := by positivity + exact_mod_cast h.ne' + +/-- A convergent product of nonnegative linear factors has no zeros on the +nonnegative real axis. -/ +theorem tprod_one_add_ofReal_mul_ne_zero {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) {x : ℝ} (hx : 0 ≤ x) : + (∏' i, (1 + (a i : ℂ) * (x : ℂ))) ≠ 0 := by + have hsum : Summable (fun i ↦ ‖(a i : ℂ) * (x : ℂ)‖) := by + simpa only [norm_mul, norm_real] using hs.norm.mul_right ‖(x : ℂ)‖ + intro hz + obtain ⟨i, hi⟩ := (TauCeti.tprod_one_add_eq_zero_iff hsum).mp hz + exact one_add_ofReal_mul_ne_zero (ha i) hx hi + +/-- The real logarithmic derivative of a positive linear product is the +convergent sum of its resolvent kernels at every nonnegative argument. -/ +theorem re_logDeriv_tprod_one_add {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) {x : ℝ} (hx : 0 ≤ x) : + (logDeriv (fun z : ℂ ↦ ∏' i, (1 + (a i : ℂ) * z)) (x : ℂ)).re = + ∑' i, a i / (1 + a i * x) := by + have hprod := (tendstoLocallyUniformly_prod_one_add a hs).tendstoLocallyUniformlyOn + (s := Set.univ) + have hlog := hprod.sum_logDeriv (V := {(x : ℂ)}) isOpen_univ + (fun i ↦ by fun_prop) (Set.subset_univ _) + (fun i z hz ↦ by + rw [Set.mem_singleton_iff] at hz + subst z + exact one_add_ofReal_mul_ne_zero (ha i) hx) + (fun z hz ↦ by + rw [Set.mem_singleton_iff] at hz + subst z + exact tprod_one_add_ofReal_mul_ne_zero ha hs hx) + have hpoint := hlog.tendsto_at (Set.mem_singleton (x : ℂ)) + have hterms (i : ℕ) : + logDeriv (fun z : ℂ ↦ 1 + (a i : ℂ) * z) (x : ℂ) = + ((a i / (1 + a i * x) : ℝ) : ℂ) := by + simp only [logDeriv_apply, deriv_const_add, deriv_const_mul_id] + norm_cast + simp_rw [hterms] at hpoint + have hsum := TauCeti.summable_const_div_one_add_mul_pow ha ha hs 1 hx + simp only [pow_one] at hsum + have hreal := continuous_ofReal.continuousAt.tendsto.comp hsum.hasSum.tendsto_sum_nat + have hcomplex : Tendsto + (fun n : ℕ ↦ ∑ i ∈ Finset.range n, ((a i / (1 + a i * x) : ℝ) : ℂ)) + atTop (𝓝 ((∑' i, a i / (1 + a i * x) : ℝ) : ℂ)) := by + convert hreal using 1 + funext n + norm_cast + have h := congrArg Complex.re (tendsto_nhds_unique hpoint hcomplex) + simpa only [ofReal_re] using h + +/-- A nonzero complex scalar and a real exponential add only the exponential +constant to the real logarithmic derivative of a nonnegative linear product. -/ +theorem re_logDeriv_exp_linear_product {c : ℂ} (hc : c ≠ 0) + (gamma : ℝ) {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + {x : ℝ} (hx : 0 ≤ x) : + (logDeriv (fun z : ℂ ↦ c * exp ((gamma : ℂ) * z) * + ∏' i, (1 + (a i : ℂ) * z)) (x : ℂ)).re = + gamma + ∑' i, a i / (1 + a i * x) := by + let P : ℂ → ℂ := fun z ↦ ∏' i, (1 + (a i : ℂ) * z) + have hd : Differentiable ℂ P := Complex.differentiable_tprod_one_add_ofReal_mul hs + have hP : P (x : ℂ) ≠ 0 := Complex.tprod_one_add_ofReal_mul_ne_zero ha hs hx + have hlog : logDeriv (fun z : ℂ ↦ c * exp ((gamma : ℂ) * z) * P z) (x : ℂ) = + (gamma : ℂ) + logDeriv P (x : ℂ) := by + rw [show (fun z : ℂ ↦ c * exp ((gamma : ℂ) * z) * P z) = + (fun z ↦ c * (exp ((gamma : ℂ) * z) * P z)) by funext z; ring] + rw [logDeriv_const_mul _ _ hc, + TauCeti.logDeriv_cexp_mul hP (hd (x : ℂ)) (by fun_prop), deriv_const_mul_id] + rw [hlog, Complex.add_re, Complex.ofReal_re] + exact congrArg (fun y : ℝ ↦ gamma + y) (Complex.re_logDeriv_tprod_one_add ha hs hx) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProductLowerBound.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProductLowerBound.lean new file mode 100644 index 000000000..1c7adf8d4 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProductLowerBound.lean @@ -0,0 +1,71 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import Mathlib.Analysis.Complex.Exponential +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Analysis.Complex.SubexponentialLowerBound +import Mathlib.Topology.Algebra.InfiniteSum.Field +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# Positive linear products and their exponential factors + +Nonnegative slopes give a product with norm at least one in the right +half-plane. Hence an entire product of order below one cannot have a +positive real exponential factor. No summability or entire-function +hypothesis is needed beyond the stated growth bound for this obstruction. +-/ + +public section + +open Asymptotics Filter Topology + +namespace Complex + +/-- A product of nonnegative real linear slopes has norm at least one on +the closed right half-plane. The totalized nonmultipliable case also equals one. -/ +theorem one_le_norm_tprod_one_add_ofReal_mul {ι : Type*} {a : ι → ℝ} + (ha : ∀ i, 0 ≤ a i) {z : ℂ} (hz : 0 ≤ z.re) : + 1 ≤ ‖∏' i, (1 + (a i : ℂ) * z)‖ := by + by_cases hm : Multipliable (fun i ↦ (1 + (a i : ℂ) * z)) + · apply ge_of_tendsto' hm.hasProd.norm + intro s + calc (1 : ℝ) = ∏ i ∈ s, (1 : ℝ) := by simp + _ ≤ ∏ i ∈ s, ‖1 + (a i : ℂ) * z‖ := by + apply Finset.prod_le_prod₀ (fun _ _ ↦ zero_le_one) + intro i _ + apply le_trans _ (Complex.re_le_norm _) + simp only [add_re, one_re, re_ofReal_mul] + exact le_add_of_nonneg_right (mul_nonneg (ha i) hz) + · rw [tprod_eq_one_of_not_multipliable hm, norm_one] + +/-- A nonnegative real exponential factor in a positive linear product +must vanish if the product has growth order strictly below one. -/ +theorem eq_zero_of_exp_tprod_order_lt_one {ι : Type*} {a : ι → ℝ} + {c : ℂ} {gamma rho : ℝ} (hc : c ≠ 0) (ha : ∀ i, 0 ≤ a i) + (hg : 0 ≤ gamma) + (horder : TauCeti.OrderLE (fun z : ℂ ↦ c * exp ((gamma : ℂ) * z) * + ∏' i, (1 + (a i : ℂ) * z)) rho) (hrho : rho < 1) : gamma = 0 := by + apply le_antisymm _ hg + by_contra h + have hgpos : 0 < gamma := lt_of_not_ge h + apply horder.not_isBigO_exp_mul_real hrho hgpos + apply Asymptotics.IsBigO.of_bound ‖c‖⁻¹ + filter_upwards [eventually_ge_atTop (0 : ℝ)] with x hx + have hP := one_le_norm_tprod_one_add_ofReal_mul ha (z := (x : ℂ)) hx + have hcn : ‖c‖ ≠ 0 := norm_ne_zero_iff.mpr hc + rw [Real.norm_eq_abs, Real.abs_exp, norm_mul, norm_mul, norm_exp] + simp only [mul_re, ofReal_re, ofReal_im, mul_zero, sub_zero] + calc Real.exp (gamma * x) + ≤ Real.exp (gamma * x) * ‖∏' i, (1 + (a i : ℂ) * (x : ℂ))‖ := + le_mul_of_one_le_right (Real.exp_nonneg _) hP + _ = _ := by + field_simp [hcn] + simp only [mul_comm] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProductNonpolynomial.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProductNonpolynomial.lean new file mode 100644 index 000000000..efbf0db78 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProductNonpolynomial.lean @@ -0,0 +1,45 @@ +/- +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.Complex.Basic +public import Mathlib.Algebra.Polynomial.Eval.Defs +import Mathlib.Algebra.Polynomial.Roots + +/-! +# Distinct nonzero slopes force a nonpolynomial linear product +-/ + +public section + +open Polynomial + +namespace Complex + +/-- Infinitely many distinct nonzero linear factors force the product to +be nonpolynomial. The value at zero excludes the zero polynomial. -/ +theorem tprod_one_add_ne_polynomial_of_injective {a : ℕ → ℝ} + (ha : Function.Injective a) (ha0 : ∀ n, a n ≠ 0) (P : ℂ[X]) : + (fun z : ℂ ↦ ∏' n, (1 + (a n : ℂ) * z)) ≠ fun z ↦ P.eval z := by + intro heq + let r : ℕ → ℂ := fun n ↦ -(a n : ℂ)⁻¹ + have hr : Function.Injective r := by + intro n m h + apply ha + exact Complex.ofReal_injective (inv_injective (neg_injective h)) + have hz (n : ℕ) : P.IsRoot (r n) := by + change P.eval (r n) = 0 + rw [← congrFun heq (r n)] + apply tprod_of_exists_eq_zero + refine ⟨n, ?_⟩ + have hn : (a n : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr (ha0 n) + simp [r, hn] + have hP : P = 0 := P.eq_zero_of_infinite_isRoot + ((Set.infinite_range_of_injective hr).mono (by rintro _ ⟨n, rfl⟩; exact hz n)) + have hzero := congrFun heq 0 + simp [hP] at hzero + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LinearProductPrefix.lean b/RealRooted/Mathlib/Analysis/Complex/LinearProductPrefix.lean new file mode 100644 index 000000000..6fb39918f --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LinearProductPrefix.lean @@ -0,0 +1,70 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.OfBound +import TauCeti.Analysis.Normed.Ring.InfiniteProd + +/-! +# Prefixes and growth of real linear canonical products + +These identities keep the canonical product totalization visible. Summability +supplies actual convergence for the prefix factorization and growth estimate. +-/ + +public section + +open Polynomial + +namespace Complex + +/-- Summable signed real slopes give an entire product of order at most one. -/ +theorem orderLE_tprod_one_add_ofReal_mul {a : ℕ → ℝ} (ha : Summable a) : + TauCeti.OrderLE (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) 1 := by + apply TauCeti.orderLE_of_norm_le_mul_exp_rpow (B := 1) (C := ∑' j, ‖a j‖) + intro z + have hs : Summable (fun j => ‖(a j : ℂ) * z‖) := by + simpa only [norm_mul, norm_real] using ha.norm.mul_right ‖z‖ + simpa only [norm_mul, norm_real, tsum_mul_right, Real.rpow_one, one_mul] using + TauCeti.norm_tprod_one_add_le_exp_tsum hs + +/-- A finite prefix factors from the actual convergent product, even at a zero. -/ +theorem tprod_one_add_eq_prefix_mul_tail {a : ℕ → ℝ} (ha : Summable a) (n : ℕ) : + (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) = + fun z => ((∏ j ∈ Finset.range n, (1 + C (a j) * X : ℝ[X])).map ofRealHom).eval z * + ∏' j : ℕ, (1 + (a (j + n) : ℂ) * z) := by + ext z + have ht := (hasProdLocallyUniformlyOn_one_add_ofReal_mul + ((summable_nat_add_iff n).mpr ha)).hasProd (Set.mem_univ z) + have h := ht.multipliable.prod_mul_tprod_nat_mul' + (f := fun j => (1 + (a j : ℂ) * z)) (k := n) + simpa only [Polynomial.map_prod, Polynomial.map_add, Polynomial.map_one, + Polynomial.map_mul, Polynomial.map_C, Polynomial.map_X, eval_prod, eval_add, + eval_one, eval_mul, eval_C, eval_X, ofRealHom_eq_coe] using h.symm + +/-- If a linear product is not a polynomial, its nonzero slopes have infinite +support. Finite and empty supports give finite polynomial products. -/ +theorem infinite_support_of_tprod_ne_polynomial {a : ℕ → ℝ} + (hpoly : ∀ p : ℂ[X], + (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) ≠ fun z => p.eval z) : + (Function.support a).Infinite := by + classical + intro hfin + let s := hfin.toFinset + let P : ℂ[X] := ∏ j ∈ s, (1 + C (a j : ℂ) * X) + apply hpoly P + ext z + rw [tprod_eq_prod (s := s)] + · simp only [P, eval_prod, eval_add, eval_one, eval_mul, eval_C, eval_X] + · intro j hj + have hj' : a j = 0 := by + by_contra h + exact hj (hfin.mem_toFinset.mpr h) + simp only [hj', ofReal_zero, zero_mul, add_zero] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/LocallyUniformIteratedDeriv.lean b/RealRooted/Mathlib/Analysis/Complex/LocallyUniformIteratedDeriv.lean new file mode 100644 index 000000000..f3b77ef26 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LocallyUniformIteratedDeriv.lean @@ -0,0 +1,34 @@ +/- +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 +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.LocallyUniformLimit + +/-! +# Iterated derivatives of local limits of entire functions +-/ + +public section + +open Filter + +/-- Iterated derivatives of entire functions converge locally uniformly on +any open set on which the original functions converge locally uniformly. -/ +theorem TendstoLocallyUniformlyOn.iteratedDeriv_of_entire + {ι E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + {F : ι → ℂ → E} {f : ℂ → E} {l : Filter ι} {U : Set ℂ} + (h : TendstoLocallyUniformlyOn F f l U) + (hd : ∀ᶠ i in l, Differentiable ℂ (F i)) (hU : IsOpen U) (n : ℕ) : + TendstoLocallyUniformlyOn (fun i => iteratedDeriv n (F i)) (iteratedDeriv n f) l U := by + induction n with + | zero => simpa using h + | succ n ih => + simp only [iteratedDeriv_succ] + exact ih.deriv (hd.mono fun i hi => + ((hi.contDiff (n := ⊤)).differentiable_iteratedDeriv n + (WithTop.coe_lt_top _)).differentiableOn) hU diff --git a/RealRooted/Mathlib/Analysis/Complex/LogDerivPowMul.lean b/RealRooted/Mathlib/Analysis/Complex/LogDerivPowMul.lean new file mode 100644 index 000000000..3402e83c4 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/LogDerivPowMul.lean @@ -0,0 +1,84 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.Mathlib.Analysis.CompletelyMonotone.ReciprocalHierarchy +public import TauCeti.Analysis.CompletelyMonotone.Basic +import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Calculus.FDeriv.Pow + +/-! +# Logarithmic derivatives after inserting an origin zero + +Multiplication by `z^r` adds `r/x` to the real logarithmic derivative +on the positive axis. The signed derivative and two-index Rodrigues +formulas record this contribution with its exact factorial and domain. +-/ + +public section + +open Filter Topology +open scoped ContDiff + +namespace Complex + +/-- A power at the origin contributes its multiplicity divided by the +positive argument to the real logarithmic derivative. -/ +theorem re_logDeriv_pow_mul {g : ℂ → ℂ} (hg : Differentiable ℂ g) + (r : ℕ) {x : ℝ} (hx : x ≠ 0) (hgz : g (x : ℂ) ≠ 0) : + (logDeriv (fun z : ℂ ↦ z ^ r * g z) (x : ℂ)).re = + (r : ℝ) / x + (logDeriv g (x : ℂ)).re := by + have hxc : (x : ℂ) ≠ 0 := by exact_mod_cast hx + have hp : DifferentiableAt ℂ (fun z : ℂ ↦ z ^ r) (x : ℂ) := + differentiableAt_id.pow r + rw [logDeriv_fun_mul (f := fun z : ℂ ↦ z ^ r) (g := g) (x : ℂ) + (pow_ne_zero r hxc) hgz hp (hg _), logDeriv_pow, add_re] + simp only [div_ofReal_re, natCast_re] + +/-- Ordinary real logarithmic derivatives after inserting an origin zero +have the expected factorial reciprocal correction. -/ +theorem signed_iteratedDeriv_re_logDeriv_pow_mul {g : ℂ → ℂ} + (hg : Differentiable ℂ g) (hn : ∀ x : ℝ, 0 < x → g (x : ℂ) ≠ 0) + (hL : ContDiffOn ℝ ∞ (fun y : ℝ ↦ (logDeriv g (y : ℂ)).re) (Set.Ioi 0)) + (r m : ℕ) {x : ℝ} (hx : 0 < x) : + (-1 : ℝ) ^ m * iteratedDeriv m + (fun y : ℝ ↦ (logDeriv (fun z : ℂ ↦ z ^ r * g z) (y : ℂ)).re) x = + (r : ℝ) * (m.factorial : ℝ) / x ^ (m + 1) + + (-1 : ℝ) ^ m * iteratedDeriv m (fun y : ℝ ↦ (logDeriv g (y : ℂ)).re) x := by + have heq : (fun y : ℝ ↦ (logDeriv (fun z : ℂ ↦ z ^ r * g z) (y : ℂ)).re) + =ᶠ[𝓝 x] (fun y : ℝ ↦ (r : ℝ) / y + (logDeriv g (y : ℂ)).re) := by + filter_upwards [isOpen_Ioi.mem_nhds hx] with y hy + exact re_logDeriv_pow_mul hg r hy.ne' (hn y hy) + rw [heq.iteratedDeriv_eq m] + exact Real.signed_iteratedDeriv_const_div_add hL r m hx + +/-- Inserting a zero at the origin changes only row zero of the signed +Rodrigues hierarchy whenever the original logarithmic derivative is CM. -/ +theorem weighted_iteratedDeriv_re_logDeriv_pow_mul {g : ℂ → ℂ} + (hg : Differentiable ℂ g) (hn : ∀ x : ℝ, 0 < x → g (x : ℂ) ≠ 0) + (hL : TauCeti.IsCompletelyMonotoneOnIoi (fun y : ℝ ↦ (logDeriv g (y : ℂ)).re)) + (r m k : ℕ) {x : ℝ} (hx : 0 < x) : + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun v : ℝ ↦ + (logDeriv (fun z : ℂ ↦ z ^ r * g z) (v : ℂ)).re) y) x = + (if k = 0 then (r : ℝ) * (m.factorial : ℝ) / x ^ (m + 1) else 0) + + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun v : ℝ ↦ (logDeriv g (v : ℂ)).re) y) x := by + have heq : (fun y : ℝ ↦ (logDeriv (fun z : ℂ ↦ z ^ r * g z) (y : ℂ)).re) + =ᶠ[𝓝 x] (fun y : ℝ ↦ (r : ℝ) / y + (logDeriv g (y : ℂ)).re) := by + filter_upwards [isOpen_Ioi.mem_nhds hx] with y hy + exact re_logDeriv_pow_mul hg r hy.ne' (hn y hy) + have hmul : (fun y : ℝ ↦ y ^ (k + m) * iteratedDeriv m + (fun v : ℝ ↦ (logDeriv (fun z : ℂ ↦ z ^ r * g z) (v : ℂ)).re) y) + =ᶠ[𝓝 x] (fun y : ℝ ↦ y ^ (k + m) * iteratedDeriv m + (fun v : ℝ ↦ (r : ℝ) / v + (logDeriv g (v : ℂ)).re) y) := + (heq.iteratedDeriv m).mono fun y hy ↦ congrArg (y ^ (k + m) * ·) hy + rw [hmul.iteratedDeriv_eq k] + exact Real.weighted_iteratedDeriv_const_div_add hL r m k hx + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/OriginFactor.lean b/RealRooted/Mathlib/Analysis/Complex/OriginFactor.lean new file mode 100644 index 000000000..8fdfe095a --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/OriginFactor.lean @@ -0,0 +1,67 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.MulPow +import Mathlib.Analysis.Complex.TaylorSeries +import Mathlib.Topology.Separation.Regular + +/-! +# Reality and Taylor signs after removing monomial factors + +Conjugation symmetry descends through a power of a real linear factor +by cancellation off its center and continuity at the center. Removing +a power at zero preserves nonnegative real Taylor derivatives, since +the shifted derivative differs by a positive binomial-factorial factor. +-/ + +public section + +open scoped ComplexConjugate + +namespace Complex + +/-- Conjugation symmetry descends through a real monomial factor. -/ +theorem conj_of_real_pow_mul {f g : ℂ → ℂ} {r : ℝ} {m : ℕ} + (hg : Continuous g) (hf : ∀ z, f (conj z) = conj (f z)) + (hfactor : ∀ z, f z = (z - r) ^ m * g z) : + ∀ z, g (conj z) = conj (g z) := by + have heq : (fun z ↦ g (conj z)) = fun z ↦ conj (g z) := by + apply Continuous.ext_on (dense_compl_singleton (r : ℂ)) + (hg.comp continuous_conj) (continuous_conj.comp hg) + intro z hz + have hzr : z ≠ (r : ℂ) := by simpa using hz + have hconjne : conj z - (r : ℂ) ≠ 0 := by + intro hzero + have h := congrArg conj (sub_eq_zero.mp hzero) + exact hzr (by simpa using h) + have h := hf z + rw [hfactor, hfactor] at h + simp only [map_mul, map_pow, map_sub, conj_ofReal] at h + exact mul_left_cancel₀ (pow_ne_zero _ hconjne) h + exact fun z ↦ congrFun heq z + +/-- Dividing an entire function by an origin monomial preserves +nonnegativity of its real Taylor derivatives. -/ +theorem re_iteratedDeriv_nonneg_of_pow_mul {f g : ℂ → ℂ} {m : ℕ} + (hg : Differentiable ℂ g) (hfactor : ∀ z : ℂ, f z = z ^ m * g z) + (hpos : ∀ n : ℕ, 0 ≤ (iteratedDeriv n f 0).re) (n : ℕ) : + 0 ≤ (iteratedDeriv n g 0).re := by + have heq : f = fun z : ℂ ↦ z ^ m * g z := funext hfactor + have hcoeff : (iteratedDeriv (m + n) f 0).re = + ((m + n).choose m : ℝ) * (m.factorial : ℝ) * (iteratedDeriv n g 0).re := by + rw [heq, iteratedDeriv_pow_mul_zero hg.contDiff.contDiffAt] + simp only [Nat.add_sub_cancel_left, mul_re, mul_im, natCast_re, natCast_im, + zero_mul, mul_zero, zero_add, sub_zero] + have hc : 0 < ((m + n).choose m : ℝ) := by + exact_mod_cast Nat.choose_pos (Nat.le_add_right m n) + have h := hpos (m + n) + rw [hcoeff] at h + exact nonneg_of_mul_nonneg_right h (mul_pos hc (by positivity)) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/PartialFractions.lean b/RealRooted/Mathlib/Analysis/Complex/PartialFractions.lean new file mode 100644 index 000000000..f684f5c5f --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/PartialFractions.lean @@ -0,0 +1,43 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Algebra.BigOperators.Finprod +import Mathlib.Tactic.Ring + +/-! +# Partial-fraction bounds away from the support + +A finite sum of simple-pole terms with nonnegative integer multiplicities is bounded by +the total multiplicity divided by the distance from its support. This applies to polynomial +logarithmic derivatives and local divisor sums of analytic functions. +-/ + +public section + +namespace Complex + +/-- A separated finite partial-fraction sum is bounded by total multiplicity over separation. -/ +theorem norm_finsum_intCast_div_sub_le {D : ℂ → ℤ} (hfin : Function.HasFiniteSupport D) + (hnonneg : ∀ ρ, 0 ≤ D ρ) {s : ℂ} {δ : ℝ} (hδ : 0 < δ) + (hsep : ∀ ρ ∈ Function.support D, δ ≤ ‖s - ρ‖) : + ‖∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ ≤ δ⁻¹ * ((∑ᶠ ρ, D ρ : ℤ) : ℝ) := by + classical + have hsub : Function.support (fun ρ ↦ (D ρ : ℂ) / (s - ρ)) ⊆ hfin.toFinset := by + intro ρ hρ + exact hfin.mem_toFinset.mpr fun h ↦ hρ (by simp [h]) + rw [finsum_eq_sum_of_support_subset _ hsub, finsum_eq_sum D hfin, + Int.cast_sum, Finset.mul_sum] + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun ρ hρ ↦ ?_) + have hDρ : 0 ≤ (D ρ : ℝ) := Int.cast_nonneg (hnonneg ρ) + rw [norm_div, Complex.norm_intCast, abs_of_nonneg hDρ] + calc + (D ρ : ℝ) / ‖s - ρ‖ ≤ (D ρ : ℝ) / δ := + div_le_div_of_nonneg_left hDρ hδ (hsep ρ (hfin.mem_toFinset.mp hρ)) + _ = δ⁻¹ * (D ρ : ℝ) := by ring + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/Pick/Atoms.lean b/RealRooted/Mathlib/Analysis/Complex/Pick/Atoms.lean new file mode 100644 index 000000000..1bc068850 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/Pick/Atoms.lean @@ -0,0 +1,132 @@ +/- +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 TauCeti.Analysis.Complex.Pick.Nevanlinna + +/-! +# Atoms of a Nevanlinna measure + +The vertical boundary limit of the imaginary part of a Nevanlinna integral +recovers the mass at a real point. Only finiteness of the measure is required; +its support may be arbitrary. +-/ + +public section + +open Complex Filter MeasureTheory Set Topology + +namespace TauCeti + +/-- The scaled imaginary kernel in real coordinates. -/ +private theorem mul_im_nevanlinnaKernel (r y x : ℝ) : + y * (nevanlinnaKernel ((r : ℂ) + (y : ℂ) * I) x).im = + y ^ 2 * (1 + x ^ 2) / ((x - r) ^ 2 + y ^ 2) := by + rw [nevanlinnaKernel_im] + simp only [add_im, ofReal_im, mul_im, ofReal_re, I_im, I_re, mul_one, mul_zero, + add_zero, zero_add, normSq_apply, sub_re, add_re, mul_re, zero_sub, sub_im] + ring + +/-- A constant bound for the scaled imaginary kernel near the real axis. -/ +private theorem norm_mul_im_nevanlinnaKernel_le (r x : ℝ) {y : ℝ} + (hy : 0 < y) (hy1 : y ≤ 1) : + ‖y * (nevanlinnaKernel ((r : ℂ) + (y : ℂ) * I) x).im‖ ≤ 4 + 2 * r ^ 2 := by + rw [mul_im_nevanlinnaKernel, Real.norm_of_nonneg (by positivity), + div_le_iff₀ (by positivity : 0 < (x - r) ^ 2 + y ^ 2)] + have hy2 : y ^ 2 ≤ 1 := by nlinarith + have hx2 : x ^ 2 ≤ 2 * (x - r) ^ 2 + 2 * r ^ 2 := by nlinarith [sq_nonneg (x - 2 * r)] + have hmul := mul_le_mul_of_nonneg_left hx2 (sq_nonneg y) + have hdrop := mul_le_mul_of_nonneg_left hy2 (sq_nonneg (x - r)) + nlinarith [mul_nonneg (sq_nonneg r) (sq_nonneg (x - r)), sq_nonneg (x - r)] + +/-- Away from its boundary point the scaled imaginary kernel tends to zero. -/ +private theorem tendsto_mul_im_nevanlinnaKernel (r x : ℝ) : + Tendsto (fun y : ℝ => y * (nevanlinnaKernel ((r : ℂ) + (y : ℂ) * I) x).im) + (𝓝[>] (0 : ℝ)) (𝓝 (if x = r then 1 + r ^ 2 else 0)) := by + simp only [mul_im_nevanlinnaKernel] + by_cases hx : x = r + · subst x + simp only [ite_true] + apply tendsto_const_nhds.congr' + filter_upwards [self_mem_nhdsWithin] with y hy + have hy0 : y ≠ 0 := ne_of_gt hy + simp [hy0] + · simp only [ite_eq_right hx] + have hden : (x - r) ^ 2 + (0 : ℝ) ^ 2 ≠ 0 := by + simpa using pow_ne_zero 2 (sub_ne_zero.mpr hx) + have h := (((tendsto_id : Tendsto (fun y : ℝ => y) (𝓝[>] (0 : ℝ)) + (𝓝[>] (0 : ℝ))).mono_right nhdsWithin_le_nhds).pow 2).mul_const (1 + x ^ 2) + have hd := (tendsto_const_nhds (x := (x - r) ^ 2)).add + (((tendsto_id : Tendsto (fun y : ℝ => y) (𝓝[>] (0 : ℝ)) + (𝓝[>] (0 : ℝ))).mono_right nhdsWithin_le_nhds).pow 2) + convert h.div hd hden using 1 + · ext y + rfl + · simp + +/-- The vertical imaginary-part boundary limit of a finite Nevanlinna integral +recovers its atom at the boundary point. -/ +theorem tendsto_mul_im_nevanlinna (mu : Measure ℝ) [IsFiniteMeasure mu] (r : ℝ) : + Tendsto (fun y : ℝ => y * + (∫ x, nevanlinnaKernel ((r : ℂ) + (y : ℂ) * I) x ∂mu).im) + (𝓝[>] (0 : ℝ)) (𝓝 ((1 + r ^ 2) * mu.real {r})) := by + have hlim := tendsto_integral_filter_of_norm_le_const + (μ := mu) (l := 𝓝[>] (0 : ℝ)) (F := fun y x : ℝ => y * + (nevanlinnaKernel ((r : ℂ) + (y : ℂ) * I) x).im) + (f := fun x : ℝ => if x = r then 1 + r ^ 2 else 0) ?_ ?_ ?_ + · have heq : (∫ x : ℝ, (if x = r then 1 + r ^ 2 else 0) ∂mu) = + (1 + r ^ 2) * mu.real {r} := by + have heqfun : (fun x : ℝ => if x = r then 1 + r ^ 2 else 0) = + Set.indicator {r} (fun _ : ℝ => 1 + r ^ 2) := by + ext x + by_cases hx : x = r + · simp [hx] + · simp [Set.indicator, hx] + rw [heqfun, integral_indicator (measurableSet_singleton r)] + simp [mul_comm, Measure.real] + rw [heq] at hlim + apply hlim.congr' + filter_upwards [self_mem_nhdsWithin] with y hy + have hmem : (r : ℂ) + (y : ℂ) * I ∈ UpperHalfPlane.upperHalfPlaneSet := by + simpa [UpperHalfPlane.upperHalfPlaneSet] using hy + have hint := integrable_nevanlinnaKernel hmem mu + rw [integral_const_mul] + congr 1 + simpa using Complex.imCLM.integral_comp_comm hint + · filter_upwards [self_mem_nhdsWithin] with y hy + have him : ((r : ℂ) + (y : ℂ) * I).im ≠ 0 := by simpa using ne_of_gt hy + exact (continuous_const.mul + (Complex.continuous_im.comp (continuous_nevanlinnaKernel him))).aestronglyMeasurable + · refine ⟨4 + 2 * r ^ 2, ?_⟩ + filter_upwards [self_mem_nhdsWithin, + nhdsWithin_le_nhds (eventually_lt_nhds (by norm_num : (0 : ℝ) < 1))] with y hy hy1 + exact Filter.Eventually.of_forall fun x => norm_mul_im_nevanlinnaKernel_le r x hy hy1.le + · exact Filter.Eventually.of_forall fun x => tendsto_mul_im_nevanlinnaKernel r x + +/-- A real affine term does not change the atom recovered from a Nevanlinna +representation. No sign condition on the linear coefficient is needed. -/ +theorem tendsto_mul_im_of_eq_nevanlinnaKernel_add + {F : ℂ → ℂ} (mu : Measure ℝ) [IsFiniteMeasure mu] (b c r : ℝ) + (hrep : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + F z = (b : ℂ) * z + ∫ x, nevanlinnaKernel z x ∂mu + c) : + Tendsto (fun y : ℝ => y * (F ((r : ℂ) + (y : ℂ) * I)).im) + (𝓝[>] (0 : ℝ)) (𝓝 ((1 + r ^ 2) * mu.real {r})) := by + have hid : Tendsto (fun y : ℝ => y) (𝓝[>] (0 : ℝ)) (𝓝 (0 : ℝ)) := + tendsto_id.mono_right nhdsWithin_le_nhds + have hlin : Tendsto (fun y : ℝ => b * y ^ 2) (𝓝[>] (0 : ℝ)) (𝓝 (0 : ℝ)) := by + simpa using (hid.pow 2).const_mul b + have h := hlin.add (tendsto_mul_im_nevanlinna mu r) + simp only [zero_add] at h + apply h.congr' + filter_upwards [self_mem_nhdsWithin] with y hy + have hmem : (r : ℂ) + (y : ℂ) * I ∈ UpperHalfPlane.upperHalfPlaneSet := by + simpa [UpperHalfPlane.upperHalfPlaneSet] using hy + rw [hrep _ hmem] + simp only [add_im, mul_im, ofReal_re, ofReal_im, mul_zero, zero_mul, zero_add, + add_zero, I_im, mul_one, I_re] + ring + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/Pick/Support.lean b/RealRooted/Mathlib/Analysis/Complex/Pick/Support.lean new file mode 100644 index 000000000..5dc5766e1 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/Pick/Support.lean @@ -0,0 +1,65 @@ +/- +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 TauCeti.Analysis.Complex.Pick.Nevanlinna +public import Mathlib.MeasureTheory.Measure.Support +import TauCeti.Analysis.Complex.Pick.Boundary + +/-! +# Support of Nevanlinna measures at real singularities + +Analytic continuation across a real boundary point, with real boundary values, +excludes that point from the support of the representing measure. +-/ + +public section + +open Complex Filter MeasureTheory Set Topology + +namespace TauCeti + +/-- A Nevanlinna measure has no support at a point where the represented function +extends analytically and is real on the real axis. -/ +theorem notMem_support_of_nevanlinna_of_analyticAt {F : ℂ → ℂ} {μ : Measure ℝ} + [IsFiniteMeasure μ] {b c r : ℝ} + (hrep : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + F z = (b : ℂ) * z + ∫ x, nevanlinnaKernel z x ∂μ + c) + (hF : AnalyticAt ℂ F (r : ℂ)) (hreal : ∀ x : ℝ, (F x).im = 0) : + r ∉ μ.support := by + obtain ⟨ε, hε, hball⟩ := hF.exists_ball_analyticOnNhd + have hδ : 0 < ε / 4 := by positivity + have hsub : (Icc (r - ε / 4) (r + ε / 4) ×ℂ Icc 0 (ε / 4) : Set ℂ) ⊆ + Metric.ball (r : ℂ) ε := by + intro z hz + rw [Metric.mem_ball, dist_eq] + apply lt_of_le_of_lt (norm_le_abs_re_add_abs_im _) + simp only [sub_re, ofReal_re, sub_im, ofReal_im, sub_zero] + have hx : |z.re - r| ≤ ε / 4 := abs_le.mpr ⟨by linarith [hz.1.1], + by linarith [hz.1.2]⟩ + rw [abs_of_nonneg hz.2.1] + linarith [hz.2.2] + have hcont : ContinuousOn (fun z => (F z).im) + (Icc (r - ε / 4) (r + ε / 4) ×ℂ Icc 0 (ε / 4)) := by + exact continuous_im.comp_continuousOn (hball.continuousOn.mono hsub) + have hzero := measure_Icc_eq_zero_of_eq_nevanlinnaKernel_add hrep + (by linarith : r - ε / 4 < r + ε / 4) hδ hcont (fun x _ => hreal x) + exact Measure.notMem_support_iff_exists.mpr + ⟨Icc (r - ε / 4) (r + ε / 4), Icc_mem_nhds (by linarith) (by linarith), hzero⟩ + +/-- The support of a Nevanlinna measure lies in any real exceptional set outside +which the represented function extends analytically with real boundary values. -/ +theorem support_subset_of_nevanlinna_of_analyticAt {F : ℂ → ℂ} {μ : Measure ℝ} + [IsFiniteMeasure μ] {b c : ℝ} {s : Set ℝ} + (hrep : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + F z = (b : ℂ) * z + ∫ x, nevanlinnaKernel z x ∂μ + c) + (hF : ∀ r ∉ s, AnalyticAt ℂ F (r : ℂ)) (hreal : ∀ x : ℝ, (F x).im = 0) : + μ.support ⊆ s := by + intro r hr + by_contra hrs + exact notMem_support_of_nevanlinna_of_analyticAt hrep (hF r hrs) hreal hr + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/Polynomial/CoefficientMajorant.lean b/RealRooted/Mathlib/Analysis/Complex/Polynomial/CoefficientMajorant.lean new file mode 100644 index 000000000..59ba7c2af --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/Polynomial/CoefficientMajorant.lean @@ -0,0 +1,38 @@ +/- +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.Complex.Norm +public import Mathlib.Algebra.Polynomial.Eval.Defs +import Mathlib.Analysis.Complex.Basic + +/-! +# Nonnegative coefficient majorants on complex disks +-/ + +public section + +open Complex + +namespace Polynomial + +/-- A real polynomial with nonnegative coefficients is a radial majorant for +its own complexification on every closed disk. -/ +theorem norm_eval_map_le_of_coeff_nonneg {p : ℝ[X]} (hp : ∀ k, 0 ≤ p.coeff k) + {z : ℂ} {R : ℝ} (hz : ‖z‖ ≤ R) : + ‖(p.map ofRealHom).eval z‖ ≤ p.eval R := by + rw [Polynomial.eval_map, Polynomial.eval₂_eq_sum, Polynomial.eval_eq_sum, + Polynomial.sum_def, Polynomial.sum_def] + calc + _ ≤ ∑ k ∈ p.support, ‖ofRealHom (p.coeff k) * z ^ k‖ := norm_sum_le _ _ + _ ≤ ∑ k ∈ p.support, p.coeff k * R ^ k := by + apply Finset.sum_le_sum + intro k _ + simp only [norm_mul, ofRealHom_eq_coe, norm_real, Real.norm_of_nonneg (hp k), norm_pow] + exact mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ (norm_nonneg z) hz k) (hp k) + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Complex/PolynomialLimitCoeff.lean b/RealRooted/Mathlib/Analysis/Complex/PolynomialLimitCoeff.lean index b6fb29904..5bc6493e5 100644 --- a/RealRooted/Mathlib/Analysis/Complex/PolynomialLimitCoeff.lean +++ b/RealRooted/Mathlib/Analysis/Complex/PolynomialLimitCoeff.lean @@ -6,9 +6,9 @@ Authors: Per Alexandersson module import Mathlib.Analysis.Complex.LocallyUniformLimit -public import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas import Mathlib.Analysis.Calculus.Deriv.Polynomial -public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.Basic public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs public import Mathlib.Analysis.InnerProductSpace.Basic public import Mathlib.Algebra.Polynomial.Derivative @@ -62,6 +62,26 @@ theorem TendstoLocallyUniformly.iteratedDeriv {F : ℕ → ℂ → ℂ} {f : ℂ namespace Polynomial +/-- Locally uniform convergence of real polynomials on the complex plane implies +pointwise convergence of every formal derivative at every real point. -/ +theorem tendsto_eval_iterate_derivative_of_tendstoLocallyUniformly + {p : ℕ → ℝ[X]} {f : ℂ → ℂ} + (hf : TendstoLocallyUniformly + (fun n (z : ℂ) => ((p n).map Complex.ofRealHom).eval z) f atTop) (k : ℕ) (x : ℝ) : + Tendsto (fun n => (derivative^[k] (p n)).eval x) atTop + (𝓝 (iteratedDeriv k f x).re) := by + have hd : ∀ n, Differentiable ℂ fun z : ℂ => ((p n).map Complex.ofRealHom).eval z := + fun n => ((p n).map Complex.ofRealHom).differentiable + have h := (tendstoLocallyUniformlyOn_univ.mpr (hf.iteratedDeriv hd k)).tendsto_at + (Set.mem_univ (x : ℂ)) + simp only [iteratedDeriv_fun_eval, iterate_derivative_map] at h + have hre := Complex.continuous_re.tendsto _ |>.comp h + have he (q : ℝ[X]) : ((q.map Complex.ofRealHom).eval (x : ℂ)).re = q.eval x := by + change ((q.map Complex.ofRealHom).eval (Complex.ofRealHom x)).re = _ + rw [eval_map_apply] + rfl + simpa only [Function.comp_def, he] using hre + /-- If real polynomials converge locally uniformly on `ℂ` to `f`, then their `k`-th coefficients converge (in `ℂ`) to the `k`-th Taylor coefficient of `f` at `0`. -/ theorem tendsto_coeff_ofReal_of_tendstoLocallyUniformly {p : ℕ → ℝ[X]} {f : ℂ → ℂ} diff --git a/RealRooted/Mathlib/Analysis/Complex/PositiveSlopeRoots.lean b/RealRooted/Mathlib/Analysis/Complex/PositiveSlopeRoots.lean new file mode 100644 index 000000000..b7444a14d --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/PositiveSlopeRoots.lean @@ -0,0 +1,85 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Meromorphic.Divisor +public import Mathlib.Analysis.Complex.Basic +import RealRooted.Mathlib.Analysis.Complex.LinearProductDivisor +import Mathlib.Tactic.Ring + +/-! +# Positive slopes and native zero multiplicities + +The root of a positive linear factor is its negative reciprocal. The +fiber of this root map is equivalent to the vanishing-factor fiber, so +its finite cardinality is exactly the native divisor multiplicity. +-/ + +public section + +namespace Complex + +/-- The zero represented by one strictly positive linear-product slope. -/ +@[expose] noncomputable def positiveSlopeRoot {ι : Type*} (a : ι → ℝ) + (i : {i // 0 < a i}) : ℂ := -((a i : ℂ)⁻¹) + +/-- The spectral rate of a positive linear factor is the reciprocal slope. -/ +@[simp] theorem norm_positiveSlopeRoot {ι : Type*} {a : ι → ℝ} + (i : {i // 0 < a i}) : ‖positiveSlopeRoot a i‖ = (a i)⁻¹ := by + simp only [positiveSlopeRoot, norm_neg, norm_inv, Complex.norm_real, + Real.norm_eq_abs, abs_of_pos i.property] + +private theorem one_add_mul_eq_zero_iff_eq_neg_inv {a z : ℂ} (ha : a ≠ 0) : + 1 + a * z = 0 ↔ z = -a⁻¹ := by + constructor + · intro hz + have hmul : a * z = -1 := eq_neg_of_add_eq_zero_right hz + calc z = a⁻¹ * (a * z) := (inv_mul_cancel_left₀ ha z).symm + _ = -a⁻¹ := by rw [hmul, mul_neg_one] + · rintro rfl + simp only [mul_neg, mul_inv_cancel₀ ha, add_neg_cancel] + +/-- Fibers of the positive-slope root map are exactly the factors that +vanish at the given point. This preserves every repeated slope. -/ +noncomputable def positiveSlopeRootFiberEquiv {ι : Type*} {a : ι → ℝ} + (ha : ∀ i, 0 ≤ a i) (z : ℂ) : + {i : {i // 0 < a i} // positiveSlopeRoot a i = z} ≃ + {i // 1 + (a i : ℂ) * z = 0} where + toFun i := ⟨i.val.val, by + have hne : (a i.val : ℂ) ≠ 0 := by exact_mod_cast i.val.property.ne' + exact (one_add_mul_eq_zero_iff_eq_neg_inv hne).mpr i.property.symm⟩ + invFun i := by + have hne : a i ≠ 0 := by + intro hz + have h : (1 : ℂ) = 0 := by + simpa only [hz, ofReal_zero, zero_mul, add_zero] using i.property + exact one_ne_zero h + have hpos : 0 < a i := lt_of_le_of_ne (ha i) hne.symm + have hneC : (a i : ℂ) ≠ 0 := by exact_mod_cast hne + exact ⟨⟨i.val, hpos⟩, ((one_add_mul_eq_zero_iff_eq_neg_inv hneC).mp i.property).symm⟩ + left_inv i := by apply Subtype.ext; apply Subtype.ext; rfl + right_inv i := by apply Subtype.ext; rfl + +/-- A summable nonnegative slope family has finite root-map fibers. -/ +theorem finite_positiveSlopeRoot_fiber {ι : Type*} {a : ι → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (z : ℂ) : + {i : {i // 0 < a i} | positiveSlopeRoot a i = z}.Finite := by + apply ((finite_linearProduct_zero_fiber hs z).preimage + (Subtype.val_injective.injOn)).subset + intro i hi + exact (positiveSlopeRootFiberEquiv ha z ⟨i, hi⟩).property + +/-- Native divisor multiplicity is the finite cardinality of the +positive-slope root fiber, after any nonzero constant normalization. -/ +theorem divisor_const_mul_linearProduct_eq_natCard_root_fiber + {ι : Type*} {a : ι → ℝ} {c : ℂ} (hc : c ≠ 0) + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (z : ℂ) : + MeromorphicOn.divisor (fun w : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * w)) Set.univ z = + (Nat.card {i : {i // 0 < a i} // positiveSlopeRoot a i = z} : ℤ) := by + rw [divisor_const_mul_tprod_one_add_ofReal_mul_apply hc hs z] + exact_mod_cast Nat.card_congr (positiveSlopeRootFiberEquiv ha z).symm + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/RealIdentity.lean b/RealRooted/Mathlib/Analysis/Complex/RealIdentity.lean new file mode 100644 index 000000000..1144d5c61 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/RealIdentity.lean @@ -0,0 +1,36 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.FDeriv.Defs +import Mathlib.Analysis.Calculus.FDeriv.Basic +import TauCeti.Analysis.Complex.RealIdentity +import Mathlib.Analysis.Analytic.IsolatedZeros +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Nonzero real evaluations of an entire function +-/ + +public section + +open Filter Topology + +/-- A nonzero entire function has no real zeros in some punctured +neighborhood of each real point. The real point itself may be a zero. -/ +theorem Differentiable.eventually_ofReal_ne_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hne : f ≠ 0) (x : ℝ) : + ∀ᶠ y : ℝ in 𝓝[≠] x, f y ≠ 0 := by + have ha : AnalyticOnNhd ℝ (fun y : ℝ ↦ f y) Set.univ := by + intro y _ + exact ((hf.analyticAt y).restrictScalars (𝕜 := ℝ)).comp + (Complex.ofRealCLM.analyticAt y) + rcases ha.eqOn_zero_or_eventually_ne_zero_of_preconnected isPreconnected_univ with h | h + · exact (hne (hf.eq_of_ofReal_eq (differentiable_const 0) + (fun y ↦ h (Set.mem_univ y)))).elim + · simpa only [Set.mem_univ, forall_const] using + (eventually_codiscreteWithin_iff_forall_eventually_nhdsNE.mp h) x (Set.mem_univ _) diff --git a/RealRooted/Mathlib/Analysis/Complex/RealLogDeriv.lean b/RealRooted/Mathlib/Analysis/Complex/RealLogDeriv.lean new file mode 100644 index 000000000..6af01406e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/RealLogDeriv.lean @@ -0,0 +1,78 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.RealDeriv +import Mathlib.Analysis.SpecialFunctions.Log.Deriv +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas + +/-! +# Real logarithms and complex logarithmic derivatives + +On a nonvanishing real restriction of a complex differentiable function, +the derivative of the real logarithm is the real complex logarithmic +derivative. The iterated and weighted identities are local to the positive +axis and require no square-root differentiation at its boundary. +For negative real values, `Real.log` has its usual log-absolute-value meaning. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- The real logarithm of a real nonzero complex restriction has the +expected logarithmic derivative. -/ +theorem hasDerivAt_log_re {f : ℂ → ℂ} {x : ℝ} + (hf : DifferentiableAt ℂ f (x : ℂ)) + (hreal : ((f (x : ℂ)).re : ℂ) = f (x : ℂ)) (hne : f (x : ℂ) ≠ 0) : + HasDerivAt (fun y : ℝ ↦ Real.log (f (y : ℂ)).re) (logDeriv f (x : ℂ)).re x := by + have hre : (f (x : ℂ)).re ≠ 0 := by + intro h + apply hne + rw [← hreal, h, ofReal_zero] + convert hf.hasDerivAt.real_of_complex.log hre using 1 + change (deriv f (x : ℂ) / f (x : ℂ)).re = + (deriv f (x : ℂ)).re / (f (x : ℂ)).re + exact (congrArg (fun w : ℂ ↦ (deriv f (x : ℂ) / w).re) hreal.symm).trans + (div_ofReal_re _ _) + +/-- Each positive-axis derivative of the literal real logarithm is the +corresponding derivative of the actual logarithmic derivative. -/ +theorem iteratedDeriv_log_re_eq {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hreal : ∀ x : ℝ, 0 < x → ((f (x : ℂ)).re : ℂ) = f (x : ℂ)) + (hne : ∀ x : ℝ, 0 < x → f (x : ℂ) ≠ 0) (m : ℕ) {x : ℝ} (hx : 0 < x) : + iteratedDeriv (m + 1) (fun y : ℝ ↦ Real.log (f (y : ℂ)).re) x = + iteratedDeriv m (fun y : ℝ ↦ (logDeriv f (y : ℂ)).re) x := by + have heq : deriv (fun y : ℝ ↦ Real.log (f (y : ℂ)).re) =ᶠ[𝓝 x] + (fun y : ℝ ↦ (logDeriv f (y : ℂ)).re) := by + filter_upwards [isOpen_Ioi.mem_nhds hx] with y hy + exact (hasDerivAt_log_re (hf _) (hreal y hy) (hne y hy)).deriv + rw [iteratedDeriv_succ', heq.iteratedDeriv_eq m] + +/-- The literal real-logarithm and logarithmic-derivative versions of the +two-index weighted family agree at every positive argument. -/ +theorem weighted_iteratedDeriv_log_re_eq {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hreal : ∀ x : ℝ, 0 < x → ((f (x : ℂ)).re : ℂ) = f (x : ℂ)) + (hne : ∀ x : ℝ, 0 < x → f (x : ℂ) ≠ 0) (k m : ℕ) {x : ℝ} (hx : 0 < x) : + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv (m + 1) (fun z : ℝ ↦ Real.log (f (z : ℂ)).re) y) x = + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x := by + have heq : (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv (m + 1) (fun z : ℝ ↦ Real.log (f (z : ℂ)).re) y) =ᶠ[𝓝 x] + (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) := by + filter_upwards [isOpen_Ioi.mem_nhds hx] with y hy + rw [iteratedDeriv_log_re_eq hf hreal hne m hy] + rw [heq.iteratedDeriv_eq k] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/RealSeries.lean b/RealRooted/Mathlib/Analysis/Complex/RealSeries.lean new file mode 100644 index 000000000..3d4b8bc86 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/RealSeries.lean @@ -0,0 +1,78 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.Analytic.OfScalars +import Mathlib.Analysis.Analytic.Uniqueness +import Mathlib.Analysis.Complex.TaylorSeries +import Mathlib.Tactic.Ring + +/-! +# Recovering canonical Taylor coefficients from a scalar-series germ + +A scalar series representing an analytic function near zero has its +actual derivatives divided by factorial as coefficients. For an entire +function, a real scalar-series germ extends to the same series everywhere +and proves conjugation symmetry. This makes real-entire source hypotheses +explicit rather than assuming symmetry in addition to a real expansion. +-/ + +public section + +open Filter Topology +open scoped ComplexConjugate + +namespace Complex + +/-- Coefficients of an actual scalar-series germ are the canonical +Taylor derivatives divided by factorial. -/ +theorem iteratedDeriv_div_factorial_eq_of_hasSum + {f : ℂ → ℂ} {a : ℕ → ℂ} (hf : AnalyticAt ℂ f 0) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n : ℕ ↦ a n * z ^ n) (f z)) (n : ℕ) : + iteratedDeriv n f 0 / (n.factorial : ℂ) = a n := by + have hp : HasFPowerSeriesAt f (FormalMultilinearSeries.ofScalars ℂ a) 0 := by + simpa only [hasFPowerSeriesAt_iff, FormalMultilinearSeries.coeff_ofScalars, + zero_add, smul_eq_mul, mul_comm] using hs + have heq := hf.hasFPowerSeriesAt.eq_formalMultilinearSeries hp + have hc := congrArg (fun p : FormalMultilinearSeries ℂ ℂ ℂ ↦ p.coeff n) heq + simpa only [FormalMultilinearSeries.coeff_ofScalars] using hc + +/-- Real scalar-series coefficients equal the real Taylor derivatives +with the same factorial normalization. -/ +theorem re_iteratedDeriv_div_factorial_eq_of_hasSum + {f : ℂ → ℂ} {a : ℕ → ℝ} (hf : AnalyticAt ℂ f 0) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n : ℕ ↦ (a n : ℂ) * z ^ n) (f z)) + (n : ℕ) : (iteratedDeriv n f 0).re / (n.factorial : ℝ) = a n := by + have h := congrArg Complex.re (iteratedDeriv_div_factorial_eq_of_hasSum hf hs n) + simpa only [Complex.div_natCast_re, Complex.ofReal_re] using h + +/-- A scalar-series germ of an entire function represents the same +function at every complex argument. -/ +theorem hasSum_of_entire_of_hasSum_germ {f : ℂ → ℂ} {a : ℕ → ℂ} + (hf : Differentiable ℂ f) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n : ℕ ↦ a n * z ^ n) (f z)) (z : ℂ) : + HasSum (fun n : ℕ ↦ a n * z ^ n) (f z) := by + have hc := iteratedDeriv_div_factorial_eq_of_hasSum (hf.analyticAt 0) hs + convert hasSum_taylorSeries_of_entire hf 0 z using 1 + funext n + rw [← hc n] + simp only [sub_zero, smul_eq_mul, div_eq_mul_inv] + ring + +/-- An entire function represented near zero by real scalar coefficients +commutes with conjugation on the whole plane. -/ +theorem conj_of_real_hasSum_germ {f : ℂ → ℂ} {a : ℕ → ℝ} + (hf : Differentiable ℂ f) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n : ℕ ↦ (a n : ℂ) * z ^ n) (f z)) + (z : ℂ) : f (conj z) = conj (f z) := by + have hleft := hasSum_of_entire_of_hasSum_germ hf hs (conj z) + have hright := Complex.hasSum_conj'.mpr (hasSum_of_entire_of_hasSum_germ hf hs z) + apply hleft.unique + simpa only [map_mul, map_pow, conj_ofReal] using hright + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/SimpleLimit.lean b/RealRooted/Mathlib/Analysis/Complex/SimpleLimit.lean new file mode 100644 index 000000000..68603e496 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/SimpleLimit.lean @@ -0,0 +1,58 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Stability of simple zeros on a compact set + +A positive lower bound for `norm f + norm (deriv f)` prevents nearby functions +and their derivatives from vanishing together. Locally uniform convergence of +entire functions supplies both uniform approximations, including at boundary points. +-/ + +public section + +open Filter Topology + +namespace Complex + +/-- Locally uniformly convergent entire functions eventually have no multiple +zeros on a compact set where the limit has no multiple zeros. No nonempty-set +or real-rootedness hypothesis is needed. -/ +theorem eventually_deriv_ne_zero_on_isCompact {F : ℕ → ℂ → ℂ} {f : ℂ → ℂ} + (hlim : TendstoLocallyUniformly F f atTop) + (hF : ∀ n, Differentiable ℂ (F n)) (hf : Differentiable ℂ f) + {K : Set ℂ} (hK : IsCompact K) + (hsimple : ∀ z ∈ K, f z = 0 → deriv f z ≠ 0) : + ∀ᶠ n in atTop, ∀ z ∈ K, F n z = 0 → deriv (F n) z ≠ 0 := by + have hc : Continuous (fun z => ‖f z‖ + ‖deriv f z‖) := + hf.continuous.norm.add hf.deriv.continuous.norm + have hpos (z : ℂ) (hz : z ∈ K) : 0 < ‖f z‖ + ‖deriv f z‖ := by + by_cases hzero : f z = 0 + · simpa only [hzero, norm_zero, zero_add] using norm_pos_iff.mpr (hsimple z hz hzero) + · exact add_pos_of_pos_of_nonneg (norm_pos_iff.mpr hzero) (norm_nonneg _) + obtain ⟨ε, hε, hbound⟩ := hK.exists_forall_le' hc.continuousOn hpos + have hdlim : TendstoLocallyUniformly (fun n => deriv (F n)) (deriv f) atTop := by + simpa only [iteratedDeriv_one] using hlim.iteratedDeriv hF 1 + have hv := tendstoLocallyUniformly_iff_forall_isCompact.mp hlim K hK + have hd := tendstoLocallyUniformly_iff_forall_isCompact.mp hdlim K hK + have hv' := (Metric.tendstoUniformlyOn_iff.mp hv) (ε / 3) (by positivity) + have hd' := (Metric.tendstoUniformlyOn_iff.mp hd) (ε / 3) (by positivity) + filter_upwards [hv', hd'] with n hn hdn z hz hzero + intro hdzero + have hvsmall : ‖f z‖ < ε / 3 := by + simpa only [hzero, dist_zero_right] using hn z hz + have hdsmall : ‖deriv f z‖ < ε / 3 := by + simpa only [hdzero, dist_zero_right] using hdn z hz + have hlow := hbound z hz + linarith + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/SubexponentialLowerBound.lean b/RealRooted/Mathlib/Analysis/Complex/SubexponentialLowerBound.lean new file mode 100644 index 000000000..7bd462120 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/SubexponentialLowerBound.lean @@ -0,0 +1,57 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +import Mathlib.Analysis.SpecialFunctions.Exp +import Mathlib.Order.Filter.IsBounded +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.Tactic.Ring + +/-! +# Exponential lower bounds obstruct growth of order below one + +A function of order below one cannot dominate a positive exponential on +the positive real ray. Entirety is not required for this growth comparison. +-/ + +public section + +open Asymptotics Complex Filter Topology + +namespace TauCeti + +/-- Order below one excludes every positive exponential lower bound on +the positive real axis, even up to a multiplicative constant. -/ +theorem OrderLE.not_isBigO_exp_mul_real {f : ℂ → ℂ} {rho b : ℝ} + (hf : OrderLE f rho) (hrho : rho < 1) (hb : 0 < b) : + ¬ (fun x : ℝ ↦ Real.exp (b * x)) =O[atTop] (fun x : ℝ ↦ f (x : ℂ)) := by + intro hlow + let p : ℝ := (rho + 1) / 2 + have hrp : rho < p := by dsimp [p]; linarith + have hp1 : p < 1 := by dsimp [p]; linarith + have hO := hlow.trans ((hf.isBigO hrp).comp_tendsto + (RCLike.tendsto_ofReal_atTop_cobounded ℂ)) + simp only [Function.comp_def] at hO + rw [Real.isBigO_exp_comp_exp_comp] at hO + apply not_isBoundedUnder_of_tendsto_atTop _ hO + have hsmall : Tendsto (fun x : ℝ ↦ x ^ (p - 1)) atTop (𝓝 0) := by + simpa only [neg_sub] using tendsto_rpow_neg_atTop (sub_pos.mpr hp1) + have hlin : Tendsto (fun x : ℝ ↦ b / 2 * x) atTop atTop := + tendsto_id.const_mul_atTop (half_pos hb) + apply tendsto_atTop_mono' atTop _ hlin + filter_upwards [hsmall.eventually (ge_mem_nhds (half_pos hb)), + eventually_gt_atTop (0 : ℝ)] with x hx hx0 + simp only [Pi.sub_apply, Complex.norm_real, + Real.norm_eq_abs, abs_of_pos hx0] + have hid : x ^ (p - 1) * x = x ^ p := by + calc x ^ (p - 1) * x = x ^ (p - 1) * x ^ (1 : ℝ) := by rw [Real.rpow_one] + _ = x ^ p := by rw [← Real.rpow_add hx0, sub_add_cancel] + have hmul := mul_le_mul_of_nonneg_right hx hx0.le + rw [hid] at hmul + linarith + +end TauCeti diff --git a/RealRooted/Mathlib/Analysis/Complex/TaylorGrowth.lean b/RealRooted/Mathlib/Analysis/Complex/TaylorGrowth.lean new file mode 100644 index 000000000..01ec8d7d6 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/TaylorGrowth.lean @@ -0,0 +1,40 @@ +/- +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 +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# Exponential bounds from geometric Taylor derivative bounds + +A geometric bound on the derivatives of an entire function sums to an +exponential bound on its norm. The codomain may be any complex Banach space. +-/ + +public section + +/-- Geometrically bounded Taylor derivatives give an exponential norm bound +for an entire function with values in a complex Banach space. -/ +theorem Differentiable.norm_le_mul_exp_of_iteratedDeriv_bound + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + {f : ℂ → E} (hf : Differentiable ℂ f) {c : ℂ} {C A : ℝ} + (hcoeff : ∀ n, ‖iteratedDeriv n f c‖ ≤ C * A ^ n) (z : ℂ) : + ‖f z‖ ≤ C * Real.exp (A * ‖z - c‖) := by + have hsum : HasSum (fun n : ℕ => C * ((A * ‖z - c‖) ^ n / n.factorial)) + (C * Real.exp (A * ‖z - c‖)) := by + rw [Real.exp_eq_exp_ℝ] + exact (NormedSpace.expSeries_div_hasSum_exp (A * ‖z - c‖)).mul_left C + apply (Complex.hasSum_taylorSeries_of_entire hf c z).norm_le_of_bounded hsum + intro n + simp only [norm_smul, norm_inv, norm_natCast, norm_pow] + calc + _ ≤ (n.factorial : ℝ)⁻¹ * (‖z - c‖ ^ n * (C * A ^ n)) := by + gcongr + exact hcoeff n + _ = C * ((A * ‖z - c‖) ^ n / n.factorial) := by rw [mul_pow]; ring diff --git a/RealRooted/Mathlib/Analysis/Complex/TranslateProductContinuity.lean b/RealRooted/Mathlib/Analysis/Complex/TranslateProductContinuity.lean new file mode 100644 index 000000000..00d92172b --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/TranslateProductContinuity.lean @@ -0,0 +1,36 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PartialContinuity +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Taylor coefficients of finite translated products vary continuously +-/ + +public section + +namespace Complex + +/-- The derivatives at zero of a finite translated product vary continuously +with its center. Auxiliary slopes may repeat or be zero. -/ +theorem continuous_iteratedDeriv_translateProduct {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (s : Multiset ℂ) (k : ℕ) : + Continuous (fun x : ℂ ↦ iteratedDeriv k + (fun z ↦ (s.map fun r ↦ f (x - r * z)).prod) 0) := by + have hF : ContDiff ℂ k + (fun w : ℂ × ℂ ↦ (s.map fun r ↦ f (w.1 - r * w.2)).prod) := by + induction s using Multiset.induction_on with + | empty => simpa only [Multiset.map_zero, Multiset.prod_zero] using contDiff_const + | cons r s ih => + simpa only [Multiset.map_cons, Multiset.prod_cons, Pi.mul_def, Function.comp_def] using + ((hf.contDiff (n := k)).comp (by fun_prop)).mul ih + exact hF.continuous_iteratedDeriv_snd_zero + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/TranslateProductNonzero.lean b/RealRooted/Mathlib/Analysis/Complex/TranslateProductNonzero.lean new file mode 100644 index 000000000..ffe8dfe51 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/TranslateProductNonzero.lean @@ -0,0 +1,65 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.FDeriv.Defs +import Mathlib.Analysis.Calculus.FDeriv.Basic +import Mathlib.Analysis.Analytic.IsolatedZeros +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Nonzero finite products of affine translates +-/ + +public section + +namespace Complex + +/-- A finite product of affine translates of an entire function is entire. -/ +theorem differentiable_translateProduct {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (s : Multiset ℂ) (x : ℂ) : + Differentiable ℂ (fun z ↦ (s.map fun r ↦ f (x - r * z)).prod) := by + induction s using Multiset.induction_on with + | empty => simpa only [Multiset.map_zero, Multiset.prod_zero] using differentiable_const 1 + | cons r s ih => + simpa only [Multiset.map_cons, Multiset.prod_cons, Pi.mul_def, Function.comp_def] using + (hf.comp (by fun_prop)).mul ih + +/-- Nonzero slopes prevent any factor from being an identically zero +constant. Thus a finite translated product of a nonzero entire function is nonzero. -/ +theorem translateProduct_ne_zero {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hne : f ≠ 0) + (s : Multiset ℂ) (hs : ∀ r ∈ s, r ≠ 0) (x : ℂ) : + (fun z ↦ (s.map fun r ↦ f (x - r * z)).prod) ≠ 0 := by + revert hs + induction s using Multiset.induction_on with + | empty => + intro _ hz + have h := congrFun hz 0 + simp at h + | cons r s ih => + intro hs hz + have hr : r ≠ 0 := hs r (Multiset.mem_cons_self r s) + have htail : ∀ a ∈ s, a ≠ 0 := fun a ha ↦ hs a (Multiset.mem_cons_of_mem ha) + have hleft : Differentiable ℂ (fun z ↦ f (x - r * z)) := hf.comp (by fun_prop) + have hright := differentiable_translateProduct hf s x + have hprod (z : ℂ) (_ : z ∈ Set.univ) : + f (x - r * z) * (s.map fun a ↦ f (x - a * z)).prod = 0 := by + simpa only [Multiset.map_cons, Multiset.prod_cons, Pi.zero_apply] using congrFun hz z + rcases (show AnalyticOnNhd ℂ (fun z ↦ f (x - r * z)) Set.univ from + fun z _ ↦ hleft.analyticAt z).eq_zero_or_eq_zero_of_mul_eq_zero + (fun z _ ↦ hright.analyticAt z) hprod isPreconnected_univ with h | h + · apply hne + funext w + have heq : x - r * ((x - w) / r) = w := by + field_simp [hr] + ring + simpa only [heq, Pi.zero_apply] using h ((x - w) / r) (Set.mem_univ _) + · exact ih htail (funext fun z ↦ h z (Set.mem_univ _)) + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTrace.lean b/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTrace.lean new file mode 100644 index 000000000..f735a8ac1 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTrace.lean @@ -0,0 +1,114 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Meromorphic.Divisor +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace +import RealRooted.Mathlib.Analysis.Complex.PositiveSlopeRoots +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberCardinality +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds + +/-! +# Native divisor heat traces of positive linear products + +The heat trace sums over Mathlib's actual divisor support and weights each +zero by its native multiplicity. For a nonnegative linear product it equals +the repeated positive-slope trace, so the definition does not depend on a +choice of factorization. These equality and derivative claims use positive +time, where the series is summable. +-/ + +public section + +open Filter MeasureTheory Topology + +namespace Complex + +/-- The zero heat trace, with native divisor multiplicities and rate equal +to the modulus of the zero. For negative real zeros this is the positive +rate in the genus-zero factor. Analytic claims require appropriate hypotheses. -/ +@[expose] noncomputable def zeroHeatTrace (f : ℂ → ℂ) (t : ℝ) : ℝ := + ∑' z : (MeromorphicOn.divisor f Set.univ).support, + (MeromorphicOn.divisor f Set.univ z : ℝ) * Real.exp (-‖(z : ℂ)‖ * t) + +/-- For a convergent nonnegative linear product, the intrinsic heat trace +is the sum over its positive slopes, with repetitions retained. -/ +theorem zeroHeatTrace_const_mul_linearProduct_eq {ι : Type*} {a : ι → ℝ} + {c : ℂ} (hc : c ≠ 0) (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + {t : ℝ} (ht : 0 < t) : + zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) t = + Real.positiveSlopeHeatTrace a t := by + let F : ℂ → ℂ := fun z ↦ c * ∏' i, (1 + (a i : ℂ) * z) + let d := MeromorphicOn.divisor F Set.univ + have hroot : Summable (fun i : {i // 0 < a i} ↦ + Real.exp (-‖positiveSlopeRoot a i‖ * t)) := by + simpa only [pow_zero, one_mul, norm_positiveSlopeRoot] using + Real.summable_pow_mul_exp_neg_mul (fun i ↦ inv_pos.mpr i.property) zero_le_one + (Real.summable_inverse_rates_positiveSlopes hs) 0 ht + have hgroup := hroot.hasSum_natCard_fiber_mul + (u := positiveSlopeRoot a) (g := fun z : ℂ ↦ Real.exp (-‖z‖ * t)) + have hsum : HasSum (fun z : ℂ ↦ (d z : ℝ) * Real.exp (-‖z‖ * t)) + (Real.positiveSlopeHeatTrace a t) := by + have h := hgroup.congr_fun (g := fun z : ℂ ↦ (d z : ℝ) * Real.exp (-‖z‖ * t)) + (fun z ↦ by + rw [show d z = + (Nat.card {i : {i // 0 < a i} // positiveSlopeRoot a i = z} : ℤ) from + divisor_const_mul_linearProduct_eq_natCard_root_fiber hc ha hs z] + simp only [Int.cast_natCast]) + simpa only [Real.positiveSlopeHeatTrace, Real.exponentialMomentSum, + pow_zero, one_mul, norm_positiveSlopeRoot] using h + have hsupport : Function.support (fun z : ℂ ↦ (d z : ℝ) * Real.exp (-‖z‖ * t)) ⊆ + d.support := by + intro z hz + by_contra hn + have hd : d z = 0 := Function.notMem_support.mp hn + exact hz (by simp only [hd, Int.cast_zero, zero_mul]) + exact ((hasSum_subtype_iff_of_support_subset hsupport).mpr hsum).tsum_eq + +/-- The native zero heat trace of a nonnegative linear product is +completely monotone at positive time. -/ +theorem isCompletelyMonotoneOnIoi_zeroHeatTrace_linearProduct + {ι : Type*} {a : ι → ℝ} {c : ℂ} (hc : c ≠ 0) + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) : + TauCeti.IsCompletelyMonotoneOnIoi + (zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z))) := + (Real.isCompletelyMonotoneOnIoi_positiveSlopeHeatTrace hs).congr + (fun _ ht ↦ zeroHeatTrace_const_mul_linearProduct_eq hc ha hs ht) + +/-- All derivatives of the intrinsic trace agree with the spectral +derivatives, because the trace identity holds on an open neighborhood. -/ +theorem iteratedDeriv_zeroHeatTrace_const_mul_linearProduct + {ι : Type*} {a : ι → ℝ} {c : ℂ} (hc : c ≠ 0) + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (k : ℕ) {t : ℝ} (ht : 0 < t) : + iteratedDeriv k (zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z))) t = + iteratedDeriv k (Real.positiveSlopeHeatTrace a) t := by + have heq : zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) =ᶠ[𝓝 t] + Real.positiveSlopeHeatTrace a := + Filter.Eventually.mono (isOpen_Ioi.mem_nhds ht) fun _ hy ↦ + zeroHeatTrace_const_mul_linearProduct_eq hc ha hs hy + exact heq.iteratedDeriv_eq k + +/-- The native heat trace has the same integrable Laplace moments as the +repeated factor spectrum, including the nonnegative endpoint. -/ +theorem laplace_zeroHeatTrace_linearProduct {ι : Type*} [Countable ι] + {a : ι → ℝ} {c : ℂ} (hc : c ≠ 0) (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (k : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) t) (Set.Ioi 0) ∧ + (∫ t : ℝ in Set.Ioi 0, Real.exp (-x * t) * t ^ k * + zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) t) = + (k.factorial : ℝ) * ∑' i, a i ^ (k + 1) / (1 + a i * x) ^ (k + 1) := by + have hpos := Real.laplace_positiveSlopeHeatTrace ha hs k hx + have heq : (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) t) =ᵐ[ + volume.restrict (Set.Ioi 0)] + (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * Real.positiveSlopeHeatTrace a t) := by + filter_upwards [ae_restrict_mem measurableSet_Ioi] with t (ht : 0 < t) + rw [zeroHeatTrace_const_mul_linearProduct_eq hc ha hs ht] + exact ⟨hpos.1.congr heq.symm, (integral_congr_ae heq).trans hpos.2⟩ + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTraceOrigin.lean b/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTraceOrigin.lean new file mode 100644 index 000000000..fbdd76ff6 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTraceOrigin.lean @@ -0,0 +1,118 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralIndex +public import TauCeti.Analysis.Complex.GrowthOrder +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +import Mathlib.Analysis.Complex.CauchyIntegral +import TauCeti.Analysis.Meromorphic.Order +import TauCeti.Analysis.Meromorphic.Divisor +import Mathlib.Topology.Algebra.InfiniteSum.Constructions + +/-! +# Native heat traces after inserting origin zeros + +The divisor of `z^r g(z)` is the divisor of `g` plus multiplicity `r` +at zero. At positive time, the intrinsic modulus-zero trace therefore +gains the constant `r`. Summability is proved before splitting the +series; no identity is asserted for totalized divergent sums at time zero. +-/ + +public section + +namespace Complex + +/-- The native heat trace may also be summed over the whole plane, +because its summand vanishes off the divisor support. -/ +theorem zeroHeatTrace_eq_tsum (f : ℂ → ℂ) (t : ℝ) : + zeroHeatTrace f t = ∑' z : ℂ, + (MeromorphicOn.divisor f Set.univ z : ℝ) * Real.exp (-‖z‖ * t) := by + apply tsum_subtype_eq_of_support_subset + (f := fun z : ℂ ↦ (MeromorphicOn.divisor f Set.univ z : ℝ) * + Real.exp (-‖z‖ * t)) (s := (MeromorphicOn.divisor f Set.univ).support) + intro z hz + by_contra hn + have hd : MeromorphicOn.divisor f Set.univ z = 0 := Function.notMem_support.mp hn + exact hz (by simp only [hd, Int.cast_zero, zero_mul]) + +/-- Finite order makes the native weighted heat summand summable at +every positive time, without any real-zero assumption. -/ +theorem summable_zeroHeatTrace_summand {g : ℂ → ℂ} {rho t : ℝ} + (hg : Differentiable ℂ g) (h0 : g 0 ≠ 0) (horder : TauCeti.OrderLE g rho) + (ht : 0 < t) : + Summable (fun z : ℂ ↦ + (MeromorphicOn.divisor g Set.univ z : ℝ) * Real.exp (-‖z‖ * t)) := by + let p : ℝ := max rho 0 + 1 + have hp : rho < p := by dsimp [p]; linarith [le_max_left rho 0] + have hp0 : 0 ≤ p := by dsimp [p]; linarith [le_max_right rho 0] + have hsub := (hasSum_zeroHeatTrace_summand_on_support hg h0 horder hp hp0 ht).summable + have hsupport : Function.support (fun z : ℂ ↦ + (MeromorphicOn.divisor g Set.univ z : ℝ) * Real.exp (-‖z‖ * t)) ⊆ + (MeromorphicOn.divisor g Set.univ).support := by + intro z hz + by_contra hn + have hd : MeromorphicOn.divisor g Set.univ z = 0 := Function.notMem_support.mp hn + exact hz (by simp only [hd, Int.cast_zero, zero_mul]) + exact ((hasSum_subtype_iff_of_support_subset hsupport).mp hsub.hasSum).summable + +/-- Inserting `z^r` adds exactly its origin multiplicity to the native divisor. -/ +theorem divisor_pow_mul_apply {g : ℂ → ℂ} (hg : Differentiable ℂ g) (h0 : g 0 ≠ 0) + (r : ℕ) (z : ℂ) : + MeromorphicOn.divisor (fun w : ℂ ↦ w ^ r * g w) Set.univ z = + (if z = 0 then (r : ℤ) else 0) + MeromorphicOn.divisor g Set.univ z := by + classical + have hid : AnalyticOnNhd ℂ (id : ℂ → ℂ) Set.univ := fun _ _ ↦ analyticAt_id + have hga : AnalyticOnNhd ℂ g Set.univ := fun w _ ↦ hg.analyticAt w + have hp : AnalyticOnNhd ℂ (fun w : ℂ ↦ w ^ r) Set.univ := hid.pow r + have htopg (w : ℂ) (hw : w ∈ Set.univ) : meromorphicOrderAt g w ≠ ⊤ := + hga.meromorphicOrderAt_ne_top_of_exists_ne_zero isConnected_univ + (show ∃ v ∈ Set.univ, g v ≠ 0 from ⟨0, Set.mem_univ _, h0⟩) hw + have htopp (w : ℂ) (hw : w ∈ Set.univ) : + meromorphicOrderAt (fun v : ℂ ↦ v ^ r) w ≠ ⊤ := + hp.meromorphicOrderAt_ne_top_of_exists_ne_zero isConnected_univ + (show ∃ v ∈ Set.univ, v ^ r ≠ (0 : ℂ) from ⟨1, Set.mem_univ _, by simp⟩) hw + rw [MeromorphicOn.divisor_fun_mul hp.meromorphicOn hga.meromorphicOn + htopp htopg] + change MeromorphicOn.divisor (fun w : ℂ ↦ w ^ r) Set.univ z + _ = _ + congr 1 + have hidz : MeromorphicOn.divisor (id : ℂ → ℂ) Set.univ z = + if z = 0 then 1 else 0 := by + by_cases hz : z = 0 + · subst z + rw [hid.meromorphicOn.divisor_eq_analyticOrderNatAt analyticAt_id (Set.mem_univ _)] + simp only [analyticOrderNatAt, analyticOrderAt_id, ENat.toNat_one, Nat.cast_one, ite_true] + · simpa only [hz, ite_false] using analyticAt_id.divisor_apply_eq_zero hz + rw [show (fun w : ℂ ↦ w ^ r) = fun w ↦ id w ^ r from rfl, + MeromorphicOn.divisor_fun_pow hid.meromorphicOn] + change r • MeromorphicOn.divisor (id : ℂ → ℂ) Set.univ z = _ + rw [hidz] + split_ifs <;> simp + +/-- The actual native trace gains the origin multiplicity as a constant +at every positive time. -/ +theorem zeroHeatTrace_pow_mul {g : ℂ → ℂ} {rho t : ℝ} + (hg : Differentiable ℂ g) (h0 : g 0 ≠ 0) (horder : TauCeti.OrderLE g rho) + (r : ℕ) (ht : 0 < t) : + zeroHeatTrace (fun z : ℂ ↦ z ^ r * g z) t = (r : ℝ) + zeroHeatTrace g t := by + classical + have hdelta : Summable (fun z : ℂ ↦ if z = 0 then (r : ℝ) else 0) := + (hasSum_ite_eq 0 (r : ℝ)).summable + have hgheat := summable_zeroHeatTrace_summand hg h0 horder ht + rw [zeroHeatTrace_eq_tsum, zeroHeatTrace_eq_tsum] + have heq : (fun z : ℂ ↦ + (MeromorphicOn.divisor (fun w : ℂ ↦ w ^ r * g w) Set.univ z : ℝ) * + Real.exp (-‖z‖ * t)) = + (fun z : ℂ ↦ if z = 0 then (r : ℝ) else 0) + + (fun z : ℂ ↦ (MeromorphicOn.divisor g Set.univ z : ℝ) * + Real.exp (-‖z‖ * t)) := by + funext z + rw [divisor_pow_mul_apply hg h0 r] + by_cases hz : z = 0 <;> simp [hz] + rw [heq, Pi.add_def, hdelta.tsum_add hgheat] + simp + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTraceScale.lean b/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTraceScale.lean new file mode 100644 index 000000000..a3913f829 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/ZeroHeatTraceScale.lean @@ -0,0 +1,33 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace + +/-! +# Scalar invariance of the native zero heat trace + +A nonzero scalar preserves the entire native divisor, including its support +and multiplicities. Consequently it preserves the heat trace as a function, +without any auxiliary spectral, growth, or simplicity hypothesis. +-/ + +public section + +namespace Complex + +/-- Nonzero scalar normalization preserves the native zero heat trace. -/ +theorem zeroHeatTrace_const_mul {f : ℂ → ℂ} {c : ℂ} (hc : c ≠ 0) : + zeroHeatTrace (fun z : ℂ ↦ c * f z) = zeroHeatTrace f := by + have hd : MeromorphicOn.divisor (fun z : ℂ ↦ c * f z) Set.univ = + MeromorphicOn.divisor f Set.univ := by + simpa only [smul_eq_mul] using + (MeromorphicOn.divisor_fun_const_smul (f := f) (U := Set.univ) hc) + funext t + unfold zeroHeatTrace + rw [hd] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/ZeroSpectralIndex.lean b/RealRooted/Mathlib/Analysis/Complex/ZeroSpectralIndex.lean new file mode 100644 index 000000000..b43803db6 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/ZeroSpectralIndex.lean @@ -0,0 +1,116 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds +import Mathlib.Analysis.Complex.CauchyIntegral +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicity +import TauCeti.Analysis.Complex.GrowthOrder.Zero.Summability +import TauCeti.Analysis.Meromorphic.Divisor + +/-! +# Repeating the native zero spectrum with multiplicity + +Each point in the native divisor support is repeated its natural analytic +multiplicity. The resulting positive rates are absolute zero moduli when +the entire function does not vanish at the origin. This construction needs +no real-zero hypothesis and no chosen enumeration. +-/ + +public section + +open MeasureTheory + +namespace Complex + +/-- The intrinsic zero index, repeating each native zero its multiplicity. -/ +@[expose] def zeroSpectralIndex (f : ℂ → ℂ) : Type := + Σ z : (MeromorphicOn.divisor f Set.univ).support, + Fin (MeromorphicOn.divisor f Set.univ z).toNat + +/-- The rate of a repeated native zero is its modulus. -/ +@[expose] noncomputable def zeroSpectralRate (f : ℂ → ℂ) (i : zeroSpectralIndex f) : ℝ := + ‖(i.1 : ℂ)‖ + +/-- For an entire function, the native integer divisor equals its natural +multiplicity after casting. -/ +theorem zeroMultiplicity_toNat_cast {f : ℂ → ℂ} (hf : Differentiable ℂ f) (z : ℂ) : + ((MeromorphicOn.divisor f Set.univ z).toNat : ℝ) = + (MeromorphicOn.divisor f Set.univ z : ℝ) := by + have hd := MeromorphicOn.AnalyticOnNhd.divisor_nonneg + (show AnalyticOnNhd ℂ f Set.univ from fun w _ ↦ hf.analyticAt w) z + exact_mod_cast Int.toNat_of_nonneg hd + +/-- Nonvanishing at the origin makes every native spectral rate positive. -/ +theorem zeroSpectralRate_pos {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (i : zeroSpectralIndex f) : 0 < zeroSpectralRate f i := by + apply norm_pos_iff.mpr + intro hi + have hn : f (i.1 : ℂ) ≠ 0 := by rwa [hi] + exact (hf.analyticAt _).notMem_divisor_support_of_ne_zero hn i.1.property + +/-- Finite order gives all inverse moments above that order for the +repeated native spectrum, without a real-zero assumption. -/ +theorem summable_zeroSpectralRate_rpow_neg {f : ℂ → ℂ} {rho p : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f rho) (hp : rho < p) : + Summable (fun i : zeroSpectralIndex f ↦ zeroSpectralRate f i ^ (-p)) := by + apply summable_sigma_fin_of_nonneg + (fun z : (MeromorphicOn.divisor f Set.univ).support ↦ + (MeromorphicOn.divisor f Set.univ z).toNat) + (fun z ↦ Real.rpow_nonneg (norm_nonneg (z : ℂ)) _) + apply (horder.summable_divisor_mul_norm_rpow hf hp).congr + intro z + rw [zeroMultiplicity_toNat_cast hf] + +/-- A nonzero-at-zero entire function of finite order has a countable +native repeated spectrum. -/ +theorem countable_zeroSpectralIndex {f : ℂ → ℂ} {rho : ℝ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) (horder : TauCeti.OrderLE f rho) : + Countable (zeroSpectralIndex f) := by + have hs := summable_zeroSpectralRate_rpow_neg hf horder (p := rho + 1) (by linarith) + have hcount : (Set.univ : Set (zeroSpectralIndex f)).Countable := by + apply hs.countable_support.mono + intro i _ + exact (Real.rpow_pos_of_pos (zeroSpectralRate_pos hf h0 i) _).ne' + exact Set.countable_univ_iff.mp hcount + +/-- The native divisor-weighted heat sum converges to the repeated +spectral sum at positive time. -/ +theorem hasSum_zeroHeatTrace_summand_on_support {f : ℂ → ℂ} {rho p t : ℝ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) (horder : TauCeti.OrderLE f rho) + (hp : rho < p) (hp0 : 0 ≤ p) (ht : 0 < t) : + HasSum + (fun z : (MeromorphicOn.divisor f Set.univ).support ↦ + (MeromorphicOn.divisor f Set.univ z : ℝ) * Real.exp (-‖(z : ℂ)‖ * t)) + (Real.exponentialMomentSum (zeroSpectralRate f) 0 t) := by + have hs := Real.summable_pow_mul_exp_neg_mul (zeroSpectralRate_pos hf h0) hp0 + (summable_zeroSpectralRate_rpow_neg hf horder hp) 0 ht + have hsum : HasSum (fun i : zeroSpectralIndex f ↦ Real.exp (-zeroSpectralRate f i * t)) + (Real.exponentialMomentSum (zeroSpectralRate f) 0 t) := by + simpa only [Real.exponentialMomentSum, pow_zero, one_mul] using hs.hasSum + have hgroup : HasSum + (fun z : (MeromorphicOn.divisor f Set.univ).support ↦ + (MeromorphicOn.divisor f Set.univ z : ℝ) * Real.exp (-‖(z : ℂ)‖ * t)) + (Real.exponentialMomentSum (zeroSpectralRate f) 0 t) := by + apply hsum.sigma + intro z + simpa only [zeroSpectralRate, Finset.sum_const, Finset.card_univ, Fintype.card_fin, + nsmul_eq_mul, zeroMultiplicity_toNat_cast hf] using + hasSum_fintype (fun _ : Fin (MeromorphicOn.divisor f Set.univ z).toNat ↦ + Real.exp (-‖(z : ℂ)‖ * t)) + exact hgroup + +/-- The native weighted heat trace equals the repeated spectral heat +sum at positive time. Entirety provides the sign of each multiplicity. -/ +theorem zeroHeatTrace_eq_exponentialMomentSum {f : ℂ → ℂ} {rho p t : ℝ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) (horder : TauCeti.OrderLE f rho) + (hp : rho < p) (hp0 : 0 ≤ p) (ht : 0 < t) : + zeroHeatTrace f t = Real.exponentialMomentSum (zeroSpectralRate f) 0 t := by + exact (hasSum_zeroHeatTrace_summand_on_support hf h0 horder hp hp0 ht).tsum_eq + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/ZeroSpectralNonempty.lean b/RealRooted/Mathlib/Analysis/Complex/ZeroSpectralNonempty.lean new file mode 100644 index 000000000..fcb4a1fb7 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/ZeroSpectralNonempty.lean @@ -0,0 +1,41 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import Mathlib.Analysis.Complex.CauchyIntegral +public import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralIndex +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Zero.Nonempty +import TauCeti.Analysis.Meromorphic.Divisor + +/-! +# Nonempty native spectra below order one + +A nonconstant entire function of order below one has a zero. If it is +nonzero at the origin, that zero has positive native multiplicity and +therefore occurs in the repeated native modulus spectrum. +-/ + +public section + +namespace Complex + +/-- A nonconstant nonzero-at-origin entire function below order one has +a nonempty repeated native zero spectrum, without a real-zero assumption. -/ +theorem nonempty_zeroSpectralIndex_of_order_lt_one + {f : ℂ → ℂ} {rho : ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hnc : f ≠ fun _ : ℂ ↦ f 0) : Nonempty (zeroSpectralIndex f) := by + obtain ⟨z, hz⟩ := horder.exists_zero_of_nonconstant hrho hf hnc + have hfa : AnalyticOnNhd ℂ f Set.univ := fun w _ ↦ hf.analyticAt w + have hdz : MeromorphicOn.divisor f Set.univ z ≠ 0 := by + intro hd + exact ((hfa.divisor_apply_eq_zero_iff isPreconnected_univ + (Set.mem_univ 0) h0 (Set.mem_univ z)).mp hd) hz + have hp : 0 < MeromorphicOn.divisor f Set.univ z := + lt_of_le_of_ne (MeromorphicOn.AnalyticOnNhd.divisor_nonneg hfa z) hdz.symm + exact ⟨⟨⟨z, hdz⟩, ⟨0, by lia⟩⟩⟩ + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Complex/ZeroWeightedHeatTrace.lean b/RealRooted/Mathlib/Analysis/Complex/ZeroWeightedHeatTrace.lean new file mode 100644 index 000000000..e817dfade --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Complex/ZeroWeightedHeatTrace.lean @@ -0,0 +1,72 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventHierarchy +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeWeightedHeat +import Mathlib.MeasureTheory.Integral.Bochner.Set + +/-! +# Weighted native-zero heat integrals of linear products + +Both representations use the actual native divisor trace, with its +multiplicities. Positive-time equality with the repeated slope spectrum +transfers the weighted integrals without choosing distinct-zero enumerations. +-/ + +public section + +open MeasureTheory Set + +namespace Complex + +/-- The positive signed-derivative heat integral of a linear product is +the weighted resolvent hierarchy, with actual integrability. -/ +theorem laplace_weighted_zeroHeatTrace_linearProduct {a : ℕ → ℝ} {c : ℂ} + (hc : c ≠ 0) (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (k m : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z))) t) + (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z))) t) = + Real.weightedResolventSum a 0 k m x := by + have h := Real.laplace_weighted_positiveSlopeHeatTrace ha hs k m hx + have heq : (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z))) t) =ᵐ[ + volume.restrict (Ioi 0)] + (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Real.positiveSlopeHeatTrace a) t) := by + filter_upwards [ae_restrict_mem measurableSet_Ioi] with t (ht : 0 < t) + rw [iteratedDeriv_zeroHeatTrace_const_mul_linearProduct hc ha hs k ht] + exact ⟨h.1.congr heq.symm, (integral_congr_ae heq).trans h.2⟩ + +/-- The Laguerre integral of a linear product's actual zero heat trace is +the weighted resolvent hierarchy, including the Laplace endpoint zero. -/ +theorem laplace_laguerre_zeroHeatTrace_linearProduct {a : ℕ → ℝ} {c : ℂ} + (hc : c ≠ 0) (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (k m : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * + zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * + zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) = + Real.weightedResolventSum a 0 k m x := by + have h := Real.laplace_laguerre_positiveSlopeHeatTrace ha hs k m hx + have heq : (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * + zeroHeatTrace (fun z : ℂ ↦ c * ∏' i, (1 + (a i : ℂ) * z)) t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) =ᵐ[ + volume.restrict (Ioi 0)] + (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * Real.positiveSlopeHeatTrace a t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) := by + filter_upwards [ae_restrict_mem measurableSet_Ioi] with t (ht : 0 < t) + rw [zeroHeatTrace_const_mul_linearProduct_eq hc ha hs ht] + exact ⟨h.1.congr heq.symm, (integral_congr_ae heq).trans h.2⟩ + +end Complex diff --git a/RealRooted/Mathlib/Analysis/Contour/Residue/LogDeriv.lean b/RealRooted/Mathlib/Analysis/Contour/Residue/LogDeriv.lean new file mode 100644 index 000000000..0f0ec991c --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Contour/Residue/LogDeriv.lean @@ -0,0 +1,45 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Contour.Residue.Basic +import TauCeti.Analysis.Contour.Residue.LogDeriv + +/-! +# Analytically weighted logarithmic derivatives + +Multiplying a logarithmic derivative by an analytic weight multiplies its +residue by the value of the weight. Zeros and poles of arbitrary finite order +are included; no simplicity assumption is imposed on the original function. +-/ + +public section + +open Filter Topology + +namespace TauCeti.Contour + +/-- An analytic weight evaluates at the zero or pole in the residue of a logarithmic +derivative. The integer order includes both zeros and poles. -/ +theorem residue_logDeriv_mul {f g : ℂ → ℂ} {z : ℂ} {n : ℤ} + (hf : MeromorphicAt f z) (hn : meromorphicOrderAt f z = (n : WithTop ℤ)) + (hg : AnalyticAt ℂ g z) : + residue (fun s ↦ logDeriv f s * g s) z = (n : ℂ) * g z := by + obtain ⟨u, hu, hu0, heq⟩ := logDeriv_eventuallyEq_principalPart hf hn + have htail : AnalyticAt ℂ (fun s ↦ logDeriv u s * g s) z := (hu.logDeriv hu0).mul hg + have hprincipal : MeromorphicAt (fun s ↦ (n : ℂ) * g s / (s - z)) z := + (analyticAt_const.mul hg).meromorphicAt.div + (analyticAt_id.sub analyticAt_const).meromorphicAt + have hsplit : (fun s ↦ logDeriv f s * g s) =ᶠ[𝓝[≠] z] + (fun s ↦ (n : ℂ) * g s / (s - z)) + (fun s ↦ logDeriv u s * g s) := by + filter_upwards [heq] with s hs + simp only [Pi.add_apply, hs, div_eq_mul_inv] + ring + rw [residue_congr_nhdsNE hsplit, residue_add hprincipal htail.meromorphicAt, + residue_eq_zero_of_analyticAt htail, add_zero] + simpa using residue_div_sub_pow_of_analyticAt (analyticAt_const.mul hg) 0 + +end TauCeti.Contour diff --git a/RealRooted/Mathlib/Analysis/Contour/Residue/Rectangle.lean b/RealRooted/Mathlib/Analysis/Contour/Residue/Rectangle.lean new file mode 100644 index 000000000..1d9619476 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Contour/Residue/Rectangle.lean @@ -0,0 +1,61 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Contour.Residue.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import TauCeti.Analysis.Contour.Residue.Cycle +import TauCeti.Analysis.Contour.Curve.Rectangle +import TauCeti.Analysis.Contour.Winding.Number.Rectangle + +/-! +# The residue theorem on a rectangle + +The signed sum of the four edge integrals equals the sum of the interior +residues. The exceptional finite set may include points outside the rectangle; +these do not contribute. This specializes Tau Ceti's residue theorem for +null-homologous cycles using its winding-number calculation for rectangles. +-/ + +public section + +open Complex Set +open scoped Real + +namespace TauCeti.Contour + +open scoped Classical in +/-- The residue theorem for a rectangle, written as four real interval integrals. +The lower left and upper right corners are `z` and `w`. -/ +theorem integral_boundary_rect_eq_sum_residues {f : ℂ → ℂ} {S : Finset ℂ} + {U : Set ℂ} {z w : ℂ} (hre : z.re ≤ w.re) (him : z.im ≤ w.im) + (hU : IsOpen U) (hRU : Rectangle z w ⊆ U) + (hf : DifferentiableOn ℂ f (U \ (↑S : Set ℂ))) + (hmero : ∀ s ∈ S, s ∈ U → MeromorphicAt f s) + (hS : ∀ s ∈ S, s ∉ frontier (Rectangle z w)) : + (∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - + (∫ x : ℝ in z.re..w.re, f (x + w.im * I)) + + I * (∫ y : ℝ in z.im..w.im, f (w.re + y * I)) - + I * (∫ y : ℝ in z.im..w.im, f (z.re + y * I)) = + 2 * π * I * ∑ s ∈ S with s ∈ Rectangle z w, residue f s := by + classical + have hfr : frontier (Rectangle z w) ⊆ U \ (↑S : Set ℂ) := by + intro s hs + exact ⟨hRU ((isClosed_rectangle z w).frontier_subset hs), fun h ↦ hS s h hs⟩ + have hcont : ContinuousOn f (frontier (Rectangle z w)) := + hf.continuousOn.mono hfr + rw [← smul_eq_mul I, ← smul_eq_mul I, ← integral_rectBoundary hcont, + classicalResidueTheorem_nullHomologous hU hf hmero + (isPiecewiseC1On_rectBoundary z w) (fun t _ ↦ hRU (rectBoundary_mem_rectangle t)) + (by simp) (fun t _ h ↦ hS _ h (rectBoundary_mem_frontier t)) + (isNullHomologous_rectBoundary hRU), Finset.sum_filter] + refine congrArg _ (Finset.sum_congr rfl fun s hs ↦ ?_) + by_cases hmem : s ∈ Rectangle z w + · rw [ite_eq_left hmem, windingNumber_rectBoundary_eq_one + (mem_Ioo_reProdIm_of_mem_rectangle hre him hmem (hS s hs)), one_mul] + · rw [ite_eq_right hmem, windingNumber_rectBoundary_eq_zero hmem, zero_mul] + +end TauCeti.Contour diff --git a/RealRooted/Mathlib/Analysis/Convex/LogDerivative.lean b/RealRooted/Mathlib/Analysis/Convex/LogDerivative.lean new file mode 100644 index 000000000..4d8a539a6 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Convex/LogDerivative.lean @@ -0,0 +1,43 @@ +/- +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.SpecialFunctions.Log.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +import Mathlib.Analysis.Convex.Deriv +import Mathlib.Analysis.SpecialFunctions.Log.Deriv + +/-! +# Logarithmic concavity from a differential inequality + +The inequality `f'² - f f'' ≥ 0` implies concavity of `log |f|` on every +zero-free interval. Real logarithms already satisfy `log f = log |f|`, so +negative functions require no separate sign assumption. +-/ + +public section + +/-- The differential inequality `f'² - f f'' ≥ 0` implies logarithmic +concavity on a convex zero-free set. -/ +theorem concaveOn_log_of_deriv_sq_sub_nonneg {f f' f'' : ℝ → ℝ} {S : Set ℝ} + (hS : Convex ℝ S) (hf : ∀ x ∈ S, HasDerivAt f (f' x) x) + (hf' : ∀ x ∈ S, HasDerivAt f' (f'' x) x) + (hne : ∀ x ∈ S, f x ≠ 0) + (hL : ∀ x ∈ S, 0 ≤ f' x ^ 2 - f x * f'' x) : + ConcaveOn ℝ S (fun x => Real.log (f x)) := by + apply concaveOn_of_hasDerivWithinAt2_nonpos hS + (f' := fun x => f' x / f x) + (f'' := fun x => (f'' x * f x - f' x * f' x) / f x ^ 2) + · intro x hx + exact ((hf x hx).log (hne x hx)).continuousAt.continuousWithinAt + · intro x hx + exact ((hf x (interior_subset hx)).log (hne x (interior_subset hx))).hasDerivWithinAt + · intro x hx + exact ((hf' x (interior_subset hx)).div (hf x (interior_subset hx)) + (hne x (interior_subset hx))).hasDerivWithinAt + · intro x hx + apply div_nonpos_of_nonpos_of_nonneg _ (sq_nonneg _) + nlinarith [hL x (interior_subset hx)] diff --git a/RealRooted/Mathlib/Analysis/Convex/LogSqrtSlope.lean b/RealRooted/Mathlib/Analysis/Convex/LogSqrtSlope.lean new file mode 100644 index 000000000..c76e51a32 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Convex/LogSqrtSlope.lean @@ -0,0 +1,52 @@ +/- +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.Deriv.Basic +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.Convex.Deriv +import Mathlib.Analysis.SpecialFunctions.Log.Deriv +import Mathlib.Analysis.SpecialFunctions.Sqrt + +/-! +# Log-concavity after the square-root substitution + +Strict concavity of `log (w (sqrt t))` makes `-w' / (t * w)` strictly increasing. +Only first derivatives of the weight are required. +-/ + +public section + +open Set Real + +namespace StrictConcaveOn + +/-- Strict log-concavity after a square-root substitution gives an increasing scaled +logarithmic slope on the positive half-line. -/ +theorem strictMonoOn_neg_deriv_div_mul {w w' : ℝ → ℝ} + (hc : StrictConcaveOn ℝ (Ioi (0 : ℝ)) (fun u => log (w (sqrt u)))) + (hw : ∀ t ∈ Ioi (0 : ℝ), 0 < w t) + (hd : ∀ t ∈ Ioi (0 : ℝ), HasDerivAt w (w' t) t) : + StrictMonoOn (fun t => -(w' t) / (t * w t)) (Ioi (0 : ℝ)) := by + have hF (u : ℝ) (hu : u ∈ Ioi (0 : ℝ)) : + HasDerivAt (fun v => log (w (sqrt v))) + ((w (sqrt u))⁻¹ * (w' (sqrt u) * (1 / (2 * sqrt u)))) u := by + exact (hasDerivAt_log (hw _ (sqrt_pos.mpr hu)).ne').comp u + ((hd _ (sqrt_pos.mpr hu)).comp u (hasDerivAt_sqrt hu.ne')) + have ha := hc.strictAntiOn_deriv (fun u hu => (hF u hu).differentiableAt) + have he (t : ℝ) (ht : t ∈ Ioi (0 : ℝ)) : + -(w' t) / (t * w t) = -2 * deriv (fun u => log (w (sqrt u))) (t ^ 2) := by + rw [(hF (t ^ 2) (sq_pos_of_pos ht)).deriv, sqrt_sq ht.le] + field_simp [ht.ne', (hw t ht).ne'] + intro x hx y hy hxy + change -(w' x) / (x * w x) < -(w' y) / (y * w y) + rw [he x hx, he y hy] + have hsq : x ^ 2 < y ^ 2 := by + nlinarith [mul_pos (sub_pos.mpr hxy) (add_pos hx hy)] + have h := ha (sq_pos_of_pos hx) (sq_pos_of_pos hy) hsq + linarith + +end StrictConcaveOn diff --git a/RealRooted/Mathlib/Analysis/Matrix/CoordinateSpectralMeasure.lean b/RealRooted/Mathlib/Analysis/Matrix/CoordinateSpectralMeasure.lean new file mode 100644 index 000000000..b7d44003a --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Matrix/CoordinateSpectralMeasure.lean @@ -0,0 +1,123 @@ +/- +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.Matrix.Spectrum +import Mathlib.Analysis.Matrix.PosDef +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.MeasureTheory.Integral.Bochner.SumMeasure + +/-! +# Coordinate spectral measures of real symmetric matrices + +The spectral measure at a coordinate places squared eigenvector-coordinate +weights at the eigenvalues. Its moments are the diagonal entries of matrix +powers. For a positive semidefinite matrix it is carried by the nonnegative +half-line. These are vector-state measures, distinct from empirical spectral +measures whose moments are normalized traces. +-/ + +public section + +open MeasureTheory Unitary +open scoped BigOperators + +namespace Matrix + +variable {ι : Type*} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} + +/-- A diagonal entry of a matrix power is a weighted sum of eigenvalue powers, +with weights given by squared eigenvector coordinates. -/ +theorem IsHermitian.pow_apply_self_eq_sum (hA : A.IsHermitian) (i : ι) (k : ℕ) : + (A ^ k) i i = ∑ j, (hA.eigenvectorUnitary : Matrix ι ι ℝ) i j ^ 2 * + hA.eigenvalues j ^ k := by + conv_lhs => rw [hA.spectral_theorem, ← map_pow] + rw [conjStarAlgAut_apply, diagonal_pow, Matrix.mul_apply] + apply Finset.sum_congr rfl + intro j _ + simp only [mul_diagonal, star_apply, Pi.pow_apply, Function.comp_apply, + RCLike.ofReal_real_eq_id, id_eq, star_trivial] + ring + +/-- The spectral measure of a real symmetric matrix at a coordinate. -/ +@[expose] noncomputable def IsHermitian.coordinateSpectralMeasure + (hA : A.IsHermitian) (i : ι) : Measure ℝ := + Measure.sum fun j => + ENNReal.ofReal ((hA.eigenvectorUnitary : Matrix ι ι ℝ) i j ^ 2) • + Measure.dirac (hA.eigenvalues j) + +/-- Every real-valued function is integrable for a coordinate spectral measure, +since the measure has finite support and finite weights. -/ +theorem IsHermitian.integrable_coordinateSpectralMeasure + (hA : A.IsHermitian) (i : ι) (f : ℝ → ℝ) : + Integrable f (hA.coordinateSpectralMeasure i) := by + exact integrable_sum_dirac (fun _ => ENNReal.ofReal_ne_top) Summable.of_finite + +/-- Integration for a coordinate spectral measure is a finite weighted sum. -/ +theorem IsHermitian.integral_coordinateSpectralMeasure + (hA : A.IsHermitian) (i : ι) (f : ℝ → ℝ) : + (∫ x, f x ∂hA.coordinateSpectralMeasure i) = + ∑ j, (hA.eigenvectorUnitary : Matrix ι ι ℝ) i j ^ 2 * f (hA.eigenvalues j) := by + rw [coordinateSpectralMeasure, integral_sum_dirac (fun _ => ENNReal.ofReal_ne_top), + tsum_fintype] + apply Finset.sum_congr rfl + intro j _ + rw [ENNReal.toReal_ofReal (sq_nonneg _), smul_eq_mul] + +/-- Every natural moment is the corresponding diagonal entry of a matrix power. -/ +theorem IsHermitian.integral_pow_coordinateSpectralMeasure + (hA : A.IsHermitian) (i : ι) (k : ℕ) : + (∫ x : ℝ, x ^ k ∂hA.coordinateSpectralMeasure i) = (A ^ k) i i := by + rw [hA.integral_coordinateSpectralMeasure, hA.pow_apply_self_eq_sum] + +/-- The coordinate spectral measure has total mass one. -/ +theorem IsHermitian.isProbabilityMeasure_coordinateSpectralMeasure + (hA : A.IsHermitian) (i : ι) : + IsProbabilityMeasure (hA.coordinateSpectralMeasure i) := by + apply isProbabilityMeasure_iff_real.mpr + simpa only [pow_zero, integral_const, smul_eq_mul, mul_one, Matrix.one_apply_eq] using + hA.integral_pow_coordinateSpectralMeasure i 0 + +/-- A coordinate spectral measure is carried by the finite set of eigenvalues. -/ +theorem IsHermitian.ae_mem_range_coordinateSpectralMeasure + (hA : A.IsHermitian) (i : ι) : + ∀ᵐ x ∂hA.coordinateSpectralMeasure i, x ∈ Set.range hA.eigenvalues := by + apply Measure.ae_sum_iff.mpr + intro j + apply Measure.ae_smul_measure + rw [ae_dirac_eq] + exact ⟨j, rfl⟩ + +/-- A positive semidefinite matrix gives a nonnegative coordinate spectral law. -/ +theorem PosSemidef.ae_nonneg_coordinateSpectralMeasure + (hA : A.PosSemidef) (i : ι) : + ∀ᵐ x ∂hA.isHermitian.coordinateSpectralMeasure i, 0 ≤ x := by + filter_upwards [hA.isHermitian.ae_mem_range_coordinateSpectralMeasure i] with x hx + obtain ⟨j, rfl⟩ := hx + exact hA.eigenvalues_nonneg j + +/-- Nonnegative scalar multiples of diagonal matrix-power moments of a positive +semidefinite real matrix have genuine finite Stieltjes representing measures. +The scalar may be zero, and zero eigenvalues are included. -/ +theorem PosSemidef.exists_measure_moments_pow_apply + (hA : A.PosSemidef) (i : ι) {c : ℝ} (hc : 0 ≤ c) : + ∃ μ : Measure ℝ, IsFiniteMeasure μ ∧ (∀ᵐ x ∂μ, 0 ≤ x) ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) μ ∧ + (∫ x : ℝ, x ^ k ∂μ) = c * (A ^ k) i i := by + let μ := ENNReal.ofReal c • hA.isHermitian.coordinateSpectralMeasure i + have hint (k : ℕ) : Integrable (fun x : ℝ => x ^ k) μ := + (hA.isHermitian.integrable_coordinateSpectralMeasure i _).smul_measure + ENNReal.ofReal_ne_top + have hfin : IsFiniteMeasure μ := + (integrable_const_iff_isFiniteMeasure (by norm_num : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hint 0) + refine ⟨μ, hfin, Measure.ae_smul_measure (hA.ae_nonneg_coordinateSpectralMeasure i) _, + fun k => ⟨hint k, ?_⟩⟩ + rw [show μ = ENNReal.ofReal c • hA.isHermitian.coordinateSpectralMeasure i from rfl, + integral_smul_measure, hA.isHermitian.integral_pow_coordinateSpectralMeasure, + ENNReal.toReal_ofReal hc, smul_eq_mul] + +end Matrix diff --git a/RealRooted/Mathlib/Analysis/MellinInversion/Decay.lean b/RealRooted/Mathlib/Analysis/MellinInversion/Decay.lean new file mode 100644 index 000000000..81c00188d --- /dev/null +++ b/RealRooted/Mathlib/Analysis/MellinInversion/Decay.lean @@ -0,0 +1,116 @@ +/- +Copyright (c) 2026 The Tau Ceti contributors, RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: The Tau Ceti contributors, RealRooted contributors +-/ +module + +public import Mathlib.Analysis.MellinInversion +import Mathlib.Analysis.SpecialFunctions.JapaneseBracket +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.FieldSimp + +/-! +# Decay of the first-order Mellin kernel + +The kernel `1 / (s * (s + 1))` has quadratic decay on every vertical line avoiding its +poles. Multiplication by a continuous function of sublinear power growth preserves +absolute integrability on the line. + +The denominator comparison is adapted from +`TauCeti.verticalIntegrable_inv_mul_add_one`, Tau Ceti revision +`d91980bdc255e6e50506be147ad9bcb88eb9fcc0`, `Analysis/MellinInversion.lean` (Apache-2.0). +-/ + +public section + +open MeasureTheory Filter + +namespace Complex + +/-- Comparing each factor with a positive horizontal distance bounds the inverse kernel. -/ +private theorem norm_inv_mul_add_one_le_inv_sq {c d : ℝ} (hd : 0 < d) + (hdc : d ≤ |c|) (hdc1 : d ≤ |c + 1|) (t : ℝ) : + ‖(((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1))⁻¹‖ ≤ (d ^ 2 + t ^ 2)⁻¹ := by + rw [norm_inv, norm_mul] + have hnorm (a : ℝ) (ha : d ≤ |a|) : + Real.sqrt (d ^ 2 + t ^ 2) ≤ ‖(a : ℂ) + t * I‖ := by + apply (Real.sqrt_le_left (norm_nonneg _)).mpr + rw [Complex.sq_norm, Complex.normSq_add_mul_I] + nlinarith only [ha, hd.le, sq_abs a] + have hshift : (c : ℂ) + t * I + 1 = ((c + 1 : ℝ) : ℂ) + t * I := by + push_cast + ring + apply inv_anti₀ (by positivity) + calc + d ^ 2 + t ^ 2 = (Real.sqrt (d ^ 2 + t ^ 2)) ^ 2 := + (Real.sq_sqrt (by positivity)).symm + _ ≤ ‖(c : ℂ) + t * I‖ * ‖(c : ℂ) + t * I + 1‖ := by + rw [sq, hshift] + exact mul_le_mul (hnorm c hdc) (hnorm (c + 1) hdc1) + (Real.sqrt_nonneg _) (norm_nonneg _) + +/-- The first-order Mellin kernel has quadratic decay along every line avoiding its poles. -/ +theorem exists_norm_inv_mul_add_one_le_rpow {c : ℝ} (hc : c ≠ 0) (hc1 : c ≠ -1) : + ∃ A : ℝ, 0 < A ∧ ∀ t : ℝ, + ‖(((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1))⁻¹‖ ≤ + A * (1 + |t|) ^ (-2 : ℝ) := by + let d := min |c| |c + 1| + have hd : 0 < d := lt_min (abs_pos.mpr hc) + (abs_pos.mpr (by simpa using sub_ne_zero.mpr hc1)) + let A : ℝ := 2 / d ^ 2 + 2 + have hA : 2 ≤ A := by + dsimp only [A] + have : 0 ≤ 2 / d ^ 2 := by positivity + linarith + have hAd : 2 ≤ A * d ^ 2 := by + dsimp only [A] + rw [add_mul, div_mul_cancel₀ _ (pow_ne_zero _ hd.ne')] + nlinarith [sq_nonneg d] + refine ⟨A, by linarith, fun t ↦ ?_⟩ + have hw : 0 < 1 + |t| := by positivity + calc + _ ≤ (d ^ 2 + t ^ 2)⁻¹ := + norm_inv_mul_add_one_le_inv_sq hd (min_le_left _ _) (min_le_right _ _) t + _ ≤ A / (1 + |t|) ^ 2 := by + rw [← one_div, div_le_div_iff₀ (by positivity) (sq_pos_of_pos hw)] + nlinarith [sq_abs t, sq_nonneg (|t| - 1), + mul_le_mul_of_nonneg_right hA (sq_nonneg t)] + _ = A * (1 + |t|) ^ (-2 : ℝ) := by + rw [Real.rpow_neg hw.le, Real.rpow_two] + rfl + +/-- A continuous function of power growth strictly below one can multiply the first-order +Mellin kernel without destroying absolute integrability along the vertical line. -/ +theorem verticalIntegrable_div_mul_add_one_of_le_rpow {F : ℂ → ℂ} {c C r : ℝ} + (hc : c ≠ 0) (hc1 : c ≠ -1) (hr : r < 1) + (hF : Continuous (fun t : ℝ ↦ F ((c : ℂ) + t * I))) + (hbound : ∀ t : ℝ, ‖F ((c : ℂ) + t * I)‖ ≤ C * (1 + |t|) ^ r) : + VerticalIntegrable (fun s : ℂ ↦ F s / (s * (s + 1))) c := by + obtain ⟨A, hA, hkernel⟩ := exists_norm_inv_mul_add_one_le_rpow hc hc1 + have hC : 0 ≤ C := by + simpa using (norm_nonneg (F c)).trans (by simpa using hbound 0) + have hmajor : Integrable (fun t : ℝ ↦ C * A * (1 + |t|) ^ (r - 2)) := by + have h := (integrable_one_add_norm (μ := volume) (E := ℝ) + (by simpa using (show (1 : ℝ) < 2 - r by linarith))).const_mul (C * A) + simpa only [neg_sub, Real.norm_eq_abs] using h + have hs0 (t : ℝ) : (c : ℂ) + t * I ≠ 0 := by + intro h + exact hc (by simpa using congrArg Complex.re h) + have hs1 (t : ℝ) : (c : ℂ) + t * I + 1 ≠ 0 := by + intro h + have h' : c + 1 = 0 := by simpa using congrArg Complex.re h + exact hc1 (by linarith) + have hcont := hF.div (by fun_prop) (fun t ↦ mul_ne_zero (hs0 t) (hs1 t)) + refine hmajor.mono' hcont.aestronglyMeasurable + (Eventually.of_forall fun t ↦ ?_) + dsimp only + rw [div_eq_mul_inv, norm_mul] + calc + _ ≤ (C * (1 + |t|) ^ r) * (A * (1 + |t|) ^ (-2 : ℝ)) := + mul_le_mul (hbound t) (hkernel t) (norm_nonneg _) (by positivity) + _ = C * A * (1 + |t|) ^ (r - 2) := by + rw [mul_mul_mul_comm, ← Real.rpow_add (by positivity)] + congr 2 + +end Complex diff --git a/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifference.lean b/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifference.lean new file mode 100644 index 000000000..e1510548f --- /dev/null +++ b/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifference.lean @@ -0,0 +1,166 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.Analysis.SpecialFunctions.Pow.Deriv +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring +import TauCeti.Analysis.SpecialFunctions.Pow.Bounds + +/-! +# Finite differences of the first-order Riesz kernel + +For the kernel `x ^ (s + 1) / (s * (s + 1))`, differences in the positive real +variable satisfy two complementary bounds. Differentiating first gives decay +`1 / ‖s‖`, uniformly in the difference step. Bounding the two endpoints gives +decay `1 / (‖s‖ * ‖s + 1‖)`, with an additional inverse step. + +The combined bound applies to normalized forward and backward differences for +`0 < h ≤ x / 2`. The hypotheses `0 ≤ s.re ≤ 1` include the critical line and +every positive line to its left. No zero-free or Riemann-hypothesis assumption +is used here. +-/ + +public section + +namespace Complex + +/-- Differentiating the first-order Riesz kernel removes the factor `s + 1`. -/ +theorem hasDerivAt_cpow_div_mul_add_one {x : ℝ} {s : ℂ} + (hx : x ≠ 0) (hs : s ≠ -1) : + HasDerivAt (fun y : ℝ ↦ (y : ℂ) ^ (s + 1) / (s * (s + 1))) + ((x : ℂ) ^ s / s) x := by + simpa only [div_div, mul_comm (s + 1) s] using + (hasDerivAt_ofReal_cpow_const' hx hs).div_const s + +/-- The Riesz kernel has a uniform Lipschitz bound on `[x / 2, 2 * x]`. -/ +theorem norm_sub_cpow_div_mul_add_one_le_mul {x y z : ℝ} {s : ℂ} + (hx : 0 < x) (hs₀ : 0 ≤ s.re) (hs₁ : s.re ≤ 1) + (hy : y ∈ Set.Icc (x / 2) (2 * x)) + (hz : z ∈ Set.Icc (x / 2) (2 * x)) : + ‖(y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))‖ ≤ + (2 * x ^ s.re / ‖s‖) * |y - z| := by + have hs : s ≠ -1 := by + intro h + have : s.re = -1 := by simp [h] + linarith + have hd (u : ℝ) (hu : u ∈ Set.Icc (x / 2) (2 * x)) : + HasDerivWithinAt + (fun v : ℝ ↦ (v : ℂ) ^ (s + 1) / (s * (s + 1))) + ((u : ℂ) ^ s / s) (Set.Icc (x / 2) (2 * x)) u := by + have hu₀ : 0 < u := by linarith [hu.1] + exact (hasDerivAt_cpow_div_mul_add_one hu₀.ne' hs).hasDerivWithinAt + have hb (u : ℝ) (hu : u ∈ Set.Icc (x / 2) (2 * x)) : + ‖(u : ℂ) ^ s / s‖ ≤ 2 * x ^ s.re / ‖s‖ := by + have hu₀ : 0 < u := by linarith [hu.1] + rw [norm_div, norm_cpow_eq_rpow_re_of_pos hu₀] + exact div_le_div_of_nonneg_right + (Real.rpow_le_two_mul_rpow_of_le_two_mul hu₀.le hu.2 hs₀ hs₁) + (norm_nonneg _) + simpa only [Real.norm_eq_abs] using + (convex_Icc (x / 2) (2 * x)).norm_image_sub_le_of_norm_hasDerivWithin_le + hd hb hz hy + +/-- On a fixed multiplicative neighborhood, the kernel has quadratic denominator decay. -/ +theorem norm_cpow_div_mul_add_one_le {x y : ℝ} {s : ℂ} + (hx : 0 < x) (hs₀ : 0 ≤ s.re) (hs₁ : s.re ≤ 1) + (hy : y ∈ Set.Icc (x / 2) (2 * x)) : + ‖(y : ℂ) ^ (s + 1) / (s * (s + 1))‖ ≤ + 4 * x ^ (s.re + 1) / (‖s‖ * ‖s + 1‖) := by + have hy₀ : 0 < y := by linarith [hy.1] + have hpow : y ^ (s.re + 1) ≤ 4 * x ^ (s.re + 1) := by + calc + y ^ (s.re + 1) ≤ (2 * x) ^ (s.re + 1) := + Real.rpow_le_rpow hy₀.le hy.2 (by linarith) + _ = (2 : ℝ) ^ (s.re + 1) * x ^ (s.re + 1) := + Real.mul_rpow (by norm_num) hx.le + _ ≤ 4 * x ^ (s.re + 1) := by + have htwo : (2 : ℝ) ^ (s.re + 1) ≤ 4 := by + calc + (2 : ℝ) ^ (s.re + 1) ≤ (2 : ℝ) ^ (2 : ℝ) := + Real.rpow_le_rpow_of_exponent_le (by norm_num) (by linarith) + _ = 4 := by norm_num [Real.rpow_two] + exact mul_le_mul_of_nonneg_right htwo (Real.rpow_nonneg hx.le _) + rw [norm_div, norm_mul, norm_cpow_eq_rpow_re_of_pos hy₀, add_re, one_re] + exact div_le_div_of_nonneg_right hpow (mul_nonneg (norm_nonneg _) (norm_nonneg _)) + +/-- Bounding the two endpoints gives a quadratic-denominator estimate for the difference. -/ +theorem norm_sub_cpow_div_mul_add_one_le {x y z : ℝ} {s : ℂ} + (hx : 0 < x) (hs₀ : 0 ≤ s.re) (hs₁ : s.re ≤ 1) + (hy : y ∈ Set.Icc (x / 2) (2 * x)) + (hz : z ∈ Set.Icc (x / 2) (2 * x)) : + ‖(y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))‖ ≤ + 8 * x ^ (s.re + 1) / (‖s‖ * ‖s + 1‖) := by + calc + _ ≤ ‖(y : ℂ) ^ (s + 1) / (s * (s + 1))‖ + + ‖(z : ℂ) ^ (s + 1) / (s * (s + 1))‖ := norm_sub_le _ _ + _ ≤ 4 * x ^ (s.re + 1) / (‖s‖ * ‖s + 1‖) + + 4 * x ^ (s.re + 1) / (‖s‖ * ‖s + 1‖) := + add_le_add (norm_cpow_div_mul_add_one_le hx hs₀ hs₁ hy) + (norm_cpow_div_mul_add_one_le hx hs₀ hs₁ hz) + _ = 8 * x ^ (s.re + 1) / (‖s‖ * ‖s + 1‖) := by ring + +/-- The normalized difference satisfies both the derivative and endpoint bounds. -/ +theorem norm_sub_cpow_div_mul_add_one_div_le_min {x y z h : ℝ} {s : ℂ} + (hx : 0 < x) (hh : 0 < h) (hs₀ : 0 ≤ s.re) (hs₁ : s.re ≤ 1) + (hy : y ∈ Set.Icc (x / 2) (2 * x)) + (hz : z ∈ Set.Icc (x / 2) (2 * x)) (hyz : |y - z| ≤ h) : + ‖((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (h : ℂ)‖ ≤ + min (2 * x ^ s.re / ‖s‖) + (8 * x ^ (s.re + 1) / (h * ‖s‖ * ‖s + 1‖)) := by + rw [norm_div, norm_real, Real.norm_eq_abs, abs_of_pos hh] + apply le_min + · calc + _ ≤ ((2 * x ^ s.re / ‖s‖) * |y - z|) / h := + div_le_div_of_nonneg_right + (norm_sub_cpow_div_mul_add_one_le_mul hx hs₀ hs₁ hy hz) hh.le + _ ≤ ((2 * x ^ s.re / ‖s‖) * h) / h := + div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_left hyz (by positivity)) hh.le + _ = 2 * x ^ s.re / ‖s‖ := mul_div_cancel_right₀ _ hh.ne' + · calc + _ ≤ (8 * x ^ (s.re + 1) / (‖s‖ * ‖s + 1‖)) / h := + div_le_div_of_nonneg_right + (norm_sub_cpow_div_mul_add_one_le hx hs₀ hs₁ hy hz) hh.le + _ = 8 * x ^ (s.re + 1) / (h * ‖s‖ * ‖s + 1‖) := by + rw [div_div] + congr 1 + ring + +/-- A forward difference combines uniform first-order and step-dependent second-order decay. -/ +theorem norm_forward_cpow_div_mul_add_one_le_min {x h : ℝ} {s : ℂ} + (hx : 0 < x) (hh : 0 < h) (hhx : h ≤ x / 2) + (hs₀ : 0 ≤ s.re) (hs₁ : s.re ≤ 1) : + ‖(((x + h : ℝ) : ℂ) ^ (s + 1) / (s * (s + 1)) - + (x : ℂ) ^ (s + 1) / (s * (s + 1))) / (h : ℂ)‖ ≤ + min (2 * x ^ s.re / ‖s‖) + (8 * x ^ (s.re + 1) / (h * ‖s‖ * ‖s + 1‖)) := by + apply norm_sub_cpow_div_mul_add_one_div_le_min hx hh hs₀ hs₁ + · constructor <;> linarith + · constructor <;> linarith + · rw [add_sub_cancel_left, abs_of_pos hh] + +/-- A backward difference satisfies the same two bounds as a forward difference. -/ +theorem norm_backward_cpow_div_mul_add_one_le_min {x h : ℝ} {s : ℂ} + (hx : 0 < x) (hh : 0 < h) (hhx : h ≤ x / 2) + (hs₀ : 0 ≤ s.re) (hs₁ : s.re ≤ 1) : + ‖((x : ℂ) ^ (s + 1) / (s * (s + 1)) - + ((x - h : ℝ) : ℂ) ^ (s + 1) / (s * (s + 1))) / (h : ℂ)‖ ≤ + min (2 * x ^ s.re / ‖s‖) + (8 * x ^ (s.re + 1) / (h * ‖s‖ * ‖s + 1‖)) := by + apply norm_sub_cpow_div_mul_add_one_div_le_min hx hh hs₀ hs₁ + · constructor <;> linarith + · constructor <;> linarith + · rw [sub_sub_cancel, abs_of_pos hh] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifferenceIntegral.lean b/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifferenceIntegral.lean new file mode 100644 index 000000000..516f30d1d --- /dev/null +++ b/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifferenceIntegral.lean @@ -0,0 +1,111 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifferenceInterpolation +import Mathlib.Analysis.SpecialFunctions.JapaneseBracket +import Mathlib.Analysis.SpecialFunctions.Pow.Continuity + +/-! +# Integral bounds for weighted finite differences of the Mellin kernel + +A continuous line weight of growth `(1 + |t|)^r` is integrable against the +interpolated difference kernel when `r < p`. The resulting difference integral +is bounded by a constant times `x^(c+p) / h^p`. +-/ + +public section + +open Set MeasureTheory Filter + +namespace Complex + +private theorem continuous_weighted_difference {F : ℂ → ℂ} {c : ℝ} + (hc0 : 0 < c) (hF : Continuous (fun t : ℝ ↦ F ((c : ℂ) + t * I))) + (h y z : ℝ) (hy0 : 0 < y) (hz0 : 0 < z) : + Continuous (fun t : ℝ ↦ + let s := (c : ℂ) + t * I + F s * (((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (h : ℂ))) := by + let s (t : ℝ) : ℂ := (c : ℂ) + t * I + let D (t : ℝ) : ℂ := + ((y : ℂ) ^ (s t + 1) / (s t * (s t + 1)) - + (z : ℂ) ^ (s t + 1) / (s t * (s t + 1))) / (h : ℂ) + have hs0 (t : ℝ) : s t ≠ 0 := by + intro ht + have : c = 0 := by simpa [s] using congrArg Complex.re ht + exact hc0.ne' this + have hs1 (t : ℝ) : s t + 1 ≠ 0 := by + intro ht + have : c + 1 = 0 := by simpa [s] using congrArg Complex.re ht + linarith + have hs : Continuous s := by dsimp [s]; fun_prop + have hden : Continuous (fun t ↦ s t * (s t + 1)) := hs.mul (hs.add_const 1) + have hpow (u : ℝ) (hu : 0 < u) : Continuous (fun t : ℝ ↦ (u : ℂ) ^ (s t + 1)) := + (hs.add_const 1).const_cpow (Or.inl (ofReal_ne_zero.mpr hu.ne')) + have hD : Continuous D := + (((hpow y hy0).div hden (fun t ↦ mul_ne_zero (hs0 t) (hs1 t))).sub + ((hpow z hz0).div hden (fun t ↦ mul_ne_zero (hs0 t) (hs1 t)))).div_const (h : ℂ) + exact hF.mul hD + +/-- A sublinear line weight can multiply the interpolated finite-difference kernel. +The estimate retains the full step dependence and proves genuine integrability. -/ +theorem exists_norm_integral_difference_line_le_rpow {F : ℂ → ℂ} {c C r p : ℝ} + (hc0 : 0 < c) (hc1 : c ≤ 1) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (hrp : r < p) + (hF : Continuous (fun t : ℝ ↦ F ((c : ℂ) + t * I))) + (hbound : ∀ t : ℝ, ‖F ((c : ℂ) + t * I)‖ ≤ C * (1 + |t|) ^ r) : + ∃ K : ℝ, 0 < K ∧ ∀ x h y z : ℝ, + 0 < x → 0 < h → y ∈ Icc (x / 2) (2 * x) → z ∈ Icc (x / 2) (2 * x) → + |y - z| ≤ h → + let g := fun t : ℝ ↦ + let s := (c : ℂ) + t * I + F s * (((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (h : ℂ)) + Integrable g ∧ ‖∫ t, g t‖ ≤ K * (x ^ (c + p) / h ^ p) := by + obtain ⟨M, hM, hkernel⟩ := exists_norm_difference_line_le_rpow hc0 hc1 hp0 hp1 + have hC : 0 ≤ C := by + have hb0 := hbound 0 + simpa using (norm_nonneg (F c)).trans (by simpa using hb0) + let J : ℝ := ∫ t : ℝ, (1 + |t|) ^ (r - 1 - p) + have hJ0 : 0 ≤ J := integral_nonneg (fun t ↦ Real.rpow_nonneg (by positivity) _) + have hJ : Integrable (fun t : ℝ ↦ (1 + |t|) ^ (r - 1 - p)) := by + have hq : (1 : ℝ) < 1 + p - r := by linarith + have hexp : -(1 + p - r) = r - 1 - p := by ring + simpa only [Real.norm_eq_abs, hexp] using + (integrable_one_add_norm (E := ℝ) (μ := volume) + (r := 1 + p - r) (by simpa using hq)) + refine ⟨C * M * J + 1, by positivity, fun x h y z hx hh hy hz hyz ↦ ?_⟩ + dsimp only + let s (t : ℝ) : ℂ := (c : ℂ) + t * I + let D (t : ℝ) : ℂ := + ((y : ℂ) ^ (s t + 1) / (s t * (s t + 1)) - + (z : ℂ) ^ (s t + 1) / (s t * (s t + 1))) / (h : ℂ) + let a : ℝ := x ^ (c + p) / h ^ p + have ha : 0 ≤ a := by dsimp [a]; positivity + have hpoint (t : ℝ) : ‖F (s t) * D t‖ ≤ C * M * a * (1 + |t|) ^ (r - 1 - p) := by + rw [norm_mul] + calc + _ ≤ (C * (1 + |t|) ^ r) * (M * a * (1 + |t|) ^ (-1 - p)) := + mul_le_mul (hbound t) (hkernel x h y z hx hh hy hz hyz t) + (norm_nonneg _) (by positivity) + _ = C * M * a * ((1 + |t|) ^ r * (1 + |t|) ^ (-1 - p)) := by ring + _ = C * M * a * (1 + |t|) ^ (r - 1 - p) := by + rw [← Real.rpow_add (by positivity : 0 < 1 + |t|)] + rw [show r + (-1 - p) = r - 1 - p by ring] + have hcont : Continuous (fun t ↦ F (s t) * D t) := + continuous_weighted_difference hc0 hF h y z (by linarith [hy.1]) (by linarith [hz.1]) + have hmajor : Integrable (fun t : ℝ ↦ C * M * a * (1 + |t|) ^ (r - 1 - p)) := + hJ.const_mul (C * M * a) + refine ⟨hmajor.mono' hcont.aestronglyMeasurable (Eventually.of_forall hpoint), ?_⟩ + calc + ‖∫ t, F (s t) * D t‖ ≤ ∫ t : ℝ, C * M * a * (1 + |t|) ^ (r - 1 - p) := + norm_integral_le_of_norm_le hmajor (Eventually.of_forall hpoint) + _ = C * M * a * J := by rw [integral_const_mul] + _ ≤ (C * M * J + 1) * a := by nlinarith + +end Complex diff --git a/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifferenceInterpolation.lean b/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifferenceInterpolation.lean new file mode 100644 index 000000000..51e78079f --- /dev/null +++ b/RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifferenceInterpolation.lean @@ -0,0 +1,134 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifference +import RealRooted.Mathlib.Analysis.MellinInversion.Decay +import RealRooted.Mathlib.Analysis.SpecialFunctions.Pow.Interpolation + +/-! +# Interpolated decay of finite differences on a positive vertical line + +Interpolating the reciprocal and quadratic kernel estimates gives decay +`(1 + |t|)^(-1-p)` with coefficient `x^(c+p) / h^p` for `0 ≤ p ≤ 1`. +-/ + +public section + +open Set + +namespace Complex + +/-- The reciprocal of a vertical line away from zero has uniform first-order decay. -/ +theorem exists_norm_inv_line_le_rpow {c : ℝ} (hc : c ≠ 0) : + ∃ A : ℝ, 0 < A ∧ ∀ t : ℝ, + ‖((c : ℂ) + t * I)⁻¹‖ ≤ A * (1 + |t|) ^ (-1 : ℝ) := by + let A : ℝ := 1 / |c| + 1 + have hc0 : 0 < |c| := abs_pos.mpr hc + refine ⟨A, by dsimp [A]; positivity, fun t ↦ ?_⟩ + have hr : |c| ≤ ‖(c : ℂ) + t * I‖ := by + simpa using abs_re_le_norm ((c : ℂ) + t * I) + have hi : |t| ≤ ‖(c : ℂ) + t * I‖ := by + simpa using abs_im_le_norm ((c : ℂ) + t * I) + have hn : 0 < ‖(c : ℂ) + t * I‖ := hc0.trans_le hr + have h1 : 1 ≤ ‖(c : ℂ) + t * I‖ / |c| := (one_le_div hc0).mpr hr + have hbound : 1 + |t| ≤ A * ‖(c : ℂ) + t * I‖ := by + calc + _ ≤ ‖(c : ℂ) + t * I‖ / |c| + ‖(c : ℂ) + t * I‖ := by linarith + _ = _ := by dsimp [A]; ring + rw [norm_inv, Real.rpow_neg_one] + calc + ‖(c : ℂ) + t * I‖⁻¹ = 1 / ‖(c : ℂ) + t * I‖ := (one_div _).symm + _ ≤ A / (1 + |t|) := (div_le_div_iff₀ hn (by positivity)).mpr (by simpa using hbound) + _ = A * (1 + |t|)⁻¹ := rfl + +private theorem interpolation_weight_identity {M x h w : ℝ} + (hM : 0 < M) (hx : 0 < x) (hh : 0 < h) (hw : 0 < w) (c p : ℝ) : + (M * x ^ c * w ^ (-1 : ℝ)) ^ (1 - p) * + (M * x ^ (c + 1) / h * w ^ (-2 : ℝ)) ^ p = + M * (x ^ (c + p) / h ^ p) * w ^ (-1 - p) := by + have hU : 0 < M * x ^ c * w ^ (-1 : ℝ) := by positivity + have hV : 0 < M * x ^ (c + 1) / h * w ^ (-2 : ℝ) := by positivity + have hlogU : Real.log (M * x ^ c * w ^ (-1 : ℝ)) = + Real.log M + c * Real.log x - Real.log w := by + rw [Real.log_mul (by positivity) (by positivity), Real.log_mul hM.ne' (by positivity), + Real.log_rpow hx, Real.log_rpow hw] + ring + have hlogV : Real.log (M * x ^ (c + 1) / h * w ^ (-2 : ℝ)) = + Real.log M + (c + 1) * Real.log x - Real.log h - 2 * Real.log w := by + rw [Real.log_mul (by positivity) (by positivity), Real.log_div (by positivity) hh.ne', + Real.log_mul hM.ne' (by positivity), Real.log_rpow hx, Real.log_rpow hw] + ring + have hlogR : Real.log (M * (x ^ (c + p) / h ^ p) * w ^ (-1 - p)) = + Real.log M + (c + p) * Real.log x - p * Real.log h + (-1 - p) * Real.log w := by + rw [Real.log_mul (by positivity) (by positivity), Real.log_mul hM.ne' (by positivity), + Real.log_div (by positivity) (by positivity), Real.log_rpow hx, + Real.log_rpow hh, Real.log_rpow hw] + ring + apply Real.log_injOn_pos (mem_Ioi.mpr (by positivity)) (mem_Ioi.mpr (by positivity)) + rw [Real.log_mul (by positivity) (by positivity), Real.log_rpow hU, + Real.log_rpow hV, hlogU, hlogV, hlogR] + ring + +/-- On a positive vertical line, interpolating the two finite-difference estimates gives +arbitrary intermediate denominator decay. -/ +theorem exists_norm_difference_line_le_rpow {c p : ℝ} + (hc0 : 0 < c) (hc1 : c ≤ 1) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) : + ∃ M : ℝ, 0 < M ∧ ∀ x h y z : ℝ, + 0 < x → 0 < h → y ∈ Icc (x / 2) (2 * x) → z ∈ Icc (x / 2) (2 * x) → + |y - z| ≤ h → ∀ t : ℝ, + let s := (c : ℂ) + t * I + ‖((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (h : ℂ)‖ ≤ + M * (x ^ (c + p) / h ^ p) * (1 + |t|) ^ (-1 - p) := by + obtain ⟨A0, hA0, hfirst⟩ := exists_norm_inv_line_le_rpow hc0.ne' + obtain ⟨A1, hA1, hsecond⟩ := exists_norm_inv_mul_add_one_le_rpow hc0.ne' + (by linarith : c ≠ -1) + let M : ℝ := 2 * A0 + 8 * A1 + have hM : 0 < M := by dsimp [M]; positivity + refine ⟨M, hM, fun x h y z hx hh hy hz hyz t ↦ ?_⟩ + let s : ℂ := (c : ℂ) + t * I + let D : ℂ := ((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (h : ℂ) + have hs : s.re = c := by simp [s] + have hmin := norm_sub_cpow_div_mul_add_one_div_le_min (s := s) + hx hh (by rw [hs]; exact hc0.le) (by rw [hs]; exact hc1) hy hz hyz + have hU : ‖D‖ ≤ M * x ^ c * (1 + |t|) ^ (-1 : ℝ) := by + calc + ‖D‖ ≤ 2 * x ^ c / ‖s‖ := by simpa only [D, hs] using (le_min_iff.mp hmin).1 + _ = 2 * x ^ c * ‖s⁻¹‖ := by rw [norm_inv]; rfl + _ ≤ 2 * x ^ c * (A0 * (1 + |t|) ^ (-1 : ℝ)) := + mul_le_mul_of_nonneg_left (hfirst t) (by positivity) + _ = (2 * A0) * x ^ c * (1 + |t|) ^ (-1 : ℝ) := by ring + _ ≤ M * x ^ c * (1 + |t|) ^ (-1 : ℝ) := by + gcongr + dsimp [M] + linarith + have hV : ‖D‖ ≤ M * x ^ (c + 1) / h * (1 + |t|) ^ (-2 : ℝ) := by + calc + ‖D‖ ≤ 8 * x ^ (c + 1) / (h * ‖s‖ * ‖s + 1‖) := by + simpa only [D, hs] using (le_min_iff.mp hmin).2 + _ = (8 * x ^ (c + 1) / h) * ‖(s * (s + 1))⁻¹‖ := by + rw [norm_inv, norm_mul] + ring + _ ≤ (8 * x ^ (c + 1) / h) * (A1 * (1 + |t|) ^ (-2 : ℝ)) := + mul_le_mul_of_nonneg_left (hsecond t) (by positivity) + _ = (8 * A1) * x ^ (c + 1) / h * (1 + |t|) ^ (-2 : ℝ) := by ring + _ ≤ M * x ^ (c + 1) / h * (1 + |t|) ^ (-2 : ℝ) := by + gcongr + dsimp [M] + linarith + calc + ‖D‖ ≤ min (M * x ^ c * (1 + |t|) ^ (-1 : ℝ)) + (M * x ^ (c + 1) / h * (1 + |t|) ^ (-2 : ℝ)) := le_min hU hV + _ ≤ (M * x ^ c * (1 + |t|) ^ (-1 : ℝ)) ^ (1 - p) * + (M * x ^ (c + 1) / h * (1 + |t|) ^ (-2 : ℝ)) ^ p := + Real.min_le_rpow_one_sub_mul_rpow (by positivity) (by positivity) hp0 hp1 + _ = M * (x ^ (c + p) / h ^ p) * (1 + |t|) ^ (-1 - p) := + interpolation_weight_identity hM hx hh (by positivity) c p + +end Complex diff --git a/RealRooted/Mathlib/Analysis/MellinInversion/HorizontalDecay.lean b/RealRooted/Mathlib/Analysis/MellinInversion/HorizontalDecay.lean new file mode 100644 index 000000000..3eb799ddb --- /dev/null +++ b/RealRooted/Mathlib/Analysis/MellinInversion/HorizontalDecay.lean @@ -0,0 +1,99 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Analysis.Asymptotics.Lemmas +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +/-! +# Decay of horizontal Riesz integrals + +Uniform logarithmic-square growth of a multiplier is dominated by the +quadratic denominator decay of the first-order Riesz kernel. The resulting +horizontal integrals vanish at large absolute heights for every fixed `x ≥ 1`. +-/ + +public section + +open Filter Set MeasureTheory +open scoped Topology Interval + +namespace Complex + +/-- A lower bound on the imaginary part controls both Riesz denominator factors. -/ +theorem norm_mul_cpow_div_mul_add_one_le {F : ℂ → ℂ} {s : ℂ} {x T B b : ℝ} + (hx : 1 ≤ x) (hT : 0 < T) (hs : s.re ≤ b) (ht : T ≤ |s.im|) + (hF : ‖F s‖ ≤ B) : + ‖F s * (x : ℂ) ^ (s + 1) / (s * (s + 1))‖ ≤ + B * x ^ (b + 1) / T ^ 2 := by + have hx₀ : 0 < x := by linarith + have hB : 0 ≤ B := (norm_nonneg _).trans hF + have hs₀ : T ≤ ‖s‖ := ht.trans (abs_im_le_norm s) + have hs₁ : T ≤ ‖s + 1‖ := ht.trans (by simpa using abs_im_le_norm (s + 1)) + have hden : T ^ 2 ≤ ‖s‖ * ‖s + 1‖ := by + rw [sq] + exact mul_le_mul hs₀ hs₁ hT.le (norm_nonneg _) + have hpow : x ^ (s + 1).re ≤ x ^ (b + 1) := + Real.rpow_le_rpow_of_exponent_le hx (by simpa using add_le_add_right hs 1) + rw [norm_div, norm_mul, norm_mul, norm_cpow_eq_rpow_re_of_pos hx₀] + exact div_le_div₀ (mul_nonneg hB (Real.rpow_nonneg hx₀.le _)) + (mul_le_mul hF hpow (Real.rpow_nonneg hx₀.le _) hB) + (sq_pos_of_pos hT) hden + +/-- A uniform multiplier bound gives an explicit bound for a horizontal integral. -/ +theorem norm_horizontal_integral_le {F : ℂ → ℂ} {a b x t T B : ℝ} + (hab : a ≤ b) (hx : 1 ≤ x) (hT : 0 < T) (ht : T ≤ |t|) + (hF : ∀ σ ∈ Icc a b, ‖F (σ + I * t)‖ ≤ B) : + ‖∫ σ in a..b, + F (σ + I * t) * (x : ℂ) ^ ((σ : ℂ) + I * t + 1) / + (((σ : ℂ) + I * t) * ((σ : ℂ) + I * t + 1))‖ ≤ + (b - a) * B * x ^ (b + 1) / T ^ 2 := by + have hbnd : ∀ σ ∈ Ι a b, + ‖F (σ + I * t) * (x : ℂ) ^ ((σ : ℂ) + I * t + 1) / + (((σ : ℂ) + I * t) * ((σ : ℂ) + I * t + 1))‖ ≤ + B * x ^ (b + 1) / T ^ 2 := by + intro σ hσ + rw [uIoc_of_le hab] at hσ + exact norm_mul_cpow_div_mul_add_one_le hx hT (by simpa using hσ.2) + (by simpa using ht) (hF σ ⟨hσ.1.le, hσ.2⟩) + calc + _ ≤ (B * x ^ (b + 1) / T ^ 2) * |b - a| := + intervalIntegral.norm_integral_le_of_norm_le_const hbnd + _ = (b - a) * B * x ^ (b + 1) / T ^ 2 := by + rw [abs_of_nonneg (sub_nonneg.mpr hab)] + ring + +/-- Logarithmic-square multiplier growth still makes horizontal Riesz integrals vanish. -/ +theorem tendsto_horizontal_integral_zero {ι : Type*} {l : Filter ι} + {F : ℂ → ℂ} {a b x C : ℝ} {T t : ι → ℝ} + (hab : a ≤ b) (hx : 1 ≤ x) (hT : Tendsto T l atTop) + (ht : ∀ᶠ i in l, T i ≤ |t i|) + (hF : ∀ᶠ i in l, ∀ σ ∈ Icc a b, + ‖F (σ + I * t i)‖ ≤ C * Real.log (T i) ^ 2) : + Tendsto (fun i ↦ ∫ σ in a..b, + F (σ + I * t i) * (x : ℂ) ^ ((σ : ℂ) + I * t i + 1) / + (((σ : ℂ) + I * t i) * ((σ : ℂ) + I * t i + 1))) l (𝓝 0) := by + have hlog : Tendsto (fun y : ℝ ↦ Real.log y ^ 2 / y ^ 2) atTop (𝓝 0) := by + simpa only [id_eq, div_pow, zero_pow (by norm_num : 2 ≠ 0)] using + Real.isLittleO_log_id_atTop.tendsto_div_nhds_zero.pow 2 + have hlim : Tendsto + (fun i ↦ ((b - a) * C * x ^ (b + 1)) * + (Real.log (T i) ^ 2 / (T i) ^ 2)) l (𝓝 0) := by + simpa only [mul_zero, Function.comp_def] using + (hlog.comp hT).const_mul ((b - a) * C * x ^ (b + 1)) + refine squeeze_zero_norm' ?_ hlim + filter_upwards [hT.eventually_gt_atTop 0, ht, hF] with i hi hti hFi + calc + _ ≤ (b - a) * (C * Real.log (T i) ^ 2) * x ^ (b + 1) / (T i) ^ 2 := + norm_horizontal_integral_le hab hx hi hti hFi + _ = ((b - a) * C * x ^ (b + 1)) * + (Real.log (T i) ^ 2 / (T i) ^ 2) := by ring + +end Complex diff --git a/RealRooted/Mathlib/Analysis/MellinTransform/LogMoments.lean b/RealRooted/Mathlib/Analysis/MellinTransform/LogMoments.lean new file mode 100644 index 000000000..7b78cf937 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/MellinTransform/LogMoments.lean @@ -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) diff --git a/RealRooted/Mathlib/Analysis/Normed/Field/WeightedInverse.lean b/RealRooted/Mathlib/Analysis/Normed/Field/WeightedInverse.lean new file mode 100644 index 000000000..e1ef83e89 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Normed/Field/WeightedInverse.lean @@ -0,0 +1,64 @@ +/- +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.Topology.Algebra.InfiniteSum.Defs +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Analysis.Normed.Group.InfiniteSum + +/-! +# Weighted inverse sums away from zero + +When the real parameters stay away from zero, summability with the bounded +weight `1 / (1 + r^2)` implies inverse-square summability and convergence of the +linear correction used in genus-one canonical products. +-/ + +public section + +/-- Away from zero, a summable sequence of nonnegative weights divided by +`1 + r^2` remains summable when divided by `r^2`. -/ +theorem Summable.div_sq_of_abs_ge {ι : Type*} {a r : ι → ℝ} {δ : ℝ} + (hs : Summable (fun i => a i / (1 + r i ^ 2))) (ha : ∀ i, 0 ≤ a i) + (hδ : 0 < δ) (hr : ∀ i, δ ≤ |r i|) : + Summable (fun i => a i / r i ^ 2) := by + apply Summable.of_nonneg_of_le (fun i => div_nonneg (ha i) (sq_nonneg _)) + (f := fun i => (1 + 1 / δ ^ 2) * (a i / (1 + r i ^ 2))) + · intro i + have hsq : δ ^ 2 ≤ r i ^ 2 := by + simpa only [sq_abs] using pow_le_pow_left₀ hδ.le (hr i) 2 + have hδsq : 0 < δ ^ 2 := sq_pos_of_pos hδ + have hrsq : 0 < r i ^ 2 := hδsq.trans_le hsq + have hp : 1 + r i ^ 2 ≠ 0 := by positivity + have hratio : (1 + r i ^ 2) / r i ^ 2 ≤ 1 + 1 / δ ^ 2 := by + rw [add_div, div_self hrsq.ne'] + linarith [one_div_le_one_div_of_le hδsq hsq] + calc + a i / r i ^ 2 = (a i / (1 + r i ^ 2)) * ((1 + r i ^ 2) / r i ^ 2) := by + field_simp + _ ≤ (a i / (1 + r i ^ 2)) * (1 + 1 / δ ^ 2) := + mul_le_mul_of_nonneg_left hratio (div_nonneg (ha i) (by positivity)) + _ = _ := mul_comm _ _ + · exact hs.mul_left _ + +/-- The signed linear correction in a genus-one product converges when its real +parameters stay away from zero and the corresponding finite-measure weights sum. -/ +theorem Summable.div_mul_one_add_sq_of_abs_ge {ι : Type*} {a r : ι → ℝ} {δ : ℝ} + (hs : Summable (fun i => a i / (1 + r i ^ 2))) (ha : ∀ i, 0 ≤ a i) + (hδ : 0 < δ) (hr : ∀ i, δ ≤ |r i|) : + Summable (fun i => a i / (r i * (1 + r i ^ 2))) := by + apply (hs.mul_left (1 / δ)).of_norm_bounded + intro i + have habs : 0 < |r i| := hδ.trans_le (hr i) + have hp : 0 < 1 + r i ^ 2 := by positivity + rw [Real.norm_eq_abs, abs_div, abs_of_nonneg (ha i), abs_mul, abs_of_pos hp] + calc + a i / (|r i| * (1 + r i ^ 2)) = + (a i / (1 + r i ^ 2)) * (1 / |r i|) := by field_simp + _ ≤ (a i / (1 + r i ^ 2)) * (1 / δ) := + mul_le_mul_of_nonneg_left (one_div_le_one_div_of_le hδ (hr i)) + (div_nonneg (ha i) hp.le) + _ = _ := mul_comm _ _ diff --git a/RealRooted/Mathlib/Analysis/Normed/Group/LocallyBoundedMajorant.lean b/RealRooted/Mathlib/Analysis/Normed/Group/LocallyBoundedMajorant.lean new file mode 100644 index 000000000..488f3bc22 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Normed/Group/LocallyBoundedMajorant.lean @@ -0,0 +1,28 @@ +/- +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 TauCeti.Analysis.Normed.Group.LocallyBounded + +/-! +# Local boundedness from a continuous majorant + +A continuous real majorant of all norms bounds the family uniformly on every +compact subset of its domain. +-/ + +public section + +/-- A common continuous norm majorant makes a family locally bounded. -/ +theorem TauCeti.isLocallyBoundedOn_of_norm_le_continuous + {ι X E : Type*} [TopologicalSpace X] [Norm E] + {F : ι → X → E} {g : X → ℝ} {S : Set X} + (hg : ContinuousOn g S) (hbound : ∀ i, ∀ z ∈ S, ‖F i z‖ ≤ g z) : + TauCeti.IsLocallyBoundedOn F S := by + rw [TauCeti.isLocallyBoundedOn_def] + intro K hKS hK + obtain ⟨C, hC⟩ := (hK.image_of_continuousOn (hg.mono hKS)).bddAbove + exact ⟨C, fun i z hz => (hbound i z (hKS hz)).trans (hC (Set.mem_image_of_mem g hz))⟩ diff --git a/RealRooted/Mathlib/Analysis/Normed/Group/SparseSubfamily.lean b/RealRooted/Mathlib/Analysis/Normed/Group/SparseSubfamily.lean new file mode 100644 index 000000000..b217aed17 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Normed/Group/SparseSubfamily.lean @@ -0,0 +1,78 @@ +/- +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.Topology.Algebra.InfiniteSum.Defs +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Analysis.Normed.Group.InfiniteSum +import Mathlib.Analysis.SpecificLimits.Basic + +/-! +# Summable sparse subfamilies of square-summable real families + +Infinite nonzero support contains a sequence with strictly decreasing absolute +values and summable absolute values. In particular the selected values are +distinct, not merely their indices. +-/ + +public section + +open Filter Topology + +namespace Real + +/-- Infinite support of a square-summable family has arbitrarily small nonzero terms. -/ +private theorem exists_abs_lt_of_infinite_support {ι : Type*} {a : ι → ℝ} + (hs : Summable (fun i ↦ a i ^ 2)) (hi : (Function.support a).Infinite) + {ε : ℝ} (hε : 0 < ε) : ∃ i, a i ≠ 0 ∧ |a i| < ε := by + have he : ∀ᶠ i in cofinite, a i ^ 2 < ε ^ 2 := + hs.tendsto_cofinite_zero.eventually (gt_mem_nhds (sq_pos_of_pos hε)) + obtain ⟨i, hi, hsmall⟩ := (hi.frequently_cofinite.and_eventually he).exists + refine ⟨i, hi, ?_⟩ + nlinarith [sq_abs (a i), abs_nonneg (a i)] + +/-- Infinite nonzero support of a square-summable real family contains an +injectively indexed, absolutely summable subfamily with distinct values. -/ +theorem exists_summable_subfamily_of_summable_sq {ι : Type*} {a : ι → ℝ} + (hs : Summable (fun i ↦ a i ^ 2)) (hi : (Function.support a).Infinite) : + ∃ e : ℕ ↪ ι, (∀ n, a (e n) ≠ 0) ∧ Function.Injective (fun n ↦ a (e n)) ∧ + StrictAnti (fun n ↦ |a (e n)|) ∧ Summable (fun n ↦ a (e n)) := by + classical + have hnext (i : Function.support a) : + ∃ j : Function.support a, |a j| < |a i| / 2 := by + obtain ⟨j, hj, hsmall⟩ := exists_abs_lt_of_infinite_support hs hi + (half_pos (abs_pos.mpr i.property)) + exact ⟨⟨j, hj⟩, hsmall⟩ + choose next hn using hnext + obtain ⟨i₀, hi₀⟩ := hi.nonempty + let u : ℕ → Function.support a := + fun n ↦ Nat.rec (⟨i₀, hi₀⟩ : Function.support a) (fun _ i ↦ next i) n + have hstep (n : ℕ) : |a (u (n + 1)).val| < |a (u n).val| / 2 := by + simpa only [u] using hn (u n) + have hanti : StrictAnti (fun n ↦ |a (u n).val|) := by + apply strictAnti_nat_of_succ_lt + intro n + exact (hstep n).trans (half_lt_self (abs_pos.mpr (u n).property)) + have hval : Function.Injective (fun n ↦ a (u n).val) := by + intro n m h + exact hanti.injective (congrArg abs h) + let e : ℕ ↪ ι := ⟨fun n ↦ (u n).val, fun n m h ↦ hval (congrArg a h)⟩ + refine ⟨e, fun n ↦ (u n).property, hval, hanti, ?_⟩ + have hbound (n : ℕ) : |a (u n).val| ≤ |a i₀| * (1 / 2 : ℝ) ^ n := by + induction n with + | zero => simp [u] + | succ n ih => + calc + _ ≤ |a (u n).val| / 2 := (hstep n).le + _ ≤ (|a i₀| * (1 / 2 : ℝ) ^ n) / 2 := by linarith + _ = _ := by rw [pow_succ]; ring + exact (summable_geometric_two.mul_left |a i₀|).of_norm_bounded + (fun n ↦ by + rw [Real.norm_eq_abs] + change |a (u n).val| ≤ _ + exact hbound n) + +end Real diff --git a/RealRooted/Mathlib/Analysis/Polynomial/GaussianMajorant.lean b/RealRooted/Mathlib/Analysis/Polynomial/GaussianMajorant.lean new file mode 100644 index 000000000..c449da9e7 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/GaussianMajorant.lean @@ -0,0 +1,83 @@ +/- +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.Algebra.Polynomial.Eval.Defs +public import Mathlib.Analysis.Complex.Exponential +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Analysis.Normed.Group.InfiniteSum +import Mathlib.Analysis.SpecialFunctions.Exp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring +import RealRooted.Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianTail + +/-! +# Uniform Gaussian majorants for polynomial evaluations + +The Gaussian parameter is bounded below by a positive constant, while the +polynomial argument and exponential prefactor range over bounded intervals. +A finite sum of polynomially weighted Gaussians dominates the whole family. +-/ + +public section + +open Real + +namespace Polynomial + +private theorem abs_eval_le_coeff_majorant (p : ℝ[X]) {x y : ℝ} + (hx : 0 ≤ x) (hxy : x ≤ y) : + |p.eval x| ≤ ∑ k ∈ p.support, |p.coeff k| * y ^ k := by + rw [eval_eq_sum, sum_def] + calc + _ ≤ ∑ k ∈ p.support, |p.coeff k * x ^ k| := Finset.abs_sum_le_sum_abs _ _ + _ = ∑ k ∈ p.support, |p.coeff k| * x ^ k := by + simp only [abs_mul, abs_pow, abs_of_nonneg hx] + _ ≤ _ := Finset.sum_le_sum fun k _ => + mul_le_mul_of_nonneg_left (pow_le_pow_left₀ hx hxy k) (abs_nonneg _) + +/-- A coefficientwise majorant for a polynomial multiplied by a Gaussian weight. -/ +theorem norm_nat_pow_mul_eval_mul_exp_le (p : ℝ[X]) (r n : ℕ) {a b c d e : ℝ} + (ha : 0 ≤ a) (hac : a ≤ c) (hcb : c ≤ b) (hed : e ≤ d) : + ‖(n : ℝ) ^ r * p.eval (c * n ^ 2) * exp (e - c * n ^ 2)‖ ≤ + ∑ k ∈ p.support, (|p.coeff k| * |b| ^ k * exp d) * + ((n : ℝ) ^ (2 * k + r) * exp (-a * n ^ 2)) := by + have hc : 0 ≤ c := ha.trans hac + have hpoly := abs_eval_le_coeff_majorant p + (mul_nonneg hc (sq_nonneg (n : ℝ))) + (mul_le_mul_of_nonneg_right (hcb.trans (le_abs_self b)) (sq_nonneg (n : ℝ))) + have hexp : exp (e - c * (n : ℝ) ^ 2) ≤ exp d * exp (-a * n ^ 2) := by + rw [← exp_add] + apply exp_le_exp.mpr + nlinarith [mul_nonneg (sub_nonneg.mpr hac) (sq_nonneg (n : ℝ))] + calc + _ = (n : ℝ) ^ r * |p.eval (c * n ^ 2)| * exp (e - c * n ^ 2) := by + rw [norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (by positivity : 0 ≤ (n : ℝ) ^ r), + abs_of_pos (exp_pos _)] + _ ≤ ((n : ℝ) ^ r * ∑ k ∈ p.support, |p.coeff k| * (|b| * n ^ 2) ^ k) * + (exp d * exp (-a * n ^ 2)) := by + apply mul_le_mul (mul_le_mul_of_nonneg_left hpoly (by positivity)) hexp + (exp_nonneg _) (by positivity) + _ = _ := by + rw [Finset.mul_sum, Finset.sum_mul] + apply Finset.sum_congr rfl + intro k _ + rw [mul_pow, ← pow_mul, pow_add] + ring + +/-- A compact family of polynomial Gaussian terms admits one summable lattice majorant. -/ +theorem exists_summable_bound_nat_pow_eval_exp (p : ℝ[X]) (r : ℕ) {a : ℝ} + (ha : 0 < a) (b d : ℝ) : + ∃ M : ℕ → ℝ, Summable M ∧ ∀ (n : ℕ) (c e : ℝ), a ≤ c → c ≤ b → e ≤ d → + ‖(n : ℝ) ^ r * p.eval (c * n ^ 2) * exp (e - c * n ^ 2)‖ ≤ M n := by + let M (n : ℕ) := ∑ k ∈ p.support, (|p.coeff k| * |b| ^ k * exp d) * + ((n : ℝ) ^ (2 * k + r) * exp (-a * n ^ 2)) + refine ⟨M, ?_, fun n c e hac hcb hed => ?_⟩ + · exact summable_sum fun k _ => (summable_nat_pow_mul_exp_neg_sq (2 * k + r) ha).mul_left _ + · exact norm_nat_pow_mul_eval_mul_exp_le p r n ha.le hac hcb hed + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Polynomial/LocallyUniformLimit.lean b/RealRooted/Mathlib/Analysis/Polynomial/LocallyUniformLimit.lean new file mode 100644 index 000000000..7c33f6624 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/LocallyUniformLimit.lean @@ -0,0 +1,56 @@ +/- +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.Algebra.Polynomial.Eval.Defs +public import Mathlib.Algebra.Polynomial.Degree.Defs +public import Mathlib.Analysis.Normed.Ring.Basic +import Mathlib.Topology.MetricSpace.Algebra +import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.MulAction +import RealRooted.Mathlib.Topology.Algebra.IsUniformGroup.FiniteSum +import Mathlib.Algebra.Polynomial.Eval.Degree +import Mathlib.Algebra.Polynomial.Degree.Operations + +import Mathlib.Tactic.TypeStar + +/-! +# Locally uniform polynomial limits from a common finite degree bound +-/ + +public section + +open Filter Topology + +namespace Polynomial + +/-- Coefficientwise convergence in a fixed finite degree range gives locally +uniform convergence of polynomial evaluations. Zero and constant limits are allowed. -/ +theorem tendstoLocallyUniformly_eval_of_coeff_tendsto + {K ι : Type*} [SeminormedRing K] {l : Filter ι} + {P : ι → K[X]} {Q : K[X]} {N : ℕ} + (hP : ∀ i, (P i).natDegree ≤ N) (hQ : Q.natDegree ≤ N) + (hcoeff : ∀ k ≤ N, Tendsto (fun i ↦ (P i).coeff k) l (𝓝 (Q.coeff k))) : + TendstoLocallyUniformly (fun i z ↦ (P i).eval z) (fun z ↦ Q.eval z) l := by + have heqP : (fun i z ↦ (P i).eval z) = + (fun i z ↦ ∑ k ∈ Finset.range (N + 1), (P i).coeff k * z ^ k) := by + funext i z + exact eval_eq_sum_range' (Nat.lt_succ_of_le (hP i)) z + have heqQ : (fun z ↦ Q.eval z) = + (fun z ↦ ∑ k ∈ Finset.range (N + 1), Q.coeff k * z ^ k) := by + funext z + exact eval_eq_sum_range' (Nat.lt_succ_of_le hQ) z + rw [heqP, heqQ] + apply TendstoLocallyUniformly.finset_sum + intro k hk + have hconst : TendstoUniformly (fun i ↦ fun _ : K ↦ (P i).coeff k) + (fun _ : K ↦ Q.coeff k) l := + (hcoeff k (Nat.le_of_lt_succ (Finset.mem_range.mp hk))).tendstoUniformly_const + have hpow := tendstoLocallyUniformly_const_family (fun z : K ↦ z ^ k) l + simpa only [Pi.mul_def] using hconst.tendstoLocallyUniformly.mul₀ + hpow continuous_const (continuous_id.pow k) + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Polynomial/NonrealPersistence.lean b/RealRooted/Mathlib/Analysis/Polynomial/NonrealPersistence.lean new file mode 100644 index 000000000..1c6f86d8d --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/NonrealPersistence.lean @@ -0,0 +1,74 @@ +/- +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.Algebra.Polynomial.Splits +public import Mathlib.Analysis.Complex.Norm +import RealRooted.Mathlib.Analysis.Polynomial.RootMatchingLimit +import RealRooted.Mathlib.Algebra.Polynomial.Splits.Complex +import Mathlib.Analysis.Complex.Polynomial.Basic + +import Mathlib.Tactic.TypeStar + +/-! +# Persistence of nonreal roots under coefficientwise convergence +-/ + +public section + +open Filter Topology + +namespace Polynomial + +/-- Root matching at every positive radius preserves a nonreal root of a +nonzero limit, without degree or simplicity assumptions on the approximants. -/ +theorem eventually_not_splits_of_eventually_rel_roots + {ι : Type*} {l : Filter ι} {P : ι → ℝ[X]} {Q : ℝ[X]} (hQ : Q ≠ 0) + (hnonsplit : ¬ Q.Splits) + (hrel : ∀ ε > 0, ∀ᶠ i in l, + (Q.map Complex.ofRealHom).roots.Rel (fun z w ↦ ‖z - w‖ < ε) + ((P i).map Complex.ofRealHom).roots) : + ∀ᶠ i in l, ¬ (P i).Splits := by + have hex : ∃ z : ℂ, (Q.map Complex.ofRealHom).eval z = 0 ∧ z.im ≠ 0 := by + by_contra h + apply hnonsplit + apply splits_of_all_roots_real + intro z hz + by_contra hi + exact h ⟨z, hz, hi⟩ + obtain ⟨z, hz, hzi⟩ := hex + have hzroot : z ∈ (Q.map Complex.ofRealHom).roots := + (mem_roots (map_ne_zero hQ)).mpr hz + have hmatch := hrel |z.im| (abs_pos.mpr hzi) + filter_upwards [hmatch] with i hi hsplit + obtain ⟨w, hw, hzw⟩ := Multiset.exists_mem_of_rel_of_mem hi hzroot + rw [hsplit.roots_map Complex.ofRealHom] at hw + obtain ⟨r, _, rfl⟩ := Multiset.mem_map.mp hw + have hle : |z.im| ≤ ‖z - Complex.ofRealHom r‖ := by + simpa only [Complex.sub_im, Complex.ofRealHom_eq_coe, Complex.ofReal_im, sub_zero] using + Complex.abs_im_le_norm (z - Complex.ofRealHom r) + exact (not_lt_of_ge hle) hzw + +/-- A nonreal root of a monic limit persists along fixed-degree monic +coefficient convergence. The source need not have simple roots. -/ +theorem eventually_not_splits_of_coeff_tendsto + {ι : Type*} {l : Filter ι} {P : ι → ℝ[X]} {Q : ℝ[X]} (hQ : Q.Monic) + (hP : ∀ᶠ i in l, (P i).Monic ∧ (P i).natDegree = Q.natDegree) + (hcoeff : ∀ k < Q.natDegree, + Tendsto (fun i ↦ (P i).coeff k) l (𝓝 (Q.coeff k))) + (hnonsplit : ¬ Q.Splits) : ∀ᶠ i in l, ¬ (P i).Splits := by + apply eventually_not_splits_of_eventually_rel_roots hQ.ne_zero hnonsplit + intro ε hε + exact eventually_rel_roots_of_coeff_tendsto + (hQ.map Complex.ofRealHom) + (hP.mono fun i hi ↦ ⟨hi.1.map Complex.ofRealHom, + by simpa only [natDegree_map] using hi.2⟩) + (fun k hk ↦ by + have hk' : k < Q.natDegree := by simpa only [natDegree_map] using hk + simpa only [coeff_map, Complex.ofRealHom_eq_coe, Function.comp_def] using + (Complex.continuous_ofReal.tendsto _).comp (hcoeff k hk')) hε + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Polynomial/OrderedRootPerturbation.lean b/RealRooted/Mathlib/Analysis/Polynomial/OrderedRootPerturbation.lean new file mode 100644 index 000000000..827f5f637 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/OrderedRootPerturbation.lean @@ -0,0 +1,105 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree + +public import Mathlib.Topology.MetricSpace.Pseudo.Defs + +public import Mathlib.Algebra.Polynomial.Splits + +import RealRooted.Mathlib.Analysis.Polynomial.SimpleRootMatching +import RealRooted.Mathlib.Analysis.Polynomial.SimpleRootSeparation +import TauCeti.Topology.MetricSpace.SeparatedBalls +import Mathlib.Topology.Instances.Real.Lemmas +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity + +/-! +# Linear perturbation bounds for ordered real roots + + +The reference roots are supplied once as an increasing factorization. Coefficient +convergence produces all perturbed roots, without assuming they are real, and +the factor estimate gives a linear bound for each ordered node. +-/ + +public section + +open Filter Topology Finset + +noncomputable section + +namespace Polynomial + +/-- For fixed simple split reference data, bounded-degree coefficient convergence +gives ordered simple real roots with error bounded linearly by coefficient error. +The empty reference list, hence degree zero, is included. -/ +theorem eventually_exists_ordered_roots_abs_sub_le + {ι : Type*} {l : Filter ι} {Q : ι → ℝ[X]} {p : ℝ[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) (hps : p.Splits) (hpnd : p.roots.Nodup) + (r : Fin n → ℝ) (hr : StrictMono r) + (hfactor : p = ∏ j : Fin n, (X - C (r j))) + (hdegree : ∀ᶠ t in l, (Q t).natDegree ≤ n) + (hcoeff : ∀ k ≤ n, Tendsto (fun t => (Q t).coeff k) l (𝓝 (p.coeff k))) : + ∃ C > 0, ∀ᶠ t in l, + (Q t).degree = n ∧ (Q t).Splits ∧ (Q t).roots.Nodup ∧ + ∃ s : Fin n → ℝ, StrictMono s ∧ (∀ i, (Q t).IsRoot (s i)) ∧ + ∀ δ : ℝ, 0 ≤ δ → (∀ k ≤ n, |(Q t).coeff k - p.coeff k| ≤ δ) → + ∀ i, |s i - r i| ≤ C * δ := by + let T : Finset ℝ := univ.image r + have hrT (i : Fin n) : r i ∈ T := Finset.mem_image.mpr ⟨i, Finset.mem_univ i, rfl⟩ + obtain ⟨η, hη, _, hsepT⟩ := TauCeti.exists_pos_closedBall_subset_and_lt_dist + (T := T) (U := fun _ => Set.univ) (fun _ _ => Filter.univ_mem) + have hsep (i j : Fin n) (hij : i ≠ j) : 2 * η ≤ |r i - r j| := by + have h := hsepT (r i) (hrT i) (r j) (hrT j) (hr.injective.ne hij) + simpa only [Real.dist_eq] using h.le + let B : ℝ := 1 + ∑ j : Fin n, |r j| + have hBpos : 0 < B := by dsimp [B]; positivity + have hB (i : Fin n) : |r i| ≤ B := by + have h := Finset.single_le_sum (fun j (_ : j ∈ (univ : Finset (Fin n))) => + abs_nonneg (r j)) (Finset.mem_univ i) + dsimp only [B] + linarith + let K : ℝ := (∑ k ∈ range (n + 1), (B + η) ^ k) / η ^ (n - 1) + let C : ℝ := K + 1 + have hC : 0 < C := by dsimp [C, K]; positivity + have hrroots (i : Fin n) : r i ∈ p.roots := by + apply (mem_roots hp.monic.ne_zero).mpr + rw [IsRoot.def, hfactor, eval_prod] + simp only [eval_sub, eval_X, eval_C] + exact Finset.prod_eq_zero (Finset.mem_univ i) (sub_self (r i)) + have hmatch := eventually_roots_bijection_of_coeff_tendsto hp hps hpnd hdegree hcoeff hη + refine ⟨C, hC, ?_⟩ + filter_upwards [hdegree, hmatch] with t ht hmatched + obtain ⟨hdeg, hsplit, hnodup, e, he, heclose⟩ := hmatched + let s : Fin n → ℝ := fun i => e (r i) + have hsclose (i : Fin n) : |s i - r i| < η := (heclose (r i) (hrroots i)).1 + have hsroot (i : Fin n) : (Q t).IsRoot (s i) := by + apply isRoot_of_mem_roots + apply Multiset.mem_toFinset.mp + exact he.mapsTo (Multiset.mem_toFinset.mpr (hrroots i)) + have hsmono : StrictMono s := by + intro i j hij + have hi := abs_lt.mp (hsclose i) + have hj := abs_lt.mp (hsclose j) + have hgap := hsep i j (ne_of_lt hij) + rw [abs_of_neg (sub_neg.mpr (hr hij))] at hgap + linarith + refine ⟨hdeg, hsplit, hnodup, s, hsmono, hsroot, ?_⟩ + intro δ hδ herror i + have herror' : ∀ k ≤ n, |p.coeff k - (Q t).coeff k| ≤ δ := by + intro k hk + simpa only [abs_sub_comm] using herror k hk + have h := abs_sub_le_of_isRoot_of_close r hfactor ht (hsroot i) hη hB hδ herror' + i (hsclose i).le (fun j hji => hsep i j hji.symm) + change |s i - r i| ≤ K * δ at h + apply h.trans + apply mul_le_mul_of_nonneg_right _ hδ + dsimp only [C] + linarith + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Polynomial/OrderedRootRates.lean b/RealRooted/Mathlib/Analysis/Polynomial/OrderedRootRates.lean new file mode 100644 index 000000000..63064673f --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/OrderedRootRates.lean @@ -0,0 +1,92 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Algebra.Polynomial.Splits +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import RealRooted.Mathlib.Analysis.Polynomial.OrderedRootPerturbation +import Mathlib.Topology.Instances.Real.Lemmas + +/-! +# Ordered root families with a prescribed error rate + +A coefficient error rate near a fixed simple real-rooted reference polynomial +gives the same rate for the ordered roots. If the error tends to zero, one +chosen family of ordered roots converges coordinatewise. All root properties +are eventual; arbitrary earlier inputs require no splitting hypothesis. +-/ + +public section + +open Filter Topology + +namespace Polynomial + +/-- A common coefficient error rate transfers to ordered roots near a fixed +simple split reference. The degree-zero case has an empty root family. -/ +theorem eventually_exists_ordered_roots_le_mul + {ι : Type*} {l : Filter ι} {Q : ι → ℝ[X]} {p : ℝ[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) (hps : p.Splits) (hpnd : p.roots.Nodup) + (r : Fin n → ℝ) (hr : StrictMono r) + (hfactor : p = ∏ j : Fin n, (X - C (r j))) + (hdegree : ∀ᶠ t in l, (Q t).natDegree ≤ n) + (hcoeff : ∀ k ≤ n, Tendsto (fun t ↦ (Q t).coeff k) l (𝓝 (p.coeff k))) + {δ : ι → ℝ} (hδ : ∀ᶠ t in l, 0 ≤ δ t) + (hbound : ∀ᶠ t in l, ∀ k ≤ n, |(Q t).coeff k - p.coeff k| ≤ δ t) : + ∃ C > 0, ∀ᶠ t in l, + (Q t).degree = n ∧ (Q t).Splits ∧ (Q t).roots.Nodup ∧ + ∃ s : Fin n → ℝ, StrictMono s ∧ (∀ i, (Q t).IsRoot (s i)) ∧ + ∀ i, |s i - r i| ≤ C * δ t := by + obtain ⟨C, hC, hroots⟩ := eventually_exists_ordered_roots_abs_sub_le + hp hps hpnd r hr hfactor hdegree hcoeff + refine ⟨C, hC, ?_⟩ + filter_upwards [hroots, hδ, hbound] with t ht hδt hbt + obtain ⟨hdeg, hsplit, hnodup, s, hsmono, hsroots, hsbound⟩ := ht + exact ⟨hdeg, hsplit, hnodup, s, hsmono, hsroots, hsbound (δ t) hδt hbt⟩ + +/-- A vanishing coefficient error rate gives a single chosen family of +ordered roots with the same rate and coordinatewise convergence. -/ +theorem exists_ordered_roots_tendsto_of_coeff_bound + {ι : Type*} {l : Filter ι} {Q : ι → ℝ[X]} {p : ℝ[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) (hps : p.Splits) (hpnd : p.roots.Nodup) + (r : Fin n → ℝ) (hr : StrictMono r) + (hfactor : p = ∏ j : Fin n, (X - C (r j))) + (hdegree : ∀ᶠ t in l, (Q t).natDegree ≤ n) + (hcoeff : ∀ k ≤ n, Tendsto (fun t ↦ (Q t).coeff k) l (𝓝 (p.coeff k))) + {δ : ι → ℝ} (hδ : ∀ᶠ t in l, 0 ≤ δ t) + (hbound : ∀ᶠ t in l, ∀ k ≤ n, |(Q t).coeff k - p.coeff k| ≤ δ t) + (hδlim : Tendsto δ l (𝓝 0)) : + ∃ (s : ι → Fin n → ℝ) (C : ℝ), 0 < C ∧ + (∀ᶠ t in l, (Q t).degree = n ∧ (Q t).Splits ∧ (Q t).roots.Nodup ∧ + StrictMono (s t) ∧ (∀ i, (Q t).IsRoot (s t i)) ∧ + ∀ i, |s t i - r i| ≤ C * δ t) ∧ + ∀ i, Tendsto (fun t ↦ s t i) l (𝓝 (r i)) := by + classical + obtain ⟨C, hC, hroots⟩ := eventually_exists_ordered_roots_le_mul + hp hps hpnd r hr hfactor hdegree hcoeff hδ hbound + let P (t : ι) (s : Fin n → ℝ) : Prop := StrictMono s ∧ + (∀ i, (Q t).IsRoot (s i)) ∧ ∀ i, |s i - r i| ≤ C * δ t + let s (t : ι) : Fin n → ℝ := if h : ∃ y, P t y then Classical.choose h else r + have hselected (t : ι) (h : ∃ y, P t y) : P t (s t) := by + dsimp only [s] + rw [dite_eq_left h] + exact Classical.choose_spec h + have hevent : ∀ᶠ t in l, + (Q t).degree = n ∧ (Q t).Splits ∧ (Q t).roots.Nodup ∧ P t (s t) := by + filter_upwards [hroots] with t ht + exact ⟨ht.1, ht.2.1, ht.2.2.1, hselected t ht.2.2.2⟩ + refine ⟨s, C, hC, hevent, ?_⟩ + intro i + have hlim : Tendsto (fun t ↦ C * δ t) l (𝓝 0) := by + simpa only [mul_zero] using hδlim.const_mul C + rw [Metric.tendsto_nhds] + intro ε hε + filter_upwards [hevent, hlim.eventually (gt_mem_nhds hε)] with t ht hsmall + rw [Real.dist_eq] + exact (ht.2.2.2.2.2 i).trans_lt hsmall + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Polynomial/RootMatchingLimit.lean b/RealRooted/Mathlib/Analysis/Polynomial/RootMatchingLimit.lean new file mode 100644 index 000000000..79328edd0 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/RootMatchingLimit.lean @@ -0,0 +1,66 @@ +/- +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.Topology.MetricSpace.ProperSpace +public import Mathlib.Analysis.Normed.Field.Basic +public import Mathlib.FieldTheory.IsAlgClosed.Basic +import TauCeti.Analysis.Polynomial.ContinuityOfRoots.Basic + +import Mathlib.Tactic.TypeStar + +/-! +# Root matching along coefficientwise limits + +This is the filter form of the existing Tau Ceti coefficient-neighborhood +theorem, including multiplicities and degree zero. +-/ + +public section + +open Filter Metric Topology + +namespace Polynomial + +variable {K : Type*} [NormedField K] [IsAlgClosed K] [ProperSpace K] + {ι : Type*} {l : Filter ι} {P : ι → K[X]} {Q : K[X]} + +/-- Fixed-degree monic coefficient convergence matches all roots, counting +multiplicity, eventually within any prescribed positive distance. -/ +theorem eventually_rel_roots_of_coeff_tendsto + (hQ : Q.Monic) (hP : ∀ᶠ i in l, (P i).Monic ∧ (P i).natDegree = Q.natDegree) + (hcoeff : ∀ k < Q.natDegree, + Tendsto (fun i ↦ (P i).coeff k) l (𝓝 (Q.coeff k))) + {ε : ℝ} (hε : 0 < ε) : + ∀ᶠ i in l, Q.roots.Rel (fun z w ↦ ‖z - w‖ < ε) (P i).roots := by + obtain ⟨δ, hδ, hclose⟩ := hQ.exists_rel_roots_norm_sub_lt hε + have hev : ∀ᶠ i in l, ∀ k : Fin Q.natDegree, + ‖(P i).coeff k - Q.coeff k‖ < δ := by + apply eventually_all.mpr + intro k + have hk : Tendsto (fun i ↦ ‖(P i).coeff k - Q.coeff k‖) l (𝓝 0) := by + simpa only [sub_self, norm_zero] using + ((hcoeff k k.is_lt).sub (tendsto_const_nhds (x := Q.coeff k))).norm + exact hk.eventually_lt tendsto_const_nhds hδ + filter_upwards [hP, hev] with i hi hci + exact hclose (P i) hi.1 hi.2 fun k hk ↦ hci ⟨k, hk⟩ + +open scoped Classical in +/-- In disjoint root neighborhoods, coefficient convergence preserves the +total number of roots in each neighborhood, including multiplicities. -/ +theorem eventually_countP_roots_eq_of_coeff_tendsto + (hQ : Q.Monic) (hP : ∀ᶠ i in l, (P i).Monic ∧ (P i).natDegree = Q.natDegree) + (hcoeff : ∀ k < Q.natDegree, + Tendsto (fun i ↦ (P i).coeff k) l (𝓝 (Q.coeff k))) + {ε : ℝ} (hε : 0 < ε) + (hsep : ∀ z ∈ Q.roots, ∀ w ∈ Q.roots, z ≠ w → 2 * ε ≤ ‖z - w‖) : + ∀ᶠ i in l, + (∀ z ∈ Q.roots, (P i).roots.countP (· ∈ ball z ε) = Q.rootMultiplicity z) ∧ + ∀ w ∈ (P i).roots, ∃ z ∈ Q.roots, ‖w - z‖ < ε := by + exact (eventually_rel_roots_of_coeff_tendsto hQ hP hcoeff hε).mono + fun _ h ↦ (rel_roots_iff_countP_roots_mem_ball hsep).mp h + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Polynomial/SeparableLimit.lean b/RealRooted/Mathlib/Analysis/Polynomial/SeparableLimit.lean new file mode 100644 index 000000000..79d1e4edd --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/SeparableLimit.lean @@ -0,0 +1,61 @@ +/- +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.Topology.MetricSpace.ProperSpace +public import Mathlib.Analysis.Normed.Field.Basic +public import Mathlib.FieldTheory.IsAlgClosed.Basic +import Mathlib.FieldTheory.Separable +import RealRooted.Mathlib.Analysis.Polynomial.RootMatchingLimit +import TauCeti.Topology.MetricSpace.SeparatedBalls +import Mathlib.Tactic.TypeStar + +/-!+# Separability along fixed-degree coefficient limits + +A simple limiting root has exactly one nearby root, counting multiplicity. +Consequently separability persists under fixed-degree monic coefficient limits. +The limiting polynomial may be constant. +-/ + +public section + +open Filter Metric Topology + +namespace Polynomial + +/-- A separable monic coefficient limit forces eventual separability when +the monic approximants have the same degree. -/ +theorem eventually_separable_of_coeff_tendsto + {K : Type*} [NormedField K] [IsAlgClosed K] [ProperSpace K] + {ι : Type*} {l : Filter ι} {P : ι → K[X]} {Q : K[X]} + (hQ : Q.Monic) (hsep : Q.Separable) + (hP : ∀ᶠ i in l, (P i).Monic ∧ (P i).natDegree = Q.natDegree) + (hcoeff : ∀ k < Q.natDegree, + Tendsto (fun i ↦ (P i).coeff k) l (𝓝 (Q.coeff k))) : + ∀ᶠ i in l, (P i).Separable := by + classical + obtain ⟨ε, hε, _, hdist⟩ := TauCeti.exists_pos_closedBall_subset_and_lt_dist + (T := Q.roots.toFinset) (U := fun _ ↦ Set.univ) (fun _ _ ↦ Filter.univ_mem) + have hballs := eventually_countP_roots_eq_of_coeff_tendsto hQ hP hcoeff hε + (fun z hz w hw hzw ↦ by + simpa only [dist_eq_norm] using + (hdist z (Multiset.mem_toFinset.mpr hz) w (Multiset.mem_toFinset.mpr hw) hzw).le) + filter_upwards [hP, hballs] with i hi hbi + apply (nodup_roots_iff_of_splits hi.1.ne_zero (IsAlgClosed.splits _)).mp + apply Multiset.nodup_iff_count_le_one.mpr + intro w + by_cases hw : w ∈ (P i).roots + · obtain ⟨z, hz, hwz⟩ := hbi.2 w hw + have hmem : w ∈ ball z ε := by simpa only [mem_ball, dist_eq_norm] using hwz + calc + (P i).roots.count w = ((P i).roots.filter (· ∈ ball z ε)).count w := + (Multiset.count_filter_of_pos hmem).symm + _ ≤ ((P i).roots.filter (· ∈ ball z ε)).card := Multiset.count_le_card _ _ + _ = Q.rootMultiplicity z := by rw [← Multiset.countP_eq_card_filter, hbi.1 z hz] + _ ≤ 1 := rootMultiplicity_le_one_of_separable hsep z + · simp only [Multiset.count_eq_zero_of_notMem hw, Nat.zero_le] + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Polynomial/SimpleRootMatching.lean b/RealRooted/Mathlib/Analysis/Polynomial/SimpleRootMatching.lean new file mode 100644 index 000000000..f3bd51173 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/SimpleRootMatching.lean @@ -0,0 +1,135 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Topology.MetricSpace.Pseudo.Defs + +public import Mathlib.Algebra.Polynomial.Splits + +import TauCeti.Analysis.Polynomial.RealRoots.Basic +import Mathlib.Algebra.Polynomial.OfFn +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree +import Mathlib.Tactic.Linarith + +/-! +# Coefficient neighborhoods of simple real-rooted polynomials + + +The existing Tau Ceti root-matching theorem is applied to the finite coefficient +space. At a simple split reference polynomial its complex-root-count assumption +is automatic from the degree bound. +-/ + +public section + +open Filter Topology + +noncomputable section + +namespace Polynomial + +/-- A coefficient neighborhood of a simple split monic polynomial has the same +degree and simple real roots, matched bijectively with the reference roots. -/ +theorem exists_coeff_radius_roots_bijection {p : ℝ[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) (hps : p.Splits) (hpnd : p.roots.Nodup) + {ε : ℝ} (hε : 0 < ε) : + ∃ δ > 0, ∀ q : ℝ[X], q.natDegree ≤ n → + (∀ k ≤ n, |q.coeff k - p.coeff k| < δ) → + q.degree = n ∧ q.Splits ∧ q.roots.Nodup ∧ + ∃ e : ℝ → ℝ, Set.BijOn e p.roots.toFinset q.roots.toFinset ∧ + ∀ x ∈ p.roots, |e x - x| < ε ∧ + q.rootMultiplicity (e x) = p.rootMultiplicity x := by + let F : (Fin (n + 1) → ℝ) → ℝ[X] := fun v => ofFn (n + 1) v + let v₀ : Fin (n + 1) → ℝ := fun i => p.coeff i.val + have hbase : F v₀ = p := by + change ofFn (n + 1) (toFn (n + 1) p) = p + apply ofFn_comp_toFn_eq_id_of_natDegree_lt + rw [hp.natDegree_eq] + exact Nat.lt_succ_self n + have hF (k : ℕ) (hk : k ≤ n) : ContinuousAt (fun v => (F v).coeff k) v₀ := by + simpa only [F, ofFn_coeff_eq_val_of_lt _ (Nat.lt_succ_of_le hk)] using + (continuous_apply (⟨k, Nat.lt_succ_of_le hk⟩ : Fin (n + 1))).continuousAt + have hbound (v : Fin (n + 1) → ℝ) : (F v).natDegree ≤ n := + Nat.le_of_lt_succ (ofFn_natDegree_lt (Nat.succ_pos n) v) + have htop : (F v₀).coeff n ≠ 0 := by + rw [hbase, ← hp.natDegree_eq, hp.monic.coeff_natDegree] + exact one_ne_zero + have hdegree : ∀ᶠ v in 𝓝 v₀, (F v).degree = n := by + filter_upwards [(hF n le_rfl).eventually_ne htop] with v hv + exact degree_eq_of_le_of_coeff_ne_zero (degree_le_of_natDegree_le (hbound v)) hv + have hpC : (p.aroots ℂ).Nodup := by + rw [aroots_def, hps.roots_map (algebraMap ℝ ℂ)] + exact Multiset.Nodup.map (algebraMap ℝ ℂ).injective hpnd + have hcard₀ : ((F v₀).aroots ℂ).toFinset.card = n := by + rw [hbase, Multiset.toFinset_card_of_nodup hpC, aroots_def, + hps.roots_map (algebraMap ℝ ℂ), Multiset.card_map, + ← hps.natDegree_eq_card_roots, hp.natDegree_eq] + have hcard : ∀ᶠ v in 𝓝 v₀, + ((F v).aroots ℂ).toFinset.card ≤ ((F v₀).aroots ℂ).toFinset.card := by + apply Filter.Eventually.of_forall + intro v + rw [hcard₀, aroots_def] + calc + ((F v).map (algebraMap ℝ ℂ)).roots.toFinset.card ≤ + ((F v).map (algebraMap ℝ ℂ)).roots.card := Multiset.toFinset_card_le _ + _ ≤ ((F v).map (algebraMap ℝ ℂ)).natDegree := card_roots' _ + _ ≤ n := by rw [natDegree_map]; exact hbound v + have hmatch := eventually_exists_bijOn_roots_toFinset_of_card_aroots_le + hF hdegree hcard hε + obtain ⟨δ, hδ, hball⟩ := Metric.eventually_nhds_iff.mp (hdegree.and hmatch) + refine ⟨δ, hδ, ?_⟩ + intro q hq hcoeff + let v : Fin (n + 1) → ℝ := fun i => q.coeff i.val + have hqF : F v = q := by + change ofFn (n + 1) (toFn (n + 1) q) = q + exact ofFn_comp_toFn_eq_id_of_natDegree_lt (Nat.lt_succ_of_le hq) + have hv : dist v v₀ < δ := by + apply (dist_pi_lt_iff hδ).mpr + intro i + simpa only [Real.dist_eq] using hcoeff i.val (Nat.le_of_lt_succ i.is_lt) + obtain ⟨hqdegree, e, he, heclose⟩ := hball (y := v) hv + rw [hqF] at hqdegree + rw [hbase, hqF] at he heclose + have hcardp : p.roots.toFinset.card = n := by + rw [Multiset.toFinset_card_of_nodup hpnd, ← hps.natDegree_eq_card_roots, + hp.natDegree_eq] + have hcardq : q.roots.toFinset.card = n := by + rw [← Finset.card_nbij e he.mapsTo he.injOn he.surjOn, hcardp] + have hrootcount := card_roots' q + have hsetcount := Multiset.toFinset_card_le q.roots + have hqn : q.roots.card = q.natDegree := by lia + have hqnodup : q.roots.Nodup := + Multiset.toFinset_card_eq_card_iff_nodup.mp (by lia) + exact ⟨hqdegree, splits_iff_card_roots.mpr hqn, hqnodup, e, he, heclose⟩ + +/-- Finite coefficient convergence to a simple split monic polynomial gives +eventual real-root matching without any nearby real-rootedness assumption. -/ +theorem eventually_roots_bijection_of_coeff_tendsto + {ι : Type*} {l : Filter ι} {Q : ι → ℝ[X]} {p : ℝ[X]} {n : ℕ} + (hp : IsMonicOfDegree p n) (hps : p.Splits) (hpnd : p.roots.Nodup) + (hdegree : ∀ᶠ t in l, (Q t).natDegree ≤ n) + (hcoeff : ∀ k ≤ n, Tendsto (fun t => (Q t).coeff k) l (𝓝 (p.coeff k))) + {ε : ℝ} (hε : 0 < ε) : + ∀ᶠ t in l, (Q t).degree = n ∧ (Q t).Splits ∧ (Q t).roots.Nodup ∧ + ∃ e : ℝ → ℝ, Set.BijOn e p.roots.toFinset (Q t).roots.toFinset ∧ + ∀ x ∈ p.roots, |e x - x| < ε ∧ + (Q t).rootMultiplicity (e x) = p.rootMultiplicity x := by + obtain ⟨δ, hδ, hmatch⟩ := exists_coeff_radius_roots_bijection hp hps hpnd hε + have hclose : ∀ᶠ t in l, ∀ i : Fin (n + 1), + |(Q t).coeff i.val - p.coeff i.val| < δ := by + apply eventually_all.mpr + intro i + have hi : Tendsto (fun t => |(Q t).coeff i.val - p.coeff i.val|) l (𝓝 0) := by + simpa only [sub_self, abs_zero] using + ((hcoeff i.val (Nat.le_of_lt_succ i.is_lt)).sub + (tendsto_const_nhds (x := p.coeff i.val))).abs + exact hi.eventually_lt tendsto_const_nhds hδ + filter_upwards [hdegree, hclose] with t ht htc + apply hmatch (Q t) ht + intro k hk + exact htc ⟨k, Nat.lt_succ_of_le hk⟩ + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/Polynomial/SimpleRootSeparation.lean b/RealRooted/Mathlib/Analysis/Polynomial/SimpleRootSeparation.lean new file mode 100644 index 000000000..769a1822c --- /dev/null +++ b/RealRooted/Mathlib/Analysis/Polynomial/SimpleRootSeparation.lean @@ -0,0 +1,127 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Algebra.Polynomial.Degree.Defs + +public import Mathlib.Algebra.Polynomial.Eval.Defs + +import Mathlib.Algebra.Polynomial.Eval.Degree +import Mathlib.Algebra.Polynomial.BigOperators +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +public import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Linear root bounds from separated factors + + +A matched root has a linear coefficient-error bound once all other reference +factors stay uniformly away from zero. The estimate uses only finite products. +-/ + +public section + +open Finset + +namespace Polynomial + +/-- A uniform coefficient bound controls the difference of two bounded-degree +polynomials on a bounded real interval. -/ +theorem abs_eval_sub_le_of_coeff_le {p q : ℝ[X]} {n : ℕ} + (hp : p.natDegree ≤ n) (hq : q.natDegree ≤ n) {δ B x : ℝ} + (hδ : 0 ≤ δ) (hcoeff : ∀ k ≤ n, |p.coeff k - q.coeff k| ≤ δ) + (hx : |x| ≤ B) : + |p.eval x - q.eval x| ≤ δ * ∑ k ∈ range (n + 1), B ^ k := by + rw [eval_eq_sum_range' (Nat.lt_succ_of_le hp), + eval_eq_sum_range' (Nat.lt_succ_of_le hq), ← Finset.sum_sub_distrib] + simp_rw [← sub_mul] + calc + |∑ k ∈ range (n + 1), (p.coeff k - q.coeff k) * x ^ k| ≤ + ∑ k ∈ range (n + 1), |(p.coeff k - q.coeff k) * x ^ k| := + Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ k ∈ range (n + 1), δ * B ^ k := by + apply Finset.sum_le_sum + intro k hk + rw [abs_mul, abs_pow] + exact mul_le_mul (hcoeff k (Nat.le_of_lt_succ (Finset.mem_range.mp hk))) + (pow_le_pow_left₀ (abs_nonneg x) hx k) (pow_nonneg (abs_nonneg x) k) hδ + _ = δ * ∑ k ∈ range (n + 1), B ^ k := by rw [Finset.mul_sum] + +/-- Separated factors give a lower bound on the absolute value of a product, +with one factor left unbounded. -/ +theorem abs_sub_mul_pow_le_abs_prod {n : ℕ} (r : Fin n → ℝ) + {x η : ℝ} (hη : 0 ≤ η) (i : Fin n) + (hsep : ∀ j : Fin n, j ≠ i → η ≤ |x - r j|) : + |x - r i| * η ^ (n - 1) ≤ |∏ j : Fin n, (x - r j)| := by + have hprod : η ^ (n - 1) ≤ ∏ j ∈ univ.erase i, |x - r j| := by + calc + η ^ (n - 1) = ∏ _j ∈ (univ : Finset (Fin n)).erase i, η := by + simp [Finset.prod_const, Finset.card_erase_of_mem (Finset.mem_univ i)] + _ ≤ ∏ j ∈ univ.erase i, |x - r j| := by + apply Finset.prod_le_prod₀ + · intro j _ + exact hη + · intro j hj + exact hsep j (Finset.mem_erase.mp hj).1 + calc + |x - r i| * η ^ (n - 1) ≤ + |x - r i| * ∏ j ∈ univ.erase i, |x - r j| := + mul_le_mul_of_nonneg_left hprod (abs_nonneg _) + _ = ∏ j : Fin n, |x - r j| := + Finset.mul_prod_erase univ (fun j => |x - r j|) (Finset.mem_univ i) + _ = |∏ j : Fin n, (x - r j)| := by rw [Finset.abs_prod] + +/-- A root of the perturbed polynomial lies linearly close to its matched +reference root when the remaining reference factors are separated. -/ +theorem abs_sub_le_of_isRoot_of_factor_separation {p q : ℝ[X]} {n : ℕ} + (r : Fin n → ℝ) (hp : p = ∏ j : Fin n, (X - C (r j))) + (hq : q.natDegree ≤ n) {x η B δ : ℝ} (hx : q.IsRoot x) + (hη : 0 < η) (hB : |x| ≤ B) (hδ : 0 ≤ δ) + (hcoeff : ∀ k ≤ n, |p.coeff k - q.coeff k| ≤ δ) + (i : Fin n) (hsep : ∀ j : Fin n, j ≠ i → η ≤ |x - r j|) : + |x - r i| ≤ ((∑ k ∈ range (n + 1), B ^ k) / η ^ (n - 1)) * δ := by + have hpdeg : p.natDegree ≤ n := by + rw [hp] + calc + (∏ j : Fin n, (X - C (r j))).natDegree ≤ + ∑ j : Fin n, (X - C (r j)).natDegree := natDegree_prod_le _ _ + _ = n := by simp + have hprod := abs_sub_mul_pow_le_abs_prod r hη.le i hsep + have hvalue : |∏ j : Fin n, (x - r j)| = |p.eval x - q.eval x| := by + rw [hx.eq_zero, sub_zero, hp] + simp only [eval_prod, eval_sub, eval_X, eval_C] + rw [hvalue] at hprod + have hbound := hprod.trans (abs_eval_sub_le_of_coeff_le hpdeg hq hδ hcoeff hB) + calc + |x - r i| ≤ (δ * ∑ k ∈ range (n + 1), B ^ k) / η ^ (n - 1) := + (le_div_iff₀ (pow_pos hη _)).mpr hbound + _ = ((∑ k ∈ range (n + 1), B ^ k) / η ^ (n - 1)) * δ := by ring + +/-- Coarse matching within `η` and a reference gap of at least `2η` supply the +factor-separation hypotheses needed for a linear coefficient-error bound. -/ +theorem abs_sub_le_of_isRoot_of_close {p q : ℝ[X]} {n : ℕ} + (r : Fin n → ℝ) (hp : p = ∏ j : Fin n, (X - C (r j))) + (hq : q.natDegree ≤ n) {x η B δ : ℝ} (hx : q.IsRoot x) + (hη : 0 < η) (hB : ∀ j, |r j| ≤ B) (hδ : 0 ≤ δ) + (hcoeff : ∀ k ≤ n, |p.coeff k - q.coeff k| ≤ δ) + (i : Fin n) (hclose : |x - r i| ≤ η) + (hsep : ∀ j : Fin n, j ≠ i → 2 * η ≤ |r i - r j|) : + |x - r i| ≤ + ((∑ k ∈ range (n + 1), (B + η) ^ k) / η ^ (n - 1)) * δ := by + have hxB : |x| ≤ B + η := by + have htri : |x| ≤ |x - r i| + |r i| := by + simpa only [sub_add_cancel] using abs_add_le (x - r i) (r i) + linarith [hB i] + apply abs_sub_le_of_isRoot_of_factor_separation r hp hq hx hη hxB hδ hcoeff i + intro j hji + have htri := abs_sub_le (r i) x (r j) + rw [abs_sub_comm (r i) x] at htri + linarith [hsep j hji] + +end Polynomial diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/ChooseRpow.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/ChooseRpow.lean new file mode 100644 index 000000000..9f31252f7 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/ChooseRpow.lean @@ -0,0 +1,44 @@ +/- +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.SpecialFunctions.Pow.Real +import RealRooted.Mathlib.Analysis.SpecialFunctions.Choose +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics + +/-! +# Binomial coefficients under real-power normalization +-/ + +public section + +open Filter Topology + +namespace Nat + +/-- The critical real-power normalization of a fixed binomial coefficient. -/ +theorem tendsto_choose_mul_rpow_atTop (k : ℕ) : + Tendsto (fun m : ℕ ↦ (m.choose k : ℝ) * (m : ℝ) ^ (-(k : ℝ))) atTop + (𝓝 (1 / (k.factorial : ℝ))) := by + have heq (m : ℕ) : ((m : ℝ)⁻¹) ^ k = (m : ℝ) ^ (-(k : ℝ)) := by + rw [Real.rpow_neg (Nat.cast_nonneg m), Real.rpow_natCast, inv_pow] + simpa only [heq] using tendsto_choose_mul_inv_pow_atTop k + +/-- A larger real-power normalization makes a fixed binomial coefficient vanish. -/ +theorem tendsto_choose_mul_rpow_atTop_of_lt (k : ℕ) {u : ℝ} (hu : (k : ℝ) < u) : + Tendsto (fun m : ℕ ↦ (m.choose k : ℝ) * (m : ℝ) ^ (-u)) atTop (𝓝 0) := by + have hpow : Tendsto (fun m : ℕ ↦ (m : ℝ) ^ (-(u - k))) atTop (𝓝 0) := + (tendsto_rpow_neg_atTop (sub_pos.mpr hu)).comp tendsto_natCast_atTop_atTop + have hlim := (tendsto_choose_mul_rpow_atTop k).mul hpow + simp only [mul_zero] at hlim + apply hlim.congr' + filter_upwards [eventually_ge_atTop 1] with m hm + have hm0 : 0 < (m : ℝ) := by exact_mod_cast (show 0 < m by lia) + rw [mul_assoc, ← Real.rpow_add hm0] + congr 2 + ring + +end Nat diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSum.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSum.lean new file mode 100644 index 000000000..2886c6fef --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSum.lean @@ -0,0 +1,180 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds +public import TauCeti.Analysis.CompletelyMonotone.Basic +import Mathlib.Analysis.Asymptotics.Defs +public import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import TauCeti.Analysis.CompletelyMonotone.Limits +import Mathlib.Analysis.Calculus.SmoothSeries +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Tactic.Ring + +/-! +# Heat traces of positive summable spectra + +The trace `sum exp (-rate * time)` and all its natural spectral moments +are completely monotone on the open positive half-line. Derivatives and +the two asymptotic estimates in Zhang, arXiv:1506.07012v13, Lemma 2, +follow under an explicit inverse-moment summability hypothesis. + +The exponential decay estimate allows a rate equal to the spectral lower +bound. Strict positivity needs a nonempty spectrum; no value at time zero +is asserted for infinite spectra. +-/ + +public section + +open Filter Topology + +namespace Real + +/-- The natural spectral moment of an exponential sum. Its heat trace is +the case `k = 0`. Analytic assertions below are restricted to positive time. -/ +@[expose] noncomputable def exponentialMomentSum {ι : Type*} + (r : ι → ℝ) (k : ℕ) (t : ℝ) : ℝ := + ∑' i, r i ^ k * exp (-r i * t) + +/-- All spectral moments are nonnegative for positive rates. -/ +theorem exponentialMomentSum_nonneg {ι : Type*} {r : ι → ℝ} + (hr : ∀ i, 0 < r i) (k : ℕ) (t : ℝ) : + 0 ≤ exponentialMomentSum r k t := + tsum_nonneg fun i ↦ mul_nonneg (pow_nonneg (hr i).le _) (exp_nonneg _) + +/-- A nonempty positive spectrum gives strictly positive spectral moments +whenever an inverse moment is summable. -/ +theorem exponentialMomentSum_pos {ι : Type*} [Nonempty ι] {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (k : ℕ) {t : ℝ} (ht : 0 < t) : 0 < exponentialMomentSum r k t := by + let i : ι := Classical.arbitrary ι + exact (summable_pow_mul_exp_neg_mul hr ha hs k ht).tsum_pos + (fun j ↦ mul_nonneg (pow_nonneg (hr j).le _) (exp_nonneg _)) i + (mul_pos (pow_pos (hr i) _) (exp_pos _)) + +/-- Each natural spectral moment is completely monotone on positive time. +Finite partial sums converge pointwise; complete monotonicity is closed +under these limits without a separate smoothness assumption. -/ +theorem isCompletelyMonotoneOnIoi_exponentialMomentSum + {ι : Type*} {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (k : ℕ) : TauCeti.IsCompletelyMonotoneOnIoi (exponentialMomentSum r k) := by + classical + apply TauCeti.isCompletelyMonotoneOnIoi_of_tendsto + (L := atTop) (F := fun s : Finset ι ↦ fun t ↦ ∑ i ∈ s, r i ^ k * exp (-r i * t)) + · exact Filter.Eventually.of_forall fun s ↦ + (TauCeti.IsCompletelyMonotone.sum (s := s) fun i _ ↦ by + exact ((TauCeti.isCompletelyMonotone_exp_neg_mul (hr i).le).smul + (pow_nonneg (hr i).le k)).congr fun t _ ↦ by + simp only [Pi.smul_apply, smul_eq_mul]).isCompletelyMonotoneOnIoi + · intro t ht + exact (summable_pow_mul_exp_neg_mul hr ha hs k ht).hasSum + +/-- Local uniform summability of one further spectral moment justifies +termwise differentiation of the exponential sum. -/ +theorem hasDerivAt_exponentialMomentSum {ι : Type*} {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (k : ℕ) {t : ℝ} (ht : 0 < t) : + HasDerivAt (exponentialMomentSum r k) (-exponentialMomentSum r (k + 1) t) t := by + have hterm (i : ι) (y : ℝ) (_hy : y ∈ Set.Ioi (t / 2)) : + HasDerivAt (fun z : ℝ ↦ r i ^ k * exp (-r i * z)) + (-(r i ^ (k + 1) * exp (-r i * y))) y := by + convert (((hasDerivAt_id y).const_mul (-r i)).exp).const_mul (r i ^ k) using 1 + · simp only [id_eq] + · simp only [id_eq, mul_one, pow_succ] + ring + have hbound (i : ι) (y : ℝ) (hy : y ∈ Set.Ioi (t / 2)) : + ‖-(r i ^ (k + 1) * exp (-r i * y))‖ ≤ + r i ^ (k + 1) * exp (-r i * (t / 2)) := by + rw [norm_neg, Real.norm_eq_abs, + abs_of_nonneg (mul_nonneg (pow_nonneg (hr i).le _) (exp_nonneg _))] + apply mul_le_mul_of_nonneg_left _ (pow_nonneg (hr i).le _) + apply exp_le_exp.mpr + exact mul_le_mul_of_nonpos_left hy.le (neg_nonpos.mpr (hr i).le) + have h := hasDerivAt_tsum_of_isPreconnected + (summable_pow_mul_exp_neg_mul hr ha hs (k + 1) (half_pos ht)) + isOpen_Ioi isPreconnected_Ioi hterm hbound + (show t ∈ Set.Ioi (t / 2) from half_lt_self ht) + (summable_pow_mul_exp_neg_mul hr ha hs k ht) + (show t ∈ Set.Ioi (t / 2) from half_lt_self ht) + convert h using 1 + · rfl + · rw [tsum_neg] + rfl + +/-- All derivatives of the heat trace are signed spectral moments. -/ +theorem iteratedDeriv_exponentialMomentSum_zero {ι : Type*} {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (k : ℕ) {t : ℝ} (ht : 0 < t) : + iteratedDeriv k (exponentialMomentSum r 0) t = + (-1 : ℝ) ^ k * exponentialMomentSum r k t := by + induction k generalizing t with + | zero => simp + | succ k ih => + have heq : iteratedDeriv k (exponentialMomentSum r 0) =ᶠ[𝓝 t] + (fun y ↦ (-1 : ℝ) ^ k * exponentialMomentSum r k y) := + Filter.Eventually.mono (isOpen_Ioi.mem_nhds ht) fun y hy ↦ ih hy + have hd := (hasDerivAt_exponentialMomentSum hr ha hs k ht).const_mul ((-1 : ℝ) ^ k) + rw [iteratedDeriv_succ, heq.deriv_eq, hd.deriv, pow_succ] + ring + +/-- Zhang's small-time estimate, valid for any nonnegative summable inverse +spectral exponent and every derivative. -/ +theorem isBigO_iteratedDeriv_exponentialMomentSum_zero_nhdsWithin + {ι : Type*} {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (k : ℕ) : + (iteratedDeriv k (exponentialMomentSum r 0)) =O[𝓝[>] (0 : ℝ)] + (fun t ↦ t ^ (-(a + (k : ℝ)))) := by + obtain ⟨C, _, hC⟩ := exists_tsum_pow_mul_exp_neg_mul_le hr ha hs k + apply Asymptotics.IsBigO.of_bound C + filter_upwards [self_mem_nhdsWithin] with t (ht : 0 < t) + rw [iteratedDeriv_exponentialMomentSum_zero hr ha hs k ht, norm_mul, norm_pow] + simp only [norm_neg, norm_one, one_pow, one_mul, Real.norm_eq_abs, + abs_of_nonneg (exponentialMomentSum_nonneg hr k t), + abs_of_pos (rpow_pos_of_pos ht _)] + exact hC t ht + +/-- Any lower spectral bound controls exponential decay, including when +the decay rate equals the smallest eigenvalue. -/ +theorem exponentialMomentSum_le_exp_mul {ι : Type*} {r : ι → ℝ} {a b t : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (hb : ∀ i, b ≤ r i) (k : ℕ) (ht : 1 ≤ t) : + exponentialMomentSum r k t ≤ + (exp b * exponentialMomentSum r k 1) * exp (-b * t) := by + have hterm (i : ι) : r i ^ k * exp (-r i * t) ≤ + (exp b * exp (-b * t)) * (r i ^ k * exp (-r i * 1)) := by + have harg : -r i * t ≤ b + (-b * t) + (-r i * 1) := by + nlinarith [mul_nonneg (sub_nonneg.mpr (hb i)) (sub_nonneg.mpr ht)] + calc _ ≤ r i ^ k * exp (b + (-b * t) + (-r i * 1)) := + mul_le_mul_of_nonneg_left (exp_le_exp.mpr harg) (pow_nonneg (hr i).le _) + _ = _ := by rw [exp_add, exp_add]; ring + calc exponentialMomentSum r k t + ≤ ∑' i, (exp b * exp (-b * t)) * (r i ^ k * exp (-r i * 1)) := + Summable.tsum_le_tsum hterm + (summable_pow_mul_exp_neg_mul hr ha hs k (zero_lt_one.trans_le ht)) + ((summable_pow_mul_exp_neg_mul hr ha hs k zero_lt_one).mul_left _) + _ = _ := by rw [tsum_mul_left]; unfold exponentialMomentSum; ring + +/-- Zhang's large-time estimate, with the stronger admissible endpoint +`b ≤ r i` for every spectral rate. A positive `b` gives actual decay. -/ +theorem isBigO_iteratedDeriv_exponentialMomentSum_zero_atTop + {ι : Type*} {r : ι → ℝ} {a b : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (hb : ∀ i, b ≤ r i) (k : ℕ) : + (iteratedDeriv k (exponentialMomentSum r 0)) =O[atTop] + (fun t ↦ exp (-b * t)) := by + apply Asymptotics.IsBigO.of_bound (exp b * exponentialMomentSum r k 1) + filter_upwards [eventually_ge_atTop (1 : ℝ)] with t ht + rw [iteratedDeriv_exponentialMomentSum_zero hr ha hs k (zero_lt_one.trans_le ht), + norm_mul, norm_pow] + simp only [norm_neg, norm_one, one_pow, one_mul, Real.norm_eq_abs, + abs_of_nonneg (exponentialMomentSum_nonneg hr k t), abs_of_pos (exp_pos _)] + exact exponentialMomentSum_le_exp_mul hr ha hs hb k ht + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSumBounds.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSumBounds.lean new file mode 100644 index 000000000..d7bb7aa3b --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSumBounds.lean @@ -0,0 +1,116 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Topology.Algebra.InfiniteSum.Real +import TauCeti.Analysis.SpecialFunctions.Exp.Bounds +import Mathlib.Analysis.Normed.Group.InfiniteSum +import Mathlib.Tactic.Ring + +/-! +# Bounds for positive spectral exponential sums + +A summable inverse power of positive rates dominates every exponentially +damped natural moment. This is the scalar estimate underlying Lemma 2 of +R. Zhang, `Complete Monotonicity of Special Functions`, arXiv:1506.07012v13, +equations (2.3) and (2.8). Arbitrary index types and nonnegative exponents +include finite and empty spectra. +-/ + +public section + +open Filter Topology + +namespace Real + +/-- Exponential damping dominates a natural power, with a bound adapted to +an inverse spectral moment. The constant is independent of both variables. -/ +theorem exists_pow_mul_exp_neg_mul_le_rpow {a : ℝ} (ha : 0 ≤ a) (k : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ r t : ℝ, 0 < r → 0 < t → + r ^ k * exp (-r * t) ≤ C * t ^ (-(a + (k : ℝ))) * r ^ (-a) := by + obtain ⟨C, hC, hbound⟩ := TauCeti.exists_rpow_mul_exp_neg_mul_le + (add_nonneg ha (Nat.cast_nonneg k)) (show (0 : ℝ) < 1 by norm_num) + refine ⟨C, hC, fun r t hr ht ↦ ?_⟩ + have hrpow : r ^ (a + (k : ℝ)) * r ^ (-a) = r ^ k := by + rw [← rpow_add hr, show a + (k : ℝ) + -a = (k : ℝ) by ring, rpow_natCast] + have htpow : t ^ (a + (k : ℝ)) * t ^ (-(a + (k : ℝ))) = 1 := by + rw [← rpow_add ht, add_neg_cancel, rpow_zero] + have hid : r ^ k * exp (-r * t) = + ((r * t) ^ (a + (k : ℝ)) * exp (-(r * t))) * + (r ^ (-a) * t ^ (-(a + (k : ℝ)))) := by + rw [mul_rpow hr.le ht.le] + calc r ^ k * exp (-r * t) + = (r ^ (a + (k : ℝ)) * r ^ (-a)) * + (t ^ (a + (k : ℝ)) * t ^ (-(a + (k : ℝ)))) * exp (-(r * t)) := by + rw [hrpow, htpow] + simp only [mul_one, neg_mul] + _ = _ := by ring + rw [hid] + calc _ ≤ C * (r ^ (-a) * t ^ (-(a + (k : ℝ)))) := + mul_le_mul_of_nonneg_right + (by simpa only [one_mul] using hbound (r * t) (mul_nonneg hr.le ht.le)) + (by positivity) + _ = _ := by ring + +/-- Any natural moment of positive rates is summable after exponential +damping, provided one inverse spectral moment is summable. -/ +theorem summable_pow_mul_exp_neg_mul {ι : Type*} {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (k : ℕ) {t : ℝ} (ht : 0 < t) : + Summable (fun i ↦ r i ^ k * exp (-r i * t)) := by + obtain ⟨C, _, hC⟩ := exists_pow_mul_exp_neg_mul_le_rpow ha k + exact Summable.of_nonneg_of_le + (fun i ↦ mul_nonneg (pow_nonneg (hr i).le _) (exp_nonneg _)) + (fun i ↦ hC (r i) t (hr i) ht) (hs.mul_left (C * t ^ (-(a + (k : ℝ))))) + +/-- An inverse spectral moment gives a global power bound for the +corresponding exponentially damped natural moment on the open half-line. -/ +theorem exists_tsum_pow_mul_exp_neg_mul_le {ι : Type*} {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (k : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ t : ℝ, 0 < t → + (∑' i, r i ^ k * exp (-r i * t)) ≤ C * t ^ (-(a + (k : ℝ))) := by + obtain ⟨C, hC, hbound⟩ := exists_pow_mul_exp_neg_mul_le_rpow ha k + refine ⟨C * ∑' i, r i ^ (-a), + mul_nonneg hC (tsum_nonneg fun i ↦ (rpow_pos_of_pos (hr i) (-a)).le), + fun t ht ↦ ?_⟩ + calc (∑' i, r i ^ k * exp (-r i * t)) + ≤ ∑' i, C * t ^ (-(a + (k : ℝ))) * r i ^ (-a) := + Summable.tsum_le_tsum (fun i ↦ hbound (r i) t (hr i) ht) + (summable_pow_mul_exp_neg_mul hr ha hs k ht) + (hs.mul_left (C * t ^ (-(a + (k : ℝ))))) + _ = _ := by rw [tsum_mul_left]; ring + +/-- Larger inverse powers of positive rates are summable whenever a +nonnegative inverse power is summable. Finite exceptional small rates do +not require a uniform lower bound in the hypotheses. -/ +theorem summable_rpow_neg_of_le {ι : Type*} {r : ι → ℝ} {a p : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (hs : Summable (fun i ↦ r i ^ (-a))) + (hap : a ≤ p) : Summable (fun i ↦ r i ^ (-p)) := by + apply Summable.of_norm_bounded_eventually hs + filter_upwards [hs.tendsto_cofinite_zero.eventually (gt_mem_nhds zero_lt_one)] with i hi + have hri : 1 ≤ r i := by + rcases (rpow_lt_one_iff_of_pos (hr i)).mp hi with h | h + · exact h.1.le + · linarith [h.2] + rw [Real.norm_eq_abs, abs_of_pos (rpow_pos_of_pos (hr i) _)] + exact rpow_le_rpow_of_exponent_le hri (neg_le_neg hap) + +/-- In particular, Zhang's exponent below one controls every reciprocal +natural power appearing in the Laplace transform, including the endpoint. -/ +theorem summable_inv_pow_of_inverse_moment {ι : Type*} {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (ha1 : a ≤ 1) + (hs : Summable (fun i ↦ r i ^ (-a))) (k : ℕ) : + Summable (fun i ↦ (r i ^ (k + 1))⁻¹) := by + have h := summable_rpow_neg_of_le hr ha hs + (ha1.trans (show (1 : ℝ) ≤ ((k + 1 : ℕ) : ℝ) by + exact_mod_cast Nat.succ_le_succ (Nat.zero_le k))) + apply h.congr + intro i + rw [rpow_neg (hr i).le, rpow_natCast] + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSumLaplace.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSumLaplace.lean new file mode 100644 index 000000000..8369530e9 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSumLaplace.lean @@ -0,0 +1,82 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSum +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.WeightedMixtureLaplace + +/-! +# Laplace transforms of positive spectral heat traces + +For a positive spectrum, the `k`th Laplace moment is finite on the closed +nonnegative axis whenever the inverse `(k + 1)`st spectral moment is +summable. The exact integral and its bound are Zhang, arXiv:1506.07012v13, +Lemma 2, equations (2.5) and the integral equality in (2.6). + +The hypotheses state summability explicitly. A heat trace can exist at +every positive time while its zeroth Laplace moment diverges. +-/ + +public section + +open MeasureTheory Set + +namespace Real + +/-- Nonnegative shifts decrease reciprocal natural spectral moments. -/ +theorem summable_factorial_div_add_pow {ι : Type*} {r : ι → ℝ} + (hr : ∀ i, 0 < r i) (k : ℕ) + (hs : Summable (fun i ↦ (r i ^ (k + 1))⁻¹)) {x : ℝ} (hx : 0 ≤ x) : + Summable (fun i ↦ (k.factorial : ℝ) / (x + r i) ^ (k + 1)) := by + simpa only [one_mul] using summable_mul_factorial_div_add_pow + hr (fun _ ↦ zero_le_one) k (by simpa only [one_div] using hs) hx + +/-- The Laplace transform of a positive heat trace equals the shifted +inverse spectral moment, with actual integrability also established. -/ +theorem integrableOn_and_integral_exp_mul_pow_mul_exponentialMomentSum + {ι : Type*} [Countable ι] {r : ι → ℝ} + (hr : ∀ i, 0 < r i) (k : ℕ) + (hs : Summable (fun i ↦ (r i ^ (k + 1))⁻¹)) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ k * exponentialMomentSum r 0 t) + (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ k * exponentialMomentSum r 0 t) = + ∑' i, (k.factorial : ℝ) / (x + r i) ^ (k + 1) := by + simpa only [exponentialMomentSum, pow_zero, one_mul] using + integrableOn_and_integral_exp_mul_pow_mul_tsum hr (fun _ ↦ zero_le_one) k + (by simpa only [one_div] using hs) hx + +/-- The Laplace moment is bounded by its value at the endpoint zero. -/ +theorem integral_exp_mul_pow_mul_exponentialMomentSum_le + {ι : Type*} [Countable ι] {r : ι → ℝ} + (hr : ∀ i, 0 < r i) (k : ℕ) + (hs : Summable (fun i ↦ (r i ^ (k + 1))⁻¹)) {x : ℝ} (hx : 0 ≤ x) : + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ k * exponentialMomentSum r 0 t) ≤ + ∑' i, (k.factorial : ℝ) / r i ^ (k + 1) := by + rw [(integrableOn_and_integral_exp_mul_pow_mul_exponentialMomentSum hr k hs hx).2] + apply Summable.tsum_le_tsum _ (summable_factorial_div_add_pow hr k hs hx) + (by simpa only [zero_add] using summable_factorial_div_add_pow hr k hs (x := 0) le_rfl) + intro i + apply div_le_div_of_nonneg_left (Nat.cast_nonneg _) (pow_pos (hr i) _) + exact pow_le_pow_left₀ (hr i).le (le_add_of_nonneg_left hx) _ + +/-- Zhang's inverse moment below one discharges all Laplace integrability +hypotheses. The stronger boundary exponent `a = 1` is allowed as well. -/ +theorem laplace_exponentialMomentSum_of_inverse_moment + {ι : Type*} [Countable ι] {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (ha1 : a ≤ 1) + (hs : Summable (fun i ↦ r i ^ (-a))) (k : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ k * exponentialMomentSum r 0 t) + (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ k * exponentialMomentSum r 0 t) = + ∑' i, (k.factorial : ℝ) / (x + r i) ^ (k + 1) := + integrableOn_and_integral_exp_mul_pow_mul_exponentialMomentSum hr k + (summable_inv_pow_of_inverse_moment hr ha ha1 hs k) hx + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/LaguerreHeatLaplace.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/LaguerreHeatLaplace.lean new file mode 100644 index 000000000..4c42794aa --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/LaguerreHeatLaplace.lean @@ -0,0 +1,113 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.LaplaceKernel +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.WeightedHeatLaplace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSum +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumLaplace +import Mathlib.Tactic.Ring +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds + +/-! +# The Laguerre representation of weighted heat-trace moments + +The two integrals in Zhang, arXiv:1506.07012v13, equations (2.16) and +(2.18)--(2.21), agree and have the same positive spectral sum. All integrals +are actually integrable. The Laplace endpoint zero is included when the +inverse spectral moment is summable. + +The sign-reversed monic polynomial used here already contains the factor +`k!` in the classical formula. It is evaluated at `-x*t`. +-/ + +public section + +open MeasureTheory Set + +namespace Real + +/-- The Laguerre-weighted heat integral equals the positive weighted +spectral sum, including at the Laplace endpoint zero. -/ +theorem laplace_eval_generalizedLaguerre_exponentialMomentSum + {ι : Type*} [Countable ι] {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (ha1 : a ≤ 1) + (hs : Summable (fun i ↦ r i ^ (-a))) (k m : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ m * exponentialMomentSum r 0 t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ m * exponentialMomentSum r 0 t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) = + ∑' i, r i ^ k * ((k + m).factorial : ℝ) / (x + r i) ^ (k + m + 1) := by + have hmoment (n : ℕ) := laplace_exponentialMomentSum_of_inverse_moment + hr ha ha1 hs n hx + obtain ⟨hint, heval⟩ := + Polynomial.integrableOn_and_integral_exp_mul_pow_mul_eval_generalizedLaguerre + (exponentialMomentSum r 0) k m x (fun j _ ↦ (hmoment (m + j)).1) + refine ⟨hint, heval.trans ?_⟩ + let c : ℕ → ℝ := fun j ↦ (k.choose j : ℝ) * + (ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) * (-x) ^ j + let F : ℕ → ι → ℝ := fun j i ↦ + c j * (((m + j).factorial : ℝ) / (x + r i) ^ (m + j + 1)) + have hsum (j : ℕ) : Summable (F j) := + (summable_factorial_div_add_pow hr (m + j) + (summable_inv_pow_of_inverse_moment hr ha ha1 hs (m + j)) hx).mul_left (c j) + calc + _ = ∑ j ∈ Finset.range (k + 1), ∑' i, F j i := by + apply Finset.sum_congr rfl + intro j _ + rw [(hmoment (m + j)).2] + exact (tsum_mul_left : (∑' i, F j i) = _).symm + _ = ∑' i, ∑ j ∈ Finset.range (k + 1), F j i := + (Summable.tsum_finsetSum (fun j _ ↦ hsum j)).symm + _ = _ := by + apply tsum_congr + intro i + calc + _ = ∑ j ∈ Finset.range (k + 1), + (k.choose j : ℝ) * + (ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) * + (-x) ^ j * ((m + j).factorial : ℝ) / (x + r i) ^ (m + j + 1) := by + apply Finset.sum_congr rfl + intro j _ + dsimp only [F, c] + ring + _ = ((k + m).factorial : ℝ) * r i ^ k / (x + r i) ^ (k + m + 1) := by + have h := Polynomial.sum_generalizedLaguerre_laplace_coefficients k m + (add_pos_of_nonneg_of_pos hx (hr i)).ne' (-x) + simpa only [show x + r i + -x = r i by ring] using h + _ = _ := by ring + +/-- The positive weighted heat integral and the Laguerre integral coincide. +This is Zhang's full two-index heat representation with the repository's +factorial polynomial normalization. -/ +theorem weighted_heat_integral_eq_laguerre_heat_integral + {ι : Type*} [Countable ι] {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (ha1 : a ≤ 1) + (hs : Summable (fun i ↦ r i ^ (-a))) (k m : ℕ) {x : ℝ} (hx : 0 ≤ x) : + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ (k + m) * exponentialMomentSum r k t) = + ∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ m * exponentialMomentSum r 0 t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t) := + (laplace_weighted_exponentialMomentSum_of_inverse_moment hr ha ha1 hs k m hx).2.trans + (laplace_eval_generalizedLaguerre_exponentialMomentSum hr ha ha1 hs k m hx).2.symm + +/-- Zhang's signed heat derivative is the nonnegative weighted spectral +moment. Positivity is a consequence, not a definition of the derivative. -/ +theorem neg_mul_pow_mul_iteratedDeriv_exponentialMomentSum_zero + {ι : Type*} {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) + (hs : Summable (fun i ↦ r i ^ (-a))) (k : ℕ) {t : ℝ} (ht : 0 < t) : + (-t) ^ k * iteratedDeriv k (exponentialMomentSum r 0) t = + t ^ k * exponentialMomentSum r k t := by + rw [iteratedDeriv_exponentialMomentSum_zero hr ha hs k ht] + calc + _ = ((-t) * (-1)) ^ k * exponentialMomentSum r k t := by rw [mul_pow]; ring + _ = _ := by rw [neg_mul_neg, mul_one] + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/LaplaceConstant.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/LaplaceConstant.lean new file mode 100644 index 000000000..2b4c2246c --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/LaplaceConstant.lean @@ -0,0 +1,63 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +public import Mathlib.MeasureTheory.Integral.IntegrableOn +import Mathlib.Analysis.SpecialFunctions.Exp +import TauCeti.MeasureTheory.Integral.Exp.Decay +import Mathlib.Tactic.Ring + +/-! +# Laplace moments after adding a constant to a heat trace + +A constant spectral term contributes the corresponding factorial reciprocal +power at positive Laplace parameters. Parameter zero is excluded because +the added nonzero constant need not be integrable there. +-/ + +public section + +open MeasureTheory + +namespace Real + +/-- At positive Laplace parameters, a constant heat contribution has the +usual integrable factorial reciprocal moment. -/ +theorem laplace_constant (c : ℝ) (k : ℕ) {x : ℝ} (hx : 0 < x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ k * c) (Set.Ioi 0) ∧ + (∫ t : ℝ in Set.Ioi 0, exp (-x * t) * t ^ k * c) = + c * (k.factorial : ℝ) / x ^ (k + 1) := by + have heq : (fun t : ℝ ↦ exp (-x * t) * t ^ k * c) = + (fun t ↦ c * (t ^ k * exp (-(x * t)))) := by + funext t + rw [neg_mul] + ring + rw [heq] + refine ⟨(TauCeti.integrableOn_pow_mul_exp_neg_mul_Ioi k hx).const_mul c, ?_⟩ + rw [integral_const_mul, TauCeti.integral_pow_mul_exp_neg_mul_Ioi k hx] + ring + +/-- Adding a constant to an integrable heat trace adds its explicit +factorial reciprocal term to each positive-parameter Laplace moment. -/ +theorem laplace_const_add {H : ℝ → ℝ} (c : ℝ) (k : ℕ) {x : ℝ} (hx : 0 < x) + (hH : IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ k * H t) (Set.Ioi 0)) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ k * (c + H t)) (Set.Ioi 0) ∧ + (∫ t : ℝ in Set.Ioi 0, exp (-x * t) * t ^ k * (c + H t)) = + c * (k.factorial : ℝ) / x ^ (k + 1) + + ∫ t : ℝ in Set.Ioi 0, exp (-x * t) * t ^ k * H t := by + have heq : (fun t : ℝ ↦ exp (-x * t) * t ^ k * (c + H t)) = + (fun t ↦ exp (-x * t) * t ^ k * c) + + (fun t ↦ exp (-x * t) * t ^ k * H t) := by + funext t + exact mul_add _ _ _ + rw [heq] + obtain ⟨hc, hval⟩ := laplace_constant c k hx + exact ⟨hc.add hH, (integral_add hc hH).trans (congrArg (· + _) hval)⟩ + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/PositiveSlopeHeatTrace.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/PositiveSlopeHeatTrace.lean new file mode 100644 index 000000000..cfa130db6 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/PositiveSlopeHeatTrace.lean @@ -0,0 +1,89 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSum +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumLaplace +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# The heat trace of a summable positive linear product + +Only strictly positive slopes contribute to the zero spectrum. Zero slopes +are omitted, rather than being inverted using the totalized inverse at zero. +Repeated slopes remain separate indices, so multiplicities are retained. + +Summability of the slopes is sufficient for all Laplace moments, including +at Laplace parameter zero. It gives small-time exponent one, not an exponent +strictly below one without additional growth information. +-/ + +public section + +open MeasureTheory Set + +namespace Real + +/-- The positive-zero heat trace associated with nonnegative linear-product +slopes. Zero slopes do not represent zeros and are excluded. -/ +@[expose] noncomputable def positiveSlopeHeatTrace {ι : Type*} (a : ι → ℝ) : ℝ → ℝ := + exponentialMomentSum (fun i : {i // 0 < a i} ↦ (a i)⁻¹) 0 + +/-- Reciprocal spectral rates recover the positive slopes exactly. -/ +theorem summable_inverse_rates_positiveSlopes {ι : Type*} {a : ι → ℝ} + (hs : Summable a) : + Summable (fun i : {i // 0 < a i} ↦ ((a i)⁻¹) ^ (-(1 : ℝ))) := by + apply (hs.subtype (fun i ↦ 0 < a i)).congr + intro i + rw [rpow_neg (inv_pos.mpr i.property).le, rpow_one, inv_inv] + rfl + +/-- The positive-zero heat trace of a summable linear product is completely +monotone at positive time, including finite products and constants. -/ +theorem isCompletelyMonotoneOnIoi_positiveSlopeHeatTrace {ι : Type*} {a : ι → ℝ} + (hs : Summable a) : TauCeti.IsCompletelyMonotoneOnIoi (positiveSlopeHeatTrace a) := + isCompletelyMonotoneOnIoi_exponentialMomentSum (fun i ↦ inv_pos.mpr i.property) + zero_le_one (summable_inverse_rates_positiveSlopes hs) 0 + +/-- Every Laplace moment of the positive-zero heat trace is a factorial +resolvent sum. This includes the Laplace parameter zero. -/ +theorem laplace_positiveSlopeHeatTrace {ι : Type*} [Countable ι] {a : ι → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (k : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ k * positiveSlopeHeatTrace a t) + (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ k * positiveSlopeHeatTrace a t) = + (k.factorial : ℝ) * ∑' i, a i ^ (k + 1) / (1 + a i * x) ^ (k + 1) := by + obtain ⟨hint, heq⟩ := laplace_exponentialMomentSum_of_inverse_moment + (fun i : {i // 0 < a i} ↦ inv_pos.mpr i.property) zero_le_one le_rfl + (summable_inverse_rates_positiveSlopes hs) k hx + refine ⟨hint, heq.trans ?_⟩ + have hterm (i : {i // 0 < a i}) : + (k.factorial : ℝ) / (x + (a i)⁻¹) ^ (k + 1) = + (k.factorial : ℝ) * (a i ^ (k + 1) / (1 + a i * x) ^ (k + 1)) := by + have hbase : x + (a i)⁻¹ = (1 + a i * x) / a i := by + field_simp [i.property.ne'] + ring + rw [hbase, div_pow, div_div_eq_mul_div, mul_div_assoc] + calc (∑' i : {i // 0 < a i}, (k.factorial : ℝ) / (x + (a i)⁻¹) ^ (k + 1)) + = (k.factorial : ℝ) * + ∑' i : {i // 0 < a i}, a i ^ (k + 1) / (1 + a i * x) ^ (k + 1) := by + simp_rw [hterm] + rw [tsum_mul_left] + _ = _ := by + congr 1 + have hsupport : Function.support + (fun i ↦ a i ^ (k + 1) / (1 + a i * x) ^ (k + 1)) ⊆ {i | 0 < a i} := by + intro i hi + by_contra hn + have hzero : a i = 0 := le_antisymm (le_of_not_gt hn) (ha i) + exact hi (by simp only [hzero, zero_pow (Nat.succ_ne_zero k), zero_div]) + exact tsum_subtype_eq_of_support_subset hsupport + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/PositiveSlopeWeightedHeat.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/PositiveSlopeWeightedHeat.lean new file mode 100644 index 000000000..211b00006 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/PositiveSlopeWeightedHeat.lean @@ -0,0 +1,105 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventHierarchy +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.LaguerreHeatLaplace +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.WeightedHeatLaplace +import Mathlib.MeasureTheory.Integral.Bochner.Set +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# Weighted heat representations of the positive resolvent hierarchy + +Zero slopes are omitted before inversion and every repeated positive slope +retains its multiplicity. Both the positive signed-heat-derivative integral +and its Laguerre integral equal the same weighted resolvent sum. +-/ + +public section + +open MeasureTheory Set + +namespace Real + +/-- The weighted inverse positive-slope spectrum is exactly the factorial +resolvent hierarchy with zero exponential constant. -/ +theorem tsum_positiveSlope_weighted_resolvent {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (k m : ℕ) (x : ℝ) : + (∑' i : {i // 0 < a i}, (a i)⁻¹ ^ k * ((k + m).factorial : ℝ) / + (x + (a i)⁻¹) ^ (k + m + 1)) = weightedResolventSum a 0 k m x := by + have hterm (i : {i // 0 < a i}) : + (a i)⁻¹ ^ k * ((k + m).factorial : ℝ) / (x + (a i)⁻¹) ^ (k + m + 1) = + ((k + m).factorial : ℝ) * + (a i ^ (m + 1) / (1 + a i * x) ^ (k + m + 1)) := by + have hbase : x + (a i)⁻¹ = (1 + a i * x) / a i := by + field_simp [i.property.ne'] + ring + rw [hbase, div_pow, div_div_eq_mul_div] + calc + _ = (((k + m).factorial : ℝ) * a i ^ (m + 1)) / + (1 + a i * x) ^ (k + m + 1) := by + congr 1 + rw [show k + m + 1 = k + (m + 1) by lia, pow_add, inv_pow] + field_simp [i.property.ne'] + _ = _ := by ring + simp_rw [hterm] + rw [tsum_mul_left] + have hsupport : Function.support + (fun i ↦ a i ^ (m + 1) / (1 + a i * x) ^ (k + m + 1)) ⊆ {i | 0 < a i} := by + intro i hi + by_contra hn + have hz : a i = 0 := le_antisymm (le_of_not_gt hn) (ha i) + exact hi (by simp only [hz, zero_pow (Nat.succ_ne_zero m), zero_div]) + have hsub := tsum_subtype_eq_of_support_subset hsupport + simp only [Set.coe_ofPred] at hsub + rw [hsub] + simp only [weightedResolventSum, mul_zero, zero_mul, zero_add] + +/-- The signed heat derivative gives the positive resolvent hierarchy by +an actually integrable Laplace integral, also at parameter zero. -/ +theorem laplace_weighted_positiveSlopeHeatTrace {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (k m : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (positiveSlopeHeatTrace a) t) (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (positiveSlopeHeatTrace a) t) = weightedResolventSum a 0 k m x := by + let r : {i // 0 < a i} → ℝ := fun i ↦ (a i)⁻¹ + have hr (i : {i // 0 < a i}) : 0 < r i := inv_pos.mpr i.property + have hrinv := summable_inverse_rates_positiveSlopes hs + have h := laplace_weighted_exponentialMomentSum_of_inverse_moment + hr zero_le_one le_rfl hrinv k m hx + have heq : (fun t : ℝ ↦ exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (positiveSlopeHeatTrace a) t) =ᵐ[volume.restrict (Ioi 0)] + (fun t : ℝ ↦ exp (-x * t) * t ^ (k + m) * exponentialMomentSum r k t) := by + filter_upwards [ae_restrict_mem measurableSet_Ioi] with t (ht : 0 < t) + have hder := neg_mul_pow_mul_iteratedDeriv_exponentialMomentSum_zero + hr zero_le_one hrinv k ht + change exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (exponentialMomentSum r 0) t = _ + rw [mul_assoc (exp (-x * t) * t ^ m), hder, pow_add] + ring + exact ⟨h.1.congr heq.symm, (integral_congr_ae heq).trans + (h.2.trans (tsum_positiveSlope_weighted_resolvent ha k m x))⟩ + +/-- The Laguerre kernel gives the same positive resolvent hierarchy. +Its factorial is already part of `generalizedLaguerre`. -/ +theorem laplace_laguerre_positiveSlopeHeatTrace {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (k m : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ m * positiveSlopeHeatTrace a t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ m * positiveSlopeHeatTrace a t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) = + weightedResolventSum a 0 k m x := by + have h := laplace_eval_generalizedLaguerre_exponentialMomentSum + (fun i : {i // 0 < a i} ↦ inv_pos.mpr i.property) zero_le_one le_rfl + (summable_inverse_rates_positiveSlopes hs) k m hx + exact ⟨h.1, h.2.trans (tsum_positiveSlope_weighted_resolvent ha k m x)⟩ + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/WeightedHeatLaplace.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/WeightedHeatLaplace.lean new file mode 100644 index 000000000..a72e37312 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/WeightedHeatLaplace.lean @@ -0,0 +1,74 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSum +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.WeightedMixtureLaplace +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# Weighted heat-trace Laplace moments + +For a positive spectrum `r`, Zhang's `Theta_k(t)` is `t^k` times +`exponentialMomentSum r k t`. Its `m`th Laplace moment is the positive +factorial sum in equations (2.15)--(2.16) of arXiv:1506.07012v13. +The inverse `(m+1)`st spectral moment suffices; the exponent need not +increase with `k`. The endpoint `x = 0` is included. +-/ + +public section + +open MeasureTheory Set + +namespace Real + +/-- Polynomial weighting of the spectrum cancels against the additional +inverse moments required by the weighted Laplace integral. -/ +theorem summable_pow_div_pow_add {ι : Type*} {r : ι → ℝ} + (hr : ∀ i, r i ≠ 0) (k m : ℕ) + (hs : Summable (fun i ↦ (r i ^ (m + 1))⁻¹)) : + Summable (fun i ↦ r i ^ k / r i ^ (k + m + 1)) := by + apply hs.congr + intro i + rw [show k + m + 1 = k + (m + 1) by lia, pow_add] + field_simp [hr i] + simp only [pow_add, pow_succ] + ring + +/-- Every weighted heat-trace Laplace moment is a positive resolvent sum. -/ +theorem laplace_weighted_exponentialMomentSum + {ι : Type*} [Countable ι] {r : ι → ℝ} + (hr : ∀ i, 0 < r i) (k m : ℕ) + (hs : Summable (fun i ↦ (r i ^ (m + 1))⁻¹)) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ (k + m) * + exponentialMomentSum r k t) (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ (k + m) * + exponentialMomentSum r k t) = + ∑' i, r i ^ k * ((k + m).factorial : ℝ) / (x + r i) ^ (k + m + 1) := by + simpa only [exponentialMomentSum] using + integrableOn_and_integral_exp_mul_pow_mul_tsum hr (fun i ↦ pow_nonneg (hr i).le k) + (k + m) (summable_pow_div_pow_add (fun i ↦ (hr i).ne') k m hs) hx + +/-- An inverse spectral moment of exponent at most one gives all weighted +heat-trace Laplace identities, including at the endpoint zero. -/ +theorem laplace_weighted_exponentialMomentSum_of_inverse_moment + {ι : Type*} [Countable ι] {r : ι → ℝ} {a : ℝ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (ha1 : a ≤ 1) + (hs : Summable (fun i ↦ r i ^ (-a))) (k m : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ (k + m) * + exponentialMomentSum r k t) (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ (k + m) * + exponentialMomentSum r k t) = + ∑' i, r i ^ k * ((k + m).factorial : ℝ) / (x + r i) ^ (k + m + 1) := + laplace_weighted_exponentialMomentSum hr k m + (summable_inv_pow_of_inverse_moment hr ha ha1 hs m) hx + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/WeightedMixtureLaplace.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/WeightedMixtureLaplace.lean new file mode 100644 index 000000000..d56ccba82 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/WeightedMixtureLaplace.lean @@ -0,0 +1,113 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.Analysis.SpecialFunctions.Exp +import Mathlib.MeasureTheory.Integral.Bochner.Set +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +import Mathlib.MeasureTheory.Integral.DominatedConvergence +import TauCeti.MeasureTheory.Integral.Exp.Decay +import Mathlib.Tactic.Ring + +/-! +# Laplace moments of nonnegative exponential mixtures + +A summable weighted inverse moment justifies both the actual integrability +and the exchange of the spectral sum and the Laplace integral. Zero weights +and an empty spectrum are allowed. The Laplace parameter may be zero. +-/ + +public section + +open MeasureTheory Set + +namespace Real + +/-- Nonnegative shifts preserve summability of weighted inverse moments. -/ +theorem summable_mul_factorial_div_add_pow {ι : Type*} {r w : ι → ℝ} + (hr : ∀ i, 0 < r i) (hw : ∀ i, 0 ≤ w i) (n : ℕ) + (hs : Summable (fun i ↦ w i / r i ^ (n + 1))) + {x : ℝ} (hx : 0 ≤ x) : + Summable (fun i ↦ w i * (n.factorial : ℝ) / (x + r i) ^ (n + 1)) := by + apply Summable.of_nonneg_of_le + (fun i ↦ div_nonneg (mul_nonneg (hw i) (Nat.cast_nonneg _)) + (pow_nonneg (add_nonneg hx (hr i).le) _)) ?_ (hs.mul_left (n.factorial : ℝ)) + intro i + calc + w i * (n.factorial : ℝ) / (x + r i) ^ (n + 1) ≤ + w i * (n.factorial : ℝ) / r i ^ (n + 1) := + div_le_div_of_nonneg_left (mul_nonneg (hw i) (Nat.cast_nonneg _)) + (pow_pos (hr i) _) (pow_le_pow_left₀ (hr i).le (le_add_of_nonneg_left hx) _) + _ = _ := by ring + +/-- A nonnegative exponential mixture has its expected Laplace moment, +with actual integrability even when every weight is zero. -/ +theorem integrableOn_and_integral_exp_mul_pow_mul_tsum + {ι : Type*} [Countable ι] {r w : ι → ℝ} + (hr : ∀ i, 0 < r i) (hw : ∀ i, 0 ≤ w i) (n : ℕ) + (hs : Summable (fun i ↦ w i / r i ^ (n + 1))) + {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ exp (-x * t) * t ^ n * + ∑' i, w i * exp (-r i * t)) (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ n * + ∑' i, w i * exp (-r i * t)) = + ∑' i, w i * (n.factorial : ℝ) / (x + r i) ^ (n + 1) := by + have hpos (i : ι) : 0 < x + r i := add_pos_of_nonneg_of_pos hx (hr i) + have hint (i : ι) : IntegrableOn + (fun t : ℝ ↦ w i * (t ^ n * exp (-((x + r i) * t)))) (Ioi 0) := + (TauCeti.integrableOn_pow_mul_exp_neg_mul_Ioi n (hpos i)).const_mul (w i) + have heval (i : ι) : + (∫ t : ℝ in Ioi 0, w i * (t ^ n * exp (-((x + r i) * t)))) = + w i * (n.factorial : ℝ) / (x + r i) ^ (n + 1) := by + rw [integral_const_mul, TauCeti.integral_pow_mul_exp_neg_mul_Ioi n (hpos i)] + ring + have hnorm (i : ι) : + (∫ t : ℝ in Ioi 0, ‖w i * (t ^ n * exp (-((x + r i) * t)))‖) = + w i * (n.factorial : ℝ) / (x + r i) ^ (n + 1) := by + rw [← heval i] + apply integral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_Ioi] with t (ht : 0 < t) + exact Real.norm_of_nonneg + (mul_nonneg (hw i) (mul_nonneg (pow_nonneg ht.le _) (exp_nonneg _))) + have hsx := summable_mul_factorial_div_add_pow hr hw n hs hx + have hnormsum : Summable + (fun i ↦ ∫ t : ℝ in Ioi 0, ‖w i * (t ^ n * exp (-((x + r i) * t)))‖) := by + simpa only [hnorm] using hsx + have hfun : (fun t : ℝ ↦ ∑' i, w i * (t ^ n * exp (-((x + r i) * t)))) = + (fun t : ℝ ↦ exp (-x * t) * t ^ n * ∑' i, w i * exp (-r i * t)) := by + funext t + calc + _ = ∑' i, (exp (-x * t) * t ^ n) * (w i * exp (-r i * t)) := by + apply tsum_congr + intro i + simp only [add_mul, neg_add, exp_add, neg_mul] + ring + _ = _ := by rw [tsum_mul_left] + have heq : + (∫ t : ℝ in Ioi 0, exp (-x * t) * t ^ n * ∑' i, w i * exp (-r i * t)) = + ∑' i, w i * (n.factorial : ℝ) / (x + r i) ^ (n + 1) := by + rw [← hfun, ← integral_tsum_of_summable_integral_norm hint hnormsum] + simp only [heval] + refine ⟨?_, heq⟩ + by_cases h : ∃ i, 0 < w i + · obtain ⟨i, hi⟩ := h + apply Integrable.of_integral_ne_zero + rw [heq] + exact (hsx.tsum_pos + (fun j ↦ div_nonneg (mul_nonneg (hw j) (Nat.cast_nonneg _)) + (pow_nonneg (hpos j).le _)) i + (div_pos (mul_pos hi (by exact_mod_cast Nat.factorial_pos n)) + (pow_pos (hpos i) _))).ne' + · have hwzero : ∀ i, w i = 0 := by + intro i + exact le_antisymm (le_of_not_gt (fun hi ↦ h ⟨i, hi⟩)) (hw i) + simp only [hwzero, zero_mul, tsum_zero, mul_zero] + exact integrableOn_zero + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/FactorialExponential.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/FactorialExponential.lean new file mode 100644 index 000000000..08442ac68 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/FactorialExponential.lean @@ -0,0 +1,71 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Complex.Exponential +import Mathlib.Analysis.SpecialFunctions.Stirling + +/-! +# A factorial bound retaining the exponential scale + +The elementary upper bound supplied by the decreasing Stirling sequence +cancels the exponential factor in optimized Gaussian Cauchy estimates. +-/ + +public section + +namespace Real + +/-- A coarse global upper Stirling bound, sufficient to retain the exact +exponential scale. Only a polynomial prefactor is lost. -/ +private theorem factorial_le_two_exp_mul {n : ℕ} (hn : n ≠ 0) : + (n.factorial : ℝ) ≤ 2 * exp 1 * n * ((n : ℝ) / exp 1) ^ n := by + obtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn + have hs := Stirling.stirlingSeq'_antitone (Nat.zero_le m) + change Stirling.stirlingSeq (m + 1) ≤ Stirling.stirlingSeq 1 at hs + rw [Stirling.stirlingSeq_one] at hs + have he : exp 1 / sqrt 2 ≤ exp 1 := by + apply (div_le_iff₀ (sqrt_pos.mpr (by norm_num))).mpr + nlinarith [exp_pos 1, (one_le_sqrt.mpr (by norm_num : (1 : ℝ) ≤ 2))] + have hupper := hs.trans he + rw [Stirling.stirlingSeq, div_le_iff₀ (by positivity)] at hupper + have hsqrt : sqrt (2 * ((m + 1 : ℕ) : ℝ)) ≤ 2 * ((m + 1 : ℕ) : ℝ) := by + exact sqrt_le_self_iff.mpr (Or.inr (by + have hm : (0 : ℝ) ≤ m := Nat.cast_nonneg m + simp only [Nat.cast_add, Nat.cast_one] + linarith)) + calc + _ ≤ exp 1 * (sqrt (2 * ((m + 1 : ℕ) : ℝ)) * + (((m + 1 : ℕ) : ℝ) / exp 1) ^ (m + 1)) := hupper + _ ≤ exp 1 * (2 * ((m + 1 : ℕ) : ℝ) * + (((m + 1 : ℕ) : ℝ) / exp 1) ^ (m + 1)) := by gcongr + _ = _ := by simp only [Nat.succ_eq_add_one]; ring + +/-- The normalized factorial grows at most linearly. This includes `n=0` +and uses `n+1` so every denominator is strictly positive. -/ +theorem factorial_mul_exp_div_pow_le (n : ℕ) : + (n.factorial : ℝ) * (exp 1 / ((n : ℝ) + 1)) ^ n ≤ + 2 * exp 1 * ((n : ℝ) + 1) := by + obtain rfl | hn := eq_or_ne n 0 + · simp only [Nat.factorial_zero, Nat.cast_one, Nat.cast_zero, zero_add, pow_zero, + mul_one] + nlinarith [one_le_exp (by norm_num : (0 : ℝ) ≤ 1)] + · have hp : ((n : ℝ) / ((n : ℝ) + 1)) ^ n ≤ 1 := + pow_le_one₀ (by positivity) ((div_le_iff₀ (by positivity)).mpr (by linarith)) + calc + _ ≤ (2 * exp 1 * n * ((n : ℝ) / exp 1) ^ n) * + (exp 1 / ((n : ℝ) + 1)) ^ n := + mul_le_mul_of_nonneg_right (factorial_le_two_exp_mul hn) (by positivity) + _ = 2 * exp 1 * n * ((n : ℝ) / ((n : ℝ) + 1)) ^ n := by + rw [mul_assoc, ← mul_pow] + congr 2 + field_simp + _ ≤ 2 * exp 1 * n := by + simpa only [mul_one] using + mul_le_mul_of_nonneg_left hp (by positivity : 0 ≤ 2 * exp 1 * (n : ℝ)) + _ ≤ _ := by nlinarith [exp_pos 1] + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Gamma/BetaVariation.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Gamma/BetaVariation.lean new file mode 100644 index 000000000..493f0171f --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Gamma/BetaVariation.lean @@ -0,0 +1,172 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +import RealRooted.Mathlib.Analysis.SpecialFunctions.Gamma.Beta +import Mathlib.Analysis.SpecialFunctions.Pow.Deriv +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +/-! +# Integrable derivatives of beta weights + +For nonnegative exponents, `t^a (1-t)^b` is continuous on `[0, 1]` and has an +integrable derivative on the open interval. Its endpoint value at `1` plus +the integral of the absolute derivative is at most two. Exponent zero is +handled separately; no differentiability at either endpoint is assumed. +-/ + +public section + +open MeasureTheory + +namespace Real + +private noncomputable def betaDerivLeft (a b t : ℝ) : ℝ := + a * (t ^ (a - 1) * (1 - t) ^ b) + +private noncomputable def betaDerivRight (a b t : ℝ) : ℝ := + b * (t ^ a * (1 - t) ^ (b - 1)) + +private theorem betaDerivLeft_nonneg {a b t : ℝ} (ha : 0 ≤ a) + (ht : t ∈ Set.Icc (0 : ℝ) 1) : 0 ≤ betaDerivLeft a b t := by + exact mul_nonneg ha (mul_nonneg (rpow_nonneg ht.1 _) (rpow_nonneg (sub_nonneg.mpr ht.2) _)) + +private theorem betaDerivRight_nonneg {a b t : ℝ} (hb : 0 ≤ b) + (ht : t ∈ Set.Icc (0 : ℝ) 1) : 0 ≤ betaDerivRight a b t := by + exact mul_nonneg hb (mul_nonneg (rpow_nonneg ht.1 _) (rpow_nonneg (sub_nonneg.mpr ht.2) _)) + +private theorem intervalIntegrable_betaDerivLeft {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + IntervalIntegrable (betaDerivLeft a b) volume 0 1 := by + by_cases ha0 : a = 0 + · unfold betaDerivLeft + simp only [ha0, zero_mul] + exact intervalIntegrable_const + · have hapos : 0 < a := lt_of_le_of_ne ha (Ne.symm ha0) + have ha1 : -1 < a - 1 := by linarith + exact (intervalIntegral.intervalIntegrable_rpow_mul_one_sub_rpow + ha1 (by linarith : -1 < b)).const_mul a + +private theorem intervalIntegrable_betaDerivRight {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + IntervalIntegrable (betaDerivRight a b) volume 0 1 := by + by_cases hb0 : b = 0 + · unfold betaDerivRight + simp only [hb0, zero_mul] + exact intervalIntegrable_const + · have hbpos : 0 < b := lt_of_le_of_ne hb (Ne.symm hb0) + have hb1 : -1 < b - 1 := by linarith + exact (intervalIntegral.intervalIntegrable_rpow_mul_one_sub_rpow + (by linarith : -1 < a) hb1).const_mul b + +private theorem hasDerivAt_betaWeight {a b t : ℝ} (ht : t ∈ Set.Ioo (0 : ℝ) 1) : + HasDerivAt (fun x : ℝ ↦ x ^ a * (1 - x) ^ b) + (betaDerivLeft a b t - betaDerivRight a b t) t := by + have hleft : HasDerivAt (fun x : ℝ ↦ x ^ a) (a * t ^ (a - 1)) t := + hasDerivAt_rpow_const (Or.inl ht.1.ne') + have hright : HasDerivAt (fun x : ℝ ↦ (1 - x) ^ b) + (-(b * (1 - t) ^ (b - 1))) t := by + have hnonzero : 1 - t ≠ 0 := (sub_pos.mpr ht.2).ne' + simpa only [Function.comp_def, zero_sub, mul_neg, mul_one] using + (hasDerivAt_rpow_const (p := b) (Or.inl hnonzero)).comp t + ((hasDerivAt_const t (1 : ℝ)).sub (hasDerivAt_id t)) + convert hleft.mul hright using 1 + dsimp [betaDerivLeft, betaDerivRight] + ring + +private theorem integral_betaDerivLeft_le_one {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + (∫ t in (0 : ℝ)..1, betaDerivLeft a b t) ≤ 1 := by + by_cases ha0 : a = 0 + · simp [betaDerivLeft, ha0] + have hapos : 0 < a := lt_of_le_of_ne ha (Ne.symm ha0) + have hdom : IntervalIntegrable (fun t : ℝ ↦ a * t ^ (a - 1)) volume 0 1 := by + have h := (intervalIntegral.intervalIntegrable_rpow_mul_one_sub_rpow + (a := a - 1) (b := 0) (by linarith) (by norm_num)).const_mul a + simpa only [rpow_zero, mul_one] using h + have hint : (∫ t in (0 : ℝ)..1, a * t ^ (a - 1)) = 1 := by + rw [intervalIntegral.integral_const_mul, integral_rpow (Or.inl (by linarith : -1 < a - 1)), + sub_add_cancel, one_rpow, zero_rpow hapos.ne', sub_zero] + field_simp [hapos.ne'] + calc + _ ≤ ∫ t in (0 : ℝ)..1, a * t ^ (a - 1) := by + apply intervalIntegral.integral_mono_on zero_le_one + (intervalIntegrable_betaDerivLeft ha hb) hdom + intro t ht + have hpow : (1 - t) ^ b ≤ 1 := + rpow_le_one (sub_nonneg.mpr ht.2) (by linarith [ht.1]) hb + calc + betaDerivLeft a b t = (a * t ^ (a - 1)) * (1 - t) ^ b := by + dsimp [betaDerivLeft] + ring + _ ≤ (a * t ^ (a - 1)) * 1 := + mul_le_mul_of_nonneg_left hpow (mul_nonneg ha (rpow_nonneg ht.1 _)) + _ = a * t ^ (a - 1) := mul_one _ + _ = 1 := hint + +private theorem integral_betaDerivRight_le_one {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + (∫ t in (0 : ℝ)..1, betaDerivRight a b t) ≤ 1 := by + calc + _ = ∫ t in (0 : ℝ)..1, betaDerivLeft b a (1 - t) := by + apply intervalIntegral.integral_congr + intro t _ + dsimp [betaDerivLeft, betaDerivRight] + rw [show 1 - (1 - t) = t by ring] + ring + _ = ∫ t in (0 : ℝ)..1, betaDerivLeft b a t := by + simpa only [sub_self, sub_zero] using + intervalIntegral.integral_comp_sub_left (betaDerivLeft b a) + (a := (0 : ℝ)) (b := 1) 1 + _ ≤ 1 := integral_betaDerivLeft_le_one hb ha + +private theorem beta_endpoint_add_integral_abs_le_two {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + |(1 : ℝ) ^ a * (1 - 1) ^ b| + + (∫ t in (0 : ℝ)..1, |betaDerivLeft a b t - betaDerivRight a b t|) ≤ 2 := by + have hA := intervalIntegrable_betaDerivLeft ha hb + have hB := intervalIntegrable_betaDerivRight ha hb + have hAI := integral_betaDerivLeft_le_one ha hb + have hBI := integral_betaDerivRight_le_one ha hb + by_cases hb0 : b = 0 + · have heq : (∫ t in (0 : ℝ)..1, |betaDerivLeft a b t - betaDerivRight a b t|) = + ∫ t in (0 : ℝ)..1, betaDerivLeft a b t := by + apply intervalIntegral.integral_congr_Ioo_of_le zero_le_one + intro t ht + change |betaDerivLeft a b t - betaDerivRight a b t| = betaDerivLeft a b t + rw [show betaDerivRight a b t = 0 by simp [betaDerivRight, hb0], sub_zero, + abs_of_nonneg (betaDerivLeft_nonneg ha ⟨ht.1.le, ht.2.le⟩)] + rw [heq] + simp only [hb0, one_rpow, rpow_zero, mul_one, abs_one] + rw [hb0] at hAI + linarith + · have hnorm : (∫ t in (0 : ℝ)..1, |betaDerivLeft a b t - betaDerivRight a b t|) ≤ + (∫ t in (0 : ℝ)..1, betaDerivLeft a b t) + + ∫ t in (0 : ℝ)..1, betaDerivRight a b t := by + rw [← intervalIntegral.integral_add hA hB] + apply intervalIntegral.integral_mono_on zero_le_one (hA.sub hB).abs (hA.add hB) + intro t ht + calc + _ ≤ |betaDerivLeft a b t| + |betaDerivRight a b t| := abs_sub _ _ + _ = _ := by rw [abs_of_nonneg (betaDerivLeft_nonneg ha ht), + abs_of_nonneg (betaDerivRight_nonneg hb ht)] + simp only [one_rpow, sub_self, zero_rpow hb0, mul_zero, abs_zero, zero_add] + linarith + +/-- A beta weight with nonnegative exponents has an integrable interior derivative whose +absolute integral plus the right endpoint value is at most two. Zero exponents are included; +no endpoint differentiability or continuous-derivative assumption is imposed. -/ +theorem exists_integrable_deriv_rpow_mul_one_sub_rpow {a b : ℝ} + (ha : 0 ≤ a) (hb : 0 ≤ b) : + ∃ g : ℝ → ℝ, IntervalIntegrable g volume 0 1 ∧ + (∀ t ∈ Set.Ioo (0 : ℝ) 1, + HasDerivAt (fun x : ℝ ↦ x ^ a * (1 - x) ^ b) (g t) t) ∧ + |(1 : ℝ) ^ a * (1 - 1) ^ b| + (∫ t in (0 : ℝ)..1, |g t|) ≤ 2 := by + exact ⟨fun t ↦ betaDerivLeft a b t - betaDerivRight a b t, + (intervalIntegrable_betaDerivLeft ha hb).sub (intervalIntegrable_betaDerivRight ha hb), + fun _ ht ↦ hasDerivAt_betaWeight ht, beta_endpoint_add_integral_abs_le_two ha hb⟩ + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianTail.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianTail.lean new file mode 100644 index 000000000..739b7dd40 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianTail.lean @@ -0,0 +1,104 @@ +/- +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.Complex.Exponential +import Mathlib.Analysis.SpecialFunctions.Exp +import Mathlib.Tactic.Positivity.Finset + +/-! +# Geometric bounds for polynomially weighted Gaussian tails + +A bound for the polynomial growth over one lattice step, together with the +Gaussian decay over that step, yields a quantitative convergent majorant. +-/ + +public section + +namespace Real + +/-- Every polynomially weighted Gaussian sequence on the natural lattice is summable. -/ +theorem summable_nat_pow_mul_exp_neg_sq (q : ℕ) {u : ℝ} (hu : 0 < u) : + Summable (fun n : ℕ => (n : ℝ) ^ q * exp (-u * n ^ 2)) := by + refine (summable_pow_mul_exp_neg_nat_mul q hu).of_nonneg_of_le + (fun n => by positivity) (fun n => ?_) + apply mul_le_mul_of_nonneg_left (exp_le_exp.mpr ?_) (by positivity) + have hsq : (n : ℝ) ≤ (n : ℝ) ^ 2 := by + rcases Nat.eq_zero_or_pos n with hn | hn + · simp [hn] + · have hn' : (1 : ℝ) ≤ n := by exact_mod_cast (Nat.succ_le_iff.mpr hn) + nlinarith + nlinarith [mul_nonneg hu.le (sub_nonneg.mpr hsq)] + +private theorem pow_mul_exp_neg_sq_step {N n q : ℕ} {u B : ℝ} + (hN : 0 < N) (hn : N ≤ n) (hu : 0 ≤ u) + (hB : (((N : ℝ) + 1) / N) ^ q ≤ B) : + ((n : ℝ) + 1) ^ q * exp (-u * ((n : ℝ) + 1) ^ 2) ≤ + (B * exp (-u * (2 * N + 1))) * ((n : ℝ) ^ q * exp (-u * n ^ 2)) := by + have hN' : (0 : ℝ) < N := by exact_mod_cast hN + have hn' : (N : ℝ) ≤ n := by exact_mod_cast hn + have hlinear : (n : ℝ) + 1 ≤ (((N : ℝ) + 1) / N) * n := by + rw [div_mul_eq_mul_div₀, le_div_iff₀ hN'] + nlinarith + have hpoly : ((n : ℝ) + 1) ^ q ≤ B * (n : ℝ) ^ q := by + calc + ((n : ℝ) + 1) ^ q ≤ ((((N : ℝ) + 1) / N) * n) ^ q := + pow_le_pow_left₀ (by positivity) hlinear q + _ = (((N : ℝ) + 1) / N) ^ q * (n : ℝ) ^ q := mul_pow _ _ _ + _ ≤ B * (n : ℝ) ^ q := mul_le_mul_of_nonneg_right hB (by positivity) + have hexp : exp (-u * ((n : ℝ) + 1) ^ 2) ≤ + exp (-u * n ^ 2) * exp (-u * (2 * N + 1)) := by + rw [← exp_add] + apply exp_le_exp.mpr + nlinarith [mul_nonneg hu (sub_nonneg.mpr hn')] + calc + _ ≤ (B * (n : ℝ) ^ q) * + (exp (-u * n ^ 2) * exp (-u * (2 * N + 1))) := + mul_le_mul hpoly hexp (exp_nonneg _) (le_trans (by positivity) hpoly) + _ = _ := by ring + +/-- A lattice Gaussian tail is bounded termwise by an explicit geometric sequence. -/ +theorem nat_add_pow_mul_exp_neg_sq_le_geom {N q : ℕ} {u B : ℝ} + (hN : 0 < N) (hu : 0 ≤ u) (hB : (((N : ℝ) + 1) / N) ^ q ≤ B) (k : ℕ) : + ((N + k : ℕ) : ℝ) ^ q * exp (-u * ((N + k : ℕ) : ℝ) ^ 2) ≤ + (B * exp (-u * (2 * N + 1))) ^ k * ((N : ℝ) ^ q * exp (-u * N ^ 2)) := by + have hB0 : 0 ≤ B := (by positivity : 0 ≤ (((N : ℝ) + 1) / N) ^ q).trans hB + have h := le_geom (u := fun k : ℕ => + ((N + k : ℕ) : ℝ) ^ q * exp (-u * ((N + k : ℕ) : ℝ) ^ 2)) + (mul_nonneg hB0 (exp_nonneg (-u * (2 * N + 1)))) k (fun i _ => by + simpa only [Nat.cast_add, Nat.cast_one, add_assoc] using + pow_mul_exp_neg_sq_step hN (Nat.le_add_right N i) hu hB) + simpa only [Nat.add_zero] using h + +/-- A geometric one-step ratio below one proves summability of the Gaussian tail. -/ +theorem summable_nat_add_pow_mul_exp_neg_sq_of_ratio {N q : ℕ} {u B : ℝ} + (hN : 0 < N) (hu : 0 ≤ u) (hB : (((N : ℝ) + 1) / N) ^ q ≤ B) + (hr : B * exp (-u * (2 * N + 1)) < 1) : + Summable (fun k : ℕ => + ((N + k : ℕ) : ℝ) ^ q * exp (-u * ((N + k : ℕ) : ℝ) ^ 2)) := by + have hB0 : 0 ≤ B := (by positivity : 0 ≤ (((N : ℝ) + 1) / N) ^ q).trans hB + have hs := (summable_geometric_of_lt_one (mul_nonneg hB0 (exp_nonneg _)) hr).mul_right + ((N : ℝ) ^ q * exp (-u * N ^ 2)) + exact hs.of_nonneg_of_le (fun k => by positivity) + (nat_add_pow_mul_exp_neg_sq_le_geom hN hu hB) + +/-- Summing the geometric majorant gives an explicit bound for a Gaussian tail. -/ +theorem tsum_nat_add_pow_mul_exp_neg_sq_le_of_ratio {N q : ℕ} {u B : ℝ} + (hN : 0 < N) (hu : 0 ≤ u) (hB : (((N : ℝ) + 1) / N) ^ q ≤ B) + (hr : B * exp (-u * (2 * N + 1)) < 1) : + (∑' k : ℕ, ((N + k : ℕ) : ℝ) ^ q * exp (-u * ((N + k : ℕ) : ℝ) ^ 2)) ≤ + ((N : ℝ) ^ q * exp (-u * N ^ 2)) / (1 - B * exp (-u * (2 * N + 1))) := by + have hB0 : 0 ≤ B := (by positivity : 0 ≤ (((N : ℝ) + 1) / N) ^ q).trans hB + have hr0 := mul_nonneg hB0 (exp_nonneg (-u * (2 * N + 1))) + have hs := summable_nat_add_pow_mul_exp_neg_sq_of_ratio hN hu hB hr + calc + _ ≤ ∑' k : ℕ, (B * exp (-u * (2 * N + 1))) ^ k * + ((N : ℝ) ^ q * exp (-u * N ^ 2)) := + hs.tsum_le_tsum (nat_add_pow_mul_exp_neg_sq_le_geom hN hu hB) + ((summable_geometric_of_lt_one hr0 hr).mul_right _) + _ = _ := by rw [tsum_mul_right, tsum_geometric_of_lt_one hr0 hr, div_eq_mul_inv]; ring + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Gaussian/ParameterDerivative.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Gaussian/ParameterDerivative.lean new file mode 100644 index 000000000..d057aae31 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Gaussian/ParameterDerivative.lean @@ -0,0 +1,71 @@ +/- +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.Deriv.Basic +public import Mathlib.Analysis.Complex.Exponential +import Mathlib.Analysis.Calculus.SmoothSeries +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import RealRooted.Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianTail + +/-! +# Differentiating polynomially weighted Gaussian lattice series in the width +-/ + +public section + +open Set + +namespace Real + +/-- Positive-index polynomial Gaussian series converge for every positive width. -/ +theorem summable_pow_mul_exp_neg_sq_parameter (q : ℕ) {c t : ℝ} + (hc : 0 < c) (ht : 0 < t) : + Summable (fun n : ℕ => (n + 1 : ℝ) ^ q * exp (-c * (n + 1 : ℝ) ^ 2 * t)) := by + have h := (summable_nat_add_iff 1).mpr + (summable_nat_pow_mul_exp_neg_sq q (mul_pos hc ht)) + convert h using 1 + funext n + simp only [Nat.cast_add, Nat.cast_one] + congr 2 + ring + +private theorem hasDerivAt_gaussian_weight (q n : ℕ) (c t : ℝ) : + HasDerivAt (fun y : ℝ => (n + 1 : ℝ) ^ q * exp (-c * (n + 1 : ℝ) ^ 2 * y)) + (-c * ((n + 1 : ℝ) ^ (q + 2) * exp (-c * (n + 1 : ℝ) ^ 2 * t))) t := by + convert (((hasDerivAt_id t).const_mul (-c * (n + 1 : ℝ) ^ 2)).exp).const_mul + ((n + 1 : ℝ) ^ q) using 1 + · simp only [id_eq] + · simp only [id_eq, mul_one, pow_add] + ring + +private theorem norm_gaussian_weight_le (q n : ℕ) {c t y : ℝ} + (hc : 0 < c) (hy : t / 2 < y) : + ‖-c * ((n + 1 : ℝ) ^ (q + 2) * exp (-c * (n + 1 : ℝ) ^ 2 * y))‖ ≤ + c * ((n + 1 : ℝ) ^ (q + 2) * exp (-c * (n + 1 : ℝ) ^ 2 * (t / 2))) := by + rw [norm_mul, norm_neg, norm_of_nonneg hc.le, norm_mul, + norm_of_nonneg (by positivity : 0 ≤ (n + 1 : ℝ) ^ (q + 2)), norm_of_nonneg (exp_pos _).le] + apply mul_le_mul_of_nonneg_left _ hc.le + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply exp_le_exp.mpr + exact mul_le_mul_of_nonpos_left hy.le + (mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hc.le) (sq_nonneg _)) + +/-- The actual width derivative increases the polynomial weight by two. -/ +theorem hasDerivAt_tsum_pow_mul_exp_neg_sq_parameter (q : ℕ) {c t : ℝ} + (hc : 0 < c) (ht : 0 < t) : + HasDerivAt (fun y : ℝ => ∑' n : ℕ, (n + 1 : ℝ) ^ q * + exp (-c * (n + 1 : ℝ) ^ 2 * y)) + (-c * ∑' n : ℕ, (n + 1 : ℝ) ^ (q + 2) * exp (-c * (n + 1 : ℝ) ^ 2 * t)) t := by + have hM := (summable_pow_mul_exp_neg_sq_parameter (q + 2) hc (half_pos ht)).mul_left c + have hmem : t ∈ Ioi (t / 2) := by change t / 2 < t; linarith + have h := hasDerivAt_tsum_of_isPreconnected hM isOpen_Ioi isPreconnected_Ioi + (fun n y _ => hasDerivAt_gaussian_weight q n c y) + (fun n y hy => norm_gaussian_weight_le q n hc hy) hmem + (summable_pow_mul_exp_neg_sq_parameter q hc ht) hmem + simpa only [tsum_mul_left] using h + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Log/BandBounds.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Log/BandBounds.lean new file mode 100644 index 000000000..edca3761d --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Log/BandBounds.lean @@ -0,0 +1,105 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberMajorant +import RealRooted.Mathlib.Analysis.SpecialFunctions.Log.Weights +import Mathlib.Analysis.PSeries +import Mathlib.Tactic.IntervalCases + +/-! +# Weighted finite head and tail estimates from logarithmic band counts + +The indexing function records a unit-height band. These lemmas retain arbitrary +nonnegative masses, so analytic zero multiplicities need no enumeration. +For tails, band `k` denotes the actual height band `k + N + 1`. +-/ + +public section + +namespace Real + +/-- The positive logarithmic reciprocal-square majorant is summable over the naturals. -/ +theorem summable_one_add_log_natCast_div_sq : + Summable (fun n : ℕ ↦ (1 + log n) / (n : ℝ) ^ 2) := by + have hlog : Summable (fun n : ℕ ↦ log n / (n : ℝ) ^ 2) := by + apply summable_log_natCast_div_sub_one_sq.of_nonneg_of_le + (fun n ↦ div_nonneg (log_natCast_nonneg n) (sq_nonneg _)) + intro n + rcases Nat.lt_or_ge n 2 with hn | hn + · interval_cases n <;> simp + have hn2 : (2 : ℝ) ≤ n := by exact_mod_cast hn + exact div_le_div_of_nonneg_left (log_natCast_nonneg n) + (by nlinarith : 0 < ((n : ℝ) - 1) ^ 2) (by nlinarith) + exact ((summable_one_div_nat_pow.mpr (by norm_num : 1 < 2)).add hlog).congr + (fun n ↦ by ring) + +end Real + +namespace Finset + +/-- Summing logarithmic band counts against a reciprocal-height weight gives a logarithmic-square +head bound. The pointwise inequality can use a complex norm in its denominator. -/ +theorem sum_le_log_mul_one_add_log_of_fiber_bound {ι : Type*} + (s : Finset ι) (bin : ι → ℕ) (w v : ι → ℝ) {C : ℝ} (hC : 0 ≤ C) (N : ℕ) + (hbin : ∀ i ∈ s, bin i ∈ Icc 1 N) + (hv : ∀ i ∈ s, v i ≤ w i * (2 / (bin i : ℝ))) + (hB : ∀ n ∈ Icc 1 N, ∑ i ∈ s with bin i = n, w i ≤ C * Real.log n) : + ∑ i ∈ s, v i ≤ 2 * C * (Real.log N * (1 + Real.log N)) := by + classical + calc + ∑ i ∈ s, v i ≤ ∑ n ∈ Icc 1 N, (C * Real.log n) * (2 / (n : ℝ)) := + sum_le_sum_mul_of_fiber_le s (Icc 1 N) bin w v _ _ hbin + (fun n _ ↦ by positivity) hv hB + _ = 2 * C * (∑ n ∈ Icc 1 N, Real.log n / (n : ℝ)) := by + rw [mul_sum] + apply sum_congr rfl + intro n _ + ring + _ ≤ 2 * C * (Real.log N * (1 + Real.log N)) := + mul_le_mul_of_nonneg_left (Real.sum_Icc_log_natCast_div_le N) (by positivity) + +/-- Summing logarithmic band counts against a reciprocal-square weight gives a `log N / N` +tail bound. The index `bin i` is the offset from the first omitted band `N + 1`. -/ +theorem sum_le_log_add_div_of_fiber_bound {ι : Type*} + (s : Finset ι) (bin : ι → ℕ) (w v : ι → ℝ) {C : ℝ} (hC : 0 ≤ C) + {N : ℕ} (hN : 1 ≤ N) + (hv : ∀ i ∈ s, v i ≤ w i * (4 / (bin i + N + 1 : ℝ) ^ 2)) + (hB : ∀ n ∈ s.image bin, ∑ i ∈ s with bin i = n, w i ≤ C * Real.log (n + N + 1 : ℕ)) : + ∑ i ∈ s, v i ≤ 4 * C * ((Real.log N + 2) / N) := by + classical + have hsum : Summable (fun n : ℕ ↦ + 4 * C * ((1 + Real.log (n + N + 1 : ℕ)) / (n + N + 1 : ℝ) ^ 2)) := by + have hs := Real.summable_one_add_log_natCast_div_sq.comp_injective + (i := fun n : ℕ ↦ n + (N + 1)) (fun _ _ h ↦ Nat.add_right_cancel h) + simpa only [Nat.cast_add, Nat.cast_one, Nat.add_assoc, Function.comp_def, add_assoc] using + hs.mul_left (4 * C) + calc + ∑ i ∈ s, v i ≤ ∑ n ∈ s.image bin, + (C * Real.log (n + N + 1 : ℕ)) * (4 / (n + N + 1 : ℝ) ^ 2) := + sum_le_sum_mul_of_fiber_le s (s.image bin) bin w v _ _ + (fun i hi ↦ mem_image_of_mem bin hi) (fun n _ ↦ by positivity) hv hB + _ ≤ ∑ n ∈ s.image bin, + 4 * C * ((1 + Real.log (n + N + 1 : ℕ)) / (n + N + 1 : ℝ) ^ 2) := by + apply sum_le_sum + intro n _ + have hden : 0 ≤ (n + N + 1 : ℝ) ^ 2 := sq_nonneg _ + calc + (C * Real.log (n + N + 1 : ℕ)) * (4 / (n + N + 1 : ℝ) ^ 2) = + 4 * C * (Real.log (n + N + 1 : ℕ) / (n + N + 1 : ℝ) ^ 2) := by ring + _ ≤ 4 * C * ((1 + Real.log (n + N + 1 : ℕ)) / (n + N + 1 : ℝ) ^ 2) := + mul_le_mul_of_nonneg_left (div_le_div_of_nonneg_right (by linarith) hden) + (by positivity) + _ ≤ ∑' n : ℕ, + 4 * C * ((1 + Real.log (n + N + 1 : ℕ)) / (n + N + 1 : ℝ) ^ 2) := + hsum.sum_le_tsum _ (fun n _ ↦ by positivity) + _ = 4 * C * (∑' n : ℕ, + (1 + Real.log (n + N + 1 : ℕ)) / (n + N + 1 : ℝ) ^ 2) := tsum_mul_left + _ ≤ 4 * C * ((Real.log N + 2) / N) := + mul_le_mul_of_nonneg_left (Real.tsum_one_add_log_div_sq_add_le hN) (by positivity) + +end Finset diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Log/Weights.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Log/Weights.lean new file mode 100644 index 000000000..ae6a3dcd8 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Log/Weights.lean @@ -0,0 +1,138 @@ +/- +Copyright (c) 2026 Steve Hubbard, RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Steve Hubbard, RealRooted contributors +-/ +module + +import Mathlib.Analysis.PSeries +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.SumIntegralComparisons +import Mathlib.Analysis.Calculus.Deriv.MeanValue +import Mathlib.Analysis.SpecialFunctions.Log.Deriv +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.NumberTheory.Harmonic.Bounds +import TauCeti.Analysis.SpecialFunctions.ImproperIntegrals + +/-! +# Logarithmically weighted head and tail estimates + +The reciprocal-square summability argument is adapted from Steve Hubbard's +`goldbach-lean`, revision `da5cf9edad7896290771dfcab8feee2906399e3d`, +`entries/dudek2014/LeanLab/PNTPort/ExplicitPsi1/ZeroSum.lean` (Apache-2.0). +The head bound uses the harmonic sum. The tail bound uses the integral test. +-/ + +public section + +open Set MeasureTheory + +namespace Real + +/-- The logarithmic unit-band majorant is summable. Its first two terms are zero. -/ +theorem summable_log_natCast_div_sub_one_sq : + Summable (fun n : ℕ ↦ log n / ((n : ℝ) - 1) ^ 2) := by + have hs : Summable (fun n : ℕ ↦ 8 * ((n : ℝ) ^ (3 / 2 : ℝ))⁻¹) := + (summable_nat_rpow_inv.mpr (by norm_num)).mul_left 8 + refine Summable.of_nonneg_of_le (fun n ↦ div_nonneg (log_natCast_nonneg n) (sq_nonneg _)) + (fun n ↦ ?_) hs + rcases Nat.lt_or_ge n 2 with hn | hn + · interval_cases n <;> simp + have hn2 : (2 : ℝ) ≤ n := by exact_mod_cast hn + have hn0 : (0 : ℝ) < n := by linarith + have hlog := log_le_rpow_div hn0.le (by norm_num : (0 : ℝ) < 1 / 2) + have hsq : (n : ℝ) ^ 2 / 4 ≤ ((n : ℝ) - 1) ^ 2 := by nlinarith + have hpow : (n : ℝ) ^ (2 : ℝ) = + (n : ℝ) ^ (1 / 2 : ℝ) * (n : ℝ) ^ (3 / 2 : ℝ) := by + rw [← rpow_add hn0] + norm_num + have hp3 : 0 < (n : ℝ) ^ (3 / 2 : ℝ) := rpow_pos_of_pos hn0 _ + have hd : 0 < ((n : ℝ) - 1) ^ 2 := by nlinarith + rw [div_le_iff₀ hd] + calc + log n ≤ (n : ℝ) ^ (1 / 2 : ℝ) * 2 := by linarith + _ = 8 * ((n : ℝ) ^ (3 / 2 : ℝ))⁻¹ * ((n : ℝ) ^ 2 / 4) := by + rw [← rpow_two, hpow] + field_simp + ring + _ ≤ 8 * ((n : ℝ) ^ (3 / 2 : ℝ))⁻¹ * ((n : ℝ) - 1) ^ 2 := by gcongr + +/-- A logarithmic harmonic head has at most quadratic logarithmic growth, including `N = 0`. -/ +theorem sum_Icc_log_natCast_div_le (N : ℕ) : + ∑ n ∈ Finset.Icc 1 N, log n / (n : ℝ) ≤ log N * (1 + log N) := by + calc + ∑ n ∈ Finset.Icc 1 N, log n / (n : ℝ) ≤ + ∑ n ∈ Finset.Icc 1 N, log N * (n : ℝ)⁻¹ := by + apply Finset.sum_le_sum + intro n hn + obtain ⟨hn1, hnN⟩ := Finset.mem_Icc.mp hn + rw [div_eq_mul_inv] + exact mul_le_mul_of_nonneg_right + (log_le_log (by exact_mod_cast lt_of_lt_of_le Nat.zero_lt_one hn1) (by exact_mod_cast hnN)) + (by positivity) + _ = log N * (harmonic N : ℝ) := by + rw [← Finset.mul_sum] + congr 1 + simp only [harmonic_eq_sum_Icc, Rat.cast_sum, Rat.cast_inv, Rat.cast_natCast] + _ ≤ log N * (1 + log N) := + mul_le_mul_of_nonneg_left (harmonic_le_one_add_log N) (log_natCast_nonneg N) + +private theorem hasDerivAt_one_add_log_div_sq {x : ℝ} (hx : 0 < x) : + HasDerivAt (fun t : ℝ ↦ (1 + log t) / t ^ 2) (-(1 + 2 * log x) / x ^ 3) x := by + have hd : HasDerivAt (fun t : ℝ ↦ 1 + log t) x⁻¹ x := + (hasDerivAt_log hx.ne').const_add 1 + have hs : HasDerivAt (fun t : ℝ ↦ t ^ 2) (2 * x) x := by + simpa using hasDerivAt_pow 2 x + have h : HasDerivAt (fun t : ℝ ↦ (1 + log t) / t ^ 2) + ((x⁻¹ * x ^ 2 - (1 + log x) * (2 * x)) / (x ^ 2) ^ 2) x := + hd.div hs (pow_ne_zero 2 hx.ne') + convert h using 1 + field_simp + ring + +/-- A convenient positive decreasing majorant for `log t / t²`. -/ +theorem antitoneOn_one_add_log_div_sq : + AntitoneOn (fun t : ℝ ↦ (1 + log t) / t ^ 2) (Ici 1) := by + apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Ici 1) + · intro x hx + exact (hasDerivAt_one_add_log_div_sq + (lt_of_lt_of_le zero_lt_one hx)).continuousAt.continuousWithinAt + · intro x hx + exact (hasDerivAt_one_add_log_div_sq + (lt_of_lt_of_le zero_lt_one (interior_subset hx))).hasDerivWithinAt + · intro x hx + have hx1 : 1 ≤ x := interior_subset hx + exact div_nonpos_of_nonpos_of_nonneg + (neg_nonpos.mpr (by linarith [log_nonneg hx1])) (by positivity) + +private theorem one_add_log_div_sq_eq (x : ℝ) : + (1 + log x) / x ^ 2 = x ^ (-2 : ℝ) + x ^ (-2 : ℝ) * log x := by + rw [show (-2 : ℝ) = -(2 : ℕ) by norm_num, rpow_neg_natCast] + simp only [zpow_neg, zpow_natCast] + ring + +/-- The tail of the logarithmic reciprocal-square majorant is `O(log N / N)`. -/ +theorem tsum_one_add_log_div_sq_add_le {N : ℕ} (hN : 1 ≤ N) : + ∑' n : ℕ, (1 + log (n + N + 1 : ℕ)) / (n + N + 1 : ℝ) ^ 2 ≤ + (log N + 2) / N := by + have hN0 : (0 : ℝ) < N := by exact_mod_cast lt_of_lt_of_le Nat.zero_lt_one hN + have hN1 : (1 : ℝ) ≤ N := by exact_mod_cast hN + have hpow := integrableOn_Ioi_rpow_of_lt (by norm_num : (-2 : ℝ) < -1) hN0 + have hlog := TauCeti.integrableOn_Ioi_rpow_mul_log_of_lt + (by norm_num : (-2 : ℝ) < -1) hN0 + have hint : IntegrableOn (fun t : ℝ ↦ (1 + log t) / t ^ 2) (Ioi (N : ℝ)) := by + simp_rw [one_add_log_div_sq_eq] + exact hpow.add hlog + have hval : (∫ t in Ioi (N : ℝ), (1 + log t) / t ^ 2) = (log N + 2) / N := by + simp_rw [one_add_log_div_sq_eq] + rw [integral_add hpow hlog, integral_Ioi_rpow_of_lt (by norm_num : (-2 : ℝ) < -1) hN0, + TauCeti.integral_Ioi_rpow_mul_log_of_lt (by norm_num : (-2 : ℝ) < -1) hN0] + norm_num [rpow_neg_one] + ring + have hbound := + (antitoneOn_one_add_log_div_sq.mono (Ici_subset_Ici.mpr hN1)).tsum_comp_add_le_integral + N hint (fun t ht ↦ div_nonneg (by linarith [log_nonneg (hN1.trans ht.le)]) (sq_nonneg t)) + rw [hval] at hbound + simpa only [Nat.cast_add, Nat.cast_one] using hbound + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/Pow/Interpolation.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/Pow/Interpolation.lean new file mode 100644 index 000000000..b12494693 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/Pow/Interpolation.lean @@ -0,0 +1,47 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Real + +/-! +# Power interpolation for nonnegative bounds + +The minimum of two nonnegative bounds is bounded by their weighted geometric +mean. A logarithm can be absorbed into an arbitrarily small positive power. +-/ + +public section + +namespace Real + +/-- A weighted geometric mean of two nonnegative reals dominates their minimum. -/ +theorem min_le_rpow_one_sub_mul_rpow {a b p : ℝ} + (ha : 0 ≤ a) (hb : 0 ≤ b) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) : + min a b ≤ a ^ (1 - p) * b ^ p := by + have hm : 0 ≤ min a b := le_min ha hb + calc + min a b = (min a b) ^ (1 - p) * (min a b) ^ p := by + rw [← rpow_add' hm (by linarith : 1 - p + p ≠ 0)] + simp + _ ≤ a ^ (1 - p) * b ^ p := + mul_le_mul (rpow_le_rpow hm (min_le_left _ _) (sub_nonneg.mpr hp1)) + (rpow_le_rpow hm (min_le_right _ _) hp0) + (rpow_nonneg hm p) (rpow_nonneg ha (1 - p)) + +/-- Uniformly on the real line, `log (2 + |t|)` is bounded by any positive power of `1 + |t|`. -/ +theorem log_two_add_abs_le_mul_rpow {r : ℝ} (hr : 0 < r) (t : ℝ) : + log (2 + |t|) ≤ (2 ^ r / r) * (1 + |t|) ^ r := by + calc + log (2 + |t|) ≤ (2 + |t|) ^ r / r := log_le_rpow_div (by positivity) hr + _ ≤ (2 * (1 + |t|)) ^ r / r := + div_le_div_of_nonneg_right + (rpow_le_rpow (by positivity) (by linarith [abs_nonneg t]) hr.le) hr.le + _ = (2 ^ r / r) * (1 + |t|) ^ r := by + rw [mul_rpow (by norm_num) (by positivity)] + ring + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecialFunctions/RegularizedHypergeometric/Derivatives.lean b/RealRooted/Mathlib/Analysis/SpecialFunctions/RegularizedHypergeometric/Derivatives.lean new file mode 100644 index 000000000..c39b47e3e --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecialFunctions/RegularizedHypergeometric/Derivatives.lean @@ -0,0 +1,53 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import TauCeti.Analysis.SpecialFunctions.RegularizedHypergeometric + +/-! +# Taylor derivatives of regularized hypergeometric functions + +The coefficient identity uses the actual entire function and is valid at +lower parameters that are nonpositive integers. +-/ + +public section + +open scoped Nat + +namespace Complex + +/-- In the entire parameter range, the actual Taylor derivatives of a +regularized hypergeometric function are its normalized coefficients. -/ +theorem iteratedDeriv_regularizedHGFun_zero {a b : Multiset ℂ} + (hab : a.card ≤ b.card) (k : ℕ) : + iteratedDeriv k (regularizedHGFun a b) 0 = + (k.factorial : ℂ) * regularizedHGFunCoeff a b k := by + have hp : 0 < (regularizedHGFunSeries a b).radius := by + rw [radius_regularizedHGFunSeries_eq_top hab] + simp + have h := ((regularizedHGFunSeries a b).hasFPowerSeriesOnBall hp).factorial_smul 1 k + simp only [FormalMultilinearSeries.apply_eq_prod_smul_coeff, Finset.prod_const, + Finset.card_univ, Fintype.card_fin, smul_eq_mul, nsmul_eq_mul, one_pow, + one_mul] at h + rw [← iteratedDeriv_eq_iteratedFDeriv] at h + have heq : (regularizedHGFunSeries a b).sum = regularizedHGFun a b := by + funext z + exact (regularizedHGFun.eq_def a b z).symm + rw [heq] at h + simpa only [regularizedHGFunSeries_coeff] using h.symm + +/-- The derivatives of the entire regularized `₀F₁` at zero are reciprocal +Gamma values, including parameters at Gamma poles. -/ +theorem iteratedDeriv_regularizedHGFun_zero_singleton (b : ℂ) (k : ℕ) : + iteratedDeriv k (regularizedHGFun 0 {b}) 0 = (Gamma (b + k))⁻¹ := by + rw [iteratedDeriv_regularizedHGFun_zero (by simp), regularizedHGFunCoeff_zero_singleton, + mul_inv_rev, mul_left_comm, mul_inv_cancel₀ (by exact_mod_cast k.factorial_ne_zero), + mul_one] + +end Complex diff --git a/RealRooted/Mathlib/Analysis/SpecificLimits/DescFactorialWeights.lean b/RealRooted/Mathlib/Analysis/SpecificLimits/DescFactorialWeights.lean new file mode 100644 index 000000000..08e0460e1 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecificLimits/DescFactorialWeights.lean @@ -0,0 +1,58 @@ +/- +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.Normed.Module.Basic +import RealRooted.Mathlib.Analysis.SpecificLimits.WeightedSum +import RealRooted.Mathlib.Analysis.SpecialFunctions.Choose + +/-! +# Regularity of falling-factorial weights + +The finite Jensen weights `(n)_k / n^k` decrease with `k`, vanish past `n`, +and tend to one for each fixed `k`. They therefore preserve ordinary +conditionally convergent series. +-/ + +public section + +open Finset Filter Topology + +namespace Nat + +/-- The normalized falling factorial is decreasing in its lower index. The +convention at `n = 0` uses the usual zero inverse. -/ +theorem antitone_descFactorial_div_pow (n : ℕ) : + Antitone (fun k => (n.descFactorial k : ℝ) / (n : ℝ) ^ k) := by + apply antitone_nat_of_succ_le + intro k + by_cases hn : n = 0 + · subst n + cases k <;> simp + have hnpos : 0 < (n : ℝ) := by exact_mod_cast Nat.pos_of_ne_zero hn + rw [descFactorial_succ, Nat.cast_mul, pow_succ] + calc + ((n - k : ℕ) : ℝ) * n.descFactorial k / ((n : ℝ) ^ k * n) = + (((n - k : ℕ) : ℝ) / n) * ((n.descFactorial k : ℝ) / (n : ℝ) ^ k) := by ring + _ ≤ 1 * ((n.descFactorial k : ℝ) / (n : ℝ) ^ k) := by + apply mul_le_mul_of_nonneg_right _ (by positivity) + exact (div_le_one hnpos).mpr (by exact_mod_cast Nat.sub_le n k) + _ = _ := one_mul _ + +/-- Falling-factorial finite means preserve the sum of a conditionally +convergent ordinary series in a real normed vector space. -/ +theorem tendsto_sum_descFactorial_smul {E : Type*} [NormedAddCommGroup E] + [NormedSpace ℝ E] {u : ℕ → E} {a : E} + (hu : Tendsto (fun n => ∑ k ∈ range n, u k) atTop (𝓝 a)) : + Tendsto (fun n => ∑ k ∈ range (n + 1), + ((n.descFactorial k : ℝ) / (n : ℝ) ^ k) • u k) atTop (𝓝 a) := by + apply tendsto_weighted_series_of_antitone antitone_descFactorial_div_pow + (fun n => by simp) _ tendsto_descFactorial_div_pow_atTop hu + intro n + rw [descFactorial_eq_zero_iff_lt.mpr (Nat.lt_succ_self n)] + simp + +end Nat diff --git a/RealRooted/Mathlib/Analysis/SpecificLimits/PowerSequence.lean b/RealRooted/Mathlib/Analysis/SpecificLimits/PowerSequence.lean new file mode 100644 index 000000000..906bd7d91 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecificLimits/PowerSequence.lean @@ -0,0 +1,39 @@ +/- +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.SpecialFunctions.Pow.Real +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics + +/-! +# Powers with a growing denominator + +A positive power in the denominator makes the sequence +`(c / (n+1)^a)^n` summable for every real constant `c`. +-/ + +public section + +open Filter Topology + +namespace Real + +/-- Raising a constant divided by a positive power of `n+1` to the nth power +gives an absolutely summable sequence, including zero or negative constants. -/ +theorem summable_const_div_rpow_pow {a : ℝ} (ha : 0 < a) (c : ℝ) : + Summable (fun n : ℕ => (c / ((n : ℝ) + 1) ^ a) ^ n) := by + have htop : Tendsto (fun n : ℕ => ((n : ℝ) + 1) ^ a) atTop atTop := + (tendsto_rpow_atTop ha).comp + (tendsto_atTop_add_const_right atTop 1 (tendsto_natCast_atTop_atTop (R := ℝ))) + have hlim := htop.const_div_atTop |c| + apply Summable.of_norm_bounded_eventually_nat + (summable_geometric_of_abs_lt_one (by norm_num : |(1 / 2 : ℝ)| < 1)) + filter_upwards [hlim.eventually (eventually_lt_nhds (by norm_num : (0 : ℝ) < 1 / 2))] with n hn + have hden : 0 < ((n : ℝ) + 1) ^ a := rpow_pos_of_pos (by positivity) a + simp only [Real.norm_eq_abs, abs_pow, abs_div, abs_of_pos hden] + exact pow_le_pow_left₀ (by positivity) hn.le n + +end Real diff --git a/RealRooted/Mathlib/Analysis/SpecificLimits/WeightedSum.lean b/RealRooted/Mathlib/Analysis/SpecificLimits/WeightedSum.lean new file mode 100644 index 000000000..6bc390ce7 --- /dev/null +++ b/RealRooted/Mathlib/Analysis/SpecificLimits/WeightedSum.lean @@ -0,0 +1,118 @@ +/- +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.Normed.Module.Basic +import Mathlib.Algebra.BigOperators.Module +import Mathlib.Algebra.Module.BigOperators + +/-! +# Regular finite weighted means + +Nonnegative finite weighted means preserve sequence limits when each fixed +weight tends to zero and the total mass tends to one. Summation by parts gives +a regularity theorem for decreasing weights on a convergent series. The +series hypothesis is convergence of ordinary partial sums, so conditional +convergence is allowed. +-/ + +public section + +open Finset Filter Topology + +private theorem tendsto_weighted_mean_zero {E : Type*} [NormedAddCommGroup E] + [NormedSpace ℝ E] {w : ℕ → ℕ → ℝ} {s : ℕ → E} {r : ℕ → ℕ} + (hr : Tendsto r atTop atTop) + (hw : ∀ n k, 0 ≤ w n k) (hb : ∀ n, ∑ k ∈ range (r n), w n k ≤ 1) + (hc : ∀ k, Tendsto (fun n => w n k) atTop (𝓝 0)) + (hs : Tendsto s atTop (𝓝 0)) : + Tendsto (fun n => ∑ k ∈ range (r n), w n k • s k) atTop (𝓝 0) := by + rw [Metric.tendsto_atTop] at hs ⊢ + intro ε hε + obtain ⟨N, hN⟩ := hs (ε / 2) (by positivity) + have hfinite : Tendsto (fun n => ∑ k ∈ range N, w n k * ‖s k‖) atTop (𝓝 0) := by + simpa using tendsto_finsetSum (range N) fun k _ => (hc k).mul_const ‖s k‖ + obtain ⟨M, hM⟩ := Metric.tendsto_atTop.mp hfinite (ε / 2) (by positivity) + obtain ⟨K, hK⟩ := eventually_atTop.mp (hr.eventually (eventually_ge_atTop N)) + refine ⟨max K M, fun n hn => ?_⟩ + have hNn : N ≤ r n := hK n ((le_max_left K M).trans hn) + have hMn : M ≤ n := (le_max_right K M).trans hn + have hprefix : ∑ k ∈ range N, w n k * ‖s k‖ < ε / 2 := by + exact lt_of_le_of_lt (le_abs_self _) (by simpa [Real.dist_eq] using hM n hMn) + have htail : ∑ k ∈ Ico N (r n), w n k * ‖s k‖ ≤ ε / 2 := by + calc + _ ≤ ∑ k ∈ Ico N (r n), w n k * (ε / 2) := by + apply sum_le_sum + intro k hk + apply mul_le_mul_of_nonneg_left _ (hw n k) + have hkbound : ‖s k‖ < ε / 2 := by + simpa only [dist_zero_right] using hN k (mem_Ico.mp hk).1 + exact hkbound.le + _ = (∑ k ∈ Ico N (r n), w n k) * (ε / 2) := (sum_mul _ _ _).symm + _ ≤ 1 * (ε / 2) := by + apply mul_le_mul_of_nonneg_right _ (by positivity) + refine le_trans (sum_le_sum_of_subset_of_nonneg ?_ ?_) (hb n) + · exact fun k hk => mem_range.mpr (mem_Ico.mp hk).2 + · exact fun k _ _ => hw n k + _ = ε / 2 := one_mul _ + rw [dist_zero_right] + calc + _ ≤ ∑ k ∈ range (r n), ‖w n k • s k‖ := norm_sum_le _ _ + _ = ∑ k ∈ range (r n), w n k * ‖s k‖ := by + apply sum_congr rfl + intro k _ + rw [norm_smul, Real.norm_of_nonneg (hw n k)] + _ = (∑ k ∈ range N, w n k * ‖s k‖) + + ∑ k ∈ Ico N (r n), w n k * ‖s k‖ := (sum_range_add_sum_Ico _ hNn).symm + _ < ε := by linarith + +/-- Finite nonnegative weighted means preserve limits when the rows have mass +at most one, their masses tend to one, and each fixed weight tends to zero. -/ +theorem tendsto_weighted_mean_of_tendsto {E : Type*} [NormedAddCommGroup E] + [NormedSpace ℝ E] {w : ℕ → ℕ → ℝ} {s : ℕ → E} {r : ℕ → ℕ} {a : E} + (hr : Tendsto r atTop atTop) + (hw : ∀ n k, 0 ≤ w n k) (hb : ∀ n, ∑ k ∈ range (r n), w n k ≤ 1) + (hc : ∀ k, Tendsto (fun n => w n k) atTop (𝓝 0)) + (hm : Tendsto (fun n => ∑ k ∈ range (r n), w n k) atTop (𝓝 1)) + (hs : Tendsto s atTop (𝓝 a)) : + Tendsto (fun n => ∑ k ∈ range (r n), w n k • s k) atTop (𝓝 a) := by + have hz := tendsto_weighted_mean_zero hr hw hb hc + (show Tendsto (fun n => s n - a) atTop (𝓝 0) by simpa using hs.sub_const a) + have ht := hz.add (hm.smul_const a) + simpa only [smul_sub, sum_sub_distrib, ← sum_smul, sub_add_cancel, one_smul, + zero_add] using ht + +/-- Finite decreasing weights tending pointwise to one preserve the sum of an +ordinary convergent series. The convergence may be conditional. -/ +theorem tendsto_weighted_series_of_antitone {E : Type*} [NormedAddCommGroup E] + [NormedSpace ℝ E] {κ : ℕ → ℕ → ℝ} {u : ℕ → E} {a : E} + (hκ : ∀ n, Antitone (κ n)) (hb : ∀ n, κ n 0 ≤ 1) + (hz : ∀ n, κ n (n + 1) = 0) + (hc : ∀ k, Tendsto (fun n => κ n k) atTop (𝓝 1)) + (hu : Tendsto (fun n => ∑ k ∈ range n, u k) atTop (𝓝 a)) : + Tendsto (fun n => ∑ k ∈ range (n + 1), κ n k • u k) atTop (𝓝 a) := by + let w : ℕ → ℕ → ℝ := fun n k => κ n k - κ n (k + 1) + have hm (n : ℕ) : ∑ k ∈ range (n + 1), w n k = κ n 0 := by + dsimp [w] + rw [sum_range_sub'] + simp [hz] + have ht := tendsto_weighted_mean_of_tendsto (r := fun n => n + 1) + (w := w) (s := fun k => ∑ i ∈ range (k + 1), u i) + (tendsto_add_atTop_nat 1) + (fun n k => sub_nonneg.mpr (hκ n (Nat.le_succ k))) + (fun n => by rw [hm]; exact hb n) + (fun k => by simpa [w] using (hc k).sub (hc (k + 1))) + (by simpa only [hm] using hc 0) + (hu.comp (tendsto_add_atTop_nat 1)) + convert ht using 1 + ext n + have hp := sum_range_by_parts (κ n) u (n + 2) + rw [show n + 2 - 1 = n + 1 by lia, sum_range_succ] at hp + simp only [hz n, zero_smul, add_zero, zero_sub] at hp + rw [hp, ← sum_neg_distrib] + apply sum_congr rfl + intro k _ + rw [← neg_smul, neg_sub] diff --git a/RealRooted/Mathlib/Data/Multiset/Rel.lean b/RealRooted/Mathlib/Data/Multiset/Rel.lean index 83ffbfead..c5c99a0eb 100644 --- a/RealRooted/Mathlib/Data/Multiset/Rel.lean +++ b/RealRooted/Mathlib/Data/Multiset/Rel.lean @@ -9,6 +9,7 @@ public import Mathlib.Data.List.Forall2 import Mathlib.Data.Multiset.Basic public import Mathlib.Data.Multiset.Sort public import Mathlib.Data.Multiset.ZeroCons +import TauCeti.Data.Multiset.Rel /-! # Additional lemmas for multiset relations @@ -22,24 +23,14 @@ public section namespace Multiset -/-- Compose multiset relations whose element relations may differ. -/ -theorem Rel.comp {α β γ : Type*} +/-- Compose multiset relations and map the composite element relation into a target relation. -/ +theorem Rel.comp_of_imp {α β γ : Type*} {R : α → β → Prop} {S : β → γ → Prop} {T : α → γ → Prop} {xs : Multiset α} {ys : Multiset β} {zs : Multiset γ} (hcomp : ∀ a b c, R a b → S b c → T a c) (h₁ : Multiset.Rel R xs ys) (h₂ : Multiset.Rel S ys zs) : Multiset.Rel T xs zs := by - induction ys using Multiset.induction_on generalizing xs zs with - | empty => - have hxs : xs = 0 := Multiset.rel_zero_right.mp h₁ - have hzs : zs = 0 := Multiset.rel_zero_left.mp h₂ - subst xs - subst zs - exact Rel.zero - | cons b ys ih => - obtain ⟨a, xs', hab, htail₁, rfl⟩ := Multiset.rel_cons_right.mp h₁ - obtain ⟨c, zs', hbc, htail₂, rfl⟩ := Multiset.rel_cons_left.mp h₂ - exact Rel.cons (hcomp a b c hab hbc) (ih htail₁ htail₂) + exact (h₁.comp h₂).mono fun a _ c _ ⟨b, hab, hbc⟩ ↦ hcomp a b c hab hbc /-- Related multisets have equally many elements satisfying corresponding predicates. -/ theorem Rel.card_filter_eq {α β : Type*} {R : α → β → Prop} diff --git a/RealRooted/Mathlib/Data/Nat/Factorial/ArithmeticProduct.lean b/RealRooted/Mathlib/Data/Nat/Factorial/ArithmeticProduct.lean new file mode 100644 index 000000000..0bb0750e5 --- /dev/null +++ b/RealRooted/Mathlib/Data/Nat/Factorial/ArithmeticProduct.lean @@ -0,0 +1,57 @@ +/- +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.Order.Interval.Finset.Nat +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +import Mathlib.Algebra.BigOperators.Intervals +import Mathlib.Tactic.Ring.RingNF + +/-! +# Factorial products with multiples removed + +The product of the positive integers through `N` not divisible by `r` is +`N! / (r^(N/r) (N/r)!)`. The division-free identity also covers `r = 0`. +-/ + +public section + +open Finset + +namespace Nat + +/-- Separating the multiples of a stride from a factorial gives a product +identity without division. The stride may be zero. -/ +theorem prod_Ioc_not_dvd_mul_pow_mul_factorial (r N : ℕ) : + (∏ a ∈ (Ioc 0 N).filter (fun a => ¬r ∣ a), a) * r ^ (N / r) * (N / r).factorial = + N.factorial := by + induction N with + | zero => simp + | succ n ih => + have hprod : (∏ a ∈ (Ioc 0 (n + 1)).filter (fun a => ¬r ∣ a), a) = + (∏ a ∈ (Ioc 0 n).filter (fun a => ¬r ∣ a), a) * + (if r ∣ n + 1 then 1 else n + 1) := by + simp only [prod_filter] + rw [prod_Ioc_succ_top (Nat.zero_le _)] + simp only [ite_not] + rw [hprod] + by_cases hd : r ∣ n + 1 + · simp only [hd, ↓reduceIte, mul_one, succ_div_of_dvd hd, pow_succ, factorial_succ] + have hm : (n / r + 1) * r = n + 1 := by + rw [← succ_div_of_dvd hd, Nat.div_mul_cancel hd] + calc + _ = ((∏ a ∈ (Ioc 0 n).filter (fun a => ¬r ∣ a), a) * + r ^ (n / r) * (n / r).factorial) * ((n / r + 1) * r) := by ring + _ = n.factorial * (n + 1) := by rw [ih, hm] + _ = _ := by ring + · simp only [hd, ↓reduceIte, succ_div_of_not_dvd hd, factorial_succ] + calc + _ = ((∏ a ∈ (Ioc 0 n).filter (fun a => ¬r ∣ a), a) * + r ^ (n / r) * (n / r).factorial) * (n + 1) := by ring + _ = n.factorial * (n + 1) := by rw [ih] + _ = _ := by ring + +end Nat diff --git a/RealRooted/Mathlib/LinearAlgebra/Lagrange/GaussianQuadrature.lean b/RealRooted/Mathlib/LinearAlgebra/Lagrange/GaussianQuadrature.lean new file mode 100644 index 000000000..553d34e84 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Lagrange/GaussianQuadrature.lean @@ -0,0 +1,106 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature + +import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadratureMoments + +/-! +# Gaussian exactness from nodal orthogonality + +Orthogonality of a degree-`n` nodal polynomial to every polynomial of degree +below `n` raises Lagrange quadrature exactness to every degree below `2 * n`. +Strict positivity on nonzero squares of degree below `n` then makes every +weight positive. The empty rule is included and is exact on the zero polynomial. +-/ + +public section + +open Finset Polynomial + +namespace Lagrange + +/-- Gaussian exactness through degree `2 * n - 1` follows from orthogonality +of the nodal polynomial to all polynomials of degree below `n`. -/ +theorem quadrature_exact_of_orthogonal_nodal {n : ℕ} + (L : ℝ[X] →ₗ[ℝ] ℝ) (x : Fin n → ℝ) (hx : Function.Injective x) + (horth : ∀ g : ℝ[X], g.degree < (n : WithBot ℕ) → + L (Lagrange.nodal univ x * g) = 0) + {p : ℝ[X]} (hp : p.degree < (2 * n : ℕ)) : + L p = ∑ i : Fin n, quadratureWeight L x i * p.eval (x i) := by + by_cases hpzero : p = 0 + · simp [hpzero] + have hpnat : p.natDegree < 2 * n := (natDegree_lt_iff_degree_lt hpzero).mpr hp + let N : ℝ[X] := Lagrange.nodal univ x + let g : ℝ[X] := p /ₘ N + let r : ℝ[X] := p %ₘ N + have hN : N.Monic := Lagrange.nodal_monic + have hNdeg : N.natDegree = n := by simp [N] + have hg : g.degree < (n : WithBot ℕ) := by + have hgnat : g.natDegree < n := by + dsimp only [g] + rw [natDegree_divByMonic p hN, hNdeg] + lia + exact degree_le_natDegree.trans_lt (WithBot.coe_lt_coe.mpr hgnat) + have hr : r.degree < (n : WithBot ℕ) := by + simpa [r, N] using degree_modByMonic_lt p hN + have hrem_eval (i : Fin n) : r.eval (x i) = p.eval (x i) := by + have hnode : N.eval (x i) = 0 := + Lagrange.eval_nodal_at_node (s := univ) (v := x) (mem_univ i) + have hdecomp := congrArg (Polynomial.eval (x i)) (modByMonic_add_div p N) + simpa only [r, eval_add, eval_mul, hnode, zero_mul, add_zero] using hdecomp + have hdecomp : p = r + N * g := (modByMonic_add_div p N).symm + calc + L p = L r := by rw [hdecomp, map_add, horth g hg, add_zero] + _ = ∑ i : Fin n, quadratureWeight L x i * r.eval (x i) := + quadrature_exact_of_degree_lt L x hx hr + _ = ∑ i : Fin n, quadratureWeight L x i * p.eval (x i) := by + apply sum_congr rfl + intro i _ + rw [hrem_eval] + +/-- Positive square values make every Gaussian quadrature weight positive. +This includes the one-node rule, and is vacuous for the empty rule. -/ +theorem quadratureWeight_pos_of_orthogonal_nodal {n : ℕ} + (L : ℝ[X] →ₗ[ℝ] ℝ) (x : Fin n → ℝ) (hx : Function.Injective x) + (horth : ∀ g : ℝ[X], g.degree < (n : WithBot ℕ) → + L (Lagrange.nodal univ x * g) = 0) + (hpos : ∀ p : ℝ[X], p ≠ 0 → p.degree < (n : WithBot ℕ) → 0 < L (p * p)) + (i : Fin n) : 0 < quadratureWeight L x i := by + let b : ℝ[X] := Lagrange.basis univ x i + have hn : 0 < n := (Nat.zero_le i.val).trans_lt i.is_lt + have hbne : b ≠ 0 := Lagrange.basis_ne_zero hx.injOn (mem_univ i) + have hbdeg : b.natDegree = n - 1 := by + simpa [b] using Lagrange.natDegree_basis hx.injOn (mem_univ i) + have hbsmall : b.degree < (n : WithBot ℕ) := by + apply degree_le_natDegree.trans_lt + apply WithBot.coe_lt_coe.mpr + rw [hbdeg] + lia + have hsq : (b * b).degree < (2 * n : ℕ) := by + apply degree_le_natDegree.trans_lt + apply WithBot.coe_lt_coe.mpr + have hmul : (b * b).natDegree ≤ b.natDegree + b.natDegree := natDegree_mul_le + rw [hbdeg] at hmul + lia + have hpositive := hpos b hbne hbsmall + rw [quadrature_exact_of_orthogonal_nodal L x hx horth hsq] at hpositive + have hsum : (∑ j : Fin n, quadratureWeight L x j * (b * b).eval (x j)) = + quadratureWeight L x i := by + calc + _ = quadratureWeight L x i * (b * b).eval (x i) := by + apply Fintype.sum_eq_single i + intro j hji + rw [eval_mul, show b.eval (x j) = 0 from + Lagrange.eval_basis_of_ne hji.symm (mem_univ j), zero_mul, mul_zero] + _ = quadratureWeight L x i := by + rw [eval_mul, show b.eval (x i) = 1 from + Lagrange.eval_basis_self hx.injOn (mem_univ i)] + ring + rwa [hsum] at hpositive + +end Lagrange diff --git a/RealRooted/Mathlib/LinearAlgebra/Lagrange/QuadratureMoments.lean b/RealRooted/Mathlib/LinearAlgebra/Lagrange/QuadratureMoments.lean new file mode 100644 index 000000000..d56c43198 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Lagrange/QuadratureMoments.lean @@ -0,0 +1,76 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature +import Mathlib.LinearAlgebra.Vandermonde + +/-! +# Moment equations for Lagrange quadrature weights + +The existing Lagrange weights integrate every polynomial of degree below the +number of distinct nodes. Consequently they solve the transposed Vandermonde +moment system. These statements require neither positivity nor orthogonality. +-/ + +public section + +open Finset Polynomial Matrix + +namespace Matrix + +/-- Distinct nodes make the transposed Vandermonde moment matrix invertible. -/ +theorem isUnit_det_transpose_vandermonde {K : Type*} [Field K] {n : ℕ} {x : Fin n → K} + (hx : Function.Injective x) : IsUnit ((vandermonde x)ᵀ).det := by + rw [det_transpose, isUnit_iff_ne_zero] + exact det_vandermonde_ne_zero_iff.mpr hx + +end Matrix + +namespace Lagrange + +/-- Lagrange quadrature is exact below the number of distinct nodes. The +degree formulation includes the empty rule, which is exact on the zero polynomial. -/ +theorem quadrature_exact_of_degree_lt {n : ℕ} + (L : ℝ[X] →ₗ[ℝ] ℝ) (x : Fin n → ℝ) (hx : Function.Injective x) + {p : ℝ[X]} (hp : p.degree < (n : WithBot ℕ)) : + L p = ∑ i : Fin n, quadratureWeight L x i * p.eval (x i) := by + have hinterp : p = Lagrange.interpolate univ x (fun i ↦ p.eval (x i)) := by + apply Lagrange.eq_interpolate hx.injOn + simpa only [card_univ, Fintype.card_fin] using hp + calc + L p = L (Lagrange.interpolate univ x (fun i ↦ p.eval (x i))) := congrArg L hinterp + _ = ∑ i : Fin n, quadratureWeight L x i * p.eval (x i) := by + rw [Lagrange.interpolate_apply, map_sum] + apply sum_congr rfl + intro i _ + rw [← smul_eq_C_mul, map_smul] + simp only [smul_eq_mul, quadratureWeight] + ring + +/-- Lagrange weights solve the first `n` moment equations. -/ +theorem transpose_vandermonde_mulVec_quadratureWeight {n : ℕ} + (L : ℝ[X] →ₗ[ℝ] ℝ) (x : Fin n → ℝ) (hx : Function.Injective x) : + (vandermonde x)ᵀ *ᵥ quadratureWeight L x = fun i : Fin n ↦ L (X ^ i.val) := by + funext i + change (∑ j : Fin n, x j ^ i.val * quadratureWeight L x j) = L (X ^ i.val) + symm + have hdeg : (X ^ i.val : ℝ[X]).degree < (n : WithBot ℕ) := by + rw [degree_X_pow] + exact_mod_cast i.is_lt + simpa only [eval_pow, eval_X, mul_comm] using + quadrature_exact_of_degree_lt L x hx hdeg + +/-- The existing Lagrange weights are the inverse Vandermonde moment solve. -/ +theorem quadratureWeight_eq_inv_mulVec {n : ℕ} + (L : ℝ[X] →ₗ[ℝ] ℝ) (x : Fin n → ℝ) (hx : Function.Injective x) : + quadratureWeight L x = ((vandermonde x)ᵀ)⁻¹ *ᵥ + (fun i : Fin n ↦ L (X ^ i.val)) := by + symm + rw [← transpose_vandermonde_mulVec_quadratureWeight L x hx, + mulVec_mulVec, nonsing_inv_mul _ (isUnit_det_transpose_vandermonde hx), one_mulVec] + +end Lagrange diff --git a/RealRooted/Mathlib/LinearAlgebra/Lagrange/QuadraturePerturbation.lean b/RealRooted/Mathlib/LinearAlgebra/Lagrange/QuadraturePerturbation.lean new file mode 100644 index 000000000..30764c6b9 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Lagrange/QuadraturePerturbation.lean @@ -0,0 +1,174 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature + +import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadratureMoments +import Mathlib.Topology.Instances.Real.Lemmas +public import Mathlib.Topology.Instances.Matrix +import RealRooted.Mathlib.LinearAlgebra.Matrix.PerturbationLimits +import RealRooted.Mathlib.LinearAlgebra.Matrix.LinearSystemPerturbation +import Mathlib.Algebra.Order.Ring.Abs + +/-! +# Perturbation of Lagrange quadrature weights + +Convergence of distinct reference nodes and the first `n` moments implies +convergence of the existing Lagrange quadrature weights. On a fixed bounded +node set, the inverse Vandermonde residual estimate gives a quantitative bound. +No positivity or Gaussian exactness is assumed in these perturbation statements. +-/ + +public section + +open Filter Topology Polynomial Matrix + +namespace Matrix + +/-- Componentwise convergence of nodes gives convergence of their moment matrices. -/ +theorem tendsto_transpose_vandermonde {ι : Type*} {l : Filter ι} {n : ℕ} + {x : ι → Fin n → ℝ} {x₀ : Fin n → ℝ} + (hx : ∀ i, Tendsto (fun t ↦ x t i) l (𝓝 (x₀ i))) : + Tendsto (fun t ↦ (vandermonde (x t))ᵀ) l (𝓝 ((vandermonde x₀)ᵀ)) := by + apply tendsto_pi_nhds.mpr + intro i + apply tendsto_pi_nhds.mpr + intro j + exact (hx j).pow i.val + +end Matrix + +namespace Lagrange + +/-- The first `n` moments and convergent nodes determine convergent Lagrange +weights whenever the reference nodes are distinct. No distinctness assumption +is needed away from the limit, because it follows eventually. -/ +theorem tendsto_quadratureWeight {ι : Type*} {l : Filter ι} {n : ℕ} + {L : ι → ℝ[X] →ₗ[ℝ] ℝ} {L₀ : ℝ[X] →ₗ[ℝ] ℝ} + {x : ι → Fin n → ℝ} {x₀ : Fin n → ℝ} + (hx₀ : Function.Injective x₀) + (hx : ∀ i, Tendsto (fun t ↦ x t i) l (𝓝 (x₀ i))) + (hL : ∀ i : Fin n, Tendsto (fun t ↦ L t (X ^ i.val)) l (𝓝 (L₀ (X ^ i.val)))) : + Tendsto (fun t ↦ quadratureWeight (L t) (x t)) l (𝓝 (quadratureWeight L₀ x₀)) := by + have hA := tendsto_transpose_vandermonde hx + have hdet := isUnit_det_transpose_vandermonde hx₀ + have hinv := tendsto_nonsing_inv_of_isUnit_det hA hdet + have hmom : Tendsto (fun t ↦ fun i : Fin n ↦ L t (X ^ i.val)) l + (𝓝 (fun i : Fin n ↦ L₀ (X ^ i.val))) := tendsto_pi_nhds.mpr hL + have hmul : Continuous (fun p : Matrix (Fin n) (Fin n) ℝ × (Fin n → ℝ) ↦ + p.1 *ᵥ p.2) := continuous_fst.matrix_mulVec continuous_snd + have hlimit := (hmul.tendsto _).comp (hinv.prodMk_nhds hmom) + rw [← quadratureWeight_eq_inv_mulVec L₀ x₀ hx₀] at hlimit + obtain ⟨_, _, hbound⟩ := eventually_isUnit_det_and_inv_bound hA hdet + apply Tendsto.congr' _ hlimit + filter_upwards [hbound] with t ht + have hxt : Function.Injective (x t) := by + apply det_vandermonde_ne_zero_iff.mp + simpa only [det_transpose] using isUnit_iff_ne_zero.mp ht.1 + exact (quadratureWeight_eq_inv_mulVec (L t) (x t) hxt).symm + +/-- A common bounded interval controls every power occurring in a Vandermonde +matrix by a constant depending only on the interval and the matrix size. -/ +private theorem abs_pow_sub_le_of_abs_le {a b R δ : ℝ} {n k : ℕ} + (hR : 1 ≤ R) (hk : k ≤ n) (hδ : 0 ≤ δ) + (ha : |a| ≤ R) (hb : |b| ≤ R) (hab : |a - b| ≤ δ) : + |a ^ k - b ^ k| ≤ ((n : ℝ) * R ^ n) * δ := by + have hmax0 : 0 ≤ max |a| |b| := (abs_nonneg a).trans (le_max_left _ _) + have hpower : max |a| |b| ^ (k - 1) ≤ R ^ n := + (pow_le_pow_left₀ hmax0 (max_le ha hb) _).trans + (pow_le_pow_right₀ hR ((Nat.sub_le k 1).trans hk)) + have hcoef : |a - b| * (k : ℝ) ≤ δ * (n : ℝ) := + mul_le_mul hab (by exact_mod_cast hk) (by positivity) hδ + calc + |a ^ k - b ^ k| ≤ |a - b| * k * max |a| |b| ^ (k - 1) := + abs_pow_sub_pow_le a b k + _ ≤ δ * n * R ^ n := mul_le_mul hcoef hpower (by positivity) (by positivity) + _ = ((n : ℝ) * R ^ n) * δ := by ring + +/-- Bounded inverse entries, moment errors, and node errors give a quantitative +bound for the existing quadrature weights. -/ +theorem abs_quadratureWeight_sub_le {n : ℕ} + {L L₀ : ℝ[X] →ₗ[ℝ] ℝ} {x x₀ : Fin n → ℝ} + (hx₀ : Function.Injective x₀) (hx : Function.Injective x) + {M R δ : ℝ} (hM : 0 ≤ M) (hR : 1 ≤ R) (hδ : 0 ≤ δ) + (hinv : ∀ i j, |((vandermonde x)ᵀ)⁻¹ i j| ≤ M) + (hxbound : ∀ i, |x i| ≤ R) (hx₀bound : ∀ i, |x₀ i| ≤ R) + (hnode : ∀ i, |x i - x₀ i| ≤ δ) + (hmoment : ∀ i : Fin n, |L (X ^ i.val) - L₀ (X ^ i.val)| ≤ δ) (i : Fin n) : + |quadratureWeight L x i - quadratureWeight L₀ x₀ i| ≤ + (n : ℝ) * M * (1 + ∑ j : Fin n, |quadratureWeight L₀ x₀ j|) * + (1 + (n : ℝ) * R ^ n) * δ := by + have hR0 : 0 ≤ R := zero_le_one.trans hR + have hscale : 1 ≤ 1 + (n : ℝ) * R ^ n := le_add_of_nonneg_right (by positivity) + have hmatrix : ∀ j k : Fin n, + |(vandermonde x)ᵀ j k - (vandermonde x₀)ᵀ j k| ≤ + (1 + (n : ℝ) * R ^ n) * δ := by + intro j k + change |x k ^ j.val - x₀ k ^ j.val| ≤ _ + exact (abs_pow_sub_le_of_abs_le hR j.is_lt.le hδ + (hxbound k) (hx₀bound k) (hnode k)).trans + (mul_le_mul_of_nonneg_right (by linarith) hδ) + have hmom : ∀ j : Fin n, |L (X ^ j.val) - L₀ (X ^ j.val)| ≤ + (1 + (n : ℝ) * R ^ n) * δ := by + intro j + exact (hmoment j).trans (by simpa only [one_mul] using + mul_le_mul_of_nonneg_right hscale hδ) + calc + _ ≤ (n : ℝ) * M * (1 + ∑ j : Fin n, |quadratureWeight L₀ x₀ j|) * + ((1 + (n : ℝ) * R ^ n) * δ) := by + simpa only [Fintype.card_fin] using Matrix.abs_sub_le_of_mulVec_eq + (isUnit_det_transpose_vandermonde hx) + (transpose_vandermonde_mulVec_quadratureWeight L₀ x₀ hx₀) + (transpose_vandermonde_mulVec_quadratureWeight L x hx) + hM hinv hmatrix hmom i + _ = _ := by ring + +/-- Near fixed distinct nodes, weight error is bounded linearly by any common +nonnegative bound on node error and the first `n` moment errors. The constant +depends on the fixed reference rule; the empty rule is included. -/ +theorem eventually_abs_quadratureWeight_sub_le + {ι : Type*} {l : Filter ι} {n : ℕ} + (L₀ : ℝ[X] →ₗ[ℝ] ℝ) {x : ι → Fin n → ℝ} {x₀ : Fin n → ℝ} + (hx₀ : Function.Injective x₀) + (hx : ∀ i, Tendsto (fun t ↦ x t i) l (𝓝 (x₀ i))) : + ∃ C > 0, ∀ᶠ t in l, Function.Injective (x t) ∧ + ∀ (L : ℝ[X] →ₗ[ℝ] ℝ) (δ : ℝ), 0 ≤ δ → + (∀ i, |x t i - x₀ i| ≤ δ) → + (∀ i : Fin n, |L (X ^ i.val) - L₀ (X ^ i.val)| ≤ δ) → + ∀ i, |quadratureWeight L (x t) i - quadratureWeight L₀ x₀ i| ≤ C * δ := by + obtain ⟨M, hM, hmatrix⟩ := eventually_isUnit_det_and_inv_bound + (tendsto_transpose_vandermonde hx) (isUnit_det_transpose_vandermonde hx₀) + let R : ℝ := 2 + ∑ i : Fin n, |x₀ i| + have hR : 1 ≤ R := by + have hs : 0 ≤ ∑ i : Fin n, |x₀ i| := Finset.sum_nonneg (fun i _ ↦ abs_nonneg _) + dsimp only [R] + linarith + have hR0 : 0 ≤ R := zero_le_one.trans hR + have hx₀R (i : Fin n) : |x₀ i| < R := by + have hi : |x₀ i| ≤ ∑ j : Fin n, |x₀ j| := + Finset.single_le_sum (fun j _ ↦ abs_nonneg (x₀ j)) (Finset.mem_univ i) + dsimp only [R] + linarith + have hxR : ∀ᶠ t in l, ∀ i, |x t i| ≤ R := by + apply eventually_all.mpr + intro i + exact ((hx i).abs.eventually_lt tendsto_const_nhds (hx₀R i)).mono fun _ h ↦ h.le + let C : ℝ := (n : ℝ) * M * (1 + ∑ j : Fin n, |quadratureWeight L₀ x₀ j|) * + (1 + (n : ℝ) * R ^ n) + 1 + have hC : 0 < C := by dsimp [C]; positivity + refine ⟨C, hC, ?_⟩ + filter_upwards [hmatrix, hxR] with t ht hxtR + have hxt : Function.Injective (x t) := by + apply det_vandermonde_ne_zero_iff.mp + simpa only [det_transpose] using isUnit_iff_ne_zero.mp ht.1 + refine ⟨hxt, ?_⟩ + intro L δ hδ hnode hmom i + exact (abs_quadratureWeight_sub_le hx₀ hxt hM.le hR hδ ht.2 hxtR + (fun j ↦ (hx₀R j).le) hnode hmom i).trans + (mul_le_mul_of_nonneg_right (by dsimp only [C]; linarith) hδ) + +end Lagrange diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/BidiagonalGram.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/BidiagonalGram.lean new file mode 100644 index 000000000..5b592daa2 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/BidiagonalGram.lean @@ -0,0 +1,86 @@ +/- +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 RealRooted.Mathlib.LinearAlgebra.Matrix.TotallyNonneg.Bidiagonal + +/-! +# First-coordinate decomposition of bidiagonal Gram matrices + +Removing the first row and column of `B Bᵀ` for a lower-bidiagonal matrix +shifts the bidiagonal data and adds the square of the first subdiagonal +entry at the new first coordinate. These exact block identities explain +the adjacent sums and products in Stieltjes-to-Jacobi contraction. +-/ + +public section + +open scoped BigOperators + +namespace Matrix + +variable {R : Type*} [CommRing R] + +/-- Only the first diagonal entry is nonzero in the first bidiagonal row. -/ +theorem lowerBidiagonalFin_zero (d s : ℕ → R) (n : ℕ) (j : Fin (n + 1)) : + lowerBidiagonalFin (n + 1) d s 0 j = if j = 0 then d 0 else 0 := by + simp [lowerBidiagonalFin_apply, eq_comm] + +/-- The lower part of the first bidiagonal column has one possible nonzero entry. -/ +theorem lowerBidiagonalFin_succ_zero (d s : ℕ → R) (n : ℕ) (i : Fin (n + 1)) : + lowerBidiagonalFin (n + 2) d s i.succ 0 = if i = 0 then s 0 else 0 := by + by_cases hi : i = 0 + · subst i + simp [lowerBidiagonalFin_apply] + · have hval : i.val ≠ 0 := fun h => hi (Fin.ext h) + simp [lowerBidiagonalFin_apply, hi, hval] + +/-- The trailing principal bidiagonal block shifts both coefficient sequences. -/ +theorem lowerBidiagonalFin_succ_succ (d s : ℕ → R) (n : ℕ) (i j : Fin n) : + lowerBidiagonalFin (n + 1) d s i.succ j.succ = + lowerBidiagonalFin n (fun k => d (k + 1)) (fun k => s (k + 1)) i j := by + simp [lowerBidiagonalFin_apply] + +/-- The first Gram diagonal entry is the square of the first bidiagonal entry. -/ +theorem lowerBidiagonalFin_mul_transpose_zero_zero (d s : ℕ → R) (n : ℕ) : + (lowerBidiagonalFin (n + 1) d s * (lowerBidiagonalFin (n + 1) d s)ᵀ) 0 0 = + d 0 ^ 2 := by + simp [Matrix.mul_apply, transpose_apply, pow_two] + +/-- The first Gram off-diagonal row couples only to the next coordinate. -/ +theorem lowerBidiagonalFin_mul_transpose_zero_succ + (d s : ℕ → R) (n : ℕ) (i : Fin (n + 1)) : + (lowerBidiagonalFin (n + 2) d s * (lowerBidiagonalFin (n + 2) d s)ᵀ) 0 i.succ = + if i = 0 then d 0 * s 0 else 0 := by + simp only [Matrix.mul_apply, transpose_apply, lowerBidiagonalFin_zero, + ite_mul, zero_mul, Finset.sum_ite_eq', Finset.mem_univ, ite_true] + rw [lowerBidiagonalFin_succ_zero] + simp only [mul_ite, mul_zero] + +/-- The first Gram off-diagonal column has the same single coupling. -/ +theorem lowerBidiagonalFin_mul_transpose_succ_zero + (d s : ℕ → R) (n : ℕ) (i : Fin (n + 1)) : + (lowerBidiagonalFin (n + 2) d s * (lowerBidiagonalFin (n + 2) d s)ᵀ) i.succ 0 = + if i = 0 then d 0 * s 0 else 0 := by + simpa only [Matrix.mul_apply, transpose_apply, mul_comm] using + lowerBidiagonalFin_mul_transpose_zero_succ d s n i + +/-- The trailing Gram block is the shifted bidiagonal Gram matrix plus a +single nonnegative diagonal correction when the coefficient ring is ordered. -/ +theorem lowerBidiagonalFin_mul_transpose_succ_succ + (d s : ℕ → R) (n : ℕ) (i j : Fin (n + 1)) : + (lowerBidiagonalFin (n + 2) d s * (lowerBidiagonalFin (n + 2) d s)ᵀ) i.succ j.succ = + (lowerBidiagonalFin (n + 1) (fun k => d (k + 1)) (fun k => s (k + 1)) * + (lowerBidiagonalFin (n + 1) (fun k => d (k + 1)) (fun k => s (k + 1)))ᵀ) i j + + if i = 0 ∧ j = 0 then s 0 ^ 2 else 0 := by + rw [Matrix.mul_apply, Fin.sum_univ_succ] + simp only [transpose_apply, lowerBidiagonalFin_succ_zero, + lowerBidiagonalFin_succ_succ] + rw [Matrix.mul_apply] + by_cases hi : i = 0 <;> by_cases hj : j = 0 <;> + simp [hi, hj, transpose_apply, pow_two, add_comm] + +end Matrix diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/LinearSystemPerturbation.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/LinearSystemPerturbation.lean new file mode 100644 index 000000000..94a798a9e --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/LinearSystemPerturbation.lean @@ -0,0 +1,98 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +import Mathlib.Algebra.Order.BigOperators.Group.Finset +public import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Abel +import Mathlib.Tactic.Ring + +/-! +# Entrywise perturbation bounds for a finite linear system + + +An entrywise bound on the perturbed inverse suffices for a Lipschitz estimate on +solutions. No operator norm or differentiability of matrix inversion is required. +-/ + +public section + +open Finset + +namespace Matrix + +section CommRing + +variable {R ι : Type*} [CommRing R] [Fintype ι] [DecidableEq ι] + +/-- An exact residual formula compares solutions of two finite linear systems. -/ +theorem sub_eq_inv_mulVec_sub {A B : Matrix ι ι R} {u v b c : ι → R} + (hB : IsUnit B.det) (hu : A *ᵥ u = b) (hv : B *ᵥ v = c) : + v - u = B⁻¹ *ᵥ ((c - b) - (B - A) *ᵥ u) := by + calc + v - u = B⁻¹ *ᵥ (B *ᵥ (v - u)) := by + rw [mulVec_mulVec, nonsing_inv_mul _ hB, one_mulVec] + _ = B⁻¹ *ᵥ ((c - b) - (B - A) *ᵥ u) := by + congr 1 + rw [mulVec_sub, hv, sub_mulVec, hu] + abel + +end CommRing + +variable {ι : Type*} [Fintype ι] + +/-- Componentwise bounds on the matrix and right-hand-side changes bound the +residual at the reference solution. -/ +private theorem abs_residual_le {A B : Matrix ι ι ℝ} {u b c : ι → ℝ} {ε : ℝ} + (hA : ∀ i j, |B i j - A i j| ≤ ε) + (hb : ∀ i, |c i - b i| ≤ ε) (i : ι) : + |((c - b) - (B - A) *ᵥ u) i| ≤ ε * (1 + ∑ j, |u j|) := by + change |(c i - b i) - ∑ j, (B i j - A i j) * u j| ≤ _ + calc + |(c i - b i) - ∑ j, (B i j - A i j) * u j| ≤ + |c i - b i| + |∑ j, (B i j - A i j) * u j| := abs_sub _ _ + _ ≤ ε + ∑ j, ε * |u j| := by + apply add_le_add (hb i) + calc + |∑ j, (B i j - A i j) * u j| ≤ + ∑ j, |(B i j - A i j) * u j| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ j, ε * |u j| := by + apply Finset.sum_le_sum + intro j _ + rw [abs_mul] + exact mul_le_mul_of_nonneg_right (hA i j) (abs_nonneg _) + _ = ε * (1 + ∑ j, |u j|) := by rw [← Finset.mul_sum]; ring + +/-- Uniform entrywise control of a perturbed inverse gives a componentwise +Lipschitz bound on the solution of a finite linear system. -/ +theorem abs_sub_le_of_mulVec_eq [DecidableEq ι] {A B : Matrix ι ι ℝ} {u v b c : ι → ℝ} + (hB : IsUnit B.det) (hu : A *ᵥ u = b) (hv : B *ᵥ v = c) + {M ε : ℝ} (hM : 0 ≤ M) + (hinv : ∀ i j, |B⁻¹ i j| ≤ M) + (hA : ∀ i j, |B i j - A i j| ≤ ε) + (hb : ∀ i, |c i - b i| ≤ ε) (i : ι) : + |v i - u i| ≤ (Fintype.card ι : ℝ) * M * (1 + ∑ j, |u j|) * ε := by + let w : ι → ℝ := (c - b) - (B - A) *ᵥ u + have hw : ∀ j, |w j| ≤ ε * (1 + ∑ k, |u k|) := + abs_residual_le hA hb + have heq : v - u = B⁻¹ *ᵥ w := sub_eq_inv_mulVec_sub hB hu hv + change |(v - u) i| ≤ _ + rw [heq] + change |∑ j, B⁻¹ i j * w j| ≤ _ + calc + |∑ j, B⁻¹ i j * w j| ≤ ∑ j, |B⁻¹ i j * w j| := + Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ _j : ι, M * (ε * (1 + ∑ k, |u k|)) := by + apply Finset.sum_le_sum + intro j _ + rw [abs_mul] + exact mul_le_mul (hinv i j) (hw j) (abs_nonneg _) hM + _ = (Fintype.card ι : ℝ) * M * (1 + ∑ j, |u j|) * ε := by + simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul] + ring + +end Matrix diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/PerturbationLimits.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/PerturbationLimits.lean new file mode 100644 index 000000000..720e5f1f7 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/PerturbationLimits.lean @@ -0,0 +1,74 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Topology.MetricSpace.Pseudo.Defs + +public import Mathlib.Topology.Instances.Matrix +import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +import Mathlib.Topology.Instances.Real.Lemmas +import Mathlib.Topology.Algebra.Field +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity + +/-! +# Uniform inverse bounds near a nonsingular real matrix + +Convergence to a nonsingular finite real matrix gives eventual nonsingularity +and one positive bound for every entry of the inverses. +-/ + +public section + +open Filter Topology + +namespace Matrix + +variable {ι κ : Type*} [Fintype κ] [DecidableEq κ] +variable {l : Filter ι} {A : ι → Matrix κ κ ℝ} {A₀ : Matrix κ κ ℝ} + +/-- The total matrix inverse converges at a nonsingular real matrix. -/ +theorem tendsto_nonsing_inv_of_isUnit_det + (hA : Tendsto A l (𝓝 A₀)) (hdet : IsUnit A₀.det) : + Tendsto (fun t ↦ (A t)⁻¹) l (𝓝 A₀⁻¹) := by + have hi : ContinuousAt (Ring.inverse : ℝ → ℝ) A₀.det := by + rw [Ring.inverse_eq_inv'] + exact continuousAt_inv₀ (isUnit_iff_ne_zero.mp hdet) + exact (continuousAt_matrix_inv A₀ hi).tendsto.comp hA + +/-- Near a nonsingular real matrix, inverses exist and their entries admit +one uniform positive bound. -/ +theorem eventually_isUnit_det_and_inv_bound + (hA : Tendsto A l (𝓝 A₀)) (hdet : IsUnit A₀.det) : + ∃ M > 0, ∀ᶠ t in l, IsUnit (A t).det ∧ ∀ i j, |(A t)⁻¹ i j| ≤ M := by + let M : ℝ := 1 + ∑ i : κ, ∑ j : κ, |A₀⁻¹ i j| + have hM : 0 < M := by dsimp [M]; positivity + have hentry (i j : κ) : |A₀⁻¹ i j| < M := by + have hj : |A₀⁻¹ i j| ≤ ∑ k : κ, |A₀⁻¹ i k| := + Finset.single_le_sum (fun k _ ↦ abs_nonneg (A₀⁻¹ i k)) (Finset.mem_univ j) + have hi : (∑ k : κ, |A₀⁻¹ i k|) ≤ ∑ r : κ, ∑ k : κ, |A₀⁻¹ r k| := + Finset.single_le_sum (f := fun r : κ ↦ ∑ k : κ, |A₀⁻¹ r k|) + (fun r _ ↦ Finset.sum_nonneg (fun k _ ↦ abs_nonneg (A₀⁻¹ r k))) + (Finset.mem_univ i) + dsimp only [M] + linarith + have hdetc : Continuous (fun B : Matrix κ κ ℝ ↦ B.det) := + continuous_id.matrix_det + have hdetlim := (hdetc.tendsto A₀).comp hA + have hunit : ∀ᶠ t in l, IsUnit (A t).det := by + filter_upwards [hdetlim.eventually_ne (isUnit_iff_ne_zero.mp hdet)] with t ht + exact isUnit_iff_ne_zero.mpr ht + have hinv := tendsto_nonsing_inv_of_isUnit_det hA hdet + have hbound : ∀ᶠ t in l, ∀ i j : κ, |(A t)⁻¹ i j| ≤ M := by + apply eventually_all.mpr + intro i + apply eventually_all.mpr + intro j + have hij := tendsto_pi_nhds.mp (tendsto_pi_nhds.mp hinv i) j + exact (hij.abs.eventually_lt tendsto_const_nhds (hentry i j)).mono fun _ h ↦ h.le + exact ⟨M, hM, hunit.and hbound⟩ + +end Matrix diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/FinSchur.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/FinSchur.lean new file mode 100644 index 000000000..f7ba4e2e3 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/FinSchur.lean @@ -0,0 +1,60 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Resolvent +import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Schur +import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Reindex + +/-! +# The first Jacobi step for a finite matrix +-/ + +public section + +namespace Matrix + +variable {R : Type*} [CommRing R] + +/-- A finite matrix whose first row and column couple only to coordinate one +has a Jacobi step whose tail is the trailing principal formal resolvent. -/ +theorem powerSeriesResolvent_zero_eq_jacobiStep {n : ℕ} + (A : Matrix (Fin (n + 2)) (Fin (n + 2)) R) (b c : R) + (hrow : ∀ j : Fin (n + 1), A 0 j.succ = if j = 0 then b else 0) + (hcol : ∀ j : Fin (n + 1), A j.succ 0 = if j = 0 then c else 0) : + powerSeriesResolvent A 0 0 = PowerSeries.jacobiStep (A 0 0) (b * c) + (powerSeriesResolvent (A.submatrix Fin.succ Fin.succ) 0 0) := by + let e : Unit ⊕ Fin (n + 1) ≃ Fin (n + 2) := + (Equiv.sumCongr finOneEquiv.symm (Equiv.refl (Fin (n + 1)))).trans + ((finSumFinEquiv : Fin 1 ⊕ Fin (n + 1) ≃ Fin (1 + (n + 1))).trans + (finCongr (by lia))) + have he0 : e (Sum.inl ()) = 0 := by + apply Fin.ext + simp [e, show finOneEquiv.symm () = (0 : Fin 1) from Subsingleton.elim _ _] + have hes (j : Fin (n + 1)) : e (Sum.inr j) = j.succ := by + apply Fin.ext + simp [e] + let B := A.submatrix e e + have hbrow (j : Fin (n + 1)) : B (Sum.inl ()) (Sum.inr j) = + if j = 0 then b else 0 := by + simpa only [B, submatrix_apply, he0, hes] using hrow j + have hbcol (j : Fin (n + 1)) : B (Sum.inr j) (Sum.inl ()) = + if j = 0 then c else 0 := by + simpa only [B, submatrix_apply, he0, hes] using hcol j + have h := powerSeriesResolvent_inl_eq_jacobiStep B 0 b c hbrow hbcol + have ht : B.submatrix Sum.inr Sum.inr = A.submatrix Fin.succ Fin.succ := by + ext i j + simp only [B, submatrix_apply, hes] + rw [ht] at h + have hg : powerSeriesResolvent B (Sum.inl ()) (Sum.inl ()) = + powerSeriesResolvent A 0 0 := by + simpa only [B, he0] using + powerSeriesResolvent_submatrix_equiv A e (Sum.inl ()) (Sum.inl ()) + rw [hg] at h + simpa only [B, submatrix_apply, he0] using h + +end Matrix diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Reindex.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Reindex.lean new file mode 100644 index 000000000..9af623c8f --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Reindex.lean @@ -0,0 +1,31 @@ +/- +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 RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Resolvent +import Mathlib.LinearAlgebra.Matrix.Reindex + +/-! +# Reindexing formal matrix resolvents +-/ + +public section + +namespace Matrix + +variable {R ι κ : Type*} [CommRing R] + [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] + +/-- Simultaneous reindexing preserves every formal resolvent entry. -/ +theorem powerSeriesResolvent_submatrix_equiv (A : Matrix ι ι R) (e : κ ≃ ι) (i j : κ) : + powerSeriesResolvent (A.submatrix e e) i j = powerSeriesResolvent A (e i) (e j) := by + ext n + rw [coeff_powerSeriesResolvent, coeff_powerSeriesResolvent] + have h := congrArg (fun M : Matrix κ κ R => M i j) + ((reindexRingEquiv R e.symm).map_pow A n) + exact h.symm + +end Matrix diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Resolvent.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Resolvent.lean new file mode 100644 index 000000000..eb71e0bf2 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Resolvent.lean @@ -0,0 +1,81 @@ +/- +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.RingTheory.PowerSeries.Basic +public import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +import Mathlib.Tactic.LinearCombination + +/-! +# Formal matrix resolvents + +The generating series of the entries of `A^n` form the inverse of `I - X A`. +The construction and identity are purely formal and require no bound on the +matrix or numerical convergence of a geometric series. +-/ + +public section + +open PowerSeries +open scoped BigOperators + +namespace Matrix + +variable {R ι : Type*} [CommRing R] [Fintype ι] [DecidableEq ι] + +/-- The matrix of generating series of entries of natural powers of `A`. -/ +@[expose] noncomputable def powerSeriesResolvent (A : Matrix ι ι R) : Matrix ι ι R⟦X⟧ := + fun i j => PowerSeries.mk fun n => (A ^ n) i j + +/-- Formal resolvent coefficients are entries of matrix powers. -/ +@[simp] theorem coeff_powerSeriesResolvent (A : Matrix ι ι R) (n : ℕ) (i j : ι) : + PowerSeries.coeff n (powerSeriesResolvent A i j) = (A ^ n) i j := by + simp only [powerSeriesResolvent, PowerSeries.coeff_mk] + +/-- The constant coefficient matrix of a formal resolvent is the identity. -/ +@[simp] theorem constantCoeff_powerSeriesResolvent (A : Matrix ι ι R) (i j : ι) : + PowerSeries.constantCoeff (powerSeriesResolvent A i j) = (1 : Matrix ι ι R) i j := by + rw [← PowerSeries.coeff_zero_eq_constantCoeff_apply, coeff_powerSeriesResolvent, pow_zero] + +/-- The row recurrence for formal matrix resolvents. -/ +theorem powerSeriesResolvent_eq_one_add (A : Matrix ι ι R) (i j : ι) : + powerSeriesResolvent A i j = C ((1 : Matrix ι ι R) i j) + + X * ∑ l, C (A i l) * powerSeriesResolvent A l j := by + ext n + cases n with + | zero => simp + | succ n => + simp [PowerSeries.coeff_succ_X_mul, PowerSeries.coeff_C_mul, + pow_succ', Matrix.mul_apply] + +/-- The formal resolvent is a right inverse of `I - X A`. -/ +theorem one_sub_mul_powerSeriesResolvent (A : Matrix ι ι R) : + (1 - (X : R⟦X⟧) • A.map C) * powerSeriesResolvent A = 1 := by + apply Matrix.ext + intro i j + have h := powerSeriesResolvent_eq_one_add A i j + calc + ((1 - (X : R⟦X⟧) • A.map C) * powerSeriesResolvent A) i j = + powerSeriesResolvent A i j - + X * ∑ l, C (A i l) * powerSeriesResolvent A l j := by + rw [sub_mul] + simp only [Matrix.smul_mul, Matrix.one_mul, Matrix.sub_apply, + Matrix.smul_apply, smul_eq_mul, Matrix.mul_apply, Matrix.map_apply] + _ = C ((1 : Matrix ι ι R) i j) := by linear_combination h + _ = (1 : Matrix ι ι R⟦X⟧) i j := by + by_cases hij : i = j <;> simp [Matrix.one_apply, hij] + +/-- The formal resolvent is also a left inverse of `I - X A`. -/ +theorem powerSeriesResolvent_mul_one_sub (A : Matrix ι ι R) : + powerSeriesResolvent A * (1 - (X : R⟦X⟧) • A.map C) = 1 := + mul_eq_one_comm.mp (one_sub_mul_powerSeriesResolvent A) + +/-- The nonsingular matrix inverse of `I - X A` is its formal resolvent. -/ +theorem inv_one_sub_X_smul_map_C (A : Matrix ι ι R) : + (1 - (X : R⟦X⟧) • A.map C)⁻¹ = powerSeriesResolvent A := + Matrix.inv_eq_right_inv (one_sub_mul_powerSeriesResolvent A) + +end Matrix diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Schur.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Schur.lean new file mode 100644 index 000000000..29db0eca2 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Schur.lean @@ -0,0 +1,113 @@ +/- +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 RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Resolvent +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step + +/-! +# A formal Schur identity and Jacobi continued-fraction step + +Eliminating the lower coordinates of a formal resolvent gives the scalar +Schur denominator at the distinguished coordinate. If the first row and +column couple to only one lower coordinate, this is exactly a Jacobi +continued-fraction step. All statements hold over commutative rings and +include zero coupling coefficients. +-/ + +public section + +open PowerSeries +open scoped BigOperators + +namespace Matrix + +variable {R ι : Type*} [CommRing R] [Fintype ι] [DecidableEq ι] + +/-- Elimination of the lower column uses the formal inverse of the trailing block. -/ +private theorem resolvent_lower_column_eq (A : Matrix (Unit ⊕ ι) (Unit ⊕ ι) R) (i : ι) : + powerSeriesResolvent A (Sum.inr i) (Sum.inl ()) = + X * (∑ j, powerSeriesResolvent (A.submatrix Sum.inr Sum.inr) i j * + C (A (Sum.inr j) (Sum.inl ()))) * + powerSeriesResolvent A (Sum.inl ()) (Sum.inl ()) := by + let B := A.submatrix Sum.inr Sum.inr + let D : Matrix ι ι R⟦X⟧ := 1 - (X : R⟦X⟧) • B.map C + let H := powerSeriesResolvent B + let v : ι → R⟦X⟧ := fun j => powerSeriesResolvent A (Sum.inr j) (Sum.inl ()) + let s := powerSeriesResolvent A (Sum.inl ()) (Sum.inl ()) + have hrec (j : ι) : v j = + X * (C (A (Sum.inr j) (Sum.inl ())) * s + ∑ l, C (B j l) * v l) := by + simpa [B, v, s, Matrix.one_apply, Fintype.sum_sum_type] using + powerSeriesResolvent_eq_one_add A (Sum.inr j) (Sum.inl ()) + have hbottom (j : ι) : (D *ᵥ v) j = X * C (A (Sum.inr j) (Sum.inl ())) * s := by + dsimp only [D] + rw [sub_mulVec, one_mulVec, smul_mulVec] + simp only [Pi.sub_apply, Pi.smul_apply, + smul_eq_mul, Matrix.mulVec, dotProduct, Matrix.map_apply] + linear_combination hrec j + have hcancel : H * D = 1 := powerSeriesResolvent_mul_one_sub B + change v i = X * (∑ j, H i j * C (A (Sum.inr j) (Sum.inl ()))) * s + calc + v i = (H *ᵥ (D *ᵥ v)) i := by rw [mulVec_mulVec, hcancel, one_mulVec] + _ = ∑ j, H i j * (X * C (A (Sum.inr j) (Sum.inl ())) * s) := by + change (∑ j, H i j * (D *ᵥ v) j) = _ + simp only [hbottom] + _ = X * (∑ j, H i j * C (A (Sum.inr j) (Sum.inl ()))) * s := by + simp only [Finset.mul_sum, Finset.sum_mul] + apply Finset.sum_congr rfl + intro j _ + ring + +/-- Scalar Schur denominator for the first coordinate of a formal resolvent. +No determinant or invertibility assumption is needed: `I - X A` and its lower +principal block have constant coefficient equal to the identity. -/ +theorem one_sub_mul_powerSeriesResolvent_inl + (A : Matrix (Unit ⊕ ι) (Unit ⊕ ι) R) : + (1 - C (A (Sum.inl ()) (Sum.inl ())) * X - X ^ 2 * + ∑ i, C (A (Sum.inl ()) (Sum.inr i)) * + (∑ j, powerSeriesResolvent (A.submatrix Sum.inr Sum.inr) i j * + C (A (Sum.inr j) (Sum.inl ())))) * + powerSeriesResolvent A (Sum.inl ()) (Sum.inl ()) = 1 := by + let s := powerSeriesResolvent A (Sum.inl ()) (Sum.inl ()) + let t := ∑ i, C (A (Sum.inl ()) (Sum.inr i)) * + (∑ j, powerSeriesResolvent (A.submatrix Sum.inr Sum.inr) i j * + C (A (Sum.inr j) (Sum.inl ()))) + have hrow : s = 1 + X * (C (A (Sum.inl ()) (Sum.inl ())) * s + + ∑ i, C (A (Sum.inl ()) (Sum.inr i)) * + powerSeriesResolvent A (Sum.inr i) (Sum.inl ())) := by + simpa [s, Matrix.one_apply, Fintype.sum_sum_type] using + powerSeriesResolvent_eq_one_add A (Sum.inl ()) (Sum.inl ()) + have hsum : (∑ i, C (A (Sum.inl ()) (Sum.inr i)) * + powerSeriesResolvent A (Sum.inr i) (Sum.inl ())) = X * t * s := by + simp only [resolvent_lower_column_eq, t, s, Finset.mul_sum, Finset.sum_mul] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + ring + rw [hsum] at hrow + change (1 - C (A (Sum.inl ()) (Sum.inl ())) * X - X ^ 2 * t) * s = 1 + linear_combination hrow + +/-- A distinguished coordinate coupled to one lower coordinate contributes +one Jacobi-fraction step. The outgoing numerator is the product of the two +coupling entries, without any nonzero or sign hypothesis. -/ +theorem powerSeriesResolvent_inl_eq_jacobiStep + (A : Matrix (Unit ⊕ ι) (Unit ⊕ ι) R) (i : ι) (b c : R) + (hrow : ∀ j, A (Sum.inl ()) (Sum.inr j) = if j = i then b else 0) + (hcol : ∀ j, A (Sum.inr j) (Sum.inl ()) = if j = i then c else 0) : + powerSeriesResolvent A (Sum.inl ()) (Sum.inl ()) = + jacobiStep (A (Sum.inl ()) (Sum.inl ())) (b * c) + (powerSeriesResolvent (A.submatrix Sum.inr Sum.inr) i i) := by + apply eq_jacobiStep_of_mul_eq_one + have h := one_sub_mul_powerSeriesResolvent_inl A + simp only [hrow, hcol, apply_ite, map_zero, ite_mul, + zero_mul, mul_zero, Finset.sum_ite_eq', Finset.mem_univ, ite_true] at h + convert h using 1 + simp only [map_mul] + ring + +end Matrix diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/StieltjesConvergence.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/StieltjesConvergence.lean new file mode 100644 index 000000000..2a7a8f816 --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/StieltjesConvergence.lean @@ -0,0 +1,86 @@ +/- +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 RealRooted.Mathlib.LinearAlgebra.Matrix.StieltjesGram +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Resolvent +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step +import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.FinSchur +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.TailOffset + +/-! +# Stabilization of finite Stieltjes matrix moments + +The first-coordinate formal resolvents of the finite Jacobi Gram matrices +approach the formal Stieltjes tail coefficient by coefficient. Every Jacobi +step adds two powers of `X` to the error. This algebraic argument permits +zero numerators and does not require bounded numerator data or convergence +of a numerical continued fraction. +-/ + +public section + +open PowerSeries Filter + +namespace Matrix + +/-- The first-coordinate resolvent of a Jacobi Gram matrix satisfies the +contracted Stieltjes recursion. -/ +theorem powerSeriesResolvent_stieltjesJacobiMatrix_succ + (a : ℕ → ℝ) (ha : ∀ k, 0 ≤ a k) (c : ℝ) (n : ℕ) : + powerSeriesResolvent (stieltjesJacobiMatrix a c (n + 1)) 0 0 = + jacobiStep (c + a 0) (a 0 * a 1) + (powerSeriesResolvent + (stieltjesJacobiMatrix (fun k => a (k + 2)) (a 1) n) 0 0) := by + have hcoup : (Real.sqrt (a 0) * Real.sqrt (a 1)) * + (Real.sqrt (a 0) * Real.sqrt (a 1)) = a 0 * a 1 := by + calc + _ = Real.sqrt (a 0) ^ 2 * Real.sqrt (a 1) ^ 2 := by ring + _ = _ := by rw [Real.sq_sqrt (ha 0), Real.sq_sqrt (ha 1)] + rw [powerSeriesResolvent_zero_eq_jacobiStep + (stieltjesJacobiMatrix a c (n + 1)) + (Real.sqrt (a 0) * Real.sqrt (a 1)) (Real.sqrt (a 0) * Real.sqrt (a 1)) + (stieltjesJacobiMatrix_zero_succ a c n) (stieltjesJacobiMatrix_succ_zero a c n), + hcoup, stieltjesJacobiMatrix_zero_zero a c (n + 1) (ha 0), + stieltjesJacobiMatrix_submatrix_succ a c n (ha 1)] + +/-- A finite Jacobi Gram resolvent agrees with its limiting formal Stieltjes +tail with first-diagonal correction through every degree below `2*n`. -/ +theorem X_pow_dvd_resolvent_stieltjesJacobiMatrix_sub + (a : ℕ → ℝ) (ha : ∀ k, 0 ≤ a k) (c : ℝ) (n : ℕ) : + (X : ℝ⟦X⟧) ^ (2 * n) ∣ + powerSeriesResolvent (stieltjesJacobiMatrix a c n) 0 0 - + stieltjesStep c (stieltjesTail a 0) * stieltjesTail a 0 := by + induction n generalizing a c with + | zero => simp + | succ n ih => + rw [powerSeriesResolvent_stieltjesJacobiMatrix_succ a ha c n, + stieltjesStep_mul_tail_eq_jacobiStep] + simpa only [Nat.mul_succ] using + X_pow_dvd_jacobiStep_sub (c + a 0) (a 0 * a 1) + (ih (fun k => a (k + 2)) (fun k => ha (k + 2)) (a 1)) + +/-- A sufficiently large finite Jacobi Gram matrix realizes a prescribed +coefficient of the infinite formal Stieltjes fraction as a matrix moment. -/ +theorem pow_stieltjesJacobiMatrix_zero_zero_eq_coeff + (a : ℕ → ℝ) (ha : ∀ k, 0 ≤ a k) {n k : ℕ} (hk : k < 2 * n) : + (stieltjesJacobiMatrix a 0 n ^ k) 0 0 = coeff k (stieltjesTail a 0) := by + have h := X_pow_dvd_iff.mp + (X_pow_dvd_resolvent_stieltjesJacobiMatrix_sub a ha 0 n) k hk + simpa only [map_sub, coeff_powerSeriesResolvent, stieltjesStep_zero, + one_mul, sub_eq_zero] using h + +/-- Each finite-matrix moment is eventually exactly the corresponding formal +Stieltjes coefficient. This is stronger than numerical convergence. -/ +theorem eventually_pow_stieltjesJacobiMatrix_eq_coeff + (a : ℕ → ℝ) (ha : ∀ k, 0 ≤ a k) (k : ℕ) : + ∀ᶠ n in atTop, (stieltjesJacobiMatrix a 0 n ^ k) 0 0 = + coeff k (stieltjesTail a 0) := by + filter_upwards [eventually_ge_atTop (k + 1)] with n hn + exact pow_stieltjesJacobiMatrix_zero_zero_eq_coeff a ha (by lia) + +end Matrix diff --git a/RealRooted/Mathlib/LinearAlgebra/Matrix/StieltjesGram.lean b/RealRooted/Mathlib/LinearAlgebra/Matrix/StieltjesGram.lean new file mode 100644 index 000000000..ae0ad9fcf --- /dev/null +++ b/RealRooted/Mathlib/LinearAlgebra/Matrix/StieltjesGram.lean @@ -0,0 +1,97 @@ +/- +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 RealRooted.Mathlib.LinearAlgebra.Matrix.TotallyNonneg.Bidiagonal +import RealRooted.Mathlib.LinearAlgebra.Matrix.BidiagonalGram +public import Mathlib.LinearAlgebra.Matrix.PosDef +public import Mathlib.Analysis.Real.Sqrt +import Mathlib.Algebra.Order.Star.Real + +/-! +# Finite positive Jacobi matrices from Stieltjes numerators + +The lower bidiagonal matrix with diagonal `sqrt (a (2*i))` and subdiagonal +`sqrt (a (2*i+1))` gives a positive semidefinite Gram matrix. A nonnegative +correction at its first diagonal entry is preserved by taking trailing +principal blocks. Zero coefficients and singular matrices are allowed. +-/ + +public section + +namespace Matrix + +/-- The finite Jacobi Gram matrix with an optional first-diagonal correction. -/ +@[expose] noncomputable def stieltjesJacobiMatrix (a : ℕ → ℝ) (c : ℝ) (n : ℕ) : + Matrix (Fin (n + 1)) (Fin (n + 1)) ℝ := + let B := lowerBidiagonalFin (n + 1) + (fun i => Real.sqrt (a (2 * i))) (fun i => Real.sqrt (a (2 * i + 1))) + B * Bᵀ + diagonal (fun i => if i = 0 then c else 0) + +/-- A nonnegative first-diagonal correction keeps the Jacobi Gram matrix positive +semidefinite. The square-root definition makes this true for arbitrary `a`. -/ +theorem posSemidef_stieltjesJacobiMatrix (a : ℕ → ℝ) {c : ℝ} (hc : 0 ≤ c) (n : ℕ) : + (stieltjesJacobiMatrix a c n).PosSemidef := by + apply PosSemidef.add + · simpa only [conjTranspose_eq_transpose_of_trivial] using + posSemidef_self_mul_conjTranspose + (lowerBidiagonalFin (n + 1) (fun i => Real.sqrt (a (2 * i))) + (fun i => Real.sqrt (a (2 * i + 1)))) + · apply PosSemidef.diagonal + intro i + change 0 ≤ if i = 0 then c else 0 + split_ifs <;> positivity + +/-- The first diagonal coefficient is the first Stieltjes numerator plus the correction. -/ +theorem stieltjesJacobiMatrix_zero_zero (a : ℕ → ℝ) (c : ℝ) (n : ℕ) + (ha : 0 ≤ a 0) : stieltjesJacobiMatrix a c n 0 0 = c + a 0 := by + dsimp only [stieltjesJacobiMatrix] + rw [Matrix.add_apply, lowerBidiagonalFin_mul_transpose_zero_zero, diagonal_apply_eq] + simp [Real.sq_sqrt ha, add_comm] + +/-- The first row has only one off-diagonal coupling. -/ +theorem stieltjesJacobiMatrix_zero_succ (a : ℕ → ℝ) (c : ℝ) (n : ℕ) + (i : Fin (n + 1)) : + stieltjesJacobiMatrix a c (n + 1) 0 i.succ = + if i = 0 then Real.sqrt (a 0) * Real.sqrt (a 1) else 0 := by + dsimp only [stieltjesJacobiMatrix] + rw [Matrix.add_apply, lowerBidiagonalFin_mul_transpose_zero_succ] + simp [eq_comm] + +/-- The first column has the same single off-diagonal coupling. -/ +theorem stieltjesJacobiMatrix_succ_zero (a : ℕ → ℝ) (c : ℝ) (n : ℕ) + (i : Fin (n + 1)) : + stieltjesJacobiMatrix a c (n + 1) i.succ 0 = + if i = 0 then Real.sqrt (a 0) * Real.sqrt (a 1) else 0 := by + dsimp only [stieltjesJacobiMatrix] + rw [Matrix.add_apply, lowerBidiagonalFin_mul_transpose_succ_zero] + simp + +/-- Removing the first coordinate shifts the numerator data by two; the next +Stieltjes numerator becomes the new first-diagonal correction. -/ +theorem stieltjesJacobiMatrix_submatrix_succ (a : ℕ → ℝ) (c : ℝ) (n : ℕ) + (ha : 0 ≤ a 1) : + (stieltjesJacobiMatrix a c (n + 1)).submatrix Fin.succ Fin.succ = + stieltjesJacobiMatrix (fun k => a (k + 2)) (a 1) n := by + have hd : (fun k => Real.sqrt (a (2 * (k + 1)))) = + (fun k => Real.sqrt (a (2 * k + 2))) := by + funext k + congr 2 + have hs : (fun k => Real.sqrt (a (2 * (k + 1) + 1))) = + (fun k => Real.sqrt (a (2 * k + 1 + 2))) := by + funext k + congr 2 + ext i j + dsimp only [submatrix_apply, stieltjesJacobiMatrix] + rw [Matrix.add_apply, lowerBidiagonalFin_mul_transpose_succ_succ, Matrix.add_apply] + simp only [hd, hs, Nat.mul_zero, Nat.zero_add, Real.sq_sqrt ha] + by_cases hij : i = j + · subst j + by_cases hi : i = 0 <;> simp [hi] + · simp [hij, Fin.succ_inj] + aesop + +end Matrix diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/Countable.lean b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/Countable.lean new file mode 100644 index 000000000..52f9b211a --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/Countable.lean @@ -0,0 +1,63 @@ +/- +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.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +import Mathlib.MeasureTheory.Integral.Bochner.SumMeasure + +/-! +# Integrals on countable sets as convergent atomic sums + +These strengthen the countable-integral formulas to `HasSum`, so summability of +the atomic series is retained in subsequent arguments. +-/ + +public section + +namespace MeasureTheory + +variable {X E : Type*} [MeasurableSpace X] [MeasurableSingletonClass X] + [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + {μ : Measure X} {f : X → E} + +/-- The integral on a countable space is the sum of the weighted values at its +atoms, with convergence included. -/ +theorem hasSum_integral_countable [Countable X] (hf : Integrable f μ) : + HasSum (fun x => μ.real {x} • f x) (∫ x, f x ∂μ) := by + have hf' : Integrable f (Measure.sum fun x => μ {x} • Measure.dirac x) := by + rwa [Measure.sum_smul_dirac] + simpa only [integral_smul_measure, integral_dirac, Measure.sum_smul_dirac, + measureReal_def] using hasSum_integral_measure hf' + +/-- An integral over a countable set is the convergent sum over its atoms. -/ +theorem hasSum_setIntegral_countable (f : X → E) {s : Set X} (hs : s.Countable) + (hf : IntegrableOn f s μ) : + HasSum (fun x : s => μ.real {(x : X)} • f x) (∫ x in s, f x ∂μ) := by + have hi : Countable s := Set.countable_coe_iff.mpr hs + have hf' : Integrable (fun x : s => f x) (Measure.comap Subtype.val μ) := by + rw [IntegrableOn, ← map_comap_subtype_coe, integrable_map_measure] at hf + · exact hf + · exact hf.aestronglyMeasurable + · exact Measurable.aemeasurable measurable_subtype_coe + · exact hs.measurableSet + convert hasSum_integral_countable hf' using 1 + · ext x + rw [measureReal_def, measureReal_def, Measure.comap_apply Subtype.val + Subtype.coe_injective (fun t ht => MeasurableSet.subtype_image hs.measurableSet ht) + _ (MeasurableSet.singleton x)] + simp + · exact (integral_subtype_comap hs.measurableSet f).symm + +/-- A measure carried by a countable set integrates by a convergent sum of its +atomic weights times the values of the integrand. -/ +theorem hasSum_integral_of_ae_mem_countable {s : Set X} (hs : s.Countable) + (hμ : ∀ᵐ x ∂μ, x ∈ s) (hf : Integrable f μ) : + HasSum (fun x : s => μ.real {(x : X)} • f x) (∫ x, f x ∂μ) := by + simpa only [Measure.restrict_eq_self_of_ae_mem hμ] using + hasSum_setIntegral_countable f hs hf.integrableOn + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/CountableSupport.lean b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/CountableSupport.lean new file mode 100644 index 000000000..2c2b2dee6 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/CountableSupport.lean @@ -0,0 +1,40 @@ +/- +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.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.Countable + +/-! +# Atomic integral sums indexed by the ambient space + +A measure carried by a countable set has an integral expansion over all points +of the ambient space. Every summand off the carrying set is zero. This avoids +introducing an enumeration or a nonempty index assumption. +-/ + +public section + +namespace MeasureTheory + +/-- A measure carried by a countable set integrates by the sum of its atoms, +indexed over the whole ambient space. The ambient space need not be countable. -/ +theorem hasSum_integral_of_ae_mem_countable_ambient + {X E : Type*} [MeasurableSpace X] [MeasurableSingletonClass X] + [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + {mu : Measure X} {f : X → E} {s : Set X} (hs : s.Countable) + (hmu : ∀ᵐ x ∂mu, x ∈ s) (hf : Integrable f mu) : + HasSum (fun x : X ↦ mu.real {x} • f x) (∫ x, f x ∂mu) := by + have hsupp : Function.support (fun x : X ↦ mu.real {x} • f x) ⊆ s := by + intro x hx + by_contra hxs + have hmass : mu {x} = 0 := + measure_mono_null (Set.singleton_subset_iff.mpr hxs) (ae_iff.mp hmu) + exact hx (by simp [measureReal_def, hmass]) + exact (hasSum_subtype_iff_of_support_subset hsupp).mp + (hasSum_integral_of_ae_mem_countable hs hmu hf) + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/EvenMoments.lean b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/EvenMoments.lean new file mode 100644 index 000000000..7ca0d5eab --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/EvenMoments.lean @@ -0,0 +1,114 @@ +/- +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.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.MeasureTheory.Integral.Bochner.Set +import Mathlib.Tactic.Positivity.Finset +import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.StrictWeightedCovariance +import RealRooted.Mathlib.MeasureTheory.Integral.IntegralEqImproper.Power + +/-! +# Strict Turán inequalities for even moments + +The increasing logarithmic slope `-w' / (t * w)` gives strict Turán inequalities +for the even moments of a positive weight. This is the integral argument in +Csordas and Varga, *Moment Inequalities and the Riemann Hypothesis* (1988), +Proposition 2.2 and the first proof of Theorem 2.4. +-/ + +public section + +open Set Filter +open scoped Topology + +namespace MeasureTheory + +/-- The even moments of a real weight on the positive half-line. -/ +@[expose] noncomputable def evenMoment (w : ℝ → ℝ) (n : ℕ) : ℝ := + ∫ t in Ioi (0 : ℝ), t ^ (2 * n) * w t + +private theorem pow_mul_neg_div_mul {w w' : ℝ → ℝ} (k : ℕ) {t : ℝ} + (ht : t ≠ 0) (hw : w t ≠ 0) : + t ^ (k + 1) * w t * (-(w' t) / (t * w t)) = -t ^ k * w' t := by + rw [pow_succ] + field_simp [ht, hw] + +private theorem moment_times_square (w : ℝ → ℝ) (n : ℕ) (t : ℝ) : + (t ^ (2 * (n + 1)) * w t) * t ^ 2 = t ^ (2 * (n + 2)) * w t := by + rw [show 2 * (n + 2) = 2 * (n + 1) + 2 by lia, pow_add] + ring + +/-- Positive weights with increasing scaled logarithmic slope have strict even-moment +Turán inequalities. All polynomial moments and the derivative moments used in integration +by parts are integrable, and the weight decays faster than every natural power. -/ +theorem evenMoment_turan_lt_of_strictMonoOn {w w' : ℝ → ℝ} + (hcont : ContinuousAt w 0) (hpos : ∀ t ∈ Ioi (0 : ℝ), 0 < w t) + (hd : ∀ t ∈ Ioi (0 : ℝ), HasDerivAt w (w' t) t) + (hmono : StrictMonoOn (fun t => -(w' t) / (t * w t)) (Ioi (0 : ℝ))) + (hm : ∀ k : ℕ, IntegrableOn (fun t => t ^ k * w t) (Ioi (0 : ℝ))) + (hdm : ∀ k : ℕ, IntegrableOn (fun t => t ^ (k + 1) * w' t) (Ioi (0 : ℝ))) + (hlim : ∀ k : ℕ, Tendsto (fun t => t ^ k * w t) atTop (𝓝 0)) (n : ℕ) : + (2 * n + 1 : ℝ) * evenMoment w n * evenMoment w (n + 2) < + (2 * n + 3 : ℝ) * evenMoment w (n + 1) ^ 2 := by + let W (t : ℝ) := t ^ (2 * (n + 1)) * w t + let H (t : ℝ) := -(w' t) / (t * w t) + have hWH (t : ℝ) (ht : t ∈ Ioi (0 : ℝ)) : + W t * H t = -t ^ (2 * n + 1) * w' t := by + dsimp [W, H] + rw [show 2 * (n + 1) = (2 * n + 1) + 1 by lia] + exact pow_mul_neg_div_mul _ ht.ne' (hpos t ht).ne' + have hWsH (t : ℝ) (ht : t ∈ Ioi (0 : ℝ)) : + W t * t ^ 2 * H t = -t ^ (2 * n + 3) * w' t := by + rw [moment_times_square] + dsimp [H] + rw [show 2 * (n + 2) = (2 * n + 3) + 1 by lia] + exact pow_mul_neg_div_mul _ ht.ne' (hpos t ht).ne' + have hW : IntegrableOn W (Ioi (0 : ℝ)) := hm _ + have hWs : IntegrableOn (fun t => W t * t ^ 2) (Ioi (0 : ℝ)) := by + simpa only [W, moment_times_square] using hm (2 * (n + 2)) + have hWHint : IntegrableOn (fun t => W t * H t) (Ioi (0 : ℝ)) := by + apply ((hdm (2 * n)).neg).congr_fun _ measurableSet_Ioi + intro t ht + simpa only [Pi.neg_apply, neg_mul] using (hWH t ht).symm + have hWsHint : IntegrableOn (fun t => W t * t ^ 2 * H t) (Ioi (0 : ℝ)) := by + have hi := (hdm (2 * n + 2)).neg + apply hi.congr_fun _ measurableSet_Ioi + intro t ht + simpa only [Pi.neg_apply, show 2 * n + 2 + 1 = 2 * n + 3 by lia, neg_mul] + using (hWsH t ht).symm + have hs : StrictMonoOn (fun t : ℝ => t ^ 2) (Ioi (0 : ℝ)) := by + intro x hx y hy hxy + nlinarith [mul_pos (sub_pos.mpr hxy) (add_pos hx hy)] + have h := mul_integral_weighted_lt_of_strictMonoOn + (fun t ht => mul_pos (pow_pos ht _) (hpos t ht)) hs hmono hW hWs hWHint hWsHint + have hi₀ : (∫ t in Ioi (0 : ℝ), W t * H t) = + (2 * n + 1 : ℝ) * evenMoment w n := by + rw [setIntegral_congr_fun measurableSet_Ioi hWH] + simp_rw [neg_mul] + rw [integral_neg, integral_Ioi_pow_succ_mul_deriv_eq hcont hd (2 * n) (hm _) (hdm _) (hlim _)] + simp only [evenMoment, neg_mul, neg_neg, Nat.cast_add, Nat.cast_mul, + Nat.cast_ofNat, Nat.cast_one] + have hi₁ : (∫ t in Ioi (0 : ℝ), W t * t ^ 2 * H t) = + (2 * n + 3 : ℝ) * evenMoment w (n + 1) := by + rw [setIntegral_congr_fun measurableSet_Ioi hWsH] + simp_rw [neg_mul] + have hp := integral_Ioi_pow_succ_mul_deriv_eq hcont hd (2 * n + 2) (hm _) (hdm _) (hlim _) + rw [show 2 * n + 3 = (2 * n + 2) + 1 by lia, integral_neg, hp] + simp only [neg_mul, neg_neg, Nat.cast_add, Nat.cast_mul, Nat.cast_ofNat, Nat.cast_one] + rw [show 2 * n + 2 = 2 * (n + 1) by lia] + change (2 * (n : ℝ) + 2 + 1) * evenMoment w (n + 1) = _ + ring + have hi₂ : (∫ t in Ioi (0 : ℝ), W t * t ^ 2) = evenMoment w (n + 2) := by + simp only [W, moment_times_square, evenMoment] + rw [hi₀, hi₁, hi₂] at h + change evenMoment w (n + 2) * _ < evenMoment w (n + 1) * _ at h + nlinarith + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/LogConcaveMoments.lean b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/LogConcaveMoments.lean new file mode 100644 index 000000000..d1129b2fc --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/LogConcaveMoments.lean @@ -0,0 +1,42 @@ +/- +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 RealRooted.Mathlib.MeasureTheory.Integral.Bochner.EvenMoments +import Mathlib.Tactic.Positivity.Finset +import RealRooted.Mathlib.Analysis.Convex.LogSqrtSlope + +/-! +# Strict moment inequalities from log-concavity + +This is the general positive-kernel implication used by Csordas and Varga, +*Moment Inequalities and the Riemann Hypothesis* (1988), Theorem 2.4. +The application to the Riemann xi kernel requires its separate analytic kernel +and normalization theorems. +-/ + +public section + +open Set Filter Real +open scoped Topology + +namespace MeasureTheory + +/-- A positive rapidly decreasing weight whose logarithm is strictly concave after +square-root substitution satisfies every strict quadratic even-moment inequality. -/ +theorem evenMoment_turan_lt_of_strictConcaveOn {w w' : ℝ → ℝ} + (hcont : ContinuousAt w 0) (hpos : ∀ t ∈ Ioi (0 : ℝ), 0 < w t) + (hd : ∀ t ∈ Ioi (0 : ℝ), HasDerivAt w (w' t) t) + (hc : StrictConcaveOn ℝ (Ioi (0 : ℝ)) (fun u => log (w (sqrt u)))) + (hm : ∀ k : ℕ, IntegrableOn (fun t => t ^ k * w t) (Ioi (0 : ℝ))) + (hdm : ∀ k : ℕ, IntegrableOn (fun t => t ^ (k + 1) * w' t) (Ioi (0 : ℝ))) + (hlim : ∀ k : ℕ, Tendsto (fun t => t ^ k * w t) atTop (𝓝 0)) (n : ℕ) : + (2 * n + 1 : ℝ) * evenMoment w n * evenMoment w (n + 2) < + (2 * n + 3 : ℝ) * evenMoment w (n + 1) ^ 2 := + evenMoment_turan_lt_of_strictMonoOn hcont hpos hd + (hc.strictMonoOn_neg_deriv_div_mul hpos hd) hm hdm hlim n + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/PowerSum.lean b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/PowerSum.lean new file mode 100644 index 000000000..dbf5b1a85 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/PowerSum.lean @@ -0,0 +1,108 @@ +/- +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.MeasureTheory.Integral.Bochner.Basic + +import Mathlib.MeasureTheory.Integral.Bochner.SumMeasure +import Mathlib.Analysis.Asymptotics.Lemmas +import Mathlib.Analysis.Normed.Module.FiniteDimension + +/-! +# Positive atomic measures for power sums + +A summable nonnegative sequence supplies a finite positive measure with compact +support. Adding a mass at zero gives the measure occurring in logarithmic +derivative moment representations of Type-I entire functions. +-/ + +public section + +open Filter Topology MeasureTheory + +namespace MeasureTheory + +/-- Positive powers of a summable real sequence remain summable. -/ +private theorem summable_mul_self_pow {a : ℕ → ℝ} (ha : Summable a) (k : ℕ) : + Summable (fun i => a i * a i ^ k) := + ha.norm.mul_tendsto_const (ha.tendsto_cofinite_zero.pow k) + +/-- The discrete measure with mass `a i` at the nonnegative point `a i` +has finite moments whenever the sequence is summable. -/ +theorem integrable_pow_sum_smul_dirac {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (k : ℕ) : + Integrable (fun x : ℝ => x ^ k) + (Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i))) := by + apply integrable_sum_dirac (fun _ => ENNReal.ofReal_ne_top) + simpa only [ENNReal.toReal_ofReal (ha _), Real.norm_eq_abs, + abs_of_nonneg (pow_nonneg (ha _) _)] using summable_mul_self_pow hs k + +/-- The discrete measure weighted by a summable nonnegative sequence is finite. -/ +theorem isFiniteMeasure_sum_smul_dirac {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) : + IsFiniteMeasure (Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i))) := by + exact (integrable_const_iff_isFiniteMeasure (by norm_num : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using integrable_pow_sum_smul_dirac ha hs 0) + +/-- The moments of the weighted atomic measure are the next power sums. -/ +theorem integral_pow_sum_smul_dirac {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (k : ℕ) : + (∫ x : ℝ, x ^ k ∂Measure.sum + (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i))) = + ∑' i, a i ^ (k + 1) := by + rw [integral_sum_dirac (fun _ => ENNReal.ofReal_ne_top)] + apply tsum_congr + intro i + simp only [ENNReal.toReal_ofReal (ha i), smul_eq_mul, pow_succ] + ring + +/-- All atoms lie in the compact interval from zero to the sum of their masses. -/ +theorem sum_smul_dirac_compl_Icc_eq_zero {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) : + (Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i))) + (Set.Icc 0 (∑' i, a i))ᶜ = 0 := by + rw [Measure.sum_apply _ measurableSet_Icc.compl] + apply tsum_eq_zero_iff.mpr + intro i + have hi : a i ∈ Set.Icc 0 (∑' j, a j) := + ⟨ha i, hs.le_tsum i (fun j _ => ha j)⟩ + simp [Measure.dirac_apply', measurableSet_Icc, hi] + + +/-- Nonnegative summable atoms, with an optional mass at zero, give a compactly +supported positive measure with all moments equal to the corresponding power sums. -/ +theorem exists_measure_power_sum_moments {a : ℕ → ℝ} {gamma : ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (hg : 0 ≤ gamma) : + ∃ mu : Measure ℝ, + mu = ENNReal.ofReal gamma • Measure.dirac 0 + + Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)) ∧ + IsFiniteMeasure mu ∧ mu (Set.Icc 0 (∑' i, a i))ᶜ = 0 ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (∫ x : ℝ, x ^ k ∂mu) = gamma * 0 ^ k + ∑' i, a i ^ (k + 1) := by + let nu := Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)) + let mu : Measure ℝ := ENNReal.ofReal gamma • Measure.dirac 0 + nu + have hfirst (k : ℕ) : + Integrable (fun x : ℝ => x ^ k) (ENNReal.ofReal gamma • Measure.dirac 0) := + (integrable_dirac (by simp)).smul_measure ENNReal.ofReal_ne_top + have hsecond (k : ℕ) : Integrable (fun x : ℝ => x ^ k) nu := + integrable_pow_sum_smul_dirac ha hs k + have hint (k : ℕ) : Integrable (fun x : ℝ => x ^ k) mu := + (hfirst k).add_measure (hsecond k) + have hfinite : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (by norm_num : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hint 0) + refine ⟨mu, rfl, hfinite, ?_, fun k => ⟨hint k, ?_⟩⟩ + · have hzero : (0 : ℝ) ∈ Set.Icc 0 (∑' i, a i) := ⟨le_rfl, tsum_nonneg ha⟩ + dsimp only [mu, nu] + rw [add_apply, sum_smul_dirac_compl_Icc_eq_zero ha hs, add_zero] + simp [Measure.dirac_apply', measurableSet_Icc, hzero] + · change (∫ x : ℝ, x ^ k ∂(ENNReal.ofReal gamma • Measure.dirac 0 + nu)) = _ + rw [integral_add_measure (hfirst k) (hsecond k), integral_smul_measure, integral_dirac, + ENNReal.toReal_ofReal hg] + rw [show (∫ x : ℝ, x ^ k ∂nu) = ∑' i, a i ^ (k + 1) from + integral_pow_sum_smul_dirac ha k] + rfl + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/StrictWeightedCovariance.lean b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/StrictWeightedCovariance.lean new file mode 100644 index 000000000..caa42c7e1 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/StrictWeightedCovariance.lean @@ -0,0 +1,90 @@ +/- +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.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.WeightedCovariance + +/-! +# Strict covariance for increasing functions on a half-line + +A positive weight and two strictly increasing functions give a strictly positive +covariance. The integrability hypotheses are exactly those needed by the +symmetrized integral identity. +-/ + +public section + +open Set + +namespace MeasureTheory + +private theorem sub_mul_sub_nonneg {a : ℝ} {f g : ℝ → ℝ} + (hf : MonotoneOn f (Ioi a)) (hg : MonotoneOn g (Ioi a)) + {x y : ℝ} (hx : x ∈ Ioi a) (hy : y ∈ Ioi a) : + 0 ≤ (f y - f x) * (g y - g x) := by + rcases le_total x y with hxy | hyx + · exact mul_nonneg (sub_nonneg.mpr (hf hx hy hxy)) + (sub_nonneg.mpr (hg hx hy hxy)) + · exact mul_nonneg_of_nonpos_of_nonpos (sub_nonpos.mpr (hf hy hx hyx)) + (sub_nonpos.mpr (hg hy hx hyx)) + +private theorem restrict_volume_Ioo_pos {a b c : ℝ} (hab : a ≤ b) (hbc : b < c) : + 0 < volume.restrict (Ioi a) (Ioo b c) := by + have hs : Ioo b c ⊆ Ioi a := fun _ hx => hab.trans_lt hx.1 + rw [Measure.restrict_apply measurableSet_Ioo, inter_eq_left.mpr hs] + exact isOpen_Ioo.measure_pos volume (nonempty_Ioo.mpr hbc) + +/-- Strictly increasing functions have a positive weighted covariance on a half-line. -/ +theorem mul_integral_weighted_lt_of_strictMonoOn {a : ℝ} {w f g : ℝ → ℝ} + (hwpos : ∀ x ∈ Ioi a, 0 < w x) + (hf : StrictMonoOn f (Ioi a)) (hg : StrictMonoOn g (Ioi a)) + (hw : IntegrableOn w (Ioi a)) + (hwf : IntegrableOn (fun x => w x * f x) (Ioi a)) + (hwg : IntegrableOn (fun x => w x * g x) (Ioi a)) + (hwfg : IntegrableOn (fun x => w x * f x * g x) (Ioi a)) : + (∫ x in Ioi a, w x * f x) * (∫ x in Ioi a, w x * g x) < + (∫ x in Ioi a, w x) * (∫ x in Ioi a, w x * f x * g x) := by + let μ := volume.restrict (Ioi a) + let K (z : ℝ × ℝ) := w z.1 * w z.2 * (f z.2 - f z.1) * (g z.2 - g z.1) + have hi : Integrable K (μ.prod μ) := + integrable_weight_mul_sub_mul_sub hw hwf hwg hwfg + have hmem : ∀ᵐ z : ℝ × ℝ ∂μ.prod μ, z ∈ Ioi a ×ˢ Ioi a := by + dsimp [μ] + rw [Measure.prod_restrict] + exact ae_restrict_mem (measurableSet_Ioi.prod measurableSet_Ioi) + have hn : 0 ≤ᵐ[μ.prod μ] K := by + filter_upwards [hmem] with z hz + dsimp [K] + simpa only [mul_assoc] using mul_nonneg (hwpos z.1 hz.1).le + (mul_nonneg (hwpos z.2 hz.2).le + (sub_mul_sub_nonneg hf.monotoneOn hg.monotoneOn hz.1 hz.2)) + have hs : Ioo (a + 1) (a + 2) ×ˢ Ioo (a + 3) (a + 4) ⊆ Function.support K := by + rintro ⟨x, y⟩ ⟨hx, hy⟩ + have hx' : x ∈ Ioi a := by + change a < x + linarith [hx.1] + have hy' : y ∈ Ioi a := by + change a < y + linarith [hy.1] + have hxy : x < y := by linarith [hx.2, hy.1] + exact (mul_pos (mul_pos (mul_pos (hwpos x hx') (hwpos y hy')) + (sub_pos.mpr (hf hx' hy' hxy))) (sub_pos.mpr (hg hx' hy' hxy))).ne' + have hspos : 0 < μ.prod μ (Ioo (a + 1) (a + 2) ×ˢ Ioo (a + 3) (a + 4)) := by + rw [Measure.prod_prod] + exact pos_iff_ne_zero.mpr (mul_ne_zero + (restrict_volume_Ioo_pos (by linarith) (by linarith)).ne' + (restrict_volume_Ioo_pos (by linarith) (by linarith)).ne') + have hk : 0 < ∫ z, K z ∂μ.prod μ := + (integral_pos_iff_support_of_nonneg_ae hn hi).mpr (hspos.trans_le (measure_mono hs)) + have he := integral_weight_mul_sub_mul_sub hw hwf hwg hwfg + change (∫ z, K z ∂μ.prod μ) = _ at he + rw [he] at hk + linarith + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/WeightedCovariance.lean b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/WeightedCovariance.lean new file mode 100644 index 000000000..768041b53 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/Bochner/WeightedCovariance.lean @@ -0,0 +1,80 @@ +/- +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.InnerProductSpace.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.MeasureTheory.Integral.Prod +import Mathlib.Tactic.TypeStar + +/-! +# A weighted covariance identity + +The symmetrized double integral is expressed using four ordinary integrals. +The weight and the two functions may be real or complex, with no positivity +hypotheses. +-/ + +public section + +open MeasureTheory + +namespace MeasureTheory + +variable {α 𝕜 : Type*} [RCLike 𝕜] {w f g : α → 𝕜} + +private theorem weight_mul_sub_mul_sub_eq (x y : α) : + w x * w y * (f y - f x) * (g y - g x) = + w x * (w y * f y * g y) - (w x * f x) * (w y * g y) - + (w x * g x) * (w y * f y) + (w x * f x * g x) * w y := by + ring + +variable [MeasurableSpace α] {μ : Measure α} + +/-- Four weighted integrability hypotheses suffice for the covariance kernel. -/ +theorem integrable_weight_mul_sub_mul_sub + (hw : Integrable w μ) (hwf : Integrable (fun x => w x * f x) μ) + (hwg : Integrable (fun x => w x * g x) μ) + (hwfg : Integrable (fun x => w x * f x * g x) μ) : + Integrable (fun z : α × α => w z.1 * w z.2 * (f z.2 - f z.1) * + (g z.2 - g z.1)) (μ.prod μ) := by + have h := (((hw.mul_prod hwfg).sub (hwf.mul_prod hwg)).sub + (hwg.mul_prod hwf)).add (hwfg.mul_prod hw) + convert h using 1 + funext z + exact weight_mul_sub_mul_sub_eq z.1 z.2 + +variable [SFinite μ] + +/-- The weighted covariance equals half its symmetrized double integral. -/ +theorem integral_weight_mul_sub_mul_sub + (hw : Integrable w μ) (hwf : Integrable (fun x => w x * f x) μ) + (hwg : Integrable (fun x => w x * g x) μ) + (hwfg : Integrable (fun x => w x * f x * g x) μ) : + (∫ z : α × α, w z.1 * w z.2 * (f z.2 - f z.1) * + (g z.2 - g z.1) ∂μ.prod μ) = + 2 * ((∫ x, w x ∂μ) * (∫ x, w x * f x * g x ∂μ) - + (∫ x, w x * f x ∂μ) * (∫ x, w x * g x ∂μ)) := by + simp_rw [weight_mul_sub_mul_sub_eq] + have hsub : Integrable (fun z : α × α => + w z.1 * (w z.2 * f z.2 * g z.2) - + (w z.1 * f z.1) * (w z.2 * g z.2)) (μ.prod μ) := by + simpa only [Pi.sub_def] using (hw.mul_prod hwfg).sub (hwf.mul_prod hwg) + have hsub₂ : Integrable (fun z : α × α => + w z.1 * (w z.2 * f z.2 * g z.2) - + (w z.1 * f z.1) * (w z.2 * g z.2) - + (w z.1 * g z.1) * (w z.2 * f z.2)) (μ.prod μ) := by + simpa only [Pi.sub_def] using hsub.sub (hwg.mul_prod hwf) + rw [integral_add hsub₂ (hwfg.mul_prod hw), + integral_sub hsub (hwg.mul_prod hwf), + integral_sub (hw.mul_prod hwfg) (hwf.mul_prod hwg)] + rw [integral_prod_mul w (fun x => w x * f x * g x), + integral_prod_mul (fun x => w x * f x) (fun x => w x * g x), + integral_prod_mul (fun x => w x * g x) (fun x => w x * f x), + integral_prod_mul (fun x => w x * f x * g x) w] + ring + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/Hankel.lean b/RealRooted/Mathlib/MeasureTheory/Integral/Hankel.lean new file mode 100644 index 000000000..9025594ec --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/Hankel.lean @@ -0,0 +1,40 @@ +/- +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.LinearAlgebra.Matrix.PosDef +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.HankelSupport + +/-! +# Strict positivity of Hankel moment matrices + +A nonnegative measure with all polynomial moments and infinitely many +positive atoms gives positive definite Hankel matrices at every natural shift. +A nonzero polynomial cannot vanish at all those atoms, so its weighted square +has strictly positive integral. +-/ + +public section + +open MeasureTheory Polynomial + +namespace MeasureTheory + +/-- Infinitely many positive atoms force strict positivity of every shifted +Hankel moment matrix, including the empty matrix and shift zero. -/ +theorem posDef_integral_pow_hankel_of_infinite_atoms + {mu : Measure ℝ} (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hinf : Set.Infinite {x : ℝ | 0 < x ∧ 0 < mu {x}}) (n r : ℕ) : + Matrix.PosDef (fun i j : Fin n => ∫ x : ℝ, x ^ (i.val + j.val + r) ∂mu) := by + have hfinite (S : Set ℝ) (hS : S.Finite) : mu Sᶜ ≠ 0 := by + obtain ⟨x, hx, hxS⟩ := (hinf.sdiff hS).nonempty + exact ne_of_gt (hx.2.trans_le + (measure_mono (Set.singleton_subset_iff.mpr hxS))) + exact posDef_integral_pow_hankel_of_no_finite_carrier hmom hpos hfinite n r + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/HankelSupport.lean b/RealRooted/Mathlib/MeasureTheory/Integral/HankelSupport.lean new file mode 100644 index 000000000..80527735c --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/HankelSupport.lean @@ -0,0 +1,66 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.PolynomialMoment + +/-! +# Strict Hankel positivity without a finite carrying set + +A measure on the nonnegative half-line that is not carried by any finite +set makes every nonzero polynomial square, weighted by any natural power, +have strictly positive integral. This includes continuous and singular +measures, without requiring any atoms. +-/ + +public section + +open Polynomial + +namespace MeasureTheory + +/-- A nonnegative measure not carried by a finite set gives a positive integral +to each nonzero polynomial square weighted by a natural power. -/ +theorem integral_weighted_eval_sq_pos_of_no_finite_carrier + {mu : Measure ℝ} (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hfinite : ∀ S : Set ℝ, S.Finite → mu Sᶜ ≠ 0) + {p : ℝ[X]} (hp : p ≠ 0) (r : ℕ) : + 0 < ∫ x : ℝ, x ^ r * p.eval x ^ 2 ∂mu := by + have hint : Integrable (fun x : ℝ => x ^ r * p.eval x ^ 2) mu := by + apply (integrable_pow_mul_polynomial_eval hmom r (p ^ 2)).congr + filter_upwards [] with x + simp only [Polynomial.eval_pow] + have hnonneg : ∀ᵐ x ∂mu, 0 ≤ x ^ r * p.eval x ^ 2 := + hpos.mono fun x hx => mul_nonneg (pow_nonneg hx r) (sq_nonneg _) + apply lt_of_le_of_ne (integral_nonneg_of_ae hnonneg) + intro hz + have hzero := (integral_eq_zero_iff_of_nonneg_ae hnonneg hint).mp hz.symm + let S : Set ℝ := {0} ∪ {x | p.IsRoot x} + have hS : S.Finite := (Set.finite_singleton 0).union (finite_setOfPred_isRoot hp) + apply hfinite S hS + apply ae_iff.mp + filter_upwards [hzero] with x hx + rcases mul_eq_zero.mp hx with hx | hx + · exact Or.inl (by simpa only [Set.mem_singleton_iff] using eq_zero_of_pow_eq_zero hx) + · exact Or.inr (eq_zero_of_pow_eq_zero hx) + +/-- A nonnegative all-moments measure without a finite carrying set gives +positive definite Hankel matrices at every size and natural shift. -/ +theorem posDef_integral_pow_hankel_of_no_finite_carrier + {mu : Measure ℝ} (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hfinite : ∀ S : Set ℝ, S.Finite → mu Sᶜ ≠ 0) (n r : ℕ) : + (momentHankelMatrix (fun k => ∫ x : ℝ, x ^ (k + r) ∂mu) n).PosDef := by + apply momentHankelMatrix_posDef_of_pos + intro p hp _ + rw [momentPairing, momentFunctional_integral_pow_add hmom] + simpa only [Polynomial.eval_mul, pow_two] using + integral_weighted_eval_sq_pos_of_no_finite_carrier hmom hpos hfinite hp r + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/IntegralEqImproper/Power.lean b/RealRooted/Mathlib/MeasureTheory/Integral/IntegralEqImproper/Power.lean new file mode 100644 index 000000000..32e968387 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/IntegralEqImproper/Power.lean @@ -0,0 +1,48 @@ +/- +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.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.Analysis.Calculus.Deriv.Pow +import Mathlib.MeasureTheory.Integral.IntegralEqImproper + +/-! +# Integration by parts for polynomial weights on the positive half-line +-/ + +public section + +open Set Filter +open scoped Topology + +namespace MeasureTheory + +/-- Integration by parts for a positive power, with both improper boundary values justified. -/ +theorem integral_Ioi_pow_succ_mul_deriv_eq {w w' : ℝ → ℝ} + (hcont : ContinuousAt w 0) + (hd : ∀ t ∈ Ioi (0 : ℝ), HasDerivAt w (w' t) t) (k : ℕ) + (hw : IntegrableOn (fun t => t ^ k * w t) (Ioi (0 : ℝ))) + (hw' : IntegrableOn (fun t => t ^ (k + 1) * w' t) (Ioi (0 : ℝ))) + (hlim : Tendsto (fun t => t ^ (k + 1) * w t) atTop (𝓝 0)) : + (∫ t in Ioi (0 : ℝ), t ^ (k + 1) * w' t) = + -((k + 1 : ℕ) : ℝ) * ∫ t in Ioi (0 : ℝ), t ^ k * w t := by + have hu (t : ℝ) (_ht : t ∈ Ioi (0 : ℝ)) : + HasDerivAt (fun u : ℝ => u ^ (k + 1)) (((k + 1 : ℕ) : ℝ) * t ^ k) t := by + simpa only [Nat.add_sub_cancel] using hasDerivAt_pow (k + 1) t + have hi : IntegrableOn + (fun t => (((k + 1 : ℕ) : ℝ) * t ^ k) * w t) (Ioi (0 : ℝ)) := by + simpa only [IntegrableOn, mul_assoc] using hw.const_mul ((k + 1 : ℕ) : ℝ) + have hz : Tendsto (fun t => t ^ (k + 1) * w t) (𝓝[>] (0 : ℝ)) (𝓝 0) := by + have hc : ContinuousAt (fun t : ℝ => t ^ (k + 1) * w t) 0 := + (continuousAt_id.pow _).mul hcont + simpa using hc.tendsto.mono_left nhdsWithin_le_nhds + have h := integral_Ioi_mul_deriv_eq_deriv_mul hu hd hw' hi hz hlim + simpa only [zero_sub, sub_zero, mul_assoc, integral_const_mul, neg_mul] using h + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/ContinuousTests.lean b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/ContinuousTests.lean new file mode 100644 index 000000000..b5d4669e3 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/ContinuousTests.lean @@ -0,0 +1,165 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Algebra.Polynomial.Eval.Defs +import Mathlib.Topology.ContinuousMap.Weierstrass +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +/-! +# Continuous tests from finite atomic moment convergence + +For finite weighted sums supported on `[0, 1]`, convergence of all monomial +moments to uniform moments implies convergence against every continuous test +function when the total variation is eventually bounded. For nonnegative +weights the zeroth-moment convergence supplies that bound automatically. +-/ + +public section + +open MeasureTheory Filter +open scoped Topology Polynomial + +namespace Finset + +variable {ι κ : Type*} {l : Filter κ} + +/-- Convergence of monomial moments implies convergence of every polynomial test. -/ +theorem tendsto_sum_mul_eval_of_tendsto_sum_mul_pow + (s : κ → Finset ι) (r w : κ → ι → ℝ) + (hmom : ∀ k : ℕ, Tendsto (fun j ↦ ∑ i ∈ s j, w j i * r j i ^ k) + l (𝓝 (1 / ((k : ℝ) + 1)))) (p : ℝ[X]) : + Tendsto (fun j ↦ ∑ i ∈ s j, w j i * p.eval (r j i)) + l (𝓝 (∫ t in (0 : ℝ)..1, p.eval t)) := by + induction p using Polynomial.induction_on' with + | add p q hp hq => + have heq (j : κ) : (∑ i ∈ s j, w j i * (p + q).eval (r j i)) = + (∑ i ∈ s j, w j i * p.eval (r j i)) + ∑ i ∈ s j, w j i * q.eval (r j i) := by + simp only [Polynomial.eval_add, mul_add, Finset.sum_add_distrib] + simp_rw [heq] + have hint : (∫ t in (0 : ℝ)..1, (p + q).eval t) = + (∫ t in (0 : ℝ)..1, p.eval t) + ∫ t in (0 : ℝ)..1, q.eval t := by + simp only [Polynomial.eval_add] + exact intervalIntegral.integral_add (p.continuous.intervalIntegrable 0 1) + (q.continuous.intervalIntegrable 0 1) + rw [hint] + exact hp.add hq + | monomial n c => + have heq (j : κ) : (∑ i ∈ s j, w j i * (Polynomial.monomial n c).eval (r j i)) = + c * ∑ i ∈ s j, w j i * r j i ^ n := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [Polynomial.eval_monomial] + ring + have hint : (∫ t in (0 : ℝ)..1, (Polynomial.monomial n c).eval t) = + c * (1 / ((n : ℝ) + 1)) := by + simp only [Polynomial.eval_monomial] + rw [intervalIntegral.integral_const_mul, integral_pow] + simp only [one_pow, zero_pow (Nat.succ_ne_zero n), sub_zero] + simp_rw [heq] + rw [hint] + exact (hmom n).const_mul c + +private theorem abs_sum_mul_sub_le (s : Finset ι) (w f g : ι → ℝ) {ε : ℝ} + (h : ∀ i ∈ s, |f i - g i| ≤ ε) : + |(∑ i ∈ s, w i * f i) - ∑ i ∈ s, w i * g i| ≤ ε * ∑ i ∈ s, |w i| := by + rw [← Finset.sum_sub_distrib] + calc + _ ≤ ∑ i ∈ s, |w i * f i - w i * g i| := abs_sum_le_sum_abs _ _ + _ = ∑ i ∈ s, |w i| * |f i - g i| := by simp_rw [← mul_sub, abs_mul] + _ ≤ ∑ i ∈ s, |w i| * ε := + Finset.sum_le_sum fun i hi ↦ mul_le_mul_of_nonneg_left (h i hi) (abs_nonneg _) + _ = ε * ∑ i ∈ s, |w i| := by rw [← Finset.sum_mul, mul_comm] + +private theorem abs_integral_eval_sub_le {f : ℝ → ℝ} + (hf : ContinuousOn f (Set.Icc (0 : ℝ) 1)) (p : ℝ[X]) {ε : ℝ} + (hp : ∀ t ∈ Set.Icc (0 : ℝ) 1, |p.eval t - f t| ≤ ε) : + |(∫ t in (0 : ℝ)..1, p.eval t) - ∫ t in (0 : ℝ)..1, f t| ≤ ε := by + rw [← intervalIntegral.integral_sub (p.continuous.intervalIntegrable 0 1) + (hf.intervalIntegrable_of_Icc zero_le_one)] + have h := intervalIntegral.norm_integral_le_of_norm_le_const + (a := (0 : ℝ)) (b := 1) (f := fun t ↦ p.eval t - f t) (C := ε) (by + intro t ht + have ht' : t ∈ Set.Icc (0 : ℝ) 1 := by + exact Set.Ioc_subset_Icc_self (by simpa only [Set.uIoc_of_le zero_le_one] using ht) + simpa only [Real.norm_eq_abs] using hp t ht') + simpa only [Real.norm_eq_abs, sub_zero, abs_one, mul_one] using h + +/-- Moment convergence gives convergence against continuous tests when the finite atomic +sums are supported on `[0, 1]` and their total variation is eventually bounded. +This version permits signed weights. -/ +theorem tendsto_sum_mul_of_moments_of_abs_sum_le + (s : κ → Finset ι) (r w : κ → ι → ℝ) + (hr : ∀ᶠ j in l, ∀ i ∈ s j, r j i ∈ Set.Icc (0 : ℝ) 1) + {M : ℝ} (hM : ∀ᶠ j in l, ∑ i ∈ s j, |w j i| ≤ M) + (hmom : ∀ k : ℕ, Tendsto (fun j ↦ ∑ i ∈ s j, w j i * r j i ^ k) + l (𝓝 (1 / ((k : ℝ) + 1)))) + {f : ℝ → ℝ} (hf : ContinuousOn f (Set.Icc (0 : ℝ) 1)) : + Tendsto (fun j ↦ ∑ i ∈ s j, w j i * f (r j i)) + l (𝓝 (∫ t in (0 : ℝ)..1, f t)) := by + rw [Metric.tendsto_nhds] + intro ε hε + let η := ε / (4 * (|M| + 1)) + have hη : 0 < η := by dsimp [η]; positivity + have hηmul : η * (|M| + 1) = ε / 4 := by + dsimp [η] + have hM1 : |M| + 1 ≠ 0 := by positivity + field_simp [hM1] + obtain ⟨p, hp⟩ := exists_polynomial_near_of_continuousOn 0 1 f hf η hη + have hpoly := tendsto_sum_mul_eval_of_tendsto_sum_mul_pow s r w hmom p + have hclose := (Metric.tendsto_nhds.mp hpoly) (ε / 2) (by positivity) + have hint := abs_integral_eval_sub_le hf p (fun t ht ↦ (hp t ht).le) + filter_upwards [hr, hM, hclose] with j hj hmass hjpoly + rw [Real.dist_eq] at hjpoly ⊢ + have hsum : |(∑ i ∈ s j, w j i * f (r j i)) - + ∑ i ∈ s j, w j i * p.eval (r j i)| ≤ η * |M| := by + calc + _ ≤ η * ∑ i ∈ s j, |w j i| := abs_sum_mul_sub_le (s j) (w j) + (fun i ↦ f (r j i)) (fun i ↦ p.eval (r j i)) (by + intro i hi + simpa only [abs_sub_comm] using (hp (r j i) (hj i hi)).le) + _ ≤ η * M := mul_le_mul_of_nonneg_left hmass hη.le + _ ≤ η * |M| := mul_le_mul_of_nonneg_left (le_abs_self M) hη.le + calc + _ ≤ |(∑ i ∈ s j, w j i * f (r j i)) - ∑ i ∈ s j, w j i * p.eval (r j i)| + + |(∑ i ∈ s j, w j i * p.eval (r j i)) - ∫ t in (0 : ℝ)..1, f t| := abs_sub_le _ _ _ + _ ≤ |(∑ i ∈ s j, w j i * f (r j i)) - ∑ i ∈ s j, w j i * p.eval (r j i)| + + (|(∑ i ∈ s j, w j i * p.eval (r j i)) - ∫ t in (0 : ℝ)..1, p.eval t| + + |(∫ t in (0 : ℝ)..1, p.eval t) - ∫ t in (0 : ℝ)..1, f t|) := + add_le_add le_rfl (abs_sub_le _ _ _) + _ < η * |M| + (ε / 2 + η) := + add_lt_add_of_le_of_lt hsum (add_lt_add_of_lt_of_le hjpoly hint) + _ < ε := by nlinarith + +/-- For nonnegative finite atomic weights on `[0, 1]`, convergence of every monomial moment +to its uniform value implies convergence against every continuous test function. +The zeroth-moment limit supplies the eventual total-mass bound. -/ +theorem tendsto_sum_mul_of_tendsto_sum_mul_pow + (s : κ → Finset ι) (r w : κ → ι → ℝ) + (hr : ∀ᶠ j in l, ∀ i ∈ s j, r j i ∈ Set.Icc (0 : ℝ) 1) + (hw : ∀ᶠ j in l, ∀ i ∈ s j, 0 ≤ w j i) + (hmom : ∀ k : ℕ, Tendsto (fun j ↦ ∑ i ∈ s j, w j i * r j i ^ k) + l (𝓝 (1 / ((k : ℝ) + 1)))) + {f : ℝ → ℝ} (hf : ContinuousOn f (Set.Icc (0 : ℝ) 1)) : + Tendsto (fun j ↦ ∑ i ∈ s j, w j i * f (r j i)) + l (𝓝 (∫ t in (0 : ℝ)..1, f t)) := by + have hmass : Tendsto (fun j ↦ ∑ i ∈ s j, w j i) l (𝓝 (1 : ℝ)) := by + simpa only [pow_zero, mul_one, Nat.cast_zero, zero_add, div_one] using hmom 0 + have hupper : ∀ᶠ j in l, (∑ i ∈ s j, w j i) < (2 : ℝ) := + hmass.eventually (gt_mem_nhds (by norm_num : (1 : ℝ) < 2)) + have hvariation : ∀ᶠ j in l, ∑ i ∈ s j, |w j i| ≤ (2 : ℝ) := by + filter_upwards [hw, hupper] with j hj hbound + calc + _ = ∑ i ∈ s j, w j i := Finset.sum_congr rfl fun i hi ↦ abs_of_nonneg (hj i hi) + _ ≤ 2 := hbound.le + exact tendsto_sum_mul_of_moments_of_abs_sum_le s r w hr hvariation hmom hf + +end Finset diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeBeta.lean b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeBeta.lean new file mode 100644 index 000000000..e845faf26 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeBeta.lean @@ -0,0 +1,50 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeDerivative +import RealRooted.Mathlib.Analysis.SpecialFunctions.Gamma.BetaVariation +import Mathlib.Analysis.SpecialFunctions.Pow.Continuity +import Mathlib.Tactic.Linarith + +/-! +# Beta-weighted error from finite cumulative discrepancy + +For nonnegative exponents, the integration error against `t^a (1-t)^b` is at +most twice the cumulative discrepancy. The weights may be signed, and nodes +at both endpoints are included. This quantitative result uses an integrable +interior derivative, not a continuous derivative at the endpoints. +-/ + +public section + +namespace Finset + +variable {ι : Type*} + +/-- Finite cumulative discrepancy bounds every beta-weighted sum with nonnegative exponents. +The constant two is uniform in both exponents. Signed weights and repeated nodes are allowed. -/ +theorem abs_sum_beta_weight_sub_le_of_cumulative_bound (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {δ : ℝ} + (hδ : ∀ t ∈ Set.Icc (0 : ℝ) 1, + |(∑ i ∈ s, if r i ≤ t then w i else 0) - t| ≤ δ) + {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + |(∑ i ∈ s, w i * (r i ^ a * (1 - r i) ^ b)) - + ∫ t in (0 : ℝ)..1, t ^ a * (1 - t) ^ b| ≤ 2 * δ := by + obtain ⟨g, hg, hderiv, hvariation⟩ := + Real.exists_integrable_deriv_rpow_mul_one_sub_rpow ha hb + have hcont : Continuous (fun t : ℝ ↦ t ^ a * (1 - t) ^ b) := + (Real.continuous_rpow_const ha).mul + ((Real.continuous_rpow_const hb).comp (continuous_const.sub continuous_id)) + have hδ0 : 0 ≤ δ := (abs_nonneg _).trans (hδ 1 ⟨zero_le_one, le_rfl⟩) + calc + _ ≤ δ * (|(1 : ℝ) ^ a * (1 - 1) ^ b| + ∫ t in (0 : ℝ)..1, |g t|) := + abs_sum_mul_sub_integral_le_of_cumulative_bound s r w hr hδ hcont.continuousOn hderiv hg + _ ≤ δ * 2 := mul_le_mul_of_nonneg_left hvariation hδ0 + _ = 2 * δ := mul_comm _ _ + +end Finset diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeDerivative.lean b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeDerivative.lean new file mode 100644 index 000000000..40a9b6472 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeDerivative.lean @@ -0,0 +1,131 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeIntegral +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeMoments +import Mathlib.MeasureTheory.Integral.IntervalIntegral.IntegrationByParts +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Finite cumulative discrepancy and integrable derivatives + +Continuous endpoint values, derivatives on the open interval, and integrability +of the derivative suffice for summation by parts. No endpoint differentiability +or continuous-derivative hypothesis is required. +-/ + +public section + +open MeasureTheory + +namespace Finset + +variable {ι : Type*} + +private theorem integral_tail_eq_sub {f g : ℝ → ℝ} + (hf : ContinuousOn f (Set.Icc (0 : ℝ) 1)) + (hfg : ∀ t ∈ Set.Ioo (0 : ℝ) 1, HasDerivAt f (g t) t) + (hg : IntervalIntegrable g volume 0 1) {a : ℝ} (ha : a ∈ Set.Icc (0 : ℝ) 1) : + (∫ t in a..1, g t) = f 1 - f a := by + apply intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le ha.2 + · exact hf.mono (Set.Icc_subset_Icc ha.1 le_rfl) + · intro t ht + exact hfg t ⟨lt_of_le_of_lt ha.1 ht.1, ht.2⟩ + · apply hg.mono_set + rw [Set.uIcc_of_le ha.2, Set.uIcc_of_le zero_le_one] + exact Set.Icc_subset_Icc ha.1 le_rfl + +private theorem integral_eq_endpoint_sub_mul {f g : ℝ → ℝ} + (hf : ContinuousOn f (Set.Icc (0 : ℝ) 1)) + (hfg : ∀ t ∈ Set.Ioo (0 : ℝ) 1, HasDerivAt f (g t) t) + (hg : IntervalIntegrable g volume 0 1) : + (∫ t in (0 : ℝ)..1, f t) = f 1 - ∫ t in (0 : ℝ)..1, t * g t := by + have h := intervalIntegral.integral_mul_deriv_eq_deriv_mul_of_hasDerivAt + (a := (0 : ℝ)) (b := 1) (u := f) (u' := g) (v := fun t : ℝ ↦ t) + (v' := fun _ : ℝ ↦ 1) + (by simpa only [Set.uIcc_of_le zero_le_one] using hf) continuous_id.continuousOn + (by simpa only [min_eq_left zero_le_one, max_eq_right zero_le_one] using hfg) + (fun t _ ↦ hasDerivAt_id t) hg intervalIntegrable_const + simpa only [mul_one, one_mul, mul_zero, zero_mul, sub_zero, mul_comm] using h + +private theorem integral_cumulative_deriv_eq (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {f g : ℝ → ℝ} + (hf : ContinuousOn f (Set.Icc (0 : ℝ) 1)) + (hfg : ∀ t ∈ Set.Ioo (0 : ℝ) 1, HasDerivAt f (g t) t) + (hg : IntervalIntegrable g volume 0 1) : + (∫ t in (0 : ℝ)..1, (∑ i ∈ s, if r i ≤ t then w i else 0) * g t) = + f 1 * (∑ i ∈ s, w i) - ∑ i ∈ s, w i * f (r i) := by + rw [integral_cumulative_mul_of_intervalIntegrable s r w hr hg] + calc + _ = ∑ i ∈ s, w i * (f 1 - f (r i)) := by + apply Finset.sum_congr rfl + intro i hi + rw [integral_tail_eq_sub hf hfg hg (hr i hi)] + _ = _ := by + simp_rw [mul_sub] + rw [Finset.sum_sub_distrib, ← Finset.sum_mul] + ring + +private theorem abs_integral_cumulative_sub_mul_le (s : Finset ι) (r w : ι → ℝ) + {δ : ℝ} (hδ : ∀ t ∈ Set.Icc (0 : ℝ) 1, + |(∑ i ∈ s, if r i ≤ t then w i else 0) - t| ≤ δ) + {g : ℝ → ℝ} (hg : IntervalIntegrable g volume 0 1) : + |∫ t in (0 : ℝ)..1, ((∑ i ∈ s, if r i ≤ t then w i else 0) - t) * g t| ≤ + δ * ∫ t in (0 : ℝ)..1, |g t| := by + have hint : IntervalIntegrable + (fun t ↦ ((∑ i ∈ s, if r i ≤ t then w i else 0) - t) * g t) volume 0 1 := by + simp_rw [sub_mul] + exact (intervalIntegrable_cumulative_mul s r w hg).sub + (hg.continuousOn_mul continuous_id.continuousOn) + calc + _ ≤ ∫ t in (0 : ℝ)..1, |((∑ i ∈ s, if r i ≤ t then w i else 0) - t) * g t| := + intervalIntegral.abs_integral_le_integral_abs zero_le_one + _ ≤ ∫ t in (0 : ℝ)..1, δ * |g t| := by + apply intervalIntegral.integral_mono_on zero_le_one hint.abs (hg.abs.const_mul δ) + intro t ht + rw [abs_mul] + exact mul_le_mul_of_nonneg_right (hδ t ht) (abs_nonneg _) + _ = δ * ∫ t in (0 : ℝ)..1, |g t| := intervalIntegral.integral_const_mul _ _ + +/-- Finite cumulative discrepancy bounds integration error by the endpoint value plus the +integral of the absolute derivative. Signed atomic weights are allowed; only interior +pointwise derivatives, continuous endpoint values and interval integrability are assumed. -/ +theorem abs_sum_mul_sub_integral_le_of_cumulative_bound (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {δ : ℝ} + (hδ : ∀ t ∈ Set.Icc (0 : ℝ) 1, + |(∑ i ∈ s, if r i ≤ t then w i else 0) - t| ≤ δ) + {f g : ℝ → ℝ} (hf : ContinuousOn f (Set.Icc (0 : ℝ) 1)) + (hfg : ∀ t ∈ Set.Ioo (0 : ℝ) 1, HasDerivAt f (g t) t) + (hg : IntervalIntegrable g volume 0 1) : + |(∑ i ∈ s, w i * f (r i)) - ∫ t in (0 : ℝ)..1, f t| ≤ + δ * (|f 1| + ∫ t in (0 : ℝ)..1, |g t|) := by + let F (t : ℝ) := ∑ i ∈ s, if r i ≤ t then w i else 0 + have hsplit : (∫ t in (0 : ℝ)..1, (F t - t) * g t) = + (∫ t in (0 : ℝ)..1, F t * g t) - ∫ t in (0 : ℝ)..1, t * g t := by + simp_rw [sub_mul] + exact intervalIntegral.integral_sub (intervalIntegrable_cumulative_mul s r w hg) + (hg.continuousOn_mul continuous_id.continuousOn) + have hidentity : (∑ i ∈ s, w i * f (r i)) - ∫ t in (0 : ℝ)..1, f t = + f 1 * ((∑ i ∈ s, w i) - 1) - ∫ t in (0 : ℝ)..1, (F t - t) * g t := by + rw [hsplit, integral_cumulative_deriv_eq s r w hr hf hfg hg, + integral_eq_endpoint_sub_mul hf hfg hg] + ring + rw [hidentity] + calc + _ ≤ |f 1 * ((∑ i ∈ s, w i) - 1)| + |∫ t in (0 : ℝ)..1, (F t - t) * g t| := abs_sub _ _ + _ ≤ |f 1| * δ + δ * ∫ t in (0 : ℝ)..1, |g t| := by + rw [abs_mul] + exact add_le_add + (mul_le_mul_of_nonneg_left + (abs_sum_sub_one_le_of_cumulative_bound s r w hr hδ) (abs_nonneg _)) + (abs_integral_cumulative_sub_mul_le s r w hδ hg) + _ = _ := by ring + +end Finset diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeIntegral.lean b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeIntegral.lean new file mode 100644 index 000000000..1a57bc458 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeIntegral.lean @@ -0,0 +1,91 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic + +/-! +# Integrable tests against finite cumulative sums + +The cumulative-sum identity holds for an interval-integrable test, including +integrable endpoint singularities. No positivity of the atomic weights is needed. +-/ + +public section + +open MeasureTheory Set + +namespace IntervalIntegrable + +/-- Cutting an interval-integrable real function at a lower threshold preserves integrability. -/ +theorem ite_le_zero {f : ℝ → ℝ} {a b r : ℝ} + (hf : IntervalIntegrable f volume a b) : + IntervalIntegrable (fun t ↦ if r ≤ t then f t else 0) volume a b := by + change IntervalIntegrable ((Ici r).indicator f) volume a b + exact ⟨hf.1.indicator measurableSet_Ici, hf.2.indicator measurableSet_Ici⟩ + +end IntervalIntegrable + +namespace intervalIntegral + +/-- A lower-threshold indicator restricts an interval integral to the upper subinterval. +The equality at the threshold is immaterial for Lebesgue integration. -/ +theorem integral_ite_le_zero {f : ℝ → ℝ} {a b r : ℝ} + (hr : r ∈ Set.Icc a b) (hf : IntervalIntegrable f volume a b) : + (∫ t in a..b, if r ≤ t then f t else 0) = ∫ t in r..b, f t := by + have hi := hf.ite_le_zero (r := r) + have hparts := (IntervalIntegrable.trans_iff + (a := a) (b := r) (c := b) (by + simpa only [uIcc_of_le (hr.1.trans hr.2)] using hr)).mp hi + have hlo : (∫ t in a..r, if r ≤ t then f t else 0) = 0 := by + calc + _ = ∫ _t in a..r, (0 : ℝ) := + intervalIntegral.integral_congr_Ioo_of_le hr.1 fun t ht ↦ by + rw [ite_eq_right (not_le.mpr ht.2)] + _ = 0 := by simp + have hhi : (∫ t in r..b, if r ≤ t then f t else 0) = ∫ t in r..b, f t := + intervalIntegral.integral_congr_Ioo_of_le hr.2 fun t ht ↦ by + rw [ite_eq_left ht.1.le] + rw [← intervalIntegral.integral_add_adjacent_intervals hparts.1 hparts.2, hlo, hhi, zero_add] + +end intervalIntegral + +namespace Finset + +variable {ι : Type*} + +/-- A finite cumulative sum times an interval-integrable test is interval integrable. +The node locations and signs of the weights are unrestricted. -/ +theorem intervalIntegrable_cumulative_mul (s : Finset ι) (r w : ι → ℝ) + {a b : ℝ} {g : ℝ → ℝ} (hg : IntervalIntegrable g volume a b) : + IntervalIntegrable + (fun t ↦ (∑ i ∈ s, if r i ≤ t then w i else 0) * g t) volume a b := by + have hi (i : ι) : IntervalIntegrable + (fun t ↦ if r i ≤ t then w i * g t else 0) volume a b := + (hg.const_mul (w i)).ite_le_zero + convert IntervalIntegrable.sum s (fun i _ ↦ hi i) using 1 + ext t + simp only [Finset.sum_apply, Finset.sum_mul, ite_mul, zero_mul] + +/-- Integration against a finite cumulative sum equals the sum of the weighted tail integrals. +Interval integrability suffices; endpoint-singular derivatives are permitted. -/ +theorem integral_cumulative_mul_of_intervalIntegrable (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {g : ℝ → ℝ} + (hg : IntervalIntegrable g volume 0 1) : + (∫ t in (0 : ℝ)..1, (∑ i ∈ s, if r i ≤ t then w i else 0) * g t) = + ∑ i ∈ s, w i * ∫ t in r i..1, g t := by + classical + have heq : (fun t ↦ (∑ i ∈ s, if r i ≤ t then w i else 0) * g t) = + (fun t ↦ ∑ i ∈ s, if r i ≤ t then w i * g t else 0) := by + funext t + simp only [Finset.sum_mul, ite_mul, zero_mul] + rw [heq, intervalIntegral.integral_finsetSum (fun i _ ↦ (hg.const_mul (w i)).ite_le_zero)] + apply Finset.sum_congr rfl + intro i hi + rw [intervalIntegral.integral_ite_le_zero (hr i hi) (hg.const_mul (w i)), + intervalIntegral.integral_const_mul] + +end Finset diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeMoments.lean b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeMoments.lean new file mode 100644 index 000000000..be2ef2cd9 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeMoments.lean @@ -0,0 +1,154 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeIntegral +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Moments controlled by a finite cumulative-sum discrepancy + +A finite weighted sum on `[0, 1]` whose cumulative sums differ from `t` by at +most `δ` has monomial moments within `2δ` of the uniform moments. The zeroth +moment has error at most `δ`. The weights may be signed and repeated nodes are +allowed, including both endpoints. No probability normalization is assumed. +-/ + +public section + +open MeasureTheory Set + +namespace Finset + +variable {ι : Type*} + +private theorem intervalIntegrable_cumulative (s : Finset ι) (r w : ι → ℝ) (a b : ℝ) : + IntervalIntegrable (fun t ↦ ∑ i ∈ s, if r i ≤ t then w i else 0) volume a b := by + simpa only [mul_one] using intervalIntegrable_cumulative_mul s r w + (intervalIntegrable_const (a := a) (b := b) (c := (1 : ℝ))) + +/-- Integrating a finite weighted cumulative sum against a continuous function exchanges the +finite sum with the tail integrals. Signed weights and repeated nodes are allowed. -/ +theorem integral_cumulative_mul (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {g : ℝ → ℝ} (hg : Continuous g) : + (∫ t in (0 : ℝ)..1, (∑ i ∈ s, if r i ≤ t then w i else 0) * g t) = + ∑ i ∈ s, w i * ∫ t in r i..1, g t := + integral_cumulative_mul_of_intervalIntegrable s r w hr (hg.intervalIntegrable 0 1) + +/-- The cumulative discrepancy at the right endpoint bounds the total-mass error. +No positivity of the weights or prior mass normalization is required. -/ +theorem abs_sum_sub_one_le_of_cumulative_bound (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {δ : ℝ} + (hδ : ∀ t ∈ Set.Icc (0 : ℝ) 1, + |(∑ i ∈ s, if r i ≤ t then w i else 0) - t| ≤ δ) : + |(∑ i ∈ s, w i) - 1| ≤ δ := by + have heq : (∑ i ∈ s, if r i ≤ (1 : ℝ) then w i else 0) = ∑ i ∈ s, w i := by + apply Finset.sum_congr rfl + intro i hi + exact ite_eq_left (hr i hi).2 + simpa only [heq] using hδ 1 ⟨zero_le_one, le_rfl⟩ + +private theorem integral_pow_deriv (n : ℕ) (a b : ℝ) : + (∫ t in a..b, ((n : ℝ) + 1) * t ^ n) = b ^ (n + 1) - a ^ (n + 1) := by + apply intervalIntegral.integral_eq_sub_of_hasDerivAt + · intro t _ + simpa only [Nat.cast_add, Nat.cast_one, Nat.add_sub_cancel] using hasDerivAt_pow (n + 1) t + · exact (continuous_const.mul (continuous_id.pow n)).intervalIntegrable a b + +private theorem abs_integral_cumulative_sub_mul_le (s : Finset ι) (r w : ι → ℝ) + {δ : ℝ} (hδ : ∀ t ∈ Set.Icc (0 : ℝ) 1, + |(∑ i ∈ s, if r i ≤ t then w i else 0) - t| ≤ δ) + {g : ℝ → ℝ} (hg : Continuous g) (hg0 : ∀ t ∈ Set.Icc (0 : ℝ) 1, 0 ≤ g t) + (hgi : (∫ t in (0 : ℝ)..1, g t) = 1) : + |∫ t in (0 : ℝ)..1, ((∑ i ∈ s, if r i ≤ t then w i else 0) - t) * g t| ≤ δ := by + have hint := ((intervalIntegrable_cumulative s r w 0 1).sub + (continuous_id.intervalIntegrable 0 1)).mul_continuousOn hg.continuousOn + calc + _ ≤ ∫ t in (0 : ℝ)..1, + |((∑ i ∈ s, if r i ≤ t then w i else 0) - t) * g t| := + intervalIntegral.abs_integral_le_integral_abs zero_le_one + _ ≤ ∫ t in (0 : ℝ)..1, δ * g t := by + apply intervalIntegral.integral_mono_on zero_le_one hint.abs + ((hg.intervalIntegrable 0 1).const_mul δ) + intro t ht + rw [abs_mul, abs_of_nonneg (hg0 t ht)] + exact mul_le_mul_of_nonneg_right (hδ t ht) (hg0 t ht) + _ = δ := by rw [intervalIntegral.integral_const_mul, hgi, mul_one] + +private theorem abs_sum_mul_pow_succ_sub_le (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {δ : ℝ} + (hδ : ∀ t ∈ Set.Icc (0 : ℝ) 1, + |(∑ i ∈ s, if r i ≤ t then w i else 0) - t| ≤ δ) (n : ℕ) : + |(∑ i ∈ s, w i * r i ^ (n + 1)) - 1 / ((n : ℝ) + 2)| ≤ 2 * δ := by + let F (t : ℝ) := ∑ i ∈ s, if r i ≤ t then w i else 0 + let g (t : ℝ) := ((n : ℝ) + 1) * t ^ n + have hg : Continuous g := continuous_const.mul (continuous_id.pow n) + have hgi (a b : ℝ) : (∫ t in a..b, g t) = b ^ (n + 1) - a ^ (n + 1) := + integral_pow_deriv n a b + have hFG : (∫ t in (0 : ℝ)..1, F t * g t) = + (∑ i ∈ s, w i) - ∑ i ∈ s, w i * r i ^ (n + 1) := by + have h := integral_cumulative_mul s r w hr hg + simp_rw [hgi, one_pow, mul_sub, mul_one, Finset.sum_sub_distrib] at h + exact h + have hxg : (∫ t in (0 : ℝ)..1, t * g t) = 1 - 1 / ((n : ℝ) + 2) := by + calc + _ = ((n : ℝ) + 1) * ∫ t in (0 : ℝ)..1, t ^ (n + 1) := by + rw [← intervalIntegral.integral_const_mul] + apply intervalIntegral.integral_congr + intro t _ + dsimp only [g] + rw [pow_succ] + ring + _ = 1 - 1 / ((n : ℝ) + 2) := by + rw [integral_pow] + simp only [one_pow, zero_pow (Nat.succ_ne_zero (n + 1)), sub_zero, + Nat.cast_add, Nat.cast_one] + have hn : (n : ℝ) + 2 ≠ 0 := by positivity + rw [show (n : ℝ) + 1 + 1 = (n : ℝ) + 2 by ring] + field_simp [hn] + ring + have herr : (∫ t in (0 : ℝ)..1, (F t - t) * g t) = + (∫ t in (0 : ℝ)..1, F t * g t) - ∫ t in (0 : ℝ)..1, t * g t := by + simp_rw [sub_mul] + apply intervalIntegral.integral_sub + · exact (intervalIntegrable_cumulative s r w 0 1).mul_continuousOn hg.continuousOn + · exact (continuous_id.mul hg).intervalIntegrable 0 1 + have hidentity : (∑ i ∈ s, w i * r i ^ (n + 1)) - 1 / ((n : ℝ) + 2) = + ((∑ i ∈ s, w i) - 1) - ∫ t in (0 : ℝ)..1, (F t - t) * g t := by + rw [herr, hFG, hxg] + ring + have herror : |∫ t in (0 : ℝ)..1, (F t - t) * g t| ≤ δ := + abs_integral_cumulative_sub_mul_le s r w hδ hg + (fun t ht ↦ mul_nonneg (by positivity) (pow_nonneg ht.1 _)) + (by rw [hgi]; simp) + rw [hidentity] + exact (abs_sub _ _).trans (by + have hmass := abs_sum_sub_one_le_of_cumulative_bound s r w hr hδ + linarith) + +/-- Uniform cumulative discrepancy controls every monomial moment on the unit interval. +The constant `2δ` is independent of the degree. The weights may be signed, nodes may repeat, +and no total-mass normalization is assumed. -/ +theorem abs_sum_mul_pow_sub_le_of_cumulative_bound (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {δ : ℝ} + (hδ : ∀ t ∈ Set.Icc (0 : ℝ) 1, + |(∑ i ∈ s, if r i ≤ t then w i else 0) - t| ≤ δ) (k : ℕ) : + |(∑ i ∈ s, w i * r i ^ k) - 1 / ((k : ℝ) + 1)| ≤ 2 * δ := by + cases k with + | zero => + have hmass := abs_sum_sub_one_le_of_cumulative_bound s r w hr hδ + have hδ0 : 0 ≤ δ := (abs_nonneg _).trans hmass + simpa only [pow_zero, mul_one, Nat.cast_zero, zero_add, div_one] using + hmass.trans (by linarith : δ ≤ 2 * δ) + | succ n => + simpa only [Nat.succ_eq_add_one, Nat.cast_add, Nat.cast_one, + show (n : ℝ) + 1 + 1 = (n : ℝ) + 2 by ring] using + abs_sum_mul_pow_succ_sub_le s r w hr hδ n + +end Finset diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/MonotoneBounds.lean b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/MonotoneBounds.lean new file mode 100644 index 000000000..a9da145e2 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/MonotoneBounds.lean @@ -0,0 +1,58 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Tactic.Linarith + +/-! +# Recovering a monotone function from neighboring integral means + +The backward integral mean is at most the value at the common endpoint, and +the forward mean is at least that value. Consequently bounds for the two +means around the means of the identity function give a pointwise error bound. +-/ + +public section + +open MeasureTheory Set + +namespace Monotone + +/-- The backward mean of a monotone function is at most its endpoint value. -/ +theorem integral_sub_div_le {f : ℝ → ℝ} (hf : Monotone f) {x h : ℝ} (hh : 0 < h) : + (∫ t in x - h..x, f t) / h ≤ f x := by + rw [div_le_iff₀ hh] + have hbound := intervalIntegral.integral_mono_on (μ := volume) + (by linarith : x - h ≤ x) + hf.intervalIntegrable intervalIntegrable_const + (fun t (ht : t ∈ Icc (x - h) x) ↦ hf ht.2) + simpa [intervalIntegral.integral_const, smul_eq_mul, mul_comm] using hbound + +/-- The forward mean of a monotone function is at least its initial value. -/ +theorem le_integral_add_div {f : ℝ → ℝ} (hf : Monotone f) {x h : ℝ} (hh : 0 < h) : + f x ≤ (∫ t in x..x + h, f t) / h := by + rw [le_div_iff₀ hh] + have hbound := intervalIntegral.integral_mono_on (μ := volume) + (by linarith : x ≤ x + h) + intervalIntegrable_const hf.intervalIntegrable + (fun t (ht : t ∈ Icc x (x + h)) ↦ hf ht.1) + simpa [intervalIntegral.integral_const, smul_eq_mul, mul_comm] using hbound + +/-- Bounds for the adjacent means of a monotone function yield a pointwise bound +relative to the identity function, with the smoothing error `h / 2`. -/ +theorem abs_sub_le_of_integral_bounds {f : ℝ → ℝ} (hf : Monotone f) + {x h ε : ℝ} (hh : 0 < h) + (hback : |(∫ t in x - h..x, f t) / h - (x - h / 2)| ≤ ε) + (hforward : |(∫ t in x..x + h, f t) / h - (x + h / 2)| ≤ ε) : + |f x - x| ≤ h / 2 + ε := by + have hlo := hf.integral_sub_div_le (x := x) hh + have hhi := hf.le_integral_add_div (x := x) hh + obtain ⟨hb, _⟩ := abs_le.mp hback + obtain ⟨_, hfwd⟩ := abs_le.mp hforward + exact abs_le.mpr ⟨by linarith, by linarith⟩ + +end Monotone diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/PrimitiveBounds.lean b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/PrimitiveBounds.lean new file mode 100644 index 000000000..624d0d445 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/PrimitiveBounds.lean @@ -0,0 +1,56 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.MonotoneBounds +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# Recovering a monotone function from its integrated error + +Bounds on the differences of `∫₀ˣ f - x²/2` give bounds on the adjacent integral +means of `f`. Monotonicity then recovers a pointwise bound for `f(x) - x`. +-/ + +public section + +open MeasureTheory + +namespace Monotone + +/-- Finite differences of the primitive error control the pointwise error of a monotone function. -/ +theorem abs_sub_le_of_integral_sub_quadratic_bounds {f : ℝ → ℝ} (hf : Monotone f) + {x h ε : ℝ} (hh : 0 < h) + (hback : |(((∫ t in (0 : ℝ)..x, f t) - x ^ 2 / 2) - + ((∫ t in (0 : ℝ)..x - h, f t) - (x - h) ^ 2 / 2)) / h| ≤ ε) + (hforward : |(((∫ t in (0 : ℝ)..x + h, f t) - (x + h) ^ 2 / 2) - + ((∫ t in (0 : ℝ)..x, f t) - x ^ 2 / 2)) / h| ≤ ε) : + |f x - x| ≤ h / 2 + ε := by + apply hf.abs_sub_le_of_integral_bounds hh + · calc + |(∫ t in x - h..x, f t) / h - (x - h / 2)| = + |(((∫ t in (0 : ℝ)..x, f t) - x ^ 2 / 2) - + ((∫ t in (0 : ℝ)..x - h, f t) - (x - h) ^ 2 / 2)) / h| := by + congr 1 + rw [← intervalIntegral.integral_interval_sub_left (a := 0) + hf.intervalIntegrable hf.intervalIntegrable] + field_simp [hh.ne'] + ring + _ ≤ ε := hback + · calc + |(∫ t in x..x + h, f t) / h - (x + h / 2)| = + |(((∫ t in (0 : ℝ)..x + h, f t) - (x + h) ^ 2 / 2) - + ((∫ t in (0 : ℝ)..x, f t) - x ^ 2 / 2)) / h| := by + congr 1 + rw [← intervalIntegral.integral_interval_sub_left (a := 0) + hf.intervalIntegrable hf.intervalIntegrable] + field_simp [hh.ne'] + ring + _ ≤ ε := hforward + +end Monotone diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/PolynomialMoment.lean b/RealRooted/Mathlib/MeasureTheory/Integral/PolynomialMoment.lean new file mode 100644 index 000000000..a27549ee5 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/PolynomialMoment.lean @@ -0,0 +1,55 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Moment +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import TauCeti.MeasureTheory.Function.PolynomialMemLp + +/-! +# Integration of polynomial moment functionals +-/ + +public section + +open MeasureTheory Polynomial + +namespace MeasureTheory + +/-- All natural moments make every polynomial times a natural power integrable. -/ +theorem integrable_pow_mul_polynomial_eval {mu : Measure ℝ} + (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu) (r : ℕ) (p : ℝ[X]) : + Integrable (fun x : ℝ => x ^ r * p.eval x) mu := by + apply (TauCeti.integrable_eval_of_forall_integrable_pow hmom (X ^ r * p)).congr + filter_upwards [] with x + simp only [Polynomial.eval_mul, Polynomial.eval_pow, Polynomial.eval_X] + +end MeasureTheory + +namespace Polynomial + +/-- The functional of shifted integral moments integrates the polynomial against +the corresponding power weight. -/ +theorem momentFunctional_integral_pow_add {mu : Measure ℝ} + (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu) (r : ℕ) (p : ℝ[X]) : + momentFunctional (fun k => ∫ x : ℝ, x ^ (k + r) ∂mu) p = + ∫ x : ℝ, x ^ r * p.eval x ∂mu := by + induction p using Polynomial.induction_on' with + | add p q hp hq => + rw [momentFunctional_add, hp, hq] + simp only [Polynomial.eval_add, mul_add] + rw [integral_add (integrable_pow_mul_polynomial_eval hmom r p) + (integrable_pow_mul_polynomial_eval hmom r q)] + | monomial n a => + rw [momentFunctional_monomial] + simp only [Polynomial.eval_monomial] + rw [← integral_const_mul] + apply integral_congr_ae + filter_upwards [] with x + rw [pow_add] + ring + +end Polynomial diff --git a/RealRooted/Mathlib/MeasureTheory/Integral/PolynomialTranslation.lean b/RealRooted/Mathlib/MeasureTheory/Integral/PolynomialTranslation.lean new file mode 100644 index 000000000..2fb7f326a --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Integral/PolynomialTranslation.lean @@ -0,0 +1,55 @@ +/- +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.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.Algebra.Polynomial.TaylorEvaluation +public import Mathlib.Algebra.Polynomial.HasseDeriv +import Mathlib.Tactic.TypeStar + +/-! +# Expectations of polynomial translations +-/ + +public section + +open Polynomial + +namespace MeasureTheory + +variable {Ω : Type*} [MeasurableSpace Ω] {mu : Measure Ω} {Y : Ω → ℝ} + +/-- Integrable natural powers suffice for every translated polynomial test. -/ +theorem integrable_polynomial_eval_add + (hmom : ∀ k : ℕ, Integrable (fun w => Y w ^ k) mu) + (p : ℝ[X]) (x : ℝ) : Integrable (fun w => p.eval (x + Y w)) mu := by + simp_rw [p.eval_add_eq_sum_hasseDeriv] + exact integrable_finsetSum _ (fun k _ => (hmom k).const_mul _) + +/-- Averaging polynomial translations is the finite Hasse differential operator +whose coefficients are the actual power moments of the translation variable. -/ +theorem integral_polynomial_eval_add_eq_sum_hasseDeriv + (hmom : ∀ k : ℕ, Integrable (fun w => Y w ^ k) mu) + (p : ℝ[X]) (x : ℝ) : + (∫ w, p.eval (x + Y w) ∂mu) = ∑ k ∈ Finset.range (p.natDegree + 1), + (hasseDeriv k p).eval x * ∫ w, Y w ^ k ∂mu := by + simp_rw [p.eval_add_eq_sum_hasseDeriv] + rw [integral_finsetSum _ (fun k _ => (hmom k).const_mul _)] + simp only [integral_const_mul] + +/-- The same expectation in ordinary iterated derivatives. -/ +theorem integral_polynomial_eval_add_eq_sum_derivative + (hmom : ∀ k : ℕ, Integrable (fun w => Y w ^ k) mu) + (p : ℝ[X]) (x : ℝ) : + (∫ w, p.eval (x + Y w) ∂mu) = ∑ k ∈ Finset.range (p.natDegree + 1), + (∫ w, Y w ^ k ∂mu) / k.factorial * (derivative^[k] p).eval x := by + rw [integral_polynomial_eval_add_eq_sum_hasseDeriv hmom] + apply Finset.sum_congr rfl + intro k _ + rw [eval_hasseDeriv_eq_div_factorial] + ring + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/AeratedMoments.lean b/RealRooted/Mathlib/MeasureTheory/Measure/AeratedMoments.lean new file mode 100644 index 000000000..4973df408 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/AeratedMoments.lean @@ -0,0 +1,75 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSymmetrization +import RealRooted.Mathlib.MeasureTheory.Measure.SqrtMoments + +/-! +# Stieltjes moments and aerated Hamburger moments + +A sequence has a nonnegative representing measure exactly when inserting zero +between successive entries gives moments of a real measure. The forward +measure can be chosen reflection invariant. Neither the converse nor the +equivalence assumes determinacy, finite support, or a nonzero zeroth moment. + +See Sokal, arXiv:1903.12455v2, elementary fact 1. +-/ + +public section + +namespace MeasureTheory + +/-- Insert a zero between successive entries of a real moment sequence. -/ +@[expose] def aeratedMoment (m : ℕ → ℝ) (n : ℕ) : ℝ := + if n % 2 = 0 then m (n / 2) else 0 + +/-- Even entries of an aerated moment sequence recover the original sequence. -/ +@[simp] theorem aeratedMoment_even (m : ℕ → ℝ) (n : ℕ) : + aeratedMoment m (2 * n) = m n := by + simp [aeratedMoment, Nat.mul_comm] + +/-- Odd entries of an aerated moment sequence vanish. -/ +@[simp] theorem aeratedMoment_odd (m : ℕ → ℝ) (n : ℕ) : + aeratedMoment m (2 * n + 1) = 0 := by + simp [aeratedMoment, Nat.add_mod, Nat.mul_comm] + +/-- The symmetric square-root law represents the literal aerated moment sequence. -/ +theorem Measure.integral_pow_sqrtSymmetrization {mu : Measure ℝ} + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) (n : ℕ) : + (∫ x : ℝ, x ^ n ∂mu.sqrtSymmetrization) = + aeratedMoment (fun k => ∫ x : ℝ, x ^ k ∂mu) n := by + obtain ⟨k, hk | hk⟩ := Nat.even_or_odd' n + · subst n + rw [aeratedMoment_even, Measure.integral_pow_even_sqrtSymmetrization hmu] + · subst n + rw [aeratedMoment_odd, Measure.integral_pow_odd_sqrtSymmetrization] + +/-- A nonnegative representing measure exists exactly when its aerated +sequence has a real representing measure, with every natural power integrable. -/ +theorem exists_nonnegative_moments_iff_aerated (m : ℕ → ℝ) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, 0 ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n) ↔ + ∃ nu : Measure ℝ, ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) nu ∧ + (∫ x : ℝ, x ^ n ∂nu) = aeratedMoment m n := by + constructor + · rintro ⟨mu, hmu, hmom⟩ + have heq : (fun n => ∫ x : ℝ, x ^ n ∂mu) = m := funext fun n => (hmom n).2 + refine ⟨mu.sqrtSymmetrization, fun n => + ⟨Measure.integrable_pow_sqrtSymmetrization hmu (fun k => (hmom k).1) n, ?_⟩⟩ + rw [Measure.integral_pow_sqrtSymmetrization hmu, heq] + · rintro ⟨nu, hmom⟩ + refine ⟨nu.map (fun x : ℝ => x ^ 2), ?_, fun n => ⟨?_, ?_⟩⟩ + · apply (ae_map_iff (by fun_prop) measurableSet_Ici).mpr + exact Filter.Eventually.of_forall sq_nonneg + · apply (integrable_map_measure (by fun_prop) (by fun_prop)).mpr + simpa only [Function.comp_def, ← pow_mul] using (hmom (2 * n)).1 + · rw [integral_map_of_stronglyMeasurable (by fun_prop) (by fun_prop)] + simpa only [pow_mul, aeratedMoment_even] using (hmom (2 * n)).2 + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/AeratedSeries.lean b/RealRooted/Mathlib/MeasureTheory/Measure/AeratedSeries.lean new file mode 100644 index 000000000..13781a055 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/AeratedSeries.lean @@ -0,0 +1,26 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.RingTheory.PowerSeries.Substitution +import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Aeration +public import RealRooted.Mathlib.MeasureTheory.Measure.AeratedMoments + +/-! +# Aerated moments as a square-variable formal series +-/ + +public section + +namespace PowerSeries + +/-- The ordinary series of the aerated moment sequence is the square-variable substitution. -/ +theorem mk_aeratedMoment (m : ℕ → ℝ) : + mk (MeasureTheory.aeratedMoment m) = (mk m).subst (X ^ 2 : ℝ⟦X⟧) := by + ext n + simp only [coeff_mk, coeff_subst_X_sq, MeasureTheory.aeratedMoment] + +end PowerSeries diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/AnalyticMomentSupport.lean b/RealRooted/Mathlib/MeasureTheory/Measure/AnalyticMomentSupport.lean new file mode 100644 index 000000000..abe1d7087 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/AnalyticMomentSupport.lean @@ -0,0 +1,95 @@ +/- +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 +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.MeasureTheory.Measure.MomentDeterminacy +import Mathlib.Analysis.Analytic.OfScalars + +/-! +# Compact support from analytic moment coefficients + +Taylor coefficients of an analytic germ satisfy a geometric bound. If its even +coefficients are the even moments of a positive measure, the existing moment +tail estimate forces bounded support. No nonnegative-support assumption or +nonzero-measure assumption is needed for this step. +-/ + +public section + +open Filter MeasureTheory Topology + +/-- Normalized derivatives of an analytic complex germ have a geometric bound. -/ +theorem AnalyticAt.exists_norm_iteratedDeriv_div_factorial_le + {f : ℂ → ℂ} {a : ℂ} (hf : AnalyticAt ℂ f a) : + ∃ C > 0, ∃ R > 0, ∀ n : ℕ, + ‖iteratedDeriv n f a / n.factorial‖ ≤ C * R ^ n := by + let p := FormalMultilinearSeries.ofScalars ℂ + (fun n ↦ iteratedDeriv n f a / n.factorial) + have hp : 0 < p.radius := hf.hasFPowerSeriesAt.radius_pos + obtain ⟨r, hr0, hrp⟩ := ENNReal.lt_iff_exists_nnreal_btwn.mp hp + have hr : (0 : NNReal) < r := ENNReal.coe_pos.mp hr0 + obtain ⟨C, hC, hbound⟩ := p.norm_le_div_pow_of_pos_of_lt_radius hr hrp + refine ⟨C, hC, (r : ℝ)⁻¹, inv_pos.mpr hr, fun n ↦ ?_⟩ + simpa only [p, FormalMultilinearSeries.ofScalars_norm, div_eq_mul_inv, inv_pow] + using hbound n + +namespace MeasureTheory.Measure + +/-- If the even moments are the even Taylor coefficients of an analytic germ, +the measure has bounded support. Integrability of the zeroth moment includes +finiteness; no finiteness typeclass is an additional hypothesis. -/ +theorem exists_pos_ae_abs_le_of_analytic_even_moments + {mu : Measure ℝ} {f : ℂ → ℂ} (hf : AnalyticAt ℂ f 0) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ (2 * n)) mu) + (hmom : ∀ n : ℕ, iteratedDeriv (2 * n) f 0 / (2 * n).factorial = + ((∫ x : ℝ, x ^ (2 * n) ∂mu : ℝ) : ℂ)) : + ∃ R > 0, ∀ᵐ x ∂mu, |x| ≤ R := by + obtain ⟨C, _, R, hR, hbound⟩ := hf.exists_norm_iteratedDeriv_div_factorial_le + have hm (n : ℕ) : (∫ x : ℝ, x ^ (2 * n) ∂mu) ≤ C * R ^ (2 * n) := by + calc + _ ≤ |∫ x : ℝ, x ^ (2 * n) ∂mu| := le_abs_self _ + _ = ‖iteratedDeriv (2 * n) f 0 / (2 * n).factorial‖ := by + rw [hmom n, Complex.norm_real, Real.norm_eq_abs] + _ ≤ _ := hbound (2 * n) + have htail := measure_abs_ge_eq_zero_of_even_moment_bound hR.le + (lt_add_one R) hint hm + refine ⟨R + 1, add_pos hR zero_lt_one, ae_iff.mpr ?_⟩ + apply measure_mono_null _ htail + intro x hx + exact (lt_of_not_ge hx).le + +/-- Signed complex Taylor coefficients which are genuine power moments force +bounded support. The equality is in `ℂ`, rather than merely after taking real +parts. The zero measure and a zero analytic germ are included. -/ +theorem exists_pos_ae_abs_le_of_analytic_moments + {mu : Measure ℝ} {f : ℂ → ℂ} (hf : AnalyticAt ℂ f 0) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n f 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + ∃ R > 0, ∀ᵐ x ∂mu, |x| ≤ R := by + apply exists_pos_ae_abs_le_of_analytic_even_moments hf (fun n ↦ hint (2 * n)) + intro n + simpa only [pow_mul, neg_one_sq, one_pow, one_mul] using hmom (2 * n) + +/-- A nonnegative moment measure of an analytic germ is carried by a compact +interval in the closed positive half-line. An atom at zero is permitted. -/ +theorem exists_pos_ae_mem_Icc_of_analytic_moments + {mu : Measure ℝ} {f : ℂ → ℂ} (hf : AnalyticAt ℂ f 0) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n f 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + ∃ R > 0, ∀ᵐ x ∂mu, x ∈ Set.Icc 0 R := by + obtain ⟨R, hR, hb⟩ := exists_pos_ae_abs_le_of_analytic_moments hf hint hmom + refine ⟨R, hR, ?_⟩ + filter_upwards [hpos, hb] with x hx hxb + exact ⟨hx, (le_abs_self x).trans hxb⟩ + +end MeasureTheory.Measure + +end diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/AtomicGap.lean b/RealRooted/Mathlib/MeasureTheory/Measure/AtomicGap.lean new file mode 100644 index 000000000..ee1cc4b71 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/AtomicGap.lean @@ -0,0 +1,80 @@ +/- +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.MeasureTheory.Measure.Dirac.Basic +import Mathlib.MeasureTheory.Constructions.BorelSpace.Order +public import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +import Mathlib.Tactic.TypeStar + +/-! +# Positive support gaps in slope-weighted atomic measures +-/ + +public section + +open Filter MeasureTheory MeasureTheory.Measure Set Topology + +namespace MeasureTheory + +/-- A positive lower support gap kills the atom at zero and places every +active slope above the gap. Summability then forces finite active support. -/ +theorem eq_zero_and_finite_support_of_ae_le_atomic + {a : ℕ → ℝ} {gamma c : ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (hg : 0 ≤ gamma) (hc : 0 < c) + (hgap : ∀ᵐ x ∂(ENNReal.ofReal gamma • Measure.dirac 0 + + Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i))), c ≤ x) : + gamma = 0 ∧ (Function.support a).Finite ∧ ∀ i, a i ≠ 0 → c ≤ a i := by + obtain ⟨hzero, hatoms⟩ := ae_add_measure_iff.mp hgap + have hg0 : gamma = 0 := by + by_contra hne + have hw : ENNReal.ofReal gamma ≠ 0 := + (ENNReal.ofReal_pos.mpr (lt_of_le_of_ne hg (Ne.symm hne))).ne' + have hz : c ≤ (0 : ℝ) := (ae_dirac_iff measurableSet_Ici).mp + ((ae_ennreal_smul_measure_iff hw).mp hzero) + exact hc.not_ge hz + have hbound (i : ℕ) (hi : a i ≠ 0) : c ≤ a i := by + have hw : ENNReal.ofReal (a i) ≠ 0 := + (ENNReal.ofReal_pos.mpr (lt_of_le_of_ne (ha i) (Ne.symm hi))).ne' + exact (ae_dirac_iff measurableSet_Ici).mp + ((ae_ennreal_smul_measure_iff hw).mp ((ae_sum_iff.mp hatoms) i)) + have hsmall : ∀ᶠ i in cofinite, a i < c := + hs.tendsto_cofinite_zero.eventually_lt_const hc + refine ⟨hg0, (eventually_cofinite.mp hsmall).subset ?_, hbound⟩ + intro i hi + exact not_lt.mpr (hbound i hi) + +/-- A finite family of positive real numbers has a common positive lower bound, +including the empty family. -/ +private theorem exists_pos_le_finset {ι : Type*} (s : Finset ι) (a : ι → ℝ) + (ha : ∀ i ∈ s, 0 < a i) : ∃ c > 0, ∀ i ∈ s, c ≤ a i := by + classical + induction s using Finset.induction_on with + | empty => exact ⟨1, zero_lt_one, by simp⟩ + | @insert i s hi ih => + obtain ⟨c, hc, hcs⟩ := ih (fun j hj => ha j (Finset.mem_insert_of_mem hj)) + refine ⟨min (a i) c, lt_min (ha i (Finset.mem_insert_self _ _)) hc, ?_⟩ + intro j hj + rcases Finset.mem_insert.mp hj with rfl | hj + · exact min_le_left _ _ + · exact (min_le_right _ _).trans (hcs j hj) + +/-- Finitely many nonzero nonnegative slopes yield a positive support gap for +their slope-weighted atomic measure. The empty support gives the zero measure. -/ +theorem exists_pos_ae_le_sum_smul_dirac_of_finite_support + {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : (Function.support a).Finite) : + ∃ c > 0, ∀ᵐ x ∂Measure.sum + (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)), c ≤ x := by + classical + obtain ⟨c, hc, hcs⟩ := exists_pos_le_finset hs.toFinset a (fun i hi => + lt_of_le_of_ne (ha i) (Ne.symm (hs.mem_toFinset.mp hi))) + refine ⟨c, hc, ae_sum_iff.mpr fun i => ?_⟩ + by_cases hi : a i = 0 + · simp only [hi, ENNReal.ofReal_zero, zero_smul, ae_zero, Filter.eventually_bot] + · apply ae_smul_measure + exact (ae_dirac_iff measurableSet_Ici).mpr (hcs i (hs.mem_toFinset.mpr hi)) + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/AtomicRange.lean b/RealRooted/Mathlib/MeasureTheory/Measure/AtomicRange.lean new file mode 100644 index 000000000..7ab133314 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/AtomicRange.lean @@ -0,0 +1,73 @@ +/- +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.MeasureTheory.Measure.Typeclasses.Finite +import Mathlib.MeasureTheory.Measure.Dirac.Basic +import Mathlib.MeasureTheory.Measure.Restrict +import Mathlib.MeasureTheory.Measure.Real +import Mathlib.Topology.Algebra.InfiniteSum.Real + +/-! +# Atomic measures on an injective countable range + +A measure carried by an injective countable family is the sum of its singleton +masses. A distinguished atom can be separated from the remaining family. +No finiteness assumption on the measure is needed. +-/ + +public section + +open Set + +namespace MeasureTheory.Measure + +/-- The singleton masses along any injective family are summable for a finite +measure. The index type need not be countable. -/ +theorem summable_measureReal_singleton_comp {ι X : Type*} + [MeasurableSpace X] [MeasurableSingletonClass X] (mu : Measure X) + [IsFiniteMeasure mu] {a : ι → X} (hi : Function.Injective a) : + Summable (fun i ↦ mu.real {a i}) := by + apply summable_of_sum_le (c := mu.real univ) (fun _ ↦ measureReal_nonneg) + intro s + apply sum_measureReal_le_measureReal_univ (fun _ _ ↦ measurableSet_singleton _) + intro i _ j _ hij + exact disjoint_singleton.mpr (fun h ↦ hij (hi h)) + +/-- Restricting to an injective countable range is the sum of the corresponding +weighted Dirac measures. -/ +theorem restrict_range_eq_sum_smul_dirac {ι X : Type*} [Countable ι] + [MeasurableSpace X] [MeasurableSingletonClass X] (mu : Measure X) + {a : ι → X} (hi : Function.Injective a) : + mu.restrict (range a) = Measure.sum (fun i ↦ mu {a i} • dirac (a i)) := by + have hr : range a = ⋃ i, ({a i} : Set X) := by ext x; simp + rw [hr, restrict_iUnion] + · simp only [restrict_singleton] + · intro i j hij + exact disjoint_singleton.mpr (fun h ↦ hij (hi h)) + · intro i + exact measurableSet_singleton _ + +/-- A distinguished atom and an injective countable range give an exact atomic +measure decomposition whenever their union carries the measure. -/ +theorem eq_smul_dirac_add_sum_of_ae_mem_range {ι X : Type*} [Countable ι] + [MeasurableSpace X] [MeasurableSingletonClass X] (mu : Measure X) + {a : ι → X} {x₀ : X} (hi : Function.Injective a) (hzero : ∀ i, a i ≠ x₀) + (hcarry : ∀ᵐ x ∂mu, x = x₀ ∨ x ∈ range a) : + mu = mu {x₀} • dirac x₀ + Measure.sum (fun i ↦ mu {a i} • dirac (a i)) := by + have hc : ∀ᵐ x ∂mu, x ∈ ({x₀} : Set X) ∪ range a := by + simpa only [mem_union, mem_singleton_iff] using hcarry + have hd : Disjoint ({x₀} : Set X) (range a) := by + rw [disjoint_singleton_left] + rintro ⟨i, hi⟩ + exact hzero i hi + calc + mu = mu.restrict ({x₀} ∪ range a) := (restrict_eq_self_of_ae_mem hc).symm + _ = mu.restrict {x₀} + mu.restrict (range a) := + restrict_union' hd (measurableSet_singleton _) + _ = _ := by rw [restrict_singleton, mu.restrict_range_eq_sum_smul_dirac hi] + +end MeasureTheory.Measure diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/BoundedChainSupport.lean b/RealRooted/Mathlib/MeasureTheory/Measure/BoundedChainSupport.lean new file mode 100644 index 000000000..653392738 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/BoundedChainSupport.lean @@ -0,0 +1,39 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.MeasureTheory.Measure.ExactMomentSupport +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainCoefficientBound + +/-! +# Compact support without initial-parameter normalization +-/ + +public section + +open PowerSeries + +namespace MeasureTheory + +/-- Bounded chain parameters force the exact compact support even when the +initial parameter is an arbitrary member of `[0,1]`. -/ +theorem ae_mem_Icc_of_bounded_chain_moments {mu : Measure ℝ} {L mass : ℝ} + (hL : 0 ≤ L) (hmass : 0 ≤ mass) {g : ℕ → ℝ} + (hg : ∀ n, g n ∈ Set.Icc 0 1) (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) + (hmom : ∀ n, (∫ x : ℝ, x ^ n ∂mu) = + mass * coeff n (stieltjesTail (chainStieltjesNumerators L g) 0)) : + ∀ᵐ x ∂mu, x ∈ Set.Icc 0 L := by + have hbound (n : ℕ) : (∫ x : ℝ, x ^ (2 * n) ∂mu) ≤ mass * L ^ (2 * n) := by + rw [hmom] + exact mul_le_mul_of_nonneg_left (coeff_chainStieltjes_le_pow hL hg (2 * n)) hmass + have habs := ae_abs_le_of_even_moment_bound hL (fun n => hint (2 * n)) hbound + filter_upwards [hpos, habs] with x hx hxb + exact ⟨hx, (le_abs_self x).trans hxb⟩ + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/ChainMomentSupport.lean b/RealRooted/Mathlib/MeasureTheory/Measure/ChainMomentSupport.lean new file mode 100644 index 000000000..131456ea6 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/ChainMomentSupport.lean @@ -0,0 +1,88 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.MeasureTheory.Measure.MomentTranslation +import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeMoments +import RealRooted.Mathlib.MeasureTheory.Measure.SqrtMoments +import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSupport +import RealRooted.Mathlib.MeasureTheory.Measure.SqrtTranslation +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainAeration +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.MeasureBound + +/-! +# Sharp support for bounded chain moments + +The initial Catalan bound supplies compactness. The translated symmetric +square-root law has explicit nonnegative Stieltjes data, so determinacy makes +that actual translated law nonnegative. Reflection symmetry then confines +the lift to `[-sqrt L,sqrt L]`, giving the sharp original support `[0,L]`. +-/ + +public section + +open PowerSeries + +namespace MeasureTheory + +/-- Every genuine nonnegative representing measure of a Wall chain with initial +parameter zero is carried by its stated compact interval. -/ +theorem ae_mem_Icc_of_chain_moments {mu : Measure ℝ} {L mass : ℝ} + (hL : 0 ≤ L) (hmass : 0 ≤ mass) {g : ℕ → ℝ} (hg0 : g 0 = 0) + (hg : ∀ n, g n ∈ Set.Icc 0 1) (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) + (hmom : ∀ n, (∫ x : ℝ, x ^ n ∂mu) = + mass * coeff n (stieltjesTail (chainStieltjesNumerators L g) 0)) : + ∀ᵐ x ∂mu, x ∈ Set.Icc 0 L := by + have hbound := ae_abs_le_of_stieltjes_bound hmass hL + (chainStieltjesNumerators_nonneg hL hg) (chainStieltjesNumerators_le hL hg) hint hmom + have hs : ∀ᵐ x ∂mu, x ∈ Set.Icc 0 (4 * L + 1) := by + filter_upwards [hpos, hbound] with x hx hxb + exact ⟨hx, (le_abs_self x).trans hxb⟩ + have hlift := Measure.ae_abs_sqrtSymmetrization_le hs + let sigma := mu.sqrtSymmetrization.map (fun x => x + Real.sqrt L) + have hsigmaInt (n : ℕ) : Integrable (fun x : ℝ => x ^ n) sigma := + integrable_pow_map_add (Measure.integrable_pow_sqrtSymmetrization hpos hint) + (Real.sqrt L) n + have hsigmaBound : ∀ᵐ x ∂sigma, |x| ≤ Real.sqrt (4 * L + 1) + Real.sqrt L := by + apply (ae_map_iff (by fun_prop) + (isClosed_le continuous_abs continuous_const).measurableSet).mpr + filter_upwards [hlift] with x hx + calc + |x + Real.sqrt L| ≤ |x| + |Real.sqrt L| := abs_add_le _ _ + _ ≤ _ := by rw [abs_of_nonneg (Real.sqrt_nonneg L)]; exact add_le_add hx le_rfl + have hf : mk (fun n => ∫ x : ℝ, x ^ n ∂mu) = + C mass * stieltjesTail (chainStieltjesNumerators L g) 0 := by + ext n + simpa only [coeff_mk, coeff_C_mul] using hmom n + have hchain : binomialTransform (Real.sqrt L) + ((stieltjesTail (chainStieltjesNumerators L g) 0).subst (X ^ 2 : ℝ⟦X⟧)) = + stieltjesTail (chainAerationNumerators (Real.sqrt L) g) 0 := by + simpa only [Real.sq_sqrt hL] using binomialTransform_aerated_chain (Real.sqrt L) hg0 + have hy : HasSubst (X ^ 2 : ℝ⟦X⟧) := .of_constantCoeff_zero' (by simp) + have hseries : mk (fun n => ∫ x : ℝ, x ^ n ∂sigma) = + C mass * stieltjesTail (chainAerationNumerators (Real.sqrt L) g) 0 := by + dsimp only [sigma] + rw [Measure.mk_moments_map_add_sqrtSymmetrization hpos hint, hf, + subst_mul hy, subst_C, ← C_apply, binomialTransform_C_mul, hchain] + have hsigmaPos := ae_nonneg_of_bounded_stieltjes_moments + (chainAerationNumerators_nonneg (Real.sqrt_nonneg L) hg) hmass + hsigmaBound hsigmaInt hseries + have hlo : ∀ᵐ x ∂mu.sqrtSymmetrization, -Real.sqrt L ≤ x := by + have h := (ae_map_iff (by fun_prop) measurableSet_Ici).mp hsigmaPos + filter_upwards [h] with x hx + linarith + have hneg : ∀ᵐ x ∂mu.sqrtSymmetrization, -Real.sqrt L ≤ -x := by + apply (ae_map_iff (by fun_prop) measurableSet_Ici).mp + rw [Measure.map_neg_sqrtSymmetrization] + exact hlo + apply Measure.ae_mem_Icc_of_sqrtSymmetrization hL hpos + filter_upwards [hlo, hneg] with x hx hnx + exact abs_le.mpr ⟨hx, by linarith⟩ + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/CompactMomentTransform.lean b/RealRooted/Mathlib/MeasureTheory/Measure/CompactMomentTransform.lean new file mode 100644 index 000000000..659e3ecd3 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/CompactMomentTransform.lean @@ -0,0 +1,57 @@ +/- +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.MeasureTheory.Integral.Bochner.Basic +import Mathlib.MeasureTheory.Integral.DominatedConvergence +import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap +import Mathlib.Analysis.SpecificLimits.Normed + +/-! +# The local transform of a bounded moment measure + +For a finite measure supported in `[-R,R]`, its signed moments form the Taylor +series of `∫ (1 + z x)⁻¹`. A geometric majorant justifies integration term by +term. The statement also covers `R = 0` and the zero measure. +-/ + +public section + +open Filter MeasureTheory Topology + +namespace MeasureTheory.Measure + +/-- A bounded moment measure has a locally convergent reciprocal-kernel series. +The bound is almost everywhere, so no topological support convention is needed. -/ +theorem hasSum_moments_integral_inv {mu : Measure ℝ} [IsFiniteMeasure mu] + {R : ℝ} (hR : 0 ≤ R) (hb : ∀ᵐ x ∂mu, |x| ≤ R) + {z : ℂ} (hz : ‖z‖ * R < 1) : + HasSum (fun n : ℕ ↦ (-z) ^ n * ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) + (∫ x : ℝ, (1 + z * (x : ℂ))⁻¹ ∂mu) := by + let q := ‖z‖ * R + have hq : 0 ≤ q := mul_nonneg (norm_nonneg z) hR + have hnorm (x : ℝ) (hx : |x| ≤ R) : ‖-z * (x : ℂ)‖ ≤ q := by + simp only [norm_mul, norm_neg, Complex.norm_real, Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left hx (norm_nonneg z) + have hsum := hasSum_integral_of_dominated_convergence + (μ := mu) (F := fun n : ℕ ↦ fun x : ℝ ↦ (-z * (x : ℂ)) ^ n) + (f := fun x : ℝ ↦ (1 + z * (x : ℂ))⁻¹) + (fun n _ ↦ q ^ n) + (fun n ↦ ((continuous_const.mul Complex.continuous_ofReal).pow n).aestronglyMeasurable) + (fun n ↦ hb.mono fun x hx ↦ by + rw [norm_pow] + exact pow_le_pow_left₀ (norm_nonneg _) (hnorm x hx) n) + (Filter.Eventually.of_forall fun _ ↦ summable_geometric_of_lt_one hq hz) + (integrable_const _) + (hb.mono fun x hx ↦ by + simpa only [neg_mul, sub_neg_eq_add] using + hasSum_geometric_of_norm_lt_one ((hnorm x hx).trans_lt hz)) + simpa only [mul_pow, integral_const_mul, ← Complex.ofReal_pow, integral_complex_ofReal] + using hsum + +end MeasureTheory.Measure + +end diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/ExactMomentSupport.lean b/RealRooted/Mathlib/MeasureTheory/Measure/ExactMomentSupport.lean new file mode 100644 index 000000000..da72738db --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/ExactMomentSupport.lean @@ -0,0 +1,30 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.MeasureTheory.Function.AEEqOfLIntegral +import RealRooted.Mathlib.MeasureTheory.Measure.MomentDeterminacy + +/-! +# The exact radius from geometric even-moment bounds +-/ + +public section + +namespace MeasureTheory + +/-- Geometric even-moment bounds confine a positive measure to the stated +closed radius, including radius zero. -/ +theorem ae_abs_le_of_even_moment_bound {mu : Measure ℝ} {C R : ℝ} (hR : 0 ≤ R) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ (2 * n)) mu) + (hbound : ∀ n : ℕ, (∫ x : ℝ, x ^ (2 * n) ∂mu) ≤ C * R ^ (2 * n)) : + ∀ᵐ x ∂mu, |x| ≤ R := by + apply (ae_le_const_iff_forall_gt_measure_zero (fun x : ℝ => |x|) R).mpr + intro T hT + exact measure_abs_ge_eq_zero_of_even_moment_bound hR hT hint hbound + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/FiniteMomentStieltjes.lean b/RealRooted/Mathlib/MeasureTheory/Measure/FiniteMomentStieltjes.lean new file mode 100644 index 000000000..96bac4c97 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/FiniteMomentStieltjes.lean @@ -0,0 +1,130 @@ +/- +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 TauCeti.Analysis.CompletelyMonotone.Stieltjes.Holomorphic +public import TauCeti.Analysis.CompletelyMonotone.Stieltjes.Inversion +import Mathlib.MeasureTheory.Integral.Bochner.Set + +/-! +# Stieltjes representation of a finite nonnegative moment transform + +For a finite measure `μ` on `ℝ≥0`, its reciprocal-kernel transform has Stieltjes +data `(μ.stieltjesInversion, 0, μ.real {0})`. The original atom at zero is the +constant term. The reciprocal measure need not be finite; the required +Stieltjes weight is integrable by the existing inversion theorem. +-/ + +public section + +open Complex MeasureTheory Set NNReal + +namespace MeasureTheory.Measure + +/-- The finite moment kernel splits into its zero atom and the reciprocal +Stieltjes kernel. This identity also holds at totalized division poles. -/ +private theorem inv_one_add_mul_eq_indicator_add (z : ℂ) (x : ℝ≥0) : + (1 + z * ((x : ℝ) : ℂ))⁻¹ = + ({0} : Set ℝ≥0).indicator (fun _ ↦ (1 : ℂ)) x + + (x : ℝ)⁻¹ • (z + (((x⁻¹ : ℝ≥0) : ℝ) : ℂ))⁻¹ := by + by_cases hx : x = 0 + · simp [hx] + have hx' : ((x : ℝ) : ℂ) ≠ 0 := + Complex.ofReal_ne_zero.mpr (NNReal.coe_ne_zero.mpr hx) + rw [indicator_of_notMem (by simpa using hx), zero_add] + simp only [NNReal.coe_inv, Complex.real_smul, Complex.ofReal_inv] + have heq : 1 + z * ((x : ℝ) : ℂ) = + (z + (((x : ℝ) : ℂ))⁻¹) * ((x : ℝ) : ℂ) := by + rw [add_mul, inv_mul_cancel₀ hx'] + exact add_comm _ _ + rw [heq, mul_inv_rev] + +/-- A finite measure yields an integrable Stieltjes weight after inversion, +without any assumption on its atom at zero. -/ +theorem integrable_weight_stieltjesInversion_of_finite + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] : + Integrable TauCeti.stieltjesWeight mu.stieltjesInversion := by + apply integrable_weight_stieltjesInversion_iff_restrict.mpr + exact (TauCeti.integrable_stieltjesWeight mu).restrict + +/-- The reciprocal moment kernel is integrable on the slit plane. The original +measure is finite, while its reciprocal Stieltjes measure may be infinite. -/ +theorem integrable_inv_one_add_mul_of_mem_slitPlane + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] {z : ℂ} (hz : z ∈ slitPlane) : + Integrable (fun x : ℝ≥0 ↦ (1 + z * ((x : ℝ) : ℂ))⁻¹) mu := by + have hi := TauCeti.integrable_inv_add_of_mem_slitPlane + (mu.integrable_weight_stieltjesInversion_of_finite) hz + have hr := integrable_stieltjesInversion_iff.mp hi + have ha : Integrable (({0} : Set ℝ≥0).indicator (fun _ ↦ (1 : ℂ))) mu := + (integrable_const (1 : ℂ)).indicator (measurableSet_singleton 0) + exact (ha.add hr).congr (Filter.Eventually.of_forall fun x ↦ + (inv_one_add_mul_eq_indicator_add z x).symm) + +/-- Integration of the reciprocal-kernel identity separates the original zero atom. +This formula uses only the public change-of-variables theorem for inversion. -/ +private theorem integral_inv_one_add_mul_eq_zero_add + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] {z : ℂ} (hz : z ∈ slitPlane) : + (∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) = + (mu.real {0} : ℂ) + + ∫ x : ℝ≥0, (z + ((x : ℝ) : ℂ))⁻¹ ∂mu.stieltjesInversion := by + have hi := TauCeti.integrable_inv_add_of_mem_slitPlane + (mu.integrable_weight_stieltjesInversion_of_finite) hz + have hr := integrable_stieltjesInversion_iff.mp hi + have ha : Integrable (({0} : Set ℝ≥0).indicator (fun _ ↦ (1 : ℂ))) mu := + (integrable_const (1 : ℂ)).indicator (measurableSet_singleton 0) + simp_rw [inv_one_add_mul_eq_indicator_add] + rw [integral_add ha hr, integral_indicator_const _ (measurableSet_singleton 0), + ← integral_stieltjesInversion (μ := mu) (fun x : ℝ≥0 ↦ (z + ((x : ℝ) : ℂ))⁻¹)] + simp only [Complex.real_smul, mul_one] + +/-- The finite reciprocal moment transform is holomorphic on the slit plane. -/ +theorem analyticOnNhd_integral_inv_one_add_mul + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] : + AnalyticOnNhd ℂ (fun z ↦ ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) + slitPlane := by + have hd : DifferentiableOn ℂ + (fun z ↦ (mu.real {0} : ℂ) + + ∫ x : ℝ≥0, (z + ((x : ℝ) : ℂ))⁻¹ ∂mu.stieltjesInversion) + slitPlane := by + intro z hz + exact ((TauCeti.hasDerivAt_integral_inv_add + mu.integrable_weight_stieltjesInversion_of_finite hz).const_add + (mu.real {0} : ℂ)).differentiableAt.differentiableWithinAt + apply (hd.analyticOnNhd isOpen_slitPlane).congr isOpen_slitPlane + intro z hz + exact (integral_inv_one_add_mul_eq_zero_add mu hz).symm + +/-- Explicit Stieltjes data for the real part of the moment transform. Only +positive arguments are constrained by the Stieltjes representation predicate. -/ +theorem representsStieltjes_integral_inv_one_add_mul + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] : + TauCeti.RepresentsStieltjes mu.stieltjesInversion 0 + (Real.toNNReal (mu.real {0})) + (fun t : ℝ ↦ (∫ x : ℝ≥0, (1 + (t : ℂ) * ((x : ℝ) : ℂ))⁻¹ ∂mu).re) := by + apply TauCeti.representsStieltjes_iff.mpr + refine ⟨stieltjesInversion_singleton_zero, + mu.integrable_weight_stieltjesInversion_of_finite, fun t ht ↦ ?_⟩ + rw [integral_inv_one_add_mul_eq_zero_add mu (ofReal_mem_slitPlane.mpr ht)] + simp only [NNReal.coe_zero, zero_div, zero_add, Complex.ofReal_re, + Real.coe_toNNReal _ measureReal_nonneg, ← Complex.ofReal_add, ← Complex.ofReal_inv, + integral_complex_ofReal] + +/-- The complex moment transform has explicit Stieltjes data on the slit plane. +The zero atom becomes a constant, rather than a singular coefficient of `1/z`. -/ +theorem integral_inv_one_add_mul_eq_stieltjesExtension + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] {z : ℂ} (hz : z ∈ slitPlane) : + (∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) = + TauCeti.stieltjesExtension mu.stieltjesInversion 0 + (Real.toNNReal (mu.real {0})) z := by + apply (mu.representsStieltjes_integral_inv_one_add_mul.eqOn_stieltjesExtension + mu.analyticOnNhd_integral_inv_one_add_mul ?_) hz + intro t _ + simp only [← Complex.ofReal_mul, ← Complex.ofReal_one, ← Complex.ofReal_add, + ← Complex.ofReal_inv, integral_complex_ofReal, Complex.ofReal_re] + +end MeasureTheory.Measure + +end diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/FirstMomentTight.lean b/RealRooted/Mathlib/MeasureTheory/Measure/FirstMomentTight.lean new file mode 100644 index 000000000..c05fb1ffa --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/FirstMomentTight.lean @@ -0,0 +1,59 @@ +/- +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.MeasureTheory.Measure.Tight + +/-! +# Tightness from a bounded first moment on the nonnegative half-line + +A family of positive measures with a common finite first-moment bound is +tight. Markov's inequality controls the mass outside a compact interval. +This statement does not require a positive total mass or normalization. +-/ + +public section + +open MeasureTheory Set +open scoped ENNReal NNReal + +namespace MeasureTheory + +/-- A bounded first moment makes a family of measures on the nonnegative +half-line tight, including families containing the zero measure. -/ +theorem isTightMeasureSet_of_lintegral_id_le {S : Set (Measure ℝ≥0)} {C : ℝ≥0} + (hC : ∀ μ ∈ S, ∫⁻ x : ℝ≥0, (x : ℝ≥0∞) ∂μ ≤ C) : + IsTightMeasureSet S := by + apply isTightMeasureSet_iff_exists_isCompact_measure_compl_le.mpr + intro ε hε + obtain ⟨δ, hδ, hδε⟩ := ENNReal.lt_iff_exists_nnreal_btwn.mp hε + have hδpos : 0 < δ := by exact_mod_cast hδ + let R : ℝ≥0 := C / δ + 1 + have hR : 0 < R := by positivity + have hquot : C / R ≤ δ := by + rw [div_le_iff₀ hR] + calc + C = δ * (C / δ) := by rw [mul_comm δ, div_mul_cancel₀ _ hδpos.ne'] + _ ≤ δ * R := by + gcongr + exact le_add_of_nonneg_right zero_le_one + refine ⟨Icc (0 : ℝ≥0) R, isCompact_Icc, fun μ hμ => ?_⟩ + calc + μ (Icc (0 : ℝ≥0) R)ᶜ ≤ μ {x : ℝ≥0 | (R : ℝ≥0∞) ≤ (x : ℝ≥0∞)} := by + apply measure_mono + intro x hx + have hx' : R < x := by simpa using hx + exact ENNReal.coe_le_coe.mpr hx'.le + _ ≤ (∫⁻ x : ℝ≥0, (x : ℝ≥0∞) ∂μ) / (R : ℝ≥0∞) := + meas_ge_le_lintegral_div (by fun_prop) (by exact_mod_cast hR.ne') + ENNReal.coe_ne_top + _ ≤ (C : ℝ≥0∞) / (R : ℝ≥0∞) := by gcongr; exact hC μ hμ + _ ≤ (δ : ℝ≥0∞) := by + rw [← ENNReal.coe_div hR.ne'] + exact ENNReal.coe_le_coe.mpr hquot + _ ≤ ε := hδε.le + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/LocalMomentTransform.lean b/RealRooted/Mathlib/MeasureTheory/Measure/LocalMomentTransform.lean new file mode 100644 index 000000000..7cc3ff582 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/LocalMomentTransform.lean @@ -0,0 +1,85 @@ +/- +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.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.MeasureTheory.Measure.AnalyticMomentSupport +import RealRooted.Mathlib.MeasureTheory.Measure.CompactMomentTransform +import Mathlib.Analysis.Analytic.OfScalars + +/-! +# Recovering an analytic germ from its signed moments + +An analytic germ whose signed Taylor coefficients are the genuine moments of a +positive measure agrees locally with its reciprocal-kernel integral. Analyticity +itself forces bounded support, so the conclusion does not require it as input. + +For a logarithmic derivative this establishes the local transform identity in +Sokal's moment criterion. It does not yet continue that identity globally or +reconstruct the Type-I canonical product. +-/ + +public section + +open Filter MeasureTheory Topology + +/-- For a bounded moment measure, agreement of the actual complex Taylor +coefficients gives equality of germs with the reciprocal-kernel integral. -/ +theorem AnalyticAt.eventuallyEq_integral_inv_of_bounded_moments + {f : ℂ → ℂ} {mu : Measure ℝ} [IsFiniteMeasure mu] + (hf : AnalyticAt ℂ f 0) {R : ℝ} (hR : 0 ≤ R) + (hb : ∀ᵐ x ∂mu, |x| ≤ R) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n f 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + f =ᶠ[𝓝 0] fun z ↦ ∫ x : ℝ, (1 + z * (x : ℂ))⁻¹ ∂mu := by + have hsmall : ∀ᶠ z : ℂ in 𝓝 0, ‖z‖ * R < 1 := by + exact (continuous_norm.mul_const R).continuousAt.eventually + (gt_mem_nhds (by simp : ‖(0 : ℂ)‖ * R < 1)) + filter_upwards [hf.hasFPowerSeriesAt.eventually_hasSum, hsmall] with z hz hzb + have hs : HasSum (fun n : ℕ ↦ (iteratedDeriv n f 0 / n.factorial) * z ^ n) + (f z) := by + simpa only [FormalMultilinearSeries.ofScalars_apply_eq, smul_eq_mul, zero_add] using hz + have hterm (n : ℕ) : (iteratedDeriv n f 0 / n.factorial) * z ^ n = + (-z) ^ n * ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ) := by + rw [← hmom n, mul_div_assoc] + calc + _ = ((-z) ^ n * (-1 : ℂ) ^ n) * (iteratedDeriv n f 0 / n.factorial) := by + rw [← mul_pow] + simp only [neg_mul_neg, mul_one, mul_comm] + _ = _ := mul_assoc _ _ _ + exact (hs.congr_fun fun n ↦ (hterm n).symm).unique + (Measure.hasSum_moments_integral_inv (mu := mu) hR hb hzb) + +/-- Signed Taylor moments of an analytic germ determine its local reciprocal +transform. Every power must be integrable; equality of totalized integrals +without this hypothesis would not imply finiteness or compact support. -/ +theorem AnalyticAt.eventuallyEq_integral_inv_of_moments + {f : ℂ → ℂ} {mu : Measure ℝ} (hf : AnalyticAt ℂ f 0) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n f 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + f =ᶠ[𝓝 0] fun z ↦ ∫ x : ℝ, (1 + z * (x : ℂ))⁻¹ ∂mu := by + have : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hint 0) + obtain ⟨R, hR, hb⟩ := + Measure.exists_pos_ae_abs_le_of_analytic_moments (mu := mu) hf hint hmom + exact hf.eventuallyEq_integral_inv_of_bounded_moments hR.le hb hmom + +/-- The local analytic identity obtained from the signed logarithmic-derivative +moments in Sokal's criterion. The original function only needs to be analytic +and nonzero at the base point. No realness or growth hypothesis is added. -/ +theorem AnalyticAt.eventuallyEq_logDeriv_integral_inv_of_moments + {f : ℂ → ℂ} {mu : Measure ℝ} (hf : AnalyticAt ℂ f 0) (h0 : f 0 ≠ 0) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + logDeriv f =ᶠ[𝓝 0] fun z ↦ ∫ x : ℝ, (1 + z * (x : ℂ))⁻¹ ∂mu := by + exact (hf.deriv.div hf h0).eventuallyEq_integral_inv_of_moments hint hmom + +end diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/MomentDeterminacy.lean b/RealRooted/Mathlib/MeasureTheory/Measure/MomentDeterminacy.lean new file mode 100644 index 000000000..d0161c29b --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/MomentDeterminacy.lean @@ -0,0 +1,114 @@ +/- +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.MeasureTheory.Integral.Bochner.Basic +import TauCeti.MeasureTheory.Function.PolynomialMemLp +import TauCeti.Probability.Moments.CompactDeterminacy + +/-! +# Moment determinacy with one bounded support + +Even-moment bounds force a measure into every larger interval. Thus a finite +measure with bounded support is determined by its power moments among all +measures whose power moments are integrable. The competitor need not be +assumed finite or bounded: the zeroth moment supplies finiteness, and Markov's +inequality supplies bounded support. The final compact determinacy step uses +`TauCeti.Measure.ext_of_forall_integral_pow_eq_of_support`. + +Moment integrability is essential because Bochner integrals are zero when +undefined. Equality of totalized integral values alone does not suffice. +-/ + +public section + +open Filter Topology + +namespace MeasureTheory + +/-- Geometric even-moment bounds exclude mass outside every larger interval. -/ +theorem measure_abs_ge_eq_zero_of_even_moment_bound + {mu : Measure ℝ} {C R T : ℝ} + (hR : 0 ≤ R) (hRT : R < T) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ (2 * n)) mu) + (hbound : ∀ n : ℕ, (∫ x : ℝ, x ^ (2 * n) ∂mu) ≤ C * R ^ (2 * n)) : + mu {x : ℝ | T ≤ |x|} = 0 := by + have : IsFiniteMeasure mu := (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa using hint 0) + have hT : 0 < T := lt_of_le_of_lt hR hRT + have hratio : 0 ≤ R / T := div_nonneg hR hT.le + have hratio1 : R / T < 1 := (div_lt_one hT).mpr hRT + have hq : (R / T) ^ 2 < 1 := pow_lt_one₀ hratio hratio1 (by norm_num) + have hmass (n : ℕ) : mu.real {x : ℝ | T ≤ |x|} ≤ C * ((R / T) ^ 2) ^ n := by + have hf : Integrable (fun x : ℝ => (x / T) ^ (2 * n)) mu := by + simpa only [div_pow] using (hint n).div_const (T ^ (2 * n)) + have hn : ∀ x : ℝ, 0 ≤ (x / T) ^ (2 * n) := by + intro x + rw [pow_mul] + positivity + have hm := mul_meas_ge_le_integral_of_nonneg (Filter.Eventually.of_forall hn) hf 1 + rw [one_mul] at hm + have hsub : {x : ℝ | T ≤ |x|} ⊆ {x : ℝ | 1 ≤ (x / T) ^ (2 * n)} := by + intro x hx + have hx' : 1 ≤ |x / T| := by + rw [abs_div, abs_of_pos hT] + exact (one_le_div hT).mpr hx + have hp := one_le_pow₀ hx' (n := 2 * n) + rwa [← abs_pow, abs_of_nonneg (hn x)] at hp + calc + mu.real {x : ℝ | T ≤ |x|} ≤ mu.real {x : ℝ | 1 ≤ (x / T) ^ (2 * n)} := + measureReal_mono hsub + _ ≤ ∫ x : ℝ, (x / T) ^ (2 * n) ∂mu := hm + _ = (∫ x : ℝ, x ^ (2 * n) ∂mu) / T ^ (2 * n) := by + simp only [div_pow, integral_div] + _ ≤ (C * R ^ (2 * n)) / T ^ (2 * n) := + div_le_div_of_nonneg_right (hbound n) (pow_nonneg hT.le _) + _ = C * ((R / T) ^ 2) ^ n := by rw [← pow_mul, div_pow]; ring + have hz : Tendsto (fun n : ℕ => C * ((R / T) ^ 2) ^ n) atTop (𝓝 0) := by + simpa using (tendsto_pow_atTop_nhds_zero_of_lt_one (sq_nonneg (R / T)) hq).const_mul C + apply (measureReal_eq_zero_iff (μ := mu)).mp + exact le_antisymm (ge_of_tendsto hz (Filter.Eventually.of_forall hmass)) measureReal_nonneg + + +/-- A finite measure with bounded support is determined by its moments among +finite measures for which the power moments are integrable. -/ +theorem Measure.ext_of_integral_pow_eq_of_ae_bounded + {mu nu : Measure ℝ} [IsFiniteMeasure mu] {R : ℝ} + (hmu : ∀ᵐ x ∂mu, |x| ≤ R) + (hnu : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) nu) + (hmom : ∀ n : ℕ, (∫ x : ℝ, x ^ n ∂mu : ℝ) = ∫ x : ℝ, x ^ n ∂nu) : + mu = nu := by + have : IsFiniteMeasure nu := (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa using hnu 0) + let B := max R 0 + have hB : 0 ≤ B := le_max_right _ _ + have hmub : ∀ᵐ x ∂mu, |x| ≤ B := hmu.mono fun _ hx => hx.trans (le_max_left _ _) + have hint (n : ℕ) : Integrable (fun x : ℝ => x ^ n) mu := + TauCeti.integrable_pow_of_ae_abs_le hmub n + have hbound (n : ℕ) : (∫ x : ℝ, x ^ (2 * n) ∂nu) ≤ mu.real Set.univ * B ^ (2 * n) := by + rw [← hmom] + calc + _ ≤ ∫ _x : ℝ, B ^ (2 * n) ∂mu := by + apply integral_mono_ae (hint _) (integrable_const _) + filter_upwards [hmub] with x hx + exact (le_abs_self _).trans (by + simpa only [abs_pow] using pow_le_pow_left₀ (abs_nonneg x) hx (2 * n)) + _ = mu.real Set.univ * B ^ (2 * n) := by simp [smul_eq_mul] + have htail := measure_abs_ge_eq_zero_of_even_moment_bound hB + (lt_add_one B) (fun n => hnu (2 * n)) hbound + have hmus : mu (Set.Icc (-(B + 1)) (B + 1))ᶜ = 0 := by + apply ae_iff.mp + filter_upwards [hmub] with x hx + exact abs_le.mp (hx.trans (le_add_of_nonneg_right zero_le_one)) + have hnus : nu (Set.Icc (-(B + 1)) (B + 1))ᶜ = 0 := by + apply measure_mono_null _ htail + intro x hx + change B + 1 ≤ |x| + have hx' : ¬ |x| ≤ B + 1 := by simpa only [Set.mem_compl_iff, Set.mem_Icc, abs_le] using hx + exact (lt_of_not_ge hx').le + exact TauCeti.Measure.ext_of_forall_integral_pow_eq_of_support isCompact_Icc hmus hnus hmom + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/MomentLimit.lean b/RealRooted/Mathlib/MeasureTheory/Measure/MomentLimit.lean new file mode 100644 index 000000000..8a34f33dc --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/MomentLimit.lean @@ -0,0 +1,119 @@ +/- +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.MeasureTheory.Measure.FiniteMeasure +import RealRooted.Mathlib.MeasureTheory.Measure.WeakMomentLimits +import RealRooted.Mathlib.MeasureTheory.Measure.FirstMomentTight +import TauCeti.MeasureTheory.Measure.Prokhorov + +/-! +# Closure of Stieltjes moment sequences under pointwise limits + +Convergence of the zeroth and first moments gives mass bounds and tightness. +Prokhorov compactness supplies a weak cluster measure; convergence of all +higher moments makes each polynomial test uniformly integrable. Thus limits +of genuine Stieltjes moment sequences are again genuine Stieltjes moments, +without a common compact support or an analytic growth assumption. +-/ + +public section + +open Filter MeasureTheory Set +open scoped ENNReal NNReal Topology + +namespace MeasureTheory + +/-- Limits of all natural moments of finite measures on `ℝ≥0` have a single +finite positive representing measure on `ℝ≥0`. -/ +theorem exists_measure_moments_nnreal_of_tendsto + (μs : ℕ → FiniteMeasure ℝ≥0) (m : ℕ → ℝ) + (hint : ∀ i k, Integrable (fun x : ℝ≥0 => (x : ℝ) ^ k) (μs i : Measure ℝ≥0)) + (hlim : ∀ k, Tendsto + (fun i => ∫ x : ℝ≥0, (x : ℝ) ^ k ∂(μs i : Measure ℝ≥0)) atTop (𝓝 (m k))) : + ∃ μ : Measure ℝ≥0, IsFiniteMeasure μ ∧ + ∀ k : ℕ, Integrable (fun x : ℝ≥0 => (x : ℝ) ^ k) μ ∧ + (∫ x : ℝ≥0, (x : ℝ) ^ k ∂μ) = m k := by + have hmasslim : Tendsto (fun i => ((μs i).mass : ℝ)) atTop (𝓝 (m 0)) := by + simpa only [pow_zero, integral_const, smul_eq_mul, mul_one, + Measure.real, ← FiniteMeasure.ennreal_mass, ENNReal.coe_toReal] using hlim 0 + obtain ⟨C0, hC0⟩ := hmasslim.isBoundedUnder_le.bddAbove_range + have hmass (i : ℕ) : (μs i).mass ≤ C0.toNNReal := + NNReal.le_toNNReal_of_coe_le (hC0 (mem_range_self i)) + obtain ⟨C1, hC1⟩ := (hlim 1).isBoundedUnder_le.bddAbove_range + have hfirst (i : ℕ) : ∫⁻ x : ℝ≥0, (x : ℝ≥0∞) ∂(μs i : Measure ℝ≥0) ≤ + (C1.toNNReal : ℝ≥0∞) := by + have hid := lintegral_pow_eq_ofReal_integral 1 (hint i 1) + simp only [pow_one] at hid + rw [hid] + change ENNReal.ofReal _ ≤ ENNReal.ofReal C1 + exact ENNReal.ofReal_le_ofReal (by simpa only [pow_one] using hC1 (mem_range_self i)) + have htight : IsTightMeasureSet (range fun i => (μs i : Measure ℝ≥0)) := + isTightMeasureSet_of_lintegral_id_le (by rintro _ ⟨i, rfl⟩; exact hfirst i) + obtain ⟨μ, U, hU, hfin, _, hweak⟩ := TauCeti.finite_measure_cluster_limit + (fun i => (μs i : Measure ℝ≥0)) C0.toNNReal + (fun i => by rw [← FiniteMeasure.ennreal_mass]; exact_mod_cast hmass i) htight + let ν : FiniteMeasure ℝ≥0 := ⟨μ, hfin⟩ + have hweak' : Tendsto μs (U : Filter ℕ) (𝓝 ν) := + FiniteMeasure.tendsto_iff_forall_integral_tendsto.mpr hweak + refine ⟨μ, hfin, fun k => ?_⟩ + exact FiniteMeasure.integral_pow_eq_of_tendsto hweak' hint + (fun j => (hlim j).mono_left hU) k + +/-- The representing measure in the moment-limit theorem may be regarded as +a real measure carried by `[0,∞)`. -/ +theorem exists_nonnegative_measure_moments_of_nnreal_tendsto + (μs : ℕ → FiniteMeasure ℝ≥0) (m : ℕ → ℝ) + (hint : ∀ i k, Integrable (fun x : ℝ≥0 => (x : ℝ) ^ k) (μs i : Measure ℝ≥0)) + (hlim : ∀ k, Tendsto + (fun i => ∫ x : ℝ≥0, (x : ℝ) ^ k ∂(μs i : Measure ℝ≥0)) atTop (𝓝 (m k))) : + ∃ μ : Measure ℝ, IsFiniteMeasure μ ∧ (∀ᵐ x ∂μ, 0 ≤ x) ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) μ ∧ + (∫ x : ℝ, x ^ k ∂μ) = m k := by + obtain ⟨μ, hfin, hmom⟩ := exists_measure_moments_nnreal_of_tendsto μs m hint hlim + let : IsFiniteMeasure μ := hfin + let ν := μ.map ((↑) : ℝ≥0 → ℝ) + refine ⟨ν, inferInstance, ?_, fun k => ⟨?_, ?_⟩⟩ + · exact ae_map_iff measurable_coe_nnreal_real.aemeasurable measurableSet_Ici |>.mpr + (.of_forall fun x => x.coe_nonneg) + · exact (integrable_map_measure (by fun_prop) (by fun_prop)).mpr (hmom k).1 + · rw [show ν = μ.map ((↑) : ℝ≥0 → ℝ) from rfl, + integral_map_of_stronglyMeasurable measurable_coe_nnreal_real (by fun_prop)] + exact (hmom k).2 + +/-- Pointwise limits of genuine Stieltjes moment sequences are Stieltjes +moment sequences. The approximating supports may grow without bound. -/ +theorem exists_nonnegative_measure_moments_of_tendsto + (μs : ℕ → FiniteMeasure ℝ) (m : ℕ → ℝ) + (hpos : ∀ i, ∀ᵐ x ∂(μs i : Measure ℝ), 0 ≤ x) + (hint : ∀ i k, Integrable (fun x : ℝ => x ^ k) (μs i : Measure ℝ)) + (hlim : ∀ k, Tendsto + (fun i => ∫ x : ℝ, x ^ k ∂(μs i : Measure ℝ)) atTop (𝓝 (m k))) : + ∃ μ : Measure ℝ, IsFiniteMeasure μ ∧ (∀ᵐ x ∂μ, 0 ≤ x) ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) μ ∧ + (∫ x : ℝ, x ^ k ∂μ) = m k := by + let νs : ℕ → FiniteMeasure ℝ≥0 := fun i => + ⟨(μs i : Measure ℝ).map Real.toNNReal, inferInstance⟩ + have hi (i k : ℕ) : Integrable (fun x : ℝ≥0 => (x : ℝ) ^ k) + (νs i : Measure ℝ≥0) := by + apply (integrable_map_measure (by fun_prop) measurable_real_toNNReal.aemeasurable).mpr + apply (hint i k).congr + filter_upwards [hpos i] with x hx + simp only [Function.comp_apply, Real.coe_toNNReal x hx] + have heq (i k : ℕ) : + (∫ x : ℝ≥0, (x : ℝ) ^ k ∂(νs i : Measure ℝ≥0)) = + ∫ x : ℝ, x ^ k ∂(μs i : Measure ℝ) := by + change (∫ x : ℝ≥0, (x : ℝ) ^ k + ∂(μs i : Measure ℝ).map Real.toNNReal) = _ + rw [integral_map_of_stronglyMeasurable measurable_real_toNNReal (by fun_prop)] + apply integral_congr_ae + filter_upwards [hpos i] with x hx + rw [Real.coe_toNNReal x hx] + apply exists_nonnegative_measure_moments_of_nnreal_tendsto νs m hi + intro k + simpa only [heq] using hlim k + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/MomentNevanlinna.lean b/RealRooted/Mathlib/MeasureTheory/Measure/MomentNevanlinna.lean new file mode 100644 index 000000000..122956053 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/MomentNevanlinna.lean @@ -0,0 +1,117 @@ +/- +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.MeasureTheory.Integral.Bochner.Basic +import TauCeti.Analysis.Complex.Pick.Nevanlinna +import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap +import Mathlib.MeasureTheory.Measure.WithDensity + +/-! +# Finite Nevanlinna data associated with nonnegative moments + +Weight a measure on `ℝ≥0` by `x / (1+x²)` and push it forward by `x ↦ -1/x`. +The weight is bounded, so finite moment measures yield finite Nevanlinna +measures. The zero atom disappears from this measure and contributes only to +the real constant in the representation of the negative moment transform. +-/ + +public section + +open Complex MeasureTheory Set +open scoped NNReal ENNReal + +namespace MeasureTheory.Measure + +/-- The bounded density converting a moment transform to Nevanlinna form. -/ +@[expose] noncomputable def momentNevanlinnaWeight (x : ℝ≥0) : ℝ≥0 := + x / (1 + x ^ 2) + +/-- The real value of the moment-to-Nevanlinna density. -/ +theorem coe_momentNevanlinnaWeight (x : ℝ≥0) : + (momentNevanlinnaWeight x : ℝ) = (x : ℝ) / (1 + (x : ℝ) ^ 2) := by + simp only [momentNevanlinnaWeight, NNReal.coe_div, NNReal.coe_add, + NNReal.coe_one, NNReal.coe_pow] + +/-- The moment-to-Nevanlinna density is measurable. -/ +@[fun_prop] +theorem measurable_momentNevanlinnaWeight : Measurable momentNevanlinnaWeight := by + unfold momentNevanlinnaWeight + fun_prop + +/-- The conversion density is at most one, including at zero. -/ +theorem momentNevanlinnaWeight_le_one (x : ℝ≥0) : momentNevanlinnaWeight x ≤ 1 := by + change x / (1 + x ^ 2) ≤ 1 + apply (div_le_one (by positivity : 0 < 1 + x ^ 2)).mpr + have hx : (x : ℝ) ≤ 1 + (x : ℝ) ^ 2 := by + nlinarith [sq_nonneg ((x : ℝ) - 1), x.coe_nonneg] + exact_mod_cast hx + +/-- A finite measure on nonnegative slopes induces a measure on negative roots. -/ +@[expose] noncomputable def momentNevanlinna (mu : Measure ℝ≥0) : Measure ℝ := + (mu.withDensity fun x ↦ (momentNevanlinnaWeight x : ℝ≥0∞)).map + (fun x : ℝ≥0 ↦ -(x : ℝ)⁻¹) + +/-- Finiteness of the original moment measure suffices for finite Nevanlinna +data; no inverse moment or bounded-away-from-zero support is required. -/ +theorem isFiniteMeasure_momentNevanlinna + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] : IsFiniteMeasure mu.momentNevanlinna := by + have hw : Integrable (fun x : ℝ≥0 ↦ (momentNevanlinnaWeight x : ℝ)) mu := by + apply (integrable_const (1 : ℝ)).mono' (by fun_prop) + apply Filter.Eventually.of_forall + intro x + rw [Real.norm_of_nonneg (momentNevanlinnaWeight x).coe_nonneg] + exact_mod_cast momentNevanlinnaWeight_le_one x + have : IsFiniteMeasure (mu.withDensity fun x ↦ (momentNevanlinnaWeight x : ℝ≥0∞)) := by + simpa only [ENNReal.ofReal_coe_nnreal] using + isFiniteMeasure_withDensity_ofReal hw.hasFiniteIntegral + exact Measure.isFiniteMeasure_map _ _ + +/-- Integration against the moment-induced Nevanlinna measure is explicit. -/ +theorem integral_momentNevanlinna + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + (mu : Measure ℝ≥0) {g : ℝ → E} (hg : StronglyMeasurable g) : + (∫ r : ℝ, g r ∂mu.momentNevanlinna) = + ∫ x : ℝ≥0, (momentNevanlinnaWeight x : ℝ) • g (-(x : ℝ)⁻¹) ∂mu := by + rw [momentNevanlinna, integral_map_of_stronglyMeasurable (by fun_prop) hg, + integral_withDensity_eq_integral_smul (by fun_prop)] + simp only [NNReal.smul_def] + +/-- The negative reciprocal map is injective on `ℝ≥0`, with totalized inverse +sending zero to zero. -/ +private theorem negative_reciprocal_injective : + Function.Injective (fun x : ℝ≥0 ↦ -(x : ℝ)⁻¹) := by + intro x y h + exact NNReal.coe_injective (inv_injective (neg_injective h)) + +/-- The mass at a reciprocal root is the original atom times the conversion +density. The formula remains valid at zero, where the density is zero. -/ +theorem momentNevanlinna_singleton (mu : Measure ℝ≥0) (a : ℝ≥0) : + mu.momentNevanlinna {-(a : ℝ)⁻¹} = + (momentNevanlinnaWeight a : ℝ≥0∞) * mu {a} := by + rw [momentNevanlinna, map_apply (by fun_prop) (measurableSet_singleton _)] + have hpre : (fun x : ℝ≥0 ↦ -(x : ℝ)⁻¹) ⁻¹' {-(a : ℝ)⁻¹} = {a} := by + ext x + exact negative_reciprocal_injective.eq_iff + rw [hpre, withDensity_apply _ (measurableSet_singleton _)] + simp [mul_comm] + +/-- The real singleton mass formula for the finite Nevanlinna measure. -/ +theorem momentNevanlinna_real_singleton (mu : Measure ℝ≥0) (a : ℝ≥0) : + mu.momentNevanlinna.real {-(a : ℝ)⁻¹} = + (a : ℝ) / (1 + (a : ℝ) ^ 2) * mu.real {a} := by + rw [measureReal_def, momentNevanlinna_singleton, ENNReal.toReal_mul, + ENNReal.coe_toReal, coe_momentNevanlinnaWeight] + rfl + +/-- The moment-induced Nevanlinna measure has no atom at the origin. -/ +theorem momentNevanlinna_singleton_zero (mu : Measure ℝ≥0) : + mu.momentNevanlinna {0} = 0 := by + simpa [momentNevanlinnaWeight] using mu.momentNevanlinna_singleton 0 + +end MeasureTheory.Measure + +end diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/MomentNevanlinnaRepresentation.lean b/RealRooted/Mathlib/MeasureTheory/Measure/MomentNevanlinnaRepresentation.lean new file mode 100644 index 000000000..954d1f223 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/MomentNevanlinnaRepresentation.lean @@ -0,0 +1,107 @@ +/- +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 RealRooted.Mathlib.MeasureTheory.Measure.MomentNevanlinna +public import TauCeti.Analysis.Complex.Pick.Nevanlinna + +/-! +# Nevanlinna representation of a moment transform + +The finite moment measure gives explicit Nevanlinna data with linear coefficient +zero. This identifies the representing measure before any canonical-product or +growth theorem is used. +-/ + +public section + +open Complex MeasureTheory Set +open scoped NNReal ENNReal + +namespace MeasureTheory.Measure + +/-- The algebraic moment-to-Nevanlinna kernel identity, including slope zero. -/ +private theorem neg_inv_one_add_mul_eq_nevanlinnaKernel {z : ℂ} + (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) (x : ℝ≥0) : + -(1 + z * ((x : ℝ) : ℂ))⁻¹ = + ((momentNevanlinnaWeight x : ℝ) : ℂ) * TauCeti.nevanlinnaKernel z (-(x : ℝ)⁻¹) - + (((1 + (x : ℝ) ^ 2)⁻¹ : ℝ) : ℂ) := by + by_cases hx : x = 0 + · simp [hx, momentNevanlinnaWeight] + have hxC : ((x : ℝ) : ℂ) ≠ 0 := + Complex.ofReal_ne_zero.mpr (NNReal.coe_ne_zero.mpr hx) + have hd : -(((x : ℝ) : ℂ))⁻¹ - z ≠ 0 := by + intro heq + have hi := congrArg Complex.im heq + have hxi : ((((x : ℝ) : ℂ))⁻¹).im = 0 := by + rw [← Complex.ofReal_inv, Complex.ofReal_im] + simp only [sub_im, neg_im, hxi, neg_zero, zero_sub, zero_im, neg_eq_zero] at hi + exact (ne_of_gt hz) hi + have hfac : 1 + z * ((x : ℝ) : ℂ) = + -((x : ℝ) : ℂ) * (-(((x : ℝ) : ℂ))⁻¹ - z) := by + calc + _ = ((x : ℝ) : ℂ) * (((x : ℝ) : ℂ))⁻¹ + z * ((x : ℝ) : ℂ) := by + rw [mul_inv_cancel₀ hxC] + _ = _ := by ring + have hd1 : 1 + z * ((x : ℝ) : ℂ) ≠ 0 := by + rw [hfac] + exact mul_ne_zero (neg_ne_zero.mpr hxC) hd + have hd2 : 1 + ((x : ℝ) : ℂ) ^ 2 ≠ 0 := by + exact_mod_cast (show 1 + (x : ℝ) ^ 2 ≠ 0 by positivity) + have hd3 : -1 - ((x : ℝ) : ℂ) * z ≠ 0 := by + rw [show -1 - ((x : ℝ) : ℂ) * z = -(1 + z * ((x : ℝ) : ℂ)) by ring] + exact neg_ne_zero.mpr hd1 + rw [coe_momentNevanlinnaWeight, TauCeti.nevanlinnaKernel_def] + push_cast + field_simp [hxC, hd, hd1, hd2] + field_simp [hd3] + ring + +/-- The real correction kernel is integrable against every finite slope measure. -/ +private theorem integrable_inv_one_add_sq + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] : + Integrable (fun x : ℝ≥0 ↦ (1 + (x : ℝ) ^ 2)⁻¹) mu := by + apply (integrable_const (1 : ℝ)).mono' (by fun_prop) + apply Filter.Eventually.of_forall + intro x + rw [Real.norm_of_nonneg (by positivity)] + exact inv_le_one_of_one_le₀ (by nlinarith [sq_nonneg (x : ℝ)]) + +/-- Explicit finite Nevanlinna representation of the negative moment transform. +The linear coefficient is exactly zero; the correction constant is real. -/ +theorem neg_integral_inv_one_add_mul_eq_nevanlinna + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] {z : ℂ} + (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) : + -(∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) = + (∫ r : ℝ, TauCeti.nevanlinnaKernel z r ∂mu.momentNevanlinna) - + ((∫ x : ℝ≥0, (1 + (x : ℝ) ^ 2)⁻¹ ∂mu : ℝ) : ℂ) := by + have : IsFiniteMeasure mu.momentNevanlinna := mu.isFiniteMeasure_momentNevanlinna + have hk := TauCeti.integrable_nevanlinnaKernel hz mu.momentNevanlinna + change Integrable (TauCeti.nevanlinnaKernel z) + ((mu.withDensity fun x ↦ (momentNevanlinnaWeight x : ℝ≥0∞)).map + (fun x : ℝ≥0 ↦ -(x : ℝ)⁻¹)) at hk + have hk' : Integrable (fun x : ℝ≥0 ↦ (momentNevanlinnaWeight x : ℝ) • + TauCeti.nevanlinnaKernel z (-(x : ℝ)⁻¹)) mu := + (integrable_withDensity_iff_integrable_coe_smul + measurable_momentNevanlinnaWeight).mp (hk.comp_measurable (by fun_prop)) + have hc : Integrable (fun x : ℝ≥0 ↦ (((1 + (x : ℝ) ^ 2)⁻¹ : ℝ) : ℂ)) mu := + (integrable_inv_one_add_sq mu).ofReal + rw [mu.integral_momentNevanlinna (TauCeti.measurable_nevanlinnaKernel z).stronglyMeasurable] + calc + -(∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) = + ∫ x : ℝ≥0, -(1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu := (integral_neg _).symm + _ = ∫ x : ℝ≥0, (momentNevanlinnaWeight x : ℝ) • + TauCeti.nevanlinnaKernel z (-(x : ℝ)⁻¹) - + (((1 + (x : ℝ) ^ 2)⁻¹ : ℝ) : ℂ) ∂mu := by + exact integral_congr_ae (Filter.Eventually.of_forall fun x ↦ by + simpa only [Complex.real_smul] using neg_inv_one_add_mul_eq_nevanlinnaKernel hz x) + _ = _ := by + simpa only [integral_complex_ofReal] using + integral_sub hk' hc + +end MeasureTheory.Measure + +end diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/MomentParity.lean b/RealRooted/Mathlib/MeasureTheory/Measure/MomentParity.lean new file mode 100644 index 000000000..3a601b161 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/MomentParity.lean @@ -0,0 +1,64 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentParity +import TauCeti.MeasureTheory.Integral.OddSymmetric + +/-! +# Monic orthogonal parity from symmetric measures + +Reflection-invariant real measures have vanishing odd power integrals. The +actual monic moment polynomial therefore has the parity of its degree whenever +the corresponding finite Hankel determinant is nonzero. The identity also +includes the degree-zero polynomial of the zero measure. + +No integrability premise is needed for the parity identity: odd Bochner +integrals vanish even when they are undefined and hence take value zero. +Interpreting the moment pairing as an integral of a polynomial product still +uses the usual finite-moment assumptions in the corresponding integration API. +-/ + +public section + +open Polynomial + +namespace MeasureTheory + +/-- Every odd power integral vanishes for a reflection-invariant real measure. -/ +theorem integral_pow_eq_zero_of_odd {mu : Measure ℝ} [mu.IsNegInvariant] + {n : ℕ} (hn : Odd n) : (∫ x : ℝ, x ^ n ∂mu) = 0 := + integral_eq_zero_of_odd fun x => hn.neg_pow x + +/-- Reflection symmetry of a measure gives parity of its monic moment polynomial. -/ +theorem monicMomentPolynomial_integral_eval_neg {mu : Measure ℝ} [mu.IsNegInvariant] + (n : ℕ) + (hdet : IsUnit (momentHankelMatrix (fun k => ∫ x : ℝ, x ^ k ∂mu) n).det) + (x : ℝ) : + (monicMomentPolynomial (fun k => ∫ y : ℝ, y ^ k ∂mu) n).eval (-x) = + (-1 : ℝ) ^ n * + (monicMomentPolynomial (fun k => ∫ y : ℝ, y ^ k ∂mu) n).eval x := + monicMomentPolynomial_eval_neg _ (fun _ hn => integral_pow_eq_zero_of_odd hn) n hdet x + +/-- The measure specialization in even degree. -/ +theorem even_monicMomentPolynomial_integral {mu : Measure ℝ} [mu.IsNegInvariant] + (n : ℕ) + (hdet : IsUnit (momentHankelMatrix (fun k => ∫ x : ℝ, x ^ k ∂mu) n).det) + (hn : Even n) : + Function.Even (monicMomentPolynomial (fun k => ∫ x : ℝ, x ^ k ∂mu) n).eval := + even_monicMomentPolynomial _ (fun _ hk => integral_pow_eq_zero_of_odd hk) n hdet hn + +/-- The measure specialization in odd degree. -/ +theorem odd_monicMomentPolynomial_integral {mu : Measure ℝ} [mu.IsNegInvariant] + (n : ℕ) + (hdet : IsUnit (momentHankelMatrix (fun k => ∫ x : ℝ, x ^ k ∂mu) n).det) + (hn : Odd n) : + Function.Odd (monicMomentPolynomial (fun k => ∫ x : ℝ, x ^ k ∂mu) n).eval := + odd_monicMomentPolynomial _ (fun _ hk => integral_pow_eq_zero_of_odd hk) n hdet hn + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/MomentTranslation.lean b/RealRooted/Mathlib/MeasureTheory/Measure/MomentTranslation.lean new file mode 100644 index 000000000..23dffa205 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/MomentTranslation.lean @@ -0,0 +1,100 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslation +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import TauCeti.MeasureTheory.Function.PolynomialMemLp + +/-! +# Translation of representing moment measures + +Pushforward by addition realizes the binomial transform of a moment sequence. +Every real translation is allowed. Support bounds translate with the same +parameter; preservation of nonnegative support needs a nonnegative shift. +The zero measure is included and no mass normalization is imposed. + +See Sokal and Walrad, arXiv:2404.12131v1, equation (7) and the opening of the +proof of Theorem 2. +-/ + +public section + +open Polynomial + +namespace MeasureTheory + +/-- All polynomial moments remain integrable after any real translation. -/ +theorem integrable_pow_map_add {mu : Measure ℝ} + (hmom : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) (c : ℝ) (n : ℕ) : + Integrable (fun x : ℝ => x ^ n) (mu.map fun x => x + c) := by + apply (integrable_map_measure (by fun_prop) (by fun_prop)).mpr + apply (TauCeti.integrable_eval_of_forall_integrable_pow hmom ((X + C c) ^ n)).congr + filter_upwards [] with x + simp only [Function.comp_def, eval_pow, eval_add, eval_X, eval_C] + +/-- The power moments of a translated measure are the binomial transform. -/ +theorem integral_pow_map_add {mu : Measure ℝ} + (hmom : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) (c : ℝ) (n : ℕ) : + (∫ x : ℝ, x ^ n ∂(mu.map fun x => x + c)) = + momentTranslate c (fun k => ∫ x : ℝ, x ^ k ∂mu) n := by + rw [integral_map_of_stronglyMeasurable (by fun_prop) (by fun_prop), + momentTranslate_eq_sum] + simp_rw [add_pow] + rw [integral_finsetSum _ fun k _ => + ((hmom k).mul_const (c ^ (n - k))).mul_const (n.choose k : ℝ)] + simp only [integral_mul_const] + apply Finset.sum_congr rfl + intro k _ + ring + +/-- A lower support bound moves by the same amount as the measure. -/ +theorem ae_add_le_map_add_iff (mu : Measure ℝ) (a c : ℝ) : + (∀ᵐ x ∂(mu.map fun y => y + c), a + c ≤ x) ↔ ∀ᵐ x ∂mu, a ≤ x := by + rw [ae_map_iff (by fun_prop) measurableSet_Ici] + simp + +/-- Both endpoints of a compact support interval translate by the same amount. -/ +theorem ae_mem_Icc_map_add_iff (mu : Measure ℝ) (a b c : ℝ) : + (∀ᵐ x ∂(mu.map fun y => y + c), x ∈ Set.Icc (a + c) (b + c)) ↔ + ∀ᵐ x ∂mu, x ∈ Set.Icc a b := by + simp only [Set.mem_Icc] + rw [ae_map_iff (by fun_prop) measurableSet_Icc] + simp + +/-- A nonnegative translation preserves nonnegative support. -/ +theorem ae_nonneg_map_add {mu : Measure ℝ} {c : ℝ} + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) (hc : 0 ≤ c) : + ∀ᵐ x ∂(mu.map fun y => y + c), 0 ≤ x := by + rw [ae_map_iff (by fun_prop) measurableSet_Ici] + filter_upwards [hmu] with x hx + exact add_nonneg hx hc + +/-- Subtracting a lower support endpoint reduces its moment problem to the +nonnegative half-line. This equivalence includes zero measures. -/ +theorem exists_measure_moments_Ici_iff (m : ℕ → ℝ) (c : ℝ) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n) ↔ + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, 0 ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = momentTranslate (-c) m n) := by + constructor + · rintro ⟨mu, hsupp, hmom⟩ + have hi : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu := fun n => (hmom n).1 + have heq : (fun n => ∫ x : ℝ, x ^ n ∂mu) = m := funext fun n => (hmom n).2 + refine ⟨mu.map (fun x => x + -c), ?_, fun n => ⟨integrable_pow_map_add hi (-c) n, ?_⟩⟩ + · simpa only [add_neg_cancel] using (ae_add_le_map_add_iff mu c (-c)).mpr hsupp + · rw [integral_pow_map_add hi, heq] + · rintro ⟨mu, hsupp, hmom⟩ + have hi : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu := fun n => (hmom n).1 + have heq : (fun n => ∫ x : ℝ, x ^ n ∂mu) = momentTranslate (-c) m := + funext fun n => (hmom n).2 + refine ⟨mu.map (fun x => x + c), ?_, fun n => ⟨integrable_pow_map_add hi c n, ?_⟩⟩ + · simpa only [zero_add] using (ae_add_le_map_add_iff mu 0 c).mpr hsupp + · rw [integral_pow_map_add hi, heq, momentTranslate_neg_cancel_right] + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeAtomicMap.lean b/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeAtomicMap.lean new file mode 100644 index 000000000..e1a9611bd --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeAtomicMap.lean @@ -0,0 +1,55 @@ +/- +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.MeasureTheory.Constructions.BorelSpace.Basic +import Mathlib.MeasureTheory.Measure.Dirac.Basic +import Mathlib.MeasureTheory.Constructions.BorelSpace.Real +import Mathlib.MeasureTheory.Measure.AEMeasurable + +/-! +# Transporting atomic decompositions from nonnegative reals + +A real measure carried by the nonnegative half-line is recovered by transport +to `ℝ≥0` followed by coercion back to `ℝ`. Atomic decompositions are preserved. +-/ + +public section + +open scoped NNReal ENNReal + +namespace MeasureTheory.Measure + +/-- Transport to nonnegative reals followed by coercion recovers a measure +carried by the nonnegative half-line. -/ +theorem map_coe_map_toNNReal_of_ae_nonneg {mu : Measure ℝ} + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) : + (mu.map Real.toNNReal).map ((↑) : ℝ≥0 → ℝ) = mu := by + rw [map_map measurable_coe_nnreal_real measurable_real_toNNReal] + calc + mu.map (((↑) : ℝ≥0 → ℝ) ∘ Real.toNNReal) = mu.map id := by + apply map_congr + filter_upwards [hpos] with x hx + exact Real.coe_toNNReal x hx + _ = mu := map_id + +/-- An exact atomic decomposition after transport to `ℝ≥0` yields the same +decomposition on the real line, with unchanged masses. -/ +theorem eq_atomic_of_map_toNNReal_eq {ι : Type*} {mu : Measure ℝ} + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) {sigma : ℝ≥0∞} {w : ι → ℝ≥0∞} {a : ι → ℝ≥0} + (hmu : mu.map Real.toNNReal = sigma • dirac 0 + + Measure.sum (fun i ↦ w i • dirac (a i))) : + mu = sigma • dirac 0 + Measure.sum (fun i ↦ w i • dirac (a i : ℝ)) := by + calc + mu = (mu.map Real.toNNReal).map ((↑) : ℝ≥0 → ℝ) := + (map_coe_map_toNNReal_of_ae_nonneg hpos).symm + _ = _ := by + rw [hmu, Measure.map_add _ _ measurable_coe_nnreal_real, + Measure.map_sum measurable_coe_nnreal_real.aemeasurable] + simp only [Measure.map_smul _ measurable_coe_nnreal_real.aemeasurable, + Measure.map_dirac' measurable_coe_nnreal_real, NNReal.coe_zero] + +end MeasureTheory.Measure diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeMomentTransform.lean b/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeMomentTransform.lean new file mode 100644 index 000000000..e391d227d --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeMomentTransform.lean @@ -0,0 +1,111 @@ +/- +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 TauCeti.Analysis.CompletelyMonotone.Stieltjes.Holomorphic +public import TauCeti.Analysis.CompletelyMonotone.Stieltjes.Inversion +import RealRooted.Mathlib.MeasureTheory.Measure.FiniteMomentStieltjes + +/-! +# Nonnegative real moment measures and Stieltjes transforms + +Transport a finite measure carried by `[0,∞)` to `ℝ≥0`, then apply the explicit +reciprocal-measure construction. This supplies genuine integrability and a +holomorphic transform on the slit plane, with no compact-support requirement. +-/ + +public section + +open Complex MeasureTheory Set NNReal + +namespace MeasureTheory.Measure + +/-- Transport to `ℝ≥0` preserves the zero atom of a measure carried by `[0,∞)`. -/ +theorem map_toNNReal_singleton_zero_of_ae_nonneg + {mu : Measure ℝ} (hpos : ∀ᵐ x ∂mu, 0 ≤ x) : + mu.map Real.toNNReal {0} = mu {0} := by + rw [map_apply measurable_real_toNNReal (measurableSet_singleton 0)] + apply measure_congr + filter_upwards [hpos] with x hx + change (Real.toNNReal x = 0) ↔ (x = 0) + rw [Real.toNNReal_eq_zero] + exact ⟨fun h ↦ le_antisymm h hx, fun h ↦ h.le⟩ + +/-- The reciprocal-kernel integral is preserved when a nonnegative real measure +is transported to `ℝ≥0`. This is an identity of complex integrals. -/ +theorem integral_inv_one_add_mul_map_toNNReal + {mu : Measure ℝ} (hpos : ∀ᵐ x ∂mu, 0 ≤ x) (z : ℂ) : + (∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu.map Real.toNNReal) = + ∫ x : ℝ, (1 + z * (x : ℂ))⁻¹ ∂mu := by + rw [integral_map_of_stronglyMeasurable measurable_real_toNNReal (by fun_prop)] + apply integral_congr_ae + filter_upwards [hpos] with x hx + rw [Real.coe_toNNReal x hx] + +/-- The moment kernel of a finite nonnegative real measure is integrable at +each point of the slit plane. -/ +theorem integrable_inv_one_add_mul_of_ae_nonneg + {mu : Measure ℝ} [IsFiniteMeasure mu] (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + {z : ℂ} (hz : z ∈ slitPlane) : + Integrable (fun x : ℝ ↦ (1 + z * (x : ℂ))⁻¹) mu := by + have hi := (mu.map Real.toNNReal).integrable_inv_one_add_mul_of_mem_slitPlane hz + apply (hi.comp_measurable measurable_real_toNNReal).congr + filter_upwards [hpos] with x hx + simp only [Function.comp_apply, Real.coe_toNNReal x hx] + +/-- The moment transform has explicit Stieltjes data. The original zero atom is +the constant coefficient, and the reciprocal measure can have infinite mass. -/ +theorem integral_inv_one_add_mul_eq_stieltjesExtension_of_ae_nonneg + {mu : Measure ℝ} [IsFiniteMeasure mu] (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + {z : ℂ} (hz : z ∈ slitPlane) : + (∫ x : ℝ, (1 + z * (x : ℂ))⁻¹ ∂mu) = + TauCeti.stieltjesExtension (mu.map Real.toNNReal).stieltjesInversion 0 + (Real.toNNReal (mu.real {0})) z := by + rw [← integral_inv_one_add_mul_map_toNNReal hpos z, + (mu.map Real.toNNReal).integral_inv_one_add_mul_eq_stieltjesExtension hz] + have hatom : (mu.map Real.toNNReal).real {0} = mu.real {0} := + congrArg ENNReal.toReal (map_toNNReal_singleton_zero_of_ae_nonneg hpos) + simp only [hatom] + +/-- The complex reciprocal transform of a finite measure on `[0,∞)` is +holomorphic on the slit plane. -/ +theorem analyticOnNhd_integral_inv_one_add_mul_of_ae_nonneg + {mu : Measure ℝ} [IsFiniteMeasure mu] (hpos : ∀ᵐ x ∂mu, 0 ≤ x) : + AnalyticOnNhd ℂ (fun z ↦ ∫ x : ℝ, (1 + z * (x : ℂ))⁻¹ ∂mu) slitPlane := by + apply (TauCeti.analyticOnNhd_stieltjesExtension + (μ := (mu.map Real.toNNReal).stieltjesInversion) + (a := 0) (b := (Real.toNNReal (mu.real {0})))).congr isOpen_slitPlane + intro z hz + exact (integral_inv_one_add_mul_eq_stieltjesExtension_of_ae_nonneg hpos hz).symm + +/-- The actual real part of the complex transform has the explicit reciprocal +Stieltjes representation, including the original zero atom. -/ +theorem representsStieltjes_integral_inv_one_add_mul_of_ae_nonneg + {mu : Measure ℝ} [IsFiniteMeasure mu] (hpos : ∀ᵐ x ∂mu, 0 ≤ x) : + TauCeti.RepresentsStieltjes (mu.map Real.toNNReal).stieltjesInversion 0 + (Real.toNNReal (mu.real {0})) + (fun t : ℝ ↦ (∫ x : ℝ, (1 + (t : ℂ) * (x : ℂ))⁻¹ ∂mu).re) := by + have hs := (mu.map Real.toNNReal).representsStieltjes_integral_inv_one_add_mul + have hatom : (mu.map Real.toNNReal).real {0} = mu.real {0} := + congrArg ENNReal.toReal (map_toNNReal_singleton_zero_of_ae_nonneg hpos) + rw [hatom] at hs + apply hs.congr + intro t _ + exact congrArg Complex.re (integral_inv_one_add_mul_map_toNNReal hpos t).symm + +/-- A finite nonnegative moment transform is a Stieltjes function. -/ +theorem isStieltjesFunction_integral_inv_one_add_mul_of_ae_nonneg + {mu : Measure ℝ} [IsFiniteMeasure mu] (hpos : ∀ᵐ x ∂mu, 0 ≤ x) : + TauCeti.IsStieltjesFunction + (fun t : ℝ ↦ (∫ x : ℝ, (1 + (t : ℂ) * (x : ℂ))⁻¹ ∂mu).re) := by + apply TauCeti.isStieltjesFunction_iff.mpr + exact ⟨0, (Real.toNNReal (mu.real {0})), + (mu.map Real.toNNReal).stieltjesInversion, + representsStieltjes_integral_inv_one_add_mul_of_ae_nonneg hpos⟩ + +end MeasureTheory.Measure + +end diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeMoments.lean b/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeMoments.lean new file mode 100644 index 000000000..ab87ae09e --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeMoments.lean @@ -0,0 +1,43 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.MeasureTheory.Measure.MomentDeterminacy +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment + +/-! +# Recovering nonnegative support by moment determinacy + +A bounded real measure with genuine moments given by nonnegative Stieltjes +data equals the positive-half-line representing measure. The boundedness +hypothesis is what allows this conclusion about the supplied measure. +-/ + +public section + +namespace MeasureTheory + +/-- A bounded measure whose actual moment series has nonnegative Stieltjes +data is itself carried by the nonnegative half-line. -/ +theorem ae_nonneg_of_bounded_stieltjes_moments {mu : Measure ℝ} + {a : ℕ → ℝ} {mass R : ℝ} (ha : ∀ n, 0 ≤ a n) (hmass : 0 ≤ mass) + (hbound : ∀ᵐ x ∂mu, |x| ≤ R) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) + (hf : PowerSeries.mk (fun n => ∫ x : ℝ, x ^ n ∂mu) = + PowerSeries.C mass * PowerSeries.stieltjesTail a 0) : + ∀ᵐ x ∂mu, 0 ≤ x := by + let : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hint 0) + obtain ⟨nu, _, hnu, hnuMom⟩ := PowerSeries.exists_measure_moments_of_eq_stieltjesTail ha hmass hf + have heq : mu = nu := Measure.ext_of_integral_pow_eq_of_ae_bounded hbound + (fun n => (hnuMom n).1) (fun n => by + simpa only [PowerSeries.coeff_mk] using (hnuMom n).2.symm) + simpa only [heq] using hnu + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/SortedAtomicMeasure.lean b/RealRooted/Mathlib/MeasureTheory/Measure/SortedAtomicMeasure.lean new file mode 100644 index 000000000..1bca6754e --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/SortedAtomicMeasure.lean @@ -0,0 +1,138 @@ +/- +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.MeasureTheory.Constructions.BorelSpace.Basic +import Mathlib.MeasureTheory.Measure.Real +import Mathlib.MeasureTheory.Constructions.BorelSpace.Real +import Mathlib.MeasureTheory.Measure.Dirac.Basic +import Mathlib.Topology.Algebra.InfiniteSum.Real +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.SortedEnumeration +import RealRooted.Mathlib.MeasureTheory.Measure.AtomicRange + +/-! +# Sorted atoms with integer slope multiplicities + +If every positive singleton mass is its location times a natural multiplicity, +and these points together with zero carry a finite measure, the positive atoms +have a strictly decreasing finite or infinite enumeration. Both the distinct +slopes and the slopes counted with multiplicity are summable. +-/ + +public section + +open Set +open scoped NNReal + +namespace MeasureTheory.Measure + +private abbrev SlopeIndex (m : ℝ≥0 → ℕ) := {a : ℝ≥0 // a ≠ 0 ∧ m a ≠ 0} + +/-- Summability of the weighted slopes follows directly from finite mass. -/ +private theorem summable_slope_mul_multiplicity (mu : Measure ℝ≥0) + [IsFiniteMeasure mu] (m : ℝ≥0 → ℕ) + (hmass : ∀ a : ℝ≥0, a ≠ 0 → mu.real {a} = (a : ℝ) * (m a : ℝ)) : + Summable (fun a : SlopeIndex m ↦ (a : ℝ) * (m a : ℝ)) := by + have hs : Summable (fun a : SlopeIndex m ↦ mu.real {(a : ℝ≥0)}) := + mu.summable_measureReal_singleton_comp Subtype.coe_injective + exact hs.congr (fun a ↦ hmass a a.property.1) + +/-- Positive natural multiplicities dominate the unweighted distinct slopes. -/ +private theorem summable_slope (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (m : ℝ≥0 → ℕ) (hmass : ∀ a : ℝ≥0, a ≠ 0 → mu.real {a} = (a : ℝ) * (m a : ℝ)) : + Summable (fun a : SlopeIndex m ↦ (a : ℝ)) := by + apply Summable.of_nonneg_of_le (fun a : SlopeIndex m ↦ (a : ℝ≥0).coe_nonneg) _ + (summable_slope_mul_multiplicity mu m hmass) + intro a + have hm : (1 : ℝ) ≤ (m a : ℝ) := by + exact_mod_cast Nat.one_le_iff_ne_zero.mpr a.property.2 + exact le_mul_of_one_le_right (a : ℝ≥0).coe_nonneg hm + +/-- Any countable enumeration of the genuine atoms preserves their exact +measure representation and both summability statements. -/ +private theorem atomic_representation_of_equiv {ι : Type*} [Countable ι] + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] (m : ℝ≥0 → ℕ) + (hmass : ∀ a : ℝ≥0, a ≠ 0 → mu.real {a} = (a : ℝ) * (m a : ℝ)) + (hcarry : ∀ᵐ a : ℝ≥0 ∂mu, a = 0 ∨ m a ≠ 0) (e : ι ≃ SlopeIndex m) : + Summable (fun i ↦ ((e i : ℝ≥0) : ℝ)) ∧ + Summable (fun i ↦ ((e i : ℝ≥0) : ℝ) * (m (e i) : ℝ)) ∧ + mu = mu {0} • dirac 0 + Measure.sum (fun i ↦ + ENNReal.ofReal (((e i : ℝ≥0) : ℝ) * (m (e i) : ℝ)) • dirac (e i : ℝ≥0)) := by + refine ⟨(summable_slope mu m hmass).comp_injective e.injective, + (summable_slope_mul_multiplicity mu m hmass).comp_injective e.injective, ?_⟩ + have hi : Function.Injective (fun i ↦ (e i : ℝ≥0)) := + Subtype.coe_injective.comp e.injective + have hc : ∀ᵐ a : ℝ≥0 ∂mu, a = 0 ∨ a ∈ range (fun i ↦ (e i : ℝ≥0)) := by + filter_upwards [hcarry] with a ha + by_cases ha0 : a = 0 + · exact Or.inl ha0 + · exact Or.inr ⟨e.symm ⟨a, ha0, ha.resolve_left ha0⟩, + congrArg Subtype.val (e.apply_symm_apply _)⟩ + calc + mu = mu {0} • dirac 0 + Measure.sum (fun i ↦ + mu {(e i : ℝ≥0)} • dirac (e i : ℝ≥0)) := + mu.eq_smul_dirac_add_sum_of_ae_mem_range hi (fun i ↦ (e i).property.1) hc + _ = _ := by + congr 1 + apply congrArg Measure.sum + funext i + rw [← hmass _ (e i).property.1, ofReal_measureReal] + +/-- Infinite genuine atoms have a strictly decreasing natural-number +enumeration with their exact integer multiplicities and atomic measure. -/ +theorem exists_strictAnti_atomic_representation_of_infinite + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] (m : ℝ≥0 → ℕ) + (hmass : ∀ a : ℝ≥0, a ≠ 0 → mu.real {a} = (a : ℝ) * (m a : ℝ)) + (hcarry : ∀ᵐ a : ℝ≥0 ∂mu, a = 0 ∨ m a ≠ 0) + (hinf : {a : ℝ≥0 | a ≠ 0 ∧ m a ≠ 0}.Infinite) : + ∃ a : ℕ → ℝ≥0, StrictAnti a ∧ (∀ i, a i ≠ 0 ∧ m (a i) ≠ 0) ∧ + Summable (fun i ↦ (a i : ℝ)) ∧ + Summable (fun i ↦ (a i : ℝ) * (m (a i) : ℝ)) ∧ + mu = mu {0} • dirac 0 + Measure.sum (fun i ↦ + ENNReal.ofReal ((a i : ℝ) * (m (a i) : ℝ)) • dirac (a i)) ∧ + range a = {a : ℝ≥0 | a ≠ 0 ∧ m a ≠ 0} := by + have : Infinite (SlopeIndex m) := hinf.to_subtype + have hi : Function.Injective (fun a : SlopeIndex m ↦ (a : ℝ)) := + NNReal.coe_injective.comp Subtype.coe_injective + obtain ⟨e, he⟩ := (summable_slope mu m hmass).exists_equiv_strictAnti_comp + (fun a ↦ NNReal.coe_pos.mpr (pos_iff_ne_zero.mpr a.property.1)) hi + obtain ⟨hs, hms, hmu⟩ := atomic_representation_of_equiv mu m hmass hcarry e + refine ⟨fun i ↦ e i, he, fun i ↦ (e i).property, hs, hms, hmu, ?_⟩ + ext a + constructor + · rintro ⟨i, rfl⟩ + exact (e i).property + · intro ha + exact ⟨e.symm ⟨a, ha⟩, congrArg Subtype.val (e.apply_symm_apply _)⟩ + +/-- Finite genuine atoms have a strictly decreasing finite enumeration with +their exact integer multiplicities and atomic measure. Empty support is allowed. -/ +theorem exists_fin_strictAnti_atomic_representation_of_finite + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] (m : ℝ≥0 → ℕ) + (hmass : ∀ a : ℝ≥0, a ≠ 0 → mu.real {a} = (a : ℝ) * (m a : ℝ)) + (hcarry : ∀ᵐ a : ℝ≥0 ∂mu, a = 0 ∨ m a ≠ 0) + (hfin : {a : ℝ≥0 | a ≠ 0 ∧ m a ≠ 0}.Finite) : + ∃ n : ℕ, ∃ a : Fin n → ℝ≥0, StrictAnti a ∧ + (∀ i, a i ≠ 0 ∧ m (a i) ≠ 0) ∧ + Summable (fun i ↦ (a i : ℝ)) ∧ + Summable (fun i ↦ (a i : ℝ) * (m (a i) : ℝ)) ∧ + mu = mu {0} • dirac 0 + Measure.sum (fun i ↦ + ENNReal.ofReal ((a i : ℝ) * (m (a i) : ℝ)) • dirac (a i)) ∧ + range a = {a : ℝ≥0 | a ≠ 0 ∧ m a ≠ 0} := by + have : Finite (SlopeIndex m) := hfin.to_subtype + have hi : Function.Injective (fun a : SlopeIndex m ↦ (a : ℝ)) := + NNReal.coe_injective.comp Subtype.coe_injective + obtain ⟨n, e, he⟩ := hi.exists_fin_equiv_strictAnti_comp + obtain ⟨hs, hms, hmu⟩ := atomic_representation_of_equiv mu m hmass hcarry e + refine ⟨n, fun i ↦ e i, he, fun i ↦ (e i).property, hs, hms, hmu, ?_⟩ + ext a + constructor + · rintro ⟨i, rfl⟩ + exact (e i).property + · intro ha + exact ⟨e.symm ⟨a, ha⟩, congrArg Subtype.val (e.apply_symm_apply _)⟩ + +end MeasureTheory.Measure diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/SortedAtomicSequence.lean b/RealRooted/Mathlib/MeasureTheory/Measure/SortedAtomicSequence.lean new file mode 100644 index 000000000..da1aab873 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/SortedAtomicSequence.lean @@ -0,0 +1,89 @@ +/- +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.MeasureTheory.Measure.Real +public import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +import RealRooted.Mathlib.MeasureTheory.Measure.SortedAtomicMeasure +import RealRooted.Mathlib.MeasureTheory.Measure.AtomicRange +import RealRooted.Mathlib.Order.Monotone.PositiveExtension + +/-! +# Infinite sorted atomic presentations with zero-multiplicity padding + +Every finite nonnegative measure with integer slope multiplicities has a +presentation indexed by all natural numbers, even when its genuine positive +support is finite or empty. The padded slopes stay positive and summable; +their natural multiplicities are zero. +-/ + +public section + +open scoped NNReal ENNReal + +open Set + +namespace MeasureTheory.Measure + +/-- Any positive injective enumeration covering the nonzero multiplicities +gives the exact measure and a summable multiplicity-weighted sequence. -/ +private theorem atomic_representation_of_cover + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] (m : ℝ≥0 → ℕ) + (hmass : ∀ a : ℝ≥0, a ≠ 0 → mu.real {a} = (a : ℝ) * (m a : ℝ)) + (hcarry : ∀ᵐ a : ℝ≥0 ∂mu, a = 0 ∨ m a ≠ 0) {a : ℕ → ℝ≥0} + (hi : Function.Injective a) (hpos : ∀ i, 0 < a i) + (hcover : {x : ℝ≥0 | x ≠ 0 ∧ m x ≠ 0} ⊆ range a) : + Summable (fun i ↦ (a i : ℝ) * (m (a i) : ℝ)) ∧ + mu = mu {0} • dirac 0 + Measure.sum (fun i ↦ + ENNReal.ofReal ((a i : ℝ) * (m (a i) : ℝ)) • dirac (a i)) := by + have hs : Summable (fun i ↦ mu.real {a i}) := summable_measure_toReal + (fun _ ↦ measurableSet_singleton _) (fun i j hij ↦ + disjoint_singleton.mpr (fun h ↦ hij (hi h))) + refine ⟨hs.congr (fun i ↦ hmass _ (hpos i).ne'), ?_⟩ + have hc : ∀ᵐ x : ℝ≥0 ∂mu, x = 0 ∨ x ∈ range a := by + filter_upwards [hcarry] with x hx + by_cases hx0 : x = 0 + · exact Or.inl hx0 + · exact Or.inr (hcover ⟨hx0, hx.resolve_left hx0⟩) + calc + mu = mu {0} • dirac 0 + Measure.sum (fun i ↦ mu {a i} • dirac (a i)) := + mu.eq_smul_dirac_add_sum_of_ae_mem_range hi (fun i ↦ (hpos i).ne') hc + _ = _ := by + congr 1 + apply congrArg Measure.sum + funext i + rw [← hmass _ (hpos i).ne', ofReal_measureReal] + +/-- The literal infinite sorted atomic presentation, with zero multiplicities +allowed at the extra slopes used for finite and empty support. -/ +theorem exists_strictAnti_atomic_representation + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] (m : ℝ≥0 → ℕ) + (hmass : ∀ a : ℝ≥0, a ≠ 0 → mu.real {a} = (a : ℝ) * (m a : ℝ)) + (hcarry : ∀ᵐ a : ℝ≥0 ∂mu, a = 0 ∨ m a ≠ 0) : + ∃ a : ℕ → ℝ≥0, StrictAnti a ∧ (∀ i, 0 < a i) ∧ + Summable (fun i ↦ (a i : ℝ)) ∧ + Summable (fun i ↦ (a i : ℝ) * (m (a i) : ℝ)) ∧ + mu = mu {0} • dirac 0 + Measure.sum (fun i ↦ + ENNReal.ofReal ((a i : ℝ) * (m (a i) : ℝ)) • dirac (a i)) ∧ + {x : ℝ≥0 | x ≠ 0 ∧ m x ≠ 0} ⊆ range a := by + rcases Set.finite_or_infinite {x : ℝ≥0 | x ≠ 0 ∧ m x ≠ 0} with hfin | hinf + · obtain ⟨n, a, ha, hapos, _, _, _, hrange⟩ := + mu.exists_fin_strictAnti_atomic_representation_of_finite m hmass hcarry hfin + obtain ⟨b, hb, hbpos, hbs, hext⟩ := + ha.exists_pos_summable_nat_extension (fun i ↦ pos_iff_ne_zero.mpr (hapos i).1) + have hcover : {x : ℝ≥0 | x ≠ 0 ∧ m x ≠ 0} ⊆ range b := by + intro x hx + obtain ⟨i, rfl⟩ := hrange.symm ▸ hx + exact ⟨i.val, hext i⟩ + obtain ⟨hms, hmu⟩ := atomic_representation_of_cover mu m hmass hcarry + hb.injective hbpos hcover + exact ⟨b, hb, hbpos, hbs, hms, hmu, hcover⟩ + · obtain ⟨a, ha, hapos, hs, hms, hmu, hrange⟩ := + mu.exists_strictAnti_atomic_representation_of_infinite m hmass hcarry hinf + exact ⟨a, ha, fun i ↦ pos_iff_ne_zero.mpr (hapos i).1, hs, hms, hmu, + hrange.symm.subset⟩ + +end MeasureTheory.Measure diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/SqrtMoments.lean b/RealRooted/Mathlib/MeasureTheory/Measure/SqrtMoments.lean new file mode 100644 index 000000000..f9c045454 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/SqrtMoments.lean @@ -0,0 +1,73 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSymmetrization +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.MeasureTheory.Measure.MomentParity + +/-! +# Moments of the symmetric square-root law + +Even moments recover the original moments and odd moments vanish. Integrability +of every original natural power supplies integrability of every lifted natural +power, so the moment statements can be used as genuine moment representations. +-/ + +public section + +namespace MeasureTheory + +/-- Every natural power of the square root is integrable when all original +moments exist on the nonnegative half-line. -/ +theorem integrable_pow_sqrt_of_moments {mu : Measure ℝ} + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) + (hmom : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) (n : ℕ) : + Integrable (fun x : ℝ => (Real.sqrt x) ^ n) mu := by + let : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hmom 0) + apply ((integrable_const (1 : ℝ)).add (hmom n)).mono' (by fun_prop) + filter_upwards [hmu] with x hx + have hsq : ((Real.sqrt x) ^ n) ^ 2 = x ^ n := by + rw [← pow_mul, Nat.mul_comm n 2, pow_mul, Real.sq_sqrt hx] + rw [Real.norm_eq_abs, abs_of_nonneg (pow_nonneg (Real.sqrt_nonneg x) n)] + change (Real.sqrt x) ^ n ≤ 1 + x ^ n + nlinarith [sq_nonneg ((Real.sqrt x) ^ n - (1 / 2 : ℝ))] + +/-- The symmetric square-root law has all moments when the original +nonnegative measure has all moments. The zeroth moment includes finite mass. -/ +theorem Measure.integrable_pow_sqrtSymmetrization {mu : Measure ℝ} + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) + (hmom : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) (n : ℕ) : + Integrable (fun x : ℝ => x ^ n) mu.sqrtSymmetrization := by + have hs := integrable_pow_sqrt_of_moments hmu hmom n + have hn : Integrable (fun x : ℝ => (-Real.sqrt x) ^ n) mu := by + apply (hs.const_mul ((-1 : ℝ) ^ n)).congr + exact Filter.Eventually.of_forall fun x => (neg_pow (Real.sqrt x) n).symm + have hplus : Integrable (fun x : ℝ => x ^ n) (mu.map Real.sqrt) := + (integrable_map_measure (by fun_prop) (by fun_prop)).mpr hs + have hminus : Integrable (fun x : ℝ => x ^ n) + (mu.map (fun x : ℝ => -Real.sqrt x)) := + (integrable_map_measure (by fun_prop) (by fun_prop)).mpr hn + exact (hplus.add_measure hminus).smul_measure_nnreal + +/-- Even lifted moments equal the original moments. This change-of-variables +identity also holds for totalized integrals; integrability is provided separately. -/ +theorem Measure.integral_pow_even_sqrtSymmetrization {mu : Measure ℝ} + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) (n : ℕ) : + (∫ x : ℝ, x ^ (2 * n) ∂mu.sqrtSymmetrization) = ∫ x : ℝ, x ^ n ∂mu := by + conv_rhs => rw [← Measure.map_sq_sqrtSymmetrization hmu] + rw [integral_map_of_stronglyMeasurable (by fun_prop) (by fun_prop)] + simp only [pow_mul] + +/-- Odd lifted moments vanish by reflection invariance, without an extra +integrability hypothesis. -/ +theorem Measure.integral_pow_odd_sqrtSymmetrization (mu : Measure ℝ) (n : ℕ) : + (∫ x : ℝ, x ^ (2 * n + 1) ∂mu.sqrtSymmetrization) = 0 := by + exact integral_pow_eq_zero_of_odd (odd_two_mul_add_one n) + +end MeasureTheory diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/SqrtSupport.lean b/RealRooted/Mathlib/MeasureTheory/Measure/SqrtSupport.lean new file mode 100644 index 000000000..2146ebb6d --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/SqrtSupport.lean @@ -0,0 +1,60 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSymmetrization + +/-! +# Support of the symmetric square-root law + +Support in the closed interval `[0,L]` becomes support in +`[-sqrt L,sqrt L]`. The converse follows by squaring. The zero measure, origin +atoms, and `L=0` are included; no moments or finite-mass hypothesis is required. +-/ + +public section + +namespace MeasureTheory.Measure + +/-- Closed-interval support gives the corresponding symmetric square-root bound. -/ +theorem ae_abs_sqrtSymmetrization_le {mu : Measure ℝ} {L : ℝ} + (hmu : ∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) : + ∀ᵐ x ∂mu.sqrtSymmetrization, |x| ≤ Real.sqrt L := by + apply ae_smul_measure + apply ae_add_measure_iff.mpr + constructor + · apply (ae_map_iff (by fun_prop) + (isClosed_le continuous_abs continuous_const).measurableSet).mpr + filter_upwards [hmu] with x hx + simpa only [abs_of_nonneg (Real.sqrt_nonneg x)] using Real.sqrt_le_sqrt hx.2 + · apply (ae_map_iff (by fun_prop) + (isClosed_le continuous_abs continuous_const).measurableSet).mpr + filter_upwards [hmu] with x hx + simpa only [abs_neg, abs_of_nonneg (Real.sqrt_nonneg x)] using Real.sqrt_le_sqrt hx.2 + +/-- Squaring a supported symmetric lift recovers the original upper bound. -/ +theorem ae_mem_Icc_of_sqrtSymmetrization {mu : Measure ℝ} {L : ℝ} (hL : 0 ≤ L) + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) + (hs : ∀ᵐ x ∂mu.sqrtSymmetrization, |x| ≤ Real.sqrt L) : + ∀ᵐ x ∂mu, x ∈ Set.Icc 0 L := by + rw [← map_sq_sqrtSymmetrization hmu] + apply (ae_map_iff (by fun_prop) measurableSet_Icc).mpr + filter_upwards [hs] with x hx + refine ⟨sq_nonneg x, ?_⟩ + have hp := pow_le_pow_left₀ (abs_nonneg x) hx 2 + simpa only [sq_abs, Real.sq_sqrt hL] using hp + +/-- The exact support equivalence for a nonnegative measure. -/ +theorem ae_mem_Icc_iff_sqrtSymmetrization {mu : Measure ℝ} {L : ℝ} (hL : 0 ≤ L) + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) : + (∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) ↔ + ∀ᵐ x ∂mu.sqrtSymmetrization, x ∈ Set.Icc (-Real.sqrt L) (Real.sqrt L) := by + simpa only [Set.mem_Icc, ← abs_le] using + (show (∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) ↔ + ∀ᵐ x ∂mu.sqrtSymmetrization, |x| ≤ Real.sqrt L from + ⟨ae_abs_sqrtSymmetrization_le, ae_mem_Icc_of_sqrtSymmetrization hL hmu⟩) + +end MeasureTheory.Measure diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/SqrtSymmetrization.lean b/RealRooted/Mathlib/MeasureTheory/Measure/SqrtSymmetrization.lean new file mode 100644 index 000000000..fd2141b49 --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/SqrtSymmetrization.lean @@ -0,0 +1,65 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Group.Measure +public import Mathlib.Analysis.Real.Sqrt +import TauCeti.MeasureTheory.Measure.Real + +/-! +# The symmetric square-root law + +A measure on the nonnegative half-line lifts to a reflection-invariant measure +by taking the equally weighted positive and negative square roots. Squaring +recovers the original measure, including its atom at zero. No finiteness or +moment hypothesis is needed for these measure identities. + +See Sokal, arXiv:1903.12455v2, elementary fact 1 preceding the Wall theorem proof. +-/ + +public section + +namespace MeasureTheory.Measure + +/-- The equally weighted positive and negative square-root pushforwards. -/ +@[expose] noncomputable def sqrtSymmetrization (mu : Measure ℝ) : Measure ℝ := + (2 : NNReal)⁻¹ • (mu.map Real.sqrt + mu.map (fun x : ℝ => -Real.sqrt x)) + +/-- The square-root symmetrization is reflection invariant. -/ +theorem map_neg_sqrtSymmetrization (mu : Measure ℝ) : + mu.sqrtSymmetrization.map (fun x : ℝ => -x) = mu.sqrtSymmetrization := by + rw [sqrtSymmetrization, Measure.map_smul _ (by fun_prop), + Measure.map_add _ _ (by fun_prop), Measure.map_map (by fun_prop) (by fun_prop), + Measure.map_map (by fun_prop) (by fun_prop)] + simp only [Function.comp_def, neg_neg] + rw [add_comm] + +/-- The reflection-invariance instance for the symmetric square-root law. -/ +instance sqrtSymmetrization_isNegInvariant (mu : Measure ℝ) : + mu.sqrtSymmetrization.IsNegInvariant := + ⟨map_neg_sqrtSymmetrization mu⟩ + +/-- Squaring the symmetric square-root law recovers a nonnegative measure. -/ +theorem map_sq_sqrtSymmetrization {mu : Measure ℝ} (hmu : ∀ᵐ x ∂mu, 0 ≤ x) : + mu.sqrtSymmetrization.map (fun x : ℝ => x ^ 2) = mu := by + have hneg : (mu.map (fun x : ℝ => -Real.sqrt x)).map (fun x : ℝ => x ^ 2) = mu := by + rw [Measure.map_map (by fun_prop) (by fun_prop)] + exact (Measure.map_congr (hmu.mono fun x hx => by + simp only [Function.comp_def, neg_sq, Real.sq_sqrt hx, id_eq])).trans Measure.map_id + rw [sqrtSymmetrization, Measure.map_smul _ (by fun_prop), + Measure.map_add _ _ (by fun_prop), map_sq_map_sqrt mu hmu, hneg, + ← two_smul NNReal mu, smul_smul] + norm_num + +/-- Among reflection-invariant measures, this is the unique lift under squaring. -/ +theorem eq_sqrtSymmetrization_of_map_sq_eq {mu nu : Measure ℝ} + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) (hnu : nu.map (fun x : ℝ => -x) = nu) + (hsq : nu.map (fun x : ℝ => x ^ 2) = mu) : nu = mu.sqrtSymmetrization := by + apply eq_of_map_sq_eq_of_map_neg_eq_self nu mu.sqrtSymmetrization hnu + (map_neg_sqrtSymmetrization mu) + rw [hsq, map_sq_sqrtSymmetrization hmu] + +end MeasureTheory.Measure diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/SqrtTranslation.lean b/RealRooted/Mathlib/MeasureTheory/Measure/SqrtTranslation.lean new file mode 100644 index 000000000..860c71a2e --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/SqrtTranslation.lean @@ -0,0 +1,54 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSymmetrization +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform +import RealRooted.Mathlib.MeasureTheory.Measure.AeratedSeries +import RealRooted.Mathlib.MeasureTheory.Measure.MomentTranslation +import RealRooted.Mathlib.MeasureTheory.Measure.SqrtMoments +import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSupport + +/-! +# Translating the symmetric square-root law + +The moment series is the binomial transform of the aerated series. A measure +carried by `[0,L]` becomes nonnegative after shifting its symmetric square-root +law by `sqrt L`. +-/ + +public section + +open PowerSeries + +namespace MeasureTheory.Measure + +/-- Exact formal moment series of the translated symmetric square-root law. -/ +theorem mk_moments_map_add_sqrtSymmetrization {mu : Measure ℝ} + (hmu : ∀ᵐ x ∂mu, 0 ≤ x) + (hmom : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) (c : ℝ) : + PowerSeries.mk (fun n => ∫ x : ℝ, x ^ n ∂mu.sqrtSymmetrization.map (fun y => y + c)) = + binomialTransform c + ((PowerSeries.mk (fun n => ∫ x : ℝ, x ^ n ∂mu)).subst (X ^ 2 : ℝ⟦X⟧)) := by + have hseq : (fun k => ∫ x : ℝ, x ^ k ∂mu.sqrtSymmetrization) = + aeratedMoment (fun k => ∫ x : ℝ, x ^ k ∂mu) := + funext fun k => Measure.integral_pow_sqrtSymmetrization hmu k + rw [← mk_aeratedMoment, binomialTransform_mk] + apply congrArg PowerSeries.mk + funext n + rw [integral_pow_map_add (Measure.integrable_pow_sqrtSymmetrization hmu hmom) c n, hseq] + +/-- The shift by the support radius makes the lifted measure nonnegative. -/ +theorem ae_nonneg_map_add_sqrtSymmetrization {mu : Measure ℝ} {L : ℝ} + (hmu : ∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) : + ∀ᵐ x ∂mu.sqrtSymmetrization.map (fun y => y + Real.sqrt L), 0 ≤ x := by + apply (ae_map_iff (by fun_prop) measurableSet_Ici).mpr + filter_upwards [ae_abs_sqrtSymmetrization_le hmu] with y hy + have hy' := (abs_le.mp hy).1 + linarith + +end MeasureTheory.Measure diff --git a/RealRooted/Mathlib/MeasureTheory/Measure/WeakMomentLimits.lean b/RealRooted/Mathlib/MeasureTheory/Measure/WeakMomentLimits.lean new file mode 100644 index 000000000..556e36faf --- /dev/null +++ b/RealRooted/Mathlib/MeasureTheory/Measure/WeakMomentLimits.lean @@ -0,0 +1,91 @@ +/- +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.MeasureTheory.Measure.FiniteMeasure +import TauCeti.MeasureTheory.Measure.FiniteMeasure.UniformIntegrable + +/-! +# Polynomial moments of weak limits on the nonnegative half-line + +If finite measures converge weakly and all their natural moments converge to +finite real values, those values are the moments of the weak limit. The +convergent moment of order `2*k` supplies the uniform-integrability estimate +for the moment of order `k`. No fixed compact support is required. +-/ + +public section + +open Filter MeasureTheory +open scoped ENNReal NNReal Topology + +namespace MeasureTheory + +/-- For an integrable natural power on the nonnegative half-line, the extended +nonnegative integral is the coercion of its real integral. -/ +theorem lintegral_pow_eq_ofReal_integral {μ : Measure ℝ≥0} (k : ℕ) + (h : Integrable (fun x : ℝ≥0 => (x : ℝ) ^ k) μ) : + (∫⁻ x : ℝ≥0, (x : ℝ≥0∞) ^ k ∂μ) = + ENNReal.ofReal (∫ x : ℝ≥0, (x : ℝ) ^ k ∂μ) := by + simpa only [← NNReal.coe_pow, ENNReal.ofReal_coe_nnreal, ENNReal.coe_pow] using + (ofReal_integral_eq_lintegral_ofReal h + (.of_forall fun x => pow_nonneg x.coe_nonneg k)).symm + +/-- A weak limit of finite measures inherits every convergent natural moment. +Convergence of all moments includes the higher moment needed for uniform +integrability. The zero moment and the zero measure require no separate case. -/ +theorem FiniteMeasure.integral_pow_eq_of_tendsto + {ι : Type*} {L : Filter ι} [NeBot L] + {μs : ι → FiniteMeasure ℝ≥0} {μ : FiniteMeasure ℝ≥0} {m : ℕ → ℝ} + (hweak : Tendsto μs L (𝓝 μ)) + (hint : ∀ i k, Integrable (fun x : ℝ≥0 => (x : ℝ) ^ k) (μs i : Measure ℝ≥0)) + (hlim : ∀ k, Tendsto + (fun i => ∫ x : ℝ≥0, (x : ℝ) ^ k ∂(μs i : Measure ℝ≥0)) L (𝓝 (m k))) + (k : ℕ) : + Integrable (fun x : ℝ≥0 => (x : ℝ) ^ k) (μ : Measure ℝ≥0) ∧ + (∫ x : ℝ≥0, (x : ℝ) ^ k ∂(μ : Measure ℝ≥0)) = m k := by + have hm : 0 ≤ m k := ge_of_tendsto (hlim k) + (.of_forall fun i => integral_nonneg fun x => pow_nonneg x.coe_nonneg k) + let C := Real.toNNReal (m (k * 2) + 1) + have hC : ∀ᶠ i in L, + ∫⁻ x : ℝ≥0, ((x ^ k : ℝ≥0) : ℝ≥0∞) ^ 2 ∂(μs i : Measure ℝ≥0) ≤ C := by + filter_upwards [(hlim (k * 2)).eventually + (gt_mem_nhds (lt_add_one (m (k * 2))))] with i hi + simp only [ENNReal.coe_pow, ← pow_mul] + rw [lintegral_pow_eq_ofReal_integral (k * 2) (hint i (k * 2))] + change ENNReal.ofReal _ ≤ ENNReal.ofReal (m (k * 2) + 1) + exact ENNReal.ofReal_le_ofReal hi.le + have hpow := TauCeti.tendsto_lintegral_of_sq_bound + (show Continuous (fun x : ℝ≥0 => x ^ k) by fun_prop) hweak hC + have hreal := ENNReal.continuous_ofReal.continuousAt.tendsto.comp (hlim k) + have hlim' : Tendsto + (fun i => ∫⁻ x : ℝ≥0, ((x ^ k : ℝ≥0) : ℝ≥0∞) ∂(μs i : Measure ℝ≥0)) + L (𝓝 (ENNReal.ofReal (m k))) := by + convert hreal using 1 + funext i + simpa only [ENNReal.coe_pow, Function.comp_def] using + lintegral_pow_eq_ofReal_integral k (hint i k) + have hvalue : (∫⁻ x : ℝ≥0, ((x ^ k : ℝ≥0) : ℝ≥0∞) ∂(μ : Measure ℝ≥0)) = + ENNReal.ofReal (m k) := tendsto_nhds_unique hpow hlim' + have hfinite : HasFiniteIntegral (fun x : ℝ≥0 => ((x ^ k : ℝ≥0) : ℝ)) + (μ : Measure ℝ≥0) := by + apply hasFiniteIntegral_iff_ofNNReal.mpr + rw [hvalue] + exact ENNReal.ofReal_lt_top + have hi : Integrable (fun x : ℝ≥0 => (x : ℝ) ^ k) (μ : Measure ℝ≥0) := by + refine ⟨(by fun_prop), ?_⟩ + simpa only [NNReal.coe_pow] using hfinite + refine ⟨hi, ?_⟩ + have hvalue' : ENNReal.ofReal (∫ x : ℝ≥0, (x : ℝ) ^ k ∂(μ : Measure ℝ≥0)) = + ENNReal.ofReal (m k) := by + rw [← lintegral_pow_eq_ofReal_integral k hi] + simpa only [ENNReal.coe_pow] using hvalue + have hnonneg : 0 ≤ ∫ x : ℝ≥0, (x : ℝ) ^ k ∂(μ : Measure ℝ≥0) := + integral_nonneg fun x => pow_nonneg x.coe_nonneg k + simpa only [ENNReal.toReal_ofReal hnonneg, ENNReal.toReal_ofReal hm] using + congrArg ENNReal.toReal hvalue' + +end MeasureTheory diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindow.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindow.lean new file mode 100644 index 000000000..a66b5a44b --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindow.lean @@ -0,0 +1,111 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.Chebyshev +import Mathlib.Algebra.BigOperators.Field + +/-! +# Finite logarithmically weighted prime windows + +The prime window has lower endpoint excluded and upper endpoint included. +Its normalized nodes lie in `(0, 1]` and its weights are `log p / H`. +The cumulative weight is exactly a normalized Chebyshev increment. +-/ + +public section + +open Finset + +namespace Chebyshev + +/-- The primes in the half-open real interval `(X, X + H]`. -/ +@[expose] noncomputable def primeWindow (X H : ℝ) : Finset ℕ := + Nat.primesLE ⌊X + H⌋₊ \ Nat.primesLE ⌊X⌋₊ + +/-- Membership records primality and the exact half-open endpoint convention. -/ +theorem mem_primeWindow {X H : ℝ} {p : ℕ} : + p ∈ primeWindow X H ↔ p.Prime ∧ X < p ∧ (p : ℝ) ≤ X + H := by + simp only [primeWindow, mem_sdiff, Nat.mem_primesLE] + constructor + · rintro ⟨⟨hupper, hp⟩, hlower⟩ + refine ⟨hp, ?_, (Nat.le_floor_iff' hp.ne_zero).mp hupper⟩ + apply (Nat.floor_lt' hp.ne_zero).mp + exact lt_of_not_ge (fun h ↦ hlower ⟨h, hp⟩) + · rintro ⟨hp, hlower, hupper⟩ + refine ⟨⟨(Nat.le_floor_iff' hp.ne_zero).mpr hupper, hp⟩, ?_⟩ + intro h + exact (not_le_of_gt hlower) ((Nat.le_floor_iff' hp.ne_zero).mp h.1) + +/-- Every normalized prime node belongs to `(0, 1]`. -/ +theorem primeWindow_node_mem_Ioc {X H : ℝ} (hH : 0 < H) {p : ℕ} + (hp : p ∈ primeWindow X H) : ((p : ℝ) - X) / H ∈ Set.Ioc (0 : ℝ) 1 := by + obtain ⟨_, hlower, hupper⟩ := mem_primeWindow.mp hp + refine ⟨div_pos (sub_pos.mpr hlower) hH, (div_le_one hH).mpr ?_⟩ + linarith + +/-- Every logarithmic weight in a prime window of positive length is positive. -/ +theorem primeWindow_weight_pos {X H : ℝ} (hH : 0 < H) {p : ℕ} + (hp : p ∈ primeWindow X H) : 0 < Real.log p / H := by + apply div_pos _ hH + exact Real.log_pos (by exact_mod_cast (mem_primeWindow.mp hp).1.one_lt) + +/-- Restricting the normalized nodes to `[0, u]` restricts the window length +from `H` to `H * u`. -/ +theorem filter_primeWindow_node_le {X H u : ℝ} (hH : 0 < H) + (hu : u ≤ 1) : + (primeWindow X H).filter (fun p : ℕ ↦ ((p : ℝ) - X) / H ≤ u) = + primeWindow X (H * u) := by + ext p + simp only [mem_filter, mem_primeWindow] + constructor + · rintro ⟨⟨hp, hlower, _⟩, hnode⟩ + refine ⟨hp, hlower, ?_⟩ + have := (div_le_iff₀ hH).mp hnode + nlinarith + · rintro ⟨hp, hlower, hupper⟩ + refine ⟨⟨hp, hlower, ?_⟩, (div_le_iff₀ hH).mpr ?_⟩ + · nlinarith [mul_le_mul_of_nonneg_left hu hH.le] + · nlinarith + +/-- The total unnormalized logarithmic weight is a Chebyshev difference. -/ +theorem sum_primeWindow_log {X H : ℝ} (hH : 0 ≤ H) : + ∑ p ∈ primeWindow X H, Real.log p = theta (X + H) - theta X := by + have hfloor : ⌊X⌋₊ ≤ ⌊X + H⌋₊ := Nat.floor_mono (by linarith) + rw [primeWindow, sum_sdiff_eq_sub (Nat.primesLE_mono hfloor), + ← theta_eq_sum_primesLE, ← theta_eq_sum_primesLE] + +/-- The cumulative normalized prime weight is exactly the normalized Chebyshev +increment, including both boundary values `u = 0` and `u = 1`. -/ +theorem sum_primeWindow_weight_node_le {X H u : ℝ} (hH : 0 < H) + (hu : u ∈ Set.Icc (0 : ℝ) 1) : + (∑ p ∈ primeWindow X H, + if ((p : ℝ) - X) / H ≤ u then Real.log p / H else 0) = + (theta (X + H * u) - theta X) / H := by + classical + rw [← sum_filter, filter_primeWindow_node_le hH hu.2, ← sum_div, + sum_primeWindow_log (mul_nonneg hH.le hu.1)] + +/-- The logarithmically weighted moment of the normalized prime window. -/ +@[expose] noncomputable def primeWindowMoment (X H : ℝ) (k : ℕ) : ℝ := + ∑ p ∈ primeWindow X H, (Real.log p / H) * (((p : ℝ) - X) / H) ^ k + +/-- The zeroth moment is the normalized total logarithmic prime weight. -/ +theorem primeWindowMoment_zero {X H : ℝ} (hH : 0 ≤ H) : + primeWindowMoment X H 0 = (theta (X + H) - theta X) / H := by + simp only [primeWindowMoment, pow_zero, mul_one] + rw [← sum_div, sum_primeWindow_log hH] + +/-- Prime-window moments are nonnegative for a window of positive length. -/ +theorem primeWindowMoment_nonneg {X H : ℝ} (hH : 0 < H) (k : ℕ) : + 0 ≤ primeWindowMoment X H k := by + unfold primeWindowMoment + apply sum_nonneg + intro p hp + exact mul_nonneg (primeWindow_weight_pos hH hp).le + (pow_nonneg (primeWindow_node_mem_Ioc hH hp).1.le _) + +end Chebyshev diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowContinuous.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowContinuous.lean new file mode 100644 index 000000000..f19492899 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowContinuous.lean @@ -0,0 +1,79 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindow +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.ContinuousTests +import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowMoments +import RealRooted.Mathlib.Analysis.Asymptotics.IncrementBounds + +/-! +# Continuous weights on logarithmic prime windows + +Under Mathlib's RH, logarithmically weighted prime windows of length +`sqrt X * log X ^ 3` converge against every continuous test on `[0, 1]`. +Consequently any fixed continuous reference weight gives the corresponding +weighted moment limits. This is qualitative convergence; no discrepancy rate +for arbitrary continuous weights is asserted. +-/ + +public section + +open Filter +open scoped Topology + +namespace Chebyshev + +/-- The moment of a finite logarithmic prime window with an additional reference weight. +The base logarithmic weights are divided by the window length, with no mass normalization. -/ +@[expose] noncomputable def primeWindowWeightedMoment (W : ℝ → ℝ) (X H : ℝ) (k : ℕ) : ℝ := + ∑ p ∈ primeWindow X H, (Real.log p / H) * + ((((p : ℝ) - X) / H) ^ k * W (((p : ℝ) - X) / H)) + +/-- A constant unit reference weight recovers the original moment sequence. -/ +@[simp] theorem primeWindowWeightedMoment_one (X H : ℝ) : + primeWindowWeightedMoment (fun _ ↦ 1) X H = primeWindowMoment X H := by + funext k + simp only [primeWindowWeightedMoment, primeWindowMoment, mul_one] + +end Chebyshev + +namespace RiemannHypothesis + +/-- Under RH, finite logarithmic prime-window sums converge against every continuous test +on the unit interval. Positivity and the mass bound are obtained from the actual prime weights. -/ +theorem tendsto_primeWindow_sum_mul (hRH : RiemannHypothesis) {f : ℝ → ℝ} + (hf : ContinuousOn f (Set.Icc (0 : ℝ) 1)) : + Tendsto (fun X : ℝ ↦ + ∑ p ∈ Chebyshev.primeWindow X (Real.sqrt X * Real.log X ^ 3), + (Real.log p / (Real.sqrt X * Real.log X ^ 3)) * + f (((p : ℝ) - X) / (Real.sqrt X * Real.log X ^ 3))) + atTop (𝓝 (∫ t in (0 : ℝ)..1, f t)) := by + apply Finset.tendsto_sum_mul_of_tendsto_sum_mul_pow + (fun X : ℝ ↦ Chebyshev.primeWindow X (Real.sqrt X * Real.log X ^ 3)) + (fun X p ↦ ((p : ℝ) - X) / (Real.sqrt X * Real.log X ^ 3)) + (fun X p ↦ Real.log p / (Real.sqrt X * Real.log X ^ 3)) + · filter_upwards [Real.eventually_sqrt_mul_log_cube_pos_le] with X hX p hp + have hn := Chebyshev.primeWindow_node_mem_Ioc hX.1 hp + exact ⟨hn.1.le, hn.2⟩ + · filter_upwards [Real.eventually_sqrt_mul_log_cube_pos_le] with X hX p hp + exact (Chebyshev.primeWindow_weight_pos hX.1 hp).le + · intro k + exact hRH.tendsto_primeWindowMoment k + · exact hf + +/-- Every fixed continuous reference weight on `[0, 1]` has the expected prime-window moment +limit under RH. Nonnegativity is not needed for this integral limit itself. -/ +theorem tendsto_primeWindowWeightedMoment (hRH : RiemannHypothesis) {W : ℝ → ℝ} + (hW : ContinuousOn W (Set.Icc (0 : ℝ) 1)) (k : ℕ) : + Tendsto (fun X : ℝ ↦ + Chebyshev.primeWindowWeightedMoment W X (Real.sqrt X * Real.log X ^ 3) k) + atTop (𝓝 (∫ t in (0 : ℝ)..1, t ^ k * W t)) := by + exact hRH.tendsto_primeWindow_sum_mul ((continuousOn_id.pow k).mul hW) + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowMoments.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowMoments.lean new file mode 100644 index 000000000..164c38d7c --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowMoments.lean @@ -0,0 +1,78 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindow +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeMoments +import RealRooted.Mathlib.NumberTheory.Chebyshev.ShortIntervals +import RealRooted.Mathlib.Analysis.Asymptotics.IncrementBounds +import Mathlib.Topology.MetricSpace.Pseudo.Basic + +/-! +# Prime-window moments under RH + +Uniform Chebyshev discrepancy controls every monomial moment of the finite +logarithmically weighted prime window. Under Mathlib's RH, windows of length +`sqrt X * log X ^ 3` have moments converging to `1 / (k + 1)`, the moments of +Lebesgue measure on `[0, 1]`. + +The moment error is uniform in `k`. Applications to roots of orthogonal +polynomials still require fixed degree and separate perturbation estimates. +-/ + +public section + +open Filter Set +open scoped Topology + +namespace Chebyshev + +/-- Chebyshev discrepancy bounds every prime-window monomial moment. -/ +theorem abs_primeWindowMoment_sub_le {X H δ : ℝ} (hH : 0 < H) + (hδ : ∀ u ∈ Icc (0 : ℝ) 1, + |(theta (X + H * u) - theta X) / H - u| ≤ δ) (k : ℕ) : + |primeWindowMoment X H k - 1 / ((k : ℝ) + 1)| ≤ 2 * δ := by + apply Finset.abs_sum_mul_pow_sub_le_of_cumulative_bound + (primeWindow X H) (fun p ↦ ((p : ℝ) - X) / H) (fun p ↦ Real.log p / H) + · intro p hp + exact ⟨(primeWindow_node_mem_Ioc hH hp).1.le, (primeWindow_node_mem_Ioc hH hp).2⟩ + · intro u hu + rw [sum_primeWindow_weight_node_le hH hu] + exact hδ u hu + +end Chebyshev + +namespace RiemannHypothesis + +/-- RH gives one eventual `O(1 / log X)` bound for all prime-window moments. -/ +theorem eventually_primeWindowMoment_sub_le (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ᶠ X : ℝ in atTop, ∀ k : ℕ, + |Chebyshev.primeWindowMoment X (Real.sqrt X * Real.log X ^ 3) k - + 1 / ((k : ℝ) + 1)| ≤ C / Real.log X := by + obtain ⟨C, hC, hbound⟩ := hRH.eventually_theta_increment_div_sqrt_log_cube_le + refine ⟨2 * C, by positivity, ?_⟩ + filter_upwards [hbound, Real.eventually_sqrt_mul_log_cube_pos_le] with X hX hH k + calc + _ ≤ 2 * (C / Real.log X) := Chebyshev.abs_primeWindowMoment_sub_le hH.1 hX k + _ = (2 * C) / Real.log X := by ring + +/-- Under RH, every fixed logarithmically weighted prime-window moment tends +to the corresponding uniform moment on `[0, 1]`. -/ +theorem tendsto_primeWindowMoment (hRH : RiemannHypothesis) (k : ℕ) : + Tendsto (fun X : ℝ ↦ + Chebyshev.primeWindowMoment X (Real.sqrt X * Real.log X ^ 3) k) + atTop (𝓝 (1 / ((k : ℝ) + 1))) := by + obtain ⟨C, _, hbound⟩ := hRH.eventually_primeWindowMoment_sub_le + have hlim : Tendsto (fun X : ℝ ↦ C / Real.log X) atTop (𝓝 0) := + Real.tendsto_log_atTop.const_div_atTop C + rw [Metric.tendsto_nhds] + intro ε hε + filter_upwards [hbound, hlim.eventually (gt_mem_nhds hε)] with X hX hsmall + rw [Real.dist_eq] + exact (hX k).trans_lt hsmall + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowOrthogonal.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowOrthogonal.lean new file mode 100644 index 000000000..17f920923 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowOrthogonal.lean @@ -0,0 +1,66 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindow +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +import RealRooted.Mathlib.Algebra.Polynomial.Moment.FiniteAtoms + +/-! +# Monic polynomials from finite prime-window moments + +The moment solve is monic of the prescribed degree for every input. Its +orthogonality is asserted only when the finite Hankel determinant is a unit. +The orthogonality is also expressed as the original finite weighted prime sum. +-/ + +public section + +open Polynomial + +namespace Chebyshev + +/-- The monic degree-`n` polynomial obtained from the finite prime-window +moment solve. Orthogonality requires invertibility of the finite moment matrix. -/ +@[expose] noncomputable def primeWindowPolynomial (X H : ℝ) (n : ℕ) : ℝ[X] := + monicMomentPolynomial (primeWindowMoment X H) n + +/-- The moment construction always has the prescribed monic degree. -/ +theorem isMonicOfDegree_primeWindowPolynomial (X H : ℝ) (n : ℕ) : + IsMonicOfDegree (primeWindowPolynomial X H n) n := + isMonicOfDegree_monicMomentPolynomial _ _ + +/-- Degree zero gives the constant polynomial one, including empty prime windows. -/ +@[simp] theorem primeWindowPolynomial_zero (X H : ℝ) : primeWindowPolynomial X H 0 = 1 := by + simp only [primeWindowPolynomial, monicMomentPolynomial_zero] + +/-- Prime-window moment pairings are actual finite weighted prime sums. -/ +theorem momentPairing_primeWindowMoment (X H : ℝ) (p q : ℝ[X]) : + momentPairing (primeWindowMoment X H) p q = + ∑ a ∈ primeWindow X H, (Real.log a / H) * + p.eval (((a : ℝ) - X) / H) * q.eval (((a : ℝ) - X) / H) := + momentPairing_finset_sum _ _ _ _ _ + +/-- Prime-window Hankel matrices are positive semidefinite for every positive +window length; no lower bound on the number of primes is assumed. -/ +theorem primeWindowMoment_hankel_posSemidef {X H : ℝ} (hH : 0 < H) (n : ℕ) : + (momentHankelMatrix (primeWindowMoment X H) n).PosSemidef := by + apply momentHankelMatrix_finset_sum_posSemidef + intro p hp + exact (primeWindow_weight_pos hH hp).le + +/-- A nonsingular finite prime moment matrix gives genuine weighted-sum +orthogonality to every lower-degree polynomial. -/ +theorem sum_primeWindowPolynomial_mul_eval_eq_zero (X H : ℝ) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix (primeWindowMoment X H) n).det) + {p : ℝ[X]} (hp : p.degree < n) : + (∑ a ∈ primeWindow X H, (Real.log a / H) * + p.eval (((a : ℝ) - X) / H) * + (primeWindowPolynomial X H n).eval (((a : ℝ) - X) / H)) = 0 := by + rw [← momentPairing_primeWindowMoment] + exact momentPairing_monicMomentPolynomial _ n hdet hp + +end Chebyshev diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowQuadrature.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowQuadrature.lean new file mode 100644 index 000000000..1b0089265 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowQuadrature.lean @@ -0,0 +1,65 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowOrthogonal +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Gaussian +import RealRooted.Mathlib.Algebra.Polynomial.Moment.FiniteAtoms +import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadratureMoments + +/-! +# Gaussian quadrature of finite prime-window sums + +The roots of a nonsingular prime-window moment polynomial give an exact +quadrature rule for the original finite logarithmically weighted prime sum. +Positive definite finite prime moments give positive Gaussian weights. +-/ + +public section + +open Polynomial + +namespace Chebyshev + +/-- A prime-window moment functional is the original finite prime sum. -/ +theorem momentFunctional_primeWindowMoment (X H : ℝ) (p : ℝ[X]) : + momentFunctional (primeWindowMoment X H) p = + ∑ a ∈ primeWindow X H, (Real.log a / H) * p.eval (((a : ℝ) - X) / H) := + momentFunctional_finset_sum _ _ _ _ + +/-- Distinct roots of the prime-window moment polynomial give exact Gaussian +quadrature below degree `2 * n` for the actual weighted prime sum. -/ +theorem primeWindow_quadrature_exact (X H : ℝ) {n : ℕ} + (hdet : IsUnit (momentHankelMatrix (primeWindowMoment X H) n).det) + (x : Fin n → ℝ) (hx : Function.Injective x) + (hroots : ∀ i, (primeWindowPolynomial X H n).IsRoot (x i)) + {p : ℝ[X]} (hp : p.degree < (2 * n : ℕ)) : + (∑ a ∈ primeWindow X H, (Real.log a / H) * p.eval (((a : ℝ) - X) / H)) = + ∑ i : Fin n, Lagrange.quadratureWeight + (momentFunctionalLinearMap (primeWindowMoment X H)) x i * p.eval (x i) := by + rw [← momentFunctional_primeWindowMoment] + exact Lagrange.quadrature_exact_monicMomentPolynomial _ hdet x hx hroots hp + +/-- Positive definite prime moments give positive Gaussian weights. -/ +theorem primeWindow_quadratureWeight_pos (X H : ℝ) {n : ℕ} + (hpos : (momentHankelMatrix (primeWindowMoment X H) n).PosDef) + (x : Fin n → ℝ) (hx : Function.Injective x) + (hroots : ∀ i, (primeWindowPolynomial X H n).IsRoot (x i)) (i : Fin n) : + 0 < Lagrange.quadratureWeight (momentFunctionalLinearMap (primeWindowMoment X H)) x i := + Lagrange.quadratureWeight_pos_monicMomentPolynomial _ hpos x hx hroots i + +/-- In the one-node case the existing Lagrange weight is exactly the total +prime-window mass. It is not silently normalized to one. -/ +theorem primeWindow_quadratureWeight_one (X H : ℝ) (x : Fin 1 → ℝ) : + Lagrange.quadratureWeight (momentFunctionalLinearMap (primeWindowMoment X H)) x 0 = + primeWindowMoment X H 0 := by + have hx : Function.Injective x := fun _ _ _ ↦ Subsingleton.elim _ _ + have h := Lagrange.quadrature_exact_of_degree_lt + (momentFunctionalLinearMap (primeWindowMoment X H)) x hx (p := 1) (by norm_num) + simpa using h.symm + +end Chebyshev diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowWeightedOrthogonal.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowWeightedOrthogonal.lean new file mode 100644 index 000000000..7a9b3fe70 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowWeightedOrthogonal.lean @@ -0,0 +1,99 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowContinuous +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowOrthogonal +import RealRooted.Mathlib.Algebra.Polynomial.Moment.FiniteAtoms +import Mathlib.Tactic.Ring + +/-! +# Monic polynomials from weighted prime-window moments + +The finite moment solve always defines a monic polynomial. Its orthogonality +to the actual finite weighted prime sum requires a nonsingular Hankel matrix. +No RH assumption is used in these algebraic facts. +-/ + +public section + +open Polynomial + +namespace Chebyshev + +/-- The monic moment polynomial for a prime window with an additional weight. +This definition alone does not assert orthogonality for a singular moment matrix. -/ +@[expose] noncomputable def primeWindowWeightedPolynomial + (W : ℝ → ℝ) (X H : ℝ) (n : ℕ) : ℝ[X] := + monicMomentPolynomial (primeWindowWeightedMoment W X H) n + +/-- Every weighted moment solve has the prescribed monic degree. -/ +theorem isMonicOfDegree_primeWindowWeightedPolynomial + (W : ℝ → ℝ) (X H : ℝ) (n : ℕ) : + IsMonicOfDegree (primeWindowWeightedPolynomial W X H n) n := + isMonicOfDegree_monicMomentPolynomial _ _ + +/-- The degree-zero weighted polynomial is one even for an empty window. -/ +@[simp] theorem primeWindowWeightedPolynomial_zero (W : ℝ → ℝ) (X H : ℝ) : + primeWindowWeightedPolynomial W X H 0 = 1 := by + simp only [primeWindowWeightedPolynomial, monicMomentPolynomial_zero] + +/-- The constant unit reference weight gives the original prime-window polynomial. -/ +@[simp] theorem primeWindowWeightedPolynomial_one (X H : ℝ) (n : ℕ) : + primeWindowWeightedPolynomial (fun _ ↦ 1) X H n = primeWindowPolynomial X H n := by + simp only [primeWindowWeightedPolynomial, primeWindowWeightedMoment_one, primeWindowPolynomial] + +/-- Weighted prime moments are finite atomic moments with the product weight. -/ +theorem primeWindowWeightedMoment_eq_sum (W : ℝ → ℝ) (X H : ℝ) (k : ℕ) : + primeWindowWeightedMoment W X H k = + ∑ a ∈ primeWindow X H, + ((Real.log a / H) * W (((a : ℝ) - X) / H)) * (((a : ℝ) - X) / H) ^ k := by + unfold primeWindowWeightedMoment + apply Finset.sum_congr rfl + intro a _ + ring + +/-- The weighted moment pairing is the original finite prime sum. -/ +theorem momentPairing_primeWindowWeightedMoment + (W : ℝ → ℝ) (X H : ℝ) (p q : ℝ[X]) : + momentPairing (primeWindowWeightedMoment W X H) p q = + ∑ a ∈ primeWindow X H, ((Real.log a / H) * W (((a : ℝ) - X) / H)) * + p.eval (((a : ℝ) - X) / H) * q.eval (((a : ℝ) - X) / H) := by + have hm : primeWindowWeightedMoment W X H = fun k ↦ + ∑ a ∈ primeWindow X H, + ((Real.log a / H) * W (((a : ℝ) - X) / H)) * (((a : ℝ) - X) / H) ^ k := + funext (primeWindowWeightedMoment_eq_sum W X H) + rw [hm] + exact momentPairing_finset_sum _ _ _ _ _ + +/-- Nonnegative reference weights give positive semidefinite Hankel matrices +for every positive-length prime window, without any support-size assumption. -/ +theorem primeWindowWeightedMoment_hankel_posSemidef {W : ℝ → ℝ} {X H : ℝ} + (hH : 0 < H) (hW : ∀ x ∈ Set.Icc (0 : ℝ) 1, 0 ≤ W x) (n : ℕ) : + (momentHankelMatrix (primeWindowWeightedMoment W X H) n).PosSemidef := by + apply momentHankelMatrix_posSemidef_of_nonneg + intro p _ + rw [momentPairing_primeWindowWeightedMoment] + apply Finset.sum_nonneg + intro a ha + have hx := primeWindow_node_mem_Ioc hH ha + have hw := mul_nonneg (primeWindow_weight_pos hH ha).le (hW _ ⟨hx.1.le, hx.2⟩) + simpa only [pow_two, mul_assoc] using mul_nonneg hw + (sq_nonneg (p.eval (((a : ℝ) - X) / H))) + +/-- A nonsingular weighted Hankel matrix gives orthogonality in the actual +finite weighted prime sum to every lower-degree polynomial. -/ +theorem sum_primeWindowWeightedPolynomial_mul_eval_eq_zero + (W : ℝ → ℝ) (X H : ℝ) (n : ℕ) + (hdet : IsUnit (momentHankelMatrix (primeWindowWeightedMoment W X H) n).det) + {p : ℝ[X]} (hp : p.degree < n) : + (∑ a ∈ primeWindow X H, ((Real.log a / H) * W (((a : ℝ) - X) / H)) * + p.eval (((a : ℝ) - X) / H) * + (primeWindowWeightedPolynomial W X H n).eval (((a : ℝ) - X) / H)) = 0 := by + rw [← momentPairing_primeWindowWeightedMoment] + exact momentPairing_monicMomentPolynomial _ n hdet hp + +end Chebyshev diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowWeightedQuadrature.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowWeightedQuadrature.lean new file mode 100644 index 000000000..5a49a2724 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowWeightedQuadrature.lean @@ -0,0 +1,52 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowContinuous +public import RealRooted.Mathlib.Algebra.Polynomial.Moment +import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature +import RealRooted.Mathlib.Algebra.Polynomial.Moment.FiniteAtoms +import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadratureMoments + +/-! +# Weighted prime-window functionals for Gaussian quadrature + +The weighted moment functional is exactly the finite weighted prime sum. +The one-node Lagrange weight is its total mass, without probability normalization. +-/ + +public section + +open Polynomial + +namespace Chebyshev + +/-- Weighted prime moment functionals are the actual finite prime sums with +the original product weights. -/ +theorem momentFunctional_primeWindowWeightedMoment (W : ℝ → ℝ) (X H : ℝ) (p : ℝ[X]) : + momentFunctional (primeWindowWeightedMoment W X H) p = + ∑ a ∈ primeWindow X H, ((Real.log a / H) * W (((a : ℝ) - X) / H)) * + p.eval (((a : ℝ) - X) / H) := by + have hm : primeWindowWeightedMoment W X H = fun k ↦ + ∑ a ∈ primeWindow X H, + ((Real.log a / H) * W (((a : ℝ) - X) / H)) * (((a : ℝ) - X) / H) ^ k := + funext (primeWindowWeightedMoment_eq_sum W X H) + rw [hm] + exact momentFunctional_finset_sum _ _ _ _ + +/-- The one-node weighted prime rule has its actual weighted mass as weight. -/ +theorem primeWindowWeighted_quadratureWeight_one (W : ℝ → ℝ) (X H : ℝ) + (x : Fin 1 → ℝ) : + Lagrange.quadratureWeight + (momentFunctionalLinearMap (primeWindowWeightedMoment W X H)) x 0 = + primeWindowWeightedMoment W X H 0 := by + have hx : Function.Injective x := fun _ _ _ ↦ Subsingleton.elim _ _ + have h := Lagrange.quadrature_exact_of_degree_lt + (momentFunctionalLinearMap (primeWindowWeightedMoment W X H)) x hx (p := 1) (by norm_num) + simpa using h.symm + +end Chebyshev diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/RiemannHypothesis.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/RiemannHypothesis.lean new file mode 100644 index 000000000..3d97b0e7e --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/RiemannHypothesis.lean @@ -0,0 +1,52 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.Chebyshev +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.NumberTheory.Chebyshev.Unsmoothing +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ErrorDifference + +/-! +# Chebyshev error bounds from Mathlib's Riemann hypothesis + +Mathlib's RH implies `psi(x) - x = O(sqrt(x) log(x)^2)` and the corresponding +bound for `theta`. The proof uses the integrated explicit formula, absolute +zero-series convergence, quantitative finite-difference estimates, and the +unconditional removal of higher prime powers. +-/ + +public section + +open Filter Asymptotics + +namespace RiemannHypothesis + +/-- Mathlib's RH gives a shared positive error constant for both Chebyshev functions. -/ +theorem exists_abs_psi_theta_sub_le_sqrt_mul_log_sq (hRH : RiemannHypothesis) : + ∃ K : ℝ, 0 < K ∧ ∀ x : ℝ, 25 ≤ x → + |Chebyshev.psi x - x| ≤ K * (Real.sqrt x * Real.log x ^ 2) ∧ + |Chebyshev.theta x - x| ≤ K * (Real.sqrt x * Real.log x ^ 2) := by + obtain ⟨C, hC, hback, hforward⟩ := hRH.exists_psiIntegralError_sqrt_bounds + exact Chebyshev.exists_abs_psi_theta_sub_le_of_psiIntegralError_bounds hC.le hback hforward + +/-- Under Mathlib's RH, `psi(x) - x` has the classical square-root logarithmic-square error. -/ +theorem isBigO_psi_sub_id (hRH : RiemannHypothesis) : + (fun x : ℝ ↦ Chebyshev.psi x - x) =O[atTop] + (fun x : ℝ ↦ Real.sqrt x * Real.log x ^ 2) := by + obtain ⟨K, _, hbound⟩ := hRH.exists_abs_psi_theta_sub_le_sqrt_mul_log_sq + apply IsBigO.of_bound K + filter_upwards [eventually_ge_atTop (25 : ℝ)] with x hx + have hw : 0 ≤ Real.sqrt x * Real.log x ^ 2 := by positivity + simpa only [Real.norm_eq_abs, abs_of_nonneg hw] using (hbound x hx).1 + +/-- Under Mathlib's RH, `theta(x) - x` has the classical square-root logarithmic-square error. -/ +theorem isBigO_theta_sub_id (hRH : RiemannHypothesis) : + (fun x : ℝ ↦ Chebyshev.theta x - x) =O[atTop] + (fun x : ℝ ↦ Real.sqrt x * Real.log x ^ 2) := + Chebyshev.isBigO_theta_sub_id_of_isBigO_psi_sub_id hRH.isBigO_psi_sub_id + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/Riesz.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/Riesz.lean new file mode 100644 index 000000000..4f33b2f8f --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/Riesz.lean @@ -0,0 +1,94 @@ +/- +Copyright (c) 2026 Steve Hubbard, RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Steve Hubbard, RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.Chebyshev +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.NumberTheory.LSeries.Riesz +import Mathlib.NumberTheory.LSeries.Dirichlet + +/-! +# The integrated Chebyshev function and its Perron formula + +The first integral of `Chebyshev.psi` is a finite von Mangoldt sum with weight `x - n`. +Its Perron representation follows from the general first Riesz mean and Mathlib's identity +between the von Mangoldt Dirichlet series and `-ζ'/ζ`. All results here are unconditional. + +The Perron specialization follows Steve Hubbard's `goldbach-lean`, commit +`da5cf9edad7896290771dfcab8feee2906399e3d`, +`entries/dudek2014/LeanLab/PNTPort/ZetaZeros/Perron1.lean` (Apache-2.0). +-/ + +public section + +open Complex MeasureTheory +open scoped ArithmeticFunction.vonMangoldt + +namespace Chebyshev + +/-- Integrating the Chebyshev function gives the first von Mangoldt Riesz sum. -/ +theorem integral_psi_eq_sum_sub_mul_vonMangoldt {x : ℝ} (hx : 0 ≤ x) : + (∫ t in (0 : ℝ)..x, psi t) = + ∑ n ∈ Finset.Iic ⌊x⌋₊, (x - n) * Λ n := by + have h := sum_mul_eq_sub_integral_mul (f := fun t : ℝ ↦ t) (c := fun n ↦ Λ n) hx + (fun t _ ↦ differentiableAt_id) (by simp) + simp only [deriv_id'', one_mul, ← psi_eq_sum_Icc] at h + rw [intervalIntegral.integral_of_le hx] + have hsum : psi x = ∑ n ∈ Finset.Iic ⌊x⌋₊, Λ n := by + simpa only [Finset.Iic_eq_Icc, Nat.bot_eq_zero] using psi_eq_sum_Icc x + rw [hsum, Finset.mul_sum] at h + simp only [sub_mul, Finset.sum_sub_distrib, Finset.Iic_eq_Icc, Nat.bot_eq_zero] at h ⊢ + linarith + +/-- The smoothed von Mangoldt Perron integrand is absolutely integrable on each line +to the right of `1`. -/ +theorem integrable_logDeriv_riemannZeta_mul_cpow {x c : ℝ} (hx : 0 < x) (hc : 1 < c) : + Integrable (fun t : ℝ ↦ (-deriv riemannZeta ((c : ℂ) + t * I) / + riemannZeta ((c : ℂ) + t * I)) * (x : ℂ) ^ ((c : ℂ) + t * I) / + (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1))) := by + have h := LSeries.integrable_mul_cpow_div_mul_add_one hx (zero_lt_one.trans hc) + (ArithmeticFunction.LSeriesSummable_vonMangoldt (by simpa using hc)) + simpa only [ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div + (s := (c : ℂ) + (_ : ℝ) * I) (by simpa using hc)] using h + +/-- The Perron integral for the first-order smoothed von Mangoldt sum. -/ +theorem sum_vonMangoldt_mul_one_sub_eq_integral {x c : ℝ} (hx : 0 < x) (hc : 1 < c) : + ∑ n ∈ Finset.Iic ⌊x⌋₊, (Λ n : ℂ) * (1 - (n : ℝ) / x : ℝ) = + ((2 * Real.pi : ℝ) : ℂ)⁻¹ * + ∫ t : ℝ, (-deriv riemannZeta ((c : ℂ) + t * I) / + riemannZeta ((c : ℂ) + t * I)) * (x : ℂ) ^ ((c : ℂ) + t * I) / + (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1)) := by + rw [LSeries.sum_mul_one_sub_eq_integral (by simp) hx (zero_lt_one.trans hc) + (ArithmeticFunction.LSeriesSummable_vonMangoldt (by simpa using hc))] + congr 2 + funext t + rw [ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div (by simpa using hc)] + +/-- Multiplying the normalized Perron formula by `x` gives the integrated Chebyshev sum. -/ +theorem sum_sub_mul_vonMangoldt_eq_integral {x c : ℝ} (hx : 0 < x) (hc : 1 < c) : + ((∑ n ∈ Finset.Iic ⌊x⌋₊, (x - n) * Λ n : ℝ) : ℂ) = + (x : ℂ) * (((2 * Real.pi : ℝ) : ℂ)⁻¹ * + ∫ t : ℝ, (-deriv riemannZeta ((c : ℂ) + t * I) / + riemannZeta ((c : ℂ) + t * I)) * (x : ℂ) ^ ((c : ℂ) + t * I) / + (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1))) := by + rw [← sum_vonMangoldt_mul_one_sub_eq_integral hx hc, Finset.mul_sum] + push_cast + refine Finset.sum_congr rfl fun n _ ↦ ?_ + have hx0 : (x : ℂ) ≠ 0 := Complex.ofReal_ne_zero.2 hx.ne' + field_simp + +/-- The first integral of `psi` equals its absolutely convergent Perron integral on any +vertical line to the right of `1`. -/ +theorem integral_psi_eq_integral {x c : ℝ} (hx : 0 < x) (hc : 1 < c) : + ((∫ t in (0 : ℝ)..x, psi t : ℝ) : ℂ) = + (x : ℂ) * (((2 * Real.pi : ℝ) : ℂ)⁻¹ * + ∫ t : ℝ, (-deriv riemannZeta ((c : ℂ) + t * I) / + riemannZeta ((c : ℂ) + t * I)) * (x : ℂ) ^ ((c : ℂ) + t * I) / + (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1))) := by + rw [integral_psi_eq_sum_sub_mul_vonMangoldt hx.le] + exact sum_sub_mul_vonMangoldt_eq_integral hx hc + +end Chebyshev diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/ShortIntervals.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/ShortIntervals.lean new file mode 100644 index 000000000..22acff6d1 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/ShortIntervals.lean @@ -0,0 +1,53 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.Chebyshev +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import Mathlib.Topology.UniformSpace.UniformConvergence +import RealRooted.Mathlib.Analysis.Asymptotics.IncrementBounds +import RealRooted.Mathlib.NumberTheory.Chebyshev.RiemannHypothesis + +/-! +# Uniform Chebyshev discrepancy in short intervals under RH + +For `H = sqrt X * log X ^ 3`, Mathlib's RH implies that +`(theta (X + H * u) - theta X) / H` converges uniformly to `u ∈ [0, 1]`, with +error `O(1 / log X)`. The subtraction of Chebyshev functions corresponds to +primes in `(X, X + H * u]`: the lower endpoint is excluded and the upper +endpoint included. +-/ + +public section + +open Filter Set + +namespace RiemannHypothesis + +/-- Under RH, Chebyshev increments in square-root logarithmic-cube windows +have uniform discrepancy bounded by a positive constant divided by `log X`. -/ +theorem eventually_theta_increment_div_sqrt_log_cube_le (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ᶠ X : ℝ in atTop, ∀ u ∈ Icc (0 : ℝ) 1, + |(Chebyshev.theta (X + (Real.sqrt X * Real.log X ^ 3) * u) - Chebyshev.theta X) / + (Real.sqrt X * Real.log X ^ 3) - u| ≤ C / Real.log X := by + obtain ⟨K, hK, herr⟩ := hRH.exists_abs_psi_theta_sub_le_sqrt_mul_log_sq + refine ⟨9 * K, by positivity, ?_⟩ + exact Real.eventually_increment_div_sqrt_log_cube_le hK.le + (fun y hy ↦ (herr y hy).2) + +/-- Under RH, normalized Chebyshev increments in square-root logarithmic-cube +windows converge uniformly to Lebesgue interval lengths on `[0, 1]`. -/ +theorem tendstoUniformlyOn_theta_increment_div_sqrt_log_cube (hRH : RiemannHypothesis) : + TendstoUniformlyOn + (fun X u : ℝ ↦ + (Chebyshev.theta (X + (Real.sqrt X * Real.log X ^ 3) * u) - Chebyshev.theta X) / + (Real.sqrt X * Real.log X ^ 3)) + (fun u ↦ u) atTop (Icc (0 : ℝ) 1) := by + obtain ⟨K, hK, herr⟩ := hRH.exists_abs_psi_theta_sub_le_sqrt_mul_log_sq + exact Real.tendstoUniformlyOn_increment_div_sqrt_log_cube hK.le + (fun y hy ↦ (herr y hy).2) + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/Chebyshev/Unsmoothing.lean b/RealRooted/Mathlib/NumberTheory/Chebyshev/Unsmoothing.lean new file mode 100644 index 000000000..323be4eca --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/Chebyshev/Unsmoothing.lean @@ -0,0 +1,149 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.Chebyshev +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.PrimitiveBounds +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +/-! +# Unsmoothing the Chebyshev integral and removing prime powers + +The real-valued function `psiIntegralError` subtracts the quadratic main term +from the integral of `psi`. Bounds for its forward and backward differences +at step `sqrt x` imply pointwise bounds for `psi x - x`. Mathlib's unconditional +bound `psi - theta = O(sqrt x)` then transfers the error to `theta`. + +The finite-difference bounds remain explicit hypotheses throughout this file. +These are unconditional reduction theorems, not RH error estimates by +themselves. The RH application must supply those bounds from the explicit +formula, the zero contribution, and the left-line remainder. +-/ + +public section + +open MeasureTheory Filter Asymptotics +open scoped Topology + +namespace Chebyshev + +/-- The first integrated Chebyshev error after removing the quadratic main term. -/ +@[expose] +noncomputable def psiIntegralError (x : ℝ) : ℝ := + (∫ t in (0 : ℝ)..x, psi t) - x ^ 2 / 2 + +/-- At large arguments the logarithmic-square weight absorbs the square-root smoothing error. -/ +private theorem sqrt_le_sqrt_mul_log_sq {x : ℝ} (hx : 25 ≤ x) : + Real.sqrt x ≤ Real.sqrt x * Real.log x ^ 2 := by + have hlog : 1 ≤ Real.log x := + (Real.le_log_iff_exp_le (by linarith)).mpr (by linarith [Real.exp_one_lt_three]) + have hsq : 1 ≤ Real.log x ^ 2 := by nlinarith + simpa only [mul_one] using mul_le_mul_of_nonneg_left hsq (Real.sqrt_nonneg x) + +/-- Square-root finite-difference bounds for the integrated error recover the RH-scale +pointwise error for `psi`, with explicit constant `C + 1`. -/ +theorem abs_psi_sub_le_of_psiIntegralError_bounds {x C : ℝ} (hx : 25 ≤ x) + (hback : |(psiIntegralError x - psiIntegralError (x - Real.sqrt x)) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) + (hforward : |(psiIntegralError (x + Real.sqrt x) - psiIntegralError x) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) : + |psi x - x| ≤ (C + 1) * (Real.sqrt x * Real.log x ^ 2) := by + have hsqrt : 0 < Real.sqrt x := Real.sqrt_pos.mpr (by linarith) + have h := psi_mono.abs_sub_le_of_integral_sub_quadratic_bounds hsqrt hback hforward + have hsmall : Real.sqrt x / 2 ≤ Real.sqrt x * Real.log x ^ 2 := + (by linarith [Real.sqrt_nonneg x] : Real.sqrt x / 2 ≤ Real.sqrt x).trans + (sqrt_le_sqrt_mul_log_sq hx) + calc + |psi x - x| ≤ Real.sqrt x / 2 + C * (Real.sqrt x * Real.log x ^ 2) := h + _ ≤ (Real.sqrt x * Real.log x ^ 2) + C * (Real.sqrt x * Real.log x ^ 2) := + add_le_add hsmall le_rfl + _ = (C + 1) * (Real.sqrt x * Real.log x ^ 2) := by ring + +/-- Removing prime powers enlarges any `sqrt(x) log(x)^2` bound for `psi - id` +by one fixed unconditional constant. -/ +theorem exists_abs_theta_sub_le_of_abs_psi_sub_le : + ∃ D : ℝ, 0 ≤ D ∧ ∀ x C : ℝ, 25 ≤ x → + |psi x - x| ≤ C * (Real.sqrt x * Real.log x ^ 2) → + |theta x - x| ≤ (C + D) * (Real.sqrt x * Real.log x ^ 2) := by + obtain ⟨D, hD⟩ := psi_sub_theta_le_mul_sqrt + have hD₀ : 0 ≤ D := by simpa using hD 1 + refine ⟨D, hD₀, fun x C hx hpsi ↦ ?_⟩ + calc + |theta x - x| ≤ |theta x - psi x| + |psi x - x| := abs_sub_le _ _ _ + _ = (psi x - theta x) + |psi x - x| := by + rw [abs_of_nonpos (sub_nonpos.mpr (theta_le_psi x))] + ring + _ ≤ D * Real.sqrt x + C * (Real.sqrt x * Real.log x ^ 2) := + add_le_add (hD x) hpsi + _ ≤ D * (Real.sqrt x * Real.log x ^ 2) + C * (Real.sqrt x * Real.log x ^ 2) := + add_le_add (mul_le_mul_of_nonneg_left (sqrt_le_sqrt_mul_log_sq hx) hD₀) le_rfl + _ = (C + D) * (Real.sqrt x * Real.log x ^ 2) := by ring + +/-- Uniform bounds for the two integrated-error differences yield a shared positive +pointwise error constant for both Chebyshev functions. -/ +theorem exists_abs_psi_theta_sub_le_of_psiIntegralError_bounds {C : ℝ} (hC : 0 ≤ C) + (hback : ∀ x : ℝ, 25 ≤ x → + |(psiIntegralError x - psiIntegralError (x - Real.sqrt x)) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) + (hforward : ∀ x : ℝ, 25 ≤ x → + |(psiIntegralError (x + Real.sqrt x) - psiIntegralError x) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) : + ∃ K : ℝ, 0 < K ∧ ∀ x : ℝ, 25 ≤ x → + |psi x - x| ≤ K * (Real.sqrt x * Real.log x ^ 2) ∧ + |theta x - x| ≤ K * (Real.sqrt x * Real.log x ^ 2) := by + obtain ⟨D, hD, htransfer⟩ := exists_abs_theta_sub_le_of_abs_psi_sub_le + refine ⟨C + 1 + D, by linarith, fun x hx ↦ ?_⟩ + have hpsi := abs_psi_sub_le_of_psiIntegralError_bounds hx (hback x hx) (hforward x hx) + refine ⟨hpsi.trans ?_, htransfer x (C + 1) hx hpsi⟩ + exact mul_le_mul_of_nonneg_right (by linarith) (by positivity) + +/-- Eventual finite-difference bounds imply the RH-scale `IsBigO` bound for `psi - id`. -/ +theorem isBigO_psi_sub_id_of_psiIntegralError_bounds {C : ℝ} + (hback : ∀ᶠ x : ℝ in atTop, + |(psiIntegralError x - psiIntegralError (x - Real.sqrt x)) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) + (hforward : ∀ᶠ x : ℝ in atTop, + |(psiIntegralError (x + Real.sqrt x) - psiIntegralError x) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) : + (fun x : ℝ ↦ psi x - x) =O[atTop] (fun x : ℝ ↦ Real.sqrt x * Real.log x ^ 2) := by + apply IsBigO.of_bound (C + 1) + filter_upwards [hback, hforward, eventually_ge_atTop (25 : ℝ)] with x hb hf hx + have hw : 0 ≤ Real.sqrt x * Real.log x ^ 2 := by positivity + simpa only [Real.norm_eq_abs, abs_of_nonneg hw] using + abs_psi_sub_le_of_psiIntegralError_bounds hx hb hf + +/-- The RH-scale error bound for `psi - id` transfers unconditionally to `theta - id`. -/ +theorem isBigO_theta_sub_id_of_isBigO_psi_sub_id + (hpsi : (fun x : ℝ ↦ psi x - x) =O[atTop] + (fun x : ℝ ↦ Real.sqrt x * Real.log x ^ 2)) : + (fun x : ℝ ↦ theta x - x) =O[atTop] + (fun x : ℝ ↦ Real.sqrt x * Real.log x ^ 2) := by + obtain ⟨C, hC⟩ := isBigO_iff.mp hpsi + obtain ⟨D, _, htransfer⟩ := exists_abs_theta_sub_le_of_abs_psi_sub_le + apply IsBigO.of_bound (C + D) + filter_upwards [hC, eventually_ge_atTop (25 : ℝ)] with x hx hx25 + have hw : 0 ≤ Real.sqrt x * Real.log x ^ 2 := by positivity + have hpsi' : |psi x - x| ≤ C * (Real.sqrt x * Real.log x ^ 2) := by + simpa only [Real.norm_eq_abs, abs_of_nonneg hw] using hx + simpa only [Real.norm_eq_abs, abs_of_nonneg hw] using htransfer x C hx25 hpsi' + +/-- Eventual bounds on the integrated `psi` error suffice for the corresponding `theta` estimate. -/ +theorem isBigO_theta_sub_id_of_psiIntegralError_bounds {C : ℝ} + (hback : ∀ᶠ x : ℝ in atTop, + |(psiIntegralError x - psiIntegralError (x - Real.sqrt x)) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) + (hforward : ∀ᶠ x : ℝ in atTop, + |(psiIntegralError (x + Real.sqrt x) - psiIntegralError x) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) : + (fun x : ℝ ↦ theta x - x) =O[atTop] + (fun x : ℝ ↦ Real.sqrt x * Real.log x ^ 2) := + isBigO_theta_sub_id_of_isBigO_psi_sub_id + (isBigO_psi_sub_id_of_psiIntegralError_bounds hback hforward) + +end Chebyshev diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/AbsoluteHeatTrace.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/AbsoluteHeatTrace.lean new file mode 100644 index 000000000..5be46b9c7 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/AbsoluteHeatTrace.lean @@ -0,0 +1,71 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralIndex +import RealRooted.Mathlib.Analysis.Complex.AbsoluteZeroHeatTrace +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + +/-! +# Unconditional estimates for absolute xi zero heat traces + +The absolute zero moduli of each derivative of the square-variable xi +function give a completely monotone heat trace with all small-time bounds +above exponent one half and common exponential decay at large time. +These statements are unconditional. RH is used separately to identify +the Laplace moments with actual xi logarithmic derivatives. +-/ + +public section + +open Complex Filter MeasureTheory Topology + +/-- Complete monotonicity of the absolute xi zero heat trace does not +require RH. -/ +theorem isCompletelyMonotoneOnIoi_xi_zeroHeatTrace (s : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta)) := + Complex.isCompletelyMonotoneOnIoi_zeroHeatTrace_of_order + (differentiable_iteratedDeriv_riemannXiTheta s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_iteratedDeriv_riemannXiTheta s) + +/-- Every exponent above one half controls the absolute xi zero heat +derivatives near zero, unconditionally. -/ +theorem isBigO_iteratedDeriv_xi_absoluteZeroHeatTrace_nhdsWithin + (s k : ℕ) {p : ℝ} (hp : 1 / 2 < p) : + (iteratedDeriv k (Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta))) + =O[𝓝[>] (0 : ℝ)] (fun t ↦ t ^ (-(p + (k : ℝ)))) := + Complex.isBigO_iteratedDeriv_zeroHeatTrace_nhdsWithin_of_order + (differentiable_iteratedDeriv_riemannXiTheta s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_iteratedDeriv_riemannXiTheta s) hp (by linarith) k + +/-- Each xi derivative's absolute-zero heat trace has a common positive +exponential decay rate for all its heat derivatives. -/ +theorem exists_isBigO_iteratedDeriv_xi_absoluteZeroHeatTrace_atTop (s : ℕ) : + ∃ b : ℝ, 0 < b ∧ ∀ k : ℕ, + (iteratedDeriv k (Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta))) =O[atTop] + (fun t ↦ Real.exp (-b * t)) := + Complex.exists_isBigO_iteratedDeriv_zeroHeatTrace_atTop_of_order + (differentiable_iteratedDeriv_riemannXiTheta s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_iteratedDeriv_riemannXiTheta s) + +/-- Absolute xi zero heat traces have all integrable Laplace moments, +including parameter zero, independently of RH. -/ +theorem laplace_xi_absoluteZeroHeatTrace (s k : ℕ) {x : ℝ} (hx : 0 ≤ x) : + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta) t) (Set.Ioi 0) ∧ + (∫ t : ℝ in Set.Ioi 0, Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta) t) = + ∑' i : Complex.zeroSpectralIndex (iteratedDeriv s riemannXiTheta), + (k.factorial : ℝ) / + (x + Complex.zeroSpectralRate (iteratedDeriv s riemannXiTheta) i) ^ (k + 1) := + Complex.laplace_zeroHeatTrace_of_order_lt_one + (differentiable_iteratedDeriv_riemannXiTheta s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_iteratedDeriv_riemannXiTheta s) (by norm_num) k hx diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/AbsoluteHeatTracePositive.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/AbsoluteHeatTracePositive.lean new file mode 100644 index 000000000..3537b3d08 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/AbsoluteHeatTracePositive.lean @@ -0,0 +1,49 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralIndex +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralNonempty +import RealRooted.Mathlib.Analysis.Complex.AbsoluteZeroHeatTrace +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas + +/-! +# Strict positivity of absolute xi zero heat traces + +Every derivative shift of the square-variable xi function is nonconstant, +because its next derivative at zero is nonzero. Order one half therefore +gives a nonempty native zero spectrum without RH. Every alternating +derivative of its absolute-zero heat trace is consequently positive. +This does not identify the trace with the xi logarithmic derivative. +-/ + +public section + +/-- Every derivative of the square-variable xi function has a nonempty +repeated native zero spectrum, unconditionally. -/ +theorem nonempty_zeroSpectralIndex_iteratedDeriv_riemannXiTheta (s : ℕ) : + Nonempty (Complex.zeroSpectralIndex (iteratedDeriv s riemannXiTheta)) := by + apply Complex.nonempty_zeroSpectralIndex_of_order_lt_one + (differentiable_iteratedDeriv_riemannXiTheta s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_iteratedDeriv_riemannXiTheta s) (by norm_num) + intro h + apply iteratedDeriv_riemannXiTheta_zero_ne_zero (s + 1) + rw [iteratedDeriv_succ, h, deriv_const] + +/-- Every alternating derivative of the absolute xi zero heat trace is +strictly positive at positive time, independently of RH. -/ +theorem signed_iteratedDeriv_xi_absoluteZeroHeatTrace_pos + (s k : ℕ) {t : ℝ} (ht : 0 < t) : + 0 < (-1 : ℝ) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta)) t := by + have := nonempty_zeroSpectralIndex_iteratedDeriv_riemannXiTheta s + exact Complex.signed_iteratedDeriv_zeroHeatTrace_pos_of_order + (differentiable_iteratedDeriv_riemannXiTheta s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_iteratedDeriv_riemannXiTheta s) k ht diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Derivative.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Derivative.lean new file mode 100644 index 000000000..aec3fe127 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Derivative.lean @@ -0,0 +1,42 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity + +/-! +# Derivatives of the square-variable xi function + +Every derivative of `riemannXiTheta` is entire, has order at most one half, and is +nonzero at the origin. These unconditional facts allow the real-zero criterion +for the Laguerre--Pólya class to be applied at any fixed derivative index. +-/ + +public section + +/-- Every iterated derivative of the square-variable xi function is entire. -/ +theorem differentiable_iteratedDeriv_riemannXiTheta (n : ℕ) : + Differentiable ℂ (iteratedDeriv n riemannXiTheta) := + (differentiable_riemannXiTheta.contDiff (n := ⊤)).differentiable_iteratedDeriv n (by simp) + +/-- Every iterated derivative of the square-variable xi function has order at most one half. -/ +theorem orderLE_half_iteratedDeriv_riemannXiTheta (n : ℕ) : + TauCeti.OrderLE (iteratedDeriv n riemannXiTheta) (1 / 2) := + orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n + +/-- Every iterated derivative of the square-variable xi function has order at most one. -/ +theorem orderLE_iteratedDeriv_riemannXiTheta (n : ℕ) : + TauCeti.OrderLE (iteratedDeriv n riemannXiTheta) 1 := + orderLE_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n + +/-- Positivity of the xi Taylor data excludes vanishing at zero for every derivative. -/ +theorem iteratedDeriv_riemannXiTheta_zero_ne_zero (n : ℕ) : + iteratedDeriv n riemannXiTheta 0 ≠ 0 := by + rw [← ofReal_riemannXiCoeff] + exact_mod_cast (riemannXiCoeff_pos n).ne' diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierMajorant.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierMajorant.lean new file mode 100644 index 000000000..9a4494ad6 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierMajorant.lean @@ -0,0 +1,54 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierSummand +import RealRooted.Mathlib.Analysis.Polynomial.GaussianMajorant + +/-! +# Locally uniform summable bounds for the xi Fourier summands + +Every derivative order has a common summable majorant on each compact real +interval. Both positive and negative values of the real parameter are covered. +-/ + +public section + +open Real Set + +/-- Each derivative family of Fourier summands has a summable bound on a real interval. -/ +theorem exists_summable_bound_riemannXiFourierTerm (j : ℕ) (a b : ℝ) : + ∃ M : ℕ → ℝ, Summable M ∧ + ∀ n t, t ∈ Icc a b → ‖riemannXiFourierTerm j n t‖ ≤ M n := by + obtain ⟨M, hM, hbound⟩ := + (riemannXiFourierPolynomial j).exists_summable_bound_nat_pow_eval_exp 2 + (mul_pos pi_pos (exp_pos (4 * a))) (π * exp (4 * b)) (5 * b) + refine ⟨fun n => π * M n, hM.mul_left π, ?_⟩ + intro n t ht + have h := hbound n (π * exp (4 * t)) (5 * t) + (mul_le_mul_of_nonneg_left (exp_le_exp.mpr (by linarith [ht.1])) pi_pos.le) + (mul_le_mul_of_nonneg_left (exp_le_exp.mpr (by linarith [ht.2])) pi_pos.le) + (by linarith [ht.2]) + have harg : π * (n : ℝ) ^ 2 * exp (4 * t) = (π * exp (4 * t)) * n ^ 2 := by ring + have heq : riemannXiFourierTerm j n t = π * + ((n : ℝ) ^ 2 * (riemannXiFourierPolynomial j).eval ((π * exp (4 * t)) * n ^ 2) * + exp (5 * t - (π * exp (4 * t)) * n ^ 2)) := by + rw [riemannXiFourierTerm, harg] + ring + rw [heq, norm_mul, norm_of_nonneg pi_pos.le] + exact mul_le_mul_of_nonneg_left h pi_pos.le + +/-- Every derivative series of the Fourier kernel converges absolutely at each real point. -/ +theorem summable_norm_riemannXiFourierTerm (j : ℕ) (t : ℝ) : + Summable (fun n : ℕ => ‖riemannXiFourierTerm j n t‖) := by + obtain ⟨M, hM, hbound⟩ := exists_summable_bound_riemannXiFourierTerm j t t + exact hM.of_nonneg_of_le (fun n => norm_nonneg _) + (fun n => hbound n t ⟨le_rfl, le_rfl⟩) + +/-- Every derivative series of the Fourier kernel is genuinely summable. -/ +theorem summable_riemannXiFourierTerm (j : ℕ) (t : ℝ) : + Summable (fun n : ℕ => riemannXiFourierTerm j n t) := + (summable_norm_riemannXiFourierTerm j t).of_norm diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierPolynomial.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierPolynomial.lean new file mode 100644 index 000000000..69d103809 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierPolynomial.lean @@ -0,0 +1,78 @@ +/- +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.Algebra.Polynomial.Derivative +public import Mathlib.Basic.Real.Basic + +/-! +# Derivative polynomials for the xi Fourier kernel + +The derivative of a summand of the Fourier kernel replaces `p` by +`4 X p' + (5 - 4 X) p`. The indexing here starts with derivative order zero; +Csordas and Varga (1988), Section 3, index the same polynomials from one. +-/ + +public section + +open Polynomial +open scoped Polynomial + +/-- The polynomial in the derivative of order `n` of a xi Fourier-kernel summand. -/ +@[expose] noncomputable def riemannXiFourierPolynomial : ℕ → ℝ[X] + | 0 => 2 * X - 3 + | n + 1 => 4 * X * (riemannXiFourierPolynomial n).derivative + + (5 - 4 * X) * riemannXiFourierPolynomial n + +/-- The recurrence for the Fourier-kernel derivative polynomials. -/ +theorem riemannXiFourierPolynomial_succ (n : ℕ) : + riemannXiFourierPolynomial (n + 1) = + 4 * X * (riemannXiFourierPolynomial n).derivative + + (5 - 4 * X) * riemannXiFourierPolynomial n := rfl + +/-- The explicit derivative polynomial of order `0`. -/ +theorem riemannXiFourierPolynomial_zero : + riemannXiFourierPolynomial 0 = 2 * X - 3 := by + rfl + +/-- The explicit derivative polynomial of order `1`. -/ +theorem riemannXiFourierPolynomial_one : + riemannXiFourierPolynomial 1 = -8 * X ^ 2 + 30 * X - 15 := by + norm_num [riemannXiFourierPolynomial, Polynomial.derivative_X_pow] + ring + +/-- The explicit derivative polynomial of order `2`. -/ +theorem riemannXiFourierPolynomial_two : + riemannXiFourierPolynomial 2 = 32 * X ^ 3 - 224 * X ^ 2 + 330 * X - 75 := by + norm_num [riemannXiFourierPolynomial, Polynomial.derivative_X_pow] + ring + +/-- The explicit derivative polynomial of order `3`. -/ +theorem riemannXiFourierPolynomial_three : + riemannXiFourierPolynomial 3 = -128 * X ^ 4 + 1440 * X ^ 3 - 4232 * X ^ 2 + 3270 * X - 375 := by + norm_num [riemannXiFourierPolynomial, Polynomial.derivative_X_pow] + ring + +/-- The explicit derivative polynomial of order `4`. -/ +theorem riemannXiFourierPolynomial_four : + riemannXiFourierPolynomial 4 = 512 * X ^ 5 - 8448 * X ^ 4 + 41408 * X ^ 3 - 68096 * X ^ 2 + + 30930 * X - 1875 := by + norm_num [riemannXiFourierPolynomial, Polynomial.derivative_X_pow] + ring + +/-- The explicit derivative polynomial of order `5`. -/ +theorem riemannXiFourierPolynomial_five : + riemannXiFourierPolynomial 5 = -2048 * X ^ 6 + 46592 * X ^ 5 - 343040 * X ^ 4 + 976320 * X + ^ 3 - 1008968 * X ^ 2 + 285870 * X - 9375 := by + norm_num [riemannXiFourierPolynomial, Polynomial.derivative_X_pow] + ring + +/-- The explicit derivative polynomial of order `6`. -/ +theorem riemannXiFourierPolynomial_six : + riemannXiFourierPolynomial 6 = 8192 * X ^ 7 - 245760 * X ^ 6 + 2536960 * X ^ 5 - 11109120 * + X ^ 4 + 20633312 * X ^ 3 - 14260064 * X ^ 2 + 2610330 * X - 46875 := by + norm_num [riemannXiFourierPolynomial, Polynomial.derivative_X_pow] + ring diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierSeries.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierSeries.lean new file mode 100644 index 000000000..0f437ff08 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierSeries.lean @@ -0,0 +1,67 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierSummand +import Mathlib.Analysis.Calculus.SmoothSeries +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierMajorant + +/-! +# The xi Fourier kernel and its actual derivatives + +The all-natural-index sum includes a zero summand at index zero, so it equals +the positive-index Fourier series. Absolute local derivative majorants justify +differentiation to every order on the whole real line. +-/ + +public section + +open Real Set +open scoped ContDiff + +/-- The Fourier kernel in the even integral representation of the Riemann xi function. -/ +@[expose] noncomputable def riemannXiFourierKernel (t : ℝ) : ℝ := + ∑' n : ℕ, riemannXiFourierTerm 0 n t + +/-- The artificial zeroth lattice term vanishes at every derivative order. -/ +@[simp] theorem riemannXiFourierTerm_zero_index (j : ℕ) (t : ℝ) : + riemannXiFourierTerm j 0 t = 0 := by simp [riemannXiFourierTerm] + +/-- Termwise differentiation of every derivative series is valid at every real point. -/ +theorem hasDerivAt_tsum_riemannXiFourierTerm (j : ℕ) (t : ℝ) : + HasDerivAt (fun x => ∑' n : ℕ, riemannXiFourierTerm j n x) + (∑' n : ℕ, riemannXiFourierTerm (j + 1) n t) t := by + obtain ⟨M, hM, hbound⟩ := + exists_summable_bound_riemannXiFourierTerm (j + 1) (t - 1) (t + 1) + have ht : t ∈ Ioo (t - 1) (t + 1) := by constructor <;> linarith + exact hasDerivAt_tsum_of_isPreconnected hM isOpen_Ioo isPreconnected_Ioo + (fun n x _ => hasDerivAt_riemannXiFourierTerm j n x) + (fun n x hx => hbound n x ⟨hx.1.le, hx.2.le⟩) ht + (summable_riemannXiFourierTerm j t) ht + +/-- The polynomial summands give the actual iterated derivatives of the full Fourier kernel. -/ +theorem iteratedDeriv_riemannXiFourierKernel (j : ℕ) : + iteratedDeriv j riemannXiFourierKernel = + fun t => ∑' n : ℕ, riemannXiFourierTerm j n t := by + induction j with + | zero => rw [iteratedDeriv_zero]; rfl + | succ j ih => + rw [iteratedDeriv_succ, ih] + exact funext fun t => (hasDerivAt_tsum_riemannXiFourierTerm j t).deriv + +/-- Each iterated derivative of the Fourier kernel is continuous on the real line. -/ +theorem continuous_iteratedDeriv_riemannXiFourierKernel (j : ℕ) : + Continuous (iteratedDeriv j riemannXiFourierKernel) := by + rw [iteratedDeriv_riemannXiFourierKernel] + exact continuous_iff_continuousAt.mpr fun t => + (hasDerivAt_tsum_riemannXiFourierTerm j t).continuousAt + +/-- The Fourier kernel is smooth to every finite order on the whole real line. -/ +theorem contDiff_riemannXiFourierKernel : ContDiff ℝ ∞ riemannXiFourierKernel := by + apply contDiff_of_differentiable_iteratedDeriv + intro j _ + rw [iteratedDeriv_riemannXiFourierKernel] + exact fun t => (hasDerivAt_tsum_riemannXiFourierTerm j t).differentiableAt diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierSummand.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierSummand.lean new file mode 100644 index 000000000..d4dfe9d8c --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierSummand.lean @@ -0,0 +1,63 @@ +/- +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 +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierPolynomial +import Mathlib.Analysis.Calculus.Deriv.Polynomial +import Mathlib.Analysis.SpecialFunctions.ExpDeriv + +/-! +# Derivatives of the xi Fourier-kernel summands + +These are finite summand identities. Passing derivatives through the full infinite +series requires separate local uniform convergence estimates. +-/ + +public section + +open Real Polynomial + +/-- The explicit derivative expression of order `j` for the `n`-th Fourier summand. -/ +@[expose] noncomputable def riemannXiFourierTerm (j n : ℕ) (t : ℝ) : ℝ := + π * (n : ℝ) ^ 2 * (riemannXiFourierPolynomial j).eval (π * (n : ℝ) ^ 2 * exp (4 * t)) * + exp (5 * t - π * (n : ℝ) ^ 2 * exp (4 * t)) + +/-- Differentiating a Fourier summand advances its derivative-polynomial index. -/ +theorem hasDerivAt_riemannXiFourierTerm (j n : ℕ) (t : ℝ) : + HasDerivAt (riemannXiFourierTerm j n) (riemannXiFourierTerm (j + 1) n t) t := by + let u (s : ℝ) := π * (n : ℝ) ^ 2 * exp (4 * s) + have hu : HasDerivAt u (4 * u t) t := by + convert (((hasDerivAt_id t).const_mul 4).exp).const_mul (π * (n : ℝ) ^ 2) using 1 + · simp only [u, id_eq] + · simp only [u, id_eq, mul_one] + ring + have hv : HasDerivAt (fun s => exp (5 * s - u s)) + (exp (5 * t - u t) * (5 - 4 * u t)) t := by + simpa using (((hasDerivAt_id t).const_mul 5).sub hu).exp + have hp := (riemannXiFourierPolynomial j).hasDerivAt (u t) + have h := ((hp.comp t hu).mul hv).const_mul (π * (n : ℝ) ^ 2) + convert h using 1 + · funext s + simp only [riemannXiFourierTerm, u, Pi.mul_apply, Function.comp_apply] + ring + · simp only [riemannXiFourierTerm, riemannXiFourierPolynomial_succ, eval_add, + eval_mul, eval_sub, eval_X, eval_ofNat, u, Function.comp_apply] + ring + +/-- The polynomial formula is the actual derivative of every finite Fourier summand. -/ +theorem iteratedDeriv_riemannXiFourierTerm (j n : ℕ) : + iteratedDeriv j (riemannXiFourierTerm 0 n) = riemannXiFourierTerm j n := by + induction j with + | zero => simp + | succ j ih => + rw [iteratedDeriv_succ, ih] + exact funext fun t => (hasDerivAt_riemannXiFourierTerm j n t).deriv + +/-- The first three Fourier summands, used for certified endpoint bounds. -/ +@[expose] noncomputable def riemannXiFourierPartial (j : ℕ) (t : ℝ) : ℝ := + riemannXiFourierTerm j 1 t + riemannXiFourierTerm j 2 t + riemannXiFourierTerm j 3 t diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Kernel.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Kernel.lean new file mode 100644 index 000000000..c308947f3 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Kernel.lean @@ -0,0 +1,166 @@ +/- +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.NumberTheory.LSeries.HurwitzZetaEven +import Mathlib.Analysis.Calculus.SmoothSeries +import TauCeti.Analysis.SpecialFunctions.Exp.StretchedDecay + +/-! +# Positivity and decay of the Riemann theta kernel + +The theta kernel with its constant term removed is positive and its derivative +is bounded above by minus pi times the kernel. +-/ + +@[expose] public section + +open Real Filter Asymptotics Set HurwitzZeta +open scoped Topology + +/-- The real theta kernel with its constant term removed. -/ +noncomputable def riemannThetaKernel (t : ℝ) : ℝ := evenKernel 0 t - 1 + +/-- The derivative series of the theta kernel. -/ +noncomputable def riemannThetaKernelDeriv (t : ℝ) : ℝ := + ∑' n : ℕ, -2 * π * (n + 1 : ℝ) ^ 2 * exp (-π * (n + 1 : ℝ) ^ 2 * t) + +/-- The positive Gaussian series for the theta kernel. -/ +theorem hasSum_riemannThetaKernel {t : ℝ} (ht : 0 < t) : + HasSum (fun n : ℕ => 2 * exp (-π * (n + 1 : ℝ) ^ 2 * t)) + (riemannThetaKernel t) := by + simpa [riemannThetaKernel, evenKernel_eq_cosKernel_of_zero] using hasSum_nat_cosKernel₀ 0 ht + +/-- The theta kernel is strictly positive on the positive ray. -/ +theorem riemannThetaKernel_pos {t : ℝ} (ht : 0 < t) : 0 < riemannThetaKernel t := by + rw [← (hasSum_riemannThetaKernel ht).tsum_eq] + exact lt_of_lt_of_le (by positivity) + ((hasSum_riemannThetaKernel ht).summable.le_tsum 0 (fun _ _ => by positivity)) + +/-- The theta kernel is continuous on the positive ray. -/ +theorem continuousOn_riemannThetaKernel : ContinuousOn riemannThetaKernel (Ioi 0) := + (continuousOn_evenKernel 0).sub continuousOn_const + +/-- The kernel decreases faster than every real power at infinity. -/ +theorem isBigO_riemannThetaKernel_rpow (r : ℝ) : + riemannThetaKernel =O[atTop] fun t => t ^ r := by + obtain ⟨p, hp, h⟩ := isBigO_atTop_evenKernel_sub 0 + apply TauCeti.isBigO_rpow_of_isBigO_exp_neg hp one_pos (α := 1) _ r + change (fun t => evenKernel 0 t - 1) =O[atTop] _ + simpa using h + +private theorem summable_theta_weight {t : ℝ} (ht : 0 < t) : + Summable (fun n : ℕ => (n + 1 : ℝ) ^ 2 * exp (-π * (n + 1 : ℝ) ^ 2 * t)) := by + have hinj : Function.Injective (fun n : ℕ => (n + 1 : ℤ)) := by + intro a b hab + exact_mod_cast add_right_cancel hab + have h := (summable_pow_mul_jacobiTheta₂_term_bound 0 ht 2).comp_injective hinj + convert h using 1 + funext n + dsimp only [Function.comp_apply] + push_cast + rw [abs_of_nonneg (by positivity : 0 ≤ (n + 1 : ℝ))] + congr 2 + ring + +private theorem summable_theta_deriv {t : ℝ} (ht : 0 < t) : + Summable (fun n : ℕ => -2 * π * (n + 1 : ℝ) ^ 2 * exp (-π * (n + 1 : ℝ) ^ 2 * t)) := by + simpa only [mul_assoc] using (summable_theta_weight ht).mul_left (-2 * π) + +/-- Differentiation of the theta series on the positive ray. -/ +theorem hasDerivAt_riemannThetaKernel {t : ℝ} (ht : 0 < t) : + HasDerivAt riemannThetaKernel (riemannThetaKernelDeriv t) t := by + let g (n : ℕ) (u : ℝ) := 2 * exp (-π * (n + 1 : ℝ) ^ 2 * u) + let g' (n : ℕ) (u : ℝ) := -2 * π * (n + 1 : ℝ) ^ 2 * exp (-π * (n + 1 : ℝ) ^ 2 * u) + have hbound := (summable_theta_weight (half_pos ht)).mul_left (2 * π) + have hg (n : ℕ) (u : ℝ) : HasDerivAt (g n) (g' n u) u := by + convert (((hasDerivAt_id' u).const_mul (-π * (n + 1 : ℝ) ^ 2)).exp).const_mul 2 using 1 + dsimp [g, g'] + ring + have h := hasDerivAt_tsum_of_isPreconnected hbound isOpen_Ioi (convex_Ioi _).isPreconnected + (fun n u _ => hg n u) (fun n u hu => ?_) + (show t ∈ Ioi (t / 2) by change t / 2 < t; linarith) + (hasSum_riemannThetaKernel ht).summable + (show t ∈ Ioi (t / 2) by change t / 2 < t; linarith) + · apply h.congr_of_eventuallyEq + filter_upwards [eventually_gt_nhds ht] with u hu + exact (hasSum_riemannThetaKernel hu).tsum_eq.symm + · dsimp [g'] + rw [abs_mul, abs_mul, abs_mul, abs_neg, abs_of_pos (by norm_num : (0 : ℝ) < 2), + abs_of_pos pi_pos, abs_of_nonneg (sq_nonneg _), abs_of_pos (exp_pos _)] + simp only [mul_assoc] + have he : exp (-π * (n + 1 : ℝ) ^ 2 * u) ≤ + exp (-π * (n + 1 : ℝ) ^ 2 * (t / 2)) := by + apply exp_le_exp.mpr + exact mul_le_mul_of_nonpos_left hu.le + (mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr pi_pos.le) (sq_nonneg _)) + simpa only [mul_assoc] using mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_left he (sq_nonneg _)) pi_pos.le) (by norm_num : (0 : ℝ) ≤ 2) + +/-- Each Gaussian summand decreases at least at rate pi. -/ +theorem riemannThetaKernelDeriv_le {t : ℝ} (ht : 0 < t) : + riemannThetaKernelDeriv t ≤ -π * riemannThetaKernel t := by + rw [riemannThetaKernelDeriv, ← (hasSum_riemannThetaKernel ht).tsum_eq, ← tsum_mul_left] + apply Summable.tsum_le_tsum _ (summable_theta_deriv ht) + ((hasSum_riemannThetaKernel ht).summable.mul_left (-π)) + intro n + have hn : 1 ≤ (n + 1 : ℝ) ^ 2 := by nlinarith [Nat.cast_nonneg (α := ℝ) n] + nlinarith [mul_nonneg (mul_nonneg pi_pos.le (exp_pos (-π * (n + 1 : ℝ) ^ 2 * t)).le) + (sub_nonneg.mpr hn)] + +private theorem theta_weight_le {t : ℝ} (ht : 1 ≤ t) (n : ℕ) : + (n + 1 : ℝ) ^ 2 * exp (-π * (n + 1 : ℝ) ^ 2 * t) ≤ + ((n + 1 : ℝ) ^ 2 * exp (-π * (n + 1 : ℝ) ^ 2 * (1 / 2))) * exp (-(π / 2) * t) := by + conv_rhs => rw [mul_assoc, ← exp_add] + apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) + apply exp_le_exp.mpr + have hn : 1 ≤ (n + 1 : ℝ) ^ 2 := by nlinarith [Nat.cast_nonneg (α := ℝ) n] + have h₁ := mul_le_mul_of_nonneg_left ht (sq_nonneg (n + 1 : ℝ)) + have h₂ := mul_le_mul_of_nonneg_right hn (zero_le_one.trans ht) + have h₃ : (n + 1 : ℝ) ^ 2 + t ≤ 2 * (n + 1 : ℝ) ^ 2 * t := by nlinarith + nlinarith [mul_le_mul_of_nonneg_left h₃ pi_pos.le] + +private theorem isBigO_riemannThetaKernelDeriv_exp : + riemannThetaKernelDeriv =O[atTop] fun t => exp (-(π / 2) * t) := by + let W (t : ℝ) := ∑' n : ℕ, (n + 1 : ℝ) ^ 2 * exp (-π * (n + 1 : ℝ) ^ 2 * t) + have hD (t : ℝ) : riemannThetaKernelDeriv t = (-2 * π) * W t := by + simp only [riemannThetaKernelDeriv, W, mul_assoc, tsum_mul_left] + refine IsBigO.of_bound (2 * π * W (1 / 2)) ?_ + filter_upwards [eventually_ge_atTop (1 : ℝ)] with t ht + have ht0 := zero_lt_one.trans_le ht + have hW : W t ≤ W (1 / 2) * exp (-(π / 2) * t) := by + dsimp only [W] + rw [← tsum_mul_right] + exact Summable.tsum_le_tsum (theta_weight_le ht) (summable_theta_weight ht0) + ((summable_theta_weight (by norm_num : (0 : ℝ) < 1 / 2)).mul_right _) + rw [hD, norm_mul, Real.norm_of_nonneg (show 0 ≤ W t from tsum_nonneg fun _ => by positivity), + norm_mul, norm_neg, Real.norm_of_nonneg pi_pos.le, Real.norm_of_nonneg (exp_pos _).le] + norm_num only [Real.norm_ofNat] + nlinarith [mul_le_mul_of_nonneg_left hW (show 0 ≤ 2 * π by positivity)] + +/-- The derivative kernel also decreases faster than every real power. -/ +theorem isBigO_riemannThetaKernelDeriv_rpow (r : ℝ) : + riemannThetaKernelDeriv =O[atTop] fun t => t ^ r := by + apply TauCeti.isBigO_rpow_of_isBigO_exp_neg (half_pos pi_pos) one_pos (α := 1) _ r + simpa using isBigO_riemannThetaKernelDeriv_exp + +/-- The derivative series is continuous on the upper integration ray. -/ +theorem continuousOn_riemannThetaKernelDeriv : + ContinuousOn riemannThetaKernelDeriv (Ici 1) := by + apply continuousOn_tsum (fun _ => by fun_prop) + ((summable_theta_weight zero_lt_one).mul_left (2 * π)) + intro n t ht + have he : exp (-π * (n + 1 : ℝ) ^ 2 * t) ≤ exp (-π * (n + 1 : ℝ) ^ 2 * 1) := by + apply exp_le_exp.mpr + exact mul_le_mul_of_nonpos_left ht + (mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr pi_pos.le) (sq_nonneg _)) + have hn : -2 * π * (n + 1 : ℝ) ^ 2 * exp (-π * (n + 1 : ℝ) ^ 2 * t) ≤ 0 := by + apply mul_nonpos_of_nonpos_of_nonneg _ (exp_pos _).le + exact mul_nonpos_of_nonpos_of_nonneg (by linarith [pi_pos]) (sq_nonneg _) + rw [Real.norm_eq_abs, abs_of_nonpos hn] + convert mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left he (sq_nonneg _)) + (show 0 ≤ 2 * π by positivity) using 1 + ring diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Mellin.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Mellin.lean new file mode 100644 index 000000000..25576308d --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Mellin.lean @@ -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 + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Moments +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.Mathlib.Analysis.MellinTransform.LogMoments +import TauCeti.NumberTheory.LSeries.MellinGrowth +import Mathlib.Analysis.Complex.Asymptotics +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Central derivatives of completed zeta as theta moments + +Splitting the completed-zeta integral at one and using the functional equation +expresses its even central derivatives by positive logarithmic theta moments. +-/ + +@[expose] public section + +open Complex Set MeasureTheory HurwitzZeta Filter Asymptotics + +/-- The upper Mellin integral of the Riemann theta kernel. -/ +noncomputable def riemannThetaMellin (s : ℂ) : ℂ := + ∫ t in Ioi (1 : ℝ), (riemannThetaKernel t : ℂ) * (t : ℂ) ^ (s - 1) + +private theorem kernel_continuous : + ContinuousOn (fun t => (riemannThetaKernel t : ℂ)) (Ici 1) := + continuous_ofReal.comp_continuousOn + (continuousOn_riemannThetaKernel.mono (fun _ ht => zero_lt_one.trans_le ht)) + +private theorem kernel_isBigO (r : ℝ) : + (fun t => (riemannThetaKernel t : ℂ)) =O[atTop] fun t => t ^ r := + isBigO_ofReal_left.mpr (isBigO_riemannThetaKernel_rpow r) + +/-- The upper Mellin integral of the theta kernel is entire. -/ +theorem differentiable_riemannThetaMellin : Differentiable ℂ riemannThetaMellin := by + intro s + change DifferentiableAt ℂ + (fun z => ∫ t in Ioi (1 : ℝ), (riemannThetaKernel t : ℂ) * (t : ℂ) ^ (z - 1)) s + have h := (hasDerivAt_integral_mul_log_pow_cpow kernel_continuous kernel_isBigO 0 s) + simpa only [pow_zero, mul_one] using h.differentiableAt + +/-- At exponent one quarter, all derivatives of the Mellin integral are real moments. -/ +theorem iteratedDeriv_riemannThetaMellin_quarter (n : ℕ) : + iteratedDeriv n riemannThetaMellin (1 / 4) = (riemannXiMoment n : ℂ) := by + change iteratedDeriv n (fun z => ∫ t in Ioi (1 : ℝ), + (riemannThetaKernel t : ℂ) * (t : ℂ) ^ (z - 1)) (1 / 4) = _ + rw [iteratedDeriv_integral_mul_cpow kernel_continuous kernel_isBigO, + riemannXiMoment, ← integral_complex_ofReal] + apply setIntegral_congr_fun measurableSet_Ioi + intro t ht + dsimp only + have ht0 := (zero_lt_one.trans ht).le + rw [show (1 / 4 : ℂ) - 1 = ((-3 / 4 : ℝ) : ℂ) by push_cast; ring, + ← ofReal_cpow ht0] + push_cast + rfl + +/-- The split Mellin representation of the entire part of completed zeta. -/ +theorem completedRiemannZeta₀_eq_mellin (s : ℂ) : + completedRiemannZeta₀ s = + (riemannThetaMellin (s / 2) + riemannThetaMellin ((1 - s) / 2)) / 2 := by + have hi (z : ℂ) : IntegrableOn + (fun t : ℝ => (t : ℂ) ^ (z - 1) * (riemannThetaKernel t : ℂ)) (Ioi 1) := by + simpa only [pow_zero, mul_one, mul_comm] using + integrableOn_mul_log_pow_cpow kernel_continuous kernel_isBigO 0 z + have h := (hurwitzEvenFEPair 0).Λ₀_eq_integral_add_smul_integral (s / 2) + (by simpa [hurwitzEvenFEPair, riemannThetaKernel, Function.comp_def] using hi (s / 2)) + (by simpa [hurwitzEvenFEPair, riemannThetaKernel, Function.comp_def, + evenKernel_eq_cosKernel_of_zero] using hi ((1 / 2 : ℂ) - s / 2)) + rw [completedRiemannZeta₀, completedHurwitzZetaEven₀, h] + have he : (1 / 2 : ℂ) - s / 2 = (1 - s) / 2 := by ring + simp only [hurwitzEvenFEPair, Function.comp_apply, ite_true, ofReal_div, ofReal_one, + ofReal_ofNat, he, smul_eq_mul, one_mul, riemannThetaMellin, riemannThetaKernel, + ofReal_sub, evenKernel_eq_cosKernel_of_zero, mul_comm] + +private theorem deriv_affine_mellin (a b : ℂ) (n : ℕ) : + iteratedDeriv n (fun z => riemannThetaMellin (b + a * z)) 0 = + a ^ n * iteratedDeriv n riemannThetaMellin b := by + have hd : ContDiff ℂ n (fun z => riemannThetaMellin (b + z)) := + (differentiable_riemannThetaMellin.comp (differentiable_id.const_add b)).contDiff + have h := congrFun (iteratedDeriv_comp_const_mul hd a) 0 + simpa only [mul_zero, iteratedDeriv_comp_const_add, add_zero] using h + +/-- Even central derivatives of the completed zeta function are theta moments. -/ +theorem iteratedDeriv_completedRiemannZeta₀_even (n : ℕ) : + iteratedDeriv (2 * n) completedRiemannZeta₀ (1 / 2) = + (1 / 2 : ℂ) ^ (2 * n) * (riemannXiMoment (2 * n) : ℂ) := by + have heq : (fun z => completedRiemannZeta₀ (1 / 2 + z)) = fun z => + (riemannThetaMellin (1 / 4 + (1 / 2) * z) + + riemannThetaMellin (1 / 4 + (-1 / 2) * z)) / 2 := by + funext z + rw [completedRiemannZeta₀_eq_mellin] + congr 2 <;> congr 1 <;> ring + have h := congrArg (fun f : ℂ → ℂ => iteratedDeriv (2 * n) f 0) heq + have hd (a : ℂ) : ContDiffAt ℂ (2 * n) + (fun z => riemannThetaMellin (1 / 4 + a * z)) 0 := + (differentiable_riemannThetaMellin.comp (by fun_prop)).contDiff.contDiffAt + simp only [iteratedDeriv_comp_const_add, add_zero] at h + rw [iteratedDeriv_div_const, + iteratedDeriv_fun_add (hd _) (hd _), deriv_affine_mellin, + deriv_affine_mellin, iteratedDeriv_riemannThetaMellin_quarter] at h + have hn : (-1 / 2 : ℂ) ^ (2 * n) = (1 / 2 : ℂ) ^ (2 * n) := by + rw [neg_div, neg_pow, Even.neg_one_pow (even_two_mul n), one_mul] + rw [hn] at h + exact h.trans (by ring) diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Moments.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Moments.lean new file mode 100644 index 000000000..834e51811 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Moments.lean @@ -0,0 +1,134 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Kernel +import Mathlib.MeasureTheory.Integral.Bochner.Set +import RealRooted.Mathlib.Analysis.MellinTransform.LogMoments +import Mathlib.MeasureTheory.Integral.IntegralEqImproper +import Mathlib.Analysis.SpecialFunctions.Pow.Deriv + +/-! +# Logarithmic moments of the theta kernel + +The positive moments at exponent `1/4` obey `M(n+1) ≤ (n+1) M(n)`. +This deliberately coarse bound suffices for positivity of the even xi derivatives. +-/ + +@[expose] public section + +open Real Set Filter MeasureTheory +open scoped Topology + +/-- The logarithmic moments entering the central derivatives of completed zeta. -/ +noncomputable def riemannXiMoment (n : ℕ) : ℝ := + ∫ t in Ioi (1 : ℝ), riemannThetaKernel t * log t ^ n * t ^ (-3 / 4 : ℝ) + +private theorem kernel_continuous : ContinuousOn riemannThetaKernel (Ici 1) := + continuousOn_riemannThetaKernel.mono (fun _ ht => zero_lt_one.trans_le ht) + +private theorem moment_integrable (n : ℕ) : + IntegrableOn (fun t : ℝ => riemannThetaKernel t * log t ^ n * t ^ (-3 / 4 : ℝ)) + (Ioi 1) := + integrableOn_mul_log_pow_rpow kernel_continuous isBigO_riemannThetaKernel_rpow n _ + +/-- Every logarithmic theta moment is strictly positive. -/ +theorem riemannXiMoment_pos (n : ℕ) : 0 < riemannXiMoment n := by + have hp (t : ℝ) (ht : t ∈ Ioi 1) : + 0 < riemannThetaKernel t * log t ^ n * t ^ (-3 / 4 : ℝ) := + mul_pos (mul_pos (riemannThetaKernel_pos (zero_lt_one.trans ht)) + (pow_pos (log_pos ht) n)) (rpow_pos_of_pos (zero_lt_one.trans ht) _) + rw [riemannXiMoment, setIntegral_pos_iff_support_of_nonneg_ae + (ae_restrict_of_forall_mem measurableSet_Ioi fun t ht => (hp t ht).le) (moment_integrable n)] + have he : Function.support (fun t : ℝ => riemannThetaKernel t * log t ^ n * + t ^ (-3 / 4 : ℝ)) ∩ Ioi 1 = Ioi 1 := by + apply inter_eq_right.mpr + exact fun t ht => (hp t ht).ne' + rw [he] + simp + +private theorem quarter_rpow {t : ℝ} (ht : 0 < t) : + t ^ (1 / 4 : ℝ) = t * t ^ (-3 / 4 : ℝ) := by + rw [show (1 / 4 : ℝ) = 1 + (-3 / 4) by norm_num, rpow_add ht, rpow_one] + +private theorem weighted_kernel_deriv_le {t : ℝ} (ht : 1 < t) : + riemannThetaKernelDeriv t * t ^ (1 / 4 : ℝ) + + riemannThetaKernel t * (1 / 4 : ℝ) * t ^ (-3 / 4 : ℝ) ≤ + -(riemannThetaKernel t * t ^ (-3 / 4 : ℝ)) := by + have ht0 := zero_lt_one.trans ht + have hf := (riemannThetaKernel_pos ht0).le + have hd := riemannThetaKernelDeriv_le ht0 + have hd0 : riemannThetaKernelDeriv t ≤ 0 := + hd.trans (mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr pi_pos.le) hf) + have htd := mul_le_mul_of_nonpos_right ht.le hd0 + have hp := mul_nonneg (sub_nonneg.mpr two_le_pi) hf + have hmain : t * riemannThetaKernelDeriv t + riemannThetaKernel t / 4 ≤ + -riemannThetaKernel t := by nlinarith + rw [quarter_rpow ht0] + nlinarith [mul_le_mul_of_nonneg_right hmain (rpow_pos_of_pos ht0 (-3 / 4 : ℝ)).le] + +/-- Consecutive moments satisfy a factorial bound, obtained by integration by parts. -/ +theorem riemannXiMoment_succ_le (n : ℕ) : + riemannXiMoment (n + 1) ≤ (n + 1 : ℝ) * riemannXiMoment n := by + let u (t : ℝ) := riemannThetaKernel t * t ^ (1 / 4 : ℝ) + let u' (t : ℝ) := riemannThetaKernelDeriv t * t ^ (1 / 4 : ℝ) + + riemannThetaKernel t * (1 / 4 : ℝ) * t ^ (-3 / 4 : ℝ) + let v (t : ℝ) := log t ^ (n + 1) + let v' (t : ℝ) := (n + 1 : ℝ) * log t ^ n / t + have hu (t : ℝ) (ht : t ∈ Ioi 1) : HasDerivAt u (u' t) t := by + convert (hasDerivAt_riemannThetaKernel (zero_lt_one.trans ht)).fun_mul + (hasDerivAt_rpow_const (p := (1 / 4 : ℝ)) (Or.inl (zero_lt_one.trans ht).ne')) using 1 + dsimp [u, u'] + norm_num + ring + have hv (t : ℝ) (ht : t ∈ Ioi 1) : HasDerivAt v (v' t) t := by + convert ((hasDerivAt_log (zero_lt_one.trans ht).ne').pow (n + 1)) using 1 + dsimp [v, v'] + simp only [Nat.cast_add, Nat.cast_one] + ring + have huv (t : ℝ) (ht : t ∈ Ioi 1) : + u t * v' t = (n + 1 : ℝ) * + (riemannThetaKernel t * log t ^ n * t ^ (-3 / 4 : ℝ)) := by + dsimp [u, v'] + rw [quarter_rpow (zero_lt_one.trans ht)] + field_simp [(zero_lt_one.trans ht).ne'] + have hu'v (t : ℝ) : u' t * v t = + riemannThetaKernelDeriv t * log t ^ (n + 1) * t ^ (1 / 4 : ℝ) + + (1 / 4 : ℝ) * (riemannThetaKernel t * log t ^ (n + 1) * t ^ (-3 / 4 : ℝ)) := by + dsimp [u', v] + ring + have hi₁ : IntegrableOn (u * v') (Ioi 1) := by + apply IntegrableOn.congr_fun ((moment_integrable n).const_mul (n + 1 : ℝ)) + (fun t ht => (huv t ht).symm) measurableSet_Ioi + have hi₂ : IntegrableOn (u' * v) (Ioi 1) := by + apply ((integrableOn_mul_log_pow_rpow continuousOn_riemannThetaKernelDeriv + isBigO_riemannThetaKernelDeriv_rpow (n + 1) (1 / 4)).add + ((moment_integrable (n + 1)).const_mul (1 / 4 : ℝ))).congr_fun + (fun t _ => (hu'v t).symm) measurableSet_Ioi + have hc : ContinuousAt riemannThetaKernel 1 := + continuousOn_riemannThetaKernel.continuousAt (Ioi_mem_nhds zero_lt_one) + have hzero : Tendsto (u * v) (𝓝[>] 1) (𝓝 0) := by + have h : ContinuousAt (u * v) 1 := by + dsimp [u, v] + fun_prop (disch := norm_num) + simpa [u, v] using h.tendsto.mono_left nhdsWithin_le_nhds + have hinfty : Tendsto (u * v) atTop (𝓝 0) := by + convert tendsto_mul_log_pow_rpow_zero isBigO_riemannThetaKernel_rpow (n + 1) (1 / 4) using 1 + funext t + dsimp [u, v] + ring + have hibp := integral_Ioi_mul_deriv_eq_deriv_mul hu hv hi₁ hi₂ hzero hinfty + have heval : (∫ t in Ioi (1 : ℝ), u t * v' t) = (n + 1 : ℝ) * riemannXiMoment n := by + rw [setIntegral_congr_fun measurableSet_Ioi huv, integral_const_mul] + rfl + rw [heval, sub_zero, zero_sub] at hibp + rw [riemannXiMoment, hibp, ← integral_neg] + apply integral_mono_ae (moment_integrable (n + 1)) hi₂.neg + filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht + have hlog : 0 ≤ log t ^ (n + 1) := pow_nonneg (log_pos ht).le _ + have h := mul_le_mul_of_nonneg_right (weighted_kernel_deriv_le ht) hlog + dsimp [u', v] + nlinarith [h] diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Positivity.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Positivity.lean new file mode 100644 index 000000000..c2ba7b764 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Positivity.lean @@ -0,0 +1,119 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Mellin +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.MulPow +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Topology.Order.IntermediateValue + +/-! +# Positivity of the normalized xi coefficients + +The constant coefficient is positive because xi is real and nonzero on the real +axis and equals `1/2` at one. Higher even derivatives are positive by the theta +moment bound. None of these positivity statements assumes RH. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +/-- The constant normalized xi coefficient is strictly positive, unconditionally. -/ +theorem riemannXiCoeff_zero_pos : 0 < riemannXiCoeff 0 := by + rw [riemannXiCoeff_eq] + simp only [Nat.mul_zero, Nat.factorial_zero, Nat.cast_one, div_one, one_mul, iteratedDeriv_zero] + have hc : Continuous (fun x : ℝ => (riemannXi (x : ℂ)).re) := + continuous_re.comp (differentiable_riemannXi.continuous.comp continuous_ofReal) + by_contra! h + have hleft : (riemannXi ((1 / 2 : ℝ) : ℂ)).re ≤ 0 := by simpa using h + have hright : 0 ≤ (riemannXi ((1 : ℝ) : ℂ)).re := by norm_num [riemannXi_one] + obtain ⟨x, _, hx⟩ := intermediate_value_Icc (by norm_num : (1 / 2 : ℝ) ≤ 1) + hc.continuousOn ⟨hleft, hright⟩ + change (riemannXi (x : ℂ)).re = 0 at hx + have hr : ((riemannXi (x : ℂ)).re : ℂ) = riemannXi (x : ℂ) := + conj_eq_iff_re.mp (by simpa using (riemannXi_conj (x : ℂ)).symm) + exact riemannXi_ofReal_ne_zero x (by rw [← hr, hx, ofReal_zero]) + +/-- Differentiating the pole-removing quadratic gives the central xi derivatives. -/ +theorem iteratedDeriv_riemannXi_add_two (n : ℕ) : + iteratedDeriv (n + 2) riemannXi (1 / 2) = + ((n + 2 : ℂ) * (n + 1) * iteratedDeriv n completedRiemannZeta₀ (1 / 2) - + (1 / 4 : ℂ) * iteratedDeriv (n + 2) completedRiemannZeta₀ (1 / 2)) / 2 := by + let f (z : ℂ) := completedRiemannZeta₀ (1 / 2 + z) + have hf : Differentiable ℂ f := differentiable_completedZeta₀.comp + (differentiable_id.const_add _) + have heq : (fun z => riemannXi (1 / 2 + z)) = fun z => + (1 + (z ^ 2 * f z - (1 / 4 : ℂ) * f z)) / 2 := by + funext z + simp only [riemannXi, f] + ring + have h := congrArg (fun g : ℂ → ℂ => iteratedDeriv (n + 2) g 0) heq + have hcf : ContDiff ℂ (n + 2) f := hf.contDiff + simp only [iteratedDeriv_comp_const_add, add_zero] at h + rw [iteratedDeriv_div_const, iteratedDeriv_const_add (by lia), + iteratedDeriv_fun_sub ((by fun_prop : ContDiff ℂ (n + 2) (fun z : ℂ => z ^ 2)).mul + hcf).contDiffAt ((contDiff_const.mul hcf).contDiffAt), + iteratedDeriv_pow_mul_zero hf.contDiff.contDiffAt, + iteratedDeriv_const_mul_field] at h + have hc : ((n + 2).choose 2 : ℂ) * 2 = (n + 2 : ℂ) * (n + 1) := by + have hn := (Nat.add_one_mul_choose_eq (n + 1) 1).symm + exact_mod_cast (show (n + 2).choose 2 * 2 = (n + 2) * (n + 1) by + simpa only [Nat.choose_one_right, Nat.add_assoc] using hn) + simp only [Nat.add_sub_cancel, Nat.factorial_two, Nat.cast_ofNat, hc, f, + iteratedDeriv_comp_const_add, add_zero] at h + exact h + +private theorem even_derivative_succ_pos (n : ℕ) : + 0 < (iteratedDeriv (2 * (n + 1)) riemannXi (1 / 2)).re := by + have h := iteratedDeriv_riemannXi_add_two (2 * n) + rw [show 2 * n + 2 = 2 * (n + 1) by lia, + iteratedDeriv_completedRiemannZeta₀_even, + iteratedDeriv_completedRiemannZeta₀_even] at h + have hr : (iteratedDeriv (2 * (n + 1)) riemannXi (1 / 2)).re = + ((2 * n + 2 : ℝ) * (2 * n + 1) * ((1 / 2 : ℝ) ^ (2 * n) * + riemannXiMoment (2 * n)) - (1 / 4 : ℝ) * + ((1 / 2 : ℝ) ^ (2 * (n + 1)) * riemannXiMoment (2 * (n + 1)))) / 2 := by + have he := h.trans (show _ = ((((2 * n + 2 : ℝ) * (2 * n + 1) * + ((1 / 2 : ℝ) ^ (2 * n) * riemannXiMoment (2 * n)) - (1 / 4 : ℝ) * + ((1 / 2 : ℝ) ^ (2 * (n + 1)) * riemannXiMoment (2 * (n + 1)))) / 2 : ℝ) : ℂ) by + push_cast + rfl) + exact congrArg Complex.re he + have hbound : riemannXiMoment (2 * (n + 1)) ≤ + (2 * n + 2 : ℝ) * (2 * n + 1) * riemannXiMoment (2 * n) := by + have h₁ := riemannXiMoment_succ_le (2 * n) + have h₂ := riemannXiMoment_succ_le (2 * n + 1) + have h₃ := mul_le_mul_of_nonneg_left h₁ (by positivity : (0 : ℝ) ≤ (2 * n + 1 + 1 : ℕ)) + push_cast at h₁ h₂ h₃ + rw [show 2 * n + 1 + 1 = 2 * (n + 1) by lia] at h₂ + nlinarith + have hpos : 0 < (2 * n + 2 : ℝ) * (2 * n + 1) * riemannXiMoment (2 * n) := + mul_pos (by positivity) (riemannXiMoment_pos _) + have hfactor : 0 < (1 / 2 : ℝ) ^ (2 * n) / 2 := by positivity + have hmain : 0 < (2 * n + 2 : ℝ) * (2 * n + 1) * riemannXiMoment (2 * n) - + riemannXiMoment (2 * (n + 1)) / 16 := by linarith + have he : (iteratedDeriv (2 * (n + 1)) riemannXi (1 / 2)).re = + ((1 / 2 : ℝ) ^ (2 * n) / 2) * + ((2 * n + 2 : ℝ) * (2 * n + 1) * riemannXiMoment (2 * n) - + riemannXiMoment (2 * (n + 1)) / 16) := by + rw [hr] + rw [show 2 * (n + 1) = 2 * n + 2 by lia, pow_add] + norm_num + ring + rw [he] + exact mul_pos hfactor hmain + +/-- Every normalized xi coefficient is strictly positive, without assuming RH. -/ +theorem riemannXiCoeff_pos (n : ℕ) : 0 < riemannXiCoeff n := by + cases n with + | zero => exact riemannXiCoeff_zero_pos + | succ n => + rw [riemannXiCoeff_eq] + exact mul_pos (by positivity) (even_derivative_succ_pos n) diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Theta.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Theta.lean index 2a2e8bc73..ae83a65d1 100644 --- a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Theta.lean +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Theta.lean @@ -11,6 +11,7 @@ public import TauCeti.Analysis.Complex.GrowthOrder import TauCeti.NumberTheory.LSeries.HurwitzZetaGrowth import TauCeti.NumberTheory.LSeries.RiemannZeta import Mathlib.NumberTheory.LSeries.Nonvanishing +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.SquareDescent /-! # The square-variable expansion of the Riemann xi function @@ -133,39 +134,12 @@ private theorem orderLE_riemannXi : TauCeti.OrderLE riemannXi 1 := by simp only [riemannXi] ring -/-- The square-variable xi function has order at most one, sufficient for Hadamard's -genus-one factorization. Its sharper classical order is one half. -/ -theorem orderLE_riemannXiTheta : TauCeti.OrderLE riemannXiTheta 1 := by - let root : ℂ → ℂ := fun z => z ^ (2⁻¹ : ℂ) - have hsq (z : ℂ) : ‖root z‖ ^ 2 = ‖z‖ := by - rw [← norm_pow] - exact congrArg norm (Complex.cpow_nat_inv_pow z (by norm_num : 2 ≠ 0)) - have ht : Tendsto root (cobounded ℂ) (cobounded ℂ) := by - rw [← tendsto_norm_atTop_iff_cobounded] - apply tendsto_atTop.mpr - intro R - filter_upwards [eventually_cobounded_le_norm ((max R 0) ^ 2)] with z hz - have := hsq z - have := norm_nonneg (root z) - have := le_max_left R 0 - have := le_max_right R 0 - nlinarith - have hg := orderLE_riemannXi.comp_mul_add 1 (1 / 2) - rw [TauCeti.orderLE_def] - intro A hA - have h := (hg.isBigO hA).comp_tendsto ht - change (fun z => riemannXiTheta z) =O[cobounded ℂ] (fun z => Real.exp (‖z‖ ^ A)) - have heq : (fun z => riemannXiTheta z) = - (fun s => riemannXi (1 * s + 1 / 2)) ∘ root := by - funext z - simp [riemannXiTheta, TauCeti.descendPow_apply, root, add_comm] - rw [heq] - refine h.trans (IsBigO.of_bound 1 ?_) - filter_upwards [eventually_cobounded_le_norm 1] with z hz - have hroot : ‖root z‖ ≤ ‖z‖ := by - have := hsq z - have := norm_nonneg (root z) - have hge : 1 ≤ ‖root z‖ := by nlinarith - nlinarith - simp only [Function.comp_apply, Real.norm_eq_abs, Real.abs_exp, one_mul, Real.exp_le_exp] - exact Real.rpow_le_rpow (norm_nonneg _) hroot (by linarith) +/-- The square-variable xi function has growth order at most one half. -/ +theorem orderLE_half_riemannXiTheta : TauCeti.OrderLE riemannXiTheta (1 / 2) := by + simpa only [riemannXiTheta, one_mul, add_comm] using + (orderLE_riemannXi.comp_mul_add 1 (1 / 2)).descendPow_two + +/-- The square-variable xi function satisfies the order-one bound used by +the genus-one Hadamard factorization criterion. -/ +theorem orderLE_riemannXiTheta : TauCeti.OrderLE riemannXiTheta 1 := + orderLE_half_riemannXiTheta.mono (by norm_num) diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/ThetaSecondDerivative.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/ThetaSecondDerivative.lean new file mode 100644 index 000000000..76bafd104 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/ThetaSecondDerivative.lean @@ -0,0 +1,32 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Kernel +import RealRooted.Mathlib.Analysis.SpecialFunctions.Gaussian.ParameterDerivative + +/-! +# The actual second derivative of the theta kernel +-/ + +public section + +open Real + +/-- The second derivative series of the theta kernel on the positive half-line. -/ +@[expose] noncomputable def riemannThetaKernelSecondDeriv (t : ℝ) : ℝ := + 2 * π ^ 2 * ∑' n : ℕ, (n + 1 : ℝ) ^ 4 * exp (-π * (n + 1 : ℝ) ^ 2 * t) + +/-- The actual derivative of the first theta-kernel derivative equals its series. -/ +theorem hasDerivAt_riemannThetaKernelDeriv {t : ℝ} (ht : 0 < t) : + HasDerivAt riemannThetaKernelDeriv (riemannThetaKernelSecondDeriv t) t := by + have h := (hasDerivAt_tsum_pow_mul_exp_neg_sq_parameter 2 pi_pos ht).const_mul (-2 * π) + convert h using 1 + · funext y + rw [riemannThetaKernelDeriv, ← tsum_mul_left] + exact tsum_congr fun n => by ring + · simp only [riemannThetaKernelSecondDeriv] + ring diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Bounds.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Bounds.lean new file mode 100644 index 000000000..b4d454181 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Bounds.lean @@ -0,0 +1,174 @@ +/- +Copyright (c) 2026 The Tau Ceti contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: The Tau Ceti contributors +-/ +module + +public import Mathlib.NumberTheory.Harmonic.ZetaAsymp +import Mathlib.Analysis.Real.Pi.Bounds +import TauCeti.Analysis.MellinTransform.UpperTail +import TauCeti.NumberTheory.LSeries.SumCoeff + +/-! +# Right-half-plane integral representation and vertical bounds for `riemannZeta` + +On `Re s > 1`, Euler–Maclaurin / Abel summation expresses the Riemann zeta function as + +`ζ(s) = s / (s - 1) - s ∫₁^∞ {t} t^{-(s + 1)} dt`, + +where `{t} = t - ⌊t⌋₊ ∈ [0, 1)` is the fractional part of `t`. Subtracting `(s - 1)⁻¹` gives + +`riemannZeta₀ s = 1 - s ∫₁^∞ {t} t^{-(s + 1)} dt`. + +Because `{t}` is bounded by `1`, the right-hand side is holomorphic on the entire open right +half-plane `Re s > 0`, so the identity principle extends both formulas from `Re s > 1` to +`Re s > 0`. Bounding `|{t}| ≤ 1` in the integral immediately gives the explicit vertical-line growth +bounds + +`‖riemannZeta₀ s‖ ≤ 1 + ‖s‖ / Re s` and `‖riemannZeta s‖ ≤ ‖s - 1‖⁻¹ + 1 + ‖s‖ / Re s` + +for all `Re s > 0` (including at `s = 1`, where Mathlib's junk value `(γ - log(4π)) / 2` has norm +strictly less than `2`). + +## Main results + +* `TauCeti.riemannZeta₀_eq_one_sub_mul_integral`: the fractional-part integral formula for + `riemannZeta₀` on `Re s > 0`. +* `TauCeti.riemannZeta_eq_div_sub_mul_integral`: `ζ(s) = s / (s - 1) - s ∫₁^∞ {t} t^{-(s + 1)} dt` + for `Re s > 0` and `s ≠ 1`. +* `TauCeti.norm_riemannZeta₀_le_one_add_norm_div_re`: `‖riemannZeta₀ s‖ ≤ 1 + ‖s‖ / Re s` on + `Re s > 0`. +* `TauCeti.norm_riemannZeta_le_of_re_pos`: `‖riemannZeta s‖ ≤ ‖s - 1‖⁻¹ + 1 + ‖s‖ / Re s` on + `Re s > 0`. + +Ported from [Tau Ceti, revision `93a012eae0a52377be01439ec6ced3be2477916e`](https://github.com/TauCetiProject/TauCeti/blob/93a012eae0a52377be01439ec6ced3be2477916e/TauCeti/NumberTheory/LSeries/RiemannZeta/Bounds.lean). +The theorem names and namespace are retained for migration to a future dependency pin. + +## References + +* E. C. Titchmarsh, *The Theory of the Riemann Zeta-Function*, §2.1, eq. (2.1.4). +* H. Davenport, *Multiplicative Number Theory*, Ch. 12 and Ch. 21. +-/ + +public section + +open Complex Filter MeasureTheory Asymptotics +open scoped Real Topology + +namespace TauCeti + +/-- **Fractional-part integral representation of `riemannZeta₀`.** For every `s` with `Re s > 0`, +`riemannZeta₀ s = 1 - s * ∫_{t > 1} (t - ⌊t⌋₊) t^{-(s + 1)} dt`. -/ +theorem riemannZeta₀_eq_one_sub_mul_integral {s : ℂ} (hs : 0 < s.re) : + riemannZeta₀ s = + 1 - s * ∫ t in Set.Ioi (1 : ℝ), ((t - ⌊t⌋₊ : ℝ) : ℂ) * (t : ℂ) ^ (-(s + 1)) := by + have hopen : IsOpen {z : ℂ | 0 < z.re} := isOpen_lt continuous_const continuous_re + have hLHS : AnalyticOnNhd ℂ riemannZeta₀ {z : ℂ | 0 < z.re} := + differentiable_riemannZeta₀.differentiableOn.analyticOnNhd hopen + have hO_frac : (fun t : ℝ ↦ ((t - ⌊t⌋₊ : ℝ) : ℂ)) =O[atTop] fun t ↦ t ^ (0 : ℝ) := + isBigO_iff.mpr ⟨1, (eventually_ge_atTop (0 : ℝ)).mono fun t ht ↦ by + simpa only [Real.rpow_zero, Real.norm_eq_abs, abs_one, mul_one, norm_real] using + Nat.abs_sub_floor_le ht⟩ + have hRHS : AnalyticOnNhd ℂ + (fun z ↦ 1 - z * ∫ t in Set.Ioi (1 : ℝ), ((t - ⌊t⌋₊ : ℝ) : ℂ) * (t : ℂ) ^ (-(z + 1))) + {z : ℂ | 0 < z.re} := + ((differentiableOn_const 1).sub (differentiableOn_id.mul + (differentiableOn_integral_mul_cpow_of_isBigO hO_frac))).analyticOnNhd hopen + refine (hLHS.eqOn_of_preconnected_of_eventuallyEq hRHS + (convex_halfSpace_re_gt 0).isPreconnected (by norm_num : (2 : ℂ) ∈ {z : ℂ | 0 < z.re}) ?_) hs + filter_upwards [(isOpen_lt continuous_const continuous_re).mem_nhds + (by norm_num : (2 : ℂ) ∈ {z : ℂ | 1 < z.re})] with z (hz : 1 < z.re) + have hz1 : z ≠ 1 := fun h ↦ by simp [h] at hz + have hO1 : (fun n : ℕ ↦ ∑ _k ∈ Finset.Icc 1 n, (1 : ℂ)) =O[atTop] fun n : ℕ ↦ (n : ℝ) ^ (1 : ℝ) := + isBigO_iff.mpr ⟨1, Eventually.of_forall fun n ↦ by simp⟩ + have hζ : riemannZeta z = + z * ∫ t in Set.Ioi (1 : ℝ), (⌊t⌋₊ : ℂ) * (t : ℂ) ^ (-(z + 1)) := by + rw [← LSeries_one_eq_riemannZeta hz, LSeries_eq_mul_integral _ zero_le_one hz + (LSeriesSummable_one_iff.mpr hz) hO1] + simp + have hint_t : IntegrableOn (fun t : ℝ ↦ (t : ℂ) ^ (-z)) (Set.Ioi 1) := + integrableOn_Ioi_cpow_of_lt (by simpa using hz) zero_lt_one + have hint_fl : IntegrableOn (fun t : ℝ ↦ (⌊t⌋₊ : ℂ) * (t : ℂ) ^ (-(z + 1))) (Set.Ioi 1) := by + simpa using LSeries.integrableOn_sum_mul_cpow_of_isBigO (fun _ ↦ (1 : ℂ)) hO1 hz + have hsub_eq : ∫ t in Set.Ioi (1 : ℝ), ((t - ⌊t⌋₊ : ℝ) : ℂ) * (t : ℂ) ^ (-(z + 1)) = + (∫ t in Set.Ioi (1 : ℝ), (t : ℂ) ^ (-z)) - + ∫ t in Set.Ioi (1 : ℝ), (⌊t⌋₊ : ℂ) * (t : ℂ) ^ (-(z + 1)) := by + rw [← integral_sub hint_t hint_fl] + refine setIntegral_congr_fun measurableSet_Ioi fun t (ht : 1 < t) ↦ ?_ + have ht_ne : (t : ℂ) ≠ 0 := ofReal_ne_zero.mpr (zero_lt_one.trans ht).ne' + have hpow : (t : ℂ) * (t : ℂ) ^ (-(z + 1)) = (t : ℂ) ^ (-z) := + calc (t : ℂ) * (t : ℂ) ^ (-(z + 1)) + = (t : ℂ) ^ (1 : ℂ) * (t : ℂ) ^ (-(z + 1)) := by rw [cpow_one] + _ = (t : ℂ) ^ (-z) := by rw [← cpow_add _ _ ht_ne]; ring_nf + push_cast + rw [sub_mul, hpow] + have hint_val : ∫ t in Set.Ioi (1 : ℝ), (t : ℂ) ^ (-z) = 1 / (z - 1) := by + rw [integral_Ioi_cpow_of_lt (by simpa using hz) zero_lt_one, ofReal_one, one_cpow, + ← neg_div_neg_eq (1 : ℂ)] + congr 1; ring + rw [riemannZeta₀, ite_eq_right hz1, hsub_eq, hint_val, mul_sub, ← hζ] + field_simp [sub_ne_zero.mpr hz1] + ring + +/-- **Fractional-part integral representation of `riemannZeta`.** For `Re s > 0` and `s ≠ 1`, +`ζ(s) = s / (s - 1) - s * ∫_{t > 1} (t - ⌊t⌋₊) t^{-(s + 1)} dt`. -/ +theorem riemannZeta_eq_div_sub_mul_integral {s : ℂ} (hs : 0 < s.re) (hs1 : s ≠ 1) : + riemannZeta s = + s / (s - 1) - s * ∫ t in Set.Ioi (1 : ℝ), ((t - ⌊t⌋₊ : ℝ) : ℂ) * (t : ℂ) ^ (-(s + 1)) := by + rw [riemannZeta_eq_inv_sub_add hs1, riemannZeta₀_eq_one_sub_mul_integral hs] + field_simp [sub_ne_zero.mpr hs1] + ring + +/-- On the open right half-plane `Re s > 0`, `‖riemannZeta₀ s‖ ≤ 1 + ‖s‖ / Re s`. -/ +theorem norm_riemannZeta₀_le_one_add_norm_div_re {s : ℂ} (hs : 0 < s.re) : + ‖riemannZeta₀ s‖ ≤ 1 + ‖s‖ / s.re := by + rw [riemannZeta₀_eq_one_sub_mul_integral hs] + have hint_bound : ‖∫ t in Set.Ioi (1 : ℝ), ((t - ⌊t⌋₊ : ℝ) : ℂ) * (t : ℂ) ^ (-(s + 1))‖ ≤ + 1 / s.re := + norm_integral_mul_cpow_le_of_bound (fun t (ht : 1 < t) ↦ by + simpa only [norm_real, Real.norm_eq_abs] using + Nat.abs_sub_floor_le (zero_lt_one.trans ht).le) hs + calc ‖1 - s * ∫ t in Set.Ioi (1 : ℝ), ((t - ⌊t⌋₊ : ℝ) : ℂ) * (t : ℂ) ^ (-(s + 1))‖ + ≤ ‖(1 : ℂ)‖ + ‖s‖ * ‖∫ t in Set.Ioi (1 : ℝ), ((t - ⌊t⌋₊ : ℝ) : ℂ) * (t : ℂ) ^ (-(s + 1))‖ := + (norm_sub_le _ _).trans (by rw [norm_mul]) + _ ≤ 1 + ‖s‖ * (1 / s.re) := by + rw [norm_one] + exact add_le_add_right (mul_le_mul_of_nonneg_left hint_bound (norm_nonneg s)) 1 + _ = 1 + ‖s‖ / s.re := by ring + +/-- **Explicit vertical growth bound for `riemannZeta` on `Re s > 0`.** For every `s` with +`Re s > 0` (including `s = 1`, where `(1 - 1)⁻¹ = 0`), +`‖riemannZeta s‖ ≤ ‖s - 1‖⁻¹ + 1 + ‖s‖ / Re s`. -/ +theorem norm_riemannZeta_le_of_re_pos {s : ℂ} (hs : 0 < s.re) : + ‖riemannZeta s‖ ≤ ‖s - 1‖⁻¹ + 1 + ‖s‖ / s.re := by + rcases eq_or_ne s 1 with rfl | hs1 + · have hval : riemannZeta 1 = ((Real.eulerMascheroniConstant - Real.log (4 * π)) / 2 : ℝ) := by + rw [riemannZeta_one, ofReal_div, ofReal_sub, ofReal_log (by positivity : (0 : ℝ) ≤ 4 * π)] + norm_cast + have hlog_pos : 0 < Real.log (4 * π) := + Real.log_pos (by linarith [Real.two_le_pi]) + have hlog_lt : Real.log (4 * π) < 4 := by + rw [Real.log_lt_iff_lt_exp (by positivity)] + have h2e : (2 : ℝ) < Real.exp 1 := by + linarith [Real.add_one_lt_exp (one_ne_zero : (1 : ℝ) ≠ 0)] + have h16 : (16 : ℝ) < Real.exp 4 := by + calc (16 : ℝ) = 2 ^ 4 := by norm_num + _ < Real.exp 1 ^ 4 := pow_lt_pow_left₀ h2e (by norm_num) (by norm_num) + _ = Real.exp 4 := by rw [← Real.exp_nat_mul]; norm_num + linarith [Real.pi_lt_four] + rw [hval, norm_real, Real.norm_eq_abs] + simp only [sub_self, norm_zero, inv_zero, zero_add, norm_one, one_re, div_one] + rw [abs_le] + have hγ₁ := Real.one_half_lt_eulerMascheroniConstant + have hγ₂ := Real.eulerMascheroniConstant_lt_two_thirds + constructor <;> linarith + · rw [riemannZeta_eq_inv_sub_add hs1] + calc ‖(s - 1)⁻¹ + riemannZeta₀ s‖ + ≤ ‖(s - 1)⁻¹‖ + ‖riemannZeta₀ s‖ := norm_add_le _ _ + _ ≤ ‖s - 1‖⁻¹ + (1 + ‖s‖ / s.re) := by + rw [norm_inv] + exact add_le_add_right (norm_riemannZeta₀_le_one_add_norm_div_re hs) _ + _ = ‖s - 1‖⁻¹ + 1 + ‖s‖ / s.re := by ring + +end TauCeti diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Contour.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Contour.lean new file mode 100644 index 000000000..6160a3e49 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Contour.lean @@ -0,0 +1,99 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.ZetaZeros +public import Mathlib.Analysis.Analytic.Order +public import TauCeti.Analysis.Complex.Rectangle +import RealRooted.Mathlib.Analysis.Contour.Residue.Rectangle +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Residues +import TauCeti.NumberTheory.LSeries.CompletedRiemannZeta +import TauCeti.Analysis.Calculus.LogDeriv +import Mathlib.Analysis.Normed.Module.Convex + +/-! +# A weighted contour formula for the zeros of zeta + +On a rectangle containing `1` in its interior and with no zeta zeros on its +boundary, the integral of `-ζ'/ζ` times an analytic weight equals the weight +at `1` minus the weighted sum of the zero multiplicities. Only a neighborhood +of the rectangle is required for the weight. The identity is unconditional. +-/ + +public section + +open Complex Set Metric +open scoped Real + +namespace TauCeti.Contour + +open scoped Classical in +/-- The four boundary integrals of an analytically weighted negative logarithmic +derivative of zeta count the enclosed zeros with their full multiplicities. -/ +theorem integral_boundary_rect_neg_logDeriv_riemannZeta {g : ℂ → ℂ} {z w : ℂ} + (hre : z.re ≤ w.re) (him : z.im ≤ w.im) + (h1 : (1 : ℂ) ∈ interior (Rectangle z w)) + (hg : AnalyticOnNhd ℂ g (Rectangle z w)) + (hbd : ∀ s ∈ frontier (Rectangle z w), riemannZeta s ≠ 0) : + let f := fun s ↦ -logDeriv riemannZeta s * g s + (∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - + (∫ x : ℝ in z.re..w.re, f (x + w.im * I)) + + I * (∫ y : ℝ in z.im..w.im, f (w.re + y * I)) - + I * (∫ y : ℝ in z.im..w.im, f (z.re + y * I)) = + 2 * π * I * (g 1 - + ∑ s ∈ (isCompact_rectangle z w).inter_riemannZetaZeros_finite.toFinset, + (analyticOrderNatAt riemannZeta s : ℂ) * g s) := by + classical + dsimp only + let R := Rectangle z w + have hR : IsCompact R := isCompact_rectangle z w + obtain ⟨δ, hδ, hδg⟩ := hR.exists_cthickening_subset_open (isOpen_analyticAt ℂ g) hg + let K := cthickening δ R + let U := thickening δ R + let Z := (hR.cthickening (r := δ)).inter_riemannZetaZeros_finite.toFinset + have hUK : U ⊆ K := thickening_subset_cthickening δ R + have hRU : R ⊆ U := self_subset_thickening hδ R + have h1R : (1 : ℂ) ∈ R := interior_subset h1 + have h1bd : (1 : ℂ) ∉ frontier R := disjoint_left.mp disjoint_interior_frontier h1 + have hZ (s : ℂ) : s ∈ Z ↔ s ∈ K ∧ riemannZeta s = 0 := by + simp only [Z, Finite.mem_toFinset, mem_inter_iff, mem_riemannZetaZeros] + rfl + have h1Z : (1 : ℂ) ∉ Z := fun h ↦ riemannZeta_one_ne_zero ((hZ 1).mp h).2 + have hoff : DifferentiableOn ℂ (fun s ↦ -logDeriv riemannZeta s * g s) + (U \ (↑(insert 1 Z) : Set ℂ)) := by + intro s hs + have hs1 : s ≠ 1 := fun h ↦ hs.2 (by simp [h]) + have hsζ : riemannZeta s ≠ 0 := fun h ↦ + hs.2 (Finset.mem_insert_of_mem ((hZ s).mpr ⟨hUK hs.1, h⟩)) + exact (((analyticOn_riemannZeta s hs1).logDeriv hsζ).neg.mul + (hδg (hUK hs.1))).differentiableAt.differentiableWithinAt + have hmero (s : ℂ) (_ : s ∈ insert 1 Z) (hs : s ∈ U) : + MeromorphicAt (fun s ↦ -logDeriv riemannZeta s * g s) s := + ((meromorphic_riemannZeta s).deriv.div (meromorphic_riemannZeta s)).neg.mul + (hδg (hUK hs)).meromorphicAt + have hS (s : ℂ) (hs : s ∈ insert 1 Z) : s ∉ frontier R := by + rcases Finset.mem_insert.mp hs with rfl | hs + · exact h1bd + · exact fun h ↦ hbd s h ((hZ s).mp hs).2 + rw [integral_boundary_rect_eq_sum_residues hre him isOpen_thickening hRU hoff hmero hS] + congr 1 + rw [Finset.filter_insert, ite_eq_left h1R, Finset.sum_insert + (fun h ↦ h1Z (Finset.mem_filter.mp h).1), + residue_neg_logDeriv_riemannZeta_mul_one (hg 1 h1R)] + have hfilter : Z.filter (· ∈ R) = hR.inter_riemannZetaZeros_finite.toFinset := by + ext s + simp only [Finset.mem_filter, hZ, Finite.mem_toFinset, mem_inter_iff, + mem_riemannZetaZeros] + exact ⟨fun h ↦ ⟨h.2, h.1.2⟩, fun h ↦ ⟨⟨hUK (hRU h.1), h.2⟩, h.1⟩⟩ + rw [hfilter, sub_eq_add_neg, ← Finset.sum_neg_distrib] + congr 1 + apply Finset.sum_congr rfl + intro s hs + have hs' := hR.inter_riemannZetaZeros_finite.mem_toFinset.mp hs + have hs1 : s ≠ 1 := fun h ↦ riemannZeta_one_ne_zero (h ▸ hs'.2) + rw [residue_neg_logDeriv_riemannZeta_mul hs1 (hg s hs'.1), neg_mul] + +end TauCeti.Contour diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ErrorDifference.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ErrorDifference.lean new file mode 100644 index 000000000..a1dbaa077 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ErrorDifference.lean @@ -0,0 +1,186 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +public import RealRooted.Mathlib.NumberTheory.Chebyshev.Unsmoothing +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RieszExplicitFormula +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroKernel +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroDifferenceSqrt +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ResidualDifference +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Topology.Algebra.InfiniteSum.Ring +import Mathlib.Analysis.Normed.Group.InfiniteSum + +/-! +# RH bounds for differences of the integrated Chebyshev error + +Subtracting the quadratic main term from the integrated explicit formula leaves +the negative zero series and the negative logarithmic-derivative line integral. +Both endpoint series are summable and both endpoint integrands are integrable, +so the normalized differences can be moved through the sums and integrals. +The zero bound and residual bound then supply the actual RH inputs needed for +unsmoothing; no prime-counting estimate is assumed. +-/ + +public section + +open Complex Set MeasureTheory + +namespace RiemannHypothesis + +private abbrev PositiveZero := {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} + +private noncomputable def zeroTerm (x : ℝ) (ρ : PositiveZero) : ℂ := + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * (x : ℂ) ^ ((ρ : ℂ) + 1) / + ((ρ : ℂ) * ((ρ : ℂ) + 1)) + +private noncomputable def leftTerm (x t : ℝ) : ℂ := + let s := (9 / 20 : ℂ) + t * I + (-logDeriv riemannZeta s) * (x : ℂ) ^ (s + 1) / (s * (s + 1)) + +private noncomputable def zeroDifference (y z h : ℝ) (ρ : PositiveZero) : ℂ := + (zeroTerm y ρ - zeroTerm z ρ) / (h : ℂ) + +private noncomputable def leftDifference (y z h t : ℝ) : ℂ := + (leftTerm y t - leftTerm z t) / (h : ℂ) + +private theorem ofReal_psiIntegralError_eq (hRH : RiemannHypothesis) + {x : ℝ} (hx : 1 ≤ x) : + (Chebyshev.psiIntegralError x : ℂ) = -(∑' ρ, zeroTerm x ρ) + + (2 * (Real.pi : ℂ))⁻¹ * ∫ t, leftTerm x t := by + rw [Chebyshev.psiIntegralError, ofReal_sub, ofReal_div, ofReal_pow, ofReal_ofNat, + hRH.integral_psi_eq_main_sub_zero_sum_add_integral hx] + dsimp only [zeroTerm, leftTerm] + ring + +private theorem ofReal_error_difference_eq (hRH : RiemannHypothesis) + {y z : ℝ} (hy : 1 ≤ y) (hz : 1 ≤ z) (h : ℝ) : + (((Chebyshev.psiIntegralError y - Chebyshev.psiIntegralError z) / h : ℝ) : ℂ) = + -(∑' ρ, zeroDifference y z h ρ) + + (2 * (Real.pi : ℂ))⁻¹ * ∫ t, leftDifference y z h t := by + have hy0 : 0 < y := by linarith + have hz0 : 0 < z := by linarith + have hsy : Summable (zeroTerm y) := hRH.summable_riemannZeta_order_mul_cpow_div hy0 + have hsz : Summable (zeroTerm z) := hRH.summable_riemannZeta_order_mul_cpow_div hz0 + have hiy : Integrable (leftTerm y) := (hRH.integrable_riesz_vertical_edges hy0).2 + have hiz : Integrable (leftTerm z) := (hRH.integrable_riesz_vertical_edges hz0).2 + rw [ofReal_div, ofReal_sub, ofReal_psiIntegralError_eq hRH hy, + ofReal_psiIntegralError_eq hRH hz] + simp_rw [zeroDifference, leftDifference] + rw [tsum_div_const, Summable.tsum_sub hsy hsz, integral_div, integral_sub hiy hiz] + ring + +private theorem zero_difference_norm_bound {C x y z : ℝ} + (hbound : + let f := fun ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} ↦ + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * + (((y : ℂ) ^ ((ρ : ℂ) + 1) / ((ρ : ℂ) * ((ρ : ℂ) + 1)) - + (z : ℂ) ^ ((ρ : ℂ) + 1) / ((ρ : ℂ) * ((ρ : ℂ) + 1))) / (Real.sqrt x : ℂ)) + Summable (fun ρ ↦ ‖f ρ‖) ∧ (∑' ρ, ‖f ρ‖) ≤ C * (Real.sqrt x * Real.log x ^ 2)) : + ‖∑' ρ, zeroDifference y z (Real.sqrt x) ρ‖ ≤ C * (Real.sqrt x * Real.log x ^ 2) := by + have heq (ρ : PositiveZero) : zeroDifference y z (Real.sqrt x) ρ = + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * + (((y : ℂ) ^ ((ρ : ℂ) + 1) / ((ρ : ℂ) * ((ρ : ℂ) + 1)) - + (z : ℂ) ^ ((ρ : ℂ) + 1) / ((ρ : ℂ) * ((ρ : ℂ) + 1))) / (Real.sqrt x : ℂ)) := by + dsimp [zeroDifference, zeroTerm] + ring + simp_rw [heq] + exact (norm_tsum_le_tsum_norm hbound.1).trans hbound.2 + +private theorem left_difference_norm_bound {C x y z : ℝ} + (hbound : + let g := fun t : ℝ ↦ + let s := (9 / 20 : ℂ) + t * I + logDeriv riemannZeta s * (((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (Real.sqrt x : ℂ)) + Integrable g ∧ ‖∫ t, g t‖ ≤ C * Real.sqrt x) : + ‖∫ t, leftDifference y z (Real.sqrt x) t‖ ≤ C * Real.sqrt x := by + have heq : (fun t ↦ leftDifference y z (Real.sqrt x) t) = + (fun t : ℝ ↦ + let s := (9 / 20 : ℂ) + t * I + (-(logDeriv riemannZeta s * (((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (Real.sqrt x : ℂ))))) := by + funext t + dsimp [leftDifference, leftTerm] + ring + rw [heq, integral_neg, norm_neg] + exact hbound.2 + +/-- Mathlib's RH bounds square-root-step differences of the actual integrated Chebyshev +error by `C sqrt(x) log(x)^2`, uniformly in a multiplicative neighborhood. -/ +theorem exists_abs_psiIntegralError_sqrt_difference_le (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ x y z : ℝ, 25 ≤ x → + y ∈ Icc (x / 2) (2 * x) → z ∈ Icc (x / 2) (2 * x) → |y - z| ≤ Real.sqrt x → + |(Chebyshev.psiIntegralError y - Chebyshev.psiIntegralError z) / Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2) := by + obtain ⟨Cz, hCz, hzero⟩ := hRH.exists_tsum_norm_riemannZeta_sqrt_difference_le + obtain ⟨Ci, hCi, hint⟩ := hRH.exists_norm_integral_logDeriv_sqrt_difference_le + let P : ℝ := ‖(2 * (Real.pi : ℂ))⁻¹‖ + have hP : 0 ≤ P := norm_nonneg _ + refine ⟨Cz + P * Ci, by positivity, fun x y z hx hy hz hyz ↦ ?_⟩ + have hx0 : 0 < x := by linarith + have hy1 : 1 ≤ y := by linarith [hy.1] + have hz1 : 1 ≤ z := by linarith [hz.1] + have hzsum := zero_difference_norm_bound (hzero x y z hx hy hz hyz) + have hiint := left_difference_norm_bound (hint x y z hx0 hy hz hyz) + have hlog : 1 ≤ Real.log x := + (Real.le_log_iff_exp_le hx0).mpr (by linarith [Real.exp_one_lt_three]) + have hsqrt : Real.sqrt x ≤ Real.sqrt x * Real.log x ^ 2 := by + simpa only [mul_one] using mul_le_mul_of_nonneg_left + (by nlinarith : 1 ≤ Real.log x ^ 2) (Real.sqrt_nonneg x) + calc + |(Chebyshev.psiIntegralError y - Chebyshev.psiIntegralError z) / Real.sqrt x| = + ‖(((Chebyshev.psiIntegralError y - Chebyshev.psiIntegralError z) / + Real.sqrt x : ℝ) : ℂ)‖ := by + rw [norm_real, Real.norm_eq_abs] + _ = ‖-(∑' ρ, zeroDifference y z (Real.sqrt x) ρ) + + (2 * (Real.pi : ℂ))⁻¹ * ∫ t, leftDifference y z (Real.sqrt x) t‖ := by + rw [ofReal_error_difference_eq hRH hy1 hz1] + _ ≤ ‖∑' ρ, zeroDifference y z (Real.sqrt x) ρ‖ + + P * ‖∫ t, leftDifference y z (Real.sqrt x) t‖ := by + simpa only [norm_neg, norm_mul, P] using norm_add_le + (-(∑' ρ, zeroDifference y z (Real.sqrt x) ρ)) + ((2 * (Real.pi : ℂ))⁻¹ * ∫ t, leftDifference y z (Real.sqrt x) t) + _ ≤ Cz * (Real.sqrt x * Real.log x ^ 2) + P * (Ci * Real.sqrt x) := + add_le_add hzsum (mul_le_mul_of_nonneg_left hiint hP) + _ ≤ Cz * (Real.sqrt x * Real.log x ^ 2) + P * (Ci * (Real.sqrt x * Real.log x ^ 2)) := + add_le_add le_rfl (mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_left hsqrt hCi.le) hP) + _ = (Cz + P * Ci) * (Real.sqrt x * Real.log x ^ 2) := by ring + +/-- The preceding neighborhood bound supplies both actual square-root difference hypotheses +needed by the unconditional Chebyshev unsmoothing theorem. -/ +theorem exists_psiIntegralError_sqrt_bounds (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ + (∀ x : ℝ, 25 ≤ x → + |(Chebyshev.psiIntegralError x - Chebyshev.psiIntegralError (x - Real.sqrt x)) / + Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) ∧ + (∀ x : ℝ, 25 ≤ x → + |(Chebyshev.psiIntegralError (x + Real.sqrt x) - Chebyshev.psiIntegralError x) / + Real.sqrt x| ≤ + C * (Real.sqrt x * Real.log x ^ 2)) := by + obtain ⟨C, hC, hbound⟩ := hRH.exists_abs_psiIntegralError_sqrt_difference_le + have hstep (x : ℝ) (hx : 25 ≤ x) : 0 ≤ Real.sqrt x ∧ Real.sqrt x ≤ x / 2 := by + refine ⟨Real.sqrt_nonneg x, ?_⟩ + apply (Real.sqrt_le_left (by linarith : 0 ≤ x / 2)).mpr + nlinarith [sq_nonneg (x - 3)] + refine ⟨C, hC, ?_, ?_⟩ + · intro x hx + obtain ⟨hs0, hs⟩ := hstep x hx + apply hbound x x (x - Real.sqrt x) hx + · constructor <;> linarith + · constructor <;> linarith + · rw [sub_sub_cancel, abs_of_nonneg hs0] + · intro x hx + obtain ⟨hs0, hs⟩ := hstep x hx + apply hbound x (x + Real.sqrt x) x hx + · constructor <;> linarith + · constructor <;> linarith + · rw [add_sub_cancel_left, abs_of_nonneg hs0] + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/GoodHeight.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/GoodHeight.lean new file mode 100644 index 000000000..52d5cb83a --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/GoodHeight.lean @@ -0,0 +1,259 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.Analysis.Complex.PartialFractions +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroWindow +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroCount +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.LocalLogDeriv +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +import RealRooted.Mathlib.Topology.Instances.Real.FiniteSeparation +import TauCeti.Analysis.Meromorphic.Divisor +import TauCeti.Analysis.Calculus.LogDeriv.Symmetry +import Mathlib.NumberTheory.Harmonic.ZetaAsymp +import Mathlib.Tactic.Lemma + +/-! +# Good heights for a contour to the left of the critical line + +Under Mathlib's Riemann hypothesis, every interval `[T, T + 1]`, for `T ≥ 5`, +contains a height `t` at which zeta is nonzero throughout the horizontal segment +`9 / 20 ≤ Re s ≤ 2`, and its logarithmic derivative is uniformly `O(log(T)^2)`. + +A finite-set separation theorem chooses `t` away from the ordinates of zeros in +a fixed window about `T + 1 / 2`. RH confines the nearby zeros to the critical +line, so the local partial-fraction estimate only involves zeros in this window. +Jensen's bound counts their full multiplicities. + +## References + +* H. Davenport, *Multiplicative Number Theory*, 3rd ed., Chapter 17. +-/ + +public section + +open Complex Metric Set TauCeti +open ComplexConjugate + +/-- The logarithmic derivative of zeta commutes with complex conjugation. -/ +@[simp] +theorem logDeriv_riemannZeta_conj (s : ℂ) : + logDeriv riemannZeta (conj s) = conj (logDeriv riemannZeta s) := by + have hfun : conj ∘ riemannZeta ∘ conj = riemannZeta := by + funext z + simp [Function.comp_def, riemannZeta_conj] + simpa only [hfun, starRingEnd_self_apply] using + (TauCeti.logDeriv_conj_conj riemannZeta (conj s)) + +namespace RiemannHypothesis + +private lemma nearby_height_log_le {T t : ℝ} (hT : 5 ≤ T) (ht : t ∈ Icc T (T + 1)) : + 3 ≤ |t| ∧ Real.log |t| ≤ 2 * Real.log T := by + have ht0 : 0 ≤ t := by linarith [ht.1] + rw [abs_of_nonneg ht0] + refine ⟨by linarith [ht.1], ?_⟩ + calc + Real.log t ≤ Real.log (T ^ 2) := Real.log_le_log (by linarith [ht.1]) + (by nlinarith [ht.2]) + _ = 2 * Real.log T := by rw [Real.log_pow]; norm_num + +private lemma card_window_ordinates_le_order_sum {T : ℝ} (hT : 5 ≤ T) + (hfin : (riemannZetaZeroWindow (T + 1 / 2) (6 / 5)).Finite) : + ((hfin.toFinset.image Complex.im).card : ℝ) ≤ + ∑ ρ ∈ hfin.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ) := by + classical + have hc : (hfin.toFinset.image Complex.im).card ≤ hfin.toFinset.card := Finset.card_image_le + have hc' : ((hfin.toFinset.image Complex.im).card : ℝ) ≤ hfin.toFinset.card := by + exact_mod_cast hc + refine hc'.trans ?_ + rw [Finset.card_eq_sum_ones, Nat.cast_sum] + refine Finset.sum_le_sum fun ρ hρ ↦ ?_ + have hmem := hfin.mem_toFinset.mp hρ + have hne := ne_one_of_mem_riemannZetaZeroWindow + (by rw [abs_of_nonneg (by linarith)]; linarith : (6 / 5 : ℝ) < |T + 1 / 2|) hmem + exact_mod_cast one_le_analyticOrderNatAt_riemannZeta hmem.1 hne + +private lemma exists_separated_height (hRH : RiemannHypothesis) : + ∃ A : ℝ, 0 < A ∧ ∀ T : ℝ, 5 ≤ T → + ∃ t ∈ Icc T (T + 1), ∃ δ : ℝ, 0 < δ ∧ δ⁻¹ ≤ A * Real.log T ∧ + ∀ ρ ∈ riemannZetaZeroWindow (T + 1 / 2) (6 / 5), δ ≤ |t - ρ.im| := by + classical + obtain ⟨C, hC, hwindow⟩ := hRH.exists_sum_riemannZetaZeroWindow_order_wide_le_log + have h5 : 0 < Real.log 5 := Real.log_pos (by norm_num) + refine ⟨4 * C + 2 / Real.log 5, by positivity, fun T hT ↦ ?_⟩ + have ht0 : 4 ≤ |T + 1 / 2| := by rw [abs_of_nonneg (by linarith)]; linarith + obtain ⟨hfin, hsum⟩ := hwindow (T + 1 / 2) ht0 + let G := hfin.toFinset.image Complex.im + have hcard : (G.card : ℝ) ≤ + ∑ ρ ∈ hfin.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ) := + card_window_ordinates_le_order_sum hT hfin + have hlog := (nearby_height_log_le hT + (show T + 1 / 2 ∈ Icc T (T + 1) from ⟨by linarith, by linarith⟩)).2 + have hcard' : (G.card : ℝ) ≤ 2 * C * Real.log T := by + have h := hcard.trans (hsum.trans (mul_le_mul_of_nonneg_left hlog hC.le)) + nlinarith + obtain ⟨t, ht, hsep⟩ := G.exists_mem_Icc_forall_le_abs_sub + (a := T) (b := T + 1) (by linarith) + let δ : ℝ := 1 / (2 * ((G.card : ℝ) + 1)) + have hδ : 0 < δ := by dsimp [δ]; positivity + refine ⟨t, ht, δ, hδ, ?_, fun ρ hρ ↦ ?_⟩ + · have hlogT : Real.log 5 ≤ Real.log T := Real.log_le_log (by norm_num) hT + have htwo : 2 ≤ 2 / Real.log 5 * Real.log T := by + rw [div_mul_eq_mul_div, le_div_iff₀ h5] + linarith + simp only [δ, one_div, inv_inv] + nlinarith + · have hmem : ρ.im ∈ G := Finset.mem_image.mpr ⟨ρ, hfin.mem_toFinset.mpr hρ, rfl⟩ + simpa [δ] using hsep ρ.im hmem + +private lemma divisor_support_mem_window (hRH : RiemannHypothesis) + {T t : ℝ} (hT : 5 ≤ T) (ht : t ∈ Icc T (T + 1)) {ρ : ℂ} + (hρ : ρ ∈ Function.support + (MeromorphicOn.divisor riemannZeta (closedBall (2 + I * t) (8 / 5)))) : + ρ ∈ riemannZetaZeroWindow (T + 1 / 2) (6 / 5) := by + let D := MeromorphicOn.divisor riemannZeta (closedBall (2 + I * t) (8 / 5)) + have hmem : ρ ∈ closedBall (2 + I * t) (8 / 5) := D.supportWithinDomain hρ + have hd : ‖ρ - (2 + I * t)‖ ≤ 8 / 5 := by + simpa only [mem_closedBall, dist_eq_norm] using hmem + have hre : |ρ.re - 2| ≤ 8 / 5 := by + simpa using (abs_re_le_norm (ρ - (2 + I * t))).trans hd + have hpos : 0 < ρ.re := by linarith [(abs_le.mp hre).1] + have hne : ρ ≠ 1 := by + intro h + have him := (abs_im_le_norm (ρ - (2 + I * t))).trans hd + have him' : |t| ≤ 8 / 5 := by simpa [h] using him + have h3 := (nearby_height_log_le hT ht).1 + linarith + have hA := analyticOnNhd_riemannZeta_closedBall (nearby_height_log_le hT ht).1 ρ + ((closedBall_subset_closedBall (by norm_num : (8 / 5 : ℝ) ≤ 7 / 4)) hmem) + have hz : riemannZeta ρ = 0 := by + by_contra hz + exact hρ (hA.divisor_apply_eq_zero hz) + have hhalf := hRH.re_eq_half_of_riemannZeta_eq_zero_of_re_pos hpos hz hne + have hsq : ‖ρ - (2 + I * t)‖ ^ 2 ≤ (8 / 5 : ℝ) ^ 2 := + sq_le_sq' (by linarith [norm_nonneg (ρ - (2 + I * t))]) hd + rw [Complex.sq_norm] at hsq + norm_num [Complex.normSq_apply, hhalf] at hsq + have him : |ρ.im - t| ≤ 3 / 5 := abs_le_of_sq_le_sq (by nlinarith) (by norm_num) + have hmid : |t - (T + 1 / 2)| ≤ 1 / 2 := + abs_le.mpr ⟨by linarith [ht.1], by linarith [ht.2]⟩ + refine ⟨hz, hpos, ?_⟩ + calc + |ρ.im - (T + 1 / 2)| ≤ |ρ.im - t| + |t - (T + 1 / 2)| := abs_sub_le _ _ _ + _ ≤ 3 / 5 + 1 / 2 := add_le_add him hmid + _ ≤ 6 / 5 := by norm_num + +private lemma riemannZeta_ne_zero_of_separated_window + {T t δ σ : ℝ} (ht : t ∈ Icc T (T + 1)) (hδ : 0 < δ) (hσ : 0 < σ) + (hsep : ∀ ρ ∈ riemannZetaZeroWindow (T + 1 / 2) (6 / 5), δ ≤ |t - ρ.im|) : + riemannZeta (σ + I * t) ≠ 0 := by + intro hz + have hmem : (σ : ℂ) + I * t ∈ riemannZetaZeroWindow (T + 1 / 2) (6 / 5) := by + refine ⟨hz, by simpa using hσ, ?_⟩ + simp only [add_im, ofReal_im, mul_im, I_re, zero_mul, I_im, ofReal_re, one_mul, zero_add] + rw [abs_le] + constructor <;> linarith [ht.1, ht.2] + have h := hsep _ hmem + simp at h + linarith + +private lemma norm_logDeriv_le_at_separated_height (hRH : RiemannHypothesis) + {T t δ A B L : ℝ} (hT : 5 ≤ T) (ht : t ∈ Icc T (T + 1)) + (hδ : 0 < δ) (hA : 0 < A) (hB : 0 < B) (hL : 0 < L) + (hinv : δ⁻¹ ≤ A * Real.log T) + (hsep : ∀ ρ ∈ riemannZetaZeroWindow (T + 1 / 2) (6 / 5), δ ≤ |t - ρ.im|) + (hcount : ((∑ᶠ ρ, MeromorphicOn.divisor riemannZeta + (closedBall (2 + I * t) (8 / 5)) ρ : ℤ) : ℝ) ≤ B * Real.log |t|) + (hlocal : ∀ s : ℂ, ‖s - (2 + I * t)‖ ≤ 31 / 20 → riemannZeta s ≠ 0 → + ‖logDeriv riemannZeta s - ∑ᶠ ρ, (MeromorphicOn.divisor riemannZeta + (closedBall (2 + I * t) (8 / 5)) ρ : ℂ) / (s - ρ)‖ ≤ L * Real.log |t|) + {σ : ℝ} (hσ : σ ∈ Icc (9 / 20 : ℝ) 2) : + riemannZeta (σ + I * t) ≠ 0 ∧ + ‖logDeriv riemannZeta (σ + I * t)‖ ≤ + (2 * L / Real.log 5 + 2 * A * B) * Real.log T ^ 2 := by + let s : ℂ := σ + I * t + let D := MeromorphicOn.divisor riemannZeta (closedBall (2 + I * t) (8 / 5)) + have hζ : riemannZeta s ≠ 0 := + riemannZeta_ne_zero_of_separated_window ht hδ (by linarith [hσ.1]) hsep + refine ⟨hζ, ?_⟩ + have hheight := nearby_height_log_le hT ht + have hs : ‖s - (2 + I * t)‖ ≤ 31 / 20 := by + have heq : s - (2 + I * t) = ((σ - 2 : ℝ) : ℂ) := by dsimp [s]; push_cast; ring + rw [heq, norm_real, Real.norm_eq_abs, abs_le] + constructor <;> linarith [hσ.1, hσ.2] + have hf : AnalyticOnNhd ℂ riemannZeta (closedBall (2 + I * t) (8 / 5)) := + (analyticOnNhd_riemannZeta_closedBall hheight.1).mono + (closedBall_subset_closedBall (by norm_num)) + have hfin : Function.HasFiniteSupport D := D.finiteSupport (isCompact_closedBall _ _) + have hdist : ∀ ρ ∈ Function.support D, δ ≤ ‖s - ρ‖ := by + intro ρ hρ + have hw := divisor_support_mem_window hRH hT ht hρ + have hi : |t - ρ.im| ≤ ‖s - ρ‖ := by simpa [s] using abs_im_le_norm (s - ρ) + exact (hsep ρ hw).trans hi + have hsum := Complex.norm_finsum_intCast_div_sub_le hfin + (MeromorphicOn.AnalyticOnNhd.divisor_nonneg hf) hδ hdist + have hlogT : 0 ≤ Real.log T := Real.log_nonneg (by linarith) + have hlogt : 0 ≤ Real.log |t| := Real.log_nonneg (by linarith [hheight.1]) + have hsum' : ‖∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ ≤ 2 * A * B * Real.log T ^ 2 := by + calc + _ ≤ δ⁻¹ * ((∑ᶠ ρ, D ρ : ℤ) : ℝ) := hsum + _ ≤ δ⁻¹ * (B * Real.log |t|) := + mul_le_mul_of_nonneg_left hcount (inv_nonneg.mpr hδ.le) + _ ≤ (A * Real.log T) * (2 * B * Real.log T) := + mul_le_mul hinv (by nlinarith [hheight.2]) (mul_nonneg hB.le hlogt) + (mul_nonneg hA.le hlogT) + _ = _ := by ring + have h5 : 0 < Real.log 5 := Real.log_pos (by norm_num) + have h5T : Real.log 5 ≤ Real.log T := Real.log_le_log (by norm_num) hT + have herror : L * Real.log |t| ≤ (2 * L / Real.log 5) * Real.log T ^ 2 := by + have hlog : L * Real.log |t| ≤ 2 * L * Real.log T := by nlinarith [hheight.2] + refine hlog.trans ?_ + rw [div_mul_eq_mul_div, le_div_iff₀ h5] + nlinarith [mul_nonneg (show 0 ≤ 2 * L * Real.log T by positivity) (sub_nonneg.mpr h5T)] + calc + ‖logDeriv riemannZeta s‖ = + ‖(logDeriv riemannZeta s - ∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)) + + ∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ := by rw [sub_add_cancel] + _ ≤ ‖logDeriv riemannZeta s - ∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ + + ‖∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ := norm_add_le _ _ + _ ≤ (2 * L / Real.log 5) * Real.log T ^ 2 + 2 * A * B * Real.log T ^ 2 := + add_le_add ((hlocal s hs hζ).trans herror) hsum' + _ = _ := by ring + +/-- Under RH, every unit interval at large positive height contains a zero-free horizontal +segment on which the logarithmic derivative of zeta is bounded by `C * log(T)^2`. -/ +theorem exists_good_height (hRH : RiemannHypothesis) : ∃ C : ℝ, 0 < C ∧ + ∀ T : ℝ, 5 ≤ T → ∃ t ∈ Icc T (T + 1), ∀ σ ∈ Icc (9 / 20 : ℝ) 2, + riemannZeta (σ + I * t) ≠ 0 ∧ + ‖logDeriv riemannZeta (σ + I * t)‖ ≤ C * Real.log T ^ 2 := by + obtain ⟨A, hA, hsep⟩ := exists_separated_height hRH + obtain ⟨B, hB, hcount⟩ := exists_sum_divisor_riemannZeta_le_log + obtain ⟨L, hL, hlocal⟩ := exists_norm_logDeriv_riemannZeta_sub_divisor_le_log + have h5 : 0 < Real.log 5 := Real.log_pos (by norm_num) + refine ⟨2 * L / Real.log 5 + 2 * A * B, by positivity, fun T hT ↦ ?_⟩ + obtain ⟨t, ht, δ, hδ, hinv, hfar⟩ := hsep T hT + refine ⟨t, ht, fun σ hσ ↦ ?_⟩ + have h3 := (nearby_height_log_le hT ht).1 + exact norm_logDeriv_le_at_separated_height hRH hT ht hδ hA hB hL hinv hfar + (hcount t h3) (hlocal t h3) hσ + +/-- The same good height works above and below the real axis, with one uniform bound. -/ +theorem exists_good_height_abs_im (hRH : RiemannHypothesis) : ∃ C : ℝ, 0 < C ∧ + ∀ T : ℝ, 5 ≤ T → ∃ t ∈ Icc T (T + 1), ∀ σ ∈ Icc (9 / 20 : ℝ) 2, + ∀ u : ℝ, |u| = t → riemannZeta (σ + I * u) ≠ 0 ∧ + ‖logDeriv riemannZeta (σ + I * u)‖ ≤ C * Real.log T ^ 2 := by + obtain ⟨C, hC, hgood⟩ := hRH.exists_good_height + refine ⟨C, hC, fun T hT ↦ ?_⟩ + obtain ⟨t, ht, hbound⟩ := hgood T hT + refine ⟨t, ht, fun σ hσ u hu ↦ ?_⟩ + rcases eq_or_eq_neg_of_abs_eq hu with rfl | rfl + · exact hbound σ hσ + · have heq : (σ : ℂ) + I * (-t : ℝ) = conj ((σ : ℂ) + I * t) := by simp + rw [heq, riemannZeta_conj, logDeriv_riemannZeta_conj, norm_conj] + simpa using hbound σ hσ + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/HorizontalDecay.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/HorizontalDecay.lean new file mode 100644 index 000000000..8d353fbbe --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/HorizontalDecay.lean @@ -0,0 +1,60 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.Analysis.MellinInversion.HorizontalDecay +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.GoodHeight +import Mathlib.Order.Filter.AtTopBot.Archimedean +import Mathlib.Tactic.Choose + +/-! +# Vanishing horizontal zeta integrals under RH + +A single sequence of symmetric good heights makes both horizontal edges of +the smoothed Perron contour vanish, for every fixed `x ≥ 1`. +-/ + +public section + +open Filter Set MeasureTheory +open scoped Topology Interval + +namespace RiemannHypothesis + +open Complex + +/-- RH supplies symmetric good heights whose horizontal Riesz integrals vanish. + +The same sequence works for every fixed `x ≥ 1` and for every choice of the signs +of its heights, so in particular for both horizontal edges of a rectangle. -/ +theorem exists_good_height_seq_tendsto_integral_zero (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∃ t : ℕ → ℝ, + (∀ n : ℕ, t n ∈ Icc ((n : ℝ) + 5) ((n : ℝ) + 5 + 1)) ∧ + Tendsto t atTop atTop ∧ + (∀ n : ℕ, ∀ σ ∈ Icc (9 / 20 : ℝ) 2, ∀ u : ℝ, |u| = t n → + riemannZeta (σ + I * u) ≠ 0 ∧ + ‖logDeriv riemannZeta (σ + I * u)‖ ≤ C * Real.log ((n : ℝ) + 5) ^ 2) ∧ + ∀ x : ℝ, 1 ≤ x → ∀ u : ℕ → ℝ, (∀ n, |u n| = t n) → + Tendsto (fun n ↦ ∫ σ in (9 / 20 : ℝ)..2, + -logDeriv riemannZeta (σ + I * u n) * + (x : ℂ) ^ ((σ : ℂ) + I * u n + 1) / + (((σ : ℂ) + I * u n) * ((σ : ℂ) + I * u n + 1))) atTop (𝓝 0) := by + obtain ⟨C, hC, hg⟩ := hRH.exists_good_height_abs_im + choose t ht hgood using fun n : ℕ ↦ + hg ((n : ℝ) + 5) (le_add_of_nonneg_left (Nat.cast_nonneg n)) + have hnat : Tendsto (fun n : ℕ ↦ (n : ℝ) + 5) atTop atTop := + tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop + refine ⟨C, hC, t, ht, tendsto_atTop_mono (fun n ↦ (ht n).1) hnat, hgood, ?_⟩ + intro x hx u hu + apply Complex.tendsto_horizontal_integral_zero + (F := fun s ↦ -logDeriv riemannZeta s) (C := C) + (T := fun n : ℕ ↦ (n : ℝ) + 5) (by norm_num) hx hnat + · exact Eventually.of_forall fun n ↦ by rw [hu n]; exact (ht n).1 + · exact Eventually.of_forall fun n σ hσ ↦ by + simpa only [norm_neg] using (hgood n σ hσ (u n) (hu n)).2 + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/LocalLogDeriv.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/LocalLogDeriv.lean new file mode 100644 index 000000000..7209baf7c --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/LocalLogDeriv.lean @@ -0,0 +1,82 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Meromorphic.Divisor +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroCount +import TauCeti.Analysis.Complex.LocalLogDeriv +import Mathlib.Tactic.Lemma + +/-! +# Local partial fractions for the logarithmic derivative of zeta + +The logarithmic derivative of zeta, at distance at most `31 / 20` from `2 + I * t`, +is the sum of the nearby zero terms up to an unconditional error `O(log |t|)`. +The nearby zeros are those in the closed disk of radius `8 / 5`; their full +multiplicities are Mathlib's divisor values. The estimate assumes `3 ≤ |t|` and +that the evaluation point is not a zero. + +The outer disk has radius `7 / 4`. The existing arbitrary-radius Landau lemma in +Tau Ceti applies directly using the linear growth bound on this disk and the +lower bound `‖ζ(2 + I * t)‖ ≥ 1 / 2`. + +## References + +* H. Davenport, *Multiplicative Number Theory*, 3rd ed., Chapter 15, formula (2). +* The corresponding local estimate in + [Dudek2014, revision `da5cf9edad7896290771dfcab8feee2906399e3d`](https://github.com/sthubbar/goldbach-lean/blob/da5cf9edad7896290771dfcab8feee2906399e3d/entries/dudek2014/LeanLab/PNTPort/ZetaZeros/LocalPF.lean). + The present proof applies Tau Ceti's general Landau lemma at a different centre. +-/ + +public section + +open Complex Metric + +namespace TauCeti + +private lemma local_logDeriv_coefficient_le {d : ℝ} (hd : d ≤ 31 / 20) : + 4 * (8 / 5 + d) / (8 / 5 - d) ^ 2 + + (8 / 5) / (((7 / 4) ^ 2 - (8 / 5) * d) * Real.log ((7 / 4) / (8 / 5))) ≤ + 5040 + 3 / Real.log (35 / 32) := by + have hL : 0 < Real.log (35 / 32) := Real.log_pos (by norm_num) + have hgap : 0 < 8 / 5 - d := by linarith + have hsq : (1 / 20 : ℝ) ^ 2 ≤ (8 / 5 - d) ^ 2 := by + nlinarith [sq_nonneg (d - 31 / 20)] + have hfirst : 4 * (8 / 5 + d) / (8 / 5 - d) ^ 2 ≤ 5040 := by + rw [div_le_iff₀ (sq_pos_of_pos hgap)] + nlinarith + have hden : 0 < (7 / 4 : ℝ) ^ 2 - (8 / 5) * d := by linarith + have hsecond : (8 / 5 : ℝ) / + (((7 / 4) ^ 2 - (8 / 5) * d) * Real.log (35 / 32)) ≤ + 3 / Real.log (35 / 32) := by + rw [div_le_div_iff₀ (mul_pos hden hL) hL] + have hnum : (8 / 5 : ℝ) ≤ 3 * ((7 / 4) ^ 2 - (8 / 5) * d) := by linarith + nlinarith [mul_le_mul_of_nonneg_right hnum hL.le] + rw [show (7 / 4 : ℝ) / (8 / 5) = 35 / 32 by norm_num] + exact add_le_add hfirst hsecond + +/-- Uniform local partial fractions for zeta, with multiplicities and logarithmic error. -/ +theorem exists_norm_logDeriv_riemannZeta_sub_divisor_le_log : ∃ C : ℝ, 0 < C ∧ + ∀ t : ℝ, 3 ≤ |t| → ∀ s : ℂ, ‖s - (2 + I * t)‖ ≤ 31 / 20 → riemannZeta s ≠ 0 → + ‖logDeriv riemannZeta s - + ∑ᶠ ρ, (MeromorphicOn.divisor riemannZeta + (closedBall (2 + I * t) (8 / 5)) ρ : ℂ) / (s - ρ)‖ ≤ C * Real.log |t| := by + have hL : 0 < Real.log (35 / 32) := Real.log_pos (by norm_num) + obtain ⟨C, hC, hbound⟩ := exists_riemannZeta_relative_bound_log + let K : ℝ := 5040 + 3 / Real.log (35 / 32) + have hK : 0 < K := by dsimp [K]; positivity + refine ⟨K * C, mul_pos hK hC, fun t ht s hs hζ ↦ ?_⟩ + obtain ⟨M, hM1, hlogBound, hbound⟩ := hbound t ht + have hf := analyticOnNhd_riemannZeta_closedBall ht + have hland := hf.norm_logDeriv_sub_finsum_divisor_le (r := 8 / 5) + (by norm_num) hbound (by linarith : ‖s - (2 + I * t)‖ < 8 / 5) hζ + have hcoef := local_logDeriv_coefficient_le hs + have hmul := mul_le_mul_of_nonneg_right hcoef (Real.log_nonneg hM1) + have hlogbound := mul_le_mul_of_nonneg_left hlogBound hK.le + exact hland.trans (hmul.trans (by simpa only [K, mul_assoc] using hlogbound)) + +end TauCeti diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/LogGrowth.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/LogGrowth.lean new file mode 100644 index 000000000..ecd5a5506 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/LogGrowth.lean @@ -0,0 +1,61 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis + +/-! +# Global logarithmic growth on the positive left contour line + +The large-height estimate combines with continuity on a compact interval to +give a logarithmic bound at every height. This retains the logarithmic growth +needed to bound finite differences of the remaining Perron integral. +-/ + +public section + +open Complex Set + +namespace RiemannHypothesis + +/-- Under RH, a global logarithmic bound holds on the positive line `Re s = 9 / 20`. -/ +theorem exists_norm_logDeriv_riemannZeta_le_log_add_abs (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, + ‖logDeriv riemannZeta ((9 / 20 : ℂ) + I * t)‖ ≤ C * Real.log (2 + |t|) := by + have hcont : Continuous (fun t : ℝ ↦ logDeriv riemannZeta ((9 / 20 : ℂ) + I * t)) := by + simpa using hRH.continuous_logDeriv_riemannZeta_line + (σ := 9 / 20) (by norm_num) (by norm_num) (by norm_num) + obtain ⟨D, hD⟩ := (isCompact_Icc : IsCompact (Icc (-3 : ℝ) 3)).exists_bound_of_continuousOn + hcont.continuousOn + obtain ⟨B, hB, htail⟩ := hRH.exists_norm_logDeriv_riemannZeta_le_log + have hlog2 : 0 < Real.log 2 := Real.log_pos (by norm_num) + refine ⟨B + |D| / Real.log 2 + 1, by positivity, fun t ↦ ?_⟩ + have hlow : Real.log 2 ≤ Real.log (2 + |t|) := + Real.log_le_log (by norm_num) (by linarith [abs_nonneg t]) + have hlog : 0 ≤ Real.log (2 + |t|) := hlog2.le.trans hlow + by_cases ht : 3 ≤ |t| + · have hcomp : Real.log |t| ≤ Real.log (2 + |t|) := + Real.log_le_log (by linarith) (by linarith) + calc + _ ≤ B * Real.log |t| := htail t ht + _ ≤ B * Real.log (2 + |t|) := mul_le_mul_of_nonneg_left hcomp hB.le + _ ≤ _ := mul_le_mul_of_nonneg_right + (by + have : 0 ≤ |D| / Real.log 2 := by positivity + linarith) hlog + · have hmem : t ∈ Icc (-3 : ℝ) 3 := by + have habs := abs_le.mp (le_of_lt (lt_of_not_ge ht)) + exact ⟨by linarith [habs.1], by linarith [habs.2]⟩ + calc + _ ≤ D := hD t hmem + _ ≤ |D| := le_abs_self D + _ = (|D| / Real.log 2) * Real.log 2 := (div_mul_cancel₀ _ hlog2.ne').symm + _ ≤ (|D| / Real.log 2) * Real.log (2 + |t|) := + mul_le_mul_of_nonneg_left hlow (by positivity) + _ ≤ _ := mul_le_mul_of_nonneg_right (by linarith) hlog + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Order.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Order.lean new file mode 100644 index 000000000..8736c9581 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Order.lean @@ -0,0 +1,76 @@ +/- +Copyright (c) 2026 Steve Hubbard, RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Steve Hubbard, RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +public import Mathlib.Analysis.Meromorphic.Order +import TauCeti.NumberTheory.LSeries.CompletedRiemannZeta +import Mathlib.Analysis.Normed.Module.Connected +import Mathlib.NumberTheory.LSeries.Nonvanishing + +/-! +# Orders of the Riemann zeta function + +Zeta has finite analytic order away from its pole, and meromorphic order `-1` +at `1`. The proof at the pole uses Tau Ceti's corresponding result for the +completed zeta function and the nonvanishing gamma factor. + +The finite analytic-order argument is adapted from Steve Hubbard's `goldbach-lean`, +revision `da5cf9edad7896290771dfcab8feee2906399e3d`, +`entries/dudek2014/LeanLab/PNTPort/ExplicitPsi1/Merom.lean` (Apache-2.0). +-/ + +public section + +open Complex Filter Topology Set + +namespace TauCeti + +/-- Away from the pole, zeta is not the zero analytic germ. -/ +theorem analyticOrderAt_riemannZeta_ne_top {s : ℂ} (hs : s ≠ 1) : + analyticOrderAt riemannZeta s ≠ ⊤ := by + have hf : AnalyticOnNhd ℂ riemannZeta ({1}ᶜ : Set ℂ) := analyticOn_riemannZeta + have hconn : IsPreconnected ({1}ᶜ : Set ℂ) := + (isConnected_compl_singleton_of_one_lt_rank (by rw [Complex.rank_real_complex]; norm_num) + (1 : ℂ)).isPreconnected + have h2 : analyticOrderAt riemannZeta 2 ≠ ⊤ := by + rw [analyticOrderAt_eq_zero.mpr + (Or.inr (riemannZeta_ne_zero_of_one_lt_re (by norm_num)))] + simp + exact hf.analyticOrderAt_ne_top_of_isPreconnected hconn (x := 2) (y := s) + (by simp) (by simpa using hs) h2 + +/-- Zeta's meromorphic order away from its pole is its finite analytic multiplicity. -/ +theorem meromorphicOrderAt_riemannZeta_of_ne_one {s : ℂ} (hs : s ≠ 1) : + meromorphicOrderAt riemannZeta s = (analyticOrderNatAt riemannZeta s : ℤ) := by + rw [(analyticOn_riemannZeta s hs).meromorphicOrderAt_eq, + ← Nat.cast_analyticOrderNatAt (analyticOrderAt_riemannZeta_ne_top hs)] + simp + +/-- The Riemann zeta function has a simple pole at `1`. -/ +theorem meromorphicOrderAt_riemannZeta_one : + meromorphicOrderAt riemannZeta 1 = (-1 : ℤ) := by + have heq : riemannZeta =ᶠ[𝓝[≠] (1 : ℂ)] + completedRiemannZeta * (fun s ↦ (Gammaℝ s)⁻¹) := by + filter_upwards [nhdsWithin_le_nhds (eventually_ne_nhds one_ne_zero)] with s hs + rw [riemannZeta_def_of_ne_zero hs, div_eq_mul_inv, Pi.mul_apply] + have hG : AnalyticAt ℂ (fun s ↦ (Gammaℝ s)⁻¹) 1 := + differentiable_Gammaℝ_inv.analyticAt 1 + have horder : meromorphicOrderAt (fun s ↦ (Gammaℝ s)⁻¹) 1 = 0 := by + rw [hG.meromorphicOrderAt_eq, hG.analyticOrderAt_eq_zero.mpr (by simp [Gammaℝ_one])] + simp + rw [meromorphicOrderAt_congr heq, + meromorphicOrderAt_mul (meromorphic_completedRiemannZeta 1) hG.meromorphicAt, + meromorphicOrderAt_completedRiemannZeta_one, horder, add_zero] + +/-- Zeta has finite meromorphic order at every point. -/ +theorem meromorphicOrderAt_riemannZeta_ne_top (s : ℂ) : + meromorphicOrderAt riemannZeta s ≠ ⊤ := by + rcases eq_or_ne s 1 with rfl | hs + · simp [meromorphicOrderAt_riemannZeta_one] + · simp [meromorphicOrderAt_riemannZeta_of_ne_one hs] + +end TauCeti diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ResidualDifference.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ResidualDifference.lean new file mode 100644 index 000000000..30d6481fb --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ResidualDifference.lean @@ -0,0 +1,85 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.LogGrowth +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +import RealRooted.Mathlib.Analysis.SpecialFunctions.Pow.Interpolation +import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifferenceIntegral + +/-! +# Finite differences of the remaining zeta contour integral under RH + +On `Re s = 9/20`, logarithmic growth is bounded by power `1/20`. +Interpolating the two kernel estimates with exponent `1/10` gives the +integrable height majorant `(1+|t|)^(-21/20)` and coefficient +`x^(11/20) / h^(1/10)`. For step `h = sqrt x`, this is exactly `sqrt x`. +-/ + +public section + +open Complex Set MeasureTheory + +namespace RiemannHypothesis + +/-- The logarithmic derivative on the positive left contour line grows slower than every +positive power of the absolute height, including the compact range of heights. -/ +theorem exists_norm_logDeriv_riemannZeta_le_rpow_of_pos (hRH : RiemannHypothesis) + {r : ℝ} (hr : 0 < r) : + ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, + ‖logDeriv riemannZeta ((9 / 20 : ℂ) + t * I)‖ ≤ C * (1 + |t|) ^ r := by + obtain ⟨B, hB, hbound⟩ := hRH.exists_norm_logDeriv_riemannZeta_le_log_add_abs + refine ⟨B * (2 ^ r / r), by positivity, fun t ↦ ?_⟩ + calc + _ ≤ B * Real.log (2 + |t|) := by simpa only [mul_comm] using hbound t + _ ≤ B * ((2 ^ r / r) * (1 + |t|) ^ r) := + mul_le_mul_of_nonneg_left (Real.log_two_add_abs_le_mul_rpow hr t) hB.le + _ = _ := by ring + +/-- The finite-difference remainder integral on `Re s = 9/20` is genuinely integrable and +bounded by `C x^(11/20) / h^(1/10)` under RH. -/ +theorem exists_norm_integral_logDeriv_difference_le (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ x h y z : ℝ, + 0 < x → 0 < h → y ∈ Icc (x / 2) (2 * x) → z ∈ Icc (x / 2) (2 * x) → + |y - z| ≤ h → + let g := fun t : ℝ ↦ + let s := (9 / 20 : ℂ) + t * I + logDeriv riemannZeta s * (((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (h : ℂ)) + Integrable g ∧ ‖∫ t, g t‖ ≤ C * (x ^ (11 / 20 : ℝ) / h ^ (1 / 10 : ℝ)) := by + obtain ⟨B, _, hbound⟩ := hRH.exists_norm_logDeriv_riemannZeta_le_rpow_of_pos + (by norm_num : (0 : ℝ) < 1 / 20) + have hcont : Continuous (fun t : ℝ ↦ + logDeriv riemannZeta (((9 / 20 : ℝ) : ℂ) + t * I)) := by + simpa only [mul_comm] using hRH.continuous_logDeriv_riemannZeta_line + (σ := 9 / 20) (by norm_num) (by norm_num) (by norm_num) + have h := Complex.exists_norm_integral_difference_line_le_rpow + (F := logDeriv riemannZeta) (c := 9 / 20) (C := B) (r := 1 / 20) (p := 1 / 10) + (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) hcont + (by simpa only [ofReal_div, ofReal_ofNat] using hbound) + simpa only [ofReal_div, ofReal_ofNat, + show (9 / 20 : ℝ) + 1 / 10 = 11 / 20 by norm_num] using h + +/-- A square-root-step finite difference of the remaining contour integral is `O(sqrt x)` +under RH, with no logarithmic loss. -/ +theorem exists_norm_integral_logDeriv_sqrt_difference_le (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ x y z : ℝ, 0 < x → + y ∈ Icc (x / 2) (2 * x) → z ∈ Icc (x / 2) (2 * x) → |y - z| ≤ Real.sqrt x → + let g := fun t : ℝ ↦ + let s := (9 / 20 : ℂ) + t * I + logDeriv riemannZeta s * (((y : ℂ) ^ (s + 1) / (s * (s + 1)) - + (z : ℂ) ^ (s + 1) / (s * (s + 1))) / (Real.sqrt x : ℂ)) + Integrable g ∧ ‖∫ t, g t‖ ≤ C * Real.sqrt x := by + obtain ⟨C, hC, hbound⟩ := hRH.exists_norm_integral_logDeriv_difference_le + refine ⟨C, hC, fun x y z hx hy hz hyz ↦ ?_⟩ + have ht : 0 < Real.sqrt x := Real.sqrt_pos.mpr hx + have he : x ^ (11 / 20 : ℝ) / (Real.sqrt x) ^ (1 / 10 : ℝ) = Real.sqrt x := by + rw [Real.sqrt_eq_rpow, ← Real.rpow_mul hx.le, ← Real.rpow_sub hx] + norm_num + simpa only [he] using hbound x (Real.sqrt x) y z hx ht hy hz hyz + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Residues.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Residues.lean new file mode 100644 index 000000000..df4be5444 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Residues.lean @@ -0,0 +1,55 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +public import TauCeti.Analysis.Contour.Residue.Basic +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Order +import RealRooted.Mathlib.Analysis.Contour.Residue.LogDeriv +import TauCeti.NumberTheory.LSeries.CompletedRiemannZeta + +/-! +# Residues of weighted zeta logarithmic derivatives + +For an analytic weight `g`, the residue of `-ζ'/ζ * g` is `g(1)` at the pole +of zeta and `-m g(ρ)` at a zero of multiplicity `m`. Regular points contribute +zero. These unconditional identities retain the full multiplicities. +-/ + +public section + +namespace TauCeti.Contour + +/-- Away from the pole of zeta, the residue of its weighted negative logarithmic +derivative is the negative analytic multiplicity times the weight. -/ +theorem residue_neg_logDeriv_riemannZeta_mul {g : ℂ → ℂ} {s : ℂ} + (hs : s ≠ 1) (hg : AnalyticAt ℂ g s) : + residue (fun z ↦ -logDeriv riemannZeta z * g z) s = + -(analyticOrderNatAt riemannZeta s : ℂ) * g s := by + have heq : (fun z ↦ -logDeriv riemannZeta z * g z) = + (fun z ↦ (-1 : ℂ) * (logDeriv riemannZeta z * g z)) := by + funext z + ring + rw [heq, residue_const_mul, + residue_logDeriv_mul (meromorphic_riemannZeta s) + (meromorphicOrderAt_riemannZeta_of_ne_one hs) hg] + push_cast + ring + +/-- The pole of zeta contributes the weight at `1` to its weighted negative +logarithmic derivative. -/ +theorem residue_neg_logDeriv_riemannZeta_mul_one {g : ℂ → ℂ} + (hg : AnalyticAt ℂ g 1) : + residue (fun z ↦ -logDeriv riemannZeta z * g z) 1 = g 1 := by + have heq : (fun z ↦ -logDeriv riemannZeta z * g z) = + (fun z ↦ (-1 : ℂ) * (logDeriv riemannZeta z * g z)) := by + funext z + ring + rw [heq, residue_const_mul, + residue_logDeriv_mul (meromorphic_riemannZeta 1) meromorphicOrderAt_riemannZeta_one hg] + norm_num + +end TauCeti.Contour diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RiemannHypothesis.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RiemannHypothesis.lean new file mode 100644 index 000000000..c13e5a5d9 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RiemannHypothesis.lean @@ -0,0 +1,201 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +public import Mathlib.Analysis.MellinInversion +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.LocalLogDeriv +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroCount +import RealRooted.Mathlib.Analysis.Complex.PartialFractions +import RealRooted.Mathlib.Analysis.MellinInversion.Decay +import TauCeti.Analysis.MellinInversion +import TauCeti.Analysis.Calculus.LogDeriv +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Lemma + +/-! +# A zero-free positive line under the Riemann hypothesis + +Mathlib's Riemann hypothesis places every zeta zero of positive real part, apart +from the excluded pole, on the critical line. Consequently the vertical line +`Re s = 9 / 20` is zero-free. Along this line the logarithmic derivative is +`O(log |t|)` for `3 ≤ |t|`. + +The logarithmic bound combines the unconditional local partial-fraction estimate +with Jensen's bound for the sum of divisor multiplicities. Each nearby zero lies +at horizontal distance `1 / 20` from the evaluation point. The argument retains +multiplicities and needs neither simplicity of the zeros nor a zero-free gap +around the real axis. + +## References + +* H. Davenport, *Multiplicative Number Theory*, 3rd ed., Chapters 15 and 17. +-/ + +public section + +open Complex Metric Set + +namespace RiemannHypothesis + +/-- A zero of positive real part lies on the critical line under Mathlib's RH. -/ +theorem re_eq_half_of_riemannZeta_eq_zero_of_re_pos (hRH : RiemannHypothesis) + {s : ℂ} (hs : 0 < s.re) (hz : riemannZeta s = 0) (hs1 : s ≠ 1) : s.re = 1 / 2 := by + apply hRH s hz _ hs1 + rintro ⟨n, hn⟩ + have hre : s.re = -2 * ((n : ℝ) + 1) := by simpa using congrArg Complex.re hn + linarith [show (0 : ℝ) ≤ n from Nat.cast_nonneg n] + +/-- The fixed positive line to the left of the critical line is zero-free under RH. -/ +theorem riemannZeta_ne_zero_of_re_eq_nine_twentieths (hRH : RiemannHypothesis) + {s : ℂ} (hs : s.re = 9 / 20) : riemannZeta s ≠ 0 := by + intro hz + have hs1 : s ≠ 1 := by + intro h + norm_num [h] at hs + have hhalf := hRH.re_eq_half_of_riemannZeta_eq_zero_of_re_pos (s := s) + (by linarith) hz hs1 + linarith + +private lemma distance_from_divisor_support (hRH : RiemannHypothesis) + {t : ℝ} (ht : 3 ≤ |t|) {ρ : ℂ} + (hρ : ρ ∈ Function.support + (MeromorphicOn.divisor riemannZeta (closedBall (2 + I * t) (8 / 5)))) : + 1 / 20 ≤ ‖((9 / 20 : ℂ) + I * t) - ρ‖ := by + let D := MeromorphicOn.divisor riemannZeta (closedBall (2 + I * t) (8 / 5)) + have hmem : ρ ∈ closedBall (2 + I * t) (8 / 5) := D.supportWithinDomain hρ + have hd : ‖ρ - (2 + I * t)‖ ≤ 8 / 5 := by + simpa only [mem_closedBall, dist_eq_norm] using hmem + have hre : |ρ.re - 2| ≤ 8 / 5 := by + simpa using (abs_re_le_norm (ρ - (2 + I * t))).trans hd + have hpos : 0 < ρ.re := by linarith [(abs_le.mp hre).1] + have hne : ρ ≠ 1 := by + intro h + have him := (abs_im_le_norm (ρ - (2 + I * t))).trans hd + have him' : |t| ≤ 8 / 5 := by simpa [h] using him + linarith + have hA := TauCeti.analyticOnNhd_riemannZeta_closedBall ht ρ + ((closedBall_subset_closedBall (by norm_num : (8 / 5 : ℝ) ≤ 7 / 4)) hmem) + have hz : riemannZeta ρ = 0 := by + by_contra hz + exact hρ (hA.divisor_apply_eq_zero hz) + have hhalf := hRH.re_eq_half_of_riemannZeta_eq_zero_of_re_pos hpos hz hne + have h := abs_re_le_norm (((9 / 20 : ℂ) + I * t) - ρ) + norm_num [hhalf] at h + exact h + +/-- Under RH, the logarithmic derivative on `Re s = 9 / 20` has logarithmic height growth. -/ +theorem exists_norm_logDeriv_riemannZeta_le_log (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, 3 ≤ |t| → + ‖logDeriv riemannZeta ((9 / 20 : ℂ) + I * t)‖ ≤ C * Real.log |t| := by + obtain ⟨C₁, hC₁, hlocal⟩ := TauCeti.exists_norm_logDeriv_riemannZeta_sub_divisor_le_log + obtain ⟨C₂, hC₂, hcount⟩ := TauCeti.exists_sum_divisor_riemannZeta_le_log + refine ⟨C₁ + 20 * C₂, by positivity, fun t ht ↦ ?_⟩ + let D := MeromorphicOn.divisor riemannZeta (closedBall (2 + I * t) (8 / 5)) + let s : ℂ := (9 / 20 : ℂ) + I * t + have hs : ‖s - (2 + I * t)‖ ≤ 31 / 20 := by + have heq : s - (2 + I * t) = -(31 / 20 : ℂ) := by dsimp [s]; ring + rw [heq] + norm_num + have hζ : riemannZeta s ≠ 0 := + hRH.riemannZeta_ne_zero_of_re_eq_nine_twentieths (by simp [s]) + have hloc := hlocal t ht s hs hζ + have hf : AnalyticOnNhd ℂ riemannZeta (closedBall (2 + I * t) (8 / 5)) := + (TauCeti.analyticOnNhd_riemannZeta_closedBall ht).mono + (closedBall_subset_closedBall (by norm_num)) + have hfin : Function.HasFiniteSupport D := D.finiteSupport (isCompact_closedBall _ _) + have hsum := Complex.norm_finsum_intCast_div_sub_le hfin + (MeromorphicOn.AnalyticOnNhd.divisor_nonneg hf) + (by norm_num : (0 : ℝ) < 1 / 20) + (fun ρ hρ ↦ distance_from_divisor_support hRH ht hρ) + have hsum' : ‖∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ ≤ 20 * C₂ * Real.log |t| := by + have h20 : ‖∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ ≤ + 20 * ((∑ᶠ ρ, D ρ : ℤ) : ℝ) := by norm_num at hsum ⊢; exact hsum + have hc : ((∑ᶠ ρ, D ρ : ℤ) : ℝ) ≤ C₂ * Real.log |t| := hcount t ht + exact h20.trans (by nlinarith) + calc + ‖logDeriv riemannZeta s‖ = + ‖(logDeriv riemannZeta s - ∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)) + + ∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ := by rw [sub_add_cancel] + _ ≤ ‖logDeriv riemannZeta s - ∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ + + ‖∑ᶠ ρ, (D ρ : ℂ) / (s - ρ)‖ := norm_add_le _ _ + _ ≤ C₁ * Real.log |t| + 20 * C₂ * Real.log |t| := add_le_add hloc hsum' + _ = (C₁ + 20 * C₂) * Real.log |t| := by ring + +/-- Under RH, the logarithmic derivative is continuous on every positive vertical line +avoiding the critical line and the pole at `1`. -/ +theorem continuous_logDeriv_riemannZeta_line (hRH : RiemannHypothesis) {σ : ℝ} + (hσ : 0 < σ) (hhalf : σ ≠ 1 / 2) (h1 : σ ≠ 1) : + Continuous (fun t : ℝ ↦ logDeriv riemannZeta ((σ : ℂ) + I * t)) := by + apply continuous_iff_continuousAt.mpr + intro t + have hs1 : (σ : ℂ) + I * t ≠ 1 := by + intro h + apply h1 + simpa using congrArg Complex.re h + have hz : riemannZeta ((σ : ℂ) + I * t) ≠ 0 := by + intro h + apply hhalf + simpa using hRH.re_eq_half_of_riemannZeta_eq_zero_of_re_pos (by simpa using hσ) h hs1 + exact ((analyticOn_riemannZeta _ (by simpa using hs1)).logDeriv hz).continuousAt.comp + (f := fun u : ℝ ↦ (σ : ℂ) + I * u) (by fun_prop) + +/-- A global sublinear bound for the logarithmic derivative on the positive left contour line, +including its compact range of heights. -/ +theorem exists_norm_logDeriv_riemannZeta_le_rpow (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, + ‖logDeriv riemannZeta ((9 / 20 : ℂ) + I * t)‖ ≤ C * (1 + |t|) ^ (1 / 2 : ℝ) := by + have hcont : Continuous (fun t : ℝ ↦ logDeriv riemannZeta ((9 / 20 : ℂ) + I * t)) := by + simpa using hRH.continuous_logDeriv_riemannZeta_line + (σ := 9 / 20) (by norm_num) (by norm_num) (by norm_num) + obtain ⟨D, hD⟩ := (isCompact_Icc : IsCompact (Icc (-3 : ℝ) 3)).exists_bound_of_continuousOn + hcont.continuousOn + obtain ⟨B, hB, htail⟩ := hRH.exists_norm_logDeriv_riemannZeta_le_log + refine ⟨|D| + 2 * B + 1, by positivity, fun t ↦ ?_⟩ + have hw : 1 ≤ (1 + |t|) ^ (1 / 2 : ℝ) := + Real.one_le_rpow (by linarith [abs_nonneg t]) (by norm_num) + by_cases ht : 3 ≤ |t| + · have hlog : Real.log |t| ≤ 2 * (1 + |t|) ^ (1 / 2 : ℝ) := by + have h := Real.log_le_rpow_div (abs_nonneg t) (by norm_num : (0 : ℝ) < 1 / 2) + have hm := Real.rpow_le_rpow (abs_nonneg t) (by linarith : |t| ≤ 1 + |t|) + (by norm_num : (0 : ℝ) ≤ 1 / 2) + linarith + have h := (htail t ht).trans (mul_le_mul_of_nonneg_left hlog hB.le) + nlinarith [abs_nonneg D] + · have hmem : t ∈ Icc (-3 : ℝ) 3 := by + obtain ⟨_, _⟩ := abs_le.mp (le_of_lt (lt_of_not_ge ht)) + constructor <;> linarith + have h := hD t hmem + have hD' : D ≤ |D| := le_abs_self D + nlinarith [abs_nonneg D] + +/-- Under RH, the logarithmic derivative divided by the first-order Perron denominator +is absolutely integrable on the positive line `Re s = 9 / 20`. -/ +theorem verticalIntegrable_logDeriv_riemannZeta (hRH : RiemannHypothesis) : + VerticalIntegrable (fun s : ℂ ↦ logDeriv riemannZeta s / (s * (s + 1))) (9 / 20) := by + obtain ⟨C, _, hbound⟩ := hRH.exists_norm_logDeriv_riemannZeta_le_rpow + refine Complex.verticalIntegrable_div_mul_add_one_of_le_rpow + (C := C) (r := 1 / 2) (by norm_num) (by norm_num) (by norm_num) ?_ ?_ + · simpa only [mul_comm] using hRH.continuous_logDeriv_riemannZeta_line + (σ := 9 / 20) (by norm_num) (by norm_num) (by norm_num) + · intro t + simpa only [ofReal_div, ofReal_ofNat, mul_comm] using hbound t + +/-- Under RH, the smoothed zeta Perron integrand is absolutely integrable on the positive +left contour line, for every positive real base. -/ +theorem integrable_logDeriv_riemannZeta_mul_cpow (hRH : RiemannHypothesis) + {x : ℝ} (hx : 0 < x) : + MeasureTheory.Integrable (fun t : ℝ ↦ + logDeriv riemannZeta ((9 / 20 : ℂ) + t * I) * (x : ℂ) ^ ((9 / 20 : ℂ) + t * I) / + (((9 / 20 : ℂ) + t * I) * ((9 / 20 : ℂ) + t * I + 1))) := by + have h := hRH.verticalIntegrable_logDeriv_riemannZeta.integrable_cpow_smul (inv_pos.mpr hx) + simp only [ofReal_inv, inv_cpow_ofReal_nonneg hx.le, cpow_neg, inv_inv, + smul_eq_mul, ofReal_div, ofReal_ofNat] at h + convert h using 1 + funext t + ring + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RieszContour.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RieszContour.lean new file mode 100644 index 000000000..b694f3b58 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RieszContour.lean @@ -0,0 +1,202 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.ZetaZeros +public import Mathlib.Analysis.Analytic.Order +public import TauCeti.Analysis.Complex.Rectangle +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Contour +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroKernel +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.NumberTheory.LSeries.Nonvanishing +import Mathlib.Order.Filter.AtTopBot.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Basic +import Mathlib.Tactic.Linarith + +/-! +# The finite smoothed zeta contour and exhaustion of its zeros + +The positive left edge `Re s = 9 / 20` avoids the poles of the first-order Riesz +kernel. Under RH it also avoids zeta zeros. A zero-free pair of horizontal +segments therefore suffices to specialize the unconditional weighted residue +formula to the smoothed Perron integrand. + +The rectangle zero sums converge to the sum over all positive-real-part zeta +zeros as the height tends to infinity. The exhaustion theorem applies to any +summable weight; the integrated Riesz weight is summable by the existing RH +zero-kernel theorem. All zero sums retain analytic multiplicities. +-/ + +public section + +open Complex Set Filter +open scoped Topology Interval + +namespace Complex + +/-- The first-order Riesz kernel is analytic on the open positive half-plane. -/ +theorem analyticOnNhd_cpow_div_mul_add_one {x : ℂ} (hx : x ≠ 0) : + AnalyticOnNhd ℂ (fun s : ℂ ↦ x ^ (s + 1) / (s * (s + 1))) + {s : ℂ | 0 < s.re} := by + intro s hs + change 0 < s.re at hs + have hs₀ : s ≠ 0 := by + intro h + simp [h] at hs + have hs₁ : s + 1 ≠ 0 := by + intro h + have hre : s.re + 1 = 0 := by simpa using congrArg Complex.re h + linarith + have hnum : AnalyticAt ℂ (fun z : ℂ ↦ x ^ (z + 1)) s := by + simp_rw [cpow_def_of_ne_zero hx] + exact (analyticAt_const.mul (analyticAt_id.add analyticAt_const)).cexp + exact hnum.div (analyticAt_id.mul (analyticAt_id.add analyticAt_const)) + (mul_ne_zero hs₀ hs₁) + +/-- Membership in the symmetric positive-half-plane Perron rectangle. -/ +theorem mem_riesz_rectangle_iff {t : ℝ} (ht : 0 ≤ t) {s : ℂ} : + s ∈ Rectangle ((9 / 20 : ℂ) - I * t) (2 + I * t) ↔ + (9 / 20 ≤ s.re ∧ s.re ≤ 2) ∧ |s.im| ≤ t := by + have hre : ((9 / 20 : ℂ) - I * t).re ≤ (2 + I * t).re := by norm_num + have him : ((9 / 20 : ℂ) - I * t).im ≤ (2 + I * t).im := by + simpa using (neg_le_self ht) + rw [mem_rectangle_iff hre him] + norm_num [abs_le] + +end Complex + +namespace RiemannHypothesis + +/-- RH and zero-free horizontal segments make the full positive contour boundary zero-free. -/ +theorem riemannZeta_ne_zero_on_riesz_rectangle (hRH : RiemannHypothesis) + {t : ℝ} (ht : 0 ≤ t) + (hhor : ∀ σ ∈ Icc (9 / 20 : ℝ) 2, ∀ u : ℝ, |u| = t → + riemannZeta (σ + I * u) ≠ 0) : + ∀ s ∈ frontier (Rectangle ((9 / 20 : ℂ) - I * t) (2 + I * t)), + riemannZeta s ≠ 0 := by + intro s hs + have hIm : -t ≤ t := by linarith + simp only [frontier_rectangle, mem_union, mem_reProdIm, mem_insert_iff, + mem_singleton_iff] at hs + norm_num [hIm] at hs + have heq : s = (s.re : ℂ) + I * s.im := by + apply Complex.ext <;> simp + rcases hs with ⟨hre, him | him⟩ | ⟨hre | hre, _⟩ + · rw [heq] + exact hhor s.re hre s.im (by rw [him, abs_neg, abs_of_nonneg ht]) + · rw [heq] + exact hhor s.re hre s.im (by rw [him, abs_of_nonneg ht]) + · exact hRH.riemannZeta_ne_zero_of_re_eq_nine_twentieths hre + · exact riemannZeta_ne_zero_of_one_le_re (by linarith) + +open scoped Classical in +/-- The finite smoothed contour identity at any symmetric zero-free horizontal height. -/ +theorem integral_boundary_riesz_rectangle (hRH : RiemannHypothesis) + {x t : ℝ} (hx : 0 < x) (ht : 0 < t) + (hhor : ∀ σ ∈ Icc (9 / 20 : ℝ) 2, ∀ u : ℝ, |u| = t → + riemannZeta (σ + I * u) ≠ 0) : + let f : ℂ → ℂ := fun s ↦ + -logDeriv riemannZeta s * (x : ℂ) ^ (s + 1) / (s * (s + 1)) + (∫ σ : ℝ in (9 / 20 : ℝ)..2, f (σ + (-t : ℝ) * I)) - + (∫ σ : ℝ in (9 / 20 : ℝ)..2, f (σ + (t : ℝ) * I)) + + I * (∫ u : ℝ in -t..t, f (2 + u * I)) - + I * (∫ u : ℝ in -t..t, f ((9 / 20 : ℂ) + u * I)) = + 2 * Real.pi * I * ((x : ℂ) ^ (2 : ℕ) / 2 - + ∑ ρ ∈ (isCompact_rectangle ((9 / 20 : ℂ) - I * t) + (2 + I * t)).inter_riemannZetaZeros_finite.toFinset, + (analyticOrderNatAt riemannZeta ρ : ℂ) * (x : ℂ) ^ (ρ + 1) / + (ρ * (ρ + 1))) := by + classical + have hre : ((9 / 20 : ℂ) - I * t).re ≤ (2 + I * t).re := by norm_num + have him : ((9 / 20 : ℂ) - I * t).im ≤ (2 + I * t).im := by + simpa using (neg_le_self ht.le) + have h1 : (1 : ℂ) ∈ interior (Rectangle ((9 / 20 : ℂ) - I * t) (2 + I * t)) := by + rw [interior_rectangle hre him] + norm_num [mem_reProdIm, ht] + have hg : AnalyticOnNhd ℂ (fun s : ℂ ↦ + (x : ℂ) ^ (s + 1) / (s * (s + 1))) + (Rectangle ((9 / 20 : ℂ) - I * t) (2 + I * t)) := by + apply (Complex.analyticOnNhd_cpow_div_mul_add_one + (Complex.ofReal_ne_zero.mpr hx.ne')).mono + intro s hs + have hre := ((mem_riesz_rectangle_iff ht.le).mp hs).1.1 + change 0 < s.re + linarith + have h := TauCeti.Contour.integral_boundary_rect_neg_logDeriv_riemannZeta + hre him h1 hg (hRH.riemannZeta_ne_zero_on_riesz_rectangle ht.le hhor) + norm_num only [ofReal_div, ofReal_ofNat, sub_re, sub_im, mul_re, mul_im, + I_re, I_im, ofReal_re, ofReal_im, zero_mul, mul_zero, one_mul, zero_add, + add_zero, sub_zero, zero_sub, add_re, add_im, one_re, one_im] at h + simpa only [mul_div_assoc, show (1 : ℂ) + 1 = 2 by norm_num, cpow_ofNat, + show (9 / 20 : ℂ).re = (9 / 20 : ℝ) by norm_num, + show (9 / 20 : ℂ).im = (0 : ℝ) by norm_num, + show (2 : ℂ).re = (2 : ℝ) by norm_num, + show (2 : ℂ).im = (0 : ℝ) by norm_num, + ofReal_div, ofReal_ofNat, zero_sub, zero_add, one_mul] using h + +open scoped Classical in +/-- Symmetric rectangles exhaust the positive-real-part zeta zeros as their heights +tend to infinity. -/ +theorem tendsto_sum_riesz_rectangle_zeros (hRH : RiemannHypothesis) + {ι : Type*} {l : Filter ι} {t : ι → ℝ} {g : ℂ → ℂ} + (ht : Tendsto t l atTop) + (hg : Summable (fun ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} ↦ g ρ)) : + Tendsto (fun i ↦ + ∑ ρ ∈ (isCompact_rectangle ((9 / 20 : ℂ) - I * t i) + (2 + I * t i)).inter_riemannZetaZeros_finite.toFinset, g ρ) l + (𝓝 (∑' ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re}, g ρ)) := by + classical + let Z := {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} + let A : ι → Finset ℂ := fun i ↦ + (isCompact_rectangle ((9 / 20 : ℂ) - I * t i) + (2 + I * t i)).inter_riemannZetaZeros_finite.toFinset + let S : ι → Finset Z := fun i ↦ + (A i).subtype (fun ρ : ℂ ↦ riemannZeta ρ = 0 ∧ 0 < ρ.re) + have hS : Tendsto S l atTop := by + rw [atTop_finset_eq_iInf, tendsto_iInf] + intro ρ + rw [tendsto_principal] + filter_upwards [ht.eventually_ge_atTop |(ρ : ℂ).im|] with i hi + change ({ρ} : Finset Z) ⊆ S i + apply Finset.singleton_subset_iff.mpr + change ρ ∈ (A i).subtype (fun ρ : ℂ ↦ riemannZeta ρ = 0 ∧ 0 < ρ.re) + apply Finset.mem_subtype.mpr + change (ρ : ℂ) ∈ (isCompact_rectangle ((9 / 20 : ℂ) - I * t i) + (2 + I * t i)).inter_riemannZetaZeros_finite.toFinset + rw [Finite.mem_toFinset] + have hρ1 : (ρ : ℂ) ≠ 1 := fun h ↦ riemannZeta_one_ne_zero (h ▸ ρ.property.1) + have hhalf := hRH.re_eq_half_of_riemannZeta_eq_zero_of_re_pos + ρ.property.2 ρ.property.1 hρ1 + refine ⟨(mem_riesz_rectangle_iff ((abs_nonneg _).trans hi)).mpr ?_, ρ.property.1⟩ + exact ⟨by norm_num [hhalf], hi⟩ + apply (hg.hasSum.comp hS).congr' + filter_upwards [ht.eventually_ge_atTop 0] with i hi + apply Finset.sum_subtype_of_mem + intro ρ hρ + have hρ' := (isCompact_rectangle ((9 / 20 : ℂ) - I * t i) + (2 + I * t i)).inter_riemannZetaZeros_finite.mem_toFinset.mp hρ + refine ⟨hρ'.2, ?_⟩ + have hre := ((mem_riesz_rectangle_iff hi).mp hρ'.1).1.1 + linarith + +open scoped Classical in +/-- The finite integrated zero sums converge to the absolutely convergent RH zero series. -/ +theorem tendsto_sum_riesz_rectangle_order_mul_cpow_div (hRH : RiemannHypothesis) + {ι : Type*} {l : Filter ι} {t : ι → ℝ} (ht : Tendsto t l atTop) + {x : ℝ} (hx : 0 < x) : + Tendsto (fun i ↦ + ∑ ρ ∈ (isCompact_rectangle ((9 / 20 : ℂ) - I * t i) + (2 + I * t i)).inter_riemannZetaZeros_finite.toFinset, + (analyticOrderNatAt riemannZeta ρ : ℂ) * (x : ℂ) ^ (ρ + 1) / + (ρ * (ρ + 1))) l + (𝓝 (∑' ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re}, + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * (x : ℂ) ^ ((ρ : ℂ) + 1) / + ((ρ : ℂ) * ((ρ : ℂ) + 1)))) := + hRH.tendsto_sum_riesz_rectangle_zeros ht + (hRH.summable_riemannZeta_order_mul_cpow_div hx) + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RieszExplicitFormula.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RieszExplicitFormula.lean new file mode 100644 index 000000000..9f1399707 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RieszExplicitFormula.lean @@ -0,0 +1,180 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.Chebyshev +public import Mathlib.NumberTheory.LSeries.RiemannZeta +public import Mathlib.Analysis.Analytic.Order +import RealRooted.Mathlib.NumberTheory.Chebyshev.Riesz +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RieszContour +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.HorizontalDecay +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +import Mathlib.MeasureTheory.Integral.IntegralEqImproper +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +/-! +# The integrated explicit formula on a positive left line + +Under RH the smoothed Perron contour can be shifted from `Re s = 2` to +`Re s = 9 / 20`. The horizontal integrals vanish along symmetric good heights, +the vertical integrals converge absolutely, and the finite multiplicity-weighted +zero sums converge to the full integrated zero series. + +The resulting explicit formula retains the left-line integral. Staying in the +positive half-plane avoids the trivial zeros and the poles of the Riesz kernel +at `0` and `-1`. +-/ + +public section + +open Complex Set Filter MeasureTheory +open scoped Topology Interval + +namespace RiemannHypothesis + +/-- Raising the real-base kernel exponent by one only multiplies by a fixed constant. -/ +private theorem integrable_mul_cpow_add_one {F : ℂ → ℂ} {x c : ℂ} + (hx : x ≠ 0) + (hf : Integrable (fun t : ℝ ↦ F (c + t * I) * x ^ (c + t * I) / + ((c + t * I) * (c + t * I + 1)))) : + Integrable (fun t : ℝ ↦ F (c + t * I) * x ^ (c + t * I + 1) / + ((c + t * I) * (c + t * I + 1))) := by + convert hf.mul_const x using 1 + funext t + rw [cpow_add _ _ hx, cpow_one] + ring + +/-- Both vertical integrals of the full smoothed kernel are absolutely convergent under RH. -/ +theorem integrable_riesz_vertical_edges (hRH : RiemannHypothesis) + {x : ℝ} (hx : 0 < x) : + let f : ℂ → ℂ := fun s ↦ + -logDeriv riemannZeta s * (x : ℂ) ^ (s + 1) / (s * (s + 1)) + Integrable (fun u : ℝ ↦ f (2 + u * I)) ∧ + Integrable (fun u : ℝ ↦ f ((9 / 20 : ℂ) + u * I)) := by + dsimp only + constructor + · apply integrable_mul_cpow_add_one (F := fun s ↦ -logDeriv riemannZeta s) + (c := 2) (Complex.ofReal_ne_zero.mpr hx.ne') + simpa only [logDeriv_apply, neg_div, ofReal_ofNat] using + Chebyshev.integrable_logDeriv_riemannZeta_mul_cpow hx (by norm_num : (1 : ℝ) < 2) + · apply integrable_mul_cpow_add_one (F := fun s ↦ -logDeriv riemannZeta s) + (c := 9 / 20) (Complex.ofReal_ne_zero.mpr hx.ne') + convert (hRH.integrable_logDeriv_riemannZeta_mul_cpow hx).neg using 1 + ext t + simp only [Pi.neg_apply, neg_mul, neg_div] + +/-- Shifting the integrated Perron contour leaves the positive left-line integral. -/ +theorem integral_riesz_right_sub_left_eq_zero_sum (hRH : RiemannHypothesis) + {x : ℝ} (hx : 1 ≤ x) : + let f : ℂ → ℂ := fun s ↦ + -logDeriv riemannZeta s * (x : ℂ) ^ (s + 1) / (s * (s + 1)) + (∫ u : ℝ, f (2 + u * I)) - (∫ u : ℝ, f ((9 / 20 : ℂ) + u * I)) = + 2 * Real.pi * ((x : ℂ) ^ (2 : ℕ) / 2 - + ∑' ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re}, + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * (x : ℂ) ^ ((ρ : ℂ) + 1) / + ((ρ : ℂ) * ((ρ : ℂ) + 1))) := by + classical + let f : ℂ → ℂ := fun s ↦ + -logDeriv riemannZeta s * (x : ℂ) ^ (s + 1) / (s * (s + 1)) + let R := ∫ u : ℝ, f (2 + u * I) + let L := ∫ u : ℝ, f ((9 / 20 : ℂ) + u * I) + let Z := ∑' ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re}, + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * (x : ℂ) ^ ((ρ : ℂ) + 1) / + ((ρ : ℂ) * ((ρ : ℂ) + 1)) + have hx₀ : 0 < x := by linarith + obtain ⟨C, _, t, ht, htend, hgood, hedge⟩ := + hRH.exists_good_height_seq_tendsto_integral_zero + have htpos (n : ℕ) : 0 < t n := + lt_of_lt_of_le (by positivity : (0 : ℝ) < (n : ℝ) + 5) (ht n).1 + have htop : Tendsto (fun n ↦ ∫ σ : ℝ in (9 / 20 : ℝ)..2, + f (σ + (t n : ℝ) * I)) atTop (𝓝 0) := by + simpa only [f, mul_comm I] using hedge x hx t (fun n ↦ abs_of_pos (htpos n)) + have hbottom : Tendsto (fun n ↦ ∫ σ : ℝ in (9 / 20 : ℝ)..2, + f (σ + (-t n : ℝ) * I)) atTop (𝓝 0) := by + simpa only [f, mul_comm I] using hedge x hx (fun n ↦ -t n) + (fun n ↦ by rw [abs_neg, abs_of_pos (htpos n)]) + obtain ⟨hr, hl⟩ := hRH.integrable_riesz_vertical_edges hx₀ + have hr_lim : Tendsto (fun n ↦ ∫ u : ℝ in -t n..t n, f (2 + u * I)) + atTop (𝓝 R) := + intervalIntegral_tendsto_integral hr (tendsto_neg_atTop_atBot.comp htend) htend + have hl_lim : Tendsto (fun n ↦ ∫ u : ℝ in -t n..t n, f ((9 / 20 : ℂ) + u * I)) + atTop (𝓝 L) := + intervalIntegral_tendsto_integral hl (tendsto_neg_atTop_atBot.comp htend) htend + have hboundary : Tendsto (fun n ↦ + (∫ σ : ℝ in (9 / 20 : ℝ)..2, f (σ + (-t n : ℝ) * I)) - + (∫ σ : ℝ in (9 / 20 : ℝ)..2, f (σ + (t n : ℝ) * I)) + + I * (∫ u : ℝ in -t n..t n, f (2 + u * I)) - + I * (∫ u : ℝ in -t n..t n, f ((9 / 20 : ℂ) + u * I))) + atTop (𝓝 (I * R - I * L)) := by + simpa only [sub_self, zero_add] using + ((hbottom.sub htop).add (hr_lim.const_mul I)).sub (hl_lim.const_mul I) + have hsum := hRH.tendsto_sum_riesz_rectangle_order_mul_cpow_div htend hx₀ + have hres := (Tendsto.const_sub ((x : ℂ) ^ (2 : ℕ) / 2) hsum).const_mul + (2 * (Real.pi : ℂ) * I) + have heq : I * R - I * L = 2 * Real.pi * I * ((x : ℂ) ^ (2 : ℕ) / 2 - Z) := by + apply tendsto_nhds_unique (hboundary.congr (fun n ↦ ?_)) hres + exact hRH.integral_boundary_riesz_rectangle hx₀ (htpos n) + (fun σ hσ u hu ↦ (hgood n σ hσ u hu).1) + change R - L = 2 * Real.pi * ((x : ℂ) ^ (2 : ℕ) / 2 - Z) + apply mul_left_cancel₀ I_ne_zero + calc + I * (R - L) = I * R - I * L := mul_sub _ _ _ + _ = 2 * Real.pi * I * ((x : ℂ) ^ (2 : ℕ) / 2 - Z) := heq + _ = I * (2 * Real.pi * ((x : ℂ) ^ (2 : ℕ) / 2 - Z)) := by ring + +/-- The integrated Chebyshev function equals the main term minus the zero series, +plus an absolutely convergent integral on the fixed positive left line. -/ +theorem integral_psi_eq_main_sub_zero_sum_add_integral (hRH : RiemannHypothesis) + {x : ℝ} (hx : 1 ≤ x) : + ((∫ v in (0 : ℝ)..x, Chebyshev.psi v : ℝ) : ℂ) = + (x : ℂ) ^ (2 : ℕ) / 2 - + (∑' ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re}, + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * (x : ℂ) ^ ((ρ : ℂ) + 1) / + ((ρ : ℂ) * ((ρ : ℂ) + 1))) + + (2 * (Real.pi : ℂ))⁻¹ * ∫ u : ℝ, + -logDeriv riemannZeta ((9 / 20 : ℂ) + u * I) * + (x : ℂ) ^ ((9 / 20 : ℂ) + u * I + 1) / + (((9 / 20 : ℂ) + u * I) * ((9 / 20 : ℂ) + u * I + 1)) := by + have hx₀ : 0 < x := by linarith + have hxne : (x : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hx₀.ne' + let f : ℂ → ℂ := fun s ↦ + -logDeriv riemannZeta s * (x : ℂ) ^ (s + 1) / (s * (s + 1)) + let R := ∫ u : ℝ, f (2 + u * I) + let L := ∫ u : ℝ, f ((9 / 20 : ℂ) + u * I) + let Z := ∑' ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re}, + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * (x : ℂ) ^ ((ρ : ℂ) + 1) / + ((ρ : ℂ) * ((ρ : ℂ) + 1)) + have hR : R = (∫ u : ℝ, + (-deriv riemannZeta (2 + u * I) / riemannZeta (2 + u * I)) * + (x : ℂ) ^ ((2 : ℂ) + u * I) / + (((2 : ℂ) + u * I) * ((2 : ℂ) + u * I + 1))) * x := by + rw [← integral_mul_const] + apply integral_congr_ae + exact Eventually.of_forall fun u ↦ by + dsimp only [f] + rw [logDeriv_apply, cpow_add _ _ hxne, cpow_one] + ring + have hpsi : ((∫ v in (0 : ℝ)..x, Chebyshev.psi v : ℝ) : ℂ) = + (2 * (Real.pi : ℂ))⁻¹ * R := by + rw [Chebyshev.integral_psi_eq_integral hx₀ (by norm_num : (1 : ℝ) < 2), hR] + push_cast + ring + have hshift : R - L = 2 * Real.pi * ((x : ℂ) ^ (2 : ℕ) / 2 - Z) := + hRH.integral_riesz_right_sub_left_eq_zero_sum hx + have hpi : (2 * (Real.pi : ℂ)) ≠ 0 := by + exact_mod_cast mul_ne_zero (two_ne_zero : (2 : ℝ) ≠ 0) Real.pi_ne_zero + change _ = (x : ℂ) ^ (2 : ℕ) / 2 - Z + (2 * (Real.pi : ℂ))⁻¹ * L + rw [hpsi] + calc + (2 * (Real.pi : ℂ))⁻¹ * R = (2 * (Real.pi : ℂ))⁻¹ * ((R - L) + L) := by ring + _ = (2 * (Real.pi : ℂ))⁻¹ * + (2 * Real.pi * ((x : ℂ) ^ (2 : ℕ) / 2 - Z) + L) := by rw [hshift] + _ = (x : ℂ) ^ (2 : ℕ) / 2 - Z + (2 * (Real.pi : ℂ))⁻¹ * L := by + rw [mul_add, inv_mul_cancel_left₀ hpi] + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroCount.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroCount.lean new file mode 100644 index 000000000..28f31f655 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroCount.lean @@ -0,0 +1,261 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +public import TauCeti.Analysis.Meromorphic.Counting.Basic +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Bounds +import TauCeti.Analysis.Meromorphic.Counting.Jensen +import TauCeti.Analysis.Analytic.IsolatedZeros +import TauCeti.NumberTheory.LSeries.RiemannZeta +import Mathlib.Tactic.Lemma + +/-! +# Local zero counts for the Riemann zeta function + +Jensen's inequality gives an unconditional logarithmic bound for the zeros in the disk +of radius `8 / 5` about `2 + I * t`, when `3 ≤ |t|`. Multiplicities are the positive +meromorphic divisor values in `TauCeti.zeroCount`. On these disks zeta is analytic and +somewhere nonzero, so the divisor counts its ordinary finite orders of vanishing. + +The inner disk contains every zero of zeta with `1 / 2 ≤ Re ρ` and +`|Im ρ - t| ≤ 2 / 5`: nonvanishing on `Re s ≥ 1` also gives `Re ρ < 1`. +This is the right-half-plane step of the classical fixed-width zero-count estimate. +The proof uses the fractional-part growth bound and the Möbius Dirichlet series for +`1 / ζ`, followed directly by Tau Ceti's multiplicity-preserving Jensen theorem. + +## References + +* H. Davenport, *Multiplicative Number Theory*, 3rd ed., Chapter 15. +* The zero-window argument in + [Dudek2014, revision `da5cf9edad7896290771dfcab8feee2906399e3d`](https://github.com/sthubbar/goldbach-lean/blob/da5cf9edad7896290771dfcab8feee2906399e3d/entries/dudek2014/LeanLab/PNTPort/ZetaZeros/Count.lean). + The present proof uses the existing divisor APIs and a different disk centre. +-/ + +public section + +open Complex Metric Set + +namespace TauCeti + +/-- Absolute convergence of the Möbius series bounds the reciprocal of zeta. -/ +theorem norm_inv_riemannZeta_le {s : ℂ} (hs : 1 < s.re) : + ‖(riemannZeta s)⁻¹‖ ≤ (riemannZeta s.re).re := by + have hμ : LSeriesSummable (fun n ↦ (ArithmeticFunction.moebius n : ℂ)) s := + ArithmeticFunction.LSeriesSummable_moebius_iff.mpr hs + have hsum := hasSum_nat_rpow_neg_riemannZeta_re hs + have hterm (n : ℕ) : + ‖LSeries.term (fun k ↦ (ArithmeticFunction.moebius k : ℂ)) s n‖ ≤ + (n : ℝ) ^ (-s.re) := by + by_cases hn : n = 0 + · subst n + simp [Real.zero_rpow (by linarith : -s.re ≠ 0)] + · rw [LSeries.norm_term_eq, ite_eq_right hn, Real.rpow_neg (Nat.cast_nonneg n)] + have hμn : ‖(ArithmeticFunction.moebius n : ℂ)‖ ≤ 1 := by + norm_cast + exact ArithmeticFunction.abs_moebius_le_one + simpa only [one_div] using + div_le_div_of_nonneg_right hμn (Real.rpow_nonneg (Nat.cast_nonneg n) s.re) + have hbound : ‖LSeries (fun n ↦ (ArithmeticFunction.moebius n : ℂ)) s‖ ≤ + (riemannZeta s.re).re := by + calc + _ ≤ ∑' n, ‖LSeries.term (fun k ↦ (ArithmeticFunction.moebius k : ℂ)) s n‖ := + norm_tsum_le_tsum_norm hμ.norm + _ ≤ ∑' n : ℕ, (n : ℝ) ^ (-s.re) := + hμ.norm.tsum_le_tsum hterm hsum.summable + _ = _ := hsum.tsum_eq + have hprod := LSeries_one_mul_Lseries_moebius hs + rw [LSeries_one_eq_riemannZeta hs] at hprod + have hnorm := congrArg norm hprod + rw [norm_mul, norm_one] at hnorm + have hpos : 0 < ‖riemannZeta s‖ := + norm_pos_iff.mpr (riemannZeta_ne_zero_of_one_lt_re hs) + rw [norm_inv, ← one_div, div_le_iff₀ hpos] + nlinarith [mul_le_mul_of_nonneg_left hbound (norm_nonneg (riemannZeta s))] + +private def zeroCountCenter (t : ℝ) : ℂ := 2 + I * t + +/-- On the vertical line through `2`, the norm of zeta is at least `1 / 2`. -/ +theorem half_le_norm_riemannZeta_two_add_mul_I (t : ℝ) : + 1 / 2 ≤ ‖riemannZeta (2 + I * t)‖ := by + have hc : 1 < (zeroCountCenter t).re := by simp [zeroCountCenter] + have hi : ‖riemannZeta (zeroCountCenter t)‖⁻¹ ≤ 2 := by + have h : ‖(riemannZeta (zeroCountCenter t))⁻¹‖ ≤ (riemannZeta (2 : ℂ)).re := by + simpa [zeroCountCenter] using norm_inv_riemannZeta_le hc + simpa only [norm_inv] using h.trans + (riemannZeta_re_le_two (s := (2 : ℂ)) (by norm_num)) + have hp : 0 < ‖riemannZeta (zeroCountCenter t)‖ := + norm_pos_iff.mpr (riemannZeta_ne_zero_of_one_lt_re hc) + have hm : 1 ≤ 2 * ‖riemannZeta (zeroCountCenter t)‖ := + (div_le_iff₀ hp).mp (by simpa only [one_div] using hi) + change 1 / 2 ≤ ‖riemannZeta (zeroCountCenter t)‖ + linarith + +private lemma zeta_disc_geometry {t : ℝ} (ht : 3 ≤ |t|) {s : ℂ} + (hs : s ∈ closedBall (zeroCountCenter t) (7 / 4)) : + 1 / 4 ≤ s.re ∧ 1 ≤ ‖s - 1‖ ∧ ‖s‖ ≤ |t| + 4 := by + have hd : ‖s - zeroCountCenter t‖ ≤ 7 / 4 := by + simpa only [mem_closedBall, dist_eq_norm] using hs + have hre : |s.re - 2| ≤ 7 / 4 := by + simpa [zeroCountCenter] using (abs_re_le_norm (s - zeroCountCenter t)).trans hd + have him : |s.im - t| ≤ 7 / 4 := by + simpa [zeroCountCenter] using (abs_im_le_norm (s - zeroCountCenter t)).trans hd + have ht' : |t| ≤ |s.im| + 7 / 4 := by + calc + |t| = |s.im - (s.im - t)| := by congr 1; ring + _ ≤ |s.im| + |s.im - t| := abs_sub _ _ + _ ≤ |s.im| + 7 / 4 := by gcongr + have hs1 : |s.im| ≤ ‖s - 1‖ := by simpa using abs_im_le_norm (s - 1) + have hc : ‖zeroCountCenter t‖ ≤ 2 + |t| := by + simpa [zeroCountCenter, norm_mul] using norm_add_le (2 : ℂ) (I * t) + have hn : ‖s‖ ≤ |t| + 4 := by + calc + ‖s‖ = ‖(s - zeroCountCenter t) + zeroCountCenter t‖ := by rw [sub_add_cancel] + _ ≤ ‖s - zeroCountCenter t‖ + ‖zeroCountCenter t‖ := norm_add_le _ _ + _ ≤ 7 / 4 + (2 + |t|) := add_le_add hd hc + _ ≤ |t| + 4 := by linarith + exact ⟨by linarith [(abs_le.mp hre).1], by linarith, hn⟩ + +/-- Zeta is analytic on the fixed outer disks used for counting and local partial fractions. -/ +theorem analyticOnNhd_riemannZeta_closedBall {t : ℝ} (ht : 3 ≤ |t|) : + AnalyticOnNhd ℂ riemannZeta (closedBall (2 + I * t) (7 / 4)) := by + intro s hs + apply analyticOn_riemannZeta + change s ≠ 1 + intro h + have hh := (zeta_disc_geometry ht hs).2.1 + norm_num [h] at hh + +/-- A linear height bound for zeta on the fixed outer disks. -/ +theorem norm_riemannZeta_le_on_closedBall {t : ℝ} (ht : 3 ≤ |t|) {s : ℂ} + (hs : s ∈ closedBall (2 + I * t) (7 / 4)) : + ‖riemannZeta s‖ ≤ 18 + 4 * |t| := by + obtain ⟨hre, h1, hn⟩ := zeta_disc_geometry ht hs + have hpos : 0 < s.re := by linarith + have hi : ‖s - 1‖⁻¹ ≤ 1 := by + simpa only [one_div, inv_one] using + one_div_le_one_div_of_le (by norm_num : (0 : ℝ) < 1) h1 + have hq : ‖s‖ / s.re ≤ 4 * (|t| + 4) := by + rw [div_le_iff₀ hpos] + nlinarith [abs_nonneg t] + have hz := norm_riemannZeta_le_of_re_pos hpos + linarith + +/-- Relative zeta bounds on the fixed outer circles have logarithmic height growth. -/ +theorem exists_riemannZeta_relative_bound_log : ∃ C : ℝ, 0 < C ∧ + ∀ t : ℝ, 3 ≤ |t| → ∃ M : ℝ, 1 ≤ M ∧ Real.log M ≤ C * Real.log |t| ∧ + ∀ w ∈ sphere (2 + I * t) (7 / 4), + ‖riemannZeta w‖ ≤ M * ‖riemannZeta (2 + I * t)‖ := by + have h3 : 0 < Real.log 3 := Real.log_pos (by norm_num) + have h20 : 0 < Real.log 20 := Real.log_pos (by norm_num) + refine ⟨1 + Real.log 20 / Real.log 3, by positivity, fun t ht ↦ + ⟨36 + 8 * |t|, by linarith [abs_nonneg t], ?_, ?_⟩⟩ + · have ht0 : 0 < |t| := by linarith + have hlt : Real.log 3 ≤ Real.log |t| := Real.log_le_log (by norm_num) ht + have hconstant : Real.log 20 ≤ Real.log 20 / Real.log 3 * Real.log |t| := by + rw [div_mul_eq_mul_div, le_div_iff₀ h3] + exact mul_le_mul_of_nonneg_left hlt h20.le + calc + _ ≤ Real.log (20 * |t|) := Real.log_le_log (by positivity) (by linarith) + _ = Real.log 20 + Real.log |t| := Real.log_mul (by norm_num) ht0.ne' + _ ≤ _ := by nlinarith + · intro w hw + have hw' := norm_riemannZeta_le_on_closedBall ht (sphere_subset_closedBall hw) + have hc := mul_le_mul_of_nonneg_left (half_le_norm_riemannZeta_two_add_mul_I t) + (by positivity : 0 ≤ 36 + 8 * |t|) + nlinarith + +/-- The sum of the analytic divisor multiplicities in the inner disks is logarithmic in height. -/ +theorem exists_sum_divisor_riemannZeta_le_log : ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, 3 ≤ |t| → + ((∑ᶠ ρ, MeromorphicOn.divisor riemannZeta + (closedBall (2 + I * t) (8 / 5)) ρ : ℤ) : ℝ) ≤ C * Real.log |t| := by + have hden : 0 < Real.log (35 / 32) := Real.log_pos (by norm_num) + obtain ⟨C, hC, hbound⟩ := exists_riemannZeta_relative_bound_log + refine ⟨C / Real.log (35 / 32), div_pos hC hden, fun t ht ↦ ?_⟩ + obtain ⟨M, _, hlog, hM⟩ := hbound t ht + have hf := analyticOnNhd_riemannZeta_closedBall ht + have hj := hf.sum_divisor_le_log_div_log (r := 8 / 5) (by norm_num) (by norm_num) + (riemannZeta_ne_zero_of_one_lt_re (by simp)) hM + rw [show (7 / 4 : ℝ) / (8 / 5) = 35 / 32 by norm_num] at hj + rw [div_mul_eq_mul_div] + exact hj.trans (div_le_div_of_nonneg_right hlog hden.le) + +/-- Zeta has only finitely many zeros in the disks used for the local count. -/ +theorem finite_zeros_riemannZeta_closedBall {t : ℝ} (ht : 3 ≤ |t|) : + {z ∈ closedBall (2 + I * t) (8 / 5) | riemannZeta z = 0}.Finite := by + have hf := analyticOnNhd_riemannZeta_closedBall ht + exact hf.finite_setOf_mem_and_eq_zero_of_isCompact + (convex_closedBall _ _).isPreconnected (mem_closedBall_self (by norm_num)) + (riemannZeta_ne_zero_of_one_lt_re (by simp)) + (isCompact_closedBall _ _) (closedBall_subset_closedBall (by norm_num)) + +/-- An explicit Jensen bound for the zeros in a fixed disk, counted with multiplicity. -/ +theorem zeroCount_riemannZeta_closedBall_le {t : ℝ} (ht : 3 ≤ |t|) : + (zeroCount riemannZeta (closedBall (2 + I * t) (7 / 4)) + (closedBall (2 + I * t) (8 / 5)) : ℝ) ≤ + Real.log (20 * |t|) / Real.log (35 / 32) := by + have hf := analyticOnNhd_riemannZeta_closedBall ht + have hc : riemannZeta (zeroCountCenter t) ≠ 0 := + riemannZeta_ne_zero_of_one_lt_re (by simp [zeroCountCenter]) + have hj := hf.zeroCount_le (r := 8 / 5) (by norm_num) (by norm_num) + (by linarith [abs_nonneg t] : 1 ≤ 18 + 4 * |t|) hc + (fun s hs ↦ norm_riemannZeta_le_on_closedBall ht (sphere_subset_closedBall hs)) + (closedBall (zeroCountCenter t) (7 / 4)) Subset.rfl + have hp : 0 < ‖riemannZeta (zeroCountCenter t)‖ := norm_pos_iff.mpr hc + have hq : (18 + 4 * |t|) / ‖riemannZeta (zeroCountCenter t)‖ ≤ 20 * |t| := by + rw [div_le_iff₀ hp] + dsimp [zeroCountCenter] + nlinarith [half_le_norm_riemannZeta_two_add_mul_I t] + have hlog : Real.log ((18 + 4 * |t|) / ‖riemannZeta (zeroCountCenter t)‖) ≤ + Real.log (20 * |t|) := Real.log_le_log (by positivity) hq + have hden : 0 < Real.log (35 / 32) := Real.log_pos (by norm_num) + have heq : (7 / 4 : ℝ) / (8 / 5) = 35 / 32 := by norm_num + rw [heq] at hj + exact hj.trans (div_le_div_of_nonneg_right hlog hden.le) + +/-- The multiplicity count in fixed disks at height `t` is `O(log |t|)`, unconditionally. -/ +theorem exists_zeroCount_riemannZeta_closedBall_le_log : ∃ C : ℝ, 0 < C ∧ + ∀ t : ℝ, 3 ≤ |t| → + (zeroCount riemannZeta (closedBall (2 + I * t) (7 / 4)) + (closedBall (2 + I * t) (8 / 5)) : ℝ) ≤ C * Real.log |t| := by + have h3 : 0 < Real.log 3 := Real.log_pos (by norm_num) + have h20 : 0 < Real.log 20 := Real.log_pos (by norm_num) + have hd : 0 < Real.log (35 / 32) := Real.log_pos (by norm_num) + refine ⟨(1 + Real.log 20 / Real.log 3) / Real.log (35 / 32), by positivity, + fun t ht ↦ (zeroCount_riemannZeta_closedBall_le ht).trans ?_⟩ + have ht0 : 0 < |t| := by linarith + have hlt : Real.log 3 ≤ Real.log |t| := Real.log_le_log (by norm_num) ht + have hconstant : Real.log 20 ≤ Real.log 20 / Real.log 3 * Real.log |t| := by + rw [div_mul_eq_mul_div, le_div_iff₀ h3] + exact mul_le_mul_of_nonneg_left hlt h20.le + rw [Real.log_mul (by norm_num : (20 : ℝ) ≠ 0) ht0.ne'] + rw [div_mul_eq_mul_div] + exact div_le_div_of_nonneg_right (by nlinarith) hd.le + +/-- The total order of vanishing on any finite subset of the inner disk has a uniform +logarithmic height bound. The subset need not consist only of zeros. -/ +theorem exists_sum_analyticOrderNatAt_riemannZeta_le_log : ∃ C : ℝ, 0 < C ∧ + ∀ t : ℝ, 3 ≤ |t| → ∀ (S : Set ℂ) (hfin : S.Finite), + S ⊆ closedBall (2 + I * t) (8 / 5) → + (∑ ρ ∈ hfin.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ C * Real.log |t| := by + obtain ⟨C, hC, hcount⟩ := exists_sum_divisor_riemannZeta_le_log + refine ⟨C, hC, fun t ht S hfin hS ↦ ?_⟩ + have hf : AnalyticOnNhd ℂ riemannZeta (closedBall (2 + I * t) (8 / 5)) := + (analyticOnNhd_riemannZeta_closedBall ht).mono (closedBall_subset_closedBall (by norm_num)) + have hz : (zeroCount riemannZeta (closedBall (2 + I * t) (8 / 5)) S : ℝ) ≤ + ((∑ᶠ ρ, MeromorphicOn.divisor riemannZeta + (closedBall (2 + I * t) (8 / 5)) ρ : ℤ) : ℝ) := by + exact_mod_cast hf.zeroCount_le_finsum_divisor (isCompact_closedBall _ _) _ hS + have heq : (zeroCount riemannZeta (closedBall (2 + I * t) (8 / 5)) S : ℝ) = + ∑ ρ ∈ hfin.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ) := by + rw [zeroCount_def, finsum_mem_eq_finite_toFinset_sum _ hfin, Nat.cast_sum] + refine Finset.sum_congr rfl fun ρ hρ ↦ ?_ + have hmem := hS (hfin.mem_toFinset.mp hρ) + rw [hf.meromorphicOn.divisor_eq_analyticOrderNatAt (hf ρ hmem) hmem, Int.toNat_natCast] + rw [heq] at hz + exact hz.trans (hcount t ht) + +end TauCeti diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroDifference.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroDifference.lean new file mode 100644 index 000000000..24817c488 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroDifference.lean @@ -0,0 +1,143 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import Mathlib.NumberTheory.LSeries.Nonvanishing +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSumBounds +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifference +import Mathlib.Analysis.Normed.Group.InfiniteSum + +/-! +# Finite differences of the multiplicity-weighted zeta zero series + +The reciprocal-norm bound controls the head, and the quadratic-denominator +bound controls the tail. The cutoff is an arbitrary integer at least four. +The estimates apply to forward and backward differences on the same +multiplicative neighborhood, with no simplicity assumption on the zeros. +-/ + +public section + +open Complex Set + +namespace RiemannHypothesis + +private theorem sum_order_mul_norm_le {K A B : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) + (N : ℕ) (F : ℂ → ℂ) + (hhead : ∀ s : Finset ℂ, (∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ |ρ.im| ≤ N) → + ∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖ ≤ K * (1 + Real.log N) ^ 2) + (htail : ∀ s : Finset ℂ, (∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ (N : ℝ) < |ρ.im|) → + ∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ * (ρ + 1)‖ ≤ + K * ((1 + Real.log N) / N)) + (s : Finset ℂ) (hs : ∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re) + (hF : ∀ ρ ∈ s, ‖F ρ‖ ≤ A / ‖ρ‖ ∧ ‖F ρ‖ ≤ B / ‖ρ * (ρ + 1)‖) : + ∑ ρ ∈ s, ‖(analyticOrderNatAt riemannZeta ρ : ℂ) * F ρ‖ ≤ + K * (A * (1 + Real.log N) ^ 2 + B * ((1 + Real.log N) / N)) := by + classical + let lo := s.filter (fun ρ ↦ |ρ.im| ≤ (N : ℝ)) + let hi := s.filter (fun ρ ↦ ¬ |ρ.im| ≤ (N : ℝ)) + have hlo : (∑ ρ ∈ lo, ‖(analyticOrderNatAt riemannZeta ρ : ℂ) * F ρ‖) ≤ + A * (K * (1 + Real.log N) ^ 2) := by + calc + _ ≤ ∑ ρ ∈ lo, A * ((analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖) := by + apply Finset.sum_le_sum + intro ρ hρ + have hρs := (Finset.mem_filter.mp hρ).1 + rw [norm_mul, Complex.norm_natCast] + calc + _ ≤ (analyticOrderNatAt riemannZeta ρ : ℝ) * (A / ‖ρ‖) := + mul_le_mul_of_nonneg_left (hF ρ hρs).1 (Nat.cast_nonneg _) + _ = _ := by ring + _ = A * ∑ ρ ∈ lo, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖ := by rw [Finset.mul_sum] + _ ≤ _ := mul_le_mul_of_nonneg_left (hhead lo (by + intro ρ hρ + obtain ⟨hρs, hheight⟩ := Finset.mem_filter.mp hρ + exact ⟨(hs ρ hρs).1, (hs ρ hρs).2, hheight⟩)) hA + have hhi : (∑ ρ ∈ hi, ‖(analyticOrderNatAt riemannZeta ρ : ℂ) * F ρ‖) ≤ + B * (K * ((1 + Real.log N) / N)) := by + calc + _ ≤ ∑ ρ ∈ hi, B * ((analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ * (ρ + 1)‖) := by + apply Finset.sum_le_sum + intro ρ hρ + have hρs := (Finset.mem_filter.mp hρ).1 + rw [norm_mul, Complex.norm_natCast] + calc + _ ≤ (analyticOrderNatAt riemannZeta ρ : ℝ) * (B / ‖ρ * (ρ + 1)‖) := + mul_le_mul_of_nonneg_left (hF ρ hρs).2 (Nat.cast_nonneg _) + _ = _ := by ring + _ = B * ∑ ρ ∈ hi, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ * (ρ + 1)‖ := by + rw [Finset.mul_sum] + _ ≤ _ := mul_le_mul_of_nonneg_left (htail hi (by + intro ρ hρ + obtain ⟨hρs, hheight⟩ := Finset.mem_filter.mp hρ + exact ⟨(hs ρ hρs).1, (hs ρ hρs).2, lt_of_not_ge hheight⟩)) hB + rw [← Finset.sum_filter_add_sum_filter_not s (fun ρ ↦ |ρ.im| ≤ N)] + change (∑ ρ ∈ lo, _) + (∑ ρ ∈ hi, _) ≤ _ + calc + _ ≤ A * (K * (1 + Real.log N) ^ 2) + B * (K * ((1 + Real.log N) / N)) := + add_le_add hlo hhi + _ = _ := by ring + +/-- Under RH, all finite differences on a multiplicative neighborhood have a summable +multiplicity-weighted zero series, with a quantitative head/tail estimate. -/ +theorem exists_tsum_norm_riemannZeta_difference_le (hRH : RiemannHypothesis) : + ∃ K : ℝ, 0 < K ∧ ∀ N : ℕ, 4 ≤ N → ∀ x h y z : ℝ, + 0 < x → 0 < h → y ∈ Icc (x / 2) (2 * x) → z ∈ Icc (x / 2) (2 * x) → + |y - z| ≤ h → + let f := fun ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} ↦ + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * + (((y : ℂ) ^ ((ρ : ℂ) + 1) / ((ρ : ℂ) * ((ρ : ℂ) + 1)) - + (z : ℂ) ^ ((ρ : ℂ) + 1) / ((ρ : ℂ) * ((ρ : ℂ) + 1))) / (h : ℂ)) + Summable (fun ρ ↦ ‖f ρ‖) ∧ + (∑' ρ, ‖f ρ‖) ≤ K * (2 * x ^ (1 / 2 : ℝ) * (1 + Real.log N) ^ 2 + + (8 * x ^ (3 / 2 : ℝ) / h) * ((1 + Real.log N) / N)) := by + classical + obtain ⟨K, hK, hbound⟩ := hRH.exists_sum_riemannZeta_order_head_tail_le + refine ⟨K, hK, fun N hN x h y z hx hh hy hz hyz ↦ ?_⟩ + dsimp only + let F (ρ : ℂ) : ℂ := + ((y : ℂ) ^ (ρ + 1) / (ρ * (ρ + 1)) - (z : ℂ) ^ (ρ + 1) / (ρ * (ρ + 1))) / (h : ℂ) + let Z := {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} + let e : Z ↪ ℂ := ⟨Subtype.val, Subtype.val_injective⟩ + let A : ℝ := 2 * x ^ (1 / 2 : ℝ) + let B : ℝ := 8 * x ^ (3 / 2 : ℝ) / h + have hfinite (u : Finset Z) : + (∑ ρ ∈ u, ‖(analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * F ρ‖) ≤ + K * (A * (1 + Real.log N) ^ 2 + B * ((1 + Real.log N) / N)) := by + have hs : ∀ ρ ∈ u.map e, riemannZeta ρ = 0 ∧ 0 < ρ.re := by + intro ρ hρ + obtain ⟨a, _, rfl⟩ := Finset.mem_map.mp hρ + exact a.property + have hf : ∀ ρ ∈ u.map e, ‖F ρ‖ ≤ A / ‖ρ‖ ∧ ‖F ρ‖ ≤ B / ‖ρ * (ρ + 1)‖ := by + intro ρ hρ + have hzeta := hs ρ hρ + have hρ1 : ρ ≠ 1 := by + intro heq + exact riemannZeta_one_ne_zero (heq ▸ hzeta.1) + have hhalf := hRH.re_eq_half_of_riemannZeta_eq_zero_of_re_pos hzeta.2 hzeta.1 hρ1 + have hm := norm_sub_cpow_div_mul_add_one_div_le_min (s := ρ) hx hh + (by rw [hhalf]; norm_num) (by rw [hhalf]; norm_num) hy hz hyz + have hm' := le_min_iff.mp hm + constructor + · simpa only [F, A, hhalf] using hm'.1 + · calc + ‖F ρ‖ ≤ 8 * x ^ (ρ.re + 1) / (h * ‖ρ‖ * ‖ρ + 1‖) := hm'.2 + _ = B / ‖ρ * (ρ + 1)‖ := by + rw [hhalf, norm_mul] + norm_num only [show (1 / 2 : ℝ) + 1 = 3 / 2 by norm_num] + dsimp [B] + ring + have hh' := sum_order_mul_norm_le (K := K) (A := A) (B := B) + (by dsimp [A]; positivity) (by dsimp [B]; positivity) + N F (hbound N hN).1 (hbound N hN).2 (u.map e) hs hf + simpa [e] using hh' + exact ⟨summable_of_sum_le (fun ρ ↦ norm_nonneg _) hfinite, + Real.tsum_le_of_sum_le (fun ρ ↦ norm_nonneg _) hfinite⟩ + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroDifferenceSqrt.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroDifferenceSqrt.lean new file mode 100644 index 000000000..cc6571580 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroDifferenceSqrt.lean @@ -0,0 +1,114 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroDifference +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Algebra.Order.Floor.Ring + +/-! +# Square-root-step bounds for the zeta zero contribution under RH + +Taking step `sqrt x` and cutoff `ceil (sqrt x) + 4` in the head/tail estimate +bounds the complete zero contribution by `C * sqrt x * log(x)^2` for `25 ≤ x`. +The statement covers both forward and backward differences. +-/ + +public section + +open Complex Set + +namespace RiemannHypothesis + +private theorem sqrt_cutoff_bounds {x : ℝ} (hx : 25 ≤ x) : + 0 < Real.sqrt x ∧ 4 ≤ ⌈Real.sqrt x⌉₊ + 4 ∧ + Real.sqrt x ≤ (⌈Real.sqrt x⌉₊ + 4 : ℕ) ∧ + ((⌈Real.sqrt x⌉₊ + 4 : ℕ) : ℝ) ≤ x ∧ 1 ≤ Real.log x := by + have hx0 : 0 ≤ x := by linarith + have ht5 : 5 ≤ Real.sqrt x := Real.le_sqrt_of_sq_le (by norm_num; exact hx) + have ht0 : 0 < Real.sqrt x := by linarith + have hsq := Real.sq_sqrt hx0 + have hc := Nat.ceil_lt_add_one (Real.sqrt_nonneg x) + have hceil : Real.sqrt x ≤ (⌈Real.sqrt x⌉₊ : ℝ) := Nat.le_ceil _ + have hlog : 1 ≤ Real.log x := by + have he : Real.exp 1 ≤ x := by linarith [Real.exp_one_lt_three] + simpa only [Real.log_exp] using Real.log_le_log (Real.exp_pos 1) he + refine ⟨ht0, by lia, ?_, ?_, hlog⟩ + · push_cast + linarith + · push_cast + nlinarith + +private theorem sqrt_cutoff_expression_le {x : ℝ} (hx : 25 ≤ x) : + let N := ⌈Real.sqrt x⌉₊ + 4 + 2 * x ^ (1 / 2 : ℝ) * (1 + Real.log N) ^ 2 + + (8 * x ^ (3 / 2 : ℝ) / Real.sqrt x) * ((1 + Real.log N) / N) ≤ + 40 * (Real.sqrt x * Real.log x ^ 2) := by + dsimp only + let N := ⌈Real.sqrt x⌉₊ + 4 + obtain ⟨ht0, hN4, htN, hNx, hlog1⟩ := sqrt_cutoff_bounds hx + have hx0 : 0 ≤ x := by linarith + have hN0 : (0 : ℝ) < N := by exact_mod_cast (show 0 < N by dsimp [N]; lia) + have hlogN0 : 0 ≤ Real.log N := Real.log_natCast_nonneg N + have hlogNx : Real.log N ≤ Real.log x := Real.log_le_log hN0 hNx + have hhalf : x ^ (1 / 2 : ℝ) = Real.sqrt x := (Real.sqrt_eq_rpow x).symm + have hthree : x ^ (3 / 2 : ℝ) = Real.sqrt x ^ 3 := by + simpa using Real.rpow_div_two_eq_sqrt (3 : ℝ) hx0 + have hcoef : 8 * x ^ (3 / 2 : ℝ) / Real.sqrt x = 8 * x := by + rw [hthree] + calc + 8 * Real.sqrt x ^ 3 / Real.sqrt x = 8 * Real.sqrt x ^ 2 := by + field_simp + _ = 8 * x := by rw [Real.sq_sqrt hx0] + have hdiv : x / N ≤ Real.sqrt x := by + apply (div_le_iff₀ hN0).mpr + have hm := mul_le_mul_of_nonneg_left htN ht0.le + simpa only [Real.mul_self_sqrt hx0] using hm + have hlogSq : (1 + Real.log N) ^ 2 ≤ (1 + Real.log x) ^ 2 := + pow_le_pow_left₀ (by linarith) (by linarith) 2 + have hhead : 2 * Real.sqrt x * (1 + Real.log N) ^ 2 ≤ + 2 * Real.sqrt x * (1 + Real.log x) ^ 2 := + mul_le_mul_of_nonneg_left hlogSq (by positivity) + have htail : (8 * x) * ((1 + Real.log N) / N) ≤ + 8 * Real.sqrt x * (1 + Real.log x) ^ 2 := by + calc + _ = 8 * (x / N) * (1 + Real.log N) := by ring + _ ≤ 8 * Real.sqrt x * (1 + Real.log x) := by gcongr + _ ≤ 8 * Real.sqrt x * (1 + Real.log x) ^ 2 := + mul_le_mul_of_nonneg_left (by nlinarith : + 1 + Real.log x ≤ (1 + Real.log x) ^ 2) (by positivity) + have hlogs : (1 + Real.log x) ^ 2 ≤ 4 * Real.log x ^ 2 := by nlinarith + rw [hhalf, hcoef] + calc + _ ≤ 10 * Real.sqrt x * (1 + Real.log x) ^ 2 := by linarith + _ ≤ 10 * Real.sqrt x * (4 * Real.log x ^ 2) := + mul_le_mul_of_nonneg_left hlogs (by positivity) + _ = _ := by ring + +/-- Under RH, the multiplicity-weighted zero contribution to a square-root finite difference +is absolutely summable and bounded by `C sqrt(x) log(x)^2` for `25 ≤ x`. -/ +theorem exists_tsum_norm_riemannZeta_sqrt_difference_le (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ x y z : ℝ, 25 ≤ x → + y ∈ Icc (x / 2) (2 * x) → z ∈ Icc (x / 2) (2 * x) → |y - z| ≤ Real.sqrt x → + let f := fun ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} ↦ + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * + (((y : ℂ) ^ ((ρ : ℂ) + 1) / ((ρ : ℂ) * ((ρ : ℂ) + 1)) - + (z : ℂ) ^ ((ρ : ℂ) + 1) / ((ρ : ℂ) * ((ρ : ℂ) + 1))) / (Real.sqrt x : ℂ)) + Summable (fun ρ ↦ ‖f ρ‖) ∧ (∑' ρ, ‖f ρ‖) ≤ C * (Real.sqrt x * Real.log x ^ 2) := by + obtain ⟨K, hK, hbound⟩ := hRH.exists_tsum_norm_riemannZeta_difference_le + refine ⟨40 * K, by positivity, fun x y z hx hy hz hyz ↦ ?_⟩ + obtain ⟨ht0, hN4, _, _, _⟩ := sqrt_cutoff_bounds hx + have hb := hbound (⌈Real.sqrt x⌉₊ + 4) hN4 x (Real.sqrt x) y z + (by linarith) ht0 hy hz hyz + refine ⟨hb.1, hb.2.trans ?_⟩ + calc + _ ≤ K * (40 * (Real.sqrt x * Real.log x ^ 2)) := + mul_le_mul_of_nonneg_left (sqrt_cutoff_expression_le hx) hK.le + _ = _ := by ring + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroKernel.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroKernel.lean new file mode 100644 index 000000000..81051b600 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroKernel.lean @@ -0,0 +1,60 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.ZetaZeros +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSum +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +import Mathlib.Analysis.Normed.Group.InfiniteSum + +/-! +# Absolute convergence of the integrated zero kernel + +The norm is exactly `x^(3/2)` times the multiplicity-weighted reciprocal +quadratic denominator under RH. This is valid for every `x > 0`. +-/ + +public section + +open Complex + +namespace RiemannHypothesis + +/-- The norm of one integrated zero contribution under RH, with full analytic multiplicity. -/ +theorem norm_riemannZeta_order_mul_cpow_div (hRH : RiemannHypothesis) + {x : ℝ} (hx : 0 < x) {ρ : ℂ} (hz : riemannZeta ρ = 0) (hre : 0 < ρ.re) : + ‖(analyticOrderNatAt riemannZeta ρ : ℂ) * (x : ℂ) ^ (ρ + 1) / (ρ * (ρ + 1))‖ = + x ^ (3 / 2 : ℝ) * ((analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ * (ρ + 1)‖) := by + have hρ1 : ρ ≠ 1 := by + intro h + exact riemannZeta_one_ne_zero (h ▸ hz) + have hhalf := hRH.re_eq_half_of_riemannZeta_eq_zero_of_re_pos hre hz hρ1 + rw [norm_div, norm_mul, norm_natCast, norm_cpow_eq_rpow_re_of_pos hx, + add_re, one_re, hhalf] + norm_num + ring + +/-- The integrated nontrivial-zero series converges absolutely under RH. -/ +theorem summable_norm_riemannZeta_order_mul_cpow_div (hRH : RiemannHypothesis) + {x : ℝ} (hx : 0 < x) : + Summable (fun ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} ↦ + ‖(analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * (x : ℂ) ^ ((ρ : ℂ) + 1) / + ((ρ : ℂ) * ((ρ : ℂ) + 1))‖) := by + exact (hRH.summable_riemannZeta_order_div_norm_mul_add_one.mul_left + (x ^ (3 / 2 : ℝ))).congr (fun ρ ↦ + (hRH.norm_riemannZeta_order_mul_cpow_div hx ρ.property.1 ρ.property.2).symm) + +/-- The integrated nontrivial-zero series is summable under RH. -/ +theorem summable_riemannZeta_order_mul_cpow_div (hRH : RiemannHypothesis) + {x : ℝ} (hx : 0 < x) : + Summable (fun ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} ↦ + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℂ) * (x : ℂ) ^ ((ρ : ℂ) + 1) / + ((ρ : ℂ) * ((ρ : ℂ) + 1))) := + (hRH.summable_norm_riemannZeta_order_mul_cpow_div hx).of_norm + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroSum.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroSum.lean new file mode 100644 index 000000000..14c5de1e5 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroSum.lean @@ -0,0 +1,159 @@ +/- +Copyright (c) 2026 Steve Hubbard, RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Steve Hubbard, RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.ZetaZeros +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.Topology.Algebra.InfiniteSum.Real +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroWindow +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberMajorant +import RealRooted.Mathlib.Analysis.SpecialFunctions.Log.Weights +import Mathlib.Analysis.Normed.Group.InfiniteSum +import Mathlib.Algebra.Order.Floor.Ring + +/-! +# Absolute convergence of the integrated zeta zero series under RH + +Zeros are counted with their full analytic multiplicities. A band +`n - 1 < |Im ρ| ≤ n` is covered by the two fixed-width windows centered at +`n` and `-n`. The compact low-height part is finite unconditionally by +Mathlib's zeta-zero discreteness theorem. + +The unit-band argument follows Steve Hubbard's `goldbach-lean`, revision +`da5cf9edad7896290771dfcab8feee2906399e3d`, +`entries/dudek2014/LeanLab/PNTPort/ExplicitPsi1/ZeroSum.lean` (Apache-2.0). +-/ + +public section + +open Complex Set Filter + +namespace TauCeti + +/-- Positive-real-part zeta zeros below any fixed absolute height form a finite set. -/ +theorem finite_riemannZeta_pos_zero_height_le (T : ℝ) : + {ρ : ℂ | riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ |ρ.im| ≤ T}.Finite := by + have hc : IsCompact ((Icc (0 : ℝ) 1) ×ℂ Icc (-T) T) := + isCompact_Icc.reProdIm isCompact_Icc + apply hc.inter_riemannZetaZeros_finite.subset + intro ρ hρ + have hre : ρ.re < 1 := by + by_contra h + exact riemannZeta_ne_zero_of_one_le_re (not_lt.mp h) hρ.1 + exact ⟨⟨⟨hρ.2.1.le, hre.le⟩, abs_le.mp hρ.2.2⟩, hρ.1⟩ + +/-- The denominator of the once-integrated zero contribution dominates the square of its height. -/ +theorem sq_abs_im_le_norm_mul_add_one (ρ : ℂ) : |ρ.im| ^ 2 ≤ ‖ρ * (ρ + 1)‖ := by + rw [norm_mul, pow_two] + exact mul_le_mul (abs_im_le_norm ρ) + (by simpa using abs_im_le_norm (ρ + 1)) (abs_nonneg _) (norm_nonneg _) + +end TauCeti + +namespace RiemannHypothesis + +open TauCeti + +/-- The total multiplicity in an absolute unit-height band is logarithmically bounded under RH. -/ +theorem exists_sum_riemannZeta_order_band_le_log (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 4 ≤ n → ∀ s : Finset ℂ, + (∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ + (n : ℝ) - 1 < |ρ.im| ∧ |ρ.im| ≤ n) → + (∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ C * Real.log n := by + classical + obtain ⟨C, hC, hb⟩ := hRH.exists_sum_riemannZetaZeroWindow_order_wide_le_log + refine ⟨2 * C, by positivity, fun n hn s hs ↦ ?_⟩ + have hn4 : (4 : ℝ) ≤ n := by exact_mod_cast hn + obtain ⟨hp, hpb⟩ := hb n (by simpa using hn4) + obtain ⟨hm, hmb⟩ := hb (-(n : ℝ)) (by simpa using hn4) + have hsub : s ⊆ hp.toFinset ∪ hm.toFinset := by + intro ρ hρ + obtain ⟨hz, hre, hlo, hhi⟩ := hs ρ hρ + simp only [Finset.mem_union, Set.Finite.mem_toFinset, mem_riemannZetaZeroWindow] + by_cases hi : 0 ≤ ρ.im + · left + rw [abs_of_nonneg hi] at hlo hhi + exact ⟨hz, hre, abs_le.mpr ⟨by linarith, by linarith⟩⟩ + · right + rw [abs_of_neg (lt_of_not_ge hi)] at hlo hhi + exact ⟨hz, hre, abs_le.mpr ⟨by linarith, by linarith⟩⟩ + have hu := Finset.sum_union_inter (s₁ := hp.toFinset) (s₂ := hm.toFinset) + (f := fun ρ ↦ (analyticOrderNatAt riemannZeta ρ : ℝ)) + have hnonneg : 0 ≤ ∑ ρ ∈ hp.toFinset ∩ hm.toFinset, + (analyticOrderNatAt riemannZeta ρ : ℝ) := Finset.sum_nonneg (fun _ _ ↦ Nat.cast_nonneg _) + have hsum : (∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ + ∑ ρ ∈ hp.toFinset ∪ hm.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ) := + Finset.sum_le_sum_of_subset_of_nonneg hsub + (fun ρ _ _ ↦ Nat.cast_nonneg (analyticOrderNatAt riemannZeta ρ)) + simp only [abs_neg, abs_of_nonneg (show (0 : ℝ) ≤ n from Nat.cast_nonneg n)] at hpb hmb + linarith + +/-- Under RH the multiplicity-weighted once-integrated zeta zero series is absolutely summable. -/ +theorem summable_riemannZeta_order_div_norm_mul_add_one (hRH : RiemannHypothesis) : + Summable (fun ρ : {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} ↦ + (analyticOrderNatAt riemannZeta (ρ : ℂ) : ℝ) / ‖(ρ : ℂ) * ((ρ : ℂ) + 1)‖) := by + classical + let Z := {ρ : ℂ // riemannZeta ρ = 0 ∧ 0 < ρ.re} + let low : Set Z := {ρ | |(ρ : ℂ).im| ≤ 4} + have hlow : low.Finite := by + have hf := (finite_riemannZeta_pos_zero_height_le 4).preimage + (f := fun ρ : Z ↦ (ρ : ℂ)) Subtype.val_injective.injOn + apply hf.subset + intro ρ hρ + exact ⟨ρ.property.1, ρ.property.2, hρ⟩ + apply hlow.summable_compl_iff.mp + let H := (lowᶜ : Set Z) + let e : H ↪ ℂ := ⟨fun ρ ↦ ((ρ : Z) : ℂ), + fun a b hab ↦ Subtype.ext (Subtype.ext hab)⟩ + let bin (ρ : H) : ℕ := ⌈|(e ρ).im|⌉₊ + have hlarge (ρ : H) : 4 < |(e ρ).im| := lt_of_not_ge ρ.property + have hbin (ρ : H) : 5 ≤ bin ρ := by + have h4 : 4 < bin ρ := Nat.lt_ceil.mpr (by simpa using hlarge ρ) + lia + have hband (ρ : H) : (bin ρ : ℝ) - 1 < |(e ρ).im| ∧ |(e ρ).im| ≤ bin ρ := by + have hb5 := hbin ρ + have hb := (Nat.ceil_eq_iff (by lia : bin ρ ≠ 0)).mp (show ⌈|(e ρ).im|⌉₊ = bin ρ from rfl) + rw [Nat.cast_sub (by lia)] at hb + simpa only [Nat.cast_one] using hb + obtain ⟨C, hC, hb⟩ := hRH.exists_sum_riemannZeta_order_band_le_log + let w (ρ : H) : ℝ := analyticOrderNatAt riemannZeta (e ρ) + let v (ρ : H) : ℝ := w ρ / ‖e ρ * (e ρ + 1)‖ + let B (n : ℕ) : ℝ := C * Real.log n + let W (n : ℕ) : ℝ := (((n : ℝ) - 1) ^ 2)⁻¹ + change Summable v + apply summable_of_finite_fiber_majorant bin w v B W + · exact fun ρ ↦ by dsimp [v, w]; positivity + · exact fun n ↦ mul_nonneg hC.le (Real.log_natCast_nonneg n) + · exact fun n ↦ inv_nonneg.mpr (sq_nonneg _) + · intro ρ + have hn : (5 : ℝ) ≤ bin ρ := by exact_mod_cast hbin ρ + have hd : 0 < ((bin ρ : ℝ) - 1) ^ 2 := by nlinarith + have hden : ((bin ρ : ℝ) - 1) ^ 2 ≤ ‖e ρ * (e ρ + 1)‖ := by + calc + ((bin ρ : ℝ) - 1) ^ 2 ≤ |(e ρ).im| ^ 2 := + pow_le_pow_left₀ (by linarith) (hband ρ).1.le 2 + _ ≤ ‖e ρ * (e ρ + 1)‖ := sq_abs_im_le_norm_mul_add_one _ + exact div_le_div_of_nonneg_left (Nat.cast_nonneg _) hd hden + · intro n s hs + by_cases hn : 4 ≤ n + · have hh := hb n hn (s.map e) (by + intro ρ hρ + obtain ⟨a, ha, rfl⟩ := Finset.mem_map.mp hρ + have heq := hs a ha + exact ⟨a.val.property.1, a.val.property.2, by simpa [heq] using hband a⟩) + simpa only [Finset.sum_map] using hh + · have hempty : s = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro ρ hρ + have := hbin ρ + rw [hs ρ hρ] at this + lia + rw [hempty, Finset.sum_empty] + exact mul_nonneg hC.le (Real.log_natCast_nonneg n) + · simpa only [B, W, div_eq_mul_inv, mul_assoc] using + Real.summable_log_natCast_div_sub_one_sq.mul_left C + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroSumBounds.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroSumBounds.lean new file mode 100644 index 000000000..c0c178b87 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroSumBounds.lean @@ -0,0 +1,186 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSum +import RealRooted.Mathlib.Analysis.SpecialFunctions.Log.BandBounds +import Mathlib.Algebra.Order.Floor.Ring + +/-! +# Multiplicity-weighted head and tail estimates for zeta zeros under RH + +The finitely many zeros with absolute height at most four contribute a fixed +constant to the reciprocal-norm head. The high zeros are grouped into unit +bands. The quadratic-denominator tail has the sharp order `log N / N`. +-/ + +public section + +open Complex Set + +namespace RiemannHypothesis + +private theorem ceil_abs_im_bounds {ρ : ℂ} (hρ : 4 < |ρ.im|) : + 5 ≤ ⌈|ρ.im|⌉₊ ∧ + (⌈|ρ.im|⌉₊ : ℝ) / 2 ≤ ‖ρ‖ ∧ + (⌈|ρ.im|⌉₊ : ℝ) ^ 2 / 4 ≤ ‖ρ * (ρ + 1)‖ ∧ + (⌈|ρ.im|⌉₊ : ℝ) - 1 < |ρ.im| ∧ |ρ.im| ≤ ⌈|ρ.im|⌉₊ := by + have hn : 5 ≤ ⌈|ρ.im|⌉₊ := by + have : 4 < ⌈|ρ.im|⌉₊ := Nat.lt_ceil.mpr hρ + lia + have hc := Nat.ceil_lt_add_one (abs_nonneg ρ.im) + have hhalf : (⌈|ρ.im|⌉₊ : ℝ) / 2 ≤ |ρ.im| := by linarith + have hsq : (⌈|ρ.im|⌉₊ : ℝ) ^ 2 / 4 ≤ |ρ.im| ^ 2 := by + convert pow_le_pow_left₀ (by positivity : (0 : ℝ) ≤ (⌈|ρ.im|⌉₊ : ℝ) / 2) hhalf 2 using 1 + ring + exact ⟨hn, hhalf.trans (abs_im_le_norm ρ), + hsq.trans (TauCeti.sq_abs_im_le_norm_mul_add_one ρ), + by linarith, Nat.le_ceil _⟩ + +private theorem sum_order_div_norm_high_le {C : ℝ} (hC : 0 ≤ C) + (hb : ∀ n : ℕ, 4 ≤ n → ∀ s : Finset ℂ, + (∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ + (n : ℝ) - 1 < |ρ.im| ∧ |ρ.im| ≤ n) → + (∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ C * Real.log n) + (N : ℕ) (s : Finset ℂ) + (hs : ∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ 4 < |ρ.im| ∧ |ρ.im| ≤ N) : + ∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖ ≤ + 2 * C * (Real.log N * (1 + Real.log N)) := by + classical + apply Finset.sum_le_log_mul_one_add_log_of_fiber_bound s + (fun ρ ↦ ⌈|ρ.im|⌉₊) (fun ρ ↦ (analyticOrderNatAt riemannZeta ρ : ℝ)) + (fun ρ ↦ (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖) hC N + · intro ρ hρ + obtain ⟨_, _, hh, hN⟩ := hs ρ hρ + exact Finset.mem_Icc.mpr ⟨by have := (ceil_abs_im_bounds hh).1; lia, + Nat.ceil_le.mpr hN⟩ + · intro ρ hρ + have hc := ceil_abs_im_bounds (hs ρ hρ).2.2.1 + have hn : (0 : ℝ) < ⌈|ρ.im|⌉₊ := by exact_mod_cast lt_of_lt_of_le (by norm_num : 0 < 5) hc.1 + calc + (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖ ≤ + (analyticOrderNatAt riemannZeta ρ : ℝ) / ((⌈|ρ.im|⌉₊ : ℝ) / 2) := + div_le_div_of_nonneg_left (Nat.cast_nonneg _) (by positivity) hc.2.1 + _ = (analyticOrderNatAt riemannZeta ρ : ℝ) * (2 / (⌈|ρ.im|⌉₊ : ℝ)) := by + field_simp + · intro n hn + by_cases hn4 : 4 ≤ n + · apply hb n hn4 + intro ρ hρ + obtain ⟨hρs, heq⟩ := Finset.mem_filter.mp hρ + obtain ⟨hz, hre, hh, _⟩ := hs ρ hρs + exact ⟨hz, hre, by simpa only [heq] using (ceil_abs_im_bounds hh).2.2.2⟩ + · have hempty : s.filter (fun ρ ↦ ⌈|ρ.im|⌉₊ = n) = ∅ := by + apply Finset.eq_empty_iff_forall_notMem.mpr + intro ρ hρ + obtain ⟨hρs, heq⟩ := Finset.mem_filter.mp hρ + have hh := (ceil_abs_im_bounds (hs ρ hρs).2.2.1).1 + lia + rw [hempty, Finset.sum_empty] + exact mul_nonneg hC (Real.log_natCast_nonneg n) + +private theorem sum_order_div_norm_mul_add_one_tail_le {C : ℝ} (hC : 0 ≤ C) + (hb : ∀ n : ℕ, 4 ≤ n → ∀ s : Finset ℂ, + (∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ + (n : ℝ) - 1 < |ρ.im| ∧ |ρ.im| ≤ n) → + (∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ C * Real.log n) + {N : ℕ} (hN : 4 ≤ N) (s : Finset ℂ) + (hs : ∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ (N : ℝ) < |ρ.im|) : + ∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ * (ρ + 1)‖ ≤ + 4 * C * ((Real.log N + 2) / N) := by + classical + let bin (ρ : ℂ) : ℕ := ⌈|ρ.im|⌉₊ - (N + 1) + have hn4 : (4 : ℝ) ≤ N := by exact_mod_cast hN + have hceil (ρ : ℂ) (hρ : ρ ∈ s) : N + 1 ≤ ⌈|ρ.im|⌉₊ := by + have := Nat.lt_ceil.mpr (hs ρ hρ).2.2 + lia + have hbin (ρ : ℂ) (hρ : ρ ∈ s) : bin ρ + N + 1 = ⌈|ρ.im|⌉₊ := by + have := hceil ρ hρ + dsimp [bin] + lia + apply Finset.sum_le_log_add_div_of_fiber_bound s bin + (fun ρ ↦ (analyticOrderNatAt riemannZeta ρ : ℝ)) + (fun ρ ↦ (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ * (ρ + 1)‖) hC (by lia : 1 ≤ N) + · intro ρ hρ + have hc := ceil_abs_im_bounds (by linarith [(hs ρ hρ).2.2]) + have hn : (0 : ℝ) < ⌈|ρ.im|⌉₊ := by exact_mod_cast lt_of_lt_of_le (by norm_num : 0 < 5) hc.1 + have heq : (bin ρ : ℝ) + N + 1 = ⌈|ρ.im|⌉₊ := by exact_mod_cast hbin ρ hρ + rw [heq] + calc + (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ * (ρ + 1)‖ ≤ + (analyticOrderNatAt riemannZeta ρ : ℝ) / ((⌈|ρ.im|⌉₊ : ℝ) ^ 2 / 4) := + div_le_div_of_nonneg_left (Nat.cast_nonneg _) (by positivity) hc.2.2.1 + _ = (analyticOrderNatAt riemannZeta ρ : ℝ) * (4 / (⌈|ρ.im|⌉₊ : ℝ) ^ 2) := by + field_simp + · intro n hn + apply hb (n + N + 1) (by lia) + intro ρ hρ + obtain ⟨hρs, heq⟩ := Finset.mem_filter.mp hρ + obtain ⟨hz, hre, hh⟩ := hs ρ hρs + have hband := (ceil_abs_im_bounds (by linarith : 4 < |ρ.im|)).2.2.2 + have hceil' : ⌈|ρ.im|⌉₊ = n + N + 1 := by rw [← hbin ρ hρs, heq] + exact ⟨hz, hre, by simpa only [hceil'] using hband⟩ + +/-- A common positive constant bounds the reciprocal-norm head and quadratic-denominator tail +of every finite set of positive-real-part zeta zeros under RH, retaining multiplicities. -/ +theorem exists_sum_riemannZeta_order_head_tail_le (hRH : RiemannHypothesis) : + ∃ K : ℝ, 0 < K ∧ ∀ N : ℕ, 4 ≤ N → + (∀ s : Finset ℂ, (∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ |ρ.im| ≤ N) → + ∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖ ≤ K * (1 + Real.log N) ^ 2) ∧ + (∀ s : Finset ℂ, (∀ ρ ∈ s, riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ (N : ℝ) < |ρ.im|) → + ∑ ρ ∈ s, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ * (ρ + 1)‖ ≤ + K * ((1 + Real.log N) / N)) := by + classical + obtain ⟨C, hC, hb⟩ := hRH.exists_sum_riemannZeta_order_band_le_log + let low := (TauCeti.finite_riemannZeta_pos_zero_height_le 4).toFinset + let L : ℝ := ∑ ρ ∈ low, (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖ + have hL : 0 ≤ L := Finset.sum_nonneg (fun _ _ ↦ by positivity) + refine ⟨L + 8 * C + 1, by positivity, fun N hN ↦ ?_⟩ + have hlog : 0 ≤ Real.log N := Real.log_natCast_nonneg N + have hN0 : (0 : ℝ) < N := by exact_mod_cast (show 0 < N by lia) + constructor + · intro s hs + have hlo : (∑ ρ ∈ s.filter (fun ρ ↦ |ρ.im| ≤ 4), + (analyticOrderNatAt riemannZeta ρ : ℝ) / ‖ρ‖) ≤ L := by + apply Finset.sum_le_sum_of_subset_of_nonneg + · intro ρ hρ + obtain ⟨hρs, hheight⟩ := Finset.mem_filter.mp hρ + exact (TauCeti.finite_riemannZeta_pos_zero_height_le 4).mem_toFinset.mpr + ⟨(hs ρ hρs).1, (hs ρ hρs).2.1, hheight⟩ + · exact fun _ _ _ ↦ by positivity + have hhi := sum_order_div_norm_high_le hC.le hb N + (s.filter (fun ρ ↦ ¬ |ρ.im| ≤ 4)) (by + intro ρ hρ + obtain ⟨hρs, hheight⟩ := Finset.mem_filter.mp hρ + exact ⟨(hs ρ hρs).1, (hs ρ hρs).2.1, lt_of_not_ge hheight, (hs ρ hρs).2.2⟩) + rw [← Finset.sum_filter_add_sum_filter_not s (fun ρ ↦ |ρ.im| ≤ 4)] + have hsq : 1 ≤ (1 + Real.log N) ^ 2 := by nlinarith + have hLH : L ≤ L * (1 + Real.log N) ^ 2 := by + simpa only [mul_one] using mul_le_mul_of_nonneg_left hsq hL + have hCH : 2 * C * (Real.log N * (1 + Real.log N)) ≤ + 2 * C * (1 + Real.log N) ^ 2 := + mul_le_mul_of_nonneg_left (by nlinarith : + Real.log N * (1 + Real.log N) ≤ (1 + Real.log N) ^ 2) (by positivity) + have hCK : 2 * C ≤ 8 * C + 1 := by linarith + have hCK' := mul_le_mul_of_nonneg_right hCK (sq_nonneg (1 + Real.log N)) + nlinarith + · intro s hs + have ht := sum_order_div_norm_mul_add_one_tail_le hC.le hb hN s hs + have hlog' : Real.log N + 2 ≤ 2 * (1 + Real.log N) := by linarith + have hdiv := div_le_div_of_nonneg_right hlog' hN0.le + have hK : 8 * C ≤ L + 8 * C + 1 := by linarith + have hK' := mul_le_mul_of_nonneg_right hK + (div_nonneg (by positivity : 0 ≤ 1 + Real.log N) hN0.le) + calc + _ ≤ 4 * C * ((Real.log N + 2) / N) := ht + _ ≤ 8 * C * ((1 + Real.log N) / N) := by + convert mul_le_mul_of_nonneg_left hdiv (by positivity : 0 ≤ 4 * C) using 1 + ring + _ ≤ _ := hK' + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroWindow.lean b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroWindow.lean new file mode 100644 index 000000000..cab2f41b8 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroWindow.lean @@ -0,0 +1,183 @@ +/- +Copyright (c) 2026 Steve Hubbard, RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Steve Hubbard, RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +public import Mathlib.Analysis.Analytic.Order +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroCount +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Order +import Mathlib.NumberTheory.LSeries.Nonvanishing +import Mathlib.Tactic.Lemma + +/-! +# Zeta zero counts in horizontal windows under RH + +`riemannZetaZeroWindow t h` contains the zeta zeros of positive real part with +`|Im ρ - t| ≤ h`. Under Mathlib's Riemann hypothesis, the window of half-width +`2 / 5` fits in a disk with a logarithmic multiplicity bound. Three overlapping +windows give the same bound for half-width `6 / 5`. + +Closed windows include zeros at the endpoints. Intersections of the covering +windows may be counted twice in the upper bound; every multiplicity is nonnegative. +The separate positivity theorem for the order of an ordinary zeta zero ensures +that these sums also bound the number of distinct zeros and their ordinates. + +The ordinary-zero multiplicity and finite-window covering arguments are adapted from +Steve Hubbard's `goldbach-lean`, revision `da5cf9edad7896290771dfcab8feee2906399e3d`, +`entries/dudek2014/LeanLab/PNTPort/ZetaZeros/GoodHeight.lean` (Apache-2.0). + +## References + +* H. Davenport, *Multiplicative Number Theory*, 3rd ed., Chapters 15 and 17. +-/ + +public section + +open Complex Metric Set + +namespace TauCeti + +/-- Zeta zeros in the open right half-plane whose imaginary parts lie in a closed window. -/ +@[expose] +def riemannZetaZeroWindow (t h : ℝ) : Set ℂ := + {ρ | riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ |ρ.im - t| ≤ h} + +@[simp] +theorem mem_riemannZetaZeroWindow {t h : ℝ} {ρ : ℂ} : + ρ ∈ riemannZetaZeroWindow t h ↔ + riemannZeta ρ = 0 ∧ 0 < ρ.re ∧ |ρ.im - t| ≤ h := Iff.rfl + +/-- A horizontal window not meeting the real axis excludes the pole at `1`. -/ +theorem ne_one_of_mem_riemannZetaZeroWindow {t h : ℝ} {ρ : ℂ} + (ht : h < |t|) (hρ : ρ ∈ riemannZetaZeroWindow t h) : ρ ≠ 1 := by + intro h1 + have hi := hρ.2.2 + have hi' : |t| ≤ h := by simpa [h1] using hi + linarith + +/-- Every ordinary zero of zeta away from its pole has positive finite analytic order. -/ +theorem one_le_analyticOrderNatAt_riemannZeta {ρ : ℂ} + (hρ : riemannZeta ρ = 0) (h1 : ρ ≠ 1) : 1 ≤ analyticOrderNatAt riemannZeta ρ := by + have hf : AnalyticOnNhd ℂ riemannZeta ({1}ᶜ : Set ℂ) := analyticOn_riemannZeta + have htop : analyticOrderAt riemannZeta ρ ≠ ⊤ := + analyticOrderAt_riemannZeta_ne_top h1 + have hne : analyticOrderAt riemannZeta ρ ≠ 0 := + analyticOrderAt_ne_zero.mpr ⟨hf ρ (by simpa using h1), hρ⟩ + apply Nat.one_le_iff_ne_zero.mpr + intro hn + apply hne + rw [← Nat.cast_analyticOrderNatAt htop, hn] + simp + +end TauCeti + +namespace RiemannHypothesis + +open TauCeti + +/-- Under RH, the narrow positive-half-plane zero window lies in the counted disk. -/ +theorem riemannZetaZeroWindow_subset_closedBall (hRH : RiemannHypothesis) + {t : ℝ} (ht : 3 ≤ |t|) : + riemannZetaZeroWindow t (2 / 5) ⊆ closedBall (2 + I * t) (8 / 5) := by + intro ρ hρ + have h1 := ne_one_of_mem_riemannZetaZeroWindow (by linarith : (2 / 5 : ℝ) < |t|) hρ + have hhalf := hRH.re_eq_half_of_riemannZeta_eq_zero_of_re_pos hρ.2.1 hρ.1 h1 + have hsq : (ρ.im - t) ^ 2 ≤ (2 / 5 : ℝ) ^ 2 := + sq_le_sq' (abs_le.mp hρ.2.2).1 (abs_le.mp hρ.2.2).2 + rw [mem_closedBall, dist_eq_norm, Complex.norm_def, Real.sqrt_le_left (by norm_num)] + norm_num [Complex.normSq_apply, hhalf] + nlinarith + +/-- Under RH, the narrow positive-half-plane zero window is finite. -/ +theorem finite_riemannZetaZeroWindow (hRH : RiemannHypothesis) + {t : ℝ} (ht : 3 ≤ |t|) : (riemannZetaZeroWindow t (2 / 5)).Finite := + (finite_zeros_riemannZeta_closedBall ht).subset fun _ hρ ↦ + ⟨hRH.riemannZetaZeroWindow_subset_closedBall ht hρ, hρ.1⟩ + +/-- Under RH, a fixed narrow zero window has total multiplicity `O(log |t|)`. -/ +theorem exists_sum_riemannZetaZeroWindow_order_le_log (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, 3 ≤ |t| → + ∃ hfin : (riemannZetaZeroWindow t (2 / 5)).Finite, + (∑ ρ ∈ hfin.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ C * Real.log |t| := by + obtain ⟨C, hC, hbound⟩ := exists_sum_analyticOrderNatAt_riemannZeta_le_log + refine ⟨C, hC, fun t ht ↦ ?_⟩ + have hfin := hRH.finite_riemannZetaZeroWindow ht + exact ⟨hfin, hbound t ht _ hfin (hRH.riemannZetaZeroWindow_subset_closedBall ht)⟩ + +private lemma wide_window_subset (t : ℝ) : + riemannZetaZeroWindow t (6 / 5) ⊆ + riemannZetaZeroWindow (t - 4 / 5) (2 / 5) ∪ + (riemannZetaZeroWindow t (2 / 5) ∪ riemannZetaZeroWindow (t + 4 / 5) (2 / 5)) := by + intro ρ hρ + have hi := abs_le.mp hρ.2.2 + by_cases h0 : ρ.im - t ≤ -2 / 5 + · exact Or.inl ⟨hρ.1, hρ.2.1, abs_le.mpr ⟨by linarith, by linarith⟩⟩ + by_cases h1 : ρ.im - t ≤ 2 / 5 + · exact Or.inr (Or.inl ⟨hρ.1, hρ.2.1, abs_le.mpr ⟨by linarith, h1⟩⟩) + · exact Or.inr (Or.inr ⟨hρ.1, hρ.2.1, abs_le.mpr ⟨by linarith, by linarith⟩⟩) + +private lemma shifted_window_height {t u : ℝ} (ht : 4 ≤ |t|) (hu : |u - t| ≤ 4 / 5) : + 3 ≤ |u| ∧ Real.log |u| ≤ 2 * Real.log |t| := by + have ht' : |t| ≤ |u| + 4 / 5 := by + calc + |t| = |u - (u - t)| := by congr 1; ring + _ ≤ |u| + |u - t| := abs_sub _ _ + _ ≤ |u| + 4 / 5 := by gcongr + have hu' : |u| ≤ |t| + 4 / 5 := by + calc + |u| = |(u - t) + t| := by rw [sub_add_cancel] + _ ≤ |u - t| + |t| := abs_add_le _ _ + _ ≤ |t| + 4 / 5 := by linarith + have h3 : 3 ≤ |u| := by linarith + refine ⟨h3, ?_⟩ + calc + Real.log |u| ≤ Real.log (|t| ^ 2) := Real.log_le_log (by linarith) (by nlinarith) + _ = 2 * Real.log |t| := by rw [Real.log_pow]; norm_num + +/-- Three narrow windows give a logarithmic multiplicity bound for half-width `6 / 5`. -/ +theorem exists_sum_riemannZetaZeroWindow_order_wide_le_log (hRH : RiemannHypothesis) : + ∃ C : ℝ, 0 < C ∧ ∀ t : ℝ, 4 ≤ |t| → + ∃ hfin : (riemannZetaZeroWindow t (6 / 5)).Finite, + (∑ ρ ∈ hfin.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ C * Real.log |t| := by + obtain ⟨C, hC, hbound⟩ := hRH.exists_sum_riemannZetaZeroWindow_order_le_log + refine ⟨6 * C, by positivity, fun t ht ↦ ?_⟩ + have h0 := shifted_window_height ht (u := t - 4 / 5) + (by rw [show (t - 4 / 5) - t = -(4 / 5 : ℝ) by ring]; norm_num) + have h1 := shifted_window_height ht (u := t) (by norm_num) + have h2 := shifted_window_height ht (u := t + 4 / 5) + (by rw [show (t + 4 / 5) - t = (4 / 5 : ℝ) by ring]; norm_num) + obtain ⟨hf0, hb0⟩ := hbound (t - 4 / 5) h0.1 + obtain ⟨hf1, hb1⟩ := hbound t h1.1 + obtain ⟨hf2, hb2⟩ := hbound (t + 4 / 5) h2.1 + have hfin := (hf0.union (hf1.union hf2)).subset (wide_window_subset t) + refine ⟨hfin, ?_⟩ + have hsub : hfin.toFinset ⊆ hf0.toFinset ∪ (hf1.toFinset ∪ hf2.toFinset) := by + intro ρ hρ + simpa only [Finset.mem_union, Set.Finite.mem_toFinset, Set.mem_union] using + wide_window_subset t (hfin.mem_toFinset.mp hρ) + have hu01 := Finset.sum_union_inter (s₁ := hf0.toFinset) + (s₂ := hf1.toFinset ∪ hf2.toFinset) (f := fun ρ ↦ (analyticOrderNatAt riemannZeta ρ : ℝ)) + have hi01 : 0 ≤ ∑ ρ ∈ hf0.toFinset ∩ (hf1.toFinset ∪ hf2.toFinset), + (analyticOrderNatAt riemannZeta ρ : ℝ) := Finset.sum_nonneg fun _ _ ↦ Nat.cast_nonneg _ + have hu12 := Finset.sum_union_inter (s₁ := hf1.toFinset) (s₂ := hf2.toFinset) + (f := fun ρ ↦ (analyticOrderNatAt riemannZeta ρ : ℝ)) + have hi12 : 0 ≤ ∑ ρ ∈ hf1.toFinset ∩ hf2.toFinset, + (analyticOrderNatAt riemannZeta ρ : ℝ) := Finset.sum_nonneg fun _ _ ↦ Nat.cast_nonneg _ + have hb0' := hb0.trans (mul_le_mul_of_nonneg_left h0.2 hC.le) + have hb1' := hb1.trans (mul_le_mul_of_nonneg_left h1.2 hC.le) + have hb2' := hb2.trans (mul_le_mul_of_nonneg_left h2.2 hC.le) + calc + (∑ ρ ∈ hfin.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ)) ≤ + ∑ ρ ∈ hf0.toFinset ∪ (hf1.toFinset ∪ hf2.toFinset), + (analyticOrderNatAt riemannZeta ρ : ℝ) := + Finset.sum_le_sum_of_subset_of_nonneg hsub (fun _ _ _ ↦ Nat.cast_nonneg _) + _ ≤ (∑ ρ ∈ hf0.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ)) + + (∑ ρ ∈ hf1.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ)) + + ∑ ρ ∈ hf2.toFinset, (analyticOrderNatAt riemannZeta ρ : ℝ) := by linarith + _ ≤ 6 * C * Real.log |t| := by nlinarith + +end RiemannHypothesis diff --git a/RealRooted/Mathlib/NumberTheory/LSeries/Riesz.lean b/RealRooted/Mathlib/NumberTheory/LSeries/Riesz.lean new file mode 100644 index 000000000..725c5fa06 --- /dev/null +++ b/RealRooted/Mathlib/NumberTheory/LSeries/Riesz.lean @@ -0,0 +1,167 @@ +/- +Copyright (c) 2026 Steve Hubbard, RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Steve Hubbard, RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import TauCeti.Analysis.MellinInversion +import TauCeti.NumberTheory.LSeries.Continuity + +/-! +# The first Riesz mean of a Dirichlet series + +An absolutely convergent Dirichlet series on a positive vertical line has a first-order +Perron formula with the continuous weight `max (1 - n / x) 0`. The kernel is +`1 / (s * (s + 1))`, whose Mellin inversion is already available in TauCeti. + +The interchange argument is adapted and generalized from Steve Hubbard's +`goldbach-lean`, commit `da5cf9edad7896290771dfcab8feee2906399e3d`, +`entries/dudek2014/LeanLab/PNTPort/ZetaZeros/Perron1.lean` (Apache-2.0). +The arithmetic input here is arbitrary; no hypothesis about zeta zeros is used. +-/ + +public section + +open Complex Filter MeasureTheory +open scoped Real + +namespace LSeries + +/-- The continuous first-order cutoff turns an infinite series into a finite weighted sum, +including an integer endpoint with weight zero. -/ +theorem tsum_mul_max_one_sub_eq_sum (f : ℕ → ℂ) {x : ℝ} (hx : 0 < x) : + ∑' n : ℕ, f n * (max (1 - (n : ℝ) / x) 0 : ℝ) = + ∑ n ∈ Finset.Iic ⌊x⌋₊, f n * (1 - (n : ℝ) / x : ℝ) := by + rw [tsum_eq_sum (s := Finset.Iic ⌊x⌋₊) ?_] + · refine Finset.sum_congr rfl fun n hn ↦ ?_ + have hnx : (n : ℝ) ≤ x := (Nat.le_floor_iff hx.le).mp (Finset.mem_Iic.mp hn) + rw [max_eq_left (sub_nonneg.mpr ((div_le_one hx).mpr hnx))] + · intro n hn + have hxn : x < n := Nat.lt_of_floor_lt (by simpa using hn) + rw [max_eq_right (sub_nonpos.mpr ((le_div_iff₀ hx).mpr (by linarith)))] + simp + +private theorem integral_riesz_inverse {c y : ℝ} (hc : 0 < c) (hy : 0 < y) : + ((2 * Real.pi : ℝ) : ℂ)⁻¹ * + (∫ t : ℝ, (y : ℂ) ^ (-((c : ℂ) + t * I)) * + (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1))⁻¹) = + (max (1 - y) 0 : ℝ) := by + have h := TauCeti.mellinInv_inv_mul_add_one hc hy + simpa only [mellinInv, smul_eq_mul, Complex.real_smul, one_div, Complex.ofReal_inv] using h + +private theorem cpow_div_neg {n x : ℝ} (hn : 0 < n) (hx : 0 < x) (s : ℂ) : + ((n / x : ℝ) : ℂ) ^ (-s) = (x : ℂ) ^ s / (n : ℂ) ^ s := by + rw [div_eq_mul_inv, Complex.ofReal_mul, mul_cpow_ofReal_nonneg hn.le (inv_nonneg.mpr hx.le), + Complex.ofReal_inv, inv_cpow_ofReal_nonneg hx.le, cpow_neg, cpow_neg, inv_inv] + ring + +/-- Absolute convergence of a Dirichlet series makes its first-order Perron integrand +integrable on every positive vertical line of summability, including a boundary line. -/ +theorem integrable_mul_cpow_div_mul_add_one {f : ℕ → ℂ} {x c : ℝ} + (hx : 0 < x) (hc : 0 < c) (hf : LSeriesSummable f (c : ℂ)) : + Integrable (fun t : ℝ ↦ LSeries f ((c : ℂ) + t * I) * + (x : ℂ) ^ ((c : ℂ) + t * I) / + (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1))) := by + have hcont : Continuous fun t : ℝ ↦ + LSeries f ((c : ℂ) + t * I) * (x : ℂ) ^ ((c : ℂ) + t * I) := + (TauCeti.LSeries.continuous_vertical f c).mul + (Continuous.const_cpow (by fun_prop) (Or.inl (Complex.ofReal_ne_zero.2 hx.ne'))) + simp only [div_eq_mul_inv] + refine (TauCeti.verticalIntegrable_inv_mul_add_one hc.ne' (by linarith)).bdd_mul + (c := (∑' n, ‖LSeries.term f (c : ℂ) n‖) * x ^ c) hcont.aestronglyMeasurable ?_ + refine Eventually.of_forall fun t ↦ ?_ + rw [norm_mul, Complex.norm_cpow_eq_rpow_re_of_pos hx] + simp only [add_re, mul_re, ofReal_re, ofReal_im, I_re, I_im, mul_zero, zero_mul, sub_zero, + add_zero] + apply mul_le_mul_of_nonneg_right _ (Real.rpow_nonneg hx.le _) + have ht := hf.of_re_le_re (s' := (c : ℂ) + t * I) (by simp) + exact (norm_tsum_le_tsum_norm ht.norm).trans + (ht.norm.tsum_le_tsum (LSeries.norm_term_le_of_re_le_re f (by simp)) hf.norm) + +/-- The first-order Perron formula for an absolutely convergent Dirichlet series. +The zeroth coefficient is assumed zero because `LSeries` discards it. -/ +theorem tsum_mul_max_one_sub_eq_integral {f : ℕ → ℂ} (hf0 : f 0 = 0) + {x c : ℝ} (hx : 0 < x) (hc : 0 < c) (hf : LSeriesSummable f (c : ℂ)) : + ∑' n : ℕ, f n * (max (1 - (n : ℝ) / x) 0 : ℝ) = + ((2 * Real.pi : ℝ) : ℂ)⁻¹ * + ∫ t : ℝ, LSeries f ((c : ℂ) + t * I) * (x : ℂ) ^ ((c : ℂ) + t * I) / + (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1)) := by + let K : ℝ → ℂ := fun t ↦ (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1))⁻¹ + let F : ℕ → ℝ → ℂ := fun n t ↦ + f n * (((n / x : ℝ) : ℂ) ^ (-((c : ℂ) + t * I)) * K t) + have hK : Integrable K := + TauCeti.verticalIntegrable_inv_mul_add_one hc.ne' (by linarith) + have hnorm (n : ℕ) (t : ℝ) : + ‖F n t‖ = ‖f n‖ * ((n / x : ℝ) ^ (-c)) * ‖K t‖ := by + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp [F, hf0] + have hnx : 0 < (n / x : ℝ) := div_pos (Nat.cast_pos.2 hn) hx + simp only [F, norm_mul] + rw [Complex.norm_cpow_eq_rpow_re_of_pos hnx] + simp [mul_assoc] + have hint (n : ℕ) : Integrable (F n) := by + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp [F, hf0] + have hnx : 0 < (n / x : ℝ) := div_pos (Nat.cast_pos.2 hn) hx + have hcont : Continuous fun t : ℝ ↦ + ((n / x : ℝ) : ℂ) ^ (-((c : ℂ) + t * I)) := + Continuous.const_cpow (by fun_prop) (Or.inl (Complex.ofReal_ne_zero.2 hnx.ne')) + apply Integrable.const_mul + refine hK.bdd_mul (c := (n / x : ℝ) ^ (-c)) hcont.aestronglyMeasurable ?_ + exact Eventually.of_forall fun t ↦ by + rw [Complex.norm_cpow_eq_rpow_re_of_pos hnx] + simp + have hsum : Summable fun n ↦ ∫ t, ‖F n t‖ := by + simp_rw [hnorm, integral_const_mul] + apply Summable.mul_right + refine (hf.norm.mul_left (x ^ c)).congr fun n ↦ ?_ + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp [hf0] + rw [LSeries.term_of_ne_zero hn.ne', norm_div, norm_natCast_cpow_of_pos hn, ofReal_re, + Real.div_rpow (by positivity) hx.le, Real.rpow_neg (by positivity), Real.rpow_neg hx.le] + field_simp + have hleft (n : ℕ) : + ∫ t, F n t = ((2 * Real.pi : ℝ) : ℂ) * + (f n * (max (1 - (n : ℝ) / x) 0 : ℝ)) := by + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp [F, hf0] + have h := integral_riesz_inverse hc (div_pos (Nat.cast_pos.2 hn) hx) + have hpi : ((2 * Real.pi : ℝ) : ℂ) ≠ 0 := by + exact_mod_cast mul_ne_zero two_ne_zero Real.pi_ne_zero + simp only [F, integral_const_mul] + rw [(inv_mul_eq_iff_eq_mul₀ hpi).mp h] + ring + have hright (t : ℝ) : + ∑' n, F n t = LSeries f ((c : ℂ) + t * I) * (x : ℂ) ^ ((c : ℂ) + t * I) * K t := by + simp only [F, LSeries] + rw [← tsum_mul_right, ← tsum_mul_right] + refine tsum_congr fun n ↦ ?_ + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp [hf0] + rw [LSeries.term_of_ne_zero hn.ne', cpow_div_neg (Nat.cast_pos.2 hn) hx] + push_cast + ring + have h := integral_tsum_of_summable_integral_norm hint hsum + simp_rw [hleft, hright] at h + rw [tsum_mul_left] at h + have hpi : ((2 * Real.pi : ℝ) : ℂ) ≠ 0 := by + exact_mod_cast mul_ne_zero two_ne_zero Real.pi_ne_zero + change _ = ((2 * Real.pi : ℝ) : ℂ)⁻¹ * + ∫ t : ℝ, LSeries f ((c : ℂ) + t * I) * (x : ℂ) ^ ((c : ℂ) + t * I) * K t + rw [← h, inv_mul_cancel_left₀ hpi] + +/-- The finite-sum form of the first-order Perron formula. -/ +theorem sum_mul_one_sub_eq_integral {f : ℕ → ℂ} (hf0 : f 0 = 0) + {x c : ℝ} (hx : 0 < x) (hc : 0 < c) (hf : LSeriesSummable f (c : ℂ)) : + ∑ n ∈ Finset.Iic ⌊x⌋₊, f n * (1 - (n : ℝ) / x : ℝ) = + ((2 * Real.pi : ℝ) : ℂ)⁻¹ * + ∫ t : ℝ, LSeries f ((c : ℂ) + t * I) * (x : ℂ) ^ ((c : ℂ) + t * I) / + (((c : ℂ) + t * I) * ((c : ℂ) + t * I + 1)) := by + rw [← tsum_mul_max_one_sub_eq_sum f hx] + exact tsum_mul_max_one_sub_eq_integral hf0 hx hc hf + +end LSeries diff --git a/RealRooted/Mathlib/Order/Monotone/PositiveExtension.lean b/RealRooted/Mathlib/Order/Monotone/PositiveExtension.lean new file mode 100644 index 000000000..056d979d4 --- /dev/null +++ b/RealRooted/Mathlib/Order/Monotone/PositiveExtension.lean @@ -0,0 +1,85 @@ +/- +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.Topology.Algebra.InfiniteSum.Defs +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Topology.Algebra.InfiniteSum.Real +import Mathlib.Basic.NNReal.Basic +import Mathlib.Analysis.SpecificLimits.Basic +import Mathlib.Topology.Algebra.InfiniteSum.NatInt + +/-! +# Positive summable extensions of decreasing finite sequences + +A strictly decreasing finite family of positive nonnegative reals extends to +a strictly decreasing positive summable sequence. A geometric tail starts below +the final entry. The empty family has a separate geometric extension. +-/ + +public section + +open scoped NNReal ENNReal + +namespace StrictAnti + +/-- Extend a finite positive decreasing family by a summable geometric tail. +The result includes `Fin 0`, without selecting a nonexistent final entry. -/ +theorem exists_pos_summable_nat_extension {n : ℕ} {a : Fin n → ℝ≥0} + (ha : StrictAnti a) (hpos : ∀ i, 0 < a i) : + ∃ b : ℕ → ℝ≥0, StrictAnti b ∧ (∀ i, 0 < b i) ∧ + Summable (fun i ↦ (b i : ℝ)) ∧ ∀ i : Fin n, b i.val = a i := by + cases n with + | zero => + refine ⟨fun i ↦ (1 / 2 : ℝ≥0) ^ i, ?_, ?_, ?_, ?_⟩ + · intro i j hij + exact pow_lt_pow_right_of_lt_one₀ (by norm_num) (by norm_num) hij + · intro i + positivity + · simpa only [NNReal.coe_pow, NNReal.coe_div, NNReal.coe_one, NNReal.coe_ofNat] using + summable_geometric_two + · intro i + exact Fin.elim0 i + | succ n => + let c : ℝ≥0 := a (Fin.last n) / 2 + have hc : 0 < c := div_pos (hpos _) (by norm_num) + have hclt : c < a (Fin.last n) := by + exact div_lt_self (hpos _) (by norm_num) + let b : ℕ → ℝ≥0 := fun i ↦ + if h : i < n + 1 then a ⟨i, h⟩ else c * (1 / 2) ^ (i - (n + 1)) + have hmono : StrictAnti b := by + intro i j hij + dsimp only [b] + by_cases hi : i < n + 1 + · by_cases hj : j < n + 1 + · rw [dite_eq_left hi, dite_eq_left hj] + exact ha hij + · rw [dite_eq_left hi, dite_eq_right hj] + have htail : c * (1 / 2 : ℝ≥0) ^ (j - (n + 1)) ≤ c := + mul_le_of_le_one_right hc.le (pow_le_one₀ (by positivity) (by norm_num)) + exact htail.trans_lt (hclt.trans_le (ha.antitone (Fin.le_last _))) + · have hj : ¬ j < n + 1 := fun hj ↦ hi (hij.trans hj) + rw [dite_eq_right hi, dite_eq_right hj] + apply mul_lt_mul_of_pos_left _ hc + apply pow_lt_pow_right_of_lt_one₀ (by norm_num) (by norm_num) + lia + refine ⟨b, hmono, ?_, ?_, ?_⟩ + · intro i + dsimp only [b] + split_ifs with hi + · exact hpos _ + · exact mul_pos hc (pow_pos (by norm_num) _) + · apply (summable_nat_add_iff (n + 1)).mp + have heq (i : ℕ) : (b (i + (n + 1)) : ℝ) = (c : ℝ) * (1 / 2 : ℝ) ^ i := by + simp only [b, dite_eq_right (show ¬ i + (n + 1) < n + 1 by lia), + Nat.add_sub_cancel, NNReal.coe_mul, NNReal.coe_pow, NNReal.coe_div, + NNReal.coe_one, NNReal.coe_ofNat] + simp_rw [heq] + exact summable_geometric_two.mul_left _ + · intro i + simp only [b, dite_eq_left i.isLt] + +end StrictAnti diff --git a/RealRooted/Mathlib/Probability/Moments/MGFTaylor.lean b/RealRooted/Mathlib/Probability/Moments/MGFTaylor.lean new file mode 100644 index 000000000..0cccda0f0 --- /dev/null +++ b/RealRooted/Mathlib/Probability/Moments/MGFTaylor.lean @@ -0,0 +1,49 @@ +/- +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.Probability.Moments.ComplexMGF +public import TauCeti.Analysis.Analytic.TaylorSeries +import RealRooted.Mathlib.Analysis.Analytic.TaylorSeries +import Mathlib.Tactic.TypeStar + +/-! +# Real moment coefficients of the complex moment-generating Taylor series +-/ + +public section + +open Complex MeasureTheory Set + +namespace ProbabilityTheory + +variable {Ω : Type*} [MeasurableSpace Ω] {mu : Measure Ω} {Y : Ω → ℝ} + +/-- At zero the complex MGF derivatives are the genuine real moments, embedded +in the complex numbers. Exponential integrability supplies all these moments. -/ +theorem iteratedDeriv_complexMGF_zero + (h0 : 0 ∈ interior (integrableExpSet Y mu)) (k : ℕ) : + iteratedDeriv k (complexMGF Y mu) 0 = ((∫ w, Y w ^ k ∂mu : ℝ) : ℂ) := by + rw [iteratedDeriv_complexMGF (by simpa only [zero_re] using h0)] + simp only [zero_mul, exp_zero, mul_one, ← ofReal_pow] + exact integral_complex_ofReal + +/-- The complex MGF Taylor series is the coefficientwise real embedding of +the exponential moment series. This proves the required reality of all +coefficients without a separate conjugation hypothesis. -/ +theorem taylorSeries_complexMGF_zero + (h0 : 0 ∈ interior (integrableExpSet Y mu)) : + TauCeti.taylorSeries (complexMGF Y mu) 0 = + PowerSeries.map ofRealHom (PowerSeries.mk fun k => + (∫ w, Y w ^ k ∂mu) / k.factorial) := by + ext k + have hg : AnalyticAt ℂ (complexMGF Y mu) 0 := + analyticAt_complexMGF (by simpa only [zero_re] using h0) + rw [hg.coeff_taylorSeries_eq_iteratedDeriv, iteratedDeriv_complexMGF_zero h0, + PowerSeries.coeff_map, PowerSeries.coeff_mk] + simp only [ofRealHom_eq_coe, ofReal_div, ofReal_natCast] + +end ProbabilityTheory diff --git a/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/Differential.lean b/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/Differential.lean index 5965f24c3..c6777669f 100644 --- a/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/Differential.lean +++ b/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/Differential.lean @@ -329,4 +329,25 @@ theorem derivative_generalizedLaguerre (n : ℕ) (α : R) : coeff_generalizedLaguerre, ite_eq_right hk] simp +/-- Raising the Laguerre parameter by one adds the polynomial derivative. -/ +theorem generalizedLaguerre_add_one (n : ℕ) (α : R) : + generalizedLaguerre n (α + 1) = + generalizedLaguerre n α + (generalizedLaguerre n α).derivative := by + induction n with + | zero => simp + | succ n ih => + simp only [generalizedLaguerre_succ, laguerreRaisingStep, + ih, derivative_mul, derivative_X, derivative_C, derivative_one, + one_mul, add_zero, map_add, map_one] + ring + +/-- Lowering the Laguerre parameter gives a difference of consecutive degrees. -/ +theorem generalizedLaguerre_succ_eq_sub {S : Type*} [CommRing S] (n : ℕ) (α : S) : + generalizedLaguerre (n + 1) α = + generalizedLaguerre (n + 1) (α + 1) - + C (n + 1 : S) * generalizedLaguerre n (α + 1) := by + have h := generalizedLaguerre_add_one (n + 1) α + rw [derivative_generalizedLaguerre] at h + exact (eq_sub_iff_add_eq).mpr h.symm + end Polynomial diff --git a/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/LaplaceKernel.lean b/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/LaplaceKernel.lean new file mode 100644 index 000000000..8afaf128d --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/LaplaceKernel.lean @@ -0,0 +1,111 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.Analysis.SpecialFunctions.Exp +import Mathlib.Data.Nat.Choose.Sum +import Mathlib.MeasureTheory.Integral.Bochner.Set +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# The finite Laguerre Laplace kernel + +The repository normalization is `generalizedLaguerre k m = k! L_k^(m)(-X)`. +Consequently evaluation at `-x*t` already supplies the factorial in Zhang's +Laguerre integral formula. The finite coefficient identities below avoid +endpoint assumptions from repeated improper integration by parts. +-/ + +public section + +open Finset MeasureTheory Set + +namespace Polynomial + +/-- Factorial moments turn the generalized Laguerre coefficient sum into +a binomial power. No sign or positivity hypothesis on the evaluation is needed. -/ +theorem sum_generalizedLaguerre_laplace_coefficients (k m : ℕ) + {y : ℝ} (hy : y ≠ 0) (z : ℝ) : + (∑ j ∈ range (k + 1), + (k.choose j : ℝ) * (ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) * + z ^ j * ((m + j).factorial : ℝ) / y ^ (m + j + 1)) = + ((k + m).factorial : ℝ) * (y + z) ^ k / y ^ (k + m + 1) := by + have hterm (j : ℕ) (hj : j ∈ range (k + 1)) : + (k.choose j : ℝ) * (ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) * + z ^ j * ((m + j).factorial : ℝ) / y ^ (m + j + 1) = + (((k + m).factorial : ℝ) / y ^ (m + 1)) * + ((z / y) ^ j * (k.choose j : ℝ)) := by + have hjk : j ≤ k := Nat.lt_succ_iff.mp (mem_range.mp hj) + have hf : (ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) * + ((m + j).factorial : ℝ) = ((k + m).factorial : ℝ) := by + calc + _ = ((m + j).factorial : ℝ) * + (ascPochhammer ℝ (k - j)).eval (((m + j : ℕ) : ℝ) + 1) := by + simp only [Nat.cast_add] + ring + _ = ((m + j + (k - j)).factorial : ℝ) := + factorial_mul_ascPochhammer ℝ (m + j) (k - j) + _ = _ := by rw [show m + j + (k - j) = k + m by lia] + calc + _ = ((ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) * + ((m + j).factorial : ℝ)) * (k.choose j : ℝ) * z ^ j / + y ^ (m + j + 1) := by ring + _ = _ := by + rw [hf, show m + j + 1 = m + 1 + j by lia, pow_add, div_pow] + field_simp [hy] + rw [sum_congr rfl hterm, ← mul_sum] + have hbinom := add_pow (z / y) (1 : ℝ) k + simp only [one_pow, mul_one] at hbinom + rw [← hbinom] + have hbase : z / y + 1 = (y + z) / y := by field_simp; ring + rw [hbase, div_pow, show k + m + 1 = m + 1 + k by lia, pow_add] + field_simp [hy] + simp only [pow_add, pow_succ] + ring + +/-- Expanding the Laguerre kernel reduces its integral to finitely many +ordinary Laplace moments. This statement requires no spectral representation. -/ +theorem integrableOn_and_integral_exp_mul_pow_mul_eval_generalizedLaguerre + (H : ℝ → ℝ) (k m : ℕ) (x : ℝ) + (hint : ∀ j ≤ k, IntegrableOn + (fun t : ℝ ↦ Real.exp (-x * t) * t ^ (m + j) * H t) (Ioi 0)) : + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * H t * + (generalizedLaguerre k (m : ℝ)).eval (-x * t)) (Ioi 0) ∧ + (∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * H t * + (generalizedLaguerre k (m : ℝ)).eval (-x * t)) = + ∑ j ∈ range (k + 1), + ((k.choose j : ℝ) * + (ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) * (-x) ^ j) * + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ (m + j) * H t := by + let c : ℕ → ℝ := fun j ↦ (k.choose j : ℝ) * + (ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) * (-x) ^ j + let F : ℕ → ℝ → ℝ := fun j t ↦ c j * (Real.exp (-x * t) * t ^ (m + j) * H t) + have hF (j : ℕ) (hj : j ∈ range (k + 1)) : IntegrableOn (F j) (Ioi 0) := + (hint j (Nat.lt_succ_iff.mp (mem_range.mp hj))).const_mul (c j) + have hfun : (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * H t * + (generalizedLaguerre k (m : ℝ)).eval (-x * t)) = + (fun t : ℝ ↦ ∑ j ∈ range (k + 1), F j t) := by + funext t + simp only [generalizedLaguerre, eval_finsetSum, eval_mul, eval_C, eval_pow, eval_X] + rw [mul_sum] + apply sum_congr rfl + intro j _ + dsimp only [F, c] + rw [mul_pow, pow_add] + ring + rw [hfun] + refine ⟨integrable_finsetSum _ hF, ?_⟩ + rw [integral_finsetSum _ hF] + apply sum_congr rfl + intro j _ + exact integral_const_mul _ _ + +end Polynomial diff --git a/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/Rodrigues.lean b/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/Rodrigues.lean new file mode 100644 index 000000000..b69e52399 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/Rodrigues.lean @@ -0,0 +1,65 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.SpecialFunctions.Exp +public import Mathlib.Analysis.Complex.Exponential +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Tactic.FunProp +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +/-! +# Rodrigues identities for natural generalized Laguerre parameters + +The division-free identity is valid at every real argument, including zero, +and for every real exponential rate. Its normalized form matches equations +(2.19)--(2.20) of Zhang, arXiv:1506.07012v13, for the natural parameters used +in his two-index hierarchy. The repository polynomial already includes `k!`. +-/ + +public section + +open Finset + +namespace Polynomial + +/-- The exponential-polynomial Rodrigues derivative equals the monic, +sign-reversed generalized Laguerre evaluation, including at argument zero. -/ +theorem iteratedDeriv_exp_mul_pow_eq_generalizedLaguerre + (k m : ℕ) (c x : ℝ) : + iteratedDeriv k (fun y : ℝ ↦ Real.exp (-c * y) * y ^ (k + m)) x = + Real.exp (-c * x) * x ^ m * (generalizedLaguerre k (m : ℝ)).eval (-c * x) := by + have he : ContDiffAt ℝ k (fun y : ℝ ↦ Real.exp (-c * y)) x := by fun_prop + have hp : ContDiffAt ℝ k (fun y : ℝ ↦ y ^ (k + m)) x := by fun_prop + rw [iteratedDeriv_fun_mul he hp] + simp only [iteratedDeriv_exp_const_mul, iteratedDeriv_pow, + generalizedLaguerre, eval_finsetSum, eval_mul, eval_C, eval_pow, eval_X, mul_sum] + apply sum_congr rfl + intro j hj + have hjk : j ≤ k := Nat.lt_succ_iff.mp (mem_range.mp hj) + have hpoch : (ascPochhammer ℝ (k - j)).eval ((m : ℝ) + j + 1) = + ((k + m).descFactorial (k - j) : ℝ) := by + rw [show (m : ℝ) + j + 1 = ((m + j + 1 : ℕ) : ℝ) by push_cast; ring, + ascPochhammer_nat_eq_natCast_descFactorial] + rw [show m + j + 1 + (k - j) - 1 = k + m by lia] + rw [hpoch, show k + m - (k - j) = m + j by lia, pow_add, mul_pow] + ring + +/-- The normalized Rodrigues formula. The factorial is already included +in `generalizedLaguerre`, so no additional factor occurs on the right. -/ +theorem generalizedLaguerre_eval_eq_rodrigues + (k m : ℕ) (c : ℝ) {x : ℝ} (hx : x ≠ 0) : + (generalizedLaguerre k (m : ℝ)).eval (-c * x) = + Real.exp (c * x) / x ^ m * + iteratedDeriv k (fun y : ℝ ↦ Real.exp (-c * y) * y ^ (k + m)) x := by + rw [iteratedDeriv_exp_mul_pow_eq_generalizedLaguerre, neg_mul, Real.exp_neg] + field_simp [hx, Real.exp_ne_zero] + +end Polynomial diff --git a/RealRooted/Mathlib/RingTheory/Polynomial/Pochhammer/ReciprocalConvolution.lean b/RealRooted/Mathlib/RingTheory/Polynomial/Pochhammer/ReciprocalConvolution.lean new file mode 100644 index 000000000..8fd6b3ca8 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/Polynomial/Pochhammer/ReciprocalConvolution.lean @@ -0,0 +1,73 @@ +/- +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.RingTheory.Polynomial.Pochhammer +import Mathlib.RingTheory.Binomial + +/-! +# Reciprocal rising-factorial convolution + +The finite Chu--Vandermonde identity gives a Gamma-free convolution of +reciprocal rising factorials. The numerator is a finite polynomial even when +the corresponding Gamma ratio has a removable singularity. +-/ + +public section + +namespace Polynomial + +variable {R : Type*} [Field R] + +/-- The reciprocal rising-factorial convolution, with no Gamma poles. -/ +theorem sum_choose_mul_inv_ascPochhammer {a b : R} (n : ℕ) + (ha : (ascPochhammer R n).eval a ≠ 0) + (hb : (ascPochhammer R n).eval b ≠ 0) : + (∑ k ∈ Finset.range (n + 1), (n.choose k : R) * + ((ascPochhammer R k).eval a)⁻¹ * + ((ascPochhammer R (n - k)).eval b)⁻¹) = + (ascPochhammer R n).eval (a + b + n - 1) / + ((ascPochhammer R n).eval a * (ascPochhammer R n).eval b) := by + apply (eq_div_iff (mul_ne_zero ha hb)).mpr + rw [Finset.sum_mul] + have hterm (k : ℕ) (hk : k ∈ Finset.range (n + 1)) : + (n.choose k : R) * ((ascPochhammer R k).eval a)⁻¹ * + ((ascPochhammer R (n - k)).eval b)⁻¹ * + ((ascPochhammer R n).eval a * (ascPochhammer R n).eval b) = + (n.choose k : R) * + ((descPochhammer ℤ k).smeval (b + n - 1) * + (descPochhammer ℤ (n - k)).smeval (a + n - 1)) := by + have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) + have haeq := congrArg (eval a) (ascPochhammer_mul R k (n - k)) + have hbeq := congrArg (eval b) (ascPochhammer_mul R (n - k) k) + simp only [eval_mul, eval_comp, eval_add, eval_X, eval_natCast, + Nat.add_sub_of_le hkn, Nat.sub_add_cancel hkn] at haeq hbeq + have hak : (ascPochhammer R k).eval a ≠ 0 := by + intro h + rw [h, zero_mul] at haeq + exact ha haeq.symm + have hbk : (ascPochhammer R (n - k)).eval b ≠ 0 := by + intro h + rw [h, zero_mul] at hbeq + exact hb hbeq.symm + rw [descPochhammer_smeval_eq_ascPochhammer, + descPochhammer_smeval_eq_ascPochhammer, + ascPochhammer_smeval_eq_eval, ascPochhammer_smeval_eq_eval] + rw [show b + n - 1 - k + 1 = b + ((n - k : ℕ) : R) by rw [Nat.cast_sub hkn]; ring, + show a + n - 1 - ((n - k : ℕ) : R) + 1 = a + k by rw [Nat.cast_sub hkn]; ring] + rw [← haeq, ← hbeq] + field_simp + rw [Finset.sum_congr rfl hterm, + ← Finset.Nat.sum_antidiagonal_eq_sum_range_succ fun k l => + (n.choose k : R) * + ((descPochhammer ℤ k).smeval (b + n - 1) * + (descPochhammer ℤ l).smeval (a + n - 1)), + ← Ring.descPochhammer_smeval_add n (Commute.all _ _), + descPochhammer_smeval_eq_ascPochhammer, ascPochhammer_smeval_eq_eval] + congr 1 + ring + +end Polynomial diff --git a/RealRooted/Mathlib/RingTheory/Polynomial/ScaleRoots/Separable.lean b/RealRooted/Mathlib/RingTheory/Polynomial/ScaleRoots/Separable.lean new file mode 100644 index 000000000..891e4b539 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/Polynomial/ScaleRoots/Separable.lean @@ -0,0 +1,48 @@ +/- +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.RingTheory.Polynomial.ScaleRoots +public import Mathlib.FieldTheory.Separable +import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure +import Mathlib.Tactic.TypeStar + +/-! +# Separability under root scaling + +Nonzero root scaling preserves separability over every field, including positive +characteristic, by transport of root multisets in an algebraic closure. +-/ + +public section + +namespace Polynomial + +/-- An injective matching of complete root multisets preserves separability. -/ +private theorem separable_iff_of_roots_map {K : Type*} [Field K] + {P Q : K[X]} (hP : P ≠ 0) (hQ : Q ≠ 0) (hsP : P.Splits) (hsQ : Q.Splits) + {f : K → K} (hf : Function.Injective f) (hroots : Q.roots = P.roots.map f) : + Q.Separable ↔ P.Separable := by + rw [← nodup_roots_iff_of_splits hQ hsQ, ← nodup_roots_iff_of_splits hP hsP, + hroots, Multiset.nodup_map_iff_of_injective hf] + +/-- Scaling every root by a nonzero field element preserves separability. -/ +theorem separable_scaleRoots_iff {K : Type*} [Field K] (P : K[X]) + {r : K} (hr : r ≠ 0) : (P.scaleRoots r).Separable ↔ P.Separable := by + by_cases hP : P = 0 + · simp [hP] + let f := algebraMap K (AlgebraicClosure K) + have hPf : P.map f ≠ 0 := Polynomial.map_ne_zero hP + have hrf : f r ≠ 0 := (_root_.map_ne_zero f).mpr hr + have hlc : f P.leadingCoeff ≠ 0 := + (_root_.map_ne_zero f).mpr (leadingCoeff_ne_zero.mpr hP) + have heq := map_scaleRoots P r f hlc + have h := separable_iff_of_roots_map hPf (scaleRoots_ne_zero hPf (f r)) + (IsAlgClosed.splits _) (IsAlgClosed.splits _) (mul_right_injective₀ hrf) + (roots_scaleRoots _ (isUnit_iff_ne_zero.mpr hrf)) + simpa only [← heq, separable_map] using h + +end Polynomial diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/BinomialTransform.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/BinomialTransform.lean new file mode 100644 index 000000000..86c550d8b --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/BinomialTransform.lean @@ -0,0 +1,104 @@ +/- +Copyright (c) 2026 RealRooted contributors, Tau Ceti contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors, Tau Ceti contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Step +public import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslation +import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslationSucc +public import Mathlib.RingTheory.PowerSeries.Substitution + +/-! +# Binomial translation of formal power series + +The formal substitution `G * f(X * G)`, with `G = (1 - c X)⁻¹`, is the +binomial transform of the coefficient sequence. A shift recurrence proves +the coefficient formula over any commutative ring, without convergence or +division by integers. The coefficient-shift argument follows +`PowerSeries.coeff_succ_subst_X_mul` in Tau Ceti (Apache 2.0). +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- The binomial transform, expressed by a formal fractional-linear substitution. -/ +@[expose] noncomputable def binomialTransform (c : R) (f : R⟦X⟧) : R⟦X⟧ := + stieltjesStep c 1 * f.subst (X * stieltjesStep c 1) + +/-- The geometric factor in the binomial transform inverts `1 - c X`. -/ +theorem one_sub_mul_binomialTransform (c : R) (f : R⟦X⟧) : + (1 - C c * X) * binomialTransform c f = + f.subst (X * stieltjesStep c 1) := by + rw [binomialTransform, ← mul_assoc] + have h : (1 - C c * X) * stieltjesStep c 1 = 1 := by + simpa only [mul_one] using one_sub_mul_stieltjesStep c (1 : R⟦X⟧) + rw [h, one_mul] + +/-- A binomial transform preserves the constant coefficient. -/ +@[simp] theorem constantCoeff_binomialTransform (c : R) (f : R⟦X⟧) : + constantCoeff (binomialTransform c f) = constantCoeff f := by + rw [binomialTransform, map_mul, constantCoeff_stieltjesStep, one_mul] + have h := constantCoeff_subst_of_constantCoeff_zero + (R := R) (a := X * stieltjesStep c (1 : R⟦X⟧)) + (by rw [← constantCoeff_eq]; simp) f + simpa only [← constantCoeff_eq, Algebra.algebraMap_self, RingHom.id_apply] using h + +/-- The next coefficient is determined by the transform of the shifted input. -/ +theorem coeff_succ_binomialTransform (c : R) (f : R⟦X⟧) (n : ℕ) : + coeff (n + 1) (binomialTransform c f) = + c * coeff n (binomialTransform c f) + + coeff n (binomialTransform c (mk fun k => coeff (k + 1) f)) := by + have hP : HasSubst (X * stieltjesStep c (1 : R⟦X⟧)) := + .of_constantCoeff_zero' (by simp) + have hshift : coeff (n + 1) (f.subst (X * stieltjesStep c 1)) = + coeff n (binomialTransform c (mk fun k => coeff (k + 1) f)) := by + conv_lhs => rw [f.eq_X_mul_shift_add_const] + rw [subst_add hP, subst_mul hP, subst_X hP, subst_C, ← C_apply, + mul_assoc, map_add, coeff_succ_X_mul] + simp only [coeff_C, Nat.add_one_ne_zero, ite_false, add_zero, binomialTransform] + have h := congrArg (coeff (n + 1)) (one_sub_mul_binomialTransform c f) + simp only [sub_mul, one_mul, map_sub, mul_assoc, coeff_C_mul, + coeff_succ_X_mul, hshift] at h + change coeff (n + 1) (binomialTransform c f) - + c * coeff n (binomialTransform c f) = + coeff n (binomialTransform c (mk fun k => coeff (k + 1) f)) at h + linear_combination h + +/-- Formal binomial substitution translates the coefficient moment sequence. -/ +theorem coeff_binomialTransform (c : R) (f : R⟦X⟧) (n : ℕ) : + coeff n (binomialTransform c f) = + Polynomial.momentTranslate c (fun k => coeff k f) n := by + induction n generalizing f with + | zero => + rw [Polynomial.momentTranslate_zero, coeff_zero_eq_constantCoeff_apply, + constantCoeff_binomialTransform, coeff_zero_eq_constantCoeff_apply] + | succ n ih => + rw [coeff_succ_binomialTransform, ih, ih, Polynomial.momentTranslate_succ] + simp only [coeff_mk] + +/-- The ordinary series of translated moments is the formal binomial transform. -/ +theorem binomialTransform_mk (c : R) (m : ℕ → R) : + binomialTransform c (mk m) = mk (Polynomial.momentTranslate c m) := by + ext n + simp only [coeff_binomialTransform, coeff_mk] + +/-- Constant outer mass factors commute with the binomial transform. -/ +theorem binomialTransform_C_mul (c a : R) (f : R⟦X⟧) : + binomialTransform c (C a * f) = C a * binomialTransform c f := by + have hy : HasSubst (X * stieltjesStep c (1 : R⟦X⟧)) := + .of_constantCoeff_zero' (by simp) + simp only [binomialTransform, subst_mul hy, subst_C, ← C_apply] + ring + +/-- Successive formal binomial transforms add their parameters. -/ +theorem binomialTransform_binomialTransform (b c : R) (f : R⟦X⟧) : + binomialTransform b (binomialTransform c f) = binomialTransform (b + c) f := by + ext n + simp only [coeff_binomialTransform, Polynomial.momentTranslate_momentTranslate] + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/BinomialTransform/Inverse.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/BinomialTransform/Inverse.lean new file mode 100644 index 000000000..8c2727a91 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/BinomialTransform/Inverse.lean @@ -0,0 +1,30 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform + +/-! +# Inverting a formal binomial transform +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- Translation by zero fixes the formal series. -/ +@[simp] theorem binomialTransform_zero (f : R⟦X⟧) : binomialTransform 0 f = f := by + ext n + simp only [coeff_binomialTransform, Polynomial.momentTranslate_zero_left] + +/-- Negative translation inverts the formal binomial transform. -/ +@[simp] theorem binomialTransform_neg_cancel (c : R) (f : R⟦X⟧) : + binomialTransform (-c) (binomialTransform c f) = f := by + rw [binomialTransform_binomialTransform, neg_add_cancel, binomialTransform_zero] + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/Centering.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/Centering.lean new file mode 100644 index 000000000..2a6beed8c --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/Centering.lean @@ -0,0 +1,69 @@ +/- +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.RingTheory.PowerSeries.Exp +import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient +import RealRooted.Mathlib.RingTheory.PowerSeries.LowDegree +import Mathlib.Tactic.Linarith +import Mathlib.Algebra.CharP.Algebra +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +import Mathlib.Tactic.TypeStar + +/-! +# Centering a formal symbol at its first coefficient + +Multiplication by the inverse linear exponential removes the linear term. +The new quadratic coefficient is half the second cumulant. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [Field R] [Algebra ℚ R] + +/-- A constant-one formal symbol has a centered quadratic factorization, with +its constant factor coefficient computed exactly. -/ +theorem exists_centered_quadratic_factor {φ : PowerSeries R} + (h0 : constantCoeff φ = 1) : + ∃ ψ : PowerSeries R, + rescale (-coeff 1 φ) (exp R) * φ = 1 + X ^ 2 * ψ ∧ + constantCoeff ψ = coeff 2 φ - coeff 1 φ ^ 2 / 2 := by + let : CharZero R := algebraRat.charZero R + let χ := rescale (-coeff 1 φ) (exp R) * φ + have hφ0 : coeff 0 φ = 1 := by simpa only [coeff_zero_eq_constantCoeff] using h0 + have hχ0 : constantCoeff χ = 1 := by + change constantCoeff (rescale (-coeff 1 φ) (exp R) * φ) = 1 + rw [map_mul, h0, mul_one, ← coeff_zero_eq_constantCoeff] + simp + have hχ1 : coeff 1 χ = 0 := by + change coeff 1 (rescale (-coeff 1 φ) (exp R) * φ) = 0 + rw [coeff_one_mul] + norm_num [coeff_rescale_exp, hφ0, ← coeff_zero_eq_constantCoeff] + have hχ2 : coeff 2 χ = coeff 2 φ - coeff 1 φ ^ 2 / 2 := by + change coeff 2 (rescale (-coeff 1 φ) (exp R) * φ) = _ + rw [coeff_two_mul] + norm_num [coeff_rescale_exp, hφ0, ← coeff_zero_eq_constantCoeff] + ring + have hdiv : X ^ 2 ∣ χ - 1 := by + apply X_pow_dvd_iff.mpr + intro k hk + have hk' : k = 0 ∨ k = 1 := by lia + rcases hk' with rfl | rfl + · simp [coeff_zero_eq_constantCoeff, hχ0] + · simp [hχ1] + obtain ⟨ψ, hψ⟩ := hdiv + have heq : χ = 1 + X ^ 2 * ψ := by + rw [← hψ] + ring + refine ⟨ψ, heq, ?_⟩ + have hcoeff := congrArg (coeff 2) heq + simpa [coeff_X_pow_mul', coeff_zero_eq_constantCoeff, hχ2] using hcoeff.symm + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/ExpCoefficient.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/ExpCoefficient.lean new file mode 100644 index 000000000..ca85b5b9f --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/ExpCoefficient.lean @@ -0,0 +1,27 @@ +/- +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.RingTheory.PowerSeries.Exp + +import Mathlib.Tactic.TypeStar + +/-! +# Factorial coefficients of rescaled formal exponentials +-/ + +public section + +namespace PowerSeries + +/-- Over a characteristic-zero field the rescaled exponential coefficient has +the ordinary factorial normalization. -/ +theorem coeff_rescale_exp {R : Type*} [Field R] [Algebra ℚ R] + (a : R) (n : ℕ) : + coeff n (rescale a (exp R)) = a ^ n / (n.factorial : R) := by + rw [coeff_rescale, coeff_exp, map_div₀, map_one, map_natCast, mul_one_div] + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/ExponentialJet.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/ExponentialJet.lean new file mode 100644 index 000000000..616ec6c71 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/ExponentialJet.lean @@ -0,0 +1,55 @@ +/- +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.RingTheory.PowerSeries.Exp +import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient +import Mathlib.Tactic.Ring + +import Mathlib.Tactic.TypeStar + +/-! +# Centering at a matching exponential jet +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [Field R] [Algebra ℚ R] + +/-- If a formal series agrees with a linear exponential below order `p`, +centering factors out `X^p`. The first centered coefficient is the exact +ordinary-coefficient discrepancy at order `p`. -/ +theorem exists_centered_factor_of_exponential_jet {φ : PowerSeries R} + (a : R) (p : ℕ) + (hjet : ∀ k < p, coeff k φ = a ^ k / (k.factorial : R)) : + ∃ ψ : PowerSeries R, + rescale (-a) (exp R) * φ = 1 + X ^ p * ψ ∧ + constantCoeff ψ = coeff p φ - a ^ p / (p.factorial : R) := by + have hdiv : X ^ p ∣ φ - rescale a (exp R) := by + apply X_pow_dvd_iff.mpr + intro k hk + rw [map_sub, hjet k hk, coeff_rescale_exp, sub_self] + obtain ⟨q, hq⟩ := hdiv + have hφ : φ = rescale a (exp R) + X ^ p * q := by + rw [← hq] + ring + have hcancel : rescale (-a) (exp R) * rescale a (exp R) = 1 := by + rw [exp_mul_exp_eq_exp_add, neg_add_cancel] + simp + refine ⟨rescale (-a) (exp R) * q, ?_, ?_⟩ + · rw [hφ, mul_add, hcancel] + congr 1 + ring + · have hcoeff := congrArg (coeff p) hq + have hq0 : constantCoeff q = coeff p φ - a ^ p / (p.factorial : R) := by + simpa [coeff_X_pow_mul', coeff_rescale_exp, coeff_zero_eq_constantCoeff, div_eq_mul_inv] + using hcoeff.symm + rw [map_mul, hq0, ← coeff_zero_eq_constantCoeff] + simp + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/FirstDiscrepancy.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/FirstDiscrepancy.lean new file mode 100644 index 000000000..b9cfba832 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/FirstDiscrepancy.lean @@ -0,0 +1,75 @@ +/- +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.RingTheory.PowerSeries.Exp +import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum + +import Mathlib.Tactic.TypeStar + +/-! +# The first discrepancy from a normalized linear exponential +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [Field R] [Algebra ℚ R] + +/-- A nonexponential formal symbol with nonzero constant term first differs +from its matching scaled exponential at an order of at least two. -/ +theorem exists_first_scaled_exponential_discrepancy {φ : PowerSeries R} + (h0 : constantCoeff φ ≠ 0) + (hne : φ ≠ C (constantCoeff φ) * + rescale (coeff 1 φ / constantCoeff φ) (exp R)) : + ∃ p : ℕ, 2 ≤ p ∧ + (∀ k < p, coeff k φ = constantCoeff φ * + (coeff 1 φ / constantCoeff φ) ^ k / (k.factorial : R)) ∧ + coeff p φ ≠ constantCoeff φ * + (coeff 1 φ / constantCoeff φ) ^ p / (p.factorial : R) := by + classical + have hex : ∃ p : ℕ, coeff p φ ≠ constantCoeff φ * + (coeff 1 φ / constantCoeff φ) ^ p / (p.factorial : R) := by + by_contra h + apply hne + ext k + rw [coeff_C_mul, coeff_rescale_exp, ← mul_div_assoc] + by_contra hk + exact h ⟨k, hk⟩ + let p := Nat.find hex + have hdiff : coeff p φ ≠ constantCoeff φ * + (coeff 1 φ / constantCoeff φ) ^ p / (p.factorial : R) := Nat.find_spec hex + have hp0 : p ≠ 0 := by + intro hp + rw [hp] at hdiff + exact hdiff (by simp only [coeff_zero_eq_constantCoeff, pow_zero, + Nat.factorial_zero, Nat.cast_one, mul_one, div_one]) + have hp1 : p ≠ 1 := by + intro hp + rw [hp] at hdiff + exact hdiff (by simp only [pow_one, Nat.factorial_one, Nat.cast_one, + div_one, mul_div_cancel₀ _ h0]) + refine ⟨p, by lia, ?_, hdiff⟩ + intro k hk + exact not_ne_iff.mp (Nat.find_min hex hk) + +/-- A normalized formal symbol which is not its matching linear exponential +has a first discrepancy of order at least two. -/ +theorem exists_first_exponential_discrepancy {φ : PowerSeries R} + (h0 : constantCoeff φ = 1) + (hne : φ ≠ rescale (coeff 1 φ) (exp R)) : + ∃ p : ℕ, 2 ≤ p ∧ + (∀ k < p, coeff k φ = coeff 1 φ ^ k / (k.factorial : R)) ∧ + coeff p φ ≠ coeff 1 φ ^ p / (p.factorial : R) := by + simpa only [h0, map_one, one_mul, div_one] using + exists_first_scaled_exponential_discrepancy + (φ := φ) (by rw [h0]; exact one_ne_zero) + (by simpa only [h0, map_one, one_mul, div_one] using hne) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/ActiveCoefficients.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/ActiveCoefficients.lean new file mode 100644 index 000000000..9ca018b1c --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/ActiveCoefficients.lean @@ -0,0 +1,80 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step +import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Coefficients + +import Mathlib.Tactic.TypeStar + +/-! +# Jacobi coefficients on the active prefix + +Equal formal Jacobi fractions determine both coefficient sequences only as far +as the first zero outgoing numerator. Later diagonals and numerators need not +agree. This is the precise coefficient comparison required in a terminating +version of Sokal's proof of Wall's criterion, arXiv:1903.12455v2, equation (11). +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] +variable {b c b' c' : ℕ → R} {F G : ℕ → R⟦X⟧} + +/-- Equal normalized Jacobi tails recover their current diagonal and numerator. -/ +theorem jacobiCoefficients_eq_of_tail_eq + (hF : ∀ n, F n = jacobiStep (b n) (c n) (F (n + 1))) + (hG : ∀ n, G n = jacobiStep (b' n) (c' n) (G (n + 1))) + {n : ℕ} (h : F n = G n) : b n = b' n ∧ c n = c' n := by + have hFn : constantCoeff (F (n + 1)) = 1 := by rw [hF]; simp + have hGn : constantCoeff (G (n + 1)) = 1 := by rw [hG]; simp + have hb : b n = b' n := by + have h1 := congrArg (coeff 1) h + simpa only [hF n, hG n, coeff_one_jacobiStep] using h1 + refine ⟨hb, ?_⟩ + have h2 := congrArg (coeff 2) h + simp only [hF n, hG n, coeff_two_jacobiStep, hFn, hGn, mul_one, hb] at h2 + exact add_left_cancel h2 + +variable [IsDomain R] + +/-- A nonzero outgoing numerator lets equality of Jacobi tails pass to the next level. -/ +theorem jacobiTail_succ_eq_of_ne_zero + (hF : ∀ n, F n = jacobiStep (b n) (c n) (F (n + 1))) + (hG : ∀ n, G n = jacobiStep (b' n) (c' n) (G (n + 1))) + {n : ℕ} (h : F n = G n) (hc : c n ≠ 0) : F (n + 1) = G (n + 1) := by + obtain ⟨hb, hc'⟩ := jacobiCoefficients_eq_of_tail_eq hF hG h + apply jacobiStep_injective (b n) hc + calc + jacobiStep (b n) (c n) (F (n + 1)) = F n := (hF n).symm + _ = G n := h + _ = jacobiStep (b n) (c n) (G (n + 1)) := by rw [hG n, hb, hc'] + +/-- Equality propagates to any level preceded only by nonzero outgoing numerators. -/ +theorem jacobiTail_eq_of_prefix_ne_zero + (hF : ∀ n, F n = jacobiStep (b n) (c n) (F (n + 1))) + (hG : ∀ n, G n = jacobiStep (b' n) (c' n) (G (n + 1))) + (h : F 0 = G 0) (n : ℕ) (hc : ∀ k < n, c k ≠ 0) : F n = G n := by + revert hc + induction n with + | zero => intro _; exact h + | succ n ih => + intro hc + have hn := ih (fun k hk => hc k (Nat.lt_trans hk (Nat.lt_succ_self n))) + exact jacobiTail_succ_eq_of_ne_zero hF hG hn (hc n (Nat.lt_succ_self n)) + +/-- Both Jacobi coefficients are determined through the first zero outgoing +numerator, including that numerator and its diagonal. -/ +theorem jacobiCoefficients_eq_of_prefix_ne_zero + (hF : ∀ n, F n = jacobiStep (b n) (c n) (F (n + 1))) + (hG : ∀ n, G n = jacobiStep (b' n) (c' n) (G (n + 1))) + (h : F 0 = G 0) (n : ℕ) (hc : ∀ k < n, c k ≠ 0) : + b n = b' n ∧ c n = c' n := + jacobiCoefficients_eq_of_tail_eq hF hG (jacobiTail_eq_of_prefix_ne_zero hF hG h n hc) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Aeration.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Aeration.lean new file mode 100644 index 000000000..405b6b014 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Aeration.lean @@ -0,0 +1,63 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform +import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Translation + +import Mathlib.Tactic.TypeStar + +/-! +# Aerating a formal Stieltjes fraction + +Substitution of `X^2` inserts zero odd coefficients. It turns a Stieltjes +tail into a Jacobi tail with zero diagonal and the same numerator sequence. +Binomial translation then makes every diagonal equal to the shift. + +See Sokal, arXiv:1903.12455v2, equations (9)-(10). +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- Substitution of the square variable inserts zero between successive coefficients. -/ +theorem coeff_subst_X_sq (f : R⟦X⟧) (n : ℕ) : + coeff n (f.subst (X ^ 2 : R⟦X⟧)) = + if n % 2 = 0 then coeff (n / 2) f else 0 := by + rw [coeff_subst_X_pow (by decide)] + simp only [Nat.dvd_iff_mod_eq_zero, Algebra.algebraMap_self, RingHom.id_apply] + +/-- An aerated Stieltjes step is a Jacobi step with zero diagonal. -/ +theorem subst_X_sq_stieltjesStep (a : R) (f : R⟦X⟧) : + (stieltjesStep a f).subst (X ^ 2 : R⟦X⟧) = + jacobiStep 0 a (f.subst (X ^ 2 : R⟦X⟧)) := by + have hy : HasSubst (X ^ 2 : R⟦X⟧) := .of_constantCoeff_zero' (by simp) + have h := congrArg (substAlgHom (R := R) hy) (one_sub_mul_stieltjesStep a f) + simp only [map_mul, map_sub, map_one, coe_substAlgHom, subst_C, ← C_apply, + subst_X hy] at h + apply eq_jacobiStep_of_mul_eq_one + simpa only [map_zero, zero_mul, sub_zero] using h + +/-- Every aerated Stieltjes tail satisfies the zero-diagonal Jacobi recurrence. -/ +theorem subst_X_sq_stieltjesTail_eq_step (a : ℕ → R) (n : ℕ) : + (stieltjesTail a n).subst (X ^ 2 : R⟦X⟧) = + jacobiStep 0 (a n) ((stieltjesTail a (n + 1)).subst (X ^ 2 : R⟦X⟧)) := by + rw [stieltjesTail_eq_step, subst_X_sq_stieltjesStep] + +/-- Translated aerated Stieltjes tails have a constant Jacobi diagonal. -/ +theorem binomialTransform_subst_X_sq_stieltjesTail_eq_step + (c : R) (a : ℕ → R) (n : ℕ) : + binomialTransform c ((stieltjesTail a n).subst (X ^ 2 : R⟦X⟧)) = + jacobiStep c (a n) + (binomialTransform c ((stieltjesTail a (n + 1)).subst (X ^ 2 : R⟦X⟧))) := by + rw [subst_X_sq_stieltjesTail_eq_step, binomialTransform_jacobiStep, zero_add] + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Coefficients.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Coefficients.lean new file mode 100644 index 000000000..10e08c00a --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Coefficients.lean @@ -0,0 +1,73 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step + +import Mathlib.Tactic.TypeStar + +/-! +# Recovering the two coefficients of a formal Jacobi step + +The linear coefficient is the diagonal. The quadratic coefficient is its +square plus the outgoing numerator times the constant coefficient of the tail. +A nonzero outgoing numerator determines the entire tail over an integral domain. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- The Jacobi step recurrence with the first variable factor separated. -/ +theorem jacobiStep_eq_one_add (b c : R) (f : R⟦X⟧) : + jacobiStep b c f = + 1 + X * (C b * jacobiStep b c f + X * (C c * f * jacobiStep b c f)) := by + linear_combination one_sub_mul_jacobiStep b c f + +/-- Coefficients of a Jacobi step satisfy the associated two-term convolution. -/ +theorem coeff_succ_jacobiStep (b c : R) (f : R⟦X⟧) (n : ℕ) : + coeff (n + 1) (jacobiStep b c f) = b * coeff n (jacobiStep b c f) + + coeff n (X * (C c * f * jacobiStep b c f)) := by + have h := congrArg (coeff (n + 1)) (jacobiStep_eq_one_add b c f) + simpa only [map_add, coeff_one, Nat.add_one_ne_zero, ite_false, zero_add, + coeff_succ_X_mul, coeff_C_mul] using h + +/-- The first coefficient recovers the Jacobi diagonal. -/ +@[simp] theorem coeff_one_jacobiStep (b c : R) (f : R⟦X⟧) : + coeff 1 (jacobiStep b c f) = b := by + simpa only [coeff_zero_eq_constantCoeff_apply, map_mul, constantCoeff_X, + zero_mul, constantCoeff_jacobiStep, mul_one, add_zero] using + coeff_succ_jacobiStep b c f 0 + +/-- The second coefficient recovers the outgoing numerator for a normalized tail. -/ +theorem coeff_two_jacobiStep (b c : R) (f : R⟦X⟧) : + coeff 2 (jacobiStep b c f) = b * b + c * constantCoeff f := by + simpa only [coeff_one_jacobiStep, coeff_succ_X_mul, + coeff_zero_eq_constantCoeff_apply, map_mul, constantCoeff_C, + constantCoeff_jacobiStep, mul_one] using coeff_succ_jacobiStep b c f 1 + +/-- A Jacobi step with a nonzero outgoing numerator determines its tail. -/ +theorem jacobiStep_injective [IsDomain R] (b : R) {c : R} (hc : c ≠ 0) : + Function.Injective (jacobiStep b c) := by + intro f g h + have hs : jacobiStep b c f ≠ 0 := by + intro hz + have hconst := congrArg constantCoeff hz + simp at hconst + have hC : (C c : R⟦X⟧) ≠ 0 := by + intro hz + have hconst := congrArg constantCoeff hz + exact hc (by simpa using hconst) + have hmul : (1 - C b * X - C c * X ^ 2 * f) * jacobiStep b c f = + (1 - C b * X - C c * X ^ 2 * g) * jacobiStep b c f := by + rw [one_sub_mul_jacobiStep, h, one_sub_mul_jacobiStep] + have hd := mul_right_cancel₀ hs hmul + apply mul_left_cancel₀ (mul_ne_zero hC (pow_ne_zero 2 X_ne_zero)) + linear_combination -hd + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Step.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Step.lean new file mode 100644 index 000000000..0893344c1 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Step.lean @@ -0,0 +1,84 @@ +/- +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.RingTheory.PowerSeries.Inverse + +/-! +# Formal Jacobi continued-fraction steps + +The inverse of `1 - b X - c X² f` is defined over an arbitrary commutative +ring. Its constant coefficient is one, and changes in the tail gain two +powers of `X`. In particular, a family of Jacobi tail equations has at most +one solution in formal power series. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- One Jacobi continued-fraction step. -/ +@[expose] noncomputable def jacobiStep (b c : R) (f : R⟦X⟧) : R⟦X⟧ := + invOfUnit (1 - C b * X - C c * X ^ 2 * f) 1 + +/-- A formal Jacobi step has constant coefficient one. -/ +@[simp] theorem constantCoeff_jacobiStep (b c : R) (f : R⟦X⟧) : + constantCoeff (jacobiStep b c f) = 1 := by + simp only [jacobiStep, constantCoeff_invOfUnit, inv_one, Units.val_one] + +/-- A Jacobi step inverts its constant-term-one denominator. -/ +theorem one_sub_mul_jacobiStep (b c : R) (f : R⟦X⟧) : + (1 - C b * X - C c * X ^ 2 * f) * jacobiStep b c f = 1 := by + exact mul_invOfUnit _ 1 (by simp) + +/-- A right inverse of a Jacobi denominator equals its formal Jacobi step. -/ +theorem eq_jacobiStep_of_mul_eq_one {b c : R} {f g : R⟦X⟧} + (h : (1 - C b * X - C c * X ^ 2 * f) * g = 1) : + g = jacobiStep b c f := by + calc + g = g * ((1 - C b * X - C c * X ^ 2 * f) * jacobiStep b c f) := by + rw [one_sub_mul_jacobiStep, mul_one] + _ = ((1 - C b * X - C c * X ^ 2 * f) * g) * jacobiStep b c f := by ring + _ = jacobiStep b c f := by rw [h, one_mul] + +/-- Difference identity for Jacobi steps with the same two coefficients. -/ +theorem jacobiStep_sub (b c : R) (f g : R⟦X⟧) : + jacobiStep b c f - jacobiStep b c g = + C c * X ^ 2 * (f - g) * jacobiStep b c f * jacobiStep b c g := by + linear_combination + jacobiStep b c g * one_sub_mul_jacobiStep b c f - + jacobiStep b c f * one_sub_mul_jacobiStep b c g + +/-- A Jacobi step raises the order of a tail error by two. -/ +theorem X_pow_dvd_jacobiStep_sub {n : ℕ} (b c : R) {f g : R⟦X⟧} + (h : X ^ n ∣ f - g) : X ^ (n + 2) ∣ jacobiStep b c f - jacobiStep b c g := by + obtain ⟨q, hq⟩ := h + rw [jacobiStep_sub, hq] + refine ⟨C c * q * jacobiStep b c f * jacobiStep b c g, ?_⟩ + rw [pow_add] + ring + +/-- Formal Jacobi tail equations have at most one solution, with no sign or +growth restrictions on either coefficient sequence. -/ +theorem eq_of_jacobiStep_eq {b c : ℕ → R} {F G : ℕ → R⟦X⟧} + (hF : ∀ s, F s = jacobiStep (b s) (c s) (F (s + 1))) + (hG : ∀ s, G s = jacobiStep (b s) (c s) (G (s + 1))) : F = G := by + have hdiv (n : ℕ) : ∀ s, X ^ (2 * n) ∣ F s - G s := by + induction n with + | zero => intro s; simp + | succ n ih => + intro s + rw [hF s, hG s] + simpa only [Nat.mul_succ] using + X_pow_dvd_jacobiStep_sub (b s) (c s) (ih (s + 1)) + funext s + ext k + have h := X_pow_dvd_iff.mp (hdiv (k + 1) s) k (by lia) + exact sub_eq_zero.mp (by simpa only [map_sub] using h) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Translation.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Translation.lean new file mode 100644 index 000000000..b49aa3a80 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Translation.lean @@ -0,0 +1,70 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Contraction + +/-! +# Translation of formal Jacobi coefficients + +A binomial transform adds its parameter to every diagonal coefficient of +a Jacobi fraction and leaves its outgoing numerator unchanged. This is a +formal identity over a commutative ring, including zero coefficients and +terminating fractions. + +See Barry, J. Integer Sequences 12 (2009), Proposition 4, and Sokal-Walrad, +arXiv:2404.12131v1, equations (7)-(9). +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- Binomial transformation shifts the diagonal of one Jacobi step. -/ +theorem binomialTransform_jacobiStep (c b d : R) (f : R⟦X⟧) : + binomialTransform c (jacobiStep b d f) = + jacobiStep (b + c) d (binomialTransform c f) := by + let G : R⟦X⟧ := stieltjesStep c 1 + let y : R⟦X⟧ := X * G + have hy : HasSubst y := .of_constantCoeff_zero' (by simp [y]) + have hG : (1 - C c * X) * G = 1 := by + simpa only [G, mul_one] using one_sub_mul_stieltjesStep c (1 : R⟦X⟧) + have hs := congrArg (substAlgHom (R := R) hy) (one_sub_mul_jacobiStep b d f) + simp only [map_mul, map_sub, map_one, map_pow, coe_substAlgHom, subst_C, ← C_apply, + subst_X hy] at hs + apply eq_jacobiStep_of_mul_eq_one + change (1 - C (b + c) * X - C d * X ^ 2 * (G * f.subst y)) * + (G * (jacobiStep b d f).subst y) = 1 + simp only [map_add] + dsimp only [y] at hs ⊢ + linear_combination hs + (jacobiStep b d f).subst (X * G) * hG + +/-- Every member of a formal Jacobi tail family undergoes the same diagonal shift. -/ +theorem binomialTransform_jacobiTail_eq_step (c : R) {b d : ℕ → R} + {F : ℕ → R⟦X⟧} + (hF : ∀ n, F n = jacobiStep (b n) (d n) (F (n + 1))) (n : ℕ) : + binomialTransform c (F n) = + jacobiStep (b n + c) (d n) (binomialTransform c (F (n + 1))) := by + rw [hF n, binomialTransform_jacobiStep] + +/-- Equal contracted Jacobi data identify a translated Stieltjes fraction. +No standard-tail or nonvanishing condition is required. -/ +theorem binomialTransform_stieltjesTail_eq {a a' : ℕ → R} (c : R) + (hd : ∀ n, stieltjesJacobiDiagonal a' n = stieltjesJacobiDiagonal a n + c) + (hn : ∀ n, stieltjesJacobiNumerator a' n = stieltjesJacobiNumerator a n) : + binomialTransform c (stieltjesTail a 0) = stieltjesTail a' 0 := by + have h : (fun n => binomialTransform c (stieltjesJacobiTail a n)) = + stieltjesJacobiTail a' := by + apply eq_of_jacobiStep_eq + · intro n + rw [stieltjesJacobiTail_eq_step, binomialTransform_jacobiStep, ← hd n, ← hn n] + · exact stieltjesJacobiTail_eq_step a' + exact congrFun h 0 + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/LowDegree.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/LowDegree.lean new file mode 100644 index 000000000..9a66a1ce2 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/LowDegree.lean @@ -0,0 +1,41 @@ +/- +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.RingTheory.PowerSeries.Basic +import Mathlib.Tactic.TypeStar + +/-! +# Second coefficients of products and powers of formal power series +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommSemiring R] + +/-- The second coefficient of a product is a three-term convolution. -/ +theorem coeff_two_mul (φ ψ : PowerSeries R) : + coeff 2 (φ * ψ) = coeff 2 φ * constantCoeff ψ + + coeff 1 φ * coeff 1 ψ + constantCoeff φ * coeff 2 ψ := by + have h : Finset.antidiagonal 2 = {(0, 2), (1, 1), (2, 0)} := rfl + simp [coeff_mul, h, coeff_zero_eq_constantCoeff] + ring + +/-- The second coefficient of a power with unit constant coefficient. -/ +theorem coeff_two_pow_of_constantCoeff_eq_one {φ : PowerSeries R} + (h0 : constantCoeff φ = 1) (m : ℕ) : + coeff 2 (φ ^ m) = (m : R) * coeff 2 φ + (m.choose 2 : R) * coeff 1 φ ^ 2 := by + induction m with + | zero => simp + | succ m ih => + rw [pow_succ, coeff_two_mul, ih, coeff_one_pow] + simp only [map_pow, h0, one_pow, mul_one, one_mul, + Nat.choose_succ_succ, Nat.choose_one_right, Nat.cast_add, Nat.cast_one] + ring + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/PowerCoefficient.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/PowerCoefficient.lean new file mode 100644 index 000000000..0c132e226 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/PowerCoefficient.lean @@ -0,0 +1,80 @@ +/- +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.RingTheory.PowerSeries.Basic +import Mathlib.Tactic.TypeStar + +/-! +# Fixed finite coefficient sums for powers of a formal series + +If a formal series starts with `1 + X^p * ψ`, each fixed coefficient of its +`m`th power is a sum with a bound independent of `m`. This finite identity +is useful for rescaled differential-operator limits. +-/ + +public section + +open Finset + +namespace PowerSeries + +variable {R : Type*} [CommSemiring R] + +/-- Extending the finite binomial sum adds only zero binomial coefficients. -/ +private theorem sum_choose_truncated (m q : ℕ) (f : ℕ → R) : + ∑ k ∈ range (m + 1), (if k ≤ q then (m.choose k : R) * f k else 0) = + ∑ k ∈ range (q + 1), (m.choose k : R) * f k := by + by_cases hmq : m ≤ q + · calc + _ = ∑ k ∈ range (m + 1), (m.choose k : R) * f k := by + apply sum_congr rfl + intro k hk + rw [ite_eq_left ((Nat.lt_succ_iff.mp (mem_range.mp hk)).trans hmq)] + _ = _ := by + apply sum_subset (range_subset_range.mpr (Nat.add_le_add_right hmq 1)) + intro k _ hk + have hmk : m < k := by + simp only [mem_range] at hk + lia + simp [Nat.choose_eq_zero_of_lt hmk] + · have hqm : q ≤ m := (lt_of_not_ge hmq).le + symm + calc + _ = ∑ k ∈ range (q + 1), + (if k ≤ q then (m.choose k : R) * f k else 0) := by + apply sum_congr rfl + intro k hk + rw [ite_eq_left (Nat.lt_succ_iff.mp (mem_range.mp hk))] + _ = _ := by + apply sum_subset (range_subset_range.mpr (Nat.add_le_add_right hqm 1)) + intro k _ hk + have hkq : ¬ k ≤ q := by + simp only [mem_range] at hk + lia + exact ite_eq_right hkq + +/-- Every fixed coefficient of `(1 + X^p * ψ)^m` is a binomial sum whose +length depends only on that coefficient, including `m = 0`. -/ +theorem coeff_one_add_X_pow_mul_pow (ψ : PowerSeries R) {p : ℕ} (hp : 0 < p) + (m j : ℕ) : + coeff j ((1 + X ^ p * ψ) ^ m) = + ∑ k ∈ range (j / p + 1), + (m.choose k : R) * coeff (j - p * k) (ψ ^ k) := by + calc + _ = ∑ k ∈ range (m + 1), + (if k ≤ j / p then (m.choose k : R) * coeff (j - p * k) (ψ ^ k) else 0) := by + rw [add_comm (1 : PowerSeries R), add_pow, map_sum] + apply sum_congr rfl + intro k _ + have hiff : p * k ≤ j ↔ k ≤ j / p := by + simpa only [Nat.mul_comm] using (Nat.le_div_iff_mul_le hp).symm + simp only [one_pow, mul_one, mul_pow, ← pow_mul, coeff_mul_natCast, + coeff_X_pow_mul', hiff] + split_ifs <;> simp [mul_comm] + _ = _ := sum_choose_truncated m (j / p) _ + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/RescaledPowerLimit.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/RescaledPowerLimit.lean new file mode 100644 index 000000000..3d3edf73d --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/RescaledPowerLimit.lean @@ -0,0 +1,115 @@ +/- +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.RingTheory.PowerSeries.Expand +public import Mathlib.RingTheory.PowerSeries.Exp +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import RealRooted.Mathlib.RingTheory.PowerSeries.PowerCoefficient +import RealRooted.Mathlib.Analysis.SpecialFunctions.ChooseRpow + +/-! +# Coefficient limits of rescaled powers of a formal series + +For `φ = 1 + X^p * ψ`, the series `φ(m^(-1/p) X)^m` tends coefficientwise +to `exp(ψ(0) X^p)`. The proof uses fixed finite binomial sums and does not +assume that either formal series has a positive convergence radius. +-/ + +public section + +open Filter Topology Finset + +namespace PowerSeries + +/-- Only the critical binomial index survives after rescaling. -/ +private theorem tendsto_power_coefficient_term (ψ : PowerSeries ℝ) {p : ℕ} + (hp : 0 < p) (j k : ℕ) (hk : k ≤ j / p) : + Tendsto (fun m : ℕ ↦ (m.choose k : ℝ) * (m : ℝ) ^ (-((j : ℝ) / p)) * + coeff (j - p * k) (ψ ^ k)) atTop + (𝓝 (if p * k = j then constantCoeff ψ ^ k / k.factorial else 0)) := by + have hpR : 0 < (p : ℝ) := by exact_mod_cast hp + by_cases hpk : p * k = j + · have hu : (j : ℝ) / p = k := by + rw [← hpk, Nat.cast_mul] + field_simp [hpR.ne'] + have h := (Nat.tendsto_choose_mul_rpow_atTop k).mul_const + (coeff (j - p * k) (ψ ^ k)) + have hsub : j - p * k = 0 := by lia + rw [hu, ite_eq_left hpk] + simpa only [hsub, coeff_zero_eq_constantCoeff, map_pow, one_div, + div_eq_mul_inv, mul_one, one_mul, mul_comm] using h + · have hle : p * k ≤ j := + (Nat.mul_le_mul_left p hk).trans (Nat.mul_div_le j p) + have hlt : p * k < j := lt_of_le_of_ne hle hpk + have hu : (k : ℝ) < (j : ℝ) / p := by + apply (lt_div_iff₀ hpR).mpr + exact_mod_cast (by simpa only [Nat.mul_comm] using hlt) + have h := (Nat.tendsto_choose_mul_rpow_atTop_of_lt k hu).mul_const + (coeff (j - p * k) (ψ ^ k)) + simpa only [ite_eq_right hpk, zero_mul] using h + +/-- The critical-index sum records the divisibility of the output degree. -/ +private theorem sum_critical_coefficients (b : ℝ) {p : ℕ} (hp : 0 < p) (j : ℕ) : + (∑ k ∈ range (j / p + 1), + (if p * k = j then b ^ k / k.factorial else 0)) = + if p ∣ j then b ^ (j / p) / (j / p).factorial else 0 := by + by_cases hdiv : p ∣ j + · have hmul : p * (j / p) = j := Nat.mul_div_cancel' hdiv + rw [ite_eq_left hdiv, Finset.sum_eq_single (j / p)] + · simp [hmul] + · intro k _ hk + have hne : p * k ≠ j := by + intro h + exact hk (Nat.eq_of_mul_eq_mul_left hp (h.trans hmul.symm)) + exact ite_eq_right hne + · simp + · rw [ite_eq_right hdiv] + apply Finset.sum_eq_zero + intro k _ + have hne : p * k ≠ j := fun h ↦ hdiv ⟨k, h.symm⟩ + exact ite_eq_right hne + +/-- The explicit coefficient limit of a rescaled formal power. -/ +theorem tendsto_coeff_rescaled_one_add_X_pow_mul (ψ : PowerSeries ℝ) {p : ℕ} + (hp : 0 < p) (j : ℕ) : + Tendsto (fun m : ℕ ↦ coeff j + ((rescale ((m : ℝ) ^ (-(p : ℝ)⁻¹)) (1 + X ^ p * ψ)) ^ m)) atTop + (𝓝 (if p ∣ j then constantCoeff ψ ^ (j / p) / (j / p).factorial else 0)) := by + have hscale (m : ℕ) : ((m : ℝ) ^ (-(p : ℝ)⁻¹)) ^ j = + (m : ℝ) ^ (-((j : ℝ) / p)) := by + rw [← Real.rpow_natCast, ← Real.rpow_mul (Nat.cast_nonneg m)] + congr 1 + ring + have heq : (fun m : ℕ ↦ coeff j + ((rescale ((m : ℝ) ^ (-(p : ℝ)⁻¹)) (1 + X ^ p * ψ)) ^ m)) = + (fun m : ℕ ↦ ∑ k ∈ range (j / p + 1), + (m.choose k : ℝ) * (m : ℝ) ^ (-((j : ℝ) / p)) * + coeff (j - p * k) (ψ ^ k)) := by + funext m + rw [← map_pow, coeff_rescale, hscale, + coeff_one_add_X_pow_mul_pow ψ hp, Finset.mul_sum] + apply Finset.sum_congr rfl + intro k _ + ring + rw [heq] + have h := tendsto_finsetSum (range (j / p + 1)) + (fun k hk ↦ tendsto_power_coefficient_term ψ hp j k + (Nat.lt_succ_iff.mp (mem_range.mp hk))) + rwa [sum_critical_coefficients (constantCoeff ψ) hp j] at h + +/-- The rescaled formal powers converge coefficientwise to the formal +exponential of their first possible nonconstant term. -/ +theorem tendsto_coeff_rescale_pow_exp (ψ : PowerSeries ℝ) {p : ℕ} + (hp : 0 < p) (j : ℕ) : + Tendsto (fun m : ℕ ↦ coeff j + ((rescale ((m : ℝ) ^ (-(p : ℝ)⁻¹)) (1 + X ^ p * ψ)) ^ m)) atTop + (𝓝 (coeff j (expand p hp.ne' + (rescale (constantCoeff ψ) (exp ℝ))))) := by + simpa only [coeff_expand, coeff_rescale, coeff_exp, map_div₀, map_one, + map_natCast, mul_one_div] using tendsto_coeff_rescaled_one_add_X_pow_mul ψ hp j + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ActivePrefix.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ActivePrefix.lean new file mode 100644 index 000000000..9b304630d --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ActivePrefix.lean @@ -0,0 +1,64 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Uniqueness + +/-! +# Equality of Stieltjes fractions on their active prefixes + +The first zero numerator belongs to the active prefix. Every coefficient +after it is irrelevant to the formal fraction. In particular an existential +tail parametrization must not be imposed on a standardized zero tail. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- Agreement up to a terminating numerator, including that zero, gives the +same formal fraction regardless of the remaining tails. -/ +theorem stieltjesTail_eq_of_terminating_prefix {a b : ℕ → R} {N : ℕ} + (ha : a N = 0) (hab : ∀ k ≤ N, a k = b k) : + stieltjesTail a 0 = stieltjesTail b 0 := by + have hb : b N = 0 := (hab N le_rfl).symm.trans ha + rw [stieltjesTail_eq_convergent_of_zero a N 0 (by simpa using ha), + stieltjesTail_eq_convergent_of_zero b N 0 (by simpa using hb)] + exact stieltjesConvergent_eq_of_prefix N 0 0 fun i hi => by + simpa only [Nat.zero_add] using hab i hi.le + +/-- Agreement at every active numerator is sufficient for equality of formal fractions. -/ +theorem stieltjesTail_eq_of_active_prefix {a b : ℕ → R} + (hab : ∀ n, (∀ k < n, a k ≠ 0) → a n = b n) : + stieltjesTail a 0 = stieltjesTail b 0 := by + classical + by_cases hz : ∃ n, a n = 0 + · let N := Nat.find hz + have hN : a N = 0 := Nat.find_spec hz + apply stieltjesTail_eq_of_terminating_prefix hN + intro k hk + apply hab k + intro j hj + exact Nat.find_min hz (hj.trans_le hk) + · push Not at hz + have heq : a = b := funext fun n => hab n (fun k _ => hz k) + rw [heq] + +/-- Equality of normalized fractions is exactly agreement through the first zero. +This is the active-prefix form of the usual uniqueness theorem. -/ +theorem stieltjesTail_eq_iff_active_prefix [IsDomain R] {a b : ℕ → R} : + stieltjesTail a 0 = stieltjesTail b 0 ↔ + ∀ n, (∀ k < n, a k ≠ 0) → a n = b n := by + constructor + · intro h n hn + simpa only [Nat.zero_add] using + eq_of_stieltjesTail_eq_of_prefix_ne_zero n h (by simpa using hn) + · exact stieltjesTail_eq_of_active_prefix + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ActiveSupportCriterion.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ActiveSupportCriterion.lean new file mode 100644 index 000000000..616ec09f7 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ActiveSupportCriterion.lean @@ -0,0 +1,64 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportCriterion +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActivePrefix + +/-! +# Lower support criteria on the active numerator prefix + +For a fixed normalized Stieltjes fraction, agreement with the lower-support +parameters is required only until its first zero, including that zero. Later +numerators may be arbitrary. This avoids imposing a nonstandard existential +tail parametrization on the standard all-zero inactive tail. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- The lower-support criterion for a fixed normalized fraction depends only +on the active prefix of its numerator sequence. -/ +theorem exists_moments_Ici_iff_active_parameters (a : ℕ → ℝ) {c : ℝ} (hc : 0 ≤ c) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = coeff n (stieltjesTail a 0)) ↔ + ∃ u v : ℕ → ℝ, u 0 = 0 ∧ (∀ k, 0 ≤ u k) ∧ (∀ k, 0 ≤ v k) ∧ + ∀ n, (∀ k < n, a k ≠ 0) → a n = shiftedStieltjesNumerators c u v n := by + have hmk : mk (fun n => coeff n (stieltjesTail a 0)) = stieltjesTail a 0 := by + ext n + simp + rw [exists_measure_moments_Ici_iff_parameters _ hc, hmk] + constructor + · rintro ⟨mass, u, v, _, hu0, hu, hv, hf⟩ + have hmass : mass = 1 := by + have h := congrArg constantCoeff hf + simpa using h.symm + have heq : stieltjesTail a 0 = stieltjesTail (shiftedStieltjesNumerators c u v) 0 := by + simpa only [hmass, map_one, one_mul] using hf + exact ⟨u, v, hu0, hu, hv, stieltjesTail_eq_iff_active_prefix.mp heq⟩ + · rintro ⟨u, v, hu0, hu, hv, hprefix⟩ + refine ⟨1, u, v, zero_le_one, hu0, hu, hv, ?_⟩ + simpa only [map_one, one_mul] using stieltjesTail_eq_of_active_prefix hprefix + +/-- The odd-numerator lower bound applies to active coefficients of any +normalized representation, not to its arbitrary inactive zero tail. -/ +theorem le_active_stieltjesNumerator {a : ℕ → ℝ} {c : ℝ} (hc : 0 ≤ c) + (hmom : ∃ mu : Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = coeff n (stieltjesTail a 0)) + (j : ℕ) (hactive : ∀ k < 2 * j, a k ≠ 0) : c ≤ a (2 * j) := by + obtain ⟨u, v, _, hu, hv, hprefix⟩ := + (exists_moments_Ici_iff_active_parameters a hc).mp hmom + rw [hprefix (2 * j) hactive] + exact le_shiftedStieltjesNumerators_even hc hu hv j + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/AdmissibleParameters.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/AdmissibleParameters.lean new file mode 100644 index 000000000..bd0ec4df3 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/AdmissibleParameters.lean @@ -0,0 +1,79 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters + +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActiveSupportCriterion +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerParameters + +/-! +# Admissible initial parameters on the active prefix + +The fixed fraction is matched only through its first terminating numerator. +For a nonterminating fraction this is full coefficient equality. This is the +termination-aware interpretation of the parameter set in Sokal-Walrad, +arXiv:2404.12131v1, Remark 2. It is nonempty under the support hypothesis, +downward closed within the nonnegative half-line, and bounded for a positive shift. +-/ + +public section + +namespace PowerSeries + +/-- Initial parameters that reproduce the active numerator prefix. -/ +@[expose] def admissibleStieltjesParameters (c : ℝ) (a : ℕ → ℝ) : Set ℝ := + {r | ∃ u v : ℕ → ℝ, u 0 = r ∧ (∀ k, 0 ≤ u k) ∧ (∀ k, 0 ≤ v k) ∧ + ∀ n, (∀ k < n, a k ≠ 0) → a n = shiftedStieltjesNumerators c u v n} + +/-- Every admissible initial parameter is nonnegative. -/ +theorem nonneg_of_mem_admissibleStieltjesParameters {c r : ℝ} {a : ℕ → ℝ} + (hr : r ∈ admissibleStieltjesParameters c a) : 0 ≤ r := by + obtain ⟨u, v, hu0, hu, _, _⟩ := hr + simpa only [hu0] using hu 0 + +/-- Every smaller nonnegative initial parameter is also admissible. -/ +theorem mem_admissibleStieltjesParameters_of_le {c r s : ℝ} (hc : 0 ≤ c) + {a : ℕ → ℝ} (hs : s ∈ admissibleStieltjesParameters c a) + (hr : 0 ≤ r) (hrs : r ≤ s) : r ∈ admissibleStieltjesParameters c a := by + obtain ⟨u, v, hu0, hu, hv, hp⟩ := hs + obtain ⟨u', v', hu0', hu', hv', heq⟩ := + exists_lower_stieltjesParameters hc hu hv hr (by simpa only [hu0] using hrs) + refine ⟨u', v', hu0', fun k => (hu' k).1, fun k => (hv k).trans (hv' k), ?_⟩ + intro n hn + rw [heq] + exact hp n hn + +/-- The admissible parameters form an order interval, possibly empty. -/ +theorem ordConnected_admissibleStieltjesParameters {c : ℝ} (hc : 0 ≤ c) + (a : ℕ → ℝ) : Set.OrdConnected (admissibleStieltjesParameters c a) := by + refine ⟨fun x hx y hy z hz => ?_⟩ + exact mem_admissibleStieltjesParameters_of_le hc hy + ((nonneg_of_mem_admissibleStieltjesParameters hx).trans hz.1) hz.2 + +/-- The first numerator bounds every admissible initial parameter when the shift is positive. -/ +theorem mem_admissibleStieltjesParameters_le {c r : ℝ} (hc : 0 < c) + {a : ℕ → ℝ} (hr : r ∈ admissibleStieltjesParameters c a) : + r ≤ a 0 / c - 1 := by + obtain ⟨u, v, hu0, _, hv, hp⟩ := hr + have h0 := hp 0 (by simp) + have heq : a 0 = c * (1 + r) + v 0 := by + simpa [shiftedStieltjesNumerators, hu0] using h0 + have hv0 := hv 0 + have hquot : r + 1 ≤ a 0 / c := (le_div_iff₀ hc).mpr (by nlinarith) + linarith + +/-- An actual lower-support measure makes the corrected parameter set nonempty. -/ +theorem zero_mem_admissibleStieltjesParameters {c : ℝ} (hc : 0 ≤ c) + {a : ℕ → ℝ} + (hmom : ∃ mu : MeasureTheory.Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, MeasureTheory.Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = coeff n (stieltjesTail a 0)) : + 0 ∈ admissibleStieltjesParameters c a := + (exists_moments_Ici_iff_active_parameters a hc).mp hmom + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/BoundedParameters.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/BoundedParameters.lean new file mode 100644 index 000000000..3e36d219f --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/BoundedParameters.lean @@ -0,0 +1,119 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.AdmissibleParameters + +/-! +# Bounded representatives of active Stieltjes parameters + +After a terminating numerator, parameters can be set to zero without changing +the active equations. For a positive shift this gives coordinatewise compact +bounds from the prescribed even-indexed numerators. +-/ + +public section + +namespace PowerSeries + +/-- Without terminating numerators, active-prefix admissibility is precisely +the full-index parameter formulation. -/ +theorem mem_admissibleStieltjesParameters_iff_of_ne_zero + {a : ℕ → ℝ} (ha : ∀ n, a n ≠ 0) (c r : ℝ) : + r ∈ admissibleStieltjesParameters c a ↔ + ∃ u v : ℕ → ℝ, u 0 = r ∧ (∀ k, 0 ≤ u k) ∧ (∀ k, 0 ≤ v k) ∧ + a = shiftedStieltjesNumerators c u v := by + constructor + · rintro ⟨u, v, hu0, hu, hv, hp⟩ + exact ⟨u, v, hu0, hu, hv, funext fun n => hp n (fun i _ => ha i)⟩ + · rintro ⟨u, v, hu0, hu, hv, heq⟩ + exact ⟨u, v, hu0, hu, hv, fun n _ => congrFun heq n⟩ + +/-- Remove the inactive even-parameter tail after the first terminating numerator. -/ +@[expose] noncomputable def activeStieltjesParameters (a u : ℕ → ℝ) (k : ℕ) : ℝ := by + classical + exact if ∀ i < 2 * k, a i ≠ 0 then u k else 0 + +/-- The initial parameter always belongs to the active prefix. -/ +@[simp] theorem activeStieltjesParameters_zero (a u : ℕ → ℝ) : + activeStieltjesParameters a u 0 = u 0 := by + simp [activeStieltjesParameters] + +/-- Removing inactive parameters preserves their nonnegativity. -/ +theorem activeStieltjesParameters_nonneg (a : ℕ → ℝ) {u : ℕ → ℝ} + (hu : ∀ k, 0 ≤ u k) (k : ℕ) : 0 ≤ activeStieltjesParameters a u k := by + classical + unfold activeStieltjesParameters + split_ifs + · exact hu k + · exact le_rfl + +/-- The parameter equations remain valid throughout the active prefix after +both parameter tails are removed. -/ +theorem shiftedStieltjesNumerators_active {a u v : ℕ → ℝ} {c : ℝ} + (hp : ∀ n, (∀ i < n, a i ≠ 0) → a n = shiftedStieltjesNumerators c u v n) : + ∀ n, (∀ i < n, a i ≠ 0) → a n = shiftedStieltjesNumerators c + (activeStieltjesParameters a u) (activeStieltjesParameters a v) n := by + classical + intro n hn + obtain ⟨k, hk | hk⟩ := Nat.even_or_odd' n + · subst n + simpa only [shiftedStieltjesNumerators_even, activeStieltjesParameters, + ite_eq_left hn] using hp (2 * k) hn + · subst n + have hprev : ∀ i < 2 * k, a i ≠ 0 := fun i hi => hn i (by lia) + rw [shiftedStieltjesNumerators_odd] + simp only [activeStieltjesParameters, ite_eq_left hprev] + by_cases hz : a (2 * k + 1) = 0 + · have hnext : ¬ ∀ i < 2 * (k + 1), a i ≠ 0 := by + intro h + exact h (2 * k + 1) (by lia) hz + simp only [ite_eq_right hnext, mul_zero, zero_div, hz] + · have hnext : ∀ i < 2 * (k + 1), a i ≠ 0 := by + intro i hi + by_cases hlt : i < 2 * k + 1 + · exact hn i hlt + · have heq : i = 2 * k + 1 := by lia + simpa only [heq] using hz + simpa only [ite_eq_left hnext, shiftedStieltjesNumerators_odd] using hp (2 * k + 1) hn + +/-- Positive shifts bound the truncated parameters by fixed finite coordinate intervals. -/ +theorem activeStieltjesParameters_bounds {a u v : ℕ → ℝ} {c : ℝ} (hc : 0 < c) + (hu : ∀ k, 0 ≤ u k) (hv : ∀ k, 0 ≤ v k) + (hp : ∀ n, (∀ i < n, a i ≠ 0) → a n = shiftedStieltjesNumerators c u v n) + (k : ℕ) : + activeStieltjesParameters a u k ∈ Set.Icc 0 (max 0 (a (2 * k) / c)) ∧ + activeStieltjesParameters a v k ∈ Set.Icc 0 (max 0 (a (2 * k))) := by + classical + have hu0 := hu k + have hv0 := hv k + by_cases hact : ∀ i < 2 * k, a i ≠ 0 + · have heq : a (2 * k) = c * (1 + u k) + v k := by + simpa only [shiftedStieltjesNumerators_even] using hp (2 * k) hact + have huB : u k ≤ a (2 * k) / c := (le_div_iff₀ hc).mpr (by nlinarith) + have hvB : v k ≤ a (2 * k) := by nlinarith + simp only [activeStieltjesParameters, ite_eq_left hact] + exact ⟨⟨hu0, huB.trans (le_max_right _ _)⟩, + ⟨hv0, hvB.trans (le_max_right _ _)⟩⟩ + · simp only [activeStieltjesParameters, ite_eq_right hact] + exact ⟨⟨le_rfl, le_max_left _ _⟩, ⟨le_rfl, le_max_left _ _⟩⟩ + +/-- Every admissible initial parameter has representatives in a fixed compact +product of intervals, even when the numerator sequence terminates. -/ +theorem exists_bounded_activeStieltjesParameters {a : ℕ → ℝ} {c r : ℝ} (hc : 0 < c) + (hr : r ∈ admissibleStieltjesParameters c a) : + ∃ u v : ℕ → ℝ, u 0 = r ∧ + (∀ k, u k ∈ Set.Icc 0 (max 0 (a (2 * k) / c))) ∧ + (∀ k, v k ∈ Set.Icc 0 (max 0 (a (2 * k)))) ∧ + ∀ n, (∀ i < n, a i ≠ 0) → a n = shiftedStieltjesNumerators c u v n := by + obtain ⟨u, v, hu0, hu, hv, hp⟩ := hr + exact ⟨activeStieltjesParameters a u, activeStieltjesParameters a v, + by simpa only [activeStieltjesParameters_zero] using hu0, + fun k => (activeStieltjesParameters_bounds hc hu hv hp k).1, + fun k => (activeStieltjesParameters_bounds hc hu hv hp k).2, + shiftedStieltjesNumerators_active hp⟩ + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CatalanBound.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CatalanBound.lean new file mode 100644 index 000000000..52cc39d61 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CatalanBound.lean @@ -0,0 +1,109 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Basic.Real.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients +public import Mathlib.Combinatorics.Enumerative.Catalan.Basic + +/-! +# Geometric bounds for Stieltjes coefficients + +Nonnegative numerators bounded by `L` give degree-`n` coefficients at most +`catalan n * L^n`, hence at most `(4*L)^n`. These are formal coefficient bounds, +independent of the existence of a representing measure. + +See Sokal, arXiv:1903.12455v2, elementary continued-fraction fact 3. +-/ + +public section + +open scoped BigOperators + +namespace PowerSeries + +/-- Nonnegative Stieltjes coefficients increase with every numerator. -/ +theorem coeff_stieltjesTail_mono {a b : ℕ → ℝ} (ha : ∀ k, 0 ≤ a k) + (hab : ∀ k, a k ≤ b k) (n s : ℕ) : + coeff n (stieltjesTail a s) ≤ coeff n (stieltjesTail b s) := by + have hb : ∀ k, 0 ≤ b k := fun k => (ha k).trans (hab k) + induction n using Nat.strong_induction_on generalizing s with + | ind n ih => + cases n with + | zero => simp + | succ n => + rw [coeff_stieltjesTail_succ, coeff_stieltjesTail_succ] + apply mul_le_mul (hab s) + · apply Finset.sum_le_sum + intro ij hij + have hij' := Finset.mem_antidiagonal.mp hij + exact mul_le_mul (ih ij.1 (by lia) s) (ih ij.2 (by lia) (s + 1)) + (coeff_stieltjesTail_nonneg ha _ _) (coeff_stieltjesTail_nonneg hb _ _) + · exact Finset.sum_nonneg fun ij _ => + mul_nonneg (coeff_stieltjesTail_nonneg ha _ _) (coeff_stieltjesTail_nonneg ha _ _) + · exact hb s + +/-- Uniformly bounded nonnegative numerators give a weighted Catalan bound. -/ +theorem coeff_stieltjesTail_le_catalan {a : ℕ → ℝ} {L : ℝ} (hL : 0 ≤ L) + (ha : ∀ k, 0 ≤ a k) (haL : ∀ k, a k ≤ L) (n s : ℕ) : + coeff n (stieltjesTail a s) ≤ (catalan n : ℝ) * L ^ n := by + induction n using Nat.strong_induction_on generalizing s with + | ind n ih => + cases n with + | zero => simp + | succ n => + have hsum : ∑ ij ∈ Finset.antidiagonal n, + ((catalan ij.1 : ℝ) * L ^ ij.1) * ((catalan ij.2 : ℝ) * L ^ ij.2) = + L ^ n * (catalan (n + 1) : ℝ) := by + calc + _ = ∑ ij ∈ Finset.antidiagonal n, + L ^ n * ((catalan ij.1 : ℝ) * (catalan ij.2 : ℝ)) := by + apply Finset.sum_congr rfl + intro ij hij + have hij' := Finset.mem_antidiagonal.mp hij + rw [← hij', pow_add] + ring + _ = _ := by + rw [← Finset.mul_sum] + congr 1 + exact_mod_cast (catalan_succ' n).symm + calc + coeff (n + 1) (stieltjesTail a s) = a s * + ∑ ij ∈ Finset.antidiagonal n, + coeff ij.1 (stieltjesTail a s) * + coeff ij.2 (stieltjesTail a (s + 1)) := coeff_stieltjesTail_succ a s n + _ ≤ L * ∑ ij ∈ Finset.antidiagonal n, + ((catalan ij.1 : ℝ) * L ^ ij.1) * ((catalan ij.2 : ℝ) * L ^ ij.2) := by + apply mul_le_mul (haL s) + · apply Finset.sum_le_sum + intro ij hij + have hij' := Finset.mem_antidiagonal.mp hij + exact mul_le_mul (ih ij.1 (by lia) s) (ih ij.2 (by lia) (s + 1)) + (coeff_stieltjesTail_nonneg ha _ _) + (mul_nonneg (Nat.cast_nonneg _) (pow_nonneg hL _)) + · exact Finset.sum_nonneg fun ij _ => + mul_nonneg (coeff_stieltjesTail_nonneg ha _ _) (coeff_stieltjesTail_nonneg ha _ _) + · exact hL + _ = (catalan (n + 1) : ℝ) * L ^ (n + 1) := by + rw [hsum, pow_succ] + ring + +/-- Uniformly bounded nonnegative Stieltjes data give a geometric coefficient bound. -/ +theorem coeff_stieltjesTail_le_pow {a : ℕ → ℝ} {L : ℝ} (hL : 0 ≤ L) + (ha : ∀ k, 0 ≤ a k) (haL : ∀ k, a k ≤ L) (n s : ℕ) : + coeff n (stieltjesTail a s) ≤ (4 * L) ^ n := by + have hcat : catalan n ≤ 4 ^ n := by + rw [catalan_eq_centralBinom_div] + exact (Nat.div_le_self _ _).trans (Nat.centralBinom_le_four_pow n) + calc + coeff n (stieltjesTail a s) ≤ (catalan n : ℝ) * L ^ n := + coeff_stieltjesTail_le_catalan hL ha haL n s + _ ≤ (4 : ℝ) ^ n * L ^ n := + mul_le_mul_of_nonneg_right (by exact_mod_cast hcat) (pow_nonneg hL n) + _ = _ := (mul_pow 4 L n).symm + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainAeration.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainAeration.lean new file mode 100644 index 000000000..dac9cfae4 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainAeration.lean @@ -0,0 +1,102 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Aeration + +/-! +# Nonnegative Stieltjes data for translated chain aeration + +Alternating `kappa*(1-g_n)` and `kappa*g_(n+1)` contracts to the constant +diagonal `kappa` and outgoing numerators `kappa^2*(1-g_n)*g_(n+1)`. +This gives the formal positivity step in the reverse Wall argument. +-/ + +public section + +namespace PowerSeries + +/-- Bounded chain parameters give nonnegative numerators. -/ +theorem chainStieltjesNumerators_nonneg {L : ℝ} (hL : 0 ≤ L) + {g : ℕ → ℝ} (hg : ∀ n, g n ∈ Set.Icc 0 1) (n : ℕ) : + 0 ≤ chainStieltjesNumerators L g n := + mul_nonneg (mul_nonneg hL (sub_nonneg.mpr (hg n).2)) (hg (n + 1)).1 + +/-- Every numerator of a bounded chain is at most its scale. -/ +theorem chainStieltjesNumerators_le {L : ℝ} (hL : 0 ≤ L) + {g : ℕ → ℝ} (hg : ∀ n, g n ∈ Set.Icc 0 1) (n : ℕ) : + chainStieltjesNumerators L g n ≤ L := by + calc + _ ≤ L * (1 - g n) * 1 := + mul_le_mul_of_nonneg_left (hg (n + 1)).2 (mul_nonneg hL (sub_nonneg.mpr (hg n).2)) + _ ≤ L := by + simpa only [mul_one] using + mul_le_mul_of_nonneg_left (sub_le_self 1 (hg n).1) hL + +/-- Alternating Stieltjes data for the translated aeration of a chain fraction. -/ +@[expose] def chainAerationNumerators (kappa : ℝ) (g : ℕ → ℝ) (n : ℕ) : ℝ := + if n % 2 = 0 then kappa * (1 - g (n / 2)) else kappa * g (n / 2 + 1) + +/-- Even aeration numerators use the complementary chain parameter. -/ +@[simp] theorem chainAerationNumerators_even (kappa : ℝ) (g : ℕ → ℝ) (n : ℕ) : + chainAerationNumerators kappa g (2 * n) = kappa * (1 - g n) := by + simp [chainAerationNumerators, Nat.mul_comm] + +/-- Odd aeration numerators use the next chain parameter. -/ +@[simp] theorem chainAerationNumerators_odd (kappa : ℝ) (g : ℕ → ℝ) (n : ℕ) : + chainAerationNumerators kappa g (2 * n + 1) = kappa * g (n + 1) := by + simp [chainAerationNumerators, Nat.mul_comm, Nat.add_div] + +/-- The alternating data are nonnegative for bounded chain parameters. -/ +theorem chainAerationNumerators_nonneg {kappa : ℝ} (hk : 0 ≤ kappa) + {g : ℕ → ℝ} (hg : ∀ n, g n ∈ Set.Icc 0 1) (n : ℕ) : + 0 ≤ chainAerationNumerators kappa g n := by + unfold chainAerationNumerators + split_ifs + · exact mul_nonneg hk (sub_nonneg.mpr (hg _).2) + · exact mul_nonneg hk (hg _).1 + +/-- The contracted diagonal is constant when the initial chain parameter is zero. -/ +theorem stieltjesJacobiDiagonal_chainAeration (kappa : ℝ) {g : ℕ → ℝ} + (hg0 : g 0 = 0) (n : ℕ) : + stieltjesJacobiDiagonal (chainAerationNumerators kappa g) n = kappa := by + cases n with + | zero => simp [stieltjesJacobiDiagonal, chainAerationNumerators, hg0] + | succ n => + change chainAerationNumerators kappa g (2 * n + 1) + + chainAerationNumerators kappa g (2 * n + 2) = kappa + rw [show 2 * n + 2 = 2 * (n + 1) by ring, + chainAerationNumerators_odd, chainAerationNumerators_even] + ring + +/-- The contracted outgoing numerators are exactly the chain numerators. -/ +theorem stieltjesJacobiNumerator_chainAeration (kappa : ℝ) (g : ℕ → ℝ) (n : ℕ) : + stieltjesJacobiNumerator (chainAerationNumerators kappa g) n = + chainStieltjesNumerators (kappa ^ 2) g n := by + simp only [stieltjesJacobiNumerator, chainAerationNumerators_even, + chainAerationNumerators_odd, chainStieltjesNumerators] + ring + +/-- Translated aeration of a chain fraction has explicit nonnegative Stieltjes +data. The formal identity also includes zero shift and terminating fractions. -/ +theorem binomialTransform_aerated_chain (kappa : ℝ) {g : ℕ → ℝ} (hg0 : g 0 = 0) : + binomialTransform kappa + ((stieltjesTail (chainStieltjesNumerators (kappa ^ 2) g) 0).subst + (X ^ 2 : ℝ⟦X⟧)) = stieltjesTail (chainAerationNumerators kappa g) 0 := by + have h : (fun n => binomialTransform kappa + ((stieltjesTail (chainStieltjesNumerators (kappa ^ 2) g) n).subst + (X ^ 2 : ℝ⟦X⟧))) = stieltjesJacobiTail (chainAerationNumerators kappa g) := by + apply eq_of_jacobiStep_eq + · exact binomialTransform_subst_X_sq_stieltjesTail_eq_step kappa + (chainStieltjesNumerators (kappa ^ 2) g) + · intro n + rw [stieltjesJacobiTail_eq_step, stieltjesJacobiDiagonal_chainAeration kappa hg0, + stieltjesJacobiNumerator_chainAeration] + exact congrFun h 0 + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainCoefficientBound.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainCoefficientBound.lean new file mode 100644 index 000000000..2bfc4c650 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainCoefficientBound.lean @@ -0,0 +1,73 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.MeasureTheory.Measure.ChainMomentSupport +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CatalanBound +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainAeration +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment + +/-! +# The sharp coefficient bound for bounded chain parameters + +The coefficient bound is `L^n` even when the initial parameter is any value +in `[0,1]`. Replacing only the initial parameter by zero increases the first +numerator; all later numerators stay fixed. Formal coefficient monotonicity +then reduces to the compact-support result with initial parameter zero. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- Normalized chain coefficients satisfy the moment bound from compact support. -/ +private theorem coeff_chain_le_pow_of_zero {L : ℝ} (hL : 0 ≤ L) + {g : ℕ → ℝ} (hg0 : g 0 = 0) (hg : ∀ n, g n ∈ Set.Icc 0 1) (n : ℕ) : + coeff n (stieltjesTail (chainStieltjesNumerators L g) 0) ≤ L ^ n := by + obtain ⟨mu, hfin, hpos, hmom⟩ := exists_measure_moments_stieltjesTail + (chainStieltjesNumerators L g) (chainStieltjesNumerators_nonneg hL hg) + (show (0 : ℝ) ≤ 1 from zero_le_one) + let : IsFiniteMeasure mu := hfin + have hs := ae_mem_Icc_of_chain_moments hL zero_le_one hg0 hg hpos + (fun k => (hmom k).1) (fun k => (hmom k).2) + have hmass : mu.real Set.univ = 1 := by simpa using (hmom 0).2 + calc + coeff n (stieltjesTail (chainStieltjesNumerators L g) 0) = + ∫ x : ℝ, x ^ n ∂mu := by simpa only [one_mul] using (hmom n).2.symm + _ ≤ ∫ _x : ℝ, L ^ n ∂mu := by + apply integral_mono_ae (hmom n).1 (integrable_const _) + filter_upwards [hs] with x hx + exact pow_le_pow_left₀ hx.1 hx.2 n + _ = L ^ n := by simp [hmass, smul_eq_mul] + +/-- Every chain with parameters in `[0,1]` satisfies the sharp geometric +coefficient bound, with no initial-parameter normalization. -/ +theorem coeff_chainStieltjes_le_pow {L : ℝ} (hL : 0 ≤ L) + {g : ℕ → ℝ} (hg : ∀ n, g n ∈ Set.Icc 0 1) (n : ℕ) : + coeff n (stieltjesTail (chainStieltjesNumerators L g) 0) ≤ L ^ n := by + classical + let g' : ℕ → ℝ := fun k => if k = 0 then 0 else g k + have hg0' : g' 0 = 0 := by simp [g'] + have hg' (k : ℕ) : g' k ∈ Set.Icc 0 1 := by + by_cases hk : k = 0 + · simp [g', hk] + · simpa only [g', ite_eq_right hk] using hg k + have hnum (k : ℕ) : chainStieltjesNumerators L g k ≤ chainStieltjesNumerators L g' k := by + cases k with + | zero => + simp only [chainStieltjesNumerators, g', ite_eq_left rfl, + show (0 + 1 : ℕ) ≠ 0 by decide, ite_false, sub_zero, mul_one] + simpa only [mul_one] using + mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (sub_le_self 1 (hg 0).1) hL) (hg 1).1 + | succ k => simp [chainStieltjesNumerators, g'] + exact (coeff_stieltjesTail_mono (chainStieltjesNumerators_nonneg hL hg) hnum n 0).trans + (coeff_chain_le_pow_of_zero hL hg0' hg' n) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainParameters.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainParameters.lean new file mode 100644 index 000000000..99b5b562b --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainParameters.lean @@ -0,0 +1,116 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Contraction +public import Mathlib.Basic.Real.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActivePrefix + +/-! +# Chain parameters from constant Jacobi diagonals + +Nonnegative Stieltjes data whose contracted diagonal is constant on the active +prefix give Wall parameters in `[0,1]`. A zero outgoing numerator is represented +by setting the next parameter and all later parameters to zero. No equality +of inactive Jacobi coefficients is required. +-/ + +public section + +namespace PowerSeries + +/-- The Stieltjes numerators of a bounded chain-parameter sequence. -/ +@[expose] def chainStieltjesNumerators (L : ℝ) (g : ℕ → ℝ) (n : ℕ) : ℝ := + L * (1 - g n) * g (n + 1) + +/-- Chain parameters obtained from the odd Stieltjes data on the active prefix. -/ +@[expose] noncomputable def stieltjesChainParameters + (kappa : ℝ) (a b : ℕ → ℝ) : ℕ → ℝ := by + classical + exact fun + | 0 => 0 + | n + 1 => if ∀ k < n + 1, a k ≠ 0 then b (2 * n + 1) / kappa else 0 + +/-- The chain parameter normalization at the origin. -/ +@[simp] theorem stieltjesChainParameters_zero (kappa : ℝ) (a b : ℕ → ℝ) : + stieltjesChainParameters kappa a b 0 = 0 := rfl + +/-- Every extracted chain parameter lies in the closed unit interval. -/ +theorem stieltjesChainParameters_mem_Icc {kappa : ℝ} (hk : 0 < kappa) + {a b : ℕ → ℝ} (hb : ∀ n, 0 ≤ b n) + (hd : ∀ n, (∀ i < n, a i ≠ 0) → stieltjesJacobiDiagonal b n = kappa) + (n : ℕ) : stieltjesChainParameters kappa a b n ∈ Set.Icc 0 1 := by + classical + cases n with + | zero => simp + | succ n => + change (if ∀ i < n + 1, a i ≠ 0 then b (2 * n + 1) / kappa else 0) ∈ _ + split_ifs with hact + · have heq : b (2 * n + 1) + b (2 * n + 2) = kappa := hd (n + 1) hact + have hbn := hb (2 * n + 2) + exact ⟨div_nonneg (hb _) hk.le, (div_le_one hk).mpr (by linarith)⟩ + · exact ⟨le_rfl, zero_le_one⟩ + +/-- The complementary chain parameter recovers the paired even numerator +where the preceding outgoing numerators are nonzero. -/ +theorem mul_one_sub_stieltjesChainParameters {kappa : ℝ} (hk : 0 < kappa) + {a b : ℕ → ℝ} + (hd : ∀ n, (∀ i < n, a i ≠ 0) → stieltjesJacobiDiagonal b n = kappa) + (n : ℕ) (hact : ∀ i < n, a i ≠ 0) : + kappa * (1 - stieltjesChainParameters kappa a b n) = b (2 * n) := by + classical + cases n with + | zero => simpa only [stieltjesChainParameters_zero, sub_zero, mul_one, Nat.mul_zero] + using (show kappa = b 0 from (hd 0 hact).symm) + | succ n => + have heq : b (2 * n + 1) + b (2 * (n + 1)) = kappa := by + simpa only [stieltjesJacobiDiagonal, Nat.mul_add, Nat.mul_one] using hd (n + 1) hact + change kappa * (1 - (if ∀ i < n + 1, a i ≠ 0 then + b (2 * n + 1) / kappa else 0)) = _ + rw [ite_eq_left hact] + calc + _ = kappa - b (2 * n + 1) := by field_simp [ne_of_gt hk] + _ = _ := by linarith + +/-- The extracted chain data agree with every active outgoing Jacobi numerator. -/ +theorem chainStieltjesNumerators_eq_on_active {kappa : ℝ} (hk : 0 < kappa) + {a b : ℕ → ℝ} + (hd : ∀ n, (∀ i < n, a i ≠ 0) → stieltjesJacobiDiagonal b n = kappa) + (hn : ∀ n, (∀ i < n, a i ≠ 0) → stieltjesJacobiNumerator b n = a n) + (n : ℕ) (hact : ∀ i < n, a i ≠ 0) : + a n = chainStieltjesNumerators (kappa ^ 2) (stieltjesChainParameters kappa a b) n := by + classical + by_cases hz : a n = 0 + · have hnext : ¬ ∀ i < n + 1, a i ≠ 0 := fun h => h n (Nat.lt_succ_self n) hz + simp only [chainStieltjesNumerators, stieltjesChainParameters, ite_eq_right hnext, mul_zero, hz] + · have hnext : ∀ i < n + 1, a i ≠ 0 := by + intro i hi + rcases Nat.lt_succ_iff_lt_or_eq.mp hi with hlt | rfl + · exact hact i hlt + · exact hz + change a n = kappa ^ 2 * (1 - stieltjesChainParameters kappa a b n) * + (if ∀ i < n + 1, a i ≠ 0 then b (2 * n + 1) / kappa else 0) + rw [ite_eq_left hnext] + have halg : kappa ^ 2 * (1 - stieltjesChainParameters kappa a b n) * + (b (2 * n + 1) / kappa) = + (kappa * (1 - stieltjesChainParameters kappa a b n)) * b (2 * n + 1) := by + field_simp [ne_of_gt hk] + rw [halg, mul_one_sub_stieltjesChainParameters hk hd n hact] + exact (hn n hact).symm + +/-- Constant diagonal and nonnegative contracted data on the active prefix +give an existential Wall chain representation of the original fraction. -/ +theorem exists_chainStieltjes_of_constant_diagonal {kappa : ℝ} (hk : 0 < kappa) + {a b : ℕ → ℝ} (hb : ∀ n, 0 ≤ b n) + (hd : ∀ n, (∀ i < n, a i ≠ 0) → stieltjesJacobiDiagonal b n = kappa) + (hn : ∀ n, (∀ i < n, a i ≠ 0) → stieltjesJacobiNumerator b n = a n) : + ∃ g : ℕ → ℝ, g 0 = 0 ∧ (∀ n, g n ∈ Set.Icc 0 1) ∧ + stieltjesTail a 0 = stieltjesTail (chainStieltjesNumerators (kappa ^ 2) g) 0 := by + refine ⟨stieltjesChainParameters kappa a b, rfl, + stieltjesChainParameters_mem_Icc hk hb hd, ?_⟩ + exact stieltjesTail_eq_of_active_prefix (chainStieltjesNumerators_eq_on_active hk hd hn) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Coefficients.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Coefficients.lean new file mode 100644 index 000000000..5a3b677ae --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Coefficients.lean @@ -0,0 +1,83 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.TypeStar + +/-! +# Coefficients of formal Stieltjes fractions + +The tail identity yields the Stieltjes--Rogers convolution recurrence. In +particular, nonnegative numerator data give nonnegative formal coefficients. +This is not yet the stronger Stieltjes moment representation theorem. +-/ + +public section + +open scoped BigOperators + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- Geometric Stieltjes steps have power coefficients over every commutative ring. -/ +theorem coeff_stieltjesStep_one_eq_pow (c : R) (n : ℕ) : + coeff n (stieltjesStep c 1) = c ^ n := by + have hrec : stieltjesStep c 1 = 1 + X * (C c * stieltjesStep c 1) := by + conv_lhs => rw [stieltjesStep_eq_one_add] + ring + induction n with + | zero => simp + | succ n ih => + have h := congrArg (coeff (n + 1)) hrec + simpa only [map_add, coeff_one, Nat.add_one_ne_zero, ite_false, zero_add, + coeff_succ_X_mul, coeff_C_mul, ih, pow_succ'] using h + +/-- The multiplicative tail recurrence with its degree shift explicit. -/ +theorem stieltjesTail_eq_one_add (a : ℕ → R) (s : ℕ) : + stieltjesTail a s = + 1 + X * (C (a s) * (stieltjesTail a s * stieltjesTail a (s + 1))) := by + calc + stieltjesTail a s = + 1 + C (a s) * X * stieltjesTail a (s + 1) * stieltjesTail a s := by + simpa only [← stieltjesTail_eq_step a s] using + stieltjesStep_eq_one_add (a s) (stieltjesTail a (s + 1)) + _ = _ := by ring + +/-- The Stieltjes--Rogers convolution recurrence for the formal coefficients. -/ +theorem coeff_stieltjesTail_succ (a : ℕ → R) (s n : ℕ) : + coeff (n + 1) (stieltjesTail a s) = a s * + ∑ ij ∈ Finset.antidiagonal n, + coeff ij.1 (stieltjesTail a s) * coeff ij.2 (stieltjesTail a (s + 1)) := by + have h := congrArg (coeff (n + 1)) (stieltjesTail_eq_one_add a s) + have hn : n + 1 ≠ 0 := by lia + rw [map_add, coeff_one, ite_eq_right hn, zero_add, coeff_succ_X_mul, + coeff_C_mul, coeff_mul] at h + exact h + +/-- The first nonconstant coefficient recovers the first numerator. -/ +@[simp] theorem coeff_one_stieltjesTail (a : ℕ → R) (s : ℕ) : + coeff 1 (stieltjesTail a s) = a s := by + simpa using coeff_stieltjesTail_succ a s 0 + +/-- Nonnegative Stieltjes numerator data give nonnegative formal coefficients. -/ +theorem coeff_stieltjesTail_nonneg {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (n s : ℕ) : + 0 ≤ coeff n (stieltjesTail a s) := by + induction n using Nat.strong_induction_on generalizing s with + | ind n ih => + cases n with + | zero => simp + | succ n => + rw [coeff_stieltjesTail_succ] + apply mul_nonneg (ha s) + apply Finset.sum_nonneg + intro ij hij + have hij' := Finset.mem_antidiagonal.mp hij + exact mul_nonneg (ih ij.1 (by lia) s) (ih ij.2 (by lia) (s + 1)) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactMomentCriterion.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactMomentCriterion.lean new file mode 100644 index 000000000..2f7ba9d22 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactMomentCriterion.lean @@ -0,0 +1,84 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.MeasureTheory.Measure.BoundedChainSupport +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainAeration +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentsChain +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment + +/-! +# Wall's compact Stieltjes moment criterion + +For `L ≥ 0`, genuine moments on `[0,L]` are exactly the formal fractions with +nonnegative outer mass and numerators `L*(1-g_n)*g_(n+1)`, where all parameters +lie in `[0,1]`. One may either impose `g 0 = 0` or leave the initial parameter +arbitrary in the same interval. + +See Sokal, arXiv:1903.12455v2, and Sokal-Walrad, arXiv:2404.12131v1, Theorem 1. +Zero mass, a zero endpoint, and terminating fractions are included. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- Every bounded chain fraction has an actual compact representing measure, +without a normalization on its initial parameter. -/ +theorem exists_measure_moments_Icc_of_chain {m : ℕ → ℝ} {L mass : ℝ} + (hL : 0 ≤ L) (hmass : 0 ≤ mass) {g : ℕ → ℝ} + (hg : ∀ n, g n ∈ Set.Icc 0 1) + (hf : mk m = C mass * stieltjesTail (chainStieltjesNumerators L g) 0) : + ∃ mu : Measure ℝ, (∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n := by + obtain ⟨mu, _, hpos, hmom⟩ := exists_measure_moments_of_eq_stieltjesTail + (chainStieltjesNumerators_nonneg hL hg) hmass hf + have hcoeff (n : ℕ) : (∫ x : ℝ, x ^ n ∂mu) = + mass * coeff n (stieltjesTail (chainStieltjesNumerators L g) 0) := by + rw [(hmom n).2, hf, coeff_C_mul] + refine ⟨mu, ae_mem_Icc_of_bounded_chain_moments hL hmass hg hpos + (fun n => (hmom n).1) hcoeff, fun n => ⟨(hmom n).1, ?_⟩⟩ + simpa only [coeff_mk] using (hmom n).2 + +/-- Genuine compact nonnegative moments are exactly the normalized Wall chain fractions. -/ +theorem exists_measure_moments_Icc_iff_chain (m : ℕ → ℝ) {L : ℝ} (hL : 0 ≤ L) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n) ↔ + ∃ (mass : ℝ) (g : ℕ → ℝ), 0 ≤ mass ∧ g 0 = 0 ∧ + (∀ n, g n ∈ Set.Icc 0 1) ∧ + mk m = C mass * stieltjesTail (chainStieltjesNumerators L g) 0 := by + constructor + · rintro ⟨mu, hs, hmom⟩ + obtain ⟨g, hg0, hg, hf⟩ := exists_chainStieltjes_of_moments_Icc hL hs + (fun n => (hmom n).1) + have heq : (fun n => ∫ x : ℝ, x ^ n ∂mu) = m := funext fun n => (hmom n).2 + exact ⟨mu.real Set.univ, g, measureReal_nonneg, hg0, hg, by simpa only [heq] using hf⟩ + · rintro ⟨mass, g, hmass, _, hg, hf⟩ + exact exists_measure_moments_Icc_of_chain hL hmass hg hf + +/-- The compact moment criterion also allows an arbitrary initial chain +parameter in `[0,1]`. -/ +theorem exists_measure_moments_Icc_iff_bounded_chain (m : ℕ → ℝ) {L : ℝ} (hL : 0 ≤ L) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n) ↔ + ∃ (mass : ℝ) (g : ℕ → ℝ), 0 ≤ mass ∧ + (∀ n, g n ∈ Set.Icc 0 1) ∧ + mk m = C mass * stieltjesTail (chainStieltjesNumerators L g) 0 := by + constructor + · intro h + obtain ⟨mass, g, hmass, _, hg, hf⟩ := (exists_measure_moments_Icc_iff_chain m hL).mp h + exact ⟨mass, g, hmass, hg, hf⟩ + · rintro ⟨mass, g, hmass, hg, hf⟩ + exact exists_measure_moments_Icc_of_chain hL hmass hg hf + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactMomentsChain.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactMomentsChain.lean new file mode 100644 index 000000000..13a7cae65 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactMomentsChain.lean @@ -0,0 +1,103 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.MeasureTheory.Measure.MomentTranslation +import RealRooted.Mathlib.MeasureTheory.Measure.SqrtMoments +import RealRooted.Mathlib.MeasureTheory.Measure.SqrtTranslation +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.MomentCriterion +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.TranslatedAeration + +/-! +# Chain fractions for compact nonnegative moment measures + +For a nonnegative endpoint `L`, actual moments of a positive measure carried by +`[0,L]` have a Wall chain fraction. The outer coefficient is the original mass. +Zero mass, `L=0`, and terminating fractions are included. + +See Sokal, arXiv:1903.12455v2, forward proof of Wall's theorem. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- Genuine moments on a nontrivial compact positive interval have a bounded +chain fraction, with the original total mass as outer coefficient. -/ +theorem exists_chainStieltjes_of_moments_Icc_of_pos {mu : Measure ℝ} {L : ℝ} (hL : 0 < L) + (hs : ∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) + (hmom : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) : + ∃ g : ℕ → ℝ, g 0 = 0 ∧ (∀ n, g n ∈ Set.Icc 0 1) ∧ + mk (fun n => ∫ x : ℝ, x ^ n ∂mu) = + C (mu.real Set.univ) * stieltjesTail (chainStieltjesNumerators L g) 0 := by + have hpos : ∀ᵐ x ∂mu, 0 ≤ x := hs.mono fun _ hx => hx.1 + obtain ⟨a, ha, hf⟩ := exists_stieltjesTail_of_nonnegative_moments hmom hpos + by_cases hmass : mu.real Set.univ = 0 + · refine ⟨fun _ => 0, rfl, fun _ => ⟨le_rfl, zero_le_one⟩, ?_⟩ + simpa only [hmass, map_zero, zero_mul] using hf + · let sigma := mu.sqrtSymmetrization.map (fun x => x + Real.sqrt L) + have hsigma : ∀ᵐ x ∂sigma, 0 ≤ x := Measure.ae_nonneg_map_add_sqrtSymmetrization hs + have hsigmaInt (n : ℕ) : Integrable (fun x : ℝ => x ^ n) sigma := + integrable_pow_map_add (Measure.integrable_pow_sqrtSymmetrization hpos hmom) + (Real.sqrt L) n + have hy : HasSubst (X ^ 2 : ℝ⟦X⟧) := .of_constantCoeff_zero' (by simp) + have hseries : mk (fun n => ∫ x : ℝ, x ^ n ∂sigma) = + C (mu.real Set.univ) * + binomialTransform (Real.sqrt L) ((stieltjesTail a 0).subst (X ^ 2 : ℝ⟦X⟧)) := by + dsimp only [sigma] + rw [Measure.mk_moments_map_add_sqrtSymmetrization hpos hmom, hf, + subst_mul hy, subst_C, ← C_apply, binomialTransform_C_mul] + obtain ⟨b, hb, hfb⟩ := exists_stieltjesTail_of_nonnegative_moments hsigmaInt hsigma + have hmassEq : sigma.real Set.univ = mu.real Set.univ := by + have h := congrArg constantCoeff (hfb.symm.trans hseries) + simpa using h + have hC : (C (mu.real Set.univ) : ℝ⟦X⟧) ≠ 0 := by + intro hz + have h := congrArg constantCoeff hz + exact hmass (by simpa using h) + have htail : binomialTransform (Real.sqrt L) + ((stieltjesTail a 0).subst (X ^ 2 : ℝ⟦X⟧)) = stieltjesTail b 0 := by + apply mul_left_cancel₀ hC + simpa only [hmassEq] using hseries.symm.trans hfb + obtain ⟨g, hg0, hg, hchain⟩ := exists_chainStieltjes_of_translated_aeration + (Real.sqrt_pos.mpr hL) hb htail + refine ⟨g, hg0, hg, ?_⟩ + rw [hf, hchain, Real.sq_sqrt hL.le] + +/-- An origin-supported measure has a constant formal moment series. -/ +private theorem mk_moments_eq_C_of_ae_zero {mu : Measure ℝ} + (hz : ∀ᵐ x ∂mu, x = 0) : + mk (fun n => ∫ x : ℝ, x ^ n ∂mu) = C (mu.real Set.univ) := by + ext n + cases n with + | zero => simp + | succ n => + simp only [coeff_mk, coeff_C, Nat.add_one_ne_zero, ite_false] + apply integral_eq_zero_of_ae + filter_upwards [hz] with x hx + simp only [hx, zero_pow (Nat.add_one_ne_zero n), Pi.zero_apply] + +/-- Genuine moments on any compact nonnegative interval have a Wall chain +fraction, including an interval reduced to the origin. -/ +theorem exists_chainStieltjes_of_moments_Icc {mu : Measure ℝ} {L : ℝ} (hL : 0 ≤ L) + (hs : ∀ᵐ x ∂mu, x ∈ Set.Icc 0 L) + (hmom : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) : + ∃ g : ℕ → ℝ, g 0 = 0 ∧ (∀ n, g n ∈ Set.Icc 0 1) ∧ + mk (fun n => ∫ x : ℝ, x ^ n ∂mu) = + C (mu.real Set.univ) * stieltjesTail (chainStieltjesNumerators L g) 0 := by + rcases eq_or_lt_of_le hL with hzero | hpos + · subst L + have hz : ∀ᵐ x ∂mu, x = 0 := hs.mono fun _ hx => le_antisymm hx.2 hx.1 + refine ⟨fun _ => 0, rfl, fun _ => ⟨le_rfl, zero_le_one⟩, ?_⟩ + rw [mk_moments_eq_C_of_ae_zero hz, stieltjesTail_eq_step] + simp [chainStieltjesNumerators] + · exact exists_chainStieltjes_of_moments_Icc_of_pos hpos hs hmom + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactParameters.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactParameters.lean new file mode 100644 index 000000000..1e545eccd --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactParameters.lean @@ -0,0 +1,122 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.AdmissibleParameters +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.BoundedParameters + +/-! +# Compactness of the admissible initial parameters + +Cross-multiplying the active odd equations gives polynomial closed constraints. +Bounded representatives place all parameters in a compact product of intervals. +Projection to the initial coordinate then proves compactness, including the +terminating case of the corrected Sokal-Walrad Remark 2 criterion. +-/ + +public section + +namespace PowerSeries + +/-- Even and odd parameter sequences. -/ +private abbrev ParameterPair := (ℕ → ℝ) × (ℕ → ℝ) + +/-- The active numerator equations with denominators cleared. -/ +private def parameterEquations (c : ℝ) (a : ℕ → ℝ) : Set ParameterPair := + {p | ∀ k, + ((∀ i < 2 * k, a i ≠ 0) → a (2 * k) = c * (1 + p.1 k) + p.2 k) ∧ + ((∀ i < 2 * k + 1, a i ≠ 0) → + a (2 * k + 1) * (1 + p.1 k) = p.2 k * p.1 (k + 1))} + +/-- Each active equation is a closed polynomial constraint. -/ +private theorem isClosed_parameterEquations (c : ℝ) (a : ℕ → ℝ) : + IsClosed (parameterEquations c a) := by + have heq : parameterEquations c a = ⋂ k : ℕ, {p : ParameterPair | + ((∀ i < 2 * k, a i ≠ 0) → a (2 * k) = c * (1 + p.1 k) + p.2 k) ∧ + ((∀ i < 2 * k + 1, a i ≠ 0) → + a (2 * k + 1) * (1 + p.1 k) = p.2 k * p.1 (k + 1))} := by + ext p + simp only [parameterEquations, Set.mem_ofPred_eq, Set.mem_iInter] + rw [heq] + refine isClosed_iInter fun k => ?_ + exact (isClosed_imp isOpen_const (isClosed_eq (by fun_prop) (by fun_prop))).and + (isClosed_imp isOpen_const (isClosed_eq (by fun_prop) (by fun_prop))) + +/-- Nonnegative even parameters make clearing the denominators reversible. -/ +private theorem mem_parameterEquations_iff {c : ℝ} {a u v : ℕ → ℝ} + (hu : ∀ k, 0 ≤ u k) : + (u, v) ∈ parameterEquations c a ↔ + ∀ n, (∀ i < n, a i ≠ 0) → a n = shiftedStieltjesNumerators c u v n := by + have hden (k : ℕ) : 1 + u k ≠ 0 := + ne_of_gt (add_pos_of_pos_of_nonneg zero_lt_one (hu k)) + constructor + · intro hp n hn + obtain ⟨k, hk | hk⟩ := Nat.even_or_odd' n + · subst n + simpa only [shiftedStieltjesNumerators_even] using (hp k).1 hn + · subst n + rw [shiftedStieltjesNumerators_odd] + exact (eq_div_iff (hden k)).mpr ((hp k).2 hn) + · intro hp k + constructor + · intro hk + simpa only [shiftedStieltjesNumerators_even] using hp (2 * k) hk + · intro hk + apply (eq_div_iff (hden k)).mp + simpa only [shiftedStieltjesNumerators_odd] using hp (2 * k + 1) hk + +/-- For a positive shift, the corrected active-prefix admissible set is compact. +No assumption of nontermination or existence of a representing measure is needed. -/ +theorem isCompact_admissibleStieltjesParameters {c : ℝ} (hc : 0 < c) (a : ℕ → ℝ) : + IsCompact (admissibleStieltjesParameters c a) := by + let K : Set ParameterPair := + {u : ℕ → ℝ | ∀ k, u k ∈ Set.Icc 0 (max 0 (a (2 * k) / c))} ×ˢ + {v : ℕ → ℝ | ∀ k, v k ∈ Set.Icc 0 (max 0 (a (2 * k)))} + have hK : IsCompact K := + (isCompact_pi_infinite fun _ => isCompact_Icc).prod + (isCompact_pi_infinite fun _ => isCompact_Icc) + have heq : admissibleStieltjesParameters c a = + (fun p : ParameterPair => p.1 0) '' (K ∩ parameterEquations c a) := by + ext r + constructor + · intro hr + obtain ⟨u, v, hu0, hu, hv, hp⟩ := exists_bounded_activeStieltjesParameters hc hr + refine ⟨(u, v), ⟨⟨hu, hv⟩, ?_⟩, hu0⟩ + exact (mem_parameterEquations_iff (fun k => (hu k).1)).mpr hp + · rintro ⟨⟨u, v⟩, ⟨⟨hu, hv⟩, hp⟩, hu0⟩ + exact ⟨u, v, hu0, fun k => (hu k).1, fun k => (hv k).1, + (mem_parameterEquations_iff (fun k => (hu k).1)).mp hp⟩ + rw [heq] + exact (hK.inter_right (isClosed_parameterEquations c a)).image (by fun_prop) + +/-- A nonempty admissible set is a closed interval with an attained maximum. -/ +theorem admissibleStieltjesParameters_eq_Icc {c : ℝ} (hc : 0 < c) {a : ℕ → ℝ} + (hne : (admissibleStieltjesParameters c a).Nonempty) : + ∃ M : ℝ, 0 ≤ M ∧ M ≤ a 0 / c - 1 ∧ + admissibleStieltjesParameters c a = Set.Icc 0 M := by + obtain ⟨M, hM⟩ := (isCompact_admissibleStieltjesParameters hc a).exists_isGreatest hne + refine ⟨M, nonneg_of_mem_admissibleStieltjesParameters hM.1, + mem_admissibleStieltjesParameters_le hc hM.1, ?_⟩ + ext r + constructor + · intro hr + exact ⟨nonneg_of_mem_admissibleStieltjesParameters hr, hM.2 hr⟩ + · intro hr + exact mem_admissibleStieltjesParameters_of_le hc.le hM.1 hr.1 hr.2 + +/-- A normalized lower-support moment sequence has a nonempty closed interval +of admissible initial parameters, with all inactive tails treated existentially. -/ +theorem exists_Icc_admissibleStieltjesParameters {c : ℝ} (hc : 0 < c) + {a : ℕ → ℝ} + (hmom : ∃ mu : MeasureTheory.Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, MeasureTheory.Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = coeff n (stieltjesTail a 0)) : + ∃ M : ℝ, 0 ≤ M ∧ M ≤ a 0 / c - 1 ∧ + admissibleStieltjesParameters c a = Set.Icc 0 M := + admissibleStieltjesParameters_eq_Icc hc + ⟨0, zero_mem_admissibleStieltjesParameters hc.le hmom⟩ + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Complementary.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Complementary.lean new file mode 100644 index 000000000..01337cb93 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Complementary.lean @@ -0,0 +1,120 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import Mathlib.Tactic.TypeStar + +/-! +# The product identity for complementary Stieltjes chains + +Kim-Zeng, "On a continued fraction formula of Wall", equation (1), gives +complementary chain fractions whose product is the geometric series. The +formal argument below works over every commutative ring and permits a scale +parameter. It uses no positivity, numerical convergence, or nontermination. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- The weighted error between a pair of complementary formal tails. -/ +private noncomputable def complementaryTailError (L : R) (u : ℕ → R) + (F G : ℕ → R⟦X⟧) (n : ℕ) : R⟦X⟧ := + C (u n) * F n + C (1 - u n) * G n - 1 - + C (L * u n * (1 - u n)) * X * F n * G n + +/-- Complementary tail equations increase the order of the weighted error. -/ +private theorem complementaryTailError_eq (L : R) (u : ℕ → R) + (F G : ℕ → R⟦X⟧) + (hF : ∀ n, (1 - C (L * (1 - u n) * u (n + 1)) * X * F (n + 1)) * F n = 1) + (hG : ∀ n, (1 - C (L * u n * (1 - u (n + 1))) * X * G (n + 1)) * G n = 1) + (n : ℕ) : + complementaryTailError L u F G n = + C (L * u n * (1 - u n)) * X * F n * G n * + complementaryTailError L u F G (n + 1) := by + let A : R⟦X⟧ := 1 - C (L * (1 - u n) * u (n + 1)) * X * F (n + 1) + let B : R⟦X⟧ := 1 - C (L * u n * (1 - u (n + 1))) * X * G (n + 1) + have hA : A * F n = 1 := hF n + have hB : B * G n = 1 := hG n + calc + complementaryTailError L u F G n = + C (u n) * F n * (B * G n) + C (1 - u n) * G n * (A * F n) - + (A * F n) * (B * G n) - C (L * u n * (1 - u n)) * X * F n * G n := by + rw [hA, hB] + simp only [complementaryTailError, mul_one] + _ = F n * G n * (C (u n) * B + C (1 - u n) * A - A * B - + C (L * u n * (1 - u n)) * X) := by ring + _ = _ := by + dsimp only [A, B, complementaryTailError] + simp only [map_mul, map_sub, map_one] + ring + +/-- A complementary error is divisible by every power of `X`, hence zero. -/ +private theorem complementaryTailError_eq_zero (L : R) (u : ℕ → R) + (F G : ℕ → R⟦X⟧) + (hF : ∀ n, (1 - C (L * (1 - u n) * u (n + 1)) * X * F (n + 1)) * F n = 1) + (hG : ∀ n, (1 - C (L * u n * (1 - u (n + 1))) * X * G (n + 1)) * G n = 1) + (n : ℕ) : complementaryTailError L u F G n = 0 := by + have hdiv (k : ℕ) : ∀ s, X ^ k ∣ complementaryTailError L u F G s := by + induction k with + | zero => intro s; simp only [pow_zero, one_dvd] + | succ k ih => + intro s + obtain ⟨q, hq⟩ := ih (s + 1) + rw [complementaryTailError_eq L u F G hF hG s, hq] + refine ⟨C (L * u s * (1 - u s)) * F s * G s * q, ?_⟩ + rw [pow_succ] + ring + ext k + simpa only [map_zero] using + X_pow_dvd_iff.mp (hdiv (k + 1) n) k (Nat.lt_succ_self k) + +/-- Complementary formal Stieltjes chains multiply to the reciprocal of +`1 - L*X`. The identities allow arbitrary values, zeros, and zero divisors +over any commutative ring. The sequence `u n` is Kim-Zeng's `g_(n+1)`. -/ +theorem stieltjesTail_mul_of_complementary_chain {L : R} {u a b : ℕ → R} + (ha0 : a 0 = L * u 0) (hb0 : b 0 = L * (1 - u 0)) + (ha : ∀ n, a (n + 1) = L * (1 - u n) * u (n + 1)) + (hb : ∀ n, b (n + 1) = L * u n * (1 - u (n + 1))) : + stieltjesTail a 0 * stieltjesTail b 0 = stieltjesStep L 1 := by + let F : ℕ → R⟦X⟧ := fun n => stieltjesTail a (n + 1) + let G : ℕ → R⟦X⟧ := fun n => stieltjesTail b (n + 1) + have hF (n : ℕ) : + (1 - C (L * (1 - u n) * u (n + 1)) * X * F (n + 1)) * F n = 1 := by + simpa only [F, ha n] using one_sub_mul_stieltjesTail a (n + 1) + have hG (n : ℕ) : + (1 - C (L * u n * (1 - u (n + 1))) * X * G (n + 1)) * G n = 1 := by + simpa only [G, hb n] using one_sub_mul_stieltjesTail b (n + 1) + have hE := complementaryTailError_eq_zero L u F G hF hG 0 + have hD : + (1 - C (L * u 0) * X * F 0) * (1 - C (L * (1 - u 0)) * X * G 0) = + 1 - C L * X := by + simp only [complementaryTailError, map_mul, map_sub, map_one] at hE ⊢ + linear_combination -C L * X * hE + have hA : (1 - C (L * u 0) * X * F 0) * stieltjesTail a 0 = 1 := by + simpa only [F, ha0] using one_sub_mul_stieltjesTail a 0 + have hB : (1 - C (L * (1 - u 0)) * X * G 0) * stieltjesTail b 0 = 1 := by + simpa only [G, hb0] using one_sub_mul_stieltjesTail b 0 + have hp : (1 - C L * X) * (stieltjesTail a 0 * stieltjesTail b 0) = 1 := by + rw [← hD] + calc + _ = ((1 - C (L * u 0) * X * F 0) * stieltjesTail a 0) * + ((1 - C (L * (1 - u 0)) * X * G 0) * stieltjesTail b 0) := by ring + _ = 1 := by rw [hA, hB, one_mul] + have hi : (1 - C L * X) * stieltjesStep L 1 = 1 := by + simpa only [mul_one] using one_sub_mul_stieltjesStep L (1 : R⟦X⟧) + calc + stieltjesTail a 0 * stieltjesTail b 0 = + (stieltjesTail a 0 * stieltjesTail b 0) * ((1 - C L * X) * stieltjesStep L 1) := by + rw [hi, mul_one] + _ = ((1 - C L * X) * (stieltjesTail a 0 * stieltjesTail b 0)) * + stieltjesStep L 1 := by ring + _ = stieltjesStep L 1 := by rw [hp, one_mul] + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ComplementaryChain.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ComplementaryChain.lean new file mode 100644 index 000000000..fcdeb25a5 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ComplementaryChain.lean @@ -0,0 +1,63 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Complementary +import Mathlib.Tactic.TypeStar + +/-! +# Complementation of normalized Wall parameters + +Complement every positive-index parameter and reset the initial parameter +to zero. Complementing the initial zero as well would give the wrong first +numerator, so the boundary is explicit in the definition. +-/ + +public section + +namespace PowerSeries + +/-- The normalized complementary Wall parameters keep the initial parameter +zero and complement every subsequent parameter. -/ +@[expose] def complementaryChainParameters {R : Type*} [Zero R] [One R] [Sub R] + (g : ℕ → R) : ℕ → R + | 0 => 0 + | n + 1 => 1 - g (n + 1) + +/-- The complementary chain has initial parameter zero. -/ +@[simp] theorem complementaryChainParameters_zero {R : Type*} [Zero R] [One R] [Sub R] + (g : ℕ → R) : complementaryChainParameters g 0 = 0 := rfl + +/-- Positive-index parameters are complemented. -/ +@[simp] theorem complementaryChainParameters_succ {R : Type*} [Zero R] [One R] [Sub R] + (g : ℕ → R) (n : ℕ) : complementaryChainParameters g (n + 1) = 1 - g (n + 1) := rfl + +/-- Complementing preserves the closed unit interval, including its endpoints. -/ +theorem complementaryChainParameters_mem_Icc {g : ℕ → ℝ} + (hg : ∀ n, g n ∈ Set.Icc 0 1) (n : ℕ) : + complementaryChainParameters g n ∈ Set.Icc 0 1 := by + cases n with + | zero => exact ⟨le_rfl, zero_le_one⟩ + | succ n => + exact ⟨sub_nonneg.mpr (hg (n + 1)).2, sub_le_self _ (hg (n + 1)).1⟩ + +/-- Normalized complementary chain fractions have reciprocal-geometric +product. The identity needs no sign restriction on the real parameters or scale. -/ +theorem stieltjesTail_chain_mul_complementary (L : ℝ) {g : ℕ → ℝ} (hg0 : g 0 = 0) : + stieltjesTail (chainStieltjesNumerators L g) 0 * + stieltjesTail (chainStieltjesNumerators L (complementaryChainParameters g)) 0 = + stieltjesStep L 1 := by + apply stieltjesTail_mul_of_complementary_chain (u := fun n => g (n + 1)) + · simp only [chainStieltjesNumerators, hg0, sub_zero, mul_one] + · simp only [chainStieltjesNumerators, complementaryChainParameters_zero, + complementaryChainParameters_succ, sub_zero, mul_one] + · intro n + rfl + · intro n + simp only [chainStieltjesNumerators, complementaryChainParameters_succ, sub_sub_cancel] + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ComplementaryCoefficients.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ComplementaryCoefficients.lean new file mode 100644 index 000000000..00eb8780d --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ComplementaryCoefficients.lean @@ -0,0 +1,36 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Complementary +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients +import Mathlib.Tactic.TypeStar + +/-! +# Coefficient convolution for complementary Wall fractions +-/ + +public section + +open scoped BigOperators + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- The coefficient convolution of complementary formal chains is `L^n`. +This is the scaled coefficient form of the Kim-Zeng/Wall identity. -/ +theorem sum_coeff_stieltjesTail_complementary {L : R} {u a b : ℕ → R} + (ha0 : a 0 = L * u 0) (hb0 : b 0 = L * (1 - u 0)) + (ha : ∀ n, a (n + 1) = L * (1 - u n) * u (n + 1)) + (hb : ∀ n, b (n + 1) = L * u n * (1 - u (n + 1))) (n : ℕ) : + (∑ ij ∈ Finset.antidiagonal n, + coeff ij.1 (stieltjesTail a 0) * coeff ij.2 (stieltjesTail b 0)) = L ^ n := by + rw [← coeff_mul, stieltjesTail_mul_of_complementary_chain ha0 hb0 ha hb, + coeff_stieltjesStep_one_eq_pow] + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Contraction.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Contraction.lean new file mode 100644 index 000000000..75891281b --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Contraction.lean @@ -0,0 +1,97 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step + +/-! +# Contraction of formal Stieltjes fractions + +Pairing adjacent Stieltjes tails gives the Jacobi tail equations. The first +diagonal coefficient is `a 0`; subsequent diagonal coefficients are +`a (2*n+1) + a (2*n+2)`, and the outgoing numerators are adjacent products. +These are the classical contraction formulas, over any commutative ring. + +See Sokal and Walrad, "Continued-fraction characterization of Stieltjes moment +sequences with support in [ξ,∞)", equations (5) and (6). +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- The shared coefficient recurrence in multiplicative order for contraction. -/ +private theorem stieltjesTail_additive (a : ℕ → R) (s : ℕ) : + stieltjesTail a s = + 1 + C (a s) * X * stieltjesTail a (s + 1) * stieltjesTail a s := by + simpa only [mul_assoc, mul_comm, mul_left_comm] using stieltjesTail_eq_one_add a s + +/-- The first Jacobi step obtained by contracting a Stieltjes fraction. -/ +theorem stieltjesTail_eq_jacobiStep (a : ℕ → R) (s : ℕ) : + stieltjesTail a s = jacobiStep (a s) (a s * a (s + 1)) + (stieltjesTail a (s + 1) * stieltjesTail a (s + 2)) := by + apply eq_jacobiStep_of_mul_eq_one + have h0 := one_sub_mul_stieltjesTail a s + have h1 := stieltjesTail_additive a (s + 1) + simp only [Nat.add_assoc] at h1 + simp only [map_mul] + linear_combination h0 + C (a s) * X * stieltjesTail a s * h1 + +/-- A product of consecutive Stieltjes tails is the next contracted Jacobi tail. -/ +theorem stieltjesTail_mul_eq_jacobiStep (a : ℕ → R) (s : ℕ) : + stieltjesTail a s * stieltjesTail a (s + 1) = + jacobiStep (a s + a (s + 1)) (a (s + 1) * a (s + 2)) + (stieltjesTail a (s + 2) * stieltjesTail a (s + 3)) := by + apply eq_jacobiStep_of_mul_eq_one + have h0 := one_sub_mul_stieltjesTail a s + have h1 := one_sub_mul_stieltjesTail a (s + 1) + have h2 := stieltjesTail_additive a (s + 2) + simp only [Nat.add_assoc] at h1 h2 + simp only [map_add, map_mul] + linear_combination h0 + stieltjesTail a s * h1 + + C (a (s + 1)) * X * stieltjesTail a s * stieltjesTail a (s + 1) * h2 + +/-- The Jacobi tail family produced by pairing Stieltjes tails. -/ +@[expose] noncomputable def stieltjesJacobiTail (a : ℕ → R) : ℕ → R⟦X⟧ + | 0 => stieltjesTail a 0 + | n + 1 => stieltjesTail a (2 * n + 1) * stieltjesTail a (2 * n + 2) + +/-- The contracted Jacobi diagonal coefficients. -/ +@[expose] def stieltjesJacobiDiagonal (a : ℕ → R) : ℕ → R + | 0 => a 0 + | n + 1 => a (2 * n + 1) + a (2 * n + 2) + +/-- The contracted Jacobi outgoing numerator coefficients. The value at `n` +corresponds to the classical coefficient `β_(n+1)`. -/ +@[expose] def stieltjesJacobiNumerator (a : ℕ → R) (n : ℕ) : R := + a (2 * n) * a (2 * n + 1) + +/-- The explicit contracted tails satisfy the Jacobi continued-fraction equations. -/ +theorem stieltjesJacobiTail_eq_step (a : ℕ → R) (n : ℕ) : + stieltjesJacobiTail a n = + jacobiStep (stieltjesJacobiDiagonal a n) (stieltjesJacobiNumerator a n) + (stieltjesJacobiTail a (n + 1)) := by + cases n with + | zero => simpa [stieltjesJacobiTail, stieltjesJacobiDiagonal, + stieltjesJacobiNumerator] using stieltjesTail_eq_jacobiStep a 0 + | succ n => + simpa [stieltjesJacobiTail, stieltjesJacobiDiagonal, + stieltjesJacobiNumerator, Nat.mul_add, Nat.add_assoc] using + stieltjesTail_mul_eq_jacobiStep a (2 * n + 1) + +/-- Any formal Jacobi tails with the contracted coefficient data equal the +explicit paired Stieltjes tails. This identifies the formal continued fractions. -/ +theorem eq_stieltjesJacobiTail_of_step_eq {a : ℕ → R} {F : ℕ → R⟦X⟧} + (hF : ∀ n, F n = + jacobiStep (stieltjesJacobiDiagonal a n) (stieltjesJacobiNumerator a n) + (F (n + 1))) : F = stieltjesJacobiTail a := + eq_of_jacobiStep_eq hF (stieltjesJacobiTail_eq_step a) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Convergents.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Convergents.lean new file mode 100644 index 000000000..604ec7384 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Convergents.lean @@ -0,0 +1,80 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Step + +/-! +# Finite formal Stieltjes fractions + +Depth `n` uses the first `n` numerator coefficients starting at an offset `s`. +Further depth changes no coefficient below degree `n`. A zero numerator +terminates the effective fraction regardless of all subsequent coefficients. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- A finite Stieltjes continued fraction with bottom tail one. The numerator +`a 0` corresponds to the coefficient called `α₁` in the classical notation. -/ +@[expose] noncomputable def stieltjesConvergent (a : ℕ → R) : ℕ → ℕ → R⟦X⟧ + | 0, _ => 1 + | n + 1, s => stieltjesStep (a s) (stieltjesConvergent a n (s + 1)) + +/-- Every finite formal Stieltjes fraction is normalized at the constant term. -/ +@[simp] theorem constantCoeff_stieltjesConvergent (a : ℕ → R) (n s : ℕ) : + constantCoeff (stieltjesConvergent a n s) = 1 := by + cases n <;> simp [stieltjesConvergent] + +/-- Extra depth changes the finite fraction by a multiple of `X^n`. -/ +theorem X_pow_dvd_stieltjesConvergent_sub (a : ℕ → R) (n k s : ℕ) : + X ^ n ∣ stieltjesConvergent a (n + k) s - stieltjesConvergent a n s := by + induction n generalizing s with + | zero => simp + | succ n ih => + simpa only [Nat.succ_add, stieltjesConvergent] using + X_pow_dvd_stieltjesStep_sub (a s) (ih (s + 1)) + +/-- Formal coefficients stabilize once the convergent depth exceeds the degree. -/ +theorem coeff_stieltjesConvergent_eq (a : ℕ → R) {n m k : ℕ} + (hnm : n ≤ m) (hk : k < n) (s : ℕ) : + coeff k (stieltjesConvergent a m s) = coeff k (stieltjesConvergent a n s) := by + obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_le hnm + have h := X_pow_dvd_iff.mp (X_pow_dvd_stieltjesConvergent_sub a n d s) k hk + exact sub_eq_zero.mp (by simpa only [map_sub] using h) + +/-- Only the first `n` numerator coefficients affect a depth-`n` convergent. -/ +theorem stieltjesConvergent_eq_of_prefix {a b : ℕ → R} (n s t : ℕ) + (h : ∀ i < n, a (s + i) = b (t + i)) : + stieltjesConvergent a n s = stieltjesConvergent b n t := by + induction n generalizing s t with + | zero => rfl + | succ n ih => + have h0 : a s = b t := by simpa only [Nat.add_zero] using h 0 (by lia) + have htail : ∀ i < n, a (s + 1 + i) = b (t + 1 + i) := by + intro i hi + simpa only [Nat.add_assoc, Nat.add_comm 1 i] using h (i + 1) (by lia) + rw [stieltjesConvergent, stieltjesConvergent, h0, ih (s + 1) (t + 1) htail] + +/-- A zero active numerator makes every deeper convergent equal to the one +ending immediately before it. Later coefficients may have arbitrary signs. -/ +theorem stieltjesConvergent_eq_of_zero (a : ℕ → R) (n k s : ℕ) + (h : a (s + n) = 0) : + stieltjesConvergent a (n + k) s = stieltjesConvergent a n s := by + induction n generalizing s with + | zero => + have hs : a s = 0 := by simpa only [Nat.add_zero] using h + cases k <;> simp [stieltjesConvergent, hs] + | succ n ih => + have ht : a (s + 1 + n) = 0 := by + simpa only [Nat.add_assoc, Nat.add_comm 1 n] using h + simpa only [Nat.succ_add, stieltjesConvergent] using + congrArg (stieltjesStep (a s)) (ih (s + 1) ht) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerGauss.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerGauss.lean new file mode 100644 index 000000000..50b11a77c --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerGauss.lean @@ -0,0 +1,72 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail + +/-! +# The formal Euler–Gauss recurrence + +A normalized family satisfying `G (k+1) - G k = a k * X * G (k+2)` gives +the Stieltjes fraction with numerator data `a`. Quotients of adjacent +constant-term-one series satisfy the unique Stieltjes tail equations. +This is purely formal and requires neither nonzero numerators nor order. + +See Sokal, "A simple algorithm for expanding a power series as a continued +fraction", Section 2 and Proposition 9.2. Here `G 0` is the source's `g₋₁`. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- A right inverse of a Stieltjes denominator equals its formal Stieltjes step. -/ +theorem eq_stieltjesStep_of_mul_eq_one {a : R} {f g : R⟦X⟧} + (h : (1 - C a * X * f) * g = 1) : g = stieltjesStep a f := by + calc + g = g * ((1 - C a * X * f) * stieltjesStep a f) := by + rw [one_sub_mul_stieltjesStep, mul_one] + _ = ((1 - C a * X * f) * g) * stieltjesStep a f := by ring + _ = stieltjesStep a f := by rw [h, one_mul] + +/-- The Euler–Gauss recurrence with `G 0 = 1` represents `G 1` by the +formal Stieltjes fraction. Every later constant term is forced to be one. -/ +theorem eq_stieltjesTail_of_eulerGauss {a : ℕ → R} {G : ℕ → R⟦X⟧} + (h0 : G 0 = 1) + (hrec : ∀ k, G (k + 1) - G k = C (a k) * X * G (k + 2)) : + G 1 = stieltjesTail a 0 := by + have hconst (k : ℕ) : constantCoeff (G k) = 1 := by + induction k with + | zero => simp only [h0, map_one] + | succ k ih => + have h := congrArg constantCoeff (hrec k) + simp only [map_sub, map_mul, constantCoeff_X, mul_zero, zero_mul] at h + exact (sub_eq_zero.mp h).trans ih + let I : ℕ → R⟦X⟧ := fun k => invOfUnit (G k) 1 + have hi (k : ℕ) : G k * I k = 1 := + mul_invOfUnit (G k) 1 (by simpa using hconst k) + have hi' (k : ℕ) : I k * G k = 1 := by rw [mul_comm]; exact hi k + let F : ℕ → R⟦X⟧ := fun k => G (k + 1) * I k + have hf (k : ℕ) : F k = stieltjesStep (a k) (F (k + 1)) := by + apply eq_stieltjesStep_of_mul_eq_one + have heq : G (k + 1) - C (a k) * X * G (k + 2) = G k := by + linear_combination hrec k + change (1 - C (a k) * X * (G (k + 1 + 1) * I (k + 1))) * + (G (k + 1) * I k) = 1 + calc + _ = G (k + 1) * I k - C (a k) * X * G (k + 2) * + (I (k + 1) * G (k + 1)) * I k := by ring + _ = (G (k + 1) - C (a k) * X * G (k + 2)) * I k := by + rw [hi' (k + 1)] + ring + _ = 1 := by rw [heq, hi] + have hF : F = stieltjesTail a := eq_stieltjesTail_of_step_eq hf + have hi0 : I 0 = 1 := by simpa only [h0, one_mul] using hi 0 + simpa only [F, Nat.zero_add, hi0, mul_one] using congrFun hF 0 + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerPaired.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerPaired.lean new file mode 100644 index 000000000..72be52e74 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerPaired.lean @@ -0,0 +1,66 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerGauss + +/-! +# Paired Euler–Gauss families +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- Two alternating Euler–Gauss families represent a formal Stieltjes fraction. +The numerator sequence is explicitly identified at every even and odd index. -/ +theorem exists_stieltjesTail_of_paired {E O : ℕ → R⟦X⟧} {u v : ℕ → R} + (hbase : E 0 - 1 = C (u 0) * X * O 0) + (hodd : ∀ n, O n - E n = C (v n) * X * E (n + 1)) + (heven : ∀ n, E (n + 1) - O n = C (u (n + 1)) * X * O (n + 1)) : + ∃ a : ℕ → R, (∀ n, a (2 * n) = u n ∧ a (2 * n + 1) = v n) ∧ + E 0 = stieltjesTail a 0 := by + let a : ℕ → R := fun k => Sum.elim u v (Equiv.natSumNatEquivNat.symm k) + let H : ℕ → R⟦X⟧ := fun k => Sum.elim E O (Equiv.natSumNatEquivNat.symm k) + have haeven (n : ℕ) : a (2 * n) = u n := by + rw [show 2 * n = Equiv.natSumNatEquivNat (Sum.inl n) by simp] + simp only [a, Equiv.symm_apply_apply, Sum.elim_inl] + have haodd (n : ℕ) : a (2 * n + 1) = v n := by + rw [show 2 * n + 1 = Equiv.natSumNatEquivNat (Sum.inr n) by simp] + simp only [a, Equiv.symm_apply_apply, Sum.elim_inr] + have hHeven (n : ℕ) : H (2 * n) = E n := by + rw [show 2 * n = Equiv.natSumNatEquivNat (Sum.inl n) by simp] + simp only [H, Equiv.symm_apply_apply, Sum.elim_inl] + have hHodd (n : ℕ) : H (2 * n + 1) = O n := by + rw [show 2 * n + 1 = Equiv.natSumNatEquivNat (Sum.inr n) by simp] + simp only [H, Equiv.symm_apply_apply, Sum.elim_inr] + have ha0 : a 0 = u 0 := by simpa only [Nat.mul_zero] using haeven 0 + have hH0 : H 0 = E 0 := by simpa only [Nat.mul_zero] using hHeven 0 + have hH1 : H 1 = O 0 := by + simpa only [Nat.mul_zero, Nat.zero_add] using hHodd 0 + let G : ℕ → R⟦X⟧ + | 0 => 1 + | k + 1 => H k + have hrec (k : ℕ) : G (k + 1) - G k = C (a k) * X * G (k + 2) := by + cases k with + | zero => simpa only [G, hH0, hH1, ha0] using hbase + | succ k => + obtain ⟨n, rfl | rfl⟩ := Nat.even_or_odd' k + · change H (2 * n + 1) - H (2 * n) = C (a (2 * n + 1)) * X * H (2 * n + 2) + rw [show 2 * n + 2 = 2 * (n + 1) by ring, hHeven, hHodd, haodd, hHeven] + exact hodd n + · change H (2 * n + 2) - H (2 * n + 1) = + C (a (2 * n + 2)) * X * H (2 * n + 3) + rw [show 2 * n + 2 = 2 * (n + 1) by ring, + show 2 * n + 3 = 2 * (n + 1) + 1 by ring, hHeven, hHodd, haeven, hHodd] + exact heven n + refine ⟨a, fun n => ⟨haeven n, haodd n⟩, ?_⟩ + simpa only [G, hH0] using eq_stieltjesTail_of_eulerGauss (a := a) (G := G) rfl hrec + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerTermination.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerTermination.lean new file mode 100644 index 000000000..6603b67e9 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerTermination.lean @@ -0,0 +1,47 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerGauss + +/-! +# Terminating Euler–Gauss recurrences +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- A finite Euler–Gauss chain whose last two series agree yields the Stieltjes +fraction with every numerator after that position set to zero. This includes +the immediate termination `N = 0`. -/ +theorem eq_stieltjesTail_of_eulerGauss_terminated + {a : ℕ → R} {G : ℕ → R⟦X⟧} (N : ℕ) (h0 : G 0 = 1) + (hrec : ∀ k < N, G (k + 1) - G k = C (a k) * X * G (k + 2)) + (hterm : G (N + 1) = G N) : + G 1 = stieltjesTail (fun k => if k < N then a k else 0) 0 := by + let H : ℕ → R⟦X⟧ := fun k => G (min k (N + 1)) + have hH (k : ℕ) : H (k + 1) - H k = + C (if k < N then a k else 0) * X * H (k + 2) := by + by_cases hk : k < N + · simpa only [H, min_eq_left (by lia : k + 1 ≤ N + 1), + min_eq_left (by lia : k ≤ N + 1), min_eq_left (by lia : k + 2 ≤ N + 1), + ite_eq_left hk] using hrec k hk + · rw [ite_eq_right hk, map_zero, zero_mul, zero_mul] + by_cases heq : k = N + · subst k + simp only [H, min_self, min_eq_left (by lia : N ≤ N + 1), hterm, sub_self] + · have hlarge : N + 1 ≤ k := by lia + simp only [H, min_eq_right (by lia : N + 1 ≤ k + 1), + min_eq_right hlarge, sub_self] + have hH0 : H 0 = 1 := by simpa [H] using h0 + have hH1 : H 1 = G 1 := by simp only [H, min_eq_left (by lia : 1 ≤ N + 1)] + simpa only [hH1] using eq_stieltjesTail_of_eulerGauss hH0 hH + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteAtomicFraction.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteAtomicFraction.lean new file mode 100644 index 000000000..49d93841f --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteAtomicFraction.lean @@ -0,0 +1,106 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import Mathlib.Basic.Real.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteMoment +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.FiniteAtomicNorms + +/-! +# Stieltjes fractions of finite positive atomic moments + +Shifting moments multiplies the weight at a node by that node. For a finite +nonnegative support, this deletes only the origin. The two exact finite +Hankel ranks therefore differ by at most one, as required by the terminating +Euler–Gauss theorem. +-/ + +public section + +open Polynomial + +namespace PowerSeries + +/-- Shifting finite nonnegative moments removes only the origin. -/ +private theorem shifted_finset_moments (s : Finset ℝ) (w : ℝ → ℝ) : + (fun k => ∑ x ∈ s, w x * x ^ (k + 1)) = + (fun k => ∑ x ∈ s.erase 0, (w x * x) * x ^ k) := by + classical + funext k + calc + _ = ∑ x ∈ s, (w x * x) * x ^ k := by + apply Finset.sum_congr rfl + intro x _ + rw [pow_succ'] + ring + _ = _ := by + symm + apply Finset.sum_subset (Finset.erase_subset _ _) + intro x hxs hxt + have hx : x = 0 := by + by_contra hx + exact hxt (Finset.mem_erase.mpr ⟨hx, hxs⟩) + simp [hx] + +/-- A nonempty finite positive support supplies the two terminating moment ranks. -/ +private theorem finite_atomic_fraction_nonempty (s : Finset ℝ) (w : ℝ → ℝ) + (hne : s.Nonempty) (hx : ∀ x ∈ s, 0 ≤ x) (hw : ∀ x ∈ s, 0 < w x) : + ∃ a : ℕ → ℝ, (∀ k, 0 ≤ a k) ∧ + mk (fun k => ∑ x ∈ s, w x * x ^ k) = + C (∑ x ∈ s, w x) * stieltjesTail a 0 := by + classical + let m : ℕ → ℝ := fun k => ∑ x ∈ s, w x * x ^ k + let t := s.erase 0 + have hshift : (fun k => m (k + 1)) = + (fun k => ∑ x ∈ t, (w x * x) * x ^ k) := shifted_finset_moments s w + have hwshift (x : ℝ) (hxt : x ∈ t) : 0 < w x * x := by + have hxs := (Finset.mem_erase.mp hxt).2 + have hxn := (Finset.mem_erase.mp hxt).1 + exact mul_pos (hw x hxs) (lt_of_le_of_ne (hx x hxs) (Ne.symm hxn)) + have hMN : t.card ≤ s.card := Finset.card_erase_le + have hNM : s.card ≤ t.card + 1 := by + by_cases hzero : 0 ∈ s + · exact le_of_eq (Finset.card_erase_add_one hzero).symm + · simp only [t, Finset.erase_eq_of_notMem hzero] + lia + have hpos (n : ℕ) (hn : n ≤ s.card) : (momentHankelMatrix m n).PosDef := + momentHankelMatrix_finset_sum_posDef s id w (Function.injective_id.injOn) hw n hn + have hs (n : ℕ) (hn : n ≤ t.card) : + (momentHankelMatrix (fun k => m (k + 1)) n).PosDef := by + rw [hshift] + exact momentHankelMatrix_finset_sum_posDef t id (fun x => w x * x) + (Function.injective_id.injOn) hwshift n hn + have hz (p : ℝ[X]) : momentPairing m p (monicMomentPolynomial m s.card) = 0 := + momentPairing_finset_sum_card_eq_zero s id w (Function.injective_id.injOn) hw p + have hzshift (p : ℝ[X]) : momentPairing (fun k => m (k + 1)) p + (monicMomentPolynomial (fun k => m (k + 1)) t.card) = 0 := by + rw [hshift] + exact momentPairing_finset_sum_card_eq_zero t id (fun x => w x * x) + (Function.injective_id.injOn) hwshift p + obtain ⟨_, a, ha, hstop, hf⟩ := exists_stieltjesTail_of_finite_hankel m s.card t.card + hne.card_pos hMN hNM hpos hs hz hzshift + refine ⟨a, ?_, ?_⟩ + · intro k + rcases lt_or_ge k (s.card + t.card - 1) with hk | hk + · exact (ha k hk).le + · rw [hstop k hk] + · simpa only [m, pow_zero, mul_one] using hf + +/-- Every finite positive weighted set of nonnegative nodes has a nonnegative +formal Stieltjes fraction. Empty support and an atom at zero are included. -/ +theorem exists_stieltjesTail_finset_moments (s : Finset ℝ) (w : ℝ → ℝ) + (hx : ∀ x ∈ s, 0 ≤ x) (hw : ∀ x ∈ s, 0 < w x) : + ∃ a : ℕ → ℝ, (∀ k, 0 ≤ a k) ∧ + mk (fun k => ∑ x ∈ s, w x * x ^ k) = + C (∑ x ∈ s, w x) * stieltjesTail a 0 := by + rcases s.eq_empty_or_nonempty with rfl | hne + · refine ⟨fun _ => 0, fun _ => le_rfl, ?_⟩ + ext k + simp only [Finset.sum_empty, map_zero, zero_mul, coeff_mk] + · exact finite_atomic_fraction_nonempty s w hne hx hw + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteMeasureFraction.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteMeasureFraction.lean new file mode 100644 index 000000000..a6574a65b --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteMeasureFraction.lean @@ -0,0 +1,81 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteAtomicFraction + +/-! +# Stieltjes fractions of finite-carrier measures + +Zero-mass nodes are removed from the carrying set. Every retained node then +has positive real mass and is nonnegative by the measure's support premise. +The finite atomic fraction theorem includes the empty measure automatically. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- Discard zero-mass carrier points and integrate over the remaining atoms. -/ +private theorem finite_carrier_moment_sum {mu : Measure ℝ} [IsFiniteMeasure mu] + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) (s₀ : Finset ℝ) (hs₀ : ∀ᵐ x ∂mu, x ∈ s₀) : + ∃ s : Finset ℝ, (∀ x ∈ s, 0 ≤ x) ∧ (∀ x ∈ s, 0 < mu.real {x}) ∧ + ∀ k : ℕ, (∫ x : ℝ, x ^ k ∂mu) = ∑ x ∈ s, mu.real {x} * x ^ k := by + classical + let s := s₀.filter (fun x => mu {x} ≠ 0) + have hne (x : ℝ) (hx : x ∈ s) : mu {x} ≠ 0 := (Finset.mem_filter.mp hx).2 + have hnode (x : ℝ) (hx : x ∈ s) : 0 ≤ x := by + by_contra hneg + exact hne x hx (measure_mono_null (Set.singleton_subset_iff.mpr hneg) (ae_iff.mp hpos)) + have hweight (x : ℝ) (hx : x ∈ s) : 0 < mu.real {x} := + lt_of_le_of_ne measureReal_nonneg + (Ne.symm ((measureReal_ne_zero_iff (measure_ne_top mu {x})).mpr (hne x hx))) + have hmu : mu = ∑ x ∈ s, mu {x} • Measure.dirac x := by + calc + mu = ∑ x ∈ s₀, mu {x} • Measure.dirac x := Measure.ae_mem_finset_iff.mp hs₀ + _ = _ := by + symm + apply Finset.sum_subset (Finset.filter_subset _ _) + intro x hx hxs + have hz : mu {x} = 0 := by + by_contra hz + exact hxs (Finset.mem_filter.mpr ⟨hx, hz⟩) + rw [hz, zero_smul] + refine ⟨s, hnode, hweight, fun k => ?_⟩ + calc + (∫ x : ℝ, x ^ k ∂mu) = + ∫ x : ℝ, x ^ k ∂(∑ y ∈ s, mu {y} • Measure.dirac y) := + congrArg (fun ν : Measure ℝ => ∫ x : ℝ, x ^ k ∂ν) hmu + _ = ∑ x ∈ s, mu.real {x} * x ^ k := by + rw [integral_finsetSum_measure (fun y _ => + (integrable_dirac (by finiteness)).smul_measure (measure_ne_top mu {y}))] + apply Finset.sum_congr rfl + intro y _ + rw [integral_smul_measure, integral_dirac, smul_eq_mul] + rfl + +/-- A finite nonnegative measure carried by a finite set has a nonnegative +formal Stieltjes fraction with its exact total mass as outer scalar. -/ +theorem exists_stieltjesTail_of_finite_carrier {mu : Measure ℝ} [IsFiniteMeasure mu] + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) (S : Set ℝ) (hS : S.Finite) (hcarrier : mu Sᶜ = 0) : + ∃ a : ℕ → ℝ, (∀ k, 0 ≤ a k) ∧ + mk (fun k => ∫ x : ℝ, x ^ k ∂mu) = C (mu.real Set.univ) * stieltjesTail a 0 := by + classical + have hs₀ : ∀ᵐ x ∂mu, x ∈ hS.toFinset := by + simpa only [Set.Finite.mem_toFinset] using (ae_iff.mpr hcarrier : ∀ᵐ x ∂mu, x ∈ S) + obtain ⟨s, hx, hw, hmom⟩ := finite_carrier_moment_sum hpos hS.toFinset hs₀ + obtain ⟨a, ha, hf⟩ := exists_stieltjesTail_finset_moments s (fun x => mu.real {x}) hx hw + have hmass : mu.real Set.univ = ∑ x ∈ s, mu.real {x} := by + simpa only [pow_zero, integral_const, smul_eq_mul, mul_one] using hmom 0 + refine ⟨a, ha, ?_⟩ + rw [funext hmom, hmass] + exact hf + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteMoment.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteMoment.lean new file mode 100644 index 000000000..3d77646d4 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteMoment.lean @@ -0,0 +1,259 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffelLocal +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesLocal +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerTermination + +/-! +# Finite-rank moment data give a terminating Stieltjes fraction + +Let `N` and `M` be the unshifted and shifted moment ranks, respectively. +When `M ≤ N ≤ M+1`, the first zero numerator has index `N+M-1`. +The proof uses only positive finite Hankel forms and the actual vanishing +pairings of the full-rank nodal polynomials. The origin-only case `M = 0` +is included. This is the terminating case of Sokal’s formal moment criterion, +Proposition 7 on p. 5 of the published hypergeometric-function paper. +-/ + +public section + +open PowerSeries +open scoped PowerSeries + +namespace Polynomial + +/-- Interleave the two norm-ratio families in their Euler–Gauss order. -/ +private noncomputable def momentEulerNumerator (μ : ℕ → ℝ) (k : ℕ) : ℝ := + Sum.elim (momentStieltjesEven μ) (momentStieltjesOdd μ) + (Equiv.natSumNatEquivNat.symm k) + +/-- Interleave the unshifted and shifted orthogonal series. -/ +private noncomputable def momentEulerPair (μ : ℕ → ℝ) (k : ℕ) : ℝ⟦X⟧ := + Sum.elim (momentOrthogonalSeries μ) + (momentOrthogonalSeries (fun k => μ (k + 1))) + (Equiv.natSumNatEquivNat.symm k) + +/-- Prepend the constant unit series to the paired orthogonal series. -/ +private noncomputable def momentEulerFamily (μ : ℕ → ℝ) : ℕ → ℝ⟦X⟧ + | 0 => 1 + | k + 1 => momentEulerPair μ k + +/-- Even positions recover the unshifted norm ratio. -/ +private theorem momentEulerNumerator_even (μ : ℕ → ℝ) (n : ℕ) : + momentEulerNumerator μ (2 * n) = momentStieltjesEven μ n := by + rw [show 2 * n = Equiv.natSumNatEquivNat (Sum.inl n) by simp] + simp only [momentEulerNumerator, Equiv.symm_apply_apply, Sum.elim_inl] + +/-- Odd positions recover the shifted norm ratio. -/ +private theorem momentEulerNumerator_odd (μ : ℕ → ℝ) (n : ℕ) : + momentEulerNumerator μ (2 * n + 1) = momentStieltjesOdd μ n := by + rw [show 2 * n + 1 = Equiv.natSumNatEquivNat (Sum.inr n) by simp] + simp only [momentEulerNumerator, Equiv.symm_apply_apply, Sum.elim_inr] + +/-- Even positions recover the original orthogonal series. -/ +private theorem momentEulerPair_even (μ : ℕ → ℝ) (n : ℕ) : + momentEulerPair μ (2 * n) = momentOrthogonalSeries μ n := by + rw [show 2 * n = Equiv.natSumNatEquivNat (Sum.inl n) by simp] + simp only [momentEulerPair, Equiv.symm_apply_apply, Sum.elim_inl] + +/-- Odd positions recover the shifted orthogonal series. -/ +private theorem momentEulerPair_odd (μ : ℕ → ℝ) (n : ℕ) : + momentEulerPair μ (2 * n + 1) = + momentOrthogonalSeries (fun k => μ (k + 1)) n := by + rw [show 2 * n + 1 = Equiv.natSumNatEquivNat (Sum.inr n) by simp] + simp only [momentEulerPair, Equiv.symm_apply_apply, Sum.elim_inr] + +/-- A vanishing shifted pairing at degree zero makes the moment series constant. -/ +private theorem mk_eq_C_of_shift_pairing_zero (μ : ℕ → ℝ) + (hzero : ∀ p : ℝ[X], momentPairing (fun k => μ (k + 1)) p + (monicMomentPolynomial (fun k => μ (k + 1)) 0) = 0) : + PowerSeries.mk μ = PowerSeries.C (μ 0) := by + have hm (k : ℕ) : μ (k + 1) = 0 := by + simpa only [monicMomentPolynomial_zero, momentPairing, mul_one, + momentFunctional_X_pow] using hzero (X ^ k) + ext k + cases k with + | zero => simp only [PowerSeries.coeff_mk, PowerSeries.coeff_zero_C] + | succ k => simp only [PowerSeries.coeff_mk, PowerSeries.coeff_succ_C, hm] + +/-- Local Christoffel identities give the Euler–Gauss recurrence before the +first vanishing numerator. -/ +private theorem momentEulerFamily_sub_of_lt (μ : ℕ → ℝ) (N M : ℕ) + (hMN : M ≤ N) (hNM : N ≤ M + 1) + (hu : ∀ n < N, 0 < momentNormSq μ n) + (hv : ∀ n < M, 0 < momentNormSq (fun k => μ (k + 1)) n) + (hd : ∀ n ≤ N, IsUnit (momentHankelMatrix μ n).det) + (hs : ∀ n ≤ M, IsUnit (momentHankelMatrix (fun k => μ (k + 1)) n).det) + (hm0 : μ 0 ≠ 0) (hm1 : μ 1 ≠ 0) (k : ℕ) (hk : k < N + M - 1) : + momentEulerFamily μ (k + 1) - momentEulerFamily μ k = + PowerSeries.C (momentEulerNumerator μ k) * PowerSeries.X * + momentEulerFamily μ (k + 2) := by + let E := momentOrthogonalSeries μ + let O := momentOrthogonalSeries (fun k => μ (k + 1)) + let a := momentEulerNumerator μ + let H := momentEulerPair μ + have haeven (n : ℕ) : a (2 * n) = momentStieltjesEven μ n := + momentEulerNumerator_even μ n + have haodd (n : ℕ) : a (2 * n + 1) = momentStieltjesOdd μ n := + momentEulerNumerator_odd μ n + have hHeven (n : ℕ) : H (2 * n) = momentOrthogonalSeries μ n := + momentEulerPair_even μ n + have hHodd (n : ℕ) : H (2 * n + 1) = + momentOrthogonalSeries (fun k => μ (k + 1)) n := momentEulerPair_odd μ n + have ha0 : a 0 = momentStieltjesEven μ 0 := by simpa only [Nat.mul_zero] using haeven 0 + have hH0 : H 0 = E 0 := by simpa only [Nat.mul_zero] using hHeven 0 + have hH1 : H 1 = O 0 := by simpa only [Nat.mul_zero, Nat.zero_add] using hHodd 0 + cases k with + | zero => + change H 0 - 1 = PowerSeries.C (a 0) * PowerSeries.X * H 1 + rw [hH0, hH1, ha0] + exact momentOrthogonalSeries_zero_sub_one_of_ne_zero μ hm0 hm1 + | succ k => + obtain ⟨n, rfl | rfl⟩ := Nat.even_or_odd' k + · have hnN : n + 1 < N := by lia + have hnM : n < M := by lia + have hpoly := X_mul_monicMomentPolynomial_shift_of_isUnit μ n + (hd n (by lia)) (hd (n + 1) (by lia)) (hs n (by lia)) (hu n (by lia)).ne' + have hstep := momentOrthogonalSeries_shift_sub_of_identity μ n hpoly + (hd (n + 1) (by lia)) (hu n (by lia)).ne' (hv n hnM).ne' + (hu (n + 1) hnN).ne' + change H (2 * n + 1) - H (2 * n) = + PowerSeries.C (a (2 * n + 1)) * PowerSeries.X * H (2 * n + 2) + rw [show 2 * n + 2 = 2 * (n + 1) by ring, + hHeven, hHodd, haodd, hHeven] + exact hstep + · have hnN : n + 1 < N := by lia + have hnM : n + 1 < M := by lia + have hpoly := monicMomentPolynomial_eq_shift_add_of_isUnit μ n + (hd (n + 1) (by lia)) (hs n (by lia)) (hs (n + 1) (by lia)) + (hv n (by lia)).ne' + have hstep := momentOrthogonalSeries_succ_sub_of_identity μ n hpoly + (hs (n + 1) (by lia)) (hu (n + 1) hnN).ne' (hv n (by lia)).ne' + (hv (n + 1) hnM).ne' + change H (2 * n + 2) - H (2 * n + 1) = + PowerSeries.C (a (2 * n + 2)) * PowerSeries.X * H (2 * n + 3) + rw [show 2 * n + 2 = 2 * (n + 1) by ring, + show 2 * n + 3 = 2 * (n + 1) + 1 by ring, hHeven, hHodd, haeven, hHodd] + exact hstep + +/-- The full-rank vanishing pairing identifies the final two Euler–Gauss +series, in both possible rank configurations. -/ +private theorem momentEulerFamily_terminal (μ : ℕ → ℝ) (N M : ℕ) + (hMN : M ≤ N) (hNM : N ≤ M + 1) (hM : M ≠ 0) + (hu : ∀ n < N, 0 < momentNormSq μ n) + (hv : ∀ n < M, 0 < momentNormSq (fun k => μ (k + 1)) n) + (hd : ∀ n ≤ N, IsUnit (momentHankelMatrix μ n).det) + (hs : ∀ n ≤ M, IsUnit (momentHankelMatrix (fun k => μ (k + 1)) n).det) + (hzero : ∀ p : ℝ[X], momentPairing μ p (monicMomentPolynomial μ N) = 0) + (hzeroShift : ∀ p : ℝ[X], momentPairing (fun k => μ (k + 1)) p + (monicMomentPolynomial (fun k => μ (k + 1)) M) = 0) : + momentEulerFamily μ (N + M - 1 + 1) = momentEulerFamily μ (N + M - 1) := by + let H := momentEulerPair μ + have hHeven (n : ℕ) : H (2 * n) = momentOrthogonalSeries μ n := + momentEulerPair_even μ n + have hHodd (n : ℕ) : H (2 * n + 1) = + momentOrthogonalSeries (fun k => μ (k + 1)) n := momentEulerPair_odd μ n + by_cases heq : N = M + · subst N + obtain ⟨n, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hM + rw [show (n + 1) + (n + 1) - 1 = 2 * n + 1 by lia] + change H (2 * n + 1) = H (2 * n) + rw [hHodd, hHeven] + apply momentOrthogonalSeries_shift_eq_of_pairing_zero μ n + · exact X_mul_monicMomentPolynomial_shift_of_isUnit μ n + (hd n (by lia)) (hd (n + 1) (by lia)) (hs n (by lia)) (hu n (by lia)).ne' + · exact hzero + · exact (hu n (by lia)).ne' + · exact (hv n (by lia)).ne' + · have heq : N = M + 1 := by lia + subst N + obtain ⟨n, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hM + rw [show (n + 1 + 1) + (n + 1) - 1 = 2 * (n + 1) by lia] + change H (2 * (n + 1)) = H (2 * n + 1) + rw [hHeven, hHodd] + apply momentOrthogonalSeries_succ_eq_of_pairing_zero μ n + · exact monicMomentPolynomial_eq_shift_add_of_isUnit μ n + (hd (n + 1) (by lia)) (hs n (by lia)) (hs (n + 1) (by lia)) + (hv n (by lia)).ne' + · exact hzeroShift + · exact (hu (n + 1) (by lia)).ne' + · exact (hv n (by lia)).ne' + +/-- Every numerator before the exact finite-rank boundary is a positive +ratio of orthogonal norms. -/ +private theorem momentEulerNumerator_pos_of_lt (μ : ℕ → ℝ) (N M : ℕ) + (hMN : M ≤ N) (hNM : N ≤ M + 1) + (hu : ∀ n < N, 0 < momentNormSq μ n) + (hv : ∀ n < M, 0 < momentNormSq (fun k => μ (k + 1)) n) + (k : ℕ) (hk : k < N + M - 1) : 0 < momentEulerNumerator μ k := by + obtain ⟨n, rfl | rfl⟩ := Nat.even_or_odd' k + · rw [momentEulerNumerator_even] + exact div_pos (hv n (by lia)) (hu n (by lia)) + · rw [momentEulerNumerator_odd] + exact div_pos (hu (n + 1) (by lia)) (hv n (by lia)) + +/-- Positive finite moment forms and their exact vanishing boundary give a +Stieltjes fraction positive before `N+M-1` and identically zero thereafter. -/ +theorem exists_stieltjesTail_of_finite_hankel (μ : ℕ → ℝ) (N M : ℕ) + (hN : 0 < N) (hMN : M ≤ N) (hNM : N ≤ M + 1) + (hpos : ∀ n ≤ N, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n ≤ M, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) + (hzero : ∀ p : ℝ[X], momentPairing μ p (monicMomentPolynomial μ N) = 0) + (hzeroShift : ∀ p : ℝ[X], momentPairing (fun k => μ (k + 1)) p + (monicMomentPolynomial (fun k => μ (k + 1)) M) = 0) : + 0 < μ 0 ∧ ∃ a : ℕ → ℝ, + (∀ k < N + M - 1, 0 < a k) ∧ (∀ k, N + M - 1 ≤ k → a k = 0) ∧ + PowerSeries.mk μ = PowerSeries.C (μ 0) * stieltjesTail a 0 := by + have hu (n : ℕ) (hn : n < N) : 0 < momentNormSq μ n := + momentNormSq_pos μ n (hpos (n + 1) (by lia)) + have hv (n : ℕ) (hn : n < M) : 0 < momentNormSq (fun k => μ (k + 1)) n := + momentNormSq_pos _ n (hshift (n + 1) (by lia)) + have hd (n : ℕ) (hn : n ≤ N) : IsUnit (momentHankelMatrix μ n).det := + isUnit_iff_ne_zero.mpr (hpos n hn).det_pos.ne' + have hs (n : ℕ) (hn : n ≤ M) : + IsUnit (momentHankelMatrix (fun k => μ (k + 1)) n).det := + isUnit_iff_ne_zero.mpr (hshift n hn).det_pos.ne' + have hm0 : 0 < μ 0 := by simpa only [momentNormSq_zero] using hu 0 hN + refine ⟨hm0, ?_⟩ + by_cases hM : M = 0 + · have hlength : N + M - 1 = 0 := by lia + refine ⟨fun _ => 0, ?_, fun _ _ => rfl, ?_⟩ + · intro k hk + lia + · rw [stieltjesTail_eq_one_of_zero (a := fun _ : ℕ => (0 : ℝ)) (s := 0) rfl, + mul_one] + exact mk_eq_C_of_shift_pairing_zero μ (by simpa only [hM] using hzeroShift) + have hm1 : μ 1 ≠ 0 := by + simpa only [momentNormSq_zero, Nat.zero_add] using (hv 0 (Nat.pos_of_ne_zero hM)).ne' + let a := momentEulerNumerator μ + let G := momentEulerFamily μ + let b : ℕ → ℝ := fun k => if k < N + M - 1 then a k else 0 + have hG1 : G 1 = momentOrthogonalSeries μ 0 := by + change momentEulerPair μ 0 = momentOrthogonalSeries μ 0 + simpa only [Nat.mul_zero] using momentEulerPair_even μ 0 + have hseries : momentOrthogonalSeries μ 0 = stieltjesTail b 0 := by + apply hG1.symm.trans + exact eq_stieltjesTail_of_eulerGauss_terminated (a := a) (G := G) + (N + M - 1) rfl + (momentEulerFamily_sub_of_lt μ N M hMN hNM hu hv hd hs hm0.ne' hm1) + (momentEulerFamily_terminal μ N M hMN hNM hM hu hv hd hs hzero hzeroShift) + refine ⟨b, ?_, ?_, ?_⟩ + · intro k hk + rw [show b k = a k from ite_eq_left hk] + exact momentEulerNumerator_pos_of_lt μ N M hMN hNM hu hv k hk + · intro k hk + exact ite_eq_right (by lia) + · rw [← hseries] + ext k + simp only [PowerSeries.coeff_mk, PowerSeries.coeff_C_mul, + coeff_momentOrthogonalSeries_zero] + field_simp [hm0.ne'] + +end Polynomial diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/InfiniteMoment.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/InfiniteMoment.lean new file mode 100644 index 000000000..b29df67b8 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/InfiniteMoment.lean @@ -0,0 +1,45 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.StrictMoment +import RealRooted.Mathlib.MeasureTheory.Integral.HankelSupport + +/-! +# Stieltjes fractions for measures with no finite carrier + +The strict Hankel criterion applies to arbitrary nonnegative measures with +all natural moments whenever no finite set carries the measure. Atomicity, +compact support and analytic moment growth are not required. +-/ + +public section + +open Polynomial MeasureTheory + +namespace PowerSeries + +/-- The moment series of a nonnegative measure with no finite carrier has a +strictly positive formal S-fraction. The outer scalar is its exact total mass. -/ +theorem exists_pos_stieltjesTail_of_no_finite_carrier + {mu : Measure ℝ} (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hfinite : ∀ S : Set ℝ, S.Finite → mu Sᶜ ≠ 0) : + ∃ a : ℕ → ℝ, (∀ k, 0 < a k) ∧ + mk (fun k => ∫ x : ℝ, x ^ k ∂mu) = C (mu.real Set.univ) * stieltjesTail a 0 := by + let m : ℕ → ℝ := fun k => ∫ x : ℝ, x ^ k ∂mu + have hd (n : ℕ) : (momentHankelMatrix m n).PosDef := by + simpa only [m, Nat.add_zero] using + posDef_integral_pow_hankel_of_no_finite_carrier hmom hpos hfinite n 0 + have hs (n : ℕ) : (momentHankelMatrix (fun k => m (k + 1)) n).PosDef := + posDef_integral_pow_hankel_of_no_finite_carrier hmom hpos hfinite n 1 + obtain ⟨a, ha, _, hf⟩ := exists_pos_stieltjesTail_of_hankel_posDef m hd hs + refine ⟨a, ha, ?_⟩ + simpa only [m, pow_zero, integral_const, smul_eq_mul, mul_one] using hf + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/InitialParameterCriterion.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/InitialParameterCriterion.lean new file mode 100644 index 000000000..4734bf494 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/InitialParameterCriterion.lean @@ -0,0 +1,47 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters + +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportCriterion +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerParameters + +/-! +# The lower-support criterion with arbitrary initial parameter + +This is Sokal-Walrad, arXiv:2404.12131v1, Theorem 2(a)-(c). +The initial even parameter may be any nonnegative real number. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- A lower-support parametrization can have an arbitrary nonnegative +initial parameter instead of the normalization `u 0 = 0`. -/ +theorem exists_measure_moments_Ici_iff_nonneg_parameters + (m : ℕ → ℝ) {c : ℝ} (hc : 0 ≤ c) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n) ↔ + ∃ (a : ℝ) (u v : ℕ → ℝ), 0 ≤ a ∧ + (∀ k, 0 ≤ u k) ∧ (∀ k, 0 ≤ v k) ∧ + mk m = C a * stieltjesTail (shiftedStieltjesNumerators c u v) 0 := by + rw [exists_measure_moments_Ici_iff_parameters _ hc] + constructor + · rintro ⟨a, u, v, ha, _, hu, hv, hf⟩ + exact ⟨a, u, v, ha, hu, hv, hf⟩ + · rintro ⟨a, u, v, ha, hu, hv, hf⟩ + obtain ⟨u', v', hu0, hu', hv', heq⟩ := + exists_lower_stieltjesParameters hc hu hv (r := 0) le_rfl (hu 0) + refine ⟨a, u', v', ha, hu0, fun k => (hu' k).1, fun k => (hv k).trans (hv' k), ?_⟩ + simpa only [heq] using hf + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerParameters.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerParameters.lean new file mode 100644 index 000000000..e897bdd90 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerParameters.lean @@ -0,0 +1,119 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters + +/-! +# Lowering the initial Stieltjes parameter + +A nonnegative initial parameter can be replaced by any smaller nonnegative +value without changing any numerator. This is the reduction in Sokal-Walrad, +arXiv:2404.12131v1, proof of Theorem 2(c)-(b), equations (14)-(18). +The construction also works when the shift is zero or an odd parameter vanishes. +-/ + +public section + +namespace PowerSeries + +/-- Even parameters after lowering the initial value to `r`. -/ +@[expose] noncomputable def lowerStieltjesParameters + (c r : ℝ) (u v : ℕ → ℝ) : ℕ → ℝ + | 0 => r + | k + 1 => u (k + 1) * + (v k / (v k + c * (u k - lowerStieltjesParameters c r u v k))) * + ((1 + lowerStieltjesParameters c r u v k) / (1 + u k)) + +/-- Lowering the initial value keeps every even parameter between zero and +its original value. -/ +theorem lowerStieltjesParameters_bounds {c r : ℝ} (hc : 0 ≤ c) + {u v : ℕ → ℝ} (hu : ∀ k, 0 ≤ u k) (hv : ∀ k, 0 ≤ v k) + (hr : 0 ≤ r) (hru : r ≤ u 0) (n : ℕ) : + 0 ≤ lowerStieltjesParameters c r u v n ∧ + lowerStieltjesParameters c r u v n ≤ u n := by + induction n with + | zero => exact ⟨hr, hru⟩ + | succ n ih => + let w := lowerStieltjesParameters c r u v n + let V := v n + c * (u n - w) + have hw : 0 ≤ w := ih.1 + have hwu : w ≤ u n := ih.2 + have hvV : v n ≤ V := le_add_of_nonneg_right (mul_nonneg hc (sub_nonneg.mpr hwu)) + have hV : 0 ≤ V := (hv n).trans hvV + have h1 : 0 < 1 + u n := add_pos_of_pos_of_nonneg zero_lt_one (hu n) + change 0 ≤ u (n + 1) * (v n / V) * ((1 + w) / (1 + u n)) ∧ + u (n + 1) * (v n / V) * ((1 + w) / (1 + u n)) ≤ u (n + 1) + by_cases hz : V = 0 + · simp only [hz, div_zero, mul_zero, zero_mul] + exact ⟨le_rfl, hu _⟩ + · have hVp : 0 < V := lt_of_le_of_ne hV (Ne.symm hz) + have hA : 0 ≤ v n / V := div_nonneg (hv n) hV + have hAle : v n / V ≤ 1 := (div_le_one hVp).mpr hvV + have hB : 0 ≤ (1 + w) / (1 + u n) := + div_nonneg (add_nonneg zero_le_one hw) h1.le + have hBle : (1 + w) / (1 + u n) ≤ 1 := + (div_le_one h1).mpr (by linarith) + refine ⟨mul_nonneg (mul_nonneg (hu _) hA) hB, ?_⟩ + calc + u (n + 1) * (v n / V) * ((1 + w) / (1 + u n)) ≤ + u (n + 1) * (v n / V) := by + simpa only [mul_one] using + mul_le_mul_of_nonneg_left hBle (mul_nonneg (hu _) hA) + _ ≤ u (n + 1) := by + simpa only [mul_one] using mul_le_mul_of_nonneg_left hAle (hu _) + +/-- The odd parameters increase as the initial even parameter is lowered. -/ +theorem le_lowerStieltjesOddParameter {c r : ℝ} (hc : 0 ≤ c) + {u v : ℕ → ℝ} (hu : ∀ k, 0 ≤ u k) (hv : ∀ k, 0 ≤ v k) + (hr : 0 ≤ r) (hru : r ≤ u 0) (k : ℕ) : + v k ≤ v k + c * (u k - lowerStieltjesParameters c r u v k) := + le_add_of_nonneg_right (mul_nonneg hc + (sub_nonneg.mpr (lowerStieltjesParameters_bounds hc hu hv hr hru k).2)) + +/-- Lowering the initial parameter preserves every displayed numerator, +including those after a terminating zero. -/ +theorem shiftedStieltjesNumerators_lower {c r : ℝ} (hc : 0 ≤ c) + {u v : ℕ → ℝ} (hu : ∀ k, 0 ≤ u k) (hv : ∀ k, 0 ≤ v k) + (hr : 0 ≤ r) (hru : r ≤ u 0) : + shiftedStieltjesNumerators c (lowerStieltjesParameters c r u v) + (fun k => v k + c * (u k - lowerStieltjesParameters c r u v k)) = + shiftedStieltjesNumerators c u v := by + funext n + obtain ⟨k, hk | hk⟩ := Nat.even_or_odd' n + · subst n + simp only [shiftedStieltjesNumerators_even] + ring + · subst n + rw [shiftedStieltjesNumerators_odd, shiftedStieltjesNumerators_odd] + let w := lowerStieltjesParameters c r u v k + let V := v k + c * (u k - w) + have hw : 0 ≤ w := (lowerStieltjesParameters_bounds hc hu hv hr hru k).1 + have hvV : v k ≤ V := le_lowerStieltjesOddParameter hc hu hv hr hru k + have h1 : 1 + w ≠ 0 := by positivity + have h2 : 1 + u k ≠ 0 := ne_of_gt (add_pos_of_pos_of_nonneg zero_lt_one (hu k)) + change V * (u (k + 1) * (v k / V) * ((1 + w) / (1 + u k))) / (1 + w) = + v k * u (k + 1) / (1 + u k) + by_cases hV : V = 0 + · have hv0 : v k = 0 := le_antisymm (by simpa only [hV] using hvV) (hv k) + simp only [hV, hv0, div_zero, zero_div, mul_zero, zero_mul] + · field_simp [hV, h1, h2] + +/-- Any smaller nonnegative initial parameter admits a full nonnegative +parametrization with exactly the same numerator sequence. -/ +theorem exists_lower_stieltjesParameters {c r : ℝ} (hc : 0 ≤ c) + {u v : ℕ → ℝ} (hu : ∀ k, 0 ≤ u k) (hv : ∀ k, 0 ≤ v k) + (hr : 0 ≤ r) (hru : r ≤ u 0) : + ∃ u' v' : ℕ → ℝ, u' 0 = r ∧ + (∀ k, 0 ≤ u' k ∧ u' k ≤ u k) ∧ (∀ k, v k ≤ v' k) ∧ + shiftedStieltjesNumerators c u' v' = shiftedStieltjesNumerators c u v := by + exact ⟨lowerStieltjesParameters c r u v, + fun k => v k + c * (u k - lowerStieltjesParameters c r u v k), rfl, + lowerStieltjesParameters_bounds hc hu hv hr hru, + le_lowerStieltjesOddParameter hc hu hv hr hru, + shiftedStieltjesNumerators_lower hc hu hv hr hru⟩ + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportConstruction.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportConstruction.lean new file mode 100644 index 000000000..f0496eff1 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportConstruction.lean @@ -0,0 +1,80 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActivePrefix + +/-! +# Construction of nonnegative lower-support parameters + +The same recurrence works at shift zero. A denominator can vanish only at +an inactive numerator; matching the active prefix suffices for equality of +the formal fractions. Thus no standardized inactive-tail constraint is used. +-/ + +public section + +namespace PowerSeries + +/-- The even parameters for a translated Stieltjes fraction. -/ +@[expose] noncomputable def stieltjesShiftParameters (c : ℝ) (a : ℕ → ℝ) : ℕ → ℝ + | 0 => 0 + | k + 1 => (1 + stieltjesShiftParameters c a k) * a (2 * k + 1) / + (c * (1 + stieltjesShiftParameters c a k) + a (2 * k)) + +/-- All constructed even parameters are nonnegative, including at shift zero. -/ +theorem stieltjesShiftParameters_nonneg {c : ℝ} (hc : 0 ≤ c) {a : ℕ → ℝ} + (ha : ∀ k, 0 ≤ a k) (n : ℕ) : 0 ≤ stieltjesShiftParameters c a n := by + induction n with + | zero => exact le_rfl + | succ n ih => + exact div_nonneg (mul_nonneg (by positivity) (ha _)) + (add_nonneg (mul_nonneg hc (by positivity)) (ha _)) + +/-- The recurrence recovers every odd numerator whose preceding even numerator is nonzero. -/ +theorem stieltjesNumeratorsBeforeShift_parameters_odd {c : ℝ} (hc : 0 ≤ c) + {a : ℕ → ℝ} (ha : ∀ k, 0 ≤ a k) (k : ℕ) (hk : a (2 * k) ≠ 0) : + stieltjesNumeratorsBeforeShift c (stieltjesShiftParameters c a) + (fun j => a (2 * j)) (2 * k + 1) = a (2 * k + 1) := by + have hu := stieltjesShiftParameters_nonneg hc ha k + have h1 : 1 + stieltjesShiftParameters c a k ≠ 0 := by positivity + have hD : c * (1 + stieltjesShiftParameters c a k) + a (2 * k) ≠ 0 := by + apply ne_of_gt + exact add_pos_of_nonneg_of_pos (mul_nonneg hc (by positivity)) + (lt_of_le_of_ne (ha _) (Ne.symm hk)) + rw [stieltjesNumeratorsBeforeShift_odd, stieltjesShiftParameters] + rw [div_mul_cancel₀ _ hD, mul_div_cancel_left₀ _ h1] + +/-- Before translation the constructed data agree with the original formal +fraction, even when arbitrary inactive numerators follow the first zero. -/ +theorem stieltjesTail_beforeShift_parameters {c : ℝ} (hc : 0 ≤ c) {a : ℕ → ℝ} + (ha : ∀ k, 0 ≤ a k) : + stieltjesTail a 0 = + stieltjesTail (stieltjesNumeratorsBeforeShift c (stieltjesShiftParameters c a) + (fun j => a (2 * j))) 0 := by + apply stieltjesTail_eq_of_active_prefix + intro n hn + obtain ⟨k, hk | hk⟩ := Nat.even_or_odd' n + · subst n + simp + · subst n + exact (stieltjesNumeratorsBeforeShift_parameters_odd hc ha k + (hn (2 * k) (by lia))).symm + +/-- Every nonnegative Stieltjes fraction acquires nonnegative lower-support +parameters under a nonnegative binomial translation. -/ +theorem exists_parameters_binomialTransform_stieltjesTail {c : ℝ} (hc : 0 ≤ c) + {a : ℕ → ℝ} (ha : ∀ k, 0 ≤ a k) : + ∃ u v : ℕ → ℝ, u 0 = 0 ∧ (∀ k, 0 ≤ u k) ∧ (∀ k, 0 ≤ v k) ∧ + binomialTransform c (stieltjesTail a 0) = + stieltjesTail (shiftedStieltjesNumerators c u v) 0 := by + refine ⟨stieltjesShiftParameters c a, fun k => a (2 * k), rfl, + stieltjesShiftParameters_nonneg hc ha, fun k => ha _, ?_⟩ + rw [stieltjesTail_beforeShift_parameters hc ha] + exact binomialTransform_beforeShift (stieltjesShiftParameters_nonneg hc ha) rfl + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportCriterion.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportCriterion.lean new file mode 100644 index 000000000..b6503b81d --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportCriterion.lean @@ -0,0 +1,90 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportConstruction +import RealRooted.Mathlib.MeasureTheory.Measure.MomentTranslation +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.MomentCriterion +import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform.Inverse + +/-! +# The Stieltjes fraction criterion for a prescribed lower support bound + +For `c ≥ 0`, a real moment sequence has a positive representing measure on +`[c, ∞)` exactly when its formal Stieltjes fraction has the lower-support +parameters of Sokal-Walrad, arXiv:2404.12131v1, Theorem 2(a)-(b). + +The two parameter sequences encode `u k = g_(2k)` and `v k = g_(2k+1)`. +Their initial condition is `u 0 = 0`. Zero mass, shift zero, and terminating +fractions are included. The numerator tail is existential and need not obey +the standard convention after its first zero. No numerical continued-fraction +convergence or determinacy assumption is imposed. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- The zeroth integrable moment already supplies finite mass. -/ +private theorem nonnegative_moments_iff (m : ℕ → ℝ) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, 0 ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n) ↔ + ∃ (a : ℝ) (b : ℕ → ℝ), 0 ≤ a ∧ (∀ k, 0 ≤ b k) ∧ + mk m = C a * stieltjesTail b 0 := by + rw [← exists_measure_moments_iff_stieltjesTail] + constructor + · rintro ⟨mu, hpos, hmom⟩ + have hfin : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using (hmom 0).1) + exact ⟨mu, hfin, hpos, hmom⟩ + · rintro ⟨mu, _, hpos, hmom⟩ + exact ⟨mu, hpos, hmom⟩ + +/-- A lower support bound is equivalent to a nonnegative Stieltjes fraction +after inverse binomial translation. -/ +theorem exists_measure_moments_Ici_iff_binomial (m : ℕ → ℝ) (c : ℝ) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n) ↔ + ∃ (a : ℝ) (b : ℕ → ℝ), 0 ≤ a ∧ (∀ k, 0 ≤ b k) ∧ + binomialTransform (-c) (mk m) = C a * stieltjesTail b 0 := by + rw [MeasureTheory.exists_measure_moments_Ici_iff, nonnegative_moments_iff, + binomialTransform_mk] + +/-- A positive measure with prescribed lower support exists exactly when the +formal fraction admits nonnegative lower-support parameters. -/ +theorem exists_measure_moments_Ici_iff_parameters (m : ℕ → ℝ) {c : ℝ} (hc : 0 ≤ c) : + (∃ mu : Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = m n) ↔ + ∃ (a : ℝ) (u v : ℕ → ℝ), 0 ≤ a ∧ u 0 = 0 ∧ + (∀ k, 0 ≤ u k) ∧ (∀ k, 0 ≤ v k) ∧ + mk m = C a * stieltjesTail (shiftedStieltjesNumerators c u v) 0 := by + rw [exists_measure_moments_Ici_iff_binomial] + constructor + · rintro ⟨a, b, ha, hb, hf⟩ + obtain ⟨u, v, hu0, hu, hv, htail⟩ := + exists_parameters_binomialTransform_stieltjesTail hc hb + refine ⟨a, u, v, ha, hu0, hu, hv, ?_⟩ + have h := congrArg (binomialTransform c) hf + rw [binomialTransform_binomialTransform, add_neg_cancel, binomialTransform_zero, + binomialTransform_C_mul, htail] at h + exact h + · rintro ⟨a, u, v, ha, hu0, hu, hv, hf⟩ + refine ⟨a, stieltjesNumeratorsBeforeShift c u v, ha, + stieltjesNumeratorsBeforeShift_nonneg hc hu hv, ?_⟩ + have h := congrArg (binomialTransform (-c)) hf + rw [← binomialTransform_beforeShift hu hu0, ← binomialTransform_C_mul, + binomialTransform_neg_cancel] at h + exact h + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportParameters.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportParameters.lean new file mode 100644 index 000000000..c880ddbe8 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportParameters.lean @@ -0,0 +1,125 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Contraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform +import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Translation +public import Mathlib.Basic.Real.Basic + +/-! +# Stieltjes parameters for a lower support bound + +The sequences `u k` and `v k` are the even and odd parameters `g_(2k)` and +`g_(2k+1)` in Sokal-Walrad, arXiv:2404.12131v1, Theorem 2. Pairing their +numerators contracts to a translated Jacobi fraction. The numerator sequence +is existential; its inactive tail is not required to be standardized. +-/ + +public section + +namespace PowerSeries + +/-- Numerators parametrizing a Stieltjes moment measure with lower support bound `c`. -/ +@[expose] noncomputable def shiftedStieltjesNumerators + (c : ℝ) (u v : ℕ → ℝ) (n : ℕ) : ℝ := + if n % 2 = 0 then c * (1 + u (n / 2)) + v (n / 2) + else v (n / 2) * u (n / 2 + 1) / (1 + u (n / 2)) + +/-- The nonnegative numerator data before translating the support by `c`. -/ +@[expose] noncomputable def stieltjesNumeratorsBeforeShift + (c : ℝ) (u v : ℕ → ℝ) (n : ℕ) : ℝ := + if n % 2 = 0 then v (n / 2) + else u (n / 2 + 1) * (c * (1 + u (n / 2)) + v (n / 2)) / (1 + u (n / 2)) + +/-- The even-indexed numerator is the odd-indexed numerator in classical indexing. -/ +@[simp] theorem shiftedStieltjesNumerators_even (c : ℝ) (u v : ℕ → ℝ) (k : ℕ) : + shiftedStieltjesNumerators c u v (2 * k) = c * (1 + u k) + v k := by + simp [shiftedStieltjesNumerators, Nat.mul_comm] + +/-- The odd-indexed numerator joins two successive even parameters. -/ +@[simp] theorem shiftedStieltjesNumerators_odd (c : ℝ) (u v : ℕ → ℝ) (k : ℕ) : + shiftedStieltjesNumerators c u v (2 * k + 1) = v k * u (k + 1) / (1 + u k) := by + simp [shiftedStieltjesNumerators, Nat.add_div, Nat.mul_comm] + +/-- The even-indexed numerator before translation is `v k`. -/ +@[simp] theorem stieltjesNumeratorsBeforeShift_even (c : ℝ) (u v : ℕ → ℝ) (k : ℕ) : + stieltjesNumeratorsBeforeShift c u v (2 * k) = v k := by + simp [stieltjesNumeratorsBeforeShift, Nat.mul_comm] + +/-- The odd-indexed numerator before translation. -/ +@[simp] theorem stieltjesNumeratorsBeforeShift_odd (c : ℝ) (u v : ℕ → ℝ) (k : ℕ) : + stieltjesNumeratorsBeforeShift c u v (2 * k + 1) = + u (k + 1) * (c * (1 + u k) + v k) / (1 + u k) := by + simp [stieltjesNumeratorsBeforeShift, Nat.add_div, Nat.mul_comm] + +/-- Nonnegative parameters give nonnegative numerator data before translation. -/ +theorem stieltjesNumeratorsBeforeShift_nonneg {c : ℝ} (hc : 0 ≤ c) + {u v : ℕ → ℝ} (hu : ∀ k, 0 ≤ u k) (hv : ∀ k, 0 ≤ v k) (n : ℕ) : + 0 ≤ stieltjesNumeratorsBeforeShift c u v n := by + unfold stieltjesNumeratorsBeforeShift + split_ifs + · exact hv _ + · exact div_nonneg (mul_nonneg (hu _) + (add_nonneg (mul_nonneg hc (add_nonneg zero_le_one (hu _))) (hv _))) + (add_nonneg zero_le_one (hu _)) + +/-- The displayed lower-support parameters give nonnegative Stieltjes numerators. -/ +theorem shiftedStieltjesNumerators_nonneg {c : ℝ} (hc : 0 ≤ c) + {u v : ℕ → ℝ} (hu : ∀ k, 0 ≤ u k) (hv : ∀ k, 0 ≤ v k) (n : ℕ) : + 0 ≤ shiftedStieltjesNumerators c u v n := by + unfold shiftedStieltjesNumerators + split_ifs + · exact add_nonneg (mul_nonneg hc (add_nonneg zero_le_one (hu _))) (hv _) + · exact div_nonneg (mul_nonneg (hv _) (hu _)) (add_nonneg zero_le_one (hu _)) + +/-- Classical odd numerators of the existential parametrization are at least the shift. -/ +theorem le_shiftedStieltjesNumerators_even {c : ℝ} (hc : 0 ≤ c) + {u v : ℕ → ℝ} (hu : ∀ k, 0 ≤ u k) (hv : ∀ k, 0 ≤ v k) (k : ℕ) : + c ≤ shiftedStieltjesNumerators c u v (2 * k) := by + rw [shiftedStieltjesNumerators_even, mul_add, mul_one] + simpa only [add_assoc] using + (le_add_of_nonneg_right (add_nonneg (mul_nonneg hc (hu k)) (hv k)) : + c ≤ c + (c * u k + v k)) + +/-- Contraction shifts the Jacobi diagonal by `c` when the initial even parameter is zero. -/ +theorem stieltjesJacobiDiagonal_shifted {c : ℝ} {u v : ℕ → ℝ} + (hu : ∀ k, 0 ≤ u k) (hu0 : u 0 = 0) (n : ℕ) : + stieltjesJacobiDiagonal (shiftedStieltjesNumerators c u v) n = + stieltjesJacobiDiagonal (stieltjesNumeratorsBeforeShift c u v) n + c := by + cases n with + | zero => simp [stieltjesJacobiDiagonal, shiftedStieltjesNumerators, + stieltjesNumeratorsBeforeShift, hu0, add_comm] + | succ n => + change shiftedStieltjesNumerators c u v (2 * n + 1) + + shiftedStieltjesNumerators c u v (2 * n + 2) = + stieltjesNumeratorsBeforeShift c u v (2 * n + 1) + + stieltjesNumeratorsBeforeShift c u v (2 * n + 2) + c + rw [show 2 * n + 2 = 2 * (n + 1) by ring, + shiftedStieltjesNumerators_odd, shiftedStieltjesNumerators_even, + stieltjesNumeratorsBeforeShift_odd, stieltjesNumeratorsBeforeShift_even] + have hden : 1 + u n ≠ 0 := ne_of_gt (add_pos_of_pos_of_nonneg zero_lt_one (hu n)) + field_simp [hden] + ring + +/-- Contraction preserves the outgoing Jacobi numerator. -/ +theorem stieltjesJacobiNumerator_shifted (c : ℝ) (u v : ℕ → ℝ) (n : ℕ) : + stieltjesJacobiNumerator (shiftedStieltjesNumerators c u v) n = + stieltjesJacobiNumerator (stieltjesNumeratorsBeforeShift c u v) n := by + simp only [stieltjesJacobiNumerator, shiftedStieltjesNumerators_even, + shiftedStieltjesNumerators_odd, stieltjesNumeratorsBeforeShift_even, + stieltjesNumeratorsBeforeShift_odd, div_eq_mul_inv] + ring + +/-- The parametrized fraction is the binomial transform of its unshifted data. -/ +theorem binomialTransform_beforeShift {c : ℝ} {u v : ℕ → ℝ} + (hu : ∀ k, 0 ≤ u k) (hu0 : u 0 = 0) : + binomialTransform c (stieltjesTail (stieltjesNumeratorsBeforeShift c u v) 0) = + stieltjesTail (shiftedStieltjesNumerators c u v) 0 := + binomialTransform_stieltjesTail_eq c (stieltjesJacobiDiagonal_shifted hu hu0) + (stieltjesJacobiNumerator_shifted c u v) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/MeasureBound.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/MeasureBound.lean new file mode 100644 index 000000000..0cbccbdf7 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/MeasureBound.lean @@ -0,0 +1,57 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CatalanBound +import RealRooted.Mathlib.MeasureTheory.Measure.MomentDeterminacy + +/-! +# Bounded support from bounded Stieltjes data + +The Catalan coefficient estimate confines every genuine representing measure +to a bounded interval. Integrability of all natural powers is explicit; this +does not infer a measure from nonnegative coefficients alone. +-/ + +public section + +namespace MeasureTheory + +/-- Bounded nonnegative Stieltjes data exclude mass beyond every larger +absolute radius, for any genuine representing measure. -/ +theorem measure_abs_ge_eq_zero_of_stieltjes_bound {mu : Measure ℝ} + {a : ℕ → ℝ} {mass L T : ℝ} (hmass : 0 ≤ mass) (hL : 0 ≤ L) (hT : 4 * L < T) + (ha : ∀ k, 0 ≤ a k) (haL : ∀ k, a k ≤ L) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) + (hmom : ∀ n, (∫ x : ℝ, x ^ n ∂mu) = + mass * PowerSeries.coeff n (PowerSeries.stieltjesTail a 0)) : + mu {x : ℝ | T ≤ |x|} = 0 := by + apply measure_abs_ge_eq_zero_of_even_moment_bound (C := mass) + (mul_nonneg (Nat.cast_nonneg 4) hL) hT (fun n => hint (2 * n)) + intro n + rw [hmom] + exact mul_le_mul_of_nonneg_left + (PowerSeries.coeff_stieltjesTail_le_pow hL ha haL (2 * n) 0) hmass + +/-- Every genuine representing measure of bounded nonnegative Stieltjes data +has bounded support; the deliberately loose radius also covers `L=0`. -/ +theorem ae_abs_le_of_stieltjes_bound {mu : Measure ℝ} + {a : ℕ → ℝ} {mass L : ℝ} (hmass : 0 ≤ mass) (hL : 0 ≤ L) + (ha : ∀ k, 0 ≤ a k) (haL : ∀ k, a k ≤ L) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu) + (hmom : ∀ n, (∫ x : ℝ, x ^ n ∂mu) = + mass * PowerSeries.coeff n (PowerSeries.stieltjesTail a 0)) : + ∀ᵐ x ∂mu, |x| ≤ 4 * L + 1 := by + have ht := measure_abs_ge_eq_zero_of_stieltjes_bound hmass hL + (lt_add_one (4 * L)) ha haL hint hmom + apply ae_iff.mpr + apply measure_mono_null _ ht + intro x hx + exact (lt_of_not_ge hx).le + +end MeasureTheory diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Moment.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Moment.lean new file mode 100644 index 000000000..5d9362ede --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Moment.lean @@ -0,0 +1,67 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.StieltjesConvergence +import RealRooted.Mathlib.Analysis.Matrix.CoordinateSpectralMeasure +import RealRooted.Mathlib.MeasureTheory.Measure.MomentLimit + +/-! +# Stieltjes fractions have Stieltjes moment measures + +Nonnegative formal Stieltjes numerator data give positive semidefinite finite +Jacobi Gram matrices. Their coordinate spectral measures realize each fixed +formal coefficient eventually. Closure of moment sequences under pointwise +limits produces a finite nonnegative measure for the entire formal series. + +The outer mass may be zero, coefficients may vanish, and numerator data may +be unbounded. No numerical continued-fraction convergence is assumed. +This is the forward direction of the classical Stieltjes criterion, as +stated in Sokal, "When does a hypergeometric function pFq belong to the +Laguerre–Pólya class LP+?", Proposition 7. +-/ + +public section + +open Filter MeasureTheory Matrix +open scoped Topology + +namespace PowerSeries + +/-- A formal Stieltjes fraction with nonnegative data has a genuine finite +Stieltjes representing measure, including zero total mass and terminating fractions. -/ +theorem exists_measure_moments_stieltjesTail + (a : ℕ → ℝ) (ha : ∀ k, 0 ≤ a k) {c : ℝ} (hc : 0 ≤ c) : + ∃ μ : Measure ℝ, IsFiniteMeasure μ ∧ (∀ᵐ x ∂μ, 0 ≤ x) ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) μ ∧ + (∫ x : ℝ, x ^ k ∂μ) = c * coeff k (stieltjesTail a 0) := by + have hex (n : ℕ) := + (posSemidef_stieltjesJacobiMatrix a (le_refl 0) n).exists_measure_moments_pow_apply 0 hc + choose μ hfin hpos hmom using hex + let ν : ℕ → FiniteMeasure ℝ := fun n => ⟨μ n, hfin n⟩ + refine exists_nonnegative_measure_moments_of_tendsto ν + (fun k => c * coeff k (stieltjesTail a 0)) hpos + (fun n k => (hmom n k).1) ?_ + intro k + apply tendsto_const_nhds.congr' + filter_upwards [eventually_pow_stieltjesJacobiMatrix_eq_coeff a ha k] with n hn + change c * coeff k (stieltjesTail a 0) = ∫ x : ℝ, x ^ k ∂μ n + rw [(hmom n k).2, hn] + +/-- Any series represented by nonnegative formal Stieltjes data has a finite +positive measure with precisely its coefficients as natural moments. -/ +theorem exists_measure_moments_of_eq_stieltjesTail + {f : ℝ⟦X⟧} {a : ℕ → ℝ} {c : ℝ} (ha : ∀ k, 0 ≤ a k) (hc : 0 ≤ c) + (hf : f = C c * stieltjesTail a 0) : + ∃ μ : Measure ℝ, IsFiniteMeasure μ ∧ (∀ᵐ x ∂μ, 0 ≤ x) ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) μ ∧ + (∫ x : ℝ, x ^ k ∂μ) = coeff k f := by + subst f + simpa only [coeff_C_mul] using exists_measure_moments_stieltjesTail a ha hc + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/MomentCriterion.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/MomentCriterion.lean new file mode 100644 index 000000000..7dd616116 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/MomentCriterion.lean @@ -0,0 +1,71 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.InfiniteMoment +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteMeasureFraction + +/-! +# The formal Stieltjes moment criterion + +A real sequence is the sequence of natural moments of a positive measure +on the nonnegative half-line exactly when its ordinary formal generating +series has a Stieltjes continued fraction with nonnegative data. + +The reverse construction treats measures carried by finite sets and those +with no finite carrier separately. Zero measure, mass at the origin and +terminating fractions are included. No analytic growth or numerical +continued-fraction convergence assumption occurs. + +See Sokal, "When does a hypergeometric function pFq belong to the Laguerre–Pólya +class LP+?", Proposition 7, p. 5. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- Every genuine nonnegative all-moments measure has a nonnegative formal +Stieltjes fraction, with total mass as its outer scalar. -/ +theorem exists_stieltjesTail_of_nonnegative_moments {mu : Measure ℝ} + (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) : + ∃ a : ℕ → ℝ, (∀ k, 0 ≤ a k) ∧ + mk (fun k => ∫ x : ℝ, x ^ k ∂mu) = C (mu.real Set.univ) * stieltjesTail a 0 := by + let : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (by norm_num : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hmom 0) + by_cases hcarrier : ∃ S : Set ℝ, S.Finite ∧ mu Sᶜ = 0 + · obtain ⟨S, hS, hs⟩ := hcarrier + exact exists_stieltjesTail_of_finite_carrier hpos S hS hs + · have hfinite (S : Set ℝ) (hS : S.Finite) : mu Sᶜ ≠ 0 := by + intro hs + exact hcarrier ⟨S, hS, hs⟩ + obtain ⟨a, ha, hf⟩ := exists_pos_stieltjesTail_of_no_finite_carrier hmom hpos hfinite + exact ⟨a, fun k => (ha k).le, hf⟩ + +/-- A real sequence is a genuine Stieltjes moment sequence if and only if its +formal generating series has a nonnegative Stieltjes fraction. -/ +theorem exists_measure_moments_iff_stieltjesTail (m : ℕ → ℝ) : + (∃ mu : Measure ℝ, IsFiniteMeasure mu ∧ (∀ᵐ x ∂mu, 0 ≤ x) ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ (∫ x : ℝ, x ^ k ∂mu) = m k) ↔ + ∃ (c : ℝ) (a : ℕ → ℝ), 0 ≤ c ∧ (∀ k, 0 ≤ a k) ∧ + mk m = C c * stieltjesTail a 0 := by + constructor + · rintro ⟨mu, _, hpos, hmom⟩ + obtain ⟨a, ha, hf⟩ := + exists_stieltjesTail_of_nonnegative_moments (fun k => (hmom k).1) hpos + have hseq : (fun k => ∫ x : ℝ, x ^ k ∂mu) = m := funext fun k => (hmom k).2 + exact ⟨mu.real Set.univ, a, measureReal_nonneg, ha, by simpa only [hseq] using hf⟩ + · rintro ⟨c, a, hc, ha, hf⟩ + simpa only [coeff_mk] using exists_measure_moments_of_eq_stieltjesTail ha hc hf + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Step.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Step.lean new file mode 100644 index 000000000..e89bcee4b --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Step.lean @@ -0,0 +1,82 @@ +/- +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.RingTheory.PowerSeries.Inverse + +/-! +# A formal Stieltjes continued-fraction step + +The denominator `1 - a X f` has constant coefficient one over any commutative +ring. Its inverse therefore exists in formal power series, without a fraction +field or an analytic convergence hypothesis. Changing the tail by a multiple +of `X^n` changes the step by a multiple of `X^(n+1)`. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- One formal Stieltjes-fraction step, with a constant-term-one denominator. -/ +@[expose] noncomputable def stieltjesStep (a : R) (f : R⟦X⟧) : R⟦X⟧ := + invOfUnit (1 - C a * X * f) 1 + +/-- A Stieltjes-fraction step has constant coefficient one. -/ +@[simp] theorem constantCoeff_stieltjesStep (a : R) (f : R⟦X⟧) : + constantCoeff (stieltjesStep a f) = 1 := by + simp only [stieltjesStep, constantCoeff_invOfUnit, inv_one, Units.val_one] + +/-- The formal Stieltjes step inverts its stated denominator. -/ +theorem one_sub_mul_stieltjesStep (a : R) (f : R⟦X⟧) : + (1 - C a * X * f) * stieltjesStep a f = 1 := by + exact mul_invOfUnit _ 1 (by simp) + +/-- A zero numerator discards the entire remaining formal tail. -/ +@[simp] theorem stieltjesStep_zero (f : R⟦X⟧) : stieltjesStep (0 : R) f = 1 := by + simpa using one_sub_mul_stieltjesStep (0 : R) f + +/-- The additive recurrence underlying the Stieltjes--Rogers coefficients. -/ +theorem stieltjesStep_eq_one_add (a : R) (f : R⟦X⟧) : + stieltjesStep a f = 1 + C a * X * f * stieltjesStep a f := by + linear_combination one_sub_mul_stieltjesStep a f + +/-- Difference formula for two formal Stieltjes steps with the same numerator. -/ +theorem stieltjesStep_sub (a : R) (f g : R⟦X⟧) : + stieltjesStep a f - stieltjesStep a g = + C a * X * (f - g) * stieltjesStep a f * stieltjesStep a g := by + linear_combination + stieltjesStep a g * one_sub_mul_stieltjesStep a f - + stieltjesStep a f * one_sub_mul_stieltjesStep a g + +/-- A formal Stieltjes step increases the order of a tail error by at least one. -/ +theorem X_pow_dvd_stieltjesStep_sub {n : ℕ} (a : R) {f g : R⟦X⟧} + (h : X ^ n ∣ f - g) : X ^ (n + 1) ∣ stieltjesStep a f - stieltjesStep a g := by + obtain ⟨q, hq⟩ := h + rw [stieltjesStep_sub, hq] + refine ⟨C a * q * stieltjesStep a f * stieltjesStep a g, ?_⟩ + rw [pow_succ] + ring + +/-- A family satisfying the Stieltjes tail equations is unique. This is a +formal contraction argument, independent of signs, size bounds or convergence. -/ +theorem eq_of_stieltjesStep_eq {a : ℕ → R} {F G : ℕ → R⟦X⟧} + (hF : ∀ s, F s = stieltjesStep (a s) (F (s + 1))) + (hG : ∀ s, G s = stieltjesStep (a s) (G (s + 1))) : F = G := by + have hdiv (n : ℕ) : ∀ s, X ^ n ∣ F s - G s := by + induction n with + | zero => intro s; simp + | succ n ih => + intro s + rw [hF s, hG s] + exact X_pow_dvd_stieltjesStep_sub (a s) (ih (s + 1)) + funext s + ext k + have h := X_pow_dvd_iff.mp (hdiv (k + 1) s) k (Nat.lt_succ_self k) + exact sub_eq_zero.mp (by simpa only [map_sub] using h) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/StrictMoment.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/StrictMoment.lean new file mode 100644 index 000000000..dcf746b39 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/StrictMoment.lean @@ -0,0 +1,60 @@ +/- +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 RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffel +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesRecurrence +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerPaired + +/-! +# Strict Hankel positivity gives a positive Stieltjes fraction + +The monic orthogonal polynomials for the original and shifted moments give +paired Euler–Gauss series. Their positive norm ratios therefore produce the +actual formal continued-fraction expansion. Merely defining determinant +ratios or observing nonnegative coefficients would not give this identity. + +This is the strict case of the classical moment/S-fraction criterion in +Sokal, "When does a hypergeometric function pFq belong to the Laguerre–Pólya +class LP+?", Proposition 7. Finite-rank moment families require +a separate terminating case. +-/ + +public section + +namespace Polynomial + +/-- Positive definiteness of every unshifted and shifted Hankel matrix yields +a strictly positive formal S-fraction, with even and odd numerators given by +the corresponding orthogonal norm ratios. -/ +theorem exists_pos_stieltjesTail_of_hankel_posDef (μ : ℕ → ℝ) + (hpos : ∀ n, (momentHankelMatrix μ n).PosDef) + (hshift : ∀ n, (momentHankelMatrix (fun k => μ (k + 1)) n).PosDef) : + ∃ a : ℕ → ℝ, (∀ k, 0 < a k) ∧ + (∀ n, a (2 * n) = momentStieltjesEven μ n ∧ + a (2 * n + 1) = momentStieltjesOdd μ n) ∧ + PowerSeries.mk μ = PowerSeries.C (μ 0) * PowerSeries.stieltjesTail a 0 := by + obtain ⟨a, ha, hseries⟩ := PowerSeries.exists_stieltjesTail_of_paired + (momentOrthogonalSeries_zero_sub_one μ hpos hshift) + (momentOrthogonalSeries_shift_sub μ hpos hshift) + (momentOrthogonalSeries_succ_sub_shift μ hpos hshift) + refine ⟨a, ?_, ha, ?_⟩ + · intro k + obtain ⟨n, rfl | rfl⟩ := Nat.even_or_odd' k + · rw [(ha n).1] + exact momentStieltjesEven_pos μ hpos hshift n + · rw [(ha n).2] + exact momentStieltjesOdd_pos μ hpos hshift n + · have hm0 : μ 0 ≠ 0 := by + simpa only [momentNormSq_zero] using (momentNormSq_pos μ 0 (hpos 1)).ne' + rw [← hseries] + ext k + simp only [PowerSeries.coeff_mk, PowerSeries.coeff_C_mul, + coeff_momentOrthogonalSeries_zero] + field_simp [hm0] + +end Polynomial diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Tail.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Tail.lean new file mode 100644 index 000000000..5019a598a --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Tail.lean @@ -0,0 +1,98 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Convergents + +/-! +# Infinite formal Stieltjes fractions + +Each coefficient is defined by a sufficiently deep finite convergent. The +stabilization theorem proves that this is independent of every subsequent +coefficient and yields the infinite tail equation. Thus these objects denote +formal series, with no numerical convergence requirement. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- The formal Stieltjes fraction starting at numerator index `s`. Its constant +term is one; a separate outer scalar supplies the total mass. -/ +@[expose] noncomputable def stieltjesTail (a : ℕ → R) (s : ℕ) : R⟦X⟧ := + mk fun n ↦ coeff n (stieltjesConvergent a (n + 1) s) + +/-- Each coefficient is the coefficient of a finite convergent deep enough +to stabilize it. -/ +theorem coeff_stieltjesTail (a : ℕ → R) (s n : ℕ) : + coeff n (stieltjesTail a s) = coeff n (stieltjesConvergent a (n + 1) s) := by + simp only [stieltjesTail, coeff_mk] + +/-- The formal tail has constant coefficient one. -/ +@[simp] theorem constantCoeff_stieltjesTail (a : ℕ → R) (s : ℕ) : + constantCoeff (stieltjesTail a s) = 1 := by + rw [← coeff_zero_eq_constantCoeff_apply, coeff_stieltjesTail, + coeff_zero_eq_constantCoeff_apply, constantCoeff_stieltjesConvergent] + +/-- A depth-`n` convergent agrees with the full formal tail below degree `n`. -/ +theorem X_pow_dvd_stieltjesTail_sub_convergent (a : ℕ → R) (n s : ℕ) : + X ^ n ∣ stieltjesTail a s - stieltjesConvergent a n s := by + apply X_pow_dvd_iff.mpr + intro k hk + rw [map_sub, coeff_stieltjesTail] + apply sub_eq_zero.mpr + exact (coeff_stieltjesConvergent_eq a (by lia : k + 1 ≤ n) + (Nat.lt_succ_self k) s).symm + +/-- The infinite formal Stieltjes fraction satisfies its tail equation. -/ +theorem stieltjesTail_eq_step (a : ℕ → R) (s : ℕ) : + stieltjesTail a s = stieltjesStep (a s) (stieltjesTail a (s + 1)) := by + ext k + rw [coeff_stieltjesTail] + have h := X_pow_dvd_iff.mp (X_pow_dvd_stieltjesStep_sub (a s) + (X_pow_dvd_stieltjesTail_sub_convergent a k (s + 1))) k (Nat.lt_succ_self k) + exact (sub_eq_zero.mp (by simpa only [map_sub, stieltjesConvergent] using h)).symm + +/-- The constructed tails are the unique family satisfying the formal +Stieltjes equations. -/ +theorem eq_stieltjesTail_of_step_eq {a : ℕ → R} {F : ℕ → R⟦X⟧} + (hF : ∀ s, F s = stieltjesStep (a s) (F (s + 1))) : F = stieltjesTail a := + eq_of_stieltjesStep_eq hF (stieltjesTail_eq_step a) + +/-- A zero numerator terminates the entire formal fraction at that position. -/ +theorem stieltjesTail_eq_convergent_of_zero (a : ℕ → R) (n s : ℕ) + (h : a (s + n) = 0) : stieltjesTail a s = stieltjesConvergent a n s := by + ext k + rw [coeff_stieltjesTail] + calc + coeff k (stieltjesConvergent a (k + 1) s) = + coeff k (stieltjesConvergent a (n + (k + 1)) s) := + (coeff_stieltjesConvergent_eq a (by lia : k + 1 ≤ n + (k + 1)) + (Nat.lt_succ_self k) s).symm + _ = coeff k (stieltjesConvergent a n s) := + congrArg (coeff k) (stieltjesConvergent_eq_of_zero a n (k + 1) s h) + +/-- In particular, a zero first numerator gives the constant formal series one. -/ +theorem stieltjesTail_eq_one_of_zero {a : ℕ → R} {s : ℕ} (h : a s = 0) : + stieltjesTail a s = 1 := by + rw [stieltjesTail_eq_step, h, stieltjesStep_zero] + +/-- A formal coefficient depends only on a finite prefix of numerator data. -/ +theorem coeff_stieltjesTail_eq_of_prefix {a b : ℕ → R} (s t n : ℕ) + (h : ∀ i < n + 1, a (s + i) = b (t + i)) : + coeff n (stieltjesTail a s) = coeff n (stieltjesTail b t) := by + rw [coeff_stieltjesTail, coeff_stieltjesTail, + stieltjesConvergent_eq_of_prefix (n + 1) s t h] + +/-- The denominator identity for the actual formal Stieltjes tail. -/ +theorem one_sub_mul_stieltjesTail (a : ℕ → R) (s : ℕ) : + (1 - C (a s) * X * stieltjesTail a (s + 1)) * stieltjesTail a s = 1 := by + conv_lhs => rw [stieltjesTail_eq_step a s] + exact one_sub_mul_stieltjesStep _ _ + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TailOffset.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TailOffset.lean new file mode 100644 index 000000000..835106ffa --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TailOffset.lean @@ -0,0 +1,58 @@ +/- +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 RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients + +/-! +# Offset Stieltjes tails + +A first-diagonal correction of a finite Jacobi matrix corresponds to the +product of a new Stieltjes step and the original tail. Its Jacobi recursion +shifts the numerator data by two and changes the correction to the second +Stieltjes numerator. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- Shifting the numerator sequence shifts the starting index of its formal tail. -/ +theorem stieltjesTail_shift (a : ℕ → R) (t s : ℕ) : + stieltjesTail (fun k => a (k + t)) s = stieltjesTail a (s + t) := by + ext n + apply coeff_stieltjesTail_eq_of_prefix + intro i _ + congr 1 + lia + +/-- Adding a first Jacobi diagonal correction preserves the two-step recursion +of a contracted Stieltjes fraction. No sign or nonvanishing assumption is needed. -/ +theorem stieltjesStep_mul_tail_eq_jacobiStep (a : ℕ → R) (c : R) : + stieltjesStep c (stieltjesTail a 0) * stieltjesTail a 0 = + jacobiStep (c + a 0) (a 0 * a 1) + (stieltjesStep (a 1) (stieltjesTail (fun k => a (k + 2)) 0) * + stieltjesTail (fun k => a (k + 2)) 0) := by + rw [stieltjesTail_shift] + simp only [Nat.zero_add] + have ht : stieltjesStep (a 1) (stieltjesTail a 2) = stieltjesTail a 1 := + (stieltjesTail_eq_step a 1).symm + rw [ht] + apply eq_jacobiStep_of_mul_eq_one + have h0 := one_sub_mul_stieltjesStep c (stieltjesTail a 0) + have h1 := one_sub_mul_stieltjesTail a 0 + have h2 : stieltjesTail a 1 = + 1 + C (a 1) * X * stieltjesTail a 2 * stieltjesTail a 1 := by + simpa only [mul_assoc, mul_comm, mul_left_comm] using stieltjesTail_eq_one_add a 1 + simp only [map_add, map_mul] + linear_combination h0 + stieltjesStep c (stieltjesTail a 0) * h1 + + C (a 0) * X * stieltjesStep c (stieltjesTail a 0) * stieltjesTail a 0 * h2 + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TerminatingBoundary.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TerminatingBoundary.lean new file mode 100644 index 000000000..66f66522f --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TerminatingBoundary.lean @@ -0,0 +1,84 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActivePrefix + +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients + +/-! +# A terminating boundary for lower-support parameters + +The Dirac measure at a positive lower endpoint has the standard numerators +`(c,0,0,...)`. The existential parameter equations instead allow `(c,0,c,0,...)`. +These represent the same formal fraction. The standard all-zero tail cannot +satisfy the equations at every index. This distinguishes the main existential +support theorem from a literal all-index reading of arXiv:2404.12131v1, Remark 2. +-/ + +public section + +open MeasureTheory + +namespace PowerSeries + +/-- The standard numerator sequence for a single atom. -/ +@[expose] noncomputable def pointStieltjesNumerators (c : ℝ) (n : ℕ) : ℝ := + if n = 0 then c else 0 + +/-- The standard one-atom fraction is a single geometric-series step. -/ +theorem stieltjesTail_point_eq (c : ℝ) : + stieltjesTail (pointStieltjesNumerators c) 0 = stieltjesStep c 1 := by + rw [stieltjesTail_eq_step, stieltjesTail_eq_step] + simp [pointStieltjesNumerators] + +/-- Coefficients of a one-step geometric fraction are powers of its numerator. -/ +theorem coeff_stieltjesStep_one (c : ℝ) (n : ℕ) : + coeff n (stieltjesStep c 1) = c ^ n := + coeff_stieltjesStep_one_eq_pow c n + +/-- The standard one-atom fraction has the genuine moments of the Dirac measure at `c`. -/ +theorem integral_dirac_eq_coeff_pointStieltjes (c : ℝ) (n : ℕ) : + Integrable (fun x : ℝ => x ^ n) (Measure.dirac c) ∧ + (∫ x : ℝ, x ^ n ∂Measure.dirac c) = + coeff n (stieltjesTail (pointStieltjesNumerators c) 0) := by + refine ⟨integrable_dirac (by simp), ?_⟩ + rw [integral_dirac, stieltjesTail_point_eq, coeff_stieltjesStep_one] + +/-- The geometric moment sequence has a representing measure at its lower endpoint. -/ +theorem exists_moments_Ici_pointStieltjes (c : ℝ) : + ∃ mu : Measure ℝ, (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ => x ^ n) mu ∧ + (∫ x : ℝ, x ^ n ∂mu) = + coeff n (stieltjesTail (pointStieltjesNumerators c) 0) := by + exact ⟨Measure.dirac c, by simp [ae_dirac_eq], integral_dirac_eq_coeff_pointStieltjes c⟩ + +/-- The nonstandard inactive tail supplied by zero parameters represents the +same one-atom fraction as the standard all-zero tail. -/ +theorem stieltjesTail_point_eq_zero_parameters (c : ℝ) : + stieltjesTail (pointStieltjesNumerators c) 0 = + stieltjesTail (shiftedStieltjesNumerators c (fun _ => 0) (fun _ => 0)) 0 := by + apply stieltjesTail_eq_of_terminating_prefix (N := 1) (by simp [pointStieltjesNumerators]) + intro n hn + rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hn with rfl | rfl + · simp [pointStieltjesNumerators, shiftedStieltjesNumerators] + · simp [pointStieltjesNumerators, shiftedStieltjesNumerators] + +/-- For a positive endpoint, no nonnegative parameters reproduce the standard +one-atom numerator sequence at every index. This is an inactive-tail obstruction. -/ +theorem pointStieltjesNumerators_ne_parameters {c : ℝ} (hc : 0 < c) : + ¬ ∃ u v : ℕ → ℝ, (∀ k, 0 ≤ u k) ∧ (∀ k, 0 ≤ v k) ∧ + pointStieltjesNumerators c = shiftedStieltjesNumerators c u v := by + rintro ⟨u, v, hu, hv, heq⟩ + have h := le_shiftedStieltjesNumerators_even hc.le hu hv 1 + rw [← heq] at h + have hzero : c ≤ 0 := by simpa only [pointStieltjesNumerators, ite_false, + show (2 * 1 : ℕ) ≠ 0 by decide] using h + exact (not_le_of_gt hc) hzero + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TranslatedAeration.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TranslatedAeration.lean new file mode 100644 index 000000000..0668b9dbb --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TranslatedAeration.lean @@ -0,0 +1,41 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform +import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Aeration +import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.ActiveCoefficients + +/-! +# Chain extraction from a nonnegative translated aeration + +A positive Stieltjes representation of the translated square-variable series +produces the bounded chain parameters. The proof compares Jacobi coefficients +only on their active prefix, so terminating series are included. +-/ + +public section + +namespace PowerSeries + +/-- A nonnegative Stieltjes representation after positive translated aeration +gives a Wall chain representation of the original fraction. -/ +theorem exists_chainStieltjes_of_translated_aeration {kappa : ℝ} (hk : 0 < kappa) + {a b : ℕ → ℝ} (hb : ∀ n, 0 ≤ b n) + (heq : binomialTransform kappa ((stieltjesTail a 0).subst (X ^ 2 : ℝ⟦X⟧)) = + stieltjesTail b 0) : + ∃ g : ℕ → ℝ, g 0 = 0 ∧ (∀ n, g n ∈ Set.Icc 0 1) ∧ + stieltjesTail a 0 = stieltjesTail (chainStieltjesNumerators (kappa ^ 2) g) 0 := by + have hcoeff (n : ℕ) (hact : ∀ i < n, a i ≠ 0) : + kappa = stieltjesJacobiDiagonal b n ∧ a n = stieltjesJacobiNumerator b n := + jacobiCoefficients_eq_of_prefix_ne_zero + (binomialTransform_subst_X_sq_stieltjesTail_eq_step kappa a) + (stieltjesJacobiTail_eq_step b) heq n hact + exact exists_chainStieltjes_of_constant_diagonal hk hb + (fun n hn => (hcoeff n hn).1.symm) (fun n hn => (hcoeff n hn).2.symm) + +end PowerSeries diff --git a/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Uniqueness.lean b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Uniqueness.lean new file mode 100644 index 000000000..cf456c829 --- /dev/null +++ b/RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Uniqueness.lean @@ -0,0 +1,105 @@ +/- +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.Basic.Real.Basic +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients + +/-! +# Uniqueness and termination of formal Stieltjes fractions + +An active nonzero numerator can be recovered from the first coefficient and +cancelled to recover the next formal tail. Thus numerator coefficients are +unique until the first zero. Under the convention that every numerator after +the first zero also vanishes, the entire numerator sequence is unique. +-/ + +public section + +namespace PowerSeries + +variable {R : Type*} [CommRing R] + +/-- A formal Stieltjes step with nonzero numerator determines its tail. -/ +theorem stieltjesStep_injective [IsDomain R] {a : R} (ha : a ≠ 0) : + Function.Injective (stieltjesStep a) := by + intro f g h + have hs : stieltjesStep a f ≠ 0 := by + intro hz + have hc := congrArg constantCoeff hz + simp at hc + have hc : (C a : R⟦X⟧) ≠ 0 := by + intro hz + have hconst := congrArg constantCoeff hz + exact ha (by simpa using hconst) + have hmul : (1 - C a * X * f) * stieltjesStep a f = + (1 - C a * X * g) * stieltjesStep a f := by + rw [one_sub_mul_stieltjesStep, h, one_sub_mul_stieltjesStep] + have hd := mul_right_cancel₀ hs hmul + apply mul_left_cancel₀ (mul_ne_zero hc X_ne_zero) + linear_combination -hd + +/-- Equal formal tails have equal first numerator coefficients. -/ +theorem eq_of_stieltjesTail_eq {a b : ℕ → R} {s t : ℕ} + (h : stieltjesTail a s = stieltjesTail b t) : a s = b t := by + simpa only [coeff_one_stieltjesTail] using congrArg (coeff 1) h + +/-- If the first numerator is nonzero, equal formal tails have equal next tails. -/ +theorem stieltjesTail_succ_eq [IsDomain R] {a b : ℕ → R} {s t : ℕ} + (h : stieltjesTail a s = stieltjesTail b t) (ha : a s ≠ 0) : + stieltjesTail a (s + 1) = stieltjesTail b (t + 1) := by + apply stieltjesStep_injective ha + calc + stieltjesStep (a s) (stieltjesTail a (s + 1)) = stieltjesTail a s := + (stieltjesTail_eq_step a s).symm + _ = stieltjesTail b t := h + _ = stieltjesStep (a s) (stieltjesTail b (t + 1)) := by + rw [stieltjesTail_eq_step, eq_of_stieltjesTail_eq h] + +/-- Equal formal fractions have equal numerator data up to the first zero. +No condition is imposed on later inactive numerator coefficients. -/ +theorem eq_of_stieltjesTail_eq_of_prefix_ne_zero [IsDomain R] {a b : ℕ → R} + {s t : ℕ} (n : ℕ) (h : stieltjesTail a s = stieltjesTail b t) + (ha : ∀ i < n, a (s + i) ≠ 0) : a (s + n) = b (t + n) := by + induction n generalizing s t with + | zero => simpa only [Nat.add_zero] using eq_of_stieltjesTail_eq h + | succ n ih => + have ha0 : a s ≠ 0 := by simpa only [Nat.add_zero] using ha 0 (by lia) + have ht := stieltjesTail_succ_eq h ha0 + have hp : ∀ i < n, a (s + 1 + i) ≠ 0 := by + intro i hi + simpa only [Nat.add_assoc, Nat.add_comm 1 i] using ha (i + 1) (by lia) + simpa only [Nat.add_assoc, Nat.add_comm 1 n] using ih ht hp + +/-- With the usual zero-after-first-zero convention, all numerator coefficients +are uniquely determined by the normalized formal Stieltjes fraction. -/ +theorem stieltjesTail_injective_of_zero_persists [IsDomain R] {a b : ℕ → R} + (ha : ∀ i j, i ≤ j → a i = 0 → a j = 0) + (hb : ∀ i j, i ≤ j → b i = 0 → b j = 0) + (h : stieltjesTail a 0 = stieltjesTail b 0) : a = b := by + funext n + induction n using Nat.strong_induction_on with + | ind n ih => + by_cases hp : ∀ i < n, a i ≠ 0 + · simpa only [Nat.zero_add] using + eq_of_stieltjesTail_eq_of_prefix_ne_zero n h (by simpa using hp) + · push Not at hp + obtain ⟨i, hin, hi⟩ := hp + have hbi : b i = 0 := (ih i hin).symm.trans hi + rw [ha i n (Nat.le_of_lt hin) hi, hb i n (Nat.le_of_lt hin) hbi] + +/-- A negative active numerator cannot be represented by nonnegative numerator +data. Prior numerators must be nonzero, since a prior zero terminates the +fraction and makes the later negative value irrelevant. -/ +theorem stieltjesTail_ne_of_active_neg {a b : ℕ → ℝ} {s t n : ℕ} + (ha : ∀ i < n, a (s + i) ≠ 0) (hn : a (s + n) < 0) + (hb : ∀ i, 0 ≤ b i) : stieltjesTail a s ≠ stieltjesTail b t := by + intro h + have heq := eq_of_stieltjesTail_eq_of_prefix_ne_zero n h ha + exact (not_lt_of_ge (hb (t + n))) (heq ▸ hn) + +end PowerSeries diff --git a/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiberCardinality.lean b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiberCardinality.lean new file mode 100644 index 000000000..302ab67a0 --- /dev/null +++ b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiberCardinality.lean @@ -0,0 +1,63 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Topology.Algebra.InfiniteSum.Defs +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Topology.Algebra.InfiniteSum.Real +public import Mathlib.SetTheory.Cardinal.Finite +import Mathlib.Topology.Algebra.InfiniteSum.Constructions + +/-! +# Grouping real sums by fiber cardinalities + +Repeated values contribute their natural multiplicities. Conversely, +summability of a nonnegative weighted sum recovers the repeated sum when +all fibers are finite. This isolates the grouping argument also used in +the project's Edrei--Thoma uniqueness proof. +-/ + +public section + +/-- Grouping a summable real family that is constant on each fiber gives +the fiber cardinality times its common value. -/ +theorem Summable.hasSum_natCard_fiber_mul {ι κ : Type*} {u : ι → κ} {g : κ → ℝ} + (hs : Summable (fun i ↦ g (u i))) : + HasSum (fun t ↦ (Nat.card {i // u i = t} : ℝ) * g t) (∑' i, g (u i)) := by + let e := Equiv.sigmaFiberEquiv u + have hF : Summable (fun x : Σ t, {i // u i = t} ↦ g (u (e x))) := + (e.summable_iff (f := fun i ↦ g (u i))).mpr hs + have hsum : HasSum (fun x : Σ t, {i // u i = t} ↦ g (u (e x))) (∑' i, g (u i)) := by + rw [← e.tsum_eq (fun i ↦ g (u i))] + exact hF.hasSum + refine hsum.sigma fun t ↦ ?_ + have hterm (i : {i // u i = t}) : g (u (e ⟨t, i⟩)) = g t := by + change g (u i.val) = g t + exact congrArg g i.property + simpa only [hterm, tsum_const, nsmul_eq_mul] using (hF.sigma_factor t).hasSum + +/-- A nonnegative sum with finite multiplicity fibers is summable if its +fiber-cardinality weighted sum is summable. The finite-fiber condition is +essential because `Nat.card` of an infinite fiber is zero. -/ +theorem summable_of_natCard_fiber_mul {ι κ : Type*} {u : ι → κ} {g : κ → ℝ} + (hg : ∀ t, 0 ≤ g t) (hfin : ∀ t, Set.Finite {i | u i = t}) + (hs : Summable (fun t ↦ (Nat.card {i // u i = t} : ℝ) * g t)) : + Summable (fun i ↦ g (u i)) := by + let e := Equiv.sigmaFiberEquiv u + apply (e.summable_iff (f := fun i ↦ g (u i))).mp + apply (summable_sigma_of_nonneg (fun i ↦ hg (u (e i)))).mpr + constructor + · intro t + have := (hfin t).to_subtype + exact Summable.of_finite + · convert hs using 1 + funext t + let : Fintype {i // u i = t} := (hfin t).fintype + have hterm (i : {i // u i = t}) : g (u (e ⟨t, i⟩)) = g t := by + change g (u i.val) = g t + exact congrArg g i.property + simp only [hterm, tsum_fintype, + Finset.sum_const, Finset.card_univ, nsmul_eq_mul, Nat.card_eq_fintype_card] diff --git a/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiberMajorant.lean b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiberMajorant.lean new file mode 100644 index 000000000..8ca85269b --- /dev/null +++ b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiberMajorant.lean @@ -0,0 +1,87 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Topology.Algebra.InfiniteSum.Real +import Mathlib.Analysis.Normed.Group.InfiniteSum + +/-! +# Summability from weighted finite-fiber bounds + +The hypotheses bound every finite part of each fiber. Thus neither an enumeration +of the index type nor separately supplied finiteness of the fibers is needed. +The finite comparison applies equally to a head or a tail of the family. +-/ + +public section + +namespace Finset + +/-- A weighted finite family is bounded by the corresponding bounds for its fibers. -/ +theorem sum_le_sum_mul_of_fiber_le {ι κ : Type*} [DecidableEq κ] + (s : Finset ι) (t : Finset κ) (bin : ι → κ) (w v : ι → ℝ) (B W : κ → ℝ) + (hmap : ∀ i ∈ s, bin i ∈ t) + (hW : ∀ n ∈ t, 0 ≤ W n) + (hv : ∀ i ∈ s, v i ≤ w i * W (bin i)) + (hB : ∀ n ∈ t, ∑ i ∈ s with bin i = n, w i ≤ B n) : + ∑ i ∈ s, v i ≤ ∑ n ∈ t, B n * W n := by + classical + rw [← sum_fiberwise_of_maps_to hmap] + apply sum_le_sum + intro n hn + calc + ∑ i ∈ s with bin i = n, v i ≤ ∑ i ∈ s with bin i = n, w i * W n := by + apply sum_le_sum + intro i hi + have hi' := mem_filter.mp hi + simpa only [hi'.2] using hv i hi'.1 + _ = (∑ i ∈ s with bin i = n, w i) * W n := by rw [sum_mul] + _ ≤ B n * W n := mul_le_mul_of_nonneg_right (hB n hn) (hW n hn) + +end Finset + +/-- Finite-fiber bounds with a summable majorant imply summability of a nonnegative family. -/ +theorem summable_of_finite_fiber_majorant {ι κ : Type*} + (bin : ι → κ) (w v : ι → ℝ) (B W : κ → ℝ) + (hv0 : ∀ i, 0 ≤ v i) (hB0 : ∀ n, 0 ≤ B n) (hW0 : ∀ n, 0 ≤ W n) + (hv : ∀ i, v i ≤ w i * W (bin i)) + (hB : ∀ n (s : Finset ι), (∀ i ∈ s, bin i = n) → ∑ i ∈ s, w i ≤ B n) + (hsum : Summable (fun n ↦ B n * W n)) : Summable v := by + classical + apply summable_of_sum_le hv0 (c := ∑' n, B n * W n) + intro s + calc + ∑ i ∈ s, v i ≤ ∑ n ∈ s.image bin, B n * W n := by + apply Finset.sum_le_sum_mul_of_fiber_le s (s.image bin) bin w v B W + · exact fun i hi ↦ Finset.mem_image_of_mem bin hi + · exact fun n _ ↦ hW0 n + · exact fun i _ ↦ hv i + · intro n _ + exact hB n _ (fun i hi ↦ (Finset.mem_filter.mp hi).2) + _ ≤ ∑' n, B n * W n := + hsum.sum_le_tsum _ (fun n _ ↦ mul_nonneg (hB0 n) (hW0 n)) + +/-- The total mass satisfies the same finite-fiber majorant. -/ +theorem tsum_le_tsum_of_finite_fiber_majorant {ι κ : Type*} + (bin : ι → κ) (w v : ι → ℝ) (B W : κ → ℝ) + (hv0 : ∀ i, 0 ≤ v i) (hB0 : ∀ n, 0 ≤ B n) (hW0 : ∀ n, 0 ≤ W n) + (hv : ∀ i, v i ≤ w i * W (bin i)) + (hB : ∀ n (s : Finset ι), (∀ i ∈ s, bin i = n) → ∑ i ∈ s, w i ≤ B n) + (hsum : Summable (fun n ↦ B n * W n)) : + ∑' i, v i ≤ ∑' n, B n * W n := by + classical + apply Real.tsum_le_of_sum_le hv0 + intro s + calc + ∑ i ∈ s, v i ≤ ∑ n ∈ s.image bin, B n * W n := by + apply Finset.sum_le_sum_mul_of_fiber_le s (s.image bin) bin w v B W + · exact fun i hi ↦ Finset.mem_image_of_mem bin hi + · exact fun n _ ↦ hW0 n + · exact fun i _ ↦ hv i + · intro n _ + exact hB n _ (fun i hi ↦ (Finset.mem_filter.mp hi).2) + _ ≤ ∑' n, B n * W n := + hsum.sum_le_tsum _ (fun n _ ↦ mul_nonneg (hB0 n) (hW0 n)) diff --git a/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiniteMultiplicity.lean b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiniteMultiplicity.lean new file mode 100644 index 000000000..f71655874 --- /dev/null +++ b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiniteMultiplicity.lean @@ -0,0 +1,42 @@ +/- +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.Topology.Algebra.InfiniteSum.Real +public import Mathlib.Analysis.Complex.Basic + +/-! +# Repeating summable nonnegative terms with finite multiplicities + +A nonnegative weighted sum is summable exactly when the family obtained by +repeating every term its natural multiplicity is summable. Grouping convergent +complex resolvent sums over these finite fibers is equally explicit. +-/ + +public section + +/-- Summability with natural multiplicities gives summability of the repeated +nonnegative family, without choosing an enumeration. -/ +theorem summable_sigma_fin_of_nonneg {ι : Type*} {a : ι → ℝ} (m : ι → ℕ) + (ha : ∀ i, 0 ≤ a i) (hs : Summable (fun i ↦ (m i : ℝ) * a i)) : + Summable (fun j : Σ i, Fin (m i) ↦ a j.1) := by + apply (summable_sigma_of_nonneg (fun j ↦ ha j.1)).mpr + refine ⟨fun _ ↦ Summable.of_finite, ?_⟩ + simpa only [tsum_fintype, Finset.sum_const, Finset.card_univ, Fintype.card_fin, + nsmul_eq_mul] using hs + +/-- Grouping a convergent resolvent sum over its finite multiplicity fibers. -/ +theorem HasSum.sigma_fin_const_div {ι : Type*} {a : ι → ℝ} {m : ι → ℕ} + {z s : ℂ} + (h : HasSum (fun j : Σ i, Fin (m i) ↦ (a j.1 : ℂ) / (1 + (a j.1 : ℂ) * z)) s) : + HasSum (fun i ↦ (m i : ℂ) * (a i : ℂ) / (1 + (a i : ℂ) * z)) s := by + apply h.sigma + intro i + simpa only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, + mul_div_assoc] using + hasSum_fintype (fun _ : Fin (m i) ↦ (a i : ℂ) / (1 + (a i : ℂ) * z)) + +end diff --git a/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiniteMultiplicityProduct.lean b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiniteMultiplicityProduct.lean new file mode 100644 index 000000000..2a7e32a84 --- /dev/null +++ b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiniteMultiplicityProduct.lean @@ -0,0 +1,30 @@ +/- +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.Topology.Algebra.Monoid.Defs +public import Mathlib.Topology.Separation.Regular +public import Mathlib.Topology.Algebra.InfiniteSum.Defs +import Mathlib.Topology.Algebra.InfiniteSum.Constructions + +/-! +# Grouping products with finite multiplicities + +A convergent product over finite multiplicity fibers is the convergent product +of the corresponding natural powers. The ambient monoid may contain zero. +-/ + +public section + +/-- Grouping identical factors in each finite multiplicity fiber. -/ +theorem HasProd.sigma_fin_const {ι M : Type*} [CommMonoid M] [TopologicalSpace M] + [ContinuousMul M] [RegularSpace M] {a : ι → M} {m : ι → ℕ} {p : M} + (h : HasProd (fun j : Σ i, Fin (m i) ↦ a j.1) p) : + HasProd (fun i ↦ a i ^ m i) p := by + apply h.sigma + intro i + simpa only [Finset.prod_const, Finset.card_univ, Fintype.card_fin] using + hasProd_fintype (fun _ : Fin (m i) ↦ a i) diff --git a/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/SortedEnumeration.lean b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/SortedEnumeration.lean new file mode 100644 index 000000000..bec665624 --- /dev/null +++ b/RealRooted/Mathlib/Topology/Algebra/InfiniteSum/SortedEnumeration.lean @@ -0,0 +1,70 @@ +/- +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.Algebra.Group.End +public import Mathlib.Topology.Algebra.InfiniteSum.Defs +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Topology.Algebra.InfiniteSum.Real +import Mathlib.Data.Finset.Sort +import TauCeti.Order.Northcott.Enumeration + +/-! +# Decreasing enumerations of summable positive families + +Injective positive summable families have decreasing enumerations. Infinite +families are indexed by the natural numbers; finite families retain a finite +index, including the empty case. The infinite enumeration uses Tau Ceti's +finite-sublevel enumeration in the dual order on the positive reals. +-/ + +public section + +open Filter Set Topology + +namespace Summable + +/-- An infinite injective positive summable family can be enumerated in strictly +decreasing order, without assuming a countability instance on its index type. -/ +theorem exists_equiv_strictAnti_comp {ι : Type*} [Infinite ι] {a : ι → ℝ} + (hs : Summable a) (ha : ∀ i, 0 < a i) (hi : Function.Injective a) : + ∃ e : ℕ ≃ ι, StrictAnti (a ∘ e) := by + let b : ι → (Ioi (0 : ℝ))ᵒᵈ := fun i ↦ ⟨a i, ha i⟩ + have hfin : ∀ c : (Ioi (0 : ℝ))ᵒᵈ, {i | b i ≤ c}.Finite := by + intro c + have hev : ∀ᶠ i in cofinite, a i < ((OrderDual.ofDual c : Ioi (0 : ℝ)) : ℝ) := + hs.tendsto_cofinite_zero.eventually (gt_mem_nhds (OrderDual.ofDual c).property) + change {i | ((OrderDual.ofDual c : Ioi (0 : ℝ)) : ℝ) ≤ a i}.Finite + simpa only [not_lt] using eventually_cofinite.mp hev + obtain ⟨e, he⟩ := TauCeti.exists_equiv_monotone_comp_of_finite_setOf_le b hfin + refine ⟨e, ?_⟩ + have hanti : Antitone (a ∘ e) := fun i j hij ↦ he hij + exact hanti.strictAnti_of_injective (hi.comp e.injective) + +end Summable + +namespace Function.Injective + +/-- Every finite injective real family has a strictly decreasing enumeration. +The result includes the empty family, represented by `Fin 0`. -/ +theorem exists_fin_equiv_strictAnti_comp {ι : Type*} [Finite ι] {a : ι → ℝ} + (hi : Function.Injective a) : + ∃ n : ℕ, ∃ e : Fin n ≃ ι, StrictAnti (a ∘ e) := by + classical + let b : ι → ℝᵒᵈ := a + have hb : Function.Injective b := hi + let : Fintype (range b) := Fintype.ofFinite _ + let o : Fin (Fintype.card (range b)) ≃o range b := + Fintype.orderIsoFinOfCardEq (range b) rfl + let e := o.toEquiv.trans (Equiv.ofInjective b hb).symm + have he (i) : b (e i) = (o i : ℝᵒᵈ) := Equiv.apply_ofInjective_symm hb _ + refine ⟨_, e, ?_⟩ + intro i j hij + change b (e i) < b (e j) + rw [he, he] + exact o.strictMono hij + +end Function.Injective diff --git a/RealRooted/Mathlib/Topology/Algebra/IsUniformGroup/FiniteSum.lean b/RealRooted/Mathlib/Topology/Algebra/IsUniformGroup/FiniteSum.lean new file mode 100644 index 000000000..6f537bdf3 --- /dev/null +++ b/RealRooted/Mathlib/Topology/Algebra/IsUniformGroup/FiniteSum.lean @@ -0,0 +1,39 @@ +/- +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.Topology.UniformSpace.LocallyUniformConvergence +public import Mathlib.Topology.Algebra.IsUniformGroup.Defs +import Mathlib.Topology.Algebra.IsUniformGroup.Basic + +/-! +# Finite sums of locally uniformly convergent families +-/ + +public section + +open Filter + +/-- A constant family converges locally uniformly to that same function. -/ +theorem tendstoLocallyUniformly_const_family {ι X E : Type*} [TopologicalSpace X] + [UniformSpace E] (f : X → E) (l : Filter ι) : + TendstoLocallyUniformly (fun _ : ι => f) f l := by + intro u hu x + exact ⟨Set.univ, univ_mem, Eventually.of_forall fun _ _ _ => refl_mem_uniformity hu⟩ + +/-- Finite sums preserve locally uniform convergence. -/ +theorem TendstoLocallyUniformly.finset_sum {ι X E A : Type*} [TopologicalSpace X] + [AddCommGroup E] [UniformSpace E] [IsUniformAddGroup E] (s : Finset A) + {F : A → ι → X → E} {f : A → X → E} {l : Filter ι} + (h : ∀ a ∈ s, TendstoLocallyUniformly (F a) (f a) l) : + TendstoLocallyUniformly (fun n x => ∑ a ∈ s, F a n x) (fun x => ∑ a ∈ s, f a x) l := by + classical + induction s using Finset.induction_on with + | empty => simpa using tendstoLocallyUniformly_const_family (fun _ : X => (0 : E)) l + | @insert a s ha ih => + simpa only [Finset.sum_insert ha, Pi.add_def] using + (h a (Finset.mem_insert_self a s)).add + (ih fun b hb => h b (Finset.mem_insert_of_mem hb)) diff --git a/RealRooted/Mathlib/Topology/Instances/Real/FiniteSeparation.lean b/RealRooted/Mathlib/Topology/Instances/Real/FiniteSeparation.lean new file mode 100644 index 000000000..4d383fa0a --- /dev/null +++ b/RealRooted/Mathlib/Topology/Instances/Real/FiniteSeparation.lean @@ -0,0 +1,128 @@ +/- +Copyright (c) 2026 Steve Hubbard, RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Steve Hubbard, RealRooted contributors +-/ +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.Data.Finset.Card +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Push +import Mathlib.Tactic.Ring + +/-! +# A point separated from a finite set + +A uniform grid in a unit interval contains a point at distance at least +`1 / (2 * (s.card + 1))` from every member of a given finite set `s`. +This pigeonhole estimate supplies contour heights separated from finitely many zero ordinates. + +The grid proof is adapted from Steve Hubbard's `goldbach-lean`, revision +`da5cf9edad7896290771dfcab8feee2906399e3d`, +`entries/dudek2014/LeanLab/PNTPort/ZetaZeros/GoodHeight.lean` (Apache-2.0). +-/ + +public section + +open Set + +namespace Finset + +/-- Pigeonhole: some point of `[T, T + 1]` is at least `1 / (2 (#G + 1))` from all of `G`. -/ +private theorem exists_mem_unitInterval_forall_le_abs_sub (G : Finset ℝ) (T : ℝ) : + ∃ T' ∈ Set.Icc T (T + 1), ∀ γ ∈ G, 1 / (2 * ((G.card : ℝ) + 1)) ≤ |T' - γ| := by + classical + set n := G.card + have hn1 : (0 : ℝ) < n + 1 := by positivity + set δ : ℝ := 1 / (2 * ((n : ℝ) + 1)) with hδ + let p : ℕ → ℝ := fun k ↦ T + k / ((n : ℝ) + 1) + -- the bad set of indices + set Bad := (Finset.range (n + 1)).filter (fun k ↦ ∃ γ ∈ G, |p k - γ| < δ) with hBad + have hone : ∀ γ ∈ G, ((Finset.range (n + 1)).filter (fun k ↦ |p k - γ| < δ)).card ≤ 1 := by + intro γ _ + rw [Finset.card_le_one] + intro a ha b hb + rw [Finset.mem_filter] at ha hb + by_contra hab + have hd : 1 / ((n : ℝ) + 1) ≤ |p a - p b| := by + have e : p a - p b = ((a : ℝ) - b) / ((n : ℝ) + 1) := by + simp only [p]; field_simp; ring + rw [e, abs_div, abs_of_pos hn1] + apply div_le_div_of_nonneg_right _ hn1.le + have : (a : ℤ) ≠ b := by exact_mod_cast hab + have h1 : (1 : ℤ) ≤ |(a : ℤ) - b| := Int.one_le_abs (sub_ne_zero.mpr this) + have : ((1 : ℤ) : ℝ) ≤ ((|(a : ℤ) - b| : ℤ) : ℝ) := by exact_mod_cast h1 + push_cast at this; exact this + have htri : |p a - p b| ≤ |p a - γ| + |p b - γ| := by + calc |p a - p b| = |(p a - γ) - (p b - γ)| := by ring_nf + _ ≤ |p a - γ| + |p b - γ| := abs_sub _ _ + have h2δ : 2 * δ = 1 / ((n : ℝ) + 1) := by rw [hδ]; field_simp + linarith [ha.2, hb.2] + have hsub : Bad ⊆ G.biUnion (fun γ ↦ (Finset.range (n + 1)).filter (fun k ↦ |p k - γ| < δ)) := by + intro k hk + rw [hBad, Finset.mem_filter] at hk + obtain ⟨γ, hγ, hk2⟩ := hk.2 + rw [Finset.mem_biUnion] + exact ⟨γ, hγ, Finset.mem_filter.mpr ⟨hk.1, hk2⟩⟩ + have hcard : Bad.card ≤ n := by + calc Bad.card ≤ (G.biUnion fun γ ↦ (Finset.range (n + 1)).filter + (fun k ↦ |p k - γ| < δ)).card := Finset.card_le_card hsub + _ ≤ ∑ γ ∈ G, ((Finset.range (n + 1)).filter (fun k ↦ |p k - γ| < δ)).card := + Finset.card_biUnion_le + _ ≤ ∑ _γ ∈ G, 1 := Finset.sum_le_sum hone + _ = n := by simp [n] + have hex : ∃ k ∈ Finset.range (n + 1), k ∉ Bad := by + by_contra h + push Not at h + have : Finset.range (n + 1) ⊆ Bad := h + have := Finset.card_le_card this + simp at this; lia + obtain ⟨k, hk, hkB⟩ := hex + rw [Finset.mem_range] at hk + refine ⟨p k, ⟨?_, ?_⟩, ?_⟩ + · simp only [p]; have : (0 : ℝ) ≤ k / ((n : ℝ) + 1) := by positivity + linarith + · simp only [p] + have : (k : ℝ) / ((n : ℝ) + 1) ≤ 1 := by + rw [div_le_one hn1]; exact_mod_cast hk.le + linarith + · intro γ hγ + by_contra hlt + push Not at hlt + exact hkB (by rw [hBad, Finset.mem_filter]; exact ⟨Finset.mem_range.mpr hk, γ, hγ, hlt⟩) + +/-- Every real interval contains a point separated from a given finite set by at least +its length divided by twice one more than the cardinality of the set. -/ +theorem exists_mem_Icc_forall_le_abs_sub (G : Finset ℝ) {a b : ℝ} (hab : a ≤ b) : + ∃ x ∈ Set.Icc a b, ∀ y ∈ G, (b - a) / (2 * ((G.card : ℝ) + 1)) ≤ |x - y| := by + classical + rcases hab.eq_or_lt with rfl | hab + · exact ⟨a, ⟨le_rfl, le_rfl⟩, fun y _ ↦ by simp⟩ + have hL : 0 < b - a := sub_pos.mpr hab + let g : ℝ → ℝ := fun y ↦ (y - a) / (b - a) + have hg : Function.Injective g := by + intro y z h + exact sub_left_injective ((div_left_inj₀ hL.ne').mp h) + let S := G.image g + have hcard : S.card = G.card := card_image_of_injective _ hg + obtain ⟨u, hu, hsep⟩ := exists_mem_unitInterval_forall_le_abs_sub S 0 + have hu' : 0 ≤ u ∧ u ≤ 1 := by simpa using hu + refine ⟨a + (b - a) * u, ⟨by nlinarith [mul_nonneg hL.le hu'.1], by nlinarith⟩, + fun y hy ↦ ?_⟩ + have hy' := hsep (g y) (mem_image_of_mem g hy) + rw [hcard] at hy' + have heq : a + (b - a) * u - y = (b - a) * (u - g y) := by + dsimp only [g] + field_simp + ring + rw [heq, abs_mul, abs_of_pos hL] + calc + (b - a) / (2 * ((G.card : ℝ) + 1)) = + (b - a) * (1 / (2 * ((G.card : ℝ) + 1))) := by ring + _ ≤ (b - a) * |u - g y| := mul_le_mul_of_nonneg_left hy' hL.le + +end Finset diff --git a/RealRooted/Mathlib/Topology/MetricSpace/Algebra/FiniteProduct.lean b/RealRooted/Mathlib/Topology/MetricSpace/Algebra/FiniteProduct.lean new file mode 100644 index 000000000..9e7319b7c --- /dev/null +++ b/RealRooted/Mathlib/Topology/MetricSpace/Algebra/FiniteProduct.lean @@ -0,0 +1,45 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import Mathlib.Topology.MetricSpace.Algebra +public import Mathlib.Analysis.Normed.Ring.Basic +import RealRooted.Mathlib.Topology.Algebra.IsUniformGroup.FiniteSum +import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.MulAction +import Mathlib.Topology.Algebra.Monoid + +/-! +# Finite products of locally uniformly convergent families +-/ + +public section + +open Filter + +/-- Finite multiset products preserve locally uniform convergence when the +limit factors are continuous. Repeated factors are retained. -/ +theorem TendstoLocallyUniformly.multiset_prod {ι X M A : Type*} [TopologicalSpace X] + [NormedCommRing M] (s : Multiset A) {F : A → ι → X → M} {f : A → X → M} + {l : Filter ι} (hF : ∀ a ∈ s, TendstoLocallyUniformly (F a) (f a) l) + (hf : ∀ a ∈ s, Continuous (f a)) : + TendstoLocallyUniformly (fun n x ↦ (s.map fun a ↦ F a n x).prod) + (fun x ↦ (s.map fun a ↦ f a x).prod) l := by + revert hF hf + induction s using Multiset.induction_on with + | empty => + intro _ _ + simpa only [Multiset.map_zero, Multiset.prod_zero] using + tendstoLocallyUniformly_const_family (fun _ : X ↦ (1 : M)) l + | cons a s ih => + intro hF hf + have hFs := ih (fun b hb ↦ hF b (Multiset.mem_cons_of_mem hb)) + (fun b hb ↦ hf b (Multiset.mem_cons_of_mem hb)) + have hcs : Continuous (fun x ↦ (s.map fun b ↦ f b x).prod) := + continuous_multiset_prod s (fun b hb ↦ hf b (Multiset.mem_cons_of_mem hb)) + simpa only [Multiset.map_cons, Multiset.prod_cons, Pi.mul_def] using + (hF a (Multiset.mem_cons_self a s)).mul₀ hFs + (hf a (Multiset.mem_cons_self a s)) hcs diff --git a/RealRooted/Mathlib/Topology/UniformSpace/LocallyUniformAvoidance.lean b/RealRooted/Mathlib/Topology/UniformSpace/LocallyUniformAvoidance.lean new file mode 100644 index 000000000..63218b408 --- /dev/null +++ b/RealRooted/Mathlib/Topology/UniformSpace/LocallyUniformAvoidance.lean @@ -0,0 +1,44 @@ +/- +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.Topology.UniformSpace.LocallyUniformConvergence +public import Mathlib.Topology.MetricSpace.Defs + +/-! +# Local avoidance under locally uniform convergence + +A value avoided by the continuous limit at one point is eventually avoided +by the approximating functions on a common neighborhood of that point. +-/ + +public section + +open Filter Topology + +/-- A locally uniform limit continuous at `x` and different from `b` there +gives a common neighborhood on which the approximants eventually avoid `b`. -/ +theorem TendstoLocallyUniformlyOn.exists_eventually_ne + {α β ι : Type*} [TopologicalSpace α] [MetricSpace β] + {F : ι → α → β} {f : α → β} {l : Filter ι} {U : Set α} {x : α} {b : β} + (h : TendstoLocallyUniformlyOn F f l U) (hU : U ∈ 𝓝 x) + (hf : ContinuousAt f x) (hb : f x ≠ b) : + ∃ V ∈ 𝓝 x, ∀ᶠ n in l, ∀ y ∈ V, F n y ≠ b := by + have hd : 0 < dist (f x) b := dist_pos.mpr hb + obtain ⟨V, hV, hconv⟩ := h _ (Metric.dist_mem_uniformity (half_pos hd)) x + (mem_of_mem_nhds hU) + rw [nhdsWithin_eq_nhds.mpr hU] at hV + have hclose : {y | dist (f y) (f x) < dist (f x) b / 2} ∈ 𝓝 x := + hf.eventually (Metric.ball_mem_nhds _ (half_pos hd)) + refine ⟨V ∩ {y | dist (f y) (f x) < dist (f x) b / 2}, inter_mem hV hclose, ?_⟩ + filter_upwards [hconv] with n hn y hy hny + have h₁ := hn y hy.1 + change dist (f y) (F n y) < dist (f x) b / 2 at h₁ + rw [hny] at h₁ + have h₂ := dist_triangle (f x) (f y) b + rw [dist_comm (f x) (f y)] at h₂ + have h₃ : dist (f y) (f x) < dist (f x) b / 2 := hy.2 + linarith diff --git a/RealRooted/MittagLeffler/Basic.lean b/RealRooted/MittagLeffler/Basic.lean new file mode 100644 index 000000000..840e0516f --- /dev/null +++ b/RealRooted/MittagLeffler/Basic.lean @@ -0,0 +1,81 @@ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.MultiplierSequence.Veronese +import RealRooted.MultiplierSequence.PolyaSchur.Growth +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIReverse +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Mittag--Leffler functions with natural stride and residue + +`mittagLefflerNat r s` is the classical `E_{r,s+1}`. Positive stride is +needed for entire convergence. The positive Type-I results use `s < r`; +no such assertion is made at stride zero or at arbitrary later residues. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- The integer-parameter Mittag--Leffler series `sum z^k / (s+r*k)!`, +expressed in exponential Taylor normalization. At stride zero its series +need not converge globally; the following entire statements require `s < r`. -/ +@[expose] noncomputable def mittagLefflerNat (r s : ℕ) : ℂ → ℂ := + complexExpGeneratingFunction (fun k ↦ (k.factorial : ℝ) / (s + r * k).factorial) + +/-- The defining exponential normalization cancels to the ordinary series. -/ +theorem mittagLefflerNat_eq_tsum (r s : ℕ) (z : ℂ) : + mittagLefflerNat r s z = ∑' k : ℕ, z ^ k / ((s + r * k).factorial : ℂ) := by + rw [mittagLefflerNat, complexExpGeneratingFunction_eq_tsum] + apply tsum_congr + intro k + push_cast + have hk : (k.factorial : ℂ) ≠ 0 := by exact_mod_cast k.factorial_ne_zero + have hd : ((s + r * k).factorial : ℂ) ≠ 0 := by + exact_mod_cast (s + r * k).factorial_ne_zero + field_simp [hk, hd] + +/-- Every residue below a positive integer stride gives a positive Type-I +Mittag--Leffler entire function. -/ +theorem isLaguerrePolyaTypeI_mittagLefflerNat {r s : ℕ} (hs : s < r) : + IsLaguerrePolyaTypeI (mittagLefflerNat r s) := + isLaguerrePolyaTypeI_factorial_veronese hs + +/-- Exact Taylor derivatives at the origin, with no Gamma values at poles. -/ +theorem iteratedDeriv_mittagLefflerNat_zero {r s : ℕ} (hs : s < r) (k : ℕ) : + iteratedDeriv k (mittagLefflerNat r s) 0 = + (((k.factorial : ℝ) / (s + r * k).factorial : ℝ) : ℂ) := by + have hsum := IsPFMultiplierSequence.summable_expGenerating_majorant + (isPFMultiplierSequence_factorial_veronese hs) 1 (zero_le_one : (0 : ℝ) ≤ 1) + simpa only [mittagLefflerNat, iteratedDeriv_eq_iterate] using + iteratedDeriv_complexExpGeneratingFunction_zero + (fun j ↦ (j.factorial : ℝ) / (s + r * j).factorial) + (R := 1) (by norm_num) (by simpa using hsum) k + +/-- These Mittag--Leffler functions do not vanish at the origin. -/ +theorem mittagLefflerNat_zero_ne_zero {r s : ℕ} (hs : s < r) : + mittagLefflerNat r s 0 ≠ 0 := by + have h := iteratedDeriv_mittagLefflerNat_zero hs 0 + simp only [iteratedDeriv_zero, Nat.factorial_zero, Nat.cast_one, + Nat.mul_zero, Nat.add_zero] at h + rw [h] + exact ofReal_ne_zero.mpr (by positivity) + +/-- Every admissible residue function is nonpolynomial. -/ +theorem mittagLefflerNat_ne_polynomial {r s : ℕ} (hs : s < r) (P : ℂ[X]) : + mittagLefflerNat r s ≠ fun z ↦ P.eval z := by + intro heq + have h := iteratedDeriv_mittagLefflerNat_zero hs (P.natDegree + 1) + rw [heq, iteratedDeriv_fun_eval, + iterate_derivative_eq_zero (Nat.lt_succ_self P.natDegree)] at h + simp only [Polynomial.eval_zero] at h + have hn : (((P.natDegree + 1).factorial : ℝ) / + (s + r * (P.natDegree + 1)).factorial : ℝ) ≠ 0 := by positivity + exact ofReal_ne_zero.mpr hn h.symm + +end RealRooted diff --git a/RealRooted/MittagLeffler/Growth.lean b/RealRooted/MittagLeffler/Growth.lean new file mode 100644 index 000000000..f5a988381 --- /dev/null +++ b/RealRooted/MittagLeffler/Growth.lean @@ -0,0 +1,65 @@ +module + +public import RealRooted.MittagLeffler.Basic +public import TauCeti.Analysis.Complex.GrowthOrder + +/-! +# Growth of integer-parameter Mittag--Leffler functions + +At radius at least one, the defining series is bounded by a subsequence of +the exponential series at the `r`-th root of that radius. Consequently its +order is at most `1/r`. This argument allows every natural residue, even +where positive Type-I membership is not asserted. +-/ + +public section + +open Complex Filter Asymptotics Bornology + +namespace RealRooted + +/-- Outside the unit disk an integer-stride Mittag--Leffler series is bounded +by the exponential at the corresponding root of the radius. -/ +theorem norm_mittagLefflerNat_le_exp {r s : ℕ} (hr : 0 < r) + {z : ℂ} (hz : 1 ≤ ‖z‖) : + ‖mittagLefflerNat r s z‖ ≤ Real.exp (‖z‖ ^ (r : ℝ)⁻¹) := by + let t : ℝ := ‖z‖ ^ (r : ℝ)⁻¹ + have ht : 1 ≤ t := Real.one_le_rpow hz (by positivity) + have htpow : t ^ r = ‖z‖ := Real.rpow_inv_natCast_pow (norm_nonneg z) hr.ne' + have hS : HasSum (fun k : ℕ ↦ t ^ k / (k.factorial : ℝ)) (Real.exp t) := by + simpa only [Real.exp_eq_exp_ℝ] using NormedSpace.expSeries_div_hasSum_exp t + have hinj : Function.Injective (fun k : ℕ ↦ s + r * k) := by + intro j k hjk + exact mul_right_injective₀ hr.ne' (Nat.add_left_cancel hjk) + have hsub := hS.summable.comp_injective hinj + have hbound (k : ℕ) : ‖z ^ k / ((s + r * k).factorial : ℂ)‖ ≤ + t ^ (s + r * k) / ((s + r * k).factorial : ℝ) := by + rw [norm_div, norm_pow, norm_natCast] + apply div_le_div_of_nonneg_right _ (by positivity) + rw [pow_add, pow_mul, htpow] + exact le_mul_of_one_le_left (pow_nonneg (norm_nonneg z) k) (one_le_pow₀ ht) + have hnorm : Summable (fun k : ℕ ↦ ‖z ^ k / ((s + r * k).factorial : ℂ)‖) := + Summable.of_nonneg_of_le (fun _ ↦ norm_nonneg _) hbound hsub + rw [mittagLefflerNat_eq_tsum] + calc + _ ≤ ∑' k : ℕ, ‖z ^ k / ((s + r * k).factorial : ℂ)‖ := + norm_tsum_le_tsum_norm hnorm + _ ≤ ∑' k : ℕ, t ^ (s + r * k) / ((s + r * k).factorial : ℝ) := + hnorm.tsum_le_tsum hbound hsub + _ ≤ ∑' k : ℕ, t ^ k / (k.factorial : ℝ) := by + simpa only [Function.comp_def] using + tsum_comp_le_tsum_of_inj hS.summable (fun k ↦ by positivity) hinj + _ = _ := hS.tsum_eq + +/-- Integer stride `r > 0` gives a Mittag--Leffler growth order at most `1/r`. -/ +theorem orderLE_mittagLefflerNat {r s : ℕ} (hr : 0 < r) : + TauCeti.OrderLE (mittagLefflerNat r s) (r : ℝ)⁻¹ := by + rw [TauCeti.orderLE_def] + intro A hA + apply IsBigO.of_bound 1 + filter_upwards [eventually_cobounded_le_norm (1 : ℝ)] with z hz + simp only [Real.norm_eq_abs, Real.abs_exp, one_mul] + exact (norm_mittagLefflerNat_le_exp hr hz).trans + (Real.exp_le_exp.mpr (Real.rpow_le_rpow_of_exponent_le hz hA.le)) + +end RealRooted diff --git a/RealRooted/MittagLeffler/Jensen.lean b/RealRooted/MittagLeffler/Jensen.lean new file mode 100644 index 000000000..280a17faf --- /dev/null +++ b/RealRooted/MittagLeffler/Jensen.lean @@ -0,0 +1,65 @@ +module + +public import RealRooted.MultiplierSequence +public import RealRooted.SimpleRoots +import RealRooted.MittagLeffler.Growth +import RealRooted.MultiplierSequence.Veronese +import RealRooted.MultiplierSequence.JensenDerivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenSimple + +/-! +# Simple negative Jensen roots for Mittag--Leffler sections + +For every stride at least two and every residue below the stride, the +Mittag--Leffler Jensen polynomials have their full degree and only simple +negative zeros. Residue zero gives Kim--Kim (2015), Proposition 2.4; +the residue extension is a derived consequence of the same argument. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Integer-stride factorial Jensen polynomials have only simple real roots +when the stride is at least two. The degree-zero boundary is included. -/ +theorem isSimpleRealRooted_jensenPolynomial_factorial_veronese + {r s : ℕ} (hr : 2 ≤ r) (hs : s < r) (d : ℕ) : + IsSimpleRealRooted (jensenPolynomial d + (fun k ↦ (k.factorial : ℝ) / (s + r * k).factorial)) := by + have hr0 : 0 < r := lt_of_lt_of_le (by decide) hr + have hrR : 1 < (r : ℝ) := by exact_mod_cast (show 1 < r by lia) + have horder : (r : ℝ)⁻¹ < 1 := by + rw [inv_eq_one_div] + exact (div_lt_one (by positivity)).mpr hrR + have h := IsLaguerrePolya.simple_jensenPolynomial + (isLaguerrePolyaTypeI_mittagLefflerNat hs).toLaguerrePolya + (orderLE_mittagLefflerNat hr0) horder + (mittagLefflerNat_zero_ne_zero hs) (mittagLefflerNat_ne_polynomial hs) d + simpa only [iteratedDeriv_mittagLefflerNat_zero hs, ofReal_re] using h + +/-- The factorial Jensen polynomial has exact degree and strictly negative +roots for every valid residue, including the exponential stride-one boundary. -/ +theorem jensenPolynomial_factorial_veronese_degree_roots + {r s : ℕ} (hs : s < r) (d : ℕ) : + (jensenPolynomial d (fun k ↦ + (k.factorial : ℝ) / (s + r * k).factorial)).natDegree = d ∧ + ∀ x ∈ (jensenPolynomial d (fun k ↦ + (k.factorial : ℝ) / (s + r * k).factorial)).roots, x < 0 := by + let gamma : ℕ → ℝ := fun k ↦ (k.factorial : ℝ) / (s + r * k).factorial + have hpos (k : ℕ) : 0 < gamma k := by dsimp only [gamma]; positivity + have hpf := isPFPolynomial_jensenPolynomial_of_PFMultiplierSequence + (isPFMultiplierSequence_factorial_veronese hs) d + refine ⟨natDegree_jensenPolynomial (hpos d).ne', fun x hx ↦ ?_⟩ + apply lt_of_le_of_ne (hpf.roots_nonpos x hx) + intro hx0 + subst x + have heval := (mem_roots (ne_zero_of_mem_roots hx)).mp hx + have h0 : (jensenPolynomial d gamma).eval 0 ≠ 0 := by + simpa only [← Polynomial.coeff_zero_eq_eval_zero, coeff_jensenPolynomial, + Nat.zero_le, ite_true, Nat.choose_zero_right, Nat.cast_one, one_mul] using + (hpos 0).ne' + exact h0 heval + +end RealRooted diff --git a/RealRooted/MultiplierSequence/Arithmetic.lean b/RealRooted/MultiplierSequence/Arithmetic.lean new file mode 100644 index 000000000..1185eba8e --- /dev/null +++ b/RealRooted/MultiplierSequence/Arithmetic.lean @@ -0,0 +1,75 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.MultiplierSequence.ArithmeticSection +import RealRooted.MultiplierSequence.PolyaSchur.Factorial +import RealRooted.MultiplierSequence.PolyaSchur.Limit +import RealRooted.MultiplierSequence.PolyaSchur +import RealRooted.PFPolynomial.Closure + +/-! +# Arithmetic subsequences of positive multiplier sequences + +Pólya's arithmetic-section theorem preserves the Type-I Laguerre--Pólya +class. Equivalently, every arithmetic subsequence of a PF multiplier +sequence is again a PF multiplier sequence. Arbitrary starting indices are +allowed. A zero stride gives a constant sequence, hence an exponential. + +Reference: G. Pólya, *Über einen Satz von Laguerre*, JDMV 38 (1929), +161--168, §4(b). +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted + +/-- The zero-start arithmetic subsequence of a PF multiplier sequence remains PF. -/ +private theorem isPFMultiplierSequence_mul {gamma : ℕ → ℝ} + (hgamma : IsPFMultiplierSequence gamma) (r : ℕ) : + IsPFMultiplierSequence (fun k => gamma (r * k)) := by + by_cases hr : r = 0 + · simpa [hr] using isPFMultiplierSequence_const_sequence (hgamma.nonneg 0) + let p : ℕ → ℝ[X] := fun n => exponentialSection r (rescaledJensenPolynomial (n + 1) gamma) + have hp (n : ℕ) : IsPFPolynomial (p n) := + (hgamma.isPFPolynomial_rescaledJensenPolynomial (n + 1)).exponentialSection r + apply isPFMultiplierSequence_of_tendsto + (gamma := fun n k => (k.factorial : ℝ) * (p n).coeff k) + (fun n => (hp n).isPFMultiplierSequence_factorial_mul_coeff) + intro k + have he (n : ℕ) : (k.factorial : ℝ) * (p n).coeff k = + ((r * k).factorial : ℝ) * (rescaledJensenPolynomial (n + 1) gamma).coeff (r * k) := by + dsimp only [p] + rw [coeff_exponentialSection hr] + field_simp + simp_rw [he] + have hl := ((tendsto_coeff_rescaledJensenPolynomial gamma (r * k)).comp + (tendsto_add_atTop_nat 1)).const_mul ((r * k).factorial : ℝ) + simpa only [Function.comp_def, + mul_div_cancel₀ _ (by positivity : ((r * k).factorial : ℝ) ≠ 0)] using hl + +/-- Every arithmetic subsequence of a PF multiplier sequence is again a PF +multiplier sequence. The zero stride gives the constant sequence at the start index. -/ +theorem IsPFMultiplierSequence.arithmetic {gamma : ℕ → ℝ} + (hgamma : IsPFMultiplierSequence gamma) (r s : ℕ) : + IsPFMultiplierSequence (fun k => gamma (s + r * k)) := by + simpa only [Nat.add_comm] using isPFMultiplierSequence_mul (hgamma.shift s) r + +/-- The exponential generating function of every arithmetic subsequence +belongs to the positive Type-I Laguerre--Pólya class. -/ +theorem IsPFMultiplierSequence.isLaguerrePolyaTypeI_arithmetic {gamma : ℕ → ℝ} + (hgamma : IsPFMultiplierSequence gamma) (r s : ℕ) : + IsLaguerrePolyaTypeI (complexExpGeneratingFunction (fun k => gamma (s + r * k))) := + (hgamma.arithmetic r s).isLaguerrePolyaTypeI_complexExpGeneratingFunction + +/-- The factorial-normalized coefficients of a PF multiplier sequence form +a Pólya-frequency sequence. -/ +theorem IsPFMultiplierSequence.isPolyaFreqSeq_div_factorial {gamma : ℕ → ℝ} + (hgamma : IsPFMultiplierSequence gamma) : + IsPolyaFreqSeq (fun k => gamma k / k.factorial) := + IsPolyaFreqSeq.of_tendsto + (fun n => (hgamma.isPFPolynomial_rescaledJensenPolynomial (n + 1)).to_sequence) + (fun k => (tendsto_coeff_rescaledJensenPolynomial gamma k).comp (tendsto_add_atTop_nat 1)) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/ArithmeticSection.lean b/RealRooted/MultiplierSequence/ArithmeticSection.lean new file mode 100644 index 000000000..ac615df99 --- /dev/null +++ b/RealRooted/MultiplierSequence/ArithmeticSection.lean @@ -0,0 +1,130 @@ +module + +public import RealRooted.EulerOperator.ArithmeticProduct +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import RealRooted.EulerOperator.ArithmeticNormalization +import RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas +import RealRooted.PFPolynomial.Closure +import RealRooted.Mathlib.Topology.Algebra.Polynomial + +/-! +# Exponential generating sections of PF polynomials + +For a nonzero stride `r`, the exponential section takes the raw exponential +coefficients `b_n` to `b_(r*k)`. Finite polar Euler approximants converge +coefficientwise to this section and preserve its real nonpositive roots. +The zero-stride value of the polynomial operator is defined to be zero. +-/ + +@[expose] public section + +open Polynomial Filter Topology + +namespace RealRooted + +/-- The arithmetic section of exponential generating coefficients, with the +zero polynomial as the zero-stride convention. -/ +noncomputable def exponentialSection (r : ℕ) (p : ℝ[X]) : ℝ[X] := + if r = 0 then 0 else + diagonalOperator (fun k => ((r * k).factorial : ℝ) / k.factorial) (contract r p) + +/-- The normalized finite polar approximation to an exponential section. -/ +noncomputable def arithmeticSectionApprox (r M : ℕ) (p : ℝ[X]) : ℝ[X] := + C ((arithmeticPolarMultiplier r (r * M) 0)⁻¹) * + (contract r (polarThetaProduct (arithmeticPolarParameters r (r * M)) + (p.comp (-X)))).comp (C (-((r : ℝ) ^ r * (M : ℝ) ^ (r - 1))) * X) + +theorem coeff_exponentialSection {r : ℕ} (hr : r ≠ 0) (p : ℝ[X]) (k : ℕ) : + (exponentialSection r p).coeff k = + ((r * k).factorial : ℝ) / k.factorial * p.coeff (r * k) := by + simp [exponentialSection, hr, coeff_contract, Nat.mul_comm k r] + +theorem coeff_arithmeticSectionApprox {r : ℕ} (hr : r ≠ 0) (M : ℕ) (p : ℝ[X]) (k : ℕ) : + (arithmeticSectionApprox r M p).coeff k = p.coeff (r * k) * + ((-1 : ℝ) ^ (r * k + k) * + (arithmeticPolarMultiplier r (r * M) (r * k) / + arithmeticPolarMultiplier r (r * M) 0) * + ((r : ℝ) ^ r * (M : ℝ) ^ (r - 1)) ^ k) := by + simp only [arithmeticSectionApprox, coeff_C_mul, comp_C_mul_X_coeff, + coeff_contract hr, coeff_arithmetic_polarThetaProduct, coeff_comp_neg_X, + Nat.mul_comm k r] + rw [show (-((r : ℝ) ^ r * (M : ℝ) ^ (r - 1))) ^ k = + (-1 : ℝ) ^ k * ((r : ℝ) ^ r * (M : ℝ) ^ (r - 1)) ^ k from neg_pow _ _, pow_add] + ring + +/-- The finite approximants converge coefficientwise to the exponential section. -/ +theorem tendsto_coeff_arithmeticSectionApprox {r : ℕ} (hr : r ≠ 0) + (p : ℝ[X]) (k : ℕ) : + Tendsto (fun M => (arithmeticSectionApprox r M p).coeff k) atTop + (𝓝 ((exponentialSection r p).coeff k)) := by + simpa only [coeff_arithmeticSectionApprox hr, coeff_exponentialSection hr, mul_comm] + using (tendsto_arithmeticPolarMultiplier_normalized hr k).const_mul (p.coeff (r * k)) + +/-- Once the cutoff exceeds the input degree, the approximants have nonnegative coefficients. -/ +theorem HasNonnegCoeffs.arithmeticSectionApprox {p : ℝ[X]} (hp : HasNonnegCoeffs p) + {r M : ℕ} (hr : r ≠ 0) (hM : M ≠ 0) (hdeg : p.natDegree ≤ M) : + HasNonnegCoeffs (RealRooted.arithmeticSectionApprox r M p) := by + intro k + rw [coeff_arithmeticSectionApprox hr] + by_cases hk : k ≤ M + · rw [arithmeticPolarMultiplier_normalized hr hM hk] + exact mul_nonneg (hp _) (by positivity) + · have hpzero : p.coeff (r * k) = 0 := coeff_eq_zero_of_natDegree_lt + ((hdeg.trans_lt (Nat.lt_of_not_ge hk)).trans_le + (Nat.le_mul_of_pos_left k (Nat.pos_of_ne_zero hr))) + rw [hpzero, zero_mul] + +/-- Every sufficiently large finite arithmetic approximant of a PF polynomial +nonzero at zero is PF. -/ +theorem IsPFPolynomial.arithmeticSectionApprox {p : ℝ[X]} (hp : IsPFPolynomial p) + (h0 : p.coeff 0 ≠ 0) {r M : ℕ} (hr : r ≠ 0) (hM : M ≠ 0) + (hdeg : p.natDegree ≤ M) : + IsPFPolynomial (RealRooted.arithmeticSectionApprox r M p) := by + apply IsPFPolynomial.of_realRooted_nonneg + (hp.hasNonnegCoeffs.arithmeticSectionApprox hr hM hdeg) + exact ((hp.contract_arithmetic_polarThetaProduct_splits h0 hr + (hdeg.trans (Nat.le_mul_of_pos_left M (Nat.pos_of_ne_zero hr)))).comp_of_degree_le_one + (degree_C_mul_X_le _)).C_mul _ + +/-- Arithmetic sections of raw exponential coefficients preserve PF +polynomials with nonzero constant coefficient (Pólya, 1929, §4(b)). -/ +private theorem IsPFPolynomial.exponentialSection_of_coeff_zero_ne_zero {p : ℝ[X]} + (hp : IsPFPolynomial p) (h0 : p.coeff 0 ≠ 0) {r : ℕ} (hr : r ≠ 0) : + IsPFPolynomial (exponentialSection r p) := by + let M : ℕ → ℕ := fun n => n + p.natDegree + 1 + have hM : Tendsto M atTop atTop := tendsto_atTop.mpr fun k => + (eventually_ge_atTop k).mono fun n hn => by dsimp [M]; lia + apply IsPFPolynomial.of_coeff_tendsto + (p := fun n => RealRooted.arithmeticSectionApprox r (M n) p) + (fun n => hp.arithmeticSectionApprox h0 hr (by dsimp [M]; lia) (by dsimp [M]; lia)) + intro k + exact (tendsto_coeff_arithmeticSectionApprox hr p k).comp hM + +/-- Arithmetic subsequences of exponential generating coefficients preserve +PF polynomials (Pólya, 1929, §4(b)). Zero polynomials and roots at zero are +included; the zero-stride value uses the stated zero-polynomial convention. -/ +theorem IsPFPolynomial.exponentialSection {p : ℝ[X]} (hp : IsPFPolynomial p) (r : ℕ) : + IsPFPolynomial (RealRooted.exponentialSection r p) := by + by_cases hr : r = 0 + · simpa [RealRooted.exponentialSection, hr] using IsPFPolynomial.zero + by_cases hp0 : p = 0 + · simpa [RealRooted.exponentialSection, hr, hp0, contract] using IsPFPolynomial.zero + have hc : IsClosed {t : ℝ | IsPFPolynomial + (RealRooted.exponentialSection r (p.comp (X + C t)))} := + isClosed_isPFPolynomial _ fun k => by + simpa only [coeff_exponentialSection hr] using + (p.continuous_coeff_comp_X_add_C (r * k)).const_mul + (((r * k).factorial : ℝ) / k.factorial) + have hmem : Set.Ioi (0 : ℝ) ⊆ {t : ℝ | IsPFPolynomial + (RealRooted.exponentialSection r (p.comp (X + C t)))} := by + intro t ht + have hp' : IsPFPolynomial (p.comp (X + C t)) := by + simpa using hp.comp_C_mul_X_add_C (a := 1) (by norm_num) (le_of_lt ht) + apply hp'.exponentialSection_of_coeff_zero_ne_zero _ hr + rw [coeff_zero_eq_eval_zero, eval_comp] + simpa only [eval_add, eval_X, eval_C, zero_add] using + (eval_pos_of_hasNonnegCoeffs hp.hasNonnegCoeffs hp0 ht).ne' + have hlimit := closure_minimal hmem hc (show (0 : ℝ) ∈ closure (Set.Ioi 0) by simp) + simpa only [Set.mem_ofPred_eq, map_zero, add_zero, comp_X] using hlimit + +end RealRooted diff --git a/RealRooted/MultiplierSequence/BinomialConvolution.lean b/RealRooted/MultiplierSequence/BinomialConvolution.lean new file mode 100644 index 000000000..3a8e1b466 --- /dev/null +++ b/RealRooted/MultiplierSequence/BinomialConvolution.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.MultiplierSequence.JensenProduct +public import RealRooted.MultiplierSequence.Infinite +import RealRooted.MultiplierSequence.JensenConvolution +import RealRooted.MultiplierSequence.PolyaSchur + +/-! +# Binomial convolution of positive multiplier sequences + +The product rule for exponential generating functions preserves the positive +multiplier-sequence cone. The finite Jensen convolution theorem proves this +directly, including zero sequences and vanishing constant coefficients. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Binomial convolution of nonnegative sequences is nonnegative. -/ +theorem binomialConvolution_nonneg {gamma delta : ℕ → ℝ} + (hgamma : ∀ k, 0 ≤ gamma k) (hdelta : ∀ k, 0 ≤ delta k) (n : ℕ) : + 0 ≤ binomialConvolution gamma delta n := by + apply Finset.sum_nonneg + intro k _ + exact mul_nonneg (mul_nonneg (Nat.cast_nonneg _) (hgamma k)) (hdelta (n - k)) + +/-- Scaling both inputs scales their binomial convolution by the product. -/ +theorem binomialConvolution_const_mul (gamma delta : ℕ → ℝ) (a b : ℝ) (n : ℕ) : + binomialConvolution (fun k => a * gamma k) (fun k => b * delta k) n = + a * b * binomialConvolution gamma delta n := by + simp only [binomialConvolution, Finset.mul_sum] + apply Finset.sum_congr rfl + intro k _ + ring + +/-- Binomial convolution preserves PF multiplier sequences. -/ +theorem IsPFMultiplierSequence.binomialConvolution {gamma delta : ℕ → ℝ} + (hgamma : IsPFMultiplierSequence gamma) (hdelta : IsPFMultiplierSequence delta) : + IsPFMultiplierSequence (RealRooted.binomialConvolution gamma delta) := by + rw [isPFMultiplierSequence_iff_jensenPolynomial_isPF] + intro n + apply IsPFPolynomial.of_realRooted_nonneg + · intro k + rw [coeff_jensenPolynomial] + split_ifs + · exact mul_nonneg (Nat.cast_nonneg _) + (binomialConvolution_nonneg hgamma.nonneg hdelta.nonneg k) + · exact le_rfl + · exact jensenProductPolynomial_splits n + ((isPFPolynomial_jensenPolynomial_of_PFMultiplierSequence hgamma n).splits) + ((isPFPolynomial_jensenPolynomial_of_PFMultiplierSequence hdelta n).splits) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/FactorialRatio.lean b/RealRooted/MultiplierSequence/FactorialRatio.lean new file mode 100644 index 000000000..fee6985d3 --- /dev/null +++ b/RealRooted/MultiplierSequence/FactorialRatio.lean @@ -0,0 +1,100 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.MultiplierSequence.PochhammerConvolution +import RealRooted.MultiplierSequence.Laguerre +import RealRooted.MultiplierSequence.Arithmetic +import RealRooted.MultiplierSequence.PolyaSchur + +/-! +# A factorial-ratio multiplier sequence + +The sequence `(2k)! / (3k)!` is a PF multiplier sequence. Its arithmetic +subsequences therefore give entire positive Type-I functions at every stride +and starting index. These are Craven--Csordas (2006), Theorem 3.13 and +Corollary 3.16, with the zero-stride boundary included. + +The proof uses the reciprocal-Pochhammer convolution and an Euler factor, +so no quotient of Gamma values at poles occurs. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Tripling the index splits a factorial into its three residue classes. -/ +private theorem factorial_three_mul (n : ℕ) : + ((3 * n).factorial : ℝ) = (27 : ℝ) ^ n * + (ascPochhammer ℝ n).eval (1 / 3) * + (ascPochhammer ℝ n).eval (2 / 3) * n.factorial := by + induction n with + | zero => simp + | succ n ih => + rw [show 3 * (n + 1) = 3 * n + 1 + 1 + 1 by lia, + Nat.factorial_succ, Nat.factorial_succ, Nat.factorial_succ, + ascPochhammer_succ_eval, ascPochhammer_succ_eval, Nat.factorial_succ, pow_succ] + push_cast + rw [ih] + ring + +/-- The Euler factor cancels the shifted Pochhammer parameter exactly. -/ +private theorem factorial_ratio_eq_pochhammerConvolution (n : ℕ) : + ((2 * n).factorial : ℝ) / (3 * n).factorial = + 3 * (1 / 27 : ℝ) ^ n * ((n : ℝ) + 1 / 3) * + ((ascPochhammer ℝ n).eval ((4 / 3 : ℝ) + 2 / 3 + n - 1) / + ((ascPochhammer ℝ n).eval (4 / 3) * + (ascPochhammer ℝ n).eval (2 / 3))) := by + have hfac := factorial_mul_ascPochhammer ℝ n n + rw [← two_mul n] at hfac + have hshift := ascPochhammer_eval_succ n (1 / 3 : ℝ) + rw [show (1 / 3 : ℝ) + 1 = 4 / 3 by norm_num] at hshift + rw [show (4 / 3 : ℝ) + 2 / 3 + n - 1 = n + 1 by ring, + factorial_three_mul] + have h₁ := (ascPochhammer_pos n (1 / 3 : ℝ) (by norm_num)).ne' + have h₂ := (ascPochhammer_pos n (2 / 3 : ℝ) (by norm_num)).ne' + have h₄ := (ascPochhammer_pos n (4 / 3 : ℝ) (by norm_num)).ne' + rw [one_div_pow] + field_simp + linear_combination -(ascPochhammer ℝ n).eval (4 / 3) * hfac + + 3 * (n.factorial : ℝ) * + (ascPochhammer ℝ n).eval ((n : ℝ) + 1) * hshift + +/-- The factorial ratios `(2k)! / (3k)!` form a PF multiplier sequence +(Craven--Csordas, 2006, Theorem 3.13). -/ +theorem isPFMultiplierSequence_factorial_two_mul_div_three_mul : + IsPFMultiplierSequence (fun k => ((2 * k).factorial : ℝ) / (3 * k).factorial) := by + have hbase := (isPFMultiplierSequence_natCast_add (by norm_num : (0 : ℝ) ≤ 1 / 3)).mul + (isPFMultiplierSequence_pochhammerConvolution + (by norm_num : (0 : ℝ) < 4 / 3) (by norm_num : (0 : ℝ) < 2 / 3)) + rw [isPFMultiplierSequence_iff_jensenPolynomial_isPF] + intro d + have hp₀ := isPFPolynomial_jensenPolynomial_of_PFMultiplierSequence hbase d + have hp₁ := hp₀.comp_C_mul_X_add_C (by norm_num : (0 : ℝ) < 1 / 27) le_rfl + have hp := hp₁.const_mul (by norm_num : (0 : ℝ) < 3) + convert hp using 1 + ext k + rw [coeff_jensenPolynomial, coeff_C_mul] + simp only [C_0, add_zero, comp_C_mul_X_coeff, coeff_jensenPolynomial] + split_ifs + · rw [factorial_ratio_eq_pochhammerConvolution] + ring + · ring + +/-- Every arithmetic subsequence of the factorial ratios is a PF multiplier +sequence, extending Craven--Csordas (2006), Corollary 3.16. -/ +theorem isPFMultiplierSequence_factorial_ratio_arithmetic (r s : ℕ) : + IsPFMultiplierSequence (fun k => + ((2 * (s + r * k)).factorial : ℝ) / (3 * (s + r * k)).factorial) := + isPFMultiplierSequence_factorial_two_mul_div_three_mul.arithmetic r s + +/-- Every arithmetic factorial-ratio exponential generating function belongs +to the positive Type-I Laguerre--Pólya class, with actual entire convergence. -/ +theorem isLaguerrePolyaTypeI_factorial_ratio_arithmetic (r s : ℕ) : + IsLaguerrePolyaTypeI (complexExpGeneratingFunction (fun k => + ((2 * (s + r * k)).factorial : ℝ) / (3 * (s + r * k)).factorial)) := + IsPFMultiplierSequence.isLaguerrePolyaTypeI_complexExpGeneratingFunction + (isPFMultiplierSequence_factorial_ratio_arithmetic r s) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/GammaConvolution.lean b/RealRooted/MultiplierSequence/GammaConvolution.lean new file mode 100644 index 000000000..04753b479 --- /dev/null +++ b/RealRooted/MultiplierSequence/GammaConvolution.lean @@ -0,0 +1,124 @@ +module + +public import RealRooted.MultiplierSequence.Infinite +public import RealRooted.MultiplierSequence.JensenProduct +public import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import RealRooted.MultiplierSequence.BinomialConvolution +import RealRooted.MultiplierSequence.InvPochhammer +import RealRooted.Mathlib.RingTheory.Polynomial.Pochhammer.ReciprocalConvolution +import TauCeti.Analysis.SpecialFunctions.Gamma.Basic + +/-! +# Gamma normalization of reciprocal-Pochhammer convolution + +The finite-product numerator supplies the canceled Gamma ratio at its +removable singularity. For positive parameters whose sum differs from one, +the usual quotient is valid at every index. When the sum is one, its zeroth +value must be defined separately. + +These are the precise normalizations of Craven--Csordas (2006), Lemma 3.12 +and Theorem 3.14. Mathlib assigns zero to Gamma at its poles, so substituting +that value directly in the uncanceled quotient would lose its constant term. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Reciprocal Gamma along a positive natural shift is a constant multiple +of a reciprocal rising factorial. -/ +private theorem inv_Gamma_add_nat_eq {a : ℝ} (ha : 0 < a) (n : ℕ) : + (Real.Gamma (a + n))⁻¹ = + (Real.Gamma a)⁻¹ * ((ascPochhammer ℝ n).eval a)⁻¹ := by + have h := Real.inv_Gamma_eq_ascPochhammer_mul_inv_Gamma_add a n + have hA := (ascPochhammer_pos n a ha).ne' + rw [mul_comm] at h + exact (eq_div_iff hA).mpr h.symm + +/-- Reciprocal Gamma evaluated at positive natural shifts gives a PF +multiplier sequence. -/ +theorem isPFMultiplierSequence_inv_Gamma_add {a : ℝ} (ha : 0 < a) : + IsPFMultiplierSequence (fun n => (Real.Gamma (a + n))⁻¹) := by + simp_rw [inv_Gamma_add_nat_eq ha] + exact (isPFMultiplierSequence_inv_ascPochhammer ha).const_mul + (inv_nonneg.mpr (Real.Gamma_pos_of_pos ha).le) + +/-- The binomial convolution of reciprocal Gamma values has a pole-free +finite-product numerator, including index zero. -/ +theorem binomialConvolution_inv_Gamma_eq {a b : ℝ} + (ha : 0 < a) (hb : 0 < b) (n : ℕ) : + binomialConvolution (fun k => (Real.Gamma (a + k))⁻¹) + (fun k => (Real.Gamma (b + k))⁻¹) n = + (ascPochhammer ℝ n).eval (a + b + n - 1) / + (Real.Gamma (a + n) * Real.Gamma (b + n)) := by + simp_rw [inv_Gamma_add_nat_eq ha, inv_Gamma_add_nat_eq hb] + rw [binomialConvolution_const_mul, binomialConvolution, + sum_choose_mul_inv_ascPochhammer n + (ascPochhammer_pos n a ha).ne' (ascPochhammer_pos n b hb).ne'] + have haeq := Real.Gamma_add_nat_div_Gamma_eq (n := n) a + (fun k => ne_of_gt (lt_of_le_of_lt (neg_nonpos.mpr (Nat.cast_nonneg k)) ha)) + have hbeq := Real.Gamma_add_nat_div_Gamma_eq (n := n) b + (fun k => ne_of_gt (lt_of_le_of_lt (neg_nonpos.mpr (Nat.cast_nonneg k)) hb)) + rw [← haeq, ← hbeq] + field_simp + +/-- The canceled Gamma convolution gives a PF multiplier sequence for all +positive parameters, including a parameter sum of one. -/ +theorem isPFMultiplierSequence_gammaConvolution {a b : ℝ} + (ha : 0 < a) (hb : 0 < b) : + IsPFMultiplierSequence (fun n => + (ascPochhammer ℝ n).eval (a + b + n - 1) / + (Real.Gamma (a + n) * Real.Gamma (b + n))) := by + have h := (isPFMultiplierSequence_inv_Gamma_add ha).binomialConvolution + (isPFMultiplierSequence_inv_Gamma_add hb) + convert h using 1 + ext n + exact (binomialConvolution_inv_Gamma_eq ha hb n).symm + +/-- Away from the sole removable pole, the finite-product convolution is the +usual quotient of Gamma values. -/ +theorem pochhammer_div_gamma_mul_eq_gamma_ratio {a b : ℝ} + (ha : 0 < a) (hb : 0 < b) {n : ℕ} (h : n ≠ 0 ∨ a + b ≠ 1) : + (ascPochhammer ℝ n).eval (a + b + n - 1) / + (Real.Gamma (a + n) * Real.Gamma (b + n)) = + Real.Gamma (2 * n + a + b - 1) / + (Real.Gamma (a + n) * Real.Gamma (b + n) * Real.Gamma (n + a + b - 1)) := by + have hpole : ∀ k : ℕ, a + b + n - 1 ≠ -(k : ℝ) := by + intro k heq + cases n with + | zero => + have hab : a + b ≠ 1 := h.resolve_left (by simp) + cases k with + | zero => simp only [Nat.cast_zero, add_zero, neg_zero] at heq; exact hab (by linarith) + | succ k => push_cast at heq; have := Nat.cast_nonneg (α := ℝ) k; linarith + | succ n => + push_cast at heq + have := Nat.cast_nonneg (α := ℝ) n + have := Nat.cast_nonneg (α := ℝ) k + linarith + rw [← Real.Gamma_add_nat_div_Gamma_eq (a + b + n - 1) hpole] + rw [show a + b + (n : ℝ) - 1 + n = 2 * n + a + b - 1 by ring, + show a + b + (n : ℝ) - 1 = n + a + b - 1 by ring] + ring + +/-- The ordinary Gamma quotient gives the convolution multiplier sequence +when the positive parameters do not sum to one. -/ +theorem isPFMultiplierSequence_gammaRatio {a b : ℝ} + (ha : 0 < a) (hb : 0 < b) (hab : a + b ≠ 1) : + IsPFMultiplierSequence (fun n => + Real.Gamma (2 * n + a + b - 1) / + (Real.Gamma (a + n) * Real.Gamma (b + n) * Real.Gamma (n + a + b - 1))) := by + simpa only [pochhammer_div_gamma_mul_eq_gamma_ratio ha hb (Or.inr hab)] using + isPFMultiplierSequence_gammaConvolution ha hb + +/-- The zeroth coefficient of the canceled convolution is the product of +reciprocal Gamma values, also when the parameters sum to one. -/ +theorem gammaConvolution_zero (a b : ℝ) : + (ascPochhammer ℝ 0).eval (a + b + (0 : ℕ) - 1) / + (Real.Gamma (a + (0 : ℕ)) * Real.Gamma (b + (0 : ℕ))) = + 1 / (Real.Gamma a * Real.Gamma b) := by + simp + +end RealRooted diff --git a/RealRooted/MultiplierSequence/GammaSampling.lean b/RealRooted/MultiplierSequence/GammaSampling.lean new file mode 100644 index 000000000..af9039554 --- /dev/null +++ b/RealRooted/MultiplierSequence/GammaSampling.lean @@ -0,0 +1,76 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.MultiplierSequence.Geometric +import RealRooted.MultiplierSequence.PolyaSchur.Limit + +/-! +# Reciprocal Gamma sampled along positive real steps + +For a nonnegative real step and a positive starting value, reciprocal Gamma +samples form a PF multiplier sequence. Euler's finite Gamma approximants +factor into positive affine multipliers and a geometric factor. Their +pointwise limit gives the result without an infinite-product sampling theorem. + +This proves the multiplier statement behind Craven--Csordas (2006), +Example 2.7, and Baricz--Singh (2018), Theorem 1 for positive parameters. +-/ + +public section + +open Filter Topology + +namespace RealRooted + +/-- Euler's reciprocal Gamma approximants separate into a geometric factor +and a finite product of affine factors. -/ +private theorem inv_GammaSeq_eq (a b : ℝ) {N : ℕ} (hN : N ≠ 0) (k : ℕ) : + (Real.GammaSeq (a * k + b) N)⁻¹ = + (Real.exp (-(Real.log N) * b) / N.factorial) * + (Real.exp (-(Real.log N) * a)) ^ k * + ∏ j ∈ Finset.range (N + 1), (a * k + (b + j)) := by + have hNpos : (0 : ℝ) < N := by exact_mod_cast Nat.pos_of_ne_zero hN + rw [Real.GammaSeq, inv_div, div_eq_mul_inv, mul_inv_rev, + Real.rpow_def_of_pos hNpos, ← Real.exp_neg, ← Real.exp_nat_mul] + rw [show -(Real.log N * (a * k + b)) = + -(Real.log N) * b + k * (-(Real.log N) * a) by ring, Real.exp_add] + simp only [add_assoc] + ring + +/-- Each nonzero-index reciprocal Gamma approximant is a PF multiplier. -/ +private theorem isPFMultiplierSequence_inv_GammaSeq {a b : ℝ} + (ha : 0 ≤ a) (hb : 0 < b) {N : ℕ} (hN : N ≠ 0) : + IsPFMultiplierSequence (fun k => (Real.GammaSeq (a * k + b) N)⁻¹) := by + have hprod := IsPFMultiplierSequence.finsetProd (Finset.range (N + 1)) + (fun j k => a * k + (b + j)) + (fun j _ => isPFMultiplierSequence_mul_natCast_add ha (by positivity)) + have hgeom := (isPFMultiplierSequence_pow (Real.exp_pos (-(Real.log N) * a))).mul hprod + have h := hgeom.const_mul (show 0 ≤ Real.exp (-(Real.log N) * b) / N.factorial by positivity) + convert h using 1 + ext k + rw [inv_GammaSeq_eq a b hN] + ring + +/-- Reciprocal Gamma at every nonnegative real step and positive starting +value forms a PF multiplier sequence. A zero step gives a constant sequence. -/ +theorem isPFMultiplierSequence_inv_Gamma_mul_add {a b : ℝ} + (ha : 0 ≤ a) (hb : 0 < b) : + IsPFMultiplierSequence (fun k => (Real.Gamma (a * k + b))⁻¹) := by + apply isPFMultiplierSequence_of_tendsto + (gamma := fun N k => (Real.GammaSeq (a * k + b) (N + 1))⁻¹) + (fun N => isPFMultiplierSequence_inv_GammaSeq ha hb (Nat.succ_ne_zero N)) + intro k + have hpos : 0 < a * (k : ℝ) + b := by positivity + exact ((Real.GammaSeq_tendsto_Gamma (a * k + b)).inv₀ + (Real.Gamma_pos_of_pos hpos).ne').comp (tendsto_add_atTop_nat 1) + +/-- The positive-step Wright exponential generating function is entire +positive Type-I Laguerre--Pólya, including the exponential at zero step. -/ +theorem isLaguerrePolyaTypeI_inv_Gamma_mul_add {a b : ℝ} + (ha : 0 ≤ a) (hb : 0 < b) : + IsLaguerrePolyaTypeI + (complexExpGeneratingFunction (fun k => (Real.Gamma (a * k + b))⁻¹)) := + IsPFMultiplierSequence.isLaguerrePolyaTypeI_complexExpGeneratingFunction + (isPFMultiplierSequence_inv_Gamma_mul_add ha hb) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/Geometric.lean b/RealRooted/MultiplierSequence/Geometric.lean new file mode 100644 index 000000000..bb2bcdd74 --- /dev/null +++ b/RealRooted/MultiplierSequence/Geometric.lean @@ -0,0 +1,55 @@ +module + +public import RealRooted.MultiplierSequence.Infinite +import RealRooted.MultiplierSequence.Laguerre + +/-! +# Geometric and affine PF multiplier sequences + +Positive geometric factors rescale the variable, and nonnegative affine +factors are shifted Euler operators. Finite products preserve the same cone. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Every positive geometric sequence is a PF multiplier sequence. -/ +theorem isPFMultiplierSequence_pow {c : ℝ} (hc : 0 < c) : + IsPFMultiplierSequence (fun k => c ^ k) := by + rw [isPFMultiplierSequence_iff_preserves] + intro p hp + have hscaled := hp.comp_C_mul_X_add_C hc le_rfl + have heq : diagonalOperator (fun k => c ^ k) p = + p.comp (C c * X + C 0) := by + ext k + rw [coeff_diagonalOperator] + simp only [C_0, add_zero, Polynomial.comp_C_mul_X_coeff] + ring + rw [heq] + exact hscaled + +/-- A nonnegative affine sequence is a PF multiplier sequence. -/ +theorem isPFMultiplierSequence_mul_natCast_add {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + IsPFMultiplierSequence (fun k => a * k + b) := by + rcases ha.eq_or_lt with rfl | ha + · simpa using isPFMultiplierSequence_const_sequence hb + · have h := (isPFMultiplierSequence_natCast_add (div_nonneg hb ha.le)).const_mul ha.le + convert h using 1 + ext k + field_simp + +/-- Finite products of PF multiplier sequences are PF multiplier sequences. -/ +theorem IsPFMultiplierSequence.finsetProd {ι : Type*} (s : Finset ι) + (gamma : ι → ℕ → ℝ) (hgamma : ∀ i ∈ s, IsPFMultiplierSequence (gamma i)) : + IsPFMultiplierSequence (fun k => ∏ i ∈ s, gamma i k) := by + classical + induction s using Finset.induction_on with + | empty => simpa using isPFMultiplierSequence_one_sequence + | @insert i s hi ih => + simpa [Finset.prod_insert hi] using (hgamma i (Finset.mem_insert_self i s)).mul + (ih (fun j hj => hgamma j (Finset.mem_insert_of_mem hj))) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenBessel.lean b/RealRooted/MultiplierSequence/JensenBessel.lean new file mode 100644 index 000000000..42c5f410d --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenBessel.lean @@ -0,0 +1,55 @@ +module + +public import RealRooted.MultiplierSequence +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +public import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import RealRooted.Laguerre.NegativeParameters +import RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas +import TauCeti.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Algebra.Polynomial.Splits +import Mathlib.Tactic.Ring + +/-! +# Jensen polynomials of the regularized Bessel coefficients + +The reciprocal-Gamma identity remains valid at every parameter, including +Gamma poles. The Laguerre normalization is the one in O'Sullivan, Section 3.3, +with `generalizedLaguerre d alpha = d! L_d^alpha(-X)`. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- The Jensen polynomial of the regularized Bessel coefficients is a scalar +multiple of the classical-sign Laguerre polynomial. No Gamma factor is cancelled. -/ +theorem jensenPolynomial_inv_gamma_eq (d : ℕ) (alpha : ℝ) : + jensenPolynomial d (fun k ↦ (-1 : ℝ) ^ k * (Real.Gamma (alpha + k + 1))⁻¹) = + C ((Real.Gamma (alpha + d + 1))⁻¹) * + (generalizedLaguerre d alpha).comp (-X) := by + ext k + rw [coeff_jensenPolynomial, coeff_C_mul, coeff_comp_neg_X, coeff_generalizedLaguerre] + by_cases hk : k ≤ d + · simp only [ite_eq_left hk] + have hgamma := Real.inv_Gamma_eq_ascPochhammer_mul_inv_Gamma_add + (alpha + k + 1) (d - k) + have harg : alpha + (k : ℝ) + 1 + ((d - k : ℕ) : ℝ) = alpha + d + 1 := by + rw [Nat.cast_sub hk] + ring + rw [harg] at hgamma + rw [hgamma] + ring + · simp only [ite_eq_right hk, mul_zero, zero_mul] + +/-- Every Jensen polynomial of the regularized Bessel coefficients splits +for parameters at least `-2`, including both Gamma-pole endpoints. -/ +theorem jensenPolynomial_inv_gamma_splits (d : ℕ) {alpha : ℝ} + (halpha : -2 ≤ alpha) : + (jensenPolynomial d + (fun k ↦ (-1 : ℝ) ^ k * (Real.Gamma (alpha + k + 1))⁻¹)).Splits := by + rw [jensenPolynomial_inv_gamma_eq] + exact (Splits.C _).mul (generalizedLaguerre_splits_of_neg_two_le d halpha).comp_neg_X + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenBesselObstruction.lean b/RealRooted/MultiplierSequence/JensenBesselObstruction.lean new file mode 100644 index 000000000..0e2883cbd --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenBesselObstruction.lean @@ -0,0 +1,47 @@ +module + +public import RealRooted.MultiplierSequence +public import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import RealRooted.MultiplierSequence.JensenBessel +import RealRooted.QuadraticRoot +import Mathlib.Tactic.Ring + +/-! +# The quadratic obstruction below the Bessel parameter range + +Outside the negative integers, the reciprocal-Gamma scale is nonzero. +The degree-two Jensen polynomial then has the Laguerre discriminant sign, +which excludes every parameter below `-2`. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Below `-2`, every nonintegral parameter already fails at the quadratic +Jensen polynomial. Negative integers are excluded from this obstruction. -/ +theorem not_splits_jensenPolynomial_inv_gamma_two {alpha : ℝ} + (halpha : alpha < -2) (hnat : ∀ n : ℕ, alpha ≠ -(n : ℝ)) : + ¬ (jensenPolynomial 2 + (fun k ↦ (-1 : ℝ) ^ k * (Real.Gamma (alpha + k + 1))⁻¹)).Splits := by + have hGamma : Real.Gamma (alpha + 2 + 1) ≠ 0 := by + apply Real.Gamma_ne_zero + intro n hn + apply hnat (n + 3) + push_cast + linarith + have hbad : ¬ (generalizedLaguerre 2 alpha).Splits := by + rw [generalizedLaguerre_two, monicQuadraticPoly_not_splits_iff_discrim_neg] + nlinarith + intro hs + rw [jensenPolynomial_inv_gamma_eq] at hs + norm_num only [Nat.cast_ofNat] at hs + have hscale : (C ((Real.Gamma (alpha + 2 + 1))⁻¹) : ℝ[X]) ≠ 0 := + C_ne_zero.mpr (inv_ne_zero hGamma) + have hsplit := (splits_mul_iff_right hscale (Splits.C _)).mp hs + apply hbad + simpa only [comp_neg_X_comp_neg_X] using hsplit.comp_neg_X + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenConvolution.lean b/RealRooted/MultiplierSequence/JensenConvolution.lean new file mode 100644 index 000000000..9e06335b6 --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenConvolution.lean @@ -0,0 +1,93 @@ +module + +public import RealRooted.MultiplierSequence.JensenProduct +public import RealRooted.FiniteFreeAdditive +import RealRooted.FiniteFreeAdditive.Preservation +import RealRooted.Mathlib.Algebra.Polynomial.Reverse + +/-! +# Finite Jensen products and additive convolution + +Binomial convolution of Taylor data corresponds to finite-free additive +convolution after reflection. Consequently the splitting of the two Jensen +polynomials at a fixed degree already implies splitting of their Jensen product. +No entire-function or nonvanishing assumption is needed. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- The kernel cancels exactly against Jensen binomial normalizations. -/ +private theorem finiteFreeAdditiveConvolutionGamma_mul_choose_mul_choose + (d k i : ℕ) (hi : i ≤ k) (hk : k ≤ d) : + finiteFreeAdditiveConvolutionGamma d i (k - i) * + (d.choose i : ℝ) * (d.choose (k - i) : ℝ) = + (d.choose k : ℝ) * (k.choose i : ℝ) := by + have hid : i ≤ d := hi.trans hk + have hkid : k - i ≤ d := (Nat.sub_le k i).trans hk + have hi0 : (d.choose i : ℝ) ≠ 0 := by + exact_mod_cast (Nat.choose_pos hid).ne' + have hki0 : (d.choose (k - i) : ℝ) ≠ 0 := by + exact_mod_cast (Nat.choose_pos hkid).ne' + rw [finiteFreeAdditiveConvolutionGamma_eq_choose_ratio d i (k - i) + (by lia), Nat.add_sub_of_le hi, Nat.choose_symm hi] + field_simp [hi0, hki0] + +/-- A Jensen product is a reflected finite-free additive convolution. +No degree-exactness or nonzero assumption is needed. -/ +theorem jensenProductPolynomial_eq_reflect_convolution + (d : ℕ) (gamma delta : ℕ → ℝ) : + jensenProductPolynomial d gamma delta = + reflect d (finiteFreeAdditiveConvolution d + (reflect d (jensenPolynomial d gamma)) + (reflect d (jensenPolynomial d delta))) := by + symm + ext k + by_cases hk : k ≤ d + · rw [coeff_reflect, revAt_le hk, + coeff_finiteFreeAdditiveConvolution_of_le _ _ _ (Nat.sub_le d k), + Nat.sub_sub_self hk, coeff_jensenProductPolynomial, ite_eq_left hk] + unfold finiteFreeAdditiveConvolutionCoeff binomialConvolution + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + have hik : i ≤ k := Nat.lt_succ_iff.mp (Finset.mem_range.mp hi) + have hid : i ≤ d := hik.trans hk + have hkid : k - i ≤ d := (Nat.sub_le k i).trans hk + rw [coeff_reflect, revAt_le (Nat.sub_le d i), Nat.sub_sub_self hid, + coeff_reflect, revAt_le (Nat.sub_le d (k - i)), Nat.sub_sub_self hkid, + coeff_jensenPolynomial, ite_eq_left hid, coeff_jensenPolynomial, ite_eq_left hkid] + calc + _ = (finiteFreeAdditiveConvolutionGamma d i (k - i) * + (d.choose i : ℝ) * (d.choose (k - i) : ℝ)) * + gamma i * delta (k - i) := by ring + _ = (d.choose k : ℝ) * + ((k.choose i : ℝ) * gamma i * delta (k - i)) := by + rw [finiteFreeAdditiveConvolutionGamma_mul_choose_mul_choose d k i hik hk] + ring + · rw [coeff_reflect, revAt_eq_self_of_lt (Nat.lt_of_not_ge hk), + coeff_finiteFreeAdditiveConvolution_of_gt _ _ _ (Nat.lt_of_not_ge hk), + coeff_jensenProductPolynomial, ite_eq_right hk] + +/-- Finite product transfer: splitting of the two degree-`d` Jensen polynomials +implies splitting of their degree-`d` Jensen product. -/ +theorem jensenProductPolynomial_splits + (d : ℕ) {gamma delta : ℕ → ℝ} + (hgamma : (jensenPolynomial d gamma).Splits) + (hdelta : (jensenPolynomial d delta).Splits) : + (jensenProductPolynomial d gamma delta).Splits := by + rw [jensenProductPolynomial_eq_reflect_convolution] + have hgd := natDegree_jensenPolynomial_le d gamma + have hdd := natDegree_jensenPolynomial_le d delta + have hgdr : (reflect d (jensenPolynomial d gamma)).natDegree ≤ d := + natDegree_reflect_le.trans (max_le le_rfl hgd) + have hddr : (reflect d (jensenPolynomial d delta)).natDegree ≤ d := + natDegree_reflect_le.trans (max_le le_rfl hdd) + apply (splits_reflect_iff (natDegree_finiteFreeAdditiveConvolution_le d _ _)).mpr + exact splits_finiteFreeAdditiveConvolution d + ((splits_reflect_iff hgd).mpr hgamma) ((splits_reflect_iff hdd).mpr hdelta) hgdr hddr + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenDerivative.lean b/RealRooted/MultiplierSequence/JensenDerivative.lean new file mode 100644 index 000000000..1dfa2d91e --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenDerivative.lean @@ -0,0 +1,57 @@ +module + +public import RealRooted.MultiplierSequence +import RealRooted.Basic +import Mathlib.Algebra.Polynomial.Derivative +import RealRooted.Derivative.Interlacing + +/-! +# Derivatives of Jensen polynomials + +Differentiation lowers the degree parameter and shifts the coefficient sequence. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Differentiating a Jensen polynomial shifts its coefficient sequence by one. -/ +theorem derivative_jensenPolynomial (d : ℕ) (gamma : ℕ → ℝ) : + (jensenPolynomial (d + 1) gamma).derivative = + C (d + 1 : ℝ) * jensenPolynomial d (fun k => gamma (k + 1)) := by + ext k + simp only [coeff_derivative, coeff_jensenPolynomial, coeff_C_mul] + by_cases hk : k ≤ d + · rw [ite_eq_left (by lia), ite_eq_left hk] + have hc : ((d + 1).choose (k + 1) : ℝ) * (k + 1) = + (d + 1) * (d.choose k : ℝ) := by + exact_mod_cast (Nat.add_one_mul_choose_eq d k).symm + linear_combination gamma (k + 1) * hc + · rw [ite_eq_right (by lia), ite_eq_right hk] + ring + +/-- A nonzero final coefficient makes the degree parameter exact. -/ +theorem natDegree_jensenPolynomial {d : ℕ} {gamma : ℕ → ℝ} (hd : gamma d ≠ 0) : + (jensenPolynomial d gamma).natDegree = d := + natDegree_eq_of_le_of_coeff_ne_zero (natDegree_jensenPolynomial_le d gamma) + (by simpa using hd) + +/-- Consecutive degree and shift parameters weakly interlace whenever the larger +Jensen polynomial splits. The zero-aware relation covers vanishing coefficients. -/ +theorem jensenPolynomial_shift_interl {d : ℕ} {gamma : ℕ → ℝ} + (h : (jensenPolynomial (d + 1) gamma).Splits) : + Interl (jensenPolynomial d (fun k => gamma (k + 1))) + (jensenPolynomial (d + 1) gamma) := by + have hi : Interl (jensenPolynomial (d + 1) gamma).derivative + (jensenPolynomial (d + 1) gamma) := by + by_cases hd : (jensenPolynomial (d + 1) gamma).natDegree = 0 + · rw [derivative_eq_zero.mpr hd] + exact interl_zero_left _ + · exact (derivative_interlaces_of_natDegree_ne_zero h hd).toStrictInterl.toInterl + have hscaled := hi.C_mul_left_of_nonneg (a := (d + 1 : ℝ)⁻¹) (by positivity) + simpa only [derivative_jensenPolynomial, ← mul_assoc, ← C_mul, + inv_mul_cancel₀ (by positivity : (d + 1 : ℝ) ≠ 0), C_1, one_mul] using hscaled + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenDifferential.lean b/RealRooted/MultiplierSequence/JensenDifferential.lean new file mode 100644 index 000000000..c44778a1d --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenDifferential.lean @@ -0,0 +1,63 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.Analytic +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialRange +import RealRooted.Mathlib.Analysis.SpecificLimits.DescFactorialWeights + +/-! +# Jensen approximations to infinite differential symbols + +Finite rescaled Jensen symbols give regular finite sums of the differential +series. Pointwise convergence of the ordinary series, including conditional +convergence, therefore identifies the pointwise limit of these finite operators. +-/ + +public section + +open Polynomial Complex Filter Topology + +namespace RealRooted + +/-- Rescaling does not increase the prescribed degree of a Jensen polynomial. -/ +theorem natDegree_rescaledJensenPolynomial_le (n : ℕ) (a : ℕ → ℝ) : + (rescaledJensenPolynomial n a).natDegree ≤ n := by + unfold rescaledJensenPolynomial + apply natDegree_sum_le_of_forall_le + intro k hk + exact (natDegree_monomial_le _).trans (Nat.le_of_lt_succ (Finset.mem_range.mp hk)) + +/-- A finite Jensen differential symbol is the falling-factorial weighted sum +of the corresponding formal infinite differential series. -/ +theorem differentialApply_rescaledJensenPolynomial (a : ℕ → ℝ) (f : ℂ → ℂ) + (n : ℕ) (z : ℂ) : + ((rescaledJensenPolynomial n a).map ofRealHom).differentialApply f z = + ∑ j ∈ Finset.range (n + 1), + ((n.descFactorial j : ℝ) / (n : ℝ) ^ j) • + ((a j : ℂ) * iteratedDeriv j f z / j.factorial) := by + rw [Polynomial.differentialApply_eq_sum_range _ _ + ((natDegree_map_le).trans (natDegree_rescaledJensenPolynomial_le n a))] + apply Finset.sum_congr rfl + intro j hj + have hjn : j ≤ n := Nat.le_of_lt_succ (Finset.mem_range.mp hj) + simp only [coeff_map, coeff_rescaledJensenPolynomial, ite_eq_left hjn, + ofRealHom_eq_coe, smul_eq_mul, Complex.real_smul, ofReal_mul, ofReal_pow, + ofReal_inv, ofReal_div, ofReal_natCast] + rw [Nat.descFactorial_eq_factorial_mul_choose, Nat.cast_mul] + have hfac : (j.factorial : ℂ) ≠ 0 := by exact_mod_cast Nat.factorial_ne_zero j + field_simp [hfac] + ring + +/-- Convergence of the ordinary differential series at a point implies +convergence of its finite Jensen-symbol approximations to the same value. -/ +theorem tendsto_differentialApply_rescaledJensenPolynomial (a : ℕ → ℝ) (f : ℂ → ℂ) + (z w : ℂ) + (h : Tendsto (fun n => ∑ j ∈ Finset.range n, + (a j : ℂ) * iteratedDeriv j f z / j.factorial) atTop (𝓝 w)) : + Tendsto (fun n => + ((rescaledJensenPolynomial n a).map ofRealHom).differentialApply f z) + atTop (𝓝 w) := by + simpa only [differentialApply_rescaledJensenPolynomial] using + Nat.tendsto_sum_descFactorial_smul h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenLaguerre.lean b/RealRooted/MultiplierSequence/JensenLaguerre.lean new file mode 100644 index 000000000..1b26c3040 --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenLaguerre.lean @@ -0,0 +1,82 @@ +module + +public import RealRooted.MultiplierSequence.JensenProduct +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +import RealRooted.MultiplierSequence.JensenConvolution +import RealRooted.Laguerre.NegativeParameters +import RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas + +/-! +# Laguerre versions of Jensen polynomials + +The degree-dependent Laguerre auxiliary gives the factorial normalization +`d! Q` of O'Sullivan's Laguerre Jensen polynomial. Its construction uses rising +factorials and remains defined at the parameters `-1` and `-2`, where formulas +using quotients of Gamma functions require separate treatment. + +Splitting of the input Jensen polynomial at a fixed degree suffices for +splitting of every Laguerre transform at parameters at least `-2`. +-/ + +@[expose] public section + +open Polynomial + +namespace RealRooted + +/-- Degree-dependent exponential Taylor data for the factorial-normalized +Laguerre auxiliary. -/ +noncomputable def laguerreJensenCoeff (d : ℕ) (alpha : ℝ) (k : ℕ) : ℝ := + (-1 : ℝ) ^ k * (ascPochhammer ℝ (d - k)).eval (alpha + k + 1) + +/-- The factorial-normalized Laguerre Jensen family, using rising factorials +so that the endpoint parameters require no division. -/ +noncomputable def laguerreJensenPolynomial (d : ℕ) (gamma : ℕ → ℝ) (alpha : ℝ) : ℝ[X] := + jensenProductPolynomial d gamma (laguerreJensenCoeff d alpha) + +/-- The Laguerre auxiliary's Jensen polynomial is the classical-sign +Laguerre polynomial in factorial normalization. -/ +theorem jensenPolynomial_laguerreJensenCoeff (d : ℕ) (alpha : ℝ) : + jensenPolynomial d (laguerreJensenCoeff d alpha) = + (generalizedLaguerre d alpha).comp (-X) := by + ext k + rw [coeff_jensenPolynomial, coeff_comp_neg_X, coeff_generalizedLaguerre] + by_cases hk : k ≤ d + · simp only [ite_eq_left hk, laguerreJensenCoeff] + ring + · simp [hk] + +/-- The coefficient formula indexed by degree loss. Only the zero-loss term +has degree `d` in the Laguerre parameter. -/ +theorem coeff_laguerreJensenPolynomial (d k : ℕ) (gamma : ℕ → ℝ) (alpha : ℝ) : + (laguerreJensenPolynomial d gamma alpha).coeff k = + if k ≤ d then (d.choose k : ℝ) * + ∑ r ∈ Finset.range (k + 1), + (k.choose r : ℝ) * (-1 : ℝ) ^ r * gamma (k - r) * + (ascPochhammer ℝ (d - r)).eval (alpha + r + 1) + else 0 := by + rw [laguerreJensenPolynomial, coeff_jensenProductPolynomial, + binomialConvolution_comm, binomialConvolution] + split_ifs + · congr 1 + apply Finset.sum_congr rfl + intro r hr + dsimp [laguerreJensenCoeff] + ring + · rfl + +/-- The Laguerre Jensen degree bound holds even at degenerate parameters. -/ +theorem natDegree_laguerreJensenPolynomial_le (d : ℕ) (gamma : ℕ → ℝ) (alpha : ℝ) : + (laguerreJensenPolynomial d gamma alpha).natDegree ≤ d := + natDegree_jensenProductPolynomial_le d _ _ + +/-- A splitting Jensen polynomial gives splitting Laguerre Jensen polynomials +throughout the extended parameter range. -/ +theorem laguerreJensenPolynomial_splits {d : ℕ} {gamma : ℕ → ℝ} {alpha : ℝ} + (hgamma : (jensenPolynomial d gamma).Splits) (halpha : -2 ≤ alpha) : + (laguerreJensenPolynomial d gamma alpha).Splits := by + apply jensenProductPolynomial_splits d hgamma + rw [jensenPolynomial_laguerreJensenCoeff] + exact (generalizedLaguerre_splits_of_neg_two_le d halpha).comp_neg_X + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenLaguerreBasis.lean b/RealRooted/MultiplierSequence/JensenLaguerreBasis.lean new file mode 100644 index 000000000..7891eafd6 --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenLaguerreBasis.lean @@ -0,0 +1,176 @@ +module + +public import RealRooted.MultiplierSequence.JensenLaguerre +public import Mathlib.RingTheory.Binomial +import RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas + +/-! +# Classical Laguerre basis for Jensen transforms + +The rising-factorial transform is exactly `d!` times the Laguerre family in +O'Sullivan, *Zeros of Jensen polynomials and asymptotics for the Riemann xi +function*, equation (3.8) and Theorem 3.9, https://arxiv.org/abs/2007.13582. +These algebraic identities hold for every real parameter, including `-1` and `-2`. +-/ + +public section + +open Polynomial +open scoped BigOperators + +namespace RealRooted + +noncomputable section + +private theorem descFactorial_mul_choose_eq_pochhammer + (d j : ℕ) (hjd : j ≤ d) (alpha : ℝ) : + (d.descFactorial j : ℝ) * Ring.choose ((d : ℝ) + alpha) j = + (d.choose j : ℝ) * + (ascPochhammer ℝ j).eval (alpha + (d - j : ℕ) + 1) := by + have harg : (d : ℝ) + alpha - j + 1 = alpha + (d - j : ℕ) + 1 := by + rw [Nat.cast_sub hjd] + ring + have hfac : (j.factorial : ℝ) ≠ 0 := by positivity + rw [Nat.descFactorial_eq_factorial_mul_choose, Nat.cast_mul, + Ring.choose_eq_smul, descPochhammer_smeval_eq_ascPochhammer, + ascPochhammer_smeval_eq_eval, smul_eq_mul, harg] + field_simp [hfac] + +private theorem laguerre_classical_coefficient_factor + (d k j : ℕ) (hjk : j ≤ k) (hkd : k ≤ d) (alpha : ℝ) : + (d.descFactorial j : ℝ) * Ring.choose ((d : ℝ) + alpha) j * + ((d - j).choose (k - j) : ℝ) * + (ascPochhammer ℝ (d - k)).eval (alpha + (k - j : ℕ) + 1) = + (d.choose k : ℝ) * (k.choose j : ℝ) * + (ascPochhammer ℝ (d - (k - j))).eval (alpha + (k - j : ℕ) + 1) := by + have hjd : j ≤ d := hjk.trans hkd + rw [descFactorial_mul_choose_eq_pochhammer d j hjd alpha] + have hchoose : + (d.choose j : ℝ) * ((d - j).choose (k - j) : ℝ) = + (d.choose k : ℝ) * (k.choose j : ℝ) := by + exact_mod_cast (Nat.choose_mul (n := d) (k := k) (s := j) hjk).symm + have hlength : d - k + j = d - (k - j) := by lia + have hindices : k - j + (d - k) = d - j := by lia + have hindicesR := congrArg (fun n : ℕ => (n : ℝ)) hindices + push_cast at hindicesR + have hshift : + (alpha + (k - j : ℕ) + 1) + (d - k : ℕ) = + alpha + (d - j : ℕ) + 1 := by linarith + have hpoch : + (ascPochhammer ℝ (d - k)).eval (alpha + (k - j : ℕ) + 1) * + (ascPochhammer ℝ j).eval (alpha + (d - j : ℕ) + 1) = + (ascPochhammer ℝ (d - (k - j))).eval (alpha + (k - j : ℕ) + 1) := by + have h := congrArg (fun p : ℝ[X] => p.eval (alpha + (k - j : ℕ) + 1)) + (ascPochhammer_mul (S := ℝ) (d - k) j) + simpa only [eval_mul, eval_comp, eval_add, eval_X, eval_natCast, + hshift, hlength] using h + calc + _ = ((d.choose j : ℝ) * ((d - j).choose (k - j) : ℝ)) * + ((ascPochhammer ℝ (d - k)).eval (alpha + (k - j : ℕ) + 1) * + (ascPochhammer ℝ j).eval (alpha + (d - j : ℕ) + 1)) := by ring + _ = _ := by rw [hchoose, hpoch] + +private theorem coeff_laguerreJensenPolynomial_by_input + (d k : ℕ) (gamma : ℕ → ℝ) (alpha : ℝ) (hk : k ≤ d) : + (laguerreJensenPolynomial d gamma alpha).coeff k = + (d.choose k : ℝ) * + ∑ j ∈ Finset.range (k + 1), + (k.choose j : ℝ) * gamma j * (-1 : ℝ) ^ (k - j) * + (ascPochhammer ℝ (d - (k - j))).eval (alpha + (k - j : ℕ) + 1) := by + rw [laguerreJensenPolynomial, coeff_jensenProductPolynomial, + ite_eq_left hk, binomialConvolution] + congr 1 + apply Finset.sum_congr rfl + intro j hj + dsimp [laguerreJensenCoeff] + ring + +/-- The Gamma-free Laguerre Jensen family expanded in the classical-sign +Laguerre basis. This identity holds for every real parameter, including -1 and -2. -/ +theorem laguerreJensenPolynomial_eq_laguerre_sum + (d : ℕ) (gamma : ℕ → ℝ) (alpha : ℝ) : + laguerreJensenPolynomial d gamma alpha = + ∑ j ∈ Finset.range (d + 1), + C ((d.descFactorial j : ℝ) * Ring.choose ((d : ℝ) + alpha) j * gamma j) * + (X ^ j * (generalizedLaguerre (d - j) alpha).comp (-X)) := by + let B (j : ℕ) : ℝ[X] := + C ((d.descFactorial j : ℝ) * Ring.choose ((d : ℝ) + alpha) j * gamma j) * + (X ^ j * (generalizedLaguerre (d - j) alpha).comp (-X)) + ext k + change (laguerreJensenPolynomial d gamma alpha).coeff k = + (∑ j ∈ Finset.range (d + 1), B j).coeff k + rw [finsetSum_coeff] + by_cases hk : k ≤ d + · rw [coeff_laguerreJensenPolynomial_by_input d k gamma alpha hk, Finset.mul_sum] + symm + calc + ∑ j ∈ Finset.range (d + 1), (B j).coeff k = + ∑ j ∈ Finset.range (k + 1), (B j).coeff k := by + symm + apply Finset.sum_subset (Finset.range_mono (Nat.succ_le_succ hk)) + intro j hjd hjk + have hkj : k < j := by + simp only [Finset.mem_range, not_lt] at hjk + lia + simp only [B, coeff_C_mul, coeff_X_pow_mul', + ite_eq_right (Nat.not_le.mpr hkj), mul_zero] + _ = ∑ j ∈ Finset.range (k + 1), + (d.choose k : ℝ) * + ((k.choose j : ℝ) * gamma j * (-1 : ℝ) ^ (k - j) * + (ascPochhammer ℝ (d - (k - j))).eval + (alpha + (k - j : ℕ) + 1)) := by + apply Finset.sum_congr rfl + intro j hj + have hjk : j ≤ k := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) + have hsub : k - j ≤ d - j := by lia + have hlength : d - j - (k - j) = d - k := by lia + simp only [B, coeff_C_mul, coeff_X_pow_mul', ite_eq_left hjk, + coeff_comp_neg_X, coeff_generalizedLaguerre, ite_eq_left hsub, hlength] + calc + _ = ((d.descFactorial j : ℝ) * Ring.choose ((d : ℝ) + alpha) j * + ((d - j).choose (k - j) : ℝ) * + (ascPochhammer ℝ (d - k)).eval (alpha + (k - j : ℕ) + 1)) * + gamma j * (-1 : ℝ) ^ (k - j) := by ring + _ = _ := by + rw [laguerre_classical_coefficient_factor d k j hjk hk alpha] + ring + · rw [coeff_laguerreJensenPolynomial, ite_eq_right hk] + symm + apply Finset.sum_eq_zero + intro j hj + have hjd : j ≤ d := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) + have hdk : d < k := Nat.lt_of_not_ge hk + have hjk : j ≤ k := by lia + have hsub : ¬ k - j ≤ d - j := by lia + simp only [B, coeff_C_mul, coeff_X_pow_mul', ite_eq_left hjk, + coeff_comp_neg_X, coeff_generalizedLaguerre, ite_eq_right hsub, + zero_mul, mul_zero] + +/-- Written with the standard Laguerre normalization, the polynomial is d! Q. +Here `C (m!⁻¹) * (generalizedLaguerre m alpha).comp (-X)` denotes L_m^alpha(X). -/ +theorem laguerreJensenPolynomial_eq_factorial_mul + (d : ℕ) (gamma : ℕ → ℝ) (alpha : ℝ) : + laguerreJensenPolynomial d gamma alpha = + C (d.factorial : ℝ) * + ∑ j ∈ Finset.range (d + 1), + C (Ring.choose ((d : ℝ) + alpha) j * gamma j) * + (X ^ j * (C (((d - j).factorial : ℝ)⁻¹) * + (generalizedLaguerre (d - j) alpha).comp (-X))) := by + rw [laguerreJensenPolynomial_eq_laguerre_sum, Finset.mul_sum] + apply Finset.sum_congr rfl + intro j hj + have hjd : j ≤ d := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) + have hf : (((d - j).factorial : ℕ) : ℝ) ≠ 0 := by positivity + have hfac := congrArg (fun n : ℕ => (n : ℝ)) (Nat.factorial_mul_descFactorial hjd) + push_cast at hfac + have hdesc : (d.descFactorial j : ℝ) = + (d.factorial : ℝ) * (((d - j).factorial : ℝ)⁻¹) := by + field_simp [hf] + nlinarith [hfac] + rw [hdesc] + simp only [map_mul] + ring + +end + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenLaguerreLimit.lean b/RealRooted/MultiplierSequence/JensenLaguerreLimit.lean new file mode 100644 index 000000000..3fd7ddb91 --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenLaguerreLimit.lean @@ -0,0 +1,103 @@ +module + +public import RealRooted.MultiplierSequence.JensenLaguerre +import Mathlib.Topology.Algebra.Order.Polynomial +import RealRooted.Mathlib.Analysis.Complex.Polynomial.ClosedRoots.Real +import RealRooted.PFPolynomial.Closure + +/-! +# The Laguerre Jensen criterion + +Dividing the factorial-normalized Laguerre transform by the parameter to the +degree gives the original Jensen polynomial in the limit. Closedness of real +splitting proves the converse to finite Laguerre transfer. No sign or +nonvanishing hypothesis on the coefficient sequence is required. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted + +/-- Only the term with no degree loss survives normalization at infinity. -/ +private theorem tendsto_laguerrePochhammer_div_pow (d r : ℕ) (hr : r ≤ d) : + Tendsto (fun alpha : ℝ => + (ascPochhammer ℝ (d - r)).eval (alpha + r + 1) / alpha ^ d) + atTop (𝓝 (if r = 0 then 1 else 0)) := by + let p : ℝ[X] := (ascPochhammer ℝ (d - r)).comp (X + C ((r : ℝ) + 1)) + have hp : p.Monic := (monic_ascPochhammer (S := ℝ) (d - r)).comp + (monic_X_add_C _) (by rw [natDegree_X_add_C]; exact one_ne_zero) + have hdeg : p.natDegree = d - r := by + simp only [p, natDegree_comp, ascPochhammer_natDegree, natDegree_X_add_C, mul_one] + by_cases hr0 : r = 0 + · subst r + have hlim := p.tendsTo_atTop_div_nhds_leadingCoeff + simp only [hdeg, Nat.sub_zero, hp.leadingCoeff] at hlim + simpa [p, eval_comp, add_assoc] using hlim + · have hlt : p.degree < (X ^ d : ℝ[X]).degree := by + rw [degree_eq_natDegree hp.ne_zero, hdeg, degree_X_pow] + exact_mod_cast (Nat.sub_lt (by lia) (Nat.pos_of_ne_zero hr0)) + simpa [p, hr0, eval_comp, add_assoc] using + Polynomial.div_tendsto_atTop_zero_of_degree_lt hlt + +/-- The normalized Laguerre coefficients converge to the Jensen coefficients +as the Laguerre parameter tends to positive infinity. -/ +theorem tendsto_coeff_laguerreJensenPolynomial_div (d k : ℕ) (gamma : ℕ → ℝ) : + Tendsto (fun alpha : ℝ => + (laguerreJensenPolynomial d gamma alpha).coeff k / alpha ^ d) + atTop (𝓝 ((jensenPolynomial d gamma).coeff k)) := by + by_cases hk : k ≤ d + · have hsum := tendsto_finsetSum (Finset.range (k + 1)) (fun r hr => + (tendsto_laguerrePochhammer_div_pow d r + ((Nat.lt_succ_iff.mp (Finset.mem_range.mp hr)).trans hk)).const_mul + ((k.choose r : ℝ) * (-1 : ℝ) ^ r * gamma (k - r))) + simpa [coeff_laguerreJensenPolynomial, coeff_jensenPolynomial, hk, + mul_div_assoc, Finset.sum_div] using hsum.const_mul (d.choose k : ℝ) + · simp only [coeff_laguerreJensenPolynomial, coeff_jensenPolynomial, ite_eq_right hk, + zero_div] + exact tendsto_const_nhds + +/-- It is enough to test the Laguerre family at nonnegative integer parameters +to recover splitting of the original Jensen polynomial. -/ +theorem jensenPolynomial_splits_of_laguerreJensenPolynomial + {d : ℕ} {gamma : ℕ → ℝ} + (h : ∀ n : ℕ, (laguerreJensenPolynomial d gamma n).Splits) : + (jensenPolynomial d gamma).Splits := by + let q : ℕ → ℝ[X] := fun n => + C (((n : ℝ) ^ d)⁻¹) * laguerreJensenPolynomial d gamma n + have hdeg (n : ℕ) : (q n).natDegree ≤ d := + (natDegree_C_mul_le _ _).trans (natDegree_laguerreJensenPolynomial_le d gamma n) + have hsplit (n : ℕ) : q n = 0 ∨ (q n).Splits := .inr ((h n).C_mul _) + have hcoeff (k : ℕ) : Tendsto (fun n => (q n).coeff k) atTop + (𝓝 ((jensenPolynomial d gamma).coeff k)) := by + simpa [q, coeff_C_mul, div_eq_mul_inv, mul_comm, Function.comp_def] using + (tendsto_coeff_laguerreJensenPolynomial_div d k gamma).comp + tendsto_natCast_atTop_atTop + have heval (z : ℂ) : Tendsto (fun n => ((q n).map Complex.ofRealHom).eval z) + atTop (𝓝 (((jensenPolynomial d gamma).map Complex.ofRealHom).eval z)) := by + refine Polynomial.tendsto_eval_of_coeff_tendsto_of_natDegree_le + (N := d) (fun n => by simpa using hdeg n) + (by simpa using natDegree_jensenPolynomial_le d gamma) ?_ z + intro k + simpa [Function.comp_def] using (Complex.continuous_ofReal.tendsto _).comp (hcoeff k) + rcases Polynomial.eq_zero_or_splits_of_tendsto_eval_of_natDegree_le + hdeg hsplit heval with hzero | hreal + · rw [hzero] + exact Splits.zero + · exact hreal + +/-- A finite Jensen polynomial splits exactly when all its Laguerre transforms +split throughout the extended parameter range. -/ +theorem jensenPolynomial_splits_iff_laguerreJensenPolynomial + (d : ℕ) (gamma : ℕ → ℝ) : + (jensenPolynomial d gamma).Splits ↔ + ∀ alpha : ℝ, -2 ≤ alpha → (laguerreJensenPolynomial d gamma alpha).Splits := by + constructor + · intro h alpha halpha + exact laguerreJensenPolynomial_splits h halpha + · intro h + exact jensenPolynomial_splits_of_laguerreJensenPolynomial + (fun n => h n (le_trans (by norm_num) (Nat.cast_nonneg n))) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenLimit.lean b/RealRooted/MultiplierSequence/JensenLimit.lean new file mode 100644 index 000000000..b06d223d2 --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenLimit.lean @@ -0,0 +1,38 @@ +module + +public import RealRooted.MultiplierSequence +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import RealRooted.Mathlib.Analysis.Complex.Polynomial.ClosedRoots.Real + +/-! +# Coefficientwise limits of splitting Jensen polynomials +-/ + +public section + +open Polynomial Complex Filter Topology + +namespace RealRooted + +/-- Splitting of a fixed-degree Jensen polynomial is closed under pointwise +limits of its defining real sequence. -/ +theorem jensenPolynomial_splits_of_tendsto {a : ℕ → ℕ → ℝ} {b : ℕ → ℝ} + (d : ℕ) (ha : ∀ n, (jensenPolynomial d (a n)).Splits) + (hlim : ∀ k, Tendsto (fun n => a n k) atTop (𝓝 (b k))) : + (jensenPolynomial d b).Splits := by + have heval (z : ℂ) : + Tendsto (fun n => ((jensenPolynomial d (a n)).map ofRealHom).eval z) atTop + (𝓝 (((jensenPolynomial d b).map ofRealHom).eval z)) := by + simp only [jensenPolynomial, Polynomial.map_sum, Polynomial.map_monomial, + Polynomial.eval_finsetSum, Polynomial.eval_monomial, ofRealHom_eq_coe, + ofReal_mul, ofReal_natCast] + exact tendsto_finsetSum _ fun k _ => + (tendsto_const_nhds.mul (hlim k).ofReal).mul_const (z ^ k) + rcases Polynomial.eq_zero_or_splits_of_tendsto_eval_of_natDegree_le + (N := d) (fun n => natDegree_jensenPolynomial_le d (a n)) + (fun n => Or.inr (ha n)) heval with hz | hs + · rw [hz] + exact Splits.zero + · exact hs + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenPositiveInterlacing.lean b/RealRooted/MultiplierSequence/JensenPositiveInterlacing.lean new file mode 100644 index 000000000..d59708649 --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenPositiveInterlacing.lean @@ -0,0 +1,63 @@ +module + +public import RealRooted.MultiplierSequence.Infinite +public import RealRooted.SimpleRoots +import RealRooted.MultiplierSequence.JensenSeparation +import RealRooted.MultiplierSequence.JensenDerivative +import RealRooted.MultiplierSequence.ProperPosition +import RealRooted.LinearPowerFamily + +/-! +# Consecutive Jensen interlacing for positive multiplier sequences + +Strictly positive multiplier coefficients give adjacent Jensen rows with +exact degrees and directed interlacing. This is a sufficient sign hypothesis +for the interlacing consequence of same-sign root separation. Signs of the +zeros of an arbitrary LP symbol alone are not sufficient when Gaussian +factors are allowed. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Positive multiplier sequences give directed interlacing of consecutive +Jensen degrees with no coefficient shift. -/ +theorem strictInterl_jensenPolynomial_succ_of_pos {gamma : ℕ → ℝ} + (hgamma : IsMultiplierSequence gamma) (hpos : ∀ k, 0 < gamma k) (d : ℕ) : + StrictInterl (jensenPolynomial d gamma) (jensenPolynomial (d + 1) gamma) := by + have hpower : StrictInterl ((X + 1 : ℝ[X]) ^ d) ((X + 1) ^ (d + 1)) := by + simpa only [C_1] using strictInterl_X_add_C_pow_succ 1 d + rw [jensenPolynomial_eq_diagonalOperator_X_add_one_pow, + jensenPolynomial_eq_diagonalOperator_X_add_one_pow] + exact hgamma.strictInterl_diagonalOperator_of_pos hpos hpower + +/-- Positive multiplier coefficients make consecutive Jensen degrees differ +by one, so the directed relation is ordinary root-list interlacing. -/ +theorem interlaces_jensenPolynomial_succ_of_pos {gamma : ℕ → ℝ} + (hgamma : IsMultiplierSequence gamma) (hpos : ∀ k, 0 < gamma k) (d : ℕ) : + Interlaces (jensenPolynomial d gamma) (jensenPolynomial (d + 1) gamma) := by + apply (strictInterl_jensenPolynomial_succ_of_pos hgamma hpos d).toInterlaces + rw [natDegree_jensenPolynomial (hpos d).ne', natDegree_jensenPolynomial (hpos (d + 1)).ne'] + +/-- A simple Jensen row with nonzero initial coefficient has no real root +in common with the preceding unshifted row. -/ +theorem jensenPolynomial_succ_no_common_root {gamma : ℕ → ℝ} (hzero : gamma 0 ≠ 0) + (d : ℕ) (hsimple : HasSimpleRoots (jensenPolynomial (d + 1) gamma)) (r : ℝ) : + ¬ ((jensenPolynomial d gamma).IsRoot r ∧ (jensenPolynomial (d + 1) gamma).IsRoot r) := by + intro hr + have hr0 : r ≠ 0 := by + intro hz + subst r + apply hzero + simpa only [IsRoot.def, ← coeff_zero_eq_eval_zero, coeff_jensenPolynomial, + Nat.zero_le, ite_true, Nat.choose_zero_right, Nat.cast_one, one_mul] using hr.2 + have heuler := congrArg (fun p : ℝ[X] => p.eval r) (jensenPolynomial_euler d gamma) + simp only [eval_mul, eval_C, eval_add, eval_X, hr.1.eq_zero, hr.2.eq_zero, + mul_zero, zero_add] at heuler + exact hsimple.eval_derivative_ne_zero hr.2 + ((mul_eq_zero.mp heuler.symm).resolve_left hr0) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenProduct.lean b/RealRooted/MultiplierSequence/JensenProduct.lean new file mode 100644 index 000000000..9d99f622a --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenProduct.lean @@ -0,0 +1,68 @@ +module + +public import RealRooted.MultiplierSequence +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.CStarAlgebra.Classes +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Jensen polynomials of products + +The binomial convolution of two exponential Taylor sequences is the Taylor +sequence of their product. This defines the Jensen family used in the general +auxiliary-function criterion, without assuming either sequence is nonzero. +-/ + +@[expose] public section + +open Polynomial Complex + +namespace RealRooted + +/-- Binomial convolution, the coefficient rule for exponential generating functions. -/ +noncomputable def binomialConvolution (gamma delta : ℕ → ℝ) (n : ℕ) : ℝ := + ∑ k ∈ Finset.range (n + 1), (n.choose k : ℝ) * gamma k * delta (n - k) + +/-- Jensen polynomials associated with the product of exponential generating functions. -/ +noncomputable def jensenProductPolynomial (d : ℕ) (gamma delta : ℕ → ℝ) : ℝ[X] := + jensenPolynomial d (binomialConvolution gamma delta) + +/-- The constant binomial-convolution coefficient is the product of constants. -/ +@[simp] theorem binomialConvolution_zero (gamma delta : ℕ → ℝ) : + binomialConvolution gamma delta 0 = gamma 0 * delta 0 := by + simp [binomialConvolution] + +/-- Binomial convolution is symmetric in its two coefficient sequences. -/ +theorem binomialConvolution_comm (gamma delta : ℕ → ℝ) (n : ℕ) : + binomialConvolution gamma delta n = binomialConvolution delta gamma n := by + unfold binomialConvolution + rw [← Finset.sum_range_reflect + (fun k => (n.choose k : ℝ) * gamma k * delta (n - k)) (n + 1)] + apply Finset.sum_congr rfl + intro k hk + have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) + simp only [Nat.add_sub_cancel, Nat.sub_sub_self hkn, Nat.choose_symm hkn] + ring + +/-- Jensen product coefficients in binomial normalization. -/ +@[simp] theorem coeff_jensenProductPolynomial (d : ℕ) (gamma delta : ℕ → ℝ) (k : ℕ) : + (jensenProductPolynomial d gamma delta).coeff k = + if k ≤ d then (d.choose k : ℝ) * binomialConvolution gamma delta k else 0 := + coeff_jensenPolynomial d _ k + +/-- A Jensen product polynomial has degree at most its index. -/ +theorem natDegree_jensenProductPolynomial_le (d : ℕ) (gamma delta : ℕ → ℝ) : + (jensenProductPolynomial d gamma delta).natDegree ≤ d := + natDegree_jensenPolynomial_le d _ + +/-- Leibniz's rule identifies binomial convolution with the Taylor data of a product. -/ +theorem iteratedDeriv_mul_eq_binomialConvolution {f g : ℂ → ℂ} + {gamma delta : ℕ → ℝ} (hf : Differentiable ℂ f) (hg : Differentiable ℂ g) + (hgamma : ∀ k, iteratedDeriv k f 0 = (gamma k : ℂ)) + (hdelta : ∀ k, iteratedDeriv k g 0 = (delta k : ℂ)) (n : ℕ) : + iteratedDeriv n (f * g) 0 = (binomialConvolution gamma delta n : ℂ) := by + rw [iteratedDeriv_mul (hf.contDiff.contDiffAt) (hg.contDiff.contDiffAt)] + simp [binomialConvolution, hgamma, hdelta] + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenProductExpansion.lean b/RealRooted/MultiplierSequence/JensenProductExpansion.lean new file mode 100644 index 000000000..e110266b9 --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenProductExpansion.lean @@ -0,0 +1,86 @@ +module + +public import RealRooted.MultiplierSequence.JensenProduct +import RealRooted.Mathlib.Algebra.Polynomial.Reverse +import RealRooted.Mathlib.Algebra.Polynomial.Chow + +/-! +# Ordinary and reciprocal Jensen product expansions + +The binomial convolution of Taylor sequences has an expansion in the Jensen +polynomials of either factor. Reflection gives the reciprocal expansion in +O'Sullivan, *Zeros of Jensen polynomials and asymptotics for the Riemann xi +function*, Proposition 3.4, https://arxiv.org/abs/2007.13582. +These finite identities require no analyticity or nonvanishing assumptions. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- The ordinary Jensen product expanded in the Jensen polynomials of the +second sequence. -/ +theorem jensenProductPolynomial_eq_sum (d : ℕ) (gamma delta : ℕ → ℝ) : + jensenProductPolynomial d gamma delta = + ∑ j ∈ Finset.range (d + 1), C ((d.choose j : ℝ) * gamma j) * + (X ^ j * jensenPolynomial (d - j) delta) := by + let B (j : ℕ) : ℝ[X] := C ((d.choose j : ℝ) * gamma j) * + (X ^ j * jensenPolynomial (d - j) delta) + ext k + change (jensenProductPolynomial d gamma delta).coeff k = + (∑ j ∈ Finset.range (d + 1), B j).coeff k + rw [finsetSum_coeff] + by_cases hk : k ≤ d + · rw [coeff_jensenProductPolynomial, ite_eq_left hk, binomialConvolution, Finset.mul_sum] + symm + calc + ∑ j ∈ Finset.range (d + 1), (B j).coeff k = + ∑ j ∈ Finset.range (k + 1), (B j).coeff k := by + symm + apply Finset.sum_subset (Finset.range_mono (Nat.succ_le_succ hk)) + intro j hjd hjk + have hkj : k < j := by + simp only [Finset.mem_range, not_lt] at hjk + lia + simp only [B, coeff_C_mul, coeff_X_pow_mul', + ite_eq_right (Nat.not_le.mpr hkj), mul_zero] + _ = ∑ j ∈ Finset.range (k + 1), + (d.choose k : ℝ) * ((k.choose j : ℝ) * gamma j * delta (k - j)) := by + apply Finset.sum_congr rfl + intro j hj + have hjk : j ≤ k := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) + have hsub : k - j ≤ d - j := Nat.sub_le_sub_right hk j + simp only [B, coeff_C_mul, coeff_X_pow_mul', ite_eq_left hjk, + coeff_jensenPolynomial, ite_eq_left hsub] + have hchoose : (d.choose j : ℝ) * ((d - j).choose (k - j) : ℝ) = + (d.choose k : ℝ) * (k.choose j : ℝ) := by + exact_mod_cast (Nat.choose_mul (n := d) (k := k) (s := j) hjk).symm + linear_combination gamma j * delta (k - j) * hchoose + · rw [coeff_jensenProductPolynomial, ite_eq_right hk] + symm + apply Finset.sum_eq_zero + intro j hj + have hjd : j ≤ d := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) + have hjk : j ≤ k := by lia + have hsub : ¬ k - j ≤ d - j := by lia + simp only [B, coeff_C_mul, coeff_X_pow_mul', ite_eq_left hjk, + coeff_jensenPolynomial, ite_eq_right hsub, mul_zero] + +/-- The reciprocal Jensen product expanded in reciprocal Jensen polynomials +of the second sequence. Degree loss and zero polynomials are included. -/ +theorem reflect_jensenProductPolynomial_eq_sum (d : ℕ) (gamma delta : ℕ → ℝ) : + reflect d (jensenProductPolynomial d gamma delta) = + ∑ j ∈ Finset.range (d + 1), C ((d.choose j : ℝ) * gamma j) * + reflect (d - j) (jensenPolynomial (d - j) delta) := by + rw [jensenProductPolynomial_eq_sum, reflect_finset_sum_C_mul] + apply Finset.sum_congr rfl + intro j hj + congr 1 + have hjd : j ≤ d := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) + simpa only [Nat.sub_add_cancel hjd] using + reflect_X_pow_mul (jensenPolynomial (d - j) delta) j + (natDegree_jensenPolynomial_le (d - j) delta) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/JensenSeparation.lean b/RealRooted/MultiplierSequence/JensenSeparation.lean new file mode 100644 index 000000000..82f8e442a --- /dev/null +++ b/RealRooted/MultiplierSequence/JensenSeparation.lean @@ -0,0 +1,84 @@ +module + +public import RealRooted.MultiplierSequence +import RealRooted.Mathlib.Algebra.Polynomial.Derivative + +/-! +# Same-sign separation of consecutive Jensen polynomials + +The Euler identity relates adjacent degree parameters with no shift in the +coefficient sequence. Rolle's theorem applied to `Jₙ(x)/xⁿ` shows that any +two same-sign real zeros of `Jₙ` enclose a zero of `Jₙ₋₁`. This needs no +Laguerre–Pólya or real-rootedness assumption. +-/ + +public section + +open Polynomial Set + +namespace RealRooted + +/-- The binomial coefficient already vanishes outside the Jensen degree bound. -/ +private theorem coeff_jensen_eq_choose (d k : ℕ) (gamma : ℕ → ℝ) : + (jensenPolynomial d gamma).coeff k = (d.choose k : ℝ) * gamma k := by + by_cases hk : k ≤ d + · simp [coeff_jensenPolynomial, hk] + · simp [coeff_jensenPolynomial, hk, Nat.choose_eq_zero_of_lt (lt_of_not_ge hk)] + +/-- Adjacent unshifted Jensen polynomials satisfy the Euler derivative identity. -/ +theorem jensenPolynomial_euler (d : ℕ) (gamma : ℕ → ℝ) : + C (d + 1 : ℝ) * jensenPolynomial (d + 1) gamma = + C (d + 1 : ℝ) * jensenPolynomial d gamma + + X * (jensenPolynomial (d + 1) gamma).derivative := by + ext k + simp only [coeff_C_mul, coeff_add, coeff_X_mul_derivative, coeff_jensen_eq_choose] + by_cases hk : k ≤ d + 1 + · have hc := congrArg (fun n : ℕ => (n : ℝ)) (Nat.choose_mul_succ_eq d k) + push_cast [Nat.cast_sub hk] at hc + linear_combination -gamma k * hc + · rw [Nat.choose_eq_zero_of_lt (by lia : d + 1 < k), + Nat.choose_eq_zero_of_lt (by lia : d < k)] + simp + +/-- The closed interval between two numbers of the same sign avoids zero. -/ +private theorem ne_zero_on_same_sign_interval {s t x : ℝ} + (hsign : 0 < s * t) (hx : x ∈ Icc s t) : x ≠ 0 := by + rcases mul_pos_iff.mp hsign with hpos | hneg + · linarith [hx.1, hpos.1] + · linarith [hx.2, hneg.2] + +/-- Any two same-sign roots of a Jensen polynomial enclose a root of the +preceding unshifted Jensen polynomial. They need not be consecutive or simple. -/ +theorem jensenPolynomial_same_sign_separation (d : ℕ) (gamma : ℕ → ℝ) + {s t : ℝ} (hst : s < t) (hsign : 0 < s * t) + (hs : (jensenPolynomial (d + 1) gamma).IsRoot s) + (ht : (jensenPolynomial (d + 1) gamma).IsRoot t) : + ∃ x ∈ Ioo s t, (jensenPolynomial d gamma).IsRoot x := by + let p := jensenPolynomial (d + 1) gamma + have hne (x : ℝ) (hx : x ∈ Icc s t) : x ≠ 0 := + ne_zero_on_same_sign_interval hsign hx + have hc : ContinuousOn (fun x => p.eval x / x ^ (d + 1)) (Icc s t) := + p.continuous.continuousOn.div (continuous_id.pow _).continuousOn + (fun x hx => pow_ne_zero _ (hne x hx)) + have he : p.eval s / s ^ (d + 1) = p.eval t / t ^ (d + 1) := by + rw [hs.eq_zero, ht.eq_zero, zero_div, zero_div] + obtain ⟨x, hx, hd⟩ := exists_hasDerivAt_eq_zero hst hc he + (fun x hx => (p.hasDerivAt x).div ((hasDerivAt_id x).pow (d + 1)) + (pow_ne_zero _ (hne x ⟨hx.1.le, hx.2.le⟩))) + have hx0 : x ≠ 0 := hne x ⟨hx.1.le, hx.2.le⟩ + have hnum : p.derivative.eval x * x ^ (d + 1) - + p.eval x * ((d + 1 : ℝ) * x ^ d) = 0 := by + simpa [pow_ne_zero _ hx0] using hd + have hmul : x ^ d * (x * p.derivative.eval x - (d + 1 : ℝ) * p.eval x) = 0 := by + rw [pow_succ] at hnum + linear_combination hnum + have hcore := (mul_eq_zero.mp hmul).resolve_left (pow_ne_zero _ hx0) + have heuler := congrArg (fun q : ℝ[X] => q.eval x) (jensenPolynomial_euler d gamma) + simp only [eval_mul, eval_C, eval_add, eval_X] at heuler + have hprev : (d + 1 : ℝ) * (jensenPolynomial d gamma).eval x = 0 := by + change (d + 1 : ℝ) * p.eval x = + (d + 1 : ℝ) * (jensenPolynomial d gamma).eval x + x * p.derivative.eval x at heuler + linear_combination -heuler - hcore + exact ⟨x, hx, (mul_eq_zero.mp hprev).resolve_left (by positivity)⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PochhammerConvolution.lean b/RealRooted/MultiplierSequence/PochhammerConvolution.lean new file mode 100644 index 000000000..1b4d25b3b --- /dev/null +++ b/RealRooted/MultiplierSequence/PochhammerConvolution.lean @@ -0,0 +1,38 @@ +module + +public import RealRooted.MultiplierSequence.Infinite +public import Mathlib.RingTheory.Polynomial.Pochhammer +import RealRooted.Mathlib.RingTheory.Polynomial.Pochhammer.ReciprocalConvolution +import RealRooted.MultiplierSequence.BinomialConvolution +import RealRooted.MultiplierSequence.InvPochhammer + +/-! +# Positive reciprocal-Pochhammer convolution + +The convolution of two reciprocal rising-factorial multiplier sequences has +an exact finite-product formula. This is the Gamma-free normalization of +Craven--Csordas (2006), Lemma 3.12 and Theorem 3.14. It includes the removable +singularity when the parameter sum is one and the index is zero. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- The canceled reciprocal-Pochhammer convolution is a PF multiplier +sequence for all positive parameters, including their sum equal to one. -/ +theorem isPFMultiplierSequence_pochhammerConvolution {a b : ℝ} + (ha : 0 < a) (hb : 0 < b) : + IsPFMultiplierSequence (fun n => + (ascPochhammer ℝ n).eval (a + b + n - 1) / + ((ascPochhammer ℝ n).eval a * (ascPochhammer ℝ n).eval b)) := by + have h := (isPFMultiplierSequence_inv_ascPochhammer ha).binomialConvolution + (isPFMultiplierSequence_inv_ascPochhammer hb) + convert h using 1 + ext n + exact (sum_choose_mul_inv_ascPochhammer n + (ascPochhammer_pos n a ha).ne' (ascPochhammer_pos n b hb).ne').symm + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/GeometricGrowth.lean b/RealRooted/MultiplierSequence/PolyaSchur/GeometricGrowth.lean new file mode 100644 index 000000000..1a3bbf903 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/GeometricGrowth.lean @@ -0,0 +1,52 @@ +module + +public import RealRooted.MultiplierSequence.Infinite +import RealRooted.MultiplierSequence.PolyaSchur.Growth +import RealRooted.MultiplierSequence.PolyaSchur + +/-! +# Geometric growth of PF multiplier sequences + +The usual geometric estimate at a positive zeroth coefficient extends across +an arbitrary finite zero prefix by increasing the geometric ratio. The zero +sequence is included. +-/ + +public section + +namespace RealRooted + +/-- Every PF multiplier sequence admits a global geometric bound, including +sequences with a zero prefix and the identically zero sequence. -/ +theorem IsPFMultiplierSequence.exists_geometric_bound {γ : ℕ → ℝ} + (hγ : IsPFMultiplierSequence γ) : + ∃ C ≥ 0, ∃ A ≥ 0, ∀ n, γ n ≤ C * A ^ n := by + by_cases hz : γ = 0 + · exact ⟨0, le_rfl, 1, zero_le_one, by simp [hz]⟩ + obtain ⟨m, hm⟩ : ∃ m, γ m ≠ 0 := by + by_contra h + push Not at h + exact hz (funext h) + let s := Nat.find (show ∃ m, γ m ≠ 0 from ⟨m, hm⟩) + have hs : γ s ≠ 0 := Nat.find_spec (show ∃ m, γ m ≠ 0 from ⟨m, hm⟩) + have hpos : 0 < γ s := (hγ.nonneg s).lt_of_ne' hs + let r := γ (1 + s) / γ s + have hr : 0 ≤ r := div_nonneg (hγ.nonneg _) hpos.le + refine ⟨γ s, hpos.le, r + 1, by linarith, ?_⟩ + intro n + by_cases hsn : s ≤ n + · have htail := (hγ.shift s).coeff_le_geometric_of_coeff_zero_pos + (by simpa using hpos) (n - s) + have hbound : γ n ≤ γ s * r ^ (n - s) := by + simpa only [zero_add, Nat.sub_add_cancel hsn] using htail + apply hbound.trans + apply mul_le_mul_of_nonneg_left _ hpos.le + exact (pow_le_pow_left₀ hr (by linarith : r ≤ r + 1) _).trans + (pow_le_pow_right₀ (by linarith : 1 ≤ r + 1) (Nat.sub_le n s)) + · have hn : γ n = 0 := by + by_contra hn + exact hsn (Nat.find_min' (show ∃ m, γ m ≠ 0 from ⟨m, hm⟩) hn) + rw [hn] + positivity + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AppellMoments.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AppellMoments.lean new file mode 100644 index 000000000..f4bec3f5e --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AppellMoments.lean @@ -0,0 +1,151 @@ +module + +public import RealRooted.BasisTransform.LimitingAppellMoments +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlow +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.CompPowCoefficient + +/-! +# Hankel positivity of logarithmic coefficients of Type-I entire functions + +The normalized ordinary Taylor coefficients give real-rooted limiting Appell +rows through the substitution `f(-z²)`. Newton sums of these rows yield positive +semidefinite Hankel matrices of the signed logarithmic coefficients, including +both matrices in the Stieltjes moment criterion. + +These are the Hankel positivity consequences of the forward direction of +A. D. Sokal, *When does a hypergeometric function pFq belong to the +Laguerre–Pólya class LP+?*, Proposition 6, +https://doi.org/10.1016/j.jmaa.2022.126432. A representing measure and the converse +criterion require additional arguments. +-/ + +public section + +open Polynomial Finset Complex + +namespace RealRooted + +private theorem taylor_comp_neg_sq (f : ℂ → ℂ) (hf : Differentiable ℂ f) (k : ℕ) : + (iteratedDeriv k (fun z => f (-z ^ 2)) 0 / k.factorial).re = + if 2 ∣ k then (-1 : ℝ) ^ (k / 2) * + ((iteratedDeriv (k / 2) f 0).re / (k / 2).factorial) else 0 := by + have ha : AnalyticAt ℂ (fun z => f (-z)) 0 := + (hf.comp (by fun_prop : Differentiable ℂ (fun z : ℂ => -z))).analyticAt 0 + have h := iteratedDeriv_comp_pow_zero_eq ha (by norm_num : 0 < 2) k + change iteratedDeriv k (fun z => f (-(z ^ 2))) 0 = _ at h + rw [h, iteratedDeriv_comp_neg] + have hk : (k.factorial : ℂ) ≠ 0 := Nat.cast_ne_zero.mpr k.factorial_ne_zero + by_cases hd : 2 ∣ k + · simp only [ite_eq_left hd, neg_zero, smul_eq_mul] + rw [mul_div_cancel_left₀ _ hk] + have hs : (-1 : ℂ) ^ (k / 2) = Complex.ofReal ((-1 : ℝ) ^ (k / 2)) := by simp + rw [hs] + simp only [mul_div_assoc, mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero, + div_natCast_re] + · simp [hd] + +private theorem sum_even_range {M : Type*} [AddCommMonoid M] + (F : ℕ → M) (N : ℕ) : + (∑ k ∈ range (N + 1), if 2 ∣ k then F k else 0) = + ∑ j ∈ range (N / 2 + 1), F (2 * j) := by + classical + rw [← sum_filter] + symm + apply sum_bij (fun j _ => 2 * j) + · intro j hj + simp only [mem_filter, mem_range] + have hj' := mem_range.mp hj + constructor + · lia + · exact dvd_mul_right 2 j + · intro a ha b hb hab + lia + · intro k hk + obtain ⟨hkr, hkd⟩ := mem_filter.mp hk + refine ⟨k / 2, mem_range.mpr ?_, ?_⟩ + · have hle := mem_range.mp hkr + lia + · exact Nat.mul_div_cancel' hkd + · intro j hj + rfl + +/-- The even square-substitution operator produces the limiting Appell row. -/ +theorem taylorDifferentialOperator_comp_neg_sq_X_pow + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (N : ℕ) : + taylorDifferentialOperator (fun z => f (-z ^ 2)) (X ^ N) = + limitingAppellPolynomial (fun j => (iteratedDeriv j f 0).re / j.factorial) N := by + rw [taylorDifferentialOperator, natDegree_X_pow] + simp only [taylor_comp_neg_sq f hf, apply_ite C, map_zero, ite_mul, zero_mul] + rw [sum_even_range] + ext k + rw [finsetSum_coeff, coeff_limitingAppellPolynomial] + apply sum_congr rfl + intro j hj + rw [Nat.mul_div_cancel_left j (by norm_num : 0 < 2), + iterate_derivative_X_pow_eq_C_mul] + simp only [← mul_assoc, ← C_mul] + rw [coeff_C_mul_X_pow] + split_ifs <;> simp_all + ring + +/-- Scalar multiplication of the coefficient sequence scales each Appell row. -/ +private theorem limitingAppellPolynomial_const_mul (c : ℝ) (d : ℕ → ℝ) (N : ℕ) : + limitingAppellPolynomial (fun j => c * d j) N = + C c * limitingAppellPolynomial d N := by + ext k + simp only [coeff_C_mul, coeff_limitingAppellPolynomial] + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro j hj + split_ifs <;> ring + +/-- Type-I entire functions give real-rooted limiting Appell rows. -/ +theorem IsLaguerrePolyaTypeI.splits_limitingAppellPolynomial + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (N : ℕ) : + (limitingAppellPolynomial + (fun j => (iteratedDeriv j f 0).re / j.factorial) N).Splits := by + have hg : IsLaguerrePolya (fun z => f (-z ^ 2)) := by + simpa using hf.isLaguerrePolya_comp_neg_mul_sq (by norm_num : (0 : ℝ) ≤ 1) + rw [← taylorDifferentialOperator_comp_neg_sq_X_pow hf.toLaguerrePolya.differentiable] + exact hg.taylorDifferentialOperator_splits ((Splits.X).pow N) + +/-- Normalizing the constant term preserves the splitting of the Appell rows. -/ +private theorem splits_normalized_limitingAppellPolynomial + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (N : ℕ) : + (limitingAppellPolynomial + (fun j => (iteratedDeriv j f 0).re / (j.factorial * (f 0).re)) N).Splits := by + have heq : (fun j => (iteratedDeriv j f 0).re / (j.factorial * (f 0).re)) = + fun j => (f 0).re⁻¹ * ((iteratedDeriv j f 0).re / j.factorial) := by + funext j + simp only [div_eq_mul_inv, mul_inv_rev] + ring + rw [heq, limitingAppellPolynomial_const_mul] + exact (Splits.C _).mul (hf.splits_limitingAppellPolynomial N) + +/-- Every shifted Hankel matrix of the normalized Newton moments is positive +semidefinite for a Type-I entire function with nonzero constant term. -/ +theorem IsLaguerrePolyaTypeI.posSemidef_limitingAppellMoment + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : (f 0).re ≠ 0) (n r : ℕ) : + Matrix.PosSemidef (fun i j : Fin n => + limitingAppellMoment + (fun k => (iteratedDeriv k f 0).re / (k.factorial * (f 0).re)) + (i.val + j.val + (r + 1))) := + RealRooted.posSemidef_limitingAppellMoment (by simp [h0]) + (splits_normalized_limitingAppellPolynomial hf) n r + +/-- Every shifted Hankel matrix of the normalized signed logarithmic +coefficients is positive semidefinite. -/ +theorem IsLaguerrePolyaTypeI.posSemidef_signed_coeff_logOf + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : (f 0).re ≠ 0) (n r : ℕ) : + Matrix.PosSemidef (fun i j : Fin n => + let k := i.val + j.val + (r + 1) + (-1 : ℝ) ^ (k + 1) * k * PowerSeries.coeff k (PowerSeries.logOf + (PowerSeries.mk + (fun j => (iteratedDeriv j f 0).re / (j.factorial * (f 0).re))))) := + posSemidef_signed_coeff_logOf_limitingAppell (by simp [h0]) + (splits_normalized_limitingAppellPolynomial hf) n r + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AtomicMomentSum.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AtomicMomentSum.lean new file mode 100644 index 000000000..3ff8d258f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AtomicMomentSum.lean @@ -0,0 +1,63 @@ +module + +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentResidues +import RealRooted.Mathlib.Analysis.Analytic.CountableZeros +import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.CountableSupport +import RealRooted.Mathlib.MeasureTheory.Measure.FiniteMomentStieltjes + +/-! +# Atomic moment sums at reciprocal zeros + +Analytic zero isolation makes the carrying set of the logarithmic-derivative +moment measure countable. Its transform is therefore the convergent sum of +the actual singleton masses, indexed without choosing an enumeration. +-/ + +public section + +open Complex MeasureTheory Set +open scoped ComplexConjugate NNReal + +namespace RealRooted + +/-- The zero slope together with the slopes reciprocal to the real zeros of a +nonzero entire function form a countable set. -/ +theorem countable_zero_or_reciprocal_zero {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hf0 : f 0 ≠ 0) : + {x : ℝ≥0 | x = 0 ∨ f ((-(x : ℝ)⁻¹ : ℝ) : ℂ) = 0}.Countable := by + have hne : f ≠ 0 := fun h ↦ hf0 (congrFun h 0) + have hi : Function.Injective (fun x : ℝ≥0 ↦ ((-(x : ℝ)⁻¹ : ℝ) : ℂ)) := by + intro x y h + exact NNReal.coe_injective + (inv_injective (neg_injective (Complex.ofReal_injective h))) + have hs := (hf.countable_zeroSet hne).preimage hi + convert hs.insert 0 using 1 + ext x + simp only [Set.mem_ofPred_eq, Set.mem_insert_iff, Set.mem_preimage] + +/-- The logarithmic derivative is the convergent atomic moment sum, with all +positive masses subsequently identified by +`measureReal_singleton_eq_mul_order_of_logDeriv_integral`. +The origin is included and contributes the constant exponential coefficient. -/ +theorem hasSum_logDeriv_singleton_masses + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) + {z : ℂ} (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) : + HasSum (fun a : ℝ≥0 ↦ (mu.real {a} : ℂ) / (1 + z * ((a : ℝ) : ℂ))) + (logDeriv f z) := by + have hslit : z ∈ slitPlane := mem_slitPlane_iff.mpr (Or.inr (ne_of_gt hz)) + have hs := hasSum_integral_of_ae_mem_countable_ambient + (countable_zero_or_reciprocal_zero hf hf0) + (ae_zero_or_reciprocal_zero_of_logDeriv_integral hf hc mu hlog) + (mu.integrable_inv_one_add_mul_of_mem_slitPlane hslit) + rw [← hlog z hz] at hs + simpa only [Complex.real_smul, div_eq_mul_inv] using hs + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryCriterion.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryCriterion.lean new file mode 100644 index 000000000..9c86a62d1 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryCriterion.lean @@ -0,0 +1,68 @@ +module + +public import Mathlib.RingTheory.SimpleRing.Principal +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOne +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryInequality +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusOne +import RealRooted.LaguerreInequalities.AuxiliaryRealZeros +import RealRooted.LaguerreInequalities.AuxiliaryZeroFactors +import RealRooted.Mathlib.Algebra.Polynomial.EvenCoefficients + +/-! +# Cardon's fixed-auxiliary Laguerre--Pólya criterion + +The same single auxiliary is used at every real center and every Taylor +index. Zero auxiliary roots are allowed. The growth hypothesis is exactly +genus one star; the real-zero consequence itself has no growth hypothesis. +-/ + +public section + +open Complex Polynomial +open scoped ComplexConjugate + +namespace RealRooted + +private theorem exists_nonreal_root_of_X_pow_mul {g q : ℝ[X]} {m : ℕ} + (hq : q.Monic) (hgq : g = X ^ m * q) + (ha : ∃ a ∈ (g.map ofRealHom).roots, a.im ≠ 0) : + ∃ a ∈ (q.map ofRealHom).roots, a.im ≠ 0 := by + obtain ⟨a, ha, him⟩ := ha + have ha0 : a ≠ 0 := fun h ↦ him (by simp [h]) + have hv : (g.map ofRealHom).eval a = 0 := isRoot_of_mem_roots ha + rw [hgq, Polynomial.map_mul, Polynomial.map_pow, map_X, eval_mul, eval_pow, eval_X] at hv + refine ⟨a, (mem_roots (hq.map ofRealHom).ne_zero).mpr ?_, him⟩ + exact (mul_eq_zero.mp hv).resolve_left (pow_ne_zero m ha0) + +/-- A fixed monic even auxiliary with a nonreal root detects all nonreal +zeros from its full family of inequalities. Zero auxiliary roots are allowed. -/ +theorem im_eq_zero_of_auxiliaryCoefficient_nonneg {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hc : ∀ z, f (conj z) = conj (f z)) (hne : f ≠ 0) + {g : ℝ[X]} (hg : g.Monic) (he : ∀ k, Odd k → g.coeff k = 0) + (ha : ∃ a ∈ (g.map ofRealHom).roots, a.im ≠ 0) + (h : ∀ x k, 0 ≤ auxiliaryCoefficient g f x k) {z : ℂ} (hz : f z = 0) : + z.im = 0 := by + obtain ⟨m, q, hm, hq, hq0, hqe, hgq⟩ := hg.exists_even_X_pow_mul he + have hroot := exists_nonreal_root_of_X_pow_mul hq hgq ha + have hqnonneg (x : ℝ) (k : ℕ) : 0 ≤ auxiliaryCoefficient q f x k := + auxiliaryCoefficient_nonneg_of_X_pow_mul hf hc hne hq hm + (by simpa only [hgq] using h) x k + exact im_eq_zero_of_auxiliary_nonneg_of_coeff_zero_ne_zero + hf hc hne hqe hq0 hroot hqnonneg hz + +/-- Cardon's Theorem 2.1: for a real genus-one-star entire function, any +fixed admissible auxiliary gives a complete Laguerre--Pólya criterion. -/ +theorem isLaguerrePolya_iff_auxiliaryCoefficient_nonneg {f : ℂ → ℂ} + (hf : HasGenusOneStar f) (hc : ∀ z, f (conj z) = conj (f z)) + {g : ℝ[X]} (hg : g.Monic) (he : ∀ k, Odd k → g.coeff k = 0) + (hgn : HasNonnegCoeffs g) (ha : ∃ a ∈ (g.map ofRealHom).roots, a.im ≠ 0) : + IsLaguerrePolya f ↔ ∀ x k, 0 ≤ auxiliaryCoefficient g f x k := by + constructor + · exact fun h x k ↦ h.auxiliaryCoefficient_nonneg hg he hgn x k + · intro h + exact isLaguerrePolya_of_hasGenusOneStar hf hc fun _ hz ↦ + im_eq_zero_of_auxiliaryCoefficient_nonneg hf.differentiable hc hf.ne_zero hg he ha h hz + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryInequality.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryInequality.lean new file mode 100644 index 000000000..44e0c2ae2 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryInequality.lean @@ -0,0 +1,51 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +import RealRooted.LaguerreInequalities.AuxiliaryGenerating +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Nonnegative auxiliary Taylor coefficients of Laguerre--Pólya functions + +This is the forward implication of Cardon's fixed-auxiliary criterion. +The auxiliary may have zero roots. No division by the entire function occurs. +-/ + +public section + +open Complex Filter Polynomial Topology + +namespace RealRooted + +/-- Every monic even auxiliary with nonnegative coefficients gives locally +uniform approximants with nonnegative coefficients. -/ +theorem IsLaguerrePolya.exists_nonneg_auxiliaryProduct_approx {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {g : ℝ[X]} (hg : g.Monic) + (he : ∀ k, Odd k → g.coeff k = 0) (hc : HasNonnegCoeffs g) (x : ℝ) : + ∃ p : ℕ → ℝ[X], (∀ i, HasNonnegCoeffs (p i)) ∧ + TendstoLocallyUniformly + (fun i z ↦ ((p i).map ofRealHom).eval z) (auxiliaryProduct g f x) atTop := by + have hcont := hf.differentiable.continuous + obtain ⟨p, hp, hlim⟩ := hf + have hs (i : ℕ) : (p i).Splits := (hp i).elim (fun h ↦ h ▸ Splits.zero) id + have hprod := tendstoLocallyUniformly_auxiliaryProduct hlim hcont g x + refine ⟨fun i ↦ auxiliaryGeneratingPolynomial g (p i) x, + fun i ↦ hasNonnegCoeffs_auxiliaryGeneratingPolynomial hg he hc (p i) x, ?_⟩ + convert hprod using 1 + ext i z + exact eval_auxiliaryGeneratingPolynomial hg (hs i) x z + +/-- Cardon's auxiliary inequalities hold for every Laguerre--Pólya function +and every monic even auxiliary with nonnegative coefficients. -/ +theorem IsLaguerrePolya.auxiliaryCoefficient_nonneg {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {g : ℝ[X]} (hg : g.Monic) + (he : ∀ k, Odd k → g.coeff k = 0) (hc : HasNonnegCoeffs g) (x : ℝ) (k : ℕ) : + 0 ≤ auxiliaryCoefficient g f x k := by + obtain ⟨p, hp, hlim⟩ := hf.exists_nonneg_auxiliaryProduct_approx hg he hc x + have hl := Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hlim k + simpa only [Complex.div_natCast_re, auxiliaryCoefficient] using + ge_of_tendsto hl (Eventually.of_forall fun i ↦ hp i k) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryPowers.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryPowers.lean new file mode 100644 index 000000000..7d38e6baa --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/AuxiliaryPowers.lean @@ -0,0 +1,109 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +public import Mathlib.Algebra.Polynomial.Expand +import RealRooted.LaguerreInequalities.PowerGenerating +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import RealRooted.PFPolynomial.Closure + +/-! +# Total positivity for higher-even auxiliary coefficients + +For the auxiliary `X^n + 1`, where `n` is positive and even, the coefficient +sequence indexed by multiples of `n` is PF for every Laguerre--Pólya function +at each real center. This is a derived strengthening of the coefficient +inequalities in Cardon's Example 2. It does not assert PF for the merely even +subsequence when `n > 2`. +-/ + +public section + +open Complex Filter Polynomial Topology + +namespace RealRooted + +/-- Higher-even auxiliary products are locally uniform limits of power +substitutions of PF polynomials. -/ +theorem IsLaguerrePolya.exists_pf_auxiliaryProduct_approx {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {n : ℕ} (hn : n ≠ 0) (he : Even n) (x : ℝ) : + ∃ p : ℕ → ℝ[X], (∀ i, IsPFPolynomial (p i)) ∧ + TendstoLocallyUniformly + (fun i z ↦ ((expand ℝ n (p i)).map ofRealHom).eval z) + (auxiliaryProduct (X ^ n + 1) f x) atTop := by + have hc := hf.differentiable.continuous + obtain ⟨p, hp, hlim⟩ := hf + have hs (i : ℕ) : (p i).Splits := (hp i).elim (fun h ↦ h ▸ Splits.zero) id + have hprod := tendstoLocallyUniformly_auxiliaryProduct hlim hc (X ^ n + 1) x + refine ⟨fun i ↦ powerGeneratingPolynomial n (p i) x, + fun i ↦ isPFPolynomial_powerGeneratingPolynomial he (p i) x, ?_⟩ + convert hprod using 1 + ext i z + simp only [expand_eq_comp_X_pow, Polynomial.map_comp, Polynomial.map_pow, map_X, + eval_comp, eval_pow, eval_X, eval_powerGeneratingPolynomial_pow hn (hs i)] + +/-- These are actual real Taylor coefficients, not merely bounds on the +real parts of possibly nonreal coefficients. -/ +theorem IsLaguerrePolya.auxiliaryCoefficient_ofReal {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {n : ℕ} (hn : n ≠ 0) (he : Even n) (x : ℝ) (k : ℕ) : + iteratedDeriv k (auxiliaryProduct (X ^ n + 1) f x) 0 / k.factorial = + (auxiliaryCoefficient (X ^ n + 1) f x k : ℂ) := by + obtain ⟨p, _, hlim⟩ := hf.exists_pf_auxiliaryProduct_approx hn he x + have hreal := Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hlim k + have hcomplex := Polynomial.tendsto_coeff_ofReal_of_tendstoLocallyUniformly hlim k + have hcast := (Complex.continuous_ofReal.tendsto _).comp hreal + simpa only [Function.comp_def, Complex.div_natCast_re, auxiliaryCoefficient] using + tendsto_nhds_unique hcomplex hcast + +/-- The higher-even auxiliary product has no coefficients outside the +multiples of its auxiliary degree. -/ +theorem IsLaguerrePolya.auxiliaryCoefficient_eq_zero {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {n : ℕ} (hn : n ≠ 0) (he : Even n) (x : ℝ) + {k : ℕ} (hk : ¬n ∣ k) : auxiliaryCoefficient (X ^ n + 1) f x k = 0 := by + obtain ⟨p, _, hlim⟩ := hf.exists_pf_auxiliaryProduct_approx hn he x + have hc := Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hlim k + have hz : (fun i ↦ (expand ℝ n (p i)).coeff k) = (fun _ : ℕ ↦ (0 : ℝ)) := by + funext i + simp only [coeff_expand (Nat.pos_of_ne_zero hn), ite_eq_right hk] + rw [hz] at hc + simpa only [Complex.div_natCast_re, auxiliaryCoefficient] using + tendsto_nhds_unique hc tendsto_const_nhds + +/-- The coefficients with index divisible by the even auxiliary degree are +coefficientwise limits of PF polynomials. -/ +theorem IsLaguerrePolya.exists_pf_auxiliaryCoefficient_approx {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {n : ℕ} (hn : n ≠ 0) (he : Even n) (x : ℝ) : + ∃ p : ℕ → ℝ[X], (∀ i, IsPFPolynomial (p i)) ∧ + ∀ k, Tendsto (fun i ↦ (p i).coeff k) atTop + (𝓝 (auxiliaryCoefficient (X ^ n + 1) f x (n * k))) := by + obtain ⟨p, hp, hlim⟩ := hf.exists_pf_auxiliaryProduct_approx hn he x + refine ⟨p, hp, fun k ↦ ?_⟩ + simpa only [coeff_expand_mul' (Nat.pos_of_ne_zero hn), Complex.div_natCast_re, + auxiliaryCoefficient] using + Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hlim (n * k) + +/-- The compressed higher-even auxiliary coefficient sequence is PF at +all real centers. This includes functions vanishing at the center. -/ +theorem IsLaguerrePolya.isPolyaFreqSeq_auxiliaryCoefficient {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {n : ℕ} (hn : n ≠ 0) (he : Even n) (x : ℝ) : + IsPolyaFreqSeq (fun k ↦ auxiliaryCoefficient (X ^ n + 1) f x (n * k)) := by + obtain ⟨p, hp, hlim⟩ := hf.exists_pf_auxiliaryCoefficient_approx hn he x + exact IsPolyaFreqSeq.of_tendsto (fun i ↦ (hp i).to_sequence) hlim + +/-- Every Taylor coefficient of a positive-even auxiliary product is +nonnegative, including indices not divisible by the auxiliary degree. -/ +theorem IsLaguerrePolya.auxiliaryCoefficient_power_nonneg {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {n : ℕ} (hn : n ≠ 0) (he : Even n) (x : ℝ) (k : ℕ) : + 0 ≤ auxiliaryCoefficient (X ^ n + 1) f x k := by + obtain ⟨p, hp, hlim⟩ := hf.exists_pf_auxiliaryProduct_approx hn he x + have hc := Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hlim k + have hbound (i : ℕ) : 0 ≤ (expand ℝ n (p i)).coeff k := by + rw [coeff_expand (Nat.pos_of_ne_zero hn)] + split_ifs + · exact (hp i).hasNonnegCoeffs _ + · exact le_rfl + simpa only [Complex.div_natCast_re, auxiliaryCoefficient] using + ge_of_tendsto hc (Eventually.of_forall hbound) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Bessel.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Bessel.lean new file mode 100644 index 000000000..f31faed45 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Bessel.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric +import RealRooted.MultiplierSequence.JensenBessel +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FormalJensen +import TauCeti.Analysis.SpecialFunctions.RegularizedHypergeometric +import Mathlib.Tactic.Ring + +/-! +# The regularized Bessel auxiliary in the Laguerre--Pólya class + +O'Sullivan's Section 3.3 auxiliary is the entire function +`regularizedHGFun 0 {alpha + 1} (-z)`. Its reciprocal-Gamma Taylor data +avoid the branch and zero-point issues in the square-root Bessel expression. +The full parameter range `alpha >= -2` follows from the checked Laguerre +splitting theorem and formal Jensen characterization. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- The reciprocal-Gamma exponential generating series equals the actual +regularized hypergeometric function at every complex argument and real parameter. -/ +theorem complexExpGeneratingFunction_inv_gamma_eq (alpha : ℝ) : + complexExpGeneratingFunction + (fun k ↦ (-1 : ℝ) ^ k * (Real.Gamma (alpha + k + 1))⁻¹) = + fun z ↦ regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} (-z) := by + rw [complexExpGeneratingFunction_eq_tsum] + funext z + rw [← (hasSum_regularizedHGFun (a := 0) (b := {((alpha + 1 : ℝ) : ℂ)}) + (by simp) (-z)).tsum_eq] + apply tsum_congr + intro k + rw [regularizedHGFunCoeff_zero_singleton] + have harg : ((alpha + 1 : ℝ) : ℂ) + (k : ℂ) = ((alpha + k + 1 : ℝ) : ℂ) := by + push_cast + ring + rw [harg, Gamma_ofReal] + push_cast + rw [neg_pow] + simp only [div_eq_mul_inv, mul_inv_rev] + ring + +/-- The regularized Bessel auxiliary is Laguerre--Pólya throughout the +extended Laguerre parameter range, including `alpha = -1` and `alpha = -2`. -/ +theorem isLaguerrePolya_regularized_bessel {alpha : ℝ} (halpha : -2 ≤ alpha) : + IsLaguerrePolya (fun z ↦ regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} (-z)) := by + rw [← complexExpGeneratingFunction_inv_gamma_eq] + exact isLaguerrePolya_of_jensenPolynomial_splits _ + (fun d ↦ jensenPolynomial_inv_gamma_splits d halpha) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselClassification.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselClassification.lean new file mode 100644 index 000000000..d010ae933 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselClassification.lean @@ -0,0 +1,68 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Bessel +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselTaylor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselInteger +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.JensenBesselObstruction + +/-! +# Exact real parameter range of the regularized Bessel auxiliary + +The Laguerre--Pólya parameters are precisely `alpha >= -2` together with all +negative integers. This extends the range used in O'Sullivan's Section 3.3. +The integer cases use the actual entire regularization at Gamma poles. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- The nonintegral parameters below `-2` do not give Laguerre--Pólya +functions, as witnessed by their quadratic Jensen polynomial. -/ +theorem not_isLaguerrePolya_regularized_bessel {alpha : ℝ} + (halpha : alpha < -2) (hnat : ∀ n : ℕ, alpha ≠ -(n : ℝ)) : + ¬ IsLaguerrePolya + (fun z ↦ regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} (-z)) := by + intro hf + apply not_splits_jensenPolynomial_inv_gamma_two halpha hnat + simpa only [iteratedDeriv_regularized_bessel_zero, ofReal_re] using + hf.jensenPolynomial_splits 2 + +/-- Exact classification, including all negative integer exceptional +parameters and both boundary points `-1` and `-2`. -/ +theorem isLaguerrePolya_regularized_bessel_iff (alpha : ℝ) : + IsLaguerrePolya (fun z ↦ regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} (-z)) ↔ + -2 ≤ alpha ∨ ∃ n : ℕ, alpha = -(n : ℝ) := by + constructor + · intro hf + by_cases ha : -2 ≤ alpha + · exact Or.inl ha + by_cases hn : ∃ n : ℕ, alpha = -(n : ℝ) + · exact Or.inr hn + exact (not_isLaguerrePolya_regularized_bessel (lt_of_not_ge ha) + (not_exists.mp hn) hf).elim + · rintro (ha | ⟨n, rfl⟩) + · exact isLaguerrePolya_regularized_bessel ha + · exact isLaguerrePolya_regularized_bessel_neg_nat n + +/-- The reciprocal-Gamma Jensen family has exactly the same parameter +classification. At exceptional integers its initial rows may be zero. -/ +theorem jensenPolynomial_inv_gamma_splits_iff (alpha : ℝ) : + (∀ d, (jensenPolynomial d + (fun k ↦ (-1 : ℝ) ^ k * (Real.Gamma (alpha + k + 1))⁻¹)).Splits) ↔ + -2 ≤ alpha ∨ ∃ n : ℕ, alpha = -(n : ℝ) := by + rw [← isLaguerrePolya_regularized_bessel_iff] + have hf : Differentiable ℂ + (fun z ↦ regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} (-z)) := by + intro z + exact ((analyticAt_regularizedHGFun_zero (-z)).differentiableAt.comp z + (by fun_prop)) + exact (isLaguerrePolya_iff_jensenPolynomial_splits hf + (iteratedDeriv_regularized_bessel_zero alpha)).symm + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselInteger.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselInteger.lean new file mode 100644 index 000000000..3abaca31e --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselInteger.lean @@ -0,0 +1,66 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric +public import Mathlib.Analysis.Analytic.Order +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Bessel +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselTaylor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct + +/-! +# Negative integer parameters of the regularized Bessel auxiliary + +At parameter `-n`, the auxiliary is `(-z)^n` times the auxiliary with +parameter `n`. This includes `n = 0` and gives the exact origin multiplicity. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- Reflection of an integer parameter extracts its complete origin factor. -/ +theorem regularized_bessel_neg_nat (n : ℕ) (z : ℂ) : + regularizedHGFun 0 {((-(n : ℝ) + 1 : ℝ) : ℂ)} (-z) = + (-z) ^ n * regularizedHGFun 0 {(((n : ℝ) + 1 : ℝ) : ℂ)} (-z) := by + simpa only [ofReal_add, ofReal_neg, ofReal_natCast, ofReal_one] using + regularizedHGFun_zero_singleton_neg_nat_add_one n (-z) + +/-- Every negative integer parameter gives a Laguerre--Pólya regularized +Bessel auxiliary. The zero parameter is included. -/ +theorem isLaguerrePolya_regularized_bessel_neg_nat (n : ℕ) : + IsLaguerrePolya (fun z ↦ + regularizedHGFun 0 {((-(n : ℝ) + 1 : ℝ) : ℂ)} (-z)) := by + have hid : IsLaguerrePolya (fun z : ℂ ↦ -z) := by + simpa using isLaguerrePolya_eval_map (p := -X) Splits.X.neg + have hp := (hid.pow n).mul + (isLaguerrePolya_regularized_bessel (alpha := (n : ℝ)) + (le_trans (by norm_num) (Nat.cast_nonneg n))) + simpa only [Pi.mul_def, Pi.pow_def, regularized_bessel_neg_nat] using hp + +/-- The origin has exactly multiplicity `n` at parameter `-n`, including +order zero when `n = 0`. -/ +theorem analyticOrderAt_regularized_bessel_neg_nat (n : ℕ) : + analyticOrderAt (fun z ↦ + regularizedHGFun 0 {((-(n : ℝ) + 1 : ℝ) : ℂ)} (-z)) 0 = (n : ℕ∞) := by + have hpos : AnalyticAt ℂ + (fun z ↦ regularizedHGFun 0 {(((n : ℝ) + 1 : ℝ) : ℂ)} (-z)) 0 := by + exact (analyticAt_regularizedHGFun_zero (-(0 : ℂ))).comp (by fun_prop) + have hval : regularizedHGFun 0 {(((n : ℝ) + 1 : ℝ) : ℂ)} (-(0 : ℂ)) ≠ 0 := by + rw [neg_zero, regularized_bessel_zero, ofReal_ne_zero] + exact inv_ne_zero (Real.Gamma_pos_of_pos (by positivity)).ne' + have hfun : (fun z ↦ regularizedHGFun 0 {((-(n : ℝ) + 1 : ℝ) : ℂ)} (-z)) = + (fun z : ℂ ↦ -z) ^ n * + (fun z ↦ regularizedHGFun 0 {(((n : ℝ) + 1 : ℝ) : ℂ)} (-z)) := by + funext z + exact regularized_bessel_neg_nat n z + rw [hfun, analyticOrderAt_mul (by fun_prop) hpos, + hpos.analyticOrderAt_eq_zero.mpr hval, add_zero, analyticOrderAt_pow (by fun_prop)] + have hneg : analyticOrderAt (fun z : ℂ ↦ -z) 0 = 1 := by + simpa only [Pi.neg_def, id_eq] using + (analyticOrderAt_neg (f := (id : ℂ → ℂ)) (z₀ := 0)).trans analyticOrderAt_id + rw [hneg] + simp + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselTaylor.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselTaylor.lean new file mode 100644 index 000000000..29d7f0d9b --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/BesselTaylor.lean @@ -0,0 +1,69 @@ +module + +public import Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric +import RealRooted.Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric.Derivatives +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import TauCeti.Analysis.SpecialFunctions.RegularizedHypergeometric +import Mathlib.Tactic.Ring + +/-! +# Actual Taylor data and nonvanishing of the regularized Bessel auxiliary + +No nonzero value at the origin is assumed. Negative integer parameters have +an initial zero block in their Taylor coefficients but define nonzero functions. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- The actual Taylor derivatives of the regularized Bessel auxiliary, +with all reciprocal-Gamma poles interpreted by the entire regularization. -/ +theorem iteratedDeriv_regularized_bessel_zero (alpha : ℝ) (k : ℕ) : + iteratedDeriv k (fun z ↦ regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} (-z)) 0 = + (((-1 : ℝ) ^ k * (Real.Gamma (alpha + k + 1))⁻¹ : ℝ) : ℂ) := by + rw [iteratedDeriv_comp_neg, neg_zero, smul_eq_mul, + iteratedDeriv_regularizedHGFun_zero_singleton] + have harg : ((alpha + 1 : ℝ) : ℂ) + (k : ℂ) = ((alpha + k + 1 : ℝ) : ℂ) := by + push_cast + ring + rw [harg, Gamma_ofReal] + push_cast + rfl + +/-- The regularized Bessel auxiliary is never the zero function, for any +real parameter, including all negative integers. -/ +theorem regularized_bessel_ne_zero (alpha : ℝ) : + (fun z ↦ regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} (-z)) ≠ 0 := by + obtain ⟨k, hk⟩ := exists_nat_gt (-alpha) + have hGamma : Real.Gamma (alpha + k + 1) ≠ 0 := + (Real.Gamma_pos_of_pos (by linarith)).ne' + have hcoeff : (-1 : ℝ) ^ k * (Real.Gamma (alpha + k + 1))⁻¹ ≠ 0 := + mul_ne_zero (pow_ne_zero k (by norm_num)) (inv_ne_zero hGamma) + intro hz + have h := iteratedDeriv_regularized_bessel_zero alpha k + rw [hz] at h + have hzero : (((-1 : ℝ) ^ k * (Real.Gamma (alpha + k + 1))⁻¹ : ℝ) : ℂ) = 0 := by + simpa using h.symm + exact hcoeff (ofReal_eq_zero.mp hzero) + +/-- The value at zero is the reciprocal-Gamma factor. -/ +theorem regularized_bessel_zero (alpha : ℝ) : + regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} 0 = + (((Real.Gamma (alpha + 1))⁻¹ : ℝ) : ℂ) := by + simpa using iteratedDeriv_regularized_bessel_zero alpha 0 + +/-- Precisely the strictly negative integers give a zero at the origin. -/ +theorem regularized_bessel_zero_eq_zero_iff (alpha : ℝ) : + regularizedHGFun 0 {((alpha + 1 : ℝ) : ℂ)} 0 = 0 ↔ + ∃ n : ℕ, alpha = -((n : ℝ) + 1) := by + rw [regularized_bessel_zero, ofReal_eq_zero, inv_eq_zero, Real.Gamma_eq_zero_iff] + constructor + · rintro ⟨n, hn⟩ + exact ⟨n, by linarith⟩ + · rintro ⟨n, hn⟩ + exact ⟨n, by linarith⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalDifferential.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalDifferential.lean new file mode 100644 index 000000000..55ac6e01b --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalDifferential.lean @@ -0,0 +1,47 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialGaussianType +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GaussianProductBound + +/-! +# Infinite differential preservation from literal canonical products + +This supplies the canonical-factor form of the convergence and preservation +input in Cardon--de Gaston (2005), Lemma 2, including vanishing Gaussian +coefficients, arbitrary origin orders, and zero functions. It is not the +infinite-zero strictness conclusion of their Theorem 1. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Literal genus-one canonical representations with Gaussian coefficient +product below one quarter give LP preservation of the actual infinite +differential image. Natural multiplicities and origin factors are explicit. -/ +theorem IsLaguerrePolya.infiniteDifferentialApply_of_canonical + {φ f : ℂ → ℂ} (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) + {ι κ : Type*} (a : ι → ℂ) (m : ι → ℕ) (u : κ → ℂ) (v : κ → ℕ) + (hm : Summable (fun i => (m i : ℝ) * ‖a i‖ ^ 2)) + (hv : Summable (fun i => (v i : ℝ) * ‖u i‖ ^ 2)) + (cφ bφ cf bf : ℂ) (kφ kf : ℕ) {α β : ℝ} + (hα : 0 ≤ α) (hβ : 0 ≤ β) (hab : 4 * α * β < 1) + (hφeq : ∀ z, φ z = cφ * z ^ kφ * exp (-(α : ℂ) * z ^ 2 + bφ * z) * + ∏' i, weierstrassFactor 1 (a i * z) ^ m i) + (hfeq : ∀ z, f z = cf * z ^ kf * exp (-(β : ℂ) * z ^ 2 + bf * z) * + ∏' i, weierstrassFactor 1 (u i * z) ^ v i) : + IsLaguerrePolya (infiniteDifferentialApply φ f) := by + apply hφ.infiniteDifferentialApply_of_gaussian_type hf hα hβ hab + · intro ε hε + obtain ⟨C, hC, hbound⟩ := exists_norm_canonicalProduct_le_exp_sq a m hm cφ bφ kφ hα hε + exact ⟨C, hC, fun z => by simpa only [hφeq z] using hbound z⟩ + · intro ε hε + obtain ⟨C, hC, hbound⟩ := exists_norm_canonicalProduct_le_exp_sq u v hv cf bf kf hβ hε + exact ⟨C, hC, fun z => by simpa only [hfeq z] using hbound z⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalDifferentialSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalDifferentialSimple.lean new file mode 100644 index 000000000..ac71ec0b7 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalDifferentialSimple.lean @@ -0,0 +1,67 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalSparseFactor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroFactorSimple +import RealRooted.Mathlib.Analysis.Complex.LinearProductNonpolynomial +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianMargin + +/-! +# Simple zeros for infinite-zero canonical differential symbols + +This is the canonical-input form of Cardon--de Gaston (2005), Theorem 1. +The hypothesis concerns the actual infinitely many distinct real zeros of +the symbol, and the conclusion concerns the actual infinite differential +series. No nonzero cofactor image is assumed. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- A real canonical symbol with infinitely many distinct zeros gives a +zero or simple LP differential image under the strict Gaussian threshold. +Both Gaussian coefficients may vanish, and origin orders are arbitrary. -/ +theorem IsLaguerrePolya.canonical_differential_simple_or_zero + {φ f : ℂ → ℂ} (hf : IsLaguerrePolya f) {ι : Type*} (a : ι → ℝ) + (ha : Summable (fun i ↦ a i ^ 2)) (c b : ℝ) (k : ℕ) {α β : ℝ} + (hα : 0 ≤ α) (hβ : 0 ≤ β) (hab : 4 * α * β < 1) + (heq : ∀ z, φ z = (c : ℂ) * z ^ k * exp (-(α : ℂ) * z ^ 2 + (b : ℂ) * z) * + ∏' i, weierstrassFactor 1 ((a i : ℂ) * z)) + (hinf : Set.Infinite {x : ℝ | φ x = 0}) + (hfbound : ∀ ε > 0, ∃ C > 0, ∀ z, + ‖f z‖ ≤ C * Real.exp ((β + ε) * ‖z‖ ^ 2)) : + infiniteDifferentialApply φ f = 0 ∨ + IsLaguerrePolya (infiniteDifferentialApply φ f) ∧ + ∀ z, infiniteDifferentialApply φ f z = 0 → + z.im = 0 ∧ _root_.deriv (infiniteDifferentialApply φ f) z ≠ 0 := by + by_cases hc : c = 0 + · have hφ0 : φ = 0 := by funext z; simp [heq z, hc] + left + rw [hφ0] + ext z + simp only [infiniteDifferentialApply, iteratedDeriv_const_zero, zero_mul, + zero_div, tsum_zero, Pi.zero_apply] + · obtain ⟨s, g, hs, hsinj, hs0, hg, hgbound, hfactor⟩ := + exists_genusZero_factor_of_canonical ha hc b k hα heq hinf + obtain ⟨A, B, hαA, hβB, hA, hB, hAB⟩ := + Real.exists_pos_gaussian_coefficients hα hβ hab + obtain ⟨Mg, hMg, hgBound⟩ := hgbound (A - α) (sub_pos.mpr hαA) + obtain ⟨Mf, hMf, hfBound⟩ := hfbound (B - β) (sub_pos.mpr hβB) + have hgBound' : ∀ z, ‖g z‖ ≤ Mg * Real.exp (A * ‖z‖ ^ 2) := by + have he : α + (A - α) = A := by ring + simpa only [he] using hgBound + have hfBound' : ∀ z, ‖f z‖ ≤ Mf * Real.exp (B * ‖z‖ ^ 2) := by + have he : β + (B - β) = B := by ring + simpa only [he] using hfBound + have h := hg.genusZero_factor_differential_simple_or_zero hf hs + (tprod_one_add_ne_polynomial_of_injective hsinj hs0) + hMg.le hMf.le hA hB hAB hgBound' hfBound' + have hφ : φ = fun z ↦ (∏' n, (1 + (s n : ℂ) * z)) * g z := funext hfactor + simpa only [hφ] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalMultiplicitySimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalMultiplicitySimple.lean new file mode 100644 index 000000000..4aca01b5e --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalMultiplicitySimple.lean @@ -0,0 +1,78 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import TauCeti.Topology.Algebra.InfiniteSum.Real +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalDifferentialSimple +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOneSplit +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GaussianProductBound + +/-! +# Canonical differential simplicity with explicit multiplicities + +Natural multiplicities are expanded into individual factors, then the +sparse-factor argument is applied. Zero multiplicities and zero slopes +contribute no zeros; finite and empty products cannot satisfy the infinite +zero hypothesis unless the scalar prefactor vanishes. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Multiplicity-weighted real canonical symbols with infinitely many +distinct zeros have simple nonzero differential images at the sharp +Gaussian threshold. -/ +theorem IsLaguerrePolya.canonical_multiplicity_differential_simple_or_zero + {φ f : ℂ → ℂ} (hf : IsLaguerrePolya f) {ι : Type*} + (a : ι → ℝ) (m : ι → ℕ) + (hm : Summable (fun i ↦ (m i : ℝ) * a i ^ 2)) (c b : ℝ) (k : ℕ) {α β : ℝ} + (hα : 0 ≤ α) (hβ : 0 ≤ β) (hab : 4 * α * β < 1) + (heq : ∀ z, φ z = (c : ℂ) * z ^ k * exp (-(α : ℂ) * z ^ 2 + (b : ℂ) * z) * + ∏' i, weierstrassFactor 1 ((a i : ℂ) * z) ^ m i) + (hinf : Set.Infinite {x : ℝ | φ x = 0}) + (hfbound : ∀ ε > 0, ∃ C > 0, ∀ z, + ‖f z‖ ≤ C * Real.exp ((β + ε) * ‖z‖ ^ 2)) : + infiniteDifferentialApply φ f = 0 ∨ + IsLaguerrePolya (infiniteDifferentialApply φ f) ∧ + ∀ z, infiniteDifferentialApply φ f z = 0 → + z.im = 0 ∧ _root_.deriv (infiniteDifferentialApply φ f) z ≠ 0 := by + have hs : Summable (fun j : Σ i, Fin (m i) ↦ a j.1 ^ 2) := + (TauCeti.summable_sigma_fin_iff (fun i ↦ sq_nonneg (a i)) m).mpr hm + have hsC : Summable (fun i ↦ (m i : ℝ) * ‖(a i : ℂ)‖ ^ 2) := by + simpa only [norm_real, Real.norm_eq_abs, sq_abs] using hm + apply hf.canonical_differential_simple_or_zero + (fun j : Σ i, Fin (m i) ↦ a j.1) hs c b k hα hβ hab _ hinf hfbound + intro z + rw [heq z, tprod_weierstrassFactor_one_pow_eq_fin_copies + (fun i ↦ (a i : ℂ)) m hsC z] + +/-- The literal canonical-product form of Cardon--de Gaston (2005), +Theorem 1: actual infinite-zero symbols give zero or simple LP output when +the two Gaussian coefficients have product below one quarter. -/ +theorem IsLaguerrePolya.canonical_product_differential_simple_or_zero + {φ f : ℂ → ℂ} (hf : IsLaguerrePolya f) {ι κ : Type*} + (a : ι → ℝ) (m : ι → ℕ) (u : κ → ℂ) (v : κ → ℕ) + (hm : Summable (fun i ↦ (m i : ℝ) * a i ^ 2)) + (hv : Summable (fun i ↦ (v i : ℝ) * ‖u i‖ ^ 2)) + (c b : ℝ) (cf bf : ℂ) (k kf : ℕ) {α β : ℝ} + (hα : 0 ≤ α) (hβ : 0 ≤ β) (hab : 4 * α * β < 1) + (hφeq : ∀ z, φ z = (c : ℂ) * z ^ k * exp (-(α : ℂ) * z ^ 2 + (b : ℂ) * z) * + ∏' i, weierstrassFactor 1 ((a i : ℂ) * z) ^ m i) + (hfeq : ∀ z, f z = cf * z ^ kf * exp (-(β : ℂ) * z ^ 2 + bf * z) * + ∏' i, weierstrassFactor 1 (u i * z) ^ v i) + (hinf : Set.Infinite {x : ℝ | φ x = 0}) : + infiniteDifferentialApply φ f = 0 ∨ + IsLaguerrePolya (infiniteDifferentialApply φ f) ∧ + ∀ z, infiniteDifferentialApply φ f z = 0 → + z.im = 0 ∧ _root_.deriv (infiniteDifferentialApply φ f) z ≠ 0 := by + apply hf.canonical_multiplicity_differential_simple_or_zero + a m hm c b k hα hβ hab hφeq hinf + intro ε hε + obtain ⟨C, hC, hbound⟩ := exists_norm_canonicalProduct_le_exp_sq u v hv cf bf kf hβ hε + exact ⟨C, hC, fun z ↦ by simpa only [hfeq z] using hbound z⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalProduct.lean index 723999a0c..76fd5f994 100644 --- a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalProduct.lean +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalProduct.lean @@ -1,10 +1,12 @@ module -public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Complex.Exponential + +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI import RealRooted.RootContinuity -public import Mathlib.Analysis.SpecialFunctions.Complex.LogBounds -import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn +import Mathlib.Analysis.SpecialFunctions.Complex.LogBounds +import RealRooted.Mathlib.Analysis.Complex.LinearProduct /-! # Products in the Laguerre–Pólya class @@ -317,15 +319,6 @@ private lemma realRootedOrZero_approx (c : ℝ) (m : ℕ) {a : ℝ} (ha : 0 ≤ /-! ### The Type-I approximants -/ -/-- Uniform convergence on every closed ball centred at `0` gives local uniform convergence. -/ -private lemma tendstoLocallyUniformly_of_closedBall {F : ℕ → ℂ → ℂ} {f : ℂ → ℂ} - (h : ∀ R : ℝ, TendstoUniformlyOn F f atTop (Metric.closedBall 0 R)) : - TendstoLocallyUniformly F f atTop := by - intro u hu x - refine ⟨Metric.closedBall 0 (‖x‖ + 1), ?_, h (‖x‖ + 1) u hu⟩ - apply Metric.closedBall_mem_nhds_of_mem - simp - /-- `(1 + σ z / n) ^ n → exp (σ z)` uniformly on closed balls. -/ private lemma tendstoUniformlyOn_one_add_div_pow (σ R : ℝ) : TendstoUniformlyOn (fun (n : ℕ) (z : ℂ) => (1 + (σ : ℂ) * z / n) ^ n) @@ -357,18 +350,6 @@ private lemma tendstoUniformlyOn_one_add_div_pow (σ R : ℝ) : filter_upwards [hlarge] with n ⟨hn, hn2⟩ z hz exact (one_add_div_pow_eq_exp hn (by linarith [hbd z hz])).symm -/-- The partial products of `∏ₖ (1 + yₖ z)` converge locally uniformly when `∑ |yₖ| < ∞`. -/ -private lemma tendstoLocallyUniformly_prod_one_add (y : ℕ → ℝ) (hy : Summable y) : - TendstoLocallyUniformly (fun n (z : ℂ) => ∏ k ∈ Finset.range n, (1 + (y k : ℂ) * z)) - (fun z => ∏' k, (1 + (y k : ℂ) * z)) atTop := by - refine tendstoLocallyUniformly_of_closedBall fun R => ?_ - refine (Summable.hasProdUniformlyOn_nat_one_add (f := fun k (z : ℂ) => (y k : ℂ) * z) - (isCompact_closedBall 0 R) (hy.norm.mul_right R) ?_ - (fun n => by fun_prop)).tendstoUniformlyOn_finsetRange - refine Eventually.of_forall fun n z hz => ?_ - rw [norm_mul, Complex.norm_real] - exact mul_le_mul_of_nonneg_left (by simpa using hz) (norm_nonneg _) - /-- The Type-I approximants `c z ^ m (1 + σ z / n) ^ n ∏_{k < n} (1 + yₖ z)` converge locally uniformly to `c z ^ m e^(σ z) ∏ₖ (1 + yₖ z)`. -/ private lemma tendstoLocallyUniformly_typeIApprox (c : ℝ) (m : ℕ) (σ : ℝ) (y : ℕ → ℝ) diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalRepresentation.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalRepresentation.lean new file mode 100644 index 000000000..f445bd9b3 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalRepresentation.lean @@ -0,0 +1,48 @@ +module + +public import RealRooted.LaguerreInequalities.CanonicalProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginFactor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.LaguerreInequalities.CanonicalRepresentation +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative + +/-! +# The native real canonical representation of every nonzero LP function +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- The closure definition of LP gives a literal real canonical expression, +including the actual origin multiplicity. The product uses the actual zeros +and multiplicities of the origin cofactor. -/ +theorem IsLaguerrePolya.exists_eq_pow_mul_exp_mul_realZeroProduct {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hne : f ≠ 0) : + ∃ g : ℂ → ℂ, IsLaguerrePolya g ∧ g 0 ≠ 0 ∧ ∃ c b A : ℝ, + c ≠ 0 ∧ 0 ≤ A ∧ ∀ z : ℂ, + f z = (c : ℂ) * z ^ analyticOrderNatAt f 0 * + exp (-(A : ℂ) * z ^ 2 + (b : ℂ) * z) * realZeroProduct g z := by + obtain ⟨g, hg, hg0, hfactor⟩ := hf.exists_origin_factor hne + obtain ⟨b, B, hB, heq⟩ := exists_eq_exp_mul_realZeroProduct + hg.differentiable hg.conj hg0 hg.laguerreCoefficient_nonneg + have hreal : ((g 0).re : ℂ) = g 0 := by + apply conj_eq_iff_re.mp + simpa using (hg.conj 0).symm + have hc : (g 0).re ≠ 0 := by + intro hzero + exact hg0 (hreal.symm.trans (by simp [hzero])) + refine ⟨g, hg, hg0, (g 0).re, b, B / 2, hc, + div_nonneg hB (by norm_num), fun z ↦ ?_⟩ + rw [congrFun hfactor z, heq z, hreal] + have hexp : (b : ℂ) * z - (B : ℂ) * z ^ 2 / 2 = + -((B / 2 : ℝ) : ℂ) * z ^ 2 + (b : ℂ) * z := by + rw [ofReal_div, ofReal_ofNat] + ring + rw [hexp] + ring + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalSparseFactor.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalSparseFactor.lean new file mode 100644 index 000000000..28a149706 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CanonicalSparseFactor.lean @@ -0,0 +1,88 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import RealRooted.Mathlib.Analysis.Normed.Group.SparseSubfamily +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOneSplit +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.CanonicalSupport +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GaussianProductBound +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlow +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Examples + +/-! +# Sparse genus-zero factors with LP cofactors of the same Gaussian type + +The selected slopes have strictly decreasing nonzero absolute values. The +complementary canonical factors and the linear exponential correction give +an explicit LP cofactor without changing its quadratic Gaussian coefficient. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- Real canonical factors with a nonpositive quadratic exponent are LP. -/ +private theorem isLaguerrePolya_real_canonical {ι : Type*} (a : ι → ℝ) + (ha : Summable (fun i ↦ a i ^ 2)) (c b : ℝ) (k : ℕ) {α : ℝ} (hα : 0 ≤ α) : + IsLaguerrePolya (fun z : ℂ ↦ (c : ℂ) * z ^ k * + exp (-(α : ℂ) * z ^ 2 + (b : ℂ) * z) * + ∏' i, weierstrassFactor 1 ((a i : ℂ) * z)) := by + have hpow : IsLaguerrePolya (fun z : ℂ ↦ z ^ k) := by + simpa using isLaguerrePolya_eval_map (p := X ^ k) (Splits.X.pow k) + have hlin : IsLaguerrePolya (fun z : ℂ ↦ exp ((b : ℂ) * z)) := by + simpa using isLaguerrePolya_exp.comp_affine_real b 0 + have hexp : IsLaguerrePolya + (fun z : ℂ ↦ exp (-(α : ℂ) * z ^ 2 + (b : ℂ) * z)) := by + simpa only [exp_add, Pi.mul_def] using (isLaguerrePolya_exp_neg_mul_sq hα).mul hlin + have hprod : IsLaguerrePolya + (fun z : ℂ ↦ ∏' i, weierstrassFactor 1 ((a i : ℂ) * z)) := by + simpa only [Nat.cast_one, one_mul, pow_one] using + isLaguerrePolya_tprod_weierstrassFactor_one_pow a (fun _ ↦ 1) + (by simpa only [Nat.cast_one, one_mul] using ha) + simpa only [Pi.mul_def, mul_assoc] using ((hpow.mul hexp).const_mul_real c).mul hprod + +/-- Infinitely many real zeros of a nonzero real canonical expression give +a summable pure genus-zero factor and an LP cofactor of the same Gaussian +type. The extracted slopes are distinct and nonzero. -/ +theorem exists_genusZero_factor_of_canonical {ι : Type*} {a : ι → ℝ} + (ha : Summable (fun i ↦ a i ^ 2)) {φ : ℂ → ℂ} {c : ℝ} (hc : c ≠ 0) + (b : ℝ) (k : ℕ) {α : ℝ} (hα : 0 ≤ α) + (heq : ∀ z, φ z = (c : ℂ) * z ^ k * exp (-(α : ℂ) * z ^ 2 + (b : ℂ) * z) * + ∏' i, weierstrassFactor 1 ((a i : ℂ) * z)) + (hinf : Set.Infinite {x : ℝ | φ x = 0}) : + ∃ (s : ℕ → ℝ) (g : ℂ → ℂ), Summable s ∧ Function.Injective s ∧ + (∀ n, s n ≠ 0) ∧ IsLaguerrePolya g ∧ + (∀ ε > 0, ∃ C > 0, ∀ z, ‖g z‖ ≤ C * Real.exp ((α + ε) * ‖z‖ ^ 2)) ∧ + ∀ z, φ z = (∏' n, (1 + (s n : ℂ) * z)) * g z := by + have hi := infinite_support_of_canonical_real_zeros ha + (ofReal_ne_zero.mpr hc) k α heq hinf + obtain ⟨e, he0, heinj, _, hesum⟩ := Real.exists_summable_subfamily_of_summable_sq ha hi + let s : ℕ → ℝ := fun n ↦ -a (e n) + let b' : ℝ := b + ∑' n, a (e n) + let g : ℂ → ℂ := fun z ↦ (c : ℂ) * z ^ k * + exp (-(α : ℂ) * z ^ 2 + (b' : ℂ) * z) * + ∏' i : {i // i ∉ Set.range e}, weierstrassFactor 1 ((a i : ℂ) * z) + have hs : Summable (fun i : {i // i ∉ Set.range e} ↦ a i ^ 2) := + ha.subtype (fun i ↦ i ∉ Set.range e) + refine ⟨s, g, hesum.neg, fun n m h ↦ heinj (neg_injective h), + fun n ↦ neg_ne_zero.mpr (he0 n), + isLaguerrePolya_real_canonical (fun i : {i // i ∉ Set.range e} ↦ a i) + hs c b' k hα, ?_, ?_⟩ + · intro ε hε + have hsC : Summable (fun i : {i // i ∉ Set.range e} ↦ + (1 : ℝ) * ‖(a i : ℂ)‖ ^ 2) := by + simpa only [one_mul, norm_real, Real.norm_eq_abs, sq_abs] using hs + obtain ⟨C, hC, hbound⟩ := exists_norm_canonicalProduct_le_exp_sq + (fun i : {i // i ∉ Set.range e} ↦ (a i : ℂ)) (fun _ ↦ 1) + (by simpa only [Nat.cast_one] using hsC) c b' k hα hε + exact ⟨C, hC, fun z ↦ by simpa only [g, pow_one] using hbound z⟩ + · intro z + rw [heq z, tprod_weierstrassFactor_one_eq_linear_mul_compl ha e hesum z] + dsimp only [s, g, b'] + simp only [ofReal_neg, neg_mul, sub_eq_add_neg, ofReal_add, add_mul, exp_add] + ring + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CoefficientLimit.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CoefficientLimit.lean new file mode 100644 index 000000000..f80fc6a31 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CoefficientLimit.lean @@ -0,0 +1,46 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FormalJensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct +import RealRooted.MultiplierSequence.JensenLimit +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Formal coefficient limits of real-rooted polynomials + +A coefficientwise limit of real splitting polynomials defines an entire +Laguerre--Pólya function. No bound on the degrees or prior convergence radius is +required; zero and initial zero coefficients are allowed. This is the +coefficient-limit theorem used in Pólya's 1915 differential-operator argument. +-/ + +public section + +open Polynomial Complex Filter Topology + +namespace RealRooted + +/-- The Jensen polynomials of the exponential Taylor data of a splitting real +polynomial also split. -/ +theorem jensenPolynomial_factorial_coeff_splits {p : ℝ[X]} (hp : p.Splits) (d : ℕ) : + (jensenPolynomial d (fun k => (k.factorial : ℝ) * p.coeff k)).Splits := by + have hs := (isLaguerrePolya_eval_map hp).jensenPolynomial_splits d + simpa only [iteratedDeriv_fun_eval, eval_zero_iterate_derivative, coeff_map, + ofRealHom_eq_coe, mul_re, natCast_re, ofReal_re, natCast_im, ofReal_im, + mul_zero, sub_zero] using hs + +/-- A coefficientwise limit of real splitting polynomials defines an entire +Laguerre--Pólya function, without a degree bound or a convergence assumption. -/ +theorem isLaguerrePolya_of_tendsto_coeff {p : ℕ → ℝ[X]} {a : ℕ → ℝ} + (hp : ∀ n, (p n).Splits) + (ha : ∀ k, Tendsto (fun n => (p n).coeff k) atTop (𝓝 (a k))) : + IsLaguerrePolya (complexExpGeneratingFunction (fun k => (k.factorial : ℝ) * a k)) := by + apply isLaguerrePolya_of_jensenPolynomial_splits + intro d + exact jensenPolynomial_splits_of_tendsto d + (fun n => jensenPolynomial_factorial_coeff_splits (hp n) d) + (fun k => (ha k).const_mul (k.factorial : ℝ)) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CompactDifferentialSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CompactDifferentialSimple.lean new file mode 100644 index 000000000..cd04ad924 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CompactDifferentialSimple.lean @@ -0,0 +1,54 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import RealRooted.Mathlib.Analysis.Complex.CompactJets +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialMultiplicity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative + +/-! +# Eventual simplicity of finite differential images on compact sets + +Cardon--de Gaston (2005), Lemma 6, follows from a uniform finite nonvanishing +jet and finite-symbol multiplicity descent. The statement here applies to any +real-rooted polynomial symbols whose degrees grow. No growth assumption on +the entire input is needed. An identically zero output is explicitly excluded. +-/ + +public section + +open Polynomial Complex Filter Topology + +namespace RealRooted + +/-- On a fixed compact real set, every sufficiently high-degree split +finite symbol gives simple zeros in its nonzero differential image of an LP input. -/ +theorem IsLaguerrePolya.exists_degree_bound_differentialApply_simple {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f ≠ 0) {K : Set ℝ} (hK : IsCompact K) : + ∃ N : ℕ, ∀ q : ℝ[X], q.Splits → N ≤ q.natDegree → + (∃ z, (q.map ofRealHom).differentialApply f z ≠ 0) → + ∀ x ∈ K, (q.map ofRealHom).differentialApply f (x : ℂ) = 0 → + deriv ((q.map ofRealHom).differentialApply f) (x : ℂ) ≠ 0 := by + obtain ⟨N, hN⟩ := exists_uniform_iteratedDeriv_ne_zero hf.differentiable hf0 + (hK.image continuous_ofReal) + refine ⟨N, ?_⟩ + intro q hq hdegree hne x hx hzero + apply hf.deriv_differentialApply_ne_zero_of_jet hq hne ?_ hzero + obtain ⟨k, hk, hkn⟩ := hN (x : ℂ) ⟨x, hx, rfl⟩ + exact ⟨k, by lia, hkn⟩ + +/-- Along any filter, split symbols with degrees tending to infinity eventually +have only simple zeros on each compact real set, whenever the output is nonzero. -/ +theorem IsLaguerrePolya.eventually_differentialApply_simple {ι : Type*} {l : Filter ι} + {f : ℂ → ℂ} (hf : IsLaguerrePolya f) (hf0 : f ≠ 0) + {q : ι → ℝ[X]} (hq : ∀ i, (q i).Splits) + (hdegree : Tendsto (fun i => (q i).natDegree) l atTop) + {K : Set ℝ} (hK : IsCompact K) : + ∀ᶠ i in l, (∃ z, ((q i).map ofRealHom).differentialApply f z ≠ 0) → + ∀ x ∈ K, ((q i).map ofRealHom).differentialApply f (x : ℂ) = 0 → + deriv (((q i).map ofRealHom).differentialApply f) (x : ℂ) ≠ 0 := by + obtain ⟨N, hN⟩ := hf.exists_degree_bound_differentialApply_simple hf0 hK + filter_upwards [hdegree.eventually (eventually_ge_atTop N)] with i hi + exact hN (q i) (hq i) hi + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CompactStieltjesFraction.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CompactStieltjesFraction.lean new file mode 100644 index 000000000..1b1491e15 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/CompactStieltjesFraction.lean @@ -0,0 +1,108 @@ +/- +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 RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Calculus.LogDeriv +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentsChain +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainAeration +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.StieltjesFraction +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Const + +/-! +# The normalized Type-I criterion by bounded Wall chains + +The actual complex signed logarithmic Taylor series of an entire function, +nonzero at zero, has a bounded Wall chain exactly when its normalization is +positive Type-I. The compact moment measure is obtained from Type-I +factorization, so no growth or support hypothesis is imposed on the function. + +This combines the logarithmic moment criterion of Sokal, Proposition 6, +published p. 5, with Wall's compact moment criterion as presented in Sokal, +arXiv:1903.12455v2, and Sokal-Walrad, arXiv:2404.12131v1, Theorem 1. +The combination is stated here as a derived consequence. Constants, the +exponential atom at zero, and terminating chains are included. +-/ + +public section + +open Complex MeasureTheory +open scoped PowerSeries + +namespace RealRooted + +/-- Normalized positive Type-I entire functions are exactly those whose +actual complex logarithmic Taylor series admits a bounded Wall chain with +initial parameter zero. No reality or growth premise is required. -/ +theorem isLaguerrePolyaTypeI_div_iff_chainStieltjesTail + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) : + IsLaguerrePolyaTypeI (fun z => f z / f 0) ↔ + ∃ (L mass : ℝ) (g : ℕ → ℝ), 0 ≤ L ∧ 0 ≤ mass ∧ g 0 = 0 ∧ + (∀ n, g n ∈ Set.Icc 0 1) ∧ + PowerSeries.mk (fun n => (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / + n.factorial) = PowerSeries.map (algebraMap ℝ ℂ) + (PowerSeries.C mass * PowerSeries.stieltjesTail + (PowerSeries.chainStieltjesNumerators L g) 0) := by + constructor + · intro hF + obtain ⟨_, b, mu, _, hb, _, _, _, hsupport, hmom⟩ := + hF.exists_logDeriv_moment_measure + (by simp only [div_self h0, ne_eq, one_ne_zero, not_false_eq_true]) + have hL : 0 ≤ ∑' i, b i := tsum_nonneg hb + obtain ⟨g, hg0, hg, hseries⟩ := PowerSeries.exists_chainStieltjes_of_moments_Icc + hL (ae_iff.mpr hsupport) (fun n => (hmom n).1) + have hlog : logDeriv (fun z => f z / f 0) = logDeriv f := + funext fun z => logDeriv_div_const z (f 0) h0 + refine ⟨∑' i, b i, mu.real Set.univ, g, hL, measureReal_nonneg, hg0, hg, ?_⟩ + rw [← hseries] + ext n + simp only [PowerSeries.coeff_mk, PowerSeries.coeff_map] + simpa only [hlog, Complex.coe_algebraMap] using (hmom n).2 + · rintro ⟨L, mass, g, hL, hmass, _, hg, hseries⟩ + apply (isLaguerrePolyaTypeI_div_iff_stieltjesTail hf h0).mpr + exact ⟨mass, PowerSeries.chainStieltjesNumerators L g, hmass, + PowerSeries.chainStieltjesNumerators_nonneg hL hg, hseries⟩ + +/-- The initial chain parameter may be arbitrary in the closed unit interval; +the existence criterion for normalized Type-I entire functions is unchanged. -/ +theorem isLaguerrePolyaTypeI_div_iff_bounded_chainStieltjesTail + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) : + IsLaguerrePolyaTypeI (fun z => f z / f 0) ↔ + ∃ (L mass : ℝ) (g : ℕ → ℝ), 0 ≤ L ∧ 0 ≤ mass ∧ + (∀ n, g n ∈ Set.Icc 0 1) ∧ + PowerSeries.mk (fun n => (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / + n.factorial) = PowerSeries.map (algebraMap ℝ ℂ) + (PowerSeries.C mass * PowerSeries.stieltjesTail + (PowerSeries.chainStieltjesNumerators L g) 0) := by + constructor + · intro hF + obtain ⟨L, mass, g, hL, hmass, _, hg, hs⟩ := + (isLaguerrePolyaTypeI_div_iff_chainStieltjesTail hf h0).mp hF + exact ⟨L, mass, g, hL, hmass, hg, hs⟩ + · rintro ⟨L, mass, g, hL, hmass, hg, hs⟩ + exact (isLaguerrePolyaTypeI_div_iff_stieltjesTail hf h0).mpr + ⟨mass, PowerSeries.chainStieltjesNumerators L g, hmass, + PowerSeries.chainStieltjesNumerators_nonneg hL hg, hs⟩ + +/-- For an entire function already normalized to one at zero, the bounded +Wall chain directly characterizes its positive Type-I membership. -/ +theorem isLaguerrePolyaTypeI_iff_chainStieltjesTail + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 = 1) : + IsLaguerrePolyaTypeI f ↔ + ∃ (L mass : ℝ) (g : ℕ → ℝ), 0 ≤ L ∧ 0 ≤ mass ∧ g 0 = 0 ∧ + (∀ n, g n ∈ Set.Icc 0 1) ∧ + PowerSeries.mk (fun n => (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / + n.factorial) = PowerSeries.map (algebraMap ℝ ℂ) + (PowerSeries.C mass * PowerSeries.stieltjesTail + (PowerSeries.chainStieltjesNumerators L g) 0) := by + simpa only [h0, div_one] using + isLaguerrePolyaTypeI_div_iff_chainStieltjesTail hf (by simp only [h0, one_ne_zero, ne_eq, + not_false_eq_true]) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DerivativeMultiplicity.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DerivativeMultiplicity.lean new file mode 100644 index 000000000..8c5078b50 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DerivativeMultiplicity.lean @@ -0,0 +1,85 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.LaguerreInequalities.Strict +import RealRooted.LaguerreInequalities.DerivativeFormula +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative + +/-! +# Multiplicity descent for an entire LP derivative shift + +A multiple zero of the nonzero function `f' + a f` forces one higher order +of vanishing of `f`. The strict first Laguerre equality classification handles +the first two equations; triangular differentiation recovers every higher +derivative. The nonzero-output assumption excludes annihilated exponentials. +This is the entire-function step in Craven–Csordas (1994), Lemma 4.2. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- The derivative of an ordinary exponential multiple is its slope times itself. -/ +private theorem deriv_eq_slope_mul_of_eq_exp {f : ℂ → ℂ} {b : ℝ} + (heq : ∀ z, f z = f 0 * exp ((b : ℂ) * z)) (z : ℂ) : + _root_.deriv f z = (b : ℂ) * f z := by + have hd := (((hasDerivAt_id' z).const_mul (b : ℂ)).cexp).const_mul (f 0) + have hf : f = fun w => f 0 * exp ((b : ℂ) * w) := funext heq + conv_lhs => rw [hf] + rw [hd.deriv, heq z] + ring + +/-- A double zero of a nonzero real derivative shift of an LP function +forces its first three Taylor derivatives to vanish. -/ +theorem IsLaguerrePolya.vanishing_of_linear_double_zero {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (a : ℝ) + (hne : ∃ z, _root_.deriv f z + (a : ℂ) * f z ≠ 0) {x : ℝ} + (hzero : _root_.deriv f x + (a : ℂ) * f x = 0) + (hderiv : _root_.deriv (_root_.deriv f) x + (a : ℂ) * _root_.deriv f x = 0) : + f x = 0 ∧ _root_.deriv f x = 0 ∧ _root_.deriv (_root_.deriv f) x = 0 := by + have h0r := congrArg Complex.re hzero + have h1r := congrArg Complex.re hderiv + simp only [add_re, mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero, zero_re] at h0r h1r + have hlag : laguerreCoefficient f x 1 = 0 := by + rw [laguerreCoefficient_one hf.differentiable hf.conj] + simp only [show (2 : ℕ) = 1 + 1 from rfl, iteratedDeriv_succ, iteratedDeriv_zero] + linear_combination (_root_.deriv f x).re * h0r - (f x).re * h1r + rcases (hf.laguerre_one_eq_zero_iff x).mp hlag with hmult | ⟨b, hb⟩ + · refine ⟨hmult.1, hmult.2, ?_⟩ + simpa only [hmult.2, mul_zero, add_zero] using hderiv + · have hdf := deriv_eq_slope_mul_of_eq_exp hb + have hconst : ((b : ℂ) + a) * f 0 = 0 := by + have hprod : (((b : ℂ) + a) * f 0) * exp ((b : ℂ) * x) = 0 := by + rw [hdf x, hb x] at hzero + linear_combination hzero + exact (mul_eq_zero.mp hprod).resolve_right (exp_ne_zero _) + obtain ⟨z, hz⟩ := hne + apply (hz ?_).elim + rw [hdf z, hb z] + calc + _ = (((b : ℂ) + a) * f 0) * exp ((b : ℂ) * z) := by ring + _ = 0 := by rw [hconst, zero_mul] + +/-- If the first `k ≥ 2` derivatives of a nonzero real derivative shift +vanish, the first `k+1` derivatives of the LP input vanish. -/ +theorem IsLaguerrePolya.vanishing_of_linear_differential {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (a : ℝ) + (hne : ∃ z, _root_.deriv f z + (a : ℂ) * f z ≠ 0) {x : ℝ} {k : ℕ} (hk : 2 ≤ k) + (hzero : ∀ j < k, iteratedDeriv (j + 1) f x + (a : ℂ) * iteratedDeriv j f x = 0) : + ∀ j < k + 1, iteratedDeriv j f x = 0 := by + have h0 : _root_.deriv f x + (a : ℂ) * f x = 0 := by simpa using hzero 0 (by lia) + have h1 : _root_.deriv (_root_.deriv f) x + (a : ℂ) * _root_.deriv f x = 0 := by + simpa only [iteratedDeriv_succ, iteratedDeriv_zero] using hzero 1 (by lia) + have hbase := (hf.vanishing_of_linear_double_zero a hne h0 h1).1 + intro j hj + induction j with + | zero => exact hbase + | succ j ih => + have hprev := ih (by lia) + have hnext := hzero j (by lia) + simpa only [hprev, mul_zero, add_zero] using hnext + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialApply.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialApply.lean new file mode 100644 index 000000000..40f1f04b3 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialApply.lean @@ -0,0 +1,52 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +public import RealRooted.Hermite.Poulain +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Polynomial differential operators on entire Laguerre--Pólya functions + +A real-rooted polynomial symbol acts on an entire Laguerre--Pólya target by a +finite linear combination of derivatives. The result remains in the class, +including the zero output. This is the finite-symbol case of the infinite +differential-operator theorem quoted by O'Sullivan as Theorem 3.6. +-/ + +public section + +open Complex Polynomial Filter Topology + +namespace RealRooted + +/-- Evaluating the Hermite--Poulain polynomial operator agrees with applying the +same finite differential symbol to the complex polynomial function. -/ +theorem differentialApply_eval_map (q p : ℝ[X]) (z : ℂ) : + (q.map ofRealHom).differentialApply (fun w => (p.map ofRealHom).eval w) z = + ((HermitePoulain.applyAsDifferentialOperator q p).map ofRealHom).eval z := by + simp only [Polynomial.differentialApply, HermitePoulain.applyAsDifferentialOperator, + natDegree_map_eq_of_injective ofRealHom.injective, coeff_map, iteratedDeriv_fun_eval, + iterate_derivative_map, smul_eq_mul, Polynomial.map_sum, Polynomial.map_mul, + Polynomial.map_C, Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C] + +/-- Every real-rooted polynomial differential symbol preserves the entire +Laguerre--Pólya class. Both a zero symbol and a zero output are allowed. -/ +theorem IsLaguerrePolya.differentialApply {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + {q : ℝ[X]} (hq : q.Splits) : IsLaguerrePolya ((q.map ofRealHom).differentialApply f) := by + by_cases hq0 : q = 0 + · simp only [hq0, Polynomial.map_zero, Polynomial.differentialApply_zero] + exact IsLaguerrePolya.zero + obtain ⟨p, hp, ht⟩ := hf + refine ⟨fun n => HermitePoulain.applyAsDifferentialOperator q (p n), fun n => ?_, ?_⟩ + · by_cases hp0 : p n = 0 + · exact Or.inl (by simp [hp0]) + · exact HermitePoulain.applyAsDifferentialOperator_eq_zero_or_splits ⟨hq0, hq⟩ + ⟨hp0, (hp n).resolve_left hp0⟩ + · have hlim := Polynomial.tendstoLocallyUniformly_differentialApply + (q.map ofRealHom) ht (fun n => (p n).map ofRealHom |>.differentiable) + convert hlim using 1 + ext n z + exact (differentialApply_eval_map q (p n) z).symm + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialMultiplicity.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialMultiplicity.lean new file mode 100644 index 000000000..ca4bd5102 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialMultiplicity.lean @@ -0,0 +1,145 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya + +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial + +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra + +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialApply + +public import Mathlib.Analysis.Analytic.Order +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DerivativeMultiplicity + +/-! +# Entire-target multiplicity for real-rooted differential symbols + +A multiple zero of a nonzero finite real-rooted differential image of an LP +function forces the input to vanish to the output order plus the symbol degree. +Translation gives the exponential-polynomial case of Craven–Csordas (1994), +Lemma 4.2. No growth restriction or nonzero constant coefficient is needed. +The nonzero-output premise is essential for annihilated exponential inputs. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Multiplicity descent through every factor of a real root multiset. -/ +private theorem vanishing_differential_root_product {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (s : Multiset ℝ) {x : ℝ} {k : ℕ} (hk : 2 ≤ k) + (hne : ∃ z, (((s.map (fun r => X - C r)).prod).map ofRealHom).differentialApply f z ≠ 0) + (hzero : ∀ j < k, iteratedDeriv (𝕜 := ℂ) (F := ℂ) j + ((((s.map (fun r => X - C r)).prod).map ofRealHom).differentialApply f) x = 0) : + ∀ j < k + s.card, iteratedDeriv j f x = 0 := by + induction s using Multiset.induction_on generalizing k with + | empty => simpa using hzero + | @cons r s ih => + let q : ℝ[X] := (s.map (fun r => X - C r)).prod + let g : ℂ → ℂ := (q.map ofRealHom).differentialApply f + have hq : q.Splits := Splits.multisetProd (by simp [Splits.X_sub_C]) + have hg : IsLaguerrePolya g := hf.differentialApply hq + have heq : + ((((r ::ₘ s).map (fun u => X - C u)).prod).map ofRealHom).differentialApply f = + fun z => _root_.deriv g z + ((-r : ℝ) : ℂ) * g z := by + simp only [Multiset.map_cons, Multiset.prod_cons, Polynomial.map_mul, + Polynomial.map_sub, Polynomial.map_X, Polynomial.map_C, ofRealHom_eq_coe] + rw [sub_eq_add_neg, ← C_neg, differentialApply_mul _ _ hf.differentiable, + differentialApply_add, differentialApply_X, differentialApply_C] + simp only [ofReal_neg] + rfl + rw [heq] at hne hzero + have hg0 : ∃ z, g z ≠ 0 := by + by_contra h + have hz : g = 0 := by ext z; simpa using not_exists.mp h z + simp [hz] at hne + have hback := hg.vanishing_of_linear_differential (-r) hne hk (by + intro j hj + simpa only [iteratedDeriv_linear_differential hg.differentiable] using hzero j hj) + have hprev := ih (by lia : 2 ≤ k + 1) hg0 hback + intro j hj + exact hprev j (by simpa only [Multiset.card_cons, Nat.add_assoc, Nat.add_comm 1] using hj) + +/-- A zero of order at least `k ≥ 2` of a nonzero real-rooted finite + differential image forces order at least `k + degree(q)` in the LP input. -/ +theorem IsLaguerrePolya.vanishing_of_differentialApply {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {q : ℝ[X]} (hq : q.Splits) + (hne : ∃ z, (q.map ofRealHom).differentialApply f z ≠ 0) {x : ℝ} {k : ℕ} + (hk : 2 ≤ k) + (hzero : ∀ j < k, iteratedDeriv j ((q.map ofRealHom).differentialApply f) x = 0) : + ∀ j < k + q.natDegree, iteratedDeriv j f x = 0 := by + have hq0 : q ≠ 0 := by + intro hz + simp [hz] at hne + have hlc : (q.leadingCoeff : ℂ) ≠ 0 := + ofReal_ne_zero.mpr (leadingCoeff_ne_zero.mpr hq0) + let g := (((q.roots.map (fun r => X - C r)).prod).map ofRealHom).differentialApply f + have heq : (q.map ofRealHom).differentialApply f = + fun z => (q.leadingCoeff : ℂ) * g z := by + conv_lhs => rw [hq.eq_prod_roots] + rw [Polynomial.map_mul, Polynomial.map_C, differentialApply_mul _ _ hf.differentiable, + differentialApply_C] + rfl + have hg0 : ∃ z, g z ≠ 0 := by + obtain ⟨z, hz⟩ := hne + refine ⟨z, ?_⟩ + rw [heq] at hz + exact (mul_ne_zero_iff.mp hz).2 + have hgvan : ∀ j < k, iteratedDeriv j g x = 0 := by + intro j hj + have h := hzero j hj + rw [heq, iteratedDeriv_const_mul_field] at h + exact (mul_eq_zero.mp h).resolve_left hlc + rw [hq.natDegree_eq_card_roots] + exact vanishing_differential_root_product hf q.roots hk hg0 hgvan + +/-- Translating a finite differential image traces a multiple zero back to the +translated input point. This is the exponential-polynomial differential-symbol +case of Craven–Csordas (1994), Lemma 4.2, with arbitrary multiple-zero order. -/ +theorem IsLaguerrePolya.vanishing_of_differentialApply_translate {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {q : ℝ[X]} (hq : q.Splits) (a : ℝ) + (hne : ∃ z, (q.map ofRealHom).differentialApply f z ≠ 0) {x : ℝ} {k : ℕ} + (hk : 2 ≤ k) + (hzero : ∀ j < k, iteratedDeriv (𝕜 := ℂ) (F := ℂ) j + (fun z => (q.map ofRealHom).differentialApply f (z + a)) x = 0) : + ∀ j < k + q.natDegree, iteratedDeriv j f (x + a : ℝ) = 0 := by + apply hf.vanishing_of_differentialApply hq hne hk + intro j hj + simpa only [iteratedDeriv_comp_add_const, ofReal_add] using hzero j hj + +/-- Analytic-order form of multiplicity descent for a nonzero finite +real-rooted differential image of an LP function. -/ +theorem IsLaguerrePolya.le_analyticOrderAt_of_differentialApply {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {q : ℝ[X]} (hq : q.Splits) + (hne : ∃ z, (q.map ofRealHom).differentialApply f z ≠ 0) {x : ℝ} {k : ℕ} + (hk : 2 ≤ k) + (horder : (k : ℕ∞) ≤ analyticOrderAt ((q.map ofRealHom).differentialApply f) (x : ℂ)) : + ((k + q.natDegree : ℕ) : ℕ∞) ≤ analyticOrderAt f (x : ℂ) := by + rw [natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero + (hf.differentiable.analyticAt _)] + apply hf.vanishing_of_differentialApply hq hne hk + exact (natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero + ((hf.differentialApply hq).differentiable.analyticAt _)).mp horder + +/-- A finite real-rooted differential image has a simple zero whenever the +input has a nonvanishing derivative below the symbol degree plus two there. -/ +theorem IsLaguerrePolya.deriv_differentialApply_ne_zero_of_jet {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) {q : ℝ[X]} (hq : q.Splits) + (hne : ∃ z, (q.map ofRealHom).differentialApply f z ≠ 0) {x : ℝ} + (hjet : ∃ j < q.natDegree + 2, iteratedDeriv j f x ≠ 0) + (hzero : (q.map ofRealHom).differentialApply f x = 0) : + _root_.deriv ((q.map ofRealHom).differentialApply f) x ≠ 0 := by + intro hd + have hvan := hf.vanishing_of_differentialApply hq hne (k := 2) (by lia) (by + intro j hj + have hjcases : j = 0 ∨ j = 1 := by lia + rcases hjcases with rfl | rfl + · simpa only [iteratedDeriv_zero] using hzero + · simpa only [iteratedDeriv_one] using hd) + obtain ⟨j, hj, hne⟩ := hjet + exact hne (hvan j (by lia)) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialTailSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialTailSimple.lean new file mode 100644 index 000000000..8dbef7840 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/DifferentialTailSimple.lean @@ -0,0 +1,59 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialMultiplicity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Complex.CompactJets +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Simplicity from growing finite differential factors + +A common nonzero image of finite real-rooted operators cannot have a multiple +zero if their degrees diverge and their LP inputs converge locally uniformly +to a nonzero entire function. Multiplicity descent would force every fixed +Taylor derivative of the limit to vanish at that point. +-/ + +public section + +open Complex Polynomial Filter Topology + +namespace RealRooted + +/-- Growing finite differential factors force simplicity of a common nonzero +image when the LP inputs have a nonzero entire locally uniform limit. -/ +theorem deriv_ne_zero_of_differential_tails + {g : ℕ → ℂ → ℂ} {f H : ℂ → ℂ} {p : ℕ → ℝ[X]} + (hg : ∀ n, IsLaguerrePolya (g n)) + (hlim : TendstoLocallyUniformly g f atTop) + (hf : Differentiable ℂ f) (hf0 : f ≠ 0) + (hp : ∀ n, (p n).Splits) + (hdeg : Tendsto (fun n => (p n).natDegree) atTop atTop) + (hfac : ∀ n, H = ((p n).map ofRealHom).differentialApply (g n)) + (hH : H ≠ 0) {x : ℝ} (hx : H x = 0) : _root_.deriv H x ≠ 0 := by + intro hd + obtain ⟨j, hj⟩ := Complex.exists_iteratedDeriv_ne_zero hf hf0 (x : ℂ) + have hzero : ∀ᶠ n in atTop, iteratedDeriv j (g n) x = 0 := by + filter_upwards [(tendsto_atTop.mp hdeg) j] with n hn + have hne : ∃ z, ((p n).map ofRealHom).differentialApply (g n) z ≠ 0 := by + rw [← hfac n] + simpa only [Pi.zero_apply] using Function.ne_iff.mp hH + have hvan := (hg n).vanishing_of_differentialApply (hp n) hne (k := 2) + (by decide) (by + intro i hi + rw [← hfac n] + have hi' : i = 0 ∨ i = 1 := by lia + rcases hi' with rfl | rfl + · simpa only [iteratedDeriv_zero] using hx + · simpa only [iteratedDeriv_one] using hd) + exact hvan j (by lia) + have hderiv := (tendstoLocallyUniformlyOn_univ.mpr + (hlim.iteratedDeriv (fun n => (hg n).differentiable) j)).tendsto_at + (Set.mem_univ (x : ℂ)) + have hzlim : Tendsto (fun n => iteratedDeriv j (g n) x) atTop (𝓝 (0 : ℂ)) := + (tendsto_congr' hzero).mpr tendsto_const_nhds + exact hj (tendsto_nhds_unique hderiv hzlim) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FiniteGaussian.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FiniteGaussian.lean new file mode 100644 index 000000000..c6ef0c0e3 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FiniteGaussian.lean @@ -0,0 +1,47 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FiniteZeros +import RealRooted.LaguerreInequalities.ZeroFree +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Finite-zero LP functions are polynomial–Gaussian products + +Removing all finitely many zeros leaves a zero-free LP function. Its +Nevanlinna representation has zero measure, hence it is a real exponential +times a Gaussian. The real nonzero scalar is absorbed into the polynomial. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Every LP function nonzero at zero with finitely many distinct real +zeros is a split polynomial times a real exponential and a Gaussian. -/ +theorem IsLaguerrePolya.exists_polynomial_gaussian_of_finite_zeros {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hfin : Set.Finite {r : ℝ | f r = 0}) : + ∃ (q : ℝ[X]) (a b : ℝ), q.Splits ∧ q.coeff 0 ≠ 0 ∧ 0 ≤ b ∧ ∀ z, + f z = (q.map ofRealHom).eval z * exp ((a : ℂ) * z - (b : ℂ) * z ^ 2 / 2) := by + obtain ⟨q, g, hq, hq0, hg, hgnz, hfactor⟩ := + hf.exists_polynomial_factor_of_finite_zeros hf0 hfin + obtain ⟨a, b, hb, hgexp⟩ := hg.exists_exp_quadratic_of_forall_ne_zero hgnz + have hreal : ((g 0).re : ℂ) = g 0 := by + simpa only [iteratedDeriv_zero] using ofReal_re_iteratedDeriv_zero hg.conj 0 + have hgre : (g 0).re ≠ 0 := by + intro hz + apply hgnz 0 + rw [← hreal, hz, ofReal_zero] + refine ⟨C (g 0).re * q, a, b, hq.C_mul _, ?_, hb, ?_⟩ + · rw [coeff_C_mul] + exact mul_ne_zero hgre hq0 + · intro z + rw [hfactor, hgexp] + simp only [Polynomial.map_mul, map_C, eval_mul, eval_C, ofRealHom_eq_coe, hreal] + ring + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FiniteZeros.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FiniteZeros.lean new file mode 100644 index 000000000..52aad8444 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FiniteZeros.lean @@ -0,0 +1,113 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RootDivision +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import TauCeti.Analysis.Analytic.ExtractZeros + +/-! +# Removing all zeros of an LP function with finitely many zeros + +An LP function nonzero at the origin and with finitely many distinct real +zeros is a real-rooted polynomial times a zero-free LP function. Each zero is +removed with its full analytic multiplicity. No growth bound is imposed. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Removing a full analytic zero leaves an entire LP cofactor nonzero there. -/ +private theorem extract_full_real_zero {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + (hf0 : f 0 ≠ 0) (r : ℝ) : + ∃ (m : ℕ) (g : ℂ → ℂ), IsLaguerrePolya g ∧ g 0 ≠ 0 ∧ g r ≠ 0 ∧ + ∀ z, f z = (z - r) ^ m * g z := by + have ha : AnalyticOnNhd ℂ f Set.univ := hf.analyticOnNhd + have hfinite : analyticOrderAt f (r : ℂ) ≠ ⊤ := + ha.analyticOrderAt_ne_top_of_isPreconnected isPreconnected_univ + (Set.mem_univ (0 : ℂ)) (Set.mem_univ (r : ℂ)) + (by simp [analyticOrderAt_eq_zero.mpr (.inr hf0)]) + let m := analyticOrderNatAt f (r : ℂ) + obtain ⟨g, hg, hfg⟩ := ha.exists_eq_prod_pow_smul {(r : ℂ)} (fun _ => m) + (by simpa [m] using (Nat.cast_analyticOrderNatAt hfinite).le) + have hfactor (z : ℂ) : f z = (z - r) ^ m * g z := by simpa using hfg z + have hga : AnalyticAt ℂ g (r : ℂ) := hg _ (Set.mem_univ _) + have heq : f = (· - (r : ℂ)) ^ m * g := by + funext z + simpa only [Pi.mul_apply, Pi.pow_apply] using hfactor z + have horder : (m : ℕ∞) + analyticOrderAt g (r : ℂ) = m := by + calc + _ = analyticOrderAt ((· - (r : ℂ)) ^ m * g) (r : ℂ) := by + rw [analyticOrderAt_mul (by fun_prop) hga, analyticOrderAt_centeredMonomial] + _ = analyticOrderAt f (r : ℂ) := by rw [← heq] + _ = (m : ℕ∞) := by simpa [m] using (Nat.cast_analyticOrderNatAt hfinite).symm + have hgr : g r ≠ 0 := hga.analyticOrderAt_eq_zero.mp + (ENat.add_right_injective_of_ne_top (ENat.natCast_ne_top m) + (horder.trans (add_zero _).symm)) + have hg0 : g 0 ≠ 0 := by + intro hz + exact hf0 (by rw [hfactor, hz, mul_zero]) + have hLP : IsLaguerrePolya (fun z => (z - r) ^ m * g z) := by + rw [show (fun z => (z - r) ^ m * g z) = f from (funext hfactor).symm] + exact hf + exact ⟨m, g, hLP.of_sub_pow_mul r m (differentiableOn_univ.mp hg.differentiableOn), + hg0, hgr, hfactor⟩ + +/-- Finite zero-set containment suffices for complete extraction. -/ +private theorem exists_factor_of_zero_set_subset (s : Finset ℝ) {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hzeros : ∀ r : ℝ, f r = 0 → r ∈ s) : + ∃ (q : ℝ[X]) (g : ℂ → ℂ), q.Splits ∧ q.coeff 0 ≠ 0 ∧ IsLaguerrePolya g ∧ + (∀ z, g z ≠ 0) ∧ ∀ z, f z = (q.map ofRealHom).eval z * g z := by + classical + induction s using Finset.induction_on generalizing f with + | empty => + refine ⟨1, f, Splits.one, by simp, hf, ?_, by simp⟩ + intro z hz + have hfn : f ≠ 0 := fun h => hf0 (by simp [h]) + have him := hf.im_eq_zero_of_eq_zero hfn hz + have hreal : (z.re : ℂ) = z := by apply Complex.ext <;> simp [him] + have hr := hzeros z.re (by rwa [hreal]) + exact Finset.notMem_empty _ hr + | @insert r s hrs ih => + by_cases hr : f r = 0 + · have hr0 : r ≠ 0 := by intro hz; subst r; exact hf0 (by simpa using hr) + obtain ⟨m, g, hg, hg0, hgr, hfactor⟩ := extract_full_real_zero hf hf0 r + have hsubset : ∀ u : ℝ, g u = 0 → u ∈ s := by + intro u hu + have hfu : f u = 0 := by rw [hfactor, hu, mul_zero] + rcases Finset.mem_insert.mp (hzeros u hfu) with hur | hus + · subst u + exact (hgr hu).elim + · exact hus + obtain ⟨q, t, hq, hq0, ht, htnz, hgt⟩ := ih hg hg0 hsubset + refine ⟨(X - C r) ^ m * q, t, ((Splits.X_sub_C r).pow m).mul hq, + ?_, ht, htnz, ?_⟩ + · rw [coeff_zero_eq_eval_zero, eval_mul, eval_pow, eval_sub, eval_X, eval_C, + zero_sub, ← coeff_zero_eq_eval_zero] + exact mul_ne_zero (pow_ne_zero _ (neg_ne_zero.mpr hr0)) hq0 + · intro z + rw [hfactor, hgt] + simp [Polynomial.map_mul, Polynomial.map_pow, Polynomial.map_sub, mul_assoc] + · apply ih hf hf0 + intro u hu + rcases Finset.mem_insert.mp (hzeros u hu) with hur | hus + · subst u + exact (hr hu).elim + · exact hus + +/-- An LP function with finitely many distinct real zeros and nonzero initial +value is a real-rooted polynomial times a zero-free LP function. -/ +theorem IsLaguerrePolya.exists_polynomial_factor_of_finite_zeros {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hfin : Set.Finite {r : ℝ | f r = 0}) : + ∃ (q : ℝ[X]) (g : ℂ → ℂ), q.Splits ∧ q.coeff 0 ≠ 0 ∧ IsLaguerrePolya g ∧ + (∀ z, g z ≠ 0) ∧ ∀ z, f z = (q.map ofRealHom).eval z * g z := by + classical + exact exists_factor_of_zero_set_subset hfin.toFinset hf hf0 + (fun r hr => hfin.mem_toFinset.mpr hr) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FormalJensen.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FormalJensen.lean new file mode 100644 index 000000000..86752acfd --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/FormalJensen.lean @@ -0,0 +1,100 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.BorceaBranden.Transcendental.UniformSzasz +import RealRooted.Mathlib.Analysis.Complex.Polynomial.CoeffEstimates +import RealRooted.HermiteBiehler.Basic +import RealRooted.Mathlib.Analysis.SpecialFunctions.Choose + +/-! +# Entire convergence from formal Jensen hyperbolicity + +If all Jensen polynomials of a real sequence split, its exponential generating +series converges everywhere and belongs to the Laguerre--Pólya class. No prior +analytic convergence assumption is needed. The proof uses the Szász bound on +rescaled Jensen polynomials, including sequences with an arbitrary zero prefix. +-/ + +public section + +open Polynomial Complex Filter Topology + +namespace RealRooted + +private theorem summable_of_jensenPolynomial_splits (gamma : ℕ → ℝ) + (h : ∀ n, (jensenPolynomial n gamma).Splits) (R : ℝ) (hR : 0 ≤ R) : + Summable (fun k => ‖gamma k‖ * R ^ k / k.factorial) := by + let p : ℕ → ℝ[X] := fun n => rescaledJensenPolynomial n gamma + have hp (n : ℕ) : (p n).Splits := by + dsimp [p] + rw [rescaledJensenPolynomial_eq_jensenPolynomial_comp] + exact (h n).comp_of_natDegree_le_one ((natDegree_C_mul_le _ _).trans (by simp)) + let f : ℕ → MvPolynomial Unit ℂ := fun n => + (MvPolynomial.uniqueAlgEquiv ℂ Unit).symm ((p n).map ofRealHom) + let a : (Unit →₀ ℕ) → ℂ := fun e => (gamma (e ()) / (e ()).factorial : ℝ) + let κ : ℕ → (Unit →₀ ℕ) → ℝ := fun n e => + (n.choose (e ()) : ℝ) * ((n : ℝ)⁻¹) ^ e () * (e ()).factorial + have hcoef (n : ℕ) (e : Unit →₀ ℕ) : (f n).coeff e = (κ n e : ℂ) * a e := by + simp only [f, MvPolynomial.coeff_uniqueAlgEquiv_symm, coeff_map, p, + coeff_rescaledJensenPolynomial, κ, a] + by_cases he : e () ≤ n + · rw [ite_eq_left he] + simp only [ofRealHom_eq_coe] + push_cast + have hfac : (((e ()).factorial : ℕ) : ℂ) ≠ 0 := by + exact_mod_cast Nat.factorial_ne_zero (e ()) + field_simp [hfac] + · rw [ite_eq_right he, Nat.choose_eq_zero_of_lt (lt_of_not_ge he)] + simp + have hκ (e : Unit →₀ ℕ) : Tendsto (fun n => κ n e) atTop (𝓝 1) := by + have ht := (Nat.tendsto_choose_mul_inv_pow_atTop (e ())).mul_const + ((e ()).factorial : ℝ) + simpa [κ, div_eq_mul_inv, Nat.factorial_ne_zero] using ht + have hst (n : ℕ) : MvUpperHalfPlaneStable (f n) ∨ f n = 0 := by + by_cases hn : p n = 0 + · right + simp [f, hn] + · left + intro z hz + change MvPolynomial.eval₂ (RingHom.id ℂ) z (f n) ≠ 0 + rw [show f n = (MvPolynomial.uniqueAlgEquiv ℂ Unit).symm + ((p n).map ofRealHom) from rfl] + rw [MvPolynomial.eval₂_uniqueAlgEquiv_symm] + exact isUpperHalfPlaneStable_complexify_of_splits (hp n) hn (z ()) (hz ()) + obtain ⟨B, C, n₀, hbound⟩ := + BorceaBranden.exists_norm_eval_le_exp_sq a κ f hcoef hκ hst + have hlimit (e : Unit →₀ ℕ) : + Tendsto (fun n => (f (n + n₀)).coeff e) atTop (𝓝 (a e)) := by + simp only [hcoef] + have ht := ((hκ e).comp (tendsto_add_atTop_nat n₀)).ofReal.mul_const (a e) + simpa using ht + obtain ⟨hsum, _⟩ := MvPolynomial.tendstoLocallyUniformly_of_bounded_of_coeff_tendsto + (fun n => f (n + n₀)) a + (fun r hr => ⟨B * Real.exp (C * r ^ 2), + fun n z hz => hbound (n + n₀) (Nat.le_add_left _ _) r hr.le z hz⟩) hlimit + have hs := (hsum (fun _ : Unit => (R : ℂ))).comp_injective + (Finsupp.single_injective ()) + simpa [a, Function.comp_def, norm_mul, norm_pow, abs_of_nonneg hR, norm_div, + mul_div_assoc, div_mul_eq_mul_div] using hs + +/-- Formal Jensen hyperbolicity forces absolute convergence of the exponential +generating series at every nonnegative radius, even with an initial zero prefix. -/ +theorem summable_norm_div_factorial_of_jensenPolynomial_splits (gamma : ℕ → ℝ) + (h : ∀ n, (jensenPolynomial n gamma).Splits) (R : ℝ) (hR : 0 ≤ R) : + Summable (fun k => ‖gamma k‖ * R ^ k / k.factorial) := + summable_of_jensenPolynomial_splits gamma h R hR + +/-- All real Jensen polynomials splitting already implies that the formal +exponential generating function is an entire Laguerre--Pólya function. -/ +theorem isLaguerrePolya_of_jensenPolynomial_splits (gamma : ℕ → ℝ) + (h : ∀ n, (jensenPolynomial n gamma).Splits) : + IsLaguerrePolya (complexExpGeneratingFunction gamma) := by + rw [complexExpGeneratingFunction_eq_tsum] + refine ⟨fun n => rescaledJensenPolynomial n gamma, fun n => Or.inr ?_, + tendstoLocallyUniformly_eval_complex_rescaledJensenPolynomial_of_summable gamma + (summable_of_jensenPolynomial_splits gamma h)⟩ + dsimp only + rw [rescaledJensenPolynomial_eq_jensenPolynomial_comp] + exact (h n).comp_of_natDegree_le_one ((natDegree_C_mul_le _ _).trans (by simp)) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/ForwardDifference.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/ForwardDifference.lean new file mode 100644 index 000000000..52067064b --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/ForwardDifference.lean @@ -0,0 +1,69 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Analysis.Complex.ForwardDifference +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeICriterion +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PolynomialFactors +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative + +/-! +# Signed forward differences for Type-I functions below order one + +A nonpolynomial positive Type-I function of order below one has a negative real +zero. Consequently its Taylor derivatives have a negative signed forward +difference of some positive order. This is a derived consequence of the Taylor +expansion and the zero-free growth theorem. It concerns all orders at a fixed +shift, and does not contradict eventual positivity in the shift at each fixed +order. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- A nonpolynomial positive Type-I function of order below one and with a +positive value at zero has a negative real zero. -/ +theorem IsLaguerrePolyaTypeI.exists_neg_real_zero_of_order_lt_one + {f : ℂ → ℂ} {rho : ℝ} (hf : IsLaguerrePolyaTypeI f) + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) (h0 : 0 < (f 0).re) + (hnp : ∀ q : ℂ[X], f ≠ fun z => q.eval z) : + ∃ x : ℝ, x < 0 ∧ f x = 0 := by + have hf0 : f 0 ≠ 0 := by intro hz; simp [hz] at h0 + have hfn : f ≠ 0 := fun hz => hf0 (by simp [hz]) + have hlp := hf.toLaguerrePolya + obtain ⟨q, g, hq, _, hdegree, _, _, hfactor⟩ := + exists_polynomial_factor_of_order_lt_one horder hrho hlp.differentiable hf0 hlp.conj + (fun z hz => hlp.im_eq_zero_of_eq_zero hfn hz) hnp 1 + have hqdegree : q.natDegree ≠ 0 := Nat.ne_of_gt hdegree + obtain ⟨x, hx⟩ := hq.exists_eval_eq_zero (degree_ne_of_natDegree_ne hqdegree) + have hroot : f x = 0 := by + rw [hfactor] + have heq : (q.map ofRealHom).eval (x : ℂ) = 0 := by + rw [show (x : ℂ) = ofRealHom x from rfl, eval_map, eval₂_at_apply] + simp [hx] + rw [heq, zero_mul] + refine ⟨x, ?_, hroot⟩ + by_contra! hxnonneg + have hpos := (isLaguerrePolyaTypeI_iff_isLaguerrePolya_nonneg.mp hf).2 + have hb := hlp.differentiable.re_apply_le_of_iteratedDeriv_nonneg + (fun n _ => hpos n) hxnonneg + rw [hroot, zero_re] at hb + exact (not_le_of_gt h0) hb + +/-- A nonpolynomial positive Type-I function of order below one has a negative +signed forward difference of some positive order in its Taylor derivatives. -/ +theorem IsLaguerrePolyaTypeI.exists_signed_fwdDiff_iter_neg + {f : ℂ → ℂ} {rho : ℝ} (hf : IsLaguerrePolyaTypeI f) + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) (h0 : 0 < (f 0).re) + (hnp : ∀ q : ℂ[X], f ≠ fun z => q.eval z) : + ∃ n : ℕ, n ≠ 0 ∧ + (-1 : ℝ) ^ n * ((fwdDiff 1)^[n] (fun k => (iteratedDeriv k f 0).re)) 0 < 0 := by + obtain ⟨x, hx, hroot⟩ := hf.exists_neg_real_zero_of_order_lt_one horder hrho h0 hnp + exact Complex.exists_signed_fwdDiff_iter_neg_of_neg_zero + hf.toLaguerrePolya.differentiable h0 hx hroot + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GaussianBoundSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GaussianBoundSimple.lean new file mode 100644 index 000000000..8a2c7cf41 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GaussianBoundSimple.lean @@ -0,0 +1,65 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalRepresentation +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalMultiplicitySimple +import RealRooted.LaguerreInequalities.InverseSquare +import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GaussianCoefficient +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative + +/-! +# Infinite-zero differential simplicity from the native LP predicates + +The canonical representation and its Gaussian coefficient are derived from +the closure definition of LP. No canonical equality is supplied by the caller. +The output is the actual infinite differential series, including its zero case. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Native LP symbols with infinitely many real zeros have zero or simple LP +output at the strict Gaussian product threshold. Both sharp Gaussian bounds +are analytic hypotheses; no product representation or simplicity is assumed. -/ +theorem IsLaguerrePolya.differential_simple_or_zero_of_gaussian_bounds + {φ f : ℂ → ℂ} (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) + {α β : ℝ} (hβ : 0 ≤ β) (hab : 4 * α * β < 1) + (hφbound : ∀ ε > 0, ∃ C > 0, ∀ z, + ‖φ z‖ ≤ C * Real.exp ((α + ε) * ‖z‖ ^ 2)) + (hfbound : ∀ ε > 0, ∃ C > 0, ∀ z, + ‖f z‖ ≤ C * Real.exp ((β + ε) * ‖z‖ ^ 2)) + (hinf : Set.Infinite {x : ℝ | φ x = 0}) : + infiniteDifferentialApply φ f = 0 ∨ + IsLaguerrePolya (infiniteDifferentialApply φ f) ∧ + ∀ z, infiniteDifferentialApply φ f z = 0 → + z.im = 0 ∧ _root_.deriv (infiniteDifferentialApply φ f) z ≠ 0 := by + by_cases hzero : φ = 0 + · left + ext z + simp only [hzero, infiniteDifferentialApply, iteratedDeriv_const_zero, + zero_mul, zero_div, tsum_zero, Pi.zero_apply] + · obtain ⟨g, hg, hg0, c, b, A, hc, hA, heq⟩ := + hφ.exists_eq_pow_mul_exp_mul_realZeroProduct hzero + let a : {x : ℝ | g x = 0} → ℝ := fun r ↦ (r : ℝ)⁻¹ + let m : {x : ℝ | g x = 0} → ℕ := fun r ↦ analyticOrderNatAt g (r : ℂ) + have hm : Summable (fun r ↦ (m r : ℝ) * a r ^ 2) := by + simpa only [m, a, inv_pow, div_eq_mul_inv] using + summable_analyticOrderNatAt_div_sq hg.differentiable hg.conj hg0 + hg.laguerreCoefficient_nonneg + have hcanonical (z : ℂ) : φ z = (c : ℂ) * z ^ analyticOrderNatAt φ 0 * + exp (-(A : ℂ) * z ^ 2 + (b : ℂ) * z) * + ∏' r, weierstrassFactor 1 ((a r : ℂ) * z) ^ m r := by + simpa only [realZeroProduct, a, m, ofReal_inv] using heq z + have hAle := gaussian_le_of_canonical_norm_bound a m hm hc b A + (analyticOrderNatAt φ 0) hcanonical hφbound + have hprod : 4 * A * β < 1 := + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hAle (by norm_num)) hβ).trans_lt hab + exact hf.canonical_multiplicity_differential_simple_or_zero a m hm c b + (analyticOrderNatAt φ 0) hA hβ hprod hcanonical hinf hfbound + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GeneralizedInequality.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GeneralizedInequality.lean new file mode 100644 index 000000000..1f2e39563 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GeneralizedInequality.lean @@ -0,0 +1,66 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.LaguerreInequalities.Analytic +import RealRooted.LaguerreInequalities.GeneratingPolynomial +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import RealRooted.PFPolynomial.Closure +import Mathlib.Algebra.Polynomial.Expand + +/-! +# Total positivity of the generalized Laguerre coefficients + +For a Laguerre--Pólya function `f` and real `x`, the sequence of generalized +Laguerre coefficients is Pólya-frequency. This strengthens the generalized +Laguerre inequalities to nonnegativity of every Toeplitz minor. +-/ + +public section + +open Complex Filter Polynomial Topology + +namespace RealRooted + +/-- At each real point, generalized Laguerre coefficients are coefficientwise +limits of PF polynomials. -/ +theorem IsLaguerrePolya.exists_pf_laguerreCoefficient_approx {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (x : ℝ) : + ∃ p : ℕ → ℝ[X], (∀ n, IsPFPolynomial (p n)) ∧ + ∀ k, Tendsto (fun n => (p n).coeff k) atTop (𝓝 (laguerreCoefficient f x k)) := by + have hc := hf.differentiable.continuous + obtain ⟨p, hp, hlim⟩ := hf + have hs (n : ℕ) : (p n).Splits := (hp n).elim (fun h => h ▸ Splits.zero) id + have hplus := hlim.comp (fun z : ℂ => (x : ℂ) + z * I) (by fun_prop) + have hminus := hlim.comp (fun z : ℂ => (x : ℂ) - z * I) (by fun_prop) + have hprod := hplus.mul₀ hminus (hc.comp (by fun_prop)) (hc.comp (by fun_prop)) + have hexpand : TendstoLocallyUniformly + (fun n z => ((expand ℝ 2 (laguerreGeneratingPolynomial (p n) x)).map ofRealHom).eval z) + (laguerreProduct f x) atTop := by + convert hprod using 1 + · ext n z + simp only [Pi.mul_apply, Function.comp_apply, expand_eq_comp_X_pow, + Polynomial.map_comp, Polynomial.map_pow, map_X, eval_comp, eval_pow, eval_X, + eval_laguerreGeneratingPolynomial (hs n)] + · rfl + refine ⟨fun n => laguerreGeneratingPolynomial (p n) x, + fun n => isPFPolynomial_laguerreGeneratingPolynomial (p n) x, ?_⟩ + intro k + simpa only [coeff_expand_mul' (by norm_num : 0 < 2), Complex.div_natCast_re, + laguerreCoefficient] using + Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hexpand (2 * k) + +/-- At each real point, the generalized Laguerre coefficients of a +Laguerre--Pólya function form a Pólya-frequency sequence. -/ +theorem IsLaguerrePolya.isPolyaFreqSeq_laguerreCoefficient {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (x : ℝ) : IsPolyaFreqSeq (laguerreCoefficient f x) := by + obtain ⟨p, hp, hlim⟩ := hf.exists_pf_laguerreCoefficient_approx x + exact IsPolyaFreqSeq.of_tendsto (fun n => (hp n).to_sequence) hlim + +/-- Every generalized Laguerre coefficient of a Laguerre--Pólya function is +nonnegative on the real axis. -/ +theorem IsLaguerrePolya.laguerreCoefficient_nonneg {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (x : ℝ) (n : ℕ) : 0 ≤ laguerreCoefficient f x n := + (hf.isPolyaFreqSeq_laguerreCoefficient x).nonneg n + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusOne.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusOne.lean new file mode 100644 index 000000000..b038e9f99 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusOne.lean @@ -0,0 +1,111 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOne +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlow +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Examples +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Star +import TauCeti.Analysis.Complex.CanonicalProduct.LogDeriv +import TauCeti.Analysis.SpecialFunctions.Complex.Exp.LogDeriv + +/-! +# Real zeros of genus-one-star functions + +A real entire function of genus `1*` is Laguerre--Pólya when all its zeros are +real. The proof starts with the complex canonical representation, recovers real +slopes from its zeros, and recovers the real constant and linear coefficients +after cancelling the origin power. No nonzero origin value is assumed. +-/ + +public section + +open Complex Polynomial +open scoped ComplexConjugate + +namespace RealRooted + +private theorem im_slope_eq_zero {f : ℂ → ℂ} {c b : ℂ} {a : ℝ} {m : ℕ} + {u : ℕ → ℂ} (hu : Summable (fun n => ‖u n‖ ^ 2)) + (heq : ∀ z, f z = c * z ^ m * exp (-(a : ℂ) * z ^ 2 + b * z) * + ∏' n, weierstrassFactor 1 (u n * z)) + (hz : ∀ z, f z = 0 → z.im = 0) (n : ℕ) : (u n).im = 0 := by + by_cases hn : u n = 0 + · simp [hn] + have hr : f (u n)⁻¹ = 0 := by + rw [heq, (tprod_weierstrassFactor_one_eq_zero_iff u hu _).mpr + ⟨n, mul_inv_cancel₀ hn⟩, mul_zero] + have hc := conj_eq_iff_im.mpr (hz _ hr) + rw [map_inv₀, inv_inj] at hc + exact conj_eq_iff_im.mp hc + +private theorem real_canonical_cofactor {c b : ℂ} {a : ℝ} {u : ℕ → ℂ} + (hc : c ≠ 0) (hu : Summable (fun n => ‖u n‖ ^ 2)) + (hconj : ∀ z, (c * (exp (-(a : ℂ) * (conj z) ^ 2 + b * conj z) * + ∏' n, weierstrassFactor 1 (u n * conj z))) = + conj (c * (exp (-(a : ℂ) * z ^ 2 + b * z) * + ∏' n, weierstrassFactor 1 (u n * z)))) : c.im = 0 ∧ b.im = 0 := by + have hcReal : c.im = 0 := by + apply conj_eq_iff_im.mp + simpa using (hconj 0).symm + have hsum : Summable (fun n => ((1 : ℕ) : ℝ) * ‖u n‖ ^ 2) := by simpa using hu + have hPlog : logDeriv (fun z => ∏' n, weierstrassFactor 1 (u n * z)) 0 = 0 := by + have hh := logDeriv_tprod_weierstrassFactor_one_pow u (fun _ => 1) hsum + (z := 0) (by simp) + simpa [logDerivWeierstrassFactorOneMul_def] using hh + have hbReal := logDeriv_ofReal_im + (f := fun z => c * (exp (-(a : ℂ) * z ^ 2 + b * z) * + ∏' n, weierstrassFactor 1 (u n * z))) hconj 0 + simp only [ofReal_zero] at hbReal + rw [logDeriv_const_mul _ _ hc, TauCeti.logDeriv_cexp_mul (by simp) + (differentiable_tprod_weierstrassFactor_one u hu 0) (by fun_prop), hPlog, + add_zero, deriv_fun_add (by fun_prop) (by fun_prop), + deriv_const_mul _ (by fun_prop), deriv_pow_field, deriv_const_mul_id] at hbReal + simpa using And.intro hcReal hbReal + +/-- A real function of genus one star with only real zeros belongs to the +Laguerre--Pólya class, allowing any multiplicity at the origin. -/ +theorem isLaguerrePolya_of_hasGenusOneStar {f : ℂ → ℂ} + (hf : HasGenusOneStar f) (hc : ∀ z, f (conj z) = conj (f z)) + (hz : ∀ z, f z = 0 → z.im = 0) : IsLaguerrePolya f := by + obtain ⟨c, b, a, m, u, hc0, ha, hu, heq⟩ := hf + have huReal (n : ℕ) : ((u n).re : ℂ) = u n := + conj_eq_iff_re.mp (conj_eq_iff_im.mpr (im_slope_eq_zero hu heq hz n)) + let P : ℂ → ℂ := fun z => ∏' n, weierstrassFactor 1 (u n * z) + have hP : IsLaguerrePolya P := by + have hs : Summable (fun n => ((1 : ℕ) : ℝ) * (u n).re ^ 2) := by + convert hu using 1 + funext n + rw [Nat.cast_one, one_mul, ← huReal n] + simp only [ofReal_re, Complex.norm_real, Real.norm_eq_abs, sq_abs] + simpa only [pow_one, huReal] using + isLaguerrePolya_tprod_weierstrassFactor_one_pow (fun n => (u n).re) (fun _ => 1) hs + let g : ℂ → ℂ := fun z => c * (exp (-(a : ℂ) * z ^ 2 + b * z) * P z) + have hg : Differentiable ℂ g := by + exact (differentiable_const c).mul ((Differentiable.cexp (by fun_prop)).mul hP.differentiable) + have heqf (z : ℂ) : f z = z ^ m * g z := by + rw [heq] + dsimp only [g, P] + ring + have hgc : ∀ z, g (conj z) = conj (g z) := by + apply conj_of_pow_mul hg.continuous m + intro z + rw [← heqf, ← heqf, hc] + obtain ⟨hcr, hbr⟩ := real_canonical_cofactor hc0 hu hgc + have hcReal : (c.re : ℂ) = c := conj_eq_iff_re.mp (conj_eq_iff_im.mpr hcr) + have hbReal : (b.re : ℂ) = b := conj_eq_iff_re.mp (conj_eq_iff_im.mpr hbr) + have hlin : IsLaguerrePolya (fun z : ℂ => exp (b * z)) := by + simpa only [ofReal_zero, add_zero, hbReal] using + isLaguerrePolya_exp.comp_affine_real b.re 0 + have hid : IsLaguerrePolya (fun z : ℂ => z) := by + simpa using isLaguerrePolya_eval_map (p := X) Splits.X + have hresult := (((hid.pow m).mul ((isLaguerrePolya_exp_neg_mul_sq ha).mul hlin)).mul + hP).const_mul_real c.re + convert hresult using 1 + funext z + rw [heq] + simp only [Pi.mul_apply, hcReal, ← exp_add, P] + ring + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusOneProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusOneProduct.lean new file mode 100644 index 000000000..11609f66a --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusOneProduct.lean @@ -0,0 +1,108 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOne +public import RealRooted.MultiplierSequence.JensenProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusOne +import RealRooted.MultiplierSequence.JensenProductExpansion +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.Mathlib.Algebra.Polynomial.Reverse + +/-! +# The full genus-one-star auxiliary Jensen criterion + +O'Sullivan (2021), Theorem 3.5: a real function of genus `1*` has only real zeros +if and only if the Jensen polynomials of its product with a fixed nonzero +Laguerre--Pólya function split. Both factors may vanish at the origin. The +ordinary and reciprocal polynomial sums are given explicitly, including degree +loss in the auxiliary. Degree zero is harmless and included in the indexed form. +-/ + +public section + +open Complex Polynomial +open scoped ComplexConjugate + +namespace RealRooted + +/-- A nonzero Laguerre--Pólya auxiliary detects real zeros of every real +genus-one-star function, with no restriction on either origin multiplicity. -/ +theorem real_zeros_iff_isLaguerrePolya_mul {f g : ℂ → ℂ} + (hf : HasGenusOneStar f) (hc : ∀ z, f (conj z) = conj (f z)) + (hg : IsLaguerrePolya g) (hg0 : g ≠ 0) : + (∀ z, f z = 0 → z.im = 0) ↔ IsLaguerrePolya (f * g) := by + constructor + · exact fun hz => (isLaguerrePolya_of_hasGenusOneStar hf hc hz).mul hg + · intro hfg + have hfg0 : f * g ≠ 0 := by + intro hzero + have hfa : AnalyticOnNhd ℂ f Set.univ := fun z _ => hf.differentiable.analyticAt z + rcases hfa.eq_zero_or_eq_zero_of_mul_eq_zero hg.analyticOnNhd + (fun z _ => congrFun hzero z) isPreconnected_univ with h | h + · exact hf.ne_zero (funext fun z => h z (Set.mem_univ _)) + · exact hg0 (funext fun z => h z (Set.mem_univ _)) + exact fun z hz => hfg.im_eq_zero_of_eq_zero hfg0 (by simp [Pi.mul_apply, hz]) + +/-- Multiplication by a fixed nonzero Laguerre--Pólya function detects class +membership for every real function of genus one star. -/ +theorem isLaguerrePolya_mul_iff_of_hasGenusOneStar {f g : ℂ → ℂ} + (hf : HasGenusOneStar f) (hc : ∀ z, f (conj z) = conj (f z)) + (hg : IsLaguerrePolya g) (hg0 : g ≠ 0) : + IsLaguerrePolya (f * g) ↔ IsLaguerrePolya f := by + refine ⟨fun h => isLaguerrePolya_of_hasGenusOneStar hf hc + ((real_zeros_iff_isLaguerrePolya_mul hf hc hg hg0).mpr h), fun h => h.mul hg⟩ + +/-- The Jensen-product criterion for real zeros in the full genus-one-star class. -/ +theorem real_zeros_iff_jensenProductPolynomial_splits {f g : ℂ → ℂ} + {gamma delta : ℕ → ℝ} (hf : HasGenusOneStar f) + (hc : ∀ z, f (conj z) = conj (f z)) (hg : IsLaguerrePolya g) (hg0 : g ≠ 0) + (hgamma : ∀ k, iteratedDeriv k f 0 = (gamma k : ℂ)) + (hdelta : ∀ k, iteratedDeriv k g 0 = (delta k : ℂ)) : + (∀ z, f z = 0 → z.im = 0) ↔ + ∀ d, (jensenProductPolynomial d gamma delta).Splits := + (real_zeros_iff_isLaguerrePolya_mul hf hc hg hg0).trans + (isLaguerrePolya_mul_iff_jensenProductPolynomial_splits + hf.differentiable hg.differentiable hgamma hdelta) + +private theorem forall_jensenProduct_splits_iff (gamma delta : ℕ → ℝ) : + (∀ d, (jensenProductPolynomial d gamma delta).Splits) ↔ + ∀ d, d ≠ 0 → (jensenProductPolynomial d gamma delta).Splits := by + refine ⟨fun h d _ => h d, fun h d => ?_⟩ + by_cases hd : d = 0 + · subst d + exact Splits.of_natDegree_le_one ((natDegree_jensenProductPolynomial_le 0 _ _).trans + (by norm_num)) + · exact h d hd + +/-- O'Sullivan's Theorem 3.5 in ordinary Jensen-sum form, valid for a fixed +nonzero auxiliary even when its constant coefficient vanishes. -/ +theorem real_zeros_iff_jensen_sum_splits {f g : ℂ → ℂ} + {gamma delta : ℕ → ℝ} (hf : HasGenusOneStar f) + (hc : ∀ z, f (conj z) = conj (f z)) (hg : IsLaguerrePolya g) (hg0 : g ≠ 0) + (hgamma : ∀ k, iteratedDeriv k f 0 = (gamma k : ℂ)) + (hdelta : ∀ k, iteratedDeriv k g 0 = (delta k : ℂ)) : + (∀ z, f z = 0 → z.im = 0) ↔ ∀ d, d ≠ 0 → + (∑ j ∈ Finset.range (d + 1), C ((d.choose j : ℝ) * gamma j) * + (X ^ j * jensenPolynomial (d - j) delta)).Splits := by + simpa only [← jensenProductPolynomial_eq_sum] using + (real_zeros_iff_jensenProductPolynomial_splits hf hc hg hg0 hgamma hdelta).trans + (forall_jensenProduct_splits_iff gamma delta) + +/-- O'Sullivan's Theorem 3.5 in reciprocal Jensen-sum form, retaining all zero +coefficients and origin factors. -/ +theorem real_zeros_iff_reciprocal_jensen_sum_splits {f g : ℂ → ℂ} + {gamma delta : ℕ → ℝ} (hf : HasGenusOneStar f) + (hc : ∀ z, f (conj z) = conj (f z)) (hg : IsLaguerrePolya g) (hg0 : g ≠ 0) + (hgamma : ∀ k, iteratedDeriv k f 0 = (gamma k : ℂ)) + (hdelta : ∀ k, iteratedDeriv k g 0 = (delta k : ℂ)) : + (∀ z, f z = 0 → z.im = 0) ↔ ∀ d, d ≠ 0 → + (∑ j ∈ Finset.range (d + 1), C ((d.choose j : ℝ) * gamma j) * + reflect (d - j) (jensenPolynomial (d - j) delta)).Splits := by + simp only [← reflect_jensenProductPolynomial_eq_sum, + splits_reflect_iff (natDegree_jensenProductPolynomial_le _ _ _)] + exact (real_zeros_iff_jensenProductPolynomial_splits hf hc hg hg0 hgamma hdelta).trans + (forall_jensenProduct_splits_iff gamma delta) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroDifferentialSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroDifferentialSimple.lean new file mode 100644 index 000000000..177caac30 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroDifferentialSimple.lean @@ -0,0 +1,108 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialTailSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialEntire +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LinearProduct +import RealRooted.Mathlib.Algebra.Polynomial.LinearProductDegree +import RealRooted.Mathlib.Analysis.Complex.LinearProductPrefix +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialComposition +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GenusZeroTail + +/-! +# Simple zeros for nonpolynomial genus-zero differential symbols + +This is the pure genus-zero case of Cardon--de Gaston (2005), Theorem 1. +The target may be any LP function, including one of order exactly two. +The actual differential series either vanishes identically or has only simple +real zeros. No claim of injectivity is made: exponential targets can be killed +when their exponent is a zero of the symbol. + +The proof uses finite-factor multiplicity descent and canonical-tail +convergence. It does not require composition of two infinite operators. +-/ + +public section + +open Complex Polynomial Filter Topology + +namespace RealRooted + +/-- The actual infinite image factors as a finite prefix operator acting on +the canonical-tail image. Convergence permits targets of order exactly two. -/ +private theorem infiniteDifferentialApply_eq_prefix_apply_tail + {a : ℕ → ℝ} (ha : Summable a) {f : ℂ → ℂ} (hf : IsLaguerrePolya f) (n : ℕ) : + infiniteDifferentialApply (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f = + ((∏ j ∈ Finset.range n, (1 + C (a j) * X : ℝ[X])).map ofRealHom).differentialApply + (infiniteDifferentialApply + (fun z : ℂ => ∏' j : ℕ, (1 + (a (j + n) : ℂ) * z)) f) := by + rw [tprod_one_add_eq_prefix_mul_tail ha n] + have ht := (summable_nat_add_iff n).mpr ha + exact infiniteDifferentialApply_polynomial_mul _ + (isLaguerrePolya_tprod_one_add_mul ht).differentiable + (orderLE_tprod_one_add_ofReal_mul ht) (p := (3 / 2 : ℝ)) (by norm_num) (by norm_num) + hf.differentiable hf.orderLE_two (q := (5 / 2 : ℝ)) (by norm_num) (by norm_num) + (by norm_num) + +/-- Every zero of a nonzero image under a nonpolynomial pure genus-zero +LP symbol is simple. Signed slopes, repeated slopes, and zero slopes are allowed. -/ +theorem IsLaguerrePolya.deriv_genusZero_differential_ne_zero + {f : ℂ → ℂ} (hf : IsLaguerrePolya f) {a : ℕ → ℝ} (ha : Summable a) + (hnp : ∀ p : ℂ[X], + (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) ≠ fun z => p.eval z) + (hne : infiniteDifferentialApply (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f ≠ 0) + {z : ℂ} (hz : infiniteDifferentialApply + (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f z = 0) : + _root_.deriv (infiniteDifferentialApply + (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f) z ≠ 0 := by + have hLP := (isLaguerrePolya_tprod_one_add_mul ha).infiniteDifferentialApply_of_left_order + hf (orderLE_tprod_one_add_ofReal_mul ha) (by norm_num) + have him := hLP.im_eq_zero_of_eq_zero hne hz + have heq : (z.re : ℂ) = z := by apply Complex.ext <;> simp [him] + rw [← heq] at hz ⊢ + have hf0 : f ≠ 0 := by + intro hzero + apply hne + rw [hzero] + ext w + simp only [infiniteDifferentialApply, iteratedDeriv_const_zero, mul_zero, + zero_div, tsum_zero, Pi.zero_apply] + apply deriv_ne_zero_of_differential_tails + (g := fun n => infiniteDifferentialApply + (fun z : ℂ => ∏' j : ℕ, (1 + (a (j + n) : ℂ) * z)) f) + (p := fun n => ∏ j ∈ Finset.range n, (1 + C (a j) * X : ℝ[X])) + _ (tendstoLocallyUniformly_infiniteDifferentialApply_linear_tail + ha hf.differentiable hf.orderLE_two) hf.differentiable hf0 _ + (tendsto_natDegree_prod_one_add (infinite_support_of_tprod_ne_polynomial hnp)) + (infiniteDifferentialApply_eq_prefix_apply_tail ha hf) hne hz + · intro n + have ht := (summable_nat_add_iff n).mpr ha + exact (isLaguerrePolya_tprod_one_add_mul ht).infiniteDifferentialApply_of_left_order + hf (orderLE_tprod_one_add_ofReal_mul ht) (by norm_num) + · intro n + exact Splits.prod (fun j _ => splits_one_add_C_mul_X (a j)) + +/-- Zero-aware form: the actual image of any LP target under a nonpolynomial +pure genus-zero symbol is identically zero or LP with only simple real zeros. -/ +theorem IsLaguerrePolya.genusZero_differential_simple_or_zero + {f : ℂ → ℂ} (hf : IsLaguerrePolya f) {a : ℕ → ℝ} (ha : Summable a) + (hnp : ∀ p : ℂ[X], + (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) ≠ fun z => p.eval z) : + infiniteDifferentialApply (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f = 0 ∨ + IsLaguerrePolya (infiniteDifferentialApply + (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f) ∧ + ∀ z, infiniteDifferentialApply (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f z = 0 → + z.im = 0 ∧ _root_.deriv (infiniteDifferentialApply + (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f) z ≠ 0 := by + by_cases hne : infiniteDifferentialApply (fun z : ℂ => ∏' j, (1 + (a j : ℂ) * z)) f = 0 + · exact Or.inl hne + · have hLP := (isLaguerrePolya_tprod_one_add_mul ha).infiniteDifferentialApply_of_left_order + hf (orderLE_tprod_one_add_ofReal_mul ha) (by norm_num) + exact Or.inr ⟨hLP, fun z hz => ⟨hLP.im_eq_zero_of_eq_zero hne hz, + hf.deriv_genusZero_differential_ne_zero ha hnp hne hz⟩⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroFactorSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroFactorSimple.lean new file mode 100644 index 000000000..87355cada --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroFactorSimple.lean @@ -0,0 +1,45 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroDifferentialSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialGaussian +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GenusZeroComposition + +/-! +# Simplicity for symbols with a nonpolynomial genus-zero factor + +This is the factorized Gaussian case in the Cardon--de Gaston simplicity +argument. Extracting such a factor from an arbitrary infinite real zero set +is a separate result. No nonzero intermediate-image premise is needed. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- A nonpolynomial pure genus-zero factor forces the nonzero Gaussian +differential image to have only simple real zeros. -/ +theorem IsLaguerrePolya.genusZero_factor_differential_simple_or_zero + {φ f : ℂ → ℂ} (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) + {a : ℕ → ℝ} (ha : Summable a) + (hnp : ∀ p : ℂ[X], + (fun z : ℂ ↦ ∏' j, (1 + (a j : ℂ) * z)) ≠ fun z ↦ p.eval z) + {Mφ Mf A B : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (hA : 0 < A) (hB : 0 < B) + (hAB : 4 * A * B < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (A * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (B * ‖w‖ ^ 2)) : + let H := infiniteDifferentialApply + (fun z ↦ (∏' j, (1 + (a j : ℂ) * z)) * φ z) f + H = 0 ∨ IsLaguerrePolya H ∧ + ∀ z, H z = 0 → z.im = 0 ∧ _root_.deriv H z ≠ 0 := by + have hg := hφ.infiniteDifferentialApply_of_gaussian hf hMφ hMf hA hB hAB + hφbound hfbound + have h := hg.genusZero_differential_simple_or_zero ha hnp + simpa only [infiniteDifferentialApply_linearProduct_mul ha + hφ.differentiable hf.differentiable hMφ hMf hA hB hAB hφbound hfbound] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroHeatTrace.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroHeatTrace.lean new file mode 100644 index 000000000..a6aeb9ba6 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GenusZeroHeatTrace.lean @@ -0,0 +1,67 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSum +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumLaplace +public import Mathlib.Analysis.Calculus.LogDeriv +import Mathlib.Analysis.Complex.Exponential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHeatTrace +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds + +/-! +# Zhang's genus-zero heat-trace identity + +For positive zero rates with a summable inverse exponent at most one, +all signed logarithmic derivatives of the actual product +`c * product (1 + z / rate)` are the corresponding heat-trace Laplace +moments. This is Zhang, arXiv:1506.07012v13, Lemma 2, equation (2.6), +including the endpoint zero. No exponential factor is inserted. +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +private theorem positiveSlopeHeatTrace_inv_eq {r : ℕ → ℝ} (hr : ∀ i, 0 < r i) : + Real.positiveSlopeHeatTrace (fun i ↦ (r i)⁻¹) = Real.exponentialMomentSum r 0 := by + funext t + simp only [Real.positiveSlopeHeatTrace, Real.exponentialMomentSum, + inv_inv, pow_zero, one_mul] + exact tsum_subtype_eq_of_support_subset + (f := fun i ↦ Real.exp (-r i * t)) + (s := {i | 0 < (r i)⁻¹}) (fun i _ ↦ inv_pos.mpr (hr i)) + +/-- Exact heat-trace integral formula for the signed logarithmic +derivatives of a genus-zero product with positive zero rates. -/ +theorem signed_logDeriv_genusZeroProduct_eq_laplace {r : ℕ → ℝ} {a : ℝ} {c : ℂ} + (hr : ∀ i, 0 < r i) (ha : 0 ≤ a) (ha1 : a ≤ 1) + (hs : Summable (fun i ↦ r i ^ (-a))) (hc : c ≠ 0) + (k : ℕ) {x : ℝ} (hx : 0 ≤ x) : + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ + (logDeriv (fun z : ℂ ↦ c * ∏' i, (1 + z / (r i : ℂ))) (y : ℂ)).re) x = + ∫ t : ℝ in Set.Ioi 0, + Real.exp (-x * t) * t ^ k * Real.exponentialMomentSum r 0 t := by + have hsinv : Summable (fun i ↦ (r i)⁻¹) := by + simpa only [Nat.zero_add, pow_one] using Real.summable_inv_pow_of_inverse_moment hr ha ha1 hs 0 + have h := signed_iteratedDeriv_re_logDeriv_exp_linear_product hc 0 + (fun i ↦ (inv_pos.mpr (hr i)).le) hsinv k hx + have heq : (fun z : ℂ ↦ c * exp (((0 : ℝ) : ℂ) * z) * + ∏' i, (1 + (((r i)⁻¹ : ℝ) : ℂ) * z)) = + (fun z : ℂ ↦ c * ∏' i, (1 + z / (r i : ℂ))) := by + funext z + simp only [ofReal_zero, zero_mul, exp_zero, mul_one] + congr 1 + apply tprod_congr + intro i + rw [ofReal_inv, div_eq_mul_inv, mul_comm ((r i : ℂ)⁻¹) z] + simpa only [heq, positiveSlopeHeatTrace_inv_eq hr, zero_mul, zero_add] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GrowthOrder.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GrowthOrder.lean new file mode 100644 index 000000000..5de4a4a99 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/GrowthOrder.lean @@ -0,0 +1,53 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.OfBound +import RealRooted.Mathlib.Analysis.Complex.LineIdentity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.UniformDerivativeBounds +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative + +/-! +# Growth order of Laguerre--Pólya functions + +The quantitative Szász estimate gives a quadratic exponential bound after a +real translation to a nonzero value. Consequently every LP function has order +at most two, including functions vanishing at the origin and the zero function. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- Every Laguerre--Pólya function has growth order at most two. -/ +theorem IsLaguerrePolya.orderLE_two {f : ℂ → ℂ} (hf : IsLaguerrePolya f) : + TauCeti.OrderLE f 2 := by + by_cases hf0 : f = 0 + · subst f + exact TauCeti.orderLE_const 0 2 + have hreal : ∃ x : ℝ, f x ≠ 0 := by + by_contra! hzero + apply hf0 + have h := hf.analyticOnNhd.eqOn_zero_of_line_eq_zero + (z₀ := 0) (v := 1) isPreconnected_univ (Set.mem_univ _) one_ne_zero + (Eventually.of_forall fun x => by simpa using hzero x) + exact funext fun z => h (Set.mem_univ z) + obtain ⟨x, hx⟩ := hreal + let g : ℂ → ℂ := fun z => f (z + x) + have hg : IsLaguerrePolya g := by + simpa only [Complex.ofReal_one, one_mul] using hf.comp_affine_real 1 x + have hg0 : g 0 ≠ 0 := by simpa only [g, zero_add] using hx + let K := max (max ‖g 0‖ ‖(g 0)⁻¹‖) (max ‖_root_.deriv g 0‖ ‖_root_.deriv (_root_.deriv g) 0‖) + have h0 : ‖g 0‖ ≤ K := (le_max_left _ _).trans (le_max_left _ _) + have hi : ‖(g 0)⁻¹‖ ≤ K := (le_max_right _ _).trans (le_max_left _ _) + have h1 : ‖_root_.deriv g 0‖ ≤ K := (le_max_left _ _).trans (le_max_right _ _) + have h2 : ‖_root_.deriv (_root_.deriv g) 0‖ ≤ K := (le_max_right _ _).trans (le_max_right _ _) + obtain ⟨B, _, C, _, hbound⟩ := + exists_uniform_norm_bound_of_jet_bounds ((norm_nonneg _).trans h0) + have hgo : TauCeti.OrderLE g 2 := TauCeti.orderLE_of_norm_le_mul_exp_rpow + (by simpa only [Real.rpow_two] using hbound g hg hg0 h0 hi h1 h2) + simpa only [g, one_mul, neg_add_cancel_right] using hgo.comp_mul_add 1 (-(x : ℂ)) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatFlowStrict.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatFlowStrict.lean new file mode 100644 index 000000000..4fe5e4b95 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatFlowStrict.lean @@ -0,0 +1,113 @@ +module + +public import Mathlib.Topology.Algebra.Module.ModuleTopology + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.Calculus.Deriv.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IteratedDerivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.LaguerreInequalities.DerivativeFormula +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import Mathlib.Analysis.Calculus.LocalExtr.Basic +import Mathlib.Analysis.Analytic.Order + +/-! +# Simple zeros along Laguerre--Pólya backward heat flows + +A local parameter family of LP functions satisfying the backward heat equation +for all spatial Taylor derivatives has only simple zeros at every nonzero +interior time slice. The proof is the local mechanism in Craven–Csordas (1994), +Theorem 3.10: a double zero makes the first Laguerre form a local minimum, but +its time derivative is the square of the second spatial derivative. Iteration +and analyticity exclude every finite or infinite multiplicity above one. + +The statements assume a flow and its parameter derivatives explicitly. They +do not assert convergence of an infinite heat-operator series on entire inputs. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- At a double zero, a nonnegative Laguerre form along a backward heat jet +forces the second jet to vanish. -/ +private theorem heat_jet_zero_of_local_nonneg {A B C : ℝ → ℝ} {t b c : ℝ} + (hA : HasDerivAt A (-C t) t) (hB : HasDerivAt B b t) (hC : HasDerivAt C c t) + (hn : ∀ᶠ s in 𝓝 t, 0 ≤ B s ^ 2 - A s * C s) (h0 : A t = 0) (h1 : B t = 0) : + C t = 0 := by + have hm : IsLocalMin (fun s => B s ^ 2 - A s * C s) t := by + filter_upwards [hn] with s hs + simpa only [h0, h1, zero_pow (by decide : 2 ≠ 0), zero_mul, sub_zero] using hs + have hd := (hB.pow 2).sub (hA.mul hC) + have heq := hm.hasDerivAt_eq_zero hd + simp only [h0, h1, zero_pow (by decide : 2 - 1 ≠ 0), mul_zero, zero_mul] at heq + nlinarith [sq_nonneg (C t)] + +/-- Every real zero in a nonzero interior slice of a local backward heat flow +of LP functions is simple. The heat equation is assumed for every spatial jet. -/ +theorem deriv_ne_zero_of_laguerrePolya_heat_flow {u : ℝ → ℂ → ℂ} {t x : ℝ} + (hLP : ∀ᶠ s in 𝓝 t, IsLaguerrePolya (u s)) (hne : ∃ z, u t z ≠ 0) + (hheat : ∀ n, HasDerivAt (fun s => (iteratedDeriv n (u s) (x : ℂ)).re) + (-(iteratedDeriv (n + 2) (u t) (x : ℂ)).re) t) + (hz : u t x = 0) : _root_.deriv (u t) x ≠ 0 := by + intro hd + have hf : IsLaguerrePolya (u t) := hLP.self_of_nhds + have hstep (n : ℕ) (h0 : (iteratedDeriv n (u t) (x : ℂ)).re = 0) + (h1 : (iteratedDeriv (n + 1) (u t) (x : ℂ)).re = 0) : + (iteratedDeriv (n + 2) (u t) (x : ℂ)).re = 0 := by + apply heat_jet_zero_of_local_nonneg (hheat n) (hheat (n + 1)) (hheat (n + 2)) _ h0 h1 + filter_upwards [hLP] with s hs + have hds := hs.iteratedDeriv n + have h := hds.laguerreCoefficient_nonneg x 1 + rw [laguerreCoefficient_one hds.differentiable hds.conj] at h + simpa only [show 2 = 1 + 1 from rfl, iteratedDeriv_succ, iteratedDeriv_zero, + Nat.add_assoc] using h + have hall_re : ∀ n, (iteratedDeriv n (u t) (x : ℂ)).re = 0 := by + intro n + induction n using Nat.twoStepInduction with + | zero => simp only [iteratedDeriv_zero, hz, zero_re] + | one => simp only [iteratedDeriv_one, hd, zero_re] + | more n hn hn1 => exact hstep n hn hn1 + have hall : ∀ n, iteratedDeriv n (u t) (x : ℂ) = 0 := by + intro n + have hr : ((iteratedDeriv n (u t) (x : ℂ)).re : ℂ) = + iteratedDeriv n (u t) (x : ℂ) := by + apply conj_eq_iff_re.mp + simpa using (iteratedDeriv_conj hf.conj n (x : ℂ)).symm + rw [← hr, hall_re n, ofReal_zero] + have htop : analyticOrderAt (u t) (x : ℂ) = ⊤ := by + apply ENat.eq_top_iff_forall_ge.mpr + intro n + exact (natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero + (hf.differentiable.analyticAt _)).mpr (fun j _ => hall j) + obtain ⟨z, hz⟩ := hne + have hfinite := hf.analyticOnNhd.analyticOrderAt_ne_top_of_isPreconnected + isPreconnected_univ (Set.mem_univ z) (Set.mem_univ (x : ℂ)) + (by simp [analyticOrderAt_eq_zero.mpr (.inr hz)]) + exact hfinite htop + +/-- All complex zeros in a nonzero LP backward heat slice are simple. +Their reality follows from LP membership, so the heat equation is needed +only at real spatial points. -/ +theorem deriv_ne_zero_of_laguerrePolya_heat_flow_complex {u : ℝ → ℂ → ℂ} {t : ℝ} + (hLP : ∀ᶠ s in 𝓝 t, IsLaguerrePolya (u s)) (hne : ∃ z, u t z ≠ 0) + (hheat : ∀ x : ℝ, ∀ n, + HasDerivAt (fun s => (iteratedDeriv n (u s) (x : ℂ)).re) + (-(iteratedDeriv (n + 2) (u t) (x : ℂ)).re) t) + {z : ℂ} (hz : u t z = 0) : _root_.deriv (u t) z ≠ 0 := by + have hf : IsLaguerrePolya (u t) := hLP.self_of_nhds + have hf0 : u t ≠ 0 := by + intro heq + obtain ⟨w, hw⟩ := hne + exact hw (congrFun heq w) + have him := hf.im_eq_zero_of_eq_zero hf0 hz + have heq : (z.re : ℂ) = z := by apply Complex.ext <;> simp [him] + rw [← heq] at hz ⊢ + exact deriv_ne_zero_of_laguerrePolya_heat_flow hLP hne (hheat z.re) hz + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperator.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperator.lean new file mode 100644 index 000000000..cc3da0ab6 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperator.lean @@ -0,0 +1,55 @@ +module + +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Derivative + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlow +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialCoefficients +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Hermite.GaussianHeatOperator +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Star +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Entire heat evolution preserves Laguerre--Pólya membership + +For every nonnegative real time, the convergent backward heat series of an +LP input of order below two remains LP. Gaussian parity identifies each +coefficient series, and Pólya's infinite differential-symbol theorem supplies +the closure result. Zero time and the identically zero input are included. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- The entire backward heat operator preserves the LP class at every +nonnegative real time for inputs of growth order strictly below two. -/ +theorem IsLaguerrePolya.heatOperator {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + {ρ : ℝ} (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) {t : ℝ} (ht : 0 ≤ t) : + IsLaguerrePolya (Complex.heatOperator (t : ℂ) f) := by + have hφ := isLaguerrePolya_exp_neg_mul_sq ht + have hc : ∀ k, Tendsto (fun n => ∑ j ∈ Finset.range n, + (iteratedDeriv j (fun z => exp (-(t : ℂ) * z ^ 2)) 0).re * + (iteratedDeriv (k + j) f 0).re / j.factorial) atTop + (𝓝 ((iteratedDeriv k (Complex.heatOperator (t : ℂ) f) 0).re)) := by + intro k + have h := Complex.hasSum_re (hasSum_gaussian_differential hf.differentiable horder hρ t k) + have hreal (j : ℕ) : + (iteratedDeriv j (fun z => exp (-(t : ℂ) * z ^ 2)) 0).im = 0 := by + rw [← Complex.ofReal_re_iteratedDeriv_zero hφ.conj j] + simp + simpa only [div_natCast_re, mul_re, hreal, zero_mul, sub_zero] using h.tendsto_sum_nat + have hconj (z : ℂ) : Complex.heatOperator (t : ℂ) f (starRingEnd ℂ z) = + starRingEnd ℂ (Complex.heatOperator (t : ℂ) f z) := by + simpa only [conj_ofReal] using Complex.heatOperator_conj hf.conj (t : ℂ) z + rw [eq_complexExpGeneratingFunction_of_iteratedDeriv + (differentiable_heatOperator hf.differentiable horder hρ t) + (fun k => (Complex.ofReal_re_iteratedDeriv_zero hconj k).symm)] + exact hφ.infinite_differential_coefficients hf hc + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperatorCriterion.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperatorCriterion.lean new file mode 100644 index 000000000..4e293168d --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperatorCriterion.lean @@ -0,0 +1,64 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.TimeLimit +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Closure + +/-! +# Laguerre--Pólya criteria from small positive heat times + +An entire input of order below two is LP if and only if its backward heat +images are LP at arbitrarily small positive times. The reverse implication is +closure under locally uniform limits; it does not pass simplicity to time zero. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- LP heat images along any complex times tending to zero imply that the +original entire function is LP. -/ +theorem IsLaguerrePolya.of_heatOperator_tendsto {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) + {t : ℕ → ℂ} (ht : Tendsto t atTop (𝓝 0)) + (hLP : ∀ n, IsLaguerrePolya (heatOperator (t n) f)) : IsLaguerrePolya f := by + have h := tendstoLocallyUniformly_heatOperator_of_tendsto hf horder hρ ht + rw [heatOperator_zero] at h + exact IsLaguerrePolya.of_tendstoLocallyUniformly hLP h + +/-- An entire function of order below two is LP exactly when its heat images +are LP at arbitrarily small positive real times. -/ +theorem isLaguerrePolya_iff_heatOperator_near_zero {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) : + IsLaguerrePolya f ↔ ∀ ε : ℝ, 0 < ε → + ∃ t : ℝ, 0 < t ∧ t < ε ∧ IsLaguerrePolya (heatOperator (t : ℂ) f) := by + constructor + · intro hLP ε hε + exact ⟨ε / 2, half_pos hε, half_lt_self hε, + hLP.heatOperator horder hρ (half_pos hε).le⟩ + · intro h + choose t ht hbound hLP using fun n : ℕ => h (1 / ((n : ℝ) + 1)) (by positivity) + have hlim : Tendsto t atTop (𝓝 0) := + squeeze_zero (fun n => (ht n).le) (fun n => (hbound n).le) + tendsto_one_div_add_atTop_nhds_zero_nat + exact IsLaguerrePolya.of_heatOperator_tendsto hf horder hρ + (by simpa only [Function.comp_def, Complex.ofReal_zero] using + (Complex.continuous_ofReal.tendsto 0).comp hlim) hLP + +/-- An entire function of order below two is LP exactly when all of its +positive-time heat images are LP. -/ +theorem isLaguerrePolya_iff_heatOperator_pos {f : ℂ → ℂ} {ρ : ℝ} + (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) : + IsLaguerrePolya f ↔ ∀ t : ℝ, 0 < t → IsLaguerrePolya (heatOperator (t : ℂ) f) := by + constructor + · exact fun hLP _ ht => hLP.heatOperator horder hρ ht.le + · intro h + apply (isLaguerrePolya_iff_heatOperator_near_zero hf horder hρ).mpr + intro ε hε + exact ⟨ε / 2, half_pos hε, half_lt_self hε, h (ε / 2) (half_pos hε)⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperatorSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperatorSimple.lean new file mode 100644 index 000000000..c5f7642a3 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/HeatOperatorSimple.lean @@ -0,0 +1,58 @@ +module + +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.TimeDerivative + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya + +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic + +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlowStrict +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Nonzero + +/-! +# Simple real zeros under entire backward heat evolution + +Craven–Csordas (1994), Theorem 3.10: for a nonzero LP entire function of order +strictly below two, every positive backward heat time gives only simple real +zeros. The actual convergent heat series, its LP closure, its parameter heat +equations, and nonzero output have all been established before this application. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- Every zero of a positive-time entire heat image of a nonzero LP function +of order below two has nonzero derivative. -/ +theorem IsLaguerrePolya.deriv_heatOperator_ne_zero {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + {ρ : ℝ} (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (hf0 : f ≠ 0) + {t : ℝ} (ht : 0 < t) {z : ℂ} (hz : Complex.heatOperator (t : ℂ) f z = 0) : + _root_.deriv (Complex.heatOperator (t : ℂ) f) z ≠ 0 := by + apply deriv_ne_zero_of_laguerrePolya_heat_flow_complex + (u := fun s => Complex.heatOperator (s : ℂ) f) _ _ _ hz + · filter_upwards [eventually_gt_nhds ht] with s hs + exact hf.heatOperator horder hρ hs.le + · simpa only [Pi.zero_apply] using + Function.ne_iff.mp (Complex.heatOperator_ne_zero hf.differentiable horder hρ hf0 t) + · intro x n + exact hasDerivAt_re_iteratedDeriv_heatOperator hf.differentiable horder hρ t x n + +/-- Craven–Csordas (1994), Theorem 3.10: positive backward heat evolution of a +nonzero LP input of order below two remains nonzero LP and has only simple real zeros. -/ +theorem IsLaguerrePolya.heatOperator_simple_zeros {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + {ρ : ℝ} (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) (hf0 : f ≠ 0) + {t : ℝ} (ht : 0 < t) : + IsLaguerrePolya (Complex.heatOperator (t : ℂ) f) ∧ Complex.heatOperator (t : ℂ) f ≠ 0 ∧ + ∀ z, Complex.heatOperator (t : ℂ) f z = 0 → + z.im = 0 ∧ _root_.deriv (Complex.heatOperator (t : ℂ) f) z ≠ 0 := by + have hLP := hf.heatOperator horder hρ ht.le + have hn := Complex.heatOperator_ne_zero hf.differentiable horder hρ hf0 t + exact ⟨hLP, hn, fun _ hz => ⟨hLP.im_eq_zero_of_eq_zero hn hz, + hf.deriv_heatOperator_ne_zero horder hρ hf0 ht hz⟩⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Hermite.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Hermite.lean new file mode 100644 index 000000000..fdf156174 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Hermite.lean @@ -0,0 +1,55 @@ +module + +public import RealRooted.Hermite.Jensen +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlow +import RealRooted.Mathlib.Algebra.Polynomial.Reverse +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# A Hermite form of Jensen's criterion + +All Hermite Jensen polynomials of a real entire function `f` split exactly when +`f(z) exp(-z²)` belongs to the Laguerre–Pólya class. In particular, membership +of `f` itself implies splitting. The converse concerns the Gaussian product. +-/ + +public section + +open Polynomial Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- A Hermite form of Jensen's criterion, with the Gaussian factor explicit. -/ +theorem isLaguerrePolya_mul_exp_neg_sq_iff + {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hconj : ∀ z, f (conj z) = conj (f z)) : + IsLaguerrePolya (fun z => f z * exp (-z ^ 2)) ↔ + ∀ d, (hermiteJensenPolynomial d (fun k => (iteratedDeriv k f 0).re)).Splits := by + let F : ℂ → ℂ := fun z => f z * exp (-z ^ 2) + have hF : Differentiable ℂ F := hf.mul (by fun_prop) + have hFc (z : ℂ) : F (conj z) = conj (F z) := by + simp only [F, hconj, map_mul, ← exp_conj, map_neg, map_pow] + have hg (k : ℕ) := (ofReal_re_iteratedDeriv_zero hconj k).symm + have hb (k : ℕ) := (ofReal_re_iteratedDeriv_zero hFc k).symm + change IsLaguerrePolya F ↔ _ + rw [isLaguerrePolya_iff_jensenPolynomial_splits hF hb] + apply forall_congr' + intro d + rw [hermiteJensenPolynomial_eq_reflect_jensenPolynomial hf hg hb] + rw [← splits_iff_comp_splits_of_natDegree_eq_one + (show (C (2 : ℝ) * X).natDegree = 1 by simp)] + exact (splits_reflect_iff (natDegree_jensenPolynomial_le d _)).symm + +/-- Hermite Jensen polynomials of a Laguerre–Pólya function split over the reals. -/ +theorem IsLaguerrePolya.hermiteJensenPolynomial_splits {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (d : ℕ) : + (hermiteJensenPolynomial d (fun k => (iteratedDeriv k f 0).re)).Splits := by + apply (isLaguerrePolya_mul_exp_neg_sq_iff hf.differentiable hf.conj).mp ?_ d + have h := hf.mul (isLaguerrePolya_exp_neg_mul_sq (a := 1) (by norm_num)) + simpa only [Pi.mul_def, ofReal_one, neg_one_mul] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/IndexedProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/IndexedProduct.lean new file mode 100644 index 000000000..65588159e --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/IndexedProduct.lean @@ -0,0 +1,97 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import TauCeti.Analysis.Complex.CanonicalProduct.ElementaryFactor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Closure +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Examples +import TauCeti.Analysis.Complex.CanonicalProduct.Convergence + +/-! +# Genus-one canonical products in the Laguerre--Pólya class + +Real elementary factors and their natural powers belong to the class. Locally +uniform products preserve membership, so square-summable real slopes give +Laguerre--Pólya canonical products without an entire growth hypothesis. +-/ + +public section + +open Complex Polynomial Filter Metric Topology + +namespace RealRooted + +/-- A real polynomial that splits over the reals belongs to the Laguerre--Pólya class. -/ +theorem isLaguerrePolya_eval_map {p : ℝ[X]} (hp : p.Splits) : + IsLaguerrePolya (fun z => (p.map ofRealHom).eval z) := by + apply IsLaguerrePolya.of_forall_approx + intro R ε hε + exact ⟨p, Or.inr hp, fun _ _ => by simpa using hε⟩ + +/-- The constant function one belongs to the Laguerre--Pólya class. -/ +theorem IsLaguerrePolya.one : IsLaguerrePolya (fun _ : ℂ => 1) := by + simpa using isLaguerrePolya_eval_map (p := 1) Splits.one + +/-- Natural powers preserve the Laguerre--Pólya class. -/ +theorem IsLaguerrePolya.pow {f : ℂ → ℂ} (hf : IsLaguerrePolya f) (n : ℕ) : + IsLaguerrePolya (fun z => f z ^ n) := by + induction n with + | zero => simpa using IsLaguerrePolya.one + | succ n ih => simpa only [pow_succ, Pi.mul_def] using ih.mul hf + +/-- Finite products preserve the Laguerre--Pólya class. -/ +theorem IsLaguerrePolya.finsetProd {ι : Type*} (s : Finset ι) (f : ι → ℂ → ℂ) + (hf : ∀ i ∈ s, IsLaguerrePolya (f i)) : + IsLaguerrePolya (fun z => ∏ i ∈ s, f i z) := by + classical + induction s using Finset.induction_on with + | empty => simpa using IsLaguerrePolya.one + | @insert i s hi ih => + simpa [Finset.prod_insert hi, Pi.mul_def] using (hf i (by simp)).mul + (ih fun j hj => hf j (by simp [hj])) + +/-- A locally uniformly convergent product of Laguerre--Pólya functions belongs +to the class. The index type need not be countable. -/ +theorem IsLaguerrePolya.of_hasProdLocallyUniformly {ι : Type*} {g : ι → ℂ → ℂ} + {f : ℂ → ℂ} (hg : ∀ i, IsLaguerrePolya (g i)) + (hprod : HasProdLocallyUniformlyOn g f Set.univ) : IsLaguerrePolya f := by + classical + apply IsLaguerrePolya.of_forall_approx + intro R ε hε + have hlim := tendstoLocallyUniformlyOn_univ.mp + (hasProdLocallyUniformlyOn_iff_tendstoLocallyUniformlyOn.mp hprod) + have hU := tendstoLocallyUniformly_iff_forall_isCompact.mp hlim _ + (isCompact_closedBall (0 : ℂ) R) + rw [Metric.tendstoUniformlyOn_iff] at hU + obtain ⟨s, hs⟩ := (hU (ε / 2) (half_pos hε)).exists + obtain ⟨p, hp, hpd⟩ := (IsLaguerrePolya.finsetProd s g (fun i _ => hg i)).exists_approx + R (half_pos hε) + refine ⟨p, hp, fun z hz => ?_⟩ + calc + dist (f z) ((p.map ofRealHom).eval z) ≤ dist (f z) (∏ i ∈ s, g i z) + + dist (∏ i ∈ s, g i z) ((p.map ofRealHom).eval z) := dist_triangle _ _ _ + _ < ε / 2 + ε / 2 := add_lt_add (hs z (mem_closedBall_zero_iff.mpr hz)) (hpd z hz) + _ = ε := add_halves ε + +/-- The real genus-one elementary factor belongs to the Laguerre--Pólya class. -/ +theorem isLaguerrePolya_weierstrassFactor_one (a : ℝ) : + IsLaguerrePolya (fun z => weierstrassFactor 1 ((a : ℂ) * z)) := by + have hlin : IsLaguerrePolya (fun z : ℂ => 1 - (a : ℂ) * z) := by + have hp : (1 - C a * X : ℝ[X]).Splits := + Splits.of_natDegree_le_one ((natDegree_sub_le _ _).trans + (max_le (by simp) ((natDegree_C_mul_le _ _).trans (by simp)))) + simpa using isLaguerrePolya_eval_map hp + simpa only [weierstrassFactor_one_left, Pi.mul_def, ofReal_zero, add_zero] using + hlin.mul (isLaguerrePolya_exp.comp_affine_real a 0) + +/-- Square-summable real genus-one factors, with their natural multiplicities, +form a Laguerre--Pólya function. This includes finite and empty products. -/ +theorem isLaguerrePolya_tprod_weierstrassFactor_one_pow {ι : Type*} + (a : ι → ℝ) (m : ι → ℕ) (hs : Summable (fun i => (m i : ℝ) * a i ^ 2)) : + IsLaguerrePolya (fun z => ∏' i, weierstrassFactor 1 ((a i : ℂ) * z) ^ m i) := by + have hsum : Summable (fun i => (m i : ℝ) * ‖(a i : ℂ)‖ ^ 2) := by + simpa only [Complex.norm_real, Real.norm_eq_abs, sq_abs] using hs + exact IsLaguerrePolya.of_hasProdLocallyUniformly + (fun i => (isLaguerrePolya_weierstrassFactor_one (a i)).pow (m i)) + (hasProdLocallyUniformlyOn_weierstrassFactor_one_pow _ _ hsum) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferential.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferential.lean new file mode 100644 index 000000000..197fef478 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferential.lean @@ -0,0 +1,60 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Derivative +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Star +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialCoefficients +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +/-! +# Infinite differential preservation below order two + +An LP differential symbol of order below two acts on every LP entire target +of order below two by a normally convergent series whose sum remains LP. +Convergence follows from the growth bounds; it is not an additional premise. +Zero symbols, targets and outputs are included. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- The actual infinite differential image of two LP entire inputs of order +below two is again LP, including the identically zero result. -/ +theorem IsLaguerrePolya.infiniteDifferentialApply {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) {ρ σ : ℝ} + (hoφ : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) (hof : TauCeti.OrderLE f σ) (hσ : σ < 2) : + IsLaguerrePolya (Complex.infiniteDifferentialApply φ f) := by + have hc : ∀ k, Tendsto (fun N => ∑ n ∈ Finset.range N, + (iteratedDeriv n φ 0).re * (iteratedDeriv (k + n) f 0).re / n.factorial) atTop + (𝓝 ((iteratedDeriv k (Complex.infiniteDifferentialApply φ f) 0).re)) := by + intro k + have hdf := (hf.differentiable.contDiff (n := ⊤)).differentiable_iteratedDeriv k + (WithTop.coe_lt_top _) + have hs := (summable_norm_infiniteDifferentialApply hφ.differentiable hoφ hρ + hdf (hof.iteratedDeriv hf.differentiable k) hσ 0).of_norm.hasSum + have hre := Complex.hasSum_re hs + have hreal (n : ℕ) : (iteratedDeriv n φ 0).im = 0 := by + rw [← Complex.ofReal_re_iteratedDeriv_zero hφ.conj n] + simp + simp only [div_natCast_re, mul_re, hreal, zero_mul, sub_zero] at hre + rw [iteratedDeriv_infiniteDifferentialApply hφ.differentiable hoφ hρ + hf.differentiable hof hσ] + simpa only [Complex.infiniteDifferentialApply, + iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm k] using + hre.tendsto_sum_nat + have hconj (z : ℂ) : Complex.infiniteDifferentialApply φ f (starRingEnd ℂ z) = + starRingEnd ℂ (Complex.infiniteDifferentialApply φ f z) := + Complex.infiniteDifferentialApply_conj hφ.conj hf.conj z + rw [eq_complexExpGeneratingFunction_of_iteratedDeriv + (differentiable_infiniteDifferentialApply hφ.differentiable hoφ hρ hf.differentiable hof hσ) + (fun k => (Complex.ofReal_re_iteratedDeriv_zero hconj k).symm)] + exact hφ.infinite_differential_coefficients hf hc + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialCoefficients.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialCoefficients.lean new file mode 100644 index 000000000..acbcd6ce4 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialCoefficients.lean @@ -0,0 +1,72 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FormalJensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialApply +import RealRooted.MultiplierSequence.JensenLimit +import RealRooted.MultiplierSequence.JensenDifferential +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra +import RealRooted.Mathlib.Analysis.SpecificLimits.DescFactorialWeights + +/-! +# Infinite differential operators with convergent coefficient series + +Pólya's 1915 Zusatz III states that applying a Laguerre--Pólya differential +symbol to a Laguerre--Pólya target defines an entire function in the same class +whenever each resulting Taylor coefficient series converges. The convergence +here is that of ordinary partial sums and may be conditional. This does not +replace the separate local-disk convergence hypothesis in Zusatz II. +-/ + +public section + +open Polynomial Complex Filter Topology + +namespace RealRooted + +private theorem iteratedDeriv_rescaledJensen_differential (a : ℕ → ℝ) {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (n k : ℕ) : + (iteratedDeriv k ((rescaledJensenPolynomial n a).map ofRealHom |>.differentialApply f) 0).re = + ∑ j ∈ Finset.range (n + 1), + ((n.descFactorial j : ℝ) / (n : ℝ) ^ j) * + (a j * (iteratedDeriv (k + j) f 0).re / j.factorial) := by + rw [Polynomial.iteratedDeriv_differentialApply _ hf k, + differentialApply_rescaledJensenPolynomial, Complex.re_sum] + apply Finset.sum_congr rfl + intro j _ + simp only [Complex.real_smul, mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero, + div_natCast_re, iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, + Nat.add_comm j k] + +/-- Pólya's coefficientwise infinite differential-operator theorem +(1915, Zusatz III, p. 243). Ordinary convergence of every resulting Taylor +coefficient series suffices, including a zero result or an initial zero prefix. -/ +theorem IsLaguerrePolya.infinite_differential_coefficients {φ ψ : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hψ : IsLaguerrePolya ψ) {c : ℕ → ℝ} + (hc : ∀ k, Tendsto + (fun n => ∑ j ∈ Finset.range n, + (iteratedDeriv j φ 0).re * (iteratedDeriv (k + j) ψ 0).re / j.factorial) + atTop (𝓝 (c k))) : + IsLaguerrePolya (complexExpGeneratingFunction c) := by + let a : ℕ → ℝ := fun j => (iteratedDeriv j φ 0).re + let F : ℕ → ℂ → ℂ := fun n => + (rescaledJensenPolynomial n a).map ofRealHom |>.differentialApply ψ + have hF (n : ℕ) : IsLaguerrePolya (F n) := by + apply hψ.differentialApply + rw [rescaledJensenPolynomial_eq_jensenPolynomial_comp] + exact (hφ.jensenPolynomial_splits n).comp_of_natDegree_le_one + ((natDegree_C_mul_le _ _).trans (by simp)) + have hcoeff (k : ℕ) : + Tendsto (fun n => (iteratedDeriv k (F n) 0).re) atTop (𝓝 (c k)) := by + have ht := Nat.tendsto_sum_descFactorial_smul (hc k) + simpa only [F, iteratedDeriv_rescaledJensen_differential a hψ.differentiable, + smul_eq_mul, a] using ht + apply isLaguerrePolya_of_jensenPolynomial_splits + intro d + exact jensenPolynomial_splits_of_tendsto d + (fun n => (hF n).jensenPolynomial_splits d) hcoeff + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialEntire.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialEntire.lean new file mode 100644 index 000000000..6571d965c --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialEntire.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GrowthOrder + +/-! +# Infinite differential preservation with one subquadratic input + +Every LP function has order at most two. Thus it suffices for either the LP +symbol or the LP target to have order strictly below two; the other input has +no supplied growth hypothesis. Convergence is justified by reciprocal exponents. +-/ + +public section + +namespace RealRooted + +/-- A strict order bound below two leaves room for a reciprocal exponent +strictly above two on the other input. -/ +private theorem exists_reciprocal_exponents_lt_two {ρ : ℝ} (hρ : ρ < 2) : + ∃ p q : ℝ, 0 < p ∧ ρ < p ∧ 2 < q ∧ 1 < p⁻¹ + q⁻¹ := by + let p := (max ρ 0 + 2) / 2 + have hp : 0 < p := by dsimp [p]; linarith [le_max_right ρ 0] + have hpρ : ρ < p := by dsimp [p]; linarith [le_max_left ρ 0] + have hp2 : p < 2 := by dsimp [p]; have h := max_lt hρ (by norm_num : (0 : ℝ) < 2); linarith + have hq : 0 < 4 - p := by linarith + refine ⟨p, 4 - p, hp, hpρ, by linarith, ?_⟩ + have heq : p⁻¹ + (4 - p)⁻¹ = (p + (4 - p)) / (p * (4 - p)) := by + field_simp + ring + rw [heq, lt_div_iff₀ (mul_pos hp hq)] + nlinarith [sq_pos_of_pos (sub_pos.mpr hp2)] + +/-- Any LP target is preserved by an LP differential symbol of order below +two. No separate growth bound is required for the target. -/ +theorem IsLaguerrePolya.infiniteDifferentialApply_of_left_order {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) {ρ : ℝ} + (horder : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) : + IsLaguerrePolya (Complex.infiniteDifferentialApply φ f) := by + obtain ⟨p, q, hp, hρp, hq, hsum⟩ := exists_reciprocal_exponents_lt_two hρ + exact hφ.infiniteDifferentialApply_of_order hf horder hp hρp hf.orderLE_two + (lt_trans (by norm_num) hq) hq hsum + +/-- Every LP symbol acts on every LP target of order below two by an LP +entire differential sum. No separate growth bound is required for the symbol. -/ +theorem IsLaguerrePolya.infiniteDifferentialApply_of_right_order {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) {ρ : ℝ} + (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) : + IsLaguerrePolya (Complex.infiniteDifferentialApply φ f) := by + obtain ⟨p, q, hp, hρp, hq, hsum⟩ := exists_reciprocal_exponents_lt_two hρ + exact hφ.infiniteDifferentialApply_of_order hf hφ.orderLE_two (lt_trans (by norm_num) hq) hq + horder hp hρp (by simpa only [add_comm] using hsum) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialGaussian.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialGaussian.lean new file mode 100644 index 000000000..ab0d3391f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialGaussian.lean @@ -0,0 +1,36 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialSummable +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianConvergence + +/-! +# Laguerre--Pólya preservation under sharp Gaussian norm bounds + +The actual differential series converges and remains LP when the product +of two positive Gaussian norm-bound coefficients is below one quarter. +This is the quantitative convergence input to the general Gaussian-type +theorem; extracting arbitrarily sharp bounds from a canonical factorization +is a separate obligation. +-/ + +public section + +namespace RealRooted + +/-- Explicit Gaussian norm bounds with product below one quarter give LP +preservation by the actual infinite differential series, including zero output. -/ +theorem IsLaguerrePolya.infiniteDifferentialApply_of_gaussian {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) + {Mφ Mf a b : ℝ} (hMφ : 0 ≤ Mφ) (hMf : 0 ≤ Mf) (ha : 0 < a) (hb : 0 < b) + (hab : 4 * a * b < 1) + (hφbound : ∀ w, ‖φ w‖ ≤ Mφ * Real.exp (a * ‖w‖ ^ 2)) + (hfbound : ∀ w, ‖f w‖ ≤ Mf * Real.exp (b * ‖w‖ ^ 2)) : + IsLaguerrePolya (Complex.infiniteDifferentialApply φ f) := + hφ.infiniteDifferentialApply_of_summable hf (fun z => + (Complex.summable_norm_infiniteDifferentialApply_of_gaussian + hφ.differentiable hf.differentiable hMφ hMf ha hb hab hφbound hfbound z).of_norm) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialGaussianType.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialGaussianType.lean new file mode 100644 index 000000000..b3b2faf49 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialGaussianType.lean @@ -0,0 +1,40 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialGaussian +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianMargin + +/-! +# Infinite differential preservation from Gaussian type + +The coefficients may vanish. Strictly larger positive norm-bound coefficients +are selected within the open region `4*a*b<1`, then the sharp convergence +theorem applies to the actual differential sum. +-/ + +public section + +namespace RealRooted + +/-- The Gaussian-type product condition gives LP preservation of the actual +infinite differential series. Type is expressed by arbitrarily sharp global +norm bounds, rather than an order-only bound that would lose the constants. -/ +theorem IsLaguerrePolya.infiniteDifferentialApply_of_gaussian_type {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) {α β : ℝ} + (hα : 0 ≤ α) (hβ : 0 ≤ β) (hab : 4 * α * β < 1) + (hφbound : ∀ ε > 0, ∃ C > 0, ∀ z, + ‖φ z‖ ≤ C * Real.exp ((α + ε) * ‖z‖ ^ 2)) + (hfbound : ∀ ε > 0, ∃ C > 0, ∀ z, + ‖f z‖ ≤ C * Real.exp ((β + ε) * ‖z‖ ^ 2)) : + IsLaguerrePolya (Complex.infiniteDifferentialApply φ f) := by + obtain ⟨a, b, hαa, hβb, ha, hb, hab'⟩ := Real.exists_pos_gaussian_coefficients hα hβ hab + obtain ⟨A, hA, hAbound⟩ := hφbound (a - α) (sub_pos.mpr hαa) + obtain ⟨B, hB, hBbound⟩ := hfbound (b - β) (sub_pos.mpr hβb) + apply hφ.infiniteDifferentialApply_of_gaussian hf hA.le hB.le ha hb hab' + · have heq : α + (a - α) = a := by linarith + simpa only [heq] using hAbound + · have heq : β + (b - β) = b := by linarith + simpa only [heq] using hBbound + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialLocal.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialLocal.lean new file mode 100644 index 000000000..4ac29c292 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialLocal.lean @@ -0,0 +1,55 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PointwiseLimit +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialApply +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.JensenDifferential +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Infinite differential operators under local pointwise convergence + +O'Sullivan, *Zeros of Jensen polynomials and asymptotics for the Riemann xi +function*, Theorem 3.6, quotes Pólya's infinite differential-operator theorem. +The original appears as Zusatz II on page 242 of Pólya, *Algebraische +Untersuchungen über ganze Funktionen vom Geschlechte Null und Eins* (1915). + +The hypothesis below is ordinary pointwise convergence of the derivative +series on a complex disk. Neither absolute nor locally uniform convergence is +assumed. Finite Jensen symbols preserve the Laguerre--Pólya class, converge at +each point by regular summation, and the pointwise local-limit theorem provides +an entire extension. The zero output and zeros at the origin are included. +-/ + +public section + +open Polynomial Complex Filter Topology + +namespace RealRooted + +/-- A locally pointwise convergent infinite differential series with a +Laguerre--Pólya symbol and target represents an entire Laguerre--Pólya function. +This is O'Sullivan's Theorem 3.6, with ordinary convergence and zero output allowed. -/ +theorem IsLaguerrePolya.exists_eqOn_differential_series {φ ψ g : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hψ : IsLaguerrePolya ψ) {r : ℝ} + (hseries : ∀ z ∈ Metric.ball (0 : ℂ) r, + Tendsto (fun n => ∑ j ∈ Finset.range n, + iteratedDeriv j φ 0 * iteratedDeriv j ψ z / j.factorial) atTop (𝓝 (g z))) : + ∃ G : ℂ → ℂ, IsLaguerrePolya G ∧ Set.EqOn G g (Metric.ball 0 r) := by + let γ : ℕ → ℝ := fun j => (iteratedDeriv j φ 0).re + let F (n : ℕ) := ((rescaledJensenPolynomial n γ).map ofRealHom).differentialApply ψ + have hF (n : ℕ) : IsLaguerrePolya (F n) := by + apply hψ.differentialApply + rw [rescaledJensenPolynomial_eq_jensenPolynomial_comp] + exact (hφ.jensenPolynomial_splits n).comp_of_natDegree_le_one + ((natDegree_C_mul_le _ _).trans (by simp)) + apply exists_isLaguerrePolya_eqOn_of_tendsto hF + intro z hz + apply tendsto_differentialApply_rescaledJensenPolynomial γ ψ z (g z) + have hγ (j : ℕ) : (γ j : ℂ) = iteratedDeriv j φ 0 := + ofReal_re_iteratedDeriv_zero hφ.conj j + simpa only [hγ] using hseries z hz + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialOrder.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialOrder.lean new file mode 100644 index 000000000..35fa09f39 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialOrder.lean @@ -0,0 +1,63 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderDerivative +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderConvergence +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Star +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialCoefficients +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +/-! +# Infinite differential preservation under reciprocal order bounds + +Positive exponents above the symbol and target growth orders suffice when +their reciprocals sum to more than one. The normally convergent differential +sum then remains LP. No separate coefficient convergence hypothesis is imposed, +and zero symbols, targets and outputs are included. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- The reciprocal growth-order condition gives LP preservation by the actual +infinite differential operator, including the identically zero result. -/ +theorem IsLaguerrePolya.infiniteDifferentialApply_of_order {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) {ρ σ p q : ℝ} + (hoφ : TauCeti.OrderLE φ ρ) (hp : 0 < p) (hρ : ρ < p) + (hof : TauCeti.OrderLE f σ) (hq : 0 < q) (hσ : σ < q) (hsum : 1 < p⁻¹ + q⁻¹) : + IsLaguerrePolya (Complex.infiniteDifferentialApply φ f) := by + have hc : ∀ k, Tendsto (fun N => ∑ n ∈ Finset.range N, + (iteratedDeriv n φ 0).re * (iteratedDeriv (k + n) f 0).re / n.factorial) atTop + (𝓝 ((iteratedDeriv k (Complex.infiniteDifferentialApply φ f) 0).re)) := by + intro k + have hdf := (hf.differentiable.contDiff (n := ⊤)).differentiable_iteratedDeriv k + (WithTop.coe_lt_top _) + have hs := (summable_norm_infiniteDifferentialApply_of_order hφ.differentiable hoφ hp hρ + hdf (hof.iteratedDeriv hf.differentiable k) hq hσ hsum 0).of_norm.hasSum + have hre := Complex.hasSum_re hs + have hreal (n : ℕ) : (iteratedDeriv n φ 0).im = 0 := by + rw [← Complex.ofReal_re_iteratedDeriv_zero hφ.conj n] + simp + simp only [div_natCast_re, mul_re, hreal, zero_mul, sub_zero] at hre + rw [iteratedDeriv_infiniteDifferentialApply_of_order hφ.differentiable hoφ hp hρ + hf.differentiable hof hq hσ hsum] + simpa only [Complex.infiniteDifferentialApply, + iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm k] using + hre.tendsto_sum_nat + have hconj (z : ℂ) : Complex.infiniteDifferentialApply φ f (starRingEnd ℂ z) = + starRingEnd ℂ (Complex.infiniteDifferentialApply φ f z) := + Complex.infiniteDifferentialApply_conj hφ.conj hf.conj z + rw [eq_complexExpGeneratingFunction_of_iteratedDeriv + (differentiable_infiniteDifferentialApply_of_order hφ.differentiable hoφ hp hρ + hf.differentiable hof hq hσ hsum) + (fun k => (Complex.ofReal_re_iteratedDeriv_zero hconj k).symm)] + exact hφ.infinite_differential_coefficients hf hc + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialSummable.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialSummable.lean new file mode 100644 index 000000000..6edf031f0 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteDifferentialSummable.lean @@ -0,0 +1,39 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialLocal +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Closure + +/-! +# Globally convergent infinite differential images + +The checked local pointwise operator theorem gives LP preservation of the +actual globally convergent series, without supplied order bounds. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- A globally convergent differential series with LP symbol and target +is itself LP. This is a global specialization of the checked local theorem. -/ +theorem IsLaguerrePolya.infiniteDifferentialApply_of_summable {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hf : IsLaguerrePolya f) + (hs : ∀ z : ℂ, Summable (fun n : ℕ => + iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ))) : + IsLaguerrePolya (infiniteDifferentialApply φ f) := by + apply IsLaguerrePolya.of_forall_approx + intro R ε hε + obtain ⟨G, hG, heq⟩ := hφ.exists_eqOn_differential_series hf (r := R + 1) + (g := infiniteDifferentialApply φ f) (fun z _ => (hs z).hasSum.tendsto_sum_nat) + obtain ⟨p, hp, happrox⟩ := hG.exists_approx R hε + refine ⟨p, hp, fun z hz => ?_⟩ + have hz' : z ∈ Metric.ball (0 : ℂ) (R + 1) := by + simpa only [Metric.mem_ball, dist_zero_right] using hz.trans_lt (lt_add_one R) + rw [← heq hz'] + exact happrox z hz + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteZeros.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteZeros.lean new file mode 100644 index 000000000..e18af0f0e --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteZeros.lean @@ -0,0 +1,67 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RootDivision + +/-! +# Polynomial factors from infinitely many LP zeros + +An LP function with infinitely many distinct real zeros admits real-rooted +polynomial factors of every prescribed degree, with LP cofactors. No growth +bound or canonical-product representation is required. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Removing one real zero leaves infinitely many others and a nonzero value at zero. -/ +private theorem exists_sub_mul_of_infinite_zeros {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hinf : Set.Infinite {r : ℝ | f r = 0}) : + ∃ (r : ℝ) (g : ℂ → ℂ), r ≠ 0 ∧ IsLaguerrePolya g ∧ g 0 ≠ 0 ∧ + Set.Infinite {u : ℝ | g u = 0} ∧ ∀ z, f z = (z - r) * g z := by + obtain ⟨r, hr⟩ := hinf.nonempty + have hr0 : r ≠ 0 := by intro hz; subst r; exact hf0 (by simpa using hr) + let g := dslope f (r : ℂ) + have hfactor (z : ℂ) : f z = (z - r) * g z := by + simpa only [smul_eq_mul] using (sub_smul_dslope_of_zero hr z).symm + have hg0 : g 0 ≠ 0 := by + intro hzero + exact hf0 (by rw [hfactor, hzero, mul_zero]) + refine ⟨r, g, hr0, hf.dslope_of_eq_zero hr, hg0, ?_, hfactor⟩ + apply (hinf.sdiff (Set.finite_singleton r)).mono + intro u hu + have hur : u ≠ r := by simpa using hu.2 + have hne : (u : ℂ) - r ≠ 0 := sub_ne_zero.mpr (by exact_mod_cast hur) + have hprod : ((u : ℂ) - r) * g u = 0 := by rw [← hfactor]; exact hu.1 + exact (mul_eq_zero.mp hprod).resolve_left hne + +/-- Infinitely many real LP zeros supply polynomial factors of any exact +degree, with LP cofactors and both factors nonzero at the origin. -/ +theorem IsLaguerrePolya.exists_polynomial_factor_of_infinite_zeros {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hinf : Set.Infinite {r : ℝ | f r = 0}) (N : ℕ) : + ∃ (q : ℝ[X]) (g : ℂ → ℂ), q.Splits ∧ q.coeff 0 ≠ 0 ∧ q.natDegree = N ∧ + IsLaguerrePolya g ∧ g 0 ≠ 0 ∧ ∀ z, f z = (q.map ofRealHom).eval z * g z := by + induction N generalizing f with + | zero => + exact ⟨1, f, Splits.one, by simp, by simp, hf, hf0, by simp⟩ + | succ N ih => + obtain ⟨r, g, hr, hg, hg0, hginf, hfactor⟩ := + exists_sub_mul_of_infinite_zeros hf hf0 hinf + obtain ⟨q, t, hq, hq0, hdegree, ht, ht0, hgt⟩ := ih hg hg0 hginf + have hqne : q ≠ 0 := by intro hz; simp [hz] at hq0 + refine ⟨(X - C r) * q, t, (Splits.X_sub_C r).mul hq, ?_, ?_, ht, ht0, ?_⟩ + · rw [coeff_zero_eq_eval_zero, eval_mul, eval_sub, eval_X, eval_C, + zero_sub, ← coeff_zero_eq_eval_zero] + exact mul_ne_zero (neg_ne_zero.mpr hr) hq0 + · rw [natDegree_mul (X_sub_C_ne_zero r) hqne, natDegree_X_sub_C, hdegree] + lia + · intro z + rw [hfactor, hgt] + simp [Polynomial.map_mul, Polynomial.map_sub, mul_assoc] + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteZerosOrder.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteZerosOrder.lean new file mode 100644 index 000000000..633a2c81f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/InfiniteZerosOrder.lean @@ -0,0 +1,52 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FiniteZeros +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.PolynomialFactor +import TauCeti.Analysis.Complex.GrowthOrder.Exponential + +/-! +# Infinitely many distinct zeros below order one + +Finite zero extraction leaves a zero-free entire factor of the same growth +order. Below order one that factor is constant, so a nonpolynomial function +cannot have only finitely many distinct zeros. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- A nonpolynomial LP function of order below one, nonzero at zero, +has infinitely many distinct real zeros. No simplicity assumption is made. -/ +theorem IsLaguerrePolya.infinite_real_zeros_of_order_lt_one + {f : ℂ → ℂ} (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hnp : ∀ p : ℂ[X], f ≠ fun z => p.eval z) : + Set.Infinite {x : ℝ | f x = 0} := by + by_contra hfin + obtain ⟨q, g, _, hq0, hg, hgnz, hfactor⟩ := + hf.exists_polynomial_factor_of_finite_zeros hf0 (Set.not_infinite.mp hfin) + have hq : q.map ofRealHom ≠ 0 := by + intro h + have hh := congrArg (fun p : ℂ[X] => p.coeff 0) h + simp only [coeff_map, coeff_zero, ofRealHom_eq_coe] at hh + exact hq0 (ofReal_eq_zero.mp hh) + have hgo : TauCeti.OrderLE g rho := by + apply TauCeti.OrderLE.of_polynomial_mul (p := q.map ofRealHom) _ hq + simpa only [← hfactor] using horder + obtain ⟨p, hp, heq⟩ := hgo.exists_eq_cexp_polynomial_eval_of_forall_ne_zero + hg.differentiable hgnz + have hdegree : p.natDegree = 0 := by + rw [Nat.floor_eq_zero.mpr hrho] at hp + exact Nat.eq_zero_of_le_zero hp + apply hnp (q.map ofRealHom * C (exp (p.coeff 0))) + funext z + rw [hfactor, heq, eq_C_of_natDegree_eq_zero hdegree] + simp + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/IteratedDerivative.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/IteratedDerivative.lean new file mode 100644 index 000000000..736098eaf --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/IteratedDerivative.lean @@ -0,0 +1,25 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative + +/-! +# Iterated derivatives of Laguerre--Pólya functions + +Every finite complex derivative of a zero-aware Laguerre--Pólya function +remains in the class. +-/ + +public section + +namespace RealRooted + +/-- The Laguerre--Pólya class is closed under every iterated complex derivative. -/ +theorem IsLaguerrePolya.iteratedDeriv {f : ℂ → ℂ} (hf : IsLaguerrePolya f) (n : ℕ) : + IsLaguerrePolya (iteratedDeriv n f) := by + induction n with + | zero => simpa using hf + | succ n ih => rw [iteratedDeriv_succ]; exact ih.deriv + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Jensen.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Jensen.lean index 336d119e5..797645c51 100644 --- a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Jensen.lean +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Jensen.lean @@ -1,9 +1,7 @@ module -public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya -public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs -import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative -import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IteratedDerivative +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator import RealRooted.Mathlib.Algebra.Polynomial.Reverse import Mathlib.Analysis.Complex.TaylorSeries @@ -21,7 +19,9 @@ open Polynomial Complex Filter Topology namespace RealRooted -private theorem taylorDifferentialOperator_X_pow (f : ℂ → ℂ) (n : ℕ) : +/-- Applying a Taylor differential operator to a monomial gives the +reflected Jensen polynomial of its Taylor data. -/ +theorem taylorDifferentialOperator_X_pow (f : ℂ → ℂ) (n : ℕ) : taylorDifferentialOperator f (X ^ n) = reflect n (jensenPolynomial n (fun k => (iteratedDeriv k f 0).re)) := by classical @@ -53,10 +53,8 @@ theorem IsLaguerrePolya.jensenPolynomial_splits {f : ℂ → ℂ} /-- Every derivative of a Laguerre–Pólya function belongs to the same class. -/ theorem IsLaguerrePolya.iterate_deriv {f : ℂ → ℂ} - (hf : IsLaguerrePolya f) (n : ℕ) : IsLaguerrePolya (iteratedDeriv n f) := by - induction n with - | zero => simpa using hf - | succ n ih => simpa [iteratedDeriv_succ] using ih.deriv + (hf : IsLaguerrePolya f) (n : ℕ) : IsLaguerrePolya (iteratedDeriv n f) := + hf.iteratedDeriv n /-- Jensen's theorem also applies to every shift of the Taylor data. -/ theorem IsLaguerrePolya.jensenPolynomial_shift_splits {f : ℂ → ℂ} diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenProduct.lean new file mode 100644 index 000000000..38cebf723 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenProduct.lean @@ -0,0 +1,31 @@ +module + +public import RealRooted.MultiplierSequence.JensenProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +/-! +# An auxiliary-product form of Jensen's criterion + +The Jensen polynomials of binomially convolved Taylor data detect membership +of the product in the Laguerre--Pólya class. This identity is the core of +O'Sullivan's Theorem 3.5, https://arxiv.org/abs/2007.13582. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- All Jensen product polynomials split exactly when the entire product is +Laguerre--Pólya. No nonvanishing assumption is needed for this product statement. -/ +theorem isLaguerrePolya_mul_iff_jensenProductPolynomial_splits {f g : ℂ → ℂ} + {gamma delta : ℕ → ℝ} (hf : Differentiable ℂ f) (hg : Differentiable ℂ g) + (hgamma : ∀ k, iteratedDeriv k f 0 = (gamma k : ℂ)) + (hdelta : ∀ k, iteratedDeriv k g 0 = (delta k : ℂ)) : + IsLaguerrePolya (f * g) ↔ ∀ d, (jensenProductPolynomial d gamma delta).Splits := + isLaguerrePolya_iff_jensenPolynomial_splits (hf.mul hg) + (iteratedDeriv_mul_eq_binomialConvolution hf hg hgamma hdelta) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenSignBoundary.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenSignBoundary.lean new file mode 100644 index 000000000..c0ab8ab20 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenSignBoundary.lean @@ -0,0 +1,165 @@ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya + +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Closure +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlow +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorProduct +import RealRooted.Hermite.GaussianOperator +import RealRooted.Hermite.PolynomialGaussian +import RealRooted.Hermite.ExponentialJensenMultiplicity +import RealRooted.SimpleRoots.Reflection +import RealRooted.Mathlib.Algebra.Polynomial.Reverse + +/-! +# A boundary in the Jensen interlacing sign hypothesis + +Craven–Csordas (1994), Proposition 4.1(1), ends: "if φ(x) ∈ L-P and all zeros +have the same sign, then the zeros of gn and gn−1 are interlacing." +Read as a hypothesis on zeros of the symbol alone, this is false when a +Gaussian factor is allowed. The checked example `(z+1) exp(-z²)` has sole +zero `-1`, belongs to LP, and is outside the excluded nonzero-slope +polynomial–exponential case. Yet its first two Jensen rows are `1+X` and +`1+2X-2X²`, which do not interlace. Positivity hypotheses on multiplier +coefficients provide the corrected sufficient condition in `JensenPositiveInterlacing`. +-/ + +@[expose] public section + +open Polynomial Complex RealRooted.HermitePoulain + +namespace RealRooted + +/-- A Gaussian times one negative-root linear factor. -/ +noncomputable def oneZeroGaussian (z : ℂ) : ℂ := (z + 1) * exp (-z ^ 2) + +/-- The example is an LP function with exactly the one negative real zero. -/ +private theorem oneZeroGaussian_data : + IsLaguerrePolya oneZeroGaussian ∧ oneZeroGaussian 0 = 1 ∧ + ∀ z, oneZeroGaussian z = 0 ↔ z = -1 := by + have hlin : IsLaguerrePolya (fun z : ℂ => z + 1) := by + apply IsLaguerrePolya.of_forall_approx + intro R ε hε + refine ⟨X + C 1, Or.inr (Splits.X_add_C 1), ?_⟩ + intro z _ + simpa using hε + refine ⟨?_, by simp [oneZeroGaussian], ?_⟩ + · change IsLaguerrePolya (fun z => (z + 1) * exp (-z ^ 2)) + simpa only [Pi.mul_def, ofReal_one, neg_one_mul] using + hlin.mul (isLaguerrePolya_exp_neg_mul_sq (a := 1) (by norm_num)) + · intro z + simp [oneZeroGaussian, exp_ne_zero, add_eq_zero_iff_eq_neg] + +/-- The Gaussian raising formula gives all monomial differential images. -/ +private theorem oneZeroGaussian_operator_power (d : ℕ) : + taylorDifferentialOperator oneZeroGaussian (X ^ d) = + (hermiteHomogeneous X (C (-1 : ℝ)) d).derivative + + hermiteHomogeneous X (C (-1 : ℝ)) d := by + have h := taylorDifferentialOperator_polynomial_mul + (f := fun z => exp (((0 : ℝ) : ℂ) * z + ((-1 : ℝ) : ℂ) * z ^ 2)) + (by fun_prop) (X + C 1) (X ^ d) + rw [taylor_exp_quadratic_X_pow 0 (-1), applyAsDifferentialOperator_X_add_C] at h + change taylorDifferentialOperator (fun z => (z + 1) * exp (-z ^ 2)) (X ^ d) = _ + simpa using h + +/-- Both low-degree Jensen rows can be evaluated exactly. -/ +private theorem oneZeroGaussian_jensen_low : + jensenPolynomial 1 (fun k => (iteratedDeriv k oneZeroGaussian 0).re) = X + 1 ∧ + jensenPolynomial 2 (fun k => (iteratedDeriv k oneZeroGaussian 0).re) = + 1 + C 2 * X - C 2 * X ^ 2 := by + constructor + · have h := congrArg (reflect 1) (oneZeroGaussian_operator_power 1) + rw [taylorDifferentialOperator_X_pow, reflect_reflect] at h + simpa [reflect_add] using h + · have hbase : taylorDifferentialOperator oneZeroGaussian (X ^ 2) = + C 2 * X + (X ^ 2 - C 2) := by + rw [oneZeroGaussian_operator_power] + norm_num [hermiteHomogeneous_add_two, C_ofNat] + ring + have h := congrArg (reflect 2) hbase + rw [taylorDifferentialOperator_X_pow, reflect_reflect] at h + norm_num [reflect_add, reflect_sub, reflect_X, revAt_eq_ite] at h + convert h using 1 + ring + +/-- The root `-1` of the linear row is below every root of the quadratic row. -/ +private theorem not_interlaces_oneZeroGaussian_rows : + ¬ Interlaces (X + 1 : ℝ[X]) (1 + C 2 * X - C 2 * X ^ 2) := by + intro h + obtain ⟨rs, ss, _, _, hrs, hss, hi⟩ := h.2.2.2 + have hssone : ss = [-1] := by + apply Multiset.coe_eq_singleton.mp + simpa only [← C_1, roots_X_add_C] using hss + subst ss + cases rs with + | nil => simp [ListInterlaces] at hi + | cons r rs => + cases rs with + | nil => simp [ListInterlaces] at hi + | cons t rs => + have hr : (1 + C 2 * X - C 2 * X ^ 2 : ℝ[X]).IsRoot r := by + apply isRoot_of_mem_roots + rw [← hrs] + simp + have hrle : r ≤ -1 := hi.1 + have he : 1 + 2 * r - 2 * r ^ 2 = 0 := by simpa [IsRoot.def] using hr + nlinarith [sq_nonneg r] + +/-- Gaussian regularization makes all Jensen rows simple, independently of +the false sign implication being tested. -/ +private theorem oneZeroGaussian_simple (d : ℕ) : + IsSimpleRealRooted (jensenPolynomial d (fun k => (iteratedDeriv k oneZeroGaussian 0).re)) := by + have hF := simple_taylor_polynomial_gaussian (q := X + C 1) (Splits.X_add_C 1) + (by simp) 0 (s := -1) (by norm_num) (pow_ne_zero d X_ne_zero) (Splits.X.pow d) + have hsimple : IsSimpleRealRooted (taylorDifferentialOperator oneZeroGaussian (X ^ d)) := by + change IsSimpleRealRooted + (taylorDifferentialOperator (fun z => (z + 1) * exp (-z ^ 2)) (X ^ d)) + simpa using hF + rw [taylorDifferentialOperator_X_pow] at hsimple + have hsplit := (splits_reflect_iff (natDegree_jensenPolynomial_le d _)).mp hsimple.2.1 + have hconst : + (jensenPolynomial d (fun k => (iteratedDeriv k oneZeroGaussian 0).re)).coeff 0 ≠ 0 := by + simp [coeff_jensenPolynomial, oneZeroGaussian] + refine ⟨?_, hsplit, hsimple.2.2.of_reflect hconst hsplit (natDegree_jensenPolynomial_le d _)⟩ + intro hz + exact hconst (by simp [hz]) + +/-- The example is outside the exceptional polynomial–exponential class. -/ +private theorem oneZeroGaussian_not_exp_polynomial (q : ℝ[X]) {a : ℝ} (ha : a ≠ 0) : + oneZeroGaussian ≠ fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z) := by + intro heq + have hq : q ≠ 0 := by + intro hz + have h := congrFun heq 0 + simp [oneZeroGaussian, hz] at h + have hs := oneZeroGaussian_simple (q.natDegree + 2) + rw [heq] at hs + have hm := rootMultiplicity_jensen_polynomial_exp hq ha (q.natDegree + 2) (by lia) + have hr := (rootMultiplicity_pos hs.1).mp (show 0 < + (jensenPolynomial (q.natDegree + 2) (fun k => + (iteratedDeriv k + (fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) 0).re)).rootMultiplicity + (-a⁻¹) from by rw [hm]; lia) + have hsimple := hs.2.2 _ hr + lia + +/-- Same-sign zeros of the symbol alone do not imply consecutive Jensen +interlacing, even under the other hypotheses of the simple-Jensen theorem. -/ +theorem oneZeroGaussian_counterexample : + IsLaguerrePolya oneZeroGaussian ∧ oneZeroGaussian 0 = 1 ∧ + (∀ z, oneZeroGaussian z = 0 ↔ z = -1) ∧ + (∀ (q : ℝ[X]) (a : ℝ), a ≠ 0 → + oneZeroGaussian ≠ fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) ∧ + ¬ Interlaces (jensenPolynomial 1 (fun k => (iteratedDeriv k oneZeroGaussian 0).re)) + (jensenPolynomial 2 (fun k => (iteratedDeriv k oneZeroGaussian 0).re)) := by + refine ⟨oneZeroGaussian_data.1, oneZeroGaussian_data.2.1, oneZeroGaussian_data.2.2, + fun q _ ha => oneZeroGaussian_not_exp_polynomial q ha, ?_⟩ + rw [oneZeroGaussian_jensen_low.1, oneZeroGaussian_jensen_low.2] + exact not_interlaces_oneZeroGaussian_rows + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenSimple.lean new file mode 100644 index 000000000..7eb76a199 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/JensenSimple.lean @@ -0,0 +1,75 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +public import RealRooted.SimpleRoots +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.Hermite.PoulainSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PolynomialFactors +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.SimpleRoots.Reflection +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Simple Jensen roots below order one + +A nonpolynomial Laguerre–Pólya symbol of order below one and nonzero at zero +strictly regularizes every nonzero real-rooted polynomial. Its Jensen +polynomials consequently have simple roots. This is a growth-restricted +instance of the corrected Craven–Csordas (1994) Proposition 4.1 argument. +-/ + +public section + +open Polynomial Complex RealRooted.HermitePoulain + +namespace RealRooted + +/-- A nonpolynomial LP symbol of order below one strictly regularizes every +nonzero real-rooted polynomial through its Taylor differential operator. -/ +theorem IsLaguerrePolya.simple_taylorDifferentialOperator {f : ℂ → ℂ} {rho : ℝ} + (hf : IsLaguerrePolya f) (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hf0 : f 0 ≠ 0) (hnp : ∀ q : ℂ[X], f ≠ fun z => q.eval z) + {p : ℝ[X]} (hp0 : p ≠ 0) (hp : p.Splits) : + IsSimpleRealRooted (taylorDifferentialOperator f p) := by + have hfn : f ≠ 0 := fun h => hf0 (by simp [h]) + obtain ⟨q, g, hq, hq0, hdegree, hg, hg0, hfactor⟩ := + exists_polynomial_factor_of_order_lt_one horder hrho hf.differentiable hf0 hf.conj + (fun z hz => hf.im_eq_zero_of_eq_zero hfn hz) hnp (p.natDegree - 1) + have hgre : (g 0).re ≠ 0 := by + intro hz + have hreal := ofReal_re_iteratedDeriv_zero hg.conj 0 + simp only [iteratedDeriv_zero, hz, ofReal_zero] at hreal + exact hg0 hreal.symm + rw [show f = (fun z => (q.map ofRealHom).eval z * g z) from funext hfactor, + taylorDifferentialOperator_polynomial_mul hg.differentiable] + apply isSimpleRealRooted_applyAsDifferentialOperator hq hq0 + (taylorDifferentialOperator_ne_zero hgre hp0) (hg.taylorDifferentialOperator_splits hp) + rwa [natDegree_taylorDifferentialOperator hgre hp0] + +/-- Every Jensen polynomial of a nonpolynomial LP symbol of order below one +and nonzero initial coefficient has simple real roots. The final coefficient +may vanish, so no exact-degree hypothesis is imposed. -/ +theorem IsLaguerrePolya.simple_jensenPolynomial {f : ℂ → ℂ} {rho : ℝ} + (hf : IsLaguerrePolya f) (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hf0 : f 0 ≠ 0) (hnp : ∀ q : ℂ[X], f ≠ fun z => q.eval z) (d : ℕ) : + IsSimpleRealRooted (jensenPolynomial d (fun k => (iteratedDeriv k f 0).re)) := by + have hsimple := hf.simple_taylorDifferentialOperator horder hrho hf0 hnp + (pow_ne_zero d X_ne_zero) (Splits.X.pow d) + rw [taylorDifferentialOperator_X_pow] at hsimple + have hconst : (jensenPolynomial d (fun k => (iteratedDeriv k f 0).re)).coeff 0 ≠ 0 := by + simp only [coeff_jensenPolynomial, Nat.zero_le, ite_true, Nat.choose_zero_right, + Nat.cast_one, one_mul, iteratedDeriv_zero] + intro hz + have hreal := ofReal_re_iteratedDeriv_zero hf.conj 0 + simp only [iteratedDeriv_zero, hz, ofReal_zero] at hreal + exact hf0 hreal.symm + refine ⟨?_, hf.jensenPolynomial_splits d, + hsimple.2.2.of_reflect hconst (hf.jensenPolynomial_splits d) + (natDegree_jensenPolynomial_le d _)⟩ + intro hz + exact hconst (by simp [hz]) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LinearProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LinearProduct.lean new file mode 100644 index 000000000..319544be1 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LinearProduct.lean @@ -0,0 +1,33 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import RealRooted.Mathlib.Algebra.Polynomial.LinearProductDegree + +/-! +# Signed real linear products in the Laguerre--Pólya class + +Unlike the positive Type-I statement, this closure theorem allows slopes of +both signs. Zero slopes and finite or empty effective products are included. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- A real linear factor with arbitrary signed slope is Laguerre--Pólya. -/ +theorem isLaguerrePolya_one_add_mul (a : ℝ) : + IsLaguerrePolya (fun z : ℂ => 1 + (a : ℂ) * z) := by + simpa using isLaguerrePolya_eval_map (splits_one_add_C_mul_X a) + +/-- A summable family of signed real slopes defines a Laguerre--Pólya product. -/ +theorem isLaguerrePolya_tprod_one_add_mul {ι : Type*} {a : ι → ℝ} (ha : Summable a) : + IsLaguerrePolya (fun z : ℂ => ∏' i, (1 + (a i : ℂ) * z)) := + IsLaguerrePolya.of_hasProdLocallyUniformly + (fun i => isLaguerrePolya_one_add_mul (a i)) + (hasProdLocallyUniformlyOn_one_add_ofReal_mul ha) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LinearProductMomentMeasure.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LinearProductMomentMeasure.lean new file mode 100644 index 000000000..16078432a --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LinearProductMomentMeasure.lean @@ -0,0 +1,49 @@ +/- +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.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.PowerSum +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeILinearProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PowerSumMoments +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Star +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + + +/-! +# The exact logarithmic moment measure of a positive linear product +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +/-- The slope-weighted atomic measure is the actual complex logarithmic moment +measure of a summable positive linear product. Zero slopes contribute zero mass. -/ +theorem logDeriv_tprod_moments_sum_smul_dirac {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) (k : ℕ) : + Integrable (fun x : ℝ => x ^ k) + (Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i))) ∧ + (-1 : ℂ) ^ k * iteratedDeriv k + (logDeriv (fun z : ℂ => ∏' i, (1 + (a i : ℂ) * z))) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂Measure.sum + (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)) : ℝ) : ℂ) := by + refine ⟨integrable_pow_sum_smul_dirac ha hs k, ?_⟩ + have hf := isLaguerrePolyaTypeI_tprod_one_add_mul ha hs + have hreal := ofReal_re_iteratedDeriv_zero + (logDeriv_conj (f := fun z : ℂ => ∏' i, (1 + (a i : ℂ) * z)) + hf.toLaguerrePolya.conj) k + have h := congrArg (fun t : ℝ => (t : ℂ)) + ((signed_logDeriv_linear_product a hs k).trans + (integral_pow_sum_smul_dirac ha k).symm) + simpa only [ofReal_div, ofReal_mul, ofReal_pow, ofReal_neg, ofReal_one, + ofReal_natCast, hreal] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LocalLimit.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LocalLimit.lean new file mode 100644 index 000000000..3665aa69f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LocalLimit.lean @@ -0,0 +1,67 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FormalJensen +import RealRooted.MultiplierSequence.JensenLimit +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.Mathlib.Analysis.Complex.LocallyUniformIteratedDeriv +import Mathlib.Analysis.Complex.LocallyUniformLimit +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# Entire extension of local Laguerre--Pólya limits + +A locally uniform limit on a disk of entire Laguerre--Pólya functions extends +to an entire function in the same class. No nonzero value is required, and the +conclusion does not claim global convergence of the original sequence. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- Limits of all Taylor data of Laguerre--Pólya functions define an entire +function in the same class, without any assumed growth bound on those data. -/ +theorem isLaguerrePolya_of_tendsto_iteratedDeriv {F : ℕ → ℂ → ℂ} {c : ℕ → ℝ} + (hF : ∀ n, IsLaguerrePolya (F n)) + (hc : ∀ k, Tendsto (fun n => (iteratedDeriv k (F n) 0).re) atTop (𝓝 (c k))) : + IsLaguerrePolya (complexExpGeneratingFunction c) := by + apply isLaguerrePolya_of_jensenPolynomial_splits + intro d + exact jensenPolynomial_splits_of_tendsto d + (fun n => (hF n).jensenPolynomial_splits d) hc + +/-- A local uniform limit of entire Laguerre--Pólya functions on a nonempty +disk centered at zero has an entire Laguerre--Pólya extension. This includes +an identically zero local limit. -/ +theorem exists_isLaguerrePolya_eqOn_of_local_limit {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) {r : ℝ} (hr : 0 < r) + (hlim : TendstoLocallyUniformlyOn F g atTop (Metric.ball 0 r)) : + ∃ G : ℂ → ℂ, IsLaguerrePolya G ∧ Set.EqOn G g (Metric.ball 0 r) := by + have hd : ∀ᶠ n in atTop, Differentiable ℂ (F n) := + Eventually.of_forall fun n => (hF n).differentiable + have hzero : (0 : ℂ) ∈ Metric.ball 0 r := by simpa using hr + have hjet (k : ℕ) : Tendsto (fun n => iteratedDeriv k (F n) 0) atTop + (𝓝 (iteratedDeriv k g 0)) := + (hlim.iteratedDeriv_of_entire hd Metric.isOpen_ball k).tendsto_at hzero + have hjet_re (k : ℕ) := (Complex.continuous_re.tendsto _).comp (hjet k) + have hreal (k : ℕ) : ((iteratedDeriv k g 0).re : ℂ) = iteratedDeriv k g 0 := by + exact tendsto_nhds_unique (hjet_re k).ofReal + ((hjet k).congr fun n => (ofReal_re_iteratedDeriv_zero (hF n).conj k).symm) + let c : ℕ → ℝ := fun k => (iteratedDeriv k g 0).re + refine ⟨complexExpGeneratingFunction c, + isLaguerrePolya_of_tendsto_iteratedDeriv hF hjet_re, ?_⟩ + have hg := hlim.differentiableOn (hd.mono fun _ hi => hi.differentiableOn) Metric.isOpen_ball + intro z hz + rw [complexExpGeneratingFunction_eq_tsum, ← taylorSeries_eq_on_ball' hz hg] + apply tsum_congr + intro k + simp only [c, ofReal_div, ofReal_natCast, hreal, sub_zero] + ring + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogConcavity.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogConcavity.lean new file mode 100644 index 000000000..a58ce839f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogConcavity.lean @@ -0,0 +1,54 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.BrandenLC.Sequence +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Iterated log-concavity of Laguerre--Pólya coefficients + +All iterated log-concavity transforms of the ordinary Taylor coefficients of a +positive Type-I function are PF sequences. The same holds for the generalized +Laguerre coefficients at each real point of any Laguerre--Pólya function. +These statements use PF polynomial approximation and Brändén's finite theorem. +-/ + +public section + +namespace RealRooted + +/-- Every log-concavity iterate of a positive Type-I function's ordinary +Taylor coefficients is a Pólya-frequency sequence. -/ +theorem IsLaguerrePolyaTypeI.isPolyaFreqSeq_iterate_logConcavity {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) (m : ℕ) : + IsPolyaFreqSeq ((logConcavitySequence^[m]) + (fun k => (iteratedDeriv k f 0).re / k.factorial)) := by + obtain ⟨p, hp, hlim⟩ := hf + apply isPolyaFreqSeq_iterate_logConcavitySequence_of_limit hp ?_ m + intro k + simpa only [Complex.div_natCast_re] using + Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hlim k + +/-- A positive ordinary Taylor coefficient of a Type-I function remains +positive under every log-concavity iterate. -/ +theorem IsLaguerrePolyaTypeI.iterate_logConcavity_pos {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) (m k : ℕ) (hk : 0 < (iteratedDeriv k f 0).re) : + 0 < ((logConcavitySequence^[m]) + (fun j => (iteratedDeriv j f 0).re / j.factorial)) k := by + obtain ⟨p, hp, hlim⟩ := hf + apply iterate_logConcavitySequence_pos_of_limit hp ?_ m k (div_pos hk (by positivity)) + intro j + simpa only [Complex.div_natCast_re] using + Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hlim j + +/-- Every log-concavity iterate of the generalized Laguerre coefficients of +an LP function is a PF sequence at every real point. -/ +theorem IsLaguerrePolya.isPolyaFreqSeq_iterate_laguerreCoefficient {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (x : ℝ) (m : ℕ) : + IsPolyaFreqSeq ((logConcavitySequence^[m]) (laguerreCoefficient f x)) := by + obtain ⟨p, hp, hlim⟩ := hf.exists_pf_laguerreCoefficient_approx x + exact isPolyaFreqSeq_iterate_logConcavitySequence_of_limit hp hlim m + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeCompletelyMonotone.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeCompletelyMonotone.lean new file mode 100644 index 000000000..18c82708f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeCompletelyMonotone.lean @@ -0,0 +1,68 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.CompletelyMonotone.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIFactorization +import RealRooted.Mathlib.Analysis.Complex.LinearProductLogDerivative +import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalMixtures +import TauCeti.Analysis.CompletelyMonotone.OpenClosure + +/-! +# Complete monotonicity of Type-I logarithmic derivatives + +The logarithmic derivative of a Type-I function nonzero at zero is completely +monotone on the positive real axis. Its alternating real derivatives are +completely monotone as well. This gives the `k = 0` row of Ruiming Zhang, +*Complete monotonicity of special functions*, arXiv:1506.07012v13, Theorem 1. + +The hypothesis is more general than the paper's order-below-one hypothesis: +nonnegative exponential factors, finite products and nonzero constants are +included. The `k > 0` weighted-derivative rows require a separate identity. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- The logarithmic derivative of a Type-I function is a nonnegative constant +plus the positive resolvent sum from its linear-product factorization, at +every nonnegative real argument. -/ +theorem IsLaguerrePolyaTypeI.exists_re_logDeriv_eq_const_add_tsum + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) : + ∃ (gamma : ℝ) (a : ℕ → ℝ), 0 ≤ gamma ∧ (∀ i, 0 ≤ a i) ∧ Summable a ∧ + ∀ x : ℝ, 0 ≤ x → (logDeriv f (x : ℂ)).re = + gamma + ∑' i, a i / (1 + a i * x) := by + obtain ⟨gamma, a, hg, ha, hs, heq⟩ := hf.exists_eq_exp_mul_prod h0 + refine ⟨gamma, a, hg, ha, hs, fun x hx ↦ ?_⟩ + have h := Complex.re_logDeriv_exp_linear_product h0 gamma ha hs hx + simpa only [← heq] using h + +/-- A Type-I logarithmic derivative, restricted to the positive real axis, +is completely monotone. Smoothness is part of the conclusion. -/ +theorem IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ (logDeriv f (x : ℂ)).re) := by + obtain ⟨gamma, a, hg, ha, hs, heq⟩ := hf.exists_re_logDeriv_eq_const_add_tsum h0 + have hc := (TauCeti.isCompletelyMonotone_const hg).isCompletelyMonotoneOnIoi + have hm := TauCeti.isCompletelyMonotoneOnIoi_tsum_const_div_one_add_mul_pow ha ha hs 1 + simp only [pow_one] at hm + exact (hc.add hm).congr fun x hx ↦ heq x hx.le + +/-- Every alternating real derivative of a Type-I logarithmic derivative +is completely monotone on the positive axis. This is Zhang's `k = 0` family. -/ +theorem IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_signed_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) (m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 : ℝ) ^ m * iteratedDeriv m (fun y : ℝ ↦ (logDeriv f (y : ℂ)).re) x) := + (hf.isCompletelyMonotoneOnIoi_logDeriv h0).neg_one_pow_mul_iteratedDeriv m + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeHeatTrace.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeHeatTrace.lean new file mode 100644 index 000000000..13863b406 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeHeatTrace.lean @@ -0,0 +1,105 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace +public import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIFactorization +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PowerSumMoments +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import RealRooted.Mathlib.Analysis.Complex.LinearProductLogDerivative +import RealRooted.Mathlib.Analysis.Complex.IteratedRealDeriv +import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalSeriesDerivatives +import TauCeti.Analysis.Calculus.LogDeriv +import TauCeti.Analysis.SpecialFunctions.Complex.Exp.LogDeriv + +/-! +# Logarithmic derivatives as Laplace transforms of zero heat traces + +Zhang, arXiv:1506.07012v13, Lemma 2, equation (2.6), identifies signed +derivatives of a genus-zero product's logarithmic derivative with Laplace +moments of its zeros. The Type-I extension keeps its exponential constant. + +The endpoint `x = 0` uses the checked analytic Taylor coefficient formula +and the compatibility of real and complex derivatives. Positive arguments +use local termwise differentiation of the resolvent series. Empty spectra, +zero slopes, repeated zeros, and the zeroth derivative are all included. +-/ + +public section + +open Complex Filter MeasureTheory Topology + +namespace RealRooted + +/-- Every signed real derivative of the logarithmic derivative of a +summable nonnegative linear product is its zero heat-trace Laplace moment. +The real exponential contributes only to the zeroth derivative. -/ +theorem signed_iteratedDeriv_re_logDeriv_exp_linear_product {c : ℂ} (hc : c ≠ 0) + (gamma : ℝ) {a : ℕ → ℝ} (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (k : ℕ) {x : ℝ} (hx : 0 ≤ x) : + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ + (logDeriv (fun z : ℂ ↦ c * exp ((gamma : ℂ) * z) * + ∏' i, (1 + (a i : ℂ) * z)) (y : ℂ)).re) x = + gamma * 0 ^ k + ∫ t : ℝ in Set.Ioi 0, + Real.exp (-x * t) * t ^ k * Real.positiveSlopeHeatTrace a t := by + rw [(Real.laplace_positiveSlopeHeatTrace ha hs k hx).2] + rcases eq_or_lt_of_le hx with hzero | hpos + · subst x + let F : ℂ → ℂ := fun z ↦ c * exp ((gamma : ℂ) * z) * + ∏' i, (1 + (a i : ℂ) * z) + have hF : Differentiable ℂ F := + (((differentiable_const c).mul (by fun_prop)).mul + (Complex.differentiable_tprod_one_add_ofReal_mul hs)) + have hF0 : F 0 ≠ 0 := by simpa only [F, mul_zero, exp_zero, mul_one, + add_zero, tprod_one] using hc + have hreal := ((hF.analyticAt 0).logDeriv hF0).iteratedDeriv_real_of_complex k + change (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ (logDeriv F (y : ℂ)).re) 0 = _ + rw [hreal] + have hcoef := signed_logDeriv_exp_linear_product hc gamma a hs k + have hk : (k.factorial : ℝ) ≠ 0 := by exact_mod_cast Nat.factorial_ne_zero k + have hconst : (k.factorial : ℝ) * gamma * 0 ^ k = gamma * 0 ^ k := by + cases k <;> simp + simp only [mul_zero, add_zero, one_pow, div_one] at ⊢ + calc (-1 : ℝ) ^ k * (iteratedDeriv k (logDeriv F) 0).re + = (gamma * 0 ^ k + ∑' i, a i ^ (k + 1)) * (k.factorial : ℝ) := + (div_eq_iff hk).mp hcoef + _ = (k.factorial : ℝ) * gamma * 0 ^ k + + (k.factorial : ℝ) * ∑' i, a i ^ (k + 1) := by ring + _ = _ := by rw [hconst] + · have hlocal : (fun y : ℝ ↦ + (logDeriv (fun z : ℂ ↦ c * exp ((gamma : ℂ) * z) * + ∏' i, (1 + (a i : ℂ) * z)) (y : ℂ)).re) =ᶠ[𝓝 x] + (fun y : ℝ ↦ gamma + ∑' i, a i / (1 + a i * y)) := + Filter.Eventually.mono (isOpen_Ioi.mem_nhds hpos) fun y hy ↦ + Complex.re_logDeriv_exp_linear_product hc gamma ha hs hy.le + rw [hlocal.iteratedDeriv_eq k] + exact Real.neg_one_pow_mul_iteratedDeriv_const_add_tsum_resolvent ha hs gamma k hpos + +/-- A Type-I function has an actual positive-zero heat trace whose Laplace +moments recover all signed logarithmic derivatives on the closed axis. +The trace and exponential constant come from the same factorization. -/ +theorem IsLaguerrePolyaTypeI.exists_heatTrace_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) : + ∃ (gamma : ℝ) (a : ℕ → ℝ), + 0 ≤ gamma ∧ (∀ i, 0 ≤ a i) ∧ Summable a ∧ + f = (fun z : ℂ ↦ f 0 * exp ((gamma : ℂ) * z) * ∏' i, (1 + (a i : ℂ) * z)) ∧ + TauCeti.IsCompletelyMonotoneOnIoi (Real.positiveSlopeHeatTrace a) ∧ + ∀ (k : ℕ) (x : ℝ), 0 ≤ x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Real.positiveSlopeHeatTrace a t) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ (logDeriv f (y : ℂ)).re) x = + gamma * 0 ^ k + ∫ t : ℝ in Set.Ioi 0, + Real.exp (-x * t) * t ^ k * Real.positiveSlopeHeatTrace a t := by + obtain ⟨gamma, a, hg, ha, hs, heq⟩ := hf.exists_eq_exp_mul_prod h0 + refine ⟨gamma, a, hg, ha, hs, heq, + Real.isCompletelyMonotoneOnIoi_positiveSlopeHeatTrace hs, fun k x hx ↦ ?_⟩ + refine ⟨(Real.laplace_positiveSlopeHeatTrace ha hs k hx).1, ?_⟩ + have h := signed_iteratedDeriv_re_logDeriv_exp_linear_product h0 gamma ha hs k hx + simpa only [← heq] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeHierarchy.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeHierarchy.lean new file mode 100644 index 000000000..5980eedbf --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeHierarchy.lean @@ -0,0 +1,91 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import TauCeti.Analysis.CompletelyMonotone.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventHierarchy +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeCompletelyMonotone +import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventRodrigues +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas + +/-! +# Complete monotonicity of the weighted logarithmic-derivative hierarchy + +For a Type-I function nonzero at zero, all the weighted derivatives +`(-1 / x)^m D^k[x^(k+m) D^m(f' / f)]` are completely monotone on `(0, ∞)`. +This contains Ruiming Zhang, *Complete monotonicity of special functions*, +arXiv:1506.07012v13, Theorem 1, while also allowing nonnegative exponential +factors, finite products and nonzero constant functions. + +The proof identifies the actual derivative expression with positive resolvent +kernels. Complete monotonicity includes smoothness, and is asserted only on +the open positive half-line. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- Every member of the actual weighted logarithmic-derivative hierarchy +of a Type-I function has the positive factorial resolvent representation. -/ +theorem IsLaguerrePolyaTypeI.exists_weighted_logDeriv_eq_resolvent + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) : + ∃ (gamma : ℝ) (a : ℕ → ℝ), 0 ≤ gamma ∧ (∀ i, 0 ≤ a i) ∧ Summable a ∧ + ∀ (k m : ℕ) (x : ℝ), 0 < x → + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ + y ^ (k + m) * iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x = + Real.weightedResolventSum a gamma k m x := by + obtain ⟨gamma, a, hg, ha, hs, heq⟩ := hf.exists_re_logDeriv_eq_const_add_tsum h0 + refine ⟨gamma, a, hg, ha, hs, ?_⟩ + intro k m x hx + let L : ℝ → ℝ := fun y ↦ (logDeriv f (y : ℂ)).re + let g : ℝ → ℝ := fun y ↦ (-1 : ℝ) ^ m * iteratedDeriv m L y + have hgc : TauCeti.IsCompletelyMonotoneOnIoi g := + hf.isCompletelyMonotoneOnIoi_signed_logDeriv h0 m + have hbase : Set.EqOn g (Real.weightedResolventSum a gamma 0 m) (Set.Ioi 0) := by + intro y hy + have hlocal : L =ᶠ[𝓝 y] (fun z : ℝ ↦ gamma + ∑' i, a i / (1 + a i * z)) := + Filter.Eventually.mono (isOpen_Ioi.mem_nhds hy) fun z hz ↦ heq z hz.le + dsimp only [g] + rw [hlocal.iteratedDeriv_eq m] + exact (Real.weightedResolventSum_zero_eq_signed_deriv ha hs gamma m hy).symm + have h := Real.eulerRodrigues_eq_weightedResolventSum ha hs hgc.contDiffOn hbase k hx + rw [show g = fun y : ℝ ↦ (-1 : ℝ) ^ m * iteratedDeriv m L y from rfl, + Real.eulerRodrigues_signed_iteratedDeriv] at h + exact h + +/-- The full two-index weighted logarithmic-derivative hierarchy of a +Type-I entire function is completely monotone on the positive real axis. -/ +theorem IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_weighted_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ + y ^ (k + m) * iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x) := by + obtain ⟨gamma, a, hg, ha, hs, heq⟩ := hf.exists_weighted_logDeriv_eq_resolvent h0 + exact (Real.isCompletelyMonotoneOnIoi_weightedResolventSum ha hs hg k m).congr + fun x hx ↦ heq k m x hx + +/-- Nonzero scalar normalization does not change the hierarchy. In +particular, the same-sign coefficient convention in Zhang's theorem may +be normalized to positive coefficients without changing the conclusion. -/ +theorem IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_weighted_logDeriv_const_mul + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) + {c : ℂ} (hc : c ≠ 0) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ + y ^ (k + m) * iteratedDeriv m + (fun z : ℝ ↦ (logDeriv (fun w : ℂ ↦ c * f w) (z : ℂ)).re) y) x) := by + have hlog : logDeriv (fun w : ℂ ↦ c * f w) = logDeriv f := + funext fun w ↦ logDeriv_const_mul w c hc + rw [hlog] + exact hf.isCompletelyMonotoneOnIoi_weighted_logDeriv h0 k m + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMeasure.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMeasure.lean new file mode 100644 index 000000000..9e43b01b8 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMeasure.lean @@ -0,0 +1,74 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIFactorization +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PowerSumMoments +import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.PowerSum +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Star +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Positive measures for logarithmic derivatives of Type-I functions + +The signed Taylor coefficients of the analytic logarithmic derivative of a +Type-I entire function nonzero at zero are moments of a finite positive measure +with compact nonnegative support. The measure has exponential mass at zero and +mass equal to each linear slope at that slope. Repeated slopes count their +multiplicities. This proves the measure-existence direction of Sokal (2022), +Proposition 6, https://doi.org/10.1016/j.jmaa.2022.126432. + +The identity uses the actual complex coefficients, not only their real parts. +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +/-- The signed logarithmic-derivative Taylor coefficients of a Type-I entire +function are moments of the atomic measure from the same product factorization. -/ +theorem IsLaguerrePolyaTypeI.exists_logDeriv_moment_measure_factorization + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) : + ∃ (gamma : ℝ) (a : ℕ → ℝ) (mu : Measure ℝ), + 0 ≤ gamma ∧ (∀ i, 0 ≤ a i) ∧ Summable a ∧ + f = (fun z => f 0 * Complex.exp (gamma * z) * ∏' i, (1 + (a i : ℂ) * z)) ∧ + mu = ENNReal.ofReal gamma • Measure.dirac 0 + + Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)) ∧ + IsFiniteMeasure mu ∧ mu (Set.Icc 0 (∑' i, a i))ᶜ = 0 ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv f) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := by + obtain ⟨gamma, a, hg, ha, hs, heq⟩ := hf.exists_eq_exp_mul_prod h0 + obtain ⟨mu, hmu, hfinite, hsupport, hmom⟩ := exists_measure_power_sum_moments ha hs hg + refine ⟨gamma, a, mu, hg, ha, hs, heq, hmu, hfinite, hsupport, fun k => ⟨(hmom k).1, ?_⟩⟩ + have hpower := signed_logDeriv_exp_linear_product h0 gamma a hs k + rw [← heq] at hpower + have heqreal := hpower.trans (hmom k).2.symm + have hreal : ((iteratedDeriv k (logDeriv f) 0).re : ℂ) = + iteratedDeriv k (logDeriv f) 0 := + ofReal_re_iteratedDeriv_zero (logDeriv_conj hf.toLaguerrePolya.conj) k + have h := congrArg (fun r : ℝ => (r : ℂ)) heqreal + simpa only [ofReal_div, ofReal_mul, ofReal_pow, ofReal_neg, ofReal_one, + ofReal_natCast, hreal] using h + +/-- The signed logarithmic-derivative Taylor coefficients of a Type-I entire +function are the moments of an explicit finite positive atomic measure. -/ +theorem IsLaguerrePolyaTypeI.exists_logDeriv_moment_measure + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) : + ∃ (gamma : ℝ) (a : ℕ → ℝ) (mu : Measure ℝ), + 0 ≤ gamma ∧ (∀ i, 0 ≤ a i) ∧ Summable a ∧ + mu = ENNReal.ofReal gamma • Measure.dirac 0 + + Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)) ∧ + IsFiniteMeasure mu ∧ mu (Set.Icc 0 (∑' i, a i))ᶜ = 0 ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv f) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := by + obtain ⟨gamma, a, mu, hg, ha, hs, _, hmu, hfinite, hsupport, hmom⟩ := + hf.exists_logDeriv_moment_measure_factorization h0 + exact ⟨gamma, a, mu, hg, ha, hs, hmu, hfinite, hsupport, hmom⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMeasureUnique.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMeasureUnique.lean new file mode 100644 index 000000000..3ddf66bb8 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMeasureUnique.lean @@ -0,0 +1,60 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +import RealRooted.Mathlib.MeasureTheory.Measure.MomentDeterminacy + +/-! +# Uniqueness of logarithmic-derivative moment measures + +The signed logarithmic-derivative coefficients of a Type-I entire function +nonzero at zero have a unique positive representing measure. Uniqueness is +among all measures on the real line with genuine power moments; it does not +assume compact or nonnegative support for a competing measure. The explicit +measure constructed earlier has both properties. This proves the existence +and uniqueness part of Sokal (2022), Proposition 6. +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +/-- Signed logarithmic-derivative coefficients of a Type-I entire function +nonzero at zero have exactly one measure with integrable power moments. -/ +theorem IsLaguerrePolyaTypeI.existsUnique_logDeriv_moment_measure + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) : + ∃! mu : Measure ℝ, ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv f) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := by + obtain ⟨gamma, a, mu, _, _, _, _, hfinite, hsupport, hmom⟩ := + hf.exists_logDeriv_moment_measure h0 + have : IsFiniteMeasure mu := hfinite + refine ⟨mu, hmom, fun nu hnu => ?_⟩ + have hbound : ∀ᵐ x ∂mu, |x| ≤ ∑' i, a i := by + have hs : ∀ᵐ x ∂mu, x ∈ Set.Icc 0 (∑' i, a i) := ae_iff.mpr hsupport + filter_upwards [hs] with x hx + simpa only [abs_of_nonneg hx.1] using hx.2 + apply Eq.symm + apply Measure.ext_of_integral_pow_eq_of_ae_bounded hbound (fun k => (hnu k).1) + intro k + exact Complex.ofReal_injective ((hmom k).2.symm.trans (hnu k).2) + +/-- A nonzero complex scalar factor leaves the unique logarithmic-derivative +moment measure unchanged. This includes the complex scalar normalization in +Sokal's definition of the positive Type-I class. -/ +theorem IsLaguerrePolyaTypeI.existsUnique_logDeriv_const_mul_moment_measure + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) + {c : ℂ} (hc : c ≠ 0) : + ∃! mu : Measure ℝ, ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv (fun z => c * f z)) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := by + have heq : logDeriv (fun z => c * f z) = logDeriv f := + funext fun z => logDeriv_const_mul (f := f) z c hc + simpa only [heq] using hf.existsUnique_logDeriv_moment_measure h0 + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMoments.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMoments.lean new file mode 100644 index 000000000..846c18b8f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeMoments.lean @@ -0,0 +1,59 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.LinearAlgebra.Matrix.PosDef +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AppellMoments +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Analytic.TaylorSeries +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Hankel positivity of analytic logarithmic-derivative coefficients + +The signed Taylor coefficients of `f'/f` have positive semidefinite shifted +Hankel matrices when `f` is Type-I Laguerre--Pólya and nonzero at zero. This is +the matrix positivity assertion in the forward direction of Sokal's +logarithmic-derivative criterion, Proposition 6, +https://doi.org/10.1016/j.jmaa.2022.126432. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Every shifted Hankel matrix of the signed analytic logarithmic-derivative +Taylor coefficients of a Type-I function is positive semidefinite. -/ +theorem IsLaguerrePolyaTypeI.posSemidef_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) (n r : ℕ) : + Matrix.PosSemidef (fun i j : Fin n => + let k := i.val + j.val + r + (-1 : ℝ) ^ k * (iteratedDeriv k (logDeriv f) 0).re / k.factorial) := by + have hreal (k : ℕ) : Complex.ofReal (iteratedDeriv k f 0).re = iteratedDeriv k f 0 := + ofReal_re_iteratedDeriv_zero hf.toLaguerrePolya.conj k + have h0re : (f 0).re ≠ 0 := by + intro hz + have h := hreal 0 + simp only [iteratedDeriv_zero, hz, ofReal_zero] at h + exact h0 h.symm + have hm := hf.posSemidef_signed_coeff_logOf h0re n r + convert hm using 1 + apply Iff.of_eq + apply congrArg Matrix.PosSemidef + funext i j + dsimp only + let k := i.val + j.val + r + have heq := AnalyticAt.re_iteratedDeriv_logDeriv_eq_coeff_logOf + (hf.toLaguerrePolya.differentiable.analyticAt 0) h0 hreal k + change (-1 : ℝ) ^ k * (iteratedDeriv k (logDeriv f) 0).re / k.factorial = + (-1 : ℝ) ^ (k + 1 + 1) * ((k + 1 : ℕ) : ℝ) * PowerSeries.coeff (k + 1) + (PowerSeries.logOf (PowerSeries.mk + (fun j => (iteratedDeriv j f 0).re / (j.factorial * (f 0).re)))) + rw [Nat.cast_add, Nat.cast_one, mul_div_assoc, heq, + show k + 1 + 1 = k + 2 by lia, pow_add] + ring + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativePureHeatTrace.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativePureHeatTrace.lean new file mode 100644 index 000000000..89c49cc53 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativePureHeatTrace.lean @@ -0,0 +1,51 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIPureProduct +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHeatTrace + +/-! +# Pure heat-trace representations below order one + +Growth below order one removes the Type-I exponential constant, so every +signed logarithmic derivative is a heat-trace Laplace moment, including at +zero. This recovers the pure heat representation in Zhang's Lemma 2 from +the Type-I structural hypothesis and the growth estimate. +-/ + +public section + +open MeasureTheory + +namespace RealRooted + +/-- The logarithmic derivative of a Type-I function of order below one +has a pure heat-trace representation, with no residual exponential term. -/ +theorem IsLaguerrePolyaTypeI.exists_pure_heatTrace_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) : + ∃ a : ℕ → ℝ, (∀ i, 0 ≤ a i) ∧ Summable a ∧ + f = (fun z : ℂ ↦ f 0 * ∏' i, (1 + (a i : ℂ) * z)) ∧ + TauCeti.IsCompletelyMonotoneOnIoi (Real.positiveSlopeHeatTrace a) ∧ + ∀ (k : ℕ) (x : ℝ), 0 ≤ x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Real.positiveSlopeHeatTrace a t) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ (logDeriv f (y : ℂ)).re) x = + ∫ t : ℝ in Set.Ioi 0, + Real.exp (-x * t) * t ^ k * Real.positiveSlopeHeatTrace a t := by + obtain ⟨a, ha, hs, heq⟩ := hf.exists_eq_prod_of_order_lt_one h0 horder hrho + refine ⟨a, ha, hs, heq, Real.isCompletelyMonotoneOnIoi_positiveSlopeHeatTrace hs, + fun k x hx ↦ ⟨(Real.laplace_positiveSlopeHeatTrace ha hs k hx).1, ?_⟩⟩ + have h := signed_iteratedDeriv_re_logDeriv_exp_linear_product h0 0 ha hs k hx + simp only [Complex.ofReal_zero, zero_mul, Complex.exp_zero, mul_one, zero_add] at h + simpa only [← heq] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeStrict.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeStrict.lean new file mode 100644 index 000000000..f5e8243ad --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogDerivativeStrict.lean @@ -0,0 +1,110 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteZerosOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +import RealRooted.Mathlib.MeasureTheory.Integral.Hankel +import TauCeti.Analysis.Normed.Ring.InfiniteProd + +/-! +# Strict positivity of logarithmic-derivative moment matrices + +A nonpolynomial Type-I entire function of order below one has infinitely many +distinct negative zeros. Its logarithmic-derivative measure consequently has +infinitely many distinct positive atoms. This makes every shifted Hankel +moment matrix positive definite and every such determinant strictly positive. + +This is a consequence of the moment representation associated with Sokal's +Proposition 6. Simplicity of the entire function's zeros is not +required. The function is assumed nonzero at zero to define its Taylor data. +-/ + +public section + +open Complex Polynomial MeasureTheory + +namespace RealRooted + +private theorem infinite_positive_slopes_of_infinite_zeros + {f : ℂ → ℂ} (h0 : f 0 ≠ 0) {gamma : ℝ} {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) + (heq : f = fun z => f 0 * Complex.exp (gamma * z) * ∏' i, (1 + (a i : ℂ) * z)) + (hinf : Set.Infinite {x : ℝ | f x = 0}) : + Set.Infinite {x : ℝ | 0 < x ∧ x ∈ Set.range a} := by + by_contra hfin + apply hinf + apply ((Set.not_infinite.mp hfin).image (fun x : ℝ => -x⁻¹)).subset + intro x hx + have hz : (∏' i, (1 + (a i : ℂ) * (x : ℂ))) = 0 := by + have hh := congrFun heq x + rw [hx] at hh + exact (mul_eq_zero.mp hh.symm).resolve_left (mul_ne_zero h0 (Complex.exp_ne_zero _)) + have hsum : Summable (fun i => ‖(a i : ℂ) * (x : ℂ)‖) := by + simpa only [norm_mul, norm_real] using hs.norm.mul_right ‖(x : ℂ)‖ + obtain ⟨i, hi⟩ := (TauCeti.tprod_one_add_eq_zero_iff hsum).mp hz + have hreal : 1 + a i * x = 0 := by + exact_mod_cast hi + have hai : a i ≠ 0 := by intro h; rw [h, zero_mul, add_zero] at hreal; norm_num at hreal + refine ⟨a i, ⟨lt_of_le_of_ne (ha i) (Ne.symm hai), Set.mem_range_self i⟩, ?_⟩ + change -(a i)⁻¹ = x + field_simp + nlinarith + +private theorem infinite_positive_atoms_of_slopes {gamma : ℝ} {a : ℕ → ℝ} + (hinf : Set.Infinite {x : ℝ | 0 < x ∧ x ∈ Set.range a}) : + Set.Infinite {x : ℝ | 0 < x ∧ 0 < + (ENNReal.ofReal gamma • Measure.dirac 0 + + Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)) : Measure ℝ) {x}} := by + apply hinf.mono + rintro x ⟨hx, i, rfl⟩ + refine ⟨hx, ?_⟩ + have hle := Measure.le_sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)) i + have hle' := Measure.le_iff.mp hle {a i} (measurableSet_singleton _) + have hpos : 0 < (ENNReal.ofReal (a i) • Measure.dirac (a i)) {a i} := by + simpa using (ENNReal.ofReal_pos.mpr hx) + exact (hpos.trans_le hle').trans_le (by simp only [add_apply]; exact le_add_left le_rfl) + +/-- Logarithmic-derivative moment matrices of nonpolynomial Type-I functions +of order below one are positive definite in every size and natural shift. -/ +theorem IsLaguerrePolyaTypeI.posDef_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hnp : ∀ p : ℂ[X], f ≠ fun z => p.eval z) (n r : ℕ) : + Matrix.PosDef (fun i j : Fin n => + let k := i.val + j.val + r + (-1 : ℝ) ^ k * (iteratedDeriv k (logDeriv f) 0).re / k.factorial) := by + obtain ⟨gamma, a, mu, _, ha, hs, heq, hmu, _, hsupport, hmom⟩ := + hf.exists_logDeriv_moment_measure_factorization h0 + have hi := infinite_positive_slopes_of_infinite_zeros h0 ha hs heq + (hf.toLaguerrePolya.infinite_real_zeros_of_order_lt_one h0 horder hrho hnp) + have hatoms : Set.Infinite {x : ℝ | 0 < x ∧ 0 < mu {x}} := by + rw [hmu] + exact infinite_positive_atoms_of_slopes hi + have hnonneg : ∀ᵐ x ∂mu, 0 ≤ x := + (ae_iff.mpr hsupport).mono fun x hx => hx.1 + have hPD := MeasureTheory.posDef_integral_pow_hankel_of_infinite_atoms + (fun k => (hmom k).1) hnonneg hatoms n r + convert hPD using 1 + apply Iff.of_eq + apply congrArg Matrix.PosDef + funext i j + have hsign : (-1 : ℂ) ^ (i.val + j.val + r) = + Complex.ofReal ((-1 : ℝ) ^ (i.val + j.val + r)) := by norm_cast + have hre : ((-1 : ℂ) ^ (i.val + j.val + r)).re = + (-1 : ℝ) ^ (i.val + j.val + r) := by rw [hsign]; rfl + have him : ((-1 : ℂ) ^ (i.val + j.val + r)).im = 0 := by rw [hsign]; rfl + simpa [Complex.mul_re, hre, him] using congrArg Complex.re (hmom (i.val + j.val + r)).2 + +/-- Every shifted logarithmic-derivative Hankel determinant is strictly +positive for a nonpolynomial Type-I function of order below one. -/ +theorem IsLaguerrePolyaTypeI.det_logDeriv_hankel_pos + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hnp : ∀ p : ℂ[X], f ≠ fun z => p.eval z) (n r : ℕ) : + 0 < Matrix.det (fun i j : Fin n => + let k := i.val + j.val + r + (-1 : ℝ) ^ k * (iteratedDeriv k (logDeriv f) 0).re / k.factorial) := + (hf.posDef_logDeriv h0 horder hrho hnp n r).det_pos + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentGapCriterion.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentGapCriterion.lean new file mode 100644 index 000000000..a0a22eba3 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentGapCriterion.lean @@ -0,0 +1,53 @@ +/- +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 RealRooted.PFPolynomial +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentGapPolynomial +import RealRooted.PFPolynomial.LogMomentGap +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Const +public import Mathlib.Analysis.InnerProductSpace.Basic + +/-! +# Positive logarithmic moment support gaps characterize PF polynomials + +This is a derived finite-factor specialization of the normalized Type-I +moment criterion in Sokal (2022), Proposition 6, printed page 5. It is not +an assertion of novelty or an additional theorem attributed to that paper. +-/ + +public section + +open Complex MeasureTheory Polynomial + +namespace RealRooted + +/-- An entire function nonzero at zero has an actual logarithmic moment +measure with a positive lower support gap exactly when its normalization is +a real PF polynomial. Constants and arbitrary nonzero complex scalar factors +are included. The competing measure requires all moments to be integrable. -/ +theorem exists_isPFPolynomial_iff_logDeriv_moments_gap + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) : + (∃ p : ℝ[X], IsPFPolynomial p ∧ p.coeff 0 = 1 ∧ + ∀ z : ℂ, f z / f 0 = (p.map ofRealHom).eval z) ↔ + ∃ (mu : Measure ℝ) (c : ℝ), 0 < c ∧ (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv f) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := by + constructor + · rintro ⟨p, hp, hp0, heq⟩ + obtain ⟨mu, c, hc, hgap, hmom⟩ := hp.exists_logDeriv_moments_gap hp0 + have hlog : logDeriv (fun z : ℂ => (p.map ofRealHom).eval z) = logDeriv f := by + rw [← funext heq] + exact funext fun z => logDeriv_div_const z (f 0) h0 + exact ⟨mu, c, hc, hgap, by simpa only [hlog] using hmom⟩ + · rintro ⟨mu, c, hc, hgap, hmom⟩ + exact exists_isPFPolynomial_of_logDeriv_moments_gap hf h0 hc hgap hmom + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentGapPolynomial.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentGapPolynomial.lean new file mode 100644 index 000000000..fb9aad62f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentGapPolynomial.lean @@ -0,0 +1,67 @@ +/- +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 RealRooted.PFPolynomial +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIMomentCriterion +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasureUnique +import RealRooted.PFPolynomial.FiniteProduct +import RealRooted.Mathlib.MeasureTheory.Measure.AtomicGap +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Const +public import Mathlib.Analysis.InnerProductSpace.Basic + +/-! +# Positive logarithmic moment gaps force PF polynomials + +Compact moment uniqueness identifies any given measure with the canonical +slope measure. A positive lower support gap eliminates the exponential term +and leaves only finitely many nonzero slopes. No growth assumption is used. +-/ + +public section + +open Complex MeasureTheory Polynomial + +namespace RealRooted + +/-- An actual logarithmic moment measure supported above a positive number +forces the normalized entire function to be a real PF polynomial. The measure +is not assumed compact, finite, atomic, or to be the canonical measure. -/ +theorem exists_isPFPolynomial_of_logDeriv_moments_gap + {f : ℂ → ℂ} {mu : Measure ℝ} {c : ℝ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) (hc : 0 < c) + (hgap : ∀ᵐ x ∂mu, c ≤ x) + (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv f) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ)) : + ∃ p : ℝ[X], IsPFPolynomial p ∧ p.coeff 0 = 1 ∧ + ∀ z : ℂ, f z / f 0 = (p.map ofRealHom).eval z := by + have hpos : ∀ᵐ x ∂mu, 0 ≤ x := hgap.mono fun _ hx => hc.le.trans hx + have hF := isLaguerrePolyaTypeI_div_of_logDeriv_moments hf h0 hpos + (fun k => (hmom k).1) (fun k => (hmom k).2) + have hF0 : (fun z => f z / f 0) 0 ≠ 0 := div_ne_zero h0 h0 + have hlog : logDeriv (fun z => f z / f 0) = logDeriv f := + funext fun z => logDeriv_div_const z (f 0) h0 + have hFm : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv (fun z => f z / f 0)) 0 / + k.factorial = ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := by + simpa only [hlog] using hmom + obtain ⟨gamma, a, nu, hg, ha, hs, hprod, hnu, -, -, hnum⟩ := + hF.exists_logDeriv_moment_measure_factorization hF0 + have hmunu : mu = nu := (hF.existsUnique_logDeriv_moment_measure hF0).unique hFm hnum + rw [hmunu, hnu] at hgap + obtain ⟨hg0, hfin, -⟩ := eq_zero_and_finite_support_of_ae_le_atomic ha hs hg hc hgap + obtain ⟨p, hp, hp0, hpeval⟩ := exists_isPFPolynomial_eval_eq_tprod ha hfin + refine ⟨p, hp, hp0, fun z => ?_⟩ + have hz := congrFun hprod z + simpa only [div_self h0, hg0, ofReal_zero, zero_mul, exp_zero, + one_mul, ← hpeval z] using hz + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentMassNearZero.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentMassNearZero.lean new file mode 100644 index 000000000..37763acaf --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/LogMomentMassNearZero.lean @@ -0,0 +1,45 @@ +/- +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.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentGapPolynomial + + +/-! +# Nonpolynomial entire functions exclude positive logarithmic moment gaps +-/ + +public section + +open Complex MeasureTheory Polynomial Set + +namespace RealRooted + +/-- Every actual logarithmic moment measure of a nonpolynomial entire function +nonzero at zero has positive mass below every positive threshold. No growth +or compact-support assumption is needed. -/ +theorem measure_Iio_pos_of_logDeriv_moments_nonpolynomial + {f : ℂ → ℂ} {mu : Measure ℝ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hpoly : ∀ p : ℂ[X], f ≠ fun z => p.eval z) + (hmom : ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv f) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ)) + {c : ℝ} (hc : 0 < c) : 0 < mu (Iio c) := by + apply pos_iff_ne_zero.mpr + intro hzero + have hgap : ∀ᵐ x ∂mu, c ≤ x := ae_iff.mpr (by + simpa only [not_le, Set.Iio_def] using hzero) + obtain ⟨p, -, -, heq⟩ := + exists_isPFPolynomial_of_logDeriv_moments_gap hf h0 hc hgap hmom + apply hpoly (C (f 0) * p.map ofRealHom) + funext z + simpa only [eval_mul, eval_C, mul_comm] using (div_eq_iff h0).mp (heq z) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MGFPolynomialOperator.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MGFPolynomialOperator.lean new file mode 100644 index 000000000..a878c3a6f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MGFPolynomialOperator.lean @@ -0,0 +1,54 @@ +/- +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 RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +public import Mathlib.Probability.Moments.ComplexMGF +import RealRooted.Mathlib.MeasureTheory.Integral.PolynomialTranslation +import RealRooted.Mathlib.Probability.Moments.MGFTaylor +import Mathlib.Tactic.TypeStar + +/-! +# Polynomial translation averages as moment-generating differential operators + +The complex moment-generating function is only required to be analytic near +zero. No Laguerre-Polya or PF assumption occurs in this identity. Applying it +to a nonpositive translation variable gives polynomial convolution directly. +-/ + +public section + +open Complex MeasureTheory Polynomial ProbabilityTheory Set + +namespace RealRooted + +variable {Ω : Type*} [MeasurableSpace Ω] {mu : Measure Ω} {Y : Ω → ℝ} + +/-- The Taylor differential operator of a complex moment-generating function +is exactly averaging translations of the polynomial input. The interior-domain +hypothesis supplies all genuine moments and justifies the finite integration. -/ +theorem taylorDifferentialOperator_complexMGF_eval + (h0 : 0 ∈ interior (integrableExpSet Y mu)) (p : ℝ[X]) (x : ℝ) : + (taylorDifferentialOperator (complexMGF Y mu) p).eval x = + ∫ w, p.eval (x + Y w) ∂mu := by + have hmom := integrable_pow_of_mem_interior_integrableExpSet h0 + rw [integral_polynomial_eval_add_eq_sum_derivative hmom, + taylorDifferentialOperator, eval_finsetSum] + apply Finset.sum_congr rfl + intro k _ + simp only [eval_mul, eval_C, iteratedDeriv_complexMGF_zero h0, ← ofReal_natCast, + ← ofReal_div, ofReal_re] + +/-- A negative real translation variable gives the one-sided convolution form. +Nonnegativity is not needed for this algebraic identity, only for later root location. -/ +theorem taylorDifferentialOperator_complexMGF_neg_eval + {T : Ω → ℝ} (h0 : 0 ∈ interior (integrableExpSet (fun w => -T w) mu)) + (p : ℝ[X]) (x : ℝ) : + (taylorDifferentialOperator (complexMGF (fun w => -T w) mu) p).eval x = + ∫ w, p.eval (x - T w) ∂mu := by + simpa only [sub_eq_add_neg] using taylorDifferentialOperator_complexMGF_eval h0 p x + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MomentResidues.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MomentResidues.lean new file mode 100644 index 000000000..27602df80 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MomentResidues.lean @@ -0,0 +1,140 @@ +module + +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.Mathlib.MeasureTheory.Measure.MomentNevanlinnaRepresentation +public import Mathlib.Analysis.Analytic.Order +import RealRooted.Mathlib.MeasureTheory.Measure.AtomicRange +import RealRooted.LaguerreInequalities.AtomMultiplicity +import RealRooted.LaguerreInequalities.MeasureSupport +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.NormalizedConjugation + +/-! +# Integer residues of logarithmic-derivative moment transforms + +The explicit finite Nevanlinna measure identifies every positive slope atom +with the zero multiplicity at its negative reciprocal. For a real entire +function, the original moment measure is carried by these reciprocal zeros +and the origin. These steps use neither a growth bound nor a product formula. +-/ + +public section + +open Complex MeasureTheory Set +open scoped ComplexConjugate NNReal ENNReal + +namespace RealRooted + +/-- An explicit moment transform supplies finite Nevanlinna data with no linear +term. This is the representation consumed by the existing residue theorem. -/ +private theorem neg_logDeriv_eq_momentNevanlinna + {f : ℂ → ℂ} (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) : + ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + -logDeriv f z = (0 : ℂ) * z + + (∫ r : ℝ, TauCeti.nevanlinnaKernel z r ∂mu.momentNevanlinna) + + ((-(∫ x : ℝ≥0, (1 + (x : ℝ) ^ 2)⁻¹ ∂mu : ℝ)) : ℂ) := by + intro z hz + rw [hlog z hz, mu.neg_integral_inv_one_add_mul_eq_nevanlinna hz] + simp only [zero_mul, zero_add, sub_eq_add_neg] + +/-- Every positive atom of a logarithmic-derivative moment measure is its slope +times the actual natural zero multiplicity at the negative reciprocal root. -/ +theorem measureReal_singleton_eq_mul_order_of_logDeriv_integral + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) + {a : ℝ≥0} (ha : a ≠ 0) : + mu.real {a} = (a : ℝ) * + (analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) : ℝ) := by + have : IsFiniteMeasure mu.momentNevanlinna := mu.isFiniteMeasure_momentNevanlinna + have hne : f ≠ 0 := fun h ↦ hf0 (congrFun h 0) + have heq := measureReal_singleton_eq_analyticOrderNatAt_div hf hne + (ρ := mu.momentNevanlinna) (b := 0) + (c := -(∫ x : ℝ≥0, (1 + (x : ℝ) ^ 2)⁻¹ ∂mu : ℝ)) + (by simpa only [Complex.ofReal_zero, Complex.ofReal_neg] using + neg_logDeriv_eq_momentNevanlinna mu hlog) (-(a : ℝ)⁻¹) + rw [mu.momentNevanlinna_real_singleton] at heq + have haR : (a : ℝ) ≠ 0 := NNReal.coe_ne_zero.mpr ha + have haP : 0 < (a : ℝ) := NNReal.coe_pos.mpr (pos_iff_ne_zero.mpr ha) + apply mul_left_cancel₀ (by positivity : (a : ℝ) / (1 + (a : ℝ) ^ 2) ≠ 0) + calc + _ = (analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) : ℝ) / + (1 + (-(a : ℝ)⁻¹) ^ 2) := heq + _ = _ := by + field_simp [haR, show 1 + (a : ℝ) ^ 2 ≠ 0 by positivity] + ring + +/-- The reciprocal slopes, counted with the entire function's actual zero +multiplicities, are summable. This follows from the finite original measure, +without a genus or growth assumption. -/ +theorem summable_mul_order_of_logDeriv_integral + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) : + Summable (fun a : {x : ℝ≥0 // x ≠ 0} ↦ (a : ℝ) * + (analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) := by + have hs : Summable (fun a : {x : ℝ≥0 // x ≠ 0} ↦ mu.real {(a : ℝ≥0)}) := + mu.summable_measureReal_singleton_comp Subtype.coe_injective + exact hs.congr fun a ↦ + measureReal_singleton_eq_mul_order_of_logDeriv_integral hf hf0 mu hlog a.property + +/-- A real entire logarithmic-derivative moment measure has no non-atomic part +away from zero: almost every positive slope is the negative reciprocal of a zero. -/ +theorem ae_zero_or_reciprocal_zero_of_logDeriv_integral + {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) : + ∀ᵐ x : ℝ≥0 ∂mu, x = 0 ∨ f ((-(x : ℝ)⁻¹ : ℝ) : ℂ) = 0 := by + have : IsFiniteMeasure mu.momentNevanlinna := mu.isFiniteMeasure_momentNevanlinna + have hs := support_nevanlinna_neg_logDeriv_subset_zeros hf hc + (ρ := mu.momentNevanlinna) (b := 0) + (c := -(∫ x : ℝ≥0, (1 + (x : ℝ) ^ 2)⁻¹ ∂mu : ℝ)) + (by simpa only [Complex.ofReal_zero, Complex.ofReal_neg] using + neg_logDeriv_eq_momentNevanlinna mu hlog) + have hρ : ∀ᵐ r : ℝ ∂mu.momentNevanlinna, f (r : ℂ) = 0 := + Filter.mem_of_superset mu.momentNevanlinna.support_mem_ae hs + change ∀ᵐ r : ℝ ∂((mu.withDensity fun x ↦ (Measure.momentNevanlinnaWeight x : ℝ≥0∞)).map + (fun x : ℝ≥0 ↦ -(x : ℝ)⁻¹)), f (r : ℂ) = 0 at hρ + have hw := ae_of_ae_map (f := fun x : ℝ≥0 ↦ -(x : ℝ)⁻¹) (by fun_prop) hρ + have hμ := (ae_withDensity_iff + (f := fun x : ℝ≥0 ↦ (Measure.momentNevanlinnaWeight x : ℝ≥0∞)) (by fun_prop)).mp hw + filter_upwards [hμ] with x hx + by_cases hx0 : x = 0 + · exact Or.inl hx0 + · apply Or.inr + apply hx + apply ne_of_gt + apply ENNReal.coe_pos.mpr + change 0 < x / (1 + x ^ 2) + exact div_pos (pos_iff_ne_zero.mpr hx0) (by positivity) + +/-- A normalized entire function with a nonnegative moment transform for its +logarithmic derivative respects conjugation. The input nonvanishing and transform +identity are supplied by the local-moment continuation theorem. -/ +theorem conj_of_logDeriv_integral + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 = 1) + (mu : Measure ℝ≥0) + (hne : ∀ z ∈ slitPlane, f z ≠ 0) + (hlog : EqOn (logDeriv f) + (fun z ↦ ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) slitPlane) : + ∀ z, f (conj z) = conj (f z) := by + apply hf.conj_of_eqOn_logDeriv_conj hf0 hne + intro z hz + have hzc : conj z ∈ slitPlane := by + simpa only [mem_slitPlane_iff, conj_re, conj_im, neg_ne_zero] using hz + simp only [Function.comp_apply] + rw [hlog hzc, hlog hz, ← integral_conj] + apply integral_congr_ae + apply Filter.Eventually.of_forall + intro x + simp only [map_inv₀, map_add, map_one, map_mul, conj_conj, conj_ofReal] + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MomentTypeI.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MomentTypeI.lean new file mode 100644 index 000000000..658c7d6f4 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/MomentTypeI.lean @@ -0,0 +1,184 @@ +module + +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Analytic.Order +import Mathlib.Analysis.Complex.Exponential +import Mathlib.Topology.Algebra.InfiniteSum.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentResidues +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AtomicMomentSum +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeILinearProduct +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicity +import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicityProduct +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Identity +import Mathlib.Analysis.Complex.Convex +import Mathlib.Analysis.SpecialFunctions.ExpDeriv + +/-! +# Type-I reconstruction from a logarithmic-derivative moment transform + +The finite positive measure is supported at zero and at reciprocal zeros of the +entire function. Its positive atoms are their slopes times natural zero +multiplicities. Repeating each slope accordingly produces a summable genus-zero +product. Equality of logarithmic derivatives recovers the normalized function. +No growth hypothesis is used. +-/ + +public section + +open Complex MeasureTheory Set +open scoped ComplexConjugate NNReal + +namespace RealRooted + +private abbrev ReciprocalZeroIndex (f : ℂ → ℂ) := + Σ a : {x : ℝ≥0 // x ≠ 0}, Fin (analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ)) + +private def reciprocalZeroSlope (f : ℂ → ℂ) (j : ReciprocalZeroIndex f) : ℝ := + (j.1 : ℝ) + +/-- Repeating the actual positive reciprocal slopes by their natural zero +multiplicities gives a summable family. -/ +private theorem summable_reciprocalZeroSlope + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) : + Summable (reciprocalZeroSlope f) := by + apply summable_sigma_fin_of_nonneg + (fun a : {x : ℝ≥0 // x ≠ 0} ↦ analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ)) + (fun a ↦ (a : ℝ≥0).coe_nonneg) + simpa only [mul_comm] using summable_mul_order_of_logDeriv_integral hf hf0 mu hlog + +/-- Removing the zero atom from the atomic moment sum gives precisely the +logarithmic derivative of the product with the actual zero multiplicities. -/ +private theorem logDeriv_eq_atom_add_reciprocal_product + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) + {z : ℂ} (hz : z ∈ UpperHalfPlane.upperHalfPlaneSet) : + logDeriv f z = (mu.real {0} : ℂ) + + logDeriv (fun w ↦ ∏' j : ReciprocalZeroIndex f, + (1 + (reciprocalZeroSlope f j : ℂ) * w)) z := by + classical + have hs := hasSum_logDeriv_singleton_masses hf hf0 hc mu hlog hz + have hpos : HasSum (fun a : {x : ℝ≥0 // x ≠ 0} ↦ + (mu.real {(a : ℝ≥0)} : ℂ) / (1 + z * ((a : ℝ) : ℂ))) + (logDeriv f z - (mu.real {0} : ℂ)) := by + have hs' := (Finset.hasSum_iff_compl ({0} : Finset ℝ≥0)).mp hs + have hp : (fun x : ℝ≥0 ↦ x ∉ ({0} : Finset ℝ≥0)) = (fun x ↦ x ≠ 0) := by + funext x + simp only [Finset.mem_singleton] + rw [hp] at hs' + simpa only [Finset.sum_singleton, NNReal.coe_zero, ofReal_zero, mul_zero, + add_zero, div_one] using hs' + have hgroup := HasSum.sigma_fin_const_div + (a := fun a : {x : ℝ≥0 // x ≠ 0} ↦ (a : ℝ)) + (m := fun a ↦ analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ)) + (hasSum_logDeriv_tprod_one_add_ofReal_mul + (summable_reciprocalZeroSlope hf hf0 mu hlog) hz) + have hpos' : HasSum (fun a : {x : ℝ≥0 // x ≠ 0} ↦ + (analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) : ℂ) * (a : ℝ) / + (1 + ((a : ℝ) : ℂ) * z)) + (logDeriv f z - (mu.real {0} : ℂ)) := by + apply hpos.congr_fun + intro a + rw [measureReal_singleton_eq_mul_order_of_logDeriv_integral hf hf0 mu hlog a.property] + push_cast + ring + have heq := hgroup.unique hpos' + linear_combination -heq + +/-- Recover the entire function from the convergent reciprocal-root product. +The same identity supplies Type-I membership and the explicit product formula. -/ +private theorem eq_mul_exp_mul_reciprocal_product + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hne : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, f z ≠ 0) + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) (z : ℂ) : + f z = f 0 * exp ((mu.real {0} : ℂ) * z) * + ∏' j : ReciprocalZeroIndex f, (1 + (reciprocalZeroSlope f j : ℂ) * z) := by + have hs := summable_reciprocalZeroSlope hf hf0 mu hlog + let P : ℂ → ℂ := fun w ↦ ∏' j : ReciprocalZeroIndex f, + (1 + (reciprocalZeroSlope f j : ℂ) * w) + let E : ℂ → ℂ := fun w ↦ exp ((mu.real {0} : ℂ) * w) + let G : ℂ → ℂ := E * P + have hG : IsLaguerrePolyaTypeI G := + isLaguerrePolyaTypeI_exp_mul_tprod + (fun j : ReciprocalZeroIndex f ↦ (j.1 : ℝ≥0).coe_nonneg) hs measureReal_nonneg + have hP : Differentiable ℂ P := differentiable_tprod_one_add_ofReal_mul hs + have hPn : ∀ w ∈ UpperHalfPlane.upperHalfPlaneSet, P w ≠ 0 := + fun _ hw ↦ tprod_one_add_ofReal_mul_ne_zero_of_im_pos hs hw + have hElog (w : ℂ) : logDeriv E w = (mu.real {0} : ℂ) := by + rw [logDeriv_apply, show deriv E w = _ from + (hasDerivAt_const_mul (mu.real {0} : ℂ)).cexp.deriv] + exact mul_div_cancel_left₀ _ (exp_ne_zero _) + have hGlog : EqOn (logDeriv f) (logDeriv G) UpperHalfPlane.upperHalfPlaneSet := by + intro w hw + rw [show logDeriv G w = logDeriv E w + logDeriv P w from + logDeriv_mul w (exp_ne_zero _) (hPn w hw) (by dsimp [E]; fun_prop) (hP w), hElog] + exact logDeriv_eq_atom_add_reciprocal_product hf hf0 hc mu hlog hw + have hG0 : G 0 = 1 := by simp [G, E, P, Pi.mul_apply] + have heq := hf.eq_mul_of_logDeriv_eqOn (g := G) hG.toLaguerrePolya.differentiable + UpperHalfPlane.isOpen_upperHalfPlaneSet (convex_halfSpace_im_gt 0).isPreconnected + ⟨I, by simp⟩ hne (fun w hw ↦ mul_ne_zero (exp_ne_zero _) (hPn w hw)) hGlog hG0 + simpa only [G, E, P, Pi.mul_apply, mul_assoc] using heq z + +/-- The reciprocal-root factors, grouped by their actual natural multiplicities, +converge to the normalized entire function after removing its exponential factor. +This is a genuine product limit, including at zeros of the function. -/ +theorem hasProd_pow_order_of_logDeriv_integral + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hne : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, f z ≠ 0) + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) (z : ℂ) : + HasProd (fun a : {x : ℝ≥0 // x ≠ 0} ↦ + (1 + ((a : ℝ) : ℂ) * z) ^ analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ)) + (f z / (f 0 * exp ((mu.real {0} : ℂ) * z))) := by + have hs := summable_reciprocalZeroSlope hf hf0 mu hlog + have hp := HasProd.sigma_fin_const + (a := fun a : {x : ℝ≥0 // x ≠ 0} ↦ (1 + ((a : ℝ) : ℂ) * z)) + (m := fun a ↦ analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ)) + ((hasProdLocallyUniformlyOn_one_add_ofReal_mul hs).hasProd (mem_univ z)) + rw [eq_mul_exp_mul_reciprocal_product hf hf0 hc mu hne hlog z, + mul_div_cancel_left₀ _ (mul_ne_zero hf0 (exp_ne_zero _))] + exact hp + +/-- A normalized entire function with a finite nonnegative moment transform +for its actual logarithmic derivative is positive Type-I. The global transform +and its nonvanishing domain are supplied by local-moment continuation. -/ +theorem isLaguerrePolyaTypeI_of_logDeriv_integral + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 = 1) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hne : ∀ z ∈ slitPlane, f z ≠ 0) + (hlog : EqOn (logDeriv f) + (fun z ↦ ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) slitPlane) : + IsLaguerrePolyaTypeI f := by + have hf0n : f 0 ≠ 0 := by simp only [hf0, ne_eq, one_ne_zero, not_false_eq_true] + have hH : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, z ∈ slitPlane := + fun z hz ↦ mem_slitPlane_iff.mpr (Or.inr (ne_of_gt hz)) + have hlogH := fun z hz ↦ hlog (hH z hz) + have hc := conj_of_logDeriv_integral hf hf0 mu hne hlog + have hs := summable_reciprocalZeroSlope hf hf0n mu hlogH + have heq := eq_mul_exp_mul_reciprocal_product hf hf0n hc mu + (fun z hz ↦ hne z (hH z hz)) hlogH + have hfg : f = fun z ↦ exp ((mu.real {0} : ℂ) * z) * + ∏' j : ReciprocalZeroIndex f, (1 + (reciprocalZeroSlope f j : ℂ) * z) := by + funext z + simpa only [hf0, one_mul] using heq z + rw [hfg] + exact isLaguerrePolyaTypeI_exp_mul_tprod + (fun j : ReciprocalZeroIndex f ↦ (j.1 : ℝ≥0).coe_nonneg) hs measureReal_nonneg + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/NativeHeatTrace.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/NativeHeatTrace.lean new file mode 100644 index 000000000..0291e23f4 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/NativeHeatTrace.lean @@ -0,0 +1,52 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIPureProduct +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHeatTrace + +/-! +# Intrinsic zero heat traces of Type-I functions below order one + +These statements use the actual native divisor, with all zero multiplicities. +The growth hypothesis removes the exponential correction. The Laplace +moments recover every signed logarithmic derivative as in Zhang's Lemma 2, +including at zero, without choosing an enumeration in the statement. +-/ + +public section + +open Complex Filter MeasureTheory Topology + +namespace RealRooted + +/-- The native zero heat trace is completely monotone and its Laplace +moments are all signed logarithmic derivatives, including at zero. -/ +theorem IsLaguerrePolyaTypeI.native_heatTrace_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) : + TauCeti.IsCompletelyMonotoneOnIoi (Complex.zeroHeatTrace f) ∧ + ∀ (k : ℕ) (x : ℝ), 0 ≤ x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace f t) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ (logDeriv f (y : ℂ)).re) x = + ∫ t : ℝ in Set.Ioi 0, Real.exp (-x * t) * t ^ k * Complex.zeroHeatTrace f t := by + obtain ⟨a, ha, hs, heq⟩ := hf.exists_eq_prod_of_order_lt_one h0 horder hrho + have hcm := Complex.isCompletelyMonotoneOnIoi_zeroHeatTrace_linearProduct h0 ha hs + refine ⟨by simpa only [← heq] using hcm, fun k x hx ↦ ?_⟩ + have hnative := Complex.laplace_zeroHeatTrace_linearProduct h0 ha hs k hx + rw [← heq] at hnative + refine ⟨hnative.1, ?_⟩ + have hreal := signed_iteratedDeriv_re_logDeriv_exp_linear_product h0 0 ha hs k hx + simp only [Complex.ofReal_zero, zero_mul, Complex.exp_zero, mul_one, zero_add] at hreal + rw [← heq] at hreal + exact hreal.trans ((Real.laplace_positiveSlopeHeatTrace ha hs k hx).2.trans hnative.2.symm) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/NativeWeightedHeatHierarchy.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/NativeWeightedHeatHierarchy.lean new file mode 100644 index 000000000..b50eb43e4 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/NativeWeightedHeatHierarchy.lean @@ -0,0 +1,78 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +public import TauCeti.Analysis.Complex.GrowthOrder +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIPureProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeHeatTrace +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeCompletelyMonotone +import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventRodrigues +import RealRooted.Mathlib.Analysis.Complex.ZeroWeightedHeatTrace + +/-! +# Native heat and Laguerre integrals for the Type-I differential hierarchy + +For a Type-I entire function nonzero at the origin and of order below one, +Zhang's weighted logarithmic derivatives have both their positive weighted +heat representation and their Laguerre representation. The heat trace is +Mathlib's native divisor sum and retains every zero multiplicity. + +The order hypothesis removes the exponential factor. The derivative quotient +requires `x > 0`; the underlying integral identities extend to `x = 0`. +-/ + +public section + +open Complex MeasureTheory Set + +namespace RealRooted + +/-- The full weighted logarithmic-derivative hierarchy has both Zhang +integral representations with the actual native zero heat trace. -/ +theorem IsLaguerrePolyaTypeI.native_weighted_heatTrace_logDeriv + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (k m : ℕ) {x : ℝ} (hx : 0 < x) : + (IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace f) t) (Ioi 0) ∧ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x = + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace f) t) ∧ + (IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * Complex.zeroHeatTrace f t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) (Ioi 0) ∧ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x = + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * Complex.zeroHeatTrace f t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) := by + obtain ⟨a, ha, hs, heq⟩ := hf.exists_eq_prod_of_order_lt_one h0 horder hrho + have hnative := hf.native_heatTrace_logDeriv h0 horder hrho + let g : ℝ → ℝ := fun y ↦ + (-1 : ℝ) ^ m * iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y + have hbase : EqOn g (Real.weightedResolventSum a 0 0 m) (Ioi 0) := by + intro y hy + have hp := Complex.laplace_zeroHeatTrace_linearProduct h0 ha hs m hy.le + rw [← heq] at hp + calc + g y = ∫ t : ℝ in Ioi 0, Real.exp (-y * t) * t ^ m * Complex.zeroHeatTrace f t := + (hnative.2 m y hy.le).2 + _ = _ := by + rw [hp.2] + simp only [Real.weightedResolventSum, Nat.factorial_zero, Nat.cast_one, + zero_add, mul_zero, zero_mul] + have hrodrigues := Real.eulerRodrigues_eq_weightedResolventSum ha hs + (hf.isCompletelyMonotoneOnIoi_signed_logDeriv h0 m).contDiffOn hbase k hx + rw [Real.eulerRodrigues_signed_iteratedDeriv] at hrodrigues + have hw := Complex.laplace_weighted_zeroHeatTrace_linearProduct h0 ha hs k m hx.le + have hl := Complex.laplace_laguerre_zeroHeatTrace_linearProduct h0 ha hs k m hx.le + rw [← heq] at hw hl + exact ⟨⟨hw.1, hrodrigues.trans hw.2.symm⟩, ⟨hl.1, hrodrigues.trans hl.2.symm⟩⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorCriterion.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorCriterion.lean new file mode 100644 index 000000000..97969e699 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorCriterion.lean @@ -0,0 +1,39 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.Mathlib.Algebra.Polynomial.Reverse + +/-! +# Differential-operator criterion for the Laguerre--Pólya class + +A real entire function belongs to the Laguerre--Pólya class exactly when its +Taylor differential operator preserves real-rootedness. Testing on monomials +already suffices by Jensen's criterion. +-/ + +public section + +open Polynomial Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- A real entire function is Laguerre--Pólya exactly when its Taylor +differential operator preserves splitting over the reals. -/ +theorem isLaguerrePolya_iff_taylorDifferentialOperator_splits {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (hconj : ∀ z, f (conj z) = conj (f z)) : + IsLaguerrePolya f ↔ + ∀ p : ℝ[X], p.Splits → (taylorDifferentialOperator f p).Splits := by + constructor + · exact fun h _ hp => h.taylorDifferentialOperator_splits hp + · intro h + apply (isLaguerrePolya_iff_jensenPolynomial_splits hf + (fun k => (ofReal_re_iteratedDeriv_zero hconj k).symm)).mpr + intro d + apply (splits_reflect_iff (natDegree_jensenPolynomial_le d _)).mp + rw [← taylorDifferentialOperator_X_pow] + exact h _ (Splits.X.pow d) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorLinear.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorLinear.lean new file mode 100644 index 000000000..228f83f99 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorLinear.lean @@ -0,0 +1,62 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +public import RealRooted.Mathlib.Algebra.Polynomial.BasisTransform + +/-! +# Linearity of Taylor differential operators in the input + +Taylor differential sums may be truncated at any common degree bound. This +gives input linearity and identifies each such operator with the basis +transform specified by its images of powers of the variable. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- The differential sum can be extended to any upper bound on the input degree. -/ +theorem taylorDifferentialOperator_eq_sum {f : ℂ → ℂ} {p : ℝ[X]} {N : ℕ} + (hp : p.natDegree ≤ N) : + taylorDifferentialOperator f p = ∑ k ∈ Finset.range (N + 1), + C ((iteratedDeriv k f 0 / k.factorial).re) * (derivative^[k]) p := by + unfold taylorDifferentialOperator + apply Finset.sum_subset (Finset.range_subset_range.mpr (by lia)) + intro k _ hk + have hpk : p.natDegree < k := by simpa using hk + rw [iterate_derivative_eq_zero hpk, mul_zero] + +/-- Taylor differential operators are additive in their polynomial input. -/ +theorem taylorDifferentialOperator_add_input (f : ℂ → ℂ) (p q : ℝ[X]) : + taylorDifferentialOperator f (p + q) = + taylorDifferentialOperator f p + taylorDifferentialOperator f q := by + let N := max p.natDegree q.natDegree + rw [taylorDifferentialOperator_eq_sum (natDegree_add_le p q), + taylorDifferentialOperator_eq_sum (N := N) (le_max_left _ _), + taylorDifferentialOperator_eq_sum (N := N) (le_max_right _ _)] + simp only [← pow_apply_eq_iterate, map_add, mul_add, Finset.sum_add_distrib, N] + +/-- Taylor differential operators commute with multiplication of the input by a constant. -/ +theorem taylorDifferentialOperator_C_mul_input (f : ℂ → ℂ) (a : ℝ) (p : ℝ[X]) : + taylorDifferentialOperator f (C a * p) = C a * taylorDifferentialOperator f p := by + rw [taylorDifferentialOperator_eq_sum (natDegree_C_mul_le a p), + taylorDifferentialOperator, Finset.mul_sum] + apply Finset.sum_congr rfl + intro k _ + rw [iterate_derivative_C_mul] + ring + +/-- A Taylor differential operator is the basis transform given by its monomial images. -/ +theorem taylorDifferentialOperator_eq_basisTransform (f : ℂ → ℂ) (p : ℝ[X]) : + taylorDifferentialOperator f p = + basisTransform (fun n => taylorDifferentialOperator f (X ^ n)) p := by + induction p using Polynomial.induction_on' with + | add p q hp hq => + rw [taylorDifferentialOperator_add_input, basisTransform_add, hp, hq] + | monomial n a => + rw [← C_mul_X_pow_eq_monomial, taylorDifferentialOperator_C_mul_input, + basisTransform_C_mul_X_pow] + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorProduct.lean new file mode 100644 index 000000000..1ea9cc3c9 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OperatorProduct.lean @@ -0,0 +1,122 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +public import RealRooted.Hermite.Poulain + +/-! +# Polynomial factors of Taylor differential operators + +Multiplication of an entire symbol by a real polynomial corresponds to +composition with its finite constant-coefficient differential operator. +-/ + +public section + +open Polynomial Complex RealRooted.HermitePoulain + +namespace RealRooted + +/-- Taylor differential operators are additive in entire symbols. -/ +theorem taylorDifferentialOperator_add {f g : ℂ → ℂ} + (hf : Differentiable ℂ f) (hg : Differentiable ℂ g) (p : ℝ[X]) : + taylorDifferentialOperator (fun z => f z + g z) p = + taylorDifferentialOperator f p + taylorDifferentialOperator g p := by + have hd (k : ℕ) : iteratedDeriv k (fun z => f z + g z) 0 = + iteratedDeriv k f 0 + iteratedDeriv k g 0 := + iteratedDeriv_fun_add hf.contDiff.contDiffAt hg.contDiff.contDiffAt + simp only [taylorDifferentialOperator, hd, add_div, Complex.add_re, map_add, + add_mul, Finset.sum_add_distrib] + +/-- A real scalar on the symbol becomes the same scalar on the polynomial output. -/ +theorem taylorDifferentialOperator_real_mul (a : ℝ) (f : ℂ → ℂ) (p : ℝ[X]) : + taylorDifferentialOperator (fun z => (a : ℂ) * f z) p = + C a * taylorDifferentialOperator f p := by + simp only [taylorDifferentialOperator, iteratedDeriv_const_mul_field, + mul_div_assoc, re_ofReal_mul, map_mul, Finset.mul_sum, mul_assoc] + +/-- Multiplication of the symbol by its variable shifts its Taylor coefficients. -/ +private theorem iteratedDeriv_mul_id_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (k : ℕ) : + iteratedDeriv (k + 1) (fun z => z * f z) 0 = (k + 1 : ℂ) * iteratedDeriv k f 0 := by + rw [iteratedDeriv_fun_mul (by fun_prop) hf.contDiff.contDiffAt] + simp [iteratedDeriv_fun_id_zero, mul_ite, ite_mul] + +/-- Multiplication of an entire symbol by its variable differentiates the output. -/ +theorem taylorDifferentialOperator_id_mul {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (p : ℝ[X]) : + taylorDifferentialOperator (fun z => z * f z) p = + (taylorDifferentialOperator f p).derivative := by + classical + have hcoef (k : ℕ) : + iteratedDeriv (k + 1) (fun z => z * f z) 0 / (k + 1).factorial = + iteratedDeriv k f 0 / k.factorial := by + rw [iteratedDeriv_mul_id_zero hf, Nat.factorial_succ] + push_cast + field_simp + rw [taylorDifferentialOperator, Finset.sum_range_succ', taylorDifferentialOperator, + map_sum, Finset.sum_range_succ] + simp only [iteratedDeriv_zero, zero_mul, zero_div, zero_re, map_zero, + zero_mul, add_zero, hcoef, derivative_C_mul, ← Function.iterate_succ_apply'] + rw [iterate_derivative_eq_zero (Nat.lt_succ_self p.natDegree)] + simp + +/-- Polynomial factors of an entire symbol act by composition of differential operators. -/ +theorem taylorDifferentialOperator_polynomial_mul {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (q p : ℝ[X]) : + taylorDifferentialOperator (fun z => (q.map ofRealHom).eval z * f z) p = + applyAsDifferentialOperator q (taylorDifferentialOperator f p) := by + induction q using Polynomial.induction_on with + | C a => + simpa [applyAsDifferentialOperator_C] using taylorDifferentialOperator_real_mul a f p + | add q r ihq ihr => + have heq : (fun z => ((q + r).map ofRealHom).eval z * f z) = + fun z => (q.map ofRealHom).eval z * f z + (r.map ofRealHom).eval z * f z := by + funext z + simp [Polynomial.map_add, eval_add, add_mul] + rw [heq, taylorDifferentialOperator_add (by fun_prop) (by fun_prop), ihq, ihr, + applyAsDifferentialOperator_add] + | monomial n a ih => + rw [show C a * X ^ (n + 1) = X * (C a * X ^ n) by ring, + applyAsDifferentialOperator_X_mul] + have heq : (fun z => ((X * (C a * X ^ n)).map ofRealHom).eval z * f z) = + fun z => z * (((C a * X ^ n).map ofRealHom).eval z * f z) := by + funext z + simp [Polynomial.map_mul, eval_mul, mul_assoc] + rw [heq, taylorDifferentialOperator_id_mul (by fun_prop), ih] + +/-- A Taylor differential operator cannot increase the input degree. -/ +theorem natDegree_taylorDifferentialOperator_le (f : ℂ → ℂ) (p : ℝ[X]) : + (taylorDifferentialOperator f p).natDegree ≤ p.natDegree := by + apply natDegree_sum_le_of_forall_le + intro k _ + exact (natDegree_C_mul_le _ _).trans + ((natDegree_iterate_derivative p k).trans (Nat.sub_le _ _)) + +/-- Only the constant Taylor coefficient contributes to the top input degree. -/ +theorem coeff_taylorDifferentialOperator_natDegree (f : ℂ → ℂ) (p : ℝ[X]) : + (taylorDifferentialOperator f p).coeff p.natDegree = (f 0).re * p.leadingCoeff := by + rw [taylorDifferentialOperator, finsetSum_coeff, Finset.sum_eq_single 0] + · simp [coeff_natDegree] + · intro k _ hk + rw [coeff_C_mul, coeff_iterate_derivative, + coeff_eq_zero_of_natDegree_lt (Nat.lt_add_of_pos_right (Nat.pos_of_ne_zero hk))] + simp + · simp + +/-- A nonzero real constant Taylor coefficient prevents annihilation of any nonzero input. -/ +theorem taylorDifferentialOperator_ne_zero {f : ℂ → ℂ} {p : ℝ[X]} + (hf : (f 0).re ≠ 0) (hp : p ≠ 0) : taylorDifferentialOperator f p ≠ 0 := by + intro hz + have h := congrArg (fun q : ℝ[X] => q.coeff p.natDegree) hz + rw [coeff_taylorDifferentialOperator_natDegree, coeff_zero] at h + exact mul_ne_zero hf (leadingCoeff_ne_zero.mpr hp) h + +/-- A nonzero real constant Taylor coefficient preserves the exact input degree. -/ +theorem natDegree_taylorDifferentialOperator {f : ℂ → ℂ} {p : ℝ[X]} + (hf : (f 0).re ≠ 0) (hp : p ≠ 0) : + (taylorDifferentialOperator f p).natDegree = p.natDegree := + natDegree_eq_of_le_of_coeff_ne_zero (natDegree_taylorDifferentialOperator_le f p) + (by rw [coeff_taylorDifferentialOperator_natDegree]; + exact mul_ne_zero hf (leadingCoeff_ne_zero.mpr hp)) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginFactor.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginFactor.lean new file mode 100644 index 000000000..1300bd51f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginFactor.lean @@ -0,0 +1,43 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import TauCeti.Analysis.Complex.GrowthOrder +public import Mathlib.Analysis.Analytic.Order +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RootDivision +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GrowthOrder +import TauCeti.Analysis.Complex.GrowthOrder.Zero.Factorization + +/-! +# Removing the full origin zero of a Laguerre--Pólya function +-/ + +public section + +namespace RealRooted + +/-- Removing the full origin zero preserves LP and every supplied growth bound. -/ +theorem IsLaguerrePolya.exists_origin_factor_of_order {f : ℂ → ℂ} {ρ : ℝ} + (hf : IsLaguerrePolya f) (hne : f ≠ 0) (ho : TauCeti.OrderLE f ρ) : + ∃ g : ℂ → ℂ, IsLaguerrePolya g ∧ g 0 ≠ 0 ∧ TauCeti.OrderLE g ρ ∧ + f = fun z : ℂ ↦ z ^ analyticOrderNatAt f 0 * g z := by + obtain ⟨g, hgd, hg0, hgo, heq⟩ := + ho.exists_eq_sub_pow_mul hf.differentiable (Function.ne_iff.mp hne) 0 + have hfactor : f = fun z : ℂ ↦ z ^ analyticOrderNatAt f 0 * g z := by + funext z + simpa only [sub_zero] using heq z + have hprod : IsLaguerrePolya (fun z : ℂ ↦ (z - (0 : ℝ)) ^ + analyticOrderNatAt f 0 * g z) := by + simpa only [Complex.ofReal_zero, sub_zero, ← hfactor] using hf + exact ⟨g, hprod.of_sub_pow_mul 0 _ hgd, hg0, hgo, hfactor⟩ + +/-- Every nonzero LP function is its full origin monomial times an LP +function nonzero at the origin. No growth premise is required. -/ +theorem IsLaguerrePolya.exists_origin_factor {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hne : f ≠ 0) : + ∃ g : ℂ → ℂ, IsLaguerrePolya g ∧ g 0 ≠ 0 ∧ + f = fun z : ℂ ↦ z ^ analyticOrderNatAt f 0 * g z := by + obtain ⟨g, hg, hg0, _, heq⟩ := hf.exists_origin_factor_of_order hne hf.orderLE_two + exact ⟨g, hg, hg0, heq⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginHeatTrace.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginHeatTrace.lean new file mode 100644 index 000000000..15e39fce0 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginHeatTrace.lean @@ -0,0 +1,86 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.Complex.GrowthOrder +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeHeatTrace +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginLogDerivativeHierarchy +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeCompletelyMonotone +import RealRooted.Mathlib.Analysis.Complex.LogDerivPowMul +import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTraceOrigin +import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.LaplaceConstant + +/-! +# Heat representations with a zero at the origin + +Multiplying an order-below-one Type-I function `g`, nonzero at zero, by +`z^r` adds the constant `r` to its heat trace. The resulting Laplace +moments equal the actual signed logarithmic derivatives for `x > 0`. +The endpoint `x = 0` is deliberately excluded when origin zeros are allowed. +-/ + +public section + +open Filter MeasureTheory + +namespace RealRooted + +/-- An origin zero adds its multiplicity as a constant heat term. +The Laplace representation remains valid for every positive parameter. -/ +theorem IsLaguerrePolyaTypeI.origin_heatTrace_logDeriv + {g : ℂ → ℂ} (hg : IsLaguerrePolyaTypeI g) (h0 : g 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE g rho) (hrho : rho < 1) (r : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun t : ℝ ↦ (r : ℝ) + Complex.zeroHeatTrace g t) ∧ + ∀ (k : ℕ) (x : ℝ), 0 < x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + ((r : ℝ) + Complex.zeroHeatTrace g t)) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ + (logDeriv (fun z : ℂ ↦ z ^ r * g z) (y : ℂ)).re) x = + ∫ t : ℝ in Set.Ioi 0, Real.exp (-x * t) * t ^ k * + ((r : ℝ) + Complex.zeroHeatTrace g t) := by + obtain ⟨hcm, hlap⟩ := hg.native_heatTrace_logDeriv h0 horder hrho + have hc := (TauCeti.isCompletelyMonotone_const (Nat.cast_nonneg r)).isCompletelyMonotoneOnIoi + refine ⟨hc.add hcm, fun k x hx ↦ ?_⟩ + have hbase := hlap k x hx.le + have hsum := Real.laplace_const_add (r : ℝ) k hx hbase.1 + refine ⟨hsum.1, ?_⟩ + rw [Complex.signed_iteratedDeriv_re_logDeriv_pow_mul + hg.toLaguerrePolya.differentiable (fun _ hy ↦ hg.ne_zero_of_nonneg h0 hy.le) + (hg.isCompletelyMonotoneOnIoi_logDeriv h0).contDiffOn r k hx, + hbase.2, hsum.2] + +/-- The actual native divisor trace, including the origin zero itself, +represents every signed logarithmic derivative at positive parameters. -/ +theorem IsLaguerrePolyaTypeI.native_origin_heatTrace_logDeriv + {g : ℂ → ℂ} (hg : IsLaguerrePolyaTypeI g) (h0 : g 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE g rho) (hrho : rho < 1) (r : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi + (Complex.zeroHeatTrace (fun z : ℂ ↦ z ^ r * g z)) ∧ + ∀ (k : ℕ) (x : ℝ), 0 < x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace (fun z : ℂ ↦ z ^ r * g z) t) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ + (logDeriv (fun z : ℂ ↦ z ^ r * g z) (y : ℂ)).re) x = + ∫ t : ℝ in Set.Ioi 0, Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace (fun z : ℂ ↦ z ^ r * g z) t := by + obtain ⟨hcm, hlap⟩ := hg.origin_heatTrace_logDeriv h0 horder hrho r + have hn (t : ℝ) (ht : 0 < t) := + Complex.zeroHeatTrace_pow_mul hg.toLaguerrePolya.differentiable h0 horder r ht + refine ⟨hcm.congr (fun t ht ↦ hn t ht), fun k x hx ↦ ?_⟩ + have h := hlap k x hx + have heq : (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace (fun z : ℂ ↦ z ^ r * g z) t) =ᵐ[volume.restrict (Set.Ioi 0)] + (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + ((r : ℝ) + Complex.zeroHeatTrace g t)) := by + filter_upwards [ae_restrict_mem measurableSet_Ioi] with t (ht : 0 < t) + rw [hn t ht] + exact ⟨h.1.congr heq.symm, h.2.trans (integral_congr_ae heq.symm)⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginLogDerivativeHierarchy.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginLogDerivativeHierarchy.lean new file mode 100644 index 000000000..31d483d31 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/OriginLogDerivativeHierarchy.lean @@ -0,0 +1,77 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.LogDeriv +public import TauCeti.Analysis.CompletelyMonotone.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +import RealRooted.Mathlib.Analysis.CompletelyMonotone.ReciprocalHierarchy +import RealRooted.Mathlib.Analysis.Complex.LogDerivPowMul +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIFactorization +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHierarchy +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeCompletelyMonotone +import RealRooted.Mathlib.Analysis.Complex.LinearProductLogDerivative + +/-! +# The Type-I logarithmic-derivative hierarchy with origin zeros + +For `f(z) = z^r g(z)`, where `g` is Type-I and nonzero at the origin, +the two-index weighted logarithmic-derivative family is still completely +monotone on `(0, ∞)`. The added origin zero contributes exactly +`r m! / x^(m+1)` when the outer derivative index is zero, and vanishes +when that index is positive. The function `f` need not be nonzero at zero. +-/ + +public section + +namespace RealRooted + +/-- A Type-I function nonzero at zero has no zero on the nonnegative axis. -/ +theorem IsLaguerrePolyaTypeI.ne_zero_of_nonneg {g : ℂ → ℂ} + (hg : IsLaguerrePolyaTypeI g) (h0 : g 0 ≠ 0) {x : ℝ} (hx : 0 ≤ x) : + g (x : ℂ) ≠ 0 := by + obtain ⟨gamma, a, _, ha, hs, heq⟩ := hg.exists_eq_exp_mul_prod h0 + rw [heq] + exact mul_ne_zero (mul_ne_zero h0 (Complex.exp_ne_zero _)) + (Complex.tprod_one_add_ofReal_mul_ne_zero ha hs hx) + +/-- The exact contribution of origin multiplicity to the actual Type-I +weighted logarithmic-derivative hierarchy. -/ +theorem IsLaguerrePolyaTypeI.weighted_logDeriv_pow_mul_eq + {g : ℂ → ℂ} (hg : IsLaguerrePolyaTypeI g) (h0 : g 0 ≠ 0) + (r k m : ℕ) {x : ℝ} (hx : 0 < x) : + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun v : ℝ ↦ + (logDeriv (fun z : ℂ ↦ z ^ r * g z) (v : ℂ)).re) y) x = + (if k = 0 then (r : ℝ) * (m.factorial : ℝ) / x ^ (m + 1) else 0) + + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun v : ℝ ↦ (logDeriv g (v : ℂ)).re) y) x := + Complex.weighted_iteratedDeriv_re_logDeriv_pow_mul hg.toLaguerrePolya.differentiable + (fun _ hy ↦ hg.ne_zero_of_nonneg h0 hy.le) + (hg.isCompletelyMonotoneOnIoi_logDeriv h0) r m k hx + +/-- The complete two-index Type-I hierarchy remains completely monotone +after inserting any finite multiplicity at the origin. -/ +theorem IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_weighted_logDeriv_pow_mul + {g : ℂ → ℂ} (hg : IsLaguerrePolyaTypeI g) (h0 : g 0 ≠ 0) (r k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun v : ℝ ↦ + (logDeriv (fun z : ℂ ↦ z ^ r * g z) (v : ℂ)).re) y) x) := by + have hzero : TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + if k = 0 then (r : ℝ) * (m.factorial : ℝ) / x ^ (m + 1) else 0) := by + by_cases hk : k = 0 + · simpa only [hk, ite_true] using + Real.isCompletelyMonotoneOnIoi_const_div_pow + (show 0 ≤ (r : ℝ) * (m.factorial : ℝ) by positivity) (m + 1) + · simpa only [hk, ite_false] using + (TauCeti.isCompletelyMonotone_const (show (0 : ℝ) ≤ 0 by rfl)).isCompletelyMonotoneOnIoi + exact (hzero.add (hg.isCompletelyMonotoneOnIoi_weighted_logDeriv h0 k m)).congr + fun x hx ↦ hg.weighted_logDeriv_pow_mul_eq h0 r k m hx + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PointwiseLimit.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PointwiseLimit.lean new file mode 100644 index 000000000..bcc7fc4d6 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PointwiseLimit.lean @@ -0,0 +1,105 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.LaguerreInequalities.LocalDerivativeBounds +import RealRooted.LaguerreInequalities.LocalZeroLimit +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.UniformDerivativeBounds +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Closure +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Normed.Group.LocallyBoundedMajorant +import TauCeti.Analysis.Complex.Conformal.Vitali + +/-! +# Entire Laguerre--Pólya extension of pointwise local limits + +A pointwise limit on a disk centered on the real line extends to an entire +Laguerre--Pólya function. The zero case uses symmetric products. A nonzero +real value controls the first two derivatives and hence supplies a common +Gaussian majorant and a global normal limit. The zero case does not assert +global convergence of the approximating sequence. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- A nonzero limiting value at zero turns pointwise local convergence of +Laguerre--Pólya functions into an eventual common Gaussian bound. -/ +theorem exists_eventually_norm_le_exp_of_tendsto {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) {r : ℝ} (hr : 0 < r) + (hpoint : ∀ z ∈ Metric.ball (0 : ℂ) r, + Tendsto (fun n => F n z) atTop (𝓝 (g z))) (hg : g 0 ≠ 0) : + ∃ B > 0, ∃ C ≥ 0, ∀ᶠ n in atTop, ∀ z : ℂ, + ‖F n z‖ ≤ B * Real.exp (C * ‖z‖ ^ 2) := by + obtain ⟨A, hA, hAb⟩ := exists_eventually_norm_deriv_le_of_tendsto hF 0 hr hpoint hg + obtain ⟨D, hD, hDb⟩ := exists_eventually_norm_deriv_deriv_le_of_tendsto hF 0 hr hpoint hg + have hzero := hpoint 0 (by simpa using hr) + obtain ⟨E, hE, hEb⟩ := (Metric.isBounded_range_of_tendsto _ hzero).exists_pos_norm_le + obtain ⟨Q, hQ, hQb⟩ := (Metric.isBounded_range_of_tendsto _ + (hzero.inv₀ hg)).exists_pos_norm_le + obtain ⟨B, hB, C, hC, hbound⟩ := + exists_uniform_norm_bound_of_jet_bounds (show 0 ≤ A + D + E + Q by linarith) + refine ⟨B, hB, C, hC, ?_⟩ + filter_upwards [hAb, hDb, hzero.eventually_ne hg] with n hn₁ hn₂ hn₀ + apply hbound (F n) (hF n) hn₀ + · exact (hEb _ ⟨n, rfl⟩).trans (by linarith) + · exact (hQb _ ⟨n, rfl⟩).trans (by linarith) + · exact hn₁.trans (by linarith) + · exact hn₂.trans (by linarith) + +/-- Pointwise convergence on a neighborhood of a real point with nonzero +limit extends to a global Laguerre--Pólya function. Agreement holds at every +point where the original pointwise limit was specified. -/ +theorem exists_isLaguerrePolya_eqOn_of_pointwise_limit {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) {U : Set ℂ} {x : ℝ} + (hU : U ∈ 𝓝 (x : ℂ)) + (hpoint : ∀ z ∈ U, Tendsto (fun n => F n z) atTop (𝓝 (g z))) (hg : g x ≠ 0) : + ∃ G : ℂ → ℂ, IsLaguerrePolya G ∧ Set.EqOn G g U := by + obtain ⟨r, hr, hrU⟩ := Metric.mem_nhds_iff.mp hU + let T (n : ℕ) (z : ℂ) := F n (z + x) + have hT (n : ℕ) : IsLaguerrePolya (T n) := by + simpa only [ofReal_one, one_mul] using (hF n).comp_affine_real 1 x + have hTpoint : ∀ z ∈ Metric.ball (0 : ℂ) r, + Tendsto (fun n => T n z) atTop (𝓝 (g (z + x))) := by + intro z hz + apply hpoint _ (hrU _) + simpa [Metric.mem_ball, dist_eq_norm] using hz + obtain ⟨B, _, C, _, hbound⟩ := exists_eventually_norm_le_exp_of_tendsto hT hr hTpoint + (by simpa using hg) + obtain ⟨N, hN⟩ := eventually_atTop.mp hbound + have htail : ∀ n (z : ℂ), ‖F (n + N) z‖ ≤ B * Real.exp (C * ‖z - (x : ℂ)‖ ^ 2) := by + intro n z + simpa only [T, sub_add_cancel] using hN (n + N) (Nat.le_add_left _ _) (z - (x : ℂ)) + have hb : TauCeti.IsLocallyBoundedOn (fun n => F (n + N)) Set.univ := + TauCeti.isLocallyBoundedOn_of_norm_le_continuous (by fun_prop) + (fun n z _ => htail n z) + have htailpoint (z : ℂ) (hz : z ∈ U) := (hpoint z hz).comp (tendsto_add_atTop_nat N) + have hx : (x : ℂ) ∈ Metric.ball (x : ℂ) r := by simpa using hr + obtain ⟨G, _, _, hlim⟩ := TauCeti.vitali_of_tendsto isOpen_univ isPreconnected_univ + (fun n => (hF (n + N)).differentiable.differentiableOn) hb (Set.subset_univ _) + (Set.mem_univ (x : ℂ)) (Metric.isOpen_ball.preperfect _ hx) + (fun z hz => htailpoint z (hrU hz)) + refine ⟨G, IsLaguerrePolya.of_tendstoLocallyUniformly (fun n => hF (n + N)) + (tendstoLocallyUniformlyOn_univ.mp hlim), ?_⟩ + intro z hz + exact tendsto_nhds_unique (hlim.tendsto_at (Set.mem_univ z)) (htailpoint z hz) + +/-- Every pointwise limit on a disk centered at zero of entire +Laguerre--Pólya functions has an entire Laguerre--Pólya extension. This includes +the identically zero local limit and imposes no normal convergence hypothesis. -/ +theorem exists_isLaguerrePolya_eqOn_of_tendsto {F : ℕ → ℂ → ℂ} {g : ℂ → ℂ} + (hF : ∀ n, IsLaguerrePolya (F n)) {r : ℝ} + (hpoint : ∀ z ∈ Metric.ball (0 : ℂ) r, + Tendsto (fun n => F n z) atTop (𝓝 (g z))) : + ∃ G : ℂ → ℂ, IsLaguerrePolya G ∧ Set.EqOn G g (Metric.ball 0 r) := by + by_cases hzero : ∀ y : ℝ, (y : ℂ) ∈ Metric.ball (0 : ℂ) r → g y = 0 + · exact ⟨0, IsLaguerrePolya.zero, + (eqOn_zero_of_tendsto_of_real_eq_zero hF hpoint hzero).symm⟩ + · push Not at hzero + obtain ⟨x, hx, hg⟩ := hzero + exact exists_isLaguerrePolya_eqOn_of_pointwise_limit hF + (Metric.isOpen_ball.mem_nhds hx) hpoint hg + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PolynomialFactors.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PolynomialFactors.lean new file mode 100644 index 000000000..61d9bbf1e --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PolynomialFactors.lean @@ -0,0 +1,107 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Hadamard +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Zero.Nonempty +import RealRooted.Mathlib.Analysis.Complex.OriginFactor +import TauCeti.Analysis.Complex.GrowthOrder.Zero.Factorization + +/-! +# Large polynomial factors of real entire functions + +A nonpolynomial real entire function of order below one and having only real +zeros has real-rooted polynomial factors of arbitrarily large degree. Removing +these factors leaves a Laguerre–Pólya cofactor. Nonvanishing at the origin keeps +the factors and cofactor nonzero there. +-/ + +public section + +open Complex Polynomial +open scoped ComplexConjugate + +namespace RealRooted + +/-- A zero-free entire function of order below one is constant, hence polynomial. -/ +private theorem exists_zero_of_nonpolynomial {f : ℂ → ℂ} {rho : ℝ} + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) (hf : Differentiable ℂ f) + (hnp : ∀ p : ℂ[X], f ≠ fun z => p.eval z) : ∃ z, f z = 0 := by + exact horder.exists_zero_of_nonconstant hrho hf + (by simpa only [eval_C] using hnp (C (f 0))) + +/-- Remove a full real zero while preserving all hypotheses needed for further extraction. -/ +private theorem exists_real_root_factor {f : ℂ → ℂ} {rho : ℝ} + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) (hf : Differentiable ℂ f) + (hf0 : f 0 ≠ 0) (hconj : ∀ z, f (conj z) = conj (f z)) + (hzeros : ∀ z, f z = 0 → z.im = 0) + (hnp : ∀ p : ℂ[X], f ≠ fun z => p.eval z) : + ∃ (r : ℝ) (m : ℕ) (g : ℂ → ℂ), r ≠ 0 ∧ 0 < m ∧ + Differentiable ℂ g ∧ g 0 ≠ 0 ∧ TauCeti.OrderLE g rho ∧ + (∀ z, g (conj z) = conj (g z)) ∧ (∀ z, g z = 0 → z.im = 0) ∧ + (∀ p : ℂ[X], g ≠ fun z => p.eval z) ∧ ∀ z, f z = (z - r) ^ m * g z := by + obtain ⟨z, hz⟩ := exists_zero_of_nonpolynomial horder hrho hf hnp + have hreal : (z.re : ℂ) = z := by + apply Complex.ext <;> simp [hzeros z hz] + have hr0 : z.re ≠ 0 := by + intro hr + have : z = 0 := by rw [← hreal, hr]; simp + exact hf0 (this ▸ hz) + obtain ⟨g, hg, hgroot, hgorder, hfactor⟩ := + horder.exists_eq_sub_pow_mul hf ⟨0, hf0⟩ (z.re : ℂ) + let m := analyticOrderNatAt f (z.re : ℂ) + have hm : 0 < m := by + by_contra h + have hm0 : m = 0 := by lia + have he := hfactor (z.re : ℂ) + change f (z.re : ℂ) = _ ^ m * _ at he + rw [hm0, pow_zero, one_mul, hreal, hz] at he + apply hgroot + rw [hreal] + exact he.symm + have hg0 : g 0 ≠ 0 := by + intro hzero + exact hf0 (by rw [hfactor, hzero, mul_zero]) + refine ⟨z.re, m, g, hr0, hm, hg, hg0, hgorder, + Complex.conj_of_real_pow_mul hg.continuous hconj hfactor, ?_, ?_, hfactor⟩ + · intro w hw + exact hzeros w (by rw [hfactor, hw, mul_zero]) + · intro p hp + apply hnp ((X - C (z.re : ℂ)) ^ m * p) + funext w + rw [hfactor, hp] + simp [m] + +/-- A nonpolynomial real entire function of order below one with only real +zeros has arbitrarily large real-rooted polynomial factors and LP cofactors. -/ +theorem exists_polynomial_factor_of_order_lt_one {f : ℂ → ℂ} {rho : ℝ} + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) (hf : Differentiable ℂ f) + (hf0 : f 0 ≠ 0) (hconj : ∀ z, f (conj z) = conj (f z)) + (hzeros : ∀ z, f z = 0 → z.im = 0) + (hnp : ∀ p : ℂ[X], f ≠ fun z => p.eval z) (N : ℕ) : + ∃ (q : ℝ[X]) (g : ℂ → ℂ), q.Splits ∧ q.coeff 0 ≠ 0 ∧ N ≤ q.natDegree ∧ + IsLaguerrePolya g ∧ g 0 ≠ 0 ∧ ∀ z, f z = (q.map ofRealHom).eval z * g z := by + induction N generalizing f with + | zero => + refine ⟨1, f, Splits.one, by simp, Nat.zero_le _, + isLaguerrePolya_of_orderLE_one (horder.mono hrho.le) hf hf0 hconj hzeros, hf0, ?_⟩ + intro z + simp + | succ N ih => + obtain ⟨r, m, g, hr, hm, hg, hg0, hgorder, hgconj, hgzeros, hgnp, hfactor⟩ := + exists_real_root_factor horder hrho hf hf0 hconj hzeros hnp + obtain ⟨q, t, hq, hq0, hdegree, ht, ht0, hgt⟩ := + ih hgorder hg hg0 hgconj hgzeros hgnp + have hqne : q ≠ 0 := by intro hz; simp [hz] at hq0 + refine ⟨(X - C r) ^ m * q, t, ((Splits.X_sub_C r).pow m).mul hq, ?_, ?_, ht, ht0, ?_⟩ + · rw [coeff_zero_eq_eval_zero, eval_mul, eval_pow, eval_sub, eval_X, eval_C, + zero_sub, ← coeff_zero_eq_eval_zero] + exact mul_ne_zero (pow_ne_zero _ (neg_ne_zero.mpr hr)) hq0 + · rw [natDegree_mul (pow_ne_zero _ (X_sub_C_ne_zero r)) hqne, + natDegree_pow, natDegree_X_sub_C, mul_one] + lia + · intro z + rw [hfactor, hgt] + simp [Polynomial.map_mul, Polynomial.map_pow, Polynomial.map_sub, mul_assoc] + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PowerSumMoments.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PowerSumMoments.lean new file mode 100644 index 000000000..5286b18d2 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/PowerSumMoments.lean @@ -0,0 +1,165 @@ +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Analytic.TaylorSeries +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.Mathlib.Analysis.Complex.LinearProduct +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import RealRooted.Mathlib.Algebra.Polynomial.LinearFactors +import RealRooted.Mathlib.RingTheory.PowerSeries.NewtonSums +import RealRooted.Mathlib.RingTheory.PowerSeries.LogarithmPositive +import Mathlib.Analysis.Asymptotics.Lemmas +import TauCeti.Analysis.SpecialFunctions.Complex.Exp.LogDeriv + +/-! +# Logarithmic derivative coefficients as power sums + +For a convergent linear product, the signed Taylor coefficients of its +logarithmic derivative are the power sums of the slopes. The proof passes +from finite products through coefficientwise continuity of the formal +logarithm, then identifies the analytic logarithmic derivative. +-/ + +public section + +open Complex Polynomial Filter Topology + +namespace RealRooted + +/-- Signed logarithmic coefficients of a finite linear product are power sums. -/ +private theorem signed_coeff_logOf_linear_product (s : Finset ℕ) (a : ℕ → ℝ) + {k : ℕ} (hk : k ≠ 0) : + (-1 : ℝ) ^ (k + 1) * k * PowerSeries.coeff k + (PowerSeries.logOf (∏ i ∈ s, (1 + PowerSeries.C (a i) * PowerSeries.X))) = + ∑ i ∈ s, a i ^ k := by + have h := PowerSeries.coeff_neg_logOf_prod_one_sub_C_mul_X s (fun i => -a i) hk + simp only [map_neg, neg_mul, sub_neg_eq_add] at h + have hsum : (∑ i ∈ s, (-a i) ^ k) = (-1 : ℝ) ^ k * ∑ i ∈ s, a i ^ k := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + exact neg_pow (a i) k + rw [hsum] at h + have hkR : (k : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr hk + have heq := (eq_div_iff hkR).mp h + have hsign : (-1 : ℝ) ^ k * (-1) ^ k = 1 := by rw [← mul_pow]; norm_num + rw [pow_succ] + calc + _ = (-1 : ℝ) ^ k * + (-PowerSeries.coeff k (PowerSeries.logOf + (∏ i ∈ s, (1 + PowerSeries.C (a i) * PowerSeries.X))) * k) := by ring + _ = (-1 : ℝ) ^ k * ((-1 : ℝ) ^ k * ∑ i ∈ s, a i ^ k) := by rw [heq] + _ = _ := by rw [← mul_assoc, hsign, one_mul] + +/-- Real linear partial products converge as real polynomial approximants. -/ +private theorem tendsto_linear_polynomials (a : ℕ → ℝ) (hs : Summable a) : + TendstoLocallyUniformly (fun n z => + ((∏ i ∈ Finset.range n, (1 + C (a i) * X : ℝ[X])).map ofRealHom).eval z) + (fun z => ∏' i, (1 + (a i : ℂ) * z)) atTop := by + simpa only [Polynomial.map_prod, Polynomial.map_add, Polynomial.map_one, + Polynomial.map_mul, Polynomial.map_C, Polynomial.map_X, Polynomial.eval_prod, + Polynomial.eval_add, Polynomial.eval_one, Polynomial.eval_mul, + Polynomial.eval_C, Polynomial.eval_X, ofRealHom_eq_coe] using + Complex.tendstoLocallyUniformly_prod_one_add a hs + +/-- A summable real linear product is an LP function, without sign restrictions on the slopes. -/ +private theorem isLaguerrePolya_linear_product (a : ℕ → ℝ) (hs : Summable a) : + IsLaguerrePolya (fun z => ∏' i, (1 + (a i : ℂ) * z)) := + ⟨fun n => ∏ i ∈ Finset.range n, (1 + C (a i) * X), + fun n => Or.inr (splits_prod_one_add_C_mul_X (Finset.range n) a), + tendsto_linear_polynomials a hs⟩ + +/-- Formal logarithmic coefficients of an infinite linear product are power sums. -/ +private theorem signed_coeff_logOf_linear_tprod (a : ℕ → ℝ) (hs : Summable a) + (k : ℕ) : + (-1 : ℝ) ^ (k + 1 + 1) * ((k + 1 : ℕ) : ℝ) * PowerSeries.coeff (k + 1) + (PowerSeries.logOf (PowerSeries.mk (fun j => + (iteratedDeriv j (fun z => ∏' i, (1 + (a i : ℂ) * z)) 0).re / j.factorial))) = + ∑' i, a i ^ (k + 1) := by + let p : ℕ → ℝ[X] := fun n => ∏ i ∈ Finset.range n, (1 + C (a i) * X) + let b : PowerSeries ℝ := PowerSeries.mk (fun j => + (iteratedDeriv j (fun z => ∏' i, (1 + (a i : ℂ) * z)) 0).re / j.factorial) + have hp0 (n : ℕ) : PowerSeries.constantCoeff (p n : PowerSeries ℝ) = 1 := by + simp [p, coeff_zero_eq_eval_zero, eval_prod] + have hb0 : PowerSeries.constantCoeff b = 1 := by simp [b] + have hcoeff (j : ℕ) : Tendsto + (fun n => PowerSeries.coeff j (p n : PowerSeries ℝ)) atTop + (𝓝 (PowerSeries.coeff j b)) := by + simpa only [p, b, PowerSeries.coeff_mk, Polynomial.coeff_coe, div_natCast_re] using + Polynomial.tendsto_coeff_of_tendstoLocallyUniformly (tendsto_linear_polynomials a hs) j + have hlim := (PowerSeries.tendsto_coeff_logOf_of_coeff_tendsto hp0 hb0 hcoeff + (k + 1)).const_mul ((-1 : ℝ) ^ (k + 1 + 1) * ((k + 1 : ℕ) : ℝ)) + have hfinite (n : ℕ) : + (-1 : ℝ) ^ (k + 1 + 1) * ((k + 1 : ℕ) : ℝ) * + PowerSeries.coeff (k + 1) (PowerSeries.logOf (p n : PowerSeries ℝ)) = + ∑ i ∈ Finset.range n, a i ^ (k + 1) := by + dsimp only [p] + rw [coe_prod_one_add_C_mul_X] + exact signed_coeff_logOf_linear_product _ a (Nat.succ_ne_zero k) + simp_rw [hfinite] at hlim + have hsum : Summable (fun i => a i ^ (k + 1)) := by + simpa only [pow_succ, mul_comm] using + hs.norm.mul_tendsto_const (hs.tendsto_cofinite_zero.pow k) + exact tendsto_nhds_unique hlim hsum.hasSum.tendsto_sum_nat + +/-- The signed analytic logarithmic-derivative coefficients of a summable +real linear product are exactly its positive-index power sums. -/ +theorem signed_logDeriv_linear_product (a : ℕ → ℝ) (hs : Summable a) (k : ℕ) : + (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv (fun z => ∏' i, (1 + (a i : ℂ) * z))) 0).re / + k.factorial = ∑' i, a i ^ (k + 1) := by + let f : ℂ → ℂ := fun z => ∏' i, (1 + (a i : ℂ) * z) + have hf := isLaguerrePolya_linear_product a hs + have hreal (j : ℕ) : ((iteratedDeriv j f 0).re : ℂ) = iteratedDeriv j f 0 := + ofReal_re_iteratedDeriv_zero hf.conj j + have h := AnalyticAt.re_iteratedDeriv_logDeriv_eq_coeff_logOf + (hf.differentiable.analyticAt 0) (by simp) hreal k + have hm := signed_coeff_logOf_linear_tprod a hs k + change (-1 : ℝ) ^ k * (iteratedDeriv k (logDeriv f) 0).re / k.factorial = _ + rw [mul_div_assoc, h] + simp only [mul_zero, add_zero, tprod_one, one_re, mul_one] + rw [Nat.cast_add, Nat.cast_one, + show k + 1 + 1 = k + 2 by lia, pow_add] at hm + convert hm using 1 + ring + + +/-- A nonzero constant and a real exponential add only the constant moment +to the signed logarithmic-derivative power sums. The constant may be complex. -/ +theorem signed_logDeriv_exp_linear_product {c : ℂ} (hc : c ≠ 0) + (gamma : ℝ) (a : ℕ → ℝ) (hs : Summable a) (k : ℕ) : + (-1 : ℝ) ^ k * (iteratedDeriv k (logDeriv (fun z => + c * exp ((gamma : ℂ) * z) * ∏' i, (1 + (a i : ℂ) * z))) 0).re / k.factorial = + gamma * 0 ^ k + ∑' i, a i ^ (k + 1) := by + let P : ℂ → ℂ := fun z => ∏' i, (1 + (a i : ℂ) * z) + have hd : Differentiable ℂ P := (isLaguerrePolya_linear_product a hs).differentiable + have hP0 : P 0 ≠ 0 := by simp [P] + have heq : logDeriv (fun z => c * exp ((gamma : ℂ) * z) * P z) =ᶠ[𝓝 0] + (fun z => (gamma : ℂ) + logDeriv P z) := by + filter_upwards [hd.continuous.continuousAt.eventually_ne hP0] with z hz + rw [show (fun w => c * exp ((gamma : ℂ) * w) * P w) = + (fun w => c * (exp ((gamma : ℂ) * w) * P w)) by funext w; ring] + rw [logDeriv_const_mul _ _ hc, + TauCeti.logDeriv_cexp_mul hz (hd z) (by fun_prop), deriv_const_mul_id] + have hder := heq.iteratedDeriv_eq k + have hm := signed_logDeriv_linear_product a hs k + change (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv (fun z => c * exp ((gamma : ℂ) * z) * P z)) 0).re / + k.factorial = _ + rw [hder] + cases k with + | zero => + simp only [iteratedDeriv_zero, pow_zero, one_mul, Nat.factorial_zero, + Nat.cast_one, div_one, mul_one, add_re, ofReal_re] + simpa only [iteratedDeriv_zero, pow_zero, one_mul, Nat.factorial_zero, + Nat.cast_one, div_one, P] using congrArg (fun x : ℝ => gamma + x) hm + | succ k => + rw [iteratedDeriv_const_add (Nat.succ_pos k)] + simpa only [zero_pow (Nat.succ_ne_zero k), mul_zero, zero_add, P] using hm + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Product.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Product.lean new file mode 100644 index 000000000..70fd6ae61 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Product.lean @@ -0,0 +1,49 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Hadamard +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import Mathlib.Analysis.Analytic.IsolatedZeros + +/-! +# Laguerre--Pólya tests using auxiliary products + +Multiplication by a nonzero Laguerre--Pólya function detects membership for a +real entire function of order at most one which does not vanish at zero. +The auxiliary function may vanish at zero. Its exclusion as the identically +zero function is essential because the library uses a zero-aware class. + +This is the order-at-most-one case of the product argument in O'Sullivan, +*Zeros of Jensen polynomials and asymptotics for the Riemann xi function*, +Theorem 3.5, https://arxiv.org/abs/2007.13582. +-/ + +public section + +open Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- A nonzero Laguerre--Pólya auxiliary detects membership for a real entire +function of order at most one which is nonzero at the origin. -/ +theorem isLaguerrePolya_mul_iff_of_orderLE_one {f g : ℂ → ℂ} + (horder : TauCeti.OrderLE f 1) (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (hconj : ∀ z, f (conj z) = conj (f z)) (hg : IsLaguerrePolya g) (hg0 : g ≠ 0) : + IsLaguerrePolya (f * g) ↔ IsLaguerrePolya f := by + constructor + · intro hfg + have hfg0 : f * g ≠ 0 := by + intro hzero + have hfana : AnalyticOnNhd ℂ f Set.univ := fun z _ => hf.analyticAt z + rcases hfana.eq_zero_or_eq_zero_of_mul_eq_zero hg.analyticOnNhd + (fun z _ => congrFun hzero z) isPreconnected_univ with h | h + · exact hf0 (h 0 (Set.mem_univ _)) + · exact hg0 (funext fun z => h z (Set.mem_univ _)) + exact isLaguerrePolya_of_orderLE_one horder hf hf0 hconj fun z hz => + hfg.im_eq_zero_of_eq_zero hfg0 (by simp [Pi.mul_apply, hz]) + · exact fun h => h.mul hg + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/QuarticInequality.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/QuarticInequality.lean new file mode 100644 index 000000000..e2597f890 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/QuarticInequality.lean @@ -0,0 +1,41 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.LaguerreInequalities.DerivativeFormula +import RealRooted.BrandenLC.Sequence +import Mathlib.Tactic.Linarith + +/-! +# The quartic auxiliary inequality + +The inequality in Cardon, *Extended Laguerre inequalities and a criterion +for real zeros*, Example 1, follows from the degree-independent Newton bound +for the generalized Laguerre coefficients. The expression is +`6 * (L_1^2 - 2 * L_0 * L_2)`, so the proof includes real centers where `f` vanishes. +-/ + +public section + +namespace RealRooted + +/-- The quartic derivative inequality associated to the auxiliary `X^4 + 4` +holds for every Laguerre--Pólya function and every real center. -/ +theorem IsLaguerrePolya.quartic_derivative_nonneg {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (x : ℝ) : + 0 ≤ -(f x).re ^ 3 * (iteratedDeriv 4 f x).re + + 3 * (f x).re ^ 2 * (iteratedDeriv 2 f x).re ^ 2 + + 6 * (iteratedDeriv 1 f x).re ^ 4 + + 4 * (f x).re ^ 2 * (iteratedDeriv 3 f x).re * (iteratedDeriv 1 f x).re - + 12 * (f x).re * (iteratedDeriv 1 f x).re ^ 2 * (iteratedDeriv 2 f x).re := by + obtain ⟨p, hp, hlim⟩ := hf.exists_pf_laguerreCoefficient_approx x + have h := logConcavitySequence_lower_bound_of_limit hp hlim 1 + norm_num [logConcavitySequence] at h + rw [laguerreCoefficient_zero hf.differentiable hf.conj, + laguerreCoefficient_one hf.differentiable hf.conj, + laguerreCoefficient_two hf.differentiable hf.conj] at h + nlinarith + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/RealLogHierarchy.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/RealLogHierarchy.lean new file mode 100644 index 000000000..5a11febda --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/RealLogHierarchy.lean @@ -0,0 +1,69 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.CompletelyMonotone.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeICriterion +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHierarchy +import RealRooted.Mathlib.Analysis.Complex.RealLogDeriv +import RealRooted.Mathlib.Analysis.Complex.ForwardDifference + +/-! +# Literal real logarithms of positive Type-I functions + +A Type-I function nonzero at zero is strictly positive on the nonnegative +real axis. Its weighted real-logarithm derivatives are consequently the +same functions as the logarithmic-derivative hierarchy, with no ambiguity +about negative logarithm arguments. +-/ + +public section + +namespace RealRooted + +/-- Nonzero-at-zero Type-I functions are strictly positive on the +nonnegative real axis. -/ +theorem IsLaguerrePolyaTypeI.re_pos_of_nonneg {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) {x : ℝ} (hx : 0 ≤ x) : + 0 < (f (x : ℂ)).re := by + have hpos := (isLaguerrePolyaTypeI_iff_isLaguerrePolya_nonneg.mp hf).2 + have hre0 : ((f 0).re : ℂ) = f 0 := by + simpa only [iteratedDeriv_zero] using + Complex.ofReal_re_iteratedDeriv_zero hf.toLaguerrePolya.conj 0 + have hne : (f 0).re ≠ 0 := by + intro hn + apply h0 + rw [← hre0, hn, Complex.ofReal_zero] + have hp0 : 0 < (f 0).re := + lt_of_le_of_ne (by simpa only [iteratedDeriv_zero] using hpos 0) hne.symm + exact hp0.trans_le (hf.toLaguerrePolya.differentiable.re_apply_le_of_iteratedDeriv_nonneg + (fun n _ ↦ hpos n) hx) + +/-- Every member of the literal weighted real-logarithm family of a +Type-I function is completely monotone on the positive axis. -/ +theorem IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_weighted_log + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv (m + 1) (fun z : ℝ ↦ Real.log (f (z : ℂ)).re) y) x) := by + apply (hf.isCompletelyMonotoneOnIoi_weighted_logDeriv h0 k m).congr + intro x hx + apply Complex.weighted_iteratedDeriv_log_re_eq hf.toLaguerrePolya.differentiable + · intro y _ + apply Complex.conj_eq_iff_re.mp + simpa using (hf.toLaguerrePolya.conj (y : ℂ)).symm + · intro y hy hn + have hp := hf.re_pos_of_nonneg h0 hy.le + simp only [hn, Complex.zero_re, lt_self_iff_false] at hp + · exact hx + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/ReciprocalPolynomialOperator.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/ReciprocalPolynomialOperator.lean new file mode 100644 index 000000000..fce12114b --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/ReciprocalPolynomialOperator.lean @@ -0,0 +1,82 @@ +/- +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 RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +public import Mathlib.Probability.Moments.ComplexMGF +import RealRooted.Hermite.FormalDifferential.Composition +import RealRooted.Hermite.FormalDifferential.Taylor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MGFPolynomialOperator +import RealRooted.Mathlib.Analysis.Analytic.TaylorInverse +import RealRooted.Mathlib.Probability.Moments.MGFTaylor +import RealRooted.Mathlib.Analysis.Analytic.TaylorSeries +import Mathlib.Tactic.TypeStar + +/-! +# Reciprocal moment-generating germs invert polynomial convolution + +A local reciprocal identity suffices. No global analyticity of the moment- +generating function, additional reality hypothesis on the reciprocal, or +real-rootedness assumption is used. +-/ + +public section + +open Complex Filter MeasureTheory Polynomial ProbabilityTheory Set Topology +open RealRooted.HermitePoulain + +namespace RealRooted + +/-- A real mapped Taylor series identifies the formal and analytic polynomial +operators. This is a coefficient consequence of analyticity at zero only. -/ +private theorem formal_eq_taylor_of_map {f : ℂ → ℂ} (hf : AnalyticAt ℂ f 0) + (A : PowerSeries ℝ) (hA : TauCeti.taylorSeries f 0 = PowerSeries.map ofRealHom A) + (p : ℝ[X]) : formalDifferentialOperator A p = taylorDifferentialOperator f p := by + apply formalDifferentialOperator_eq_taylor + intro k + have h := congrArg Complex.re (congrArg (PowerSeries.coeff k) hA) + rw [hf.coeff_taylorSeries_eq_iteratedDeriv, PowerSeries.coeff_map] at h + simpa only [ofRealHom_eq_coe, ofReal_re] using h.symm + +/-- A germ reciprocal to an actual complex MGF acts as the inverse polynomial +translation-average operator. Its real Taylor coefficients are derived from +the reciprocal identity and the real moment coefficients, not assumed. -/ +theorem integral_eval_taylorDifferentialOperator_reciprocal + {Ω : Type*} [MeasurableSpace Ω] {mu : Measure Ω} {Y : Ω → ℝ} {f : ℂ → ℂ} + (h0 : 0 ∈ interior (integrableExpSet Y mu)) (hf : AnalyticAt ℂ f 0) + (hrecip : (fun z => complexMGF Y mu z * f z) =ᶠ[𝓝 0] fun _ => 1) + (p : ℝ[X]) (x : ℝ) : + (∫ w, (taylorDifferentialOperator f p).eval (x + Y w) ∂mu) = p.eval x := by + let A : PowerSeries ℝ := PowerSeries.mk fun k => (∫ w, Y w ^ k ∂mu) / k.factorial + have hg : AnalyticAt ℂ (complexMGF Y mu) 0 := + analyticAt_complexMGF (by simpa only [zero_re] using h0) + have hA : TauCeti.taylorSeries (complexMGF Y mu) 0 = PowerSeries.map ofRealHom A := + taylorSeries_complexMGF_zero h0 + obtain ⟨hA0, hF⟩ := hf.taylorSeries_eq_map_inv_of_mul_eq_one hg ofRealHom A hA + (by simpa only [mul_comm] using hrecip) + rw [← taylorDifferentialOperator_complexMGF_eval h0, + ← formal_eq_taylor_of_map hf A⁻¹ hF, + ← formal_eq_taylor_of_map hg A hA, + ← formalDifferentialOperator_mul, PowerSeries.mul_inv_cancel A hA0, + formalDifferentialOperator_one] + +/-- The reciprocal of a one-sided Laplace germ inverts polynomial convolution. +Support and PF assumptions belong to the subsequent root-location theorem, +not to this analytic and algebraic identity. -/ +theorem integral_eval_taylorDifferentialOperator_laplace + {Ω : Type*} [MeasurableSpace Ω] {mu : Measure Ω} {T : Ω → ℝ} {f : ℂ → ℂ} + (h0 : 0 ∈ interior (integrableExpSet (fun w => -T w) mu)) + (hf : AnalyticAt ℂ f 0) + (hrecip : (fun z => (∫ w, exp (-z * (T w : ℂ)) ∂mu) * f z) + =ᶠ[𝓝 0] fun _ => 1) (p : ℝ[X]) (x : ℝ) : + (∫ w, (taylorDifferentialOperator f p).eval (x - T w) ∂mu) = p.eval x := by + have hrecip' : (fun z => complexMGF (fun w => -T w) mu z * f z) + =ᶠ[𝓝 0] fun _ => 1 := by + simpa only [complexMGF, ofReal_neg, mul_neg, neg_mul] using hrecip + simpa only [sub_eq_add_neg] using + integral_eval_taylorDifferentialOperator_reciprocal h0 hf hrecip' p x + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/RootDivision.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/RootDivision.lean new file mode 100644 index 000000000..bb9d2517b --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/RootDivision.lean @@ -0,0 +1,112 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Calculus.DSlope +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import Mathlib.Analysis.Complex.RemovableSingularity + +/-! +# Removing real factors from Laguerre–Pólya functions + +Division by an actual real zero preserves the Laguerre–Pólya class, without +any order-of-growth restriction. The proof removes the corresponding factor +from each Jensen polynomial, rather than assuming a canonical product. +-/ + +public section + +open Polynomial Complex +open scoped ComplexConjugate + +namespace RealRooted + +/-- Conjugation symmetry descends through multiplication by the variable. -/ +private theorem conj_of_id_mul {g : ℂ → ℂ} (hg : Continuous g) + (hconj : ∀ z, conj z * g (conj z) = conj (z * g z)) : + ∀ z, g (conj z) = conj (g z) := by + have heq : (fun z => g (conj z)) = fun z => conj (g z) := by + apply Continuous.ext_on (dense_compl_singleton (0 : ℂ)) + (hg.comp continuous_conj) (continuous_conj.comp hg) + intro z hz + have hz0 : z ≠ 0 := by simpa using hz + have hc := hconj z + rw [map_mul] at hc + have hcz : conj z ≠ 0 := by simpa using hz0 + exact mul_left_cancel₀ hcz hc + exact fun z => congrFun heq z + +/-- The Jensen polynomial of `z g(z)` is a scalar times `X` times the +preceding-degree Jensen polynomial of `g`. -/ +theorem jensenPolynomial_id_mul {g : ℂ → ℂ} (hg : Differentiable ℂ g) (d : ℕ) : + jensenPolynomial (d + 1) (fun k => (iteratedDeriv k (fun z => z * g z) 0).re) = + C (d + 1 : ℝ) * (X * jensenPolynomial d (fun k => (iteratedDeriv k g 0).re)) := by + have hder (k : ℕ) : + iteratedDeriv (k + 1) (fun z => z * g z) 0 = (k + 1 : ℂ) * iteratedDeriv k g 0 := by + rw [iteratedDeriv_fun_mul (by fun_prop) hg.contDiff.contDiffAt] + simp [iteratedDeriv_fun_id_zero, mul_ite, ite_mul] + ext k + cases k with + | zero => simp + | succ k => + simp only [coeff_jensenPolynomial, coeff_C_mul, coeff_X_mul, hder] + by_cases hk : k ≤ d + · rw [ite_eq_left (by lia), ite_eq_left hk] + have hchoose : ((d + 1).choose (k + 1) : ℝ) * (k + 1) = + (d + 1 : ℝ) * (d.choose k : ℝ) := by + exact_mod_cast (Nat.add_one_mul_choose_eq d k).symm + simp only [mul_re, add_re, natCast_re, one_re, add_im, natCast_im, one_im, + add_zero, zero_mul, sub_zero] + linear_combination (iteratedDeriv k g 0).re * hchoose + · rw [ite_eq_right (by lia), ite_eq_right hk, mul_zero] + +/-- Removing a variable factor from an entire LP function preserves the class. -/ +theorem IsLaguerrePolya.of_id_mul {g : ℂ → ℂ} + (h : IsLaguerrePolya (fun z => z * g z)) (hg : Differentiable ℂ g) : + IsLaguerrePolya g := by + have hconj := conj_of_id_mul hg.continuous h.conj + apply (isLaguerrePolya_iff_jensenPolynomial_splits hg + (fun k => (ofReal_re_iteratedDeriv_zero hconj k).symm)).mpr + intro d + have hs := h.jensenPolynomial_splits (d + 1) + rw [jensenPolynomial_id_mul hg] at hs + have hc : (C (d + 1 : ℝ) : ℝ[X]) ≠ 0 := C_ne_zero.mpr (by positivity) + exact splits_X_mul.mp ((splits_mul_iff_right hc (Splits.C _)).mp hs) + +/-- Removing any real linear factor from an entire LP function preserves the class. -/ +theorem IsLaguerrePolya.of_sub_mul {g : ℂ → ℂ} (r : ℝ) + (h : IsLaguerrePolya (fun z => (z - r) * g z)) (hg : Differentiable ℂ g) : + IsLaguerrePolya g := by + have hs : IsLaguerrePolya (fun z => z * g (z + r)) := by + simpa using h.comp_affine_real 1 r + have hdiv := hs.of_id_mul (hg.comp (by fun_prop)) + simpa using hdiv.comp_affine_real 1 (-r) + +/-- Any power of a real linear factor can be removed from an entire LP function. -/ +theorem IsLaguerrePolya.of_sub_pow_mul {g : ℂ → ℂ} (r : ℝ) (m : ℕ) + (h : IsLaguerrePolya (fun z => (z - r) ^ m * g z)) (hg : Differentiable ℂ g) : + IsLaguerrePolya g := by + induction m with + | zero => simpa using h + | succ m ih => + have hs : IsLaguerrePolya (fun z => (z - r) * ((z - r) ^ m * g z)) := by + convert h using 1 + funext z + ring + exact ih (hs.of_sub_mul r (by fun_prop)) + +/-- Dividing by an actual real zero, with the removable value filled by the +derivative, preserves LP without any growth hypothesis. -/ +theorem IsLaguerrePolya.dslope_of_eq_zero {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + {r : ℝ} (hr : f r = 0) : IsLaguerrePolya (dslope f (r : ℂ)) := by + have hd : Differentiable ℂ (dslope f (r : ℂ)) := + differentiableOn_univ.mp ((differentiableOn_dslope (by simp)).mpr + hf.differentiable.differentiableOn) + apply IsLaguerrePolya.of_sub_mul r _ hd + convert hf using 1 + funext z + simpa only [smul_eq_mul] using sub_smul_dslope_of_zero hr z + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignLogDerivativeHierarchy.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignLogDerivativeHierarchy.lean new file mode 100644 index 000000000..0ec020188 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignLogDerivativeHierarchy.lean @@ -0,0 +1,66 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +public import TauCeti.Analysis.CompletelyMonotone.Basic +import Mathlib.Analysis.Calculus.LogDeriv +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHierarchy +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignTypeI + +/-! +# Same-sign Taylor data and the logarithmic-derivative hierarchy + +Zhang's Theorem 1 assumes a real entire function of order below one, +negative zeros, and `a₀ aₙ > 0` for its Taylor coefficients. The coefficient +condition is written here using the actual derivatives divided by `n!`. +Multiplying by the nonzero real value at zero normalizes the sign and +leaves all logarithmic derivatives unchanged. The argument works more +generally at order at most one when all zeros are real. +-/ + +public section + +open scoped ComplexConjugate + +namespace RealRooted + +/-- Same-sign Taylor coefficients normalize a real entire function with +real zeros to Type-I, giving the complete signed derivative hierarchy. -/ +theorem isCompletelyMonotoneOnIoi_weighted_logDeriv_of_sameSign + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f 1) + (hconj : ∀ z, f (conj z) = conj (f z)) + (hzeros : ∀ z, f z = 0 → z.im = 0) + (hsign : ∀ n : ℕ, 0 < (f 0).re * + ((iteratedDeriv n f 0).re / (n.factorial : ℝ))) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ + y ^ (k + m) * iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x) := by + obtain ⟨h0, c, hc, htype⟩ := exists_real_const_mul_isLaguerrePolyaTypeI_of_sameSign + hf horder hconj hzeros hsign + have hcc : (c : ℂ) ≠ 0 := by exact_mod_cast hc + have hn0 : (fun z : ℂ ↦ (c : ℂ) * f z) 0 ≠ 0 := mul_ne_zero hcc h0 + have hlog : logDeriv (fun z : ℂ ↦ (c : ℂ) * f z) = logDeriv f := + funext fun z ↦ logDeriv_const_mul z (c : ℂ) hcc + simpa only [hlog] using htype.isCompletelyMonotoneOnIoi_weighted_logDeriv hn0 k m + +/-- Zhang's strict order-below-one and negative-zero hypotheses imply +the actual two-index derivative family from his Theorem 1. -/ +theorem isCompletelyMonotoneOnIoi_weighted_logDeriv_of_negZeros + {f : ℂ → ℂ} {rho : ℝ} (hf : Differentiable ℂ f) + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hconj : ∀ z, f (conj z) = conj (f z)) + (hzeros : ∀ z, f z = 0 → z.im = 0 ∧ z.re < 0) + (hsign : ∀ n : ℕ, 0 < (f 0).re * + ((iteratedDeriv n f 0).re / (n.factorial : ℝ))) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ + y ^ (k + m) * iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x) := + isCompletelyMonotoneOnIoi_weighted_logDeriv_of_sameSign hf (horder.mono hrho.le) + hconj (fun z hz ↦ (hzeros z hz).1) hsign k m + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignNativeWeightedHeat.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignNativeWeightedHeat.lean new file mode 100644 index 000000000..726ee4746 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignNativeWeightedHeat.lean @@ -0,0 +1,63 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +public import TauCeti.Analysis.Complex.GrowthOrder +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignTypeI +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeWeightedHeatHierarchy +import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTraceScale + +/-! +# The weighted native integral identities under Zhang's source hypotheses + +Either common sign of the real Taylor coefficients is allowed. The shared +Type-I normalization changes neither the logarithmic derivative nor the +actual native divisor heat trace. The order-below-one hypothesis removes +the exponential factor rather than postulating a pure product. +-/ + +public section + +open Complex MeasureTheory Set +open scoped ComplexConjugate + +namespace RealRooted + +/-- Zhang's negative-zero and strict same-sign Taylor assumptions imply +both native weighted-heat and Laguerre integral identities. -/ +theorem native_weighted_heatTrace_logDeriv_of_sameSign + {f : ℂ → ℂ} {rho : ℝ} (hf : Differentiable ℂ f) + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hconj : ∀ z, f (conj z) = conj (f z)) + (hzeros : ∀ z, f z = 0 → z.im = 0 ∧ z.re < 0) + (hsign : ∀ n : ℕ, 0 < (f 0).re * + ((iteratedDeriv n f 0).re / (n.factorial : ℝ))) + (k m : ℕ) {x : ℝ} (hx : 0 < x) : + (IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace f) t) (Ioi 0) ∧ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x = + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace f) t) ∧ + (IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * Complex.zeroHeatTrace f t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) (Ioi 0) ∧ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x = + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * Complex.zeroHeatTrace f t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) := by + obtain ⟨h0, c, hc, htype⟩ := exists_real_const_mul_isLaguerrePolyaTypeI_of_sameSign + hf (horder.mono hrho.le) hconj (fun z hz ↦ (hzeros z hz).1) hsign + have hcc : (c : ℂ) ≠ 0 := by exact_mod_cast hc + have hn0 : (fun z : ℂ ↦ (c : ℂ) * f z) 0 ≠ 0 := mul_ne_zero hcc h0 + have h := htype.native_weighted_heatTrace_logDeriv hn0 (horder.const_mul (c : ℂ)) hrho k m hx + have hlog : logDeriv (fun z : ℂ ↦ (c : ℂ) * f z) = logDeriv f := + funext fun z ↦ logDeriv_const_mul z (c : ℂ) hcc + simpa only [hlog, Complex.zeroHeatTrace_const_mul hcc] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignSeriesLogHierarchy.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignSeriesLogHierarchy.lean new file mode 100644 index 000000000..021b8f083 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignSeriesLogHierarchy.lean @@ -0,0 +1,52 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import TauCeti.Analysis.Complex.GrowthOrder +public import TauCeti.Analysis.CompletelyMonotone.Basic +import Mathlib.Analysis.Calculus.LogDeriv +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignLogDerivativeHierarchy +import RealRooted.Mathlib.Analysis.Complex.RealSeries +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Zhang's same-sign series hypotheses + +The actual real coefficient expansion from equation (1.1), together with +entirety, order below one and negative zeros, implies the two-index +complete-monotonicity conclusion. Conjugation symmetry and canonical +Taylor coefficients are derived from the supplied series rather than +being extra assumptions. A germ at zero suffices for an entire function. +-/ + +public section + +open Filter Topology + +namespace RealRooted + +/-- The real-series formulation of Zhang's Theorem 1, including either +common coefficient sign and all nonnegative hierarchy indices. -/ +theorem isCompletelyMonotoneOnIoi_weighted_logDeriv_of_series + {f : ℂ → ℂ} {a : ℕ → ℝ} {rho : ℝ} (hf : Differentiable ℂ f) + (hseries : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n : ℕ ↦ (a n : ℂ) * z ^ n) (f z)) + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hzeros : ∀ z : ℂ, f z = 0 → z.im = 0 ∧ z.re < 0) + (hsign : ∀ n : ℕ, 0 < a 0 * a n) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x) := by + have hc := Complex.re_iteratedDeriv_div_factorial_eq_of_hasSum (hf.analyticAt 0) hseries + have hc0 : (f 0).re = a 0 := by + simpa only [iteratedDeriv_zero, Nat.factorial_zero, Nat.cast_one, div_one] using hc 0 + apply isCompletelyMonotoneOnIoi_weighted_logDeriv_of_negZeros hf horder hrho + (Complex.conj_of_real_hasSum_germ hf hseries) hzeros + intro n + rw [hc0, hc n] + exact hsign n + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignSeriesNativeWeightedHeat.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignSeriesNativeWeightedHeat.lean new file mode 100644 index 000000000..0e6070a0c --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignSeriesNativeWeightedHeat.lean @@ -0,0 +1,63 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +public import TauCeti.Analysis.Complex.GrowthOrder +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignNativeWeightedHeat +import RealRooted.Mathlib.Analysis.Complex.RealSeries +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# The supplied-real-series form of Zhang's weighted heat identities + +The genuine real coefficient series, entirety, order below one, negative +zeros and strict common coefficient sign give both weighted native integrals. +Canonical Taylor coefficients and conjugation symmetry are derived from +the supplied germ, so they are not additional assumptions. +-/ + +public section + +open Complex Filter MeasureTheory Set Topology + +namespace RealRooted + +/-- The exact supplied-real-series hypotheses yield both native integral +representations, for either coefficient sign and every hierarchy index. -/ +theorem native_weighted_heatTrace_logDeriv_of_series + {f : ℂ → ℂ} {a : ℕ → ℝ} {rho : ℝ} (hf : Differentiable ℂ f) + (hseries : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n : ℕ ↦ (a n : ℂ) * z ^ n) (f z)) + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) + (hzeros : ∀ z : ℂ, f z = 0 → z.im = 0 ∧ z.re < 0) + (hsign : ∀ n : ℕ, 0 < a 0 * a n) + (k m : ℕ) {x : ℝ} (hx : 0 < x) : + (IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace f) t) (Ioi 0) ∧ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x = + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace f) t) ∧ + (IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * Complex.zeroHeatTrace f t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) (Ioi 0) ∧ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x = + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * Complex.zeroHeatTrace f t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) := by + have hc := Complex.re_iteratedDeriv_div_factorial_eq_of_hasSum (hf.analyticAt 0) hseries + have hc0 : (f 0).re = a 0 := by + simpa only [iteratedDeriv_zero, Nat.factorial_zero, Nat.cast_one, div_one] using hc 0 + have hsign' : ∀ n : ℕ, 0 < (f 0).re * + ((iteratedDeriv n f 0).re / (n.factorial : ℝ)) := by + intro n + rw [hc0, hc n] + exact hsign n + exact native_weighted_heatTrace_logDeriv_of_sameSign hf horder hrho + (Complex.conj_of_real_hasSum_germ hf hseries) hzeros hsign' k m hx + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignTypeI.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignTypeI.lean new file mode 100644 index 000000000..f5ee01b34 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SameSignTypeI.lean @@ -0,0 +1,64 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Hadamard +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeICriterion +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Tactic.Ring + +/-! +# Type-I normalization of same-sign real Taylor data + +A real entire function with real zeros and order at most one becomes +Type-I after multiplication by a nonzero real constant if its actual Taylor +coefficients have one strict common sign. The scalar need not be positive. +This shared normalization supplies both differential and native heat +applications of Zhang's same-sign source hypotheses. +-/ + +public section + +open scoped ComplexConjugate + +namespace RealRooted + +/-- A nonzero real scalar normalizes strict same-sign Taylor coefficients +to the Type-I convention, without changing logarithmic derivatives or zeros. -/ +theorem exists_real_const_mul_isLaguerrePolyaTypeI_of_sameSign + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (horder : TauCeti.OrderLE f 1) + (hconj : ∀ z, f (conj z) = conj (f z)) + (hzeros : ∀ z, f z = 0 → z.im = 0) + (hsign : ∀ n : ℕ, 0 < (f 0).re * + ((iteratedDeriv n f 0).re / (n.factorial : ℝ))) : + f 0 ≠ 0 ∧ ∃ c : ℝ, c ≠ 0 ∧ IsLaguerrePolyaTypeI (fun z : ℂ ↦ (c : ℂ) * f z) := by + let c : ℝ := (f 0).re + have hc : c ≠ 0 := by + intro hc0 + have h := hsign 0 + simp only [iteratedDeriv_zero, Nat.factorial_zero, Nat.cast_one, div_one] at h + change 0 < c * c at h + simp [hc0] at h + have h0 : f 0 ≠ 0 := by + intro hn + exact hc (by simp [c, hn]) + refine ⟨h0, c, hc, ?_⟩ + have hLP := (isLaguerrePolya_of_orderLE_one horder hf h0 hconj hzeros).const_mul_real c + apply hLP.isLaguerrePolyaTypeI_of_nonneg + intro n + rw [iteratedDeriv_const_mul_field] + simp only [Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero] + have h := hsign n + have hn : (0 : ℝ) < (n.factorial : ℝ) := by positivity + dsimp [c] + have heq : (f 0).re * ((iteratedDeriv n f 0).re / (n.factorial : ℝ)) = + ((f 0).re * (iteratedDeriv n f 0).re) / (n.factorial : ℝ) := by ring + rw [heq] at h + exact ((div_pos_iff_of_pos_right hn).mp h).le + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedMomentAtoms.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedMomentAtoms.lean new file mode 100644 index 000000000..4d20ab192 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedMomentAtoms.lean @@ -0,0 +1,105 @@ +module + +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Analytic.Order +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentResidues +import RealRooted.Mathlib.MeasureTheory.Measure.SortedAtomicMeasure +import Mathlib.Analysis.Analytic.Uniqueness +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# Sorted atoms of entire logarithmic-derivative moment measures + +The atomic moment measure is carried by zero and by positive slopes whose +negative reciprocals are actual zeros, with each multiplicity the natural +analytic order. Sorting this support gives the finite and infinite cases of +Sokal's Proposition 6(c). Its uniqueness is supplied separately by the existing +logarithmic-moment uniqueness theorem. +-/ + +public section + +open Complex MeasureTheory Set +open scoped ComplexConjugate NNReal + +namespace RealRooted + +/-- A nonzero entire function has finite nonzero natural order at each zero. -/ +private theorem order_ne_zero_of_eq_zero {f : ℂ → ℂ} + (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) {z : ℂ} (hz : f z = 0) : + analyticOrderNatAt f z ≠ 0 := by + have ha : AnalyticOnNhd ℂ f univ := fun w _ ↦ hf.analyticAt w + have hfin := ha.analyticOrderAt_ne_top_of_isPreconnected isPreconnected_univ + (x := 0) (y := z) (mem_univ _) (mem_univ _) + (by rw [(hf.analyticAt 0).analyticOrderAt_eq_zero.mpr h0]; simp) + have hn := (hf.analyticAt z).analyticOrderAt_ne_zero.mpr hz + simpa only [analyticOrderNatAt, ne_eq, ENat.toNat_eq_zero, not_or] using And.intro hn hfin + +/-- The moment measure is carried by the exponential atom and the actual +positive-multiplicity reciprocal roots. The natural order is not totalized at +infinite order because the entire function is nonzero at zero. -/ +theorem ae_zero_or_order_ne_zero_of_logDeriv_integral + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ a : ℝ≥0, (1 + z * ((a : ℝ) : ℂ))⁻¹ ∂mu) : + ∀ᵐ a : ℝ≥0 ∂mu, a = 0 ∨ analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) ≠ 0 := by + filter_upwards [ae_zero_or_reciprocal_zero_of_logDeriv_integral hf hc mu hlog] + with a ha + exact ha.imp_right (order_ne_zero_of_eq_zero hf h0) + +/-- Infinitely many reciprocal roots have a strictly decreasing enumeration; +the moment mass at each slope is the slope times its actual zero multiplicity. -/ +theorem exists_strictAnti_logDeriv_atoms_of_infinite + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ a : ℝ≥0, (1 + z * ((a : ℝ) : ℂ))⁻¹ ∂mu) + (hinf : {a : ℝ≥0 | a ≠ 0 ∧ + analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) ≠ 0}.Infinite) : + ∃ a : ℕ → ℝ≥0, StrictAnti a ∧ (∀ i, a i ≠ 0 ∧ + analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) ≠ 0) ∧ + Summable (fun i ↦ (a i : ℝ)) ∧ + Summable (fun i ↦ (a i : ℝ) * + (analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) ∧ + mu = mu {0} • Measure.dirac 0 + Measure.sum (fun i ↦ ENNReal.ofReal + ((a i : ℝ) * (analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) • + Measure.dirac (a i)) ∧ + range a = {a : ℝ≥0 | a ≠ 0 ∧ + analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) ≠ 0} := by + exact mu.exists_strictAnti_atomic_representation_of_infinite + (fun a ↦ analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ)) + (fun a ha ↦ measureReal_singleton_eq_mul_order_of_logDeriv_integral hf h0 mu hlog ha) + (ae_zero_or_order_ne_zero_of_logDeriv_integral hf h0 hc mu hlog) hinf + +/-- Finitely many reciprocal roots have a strictly decreasing finite enumeration; +the empty enumeration gives the pure exponential case. -/ +theorem exists_fin_strictAnti_logDeriv_atoms_of_finite + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ a : ℝ≥0, (1 + z * ((a : ℝ) : ℂ))⁻¹ ∂mu) + (hfin : {a : ℝ≥0 | a ≠ 0 ∧ + analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) ≠ 0}.Finite) : + ∃ n : ℕ, ∃ a : Fin n → ℝ≥0, StrictAnti a ∧ (∀ i, a i ≠ 0 ∧ + analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) ≠ 0) ∧ + Summable (fun i ↦ (a i : ℝ)) ∧ + Summable (fun i ↦ (a i : ℝ) * + (analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) ∧ + mu = mu {0} • Measure.dirac 0 + Measure.sum (fun i ↦ ENNReal.ofReal + ((a i : ℝ) * (analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) • + Measure.dirac (a i)) ∧ + range a = {a : ℝ≥0 | a ≠ 0 ∧ + analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ) ≠ 0} := by + exact mu.exists_fin_strictAnti_atomic_representation_of_finite + (fun a ↦ analyticOrderNatAt f ((-(a : ℝ)⁻¹ : ℝ) : ℂ)) + (fun a ha ↦ measureReal_singleton_eq_mul_order_of_logDeriv_integral hf h0 mu hlog ha) + (ae_zero_or_order_ne_zero_of_logDeriv_integral hf h0 hc mu hlog) hfin + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedMomentCriterion.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedMomentCriterion.lean new file mode 100644 index 000000000..3ca464b25 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedMomentCriterion.lean @@ -0,0 +1,101 @@ +module + +import Mathlib.MeasureTheory.Measure.Real +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.Analysis.Calculus.LogDeriv +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.Complex.Exponential +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.MeasureTheory.Measure.Dirac.Basic +import Mathlib.Topology.Algebra.InfiniteSum.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SortedProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentResidues +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.MomentContinuation +import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeMomentTransform +import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeAtomicMap +import Mathlib.Analysis.Complex.CauchyIntegral + +/-! +# The sorted atomic logarithmic-moment criterion + +Genuine moments of the actual complex logarithmic coefficients give the sorted +atomic measure and the corresponding entire product. The scalar `f(0)` may be +any nonzero complex number. No growth or reality assumption is added. + +Together with the checked normalized Type-I criterion and moment-measure +uniqueness, this is Sokal (2022), Proposition 6(c), equation (7): +https://doi.org/10.1016/j.jmaa.2022.126432. Finite and empty root sets are included +by zero-multiplicity padding of a strictly decreasing summable positive sequence. +-/ + +public section + +open Complex MeasureTheory Set +open scoped NNReal + +namespace RealRooted + +/-- The same strictly decreasing positive sequence represents the original +moment measure and the entire function, with actual natural zero multiplicities. +Finite and empty supports use zero multiplicities at the padded slopes. -/ +theorem exists_strictAnti_factorization_of_logDeriv_moments + {f : ℂ → ℂ} {mu : Measure ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + ∃ a : ℕ → ℝ≥0, StrictAnti a ∧ (∀ i, 0 < a i) ∧ + Summable (fun i ↦ (a i : ℝ)) ∧ + Summable (fun i ↦ (a i : ℝ) * + (analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) ∧ + mu = ENNReal.ofReal (mu.real {0}) • Measure.dirac 0 + Measure.sum (fun i ↦ ENNReal.ofReal + ((a i : ℝ) * (analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) • + Measure.dirac (a i : ℝ)) ∧ + ∀ z : ℂ, HasProd (fun i ↦ (1 + ((a i : ℝ) : ℂ) * z) ^ + analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ)) + (f z / (f 0 * exp ((mu.real {0} : ℂ) * z))) ∧ + f z = f 0 * exp ((mu.real {0} : ℂ) * z) * ∏' i, + (1 + ((a i : ℝ) : ℂ) * z) ^ analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) := by + have : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hint 0) + let F : ℂ → ℂ := fun z ↦ f z / f 0 + let nu : Measure ℝ≥0 := mu.map Real.toNNReal + have hF : Differentiable ℂ F := hf.div_const (f 0) + have hF0 : F 0 = 1 := div_self h0 + have hF0n : F 0 ≠ 0 := by simp only [hF0, ne_eq, one_ne_zero, not_false_eq_true] + have hFD : logDeriv F = logDeriv f := by + funext z + simpa only [F, div_eq_mul_inv] using + logDeriv_mul_const (f := f) z (f 0)⁻¹ (inv_ne_zero h0) + obtain ⟨heq, hne⟩ := hf.eqOn_logDeriv_integral_inv_of_moments h0 hpos hint hmom + have hFn : ∀ z ∈ slitPlane, F z ≠ 0 := fun z hz ↦ div_ne_zero (hne z hz) h0 + have hlogF : EqOn (logDeriv F) + (fun z ↦ ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂nu) slitPlane := by + intro z hz + rw [hFD, heq hz] + exact (Measure.integral_inv_one_add_mul_map_toNNReal hpos z).symm + have hFc := conj_of_logDeriv_integral hF hF0 nu hFn hlogF + have hH : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, z ∈ slitPlane := + fun z hz ↦ mem_slitPlane_iff.mpr (Or.inr (ne_of_gt hz)) + obtain ⟨a, ha, hapos, hs, hms, hnu, hprod⟩ := + exists_strictAnti_logDeriv_factorization hF hF0n hFc nu + (fun z hz ↦ hFn z (hH z hz)) (fun z hz ↦ hlogF (hH z hz)) + have hord (z : ℂ) : analyticOrderNatAt F z = analyticOrderNatAt f z := by + simpa only [F, div_eq_mul_inv, Pi.mul_def] using + analyticOrderNatAt_mul_const (hf.analyticAt z) (inv_ne_zero h0) + simp_rw [hord] at hms hnu hprod + have hnu0 : nu {0} = mu {0} := Measure.map_toNNReal_singleton_zero_of_ae_nonneg hpos + have hatom : nu.real {0} = mu.real {0} := congrArg ENNReal.toReal hnu0 + have hmu := Measure.eq_atomic_of_map_toNNReal_eq hpos hnu + rw [hnu0, ← ofReal_measureReal] at hmu + refine ⟨a, ha, hapos, hs, hms, hmu, fun z ↦ ?_⟩ + have hp : HasProd (fun i ↦ (1 + ((a i : ℝ) : ℂ) * z) ^ + analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ)) + (f z / (f 0 * exp ((mu.real {0} : ℂ) * z))) := by + simpa only [hF0, one_mul, hatom, F, div_div] using (hprod z).1 + refine ⟨hp, ?_⟩ + have heq := (eq_div_iff (mul_ne_zero h0 (exp_ne_zero _))).mp hp.tprod_eq + simpa only [mul_comm] using heq.symm + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedProduct.lean new file mode 100644 index 000000000..9696c1d8c --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/SortedProduct.lean @@ -0,0 +1,94 @@ +module + +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.CStarAlgebra.Classes +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentTypeI +public import Mathlib.Analysis.Analytic.Order +import Mathlib.Analysis.Complex.Exponential +import Mathlib.Topology.Algebra.InfiniteSum.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentResidues +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SortedMomentAtoms +import RealRooted.Mathlib.MeasureTheory.Measure.SortedAtomicSequence + +/-! +# Sorted distinct-root products and their moment measures + +The actual reciprocal-root product is reindexed along a strictly decreasing +sequence of positive slopes. Finite and empty zero sets use extra slopes of +multiplicity zero. The same sequence gives the entire product and the exact +moment measure, with the genuine product limit recorded at every complex point. +-/ + +public section + +open Complex MeasureTheory Set +open scoped ComplexConjugate NNReal + +namespace RealRooted + +/-- An injective positive family covering all nontrivial reciprocal-root factors +preserves the genuine product limit. Additional zero-multiplicity slopes are allowed. -/ +theorem hasProd_pow_order_comp_of_logDeriv_integral {ι : Type*} + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hne : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, f z ≠ 0) + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) + {a : ι → ℝ≥0} (hi : Function.Injective a) (ha : ∀ i, a i ≠ 0) + (hcover : {x : ℝ≥0 | x ≠ 0 ∧ + analyticOrderNatAt f ((-(x : ℝ)⁻¹ : ℝ) : ℂ) ≠ 0} ⊆ range a) (z : ℂ) : + HasProd (fun i ↦ (1 + ((a i : ℝ) : ℂ) * z) ^ + analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ)) + (f z / (f 0 * exp ((mu.real {0} : ℂ) * z))) := by + let g : ι → {x : ℝ≥0 // x ≠ 0} := fun i ↦ ⟨a i, ha i⟩ + have hgi : Function.Injective g := fun i j h ↦ hi (congrArg Subtype.val h) + have hout (x : {x : ℝ≥0 // x ≠ 0}) (hx : x ∉ range g) : + (1 + ((x : ℝ) : ℂ) * z) ^ analyticOrderNatAt f ((-(x : ℝ)⁻¹ : ℝ) : ℂ) = 1 := by + have hm : analyticOrderNatAt f ((-(x : ℝ)⁻¹ : ℝ) : ℂ) = 0 := by + by_contra hm + obtain ⟨i, hi⟩ := hcover ⟨x.property, hm⟩ + exact hx ⟨i, Subtype.ext hi⟩ + rw [hm, pow_zero] + exact (hgi.hasProd_iff hout).mpr + (hasProd_pow_order_of_logDeriv_integral hf hf0 hc mu hne hlog z) + +/-- A finite moment transform for an entire logarithmic derivative gives a +single sorted sequence representing both the exact measure and the entire +function. Multiplicities are actual analytic orders; zero padding covers finite +and empty root sets. No growth bound is assumed. -/ +theorem exists_strictAnti_logDeriv_factorization + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (hf0 : f 0 ≠ 0) + (hc : ∀ z, f (conj z) = conj (f z)) + (mu : Measure ℝ≥0) [IsFiniteMeasure mu] + (hne : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, f z ≠ 0) + (hlog : ∀ z ∈ UpperHalfPlane.upperHalfPlaneSet, + logDeriv f z = ∫ x : ℝ≥0, (1 + z * ((x : ℝ) : ℂ))⁻¹ ∂mu) : + ∃ a : ℕ → ℝ≥0, StrictAnti a ∧ (∀ i, 0 < a i) ∧ + Summable (fun i ↦ (a i : ℝ)) ∧ + Summable (fun i ↦ (a i : ℝ) * + (analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) ∧ + mu = mu {0} • Measure.dirac 0 + Measure.sum (fun i ↦ ENNReal.ofReal + ((a i : ℝ) * (analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) : ℝ)) • + Measure.dirac (a i)) ∧ + ∀ z : ℂ, HasProd (fun i ↦ (1 + ((a i : ℝ) : ℂ) * z) ^ + analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ)) + (f z / (f 0 * exp ((mu.real {0} : ℂ) * z))) ∧ + f z = f 0 * exp ((mu.real {0} : ℂ) * z) * ∏' i, + (1 + ((a i : ℝ) : ℂ) * z) ^ analyticOrderNatAt f ((-(a i : ℝ)⁻¹ : ℝ) : ℂ) := by + obtain ⟨a, ha, hpos, hs, hms, hmu, hcover⟩ := + mu.exists_strictAnti_atomic_representation + (fun x ↦ analyticOrderNatAt f ((-(x : ℝ)⁻¹ : ℝ) : ℂ)) + (fun x hx ↦ measureReal_singleton_eq_mul_order_of_logDeriv_integral hf hf0 mu hlog hx) + (ae_zero_or_order_ne_zero_of_logDeriv_integral hf hf0 hc mu hlog) + refine ⟨a, ha, hpos, hs, hms, hmu, fun z ↦ ?_⟩ + have hp := hasProd_pow_order_comp_of_logDeriv_integral hf hf0 hc mu hne hlog + ha.injective (fun i ↦ (hpos i).ne') hcover z + refine ⟨hp, ?_⟩ + have heq := (eq_div_iff (mul_ne_zero hf0 (exp_ne_zero _))).mp hp.tprod_eq + simpa only [mul_comm] using heq.symm + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/StieltjesFraction.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/StieltjesFraction.lean new file mode 100644 index 000000000..4ca49ac86 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/StieltjesFraction.lean @@ -0,0 +1,91 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIMomentCriterion +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.MomentCriterion +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Uniqueness + +/-! +# The Type-I continued-fraction criterion + +An entire function nonzero at the origin is positive Type-I after normalization +exactly when its signed logarithmic-derivative Taylor series is the complex +image of a nonnegative real Stieltjes fraction. No reality or growth premise +is imposed on the original function: the formal identity compares its actual +complex coefficients. + +This combines Propositions 6 and 7 of Sokal, "When does a hypergeometric +function pFq belong to the Laguerre–Pólya class LP+?", published p. 5. +The negative-numerator obstruction requires a nonzero outer scalar and no +earlier termination, as explained immediately after Proposition 7. +-/ + +public section + +open Complex MeasureTheory +open scoped PowerSeries + +namespace RealRooted + +/-- The normalized Type-I class is characterized by a nonnegative formal +Stieltjes expansion of the actual complex logarithmic coefficients. -/ +theorem isLaguerrePolyaTypeI_div_iff_stieltjesTail + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) : + IsLaguerrePolyaTypeI (fun z => f z / f 0) ↔ + ∃ (c : ℝ) (a : ℕ → ℝ), 0 ≤ c ∧ (∀ k, 0 ≤ a k) ∧ + PowerSeries.mk (fun k => (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv f) 0 / + k.factorial) = PowerSeries.map (algebraMap ℝ ℂ) + (PowerSeries.C c * PowerSeries.stieltjesTail a 0) := by + constructor + · intro hF + obtain ⟨mu, hpos, hmom⟩ := + (isLaguerrePolyaTypeI_div_iff_logDeriv_moments hf h0).mp hF + obtain ⟨a, ha, hseries⟩ := + PowerSeries.exists_stieltjesTail_of_nonnegative_moments (fun k => (hmom k).1) hpos + refine ⟨mu.real Set.univ, a, measureReal_nonneg, ha, ?_⟩ + rw [← hseries] + ext k + simp only [PowerSeries.coeff_mk, PowerSeries.coeff_map] + exact (hmom k).2 + · rintro ⟨c, a, hc, ha, hseries⟩ + obtain ⟨mu, _, hpos, hmom⟩ := PowerSeries.exists_measure_moments_stieltjesTail a ha hc + apply isLaguerrePolyaTypeI_div_of_logDeriv_moments hf h0 hpos (fun k => (hmom k).1) + intro k + have hk := congrArg (PowerSeries.coeff k) hseries + simp only [PowerSeries.coeff_mk, PowerSeries.coeff_map, PowerSeries.coeff_C_mul] at hk + rw [(hmom k).2] + exact hk + +/-- A negative active Stieltjes numerator excludes the normalized Type-I class. +A zero outer scalar or an earlier zero numerator would hide the negative term. -/ +theorem not_isLaguerrePolyaTypeI_div_of_active_neg + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + {c : ℝ} (hc : c ≠ 0) {a : ℕ → ℝ} {n : ℕ} + (hprefix : ∀ i < n, a i ≠ 0) (hn : a n < 0) + (hseries : PowerSeries.mk (fun k => (-1 : ℂ) ^ k * + iteratedDeriv k (logDeriv f) 0 / k.factorial) = + PowerSeries.map (algebraMap ℝ ℂ) (PowerSeries.C c * PowerSeries.stieltjesTail a 0)) : + ¬ IsLaguerrePolyaTypeI (fun z => f z / f 0) := by + intro hF + obtain ⟨d, b, _, hb, hother⟩ := (isLaguerrePolyaTypeI_div_iff_stieltjesTail hf h0).mp hF + have hreal := PowerSeries.map_injective (algebraMap ℝ ℂ) Complex.ofReal_injective + (hseries.symm.trans hother) + have hcd : c = d := by + have h := congrArg PowerSeries.constantCoeff hreal + simpa only [map_mul, PowerSeries.constantCoeff_C, + PowerSeries.constantCoeff_stieltjesTail, mul_one] using h + subst d + have hC : (PowerSeries.C c : ℝ⟦X⟧) ≠ 0 := by + intro hz + apply hc + simpa only [PowerSeries.constantCoeff_C, map_zero] using + congrArg PowerSeries.constantCoeff hz + apply PowerSeries.stieltjesTail_ne_of_active_neg (s := 0) (t := 0) (n := n) + (by simpa only [Nat.zero_add] using hprefix) (by simpa only [Nat.zero_add] using hn) hb + exact mul_left_cancel₀ hC hreal + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/StrictOperator.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/StrictOperator.lean new file mode 100644 index 000000000..50b12d9c1 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/StrictOperator.lean @@ -0,0 +1,70 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +public import RealRooted.SimpleRoots +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteZeros +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Hermite.PoulainSimple +import RealRooted.SimpleRoots.Reflection +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Strict differential operators from infinitely many LP zeros + +Infinitely many real zeros provide arbitrarily long finite differential +factors. Multiplicity descent then makes every nonzero real-rooted polynomial +input simple. This proves the infinite-zero case of the strict operator +argument of Craven–Csordas (1994), without a growth assumption. +-/ + +public section + +open Polynomial Complex RealRooted.HermitePoulain + +namespace RealRooted + +/-- An LP symbol with infinitely many distinct real zeros and nonzero value +at zero makes every nonzero real-rooted polynomial input simple-real-rooted. -/ +theorem IsLaguerrePolya.simple_operator_of_infinite_zeros {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hinf : Set.Infinite {r : ℝ | f r = 0}) + {p : ℝ[X]} (hp0 : p ≠ 0) (hp : p.Splits) : + IsSimpleRealRooted (taylorDifferentialOperator f p) := by + obtain ⟨q, g, hq, hq0, hdegree, hg, hg0, hfactor⟩ := + hf.exists_polynomial_factor_of_infinite_zeros hf0 hinf (p.natDegree - 1) + have hgre : (g 0).re ≠ 0 := by + intro hz + have hreal := ofReal_re_iteratedDeriv_zero hg.conj 0 + simp only [iteratedDeriv_zero, hz, ofReal_zero] at hreal + exact hg0 hreal.symm + rw [show f = (fun z => (q.map ofRealHom).eval z * g z) from funext hfactor, + taylorDifferentialOperator_polynomial_mul hg.differentiable] + apply isSimpleRealRooted_applyAsDifferentialOperator hq hq0 + (taylorDifferentialOperator_ne_zero hgre hp0) (hg.taylorDifferentialOperator_splits hp) + rw [natDegree_taylorDifferentialOperator hgre hp0, hdegree] + +/-- All Jensen polynomials of an LP symbol with infinitely many distinct +real zeros are simple when its initial coefficient is nonzero. -/ +theorem IsLaguerrePolya.simple_jensen_of_infinite_zeros {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hinf : Set.Infinite {r : ℝ | f r = 0}) (d : ℕ) : + IsSimpleRealRooted (jensenPolynomial d (fun k => (iteratedDeriv k f 0).re)) := by + have hsimple := hf.simple_operator_of_infinite_zeros hf0 hinf + (pow_ne_zero d X_ne_zero) (Splits.X.pow d) + rw [taylorDifferentialOperator_X_pow] at hsimple + have hconst : (jensenPolynomial d (fun k => (iteratedDeriv k f 0).re)).coeff 0 ≠ 0 := by + simp only [coeff_jensenPolynomial, Nat.zero_le, ite_true, Nat.choose_zero_right, + Nat.cast_one, one_mul, iteratedDeriv_zero] + intro hz + have hreal := ofReal_re_iteratedDeriv_zero hf.conj 0 + simp only [iteratedDeriv_zero, hz, ofReal_zero] at hreal + exact hf0 hreal.symm + refine ⟨?_, hf.jensenPolynomial_splits d, + hsimple.2.2.of_reflect hconst (hf.jensenPolynomial_splits d) + (natDegree_jensenPolynomial_le d _)⟩ + intro hz + exact hconst (by simp [hz]) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Strictness.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Strictness.lean new file mode 100644 index 000000000..ac291a4f1 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Strictness.lean @@ -0,0 +1,122 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +public import RealRooted.SimpleRoots +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.StrictOperator +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FiniteGaussian +import RealRooted.Hermite.PolynomialGaussian +import RealRooted.Hermite.PoulainJensenSimple +import RealRooted.SimpleRoots.Reflection +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Strict LP differential operators and simple Jensen roots + +This proves the polynomial-input strict operator theorem and the simple-root +assertion of corrected Craven–Csordas (1994), Proposition 4.1(1), with no +growth restriction. Infinite-zero symbols are handled by multiplicity descent; +finite-zero symbols are polynomial–Gaussian products. + +The exclusions differ: arbitrary-input strictness excludes all polynomial +times exponential symbols, including polynomials. Jensen simplicity excludes +only nonconstant exponential factors; polynomial symbols are included. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- A polynomial–Gaussian factorization with positive Gaussian coefficient +gives a strict operator on nonzero real-rooted polynomial inputs. -/ +private theorem simple_of_polynomial_gaussian {f : ℂ → ℂ} {q p : ℝ[X]} {a b : ℝ} + (hq : q.Splits) (hq0 : q.coeff 0 ≠ 0) (hb : 0 < b) + (hfactor : ∀ z, f z = (q.map ofRealHom).eval z * + exp ((a : ℂ) * z - (b : ℂ) * z ^ 2 / 2)) + (hp0 : p ≠ 0) (hp : p.Splits) : IsSimpleRealRooted (taylorDifferentialOperator f p) := by + have heq : f = fun z => (q.map ofRealHom).eval z * + exp ((a : ℂ) * z + ((-b / 2 : ℝ) : ℂ) * z ^ 2) := by + funext z + rw [hfactor] + congr 2 + push_cast + ring + rw [heq] + exact simple_taylor_polynomial_gaussian hq hq0 a (by linarith) hp0 hp + +/-- An LP symbol nonzero at zero strictly regularizes all nonzero split +polynomial inputs unless it is a polynomial times a real exponential. -/ +theorem IsLaguerrePolya.simple_operator_of_not_exp_polynomial {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hne : ∀ (q : ℝ[X]) (a : ℝ), f ≠ fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) + {p : ℝ[X]} (hp0 : p ≠ 0) (hp : p.Splits) : + IsSimpleRealRooted (taylorDifferentialOperator f p) := by + rcases Set.finite_or_infinite {r : ℝ | f r = 0} with hfin | hinf + · obtain ⟨q, a, b, hq, hq0, hb, hfactor⟩ := + hf.exists_polynomial_gaussian_of_finite_zeros hf0 hfin + have hbpos : 0 < b := by + by_contra hnot + have hb0 : b = 0 := by linarith + apply hne q a + funext z + simpa [hb0] using hfactor z + exact simple_of_polynomial_gaussian hq hq0 hbpos hfactor hp0 hp + · exact hf.simple_operator_of_infinite_zeros hf0 hinf hp0 hp + +/-- Simplicity of the monomial differential image transfers to the Jensen +polynomial even when its final Taylor coefficient vanishes. -/ +private theorem simple_jensen_of_power_image {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) (d : ℕ) + (hsimple : IsSimpleRealRooted (taylorDifferentialOperator f (X ^ d))) : + IsSimpleRealRooted (jensenPolynomial d (fun k => (iteratedDeriv k f 0).re)) := by + rw [taylorDifferentialOperator_X_pow] at hsimple + have hconst : (jensenPolynomial d (fun k => (iteratedDeriv k f 0).re)).coeff 0 ≠ 0 := by + simp only [coeff_jensenPolynomial, Nat.zero_le, ite_true, Nat.choose_zero_right, + Nat.cast_one, one_mul, iteratedDeriv_zero] + intro hz + have hreal := ofReal_re_iteratedDeriv_zero hf.conj 0 + simp only [iteratedDeriv_zero, hz, ofReal_zero] at hreal + exact hf0 hreal.symm + refine ⟨?_, hf.jensenPolynomial_splits d, + hsimple.2.2.of_reflect hconst (hf.jensenPolynomial_splits d) + (natDegree_jensenPolynomial_le d _)⟩ + intro hz + exact hconst (by simp [hz]) + +/-- Corrected Craven–Csordas Proposition 4.1(1), simple-root assertion: +all Jensen polynomials of an LP symbol nonzero at zero are simple unless +the symbol is a polynomial times an exponential of nonzero real slope. -/ +theorem IsLaguerrePolya.simple_jensen_of_not_exp_polynomial {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hf0 : f 0 ≠ 0) + (hne : ∀ (q : ℝ[X]) (a : ℝ), a ≠ 0 → + f ≠ fun z => (q.map ofRealHom).eval z * exp ((a : ℂ) * z)) (d : ℕ) : + IsSimpleRealRooted (jensenPolynomial d (fun k => (iteratedDeriv k f 0).re)) := by + rcases Set.finite_or_infinite {r : ℝ | f r = 0} with hfin | hinf + · obtain ⟨q, a, b, hq, hq0, hb, hfactor⟩ := + hf.exists_polynomial_gaussian_of_finite_zeros hf0 hfin + rcases hb.eq_or_lt with hb0 | hbpos + · have ha : a = 0 := by + by_contra ha + apply hne q a ha + funext z + simpa [← hb0] using hfactor z + have heq : f = fun z => (q.map ofRealHom).eval z := by + funext z + simpa [← hb0, ha] using hfactor z + rw [heq] + have hdata : (fun k => (iteratedDeriv k (fun z => (q.map ofRealHom).eval z) 0).re) = + (fun k => (k.factorial : ℝ) * q.coeff k) := by + funext k + simp [iteratedDeriv_fun_eval, eval_zero_iterate_derivative] + rw [hdata] + exact simple_jensenPolynomial_polynomial hq hq0 d + · exact simple_jensen_of_power_image hf hf0 d + (simple_of_polynomial_gaussian hq hq0 hbpos hfactor + (pow_ne_zero d X_ne_zero) (Splits.X.pow d)) + · exact hf.simple_jensen_of_infinite_zeros hf0 hinf d + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivity.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivity.lean new file mode 100644 index 000000000..7720a2294 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivity.lean @@ -0,0 +1,32 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.PFPolynomial.Closure +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Total positivity of Type-I Laguerre--Pólya Taylor coefficients + +The ordinary Taylor coefficients of a Type-I Laguerre--Pólya function form a +Pólya-frequency sequence. The factorial normalization is essential: these are +the coefficients of the ordinary power series, not its exponential Taylor data. +The proof passes every Toeplitz minor to the limit along PF polynomial approximants. +-/ + +public section + +namespace RealRooted + +/-- Ordinary Taylor coefficients of a Type-I Laguerre--Pólya function form a +Pólya-frequency sequence, so all their Toeplitz minors are nonnegative. -/ +theorem IsLaguerrePolyaTypeI.isPolyaFreqSeq {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) : + IsPolyaFreqSeq (fun k => (iteratedDeriv k f 0).re / k.factorial) := by + obtain ⟨p, hp, hlim⟩ := hf + apply IsPolyaFreqSeq.of_tendsto (fun n => (hp n).to_sequence) + intro k + simpa only [Complex.div_natCast_re] using + Polynomial.tendsto_coeff_of_tendstoLocallyUniformly hlim k + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivityConverse.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivityConverse.lean new file mode 100644 index 000000000..b60908e58 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivityConverse.lean @@ -0,0 +1,152 @@ +module + +public import Mathlib.Analysis.Complex.Exponential + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivity +import RealRooted.EdreiThoma.Converse +import RealRooted.AissenSchoenbergWhitney +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# Entire Pólya-frequency generating functions + +An entire function whose ordinary Taylor coefficients form a Pólya-frequency +sequence belongs to the positive Type-I Laguerre--Pólya class, provided its +constant coefficient is positive. The Edrei representation has no denominator +factors: a positive denominator parameter would give a positive real pole, +whereas the numerator is nonzero there. + +This is the positive-constant case of Theorem C in O. M. Katkova, +*Multiple positivity and the Riemann zeta-function*, arXiv:math/0505174. +The Taylor coefficients must be real; taking only their real parts does not +suffice for the converse. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- An entire identity with an Edrei numerator excludes positive denominator parameters. -/ +private theorem eq_zero_of_mul_prod_sub_eq_exp_mul_prod + {f : ℂ → ℂ} {γ : ℝ} {α β : ℕ → ℝ} + (hα : ∀ i, 0 ≤ α i) (hβ : ∀ i, 0 ≤ β i) (sα : Summable α) + (h : ∀ z, f z * (∏' i, (1 - (β i : ℂ) * z)) = + Complex.exp (γ * z) * ∏' i, (1 + (α i : ℂ) * z)) : + ∀ i, β i = 0 := by + intro i + by_contra hi + let r : ℝ := (β i)⁻¹ + have hr : 0 ≤ r := inv_nonneg.mpr (hβ i) + have hB : (∏' j, (1 - (β j : ℂ) * (r : ℂ))) = 0 := by + apply tprod_of_exists_eq_zero + refine ⟨i, ?_⟩ + simp [r, hi] + have hA : (∏' j, (1 + (α j : ℂ) * (r : ℂ))) ≠ 0 := by + apply tprod_one_add_ne_zero_of_summable + · intro j + have : 0 < 1 + α j * r := add_pos_of_pos_of_nonneg zero_lt_one (mul_nonneg (hα j) hr) + exact_mod_cast this.ne' + · simpa only [norm_mul, norm_real, Real.norm_eq_abs, abs_of_nonneg hr, + abs_of_nonneg (hα _)] using sα.mul_right r + have hz := h (r : ℂ) + rw [hB, mul_zero] at hz + exact (mul_ne_zero (Complex.exp_ne_zero _) hA) hz.symm + +/-- The normalized Edrei germ of an entire function extends to a Type-I product. -/ +private theorem exists_eq_exp_mul_prod_of_normalized + {a : ℕ → ℝ} {f : ℂ → ℂ} (ha : IsPolyaFreqSeq a) (ha0 : a 0 = 1) + (hf : Differentiable ℂ f) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n => (a n : ℂ) * z ^ n) (f z)) : + ∃ (γ : ℝ) (α : ℕ → ℝ), 0 ≤ γ ∧ (∀ i, 0 ≤ α i) ∧ Summable α ∧ + f = fun z => Complex.exp (γ * z) * ∏' i, (1 + (α i : ℂ) * z) := by + obtain ⟨γ, α, β, hγ, hα, hβ, sα, sβ, hrep⟩ := + EdreiThoma.exists_hasSum_edreiFunction ha ha0 + let E : ℂ → ℂ := fun z => Complex.exp (γ * z) * ∏' i, (1 + (α i : ℂ) * z) + let B : ℂ → ℂ := fun z => ∏' i, (1 - (β i : ℂ) * z) + have hE : IsLaguerrePolya E := by + simpa [E] using + (isLaguerrePolyaTypeI_product zero_le_one 0 hγ hα sα).toLaguerrePolya + have hB : Differentiable ℂ B := by + have hplus : IsLaguerrePolya (fun z : ℂ => ∏' i, (1 + (β i : ℂ) * z)) := by + simpa using + (isLaguerrePolyaTypeI_product zero_le_one 0 (σ := 0) le_rfl hβ sβ).toLaguerrePolya + simpa [B, Function.comp_def, sub_eq_add_neg] using + hplus.differentiable.comp differentiable_neg + have hB0 : B 0 ≠ 0 := by simp [B] + have hBne : ∀ᶠ z in 𝓝 (0 : ℂ), B z ≠ 0 := + hB.continuous.continuousAt.eventually_ne hB0 + have hev : (fun z => f z * B z) =ᶠ[𝓝 0] E := by + filter_upwards [hs, hrep, hBne] with z hs hz hBz + have heq : f z = E z / B z := by + simpa [Complex.EdreiThoma.edreiFunction, E, B] using hs.unique hz + exact (eq_div_iff hBz).mp heq + have hid : (fun z => f z * B z) = E := + ((hf.mul hB).differentiableOn.analyticOnNhd isOpen_univ).eq_of_eventuallyEq + hE.analyticOnNhd hev + have hβ0 : ∀ i, β i = 0 := + eq_zero_of_mul_prod_sub_eq_exp_mul_prod hα hβ sα (congrFun hid) + refine ⟨γ, α, hγ, hα, sα, ?_⟩ + simpa [B, E, hβ0] using hid + +/-- An entire function with a real PF generating-series germ and positive constant +coefficient has a Type-I product representation with summable nonnegative slopes. -/ +theorem IsPolyaFreqSeq.exists_eq_const_mul_exp_mul_prod + {a : ℕ → ℝ} {f : ℂ → ℂ} (ha : IsPolyaFreqSeq a) (ha0 : 0 < a 0) + (hf : Differentiable ℂ f) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n => (a n : ℂ) * z ^ n) (f z)) : + ∃ (γ : ℝ) (α : ℕ → ℝ), 0 ≤ γ ∧ (∀ i, 0 ≤ α i) ∧ Summable α ∧ + f = fun z => (a 0 : ℂ) * Complex.exp (γ * z) * + ∏' i, (1 + (α i : ℂ) * z) := by + let b : ℕ → ℝ := fun n => (a 0)⁻¹ * a n + let g : ℂ → ℂ := fun z => (a 0 : ℂ)⁻¹ * f z + have hb : IsPolyaFreqSeq b := ha.const_mul_sequence _ (inv_nonneg.mpr ha0.le) + have hb0 : b 0 = 1 := by simp [b, ha0.ne'] + have hg : Differentiable ℂ g := hf.const_mul _ + have hgs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n => (b n : ℂ) * z ^ n) (g z) := by + filter_upwards [hs] with z hz + simpa [b, g, mul_assoc] using hz.mul_left (a 0 : ℂ)⁻¹ + obtain ⟨γ, α, hγ, hα, sα, heq⟩ := exists_eq_exp_mul_prod_of_normalized hb hb0 hg hgs + have heqf : f = fun z => (a 0 : ℂ) * z ^ 0 * Complex.exp (γ * z) * + ∏' i, (1 + (α i : ℂ) * z) := by + funext z + have h := congrFun heq z + have h0 : (a 0 : ℂ) ≠ 0 := by exact_mod_cast ha0.ne' + simpa [g, h0, mul_assoc] using congrArg (fun w : ℂ => (a 0 : ℂ) * w) h + exact ⟨γ, α, hγ, hα, sα, by simpa only [pow_zero, mul_one] using heqf⟩ + +/-- An entire function with a real PF generating-series germ and positive constant +coefficient is Type-I Laguerre--Pólya. -/ +theorem IsPolyaFreqSeq.isLaguerrePolyaTypeI_of_hasSum + {a : ℕ → ℝ} {f : ℂ → ℂ} (ha : IsPolyaFreqSeq a) (ha0 : 0 < a 0) + (hf : Differentiable ℂ f) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun n => (a n : ℂ) * z ^ n) (f z)) : + IsLaguerrePolyaTypeI f := by + obtain ⟨γ, α, hγ, hα, sα, heq⟩ := ha.exists_eq_const_mul_exp_mul_prod ha0 hf hs + rw [heq] + simpa only [pow_zero, mul_one] using isLaguerrePolyaTypeI_product ha0.le 0 hγ hα sα + +/-- For an entire function with real Taylor data and positive constant coefficient, +Type-I Laguerre--Pólya membership is equivalent to total positivity of the ordinary +Taylor coefficient sequence. -/ +theorem isLaguerrePolyaTypeI_iff_isPolyaFreqSeq + {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hreal : ∀ k, iteratedDeriv k f 0 = ((iteratedDeriv k f 0).re : ℂ)) + (h0 : 0 < (f 0).re) : + IsLaguerrePolyaTypeI f ↔ + IsPolyaFreqSeq (fun k => (iteratedDeriv k f 0).re / k.factorial) := by + refine ⟨IsLaguerrePolyaTypeI.isPolyaFreqSeq, fun h => ?_⟩ + apply h.isLaguerrePolyaTypeI_of_hasSum (by simpa using h0) hf + apply Eventually.of_forall + intro z + convert hasSum_taylorSeries_of_entire hf 0 z using 1 + funext k + rw [hreal k] + simp [smul_eq_mul, div_eq_mul_inv, mul_comm, mul_left_comm] + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivityZeroPrefix.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivityZeroPrefix.lean new file mode 100644 index 000000000..5f66c8eba --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TotalPositivityZeroPrefix.lean @@ -0,0 +1,98 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivityConverse +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIClosure +import RealRooted.AissenSchoenbergWhitney +import Mathlib.Analysis.Calculus.DSlope +import Mathlib.Analysis.Analytic.OfScalars +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# Entire Pólya-frequency series with initial zeros + +Every entire function with a real PF generating-series germ belongs to the +positive Type-I Laguerre--Pólya class. Initial zero coefficients are removed +using the analytic divided difference at zero and restored as factors of `z`. +The identically zero function is included. + +Together with the forward coefficient theorem this proves Theorem C in +O. M. Katkova, *Multiple positivity and the Riemann zeta-function*, +arXiv:math/0505174, without a nonzero constant-coefficient restriction. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- A power-series germ can be divided by its initial zero coefficient while +retaining an entire function. -/ +private theorem isLaguerrePolyaTypeI_of_nonzero_coefficient + (n : ℕ) {a : ℕ → ℝ} {f : ℂ → ℂ} (ha : IsPolyaFreqSeq a) (han : a n ≠ 0) + (hf : Differentiable ℂ f) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun k => (a k : ℂ) * z ^ k) (f z)) : + IsLaguerrePolyaTypeI f := by + induction n generalizing a f with + | zero => + exact ha.isLaguerrePolyaTypeI_of_hasSum ((ha.nonneg 0).lt_of_ne' han) hf hs + | succ n ih => + by_cases ha0 : a 0 = 0 + · have hp : HasFPowerSeriesAt f + (FormalMultilinearSeries.ofScalars ℂ (fun k => (a k : ℂ))) 0 := by + simpa [hasFPowerSeriesAt_iff, smul_eq_mul, mul_comm] using hs + have hf0 : f 0 = 0 := by + simpa [FormalMultilinearSeries.ofScalars, ha0] using (hp.coeff_zero 1).symm + have hd : Differentiable ℂ (dslope f 0) := + fun z => ((hf.analyticAt z).dslope 0).differentiableAt + have hds : ∀ᶠ z in 𝓝 (0 : ℂ), + HasSum (fun k => (a (k + 1) : ℂ) * z ^ k) (dslope f 0 z) := by + simpa [hasFPowerSeriesAt_iff, FormalMultilinearSeries.coeff_fslope, + smul_eq_mul, mul_comm] using hp.dslope_fslope + have htype := ih (ha.tail_of_zero ha0) han hd hds + have hid : IsLaguerrePolyaTypeI (fun z : ℂ => z) := by + simpa using (isPFPolynomial_X_pow 1).isLaguerrePolyaTypeI + convert hid.mul htype using 1 + funext z + simpa [smul_eq_mul, hf0] using (sub_smul_dslope f 0 z).symm + · exact ha.isLaguerrePolyaTypeI_of_hasSum ((ha.nonneg 0).lt_of_ne' ha0) hf hs + +/-- An entire function with a real PF generating-series germ belongs to the +positive Type-I Laguerre--Pólya class, including initial zeros and the zero function. -/ +theorem IsPolyaFreqSeq.isLaguerrePolyaTypeI_of_entire + {a : ℕ → ℝ} {f : ℂ → ℂ} (ha : IsPolyaFreqSeq a) (hf : Differentiable ℂ f) + (hs : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum (fun k => (a k : ℂ) * z ^ k) (f z)) : + IsLaguerrePolyaTypeI f := by + by_cases hnonzero : ∃ n, a n ≠ 0 + · obtain ⟨n, hn⟩ := hnonzero + exact isLaguerrePolyaTypeI_of_nonzero_coefficient n ha hn hf hs + · have ha0 : ∀ n, a n = 0 := by simpa using hnonzero + have heq : f =ᶠ[𝓝 0] 0 := by + filter_upwards [hs] with z hz + simpa [ha0] using hz.tsum_eq.symm + have hfzero : f = 0 := + (hf.differentiableOn.analyticOnNhd isOpen_univ).eq_of_eventuallyEq + analyticOnNhd_const heq + simp [hfzero] + +/-- An entire function with real Taylor data is positive Type-I Laguerre--Pólya +exactly when its ordinary Taylor coefficients form a Pólya-frequency sequence. +No nonvanishing or positivity assumption at the origin is required. -/ +theorem isLaguerrePolyaTypeI_iff_isPolyaFreqSeq_of_entire + {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hreal : ∀ k, iteratedDeriv k f 0 = ((iteratedDeriv k f 0).re : ℂ)) : + IsLaguerrePolyaTypeI f ↔ + IsPolyaFreqSeq (fun k => (iteratedDeriv k f 0).re / k.factorial) := by + refine ⟨IsLaguerrePolyaTypeI.isPolyaFreqSeq, fun h => ?_⟩ + apply h.isLaguerrePolyaTypeI_of_entire hf + apply Eventually.of_forall + intro z + convert hasSum_taylorSeries_of_entire hf 0 z using 1 + funext k + rw [hreal k] + simp [smul_eq_mul, div_eq_mul_inv, mul_comm, mul_left_comm] + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Turan.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Turan.lean new file mode 100644 index 000000000..57db019db --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/Turan.lean @@ -0,0 +1,62 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.LaguerreInequalities.Turan +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Raw derivative Turán inequalities for positive Type-I functions + +The cubic and second iterated inequalities pass from PF polynomials to their +locally uniform entire limits. These are the raw derivatives of the function, +without factorial division. See Craven and Csordas, *Iterated Laguerre and +Turán inequalities*, Theorem 3.5 and Corollary 3.6 of the author manuscript, +https://math.hawaii.edu/~tom/mathfiles/iteratedLT.pdf. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted + +/-- The cubic derivative inequality holds on the nonnegative axis for every +positive Type-I function, including zeros and constants. -/ +theorem IsLaguerrePolyaTypeI.cubic_derivative_nonneg {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) {x : ℝ} (hx : 0 ≤ x) : + 0 ≤ 2 * (iteratedDeriv 1 f x).re ^ 3 - + 3 * (f x).re * (iteratedDeriv 1 f x).re * (iteratedDeriv 2 f x).re + + (f x).re ^ 2 * (iteratedDeriv 3 f x).re := by + obtain ⟨p, hp, hlim⟩ := hf + have h := Polynomial.tendsto_eval_iterate_derivative_of_tendstoLocallyUniformly hlim + have hc := (((h 1 x).pow 3).const_mul 2).sub + ((((h 0 x).mul (h 1 x)).mul (h 2 x)).const_mul 3) + have ht := hc.add (((h 0 x).pow 2).mul (h 3 x)) + apply ge_of_tendsto (by simpa only [iteratedDeriv_zero, mul_assoc] using ht) + filter_upwards [] with n + simpa only [cubicDerivativeForm, eval_add, eval_sub, eval_mul, eval_pow, eval_ofNat, + Function.iterate_succ_apply', Function.iterate_zero_apply, mul_assoc] using + (hp n).cubicDerivativeForm_eval_nonneg hx + +/-- The second Turán iterate of the raw derivative sequence is nonnegative +on the nonnegative axis for every positive Type-I function. -/ +theorem IsLaguerrePolyaTypeI.second_turan_nonneg {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) {x : ℝ} (hx : 0 ≤ x) : + 0 ≤ ((iteratedDeriv 2 f x).re ^ 2 - + (iteratedDeriv 1 f x).re * (iteratedDeriv 3 f x).re) ^ 2 - + ((iteratedDeriv 1 f x).re ^ 2 - (f x).re * (iteratedDeriv 2 f x).re) * + ((iteratedDeriv 3 f x).re ^ 2 - + (iteratedDeriv 2 f x).re * (iteratedDeriv 4 f x).re) := by + obtain ⟨p, hp, hlim⟩ := hf + have h := Polynomial.tendsto_eval_iterate_derivative_of_tendstoLocallyUniformly hlim + have h1 := ((h 1 x).pow 2).sub ((h 0 x).mul (h 2 x)) + have h2 := ((h 2 x).pow 2).sub ((h 1 x).mul (h 3 x)) + have h3 := ((h 3 x).pow 2).sub ((h 2 x).mul (h 4 x)) + apply ge_of_tendsto (by simpa only [iteratedDeriv_zero] using (h2.pow 2).sub (h1.mul h3)) + filter_upwards [] with n + simpa only [secondTuranForm, laguerreForm, eval_sub, eval_mul, eval_pow, + Function.iterate_succ_apply', Function.iterate_zero_apply] using + (hp n).secondTuranForm_eval_nonneg hx + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeI.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeI.lean index 324d7d630..bdc1f5011 100644 --- a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeI.lean +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeI.lean @@ -36,7 +36,9 @@ theorem IsLaguerrePolyaTypeI.toLaguerrePolya {f : ℂ → ℂ} rcases hf with ⟨p, hp, hlim⟩ exact ⟨p, fun n => (hp n).eq_zero_or_splits, hlim⟩ -private theorem IsPFMultiplierSequence.isPF_rescaledJensenPolynomial +/-- Every rescaled Jensen polynomial of a PF multiplier sequence is PF, +including degree zero. -/ +theorem IsPFMultiplierSequence.isPFPolynomial_rescaledJensenPolynomial {gamma : ℕ → ℝ} (hgamma : IsPFMultiplierSequence gamma) (n : ℕ) : IsPFPolynomial (rescaledJensenPolynomial n gamma) := by cases n with @@ -55,7 +57,7 @@ theorem IsPFMultiplierSequence.isLaguerrePolyaTypeI_complexExpGeneratingFunction {gamma : ℕ → ℝ} (hgamma : IsPFMultiplierSequence gamma) : IsLaguerrePolyaTypeI (complexExpGeneratingFunction gamma) := by refine ⟨fun n => rescaledJensenPolynomial n gamma, - fun n => hgamma.isPF_rescaledJensenPolynomial n, ?_⟩ + fun n => hgamma.isPFPolynomial_rescaledJensenPolynomial n, ?_⟩ exact tendstoLocallyUniformly_complexExpGeneratingFunction_of_summable gamma fun R hR => hgamma.summable_expGenerating_majorant R hR diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIClosure.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIClosure.lean new file mode 100644 index 000000000..547064565 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIClosure.lean @@ -0,0 +1,66 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff + +/-! +# Type-I Laguerre--Pólya products + +PF polynomials belong to the positive Type-I class, including the zero polynomial. +The class is closed under multiplication, so factors at the origin can be restored +after deleting initial zero Taylor coefficients. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted + +/-- Differentiation preserves the positive Type-I class, including zero outputs. -/ +theorem IsLaguerrePolyaTypeI.deriv {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) : + IsLaguerrePolyaTypeI (deriv f) := by + obtain ⟨p, hp, hlim⟩ := hf + refine ⟨fun n => (p n).derivative, fun n => (hp n).derivative, ?_⟩ + have h := hlim.iteratedDeriv (fun n => ((p n).map Complex.ofRealHom).differentiable) 1 + simpa only [Polynomial.iteratedDeriv_fun_eval, Polynomial.iterate_derivative_map, + Function.iterate_one, iteratedDeriv_one] using h + +/-- Every derivative of a positive Type-I function remains positive Type-I. -/ +theorem IsLaguerrePolyaTypeI.iterate_deriv {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) (n : ℕ) : IsLaguerrePolyaTypeI (iteratedDeriv n f) := by + induction n with + | zero => simpa using hf + | succ n ih => simpa [iteratedDeriv_succ] using ih.deriv + +/-- Every PF polynomial defines a Type-I Laguerre--Pólya function. -/ +theorem IsPFPolynomial.isLaguerrePolyaTypeI {p : ℝ[X]} (hp : IsPFPolynomial p) : + IsLaguerrePolyaTypeI (fun z : ℂ => (p.map Complex.ofRealHom).eval z) := by + refine ⟨fun _ => p, fun _ => hp, ?_⟩ + intro u hu x + refine ⟨Set.univ, univ_mem, ?_⟩ + filter_upwards [] with n y + intro _ + exact refl_mem_uniformity hu + +/-- The zero function belongs to the positive Type-I Laguerre--Pólya class. -/ +@[simp] +theorem IsLaguerrePolyaTypeI.zero : IsLaguerrePolyaTypeI 0 := by + simpa [Pi.zero_def] using IsPFPolynomial.zero.isLaguerrePolyaTypeI + +/-- The positive Type-I Laguerre--Pólya class is closed under products. -/ +theorem IsLaguerrePolyaTypeI.mul {f g : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) (hg : IsLaguerrePolyaTypeI g) : + IsLaguerrePolyaTypeI (f * g) := by + obtain ⟨p, hp, hptend⟩ := hf + obtain ⟨q, hq, hqtend⟩ := hg + refine ⟨fun n => p n * q n, fun n => (hp n).mul (hq n), ?_⟩ + have hmul := hptend.mul₀ hqtend + (hptend.continuous <| Filter.Frequently.of_forall fun n => + Polynomial.continuous ((p n).map Complex.ofRealHom)) + (hqtend.continuous <| Filter.Frequently.of_forall fun n => + Polynomial.continuous ((q n).map Complex.ofRealHom)) + simpa only [Pi.mul_def, Polynomial.map_mul, Polynomial.eval_mul] using hmul + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeICriterion.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeICriterion.lean new file mode 100644 index 000000000..29a1f6549 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeICriterion.lean @@ -0,0 +1,49 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivity +import RealRooted.MultiplierSequence.PolyaSchur +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# The positive Laguerre--Pólya subclass + +The PF polynomial approximation definition of positive Type-I functions is +equivalent to membership in the Laguerre--Pólya class with nonnegative Taylor +data. This is the class denoted LP+ by Craven and Csordas. Zero is included. +-/ + +public section + +namespace RealRooted + +/-- An LP function with nonnegative Taylor data has PF polynomial approximants. -/ +theorem IsLaguerrePolya.isLaguerrePolyaTypeI_of_nonneg {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hpos : ∀ k, 0 ≤ (iteratedDeriv k f 0).re) : + IsLaguerrePolyaTypeI f := by + have hpf : IsPFMultiplierSequence (fun k => (iteratedDeriv k f 0).re) := by + apply isPFMultiplierSequence_iff_jensenPolynomial_isPF.mpr + intro d + exact IsPFPolynomial.of_realRooted_nonneg (hasNonnegCoeffs_jensenPolynomial hpos) + (hf.jensenPolynomial_splits d) + have hreal (k : ℕ) : iteratedDeriv k f 0 = ((iteratedDeriv k f 0).re : ℂ) := + (Complex.ofReal_re_iteratedDeriv_zero hf.conj k).symm + rw [eq_complexExpGeneratingFunction_of_iteratedDeriv hf.differentiable hreal] + exact hpf.isLaguerrePolyaTypeI_complexExpGeneratingFunction + +/-- Positive Type-I means LP membership together with nonnegative Taylor data. -/ +theorem isLaguerrePolyaTypeI_iff_isLaguerrePolya_nonneg {f : ℂ → ℂ} : + IsLaguerrePolyaTypeI f ↔ + IsLaguerrePolya f ∧ ∀ k, 0 ≤ (iteratedDeriv k f 0).re := by + constructor + · intro hf + refine ⟨hf.toLaguerrePolya, fun k => ?_⟩ + have h := hf.isPolyaFreqSeq.nonneg k + simpa only [zero_mul] using (le_div_iff₀ (by positivity)).mp h + · rintro ⟨hf, hp⟩ + exact hf.isLaguerrePolyaTypeI_of_nonneg hp + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIDifferentialSimple.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIDifferentialSimple.lean new file mode 100644 index 000000000..b5d4d475f --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIDifferentialSimple.lean @@ -0,0 +1,127 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIPureProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIOriginFactor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IteratedDerivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroDifferentialSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialEntire +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolAlgebra +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialComposition +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderDerivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra + +/-! +# Simple infinite differential images for Type-I symbols of order below one + +Nonpolynomiality and a growth bound strictly below one eliminate the finite +product and exponential exceptions. An origin factor is absorbed into a +derivative of the target. The actual image may vanish identically. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- A nonpolynomial Type-I symbol of order below one and nonzero at zero +gives only simple zeros whenever its actual differential image is nonzero. -/ +private theorem deriv_differential_ne_zero_of_ne_zero + {φ f : ℂ → ℂ} (hφ : IsLaguerrePolyaTypeI φ) (hf : IsLaguerrePolya f) + (h0 : φ 0 ≠ 0) {ρ : ℝ} (horder : TauCeti.OrderLE φ ρ) (hρ : ρ < 1) + (hnp : ∀ p : ℂ[X], φ ≠ fun z => p.eval z) + (hne : infiniteDifferentialApply φ f ≠ 0) + {z : ℂ} (hz : infiniteDifferentialApply φ f z = 0) : + _root_.deriv (infiniteDifferentialApply φ f) z ≠ 0 := by + obtain ⟨a, _, hs, hprod⟩ := hφ.exists_eq_prod_of_order_lt_one h0 horder hρ + let ψ : ℂ → ℂ := fun z => ∏' j, (1 + (a j : ℂ) * z) + have hψnp (p : ℂ[X]) : ψ ≠ fun z => p.eval z := by + intro hp + apply hnp (C (φ 0) * p) + ext w + rw [congrFun hprod w] + change φ 0 * ψ w = _ + rw [congrFun hp w] + simp only [eval_mul, eval_C] + have heq : infiniteDifferentialApply φ f = + fun w => φ 0 * infiniteDifferentialApply ψ f w := by + calc + _ = infiniteDifferentialApply (fun w => φ 0 * ψ w) f := + congrArg (fun u => infiniteDifferentialApply u f) hprod + _ = _ := infiniteDifferentialApply_const_mul_symbol (φ 0) ψ f + have hψne : infiniteDifferentialApply ψ f ≠ 0 := by + intro hzero + apply hne + rw [heq, hzero] + ext w + simp only [Pi.zero_apply, mul_zero] + have hψz : infiniteDifferentialApply ψ f z = 0 := by + rw [heq] at hz + exact (mul_eq_zero.mp hz).resolve_left h0 + have hd := hf.deriv_genusZero_differential_ne_zero hs hψnp hψne hψz + rw [heq, deriv_const_mul_field] + exact mul_ne_zero h0 hd + +/-- A nonpolynomial Type-I symbol of order below one gives only simple zeros +in every nonzero differential image. Arbitrary origin multiplicity is allowed. -/ +theorem IsLaguerrePolyaTypeI.deriv_differential_ne_zero_of_order_lt_one + {φ f : ℂ → ℂ} (hφ : IsLaguerrePolyaTypeI φ) (hf : IsLaguerrePolya f) + {ρ : ℝ} (horder : TauCeti.OrderLE φ ρ) (hρ : ρ < 1) + (hnp : ∀ p : ℂ[X], φ ≠ fun z => p.eval z) + (hne : infiniteDifferentialApply φ f ≠ 0) + {z : ℂ} (hz : infiniteDifferentialApply φ f z = 0) : + _root_.deriv (infiniteDifferentialApply φ f) z ≠ 0 := by + have hφne : φ ≠ 0 := by + intro hzero + apply hnp 0 + ext w + simp only [hzero, Pi.zero_apply, eval_zero] + obtain ⟨ψ, hψ, hψ0, hoψ, heq⟩ := + hφ.exists_origin_factor_of_order hφne horder hρ.le + let m := analyticOrderNatAt φ 0 + have hψnp (p : ℂ[X]) : ψ ≠ fun w => p.eval w := by + intro hp + apply hnp (X ^ m * p) + rw [heq, hp] + ext w + simp only [eval_mul, eval_pow, eval_X, m] + have hop : infiniteDifferentialApply φ f = + infiniteDifferentialApply ψ (iteratedDeriv m f) := by + rw [heq] + have hc := infiniteDifferentialApply_polynomial_mul (monomial m 1) + hψ.toLaguerrePolya.differentiable hoψ (p := (1 : ℝ)) (by norm_num) hρ + hf.differentiable hf.orderLE_two (q := (3 : ℝ)) (by norm_num) (by norm_num) + (by norm_num) + have hd := iteratedDeriv_infiniteDifferentialApply_of_order + hψ.toLaguerrePolya.differentiable hoψ (p := (1 : ℝ)) (by norm_num) hρ + hf.differentiable hf.orderLE_two (q := (3 : ℝ)) (by norm_num) (by norm_num) + (by norm_num) m + simp only [eval_monomial, differentialApply_monomial, one_mul] at hc + exact hc.trans hd + rw [hop] at hne hz ⊢ + exact deriv_differential_ne_zero_of_ne_zero hψ (hf.iteratedDeriv m) + hψ0 hoψ hρ hψnp hne hz + +/-- The zero-aware genus-zero strictness criterion for a natural Type-I symbol: +the output is identically zero or LP with only simple real zeros. -/ +theorem IsLaguerrePolyaTypeI.differential_simple_or_zero_of_order_lt_one + {φ f : ℂ → ℂ} (hφ : IsLaguerrePolyaTypeI φ) (hf : IsLaguerrePolya f) + {ρ : ℝ} (horder : TauCeti.OrderLE φ ρ) (hρ : ρ < 1) + (hnp : ∀ p : ℂ[X], φ ≠ fun z => p.eval z) : + infiniteDifferentialApply φ f = 0 ∨ + IsLaguerrePolya (infiniteDifferentialApply φ f) ∧ + ∀ z, infiniteDifferentialApply φ f z = 0 → + z.im = 0 ∧ _root_.deriv (infiniteDifferentialApply φ f) z ≠ 0 := by + by_cases hne : infiniteDifferentialApply φ f = 0 + · exact Or.inl hne + · have hLP := hφ.toLaguerrePolya.infiniteDifferentialApply_of_left_order hf horder + (lt_trans hρ (by norm_num)) + exact Or.inr ⟨hLP, fun z hz => ⟨hLP.im_eq_zero_of_eq_zero hne hz, + hφ.deriv_differential_ne_zero_of_order_lt_one hf horder hρ hnp hne hz⟩⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIFactorization.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIFactorization.lean new file mode 100644 index 000000000..fa4530861 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIFactorization.lean @@ -0,0 +1,54 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivityConverse +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import Mathlib.Analysis.Complex.TaylorSeries + +/-! +# Product representation of nonvanishing-at-zero Type-I functions + +The Edrei representation of the ordinary Taylor coefficients has no denominator +factors for an entire function. This recovers the classical Type-I product with +nonnegative exponential parameter and summable nonnegative linear slopes. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- A Type-I function nonzero at zero is its initial value times a nonnegative +real exponential and a convergent product of nonnegative linear factors. -/ +theorem IsLaguerrePolyaTypeI.exists_eq_exp_mul_prod {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) : + ∃ (γ : ℝ) (α : ℕ → ℝ), 0 ≤ γ ∧ (∀ i, 0 ≤ α i) ∧ Summable α ∧ + f = fun z => f 0 * Complex.exp (γ * z) * ∏' i, (1 + (α i : ℂ) * z) := by + have hreal (k : ℕ) : ((iteratedDeriv k f 0).re : ℂ) = iteratedDeriv k f 0 := + ofReal_re_iteratedDeriv_zero hf.toLaguerrePolya.conj k + have hreal0 : ((f 0).re : ℂ) = f 0 := by simpa using hreal 0 + have h0re : (f 0).re ≠ 0 := by + intro hz + have h := hreal 0 + simp only [iteratedDeriv_zero, hz, ofReal_zero] at h + exact h0 h.symm + have hpos : 0 < (f 0).re := lt_of_le_of_ne + (by simpa using hf.isPolyaFreqSeq.nonneg 0) (Ne.symm h0re) + have hsum : ∀ᶠ z in 𝓝 (0 : ℂ), HasSum + (fun k => (((iteratedDeriv k f 0).re / k.factorial : ℝ) : ℂ) * z ^ k) (f z) := by + apply Eventually.of_forall + intro z + convert hasSum_taylorSeries_of_entire hf.toLaguerrePolya.differentiable 0 z using 1 + funext k + rw [ofReal_div, ofReal_natCast, hreal] + simp [smul_eq_mul, div_eq_mul_inv, mul_comm, mul_left_comm] + obtain ⟨γ, α, hγ, hα, hs, heq⟩ := hf.isPolyaFreqSeq.exists_eq_const_mul_exp_mul_prod + (by simpa using hpos) hf.toLaguerrePolya.differentiable hsum + refine ⟨γ, α, hγ, hα, hs, ?_⟩ + simpa only [iteratedDeriv_zero, Nat.factorial_zero, Nat.cast_one, div_one, hreal0] using heq + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIGrowth.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIGrowth.lean new file mode 100644 index 000000000..05f266371 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIGrowth.lean @@ -0,0 +1,59 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIReverse +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.GeometricGrowth +import RealRooted.Mathlib.Analysis.Complex.TaylorGrowth +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Exponential growth of positive Type-I functions + +The PF multiplier sequence of Taylor derivatives has a geometric majorant, +including any initial zero prefix. Consequently every positive Type-I +Laguerre--Pólya function is of exponential type and has order at most one. +The zero function is included throughout. +-/ + +public section + +open Complex Filter Topology Asymptotics Bornology + +namespace RealRooted + +/-- Every positive Type-I function has a global exponential majorant, with +no nonzero-at-zero assumption. -/ +theorem IsLaguerrePolyaTypeI.exists_norm_le_mul_exp {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) : + ∃ C ≥ 0, ∃ A ≥ 0, ∀ z : ℂ, ‖f z‖ ≤ C * Real.exp (A * ‖z‖) := by + let γ : ℕ → ℝ := fun n => (iteratedDeriv n f 0).re + have hreal (n : ℕ) : iteratedDeriv n f 0 = (γ n : ℂ) := + (ofReal_re_iteratedDeriv_zero hf.toLaguerrePolya.conj n).symm + have hγ := hf.isPFMultiplierSequence_of_iteratedDeriv_zero + (fun n => by simpa only [← iteratedDeriv_eq_iterate] using hreal n) + obtain ⟨C, hC, A, hA, hbound⟩ := hγ.exists_geometric_bound + refine ⟨C, hC, A, hA, ?_⟩ + intro z + have hc : ∀ n, ‖iteratedDeriv n f 0‖ ≤ C * A ^ n := by + intro n + rw [hreal n, norm_real, Real.norm_of_nonneg (hγ.nonneg n)] + exact hbound n + simpa only [sub_zero] using + hf.toLaguerrePolya.differentiable.norm_le_mul_exp_of_iteratedDeriv_bound hc z + +/-- Every positive Type-I Laguerre--Pólya function has order at most one, +including functions with an arbitrary zero at the origin and the zero function. -/ +theorem IsLaguerrePolyaTypeI.orderLE_one {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) : + TauCeti.OrderLE f 1 := by + obtain ⟨C, _, A, _, hbound⟩ := hf.exists_norm_le_mul_exp + rw [TauCeti.orderLE_def] + intro p hp + have hb : f =O[cobounded ℂ] (fun z => Real.exp (A * ‖z‖)) := by + apply IsBigO.of_bound C + exact Eventually.of_forall fun z => by simpa using hbound z + exact hb.trans (by simpa only [Real.rpow_one] using + (TauCeti.isBigO_exp_mul_norm_rpow (E := ℂ) A hp)) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIIndexedProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIIndexedProduct.lean new file mode 100644 index 000000000..58204409d --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIIndexedProduct.lean @@ -0,0 +1,97 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIClosure +import Mathlib.Topology.Algebra.InfiniteSum.UniformOn + +/-! +# Indexed products in the positive Type-I class + +Approximation on compact discs gives a local closure criterion for the positive +Type-I class. It applies to locally uniform products with arbitrary index sets, +including finite and empty products. +-/ + +public section + +open Complex Polynomial Filter Metric Topology + +namespace RealRooted + +/-- Approximation by PF polynomials on every closed disc implies Type-I membership. -/ +theorem IsLaguerrePolyaTypeI.of_forall_approx {f : ℂ → ℂ} + (h : ∀ R ε : ℝ, 0 < ε → ∃ p : ℝ[X], IsPFPolynomial p ∧ + ∀ z : ℂ, ‖z‖ ≤ R → dist (f z) ((p.map ofRealHom).eval z) < ε) : + IsLaguerrePolyaTypeI f := by + choose P hP hd using fun n : ℕ ↦ h n (1 / (n + 1)) (by positivity) + refine ⟨P, hP, tendstoLocallyUniformly_iff_forall_isCompact.mpr fun K hK ↦ ?_⟩ + obtain ⟨R, hR⟩ := (Metric.isBounded_iff_subset_closedBall 0).mp hK.isBounded + rw [Metric.tendstoUniformlyOn_iff] + intro ε hε + obtain ⟨N, hN⟩ := exists_nat_one_div_lt hε + filter_upwards [eventually_ge_atTop (max N ⌈R⌉₊)] with n hn x hx + have hxR : ‖x‖ ≤ n := by + have h1 : ‖x‖ ≤ R := mem_closedBall_zero_iff.mp (hR hx) + have h2 : R ≤ (⌈R⌉₊ : ℝ) := Nat.le_ceil R + have h3 : ((⌈R⌉₊ : ℕ) : ℝ) ≤ n := by exact_mod_cast le_of_max_le_right hn + linarith + have hNn : (N : ℝ) ≤ n := by exact_mod_cast le_of_max_le_left hn + calc + dist (f x) ((P n).map ofRealHom |>.eval x) < 1 / (n + 1) := hd n x hxR + _ ≤ 1 / (N + 1) := by gcongr + _ < ε := hN + +/-- A positive Type-I function is uniformly approximated by PF polynomials on +each closed disc. -/ +theorem IsLaguerrePolyaTypeI.exists_approx {f : ℂ → ℂ} + (hf : IsLaguerrePolyaTypeI f) (R : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ p : ℝ[X], IsPFPolynomial p ∧ + ∀ z : ℂ, ‖z‖ ≤ R → dist (f z) ((p.map ofRealHom).eval z) < ε := by + obtain ⟨P, hP, hT⟩ := hf + have hU := tendstoLocallyUniformly_iff_forall_isCompact.mp hT _ + (isCompact_closedBall (0 : ℂ) R) + rw [Metric.tendstoUniformlyOn_iff] at hU + obtain ⟨n, hn⟩ := (hU ε hε).exists + exact ⟨P n, hP n, fun z hz ↦ hn z (mem_closedBall_zero_iff.mpr hz)⟩ + +/-- The constant function one belongs to the positive Type-I class. -/ +theorem IsLaguerrePolyaTypeI.one : IsLaguerrePolyaTypeI (fun _ : ℂ ↦ 1) := by + simpa using IsPFPolynomial.one.isLaguerrePolyaTypeI + +/-- Finite products preserve the positive Type-I class. -/ +theorem IsLaguerrePolyaTypeI.finsetProd {ι : Type*} (s : Finset ι) + (f : ι → ℂ → ℂ) (hf : ∀ i ∈ s, IsLaguerrePolyaTypeI (f i)) : + IsLaguerrePolyaTypeI (fun z ↦ ∏ i ∈ s, f i z) := by + classical + induction s using Finset.induction_on with + | empty => simpa using IsLaguerrePolyaTypeI.one + | @insert i s hi ih => + simpa [Finset.prod_insert hi, Pi.mul_def] using (hf i (by simp)).mul + (ih fun j hj ↦ hf j (by simp [hj])) + +/-- An arbitrary locally uniformly convergent product of positive Type-I +functions belongs to the same class. No enumeration is required. -/ +theorem IsLaguerrePolyaTypeI.of_hasProdLocallyUniformly + {ι : Type*} {g : ι → ℂ → ℂ} {f : ℂ → ℂ} + (hg : ∀ i, IsLaguerrePolyaTypeI (g i)) + (hprod : HasProdLocallyUniformlyOn g f Set.univ) : IsLaguerrePolyaTypeI f := by + classical + apply IsLaguerrePolyaTypeI.of_forall_approx + intro R ε hε + have hlim := tendstoLocallyUniformlyOn_univ.mp + (hasProdLocallyUniformlyOn_iff_tendstoLocallyUniformlyOn.mp hprod) + have hU := tendstoLocallyUniformly_iff_forall_isCompact.mp hlim _ + (isCompact_closedBall (0 : ℂ) R) + rw [Metric.tendstoUniformlyOn_iff] at hU + obtain ⟨s, hs⟩ := (hU (ε / 2) (half_pos hε)).exists + obtain ⟨p, hp, hpd⟩ := + (IsLaguerrePolyaTypeI.finsetProd s g (fun i _ ↦ hg i)).exists_approx + R (half_pos hε) + refine ⟨p, hp, fun z hz ↦ ?_⟩ + calc + dist (f z) ((p.map ofRealHom).eval z) ≤ dist (f z) (∏ i ∈ s, g i z) + + dist (∏ i ∈ s, g i z) ((p.map ofRealHom).eval z) := dist_triangle _ _ _ + _ < ε / 2 + ε / 2 := add_lt_add (hs z (mem_closedBall_zero_iff.mpr hz)) (hpd z hz) + _ = ε := add_halves ε + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIInfiniteDifferential.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIInfiniteDifferential.lean new file mode 100644 index 000000000..6e62ec043 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIInfiniteDifferential.lean @@ -0,0 +1,68 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeICriterion +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIGrowth +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Derivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Infinite differential operators on positive Type-I functions + +Pólya's Zusatz I, page 242 of *Algebraische Untersuchungen über ganze +Funktionen vom Geschlechte Null und Eins* (1915), says that positive Type-I +symbols and targets give a Type-I output. Their exponential growth ensures +absolute convergence everywhere. The derivative-series coefficients remain +nonnegative, so the Type-II preservation theorem strengthens to Type I. +Zero functions and zeros at the origin are included. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- The differential series of two positive Type-I inputs converges +absolutely at every complex point, without an additional growth hypothesis. -/ +theorem IsLaguerrePolyaTypeI.summable_norm_infiniteDifferentialApply {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolyaTypeI φ) (hf : IsLaguerrePolyaTypeI f) (z : ℂ) : + Summable (fun n => ‖iteratedDeriv n φ 0 * iteratedDeriv n f z / (n.factorial : ℂ)‖) := + Complex.summable_norm_infiniteDifferentialApply hφ.toLaguerrePolya.differentiable + hφ.orderLE_one (by norm_num) hf.toLaguerrePolya.differentiable hf.orderLE_one (by norm_num) z + +/-- An actual infinite differential operator with positive Type-I symbol +and target has positive Type-I output. This is Pólya's Zusatz I; convergence +follows from the inputs and is not a premise. -/ +theorem IsLaguerrePolyaTypeI.infiniteDifferentialApply {φ f : ℂ → ℂ} + (hφ : IsLaguerrePolyaTypeI φ) (hf : IsLaguerrePolyaTypeI f) : + IsLaguerrePolyaTypeI (Complex.infiniteDifferentialApply φ f) := by + have hLP := hφ.toLaguerrePolya.infiniteDifferentialApply hf.toLaguerrePolya + hφ.orderLE_one (by norm_num) hf.orderLE_one (by norm_num) + apply hLP.isLaguerrePolyaTypeI_of_nonneg + intro k + rw [iteratedDeriv_infiniteDifferentialApply hφ.toLaguerrePolya.differentiable + hφ.orderLE_one (by norm_num) hf.toLaguerrePolya.differentiable hf.orderLE_one (by norm_num)] + have hcd := hf.toLaguerrePolya.differentiable.contDiff (n := ⊤) + have hdf := hcd.differentiable_iteratedDeriv k (WithTop.coe_lt_top _) + have hsum := Complex.summable_norm_infiniteDifferentialApply + hφ.toLaguerrePolya.differentiable hφ.orderLE_one (by norm_num) + hdf (hf.orderLE_one.iteratedDeriv hf.toLaguerrePolya.differentiable k) (by norm_num) 0 + have hs := hsum.of_norm.hasSum + apply (Complex.hasSum_re hs).nonneg + intro n + have hφim : (iteratedDeriv n φ 0).im = 0 := by + rw [← ofReal_re_iteratedDeriv_zero hφ.toLaguerrePolya.conj n] + simp + have hφpos := (isLaguerrePolyaTypeI_iff_isLaguerrePolya_nonneg.mp hφ).2 n + have hfpos : 0 ≤ (iteratedDeriv n (iteratedDeriv k f) 0).re := by + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply] using + (isLaguerrePolyaTypeI_iff_isLaguerrePolya_nonneg.mp hf).2 (n + k) + simp only [div_natCast_re, mul_re, hφim, zero_mul, sub_zero] + exact div_nonneg (mul_nonneg hφpos hfpos) (Nat.cast_nonneg _) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeILinearProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeILinearProduct.lean new file mode 100644 index 000000000..3b4759017 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeILinearProduct.lean @@ -0,0 +1,59 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.Complex.Exponential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIIndexedProduct +import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIClosure +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalProduct + +/-! +# Positive Type-I linear products with arbitrary indices + +Nonnegative summable real slopes define a positive Type-I entire function. +Multiplying by a nonnegative real exponential preserves this conclusion. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- A linear factor with nonnegative slope belongs to the positive Type-I class. -/ +theorem isLaguerrePolyaTypeI_one_add_mul {a : ℝ} (ha : 0 ≤ a) : + IsLaguerrePolyaTypeI (fun z : ℂ ↦ 1 + (a : ℂ) * z) := by + have hp : IsPFPolynomial (1 + C a * X) := + IsPFPolynomial.of_realRooted_nonneg + (hasNonnegCoeffs_one.add ((hasNonnegCoeffs_C ha).mul hasNonnegCoeffs_X)) + (Splits.of_natDegree_le_one ((natDegree_add_le _ _).trans + (max_le (by simp) ((natDegree_C_mul_le _ _).trans (by simp))))) + simpa using hp.isLaguerrePolyaTypeI + +/-- A summable family of nonnegative linear slopes gives a positive Type-I +function. This includes arbitrary finite and empty index sets. -/ +theorem isLaguerrePolyaTypeI_tprod_one_add_mul {ι : Type*} {a : ι → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) : + IsLaguerrePolyaTypeI (fun z : ℂ ↦ ∏' i, (1 + (a i : ℂ) * z)) := by + exact IsLaguerrePolyaTypeI.of_hasProdLocallyUniformly + (fun i ↦ isLaguerrePolyaTypeI_one_add_mul (ha i)) + (hasProdLocallyUniformlyOn_one_add_ofReal_mul hs) + +/-- A nonnegative real exponential belongs to the positive Type-I class. -/ +theorem isLaguerrePolyaTypeI_exp_mul {σ : ℝ} (hσ : 0 ≤ σ) : + IsLaguerrePolyaTypeI (fun z : ℂ ↦ exp ((σ : ℂ) * z)) := by + simpa only [ofReal_one, pow_zero, mul_one, one_mul, ofReal_zero, zero_mul, + add_zero, tprod_one] using + isLaguerrePolyaTypeI_product (c := 1) zero_le_one 0 hσ + (y := fun _ : ℕ ↦ 0) (fun _ ↦ le_rfl) summable_zero + +/-- The genus-zero product with nonnegative exponential coefficient and +summable nonnegative slopes belongs to the positive Type-I class. -/ +theorem isLaguerrePolyaTypeI_exp_mul_tprod {ι : Type*} {a : ι → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : Summable a) {σ : ℝ} (hσ : 0 ≤ σ) : + IsLaguerrePolyaTypeI (fun z : ℂ ↦ + exp ((σ : ℂ) * z) * ∏' i, (1 + (a i : ℂ) * z)) := by + exact (isLaguerrePolyaTypeI_exp_mul hσ).mul + (isLaguerrePolyaTypeI_tprod_one_add_mul ha hs) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeILogDerivativeOrigin.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeILogDerivativeOrigin.lean new file mode 100644 index 000000000..f451447be --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeILogDerivativeOrigin.lean @@ -0,0 +1,58 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import TauCeti.Analysis.Complex.GrowthOrder +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIOriginFactor +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginLogDerivativeHierarchy +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginHeatTrace + +/-! +# Logarithmic-derivative families for all nonzero Type-I functions + +The native origin multiplicity is extracted by a checked analytic +factorization. Thus the caller supplies only Type-I membership and +nonzeroness of the function, not a chosen factorization or nonvanishing +at the origin. All parameter domains are the open positive half-line. +-/ + +public section + +open MeasureTheory + +namespace RealRooted + +/-- The weighted logarithmic-derivative hierarchy of every nonzero +Type-I function is completely monotone, allowing zeros at the origin. -/ +theorem IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_weighted_logDeriv_of_ne_zero + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (hfn : f ≠ 0) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ (logDeriv f (z : ℂ)).re) y) x) := by + obtain ⟨g, hg, hg0, heq⟩ := hf.exists_origin_factor hfn + have h := hg.isCompletelyMonotoneOnIoi_weighted_logDeriv_pow_mul + hg0 (analyticOrderNatAt f 0) k m + simpa only [← heq] using h + +/-- Every nonzero Type-I function below order one has its actual native +heat-trace Laplace representation at positive parameters, even with an origin zero. -/ +theorem IsLaguerrePolyaTypeI.native_heatTrace_logDeriv_of_ne_zero + {f : ℂ → ℂ} {rho : ℝ} (hf : IsLaguerrePolyaTypeI f) (hfn : f ≠ 0) + (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) : + TauCeti.IsCompletelyMonotoneOnIoi (Complex.zeroHeatTrace f) ∧ + ∀ (k : ℕ) (x : ℝ), 0 < x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace f t) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ (logDeriv f (y : ℂ)).re) x = + ∫ t : ℝ in Set.Ioi 0, Real.exp (-x * t) * t ^ k * Complex.zeroHeatTrace f t := by + obtain ⟨g, hg, hg0, hgorder, heq⟩ := hf.exists_origin_factor_of_order hfn horder hrho.le + have h := hg.native_origin_heatTrace_logDeriv hg0 hgorder hrho (analyticOrderNatAt f 0) + simpa only [← heq] using h + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIMomentCriterion.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIMomentCriterion.lean new file mode 100644 index 000000000..5b9a0a603 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIMomentCriterion.lean @@ -0,0 +1,99 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentTypeI +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Const +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.MomentContinuation +import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeMomentTransform + +/-! +# The normalized Type-I logarithmic-moment criterion + +For an entire function nonzero at zero, its normalization belongs to the positive +Type-I class exactly when the signed Taylor coefficients of its logarithmic +derivative are genuine moments of a nonnegative measure. The coefficients are +compared in the complex numbers, and every natural power is integrable. + +This is the normalized form of Sokal (2022), Proposition 6(a)--(b), +https://doi.org/10.1016/j.jmaa.2022.126432. The converse derives the product and +its convergence from the moment measure; it assumes no growth bound. +-/ + +public section + +open Complex MeasureTheory Set +open scoped NNReal + +namespace RealRooted + +/-- Dividing by the nonzero value at zero leaves the logarithmic derivative +unchanged, including its totalized values at zeros. -/ +private theorem logDeriv_div_value_zero {f : ℂ → ℂ} (h0 : f 0 ≠ 0) : + logDeriv (fun z ↦ f z / f 0) = logDeriv f := by + funext z + exact logDeriv_div_const z (f 0) h0 + +/-- Genuine nonnegative moments of the actual complex logarithmic coefficients +force the normalized entire function to be positive Type-I. -/ +theorem isLaguerrePolyaTypeI_div_of_logDeriv_moments + {f : ℂ → ℂ} {mu : Measure ℝ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) + (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + IsLaguerrePolyaTypeI (fun z ↦ f z / f 0) := by + have : IsFiniteMeasure mu := + (integrable_const_iff_isFiniteMeasure (one_ne_zero : (1 : ℝ) ≠ 0)).mp + (by simpa only [pow_zero] using hint 0) + obtain ⟨heq, hne⟩ := hf.eqOn_logDeriv_integral_inv_of_moments h0 hpos hint hmom + apply isLaguerrePolyaTypeI_of_logDeriv_integral + (hf.div_const (f 0)) (by simp only [div_self h0]) (mu.map Real.toNNReal) + · intro z hz + exact div_ne_zero (hne z hz) h0 + · intro z hz + rw [logDeriv_div_value_zero h0, heq hz] + exact (Measure.integral_inv_one_add_mul_map_toNNReal hpos z).symm + +/-- An entire function's normalization is positive Type-I if and only if its +signed complex logarithmic coefficients are nonnegative-support moments. +Zero measures, constant functions, and measures supported only at zero are included. -/ +theorem isLaguerrePolyaTypeI_div_iff_logDeriv_moments + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 ≠ 0) : + IsLaguerrePolyaTypeI (fun z ↦ f z / f 0) ↔ + ∃ mu : Measure ℝ, (∀ᵐ x ∂mu, 0 ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu ∧ + (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ) := by + constructor + · intro hF + obtain ⟨_, a, mu, _, _, _, _, _, hsupport, hmom⟩ := + hF.exists_logDeriv_moment_measure (by simp only [div_self h0, ne_eq, one_ne_zero, + not_false_eq_true]) + refine ⟨mu, ?_, ?_⟩ + · have hs : ∀ᵐ x ∂mu, x ∈ Icc 0 (∑' i, a i) := ae_iff.mpr hsupport + filter_upwards [hs] with x hx + exact hx.1 + · intro n + exact ⟨(hmom n).1, by + simpa only [logDeriv_div_value_zero h0] using (hmom n).2⟩ + · rintro ⟨mu, hpos, hmom⟩ + exact isLaguerrePolyaTypeI_div_of_logDeriv_moments hf h0 hpos + (fun n ↦ (hmom n).1) (fun n ↦ (hmom n).2) + +/-- The logarithmic-moment criterion for entire functions normalized to one. -/ +theorem isLaguerrePolyaTypeI_iff_logDeriv_moments + {f : ℂ → ℂ} (hf : Differentiable ℂ f) (h0 : f 0 = 1) : + IsLaguerrePolyaTypeI f ↔ + ∃ mu : Measure ℝ, (∀ᵐ x ∂mu, 0 ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu ∧ + (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv f) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ) := by + simpa only [h0, div_one] using + isLaguerrePolyaTypeI_div_iff_logDeriv_moments hf (by simp [h0]) + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIOriginFactor.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIOriginFactor.lean new file mode 100644 index 000000000..c2b7e8f21 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIOriginFactor.lean @@ -0,0 +1,64 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.Complex.GrowthOrder +public import Mathlib.Analysis.Analytic.Order +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeICriterion +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIGrowth +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Hadamard +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros +import RealRooted.Mathlib.Analysis.Complex.OriginFactor +import TauCeti.Analysis.Complex.GrowthOrder.Zero.Factorization + +/-! +# Removing the origin zero of an arbitrary nonzero Type-I function + +The full analytic order at zero is extracted without increasing the growth +order. The entire cofactor retains conjugation symmetry, only real zeros, +and nonnegative Taylor data, so it remains in the Type-I class. This +discharges the structural factorization required by the origin-zero +logarithmic-derivative and heat-trace extensions. +-/ + +public section + +namespace RealRooted + +/-- Removing the complete origin zero of a nonzero Type-I function +preserves the class and every supplied order bound at most one. -/ +theorem IsLaguerrePolyaTypeI.exists_origin_factor_of_order + {f : ℂ → ℂ} {rho : ℝ} (hf : IsLaguerrePolyaTypeI f) (hfn : f ≠ 0) + (horder : TauCeti.OrderLE f rho) (hrho : rho ≤ 1) : + ∃ g : ℂ → ℂ, IsLaguerrePolyaTypeI g ∧ g 0 ≠ 0 ∧ TauCeti.OrderLE g rho ∧ + f = (fun z : ℂ ↦ z ^ analyticOrderNatAt f 0 * g z) := by + have hnot : ∃ z : ℂ, f z ≠ 0 := Function.ne_iff.mp hfn + obtain ⟨g, hgd, hg0, hgorder, hfactor⟩ := + horder.exists_eq_sub_pow_mul hf.toLaguerrePolya.differentiable hnot 0 + have hpow (z : ℂ) : f z = z ^ analyticOrderNatAt f 0 * g z := by + simpa only [sub_zero] using hfactor z + have hconj := Complex.conj_of_real_pow_mul hgd.continuous hf.toLaguerrePolya.conj + (r := 0) (by simpa only [Complex.ofReal_zero] using hfactor) + have hzeros (z : ℂ) (hz : g z = 0) : z.im = 0 := + hf.toLaguerrePolya.im_eq_zero_of_eq_zero hfn (by rw [hpow, hz, mul_zero]) + have hlp := isLaguerrePolya_of_orderLE_one (hgorder.mono hrho) hgd hg0 hconj hzeros + have htype : IsLaguerrePolyaTypeI g := + hlp.isLaguerrePolyaTypeI_of_nonneg (Complex.re_iteratedDeriv_nonneg_of_pow_mul hgd hpow + (isLaguerrePolyaTypeI_iff_isLaguerrePolya_nonneg.mp hf).2) + exact ⟨g, htype, hg0, hgorder, funext hpow⟩ + +/-- Every nonzero Type-I function is an origin monomial times a Type-I +function nonzero at zero; the exponent is the actual analytic order. -/ +theorem IsLaguerrePolyaTypeI.exists_origin_factor + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (hfn : f ≠ 0) : + ∃ g : ℂ → ℂ, IsLaguerrePolyaTypeI g ∧ g 0 ≠ 0 ∧ + f = (fun z : ℂ ↦ z ^ analyticOrderNatAt f 0 * g z) := by + obtain ⟨g, hg, hg0, _, heq⟩ := hf.exists_origin_factor_of_order hfn hf.orderLE_one le_rfl + exact ⟨g, hg, hg0, heq⟩ + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIPureProduct.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIPureProduct.lean new file mode 100644 index 000000000..b40b949be --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIPureProduct.lean @@ -0,0 +1,39 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import TauCeti.Analysis.Complex.GrowthOrder +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIFactorization +import RealRooted.Mathlib.Analysis.Complex.LinearProductLowerBound + +/-! +# Pure products for Type-I functions of order below one + +The nonnegative exponential factor in a Type-I factorization vanishes +under a genuine growth bound of order strictly below one. Thus the product +representation used in Zhang's theorem follows without adding an assumption +that the exponential constant is zero. +-/ + +public section + +namespace RealRooted + +/-- A Type-I function nonzero at zero and of order below one is its value +at zero times a convergent product of nonnegative linear factors alone. -/ +theorem IsLaguerrePolyaTypeI.exists_eq_prod_of_order_lt_one + {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) (h0 : f 0 ≠ 0) + {rho : ℝ} (horder : TauCeti.OrderLE f rho) (hrho : rho < 1) : + ∃ a : ℕ → ℝ, (∀ i, 0 ≤ a i) ∧ Summable a ∧ + f = (fun z : ℂ ↦ f 0 * ∏' i, (1 + (a i : ℂ) * z)) := by + obtain ⟨gamma, a, hg, ha, hs, heq⟩ := hf.exists_eq_exp_mul_prod h0 + have hgamma : gamma = 0 := Complex.eq_zero_of_exp_tprod_order_lt_one + h0 ha hg (heq ▸ horder) hrho + refine ⟨a, ha, hs, ?_⟩ + simpa only [hgamma, Complex.ofReal_zero, zero_mul, Complex.exp_zero, mul_one] using heq + +end RealRooted diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIReverse.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIReverse.lean index 3069e31ff..1c1453001 100644 --- a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIReverse.lean +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/TypeIReverse.lean @@ -1,7 +1,9 @@ module +public import Mathlib.Analysis.Calculus.Deriv.Basic + import RealRooted.MultiplierSequence.PolyaSchur.Factorial -public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI import RealRooted.MultiplierSequence.PolyaSchur.Limit @@ -81,7 +83,9 @@ theorem IsLaguerrePolyaTypeI.isPFMultiplierSequence_of_iteratedDeriv_zero · rw [htaylor k] simp -private theorem iteratedDeriv_complexExpGeneratingFunction_zero +/-- Inside a positive convergence radius, exponential Taylor data are the +actual iterated derivatives of their generating function at zero. -/ +theorem iteratedDeriv_complexExpGeneratingFunction_zero (gamma : ℕ → ℝ) {R : NNReal} (hR : 0 < R) (hsum : Summable (fun k => ‖gamma k‖ * (R : ℝ) ^ k / k.factorial)) (k : ℕ) : (deriv^[k]) (complexExpGeneratingFunction gamma) 0 = (gamma k : ℂ) := by diff --git a/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/UniformDerivativeBounds.lean b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/UniformDerivativeBounds.lean new file mode 100644 index 000000000..e1ac7a6f3 --- /dev/null +++ b/RealRooted/MultiplierSequence/PolyaSchur/LaguerrePolya/UniformDerivativeBounds.lean @@ -0,0 +1,109 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import Mathlib.Analysis.Calculus.Deriv.Basic +import RealRooted.BorceaBranden.Transcendental.RealCoefficientBounds +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Uniform Gaussian bounds from normalized derivatives + +Normalized Laguerre--Pólya functions with bounded first and second derivatives +share a Gaussian majorant on the whole complex plane. Rescaled Jensen +polynomials transfer the degree-independent polynomial estimate to entire +functions. +-/ + +public section + +open Polynomial Complex Filter Topology + +namespace RealRooted + +/-- Normalized Laguerre--Pólya functions with bounded first two derivatives +have a common Gaussian bound throughout the complex plane. -/ +theorem exists_uniform_norm_bound_of_deriv_bounds {K : ℝ} (hK : 0 ≤ K) : + ∃ B > 0, ∃ C ≥ 0, ∀ f : ℂ → ℂ, IsLaguerrePolya f → f 0 = 1 → + ‖deriv f 0‖ ≤ K → ‖deriv (deriv f) 0‖ ≤ K → ∀ z : ℂ, + ‖f z‖ ≤ B * Real.exp (C * ‖z‖ ^ 2) := by + obtain ⟨B, hB, C, hC, hbound⟩ := exists_norm_eval_le_exp_of_coeff_bounds hK + refine ⟨B, hB, C, hC, ?_⟩ + intro f hf hf0 hf1 hf2 z + let γ : ℕ → ℝ := fun k => (iteratedDeriv k f 0).re + have hγ (k : ℕ) : iteratedDeriv k f 0 = (γ k : ℂ) := + (ofReal_re_iteratedDeriv_zero hf.conj k).symm + have hγ1 : ‖γ 1‖ ≤ K := by + simpa [γ, iteratedDeriv_succ] using (abs_re_le_norm (deriv f 0)).trans hf1 + have hγ2 : ‖γ 2‖ ≤ K := by + simpa [γ, iteratedDeriv_succ] using (abs_re_le_norm (deriv (deriv f) 0)).trans hf2 + have hsum (R : ℝ) (hR : 0 ≤ R) : + Summable (fun k => ‖γ k‖ * R ^ k / k.factorial) := by + simpa only [hγ, norm_real] using + summable_norm_iteratedDeriv_div_factorial hf.differentiable R hR + have hlim := tendstoLocallyUniformly_eval_complex_rescaledJensenPolynomial_of_summable γ hsum + have heq := eq_complexExpGeneratingFunction_of_iteratedDeriv hf.differentiable hγ + rw [complexExpGeneratingFunction_eq_tsum] at heq + have hpoint : Tendsto (fun n => ((rescaledJensenPolynomial n γ).map ofRealHom).eval z) + atTop (𝓝 (f z)) := by + rw [congrFun heq z] + exact hlim.tendstoLocallyUniformlyOn.tendsto_at (Set.mem_univ z) + apply le_of_tendsto hpoint.norm + apply Eventually.of_forall + intro n + apply hbound (rescaledJensenPolynomial n γ) + · rw [rescaledJensenPolynomial_eq_jensenPolynomial_comp] + exact (hf.jensenPolynomial_splits n).comp_of_natDegree_le_one + ((natDegree_C_mul_le _ _).trans (by simp)) + · simp [coeff_rescaledJensenPolynomial, γ, hf0] + · have hc := norm_coeff_rescaledJensenPolynomial_le n 1 γ + norm_num only [Nat.factorial_succ, Nat.factorial_zero, Nat.cast_one, + Nat.cast_ofNat, one_mul, mul_one, div_one] at hc + exact hc.trans hγ1 + · have hc := norm_coeff_rescaledJensenPolynomial_le n 2 γ + norm_num only [Nat.factorial_succ, Nat.factorial_zero, Nat.cast_one, + Nat.cast_ofNat, one_mul, mul_one, div_one] at hc + exact hc.trans ((div_le_self (norm_nonneg _) (by norm_num : (1 : ℝ) ≤ 2)).trans hγ2) + +/-- Bounds on the value, its inverse, and the first two derivatives control +an unnormalized Laguerre--Pólya function uniformly on the whole plane. -/ +theorem exists_uniform_norm_bound_of_jet_bounds {K : ℝ} (hK : 0 ≤ K) : + ∃ B > 0, ∃ C ≥ 0, ∀ f : ℂ → ℂ, IsLaguerrePolya f → f 0 ≠ 0 → + ‖f 0‖ ≤ K → ‖(f 0)⁻¹‖ ≤ K → ‖deriv f 0‖ ≤ K → + ‖deriv (deriv f) 0‖ ≤ K → ∀ z : ℂ, + ‖f z‖ ≤ B * Real.exp (C * ‖z‖ ^ 2) := by + obtain ⟨B, hB, C, hC, hbound⟩ := exists_uniform_norm_bound_of_deriv_bounds (sq_nonneg K) + refine ⟨(K + 1) * B, mul_pos (by linarith) hB, C, hC, ?_⟩ + intro f hf hne hf0 hfi hf1 hf2 z + have hreal : ((f 0).re : ℂ) = f 0 := by + simpa using ofReal_re_iteratedDeriv_zero hf.conj 0 + let c : ℝ := (f 0).re⁻¹ + have hc : (c : ℂ) = (f 0)⁻¹ := by simp only [c, ofReal_inv, hreal] + let G : ℂ → ℂ := fun w => (c : ℂ) * f w + have hG : IsLaguerrePolya G := hf.const_mul_real c + have hG0 : G 0 = 1 := by dsimp [G]; rw [hc, inv_mul_cancel₀ hne] + have hD : deriv G = fun w => (c : ℂ) * deriv f w := by + funext w + exact ((hf.differentiable w).hasDerivAt.const_mul (c : ℂ)).deriv + have hDD : deriv (deriv G) = fun w => (c : ℂ) * deriv (deriv f) w := by + rw [hD] + funext w + exact ((hf.deriv.differentiable w).hasDerivAt.const_mul (c : ℂ)).deriv + have hG1 : ‖deriv G 0‖ ≤ K ^ 2 := by + rw [hD, hc, norm_mul, pow_two] + exact mul_le_mul hfi hf1 (norm_nonneg _) hK + have hG2 : ‖deriv (deriv G) 0‖ ≤ K ^ 2 := by + rw [hDD, hc, norm_mul, pow_two] + exact mul_le_mul hfi hf2 (norm_nonneg _) hK + have heval : f z = f 0 * G z := by + dsimp [G] + rw [hc, ← mul_assoc, mul_inv_cancel₀ hne, one_mul] + rw [heval, norm_mul] + calc + _ ≤ (K + 1) * (B * Real.exp (C * ‖z‖ ^ 2)) := + mul_le_mul (hf0.trans (by linarith)) (hbound G hG hG0 hG1 hG2 z) + (norm_nonneg _) (by linarith) + _ = _ := by ring + +end RealRooted diff --git a/RealRooted/MultiplierSequence/Veronese.lean b/RealRooted/MultiplierSequence/Veronese.lean new file mode 100644 index 000000000..4b40e953a --- /dev/null +++ b/RealRooted/MultiplierSequence/Veronese.lean @@ -0,0 +1,71 @@ +module + +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.MultiplierSequence.PolyaSchur.Factorial +import RealRooted.MultiplierSequence.PolyaSchur.Limit +import RealRooted.VeroneseSection + +/-! +# Ordinary coefficient sections of positive Type-I entire functions + +The coefficient section with stride `r` and residue `s < r` takes ordinary +Taylor coefficients, whereas arithmetic sections take raw derivatives. In +exponential Taylor normalization its multiplier sequence is +`k! * gamma (s + r*k) / (s + r*k)!`. + +The constant sequence specializes to the Mittag--Leffler series +`sum z^k / (s + r*k)!`. For `s = 0`, these are the functions used by +Kim--Kim (2015), Proposition 2.4. Strict Jensen roots are a separate result. +-/ + +public section + +open Polynomial Filter Topology + +namespace RealRooted + +/-- Ordinary coefficient sections of a PF exponential series give PF multiplier +sequences after restoring the exponential normalization. The residue is strictly +smaller than the stride; arbitrary ordinary coefficient tails need not be PF. -/ +theorem IsPFMultiplierSequence.veronese {gamma : ℕ → ℝ} + (hgamma : IsPFMultiplierSequence gamma) {r s : ℕ} (hs : s < r) : + IsPFMultiplierSequence (fun k ↦ + (k.factorial : ℝ) * gamma (s + r * k) / (s + r * k).factorial) := by + have hr : 0 < r := (Nat.zero_le s).trans_lt hs + let p : ℕ → ℝ[X] := fun n ↦ + veroneseSectionPolynomial r s (rescaledJensenPolynomial n gamma) + have hp (n : ℕ) : IsPFPolynomial (p n) := + IsPFPolynomial.of_polyaFreqSeq + (isPolyaFreqSeq_veroneseSectionPolynomial_coeff + (hgamma.isPFPolynomial_rescaledJensenPolynomial n).to_sequence hr hs) + apply isPFMultiplierSequence_of_tendsto + (gamma := fun n k ↦ (k.factorial : ℝ) * (p n).coeff k) + (fun n ↦ (hp n).isPFMultiplierSequence_factorial_mul_coeff) + intro k + simpa only [p, coeff_veroneseSectionPolynomial hr, mul_div_assoc] using + (tendsto_coeff_rescaledJensenPolynomial gamma (s + r * k)).const_mul + (k.factorial : ℝ) + +/-- Every ordinary coefficient section of a positive Type-I exponential +series is again an entire positive Type-I function. -/ +theorem IsPFMultiplierSequence.isLaguerrePolyaTypeI_veronese {gamma : ℕ → ℝ} + (hgamma : IsPFMultiplierSequence gamma) {r s : ℕ} (hs : s < r) : + IsLaguerrePolyaTypeI (complexExpGeneratingFunction (fun k ↦ + (k.factorial : ℝ) * gamma (s + r * k) / (s + r * k).factorial)) := + (hgamma.veronese hs).isLaguerrePolyaTypeI_complexExpGeneratingFunction + +/-- The factorial ratios `k! / (s + r*k)!` are PF multiplier sequences for +all residues `s < r`, including `r = 1, s = 0`. -/ +theorem isPFMultiplierSequence_factorial_veronese {r s : ℕ} (hs : s < r) : + IsPFMultiplierSequence (fun k ↦ (k.factorial : ℝ) / (s + r * k).factorial) := by + simpa only [mul_one] using + (isPFMultiplierSequence_const_sequence (zero_le_one : (0 : ℝ) ≤ 1)).veronese hs + +/-- Integer-stride Mittag--Leffler series, in exponential Taylor notation, +are positive Type-I entire functions at every residue below the stride. -/ +theorem isLaguerrePolyaTypeI_factorial_veronese {r s : ℕ} (hs : s < r) : + IsLaguerrePolyaTypeI (complexExpGeneratingFunction + (fun k ↦ (k.factorial : ℝ) / (s + r * k).factorial)) := + (isPFMultiplierSequence_factorial_veronese hs).isLaguerrePolyaTypeI_complexExpGeneratingFunction + +end RealRooted diff --git a/RealRooted/PFPolynomial/FiniteProduct.lean b/RealRooted/PFPolynomial/FiniteProduct.lean new file mode 100644 index 000000000..54d0a664e --- /dev/null +++ b/RealRooted/PFPolynomial/FiniteProduct.lean @@ -0,0 +1,72 @@ +/- +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 RealRooted.PFPolynomial +public import Mathlib.Analysis.Complex.Basic +import RealRooted.Mathlib.Analysis.Complex.LinearProductFinite + + +/-! +# Normalized PF polynomials and finite-support linear products +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- A finitely supported nonnegative family of linear slopes is exactly a +real PF polynomial with constant coefficient one, evaluated over the complex numbers. -/ +theorem exists_isPFPolynomial_eval_eq_tprod {a : ℕ → ℝ} + (ha : ∀ i, 0 ≤ a i) (hs : (Function.support a).Finite) : + ∃ p : ℝ[X], IsPFPolynomial p ∧ p.coeff 0 = 1 ∧ + ∀ z : ℂ, (p.map ofRealHom).eval z = ∏' i, (1 + (a i : ℂ) * z) := by + classical + let s := hs.toFinset + let p : ℝ[X] := ∏ i ∈ s, (1 + C (a i) * X) + have hp : IsPFPolynomial p := by + apply Finset.prod_induction _ IsPFPolynomial (fun _ _ => IsPFPolynomial.mul) + IsPFPolynomial.one + intro i hi + have hai : 0 < a i := lt_of_le_of_ne (ha i) + (Ne.symm (hs.mem_toFinset.mp hi)) + simpa only [C_0, sub_zero, C_1, add_comm] using + IsPFPolynomial.C_mul_X_add_C_sub_C hai zero_le_one (le_refl (0 : ℝ)) + refine ⟨p, hp, ?_, fun z => ?_⟩ + · simp only [p, coeff_zero_eq_eval_zero, eval_prod, eval_add, eval_one, + eval_mul, eval_C, eval_X, mul_zero, add_zero, Finset.prod_const_one] + · rw [tprod_eq_prod (s := s) (fun i hi => by + have hai : a i = 0 := by + by_contra hne + exact hi (hs.mem_toFinset.mpr hne) + simp only [hai, ofReal_zero, zero_mul, add_zero])] + simp only [p, Polynomial.map_prod, Polynomial.map_add, Polynomial.map_one, + Polynomial.map_mul, Polynomial.map_C, Polynomial.map_X, eval_prod, eval_add, + eval_one, eval_mul, eval_C, eval_X, ofRealHom_eq_coe] + +/-- A normalized PF polynomial has an exact finitely supported nonnegative +linear-product representation, with multiplicities retained. -/ +theorem IsPFPolynomial.exists_finite_support_tprod {p : ℝ[X]} + (hp : IsPFPolynomial p) (h0 : p.coeff 0 = 1) : + ∃ a : ℕ → ℝ, (∀ i, 0 ≤ a i) ∧ (Function.support a).Finite ∧ + ∀ z : ℂ, (p.map ofRealHom).eval z = ∏' i, (1 + (a i : ℂ) * z) := by + classical + obtain ⟨s, hs, -, hprod⟩ := hp.exists_pos_multiset_prod_one_add_C_mul_X h0 + let I := s.toEnumFinset + have hpos (i : I) : 0 ≤ i.val.1 := + (hs i.val.1 (Multiset.mem_of_mem_toEnumFinset i.property)).le + obtain ⟨a, ha, hfin, heq⟩ := + Complex.exists_finite_support_tprod_eq_prod (fun i : I => i.val.1) hpos + refine ⟨a, ha, hfin, fun z => ?_⟩ + rw [heq, hprod, Multiset.prod_map_eq_prod_toEnumFinset] + simp only [Polynomial.map_prod, Polynomial.map_add, Polynomial.map_one, + Polynomial.map_mul, Polynomial.map_C, Polynomial.map_X, eval_prod, eval_add, + eval_one, eval_mul, eval_C, eval_X, ofRealHom_eq_coe] + exact (Finset.prod_attach _ _).symm + +end RealRooted diff --git a/RealRooted/PFPolynomial/LogMomentGap.lean b/RealRooted/PFPolynomial/LogMomentGap.lean new file mode 100644 index 000000000..b82e96897 --- /dev/null +++ b/RealRooted/PFPolynomial/LogMomentGap.lean @@ -0,0 +1,48 @@ +/- +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 RealRooted.PFPolynomial +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +import RealRooted.PFPolynomial.FiniteProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LinearProductMomentMeasure +import RealRooted.Mathlib.MeasureTheory.Measure.AtomicGap +public import Mathlib.Analysis.InnerProductSpace.Basic + +/-! +# Positive logarithmic moment gaps for normalized PF polynomials +-/ + +public section + +open Complex MeasureTheory Polynomial + +namespace RealRooted + +/-- A real PF polynomial with constant coefficient one has an actual +logarithmic moment measure with a positive lower support gap. Constant one +is included and gives the zero measure. -/ +theorem IsPFPolynomial.exists_logDeriv_moments_gap {p : ℝ[X]} + (hp : IsPFPolynomial p) (h0 : p.coeff 0 = 1) : + ∃ (mu : Measure ℝ) (c : ℝ), 0 < c ∧ (∀ᵐ x ∂mu, c ≤ x) ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k + (logDeriv (fun z : ℂ => (p.map ofRealHom).eval z)) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := by + classical + obtain ⟨a, ha, hfin, heq⟩ := hp.exists_finite_support_tprod h0 + have hs : Summable a := summable_of_ne_finset_zero (s := hfin.toFinset) (by + intro i hi + by_contra hne + exact hi (hfin.mem_toFinset.mpr hne)) + obtain ⟨c, hc, hgap⟩ := exists_pos_ae_le_sum_smul_dirac_of_finite_support ha hfin + refine ⟨Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)), + c, hc, hgap, fun k => ?_⟩ + simpa only [funext heq] using logDeriv_tprod_moments_sum_smul_dirac ha hs k + +end RealRooted diff --git a/RealRooted/Production.lean b/RealRooted/Production.lean index 2dcb34aaa..4ee2498c5 100644 --- a/RealRooted/Production.lean +++ b/RealRooted/Production.lean @@ -2361,6 +2361,678 @@ 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 +public import RealRooted.MultiplierSequence.JensenProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Product +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivity +public import RealRooted.RiemannHypothesis.DifferentialOperator +public import RealRooted.RiemannHypothesis.JensenProduct +public import RealRooted.RiemannHypothesis.TotalPositivity +public import RealRooted.Laguerre.NegativeParameters +public import RealRooted.MultiplierSequence.JensenConvolution +public import RealRooted.MultiplierSequence.JensenLaguerre +public import RealRooted.MultiplierSequence.JensenLaguerreBasis +public import RealRooted.MultiplierSequence.JensenLaguerreLimit +public import RealRooted.RiemannHypothesis.Laguerre +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivityConverse +public import RealRooted.RiemannHypothesis.TotalPositivityCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIClosure +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivityZeroPrefix +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.LaguerreInequalities.DerivativeFormula +public import RealRooted.LaguerreInequalities.GeneratingPolynomial +public import RealRooted.LaguerreInequalities.RealZeros +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +public import RealRooted.RiemannHypothesis.GeneralizedLaguerre +public import RealRooted.MultiplierSequence.JensenProductExpansion +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +public import RealRooted.RiemannHypothesis.DerivativeCriteria +public import RealRooted.BasisTransform.Hermite +public import RealRooted.Hermite.FiniteTransfer +public import RealRooted.RiemannHypothesis.HermiteSimple +public import RealRooted.BrandenLC.Sequence +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogConcavity +public import RealRooted.RiemannHypothesis.LogConcavity + +public import RealRooted.Hermite.Companions +public import RealRooted.Hermite.Appell +public import RealRooted.RiemannHypothesis.HermiteCompanions +public import RealRooted.RiemannHypothesis.HermiteInterlacing +public import RealRooted.Hermite.PoulainSimple +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.CompPowCoefficient +public import RealRooted.LaguerreInequalities.AuxiliaryQuartic +public import RealRooted.LaguerreInequalities.AuxiliaryCounterexample +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PolynomialFactors +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenSimple +public import RealRooted.RiemannHypothesis.JensenSimple +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Star +public import RealRooted.Mathlib.Analysis.Complex.Pick.Support +public import RealRooted.LaguerreInequalities.LogDerivative +public import RealRooted.LaguerreInequalities.Nevanlinna +public import RealRooted.LaguerreInequalities.MeasureSupport +public import RealRooted.Mathlib.Analysis.Complex.Pick.Atoms +public import RealRooted.LaguerreInequalities.Turan +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Turan +public import RealRooted.RiemannHypothesis.Turan +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeICriterion +public import RealRooted.LaguerreInequalities.AtomMultiplicity +public import RealRooted.LaguerreInequalities.AtomicRepresentation +public import RealRooted.LaguerreInequalities.InverseSquare +public import RealRooted.Mathlib.Analysis.Analytic.CountableZeros +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Residue +public import RealRooted.Mathlib.Analysis.Normed.Field.WeightedInverse +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.Countable +public import RealRooted.Hermite.PoulainJensenSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteZeros +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RootDivision +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.StrictOperator +public import RealRooted.SimpleRoots.Reflection + +public import RealRooted.Hermite.GaussianOperator +public import RealRooted.Hermite.PolynomialGaussian +public import RealRooted.LaguerreInequalities.CanonicalLogDerivative +public import RealRooted.LaguerreInequalities.CanonicalProduct +public import RealRooted.LaguerreInequalities.CanonicalRepresentation +public import RealRooted.LaguerreInequalities.Characterization +public import RealRooted.LaguerreInequalities.Translation +public import RealRooted.LaguerreInequalities.ZeroFree +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Identity +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AppellMoments +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FiniteGaussian +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FiniteZeros +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorLinear +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Strictness +public import RealRooted.RiemannHypothesis.IntegerSamples +public import RealRooted.RiemannHypothesis.Moments + +public import RealRooted.Hermite.ExponentialJensenFactor +public import RealRooted.Hermite.ExponentialJensenMultiplicity +public import RealRooted.Hermite.PoulainExponential +public import RealRooted.LaguerreInequalities.Strict +public import RealRooted.Mathlib.Analysis.Analytic.TaylorSeries +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOne +public import RealRooted.Mathlib.Analysis.Complex.ForwardDifference +public import RealRooted.Mathlib.Topology.Algebra.IsUniformGroup.FiniteSum +public import RealRooted.MultiplierSequence.JensenPositiveInterlacing +public import RealRooted.MultiplierSequence.JensenSeparation +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DerivativeMultiplicity +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialApply +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialMultiplicity +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.ForwardDifference +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusOne +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusOneProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenSignBoundary +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMoments +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIFactorization +public import RealRooted.RiemannHypothesis.ForwardDifference +public import RealRooted.RiemannHypothesis.JensenInterlacing + +public import RealRooted.MultiplierSequence.JensenLimit +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CoefficientLimit +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.FormalJensen + +public import RealRooted.EulerOperator.RootCounting +public import RealRooted.Mathlib.Algebra.Polynomial.Expand.PositiveRoots +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialRange +public import RealRooted.Mathlib.Analysis.Calculus.LocalExtr.PolynomialEuler +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Subquadratic +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Bounds +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Derivative +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Nonzero +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.TimeDerivative +public import RealRooted.Mathlib.Analysis.Complex.LinearProduct +public import RealRooted.Mathlib.Analysis.SpecificLimits.DescFactorialWeights +public import RealRooted.Mathlib.Analysis.SpecificLimits.WeightedSum +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.PowerSum +public import RealRooted.MultiplierSequence.JensenDifferential +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatFlowStrict +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialCoefficients +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IteratedDerivative +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PowerSumMoments +public import RealRooted.RiemannHypothesis.MomentMeasure + +public import RealRooted.EulerOperator.ArithmeticSections +public import RealRooted.Mathlib.Algebra.Polynomial.Expand.Contract + +public import RealRooted.Hermite.GaussianCoefficients +public import RealRooted.Hermite.GaussianHeatOperator +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Star +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperator +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperatorSimple +public import RealRooted.RiemannHypothesis.HeatOperator + +public import RealRooted.EulerOperator.ArithmeticNormalization +public import RealRooted.EulerOperator.ArithmeticProduct +public import RealRooted.LaguerreInequalities.LocalNonzeroLimit +public import RealRooted.LaguerreInequalities.LocalProductLimit +public import RealRooted.LaguerreInequalities.LocalZeroLimit +public import RealRooted.LaguerreInequalities.ModulusBound +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Composition +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.TimeLimit +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Bounds +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Derivative +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Star +public import RealRooted.Mathlib.Analysis.Complex.LineIdentity +public import RealRooted.Mathlib.Analysis.Complex.LocallyUniformIteratedDeriv +public import RealRooted.Mathlib.Analysis.Complex.Polynomial.CoefficientMajorant +public import RealRooted.Mathlib.Data.Nat.Factorial.ArithmeticProduct +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentDeterminacy +public import RealRooted.Mathlib.Topology.UniformSpace.LocallyUniformAvoidance +public import RealRooted.MultiplierSequence.Arithmetic +public import RealRooted.MultiplierSequence.ArithmeticSection +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperatorCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferential +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LocalLimit +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasureUnique +public import RealRooted.RiemannHypothesis.Arithmetic +public import RealRooted.RiemannHypothesis.HeatOperatorCriterion +public import RealRooted.RiemannHypothesis.InfiniteDifferential +public import RealRooted.RiemannHypothesis.MomentMeasureUnique + +public import RealRooted.BorceaBranden.Transcendental.RealCoefficientBounds +public import RealRooted.LaguerreInequalities.LocalDerivativeBounds +public import RealRooted.LaguerreInequalities.LogConcavity +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.CauchyBound +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.ExponentialPowerBound +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.OfBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderConvergence +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.OrderDerivative +public import RealRooted.Mathlib.Analysis.Convex.LogDerivative +public import RealRooted.Mathlib.Analysis.Normed.Group.LocallyBoundedMajorant +public import RealRooted.Mathlib.MeasureTheory.Integral.Hankel +public import RealRooted.Mathlib.RingTheory.Polynomial.Pochhammer.ReciprocalConvolution +public import RealRooted.MultiplierSequence.BinomialConvolution +public import RealRooted.MultiplierSequence.FactorialRatio +public import RealRooted.MultiplierSequence.GammaConvolution +public import RealRooted.MultiplierSequence.PochhammerConvolution +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GrowthOrder +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialEntire +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialLocal +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialOrder +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.PointwiseLimit +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.UniformDerivativeBounds +public import RealRooted.RiemannHypothesis.EntireDifferential +public import RealRooted.RiemannHypothesis.LocalDifferentialSeries +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.PolynomialFactor +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Constant +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GrowthOrder +public import RealRooted.Mathlib.Analysis.Complex.TaylorGrowth +public import RealRooted.Mathlib.Analysis.SpecificLimits.PowerSequence +public import RealRooted.MultiplierSequence.GammaSampling +public import RealRooted.MultiplierSequence.Geometric +public import RealRooted.MultiplierSequence.PolyaSchur.GeometricGrowth +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteZerosOrder +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeStrict +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIGrowth +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIInfiniteDifferential +public import RealRooted.RiemannHypothesis.StrictMoments +public import RealRooted.RiemannHypothesis.TypeIInfiniteDifferential +public import RealRooted.Mathlib.NumberTheory.Chebyshev.Riesz +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Bounds +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.LocalLogDeriv +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroCount +public import RealRooted.Mathlib.NumberTheory.LSeries.Riesz +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroWindow +public import RealRooted.Mathlib.Topology.Instances.Real.FiniteSeparation +public import RealRooted.Mathlib.Analysis.Complex.PartialFractions +public import RealRooted.Mathlib.Analysis.MellinInversion.Decay +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.GoodHeight +public import RealRooted.Mathlib.Analysis.Contour.Residue.LogDeriv +public import RealRooted.Mathlib.Analysis.Contour.Residue.Rectangle +public import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifference +public import RealRooted.Mathlib.Analysis.MellinInversion.HorizontalDecay +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Log.Weights +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Contour +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.HorizontalDecay +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Order +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.Residues +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroKernel +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSum +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberMajorant +public import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifferenceIntegral +public import RealRooted.Mathlib.Analysis.MellinInversion.FiniteDifferenceInterpolation +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Log.BandBounds +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Pow.Interpolation +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.MonotoneBounds +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.PrimitiveBounds +public import RealRooted.Mathlib.NumberTheory.Chebyshev.Unsmoothing +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.LogGrowth +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ResidualDifference +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RieszContour +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.RieszExplicitFormula +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroDifference +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroDifferenceSqrt +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSumBounds +public import RealRooted.Mathlib.NumberTheory.Chebyshev.RiemannHypothesis +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannZeta.ErrorDifference +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Perturbation +public import RealRooted.Mathlib.Analysis.Asymptotics.IncrementBounds +public import RealRooted.Mathlib.Analysis.Polynomial.OrderedRootPerturbation +public import RealRooted.Mathlib.Analysis.Polynomial.SimpleRootMatching +public import RealRooted.Mathlib.Analysis.Polynomial.SimpleRootSeparation +public import RealRooted.Mathlib.LinearAlgebra.Matrix.LinearSystemPerturbation +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeMoments +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindow +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowMoments +public import RealRooted.Mathlib.NumberTheory.Chebyshev.ShortIntervals +public import RealRooted.Jacobi.MomentPolynomial +public import RealRooted.Mathlib.Algebra.Polynomial.Moment.FiniteAtoms +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.ContinuousTests +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowContinuous +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowOrthogonal +public import RealRooted.RiemannHypothesis.PrimeWindowJacobi +public import RealRooted.RiemannHypothesis.PrimeWindowPolynomial +public import RealRooted.RiemannHypothesis.PrimeWindowRoots +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.GaussianQuadrature +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadratureMoments +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.QuadraturePerturbation +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PerturbationLimits +public import RealRooted.Jacobi.GaussianQuadrature +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Gaussian +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowQuadrature +public import RealRooted.RiemannHypothesis.PrimeWindowQuadrature +public import RealRooted.Interlacing.RootPerturbation +public import RealRooted.Interlacing.SimplePencil +public import RealRooted.Jacobi.MomentStability +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal +public import RealRooted.RiemannHypothesis.PrimeWindowInterlacing +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomial +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Gamma.BetaVariation +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeBeta +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeDerivative +public import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeIntegral +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiBounds +public import RealRooted.Jacobi.RootRates +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.CoefficientRates +public import RealRooted.Mathlib.Analysis.Polynomial.OrderedRootRates +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomialBounds +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiRoots +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.GaussianLimits +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedQuadrature +public import RealRooted.RiemannHypothesis.PrimeWindowJacobiQuadrature +public import RealRooted.Mathlib.MeasureTheory.Measure.AnalyticMomentSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.CompactMomentTransform +public import RealRooted.Mathlib.MeasureTheory.Measure.LocalMomentTransform +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.MomentContinuation +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.SlitPlaneContinuation +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.ZeroFree +public import RealRooted.Mathlib.MeasureTheory.Measure.FiniteMomentStieltjes +public import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeMomentTransform +public import RealRooted.RiemannHypothesis.MomentCriterion +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.NormalizedConjugation +public import RealRooted.Mathlib.Analysis.Complex.LinearProductAnalytic +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.CountableSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentNevanlinna +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentNevanlinnaRepresentation +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AtomicMomentSum +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentResidues +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIIndexedProduct +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicity +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MomentTypeI +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeILinearProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIMomentCriterion +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.EulerRodrigues +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalDerivatives +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalMixtures +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.RationalSeriesDerivatives +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventHierarchy +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ResolventRodrigues +public import RealRooted.Mathlib.Analysis.Complex.LinearProductLogDerivative +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeCompletelyMonotone +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHierarchy +public import RealRooted.RiemannHypothesis.LogDerivativeCompletelyMonotone +public import RealRooted.RiemannHypothesis.LogDerivativeHierarchy +public import RealRooted.Mathlib.MeasureTheory.Measure.AtomicRange +public import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeAtomicMap +public import RealRooted.Mathlib.MeasureTheory.Measure.SortedAtomicMeasure +public import RealRooted.Mathlib.MeasureTheory.Measure.SortedAtomicSequence +public import RealRooted.Mathlib.Order.Monotone.PositiveExtension +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicityProduct +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.SortedEnumeration +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SortedMomentAtoms +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SortedMomentCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SortedProduct +public import RealRooted.MultiplierSequence.JensenBessel +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Bessel +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.QuarticInequality +public import RealRooted.Mathlib.Analysis.Complex.IteratedRealDeriv +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSum +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumLaplace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroHeatTrace +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHeatTrace +public import RealRooted.RiemannHypothesis.HeatTrace +public import RealRooted.Mathlib.Analysis.Complex.LinearProductLowerBound +public import RealRooted.Mathlib.Analysis.Complex.SubexponentialLowerBound +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativePureHeatTrace +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIPureProduct +public import RealRooted.RiemannHypothesis.PureHeatTrace +public import RealRooted.Mathlib.Analysis.Complex.LinearProductDivisor +public import RealRooted.Mathlib.Analysis.Complex.LinearProductInverseMoments +public import RealRooted.Mathlib.Analysis.Complex.PositiveSlopeRoots +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import RealRooted.Mathlib.Topology.Algebra.InfiniteSum.FiberCardinality +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeHeatTrace +public import RealRooted.RiemannHypothesis.NativeHeatTrace +public import RealRooted.Mathlib.Analysis.Complex.AbsoluteZeroHeatTrace +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Zero.Nonempty +public import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralIndex +public import RealRooted.Mathlib.Analysis.Complex.ZeroSpectralNonempty +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.AbsoluteHeatTrace +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.AbsoluteHeatTracePositive +public import RealRooted.Mathlib.Analysis.CompletelyMonotone.ReciprocalHierarchy +public import RealRooted.Mathlib.Analysis.Complex.LogDerivPowMul +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTraceOrigin +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.LaplaceConstant +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginHeatTrace +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginLogDerivativeHierarchy +public import RealRooted.Mathlib.Analysis.Complex.OriginFactor +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeILogDerivativeOrigin +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIOriginFactor +public import RealRooted.Mathlib.Analysis.Complex.RealLogDeriv +public import RealRooted.Mathlib.Analysis.Complex.RealSeries +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RealLogHierarchy +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignLogDerivativeHierarchy +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignSeriesLogHierarchy +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignTypeI +public import RealRooted.RiemannHypothesis.RealLogHierarchy +public import RealRooted.Mathlib.Analysis.Complex.ZeroWeightedHeatTrace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.LaguerreHeatLaplace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeWeightedHeat +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.WeightedHeatLaplace +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.WeightedMixtureLaplace +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.LaplaceKernel +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Rodrigues +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeWeightedHeatHierarchy +public import RealRooted.RiemannHypothesis.NativeWeightedHeatHierarchy +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTraceScale +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignNativeWeightedHeat +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.SameSignSeriesNativeWeightedHeat +public import RealRooted.Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric.Derivatives +public import RealRooted.MultiplierSequence.JensenBesselObstruction +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselClassification +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselInteger +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.BesselTaylor +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +public import RealRooted.LaguerreInequalities.PowerGenerating +public import RealRooted.Mathlib.Algebra.Polynomial.PowerRootsProduct +public import RealRooted.Mathlib.Topology.MetricSpace.Algebra.FiniteProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryPowers +public import RealRooted.RiemannHypothesis.AuxiliaryPowers +public import RealRooted.LaguerreInequalities.AuxiliaryGenerating +public import RealRooted.LaguerreInequalities.AuxiliaryRealZeros +public import RealRooted.LaguerreInequalities.AuxiliarySymmetry +public import RealRooted.LaguerreInequalities.AuxiliaryZeroFactors +public import RealRooted.Mathlib.Algebra.Polynomial.EvenCoefficients +public import RealRooted.Mathlib.Algebra.Polynomial.MobiusTransform.Map +public import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.PartialContinuity +public import RealRooted.Mathlib.Analysis.Complex.RealIdentity +public import RealRooted.Mathlib.Analysis.Complex.TranslateProductContinuity +public import RealRooted.Mathlib.Analysis.Complex.TranslateProductNonzero +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryInequality +public import RealRooted.RiemannHypothesis.AuxiliaryCriterion +public import RealRooted.Mathlib.Analysis.Complex.CompactJets +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialComposition +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolAlgebra +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CompactDifferentialSimple +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.ExponentialCoefficients +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GenusZeroTail +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialCommute +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SmallTypeBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SmallTypeLimit +public import RealRooted.Mathlib.Analysis.Complex.SimpleLimit +public import RealRooted.Mathlib.Algebra.Polynomial.LinearProductDegree +public import RealRooted.Mathlib.Analysis.Complex.LinearProductPrefix +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialTailSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroDifferentialSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LinearProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIDifferentialSimple +public import RealRooted.RiemannHypothesis.XiDifferentialSimple +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianConvergence +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianDerivative +public import RealRooted.Mathlib.Analysis.SpecialFunctions.FactorialExponential +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialGaussian +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialSummable +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianImageGrowth +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSymbolLimit +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianUniformBound +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GaussianProductBound +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.MinimalType +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalDifferential +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialGaussianType +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianJets +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianPolynomialBound +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianPolynomialComposition +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSpatialDerivative +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSymbolAlgebra +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.SymbolSummable +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianApproxComposition +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GenusZeroComposition +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialSymbol +public import RealRooted.Mathlib.Analysis.Complex.LinearPrefixGaussian +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GenusZeroFactorSimple +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.CanonicalSupport +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GenusOneSplit +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.GaussianMargin +public import RealRooted.Mathlib.Analysis.Complex.LinearProductNonpolynomial +public import RealRooted.Mathlib.Analysis.Normed.Group.SparseSubfamily +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalDifferentialSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalMultiplicitySimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalSparseFactor +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Step +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Contraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Convergents +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Step +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Uniqueness +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.GaussianCoefficient +public import RealRooted.Mathlib.Analysis.Complex.CanonicalProduct.ImaginaryAxisBound +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CanonicalRepresentation +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GaussianBoundSimple +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OriginFactor +public import RealRooted.Mathlib.Analysis.Matrix.CoordinateSpectralMeasure +public import RealRooted.Mathlib.MeasureTheory.Measure.FirstMomentTight +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentLimit +public import RealRooted.Mathlib.MeasureTheory.Measure.WeakMomentLimits +public import RealRooted.Mathlib.LinearAlgebra.Matrix.BidiagonalGram +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.FinSchur +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Reindex +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Resolvent +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.Schur +public import RealRooted.Mathlib.LinearAlgebra.Matrix.PowerSeries.StieltjesConvergence +public import RealRooted.Mathlib.LinearAlgebra.Matrix.StieltjesGram +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.TailOffset +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffel +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffelLocal +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentHankelFactorization +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentRecurrence +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentShift +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerGauss +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeries +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesLocal +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesRecurrence +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerPaired +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.StrictMoment +public import RealRooted.RiemannHypothesis.StieltjesFraction +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.FiniteAtomicNorms +public import RealRooted.Mathlib.MeasureTheory.Integral.HankelSupport +public import RealRooted.Mathlib.MeasureTheory.Integral.PolynomialMoment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerTermination +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.InfiniteMoment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteAtomicFraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteMeasureFraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteMoment +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.MomentCriterion +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentDeterminantRatios +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.StieltjesFraction +public import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslation +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentParity +public import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentTranslation +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentParity +public import RealRooted.Mathlib.MeasureTheory.Measure.MomentTranslation +public import RealRooted.Mathlib.Algebra.Polynomial.MomentTranslationSucc +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Translation +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActivePrefix +public import RealRooted.Mathlib.RingTheory.PowerSeries.BinomialTransform.Inverse +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActiveSupportCriterion +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportConstruction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportCriterion +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.AdmissibleParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.BoundedParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.InitialParameterCriterion +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.TerminatingBoundary +public import RealRooted.Mathlib.MeasureTheory.Measure.AeratedMoments +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtMoments +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtSymmetrization +public import RealRooted.Mathlib.MeasureTheory.Measure.AeratedSeries +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.ActiveCoefficients +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Aeration +public import RealRooted.Mathlib.RingTheory.PowerSeries.JacobiFraction.Coefficients +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CatalanBound +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.MeasureBound +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.TranslatedAeration +public import RealRooted.Mathlib.MeasureTheory.Measure.ChainMomentSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.NonnegativeMoments +public import RealRooted.Mathlib.MeasureTheory.Measure.SqrtTranslation +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainAeration +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentsChain +public import RealRooted.Mathlib.MeasureTheory.Measure.BoundedChainSupport +public import RealRooted.Mathlib.MeasureTheory.Measure.ExactMomentSupport +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainCoefficientBound +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentCriterion +public import RealRooted.RiemannHypothesis.CompactStieltjesFraction +public import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Const +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.CompactStieltjesFraction +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Complementary +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ComplementaryChain +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ComplementaryCoefficients +public import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.SquareDescent +public import RealRooted.Mathlib.Analysis.Complex.ImaginarySquareDescent +public import RealRooted.Mathlib.Analysis.Complex.LinearProductFinite +public import RealRooted.Mathlib.MeasureTheory.Measure.AtomicGap +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LinearProductMomentMeasure +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentGapCriterion +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentGapPolynomial +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentMassNearZero +public import RealRooted.PFPolynomial.FiniteProduct +public import RealRooted.PFPolynomial.LogMomentGap +public import RealRooted.RiemannHypothesis.LogMomentGap +public import RealRooted.Hermite.FormalDifferential.Basic +public import RealRooted.Hermite.FormalDifferential.Composition +public import RealRooted.Hermite.FormalDifferential.QuadraticObstruction +public import RealRooted.Hermite.FormalDifferential.Taylor +public import RealRooted.Mathlib.RingTheory.PowerSeries.LowDegree +public import RealRooted.Mathlib.Algebra.Polynomial.TaylorEvaluation +public import RealRooted.Mathlib.Analysis.Analytic.TaylorInverse +public import RealRooted.Mathlib.MeasureTheory.Integral.PolynomialTranslation +public import RealRooted.Mathlib.Probability.Moments.MGFTaylor +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.MGFPolynomialOperator +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.ReciprocalPolynomialOperator +public import RealRooted.Hermite.FormalDifferential.CenteredLimit +public import RealRooted.Hermite.FormalDifferential.OperatorLimits +public import RealRooted.Mathlib.Analysis.SpecialFunctions.ChooseRpow +public import RealRooted.Mathlib.RingTheory.PowerSeries.PowerCoefficient +public import RealRooted.Mathlib.RingTheory.PowerSeries.RescaledPowerLimit +public import RealRooted.Hermite.FormalDifferential.Covariance +public import RealRooted.Hermite.FormalDifferential.Exponential +public import RealRooted.Hermite.FormalDifferential.NegativeVariance +public import RealRooted.Hermite.FormalDifferential.PolynomialCriterion +public import RealRooted.Hermite.FormalDifferential.QuadraticLimit +public import RealRooted.Hermite.FormalDifferential.Structure +public import RealRooted.Hermite.FormalDifferential.Translation +public import RealRooted.Mathlib.RingTheory.PowerSeries.Centering +public import RealRooted.Mathlib.RingTheory.PowerSeries.ExpCoefficient +public import RealRooted.SimpleRoots.Affine +public import RealRooted.Hermite.FormalDifferential.LocallyUniformIterates +public import RealRooted.Hermite.FormalDifferential.RescaledIterates +public import RealRooted.Hermite.FormalDifferential.RootClustering +public import RealRooted.Mathlib.Analysis.Polynomial.LocallyUniformLimit +public import RealRooted.Mathlib.Analysis.Polynomial.RootMatchingLimit +public import RealRooted.Mathlib.RingTheory.PowerSeries.ExponentialJet +public import RealRooted.Hermite.FormalDifferential.Derivative +public import RealRooted.Hermite.FormalDifferential.ExponentialMonomial +public import RealRooted.Hermite.FormalDifferential.NonnegativeVariance +public import RealRooted.Hermite.FormalDifferential.NonrealExponential +public import RealRooted.Hermite.FormalDifferential.NonrealIterates +public import RealRooted.Mathlib.Analysis.Polynomial.NonrealPersistence +public import RealRooted.Mathlib.RingTheory.PowerSeries.FirstDiscrepancy +public import RealRooted.RiemannHypothesis.PolynomialIteration +public import RealRooted.RiemannHypothesis.StrictCoefficient +public import RealRooted.SimpleRoots.QuadraticDiscriminant +public import RealRooted.MittagLeffler.Basic +public import RealRooted.MittagLeffler.Growth +public import RealRooted.MittagLeffler.Jensen +public import RealRooted.MultiplierSequence.Veronese +public import RealRooted.RiemannHypothesis.Veronese +public import RealRooted.Hermite.Generalized.Basic +public import RealRooted.Hermite.Generalized.JensenIdentity +public import RealRooted.Hermite.Generalized.Monic +public import RealRooted.Hermite.Generalized.PositiveFactor +public import RealRooted.Hermite.Generalized.Product +public import RealRooted.Hermite.Generalized.Roots +public import RealRooted.Mathlib.Algebra.Polynomial.Expand.PowerRoots +public import RealRooted.Hermite.FormalDifferential.ExpandOperator +public import RealRooted.Hermite.Generalized.ComplexScaling +public import RealRooted.Hermite.Generalized.DifferentialIdentity +public import RealRooted.Hermite.Generalized.ExponentialRoots +public import RealRooted.Hermite.Generalized.Separability +public import RealRooted.Mathlib.Analysis.Polynomial.SeparableLimit +public import RealRooted.Hermite.FormalDifferential.SeparableIteration +public import RealRooted.Hermite.Generalized.Degree +public import RealRooted.Hermite.FormalDifferential.SeparableNormalization +public import RealRooted.Mathlib.RingTheory.Polynomial.ScaleRoots.Separable +public import RealRooted.Hermite.FormalDifferential.SeparableResidues +public import RealRooted.Mathlib.Analysis.Convex.LogSqrtSlope +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.EvenMoments +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.LogConcaveMoments +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.StrictWeightedCovariance +public import RealRooted.Mathlib.MeasureTheory.Integral.Bochner.WeightedCovariance +public import RealRooted.Mathlib.MeasureTheory.Integral.IntegralEqImproper.Power +public import RealRooted.Mathlib.Analysis.Polynomial.GaussianMajorant +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianTail +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Gaussian.ParameterDerivative +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierMajorant +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierPolynomial +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierSeries +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.FourierSummand +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.ThetaSecondDerivative /-! # RealRooted production umbrella diff --git a/RealRooted/RiemannHypothesis/Arithmetic.lean b/RealRooted/RiemannHypothesis/Arithmetic.lean new file mode 100644 index 000000000..2f4e864c3 --- /dev/null +++ b/RealRooted/RiemannHypothesis/Arithmetic.lean @@ -0,0 +1,42 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.RiemannHypothesis.MultiplierSequence +import RealRooted.MultiplierSequence.Arithmetic + +/-! +# Arithmetic xi multiplier sequences under RH + +Pólya's arithmetic-section theorem applied to the normalized xi coefficients +under RH gives new Type-I entire functions, multiplier sequences and totally +nonnegative Toeplitz matrices at every stride and starting index. +-/ + +public section + +namespace RealRooted + +/-- Under RH, every arithmetic subsequence of normalized xi coefficients is +a PF multiplier sequence. -/ +theorem isPFMultiplierSequence_riemannXiCoeff_arithmetic + (hRH : RiemannHypothesis) (r s : ℕ) : + IsPFMultiplierSequence (fun k => riemannXiCoeff (s + r * k)) := + (isPFMultiplierSequence_riemannXiCoeff hRH).arithmetic r s + +/-- Under RH, every arithmetic exponential section of the xi coefficients +is an entire positive Type-I Laguerre--Pólya function. -/ +theorem isLaguerrePolyaTypeI_riemannXiCoeff_arithmetic + (hRH : RiemannHypothesis) (r s : ℕ) : + IsLaguerrePolyaTypeI + (complexExpGeneratingFunction (fun k => riemannXiCoeff (s + r * k))) := + (isPFMultiplierSequence_riemannXiCoeff hRH).isLaguerrePolyaTypeI_arithmetic r s + +/-- Under RH, every factorial-normalized arithmetic xi sequence has all +Toeplitz minors nonnegative. -/ +theorem isPolyaFreqSeq_riemannXiCoeff_arithmetic_div_factorial + (hRH : RiemannHypothesis) (r s : ℕ) : + IsPolyaFreqSeq (fun k => riemannXiCoeff (s + r * k) / k.factorial) := + (isPFMultiplierSequence_riemannXiCoeff_arithmetic hRH r s).isPolyaFreqSeq_div_factorial + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/AuxiliaryCriterion.lean b/RealRooted/RiemannHypothesis/AuxiliaryCriterion.lean new file mode 100644 index 000000000..4fb379b73 --- /dev/null +++ b/RealRooted/RiemannHypothesis/AuxiliaryCriterion.lean @@ -0,0 +1,62 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import Mathlib.RingTheory.SimpleRing.Principal +public import Mathlib.Analysis.CStarAlgebra.Classes +import RealRooted.RiemannHypothesis.TotalPositivity +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +public import RealRooted.Basic.Coefficients +import RealRooted.RiemannHypothesis +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryCriterion +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryInequality + +/-! +# Fixed-auxiliary criteria for the Riemann hypothesis + +Each admissible auxiliary is fixed independently. It is sufficient to test +all centers and Taylor indices for that one auxiliary. +-/ + +public section + +open Complex Polynomial + +namespace RealRooted + +/-- Under RH every derivative shift of xi satisfies the inequalities of +every monic even auxiliary with nonnegative coefficients. -/ +theorem auxiliaryCoefficient_riemannXiTheta_nonneg_of_even (hRH : RiemannHypothesis) + {g : ℝ[X]} (hg : g.Monic) (he : ∀ k, Odd k → g.coeff k = 0) + (hgn : HasNonnegCoeffs g) (n : ℕ) (x : ℝ) (k : ℕ) : + 0 ≤ auxiliaryCoefficient g (iteratedDeriv n riemannXiTheta) x k := + IsLaguerrePolya.auxiliaryCoefficient_nonneg + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n).toLaguerrePolya hg he hgn x k + +/-- Any one admissible even auxiliary gives a full criterion for Mathlib's RH. -/ +theorem riemannHypothesis_iff_auxiliaryCoefficient_nonneg {g : ℝ[X]} + (hg : g.Monic) (he : ∀ k, Odd k → g.coeff k = 0) (hgn : HasNonnegCoeffs g) + (ha : ∃ a ∈ (g.map ofRealHom).roots, a.im ≠ 0) : + RiemannHypothesis ↔ ∀ x k, 0 ≤ auxiliaryCoefficient g riemannXiTheta x k := by + constructor + · intro h x k + simpa only [iteratedDeriv_zero] using + auxiliaryCoefficient_riemannXiTheta_nonneg_of_even h hg he hgn 0 x k + · intro h + apply riemannHypothesis_iff_riemannXiTheta_zeros.mpr + exact fun _ hz ↦ im_eq_zero_of_auxiliaryCoefficient_nonneg differentiable_riemannXiTheta + riemannXiTheta_conj (fun hzero ↦ riemannXiTheta_zero_ne_zero (congrFun hzero 0)) + hg he ha h hz + +/-- Including every derivative shift preserves the same fixed-auxiliary RH criterion. -/ +theorem riemannHypothesis_iff_auxiliaryCoefficient_shift_nonneg {g : ℝ[X]} + (hg : g.Monic) (he : ∀ k, Odd k → g.coeff k = 0) (hgn : HasNonnegCoeffs g) + (ha : ∃ a ∈ (g.map ofRealHom).roots, a.im ≠ 0) : + RiemannHypothesis ↔ + ∀ n x k, 0 ≤ auxiliaryCoefficient g (iteratedDeriv n riemannXiTheta) x k := by + constructor + · exact fun h n x k ↦ auxiliaryCoefficient_riemannXiTheta_nonneg_of_even h hg he hgn n x k + · intro h + exact (riemannHypothesis_iff_auxiliaryCoefficient_nonneg hg he hgn ha).mpr + (by simpa only [iteratedDeriv_zero] using h 0) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/AuxiliaryPowers.lean b/RealRooted/RiemannHypothesis/AuxiliaryPowers.lean new file mode 100644 index 000000000..b2445b827 --- /dev/null +++ b/RealRooted/RiemannHypothesis/AuxiliaryPowers.lean @@ -0,0 +1,41 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.AissenSchoenbergWhitneyBase +public import Mathlib.Analysis.CStarAlgebra.Classes +import RealRooted.RiemannHypothesis.TotalPositivity +public import RealRooted.LaguerreInequalities.AuxiliaryProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AuxiliaryPowers + +/-! +# Higher-even auxiliary inequalities for xi derivatives under RH + +Cardon's auxiliary `X^n + 1`, for every positive even `n`, gives nonnegative +Taylor coefficients at every real center for each xi derivative shift. +Compressing the coefficients by `n` gives the stronger PF conclusion. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Under RH, compressed higher-even auxiliary coefficients of every xi +derivative form a PF sequence at every real center. -/ +theorem isPolyaFreqSeq_auxiliaryCoefficient_riemannXiTheta (hRH : RiemannHypothesis) + (s : ℕ) {n : ℕ} (hn : n ≠ 0) (he : Even n) (x : ℝ) : + IsPolyaFreqSeq (fun k ↦ auxiliaryCoefficient (X ^ n + 1) + (iteratedDeriv s riemannXiTheta) x (n * k)) := + IsLaguerrePolya.isPolyaFreqSeq_auxiliaryCoefficient + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).toLaguerrePolya hn he x + +/-- Under RH, every Taylor coefficient of a positive-even auxiliary +product of an xi derivative is nonnegative at every real center. -/ +theorem auxiliaryCoefficient_riemannXiTheta_nonneg (hRH : RiemannHypothesis) + (s : ℕ) {n : ℕ} (hn : n ≠ 0) (he : Even n) (x : ℝ) (k : ℕ) : + 0 ≤ auxiliaryCoefficient (X ^ n + 1) (iteratedDeriv s riemannXiTheta) x k := + IsLaguerrePolya.auxiliaryCoefficient_power_nonneg + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).toLaguerrePolya hn he x k + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/CompactStieltjesFraction.lean b/RealRooted/RiemannHypothesis/CompactStieltjesFraction.lean new file mode 100644 index 000000000..ceb6e852d --- /dev/null +++ b/RealRooted/RiemannHypothesis/CompactStieltjesFraction.lean @@ -0,0 +1,81 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentsChain +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainAeration +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment +import RealRooted.RiemannHypothesis.MomentMeasure +import RealRooted.RiemannHypothesis.MomentCriterion + +/-! +# Compact chain fractions for xi logarithmic derivatives under RH + +Wall's compact moment criterion applies to the genuine compact logarithmic +moment measures of every derivative of the square-variable xi function. +The signed Taylor coefficients are identified as complex numbers, not merely +after taking real parts. At derivative order zero, this is equivalent to RH. + +These are consequences of the moment criterion and Wall's theorem; the generic +chain theorem itself is unconditional. +-/ + +public section + +open Complex MeasureTheory PowerSeries + +namespace RealRooted + +/-- Under RH, every xi derivative has bounded chain parameters representing +the actual signed complex coefficients of its logarithmic derivative. -/ +theorem exists_logDeriv_riemannXiTheta_chain (hRH : RiemannHypothesis) (s : ℕ) : + ∃ (L mass : ℝ) (g : ℕ → ℝ), 0 ≤ L ∧ 0 ≤ mass ∧ g 0 = 0 ∧ + (∀ n, g n ∈ Set.Icc 0 1) ∧ + ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv (iteratedDeriv s riemannXiTheta)) 0 / + n.factorial = + ((mass * coeff n (stieltjesTail (chainStieltjesNumerators L g) 0) : ℝ) : ℂ) := by + obtain ⟨_, a, mu, _, ha, _, _, _, hsupport, hmom⟩ := + exists_logDeriv_riemannXiTheta_moment_measure hRH s + have hL : 0 ≤ ∑' i, a i := tsum_nonneg ha + obtain ⟨g, hg0, hg, hf⟩ := exists_chainStieltjes_of_moments_Icc hL + (ae_iff.mpr hsupport) (fun n => (hmom n).1) + refine ⟨∑' i, a i, mu.real Set.univ, g, hL, measureReal_nonneg, hg0, hg, fun n => ?_⟩ + apply (hmom n).2.trans + apply congrArg (fun x : ℝ => (x : ℂ)) + simpa only [coeff_mk, coeff_C_mul] using congrArg (coeff n) hf + +/-- An exact compact chain representation for the xi logarithmic coefficients +implies RH, without requiring the initial chain parameter to vanish. -/ +theorem riemannHypothesis_of_logDeriv_chain {L mass : ℝ} (hL : 0 ≤ L) + (hmass : 0 ≤ mass) {g : ℕ → ℝ} (hg : ∀ n, g n ∈ Set.Icc 0 1) + (hcoeff : ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv riemannXiTheta) 0 / + n.factorial = + ((mass * coeff n (stieltjesTail (chainStieltjesNumerators L g) 0) : ℝ) : ℂ)) : + RiemannHypothesis := by + obtain ⟨mu, _, hpos, hmom⟩ := exists_measure_moments_stieltjesTail + (chainStieltjesNumerators L g) (chainStieltjesNumerators_nonneg hL hg) hmass + apply riemannHypothesis_of_logDeriv_moments hpos (fun n => (hmom n).1) + intro n + exact (hcoeff n).trans (congrArg (fun x : ℝ => (x : ℂ)) (hmom n).2.symm) + +/-- RH is equivalent to an exact normalized compact chain fraction for the +signed complex logarithmic coefficients of the square-variable xi function. -/ +theorem riemannHypothesis_iff_exists_logDeriv_chain : + RiemannHypothesis ↔ + ∃ (L mass : ℝ) (g : ℕ → ℝ), 0 ≤ L ∧ 0 ≤ mass ∧ g 0 = 0 ∧ + (∀ n, g n ∈ Set.Icc 0 1) ∧ + ∀ n : ℕ, (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv riemannXiTheta) 0 / + n.factorial = + ((mass * coeff n (stieltjesTail (chainStieltjesNumerators L g) 0) : ℝ) : ℂ) := by + constructor + · intro hRH + simpa only [iteratedDeriv_zero] using exists_logDeriv_riemannXiTheta_chain hRH 0 + · rintro ⟨L, mass, g, hL, hmass, _, hg, hcoeff⟩ + exact riemannHypothesis_of_logDeriv_chain hL hmass hg hcoeff + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/DerivativeCriteria.lean b/RealRooted/RiemannHypothesis/DerivativeCriteria.lean new file mode 100644 index 000000000..17c493da3 --- /dev/null +++ b/RealRooted/RiemannHypothesis/DerivativeCriteria.lean @@ -0,0 +1,76 @@ +module + +public import RealRooted.RiemannHypothesis +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Hadamard +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros + +/-! +# Real zeros at a fixed xi derivative index + +For each fixed `n`, every zero of `Θ⁽ⁿ⁾` is real exactly when all Jensen +polynomials `J_(d,n)` split. Real zeros at index `n` imply real zeros at every +later derivative index. These are Corollaries 3.2 and 3.3 of Cormac O'Sullivan, +*Zeros of Jensen polynomials and asymptotics for the Riemann xi function*, +https://arxiv.org/abs/2007.13582. + +The growth and nonvanishing hypotheses are established unconditionally for +every derivative. A single positive derivative index is not asserted to +characterize RH. +-/ + +public section + +open Complex Polynomial +open scoped ComplexConjugate + +namespace RealRooted + +/-- For each fixed derivative index, real zeros characterize Laguerre--Pólya membership. -/ +theorem isLaguerrePolya_iteratedDeriv_riemannXiTheta_iff (n : ℕ) : + IsLaguerrePolya (iteratedDeriv n riemannXiTheta) ↔ + ∀ z : ℂ, iteratedDeriv n riemannXiTheta z = 0 → z.im = 0 := by + constructor + · intro h z hz + exact h.im_eq_zero_of_eq_zero + (fun hzero => iteratedDeriv_riemannXiTheta_zero_ne_zero n (congrFun hzero 0)) hz + · exact isLaguerrePolya_of_orderLE_one (orderLE_iteratedDeriv_riemannXiTheta n) + (differentiable_iteratedDeriv_riemannXiTheta n) + (iteratedDeriv_riemannXiTheta_zero_ne_zero n) + (iteratedDeriv_conj riemannXiTheta_conj n) + +/-- O'Sullivan's Corollary 3.2: real zeros at a fixed derivative index are +equivalent to splitting of every Jensen polynomial at that same shift. -/ +theorem riemannXiTheta_iteratedDeriv_zeros_iff_splits (n : ℕ) : + (∀ z : ℂ, iteratedDeriv n riemannXiTheta z = 0 → z.im = 0) ↔ + ∀ d, (riemannXiJensenPolynomial d n).Splits := by + rw [← isLaguerrePolya_iteratedDeriv_riemannXiTheta_iff] + apply isLaguerrePolya_iff_jensenPolynomial_splits + (differentiable_iteratedDeriv_riemannXiTheta n) + intro k + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm] using + (ofReal_riemannXiCoeff (n + k)).symm + +/-- The fixed-shift criterion only needs the positive degrees, as stated in the paper. -/ +theorem riemannXiTheta_iteratedDeriv_zeros_iff_pos_splits (n : ℕ) : + (∀ z : ℂ, iteratedDeriv n riemannXiTheta z = 0 → z.im = 0) ↔ + ∀ d, 0 < d → (riemannXiJensenPolynomial d n).Splits := by + rw [riemannXiTheta_iteratedDeriv_zeros_iff_splits] + refine ⟨fun h d _ => h d, fun h d => ?_⟩ + rcases Nat.eq_zero_or_pos d with rfl | hd + · simp [riemannXiJensenPolynomial, jensenPolynomial_zero] + · exact h d hd + +/-- O'Sullivan's Corollary 3.3: real zeros at one derivative index propagate +to every later index. The statement also includes the equal-index boundary. -/ +theorem riemannXiTheta_iteratedDeriv_zeros_mono {n m : ℕ} (hnm : n ≤ m) + (h : ∀ z : ℂ, iteratedDeriv n riemannXiTheta z = 0 → z.im = 0) : + ∀ z : ℂ, iteratedDeriv m riemannXiTheta z = 0 → z.im = 0 := by + apply (isLaguerrePolya_iteratedDeriv_riemannXiTheta_iff m).mp + have hLP := (isLaguerrePolya_iteratedDeriv_riemannXiTheta_iff n).mpr h + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, + Nat.sub_add_cancel hnm] using hLP.iterate_deriv (m - n) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/DifferentialOperator.lean b/RealRooted/RiemannHypothesis/DifferentialOperator.lean new file mode 100644 index 000000000..6b1bc09a5 --- /dev/null +++ b/RealRooted/RiemannHypothesis/DifferentialOperator.lean @@ -0,0 +1,46 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.RiemannHypothesis +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.OperatorCriterion +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +/-! +# Xi differential operators and the Riemann hypothesis + +Under RH, every derivative of the square-variable xi function defines a +constant-coefficient differential operator preserving real-rootedness. +The unshifted operator's preservation property already characterizes RH. +On polynomials, each operator is a finite sum, so no convergence assumption +on infinite differential series is needed. + +This specializes the operator argument in Section 3.1 of O'Sullivan, +*Zeros of Jensen polynomials and asymptotics for the Riemann xi function*, +https://arxiv.org/abs/2007.13582. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Under RH, the Taylor differential operator of every derivative of xi's +square-variable function preserves real-rootedness. -/ +theorem taylorDifferentialOperator_riemannXiTheta_splits (hRH : RiemannHypothesis) + (n : ℕ) {p : ℝ[X]} (hp : p.Splits) : + (taylorDifferentialOperator (iteratedDeriv n riemannXiTheta) p).Splits := + IsLaguerrePolya.taylorDifferentialOperator_splits + ((riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n) hp + +/-- RH is equivalent to the unshifted xi Taylor differential operator +preserving real-rootedness. -/ +theorem riemannHypothesis_iff_taylorDifferentialOperator_splits : + RiemannHypothesis ↔ ∀ p : ℝ[X], p.Splits → + (taylorDifferentialOperator riemannXiTheta p).Splits := by + rw [riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta] + exact isLaguerrePolya_iff_taylorDifferentialOperator_splits + differentiable_riemannXiTheta riemannXiTheta_conj + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/EntireDifferential.lean b/RealRooted/RiemannHypothesis/EntireDifferential.lean new file mode 100644 index 000000000..eefc21a2e --- /dev/null +++ b/RealRooted/RiemannHypothesis/EntireDifferential.lean @@ -0,0 +1,44 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +import RealRooted.RiemannHypothesis +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialEntire +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IteratedDerivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative + +/-! +# RH-conditional xi operators on the full LP class + +Under Mathlib's RH, every xi derivative is a convergent infinite differential +symbol preserving the entire LP class. Every LP symbol likewise acts on every +xi derivative with an LP entire result. Neither application needs a supplied +growth bound on the other LP input. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH, every xi derivative acts as a convergent differential symbol +on every LP entire target, without an additional target growth hypothesis. -/ +theorem IsLaguerrePolya.riemannXiTheta_differential {f : ℂ → ℂ} + (hf : IsLaguerrePolya f) (hRH : RiemannHypothesis) (n : ℕ) : + IsLaguerrePolya (infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f) := by + have hφ := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iteratedDeriv n + exact hφ.infiniteDifferentialApply_of_left_order hf + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n) (by norm_num) + +/-- Under RH, every LP symbol acts on every xi derivative by a convergent +infinite differential series whose entire sum is LP. -/ +theorem IsLaguerrePolya.differential_riemannXiTheta {φ : ℂ → ℂ} + (hφ : IsLaguerrePolya φ) (hRH : RiemannHypothesis) (n : ℕ) : + IsLaguerrePolya (infiniteDifferentialApply φ (iteratedDeriv n riemannXiTheta)) := by + have hf := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iteratedDeriv n + exact hφ.infiniteDifferentialApply_of_right_order hf + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n) (by norm_num) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/ForwardDifference.lean b/RealRooted/RiemannHypothesis/ForwardDifference.lean new file mode 100644 index 000000000..0057dc0d5 --- /dev/null +++ b/RealRooted/RiemannHypothesis/ForwardDifference.lean @@ -0,0 +1,45 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import Mathlib.Algebra.Group.ForwardDiff +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.RiemannHypothesis.JensenSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.ForwardDifference +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity + +/-! +# Negative signed forward differences of xi coefficients under RH + +For every fixed derivative shift, RH forces a negative signed forward difference +of some positive order. The proof uses the negative real zeros of that xi +derivative and the Taylor series after multiplication by `exp(-z)`. + +This is a derived consequence. Its quantifiers differ from eventual positivity +in the shift for each fixed difference order. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH, at every coefficient shift some positive-order signed forward +difference of the normalized xi coefficients is strictly negative. -/ +theorem exists_signed_fwdDiff_iter_riemannXiCoeff_neg + (hRH : RiemannHypothesis) (s : ℕ) : + ∃ r : ℕ, r ≠ 0 ∧ (-1 : ℝ) ^ r * ((fwdDiff 1)^[r] riemannXiCoeff) s < 0 := by + have hf := isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s + obtain ⟨r, hr, hneg⟩ := hf.exists_signed_fwdDiff_iter_neg + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta s) + (by norm_num) (riemannXiCoeff_pos s) (iteratedDeriv_riemannXiTheta_ne_polynomial s) + refine ⟨r, hr, ?_⟩ + have heq : (fun k => (iteratedDeriv k (iteratedDeriv s riemannXiTheta) 0).re) = + fun k => riemannXiCoeff (k + s) := by + funext k + simp only [riemannXiCoeff, iteratedDeriv_eq_iterate, ← Function.iterate_add_apply] + rw [heq, fwdDiff_iter_comp_add, zero_add] at hneg + exact hneg + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/GeneralizedLaguerre.lean b/RealRooted/RiemannHypothesis/GeneralizedLaguerre.lean new file mode 100644 index 000000000..1d861a148 --- /dev/null +++ b/RealRooted/RiemannHypothesis/GeneralizedLaguerre.lean @@ -0,0 +1,89 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.AissenSchoenbergWhitneyBase +public import RealRooted.LaguerreInequalities.Analytic +import RealRooted.RiemannHypothesis +import RealRooted.LaguerreInequalities.DerivativeFormula +import RealRooted.LaguerreInequalities.RealZeros +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative + +/-! +# Generalized Laguerre criteria for the Riemann hypothesis + +Mathlib's RH is equivalent to all generalized Laguerre inequalities for the +square-variable xi function. Under RH, at every real point and every derivative +shift, these coefficients form a Pólya-frequency sequence. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- RH gives total positivity of the generalized Laguerre coefficients of +every derivative of the square-variable xi function. -/ +theorem isPolyaFreqSeq_laguerreCoefficient_riemannXiTheta + (hRH : RiemannHypothesis) (n : ℕ) (x : ℝ) : + IsPolyaFreqSeq (laguerreCoefficient (iteratedDeriv n riemannXiTheta) x) := by + have hf := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + exact hf.isPolyaFreqSeq_laguerreCoefficient x + +/-- Under RH every generalized Laguerre inequality holds at every real point +for every derivative of the square-variable xi function. -/ +theorem laguerreCoefficient_riemannXiTheta_nonneg + (hRH : RiemannHypothesis) (n k : ℕ) (x : ℝ) : + 0 ≤ laguerreCoefficient (iteratedDeriv n riemannXiTheta) x k := + (isPolyaFreqSeq_laguerreCoefficient_riemannXiTheta hRH n x).nonneg k + +/-- All generalized Laguerre inequalities for the square-variable xi function +are equivalent to Mathlib's Riemann hypothesis. -/ +theorem riemannHypothesis_iff_laguerreCoefficient_nonneg : + RiemannHypothesis ↔ ∀ x k, 0 ≤ laguerreCoefficient riemannXiTheta x k := by + constructor + · intro h x k + simpa only [iteratedDeriv_zero] using laguerreCoefficient_riemannXiTheta_nonneg h 0 k x + · intro h + apply riemannHypothesis_iff_riemannXiTheta_zeros.mpr + exact fun _ hz => im_eq_zero_of_laguerreCoefficient_nonneg + differentiable_riemannXiTheta riemannXiTheta_conj + (fun hzero => riemannXiTheta_zero_ne_zero (congrFun hzero 0)) h hz + +/-- The derivative-shifted generalized Laguerre inequalities give the same +criterion for Mathlib's Riemann hypothesis. -/ +theorem riemannHypothesis_iff_laguerreCoefficient_shift_nonneg : + RiemannHypothesis ↔ + ∀ n x k, 0 ≤ laguerreCoefficient (iteratedDeriv n riemannXiTheta) x k := by + constructor + · exact fun h n x k => laguerreCoefficient_riemannXiTheta_nonneg h n k x + · intro h + exact riemannHypothesis_iff_laguerreCoefficient_nonneg.mpr (by simpa using h 0) + +/-- Total positivity of the generalized Laguerre coefficients at all real +points is another criterion for Mathlib's Riemann hypothesis. -/ +theorem riemannHypothesis_iff_isPolyaFreqSeq_laguerreCoefficient : + RiemannHypothesis ↔ ∀ x, IsPolyaFreqSeq (laguerreCoefficient riemannXiTheta x) := by + constructor + · intro h x + simpa only [iteratedDeriv_zero] using + isPolyaFreqSeq_laguerreCoefficient_riemannXiTheta h 0 x + · intro h + exact riemannHypothesis_iff_laguerreCoefficient_nonneg.mpr fun x k => (h x).nonneg k + +/-- The generalized Laguerre inequalities at zero give alternating binomial +inequalities for every shift of the normalized xi coefficients. -/ +theorem riemannXiCoeff_generalized_laguerre_nonneg + (hRH : RiemannHypothesis) (n k : ℕ) : + 0 ≤ (∑ j ∈ Finset.range (2 * k + 1), + (-1 : ℝ) ^ (j + k) * (2 * k).choose j * + riemannXiCoeff (n + j) * riemannXiCoeff (n + (2 * k - j))) / (2 * k).factorial := by + have hf := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + have h := laguerreCoefficient_riemannXiTheta_nonneg hRH n k 0 + rw [laguerreCoefficient_eq_sum hf.differentiable hf.conj] at h + simpa only [riemannXiCoeff, ofReal_zero, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using h + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/HeatOperator.lean b/RealRooted/RiemannHypothesis/HeatOperator.lean new file mode 100644 index 000000000..b18b64564 --- /dev/null +++ b/RealRooted/RiemannHypothesis/HeatOperator.lean @@ -0,0 +1,43 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta + +import RealRooted.RiemannHypothesis +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperatorSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + +/-! +# RH-conditional simple zeros of entire xi heat images + +Under Mathlib's RH, every derivative of the normalized square-variable xi +function has a nonzero LP backward heat image with only simple real zeros at +every positive time. This does not assert simplicity of the time-zero xi zeros. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- RH gives simple real zeros for every positive-time entire heat image of +every derivative of the normalized square-variable xi function. -/ +theorem heatOperator_riemannXiTheta_simple_zeros (hRH : RiemannHypothesis) (n : ℕ) + {t : ℝ} (ht : 0 < t) : + IsLaguerrePolya (heatOperator (t : ℂ) (iteratedDeriv n riemannXiTheta)) ∧ + heatOperator (t : ℂ) (iteratedDeriv n riemannXiTheta) ≠ 0 ∧ + ∀ z, heatOperator (t : ℂ) (iteratedDeriv n riemannXiTheta) z = 0 → + z.im = 0 ∧ _root_.deriv (heatOperator (t : ℂ) (iteratedDeriv n riemannXiTheta)) z ≠ 0 := by + have hf := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + apply hf.heatOperator_simple_zeros + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n) (by norm_num) + _ ht + intro hz + exact iteratedDeriv_riemannXiTheta_zero_ne_zero n (congrFun hz 0) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/HeatOperatorCriterion.lean b/RealRooted/RiemannHypothesis/HeatOperatorCriterion.lean new file mode 100644 index 000000000..a5a6857fa --- /dev/null +++ b/RealRooted/RiemannHypothesis/HeatOperatorCriterion.lean @@ -0,0 +1,54 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta + +import RealRooted.RiemannHypothesis +public import RealRooted.Mathlib.Analysis.Complex.HeatOperator.Basic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperatorCriterion +import RealRooted.RiemannHypothesis.HeatOperator + +/-! +# RH criteria from positive-time xi heat images + +Mathlib's RH is equivalent to LP membership of the normalized square-variable +xi heat images at all positive times, or just at arbitrarily small positive +times. The criterion also admits all derivative shifts. These are consequences +of the existing RH equivalence and the general heat-limit criterion. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- RH is equivalent to LP membership of every positive-time heat image of +the normalized square-variable xi function. -/ +theorem riemannHypothesis_iff_heatOperator_pos : + RiemannHypothesis ↔ ∀ t : ℝ, 0 < t → + IsLaguerrePolya (heatOperator (t : ℂ) riemannXiTheta) := by + rw [riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta] + exact isLaguerrePolya_iff_heatOperator_pos differentiable_riemannXiTheta + orderLE_half_riemannXiTheta (by norm_num) + +/-- It suffices to test LP membership of xi heat images at arbitrarily small +positive times. No simplicity assertion is made at time zero. -/ +theorem riemannHypothesis_iff_heatOperator_near_zero : + RiemannHypothesis ↔ ∀ ε : ℝ, 0 < ε → ∃ t : ℝ, 0 < t ∧ t < ε ∧ + IsLaguerrePolya (heatOperator (t : ℂ) riemannXiTheta) := by + rw [riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta] + exact isLaguerrePolya_iff_heatOperator_near_zero differentiable_riemannXiTheta + orderLE_half_riemannXiTheta (by norm_num) + +/-- RH is equivalent to LP membership of all derivative shifts of the xi +heat images at every positive time. -/ +theorem riemannHypothesis_iff_iteratedDeriv_heatOperator_pos : + RiemannHypothesis ↔ ∀ n : ℕ, ∀ t : ℝ, 0 < t → + IsLaguerrePolya (heatOperator (t : ℂ) (iteratedDeriv n riemannXiTheta)) := by + constructor + · exact fun hRH n _ ht => (heatOperator_riemannXiTheta_simple_zeros hRH n ht).1 + · intro h + exact riemannHypothesis_iff_heatOperator_pos.mpr (by simpa using h 0) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/HeatTrace.lean b/RealRooted/RiemannHypothesis/HeatTrace.lean new file mode 100644 index 000000000..c49ec9b0d --- /dev/null +++ b/RealRooted/RiemannHypothesis/HeatTrace.lean @@ -0,0 +1,51 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.Analysis.CStarAlgebra.Classes +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +import RealRooted.RiemannHypothesis.TotalPositivity +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHeatTrace +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + +/-! +# Heat traces for the square-variable xi function under RH + +Every derivative shift has a positive-zero heat trace under RH. Its Laplace +moments give all signed real logarithmic derivatives, including at zero. +The statement keeps the possible Type-I exponential constant explicit; +eliminating it using the sharper growth order is a separate strengthening. +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +/-- Under RH, every xi derivative shift admits a completely monotone heat +trace from its positive zero rates, with all logarithmic derivatives given +by its Laplace moments and the explicit Type-I exponential constant. -/ +theorem exists_heatTrace_xi_logDeriv (hRH : RiemannHypothesis) (s : ℕ) : + ∃ (gamma : ℝ) (a : ℕ → ℝ), + 0 ≤ gamma ∧ (∀ i, 0 ≤ a i) ∧ Summable a ∧ + iteratedDeriv s riemannXiTheta = + (fun z : ℂ ↦ iteratedDeriv s riemannXiTheta 0 * exp ((gamma : ℂ) * z) * + ∏' i, (1 + (a i : ℂ) * z)) ∧ + TauCeti.IsCompletelyMonotoneOnIoi (Real.positiveSlopeHeatTrace a) ∧ + ∀ (k : ℕ) (x : ℝ), 0 ≤ x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Real.positiveSlopeHeatTrace a t) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ + (logDeriv (iteratedDeriv s riemannXiTheta) (y : ℂ)).re) x = + gamma * 0 ^ k + ∫ t : ℝ in Set.Ioi 0, + Real.exp (-x * t) * t ^ k * Real.positiveSlopeHeatTrace a t := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).exists_heatTrace_logDeriv + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/Hermite.lean b/RealRooted/RiemannHypothesis/Hermite.lean new file mode 100644 index 000000000..0c4c2caf1 --- /dev/null +++ b/RealRooted/RiemannHypothesis/Hermite.lean @@ -0,0 +1,63 @@ +module + +import RealRooted.RiemannHypothesis +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.Hermite.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Hermite +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros + +/-! +# The Hermite Jensen criterion for the Riemann hypothesis + +This is Theorem 1.2 of Cormac O'Sullivan, *Zeros of Jensen polynomials and +asymptotics for the Riemann xi function* (2021), https://arxiv.org/abs/2007.13582. +The normalization is exactly `Σ binom(d,k) γ(n+k) H_{d-k}(X)`, with physicists' +Hermite polynomials. Already the unshifted family characterizes RH. +-/ + +@[expose] public section + +open Polynomial Complex + +namespace RealRooted + +/-- The Hermite Jensen polynomial of the normalized xi coefficients. -/ +noncomputable def riemannXiHermitePolynomial (d n : ℕ) : ℝ[X] := + hermiteJensenPolynomial d (fun k => riemannXiCoeff (n + k)) + +/-- Under RH, every xi Hermite Jensen polynomial splits over the reals. -/ +theorem riemannXiHermitePolynomial_splits (hRH : RiemannHypothesis) (d n : ℕ) : + (riemannXiHermitePolynomial d n).Splits := by + have hf := riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH + simpa only [riemannXiHermitePolynomial, riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using + (hf.iterate_deriv n).hermiteJensenPolynomial_splits d + +/-- The unshifted Hermite Jensen family characterizes Mathlib's RH. -/ +theorem riemannHypothesis_iff_riemannXiHermitePolynomial_zero_splits : + RiemannHypothesis ↔ ∀ d, (riemannXiHermitePolynomial d 0).Splits := by + constructor + · intro h d + exact riemannXiHermitePolynomial_splits h d 0 + · intro h + have hF := (isLaguerrePolya_mul_exp_neg_sq_iff differentiable_riemannXiTheta + riemannXiTheta_conj).mpr (by + simpa only [riemannXiHermitePolynomial, riemannXiCoeff, Nat.zero_add] using h) + apply riemannHypothesis_iff_riemannXiTheta_zeros.mpr + intro z hz + apply hF.im_eq_zero_of_eq_zero ?_ (by simp [hz]) + intro hzero + have h0 := congrFun hzero 0 + exact riemannXiTheta_zero_ne_zero (by simpa using h0) + +/-- **O'Sullivan's Hermite criterion:** RH holds exactly when the Hermite Jensen +polynomials split for every degree and shift. -/ +theorem riemannHypothesis_iff_riemannXiHermitePolynomial_splits : + RiemannHypothesis ↔ ∀ d n, (riemannXiHermitePolynomial d n).Splits := by + constructor + · exact riemannXiHermitePolynomial_splits + · intro h + exact riemannHypothesis_iff_riemannXiHermitePolynomial_zero_splits.mpr (fun d => h d 0) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/HermiteCompanions.lean b/RealRooted/RiemannHypothesis/HermiteCompanions.lean new file mode 100644 index 000000000..81857a04c --- /dev/null +++ b/RealRooted/RiemannHypothesis/HermiteCompanions.lean @@ -0,0 +1,90 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.Hermite.Companions +import RealRooted.RiemannHypothesis +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity +import RealRooted.MultiplierSequence.InvPochhammer +import RealRooted.MultiplierSequence.PolyaSchur + +/-! +# Xi Hermite companions under RH + +Finite multiplier weights give further simple real-rooted Hermite families +under Mathlib's RH. The factorial family specializes the companion following +O'Sullivan's Corollary 3.8; positive Pochhammer parameters give a derived family. +-/ + +@[expose] public section + +open Polynomial + +namespace RealRooted + +/-- A weighted Hermite companion for a shift of the normalized xi coefficients. -/ +noncomputable def riemannXiHermiteCompanion (d n : ℕ) (weight : ℕ → ℝ) : ℝ[X] := + hermiteCompanion d (fun k => riemannXiCoeff (n + k)) weight + +/-- The factorial-weighted xi Hermite companion. -/ +noncomputable def riemannXiHermiteFactorial (d n : ℕ) : ℝ[X] := + hermiteFactorialPolynomial d (fun k => riemannXiCoeff (n + k)) + +/-- The rising-factorial-weighted xi Hermite companion. -/ +noncomputable def riemannXiHermitePochhammer (d n : ℕ) (a : ℝ) : ℝ[X] := + hermitePochhammerPolynomial d (fun k => riemannXiCoeff (n + k)) a + +/-- RH gives splitting for every finite multiplier weight, allowing vanishing entries. -/ +theorem riemannXiHermiteCompanion_splits (hRH : RiemannHypothesis) + (d n : ℕ) {weight : ℕ → ℝ} (hweight : IsFiniteMultiplierSequence d weight) : + (riemannXiHermiteCompanion d n weight).Splits := + hermiteCompanion_splits hweight (riemannXiJensenPolynomial_splits hRH d n) + +/-- A nonzero final weight makes an RH xi Hermite companion simple-real-rooted. -/ +theorem isSimpleRealRooted_riemannXiHermiteCompanion + (hRH : RiemannHypothesis) (d n : ℕ) {weight : ℕ → ℝ} + (hweight : IsFiniteMultiplierSequence d weight) (hw : weight d ≠ 0) : + IsSimpleRealRooted (riemannXiHermiteCompanion d n weight) := by + apply isSimpleRealRooted_hermiteCompanion_of_coeff_zero hweight + (riemannXiJensenPolynomial_splits hRH d n) _ hw + simpa using (riemannXiCoeff_pos n).ne' + +/-- Nonzero final weight gives exact degree independently of RH. -/ +theorem natDegree_riemannXiHermiteCompanion (d n : ℕ) {weight : ℕ → ℝ} + (hw : weight d ≠ 0) : (riemannXiHermiteCompanion d n weight).natDegree = d := by + apply natDegree_hermiteCompanion _ hw + simpa using (riemannXiCoeff_pos n).ne' + +/-- The leading coefficient is controlled by the final weight, independently of RH. -/ +theorem leadingCoeff_riemannXiHermiteCompanion (d n : ℕ) {weight : ℕ → ℝ} + (hw : weight d ≠ 0) : + (riemannXiHermiteCompanion d n weight).leadingCoeff = riemannXiCoeff n * weight d * 2 ^ d := by + simpa [riemannXiHermiteCompanion] using leadingCoeff_hermiteCompanion (d := d) + (gamma := fun k => riemannXiCoeff (n + k)) (by simpa using (riemannXiCoeff_pos n).ne') hw + +/-- RH implies simple real roots for every factorial-weighted xi Hermite companion. -/ +theorem isSimpleRealRooted_riemannXiHermiteFactorial + (hRH : RiemannHypothesis) (d n : ℕ) : + IsSimpleRealRooted (riemannXiHermiteFactorial d n) := + isSimpleRealRooted_riemannXiHermiteCompanion hRH d n + (isMultiplierSequence_inv_factorial.finite d) (by positivity) + +/-- Every factorial-weighted xi Hermite companion has exact degree without RH. -/ +theorem natDegree_riemannXiHermiteFactorial (d n : ℕ) : + (riemannXiHermiteFactorial d n).natDegree = d := + natDegree_riemannXiHermiteCompanion d n (by positivity) + +/-- RH gives simple roots for every positive Pochhammer parameter and every shift. -/ +theorem isSimpleRealRooted_riemannXiHermitePochhammer + (hRH : RiemannHypothesis) (d n : ℕ) {a : ℝ} (ha : 0 < a) : + IsSimpleRealRooted (riemannXiHermitePochhammer d n a) := + isSimpleRealRooted_riemannXiHermiteCompanion hRH d n + ((isPFMultiplierSequence_iff_multiplierSequence_and_nonneg.mp + (isPFMultiplierSequence_inv_ascPochhammer ha)).1.finite d) + (inv_ne_zero (ascPochhammer_pos d a ha).ne') + +/-- Positive Pochhammer parameters give exact degree independently of RH. -/ +theorem natDegree_riemannXiHermitePochhammer (d n : ℕ) {a : ℝ} (ha : 0 < a) : + (riemannXiHermitePochhammer d n a).natDegree = d := + natDegree_riemannXiHermiteCompanion d n (inv_ne_zero (ascPochhammer_pos d a ha).ne') + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/HermiteInterlacing.lean b/RealRooted/RiemannHypothesis/HermiteInterlacing.lean new file mode 100644 index 000000000..cc07faa2c --- /dev/null +++ b/RealRooted/RiemannHypothesis/HermiteInterlacing.lean @@ -0,0 +1,44 @@ +module + +public import RealRooted.RiemannHypothesis.Hermite +import RealRooted.RiemannHypothesis.HermiteSimple +import RealRooted.Hermite.Appell + +/-! +# Consecutive xi Hermite polynomials + +The Appell identity preserves the xi coefficient shift. Under RH, adjacent +degree rows interlace and share no root. The separate no-common-root assertion +is essential because the project's `StrictInterl` permits coincident roots. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Differentiation lowers the degree and leaves the xi coefficient shift fixed. -/ +theorem derivative_riemannXiHermitePolynomial (d n : ℕ) : + (riemannXiHermitePolynomial (d + 1) n).derivative = + C (2 * (d + 1 : ℝ)) * riemannXiHermitePolynomial d n := + derivative_hermiteJensenPolynomial d (fun k => riemannXiCoeff (n + k)) + +/-- Under RH, consecutive fixed-shift Hermite rows interlace, including the +constant-to-linear endpoint. -/ +theorem riemannXiHermitePolynomial_strictInterl + (hRH : RiemannHypothesis) (d n : ℕ) : + StrictInterl (riemannXiHermitePolynomial d n) (riemannXiHermitePolynomial (d + 1) n) := by + apply hermiteJensenPolynomial_strictInterl (riemannXiHermitePolynomial_splits hRH (d + 1) n) + have h0 := riemannXiHermitePolynomial_ne_zero 0 n + simpa [riemannXiHermitePolynomial, hermiteJensenPolynomial] using h0 + +/-- Adjacent fixed-shift Hermite rows have disjoint real zero sets under RH. -/ +theorem riemannXiHermitePolynomial_no_common_root + (hRH : RiemannHypothesis) (d n : ℕ) (r : ℝ) : + ¬ ((riemannXiHermitePolynomial d n).IsRoot r ∧ + (riemannXiHermitePolynomial (d + 1) n).IsRoot r) := + hermiteJensenPolynomial_no_common_root + (isSimpleRealRooted_riemannXiHermitePolynomial hRH (d + 1) n).2.2 r + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/HermiteSimple.lean b/RealRooted/RiemannHypothesis/HermiteSimple.lean new file mode 100644 index 000000000..62efa412c --- /dev/null +++ b/RealRooted/RiemannHypothesis/HermiteSimple.lean @@ -0,0 +1,73 @@ +module + +public import RealRooted.RiemannHypothesis.Hermite +public import RealRooted.SimpleRoots +import RealRooted.RiemannHypothesis +import RealRooted.Hermite.FiniteTransfer +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity + +/-! +# Simple roots of the xi Hermite Jensen polynomials + +Under Mathlib's Riemann hypothesis, every xi Hermite Jensen polynomial has +simple real roots. This strengthens splitting of the finite polynomial family; +it makes no simplicity assertion about the zeros of the Riemann xi function. +-/ + +public section + +namespace RealRooted + +/-- Every xi Hermite Jensen polynomial has its specified degree, independently of RH. -/ +theorem natDegree_riemannXiHermitePolynomial (d n : ℕ) : + (riemannXiHermitePolynomial d n).natDegree = d := by + apply natDegree_hermiteJensenPolynomial + simpa using (riemannXiCoeff_pos n).ne' + +/-- The xi Hermite Jensen normalization has a strictly positive leading coefficient. -/ +theorem leadingCoeff_riemannXiHermitePolynomial (d n : ℕ) : + (riemannXiHermitePolynomial d n).leadingCoeff = riemannXiCoeff n * 2 ^ d := by + simpa [riemannXiHermitePolynomial] using leadingCoeff_hermiteJensenPolynomial (d := d) + (gamma := fun k => riemannXiCoeff (n + k)) (by simpa using (riemannXiCoeff_pos n).ne') + +/-- The leading coefficient is positive for all degrees and shifts without RH. -/ +theorem leadingCoeff_riemannXiHermitePolynomial_pos (d n : ℕ) : + 0 < (riemannXiHermitePolynomial d n).leadingCoeff := by + rw [leadingCoeff_riemannXiHermitePolynomial] + exact mul_pos (riemannXiCoeff_pos n) (by positivity) + +/-- No xi Hermite Jensen polynomial is the zero polynomial. -/ +theorem riemannXiHermitePolynomial_ne_zero (d n : ℕ) : + riemannXiHermitePolynomial d n ≠ 0 := + Polynomial.leadingCoeff_ne_zero.mp (leadingCoeff_riemannXiHermitePolynomial_pos d n).ne' + +/-- RH implies simple real roots for every degree and shift of the normalized +xi Hermite Jensen polynomials. Constants are included. -/ +theorem isSimpleRealRooted_riemannXiHermitePolynomial + (hRH : RiemannHypothesis) (d n : ℕ) : + IsSimpleRealRooted (riemannXiHermitePolynomial d n) := by + apply isSimpleRealRooted_hermiteJensenPolynomial_of_coeff_zero + (riemannXiJensenPolynomial_splits hRH d n) + simpa using (riemannXiCoeff_pos n).ne' + +/-- RH is equivalent to simple real-rootedness of the unshifted xi Hermite +Jensen family. -/ +theorem riemannHypothesis_iff_simple_hermite_zero : + RiemannHypothesis ↔ ∀ d, IsSimpleRealRooted (riemannXiHermitePolynomial d 0) := by + constructor + · intro h d + exact isSimpleRealRooted_riemannXiHermitePolynomial h d 0 + · intro h + exact riemannHypothesis_iff_riemannXiHermitePolynomial_zero_splits.mpr + (fun d => (h d).2.1) + +/-- RH is equivalent to simple real-rootedness of the xi Hermite Jensen +polynomials in every degree and shift. -/ +theorem riemannHypothesis_iff_simple_hermite : + RiemannHypothesis ↔ ∀ d n, IsSimpleRealRooted (riemannXiHermitePolynomial d n) := by + constructor + · exact isSimpleRealRooted_riemannXiHermitePolynomial + · intro h + exact riemannHypothesis_iff_simple_hermite_zero.mpr (fun d => h d 0) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/Inequalities.lean b/RealRooted/RiemannHypothesis/Inequalities.lean new file mode 100644 index 000000000..dab606263 --- /dev/null +++ b/RealRooted/RiemannHypothesis/Inequalities.lean @@ -0,0 +1,46 @@ +module + +public import RealRooted.RiemannHypothesis +import RealRooted.Basic +import RealRooted.MultiplierSequence.JensenDerivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Inequality + +/-! +# Turán inequalities and differentiation for xi Jensen polynomials + +The inequalities here are consequences of Mathlib's `RiemannHypothesis`. +They do not assert the converse, nor the unconditional Turán theorem. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- The Turán inequality for normalized xi coefficients, conditional on RH. -/ +theorem riemannXiCoeff_logConcave (hRH : RiemannHypothesis) (n : ℕ) : + riemannXiCoeff n * riemannXiCoeff (n + 2) ≤ riemannXiCoeff (n + 1) ^ 2 := by + have h := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + have hi := h.laguerre_form_nonneg 0 + simpa only [riemannXiCoeff, Complex.ofReal_zero, iteratedDeriv_succ, + show n + 2 = (n + 1) + 1 from rfl, sub_nonneg] using hi + +/-- Differentiating increases the shift and lowers the degree parameter. -/ +theorem derivative_riemannXiJensenPolynomial (d n : ℕ) : + (riemannXiJensenPolynomial (d + 1) n).derivative = + C (d + 1 : ℝ) * riemannXiJensenPolynomial d (n + 1) := by + simpa only [riemannXiJensenPolynomial, Nat.add_assoc, Nat.add_left_comm, + Nat.add_comm] using derivative_jensenPolynomial d (fun k => riemannXiCoeff (n + k)) + +/-- Under RH, the shifted degree-`d` Jensen polynomial weakly interlaces the +degree-`d+1` polynomial. Repeated and shared roots are allowed. -/ +theorem riemannXiJensenPolynomial_shift_interl (hRH : RiemannHypothesis) (d n : ℕ) : + Interl (riemannXiJensenPolynomial d (n + 1)) + (riemannXiJensenPolynomial (d + 1) n) := by + simpa only [riemannXiJensenPolynomial, Nat.add_assoc, Nat.add_left_comm, + Nat.add_comm] using jensenPolynomial_shift_interl + (riemannXiJensenPolynomial_splits hRH (d + 1) n) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/InfiniteDifferential.lean b/RealRooted/RiemannHypothesis/InfiniteDifferential.lean new file mode 100644 index 000000000..3dcd7dcf5 --- /dev/null +++ b/RealRooted/RiemannHypothesis/InfiniteDifferential.lean @@ -0,0 +1,49 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta + +import RealRooted.RiemannHypothesis +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferential +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IteratedDerivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative + +/-! +# RH-conditional infinite xi differential operators + +Under Mathlib's RH, every derivative of the square-variable xi function acts +as a normally convergent differential symbol on LP targets of order below two. +Conversely it may serve as the target for any LP symbol of order below two. +Taking both inputs to be xi derivatives gives the shifted xi self-operator family. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH, a xi derivative is an infinite differential symbol preserving +LP membership of every target of order below two. -/ +theorem isLaguerrePolya_riemannXiTheta_differential (hRH : RiemannHypothesis) (n : ℕ) + {f : ℂ → ℂ} (hf : IsLaguerrePolya f) {ρ : ℝ} + (horder : TauCeti.OrderLE f ρ) (hρ : ρ < 2) : + IsLaguerrePolya (infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f) := by + have hφ := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iteratedDeriv n + exact hφ.infiniteDifferentialApply hf + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n) + (by norm_num) horder hρ + +/-- Under RH, an LP differential symbol of order below two sends every xi +derivative to an LP entire function. -/ +theorem isLaguerrePolya_differential_riemannXiTheta (hRH : RiemannHypothesis) (n : ℕ) + {φ : ℂ → ℂ} (hφ : IsLaguerrePolya φ) {ρ : ℝ} + (horder : TauCeti.OrderLE φ ρ) (hρ : ρ < 2) : + IsLaguerrePolya (infiniteDifferentialApply φ (iteratedDeriv n riemannXiTheta)) := by + exact hφ.infiniteDifferentialApply + ((riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iteratedDeriv n) + horder hρ (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n) + (by norm_num) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/IntegerSamples.lean b/RealRooted/RiemannHypothesis/IntegerSamples.lean new file mode 100644 index 000000000..d8bf7939c --- /dev/null +++ b/RealRooted/RiemannHypothesis/IntegerSamples.lean @@ -0,0 +1,29 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.MultiplierSequence.Infinite +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.MultiplierSequence.Laguerre + +/-! +# Integer sample values of xi derivatives as multiplier sequences + +Laguerre's sample-value theorem applies to every Type-I xi derivative under RH. +The sequence consists of values at nonnegative integers, rather than Taylor +coefficients at the origin. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH the values of each xi derivative at nonnegative integers form +a PF multiplier sequence. -/ +theorem isPFMultiplierSequence_iteratedDeriv_riemannXiTheta_natCast + (hRH : RiemannHypothesis) (n : ℕ) : + IsPFMultiplierSequence (fun k => (iteratedDeriv n riemannXiTheta k).re) := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n).isPFMultiplierSequence_eval_natCast + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/JensenInterlacing.lean b/RealRooted/RiemannHypothesis/JensenInterlacing.lean new file mode 100644 index 000000000..aefcf5adc --- /dev/null +++ b/RealRooted/RiemannHypothesis/JensenInterlacing.lean @@ -0,0 +1,47 @@ +module + +public import RealRooted.RiemannHypothesis +import RealRooted.RiemannHypothesis.MultiplierSequence +import RealRooted.RiemannHypothesis.JensenSimple +import RealRooted.MultiplierSequence.JensenPositiveInterlacing +import RealRooted.MultiplierSequence.PolyaSchur +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity + +/-! +# Strict separation of consecutive xi Jensen degrees + +Under RH, positive xi multiplier coefficients give interlacing at each fixed +coefficient shift. Simplicity and the Jensen Euler identity exclude common +roots, so the root inequalities are strict. These are unshifted adjacent +degrees, distinct from the derivative relation that also changes the shift. +-/ + +public section + +namespace RealRooted + +/-- Under RH, consecutive xi Jensen degrees at a fixed shift are in directed interlacing. -/ +theorem strictInterl_riemannXiJensenPolynomial_succ + (hRH : RiemannHypothesis) (d n : ℕ) : + StrictInterl (riemannXiJensenPolynomial d n) (riemannXiJensenPolynomial (d + 1) n) := by + exact strictInterl_jensenPolynomial_succ_of_pos + (isPFMultiplierSequence_iff_multiplierSequence_and_nonneg.mp + (isPFMultiplierSequence_riemannXiCoeff_shift hRH n)).1 + (fun k => riemannXiCoeff_pos (n + k)) d + +/-- Consecutive xi Jensen degrees at a fixed shift have interleaving real root lists under RH. -/ +theorem interlaces_riemannXiJensenPolynomial_succ + (hRH : RiemannHypothesis) (d n : ℕ) : + Interlaces (riemannXiJensenPolynomial d n) (riemannXiJensenPolynomial (d + 1) n) := by + apply (strictInterl_riemannXiJensenPolynomial_succ hRH d n).toInterlaces + simp only [natDegree_riemannXiJensenPolynomial] + +/-- RH excludes a common root in consecutive xi Jensen degrees at a fixed shift. -/ +theorem riemannXiJensenPolynomial_succ_no_common_root + (hRH : RiemannHypothesis) (d n : ℕ) (r : ℝ) : + ¬ ((riemannXiJensenPolynomial d n).IsRoot r ∧ + (riemannXiJensenPolynomial (d + 1) n).IsRoot r) := by + exact jensenPolynomial_succ_no_common_root (by simpa using (riemannXiCoeff_pos n).ne') d + (isSimpleRealRooted_riemannXiJensenPolynomial hRH (d + 1) n).2.2 r + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/JensenProduct.lean b/RealRooted/RiemannHypothesis/JensenProduct.lean new file mode 100644 index 000000000..b00e2839c --- /dev/null +++ b/RealRooted/RiemannHypothesis/JensenProduct.lean @@ -0,0 +1,70 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.MultiplierSequence.JensenProduct +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.RiemannHypothesis +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Product +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenProduct +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star + +/-! +# Auxiliary Jensen criteria for the Riemann hypothesis + +Any fixed nonzero Laguerre--Pólya function supplies a Jensen-product criterion +for RH. The auxiliary is allowed to vanish at the origin, so the statement +includes sine and Bessel examples with zero constant coefficient. + +This is the xi specialization of O'Sullivan's Theorem 3.5, +*Zeros of Jensen polynomials and asymptotics for the Riemann xi function*, +https://arxiv.org/abs/2007.13582. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH, convolving any shifted xi Taylor sequence with the Taylor data +of a Laguerre--Pólya auxiliary gives splitting Jensen polynomials. -/ +theorem jensenProductPolynomial_riemannXiCoeff_splits (hRH : RiemannHypothesis) + {g : ℂ → ℂ} {delta : ℕ → ℝ} (hg : IsLaguerrePolya g) + (hdelta : ∀ k, iteratedDeriv k g 0 = (delta k : ℂ)) (d n : ℕ) : + (jensenProductPolynomial d (fun k => riemannXiCoeff (n + k)) delta).Splits := by + have hf := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + apply (isLaguerrePolya_mul_iff_jensenProductPolynomial_splits hf.differentiable + hg.differentiable ?_ hdelta).mp (hf.mul hg) d + intro k + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm] + using (ofReal_riemannXiCoeff (n + k)).symm + +/-- A fixed nonzero Laguerre--Pólya auxiliary gives an unshifted Jensen-product +criterion for RH, even when that auxiliary vanishes at the origin. -/ +theorem riemannHypothesis_iff_jensenProductPolynomial_splits + {g : ℂ → ℂ} {delta : ℕ → ℝ} (hg : IsLaguerrePolya g) (hg0 : g ≠ 0) + (hdelta : ∀ k, iteratedDeriv k g 0 = (delta k : ℂ)) : + RiemannHypothesis ↔ ∀ d, (jensenProductPolynomial d riemannXiCoeff delta).Splits := by + rw [riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta, + ← isLaguerrePolya_mul_iff_of_orderLE_one orderLE_riemannXiTheta + differentiable_riemannXiTheta riemannXiTheta_zero_ne_zero riemannXiTheta_conj hg hg0] + exact isLaguerrePolya_mul_iff_jensenProductPolynomial_splits + differentiable_riemannXiTheta hg.differentiable + (fun k => (ofReal_riemannXiCoeff k).symm) hdelta + +/-- The full family of shifted Jensen products for any fixed nonzero +Laguerre--Pólya auxiliary characterizes RH. -/ +theorem riemannHypothesis_iff_jensenProductPolynomial_shift_splits + {g : ℂ → ℂ} {delta : ℕ → ℝ} (hg : IsLaguerrePolya g) (hg0 : g ≠ 0) + (hdelta : ∀ k, iteratedDeriv k g 0 = (delta k : ℂ)) : + RiemannHypothesis ↔ ∀ d n, + (jensenProductPolynomial d (fun k => riemannXiCoeff (n + k)) delta).Splits := by + constructor + · exact fun h => jensenProductPolynomial_riemannXiCoeff_splits h hg hdelta + · intro h + apply (riemannHypothesis_iff_jensenProductPolynomial_splits hg hg0 hdelta).mpr + simpa using fun d => h d 0 + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/JensenSimple.lean b/RealRooted/RiemannHypothesis/JensenSimple.lean new file mode 100644 index 000000000..9b5645911 --- /dev/null +++ b/RealRooted/RiemannHypothesis/JensenSimple.lean @@ -0,0 +1,84 @@ +module + +public import RealRooted.RiemannHypothesis +public import RealRooted.SimpleRoots +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.JensenSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +import RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative +import RealRooted.RiemannHypothesis.Inequalities + +/-! +# Simple roots of the ordinary xi Jensen polynomials + +Under Mathlib's RH, every ordinary normalized xi Jensen polynomial has simple +real roots. The argument uses the order-one-half bound for every derivative of +`riemannXiTheta`, unconditional nonpolynomiality, and finite differential-symbol +multiplicity descent. It asserts nothing about simplicity of xi's own zeros. +-/ + +public section + +open Polynomial Complex + +namespace RealRooted + +/-- Every derivative of the square-variable xi function is nonpolynomial, +because all its subsequent Taylor derivatives at zero are nonzero. -/ +theorem iteratedDeriv_riemannXiTheta_ne_polynomial (n : ℕ) (p : ℂ[X]) : + iteratedDeriv n riemannXiTheta ≠ fun z => p.eval z := by + intro hp + have h := congrArg (fun f : ℂ → ℂ => iteratedDeriv (p.natDegree + 1) f 0) hp + rw [Polynomial.iteratedDeriv_fun_eval, + iterate_derivative_eq_zero (Nat.lt_succ_self p.natDegree)] at h + simp only [eval_zero] at h + have heq : iteratedDeriv (p.natDegree + 1) (iteratedDeriv n riemannXiTheta) 0 = + iteratedDeriv (n + (p.natDegree + 1)) riemannXiTheta 0 := by + simp only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm] + rw [heq] at h + exact iteratedDeriv_riemannXiTheta_zero_ne_zero _ h + +/-- RH implies simple real roots for every ordinary xi Jensen polynomial, +in all degrees and all coefficient shifts, including constants. -/ +theorem isSimpleRealRooted_riemannXiJensenPolynomial + (hRH : RiemannHypothesis) (d n : ℕ) : + IsSimpleRealRooted (riemannXiJensenPolynomial d n) := by + have hf := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + have hs := hf.simple_jensenPolynomial + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n) + (by norm_num) (iteratedDeriv_riemannXiTheta_zero_ne_zero n) + (iteratedDeriv_riemannXiTheta_ne_polynomial n) d + simpa only [riemannXiJensenPolynomial, riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using hs + +/-- Consecutive derivative-related xi Jensen rows have no common real root under RH. -/ +theorem riemannXiJensenPolynomial_shift_no_common_root + (hRH : RiemannHypothesis) (d n : ℕ) (r : ℝ) : + ¬ ((riemannXiJensenPolynomial d (n + 1)).IsRoot r ∧ + (riemannXiJensenPolynomial (d + 1) n).IsRoot r) := by + intro hr + have hs := (isSimpleRealRooted_riemannXiJensenPolynomial hRH (d + 1) n).2.2 + apply hs.eval_derivative_ne_zero hr.2 + rw [derivative_riemannXiJensenPolynomial, eval_mul, + show (riemannXiJensenPolynomial d (n + 1)).eval r = 0 from hr.1, mul_zero] + +/-- The unshifted ordinary Jensen family is simple-real-rooted exactly under RH. -/ +theorem riemannHypothesis_iff_simple_jensen_zero : + RiemannHypothesis ↔ ∀ d, IsSimpleRealRooted (riemannXiJensenPolynomial d 0) := by + constructor + · intro h d + exact isSimpleRealRooted_riemannXiJensenPolynomial h d 0 + · intro h + exact riemannHypothesis_iff_riemannXiJensenPolynomial_zero_splits.mpr + (fun d => (h d).2.1) + +/-- RH is equivalent to simple real-rootedness in every ordinary Jensen degree and shift. -/ +theorem riemannHypothesis_iff_simple_jensen : + RiemannHypothesis ↔ ∀ d n, IsSimpleRealRooted (riemannXiJensenPolynomial d n) := by + constructor + · exact isSimpleRealRooted_riemannXiJensenPolynomial + · intro h + exact riemannHypothesis_iff_simple_jensen_zero.mpr (fun d => h d 0) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/Laguerre.lean b/RealRooted/RiemannHypothesis/Laguerre.lean new file mode 100644 index 000000000..31cd9e8b6 --- /dev/null +++ b/RealRooted/RiemannHypothesis/Laguerre.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.MultiplierSequence.JensenLaguerre +import RealRooted.RiemannHypothesis +import RealRooted.MultiplierSequence.JensenLaguerreLimit + +/-! +# Laguerre Jensen criteria for the Riemann hypothesis + +Mathlib's RH is equivalent to splitting of all Laguerre transforms of the +normalized xi coefficients, for every parameter at least `-2`. The unshifted +family suffices. The rising-factorial normalization includes both exceptional +parameters `-1` and `-2` without Gamma quotients. + +## References + +* Cormac O'Sullivan, *Zeros of Jensen polynomials and asymptotics for the Riemann + xi function*, Theorem 3.9, https://arxiv.org/abs/2007.13582. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Under Mathlib's RH, every shifted xi Laguerre Jensen polynomial splits +throughout the extended parameter range. -/ +theorem laguerreJensenPolynomial_riemannXiCoeff_splits + (hRH : RiemannHypothesis) (d n : ℕ) {alpha : ℝ} (halpha : -2 ≤ alpha) : + (laguerreJensenPolynomial d (fun k => riemannXiCoeff (n + k)) alpha).Splits := + laguerreJensenPolynomial_splits (riemannXiJensenPolynomial_splits hRH d n) halpha + +/-- The unshifted Laguerre Jensen family already characterizes Mathlib's RH. -/ +theorem riemannHypothesis_iff_laguerreJensenPolynomial_splits : + RiemannHypothesis ↔ ∀ d (alpha : ℝ), -2 ≤ alpha → + (laguerreJensenPolynomial d riemannXiCoeff alpha).Splits := by + rw [riemannHypothesis_iff_riemannXiJensenPolynomial_zero_splits] + simp only [riemannXiJensenPolynomial, Nat.zero_add, + jensenPolynomial_splits_iff_laguerreJensenPolynomial] + +/-- All degrees, shifts, and parameters in the extended Laguerre range give +an equivalent polynomial criterion for Mathlib's RH. -/ +theorem riemannHypothesis_iff_laguerreJensenPolynomial_shift_splits : + RiemannHypothesis ↔ ∀ d n (alpha : ℝ), -2 ≤ alpha → + (laguerreJensenPolynomial d (fun k => riemannXiCoeff (n + k)) alpha).Splits := by + constructor + · intro h d n alpha halpha + exact laguerreJensenPolynomial_riemannXiCoeff_splits h d n halpha + · intro h + apply riemannHypothesis_iff_laguerreJensenPolynomial_splits.mpr + intro d alpha halpha + simpa only [Nat.zero_add] using h d 0 alpha halpha + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/LocalDifferentialSeries.lean b/RealRooted/RiemannHypothesis/LocalDifferentialSeries.lean new file mode 100644 index 000000000..7e4216654 --- /dev/null +++ b/RealRooted/RiemannHypothesis/LocalDifferentialSeries.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +import RealRooted.RiemannHypothesis +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.InfiniteDifferentialLocal +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +/-! +# Locally convergent xi differential series under RH + +O'Sullivan's Theorem 3.6 applies to every derivative of the square-variable xi +function under Mathlib's Riemann hypothesis. Xi may be either the differential +symbol or the entire target. Ordinary pointwise convergence on a disk suffices; +no growth bound or absolute convergence is assumed here. +-/ + +public section + +open Complex Filter Topology + +namespace RealRooted + +/-- Under RH, every shifted xi differential symbol sends a Laguerre--Pólya +target to an entire Laguerre--Pólya extension whenever its series converges +pointwise on a disk. -/ +theorem exists_eqOn_riemannXi_differential_series (hRH : RiemannHypothesis) (n : ℕ) + {ψ g : ℂ → ℂ} (hψ : IsLaguerrePolya ψ) {r : ℝ} + (hseries : ∀ z ∈ Metric.ball (0 : ℂ) r, + Tendsto (fun d => ∑ j ∈ Finset.range d, + (riemannXiCoeff (n + j) : ℂ) * iteratedDeriv j ψ z / j.factorial) + atTop (𝓝 (g z))) : + ∃ G : ℂ → ℂ, IsLaguerrePolya G ∧ Set.EqOn G g (Metric.ball 0 r) := by + have hξ := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + apply hξ.exists_eqOn_differential_series hψ + intro z hz + simpa only [ofReal_riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using hseries z hz + +/-- Under RH, a Laguerre--Pólya differential symbol acting on any derivative +of xi has a Laguerre--Pólya entire extension as soon as its ordinary series +converges pointwise on a disk. -/ +theorem exists_eqOn_differential_series_riemannXi (hRH : RiemannHypothesis) (n : ℕ) + {φ g : ℂ → ℂ} (hφ : IsLaguerrePolya φ) {r : ℝ} + (hseries : ∀ z ∈ Metric.ball (0 : ℂ) r, + Tendsto (fun d => ∑ j ∈ Finset.range d, + iteratedDeriv j φ 0 * iteratedDeriv (n + j) riemannXiTheta z / j.factorial) + atTop (𝓝 (g z))) : + ∃ G : ℂ → ℂ, IsLaguerrePolya G ∧ Set.EqOn G g (Metric.ball 0 r) := by + apply hφ.exists_eqOn_differential_series + ((riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n) + intro z hz + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm] + using hseries z hz + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/LogConcavity.lean b/RealRooted/RiemannHypothesis/LogConcavity.lean new file mode 100644 index 000000000..c73f7cad4 --- /dev/null +++ b/RealRooted/RiemannHypothesis/LogConcavity.lean @@ -0,0 +1,70 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.LaguerreInequalities.Analytic +public import RealRooted.BrandenLC.Sequence +import RealRooted.RiemannHypothesis +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogConcavity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen + +/-! +# Infinite log-concavity consequences of the Riemann hypothesis + +Under Mathlib's RH, every log-concavity iterate of each ordinary xi Taylor +sequence is PF. All entries and all Toeplitz minors of every iterate are +therefore nonnegative. The factorial normalization is essential: these are +ordinary coefficients `γ(n+k)/k!`, not the raw exponential Taylor data. + +The generalized Laguerre coefficients of every xi derivative have the same +iterated PF property at every real point. These consequences follow from +Brändén's finite preservation theorem and the checked LP approximation results. +-/ + +public section + +namespace RealRooted + +/-- RH implies the PF property after every log-concavity iterate of every +ordinary xi Taylor sequence. -/ +theorem isPolyaFreqSeq_iterate_logConcavity_riemannXiCoeff + (hRH : RiemannHypothesis) (n m : ℕ) : + IsPolyaFreqSeq ((logConcavitySequence^[m]) + (fun k => riemannXiCoeff (n + k) / k.factorial)) := by + have hf := isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n + have h := hf.isPolyaFreqSeq_iterate_logConcavity m + simpa only [riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using h + +/-- Every entry of every log-concavity iterate of the normalized ordinary +xi coefficients is nonnegative under RH. -/ +theorem iterate_logConcavity_riemannXiCoeff_nonneg + (hRH : RiemannHypothesis) (n m k : ℕ) : + 0 ≤ ((logConcavitySequence^[m]) + (fun j => riemannXiCoeff (n + j) / j.factorial)) k := + (isPolyaFreqSeq_iterate_logConcavity_riemannXiCoeff hRH n m).nonneg k + +/-- Under RH the ordinary xi coefficient sequences are strictly infinitely +log-concave: every entry of every iterate is positive. -/ +theorem iterate_logConcavity_riemannXiCoeff_pos + (hRH : RiemannHypothesis) (n m k : ℕ) : + 0 < ((logConcavitySequence^[m]) + (fun j => riemannXiCoeff (n + j) / j.factorial)) k := by + have hf := isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n + have hk : 0 < (iteratedDeriv k (iteratedDeriv n riemannXiTheta) 0).re := by + simpa only [riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using riemannXiCoeff_pos (n + k) + simpa only [riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using hf.iterate_logConcavity_pos m k hk + +/-- RH gives iterated PF inequalities for the generalized Laguerre sequence +of every xi derivative at every real point. -/ +theorem isPolyaFreqSeq_iterate_laguerreCoefficient_riemannXiTheta + (hRH : RiemannHypothesis) (n m : ℕ) (x : ℝ) : + IsPolyaFreqSeq ((logConcavitySequence^[m]) + (laguerreCoefficient (iteratedDeriv n riemannXiTheta) x)) := by + have hf := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + exact hf.isPolyaFreqSeq_iterate_laguerreCoefficient x m + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/LogDerivativeCompletelyMonotone.lean b/RealRooted/RiemannHypothesis/LogDerivativeCompletelyMonotone.lean new file mode 100644 index 000000000..4f47dc409 --- /dev/null +++ b/RealRooted/RiemannHypothesis/LogDerivativeCompletelyMonotone.lean @@ -0,0 +1,53 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import TauCeti.Analysis.CompletelyMonotone.Basic +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeCompletelyMonotone +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + +/-! +# Completely monotone xi logarithmic derivatives under RH + +Under Mathlib's RH, the logarithmic derivative of every derivative of the +square-variable xi function is completely monotone on the positive real axis. +Every alternating real derivative of that logarithmic derivative is also +completely monotone. The unshifted case is the `k = 0` part of Zhang, +arXiv:1506.07012v13, equation (3.28); all derivative shifts follow from the +checked Type-I closure theorem. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- RH makes every shifted xi logarithmic derivative completely monotone +on the positive real axis. -/ +theorem isCompletelyMonotoneOnIoi_xi_logDeriv + (hRH : RiemannHypothesis) (s : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (logDeriv (iteratedDeriv s riemannXiTheta) (x : ℂ)).re) := + IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_logDeriv + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + +/-- RH makes every alternating real derivative of each shifted xi +logarithmic derivative completely monotone on the positive real axis. -/ +theorem isCompletelyMonotoneOnIoi_xi_signed_logDeriv + (hRH : RiemannHypothesis) (s m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 : ℝ) ^ m * iteratedDeriv m + (fun y : ℝ ↦ (logDeriv (iteratedDeriv s riemannXiTheta) (y : ℂ)).re) x) := + IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_signed_logDeriv + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) m + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/LogDerivativeHierarchy.lean b/RealRooted/RiemannHypothesis/LogDerivativeHierarchy.lean new file mode 100644 index 000000000..0ff3e7cd7 --- /dev/null +++ b/RealRooted/RiemannHypothesis/LogDerivativeHierarchy.lean @@ -0,0 +1,43 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import TauCeti.Analysis.CompletelyMonotone.Basic +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeHierarchy +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + +/-! +# The weighted xi logarithmic-derivative hierarchy under RH + +Mathlib's RH implies the full two-index complete-monotonicity hierarchy for +the square-variable xi function and every one of its derivative shifts. +The unshifted case is Zhang, arXiv:1506.07012v13, equation (3.28). +The derivative-shift extension uses the checked Type-I derivative closure. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH, every weighted logarithmic derivative of every xi derivative +shift is completely monotone on the positive real axis. Both hierarchy +indices may be zero, and no simplicity assumption on xi zeros is required. -/ +theorem isCompletelyMonotoneOnIoi_xi_weighted_logDeriv + (hRH : RiemannHypothesis) (s k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ + y ^ (k + m) * iteratedDeriv m (fun z : ℝ ↦ + (logDeriv (iteratedDeriv s riemannXiTheta) (z : ℂ)).re) y) x) := + IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_weighted_logDeriv + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) k m + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/LogMomentGap.lean b/RealRooted/RiemannHypothesis/LogMomentGap.lean new file mode 100644 index 000000000..36384fb73 --- /dev/null +++ b/RealRooted/RiemannHypothesis/LogMomentGap.lean @@ -0,0 +1,52 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.RiemannHypothesis.JensenSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogMomentMassNearZero +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + + +/-! +# RH logarithmic moment measures have no positive lower support gap + +The gap obstruction is unconditional for nonpolynomial entire functions. +RH supplies the nonnegative logarithmic moment measure for each derivative +of the square-variable xi function. No simplicity of xi zeros is asserted. +-/ + +public section + +open Complex MeasureTheory Set + +namespace RealRooted + +/-- Under RH, every derivative of the square-variable xi function has a +nonnegative logarithmic moment measure with positive mass below every positive +threshold. Thus its support cannot be separated from zero by a positive gap. -/ +theorem exists_logDeriv_riemannXiTheta_moments_mass_near_zero + (hRH : RiemannHypothesis) (n : ℕ) : + ∃ mu : Measure ℝ, (∀ᵐ x ∂mu, 0 ≤ x) ∧ + (∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k + (logDeriv (iteratedDeriv n riemannXiTheta)) 0 / k.factorial = + ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ)) ∧ + ∀ c : ℝ, 0 < c → 0 < mu (Iio c) := by + have hf := isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n + have h0 := iteratedDeriv_riemannXiTheta_zero_ne_zero n + obtain ⟨_, a, mu, -, -, -, -, -, hsupport, hmom⟩ := + hf.exists_logDeriv_moment_measure h0 + refine ⟨mu, ?_, hmom, fun c hc => ?_⟩ + · have hs : ∀ᵐ x ∂mu, x ∈ Icc 0 (∑' i, a i) := ae_iff.mpr hsupport + exact hs.mono fun _ hx => hx.1 + · exact measure_Iio_pos_of_logDeriv_moments_nonpolynomial + (differentiable_iteratedDeriv_riemannXiTheta n) h0 + (iteratedDeriv_riemannXiTheta_ne_polynomial n) hmom hc + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/MomentCriterion.lean b/RealRooted/RiemannHypothesis/MomentCriterion.lean new file mode 100644 index 000000000..ce59739db --- /dev/null +++ b/RealRooted/RiemannHypothesis/MomentCriterion.lean @@ -0,0 +1,65 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.MomentContinuation +import RealRooted.RiemannHypothesis.MomentMeasure + +/-! +# A local moment-measure criterion for RH + +RH is equivalent to the signed logarithmic-derivative Taylor coefficients of +the square-variable xi function being genuine moments of a positive measure +on `[0,∞)`. Compact support and finiteness are consequences, not hypotheses. +The forward measure construction was already proved; local analytic +continuation supplies the converse. + +This criterion concerns actual complex coefficients and integrable moments. +It is not a claim of the unrestricted Type-I converse for every entire function. +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +/-- Genuine nonnegative moment data for the actual signed complex coefficients +of the xi logarithmic derivative imply Mathlib's RH. -/ +theorem riemannHypothesis_of_logDeriv_moments + {mu : Measure ℝ} (hpos : ∀ᵐ x ∂mu, 0 ≤ x) + (hint : ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu) + (hmom : ∀ n : ℕ, + (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv riemannXiTheta) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ)) : + RiemannHypothesis := by + apply riemannHypothesis_iff_riemannXiTheta_zeros.mpr + intro z hz + exact (differentiable_riemannXiTheta.zeros_nonpos_of_logDeriv_moments + riemannXiTheta_zero_ne_zero hpos hint hmom z hz).1 + +/-- RH is equivalent to a genuine positive moment measure for the actual +complex signed logarithmic-derivative coefficients at zero. The zeroth moment +ensures finiteness, and analyticity forces compact support. -/ +theorem riemannHypothesis_iff_exists_logDeriv_moment_measure : + RiemannHypothesis ↔ ∃ mu : Measure ℝ, (∀ᵐ x ∂mu, 0 ≤ x) ∧ + ∀ n : ℕ, Integrable (fun x : ℝ ↦ x ^ n) mu ∧ + (-1 : ℂ) ^ n * iteratedDeriv n (logDeriv riemannXiTheta) 0 / n.factorial = + ((∫ x : ℝ, x ^ n ∂mu : ℝ) : ℂ) := by + constructor + · intro hRH + obtain ⟨_, a, mu, _, _, _, _, _, hsupport, hmom⟩ := + exists_logDeriv_riemannXiTheta_moment_measure hRH 0 + refine ⟨mu, ?_, ?_⟩ + · have hs : ∀ᵐ x ∂mu, x ∈ Set.Icc 0 (∑' i, a i) := ae_iff.mpr hsupport + exact hs.mono fun _ hx ↦ hx.1 + · simpa only [iteratedDeriv_zero] using hmom + · rintro ⟨mu, hpos, hmom⟩ + exact riemannHypothesis_of_logDeriv_moments hpos (fun n ↦ (hmom n).1) + (fun n ↦ (hmom n).2) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/MomentMeasure.lean b/RealRooted/RiemannHypothesis/MomentMeasure.lean new file mode 100644 index 000000000..26e58f41e --- /dev/null +++ b/RealRooted/RiemannHypothesis/MomentMeasure.lean @@ -0,0 +1,38 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta + +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasure +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + +/-! +# Positive moment measures for xi logarithmic derivatives under RH + +Under RH, the signed logarithmic-derivative coefficients of every derivative +of the square-variable xi function have an explicit finite positive measure +with compact nonnegative support. +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +/-- Under RH, every xi derivative has a positive compactly supported moment +measure for the actual signed complex coefficients of its logarithmic derivative. -/ +theorem exists_logDeriv_riemannXiTheta_moment_measure + (hRH : RiemannHypothesis) (s : ℕ) : + ∃ (gamma : ℝ) (a : ℕ → ℝ) (mu : Measure ℝ), + 0 ≤ gamma ∧ (∀ i, 0 ≤ a i) ∧ Summable a ∧ + mu = ENNReal.ofReal gamma • Measure.dirac 0 + + Measure.sum (fun i => ENNReal.ofReal (a i) • Measure.dirac (a i)) ∧ + IsFiniteMeasure mu ∧ mu (Set.Icc 0 (∑' i, a i))ᶜ = 0 ∧ + ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv (iteratedDeriv s riemannXiTheta)) 0 / + k.factorial = ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).exists_logDeriv_moment_measure + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/MomentMeasureUnique.lean b/RealRooted/RiemannHypothesis/MomentMeasureUnique.lean new file mode 100644 index 000000000..94ae5b2c9 --- /dev/null +++ b/RealRooted/RiemannHypothesis/MomentMeasureUnique.lean @@ -0,0 +1,33 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMeasureUnique +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + +/-! +# Unique logarithmic-derivative moment measures under RH + +Under Mathlib's RH, each derivative of the normalized square-variable xi +function has a unique positive measure representing its signed logarithmic- +derivative Taylor coefficients. Competitors are arbitrary measures on the real +line with integrable power moments. +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +/-- RH gives a unique genuine moment measure for the signed logarithmic +coefficients of every derivative of the normalized square-variable xi function. -/ +theorem existsUnique_logDeriv_riemannXiTheta_moment_measure + (hRH : RiemannHypothesis) (s : ℕ) : + ∃! mu : Measure ℝ, ∀ k : ℕ, Integrable (fun x : ℝ => x ^ k) mu ∧ + (-1 : ℂ) ^ k * iteratedDeriv k (logDeriv (iteratedDeriv s riemannXiTheta)) 0 / + k.factorial = ((∫ x : ℝ, x ^ k ∂mu : ℝ) : ℂ) := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).existsUnique_logDeriv_moment_measure + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/Moments.lean b/RealRooted/RiemannHypothesis/Moments.lean new file mode 100644 index 000000000..8b1a0274f --- /dev/null +++ b/RealRooted/RiemannHypothesis/Moments.lean @@ -0,0 +1,72 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.BasisTransform.LimitingAppellMoments +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeMoments +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.AppellMoments + +/-! +# Hankel positivity of logarithmic xi coefficients under RH + +For every derivative shift, normalize the square-variable xi function to one +at the origin. Under RH the Newton moments of its ordinary Taylor coefficients +have positive semidefinite Hankel matrices at every positive shift. Equivalently, +these are the signed coefficients of its formal logarithmic derivative. + +This specializes the forward Hankel positivity assertion associated with +Sokal's logarithmic-derivative criterion (Proposition 6), +https://doi.org/10.1016/j.jmaa.2022.126432. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH every shifted Hankel matrix of the normalized xi Newton moments +is positive semidefinite, for every derivative shift. -/ +theorem posSemidef_riemannXiCoeff_limitingAppellMoment + (hRH : RiemannHypothesis) (s n r : ℕ) : + Matrix.PosSemidef (fun i j : Fin n => + limitingAppellMoment + (fun k => riemannXiCoeff (s + k) / (k.factorial * riemannXiCoeff s)) + (i.val + j.val + (r + 1))) := by + have hf := isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s + have h0 : (iteratedDeriv s riemannXiTheta 0).re ≠ 0 := + (riemannXiCoeff_pos s).ne' + simpa only [riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using + hf.posSemidef_limitingAppellMoment h0 n r + +/-- Under RH the signed logarithmic coefficients of each normalized xi +derivative have positive semidefinite Hankel matrices at all positive shifts. -/ +theorem posSemidef_riemannXiCoeff_logOf + (hRH : RiemannHypothesis) (s n r : ℕ) : + Matrix.PosSemidef (fun i j : Fin n => + let k := i.val + j.val + (r + 1) + (-1 : ℝ) ^ (k + 1) * k * PowerSeries.coeff k (PowerSeries.logOf + (PowerSeries.mk + (fun j => riemannXiCoeff (s + j) / (j.factorial * riemannXiCoeff s))))) := by + have hf := isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s + have h0 : (iteratedDeriv s riemannXiTheta 0).re ≠ 0 := + (riemannXiCoeff_pos s).ne' + simpa only [riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using + hf.posSemidef_signed_coeff_logOf h0 n r + +/-- Under RH every shifted Hankel matrix of the signed Taylor coefficients +of the logarithmic derivative of each xi derivative is positive semidefinite. -/ +theorem posSemidef_logDeriv_iteratedDeriv_riemannXiTheta + (hRH : RiemannHypothesis) (s n r : ℕ) : + Matrix.PosSemidef (fun i j : Fin n => + let k := i.val + j.val + r + (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv (iteratedDeriv s riemannXiTheta)) 0).re / k.factorial) := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).posSemidef_logDeriv + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) n r + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/MultiplierSequence.lean b/RealRooted/RiemannHypothesis/MultiplierSequence.lean new file mode 100644 index 000000000..b52da1fed --- /dev/null +++ b/RealRooted/RiemannHypothesis/MultiplierSequence.lean @@ -0,0 +1,108 @@ +module + +public import RealRooted.RiemannHypothesis +import RealRooted.RiemannHypothesis.Inequalities +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity +import RealRooted.MultiplierSequence.JensenDerivative +import RealRooted.MultiplierSequence.PolyaSchur + +/-! +# Positive xi multiplier sequences and negative Jensen roots + +Unconditional coefficient positivity gives exact degrees and excludes all +nonnegative real roots. Under RH the Jensen polynomials split and the xi +coefficients form a PF multiplier sequence. Shifts and pointwise products then +give further real-rootedness preservers. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Every coefficient through the degree parameter is strictly positive. -/ +theorem coeff_riemannXiJensenPolynomial_pos (d n k : ℕ) (hk : k ≤ d) : + 0 < (riemannXiJensenPolynomial d n).coeff k := by + rw [coeff_riemannXiJensenPolynomial, ite_eq_left hk] + exact mul_pos (by exact_mod_cast Nat.choose_pos hk) (riemannXiCoeff_pos _) + +/-- All xi Jensen polynomials have nonnegative coefficients, unconditionally. -/ +theorem hasNonnegCoeffs_riemannXiJensenPolynomial (d n : ℕ) : + HasNonnegCoeffs (riemannXiJensenPolynomial d n) := + hasNonnegCoeffs_jensenPolynomial (n := d) (fun k => (riemannXiCoeff_pos (n + k)).le) + +/-- The degree parameter is exact; no RH assumption is needed. -/ +theorem natDegree_riemannXiJensenPolynomial (d n : ℕ) : + (riemannXiJensenPolynomial d n).natDegree = d := + natDegree_jensenPolynomial (riemannXiCoeff_pos (n + d)).ne' + +/-- Xi Jensen polynomials are nonzero, including in degree zero. -/ +theorem riemannXiJensenPolynomial_ne_zero (d n : ℕ) : + riemannXiJensenPolynomial d n ≠ 0 := by + intro h + have hp := coeff_riemannXiJensenPolynomial_pos d n 0 (Nat.zero_le _) + simp [h] at hp + +/-- Every real root is strictly negative. RH additionally says that all roots are real. -/ +theorem riemannXiJensenPolynomial_roots_neg (d n : ℕ) : + ∀ x ∈ (riemannXiJensenPolynomial d n).roots, x < 0 := + roots_neg_of_hasNonnegCoeffs_of_coeff_zero_ne + (hasNonnegCoeffs_riemannXiJensenPolynomial d n) + (coeff_riemannXiJensenPolynomial_pos d n 0 (Nat.zero_le _)).ne' + +/-- Under RH the xi Jensen polynomials are PF polynomials. -/ +theorem riemannXiJensenPolynomial_isPF (hRH : RiemannHypothesis) (d n : ℕ) : + IsPFPolynomial (riemannXiJensenPolynomial d n) := + IsPFPolynomial.of_realRooted_nonneg (hasNonnegCoeffs_riemannXiJensenPolynomial d n) + (riemannXiJensenPolynomial_splits hRH d n) + +/-- The normalized xi coefficients form a PF multiplier sequence under RH. -/ +theorem isPFMultiplierSequence_riemannXiCoeff (hRH : RiemannHypothesis) : + IsPFMultiplierSequence riemannXiCoeff := by + apply isPFMultiplierSequence_iff_jensenPolynomial_isPF.mpr + intro d + simpa only [riemannXiJensenPolynomial, Nat.zero_add] using + riemannXiJensenPolynomial_isPF hRH d 0 + +/-- In particular, diagonal multiplication by xi coefficients preserves real-rootedness. -/ +theorem isMultiplierSequence_riemannXiCoeff (hRH : RiemannHypothesis) : + IsMultiplierSequence riemannXiCoeff := + (isPFMultiplierSequence_iff_multiplierSequence_and_nonneg.mp + (isPFMultiplierSequence_riemannXiCoeff hRH)).1 + +/-- Every forward shift of the xi sequence is a PF multiplier sequence under RH. -/ +theorem isPFMultiplierSequence_riemannXiCoeff_shift (hRH : RiemannHypothesis) (n : ℕ) : + IsPFMultiplierSequence (fun k => riemannXiCoeff (n + k)) := by + simpa only [Nat.add_comm] using (isPFMultiplierSequence_riemannXiCoeff hRH).shift n + +/-- Pointwise multiplication by any PF multiplier sequence gives another such sequence. -/ +theorem isPFMultiplierSequence_riemannXiCoeff_mul (hRH : RiemannHypothesis) + {delta : ℕ → ℝ} (hdelta : IsPFMultiplierSequence delta) : + IsPFMultiplierSequence (fun k => riemannXiCoeff k * delta k) := + (isPFMultiplierSequence_riemannXiCoeff hRH).mul hdelta + +/-- The xi diagonal operator preserves splitting over the reals under RH. -/ +theorem diagonalOperator_riemannXiCoeff_splits (hRH : RiemannHypothesis) + {p : ℝ[X]} (hp : p.Splits) : (diagonalOperator riemannXiCoeff p).Splits := by + rcases (isMultiplierSequence_riemannXiCoeff hRH).diagonalOperator_eq_zero_or_splits hp + with h | h + · rw [h] + exact Splits.zero + · exact h + +/-- The xi diagonal operator preserves the PF polynomial cone under RH. -/ +theorem diagonalOperator_riemannXiCoeff_isPF (hRH : RiemannHypothesis) + {p : ℝ[X]} (hp : IsPFPolynomial p) : IsPFPolynomial (diagonalOperator riemannXiCoeff p) := + (isPFMultiplierSequence_riemannXiCoeff hRH).diagonalOperator_isPF hp + +/-- Consecutive shifted xi Jensen polynomials have weakly interleaving root lists +with degree gap one. This does not assert distinct roots. -/ +theorem riemannXiJensenPolynomial_shift_interlaces (hRH : RiemannHypothesis) (d n : ℕ) : + Interlaces (riemannXiJensenPolynomial d (n + 1)) + (riemannXiJensenPolynomial (d + 1) n) := by + have h := (riemannXiJensenPolynomial_shift_interl hRH d n).toStrictInterl_of_ne + (riemannXiJensenPolynomial_ne_zero _ _) (riemannXiJensenPolynomial_ne_zero _ _) + exact h.toInterlaces (by simp only [natDegree_riemannXiJensenPolynomial]) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/NativeHeatTrace.lean b/RealRooted/RiemannHypothesis/NativeHeatTrace.lean new file mode 100644 index 000000000..e9ae9af82 --- /dev/null +++ b/RealRooted/RiemannHypothesis/NativeHeatTrace.lean @@ -0,0 +1,47 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeHeatTrace +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative + +/-! +# Native xi zero heat traces under RH + +All statements use the actual native divisor, including multiplicities, +and explicit classical RH. The unconditional order-one-half estimate supplies the pure product used +in the Laplace identity. Analytic multiplicities are retained without +choosing an enumeration of zeros. +-/ + +public section + +open Complex Filter MeasureTheory Topology + +namespace RealRooted + +/-- Under RH, native xi zero heat traces are completely monotone and their +Laplace moments equal all signed logarithmic derivatives at `x ≥ 0`. -/ +theorem native_heatTrace_xi_logDeriv (hRH : RiemannHypothesis) (s : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta)) ∧ + ∀ (k : ℕ) (x : ℝ), 0 ≤ x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta) t) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ + (logDeriv (iteratedDeriv s riemannXiTheta) (y : ℂ)).re) x = + ∫ t : ℝ in Set.Ioi 0, Real.exp (-x * t) * t ^ k * + Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta) t := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).native_heatTrace_logDeriv + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta s) + (by norm_num) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/NativeWeightedHeatHierarchy.lean b/RealRooted/RiemannHypothesis/NativeWeightedHeatHierarchy.lean new file mode 100644 index 000000000..cf575c4b4 --- /dev/null +++ b/RealRooted/RiemannHypothesis/NativeWeightedHeatHierarchy.lean @@ -0,0 +1,55 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.Mathlib.Analysis.Complex.ZeroHeatTrace +public import RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.NativeWeightedHeatHierarchy +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative + +/-! +# Native weighted heat and Laguerre identities for xi under RH + +Classical RH supplies Type-I membership for every fixed derivative of the +square-variable xi function. Its unconditional order-one-half bound removes +the exponential factor. Both integral representations use the actual native +zero multiplicities and the same logarithmic-derivative expression. +-/ + +public section + +open Complex MeasureTheory Set + +namespace RealRooted + +/-- Under classical RH, every shifted xi hierarchy has its positive +weighted-heat and Laguerre integral representations, with actual integrability. -/ +theorem native_weighted_heatTrace_xi_logDeriv (hRH : RiemannHypothesis) + (s k m : ℕ) {x : ℝ} (hx : 0 < x) : + (IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta)) t) (Ioi 0) ∧ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ + (logDeriv (iteratedDeriv s riemannXiTheta) (z : ℂ)).re) y) x = + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * (-t) ^ k * + iteratedDeriv k (Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta)) t) ∧ + (IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ m * + Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta) t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) (Ioi 0) ∧ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv m (fun z : ℝ ↦ + (logDeriv (iteratedDeriv s riemannXiTheta) (z : ℂ)).re) y) x = + ∫ t : ℝ in Ioi 0, Real.exp (-x * t) * t ^ m * + Complex.zeroHeatTrace (iteratedDeriv s riemannXiTheta) t * + (Polynomial.generalizedLaguerre k (m : ℝ)).eval (-x * t)) := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).native_weighted_heatTrace_logDeriv + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_iteratedDeriv_riemannXiTheta s) (by norm_num) k m hx + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/PolynomialIteration.lean b/RealRooted/RiemannHypothesis/PolynomialIteration.lean new file mode 100644 index 000000000..5ffcd1099 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PolynomialIteration.lean @@ -0,0 +1,60 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.Hermite.FormalDifferential.Basic +public import RealRooted.SimpleRoots +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Operator +import RealRooted.RiemannHypothesis.StrictCoefficient +import RealRooted.Hermite.FormalDifferential.NegativeVariance +import RealRooted.Hermite.FormalDifferential.Taylor +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum + +/-! +# Eventual simple roots under iterated xi differential operators + +For each derivative of the normalized square-variable xi function, ordinary +symbol coefficients are `γ(n+k)/k!`. The second-cumulant condition is exactly +the strict raw Turán inequality, not the weaker factorial-normalized inequality. +RH supplies that condition here. The unconditional kernel proof remains separate. +-/ + +public section + +open Polynomial Filter RealRooted.HermitePoulain + +namespace RealRooted + +/-- Under RH, iterating any shifted xi formal differential symbol eventually +makes every nonzero real polynomial simple-real-rooted. -/ +theorem eventually_simple_formal_riemannXi_iterates (hRH : RiemannHypothesis) + (n : ℕ) {P : ℝ[X]} (hP : P ≠ 0) : + ∀ᶠ m : ℕ in atTop, IsSimpleRealRooted + ((formalDifferentialOperator + (PowerSeries.mk fun k => riemannXiCoeff (n + k) / k.factorial))^[m] P) := by + apply eventually_simple_iterate_formalDifferentialOperator ?_ ?_ hP + · simpa using (riemannXiCoeff_pos n).ne' + · have h := riemannXiCoeff_strict_logConcave hRH n + norm_num only [PowerSeries.constantCoeff_mk, PowerSeries.coeff_mk, + Nat.factorial_zero, Nat.factorial_one, Nat.factorial_two, Nat.cast_one, + Nat.cast_ofNat, Nat.add_zero, div_one] + linarith + +/-- Under RH, the actual Taylor operator of each xi derivative eventually gives +simple real roots on every nonzero real polynomial, with no input root assumption. -/ +theorem eventually_simple_taylor_riemannXi_iterates (hRH : RiemannHypothesis) + (n : ℕ) {P : ℝ[X]} (hP : P ≠ 0) : + ∀ᶠ m : ℕ in atTop, IsSimpleRealRooted + ((taylorDifferentialOperator (iteratedDeriv n riemannXiTheta))^[m] P) := by + have hop : formalDifferentialOperator + (PowerSeries.mk fun k => riemannXiCoeff (n + k) / k.factorial) = + taylorDifferentialOperator (iteratedDeriv n riemannXiTheta) := by + funext Q + apply formalDifferentialOperator_eq_taylor + intro k + simp only [PowerSeries.coeff_mk, Complex.div_natCast_re, riemannXiCoeff, + iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm] + simpa only [hop] using eventually_simple_formal_riemannXi_iterates hRH n hP + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/PrimeWindowInterlacing.lean b/RealRooted/RiemannHypothesis/PrimeWindowInterlacing.lean new file mode 100644 index 000000000..4533bb2c2 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowInterlacing.lean @@ -0,0 +1,205 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +import RealRooted.Jacobi.MomentPolynomial + +public import RealRooted.SimpleRoots + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal + +public import RealRooted.Jacobi.Orthogonality.Integral + +import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomial +import RealRooted.Jacobi.MomentStability +import Mathlib.Tactic.Linarith +import RealRooted.RiemannHypothesis.PrimeWindowJacobi + +/-! +# Strict interlacing between independent prime windows under RH + +RH supplies convergence of the weighted prime moments to one fixed Jacobi +moment sequence. Unconditional stability then gives strict root separation +between independently moving prime windows and between a prime window and the +fixed reference polynomial. Every nontrivial real pencil is simple and split. + +The two window centers need only tend to infinity: no relative order or +disjointness is assumed. Degrees are fixed, and degree zero is included. These +are asymptotic cross-family conclusions; ordinary orthogonal-polynomial +real-rootedness for one positive measure is an unconditional fact. +All root comparisons use the common normalized window coordinate `(p - X) / H`. +-/ + +public section + +open Filter Topology Polynomial + +namespace RiemannHypothesis + +/-- Under RH, independent prime-window centers tending to infinity give +genuine adjacent-degree interlacing for the same fixed Jacobi reference weight. +The explicit no-common-root conclusion strengthens the repository's weak root +comparisons in `Interlaces`. -/ +theorem eventually_interlaces_primeWindowWeightedPolynomial + (hRH : RiemannHypothesis) {ι : Type*} {l : Filter ι} {A B : ι → ℝ} + (hA : Tendsto A l atTop) (hB : Tendsto B l atTop) + {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ t in l, + RealRooted.Interlaces + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + (A t) (Real.sqrt (A t) * Real.log (A t) ^ 3) n) + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + (B t) (Real.sqrt (B t) * Real.log (B t) ^ 3) (n + 1)) ∧ + ∀ x, + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + (A t) (Real.sqrt (A t) * Real.log (A t) ^ 3) n).IsRoot x → + ¬ (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + (B t) (Real.sqrt (B t) * Real.log (B t) ^ 3) (n + 1)).IsRoot x := by + exact RealRooted.eventually_interlaces_jacobi_moment_polynomials + (α := α) (β := β) (n := n) (by linarith) (by linarith) + (fun k _ ↦ (hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k).comp hA) + (fun k _ ↦ (hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k).comp hB) + +/-- One eventual threshold works for every nontrivial real pencil parameter +pair, even when the lower and higher polynomials come from independent windows. -/ +theorem eventually_isSimpleRealRooted_primeWindow_pencil + (hRH : RiemannHypothesis) {ι : Type*} {l : Filter ι} {A B : ι → ℝ} + (hA : Tendsto A l atTop) (hB : Tendsto B l atTop) + {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ t in l, ∀ a b : ℝ, a ≠ 0 ∨ b ≠ 0 → + RealRooted.IsSimpleRealRooted + (C a * Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + (A t) (Real.sqrt (A t) * Real.log (A t) ^ 3) n + + C b * Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + (B t) (Real.sqrt (B t) * Real.log (B t) ^ 3) (n + 1)) := by + exact RealRooted.eventually_isSimpleRealRooted_jacobi_moment_pencil + (α := α) (β := β) (n := n) (by linarith) (by linarith) + (fun k _ ↦ (hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k).comp hA) + (fun k _ ↦ (hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k).comp hB) + +/-- The degree-`n` prime polynomial eventually lies strictly between the roots +of the fixed degree-`n+1` monic Jacobi reference, under RH. -/ +theorem eventually_interlaces_primeWindow_jacobi + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, + RealRooted.Interlaces + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n) + (shiftedJacobiMonic (n + 1) α β) ∧ + ∀ x, + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).IsRoot x → + ¬ (shiftedJacobiMonic (n + 1) α β).IsRoot x := by + have h := RealRooted.eventually_interlaces_jacobi_moment_polynomials + (μ := fun X : ℝ ↦ Chebyshev.primeWindowWeightedMoment + (RealRooted.shiftedJacobiWeight α β) X (Real.sqrt X * Real.log X ^ 3)) + (ν := fun _ : ℝ ↦ RealRooted.shiftedJacobiMoment α β) + (α := α) (β := β) (n := n) (by linarith) (by linarith) + (fun k _ ↦ hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k) + (fun _ _ ↦ tendsto_const_nhds) + simpa only [Chebyshev.primeWindowWeightedPolynomial, + ← RealRooted.shiftedJacobiMonic_eq_monicMomentPolynomial (n + 1) + (by linarith : -1 < α) (by linarith : -1 < β)] using h + +/-- The fixed degree-`n` Jacobi reference eventually lies strictly between +the roots of the degree-`n+1` weighted prime polynomial, under RH. -/ +theorem eventually_interlaces_jacobi_primeWindow + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, + RealRooted.Interlaces (shiftedJacobiMonic n α β) + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) (n + 1)) ∧ + ∀ x, (shiftedJacobiMonic n α β).IsRoot x → + ¬ (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) (n + 1)).IsRoot x := by + have h := RealRooted.eventually_interlaces_jacobi_moment_polynomials + (μ := fun _ : ℝ ↦ RealRooted.shiftedJacobiMoment α β) + (ν := fun X : ℝ ↦ Chebyshev.primeWindowWeightedMoment + (RealRooted.shiftedJacobiWeight α β) X (Real.sqrt X * Real.log X ^ 3)) + (α := α) (β := β) (n := n) (by linarith) (by linarith) + (fun _ _ ↦ tendsto_const_nhds) + (fun k _ ↦ hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k) + simpa only [Chebyshev.primeWindowWeightedPolynomial, + ← RealRooted.shiftedJacobiMonic_eq_monicMomentPolynomial n + (by linarith : -1 < α) (by linarith : -1 < β)] using h + +/-- RH yields simple real-rooted pencils between a weighted prime polynomial +and the fixed next-degree Jacobi reference, uniformly in all real coefficients. -/ +theorem eventually_isSimpleRealRooted_primeWindow_jacobi_pencil + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, ∀ a b : ℝ, a ≠ 0 ∨ b ≠ 0 → + RealRooted.IsSimpleRealRooted + (C a * Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n + + C b * shiftedJacobiMonic (n + 1) α β) := by + have h := RealRooted.eventually_isSimpleRealRooted_jacobi_moment_pencil + (μ := fun X : ℝ ↦ Chebyshev.primeWindowWeightedMoment + (RealRooted.shiftedJacobiWeight α β) X (Real.sqrt X * Real.log X ^ 3)) + (ν := fun _ : ℝ ↦ RealRooted.shiftedJacobiMoment α β) + (α := α) (β := β) (n := n) (by linarith) (by linarith) + (fun k _ ↦ hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k) + (fun _ _ ↦ tendsto_const_nhds) + simpa only [Chebyshev.primeWindowWeightedPolynomial, + ← RealRooted.shiftedJacobiMonic_eq_monicMomentPolynomial (n + 1) + (by linarith : -1 < α) (by linarith : -1 < β)] using h + +/-- RH also yields simple real-rooted pencils with the fixed Jacobi reference +in the lower degree and the prime-window polynomial in the higher degree. -/ +theorem eventually_isSimpleRealRooted_jacobi_primeWindow_pencil + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, ∀ a b : ℝ, a ≠ 0 ∨ b ≠ 0 → + RealRooted.IsSimpleRealRooted + (C a * shiftedJacobiMonic n α β + + C b * Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) (n + 1)) := by + have h := RealRooted.eventually_isSimpleRealRooted_jacobi_moment_pencil + (μ := fun _ : ℝ ↦ RealRooted.shiftedJacobiMoment α β) + (ν := fun X : ℝ ↦ Chebyshev.primeWindowWeightedMoment + (RealRooted.shiftedJacobiWeight α β) X (Real.sqrt X * Real.log X ^ 3)) + (α := α) (β := β) (n := n) (by linarith) (by linarith) + (fun _ _ ↦ tendsto_const_nhds) + (fun k _ ↦ hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k) + simpa only [Chebyshev.primeWindowWeightedPolynomial, + ← RealRooted.shiftedJacobiMonic_eq_monicMomentPolynomial n + (by linarith : -1 < α) (by linarith : -1 < β)] using h + +/-- The independent-window conclusion specializes to the original unweighted +reference family, whose limiting polynomials are monic shifted Legendre polynomials. -/ +theorem eventually_interlaces_primeWindowPolynomial + (hRH : RiemannHypothesis) {ι : Type*} {l : Filter ι} {A B : ι → ℝ} + (hA : Tendsto A l atTop) (hB : Tendsto B l atTop) (n : ℕ) : + ∀ᶠ t in l, + RealRooted.Interlaces + (Chebyshev.primeWindowPolynomial (A t) (Real.sqrt (A t) * Real.log (A t) ^ 3) n) + (Chebyshev.primeWindowPolynomial (B t) (Real.sqrt (B t) * Real.log (B t) ^ 3) + (n + 1)) ∧ + ∀ x, + (Chebyshev.primeWindowPolynomial + (A t) (Real.sqrt (A t) * Real.log (A t) ^ 3) n).IsRoot x → + ¬ (Chebyshev.primeWindowPolynomial (B t) (Real.sqrt (B t) * Real.log (B t) ^ 3) + (n + 1)).IsRoot x := by + simpa only [RealRooted.shiftedJacobiWeight_zero_zero, + Chebyshev.primeWindowWeightedPolynomial_one] using + hRH.eventually_interlaces_primeWindowWeightedPolynomial hA hB + (α := 0) (β := 0) le_rfl le_rfl n + +/-- All nontrivial real combinations of consecutive degrees from two independent +unweighted prime windows eventually have simple real roots under RH. -/ +theorem eventually_isSimpleRealRooted_primeWindowPolynomial_pencil + (hRH : RiemannHypothesis) {ι : Type*} {l : Filter ι} {A B : ι → ℝ} + (hA : Tendsto A l atTop) (hB : Tendsto B l atTop) (n : ℕ) : + ∀ᶠ t in l, ∀ a b : ℝ, a ≠ 0 ∨ b ≠ 0 → + RealRooted.IsSimpleRealRooted + (C a * Chebyshev.primeWindowPolynomial + (A t) (Real.sqrt (A t) * Real.log (A t) ^ 3) n + + C b * Chebyshev.primeWindowPolynomial + (B t) (Real.sqrt (B t) * Real.log (B t) ^ 3) (n + 1)) := by + simpa only [RealRooted.shiftedJacobiWeight_zero_zero, + Chebyshev.primeWindowWeightedPolynomial_one] using + hRH.eventually_isSimpleRealRooted_primeWindow_pencil hA hB + (α := 0) (β := 0) le_rfl le_rfl n + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowJacobi.lean b/RealRooted/RiemannHypothesis/PrimeWindowJacobi.lean new file mode 100644 index 000000000..67f88ed90 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowJacobi.lean @@ -0,0 +1,58 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Jacobi.Orthogonality.Integral +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowContinuous +import Mathlib.Analysis.SpecialFunctions.Pow.Continuity + +/-! +# Jacobi-weighted prime-window moments under RH + +For fixed `α, β ≥ 0`, the shifted Jacobi weight is continuous on the closed +unit interval. Under Mathlib's RH the weighted prime moments therefore tend +to the existing unnormalized shifted Jacobi moments. Zero parameters are +included. A quantitative rate is not inferred from continuity. +-/ + +public section + +open Filter +open scoped Topology Polynomial + +namespace RealRooted + +/-- Nonnegative Jacobi exponents give a continuous weight, including the cases where an exponent +is zero. No differentiability at either endpoint is asserted. -/ +theorem continuous_shiftedJacobiWeight {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) : + Continuous (shiftedJacobiWeight α β) := by + exact (Real.continuous_rpow_const hα).mul + ((Real.continuous_rpow_const hβ).comp (continuous_const.sub continuous_id)) + +end RealRooted + +namespace RiemannHypothesis + +/-- Under RH, Jacobi-weighted prime-window moments converge to the shifted Jacobi moments for +all fixed nonnegative real parameters. The normalization is the beta weight itself, not a +probability normalization; this is the moment sequence used by the monic Jacobi family. -/ +theorem tendsto_primeWindowWeightedMoment_jacobi (hRH : RiemannHypothesis) + {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (k : ℕ) : + Tendsto (fun X : ℝ ↦ + Chebyshev.primeWindowWeightedMoment (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) k) + atTop (𝓝 (RealRooted.shiftedJacobiMoment α β k)) := by + have hlim := hRH.tendsto_primeWindowWeightedMoment + (RealRooted.continuous_shiftedJacobiWeight hα hβ).continuousOn k + have hint : (∫ t in (0 : ℝ)..1, t ^ k * RealRooted.shiftedJacobiWeight α β t) = + RealRooted.shiftedJacobiMoment α β k := by + have h := RealRooted.shiftedJacobiFunctional_eq_integral + (by linarith : -1 < α) (by linarith : -1 < β) (Polynomial.X ^ k) + simpa only [RealRooted.shiftedJacobiFunctional_X_pow, RealRooted.shiftedJacobiIntegrand, + Polynomial.eval_pow, Polynomial.eval_X] using h.symm + rwa [hint] at hlim + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowJacobiBounds.lean b/RealRooted/RiemannHypothesis/PrimeWindowJacobiBounds.lean new file mode 100644 index 000000000..291473a1e --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowJacobiBounds.lean @@ -0,0 +1,100 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowContinuous +public import RealRooted.Jacobi.Orthogonality.Integral +import RealRooted.RiemannHypothesis.PrimeWindowJacobi +import RealRooted.Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeBeta +import RealRooted.Mathlib.NumberTheory.Chebyshev.ShortIntervals +import RealRooted.Mathlib.Analysis.Asymptotics.IncrementBounds +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! +# Quantitative Jacobi-weighted prime-window moments + +A finite cumulative error at most `δ` gives Jacobi-weighted moment error at +most `2δ`, for all nonnegative Jacobi parameters and every natural moment +index. Under Mathlib's RH, the actual prime-window error is consequently +`O(1 / log X)`. The weight convention is `t^α (1-t)^β`, matching the native +shifted Jacobi family. Endpoint fractional powers are handled by integrable +interior derivatives, not by a false endpoint `C¹` assumption. +-/ + +public section + +open Filter +open scoped Topology + +namespace RealRooted + +/-- A finite cumulative discrepancy controls the unnormalized shifted Jacobi moments. +The weights may be signed and nodes may repeat or equal either endpoint. -/ +theorem abs_sum_mul_pow_shiftedJacobiWeight_sub_le {ι : Type*} + (s : Finset ι) (r w : ι → ℝ) + (hr : ∀ i ∈ s, r i ∈ Set.Icc (0 : ℝ) 1) {δ : ℝ} + (hδ : ∀ t ∈ Set.Icc (0 : ℝ) 1, + |(∑ i ∈ s, if r i ≤ t then w i else 0) - t| ≤ δ) + {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (k : ℕ) : + |(∑ i ∈ s, w i * (r i ^ k * shiftedJacobiWeight α β (r i))) - + shiftedJacobiMoment α β k| ≤ 2 * δ := by + have hsum : (∑ i ∈ s, w i * (r i ^ k * shiftedJacobiWeight α β (r i))) = + ∑ i ∈ s, w i * (r i ^ (α + (k : ℝ)) * (1 - r i) ^ β) := by + apply Finset.sum_congr rfl + intro i hi + rw [Real.rpow_add_of_nonneg (hr i hi).1 hα (Nat.cast_nonneg k), Real.rpow_natCast] + dsimp only [shiftedJacobiWeight] + ring + rw [hsum, shiftedJacobiMoment_eq_integral (by linarith : -1 < α) + (by linarith : -1 < β) k] + exact Finset.abs_sum_beta_weight_sub_le_of_cumulative_bound s r w hr hδ + (by positivity : 0 ≤ α + (k : ℝ)) hβ + +end RealRooted + +namespace Chebyshev + +/-- Chebyshev discrepancy bounds every native Jacobi-weighted prime-window moment. -/ +theorem abs_primeWindowWeightedMoment_jacobi_sub_le {X H δ α β : ℝ} + (hH : 0 < H) (hα : 0 ≤ α) (hβ : 0 ≤ β) + (hδ : ∀ u ∈ Set.Icc (0 : ℝ) 1, + |(theta (X + H * u) - theta X) / H - u| ≤ δ) (k : ℕ) : + |primeWindowWeightedMoment (RealRooted.shiftedJacobiWeight α β) X H k - + RealRooted.shiftedJacobiMoment α β k| ≤ 2 * δ := by + apply RealRooted.abs_sum_mul_pow_shiftedJacobiWeight_sub_le + (primeWindow X H) (fun p ↦ ((p : ℝ) - X) / H) (fun p ↦ Real.log p / H) + · intro p hp + have hn := primeWindow_node_mem_Ioc hH hp + exact ⟨hn.1.le, hn.2⟩ + · intro u hu + rw [sum_primeWindow_weight_node_le hH hu] + exact hδ u hu + · exact hα + · exact hβ + +end Chebyshev + +namespace RiemannHypothesis + +/-- Under RH, every Jacobi-weighted prime-window moment has eventual error `C / log X`. +The moment-error bound is uniform in the natural moment index; fixed-degree polynomial and +root applications still require their separate nondegeneracy and perturbation arguments. -/ +theorem eventually_primeWindowWeightedMoment_jacobi_sub_le (hRH : RiemannHypothesis) + {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) : + ∃ C : ℝ, 0 < C ∧ ∀ᶠ X : ℝ in atTop, ∀ k : ℕ, + |Chebyshev.primeWindowWeightedMoment (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) k - + RealRooted.shiftedJacobiMoment α β k| ≤ C / Real.log X := by + obtain ⟨C, hC, hbound⟩ := hRH.eventually_theta_increment_div_sqrt_log_cube_le + refine ⟨2 * C, by positivity, ?_⟩ + filter_upwards [hbound, Real.eventually_sqrt_mul_log_cube_pos_le] with X hX hH k + calc + _ ≤ 2 * (C / Real.log X) := + Chebyshev.abs_primeWindowWeightedMoment_jacobi_sub_le hH.1 hα hβ hX k + _ = (2 * C) / Real.log X := by ring + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowJacobiPolynomial.lean b/RealRooted/RiemannHypothesis/PrimeWindowJacobiPolynomial.lean new file mode 100644 index 000000000..478a274e6 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowJacobiPolynomial.lean @@ -0,0 +1,91 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Jacobi.Orthogonality.Integral + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal +import RealRooted.RiemannHypothesis.PrimeWindowJacobi +import RealRooted.Jacobi.MomentPolynomial +import RealRooted.Mathlib.Analysis.Asymptotics.IncrementBounds +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Perturbation +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Tactic.Linarith + +/-! +# Jacobi limits for weighted prime-window polynomials + +For fixed nonnegative Jacobi exponents, RH supplies the prime-window moment +limits. The finite Hankel construction then converges to the classical monic +Jacobi polynomial and is eventually genuinely orthogonal in the weighted sum. +The algebraic moment construction and classical Jacobi properties are unconditional. +-/ + +public section + +open Filter Topology Polynomial + +namespace RiemannHypothesis + +/-- Under RH, every coefficient of a fixed-degree Jacobi-weighted prime-window +polynomial tends to its classical monic shifted Jacobi coefficient. -/ +theorem tendsto_coeff_primeWindowWeightedPolynomial (hRH : RiemannHypothesis) + {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n k : ℕ) : + Tendsto (fun X : ℝ ↦ + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).coeff k) + atTop (𝓝 ((shiftedJacobiMonic n α β).coeff k)) := by + exact RealRooted.tendsto_coeff_monicMomentPolynomial_shiftedJacobi + (by linarith) (by linarith) + (fun j _ ↦ hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ j) k + +/-- RH makes every fixed finite Jacobi-weighted prime-window moment matrix +eventually nonsingular. Empty and small windows are not asserted nonsingular. -/ +theorem eventually_primeWindowWeightedMoment_hankel_isUnit + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, + IsUnit (momentHankelMatrix + (Chebyshev.primeWindowWeightedMoment (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3)) n).det := by + have hdet : IsUnit (momentHankelMatrix (RealRooted.shiftedJacobiMoment α β) n).det := + isUnit_iff_ne_zero.mpr + (RealRooted.shiftedJacobiMoment_hankel_posDef n (by linarith) (by linarith)).det_pos.ne' + obtain ⟨_, _, hbound⟩ := eventually_isUnit_momentHankelMatrix_det_and_inv_bound + (n := n) (fun k _ ↦ hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k) hdet + exact hbound.mono fun _ h ↦ h.1 + +/-- Under RH the actual nonnegative Jacobi-weighted prime-window moment matrix +is eventually positive definite in every fixed size, including the empty size. -/ +theorem eventually_primeWindowWeightedMoment_hankel_posDef + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, + (momentHankelMatrix + (Chebyshev.primeWindowWeightedMoment (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3)) n).PosDef := by + filter_upwards [hRH.eventually_primeWindowWeightedMoment_hankel_isUnit hα hβ n, + Real.eventually_sqrt_mul_log_cube_pos_le] with X hdet hH + have hW : ∀ x ∈ Set.Icc (0 : ℝ) 1, 0 ≤ RealRooted.shiftedJacobiWeight α β x := by + intro x hx + exact mul_nonneg (Real.rpow_nonneg hx.1 α) (Real.rpow_nonneg (sub_nonneg.mpr hx.2) β) + have hpsd := Chebyshev.primeWindowWeightedMoment_hankel_posSemidef (X := X) hH.1 hW n + exact hpsd.posDef_iff_det_ne_zero.mpr (isUnit_iff_ne_zero.mp hdet) + +/-- The RH limiting argument supplies genuine eventual orthogonality for the +constructed weighted prime polynomial. The pairing is the finite weighted prime +sum by `Chebyshev.momentPairing_primeWindowWeightedMoment`. -/ +theorem eventually_primeWindowWeightedPolynomial_orthogonal + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, ∀ p : ℝ[X], p.degree < n → + momentPairing + (Chebyshev.primeWindowWeightedMoment (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3)) p + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n) = 0 := by + filter_upwards [hRH.eventually_primeWindowWeightedMoment_hankel_isUnit hα hβ n] + with X hdet p hp + exact momentPairing_monicMomentPolynomial _ n hdet hp + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowJacobiPolynomialBounds.lean b/RealRooted/RiemannHypothesis/PrimeWindowJacobiPolynomialBounds.lean new file mode 100644 index 000000000..ea01ac165 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowJacobiPolynomialBounds.lean @@ -0,0 +1,59 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal +public import RealRooted.Jacobi.Orthogonality.Integral +import RealRooted.RiemannHypothesis.PrimeWindowJacobi +import RealRooted.RiemannHypothesis.PrimeWindowJacobiBounds +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.CoefficientRates +import RealRooted.Jacobi.MomentPolynomial +import Mathlib.Tactic.Linarith + +/-! +# Quantitative Jacobi limits for prime-window polynomial coefficients + +For fixed nonnegative Jacobi parameters and fixed degree, RH gives a common +`O(1 / log X)` error for every coefficient of the actual weighted prime-window +polynomial. The reference is the native monic shifted Jacobi family. +-/ + +public section + +open Filter Topology Polynomial + +namespace RiemannHypothesis + +/-- Under RH, every coefficient of a fixed-degree Jacobi-weighted prime-window +polynomial differs from its actual shifted Jacobi reference by at most `C / log X`. -/ +theorem eventually_coeff_primeWindowWeightedPolynomial_sub_le + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∃ C : ℝ, 0 < C ∧ ∀ᶠ X : ℝ in atTop, ∀ k : ℕ, + |(Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).coeff k - + (shiftedJacobiMonic n α β).coeff k| ≤ C / Real.log X := by + obtain ⟨B, hB, hmom⟩ := hRH.eventually_primeWindowWeightedMoment_jacobi_sub_le hα hβ + have hδ : ∀ᶠ X : ℝ in atTop, 0 ≤ B / Real.log X := by + filter_upwards [eventually_gt_atTop (1 : ℝ)] with X hX + exact (div_pos hB (Real.log_pos hX)).le + have herr : ∀ᶠ X : ℝ in atTop, ∀ k < 2 * n, + |Chebyshev.primeWindowWeightedMoment (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) k - + RealRooted.shiftedJacobiMoment α β k| ≤ B / Real.log X := + hmom.mono fun _ h k _ ↦ h k + have hdet : IsUnit (momentHankelMatrix (RealRooted.shiftedJacobiMoment α β) n).det := + isUnit_iff_ne_zero.mpr + (RealRooted.shiftedJacobiMoment_hankel_posDef n (by linarith) (by linarith)).det_pos.ne' + obtain ⟨A, hA, hcoeff⟩ := eventually_coeff_monicMomentPolynomial_sub_le + (fun k _ ↦ hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k) hdet hδ herr + refine ⟨A * B, mul_pos hA hB, ?_⟩ + filter_upwards [hcoeff] with X hX k + have h := hX k + rw [← RealRooted.shiftedJacobiMonic_eq_monicMomentPolynomial n + (by linarith : -1 < α) (by linarith : -1 < β)] at h + simpa only [Chebyshev.primeWindowWeightedPolynomial, mul_div_assoc] using h + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowJacobiQuadrature.lean b/RealRooted/RiemannHypothesis/PrimeWindowJacobiQuadrature.lean new file mode 100644 index 000000000..e0646892d --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowJacobiQuadrature.lean @@ -0,0 +1,120 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature +import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedQuadrature +public import RealRooted.Jacobi.Orthogonality.Integral +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.GaussianLimits +import RealRooted.RiemannHypothesis.PrimeWindowJacobiRoots +import RealRooted.RiemannHypothesis.PrimeWindowJacobi +import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomial +import RealRooted.RiemannHypothesis.PrimeWindowJacobiBounds +import RealRooted.Jacobi.MomentPolynomial +import Mathlib.Tactic.Linarith + +/-! +# Jacobi-weighted prime Gaussian quadrature under RH + +For fixed nonnegative Jacobi parameters and fixed degree, the actual weighted +prime-window Gaussian rule converges to the classical Gauss-Jacobi rule for +the native beta integral. One common `C / log X` bounds both nodes and weights +of the same chosen rule. The prime masses and beta masses remain unnormalized. +-/ + +public section + +open Filter Topology Polynomial + +namespace RiemannHypothesis + +/-- RH gives positive Gaussian quadrature for actual Jacobi-weighted prime sums, +converging to the actual beta-integral rule with a common node and weight rate. +The degree is fixed, both exponents are nonnegative, and degrees zero and one +are included without exceptions. -/ +theorem exists_primeWindow_jacobi_gaussian_quadrature + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + let W : ℝ → ℝ := RealRooted.shiftedJacobiWeight α β + let H : ℝ → ℝ := fun X ↦ Real.sqrt X * Real.log X ^ 3 + let L : ℝ → ℝ[X] →ₗ[ℝ] ℝ := + fun X ↦ momentFunctionalLinearMap (Chebyshev.primeWindowWeightedMoment W X (H X)) + let L₀ : ℝ[X] →ₗ[ℝ] ℝ := + momentFunctionalLinearMap (RealRooted.shiftedJacobiMoment α β) + ∃ (r : Fin n → ℝ) (s : ℝ → Fin n → ℝ) (C : ℝ), 0 < C ∧ StrictMono r ∧ + (∀ i, (shiftedJacobiMonic n α β).IsRoot (r i)) ∧ + (∀ i, 0 < Lagrange.quadratureWeight L₀ r i) ∧ + (∀ p : ℝ[X], p.degree < (2 * n : ℕ) → + (∫ t : ℝ in 0..1, p.eval t * W t) = + ∑ i : Fin n, Lagrange.quadratureWeight L₀ r i * p.eval (r i)) ∧ + (∀ᶠ X : ℝ in atTop, StrictMono (s X) ∧ + (∀ i, (Chebyshev.primeWindowWeightedPolynomial W X (H X) n).IsRoot (s X i)) ∧ + (∀ i, 0 < Lagrange.quadratureWeight (L X) (s X) i) ∧ + (∀ p : ℝ[X], p.degree < (2 * n : ℕ) → + (∑ a ∈ Chebyshev.primeWindow X (H X), + ((Real.log a / H X) * W (((a : ℝ) - X) / H X)) * + p.eval (((a : ℝ) - X) / H X)) = + ∑ i : Fin n, Lagrange.quadratureWeight (L X) (s X) i * p.eval (s X i)) ∧ + (∀ i, |s X i - r i| ≤ C / Real.log X) ∧ + ∀ i, |Lagrange.quadratureWeight (L X) (s X) i - + Lagrange.quadratureWeight L₀ r i| ≤ C / Real.log X) ∧ + ∀ i, Tendsto (fun X : ℝ ↦ s X i) atTop (𝓝 (r i)) ∧ + Tendsto (fun X : ℝ ↦ Lagrange.quadratureWeight (L X) (s X) i) atTop + (𝓝 (Lagrange.quadratureWeight L₀ r i)) := by + dsimp only + let W : ℝ → ℝ := RealRooted.shiftedJacobiWeight α β + let H : ℝ → ℝ := fun X ↦ Real.sqrt X * Real.log X ^ 3 + let μ : ℝ → ℕ → ℝ := fun X ↦ Chebyshev.primeWindowWeightedMoment W X (H X) + let μ₀ : ℕ → ℝ := RealRooted.shiftedJacobiMoment α β + obtain ⟨r, s, A, hA, hr, href, hroots, hslim⟩ := + hRH.exists_primeWindowWeightedPolynomial_roots_tendsto hα hβ n + obtain ⟨B, hB, hmom⟩ := hRH.eventually_primeWindowWeightedMoment_jacobi_sub_le hα hβ + have hδ : ∀ᶠ X : ℝ in atTop, 0 ≤ (A + B) / Real.log X := by + filter_upwards [eventually_gt_atTop (1 : ℝ)] with X hX + exact (div_pos (add_pos hA hB) (Real.log_pos hX)).le + have hnode : ∀ᶠ X : ℝ in atTop, ∀ i, |s X i - r i| ≤ (A + B) / Real.log X := by + filter_upwards [hroots, eventually_gt_atTop (1 : ℝ)] with X hX hX1 i + exact (hX.2.2.2.2 i).trans + (div_le_div_of_nonneg_right (le_add_of_nonneg_right hB.le) (Real.log_pos hX1).le) + have hmoment : ∀ᶠ X : ℝ in atTop, ∀ k < n, |μ X k - μ₀ k| ≤ (A + B) / Real.log X := by + filter_upwards [hmom, eventually_gt_atTop (1 : ℝ)] with X hX hX1 k _ + exact (hX k).trans + (div_le_div_of_nonneg_right (le_add_of_nonneg_left hA.le) (Real.log_pos hX1).le) + have href' : ∀ i, (monicMomentPolynomial μ₀ n).IsRoot (r i) := by + intro i + simpa only [RealRooted.shiftedJacobiMonic_eq_monicMomentPolynomial n + (by linarith : -1 < α) (by linarith : -1 < β)] using href i + have hroots' : ∀ᶠ X : ℝ in atTop, StrictMono (s X) ∧ + ∀ i, (monicMomentPolynomial (μ X) n).IsRoot (s X i) := + hroots.mono fun _ h ↦ ⟨h.2.2.1, h.2.2.2.1⟩ + obtain ⟨D, hD, hposref, hexactref, hgauss, hwlim⟩ := + Lagrange.eventually_gaussian_quadrature_of_moment_bounds + (fun k _ ↦ hRH.tendsto_primeWindowWeightedMoment_jacobi hα hβ k) + (RealRooted.shiftedJacobiMoment_hankel_posDef n (by linarith) (by linarith)) + (hRH.eventually_primeWindowWeightedMoment_hankel_posDef hα hβ n) + hr.injective href' hroots' hslim hδ hnode hmoment + refine ⟨r, s, D * (A + B), mul_pos hD (add_pos hA hB), hr, href, hposref, ?_, ?_, ?_⟩ + · intro p hp + calc + (∫ t : ℝ in 0..1, p.eval t * RealRooted.shiftedJacobiWeight α β t) = + RealRooted.shiftedJacobiFunctional α β p := by + simpa only [RealRooted.shiftedJacobiIntegrand] using + (RealRooted.shiftedJacobiFunctional_eq_integral + (by linarith : -1 < α) (by linarith : -1 < β) p).symm + _ = _ := hexactref p hp + · filter_upwards [hgauss] with X hX + refine ⟨hX.1, hX.2.1, hX.2.2.1, ?_, ?_, ?_⟩ + · intro p hp + rw [← Chebyshev.momentFunctional_primeWindowWeightedMoment] + exact hX.2.2.2.1 p hp + · intro i + simpa only [mul_div_assoc] using hX.2.2.2.2.1 i + · intro i + simpa only [mul_div_assoc] using hX.2.2.2.2.2 i + · intro i + exact ⟨hslim i, hwlim i⟩ + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowJacobiRoots.lean b/RealRooted/RiemannHypothesis/PrimeWindowJacobiRoots.lean new file mode 100644 index 000000000..499a85935 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowJacobiRoots.lean @@ -0,0 +1,87 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal +public import RealRooted.Jacobi.Orthogonality.Integral +import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomial +import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomialBounds +import RealRooted.Jacobi.RootRates +import Mathlib.Tactic.Linarith + +/-! +# Quantitative Jacobi limits for weighted prime-window roots + +For fixed nonnegative Jacobi parameters and fixed degree, RH produces an +eventually simple real-rooted prime-window polynomial whose ordered roots +approach the actual shifted Jacobi roots at rate `O(1 / log X)`. +No reference factorization or real-rootedness premise is supplied by the caller. +-/ + +public section + +open Filter Topology Polynomial + +namespace RiemannHypothesis + +/-- RH gives an ordered family of actual Jacobi-weighted prime-window roots, +with `C / log X` error and coordinatewise convergence to the classical Jacobi roots. -/ +theorem exists_primeWindowWeightedPolynomial_roots_tendsto + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∃ (r : Fin n → ℝ) (s : ℝ → Fin n → ℝ) (C : ℝ), 0 < C ∧ StrictMono r ∧ + (∀ i, (shiftedJacobiMonic n α β).IsRoot (r i)) ∧ + (∀ᶠ X : ℝ in atTop, + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).Splits ∧ + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).roots.Nodup ∧ + StrictMono (s X) ∧ + (∀ i, (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).IsRoot (s X i)) ∧ + ∀ i, |s X i - r i| ≤ C / Real.log X) ∧ + ∀ i, Tendsto (fun X : ℝ ↦ s X i) atTop (𝓝 (r i)) := by + obtain ⟨B, hB, hcoeff⟩ := hRH.eventually_coeff_primeWindowWeightedPolynomial_sub_le hα hβ n + have hδ : ∀ᶠ X : ℝ in atTop, 0 ≤ B / Real.log X := by + filter_upwards [eventually_gt_atTop (1 : ℝ)] with X hX + exact (div_pos hB (Real.log_pos hX)).le + have hδlim : Tendsto (fun X : ℝ ↦ B / Real.log X) atTop (𝓝 0) := + Real.tendsto_log_atTop.const_div_atTop B + obtain ⟨r, s, A, hA, hr, href, hevent, hslim⟩ := + RealRooted.exists_ordered_roots_tendsto_shiftedJacobi + (by linarith : -1 < α) (by linarith : -1 < β) + (Filter.Eventually.of_forall fun X : ℝ ↦ + (Chebyshev.isMonicOfDegree_primeWindowWeightedPolynomial + (RealRooted.shiftedJacobiWeight α β) X (Real.sqrt X * Real.log X ^ 3) n).natDegree_eq.le) + (fun k _ ↦ hRH.tendsto_coeff_primeWindowWeightedPolynomial hα hβ n k) + hδ (hcoeff.mono fun _ h k _ ↦ h k) hδlim + refine ⟨r, s, A * B, mul_pos hA hB, hr, href, ?_, hslim⟩ + filter_upwards [hevent] with X hX + refine ⟨hX.2.1, hX.2.2.1, hX.2.2.2.1, hX.2.2.2.2.1, ?_⟩ + intro i + simpa only [mul_div_assoc] using hX.2.2.2.2.2 i + +/-- The ordered root-rate conclusion without making a global choice of the +perturbed root family. Degree zero is included. -/ +theorem exists_primeWindowWeightedPolynomial_roots_sub_le + (hRH : RiemannHypothesis) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 ≤ β) (n : ℕ) : + ∃ r : Fin n → ℝ, StrictMono r ∧ + (∀ i, (shiftedJacobiMonic n α β).IsRoot (r i)) ∧ + ∃ C : ℝ, 0 < C ∧ ∀ᶠ X : ℝ in atTop, + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).Splits ∧ + (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).roots.Nodup ∧ + ∃ s : Fin n → ℝ, StrictMono s ∧ + (∀ i, (Chebyshev.primeWindowWeightedPolynomial (RealRooted.shiftedJacobiWeight α β) + X (Real.sqrt X * Real.log X ^ 3) n).IsRoot (s i)) ∧ + ∀ i, |s i - r i| ≤ C / Real.log X := by + obtain ⟨r, s, C, hC, hr, href, hevent, _⟩ := + hRH.exists_primeWindowWeightedPolynomial_roots_tendsto hα hβ n + refine ⟨r, hr, href, C, hC, ?_⟩ + filter_upwards [hevent] with X hX + exact ⟨hX.1, hX.2.1, s X, hX.2.2.1, hX.2.2.2.1, hX.2.2.2.2⟩ + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowPolynomial.lean b/RealRooted/RiemannHypothesis/PrimeWindowPolynomial.lean new file mode 100644 index 000000000..9d2a55625 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowPolynomial.lean @@ -0,0 +1,99 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowOrthogonal +public import Mathlib.NumberTheory.LSeries.RiemannZeta +public import RealRooted.Mathlib.RingTheory.Polynomial.Jacobi +import Mathlib.Topology.Instances.Real.Lemmas +import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowMoments +import RealRooted.Mathlib.Analysis.Asymptotics.IncrementBounds +import RealRooted.Jacobi.MomentPolynomial +import RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Perturbation +import Mathlib.Algebra.Order.Star.Real +import RealRooted.RiemannHypothesis.PrimeWindowJacobiPolynomialBounds + +/-! +# Prime-window orthogonal polynomials approaching shifted Legendre polynomials + +Under Mathlib's RH, the finite logarithmically weighted prime windows of length +`sqrt X * log X ^ 3` have eventually positive definite moment matrices in every +fixed degree. Their monic orthogonal polynomials converge coefficientwise to +the monic shifted Legendre polynomial, with error `O(1 / log X)`. +-/ + +public section + +open Filter Topology Polynomial + +namespace RiemannHypothesis + +private theorem tendsto_primeWindowMoment_uniform (hRH : RiemannHypothesis) (k : ℕ) : + Tendsto (fun X : ℝ ↦ + Chebyshev.primeWindowMoment X (Real.sqrt X * Real.log X ^ 3) k) + atTop (𝓝 (RealRooted.shiftedJacobiMoment 0 0 k)) := by + simpa only [RealRooted.shiftedJacobiMoment_zero_zero] using hRH.tendsto_primeWindowMoment k + +private theorem uniform_hankel_isUnit (n : ℕ) : + IsUnit (momentHankelMatrix (RealRooted.shiftedJacobiMoment 0 0) n).det := + isUnit_iff_ne_zero.mpr + (RealRooted.shiftedJacobiMoment_hankel_posDef n (by norm_num) (by norm_num)).det_pos.ne' + +/-- RH gives eventual nonsingularity of every fixed finite prime-window +moment matrix. The assertion does not apply to arbitrary small or empty windows. -/ +theorem eventually_primeWindowMoment_hankel_isUnit (hRH : RiemannHypothesis) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, + IsUnit (momentHankelMatrix + (Chebyshev.primeWindowMoment X (Real.sqrt X * Real.log X ^ 3)) n).det := by + obtain ⟨_, _, hbound⟩ := eventually_isUnit_momentHankelMatrix_det_and_inv_bound + (n := n) (fun k _ ↦ tendsto_primeWindowMoment_uniform hRH k) (uniform_hankel_isUnit n) + exact hbound.mono fun _ h ↦ h.1 + +/-- Actual nonnegative prime weights and eventual nonsingularity give positive +definite prime-window Hankel matrices in every fixed degree under RH. -/ +theorem eventually_primeWindowMoment_hankel_posDef (hRH : RiemannHypothesis) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, + (momentHankelMatrix + (Chebyshev.primeWindowMoment X (Real.sqrt X * Real.log X ^ 3)) n).PosDef := by + filter_upwards [hRH.eventually_primeWindowMoment_hankel_isUnit n, + Real.eventually_sqrt_mul_log_cube_pos_le] with X hdet hH + exact (Chebyshev.primeWindowMoment_hankel_posSemidef hH.1 n).posDef_iff_det_ne_zero.mpr + (isUnit_iff_ne_zero.mp hdet) + +/-- Under RH, the constructed prime-window polynomial is eventually +orthogonal in the original finite weighted prime sum to every lower-degree polynomial. -/ +theorem eventually_primeWindowPolynomial_orthogonal (hRH : RiemannHypothesis) (n : ℕ) : + ∀ᶠ X : ℝ in atTop, ∀ p : ℝ[X], p.degree < n → + (∑ a ∈ Chebyshev.primeWindow X (Real.sqrt X * Real.log X ^ 3), + (Real.log a / (Real.sqrt X * Real.log X ^ 3)) * + p.eval (((a : ℝ) - X) / (Real.sqrt X * Real.log X ^ 3)) * + (Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).eval + (((a : ℝ) - X) / (Real.sqrt X * Real.log X ^ 3))) = 0 := by + filter_upwards [hRH.eventually_primeWindowMoment_hankel_isUnit n] with X hdet p hp + exact Chebyshev.sum_primeWindowPolynomial_mul_eval_eq_zero _ _ n hdet hp + +/-- Every coefficient of the fixed-degree prime-window polynomial tends to +the corresponding monic shifted Legendre coefficient under RH. -/ +theorem tendsto_coeff_primeWindowPolynomial (hRH : RiemannHypothesis) (n k : ℕ) : + Tendsto (fun X : ℝ ↦ + (Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).coeff k) + atTop (𝓝 ((shiftedJacobiMonic n 0 0).coeff k)) := by + exact RealRooted.tendsto_coeff_monicMomentPolynomial_shiftedJacobi + (by norm_num) (by norm_num) (fun j _ ↦ tendsto_primeWindowMoment_uniform hRH j) k + +/-- RH gives a common `O(1 / log X)` error bound for all coefficients of each +fixed-degree prime-window polynomial relative to the monic shifted Legendre polynomial. -/ +theorem eventually_coeff_primeWindowPolynomial_sub_le + (hRH : RiemannHypothesis) (n : ℕ) : + ∃ C : ℝ, 0 < C ∧ ∀ᶠ X : ℝ in atTop, ∀ k : ℕ, + |(Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).coeff k - + (shiftedJacobiMonic n 0 0).coeff k| ≤ C / Real.log X := by + simpa only [RealRooted.shiftedJacobiWeight_zero_zero, + Chebyshev.primeWindowWeightedPolynomial_one] using + hRH.eventually_coeff_primeWindowWeightedPolynomial_sub_le + (α := 0) (β := 0) (by norm_num) (by norm_num) n + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowQuadrature.lean b/RealRooted/RiemannHypothesis/PrimeWindowQuadrature.lean new file mode 100644 index 000000000..e38bfea40 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowQuadrature.lean @@ -0,0 +1,68 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.LinearAlgebra.Lagrange.Quadrature + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowOrthogonal + +public import RealRooted.Jacobi.Orthogonality + +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import RealRooted.Jacobi.Orthogonality.Integral +import RealRooted.RiemannHypothesis.PrimeWindowJacobiQuadrature + +/-! +# Prime-window Gaussian quadrature approaching Gauss-Legendre quadrature + +Under Mathlib's RH, every fixed-degree prime-window rule is eventually a positive +Gaussian rule for the original finite weighted prime sum. Its nodes and weights +converge to the Gauss-Legendre rule on `[0, 1]`; nodes and weights have error +`O(1 / log X)`. Exactness is proved for every polynomial of degree below `2 * n`. +The empty rule and the one-node rule are included without extra degree restrictions. +-/ + +public section + +open Filter Topology Polynomial + +namespace RiemannHypothesis + +/-- RH gives actual positive Gaussian rules for prime windows, converging to +the actual Gauss-Legendre rule. The rules are exact below degree `2 * n`, and +their nodes and weights have a fixed-degree `O(1 / log X)` error. No quadrature, positivity, +or reference exactness premise is supplied by the caller. -/ +theorem exists_primeWindow_gaussian_quadrature (hRH : RiemannHypothesis) (n : ℕ) : + let H : ℝ → ℝ := fun X ↦ Real.sqrt X * Real.log X ^ 3 + let L : ℝ → ℝ[X] →ₗ[ℝ] ℝ := + fun X ↦ momentFunctionalLinearMap (Chebyshev.primeWindowMoment X (H X)) + let L₀ : ℝ[X] →ₗ[ℝ] ℝ := + momentFunctionalLinearMap (RealRooted.shiftedJacobiMoment 0 0) + ∃ (r : Fin n → ℝ) (s : ℝ → Fin n → ℝ) (C : ℝ), 0 < C ∧ StrictMono r ∧ + (∀ i, (shiftedJacobiMonic n 0 0).IsRoot (r i)) ∧ + (∀ i, 0 < Lagrange.quadratureWeight L₀ r i) ∧ + (∀ p : ℝ[X], p.degree < (2 * n : ℕ) → + (∫ t : ℝ in 0..1, p.eval t) = + ∑ i : Fin n, Lagrange.quadratureWeight L₀ r i * p.eval (r i)) ∧ + (∀ᶠ X : ℝ in atTop, StrictMono (s X) ∧ + (∀ i, (Chebyshev.primeWindowPolynomial X (H X) n).IsRoot (s X i)) ∧ + (∀ i, 0 < Lagrange.quadratureWeight (L X) (s X) i) ∧ + (∀ p : ℝ[X], p.degree < (2 * n : ℕ) → + (∑ a ∈ Chebyshev.primeWindow X (H X), + (Real.log a / H X) * p.eval (((a : ℝ) - X) / H X)) = + ∑ i : Fin n, Lagrange.quadratureWeight (L X) (s X) i * p.eval (s X i)) ∧ + (∀ i, |s X i - r i| ≤ C / Real.log X) ∧ + ∀ i, |Lagrange.quadratureWeight (L X) (s X) i - + Lagrange.quadratureWeight L₀ r i| ≤ C / Real.log X) ∧ + ∀ i, Tendsto (fun X : ℝ ↦ s X i) atTop (𝓝 (r i)) ∧ + Tendsto (fun X : ℝ ↦ Lagrange.quadratureWeight (L X) (s X) i) atTop + (𝓝 (Lagrange.quadratureWeight L₀ r i)) := by + simpa only [RealRooted.shiftedJacobiWeight_zero_zero, + Chebyshev.primeWindowWeightedMoment_one, Chebyshev.primeWindowWeightedPolynomial_one, + mul_one] using hRH.exists_primeWindow_jacobi_gaussian_quadrature + (α := 0) (β := 0) (by norm_num) (by norm_num) n + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PrimeWindowRoots.lean b/RealRooted/RiemannHypothesis/PrimeWindowRoots.lean new file mode 100644 index 000000000..2734b2718 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PrimeWindowRoots.lean @@ -0,0 +1,68 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import Mathlib.NumberTheory.LSeries.RiemannZeta + +public import RealRooted.Mathlib.RingTheory.Polynomial.Jacobi + +public import RealRooted.Mathlib.NumberTheory.Chebyshev.PrimeWindowOrthogonal + +import Mathlib.Algebra.Polynomial.Splits +import RealRooted.RiemannHypothesis.PrimeWindowJacobiRoots + +/-! +# Prime-window roots approaching shifted Legendre roots under RH + +For every fixed degree, RH gives eventually simple real prime-window roots. +Their increasing enumeration approaches the increasing shifted Legendre roots +with error `O(1 / log X)`. The nodes are produced by coefficient perturbation; +their real-rootedness is not an input assumption. +-/ + +public section + +open Filter Topology Polynomial + +namespace RiemannHypothesis + +/-- Every fixed-degree prime-window polynomial has eventually simple real roots +whose ordered errors from the shifted Legendre roots are `O(1 / log X)`. -/ +theorem exists_primeWindowPolynomial_roots_sub_le (hRH : RiemannHypothesis) (n : ℕ) : + ∃ r : Fin n → ℝ, StrictMono r ∧ + (∀ i, (shiftedJacobiMonic n 0 0).IsRoot (r i)) ∧ + ∃ C : ℝ, 0 < C ∧ ∀ᶠ X : ℝ in atTop, + (Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).Splits ∧ + (Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).roots.Nodup ∧ + ∃ s : Fin n → ℝ, StrictMono s ∧ + (∀ i, (Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).IsRoot + (s i)) ∧ + ∀ i, |s i - r i| ≤ C / Real.log X := by + simpa only [RealRooted.shiftedJacobiWeight_zero_zero, + Chebyshev.primeWindowWeightedPolynomial_one] using + hRH.exists_primeWindowWeightedPolynomial_roots_sub_le + (α := 0) (β := 0) (by norm_num) (by norm_num) n + +/-- The ordered prime roots can be chosen as one family converging coordinatewise +to the actual ordered shifted Legendre roots, retaining the quantitative rate. +All root properties are eventual; the degree-zero enumeration is empty. -/ +theorem exists_primeWindowPolynomial_roots_tendsto (hRH : RiemannHypothesis) (n : ℕ) : + ∃ (r : Fin n → ℝ) (s : ℝ → Fin n → ℝ) (C : ℝ), 0 < C ∧ StrictMono r ∧ + (∀ i, (shiftedJacobiMonic n 0 0).IsRoot (r i)) ∧ + (∀ᶠ X : ℝ in atTop, + (Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).Splits ∧ + (Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).roots.Nodup ∧ + StrictMono (s X) ∧ + (∀ i, (Chebyshev.primeWindowPolynomial X (Real.sqrt X * Real.log X ^ 3) n).IsRoot + (s X i)) ∧ + ∀ i, |s X i - r i| ≤ C / Real.log X) ∧ + ∀ i, Tendsto (fun X : ℝ ↦ s X i) atTop (𝓝 (r i)) := by + simpa only [RealRooted.shiftedJacobiWeight_zero_zero, + Chebyshev.primeWindowWeightedPolynomial_one] using + hRH.exists_primeWindowWeightedPolynomial_roots_tendsto + (α := 0) (β := 0) (by norm_num) (by norm_num) n + +end RiemannHypothesis diff --git a/RealRooted/RiemannHypothesis/PureHeatTrace.lean b/RealRooted/RiemannHypothesis/PureHeatTrace.lean new file mode 100644 index 000000000..93033ee20 --- /dev/null +++ b/RealRooted/RiemannHypothesis/PureHeatTrace.lean @@ -0,0 +1,50 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace +import Mathlib.Analysis.Calculus.LogDeriv +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativePureHeatTrace +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative + +/-! +# Pure xi zero heat traces under RH + +The checked order-one-half bound removes the exponential factor in every +xi derivative's Type-I factorization. Thus its signed logarithmic derivatives +are pure heat-trace Laplace moments at all nonnegative arguments. +-/ + +public section + +open Complex MeasureTheory + +namespace RealRooted + +/-- RH and the unconditional order-one-half estimate give a pure positive +zero heat trace for every xi derivative shift, with no constant correction. -/ +theorem exists_pure_heatTrace_xi_logDeriv (hRH : RiemannHypothesis) (s : ℕ) : + ∃ a : ℕ → ℝ, (∀ i, 0 ≤ a i) ∧ Summable a ∧ + iteratedDeriv s riemannXiTheta = + (fun z : ℂ ↦ iteratedDeriv s riemannXiTheta 0 * + ∏' i, (1 + (a i : ℂ) * z)) ∧ + TauCeti.IsCompletelyMonotoneOnIoi (Real.positiveSlopeHeatTrace a) ∧ + ∀ (k : ℕ) (x : ℝ), 0 ≤ x → + IntegrableOn (fun t : ℝ ↦ Real.exp (-x * t) * t ^ k * + Real.positiveSlopeHeatTrace a t) (Set.Ioi 0) ∧ + (-1 : ℝ) ^ k * iteratedDeriv k (fun y : ℝ ↦ + (logDeriv (iteratedDeriv s riemannXiTheta) (y : ℂ)).re) x = + ∫ t : ℝ in Set.Ioi 0, + Real.exp (-x * t) * t ^ k * Real.positiveSlopeHeatTrace a t := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).exists_pure_heatTrace_logDeriv + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta s) + (by norm_num) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/RealLogHierarchy.lean b/RealRooted/RiemannHypothesis/RealLogHierarchy.lean new file mode 100644 index 000000000..b9aaa9a63 --- /dev/null +++ b/RealRooted/RiemannHypothesis/RealLogHierarchy.lean @@ -0,0 +1,90 @@ +/- +Copyright (c) 2026 RealRooted contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: RealRooted contributors +-/ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import TauCeti.Analysis.CompletelyMonotone.Basic +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.SpecialFunctions.Sqrt +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.RealLogHierarchy +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity +import RealRooted.Mathlib.Analysis.Complex.ForwardDifference +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas + +/-! +# The literal square-root xi logarithm under RH + +Equation (3.28) of Zhang, arXiv:1506.07012v13, uses the real function +`log ξ(1/2 + √x)`. On the positive axis it agrees with the logarithm of +the existing entire square-variable xi function. The equality is used +locally to transfer every derivative; no square-root derivative at zero +is needed. Positivity of the logarithm's argument is unconditional. +-/ + +public section + +open Filter Topology + +/-- The positive-real square-root presentation agrees exactly with the +entire square-variable xi function, including at zero. -/ +theorem riemannXi_half_add_sqrt {x : ℝ} (hx : 0 ≤ x) : + riemannXi ((1 / 2 : ℂ) + (Real.sqrt x : ℝ)) = riemannXiTheta (x : ℂ) := by + have hs : ((Real.sqrt x : ℝ) : ℂ) ^ 2 = (x : ℂ) := by + exact_mod_cast Real.sq_sqrt hx + rw [← riemannXiTheta_sq, hs] + +/-- The square-root xi value appearing in Zhang's literal logarithm +formula is unconditionally positive for every nonnegative argument. -/ +theorem riemannXi_half_add_sqrt_re_pos {x : ℝ} (hx : 0 ≤ x) : + 0 < (riemannXi ((1 / 2 : ℂ) + (Real.sqrt x : ℝ))).re := by + rw [riemannXi_half_add_sqrt hx] + have hpos : ∀ n : ℕ, 0 ≤ (iteratedDeriv n riemannXiTheta 0).re := + fun n ↦ (riemannXiCoeff_pos n).le + have hp0 : 0 < (riemannXiTheta 0).re := riemannXiCoeff_zero_pos + exact hp0.trans_le + (differentiable_riemannXiTheta.re_apply_le_of_iteratedDeriv_nonneg (fun n _ ↦ hpos n) hx) + +namespace RealRooted + +/-- RH implies the complete literal real-logarithm hierarchy for every +fixed derivative shift of the square-variable xi function. -/ +theorem isCompletelyMonotoneOnIoi_xi_weighted_log + (hRH : RiemannHypothesis) (s k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv (m + 1) (fun z : ℝ ↦ + Real.log (iteratedDeriv s riemannXiTheta (z : ℂ)).re) y) x) := + IsLaguerrePolyaTypeI.isCompletelyMonotoneOnIoi_weighted_log + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s) + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) k m + +/-- Zhang's literal equation (3.28): RH implies complete monotonicity of +all weighted derivatives of `log ξ(1/2 + √x)` on the positive half-line. -/ +theorem isCompletelyMonotoneOnIoi_xi_sqrt_weighted_log + (hRH : RiemannHypothesis) (k m : ℕ) : + TauCeti.IsCompletelyMonotoneOnIoi (fun x : ℝ ↦ + (-1 / x) ^ m * iteratedDeriv k (fun y : ℝ ↦ y ^ (k + m) * + iteratedDeriv (m + 1) (fun z : ℝ ↦ + Real.log (riemannXi ((1 / 2 : ℂ) + (Real.sqrt z : ℝ))).re) y) x) := by + have hbase := isCompletelyMonotoneOnIoi_xi_weighted_log hRH 0 k m + simp only [iteratedDeriv_zero] at hbase + apply hbase.congr + intro x hx + have heq : (fun z : ℝ ↦ + Real.log (riemannXi ((1 / 2 : ℂ) + (Real.sqrt z : ℝ))).re) =ᶠ[𝓝 x] + (fun z : ℝ ↦ Real.log (riemannXiTheta (z : ℂ)).re) := by + filter_upwards [isOpen_Ioi.mem_nhds hx] with z hz + rw [riemannXi_half_add_sqrt hz.le] + have hmul : (fun y : ℝ ↦ y ^ (k + m) * iteratedDeriv (m + 1) (fun z : ℝ ↦ + Real.log (riemannXi ((1 / 2 : ℂ) + (Real.sqrt z : ℝ))).re) y) =ᶠ[𝓝 x] + (fun y : ℝ ↦ y ^ (k + m) * iteratedDeriv (m + 1) + (fun z : ℝ ↦ Real.log (riemannXiTheta (z : ℂ)).re) y) := + (heq.iteratedDeriv (m + 1)).mono fun y hy ↦ congrArg (y ^ (k + m) * ·) hy + exact congrArg ((-1 / x) ^ m * ·) (hmul.iteratedDeriv_eq k) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/StieltjesFraction.lean b/RealRooted/RiemannHypothesis/StieltjesFraction.lean new file mode 100644 index 000000000..e90fd395c --- /dev/null +++ b/RealRooted/RiemannHypothesis/StieltjesFraction.lean @@ -0,0 +1,93 @@ +/- +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 RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.StrictMoment +import RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment +import RealRooted.Mathlib.Analysis.Calculus.LogDeriv.Star +import RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star +import RealRooted.RiemannHypothesis.StrictMoments +import RealRooted.RiemannHypothesis.MomentCriterion + +/-! +# RH and formal Stieltjes fractions of logarithmic xi derivatives + +RH gives strictly positive formal Stieltjes numerators for the signed +logarithmic-derivative coefficients of every derivative of the square-variable +xi function. Conversely, any nonnegative formal S-fraction for the unshifted +logarithmic derivative gives a genuine moment measure and hence RH. + +The identities are formal power-series identities. They do not assert +numerical convergence of the continued fraction. The converse uses the +actual complex Taylor coefficients, whose reality is proved unconditionally. +-/ + +public section + +open Complex Polynomial MeasureTheory + +namespace RealRooted + +/-- Under RH, each xi derivative has a strictly positive formal S-fraction for +the signed Taylor coefficients of its logarithmic derivative. -/ +theorem exists_pos_stieltjesTail_logDeriv_riemannXiTheta + (hRH : RiemannHypothesis) (s : ℕ) : + ∃ (c : ℝ) (a : ℕ → ℝ), 0 < c ∧ (∀ k, 0 < a k) ∧ + PowerSeries.mk (fun k => (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv (iteratedDeriv s riemannXiTheta)) 0).re / k.factorial) = + PowerSeries.C c * PowerSeries.stieltjesTail a 0 := by + let m : ℕ → ℝ := fun k => (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv (iteratedDeriv s riemannXiTheta)) 0).re / k.factorial + have hpos (n : ℕ) : (momentHankelMatrix m n).PosDef := by + have h := posDef_logDeriv_iteratedDeriv_riemannXiTheta hRH s n 0 + simp only [Nat.add_zero] at h + exact h + have hshift (n : ℕ) : (momentHankelMatrix (fun k => m (k + 1)) n).PosDef := by + exact posDef_logDeriv_iteratedDeriv_riemannXiTheta hRH s n 1 + obtain ⟨a, ha, _, hf⟩ := exists_pos_stieltjesTail_of_hankel_posDef m hpos hshift + refine ⟨m 0, a, ?_, ha, hf⟩ + simpa only [momentNormSq_zero] using momentNormSq_pos m 0 (hpos 1) + +/-- Mathlib's RH is equivalent to a nonnegative formal Stieltjes fraction for +the signed logarithmic-derivative coefficients of the square-variable xi function. -/ +theorem riemannHypothesis_iff_exists_stieltjesTail_logDeriv : + RiemannHypothesis ↔ ∃ (c : ℝ) (a : ℕ → ℝ), 0 ≤ c ∧ (∀ k, 0 ≤ a k) ∧ + PowerSeries.mk (fun k => (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv riemannXiTheta) 0).re / k.factorial) = + PowerSeries.C c * PowerSeries.stieltjesTail a 0 := by + constructor + · intro hRH + obtain ⟨c, a, hc, ha, hf⟩ := exists_pos_stieltjesTail_logDeriv_riemannXiTheta hRH 0 + exact ⟨c, a, hc.le, fun k => (ha k).le, by simpa only [iteratedDeriv_zero] using hf⟩ + · rintro ⟨c, a, hc, ha, hf⟩ + obtain ⟨mu, _, hpos, hmom⟩ := + PowerSeries.exists_measure_moments_of_eq_stieltjesTail ha hc hf + apply riemannHypothesis_of_logDeriv_moments hpos (fun k => (hmom k).1) + intro k + have hreal : ((iteratedDeriv k (logDeriv riemannXiTheta) 0).re : ℂ) = + iteratedDeriv k (logDeriv riemannXiTheta) 0 := + ofReal_re_iteratedDeriv_zero (logDeriv_conj riemannXiTheta_conj) k + have h := congrArg (fun r : ℝ => (r : ℂ)) (hmom k).2 + simpa only [PowerSeries.coeff_mk, ofReal_div, ofReal_mul, ofReal_pow, + ofReal_neg, ofReal_one, ofReal_natCast, hreal] using h.symm + +/-- The nonnegative-fraction criterion is equivalent to a strictly positive +one, because RH makes every shifted Hankel form strictly positive. -/ +theorem riemannHypothesis_iff_exists_pos_stieltjesTail_logDeriv : + RiemannHypothesis ↔ ∃ (c : ℝ) (a : ℕ → ℝ), 0 < c ∧ (∀ k, 0 < a k) ∧ + PowerSeries.mk (fun k => (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv riemannXiTheta) 0).re / k.factorial) = + PowerSeries.C c * PowerSeries.stieltjesTail a 0 := by + constructor + · intro hRH + simpa only [iteratedDeriv_zero] using exists_pos_stieltjesTail_logDeriv_riemannXiTheta hRH 0 + · rintro ⟨c, a, hc, ha, hf⟩ + exact riemannHypothesis_iff_exists_stieltjesTail_logDeriv.mpr + ⟨c, a, hc.le, fun k => (ha k).le, hf⟩ + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/StrictCoefficient.lean b/RealRooted/RiemannHypothesis/StrictCoefficient.lean new file mode 100644 index 000000000..816a641b6 --- /dev/null +++ b/RealRooted/RiemannHypothesis/StrictCoefficient.lean @@ -0,0 +1,46 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity +import RealRooted.RiemannHypothesis.JensenSimple +import RealRooted.SimpleRoots.QuadraticDiscriminant +import Mathlib.Tactic.Convert +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Ring + +/-! +# Strict raw xi Turán inequalities under RH + +The checked simple-root theorem for the degree-two Jensen polynomial gives a +strictly positive discriminant. This conditional proof does not +supply the unconditional Fourier-kernel argument of Csordas--Varga (1988). +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- The degree-two shifted xi Jensen polynomial in coefficient form. -/ +private theorem riemannXiJensenPolynomial_two (n : ℕ) : + riemannXiJensenPolynomial 2 n = C (riemannXiCoeff n) + + C (2 * riemannXiCoeff (n + 1)) * X + C (riemannXiCoeff (n + 2)) * X ^ 2 := by + norm_num [riemannXiJensenPolynomial, jensenPolynomial, Finset.sum_range_succ, + ← C_mul_X_pow_eq_monomial, C_ofNat] + +/-- RH gives strict log-concavity of the raw exponential xi Taylor data. -/ +theorem riemannXiCoeff_strict_logConcave (hRH : RiemannHypothesis) (n : ℕ) : + riemannXiCoeff n * riemannXiCoeff (n + 2) < riemannXiCoeff (n + 1) ^ 2 := by + have hsimple : IsSimpleRealRooted + (C (riemannXiCoeff (n + 2)) * X ^ 2 + + C (2 * riemannXiCoeff (n + 1)) * X + C (riemannXiCoeff n)) := by + convert isSimpleRealRooted_riemannXiJensenPolynomial hRH 2 n using 1 + rw [riemannXiJensenPolynomial_two] + ring + have h := hsimple.discrim_pos (riemannXiCoeff_pos (n + 2)).ne' + dsimp only [discrim] at h + nlinarith + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/StrictMoments.lean b/RealRooted/RiemannHypothesis/StrictMoments.lean new file mode 100644 index 000000000..21ce9394c --- /dev/null +++ b/RealRooted/RiemannHypothesis/StrictMoments.lean @@ -0,0 +1,48 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.LogDerivativeStrict +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.RiemannHypothesis.JensenSimple +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative + +/-! +# Strict logarithmic xi moment inequalities under RH + +Under Mathlib's RH, the signed logarithmic-derivative coefficients of every +xi derivative give positive definite Hankel matrices at every size and shift. +Their determinants are strictly positive, including the empty determinant. +Infinitely many distinct zeros suffice; no xi zero simplicity is assumed. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH, every shifted logarithmic-derivative moment matrix of every +xi derivative is positive definite. -/ +theorem posDef_logDeriv_iteratedDeriv_riemannXiTheta + (hRH : RiemannHypothesis) (s n r : ℕ) : + Matrix.PosDef (fun i j : Fin n => + let k := i.val + j.val + r + (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv (iteratedDeriv s riemannXiTheta)) 0).re / k.factorial) := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH s).posDef_logDeriv + (iteratedDeriv_riemannXiTheta_zero_ne_zero s) + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta s) + (by norm_num) (iteratedDeriv_riemannXiTheta_ne_polynomial s) n r + +/-- Under RH, all shifted logarithmic-derivative Hankel determinants of +all xi derivatives are strictly positive. -/ +theorem det_logDeriv_iteratedDeriv_riemannXiTheta_pos + (hRH : RiemannHypothesis) (s n r : ℕ) : + 0 < Matrix.det (fun i j : Fin n => + let k := i.val + j.val + r + (-1 : ℝ) ^ k * + (iteratedDeriv k (logDeriv (iteratedDeriv s riemannXiTheta)) 0).re / k.factorial) := + (posDef_logDeriv_iteratedDeriv_riemannXiTheta hRH s n r).det_pos + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/TotalPositivity.lean b/RealRooted/RiemannHypothesis/TotalPositivity.lean new file mode 100644 index 000000000..58f9091aa --- /dev/null +++ b/RealRooted/RiemannHypothesis/TotalPositivity.lean @@ -0,0 +1,51 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.RiemannHypothesis +import RealRooted.RiemannHypothesis.MultiplierSequence +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivity + +/-! +# Total positivity of xi Taylor coefficients under RH + +For every derivative shift `n`, RH implies that the ordinary Taylor sequence +`γ(n + k) / k!` is Pólya-frequency. Thus every minor of its Toeplitz matrix is +nonnegative. This differs from the multiplier-sequence property of `γ` itself. + +The unshifted implication is the forward part of the RH criterion recalled in +O. M. Katkova, *Multiple positivity and the Riemann zeta-function*, +https://arxiv.org/abs/math/0505174. The converse is not asserted here. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Every derivative of the square-variable xi function is Type-I +Laguerre--Pólya under RH. -/ +theorem isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta + (hRH : RiemannHypothesis) (n : ℕ) : + IsLaguerrePolyaTypeI (iteratedDeriv n riemannXiTheta) := by + have hf := (riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mp hRH).iterate_deriv n + have hgamma (k : ℕ) : iteratedDeriv k (iteratedDeriv n riemannXiTheta) 0 = + (riemannXiCoeff (n + k) : ℂ) := by + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm] + using (ofReal_riemannXiCoeff (n + k)).symm + rw [eq_complexExpGeneratingFunction_of_iteratedDeriv hf.differentiable hgamma] + exact IsPFMultiplierSequence.isLaguerrePolyaTypeI_complexExpGeneratingFunction + (isPFMultiplierSequence_riemannXiCoeff_shift hRH n) + +/-- Under RH all Toeplitz minors of every factorial-normalized shifted xi +coefficient sequence are nonnegative. -/ +theorem isPolyaFreqSeq_riemannXiCoeff_div_factorial (hRH : RiemannHypothesis) (n : ℕ) : + IsPolyaFreqSeq (fun k => riemannXiCoeff (n + k) / k.factorial) := by + simpa only [riemannXiCoeff, iteratedDeriv_eq_iterate, + ← Function.iterate_add_apply, Nat.add_comm] using + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n).isPolyaFreqSeq + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/TotalPositivityCriterion.lean b/RealRooted/RiemannHypothesis/TotalPositivityCriterion.lean new file mode 100644 index 000000000..1d059d227 --- /dev/null +++ b/RealRooted/RiemannHypothesis/TotalPositivityCriterion.lean @@ -0,0 +1,43 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.AissenSchoenbergWhitneyBase +import RealRooted.RiemannHypothesis +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TotalPositivityConverse + +/-! +# The Riemann hypothesis and total positivity + +Mathlib's Riemann hypothesis is equivalent to total positivity of the ordinary +Taylor coefficients `γ(k) / k!` of the square-variable xi function. This is the +RH criterion following Theorem C in O. M. Katkova, *Multiple positivity and the +Riemann zeta-function*, arXiv:math/0505174. +-/ + +public section + +namespace RealRooted + +/-- RH is equivalent to the Pólya-frequency property of the ordinary xi Taylor +coefficients. The factorial converts exponential Taylor data to ordinary coefficients. -/ +theorem riemannHypothesis_iff_isPolyaFreqSeq_riemannXiCoeff : + RiemannHypothesis ↔ IsPolyaFreqSeq (fun k => riemannXiCoeff k / k.factorial) := by + refine ⟨fun h => ?_, fun h => ?_⟩ + · simpa using isPolyaFreqSeq_riemannXiCoeff_div_factorial h 0 + · have htype : IsLaguerrePolyaTypeI riemannXiTheta := + (isLaguerrePolyaTypeI_iff_isPolyaFreqSeq differentiable_riemannXiTheta + (fun k => (ofReal_riemannXiCoeff k).symm) + (by simpa [riemannXiCoeff] using riemannXiCoeff_pos 0)).mpr h + exact riemannHypothesis_iff_isLaguerrePolya_riemannXiTheta.mpr htype.toLaguerrePolya + +/-- Equivalently, every derivative shift has a Pólya-frequency ordinary Taylor sequence. -/ +theorem riemannHypothesis_iff_isPolyaFreqSeq_riemannXiCoeff_shift : + RiemannHypothesis ↔ + ∀ n, IsPolyaFreqSeq (fun k => riemannXiCoeff (n + k) / k.factorial) := by + refine ⟨isPolyaFreqSeq_riemannXiCoeff_div_factorial, fun h => ?_⟩ + apply riemannHypothesis_iff_isPolyaFreqSeq_riemannXiCoeff.mpr + simpa using h 0 + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/Turan.lean b/RealRooted/RiemannHypothesis/Turan.lean new file mode 100644 index 000000000..af327e1cc --- /dev/null +++ b/RealRooted/RiemannHypothesis/Turan.lean @@ -0,0 +1,66 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.BrandenLC.Sequence +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Turan + +/-! +# Raw xi derivative inequalities under RH + +Craven--Csordas's cubic and second iterated Turán inequalities apply to every +derivative of the normalized xi function under Mathlib's RH. The coefficient +statements use raw `riemannXiCoeff` values, without factorial division. +They do not assert arbitrary iteration of the raw coefficient sequence. +-/ + +public section + +namespace RealRooted + +/-- Every xi derivative satisfies the cubic derivative inequality under RH +at every nonnegative real argument. -/ +theorem cubic_iteratedDeriv_riemannXiTheta_nonneg + (hRH : RiemannHypothesis) (n : ℕ) {x : ℝ} (hx : 0 ≤ x) : + 0 ≤ 2 * (iteratedDeriv (n + 1) riemannXiTheta x).re ^ 3 - + 3 * (iteratedDeriv n riemannXiTheta x).re * + (iteratedDeriv (n + 1) riemannXiTheta x).re * + (iteratedDeriv (n + 2) riemannXiTheta x).re + + (iteratedDeriv n riemannXiTheta x).re ^ 2 * + (iteratedDeriv (n + 3) riemannXiTheta x).re := by + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm] using + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n).cubic_derivative_nonneg hx + +/-- RH gives a cubic inequality between four consecutive raw xi coefficients. -/ +theorem cubic_riemannXiCoeff_nonneg (hRH : RiemannHypothesis) (n : ℕ) : + 0 ≤ 2 * riemannXiCoeff (n + 1) ^ 3 - + 3 * riemannXiCoeff n * riemannXiCoeff (n + 1) * riemannXiCoeff (n + 2) + + riemannXiCoeff n ^ 2 * riemannXiCoeff (n + 3) := + cubic_iteratedDeriv_riemannXiTheta_nonneg hRH n le_rfl + +/-- Every xi derivative satisfies the second raw Turán inequality under RH +at every nonnegative real argument. -/ +theorem second_turan_iteratedDeriv_riemannXiTheta_nonneg + (hRH : RiemannHypothesis) (n : ℕ) {x : ℝ} (hx : 0 ≤ x) : + 0 ≤ ((iteratedDeriv (n + 2) riemannXiTheta x).re ^ 2 - + (iteratedDeriv (n + 1) riemannXiTheta x).re * + (iteratedDeriv (n + 3) riemannXiTheta x).re) ^ 2 - + ((iteratedDeriv (n + 1) riemannXiTheta x).re ^ 2 - + (iteratedDeriv n riemannXiTheta x).re * + (iteratedDeriv (n + 2) riemannXiTheta x).re) * + ((iteratedDeriv (n + 3) riemannXiTheta x).re ^ 2 - + (iteratedDeriv (n + 2) riemannXiTheta x).re * + (iteratedDeriv (n + 4) riemannXiTheta x).re) := by + simpa only [iteratedDeriv_eq_iterate, ← Function.iterate_add_apply, Nat.add_comm] using + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n).second_turan_nonneg hx + +/-- The second log-concavity iterate of the raw xi coefficients is +nonnegative at every index at least two under RH. -/ +theorem iterate_logConcavity_riemannXiCoeff_two_nonneg + (hRH : RiemannHypothesis) (n : ℕ) : + 0 ≤ ((logConcavitySequence^[2]) riemannXiCoeff) (n + 2) := by + have h := second_turan_iteratedDeriv_riemannXiTheta_nonneg hRH n (x := 0) le_rfl + simpa [Function.iterate_succ_apply', logConcavitySequence, Nat.add_sub_assoc, + Nat.add_assoc, riemannXiCoeff] using h + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/TypeIInfiniteDifferential.lean b/RealRooted/RiemannHypothesis/TypeIInfiniteDifferential.lean new file mode 100644 index 000000000..fb3d2d55b --- /dev/null +++ b/RealRooted/RiemannHypothesis/TypeIInfiniteDifferential.lean @@ -0,0 +1,38 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIInfiniteDifferential + +/-! +# Positive Type-I xi differential images under RH + +Under Mathlib's Riemann hypothesis every derivative of the square-variable xi +function is positive Type-I. Pólya's positive Type-I infinite differential +theorem therefore applies with xi as symbol or target. The actual series +converges everywhere and no convergence or growth premise is needed. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH, every differentiated xi symbol maps positive Type-I entire +targets to positive Type-I entire functions by the actual differential series. -/ +theorem isLaguerrePolyaTypeI_riemannXi_infiniteDifferentialApply + (hRH : RiemannHypothesis) (n : ℕ) {f : ℂ → ℂ} (hf : IsLaguerrePolyaTypeI f) : + IsLaguerrePolyaTypeI (Complex.infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f) := + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n).infiniteDifferentialApply hf + +/-- Under RH, every positive Type-I differential symbol maps each derivative +of xi to a positive Type-I entire function, with convergence automatic. -/ +theorem isLaguerrePolyaTypeI_infiniteDifferentialApply_riemannXi + (hRH : RiemannHypothesis) (n : ℕ) {φ : ℂ → ℂ} (hφ : IsLaguerrePolyaTypeI φ) : + IsLaguerrePolyaTypeI (Complex.infiniteDifferentialApply φ (iteratedDeriv n riemannXiTheta)) := + hφ.infiniteDifferentialApply (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n) + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/Veronese.lean b/RealRooted/RiemannHypothesis/Veronese.lean new file mode 100644 index 000000000..28a398eaf --- /dev/null +++ b/RealRooted/RiemannHypothesis/Veronese.lean @@ -0,0 +1,56 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Coefficients +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI +import RealRooted.RiemannHypothesis.MultiplierSequence +import RealRooted.MultiplierSequence.Veronese +import RealRooted.MultiplierSequence.Arithmetic +import RealRooted.MultiplierSequence.PolyaSchur + +/-! +# Ordinary coefficient sections of shifted xi under RH + +These derived consequences use ordinary Taylor sections of every derivative +of the normalized xi function. They differ from arithmetic subsequences of +its raw Taylor derivatives by the indicated factorial ratio. +-/ + +public section + +namespace RealRooted + +/-- Under RH, every ordinary Taylor section of each xi derivative defines a +PF multiplier sequence after restoring exponential Taylor normalization. -/ +theorem isPFMultiplierSequence_riemannXiCoeff_veronese + (hRH : RiemannHypothesis) (n : ℕ) {r s : ℕ} (hs : s < r) : + IsPFMultiplierSequence (fun k ↦ + (k.factorial : ℝ) * riemannXiCoeff (n + (s + r * k)) / + (s + r * k).factorial) := by + simpa only [Nat.add_comm _ n] using + ((isPFMultiplierSequence_riemannXiCoeff hRH).shift n).veronese hs + +/-- Under RH, every ordinary Taylor section of each xi derivative is an +entire positive Type-I Laguerre--Pólya function. -/ +theorem isLaguerrePolyaTypeI_riemannXiCoeff_veronese + (hRH : RiemannHypothesis) (n : ℕ) {r s : ℕ} (hs : s < r) : + IsLaguerrePolyaTypeI (complexExpGeneratingFunction (fun k ↦ + (k.factorial : ℝ) * riemannXiCoeff (n + (s + r * k)) / + (s + r * k).factorial)) := + IsPFMultiplierSequence.isLaguerrePolyaTypeI_complexExpGeneratingFunction + (isPFMultiplierSequence_riemannXiCoeff_veronese hRH n hs) + +/-- Under RH, the ordinary section coefficients of every xi derivative +have a totally nonnegative Toeplitz matrix. -/ +theorem isPolyaFreqSeq_riemannXiCoeff_veronese + (hRH : RiemannHypothesis) (n : ℕ) {r s : ℕ} (hs : s < r) : + IsPolyaFreqSeq (fun k ↦ + riemannXiCoeff (n + (s + r * k)) / (s + r * k).factorial) := by + have h := IsPFMultiplierSequence.isPolyaFreqSeq_div_factorial + (isPFMultiplierSequence_riemannXiCoeff_veronese hRH n hs) + convert h using 1 + funext k + have hk : (k.factorial : ℝ) ≠ 0 := by positivity + have hd : ((s + r * k).factorial : ℝ) ≠ 0 := by positivity + field_simp [hk, hd] + +end RealRooted diff --git a/RealRooted/RiemannHypothesis/XiDifferentialSimple.lean b/RealRooted/RiemannHypothesis/XiDifferentialSimple.lean new file mode 100644 index 000000000..50d100c77 --- /dev/null +++ b/RealRooted/RiemannHypothesis/XiDifferentialSimple.lean @@ -0,0 +1,52 @@ +module + +public import RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta +public import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya +public import RealRooted.Mathlib.Analysis.Complex.InfiniteDifferential.Basic +import RealRooted.RiemannHypothesis.TotalPositivity +import RealRooted.RiemannHypothesis.JensenSimple +import RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeIDifferentialSimple +import RealRooted.Mathlib.Analysis.Complex.GrowthOrder.Derivative + +/-! +# Simple infinite differential images under RH + +Under Mathlib's RH, every derivative of the square-variable xi function is +a nonpolynomial Type-I symbol of order at most one half, nonzero at zero. +Acting on any LP entire target therefore gives zero or a function with only +simple real zeros. This concerns differential images, not xi's own zeros. +-/ + +public section + +open Complex + +namespace RealRooted + +/-- Under RH, every derivative of the normalized xi symbol has simple +nonzero differential images on arbitrary LP entire targets. -/ +theorem deriv_xi_differential_ne_zero (hRH : RiemannHypothesis) (n : ℕ) + {f : ℂ → ℂ} (hf : IsLaguerrePolya f) + (hne : infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f ≠ 0) + {z : ℂ} (hz : infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f z = 0) : + _root_.deriv (infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f) z ≠ 0 := by + exact IsLaguerrePolyaTypeI.deriv_differential_ne_zero_of_order_lt_one + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n) hf + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n) + (by norm_num) (iteratedDeriv_riemannXiTheta_ne_polynomial n) hne hz + +/-- Under RH, all shifted xi differential operators send any LP entire target +to zero or to an LP entire function with only simple real zeros. -/ +theorem xi_differential_simple_or_zero (hRH : RiemannHypothesis) (n : ℕ) + {f : ℂ → ℂ} (hf : IsLaguerrePolya f) : + infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f = 0 ∨ + IsLaguerrePolya (infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f) ∧ + ∀ z, infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f z = 0 → + z.im = 0 ∧ + _root_.deriv (infiniteDifferentialApply (iteratedDeriv n riemannXiTheta) f) z ≠ 0 := by + exact IsLaguerrePolyaTypeI.differential_simple_or_zero_of_order_lt_one + (isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta hRH n) hf + (orderLE_half_riemannXiTheta.iteratedDeriv differentiable_riemannXiTheta n) + (by norm_num) (iteratedDeriv_riemannXiTheta_ne_polynomial n) + +end RealRooted diff --git a/RealRooted/SimpleRoots/Affine.lean b/RealRooted/SimpleRoots/Affine.lean new file mode 100644 index 000000000..92d728f3e --- /dev/null +++ b/RealRooted/SimpleRoots/Affine.lean @@ -0,0 +1,47 @@ +module + +public import RealRooted.SimpleRoots +public import Mathlib.RingTheory.Polynomial.ScaleRoots +import Mathlib.Tactic.Ring + +/-! +# Affine invariance of simple real roots +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Translating a polynomial preserves simple real-rootedness. -/ +theorem IsSimpleRealRooted.comp_X_add_C {P : ℝ[X]} + (hP : IsSimpleRealRooted P) (a : ℝ) : + IsSimpleRealRooted (P.comp (X + C a)) := by + refine ⟨comp_X_add_C_ne_zero_iff.mpr hP.1, hP.2.1.comp_X_add_C a, ?_⟩ + simpa only [C_1, one_mul] using hP.2.2.comp_C_mul_X_add_C (b := a) one_ne_zero + +/-- A nonzero root scaling preserves simple real-rootedness. -/ +theorem IsSimpleRealRooted.scaleRoots {P : ℝ[X]} + (hP : IsSimpleRealRooted P) {r : ℝ} (hr : r ≠ 0) : + IsSimpleRealRooted (P.scaleRoots r) := by + refine ⟨P.scaleRoots_ne_zero hP.1 r, hP.2.1.scaleRoots r, ?_⟩ + apply HasSimpleRoots.of_roots_nodup (P.scaleRoots_ne_zero hP.1 r) + rw [roots_scaleRoots P (isUnit_iff_ne_zero.mpr hr)] + exact hP.2.2.roots_nodup.map (mul_right_injective₀ hr) + +/-- Simple real-rootedness is invariant under a nonzero root scaling. -/ +theorem isSimpleRealRooted_scaleRoots_iff {P : ℝ[X]} {r : ℝ} (hr : r ≠ 0) : + IsSimpleRealRooted (P.scaleRoots r) ↔ IsSimpleRealRooted P := by + refine ⟨fun h ↦ ?_, fun h ↦ h.scaleRoots hr⟩ + simpa only [← scaleRoots_mul, mul_inv_cancel₀ hr, scaleRoots_one] using + h.scaleRoots (inv_ne_zero hr) + +/-- Simple real-rootedness is invariant under translation. -/ +theorem isSimpleRealRooted_comp_X_add_C_iff (P : ℝ[X]) (a : ℝ) : + IsSimpleRealRooted (P.comp (X + C a)) ↔ IsSimpleRealRooted P := by + refine ⟨fun h ↦ ?_, fun h ↦ h.comp_X_add_C a⟩ + have heq : (X + C a).comp (X + C (-a)) = (X : ℝ[X]) := by simp + simpa only [comp_assoc, heq, comp_X] using h.comp_X_add_C (-a) + +end RealRooted diff --git a/RealRooted/SimpleRoots/QuadraticDiscriminant.lean b/RealRooted/SimpleRoots/QuadraticDiscriminant.lean new file mode 100644 index 000000000..8186c77bf --- /dev/null +++ b/RealRooted/SimpleRoots/QuadraticDiscriminant.lean @@ -0,0 +1,38 @@ +module + +public import RealRooted.SimpleRoots +public import Mathlib.Algebra.QuadraticDiscriminant +import Mathlib.Algebra.Polynomial.Degree.SmallDegree +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum + +/-! +# Strict discriminants of simple real-rooted quadratics +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- A genuine quadratic with simple real roots has positive discriminant, +with either sign of its leading coefficient. -/ +theorem IsSimpleRealRooted.discrim_pos {a b c : ℝ} + (h : IsSimpleRealRooted (C a * X ^ 2 + C b * X + C c)) (ha : a ≠ 0) : + 0 < discrim a b c := by + obtain ⟨x, hx⟩ := h.2.1.exists_eval_eq_zero (by + rw [degree_quadratic ha] + norm_num) + have hr : (C a * X ^ 2 + C b * X + C c).IsRoot x := hx + have hx' : a * (x * x) + b * x + c = 0 := by + simpa only [eval_add, eval_mul, eval_C, eval_pow, eval_X, pow_two] using hx + have hd : 2 * a * x + b ≠ 0 := by + intro heq + apply h.2.2.eval_derivative_ne_zero hr + norm_num [derivative_add, derivative_mul, derivative_X_pow] + nlinarith [heq] + rw [discrim_eq_sq_of_quadratic_eq_zero hx'] + exact sq_pos_of_ne_zero hd + +end RealRooted diff --git a/RealRooted/SimpleRoots/Reflection.lean b/RealRooted/SimpleRoots/Reflection.lean new file mode 100644 index 000000000..7337a44c2 --- /dev/null +++ b/RealRooted/SimpleRoots/Reflection.lean @@ -0,0 +1,59 @@ +module + +public import RealRooted.SimpleRoots +import Mathlib.Algebra.Polynomial.Reverse +import RealRooted.Mathlib.Algebra.Polynomial.Reverse + +/-! +# Simple roots under degree reflection + +Reflection can add a multiple zero when the degree bound exceeds the actual +degree. Simplicity away from that zero is sufficient to recover simplicity of +the original polynomial when its constant coefficient is nonzero. +-/ + +public section + +open Polynomial + +namespace RealRooted + +/-- Simplicity away from zero after reflection implies simplicity before +reflection, provided the original polynomial has nonzero constant coefficient. -/ +theorem HasSimpleRootsExcept.of_reflect {p : ℝ[X]} {d : ℕ} + (hsimple : HasSimpleRootsExcept (reflect d p) 0) + (hp0 : p.coeff 0 ≠ 0) (hp : p.Splits) (hd : p.natDegree ≤ d) : + HasSimpleRoots p := by + have hpne : p ≠ 0 := by intro hz; simp [hz] at hp0 + have hrevne : p.reverse ≠ 0 := fun h => hpne (reverse_eq_zero.mp h) + have hprod : X ^ (d - p.natDegree) * p.reverse ≠ 0 := + mul_ne_zero (pow_ne_zero _ X_ne_zero) hrevne + apply HasSimpleRoots.of_roots_nodup hpne + apply (Multiset.nodup_map_iff_of_injective inv_injective).mp + rw [← roots_reverse_eq_map_inv hp hp0, Multiset.nodup_iff_count_le_one] + intro r + rw [count_roots] + by_cases hr : p.reverse.IsRoot r + · have hr0 : r ≠ 0 := by + intro hz + subst r + apply leadingCoeff_ne_zero.mpr hpne + simpa only [IsRoot.def, ← coeff_zero_eq_eval_zero, coeff_zero_reverse] using hr + have hroot : (reflect d p).IsRoot r := by + rw [reflect_eq_X_pow_mul_reverse p hd, IsRoot.def, eval_mul, hr.eq_zero, mul_zero] + have hmult := hsimple r hr0 hroot + rw [reflect_eq_X_pow_mul_reverse p hd, rootMultiplicity_mul hprod, + rootMultiplicity_eq_zero (p := X ^ (d - p.natDegree)) + (by simpa only [IsRoot.def, eval_pow, eval_X] using pow_ne_zero (d - p.natDegree) hr0), + zero_add] at hmult + exact hmult.le + · simp [rootMultiplicity_eq_zero hr] + +/-- Simple reflected roots transfer back even when the reflection bound is not exact. -/ +theorem HasSimpleRoots.of_reflect {p : ℝ[X]} {d : ℕ} + (hsimple : HasSimpleRoots (reflect d p)) + (hp0 : p.coeff 0 ≠ 0) (hp : p.Splits) (hd : p.natDegree ≤ d) : + HasSimpleRoots p := + (hsimple.hasSimpleRootsExcept 0).of_reflect hp0 hp hd + +end RealRooted diff --git a/docs/WORKHORSES.md b/docs/WORKHORSES.md index d4fc950d7..da980b364 100644 --- a/docs/WORKHORSES.md +++ b/docs/WORKHORSES.md @@ -16,7 +16,7 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| | 72 | `RealRooted.StrictInterl.refl` | `RealRooted.Basic.ProperPosition` | A nonzero real-rooted polynomial is in same-degree proper position with itself. | -| 60 | `RealRooted.Interl.toStrictInterl_of_ne` | `RealRooted.Basic.ProperPosition` | | +| 61 | `RealRooted.Interl.toStrictInterl_of_ne` | `RealRooted.Basic.ProperPosition` | | | 42 | `RealRooted.strictInterl_mul_X_of_strictInterl_of_nonneg` | `RealRooted.WagnerX.NonnegativeRoots` | Nonnegative-coefficients form of Wagner (3): if `f ≪ g` and both polynomials have nonnegative coefficients, then `g ≪ X * f`. | | 34 | `RealRooted.StrictInterl.C_mul_left` | `RealRooted.Basic.ProperPosition` | Multiplying the left polynomial in a proper-position relation by a nonzero real scalar preserves proper position. | | 33 | `RealRooted.StrictInterl.C_mul_right` | `RealRooted.Basic.ProperPosition` | Multiplying the right polynomial in a proper-position relation by a nonzero real scalar preserves proper position. | @@ -45,15 +45,15 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| -| 101 | `RealRooted.StrictInterl.toInterlaces` | `RealRooted.Basic.ProperPosition` | | -| 64 | `RealRooted.StrictInterl.toInterl` | `RealRooted.Basic.ProperPosition` | | -| 50 | `RealRooted.interl_zero_left` | `RealRooted.Basic.ProperPosition` | | +| 105 | `RealRooted.StrictInterl.toInterlaces` | `RealRooted.Basic.ProperPosition` | | +| 66 | `RealRooted.StrictInterl.toInterl` | `RealRooted.Basic.ProperPosition` | | +| 52 | `RealRooted.interl_zero_left` | `RealRooted.Basic.ProperPosition` | | | 46 | `RealRooted.interlaces_one_linear` | `RealRooted.Linear` | | +| 45 | `RealRooted.derivative_interlaces_of_natDegree_ne_zero` | `RealRooted.Derivative.Interlacing` | **Derivative interlacing**: the derivative of a nonconstant real-rooted polynomial `f` interlaces `f`. | | 45 | `RealRooted.interl_zero_right` | `RealRooted.Basic.ProperPosition` | | -| 43 | `RealRooted.derivative_interlaces_of_natDegree_ne_zero` | `RealRooted.Derivative.Interlacing` | **Derivative interlacing**: the derivative of a nonconstant real-rooted polynomial `f` interlaces `f`. | | 37 | `RealRooted.Interl.refl` | `RealRooted.Basic.ProperPosition` | A polynomial that splits whenever it is nonzero is zero-aware interlacing with itself. | +| 30 | `RealRooted.Interl.C_mul_left_of_nonneg` | `RealRooted.Basic.ProperPosition` | Multiplying the left polynomial in a zero-aware interlacing relation by a nonnegative scalar preserves the relation. | | 30 | `RealRooted.Interl.C_mul_right_of_nonneg` | `RealRooted.Basic.ProperPosition` | Multiplying the right polynomial in a zero-aware interlacing relation by a nonnegative scalar preserves the relation. | -| 28 | `RealRooted.Interl.C_mul_left_of_nonneg` | `RealRooted.Basic.ProperPosition` | Multiplying the left polynomial in a zero-aware interlacing relation by a nonnegative scalar preserves the relation. | | 27 | `RealRooted.IsPFPolynomial.interl_self` | `RealRooted.PFPolynomial` | A PF polynomial is in zero-aware proper position with itself. | | 23 | `RealRooted.isInterlacingSeq0_iff_pairwise` | `RealRooted.InterlacingSequenceBasic` | `IsInterlacingSeq0` is exactly pairwise `Interl`. | | 22 | `RealRooted.interl_add_right_of_common_left_of_nonneg` | `RealRooted.PFPolynomial` | Fixed-left cone closure in the two-summand form used downstream: if a polynomial is a common left interleaver for two nonnegative-coefficient summands, it is also a common left interleaver for their s | @@ -135,31 +135,31 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| -| 79 | `RealRooted.IsPFPolynomial.of_realRooted_nonneg` | `RealRooted.PFPolynomial` | A split polynomial with nonnegative coefficients is PF. | +| 84 | `RealRooted.IsPFPolynomial.of_realRooted_nonneg` | `RealRooted.PFPolynomial` | A split polynomial with nonnegative coefficients is PF. | | 43 | `RealRooted.IsPFPolynomial.of_nonnegCoeffs_eq_zero_or_splits` | `RealRooted.PFPolynomial` | Construct a PF polynomial from nonnegative coefficients and a zero-or-splits certificate. | -| 42 | `RealRooted.IsPFPolynomial.zero` | `RealRooted.PFPolynomial` | The zero polynomial is PF. | -| 33 | `RealRooted.IsPFPolynomial.one` | `RealRooted.PFPolynomial` | The constant polynomial `1` is PF. | -| 27 | `RealRooted.isPFPolynomial_X_add_C` | `RealRooted.PFPolynomial` | The polynomial `X + C a` is PF when `a` is nonnegative. | -| 21 | `RealRooted.IsPFPolynomial.of_C_nonneg` | `RealRooted.PFPolynomial` | A nonnegative constant polynomial is PF. | -| 15 | `RealRooted.IsPFPolynomial.of_coeff_tendsto` | `RealRooted.PFPolynomial.Closure` | Coefficientwise limits of Pólya-frequency polynomials are Pólya-frequency. | -| 14 | `RealRooted.isPFPolynomial_X_pow` | `RealRooted.PFPolynomial` | Every natural power of `X` is PF. | +| 43 | `RealRooted.IsPFPolynomial.zero` | `RealRooted.PFPolynomial` | The zero polynomial is PF. | +| 36 | `RealRooted.IsPFPolynomial.one` | `RealRooted.PFPolynomial` | The constant polynomial `1` is PF. | +| 29 | `RealRooted.isPFPolynomial_X_add_C` | `RealRooted.PFPolynomial` | The polynomial `X + C a` is PF when `a` is nonnegative. | +| 23 | `RealRooted.IsPFPolynomial.of_C_nonneg` | `RealRooted.PFPolynomial` | A nonnegative constant polynomial is PF. | +| 17 | `RealRooted.IsPFPolynomial.to_sequence` | `RealRooted.PFPolynomial` | The coefficient sequence of a PF polynomial is a Pólya-frequency sequence. | +| 16 | `RealRooted.IsPFPolynomial.of_coeff_tendsto` | `RealRooted.PFPolynomial.Closure` | Coefficientwise limits of Pólya-frequency polynomials are Pólya-frequency. | +| 15 | `RealRooted.isPFPolynomial_X_pow` | `RealRooted.PFPolynomial` | Every natural power of `X` is PF. | | 11 | `RealRooted.IsPFPolynomial.reciprocalShift` | `RealRooted.PFPolynomial` | Shifted reciprocals preserve the PF cone when the shift bounds the degree. | -| 11 | `RealRooted.IsPFPolynomial.to_sequence` | `RealRooted.PFPolynomial` | The coefficient sequence of a PF polynomial is a Pólya-frequency sequence. | | 11 | `RealRooted.IsPolyaFreqSeq.natCauchyConvolution` | `RealRooted.PolyaFrequencyConvolution.Basic` | Pólya-frequency sequences are closed under Cauchy convolution. | +| 11 | `RealRooted.isPFPolynomial_jensenPolynomial_of_PFMultiplierSequence` | `RealRooted.MultiplierSequence.Infinite` | Every Jensen polynomial of a PF multiplier sequence is PF. | | 10 | `RealRooted.polarTheta_preserves_pf` | `RealRooted.EulerOperator` | The polar-theta operator `N - theta` preserves the polynomial PF cone for polynomials of degree at most `N`. | | 10 | `RealRooted.theta_preserves_pf` | `RealRooted.EulerOperator` | `theta` preserves the polynomial PF cone. | | 9 | `RealRooted.IsPFPolynomial.add_of_interl` | `RealRooted.OperatorMatrix.Directed` | The sum of an interlacing PF pair is PF. | -| 8 | `RealRooted.isPFPolynomial_jensenPolynomial_of_PFMultiplierSequence` | `RealRooted.MultiplierSequence.Infinite` | Every Jensen polynomial of a PF multiplier sequence is PF. | +| 8 | `RealRooted.IsPFMultiplierSequence.diagonalOperator_isPF` | `RealRooted.MultiplierSequence.Infinite` | | | 8 | `RealRooted.isPFPolynomial_jensenPolynomial_of_finitePFMultiplierSequence` | `RealRooted.MultiplierSequence` | The easy PF direction: a finite PF multiplier sequence has a PF Jensen polynomial. | -| 7 | `RealRooted.IsPFMultiplierSequence.diagonalOperator_isPF` | `RealRooted.MultiplierSequence.Infinite` | | | 7 | `RealRooted.IsPFPolynomial.of_X_sub_C_mul_factor` | `RealRooted.PFPolynomial` | If a PF polynomial is factored by a real linear factor, then the quotient is again PF. | +| 7 | `RealRooted.IsPFPolynomial.of_polyaFreqSeq` | `RealRooted.PFPolynomial` | Construct a PF polynomial directly from its Pólya-frequency coefficient sequence using the proved forward ASW theorem. | +| 7 | `RealRooted.IsPolyaFreqSeq.of_tendsto` | `RealRooted.PFPolynomial.Closure` | Pointwise limits of Pólya-frequency sequences are Pólya-frequency. | +| 7 | `RealRooted.isPFMultiplierSequence_iff_jensenPolynomial_isPF` | `RealRooted.MultiplierSequence.PolyaSchur` | A sequence preserves the polynomial PF cone in every degree exactly when all of its Jensen polynomials are PF. | | 7 | `RealRooted.thetaPlusOne_preserves_pf` | `RealRooted.EulerOperator` | `theta + 1` preserves the polynomial PF cone. | -| 6 | `RealRooted.IsPFPolynomial.of_polyaFreqSeq` | `RealRooted.PFPolynomial` | Construct a PF polynomial directly from its Pólya-frequency coefficient sequence using the proved forward ASW theorem. | | 5 | `Matrix.IsTotallyNonneg.isPFPolynomial_det_map_add_X_smul_checkerboard` | `RealRooted.TotallyNonnegPencil.Checkerboard` | A totally nonnegative constant matrix with positive determinant and a checkerboard-signed totally nonnegative variable matrix give a PF determinant. | | 5 | `RealRooted.BrandenVecchi.finiteSupersymmetricCoeff_isPolyaFreqSeq` | `RealRooted.BrandenVecchi.SupersymmetricCoefficients` | Finite supersymmetric product coefficients are Pólya-frequency for nonnegative parameters. | | 5 | `RealRooted.IsPolyaFreqSeq.prefix_zeros` | `RealRooted.AissenSchoenbergWhitney` | Inserting a finite prefix of zeroes preserves the Pólya-frequency property. | -| 5 | `RealRooted.isPFMultiplierSequence_iff_jensenPolynomial_isPF` | `RealRooted.MultiplierSequence.PolyaSchur` | A sequence preserves the polynomial PF cone in every degree exactly when all of its Jensen polynomials are PF. | -| 5 | `RealRooted.isPFPolynomial_X` | `RealRooted.PFPolynomial` | The polynomial `X` is PF. | ## Stable @@ -216,47 +216,47 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 15 | `RealRooted.IsUpperHalfPlaneStable.splits_complexify` | `RealRooted.HermiteBiehler.Basic` | Upper-half-plane stability of a real polynomial's complexification forces all its roots to be real. | | 15 | `RealRooted.isRealRooted_affine_factor` | `RealRooted.AffineFamily` | | | 14 | `Polynomial.Splits.cayleyTransform` | `RealRooted.Mathlib.Algebra.Polynomial.CayleyTransform.Algebra` | The Cayley transform of a split polynomial splits in every degree box containing it. | +| 14 | `Polynomial.splits_of_all_roots_real` | `RealRooted.Mathlib.Algebra.Polynomial.Splits.Complex` | A real polynomial splits if every root of its complexification is real. | | 14 | `RealRooted.isRealRooted_of_degree_one` | `RealRooted.Linear` | Any nonzero degree-1 polynomial is real-rooted. | -| 13 | `Polynomial.splits_of_all_roots_real` | `RealRooted.Mathlib.Algebra.Polynomial.Splits.Complex` | A real polynomial splits if every root of its complexification is real. | | 13 | `RealRooted.isRealRooted_X_mul` | `RealRooted.Linear` | | | 13 | `RealRooted.isRealRooted_of_deg_zero` | `RealRooted.Linear` | | | 13 | `RealRooted.quadraticPoly_not_splits_of_discrim_neg` | `RealRooted.QuadraticRoot` | A real quadratic polynomial with nonzero leading coefficient and negative discriminant does not split over `ℝ`. | +| 12 | `Polynomial.eq_zero_or_splits_of_tendsto_eval_of_natDegree_le` | `RealRooted.Mathlib.Analysis.Complex.Polynomial.ClosedRoots.Real` | Pointwise limits of real splitting polynomials with uniformly bounded degree are zero or split. | +| 12 | `Polynomial.splits_reflect_iff` | `RealRooted.Mathlib.Algebra.Polynomial.Reverse` | At a valid degree bound, reflection preserves and reflects splitting. | +| 12 | `RealRooted.IsLaguerrePolya.jensenPolynomial_splits` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen` | Every Jensen polynomial of the Taylor data of a Laguerre–Pólya function splits. | | 11 | `Polynomial.Splits.reverse` | `RealRooted.Mathlib.Algebra.Polynomial.Reverse` | Reversal preserves splitting over a field. | | 11 | `RealRooted.isRealRooted_mul` | `RealRooted.Basic.PolynomialFacts` | The product of two real-rooted polynomials is real-rooted. | | 11 | `RealRooted.splits_of_natDegree_eq_two_of_discrim_nonneg` | `RealRooted.QuadraticRoot` | A degree-two real polynomial with nonnegative discriminant splits. | -| 10 | `Polynomial.eq_zero_or_splits_of_tendsto_eval_of_natDegree_le` | `RealRooted.Mathlib.Analysis.Complex.Polynomial.ClosedRoots.Real` | Pointwise limits of real splitting polynomials with uniformly bounded degree are zero or split. | +| 10 | `RealRooted.HermitePoulain.applyAsDifferentialOperator_eq_zero_or_splits` | `RealRooted.Hermite.Poulain` | Hermite--Poulain theorem target, zero-aware because a differential operator can annihilate a lower-degree polynomial. | | 10 | `RealRooted.PosComboRealRooted.isRealRooted_add_right` | `RealRooted.ObreschkoffContinuity` | If `f` and `g` satisfy positive-combination real-rootedness and `μ > 0`, then `f + C μ * g` is nonzero and splits. | | 10 | `RealRooted.isRealRooted_of_strictInterl_chain_from_step` | `RealRooted.SequenceClosure` | A consecutive `StrictInterl` chain gives rowwise nonzero real-rootedness, using the first step as the base certificate. | -| 9 | `RealRooted.rootPolynomial_splits` | `RealRooted.RootPolynomial` | `rootPolynomial s` splits over the reals. | -| 8 | `RealRooted.PosComboRealRooted.isRealRooted_left_of_sameDegree` | `RealRooted.ObreschkoffContinuity` | Equal-degree positive-combination real-rootedness implies `f` is real-rooted (without monicity assumptions). | -| 8 | `RealRooted.quadraticPoly_splits_of_discrim_nonneg` | `RealRooted.QuadraticRoot` | A real quadratic polynomial with nonzero leading coefficient and nonnegative discriminant splits over `ℝ`. | ## roots | uses | theorem | module | doc | |---:|---|---|---| | 92 | `RealRooted.roots_nonpos_of_hasNonnegCoeffs` | `RealRooted.Basic.Coefficients` | A real polynomial with nonnegative coefficients has no positive real roots. | -| 46 | `RealRooted.IsPFPolynomial.roots_nonpos` | `RealRooted.PFPolynomial` | | +| 48 | `RealRooted.IsPFPolynomial.roots_nonpos` | `RealRooted.PFPolynomial` | | | 20 | `RealRooted.hasNonnegCoeffs_iff_pos_leadingCoeff_and_roots_nonpos` | `RealRooted.WagnerX.NonnegativeRoots` | | -| 17 | `RealRooted.roots_neg_of_hasNonnegCoeffs_of_coeff_zero_ne` | `RealRooted.Basic.Coefficients` | A nonnegative-coefficient polynomial with nonzero constant coefficient has strictly negative roots. | +| 18 | `RealRooted.roots_neg_of_hasNonnegCoeffs_of_coeff_zero_ne` | `RealRooted.Basic.Coefficients` | A nonnegative-coefficient polynomial with nonzero constant coefficient has strictly negative roots. | | 15 | `RealRooted.StrictInterl.roots_le_of_right` | `RealRooted.Basic.ProperPosition` | Every root of the left-hand polynomial is bounded by any common upper bound for the roots of the right-hand polynomial in a `StrictInterl` witness. | | 15 | `RealRooted.roots_comp_X_add_C` | `RealRooted.Linear` | | | 13 | `RealRooted.MaWang.exists_isRoot_between_of_eval_mul_neg` | `RealRooted.MaWang.StrictSigns.RootSigns` | Strict IVT bridge: strictly opposite endpoint signs give a real root in the open interval. | | 12 | `IsCoprime.not_isRoot_right` | `RealRooted.Basic.PolynomialFacts` | Coprime polynomials cannot vanish at the same point. | | 10 | `RealRooted.SimpleNegRooted.darbouxOperator` | `RealRooted.EulerOperator.Darboux.NegativeRoots` | **Darboux step.** If `a > 0` and `deg f < b`, then `D_{a,-b}(f) = x (1 - x) f' + (a + b x) f` keeps the invariant in degree `deg f + 1` and strictly interlaces with `f`, with no common root. | +| 9 | `RealRooted.Polynomial.exists_strictMono_roots` | `RealRooted.Bezoutian.RootEvaluation` | | | 8 | `Polynomial.roots_mem_of_tendsto_eval_of_natDegree_le` | `RealRooted.Mathlib.Analysis.Complex.Polynomial.ClosedRoots` | Roots of a limit polynomial stay in any closed set that contains the roots along a sequence of uniformly bounded degree, provided evaluations converge pointwise. | +| 8 | `Polynomial.roots_reverse_eq_map_inv` | `RealRooted.Mathlib.Algebra.Polynomial.Reverse` | If `p` splits over a field and `p 0 ≠ 0`, the roots of `p.reverse` are the inverses of the roots of `p`, retaining multiplicity. | | 8 | `RealRooted.StrictInterl.roots_sum_le_of_sameDegree` | `RealRooted.Basic.ProperPosition` | In the same-degree case, `StrictInterl f g` orders the sums of the roots. | -| 7 | `Polynomial.roots_reverse_eq_map_inv` | `RealRooted.Mathlib.Algebra.Polynomial.Reverse` | If `p` splits over a field and `p 0 ≠ 0`, the roots of `p.reverse` are the inverses of the roots of `p`, retaining multiplicity. | | 7 | `RealRooted.HasSimpleRoots.roots_count_eq_one` | `RealRooted.SimpleRoots` | At a simple real root the root multiset carries exactly one copy. | -| 7 | `RealRooted.Polynomial.exists_strictMono_roots` | `RealRooted.Bezoutian.RootEvaluation` | | | 7 | `RealRooted.exists_root_upper_bound` | `RealRooted.Basic.PolynomialFacts` | Every polynomial has an upper bound for its roots. | +| 7 | `RealRooted.noCommonRoot_succ_of_favard` | `RealRooted.Favard` | Consecutive members of a Favard family with positive subdiagonal coefficients have no common real root. | | 7 | `RealRooted.rootCountAbove_diff_le_one_of_nonRoot_isRoot` | `RealRooted.RootCountJump` | `IsRoot`-form wrapper for `rootCountAbove_diff_le_one_of_nonRoot`. | | 6 | `RealRooted.DegreeDropReversal.isRoot_reflect_inv_iff` | `RealRooted.DegreeDropReversal` | Reflection sends a nonzero root to its inverse at any valid degree bound. | | 6 | `RealRooted.MaWang.exists_isRoot_ge_of_eval_nonpos_of_tendsto_atTop_atTop` | `RealRooted.MaWang.StrictSigns.Assembly` | Right-hand IVT bridge: if a polynomial is nonpositive at `r` and tends to `+∞` at `+∞`, then it has a real root to the right of `r`. | | 6 | `RealRooted.StrictInterl.exists_listAlternates_of_natDegree_eq` | `RealRooted.Basic.ProperPosition` | Same-degree proper position exposes sorted root lists in its oriented `ListAlternates` branch. | | 6 | `RealRooted.exists_rightmost_root_of_isRealRooted` | `RealRooted.Basic.PolynomialFacts` | A nonconstant real-rooted polynomial has a rightmost root. | | 6 | `RealRooted.isRoot_derivative_of_rootMultiplicity_ge_two` | `RealRooted.Derivative.RootCounting` | | -| 6 | `RealRooted.noCommonRoot_succ_of_favard` | `RealRooted.Favard` | Consecutive members of a Favard family with positive subdiagonal coefficients have no common real root. | | 6 | `RealRooted.roots_rootPolynomial` | `RealRooted.RootPolynomial` | The roots of `rootPolynomial s`, with multiplicity, are exactly `s`. | | 5 | `RealRooted.roots_nodup_of_favard` | `RealRooted.Favard` | The real-root multiset of every member of a positive Favard family has no duplicates. | | 5 | `RealRooted.strictInterl_package_of_eval_mul_derivative_neg_succ` | `RealRooted.MaWang.CriticalSign` | A successor-degree critical-sign step gives strict interlacing, splitness, and simple roots. | @@ -266,20 +266,20 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| | 87 | `RealRooted.hasNonnegCoeffs_C_mul` | `RealRooted.Basic.Coefficients` | | -| 57 | `RealRooted.hasNonnegCoeffs_one` | `RealRooted.Basic.Coefficients` | | -| 53 | `RealRooted.hasNonnegCoeffs_C` | `RealRooted.Basic.Coefficients` | | -| 50 | `RealRooted.HasNonnegCoeffs.basisTransform` | `RealRooted.BasisTransform` | A basis transform preserves coefficientwise nonnegativity when every basis element has nonnegative coefficients. | -| 50 | `RealRooted.hasNonnegCoeffs_X` | `RealRooted.Basic.Coefficients` | | +| 58 | `RealRooted.hasNonnegCoeffs_one` | `RealRooted.Basic.Coefficients` | | +| 56 | `RealRooted.hasNonnegCoeffs_C` | `RealRooted.Basic.Coefficients` | | +| 55 | `RealRooted.HasNonnegCoeffs.basisTransform` | `RealRooted.BasisTransform` | A basis transform preserves coefficientwise nonnegativity when every basis element has nonnegative coefficients. | +| 51 | `RealRooted.hasNonnegCoeffs_X` | `RealRooted.Basic.Coefficients` | | | 46 | `RealRooted.hasPosLeadingCoeff_C_mul` | `RealRooted.Basic.Coefficients` | | | 40 | `RealRooted.HasNonnegCoeffs.weightedSum` | `RealRooted.GarloffWagner.SchurProductPF` | | -| 32 | `RealRooted.HasNonnegCoeffs.diagonalOperator` | `RealRooted.MultiplierSequence` | Nonnegative diagonal coefficients preserve nonnegative coefficients. | -| 32 | `RealRooted.hasPosLeadingCoeff_of_monic` | `RealRooted.Basic.Coefficients` | | -| 28 | `RealRooted.hasNonnegCoeffs_zero` | `RealRooted.Basic.Coefficients` | | -| 27 | `RealRooted.hasNonnegCoeffs_finsetSum` | `RealRooted.Basic.Coefficients` | | -| 16 | `MvPolynomial.HasNonnegCoeffs.uniqueAlgEquiv` | `RealRooted.Basic.Coefficients.Multivariate` | The unique-variable equivalence preserves coefficientwise nonnegativity. | +| 36 | `RealRooted.HasNonnegCoeffs.diagonalOperator` | `RealRooted.MultiplierSequence` | Nonnegative diagonal coefficients preserve nonnegative coefficients. | +| 33 | `RealRooted.hasPosLeadingCoeff_of_monic` | `RealRooted.Basic.Coefficients` | | +| 29 | `RealRooted.hasNonnegCoeffs_zero` | `RealRooted.Basic.Coefficients` | | +| 28 | `RealRooted.hasNonnegCoeffs_finsetSum` | `RealRooted.Basic.Coefficients` | | +| 18 | `MvPolynomial.HasNonnegCoeffs.uniqueAlgEquiv` | `RealRooted.Basic.Coefficients.Multivariate` | The unique-variable equivalence preserves coefficientwise nonnegativity. | | 16 | `RealRooted.HasNonnegCoeffs.bidiagonalOperator` | `RealRooted.MultiplierSequence.Bidiagonal` | Nonnegative bidiagonal entries preserve coefficient nonnegativity. | | 15 | `RealRooted.hasPosLeadingCoeff_one` | `RealRooted.Basic.Coefficients` | | -| 12 | `RealRooted.HasNonnegCoeffs.homogenize` | `RealRooted.Basic.Coefficients.Multivariate` | Homogenization preserves coefficientwise nonnegativity. | +| 13 | `RealRooted.HasNonnegCoeffs.homogenize` | `RealRooted.Basic.Coefficients.Multivariate` | Homogenization preserves coefficientwise nonnegativity. | | 12 | `RealRooted.hasPosLeadingCoeff_add_of_natDegree_lt_left` | `RealRooted.Linear` | If the left summand has strictly larger degree and positive leading coefficient, then the sum also has positive leading coefficient. | | 11 | `RealRooted.hasPosLeadingCoeff_add_of_natDegree_lt_right` | `RealRooted.Linear` | If the right summand has strictly larger degree and positive leading coefficient, then the sum also has positive leading coefficient. | | 11 | `RealRooted.hasPosLeadingCoeff_add_of_same_natDegree` | `RealRooted.Linear` | In the natural positive-leading-coefficient situation, same-degree sums also have positive leading coefficient. | @@ -295,28 +295,28 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| -| 33 | `RealRooted.SatisfiesFavardRecurrence.natDegree_eq` | `RealRooted.Favard.Recurrence` | Every member of a Favard family has natural degree equal to its index. | +| 50 | `RealRooted.SatisfiesFavardRecurrence.natDegree_eq` | `RealRooted.Favard.Recurrence` | Every member of a Favard family has natural degree equal to its index. | +| 29 | `RealRooted.natDegree_jensenPolynomial_le` | `RealRooted.MultiplierSequence` | | | 20 | `RealRooted.StrictInterl.natDegree_eq_or_eq_succ` | `RealRooted.Basic.ProperPosition` | Proper position forces equal natural degrees or a one-degree increase. | | 14 | `RealRooted.natDegree_add_eq_of_same_natDegree_of_posLeadingCoeff` | `RealRooted.Linear` | If two polynomials have the same degree and positive leading coefficients, their top coefficients cannot cancel. | | 13 | `Polynomial.natDegree_divByMonic_X_sub_C` | `RealRooted.Mathlib.Algebra.Polynomial.Degree.Operations` | Dividing by a monic linear factor lowers natural degree by one. | -| 13 | `RealRooted.natDegree_jensenPolynomial_le` | `RealRooted.MultiplierSequence` | | | 12 | `RealRooted.DegreeDropReversal.natDegree_reflect_eq_of_coeff_zero_ne` | `RealRooted.DegreeDropReversal` | If the constant coefficient is nonzero, reflecting at any degree bound puts a nonzero coefficient in the top reflected degree. | -| 10 | `Polynomial.reflect_eq_X_pow_mul_reverse` | `RealRooted.Mathlib.Algebra.Polynomial.Reverse` | Reflecting at a degree bound factors through reversal and a power of `X`. | -| 10 | `RealRooted.natDegree_diagonalOperator_le` | `RealRooted.MultiplierSequence` | | +| 11 | `Polynomial.reflect_eq_X_pow_mul_reverse` | `RealRooted.Mathlib.Algebra.Polynomial.Reverse` | Reflecting at a degree bound factors through reversal and a power of `X`. | +| 11 | `RealRooted.natDegree_diagonalOperator_le` | `RealRooted.MultiplierSequence` | | | 10 | `RealRooted.natDegree_mul_iterate_derivative_le` | `RealRooted.DerivativeRecurrence.Degree` | | | 10 | `RealRooted.rootSeqDesc_length` | `RealRooted.CommonInterleaver.RootDesc` | | | 9 | `Polynomial.natDegree_shiftedJacobi` | `RealRooted.Mathlib.RingTheory.Polynomial.Jacobi` | For Jacobi parameters greater than `-1`, `shiftedJacobi n α β` has degree exactly `n`. | +| 9 | `Polynomial.natDegree_shiftedJacobiMonic` | `RealRooted.Mathlib.RingTheory.Polynomial.Jacobi` | The monic shifted Jacobi polynomial has its indexed degree. | | 9 | `RealRooted.natDegree_schurSzegoComp_le` | `RealRooted.Hadamard.Basic` | | +| 8 | `Polynomial.rootMultiplicity_le_natDegree` | `RealRooted.Mathlib.Algebra.Polynomial.Roots` | A root multiplicity is at most the degree of its polynomial. | | 7 | `MvPolynomial.degreeOf_uniqueAlgEquiv_symm` | `RealRooted.Mathlib.Algebra.MvPolynomial.Equiv` | The degree in the unique variable after converting a univariate polynomial to an `MvPolynomial` is its natural degree. | | 7 | `Polynomial.Splits.length_eq_natDegree_of_coe_eq_roots` | `RealRooted.Mathlib.Algebra.Polynomial.Splits` | The length of a list representing all roots of a splitting polynomial is its natural degree. | -| 7 | `Polynomial.rootMultiplicity_le_natDegree` | `RealRooted.Mathlib.Algebra.Polynomial.Roots` | A root multiplicity is at most the degree of its polynomial. | +| 7 | `RealRooted.IsPFPolynomial.exists_X_sub_C_factor_of_pos_natDegree` | `RealRooted.PFPolynomial` | A positive-degree PF polynomial has a nonpositive linear root factor whose quotient is again PF and has smaller degree. | | 7 | `RealRooted.LiuOppositeSigns.natDegree_deleteRootFactor` | `RealRooted.LiuOppositeSigns.RootCount` | | | 7 | `RealRooted.StrictInterl.natDegree_le_succ` | `RealRooted.Basic.ProperPosition` | The right endpoint in `StrictInterl f g` has degree at most one more than the left endpoint. | | 7 | `RealRooted.natDegree_gammaTransform_le` | `RealRooted.GammaTransform.Basic` | | | 7 | `RealRooted.natDegree_narayanaPolynomial` | `RealRooted.NarayanaTransformation.Recurrences.Identities` | | | 7 | `RealRooted.natDegree_touchard` | `RealRooted.CombinatorialExamples.Touchard` | | -| 6 | `Polynomial.natDegree_shiftedJacobiMonic` | `RealRooted.Mathlib.RingTheory.Polynomial.Jacobi` | The monic shifted Jacobi polynomial has its indexed degree. | -| 6 | `RealRooted.IsPFPolynomial.exists_X_sub_C_factor_of_pos_natDegree` | `RealRooted.PFPolynomial` | A positive-degree PF polynomial has a nonpositive linear root factor whose quotient is again PF and has smaller degree. | | 6 | `RealRooted.degree_sub_c₀_mul_lt` | `RealRooted.Interlacing.Residue` | | | 6 | `RealRooted.generalizedEulerian_natDegree` | `RealRooted.GeneralizedEulerian` | Degree of a generalized Eulerian polynomial, for every real parameter. | | 6 | `RealRooted.natDegree_iterate_derivative_eq_sub` | `RealRooted.ObreschkoffConverse.DegreeGap` | Exact degree bookkeeping for iterated derivatives. | @@ -355,61 +355,61 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| -| 26 | `RealRooted.coeff_diagonalOperator` | `RealRooted.MultiplierSequence` | | +| 41 | `RealRooted.coeff_jensenPolynomial` | `RealRooted.MultiplierSequence` | | +| 28 | `RealRooted.coeff_diagonalOperator` | `RealRooted.MultiplierSequence` | | | 25 | `Polynomial.coeff_sum_range_monomial` | `RealRooted.Mathlib.Algebra.Polynomial.Coeff` | The coefficient of a finite initial-segment monomial sum. | -| 19 | `RealRooted.coeff_jensenPolynomial` | `RealRooted.MultiplierSequence` | | -| 16 | `Polynomial.coeff_comp_neg_X` | `RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas` | The coefficients of `p.comp (-X)` are those of `p` with alternating signs. | -| 16 | `RealRooted.coeff_theta` | `RealRooted.EulerOperator` | | +| 21 | `Polynomial.coeff_comp_neg_X` | `RealRooted.Mathlib.Algebra.Polynomial.Degree.Lemmas` | The coefficients of `p.comp (-X)` are those of `p` with alternating signs. | +| 17 | `RealRooted.coeff_theta` | `RealRooted.EulerOperator` | | | 14 | `RealRooted.coeff_narayanaPolynomial_of_le` | `RealRooted.NarayanaTransformation.Coefficients` | | | 12 | `RealRooted.coeff_schurSzegoComp_of_le` | `RealRooted.Hadamard.Basic` | | | 11 | `Polynomial.coeff_quadratic_derivative_add_linear_mul_succ` | `RealRooted.Mathlib.Algebra.Polynomial.Derivative` | The coefficient at `k + 1` after multiplying `p'` by a quadratic with no constant term and `p` by a linear polynomial. | | 10 | `RealRooted.coeff_oddEvenPolynomial_even` | `RealRooted.HermiteBiehler.OddEven` | | | 10 | `RealRooted.coeff_thetaPlusOne` | `RealRooted.EulerOperator` | | +| 9 | `Polynomial.continuous_coeff_comp_X_add_C` | `RealRooted.Mathlib.Topology.Algebra.Polynomial` | Every coefficient of a translated real polynomial varies continuously with the translation parameter. | | 9 | `RealRooted.coeff_narayanaPolynomial_of_lt` | `RealRooted.NarayanaTransformation.Coefficients` | | | 8 | `Polynomial.coeff_shiftedJacobi` | `RealRooted.Mathlib.RingTheory.Polynomial.Jacobi` | The coefficient formula for the shifted Jacobi polynomial. | -| 8 | `Polynomial.continuous_coeff_comp_X_add_C` | `RealRooted.Mathlib.Topology.Algebra.Polynomial` | Every coefficient of a translated real polynomial varies continuously with the translation parameter. | | 8 | `RealRooted.coeff_polarTheta` | `RealRooted.EulerOperator` | | | 8 | `RealRooted.coeff_schurSzegoComp` | `RealRooted.Hadamard.Basic` | | | 7 | `Polynomial.coeff_basisTransform` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | +| 7 | `Polynomial.coeff_generalizedLaguerre` | `RealRooted.Mathlib.RingTheory.Polynomial.Laguerre.Basic` | Coefficients of the monic sign-reversed generalized Laguerre family. | | 7 | `Polynomial.coeff_one_sub_X_pow` | `RealRooted.Mathlib.Algebra.Polynomial.Coeff` | The coefficient of `(1 - X) ^ n` is the signed binomial coefficient. | +| 7 | `Polynomial.tendsto_coeff_of_tendstoLocallyUniformly` | `RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff` | If real polynomials converge locally uniformly on `ℂ` to `f`, then their `k`-th coefficients converge to the real part of the `k`-th Taylor coefficient of `f` at `0`. | | 7 | `RealRooted.CenteredEulerian.IsEvenPS.coeff_odd` | `RealRooted.CenteredEulerian.Parity` | | | 7 | `RealRooted.CenteredEulerian.coeff_sinS` | `RealRooted.CenteredEulerian.SeriesBasic` | | | 7 | `RealRooted.coeff_hadamardProduct` | `RealRooted.Hadamard.Product` | | | 7 | `RealRooted.coeff_mul_iterate_derivative_of_natDegree_le` | `RealRooted.DerivativeRecurrence.Degree` | | | 7 | `RealRooted.coeff_oddEvenPolynomial_odd` | `RealRooted.HermiteBiehler.OddEven` | | | 7 | `RealRooted.coeff_schurSzegoComp_eq_zero_of_lt` | `RealRooted.Hadamard.Basic` | | -| 7 | `RealRooted.routhCoefficient_mul_coeff_zero` | `RealRooted.ClassicalHurwitzMatrix.Routh` | | -| 6 | `RealRooted.BorceaBranden.coeff_coordinateDiagonalOperator` | `RealRooted.BorceaBranden.Applications.CoordinatePFMultiplier` | | ## eval | uses | theorem | module | doc | |---:|---|---|---| -| 434 | `RealRooted.EffectiveBKW.IntPoly2.eval_mul` | `RealRooted.EffectiveBKW.Certificate.ListPoly` | Evaluation commutes with bivariate multiplication. | -| 281 | `RealRooted.EffectiveBKW.IntPoly2.eval_add` | `RealRooted.EffectiveBKW.Certificate.ListPoly` | Evaluation commutes with bivariate addition. | +| 477 | `RealRooted.EffectiveBKW.IntPoly2.eval_mul` | `RealRooted.EffectiveBKW.Certificate.ListPoly` | Evaluation commutes with bivariate multiplication. | +| 313 | `RealRooted.EffectiveBKW.IntPoly2.eval_add` | `RealRooted.EffectiveBKW.Certificate.ListPoly` | Evaluation commutes with bivariate addition. | | 19 | `RealRooted.bezoutEntry.wronskian` | `RealRooted.Bezoutian.RootEvaluation` | | | 16 | `RealRooted.eval_pos_of_all_roots_lt` | `RealRooted.WagnerRightSum.Sign` | | +| 14 | `RealRooted.eval_pos_of_hasNonnegCoeffs` | `RealRooted.Basic.Coefficients` | A nonzero polynomial with nonnegative coefficients is strictly positive at every strictly positive real argument. | | 13 | `RealRooted.StrictInterl.eval_mul_eval_derivative_nonneg` | `RealRooted.MaWang.Weak.DerivativeSign` | Every interlacer `g ≪ f` with positive leading coefficients has the sign of `f'` at the roots of `f`: `g(r) f'(r) ≥ 0`. | | 13 | `RealRooted.eval_complexify_ne_zero_of_splits_of_im_pos` | `RealRooted.HermiteBiehler.Basic` | A nonzero split real polynomial has no root in the open upper half-plane. | -| 13 | `RealRooted.eval_pos_of_hasNonnegCoeffs` | `RealRooted.Basic.Coefficients` | A nonzero polynomial with nonnegative coefficients is strictly positive at every strictly positive real argument. | +| 11 | `RealRooted.isPFMultiplierSequence_inv_ascPochhammer` | `RealRooted.MultiplierSequence.InvPochhammer` | **The reciprocal rising factorials `1 / (α)_k`, for `α > 0`, form a PF multiplier sequence.** | | 10 | `RealRooted.eval_hermiteBiehlerPolynomial` | `RealRooted.HermiteBiehler.Basic` | | | 10 | `RealRooted.wronskian_eval_nonneg_of_strictInterl` | `RealRooted.Wronskian.WeakForward` | Interlacing with positive leading coefficients gives global nonnegativity of the oriented Wronskian. | | 9 | `RealRooted.eval_derivative_ne_zero_of_rootMultiplicity_eq_one` | `RealRooted.Derivative.Algebra` | The derivative does not vanish at a root of multiplicity one. | +| 9 | `RealRooted.wronskian_pos_of_strictInterl_succ` | `RealRooted.Wronskian.Forward` | **Global forward Wronskian bridge, degree gap one.** If `q` strictly interlaces `p` in the differ-by-one sense (`StrictInterl q p` with `deg p = deg q + 1`, all roots simple and no common root), then | +| 8 | `Polynomial.iteratedDeriv_fun_eval` | `RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff` | The `k`-th iterated derivative of a polynomial function is the polynomial function of the `k`-th iterated formal derivative. | | 8 | `Polynomial.not_isRoot_iff_eval_ne_zero` | `RealRooted.Mathlib.Algebra.Polynomial.Eval.Defs` | | | 8 | `RealRooted.eval_mul_eval_nonneg_of_strictInterl_right` | `RealRooted.WagnerRightSum.Sign` | If two polynomials both precede the same right-hand polynomial with positive leading coefficients, then they have the same sign at every root of that common right-hand polynomial. | | 8 | `RealRooted.tendsto_eval_atBot_atBot_of_posLeadingCoeff_odd` | `RealRooted.WagnerRightSum.Sign` | | | 8 | `RealRooted.tendsto_eval_atBot_atTop_of_posLeadingCoeff_even` | `RealRooted.WagnerRightSum.Sign` | | -| 8 | `RealRooted.wronskian_pos_of_strictInterl_succ` | `RealRooted.Wronskian.Forward` | **Global forward Wronskian bridge, degree gap one.** If `q` strictly interlaces `p` in the differ-by-one sense (`StrictInterl q p` with `deg p = deg q + 1`, all roots simple and no common root), then | | 7 | `MvPolynomial.eval_specializeAt` | `RealRooted.Mathlib.Algebra.MvPolynomial.Specialize` | Evaluation after scalar specialization is evaluation at the updated assignment. | | 7 | `RealRooted.StrictInterl.eval_mul_derivative_nonpos_of_left_root` | `RealRooted.Interlacing.OuterDifference` | At a root of the left polynomial in a positive-leading interlacing pair, the right value and left derivative have nonpositive product. | | 7 | `RealRooted.deriv2_mul_lt_deriv_sq_at_non_root` | `RealRooted.IteratedDerivativeShift` | | | 7 | `RealRooted.eval_neg_of_all_roots_gt_of_odd` | `RealRooted.WagnerRightSum.Sign` | | | 7 | `RealRooted.eval_pos_of_all_roots_gt_of_even` | `RealRooted.WagnerRightSum.Sign` | | -| 7 | `RealRooted.isPFMultiplierSequence_inv_ascPochhammer` | `RealRooted.MultiplierSequence.InvPochhammer` | **The reciprocal rising factorials `1 / (α)_k`, for `α > 0`, form a PF multiplier sequence.** | +| 7 | `RealRooted.isLaguerrePolya_eval_map` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.IndexedProduct` | A real polynomial that splits over the reals belongs to the Laguerre--Pólya class. | | 6 | `RealRooted.EffectiveBKW.Branch.check_sound` | `RealRooted.EffectiveBKW.Certificate.Branch` | A checked branch is continuous, lies on the curve, and stays inside every covering strip. | | 6 | `RealRooted.eval_complexify_oddEvenPolynomial` | `RealRooted.HermiteBiehler.OddEven` | | -| 6 | `RealRooted.eval_complexify_ofReal` | `RealRooted.HermiteBiehler.Converse.Wronskian` | Value of a complexified real polynomial at a real point. | -| 6 | `RealRooted.exists_left_endpoint_sign` | `RealRooted.RootCounting.SignChanges` | A positive-leading degree-`d` polynomial has the sign `(-1)^d` sufficiently far to the left. | ## recurrence @@ -424,7 +424,7 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| -| 15 | `RealRooted.TuranHurwitz.derivative_map` | `RealRooted.TuranHurwitz.CoefficientDerivation` | Formal differentiation commutes with mapping the coefficient ring. | +| 16 | `RealRooted.TuranHurwitz.derivative_map` | `RealRooted.TuranHurwitz.CoefficientDerivation` | Formal differentiation commutes with mapping the coefficient ring. | | 8 | `RealRooted.generalizedEulerian_succ` | `RealRooted.GeneralizedEulerian` | | | 7 | `RealRooted.div_ofNat_eq_C_mul` | `RealRooted.DerivativeRecurrence.SecondOrderODE` | Division by a numeral, as generated recurrences write `(1 / 2) * X`. | | 7 | `RealRooted.isNonnegLinearForm_one` | `RealRooted.RowThreshold` | | @@ -432,23 +432,23 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 6 | `RealRooted.brandenE_mul_X_add_C` | `RealRooted.Transforms.BrandenE.Basic` | Affine-factor form of `brandenE_X_mul`. | | 6 | `RealRooted.touchard_succ` | `RealRooted.Touchard` | | | 5 | `RealRooted.EulerBidiagonal.generalStep_eq_second_derivative` | `RealRooted.EulerBidiagonal.QuadraticEulerStep` | Differential form of the general Euler step. | +| 4 | `Polynomial.basisTransform_mul_X_add_C_of_succ_derivative` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | The affine factor version of `basisTransform_X_mul_of_succ_derivative`. | | 4 | `Polynomial.taylor_iterate_derivative` | `RealRooted.Mathlib.Algebra.Polynomial.Taylor` | The Taylor shift commutes with iterated derivatives. | | 4 | `RealRooted.GeneralizedSnakePosets.FiniteSkewBoard.rookPolynomial_eq_nonNestingPlacements_sum` | `RealRooted.GeneralizedSnakePosets.FiniteBoard` | The rook polynomial as a sum over the named finite set of non-nesting placements. | +| 4 | `RealRooted.HermitePoulain.applyAsDifferentialOperator_X_add_C` | `RealRooted.Hermite.Poulain` | | | 4 | `RealRooted.IntervalDifferential.zigzagOperator_apply` | `RealRooted.IntervalDifferential.Basic` | | | 4 | `RealRooted.complexify_iterate_derivative` | `RealRooted.HermiteBiehler.Basic` | Complexification commutes with iterated derivatives. | | 4 | `RealRooted.thetaPlusOne_eq_derivative_X_mul` | `RealRooted.EulerOperator` | | | 3 | `Polynomial.basisTransform_X_mul_of_succ_derivative` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | A basis transform transports multiplication by `X` to a first-order differential operator when its basis satisfies the corresponding successor recurrence. | -| 3 | `Polynomial.basisTransform_mul_X_add_C_of_succ_derivative` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | The affine factor version of `basisTransform_X_mul_of_succ_derivative`. | | 3 | `PowerSeries.subst_binomialSeries_neg_ode` | `RealRooted.Mathlib.RingTheory.PowerSeries.BinomialDerivative` | Substituting `H-1` into the negative binomial series gives a solution of the formal negative-power differential equation. | | 3 | `PowerSeries.two_mul_mul_derivative_sqrt` | `RealRooted.Mathlib.RingTheory.PowerSeries.Sqrt` | The linear differential equation `2 f (sqrt f)' = f' sqrt f`. | +| 3 | `RealRooted.HermitePoulain.applyAsDifferentialOperator_X_pow_mul` | `RealRooted.Hermite.Poulain` | | | 3 | `RealRooted.Poisson.starC_X_right` | `RealRooted.BorceaBranden.Applications.UnivariatePoissonStar` | Applying `starC` to `X` gives the first-order Euler pencil `X * (f + c f')`. | | 3 | `RealRooted.Poisson.starC_linear_factor_left` | `RealRooted.BorceaBranden.Applications.UnivariatePoissonStar` | A linear left factor gives the Poisson differential recurrence. | | 3 | `RealRooted.TuranHurwitz.normalized_succ` | `RealRooted.TuranHurwitz.NormalizedRecurrence` | The normalized recurrence. | | 3 | `RealRooted.basisTransform_touchard_mul_X_add_C` | `RealRooted.NarayanaTransformation.Basis` | Factor recurrence for the Touchard-basis transform. | | 3 | `RealRooted.brandenE_X_mul` | `RealRooted.Transforms.BrandenE.Basic` | Multiplication by `X` before `brandenE` becomes the Euler differential operator afterwards. | | 3 | `RealRooted.eulerOperator_eq_diagonalOperator_natCast` | `RealRooted.MultiplierSequence` | The Euler operator `X d/dX` acts diagonally with multiplier `k`. | -| 3 | `RealRooted.gammaOperator_apply` | `RealRooted.GammaPencil.Basic` | | -| 3 | `RealRooted.isNonnegLinearForm_X` | `RealRooted.RowThreshold` | | ## nonvanishing @@ -456,9 +456,11 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g |---:|---|---|---| | 23 | `RealRooted.add_ne_zero_of_hasNonnegCoeffs_of_right_ne_zero` | `RealRooted.Basic.Coefficients` | A finite sum of nonnegative-coefficient polynomials cannot vanish if one of the summands is already nonzero. | | 20 | `Nat.cast_choose_ne_zero` | `RealRooted.Mathlib.Data.Nat.Choose.Cast` | A binomial coefficient remains nonzero after casting to a characteristic-zero target. | +| 17 | `iteratedDeriv_riemannXiTheta_zero_ne_zero` | `RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Derivative` | Positivity of the xi Taylor data excludes vanishing at zero for every derivative. | +| 9 | `RealRooted.tDeriv_ne_zero` | `RealRooted.IteratedDerivativeShift` | T_ε of a nonzero polynomial with degree ≥ 1 is nonzero. | | 8 | `RealRooted.iterateTDeriv_ne_zero` | `RealRooted.IteratedDerivativeShift` | Iterating a derivative shift preserves nonzeroness. | -| 8 | `RealRooted.tDeriv_ne_zero` | `RealRooted.IteratedDerivativeShift` | T_ε of a nonzero polynomial with degree ≥ 1 is nonzero. | | 7 | `RealRooted.LiuOppositeSigns.OppositeLeadingSigns.left_ne_zero` | `RealRooted.LiuOppositeSigns.RootCount` | | +| 7 | `riemannXiTheta_zero_ne_zero` | `RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta` | In particular, the constant coefficient of the square-variable xi function is nonzero. | | 6 | `RealRooted.Graph.weightedIndepPolyOn_ne_zero` | `RealRooted.Graph.IndependencePolynomial.Basic` | Weighted support-restricted independence polynomials are nonzero. | | 6 | `RealRooted.derivProduct_ne_zero` | `RealRooted.DerivativeProduct.Basic` | A derivative product of nonzero polynomials is nonzero (quadratic weight, nonnegative data). | | 5 | `Nat.cast_ne_zero_of_pos` | `RealRooted.Mathlib.Data.Nat.Cast.Basic` | A positive natural number remains nonzero after casting to a characteristic-zero target. | @@ -477,95 +479,93 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 3 | `Matrix.exists_ordered_minor_ne_zero_of_mulVec_injective` | `RealRooted.Mathlib.LinearAlgebra.Matrix.Determinant.CauchyBinet` | Full column rank gives a nonzero maximal minor on strictly increasing rows. | | 3 | `RealRooted.CommonInterleaver.rootSeqDesc_reverse_ne_nil_of_natDegree_pos` | `RealRooted.CommonInterleaver.RootDesc` | | | 3 | `RealRooted.IntervalDifferential.zigzagTransform_ne_zero` | `RealRooted.IntervalDifferential.Degree` | The centered zigzag transform of a nonzero polynomial is nonzero. | -| 3 | `RealRooted.IsStrictlyHurwitzStable.C` | `RealRooted.ClassicalHurwitzMatrix.Stability` | | -| 3 | `RealRooted.LiuOppositeSigns.IsLargestRoot.deleteRootFactor_ne_zero` | `RealRooted.LiuOppositeSigns.RootDeletion` | | ## inequality | uses | theorem | module | doc | |---:|---|---|---| | 29 | `RealRooted.toeplitz_apply` | `RealRooted.AissenSchoenbergWhitneyBase` | | -| 22 | `RealRooted.IsRealRootedIn.comp_neg_X` | `RealRooted.RootLocation.Basic` | Substituting `-X` into a polynomial rooted in `S` gives a polynomial rooted in the preimage of `S` under negation. | +| 26 | `RealRooted.IsRealRootedIn.comp_neg_X` | `RealRooted.RootLocation.Basic` | Substituting `-X` into a polynomial rooted in `S` gives a polynomial rooted in the preimage of `S` under negation. | | 15 | `MvPolynomial.mem_degreeOfLE_iff_degreeOf` | `RealRooted.Mathlib.Algebra.MvPolynomial.Stability.DegreeBox` | | | 14 | `MvPolynomial.coe_basisDegreeOfLE` | `RealRooted.Mathlib.Algebra.MvPolynomial.Stability.DegreeBox` | | | 14 | `RealRooted.StrictInterl.rootMultiplicity_bounds` | `RealRooted.Basic.ProperPosition` | In proper position, the multiplicities of every real root differ by at most one. | | 14 | `RealRooted.isRoot_nonpos_of_hasNonnegCoeffs` | `RealRooted.Basic.Coefficients` | A real root of a nonzero polynomial with nonnegative coefficients is nonpositive. | | 13 | `RealRooted.listInterlaces_all_ge` | `RealRooted.Basic.RootLists` | Every element of `ss` is at least the first element of the right-hand list in a `ListInterlaces` relation. | | 12 | `Polynomial.ring_choose_pos` | `RealRooted.Mathlib.RingTheory.Polynomial.Jacobi` | A generalized real binomial coefficient is positive above its largest possible zero. | +| 12 | `riemannXiCoeff_pos` | `RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Positivity` | Every normalized xi coefficient is strictly positive, without assuming RH. | | 11 | `RealRooted.List.Interleaves.ofFn_succ` | `RealRooted.Bezoutian.StrictInterleaving` | | | 11 | `RealRooted.SimpleNegRooted.isRoot_neg` | `RealRooted.EulerOperator.Darboux.NegativeRoots` | | -| 10 | `TendstoLocallyUniformly.iteratedDeriv` | `RealRooted.Mathlib.Analysis.Complex.PolynomialLimitCoeff` | Weierstrass: if entire functions converge locally uniformly on `ℂ`, then so do all their iterated derivatives. | +| 10 | `RealRooted.IsLaguerrePolya.comp_affine_real` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya` | Precomposition by a real affine map preserves the zero-aware Laguerre--Pólya class. | | 9 | `MvPolynomial.algebraicSymbol_eq_sum` | `RealRooted.Mathlib.Algebra.MvPolynomial.Stability.Symbol` | Expand the finite algebraic symbol in its bounded monomial basis. | | 9 | `RealRooted.TuranHurwitz.rising_pos` | `RealRooted.TuranHurwitz.RisingConvolution` | Rising factorials are strictly positive for positive starting value. | +| 9 | `RealRooted.taylorDifferentialOperator_X_pow` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Jensen` | Applying a Taylor differential operator to a monomial gives the reflected Jensen polynomial of its Taylor data. | +| 8 | `Nat.tendsto_descFactorial_div_pow_atTop` | `RealRooted.Mathlib.Analysis.SpecialFunctions.Choose` | For fixed `k`, `n.descFactorial k / n^k` tends to `1`. | +| 8 | `Polynomial.momentNormSq_pos` | `RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra` | Positive definiteness of the next finite Hankel matrix gives a strictly positive norm for the degree-`n` monic moment polynomial. | | 8 | `Polynomial.splits_nodup_roots_of_strict_sign_changes` | `RealRooted.Mathlib.Algebra.Polynomial.IntervalSignChanges` | A finite grid with strict sign changes accounts for every root of a nonzero polynomial of degree at most the number of gaps. | +| 8 | `RealRooted.IsLaguerrePolya.laguerreCoefficient_nonneg` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.GeneralizedInequality` | Every generalized Laguerre coefficient of a Laguerre--Pólya function is nonnegative on the real axis. | | 8 | `RealRooted.JacobiDeformation.risingFactorial_pos` | `RealRooted.JacobiDeformation.Pochhammer` | | | 7 | `ParkingFunction.isParkingFunction_iff_prefix` | `RealRooted.Mathlib.Combinatorics.Enumerative.ParkingFunction` | The finite-indexed predicate is equivalent to the usual bounded-natural formulation used by the existing parking-function modules. | +| 7 | `Polynomial.shiftedJacobiSubdiag_pos` | `RealRooted.Mathlib.RingTheory.Polynomial.Jacobi` | The subdiagonal coefficient in the monic shifted-Jacobi recurrence is strictly positive in every positive degree when both parameters exceed `-1`. | +| 7 | `RealRooted.IsLaguerrePolya.const_mul_real` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya` | Multiplication by a real scalar preserves the zero-aware Laguerre--Pólya class. | | 7 | `RealRooted.MaWang.exists_roots_strictly_interlacing_of_consecutive_signs` | `RealRooted.MaWang.StrictSigns.Assembly` | Public strict wrapper around `exists_strictSignInterleaving`. | | 7 | `RealRooted.ParkingFunctions.ToricContribution.realRisingFactorial_pos` | `RealRooted.ParkingFunctions.ToricContribution.Definitions` | | -| 7 | `RealRooted.StrictInterl.X_add_C_iff` | `RealRooted.Linear` | Orientation sanity check for the local `StrictInterl` convention on linear factors. | -| 7 | `RealRooted.listInterlaces_all_le_getLast` | `RealRooted.Basic.RootLists` | | -| 7 | `RealRooted.rootSeqDesc_pairwise` | `RealRooted.CommonInterleaver.RootDesc` | | -| 6 | `Matrix.IsTP2.minor_nonneg` | `RealRooted.MatrixInterlacing.TotallyNonnegative` | | -| 6 | `Multiset.exists_pos_lt_and_two_mul_le_abs_sub_toFinset` | `RealRooted.RootMultiplicityMatching` | Choose a positive radius, smaller than a prescribed one, whose doubled balls around distinct values of a finite real multiset are disjoint. | -| 6 | `Nat.tendsto_descFactorial_div_pow_atTop` | `RealRooted.Mathlib.Analysis.SpecialFunctions.Choose` | For fixed `k`, `n.descFactorial k / n^k` tends to `1`. | -| 6 | `Polynomial.shiftedJacobiSubdiag_pos` | `RealRooted.Mathlib.RingTheory.Polynomial.Jacobi` | The subdiagonal coefficient in the monic shifted-Jacobi recurrence is strictly positive in every positive degree when both parameters exceed `-1`. | ## equation | uses | theorem | module | doc | |---:|---|---|---| +| 28 | `Complex.ofReal_re_iteratedDeriv_zero` | `RealRooted.Mathlib.Analysis.Calculus.IteratedDeriv.Star` | The Taylor data at zero of a conjugation-invariant function are real. | | 23 | `Polynomial.basisTransform_smul` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | +| 22 | `Polynomial.basisTransform_add` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | | 21 | `RealRooted.weightedSum_cons` | `RealRooted.WeightedSum` | | -| 20 | `Polynomial.basisTransform_add` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | +| 15 | `Polynomial.basisTransform_monomial` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | | 14 | `Polynomial.basisTransform_X_pow` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | -| 14 | `Polynomial.basisTransform_monomial` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | -| 10 | `Polynomial.basisTransform_C` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | -| 9 | `Polynomial.basisTransform_C_mul_X_pow` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | A scalar monomial is sent to the corresponding scalar basis element. | +| 14 | `RealRooted.IsLaguerrePolya.im_eq_zero_of_eq_zero` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Zeros` | A nonzero Laguerre--Pólya limit has only real complex zeros. | +| 11 | `Polynomial.basisTransform_C` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | | +| 11 | `Polynomial.basisTransform_C_mul_X_pow` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | A scalar monomial is sent to the corresponding scalar basis element. | +| 10 | `RealRooted.HermitePoulain.formalDifferentialOperator_pow` | `RealRooted.Hermite.FormalDifferential.Composition` | Powers of a formal symbol are the corresponding iterated operators. | +| 9 | `Polynomial.momentFunctional_X_pow` | `RealRooted.Mathlib.Algebra.Polynomial.Moment` | | +| 9 | `Polynomial.momentPairing_monicMomentPolynomial` | `RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment` | The constructed polynomial is orthogonal to every lower-degree polynomial. | | 9 | `RealRooted.brandenE_X_pow` | `RealRooted.Transforms.BrandenE.Basic` | | | 9 | `RealRooted.gammaTransform_add` | `RealRooted.GammaTransform.Basic` | | +| 9 | `RealRooted.hermiteHomogeneous_add_two` | `RealRooted.Hermite.Homogeneous` | The homogeneous Hermite three-term recurrence. | | 9 | `RealRooted.sequence_eq_of_same_lag_two_recurrence` | `RealRooted.Recurrence.Uniqueness` | Two sequences with the same first two values and lag-two recurrence agree. | +| 9 | `riemannXiTheta_conj` | `RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta` | The square-variable xi function respects conjugation. | | 8 | `Polynomial.X_sub_one_mul_chowS` | `RealRooted.Mathlib.Algebra.Polynomial.Chow` | The defining quotient for `chowS` is exact at every reflection bound at least the degree of the input. | +| 8 | `Polynomial.basisTransform_finset_sum` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | A basis transform distributes over a finite polynomial sum. | +| 8 | `Polynomial.momentFunctional_add` | `RealRooted.Mathlib.Algebra.Polynomial.Moment` | | +| 8 | `Polynomial.momentPairing_comm` | `RealRooted.Mathlib.Algebra.Polynomial.Moment` | | +| 8 | `Polynomial.reflect_finset_sum_C_mul` | `RealRooted.Mathlib.Algebra.Polynomial.Chow` | Reflection distributes through a finite sum with constant scalar coefficients. | +| 8 | `PowerSeries.one_sub_mul_stieltjesStep` | `RealRooted.Mathlib.RingTheory.PowerSeries.StieltjesFraction.Step` | The formal Stieltjes step inverts its stated denominator. | | 8 | `RealRooted.BigDescents321.SmallCases.ofList_cons` | `RealRooted.CombinatorialExamples.BigDescents321.SmallCases.ListPoly` | | | 8 | `RealRooted.gammaTransform_X_mul_two` | `RealRooted.GammaTransform.Basic` | | -| 8 | `RealRooted.schurSzegoComp_comm` | `RealRooted.Hadamard.Basic` | | -| 8 | `RealRooted.weightedSum_ofFn` | `RealRooted.WeightedSum` | Finite-function form of `weightedSum_eq_sum_map`. | -| 7 | `Complex.Contour.windingNumber_eq_integral_of_avoidance` | `RealRooted.Mathlib.Analysis.Complex.Contour.Winding.Number.Basic` | If `γ` is continuous on `[a, b]`, avoids `z₀` there, and the index integrand is interval-integrable, the generalized winding number is the ordinary index integral: the principal value collapses to `(2 | -| 7 | `MvPolynomial.diagonal_mul` | `RealRooted.Mathlib.Algebra.MvPolynomial.Diagonal` | | -| 7 | `Polynomial.basisTransform_finset_sum` | `RealRooted.Mathlib.Algebra.Polynomial.BasisTransform` | A basis transform distributes over a finite polynomial sum. | -| 7 | `Polynomial.momentPairingBilinForm_apply` | `RealRooted.Mathlib.Algebra.Polynomial.Moment` | | -| 7 | `RealRooted.BigDescents321.SmallCases.ofList_nil` | `RealRooted.CombinatorialExamples.BigDescents321.SmallCases.ListPoly` | | -| 7 | `RealRooted.CenteredEulerian.constantCoeff_cosS` | `RealRooted.CenteredEulerian.SeriesBasic` | | -| 7 | `RealRooted.CenteredEulerian.constantCoeff_sinS` | `RealRooted.CenteredEulerian.SeriesBasic` | | -| 7 | `RealRooted.CenteredEulerian.cosS_mul_secS` | `RealRooted.CenteredEulerian.SeriesBasic` | | -| 7 | `RealRooted.brandenE_C_mul` | `RealRooted.Transforms.BrandenE.Basic` | | -| 7 | `RealRooted.exists_index_eq_of_mem_roots` | `RealRooted.Bezoutian.WronskianConverse` | | ## other | uses | theorem | module | doc | |---:|---|---|---| -| 45 | `RealRooted.StrictInterl.hasSimpleRoots_of_no_common_root` | `RealRooted.SimpleRoots` | A strictly interlacing pair with no common real root has simple real roots in both entries. | -| 34 | `RealRooted.allComboRealRooted_of_strictInterl` | `RealRooted.ObreschkoffConverse.Forward` | Forward direction of Obreschkoff: if `f ≪ g` then all real combinations `αf + βg` are real-rooted (or zero). | -| 23 | `RealRooted.HasSimpleRoots.of_roots_nodup` | `RealRooted.SimpleRoots` | A nonzero polynomial with a duplicate-free root multiset has simple real roots. | +| 47 | `RealRooted.StrictInterl.hasSimpleRoots_of_no_common_root` | `RealRooted.SimpleRoots` | A strictly interlacing pair with no common real root has simple real roots in both entries. | +| 36 | `RealRooted.allComboRealRooted_of_strictInterl` | `RealRooted.ObreschkoffConverse.Forward` | Forward direction of Obreschkoff: if `f ≪ g` then all real combinations `αf + βg` are real-rooted (or zero). | +| 27 | `RealRooted.HasSimpleRoots.of_roots_nodup` | `RealRooted.SimpleRoots` | A nonzero polynomial with a duplicate-free root multiset has simple real roots. | +| 20 | `RealRooted.MapsRealRootedIn.mono_left` | `RealRooted.RootLocation.Basic` | Shrinking the source set preserves `MapsRealRootedIn`. | +| 20 | `RealRooted.isLaguerrePolyaTypeI_iteratedDeriv_riemannXiTheta` | `RealRooted.RiemannHypothesis.TotalPositivity` | Every derivative of the square-variable xi function is Type-I Laguerre--Pólya under RH. | +| 18 | `differentiable_riemannXiTheta` | `RealRooted.Mathlib.NumberTheory.LSeries.RiemannXi.Theta` | The square-variable expansion of xi is entire. | | 16 | `RealRooted.IsRealRootedIn.mem_of_mem_roots` | `RealRooted.RootLocation.Basic` | Every multiset root of a polynomial rooted in `S` lies in `S`. | | 15 | `MvPolynomial.IsRayleigh.specializeAt` | `RealRooted.Multiaffine.Rayleigh` | Real scalar specialization preserves the Rayleigh property. | -| 15 | `RealRooted.MapsRealRootedIn.mono_left` | `RealRooted.RootLocation.Basic` | Shrinking the source set preserves `MapsRealRootedIn`. | -| 14 | `RealRooted.hasSimpleRoots_of_natDegree_le_one` | `RealRooted.SimpleRoots` | Every nonzero polynomial of degree at most one has only simple roots. | +| 15 | `RealRooted.hasSimpleRoots_of_natDegree_le_one` | `RealRooted.SimpleRoots` | Every nonzero polynomial of degree at most one has only simple roots. | +| 14 | `RealRooted.IsLaguerrePolya.analyticOnNhd` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.Derivative` | A zero-aware Laguerre--Pólya limit is analytic on the whole complex plane. | +| 14 | `RealRooted.IsLaguerrePolya.differentialApply` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.DifferentialApply` | Every real-rooted polynomial differential symbol preserves the entire Laguerre--Pólya class. | +| 13 | `RealRooted.isUpperHalfPlaneStable_complexify_of_splits` | `RealRooted.HermiteBiehler.Basic` | A nonzero split real polynomial has stable complexification. | | 12 | `Matrix.IsTotallyNonnegRect.toSquare` | `RealRooted.Mathlib.LinearAlgebra.Matrix.TotallyNonneg` | Rectangular total nonnegativity specializes to the square predicate. | -| 11 | `RealRooted.isUpperHalfPlaneStable_complexify_of_splits` | `RealRooted.HermiteBiehler.Basic` | A nonzero split real polynomial has stable complexification. | -| 11 | `RealRooted.shiftedJacobiMonic_satisfiesFavardRecurrence` | `RealRooted.Jacobi.Favard` | The monic shifted Jacobi family satisfies the Favard recurrence with its explicit diagonal and subdiagonal coefficients. | +| 12 | `RealRooted.IsLaguerrePolya.heatOperator` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.HeatOperator` | The entire backward heat operator preserves the LP class at every nonnegative real time for inputs of growth order strictly below two. | +| 12 | `RealRooted.shiftedJacobiMonic_satisfiesFavardRecurrence` | `RealRooted.Jacobi.Favard` | The monic shifted Jacobi family satisfies the Favard recurrence with its explicit diagonal and subdiagonal coefficients. | +| 11 | `Polynomial.isMonicOfDegree_monicMomentPolynomial` | `RealRooted.Mathlib.Algebra.Polynomial.Orthogonal.Moment` | The finite moment construction is always monic of the requested degree. | | 10 | `MvPolynomial.IsRayleigh.specializeAtList` | `RealRooted.Multiaffine.Rayleigh` | Iterated real scalar specialization preserves the Rayleigh property. | +| 10 | `RealRooted.IsSimpleRealRooted.scaleRoots` | `RealRooted.SimpleRoots.Affine` | A nonzero root scaling preserves simple real-rootedness. | | 10 | `RealRooted.PosComboRealRooted.comm` | `RealRooted.ObreschkoffContinuity` | Positive-combination real-rootedness is symmetric in the two polynomials. | | 9 | `Complex.Contour.intervalIntegrable_inv_sub_mul_deriv` | `RealRooted.Mathlib.Analysis.Complex.Contour.Winding.Number.Basic` | **Integrability of the index integrand for a point off the curve.** If `γ` is continuous on `Set.uIcc a b` and avoids `w` there (so `(γ · - w)⁻¹` is continuous) and `deriv γ` is interval-integrable, t | +| 9 | `Polynomial.natDegree_and_leadingCoeff_quadratic_derivative_add_linear_mul_add` | `RealRooted.Mathlib.Algebra.Polynomial.Derivative` | A nonzero prospective top coefficient gives both the exact degree and leading coefficient of a quadratic-derivative plus linear-multiple step. | | 9 | `RealRooted.AllComboRealRooted.linear_recombination` | `RealRooted.AllCombo` | `AllComboRealRooted` is preserved by any linear change of coordinates in the `(f, g)`-plane. | +| 9 | `RealRooted.IsPFMultiplierSequence.isLaguerrePolyaTypeI_complexExpGeneratingFunction` | `RealRooted.MultiplierSequence.PolyaSchur.LaguerrePolya.TypeI` | The complex EGF of a PF multiplier sequence is Type-I Laguerre--Pólya. | | 9 | `RealRooted.hermiteBiehlerForwardPos` | `RealRooted.HermiteBiehler.Forward` | | | 8 | `MvPolynomial.IsMultiaffine.sum` | `RealRooted.Multiaffine` | | -| 8 | `RealRooted.IsRealRootedIn.mem_of_isRoot` | `RealRooted.RootLocation.Basic` | Every root of a polynomial rooted in `S` lies in `S`. | -| 8 | `RealRooted.StrictInterl.hasSimpleRoots_of_isCoprime` | `RealRooted.SimpleRoots` | A coprime strictly interlacing pair has simple real roots in both entries. | -| 8 | `RealRooted.mvRealStableOrZero_iff_complexifyMv` | `RealRooted.MultivariateStability` | Weak real stability agrees with weak upper-half-plane stability after complexifying coefficients. | -| 8 | `RealRooted.sequence_of_base_and_step` | `RealRooted.SequenceClosure` | Generic sequence induction from one base case and a successor step. | -| 7 | `Matrix.IsTotallyNonneg.hurwitzLeadingPrincipal` | `RealRooted.ClassicalHurwitzMatrix.TotallyNonnegative` | Every finite leading principal section inherits total nonnegativity from the infinite classical Hurwitz matrix. | -| 7 | `Matrix.isTotallyNonneg_lowerBidiagonalFin` | `RealRooted.Mathlib.LinearAlgebra.Matrix.TotallyNonneg.Bidiagonal` | Leading finite truncations of variable lower-bidiagonal totally nonnegative matrices are totally nonnegative. | -| 7 | `MvPolynomial.IsMultiaffine.esymm` | `RealRooted.Multiaffine` | | -| 7 | `ParkingFunction.mem_parkingFunctions_iff` | `RealRooted.Mathlib.Combinatorics.Enumerative.ParkingFunction` | Membership in `parkingFunctions` is the parking-function predicate. | -| 7 | `Polynomial.MeshGE.of_natDegree_le_one` | `RealRooted.Mesh.Basic` | A polynomial of degree at most one has mesh at least every nonnegative number. | diff --git a/scripts/import_architecture.json b/scripts/import_architecture.json index b0056bba8..fda6a806d 100644 --- a/scripts/import_architecture.json +++ b/scripts/import_architecture.json @@ -16,10 +16,10 @@ ], "budgets": { "RealRooted": { - "max_modules": 2426 + "max_modules": 3089 }, "RealRooted.Production": { - "max_modules": 2354 + "max_modules": 3017 }, "RealRooted.Tactic.Examples": { "max_modules": 844 diff --git a/scripts/mathlib_shims.json b/scripts/mathlib_shims.json index 79ae0d25b..3028b7825 100644 --- a/scripts/mathlib_shims.json +++ b/scripts/mathlib_shims.json @@ -1599,7 +1599,7 @@ "modules": [ "Mathlib.Data.Multiset.Rel" ], - "note": "Speculative target module generated from the shim tree; no upstream PR or attribution has been recorded yet.", + "note": "Reuses canonical multiset-relation composition from pinned TauCeti.Data.Multiset.Rel; adds composition into a target relation, filtered cardinalities, and sorting compatibility. No upstream PR yet.", "speculative": true }, { @@ -3729,6 +3729,3646 @@ ], "note": "Taylor calculus and Riemann xi foundations for the Jensen criterion. Uses the pinned Tau Ceti analytic results where Mathlib lacks them; no upstream PR yet.", "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/MulPow.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.IteratedDeriv.MulPow" + ], + "note": "Taylor and Mellin calculus, theta moment bounds, and unconditional positivity of normalized xi coefficients; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/MellinTransform/LogMoments.lean" + ], + "modules": [ + "Mathlib.Analysis.MellinTransform.LogMoments" + ], + "note": "Taylor and Mellin calculus, theta moment bounds, and unconditional positivity of normalized xi coefficients; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Kernel.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.Kernel" + ], + "note": "Taylor and Mellin calculus, theta moment bounds, and unconditional positivity of normalized xi coefficients; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Mellin.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.Mellin" + ], + "note": "Taylor and Mellin calculus, theta moment bounds, and unconditional positivity of normalized xi coefficients; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Moments.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.Moments" + ], + "note": "Taylor and Mellin calculus, theta moment bounds, and unconditional positivity of normalized xi coefficients; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Positivity.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.Positivity" + ], + "note": "Taylor and Mellin calculus, theta moment bounds, and unconditional positivity of normalized xi coefficients; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Derivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.GrowthOrder.Derivative" + ], + "note": "Iterated derivatives preserve the growth order of entire functions, using Cauchy estimates and Tau Ceti growth definitions; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/Derivative.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.Derivative" + ], + "note": "Entire xi derivatives retain growth bounds and are nonzero at the origin; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/CompPowCoefficient.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.IteratedDeriv.CompPowCoefficient" + ], + "note": "All Taylor coefficients under a positive power substitution, including nondivisible indices.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Star.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LogDeriv.Star" + ], + "note": "Conjugation symmetry and real-axis values of logarithmic derivatives.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/Pick/Support.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.Pick.Support" + ], + "note": "Support of finite Nevanlinna measures is localized at real singularities.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/Pick/Atoms.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.Pick.Atoms" + ], + "note": "Vertical imaginary-part boundary limits recover the atoms of a finite Nevanlinna measure.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Analytic/CountableZeros.lean" + ], + "modules": [ + "Mathlib.Analysis.Analytic.CountableZeros" + ], + "note": "Analytic zeros, logarithmic residues, or convergent atomic-sum infrastructure for canonical products.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Residue.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LogDeriv.Residue" + ], + "note": "Analytic zeros, logarithmic residues, or convergent atomic-sum infrastructure for canonical products.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Normed/Field/WeightedInverse.lean" + ], + "modules": [ + "Mathlib.Analysis.Normed.Field.WeightedInverse" + ], + "note": "Analytic zeros, logarithmic residues, or convergent atomic-sum infrastructure for canonical products.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/Bochner/Countable.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.Bochner.Countable" + ], + "note": "Analytic zeros, logarithmic residues, or convergent atomic-sum infrastructure for canonical products.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Identity.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LogDeriv.Identity" + ], + "note": "Entire functions with equal logarithmic derivatives on a nonempty open preconnected set differ by their normalization constant. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Analytic/TaylorSeries.lean" + ], + "modules": [ + "Mathlib.Analysis.Analytic.TaylorSeries" + ], + "note": "Analytic Taylor series, derivatives and normalized formal logarithms; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/Polynomial.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.IteratedDeriv.Polynomial" + ], + "note": "Finite polynomial differential operators and locally uniform convergence; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PolynomialAlgebra.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialAlgebra" + ], + "note": "Composition and derivative commutation for finite polynomial differential operators; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GenusOne.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.CanonicalProduct.GenusOne" + ], + "note": "Canonical-product genus one star and elementary closure properties; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/ForwardDifference.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.ForwardDifference" + ], + "note": "Taylor derivatives, exponential multiplication and signed forward differences; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/Algebra/IsUniformGroup/FiniteSum.lean" + ], + "modules": [ + "Mathlib.Topology.Algebra.IsUniformGroup.FiniteSum" + ], + "note": "Finite sums of locally uniformly convergent families; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Expand/PositiveRoots.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Expand.PositiveRoots" + ], + "note": "Positive-root counts under polynomial power substitutions; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PolynomialRange.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.IteratedDeriv.PolynomialRange" + ], + "note": "Padded finite sums for polynomial differential symbols; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LocalExtr/PolynomialEuler.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LocalExtr.PolynomialEuler" + ], + "note": "Euler differential operators, Rolle separation and multiplicity root counts; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Subquadratic.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.GrowthOrder.Subquadratic" + ], + "note": "Global arbitrarily small Gaussian bounds for subquadratic growth; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/HeatOperator/Basic.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.HeatOperator.Basic" + ], + "note": "Entire backward heat-series convergence, differential identities and injectivity below order two; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/HeatOperator/Bounds.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.HeatOperator.Bounds" + ], + "note": "Entire backward heat-series convergence, differential identities and injectivity below order two; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/HeatOperator/Derivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.HeatOperator.Derivative" + ], + "note": "Entire backward heat-series convergence, differential identities and injectivity below order two; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/HeatOperator/Nonzero.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.HeatOperator.Nonzero" + ], + "note": "Entire backward heat-series convergence, differential identities and injectivity below order two; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/HeatOperator/TimeDerivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.HeatOperator.TimeDerivative" + ], + "note": "Entire backward heat-series convergence, differential identities and injectivity below order two; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProduct.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProduct" + ], + "note": "Locally uniform convergence of summable real linear products; extracted from the canonical product construction; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecificLimits/DescFactorialWeights.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecificLimits.DescFactorialWeights" + ], + "note": "Regularity of falling-factorial weights in Jensen approximations; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecificLimits/WeightedSum.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecificLimits.WeightedSum" + ], + "note": "Regular finite weighted means and conditionally convergent series; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/Bochner/PowerSum.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.Bochner.PowerSum" + ], + "note": "Finite positive atomic measures, compact support and power-sum moments; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Expand/Contract.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Expand.Contract" + ], + "note": "Degree bounds and inversion under polynomial contraction; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/HeatOperator/Star.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.HeatOperator.Star" + ], + "note": "Conjugation symmetry of the entire heat operator; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/HeatOperator/Composition.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.HeatOperator.Composition" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/HeatOperator/TimeLimit.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.HeatOperator.TimeLimit" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Basic.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.Basic" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Bounds.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.Bounds" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Derivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.Derivative" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Star.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.Star" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LineIdentity.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LineIdentity" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LocallyUniformIteratedDeriv.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LocallyUniformIteratedDeriv" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/Polynomial/CoefficientMajorant.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.Polynomial.CoefficientMajorant" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Data/Nat/Factorial/ArithmeticProduct.lean" + ], + "modules": [ + "Mathlib.Data.Nat.Factorial.ArithmeticProduct" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/MomentDeterminacy.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.MomentDeterminacy" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/UniformSpace/LocallyUniformAvoidance.lean" + ], + "modules": [ + "Mathlib.Topology.UniformSpace.LocallyUniformAvoidance" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/GrowthOrder/CauchyBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.GrowthOrder.CauchyBound" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/GrowthOrder/ExponentialPowerBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.GrowthOrder.ExponentialPowerBound" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/GrowthOrder/OfBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.GrowthOrder.OfBound" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.OrderBound" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderConvergence.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.OrderConvergence" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/OrderDerivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.OrderDerivative" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Convex/LogDerivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Convex.LogDerivative" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Normed/Group/LocallyBoundedMajorant.lean" + ], + "modules": [ + "Mathlib.Analysis.Normed.Group.LocallyBoundedMajorant" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/Hankel.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.Hankel" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/Polynomial/Pochhammer/ReciprocalConvolution.lean" + ], + "modules": [ + "Mathlib.RingTheory.Polynomial.Pochhammer.ReciprocalConvolution" + ], + "note": "General analytic, polynomial or measure infrastructure for real-rooted entire-function theory; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/GrowthOrder/PolynomialFactor.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.GrowthOrder.PolynomialFactor" + ], + "note": "General growth and convergence infrastructure for entire differential operators; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/Constant.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.Constant" + ], + "note": "General growth and convergence infrastructure for entire differential operators; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GrowthOrder.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GrowthOrder" + ], + "note": "General growth and convergence infrastructure for entire differential operators; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/TaylorGrowth.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.TaylorGrowth" + ], + "note": "General growth and convergence infrastructure for entire differential operators; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecificLimits/PowerSequence.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecificLimits.PowerSequence" + ], + "note": "General growth and convergence infrastructure for entire differential operators; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/Riesz.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.Riesz" + ], + "note": "Analytic-number-theory infrastructure for RH prime-counting estimates and prime-supported polynomial applications. Selective attributed reuse of Tau Ceti and goldbach-lean; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/Riesz.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.Riesz" + ], + "note": "Analytic-number-theory infrastructure for RH prime-counting estimates and prime-supported polynomial applications. Selective attributed reuse of Tau Ceti and goldbach-lean; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Bounds.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.Bounds" + ], + "note": "Analytic-number-theory infrastructure for RH prime-counting estimates and prime-supported polynomial applications. Selective attributed reuse of Tau Ceti and goldbach-lean; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroCount.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroCount" + ], + "note": "Analytic-number-theory infrastructure for RH prime-counting estimates and prime-supported polynomial applications. Selective attributed reuse of Tau Ceti and goldbach-lean; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/LocalLogDeriv.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.LocalLogDeriv" + ], + "note": "Analytic-number-theory infrastructure for RH prime-counting estimates and prime-supported polynomial applications. Selective attributed reuse of Tau Ceti and goldbach-lean; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RiemannHypothesis.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.RiemannHypothesis" + ], + "note": "RH contour estimates and finite-set separation for conditional prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroWindow.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroWindow" + ], + "note": "RH contour estimates and finite-set separation for conditional prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/Instances/Real/FiniteSeparation.lean" + ], + "modules": [ + "Mathlib.Topology.Instances.Real.FiniteSeparation" + ], + "note": "RH contour estimates and finite-set separation for conditional prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/PartialFractions.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.PartialFractions" + ], + "note": "Partial-fraction, Mellin-decay and contour-height estimates for the conditional prime-counting proof; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/MellinInversion/Decay.lean" + ], + "modules": [ + "Mathlib.Analysis.MellinInversion.Decay" + ], + "note": "Partial-fraction, Mellin-decay and contour-height estimates for the conditional prime-counting proof; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/GoodHeight.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.GoodHeight" + ], + "note": "Partial-fraction, Mellin-decay and contour-height estimates for the conditional prime-counting proof; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Contour/Residue/LogDeriv.lean" + ], + "modules": [ + "Mathlib.Analysis.Contour.Residue.LogDeriv" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Contour/Residue/Rectangle.lean" + ], + "modules": [ + "Mathlib.Analysis.Contour.Residue.Rectangle" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifference.lean" + ], + "modules": [ + "Mathlib.Analysis.MellinInversion.FiniteDifference" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/MellinInversion/HorizontalDecay.lean" + ], + "modules": [ + "Mathlib.Analysis.MellinInversion.HorizontalDecay" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Log/Weights.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Log.Weights" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Contour.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.Contour" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/HorizontalDecay.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.HorizontalDecay" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Order.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.Order" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/Residues.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.Residues" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroKernel.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroKernel" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroSum.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSum" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiberMajorant.lean" + ], + "modules": [ + "Mathlib.Topology.Algebra.InfiniteSum.FiberMajorant" + ], + "note": "Contour residues, finite differences, and multiplicity-weighted zero sums for RH prime-counting estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifferenceIntegral.lean" + ], + "modules": [ + "Mathlib.Analysis.MellinInversion.FiniteDifferenceIntegral" + ], + "note": "Integral bounds for polynomial-growth weights times finite differences of the Mellin kernel; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/MellinInversion/FiniteDifferenceInterpolation.lean" + ], + "modules": [ + "Mathlib.Analysis.MellinInversion.FiniteDifferenceInterpolation" + ], + "note": "Interpolated Mellin-kernel decay on positive vertical lines; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Log/BandBounds.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Log.BandBounds" + ], + "note": "Finite logarithmic head and tail estimates using fiber bounds; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Pow/Interpolation.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Pow.Interpolation" + ], + "note": "Real power interpolation of nonnegative bounds and logarithmic growth; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/MonotoneBounds.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.IntervalIntegral.MonotoneBounds" + ], + "note": "Pointwise bounds from adjacent integral means of monotone functions; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/PrimitiveBounds.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.IntervalIntegral.PrimitiveBounds" + ], + "note": "Pointwise bounds from finite differences of integrated errors; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/Unsmoothing.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.Unsmoothing" + ], + "note": "Chebyshev unsmoothing and unconditional transfer from psi to theta; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/LogGrowth.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.LogGrowth" + ], + "note": "Global logarithmic growth on a fixed positive line under RH; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ResidualDifference.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ResidualDifference" + ], + "note": "Finite-difference bounds for the residual zeta contour under RH; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RieszContour.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.RieszContour" + ], + "note": "Integrated zeta contour specialization and zero-series exhaustion under RH; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/RieszExplicitFormula.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.RieszExplicitFormula" + ], + "note": "Integrated Chebyshev explicit formula under RH with a positive-line remainder; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroDifference.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroDifference" + ], + "note": "Head and tail bounds for finite differences of the zeta zero series under RH; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroDifferenceSqrt.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroDifferenceSqrt" + ], + "note": "Square-root finite-difference bounds for the zeta zero series under RH; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ZeroSumBounds.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ZeroSumBounds" + ], + "note": "Quantitative finite logarithmic head and tail zeta-zero bounds under RH; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannZeta/ErrorDifference.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannZeta.ErrorDifference" + ], + "note": "Finite-difference bounds for the actual integrated Chebyshev error under RH; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/RiemannHypothesis.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.RiemannHypothesis" + ], + "note": "RH square-root logarithmic-square error bounds for psi and theta; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Moment.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.Moment" + ], + "note": "Existence and uniqueness of monic orthogonal polynomials from finite moment matrices; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Perturbation.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.Perturbation" + ], + "note": "Finite moment perturbation and orthogonal-polynomial coefficient continuity; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Asymptotics/IncrementBounds.lean" + ], + "modules": [ + "Mathlib.Analysis.Asymptotics.IncrementBounds" + ], + "note": "Uniform normalized-increment discrepancy from square-root logarithmic-square errors; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/OrderedRootPerturbation.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.OrderedRootPerturbation" + ], + "note": "Linear coefficient-error bounds for ordered simple real roots under perturbation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/SimpleRootMatching.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.SimpleRootMatching" + ], + "note": "Finite-coefficient neighborhoods and real-root matching at simple split references; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/SimpleRootSeparation.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.SimpleRootSeparation" + ], + "note": "Linear root displacement bounds using separated reference factors; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/LinearSystemPerturbation.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.LinearSystemPerturbation" + ], + "note": "Entrywise residual estimates for perturbed finite linear systems; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeMoments.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeMoments" + ], + "note": "Signed finite cumulative discrepancy controls unit-interval monomial moments; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindow.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.PrimeWindow" + ], + "note": "Finite logarithmically weighted prime windows and exact cumulative theta identity; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowMoments.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.PrimeWindowMoments" + ], + "note": "RH convergence and quantitative errors for genuine finite prime-window moments; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/ShortIntervals.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.ShortIntervals" + ], + "note": "RH uniform Chebyshev discrepancy in square-root logarithmic-cube windows; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/ContinuousTests.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.IntervalIntegral.ContinuousTests" + ], + "note": "Continuous-test convergence from finite atomic moment limits and bounded total variation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowContinuous.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.PrimeWindowContinuous" + ], + "note": "RH continuous-weight moment limits for finite logarithmic prime windows; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Moment/FiniteAtoms.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Moment.FiniteAtoms" + ], + "note": "Finite atomic moment functional and pairing identities and Hankel positivity; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowOrthogonal.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.PrimeWindowOrthogonal" + ], + "note": "Monic finite prime-window moment polynomials and genuine weighted-sum orthogonality; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/PerturbationLimits.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.PerturbationLimits" + ], + "note": "Nonsingular finite real matrix inverse convergence and uniform entry bounds; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Lagrange/QuadratureMoments.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Lagrange.QuadratureMoments" + ], + "note": "Lagrange quadrature moment equations and inverse Vandermonde representation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Lagrange/QuadraturePerturbation.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Lagrange.QuadraturePerturbation" + ], + "note": "Lagrange weight convergence and quantitative node/moment perturbation estimates; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Lagrange/GaussianQuadrature.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Lagrange.GaussianQuadrature" + ], + "note": "Full Gaussian polynomial exactness and strict weight positivity from nodal orthogonality; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/Gaussian.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.Gaussian" + ], + "note": "Gaussian exactness and positive weights from finite moment orthogonality and positive definite Hankel matrices; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowQuadrature.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.PrimeWindowQuadrature" + ], + "note": "Exact positive Gaussian rules for actual finite prime-window sums, including one-node mass identity; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowWeightedOrthogonal.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedOrthogonal" + ], + "note": "Finite weighted prime moment polynomials, actual weighted pairings and Hankel semidefiniteness; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeIntegral.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeIntegral" + ], + "note": "Cumulative integral identities for interval-integrable tests and finite signed atoms; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeDerivative.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeDerivative" + ], + "note": "Cumulative discrepancy bounds for tests with integrable interior derivative; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Gamma/BetaVariation.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Gamma.BetaVariation" + ], + "note": "Uniform variation bound for nonnegative beta exponents; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/IntervalIntegral/CumulativeBeta.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.IntervalIntegral.CumulativeBeta" + ], + "note": "Beta-weighted finite moment error from cumulative discrepancy; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/CoefficientRates.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.CoefficientRates" + ], + "note": "Finite moment perturbation rates for every monic polynomial coefficient; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/OrderedRootRates.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.OrderedRootRates" + ], + "note": "Ordered root error rates and one chosen convergent root family near a simple real reference; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/GaussianLimits.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.GaussianLimits" + ], + "note": "Quantitative positive Gaussian quadrature convergence from finite moments and ordered roots; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/Chebyshev/PrimeWindowWeightedQuadrature.lean" + ], + "modules": [ + "Mathlib.NumberTheory.Chebyshev.PrimeWindowWeightedQuadrature" + ], + "note": "Actual weighted prime-sum moment functionals and one-node quadrature mass; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/AnalyticMomentSupport.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.AnalyticMomentSupport" + ], + "note": "Geometric analytic Taylor bounds force compact support for positive moment measures; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/CompactMomentTransform.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.CompactMomentTransform" + ], + "note": "Reciprocal-kernel power series of a finite bounded moment measure; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/LocalMomentTransform.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.LocalMomentTransform" + ], + "note": "Local analytic and logarithmic-derivative identities from exact complex signed moments; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LogDeriv/ZeroFree.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LogDeriv.ZeroFree" + ], + "note": "Zero exclusion for nontrivial analytic first-order equations on connected domains; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/FiniteMomentStieltjes.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.FiniteMomentStieltjes" + ], + "note": "Explicit Stieltjes representation and holomorphy of finite reciprocal moment transforms; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeMomentTransform.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.NonnegativeMomentTransform" + ], + "note": "Transport of nonnegative real moment measures to reciprocal Stieltjes data; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LogDeriv/SlitPlaneContinuation.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LogDeriv.SlitPlaneContinuation" + ], + "note": "Slit-plane continuation of a local logarithmic derivative without assuming zero exclusion; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LogDeriv/MomentContinuation.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LogDeriv.MomentContinuation" + ], + "note": "Global zero location and Stieltjes representation from genuine local log-derivative moments; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LogDeriv/NormalizedConjugation.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LogDeriv.NormalizedConjugation" + ], + "note": "Moment transforms, logarithmic derivatives, and locally uniform products; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/MomentNevanlinna.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.MomentNevanlinna" + ], + "note": "Moment transforms, logarithmic derivatives, and locally uniform products; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/MomentNevanlinnaRepresentation.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.MomentNevanlinnaRepresentation" + ], + "note": "Moment transforms, logarithmic derivatives, and locally uniform products; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/Bochner/CountableSupport.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.Bochner.CountableSupport" + ], + "note": "Moment transforms, logarithmic derivatives, and locally uniform products; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProductAnalytic.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProductAnalytic" + ], + "note": "Moment transforms, logarithmic derivatives, and locally uniform products; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiniteMultiplicity.lean" + ], + "modules": [ + "Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicity" + ], + "note": "Summability and sum grouping over finite multiplicity fibers; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/EulerRodrigues.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.IteratedDeriv.EulerRodrigues" + ], + "note": "Positive resolvent series, complete monotonicity and Euler-Rodrigues differentiation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalMixtures.lean" + ], + "modules": [ + "Mathlib.Analysis.CompletelyMonotone.RationalMixtures" + ], + "note": "Positive resolvent series, complete monotonicity and Euler-Rodrigues differentiation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalDerivatives.lean" + ], + "modules": [ + "Mathlib.Analysis.CompletelyMonotone.RationalDerivatives" + ], + "note": "Positive resolvent series, complete monotonicity and Euler-Rodrigues differentiation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/CompletelyMonotone/RationalSeriesDerivatives.lean" + ], + "modules": [ + "Mathlib.Analysis.CompletelyMonotone.RationalSeriesDerivatives" + ], + "note": "Positive resolvent series, complete monotonicity and Euler-Rodrigues differentiation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/CompletelyMonotone/ResolventHierarchy.lean" + ], + "modules": [ + "Mathlib.Analysis.CompletelyMonotone.ResolventHierarchy" + ], + "note": "Positive resolvent series, complete monotonicity and Euler-Rodrigues differentiation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProductLogDerivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProductLogDerivative" + ], + "note": "Positive resolvent series, complete monotonicity and Euler-Rodrigues differentiation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/CompletelyMonotone/ResolventRodrigues.lean" + ], + "modules": [ + "Mathlib.Analysis.CompletelyMonotone.ResolventRodrigues" + ], + "note": "Positive resolvent series, complete monotonicity and Euler-Rodrigues differentiation; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/Algebra/InfiniteSum/SortedEnumeration.lean" + ], + "modules": [ + "Mathlib.Topology.Algebra.InfiniteSum.SortedEnumeration" + ], + "note": "Sorted positive summable families, finite atomic measures and product grouping; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/AtomicRange.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.AtomicRange" + ], + "note": "Sorted positive summable families, finite atomic measures and product grouping; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/SortedAtomicMeasure.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.SortedAtomicMeasure" + ], + "note": "Sorted positive summable families, finite atomic measures and product grouping; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiniteMultiplicityProduct.lean" + ], + "modules": [ + "Mathlib.Topology.Algebra.InfiniteSum.FiniteMultiplicityProduct" + ], + "note": "Sorted positive summable families, finite atomic measures and product grouping; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeAtomicMap.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.NonnegativeAtomicMap" + ], + "note": "Sorted positive summable families, finite atomic measures and product grouping; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Order/Monotone/PositiveExtension.lean" + ], + "modules": [ + "Mathlib.Order.Monotone.PositiveExtension" + ], + "note": "Sorted positive summable families, finite atomic measures and product grouping; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/SortedAtomicSequence.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.SortedAtomicSequence" + ], + "note": "Sorted positive summable families, finite atomic measures and product grouping; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSumBounds.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumBounds" + ], + "note": "Positive spectral heat traces, Laplace moments, and real restriction of holomorphic derivatives; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSum.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSum" + ], + "note": "Positive spectral heat traces, Laplace moments, and real restriction of holomorphic derivatives; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/ExponentialSumLaplace.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.ExponentialSumLaplace" + ], + "note": "Positive spectral heat traces, Laplace moments, and real restriction of holomorphic derivatives; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/PositiveSlopeHeatTrace.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeHeatTrace" + ], + "note": "Positive spectral heat traces, Laplace moments, and real restriction of holomorphic derivatives; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/IteratedRealDeriv.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.IteratedRealDeriv" + ], + "note": "Positive spectral heat traces, Laplace moments, and real restriction of holomorphic derivatives; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/SubexponentialLowerBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.SubexponentialLowerBound" + ], + "note": "Exponential lower bounds obstruct order below one; positive linear products have norm at least one on the right half-plane. Generalizes the former private Edrei lemma; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProductLowerBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProductLowerBound" + ], + "note": "Exponential lower bounds obstruct order below one; positive linear products have norm at least one on the right half-plane. Generalizes the former private Edrei lemma; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/Algebra/InfiniteSum/FiberCardinality.lean" + ], + "modules": [ + "Mathlib.Topology.Algebra.InfiniteSum.FiberCardinality" + ], + "note": "Fiber grouping, exact analytic multiplicities of linear products, and native zero heat traces. Generalizes the former private Edrei grouping argument; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProductDivisor.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProductDivisor" + ], + "note": "Fiber grouping, exact analytic multiplicities of linear products, and native zero heat traces. Generalizes the former private Edrei grouping argument; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/PositiveSlopeRoots.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.PositiveSlopeRoots" + ], + "note": "Fiber grouping, exact analytic multiplicities of linear products, and native zero heat traces. Generalizes the former private Edrei grouping argument; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProductInverseMoments.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProductInverseMoments" + ], + "note": "Fiber grouping, exact analytic multiplicities of linear products, and native zero heat traces. Generalizes the former private Edrei grouping argument; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/ZeroHeatTrace.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.ZeroHeatTrace" + ], + "note": "Fiber grouping, exact analytic multiplicities of linear products, and native zero heat traces. Generalizes the former private Edrei grouping argument; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/ZeroSpectralIndex.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.ZeroSpectralIndex" + ], + "note": "Unconditional heat estimates from native zero moduli, nonempty spectra below order one, and xi specializations. Shares zero-existence proof with polynomial factor extraction; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/AbsoluteZeroHeatTrace.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.AbsoluteZeroHeatTrace" + ], + "note": "Unconditional heat estimates from native zero moduli, nonempty spectra below order one, and xi specializations. Shares zero-existence proof with polynomial factor extraction; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/AbsoluteHeatTrace.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.AbsoluteHeatTrace" + ], + "note": "Unconditional heat estimates from native zero moduli, nonempty spectra below order one, and xi specializations. Shares zero-existence proof with polynomial factor extraction; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/GrowthOrder/Zero/Nonempty.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.GrowthOrder.Zero.Nonempty" + ], + "note": "Unconditional heat estimates from native zero moduli, nonempty spectra below order one, and xi specializations. Shares zero-existence proof with polynomial factor extraction; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/ZeroSpectralNonempty.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.ZeroSpectralNonempty" + ], + "note": "Unconditional heat estimates from native zero moduli, nonempty spectra below order one, and xi specializations. Shares zero-existence proof with polynomial factor extraction; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/AbsoluteHeatTracePositive.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.AbsoluteHeatTracePositive" + ], + "note": "Unconditional heat estimates from native zero moduli, nonempty spectra below order one, and xi specializations. Shares zero-existence proof with polynomial factor extraction; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/CompletelyMonotone/ReciprocalHierarchy.lean" + ], + "modules": [ + "Mathlib.Analysis.CompletelyMonotone.ReciprocalHierarchy" + ], + "note": "Origin multiplicity contributions to logarithmic derivatives and heat traces; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LogDerivPowMul.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LogDerivPowMul" + ], + "note": "Origin multiplicity contributions to logarithmic derivatives and heat traces; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/LaplaceConstant.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.LaplaceConstant" + ], + "note": "Origin multiplicity contributions to logarithmic derivatives and heat traces; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/ZeroHeatTraceOrigin.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.ZeroHeatTraceOrigin" + ], + "note": "Origin multiplicity contributions to logarithmic derivatives and heat traces; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/OriginFactor.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.OriginFactor" + ], + "note": "Conjugation symmetry and Taylor signs after removing real monomial factors; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/RealLogDeriv.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.RealLogDeriv" + ], + "note": "Real logarithms and canonical coefficients of entire scalar series; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/RealSeries.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.RealSeries" + ], + "note": "Real logarithms and canonical coefficients of entire scalar series; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/WeightedMixtureLaplace.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.WeightedMixtureLaplace" + ], + "note": "Weighted exponential-mixture Laplace and Laguerre kernel identities; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/WeightedHeatLaplace.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.WeightedHeatLaplace" + ], + "note": "Weighted exponential-mixture Laplace and Laguerre kernel identities; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/LaplaceKernel.lean" + ], + "modules": [ + "Mathlib.RingTheory.Polynomial.Laguerre.LaplaceKernel" + ], + "note": "Weighted exponential-mixture Laplace and Laguerre kernel identities; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/LaguerreHeatLaplace.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.LaguerreHeatLaplace" + ], + "note": "Weighted exponential-mixture Laplace and Laguerre kernel identities; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Exp/PositiveSlopeWeightedHeat.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Exp.PositiveSlopeWeightedHeat" + ], + "note": "Weighted exponential-mixture Laplace and Laguerre kernel identities; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/ZeroWeightedHeatTrace.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.ZeroWeightedHeatTrace" + ], + "note": "Weighted exponential-mixture Laplace and Laguerre kernel identities; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/Polynomial/Laguerre/Rodrigues.lean" + ], + "modules": [ + "Mathlib.RingTheory.Polynomial.Laguerre.Rodrigues" + ], + "note": "Weighted exponential-mixture Laplace and Laguerre kernel identities; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/ZeroHeatTraceScale.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.ZeroHeatTraceScale" + ], + "note": "Nonzero scalar invariance of native divisor heat traces; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/RegularizedHypergeometric/Derivatives.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric.Derivatives" + ], + "note": "Taylor derivatives of entire regularized hypergeometric functions, including Gamma-pole lower parameters; no upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/PowerRootsProduct.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.PowerRootsProduct" + ], + "note": "Homogeneous product over the roots of X^n+1 with multiplicities and zero scaling. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Topology/MetricSpace/Algebra/FiniteProduct.lean" + ], + "modules": [ + "Mathlib.Topology.MetricSpace.Algebra.FiniteProduct" + ], + "note": "Locally uniform convergence of finite multiset products. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/MobiusTransform/Map.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.MobiusTransform.Map" + ], + "note": "Coefficient maps commute with homogeneous Mobius transforms. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/EvenCoefficients.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.EvenCoefficients" + ], + "note": "Even coefficient support and removal of even origin factors. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/IteratedDeriv/PartialContinuity.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.IteratedDeriv.PartialContinuity" + ], + "note": "Continuity of partial iterated derivatives in a parameter. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/RealIdentity.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.RealIdentity" + ], + "note": "Punctured real-axis nonvanishing for nonzero entire functions. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/TranslateProductContinuity.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.TranslateProductContinuity" + ], + "note": "Continuity of translated-product Taylor coefficients in the center. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/TranslateProductNonzero.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.TranslateProductNonzero" + ], + "note": "Entire finite translated products and nonvanishing with nonzero slopes. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/CompactJets.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.CompactJets" + ], + "note": "Uniform nonvanishing Taylor jets on compact sets for nonzero entire functions. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SymbolAlgebra.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.SymbolAlgebra" + ], + "note": "Scalar, additive and variable-factor algebra of actual infinite differential series. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialComposition.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialComposition" + ], + "note": "Finite polynomial-symbol composition with infinite differential operators under reciprocal growth bounds. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/ExponentialCoefficients.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.ExponentialCoefficients" + ], + "note": "Exponential-type Taylor coefficient bounds retaining the type. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SmallTypeBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.SmallTypeBound" + ], + "note": "Absolute convergence and linear error bounds for small-type differential symbols. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SmallTypeLimit.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.SmallTypeLimit" + ], + "note": "Local uniform convergence to the identity for normalized symbols of vanishing type. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GenusZeroTail.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GenusZeroTail" + ], + "note": "Canonical genus-zero tail operators converge to identity on finite-order entire targets. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialCommute.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialCommute" + ], + "note": "Finite polynomial differential operators commute with actual infinite differential operators. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/SimpleLimit.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.SimpleLimit" + ], + "note": "Stability of simple zeros on compact sets under locally uniform entire convergence. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/LinearProductDegree.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.LinearProductDegree" + ], + "note": "Degree divergence of products of real linear factors with infinite nonzero-slope support. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProductPrefix.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProductPrefix" + ], + "note": "Growth, prefix factorization and support of convergent real linear canonical products. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/FactorialExponential.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.FactorialExponential" + ], + "note": "Normalized factorial upper bound retaining the exponential scale. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianDerivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianDerivative" + ], + "note": "Gaussian norm recentering and optimized Cauchy derivative estimates. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianBound" + ], + "note": "Differential series term bounds retaining the sharp Gaussian threshold. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianConvergence.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianConvergence" + ], + "note": "Absolute and locally uniform convergence of actual differential series under sharp Gaussian bounds. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianUniformBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianUniformBound" + ], + "note": "Common summable Gaussian differential majorants for symbol families. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianImageGrowth.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianImageGrowth" + ], + "note": "Gaussian norm and order bounds for actual infinite differential images. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSymbolLimit.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSymbolLimit" + ], + "note": "Continuity in locally uniform symbols under a common Gaussian envelope. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/MinimalType.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.CanonicalProduct.MinimalType" + ], + "note": "Arbitrary-index weighted genus-one canonical products have minimal quadratic type. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GaussianProductBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.CanonicalProduct.GaussianProductBound" + ], + "note": "Canonical products retain their Gaussian coefficient in arbitrarily sharp norm estimates. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianJets.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianJets" + ], + "note": "Gaussian bounds for spatial derivatives with arbitrarily small type increase. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSpatialDerivative.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSpatialDerivative" + ], + "note": "Spatial derivatives commute with convergent Gaussian differential operators. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianPolynomialBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianPolynomialBound" + ], + "note": "Polynomial multiplication retains arbitrarily close Gaussian bounds. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/SymbolSummable.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.SymbolSummable" + ], + "note": "Additive and variable-factor algebra of actually summable differential symbols. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianSymbolAlgebra.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianSymbolAlgebra" + ], + "note": "Actual differential-symbol algebra under sharp Gaussian convergence. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianPolynomialComposition.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianPolynomialComposition" + ], + "note": "Finite polynomial-factor composition for Gaussian infinite differential operators. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/PolynomialSymbol.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.PolynomialSymbol" + ], + "note": "Actual polynomial differential series equal finite differential operators. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianApproxComposition.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianApproxComposition" + ], + "note": "Infinite-factor composition under controlled minimal-quadratic polynomial approximation. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearPrefixGaussian.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearPrefixGaussian" + ], + "note": "Common arbitrarily small Gaussian bounds for summable linear-product prefixes. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GenusZeroComposition.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GenusZeroComposition" + ], + "note": "Actual infinite composition for summable real genus-zero factors. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Normed/Group/SparseSubfamily.lean" + ], + "modules": [ + "Mathlib.Analysis.Normed.Group.SparseSubfamily" + ], + "note": "Square-summable real families admit summable subfamilies of distinct nonzero values. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProductNonpolynomial.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProductNonpolynomial" + ], + "note": "Infinitely many distinct nonzero slopes force a nonpolynomial linear product. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GenusOneSplit.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.CanonicalProduct.GenusOneSplit" + ], + "note": "Actual genus-one product splitting and natural multiplicity expansion. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/CanonicalSupport.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.CanonicalProduct.CanonicalSupport" + ], + "note": "Infinite canonical zero sets force infinite active slope support. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/InfiniteDifferential/GaussianMargin.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.InfiniteDifferential.GaussianMargin" + ], + "note": "Positive Gaussian coefficients inside the strict product threshold. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Step.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.Step" + ], + "note": "Formal Stieltjes steps and their contraction in the X-adic filtration. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Convergents.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.Convergents" + ], + "note": "Finite Stieltjes convergents stabilize coefficientwise and terminate at zero numerators. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Tail.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.Tail" + ], + "note": "Actual formal Stieltjes tails and their unique recursion. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Coefficients.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.Coefficients" + ], + "note": "Stieltjes-Rogers coefficient recurrence and coefficient positivity. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Uniqueness.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.Uniqueness" + ], + "note": "Stieltjes numerator uniqueness up to the first zero and active-sign obstructions. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Step.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.JacobiFraction.Step" + ], + "note": "Formal Jacobi steps and unique tail equations. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Contraction.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.Contraction" + ], + "note": "Exact formal contraction from Stieltjes to Jacobi fractions. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/ImaginaryAxisBound.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.CanonicalProduct.ImaginaryAxisBound" + ], + "note": "Imaginary-axis lower bounds for weighted real canonical products. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/CanonicalProduct/GaussianCoefficient.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.CanonicalProduct.GaussianCoefficient" + ], + "note": "Every sharp Gaussian bound controls the native canonical Gaussian coefficient. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Matrix/CoordinateSpectralMeasure.lean" + ], + "modules": [ + "Mathlib.Analysis.Matrix.CoordinateSpectralMeasure" + ], + "note": "Coordinate spectral measures and exact matrix-power moments. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/FirstMomentTight.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.FirstMomentTight" + ], + "note": "Tightness from uniformly bounded first moments on the nonnegative half-line. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/WeakMomentLimits.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.WeakMomentLimits" + ], + "note": "Weak limits inherit convergent polynomial moments by higher-moment bounds. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/MomentLimit.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.MomentLimit" + ], + "note": "Pointwise limits of Stieltjes moment sequences admit actual finite representing measures. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Resolvent.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.PowerSeries.Resolvent" + ], + "note": "Formal matrix-power resolvents over commutative rings. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Schur.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.PowerSeries.Schur" + ], + "note": "Formal scalar Schur denominators and Jacobi fraction steps. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/BidiagonalGram.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.BidiagonalGram" + ], + "note": "Exact first-coordinate block identities for bidiagonal Gram matrices. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/Reindex.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.PowerSeries.Reindex" + ], + "note": "Reindexing invariance of formal matrix resolvents. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/FinSchur.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.PowerSeries.FinSchur" + ], + "note": "Finite-index form of the first Jacobi resolvent step. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TailOffset.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.TailOffset" + ], + "note": "Stieltjes tail offsets and first-diagonal corrections. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/StieltjesGram.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.StieltjesGram" + ], + "note": "Positive semidefinite finite Jacobi matrices from Stieltjes numerator data. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/LinearAlgebra/Matrix/PowerSeries/StieltjesConvergence.lean" + ], + "modules": [ + "Mathlib.LinearAlgebra.Matrix.PowerSeries.StieltjesConvergence" + ], + "note": "Stabilization of matrix-power moments to formal Stieltjes coefficients. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Moment.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.Moment" + ], + "note": "Nonnegative formal Stieltjes fractions have genuine finite moment measures. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentAlgebra.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentAlgebra" + ], + "note": "Moment pairing symmetry, lower orthogonality and squared norms. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentRecurrence.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentRecurrence" + ], + "note": "Monic three-term recurrence from positive Hankel forms. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentHankelFactorization.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentHankelFactorization" + ], + "note": "Unitriangular Hankel factorization and determinant norm products. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentShift.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentShift" + ], + "note": "Moment shifts as multiplication by X. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentChristoffel.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffel" + ], + "note": "Positive paired Christoffel identities and Stieltjes norm ratios. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerGauss.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerGauss" + ], + "note": "Formal Euler-Gauss recurrence produces Stieltjes tails. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentChristoffelLocal.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentChristoffelLocal" + ], + "note": "Christoffel identities with finite determinant and norm hypotheses. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerPaired.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerPaired" + ], + "note": "Paired formal Euler-Gauss recurrences. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeries.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentSeries" + ], + "note": "Normalized orthogonal moment series. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeriesRecurrence.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesRecurrence" + ], + "note": "Euler-Gauss recurrences from positive Hankel forms. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/StrictMoment.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.StrictMoment" + ], + "note": "Strict Hankel positivity gives positive formal Stieltjes fractions. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentSeriesLocal.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentSeriesLocal" + ], + "note": "Finite Euler-Gauss steps and terminating pairing identities. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/PolynomialMoment.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.PolynomialMoment" + ], + "note": "Integration identities for shifted polynomial moments. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/HankelSupport.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.HankelSupport" + ], + "note": "Strict Hankel positivity for measures without finite carriers. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/InfiniteMoment.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.InfiniteMoment" + ], + "note": "Strictly positive Stieltjes fractions for arbitrary infinite-support measures. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/EulerTermination.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.EulerTermination" + ], + "note": "Formal terminating Euler-Gauss recurrences. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/FiniteAtomicNorms.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.FiniteAtomicNorms" + ], + "note": "Finite atomic Hankel positivity, nodal polynomials and exact vanishing norms. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteMoment.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteMoment" + ], + "note": "Finite-rank moment data give exactly terminating positive Stieltjes fractions. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteAtomicFraction.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteAtomicFraction" + ], + "note": "Nonnegative finite atomic moment sequences have Stieltjes fractions. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/FiniteMeasureFraction.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.FiniteMeasureFraction" + ], + "note": "Finite-carrier measures give Stieltjes fractions via their positive-mass atoms. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/MomentCriterion.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.MomentCriterion" + ], + "note": "Complete equivalence of genuine Stieltjes moment measures and formal nonnegative fractions. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentDeterminantRatios.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentDeterminantRatios" + ], + "note": "Hankel determinant ratios for orthogonal norms and Stieltjes numerators. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/MomentTranslation.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.MomentTranslation" + ], + "note": "Binomial moment translation, orthogonal covariance and symmetric-measure parity. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentTranslation.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentTranslation" + ], + "note": "Binomial moment translation, orthogonal covariance and symmetric-measure parity. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/MomentTranslation.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.MomentTranslation" + ], + "note": "Binomial moment translation, orthogonal covariance and symmetric-measure parity. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Orthogonal/MomentParity.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Orthogonal.MomentParity" + ], + "note": "Binomial moment translation, orthogonal covariance and symmetric-measure parity. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/MomentParity.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.MomentParity" + ], + "note": "Binomial moment translation, orthogonal covariance and symmetric-measure parity. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/MomentTranslationSucc.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.MomentTranslationSucc" + ], + "note": "Formal binomial and Jacobi translation; equality through the first terminating Stieltjes numerator. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/BinomialTransform.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.BinomialTransform" + ], + "note": "Formal binomial and Jacobi translation; equality through the first terminating Stieltjes numerator. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Translation.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.JacobiFraction.Translation" + ], + "note": "Formal binomial and Jacobi translation; equality through the first terminating Stieltjes numerator. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ActivePrefix.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActivePrefix" + ], + "note": "Formal binomial and Jacobi translation; equality through the first terminating Stieltjes numerator. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportParameters.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportParameters" + ], + "note": "Formal Stieltjes criterion for a prescribed lower support bound, with terminating active-prefix parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportConstruction.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportConstruction" + ], + "note": "Formal Stieltjes criterion for a prescribed lower support bound, with terminating active-prefix parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/BinomialTransform/Inverse.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.BinomialTransform.Inverse" + ], + "note": "Formal Stieltjes criterion for a prescribed lower support bound, with terminating active-prefix parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerSupportCriterion.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerSupportCriterion" + ], + "note": "Formal Stieltjes criterion for a prescribed lower support bound, with terminating active-prefix parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ActiveSupportCriterion.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.ActiveSupportCriterion" + ], + "note": "Formal Stieltjes criterion for a prescribed lower support bound, with terminating active-prefix parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/LowerParameters.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.LowerParameters" + ], + "note": "Nonnegative initial Stieltjes parameters, compact active-prefix admissibility, and the terminating Dirac boundary. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/InitialParameterCriterion.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.InitialParameterCriterion" + ], + "note": "Nonnegative initial Stieltjes parameters, compact active-prefix admissibility, and the terminating Dirac boundary. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/AdmissibleParameters.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.AdmissibleParameters" + ], + "note": "Nonnegative initial Stieltjes parameters, compact active-prefix admissibility, and the terminating Dirac boundary. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TerminatingBoundary.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.TerminatingBoundary" + ], + "note": "Nonnegative initial Stieltjes parameters, compact active-prefix admissibility, and the terminating Dirac boundary. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/BoundedParameters.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.BoundedParameters" + ], + "note": "Nonnegative initial Stieltjes parameters, compact active-prefix admissibility, and the terminating Dirac boundary. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactParameters.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactParameters" + ], + "note": "Nonnegative initial Stieltjes parameters, compact active-prefix admissibility, and the terminating Dirac boundary. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/SqrtSymmetrization.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.SqrtSymmetrization" + ], + "note": "Symmetric square-root measures, moment aeration, and exact support transport. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/SqrtMoments.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.SqrtMoments" + ], + "note": "Symmetric square-root measures, moment aeration, and exact support transport. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/SqrtSupport.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.SqrtSupport" + ], + "note": "Symmetric square-root measures, moment aeration, and exact support transport. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/AeratedMoments.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.AeratedMoments" + ], + "note": "Symmetric square-root measures, moment aeration, and exact support transport. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Aeration.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.JacobiFraction.Aeration" + ], + "note": "Formal square-variable aeration and recovery of active Jacobi coefficients. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/AeratedSeries.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.AeratedSeries" + ], + "note": "Formal square-variable aeration and recovery of active Jacobi coefficients. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/Coefficients.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.JacobiFraction.Coefficients" + ], + "note": "Formal square-variable aeration and recovery of active Jacobi coefficients. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/JacobiFraction/ActiveCoefficients.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.JacobiFraction.ActiveCoefficients" + ], + "note": "Formal square-variable aeration and recovery of active Jacobi coefficients. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CatalanBound.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.CatalanBound" + ], + "note": "Stieltjes coefficient bounds and Wall chain extraction from active Jacobi data. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/MeasureBound.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.MeasureBound" + ], + "note": "Stieltjes coefficient bounds and Wall chain extraction from active Jacobi data. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainParameters.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainParameters" + ], + "note": "Stieltjes coefficient bounds and Wall chain extraction from active Jacobi data. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/TranslatedAeration.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.TranslatedAeration" + ], + "note": "Stieltjes coefficient bounds and Wall chain extraction from active Jacobi data. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/SqrtTranslation.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.SqrtTranslation" + ], + "note": "Wall chain representations and sharp support of genuine compact moment measures. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactMomentsChain.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentsChain" + ], + "note": "Wall chain representations and sharp support of genuine compact moment measures. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainAeration.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainAeration" + ], + "note": "Wall chain representations and sharp support of genuine compact moment measures. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/NonnegativeMoments.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.NonnegativeMoments" + ], + "note": "Wall chain representations and sharp support of genuine compact moment measures. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/ChainMomentSupport.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.ChainMomentSupport" + ], + "note": "Wall chain representations and sharp support of genuine compact moment measures. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/ExactMomentSupport.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.ExactMomentSupport" + ], + "note": "Exact compact support and the full Wall chain moment criterion, including arbitrary initial parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ChainCoefficientBound.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.ChainCoefficientBound" + ], + "note": "Exact compact support and the full Wall chain moment criterion, including arbitrary initial parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/BoundedChainSupport.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.BoundedChainSupport" + ], + "note": "Exact compact support and the full Wall chain moment criterion, including arbitrary initial parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/CompactMomentCriterion.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.CompactMomentCriterion" + ], + "note": "Exact compact support and the full Wall chain moment criterion, including arbitrary initial parameters. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Calculus/LogDeriv/Const.lean" + ], + "modules": [ + "Mathlib.Analysis.Calculus.LogDeriv.Const" + ], + "note": "Constant division preserves totalized logarithmic derivatives over normed fields. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/Complementary.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.Complementary" + ], + "note": "Complementary Wall chains and their exact coefficient convolution over commutative rings. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ComplementaryCoefficients.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.ComplementaryCoefficients" + ], + "note": "Complementary Wall chains and their exact coefficient convolution over commutative rings. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/StieltjesFraction/ComplementaryChain.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.StieltjesFraction.ComplementaryChain" + ], + "note": "Complementary Wall chains and their exact coefficient convolution over commutative rings. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/GrowthOrder/SquareDescent.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.GrowthOrder.SquareDescent" + ], + "note": "Square-variable descent, growth-order halving, and correspondence of real and negative zeros, extending TauCeti descent.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/ImaginarySquareDescent.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.ImaginarySquareDescent" + ], + "note": "Square-variable descent, growth-order halving, and correspondence of real and negative zeros, extending TauCeti descent.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Measure/AtomicGap.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Measure.AtomicGap" + ], + "note": "Finite-support linear products and positive support gaps for slope-weighted atomic measures.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Complex/LinearProductFinite.lean" + ], + "modules": [ + "Mathlib.Analysis.Complex.LinearProductFinite" + ], + "note": "Finite-support linear products and positive support gaps for slope-weighted atomic measures.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/LowDegree.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.LowDegree" + ], + "note": "Second coefficients of formal power-series products and normalized powers over commutative semirings.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/TaylorEvaluation.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.TaylorEvaluation" + ], + "note": "Polynomial Taylor evaluation, translation integrals, and actual complex moment-generating Taylor series and reciprocal germs.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/PolynomialTranslation.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.PolynomialTranslation" + ], + "note": "Polynomial Taylor evaluation, translation integrals, and actual complex moment-generating Taylor series and reciprocal germs.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Analytic/TaylorInverse.lean" + ], + "modules": [ + "Mathlib.Analysis.Analytic.TaylorInverse" + ], + "note": "Polynomial Taylor evaluation, translation integrals, and actual complex moment-generating Taylor series and reciprocal germs.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Probability/Moments/MGFTaylor.lean" + ], + "modules": [ + "Mathlib.Probability.Moments.MGFTaylor" + ], + "note": "Polynomial Taylor evaluation, translation integrals, and actual complex moment-generating Taylor series and reciprocal germs.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/PowerCoefficient.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.PowerCoefficient" + ], + "note": "Fixed-coefficient binomial formulas and real-power asymptotics for rescaled formal power series.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/ChooseRpow.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.ChooseRpow" + ], + "note": "Fixed-coefficient binomial formulas and real-power asymptotics for rescaled formal power series.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/RescaledPowerLimit.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.RescaledPowerLimit" + ], + "note": "Fixed-coefficient binomial formulas and real-power asymptotics for rescaled formal power series.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/ExpCoefficient.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.ExpCoefficient" + ], + "note": "Formal exponential coefficients and centering by the inverse linear exponential.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/Centering.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.Centering" + ], + "note": "Formal exponential coefficients and centering by the inverse linear exponential.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/ExponentialJet.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.ExponentialJet" + ], + "note": "Finite exponential jet centering and exact first ordinary-coefficient discrepancy over characteristic-zero fields. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/RootMatchingLimit.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.RootMatchingLimit" + ], + "note": "Filter forms of multiplicity-sensitive polynomial root matching and local root counts under fixed-degree monic coefficient convergence. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/LocallyUniformLimit.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.LocallyUniformLimit" + ], + "note": "Bounded-degree coefficient convergence implies locally uniform polynomial evaluation convergence over seminormed rings. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/NonrealPersistence.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.NonrealPersistence" + ], + "note": "Nonreal roots persist under coefficientwise limits or multiplicity-sensitive complex root matching. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/PowerSeries/FirstDiscrepancy.lean" + ], + "modules": [ + "Mathlib.RingTheory.PowerSeries.FirstDiscrepancy" + ], + "note": "A nonexponential normalized formal symbol has a least exponential-coefficient discrepancy of order at least two. No upstream PR yet.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Algebra/Polynomial/Expand/PowerRoots.lean" + ], + "modules": [ + "Mathlib.Algebra.Polynomial.Expand.PowerRoots" + ], + "note": "Root multiplicities and positive-root bijection under power substitution.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/SeparableLimit.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.SeparableLimit" + ], + "note": "Separability is eventually preserved by fixed-degree monic coefficient limits.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/RingTheory/Polynomial/ScaleRoots/Separable.lean" + ], + "modules": [ + "Mathlib.RingTheory.Polynomial.ScaleRoots.Separable" + ], + "note": "Separability under nonzero root scaling over arbitrary fields; translation reuses pinned TauCeti.RingTheory.Polynomial.Roots.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/Bochner/WeightedCovariance.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.Bochner.WeightedCovariance" + ], + "note": "Weighted covariance and strict even-moment inequalities from logarithmic concavity; general infrastructure for Csordas--Varga1988.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/Bochner/StrictWeightedCovariance.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.Bochner.StrictWeightedCovariance" + ], + "note": "Weighted covariance and strict even-moment inequalities from logarithmic concavity; general infrastructure for Csordas--Varga1988.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/IntegralEqImproper/Power.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.IntegralEqImproper.Power" + ], + "note": "Weighted covariance and strict even-moment inequalities from logarithmic concavity; general infrastructure for Csordas--Varga1988.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/Bochner/EvenMoments.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.Bochner.EvenMoments" + ], + "note": "Weighted covariance and strict even-moment inequalities from logarithmic concavity; general infrastructure for Csordas--Varga1988.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Convex/LogSqrtSlope.lean" + ], + "modules": [ + "Mathlib.Analysis.Convex.LogSqrtSlope" + ], + "note": "Weighted covariance and strict even-moment inequalities from logarithmic concavity; general infrastructure for Csordas--Varga1988.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/MeasureTheory/Integral/Bochner/LogConcaveMoments.lean" + ], + "modules": [ + "Mathlib.MeasureTheory.Integral.Bochner.LogConcaveMoments" + ], + "note": "Weighted covariance and strict even-moment inequalities from logarithmic concavity; general infrastructure for Csordas--Varga1988.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierPolynomial.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.FourierPolynomial" + ], + "note": "Gaussian lattice majorants and the actual xi Fourier-kernel derivative series; Csordas--Varga1988 analytic infrastructure.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierSummand.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.FourierSummand" + ], + "note": "Gaussian lattice majorants and the actual xi Fourier-kernel derivative series; Csordas--Varga1988 analytic infrastructure.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianTail.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianTail" + ], + "note": "Gaussian lattice majorants and the actual xi Fourier-kernel derivative series; Csordas--Varga1988 analytic infrastructure.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/Polynomial/GaussianMajorant.lean" + ], + "modules": [ + "Mathlib.Analysis.Polynomial.GaussianMajorant" + ], + "note": "Gaussian lattice majorants and the actual xi Fourier-kernel derivative series; Csordas--Varga1988 analytic infrastructure.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierMajorant.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.FourierMajorant" + ], + "note": "Gaussian lattice majorants and the actual xi Fourier-kernel derivative series; Csordas--Varga1988 analytic infrastructure.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/FourierSeries.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.FourierSeries" + ], + "note": "Gaussian lattice majorants and the actual xi Fourier-kernel derivative series; Csordas--Varga1988 analytic infrastructure.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/Analysis/SpecialFunctions/Gaussian/ParameterDerivative.lean" + ], + "modules": [ + "Mathlib.Analysis.SpecialFunctions.Gaussian.ParameterDerivative" + ], + "note": "Gaussian lattice majorants and the actual xi Fourier-kernel derivative series; Csordas--Varga1988 analytic infrastructure.", + "speculative": true + }, + { + "sources": [ + "RealRooted/Mathlib/NumberTheory/LSeries/RiemannXi/ThetaSecondDerivative.lean" + ], + "modules": [ + "Mathlib.NumberTheory.LSeries.RiemannXi.ThetaSecondDerivative" + ], + "note": "Gaussian lattice majorants and the actual xi Fourier-kernel derivative series; Csordas--Varga1988 analytic infrastructure.", + "speculative": true } ] }